@agility/plenum-ui 2.0.0-rc47 → 2.0.0-rc49

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. package/.eslintrc.json +6 -6
  2. package/.prettierrc +13 -13
  3. package/.storybook/Layout.jsx +12 -12
  4. package/.storybook/head.tsx +4 -4
  5. package/.storybook/main.ts +18 -18
  6. package/.storybook/manager-head.html +1 -1
  7. package/.storybook/manager.ts +25 -25
  8. package/.storybook/plenumTheme.ts +8 -8
  9. package/.storybook/preview-head.html +3 -3
  10. package/.storybook/preview.tsx +28 -28
  11. package/.vscode/settings.json +3 -3
  12. package/README.md +271 -271
  13. package/app/globals.css +99 -99
  14. package/app/head.tsx +59 -59
  15. package/app/layout.tsx +28 -28
  16. package/app/page.tsx +7 -7
  17. package/build.js +45 -45
  18. package/dist/index.d.ts +232 -230
  19. package/dist/index.js +1 -1
  20. package/dist/index.js.map +3 -3
  21. package/dist/types/stories/molecules/inputs/select/Select.d.ts +2 -0
  22. package/local.sh +100 -100
  23. package/next.config.js +8 -8
  24. package/package.json +82 -82
  25. package/pages/api/hello.ts +13 -13
  26. package/postcss.config.js +6 -6
  27. package/rollup.config.mjs +41 -41
  28. package/scripts/create-component.js +97 -97
  29. package/stories/Introduction.mdx +314 -314
  30. package/stories/assets/stackalt.svg +1 -1
  31. package/stories/atoms/Avatar/Avatar.stories.tsx +96 -96
  32. package/stories/atoms/Avatar/Avatar.tsx +123 -123
  33. package/stories/atoms/Avatar/index.ts +3 -3
  34. package/stories/atoms/badges/Badge.tsx +127 -127
  35. package/stories/atoms/badges/Pill/Pill.stories.tsx +75 -75
  36. package/stories/atoms/badges/Rounded/Rounded.stories.tsx +75 -75
  37. package/stories/atoms/badges/index.ts +3 -3
  38. package/stories/atoms/buttons/Button/Alternative/Alternative.stories.ts +86 -86
  39. package/stories/atoms/buttons/Button/Button.tsx +232 -232
  40. package/stories/atoms/buttons/Button/Danger/Danger.stories.ts +90 -90
  41. package/stories/atoms/buttons/Button/Primary/Primary.stories.ts +97 -97
  42. package/stories/atoms/buttons/Button/Secondary/Secondary.stories.ts +93 -93
  43. package/stories/atoms/buttons/Button/defaultArgs.ts +9 -9
  44. package/stories/atoms/buttons/Button/index.ts +3 -3
  45. package/stories/atoms/buttons/Capsule/Alternative/Alternative.stories.ts +27 -27
  46. package/stories/atoms/buttons/Capsule/Capsule.tsx +88 -88
  47. package/stories/atoms/buttons/Capsule/Danger/Danger.stories.ts +27 -27
  48. package/stories/atoms/buttons/Capsule/Primary/Primary.stories.ts +27 -27
  49. package/stories/atoms/buttons/Capsule/Secondary/Secondary.stories.ts +27 -27
  50. package/stories/atoms/buttons/Capsule/index.ts +3 -3
  51. package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.stories.tsx +15 -15
  52. package/stories/atoms/buttons/FloatingActionButton/FloatingActionButton.tsx +22 -22
  53. package/stories/atoms/buttons/FloatingActionButton/index.tsx +3 -3
  54. package/stories/atoms/buttons/index.ts +4 -4
  55. package/stories/atoms/crumb/Crumb.stories.tsx +18 -18
  56. package/stories/atoms/crumb/Crumb.tsx +22 -22
  57. package/stories/atoms/crumb/index.tsx +3 -3
  58. package/stories/atoms/icons/DynamicIcon.stories.ts +43 -43
  59. package/stories/atoms/icons/DynamicIcon.tsx +90 -90
  60. package/stories/atoms/icons/IconWithShadow.stories.ts +43 -43
  61. package/stories/atoms/icons/IconWithShadow.tsx +16 -16
  62. package/stories/atoms/icons/TablerIcon.tsx +22 -22
  63. package/stories/atoms/icons/index.tsx +14 -14
  64. package/stories/atoms/icons/tablerIconNames.ts +4336 -4336
  65. package/stories/atoms/index.ts +46 -46
  66. package/stories/atoms/loaders/Loader.stories.ts +15 -15
  67. package/stories/atoms/loaders/Loader.tsx +21 -21
  68. package/stories/atoms/loaders/NProgress/RadialProgress.stories.tsx +19 -19
  69. package/stories/atoms/loaders/NProgress/RadialProgress.tsx +74 -74
  70. package/stories/atoms/loaders/NProgress/index.ts +3 -3
  71. package/stories/atoms/loaders/index.ts +4 -4
  72. package/stories/index.ts +136 -136
  73. package/stories/molecules/index.ts +51 -51
  74. package/stories/molecules/inputs/InputCounter/InputCounter.stories.tsx +18 -18
  75. package/stories/molecules/inputs/InputCounter/InputCounter.tsx +24 -24
  76. package/stories/molecules/inputs/InputCounter/index.tsx +3 -3
  77. package/stories/molecules/inputs/InputField/InputField.stories.tsx +29 -29
  78. package/stories/molecules/inputs/InputField/InputField.tsx +96 -96
  79. package/stories/molecules/inputs/InputField/index.tsx +3 -3
  80. package/stories/molecules/inputs/InputLabel/InputLabel.stories.tsx +19 -19
  81. package/stories/molecules/inputs/InputLabel/InputLabel.tsx +45 -45
  82. package/stories/molecules/inputs/InputLabel/index.tsx +3 -3
  83. package/stories/molecules/inputs/NestedInputButton/NestedInputButton.stories.tsx +52 -52
  84. package/stories/molecules/inputs/NestedInputButton/NestedInputButton.tsx +64 -64
  85. package/stories/molecules/inputs/NestedInputButton/index.tsx +3 -3
  86. package/stories/molecules/inputs/TextInput/TextInput.stories.tsx +32 -32
  87. package/stories/molecules/inputs/TextInput/TextInput.tsx +165 -165
  88. package/stories/molecules/inputs/TextInput/index.tsx +5 -5
  89. package/stories/molecules/inputs/checkbox/Checkbox.stories.ts +23 -23
  90. package/stories/molecules/inputs/checkbox/Checkbox.tsx +98 -98
  91. package/stories/molecules/inputs/checkbox/index.ts +3 -3
  92. package/stories/molecules/inputs/combobox/ComboBox.stories.ts +41 -41
  93. package/stories/molecules/inputs/combobox/ComboBox.tsx +185 -185
  94. package/stories/molecules/inputs/combobox/index.ts +3 -3
  95. package/stories/molecules/inputs/index.ts +38 -38
  96. package/stories/molecules/inputs/radio/Radio.stories.ts +27 -27
  97. package/stories/molecules/inputs/radio/Radio.tsx +92 -92
  98. package/stories/molecules/inputs/radio/index.ts +3 -3
  99. package/stories/molecules/inputs/select/Select.stories.ts +23 -23
  100. package/stories/molecules/inputs/select/Select.tsx +108 -100
  101. package/stories/molecules/inputs/select/index.ts +3 -3
  102. package/stories/molecules/inputs/textArea/TextArea.stories.ts +22 -22
  103. package/stories/molecules/inputs/textArea/TextArea.tsx +158 -158
  104. package/stories/molecules/inputs/textArea/index.ts +3 -3
  105. package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.stories.tsx +118 -118
  106. package/stories/molecules/inputs/toggleSwitch/ToggleSwitch.tsx +81 -81
  107. package/stories/molecules/inputs/toggleSwitch/index.ts +3 -3
  108. package/stories/molecules/tabs/Tabs.stories.tsx +18 -18
  109. package/stories/molecules/tabs/Tabs.tsx +22 -22
  110. package/stories/molecules/tabs/index.tsx +2 -2
  111. package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.stories.tsx +30 -30
  112. package/stories/organisms/AnimatedLabelInput/AnimatedLabelInput.tsx +66 -66
  113. package/stories/organisms/AnimatedLabelInput/index.tsx +3 -3
  114. package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.stories.tsx +26 -26
  115. package/stories/organisms/AnimatedLabelTextArea/AnimatedLabelTextArea.tsx +61 -61
  116. package/stories/organisms/AnimatedLabelTextArea/index.tsx +3 -3
  117. package/stories/organisms/ButtonDropdown/ButtonDropdown.stories.tsx +125 -125
  118. package/stories/organisms/ButtonDropdown/ButtonDropdown.tsx +86 -86
  119. package/stories/organisms/ButtonDropdown/index.tsx +3 -3
  120. package/stories/organisms/DropdownComponent/Dropdown.stories.tsx +73 -73
  121. package/stories/organisms/DropdownComponent/DropdownComponent.tsx +346 -346
  122. package/stories/organisms/DropdownComponent/dropdownItems.ts +122 -122
  123. package/stories/organisms/DropdownComponent/index.ts +4 -4
  124. package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.stories.tsx +76 -76
  125. package/stories/organisms/EmptySectionPlaceholder/EmptySectionPlaceholder.tsx +52 -52
  126. package/stories/organisms/EmptySectionPlaceholder/index.tsx +4 -4
  127. package/stories/organisms/FormInputWithAddons/FormInputWithAddons.stories.tsx +29 -29
  128. package/stories/organisms/FormInputWithAddons/FormInputWithAddons.tsx +145 -145
  129. package/stories/organisms/FormInputWithAddons/index.tsx +3 -3
  130. package/stories/organisms/TextInputSelect/InputSelect.tsx +59 -59
  131. package/stories/organisms/TextInputSelect/TextInputSelect.stories.tsx +33 -33
  132. package/stories/organisms/TextInputSelect/TextInputSelect.tsx +186 -186
  133. package/stories/organisms/TextInputSelect/index.tsx +3 -3
  134. package/stories/organisms/index.ts +27 -27
  135. package/tailwind.config.js +192 -192
  136. package/tsconfig.json +29 -29
  137. package/tsconfig.lib.json +25 -25
  138. package/utils/types.d.ts +2 -2
  139. package/utils/types.ts +3 -3
  140. package/utils/useId.d.ts +1 -1
  141. package/utils/useId.tsx +16 -16
