@reshape-biotech/design-system 1.2.5 → 1.2.7

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 (175) hide show
  1. package/README.md +3 -1
  2. package/dist/app.css +97 -97
  3. package/dist/components/activity/Activity.stories.svelte +104 -104
  4. package/dist/components/activity/Activity.svelte +112 -112
  5. package/dist/components/avatar/Avatar.stories.svelte +23 -23
  6. package/dist/components/avatar/Avatar.svelte +54 -54
  7. package/dist/components/banner/Banner.stories.svelte +105 -105
  8. package/dist/components/banner/Banner.svelte +42 -42
  9. package/dist/components/button/Button.stories.svelte +61 -61
  10. package/dist/components/button/Button.svelte +95 -95
  11. package/dist/components/card/Card.stories.svelte +112 -112
  12. package/dist/components/card/Card.svelte +18 -18
  13. package/dist/components/checkbox/Checkbox.stories.svelte +8 -8
  14. package/dist/components/checkbox/Checkbox.svelte +17 -17
  15. package/dist/components/collapsible/Collapsible.stories.svelte +26 -26
  16. package/dist/components/collapsible/components/collapsible-content.svelte +20 -20
  17. package/dist/components/collapsible/components/collapsible-trigger.svelte +12 -12
  18. package/dist/components/combobox/Combobox.stories.svelte +412 -412
  19. package/dist/components/combobox/components/combobox-add.svelte +8 -8
  20. package/dist/components/combobox/components/combobox-content.svelte +39 -39
  21. package/dist/components/combobox/components/combobox-indicator.svelte +1 -1
  22. package/dist/components/datepicker/DatePicker.stories.svelte +196 -196
  23. package/dist/components/datepicker/DatePicker.svelte +173 -173
  24. package/dist/components/divider/Divider.stories.svelte +7 -7
  25. package/dist/components/divider/Divider.svelte +9 -9
  26. package/dist/components/drawer/Drawer.stories.svelte +51 -51
  27. package/dist/components/drawer/Drawer.svelte +33 -33
  28. package/dist/components/drawer/DrawerLabel.svelte +10 -10
  29. package/dist/components/dropdown/Dropdown.stories.svelte +210 -210
  30. package/dist/components/dropdown/Dropdown.svelte +57 -57
  31. package/dist/components/dropdown/components/DropdownContent.svelte +16 -16
  32. package/dist/components/dropdown/components/DropdownMenu.svelte +10 -10
  33. package/dist/components/dropdown/components/DropdownTrigger.svelte +37 -37
  34. package/dist/components/dropdown/components/OutlinedButton.svelte +9 -9
  35. package/dist/components/empty-content/EmptyContent.stories.svelte +38 -38
  36. package/dist/components/empty-content/EmptyContent.svelte +12 -12
  37. package/dist/components/graphs/bar-chart/BarChart.stories.svelte +91 -91
  38. package/dist/components/graphs/bar-chart/BarChart.svelte +147 -147
  39. package/dist/components/graphs/bar-chart/StackedBarChart.stories.svelte +57 -57
  40. package/dist/components/graphs/bar-chart/StackedBarChart.svelte +198 -199
  41. package/dist/components/graphs/chart/Chart.stories.svelte +96 -96
  42. package/dist/components/graphs/chart/Chart.svelte +207 -207
  43. package/dist/components/graphs/line/LineChart.stories.svelte +138 -138
  44. package/dist/components/graphs/line/LineChart.svelte +140 -142
  45. package/dist/components/graphs/matrix/Matrix.stories.svelte +117 -117
  46. package/dist/components/graphs/matrix/Matrix.svelte +141 -141
  47. package/dist/components/graphs/multiline/MultiLineChart.stories.svelte +168 -168
  48. package/dist/components/graphs/multiline/MultiLineChart.svelte +236 -236
  49. package/dist/components/graphs/scatterplot/Scatterplot.stories.svelte +84 -84
  50. package/dist/components/graphs/scatterplot/Scatterplot.svelte +302 -302
  51. package/dist/components/graphs/utils/duration.d.ts +1 -0
  52. package/dist/components/graphs/utils/duration.js +33 -0
  53. package/dist/components/graphs/utils/tooltipFormatter.js +1 -1
  54. package/dist/components/icon-button/IconButton.stories.svelte +64 -64
  55. package/dist/components/icon-button/IconButton.svelte +88 -88
  56. package/dist/components/icons/AnalysisIcon.stories.svelte +18 -18
  57. package/dist/components/icons/AnalysisIcon.svelte +96 -96
  58. package/dist/components/icons/Icon.stories.svelte +111 -111
  59. package/dist/components/icons/Icon.svelte +17 -17
  60. package/dist/components/icons/PrincipalIcon.svelte +59 -59
  61. package/dist/components/icons/custom/Halo.svelte +31 -31
  62. package/dist/components/icons/custom/Well.svelte +27 -27
  63. package/dist/components/icons/index.d.ts +3 -2
  64. package/dist/components/icons/index.js +3 -1
  65. package/dist/components/image/Image.svelte +42 -42
  66. package/dist/components/input/Input.stories.svelte +55 -55
  67. package/dist/components/input/Input.svelte +121 -121
  68. package/dist/components/label/Label.stories.svelte +18 -18
  69. package/dist/components/label/Label.svelte +11 -11
  70. package/dist/components/list/List.stories.svelte +84 -84
  71. package/dist/components/list/List.svelte +20 -20
  72. package/dist/components/logo/Logo.stories.svelte +15 -15
  73. package/dist/components/logo/Logo.svelte +30 -30
  74. package/dist/components/manual-cfu-counter/ManualCFUCounter.stories.svelte +102 -102
  75. package/dist/components/manual-cfu-counter/ManualCFUCounter.svelte +557 -565
  76. package/dist/components/manual-cfu-counter/test/ManualCFUCounterTestWrapper.svelte +11 -11
  77. package/dist/components/markdown/Markdown.stories.svelte +10 -10
  78. package/dist/components/markdown/Markdown.svelte +6 -6
  79. package/dist/components/modal/Modal.stories.svelte +29 -29
  80. package/dist/components/modal/Modal.svelte +71 -71
  81. package/dist/components/multi-cfu-counter/MultiCFUCounter.stories.svelte +215 -0
  82. package/dist/components/multi-cfu-counter/MultiCFUCounter.stories.svelte.d.ts +3 -0
  83. package/dist/components/multi-cfu-counter/MultiCFUCounter.svelte +662 -0
  84. package/dist/components/multi-cfu-counter/MultiCFUCounter.svelte.d.ts +32 -0
  85. package/dist/components/multi-cfu-counter/index.d.ts +1 -0
  86. package/dist/components/multi-cfu-counter/index.js +1 -0
  87. package/dist/components/multi-cfu-counter/test/MultiCFUCounterTestWrapper.svelte +28 -0
  88. package/dist/components/multi-cfu-counter/test/MultiCFUCounterTestWrapper.svelte.d.ts +20 -0
  89. package/dist/components/notification-popup/NotificationPopup.stories.svelte +18 -18
  90. package/dist/components/notification-popup/NotificationPopup.svelte +26 -26
  91. package/dist/components/notifications/Notifications.stories.svelte +101 -101
  92. package/dist/components/notifications/Notifications.svelte +9 -9
  93. package/dist/components/pill/Pill.stories.svelte +8 -8
  94. package/dist/components/pill/Pill.svelte +27 -27
  95. package/dist/components/progress-circle/ProgressCircle.stories.svelte +8 -8
  96. package/dist/components/progress-circle/ProgressCircle.svelte +54 -54
  97. package/dist/components/required-status-indicator/RequiredStatusIndicator.stories.svelte +18 -18
  98. package/dist/components/required-status-indicator/RequiredStatusIndicator.svelte +14 -14
  99. package/dist/components/segmented-control-buttons/ControlButton.svelte +36 -36
  100. package/dist/components/segmented-control-buttons/SegmentedControlButtons.stories.svelte +35 -35
  101. package/dist/components/segmented-control-buttons/SegmentedControlButtons.svelte +13 -13
  102. package/dist/components/select/Select.stories.svelte +77 -77
  103. package/dist/components/select/Select.svelte +114 -114
  104. package/dist/components/select-new/Select.stories.svelte +188 -188
  105. package/dist/components/select-new/components/Group.svelte +17 -17
  106. package/dist/components/select-new/components/MultiSelectTrigger.svelte +57 -57
  107. package/dist/components/select-new/components/SelectContent.svelte +22 -22
  108. package/dist/components/select-new/components/SelectGroupHeading.svelte +10 -10
  109. package/dist/components/select-new/components/SelectItem.svelte +25 -25
  110. package/dist/components/select-new/components/SelectTrigger.svelte +38 -38
  111. package/dist/components/sjsf-wrappers/SjsfNumberInputWrapper.svelte +76 -76
  112. package/dist/components/sjsf-wrappers/SjsfNumberInputWrapper.svelte.d.ts +1 -1
  113. package/dist/components/sjsf-wrappers/SjsfTextInputWrapper.svelte +53 -53
  114. package/dist/components/sjsf-wrappers/SjsfTextInputWrapper.svelte.d.ts +1 -1
  115. package/dist/components/sjsf-wrappers/sjsfCustomTheme.js +1 -1
  116. package/dist/components/skeleton-loader/SkeletonLoader.stories.svelte +32 -32
  117. package/dist/components/skeleton-loader/SkeletonLoader.svelte +10 -10
  118. package/dist/components/skeleton-loader/StatcardSkeleton.svelte +9 -9
  119. package/dist/components/skeleton-loader/components/Skeleton.svelte +7 -7
  120. package/dist/components/skeleton-loader/components/SkeletonImage.svelte +12 -12
  121. package/dist/components/slider/Slider.stories.svelte +23 -23
  122. package/dist/components/slider/Slider.svelte +107 -107
  123. package/dist/components/spinner/Spinner.stories.svelte +8 -8
  124. package/dist/components/spinner/Spinner.svelte +18 -18
  125. package/dist/components/stat-card/StatCard.stories.svelte +26 -26
  126. package/dist/components/stat-card/StatCard.svelte +128 -128
  127. package/dist/components/status-badge/StatusBadge.stories.svelte +365 -365
  128. package/dist/components/status-badge/StatusBadge.svelte +54 -54
  129. package/dist/components/stepper/Stepper.stories.svelte +219 -219
  130. package/dist/components/stepper/components/stepper-root.svelte +12 -12
  131. package/dist/components/stepper/components/stepper-step.svelte +83 -83
  132. package/dist/components/table/Table.stories.svelte +87 -87
  133. package/dist/components/table/Table.svelte +32 -32
  134. package/dist/components/table/components/TBody.svelte +7 -7
  135. package/dist/components/table/components/THead.svelte +7 -7
  136. package/dist/components/table/components/Td.svelte +8 -8
  137. package/dist/components/table/components/Th.svelte +8 -8
  138. package/dist/components/table/components/Tr.svelte +11 -11
  139. package/dist/components/tabs/Tabs.stories.svelte +20 -20
  140. package/dist/components/tabs/Tabs.svelte +8 -8
  141. package/dist/components/tabs/components/Content.svelte +8 -8
  142. package/dist/components/tabs/components/Tab.svelte +14 -14
  143. package/dist/components/tabs/components/Tabs.svelte +7 -7
  144. package/dist/components/tag/Tag.stories.svelte +57 -57
  145. package/dist/components/tag/Tag.svelte +95 -95
  146. package/dist/components/textarea/Textarea.stories.svelte +70 -70
  147. package/dist/components/textarea/Textarea.svelte +76 -76
  148. package/dist/components/toast/Toast.stories.svelte +204 -204
  149. package/dist/components/toast/Toast.svelte +53 -53
  150. package/dist/components/toggle/Toggle.stories.svelte +9 -9
  151. package/dist/components/toggle/Toggle.svelte +53 -53
  152. package/dist/components/toggle-icon-button/ToggleIconButton.stories.svelte +152 -152
  153. package/dist/components/toggle-icon-button/ToggleIconButton.svelte +99 -99
  154. package/dist/components/tooltip/Tooltip.stories.svelte +105 -105
  155. package/dist/components/tooltip/Tooltip.svelte +26 -26
  156. package/dist/fonts/index.js +1 -1
  157. package/dist/index.d.ts +4 -1
  158. package/dist/index.js +5 -1
  159. package/dist/notifications.d.ts +1 -4
  160. package/dist/notifications.js +1 -1
  161. package/dist/styles.d.ts +1 -0
  162. package/dist/styles.js +4 -0
  163. package/dist/tailwind-safelist.js +406 -398
  164. package/dist/tailwind.preset.d.ts +4 -0
  165. package/dist/tailwind.preset.js +10 -10
  166. package/dist/tokens/colors.d.ts +246 -0
  167. package/dist/tokens/colors.js +139 -0
  168. package/dist/tokens/index.d.ts +3 -0
  169. package/dist/tokens/index.js +5 -0
  170. package/dist/tokens/typography.d.ts +48 -0
  171. package/dist/tokens/typography.js +48 -0
  172. package/dist/tokens.d.ts +16 -252
  173. package/dist/tokens.js +33 -164
  174. package/dist/types/fonts.d.ts +2 -2
  175. package/package.json +398 -78
