@appdirect/design-system 0.0.24 → 0.0.28

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 (46) hide show
  1. package/README.md +11 -0
  2. package/dist/Combobox/AutocompleteClearable.js +33 -35
  3. package/dist/Combobox/AutocompleteClearable.tsx +56 -121
  4. package/dist/Combobox/SearchableSelect.js +23 -42
  5. package/dist/Combobox/SearchableSelect.tsx +33 -129
  6. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.js +1 -1
  7. package/dist/ComplexComponents/DashboardWidget/DashboardWidget.tsx +9 -7
  8. package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.js +1 -1
  9. package/dist/ComplexComponents/DataTable/CustomTopToolbar/DateRangeSelectorFilter/index.tsx +1 -1
  10. package/dist/ComplexComponents/KeyInsight/KeyInsights.js +6 -1
  11. package/dist/ComplexComponents/KeyInsight/KeyInsights.tsx +12 -2
  12. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.js +1 -1
  13. package/dist/ComplexComponents/PageContentHeader/PageContentHeader.tsx +16 -11
  14. package/dist/ComplexComponents/Slat/Slat.js +14 -7
  15. package/dist/ComplexComponents/Slat/Slat.tsx +31 -19
  16. package/dist/ComplexComponents/Utilities/CopyButton.js +15 -27
  17. package/dist/ComplexComponents/Utilities/CopyButton.tsx +35 -49
  18. package/dist/DESIGN.md +4 -0
  19. package/dist/DataDisplay/Alert.js +2 -2
  20. package/dist/DataDisplay/Alert.tsx +7 -0
  21. package/dist/DataDisplay/Avatar.js +26 -81
  22. package/dist/DataDisplay/Avatar.tsx +35 -93
  23. package/dist/DataDisplay/Card.js +5 -4
  24. package/dist/DataDisplay/Card.tsx +5 -11
  25. package/dist/Layout/Inline.js +5 -42
  26. package/dist/Layout/Inline.tsx +6 -79
  27. package/dist/Overlays/Modal.js +2 -2
  28. package/dist/Overlays/Modal.tsx +4 -4
  29. package/dist/contracts/Alert.json +5 -0
  30. package/dist/contracts/index.json +1 -1
  31. package/dist/css/mantine.css +120 -12
  32. package/dist/css/tokens.css +52 -14
  33. package/dist/hooks/index.js +18 -0
  34. package/dist/hooks/index.ts +28 -0
  35. package/dist/hooks/useSelectedRowsText.js +73 -0
  36. package/dist/hooks/useSelectedRowsText.ts +74 -0
  37. package/dist/stories/Combobox/SearchableSelect.stories.tsx +3 -3
  38. package/dist/stories/ComplexComponents/DashboardWidget/DashboardWidget.stories.tsx +7 -0
  39. package/dist/stories/ComplexComponents/PageContentHeader/PageContentHeader.stories.tsx +21 -21
  40. package/dist/stories/ComplexComponents/Utilities/CopyButton.stories.tsx +4 -14
  41. package/dist/stories/DataDisplay/Progress.stories.tsx +11 -27
  42. package/dist/stories/Navigation/Stepper.stories.tsx +25 -21
  43. package/dist/stories/Overlays/Drawer.stories.tsx +6 -6
  44. package/dist/stories/Overlays/Modal.stories.tsx +31 -11
  45. package/dist/stories/index.json +6 -6
  46. package/package.json +97 -3
@@ -277,6 +277,13 @@
277
277
  --ad-alert-title-gap-bottom: 10px;
278
278
  --ad-alert-body-font-size: 14px;
279
279
  --ad-alert-body-fg: #000000;
280
+ --ad-alert-panel-padding-x: 10px;
281
+ --ad-alert-panel-padding-y: 4px;
282
+ --ad-alert-panel-border-width: 0px;
283
+ --ad-alert-panel-border-radius: 0px;
284
+ --ad-alert-panel-icon-size: 16px;
285
+ --ad-alert-panel-icon-gap: 10px;
286
+ --ad-alert-panel-icon-offset-top: 3px;
280
287
  --ad-alert-icon-size: 20px;
281
288
  --ad-alert-icon-margin-right: 16px;
282
289
  --ad-app-shell-root-bg: #ffffff;
@@ -304,7 +311,6 @@
304
311
  --ad-avatar-sizes-xl-size: 84px;
305
312
  --ad-badge-root-base-font-family: Inter;
306
313
  --ad-badge-root-base-font-weight: 700;
307
- --ad-badge-root-base-line-height: 1.4;
308
314
  --ad-badge-root-base-border-radius: 4px;
