@mozaic-ds/web-components 1.0.0-beta.6 → 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/Cross24.js.map +1 -1
- package/dist/CrossCircleFilled24.js +1 -1
- package/dist/CrossCircleFilled24.js.map +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 -5
- 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 +9 -10
- 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 +6 -9
- 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 +26 -34
- 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 +3 -6
- 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 +186 -168
- 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 +2 -5
- 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 +15 -14
- 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 -6
- 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 +75 -58
- 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 +4 -7
- 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 +89 -81
- 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 +4 -7
- 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 +46 -30
- 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 -6
- 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 +103 -79
- 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 +12 -15
- 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 +185 -161
- 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 +3 -6
- 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 +63 -30
- 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 -5
- 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 +23 -24
- 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 -5
- 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 +157 -152
- 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 -5
- 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 +19 -12
- 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 -5
- 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 +19 -16
- 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 -5
- 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 +54 -52
- 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 +7 -10
- 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 +42 -43
- 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 +14 -17
- 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 +167 -166
- 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 -5
- 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 +36 -35
- 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 -5
- 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 +21 -12
- 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 +8 -11
- 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 +53 -35
- 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 +4 -9
- 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 +424 -60
- 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 +4 -7
- 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 +72 -60
- 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 +3 -7
- 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 +136 -112
- 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 -5
- 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 +58 -39
- 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 +4 -7
- 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 +81 -77
- 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 +3 -6
- 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 +77 -67
- 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 -5
- 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 +34 -29
- 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 -5
- 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 +15 -16
- 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 -6
- 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 +186 -187
- 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/tab/Tab.svelte +154 -0
- 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 -5
- 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 +46 -29
- 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 +2 -5
- package/dist/components/tags/Tag.js.map +1 -1
- package/dist/components/tags/Tag.svelte +35 -38
- package/dist/components/tags/TagContextualised.js +2 -5
- package/dist/components/tags/TagContextualised.js.map +1 -1
- package/dist/components/tags/TagContextualised.svelte +35 -38
- package/dist/components/tags/TagInteractive.js +2 -5
- package/dist/components/tags/TagInteractive.js.map +1 -1
- package/dist/components/tags/TagInteractive.svelte +35 -38
- package/dist/components/tags/TagRemovable.js +2 -5
- package/dist/components/tags/TagRemovable.js.map +1 -1
- package/dist/components/tags/TagRemovable.svelte +35 -38
- package/dist/components/tags/TagSelectable.js +2 -5
- package/dist/components/tags/TagSelectable.js.map +1 -1
- package/dist/components/tags/TagSelectable.svelte +35 -38
- 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 -8
- 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 +70 -117
- 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 +5 -9
- 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 +107 -148
- 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 +5 -8
- 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 +157 -146
- 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 -5
- 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 +59 -48
- 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 -6
- 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 +91 -97
- 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 +4 -7
- 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 +31 -25
- 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-forward-events.js.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/legacy.js.map +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 +12 -4
- 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 -30
- 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 -159
- 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 -7
- package/dist/components/tabs/Tab.js.map +0 -1
- package/dist/components/tabs/Tab.svelte +0 -137
- 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
package/dist/bundle.d.ts
CHANGED
|
@@ -1,43 +1,44 @@
|
|
|
1
1
|
import './components/avatar/Avatar.js';
|
|
2
|
+
import './components/breadcrumb/Breadcrumb.js';
|
|
2
3
|
import './components/button/Button.js';
|
|
3
4
|
import './components/callout/Callout.js';
|
|
4
|
-
import './components/iconbutton/IconButton.js';
|
|
5
5
|
import './components/checkbox/Checkbox.js';
|
|
6
6
|
import './components/checkboxgroup/CheckboxGroup.js';
|
|
7
|
-
import './components/
|
|
8
|
-
import './components/
|
|
9
|
-
import './components/
|
|
10
|
-
import './components/toggle/Toggle.js';
|
|
7
|
+
import './components/circularprogressbar/CircularProgressbar.js';
|
|
8
|
+
import './components/datepicker/Datepicker.js';
|
|
9
|
+
import './components/drawer/Drawer.js';
|
|
11
10
|
import './components/field/Field.js';
|
|
11
|
+
import './components/flag/Flag.js';
|
|
12
|
+
import './components/iconbutton/IconButton.js';
|
|
13
|
+
import './components/linearprogressbarbuffer/LinearProgressbarBuffer.js';
|
|
14
|
+
import './components/linearprogressbarpercentage/LinearProgressbarPercentage.js';
|
|
12
15
|
import './components/link/Link.js';
|
|
13
16
|
import './components/loader/Loader.js';
|
|
14
|
-
import './components/
|
|
17
|
+
import './components/loadingoverlay/LoadingOverlay.js';
|
|
18
|
+
import './components/modal/Modal.js';
|
|
19
|
+
import './components/numberbadge/NumberBadge.js';
|
|
15
20
|
import './components/overlay/Overlay.js';
|
|
16
|
-
import './components/
|
|
21
|
+
import './components/pagination/Pagination.js';
|
|
22
|
+
import './components/passwordinput/PasswordInput.js';
|
|
23
|
+
import './components/pincode/Pincode.js';
|
|
24
|
+
import './components/quantityselector/QuantitySelector.js';
|
|
17
25
|
import './components/radio/Radio.js';
|
|
18
26
|
import './components/radiogroup/RadioGroup.js';
|
|
19
|
-
import './components/
|
|
20
|
-
import './components/numberbadge/NumberBadge.js';
|
|
27
|
+
import './components/select/Select.js';
|
|
21
28
|
import './components/statusbadge/StatusBadge.js';
|
|
22
|
-
import './components/
|
|
23
|
-
import './components/breadcrumb/Breadcrumb.js';
|
|
29
|
+
import './components/statusdot/StatusDot.js';
|
|
24
30
|
import './components/statusnotification/StatusNotification.js';
|
|
25
|
-
import './components/
|
|
26
|
-
import './components/
|
|
31
|
+
import './components/tab/Tab.js';
|
|
32
|
+
import './components/tabs/Tabs.js';
|
|
27
33
|
import './components/tags/Tag.js';
|
|
28
34
|
import './components/tags/TagContextualised.js';
|
|
29
35
|
import './components/tags/TagInteractive.js';
|
|
30
36
|
import './components/tags/TagRemovable.js';
|
|
31
37
|
import './components/tags/TagSelectable.js';
|
|
32
|
-
import './components/
|
|
33
|
-
import './components/
|
|
34
|
-
import './components/
|
|
35
|
-
import './components/
|
|
36
|
-
import './components/
|
|
37
|
-
import './components/pincode/Pincode.js';
|
|
38
|
-
import './components/datepicker/Datepicker.js';
|
|
38
|
+
import './components/textarea/Textarea.js';
|
|
39
|
+
import './components/textinput/Textinput.js';
|
|
40
|
+
import './components/toaster/Toaster.js';
|
|
41
|
+
import './components/toggle/Toggle.js';
|
|
42
|
+
import './components/togglegroup/ToggleGroup.js';
|
|
39
43
|
import './components/tooltip/Tooltip.js';
|
|
40
|
-
import './components/linearprogressbarpercentage/LinearProgressbarPercentage.js';
|
|
41
|
-
import './components/linearprogressbarbuffer/LinearProgressbarBuffer.js';
|
|
42
|
-
import './components/circularprogressbar/CircularProgressbar.js';
|
|
43
44
|
//# sourceMappingURL=bundle.d.ts.map
|
package/dist/bundle.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAC;AACvC,OAAO,+BAA+B,CAAC;AACvC,OAAO,iCAAiC,CAAC;AACzC,OAAO,
|
|
1
|
+
{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../src/bundle.ts"],"names":[],"mappings":"AAAA,OAAO,+BAA+B,CAAC;AACvC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,+BAA+B,CAAC;AACvC,OAAO,iCAAiC,CAAC;AACzC,OAAO,mCAAmC,CAAC;AAC3C,OAAO,6CAA6C,CAAC;AACrD,OAAO,yDAAyD,CAAC;AACjE,OAAO,uCAAuC,CAAC;AAC/C,OAAO,+BAA+B,CAAC;AACvC,OAAO,6BAA6B,CAAC;AACrC,OAAO,2BAA2B,CAAC;AACnC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,iEAAiE,CAAC;AACzE,OAAO,yEAAyE,CAAC;AACjF,OAAO,2BAA2B,CAAC;AACnC,OAAO,+BAA+B,CAAC;AACvC,OAAO,+CAA+C,CAAC;AACvD,OAAO,6BAA6B,CAAC;AACrC,OAAO,yCAAyC,CAAC;AACjD,OAAO,iCAAiC,CAAC;AACzC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,6CAA6C,CAAC;AACrD,OAAO,iCAAiC,CAAC;AACzC,OAAO,mDAAmD,CAAC;AAC3D,OAAO,6BAA6B,CAAC;AACrC,OAAO,uCAAuC,CAAC;AAC/C,OAAO,+BAA+B,CAAC;AACvC,OAAO,yCAAyC,CAAC;AACjD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,uDAAuD,CAAC;AAC/D,OAAO,yBAAyB,CAAC;AACjC,OAAO,2BAA2B,CAAC;AACnC,OAAO,0BAA0B,CAAC;AAClC,OAAO,wCAAwC,CAAC;AAChD,OAAO,qCAAqC,CAAC;AAC7C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,oCAAoC,CAAC;AAC5C,OAAO,mCAAmC,CAAC;AAC3C,OAAO,qCAAqC,CAAC;AAC7C,OAAO,iCAAiC,CAAC;AACzC,OAAO,+BAA+B,CAAC;AACvC,OAAO,yCAAyC,CAAC;AACjD,OAAO,iCAAiC,CAAC"}
|
package/dist/bundle.js
CHANGED
|
@@ -1,42 +1,43 @@
|
|
|
1
1
|
import './components/avatar/Avatar.js';
|
|
2
|
+
import './components/breadcrumb/Breadcrumb.js';
|
|
2
3
|
import './components/button/Button.js';
|
|
3
4
|
import './components/callout/Callout.js';
|
|
4
|
-
import './components/iconbutton/IconButton.js';
|
|
5
5
|
import './components/checkbox/Checkbox.js';
|
|
6
6
|
import './components/checkboxgroup/CheckboxGroup.js';
|
|
7
|
-
import './components/
|
|
8
|
-
import './components/
|
|
9
|
-
import './components/
|
|
10
|
-
import './components/toggle/Toggle.js';
|
|
7
|
+
import './components/circularprogressbar/CircularProgressbar.js';
|
|
8
|
+
import './components/datepicker/Datepicker.js';
|
|
9
|
+
import './components/drawer/Drawer.js';
|
|
11
10
|
import './components/field/Field.js';
|
|
11
|
+
import './components/flag/Flag.js';
|
|
12
|
+
import './components/iconbutton/IconButton.js';
|
|
13
|
+
import './components/linearprogressbarbuffer/LinearProgressbarBuffer.js';
|
|
14
|
+
import './components/linearprogressbarpercentage/LinearProgressbarPercentage.js';
|
|
12
15
|
import './components/link/Link.js';
|
|
13
16
|
import './components/loader/Loader.js';
|
|
14
|
-
import './components/
|
|
17
|
+
import './components/loadingoverlay/LoadingOverlay.js';
|
|
18
|
+
import './components/modal/Modal.js';
|
|
19
|
+
import './components/numberbadge/NumberBadge.js';
|
|
15
20
|
import './components/overlay/Overlay.js';
|
|
16
|
-
import './components/
|
|
21
|
+
import './components/pagination/Pagination.js';
|
|
22
|
+
import './components/passwordinput/PasswordInput.js';
|
|
23
|
+
import './components/pincode/Pincode.js';
|
|
24
|
+
import './components/quantityselector/QuantitySelector.js';
|
|
17
25
|
import './components/radio/Radio.js';
|
|
18
26
|
import './components/radiogroup/RadioGroup.js';
|
|
19
|
-
import './components/
|
|
20
|
-
import './components/numberbadge/NumberBadge.js';
|
|
27
|
+
import './components/select/Select.js';
|
|
21
28
|
import './components/statusbadge/StatusBadge.js';
|
|
22
|
-
import './components/
|
|
23
|
-
import './components/breadcrumb/Breadcrumb.js';
|
|
29
|
+
import './components/statusdot/StatusDot.js';
|
|
24
30
|
import './components/statusnotification/StatusNotification.js';
|
|
25
|
-
import './components/
|
|
26
|
-
import './components/
|
|
31
|
+
import './components/tab/Tab.js';
|
|
32
|
+
import './components/tabs/Tabs.js';
|
|
27
33
|
import './components/tags/Tag.js';
|
|
28
34
|
import './components/tags/TagContextualised.js';
|
|
29
35
|
import './components/tags/TagInteractive.js';
|
|
30
36
|
import './components/tags/TagRemovable.js';
|
|
31
37
|
import './components/tags/TagSelectable.js';
|
|
32
|
-
import './components/
|
|
33
|
-
import './components/
|
|
34
|
-
import './components/
|
|
35
|
-
import './components/
|
|
36
|
-
import './components/
|
|
37
|
-
import './components/pincode/Pincode.js';
|
|
38
|
-
import './components/datepicker/Datepicker.js';
|
|
38
|
+
import './components/textarea/Textarea.js';
|
|
39
|
+
import './components/textinput/Textinput.js';
|
|
40
|
+
import './components/toaster/Toaster.js';
|
|
41
|
+
import './components/toggle/Toggle.js';
|
|
42
|
+
import './components/togglegroup/ToggleGroup.js';
|
|
39
43
|
import './components/tooltip/Tooltip.js';
|
|
40
|
-
import './components/linearprogressbarpercentage/LinearProgressbarPercentage.js';
|
|
41
|
-
import './components/linearprogressbarbuffer/LinearProgressbarBuffer.js';
|
|
42
|
-
import './components/circularprogressbar/CircularProgressbar.js';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as n,p as l,a as c,b as d,f as m,d as f,t as v,i as h,j as g,k as u,r as p,e as w,g as b}from"../../custom-element.js";import{s as z}from"../../slot.js";var y=m("<div><!></div>");const _={hash:"svelte-1g4aw6b",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Do not edit directly, this file was auto-generated.
|
|
6
|
-
*/.mc-avatar.svelte-1ox7lm2 {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;overflow:hidden;border-radius:100%;background:#eff1f6;color:#404040;font-size:0.75rem;font-weight:600;text-transform:uppercase;}.mc-avatar--m.svelte-1ox7lm2 {width:3rem;height:3rem;font-size:1.125rem;}.mc-avatar--l.svelte-1ox7lm2 {width:4rem;height:4rem;font-size:1.5rem;}.svelte-1ox7lm2::slotted(img) {display:block;width:100%;height:100%;object-fit:contain;}`};function _(s,a){l(a,!0),m(s,y);let e=n(a,"size",7,"s");var t=z(),r=c(t);return w(r,a,"default",{}),p(t),f(()=>g(t,1,x(["mc-avatar",e()&&`mc-avatar--${e()}`]),"svelte-1ox7lm2")),h(s,t),v({get size(){return e()},set size(i="s"){e(i),u()}})}customElements.define("m-avatar",o(_,{size:{}},["default"],[],!0));
|
|
3
|
+
*/.mc-avatar.svelte-1g4aw6b {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;overflow:hidden;border-radius:var(--radius-full, 100%);background:var(--color-background-secondary, #eff1f6);color:var(--color-text-secondary, #404040);font-size:var(--font-size-50, 0.75rem);font-weight:var(--font-weight-semi-bold, 600);text-transform:uppercase;}.mc-avatar--m.svelte-1g4aw6b {width:3rem;height:3rem;font-size:var(--font-size-200, 1.125rem);}.mc-avatar--l.svelte-1g4aw6b {width:4rem;height:4rem;font-size:var(--font-size-300, 1.5rem);}.svelte-1g4aw6b::slotted(img) {display:block;width:100%;height:100%;object-fit:contain;}`};function x(s,a){l(a,!0),c(s,_);let e=d(a,"size",7,"s");var r={get size(){return e()},set size(o="s"){e(o),u()}},t=y(),i=f(t);return z(i,a,"default",{}),p(t),v(()=>w(t,1,b(["mc-avatar",e()&&`mc-avatar--${e()}`]),"svelte-1g4aw6b")),h(s,t),g(r)}customElements.define("m-avatar",n(x,{size:{}},["default"],[],!0));
|
|
7
4
|
//# sourceMappingURL=Avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../../../src/components/avatar/Avatar.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-avatar' }} />\n\n<script lang=\"ts\">\n /**\n * An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.\n */\n interface Props {\n /**\n * Determines the size of the avatar.\n */\n\t\tsize: 's' | 'm' | 'l'\n\t}\n\n let { size = 's'}: Props = $props();\n</script>\n\n<div class={[\"mc-avatar\", size && `mc-avatar--${size}`]} >\n <slot/>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/avatar';\n\n ::slotted(img) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n</style>\n"],"names":["size"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/components/avatar/Avatar.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-avatar' }} />\n\n<script lang=\"ts\">\n /**\n * An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.\n * \n * @slot default - Use this slot to insert the image, icon or intials of the avatar.\n */\n interface Props {\n /**\n * Determines the size of the avatar.\n */\n\t\tsize: 's' | 'm' | 'l'\n\t}\n\n let { size = 's'}: Props = $props();\n</script>\n\n<div class={[\"mc-avatar\", size && `mc-avatar--${size}`]} >\n <slot/>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/avatar';\n\n ::slotted(img) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n</style>\n"],"names":["size"],"mappings":";;ypBAAA,gBAeQ,IAAAA,eAAO,GAAG,2CAAH,IAAG,wEAGL,YAAaA,EAAI,GAAA,cAAkBA,EAAI,CAAA,EAAA,CAAA,EAAA,gBAAA,CAAA,aAFpD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/svelte';
|
|
3
|
+
import Avatar from './Avatar.svelte';
|
|
4
|
+
describe('m-avatar component', () => {
|
|
5
|
+
it('renders with default size "s"', () => {
|
|
6
|
+
const { container } = render(Avatar);
|
|
7
|
+
const div = container.querySelector('div.mc-avatar');
|
|
8
|
+
expect(div).toBeTruthy();
|
|
9
|
+
expect(div?.classList.contains('mc-avatar--s')).toBe(true);
|
|
10
|
+
});
|
|
11
|
+
it('applies correct size class for size "l"', () => {
|
|
12
|
+
const { container } = render(Avatar, { props: { size: 'l' } });
|
|
13
|
+
const div = container.querySelector('div.mc-avatar');
|
|
14
|
+
expect(div).toBeTruthy();
|
|
15
|
+
expect(div?.classList.contains('mc-avatar--l')).toBe(true);
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,gEAAgE,CAAC;AAExE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,gEAAgE,CAAC;AAExE,QAAA,MAAM,IAAI,EAAE,IAoBX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC"}
|
|
@@ -4,38 +4,12 @@ import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
|
4
4
|
import '@mozaic-ds/icons-svelte/custom-elements/Profile24/Profile24.js';
|
|
5
5
|
const meta = {
|
|
6
6
|
title: 'Content/Avatar',
|
|
7
|
-
component: 'm-
|
|
8
|
-
|
|
9
|
-
docs: {
|
|
10
|
-
description: {
|
|
11
|
-
component: 'An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.',
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
},
|
|
7
|
+
component: 'm-avatar',
|
|
8
|
+
tags: ['v2'],
|
|
15
9
|
argTypes: {
|
|
16
10
|
size: {
|
|
17
|
-
|
|
18
|
-
control: { type: 'radio' },
|
|
11
|
+
control: 'inline-radio',
|
|
19
12
|
options: ['s', 'm', 'l'],
|
|
20
|
-
table: {
|
|
21
|
-
type: {
|
|
22
|
-
summary: 's | m | l',
|
|
23
|
-
},
|
|
24
|
-
defaultValue: {
|
|
25
|
-
summary: 's',
|
|
26
|
-
},
|
|
27
|
-
category: 'attributes',
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
default: {
|
|
31
|
-
description: 'Use this slot to insert the image, icon or intials of the avatar.',
|
|
32
|
-
control: { type: 'text' },
|
|
33
|
-
table: {
|
|
34
|
-
type: {
|
|
35
|
-
summary: 'any',
|
|
36
|
-
},
|
|
37
|
-
category: 'slots',
|
|
38
|
-
},
|
|
39
13
|
},
|
|
40
14
|
},
|
|
41
15
|
args: {
|
|
@@ -3,6 +3,8 @@
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
/**
|
|
5
5
|
* An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.
|
|
6
|
+
*
|
|
7
|
+
* @slot default - Use this slot to insert the image, icon or intials of the avatar.
|
|
6
8
|
*/
|
|
7
9
|
interface Props {
|
|
8
10
|
/**
|
|
@@ -21,9 +23,6 @@
|
|
|
21
23
|
<style>/**
|
|
22
24
|
* Do not edit directly, this file was auto-generated.
|
|
23
25
|
*/
|
|
24
|
-
/**
|
|
25
|
-
* Do not edit directly, this file was auto-generated.
|
|
26
|
-
*/
|
|
27
26
|
.mc-avatar {
|
|
28
27
|
display: flex;
|
|
29
28
|
align-items: center;
|
|
@@ -31,11 +30,11 @@
|
|
|
31
30
|
width: 2rem;
|
|
32
31
|
height: 2rem;
|
|
33
32
|
overflow: hidden;
|
|
34
|
-
border-radius: 100
|
|
35
|
-
background: #eff1f6;
|
|
36
|
-
color: #404040;
|
|
37
|
-
font-size: 0.75rem;
|
|
38
|
-
font-weight: 600;
|
|
33
|
+
border-radius: var(--radius-full, 100%);
|
|
34
|
+
background: var(--color-background-secondary, #eff1f6);
|
|
35
|
+
color: var(--color-text-secondary, #404040);
|
|
36
|
+
font-size: var(--font-size-50, 0.75rem);
|
|
37
|
+
font-weight: var(--font-weight-semi-bold, 600);
|
|
39
38
|
text-transform: uppercase;
|
|
40
39
|
}
|
|
41
40
|
.mc-avatar img {
|
|
@@ -47,12 +46,12 @@
|
|
|
47
46
|
.mc-avatar--m {
|
|
48
47
|
width: 3rem;
|
|
49
48
|
height: 3rem;
|
|
50
|
-
font-size: 1.125rem;
|
|
49
|
+
font-size: var(--font-size-200, 1.125rem);
|
|
51
50
|
}
|
|
52
51
|
.mc-avatar--l {
|
|
53
52
|
width: 4rem;
|
|
54
53
|
height: 4rem;
|
|
55
|
-
font-size: 1.5rem;
|
|
54
|
+
font-size: var(--font-size-300, 1.5rem);
|
|
56
55
|
}
|
|
57
56
|
|
|
58
57
|
::slotted(img) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.
|
|
3
|
+
*
|
|
4
|
+
* @slot default - Use this slot to insert the image, icon or intials of the avatar.
|
|
3
5
|
*/
|
|
4
6
|
interface Props {
|
|
5
7
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.svelte.ts"],"names":[],"mappings":"AAGE
|
|
1
|
+
{"version":3,"file":"Avatar.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.svelte.ts"],"names":[],"mappings":"AAGE;;;;GAIG;AACH,UAAU,KAAK;IACb;;OAEG;IACL,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAA;CACrB;AAiBF,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AACD,KAAK,gCAAgC,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,GACvD,CAAC,KAAK,SAAS;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GACzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,GAAG,GACH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,GAClB,EAAE,CAAC,CAAC;AAId,QAAA,MAAM,MAAM;;;;;;UAAqF,CAAC;AAChF,KAAK,MAAM,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# `m-avatar`
|
|
2
|
+
|
|
3
|
+
An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Description | Type | Default |
|
|
8
|
+
|------|-------------|------|---------|
|
|
9
|
+
| `size*` | Determines the size of the avatar. | `'s'` `'m'` `'l'` | `s` |
|
|
10
|
+
|
|
11
|
+
## Slots
|
|
12
|
+
|
|
13
|
+
| Name | Description |
|
|
14
|
+
|------|-------------|
|
|
15
|
+
| `default` | Use this slot to insert the image, icon or intials of the avatar. |
|
|
16
|
+
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as L,p as B,a as M,b as u,f as g,d as n,t as b,i as x,j,k as f,r as t,e as _,g as z,m,h as D}from"../../custom-element.js";import{e as S,i as q}from"../../each.js";import{s as p}from"../../attributes.js";var A=g('<li class="mc-breadcrumb__item svelte-1ihiex7"><a><span class="mc-link__label svelte-1ihiex7"> </span></a></li>'),F=g('<nav aria-label="Breadcrumb"><ol class="mc-breadcrumb__container svelte-1ihiex7"></ol></nav>');const G={hash:"svelte-1ihiex7",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}.mc-breadcrumb__current.svelte-5h7sq6, .mc-breadcrumb__current.mc-link.svelte-5h7sq6 {cursor:default;text-decoration:none;}.mc-breadcrumb__current.svelte-5h7sq6, .mc-breadcrumb__current.svelte-5h7sq6:active, .mc-breadcrumb__current.svelte-5h7sq6:focus, .mc-breadcrumb__current.svelte-5h7sq6:hover, .mc-breadcrumb__current.svelte-5h7sq6:visited, .mc-breadcrumb__current.mc-link.svelte-5h7sq6, .mc-breadcrumb__current.mc-link.svelte-5h7sq6:active, .mc-breadcrumb__current.mc-link.svelte-5h7sq6:focus, .mc-breadcrumb__current.mc-link.svelte-5h7sq6:hover, .mc-breadcrumb__current.mc-link.svelte-5h7sq6:visited {color:currentcolor;}.mc-breadcrumb--inverse.svelte-5h7sq6 {color:#ffffff;}.mc-breadcrumb--inverse.svelte-5h7sq6 .mc-breadcrumb__item:where(.svelte-5h7sq6):not(:first-child) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='%23ffffff' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M8.22 5.303a.75.75 0 0 1 1.06 0l4.167 4.167a.75.75 0 0 1 0 1.06L9.28 14.698a.75.75 0 1 1-1.06-1.06L11.856 10 8.22 6.364a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");}
|
|
9
|
-
@media screen and (max-width: 679px) {.mc-breadcrumb--inverse.svelte-5h7sq6 .mc-breadcrumb__item:where(.svelte-5h7sq6):nth-last-child(2) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='%23ffffff' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M11.78 5.303a.75.75 0 0 1 0 1.06L8.144 10l3.636 3.637a.75.75 0 0 1-1.06 1.06l-4.167-4.166a.75.75 0 0 1 0-1.061l4.166-4.167a.75.75 0 0 1 1.061 0'/%3E%3C/svg%3E");}
|
|
10
|
-
}.mc-link.svelte-5h7sq6 {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:#000000;font-size:0.875rem;}.mc-link__label.svelte-5h7sq6 {line-height:1.3;}.mc-link__icon.svelte-5h7sq6 {display:block;height:1.25rem;width:1.25rem;flex-shrink:0;fill:currentcolor;}.mc-link.svelte-5h7sq6:hover:not(.mc-link--stand-alone, .mc-link--inline) .mc-link__label:where(.svelte-5h7sq6) {text-decoration:underline;}.mc-link.svelte-5h7sq6:focus {box-shadow:0 0 0 0.125rem var(--focus-color-mid, #ffffff), 0 0 0 0.25rem var(--focus-color-outer, #000000);outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-link--m.svelte-5h7sq6 {min-height:2rem;font-size:1rem;}.mc-link--secondary.svelte-5h7sq6 {color:#666666;}.mc-link--accent.svelte-5h7sq6 {color:#117f03;}.mc-link--inverse.svelte-5h7sq6 {--focus-color-mid: #000000;--focus-color-outer: #ffffff;color:#ffffff;}.mc-link--stand-alone.svelte-5h7sq6 {min-height:2rem;font-weight:600;}.mc-link--stand-alone.svelte-5h7sq6 .mc-link__label:where(.svelte-5h7sq6) {border-bottom:1px solid currentColor;}.mc-link--stand-alone.svelte-5h7sq6:hover .mc-link__label:where(.svelte-5h7sq6) {border-color:transparent;}.mc-link--inline.svelte-5h7sq6 {font-weight:inherit;text-decoration:underline;}.mc-link--inline.svelte-5h7sq6 .mc-link__label:where(.svelte-5h7sq6) {line-height:1;}.mc-link--inline.svelte-5h7sq6:hover {text-decoration:none;}`};function H(h,c){L(c,!0),B(h,G);let t=v(c,"appearance",7,"standard"),a=v(c,"links",23,()=>[]);const k=e=>e===a().length-1;function w(e){const r=["mc-link","mc-link--m","mc-link--inline"];return t()&&r.push(`mc-link--${t()}`),e&&r.push("mc-breadcrumb__current"),r.join(" ")}var n=F(),d=i(n);return D(d,21,a,S,(e,r,x)=>{var m=A(),s=i(m),u=i(s),C=i(u,!0);l(u),l(s),l(m),f(E=>{g(s,"href",o(r).href),g(s,"target",o(r).target),p(s,1,E,"svelte-5h7sq6"),z(C,o(r).label)},[()=>j(w(k(x)))]),b(e,m)}),l(d),l(n),f(()=>p(n,1,`mc-breadcrumb mc-breadcrumb--${t()}`,"svelte-5h7sq6")),b(h,n),M({get appearance(){return t()},set appearance(e="standard"){t(e),_()},get links(){return a()},set links(e=[]){a(e),_()}})}customElements.define("m-breadcrumb",y(H,{appearance:{},links:{}},[],[],!0));
|
|
3
|
+
*/.mc-breadcrumb.svelte-1ihiex7 {color:var(--breadcrumb-color-text-standard, #000000);}.mc-breadcrumb__container.svelte-1ihiex7 {list-style-type:none;padding-inline-start:0;margin-block:0;display:flex;flex-wrap:wrap;gap:0.25rem;}.mc-breadcrumb__item.svelte-1ihiex7 {background-position:left center;background-repeat:no-repeat;}.mc-breadcrumb__item.svelte-1ihiex7:not(:first-child) {padding-inline-start:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-standard, %23000000)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M8.22 5.303a.75.75 0 0 1 1.06 0l4.167 4.167a.75.75 0 0 1 0 1.06L9.28 14.698a.75.75 0 1 1-1.06-1.06L11.856 10 8.22 6.364a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");}
|
|
4
|
+
@media screen and (max-width: 679px) {.mc-breadcrumb__item.svelte-1ihiex7:nth-last-child(2) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-standard, %23000000)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M11.78 5.303a.75.75 0 0 1 0 1.06L8.144 10l3.636 3.637a.75.75 0 0 1-1.06 1.06l-4.167-4.166a.75.75 0 0 1 0-1.061l4.166-4.167a.75.75 0 0 1 1.061 0'/%3E%3C/svg%3E");}.mc-breadcrumb__item.svelte-1ihiex7:not(:nth-last-child(2)) {clip-path:inset(100%);clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;padding:0;width:1px;}
|
|
5
|
+
}.mc-breadcrumb__current.svelte-1ihiex7, .mc-breadcrumb__current.mc-link.svelte-1ihiex7 {cursor:default;text-decoration:none;}.mc-breadcrumb__current.svelte-1ihiex7, .mc-breadcrumb__current.svelte-1ihiex7:active, .mc-breadcrumb__current.svelte-1ihiex7:focus, .mc-breadcrumb__current.svelte-1ihiex7:hover, .mc-breadcrumb__current.svelte-1ihiex7:visited, .mc-breadcrumb__current.mc-link.svelte-1ihiex7, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:active, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:focus, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:hover, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:visited {color:currentcolor;}.mc-breadcrumb--inverse.svelte-1ihiex7 {color:var(--breadcrumb-color-text-inverse, #ffffff);}.mc-breadcrumb--inverse.svelte-1ihiex7 .mc-breadcrumb__item:where(.svelte-1ihiex7):not(:first-child) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-inverse, %23ffffff)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M8.22 5.303a.75.75 0 0 1 1.06 0l4.167 4.167a.75.75 0 0 1 0 1.06L9.28 14.698a.75.75 0 1 1-1.06-1.06L11.856 10 8.22 6.364a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");}
|
|
6
|
+
@media screen and (max-width: 679px) {.mc-breadcrumb--inverse.svelte-1ihiex7 .mc-breadcrumb__item:where(.svelte-1ihiex7):nth-last-child(2) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-inverse, %23ffffff)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M11.78 5.303a.75.75 0 0 1 0 1.06L8.144 10l3.636 3.637a.75.75 0 0 1-1.06 1.06l-4.167-4.166a.75.75 0 0 1 0-1.061l4.166-4.167a.75.75 0 0 1 1.061 0'/%3E%3C/svg%3E");}
|
|
7
|
+
}.mc-link.svelte-1ihiex7 {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-1ihiex7 {line-height:1.3;}.mc-link__icon.svelte-1ihiex7 {display:block;height:1.25rem;width:1.25rem;flex-shrink:0;fill:currentcolor;}.mc-link.svelte-1ihiex7:hover:not(.mc-link--stand-alone, .mc-link--inline) .mc-link__label:where(.svelte-1ihiex7) {text-decoration:underline;}.mc-link.svelte-1ihiex7: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-1ihiex7 {min-height:2rem;font-size:1rem;}.mc-link--secondary.svelte-1ihiex7 {color:var(--link-color-text-secondary, #666666);}.mc-link--accent.svelte-1ihiex7 {color:var(--link-color-text-accent, #117f03);}.mc-link--inverse.svelte-1ihiex7 {--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-1ihiex7 {min-height:2rem;font-weight:var(--link-font-weight, 600);}.mc-link--stand-alone.svelte-1ihiex7 .mc-link__label:where(.svelte-1ihiex7) {border-bottom:var(--border-s, 1px) solid currentColor;}.mc-link--stand-alone.svelte-1ihiex7:hover .mc-link__label:where(.svelte-1ihiex7) {border-color:transparent;}.mc-link--inline.svelte-1ihiex7 {font-weight:inherit;text-decoration:underline;}.mc-link--inline.svelte-1ihiex7 .mc-link__label:where(.svelte-1ihiex7) {line-height:1;}.mc-link--inline.svelte-1ihiex7:hover {text-decoration:none;}`};function H(d,c){B(c,!0),M(d,G);let r=u(c,"appearance",7,"standard"),a=u(c,"links",7);const k=e=>e===a().length-1;var w={get appearance(){return r()},set appearance(e="standard"){r(e),f()},get links(){return a()},set links(e){a(e),f()}},l=F(),h=n(l);return S(h,21,a,q,(e,s,C)=>{var o=A(),i=n(o),v=n(i),E=n(v,!0);t(v),t(i),t(o),b(y=>{p(i,"href",m(s).href),p(i,"target",m(s).target),_(i,1,y,"svelte-1ihiex7"),D(E,m(s).label)},[()=>z(["mc-link","mc-link--m","mc-link--inline",r()&&`mc-link--${r()}`,k(C)&&"mc-breadcrumb__current"])]),x(e,o)}),t(h),t(l),b(()=>_(l,1,`mc-breadcrumb mc-breadcrumb--${r()}`,"svelte-1ihiex7")),x(d,l),j(w)}customElements.define("m-breadcrumb",L(H,{appearance:{},links:{}},[],[],!0));
|
|
11
8
|
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sources":["../../../src/components/breadcrumb/Breadcrumb.svelte"],"sourcesContent":["<svelte:options\n customElement={{\n tag: 'm-breadcrumb'
|
|
1
|
+
{"version":3,"file":"Breadcrumb.js","sources":["../../../src/components/breadcrumb/Breadcrumb.svelte"],"sourcesContent":["<svelte:options\n customElement={{\n tag: 'm-breadcrumb',\n }}\n/>\n\n<script lang=\"ts\">\n /**\n * A breadcrumb is a navigation help that displays the hierarchical path of the current page within a website or application. It helps users understand their location and allows them to navigate back to previous levels easily. Breadcrumbs improve usability and accessibility, especially in multi-level websites, dashboards, and e-commerce platforms.\n */\n interface Props {\n /**\n * Allows to define the breadcrumb appearance.\n */\n appearance: 'standard' | 'inverse';\n /**\n * Links of the breadcrumb.\n */\n links: Array<{\n /**\n * The label displayed for the link.\n */\n label: string;\n /**\n * URL for the link.\n */\n href: string;\n /**\n * Where to open the link.\n */\n target?: '_blank' | '_self' | '_parent' | '_top';\n }>;\n }\n\n let { appearance = 'standard', links }: Props = $props();\n\n const isLastLink = (index: number) => index === links.length - 1;\n</script>\n\n<nav\n class={`mc-breadcrumb mc-breadcrumb--${appearance}`}\n aria-label=\"Breadcrumb\"\n>\n <ol class=\"mc-breadcrumb__container\">\n {#each links as link, index (index)}\n <li class=\"mc-breadcrumb__item\">\n <a\n href={link.href}\n target={link.target}\n class={[\n 'mc-link',\n 'mc-link--m',\n 'mc-link--inline',\n appearance && `mc-link--${appearance}`,\n isLastLink(index) && 'mc-breadcrumb__current',\n ]}\n >\n <span class=\"mc-link__label\">{link.label}</span>\n </a>\n </li>\n {/each}\n </ol>\n</nav>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/breadcrumb';\n @use '@mozaic-ds/styles/components/link';\n</style>\n"],"names":["appearance","links","$.prop","$$props","isLastLink","index","$.each","ol","link","$.set_attribute","a","$.get","$.set_text","text"],"mappings":";;;;;;kxDAAA,gBAkCQ,IAAAA,qBAAa,UAAU,EAAEC,EAAKC,EAAAC,EAAA,QAAA,CAAA,QAE9BC,EAAcC,GAAkBA,IAAUJ,EAAK,EAAC,OAAS,uDAF5C,WAAU,wEAUpBK,OAAAA,EAAAC,EAAA,GAAAN,OAASO,EAAIH,IAAA,wDAGRI,EAAAC,EAAA,OAAAC,EAAAH,CAAI,EAAC,IAAI,EACPC,EAAAC,EAAA,SAAAC,EAAAH,CAAI,EAAC,MAAM,4BASWI,EAAAC,EAAAF,EAAAH,CAAI,EAAC,KAAK,WAPtC,UACA,aACA,kBACAR,iBAA0BA,EAAU,CAAA,GACpCI,EAAWC,CAAK,GAAK,4FAdQL,EAAU,CAAA,GAAA,gBAAA,CAAA,aAHnD"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/svelte';
|
|
3
|
+
import Breadcrumb from './Breadcrumb.svelte';
|
|
4
|
+
describe('m-breadcrumb component', () => {
|
|
5
|
+
const links = [
|
|
6
|
+
{ label: 'Home', href: '/' },
|
|
7
|
+
{ label: 'Category', href: '/category' },
|
|
8
|
+
{ label: 'Item', href: '/category/item', target: '_blank' },
|
|
9
|
+
];
|
|
10
|
+
it('renders with default appearance "standard"', () => {
|
|
11
|
+
const { container } = render(Breadcrumb, { props: { links } });
|
|
12
|
+
const nav = container.querySelector('nav.mc-breadcrumb');
|
|
13
|
+
expect(nav).toBeTruthy();
|
|
14
|
+
expect(nav?.classList.contains('mc-breadcrumb--standard')).toBe(true);
|
|
15
|
+
const items = container.querySelectorAll('li.mc-breadcrumb__item');
|
|
16
|
+
expect(items.length).toBe(links.length);
|
|
17
|
+
const anchors = container.querySelectorAll('a.mc-link');
|
|
18
|
+
expect(anchors[anchors.length - 1].classList.contains('mc-breadcrumb__current')).toBe(true);
|
|
19
|
+
});
|
|
20
|
+
it('renders with "inverse" appearance when set', () => {
|
|
21
|
+
const { container } = render(Breadcrumb, {
|
|
22
|
+
props: { links, appearance: 'inverse' },
|
|
23
|
+
});
|
|
24
|
+
const nav = container.querySelector('nav.mc-breadcrumb');
|
|
25
|
+
expect(nav?.classList.contains('mc-breadcrumb--inverse')).toBe(true);
|
|
26
|
+
const anchors = container.querySelectorAll('a.mc-link--inverse');
|
|
27
|
+
expect(anchors.length).toBe(links.length);
|
|
28
|
+
});
|
|
29
|
+
it('applies href and target attributes on links correctly', () => {
|
|
30
|
+
const { container } = render(Breadcrumb, { props: { links } });
|
|
31
|
+
links.forEach((link, i) => {
|
|
32
|
+
const anchor = container.querySelectorAll('a.mc-link')[i];
|
|
33
|
+
expect(anchor).toHaveAttribute('href', link.href);
|
|
34
|
+
if (link.target) {
|
|
35
|
+
expect(anchor).toHaveAttribute('target', link.target);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
expect(anchor).not.toHaveAttribute('target');
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.stories.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Breadcrumb.stories.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,QAAA,MAAM,IAAI,EAAE,IAmCX,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
|
|
@@ -3,39 +3,6 @@ import { ifDefined } from 'lit/directives/if-defined.js';
|
|
|
3
3
|
const meta = {
|
|
4
4
|
title: 'Navigation/Breadcrumb',
|
|
5
5
|
component: 'm-breadcrumb',
|
|
6
|
-
parameters: {
|
|
7
|
-
docs: {
|
|
8
|
-
description: {
|
|
9
|
-
component: 'A breadcrumb is a navigation help that displays the hierarchical path of the current page within a website or application. It helps users understand their location and allows them to navigate back to previous levels easily. Breadcrumbs improve usability and accessibility, especially in multi-level websites, dashboards, and e-commerce platforms.',
|
|
10
|
-
},
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
argTypes: {
|
|
14
|
-
appearance: {
|
|
15
|
-
description: 'Define the visual appearance of the breadcrumb',
|
|
16
|
-
control: { type: 'radio' },
|
|
17
|
-
options: ['standard', 'inverse'],
|
|
18
|
-
table: {
|
|
19
|
-
type: {
|
|
20
|
-
summary: 'standard | inverse',
|
|
21
|
-
},
|
|
22
|
-
defaultValue: {
|
|
23
|
-
summary: 'standard',
|
|
24
|
-
},
|
|
25
|
-
category: 'attributes',
|
|
26
|
-
},
|
|
27
|
-
},
|
|
28
|
-
links: {
|
|
29
|
-
description: 'List of breadcrumb links (label + href)',
|
|
30
|
-
control: 'object',
|
|
31
|
-
table: {
|
|
32
|
-
type: {
|
|
33
|
-
summary: '{ label: string; href: string; target?: _blank | _self | _parent | _top; }[]',
|
|
34
|
-
},
|
|
35
|
-
category: 'attributes',
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
},
|
|
39
6
|
args: {
|
|
40
7
|
links: [
|
|
41
8
|
{
|
|
@@ -55,12 +22,16 @@ const meta = {
|
|
|
55
22
|
href: '#',
|
|
56
23
|
},
|
|
57
24
|
],
|
|
58
|
-
|
|
25
|
+
},
|
|
26
|
+
argTypes: {
|
|
27
|
+
appearance: {
|
|
28
|
+
control: 'radio',
|
|
29
|
+
options: ['standard', 'inverse'],
|
|
30
|
+
},
|
|
59
31
|
},
|
|
60
32
|
render: (args) => html `
|
|
61
33
|
<m-breadcrumb
|
|
62
34
|
appearance=${ifDefined(args.appearance)}
|
|
63
|
-
aria-label=${args.ariaLabel}
|
|
64
35
|
.links=${args.links}
|
|
65
36
|
></m-breadcrumb>
|
|
66
37
|
`,
|