@@ -1,94 +1,94 @@
1
1
  <script lang="ts">
2
- import type { Snippet } from 'svelte';
3
- import type { HTMLTextareaAttributes } from 'svelte/elements';
2
+ import type { Snippet } from 'svelte';
3
+ import type { HTMLTextareaAttributes } from 'svelte/elements';
4
4
 
5
- interface TextareaProps extends HTMLTextareaAttributes {
6
- oninput?: (event: Event) => void;
7
- onblur?: (event: Event) => void;
8
- onkeydown?: (event: KeyboardEvent) => void;
9
- input?: HTMLTextAreaElement;
10
- size?: 'xs' | 'sm' | 'md' | 'lg' | 'dynamic';
11
- label?: string;
12
- error?: Snippet;
13
- placeholder?: string;
14
- }
5
+ interface TextareaProps extends HTMLTextareaAttributes {
6
+ oninput?: (event: Event) => void;
7
+ onblur?: (event: Event) => void;
8
+ onkeydown?: (event: KeyboardEvent) => void;
9
+ input?: HTMLTextAreaElement;
10
+ size?: 'xs' | 'sm' | 'md' | 'lg' | 'dynamic';
11
+ label?: string;
12
+ error?: Snippet;
13
+ placeholder?: string;
14
+ }
15
15
 