309
315
  --ad-badge-root-base-gap: 5px;
310
316
  --ad-badge-root-base-padding-y: 0px;
@@ -761,6 +767,7 @@
761
767
  --ad-drawer-overlay-bg: rgba(0, 0, 0, 0.55);
762
768
  --ad-drawer-content-bg: #ffffff;
763
769
  --ad-drawer-content-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.05), 0px 36px 28px -7px rgba(0, 0, 0, 0.05), 0px 17px 17px -7px rgba(0, 0, 0, 0.04);
770
+ --ad-drawer-content-border-radius: 0px;
764
771
  --ad-drawer-content-z-index: 200;
765
772
  --ad-drawer-header-bg: #ffffff;
766
773
  --ad-drawer-header-padding-x: 16px;
@@ -1348,22 +1355,34 @@
1348
1355
  --ad-slat-row-padding: 12px;
1349
1356
  --ad-slat-row-gap: 12px;
1350
1357
  --ad-slat-row-icon-header-gap: 10px;
1351
- --ad-slat-row-subhead-gap: 5px;
1352
1358
  --ad-slat-sizes-xs-title-order: 6;
1353
1359
  --ad-slat-sizes-xs-subtitle-size: xs;
1354
- --ad-slat-sizes-xs-icon-size: xs;
1360
+ --ad-slat-sizes-xs-subhead-gap: 5px;
1361
+ --ad-slat-sizes-xs-indicator-size: 8px;
1362
+ --ad-slat-sizes-xs-badge-size: xs;
1355
1363
  --ad-slat-sizes-sm-title-order: 5;
1356
1364
  --ad-slat-sizes-sm-subtitle-size: sm;
1357
- --ad-slat-sizes-sm-icon-size: sm;
1365
+ --ad-slat-sizes-sm-subhead-gap: 5px;
1366
+ --ad-slat-sizes-sm-indicator-size: 12px;
1367
+ --ad-slat-sizes-sm-badge-size: sm;
1358
1368
  --ad-slat-sizes-md-title-order: 4;
1359
1369
  --ad-slat-sizes-md-subtitle-size: md;
1360
- --ad-slat-sizes-md-icon-size: md;
1370
+ --ad-slat-sizes-md-subhead-gap: 5px;
1371
+ --ad-slat-sizes-md-indicator-size: 16px;
1372
+ --ad-slat-sizes-md-badge-size: md;
1361
1373
  --ad-slat-sizes-lg-title-order: 3;
1362
1374
  --ad-slat-sizes-lg-subtitle-size: lg;
1363
- --ad-slat-sizes-lg-icon-size: lg;
1375
+ --ad-slat-sizes-lg-subhead-gap: 10px;
1376
+ --ad-slat-sizes-lg-indicator-size: 20px;
1377
+ --ad-slat-sizes-lg-badge-size: lg;
1364
1378
  --ad-slat-sizes-xl-title-order: 2;
1365
1379
  --ad-slat-sizes-xl-subtitle-size: xl;
1366
- --ad-slat-sizes-xl-icon-size: xl;
1380
+ --ad-slat-sizes-xl-subhead-gap: 10px;
1381
+ --ad-slat-sizes-xl-indicator-size: 24px;
1382
+ --ad-slat-sizes-xl-badge-size: xl;
1383
+ --ad-slat-title-font-weight: 600;
1384
+ --ad-slat-title-line-height: 1.16;
1385
+ --ad-slat-subtitle-line-height: 1.16;
1367
1386
  --ad-slider-root-color: #326FDE;
1368
1387
  --ad-slider-root-track-bg: #e9ecef;
1369
1388
  --ad-slider-root-track-disabled-bg: #e9ecef;
@@ -1891,6 +1910,13 @@
1891
1910
  --ad-alert-title-gap-bottom: 10px;
1892
1911
  --ad-alert-body-font-size: 14px;
1893
1912
  --ad-alert-body-fg: #ffffff;
1913
+ --ad-alert-panel-padding-x: 10px;
1914
+ --ad-alert-panel-padding-y: 4px;
1915
+ --ad-alert-panel-border-width: 0px;
1916
+ --ad-alert-panel-border-radius: 0px;
1917
+ --ad-alert-panel-icon-size: 16px;
1918
+ --ad-alert-panel-icon-gap: 10px;
1919
+ --ad-alert-panel-icon-offset-top: 3px;
1894
1920
  --ad-alert-icon-size: 20px;
1895
1921
  --ad-alert-icon-margin-right: 16px;
