@mozaic-ds/web-components 1.0.0-alpha.0 → 1.0.0-alpha.2
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/package.json +34 -35
- package/public/attributes-Dd-ZbJDt.js +2 -0
- package/public/attributes-Dd-ZbJDt.js.map +1 -0
- package/public/bundle.js +11 -279
- package/public/components/badge/Badge.js +1 -1
- package/public/components/badge/Badge.js.map +1 -1
- package/public/components/badge/Badge.svelte +9 -12
- package/public/components/button/Button.js +1 -1
- package/public/components/button/Button.js.map +1 -1
- package/public/components/button/Button.svelte +70 -49
- package/public/components/button/IconButton.js +1 -1
- package/public/components/button/IconButton.js.map +1 -1
- package/public/components/checkbox/Checkbox.js +1 -1
- package/public/components/checkbox/Checkbox.js.map +1 -1
- package/public/components/checkbox/Checkbox.svelte +29 -31
- package/public/components/checkboxgroup/checkboxGroup.js +1 -1
- package/public/components/checkboxgroup/checkboxGroup.js.map +1 -1
- package/public/components/checkboxgroup/checkboxGroup.svelte +25 -35
- package/public/components/field/Field.js +1 -1
- package/public/components/field/Field.js.map +1 -1
- package/public/components/field/Field.svelte +31 -13
- package/public/components/iconbutton/IconButton.svelte +23 -13
- package/public/components/link/Link.js +1 -1
- package/public/components/link/Link.js.map +1 -1
- package/public/components/link/Link.svelte +1 -7
- package/public/components/loader/Loader.js +1 -1
- package/public/components/loader/Loader.js.map +1 -1
- package/public/components/loader/Loader.svelte +10 -5
- package/public/components/overlay/Overlay.js +1 -1
- package/public/components/overlay/Overlay.js.map +1 -1
- package/public/components/overlay/Overlay.svelte +8 -4
- package/public/components/overlay/OverlayLoader.js +1 -1
- package/public/components/overlay/OverlayLoader.js.map +1 -1
- package/public/components/overlayloader/OverlayLoader.svelte +8 -4
- package/public/components/quantityselector/QuantitySelector.js +1 -1
- package/public/components/quantityselector/QuantitySelector.js.map +1 -1
- package/public/components/quantityselector/QuantitySelector.svelte +47 -34
- package/public/components/radio/Radio.js +1 -1
- package/public/components/radio/Radio.js.map +1 -1
- package/public/components/radio/Radio.svelte +11 -22
- package/public/components/radiogroup/RadioGroup.js +1 -1
- package/public/components/radiogroup/RadioGroup.js.map +1 -1
- package/public/components/radiogroup/RadioGroup.svelte +25 -28
- package/public/components/select/Select.js +1 -1
- package/public/components/select/Select.js.map +1 -1
- package/public/components/select/Select.svelte +34 -30
- package/public/components/statusbadge/StatusBadge.js +1 -1
- package/public/components/statusbadge/StatusBadge.js.map +1 -1
- package/public/components/statusbadge/StatusBadge.svelte +6 -2
- package/public/components/statusbadge/StatusDot.js +1 -1
- package/public/components/statusbadge/StatusDot.js.map +1 -1
- package/public/components/statusdot/StatusDot.svelte +7 -3
- package/public/components/textarea/Textarea.js +1 -1
- package/public/components/textarea/Textarea.js.map +1 -1
- package/public/components/textarea/Textarea.svelte +30 -28
- package/public/components/textinput/Textinput.js +1 -1
- package/public/components/textinput/Textinput.js.map +1 -1
- package/public/components/textinput/Textinput.svelte +48 -50
- package/public/components/toggle/Toggle.js +1 -1
- package/public/components/toggle/Toggle.js.map +1 -1
- package/public/components/toggle/Toggle.svelte +19 -24
- package/public/custom-element-D6iR2OWc.js +2 -0
- package/public/custom-element-D6iR2OWc.js.map +1 -0
- package/public/each-BEbHCKXS.js +2 -0
- package/public/each-BEbHCKXS.js.map +1 -0
- package/public/html-BTWDDGk7.js +2 -0
- package/public/html-BTWDDGk7.js.map +1 -0
- package/public/if-CxjAhvpF.js +2 -0
- package/public/if-CxjAhvpF.js.map +1 -0
- package/public/input-D1i5U2EE.js +2 -0
- package/public/input-D1i5U2EE.js.map +1 -0
- package/public/main.d.ts +22 -56
- package/public/main.d.ts.map +1 -1
- package/public/slot-snFjRYH3.js +2 -0
- package/public/slot-snFjRYH3.js.map +1 -0
- package/public/utilities/ClickOutside.d.ts +0 -1
- package/public/utilities/ClickOutside.d.ts.map +1 -1
- package/public/utilities/EventForward.d.ts.map +1 -1
- package/public/EventForward-bb916157.js +0 -2
- package/public/EventForward-bb916157.js.map +0 -1
- package/public/EventHandler-f7ee47ca.js +0 -2
- package/public/EventHandler-f7ee47ca.js.map +0 -1
- package/public/components/accordion/Accordion.svelte +0 -98
- package/public/components/accordion/accordion.types.d.ts +0 -2
- package/public/components/accordion/accordion.types.d.ts.map +0 -1
- package/public/components/actionbar/ActionBar.svelte +0 -97
- package/public/components/autocomplete/Autocomplete.svelte +0 -442
- package/public/components/autocomplete/autocomplete.types.d.ts +0 -3
- package/public/components/autocomplete/autocomplete.types.d.ts.map +0 -1
- package/public/components/barchart/BarChart.svelte +0 -318
- package/public/components/bottombar/BottomBar.svelte +0 -18
- package/public/components/breadcrumb/Breadcrumb.svelte +0 -63
- package/public/components/breadcrumb/breadcrumb.types.d.ts +0 -7
- package/public/components/breadcrumb/breadcrumb.types.d.ts.map +0 -1
- package/public/components/card/Card.svelte +0 -56
- package/public/components/card/card.types.d.ts +0 -4
- package/public/components/card/card.types.d.ts.map +0 -1
- package/public/components/carousel/Carousel.svelte +0 -419
- package/public/components/carousel/carousel.types.d.ts +0 -19
- package/public/components/carousel/carousel.types.d.ts.map +0 -1
- package/public/components/chart/bar-chart.types.d.ts +0 -26
- package/public/components/chart/bar-chart.types.d.ts.map +0 -1
- package/public/components/chart/donut.types.d.ts +0 -13
- package/public/components/chart/donut.types.d.ts.map +0 -1
- package/public/components/chart/grouped-bar-chart.types.d.ts +0 -25
- package/public/components/chart/grouped-bar-chart.types.d.ts.map +0 -1
- package/public/components/chart/line-chart.types.d.ts +0 -14
- package/public/components/chart/line-chart.types.d.ts.map +0 -1
- package/public/components/chart/radar.types.d.ts +0 -10
- package/public/components/chart/radar.types.d.ts.map +0 -1
- package/public/components/datatable/DataTable.svelte +0 -935
- package/public/components/datatable/data.d.ts +0 -9
- package/public/components/datatable/data.d.ts.map +0 -1
- package/public/components/datatable/datatable-default-action.nested.svelte +0 -341
- package/public/components/datatable/datatable-default-edtion.nested.svelte +0 -64
- package/public/components/datatable/datatable-default-filter-tags.nested.svelte +0 -117
- package/public/components/datatable/datatable-default-footer.nested.svelte +0 -136
- package/public/components/datatable/datatable-default-selection-label.nested.svelte +0 -56
- package/public/components/datatable/datatable-default-selection.nested.svelte +0 -85
- package/public/components/datatable/datatable.types.d.ts +0 -170
- package/public/components/datatable/datatable.types.d.ts.map +0 -1
- package/public/components/donut/Donut.svelte +0 -439
- package/public/components/dropdown/Dropdown.svelte +0 -355
- package/public/components/fileuploader/FileUploader.svelte +0 -201
- package/public/components/fileuploader/fileuploader-result.nested.svelte +0 -118
- package/public/components/fileuploader-result/fileuploader-result.svelte +0 -118
- package/public/components/flag/Flag.svelte +0 -45
- package/public/components/flag/flag.types.d.ts +0 -2
- package/public/components/flag/flag.types.d.ts.map +0 -1
- package/public/components/groupedbarchart/GroupedBarChart.svelte +0 -446
- package/public/components/header/Header.svelte +0 -194
- package/public/components/header/Header.types.d.ts +0 -5
- package/public/components/header/Header.types.d.ts.map +0 -1
- package/public/components/hero/Hero.svelte +0 -58
- package/public/components/hero/hero.type.d.ts +0 -7
- package/public/components/hero/hero.type.d.ts.map +0 -1
- package/public/components/kpi/Kpi.svelte +0 -237
- package/public/components/layer/Layer.svelte +0 -121
- package/public/components/layer/layer.types.d.ts +0 -2
- package/public/components/layer/layer.types.d.ts.map +0 -1
- package/public/components/linechart/LineChart.svelte +0 -327
- package/public/components/listbox/Listbox.nested.svelte +0 -157
- package/public/components/listbox/Listbox.svelte +0 -101
- package/public/components/listbox/listbox.types.d.ts +0 -8
- package/public/components/listbox/listbox.types.d.ts.map +0 -1
- package/public/components/menu/Menu.svelte +0 -66
- package/public/components/menu/menu.types.d.ts +0 -9
- package/public/components/menu/menu.types.d.ts.map +0 -1
- package/public/components/modal/Modal.svelte +0 -92
- package/public/components/notification/Notification.svelte +0 -97
- package/public/components/notification/notification.types.d.ts +0 -14
- package/public/components/notification/notification.types.d.ts.map +0 -1
- package/public/components/optionbutton/OptionButton.svelte +0 -64
- package/public/components/optionbutton/optionbutton.types.d.ts +0 -10
- package/public/components/optionbutton/optionbutton.types.d.ts.map +0 -1
- package/public/components/pagination/Pagination.svelte +0 -125
- package/public/components/pagination/pagination.types.d.ts +0 -2
- package/public/components/pagination/pagination.types.d.ts.map +0 -1
- package/public/components/passwordinput/PasswordInput.svelte +0 -65
- package/public/components/passwordinput/passwordinput.types.d.ts +0 -6
- package/public/components/passwordinput/passwordinput.types.d.ts.map +0 -1
- package/public/components/phonenumber/PhoneNumber.svelte +0 -337
- package/public/components/phonenumber/phonenumber.types.d.ts +0 -15
- package/public/components/phonenumber/phonenumber.types.d.ts.map +0 -1
- package/public/components/price/Price.svelte +0 -224
- package/public/components/price/price.types.d.ts +0 -2
- package/public/components/price/price.types.d.ts.map +0 -1
- package/public/components/progressbar/ProgressBar.svelte +0 -53
- package/public/components/progressbar/progressbar.types.d.ts +0 -2
- package/public/components/progressbar/progressbar.types.d.ts.map +0 -1
- package/public/components/radar/Radar.svelte +0 -386
- package/public/components/ratings/ratings.types.d.ts +0 -2
- package/public/components/ratings/ratings.types.d.ts.map +0 -1
- package/public/components/segmentedcontrol/SegmentedControl.svelte +0 -61
- package/public/components/segmentedcontrol/segmentedControl.types.d.ts +0 -9
- package/public/components/segmentedcontrol/segmentedControl.types.d.ts.map +0 -1
- package/public/components/sidebar/Sidebar.svelte +0 -282
- package/public/components/sidebar/sidebar-feature-group.nested.svelte +0 -311
- package/public/components/sidebar/sidebar-feature.nested.svelte +0 -249
- package/public/components/sidebar/sidebar-section.nested.svelte +0 -138
- package/public/components/sidebar/sidebar-segment.nested.svelte +0 -136
- package/public/components/sidebar/sidebar-separator.nested.svelte +0 -30
- package/public/components/sidebar/sidebar-service.d.ts +0 -20
- package/public/components/sidebar/sidebar-service.d.ts.map +0 -1
- package/public/components/sidebar/sidebar-sub-features.nested.svelte +0 -118
- package/public/components/sidebar/sidebar-user.nested.svelte +0 -292
- package/public/components/sidebar/sidebar.types.d.ts +0 -44
- package/public/components/sidebar/sidebar.types.d.ts.map +0 -1
- package/public/components/stackedbarchart/StackedBarChart.svelte +0 -348
- package/public/components/starsinput/StarsInput.svelte +0 -77
- package/public/components/starsresult/StarsResult.svelte +0 -85
- package/public/components/stepper/Stepper.svelte +0 -97
- package/public/components/stepper/stepper.types.d.ts +0 -6
- package/public/components/stepper/stepper.types.d.ts.map +0 -1
- package/public/components/stepperbar/StepperBar.svelte +0 -101
- package/public/components/tabs/Tabs.svelte +0 -170
- package/public/components/tabs/tabs.types.d.ts +0 -14
- package/public/components/tabs/tabs.types.d.ts.map +0 -1
- package/public/components/tag/Tag.svelte +0 -118
- package/public/components/tag/tag.types.d.ts +0 -9
- package/public/components/tag/tag.types.d.ts.map +0 -1
- package/public/components/taglist/TagList.svelte +0 -84
- package/public/components/tooltip/Tooltip.svelte +0 -36
- package/public/components/tooltip/tooltip.types.d.ts +0 -2
- package/public/components/tooltip/tooltip.types.d.ts.map +0 -1
- package/public/each-45e2db5c.js +0 -2
- package/public/each-45e2db5c.js.map +0 -1
- package/public/index-c0bfe08f.js +0 -2
- package/public/index-c0bfe08f.js.map +0 -1
- package/public/spread-ed04f539.js +0 -2
- package/public/spread-ed04f539.js.map +0 -1
- package/public/stories/carousel/items.d.ts +0 -3
- package/public/stories/carousel/items.d.ts.map +0 -1
- package/public/utilities/ClickOutside.js +0 -2
- package/public/utilities/ClickOutside.js.map +0 -1
- package/public/utilities/DataTableUtilities.d.ts +0 -19
- package/public/utilities/DataTableUtilities.d.ts.map +0 -1
- package/public/utilities/DataTableUtilities.ts +0 -507
- package/public/utilities/EventForward.js +0 -2
- package/public/utilities/EventForward.js.map +0 -1
- package/public/utilities/additional-svelte-jsx.d.ts +0 -9
- package/public/utilities/components/accordion/accordion.types.d.ts +0 -2
- package/public/utilities/components/accordion/accordion.types.d.ts.map +0 -1
- package/public/utilities/components/autocomplete/autocomplete.types.d.ts +0 -3
- package/public/utilities/components/autocomplete/autocomplete.types.d.ts.map +0 -1
- package/public/utilities/components/badge/badge.types.d.ts +0 -3
- package/public/utilities/components/badge/badge.types.d.ts.map +0 -1
- package/public/utilities/components/breadcrumb/breadcrumb.types.d.ts +0 -7
- package/public/utilities/components/breadcrumb/breadcrumb.types.d.ts.map +0 -1
- package/public/utilities/components/button/button.types.d.ts +0 -13
- package/public/utilities/components/button/button.types.d.ts.map +0 -1
- package/public/utilities/components/card/card.types.d.ts +0 -4
- package/public/utilities/components/card/card.types.d.ts.map +0 -1
- package/public/utilities/components/carousel/carousel.types.d.ts +0 -19
- package/public/utilities/components/carousel/carousel.types.d.ts.map +0 -1
- package/public/utilities/components/chart/bar-chart.types.d.ts +0 -26
- package/public/utilities/components/chart/bar-chart.types.d.ts.map +0 -1
- package/public/utilities/components/chart/donut.types.d.ts +0 -13
- package/public/utilities/components/chart/donut.types.d.ts.map +0 -1
- package/public/utilities/components/chart/grouped-bar-chart.types.d.ts +0 -25
- package/public/utilities/components/chart/grouped-bar-chart.types.d.ts.map +0 -1
- package/public/utilities/components/chart/line-chart.types.d.ts +0 -14
- package/public/utilities/components/chart/line-chart.types.d.ts.map +0 -1
- package/public/utilities/components/chart/radar.types.d.ts +0 -10
- package/public/utilities/components/chart/radar.types.d.ts.map +0 -1
- package/public/utilities/components/checkboxgroup/checkboxgroup.types.d.ts +0 -11
- package/public/utilities/components/checkboxgroup/checkboxgroup.types.d.ts.map +0 -1
- package/public/utilities/components/datatable/data.d.ts +0 -9
- package/public/utilities/components/datatable/data.d.ts.map +0 -1
- package/public/utilities/components/datatable/datatable.types.d.ts +0 -170
- package/public/utilities/components/datatable/datatable.types.d.ts.map +0 -1
- package/public/utilities/components/flag/flag.types.d.ts +0 -2
- package/public/utilities/components/flag/flag.types.d.ts.map +0 -1
- package/public/utilities/components/header/Header.types.d.ts +0 -5
- package/public/utilities/components/header/Header.types.d.ts.map +0 -1
- package/public/utilities/components/hero/hero.type.d.ts +0 -7
- package/public/utilities/components/hero/hero.type.d.ts.map +0 -1
- package/public/utilities/components/layer/layer.types.d.ts +0 -2
- package/public/utilities/components/layer/layer.types.d.ts.map +0 -1
- package/public/utilities/components/link/link.types.d.ts +0 -4
- package/public/utilities/components/link/link.types.d.ts.map +0 -1
- package/public/utilities/components/listbox/listbox.types.d.ts +0 -8
- package/public/utilities/components/listbox/listbox.types.d.ts.map +0 -1
- package/public/utilities/components/loader/loader.types.d.ts +0 -3
- package/public/utilities/components/loader/loader.types.d.ts.map +0 -1
- package/public/utilities/components/menu/menu.types.d.ts +0 -9
- package/public/utilities/components/menu/menu.types.d.ts.map +0 -1
- package/public/utilities/components/notification/notification.types.d.ts +0 -14
- package/public/utilities/components/notification/notification.types.d.ts.map +0 -1
- package/public/utilities/components/optionbutton/optionbutton.types.d.ts +0 -10
- package/public/utilities/components/optionbutton/optionbutton.types.d.ts.map +0 -1
- package/public/utilities/components/pagination/pagination.types.d.ts +0 -2
- package/public/utilities/components/pagination/pagination.types.d.ts.map +0 -1
- package/public/utilities/components/passwordinput/passwordinput.types.d.ts +0 -6
- package/public/utilities/components/passwordinput/passwordinput.types.d.ts.map +0 -1
- package/public/utilities/components/phonenumber/phonenumber.types.d.ts +0 -15
- package/public/utilities/components/phonenumber/phonenumber.types.d.ts.map +0 -1
- package/public/utilities/components/price/price.types.d.ts +0 -2
- package/public/utilities/components/price/price.types.d.ts.map +0 -1
- package/public/utilities/components/progressbar/progressbar.types.d.ts +0 -2
- package/public/utilities/components/progressbar/progressbar.types.d.ts.map +0 -1
- package/public/utilities/components/radiogroup/radioGroup.types.d.ts +0 -9
- package/public/utilities/components/radiogroup/radioGroup.types.d.ts.map +0 -1
- package/public/utilities/components/ratings/ratings.types.d.ts +0 -2
- package/public/utilities/components/ratings/ratings.types.d.ts.map +0 -1
- package/public/utilities/components/segmentedcontrol/segmentedControl.types.d.ts +0 -9
- package/public/utilities/components/segmentedcontrol/segmentedControl.types.d.ts.map +0 -1
- package/public/utilities/components/select/select.types.d.ts +0 -9
- package/public/utilities/components/select/select.types.d.ts.map +0 -1
- package/public/utilities/components/sidebar/sidebar-service.d.ts +0 -20
- package/public/utilities/components/sidebar/sidebar-service.d.ts.map +0 -1
- package/public/utilities/components/sidebar/sidebar.types.d.ts +0 -44
- package/public/utilities/components/sidebar/sidebar.types.d.ts.map +0 -1
- package/public/utilities/components/statusbadge/badge.types.d.ts +0 -3
- package/public/utilities/components/statusbadge/badge.types.d.ts.map +0 -1
- package/public/utilities/components/stepper/stepper.types.d.ts +0 -6
- package/public/utilities/components/stepper/stepper.types.d.ts.map +0 -1
- package/public/utilities/components/tabs/tabs.types.d.ts +0 -14
- package/public/utilities/components/tabs/tabs.types.d.ts.map +0 -1
- package/public/utilities/components/tag/tag.types.d.ts +0 -9
- package/public/utilities/components/tag/tag.types.d.ts.map +0 -1
- package/public/utilities/components/textinput/textinput.types.d.ts +0 -3
- package/public/utilities/components/textinput/textinput.types.d.ts.map +0 -1
- package/public/utilities/components/toggle/toggle.types.d.ts +0 -2
- package/public/utilities/components/toggle/toggle.types.d.ts.map +0 -1
- package/public/utilities/components/tooltip/tooltip.types.d.ts +0 -2
- package/public/utilities/components/tooltip/tooltip.types.d.ts.map +0 -1
- package/public/utilities/main.d.ts +0 -60
- package/public/utilities/main.d.ts.map +0 -1
- package/public/utilities/sidebar-service.d.ts +0 -9
- package/public/utilities/sidebar-service.d.ts.map +0 -1
- package/public/utilities/sidebar-service.ts +0 -93
- package/public/utilities/stories/accordion/Accordion.stories.d.ts +0 -17
- package/public/utilities/stories/accordion/Accordion.stories.d.ts.map +0 -1
- package/public/utilities/stories/actionbar/ActionBar.stories.d.ts +0 -7
- package/public/utilities/stories/actionbar/ActionBar.stories.d.ts.map +0 -1
- package/public/utilities/stories/autocomplete/Autocomplete.stories.d.ts +0 -10
- package/public/utilities/stories/autocomplete/Autocomplete.stories.d.ts.map +0 -1
- package/public/utilities/stories/badge/Badge.stories.d.ts +0 -8
- package/public/utilities/stories/badge/Badge.stories.d.ts.map +0 -1
- package/public/utilities/stories/bottombar/BottomBar.stories.d.ts +0 -6
- package/public/utilities/stories/bottombar/BottomBar.stories.d.ts.map +0 -1
- package/public/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts +0 -7
- package/public/utilities/stories/breadcrumb/Breadcrumb.stories.d.ts.map +0 -1
- package/public/utilities/stories/button/Button.stories.d.ts +0 -8
- package/public/utilities/stories/button/Button.stories.d.ts.map +0 -1
- package/public/utilities/stories/button/IconButton.stories.d.ts +0 -7
- package/public/utilities/stories/button/IconButton.stories.d.ts.map +0 -1
- package/public/utilities/stories/card/Card.stories.d.ts +0 -7
- package/public/utilities/stories/card/Card.stories.d.ts.map +0 -1
- package/public/utilities/stories/carousel/Carousel.stories.d.ts +0 -8
- package/public/utilities/stories/carousel/Carousel.stories.d.ts.map +0 -1
- package/public/utilities/stories/carousel/items.d.ts +0 -3
- package/public/utilities/stories/carousel/items.d.ts.map +0 -1
- package/public/utilities/stories/chart/BarChart.stories.d.ts +0 -7
- package/public/utilities/stories/chart/BarChart.stories.d.ts.map +0 -1
- package/public/utilities/stories/chart/Donut.stories.d.ts +0 -7
- package/public/utilities/stories/chart/Donut.stories.d.ts.map +0 -1
- package/public/utilities/stories/chart/GroupedBarChart.stories.d.ts +0 -6
- package/public/utilities/stories/chart/GroupedBarChart.stories.d.ts.map +0 -1
- package/public/utilities/stories/chart/LineChart.stories.d.ts +0 -5
- package/public/utilities/stories/chart/LineChart.stories.d.ts.map +0 -1
- package/public/utilities/stories/chart/Radar.stories.d.ts +0 -7
- package/public/utilities/stories/chart/Radar.stories.d.ts.map +0 -1
- package/public/utilities/stories/chart/StackedBarChart.stories.d.ts +0 -6
- package/public/utilities/stories/chart/StackedBarChart.stories.d.ts.map +0 -1
- package/public/utilities/stories/checkbox/Checkbox.stories.d.ts +0 -9
- package/public/utilities/stories/checkbox/Checkbox.stories.d.ts.map +0 -1
- package/public/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts +0 -7
- package/public/utilities/stories/checkbox-group/Checkbox-group.stories.d.ts.map +0 -1
- package/public/utilities/stories/datatable/DataTable.stories.d.ts +0 -15
- package/public/utilities/stories/datatable/DataTable.stories.d.ts.map +0 -1
- package/public/utilities/stories/dropdown/Dropdown.stories.d.ts +0 -9
- package/public/utilities/stories/dropdown/Dropdown.stories.d.ts.map +0 -1
- package/public/utilities/stories/field/Field.stories.d.ts +0 -10
- package/public/utilities/stories/field/Field.stories.d.ts.map +0 -1
- package/public/utilities/stories/fileuploader/FileUploader.stories.d.ts +0 -11
- package/public/utilities/stories/fileuploader/FileUploader.stories.d.ts.map +0 -1
- package/public/utilities/stories/flag/Flag.stories.d.ts +0 -6
- package/public/utilities/stories/flag/Flag.stories.d.ts.map +0 -1
- package/public/utilities/stories/header/Header.stories.d.ts +0 -9
- package/public/utilities/stories/header/Header.stories.d.ts.map +0 -1
- package/public/utilities/stories/hero/Hero.stories.d.ts +0 -8
- package/public/utilities/stories/hero/Hero.stories.d.ts.map +0 -1
- package/public/utilities/stories/icon/Icon.stories.d.ts +0 -6
- package/public/utilities/stories/icon/Icon.stories.d.ts.map +0 -1
- package/public/utilities/stories/kpi/kpi.stories.d.ts +0 -7
- package/public/utilities/stories/kpi/kpi.stories.d.ts.map +0 -1
- package/public/utilities/stories/layer/Layer.stories.d.ts +0 -9
- package/public/utilities/stories/layer/Layer.stories.d.ts.map +0 -1
- package/public/utilities/stories/link/Link.stories.d.ts +0 -7
- package/public/utilities/stories/link/Link.stories.d.ts.map +0 -1
- package/public/utilities/stories/listbox/Listbox.stories.d.ts +0 -6
- package/public/utilities/stories/listbox/Listbox.stories.d.ts.map +0 -1
- package/public/utilities/stories/loader/Loader.stories.d.ts +0 -7
- package/public/utilities/stories/loader/Loader.stories.d.ts.map +0 -1
- package/public/utilities/stories/menu/Menu.stories.d.ts +0 -5
- package/public/utilities/stories/menu/Menu.stories.d.ts.map +0 -1
- package/public/utilities/stories/modal/Modal.stories.d.ts +0 -5
- package/public/utilities/stories/modal/Modal.stories.d.ts.map +0 -1
- package/public/utilities/stories/notification/Notification.stories.d.ts +0 -13
- package/public/utilities/stories/notification/Notification.stories.d.ts.map +0 -1
- package/public/utilities/stories/optionbutton/OptionButton.stories.d.ts +0 -6
- package/public/utilities/stories/optionbutton/OptionButton.stories.d.ts.map +0 -1
- package/public/utilities/stories/overlay/Overlay.stories.d.ts +0 -5
- package/public/utilities/stories/overlay/Overlay.stories.d.ts.map +0 -1
- package/public/utilities/stories/overlay/OverlayLoader.stories.d.ts +0 -5
- package/public/utilities/stories/overlay/OverlayLoader.stories.d.ts.map +0 -1
- package/public/utilities/stories/pagination/Pagination.stories.d.ts +0 -6
- package/public/utilities/stories/pagination/Pagination.stories.d.ts.map +0 -1
- package/public/utilities/stories/passwordinput/PasswordInput.stories.d.ts +0 -5
- package/public/utilities/stories/passwordinput/PasswordInput.stories.d.ts.map +0 -1
- package/public/utilities/stories/phonenumber/PhoneNumber.stories.d.ts +0 -7
- package/public/utilities/stories/phonenumber/PhoneNumber.stories.d.ts.map +0 -1
- package/public/utilities/stories/price/Price.stories.d.ts +0 -10
- package/public/utilities/stories/price/Price.stories.d.ts.map +0 -1
- package/public/utilities/stories/progressbar/ProgressBar.stories.d.ts +0 -10
- package/public/utilities/stories/progressbar/ProgressBar.stories.d.ts.map +0 -1
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts +0 -7
- package/public/utilities/stories/quantityselector/QuantitySelector.stories.d.ts.map +0 -1
- package/public/utilities/stories/radio/Radio.stories.d.ts +0 -8
- package/public/utilities/stories/radio/Radio.stories.d.ts.map +0 -1
- package/public/utilities/stories/radio-group/Radio-group.stories.d.ts +0 -7
- package/public/utilities/stories/radio-group/Radio-group.stories.d.ts.map +0 -1
- package/public/utilities/stories/ratings/StarsInput.stories.d.ts +0 -5
- package/public/utilities/stories/ratings/StarsInput.stories.d.ts.map +0 -1
- package/public/utilities/stories/ratings/StarsResult.stories.d.ts +0 -5
- package/public/utilities/stories/ratings/StarsResult.stories.d.ts.map +0 -1
- package/public/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts +0 -5
- package/public/utilities/stories/segmentedcontrol/segmentedcontrol.stories.d.ts.map +0 -1
- package/public/utilities/stories/select/Select.stories.d.ts +0 -8
- package/public/utilities/stories/select/Select.stories.d.ts.map +0 -1
- package/public/utilities/stories/sidebar/Sidebar.stories.d.ts +0 -5
- package/public/utilities/stories/sidebar/Sidebar.stories.d.ts.map +0 -1
- package/public/utilities/stories/status-badge/StatusBadge.stories.d.ts +0 -8
- package/public/utilities/stories/status-badge/StatusBadge.stories.d.ts.map +0 -1
- package/public/utilities/stories/status-dot/StatusDot.stories.d.ts +0 -9
- package/public/utilities/stories/status-dot/StatusDot.stories.d.ts.map +0 -1
- package/public/utilities/stories/stepper/Stepper.stories.d.ts +0 -6
- package/public/utilities/stories/stepper/Stepper.stories.d.ts.map +0 -1
- package/public/utilities/stories/stepperbar/StepperBar.stories.d.ts +0 -7
- package/public/utilities/stories/stepperbar/StepperBar.stories.d.ts.map +0 -1
- package/public/utilities/stories/tabs/Tabs.stories.d.ts +0 -9
- package/public/utilities/stories/tabs/Tabs.stories.d.ts.map +0 -1
- package/public/utilities/stories/tag/Tag.stories.d.ts +0 -8
- package/public/utilities/stories/tag/Tag.stories.d.ts.map +0 -1
- package/public/utilities/stories/taglist/Taglist.stories.d.ts +0 -6
- package/public/utilities/stories/taglist/Taglist.stories.d.ts.map +0 -1
- package/public/utilities/stories/textarea/Textarea.stories.d.ts +0 -8
- package/public/utilities/stories/textarea/Textarea.stories.d.ts.map +0 -1
- package/public/utilities/stories/textinput/Textinput.stories.d.ts +0 -7
- package/public/utilities/stories/textinput/Textinput.stories.d.ts.map +0 -1
- package/public/utilities/stories/toggle/Toggle.stories.d.ts +0 -8
- package/public/utilities/stories/toggle/Toggle.stories.d.ts.map +0 -1
- package/public/utilities/stories/tooltip/Tooltip.stories.d.ts +0 -5
- package/public/utilities/stories/tooltip/Tooltip.stories.d.ts.map +0 -1
- package/public/utilities/utilities/ClickOutside.d.ts +0 -4
- package/public/utilities/utilities/ClickOutside.d.ts.map +0 -1
- package/public/utilities/utilities/DataTableUtilities.d.ts +0 -19
- package/public/utilities/utilities/DataTableUtilities.d.ts.map +0 -1
- package/public/utilities/utilities/EventForward.d.ts +0 -10
- package/public/utilities/utilities/EventForward.d.ts.map +0 -1
- package/public/utilities/utilities/EventHandler.d.ts +0 -8
- package/public/utilities/utilities/EventHandler.d.ts.map +0 -1
- package/public/utilities/utilities/sidebar-service.d.ts +0 -9
- package/public/utilities/utilities/sidebar-service.d.ts.map +0 -1
|
@@ -1,337 +0,0 @@
|
|
|
1
|
-
<svelte:options customElement="" />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import {
|
|
5
|
-
parsePhoneNumber,
|
|
6
|
-
formatIncompletePhoneNumber,
|
|
7
|
-
AsYouType,
|
|
8
|
-
type CountryCode,
|
|
9
|
-
} from 'libphonenumber-js';
|
|
10
|
-
import * as examples from 'libphonenumber-js/examples.mobile.json';
|
|
11
|
-
import type { CountryItems } from './phonenumber.types';
|
|
12
|
-
import { EventHandler } from '../../utilities/EventHandler';
|
|
13
|
-
import { clickOutside } from '../../utilities/ClickOutside';
|
|
14
|
-
import { createEventDispatcher, onMount } from 'svelte';
|
|
15
|
-
// @ts-ignore Need to use internal Svelte function
|
|
16
|
-
import { get_current_component } from 'svelte/internal';
|
|
17
|
-
|
|
18
|
-
export let phonenumber: string;
|
|
19
|
-
export let placeholder = '0102030405';
|
|
20
|
-
export let countrysearchplaceholder = 'Search Country';
|
|
21
|
-
export let buttonId = 'dropdown_country';
|
|
22
|
-
export let listId = 'phone_number_list';
|
|
23
|
-
export let countries: string;
|
|
24
|
-
export let selectedcountry: string;
|
|
25
|
-
export let isvalid: boolean;
|
|
26
|
-
export let isinvalid: boolean;
|
|
27
|
-
export let enablecountrysearch: boolean;
|
|
28
|
-
|
|
29
|
-
let isCountriesListOpened = false;
|
|
30
|
-
let maxlength = 25;
|
|
31
|
-
let eventHandler = new EventHandler(
|
|
32
|
-
get_current_component(),
|
|
33
|
-
createEventDispatcher(),
|
|
34
|
-
);
|
|
35
|
-
|
|
36
|
-
let searchcountrytext: string = '';
|
|
37
|
-
let rootElement: Element;
|
|
38
|
-
let selectedCountry: CountryItems;
|
|
39
|
-
let searchCountryDomElement: Element;
|
|
40
|
-
|
|
41
|
-
$: phoneNumber = phonenumber ? phonenumber : '';
|
|
42
|
-
|
|
43
|
-
$: selectedCountry = selectedcountry
|
|
44
|
-
? JSON.parse(selectedcountry)
|
|
45
|
-
: ({
|
|
46
|
-
isd: '+33',
|
|
47
|
-
name: 'France',
|
|
48
|
-
shortName: 'FR',
|
|
49
|
-
} as CountryItems);
|
|
50
|
-
|
|
51
|
-
$: parsedCountries = countries
|
|
52
|
-
? (JSON.parse(countries) as CountryItems[])
|
|
53
|
-
: [];
|
|
54
|
-
|
|
55
|
-
$: if (isCountriesListOpened && searchCountryDomElement) {
|
|
56
|
-
scrollIntoSearchElement();
|
|
57
|
-
}
|
|
58
|
-
$: placeholder = selectedCountry
|
|
59
|
-
? getSelectedCountryPlaceholder()
|
|
60
|
-
: 'Search Country';
|
|
61
|
-
|
|
62
|
-
$: attributes = { ...$$restProps };
|
|
63
|
-
$: delete attributes.class;
|
|
64
|
-
|
|
65
|
-
onMount(() => {
|
|
66
|
-
phoneNumber = phonenumber
|
|
67
|
-
? parsePhoneNumber(
|
|
68
|
-
phonenumber,
|
|
69
|
-
selectedCountry?.shortName,
|
|
70
|
-
).formatNational()
|
|
71
|
-
: phoneNumber;
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
function getSelectedCountryPlaceholder(): string {
|
|
75
|
-
const example = examples.default[selectedCountry.shortName as CountryCode];
|
|
76
|
-
return new AsYouType(selectedCountry.shortName).input(example);
|
|
77
|
-
}
|
|
78
|
-
function dispatchEvent(
|
|
79
|
-
eventName: string,
|
|
80
|
-
data?: string | CountryItems,
|
|
81
|
-
): void {
|
|
82
|
-
eventHandler.dispatch(eventName, data);
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
function toggleCountriesList(): void {
|
|
86
|
-
isCountriesListOpened = !isCountriesListOpened;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
function openCountriesList() {
|
|
90
|
-
dispatchEvent('open-countries-list');
|
|
91
|
-
isCountriesListOpened = true;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function closeCountriesList() {
|
|
95
|
-
dispatchEvent('close-countries-list');
|
|
96
|
-
isCountriesListOpened = false;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
function hasValue(): boolean {
|
|
100
|
-
return phoneNumber !== '';
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
function changeCountry(country: CountryItems): void {
|
|
104
|
-
selectedCountry = country;
|
|
105
|
-
toggleCountriesList();
|
|
106
|
-
dispatchEvent('change-country', country);
|
|
107
|
-
if (hasValue()) {
|
|
108
|
-
formatPhoneNumber();
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function formatPhoneNumber(event?: FocusEvent): void {
|
|
113
|
-
event?.stopPropagation();
|
|
114
|
-
const phoneNumberValue = event
|
|
115
|
-
? (event.target as HTMLInputElement).value
|
|
116
|
-
: phoneNumber;
|
|
117
|
-
|
|
118
|
-
if (!phoneNumberValue) {
|
|
119
|
-
isvalid = false;
|
|
120
|
-
isinvalid = false;
|
|
121
|
-
|
|
122
|
-
dispatchEvent('blur');
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
try {
|
|
127
|
-
const parsedPhoneNumber = parsePhoneNumber(
|
|
128
|
-
phoneNumberValue,
|
|
129
|
-
selectedCountry.shortName,
|
|
130
|
-
);
|
|
131
|
-
const formatInternational: string =
|
|
132
|
-
parsedPhoneNumber.formatInternational();
|
|
133
|
-
isvalid = parsedPhoneNumber.isValid();
|
|
134
|
-
isinvalid = !isvalid;
|
|
135
|
-
|
|
136
|
-
dispatchEvent('blur', formatInternational);
|
|
137
|
-
|
|
138
|
-
phoneNumber = parsedPhoneNumber.formatNational();
|
|
139
|
-
} catch (error) {
|
|
140
|
-
const formatIncomplete: string = formatIncompletePhoneNumber(
|
|
141
|
-
phoneNumberValue,
|
|
142
|
-
selectedCountry.shortName,
|
|
143
|
-
);
|
|
144
|
-
isvalid = false;
|
|
145
|
-
isinvalid = true;
|
|
146
|
-
|
|
147
|
-
dispatchEvent('blur', formatIncomplete);
|
|
148
|
-
|
|
149
|
-
phoneNumber = formatIncomplete;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
if (event && event.target) {
|
|
153
|
-
(event.target as HTMLInputElement).value = phoneNumber;
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
function cleanFormat(event: FocusEvent) {
|
|
158
|
-
const eventTargetValue = (event.target as HTMLInputElement).value;
|
|
159
|
-
phoneNumber = formatIncompletePhoneNumber(eventTargetValue);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
function initKeyboardNav(event: KeyboardEvent) {
|
|
163
|
-
switch (event.key) {
|
|
164
|
-
case 'ArrowDown':
|
|
165
|
-
case 'ArrowUp': {
|
|
166
|
-
if (!isCountriesListOpened) {
|
|
167
|
-
openCountriesList();
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */
|
|
171
|
-
const tmpIndex: number = parsedCountries.findIndex(
|
|
172
|
-
(country) => country.isd === selectedCountry.isd,
|
|
173
|
-
);
|
|
174
|
-
let index = event.key === 'ArrowDown' ? tmpIndex + 1 : tmpIndex - 1;
|
|
175
|
-
|
|
176
|
-
if (index === -1 || index >= parsedCountries.length) {
|
|
177
|
-
index = index === -1 ? parsedCountries.length - 1 : 0;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
selectedCountry = parsedCountries[index];
|
|
181
|
-
/* eslint-enable @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-assignment */
|
|
182
|
-
break;
|
|
183
|
-
}
|
|
184
|
-
case 'Enter':
|
|
185
|
-
isCountriesListOpened
|
|
186
|
-
? changeCountry(selectedCountry)
|
|
187
|
-
: openCountriesList();
|
|
188
|
-
break;
|
|
189
|
-
case 'Esc':
|
|
190
|
-
closeCountriesList();
|
|
191
|
-
break;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
function scrollIntoSearchElement(): void {
|
|
195
|
-
const searchElement = parsedCountries.find(
|
|
196
|
-
(country) =>
|
|
197
|
-
country.isd.toLowerCase().includes(searchcountrytext.toLowerCase()) ||
|
|
198
|
-
country.name.toLowerCase().includes(searchcountrytext.toLowerCase()),
|
|
199
|
-
);
|
|
200
|
-
const domElement = searchElement
|
|
201
|
-
? (rootElement.querySelector(`li#${searchElement.shortName}`) as Element)
|
|
202
|
-
: (rootElement.querySelector(`li.mc-phone-number__item`) as Element);
|
|
203
|
-
domElement.scrollIntoView({
|
|
204
|
-
behavior: 'auto',
|
|
205
|
-
block: 'center',
|
|
206
|
-
inline: 'nearest',
|
|
207
|
-
});
|
|
208
|
-
}
|
|
209
|
-
</script>
|
|
210
|
-
|
|
211
|
-
<div
|
|
212
|
-
bind:this={rootElement}
|
|
213
|
-
class="mc-phone-number
|
|
214
|
-
{isCountriesListOpened ? ' mc-phone-number--focused' : ''}"
|
|
215
|
-
>
|
|
216
|
-
<div
|
|
217
|
-
class="mc-phone-number__dropdown"
|
|
218
|
-
tabindex="-1"
|
|
219
|
-
on:keydown={initKeyboardNav}
|
|
220
|
-
use:clickOutside
|
|
221
|
-
on:outclick={closeCountriesList}
|
|
222
|
-
{...$$restProps}
|
|
223
|
-
>
|
|
224
|
-
<button
|
|
225
|
-
id={buttonId}
|
|
226
|
-
type="button"
|
|
227
|
-
aria-haspopup="listbox"
|
|
228
|
-
aria-labelledby={buttonId}
|
|
229
|
-
class="mc-phone-number__button"
|
|
230
|
-
aria-expanded={isCountriesListOpened}
|
|
231
|
-
on:click={toggleCountriesList}
|
|
232
|
-
>
|
|
233
|
-
<span
|
|
234
|
-
class="flag flag:{selectedCountry.shortName}"
|
|
235
|
-
style="--CountryFlagIcon-height:1rem"> </span
|
|
236
|
-
>
|
|
237
|
-
<span class="mc-phone-number__indicator">{selectedCountry.isd}</span>
|
|
238
|
-
</button>
|
|
239
|
-
{#if isCountriesListOpened}
|
|
240
|
-
<ul
|
|
241
|
-
id={listId}
|
|
242
|
-
tabindex="0"
|
|
243
|
-
role="listbox"
|
|
244
|
-
aria-labelledby={listId}
|
|
245
|
-
class="mc-phone-number__list"
|
|
246
|
-
aria-activedescendant={selectedCountry.isd}
|
|
247
|
-
>
|
|
248
|
-
{#if enablecountrysearch}
|
|
249
|
-
<input
|
|
250
|
-
id="searchfield"
|
|
251
|
-
type="text"
|
|
252
|
-
class="mc-phone-number__input mc-phone-number__flag-search-field mc-text-input mc-text-input--m mc-field__input"
|
|
253
|
-
name="search-country-input"
|
|
254
|
-
spellcheck="false"
|
|
255
|
-
bind:value={searchcountrytext}
|
|
256
|
-
on:input={scrollIntoSearchElement}
|
|
257
|
-
placeholder={countrysearchplaceholder}
|
|
258
|
-
on:focus|preventDefault={scrollIntoSearchElement}
|
|
259
|
-
bind:this={searchCountryDomElement}
|
|
260
|
-
/>
|
|
261
|
-
{/if}
|
|
262
|
-
{#each parsedCountries as country}
|
|
263
|
-
<li
|
|
264
|
-
id={country.shortName}
|
|
265
|
-
role="option"
|
|
266
|
-
class="mc-phone-number__item
|
|
267
|
-
{country.isd === selectedCountry.isd
|
|
268
|
-
? 'mc-phone-number__item--focused'
|
|
269
|
-
: ''}"
|
|
270
|
-
aria-selected={country.isd === selectedCountry.isd}
|
|
271
|
-
on:click={() => changeCountry(country)}
|
|
272
|
-
on:keyup={(e) => {
|
|
273
|
-
/* eslint-disable @typescript-eslint/no-unsafe-member-access */
|
|
274
|
-
return e.key === 'Enter' && changeCountry(country);
|
|
275
|
-
}}
|
|
276
|
-
>
|
|
277
|
-
<span
|
|
278
|
-
class="flag flag:{country.shortName}"
|
|
279
|
-
style="--CountryFlagIcon-height:1rem"
|
|
280
|
-
>
|
|
281
|
-
|
|
282
|
-
</span>
|
|
283
|
-
<span class="mc-phone-number__country">{country.name}</span>
|
|
284
|
-
|
|
285
|
-
<span>{country.isd}</span>
|
|
286
|
-
</li>
|
|
287
|
-
{/each}
|
|
288
|
-
</ul>
|
|
289
|
-
{/if}
|
|
290
|
-
</div>
|
|
291
|
-
<input
|
|
292
|
-
id="smallField"
|
|
293
|
-
type="tel"
|
|
294
|
-
class="mc-phone-number__input mc-text-input mc-text-input--m mc-field__input"
|
|
295
|
-
name="phone-number-input"
|
|
296
|
-
spellcheck="false"
|
|
297
|
-
class:is-valid={isvalid}
|
|
298
|
-
class:is-invalid={isinvalid}
|
|
299
|
-
{placeholder}
|
|
300
|
-
{maxlength}
|
|
301
|
-
{...attributes}
|
|
302
|
-
on:blur={formatPhoneNumber}
|
|
303
|
-
on:focus={cleanFormat}
|
|
304
|
-
bind:value={phoneNumber}
|
|
305
|
-
/>
|
|
306
|
-
</div>
|
|
307
|
-
|
|
308
|
-
<style lang="scss">
|
|
309
|
-
@import 'country-flag-icons/3x2/flags';
|
|
310
|
-
@import '@mozaic-ds/styles/settings-tools/all-settings';
|
|
311
|
-
@import '@mozaic-ds/styles/components/c.text-input';
|
|
312
|
-
@import '@mozaic-ds/styles/components/c.phone-number';
|
|
313
|
-
// Custom CSS
|
|
314
|
-
.mc-phone-number {
|
|
315
|
-
max-width: none;
|
|
316
|
-
|
|
317
|
-
&__flag-search-field {
|
|
318
|
-
position: sticky;
|
|
319
|
-
top: 0;
|
|
320
|
-
}
|
|
321
|
-
|
|
322
|
-
&__indicator,
|
|
323
|
-
&__country {
|
|
324
|
-
padding-left: 1rem;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
&__overlay {
|
|
328
|
-
position: fixed;
|
|
329
|
-
top: 0;
|
|
330
|
-
bottom: 0;
|
|
331
|
-
left: 0;
|
|
332
|
-
right: 0;
|
|
333
|
-
background: transparent;
|
|
334
|
-
z-index: 10;
|
|
335
|
-
}
|
|
336
|
-
}
|
|
337
|
-
</style>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { CountryCode } from 'libphonenumber-js';
|
|
2
|
-
export interface CountryItems {
|
|
3
|
-
isd: string;
|
|
4
|
-
name: string;
|
|
5
|
-
shortName?: CountryCode;
|
|
6
|
-
}
|
|
7
|
-
export interface PhoneNumberResponse {
|
|
8
|
-
codePays: string;
|
|
9
|
-
isValid: boolean;
|
|
10
|
-
phoneNumber: {
|
|
11
|
-
original: string;
|
|
12
|
-
formatted?: string;
|
|
13
|
-
};
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=phonenumber.types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"phonenumber.types.d.ts","sourceRoot":"","sources":["../../../src/components/phonenumber/phonenumber.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAErD,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,WAAW,CAAC;CACzB;AAED,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,EAAE;QACX,QAAQ,EAAE,MAAM,CAAC;QACjB,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC;CACH"}
|
|
@@ -1,224 +0,0 @@
|
|
|
1
|
-
<svelte:options customElement="" />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import type { PriceType } from './price.types';
|
|
5
|
-
|
|
6
|
-
export let light = false;
|
|
7
|
-
export let type: PriceType = 'default';
|
|
8
|
-
export let mainprice: string;
|
|
9
|
-
export let mainpricearialabel: string | undefined = undefined;
|
|
10
|
-
export let mainpriceunit: string | undefined = undefined;
|
|
11
|
-
export let secondarypricelabel: string | undefined = undefined;
|
|
12
|
-
export let secondarypriceariallabel: string | undefined = undefined;
|
|
13
|
-
export let flagamount: string | undefined = undefined;
|
|
14
|
-
export let flaglabel: string | undefined = undefined;
|
|
15
|
-
export let flagarialabel: string | undefined = undefined;
|
|
16
|
-
export let priceenddatelabel: string | undefined = undefined;
|
|
17
|
-
export let pricewithoutoffer: string | undefined = undefined;
|
|
18
|
-
export let pricewithoutofferarialabel: string | undefined = undefined;
|
|
19
|
-
export let refundsofferproductlabel: string | undefined = undefined;
|
|
20
|
-
export let refundsoffermediaurl: string | undefined = undefined;
|
|
21
|
-
|
|
22
|
-
$: isDiscount = type === 'destocking' || type === 'commercial-operation';
|
|
23
|
-
$: isDisplayFlag =
|
|
24
|
-
type === 'budget-price' ||
|
|
25
|
-
type === 'best-value' ||
|
|
26
|
-
type === 'high-quality' ||
|
|
27
|
-
type === 'star-product';
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<div
|
|
31
|
-
class="mc-price {$$props.class}"
|
|
32
|
-
class:light
|
|
33
|
-
class:mc-price--discount={isDiscount}
|
|
34
|
-
{...$$restProps}
|
|
35
|
-
>
|
|
36
|
-
{#if isDisplayFlag}
|
|
37
|
-
<span class="price__flag--{type}">
|
|
38
|
-
{flaglabel}
|
|
39
|
-
</span>
|
|
40
|
-
{:else if type === 'destocking'}
|
|
41
|
-
<div class="price__flag--clearance" aria-label={flagarialabel}>
|
|
42
|
-
<span class="price__flag--clearance-label">{flaglabel}</span>
|
|
43
|
-
<span class="price__flag--clearance-amount">{flagamount}</span>
|
|
44
|
-
</div>
|
|
45
|
-
{:else if type === 'commercial-operation'}
|
|
46
|
-
<div class="price__flag--discount" aria-label={flagarialabel}>
|
|
47
|
-
<span class="price__flag--discount-amount">{flagamount}</span>
|
|
48
|
-
<span class="price__flag--discount-label">{priceenddatelabel}</span>
|
|
49
|
-
</div>
|
|
50
|
-
{/if}
|
|
51
|
-
|
|
52
|
-
{#if isDiscount}
|
|
53
|
-
<div class="price__from" aria-label={pricewithoutofferarialabel}>
|
|
54
|
-
<span class="price__from-without-offer">{pricewithoutoffer}</span>
|
|
55
|
-
</div>
|
|
56
|
-
{/if}
|
|
57
|
-
|
|
58
|
-
<div class="price">
|
|
59
|
-
<div class="price__main">
|
|
60
|
-
<span data-cerberus="ELEM_PRIX" aria-label={mainpricearialabel}>
|
|
61
|
-
{mainprice}
|
|
62
|
-
</span>
|
|
63
|
-
{#if mainpriceunit}
|
|
64
|
-
<span class="price__main__unit">/ {mainpriceunit}</span>
|
|
65
|
-
{/if}
|
|
66
|
-
</div>
|
|
67
|
-
{#if secondarypricelabel}
|
|
68
|
-
<span class="price__secondary" aria-label={secondarypriceariallabel}>
|
|
69
|
-
{secondarypricelabel}
|
|
70
|
-
</span>
|
|
71
|
-
{/if}
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
{#if !light && refundsofferproductlabel}
|
|
75
|
-
{#if refundsoffermediaurl}
|
|
76
|
-
<a
|
|
77
|
-
class="mc-tag-link mc-tag-link__label"
|
|
78
|
-
href={refundsoffermediaurl}
|
|
79
|
-
target="_blank"
|
|
80
|
-
>{refundsofferproductlabel}
|
|
81
|
-
</a>
|
|
82
|
-
{:else}
|
|
83
|
-
<span class="mc-tag-text mc-tag-text--danger mc-tag-text__label">
|
|
84
|
-
{refundsofferproductlabel}
|
|
85
|
-
</span>
|
|
86
|
-
{/if}
|
|
87
|
-
{/if}
|
|
88
|
-
</div>
|
|
89
|
-
|
|
90
|
-
<style lang="scss">
|
|
91
|
-
@import '@mozaic-ds/styles/settings-tools/_all-settings';
|
|
92
|
-
@import '@mozaic-ds/styles/components/c.tag';
|
|
93
|
-
|
|
94
|
-
.mc-price {
|
|
95
|
-
.price__flag {
|
|
96
|
-
&--budget-price,
|
|
97
|
-
&--best-value,
|
|
98
|
-
&--high-quality,
|
|
99
|
-
&--star-product {
|
|
100
|
-
@include set-font-face('semi-bold');
|
|
101
|
-
@include set-font-scale('02', 'm');
|
|
102
|
-
display: inline-block;
|
|
103
|
-
padding: $mu050;
|
|
104
|
-
margin-bottom: $mu025;
|
|
105
|
-
line-height: 0.5rem;
|
|
106
|
-
text-transform: uppercase;
|
|
107
|
-
}
|
|
108
|
-
&--budget-price {
|
|
109
|
-
background-color: $color-secondary-yellow-500;
|
|
110
|
-
}
|
|
111
|
-
&--best-value {
|
|
112
|
-
background-color: $color-primary-01-500;
|
|
113
|
-
}
|
|
114
|
-
&--high-quality {
|
|
115
|
-
background-color: $color-secondary-blue-500;
|
|
116
|
-
}
|
|
117
|
-
&--star-product {
|
|
118
|
-
padding: $mu025 $mu050;
|
|
119
|
-
line-height: 1rem;
|
|
120
|
-
color: #fff;
|
|
121
|
-
text-transform: none;
|
|
122
|
-
background-color: $color-secondary-red-500;
|
|
123
|
-
}
|
|
124
|
-
&--clearance {
|
|
125
|
-
display: flex;
|
|
126
|
-
&-label {
|
|
127
|
-
@include set-font-scale('05', 'm');
|
|
128
|
-
display: inline-block;
|
|
129
|
-
vertical-align: middle;
|
|
130
|
-
padding: calc(#{$mu025} - 1px) $mu050;
|
|
131
|
-
border: get-border(s) solid $color-secondary-red-500;
|
|
132
|
-
line-height: 1.25rem;
|
|
133
|
-
text-transform: uppercase;
|
|
134
|
-
color: $color-secondary-red-500;
|
|
135
|
-
}
|
|
136
|
-
&-amount {
|
|
137
|
-
@include set-font-face('semi-bold');
|
|
138
|
-
@include set-font-scale('05', 'm');
|
|
139
|
-
display: inline-block;
|
|
140
|
-
vertical-align: middle;
|
|
141
|
-
padding: $mu025 $mu050;
|
|
142
|
-
background-color: $color-secondary-red-500;
|
|
143
|
-
color: $color-secondary-yellow-500;
|
|
144
|
-
line-height: 1.25rem;
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
&--discount {
|
|
148
|
-
&-amount {
|
|
149
|
-
@include set-font-face('semi-bold');
|
|
150
|
-
@include set-font-scale('05', 'm');
|
|
151
|
-
display: inline-block;
|
|
152
|
-
vertical-align: middle;
|
|
153
|
-
padding: $mu025 $mu050;
|
|
154
|
-
background-color: $color-secondary-red-500;
|
|
155
|
-
line-height: 1.25rem;
|
|
156
|
-
color: #fff;
|
|
157
|
-
}
|
|
158
|
-
&-label {
|
|
159
|
-
@include set-font-scale('02', 'm');
|
|
160
|
-
display: inline-block;
|
|
161
|
-
vertical-align: middle;
|
|
162
|
-
margin-left: $mu050;
|
|
163
|
-
color: $color-secondary-red-500;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
.price__from {
|
|
168
|
-
line-height: 1.75rem;
|
|
169
|
-
&-without-offer {
|
|
170
|
-
@include set-font-scale('04', 'm');
|
|
171
|
-
display: inline-block;
|
|
172
|
-
vertical-align: middle;
|
|
173
|
-
color: $color-grey-999;
|
|
174
|
-
text-decoration: line-through;
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
.price__main {
|
|
178
|
-
@include set-font-face('semi-bold');
|
|
179
|
-
@include set-font-scale('09', 'm');
|
|
180
|
-
&__unit {
|
|
181
|
-
@include set-font-scale('05', 'm');
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
.price__secondary {
|
|
185
|
-
@include set-font-scale('02', 'm');
|
|
186
|
-
color: $color-grey-900;
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
&.mc-price--discount {
|
|
190
|
-
.price__main {
|
|
191
|
-
color: $color-secondary-red-500;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
|
|
195
|
-
&.light {
|
|
196
|
-
.price__flag {
|
|
197
|
-
&--budget-price,
|
|
198
|
-
&--best-value,
|
|
199
|
-
&--high-quality {
|
|
200
|
-
padding: $mu025;
|
|
201
|
-
line-height: 0.75rem;
|
|
202
|
-
}
|
|
203
|
-
&--clearance {
|
|
204
|
-
display: flex;
|
|
205
|
-
&-label {
|
|
206
|
-
@include set-font-scale('02', 'm');
|
|
207
|
-
line-height: 0.75rem;
|
|
208
|
-
}
|
|
209
|
-
&-amount {
|
|
210
|
-
@include set-font-scale('02', 'm');
|
|
211
|
-
line-height: 0.75rem;
|
|
212
|
-
padding: calc(#{$mu025} - 1px) $mu025;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
.price__main {
|
|
217
|
-
@include set-font-scale('07', 'm');
|
|
218
|
-
&__unit {
|
|
219
|
-
@include set-font-scale('04', 'm');
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"price.types.d.ts","sourceRoot":"","sources":["../../../src/components/price/price.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,SAAS,GACT,cAAc,GACd,YAAY,GACZ,cAAc,GACd,cAAc,GACd,YAAY,GACZ,sBAAsB,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
<svelte:options customElement="" />
|
|
2
|
-
|
|
3
|
-
<script lang="ts">
|
|
4
|
-
import type { ProgressBarSize } from './progressbar.types';
|
|
5
|
-
|
|
6
|
-
export let value: number;
|
|
7
|
-
export let valuemin = 0;
|
|
8
|
-
export let valuemax = 100;
|
|
9
|
-
export let displaypercentage: boolean;
|
|
10
|
-
export let size: ProgressBarSize = 'm';
|
|
11
|
-
|
|
12
|
-
$: getWidth = value >= valuemax ? valuemax : value;
|
|
13
|
-
|
|
14
|
-
function getClasses(displaypercentage: boolean): string {
|
|
15
|
-
const classes = ['mc-progressbar'];
|
|
16
|
-
|
|
17
|
-
if (displaypercentage) {
|
|
18
|
-
classes.push('mc-progressbar--percent');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
if (size === 's') {
|
|
22
|
-
classes.push('mc-progressbar--s');
|
|
23
|
-
} else if (size === 'xs') {
|
|
24
|
-
classes.push('mc-progressbar--xs');
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return classes.join(' ');
|
|
28
|
-
}
|
|
29
|
-
</script>
|
|
30
|
-
|
|
31
|
-
<div class="{getClasses(displaypercentage)} {$$props.class}" {...$$restProps}>
|
|
32
|
-
<div
|
|
33
|
-
class="mc-progressbar__indicator"
|
|
34
|
-
role="progressbar"
|
|
35
|
-
aria-valuenow={value}
|
|
36
|
-
aria-valuemin={valuemin}
|
|
37
|
-
aria-valuemax={valuemax}
|
|
38
|
-
style="width: {getWidth}%"
|
|
39
|
-
>
|
|
40
|
-
{#if displaypercentage}
|
|
41
|
-
<div class="mc-progressbar__percentage">{value ?? 0}%</div>
|
|
42
|
-
{/if}
|
|
43
|
-
</div>
|
|
44
|
-
</div>
|
|
45
|
-
|
|
46
|
-
<style lang="scss">
|
|
47
|
-
@import '@mozaic-ds/styles/settings-tools/_all-settings';
|
|
48
|
-
@import '@mozaic-ds/styles/components/c.progressbar';
|
|
49
|
-
|
|
50
|
-
.mc-progressbar__percentage {
|
|
51
|
-
min-width: px-to-rem(33);
|
|
52
|
-
}
|
|
53
|
-
</style>
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"progressbar.types.d.ts","sourceRoot":"","sources":["../../../src/components/progressbar/progressbar.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GAAG,GAAG,GAAG,GAAG,GAAG,IAAI,CAAC"}
|