16
- let {
17
- value = $bindable(),
18
- oninput = () => {},
19
- onblur = () => {},
20
- onkeydown = () => {},
21
- input = $bindable(),
22
- label,
23
- placeholder,
24
- error,
25
- id,
26
- size = 'md',
27
- class: className,
28
- ...rest
29
- }: TextareaProps = $props();
16
+ let {
17
+ value = $bindable(),
18
+ oninput = () => {},
19
+ onblur = () => {},
20
+ onkeydown = () => {},
21
+ input = $bindable(),
22
+ label,
23
+ placeholder,
24
+ error,
25
+ id,
26
+ size = 'md',
27
+ class: className,
28
+ ...rest
29
+ }: TextareaProps = $props();
30
30
 
31
- const textareaId = crypto.randomUUID();
32
- const inputId = $derived(id ?? textareaId);
31
+ const textareaId = crypto.randomUUID();
32
+ const inputId = $derived(id ?? textareaId);
33
33
 
34
- function handleInputInternal(event: Event) {
35
- if (rest.readonly) return;
36
- const target = event.target as HTMLTextAreaElement;
37
- value = target.value;
38
- autoResizeTextarea(target);
39
- oninput(event);
40
- }
34
+ function handleInputInternal(event: Event) {
35
+ if (rest.readonly) return;
36
+ const target = event.target as HTMLTextAreaElement;
37
+ value = target.value;
38
+ autoResizeTextarea(target);
39
+ oninput(event);
40
+ }
41
41
 