1896
1922
  --ad-app-shell-root-bg: #242424;
@@ -1918,7 +1944,6 @@
1918
1944
  --ad-avatar-sizes-xl-size: 84px;
1919
1945
  --ad-badge-root-base-font-family: Inter;
1920
1946
  --ad-badge-root-base-font-weight: 700;
1921
- --ad-badge-root-base-line-height: 1.4;
1922
1947
  --ad-badge-root-base-border-radius: 4px;
1923
1948
  --ad-badge-root-base-gap: 5px;
1924
1949
  --ad-badge-root-base-padding-y: 0px;
@@ -2375,6 +2400,7 @@
2375
2400
  --ad-drawer-overlay-bg: rgba(0, 0, 0, 0.55);
2376
2401
  --ad-drawer-content-bg: #2e2e2e;
2377
2402
  --ad-drawer-content-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.05), 0px 36px 28px -7px rgba(0, 0, 0, 0.05), 0px 17px 17px -7px rgba(0, 0, 0, 0.04);
2403
+ --ad-drawer-content-border-radius: 0px;
2378
2404
  --ad-drawer-content-z-index: 200;
2379
2405
  --ad-drawer-header-bg: #242424;
2380
2406
  --ad-drawer-header-padding-x: 16px;
@@ -2962,22 +2988,34 @@
2962
2988
  --ad-slat-row-padding: 12px;
2963
2989
  --ad-slat-row-gap: 12px;
2964
2990
  --ad-slat-row-icon-header-gap: 10px;
2965
- --ad-slat-row-subhead-gap: 5px;
2966
2991
  --ad-slat-sizes-xs-title-order: 6;
2967
2992
  --ad-slat-sizes-xs-subtitle-size: xs;
2968
- --ad-slat-sizes-xs-icon-size: xs;
2993
+ --ad-slat-sizes-xs-subhead-gap: 5px;
2994
+ --ad-slat-sizes-xs-indicator-size: 8px;
2995
+ --ad-slat-sizes-xs-badge-size: xs;
2969
2996
  --ad-slat-sizes-sm-title-order: 5;
2970
2997
  --ad-slat-sizes-sm-subtitle-size: sm;
2971
- --ad-slat-sizes-sm-icon-size: sm;
2998
+ --ad-slat-sizes-sm-subhead-gap: 5px;
2999
+ --ad-slat-sizes-sm-indicator-size: 12px;
3000
+ --ad-slat-sizes-sm-badge-size: sm;
2972
3001
  --ad-slat-sizes-md-title-order: 4;
2973
3002
  --ad-slat-sizes-md-subtitle-size: md;
2974
- --ad-slat-sizes-md-icon-size: md;
3003
+ --ad-slat-sizes-md-subhead-gap: 5px;
3004
+ --ad-slat-sizes-md-indicator-size: 16px;
3005
+ --ad-slat-sizes-md-badge-size: md;
2975
3006
  --ad-slat-sizes-lg-title-order: 3;
2976
3007
  --ad-slat-sizes-lg-subtitle-size: lg;
2977
- --ad-slat-sizes-lg-icon-size: lg;
3008
+ --ad-slat-sizes-lg-subhead-gap: 10px;
3009
+ --ad-slat-sizes-lg-indicator-size: 20px;
3010
+ --ad-slat-sizes-lg-badge-size: lg;
2978
3011
  --ad-slat-sizes-xl-title-order: 2;
2979
3012
  --ad-slat-sizes-xl-subtitle-size: xl;
2980
- --ad-slat-sizes-xl-icon-size: xl;
3013
+ --ad-slat-sizes-xl-subhead-gap: 10px;
3014
+ --ad-slat-sizes-xl-indicator-size: 24px;
3015
+ --ad-slat-sizes-xl-badge-size: xl;
3016
+ --ad-slat-title-font-weight: 600;
3017
+ --ad-slat-title-line-height: 1.16;
3018
+ --ad-slat-subtitle-line-height: 1.16;
2981
3019
  --ad-slider-root-color: #1971c2;
2982
3020
  --ad-slider-root-track-bg: #424242;
2983
3021
  --ad-slider-root-track-disabled-bg: #2e2e2e;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Hooks Module