@@ -1,90 +1,90 @@
1
- import type { Meta, StoryObj } from "@storybook/react"
2
- import Button from "../Button"
3
- import { defaultIcon } from "../defaultArgs"
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
- const meta: Meta<typeof Button> = {
7
- title: "Design System/atoms/Buttons/Button/Danger",
8
- component: Button,
9
- tags: ["autodocs"],
10
- argTypes: {}
11
- }
12
-
13
- export default meta
14
- type Story = StoryObj<typeof Button>
15
- // #region Danger Button Stories
16
- export const Danger: Story = {
17
- args: {
18
- actionType: "danger",
19
- label: "Danger Zone!",
20
- onClick: () => {
21
- window.alert("Button clicked!")
22
- }
23
- }
24
- }
25
-
26
- export const DangerDisabled: Story = {
27
- args: {
28
- actionType: "danger",
29
- label: "Danger Zone!",
30
- disabled: true,
31
- onClick: () => {
32
- window.alert("Button clicked!")
33
- }
34
- }
35
- }
36
-
37
- export const DangerTrailingIcon: Story = {
38
- args: {
39
- ...Danger.args,
40
- icon: {
41
- ...defaultIcon,
42
- icon: "IconTrash"
43
- },
44
- iconPosition: "trailing"
45
- }
46
- }
47
- export const DangerLeadingIcon: Story = {
48
- args: {
49
- ...DangerTrailingIcon.args,
50
- iconPosition: "leading"
51
- }
52
- }
53
- export const DangerSimpleIconName: Story = {
54
- args: {
55
- ...Danger.args,
56
- icon: "IconTrash",
57
- iconPosition: "leading"
58
- }
59
- }
60
- export const DangerExtraSmall: Story = {
61
- args: {
62
- ...Danger.args,
63
- size: "sm"
64
- }
65
- }
66
- export const DangerSmall: Story = {
67
- args: {
68
- ...Danger.args,
69
- size: "sm"
70
- }
71
- }
72
- export const DangerMedium: Story = {
73
- args: {
74
- ...Danger.args,
75
- size: "md"
76
- }
77
- }
78
- export const DangerLarge: Story = {
79
- args: {
80
- ...Danger.args,
81
- size: "lg"
82
- }
83
- }
84
- export const DangerExtraLarge: Story = {
85
- args: {
86
- ...Danger.args,
87
- size: "xl"
88
- }
89
- }
90
- // #endregion
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import Button from "../Button"
3
+ import { defaultIcon } from "../defaultArgs"
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
+ const meta: Meta<typeof Button> = {
7
+ title: "Design System/atoms/Buttons/Button/Danger",
8
+ component: Button,
9
+ tags: ["autodocs"],
10
+ argTypes: {}
11
+ }
12
+
13
+ export default meta
14
+ type Story = StoryObj<typeof Button>
15
+ // #region Danger Button Stories
16
+ export const Danger: Story = {
17
+ args: {
18
+ actionType: "danger",
19
+ label: "Danger Zone!",
20
+ onClick: () => {
21
+ window.alert("Button clicked!")
22
+ }
23
+ }
24
+ }
25
+
26
+ export const DangerDisabled: Story = {
27
+ args: {
28
+ actionType: "danger",
29
+ label: "Danger Zone!",
30
+ disabled: true,
31
+ onClick: () => {
32
+ window.alert("Button clicked!")
33
+ }
34
+ }
35
+ }
36
+
37
+ export const DangerTrailingIcon: Story = {
38
+ args: {
39
+ ...Danger.args,
40
+ icon: {
41
+ ...defaultIcon,
42
+ icon: "IconTrash"
43
+ },
44
+ iconPosition: "trailing"
45
+ }
46
+ }
47
+ export const DangerLeadingIcon: Story = {
48
+ args: {
49
+ ...DangerTrailingIcon.args,
50
+ iconPosition: "leading"
51
+ }
52
+ }
53
+ export const DangerSimpleIconName: Story = {
54
+ args: {
55
+ ...Danger.args,
56
+ icon: "IconTrash",
57
+ iconPosition: "leading"
58
+ }
59
+ }
60
+ export const DangerExtraSmall: Story = {
61
+ args: {
62
+ ...Danger.args,
63
+ size: "sm"
64
+ }
65
+ }
66
+ export const DangerSmall: Story = {
67
+ args: {
68
+ ...Danger.args,
69
+ size: "sm"
70
+ }
71
+ }
72
+ export const DangerMedium: Story = {
73
+ args: {
74
+ ...Danger.args,
75
+ size: "md"
76
+ }
77
+ }
78
+ export const DangerLarge: Story = {
79
+ args: {
80
+ ...Danger.args,
81
+ size: "lg"
82
+ }
83
+ }
84
+ export const DangerExtraLarge: Story = {
85
+ args: {
86
+ ...Danger.args,
87
+ size: "xl"
88
+ }
89
+ }
90
+ // #endregion
@@ -1,97 +1,97 @@
1
- import type { Meta, StoryObj } from "@storybook/react"
2
- import Button from "../Button"
3
- import { defaultIcon } from "../defaultArgs"
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
- const meta: Meta<typeof Button> = {
7
- title: "Design System/atoms/Buttons/Button/Primary",
8
- component: Button,
9
- tags: ["autodocs"],
10
- argTypes: {},
11
- parameters: {
12
- design: {
13
- type: "figma",
14
- url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=12-149&mode=design&t=9hpwa8YStpwXksff-4"
15
- }
16
- }
17
- }
18
-
19
- export default meta
20
- type Story = StoryObj<typeof Button>
21
- //#region Primary Button Stories
22
- export const Primary: Story = {
23
- args: {
24
- actionType: "primary",
25
- label: "Button",
26
- onClick: () => {
27
- window.alert("Button clicked!")
28
- }
29
- }
30
- }
31
-
32
- export const PrimaryDisabled: Story = {
33
- args: {
34
- actionType: "primary",
35
- label: "Button",
36
- disabled: true,
37
- onClick: () => {
38
- window.alert("Button clicked!")
39
- }
40
- }
41
- }
42
-
43
- export const PrimaryLeadingIcon: Story = {
44
- args: {
45
- ...Primary.args,
46
- icon: {
47
- ...defaultIcon,
48
- icon: "IconCheck",
49
- outline: false
50
- },
51
- iconPosition: "leading"
52
- }
53
- }
54
- export const PrimarySimpleIconName: Story = {
55
- args: {
56
- ...Primary.args,
57
- icon: "IconCheck",
58
- iconPosition: "leading"
59
- }
60
- }
61
- export const PrimaryTrailingIcon: Story = {
62
- args: {
63
- ...PrimaryLeadingIcon.args,
64
- iconPosition: "trailing"
65
- }
66
- }
67
- export const PrimaryExtraSmall: Story = {
68
- args: {
69
- ...Primary.args,
70
- size: "sm"
71
- }
72
- }
73
- export const PrimarySmall: Story = {
74
- args: {
75
- ...Primary.args,
76
- size: "sm"
77
- }
78
- }
79
- export const PrimaryMedium: Story = {
80
- args: {
81
- ...Primary.args,
82
- size: "md"
83
- }
84
- }
85
- export const PrimaryLarge: Story = {
86
- args: {
87
- ...Primary.args,
88
- size: "lg"
89
- }
90
- }
91
- export const PrimaryExtraLarge: Story = {
92
- args: {
93
- ...Primary.args,
94
- size: "xl"
95
- }
96
- }
97
- // #endregion
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import Button from "../Button"
3
+ import { defaultIcon } from "../defaultArgs"
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
+ const meta: Meta<typeof Button> = {
7
+ title: "Design System/atoms/Buttons/Button/Primary",
8
+ component: Button,
9
+ tags: ["autodocs"],
10
+ argTypes: {},
11
+ parameters: {
12
+ design: {
13
+ type: "figma",
14
+ url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=12-149&mode=design&t=9hpwa8YStpwXksff-4"
15
+ }
16
+ }
17
+ }
18
+
19
+ export default meta
20
+ type Story = StoryObj<typeof Button>
21
+ //#region Primary Button Stories
22
+ export const Primary: Story = {
23
+ args: {
24
+ actionType: "primary",
25
+ label: "Button",
26
+ onClick: () => {
27
+ window.alert("Button clicked!")
28
+ }
29
+ }
30
+ }
31
+
32
+ export const PrimaryDisabled: Story = {
33
+ args: {
34
+ actionType: "primary",
35
+ label: "Button",
36
+ disabled: true,
37
+ onClick: () => {
38
+ window.alert("Button clicked!")
39
+ }
40
+ }
41
+ }
42
+
43
+ export const PrimaryLeadingIcon: Story = {
44
+ args: {
45
+ ...Primary.args,
46
+ icon: {
47
+ ...defaultIcon,
48
+ icon: "IconCheck",
49
+ outline: false
50
+ },
51
+ iconPosition: "leading"
52
+ }
53
+ }
54
+ export const PrimarySimpleIconName: Story = {
55
+ args: {
56
+ ...Primary.args,
57
+ icon: "IconCheck",
58
+ iconPosition: "leading"
59
+ }
60
+ }
61
+ export const PrimaryTrailingIcon: Story = {
62
+ args: {
63
+ ...PrimaryLeadingIcon.args,
64
+ iconPosition: "trailing"
65
+ }
66
+ }
67
+ export const PrimaryExtraSmall: Story = {
68
+ args: {
69
+ ...Primary.args,
70
+ size: "sm"
71
+ }
72
+ }
73
+ export const PrimarySmall: Story = {
74
+ args: {
75
+ ...Primary.args,
76
+ size: "sm"
77
+ }
78
+ }
79
+ export const PrimaryMedium: Story = {
80
+ args: {
81
+ ...Primary.args,
82
+ size: "md"
83
+ }
84
+ }
85
+ export const PrimaryLarge: Story = {
86
+ args: {
87
+ ...Primary.args,
88
+ size: "lg"
89
+ }
90
+ }
91
+ export const PrimaryExtraLarge: Story = {
92
+ args: {
93
+ ...Primary.args,
94
+ size: "xl"
95
+ }
96
+ }
97
+ // #endregion
@@ -1,93 +1,93 @@
1
- import type { Meta, StoryObj } from "@storybook/react"
2
- import Button from "../Button"
3
- import { defaultIcon } from "../defaultArgs"
4
-
5
- // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
- const meta: Meta<typeof Button> = {
7
- title: "Design System/atoms/Buttons/Button/Secondary",
8
- component: Button,
9
- tags: ["autodocs"],
10
- argTypes: {},
11
- parameters: {
12
- design: {
13
- type: "figma",
14
- url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=12-213&mode=design&t=9hpwa8YStpwXksff-4"
15
- }
16
- }
17
- }
18
-
19
- export default meta
20
- type Story = StoryObj<typeof Button>
21
- // #region Secondary Button Stories
22
- export const Secondary: Story = {
23
- args: {
24
- actionType: "secondary",
25
- label: "Button",
26
- onClick: () => {
27
- window.alert("Button clicked!")
28
- }
29
- }
30
- }
31
-
32
- export const SecondaryDisabled: Story = {
33
- args: {
34
- actionType: "secondary",
35
- label: "Button",
36
- disabled: true,
37
- onClick: () => {
38
- window.alert("Button clicked!")
39
- }
40
- }
41
- }
42
-
43
- export const SecondaryTrailingIcon: Story = {
44
- args: {
45
- ...Secondary.args,
46
- icon: { ...defaultIcon, icon: "Icon3dCubeSphere" },
47
- iconPosition: "trailing"
48
- }
49
- }
50
- export const SecondaryLeadingIcon: Story = {
51
- args: {
52
- ...SecondaryTrailingIcon.args,
53
- iconPosition: "leading"
54
- }
55
- }
56
- export const SecondarySimpleIconName: Story = {
57
- args: {
58
- ...Secondary.args,
59
- icon: "IconBell",
60
- iconPosition: "leading"
61
- }
62
- }
63
- export const SecondaryExtraSmall: Story = {
64
- args: {
65
- ...Secondary.args,
66
- size: "sm"
67
- }
68
- }
69
- export const SecondarySmall: Story = {
70
- args: {
71
- ...Secondary.args,
72
- size: "sm"
73
- }
74
- }
75
- export const SecondaryMedium: Story = {
76
- args: {
77
- ...Secondary.args,
78
- size: "md"
79
- }
80
- }
81
- export const SecondaryLarge: Story = {
82
- args: {
83
- ...Secondary.args,
84
- size: "lg"
85
- }
86
- }
87
- export const SecondaryExtraLarge: Story = {
88
- args: {
89
- ...Secondary.args,
90
- size: "xl"
91
- }
92
- }
93
- // #endregion
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import Button from "../Button"
3
+ import { defaultIcon } from "../defaultArgs"
4
+
5
+ // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
6
+ const meta: Meta<typeof Button> = {
7
+ title: "Design System/atoms/Buttons/Button/Secondary",
8
+ component: Button,
9
+ tags: ["autodocs"],
10
+ argTypes: {},
11
+ parameters: {
12
+ design: {
13
+ type: "figma",
14
+ url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=12-213&mode=design&t=9hpwa8YStpwXksff-4"
15
+ }
16
+ }
17
+ }
18
+
19
+ export default meta
20
+ type Story = StoryObj<typeof Button>
21
+ // #region Secondary Button Stories
22
+ export const Secondary: Story = {
23
+ args: {
24
+ actionType: "secondary",
25
+ label: "Button",
26
+ onClick: () => {
27
+ window.alert("Button clicked!")
28
+ }
29
+ }
30
+ }
31
+
32
+ export const SecondaryDisabled: Story = {
33
+ args: {
34
+ actionType: "secondary",
35
+ label: "Button",
36
+ disabled: true,
37
+ onClick: () => {
38
+ window.alert("Button clicked!")
39
+ }
40
+ }
41
+ }
42
+
43
+ export const SecondaryTrailingIcon: Story = {
44
+ args: {
45
+ ...Secondary.args,
46
+ icon: { ...defaultIcon, icon: "Icon3dCubeSphere" },
47
+ iconPosition: "trailing"
48
+ }
49
+ }
50
+ export const SecondaryLeadingIcon: Story = {
51
+ args: {
52
+ ...SecondaryTrailingIcon.args,
53
+ iconPosition: "leading"
54
+ }
55
+ }
56
+ export const SecondarySimpleIconName: Story = {
57
+ args: {
58
+ ...Secondary.args,
59
+ icon: "IconBell",
60
+ iconPosition: "leading"
61
+ }
62
+ }
63
+ export const SecondaryExtraSmall: Story = {
64
+ args: {
65
+ ...Secondary.args,
66
+ size: "sm"
67
+ }
68
+ }
69
+ export const SecondarySmall: Story = {
70
+ args: {
71
+ ...Secondary.args,
72
+ size: "sm"
73
+ }
74
+ }
75
+ export const SecondaryMedium: Story = {
76
+ args: {
77
+ ...Secondary.args,
78
+ size: "md"
79
+ }
80
+ }
81
+ export const SecondaryLarge: Story = {
82
+ args: {
83
+ ...Secondary.args,
84
+ size: "lg"
85
+ }
86
+ }
87
+ export const SecondaryExtraLarge: Story = {
88
+ args: {
89
+ ...Secondary.args,
90
+ size: "xl"
91
+ }
92
+ }
93
+ // #endregion
@@ -1,9 +1,9 @@
1
- import { IDynamicIconProps } from "../../icons"
2
-
3
- const defaultIcon: IDynamicIconProps = {
4
- icon: "IconBell",
5
- className: "w-5 h-5",
6
- outline: true
7
- }
8
-
9
- export { defaultIcon }
1
+ import { IDynamicIconProps } from "../../icons"
2
+
3
+ const defaultIcon: IDynamicIconProps = {
4
+ icon: "IconBell",
5
+ className: "w-5 h-5",
6
+ outline: true
7
+ }
8
+
9
+ export { defaultIcon }
@@ -1,3 +1,3 @@
1
- import Button, { IButtonProps, BTNActionType } from "./Button"
2
- export type { IButtonProps, BTNActionType }
3
- export default Button
1
+ import Button, { IButtonProps, BTNActionType } from "./Button"
2
+ export type { IButtonProps, BTNActionType }
3
+ export default Button
@@ -1,27 +1,27 @@
1
- import type { Meta, StoryObj } from "@storybook/react"
2
- import { defaultIcon } from "../../Button/defaultArgs"
3
- import Capsule from "../Capsule"
4
- // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
5
- const meta: Meta<typeof Capsule> = {
6
- title: "Design System/atoms/Buttons/Capsule/Alternative",
7
- component: Capsule,
8
- tags: ["autodocs"],
9
- parameters: {
10
- design: {
11
- type: "figma",
12
- url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
13
- }
14
- }
15
- }
16
-
17
- export default meta
18
- type Story = StoryObj<typeof Capsule>
19
- export const Alternative: Story = {
20
- args: {
21
- label: "Alternative",
22
- onClick: () => {
23
- window.alert("Button clicked!")
24
- },
25
- actionType: "alternative"
26
- }
27
- }
1
+ import type { Meta, StoryObj } from "@storybook/react"
2
+ import { defaultIcon } from "../../Button/defaultArgs"
3
+ import Capsule from "../Capsule"
4
+ // More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
5
+ const meta: Meta<typeof Capsule> = {
6
+ title: "Design System/atoms/Buttons/Capsule/Alternative",
7
+ component: Capsule,
8
+ tags: ["autodocs"],
9
+ parameters: {
10
+ design: {
11
+ type: "figma",
12
+ url: "https://www.figma.com/file/Rb5fJ8hD3pwvLnidgCaGgB/Agility-UI?type=design&node-id=243-12178&mode=design&t=9hpwa8YStpwXksff-4"
13
+ }
14
+ }
15
+ }
16
+
17
+ export default meta
18
+ type Story = StoryObj<typeof Capsule>
19
+ export const Alternative: Story = {
20
+ args: {
21
+ label: "Alternative",
22
+ onClick: () => {
23
+ window.alert("Button clicked!")
24
+ },
25
+ actionType: "alternative"
26
+ }
27
+ }