From 84da49f55e792a22648ac8af92212005cbf7b0a8 Mon Sep 17 00:00:00 2001 From: Nathaniel Waldschmidt Date: Wed, 26 Jun 2024 16:24:44 -0500 Subject: [PATCH] feat: radio button improvements --- .../LegacyModal/LegacyModal.stories.js | 8 +- src/components/MegaButton/MegaButton.mdx | 39 -- .../MegaButton/MegaButton.stories.js | 184 ------- src/components/MegaButton/MegaButton.vue | 195 -------- .../MegaButton/__tests__/MegaButton.spec.js | 369 -------------- src/components/Modal/Modal.stories.js | 8 +- .../RadioButton/RadioButton.stories.js | 79 ++- src/components/RadioButton/RadioButton.vue | 461 +++++++++++------- .../RadioButton/RadioButtonGroup.vue | 65 +++ ...adioButton.spec.js => RadioButton.spec.ts} | 16 +- .../__tests__/RadioButtonGroup.spec.ts | 38 ++ src/components/RadioButton/constants.ts | 9 + src/components/RadioButton/index.ts | 3 + .../RadioButtonLarge/RadioButtonLarge.mdx | 50 -- .../RadioButtonLarge.stories.js | 84 ---- .../RadioButtonLarge/RadioButtonLarge.vue | 228 --------- .../__tests__/RadioButtonLarge.spec.js | 81 --- src/components/RadioGroup/RadioGroup.mdx | 32 -- .../RadioGroup/RadioGroup.stories.js | 216 -------- src/components/RadioGroup/RadioGroup.vue | 37 -- .../RadioGroup/__tests__/RadioGroup.spec.js | 20 - src/components/index.js | 4 - src/main.ts | 1 + src/types/Variant.ts | 3 +- 24 files changed, 483 insertions(+), 1747 deletions(-) delete mode 100644 src/components/MegaButton/MegaButton.mdx delete mode 100644 src/components/MegaButton/MegaButton.stories.js delete mode 100644 src/components/MegaButton/MegaButton.vue delete mode 100644 src/components/MegaButton/__tests__/MegaButton.spec.js create mode 100644 src/components/RadioButton/RadioButtonGroup.vue rename src/components/RadioButton/__tests__/{RadioButton.spec.js => RadioButton.spec.ts} (82%) create mode 100644 src/components/RadioButton/__tests__/RadioButtonGroup.spec.ts create mode 100644 src/components/RadioButton/constants.ts create mode 100644 src/components/RadioButton/index.ts delete mode 100644 src/components/RadioButtonLarge/RadioButtonLarge.mdx delete mode 100644 src/components/RadioButtonLarge/RadioButtonLarge.stories.js delete mode 100644 src/components/RadioButtonLarge/RadioButtonLarge.vue delete mode 100644 src/components/RadioButtonLarge/__tests__/RadioButtonLarge.spec.js delete mode 100644 src/components/RadioGroup/RadioGroup.mdx delete mode 100644 src/components/RadioGroup/RadioGroup.stories.js delete mode 100644 src/components/RadioGroup/RadioGroup.vue delete mode 100644 src/components/RadioGroup/__tests__/RadioGroup.spec.js diff --git a/src/components/LegacyModal/LegacyModal.stories.js b/src/components/LegacyModal/LegacyModal.stories.js index d57ce62c9..cceb5fb90 100644 --- a/src/components/LegacyModal/LegacyModal.stories.js +++ b/src/components/LegacyModal/LegacyModal.stories.js @@ -1,7 +1,7 @@ import Dropdown from '../Dropdown/Dropdown.vue'; import LobButton from '../Button/Button.vue'; import RadioButton from '../RadioButton/RadioButton.vue'; -import RadioGroup from '../RadioGroup/RadioGroup.vue'; +import RadioButtonGroup from '../RadioButton/RadioButtonGroup.vue'; import LegacyModal from './LegacyModal.vue'; import mdx from './LegacyModal.mdx'; @@ -20,7 +20,7 @@ const radioModel = 'yes'; const PrimaryTemplate = (args, { argTypes }) => ({ props: Object.keys(argTypes), - components: { LegacyModal, LobButton, RadioButton, RadioGroup }, + components: { LegacyModal, LobButton, RadioButton, RadioButtonGroup }, setup: () => ({ args }), data: () => ({ isModalVisible, radioModel }), template: ` @@ -36,10 +36,10 @@ const PrimaryTemplate = (args, { argTypes }) => ({ @close="isModalVisible = false" > Would you like to export an additional CSV of associated tracking events? - + - +