3
+ *
4
+ * This module exports all custom React hooks used throughout the application.
5
+ * Custom hooks should be placed in individual files within this directory and
6
+ * exported from this index file for easy importing.
7
+ *
8
+ * @example
9
+ * // Import individual hooks
10
+ * import { useSelectedRowsText } from '@/hooks';
11
+ *
12
+ * @example
13
+ * // Import specific hook
14
+ * import { useSelectedRowsText } from '@/hooks/useSelectedRowsText';
15
+ */
16
+ // Table-related hooks
17
+ // DataTable state is controlled by the consumer (see DataTable docs); only the text helper remains.
18
+ export { useSelectedRowsText } from './useSelectedRowsText.js';
@@ -0,0 +1,28 @@
1
+ /**
2
+ * Hooks Module
3
+ *
4
+ * This module exports all custom React hooks used throughout the application.
5
+ * Custom hooks should be placed in individual files within this directory and
6
+ * exported from this index file for easy importing.
7
+ *
8
+ * @example
9
+ * // Import individual hooks
10
+ * import { useSelectedRowsText } from '@/hooks';
11
+ *
12
+ * @example
13
+ * // Import specific hook
14
+ * import { useSelectedRowsText } from '@/hooks/useSelectedRowsText';
15
+ */
16
+
17
+ // Table-related hooks
18
+ // DataTable state is controlled by the consumer (see DataTable docs); only the text helper remains.
19
+ export { useSelectedRowsText } from './useSelectedRowsText';
20
+
21
+ // Mantine-related hooks
22
+ // export { useMantineRules } from './useMantineRules';
23
+
24
+ // Utility hooks
25
+ // Add other custom hooks here as they are created
26
+
27
+ // For now, this file serves as a placeholder for future hook exports
28
+ export {};
@@ -0,0 +1,73 @@
1
+ import { useMemo } from 'react';
2
+ import { translate } from '@/components/DesignSystem/ComplexComponents/DataTable/translations';
3
+ /**
4
+ * Custom hook for generating selected rows text
5
+ *
6
+ * Generates appropriate text based on the number of selected rows.
7
+ * Returns null if no rows are selected, otherwise returns the appropriate
8
+ * singular or plural text based on the count.
9
+ *
10
+ * @param numberOfSelectedRows - The number of currently selected rows
11
+ * @returns String with selected rows text or null if no rows selected
12
+ *
13
+ * @example
14
+ * ```tsx
15
+ * const selectedRowsText = useSelectedRowsText(3);
16
+ * // Returns: "3 rows selected" (or localized equivalent)
17
+ *
18
+ * if (selectedRowsText) {
19
+ * console.log(selectedRowsText);
20
+ * }
21
+ * ```
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * // No rows selected
26
+ * const selectedRowsText = useSelectedRowsText(0);
27
+ * // Returns: null
28
+ *
29
+ * // Single row selected
30
+ * const selectedRowsText = useSelectedRowsText(1);
31
+ * // Returns: "1 row selected" (or localized equivalent)
32
+ * ```
33
+ *
34
+ * @example
35
+ * ```tsx
36
+ * // Using in a component
37
+ * const CustomToolbar = ({ selectedCount }) => {
38
+ * const selectedText = useSelectedRowsText(selectedCount);
39
+ *
40
+ * return (
41
+ * <div>
42
+ * {selectedText && (
43
+ * <Text size="sm" c="blue">
44
+ * {selectedText}
45
+ * </Text>
46
+ * )}
47
+ * </div>
48
+ * );
49
+ * };
50
+ * ```
51
+ *
52
+ * @example
53
+ * ```tsx
54
+ * // Multiple rows selected
55
+ * const selectedRowsText = useSelectedRowsText(25);
56
+ * // Returns: "25 rows selected" (or localized equivalent)
57
+ *
58
+ * // Display in status bar
59
+ * const StatusBar = ({ count }) => {
60
+ * const text = useSelectedRowsText(count);
61
+ * return text ? <span>{text}</span> : <span>No selection</span>;
62
+ * };
63
+ * ```
64
+ */
65
+ export function useSelectedRowsText(numberOfSelectedRows) {
66
+ return useMemo(() => {
67
+ if (numberOfSelectedRows === 0)
68
+ return null;
69
+ return numberOfSelectedRows === 1
70
+ ? translate("table.selected.row")
71
+ : translate("table.selected.rows", { count: numberOfSelectedRows });
72
+ }, [numberOfSelectedRows]);
73
+ }
@@ -0,0 +1,74 @@
1
+ import { useMemo } from 'react';
2
+ import { translate } from '@/components/DesignSystem/ComplexComponents/DataTable/translations';
3
+
4
+ /**
5
+ * Custom hook for generating selected rows text
6
+ *
7
+ * Generates appropriate text based on the number of selected rows.
8
+ * Returns null if no rows are selected, otherwise returns the appropriate
9
+ * singular or plural text based on the count.
10
+ *
11
+ * @param numberOfSelectedRows - The number of currently selected rows
12
+ * @returns String with selected rows text or null if no rows selected
13
+ *
14
+ * @example
15
+ * ```tsx
16
+ * const selectedRowsText = useSelectedRowsText(3);
17
+ * // Returns: "3 rows selected" (or localized equivalent)
18
+ *
19
+ * if (selectedRowsText) {
20
+ * console.log(selectedRowsText);
21
+ * }
22
+ * ```
23
+ *
24
+ * @example
25
+ * ```tsx
26
+ * // No rows selected
27
+ * const selectedRowsText = useSelectedRowsText(0);
28
+ * // Returns: null
29
+ *
30
+ * // Single row selected
31
+ * const selectedRowsText = useSelectedRowsText(1);
32
+ * // Returns: "1 row selected" (or localized equivalent)
33
+ * ```
34
+ *
35
+ * @example
36
+ * ```tsx
37
+ * // Using in a component
38
+ * const CustomToolbar = ({ selectedCount }) => {
39
+ * const selectedText = useSelectedRowsText(selectedCount);
40
+ *
41
+ * return (
42
+ * <div>
43
+ * {selectedText && (
44
+ * <Text size="sm" c="blue">
45
+ * {selectedText}
46
+ * </Text>
47
+ * )}
48
+ * </div>
49
+ * );
50
+ * };
51
+ * ```
52
+ *
53
+ * @example
54
+ * ```tsx
55
+ * // Multiple rows selected
56
+ * const selectedRowsText = useSelectedRowsText(25);
57
+ * // Returns: "25 rows selected" (or localized equivalent)
58
+ *
59
+ * // Display in status bar
60
+ * const StatusBar = ({ count }) => {
61
+ * const text = useSelectedRowsText(count);
62
+ * return text ? <span>{text}</span> : <span>No selection</span>;
63
+ * };
64
+ * ```
65
+ */
66
+ export function useSelectedRowsText(numberOfSelectedRows: number): string | null {
67
+ return useMemo(() => {
68
+ if (numberOfSelectedRows === 0) return null;
69
+
70
+ return numberOfSelectedRows === 1
71
+ ? translate("table.selected.row")
72
+ : translate("table.selected.rows", { count: numberOfSelectedRows });
73
+ }, [numberOfSelectedRows]);
74
+ }
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
2
  import { Stack } from '@mantine/core';