42
- function autoResizeTextarea(textarea: HTMLTextAreaElement) {
43
- const maxHeight = 200;
44
- textarea.style.height = 'auto';
45
- if (textarea.scrollHeight < maxHeight) {
46
- textarea.style.height = `${textarea.scrollHeight}px`;
47
- textarea.style.overflowY = 'hidden';
48
- } else {
49
- textarea.style.height = `${maxHeight}px`;
50
- textarea.style.overflowY = 'auto';
51
- }
52
- }
42
+ function autoResizeTextarea(textarea: HTMLTextAreaElement) {
43
+ const maxHeight = 200;
44
+ textarea.style.height = 'auto';
45
+ if (textarea.scrollHeight < maxHeight) {
46
+ textarea.style.height = `${textarea.scrollHeight}px`;
47
+ textarea.style.overflowY = 'hidden';
48
+ } else {
49
+ textarea.style.height = `${maxHeight}px`;
50
+ textarea.style.overflowY = 'auto';
51
+ }
52
+ }
53
53
 
54
- function handleBlurInternal(event: Event) {
55
- onblur(event);
56
- }
54
+ function handleBlurInternal(event: Event) {
55
+ onblur(event);
56
+ }
57
57
 
58
- export function focus() {
59
- input?.focus();
60
- }
58
+ export function focus() {
59
+ input?.focus();
60
+ }
61
61
 
