@appdirect/design-system 0.0.10 → 0.0.12

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 (179) hide show
  1. package/README.md +85 -5
  2. package/dist/Buttons/ActionIcon.js +14 -0
  3. package/dist/Buttons/Button.js +66 -0
  4. package/dist/Buttons/CloseButton.js +48 -0
  5. package/dist/Buttons/index.js +13 -0
  6. package/dist/Combobox/AutocompleteClearable.js +36 -0
  7. package/dist/Combobox/Combobox.js +28 -0
  8. package/dist/Combobox/Multiselect.js +31 -0
  9. package/dist/Combobox/SearchableSelect.js +43 -0
  10. package/dist/Combobox/Select.js +72 -0
  11. package/dist/Combobox/index.js +10 -0
  12. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.js +96 -0
  13. package/dist/ComplexComponents/DashboardWidget/index.js +1 -0
  14. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/index.js +82 -0
  15. package/dist/ComplexComponents/DataTable/CustomBottomToolbar/utils.js +23 -0
  16. package/dist/ComplexComponents/DataTable/CustomToolbarAlertBannerContent/index.js +23 -0
  17. package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.js +230 -0
  18. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterChip.js +30 -0
  19. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/DateRangeFilter.js +12 -0
  20. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterRenderer.js +32 -0
  21. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/FilterSystem.js +90 -0
  22. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/MultiSelectFilter.js +43 -0
  23. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/SingleSelectFilter.js +30 -0
  24. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/index.js +39 -0
  25. package/dist/ComplexComponents/DataTable/CustomTopToolbar/FilterSystem/types.js +9 -0
  26. package/dist/ComplexComponents/DataTable/CustomTopToolbar/ResultCount/index.js +31 -0
  27. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SearchFilter.js +42 -0
  28. package/dist/ComplexComponents/DataTable/CustomTopToolbar/SelectFilter.js +21 -0
  29. package/dist/ComplexComponents/DataTable/CustomTopToolbar/index.js +410 -0
  30. package/dist/ComplexComponents/DataTable/DataTable.js +405 -0
  31. package/dist/ComplexComponents/DataTable/ErrorOverlay/index.js +9 -0
  32. package/dist/ComplexComponents/DataTable/SortableHeaderCell/index.js +27 -0
  33. package/dist/ComplexComponents/DataTable/index.js +1 -0
  34. package/dist/ComplexComponents/DataTable/translations/en.js +99 -0
  35. package/dist/ComplexComponents/DataTable/translations/index.js +17 -0
  36. package/dist/ComplexComponents/KeyInsight/KeyInsights.js +176 -0
  37. package/dist/ComplexComponents/KeyInsight/index.js +1 -0
  38. package/dist/ComplexComponents/NameValue/NameValue.js +94 -0
  39. package/dist/ComplexComponents/NameValue/NameValueItem.js +59 -0
  40. package/dist/ComplexComponents/NameValue/index.js +2 -0
  41. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.js +92 -0
  42. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +24 -34
  43. package/dist/ComplexComponents/PageContentHeader/index.js +1 -0
  44. package/dist/ComplexComponents/PageContentHeader/index.ts +0 -2
  45. package/dist/ComplexComponents/Placeholder/Placeholder.js +51 -0
  46. package/dist/ComplexComponents/Placeholder/index.js +1 -0
  47. package/dist/ComplexComponents/Slat/Slat.js +53 -0
  48. package/dist/ComplexComponents/Slat/index.js +1 -0
  49. package/dist/ComplexComponents/Utilities/CopyButton.js +45 -0
  50. package/dist/ComplexComponents/Utilities/index.js +1 -0
  51. package/dist/DataDisplay/Alert.js +77 -0
  52. package/dist/DataDisplay/Avatar.js +157 -0
  53. package/dist/DataDisplay/Badge.js +78 -0
  54. package/dist/DataDisplay/Card.js +100 -0
  55. package/dist/DataDisplay/Chip.js +36 -0
  56. package/dist/DataDisplay/Indicator.js +59 -0
  57. package/dist/DataDisplay/List.js +60 -0
  58. package/dist/DataDisplay/Pill.js +81 -0
  59. package/dist/DataDisplay/Progress.js +42 -0
  60. package/dist/DataDisplay/Table.js +38 -0
  61. package/dist/DataDisplay/ThemeIcon.js +31 -0
  62. package/dist/DataDisplay/index.js +18 -0
  63. package/dist/Inputs/Checkbox.js +62 -0
  64. package/dist/Inputs/ColorInput.js +48 -0
  65. package/dist/Inputs/DropZone.js +12 -0
  66. package/dist/Inputs/FileInput.js +77 -0
  67. package/dist/Inputs/NumberInput.js +49 -0
  68. package/dist/Inputs/Radio.js +55 -0
  69. package/dist/Inputs/RadioGroup.js +59 -0
  70. package/dist/Inputs/SegmentedControl.js +50 -0
  71. package/dist/Inputs/Slider.js +50 -0
  72. package/dist/Inputs/SliderWithLabel.js +32 -0
  73. package/dist/Inputs/Switch.js +47 -0
  74. package/dist/Inputs/TextArea.js +50 -0
  75. package/dist/Inputs/TextInput.js +87 -0
  76. package/dist/Inputs/index.js +27 -0
  77. package/dist/Layout/Box.js +39 -0
  78. package/dist/Layout/Center.js +11 -0
  79. package/dist/Layout/Container.js +11 -0
  80. package/dist/Layout/Flex.js +12 -0
  81. package/dist/Layout/Grid.js +13 -0
  82. package/dist/Layout/Group.js +14 -0
  83. package/dist/Layout/Inline.js +46 -0
  84. package/dist/Layout/SimpleGrid.js +14 -0
  85. package/dist/Layout/Stack.js +45 -0
  86. package/dist/Layout/index.js +10 -0
  87. package/dist/Misc/Divider.js +8 -0
  88. package/dist/Misc/Paper.js +24 -0
  89. package/dist/Misc/index.js +10 -0
  90. package/dist/Navigation/Breadcrumb.js +60 -0
  91. package/dist/Navigation/NavLink.js +28 -0
  92. package/dist/Navigation/Stepper.js +8 -0
  93. package/dist/Navigation/Tabs.js +22 -0
  94. package/dist/Navigation/index.js +9 -0
  95. package/dist/Overlays/Drawer.js +63 -0
  96. package/dist/Overlays/Menu.js +85 -0
  97. package/dist/Overlays/Modal.js +61 -0
  98. package/dist/Overlays/Popover.js +118 -0
  99. package/dist/Overlays/Tooltip.js +71 -0
  100. package/dist/Overlays/index.js +12 -0
  101. package/dist/Shell/AppShellLayout.js +13 -0
  102. package/dist/Shell/HeaderBar.js +8 -0
  103. package/dist/Shell/SidebarNav.js +9 -0
  104. package/dist/Shell/SidebarNavLink.js +17 -0
  105. package/dist/Shell/SingleColumnLayout.js +11 -0
  106. package/dist/Shell/TertiaryColumnLayout.js +12 -0
  107. package/dist/Shell/index.js +6 -0
  108. package/dist/Typography/Code.js +8 -0
  109. package/dist/Typography/Kbd.js +58 -0
  110. package/dist/Typography/Text.js +8 -0
  111. package/dist/Typography/Title.js +11 -0
  112. package/dist/Typography/index.js +12 -0
  113. package/dist/config.js +202 -0
  114. package/dist/contracts/PageContentHeader.json +10 -5
  115. package/dist/contracts/index.json +1 -1
  116. package/dist/hooks/useTableHandlers.js +136 -0
  117. package/dist/hooks/useTableRenderFunctions.js +164 -0
  118. package/dist/hooks/useTableState.js +70 -0
  119. package/dist/index.js +162 -0
  120. package/dist/index.ts +3 -4
  121. package/dist/stories/Buttons/ActionIcon.stories.tsx +159 -0
  122. package/dist/stories/Buttons/Button.stories.tsx +145 -0
  123. package/dist/stories/Buttons/CloseButton.stories.tsx +121 -0
  124. package/dist/stories/Combobox/AutocompleteClearable.stories.tsx +554 -0
  125. package/dist/stories/Combobox/Combobox.stories.tsx +106 -0
  126. package/dist/stories/Combobox/Multiselect.stories.tsx +664 -0
  127. package/dist/stories/Combobox/SearchableSelect.stories.tsx +640 -0
  128. package/dist/stories/Combobox/Select.stories.tsx +311 -0
  129. package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +822 -0
  130. package/dist/stories/ComplexComponents/DataTable/DataTable.stories.tsx +502 -0
  131. package/dist/stories/ComplexComponents/KeyInsight/KeyInsights.stories.tsx +386 -0
  132. package/dist/stories/ComplexComponents/NameValue/NameValue.stories.tsx +405 -0
  133. package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +527 -0
  134. package/dist/stories/ComplexComponents/Placeholder/Placeholder.stories.tsx +76 -0
  135. package/dist/stories/ComplexComponents/Slat/Slat.stories.tsx +79 -0
  136. package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +479 -0
  137. package/dist/stories/DataDisplay/Alert.stories.tsx +296 -0
  138. package/dist/stories/DataDisplay/Avatar.stories.tsx +251 -0
  139. package/dist/stories/DataDisplay/Badge.stories.tsx +176 -0
  140. package/dist/stories/DataDisplay/Card.stories.tsx +406 -0
  141. package/dist/stories/DataDisplay/Chip.stories.tsx +495 -0
  142. package/dist/stories/DataDisplay/Indicator.stories.tsx +571 -0
  143. package/dist/stories/DataDisplay/List.stories.tsx +376 -0
  144. package/dist/stories/DataDisplay/Pill.stories.tsx +506 -0
  145. package/dist/stories/DataDisplay/Progress.stories.tsx +352 -0
  146. package/dist/stories/DataDisplay/Table.stories.tsx +346 -0
  147. package/dist/stories/DataDisplay/ThemeIcon.stories.tsx +125 -0
  148. package/dist/stories/Inputs/Checkbox.stories.tsx +263 -0
  149. package/dist/stories/Inputs/ColorInput.stories.tsx +434 -0
  150. package/dist/stories/Inputs/DropZone.stories.tsx +401 -0
  151. package/dist/stories/Inputs/FileInput.stories.tsx +383 -0
  152. package/dist/stories/Inputs/NumberInput.stories.tsx +342 -0
  153. package/dist/stories/Inputs/Radio.stories.tsx +437 -0
  154. package/dist/stories/Inputs/RadioGroup.stories.tsx +526 -0
  155. package/dist/stories/Inputs/SegmentedControl.stories.tsx +60 -0
  156. package/dist/stories/Inputs/Slider.stories.tsx +22 -0
  157. package/dist/stories/Inputs/SliderWithLabel.stories.tsx +37 -0
  158. package/dist/stories/Inputs/Switch.stories.tsx +361 -0
  159. package/dist/stories/Inputs/TextArea.stories.tsx +355 -0
  160. package/dist/stories/Inputs/TextInput.stories.tsx +266 -0
  161. package/dist/stories/Misc/Divider.stories.tsx +581 -0
  162. package/dist/stories/Misc/Paper.stories.tsx +557 -0
  163. package/dist/stories/Navigation/Breadcrumb.stories.tsx +489 -0
  164. package/dist/stories/Navigation/NavLink.stories.tsx +601 -0
  165. package/dist/stories/Navigation/Stepper.stories.tsx +413 -0
  166. package/dist/stories/Navigation/Tabs.stories.tsx +528 -0
  167. package/dist/stories/Overlays/Drawer.stories.tsx +802 -0
  168. package/dist/stories/Overlays/Menu.stories.tsx +941 -0
  169. package/dist/stories/Overlays/Modal.stories.tsx +249 -0
  170. package/dist/stories/Overlays/Popover.stories.tsx +780 -0
  171. package/dist/stories/Overlays/Tooltip.stories.tsx +52 -0
  172. package/dist/stories/Typography/Code.stories.tsx +368 -0
  173. package/dist/stories/Typography/Kbd.stories.tsx +514 -0
  174. package/dist/stories/Typography/Text.stories.tsx +117 -0
  175. package/dist/stories/Typography/Title.stories.tsx +112 -0
  176. package/dist/stories/index.json +1435 -0
  177. package/dist/types.js +127 -0
  178. package/package.json +12 -7
  179. package/dist/ComplexComponents/PageContentHeader/DescriptionBlock.tsx +0 -65