3
- import { Inline, SearchableSelect, Title, Text } from '@appdirect/design-system';
3
+ import { SearchableSelect, Title, Text } from '@appdirect/design-system';
4
4
 
5
5
  const meta: Meta<typeof SearchableSelect> = {
6
6
  title: 'Design System/Combobox/SearchableSelect',
@@ -9,11 +9,11 @@ const meta: Meta<typeof SearchableSelect> = {
9
9
  layout: 'centered',
10
10
  docs: {
11
11
  description: {
12
- component: 'Searchable select input with filtering capabilities and dropdown options.',
12
+ component: 'The DS Select with `searchable` on by default. Designers use Combobox in Figma; engineering swaps in SearchableSelect for type-to-filter fields.',
13
13
  },
14
14
  },
15
15
  },
16
- tags: ['autodocs', 'code-connected'],
16
+ tags: ['autodocs'],
17
17
  argTypes: {
18
18
  label: {
19
19
  control: 'text',
@@ -74,6 +74,13 @@ export const Basic: Story = {
74
74
  },
75
75
  };
76
76
 
77
+ export const WithPanelNotification: Story = {
78
+ args: {
79
+ ...Basic.args,
80
+ panelNotification: true,
81
+ panelNotificationMessage: 'Something needs your attention.',
82
+ },
83
+ };
77
84
 
78
85
  // ========================== WITH CONTROLS ==========================
79
86
 
@@ -114,8 +114,8 @@ export const WithKeyInsights: Story = {
114
114
  }
115
115
  ]}
116
116
  actions={[
117
- { label: 'Export Data', onClick: () => console.log('Export'), variant: 'outline' },
118
- { label: 'Refresh', onClick: () => console.log('Refresh'), variant: 'primary' }
117
+ { label: 'Refresh', onClick: () => console.log('Refresh'), variant: 'primary' },
118
+ { label: 'Export Data', onClick: () => console.log('Export'), variant: 'outline' }
119
119
  ]}
120
120
  />
121
121
  </Stack>
@@ -152,9 +152,9 @@ export const UserProfile: Story = {
152
152
  ]}
153
153
  nameValueColumns={2}