62
- $effect(() => {
63
- if (input && value) {
64
- autoResizeTextarea(input);
65
- }
66
- });
62
+ $effect(() => {
63
+ if (input && value) {
64
+ autoResizeTextarea(input);
65
+ }
66
+ });
67
67
  </script>
68
68
 
69
69
  {#if label}
70
- <label for={inputId} class="block px-1 py-2 text-sm text-secondary">
71
- {label}
72
- {#if rest.required}
73
- <span class="ml-0.5 text-danger">*</span>
74
- {/if}
75
- </label>
70
+ <label for={inputId} class="block px-1 py-2 text-sm text-secondary">
71
+ {label}
72
+ {#if rest.required}
73
+ <span class="ml-0.5 text-danger">*</span>
74
+ {/if}
75
+ </label>
76
76
  {/if}
77
77
 
78
78
  <textarea
79
- id={inputId}
80
- class="flex w-full items-center gap-1 rounded-lg border border-input bg-surface px-3 py-2 shadow-input focus-within:border-focus hover:border-hover {className ??
81
- ''}"
82
- class:!border-error={error}
83
- class:has-text={value}
84
- class:has-placeholder={placeholder}
85
- {placeholder}
86
- oninput={handleInputInternal}
87
- onblur={handleBlurInternal}
88
- bind:this={input}
89
- {value}
90
- {...rest}
91
- {onkeydown}
79
+ id={inputId}
80
+ class="flex w-full items-center gap-1 rounded-lg border border-input bg-surface px-3 py-2 shadow-input focus-within:border-focus hover:border-hover {className ??
81
+ ''}"
82
+ class:!border-error={error}
83
+ class:has-text={value}
84
+ class:has-placeholder={placeholder}
85
+ {placeholder}
86
+ oninput={handleInputInternal}
87
+ onblur={handleBlurInternal}
88
+ bind:this={input}
89
+ {value}
90
+ {...rest}
91
+ {onkeydown}
92
92
  ></textarea>
93
93
 
94
94
  {@render error?.()}
@@ -1,209 +1,209 @@
1
1
  <script module lang="ts">
2
- import type { Notification } from '../../../notifications';
3
- import Toast from './Toast.svelte';
4
- import { defineMeta } from '@storybook/addon-svelte-csf';
5
-
6
- const { Story } = defineMeta({
7
- component: Toast,
8
- title: 'Design System/Toast',
9
- tags: ['autodocs']
10
- });
11
-
12
- const defaultNotification: Notification = {
13
- id: '1',
14
- type: 'default',
15
- message: 'This is a default notification',
16
- dismissable: false
17
- };
18
-
19
- const dangerNotification: Notification = {
20
- id: '2',
21
- type: 'danger',
22
- message: 'This is a danger notification',
23
- dismissable: false
24
- };
25
-
26
- const warningNotification: Notification = {
27
- id: '3',
28
- type: 'warning',
29
- message: 'This is a warning notification',
30
- dismissable: false
31
- };
32
-
33
- const infoNotification: Notification = {
34
- id: '4',
35
- type: 'info',
36
- message: 'This is an info notification',
37
- dismissable: false
38
- };
39
-
40
- const successNotification: Notification = {
41
- id: '5',
42
- type: 'success',
43
- message: 'This is a success notification',
44
- dismissable: false
45
- };
46
-
47
- const defaultIconNotification: Notification = {
48
- id: '6',
49
- type: 'default',
50
- message: 'This is a default notification with icon',
51
- icon: 'Bell',
52
- dismissable: false
53
- };
54
-
55
- const dangerIconNotification: Notification = {
56
- id: '7',
57
- type: 'danger',
58
- message: 'This is a danger notification with icon',
59
- icon: 'SealWarning',
60
- dismissable: false
61
- };
62
-
63
- const warningIconNotification: Notification = {
64
- id: '8',
65
- type: 'warning',
66
- message: 'This is a warning notification with icon',
67
- icon: 'Warning',
68
- dismissable: false
69
- };
70
-
71
- const infoIconNotification: Notification = {
72
- id: '9',
73
- type: 'info',
74
- message: 'This is an info notification with icon',
75
- icon: 'Info',
76
- dismissable: false
77
- };
78
-
79
- const successIconNotification: Notification = {
80
- id: '10',
81
- type: 'success',
82
- message: 'This is a success notification with icon',
83
- icon: 'Check',
84
- dismissable: false
85
- };
86
-
87
- const defaultDismissableNotificationWithIcon: Notification = {
88
- id: '11',
89
- type: 'default',
90
- message: 'This is a dismissable default notification with icon',
91
- icon: 'Bell',
92
- dismissable: true
93
- };
94
-
95
- const dangerDismissableNotificationWithIcon: Notification = {
96
- id: '12',
97
- type: 'danger',
98
- message: 'This is a dismissable danger notification with icon',
99
- icon: 'SealWarning',
100
- dismissable: true
101
- };
102
-
103
- const warningDismissableNotificationWithIcon: Notification = {
104
- id: '13',
105
- type: 'warning',
106
- message: 'This is a dismissable warning notification with icon',
107
- icon: 'Warning',
108
- dismissable: true
109
- };
110
-
111
- const infoDismissableNotificationWithIcon: Notification = {
112
- id: '14',
113
- type: 'info',
114
- message: 'This is a dismissable info notification with icon',
115
- icon: 'Info',
116
- dismissable: true
117
- };
118
-
119
- const successDismissableNotificationWithIcon: Notification = {
120
- id: '15',
121
- type: 'success',
122
- message: 'This is a dismissable success notification with icon',
123
- icon: 'Check',
124
- dismissable: true
125
- };
126
-
127
- const defaultDismissableNoIconNotification: Notification = {
128
- id: '16',
129
- type: 'default',
130
- message: 'This is a dismissable default notification without icon',
131
- dismissable: true
132
- };
133
-
134
- const dangerDismissableNoIconNotification: Notification = {
135
- id: '17',
136
- type: 'danger',
137
- message: 'This is a dismissable danger notification without icon',
138
- dismissable: true
139
- };
140
-
141
- const warningDismissableNoIconNotification: Notification = {
142
- id: '18',
143
- type: 'warning',
144
- message: 'This is a dismissable warning notification without icon',
145
- dismissable: true
146
- };
147
-
148
- const infoDismissableNoIconNotification: Notification = {
149
- id: '19',
150
- type: 'info',
151
- message: 'This is a dismissable info notification without icon',
152
- dismissable: true
153
- };
154
-
155
- const successDismissableNoIconNotification: Notification = {
156
- id: '20',
157
- type: 'success',
158
- message: 'This is a dismissable success notification without icon',
159
- dismissable: true
160
- };
2
+ import type { Notification } from '../../../notifications';
3
+ import Toast from './Toast.svelte';
4
+ import { defineMeta } from '@storybook/addon-svelte-csf';
5
+
6
+ const { Story } = defineMeta({
7
+ component: Toast,
8
+ title: 'Design System/Toast',
9
+ tags: ['autodocs'],
10
+ });
11
+
12
+ const defaultNotification: Notification = {
13
+ id: '1',
14
+ type: 'default',
15
+ message: 'This is a default notification',
16
+ dismissable: false,
17
+ };
18
+
19
+ const dangerNotification: Notification = {
20
+ id: '2',
21
+ type: 'danger',
22
+ message: 'This is a danger notification',
23
+ dismissable: false,
24
+ };
25
+
26
+ const warningNotification: Notification = {
27
+ id: '3',
28
+ type: 'warning',
29
+ message: 'This is a warning notification',
30
+ dismissable: false,
31
+ };
32
+
33
+ const infoNotification: Notification = {
34
+ id: '4',
35
+ type: 'info',
36
+ message: 'This is an info notification',
37
+ dismissable: false,
38
+ };
39
+
40
+ const successNotification: Notification = {
41
+ id: '5',
42
+ type: 'success',
43
+ message: 'This is a success notification',
44
+ dismissable: false,
45
+ };
46
+
47
+ const defaultIconNotification: Notification = {
48
+ id: '6',
49
+ type: 'default',
50
+ message: 'This is a default notification with icon',
51
+ icon: 'Bell',
52
+ dismissable: false,
53
+ };
54
+
55
+ const dangerIconNotification: Notification = {
56
+ id: '7',
57
+ type: 'danger',
58
+ message: 'This is a danger notification with icon',
59
+ icon: 'SealWarning',
60
+ dismissable: false,
61
+ };
62
+
63
+ const warningIconNotification: Notification = {
64
+ id: '8',
65
+ type: 'warning',
66
+ message: 'This is a warning notification with icon',
67
+ icon: 'Warning',
68
+ dismissable: false,
69
+ };
70
+
71
+ const infoIconNotification: Notification = {
72
+ id: '9',
73
+ type: 'info',
74
+ message: 'This is an info notification with icon',
75
+ icon: 'Info',
76
+ dismissable: false,
77
+ };
78
+
79
+ const successIconNotification: Notification = {
80
+ id: '10',
81
+ type: 'success',
82
+ message: 'This is a success notification with icon',
83
+ icon: 'Check',
84
+ dismissable: false,
85
+ };
86
+
87
+ const defaultDismissableNotificationWithIcon: Notification = {
88
+ id: '11',
89
+ type: 'default',
90
+ message: 'This is a dismissable default notification with icon',
91
+ icon: 'Bell',
92
+ dismissable: true,
93
+ };
94
+
95
+ const dangerDismissableNotificationWithIcon: Notification = {
96
+ id: '12',
97
+ type: 'danger',
98
+ message: 'This is a dismissable danger notification with icon',
99
+ icon: 'SealWarning',
100
+ dismissable: true,
101
+ };
102
+
103
+ const warningDismissableNotificationWithIcon: Notification = {
104
+ id: '13',
105
+ type: 'warning',
106
+ message: 'This is a dismissable warning notification with icon',
107
+ icon: 'Warning',
108
+ dismissable: true,
109
+ };
110
+
111
+ const infoDismissableNotificationWithIcon: Notification = {
112
+ id: '14',
113
+ type: 'info',
114
+ message: 'This is a dismissable info notification with icon',
115
+ icon: 'Info',
116
+ dismissable: true,
117
+ };
118
+
119
+ const successDismissableNotificationWithIcon: Notification = {
120
+ id: '15',
121
+ type: 'success',
122
+ message: 'This is a dismissable success notification with icon',
123
+ icon: 'Check',
124
+ dismissable: true,
125
+ };
126
+
127
+ const defaultDismissableNoIconNotification: Notification = {
128
+ id: '16',
129
+ type: 'default',
130
+ message: 'This is a dismissable default notification without icon',
131
+ dismissable: true,
132
+ };
133
+
134
+ const dangerDismissableNoIconNotification: Notification = {
135
+ id: '17',
136
+ type: 'danger',
137
+ message: 'This is a dismissable danger notification without icon',
138
+ dismissable: true,
139
+ };
140
+
141
+ const warningDismissableNoIconNotification: Notification = {
142
+ id: '18',
143
+ type: 'warning',
144
+ message: 'This is a dismissable warning notification without icon',
145
+ dismissable: true,
146
+ };
147
+
148
+ const infoDismissableNoIconNotification: Notification = {
149
+ id: '19',
150
+ type: 'info',
151
+ message: 'This is a dismissable info notification without icon',
152
+ dismissable: true,
153
+ };
154
+
155
+ const successDismissableNoIconNotification: Notification = {
156
+ id: '20',
157
+ type: 'success',
158
+ message: 'This is a dismissable success notification without icon',
159
+ dismissable: true,
160
+ };
161
161
  </script>
162
162
 
163
163
  <Story name="Notifications" asChild>
164
- <div class="space-y-8">
165
- <div class="space-y-4">
166
- <h5 class="text-lg font-semibold">Basic Notifications</h5>
167
- <div class="space-y-2">
168
- <Toast notification={defaultNotification} />
169
- <Toast notification={dangerNotification} />
170
- <Toast notification={warningNotification} />
171
- <Toast notification={infoNotification} />
172
- <Toast notification={successNotification} />
173
- </div>
174
- </div>
175
-
176
- <div class="space-y-4">
177
- <h5 class="text-lg font-semibold">Notifications with Icons</h5>
178
- <div class="space-y-2">
179
- <Toast notification={defaultIconNotification} />
180
- <Toast notification={dangerIconNotification} />
181
- <Toast notification={warningIconNotification} />
182
- <Toast notification={infoIconNotification} />
183
- <Toast notification={successIconNotification} />
184
- </div>
185
- </div>
186
-
187
- <div class="space-y-4">
188
- <h5 class="text-lg font-semibold">Dismissable Notifications</h5>
189
- <div class="space-y-2">
190
- <Toast notification={defaultDismissableNoIconNotification} />
191
- <Toast notification={dangerDismissableNoIconNotification} />
192
- <Toast notification={warningDismissableNoIconNotification} />
193
- <Toast notification={infoDismissableNoIconNotification} />
194
- <Toast notification={successDismissableNoIconNotification} />
195
- </div>
196
- </div>
197
-
198
- <div class="space-y-4">
199
- <h5 class="text-lg font-semibold">Dismissable Notifications with Icons</h5>
200
- <div class="space-y-2">
201
- <Toast notification={defaultDismissableNotificationWithIcon} />
202
- <Toast notification={dangerDismissableNotificationWithIcon} />
203
- <Toast notification={warningDismissableNotificationWithIcon} />
204
- <Toast notification={infoDismissableNotificationWithIcon} />
205
- <Toast notification={successDismissableNotificationWithIcon} />
206
- </div>
207
- </div>
208
- </div>
164
+ <div class="space-y-8">
165
+ <div class="space-y-4">
166
+ <h5 class="text-lg font-semibold">Basic Notifications</h5>
167
+ <div class="space-y-2">
168
+ <Toast notification={defaultNotification} />
169
+ <Toast notification={dangerNotification} />
170
+ <Toast notification={warningNotification} />
171
+ <Toast notification={infoNotification} />
172
+ <Toast notification={successNotification} />
173
+ </div>
174
+ </div>
175
+
176
+ <div class="space-y-4">
177
+ <h5 class="text-lg font-semibold">Notifications with Icons</h5>
178
+ <div class="space-y-2">
179
+ <Toast notification={defaultIconNotification} />
180
+ <Toast notification={dangerIconNotification} />
181
+ <Toast notification={warningIconNotification} />
182
+ <Toast notification={infoIconNotification} />
183
+ <Toast notification={successIconNotification} />
184
+ </div>
185
+ </div>
186
+
187
+ <div class="space-y-4">
188
+ <h5 class="text-lg font-semibold">Dismissable Notifications</h5>
189
+ <div class="space-y-2">
190
+ <Toast notification={defaultDismissableNoIconNotification} />
191
+ <Toast notification={dangerDismissableNoIconNotification} />
192
+ <Toast notification={warningDismissableNoIconNotification} />
193
+ <Toast notification={infoDismissableNoIconNotification} />
194
+ <Toast notification={successDismissableNoIconNotification} />
195
+ </div>
196
+ </div>
197
+
198
+ <div class="space-y-4">
199
+ <h5 class="text-lg font-semibold">Dismissable Notifications with Icons</h5>
200
+ <div class="space-y-2">
201
+ <Toast notification={defaultDismissableNotificationWithIcon} />
202
+ <Toast notification={dangerDismissableNotificationWithIcon} />
203
+ <Toast notification={warningDismissableNotificationWithIcon} />
204
+ <Toast notification={infoDismissableNotificationWithIcon} />
205
+ <Toast notification={successDismissableNotificationWithIcon} />
206
+ </div>
207
+ </div>
208
+ </div>
209
209
  </Story>