@mozaic-ds/web-components 1.2.0 → 1.4.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/dist/Condition20.js +2 -0
- package/dist/Condition20.js.map +1 -0
- package/dist/accordion-list.state.svelte.js +2 -0
- package/dist/accordion-list.state.svelte.js.map +1 -0
- package/dist/attributes.js +1 -1
- package/dist/attributes.js.map +1 -1
- package/dist/bundle.d.ts +11 -0
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +11 -0
- package/dist/components/accordionlist/AccordionList.js +50 -0
- package/dist/components/accordionlist/AccordionList.js.map +1 -0
- package/dist/components/accordionlist/AccordionList.spec.js +40 -0
- package/dist/components/accordionlist/AccordionList.stories.d.ts +15 -0
- package/dist/components/accordionlist/AccordionList.stories.d.ts.map +1 -0
- package/dist/components/accordionlist/AccordionList.stories.js +141 -0
- package/dist/components/accordionlist/AccordionList.svelte +441 -0
- package/dist/components/accordionlist/AccordionList.svelte.d.ts +47 -0
- package/dist/components/accordionlist/AccordionList.svelte.d.ts.map +1 -0
- package/dist/components/accordionlist/README.md +18 -0
- package/dist/components/accordionlist/accordion-list.state.svelte.d.ts +5 -0
- package/dist/components/accordionlist/accordion-list.state.svelte.d.ts.map +1 -0
- package/dist/components/accordionlist/accordion-list.state.svelte.js +6 -0
- package/dist/components/accordionlistItem/AccordionListItem.js +50 -0
- package/dist/components/accordionlistItem/AccordionListItem.js.map +1 -0
- package/dist/components/accordionlistItem/AccordionListItem.spec.js +75 -0
- package/dist/components/accordionlistItem/AccordionListItem.svelte +463 -0
- package/dist/components/accordionlistItem/AccordionListItem.svelte.d.ts +50 -0
- package/dist/components/accordionlistItem/AccordionListItem.svelte.d.ts.map +1 -0
- package/dist/components/accordionlistItem/README.md +29 -0
- package/dist/components/actionbottombar/ActionBottomBar.js +12 -0
- package/dist/components/actionbottombar/ActionBottomBar.js.map +1 -0
- package/dist/components/actionbottombar/ActionBottomBar.spec.js +20 -0
- package/dist/components/actionbottombar/ActionBottomBar.stories.d.ts +19 -0
- package/dist/components/actionbottombar/ActionBottomBar.stories.d.ts.map +1 -0
- package/dist/components/actionbottombar/ActionBottomBar.stories.js +131 -0
- package/dist/components/actionbottombar/ActionBottomBar.svelte +113 -0
- package/dist/components/actionbottombar/ActionBottomBar.svelte.d.ts +43 -0
- package/dist/components/actionbottombar/ActionBottomBar.svelte.d.ts.map +1 -0
- package/dist/components/actionbottombar/README.md +19 -0
- package/dist/components/actionlistbox/ActionListbox.js +10 -0
- package/dist/components/actionlistbox/ActionListbox.js.map +1 -0
- package/dist/components/actionlistbox/ActionListbox.spec.js +20 -0
- package/dist/components/actionlistbox/ActionListbox.stories.d.ts +12 -0
- package/dist/components/actionlistbox/ActionListbox.stories.d.ts.map +1 -0
- package/dist/components/actionlistbox/ActionListbox.stories.js +49 -0
- package/dist/components/actionlistbox/ActionListbox.svelte +213 -0
- package/dist/components/actionlistbox/ActionListbox.svelte.d.ts +37 -0
- package/dist/components/actionlistbox/ActionListbox.svelte.d.ts.map +1 -0
- package/dist/components/actionlistbox/README.md +23 -0
- package/dist/components/actionlistboxitem/ActionListboxItem.js +4 -0
- package/dist/components/actionlistboxitem/ActionListboxItem.js.map +1 -0
- package/dist/components/actionlistboxitem/ActionListboxItem.spec.js +37 -0
- package/dist/components/actionlistboxitem/ActionListboxItem.svelte +136 -0
- package/dist/components/actionlistboxitem/ActionListboxItem.svelte.d.ts +43 -0
- package/dist/components/actionlistboxitem/ActionListboxItem.svelte.d.ts.map +1 -0
- package/dist/components/actionlistboxitem/README.md +20 -0
- package/dist/components/avatar/Avatar.js +2 -2
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/avatar/Avatar.stories.d.ts +2 -1
- package/dist/components/avatar/Avatar.stories.d.ts.map +1 -1
- package/dist/components/avatar/Avatar.stories.js +3 -2
- package/dist/components/avatar/Avatar.svelte +14 -4
- package/dist/components/avatar/Avatar.svelte.d.ts +7 -1
- package/dist/components/avatar/Avatar.svelte.d.ts.map +1 -1
- package/dist/components/avatar/README.md +2 -1
- package/dist/components/breadcrumb/Breadcrumb.js +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.stories.d.ts +1 -0
- package/dist/components/breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.stories.js +1 -0
- package/dist/components/breadcrumb/Breadcrumb.svelte +3 -2
- package/dist/components/breadcrumb/Breadcrumb.svelte.d.ts +1 -0
- package/dist/components/breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/components/builtinmenu/BuiltInMenu.js +4 -0
- package/dist/components/builtinmenu/BuiltInMenu.js.map +1 -0
- package/dist/components/builtinmenu/BuiltInMenu.stories.d.ts +11 -0
- package/dist/components/builtinmenu/BuiltInMenu.stories.d.ts.map +1 -0
- package/dist/components/builtinmenu/BuiltInMenu.stories.js +61 -0
- package/dist/components/builtinmenu/BuiltInMenu.svelte +142 -0
- package/dist/components/builtinmenu/BuiltInMenu.svelte.d.ts +41 -0
- package/dist/components/builtinmenu/BuiltInMenu.svelte.d.ts.map +1 -0
- package/dist/components/builtinmenu/BuiltinMenu.spec.js +19 -0
- package/dist/components/builtinmenu/README.md +18 -0
- package/dist/components/builtinmenuitem/BuiltInMenuItem.js +8 -0
- package/dist/components/builtinmenuitem/BuiltInMenuItem.js.map +1 -0
- package/dist/components/builtinmenuitem/BuiltInMenuItem.spec.js +36 -0
- package/dist/components/builtinmenuitem/BuiltInMenuItem.svelte +165 -0
- package/dist/components/builtinmenuitem/BuiltInMenuItem.svelte.d.ts +50 -0
- package/dist/components/builtinmenuitem/BuiltInMenuItem.svelte.d.ts.map +1 -0
- package/dist/components/builtinmenuitem/README.md +20 -0
- package/dist/components/button/Button.js +2 -2
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/Button.stories.d.ts +14 -1
- package/dist/components/button/Button.stories.d.ts.map +1 -1
- package/dist/components/button/Button.stories.js +146 -6
- package/dist/components/button/Button.svelte +43 -16
- package/dist/components/button/Button.svelte.d.ts +9 -0
- package/dist/components/button/Button.svelte.d.ts.map +1 -1
- package/dist/components/button/README.md +2 -2
- package/dist/components/callout/Callout.js +2 -2
- package/dist/components/callout/Callout.js.map +1 -1
- package/dist/components/callout/Callout.spec.js +4 -1
- package/dist/components/callout/Callout.stories.d.ts +5 -2
- package/dist/components/callout/Callout.stories.d.ts.map +1 -1
- package/dist/components/callout/Callout.stories.js +5 -2
- package/dist/components/callout/Callout.svelte +40 -5
- package/dist/components/callout/Callout.svelte.d.ts +14 -0
- package/dist/components/callout/Callout.svelte.d.ts.map +1 -1
- package/dist/components/callout/README.md +3 -0
- package/dist/components/carousel/Carousel.js +4 -0
- package/dist/components/carousel/Carousel.js.map +1 -0
- package/dist/components/carousel/Carousel.spec.js +49 -0
- package/dist/components/carousel/Carousel.stories.d.ts +9 -0
- package/dist/components/carousel/Carousel.stories.d.ts.map +1 -0
- package/dist/components/carousel/Carousel.stories.js +73 -0
- package/dist/components/carousel/Carousel.svelte +211 -0
- package/dist/components/carousel/Carousel.svelte.d.ts +56 -0
- package/dist/components/carousel/Carousel.svelte.d.ts.map +1 -0
- package/dist/components/carousel/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.stories.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.stories.js +6 -5
- package/dist/components/checkbox/Checkbox.svelte +7 -0
- package/dist/components/checkbox/Checkbox.svelte.d.ts +1 -0
- package/dist/components/checkbox/Checkbox.svelte.d.ts.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.js +4 -4
- package/dist/components/checkboxgroup/CheckboxGroup.js.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.stories.d.ts +1 -0
- package/dist/components/checkboxgroup/CheckboxGroup.stories.d.ts.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.stories.js +3 -2
- package/dist/components/checkboxgroup/CheckboxGroup.svelte +5 -2
- package/dist/components/checkboxgroup/CheckboxGroup.svelte.d.ts +1 -0
- package/dist/components/checkboxgroup/CheckboxGroup.svelte.d.ts.map +1 -1
- package/dist/components/checklistmenu/CheckListMenu.js +4 -0
- package/dist/components/checklistmenu/CheckListMenu.js.map +1 -0
- package/dist/components/checklistmenu/CheckListMenu.spec.js +33 -0
- package/dist/components/checklistmenu/CheckListMenu.stories.d.ts +8 -0
- package/dist/components/checklistmenu/CheckListMenu.stories.d.ts.map +1 -0
- package/dist/components/checklistmenu/CheckListMenu.stories.js +32 -0
- package/dist/components/checklistmenu/CheckListMenu.svelte +79 -0
- package/dist/components/checklistmenu/CheckListMenu.svelte.d.ts +27 -0
- package/dist/components/checklistmenu/CheckListMenu.svelte.d.ts.map +1 -0
- package/dist/components/checklistmenu/README.md +12 -0
- package/dist/components/circularprogressbar/CircularProgressbar.js +2 -2
- package/dist/components/circularprogressbar/CircularProgressbar.js.map +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.stories.d.ts +1 -0
- package/dist/components/circularprogressbar/CircularProgressbar.stories.d.ts.map +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.stories.js +1 -0
- package/dist/components/container/Container.js +2 -2
- package/dist/components/container/Container.js.map +1 -1
- package/dist/components/container/Container.stories.d.ts +1 -0
- package/dist/components/container/Container.stories.d.ts.map +1 -1
- package/dist/components/container/Container.stories.js +2 -3
- package/dist/components/container/Container.svelte +19 -3
- package/dist/components/container/Container.svelte.d.ts +5 -0
- package/dist/components/container/Container.svelte.d.ts.map +1 -1
- package/dist/components/container/README.md +1 -0
- package/dist/components/datepicker/Datepicker.js +3 -3
- package/dist/components/datepicker/Datepicker.js.map +1 -1
- package/dist/components/datepicker/Datepicker.stories.d.ts +1 -0
- package/dist/components/datepicker/Datepicker.stories.d.ts.map +1 -1
- package/dist/components/datepicker/Datepicker.stories.js +6 -4
- package/dist/components/datepicker/Datepicker.svelte +17 -3
- package/dist/components/datepicker/Datepicker.svelte.d.ts +1 -0
- package/dist/components/datepicker/Datepicker.svelte.d.ts.map +1 -1
- package/dist/components/divider/Divider.js +2 -2
- package/dist/components/divider/Divider.js.map +1 -1
- package/dist/components/divider/Divider.stories.d.ts +1 -0
- package/dist/components/divider/Divider.stories.d.ts.map +1 -1
- package/dist/components/divider/Divider.stories.js +1 -0
- package/dist/components/divider/Divider.svelte +19 -3
- package/dist/components/divider/Divider.svelte.d.ts +6 -0
- package/dist/components/divider/Divider.svelte.d.ts.map +1 -1
- package/dist/components/divider/README.md +1 -0
- package/dist/components/drawer/Drawer.js +2 -2
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/drawer/Drawer.stories.d.ts +2 -0
- package/dist/components/drawer/Drawer.stories.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.stories.js +5 -3
- package/dist/components/drawer/Drawer.svelte +47 -9
- package/dist/components/drawer/Drawer.svelte.d.ts +10 -0
- package/dist/components/drawer/Drawer.svelte.d.ts.map +1 -1
- package/dist/components/drawer/README.md +2 -0
- package/dist/components/field/Field.js +2 -2
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/field/Field.stories.d.ts +2 -0
- package/dist/components/field/Field.stories.d.ts.map +1 -1
- package/dist/components/field/Field.stories.js +5 -3
- package/dist/components/field/Field.svelte +16 -1
- package/dist/components/field/Field.svelte.d.ts +5 -0
- package/dist/components/field/Field.svelte.d.ts.map +1 -1
- package/dist/components/field/README.md +1 -0
- package/dist/components/fileuploader/FileUploader.js +4 -0
- package/dist/components/fileuploader/FileUploader.js.map +1 -0
- package/dist/components/fileuploader/FileUploader.spec.js +134 -0
- package/dist/components/fileuploader/FileUploader.stories.d.ts +17 -0
- package/dist/components/fileuploader/FileUploader.stories.d.ts.map +1 -0
- package/dist/components/fileuploader/FileUploader.stories.js +172 -0
- package/dist/components/fileuploader/FileUploader.svelte +816 -0
- package/dist/components/fileuploader/FileUploader.svelte.d.ts +125 -0
- package/dist/components/fileuploader/FileUploader.svelte.d.ts.map +1 -0
- package/dist/components/fileuploader/README.md +42 -0
- package/dist/components/fileuploaderitem/FileUploaderItem.js +5 -0
- package/dist/components/fileuploaderitem/FileUploaderItem.js.map +1 -0
- package/dist/components/fileuploaderitem/FileUploaderItem.spec.js +41 -0
- package/dist/components/fileuploaderitem/FileUploaderItem.svelte +298 -0
- package/dist/components/fileuploaderitem/FileUploaderItem.svelte.d.ts +62 -0
- package/dist/components/fileuploaderitem/FileUploaderItem.svelte.d.ts.map +1 -0
- package/dist/components/fileuploaderitem/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.stories.d.ts +1 -0
- package/dist/components/flag/Flag.stories.d.ts.map +1 -1
- package/dist/components/flag/Flag.stories.js +1 -0
- package/dist/components/flag/Flag.svelte +3 -2
- package/dist/components/flag/Flag.svelte.d.ts +1 -0
- package/dist/components/flag/Flag.svelte.d.ts.map +1 -1
- 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 +14 -6
- package/dist/components/iconbutton/IconButton.stories.d.ts.map +1 -1
- package/dist/components/iconbutton/IconButton.stories.js +114 -9
- package/dist/components/iconbutton/IconButton.svelte +34 -2
- package/dist/components/iconbutton/IconButton.svelte.d.ts +9 -0
- package/dist/components/iconbutton/IconButton.svelte.d.ts.map +1 -1
- package/dist/components/iconbutton/README.md +2 -0
- package/dist/components/kpiitem/KpiItem.js +2 -2
- package/dist/components/kpiitem/KpiItem.js.map +1 -1
- package/dist/components/kpiitem/KpiItem.stories.d.ts +1 -0
- package/dist/components/kpiitem/KpiItem.stories.d.ts.map +1 -1
- package/dist/components/kpiitem/KpiItem.stories.js +2 -0
- package/dist/components/kpiitem/KpiItem.svelte +4 -5
- package/dist/components/kpiitem/KpiItem.svelte.d.ts +1 -0
- package/dist/components/kpiitem/KpiItem.svelte.d.ts.map +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js +2 -2
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js.map +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.stories.d.ts +1 -0
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.stories.d.ts.map +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.stories.js +1 -0
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte +3 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte.d.ts +1 -0
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte.d.ts.map +1 -1
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.js +2 -2
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.js.map +1 -1
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.d.ts +1 -0
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.d.ts.map +1 -1
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.stories.js +1 -0
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte +3 -1
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte.d.ts +1 -0
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte.d.ts.map +1 -1
- package/dist/components/link/Link.js +2 -2
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/link/Link.stories.d.ts +3 -0
- package/dist/components/link/Link.stories.d.ts.map +1 -1
- package/dist/components/link/Link.stories.js +6 -3
- package/dist/components/link/Link.svelte +40 -8
- package/dist/components/link/Link.svelte.d.ts +10 -0
- package/dist/components/link/Link.svelte.d.ts.map +1 -1
- package/dist/components/link/README.md +2 -1
- package/dist/components/loader/Loader.js +2 -2
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/loader/Loader.stories.d.ts +1 -0
- package/dist/components/loader/Loader.stories.d.ts.map +1 -1
- package/dist/components/loader/Loader.stories.js +1 -0
- package/dist/components/loader/Loader.svelte +3 -1
- package/dist/components/loader/Loader.svelte.d.ts +1 -0
- package/dist/components/loader/Loader.svelte.d.ts.map +1 -1
- package/dist/components/loadingoverlay/LoadingOverlay.js +2 -2
- package/dist/components/loadingoverlay/LoadingOverlay.js.map +1 -1
- package/dist/components/loadingoverlay/LoadingOverlay.stories.d.ts +1 -0
- package/dist/components/loadingoverlay/LoadingOverlay.stories.d.ts.map +1 -1
- package/dist/components/loadingoverlay/LoadingOverlay.stories.js +2 -1
- package/dist/components/loadingoverlay/LoadingOverlay.svelte +11 -3
- package/dist/components/loadingoverlay/LoadingOverlay.svelte.d.ts +1 -0
- package/dist/components/loadingoverlay/LoadingOverlay.svelte.d.ts.map +1 -1
- package/dist/components/modal/Modal.js +2 -2
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/Modal.stories.d.ts +5 -2
- package/dist/components/modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/modal/Modal.stories.js +7 -4
- package/dist/components/modal/Modal.svelte +63 -8
- package/dist/components/modal/Modal.svelte.d.ts +18 -0
- package/dist/components/modal/Modal.svelte.d.ts.map +1 -1
- package/dist/components/modal/README.md +4 -0
- package/dist/components/numberbadge/NumberBadge.js +2 -2
- package/dist/components/numberbadge/NumberBadge.js.map +1 -1
- package/dist/components/numberbadge/NumberBadge.stories.d.ts +1 -0
- package/dist/components/numberbadge/NumberBadge.stories.d.ts.map +1 -1
- package/dist/components/numberbadge/NumberBadge.stories.js +1 -0
- package/dist/components/numberbadge/NumberBadge.svelte +6 -2
- package/dist/components/numberbadge/NumberBadge.svelte.d.ts +1 -0
- package/dist/components/numberbadge/NumberBadge.svelte.d.ts.map +1 -1
- package/dist/components/overlay/Overlay.js +2 -2
- package/dist/components/overlay/Overlay.js.map +1 -1
- package/dist/components/overlay/Overlay.stories.d.ts +1 -0
- package/dist/components/overlay/Overlay.stories.d.ts.map +1 -1
- package/dist/components/overlay/Overlay.stories.js +2 -1
- package/dist/components/overlay/Overlay.svelte +19 -3
- package/dist/components/overlay/Overlay.svelte.d.ts +5 -0
- package/dist/components/overlay/Overlay.svelte.d.ts.map +1 -1
- package/dist/components/overlay/README.md +1 -0
- package/dist/components/pagination/Pagination.js +8 -8
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/Pagination.stories.d.ts +1 -0
- package/dist/components/pagination/Pagination.stories.d.ts.map +1 -1
- package/dist/components/pagination/Pagination.stories.js +2 -1
- package/dist/components/pagination/Pagination.svelte +16 -6
- package/dist/components/pagination/Pagination.svelte.d.ts.map +1 -1
- package/dist/components/passwordinput/PasswordInput.js +4 -3
- package/dist/components/passwordinput/PasswordInput.js.map +1 -1
- package/dist/components/passwordinput/PasswordInput.stories.d.ts +1 -0
- package/dist/components/passwordinput/PasswordInput.stories.d.ts.map +1 -1
- package/dist/components/passwordinput/PasswordInput.stories.js +5 -4
- package/dist/components/passwordinput/PasswordInput.svelte +9 -0
- package/dist/components/passwordinput/PasswordInput.svelte.d.ts +1 -0
- package/dist/components/passwordinput/PasswordInput.svelte.d.ts.map +1 -1
- package/dist/components/phonenumber/PhoneNumber.js +22 -0
- package/dist/components/phonenumber/PhoneNumber.js.map +1 -0
- package/dist/components/phonenumber/PhoneNumber.spec.js +103 -0
- package/dist/components/phonenumber/PhoneNumber.stories.d.ts +14 -0
- package/dist/components/phonenumber/PhoneNumber.stories.d.ts.map +1 -0
- package/dist/components/phonenumber/PhoneNumber.stories.js +122 -0
- package/dist/components/phonenumber/PhoneNumber.svelte +905 -0
- package/dist/components/phonenumber/PhoneNumber.svelte.d.ts +61 -0
- package/dist/components/phonenumber/PhoneNumber.svelte.d.ts.map +1 -0
- package/dist/components/phonenumber/README.md +27 -0
- package/dist/components/pincode/Pincode.js +2 -2
- package/dist/components/pincode/Pincode.js.map +1 -1
- package/dist/components/pincode/Pincode.stories.d.ts +1 -0
- package/dist/components/pincode/Pincode.stories.d.ts.map +1 -1
- package/dist/components/pincode/Pincode.stories.js +4 -3
- package/dist/components/pincode/Pincode.svelte +12 -2
- package/dist/components/pincode/Pincode.svelte.d.ts.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.js +2 -2
- package/dist/components/quantityselector/QuantitySelector.js.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.stories.d.ts +1 -0
- package/dist/components/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.stories.js +4 -3
- package/dist/components/quantityselector/QuantitySelector.svelte +11 -2
- package/dist/components/quantityselector/QuantitySelector.svelte.d.ts +1 -0
- package/dist/components/quantityselector/QuantitySelector.svelte.d.ts.map +1 -1
- package/dist/components/radio/Radio.js +2 -2
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio/Radio.stories.d.ts +1 -0
- package/dist/components/radio/Radio.stories.d.ts.map +1 -1
- package/dist/components/radio/Radio.stories.js +4 -3
- package/dist/components/radio/Radio.svelte +13 -1
- package/dist/components/radio/Radio.svelte.d.ts +1 -0
- package/dist/components/radio/Radio.svelte.d.ts.map +1 -1
- package/dist/components/radiogroup/RadioGroup.js +2 -2
- package/dist/components/radiogroup/RadioGroup.js.map +1 -1
- package/dist/components/radiogroup/RadioGroup.stories.d.ts +1 -0
- package/dist/components/radiogroup/RadioGroup.stories.d.ts.map +1 -1
- package/dist/components/radiogroup/RadioGroup.stories.js +3 -2
- package/dist/components/radiogroup/RadioGroup.svelte +2 -0
- package/dist/components/radiogroup/RadioGroup.svelte.d.ts.map +1 -1
- package/dist/components/segmentedcontrol/SegmentedControl.js +2 -2
- package/dist/components/segmentedcontrol/SegmentedControl.js.map +1 -1
- package/dist/components/segmentedcontrol/SegmentedControl.stories.d.ts +1 -0
- package/dist/components/segmentedcontrol/SegmentedControl.stories.d.ts.map +1 -1
- package/dist/components/segmentedcontrol/SegmentedControl.stories.js +3 -1
- package/dist/components/segmentedcontrol/SegmentedControl.svelte +8 -1
- package/dist/components/segmentedcontrol/SegmentedControl.svelte.d.ts.map +1 -1
- package/dist/components/select/Select.js +2 -2
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.stories.d.ts +1 -0
- package/dist/components/select/Select.stories.d.ts.map +1 -1
- package/dist/components/select/Select.stories.js +4 -3
- package/dist/components/select/Select.svelte +6 -0
- package/dist/components/select/Select.svelte.d.ts +1 -0
- package/dist/components/select/Select.svelte.d.ts.map +1 -1
- package/dist/components/starrating/README.md +22 -0
- package/dist/components/starrating/StarRating.js +4 -0
- package/dist/components/starrating/StarRating.js.map +1 -0
- package/dist/components/starrating/StarRating.spec.js +108 -0
- package/dist/components/starrating/StarRating.stories.d.ts +14 -0
- package/dist/components/starrating/StarRating.stories.d.ts.map +1 -0
- package/dist/components/starrating/StarRating.stories.js +83 -0
- package/dist/components/starrating/StarRating.svelte +230 -0
- package/dist/components/starrating/StarRating.svelte.d.ts +47 -0
- package/dist/components/starrating/StarRating.svelte.d.ts.map +1 -0
- package/dist/components/statusbadge/StatusBadge.js +2 -2
- package/dist/components/statusbadge/StatusBadge.js.map +1 -1
- package/dist/components/statusbadge/StatusBadge.stories.d.ts +1 -0
- package/dist/components/statusbadge/StatusBadge.stories.d.ts.map +1 -1
- package/dist/components/statusbadge/StatusBadge.stories.js +1 -0
- package/dist/components/statusbadge/StatusBadge.svelte +3 -2
- package/dist/components/statusbadge/StatusBadge.svelte.d.ts +1 -0
- package/dist/components/statusbadge/StatusBadge.svelte.d.ts.map +1 -1
- package/dist/components/statusdot/StatusDot.js +2 -2
- package/dist/components/statusdot/StatusDot.js.map +1 -1
- package/dist/components/statusdot/StatusDot.stories.d.ts +1 -0
- package/dist/components/statusdot/StatusDot.stories.d.ts.map +1 -1
- package/dist/components/statusdot/StatusDot.stories.js +1 -0
- package/dist/components/statusdot/StatusDot.svelte +6 -2
- package/dist/components/statusdot/StatusDot.svelte.d.ts +1 -0
- package/dist/components/statusdot/StatusDot.svelte.d.ts.map +1 -1
- package/dist/components/statusmessage/StatusMessage.js +2 -2
- package/dist/components/statusmessage/StatusMessage.js.map +1 -1
- package/dist/components/statusmessage/StatusMessage.stories.d.ts +1 -0
- package/dist/components/statusmessage/StatusMessage.stories.d.ts.map +1 -1
- package/dist/components/statusmessage/StatusMessage.stories.js +1 -0
- package/dist/components/statusmessage/StatusMessage.svelte +12 -9
- package/dist/components/statusmessage/StatusMessage.svelte.d.ts +1 -0
- package/dist/components/statusmessage/StatusMessage.svelte.d.ts.map +1 -1
- package/dist/components/statusnotification/README.md +1 -0
- package/dist/components/statusnotification/StatusNotification.js +2 -2
- package/dist/components/statusnotification/StatusNotification.js.map +1 -1
- package/dist/components/statusnotification/StatusNotification.stories.d.ts +4 -0
- package/dist/components/statusnotification/StatusNotification.stories.d.ts.map +1 -1
- package/dist/components/statusnotification/StatusNotification.stories.js +5 -1
- package/dist/components/statusnotification/StatusNotification.svelte +35 -15
- package/dist/components/statusnotification/StatusNotification.svelte.d.ts +6 -0
- package/dist/components/statusnotification/StatusNotification.svelte.d.ts.map +1 -1
- package/dist/components/stepperbottombar/README.md +24 -0
- package/dist/components/stepperbottombar/StepperBottomBar.js +12 -0
- package/dist/components/stepperbottombar/StepperBottomBar.js.map +1 -0
- package/dist/components/stepperbottombar/StepperBottomBar.spec.js +106 -0
- package/dist/components/stepperbottombar/StepperBottomBar.stories.d.ts +9 -0
- package/dist/components/stepperbottombar/StepperBottomBar.stories.d.ts.map +1 -0
- package/dist/components/stepperbottombar/StepperBottomBar.stories.js +74 -0
- package/dist/components/stepperbottombar/StepperBottomBar.svelte +532 -0
- package/dist/components/stepperbottombar/StepperBottomBar.svelte.d.ts +41 -0
- package/dist/components/stepperbottombar/StepperBottomBar.svelte.d.ts.map +1 -0
- package/dist/components/steppercompact/StepperCompact.js +2 -2
- package/dist/components/steppercompact/StepperCompact.js.map +1 -1
- package/dist/components/steppercompact/StepperCompact.stories.d.ts +1 -0
- package/dist/components/steppercompact/StepperCompact.stories.d.ts.map +1 -1
- package/dist/components/steppercompact/StepperCompact.stories.js +1 -0
- package/dist/components/stepperinline/README.md +11 -0
- package/dist/components/stepperinline/StepperInline.js +16 -0
- package/dist/components/stepperinline/StepperInline.js.map +1 -0
- package/dist/components/stepperinline/StepperInline.spec.js +83 -0
- package/dist/components/stepperinline/StepperInline.stories.d.ts +7 -0
- package/dist/components/stepperinline/StepperInline.stories.d.ts.map +1 -0
- package/dist/components/stepperinline/StepperInline.stories.js +23 -0
- package/dist/components/stepperinline/StepperInline.svelte +176 -0
- package/dist/components/stepperinline/StepperInline.svelte.d.ts +27 -0
- package/dist/components/stepperinline/StepperInline.svelte.d.ts.map +1 -0
- package/dist/components/tab/README.md +3 -1
- package/dist/components/tab/Tab.js +2 -2
- package/dist/components/tab/Tab.js.map +1 -1
- package/dist/components/tab/Tab.svelte +48 -16
- package/dist/components/tab/Tab.svelte.d.ts +9 -0
- package/dist/components/tab/Tab.svelte.d.ts.map +1 -1
- package/dist/components/tabs/README.md +1 -0
- package/dist/components/tabs/Tabs.js +2 -2
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tabs/Tabs.stories.d.ts +3 -0
- package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.stories.js +5 -2
- package/dist/components/tabs/Tabs.svelte +21 -4
- package/dist/components/tabs/Tabs.svelte.d.ts +5 -0
- package/dist/components/tabs/Tabs.svelte.d.ts.map +1 -1
- package/dist/components/tag/README.md +1 -0
- package/dist/components/tag/Tag.js +2 -2
- package/dist/components/tag/Tag.js.map +1 -1
- package/dist/components/tag/Tag.stories.d.ts +1 -0
- package/dist/components/tag/Tag.stories.d.ts.map +1 -1
- package/dist/components/tag/Tag.stories.js +3 -2
- package/dist/components/tag/Tag.svelte +46 -13
- package/dist/components/tag/Tag.svelte.d.ts +6 -0
- package/dist/components/tag/Tag.svelte.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.js +2 -2
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/Textarea.stories.d.ts +1 -0
- package/dist/components/textarea/Textarea.stories.d.ts.map +1 -1
- package/dist/components/textarea/Textarea.stories.js +4 -3
- package/dist/components/textarea/Textarea.svelte +14 -1
- package/dist/components/textarea/Textarea.svelte.d.ts +1 -0
- package/dist/components/textarea/Textarea.svelte.d.ts.map +1 -1
- package/dist/components/textinput/README.md +1 -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 +4 -1
- package/dist/components/textinput/Textinput.stories.d.ts +1 -0
- package/dist/components/textinput/Textinput.stories.d.ts.map +1 -1
- package/dist/components/textinput/Textinput.stories.js +5 -4
- package/dist/components/textinput/Textinput.svelte +26 -2
- package/dist/components/textinput/Textinput.svelte.d.ts +6 -0
- package/dist/components/textinput/Textinput.svelte.d.ts.map +1 -1
- package/dist/components/toaster/README.md +1 -0
- package/dist/components/toaster/Toaster.js +2 -2
- package/dist/components/toaster/Toaster.js.map +1 -1
- package/dist/components/toaster/Toaster.stories.d.ts +3 -0
- package/dist/components/toaster/Toaster.stories.d.ts.map +1 -1
- package/dist/components/toaster/Toaster.stories.js +4 -1
- package/dist/components/toaster/Toaster.svelte +34 -11
- package/dist/components/toaster/Toaster.svelte.d.ts +6 -0
- package/dist/components/toaster/Toaster.svelte.d.ts.map +1 -1
- package/dist/components/toggle/Toggle.js +2 -2
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components/toggle/Toggle.stories.d.ts +1 -0
- package/dist/components/toggle/Toggle.stories.d.ts.map +1 -1
- package/dist/components/toggle/Toggle.stories.js +3 -2
- package/dist/components/toggle/Toggle.svelte +20 -2
- package/dist/components/toggle/Toggle.svelte.d.ts +1 -0
- package/dist/components/toggle/Toggle.svelte.d.ts.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.js +2 -2
- package/dist/components/togglegroup/ToggleGroup.js.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.stories.d.ts +1 -0
- package/dist/components/togglegroup/ToggleGroup.stories.d.ts.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.stories.js +2 -1
- package/dist/components/togglegroup/ToggleGroup.svelte +1 -0
- package/dist/components/togglegroup/ToggleGroup.svelte.d.ts.map +1 -1
- package/dist/components/tooltip/README.md +1 -0
- package/dist/components/tooltip/Tooltip.js +2 -2
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.d.ts +1 -0
- package/dist/components/tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/tooltip/Tooltip.stories.js +2 -1
- package/dist/components/tooltip/Tooltip.svelte +21 -3
- package/dist/components/tooltip/Tooltip.svelte.d.ts +6 -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/{WebComponents/usingPresets.mdx → BrandPresets.mdx} +2 -24
- package/dist/documentation/Changelog.mdx +19 -0
- package/dist/documentation/Color.mdx +224 -0
- package/dist/documentation/Contributing.mdx +11 -5
- package/dist/documentation/GettingStarted.mdx +76 -0
- package/dist/documentation/Icon.stories.d.ts +10 -0
- package/dist/documentation/Icon.stories.d.ts.map +1 -0
- package/dist/documentation/Icon.stories.js +138 -0
- package/dist/documentation/Migration.mdx +5 -5
- package/dist/documentation/Welcome.mdx +52 -0
- 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/index-client.js +2 -0
- package/dist/index-client.js.map +1 -0
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/main.d.ts +11 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +11 -1
- package/dist/slot.js +1 -1
- package/dist/slot.js.map +1 -1
- package/dist/snippet.js +2 -0
- package/dist/snippet.js.map +1 -0
- package/dist/svelte-component.js +1 -1
- package/dist/svelte-element.js +2 -0
- package/dist/svelte-element.js.map +1 -0
- package/dist/this.js +1 -1
- package/dist/this.js.map +1 -1
- package/package.json +22 -22
- package/dist/Cross20.js +0 -2
- package/dist/Cross20.js.map +0 -1
- package/dist/Cross24.js +0 -2
- package/dist/Cross24.js.map +0 -1
- package/dist/CrossCircleFilled24.js +0 -2
- package/dist/CrossCircleFilled24.js.map +0 -1
- package/dist/documentation/Introduction.mdx +0 -109
- package/dist/documentation/SupportAndOnboarding.mdx +0 -70
- package/dist/documentation/Svelte/Introduction.mdx +0 -76
- package/dist/documentation/Svelte/usingIcons.mdx +0 -98
- package/dist/documentation/Svelte/usingPresets.mdx +0 -134
- package/dist/documentation/WebComponents/Introduction.mdx +0 -52
- package/dist/documentation/WebComponents/usingIcons.mdx +0 -81
- package/dist/legacy.js +0 -2
- package/dist/legacy.js.map +0 -1
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
import './StarRating.svelte';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Indicators/Star Rating',
|
|
6
|
+
component: 'm-star-rating',
|
|
7
|
+
argTypes: {
|
|
8
|
+
appearance: {
|
|
9
|
+
control: 'inline-radio',
|
|
10
|
+
options: ['standard', 'accent'],
|
|
11
|
+
},
|
|
12
|
+
size: {
|
|
13
|
+
control: 'inline-radio',
|
|
14
|
+
options: ['s', 'm', 'l'],
|
|
15
|
+
},
|
|
16
|
+
target: {
|
|
17
|
+
control: 'radio',
|
|
18
|
+
options: ['_self', '_blank', '_parent', '_top'],
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
args: {
|
|
22
|
+
rating: 3.5,
|
|
23
|
+
appearance: 'accent',
|
|
24
|
+
readonly: true,
|
|
25
|
+
},
|
|
26
|
+
render: (args) => {
|
|
27
|
+
return html `
|
|
28
|
+
<m-star-rating
|
|
29
|
+
rating=${args.rating}
|
|
30
|
+
?readonly=${args.readonly}
|
|
31
|
+
size=${ifDefined(args.size)}
|
|
32
|
+
?compact=${args.compact}
|
|
33
|
+
appearance=${ifDefined(args.appearance)}
|
|
34
|
+
text=${ifDefined(args.text)}
|
|
35
|
+
href=${ifDefined(args.href)}
|
|
36
|
+
target=${ifDefined(args.target)}
|
|
37
|
+
></m-star-rating>
|
|
38
|
+
`;
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
export default meta;
|
|
42
|
+
export const Default = {};
|
|
43
|
+
export const AsInput = {
|
|
44
|
+
args: {
|
|
45
|
+
readonly: false,
|
|
46
|
+
rating: 0,
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
export const SizeM = {
|
|
50
|
+
args: {
|
|
51
|
+
size: 'm',
|
|
52
|
+
},
|
|
53
|
+
};
|
|
54
|
+
export const SizeL = {
|
|
55
|
+
args: {
|
|
56
|
+
size: 'l',
|
|
57
|
+
},
|
|
58
|
+
};
|
|
59
|
+
export const StandardAppearance = {
|
|
60
|
+
args: {
|
|
61
|
+
appearance: 'standard',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
export const WithText = {
|
|
65
|
+
args: {
|
|
66
|
+
appearance: 'accent',
|
|
67
|
+
text: 'Additional text',
|
|
68
|
+
},
|
|
69
|
+
};
|
|
70
|
+
export const WithLink = {
|
|
71
|
+
args: {
|
|
72
|
+
appearance: 'accent',
|
|
73
|
+
text: 'Additional text',
|
|
74
|
+
href: '#',
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
export const CompactModeWithText = {
|
|
78
|
+
args: {
|
|
79
|
+
compact: true,
|
|
80
|
+
appearance: 'accent',
|
|
81
|
+
text: '(35)',
|
|
82
|
+
},
|
|
83
|
+
};
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
<svelte:options
|
|
2
|
+
customElement={{
|
|
3
|
+
tag: 'm-star-rating',
|
|
4
|
+
props: {
|
|
5
|
+
readonly: { reflect: true, type: 'Boolean', attribute: 'readonly' },
|
|
6
|
+
compact: { reflect: true, type: 'Boolean', attribute: 'compact' },
|
|
7
|
+
},
|
|
8
|
+
extend: customElementForwardEvents,
|
|
9
|
+
}}
|
|
10
|
+
/>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
import { customElementForwardEvents } from '../../utils';
|
|
14
|
+
import { Star24, StarFilled24, StarHalf24 } from '@mozaic-ds/icons-svelte';
|
|
15
|
+
/**
|
|
16
|
+
* A Star rating visually represents a score or evaluation and can be used to display a rating or allow users to rate an item, such as a product or service. It serves two main purposes: collecting user feedback by enabling individuals to express their experience and providing social proof by displaying ratings from other users to assist decision-making. Rating Stars are commonly found in e-commerce, review systems, and feedback interfaces, offering a quick and intuitive way to assess quality or satisfaction.
|
|
17
|
+
*/
|
|
18
|
+
interface Props {
|
|
19
|
+
[key: string]: any;
|
|
20
|
+
/**
|
|
21
|
+
* The current rating value of the component.
|
|
22
|
+
*/
|
|
23
|
+
rating: number;
|
|
24
|
+
/**
|
|
25
|
+
* Determines whether the rating is interactive or read-only.
|
|
26
|
+
* When true, all user interactions (click, hover, keyboard) are disabled.
|
|
27
|
+
* Automatically set to true when `compact`, `href`, or `information` are provided.
|
|
28
|
+
*/
|
|
29
|
+
readonly?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Defines the visual size of the star icons and the accompanying text.
|
|
32
|
+
*/
|
|
33
|
+
size?: 's' | 'm' | 'l';
|
|
34
|
+
/**
|
|
35
|
+
* Enables a compact display mode that shows only one star instead of five.
|
|
36
|
+
* Typically used for summaries or quick visual cues.
|
|
37
|
+
* When enabled, the component automatically becomes read-only.
|
|
38
|
+
*/
|
|
39
|
+
compact?: boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Specifies the color scheme of the stars.
|
|
42
|
+
*/
|
|
43
|
+
appearance?: 'standard' | 'accent';
|
|
44
|
+
/**
|
|
45
|
+
* Optional text displayed next to the star rating.
|
|
46
|
+
* If provided, the component automatically becomes read-only.
|
|
47
|
+
*/
|
|
48
|
+
text?: string;
|
|
49
|
+
/**
|
|
50
|
+
* URL for the link.
|
|
51
|
+
*/
|
|
52
|
+
href?: string;
|
|
53
|
+
/**
|
|
54
|
+
* Where to open the link.
|
|
55
|
+
*/
|
|
56
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
let {
|
|
60
|
+
rating = $bindable(),
|
|
61
|
+
readonly,
|
|
62
|
+
size = 'm',
|
|
63
|
+
compact,
|
|
64
|
+
appearance = 'standard',
|
|
65
|
+
text,
|
|
66
|
+
href,
|
|
67
|
+
target,
|
|
68
|
+
}: Props = $props();
|
|
69
|
+
|
|
70
|
+
let hoverValue: number | null = $state(null);
|
|
71
|
+
const rootTag = $derived(href ? 'a' : 'div');
|
|
72
|
+
|
|
73
|
+
const isReadonly = $derived([readonly, compact, href, text].some(Boolean));
|
|
74
|
+
|
|
75
|
+
const classObject = $derived({
|
|
76
|
+
'mc-star-rating': true,
|
|
77
|
+
'mc-star-rating--link': href,
|
|
78
|
+
'mc-star-rating--slider': !isReadonly,
|
|
79
|
+
[`mc-star-rating--${size}`]: size,
|
|
80
|
+
[`mc-star-rating--${appearance}`]: appearance,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const displayValue = $derived(hoverValue ?? rating);
|
|
84
|
+
const maxValue = $derived(compact ? 1 : 5);
|
|
85
|
+
|
|
86
|
+
function getStarComponent(index: number) {
|
|
87
|
+
if (compact || displayValue >= index + 1) {
|
|
88
|
+
return StarFilled24;
|
|
89
|
+
} else if (isReadonly && displayValue >= index + 0.5) {
|
|
90
|
+
return StarHalf24;
|
|
91
|
+
} else {
|
|
92
|
+
return Star24;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function onHover(index: number) {
|
|
97
|
+
hoverValue = index + 1;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
function clearHover() {
|
|
101
|
+
hoverValue = null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function onClick(index: number) {
|
|
105
|
+
rating = index + 1;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
function onKeydown(e: KeyboardEvent) {
|
|
109
|
+
const key = e.key;
|
|
110
|
+
let newValue = Math.floor(rating);
|
|
111
|
+
|
|
112
|
+
if (key === 'ArrowRight') {
|
|
113
|
+
newValue = Math.min(maxValue, newValue + 1);
|
|
114
|
+
} else if (key === 'ArrowLeft') {
|
|
115
|
+
newValue = Math.max(1, newValue - 1);
|
|
116
|
+
} else return;
|
|
117
|
+
|
|
118
|
+
rating = newValue;
|
|
119
|
+
|
|
120
|
+
e.preventDefault();
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const wrapperAttrs = $derived(
|
|
124
|
+
isReadonly
|
|
125
|
+
? {
|
|
126
|
+
tabindex: -1,
|
|
127
|
+
}
|
|
128
|
+
: {
|
|
129
|
+
onkeydown: onKeydown,
|
|
130
|
+
onmouseleave: clearHover,
|
|
131
|
+
onblur: clearHover,
|
|
132
|
+
tabindex: 0,
|
|
133
|
+
'aria-valuemin': 0,
|
|
134
|
+
'aria-valuemax': maxValue,
|
|
135
|
+
'aria-valuenow': rating,
|
|
136
|
+
'aria-readonly': false,
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
</script>
|
|
140
|
+
|
|
141
|
+
<svelte:element this={rootTag} {href} {target} class={classObject}>
|
|
142
|
+
<div
|
|
143
|
+
class="mc-star-rating__wrapper"
|
|
144
|
+
role={isReadonly ? 'img' : 'slider'}
|
|
145
|
+
aria-label={`Note ${displayValue} sur ${maxValue}`}
|
|
146
|
+
{...wrapperAttrs}
|
|
147
|
+
>
|
|
148
|
+
{#each Array.from({ length: maxValue }).keys() as index (index)}
|
|
149
|
+
{@const Star = getStarComponent(index)}
|
|
150
|
+
|
|
151
|
+
<span
|
|
152
|
+
class="mc-star-rating__icon"
|
|
153
|
+
{...!isReadonly
|
|
154
|
+
? {
|
|
155
|
+
onmousemove: () => onHover(index),
|
|
156
|
+
onclick: () => onClick(index),
|
|
157
|
+
}
|
|
158
|
+
: {}}
|
|
159
|
+
>
|
|
160
|
+
<Star />
|
|
161
|
+
</span>
|
|
162
|
+
{/each}
|
|
163
|
+
</div>
|
|
164
|
+
|
|
165
|
+
{#if text || href}
|
|
166
|
+
<span class="mc-star-rating__info">
|
|
167
|
+
{text || href}
|
|
168
|
+
</span>
|
|
169
|
+
{/if}
|
|
170
|
+
</svelte:element>
|
|
171
|
+
|
|
172
|
+
<style>/**
|
|
173
|
+
* Do not edit directly, this file was auto-generated.
|
|
174
|
+
*/
|
|
175
|
+
.mc-star-rating {
|
|
176
|
+
display: inline-flex;
|
|
177
|
+
align-items: center;
|
|
178
|
+
gap: 0.5rem;
|
|
179
|
+
}
|
|
180
|
+
.mc-star-rating--standard .mc-star-rating__icon {
|
|
181
|
+
fill: var(--star-rating-color-icon-standard, #000000);
|
|
182
|
+
}
|
|
183
|
+
.mc-star-rating--accent .mc-star-rating__icon {
|
|
184
|
+
fill: var(--star-rating-color-icon-accent, #ea7315);
|
|
185
|
+
}
|
|
186
|
+
.mc-star-rating--slider {
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
}
|
|
189
|
+
.mc-star-rating--link {
|
|
190
|
+
text-decoration: none;
|
|
191
|
+
cursor: pointer;
|
|
192
|
+
}
|
|
193
|
+
.mc-star-rating--link:not(:hover) .mc-star-rating__info {
|
|
194
|
+
text-decoration: underline;
|
|
195
|
+
}
|
|
196
|
+
.mc-star-rating--s .mc-star-rating__icon {
|
|
197
|
+
width: 1.25rem;
|
|
198
|
+
height: 1.25rem;
|
|
199
|
+
}
|
|
200
|
+
.mc-star-rating--s .mc-star-rating__info {
|
|
201
|
+
font-size: var(--font-size-100, 0.875rem);
|
|
202
|
+
}
|
|
203
|
+
.mc-star-rating--m .mc-star-rating__icon {
|
|
204
|
+
width: 1.5rem;
|
|
205
|
+
height: 1.5rem;
|
|
206
|
+
}
|
|
207
|
+
.mc-star-rating--m .mc-star-rating__info {
|
|
208
|
+
font-size: var(--font-size-150, 1rem);
|
|
209
|
+
}
|
|
210
|
+
.mc-star-rating--l .mc-star-rating__icon {
|
|
211
|
+
width: 2rem;
|
|
212
|
+
height: 2rem;
|
|
213
|
+
}
|
|
214
|
+
.mc-star-rating--l .mc-star-rating__info {
|
|
215
|
+
font-size: var(--font-size-200, 1.125rem);
|
|
216
|
+
}
|
|
217
|
+
.mc-star-rating__wrapper {
|
|
218
|
+
display: flex;
|
|
219
|
+
align-items: center;
|
|
220
|
+
}
|
|
221
|
+
.mc-star-rating__info {
|
|
222
|
+
font-weight: var(--font-weight-medium, 600);
|
|
223
|
+
line-height: var(--line-height-s, 1.3);
|
|
224
|
+
color: var(--star-rating-color-text, #000000);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.mc-star-rating__icon :global(svg) {
|
|
228
|
+
height: 100%;
|
|
229
|
+
width: 100%;
|
|
230
|
+
}</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Star rating visually represents a score or evaluation and can be used to display a rating or allow users to rate an item, such as a product or service. It serves two main purposes: collecting user feedback by enabling individuals to express their experience and providing social proof by displaying ratings from other users to assist decision-making. Rating Stars are commonly found in e-commerce, review systems, and feedback interfaces, offering a quick and intuitive way to assess quality or satisfaction.
|
|
3
|
+
*/
|
|
4
|
+
interface Props {
|
|
5
|
+
[key: string]: any;
|
|
6
|
+
/**
|
|
7
|
+
* The current rating value of the component.
|
|
8
|
+
*/
|
|
9
|
+
rating: number;
|
|
10
|
+
/**
|
|
11
|
+
* Determines whether the rating is interactive or read-only.
|
|
12
|
+
* When true, all user interactions (click, hover, keyboard) are disabled.
|
|
13
|
+
* Automatically set to true when `compact`, `href`, or `information` are provided.
|
|
14
|
+
*/
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Defines the visual size of the star icons and the accompanying text.
|
|
18
|
+
*/
|
|
19
|
+
size?: 's' | 'm' | 'l';
|
|
20
|
+
/**
|
|
21
|
+
* Enables a compact display mode that shows only one star instead of five.
|
|
22
|
+
* Typically used for summaries or quick visual cues.
|
|
23
|
+
* When enabled, the component automatically becomes read-only.
|
|
24
|
+
*/
|
|
25
|
+
compact?: boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Specifies the color scheme of the stars.
|
|
28
|
+
*/
|
|
29
|
+
appearance?: 'standard' | 'accent';
|
|
30
|
+
/**
|
|
31
|
+
* Optional text displayed next to the star rating.
|
|
32
|
+
* If provided, the component automatically becomes read-only.
|
|
33
|
+
*/
|
|
34
|
+
text?: string;
|
|
35
|
+
/**
|
|
36
|
+
* URL for the link.
|
|
37
|
+
*/
|
|
38
|
+
href?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Where to open the link.
|
|
41
|
+
*/
|
|
42
|
+
target?: '_self' | '_blank' | '_parent' | '_top';
|
|
43
|
+
}
|
|
44
|
+
declare const StarRating: import("svelte").Component<Props, {}, "rating">;
|
|
45
|
+
type StarRating = ReturnType<typeof StarRating>;
|
|
46
|
+
export default StarRating;
|
|
47
|
+
//# sourceMappingURL=StarRating.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StarRating.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/starrating/StarRating.svelte.ts"],"names":[],"mappings":"AAME;;GAEG;AACH,UAAU,KAAK;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;IACvB;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACnC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;CAClD;AA4HH,QAAA,MAAM,UAAU,iDAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as v,p as m,a as h,b as l,s as p,t as y,f as k,g as w,h as _,i as x,d as u,j as b,r as n,e as $}from"../../custom-element.js";import{a as S}from"../../attributes.js";import{S as z}from"../statusdot/StatusDot.js";var D=_('<div><!> <span class="mc-status-badge__label svelte-1oceydf"> </span></div>');const j={hash:"svelte-1oceydf",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-status-badge.svelte-1oceydf {background-color:var(--status-badge-color-background-info, #e1f3f9);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-info, #a7d9ed);font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-100, 0.875rem);display:inline-flex;align-items:center;gap:0.25rem;border-radius:var(--border-radius-s, 0.25rem);padding-right:0.5rem;padding-left:0.5rem;text-transform:lowercase;white-space:nowrap;min-height:1.5rem;}.mc-status-badge__label.svelte-1oceydf {color:var(--status-badge-color-label, #000000);}.mc-status-badge__label.svelte-1oceydf::first-letter {text-transform:uppercase;}.mc-status-badge--success.svelte-1oceydf {background-color:var(--status-badge-color-background-success, #ebf5de);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-success, #c5e39e);}.mc-status-badge--error.svelte-1oceydf {background-color:var(--status-badge-color-background-error, #fdeaea);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-error, #f8bcbb);}.mc-status-badge--warning.svelte-1oceydf {background-color:var(--status-badge-color-background-warning, #fdf1e8);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-warning, #f8d2b3);}.mc-status-badge--neutral.svelte-1oceydf {background-color:var(--status-badge-color-background-neutral, #f2f2f2);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-neutral, #cccccc);}.mc-status-dot.svelte-1oceydf {background-color:var(--status-dot-color-background-info, #0b96cc);height:0.5rem;width:0.5rem;border-radius:var(--border-radius-full, 100%);display:inline-block;}.mc-status-dot--s.svelte-1oceydf {height:0.25rem;width:0.25rem;}.mc-status-dot--l.svelte-1oceydf {height:1rem;width:1rem;}.mc-status-dot--success.svelte-1oceydf {background-color:var(--status-dot-color-background-success, #3f9e10);}.mc-status-dot--error.svelte-1oceydf {background-color:var(--status-dot-color-background-error, #ea302d);}.mc-status-dot--warning.svelte-1oceydf {background-color:var(--status-dot-color-background-warning, #ea7315);}.mc-status-dot--neutral.svelte-1oceydf {background-color:var(--status-dot-color-background-neutral, #808080);}`};function B(o,
|
|
3
|
+
*/.mc-status-badge.svelte-1oceydf {background-color:var(--status-badge-color-background-info, #e1f3f9);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-info, #a7d9ed);font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-100, 0.875rem);display:inline-flex;align-items:center;gap:0.25rem;border-radius:var(--border-radius-s, 0.25rem);padding-right:0.5rem;padding-left:0.5rem;text-transform:lowercase;white-space:nowrap;min-height:1.5rem;}.mc-status-badge__label.svelte-1oceydf {color:var(--status-badge-color-label, #000000);}.mc-status-badge__label.svelte-1oceydf::first-letter {text-transform:uppercase;}.mc-status-badge--success.svelte-1oceydf {background-color:var(--status-badge-color-background-success, #ebf5de);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-success, #c5e39e);}.mc-status-badge--error.svelte-1oceydf {background-color:var(--status-badge-color-background-error, #fdeaea);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-error, #f8bcbb);}.mc-status-badge--warning.svelte-1oceydf {background-color:var(--status-badge-color-background-warning, #fdf1e8);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-warning, #f8d2b3);}.mc-status-badge--neutral.svelte-1oceydf {background-color:var(--status-badge-color-background-neutral, #f2f2f2);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-neutral, #cccccc);}.mc-status-dot.svelte-1oceydf {background-color:var(--status-dot-color-background-info, #0b96cc);height:0.5rem;width:0.5rem;border-radius:var(--border-radius-full, 100%);display:inline-block;}.mc-status-dot--s.svelte-1oceydf {height:0.25rem;width:0.25rem;}.mc-status-dot--l.svelte-1oceydf {height:1rem;width:1rem;}.mc-status-dot--success.svelte-1oceydf {background-color:var(--status-dot-color-background-success, #3f9e10);}.mc-status-dot--error.svelte-1oceydf {background-color:var(--status-dot-color-background-error, #ea302d);}.mc-status-dot--warning.svelte-1oceydf {background-color:var(--status-dot-color-background-warning, #ea7315);}.mc-status-dot--neutral.svelte-1oceydf {background-color:var(--status-dot-color-background-neutral, #808080);}`};function B(o,e){m(e,!0),h(o,j);let t=l(e,"status",7,"info"),a=l(e,"label",7),i=x(e,["$$slots","$$events","$$legacy","$$host","status","label"]);var g={get status(){return t()},set status(s="info"){t(s),b()},get label(){return a()},set label(s){a(s),b()}},r=D();S(r,()=>({class:["mc-status-badge",`mc-status-badge--${t()}`],...i}),void 0,void 0,void 0,"svelte-1oceydf");var d=u(r);z(d,{get status(){return t()},size:"m"});var c=p(d,2),f=u(c,!0);return n(c),n(r),y(()=>$(f,a())),k(o,r),w(g)}customElements.define("m-status-badge",v(B,{status:{},label:{}},[],[],!0));
|
|
4
4
|
//# sourceMappingURL=StatusBadge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","sources":["../../../src/components/statusbadge/StatusBadge.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-badge' }} />\n\n<script lang=\"ts\">\n import StatusDot from '../statusdot/StatusDot.svelte';\n /**\n * A Status Badge is used to indicate the current status of an element, providing a clear and concise visual cue. The status can change dynamically based on updates, events, or conditions within the system. Status Badges help users quickly identify the state of an item, such as an order status, system health, or process completion. They are often color-coded to enhance readability and recognition.\n */\n interface Props {\n /**\n * Content of the status badge.\n */\n label: string;\n /**\n * Allows to define the status badge type.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral';\n }\n\n let { status = 'info', label }: Props = $props();\n</script>\n\n<div class={['mc-status-badge', `mc-status-badge--${status}`]}>\n <StatusDot {status} size=\"m\" />\n <span class=\"mc-status-badge__label\">{label}</span>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/status-badge';\n @use '@mozaic-ds/styles/components/status-dot';\n</style>\n"],"names":["status","label","$.prop","$$props","$.
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","sources":["../../../src/components/statusbadge/StatusBadge.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-badge' }} />\n\n<script lang=\"ts\">\n import StatusDot from '../statusdot/StatusDot.svelte';\n /**\n * A Status Badge is used to indicate the current status of an element, providing a clear and concise visual cue. The status can change dynamically based on updates, events, or conditions within the system. Status Badges help users quickly identify the state of an item, such as an order status, system health, or process completion. They are often color-coded to enhance readability and recognition.\n */\n interface Props {\n [key: string]: any;\n /**\n * Content of the status badge.\n */\n label: string;\n /**\n * Allows to define the status badge type.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral';\n }\n\n let { status = 'info', label, ...attrs }: Props = $props();\n</script>\n\n<div class={['mc-status-badge', `mc-status-badge--${status}`]} {...attrs}>\n <StatusDot {status} size=\"m\" />\n <span class=\"mc-status-badge__label\">{label}</span>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/status-badge';\n @use '@mozaic-ds/styles/components/status-dot';\n</style>\n"],"names":["status","label","$.prop","$$props","attrs","$.rest_props","div","root","StatusDot","node","span","$.sibling"],"mappings":";;6sEAEA,gBAiBQ,IAAAA,iBAAS,MAAM,EAAEC,EAAKC,EAAAC,EAAA,QAAA,CAAA,EAAKC,EAAKC,EAAAF,EAAA,0GAAvB,OAAM,2DAGtBG,EAAGC,EAAA,IAAHD,QAAY,MAAA,CAAA,sCAAuCN,EAAM,CAAA,EAAA,KAASI,mDAAlEE,CAAG,EACDE,EAASC,EAAA,qBAAET,EAAM,kBACjBU,EAAIC,EAAAF,EAAA,CAAA,MAAJC,EAAI,EAAA,WAAJA,CAAI,IAFNJ,CAAG,YAEoCL,EAAK,CAAA,CAAA,MAF5CK,CAAG,MAFI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.stories.d.ts","sourceRoot":"","sources":["../../../src/components/statusbadge/StatusBadge.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusBadge.stories.d.ts","sourceRoot":"","sources":["../../../src/components/statusbadge/StatusBadge.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,sBAAsB,CAAC;AAE9B,QAAA,MAAM,IAAI,EAAE,IAeX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,IAAI,EAAE,KAAU,CAAC;AAE9B,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* A Status Badge is used to indicate the current status of an element, providing a clear and concise visual cue. The status can change dynamically based on updates, events, or conditions within the system. Status Badges help users quickly identify the state of an item, such as an order status, system health, or process completion. They are often color-coded to enhance readability and recognition.
|
|
7
7
|
*/
|
|
8
8
|
interface Props {
|
|
9
|
+
[key: string]: any;
|
|
9
10
|
/**
|
|
10
11
|
* Content of the status badge.
|
|
11
12
|
*/
|
|
@@ -16,10 +17,10 @@
|
|
|
16
17
|
status?: 'info' | 'success' | 'warning' | 'error' | 'neutral';
|
|
17
18
|
}
|
|
18
19
|
|
|
19
|
-
let { status = 'info', label }: Props = $props();
|
|
20
|
+
let { status = 'info', label, ...attrs }: Props = $props();
|
|
20
21
|
</script>
|
|
21
22
|
|
|
22
|
-
<div class={['mc-status-badge', `mc-status-badge--${status}`]}>
|
|
23
|
+
<div class={['mc-status-badge', `mc-status-badge--${status}`]} {...attrs}>
|
|
23
24
|
<StatusDot {status} size="m" />
|
|
24
25
|
<span class="mc-status-badge__label">{label}</span>
|
|
25
26
|
</div>
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* A Status Badge is used to indicate the current status of an element, providing a clear and concise visual cue. The status can change dynamically based on updates, events, or conditions within the system. Status Badges help users quickly identify the state of an item, such as an order status, system health, or process completion. They are often color-coded to enhance readability and recognition.
|
|
3
3
|
*/
|
|
4
4
|
interface Props {
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
/**
|
|
6
7
|
* Content of the status badge.
|
|
7
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/statusbadge/StatusBadge.svelte.ts"],"names":[],"mappings":"AAKE;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CAC/D;AAmBH,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"StatusBadge.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/statusbadge/StatusBadge.svelte.ts"],"names":[],"mappings":"AAKE;;GAEG;AACH,UAAU,KAAK;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;CAC/D;AAmBH,QAAA,MAAM,WAAW,2CAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as l,p as n,a as
|
|
1
|
+
import{c as l,p as n,a as m,b as c,f as v,g,h as p,i as b,j as u}from"../../custom-element.js";import{a as h}from"../../attributes.js";var f=p("<div></div>");const k={hash:"svelte-14acsp3",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-status-dot.svelte-14acsp3 {background-color:var(--status-dot-color-background-info, #0b96cc);height:0.5rem;width:0.5rem;border-radius:var(--border-radius-full, 100%);display:inline-block;}.mc-status-dot--s.svelte-14acsp3 {height:0.25rem;width:0.25rem;}.mc-status-dot--l.svelte-14acsp3 {height:1rem;width:1rem;}.mc-status-dot--success.svelte-14acsp3 {background-color:var(--status-dot-color-background-success, #3f9e10);}.mc-status-dot--error.svelte-14acsp3 {background-color:var(--status-dot-color-background-error, #ea302d);}.mc-status-dot--warning.svelte-14acsp3 {background-color:var(--status-dot-color-background-warning, #ea7315);}.mc-status-dot--neutral.svelte-14acsp3 {background-color:var(--status-dot-color-background-neutral, #808080);}`};function w(o,t){n(t,!0),
|
|
3
|
+
*/.mc-status-dot.svelte-14acsp3 {background-color:var(--status-dot-color-background-info, #0b96cc);height:0.5rem;width:0.5rem;border-radius:var(--border-radius-full, 100%);display:inline-block;}.mc-status-dot--s.svelte-14acsp3 {height:0.25rem;width:0.25rem;}.mc-status-dot--l.svelte-14acsp3 {height:1rem;width:1rem;}.mc-status-dot--success.svelte-14acsp3 {background-color:var(--status-dot-color-background-success, #3f9e10);}.mc-status-dot--error.svelte-14acsp3 {background-color:var(--status-dot-color-background-error, #ea302d);}.mc-status-dot--warning.svelte-14acsp3 {background-color:var(--status-dot-color-background-warning, #ea7315);}.mc-status-dot--neutral.svelte-14acsp3 {background-color:var(--status-dot-color-background-neutral, #808080);}`};function w(o,t){n(t,!0),m(o,k);let s=c(t,"size",7,"m"),a=c(t,"status",7,"info"),d=b(t,["$$slots","$$events","$$legacy","$$host","size","status"]);var i={get size(){return s()},set size(e="m"){s(e),u()},get status(){return a()},set status(e="info"){a(e),u()}},r=f();return h(r,()=>({class:["mc-status-dot",`mc-status-dot--${s()}`,`mc-status-dot--${a()}`],...d}),void 0,void 0,void 0,"svelte-14acsp3"),v(o,r),g(i)}customElements.define("m-status-dot",l(w,{size:{},status:{}},[],[],!0));export{w as S};
|
|
4
4
|
//# sourceMappingURL=StatusDot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.js","sources":["../../../src/components/statusdot/StatusDot.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-dot' }} />\n\n<script lang=\"ts\">\n /**\n * A Status dot is a small visual indicator used to represent the state or condition of an element. It is often color-coded to convey different statuses at a glance, such as availability, activity, or urgency. Status Dots are commonly found in user presence indicators, system statuses, or process tracking to provide quick, unobtrusive feedback.\n */\n interface Props {\n /**\n * Allows to define the status dot type.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral';\n /**\n * Determines the size of the status dot.\n */\n size?: 's' | 'm' | 'l';\n }\n\n let { size = 'm', status = 'info' }: Props = $props();\n</script>\n\n<div
|
|
1
|
+
{"version":3,"file":"StatusDot.js","sources":["../../../src/components/statusdot/StatusDot.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-dot' }} />\n\n<script lang=\"ts\">\n /**\n * A Status dot is a small visual indicator used to represent the state or condition of an element. It is often color-coded to convey different statuses at a glance, such as availability, activity, or urgency. Status Dots are commonly found in user presence indicators, system statuses, or process tracking to provide quick, unobtrusive feedback.\n */\n interface Props {\n [key: string]: any;\n /**\n * Allows to define the status dot type.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral';\n /**\n * Determines the size of the status dot.\n */\n size?: 's' | 'm' | 'l';\n }\n\n let { size = 'm', status = 'info', ...attrs }: Props = $props();\n</script>\n\n<div\n class={['mc-status-dot', `mc-status-dot--${size}`, `mc-status-dot--${status}`]}\n {...attrs}\n></div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/status-dot';\n</style>\n"],"names":["size","status","attrs","$.rest_props","$$props","div","root","$.append","$$anchor"],"mappings":";;mwBAEA,gBAgBQ,IAAAA,eAAO,GAAG,EAAEC,iBAAS,MAAM,EAAKC,EAAKC,EAAAC,EAAA,qGAA9B,IAAG,iDAAW,OAAM,YAGlCC,EAAAC,EAAA,WAAAD,eACS,kCAAmCL,EAAI,CAAA,qBAAsBC,GAAM,OACvEC,2CAFLK,EAAAC,EAAAH,CAAA,MAFO"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.stories.d.ts","sourceRoot":"","sources":["../../../src/components/statusdot/StatusDot.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusDot.stories.d.ts","sourceRoot":"","sources":["../../../src/components/statusdot/StatusDot.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,oBAAoB,CAAC;AAE5B,QAAA,MAAM,IAAI,EAAE,IAmBX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,IAAI,EAAE,KAAU,CAAC;AAE9B,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* A Status dot is a small visual indicator used to represent the state or condition of an element. It is often color-coded to convey different statuses at a glance, such as availability, activity, or urgency. Status Dots are commonly found in user presence indicators, system statuses, or process tracking to provide quick, unobtrusive feedback.
|
|
6
6
|
*/
|
|
7
7
|
interface Props {
|
|
8
|
+
[key: string]: any;
|
|
8
9
|
/**
|
|
9
10
|
* Allows to define the status dot type.
|
|
10
11
|
*/
|
|
@@ -15,10 +16,13 @@
|
|
|
15
16
|
size?: 's' | 'm' | 'l';
|
|
16
17
|
}
|
|
17
18
|
|
|
18
|
-
let { size = 'm', status = 'info' }: Props = $props();
|
|
19
|
+
let { size = 'm', status = 'info', ...attrs }: Props = $props();
|
|
19
20
|
</script>
|
|
20
21
|
|
|
21
|
-
<div
|
|
22
|
+
<div
|
|
23
|
+
class={['mc-status-dot', `mc-status-dot--${size}`, `mc-status-dot--${status}`]}
|
|
24
|
+
{...attrs}
|
|
25
|
+
></div>
|
|
22
26
|
|
|
23
27
|
<style>/**
|
|
24
28
|
* Do not edit directly, this file was auto-generated.
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* A Status dot is a small visual indicator used to represent the state or condition of an element. It is often color-coded to convey different statuses at a glance, such as availability, activity, or urgency. Status Dots are commonly found in user presence indicators, system statuses, or process tracking to provide quick, unobtrusive feedback.
|
|
3
3
|
*/
|
|
4
4
|
interface Props {
|
|
5
|
+
[key: string]: any;
|
|
5
6
|
/**
|
|
6
7
|
* Allows to define the status dot type.
|
|
7
8
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/statusdot/StatusDot.svelte.ts"],"names":[],"mappings":"AAGE;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CACxB;AAeH,QAAA,MAAM,SAAS,2CAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"StatusDot.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/statusdot/StatusDot.svelte.ts"],"names":[],"mappings":"AAGE;;GAEG;AACH,UAAU,KAAK;IACb,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CACxB;AAeH,QAAA,MAAM,SAAS,2CAAwC,CAAC;AACxD,KAAK,SAAS,GAAG,UAAU,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,eAAe,SAAS,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as
|
|
1
|
+
import{c as S,p as $,a as k,b as g,s as L,t as M,f as v,g as q,h as d,i as D,d as n,j as f,q as E,r,e as I,x as W}from"../../custom-element.js";import{i as A}from"../../if.js";import{c as B}from"../../svelte-component.js";import{a as G}from"../../attributes.js";import{g as p,h as H,i as J,d as K}from"../../Condition20.js";import{L as N}from"../loader/Loader.js";var O=d('<span class="mc-status-message__icon svelte-o2wjin"><!></span>'),P=d('<div><!> <p class="mc-status-message__description svelte-o2wjin"> </p></div>');const Q={hash:"svelte-o2wjin",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-status-message.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-info, #0b96cc);}.mc-status-message.svelte-o2wjin {display:inline-flex;gap:0.25rem;align-items:center;}.mc-status-message__icon.svelte-o2wjin {width:1.5rem;height:1.5rem;}.mc-status-message__description.svelte-o2wjin {margin:0;font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);color:var(--
|
|
3
|
+
*/.mc-status-message.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-info, #0b96cc);}.mc-status-message.svelte-o2wjin {display:inline-flex;gap:0.25rem;align-items:center;}.mc-status-message__icon.svelte-o2wjin {width:1.5rem;height:1.5rem;}.mc-status-message__description.svelte-o2wjin {margin:0;font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);color:var(--status-message-color-text, #404040);}.mc-status-message--success.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-success, #3f9e10);}.mc-status-message--error.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-error, #ea302d);}.mc-status-message--warning.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-warning, #ea7315);}.mc-status-message--neutral.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-neutral, #808080);}`};function R(l,a){$(a,!0),k(l,Q);let i=g(a,"label",7),e=g(a,"status",7,"info"),_=D(a,["$$slots","$$events","$$legacy","$$host","label","status"]);const c=[{status:"info",component:p},{status:"success",component:H},{status:"warning",component:J},{status:"error",component:K},{status:"neutral",component:p}];function w(s){return c.find(t=>t.status===s)||c[0]}const h=W(()=>w(e()));var j={get label(){return i()},set label(s){i(s),f()},get status(){return e()},set status(s="info"){e(s),f()}},o=P();G(o,()=>({class:["mc-status-message",`mc-status-message--${e()}`],..._}),void 0,void 0,void 0,"svelte-o2wjin");var m=n(o);{var b=s=>{var t=O(),y=n(t);B(y,()=>E(h).component,(F,z)=>{z(F,{})}),r(t),v(s,t)},x=s=>{N(s,{size:"s"})};A(m,s=>{e()!=="inprogress"?s(b):s(x,!1)})}var u=L(m,2),C=n(u,!0);return r(u),r(o),M(()=>I(C,i())),v(l,o),q(j)}customElements.define("m-status-message",S(R,{label:{},status:{}},[],[],!0));
|
|
4
4
|
//# sourceMappingURL=StatusMessage.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMessage.js","sources":["../../../
|
|
1
|
+
{"version":3,"file":"StatusMessage.js","sources":["../../../src/components/statusmessage/StatusMessage.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-message' }} />\n\n<script lang=\"ts\">\n import {\n InfoCircleFilled24,\n WarningCircleFilled24,\n CrossCircleFilled24,\n CheckCircleFilled24,\n } from '@mozaic-ds/icons-svelte';\n import Loader from '../loader/Loader.svelte';\n /**\n * A Status Message is a compact component that combines an icon and concise text to communicate system states or user feedback in limited interface space. The icon and message work together as a unified structure to provide clear, immediate understanding of the current status. Status Messages are designed for contexts where space is constrained but clear communication is essential, offering quick recognition through color-coded icons paired with brief, actionable text.\n */\n interface Props {\n [key: string]: any;\n /**\n * Allows to define the status message style.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral' | 'inprogress';\n /**\n * Label of the status message.\n */\n label: string;\n }\n\n let { label, status = 'info', ...attrs }: Props = $props();\n\n const iconMap = [\n { status: 'info', component: InfoCircleFilled24 },\n { status: 'success', component: CheckCircleFilled24 },\n { status: 'warning', component: WarningCircleFilled24 },\n { status: 'error', component: CrossCircleFilled24 },\n { status: 'neutral', component: InfoCircleFilled24 },\n ];\n\n function getSelected(status: string) {\n return iconMap.find((icon) => icon.status === status) || iconMap[0];\n }\n\n const selected = $derived(getSelected(status));\n</script>\n\n<div class={['mc-status-message', `mc-status-message--${status}`]} {...attrs}>\n {#if status !== 'inprogress'}\n <span class=\"mc-status-message__icon\">\n <selected.component />\n </span>\n {:else}\n <Loader size=\"s\" />\n {/if}\n <p class=\"mc-status-message__description\">{label}</p>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/status-message';\n</style>\n"],"names":["label","$.prop","$$props","status","attrs","$.rest_props","iconMap","InfoCircleFilled24","CheckCircleFilled24","WarningCircleFilled24","CrossCircleFilled24","getSelected","icon","selected","$.derived","div","root","span","root_1","selected_component","$$anchor","Loader","$$render","consequent","alternate","p","$.sibling","node"],"mappings":";;6lCAEA,oBAuBQA,EAAKC,EAAAC,EAAA,QAAA,CAAA,EAAEC,iBAAS,MAAM,EAAKC,EAAKC,EAAAH,EAAA,mEAEhCI,EAAO,CACT,CAAA,OAAQ,OAAQ,UAAWC,CAAkB,EAC7C,CAAA,OAAQ,UAAW,UAAWC,CAAmB,EACjD,CAAA,OAAQ,UAAW,UAAWC,CAAqB,EACnD,CAAA,OAAQ,QAAS,UAAWC,CAAmB,EAC/C,CAAA,OAAQ,UAAW,UAAWH,CAAkB,YAG3CI,EAAYR,EAAgB,CAC5B,OAAAG,EAAQ,KAAMM,GAASA,EAAK,SAAWT,CAAM,GAAKG,EAAQ,CAAC,CACpE,OAEMO,EAAQC,EAAA,IAAYH,EAAYR,EAAM,CAAA,CAAA,8FAdtB,OAAM,YAiB7BY,EAAGC,EAAA,IAAHD,QAAY,MAAA,CAAA,0CAA2CZ,EAAM,CAAA,EAAA,KAASC,kDAAtEW,CAAG,iBAECE,EAAIC,EAAA,MAAJD,CAAI,iCACFE,EAAkBC,EAAA,EAAA,MADpBH,CAAI,MAAJA,CAAI,SAIJI,EAAMD,EAAA,CAAA,KAAA,GAAA,CAAA,WALJjB,EAAM,IAAK,aAAYmB,EAAAC,CAAA,EAAAD,EAAAE,EAAA,EAAA,QAO3BC,EAACC,EAAAC,EAAA,CAAA,MAADF,EAAC,EAAA,WAADA,CAAC,IARHV,CAAG,YAQyCf,EAAK,CAAA,CAAA,MARjDe,CAAG,MAFI"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusMessage.stories.d.ts","sourceRoot":"","sources":["../../../src/components/statusmessage/StatusMessage.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"StatusMessage.stories.d.ts","sourceRoot":"","sources":["../../../src/components/statusmessage/StatusMessage.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAGrE,OAAO,wBAAwB,CAAC;AAEhC,QAAA,MAAM,IAAI,EAAE,IAkBX,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,IAAI,EAAE,KAAU,CAAC;AAE9B,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
|