154
154
  actions={[
155
- { label: 'Edit Profile', onClick: () => console.log('Edit'), variant: 'outline' },
155
+ { label: 'Send Message', onClick: () => console.log('Message'), variant: 'primary' },
156
156
  { label: 'View Calendar', onClick: () => console.log('Calendar'), variant: 'default' },
157
- { label: 'Send Message', onClick: () => console.log('Message'), variant: 'primary' }
157
+ { label: 'Edit Profile', onClick: () => console.log('Edit'), variant: 'outline' }
158
158
  ]}
159
159
  />
160
160
  </Stack>
@@ -181,8 +181,8 @@ export const ProjectOverview: Story = {
181
181
  description="A modern e-commerce platform built with React, Node.js, and PostgreSQL. This project includes user authentication, product catalog, shopping cart, payment processing, and admin dashboard. <a href='/docs/project'>View documentation</a> for more details."
182
182
  allowLinks={true}
183
183
  actions={[
184
- { label: 'View Repository', onClick: () => console.log('Repo'), variant: 'outline' },
185
- { label: 'Deploy', onClick: () => console.log('Deploy'), variant: 'primary' }
184
+ { label: 'Deploy', onClick: () => console.log('Deploy'), variant: 'primary' },
185
+ { label: 'View Repository', onClick: () => console.log('Repo'), variant: 'outline' }
186
186
  ]}
187
187
  />
188
188
  </Stack>
@@ -230,8 +230,8 @@ export const SystemStatus: Story = {
230
230
  />
231
231
  }
232
232
  actions={[
233
- { label: 'View Logs', onClick: () => console.log('Logs'), variant: 'outline' },
234
- { label: 'Restart Services', onClick: () => console.log('Restart'), variant: 'danger' }
233
+ { label: 'Restart Services', onClick: () => console.log('Restart'), variant: 'danger' },
234
+ { label: 'View Logs', onClick: () => console.log('Logs'), variant: 'outline' }
235
235
  ]}
236
236
  />
237
237
  </Stack>
@@ -273,9 +273,9 @@ export const TeamDashboard: Story = {
273
273
  }
274
274
  ]}
275
275
  actions={[
276
- { label: 'Add Member', onClick: () => console.log('Add'), variant: 'outline' },
276
+ { label: 'Start Standup', onClick: () => console.log('Standup'), variant: 'primary' },
277
277
  { label: 'Sprint Planning', onClick: () => console.log('Sprint'), variant: 'default' },
278
- { label: 'Start Standup', onClick: () => console.log('Standup'), variant: 'primary' }
278
+ { label: 'Add Member', onClick: () => console.log('Add'), variant: 'outline' }
279
279
  ]}
280
280
  />
281
281
  </Stack>
@@ -310,9 +310,9 @@ export const DatabaseManagement: Story = {
310
310
  ]}
311
311
  nameValueColumns={2}
312
312
  actions={[
313
- { label: 'Create Backup', onClick: () => console.log('Backup'), variant: 'outline' },
313
+ { label: 'Monitor', onClick: () => console.log('Monitor'), variant: 'primary' },
314
314
  { label: 'View Logs', onClick: () => console.log('Logs'), variant: 'default' },
315
- { label: 'Monitor', onClick: () => console.log('Monitor'), variant: 'primary' }
315
+ { label: 'Create Backup', onClick: () => console.log('Backup'), variant: 'outline' }
316
316
  ]}
317
317
  />
318
318
  </Stack>
@@ -338,9 +338,9 @@ export const ApplicationSettings: Story = {
338
338
  description="Manage your application settings, environment variables, and feature flags. Changes made here will affect the production environment and require careful review."
339
339
  allowLinks={false}
340
340
  actions={[
341
- { label: 'Reset to Default', onClick: () => console.log('Reset'), variant: 'outline' },
341
+ { label: 'Save Changes', onClick: () => console.log('Save'), variant: 'primary' },
342
342
  { label: 'Export Config', onClick: () => console.log('Export'), variant: 'default' },
343
- { label: 'Save Changes', onClick: () => console.log('Save'), variant: 'primary' }
343
+ { label: 'Reset to Default', onClick: () => console.log('Reset'), variant: 'outline' }
344
344
  ]}
345
345
  />
346
346
  </Stack>
@@ -367,9 +367,9 @@ export const APIDocumentation: Story = {
367
367
  description="Welcome to our REST API documentation. This API provides access to user data, product information, and order management. <a href='/api/auth'>Authentication</a> is required for most endpoints. Check out our <a href='/api/examples'>code examples</a> to get started quickly."
368
368
  allowLinks={true}
369
369
  actions={[
370
- { label: 'View Examples', onClick: () => console.log('Examples'), variant: 'outline' },
370
+ { label: 'Get API Key', onClick: () => console.log('API Key'), variant: 'primary' },
371
371
  { label: 'Test API', onClick: () => console.log('Test'), variant: 'default' },
372
- { label: 'Get API Key', onClick: () => console.log('API Key'), variant: 'primary' }
372
+ { label: 'View Examples', onClick: () => console.log('Examples'), variant: 'outline' }
373
373
  ]}
374
374
  />
375
375
  </Stack>
@@ -415,9 +415,9 @@ export const CloudInfrastructure: Story = {
415
415
  }
416
416
  ]}
