@mozaic-ds/web-components 1.0.0-beta.1 → 1.0.0-beta.3
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.
- package/README.md +26 -17
- package/dist/Cross24.js +2 -0
- package/dist/Cross24.js.map +1 -0
- package/dist/attributes.js +1 -1
- package/dist/attributes.js.map +1 -1
- package/dist/bundle.js +10 -0
- package/dist/components/breadcrumb/Breadcrumb.js +6 -6
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.svelte +2 -2
- package/dist/components/button/Button.js +3 -3
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/Button.svelte +8 -8
- package/dist/components/button/IconButton.js +2 -2
- package/dist/components/button/IconButton.js.map +1 -1
- package/dist/components/button/IconButton.svelte +9 -9
- package/dist/components/button/IconButton.svelte.d.ts +1 -1
- package/dist/components/button/IconButton.svelte.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.js +3 -3
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox/Checkbox.svelte +14 -14
- package/dist/components/checkboxgroup/CheckboxGroup.js +4 -4
- package/dist/components/checkboxgroup/CheckboxGroup.js.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.svelte +14 -14
- package/dist/components/drawer/Drawer.js +14 -0
- package/dist/components/drawer/Drawer.js.map +1 -0
- package/dist/components/drawer/Drawer.svelte +547 -0
- package/dist/components/drawer/Drawer.svelte.d.ts +41 -0
- package/dist/components/drawer/Drawer.svelte.d.ts.map +1 -0
- package/dist/components/field/Field.js +3 -3
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/field/Field.svelte +8 -8
- package/dist/components/link/Link.js +2 -2
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/link/Link.svelte +2 -2
- package/dist/components/loader/Loader.js +7 -7
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/loader/Loader.svelte +1 -1
- package/dist/components/modal/Modal.js +16 -0
- package/dist/components/modal/Modal.js.map +1 -0
- package/dist/components/modal/Modal.svelte +546 -0
- package/dist/components/modal/Modal.svelte.d.ts +44 -0
- package/dist/components/modal/Modal.svelte.d.ts.map +1 -0
- package/dist/components/number-badge/NumberBadge.js +2 -2
- package/dist/components/number-badge/NumberBadge.js.map +1 -1
- package/dist/components/number-badge/NumberBadge.svelte +5 -4
- package/dist/components/overlay/Overlay.js +2 -2
- package/dist/components/overlay/Overlay.js.map +1 -1
- package/dist/components/overlay/Overlay.svelte +2 -3
- package/dist/components/overlay/OverlayLoader.js +4 -4
- package/dist/components/overlay/OverlayLoader.js.map +1 -1
- package/dist/components/overlay/OverlayLoader.svelte +3 -4
- package/dist/components/pagination/Pagination.js +14 -0
- package/dist/components/pagination/Pagination.js.map +1 -0
- package/dist/components/pagination/Pagination.svelte +212 -0
- package/dist/components/pagination/Pagination.svelte.d.ts +14 -0
- package/dist/components/pagination/Pagination.svelte.d.ts.map +1 -0
- package/dist/components/passwordinput/PasswordInput.js +5 -5
- package/dist/components/passwordinput/PasswordInput.js.map +1 -1
- package/dist/components/passwordinput/PasswordInput.svelte +14 -14
- package/dist/components/quantityselector/QuantitySelector.js +3 -3
- package/dist/components/quantityselector/QuantitySelector.js.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.svelte +11 -11
- package/dist/components/radio/Radio.js +2 -2
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio/Radio.svelte +4 -4
- package/dist/components/radiogroup/RadioGroup.js +4 -4
- package/dist/components/radiogroup/RadioGroup.js.map +1 -1
- package/dist/components/radiogroup/RadioGroup.svelte +12 -12
- package/dist/components/select/Select.js +3 -3
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.svelte +9 -9
- package/dist/components/statusbadge/StatusBadge.js +2 -2
- package/dist/components/statusbadge/StatusBadge.js.map +1 -1
- package/dist/components/statusbadge/StatusBadge.svelte +9 -9
- package/dist/components/statusbadge/StatusDot.js +2 -2
- package/dist/components/statusbadge/StatusDot.js.map +1 -1
- package/dist/components/statusbadge/StatusDot.svelte +1 -1
- package/dist/components/statusnotification/StatusNotification.js +2 -2
- package/dist/components/statusnotification/StatusNotification.js.map +1 -1
- package/dist/components/statusnotification/StatusNotification.svelte +10 -10
- package/dist/components/tabs/Tab.js +4 -0
- package/dist/components/tabs/Tab.js.map +1 -0
- package/dist/components/tabs/Tab.svelte +134 -0
- package/dist/components/tabs/Tab.svelte.d.ts +38 -0
- package/dist/components/tabs/Tab.svelte.d.ts.map +1 -0
- package/dist/components/tabs/Tabs.js +4 -0
- package/dist/components/tabs/Tabs.js.map +1 -0
- package/dist/components/tabs/Tabs.svelte +126 -0
- package/dist/components/tabs/Tabs.svelte.d.ts +26 -0
- package/dist/components/tabs/Tabs.svelte.d.ts.map +1 -0
- package/dist/components/tags/Tag.js +4 -0
- package/dist/components/tags/Tag.js.map +1 -0
- package/dist/components/tags/Tag.svelte +218 -0
- package/dist/components/tags/Tag.svelte.d.ts +9 -0
- package/dist/components/tags/Tag.svelte.d.ts.map +1 -0
- package/dist/components/tags/TagContextualised.js +4 -0
- package/dist/components/tags/TagContextualised.js.map +1 -0
- package/dist/components/tags/TagContextualised.svelte +239 -0
- package/dist/components/tags/TagContextualised.svelte.d.ts +11 -0
- package/dist/components/tags/TagContextualised.svelte.d.ts.map +1 -0
- package/dist/components/tags/TagInteractive.js +4 -0
- package/dist/components/tags/TagInteractive.js.map +1 -0
- package/dist/components/tags/TagInteractive.svelte +223 -0
- package/dist/components/tags/TagInteractive.svelte.d.ts +10 -0
- package/dist/components/tags/TagInteractive.svelte.d.ts.map +1 -0
- package/dist/components/tags/TagRemovable.js +4 -0
- package/dist/components/tags/TagRemovable.js.map +1 -0
- package/dist/components/tags/TagRemovable.svelte +247 -0
- package/dist/components/tags/TagRemovable.svelte.d.ts +11 -0
- package/dist/components/tags/TagRemovable.svelte.d.ts.map +1 -0
- package/dist/components/tags/TagSelectable.js +4 -0
- package/dist/components/tags/TagSelectable.js.map +1 -0
- package/dist/components/tags/TagSelectable.svelte +247 -0
- package/dist/components/tags/TagSelectable.svelte.d.ts +13 -0
- package/dist/components/tags/TagSelectable.svelte.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.js +3 -3
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/Textarea.svelte +15 -15
- package/dist/components/textinput/Textinput.js +5 -5
- package/dist/components/textinput/Textinput.js.map +1 -1
- package/dist/components/textinput/Textinput.svelte +14 -14
- package/dist/components/toggle/Toggle.js +2 -2
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components/toggle/Toggle.svelte +5 -5
- package/dist/components/togglegroup/ToggleGroup.js +3 -3
- package/dist/components/togglegroup/ToggleGroup.js.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.svelte +13 -13
- package/dist/custom-element.js +3 -2
- package/dist/custom-element.js.map +1 -1
- package/dist/documentation/Contributing.mdx +1 -1
- package/dist/documentation/Introduction.mdx +1 -1
- package/dist/documentation/SupportAndOnboarding.mdx +1 -1
- package/dist/documentation/Svelte/Introduction.mdx +1 -1
- package/dist/documentation/Svelte/usingIcons.mdx +4 -2
- package/dist/documentation/Svelte/usingPresets.mdx +1 -2
- package/dist/documentation/WebComponents/Introduction.mdx +1 -1
- package/dist/documentation/WebComponents/usingIcons.mdx +10 -9
- package/dist/documentation/WebComponents/usingPresets.mdx +1 -2
- package/dist/each.js +1 -1
- package/dist/each.js.map +1 -1
- package/dist/if.js +1 -1
- package/dist/if.js.map +1 -1
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/legacy.js +1 -1
- package/dist/legacy.js.map +1 -1
- package/dist/main.d.ts +11 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +11 -1
- package/dist/slot.js +1 -1
- package/dist/slot.js.map +1 -1
- package/dist/stories/breadcrumb/Breadcrumb.stories.d.ts +1 -1
- package/dist/stories/breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/stories/breadcrumb/Breadcrumb.stories.js +1 -1
- package/dist/stories/button/Button.stories.d.ts +1 -1
- package/dist/stories/button/Button.stories.d.ts.map +1 -1
- package/dist/stories/button/Button.stories.js +3 -3
- package/dist/stories/button/IconButton.stories.d.ts +1 -1
- package/dist/stories/button/IconButton.stories.d.ts.map +1 -1
- package/dist/stories/button/IconButton.stories.js +3 -3
- package/dist/stories/checkbox/Checkbox.stories.d.ts +1 -1
- package/dist/stories/checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/stories/checkbox/Checkbox.stories.js +2 -2
- package/dist/stories/checkbox-group/Checkbox-group.stories.d.ts +1 -1
- package/dist/stories/checkbox-group/Checkbox-group.stories.d.ts.map +1 -1
- package/dist/stories/checkbox-group/Checkbox-group.stories.js +2 -2
- package/dist/stories/drawer/Drawer.stories.d.ts +11 -0
- package/dist/stories/drawer/Drawer.stories.d.ts.map +1 -0
- package/dist/stories/drawer/Drawer.stories.js +126 -0
- package/dist/stories/field/Field.stories.d.ts +1 -1
- package/dist/stories/field/Field.stories.d.ts.map +1 -1
- package/dist/stories/link/Link.stories.d.ts +1 -1
- package/dist/stories/link/Link.stories.d.ts.map +1 -1
- package/dist/stories/link/Link.stories.js +1 -1
- package/dist/stories/loader/Loader.stories.d.ts +1 -1
- package/dist/stories/loader/Loader.stories.d.ts.map +1 -1
- package/dist/stories/loader/Loader.stories.js +1 -1
- package/dist/stories/modal/Modal.stories.d.ts +12 -0
- package/dist/stories/modal/Modal.stories.d.ts.map +1 -0
- package/dist/stories/modal/Modal.stories.js +137 -0
- package/dist/stories/number-badge/NumberBadge.stories.d.ts +1 -1
- package/dist/stories/number-badge/NumberBadge.stories.d.ts.map +1 -1
- package/dist/stories/number-badge/NumberBadge.stories.js +2 -2
- package/dist/stories/overlay/Overlay.stories.d.ts +1 -1
- package/dist/stories/overlay/Overlay.stories.d.ts.map +1 -1
- package/dist/stories/overlay/Overlay.stories.js +2 -2
- package/dist/stories/overlay/OverlayLoader.stories.d.ts +1 -1
- package/dist/stories/overlay/OverlayLoader.stories.d.ts.map +1 -1
- package/dist/stories/overlay/OverlayLoader.stories.js +1 -1
- package/dist/stories/pagination/Pagination.stories.d.ts +12 -0
- package/dist/stories/pagination/Pagination.stories.d.ts.map +1 -0
- package/dist/stories/pagination/Pagination.stories.js +97 -0
- package/dist/stories/passwordinput/PasswordInput.stories.d.ts +1 -1
- package/dist/stories/passwordinput/PasswordInput.stories.d.ts.map +1 -1
- package/dist/stories/passwordinput/PasswordInput.stories.js +2 -2
- package/dist/stories/quantityselector/QuantitySelector.stories.d.ts +1 -1
- package/dist/stories/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
- package/dist/stories/quantityselector/QuantitySelector.stories.js +2 -2
- package/dist/stories/radio/Radio.stories.d.ts +1 -1
- package/dist/stories/radio/Radio.stories.d.ts.map +1 -1
- package/dist/stories/radio/Radio.stories.js +1 -1
- package/dist/stories/radio-group/Radio-group.stories.d.ts +1 -1
- package/dist/stories/radio-group/Radio-group.stories.d.ts.map +1 -1
- package/dist/stories/radio-group/Radio-group.stories.js +1 -1
- package/dist/stories/select/Select.stories.d.ts +1 -1
- package/dist/stories/select/Select.stories.d.ts.map +1 -1
- package/dist/stories/select/Select.stories.js +1 -1
- package/dist/stories/status-badge/StatusBadge.stories.d.ts +1 -1
- package/dist/stories/status-badge/StatusBadge.stories.d.ts.map +1 -1
- package/dist/stories/status-badge/StatusBadge.stories.js +1 -1
- package/dist/stories/status-dot/StatusDot.stories.d.ts +1 -1
- package/dist/stories/status-dot/StatusDot.stories.d.ts.map +1 -1
- package/dist/stories/status-dot/StatusDot.stories.js +1 -1
- package/dist/stories/status-notification/StatusNotification.stories.d.ts +1 -1
- package/dist/stories/status-notification/StatusNotification.stories.d.ts.map +1 -1
- package/dist/stories/status-notification/StatusNotification.stories.js +1 -1
- package/dist/stories/tabs/Tabs.stories.d.ts +7 -0
- package/dist/stories/tabs/Tabs.stories.d.ts.map +1 -0
- package/dist/stories/tabs/Tabs.stories.js +121 -0
- package/dist/stories/tags/Tags.stories.d.ts +5 -0
- package/dist/stories/tags/Tags.stories.d.ts.map +1 -0
- package/dist/stories/tags/Tags.stories.js +35 -0
- package/dist/stories/tags/TagsContextualised.stories.d.ts +5 -0
- package/dist/stories/tags/TagsContextualised.stories.d.ts.map +1 -0
- package/dist/stories/tags/TagsContextualised.stories.js +51 -0
- package/dist/stories/tags/TagsInteractive.stories.d.ts +5 -0
- package/dist/stories/tags/TagsInteractive.stories.d.ts.map +1 -0
- package/dist/stories/tags/TagsInteractive.stories.js +55 -0
- package/dist/stories/tags/TagsRemovable.stories.d.ts +5 -0
- package/dist/stories/tags/TagsRemovable.stories.d.ts.map +1 -0
- package/dist/stories/tags/TagsRemovable.stories.js +56 -0
- package/dist/stories/tags/TagsSelectable.stories.d.ts +5 -0
- package/dist/stories/tags/TagsSelectable.stories.d.ts.map +1 -0
- package/dist/stories/tags/TagsSelectable.stories.js +70 -0
- package/dist/stories/textarea/Textarea.stories.d.ts +1 -1
- package/dist/stories/textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/stories/textarea/Textarea.stories.js +2 -2
- package/dist/stories/textinput/Textinput.stories.d.ts +1 -1
- package/dist/stories/textinput/Textinput.stories.d.ts.map +1 -1
- package/dist/stories/textinput/Textinput.stories.js +2 -2
- package/dist/stories/toggle/Toggle.stories.d.ts +1 -1
- package/dist/stories/toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/stories/toggle/Toggle.stories.js +2 -2
- package/dist/stories/toggle-group/Toggle-group.stories.d.ts +1 -1
- package/dist/stories/toggle-group/Toggle-group.stories.d.ts.map +1 -1
- package/dist/stories/toggle-group/Toggle-group.stories.js +2 -2
- package/package.json +15 -23
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { action } from '
|
|
2
|
-
import { userEvent, expect } from '
|
|
1
|
+
import { action } from 'storybook/actions';
|
|
2
|
+
import { userEvent, expect } from 'storybook/test';
|
|
3
3
|
/**
|
|
4
4
|
* The quantity selector is a form element used to enter or select a number.
|
|
5
5
|
* This type of input is best used when the user needs to choose the quantity of a selected item, like a product before adding to cart.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/radio/Radio.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Radio.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/radio/Radio.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAE1D;;;;;GAKG;wBA2CE,IAAI,CAAC,OAAO,CAAC;AAzClB,wBAyCmB;AAgBnB,eAAO,MAAM,OAAO,SAAoB,CAAC;AAEzC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAKzC,eAAO,MAAM,QAAQ,SAAoB,CAAC;AAK1C,eAAO,MAAM,OAAO,SAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio-group.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/radio-group/Radio-group.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Radio-group.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/radio-group/Radio-group.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;wBAwCE,IAAI,CAAC,OAAO,CAAC;AAtClB,wBAsCmB;AAmBnB,eAAO,MAAM,OAAO,SAAoB,CAAC;AA8BzC,eAAO,MAAM,MAAM,SAAoB,CAAC;AAgCxC,eAAO,MAAM,OAAO,SAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/select/Select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Select.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/select/Select.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;wBAsCE,IAAI;AApCT,wBAoCU;AAoBV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAUzC,eAAO,MAAM,KAAK,SAAoB,CAAC;AAOvC,eAAO,MAAM,QAAQ,SAAoB,CAAC;AAQ1C,eAAO,MAAM,SAAS,SAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/status-badge/StatusBadge.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StatusBadge.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/status-badge/StatusBadge.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;GAIG;wBAgBE,IAAI;AAdT,wBAcU;AAYV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAOzC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAOzC,eAAO,MAAM,KAAK,SAAoB,CAAC;AAOvC,eAAO,MAAM,OAAO,SAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/status-dot/StatusDot.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StatusDot.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/status-dot/StatusDot.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;GAIG;wBAiBE,IAAI;AAfT,wBAeU;AASV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAOzC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAOzC,eAAO,MAAM,KAAK,SAAoB,CAAC;AAOvC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAOzC,eAAO,MAAM,KAAK,SAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StoryFn, Meta } from '@storybook/html';
|
|
1
|
+
import type { StoryFn, Meta } from '@storybook/html-vite';
|
|
2
2
|
/**
|
|
3
3
|
* A Status Notification is used to draw the user’s attention to important information that needs to be acknowledged.
|
|
4
4
|
* It often provides feedback on a process, highlights a status update, or alerts users about an issue.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusNotification.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/status-notification/StatusNotification.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"StatusNotification.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/status-notification/StatusNotification.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;wBA4BE,IAAI;AA1BT,wBA0BU;AAyBV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAOzC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAQzC,eAAO,MAAM,MAAM,SAAoB,CAAC;AAQxC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAQzC,eAAO,MAAM,UAAU,SAAoB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { within, expect } from '
|
|
1
|
+
import { within, expect } from 'storybook/test';
|
|
2
2
|
/**
|
|
3
3
|
* A Status Notification is used to draw the user’s attention to important information that needs to be acknowledged.
|
|
4
4
|
* It often provides feedback on a process, highlights a status update, or alerts users about an issue.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryFn } from '@storybook/html-vite';
|
|
2
|
+
declare const _default: Meta;
|
|
3
|
+
export default _default;
|
|
4
|
+
export declare const Default: StoryFn;
|
|
5
|
+
export declare const Centered: StoryFn;
|
|
6
|
+
export declare const WithIcons: StoryFn;
|
|
7
|
+
//# sourceMappingURL=Tabs.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/tabs/Tabs.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;wBAwBrD,IAAI;AArBT,wBAqBU;AAsCV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAoBzC,eAAO,MAAM,QAAQ,SAAoB,CAAC;AAoD1C,eAAO,MAAM,SAAS,SAAwB,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { within, expect } from 'storybook/test';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Navigation/Tabs',
|
|
4
|
+
tags: ['autodocs', 'new'],
|
|
5
|
+
parameters: {
|
|
6
|
+
docs: {
|
|
7
|
+
description: {
|
|
8
|
+
component: 'Tabs are a navigation component that allows users to switch between different sections within the same context. They help organize content efficiently by displaying only one section at a time, reducing clutter and improving accessibility. Tabs can include icons, labels, and notification badges to provide additional context. They are commonly used in dashboards, product management, and settings interfaces.',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
argTypes: {
|
|
13
|
+
activeindex: {
|
|
14
|
+
description: 'Index of the currently selected tab',
|
|
15
|
+
control: { type: 'number', min: 0 },
|
|
16
|
+
},
|
|
17
|
+
centered: {
|
|
18
|
+
description: 'centered tab element',
|
|
19
|
+
control: { type: 'boolean' },
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
// --- Template Function
|
|
24
|
+
const Template = ({ activeindex = 0, centered = 'false' }) => {
|
|
25
|
+
const wrapper = document.createElement('div');
|
|
26
|
+
const tabs = document.createElement('mc-tabs');
|
|
27
|
+
tabs.setAttribute('activeindex', String(activeindex));
|
|
28
|
+
tabs.setAttribute('centered', centered || '');
|
|
29
|
+
for (let i = 0; i < 4; i++) {
|
|
30
|
+
const tab = document.createElement('mc-tab');
|
|
31
|
+
tab.setAttribute('slot', 'tab');
|
|
32
|
+
tab.setAttribute('index', String(i));
|
|
33
|
+
tab.setAttribute('tag', 'button');
|
|
34
|
+
tab.innerText = `Tab ${i + 1}`;
|
|
35
|
+
if (String(i) === String(3))
|
|
36
|
+
tab.setAttribute('disabled', 'true');
|
|
37
|
+
if (i === activeindex)
|
|
38
|
+
tab.setAttribute('selected', 'true');
|
|
39
|
+
tab.addEventListener('click', () => {
|
|
40
|
+
tabs.setAttribute('activeindex', String(i));
|
|
41
|
+
// Update other tab selection
|
|
42
|
+
const allTabs = tabs.querySelectorAll('mc-tab');
|
|
43
|
+
allTabs.forEach((el, idx) => {
|
|
44
|
+
if (i === idx) {
|
|
45
|
+
el.setAttribute('selected', 'true');
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
el.removeAttribute('selected');
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
tabs.appendChild(tab);
|
|
53
|
+
}
|
|
54
|
+
wrapper.appendChild(tabs);
|
|
55
|
+
return wrapper;
|
|
56
|
+
};
|
|
57
|
+
// --- Default story
|
|
58
|
+
export const Default = Template.bind({});
|
|
59
|
+
Default.args = {
|
|
60
|
+
activeIndex: 0,
|
|
61
|
+
centered: false,
|
|
62
|
+
};
|
|
63
|
+
Default.play = async ({ canvasElement }) => {
|
|
64
|
+
const tabs = canvasElement.querySelector('mc-tabs');
|
|
65
|
+
const tabItems = tabs?.querySelectorAll('mc-tab');
|
|
66
|
+
expect(tabItems?.length).toBe(4);
|
|
67
|
+
const selected = Array.from(tabItems).filter((tab) => tab.getAttribute('selected') === 'true');
|
|
68
|
+
expect(selected.length).toBe(1);
|
|
69
|
+
expect(selected[0].innerText).toBe('Tab 1');
|
|
70
|
+
};
|
|
71
|
+
// --- Centered story
|
|
72
|
+
export const Centered = Template.bind({});
|
|
73
|
+
Centered.args = {
|
|
74
|
+
activeIndex: 1,
|
|
75
|
+
centered: true,
|
|
76
|
+
};
|
|
77
|
+
const IconTemplate = ({ activeindex = 0, centered = 'false' }) => {
|
|
78
|
+
const wrapper = document.createElement('div');
|
|
79
|
+
const tabs = document.createElement('mc-tabs');
|
|
80
|
+
tabs.setAttribute('activeindex', String(activeindex));
|
|
81
|
+
tabs.setAttribute('centered', centered || '');
|
|
82
|
+
for (let i = 0; i < 4; i++) {
|
|
83
|
+
const tab = document.createElement('mc-tab');
|
|
84
|
+
tab.setAttribute('slot', 'tab');
|
|
85
|
+
tab.setAttribute('index', String(i));
|
|
86
|
+
tab.setAttribute('tag', 'button');
|
|
87
|
+
tab.setAttribute('hasiconslot', 'true');
|
|
88
|
+
if (i === 3)
|
|
89
|
+
tab.setAttribute('disabled', 'true');
|
|
90
|
+
if (i === activeindex)
|
|
91
|
+
tab.setAttribute('selected', 'true');
|
|
92
|
+
const icon = document.createElement('chevron-right-32');
|
|
93
|
+
icon.setAttribute('slot', 'icon');
|
|
94
|
+
icon.setAttribute('style', 'height: 100%');
|
|
95
|
+
tab.appendChild(icon);
|
|
96
|
+
const label = document.createElement('span');
|
|
97
|
+
label.innerText = `Tab ${i + 1}`;
|
|
98
|
+
tab.appendChild(icon);
|
|
99
|
+
tab.appendChild(label);
|
|
100
|
+
tab.addEventListener('click', () => {
|
|
101
|
+
tabs.setAttribute('activeindex', String(i));
|
|
102
|
+
const allTabs = tabs.querySelectorAll('mc-tab');
|
|
103
|
+
allTabs.forEach((el, idx) => {
|
|
104
|
+
if (i === idx) {
|
|
105
|
+
el.setAttribute('selected', 'true');
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
el.removeAttribute('selected');
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
tabs.appendChild(tab);
|
|
113
|
+
}
|
|
114
|
+
wrapper.appendChild(tabs);
|
|
115
|
+
return wrapper;
|
|
116
|
+
};
|
|
117
|
+
export const WithIcons = IconTemplate.bind({});
|
|
118
|
+
WithIcons.args = {
|
|
119
|
+
activeIndex: 0,
|
|
120
|
+
centered: false,
|
|
121
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tags.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/tags/Tags.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;wBAoBrD,IAAI;AAlBT,wBAkBU;AAYV,eAAO,MAAM,WAAW,EAAE,OAA8C,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
title: 'Indicators/Tag/Informative',
|
|
3
|
+
tags: ['autodocs', 'beta'],
|
|
4
|
+
argTypes: {
|
|
5
|
+
label: {
|
|
6
|
+
control: 'text',
|
|
7
|
+
description: 'Text label displayed inside the tag',
|
|
8
|
+
},
|
|
9
|
+
id: {
|
|
10
|
+
control: 'text',
|
|
11
|
+
description: 'ID of the tag (optional)',
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
control: 'select',
|
|
15
|
+
options: ['s', 'm', 'l'],
|
|
16
|
+
description: 'Size of the tag',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
const createInformativeTag = (args) => {
|
|
21
|
+
const tag = document.createElement('mc-tag');
|
|
22
|
+
if (args.label)
|
|
23
|
+
tag.setAttribute('label', args.label);
|
|
24
|
+
if (args.id)
|
|
25
|
+
tag.setAttribute('id', args.id);
|
|
26
|
+
if (args.size)
|
|
27
|
+
tag.setAttribute('size', args.size);
|
|
28
|
+
return tag;
|
|
29
|
+
};
|
|
30
|
+
export const Informative = (args) => createInformativeTag(args);
|
|
31
|
+
Informative.args = {
|
|
32
|
+
id: 'tag-informative',
|
|
33
|
+
label: 'Static Tag',
|
|
34
|
+
size: 'm',
|
|
35
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsContextualised.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/tags/TagsContextualised.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;wBAyBrD,IAAI;AAtBT,wBAsBU;AAiBV,eAAO,MAAM,cAAc,EAAE,OAAiD,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { expect, waitFor } from 'storybook/test';
|
|
2
|
+
export default {
|
|
3
|
+
title: 'Indicators/Tag/Contextualised',
|
|
4
|
+
tags: ['autodocs', 'beta'],
|
|
5
|
+
argTypes: {
|
|
6
|
+
label: {
|
|
7
|
+
control: 'text',
|
|
8
|
+
description: 'Text label displayed inside the tag',
|
|
9
|
+
},
|
|
10
|
+
contextualisedNumber: {
|
|
11
|
+
control: 'number',
|
|
12
|
+
description: 'Number badge displayed on the tag',
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
control: 'select',
|
|
16
|
+
options: ['s', 'm', 'l'],
|
|
17
|
+
description: 'Size of the tag',
|
|
18
|
+
},
|
|
19
|
+
disabled: {
|
|
20
|
+
control: 'boolean',
|
|
21
|
+
description: 'Disable the tag',
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
const createContextualisedTag = (args) => {
|
|
26
|
+
const tag = document.createElement('mc-tag-contextualised');
|
|
27
|
+
if (args.label)
|
|
28
|
+
tag.setAttribute('label', args.label);
|
|
29
|
+
if (args.contextualisedNumber)
|
|
30
|
+
tag.setAttribute('contextualisednumber', args.contextualisedNumber.toString());
|
|
31
|
+
if (args.size)
|
|
32
|
+
tag.setAttribute('size', args.size);
|
|
33
|
+
if (args.disabled)
|
|
34
|
+
tag.setAttribute('disabled', 'true');
|
|
35
|
+
return tag;
|
|
36
|
+
};
|
|
37
|
+
export const Contextualised = (args) => createContextualisedTag(args);
|
|
38
|
+
Contextualised.args = {
|
|
39
|
+
label: 'Notifications',
|
|
40
|
+
contextualisedNumber: 8,
|
|
41
|
+
size: 'm',
|
|
42
|
+
};
|
|
43
|
+
Contextualised.play = async ({ canvasElement }) => {
|
|
44
|
+
const tagEl = await waitFor(() => canvasElement.querySelector('mc-tag-contextualised'));
|
|
45
|
+
expect(tagEl?.getAttribute('contextualisednumber')).toBe('8');
|
|
46
|
+
const shadow = tagEl?.shadowRoot;
|
|
47
|
+
const badge = shadow?.querySelector('.mc-number-badge');
|
|
48
|
+
const label = shadow?.querySelector('.mc-tag__label');
|
|
49
|
+
expect(badge?.textContent?.trim()).toBe('8');
|
|
50
|
+
expect(label?.textContent?.trim()).toBe('Notifications');
|
|
51
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsInteractive.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/tags/TagsInteractive.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;wBA8BrD,IAAI;AA1BT,wBA0BU;AAeV,eAAO,MAAM,WAAW,EAAE,OAA8C,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { userEvent, expect } from 'storybook/test';
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Indicators/Tag/Interactive',
|
|
5
|
+
tags: ['autodocs', 'beta'],
|
|
6
|
+
argTypes: {
|
|
7
|
+
label: {
|
|
8
|
+
control: 'text',
|
|
9
|
+
description: 'Text label displayed inside the tag',
|
|
10
|
+
},
|
|
11
|
+
id: {
|
|
12
|
+
control: 'text',
|
|
13
|
+
description: 'ID of the tag (optional)',
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
control: 'select',
|
|
17
|
+
options: ['s', 'm', 'l'],
|
|
18
|
+
description: 'Size of the tag',
|
|
19
|
+
},
|
|
20
|
+
disabled: {
|
|
21
|
+
control: 'boolean',
|
|
22
|
+
description: 'Disable the tag',
|
|
23
|
+
},
|
|
24
|
+
onClick: {
|
|
25
|
+
action: 'clicked',
|
|
26
|
+
table: { category: 'Events' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
const createInteractiveTag = (args) => {
|
|
31
|
+
const tag = document.createElement('mc-tag-interactive');
|
|
32
|
+
if (args.label)
|
|
33
|
+
tag.setAttribute('label', args.label);
|
|
34
|
+
if (args.id)
|
|
35
|
+
tag.setAttribute('id', args.id);
|
|
36
|
+
if (args.size)
|
|
37
|
+
tag.setAttribute('size', args.size);
|
|
38
|
+
if (args.disabled)
|
|
39
|
+
tag.setAttribute('disabled', 'true');
|
|
40
|
+
tag.addEventListener('click', action('clicked'));
|
|
41
|
+
return tag;
|
|
42
|
+
};
|
|
43
|
+
export const Interactive = (args) => createInteractiveTag(args);
|
|
44
|
+
Interactive.args = {
|
|
45
|
+
id: 'tag-interactive',
|
|
46
|
+
label: 'Click me',
|
|
47
|
+
size: 'm',
|
|
48
|
+
};
|
|
49
|
+
Interactive.play = async ({ canvasElement }) => {
|
|
50
|
+
const button = canvasElement
|
|
51
|
+
.querySelector('mc-tag-interactive')
|
|
52
|
+
?.shadowRoot?.querySelector('button');
|
|
53
|
+
expect(button).not.toBeNull();
|
|
54
|
+
await userEvent.click(button);
|
|
55
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsRemovable.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/tags/TagsRemovable.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;wBA8BrD,IAAI;AA1BT,wBA0BU;AAgBV,eAAO,MAAM,SAAS,EAAE,OAA4C,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { userEvent, expect } from 'storybook/test';
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Indicators/Tag/Removable',
|
|
5
|
+
tags: ['autodocs', 'beta'],
|
|
6
|
+
argTypes: {
|
|
7
|
+
label: {
|
|
8
|
+
control: 'text',
|
|
9
|
+
description: 'Text label displayed inside the tag',
|
|
10
|
+
},
|
|
11
|
+
id: {
|
|
12
|
+
control: 'text',
|
|
13
|
+
description: 'ID of the tag (required)',
|
|
14
|
+
},
|
|
15
|
+
removableLabel: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'Accessible label for the remove button',
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
control: 'select',
|
|
21
|
+
options: ['s', 'm', 'l'],
|
|
22
|
+
description: 'Size of the tag',
|
|
23
|
+
},
|
|
24
|
+
'remove-tag': {
|
|
25
|
+
action: 'remove-tag',
|
|
26
|
+
table: { category: 'Events' },
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
const createRemovableTag = (args) => {
|
|
31
|
+
const tag = document.createElement('mc-tag-removable');
|
|
32
|
+
if (args.label)
|
|
33
|
+
tag.setAttribute('label', args.label);
|
|
34
|
+
if (args.id)
|
|
35
|
+
tag.setAttribute('id', args.id);
|
|
36
|
+
if (args.size)
|
|
37
|
+
tag.setAttribute('size', args.size);
|
|
38
|
+
if (args.removableLabel)
|
|
39
|
+
tag.setAttribute('removablelabel', args.removableLabel);
|
|
40
|
+
tag.addEventListener('remove-tag', action('remove-tag'));
|
|
41
|
+
return tag;
|
|
42
|
+
};
|
|
43
|
+
export const Removable = (args) => createRemovableTag(args);
|
|
44
|
+
Removable.args = {
|
|
45
|
+
id: 'tag-vue',
|
|
46
|
+
label: 'Tag label',
|
|
47
|
+
removableLabel: 'Remove Vue tag',
|
|
48
|
+
size: 'm',
|
|
49
|
+
};
|
|
50
|
+
Removable.play = async ({ canvasElement }) => {
|
|
51
|
+
const btn = canvasElement
|
|
52
|
+
.querySelector('mc-tag-removable')
|
|
53
|
+
?.shadowRoot?.querySelector('button');
|
|
54
|
+
expect(btn).not.toBeNull();
|
|
55
|
+
await userEvent.click(btn);
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TagsSelectable.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/tags/TagsSelectable.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;wBAsCrD,IAAI;AAlCT,wBAkCU;AAiBV,eAAO,MAAM,OAAO,EAAE,OAA6C,CAAC"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { userEvent, expect } from 'storybook/test';
|
|
2
|
+
import { action } from 'storybook/actions';
|
|
3
|
+
export default {
|
|
4
|
+
title: 'Indicators/Tag/Selectable',
|
|
5
|
+
tags: ['autodocs', 'beta'],
|
|
6
|
+
argTypes: {
|
|
7
|
+
label: {
|
|
8
|
+
control: 'text',
|
|
9
|
+
description: 'Text label displayed inside the tag',
|
|
10
|
+
},
|
|
11
|
+
id: {
|
|
12
|
+
control: 'text',
|
|
13
|
+
description: 'ID of the tag (required)',
|
|
14
|
+
},
|
|
15
|
+
name: {
|
|
16
|
+
control: 'text',
|
|
17
|
+
description: 'Form name (used for selectable)',
|
|
18
|
+
},
|
|
19
|
+
checked: {
|
|
20
|
+
control: 'boolean',
|
|
21
|
+
description: 'Checked state of the tag',
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
control: 'select',
|
|
25
|
+
options: ['s', 'm', 'l'],
|
|
26
|
+
description: 'Size of the tag',
|
|
27
|
+
},
|
|
28
|
+
disabled: {
|
|
29
|
+
control: 'boolean',
|
|
30
|
+
description: 'Disable the tag',
|
|
31
|
+
},
|
|
32
|
+
'update:checked': {
|
|
33
|
+
action: 'update:checked',
|
|
34
|
+
table: { category: 'Events' },
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
const createSelectableTag = (args) => {
|
|
39
|
+
const tag = document.createElement('mc-tag-selectable');
|
|
40
|
+
if (args.label)
|
|
41
|
+
tag.setAttribute('label', args.label);
|
|
42
|
+
if (args.id)
|
|
43
|
+
tag.setAttribute('id', args.id);
|
|
44
|
+
if (args.name)
|
|
45
|
+
tag.setAttribute('name', args.name);
|
|
46
|
+
if (args.size)
|
|
47
|
+
tag.setAttribute('size', args.size);
|
|
48
|
+
if (args.disabled)
|
|
49
|
+
tag.setAttribute('disabled', 'true');
|
|
50
|
+
if (args.checked)
|
|
51
|
+
tag.setAttribute('checked', 'true');
|
|
52
|
+
tag.addEventListener('update:checked', action('update:checked'));
|
|
53
|
+
return tag;
|
|
54
|
+
};
|
|
55
|
+
export const Default = (args) => createSelectableTag(args);
|
|
56
|
+
Default.args = {
|
|
57
|
+
id: 'tag1',
|
|
58
|
+
name: 'filters',
|
|
59
|
+
label: 'Tag label',
|
|
60
|
+
checked: true,
|
|
61
|
+
size: 'm',
|
|
62
|
+
};
|
|
63
|
+
Default.play = async ({ canvasElement }) => {
|
|
64
|
+
const input = canvasElement
|
|
65
|
+
.querySelector('mc-tag-selectable')
|
|
66
|
+
?.shadowRoot?.querySelector('input');
|
|
67
|
+
expect(input?.checked).toBe(true);
|
|
68
|
+
await userEvent.click(input);
|
|
69
|
+
expect(input?.checked).toBe(false);
|
|
70
|
+
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/textarea/Textarea.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Textarea.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/textarea/Textarea.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;wBA2CE,IAAI;AAzCT,wBAyCU;AAmBV,eAAO,MAAM,OAAO,SAAoB,CAAC;AAUzC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAOzC,eAAO,MAAM,QAAQ,SAAoB,CAAC;AAO1C,eAAO,MAAM,QAAQ,SAAoB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { action } from '
|
|
2
|
-
import { userEvent, expect } from '
|
|
1
|
+
import { action } from 'storybook/actions';
|
|
2
|
+
import { userEvent, expect } from 'storybook/test';
|
|
3
3
|
/**
|
|
4
4
|
* A textarea is used for multi-line text input, sharing appearance and states with text inputs.
|
|
5
5
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textinput.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/textinput/Textinput.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Textinput.stories.d.ts","sourceRoot":"","sources":["../../../src/stories/textinput/Textinput.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;wBAmEE,IAAI;AAlET,wBAkEU;AAuBV,eAAO,MAAM,OAAO,SAAoB,CAAC;AA4BzC,eAAO,MAAM,OAAO,SAAoB,CAAC;AAUzC,eAAO,MAAM,QAAQ,SAAoB,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { action } from '
|
|
2
|
-
import { userEvent, expect } from '
|
|
1
|
+
import { action } from 'storybook/actions';
|
|
2
|
+
import { userEvent, expect } from 'storybook/test';
|
|
3
3
|
/**
|
|
4
4
|
* Inputs are used to create input fields with text on a single line. Their states depend on the user interaction or the context.
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { StoryFn, Meta } from '@storybook/html';
|
|
1
|
+
import type { StoryFn, Meta } from '@storybook/html-vite';
|
|
2
2
|
/**
|
|
3
3
|
* A toggle is used to choose between two possibilities and when the user needs instant feedback.
|
|
4
4
|
* It is commonly used to show or hide content and act as an "on/off" switch.
|