package/dist/index.js ADDED
@@ -0,0 +1,162 @@
1
+ /**
2
+ * AppDirect Design System Components
3
+ *
4
+ * This module exports all AppDirect design system components built on top of Mantine.
5
+ * Components are organized by category and provide consistent styling,
6
+ * behavior, and API across the application.
7
+ *
8
+ * @example
9
+ * // Import specific components
10
+ * import { Button, TextInput, Badge } from '.';
11
+ *
12
+ * @example
13
+ * // Import by category
14
+ * import { Inputs, Buttons, DataDisplay } from '.';
15
+ */
16
+ // Import components for category exports
17
+ import { TextInput, TextArea, NumberInput, ColorInput, Slider, SliderWithLabel, Switch, SegmentedControl, Checkbox, Radio, RadioGroup, DropZone, FileInput } from './Inputs/index.js';
18
+ import { Button, ActionIcon, CloseButton } from './Buttons/index.js';
19
+ import { Alert, Avatar, Badge, Card, CardSection, Chip, Pill, Indicator, Progress, ThemeIcon, List, Table } from './DataDisplay/index.js';
20
+ import { SearchableSelect, AutocompleteClearable, Multiselect, Select, Combobox } from './Combobox/index.js';
21
+ import { Breadcrumb, BackBreadcrumb, NavLink, Stepper, Tabs } from './Navigation/index.js';
22
+ import { Drawer, Menu, Modal, ConfirmationModal, Popover, ConfirmationPopover, Tooltip } from './Overlays/index.js';
23
+ import { Kbd, Code, Text, Title } from './Typography/index.js';
24
+ import { Divider, Paper } from './Misc/index.js';
25
+ import { Stack, Group, Inline, Box, SimpleGrid, Grid, Flex, Container, Center } from './Layout/index.js';
26
+ import { AppShellLayout, HeaderBar, SidebarNav, SidebarNavLink, SingleColumnLayout, TertiaryColumnLayout } from './Shell/index.js';
27
+ import { KeyInsight } from './ComplexComponents/KeyInsight/index.js';
28
+ import { NameValue, NameValueItem } from './ComplexComponents/NameValue/index.js';
29
+ import { CopyButton } from './ComplexComponents/Utilities/index.js';
30
+ import { PageContentHeader } from './ComplexComponents/PageContentHeader/index.js';
31
+ import { DataTable } from './ComplexComponents/DataTable/index.js';
32
+ import { DashboardWidget } from './ComplexComponents/DashboardWidget/index.js';
33
+ import { Placeholder } from './ComplexComponents/Placeholder/index.js';
34
+ import { Slat } from './ComplexComponents/Slat/index.js';
35
+ // ========================== INPUTS ==========================
36
+ export { TextInput, TextArea, NumberInput, ColorInput, Slider, SliderWithLabel, Switch, SegmentedControl, Checkbox, Radio, RadioGroup, DropZone, FileInput } from './Inputs/index.js';
37
+ // ========================== BUTTONS ==========================
38
+ export { Button, ActionIcon, CloseButton } from './Buttons/index.js';
39
+ // ========================== COMBOBOX ==========================
40
+ export { SearchableSelect, AutocompleteClearable, Multiselect, Select, Combobox } from './Combobox/index.js';
41
+ // ========================== NAVIGATION ==========================
42
+ export { Breadcrumb, BackBreadcrumb, NavLink, Stepper, Tabs } from './Navigation/index.js';
43
+ // ========================== OVERLAYS ==========================
44
+ export { Drawer, Menu, Modal, ConfirmationModal, Popover, ConfirmationPopover, Tooltip } from './Overlays/index.js';
45
+ // ========================== DATA DISPLAY ==========================
46
+ export { Alert, Avatar, Badge, Card, CardSection, Chip, Pill, Indicator, Progress, ThemeIcon, List, Table } from './DataDisplay/index.js';
47
+ // ========================== TYPOGRAPHY ==========================
48
+ export { Kbd, Code, Text, Title } from './Typography/index.js';
49
+ // ========================== MISC ==========================
50
+ export { Divider, Paper } from './Misc/index.js';
51
+ // ========================== LAYOUT ==========================
52
+ export { Stack, Group, Inline, Box, SimpleGrid, Grid, Flex, Container, Center } from './Layout/index.js';
53
+ // ========================== SHELL ==========================
54
+ export { AppShellLayout, HeaderBar, SidebarNav, SidebarNavLink, SingleColumnLayout, TertiaryColumnLayout } from './Shell/index.js';
55
+ // ========================== COMPLEX COMPONENTS ==========================
56
+ export { KeyInsight } from './ComplexComponents/KeyInsight/index.js';
57
+ export { NameValue, NameValueItem } from './ComplexComponents/NameValue/index.js';
58
+ export { CopyButton } from './ComplexComponents/Utilities/index.js';
59
+ export { PageContentHeader } from './ComplexComponents/PageContentHeader/index.js';
60
+ export { DataTable } from './ComplexComponents/DataTable/index.js';
61
+ export { DashboardWidget } from './ComplexComponents/DashboardWidget/index.js';
62
+ export { Placeholder } from './ComplexComponents/Placeholder/index.js';
63
+ export { Slat } from './ComplexComponents/Slat/index.js';
64
+ // ========================== CATEGORY EXPORTS ==========================
65
+ // Export components grouped by category for convenient importing
66
+ export const Inputs = {
67
+ TextInput,
68
+ TextArea,
69
+ NumberInput,
70
+ ColorInput,
71
+ Slider,
72
+ SliderWithLabel,
73
+ Switch,
74
+ SegmentedControl,
75
+ Checkbox,
76
+ Radio,
77
+ RadioGroup,
78
+ DropZone,
79
+ FileInput,
80
+ };
81
+ export const Buttons = {
82
+ Button,
83
+ ActionIcon,
84
+ CloseButton,
85
+ };
86
+ export const ComboboxComponents = {
87
+ SearchableSelect,
88
+ AutocompleteClearable,
89
+ Multiselect,
90
+ Select,
91
+ Combobox,
92
+ };
93
+ export const Navigation = {
94
+ Breadcrumb,
95
+ BackBreadcrumb,
96
+ NavLink,
97
+ Stepper,
98
+ Tabs,
99
+ };
100
+ export const Overlays = {
101
+ Drawer,
102
+ Menu,
103
+ Modal,
104
+ ConfirmationModal,
105
+ Popover,
106
+ ConfirmationPopover,
107
+ Tooltip,
108
+ };
109
+ export const DataDisplay = {
110
+ Alert,
111
+ Avatar,
112
+ Badge,
113
+ Card,
114
+ CardSection,
115
+ Chip,
116
+ Pill,
117
+ Indicator,
118
+ Progress,
119
+ ThemeIcon,
120
+ List,
121
+ Table,
122
+ };
123
+ export const Typography = {
124
+ Kbd,
125
+ Code,
126
+ Text,
127
+ Title,
128
+ };
129
+ export const Misc = {
130
+ Divider,
131
+ Paper,
132
+ };
133
+ export const Layout = {
134
+ Stack,
135
+ Group,
136
+ Inline,
137
+ Box,
138
+ SimpleGrid,
139
+ Grid,
140
+ Flex,
141
+ Container,
142
+ Center,
143
+ };
144
+ export const Shell = {
145
+ AppShellLayout,
146
+ HeaderBar,
147
+ SidebarNav,
148
+ SidebarNavLink,
149
+ SingleColumnLayout,
150
+ TertiaryColumnLayout,
151
+ };
152
+ export const ComplexComponents = {
153
+ KeyInsight,
154
+ NameValue,
155
+ NameValueItem,
156
+ CopyButton,
157
+ PageContentHeader,
158
+ DataTable,
159
+ DashboardWidget,
160
+ Placeholder,
161
+ Slat,
162
+ };
package/dist/index.ts CHANGED
@@ -28,7 +28,7 @@ import { AppShellLayout, HeaderBar, SidebarNav, SidebarNavLink, SingleColumnLayo
28
28
  import { KeyInsight } from './ComplexComponents/KeyInsight';
29
29
  import { NameValue, NameValueItem } from './ComplexComponents/NameValue';
30
30
  import { CopyButton } from './ComplexComponents/Utilities';
31
- import { PageContentHeader, DescriptionBlock } from './ComplexComponents/PageContentHeader';
31
+ import { PageContentHeader } from './ComplexComponents/PageContentHeader';
32
32
  import { DataTable } from './ComplexComponents/DataTable';
33
33
  import { DashboardWidget } from './ComplexComponents/DashboardWidget';
34
34
  import { Placeholder } from './ComplexComponents/Placeholder';
@@ -93,8 +93,8 @@ export { NameValue, NameValueItem } from './ComplexComponents/NameValue';
93
93
  export type { NameValueProps, NameValuePair, NameValueItemProps } from './ComplexComponents/NameValue';
94
94
  export { CopyButton } from './ComplexComponents/Utilities';
95
95
  export type { CopyButtonProps } from './ComplexComponents/Utilities';
96
- export { PageContentHeader, DescriptionBlock } from './ComplexComponents/PageContentHeader';
97
- export type { PageContentHeaderProps, ContentSection, DescriptionBlockProps } from './ComplexComponents/PageContentHeader';
96
+ export { PageContentHeader } from './ComplexComponents/PageContentHeader';
97
+ export type { PageContentHeaderProps, ContentSection } from './ComplexComponents/PageContentHeader';
98
98
  export { DataTable } from './ComplexComponents/DataTable';
99
99
  export type { DataTableProps, DataTableColumn, PageInfo } from './ComplexComponents/DataTable';
100
100
  export { DashboardWidget } from './ComplexComponents/DashboardWidget';
@@ -208,7 +208,6 @@ export const ComplexComponents = {
208
208
  NameValueItem,
209
209
  CopyButton,
210
210
  PageContentHeader,
211
- DescriptionBlock,
212
211
  DataTable,
213
212
  DashboardWidget,
214
213
  Placeholder,
@@ -0,0 +1,159 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { ActionIcon } from '@appdirect/design-system';
3
+ import { RiAddLine, RiEditLine, RiDeleteBinLine, RiEyeLine, RiDownloadLine, RiSettingsLine, RiMore2Fill } from '@remixicon/react';
4
+
5
+ const meta: Meta<typeof ActionIcon> = {
6
+ title: 'Design System/Buttons/ActionIcon',
7
+ component: ActionIcon,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: 'ActionIcon component for icon-based actions with consistent sizing and subtle styling.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs', 'code-connected'],
17
+ argTypes: {
18
+ variant: {
19
+ control: 'select',
20
+ options: ['default', 'outline', 'link'],
21
+ description: 'Visual style variant',
22
+ },
23
+ size: {
24
+ control: 'select',
25
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
26
+ description: 'Size of the action button',
27
+ },
28
+ disabled: {
29
+ control: 'boolean',
30
+ description: 'Disabled state',
31
+ },
32
+ children: {
33
+ control: false,
34
+ description: 'Icon content (React element)',
35
+ },
36
+ },
37
+ };
38
+
39
+ export default meta;
40
+ type Story = StoryObj<typeof meta>;
41
+
42
+ export const Default: Story = {
43
+ args: {
44
+ children: <RiEditLine size={16} />,
45
+ },
46
+ };
47
+
48
+ export const Variants: Story = {
49
+ render: () => (
50
+ <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
51
+ <div style={{ textAlign: 'center' }}>
52
+ <ActionIcon variant="default"><RiEditLine size={16} /></ActionIcon>
53
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Default</div>
54
+ </div>
55
+ <div style={{ textAlign: 'center' }}>
56
+ <ActionIcon variant="outline"><RiEditLine size={16} /></ActionIcon>
57
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Outline</div>
58
+ </div>
59
+ <div style={{ textAlign: 'center' }}>
60
+ <ActionIcon variant="link"><RiEditLine size={16} /></ActionIcon>
61
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Link</div>
62
+ </div>
63
+ </div>
64
+ ),
65
+ };
66
+
67
+ export const Sizes: Story = {
68
+ render: () => (
69
+ <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
70
+ <div style={{ textAlign: 'center' }}>
71
+ <ActionIcon size="xs"><RiEditLine size={12} /></ActionIcon>
72
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>xs</div>
73
+ </div>
74
+ <div style={{ textAlign: 'center' }}>
75
+ <ActionIcon size="sm"><RiEditLine size={14} /></ActionIcon>
76
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>sm</div>
77
+ </div>
78
+ <div style={{ textAlign: 'center' }}>
79
+ <ActionIcon size="md"><RiEditLine size={16} /></ActionIcon>
80
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>md</div>
81
+ </div>
82
+ <div style={{ textAlign: 'center' }}>
83
+ <ActionIcon size="lg"><RiEditLine size={18} /></ActionIcon>
84
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>lg</div>
85
+ </div>
86
+ <div style={{ textAlign: 'center' }}>
87
+ <ActionIcon size="xl"><RiEditLine size={20} /></ActionIcon>
88
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>xl</div>
89
+ </div>
90
+ </div>
91
+ ),
92
+ };
93
+
94
+ export const CommonActions: Story = {
95
+ render: () => (
96
+ <div style={{ display: 'flex', gap: '8px', alignItems: 'center' }}>
97
+ <ActionIcon><RiAddLine size={16} /></ActionIcon>
98
+ <ActionIcon><RiEditLine size={16} /></ActionIcon>
99
+ <ActionIcon><RiDeleteBinLine size={16} /></ActionIcon>
100
+ <ActionIcon><RiEyeLine size={16} /></ActionIcon>
101
+ <ActionIcon><RiDownloadLine size={16} /></ActionIcon>
102
+ <ActionIcon><RiSettingsLine size={16} /></ActionIcon>
103
+ </div>
104
+ ),
105
+ };
106
+
107
+ export const States: Story = {
108
+ render: () => (
109
+ <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
110
+ <div style={{ textAlign: 'center' }}>
111
+ <ActionIcon><RiEditLine size={16} /></ActionIcon>
112
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Normal</div>
113
+ </div>
114
+ <div style={{ textAlign: 'center' }}>
115
+ <ActionIcon disabled><RiEditLine size={16} /></ActionIcon>
116
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Disabled</div>
117
+ </div>
118
+ </div>
119
+ ),
120
+ };
121
+
122
+ export const CustomStyling: Story = {
123
+ render: () => (
124
+ <div style={{ display: 'flex', gap: '12px', alignItems: 'center' }}>
125
+ <div style={{ textAlign: 'center' }}>
126
+ <ActionIcon>
127
+ <RiAddLine size={16} style={{ color: 'var(--mantine-color-blue-6)' }} />
128
+ </ActionIcon>
129
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Blue Theme</div>
130
+ </div>
131
+ <div style={{ textAlign: 'center' }}>
132
+ <ActionIcon>
133
+ <RiDeleteBinLine size={16} style={{ color: 'var(--mantine-color-red-6)' }} />
134
+ </ActionIcon>
135
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Red Theme</div>
136
+ </div>
137
+ <div style={{ textAlign: 'center' }}>
138
+ <ActionIcon size="xl" style={{ width: 48, height: 48 }}>
139
+ <RiMore2Fill size={24} />
140
+ </ActionIcon>
141
+ <div style={{ fontSize: '12px', marginTop: '4px' }}>Custom Size</div>
142
+ </div>
143
+ </div>
144
+ ),
145
+ };
146
+
147
+ export const Interactive: Story = {
148
+ args: {
149
+ children: <RiEditLine size={16} />,
150
+ size: 'md',
151
+ },
152
+ parameters: {
153
+ docs: {
154
+ description: {
155
+ story: 'Use the controls below to interact with the ActionIcon and see different combinations.',
156
+ },
157
+ },
158
+ },
159
+ };
@@ -0,0 +1,145 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Button, Inline } from '@appdirect/design-system';
3
+ import { Stack } from '@mantine/core';
4
+ import { RiAddLine, RiDownloadLine, RiDeleteBinLine, RiEyeLine } from '@remixicon/react';
5
+
6
+ const meta: Meta<typeof Button> = {
7
+ title: 'Design System/Buttons/Button',
8
+ component: Button,
9
+ parameters: {
10
+ layout: 'centered',
11
+ docs: {
12
+ description: {
13
+ component: 'Enhanced Button component with design system variants, t-shirt sizing, and consistent styling.',
14
+ },
15
+ },
16
+ },
17
+ tags: ['autodocs', 'code-connected'],
18
+ argTypes: {
19
+ variant: {
20
+ control: 'select',
21
+ options: ['primary', 'secondary', 'default', 'disabled', 'link', 'secret', 'outline', 'danger'],
22
+ description: 'Button style variant',
23
+ },
24
+ size: {
25
+ control: 'select',
26
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
27
+ description: 'Button size',
28
+ },
29
+ color: {
30
+ control: 'select',
31
+ options: ['primary', 'secondary', 'success', 'warning', 'danger'],
32
+ description: 'Button color theme',
33
+ },
34
+ children: {
35
+ control: 'text',
36
+ description: 'Button content',
37
+ },
38
+ loading: {
39
+ control: 'boolean',
40
+ description: 'Loading state with spinner',
41
+ },
42
+ disabled: {
43
+ control: 'boolean',
44
+ description: 'Disabled state',
45
+ },
46
+ fullWidth: {
47
+ control: 'boolean',
48
+ description: 'Full width button',
49
+ },
50
+ },
51
+ };
52
+
53
+ export default meta;
54
+ type Story = StoryObj<typeof meta>;
55
+
56
+ export const Default: Story = {
57
+ args: {
58
+ children: 'Button',
59
+ },
60
+ };
61
+
62
+ export const Variants: Story = {
63
+ render: () => (
64
+ <Stack gap="md">
65
+ <Button variant="primary">Primary</Button>
66
+ <Button variant="secondary">Secondary</Button>
67
+ <Button variant="default">Default</Button>
68
+ <Button variant="outline">Outline</Button>
69
+ <Button variant="danger">Danger</Button>
70
+ <Button variant="link">Link</Button>
71
+ <Button variant="secret">Secret</Button>
72
+ <Button variant="disabled">Disabled</Button>
73
+ </Stack>
74
+ ),
75
+ };
76
+
77
+ export const Sizes: Story = {
78
+ render: () => (
79
+ <Stack gap="md">
80
+ <Button size="xs">Extra Small</Button>
81
+ <Button size="sm">Small</Button>
82
+ <Button size="md">Medium</Button>
83
+ <Button size="lg">Large</Button>
84
+ <Button size="xl">Extra Large</Button>
85
+ </Stack>
86
+ ),
87
+ };
88
+
89
+ export const WithIcons: Story = {
90
+ render: () => (
91
+ <Stack gap="md">
92
+ <Button leftSection={<RiAddLine size={16} />}>Add Item</Button>
93
+ <Button rightSection={<RiDownloadLine size={16} />}>Download</Button>
94
+ <Button variant="danger" leftSection={<RiDeleteBinLine size={16} />}>Delete</Button>
95
+ <Button variant="outline" leftSection={<RiEyeLine size={16} />} rightSection={<RiDownloadLine size={16} />}>
96
+ View & Download
97
+ </Button>
98
+ </Stack>
99
+ ),
100
+ };
101
+
102
+ export const States: Story = {
103
+ render: () => (
104
+ <Stack gap="md">
105
+ <Button>Normal</Button>
106
+ <Button loading>Loading</Button>
107
+ <Button disabled>Disabled</Button>
108
+ <Button variant="primary" loading>
109
+ Processing
110
+ </Button>
111
+ </Stack>
112
+ ),
113
+ };
114
+
115
+ export const FullWidth: Story = {
116
+ render: () => (
117
+ <Stack gap="md" w="600px">
118
+ <Button fullWidth variant="secondary">
119
+ Full Width Button
120
+ </Button>
121
+ </Stack>
122
+ ),
123
+ parameters: {
124
+ docs: {
125
+ description: {
126
+ story: 'Button can take the full width of its container.',
127
+ },
128
+ },
129
+ },
130
+ };
131
+
132
+ export const Interactive: Story = {
133
+ args: {
134
+ children: 'Click me',
135
+ variant: 'primary',
136
+ size: 'md',
137
+ },
138
+ parameters: {
139
+ docs: {
140
+ description: {
141
+ story: 'Use the controls below to interact with the button and see different combinations.',
142
+ },
143
+ },
144
+ },
145
+ };
@@ -0,0 +1,121 @@
1
+ import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
+ import { Stack } from '@mantine/core';
3
+ import { Inline, CloseButton, Title, Text, Alert, Paper } from '@appdirect/design-system';
4
+
5
+ const meta: Meta<typeof CloseButton> = {
6
+ title: 'Design System/Buttons/CloseButton',
7
+ component: CloseButton,
8
+ parameters: {
9
+ layout: 'centered',
10
+ docs: {
11
+ description: {
12
+ component: 'CloseButton component for dismissing modals, alerts, and other UI elements with consistent sizing.',
13
+ },
14
+ },
15
+ },
16
+ tags: ['autodocs', 'code-connected'],
17
+ argTypes: {
18
+ size: {
19
+ control: 'select',
20
+ options: ['xs', 'sm', 'md', 'lg', 'xl'],
21
+ description: 'Size of the close button',
22
+ },
23
+ color: {
24
+ control: 'select',
25
+ options: ['black', 'blue'],
26
+ description: 'Color variant of the close button',
27
+ },
28
+ disabled: {
29
+ control: 'boolean',
30
+ description: 'Disabled state',
31
+ },
32
+ },
33
+ };
34
+
35
+ export default meta;
36
+ type Story = StoryObj<typeof meta>;
37
+
38
+ export const Default: Story = {
39
+ args: {},
40
+ };
41
+
42
+ export const Sizes: Story = {
43
+ render: () => (
44
+ <Inline gap="sm" align="center">
45
+ <CloseButton size="xs" />
46
+ <CloseButton size="sm" />
47
+ <CloseButton size="md" />
48
+ <CloseButton size="lg" />
49
+ <CloseButton size="xl" />
50
+ </Inline>
51
+ ),
52
+ };
53
+
54
+ export const Colors: Story = {
55
+ render: () => (
56
+ <Inline gap="md" align="center">
57
+ <CloseButton color="black" />
58
+ <CloseButton color="blue" />
59
+ </Inline>
60
+ ),
61
+ };
62
+
63
+ export const States: Story = {
64
+ render: () => (
65
+ <Inline gap="md" align="center">
66
+ <Paper variant="border" style={{ textAlign: 'center' }}>
67
+ <CloseButton />
68
+ <Text size="xs" mt={4}>Normal</Text>
69
+ </Paper>
70
+ <Paper variant="border" style={{ textAlign: 'center' }}>
71
+ <CloseButton disabled />
72
+ <Text size="xs" mt={4}>Disabled</Text>
73
+ </Paper>
74
+ </Inline>
75
+ ),
76
+ };
77
+
78
+ export const UsageExamples: Story = {
79
+ render: () => (
80
+ <Stack gap="md">
81
+ {/* Modal Header Example */}
82
+ <Paper variant="border-shadow">
83
+ <Inline justify="space-between" align="center">
84
+ <Title order={4}>Slat title</Title>
85
+ <CloseButton size="md" />
86
+ </Inline>
87
+ </Paper>
88
+
89
+ {/* Alert Example */}
90
+ <Alert
91
+ type="info"
92
+ title="Info"
93
+ withCloseButton
94
+ onClose={() => {}}
95
+ >
96
+ This is an informational alert message.
97
+ </Alert>
98
+ </Stack>
99
+ ),
100
+ parameters: {
101
+ docs: {
102
+ description: {
103
+ story: 'Common usage patterns for CloseButton in different UI contexts.',
104
+ },
105
+ },
106
+ },
107
+ };
108
+
109
+ export const Interactive: Story = {
110
+ args: {
111
+ size: 'md',
112
+ color: 'black',
113
+ },
114
+ parameters: {
115
+ docs: {
116
+ description: {
117
+ story: 'Use the controls below to interact with the CloseButton and see different combinations.',
118
+ },
119
+ },
120
+ },
121
+ };