417
417
  actions={[
418
- { label: 'View Costs', onClick: () => console.log('Costs'), variant: 'outline' },
418
+ { label: 'Deploy', onClick: () => console.log('Deploy'), variant: 'primary' },
419
419
  { label: 'Scale Resources', onClick: () => console.log('Scale'), variant: 'default' },
420
- { label: 'Deploy', onClick: () => console.log('Deploy'), variant: 'primary' }
420
+ { label: 'View Costs', onClick: () => console.log('Costs'), variant: 'outline' }
421
421
  ]}
422
422
  />
423
423
  </Stack>
@@ -446,9 +446,9 @@ export const DocumentationPage: Story = {
446
446
  description="A comprehensive React component library built with TypeScript and Mantine. Includes over 50 components with full TypeScript support, Storybook documentation, and automated testing. Perfect for building consistent user interfaces across your applications."
447
447
  allowLinks={false}
448
448
  actions={[
449
- { label: 'View Components', onClick: () => console.log('Components'), variant: 'outline' },
449
+ { label: 'Get Started', onClick: () => console.log('Start'), variant: 'primary' },
450
450
  { label: 'Download', onClick: () => console.log('Download'), variant: 'default' },
451
- { label: 'Get Started', onClick: () => console.log('Start'), variant: 'primary' }
451
+ { label: 'View Components', onClick: () => console.log('Components'), variant: 'outline' }
452
452
  ]}
453
453
  />
454
454
  </Stack>
@@ -493,7 +493,7 @@ export const HeaderOnly: Story = {
493
493
  subhead="No content section"
494
494
  icon={<RiSettingsLine />}
495
495
  actions={[
496
- { label: 'Primary Action', onClick: () => console.log('Action'), variant: 'primary' },
496
+ { label: 'Primary Action', onClick: () => console.log('Action'), variant: 'primary' }
497
497
  ]}
498
498
  />
499
499
  </Stack>
@@ -10,7 +10,7 @@ const meta: Meta<typeof CopyButton> = {
10
10
  layout: 'centered',
11
11
  docs: {
12
12
  description: {
13
- component: 'A reusable button component with copy-to-clipboard functionality and interactive tooltips. Shows "Copy" on hover and "Copied" after clicking, resetting when cursor leaves.',
13
+ component: `A reusable button component with copy-to-clipboard functionality and interactive tooltips. Built on Mantine's CopyButton: clicking copies the value and the tooltip shows "Copied" briefly.`,
14
14
  },
15
15
  },
16
16
  },
@@ -43,7 +43,6 @@ export const Default: Story = {
43
43
  value: 'Hello World',
44
44
  label: 'Text',
45
45
  onCopy: (value) => {
46
- navigator.clipboard.writeText(value);
47
46
  console.log('Copied:', value);
48
47
  },
49
48
  },
@@ -54,7 +53,6 @@ export const BasicUsage: Story = {
54
53
  const [copyStatus, setCopyStatus] = useState<string>('');
55
54
 
56
55
  const handleCopy = (value: string, context: string) => {
57
- navigator.clipboard.writeText(value);
58
56
  setCopyStatus(`Copied ${context}: ${value}`);
59
57
  setTimeout(() => setCopyStatus(''), 3000);
60
58
  };
@@ -122,8 +120,7 @@ export const DifferentSizes: Story = {
122
120
  value="Small icon"
123
121
  label="small text"
124
122
  iconSize={16}
125
- onCopy={(v) => navigator.clipboard.writeText(v)}
126
- />
123
+ />
127
124
  </Stack>
128
125
 
129
126
  <Stack gap="xs" align="center">
@@ -131,8 +128,7 @@ export const DifferentSizes: Story = {
131
128
  <CopyButton
132
129
  value="Default icon"
133
130
  label="default text"
134
- onCopy={(v) => navigator.clipboard.writeText(v)}
135
- />
131
+ />
136
132
  </Stack>
137
133
 
138
134
  <Stack gap="xs" align="center">
@@ -141,8 +137,7 @@ export const DifferentSizes: Story = {
141
137
  value="Large icon"
142
138
  label="large text"
143
139
  iconSize={32}
144
- onCopy={(v) => navigator.clipboard.writeText(v)}
145
- />
140
+ />
146
141
  </Stack>
147
142
  </Inline>
148
143
  </Stack>
@@ -161,7 +156,6 @@ export const WithCodeSnippets: Story = {
161
156
  const [copyStatus, setCopyStatus] = useState<string>('');
162
157
 
163
158
  const handleCopy = (value: string, type: string) => {
164
- navigator.clipboard.writeText(value);
165
159
  setCopyStatus(`Copied ${type}`);
166
160
  setTimeout(() => setCopyStatus(''), 3000);
167
161
  };
@@ -226,7 +220,6 @@ export const CredentialsExample: Story = {
226
220
  const [copyStatus, setCopyStatus] = useState<string>('');
227
221
 
228
222
  const handleCopy = (value: string, type: string) => {
229
- navigator.clipboard.writeText(value);
230
223
  setCopyStatus(`Copied ${type}`);
231
224
  setTimeout(() => setCopyStatus(''), 2000);
232
225
  };
@@ -300,7 +293,6 @@ export const WithInputFields: Story = {
300
293
  });
301
294
 
302
295
  const handleCopy = (value: string, field: string) => {
303
- navigator.clipboard.writeText(value);
304
296
  setCopyStatus(`Copied ${field}`);
305
297
  setTimeout(() => setCopyStatus(''), 2000);
306
298
  };
@@ -390,7 +382,6 @@ export const SystemInformation: Story = {
390
382
  const [copyStatus, setCopyStatus] = useState<string>('');
391
383
 
392
384
  const handleCopy = (value: string, type: string) => {
393
- navigator.clipboard.writeText(value);
394
385
  setCopyStatus(`Copied ${type}`);
395
386
  setTimeout(() => setCopyStatus(''), 2000);
396
387
  };
@@ -465,7 +456,6 @@ export const Interactive: Story = {
465
456
  label: 'example text',
466
457
  iconSize: 24,
467
458
  onCopy: (value) => {
468
- navigator.clipboard.writeText(value);
469
459
  console.log('Copied:', value);
470
460
  },
471
461
  },
@@ -1,6 +1,6 @@
1
1
  import type { Meta, StoryObj } from '@storybook/nextjs-vite';
2
2
  import { Stack } from '@mantine/core';
3
- import { Inline, Progress, Title, Text } from '@appdirect/design-system';
3
+ import { Inline, Progress, Title, Text, Button } from '@appdirect/design-system';
4
4
  import { useState, useEffect } from 'react';
5
5
 
6
6
  const meta: Meta<typeof Progress> = {
@@ -292,32 +292,16 @@ export const ProgressWithSteps: Story = {
292
292
  </div>
293
293
 
294
294
  <Inline gap="xs">
295
- <button
296
- onClick={() => setCurrentStep(Math.max(1, currentStep - 1))}
297
- disabled={currentStep === 1}
298
- style={{
299
- padding: '8px 16px',
300
- border: '1px solid #ccc',
301
- borderRadius: '4px',
302
- background: currentStep === 1 ? '#f5f5f5' : 'white',
303
- cursor: currentStep === 1 ? 'not-allowed' : 'pointer'
304
- }}
305
- >
306
- Previous
307
- </button>
308
- <button
309
- onClick={() => setCurrentStep(Math.min(totalSteps, currentStep + 1))}
310
- disabled={currentStep === totalSteps}
311
- style={{
312
- padding: '8px 16px',
313
- border: '1px solid #ccc',
314
- borderRadius: '4px',
315
- background: currentStep === totalSteps ? '#f5f5f5' : 'white',
316
- cursor: currentStep === totalSteps ? 'not-allowed' : 'pointer'
317
- }}
318
- >
319
- Next
320
- </button>
295
+ {currentStep > 1 && (
296
+ <Button variant="outline" onClick={() => setCurrentStep(Math.max(1, currentStep - 1))}>
297
+ Previous
298
+ </Button>
299
+ )}
300
+ {currentStep < totalSteps && (
301
+ <Button variant="outline" onClick={() => setCurrentStep(Math.min(totalSteps, currentStep + 1))}>
302
+ Next
303
+ </Button>
304
+ )}
321
305
  </Inline>
322
306
  </Stack>
323
307
  );