@mozaic-ds/web-components 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -106
- package/dist/Cross20.js +1 -1
- package/dist/Cross20.js.map +1 -1
- package/dist/Cross24.js +1 -1
- package/dist/CrossCircleFilled24.js +1 -1
- package/dist/attributes.js +1 -1
- package/dist/attributes.js.map +1 -1
- package/dist/bundle.d.ts +6 -5
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +6 -5
- 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.map +1 -1
- package/dist/components/avatar/Avatar.stories.js +1 -3
- package/dist/components/avatar/Avatar.svelte +7 -7
- package/dist/components/avatar/Avatar.svelte.d.ts.map +1 -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.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.stories.js +1 -4
- package/dist/components/breadcrumb/Breadcrumb.svelte +2 -5
- package/dist/components/button/Button.js +3 -3
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/Button.svelte +3 -3
- package/dist/components/callout/Callout.js +2 -5
- package/dist/components/callout/Callout.js.map +1 -1
- package/dist/components/callout/Callout.stories.d.ts.map +1 -1
- package/dist/components/callout/Callout.svelte +9 -16
- package/dist/components/callout/Callout.svelte.d.ts.map +1 -1
- package/dist/components/checkbox/Checkbox.js +2 -2
- package/dist/components/checkbox/Checkbox.spec.js +1 -1
- package/dist/components/checkbox/Checkbox.svelte +2 -2
- package/dist/components/checkboxgroup/CheckboxGroup.js +3 -3
- package/dist/components/checkboxgroup/CheckboxGroup.js.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.spec.js +1 -3
- package/dist/components/checkboxgroup/CheckboxGroup.svelte +4 -10
- package/dist/components/checkboxgroup/CheckboxGroup.svelte.d.ts.map +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.js +2 -2
- package/dist/components/circularprogressbar/CircularProgressbar.js.map +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.stories.js +2 -2
- package/dist/components/circularprogressbar/CircularProgressbar.svelte +4 -4
- package/dist/components/circularprogressbar/CircularProgressbar.svelte.d.ts +1 -0
- package/dist/components/circularprogressbar/CircularProgressbar.svelte.d.ts.map +1 -1
- package/dist/components/container/Container.js +14 -0
- package/dist/components/container/Container.js.map +1 -0
- package/dist/components/container/Container.spec.js +26 -0
- package/dist/components/container/Container.stories.d.ts +7 -0
- package/dist/components/container/Container.stories.d.ts.map +1 -0
- package/dist/components/container/Container.stories.js +23 -0
- package/dist/components/container/Container.svelte +60 -0
- package/dist/components/container/Container.svelte.d.ts +39 -0
- package/dist/components/container/Container.svelte.d.ts.map +1 -0
- package/dist/components/container/README.md +16 -0
- package/dist/components/datepicker/Datepicker.js +3 -3
- package/dist/components/datepicker/Datepicker.js.map +1 -1
- package/dist/components/datepicker/Datepicker.svelte +13 -22
- package/dist/components/datepicker/Datepicker.svelte.d.ts +1 -1
- package/dist/components/datepicker/Datepicker.svelte.d.ts.map +1 -1
- package/dist/components/datepicker/README.md +1 -1
- package/dist/components/divider/Divider.js +4 -0
- package/dist/components/divider/Divider.js.map +1 -0
- package/dist/components/divider/Divider.spec.js +50 -0
- package/dist/components/divider/Divider.stories.d.ts +9 -0
- package/dist/components/divider/Divider.stories.d.ts.map +1 -0
- package/dist/components/divider/Divider.stories.js +57 -0
- package/dist/components/divider/Divider.svelte +90 -0
- package/dist/components/divider/Divider.svelte.d.ts +47 -0
- package/dist/components/divider/Divider.svelte.d.ts.map +1 -0
- package/dist/components/divider/README.md +18 -0
- package/dist/components/drawer/Drawer.js +4 -4
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/drawer/Drawer.stories.d.ts.map +1 -1
- package/dist/components/drawer/Drawer.stories.js +1 -2
- package/dist/components/drawer/Drawer.svelte +20 -7
- package/dist/components/drawer/Drawer.svelte.d.ts +8 -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.spec.js +56 -9
- package/dist/components/field/Field.stories.d.ts +1 -0
- package/dist/components/field/Field.stories.d.ts.map +1 -1
- package/dist/components/field/Field.stories.js +15 -0
- package/dist/components/field/Field.svelte +12 -6
- package/dist/components/field/Field.svelte.d.ts +4 -0
- package/dist/components/field/Field.svelte.d.ts.map +1 -1
- package/dist/components/field/README.md +1 -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.map +1 -1
- package/dist/components/flag/Flag.stories.js +1 -4
- package/dist/components/flag/Flag.svelte +1 -1
- package/dist/components/iconbutton/IconButton.js +2 -2
- package/dist/components/iconbutton/IconButton.js.map +1 -1
- package/dist/components/iconbutton/IconButton.svelte +2 -2
- package/dist/components/kpiitem/KpiItem.js +5 -0
- package/dist/components/kpiitem/KpiItem.js.map +1 -0
- package/dist/components/kpiitem/KpiItem.spec.js +60 -0
- package/dist/components/kpiitem/KpiItem.stories.d.ts +8 -0
- package/dist/components/kpiitem/KpiItem.stories.d.ts.map +1 -0
- package/dist/components/kpiitem/KpiItem.stories.js +56 -0
- package/dist/components/kpiitem/KpiItem.svelte +231 -0
- package/dist/components/kpiitem/KpiItem.svelte.d.ts +34 -0
- package/dist/components/kpiitem/KpiItem.svelte.d.ts.map +1 -0
- package/dist/components/kpiitem/README.md +15 -0
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js +2 -2
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js.map +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte +3 -8
- 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.svelte +3 -3
- package/dist/components/link/Link.js +1 -1
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/link/Link.svelte +1 -1
- package/dist/components/loader/Loader.js +1 -1
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/loader/Loader.spec.js +20 -1
- package/dist/components/loader/Loader.stories.js +1 -1
- package/dist/components/loader/Loader.svelte +8 -6
- package/dist/components/loader/Loader.svelte.d.ts +1 -1
- package/dist/components/loader/Loader.svelte.d.ts.map +1 -1
- package/dist/components/loader/README.md +1 -1
- package/dist/components/loadingoverlay/LoadingOverlay.stories.d.ts +1 -1
- package/dist/components/loadingoverlay/LoadingOverlay.stories.js +1 -1
- package/dist/components/modal/Modal.js +3 -3
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/modal/Modal.stories.js +2 -4
- package/dist/components/modal/Modal.svelte +4 -4
- package/dist/components/numberbadge/NumberBadge.js +1 -1
- package/dist/components/numberbadge/NumberBadge.js.map +1 -1
- package/dist/components/numberbadge/NumberBadge.svelte +2 -8
- package/dist/components/numberbadge/NumberBadge.svelte.d.ts.map +1 -1
- package/dist/components/overlay/Overlay.stories.d.ts.map +1 -1
- package/dist/components/overlay/Overlay.stories.js +1 -4
- package/dist/components/pagination/Pagination.js +6 -6
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/Pagination.spec.js +2 -2
- package/dist/components/pagination/Pagination.svelte +10 -28
- package/dist/components/passwordinput/PasswordInput.js +3 -3
- package/dist/components/passwordinput/PasswordInput.js.map +1 -1
- package/dist/components/passwordinput/PasswordInput.spec.js +1 -1
- package/dist/components/passwordinput/PasswordInput.svelte +10 -14
- package/dist/components/passwordinput/PasswordInput.svelte.d.ts +1 -1
- package/dist/components/passwordinput/PasswordInput.svelte.d.ts.map +1 -1
- package/dist/components/passwordinput/README.md +1 -1
- package/dist/components/pincode/Pincode.js +2 -2
- package/dist/components/pincode/Pincode.js.map +1 -1
- package/dist/components/pincode/Pincode.svelte +9 -21
- package/dist/components/pincode/Pincode.svelte.d.ts.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.js +3 -3
- package/dist/components/quantityselector/QuantitySelector.js.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.stories.d.ts +0 -1
- package/dist/components/quantityselector/QuantitySelector.stories.d.ts.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.stories.js +0 -6
- package/dist/components/quantityselector/QuantitySelector.svelte +11 -19
- 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.svelte +3 -10
- package/dist/components/radio/Radio.svelte.d.ts.map +1 -1
- package/dist/components/radiogroup/RadioGroup.js +3 -3
- package/dist/components/radiogroup/RadioGroup.js.map +1 -1
- package/dist/components/radiogroup/RadioGroup.svelte +4 -10
- package/dist/components/radiogroup/RadioGroup.svelte.d.ts.map +1 -1
- package/dist/components/segmentedcontrol/README.md +19 -0
- package/dist/components/segmentedcontrol/SegmentedControl.js +4 -0
- package/dist/components/segmentedcontrol/SegmentedControl.js.map +1 -0
- package/dist/components/segmentedcontrol/SegmentedControl.spec.js +52 -0
- package/dist/components/segmentedcontrol/SegmentedControl.stories.d.ts +8 -0
- package/dist/components/segmentedcontrol/SegmentedControl.stories.d.ts.map +1 -0
- package/dist/components/segmentedcontrol/SegmentedControl.stories.js +54 -0
- package/dist/components/segmentedcontrol/SegmentedControl.svelte +125 -0
- package/dist/components/segmentedcontrol/SegmentedControl.svelte.d.ts +32 -0
- package/dist/components/segmentedcontrol/SegmentedControl.svelte.d.ts.map +1 -0
- package/dist/components/select/README.md +1 -1
- package/dist/components/select/Select.js +3 -3
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.svelte +7 -7
- package/dist/components/select/Select.svelte.d.ts +1 -1
- package/dist/components/select/Select.svelte.d.ts.map +1 -1
- package/dist/components/statusbadge/StatusBadge.js +2 -2
- package/dist/components/statusbadge/StatusBadge.js.map +1 -1
- package/dist/components/statusbadge/StatusBadge.svelte +9 -9
- package/dist/components/statusdot/StatusDot.js +1 -1
- package/dist/components/statusdot/StatusDot.js.map +1 -1
- package/dist/components/statusdot/StatusDot.spec.js +1 -7
- package/dist/components/statusdot/StatusDot.svelte +3 -9
- package/dist/components/statusdot/StatusDot.svelte.d.ts.map +1 -1
- package/dist/components/statusmessage/README.md +11 -0
- package/dist/components/statusmessage/StatusMessage.js +4 -0
- package/dist/components/statusmessage/StatusMessage.js.map +1 -0
- package/dist/components/statusmessage/StatusMessage.spec.js +47 -0
- package/dist/components/statusmessage/StatusMessage.stories.d.ts +11 -0
- package/dist/components/statusmessage/StatusMessage.stories.d.ts.map +1 -0
- package/dist/components/statusmessage/StatusMessage.stories.js +37 -0
- package/dist/components/statusmessage/StatusMessage.svelte +84 -0
- package/dist/components/statusmessage/StatusMessage.svelte.d.ts +17 -0
- package/dist/components/statusmessage/StatusMessage.svelte.d.ts.map +1 -0
- package/dist/components/statusnotification/StatusNotification.js +2 -6
- package/dist/components/statusnotification/StatusNotification.js.map +1 -1
- package/dist/components/statusnotification/StatusNotification.stories.d.ts.map +1 -1
- package/dist/components/statusnotification/StatusNotification.svelte +14 -23
- package/dist/components/steppercompact/README.md +13 -0
- package/dist/components/steppercompact/StepperCompact.js +4 -0
- package/dist/components/steppercompact/StepperCompact.js.map +1 -0
- package/dist/components/steppercompact/StepperCompact.spec.js +119 -0
- package/dist/components/steppercompact/StepperCompact.stories.d.ts +6 -0
- package/dist/components/steppercompact/StepperCompact.stories.d.ts.map +1 -0
- package/dist/components/steppercompact/StepperCompact.stories.js +28 -0
- package/dist/components/steppercompact/StepperCompact.svelte +123 -0
- package/dist/components/steppercompact/StepperCompact.svelte.d.ts +25 -0
- package/dist/components/steppercompact/StepperCompact.svelte.d.ts.map +1 -0
- package/dist/components/tab/Tab.js +2 -2
- package/dist/components/tab/Tab.js.map +1 -1
- package/dist/components/tab/Tab.svelte +2 -8
- package/dist/components/tab/Tab.svelte.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.svelte +1 -1
- package/dist/components/tag/README.md +30 -0
- package/dist/components/tag/Tag.js +4 -0
- package/dist/components/tag/Tag.js.map +1 -0
- package/dist/components/tag/Tag.stories.d.ts +12 -0
- package/dist/components/tag/Tag.stories.d.ts.map +1 -0
- package/dist/components/tag/Tag.stories.js +70 -0
- package/dist/components/{tags/TagRemovable.svelte → tag/Tag.svelte} +107 -32
- package/dist/components/tag/Tag.svelte.d.ts +65 -0
- package/dist/components/tag/Tag.svelte.d.ts.map +1 -0
- package/dist/components/textarea/Textarea.js +2 -2
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/Textarea.svelte +6 -8
- package/dist/components/textinput/README.md +1 -1
- package/dist/components/textinput/Textinput.js +5 -5
- package/dist/components/textinput/Textinput.js.map +1 -1
- package/dist/components/textinput/Textinput.stories.d.ts +1 -1
- package/dist/components/textinput/Textinput.stories.js +1 -1
- package/dist/components/textinput/Textinput.svelte +10 -18
- package/dist/components/textinput/Textinput.svelte.d.ts +1 -1
- 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 +3 -7
- package/dist/components/toaster/Toaster.js.map +1 -1
- package/dist/components/toaster/Toaster.svelte +20 -23
- package/dist/components/toaster/Toaster.svelte.d.ts +4 -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.svelte +4 -18
- 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.spec.js +1 -1
- package/dist/components/togglegroup/ToggleGroup.svelte +3 -3
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/tooltip/Tooltip.spec.js +1 -1
- package/dist/components/tooltip/Tooltip.svelte +3 -7
- package/dist/components/tooltip/Tooltip.svelte.d.ts.map +1 -1
- package/dist/custom-element-forward-events.js +1 -1
- package/dist/custom-element-forward-events.js.map +1 -1
- package/dist/custom-element.js +3 -3
- package/dist/custom-element.js.map +1 -1
- package/dist/documentation/Introduction.mdx +13 -4
- package/dist/documentation/Svelte/Introduction.mdx +1 -1
- package/dist/documentation/Svelte/usingPresets.mdx +7 -9
- package/dist/documentation/WebComponents/Introduction.mdx +0 -1
- package/dist/documentation/WebComponents/usingIcons.mdx +2 -3
- package/dist/documentation/WebComponents/usingPresets.mdx +5 -7
- package/dist/each.js +1 -1
- package/dist/each.js.map +1 -1
- package/dist/if.js +1 -1
- package/dist/if.js.map +1 -1
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/legacy.js +1 -1
- package/dist/main.d.ts +8 -6
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +8 -6
- package/dist/slot.js +1 -1
- package/dist/slot.js.map +1 -1
- package/dist/svelte-component.js +2 -0
- package/dist/svelte-component.js.map +1 -0
- package/dist/this.js +1 -1
- package/dist/this.js.map +1 -1
- package/dist/utils/custom-element-forward-events.d.ts.map +1 -1
- package/package.json +34 -35
- package/dist/components/tags/README.md +0 -9
- package/dist/components/tags/Tag.js +0 -4
- package/dist/components/tags/Tag.js.map +0 -1
- package/dist/components/tags/Tag.svelte +0 -218
- package/dist/components/tags/Tag.svelte.d.ts +0 -9
- package/dist/components/tags/Tag.svelte.d.ts.map +0 -1
- package/dist/components/tags/TagContextualised.js +0 -4
- package/dist/components/tags/TagContextualised.js.map +0 -1
- package/dist/components/tags/TagContextualised.svelte +0 -239
- package/dist/components/tags/TagContextualised.svelte.d.ts +0 -11
- package/dist/components/tags/TagContextualised.svelte.d.ts.map +0 -1
- package/dist/components/tags/TagInteractive.js +0 -4
- package/dist/components/tags/TagInteractive.js.map +0 -1
- package/dist/components/tags/TagInteractive.svelte +0 -223
- package/dist/components/tags/TagInteractive.svelte.d.ts +0 -10
- package/dist/components/tags/TagInteractive.svelte.d.ts.map +0 -1
- package/dist/components/tags/TagRemovable.js +0 -4
- package/dist/components/tags/TagRemovable.js.map +0 -1
- package/dist/components/tags/TagRemovable.svelte.d.ts +0 -11
- package/dist/components/tags/TagRemovable.svelte.d.ts.map +0 -1
- package/dist/components/tags/TagSelectable.js +0 -4
- package/dist/components/tags/TagSelectable.js.map +0 -1
- package/dist/components/tags/TagSelectable.svelte +0 -247
- package/dist/components/tags/TagSelectable.svelte.d.ts +0 -13
- package/dist/components/tags/TagSelectable.svelte.d.ts.map +0 -1
- package/dist/components/tags/Tags.stories.d.ts +0 -5
- package/dist/components/tags/Tags.stories.d.ts.map +0 -1
- package/dist/components/tags/Tags.stories.js +0 -41
- package/dist/components/tags/TagsContextualised.stories.d.ts +0 -5
- package/dist/components/tags/TagsContextualised.stories.d.ts.map +0 -1
- package/dist/components/tags/TagsContextualised.stories.js +0 -57
- package/dist/components/tags/TagsInteractive.stories.d.ts +0 -5
- package/dist/components/tags/TagsInteractive.stories.d.ts.map +0 -1
- package/dist/components/tags/TagsInteractive.stories.js +0 -61
- package/dist/components/tags/TagsRemovable.stories.d.ts +0 -5
- package/dist/components/tags/TagsRemovable.stories.d.ts.map +0 -1
- package/dist/components/tags/TagsRemovable.stories.js +0 -62
- package/dist/components/tags/TagsSelectable.stories.d.ts +0 -5
- package/dist/components/tags/TagsSelectable.stories.d.ts.map +0 -1
- package/dist/components/tags/TagsSelectable.stories.js +0 -76
package/dist/bundle.js
CHANGED
|
@@ -5,11 +5,14 @@ import './components/callout/Callout.js';
|
|
|
5
5
|
import './components/checkbox/Checkbox.js';
|
|
6
6
|
import './components/checkboxgroup/CheckboxGroup.js';
|
|
7
7
|
import './components/circularprogressbar/CircularProgressbar.js';
|
|
8
|
+
import './components/container/Container.js';
|
|
8
9
|
import './components/datepicker/Datepicker.js';
|
|
10
|
+
import './components/divider/Divider.js';
|
|
9
11
|
import './components/drawer/Drawer.js';
|
|
10
12
|
import './components/field/Field.js';
|
|
11
13
|
import './components/flag/Flag.js';
|
|
12
14
|
import './components/iconbutton/IconButton.js';
|
|
15
|
+
import './components/kpiitem/KpiItem.js';
|
|
13
16
|
import './components/linearprogressbarbuffer/LinearProgressbarBuffer.js';
|
|
14
17
|
import './components/linearprogressbarpercentage/LinearProgressbarPercentage.js';
|
|
15
18
|
import './components/link/Link.js';
|
|
@@ -27,14 +30,12 @@ import './components/radiogroup/RadioGroup.js';
|
|
|
27
30
|
import './components/select/Select.js';
|
|
28
31
|
import './components/statusbadge/StatusBadge.js';
|
|
29
32
|
import './components/statusdot/StatusDot.js';
|
|
33
|
+
import './components/statusmessage/StatusMessage.js';
|
|
30
34
|
import './components/statusnotification/StatusNotification.js';
|
|
35
|
+
import './components/segmentedcontrol/SegmentedControl.js';
|
|
31
36
|
import './components/tab/Tab.js';
|
|
32
37
|
import './components/tabs/Tabs.js';
|
|
33
|
-
import './components/
|
|
34
|
-
import './components/tags/TagContextualised.js';
|
|
35
|
-
import './components/tags/TagInteractive.js';
|
|
36
|
-
import './components/tags/TagRemovable.js';
|
|
37
|
-
import './components/tags/TagSelectable.js';
|
|
38
|
+
import './components/tag/Tag.js';
|
|
38
39
|
import './components/textarea/Textarea.js';
|
|
39
40
|
import './components/textinput/Textinput.js';
|
|
40
41
|
import './components/toaster/Toaster.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as n,p as l,a as
|
|
1
|
+
import{c as n,p as l,a as d,b as c,f as m,d as f,t as v,i as h,j as g,k as u,r as b,e as p,g as w}from"../../custom-element.js";import{s as z}from"../../slot.js";var y=m("<div><!></div>");const _={hash:"svelte-1g4aw6b",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-avatar.svelte-1g4aw6b {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;overflow:hidden;border-radius:var(--radius-full, 100%);background:var(--color-background-secondary, #eff1f6);color:var(--color-text-secondary, #404040);font-size:var(--font-size-50, 0.75rem);font-weight:var(--font-weight-semi-bold, 600);text-transform:uppercase;}.mc-avatar--m.svelte-1g4aw6b {width:3rem;height:3rem;font-size:var(--font-size-200, 1.125rem);}.mc-avatar--l.svelte-1g4aw6b {width:4rem;height:4rem;font-size:var(--font-size-300, 1.5rem);}.svelte-1g4aw6b::slotted(img) {display:block;width:100%;height:100%;object-fit:contain;}`};function x(s,a){l(a,!0),
|
|
3
|
+
*/.mc-avatar.svelte-1g4aw6b {display:flex;align-items:center;justify-content:center;width:2rem;height:2rem;overflow:hidden;border-radius:var(--border-radius-full, 100%);background:var(--color-background-secondary, #eff1f6);color:var(--color-text-secondary, #404040);font-size:var(--font-size-50, 0.75rem);font-weight:var(--font-weight-semi-bold, 600);text-transform:uppercase;}.mc-avatar--m.svelte-1g4aw6b {width:3rem;height:3rem;font-size:var(--font-size-200, 1.125rem);}.mc-avatar--l.svelte-1g4aw6b {width:4rem;height:4rem;font-size:var(--font-size-300, 1.5rem);}.svelte-1g4aw6b::slotted(img) {display:block;width:100%;height:100%;object-fit:contain;}`};function x(s,a){l(a,!0),d(s,_);let e=c(a,"size",7,"s");var r={get size(){return e()},set size(o="s"){e(o),u()}},t=y(),i=f(t);return z(i,a,"default",{}),b(t),v(()=>p(t,1,w(["mc-avatar",e()&&`mc-avatar--${e()}`]),"svelte-1g4aw6b")),h(s,t),g(r)}customElements.define("m-avatar",n(x,{size:{}},["default"],[],!0));
|
|
4
4
|
//# sourceMappingURL=Avatar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.js","sources":["../../../src/components/avatar/Avatar.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-avatar' }} />\n\n<script lang=\"ts\">\n /**\n * An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.\n
|
|
1
|
+
{"version":3,"file":"Avatar.js","sources":["../../../src/components/avatar/Avatar.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-avatar' }} />\n\n<script lang=\"ts\">\n /**\n * An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.\n *\n * @slot default - Use this slot to insert the image, icon or intials of the avatar.\n */\n interface Props {\n /**\n * Determines the size of the avatar.\n */\n size: 's' | 'm' | 'l';\n }\n\n let { size = 's' }: Props = $props();\n</script>\n\n<div class={['mc-avatar', size && `mc-avatar--${size}`]}>\n <slot />\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/avatar';\n\n ::slotted(img) {\n display: block;\n width: 100%;\n height: 100%;\n object-fit: contain;\n }\n</style>\n"],"names":["size"],"mappings":";;gqBAAA,gBAeQ,IAAAA,eAAO,GAAG,2CAAH,IAAG,wEAGL,YAAaA,EAAI,GAAA,cAAkBA,EAAI,CAAA,EAAA,CAAA,EAAA,gBAAA,CAAA,aAFpD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,gEAAgE,CAAC;AAExE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Avatar.stories.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,gEAAgE,CAAC;AAExE,QAAA,MAAM,IAAI,EAAE,IAkBX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,QAAQ,EAAE,KAMtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC"}
|
|
@@ -18,9 +18,7 @@ const meta = {
|
|
|
18
18
|
`,
|
|
19
19
|
},
|
|
20
20
|
render: (args) => html `
|
|
21
|
-
<m-avatar size=${ifDefined(args.size)}>
|
|
22
|
-
${unsafeHTML(ifDefined(args.default))}
|
|
23
|
-
</m-avatar>
|
|
21
|
+
<m-avatar size=${ifDefined(args.size)}> ${unsafeHTML(ifDefined(args.default))} </m-avatar>
|
|
24
22
|
`,
|
|
25
23
|
};
|
|
26
24
|
export default meta;
|
|
@@ -3,21 +3,21 @@
|
|
|
3
3
|
<script lang="ts">
|
|
4
4
|
/**
|
|
5
5
|
* An avatar is a graphical representation of a user, entity, or group, commonly displayed as an image, initials, or an icon. It helps identify individuals or accounts in profiles, comments, chat interfaces, and user lists. Avatars can be customized with different styles, sizes, and fallback options (such as initials or placeholders) to ensure consistency and recognition across interfaces. When multiple users are represented, Avatar groups provide a compact way to display them collectively.
|
|
6
|
-
*
|
|
6
|
+
*
|
|
7
7
|
* @slot default - Use this slot to insert the image, icon or intials of the avatar.
|
|
8
8
|
*/
|
|
9
9
|
interface Props {
|
|
10
10
|
/**
|
|
11
11
|
* Determines the size of the avatar.
|
|
12
12
|
*/
|
|
13
|
-
|
|
14
|
-
|
|
13
|
+
size: 's' | 'm' | 'l';
|
|
14
|
+
}
|
|
15
15
|
|
|
16
|
-
let { size = 's'}: Props = $props();
|
|
16
|
+
let { size = 's' }: Props = $props();
|
|
17
17
|
</script>
|
|
18
18
|
|
|
19
|
-
<div class={[
|
|
20
|
-
<slot/>
|
|
19
|
+
<div class={['mc-avatar', size && `mc-avatar--${size}`]}>
|
|
20
|
+
<slot />
|
|
21
21
|
</div>
|
|
22
22
|
|
|
23
23
|
<style>/**
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
width: 2rem;
|
|
31
31
|
height: 2rem;
|
|
32
32
|
overflow: hidden;
|
|
33
|
-
border-radius: var(--radius-full, 100%);
|
|
33
|
+
border-radius: var(--border-radius-full, 100%);
|
|
34
34
|
background: var(--color-background-secondary, #eff1f6);
|
|
35
35
|
color: var(--color-text-secondary, #404040);
|
|
36
36
|
font-size: var(--font-size-50, 0.75rem);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Avatar.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.svelte.ts"],"names":[],"mappings":"AAGE;;;;GAIG;AACH,UAAU,KAAK;IACb;;OAEG;
|
|
1
|
+
{"version":3,"file":"Avatar.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/avatar/Avatar.svelte.ts"],"names":[],"mappings":"AAGE;;;;GAIG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,IAAI,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CACvB;AAiBH,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AACD,KAAK,gCAAgC,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,GACvD,CAAC,KAAK,SAAS;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GACzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,GAAG,GACH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,GAClB,EAAE,CAAC,CAAC;AAId,QAAA,MAAM,MAAM;;;;;;UAAqF,CAAC;AAChF,KAAK,MAAM,GAAG,YAAY,CAAC,OAAO,MAAM,CAAC,CAAC;AAC5C,eAAe,MAAM,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import{c as L,p as B,a as M,b as u,f as
|
|
1
|
+
import{c as L,p as B,a as M,b as u,f as p,d as n,t as b,i as x,j,k as f,r as t,e as _,g as z,m,h as D}from"../../custom-element.js";import{e as S,i as q}from"../../each.js";import{s as g}from"../../attributes.js";var A=p('<li class="mc-breadcrumb__item svelte-1ihiex7"><a><span class="mc-link__label svelte-1ihiex7"> </span></a></li>'),F=p('<nav aria-label="Breadcrumb"><ol class="mc-breadcrumb__container svelte-1ihiex7"></ol></nav>');const G={hash:"svelte-1ihiex7",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/.mc-breadcrumb.svelte-1ihiex7 {color:var(--breadcrumb-color-text-standard, #000000);}.mc-breadcrumb__container.svelte-1ihiex7 {list-style-type:none;padding-inline-start:0;margin-block:0;display:flex;flex-wrap:wrap;gap:0.25rem;}.mc-breadcrumb__item.svelte-1ihiex7 {background-position:left center;background-repeat:no-repeat;}.mc-breadcrumb__item.svelte-1ihiex7:not(:first-child) {padding-inline-start:1.5rem;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-standard, %23000000)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M8.22 5.303a.75.75 0 0 1 1.06 0l4.167 4.167a.75.75 0 0 1 0 1.06L9.28 14.698a.75.75 0 1 1-1.06-1.06L11.856 10 8.22 6.364a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");}
|
|
4
4
|
@media screen and (max-width: 679px) {.mc-breadcrumb__item.svelte-1ihiex7:nth-last-child(2) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-standard, %23000000)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M11.78 5.303a.75.75 0 0 1 0 1.06L8.144 10l3.636 3.637a.75.75 0 0 1-1.06 1.06l-4.167-4.166a.75.75 0 0 1 0-1.061l4.166-4.167a.75.75 0 0 1 1.061 0'/%3E%3C/svg%3E");}.mc-breadcrumb__item.svelte-1ihiex7:not(:nth-last-child(2)) {clip-path:inset(100%);clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;padding:0;width:1px;}
|
|
5
5
|
}.mc-breadcrumb__current.svelte-1ihiex7, .mc-breadcrumb__current.mc-link.svelte-1ihiex7 {cursor:default;text-decoration:none;}.mc-breadcrumb__current.svelte-1ihiex7, .mc-breadcrumb__current.svelte-1ihiex7:active, .mc-breadcrumb__current.svelte-1ihiex7:focus, .mc-breadcrumb__current.svelte-1ihiex7:hover, .mc-breadcrumb__current.svelte-1ihiex7:visited, .mc-breadcrumb__current.mc-link.svelte-1ihiex7, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:active, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:focus, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:hover, .mc-breadcrumb__current.mc-link.svelte-1ihiex7:visited {color:currentcolor;}.mc-breadcrumb--inverse.svelte-1ihiex7 {color:var(--breadcrumb-color-text-inverse, #ffffff);}.mc-breadcrumb--inverse.svelte-1ihiex7 .mc-breadcrumb__item:where(.svelte-1ihiex7):not(:first-child) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-inverse, %23ffffff)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M8.22 5.303a.75.75 0 0 1 1.06 0l4.167 4.167a.75.75 0 0 1 0 1.06L9.28 14.698a.75.75 0 1 1-1.06-1.06L11.856 10 8.22 6.364a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");}
|
|
6
6
|
@media screen and (max-width: 679px) {.mc-breadcrumb--inverse.svelte-1ihiex7 .mc-breadcrumb__item:where(.svelte-1ihiex7):nth-last-child(2) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='var(--breadcrumb-color-icon-inverse, %23ffffff)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M11.78 5.303a.75.75 0 0 1 0 1.06L8.144 10l3.636 3.637a.75.75 0 0 1-1.06 1.06l-4.167-4.166a.75.75 0 0 1 0-1.061l4.166-4.167a.75.75 0 0 1 1.061 0'/%3E%3C/svg%3E");}
|
|
7
|
-
}.mc-link.svelte-1ihiex7 {transition:box-shadow 200ms ease;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;min-height:1.5rem;text-decoration:none;color:var(--link-color-text-primary, #000000);font-size:0.875rem;}.mc-link__label.svelte-1ihiex7 {line-height:1.3;}.mc-link__icon.svelte-1ihiex7 {display:block;height:1.25rem;width:1.25rem;flex-shrink:0;fill:currentcolor;}.mc-link.svelte-1ihiex7:hover:not(.mc-link--stand-alone, .mc-link--inline) .mc-link__label:where(.svelte-1ihiex7) {text-decoration:underline;}.mc-link.svelte-1ihiex7:focus {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-link--m.svelte-1ihiex7 {min-height:2rem;font-size:1rem;}.mc-link--secondary.svelte-1ihiex7 {color:var(--link-color-text-secondary, #666666);}.mc-link--accent.svelte-1ihiex7 {color:var(--link-color-text-accent, #117f03);}.mc-link--inverse.svelte-1ihiex7 {--focus-color-mid: var(--focus-color-outline-outer, #000000);--focus-color-outer: var(--focus-color-outline-mid, #ffffff);color:var(--link-color-text-inverse, #ffffff);}.mc-link--stand-alone.svelte-1ihiex7 {min-height:2rem;font-weight:var(--link-font-weight, 600);}.mc-link--stand-alone.svelte-1ihiex7 .mc-link__label:where(.svelte-1ihiex7) {border-bottom:var(--border-s,
|
|
7
|
+
}.mc-link.svelte-1ihiex7 {transition:box-shadow 200ms ease;display:inline-flex;align-items:center;justify-content:center;gap:0.25rem;min-height:1.5rem;text-decoration:none;color:var(--link-color-text-primary, #000000);font-size:0.875rem;}.mc-link__label.svelte-1ihiex7 {line-height:1.3;}.mc-link__icon.svelte-1ihiex7 {display:block;height:1.25rem;width:1.25rem;flex-shrink:0;fill:currentcolor;}.mc-link.svelte-1ihiex7:hover:not(.mc-link--stand-alone, .mc-link--inline) .mc-link__label:where(.svelte-1ihiex7) {text-decoration:underline;}.mc-link.svelte-1ihiex7:focus {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-link--m.svelte-1ihiex7 {min-height:2rem;font-size:1rem;}.mc-link--secondary.svelte-1ihiex7 {color:var(--link-color-text-secondary, #666666);}.mc-link--accent.svelte-1ihiex7 {color:var(--link-color-text-accent, #117f03);}.mc-link--inverse.svelte-1ihiex7 {--focus-color-mid: var(--focus-color-outline-outer, #000000);--focus-color-outer: var(--focus-color-outline-mid, #ffffff);color:var(--link-color-text-inverse, #ffffff);}.mc-link--stand-alone.svelte-1ihiex7 {min-height:2rem;font-weight:var(--link-font-weight, 600);}.mc-link--stand-alone.svelte-1ihiex7 .mc-link__label:where(.svelte-1ihiex7) {border-bottom:var(--border-width-s, 0.0625rem) solid currentColor;}.mc-link--stand-alone.svelte-1ihiex7:hover .mc-link__label:where(.svelte-1ihiex7) {border-color:transparent;}.mc-link--inline.svelte-1ihiex7 {font-weight:inherit;text-decoration:underline;}.mc-link--inline.svelte-1ihiex7 .mc-link__label:where(.svelte-1ihiex7) {line-height:1;}.mc-link--inline.svelte-1ihiex7:hover {text-decoration:none;}`};function H(d,c){B(c,!0),M(d,G);let r=u(c,"appearance",7,"standard"),a=u(c,"links",7);const k=e=>e===a().length-1;var w={get appearance(){return r()},set appearance(e="standard"){r(e),f()},get links(){return a()},set links(e){a(e),f()}},l=F(),h=n(l);return S(h,21,a,q,(e,s,C)=>{var o=A(),i=n(o),v=n(i),E=n(v,!0);t(v),t(i),t(o),b(y=>{g(i,"href",m(s).href),g(i,"target",m(s).target),_(i,1,y,"svelte-1ihiex7"),D(E,m(s).label)},[()=>z(["mc-link","mc-link--m","mc-link--inline",r()&&`mc-link--${r()}`,k(C)&&"mc-breadcrumb__current"])]),x(e,o)}),t(h),t(l),b(()=>_(l,1,`mc-breadcrumb mc-breadcrumb--${r()}`,"svelte-1ihiex7")),x(d,l),j(w)}customElements.define("m-breadcrumb",L(H,{appearance:{},links:{}},[],[],!0));
|
|
8
8
|
//# sourceMappingURL=Breadcrumb.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.js","sources":["../../../src/components/breadcrumb/Breadcrumb.svelte"],"sourcesContent":["<svelte:options\n customElement={{\n tag: 'm-breadcrumb',\n }}\n/>\n\n<script lang=\"ts\">\n /**\n * A breadcrumb is a navigation help that displays the hierarchical path of the current page within a website or application. It helps users understand their location and allows them to navigate back to previous levels easily. Breadcrumbs improve usability and accessibility, especially in multi-level websites, dashboards, and e-commerce platforms.\n */\n interface Props {\n /**\n * Allows to define the breadcrumb appearance.\n */\n appearance: 'standard' | 'inverse';\n /**\n * Links of the breadcrumb.\n */\n links: Array<{\n /**\n * The label displayed for the link.\n */\n label: string;\n /**\n * URL for the link.\n */\n href: string;\n /**\n * Where to open the link.\n */\n target?: '_blank' | '_self' | '_parent' | '_top';\n }>;\n }\n\n let { appearance = 'standard', links }: Props = $props();\n\n const isLastLink = (index: number) => index === links.length - 1;\n</script>\n\n<nav
|
|
1
|
+
{"version":3,"file":"Breadcrumb.js","sources":["../../../src/components/breadcrumb/Breadcrumb.svelte"],"sourcesContent":["<svelte:options\n customElement={{\n tag: 'm-breadcrumb',\n }}\n/>\n\n<script lang=\"ts\">\n /**\n * A breadcrumb is a navigation help that displays the hierarchical path of the current page within a website or application. It helps users understand their location and allows them to navigate back to previous levels easily. Breadcrumbs improve usability and accessibility, especially in multi-level websites, dashboards, and e-commerce platforms.\n */\n interface Props {\n /**\n * Allows to define the breadcrumb appearance.\n */\n appearance: 'standard' | 'inverse';\n /**\n * Links of the breadcrumb.\n */\n links: Array<{\n /**\n * The label displayed for the link.\n */\n label: string;\n /**\n * URL for the link.\n */\n href: string;\n /**\n * Where to open the link.\n */\n target?: '_blank' | '_self' | '_parent' | '_top';\n }>;\n }\n\n let { appearance = 'standard', links }: Props = $props();\n\n const isLastLink = (index: number) => index === links.length - 1;\n</script>\n\n<nav class={`mc-breadcrumb mc-breadcrumb--${appearance}`} aria-label=\"Breadcrumb\">\n <ol class=\"mc-breadcrumb__container\">\n {#each links as link, index (index)}\n <li class=\"mc-breadcrumb__item\">\n <a\n href={link.href}\n target={link.target}\n class={[\n 'mc-link',\n 'mc-link--m',\n 'mc-link--inline',\n appearance && `mc-link--${appearance}`,\n isLastLink(index) && 'mc-breadcrumb__current',\n ]}\n >\n <span class=\"mc-link__label\">{link.label}</span>\n </a>\n </li>\n {/each}\n </ol>\n</nav>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/breadcrumb';\n @use '@mozaic-ds/styles/components/link';\n</style>\n"],"names":["appearance","links","$.prop","$$props","isLastLink","index","$.each","ol","link","$.set_attribute","a","$.get","$.set_text","text"],"mappings":";;;;;;8xDAAA,gBAkCQ,IAAAA,qBAAa,UAAU,EAAEC,EAAKC,EAAAC,EAAA,QAAA,CAAA,QAE9BC,EAAcC,GAAkBA,IAAUJ,EAAK,EAAC,OAAS,uDAF5C,WAAU,wEAOpBK,OAAAA,EAAAC,EAAA,GAAAN,OAASO,EAAIH,IAAA,wDAGRI,EAAAC,EAAA,OAAAC,EAAAH,CAAI,EAAC,IAAI,EACPC,EAAAC,EAAA,SAAAC,EAAAH,CAAI,EAAC,MAAM,4BASWI,EAAAC,EAAAF,EAAAH,CAAI,EAAC,KAAK,WAPtC,UACA,aACA,kBACAR,iBAA0BA,EAAU,CAAA,GACpCI,EAAWC,CAAK,GAAK,4FAZWL,EAAU,CAAA,GAAA,gBAAA,CAAA,aAFtD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.stories.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Breadcrumb.stories.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,QAAA,MAAM,IAAI,EAAE,IAgCX,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,OAAO,EAAE,KAAU,CAAC;AAEjC,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC"}
|
|
@@ -30,10 +30,7 @@ const meta = {
|
|
|
30
30
|
},
|
|
31
31
|
},
|
|
32
32
|
render: (args) => html `
|
|
33
|
-
<m-breadcrumb
|
|
34
|
-
appearance=${ifDefined(args.appearance)}
|
|
35
|
-
.links=${args.links}
|
|
36
|
-
></m-breadcrumb>
|
|
33
|
+
<m-breadcrumb appearance=${ifDefined(args.appearance)} .links=${args.links}></m-breadcrumb>
|
|
37
34
|
`,
|
|
38
35
|
};
|
|
39
36
|
export default meta;
|
|
@@ -37,10 +37,7 @@
|
|
|
37
37
|
const isLastLink = (index: number) => index === links.length - 1;
|
|
38
38
|
</script>
|
|
39
39
|
|
|
40
|
-
<nav
|
|
41
|
-
class={`mc-breadcrumb mc-breadcrumb--${appearance}`}
|
|
42
|
-
aria-label="Breadcrumb"
|
|
43
|
-
>
|
|
40
|
+
<nav class={`mc-breadcrumb mc-breadcrumb--${appearance}`} aria-label="Breadcrumb">
|
|
44
41
|
<ol class="mc-breadcrumb__container">
|
|
45
42
|
{#each links as link, index (index)}
|
|
46
43
|
<li class="mc-breadcrumb__item">
|
|
@@ -167,7 +164,7 @@
|
|
|
167
164
|
font-weight: var(--link-font-weight, 600);
|
|
168
165
|
}
|
|
169
166
|
.mc-link--stand-alone .mc-link__label {
|
|
170
|
-
border-bottom: var(--border-s,
|
|
167
|
+
border-bottom: var(--border-width-s, 0.0625rem) solid currentColor;
|
|
171
168
|
}
|
|
172
169
|
.mc-link--stand-alone:hover .mc-link__label {
|
|
173
170
|
border-color: transparent;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import{c as G,p as H,a as I,b as n,f as s,
|
|
1
|
+
import{c as G,p as H,a as I,b as n,f as s,D as J,d,s as v,i as b,j as K,k as a,r as u,t as M,e as N,g as O}from"../../custom-element.js";import{i}from"../../if.js";import{s as h}from"../../slot.js";import{b as P}from"../../attributes.js";import{L as Q}from"../loader/Loader.js";var R=s('<span class="mc-button__icon svelte-ozghz9"><!></span>'),T=s('<span class="mc-button__icon svelte-ozghz9" style="color: currentColor;position: absolute; visibility: visible;"><!></span>'),U=s('<span class="mc-button__icon svelte-ozghz9"><!></span>'),V=s("<span><!></span>"),W=s('<span class="mc-button__icon svelte-ozghz9"><!></span>'),X=s("<button><!> <!> <!> <!> <!></button>");const Y={hash:"svelte-ozghz9",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-button.svelte-ozghz9 {color:var(--button-color-filled-standard-font, #ffffff);background-color:var(--button-color-filled-standard-background, #464e63);}.mc-button.svelte-ozghz9:hover {background-color:var(--button-color-filled-standard-hover-background, #343b4c);}.mc-button.svelte-ozghz9:active {background-color:var(--button-color-filled-standard-active-background, #242938);}.mc-button.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button.svelte-ozghz9 {font-weight:var(--font-weight-semi-bold, 600);padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-150, 1rem);}.mc-button.svelte-ozghz9 {display:inline-flex;justify-content:center;vertical-align:middle;text-align:center;border:2px solid transparent;border-radius:var(--button-radius, 0.25rem);transition:all ease 200ms;transition:box-shadow 200ms ease;align-items:center;box-sizing:border-box;font-family:inherit;fill:currentcolor;gap:0.25rem;cursor:pointer;}.mc-button__label.svelte-ozghz9 {font-size:var(--font-size-150, 1rem);}.mc-button__icon.svelte-ozghz9 {flex-shrink:0;width:1.5rem;height:1.5rem;}.mc-button.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button.svelte-ozghz9:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-button--s.svelte-ozghz9 {padding:0 calc(0.75rem - 0.125rem);min-height:2rem;min-width:2rem;}.mc-button--s.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-100, 0.875rem);}.mc-button--s.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {width:1.25rem;height:1.25rem;}.mc-button--s.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9):only-child {width:1.25rem;height:1.25rem;}.mc-button--m.svelte-ozghz9 {padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button--m.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-150, 1rem);}.mc-button--m.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {width:1.5rem;height:1.5rem;}.mc-button--m.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9):only-child {width:1.5rem;height:1.5rem;}.mc-button--l.svelte-ozghz9 {padding:0 calc(1.25rem - 0.125rem);min-height:4rem;min-width:4rem;}.mc-button--l.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-200, 1.125rem);}.mc-button--l.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {width:2rem;height:2rem;}.mc-button--l.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9):only-child {width:2rem;height:2rem;}.mc-button--icon-only.svelte-ozghz9 {padding:0.25rem;}.mc-button--outlined.svelte-ozghz9 {color:var(--button-color-outlined-standard-font, #242938);border-color:var(--button-color-outlined-standard-border, #8891aa);background-color:var(--button-color-outlined-standard-background, #ffffff);}.mc-button--outlined.svelte-ozghz9:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.svelte-ozghz9:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.svelte-ozghz9 {color:var(--button-color-ghost-standard-font, #242938);background-color:var(--button-color-ghost-standard-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.svelte-ozghz9:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.svelte-ozghz9:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--accent.svelte-ozghz9 {color:var(--button-color-filled-accent-font, #ffffff);background-color:var(--button-color-filled-accent-background, #117f03);}.mc-button--accent.svelte-ozghz9:hover {background-color:var(--button-color-filled-accent-hover-background, #006902);}.mc-button--accent.svelte-ozghz9:active {background-color:var(--button-color-filled-accent-active-background, #035010);}.mc-button--accent.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--danger.svelte-ozghz9 {color:var(--button-color-filled-danger-font, #ffffff);background-color:var(--button-color-filled-danger-background, #c61112);}.mc-button--danger.svelte-ozghz9:hover {background-color:var(--button-color-filled-danger-hover-background, #8c0003);}.mc-button--danger.svelte-ozghz9:active {background-color:var(--button-color-filled-danger-active-background, #530000);}.mc-button--danger.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--inverse.svelte-ozghz9 {--focus-color-mid: var(--focus-color-outline-outer, #000000);--focus-color-outer: var(--focus-color-outline-mid, #ffffff);color:var(--button-color-filled-inverse-font, #242938);background-color:var(--button-color-filled-inverse-background, #ffffff);}.mc-button--inverse.svelte-ozghz9:hover {background-color:var(--button-color-filled-inverse-hover-background, #e6e6e6);}.mc-button--inverse.svelte-ozghz9:active {background-color:var(--button-color-filled-inverse-active-background, #cccccc);}.mc-button--inverse.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--icon-button.svelte-ozghz9 {border-radius:var(--radius-full, 100%);padding:0;}.mc-button--loading.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9),
|
|
4
|
-
.mc-button--loading.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {visibility:hidden;}.mc-button--outlined.mc-button--standard.svelte-ozghz9 {color:var(--button-color-outlined-standard-font, #242938);border-color:var(--button-color-outlined-standard-border, #8891aa);background-color:var(--button-color-outlined-standard-background, #ffffff);}.mc-button--outlined.mc-button--standard.svelte-ozghz9:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.mc-button--standard.svelte-ozghz9:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.mc-button--standard.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--outlined.mc-button--accent.svelte-ozghz9 {color:var(--button-color-outlined-accent-font, #117f03);border-color:var(--button-color-outlined-accent-border, #78be20);background-color:var(--button-color-outlined-accent-background, #ffffff);}.mc-button--outlined.mc-button--accent.svelte-ozghz9:hover {background-color:var(--button-color-outlined-accent-hover-background, #ebf5de);}.mc-button--outlined.mc-button--accent.svelte-ozghz9:active {background-color:var(--button-color-outlined-accent-active-background, #c5e39e);}.mc-button--outlined.mc-button--accent.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--outlined.mc-button--danger.svelte-ozghz9 {color:var(--button-color-outlined-danger-font, #c61112);border-color:var(--button-color-outlined-danger-border, #ef5f5c);background-color:var(--button-color-outlined-danger-background, #ffffff);}.mc-button--outlined.mc-button--danger.svelte-ozghz9:hover {background-color:var(--button-color-outlined-danger-hover-background, #fdeaea);}.mc-button--outlined.mc-button--danger.svelte-ozghz9:active {background-color:var(--button-color-outlined-danger-active-background, #f8bcbb);}.mc-button--outlined.mc-button--danger.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--outlined.mc-button--inverse.svelte-ozghz9 {color:var(--button-color-outlined-inverse-font, #ffffff);border-color:var(--button-color-outlined-inverse-border, #ffffff);background-color:var(--button-color-outlined-inverse-background, rgba(255, 255, 255, 0.01));}.mc-button--outlined.mc-button--inverse.svelte-ozghz9:hover {background-color:var(--button-color-outlined-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--outlined.mc-button--inverse.svelte-ozghz9:active {background-color:var(--button-color-outlined-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--outlined.mc-button--inverse.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--standard.svelte-ozghz9 {color:var(--button-color-ghost-standard-font, #242938);background-color:var(--button-color-ghost-standard-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--standard.svelte-ozghz9:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.mc-button--standard.svelte-ozghz9:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.mc-button--standard.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--accent.svelte-ozghz9 {color:var(--button-color-ghost-accent-font, #117f03);background-color:var(--button-color-ghost-accent-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--accent.svelte-ozghz9:hover {background-color:var(--button-color-ghost-accent-hover-background, rgba(17, 127, 3, 0.1));}.mc-button--ghost.mc-button--accent.svelte-ozghz9:active {background-color:var(--button-color-ghost-accent-active-background, rgba(17, 127, 3, 0.2));}.mc-button--ghost.mc-button--accent.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--danger.svelte-ozghz9 {color:var(--button-color-ghost-danger-font, #c61112);background-color:var(--button-color-ghost-danger-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--danger.svelte-ozghz9:hover {background-color:var(--button-color-ghost-danger-hover-background, rgba(198, 17, 18, 0.1));}.mc-button--ghost.mc-button--danger.svelte-ozghz9:active {background-color:var(--button-color-ghost-danger-active-background, rgba(198, 17, 18, 0.2));}.mc-button--ghost.mc-button--danger.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--inverse.svelte-ozghz9 {color:var(--button-color-ghost-inverse-font, #ffffff);background-color:var(--button-color-ghost-inverse-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--inverse.svelte-ozghz9:hover {background-color:var(--button-color-ghost-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--ghost.mc-button--inverse.svelte-ozghz9:active {background-color:var(--button-color-ghost-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--ghost.mc-button--inverse.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.hidden.svelte-ozghz9 {visibility:hidden;}`};function Z(w,e){H(e,!0),I(w,Y);let m=n(e,"appearance",7,"standard"),z=n(e,"size",7,"m"),f=n(e,"type",7,"button"),k=n(e,"ghost",7),_=n(e,"outlined",7),p=n(e,"disabled",7),l=n(e,"isloading",7),c=n(e,"iconposition",7),
|
|
3
|
+
*/.mc-button.svelte-ozghz9 {color:var(--button-color-filled-standard-font, #ffffff);background-color:var(--button-color-filled-standard-background, #464e63);}.mc-button.svelte-ozghz9:hover {background-color:var(--button-color-filled-standard-hover-background, #343b4c);}.mc-button.svelte-ozghz9:active {background-color:var(--button-color-filled-standard-active-background, #242938);}.mc-button.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button.svelte-ozghz9 {font-weight:var(--font-weight-semi-bold, 600);padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-150, 1rem);}.mc-button.svelte-ozghz9 {display:inline-flex;justify-content:center;vertical-align:middle;text-align:center;border:2px solid transparent;border-radius:var(--button-border-radius-s, 0.25rem);transition:all ease 200ms;transition:box-shadow 200ms ease;align-items:center;box-sizing:border-box;font-family:inherit;fill:currentcolor;gap:0.25rem;cursor:pointer;}.mc-button__label.svelte-ozghz9 {font-size:var(--font-size-150, 1rem);}.mc-button__icon.svelte-ozghz9 {flex-shrink:0;width:1.5rem;height:1.5rem;}.mc-button.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button.svelte-ozghz9:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-button--s.svelte-ozghz9 {padding:0 calc(0.75rem - 0.125rem);min-height:2rem;min-width:2rem;}.mc-button--s.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-100, 0.875rem);}.mc-button--s.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {width:1.25rem;height:1.25rem;}.mc-button--s.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9):only-child {width:1.25rem;height:1.25rem;}.mc-button--m.svelte-ozghz9 {padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button--m.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-150, 1rem);}.mc-button--m.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {width:1.5rem;height:1.5rem;}.mc-button--m.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9):only-child {width:1.5rem;height:1.5rem;}.mc-button--l.svelte-ozghz9 {padding:0 calc(1.25rem - 0.125rem);min-height:4rem;min-width:4rem;}.mc-button--l.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9) {font-size:var(--font-size-200, 1.125rem);}.mc-button--l.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {width:2rem;height:2rem;}.mc-button--l.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9):only-child {width:2rem;height:2rem;}.mc-button--icon-only.svelte-ozghz9 {padding:0.25rem;}.mc-button--outlined.svelte-ozghz9 {color:var(--button-color-outlined-standard-font, #242938);border-color:var(--button-color-outlined-standard-border, #8891aa);background-color:var(--button-color-outlined-standard-background, #ffffff);}.mc-button--outlined.svelte-ozghz9:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.svelte-ozghz9:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.svelte-ozghz9 {color:var(--button-color-ghost-standard-font, #242938);background-color:var(--button-color-ghost-standard-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.svelte-ozghz9:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.svelte-ozghz9:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--accent.svelte-ozghz9 {color:var(--button-color-filled-accent-font, #ffffff);background-color:var(--button-color-filled-accent-background, #117f03);}.mc-button--accent.svelte-ozghz9:hover {background-color:var(--button-color-filled-accent-hover-background, #006902);}.mc-button--accent.svelte-ozghz9:active {background-color:var(--button-color-filled-accent-active-background, #035010);}.mc-button--accent.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--danger.svelte-ozghz9 {color:var(--button-color-filled-danger-font, #ffffff);background-color:var(--button-color-filled-danger-background, #c61112);}.mc-button--danger.svelte-ozghz9:hover {background-color:var(--button-color-filled-danger-hover-background, #8c0003);}.mc-button--danger.svelte-ozghz9:active {background-color:var(--button-color-filled-danger-active-background, #530000);}.mc-button--danger.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--inverse.svelte-ozghz9 {--focus-color-mid: var(--focus-color-outline-outer, #000000);--focus-color-outer: var(--focus-color-outline-mid, #ffffff);color:var(--button-color-filled-inverse-font, #242938);background-color:var(--button-color-filled-inverse-background, #ffffff);}.mc-button--inverse.svelte-ozghz9:hover {background-color:var(--button-color-filled-inverse-hover-background, #e6e6e6);}.mc-button--inverse.svelte-ozghz9:active {background-color:var(--button-color-filled-inverse-active-background, #cccccc);}.mc-button--inverse.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--icon-button.svelte-ozghz9 {border-radius:var(--border-radius-full, 100%);padding:0;}.mc-button--loading.svelte-ozghz9 .mc-button__label:where(.svelte-ozghz9),
|
|
4
|
+
.mc-button--loading.svelte-ozghz9 .mc-button__icon:where(.svelte-ozghz9) {visibility:hidden;}.mc-button--outlined.mc-button--standard.svelte-ozghz9 {color:var(--button-color-outlined-standard-font, #242938);border-color:var(--button-color-outlined-standard-border, #8891aa);background-color:var(--button-color-outlined-standard-background, #ffffff);}.mc-button--outlined.mc-button--standard.svelte-ozghz9:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.mc-button--standard.svelte-ozghz9:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.mc-button--standard.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--outlined.mc-button--accent.svelte-ozghz9 {color:var(--button-color-outlined-accent-font, #117f03);border-color:var(--button-color-outlined-accent-border, #78be20);background-color:var(--button-color-outlined-accent-background, #ffffff);}.mc-button--outlined.mc-button--accent.svelte-ozghz9:hover {background-color:var(--button-color-outlined-accent-hover-background, #ebf5de);}.mc-button--outlined.mc-button--accent.svelte-ozghz9:active {background-color:var(--button-color-outlined-accent-active-background, #c5e39e);}.mc-button--outlined.mc-button--accent.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--outlined.mc-button--danger.svelte-ozghz9 {color:var(--button-color-outlined-danger-font, #c61112);border-color:var(--button-color-outlined-danger-border, #ef5f5c);background-color:var(--button-color-outlined-danger-background, #ffffff);}.mc-button--outlined.mc-button--danger.svelte-ozghz9:hover {background-color:var(--button-color-outlined-danger-hover-background, #fdeaea);}.mc-button--outlined.mc-button--danger.svelte-ozghz9:active {background-color:var(--button-color-outlined-danger-active-background, #f8bcbb);}.mc-button--outlined.mc-button--danger.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--outlined.mc-button--inverse.svelte-ozghz9 {color:var(--button-color-outlined-inverse-font, #ffffff);border-color:var(--button-color-outlined-inverse-border, #ffffff);background-color:var(--button-color-outlined-inverse-background, rgba(255, 255, 255, 0.01));}.mc-button--outlined.mc-button--inverse.svelte-ozghz9:hover {background-color:var(--button-color-outlined-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--outlined.mc-button--inverse.svelte-ozghz9:active {background-color:var(--button-color-outlined-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--outlined.mc-button--inverse.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--standard.svelte-ozghz9 {color:var(--button-color-ghost-standard-font, #242938);background-color:var(--button-color-ghost-standard-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--standard.svelte-ozghz9:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.mc-button--standard.svelte-ozghz9:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.mc-button--standard.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--accent.svelte-ozghz9 {color:var(--button-color-ghost-accent-font, #117f03);background-color:var(--button-color-ghost-accent-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--accent.svelte-ozghz9:hover {background-color:var(--button-color-ghost-accent-hover-background, rgba(17, 127, 3, 0.1));}.mc-button--ghost.mc-button--accent.svelte-ozghz9:active {background-color:var(--button-color-ghost-accent-active-background, rgba(17, 127, 3, 0.2));}.mc-button--ghost.mc-button--accent.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--danger.svelte-ozghz9 {color:var(--button-color-ghost-danger-font, #c61112);background-color:var(--button-color-ghost-danger-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--danger.svelte-ozghz9:hover {background-color:var(--button-color-ghost-danger-hover-background, rgba(198, 17, 18, 0.1));}.mc-button--ghost.mc-button--danger.svelte-ozghz9:active {background-color:var(--button-color-ghost-danger-active-background, rgba(198, 17, 18, 0.2));}.mc-button--ghost.mc-button--danger.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-button--ghost.mc-button--inverse.svelte-ozghz9 {color:var(--button-color-ghost-inverse-font, #ffffff);background-color:var(--button-color-ghost-inverse-background, rgba(255, 255, 255, 0.01));}.mc-button--ghost.mc-button--inverse.svelte-ozghz9:hover {background-color:var(--button-color-ghost-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--ghost.mc-button--inverse.svelte-ozghz9:active {background-color:var(--button-color-ghost-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--ghost.mc-button--inverse.svelte-ozghz9:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.hidden.svelte-ozghz9 {visibility:hidden;}`};function Z(w,e){H(e,!0),I(w,Y);let m=n(e,"appearance",7,"standard"),z=n(e,"size",7,"m"),f=n(e,"type",7,"button"),k=n(e,"ghost",7),_=n(e,"outlined",7),p=n(e,"disabled",7),l=n(e,"isloading",7),c=n(e,"iconposition",7),D=J(e,["$$slots","$$events","$$legacy","$$host","appearance","size","type","ghost","outlined","disabled","isloading","iconposition"]);var L={get appearance(){return m()},set appearance(o="standard"){m(o),a()},get size(){return z()},set size(o="m"){z(o),a()},get type(){return f()},set type(o="button"){f(o),a()},get ghost(){return k()},set ghost(o){k(o),a()},get outlined(){return _()},set outlined(o){_(o),a()},get disabled(){return p()},set disabled(o){p(o),a()},get isloading(){return l()},set isloading(o){l(o),a()},get iconposition(){return c()},set iconposition(o){c(o),a()}},g=X();P(g,()=>({class:["mc-button",`mc-button--${z()}`,`mc-button--${m()}`,k()&&"mc-button--ghost",_()&&"mc-button--outlined",l()&&"mc-button--loading",c()==="only"&&"mc-button--icon-only"],disabled:p(),type:f(),...D}),void 0,void 0,void 0,"svelte-ozghz9");var y=d(g);{var C=o=>{var t=R(),r=d(t);h(r,e,"icon",{}),u(t),b(o,t)};i(y,o=>{c()==="left"&&!l()&&o(C)})}var x=v(y,2);{var E=o=>{var t=T(),r=d(t);Q(r,{appearance:"inverse",size:"s"}),u(t),b(o,t)};i(x,o=>{l()&&o(E)})}var j=v(x,2);{var S=o=>{var t=U(),r=d(t);h(r,e,"icon",{}),u(t),b(o,t)};i(j,o=>{c()==="only"&&o(S)})}var B=v(j,2);{var q=o=>{var t=V(),r=d(t);h(r,e,"default",{}),u(t),M(()=>N(t,1,O(["mc-button__label",l()&&"hidden"]),"svelte-ozghz9")),b(o,t)};i(B,o=>{c()!=="only"&&o(q)})}var A=v(B,2);{var F=o=>{var t=W(),r=d(t);h(r,e,"icon",{}),u(t),b(o,t)};i(A,o=>{c()==="right"&&o(F)})}return u(g),b(w,g),K(L)}customElements.define("m-button",G(Z,{appearance:{},size:{},type:{},ghost:{},outlined:{},disabled:{},isloading:{},iconposition:{}},["icon","default"],[],!0));export{Z as B};
|
|
5
5
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/button/Button.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-button' }} />\n\n<script lang=\"ts\">\n import Loader from '../loader/Loader.svelte';\n /**\n * Buttons are key interactive elements used to perform actions and can be used as standalone element, or as part of another component. Their appearance depends on the type of action required from the user and the context in which they are used.\n *\n * @slot default - The content displayed in the button.\n * @slot icon - Use this slot to insert an icon for the Button.\n */\n interface Props {\n [key: string]: any;\n /**\n * Defines the visual style of the button.\n */\n appearance?: 'standard' | 'accent' | 'danger' | 'inverse';\n /**\n * Determines the size of the button.\n */\n size?: 's' | 'm' | 'l';\n /**\n * If `true`, disables the button, making it non-interactive.\n */\n disabled?: boolean;\n /**\n * If `true`, applies a \"ghost\" style to the button, typically a transparent background with a border.\n */\n ghost?: boolean;\n /**\n * If `true`, the button gets an outlined style, usually with just the border and no solid background.\n */\n outlined?: boolean;\n /**\n * Controls the positioning of an icon in the button.\n */\n iconposition?: 'left' | 'right' | 'only';\n /**\n * Specifies the button's HTML `type` attribute.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * If `true`, a loading state is displayed.\n */\n isloading?: boolean;\n }\n\n let {\n appearance = 'standard',\n size = 'm',\n type = 'button',\n ghost,\n outlined,\n disabled,\n isloading,\n iconposition,\n ...attrs\n }: Props = $props();\n</script>\n\n<button\n class={[\n 'mc-button',\n `mc-button--${size}`,\n `mc-button--${appearance}`,\n ghost && 'mc-button--ghost',\n outlined && 'mc-button--outlined',\n isloading && 'mc-button--loading',\n iconposition === 'only' && 'mc-button--icon-only',\n ]}\n {disabled}\n {type}\n {...attrs}\n>\n {#if iconposition === 'left' && !isloading}\n <span class=\"mc-button__icon\">\n <slot name=\"icon\" />\n </span>\n {/if}\n\n {#if isloading}\n <span\n class=\"mc-button__icon\"\n style=\"color: currentColor;position: absolute; visibility: visible;\"\n >\n <Loader appearance
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/button/Button.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-button' }} />\n\n<script lang=\"ts\">\n import Loader from '../loader/Loader.svelte';\n /**\n * Buttons are key interactive elements used to perform actions and can be used as standalone element, or as part of another component. Their appearance depends on the type of action required from the user and the context in which they are used.\n *\n * @slot default - The content displayed in the button.\n * @slot icon - Use this slot to insert an icon for the Button.\n */\n interface Props {\n [key: string]: any;\n /**\n * Defines the visual style of the button.\n */\n appearance?: 'standard' | 'accent' | 'danger' | 'inverse';\n /**\n * Determines the size of the button.\n */\n size?: 's' | 'm' | 'l';\n /**\n * If `true`, disables the button, making it non-interactive.\n */\n disabled?: boolean;\n /**\n * If `true`, applies a \"ghost\" style to the button, typically a transparent background with a border.\n */\n ghost?: boolean;\n /**\n * If `true`, the button gets an outlined style, usually with just the border and no solid background.\n */\n outlined?: boolean;\n /**\n * Controls the positioning of an icon in the button.\n */\n iconposition?: 'left' | 'right' | 'only';\n /**\n * Specifies the button's HTML `type` attribute.\n */\n type?: 'button' | 'reset' | 'submit';\n /**\n * If `true`, a loading state is displayed.\n */\n isloading?: boolean;\n }\n\n let {\n appearance = 'standard',\n size = 'm',\n type = 'button',\n ghost,\n outlined,\n disabled,\n isloading,\n iconposition,\n ...attrs\n }: Props = $props();\n</script>\n\n<button\n class={[\n 'mc-button',\n `mc-button--${size}`,\n `mc-button--${appearance}`,\n ghost && 'mc-button--ghost',\n outlined && 'mc-button--outlined',\n isloading && 'mc-button--loading',\n iconposition === 'only' && 'mc-button--icon-only',\n ]}\n {disabled}\n {type}\n {...attrs}\n>\n {#if iconposition === 'left' && !isloading}\n <span class=\"mc-button__icon\">\n <slot name=\"icon\" />\n </span>\n {/if}\n\n {#if isloading}\n <span\n class=\"mc-button__icon\"\n style=\"color: currentColor;position: absolute; visibility: visible;\"\n >\n <Loader appearance=\"inverse\" size=\"s\" />\n </span>\n {/if}\n\n {#if iconposition === 'only'}\n <span class=\"mc-button__icon\">\n <slot name=\"icon\" />\n </span>\n {/if}\n\n {#if iconposition !== 'only'}\n <span class={['mc-button__label', isloading && 'hidden']}>\n <slot />\n </span>\n {/if}\n\n {#if iconposition === 'right'}\n <span class=\"mc-button__icon\">\n <slot name=\"icon\" />\n </span>\n {/if}\n</button>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/button';\n\n .hidden {\n visibility: hidden;\n }\n</style>\n"],"names":["appearance","size","type","ghost","$.prop","$$props","outlined","disabled","isloading","iconposition","attrs","$.rest_props","$$render","consequent","consequent_1","consequent_2","consequent_3","consequent_4"],"mappings":";;;o/LAAA,gBA+CI,IAAAA,qBAAa,UAAU,EACvBC,eAAO,GAAG,EACVC,eAAO,QAAQ,EACfC,EAAKC,EAAAC,EAAA,QAAA,CAAA,EACLC,EAAQF,EAAAC,EAAA,WAAA,CAAA,EACRE,EAAQH,EAAAC,EAAA,WAAA,CAAA,EACRG,EAASJ,EAAAC,EAAA,YAAA,CAAA,EACTI,EAAYL,EAAAC,EAAA,eAAA,CAAA,EACTK,EAAAC,EAAAN,EAAA,qLARU,WAAU,6CAChB,IAAG,6CACH,SAAQ,gTAYf,0BACcJ,EAAI,CAAA,iBACJD,EAAU,CAAA,GACxBG,EAAK,GAAI,mBACTG,EAAQ,GAAI,sBACZE,EAAS,GAAI,qBACbC,EAAY,IAAK,QAAU,iDAIzBC,uHAECD,EAAY,IAAK,QAAM,CAAKD,EAAS,GAAAI,EAAAC,CAAA,uGAMrCL,EAAS,GAAAI,EAAAE,CAAA,mFASTL,EAAY,IAAK,QAAMG,EAAAG,CAAA,qFAOZ,mBAAoBP,EAAS,GAAI,QAAQ,CAAA,EAAA,eAAA,CAAA,kBADpDC,EAAY,IAAK,QAAMG,EAAAI,CAAA,mFAMvBP,EAAY,IAAK,SAAOG,EAAAK,CAAA,2BA3C/B"}
|
|
@@ -82,7 +82,7 @@
|
|
|
82
82
|
class="mc-button__icon"
|
|
83
83
|
style="color: currentColor;position: absolute; visibility: visible;"
|
|
84
84
|
>
|
|
85
|
-
<Loader appearance=
|
|
85
|
+
<Loader appearance="inverse" size="s" />
|
|
86
86
|
</span>
|
|
87
87
|
{/if}
|
|
88
88
|
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
vertical-align: middle;
|
|
140
140
|
text-align: center;
|
|
141
141
|
border: 2px solid transparent;
|
|
142
|
-
border-radius: var(--button-radius, 0.25rem);
|
|
142
|
+
border-radius: var(--button-border-radius-s, 0.25rem);
|
|
143
143
|
transition: all ease 200ms;
|
|
144
144
|
transition: box-shadow 200ms ease;
|
|
145
145
|
align-items: center;
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
cursor: not-allowed;
|
|
304
304
|
}
|
|
305
305
|
.mc-button--icon-button {
|
|
306
|
-
border-radius: var(--radius-full, 100%);
|
|
306
|
+
border-radius: var(--border-radius-full, 100%);
|
|
307
307
|
padding: 0;
|
|
308
308
|
}
|
|
309
309
|
.mc-button--loading .mc-button__loader {
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import{c as j,p as C,a as D,b as
|
|
1
|
+
import{c as j,p as C,a as D,b as d,f as E,d as t,s as r,t as S,i as q,j as A,k as m,r as l,e as B,g as F,h}from"../../custom-element.js";import{s as u}from"../../slot.js";var G=E('<section role="status"><div class="mc-callout__icon svelte-1pnlv3f"><!></div> <div class="mc-callout__content svelte-1pnlv3f"><h2 class="mc-callout__title svelte-1pnlv3f"> </h2> <p class="mc-callout__message svelte-1pnlv3f"> </p> <!> <div class="mc-callout__footer svelte-1pnlv3f"><!></div></div></section>');const H={hash:"svelte-1pnlv3f",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
|
|
4
|
-
/* create columns */
|
|
5
|
-
/* create columns */
|
|
6
|
-
/* create custom named columns with custom content */.mc-callout.svelte-1pnlv3f {border-radius:var(--radius-m, 0.5rem);display:flex;flex-flow:row wrap;align-items:flex-start;background:var(--callout-color-background-standard, #eff1f6);position:relative;box-sizing:border-box;color:var(--callout-color-text, #000000);}.mc-callout__icon.svelte-1pnlv3f {width:2rem;height:2rem;margin:0.75rem;color:currentcolor;}.mc-callout__content.svelte-1pnlv3f {flex:1 1 0;padding:0.75rem 1rem 0.75rem 0;}.mc-callout__title.svelte-1pnlv3f, .mc-callout__message.svelte-1pnlv3f {line-height:var(--line-height-s, 1.3);margin-block:0;}.mc-callout__title.svelte-1pnlv3f {font-weight:var(--font-weight-semi-bold, 600);font-size:var(--font-size-150, 1rem);margin-block-end:0.25rem;}.mc-callout__message.svelte-1pnlv3f {font-size:var(--font-size-100, 0.875rem);}.mc-callout__footer.svelte-1pnlv3f {align-items:flex-start;display:flex;flex-flow:row wrap;gap:0.5rem;margin-top:0.75rem;margin-bottom:0.5rem;}.mc-callout--standard.svelte-1pnlv3f {background:var(--callout-color-background-standard, #eff1f6);}.mc-callout--accent.svelte-1pnlv3f {background:var(--callout-color-background-accent, #ebf5de);}.mc-callout--tips.svelte-1pnlv3f {background:var(--callout-color-background-tips, #ffebaf);}.mc-callout--inverse.svelte-1pnlv3f {background:var(--callout-color-background-inverse, #ffffff);}.mc-callout__footer.svelte-1pnlv3f:empty {display:none;}`};function I(p,e){C(e,!0),D(p,H);let c=m(e,"title",7),s=m(e,"description",7),n=m(e,"appearance",7,"standard");var x={get title(){return c()},set title(a){c(a),u()},get description(){return s()},set description(a){s(a),u()},get appearance(){return n()},set appearance(a="standard"){n(a),u()}},o=G(),i=t(o),k=t(i);d(k,e,"icon",{}),l(i);var _=r(i,2),v=t(_),w=t(v,!0);l(v);var f=r(v,2),y=t(f,!0);l(f);var g=r(f,2);d(g,e,"default",{});var b=r(g,2),z=t(b);return d(z,e,"footer",{}),l(b),l(_),l(o),S(()=>{B(o,1,F(["mc-callout",`mc-callout--${n()}`]),"svelte-1pnlv3f"),h(w,c()),h(y,s())}),q(p,o),A(x)}customElements.define("m-callout",j(I,{title:{},description:{},appearance:{}},["icon","default","footer"],[],!0));
|
|
3
|
+
*/.mc-callout.svelte-1pnlv3f {border-radius:var(--border-radius-m, 0.5rem);background:var(--callout-color-background-standard, #eff1f6);display:flex;flex-flow:row wrap;align-items:flex-start;position:relative;box-sizing:border-box;color:var(--callout-color-text, #000000);}.mc-callout__icon.svelte-1pnlv3f {width:2rem;height:2rem;margin:0.75rem;color:currentcolor;}.mc-callout__content.svelte-1pnlv3f {flex:1 1 0;padding:0.75rem 1rem 0.75rem 0;}.mc-callout__title.svelte-1pnlv3f, .mc-callout__message.svelte-1pnlv3f {line-height:var(--line-height-s, 1.3);margin-block:0;}.mc-callout__title.svelte-1pnlv3f {font-weight:var(--font-weight-semi-bold, 600);font-size:var(--font-size-150, 1rem);margin-block-end:0.25rem;}.mc-callout__message.svelte-1pnlv3f {font-size:var(--font-size-100, 0.875rem);}.mc-callout__footer.svelte-1pnlv3f {align-items:flex-start;display:flex;flex-flow:row wrap;gap:0.5rem;margin-top:0.75rem;margin-bottom:0.5rem;}.mc-callout--standard.svelte-1pnlv3f {background:var(--callout-color-background-standard, #eff1f6);}.mc-callout--accent.svelte-1pnlv3f {background:var(--callout-color-background-accent, #ebf5de);}.mc-callout--tips.svelte-1pnlv3f {background:var(--callout-color-background-tips, #ffebaf);}.mc-callout--inverse.svelte-1pnlv3f {background:var(--callout-color-background-inverse, #ffffff);}.mc-callout__footer.svelte-1pnlv3f:empty {display:none;}`};function I(p,e){C(e,!0),D(p,H);let c=d(e,"title",7),s=d(e,"description",7),n=d(e,"appearance",7,"standard");var x={get title(){return c()},set title(a){c(a),m()},get description(){return s()},set description(a){s(a),m()},get appearance(){return n()},set appearance(a="standard"){n(a),m()}},o=G(),i=t(o),k=t(i);u(k,e,"icon",{}),l(i);var _=r(i,2),v=t(_),w=t(v,!0);l(v);var f=r(v,2),y=t(f,!0);l(f);var g=r(f,2);u(g,e,"default",{});var b=r(g,2),z=t(b);return u(z,e,"footer",{}),l(b),l(_),l(o),S(()=>{B(o,1,F(["mc-callout",`mc-callout--${n()}`]),"svelte-1pnlv3f"),h(w,c()),h(y,s())}),q(p,o),A(x)}customElements.define("m-callout",j(I,{title:{},description:{},appearance:{}},["icon","default","footer"],[],!0));
|
|
7
4
|
//# sourceMappingURL=Callout.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.js","sources":["../../../src/components/callout/Callout.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-callout' }} />\n\n<script lang=\"ts\">\n /**\n * A callout is used to highlight additional information that can assist users with tips, extra details, or helpful guidance, without signaling a critical status or alert. Unlike notifications, callouts are not triggered by user actions and do not correspond to specific system states. They are designed to enhance the user experience by providing contextually relevant information that supports comprehension and usability.\n *\n * @slot icon - Use this slot to insert an icon.\n * @slot default - Use this slot to insert custom content.\n * @slot footer - Use this slot to insert a button or a link in the footer of the callout.\n */\n interface Props {\n /**\n * Title of the callout.\n */\n title: string;\n /**\n * Description of the callout.\n */\n description: string;\n /**\n * Allows to define the callout appearance.\n */\n appearance?: 'standard' | 'accent' | 'tips' | 'inverse';\n }\n\n let {
|
|
1
|
+
{"version":3,"file":"Callout.js","sources":["../../../src/components/callout/Callout.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-callout' }} />\n\n<script lang=\"ts\">\n /**\n * A callout is used to highlight additional information that can assist users with tips, extra details, or helpful guidance, without signaling a critical status or alert. Unlike notifications, callouts are not triggered by user actions and do not correspond to specific system states. They are designed to enhance the user experience by providing contextually relevant information that supports comprehension and usability.\n *\n * @slot icon - Use this slot to insert an icon.\n * @slot default - Use this slot to insert custom content.\n * @slot footer - Use this slot to insert a button or a link in the footer of the callout.\n */\n interface Props {\n /**\n * Title of the callout.\n */\n title: string;\n /**\n * Description of the callout.\n */\n description: string;\n /**\n * Allows to define the callout appearance.\n */\n appearance?: 'standard' | 'accent' | 'tips' | 'inverse';\n }\n\n let { title, description, appearance = 'standard' }: Props = $props();\n</script>\n\n<section class={['mc-callout', `mc-callout--${appearance}`]} role=\"status\">\n <div class=\"mc-callout__icon\">\n <slot name=\"icon\" />\n </div>\n <div class=\"mc-callout__content\">\n <h2 class=\"mc-callout__title\">{title}</h2>\n\n <p class=\"mc-callout__message\">\n {description}\n </p>\n\n <slot />\n\n <div class=\"mc-callout__footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n</section>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/callout';\n\n .mc-callout__footer:empty {\n display: none;\n }\n</style>\n"],"names":["title","$.prop","$$props","description","appearance","$.set_class","section","$.clsx"],"mappings":";;s3CAAA,oBAyBQA,EAAKC,EAAAC,EAAA,QAAA,CAAA,EAAEC,EAAWF,EAAAC,EAAA,cAAA,CAAA,EAAEE,qBAAa,UAAU,iKAAV,WAAU,0NAGlCC,EAAAC,EAAA,EAAAC,EAAA,CAAA,4BAA6BH,EAAU,CAAA,EAAA,CAAA,EAAA,gBAAA,MAKrBJ,GAAK,MAGjCG,GAAW,eAVlB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.stories.d.ts","sourceRoot":"","sources":["../../../src/components/callout/Callout.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,kEAAkE,CAAC;AAC1E,OAAO,oEAAoE,CAAC;AAE5E,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"Callout.stories.d.ts","sourceRoot":"","sources":["../../../src/components/callout/Callout.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,OAAO,kEAAkE,CAAC;AAC1E,OAAO,oEAAoE,CAAC;AAE5E,QAAA,MAAM,IAAI,EAAE,IAyBX,CAAC;AAEF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC;AAElC,eAAO,MAAM,MAAM,EAAE,KAEpB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAKrB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAIxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAOzB,CAAC;AAEF,eAAO,MAAM,QAAQ;;;;CAUpB,CAAC"}
|
|
@@ -23,28 +23,24 @@
|
|
|
23
23
|
appearance?: 'standard' | 'accent' | 'tips' | 'inverse';
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
let {
|
|
27
|
-
title,
|
|
28
|
-
description,
|
|
29
|
-
appearance = 'standard',
|
|
30
|
-
}: Props = $props();
|
|
26
|
+
let { title, description, appearance = 'standard' }: Props = $props();
|
|
31
27
|
</script>
|
|
32
28
|
|
|
33
|
-
<section class={[
|
|
29
|
+
<section class={['mc-callout', `mc-callout--${appearance}`]} role="status">
|
|
34
30
|
<div class="mc-callout__icon">
|
|
35
|
-
<slot name="icon"/>
|
|
31
|
+
<slot name="icon" />
|
|
36
32
|
</div>
|
|
37
33
|
<div class="mc-callout__content">
|
|
38
|
-
<h2 class="mc-callout__title">{
|
|
34
|
+
<h2 class="mc-callout__title">{title}</h2>
|
|
39
35
|
|
|
40
36
|
<p class="mc-callout__message">
|
|
41
|
-
{
|
|
37
|
+
{description}
|
|
42
38
|
</p>
|
|
43
39
|
|
|
44
|
-
<slot/>
|
|
40
|
+
<slot />
|
|
45
41
|
|
|
46
42
|
<div class="mc-callout__footer">
|
|
47
|
-
<slot name="footer"/>
|
|
43
|
+
<slot name="footer" />
|
|
48
44
|
</div>
|
|
49
45
|
</div>
|
|
50
46
|
</section>
|
|
@@ -52,15 +48,12 @@
|
|
|
52
48
|
<style>/**
|
|
53
49
|
* Do not edit directly, this file was auto-generated.
|
|
54
50
|
*/
|
|
55
|
-
/* create columns */
|
|
56
|
-
/* create columns */
|
|
57
|
-
/* create custom named columns with custom content */
|
|
58
51
|
.mc-callout {
|
|
59
|
-
border-radius: var(--radius-m, 0.5rem);
|
|
52
|
+
border-radius: var(--border-radius-m, 0.5rem);
|
|
53
|
+
background: var(--callout-color-background-standard, #eff1f6);
|
|
60
54
|
display: flex;
|
|
61
55
|
flex-flow: row wrap;
|
|
62
56
|
align-items: flex-start;
|
|
63
|
-
background: var(--callout-color-background-standard, #eff1f6);
|
|
64
57
|
position: relative;
|
|
65
58
|
box-sizing: border-box;
|
|
66
59
|
color: var(--callout-color-text, #000000);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Callout.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/callout/Callout.svelte.ts"],"names":[],"mappings":"AAGE;;;;;;GAMG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CACzD;
|
|
1
|
+
{"version":3,"file":"Callout.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/callout/Callout.svelte.ts"],"names":[],"mappings":"AAGE;;;;;;GAMG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,UAAU,CAAC,EAAE,UAAU,GAAG,QAAQ,GAAG,MAAM,GAAG,SAAS,CAAC;CACzD;AAgCH,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AACD,KAAK,gCAAgC,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,GACvD,CAAC,KAAK,SAAS;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GACzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,GAAG,GACH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,GAClB,EAAE,CAAC,CAAC;AAId,QAAA,MAAM,OAAO;;;;;;;;;;UAAqF,CAAC;AACjF,KAAK,OAAO,GAAG,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;AAC9C,eAAe,OAAO,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import{c as M,p as H,a as j,b as n,f as z,s as D,d as u,t as g,i as _,j as F,k as i,r as x,h as S,e as p,g as w}from"../../custom-element.js";import{i as q}from"../../if.js";import{r as A,s}from"../../attributes.js";import{a as G}from"../../input.js";import{c as I}from"../../custom-element-forward-events.js";var J=z('<label class="mc-checkbox__label svelte-zknfk3"> </label>'),K=z('<div><input type="checkbox"/> <!></div>');const L={hash:"svelte-zknfk3",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/
|
|
4
|
-
/* stylelint-disable string-no-newline */.mc-checkbox.svelte-zknfk3 {align-items:center;display:flex;gap:0.5rem;padding:0.375rem;}.mc-checkbox--indented.svelte-zknfk3 {margin-left:1.75rem;}.mc-checkbox__label.svelte-zknfk3 {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-text-default, #000000);cursor:pointer;}.mc-checkbox__input.svelte-zknfk3 {appearance:none;margin:0;cursor:pointer;flex-shrink:0;transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-m, 0.125rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-radius
|
|
4
|
+
/* stylelint-disable string-no-newline */.mc-checkbox.svelte-zknfk3 {align-items:center;display:flex;gap:0.5rem;padding:0.375rem;}.mc-checkbox--indented.svelte-zknfk3 {margin-left:1.75rem;}.mc-checkbox__label.svelte-zknfk3 {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-text-default, #000000);cursor:pointer;}.mc-checkbox__input.svelte-zknfk3 {appearance:none;margin:0;cursor:pointer;flex-shrink:0;transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-m, 0.125rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, 0.25rem);transition:all ease 200ms;height:1.25rem;width:1.25rem;}.mc-checkbox__input.svelte-zknfk3:hover {border-color:var(--forms-color-border-hover, #4d4d4d);}.mc-checkbox__input.svelte-zknfk3:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-checkbox__input.svelte-zknfk3:checked {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-inverse, %23ffffff)' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-zknfk3:indeterminate {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-inverse, %23ffffff)' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-zknfk3:checked, .mc-checkbox__input.svelte-zknfk3:indeterminate {background-color:var(--forms-color-background-checked, #117f03);background-size:1rem 1rem;background-position:center;}.mc-checkbox__input.svelte-zknfk3:checked, .mc-checkbox__input.svelte-zknfk3:indeterminate, .mc-checkbox__input.svelte-zknfk3:disabled {border-color:transparent;}.mc-checkbox__input.svelte-zknfk3:disabled {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;}.mc-checkbox__input.svelte-zknfk3:disabled:checked {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-disabled, %23737373)' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-zknfk3:disabled:indeterminate {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-disabled, %23737373)' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-zknfk3:disabled + .mc-checkbox__label:where(.svelte-zknfk3) {color:var(--forms-color-text-disabled, #737373);cursor:not-allowed;}.mc-checkbox__input.svelte-zknfk3:not(:disabled):checked:hover, .mc-checkbox__input.svelte-zknfk3:not(:disabled):indeterminate:hover {background-color:var(--forms-color-background-checked-hover, #006902);}.mc-checkbox__input.is-invalid.svelte-zknfk3:not(:checked, :indeterminate) {border-color:var(--forms-color-border-invalid, #ea302d);}.mc-checkbox__input.is-invalid.svelte-zknfk3:not(:checked, :indeterminate):hover {border-color:var(--forms-color-border-invalid-hover, #c61112);}
|
|
5
5
|
|
|
6
6
|
/* stylelint-enable string-no-newline */
|
|
7
7
|
/* stylelint-disable string-no-newline */
|
|
8
8
|
|
|
9
|
-
/* stylelint-enable string-no-newline */`};function N(
|
|
9
|
+
/* stylelint-enable string-no-newline */`};function N(b,r){H(r,!0),j(b,L);let a=n(r,"id",7),m=n(r,"name",7),o=n(r,"label",7),k=n(r,"checked",15,!1),f=n(r,"indeterminate",7),v=n(r,"disabled",7),c=n(r,"isinvalid",7),h=n(r,"indented",7);var E={get id(){return a()},set id(e){a(e),i()},get name(){return m()},set name(e){m(e),i()},get label(){return o()},set label(e){o(e),i()},get checked(){return k()},set checked(e=!1){k(e),i()},get indeterminate(){return f()},set indeterminate(e){f(e),i()},get disabled(){return v()},set disabled(e){v(e),i()},get isinvalid(){return c()},set isinvalid(e){c(e),i()},get indented(){return h()},set indented(e){h(e),i()}},l=K(),t=u(l);A(t);var C=D(t,2);{var y=e=>{var d=J(),B=u(d,!0);x(d),g(()=>{s(d,"for",a()),S(B,o())}),_(e,d)};q(C,e=>{o()&&e(y)})}return x(l),g(()=>{p(l,1,w(["mc-checkbox",h()&&"mc-checkbox--indented"]),"svelte-zknfk3"),s(t,"id",a()),p(t,1,w(["mc-checkbox__input",c()&&"is-invalid"]),"svelte-zknfk3"),s(t,"aria-invalid",c()),s(t,"name",m()),t.disabled=v(),t.indeterminate=f()}),G(t,k),_(b,l),F(E)}customElements.define("m-checkbox",M(N,{checked:{attribute:"checked",reflect:!0,type:"Boolean"},id:{},name:{},label:{},indeterminate:{},disabled:{},isinvalid:{},indented:{}},[],[],!0,I));
|
|
10
10
|
//# sourceMappingURL=Checkbox.js.map
|
|
@@ -34,7 +34,7 @@ describe('m-checkbox component', () => {
|
|
|
34
34
|
expect(checkbox.checked).toBe(true);
|
|
35
35
|
});
|
|
36
36
|
it('applies "is-invalid" class and aria-invalid when isinvalid=true', () => {
|
|
37
|
-
const {
|
|
37
|
+
const { getByLabelText } = render(Checkbox, {
|
|
38
38
|
props: { id, label, isinvalid: true },
|
|
39
39
|
});
|
|
40
40
|
const checkbox = getByLabelText(label);
|
|
@@ -102,8 +102,8 @@
|
|
|
102
102
|
flex-shrink: 0;
|
|
103
103
|
transition: box-shadow 200ms ease;
|
|
104
104
|
background-color: var(--forms-color-background-default, #ffffff);
|
|
105
|
-
border: var(--border-m, 0.125rem) solid var(--forms-color-border-default, #666666);
|
|
106
|
-
border-radius: var(--forms-radius
|
|
105
|
+
border: var(--border-width-m, 0.125rem) solid var(--forms-color-border-default, #666666);
|
|
106
|
+
border-radius: var(--forms-border-radius, 0.25rem);
|
|
107
107
|
transition: all ease 200ms;
|
|
108
108
|
height: 1.25rem;
|
|
109
109
|
width: 1.25rem;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import{c as A,p as D,a as F,b as o,l as G,f as k,t as _,i as g,j as S,k as s,r as p,e as E,g as y,d as C,s as q,m as t,h as I}from"../../custom-element.js";import{i as J}from"../../if.js";import{e as K
|
|
1
|
+
import{c as A,p as D,a as F,b as o,l as G,f as k,t as _,i as g,j as S,k as s,r as p,e as E,g as y,d as C,s as q,m as t,h as I}from"../../custom-element.js";import{i as J}from"../../if.js";import{e as K}from"../../each.js";import{r as L,s as m}from"../../attributes.js";import{b as N}from"../../input.js";import{c as O}from"../../custom-element-forward-events.js";var P=k('<label class="mc-checkbox__label svelte-11asba7"> </label>'),Q=k('<div class="mc-checkbox mc-field__item svelte-11asba7"><input type="checkbox"/> <!></div>'),R=k("<div></div>");const T={hash:"svelte-11asba7",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/
|
|
4
|
-
/* stylelint-disable string-no-newline */.mc-checkbox.svelte-11asba7 {align-items:center;display:flex;gap:0.5rem;padding:0.375rem;}.mc-checkbox__label.svelte-11asba7 {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-text-default, #000000);cursor:pointer;}.mc-checkbox__input.svelte-11asba7 {appearance:none;margin:0;cursor:pointer;flex-shrink:0;transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-m, 0.125rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-radius
|
|
4
|
+
/* stylelint-disable string-no-newline */.mc-checkbox.svelte-11asba7 {align-items:center;display:flex;gap:0.5rem;padding:0.375rem;}.mc-checkbox__label.svelte-11asba7 {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);color:var(--forms-color-text-default, #000000);cursor:pointer;}.mc-checkbox__input.svelte-11asba7 {appearance:none;margin:0;cursor:pointer;flex-shrink:0;transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-m, 0.125rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, 0.25rem);transition:all ease 200ms;height:1.25rem;width:1.25rem;}.mc-checkbox__input.svelte-11asba7:hover {border-color:var(--forms-color-border-hover, #4d4d4d);}.mc-checkbox__input.svelte-11asba7:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, var(--focus-color-outline-mid, #ffffff)), 0 0 0 0.25rem var(--focus-color-outer, var(--focus-color-outline-outer, #000000));outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-checkbox__input.svelte-11asba7:checked {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-inverse, %23ffffff)' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-11asba7:indeterminate {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-inverse, %23ffffff)' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-11asba7:checked, .mc-checkbox__input.svelte-11asba7:indeterminate {background-color:var(--forms-color-background-checked, #117f03);background-size:1rem 1rem;background-position:center;}.mc-checkbox__input.svelte-11asba7:checked, .mc-checkbox__input.svelte-11asba7:indeterminate, .mc-checkbox__input.svelte-11asba7:disabled {border-color:transparent;}.mc-checkbox__input.svelte-11asba7:disabled {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;}.mc-checkbox__input.svelte-11asba7:disabled:checked {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-disabled, %23737373)' viewBox='0 0 16 16'%3E%3Cpath d='M7.63 11.21a1 1 0 0 1-1.38 0l-2.92-2.6a1 1 0 1 1 1.34-1.48l2.22 2 4.41-4.34a1 1 0 1 1 1.4 1.42z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-11asba7:disabled:indeterminate {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1rem' width='1rem' fill='var(--forms-color-icon-disabled, %23737373)' viewBox='0 0 16 16'%3E%3Cpath d='M12 9H4a1 1 0 010-2h8a1 1 0 010 2z'/%3E%3C/svg%3E");}.mc-checkbox__input.svelte-11asba7:disabled + .mc-checkbox__label:where(.svelte-11asba7) {color:var(--forms-color-text-disabled, #737373);cursor:not-allowed;}.mc-checkbox__input.svelte-11asba7:not(:disabled):checked:hover, .mc-checkbox__input.svelte-11asba7:not(:disabled):indeterminate:hover {background-color:var(--forms-color-background-checked-hover, #006902);}.mc-checkbox__input.is-invalid.svelte-11asba7:not(:checked, :indeterminate) {border-color:var(--forms-color-border-invalid, #ea302d);}.mc-checkbox__input.is-invalid.svelte-11asba7:not(:checked, :indeterminate):hover {border-color:var(--forms-color-border-invalid-hover, #c61112);}
|
|
5
5
|
|
|
6
6
|
/* stylelint-enable string-no-newline */
|
|
7
7
|
/* stylelint-disable string-no-newline */.mc-field__content.svelte-11asba7 {margin-top:0.5rem;}
|
|
8
8
|
|
|
9
|
-
/* stylelint-enable string-no-newline */.mc-field__content.svelte-11asba7:where(.mc-field__content--inline:where(.svelte-11asba7)) {display:flex;flex-flow:row wrap;gap:0.25rem 1rem;}`};function
|
|
9
|
+
/* stylelint-enable string-no-newline */.mc-field__content.svelte-11asba7:where(.mc-field__content--inline:where(.svelte-11asba7)) {display:flex;flex-flow:row wrap;gap:0.25rem 1rem;}`};function U(x,i){D(i,!0),F(x,T);const z=[];let v=o(i,"name",7),b=o(i,"options",7),l=o(i,"value",31,()=>G([])),u=o(i,"inline",7),n=o(i,"isinvalid",7);var B={get name(){return v()},set name(e){v(e),s()},get options(){return b()},set options(e){b(e),s()},get value(){return l()},set value(e=[]){l(e),s()},get inline(){return u()},set inline(e){u(e),s()},get isinvalid(){return n()},set isinvalid(e){n(e),s()}},c=R();return K(c,21,b,e=>e.id,(e,r)=>{var h=Q(),a=C(h);L(a);var w,M=q(a,2);{var H=f=>{var d=P(),j=C(d,!0);p(d),_(()=>{m(d,"for",t(r).id),I(j,t(r).label)}),g(f,d)};J(M,f=>{t(r).label&&f(H)})}p(h),_(()=>{E(a,1,y(["mc-checkbox__input",n()&&"is-invalid"]),"svelte-11asba7"),m(a,"id",t(r).id),m(a,"name",v()),a.disabled=t(r).disabled,a.indeterminate=t(r).indeterminate,m(a,"aria-invalid",n()),w!==(w=t(r).value)&&(a.value=(a.__value=t(r).value)??"")}),N(z,[],a,()=>(t(r).value,l()),l),g(e,h)}),p(c),_(()=>E(c,1,y(["mc-field__content",u()&&"mc-field__content--inline"]),"svelte-11asba7")),g(x,c),S(B)}customElements.define("m-checkbox-group",A(U,{options:{attribute:"options",reflect:!0,type:"Array"},name:{},value:{},inline:{},isinvalid:{}},[],[],!0,O));
|
|
10
10
|
//# sourceMappingURL=CheckboxGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxGroup.js","sources":["../../../src/components/checkboxgroup/CheckboxGroup.svelte"],"sourcesContent":["<svelte:options\n customElement={{\n tag: 'm-checkbox-group',\n props: {\n options: { reflect: true, type: 'Array', attribute: 'options' },\n },\n extend: customElementForwardEvents,\n }}\n/>\n\n<script lang=\"ts\">\n import { customElementForwardEvents } from '../../utils';\n /**\n * A checkbox is an interactive component used to select or deselect an option, typically within a list of choices. It allows users to make multiple selections independently and is often accompanied by a label for clarity. Checkboxes are commonly used in forms, filters, settings, and preference selections to provide a simple and intuitive way to enable or disable specific options. <br><br> To put a label, requierement text, help text or to apply a valid or invalid message, the examples are available in the [Field section](/docs/form-elements-field--docs#input).\n */\n interface Props {\n /**\n * The name attribute for the checkbox element, typically used for form submission.\n */\n name: string;\n /**\n * The current value of the checkbox group.\n */\n value?: Array<string>;\n /**\n * list of properties of each checkbox button of the checkbox group\n */\n options: Array<{\n id: string;\n label: string;\n value: string;\n disabled?: boolean;\n indeterminate?: boolean;\n indented?: boolean;\n }>;\n /**\n * If `true`, applies an invalid state to the checkbox group.\n */\n isinvalid?: boolean;\n /**\n * If `true`, make the form element of the group inline.\n */\n inline?: boolean;\n }\n\n let {
|
|
1
|
+
{"version":3,"file":"CheckboxGroup.js","sources":["../../../src/components/checkboxgroup/CheckboxGroup.svelte"],"sourcesContent":["<svelte:options\n customElement={{\n tag: 'm-checkbox-group',\n props: {\n options: { reflect: true, type: 'Array', attribute: 'options' },\n },\n extend: customElementForwardEvents,\n }}\n/>\n\n<script lang=\"ts\">\n import { customElementForwardEvents } from '../../utils';\n /**\n * A checkbox is an interactive component used to select or deselect an option, typically within a list of choices. It allows users to make multiple selections independently and is often accompanied by a label for clarity. Checkboxes are commonly used in forms, filters, settings, and preference selections to provide a simple and intuitive way to enable or disable specific options. <br><br> To put a label, requierement text, help text or to apply a valid or invalid message, the examples are available in the [Field section](/docs/form-elements-field--docs#input).\n */\n interface Props {\n /**\n * The name attribute for the checkbox element, typically used for form submission.\n */\n name: string;\n /**\n * The current value of the checkbox group.\n */\n value?: Array<string>;\n /**\n * list of properties of each checkbox button of the checkbox group\n */\n options: Array<{\n id: string;\n label: string;\n value: string;\n disabled?: boolean;\n indeterminate?: boolean;\n indented?: boolean;\n }>;\n /**\n * If `true`, applies an invalid state to the checkbox group.\n */\n isinvalid?: boolean;\n /**\n * If `true`, make the form element of the group inline.\n */\n inline?: boolean;\n }\n\n let { name, options, value = $bindable([]), inline, isinvalid }: Props = $props();\n</script>\n\n<div class={['mc-field__content', inline && 'mc-field__content--inline']}>\n {#each options as option (option.id)}\n <div class=\"mc-checkbox mc-field__item\">\n <input\n type=\"checkbox\"\n class={['mc-checkbox__input', isinvalid && 'is-invalid']}\n id={option.id}\n {name}\n disabled={option.disabled}\n indeterminate={option.indeterminate}\n aria-invalid={isinvalid}\n bind:group={value}\n value={option.value}\n />\n {#if option.label}\n <label for={option.id} class=\"mc-checkbox__label\">{option.label}</label>\n {/if}\n </div>\n {/each}\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/checkbox';\n @use '@mozaic-ds/styles/components/field';\n\n .mc-field__content:where(.mc-field__content--inline) {\n display: flex;\n flex-flow: row wrap;\n gap: 0.25rem 1rem;\n }\n</style>\n"],"names":["name","$.prop","$$props","options","value","$.proxy","inline","isinvalid","$.each","div","option","$.set_attribute","label","$.get","$.set_text","text","$$render","consequent","input","input_value","customElementForwardEvents"],"mappings":";;;;;;;;wMAAA,+BA6CQA,EAAIC,EAAAC,EAAA,OAAA,CAAA,EAAEC,EAAOF,EAAAC,EAAA,UAAA,CAAA,EAAEE,EAAKH,EAAAC,EAAA,QAAA,GAAA,IAAAG,EAAA,CAAA,CAAA,CAAA,EAAkBC,EAAML,EAAAC,EAAA,SAAA,CAAA,EAAEK,EAASN,EAAAC,EAAA,YAAA,CAAA,0QAItDM,OAAAA,EAAAC,EAAA,GAAAN,EAAWO,GAAQA,EAAO,MAAfA,IAAM,iFAcNC,EAAAC,EAAA,MAAAC,EAAAH,CAAM,EAAC,EAAE,EAA8BI,EAAAC,EAAAF,EAAAH,CAAM,EAAC,KAAK,oBAD5DG,EAAAH,CAAM,EAAC,OAAKM,EAAAC,CAAA,yBATP,qBAAsBV,KAAa,YAAY,CAAA,EAAA,gBAAA,EACnDI,EAAAO,EAAA,KAAAL,EAAAH,CAAM,EAAC,EAAE,kBAEHQ,EAAA,SAAAL,EAAAH,CAAM,EAAC,SACFQ,EAAA,cAAAL,EAAAH,CAAM,EAAC,iCACRH,GAAS,EAEhBY,KAAAA,EAAAN,EAAAH,CAAM,EAAC,SAAPQ,EAAA,OAAAA,EAAA,QAAAL,EAAAH,CAAM,EAAC,QAAK,oBAAZG,EAAAH,CAAM,EAAC,MADFN,EAAK,GAALA,gCAXP,oBAAqBE,EAAM,GAAI,2BAA2B,CAAA,EAAA,gBAAA,CAAA,aAFvE,uJAxCYc"}
|