@mozaic-ds/web-components 1.0.0-beta.7 → 1.0.0
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 +36 -68
- package/dist/Cross20.js +1 -1
- package/dist/Cross20.js.map +1 -1
- package/dist/Cross24.js +1 -1
- package/dist/CrossCircleFilled24.js +1 -1
- package/dist/attributes.js +1 -1
- package/dist/attributes.js.map +1 -1
- package/dist/bundle.d.ts +24 -23
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +24 -23
- package/dist/components/avatar/Avatar.js +2 -2
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/avatar/Avatar.spec.js +17 -0
- package/dist/components/avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.stories.js +3 -29
- package/dist/components/avatar/Avatar.svelte +2 -0
- package/dist/components/avatar/Avatar.svelte.d.ts +2 -0
- package/dist/components/avatar/Avatar.svelte.d.ts.map +1 -1
- package/dist/components/avatar/README.md +16 -0
- package/dist/components/breadcrumb/Breadcrumb.js +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.spec.js +42 -0
- package/dist/components/breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.stories.js +6 -35
- package/dist/components/breadcrumb/Breadcrumb.svelte +11 -16
- package/dist/components/breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/components/breadcrumb/README.md +11 -0
- package/dist/components/button/Button.js +2 -2
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/Button.spec.js +74 -0
- package/dist/components/button/Button.stories.d.ts +9 -13
- package/dist/components/button/Button.stories.d.ts.map +1 -1
- package/dist/components/button/Button.stories.js +46 -146
- package/dist/components/button/Button.svelte +70 -53
- package/dist/components/button/Button.svelte.d.ts +36 -8
- package/dist/components/button/Button.svelte.d.ts.map +1 -1
- package/dist/components/button/README.md +26 -0
- package/dist/components/callout/Callout.js +1 -1
- package/dist/components/callout/Callout.js.map +1 -1
- package/dist/components/callout/Callout.spec.js +33 -0
- package/dist/components/callout/Callout.stories.d.ts.map +1 -1
- package/dist/components/callout/Callout.stories.js +2 -55
- package/dist/components/callout/Callout.svelte +4 -0
- package/dist/components/callout/Callout.svelte.d.ts +4 -0
- package/dist/components/callout/Callout.svelte.d.ts.map +1 -1
- package/dist/components/callout/README.md +20 -0
- package/dist/components/checkbox/Checkbox.js +3 -3
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox/Checkbox.spec.js +70 -0
- package/dist/components/checkbox/Checkbox.stories.d.ts +11 -16
- package/dist/components/checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.stories.js +67 -124
- package/dist/components/checkbox/Checkbox.svelte +42 -22
- package/dist/components/checkbox/Checkbox.svelte.d.ts +31 -6
- package/dist/components/checkbox/Checkbox.svelte.d.ts.map +1 -1
- package/dist/components/checkbox/README.md +17 -0
- package/dist/components/checkboxgroup/CheckboxGroup.js +3 -3
- package/dist/components/checkboxgroup/CheckboxGroup.js.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.spec.js +113 -0
- package/dist/components/checkboxgroup/CheckboxGroup.stories.d.ts +5 -13
- package/dist/components/checkboxgroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.stories.js +56 -140
- package/dist/components/checkboxgroup/CheckboxGroup.svelte +56 -45
- package/dist/components/checkboxgroup/CheckboxGroup.svelte.d.ts +30 -6
- package/dist/components/checkboxgroup/CheckboxGroup.svelte.d.ts.map +1 -1
- package/dist/components/checkboxgroup/README.md +14 -0
- package/dist/components/circularprogressbar/CircularProgressbar.js +2 -2
- package/dist/components/circularprogressbar/CircularProgressbar.js.map +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.spec.js +74 -0
- package/dist/components/circularprogressbar/CircularProgressbar.stories.d.ts +6 -6
- package/dist/components/circularprogressbar/CircularProgressbar.stories.d.ts.map +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.stories.js +29 -68
- package/dist/components/circularprogressbar/CircularProgressbar.svelte +25 -6
- package/dist/components/circularprogressbar/CircularProgressbar.svelte.d.ts +18 -0
- package/dist/components/circularprogressbar/CircularProgressbar.svelte.d.ts.map +1 -1
- package/dist/components/circularprogressbar/README.md +14 -0
- package/dist/components/datepicker/Datepicker.js +3 -3
- package/dist/components/datepicker/Datepicker.js.map +1 -1
- package/dist/components/datepicker/Datepicker.spec.js +95 -0
- package/dist/components/datepicker/Datepicker.stories.d.ts +7 -6
- package/dist/components/datepicker/Datepicker.stories.d.ts.map +1 -1
- package/dist/components/datepicker/Datepicker.stories.js +58 -75
- package/dist/components/datepicker/Datepicker.svelte +48 -25
- package/dist/components/datepicker/Datepicker.svelte.d.ts +30 -1
- package/dist/components/datepicker/Datepicker.svelte.d.ts.map +1 -1
- package/dist/components/datepicker/README.md +18 -0
- package/dist/components/drawer/Drawer.js +2 -2
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/drawer/Drawer.spec.js +101 -0
- package/dist/components/drawer/Drawer.stories.d.ts +29 -8
- package/dist/components/drawer/Drawer.stories.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.stories.js +86 -87
- package/dist/components/drawer/Drawer.svelte +61 -38
- package/dist/components/drawer/Drawer.svelte.d.ts +26 -3
- package/dist/components/drawer/Drawer.svelte.d.ts.map +1 -1
- package/dist/components/drawer/README.md +29 -0
- package/dist/components/field/Field.js +2 -2
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/field/Field.spec.js +51 -0
- package/dist/components/field/Field.stories.d.ts +9 -15
- package/dist/components/field/Field.stories.d.ts.map +1 -1
- package/dist/components/field/Field.stories.js +86 -142
- package/dist/components/field/Field.svelte +48 -12
- package/dist/components/field/Field.svelte.d.ts +38 -7
- package/dist/components/field/Field.svelte.d.ts.map +1 -1
- package/dist/components/field/README.md +24 -0
- package/dist/components/flag/Flag.js +2 -2
- package/dist/components/flag/Flag.js.map +1 -1
- package/dist/components/flag/Flag.spec.js +30 -0
- package/dist/components/flag/Flag.stories.d.ts +8 -18
- package/dist/components/flag/Flag.stories.d.ts.map +1 -1
- package/dist/components/flag/Flag.stories.js +28 -106
- package/dist/components/flag/Flag.svelte +11 -9
- package/dist/components/flag/Flag.svelte.d.ts +10 -28
- package/dist/components/flag/Flag.svelte.d.ts.map +1 -1
- package/dist/components/flag/README.md +11 -0
- package/dist/components/iconbutton/IconButton.js +2 -2
- package/dist/components/iconbutton/IconButton.js.map +1 -1
- package/dist/components/iconbutton/IconButton.stories.d.ts +11 -11
- package/dist/components/iconbutton/IconButton.stories.d.ts.map +1 -1
- package/dist/components/iconbutton/IconButton.stories.js +51 -67
- package/dist/components/iconbutton/IconButton.svelte +41 -37
- package/dist/components/iconbutton/IconButton.svelte.d.ts +28 -7
- package/dist/components/iconbutton/IconButton.svelte.d.ts.map +1 -1
- package/dist/components/iconbutton/README.md +21 -0
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js +2 -2
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js.map +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.spec.js +28 -0
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.stories.d.ts +5 -7
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.stories.d.ts.map +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.stories.js +18 -49
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte +15 -5
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte.d.ts +10 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte.d.ts.map +1 -1
- package/dist/components/linearprogressbarbuffer/README.md +11 -0
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.js +2 -2
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.js.map +1 -1
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.spec.js +26 -0
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.d.ts +4 -5
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.d.ts.map +1 -1
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.js +15 -33
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte +6 -0
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte.d.ts +6 -0
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte.d.ts.map +1 -1
- package/dist/components/linearprogressbarpercentage/README.md +10 -0
- package/dist/components/link/Link.js +2 -2
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/link/Link.spec.js +51 -0
- package/dist/components/link/Link.stories.d.ts +12 -12
- package/dist/components/link/Link.stories.d.ts.map +1 -1
- package/dist/components/link/Link.stories.js +61 -74
- package/dist/components/link/Link.svelte +45 -40
- package/dist/components/link/Link.svelte.d.ts +29 -8
- package/dist/components/link/Link.svelte.d.ts.map +1 -1
- package/dist/components/link/README.md +23 -0
- package/dist/components/loader/Loader.js +2 -2
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/loader/Loader.spec.js +54 -0
- package/dist/components/loader/Loader.stories.d.ts +8 -10
- package/dist/components/loader/Loader.stories.d.ts.map +1 -1
- package/dist/components/loader/Loader.stories.js +27 -43
- package/dist/components/loader/Loader.svelte +31 -31
- package/dist/components/loader/Loader.svelte.d.ts +14 -3
- package/dist/components/loader/Loader.svelte.d.ts.map +1 -1
- package/dist/components/loader/README.md +12 -0
- package/dist/components/loadingoverlay/LoadingOverlay.js +4 -0
- package/dist/components/loadingoverlay/LoadingOverlay.js.map +1 -0
- package/dist/components/loadingoverlay/LoadingOverlay.spec.js +38 -0
- package/dist/components/loadingoverlay/LoadingOverlay.stories.d.ts +7 -0
- package/dist/components/loadingoverlay/LoadingOverlay.stories.d.ts.map +1 -0
- package/dist/components/loadingoverlay/LoadingOverlay.stories.js +39 -0
- package/dist/components/loadingoverlay/LoadingOverlay.svelte +50 -0
- package/dist/components/loadingoverlay/LoadingOverlay.svelte.d.ts +17 -0
- package/dist/components/loadingoverlay/LoadingOverlay.svelte.d.ts.map +1 -0
- package/dist/components/loadingoverlay/README.md +11 -0
- package/dist/components/modal/Modal.js +2 -2
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/Modal.spec.js +50 -0
- package/dist/components/modal/Modal.stories.d.ts +36 -9
- package/dist/components/modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/modal/Modal.stories.js +54 -83
- package/dist/components/modal/Modal.svelte +42 -41
- package/dist/components/modal/Modal.svelte.d.ts +22 -5
- package/dist/components/modal/Modal.svelte.d.ts.map +1 -1
- package/dist/components/modal/README.md +28 -0
- package/dist/components/numberbadge/NumberBadge.js +2 -2
- package/dist/components/numberbadge/NumberBadge.js.map +1 -1
- package/dist/components/numberbadge/NumberBadge.spec.js +28 -0
- package/dist/components/numberbadge/NumberBadge.stories.d.ts +9 -13
- package/dist/components/numberbadge/NumberBadge.stories.d.ts.map +1 -1
- package/dist/components/numberbadge/NumberBadge.stories.js +28 -56
- package/dist/components/numberbadge/NumberBadge.svelte +24 -20
- package/dist/components/numberbadge/NumberBadge.svelte.d.ts +15 -4
- package/dist/components/numberbadge/NumberBadge.svelte.d.ts.map +1 -1
- package/dist/components/numberbadge/README.md +12 -0
- package/dist/components/overlay/Overlay.js +2 -2
- package/dist/components/overlay/Overlay.js.map +1 -1
- package/dist/components/overlay/Overlay.spec.js +29 -0
- package/dist/components/overlay/Overlay.stories.d.ts +5 -7
- package/dist/components/overlay/Overlay.stories.d.ts.map +1 -1
- package/dist/components/overlay/Overlay.stories.js +32 -40
- package/dist/components/overlay/Overlay.svelte +14 -4
- package/dist/components/overlay/Overlay.svelte.d.ts +11 -0
- package/dist/components/overlay/Overlay.svelte.d.ts.map +1 -1
- package/dist/components/overlay/README.md +17 -0
- package/dist/components/pagination/Pagination.js +6 -6
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/Pagination.spec.js +65 -0
- package/dist/components/pagination/Pagination.stories.d.ts +8 -11
- package/dist/components/pagination/Pagination.stories.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.stories.js +37 -91
- package/dist/components/pagination/Pagination.svelte +33 -12
- package/dist/components/pagination/Pagination.svelte.d.ts +27 -4
- package/dist/components/pagination/Pagination.svelte.d.ts.map +1 -1
- package/dist/components/pagination/README.md +16 -0
- package/dist/components/passwordinput/PasswordInput.js +3 -4
- package/dist/components/passwordinput/PasswordInput.js.map +1 -1
- package/dist/components/passwordinput/PasswordInput.spec.js +84 -0
- package/dist/components/passwordinput/PasswordInput.stories.d.ts +10 -13
- package/dist/components/passwordinput/PasswordInput.stories.d.ts.map +1 -1
- package/dist/components/passwordinput/PasswordInput.stories.js +67 -124
- package/dist/components/passwordinput/PasswordInput.svelte +387 -24
- package/dist/components/passwordinput/PasswordInput.svelte.d.ts +34 -2
- package/dist/components/passwordinput/PasswordInput.svelte.d.ts.map +1 -1
- package/dist/components/passwordinput/README.md +19 -0
- package/dist/components/pincode/Pincode.js +2 -2
- package/dist/components/pincode/Pincode.js.map +1 -1
- package/dist/components/pincode/Pincode.spec.js +99 -0
- package/dist/components/pincode/Pincode.stories.d.ts +9 -13
- package/dist/components/pincode/Pincode.stories.d.ts.map +1 -1
- package/dist/components/pincode/Pincode.stories.js +62 -127
- package/dist/components/pincode/Pincode.svelte +56 -41
- package/dist/components/pincode/Pincode.svelte.d.ts +30 -24
- package/dist/components/pincode/Pincode.svelte.d.ts.map +1 -1
- package/dist/components/pincode/README.md +22 -0
- package/dist/components/quantityselector/QuantitySelector.js +2 -2
- package/dist/components/quantityselector/QuantitySelector.js.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.spec.js +104 -0
- package/dist/components/quantityselector/QuantitySelector.stories.d.ts +11 -15
- package/dist/components/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.stories.js +77 -145
- package/dist/components/quantityselector/QuantitySelector.svelte +100 -77
- package/dist/components/quantityselector/QuantitySelector.svelte.d.ts +49 -17
- package/dist/components/quantityselector/QuantitySelector.svelte.d.ts.map +1 -1
- package/dist/components/quantityselector/README.md +21 -0
- package/dist/components/radio/README.md +15 -0
- package/dist/components/radio/Radio.js +2 -2
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio/Radio.spec.js +60 -0
- package/dist/components/radio/Radio.stories.d.ts +9 -13
- package/dist/components/radio/Radio.stories.d.ts.map +1 -1
- package/dist/components/radio/Radio.stories.js +54 -70
- package/dist/components/radio/Radio.svelte +42 -20
- package/dist/components/radio/Radio.svelte.d.ts +27 -5
- package/dist/components/radio/Radio.svelte.d.ts.map +1 -1
- package/dist/components/radiogroup/README.md +14 -0
- package/dist/components/radiogroup/RadioGroup.js +3 -3
- package/dist/components/radiogroup/RadioGroup.js.map +1 -1
- package/dist/components/radiogroup/RadioGroup.spec.js +65 -0
- package/dist/components/radiogroup/RadioGroup.stories.d.ts +5 -12
- package/dist/components/radiogroup/RadioGroup.stories.d.ts.map +1 -1
- package/dist/components/radiogroup/RadioGroup.stories.js +56 -151
- package/dist/components/radiogroup/RadioGroup.svelte +50 -43
- package/dist/components/radiogroup/RadioGroup.svelte.d.ts +28 -9
- package/dist/components/radiogroup/RadioGroup.svelte.d.ts.map +1 -1
- package/dist/components/select/README.md +18 -0
- package/dist/components/select/Select.js +2 -2
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.spec.js +76 -0
- package/dist/components/select/Select.stories.d.ts +10 -14
- package/dist/components/select/Select.stories.d.ts.map +1 -1
- package/dist/components/select/Select.stories.js +87 -92
- package/dist/components/select/Select.svelte +57 -44
- package/dist/components/select/Select.svelte.d.ts +41 -10
- package/dist/components/select/Select.svelte.d.ts.map +1 -1
- package/dist/components/statusbadge/README.md +11 -0
- package/dist/components/statusbadge/StatusBadge.js +2 -2
- package/dist/components/statusbadge/StatusBadge.js.map +1 -1
- package/dist/components/statusbadge/StatusBadge.spec.js +31 -0
- package/dist/components/statusbadge/StatusBadge.stories.d.ts +9 -12
- package/dist/components/statusbadge/StatusBadge.stories.d.ts.map +1 -1
- package/dist/components/statusbadge/StatusBadge.stories.js +21 -44
- package/dist/components/statusbadge/StatusBadge.svelte +14 -6
- package/dist/components/statusbadge/StatusBadge.svelte.d.ts +13 -28
- package/dist/components/statusbadge/StatusBadge.svelte.d.ts.map +1 -1
- package/dist/components/statusdot/README.md +11 -0
- package/dist/components/statusdot/StatusDot.js +2 -2
- package/dist/components/statusdot/StatusDot.js.map +1 -1
- package/dist/components/statusdot/StatusDot.spec.js +42 -0
- package/dist/components/statusdot/StatusDot.stories.d.ts.map +1 -1
- package/dist/components/statusdot/StatusDot.stories.js +9 -37
- package/dist/components/statusdot/StatusDot.svelte +9 -7
- package/dist/components/statusdot/StatusDot.svelte.d.ts +2 -2
- package/dist/components/statusdot/StatusDot.svelte.d.ts.map +1 -1
- package/dist/components/statusnotification/README.md +25 -0
- package/dist/components/statusnotification/StatusNotification.js +3 -3
- package/dist/components/statusnotification/StatusNotification.js.map +1 -1
- package/dist/components/statusnotification/StatusNotification.spec.js +54 -0
- package/dist/components/statusnotification/StatusNotification.stories.d.ts +16 -14
- package/dist/components/statusnotification/StatusNotification.stories.d.ts.map +1 -1
- package/dist/components/statusnotification/StatusNotification.stories.js +53 -86
- package/dist/components/statusnotification/StatusNotification.svelte +49 -51
- package/dist/components/statusnotification/StatusNotification.svelte.d.ts +21 -18
- package/dist/components/statusnotification/StatusNotification.svelte.d.ts.map +1 -1
- package/dist/components/tab/README.md +20 -0
- package/dist/components/tab/Tab.js +4 -0
- package/dist/components/tab/Tab.js.map +1 -0
- package/dist/components/tab/Tab.spec.js +58 -0
- package/dist/components/{tabs → tab}/Tab.svelte +46 -26
- package/dist/components/{tabs → tab}/Tab.svelte.d.ts +20 -3
- package/dist/components/tab/Tab.svelte.d.ts.map +1 -0
- package/dist/components/tabs/README.md +18 -0
- package/dist/components/tabs/Tabs.js +2 -2
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tabs/Tabs.spec.js +51 -0
- package/dist/components/tabs/Tabs.stories.d.ts +9 -6
- package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.stories.js +59 -115
- package/dist/components/tabs/Tabs.svelte +27 -7
- package/dist/components/tabs/Tabs.svelte.d.ts +21 -7
- package/dist/components/tabs/Tabs.svelte.d.ts.map +1 -1
- package/dist/components/tags/README.md +9 -0
- package/dist/components/tags/Tag.js +1 -1
- package/dist/components/tags/TagContextualised.js +2 -2
- package/dist/components/tags/TagInteractive.js +1 -1
- package/dist/components/tags/TagRemovable.js +2 -2
- package/dist/components/tags/TagSelectable.js +2 -2
- package/dist/components/tags/Tags.stories.d.ts.map +1 -1
- package/dist/components/tags/Tags.stories.js +7 -1
- package/dist/components/tags/TagsContextualised.stories.d.ts.map +1 -1
- package/dist/components/tags/TagsContextualised.stories.js +7 -1
- package/dist/components/tags/TagsInteractive.stories.d.ts.map +1 -1
- package/dist/components/tags/TagsInteractive.stories.js +7 -1
- package/dist/components/tags/TagsRemovable.stories.d.ts.map +1 -1
- package/dist/components/tags/TagsRemovable.stories.js +7 -1
- package/dist/components/tags/TagsSelectable.stories.d.ts.map +1 -1
- package/dist/components/tags/TagsSelectable.stories.js +7 -1
- package/dist/components/textarea/README.md +19 -0
- package/dist/components/textarea/Textarea.js +2 -5
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/Textarea.spec.js +67 -0
- package/dist/components/textarea/Textarea.stories.d.ts +9 -13
- package/dist/components/textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.stories.js +61 -92
- package/dist/components/textarea/Textarea.svelte +53 -97
- package/dist/components/textarea/Textarea.svelte.d.ts +43 -13
- package/dist/components/textarea/Textarea.svelte.d.ts.map +1 -1
- package/dist/components/textinput/README.md +26 -0
- package/dist/components/textinput/Textinput.js +2 -2
- package/dist/components/textinput/Textinput.js.map +1 -1
- package/dist/components/textinput/Textinput.spec.js +89 -0
- package/dist/components/textinput/Textinput.stories.d.ts +11 -12
- package/dist/components/textinput/Textinput.stories.d.ts.map +1 -1
- package/dist/components/textinput/Textinput.stories.js +78 -137
- package/dist/components/textinput/Textinput.svelte +70 -112
- package/dist/components/textinput/Textinput.svelte.d.ts +46 -22
- package/dist/components/textinput/Textinput.svelte.d.ts.map +1 -1
- package/dist/components/toaster/README.md +28 -0
- package/dist/components/toaster/Toaster.js +2 -2
- package/dist/components/toaster/Toaster.js.map +1 -1
- package/dist/components/toaster/Toaster.spec.js +100 -0
- package/dist/components/toaster/Toaster.stories.d.ts.map +1 -1
- package/dist/components/toaster/Toaster.stories.js +5 -73
- package/dist/components/toaster/Toaster.svelte +17 -7
- package/dist/components/toaster/Toaster.svelte.d.ts +3 -0
- package/dist/components/toaster/Toaster.svelte.d.ts.map +1 -1
- package/dist/components/toggle/README.md +15 -0
- package/dist/components/toggle/Toggle.js +2 -2
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components/toggle/Toggle.spec.js +69 -0
- package/dist/components/toggle/Toggle.stories.d.ts +9 -14
- package/dist/components/toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/toggle/Toggle.stories.js +55 -64
- package/dist/components/toggle/Toggle.svelte +38 -24
- package/dist/components/toggle/Toggle.svelte.d.ts +26 -7
- package/dist/components/toggle/Toggle.svelte.d.ts.map +1 -1
- package/dist/components/togglegroup/README.md +13 -0
- package/dist/components/togglegroup/ToggleGroup.js +3 -3
- package/dist/components/togglegroup/ToggleGroup.js.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.spec.js +50 -0
- package/dist/components/togglegroup/ToggleGroup.stories.d.ts +5 -13
- package/dist/components/togglegroup/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.stories.js +56 -104
- package/dist/components/togglegroup/ToggleGroup.svelte +55 -58
- package/dist/components/togglegroup/ToggleGroup.svelte.d.ts +25 -14
- package/dist/components/togglegroup/ToggleGroup.svelte.d.ts.map +1 -1
- package/dist/components/tooltip/README.md +19 -0
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/tooltip/Tooltip.spec.js +38 -0
- package/dist/components/tooltip/Tooltip.stories.d.ts +6 -7
- package/dist/components/tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.js +45 -59
- package/dist/components/tooltip/Tooltip.svelte +23 -14
- package/dist/components/tooltip/Tooltip.svelte.d.ts +17 -0
- package/dist/components/tooltip/Tooltip.svelte.d.ts.map +1 -1
- package/dist/custom-element.js +3 -3
- package/dist/custom-element.js.map +1 -1
- package/dist/documentation/Contributing.mdx +1 -1
- package/dist/documentation/Introduction.mdx +45 -11
- package/dist/documentation/SupportAndOnboarding.mdx +2 -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/main.d.ts +24 -23
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +24 -23
- package/dist/slot.js +1 -1
- package/dist/slot.js.map +1 -1
- package/dist/this.js +2 -0
- package/dist/this.js.map +1 -0
- package/package.json +11 -3
- package/dist/components/button/button.types.d.ts +0 -13
- package/dist/components/button/button.types.d.ts.map +0 -1
- package/dist/components/button/button.types.js +0 -1
- package/dist/components/checkboxgroup/checkboxgroup.types.d.ts +0 -9
- package/dist/components/checkboxgroup/checkboxgroup.types.d.ts.map +0 -1
- package/dist/components/checkboxgroup/checkboxgroup.types.js +0 -1
- package/dist/components/link/link.types.d.ts +0 -4
- package/dist/components/link/link.types.d.ts.map +0 -1
- package/dist/components/link/link.types.js +0 -1
- package/dist/components/loader/loader.types.d.ts +0 -3
- package/dist/components/loader/loader.types.d.ts.map +0 -1
- package/dist/components/loader/loader.types.js +0 -1
- package/dist/components/numberbadge/NumberBadge.types.d.ts +0 -3
- package/dist/components/numberbadge/NumberBadge.types.d.ts.map +0 -1
- package/dist/components/numberbadge/NumberBadge.types.js +0 -1
- package/dist/components/overlayloader/OverlayLoader.js +0 -27
- package/dist/components/overlayloader/OverlayLoader.js.map +0 -1
- package/dist/components/overlayloader/OverlayLoader.stories.d.ts +0 -8
- package/dist/components/overlayloader/OverlayLoader.stories.d.ts.map +0 -1
- package/dist/components/overlayloader/OverlayLoader.stories.js +0 -50
- package/dist/components/overlayloader/OverlayLoader.svelte +0 -160
- package/dist/components/overlayloader/OverlayLoader.svelte.d.ts +0 -9
- package/dist/components/overlayloader/OverlayLoader.svelte.d.ts.map +0 -1
- package/dist/components/quantityselector/quantitySelector.types.d.ts +0 -2
- package/dist/components/quantityselector/quantitySelector.types.d.ts.map +0 -1
- package/dist/components/quantityselector/quantitySelector.types.js +0 -1
- package/dist/components/radiogroup/radioGroup.types.d.ts +0 -9
- package/dist/components/radiogroup/radioGroup.types.d.ts.map +0 -1
- package/dist/components/radiogroup/radioGroup.types.js +0 -1
- package/dist/components/select/select.types.d.ts +0 -9
- package/dist/components/select/select.types.d.ts.map +0 -1
- package/dist/components/select/select.types.js +0 -1
- package/dist/components/statusbadge/StatusBadge.types.d.ts +0 -2
- package/dist/components/statusbadge/StatusBadge.types.d.ts.map +0 -1
- package/dist/components/statusbadge/StatusBadge.types.js +0 -1
- package/dist/components/statusdot/StatusDot.types.d.ts +0 -3
- package/dist/components/statusdot/StatusDot.types.d.ts.map +0 -1
- package/dist/components/statusdot/StatusDot.types.js +0 -1
- package/dist/components/tabs/Tab.js +0 -4
- package/dist/components/tabs/Tab.js.map +0 -1
- package/dist/components/tabs/Tab.svelte.d.ts.map +0 -1
- package/dist/components/textinput/textinput.types.d.ts +0 -3
- package/dist/components/textinput/textinput.types.d.ts.map +0 -1
- package/dist/components/textinput/textinput.types.js +0 -1
- package/dist/components/toggle/toggle.types.d.ts +0 -2
- package/dist/components/toggle/toggle.types.d.ts.map +0 -1
- package/dist/components/toggle/toggle.types.js +0 -1
- package/dist/index-client.js +0 -2
- package/dist/index-client.js.map +0 -1
- package/dist/snippet.js +0 -2
- package/dist/snippet.js.map +0 -1
|
@@ -1,61 +1,30 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
const meta = {
|
|
3
4
|
title: 'Indicators/Linear Progress Bar (Buffer)',
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: 50,
|
|
7
|
-
size: 'm',
|
|
8
|
-
},
|
|
5
|
+
component: 'm-linear-progressbar-buffer',
|
|
6
|
+
tags: ['v2'],
|
|
9
7
|
argTypes: {
|
|
10
8
|
value: {
|
|
11
|
-
control: { type: 'range', min: 0, max: 100
|
|
12
|
-
description: 'Current progress value (0–100)',
|
|
9
|
+
control: { type: 'range', min: 0, max: 100 },
|
|
13
10
|
},
|
|
14
11
|
size: {
|
|
15
|
-
control: '
|
|
12
|
+
control: 'radio',
|
|
16
13
|
options: ['s', 'm', 'l'],
|
|
17
14
|
},
|
|
18
15
|
},
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
const el = document.createElement('m-linear-progressbar-buffer');
|
|
22
|
-
el.setAttribute('value', args.value.toString());
|
|
23
|
-
if (args.size && args.size !== 'm')
|
|
24
|
-
el.setAttribute('size', args.size);
|
|
25
|
-
return el;
|
|
26
|
-
};
|
|
27
|
-
export const Default = {
|
|
28
|
-
render: Template,
|
|
29
|
-
play: async ({ canvasElement }) => {
|
|
30
|
-
const el = canvasElement.querySelector('m-linear-progressbar-buffer');
|
|
31
|
-
const indicator = el?.shadowRoot?.querySelector('.mc-linear-progressbar-buffer__indicator') || el?.querySelector('.mc-linear-progressbar-buffer__indicator');
|
|
32
|
-
await waitFor(() => {
|
|
33
|
-
expect(indicator).toHaveAttribute('aria-valuenow', '50');
|
|
34
|
-
});
|
|
35
|
-
},
|
|
36
|
-
};
|
|
37
|
-
export const Full = {
|
|
38
|
-
args: { value: 100 },
|
|
39
|
-
render: Template,
|
|
40
|
-
play: async ({ canvasElement }) => {
|
|
41
|
-
const el = canvasElement.querySelector('m-linear-progressbar-buffer');
|
|
42
|
-
const indicator = el?.shadowRoot?.querySelector('.mc-linear-progressbar-buffer__indicator') || el?.querySelector('.mc-linear-progressbar-buffer__indicator');
|
|
43
|
-
expect(indicator).toHaveAttribute('aria-valuenow', '100');
|
|
16
|
+
args: {
|
|
17
|
+
value: 40,
|
|
44
18
|
},
|
|
19
|
+
render: (args) => html `
|
|
20
|
+
<m-linear-progressbar-buffer
|
|
21
|
+
size=${ifDefined(args.size)}
|
|
22
|
+
value=${ifDefined(args.value)}
|
|
23
|
+
></m-linear-progressbar-buffer>
|
|
24
|
+
`,
|
|
45
25
|
};
|
|
46
|
-
export
|
|
26
|
+
export default meta;
|
|
27
|
+
export const Standard = {};
|
|
28
|
+
export const Size = {
|
|
47
29
|
args: { size: 's' },
|
|
48
|
-
render: Template,
|
|
49
|
-
play: async ({ canvasElement }) => {
|
|
50
|
-
const el = canvasElement.querySelector('m-linear-progressbar-buffer');
|
|
51
|
-
expect(el).toHaveAttribute('size', 's');
|
|
52
|
-
},
|
|
53
|
-
};
|
|
54
|
-
export const Large = {
|
|
55
|
-
args: { size: 'l' },
|
|
56
|
-
render: Template,
|
|
57
|
-
play: async ({ canvasElement }) => {
|
|
58
|
-
const el = canvasElement.querySelector('m-linear-progressbar-buffer');
|
|
59
|
-
expect(el).toHaveAttribute('size', 'l');
|
|
60
|
-
},
|
|
61
30
|
};
|
|
@@ -1,18 +1,28 @@
|
|
|
1
1
|
<svelte:options customElement={{ tag: 'm-linear-progressbar-buffer' }} />
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
|
+
/**
|
|
5
|
+
* A linear progress bar (Buffer) visually represents the progress of a task along a horizontal track, often indicating both current progress and a secondary buffered state. This type of progress bar is commonly used for loading processes, file uploads, or streaming indicators, where part of the task is completed while another portion is preloaded or buffered. It provides users with real-time feedback on task advancement.
|
|
6
|
+
*/
|
|
4
7
|
interface Props {
|
|
5
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Allows to define the progress bar size.
|
|
10
|
+
*/
|
|
6
11
|
size?: 's' | 'm' | 'l';
|
|
12
|
+
/**
|
|
13
|
+
* The current value of the progress bar.
|
|
14
|
+
*/
|
|
15
|
+
value?: number;
|
|
7
16
|
}
|
|
8
17
|
|
|
9
18
|
let { value = 0, size = 'm' }: Props = $props();
|
|
10
19
|
</script>
|
|
11
20
|
|
|
12
21
|
<div
|
|
13
|
-
class=
|
|
14
|
-
|
|
15
|
-
|
|
22
|
+
class={[
|
|
23
|
+
'mc-linear-progressbar-buffer',
|
|
24
|
+
`mc-linear-progressbar-buffer--${size}`,
|
|
25
|
+
]}
|
|
16
26
|
>
|
|
17
27
|
<div
|
|
18
28
|
class="mc-linear-progressbar-buffer__indicator"
|
|
@@ -21,7 +31,7 @@
|
|
|
21
31
|
aria-valuenow={value}
|
|
22
32
|
aria-valuemin="0"
|
|
23
33
|
aria-valuemax="100"
|
|
24
|
-
|
|
34
|
+
></div>
|
|
25
35
|
</div>
|
|
26
36
|
|
|
27
37
|
<style>/**
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A linear progress bar (Buffer) visually represents the progress of a task along a horizontal track, often indicating both current progress and a secondary buffered state. This type of progress bar is commonly used for loading processes, file uploads, or streaming indicators, where part of the task is completed while another portion is preloaded or buffered. It provides users with real-time feedback on task advancement.
|
|
3
|
+
*/
|
|
1
4
|
interface Props {
|
|
2
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Allows to define the progress bar size.
|
|
7
|
+
*/
|
|
3
8
|
size?: 's' | 'm' | 'l';
|
|
9
|
+
/**
|
|
10
|
+
* The current value of the progress bar.
|
|
11
|
+
*/
|
|
12
|
+
value?: number;
|
|
4
13
|
}
|
|
5
14
|
declare const LinearProgressbarBuffer: import("svelte").Component<Props, {}, "">;
|
|
6
15
|
type LinearProgressbarBuffer = ReturnType<typeof LinearProgressbarBuffer>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearProgressbarBuffer.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte.ts"],"names":[],"mappings":"AAGE,UAAU,KAAK;IACb
|
|
1
|
+
{"version":3,"file":"LinearProgressbarBuffer.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte.ts"],"names":[],"mappings":"AAGE;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAoBH,QAAA,MAAM,uBAAuB,2CAAwC,CAAC;AACtE,KAAK,uBAAuB,GAAG,UAAU,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAC1E,eAAe,uBAAuB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# `m-linear-progressbar-buffer`
|
|
2
|
+
|
|
3
|
+
A linear progress bar (Buffer) visually represents the progress of a task along a horizontal track, often indicating both current progress and a secondary buffered state. This type of progress bar is commonly used for loading processes, file uploads, or streaming indicators, where part of the task is completed while another portion is preloaded or buffered. It provides users with real-time feedback on task advancement.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Description | Type | Default |
|
|
8
|
+
|------|-------------|------|---------|
|
|
9
|
+
| `size` | Allows to define the progress bar size. | `'s'` `'m'` `'l'` | `m` |
|
|
10
|
+
| `value` | The current value of the progress bar. | `number` | `0` |
|
|
11
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as d,p as g,a as b,b as m,f as u,t as f,
|
|
1
|
+
import{c as d,p as g,a as b,b as m,f as u,t as f,i as h,j as _,k,d as a,N as x,r as t,h as w}from"../../custom-element.js";import{a as y,s as z}from"../../attributes.js";var j=u('<div class="mc-linear-progressbar-percentage svelte-kh7ttv"><div class="mc-linear-progressbar-percentage__indicator svelte-kh7ttv" role="progressbar" aria-valuemin="0" aria-valuemax="100"><div class="mc-linear-progressbar-percentage__label svelte-kh7ttv"><p class="mc-linear-progressbar-percentage__value svelte-kh7ttv"> <span class="mc-linear-progressbar-percentage__unit svelte-kh7ttv">%</span></p></div></div></div>');const L={hash:"svelte-kh7ttv",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-linear-progressbar-percentage.svelte-kh7ttv {--progress-value: 40;font-family:var(--font-family, LeroyMerlin), sans-serif;background-color:var(--progressbar-color-background, #c9d0de);height:1.5rem;position:relative;min-width:6rem;border-radius:var(--radius-l, 1rem);box-sizing:border-box;}.mc-linear-progressbar-percentage__indicator.svelte-kh7ttv {border-radius:var(--radius-l, 1rem);background-color:var(--progressbar-color-indicator, #464e63);min-width:40px;height:100%;top:0;left:0;position:absolute;transition:width 0.4s ease;overflow:hidden;display:flex;justify-content:flex-end;width:calc(40px + var(--progress-value) * (100% - 40px) / 100);}.mc-linear-progressbar-percentage__label.svelte-kh7ttv {box-sizing:border-box;border-radius:var(--radius-l, 1rem);background-color:var(--progressbar-badge-color-background, #ffffff);color:var(--progressbar-badge-color-text, #171b26);height:1.5rem;width:2.5rem;border:0.125rem solid var(--progressbar-color-indicator, #464e63);display:flex;align-items:center;justify-content:center;}.mc-linear-progressbar-percentage__value.svelte-kh7ttv {font-size:var(--font-size-50, 0.75rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;}.mc-linear-progressbar-percentage__unit.svelte-kh7ttv {font-size:var(--font-size-25, 0.625rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;position:relative;bottom:1px;}`};function
|
|
3
|
+
*/.mc-linear-progressbar-percentage.svelte-kh7ttv {--progress-value: 40;font-family:var(--font-family, LeroyMerlin), sans-serif;background-color:var(--progressbar-color-background, #c9d0de);height:1.5rem;position:relative;min-width:6rem;border-radius:var(--radius-l, 1rem);box-sizing:border-box;}.mc-linear-progressbar-percentage__indicator.svelte-kh7ttv {border-radius:var(--radius-l, 1rem);background-color:var(--progressbar-color-indicator, #464e63);min-width:40px;height:100%;top:0;left:0;position:absolute;transition:width 0.4s ease;overflow:hidden;display:flex;justify-content:flex-end;width:calc(40px + var(--progress-value) * (100% - 40px) / 100);}.mc-linear-progressbar-percentage__label.svelte-kh7ttv {box-sizing:border-box;border-radius:var(--radius-l, 1rem);background-color:var(--progressbar-badge-color-background, #ffffff);color:var(--progressbar-badge-color-text, #171b26);height:1.5rem;width:2.5rem;border:0.125rem solid var(--progressbar-color-indicator, #464e63);display:flex;align-items:center;justify-content:center;}.mc-linear-progressbar-percentage__value.svelte-kh7ttv {font-size:var(--font-size-50, 0.75rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;}.mc-linear-progressbar-percentage__unit.svelte-kh7ttv {font-size:var(--font-size-25, 0.625rem);font-weight:var(--font-weight-semi-bold, 600);margin:0;position:relative;bottom:1px;}`};function P(o,i){g(i,!0),b(o,L);let e=m(i,"value",7,0);var v={get value(){return e()},set value(p=0){e(p),k()}},s=j(),r=a(s),l=a(r),n=a(l),c=a(n);return x(),t(n),t(l),t(r),t(s),f(()=>{y(r,`--progress-value: ${e()};`),z(r,"aria-valuenow",e()),w(c,`${e()??""} `)}),h(o,s),_(v)}customElements.define("m-linear-progressbar-percentage",d(P,{value:{}},[],[],!0));
|
|
4
4
|
//# sourceMappingURL=LinearProgressbarPercentage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearProgressbarPercentage.js","sources":["../../../src/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-linear-progressbar-percentage' }} />\n\n<script lang=\"ts\">\n interface Props {\n value?: number;\n }\n\n let { value = 0 }: Props = $props();\n</script>\n\n<div class=\"mc-linear-progressbar-percentage\">\n <div\n class=\"mc-linear-progressbar-percentage__indicator\"\n role=\"progressbar\"\n style={`--progress-value: ${value};`}\n aria-valuenow={value}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <div class=\"mc-linear-progressbar-percentage__label\">\n <p class=\"mc-linear-progressbar-percentage__value\">\n {value}\n <span class=\"mc-linear-progressbar-percentage__unit\">%</span>\n </p>\n </div>\n </div>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/linear-progressbar-percentage';\n</style>\n"],"names":["value"],"mappings":";;42CAAA,
|
|
1
|
+
{"version":3,"file":"LinearProgressbarPercentage.js","sources":["../../../src/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-linear-progressbar-percentage' }} />\n\n<script lang=\"ts\">\n /**\n * A linear progress bar (Percentage) visually represents the completion of a task along a horizontal track, displaying the exact progress in percentage within the bar. It is commonly used for file uploads, installations, form completion, or any process requiring user awareness of progress. The percentage label provides clear and immediate feedback, helping users track progress with precision.\n */\n interface Props {\n /**\n * The current value of the progress bar.\n */\n value?: number;\n }\n\n let { value = 0 }: Props = $props();\n</script>\n\n<div class=\"mc-linear-progressbar-percentage\">\n <div\n class=\"mc-linear-progressbar-percentage__indicator\"\n role=\"progressbar\"\n style={`--progress-value: ${value};`}\n aria-valuenow={value}\n aria-valuemin=\"0\"\n aria-valuemax=\"100\"\n >\n <div class=\"mc-linear-progressbar-percentage__label\">\n <p class=\"mc-linear-progressbar-percentage__value\">\n {value}\n <span class=\"mc-linear-progressbar-percentage__unit\">%</span>\n </p>\n </div>\n </div>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/linear-progressbar-percentage';\n</style>\n"],"names":["value"],"mappings":";;42CAAA,gBAaQ,IAAAA,gBAAQ,CAAC,6CAAD,EAAC,6GAOeA,EAAK,CAAA,GAAA,sBAClBA,GAAK,SAMfA,EAAK,GAAA,EAAA,GAAA,eAbd"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/svelte';
|
|
3
|
+
import LinearProgressbarPercentage from './LinearProgressbarPercentage.svelte';
|
|
4
|
+
describe('m-linear-progressbar-percentage component', () => {
|
|
5
|
+
it('renders with default value 0', () => {
|
|
6
|
+
const { container, getByText } = render(LinearProgressbarPercentage);
|
|
7
|
+
const wrapper = container.querySelector('.mc-linear-progressbar-percentage');
|
|
8
|
+
expect(wrapper).toBeTruthy();
|
|
9
|
+
const indicator = container.querySelector('.mc-linear-progressbar-percentage__indicator');
|
|
10
|
+
expect(indicator).toBeTruthy();
|
|
11
|
+
expect(indicator.style.getPropertyValue('--progress-value')).toBe('0');
|
|
12
|
+
expect(indicator.getAttribute('aria-valuenow')).toBe('0');
|
|
13
|
+
expect(getByText('0')).toBeTruthy();
|
|
14
|
+
expect(getByText('%')).toBeTruthy();
|
|
15
|
+
});
|
|
16
|
+
it('renders with a custom value and displays it', () => {
|
|
17
|
+
const value = 42;
|
|
18
|
+
const { container, getByText } = render(LinearProgressbarPercentage, {
|
|
19
|
+
props: { value },
|
|
20
|
+
});
|
|
21
|
+
const indicator = container.querySelector('.mc-linear-progressbar-percentage__indicator');
|
|
22
|
+
expect(indicator.style.getPropertyValue('--progress-value')).toBe(String(value));
|
|
23
|
+
expect(indicator.getAttribute('aria-valuenow')).toBe(String(value));
|
|
24
|
+
expect(getByText(`${value}`)).toBeTruthy();
|
|
25
|
+
});
|
|
26
|
+
});
|
package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.d.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from '@storybook/
|
|
2
|
-
declare const
|
|
3
|
-
export default
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
4
|
type Story = StoryObj;
|
|
5
|
-
export declare const
|
|
6
|
-
export declare const Full: Story;
|
|
5
|
+
export declare const Standard: Story;
|
|
7
6
|
//# sourceMappingURL=LinearProgressbarPercentage.stories.d.ts.map
|
package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearProgressbarPercentage.stories.d.ts","sourceRoot":"","sources":["../../../src/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"LinearProgressbarPercentage.stories.d.ts","sourceRoot":"","sources":["../../../src/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,QAAA,MAAM,IAAI,EAAE,IAiBX,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC"}
|
|
@@ -1,40 +1,22 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
const meta = {
|
|
3
4
|
title: 'Indicators/Linear Progress Bar (Percentage)',
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
value: 42,
|
|
7
|
-
},
|
|
5
|
+
component: 'm-linear-progressbar-percentage',
|
|
6
|
+
tags: ['v2'],
|
|
8
7
|
argTypes: {
|
|
9
8
|
value: {
|
|
10
|
-
control: { type: 'range', min: 0, max: 100
|
|
11
|
-
description: 'Current progress value (0–100)',
|
|
9
|
+
control: { type: 'range', min: 0, max: 100 },
|
|
12
10
|
},
|
|
13
11
|
},
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const el = document.createElement('m-linear-progressbar-percentage');
|
|
17
|
-
el.setAttribute('value', args.value.toString());
|
|
18
|
-
return el;
|
|
19
|
-
};
|
|
20
|
-
export const Default = {
|
|
21
|
-
render: Template,
|
|
22
|
-
play: async ({ canvasElement }) => {
|
|
23
|
-
const el = canvasElement.querySelector('m-linear-progressbar-percentage');
|
|
24
|
-
const indicator = el?.shadowRoot?.querySelector('.mc-linear-progressbar-percentage__indicator') || el?.querySelector('.mc-linear-progressbar-percentage__indicator');
|
|
25
|
-
const label = el?.shadowRoot?.querySelector('.mc-linear-progressbar-percentage__value') || el?.querySelector('.mc-linear-progressbar-percentage__value');
|
|
26
|
-
await waitFor(() => {
|
|
27
|
-
expect(indicator).toHaveAttribute('aria-valuenow', '42');
|
|
28
|
-
expect(label?.textContent?.trim()).toMatch(/^42\s*%$/);
|
|
29
|
-
});
|
|
30
|
-
},
|
|
31
|
-
};
|
|
32
|
-
export const Full = {
|
|
33
|
-
args: { value: 100 },
|
|
34
|
-
render: Template,
|
|
35
|
-
play: async ({ canvasElement }) => {
|
|
36
|
-
const el = canvasElement.querySelector('m-linear-progressbar-percentage');
|
|
37
|
-
const label = el?.shadowRoot?.querySelector('.mc-linear-progressbar-percentage__value') || el?.querySelector('.mc-linear-progressbar-percentage__value');
|
|
38
|
-
expect(label?.textContent?.trim()).toMatch(/^100\s*%$/);
|
|
12
|
+
args: {
|
|
13
|
+
value: 40,
|
|
39
14
|
},
|
|
15
|
+
render: (args) => html `
|
|
16
|
+
<m-linear-progressbar-percentage
|
|
17
|
+
value=${ifDefined(args.value)}
|
|
18
|
+
></m-linear-progressbar-percentage>
|
|
19
|
+
`,
|
|
40
20
|
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export const Standard = {};
|
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
<svelte:options customElement={{ tag: 'm-linear-progressbar-percentage' }} />
|
|
2
2
|
|
|
3
3
|
<script lang="ts">
|
|
4
|
+
/**
|
|
5
|
+
* A linear progress bar (Percentage) visually represents the completion of a task along a horizontal track, displaying the exact progress in percentage within the bar. It is commonly used for file uploads, installations, form completion, or any process requiring user awareness of progress. The percentage label provides clear and immediate feedback, helping users track progress with precision.
|
|
6
|
+
*/
|
|
4
7
|
interface Props {
|
|
8
|
+
/**
|
|
9
|
+
* The current value of the progress bar.
|
|
10
|
+
*/
|
|
5
11
|
value?: number;
|
|
6
12
|
}
|
|
7
13
|
|
|
@@ -1,4 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A linear progress bar (Percentage) visually represents the completion of a task along a horizontal track, displaying the exact progress in percentage within the bar. It is commonly used for file uploads, installations, form completion, or any process requiring user awareness of progress. The percentage label provides clear and immediate feedback, helping users track progress with precision.
|
|
3
|
+
*/
|
|
1
4
|
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* The current value of the progress bar.
|
|
7
|
+
*/
|
|
2
8
|
value?: number;
|
|
3
9
|
}
|
|
4
10
|
declare const LinearProgressbarPercentage: import("svelte").Component<Props, {}, "">;
|
package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinearProgressbarPercentage.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte.ts"],"names":[],"mappings":"AAGE,UAAU,KAAK;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwBH,QAAA,MAAM,2BAA2B,2CAAwC,CAAC;AAC1E,KAAK,2BAA2B,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAClF,eAAe,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"LinearProgressbarPercentage.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte.ts"],"names":[],"mappings":"AAGE;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAwBH,QAAA,MAAM,2BAA2B,2CAAwC,CAAC;AAC1E,KAAK,2BAA2B,GAAG,UAAU,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAClF,eAAe,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
# `m-linear-progressbar-percentage`
|
|
2
|
+
|
|
3
|
+
A linear progress bar (Percentage) visually represents the completion of a task along a horizontal track, displaying the exact progress in percentage within the bar. It is commonly used for file uploads, installations, form completion, or any process requiring user awareness of progress. The percentage label provides clear and immediate feedback, helping users track progress with precision.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Description | Type | Default |
|
|
8
|
+
|------|-------------|------|---------|
|
|
9
|
+
| `value` | The current value of the progress bar. | `number` | `0` |
|
|
10
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as L,p as S,a as q,b as i,f as _,d as c,s as b,t as A,i as h,j as B,k as l,r as s,e as F,g as G}from"../../custom-element.js";import{i as w}from"../../if.js";import{s as x}from"../../slot.js";import{s as y}from"../../attributes.js";var H=_('<span class="mc-link__icon svelte-5kacnx"><!></span>'),I=_('<span class="mc-link__icon svelte-5kacnx"><!></span>'),J=_('<a><!> <span class="mc-link__label svelte-5kacnx"><!></span> <!></a>');const K={hash:"svelte-5kacnx",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-link.svelte-5kacnx {transition:box-shadow 200ms ease;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;min-height:1.5rem;text-decoration:none;color:var(--link-color-text-primary, #000000);font-size:0.875rem;}.mc-link__label.svelte-5kacnx {line-height:1.3;}.mc-link__icon.svelte-5kacnx {display:block;height:1.25rem;width:1.25rem;flex-shrink:0;fill:currentcolor;}.mc-link.svelte-5kacnx:hover:not(.mc-link--stand-alone, .mc-link--inline) .mc-link__label:where(.svelte-5kacnx) {text-decoration:underline;}.mc-link.svelte-5kacnx:focus {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-link--m.svelte-5kacnx {min-height:2rem;font-size:1rem;}.mc-link--secondary.svelte-5kacnx {color:var(--link-color-text-secondary, #666666);}.mc-link--accent.svelte-5kacnx {color:var(--link-color-text-accent, #117f03);}.mc-link--inverse.svelte-5kacnx {--focus-color-mid: var(--focus-color-outline-outer, #000000);--focus-color-outer: var(--focus-color-outline-mid, #ffffff);color:var(--link-color-text-inverse, #ffffff);}.mc-link--stand-alone.svelte-5kacnx {min-height:2rem;font-weight:var(--link-font-weight, 600);}.mc-link--stand-alone.svelte-5kacnx .mc-link__label:where(.svelte-5kacnx) {border-bottom:var(--border-s, 1px) solid currentColor;}.mc-link--stand-alone.svelte-5kacnx:hover .mc-link__label:where(.svelte-5kacnx) {border-color:transparent;}.mc-link--inline.svelte-5kacnx {font-weight:inherit;text-decoration:underline;}.mc-link--inline.svelte-5kacnx .mc-link__label:where(.svelte-5kacnx) {line-height:1;}.mc-link--inline.svelte-5kacnx:hover {text-decoration:none;}`};function
|
|
3
|
+
*/.mc-link.svelte-5kacnx {transition:box-shadow 200ms ease;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;min-height:1.5rem;text-decoration:none;color:var(--link-color-text-primary, #000000);font-size:0.875rem;}.mc-link__label.svelte-5kacnx {line-height:1.3;}.mc-link__icon.svelte-5kacnx {display:block;height:1.25rem;width:1.25rem;flex-shrink:0;fill:currentcolor;}.mc-link.svelte-5kacnx:hover:not(.mc-link--stand-alone, .mc-link--inline) .mc-link__label:where(.svelte-5kacnx) {text-decoration:underline;}.mc-link.svelte-5kacnx:focus {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-link--m.svelte-5kacnx {min-height:2rem;font-size:1rem;}.mc-link--secondary.svelte-5kacnx {color:var(--link-color-text-secondary, #666666);}.mc-link--accent.svelte-5kacnx {color:var(--link-color-text-accent, #117f03);}.mc-link--inverse.svelte-5kacnx {--focus-color-mid: var(--focus-color-outline-outer, #000000);--focus-color-outer: var(--focus-color-outline-mid, #ffffff);color:var(--link-color-text-inverse, #ffffff);}.mc-link--stand-alone.svelte-5kacnx {min-height:2rem;font-weight:var(--link-font-weight, 600);}.mc-link--stand-alone.svelte-5kacnx .mc-link__label:where(.svelte-5kacnx) {border-bottom:var(--border-s, 1px) solid currentColor;}.mc-link--stand-alone.svelte-5kacnx:hover .mc-link__label:where(.svelte-5kacnx) {border-color:transparent;}.mc-link--inline.svelte-5kacnx {font-weight:inherit;text-decoration:underline;}.mc-link--inline.svelte-5kacnx .mc-link__label:where(.svelte-5kacnx) {line-height:1;}.mc-link--inline.svelte-5kacnx:hover {text-decoration:none;}.mc-link__icon.svelte-5kacnx:empty {display:none;}`};function M(p,n){S(n,!0),q(p,K);let m=i(n,"href",7),k=i(n,"target",7),r=i(n,"inline",7),f=i(n,"appearance",7,"standard"),v=i(n,"size",7,"s"),o=i(n,"iconposition",7,"left");var z={get href(){return m()},set href(e){m(e),l()},get target(){return k()},set target(e){k(e),l()},get inline(){return r()},set inline(e){r(e),l()},get appearance(){return f()},set appearance(e="standard"){f(e),l()},get size(){return v()},set size(e="s"){v(e),l()},get iconposition(){return o()},set iconposition(e="left"){o(e),l()}},a=J(),g=c(a);{var j=e=>{var t=H(),u=c(t);x(u,n,"icon",{}),s(t),h(e,t)};w(g,e=>{o()==="left"&&e(j)})}var d=b(g,2),C=c(d);x(C,n,"default",{}),s(d);var D=b(d,2);{var E=e=>{var t=I(),u=c(t);x(u,n,"icon",{}),s(t),h(e,t)};w(D,e=>{o()==="right"&&e(E)})}return s(a),A(()=>{F(a,1,G(["mc-link",`mc-link--${f()}`,`mc-link--${v()}`,r()&&"mc-link--inline",!r()&&"mc-link--stand-alone"]),"svelte-5kacnx"),y(a,"href",m()),y(a,"target",k())}),h(p,a),B(z)}customElements.define("m-link",L(M,{href:{},target:{},inline:{},appearance:{},size:{},iconposition:{}},["icon","default"],[],!0));
|
|
4
4
|
//# sourceMappingURL=Link.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sources":["../../../src/components/link/Link.svelte"],"sourcesContent":["<svelte:options customElement
|
|
1
|
+
{"version":3,"file":"Link.js","sources":["../../../src/components/link/Link.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-link' }} />\n\n<script lang=\"ts\">\n /**\n * A link is an interactive text element used to navigate between pages, sections, or external resources. It is typically underlined and styled to indicate its clickable nature. Links can be standalone or embedded within text, and they may include icons to reinforce their purpose. They are essential for navigation and content referencing in web and application interfaces.\n *\n * @slot default - Use this slot to insert the textual content of the Link.\n * @slot icon - Use this slot to insert an icon for the Link.\n */\n interface Props {\n /**\n * Position of the icon relative to the text.\n */\n iconposition?: 'left' | 'right';\n /**\n * Allows to define the link appearance.\n */\n appearance?: 'secondary' | 'accent' | 'inverse' | 'standard';\n /**\n * Allows to define the link size.\n */\n size?: 's' | 'm';\n /**\n * URL for the link.\n */\n href?: string;\n /**\n * Where to open the link.\n */\n target?: '_self' | '_blank' | '_parent' | '_top';\n /**\n * Specify wether the link is inline.\n */\n inline?: boolean;\n }\n\n let {\n href,\n target,\n inline,\n appearance = 'standard',\n size = 's',\n iconposition = 'left',\n }: Props = $props();\n</script>\n\n<a\n class={[\n 'mc-link',\n `mc-link--${appearance}`,\n `mc-link--${size}`,\n inline && 'mc-link--inline',\n !inline && 'mc-link--stand-alone',\n ]}\n {href}\n {target}\n>\n {#if iconposition === 'left'}\n <span class=\"mc-link__icon\">\n <slot name=\"icon\" />\n </span>\n {/if}\n <span class=\"mc-link__label\">\n <slot />\n </span>\n {#if iconposition === 'right'}\n <span class=\"mc-link__icon\">\n <slot name=\"icon\" />\n </span>\n {/if}\n</a>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/link';\n\n .mc-link__icon:empty {\n display: none;\n }\n</style>\n"],"names":["href","$.prop","$$props","target","inline","appearance","size","iconposition","$$render","consequent","consequent_1"],"mappings":";;mzDAAA,oBAqCIA,EAAIC,EAAAC,EAAA,OAAA,CAAA,EACJC,EAAMF,EAAAC,EAAA,SAAA,CAAA,EACNE,EAAMH,EAAAC,EAAA,SAAA,CAAA,EACNG,qBAAa,UAAU,EACvBC,eAAO,GAAG,EACVC,uBAAe,MAAM,sMAFR,WAAU,6CAChB,IAAG,6DACK,OAAM,2FAelBA,EAAY,IAAK,QAAMC,EAAAC,CAAA,gIAQvBF,EAAY,IAAK,SAAOC,EAAAE,CAAA,gCAjB3B,sBACYL,EAAU,CAAA,eACVC,EAAI,CAAA,GAChBF,EAAM,GAAI,kBACT,CAAAA,EAAM,GAAI,yFARf"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/svelte';
|
|
3
|
+
import Link from './Link.svelte';
|
|
4
|
+
describe('m-link component', () => {
|
|
5
|
+
it('renders with default props and correct classes', () => {
|
|
6
|
+
const { container } = render(Link, {
|
|
7
|
+
props: {
|
|
8
|
+
href: 'https://example.com',
|
|
9
|
+
},
|
|
10
|
+
});
|
|
11
|
+
const link = container.querySelector('a.mc-link');
|
|
12
|
+
expect(link).toBeTruthy();
|
|
13
|
+
expect(link).toHaveAttribute('href', 'https://example.com');
|
|
14
|
+
expect(link.classList.contains('mc-link--standard')).toBe(true);
|
|
15
|
+
expect(link.classList.contains('mc-link--s')).toBe(true);
|
|
16
|
+
expect(link.classList.contains('mc-link--stand-alone')).toBe(true);
|
|
17
|
+
});
|
|
18
|
+
it('renders with inline class when inline prop is true', () => {
|
|
19
|
+
const { container } = render(Link, {
|
|
20
|
+
props: {
|
|
21
|
+
href: 'https://example.com',
|
|
22
|
+
inline: true,
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
const link = container.querySelector('a.mc-link');
|
|
26
|
+
expect(link.classList.contains('mc-link--inline')).toBe(true);
|
|
27
|
+
expect(link.classList.contains('mc-link--stand-alone')).toBe(false);
|
|
28
|
+
});
|
|
29
|
+
it('applies appearance and size classes correctly', () => {
|
|
30
|
+
const { container } = render(Link, {
|
|
31
|
+
props: {
|
|
32
|
+
href: 'https://example.com',
|
|
33
|
+
appearance: 'accent',
|
|
34
|
+
size: 'm',
|
|
35
|
+
},
|
|
36
|
+
});
|
|
37
|
+
const link = container.querySelector('a.mc-link');
|
|
38
|
+
expect(link.classList.contains('mc-link--accent')).toBe(true);
|
|
39
|
+
expect(link.classList.contains('mc-link--m')).toBe(true);
|
|
40
|
+
});
|
|
41
|
+
it('sets target attribute correctly', () => {
|
|
42
|
+
const { container } = render(Link, {
|
|
43
|
+
props: {
|
|
44
|
+
href: 'https://example.com',
|
|
45
|
+
target: '_blank',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
const link = container.querySelector('a.mc-link');
|
|
49
|
+
expect(link).toHaveAttribute('target', '_blank');
|
|
50
|
+
});
|
|
51
|
+
});
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import type { Meta } from '@storybook/
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
declare const
|
|
9
|
-
export
|
|
10
|
-
export declare const
|
|
11
|
-
export declare const IconLeft:
|
|
12
|
-
export declare const IconRight:
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
type Story = StoryObj;
|
|
5
|
+
export declare const Standard: Story;
|
|
6
|
+
export declare const Secondary: Story;
|
|
7
|
+
export declare const Accent: Story;
|
|
8
|
+
export declare const Inverse: Story;
|
|
9
|
+
export declare const Size: Story;
|
|
10
|
+
export declare const Inline: Story;
|
|
11
|
+
export declare const IconLeft: Story;
|
|
12
|
+
export declare const IconRight: Story;
|
|
13
13
|
//# sourceMappingURL=Link.stories.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/components/link/Link.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Link.stories.d.ts","sourceRoot":"","sources":["../../../src/components/link/Link.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAKrE,QAAA,MAAM,IAAI,EAAE,IAqCX,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC;AAElC,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAKtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAKvB,CAAC"}
|
|
@@ -1,86 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export default {
|
|
8
|
-
title: 'Navigation/Link (stand alone)',
|
|
9
|
-
tags: ['autodocs', 'beta'],
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Navigation/Link',
|
|
6
|
+
component: 'm-link',
|
|
10
7
|
argTypes: {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
8
|
+
iconposition: {
|
|
9
|
+
control: 'radio',
|
|
10
|
+
options: ['left', 'right'],
|
|
14
11
|
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
target: {
|
|
20
|
-
description: 'Specify the href target',
|
|
21
|
-
control: {
|
|
22
|
-
type: 'select',
|
|
23
|
-
options: ['_blank', '_self', '_parent', '_top'],
|
|
24
|
-
},
|
|
25
|
-
defaultValue: '_blank',
|
|
26
|
-
if: { arg: 'href' },
|
|
12
|
+
appearance: {
|
|
13
|
+
control: 'radio',
|
|
14
|
+
options: ['secondary', 'accent', 'inverse', 'standard'],
|
|
27
15
|
},
|
|
28
16
|
size: {
|
|
29
|
-
|
|
30
|
-
control: { type: 'select' },
|
|
17
|
+
control: 'radio',
|
|
31
18
|
options: ['s', 'm'],
|
|
32
19
|
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
inline: {
|
|
38
|
-
description: 'Specify wether the link is inline',
|
|
39
|
-
control: 'boolean',
|
|
40
|
-
},
|
|
41
|
-
style: {
|
|
42
|
-
description: 'Specify which theme to display for the link',
|
|
43
|
-
control: {
|
|
44
|
-
type: 'select',
|
|
45
|
-
},
|
|
46
|
-
options: ['primary', 'secondary', 'accent', 'inverse'],
|
|
47
|
-
},
|
|
48
|
-
iconposition: {
|
|
49
|
-
description: 'Specify wether the icon is on the right or left ot the link',
|
|
50
|
-
control: { type: 'radio' },
|
|
51
|
-
options: ['left', 'right'],
|
|
20
|
+
target: {
|
|
21
|
+
control: 'radio',
|
|
22
|
+
options: ['_self', '_blank', '_parent', '_top'],
|
|
52
23
|
},
|
|
53
24
|
},
|
|
25
|
+
args: {
|
|
26
|
+
default: 'Stand-alone link',
|
|
27
|
+
href: '#',
|
|
28
|
+
},
|
|
29
|
+
render: (args) => html `
|
|
30
|
+
<m-link
|
|
31
|
+
iconposition=${ifDefined(args.iconposition)}
|
|
32
|
+
appearance=${ifDefined(args.appearance)}
|
|
33
|
+
size=${ifDefined(args.size)}
|
|
34
|
+
href=${ifDefined(args.href)}
|
|
35
|
+
target=${ifDefined(args.target)}
|
|
36
|
+
inline=${ifDefined(args.inline)}
|
|
37
|
+
>
|
|
38
|
+
${unsafeHTML(ifDefined(args.icon))} ${unsafeHTML(ifDefined(args.default))}
|
|
39
|
+
</m-link>
|
|
40
|
+
`,
|
|
41
|
+
};
|
|
42
|
+
export default meta;
|
|
43
|
+
export const Standard = {};
|
|
44
|
+
export const Secondary = {
|
|
45
|
+
args: { appearance: 'secondary' },
|
|
54
46
|
};
|
|
55
|
-
const
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
if (args.style)
|
|
64
|
-
primary.setAttribute('style', args.style);
|
|
65
|
-
if (args.inline)
|
|
66
|
-
primary.setAttribute('inline', args.inline);
|
|
67
|
-
if (args.disabled)
|
|
68
|
-
primary.setAttribute('disabled', args.disabled);
|
|
69
|
-
if (args.iconposition)
|
|
70
|
-
primary.setAttribute('iconposition', args.iconposition);
|
|
71
|
-
primary.setAttribute('size', args.size);
|
|
72
|
-
primary.setAttribute('href', args.href);
|
|
73
|
-
primary.setAttribute('target', args.target);
|
|
74
|
-
primary.appendChild(label);
|
|
75
|
-
primary.appendChild(icon);
|
|
76
|
-
return primary;
|
|
47
|
+
export const Accent = {
|
|
48
|
+
args: { appearance: 'accent' },
|
|
49
|
+
};
|
|
50
|
+
export const Inverse = {
|
|
51
|
+
globals: {
|
|
52
|
+
backgrounds: { value: 'inverse' },
|
|
53
|
+
},
|
|
54
|
+
args: { appearance: 'inverse' },
|
|
77
55
|
};
|
|
78
|
-
export const
|
|
79
|
-
|
|
80
|
-
IconLeft.args = {
|
|
81
|
-
iconposition: 'left',
|
|
56
|
+
export const Size = {
|
|
57
|
+
args: { size: 'm' },
|
|
82
58
|
};
|
|
83
|
-
export const
|
|
84
|
-
|
|
85
|
-
|
|
59
|
+
export const Inline = {
|
|
60
|
+
args: { inline: true },
|
|
61
|
+
};
|
|
62
|
+
export const IconLeft = {
|
|
63
|
+
args: {
|
|
64
|
+
iconPosition: 'left',
|
|
65
|
+
icon: '<chevron-left-24 slot="icon"></chevron-left-24>',
|
|
66
|
+
},
|
|
67
|
+
};
|
|
68
|
+
export const IconRight = {
|
|
69
|
+
args: {
|
|
70
|
+
iconPosition: 'right',
|
|
71
|
+
icon: '<chevron-right-24 slot="icon"></chevron-right-24>',
|
|
72
|
+
},
|
|
86
73
|
};
|