@mozaic-ds/web-components 1.1.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 +26 -104
- 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 +5 -5
- package/dist/bundle.d.ts.map +1 -1
- package/dist/bundle.js +5 -5
- package/dist/components/avatar/Avatar.js +2 -2
- package/dist/components/avatar/Avatar.js.map +1 -1
- package/dist/components/avatar/Avatar.svelte +1 -1
- package/dist/components/breadcrumb/Breadcrumb.js +2 -2
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.svelte +1 -1
- package/dist/components/button/Button.js +3 -3
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/Button.svelte +2 -2
- package/dist/components/callout/Callout.js +1 -1
- package/dist/components/callout/Callout.js.map +1 -1
- package/dist/components/callout/Callout.svelte +1 -1
- package/dist/components/checkbox/Checkbox.js +2 -2
- package/dist/components/checkbox/Checkbox.svelte +2 -2
- package/dist/components/checkboxgroup/CheckboxGroup.js +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.svelte +2 -2
- 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 +10 -1
- 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 +9 -9
- 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.svelte +4 -4
- package/dist/components/flag/Flag.js +2 -2
- package/dist/components/flag/Flag.js.map +1 -1
- 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 +2 -2
- 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/modal/Modal.js +3 -3
- package/dist/components/modal/Modal.js.map +1 -1
- 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 +1 -1
- package/dist/components/pagination/Pagination.js +6 -6
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/Pagination.svelte +5 -5
- package/dist/components/passwordinput/PasswordInput.js +3 -3
- package/dist/components/passwordinput/PasswordInput.js.map +1 -1
- package/dist/components/passwordinput/PasswordInput.svelte +8 -8
- package/dist/components/pincode/Pincode.js +2 -2
- package/dist/components/pincode/Pincode.js.map +1 -1
- package/dist/components/pincode/Pincode.svelte +5 -5
- package/dist/components/quantityselector/QuantitySelector.js +3 -3
- package/dist/components/quantityselector/QuantitySelector.js.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.svelte +10 -12
- 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 +2 -2
- package/dist/components/radiogroup/RadioGroup.js +1 -1
- package/dist/components/radiogroup/RadioGroup.svelte +2 -2
- package/dist/components/select/Select.js +3 -3
- package/dist/components/select/Select.svelte +5 -5
- 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.svelte +2 -2
- 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 -2
- package/dist/components/statusnotification/StatusNotification.js.map +1 -1
- package/dist/components/statusnotification/StatusNotification.svelte +12 -12
- 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 +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} +111 -26
- 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 +5 -5
- package/dist/components/textinput/Textinput.js +5 -5
- package/dist/components/textinput/Textinput.js.map +1 -1
- package/dist/components/textinput/Textinput.svelte +6 -6
- package/dist/components/toaster/Toaster.js +3 -3
- package/dist/components/toaster/Toaster.js.map +1 -1
- package/dist/components/toaster/Toaster.svelte +11 -11
- package/dist/components/toggle/Toggle.js +2 -2
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components/toggle/Toggle.svelte +2 -2
- package/dist/components/togglegroup/ToggleGroup.js +1 -1
- package/dist/components/togglegroup/ToggleGroup.js.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.svelte +2 -2
- package/dist/components/tooltip/Tooltip.js +1 -1
- package/dist/components/tooltip/Tooltip.svelte +2 -2
- 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/Svelte/usingPresets.mdx +2 -3
- package/dist/documentation/WebComponents/usingPresets.mdx +2 -3
- 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 +7 -6
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +7 -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/package.json +14 -17
- 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 -235
- 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 -243
- 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 -60
- 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
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
flex-shrink: 0;
|
|
78
78
|
transition: box-shadow 200ms ease;
|
|
79
79
|
background-color: var(--forms-color-background-default, #ffffff);
|
|
80
|
-
border: var(--border-m, 0.125rem) solid var(--forms-color-border-default, #666666);
|
|
80
|
+
border: var(--border-width-m, 0.125rem) solid var(--forms-color-border-default, #666666);
|
|
81
81
|
border-radius: 100%;
|
|
82
82
|
transition: all ease 200ms;
|
|
83
83
|
height: 1.25rem;
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
position: relative;
|
|
86
86
|
}
|
|
87
87
|
.mc-radio__input::before {
|
|
88
|
-
border-radius: var(--radius-full, 100%);
|
|
88
|
+
border-radius: var(--border-radius-full, 100%);
|
|
89
89
|
content: "";
|
|
90
90
|
display: block;
|
|
91
91
|
height: 0.5rem;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import{c as D,p as F,a as G,b as i,f as E,t as g,i as k,j as R,k as t,r as _,e as w,g as x,d as y,s as S,m as o,h as q}from"../../custom-element.js";import{e as B}from"../../each.js";import{r as C,s as b}from"../../attributes.js";import{b as H}from"../../input.js";import{c as I}from"../../custom-element-forward-events.js";var J=E('<div class="mc-radio mc-field__item svelte-clvmul"><input type="radio"/> <label class="mc-radio__label svelte-clvmul"> </label></div>'),K=E("<div></div>");const L={hash:"svelte-clvmul",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-radio.svelte-clvmul {align-items:center;display:flex;gap:0.5rem;padding:0.375rem;}.mc-radio__label.svelte-clvmul {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-radio__input.svelte-clvmul {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:100%;transition:all ease 200ms;height:1.25rem;width:1.25rem;position:relative;}.mc-radio__input.svelte-clvmul::before {border-radius:var(--radius-full, 100%);content:"";display:block;height:0.5rem;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:0.5rem;}.mc-radio__input.svelte-clvmul:hover {border-color:var(--forms-color-border-hover, #4d4d4d);}.mc-radio__input.svelte-clvmul: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-radio__input.svelte-clvmul:checked {background-color:var(--forms-color-background-checked, #117f03);}.mc-radio__input.svelte-clvmul:checked::before {background-color:var(--forms-color-background-default, #ffffff);}.mc-radio__input.svelte-clvmul:checked, .mc-radio__input.svelte-clvmul:disabled {border-color:transparent;}.mc-radio__input.svelte-clvmul:disabled {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;}.mc-radio__input.svelte-clvmul:disabled:checked::before {background-color:var(--forms-color-icon-disabled, #737373);}.mc-radio__input.svelte-clvmul:disabled + .mc-radio__label:where(.svelte-clvmul) {color:var(--forms-color-text-disabled, #737373);cursor:not-allowed;}.mc-radio__input.svelte-clvmul:not(:disabled):checked:hover {background-color:var(--forms-color-background-checked-hover, #006902);}.mc-radio__input.is-invalid.svelte-clvmul:not(:checked) {border-color:var(--forms-color-border-invalid, #ea302d);}.mc-radio__input.is-invalid.svelte-clvmul:not(:checked):hover {border-color:var(--forms-color-border-invalid-hover, #c61112);}
|
|
3
|
+
*/.mc-radio.svelte-clvmul {align-items:center;display:flex;gap:0.5rem;padding:0.375rem;}.mc-radio__label.svelte-clvmul {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-radio__input.svelte-clvmul {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:100%;transition:all ease 200ms;height:1.25rem;width:1.25rem;position:relative;}.mc-radio__input.svelte-clvmul::before {border-radius:var(--border-radius-full, 100%);content:"";display:block;height:0.5rem;left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);width:0.5rem;}.mc-radio__input.svelte-clvmul:hover {border-color:var(--forms-color-border-hover, #4d4d4d);}.mc-radio__input.svelte-clvmul: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-radio__input.svelte-clvmul:checked {background-color:var(--forms-color-background-checked, #117f03);}.mc-radio__input.svelte-clvmul:checked::before {background-color:var(--forms-color-background-default, #ffffff);}.mc-radio__input.svelte-clvmul:checked, .mc-radio__input.svelte-clvmul:disabled {border-color:transparent;}.mc-radio__input.svelte-clvmul:disabled {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;}.mc-radio__input.svelte-clvmul:disabled:checked::before {background-color:var(--forms-color-icon-disabled, #737373);}.mc-radio__input.svelte-clvmul:disabled + .mc-radio__label:where(.svelte-clvmul) {color:var(--forms-color-text-disabled, #737373);cursor:not-allowed;}.mc-radio__input.svelte-clvmul:not(:disabled):checked:hover {background-color:var(--forms-color-background-checked-hover, #006902);}.mc-radio__input.is-invalid.svelte-clvmul:not(:checked) {border-color:var(--forms-color-border-invalid, #ea302d);}.mc-radio__input.is-invalid.svelte-clvmul:not(:checked):hover {border-color:var(--forms-color-border-invalid-hover, #c61112);}
|
|
4
4
|
|
|
5
5
|
/* stylelint-disable string-no-newline */.mc-field__content.svelte-clvmul {margin-top:0.5rem;}
|
|
6
6
|
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
flex-shrink: 0;
|
|
84
84
|
transition: box-shadow 200ms ease;
|
|
85
85
|
background-color: var(--forms-color-background-default, #ffffff);
|
|
86
|
-
border: var(--border-m, 0.125rem) solid var(--forms-color-border-default, #666666);
|
|
86
|
+
border: var(--border-width-m, 0.125rem) solid var(--forms-color-border-default, #666666);
|
|
87
87
|
border-radius: 100%;
|
|
88
88
|
transition: all ease 200ms;
|
|
89
89
|
height: 1.25rem;
|
|
@@ -91,7 +91,7 @@
|
|
|
91
91
|
position: relative;
|
|
92
92
|
}
|
|
93
93
|
.mc-radio__input::before {
|
|
94
|
-
border-radius: var(--radius-full, 100%);
|
|
94
|
+
border-radius: var(--border-radius-full, 100%);
|
|
95
95
|
content: "";
|
|
96
96
|
display: block;
|
|
97
97
|
height: 0.5rem;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{c as j,p as A,a as D,b as a,f as
|
|
1
|
+
import{c as j,p as A,a as D,b as a,f as x,d as g,s as F,t as p,i as w,j as q,k as t,r as _,h as E,e as G,g as H,m as n}from"../../custom-element.js";import{i as I}from"../../if.js";import{e as J,i as K}from"../../each.js";import{c as N,s as C}from"../../attributes.js";import{c as O}from"../../custom-element-forward-events.js";var P=x("<option disabled selected> </option>"),Q=x("<option> </option>"),R=x("<select><!><!></select>");const T={hash:"svelte-6nznl5",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/
|
|
4
|
-
/* stylelint-disable string-no-newline */.mc-select.svelte-6nznl5 {appearance:none;font-family:inherit;transition:box-shadow 200ms ease;font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);height:3rem;padding:0 3rem 0 0.75rem;background-position:right 1rem center;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-interactive, %23000000)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E");border:var(--border-s,
|
|
4
|
+
/* stylelint-disable string-no-newline */.mc-select.svelte-6nznl5 {appearance:none;font-family:inherit;transition:box-shadow 200ms ease;font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);height:3rem;padding:0 3rem 0 0.75rem;background-position:right 1rem center;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-interactive, %23000000)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E");border:var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);display:block;width:100%;color:var(--forms-color-text-default, #000000);background-color:var(--forms-color-background-default, #ffffff);text-overflow:ellipsis;background-repeat:no-repeat;background-size:1rem;border-radius:var(--border-radius-s, 0.25rem);}.mc-select.svelte-6nznl5:hover {border-color:var(--forms-color-border-hover, #4d4d4d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-hover, #4d4d4d);}.mc-select.svelte-6nznl5: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-select.svelte-6nznl5:disabled {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='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E");background-color:var(--forms-color-background-disabled, #d9d9d9);border-color:transparent;cursor:not-allowed;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-select--readonly.svelte-6nznl5 {border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none;}.mc-select.is-invalid.svelte-6nznl5 {border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);}.mc-select.is-invalid.svelte-6nznl5:hover {border-color:var(--forms-color-border-invalid-hover, #c61112);box-shadow:0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);}.mc-select--s.svelte-6nznl5 {font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);height:2rem;padding:0 2rem 0 0.5rem;background-position:right 0.5rem center;}
|
|
5
5
|
|
|
6
|
-
/* stylelint-enable string-no-newline */`};function U(z,r){A(r,!0),D(z,T);let d=a(r,"id",7),c=a(r,"name",7),v=a(r,"value",15),i=a(r,"placeholder",7),m=a(r,"size",7,"m"),u=a(r,"isinvalid",7),f=a(r,"disabled",7),b=a(r,"readonly",7),h=a(r,"options",7);var B={get id(){return d()},set id(e){d(e),t()},get name(){return c()},set name(e){c(e),t()},get value(){return v()},set value(e){v(e),t()},get placeholder(){return i()},set placeholder(e){i(e),t()},get size(){return m()},set size(e="m"){m(e),t()},get isinvalid(){return u()},set isinvalid(e){u(e),t()},get disabled(){return f()},set disabled(e){f(e),t()},get readonly(){return b()},set readonly(e){b(e),t()},get options(){return h()},set options(e){h(e),t()}},l=R(),y=g(l);{var L=e=>{var o=P(),s=g(o);
|
|
6
|
+
/* stylelint-enable string-no-newline */`};function U(z,r){A(r,!0),D(z,T);let d=a(r,"id",7),c=a(r,"name",7),v=a(r,"value",15),i=a(r,"placeholder",7),m=a(r,"size",7,"m"),u=a(r,"isinvalid",7),f=a(r,"disabled",7),b=a(r,"readonly",7),h=a(r,"options",7);var B={get id(){return d()},set id(e){d(e),t()},get name(){return c()},set name(e){c(e),t()},get value(){return v()},set value(e){v(e),t()},get placeholder(){return i()},set placeholder(e){i(e),t()},get size(){return m()},set size(e="m"){m(e),t()},get isinvalid(){return u()},set isinvalid(e){u(e),t()},get disabled(){return f()},set disabled(e){f(e),t()},get readonly(){return b()},set readonly(e){b(e),t()},get options(){return h()},set options(e){h(e),t()}},l=R(),y=g(l);{var L=e=>{var o=P(),s=g(o);_(o),o.value=o.__value="",p(()=>E(s,`-- ${i()??""} --`)),w(e,o)};I(y,e=>{i()&&e(L)})}var M=F(y);return J(M,17,h,K,(e,o)=>{var s=Q(),S=g(s,!0);_(s);var k={};p(()=>{s.disabled=n(o).disabled,E(S,n(o).text),k!==(k=n(o).value)&&(s.value=(s.__value=n(o).value)??"")}),w(e,s)}),_(l),p(()=>{C(l,"id",d()),G(l,1,H(["mc-select",`mc-select--${m()}`,b()&&"mc-select--readonly",u()&&"is-invalid"]),"svelte-6nznl5"),C(l,"name",c()),l.disabled=f()}),N(l,v),w(z,l),q(B)}customElements.define("m-select",j(U,{options:{attribute:"options",type:"Array"},id:{},name:{},value:{},placeholder:{},size:{},isinvalid:{},disabled:{},readonly:{}},[],[],!0,O));
|
|
7
7
|
//# sourceMappingURL=Select.js.map
|
|
@@ -109,8 +109,7 @@
|
|
|
109
109
|
padding: 0 3rem 0 0.75rem;
|
|
110
110
|
background-position: right 1rem center;
|
|
111
111
|
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-interactive, %23000000)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11.5a1 1 0 01-.71-.29l-5-5a1 1 0 011.42-1.42L8 9.09l4.29-4.3a1 1 0 111.42 1.42l-5 5a1 1 0 01-.71.29z'/%3E%3C/svg%3E");
|
|
112
|
-
border: var(--border-s,
|
|
113
|
-
border-radius: var(--radius-s, 0.25rem);
|
|
112
|
+
border: var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);
|
|
114
113
|
display: block;
|
|
115
114
|
width: 100%;
|
|
116
115
|
color: var(--forms-color-text-default, #000000);
|
|
@@ -118,10 +117,11 @@
|
|
|
118
117
|
text-overflow: ellipsis;
|
|
119
118
|
background-repeat: no-repeat;
|
|
120
119
|
background-size: 1rem;
|
|
120
|
+
border-radius: var(--border-radius-s, 0.25rem);
|
|
121
121
|
}
|
|
122
122
|
.mc-select:hover {
|
|
123
123
|
border-color: var(--forms-color-border-hover, #4d4d4d);
|
|
124
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
124
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-hover, #4d4d4d);
|
|
125
125
|
}
|
|
126
126
|
.mc-select:focus {
|
|
127
127
|
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));
|
|
@@ -142,11 +142,11 @@
|
|
|
142
142
|
}
|
|
143
143
|
.mc-select.is-invalid {
|
|
144
144
|
border-color: var(--forms-color-border-invalid, #ea302d);
|
|
145
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
145
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);
|
|
146
146
|
}
|
|
147
147
|
.mc-select.is-invalid:hover {
|
|
148
148
|
border-color: var(--forms-color-border-invalid-hover, #c61112);
|
|
149
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
149
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);
|
|
150
150
|
}
|
|
151
151
|
.mc-select--s {
|
|
152
152
|
font-size: var(--font-size-100, 0.875rem);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as f,p as
|
|
1
|
+
import{c as f,p as m,a as v,b as l,f as h,d as u,s as k,t as p,i as y,j as w,k as b,r as n,e as _,g as x,h as S}from"../../custom-element.js";import{S as z}from"../statusdot/StatusDot.js";var D=h('<div><!> <span class="mc-status-badge__label svelte-1oceydf"> </span></div>');const j={hash:"svelte-1oceydf",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-status-badge.svelte-1oceydf {background-color:var(--status-badge-color-background-
|
|
3
|
+
*/.mc-status-badge.svelte-1oceydf {background-color:var(--status-badge-color-background-info, #e1f3f9);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-info, #a7d9ed);font-weight:var(--font-weight-regular, 400);font-size:var(--font-size-100, 0.875rem);display:inline-flex;align-items:center;gap:0.25rem;border-radius:var(--border-radius-s, 0.25rem);padding-right:0.5rem;padding-left:0.5rem;text-transform:lowercase;white-space:nowrap;min-height:1.5rem;}.mc-status-badge__label.svelte-1oceydf {color:var(--status-badge-color-label, #000000);}.mc-status-badge__label.svelte-1oceydf::first-letter {text-transform:uppercase;}.mc-status-badge--success.svelte-1oceydf {background-color:var(--status-badge-color-background-success, #ebf5de);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-success, #c5e39e);}.mc-status-badge--error.svelte-1oceydf {background-color:var(--status-badge-color-background-error, #fdeaea);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-error, #f8bcbb);}.mc-status-badge--warning.svelte-1oceydf {background-color:var(--status-badge-color-background-warning, #fdf1e8);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-warning, #f8d2b3);}.mc-status-badge--neutral.svelte-1oceydf {background-color:var(--status-badge-color-background-neutral, #f2f2f2);border:var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-neutral, #cccccc);}.mc-status-dot.svelte-1oceydf {background-color:var(--status-dot-color-background-info, #0b96cc);height:0.5rem;width:0.5rem;border-radius:var(--border-radius-full, 100%);display:inline-block;}.mc-status-dot--s.svelte-1oceydf {height:0.25rem;width:0.25rem;}.mc-status-dot--l.svelte-1oceydf {height:1rem;width:1rem;}.mc-status-dot--success.svelte-1oceydf {background-color:var(--status-dot-color-background-success, #3f9e10);}.mc-status-dot--error.svelte-1oceydf {background-color:var(--status-dot-color-background-error, #ea302d);}.mc-status-dot--warning.svelte-1oceydf {background-color:var(--status-dot-color-background-warning, #ea7315);}.mc-status-dot--neutral.svelte-1oceydf {background-color:var(--status-dot-color-background-neutral, #808080);}`};function B(o,t){m(t,!0),v(o,j);let e=l(t,"status",7,"info"),a=l(t,"label",7);var g={get status(){return e()},set status(s="info"){e(s),b()},get label(){return a()},set label(s){a(s),b()}},r=D(),d=u(r);z(d,{get status(){return e()},size:"m"});var c=k(d,2),i=u(c,!0);return n(c),n(r),p(()=>{_(r,1,x(["mc-status-badge",`mc-status-badge--${e()}`]),"svelte-1oceydf"),S(i,a())}),y(o,r),w(g)}customElements.define("m-status-badge",f(B,{status:{},label:{}},[],[],!0));
|
|
4
4
|
//# sourceMappingURL=StatusBadge.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusBadge.js","sources":["../../../src/components/statusbadge/StatusBadge.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-badge' }} />\n\n<script lang=\"ts\">\n import StatusDot from '../statusdot/StatusDot.svelte';\n /**\n * A Status Badge is used to indicate the current status of an element, providing a clear and concise visual cue. The status can change dynamically based on updates, events, or conditions within the system. Status Badges help users quickly identify the state of an item, such as an order status, system health, or process completion. They are often color-coded to enhance readability and recognition.\n */\n interface Props {\n /**\n * Content of the status badge.\n */\n label: string;\n /**\n * Allows to define the status badge type.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral';\n }\n\n let { status = 'info', label }: Props = $props();\n</script>\n\n<div class={['mc-status-badge', `mc-status-badge--${status}`]}>\n <StatusDot {status} size=\"m\" />\n <span class=\"mc-status-badge__label\">{label}</span>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/status-badge';\n @use '@mozaic-ds/styles/components/status-dot';\n</style>\n"],"names":["status","label","$.prop","$$props","$.set_class","div","$.clsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"StatusBadge.js","sources":["../../../src/components/statusbadge/StatusBadge.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-badge' }} />\n\n<script lang=\"ts\">\n import StatusDot from '../statusdot/StatusDot.svelte';\n /**\n * A Status Badge is used to indicate the current status of an element, providing a clear and concise visual cue. The status can change dynamically based on updates, events, or conditions within the system. Status Badges help users quickly identify the state of an item, such as an order status, system health, or process completion. They are often color-coded to enhance readability and recognition.\n */\n interface Props {\n /**\n * Content of the status badge.\n */\n label: string;\n /**\n * Allows to define the status badge type.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral';\n }\n\n let { status = 'info', label }: Props = $props();\n</script>\n\n<div class={['mc-status-badge', `mc-status-badge--${status}`]}>\n <StatusDot {status} size=\"m\" />\n <span class=\"mc-status-badge__label\">{label}</span>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/status-badge';\n @use '@mozaic-ds/styles/components/status-dot';\n</style>\n"],"names":["status","label","$.prop","$$props","$.set_class","div","$.clsx"],"mappings":";;6sEAAA,gBAkBQ,IAAAA,iBAAS,MAAM,EAAEC,EAAKC,EAAAC,EAAA,QAAA,CAAA,+CAAb,OAAM,gKAGVC,EAAAC,EAAA,EAAAC,EAAA,CAAA,sCAAuCN,EAAM,CAAA,EAAA,CAAA,EAAA,gBAAA,MAElBC,GAAK,eAJ7C"}
|
|
@@ -28,14 +28,14 @@
|
|
|
28
28
|
* Do not edit directly, this file was auto-generated.
|
|
29
29
|
*/
|
|
30
30
|
.mc-status-badge {
|
|
31
|
-
background-color: var(--status-badge-color-background-
|
|
32
|
-
border: var(--border-s,
|
|
33
|
-
border-radius: var(--radius-s, 0.25rem);
|
|
31
|
+
background-color: var(--status-badge-color-background-info, #e1f3f9);
|
|
32
|
+
border: var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-info, #a7d9ed);
|
|
34
33
|
font-weight: var(--font-weight-regular, 400);
|
|
35
34
|
font-size: var(--font-size-100, 0.875rem);
|
|
36
35
|
display: inline-flex;
|
|
37
36
|
align-items: center;
|
|
38
37
|
gap: 0.25rem;
|
|
38
|
+
border-radius: var(--border-radius-s, 0.25rem);
|
|
39
39
|
padding-right: 0.5rem;
|
|
40
40
|
padding-left: 0.5rem;
|
|
41
41
|
text-transform: lowercase;
|
|
@@ -50,26 +50,26 @@
|
|
|
50
50
|
}
|
|
51
51
|
.mc-status-badge--success {
|
|
52
52
|
background-color: var(--status-badge-color-background-success, #ebf5de);
|
|
53
|
-
border: var(--border-s,
|
|
53
|
+
border: var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-success, #c5e39e);
|
|
54
54
|
}
|
|
55
55
|
.mc-status-badge--error {
|
|
56
56
|
background-color: var(--status-badge-color-background-error, #fdeaea);
|
|
57
|
-
border: var(--border-s,
|
|
57
|
+
border: var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-error, #f8bcbb);
|
|
58
58
|
}
|
|
59
59
|
.mc-status-badge--warning {
|
|
60
60
|
background-color: var(--status-badge-color-background-warning, #fdf1e8);
|
|
61
|
-
border: var(--border-s,
|
|
61
|
+
border: var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-warning, #f8d2b3);
|
|
62
62
|
}
|
|
63
63
|
.mc-status-badge--neutral {
|
|
64
64
|
background-color: var(--status-badge-color-background-neutral, #f2f2f2);
|
|
65
|
-
border: var(--border-s,
|
|
65
|
+
border: var(--border-width-s, 0.0625rem) solid var(--status-badge-color-border-neutral, #cccccc);
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
.mc-status-dot {
|
|
69
|
-
background-color: var(--status-dot-color-background-
|
|
69
|
+
background-color: var(--status-dot-color-background-info, #0b96cc);
|
|
70
70
|
height: 0.5rem;
|
|
71
71
|
width: 0.5rem;
|
|
72
|
-
border-radius: var(--radius-full, 100%);
|
|
72
|
+
border-radius: var(--border-radius-full, 100%);
|
|
73
73
|
display: inline-block;
|
|
74
74
|
}
|
|
75
75
|
.mc-status-dot--s {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import{c as l,p as n,a as i,b as c,f as m,t as v,i as p,j as g,k as u,e as b,g as f}from"../../custom-element.js";var h=m("<div></div>");const k={hash:"svelte-14acsp3",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-status-dot.svelte-14acsp3 {background-color:var(--status-dot-color-background-
|
|
3
|
+
*/.mc-status-dot.svelte-14acsp3 {background-color:var(--status-dot-color-background-info, #0b96cc);height:0.5rem;width:0.5rem;border-radius:var(--border-radius-full, 100%);display:inline-block;}.mc-status-dot--s.svelte-14acsp3 {height:0.25rem;width:0.25rem;}.mc-status-dot--l.svelte-14acsp3 {height:1rem;width:1rem;}.mc-status-dot--success.svelte-14acsp3 {background-color:var(--status-dot-color-background-success, #3f9e10);}.mc-status-dot--error.svelte-14acsp3 {background-color:var(--status-dot-color-background-error, #ea302d);}.mc-status-dot--warning.svelte-14acsp3 {background-color:var(--status-dot-color-background-warning, #ea7315);}.mc-status-dot--neutral.svelte-14acsp3 {background-color:var(--status-dot-color-background-neutral, #808080);}`};function w(o,t){n(t,!0),i(o,k);let s=c(t,"size",7,"m"),e=c(t,"status",7,"info");var d={get size(){return s()},set size(a="m"){s(a),u()},get status(){return e()},set status(a="info"){e(a),u()}},r=h();return v(()=>b(r,1,f(["mc-status-dot",`mc-status-dot--${s()}`,`mc-status-dot--${e()}`]),"svelte-14acsp3")),p(o,r),g(d)}customElements.define("m-status-dot",l(w,{size:{},status:{}},[],[],!0));export{w as S};
|
|
4
4
|
//# sourceMappingURL=StatusDot.js.map
|
|
@@ -24,10 +24,10 @@
|
|
|
24
24
|
* Do not edit directly, this file was auto-generated.
|
|
25
25
|
*/
|
|
26
26
|
.mc-status-dot {
|
|
27
|
-
background-color: var(--status-dot-color-background-
|
|
27
|
+
background-color: var(--status-dot-color-background-info, #0b96cc);
|
|
28
28
|
height: 0.5rem;
|
|
29
29
|
width: 0.5rem;
|
|
30
|
-
border-radius: var(--radius-full, 100%);
|
|
30
|
+
border-radius: var(--border-radius-full, 100%);
|
|
31
31
|
display: inline-block;
|
|
32
32
|
}
|
|
33
33
|
.mc-status-dot--s {
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
# `m-status-message`
|
|
2
|
+
|
|
3
|
+
A Status Message is a compact component that combines an icon and concise text to communicate system states or user feedback in limited interface space. The icon and message work together as a unified structure to provide clear, immediate understanding of the current status. Status Messages are designed for contexts where space is constrained but clear communication is essential, offering quick recognition through color-coded icons paired with brief, actionable text.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Description | Type | Default |
|
|
8
|
+
|------|-------------|------|---------|
|
|
9
|
+
| `status` | Allows to define the status message style. | `'info'` `'success'` `'warning'` `'error'` `'neutral'` `'inprogress'` | `info` |
|
|
10
|
+
| `label*` | Label of the status message. | `string` | |
|
|
11
|
+
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{c as w,p as h,b as l,z as b,t as _,i as v,j as p,k as i,e as x,g as y,a as q,w as A,l as G,f as M,d as z,s as H,m as J,r as j,h as K}from"../../custom-element.js";import{i as O}from"../../if.js";import{c as P}from"../../svelte-component.js";import"../../legacy.js";import{s as f,a as C}from"../../attributes.js";import{C as Q}from"../../CrossCircleFilled24.js";import{L as R}from"../loader/Loader.js";var T=b('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px" height="24px"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2m1 2a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0z"></path></svg>');function N(u,s){h(s,!1);let n=l(s,"id",12,void 0),a=l(s,"style",12,void 0),r=l(s,"className",12,void 0),o=l(s,"fill",12,void 0),m=l(s,"size",12,"1.5rem");var d={get id(){return n()},set id(e){n(e),i()},get style(){return a()},set style(e){a(e),i()},get className(){return r()},set className(e){r(e),i()},get fill(){return o()},set fill(e){o(e),i()},get size(){return m()},set size(e){m(e),i()}},t=T();return _(()=>{f(t,"id",n()),C(t,a()),x(t,0,y(r())),f(t,"fill",o())}),v(u,t),p(d)}customElements.define("info-circle-filled-24",w(N,{id:{},style:{},className:{},fill:{},size:{}},[],[],!1));var U=b('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px" height="24px"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m1 6a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0zm-1 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2"></path></svg>');function k(u,s){h(s,!1);let n=l(s,"id",12,void 0),a=l(s,"style",12,void 0),r=l(s,"className",12,void 0),o=l(s,"fill",12,void 0),m=l(s,"size",12,"1.5rem");var d={get id(){return n()},set id(e){n(e),i()},get style(){return a()},set style(e){a(e),i()},get className(){return r()},set className(e){r(e),i()},get fill(){return o()},set fill(e){o(e),i()},get size(){return m()},set size(e){m(e),i()}},t=U();return _(()=>{f(t,"id",n()),C(t,a()),x(t,0,y(r())),f(t,"fill",o())}),v(u,t),p(d)}customElements.define("warning-circle-filled-24",w(k,{id:{},style:{},className:{},fill:{},size:{}},[],[],!1));var V=b('<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24px" height="24px"><path fill-rule="evenodd" d="M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m5.207 6.793a1 1 0 0 1 0 1.414l-5.5 5.5a1 1 0 0 1-1.414 0l-3-3a1 1 0 1 1 1.414-1.414L11 13.586l4.793-4.793a1 1 0 0 1 1.414 0"></path></svg>');function E(u,s){h(s,!1);let n=l(s,"id",12,void 0),a=l(s,"style",12,void 0),r=l(s,"className",12,void 0),o=l(s,"fill",12,void 0),m=l(s,"size",12,"1.5rem");var d={get id(){return n()},set id(e){n(e),i()},get style(){return a()},set style(e){a(e),i()},get className(){return r()},set className(e){r(e),i()},get fill(){return o()},set fill(e){o(e),i()},get size(){return m()},set size(e){m(e),i()}},t=V();return _(()=>{f(t,"id",n()),C(t,a()),x(t,0,y(r())),f(t,"fill",o())}),v(u,t),p(d)}customElements.define("check-circle-filled-24",w(E,{id:{},style:{},className:{},fill:{},size:{}},[],[],!1));var X=M('<span class="mc-status-message__icon svelte-o2wjin"><!></span>'),Y=M('<div><!> <p class="mc-status-message__description svelte-o2wjin"> </p></div>');const Z={hash:"svelte-o2wjin",code:`/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/.mc-status-message.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-info, #0b96cc);}.mc-status-message.svelte-o2wjin {display:inline-flex;gap:0.25rem;align-items:center;}.mc-status-message__icon.svelte-o2wjin {width:1.5rem;height:1.5rem;}.mc-status-message__description.svelte-o2wjin {margin:0;font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);color:var(--action-bottom-bar-color-status-item-text, #404040);}.mc-status-message--success.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-success, #3f9e10);}.mc-status-message--error.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-error, #ea302d);}.mc-status-message--warning.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-warning, #ea7315);}.mc-status-message--neutral.svelte-o2wjin .mc-status-message__icon:where(.svelte-o2wjin) {fill:var(--status-message-color-icon-neutral, #808080);}`};function $(u,s){h(s,!0),q(u,Z);let n=l(s,"label",7),a=l(s,"status",7,"info");const r=[{status:"info",component:N},{status:"success",component:E},{status:"warning",component:k},{status:"error",component:Q},{status:"neutral",component:N}];function o(c){return r.find(g=>g.status===c)||r[0]}let m=A(G(o(a())));var d={get label(){return n()},set label(c){n(c),i()},get status(){return a()},set status(c="info"){a(c),i()}},t=Y(),e=z(t);{var F=c=>{var g=X(),D=z(g);P(D,()=>J(m).component,(I,W)=>{W(I,{"aria-hidden":"true"})}),j(g),v(c,g)},B=c=>{R(c,{size:"s"})};O(e,c=>{a()!=="inprogress"?c(F):c(B,!1)})}var S=H(e,2),L=z(S,!0);return j(S),j(t),_(()=>{x(t,1,y(["mc-status-message",`mc-status-message--${a()}`]),"svelte-o2wjin"),K(L,n())}),v(u,t),p(d)}customElements.define("m-status-message",w($,{label:{},status:{}},[],[],!0));
|
|
4
|
+
//# sourceMappingURL=StatusMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusMessage.js","sources":["../../../node_modules/@mozaic-ds/icons-svelte/dist/components/InfoCircleFilled24/InfoCircleFilled24.svelte","../../../node_modules/@mozaic-ds/icons-svelte/dist/components/WarningCircleFilled24/WarningCircleFilled24.svelte","../../../node_modules/@mozaic-ds/icons-svelte/dist/components/CheckCircleFilled24/CheckCircleFilled24.svelte","../../../src/components/statusmessage/StatusMessage.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'info-circle-filled-24', shadow: 'none' }} />\n<script>\n export let id = undefined;\n export let style = undefined;\n export let className = undefined;\n export let fill = undefined;\n export let size = \"1.5rem\";\n</script>\n\n<svg aria-hidden=\"true\" id={id} style={style} class={className} fill={fill} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\"><path fill-rule=\"evenodd\" d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m0 7a1 1 0 1 0 0-2 1 1 0 0 0 0 2m1 2a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0z\"/></svg>","<svelte:options customElement={{ tag: 'warning-circle-filled-24', shadow: 'none' }} />\n<script>\n export let id = undefined;\n export let style = undefined;\n export let className = undefined;\n export let fill = undefined;\n export let size = \"1.5rem\";\n</script>\n\n<svg aria-hidden=\"true\" id={id} style={style} class={className} fill={fill} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\"><path fill-rule=\"evenodd\" d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m1 6a1 1 0 1 0-2 0v5a1 1 0 1 0 2 0zm-1 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2\"/></svg>","<svelte:options customElement={{ tag: 'check-circle-filled-24', shadow: 'none' }} />\n<script>\n export let id = undefined;\n export let style = undefined;\n export let className = undefined;\n export let fill = undefined;\n export let size = \"1.5rem\";\n</script>\n\n<svg aria-hidden=\"true\" id={id} style={style} class={className} fill={fill} xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 24 24\" width=\"24px\" height=\"24px\"><path fill-rule=\"evenodd\" d=\"M12 2C6.477 2 2 6.477 2 12s4.477 10 10 10 10-4.477 10-10S17.523 2 12 2m5.207 6.793a1 1 0 0 1 0 1.414l-5.5 5.5a1 1 0 0 1-1.414 0l-3-3a1 1 0 1 1 1.414-1.414L11 13.586l4.793-4.793a1 1 0 0 1 1.414 0\"/></svg>","<svelte:options customElement={{ tag: 'm-status-message' }} />\n\n<script lang=\"ts\">\n import InfoCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/InfoCircleFilled24/InfoCircleFilled24.svelte';\n import WarningCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/WarningCircleFilled24/WarningCircleFilled24.svelte';\n import CrossCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/CrossCircleFilled24/CrossCircleFilled24.svelte';\n import CheckCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/CheckCircleFilled24/CheckCircleFilled24.svelte';\n import Loader from '../loader/Loader.svelte';\n /**\n * A Status Message is a compact component that combines an icon and concise text to communicate system states or user feedback in limited interface space. The icon and message work together as a unified structure to provide clear, immediate understanding of the current status. Status Messages are designed for contexts where space is constrained but clear communication is essential, offering quick recognition through color-coded icons paired with brief, actionable text.\n */\n interface Props {\n /**\n * Allows to define the status message style.\n */\n status?: 'info' | 'success' | 'warning' | 'error' | 'neutral' | 'inprogress';\n /**\n * Label of the status message.\n */\n label: string;\n }\n\n let { label, status = 'info' }: Props = $props();\n\n const iconMap = [\n { status: 'info', component: InfoCircleFilled24 },\n { status: 'success', component: CheckCircleFilled24 },\n { status: 'warning', component: WarningCircleFilled24 },\n { status: 'error', component: CrossCircleFilled24 },\n { status: 'neutral', component: InfoCircleFilled24 },\n ];\n\n function getSelected(status: string) {\n return iconMap.find((icon) => icon.status === status) || iconMap[0];\n }\n\n let selected = $state(getSelected(status));\n</script>\n\n<div class={['mc-status-message', `mc-status-message--${status}`]}>\n {#if status !== 'inprogress'}\n <span class=\"mc-status-message__icon\">\n <selected.component aria-hidden=\"true\" />\n </span>\n {:else}\n <Loader size=\"s\" />\n {/if}\n <p class=\"mc-status-message__description\">{label}</p>\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/status-message';\n</style>\n"],"names":["id","style","className","fill","size","label","$.prop","$$props","status","iconMap","InfoCircleFilled24","CheckCircleFilled24","WarningCircleFilled24","CrossCircleFilled24","getSelected","icon","selected","$.state","$.proxy","$$render","consequent","alternate","$.set_class","div","$.clsx"],"mappings":"ktBAAA,SAEa,IAAAA,cAAK,MAAS,EACdC,iBAAQ,MAAS,EACjBC,qBAAY,MAAS,EACrBC,gBAAO,MAAS,EAChBC,gBAAO,QAAQ,gRAGAJ,GAAE,MAAUC,GAAK,UAASC,EAAS,CAAA,CAAA,aAAQC,GAAI,eAF3E,uaCPA,SAEa,IAAAH,cAAK,MAAS,EACdC,iBAAQ,MAAS,EACjBC,qBAAY,MAAS,EACrBC,gBAAO,MAAS,EAChBC,gBAAO,QAAQ,gRAGAJ,GAAE,MAAUC,GAAK,UAASC,EAAS,CAAA,CAAA,aAAQC,GAAI,eAF3E,keCPA,SAEa,IAAAH,cAAK,MAAS,EACdC,iBAAQ,MAAS,EACjBC,qBAAY,MAAS,EACrBC,gBAAO,MAAS,EAChBC,gBAAO,QAAQ,gRAGAJ,GAAE,MAAUC,GAAK,UAASC,EAAS,CAAA,CAAA,aAAQC,GAAI,eAF3E;;4mCCPA,oBAsBQE,EAAKC,EAAAC,EAAA,QAAA,CAAA,EAAEC,iBAAS,MAAM,QAEtBC,EAAO,CACT,CAAA,OAAQ,OAAQ,UAAWC,CAAkB,EAC7C,CAAA,OAAQ,UAAW,UAAWC,CAAmB,EACjD,CAAA,OAAQ,UAAW,UAAWC,CAAqB,EACnD,CAAA,OAAQ,QAAS,UAAWC,CAAmB,EAC/C,CAAA,OAAQ,UAAW,UAAWH,CAAkB,YAG3CI,EAAYN,EAAgB,CAC5B,OAAAC,EAAQ,KAAMM,GAASA,EAAK,SAAWP,CAAM,GAAKC,EAAQ,CAAC,CACpE,KAEIO,EAAQC,EAAAC,EAAUJ,EAAYN,EAAM,CAAA,CAAA,CAAA,8FAdlB,OAAM,8JAkBvBA,EAAM,IAAK,aAAYW,EAAAC,CAAA,EAAAD,EAAAE,EAAA,EAAA,mDADjBC,EAAAC,EAAA,EAAAC,EAAA,CAAA,0CAA2ChB,EAAM,CAAA,EAAA,CAAA,EAAA,eAAA,MAQjBH,GAAK,eAVlD","x_google_ignoreList":[0,1,2]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/svelte';
|
|
3
|
+
import StatusMessage from './StatusMessage.svelte';
|
|
4
|
+
describe('m-status-message component', () => {
|
|
5
|
+
const baseProps = {
|
|
6
|
+
label: 'Test message',
|
|
7
|
+
};
|
|
8
|
+
it('renders with default status "info" and displays label', () => {
|
|
9
|
+
const { container, getByText } = render(StatusMessage, {
|
|
10
|
+
props: baseProps,
|
|
11
|
+
});
|
|
12
|
+
const wrapper = container.querySelector('.mc-status-message');
|
|
13
|
+
expect(wrapper).toBeTruthy();
|
|
14
|
+
expect(wrapper?.classList.contains('mc-status-message--info')).toBe(true);
|
|
15
|
+
expect(getByText(baseProps.label)).toBeTruthy();
|
|
16
|
+
const icon = container.querySelector('.mc-status-message__icon > svg');
|
|
17
|
+
expect(icon).toBeTruthy();
|
|
18
|
+
});
|
|
19
|
+
it('renders correct icon for each status except "inprogress"', () => {
|
|
20
|
+
const statuses = ['info', 'success', 'warning', 'error', 'neutral'];
|
|
21
|
+
statuses.forEach((status) => {
|
|
22
|
+
const { container } = render(StatusMessage, {
|
|
23
|
+
props: { ...baseProps, status },
|
|
24
|
+
});
|
|
25
|
+
const wrapper = container.querySelector('.mc-status-message');
|
|
26
|
+
expect(wrapper?.classList.contains(`mc-status-message--${status}`)).toBe(true);
|
|
27
|
+
const icon = container.querySelector('.mc-status-message__icon > svg');
|
|
28
|
+
expect(icon).toBeTruthy();
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
it('renders Loader instead of icon when status is "inprogress"', () => {
|
|
32
|
+
const { container } = render(StatusMessage, {
|
|
33
|
+
props: { ...baseProps, status: 'inprogress' },
|
|
34
|
+
});
|
|
35
|
+
const wrapper = container.querySelector('.mc-status-message');
|
|
36
|
+
expect(wrapper?.classList.contains('mc-status-message--inprogress')).toBe(true);
|
|
37
|
+
expect(container.querySelector('.mc-status-message__icon')).toBeNull();
|
|
38
|
+
const loader = container.querySelector('m-loader, loader, .mc-loader, [data-testid="loader"]');
|
|
39
|
+
expect(loader).toBeTruthy();
|
|
40
|
+
});
|
|
41
|
+
it('displays the provided label', () => {
|
|
42
|
+
const { getByText } = render(StatusMessage, {
|
|
43
|
+
props: { label: 'Hello world', status: 'success' },
|
|
44
|
+
});
|
|
45
|
+
expect(getByText('Hello world')).toBeTruthy();
|
|
46
|
+
});
|
|
47
|
+
});
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/web-components-vite';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
type Story = StoryObj;
|
|
5
|
+
export declare const Info: Story;
|
|
6
|
+
export declare const Success: Story;
|
|
7
|
+
export declare const Warning: Story;
|
|
8
|
+
export declare const Error: Story;
|
|
9
|
+
export declare const Neutral: Story;
|
|
10
|
+
export declare const InProgress: Story;
|
|
11
|
+
//# sourceMappingURL=StatusMessage.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusMessage.stories.d.ts","sourceRoot":"","sources":["../../../src/components/statusmessage/StatusMessage.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAIrE,QAAA,MAAM,IAAI,EAAE,IAkBX,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,IAAI,EAAE,KAAU,CAAC;AAE9B,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAEnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAErB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAExB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
const meta = {
|
|
4
|
+
title: 'Status/Status Message',
|
|
5
|
+
component: 'm-status-message',
|
|
6
|
+
tags: ['v2'],
|
|
7
|
+
argTypes: {
|
|
8
|
+
status: {
|
|
9
|
+
control: 'radio',
|
|
10
|
+
options: ['info', 'success', 'warning', 'error', 'neutral', 'inprogress'],
|
|
11
|
+
},
|
|
12
|
+
},
|
|
13
|
+
args: {
|
|
14
|
+
label: 'Brief status message',
|
|
15
|
+
},
|
|
16
|
+
render: (args) => html `<m-status-message
|
|
17
|
+
label=${ifDefined(args.label)}
|
|
18
|
+
status=${ifDefined(args.status)}
|
|
19
|
+
></m-status-message>`,
|
|
20
|
+
};
|
|
21
|
+
export default meta;
|
|
22
|
+
export const Info = {};
|
|
23
|
+
export const Success = {
|
|
24
|
+
args: { status: 'success' },
|
|
25
|
+
};
|
|
26
|
+
export const Warning = {
|
|
27
|
+
args: { status: 'warning' },
|
|
28
|
+
};
|
|
29
|
+
export const Error = {
|
|
30
|
+
args: { status: 'error' },
|
|
31
|
+
};
|
|
32
|
+
export const Neutral = {
|
|
33
|
+
args: { status: 'neutral' },
|
|
34
|
+
};
|
|
35
|
+
export const InProgress = {
|
|
36
|
+
args: { status: 'inprogress' },
|
|
37
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<svelte:options customElement={{ tag: 'm-status-message' }} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
import InfoCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/InfoCircleFilled24/InfoCircleFilled24.svelte';
|
|
5
|
+
import WarningCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/WarningCircleFilled24/WarningCircleFilled24.svelte';
|
|
6
|
+
import CrossCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/CrossCircleFilled24/CrossCircleFilled24.svelte';
|
|
7
|
+
import CheckCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/CheckCircleFilled24/CheckCircleFilled24.svelte';
|
|
8
|
+
import Loader from '../loader/Loader.svelte';
|
|
9
|
+
/**
|
|
10
|
+
* A Status Message is a compact component that combines an icon and concise text to communicate system states or user feedback in limited interface space. The icon and message work together as a unified structure to provide clear, immediate understanding of the current status. Status Messages are designed for contexts where space is constrained but clear communication is essential, offering quick recognition through color-coded icons paired with brief, actionable text.
|
|
11
|
+
*/
|
|
12
|
+
interface Props {
|
|
13
|
+
/**
|
|
14
|
+
* Allows to define the status message style.
|
|
15
|
+
*/
|
|
16
|
+
status?: 'info' | 'success' | 'warning' | 'error' | 'neutral' | 'inprogress';
|
|
17
|
+
/**
|
|
18
|
+
* Label of the status message.
|
|
19
|
+
*/
|
|
20
|
+
label: string;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
let { label, status = 'info' }: Props = $props();
|
|
24
|
+
|
|
25
|
+
const iconMap = [
|
|
26
|
+
{ status: 'info', component: InfoCircleFilled24 },
|
|
27
|
+
{ status: 'success', component: CheckCircleFilled24 },
|
|
28
|
+
{ status: 'warning', component: WarningCircleFilled24 },
|
|
29
|
+
{ status: 'error', component: CrossCircleFilled24 },
|
|
30
|
+
{ status: 'neutral', component: InfoCircleFilled24 },
|
|
31
|
+
];
|
|
32
|
+
|
|
33
|
+
function getSelected(status: string) {
|
|
34
|
+
return iconMap.find((icon) => icon.status === status) || iconMap[0];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
let selected = $state(getSelected(status));
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<div class={['mc-status-message', `mc-status-message--${status}`]}>
|
|
41
|
+
{#if status !== 'inprogress'}
|
|
42
|
+
<span class="mc-status-message__icon">
|
|
43
|
+
<selected.component aria-hidden="true" />
|
|
44
|
+
</span>
|
|
45
|
+
{:else}
|
|
46
|
+
<Loader size="s" />
|
|
47
|
+
{/if}
|
|
48
|
+
<p class="mc-status-message__description">{label}</p>
|
|
49
|
+
</div>
|
|
50
|
+
|
|
51
|
+
<style>/**
|
|
52
|
+
* Do not edit directly, this file was auto-generated.
|
|
53
|
+
*/
|
|
54
|
+
.mc-status-message .mc-status-message__icon {
|
|
55
|
+
fill: var(--status-message-color-icon-info, #0b96cc);
|
|
56
|
+
}
|
|
57
|
+
.mc-status-message {
|
|
58
|
+
display: inline-flex;
|
|
59
|
+
gap: 0.25rem;
|
|
60
|
+
align-items: center;
|
|
61
|
+
}
|
|
62
|
+
.mc-status-message__icon {
|
|
63
|
+
width: 1.5rem;
|
|
64
|
+
height: 1.5rem;
|
|
65
|
+
}
|
|
66
|
+
.mc-status-message__description {
|
|
67
|
+
margin: 0;
|
|
68
|
+
font-size: var(--font-size-100, 0.875rem);
|
|
69
|
+
line-height: var(--line-height-s, 1.3);
|
|
70
|
+
font-weight: var(--font-weight-regular, 400);
|
|
71
|
+
color: var(--action-bottom-bar-color-status-item-text, #404040);
|
|
72
|
+
}
|
|
73
|
+
.mc-status-message--success .mc-status-message__icon {
|
|
74
|
+
fill: var(--status-message-color-icon-success, #3f9e10);
|
|
75
|
+
}
|
|
76
|
+
.mc-status-message--error .mc-status-message__icon {
|
|
77
|
+
fill: var(--status-message-color-icon-error, #ea302d);
|
|
78
|
+
}
|
|
79
|
+
.mc-status-message--warning .mc-status-message__icon {
|
|
80
|
+
fill: var(--status-message-color-icon-warning, #ea7315);
|
|
81
|
+
}
|
|
82
|
+
.mc-status-message--neutral .mc-status-message__icon {
|
|
83
|
+
fill: var(--status-message-color-icon-neutral, #808080);
|
|
84
|
+
}</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A Status Message is a compact component that combines an icon and concise text to communicate system states or user feedback in limited interface space. The icon and message work together as a unified structure to provide clear, immediate understanding of the current status. Status Messages are designed for contexts where space is constrained but clear communication is essential, offering quick recognition through color-coded icons paired with brief, actionable text.
|
|
3
|
+
*/
|
|
4
|
+
interface Props {
|
|
5
|
+
/**
|
|
6
|
+
* Allows to define the status message style.
|
|
7
|
+
*/
|
|
8
|
+
status?: 'info' | 'success' | 'warning' | 'error' | 'neutral' | 'inprogress';
|
|
9
|
+
/**
|
|
10
|
+
* Label of the status message.
|
|
11
|
+
*/
|
|
12
|
+
label: string;
|
|
13
|
+
}
|
|
14
|
+
declare const StatusMessage: import("svelte").Component<Props, {}, "">;
|
|
15
|
+
type StatusMessage = ReturnType<typeof StatusMessage>;
|
|
16
|
+
export default StatusMessage;
|
|
17
|
+
//# sourceMappingURL=StatusMessage.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatusMessage.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/statusmessage/StatusMessage.svelte.ts"],"names":[],"mappings":"AASE;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,YAAY,CAAC;IAC7E;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACf;AA2CH,QAAA,MAAM,aAAa,2CAAwC,CAAC;AAC5D,KAAK,aAAa,GAAG,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC;AACtD,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{v as q,c as A,p as B,a as G,b as s,w as H,l as J,f as w,m as K,d as r,s as l,t as L,i as p,j as O,k as b,r as e,e as P,g as Q,h as _}from"../../custom-element.js";import{i as R}from"../../if.js";import{s as T}from"../../slot.js";import{c as U
|
|
1
|
+
import{v as q,c as A,p as B,a as G,b as s,w as H,l as J,f as w,m as K,d as r,s as l,t as L,i as p,j as O,k as b,r as e,e as P,g as Q,h as _}from"../../custom-element.js";import{i as R}from"../../if.js";import{s as T}from"../../slot.js";import{c as U}from"../../svelte-component.js";import{b as V}from"../../this.js";import{I as X,C as Y,W as Z,a as $,b as oo}from"../../Cross20.js";import"../../legacy.js";import"../../attributes.js";var to=w('<button class="mc-status-notification-closable__close mc-button mc-button--s mc-button--icon-button mc-button--ghost svelte-18b6syz" aria-label="Close"><!></button>'),ro=w('<section role="status"><span class="mc-status-notification__icon svelte-18b6syz" aria-hidden="true"><!></span> <div class="mc-status-notification__content svelte-18b6syz"><h2 class="mc-status-notification__title svelte-18b6syz"> </h2> <p class="mc-status-notification__message svelte-18b6syz"> </p> <div class="mc-status-notification__footer svelte-18b6syz"><!></div></div> <!></section>');const eo={hash:"svelte-18b6syz",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
*/.mc-button.svelte-18b6syz {color:var(--button-color-filled-standard-font, #ffffff);background-color:var(--button-color-filled-standard-background, #464e63);}.mc-button.svelte-18b6syz:hover {background-color:var(--button-color-filled-standard-hover-background, #343b4c);}.mc-button.svelte-18b6syz:active {background-color:var(--button-color-filled-standard-active-background, #242938);}.mc-button.svelte-18b6syz: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-18b6syz {font-weight:var(--font-weight-semi-bold, 600);padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button.svelte-18b6syz {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-18b6syz {font-size:var(--font-size-150, 1rem);}.mc-button__icon.svelte-18b6syz {flex-shrink:0;width:1.5rem;height:1.5rem;}.mc-button.svelte-18b6syz: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-18b6syz: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-18b6syz {padding:0 calc(0.75rem - 0.125rem);min-height:2rem;min-width:2rem;}.mc-button--m.svelte-18b6syz {padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button--l.svelte-18b6syz {padding:0 calc(1.25rem - 0.125rem);min-height:4rem;min-width:4rem;}.mc-button--icon-only.svelte-18b6syz {padding:0.25rem;}.mc-button--outlined.svelte-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.svelte-18b6syz:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.svelte-18b6syz:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.svelte-18b6syz: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-18b6syz {color:var(--button-color-filled-accent-font, #ffffff);background-color:var(--button-color-filled-accent-background, #117f03);}.mc-button--accent.svelte-18b6syz:hover {background-color:var(--button-color-filled-accent-hover-background, #006902);}.mc-button--accent.svelte-18b6syz:active {background-color:var(--button-color-filled-accent-active-background, #035010);}.mc-button--accent.svelte-18b6syz: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-18b6syz {color:var(--button-color-filled-danger-font, #ffffff);background-color:var(--button-color-filled-danger-background, #c61112);}.mc-button--danger.svelte-18b6syz:hover {background-color:var(--button-color-filled-danger-hover-background, #8c0003);}.mc-button--danger.svelte-18b6syz:active {background-color:var(--button-color-filled-danger-active-background, #530000);}.mc-button--danger.svelte-18b6syz: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-18b6syz {--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-18b6syz:hover {background-color:var(--button-color-filled-inverse-hover-background, #e6e6e6);}.mc-button--inverse.svelte-18b6syz:active {background-color:var(--button-color-filled-inverse-active-background, #cccccc);}.mc-button--inverse.svelte-18b6syz: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-18b6syz {border-radius:var(--radius-full, 100%);padding:0;}.mc-button--outlined.mc-button--standard.svelte-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.mc-button--standard.svelte-18b6syz:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.mc-button--standard.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-accent-hover-background, #ebf5de);}.mc-button--outlined.mc-button--accent.svelte-18b6syz:active {background-color:var(--button-color-outlined-accent-active-background, #c5e39e);}.mc-button--outlined.mc-button--accent.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-danger-hover-background, #fdeaea);}.mc-button--outlined.mc-button--danger.svelte-18b6syz:active {background-color:var(--button-color-outlined-danger-active-background, #f8bcbb);}.mc-button--outlined.mc-button--danger.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--outlined.mc-button--inverse.svelte-18b6syz:active {background-color:var(--button-color-outlined-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--outlined.mc-button--inverse.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.mc-button--standard.svelte-18b6syz:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.mc-button--standard.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-accent-hover-background, rgba(17, 127, 3, 0.1));}.mc-button--ghost.mc-button--accent.svelte-18b6syz:active {background-color:var(--button-color-ghost-accent-active-background, rgba(17, 127, 3, 0.2));}.mc-button--ghost.mc-button--accent.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-danger-hover-background, rgba(198, 17, 18, 0.1));}.mc-button--ghost.mc-button--danger.svelte-18b6syz:active {background-color:var(--button-color-ghost-danger-active-background, rgba(198, 17, 18, 0.2));}.mc-button--ghost.mc-button--danger.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--ghost.mc-button--inverse.svelte-18b6syz:active {background-color:var(--button-color-ghost-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--ghost.mc-button--inverse.svelte-18b6syz:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-status-notification.svelte-18b6syz {border-radius:var(--radius-m, 0.5rem);background:var(--status-notification-color-background-information, #e1f3f9);box-shadow:inset 0 0 0 var(--border-s, 1px) var(--status-notification-color-border-information, #3facd7);display:flex;flex-flow:row wrap;align-items:flex-start;position:relative;box-sizing:border-box;color:var(--status-notification-color-text, #000000);}.mc-status-notification__icon.svelte-18b6syz {width:2rem;height:2rem;margin:0.75rem;fill:var(--status-notification-color-icon-information, #0b96cc);}.mc-status-notification__content.svelte-18b6syz {flex:1 1 0;padding:0.75rem 1rem 0.75rem 0;}.mc-status-notification__title.svelte-18b6syz, .mc-status-notification__message.svelte-18b6syz {line-height:var(--line-height-s, 1.3);margin-block:0;}.mc-status-notification__title.svelte-18b6syz {font-weight:var(--font-weight-semi-bold, 600);font-size:var(--font-size-150, 1rem);margin-block-end:0.25rem;}.mc-status-notification__message.svelte-18b6syz {font-size:var(--font-size-100, 0.875rem);}.mc-status-notification__footer.svelte-18b6syz {align-items:flex-start;display:flex;flex-flow:row wrap;gap:0.5rem;margin-top:0.75rem;margin-bottom:0.5rem;}.mc-status-notification--information.svelte-18b6syz {background:var(--status-notification-color-background-information, #e1f3f9);box-shadow:inset 0 0 0 var(--border-s, 1px) var(--status-notification-color-border-information, #3facd7);}.mc-status-notification--information.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-information, #0b96cc);}.mc-status-notification--success.svelte-18b6syz {background:var(--status-notification-color-background-success, #ebf5de);box-shadow:inset 0 0 0 var(--border-s, 1px) var(--status-notification-color-border-success, #78be20);}.mc-status-notification--success.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-success, #3f9e10);}.mc-status-notification--warning.svelte-18b6syz {background:var(--status-notification-color-background-warning, #fdf1e8);box-shadow:inset 0 0 0 var(--border-s, 1px) var(--status-notification-color-border-warning, #ef934a);}.mc-status-notification--warning.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-warning, #ea7315);}.mc-status-notification--error.svelte-18b6syz {background:var(--status-notification-color-background-error, #fdeaea);box-shadow:inset 0 0 0 var(--border-s, 1px) var(--status-notification-color-border-error, #ef5f5c);}.mc-status-notification--error.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-error, #ea302d);}.mc-status-notification-closable__close.svelte-18b6syz {margin:0.25rem;}.mc-status-notification__footer.svelte-18b6syz:empty {display:none;}`};function no(h,n){B(n,!0),G(h,eo);let d=s(n,"title",7),i=s(n,"description",7),c=s(n,"status",7,"info"),u=s(n,"closable",7),v;const y=[{status:"info",component:V},{status:"success",component:X},{status:"warning",component:Y},{status:"error",component:Z}];function x(o){return y.find(t=>t.status===o)||y[0]}let C=H(J(x(c())));const F=()=>{const o=new CustomEvent("close",{bubbles:!0,composed:!0});v.dispatchEvent(o)};var E={get title(){return d()},set title(o){d(o),b()},get description(){return i()},set description(o){i(o),b()},get status(){return c()},set status(o="info"){c(o),b()},get closable(){return u()},set closable(o){u(o),b()}},a=ro(),f=r(a),S=r(f);U(S,()=>K(C).component,(o,t)=>{t(o,{class:"mc-status-notification__icon","aria-hidden":"true"})}),e(f);var g=l(f,2),m=r(g),j=r(m,!0);e(m);var k=l(m,2),I=r(k,!0);e(k);var z=l(k,2),W=r(z);T(W,n,"footer",{}),e(z),e(g);var D=l(g,2);{var M=o=>{var t=to();t.__click=F;var N=r(t);$(N,{class:"mc-status-notification-closable__icon","aria-hidden":"true"}),e(t),p(o,t)};R(D,o=>{u()&&o(M)})}return e(a),oo(a,o=>v=o,()=>v),L(()=>{P(a,1,Q(["mc-status-notification",`mc-status-notification--${c()}`]),"svelte-18b6syz"),_(j,d()),_(I,i())}),p(h,a),O(E)}q(["click"]);customElements.define("m-status-notification",A(no,{title:{},description:{},status:{},closable:{}},["footer"],[],!0));
|
|
3
|
+
*/.mc-button.svelte-18b6syz {color:var(--button-color-filled-standard-font, #ffffff);background-color:var(--button-color-filled-standard-background, #464e63);}.mc-button.svelte-18b6syz:hover {background-color:var(--button-color-filled-standard-hover-background, #343b4c);}.mc-button.svelte-18b6syz:active {background-color:var(--button-color-filled-standard-active-background, #242938);}.mc-button.svelte-18b6syz: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-18b6syz {font-weight:var(--font-weight-semi-bold, 600);padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button.svelte-18b6syz {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-18b6syz {font-size:var(--font-size-150, 1rem);}.mc-button__icon.svelte-18b6syz {flex-shrink:0;width:1.5rem;height:1.5rem;}.mc-button.svelte-18b6syz: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-18b6syz: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-18b6syz {padding:0 calc(0.75rem - 0.125rem);min-height:2rem;min-width:2rem;}.mc-button--m.svelte-18b6syz {padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button--l.svelte-18b6syz {padding:0 calc(1.25rem - 0.125rem);min-height:4rem;min-width:4rem;}.mc-button--icon-only.svelte-18b6syz {padding:0.25rem;}.mc-button--outlined.svelte-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.svelte-18b6syz:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.svelte-18b6syz:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.svelte-18b6syz: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-18b6syz {color:var(--button-color-filled-accent-font, #ffffff);background-color:var(--button-color-filled-accent-background, #117f03);}.mc-button--accent.svelte-18b6syz:hover {background-color:var(--button-color-filled-accent-hover-background, #006902);}.mc-button--accent.svelte-18b6syz:active {background-color:var(--button-color-filled-accent-active-background, #035010);}.mc-button--accent.svelte-18b6syz: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-18b6syz {color:var(--button-color-filled-danger-font, #ffffff);background-color:var(--button-color-filled-danger-background, #c61112);}.mc-button--danger.svelte-18b6syz:hover {background-color:var(--button-color-filled-danger-hover-background, #8c0003);}.mc-button--danger.svelte-18b6syz:active {background-color:var(--button-color-filled-danger-active-background, #530000);}.mc-button--danger.svelte-18b6syz: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-18b6syz {--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-18b6syz:hover {background-color:var(--button-color-filled-inverse-hover-background, #e6e6e6);}.mc-button--inverse.svelte-18b6syz:active {background-color:var(--button-color-filled-inverse-active-background, #cccccc);}.mc-button--inverse.svelte-18b6syz: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-18b6syz {border-radius:var(--border-radius-full, 100%);padding:0;}.mc-button--outlined.mc-button--standard.svelte-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-standard-hover-background, #eff1f6);}.mc-button--outlined.mc-button--standard.svelte-18b6syz:active {background-color:var(--button-color-outlined-standard-active-background, #c9d0de);}.mc-button--outlined.mc-button--standard.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-accent-hover-background, #ebf5de);}.mc-button--outlined.mc-button--accent.svelte-18b6syz:active {background-color:var(--button-color-outlined-accent-active-background, #c5e39e);}.mc-button--outlined.mc-button--accent.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-danger-hover-background, #fdeaea);}.mc-button--outlined.mc-button--danger.svelte-18b6syz:active {background-color:var(--button-color-outlined-danger-active-background, #f8bcbb);}.mc-button--outlined.mc-button--danger.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-outlined-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--outlined.mc-button--inverse.svelte-18b6syz:active {background-color:var(--button-color-outlined-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--outlined.mc-button--inverse.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-standard-hover-background, rgba(70, 78, 99, 0.1));}.mc-button--ghost.mc-button--standard.svelte-18b6syz:active {background-color:var(--button-color-ghost-standard-active-background, rgba(70, 78, 99, 0.2));}.mc-button--ghost.mc-button--standard.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-accent-hover-background, rgba(17, 127, 3, 0.1));}.mc-button--ghost.mc-button--accent.svelte-18b6syz:active {background-color:var(--button-color-ghost-accent-active-background, rgba(17, 127, 3, 0.2));}.mc-button--ghost.mc-button--accent.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-danger-hover-background, rgba(198, 17, 18, 0.1));}.mc-button--ghost.mc-button--danger.svelte-18b6syz:active {background-color:var(--button-color-ghost-danger-active-background, rgba(198, 17, 18, 0.2));}.mc-button--ghost.mc-button--danger.svelte-18b6syz: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-18b6syz {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-18b6syz:hover {background-color:var(--button-color-ghost-inverse-hover-background, rgba(255, 255, 255, 0.1));}.mc-button--ghost.mc-button--inverse.svelte-18b6syz:active {background-color:var(--button-color-ghost-inverse-active-background, rgba(255, 255, 255, 0.2));}.mc-button--ghost.mc-button--inverse.svelte-18b6syz:disabled {background-color:var(--button-state-disabled-background, #d9d9d9);border-color:transparent;color:var(--button-state-disabled-color, #737373);cursor:not-allowed;}.mc-status-notification.svelte-18b6syz {border-radius:var(--border-radius-m, 0.5rem);background:var(--status-notification-color-background-info, #e1f3f9);box-shadow:inset 0 0 0 var(--border-width-s, 0.0625rem) var(--status-notification-color-border-info, #3facd7);display:flex;flex-flow:row wrap;align-items:flex-start;position:relative;box-sizing:border-box;color:var(--status-notification-color-text, #000000);}.mc-status-notification__icon.svelte-18b6syz {width:2rem;height:2rem;margin:0.75rem;fill:var(--status-notification-color-icon-info, #0b96cc);}.mc-status-notification__content.svelte-18b6syz {flex:1 1 0;padding:0.75rem 1rem 0.75rem 0;}.mc-status-notification__title.svelte-18b6syz, .mc-status-notification__message.svelte-18b6syz {line-height:var(--line-height-s, 1.3);margin-block:0;}.mc-status-notification__title.svelte-18b6syz {font-weight:var(--font-weight-semi-bold, 600);font-size:var(--font-size-150, 1rem);margin-block-end:0.25rem;}.mc-status-notification__message.svelte-18b6syz {font-size:var(--font-size-100, 0.875rem);}.mc-status-notification__footer.svelte-18b6syz {align-items:flex-start;display:flex;flex-flow:row wrap;gap:0.5rem;margin-top:0.75rem;margin-bottom:0.5rem;}.mc-status-notification--information.svelte-18b6syz {background:var(--status-notification-color-background-info, #e1f3f9);box-shadow:inset 0 0 0 var(--border-width-s, 0.0625rem) var(--status-notification-color-border-info, #3facd7);}.mc-status-notification--information.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-info, #0b96cc);}.mc-status-notification--success.svelte-18b6syz {background:var(--status-notification-color-background-success, #ebf5de);box-shadow:inset 0 0 0 var(--border-width-s, 0.0625rem) var(--status-notification-color-border-success, #78be20);}.mc-status-notification--success.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-success, #3f9e10);}.mc-status-notification--warning.svelte-18b6syz {background:var(--status-notification-color-background-warning, #fdf1e8);box-shadow:inset 0 0 0 var(--border-width-s, 0.0625rem) var(--status-notification-color-border-warning, #ef934a);}.mc-status-notification--warning.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-warning, #ea7315);}.mc-status-notification--error.svelte-18b6syz {background:var(--status-notification-color-background-error, #fdeaea);box-shadow:inset 0 0 0 var(--border-width-s, 0.0625rem) var(--status-notification-color-border-error, #ef5f5c);}.mc-status-notification--error.svelte-18b6syz .mc-status-notification__icon:where(.svelte-18b6syz) {fill:var(--status-notification-color-icon-error, #ea302d);}.mc-status-notification-closable__close.svelte-18b6syz {margin:0.25rem;}.mc-status-notification__footer.svelte-18b6syz:empty {display:none;}`};function no(h,n){B(n,!0),G(h,eo);let d=s(n,"title",7),i=s(n,"description",7),c=s(n,"status",7,"info"),u=s(n,"closable",7),v;const y=[{status:"info",component:X},{status:"success",component:Y},{status:"warning",component:Z},{status:"error",component:$}];function x(o){return y.find(t=>t.status===o)||y[0]}let C=H(J(x(c())));const F=()=>{const o=new CustomEvent("close",{bubbles:!0,composed:!0});v.dispatchEvent(o)};var E={get title(){return d()},set title(o){d(o),b()},get description(){return i()},set description(o){i(o),b()},get status(){return c()},set status(o="info"){c(o),b()},get closable(){return u()},set closable(o){u(o),b()}},a=ro(),f=r(a),S=r(f);U(S,()=>K(C).component,(o,t)=>{t(o,{class:"mc-status-notification__icon","aria-hidden":"true"})}),e(f);var g=l(f,2),m=r(g),j=r(m,!0);e(m);var k=l(m,2),I=r(k,!0);e(k);var z=l(k,2),W=r(z);T(W,n,"footer",{}),e(z),e(g);var D=l(g,2);{var M=o=>{var t=to();t.__click=F;var N=r(t);oo(N,{class:"mc-status-notification-closable__icon","aria-hidden":"true"}),e(t),p(o,t)};R(D,o=>{u()&&o(M)})}return e(a),V(a,o=>v=o,()=>v),L(()=>{P(a,1,Q(["mc-status-notification",`mc-status-notification--${c()}`]),"svelte-18b6syz"),_(j,d()),_(I,i())}),p(h,a),O(E)}q(["click"]);customElements.define("m-status-notification",A(no,{title:{},description:{},status:{},closable:{}},["footer"],[],!0));
|
|
4
4
|
//# sourceMappingURL=StatusNotification.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusNotification.js","sources":["../../../src/components/statusnotification/StatusNotification.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-notification' }} />\n\n<script lang=\"ts\">\n import Cross20 from '@mozaic-ds/icons-svelte/svelte/Cross20/Cross20.svelte';\n import InfoCircle32 from '@mozaic-ds/icons-svelte/svelte/InfoCircleFilled32/InfoCircleFilled32.svelte';\n import WarningCircle32 from '@mozaic-ds/icons-svelte/svelte/WarningCircleFilled32/WarningCircleFilled32.svelte';\n import CrossCircle32 from '@mozaic-ds/icons-svelte/svelte/CrossCircleFilled32/CrossCircleFilled32.svelte';\n import CheckCircle32 from '@mozaic-ds/icons-svelte/svelte/CheckCircleFilled32/CheckCircleFilled32.svelte';\n /**\n * A Status Notification is used to draw the user’s attention to important information that needs to be acknowledged. It often provides feedback on a process, highlights a status update, or alerts users about an issue. Notifications are typically triggered by user actions or system events and are designed to be easily noticeable while maintaining a non-intrusive experience.\n *\n * @slot footer - Use this slot to insert a button or a link in the footer\n * @event close {CustomEvent<void>} - Emits when closing the notification.\n */\n interface Props {\n /**\n * Title of the status notification.\n */\n title: string;\n /**\n * Description of the status notification.\n */\n description: string;\n /**\n * Allows to define the status notification type.\n */\n status?: 'info' | 'success' | 'warning' | 'error';\n /**\n * if `true`, display the close button.\n */\n closable?: boolean;\n }\n\n let { title, description, status = 'info', closable }: Props = $props();\n let element: HTMLElement;\n\n const iconMap = [\n { status: 'info', component: InfoCircle32 },\n { status: 'success', component: CheckCircle32 },\n { status: 'warning', component: WarningCircle32 },\n { status: 'error', component: CrossCircle32 },\n ];\n\n function getSelected(status: string) {\n return iconMap.find((icon) => icon.status === status) || iconMap[0];\n }\n\n let selected = $state(getSelected(status));\n\n const onClose = () => {\n const event = new CustomEvent('close', {\n bubbles: true,\n composed: true,\n });\n element.dispatchEvent(event);\n };\n</script>\n\n<section\n class={['mc-status-notification', `mc-status-notification--${status}`]}\n role=\"status\"\n bind:this={element}\n>\n <span class=\"mc-status-notification__icon\" aria-hidden=\"true\">\n <selected.component class=\"mc-status-notification__icon\" aria-hidden=\"true\" />\n </span>\n\n <div class=\"mc-status-notification__content\">\n <h2 class=\"mc-status-notification__title\">{title}</h2>\n <p class=\"mc-status-notification__message\">\n {description}\n </p>\n\n <div class=\"mc-status-notification__footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n\n {#if closable}\n <button\n class=\"mc-status-notification-closable__close mc-button mc-button--s mc-button--icon-button mc-button--ghost\"\n aria-label=\"Close\"\n onclick={onClose}\n >\n <Cross20 class=\"mc-status-notification-closable__icon\" aria-hidden=\"true\" />\n </button>\n {/if}\n</section>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/button';\n @use '@mozaic-ds/styles/components/status-notification';\n\n .mc-status-notification__footer:empty {\n display: none;\n }\n</style>\n"],"names":["title","$.prop","$$props","description","status","closable","element","iconMap","InfoCircle32","CheckCircle32","WarningCircle32","CrossCircle32","getSelected","icon","selected","$.state","$.proxy","onClose","event","$$render","consequent","$.bind_this","section","$$value"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"StatusNotification.js","sources":["../../../src/components/statusnotification/StatusNotification.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-status-notification' }} />\n\n<script lang=\"ts\">\n import Cross20 from '@mozaic-ds/icons-svelte/svelte/Cross20/Cross20.svelte';\n import InfoCircle32 from '@mozaic-ds/icons-svelte/svelte/InfoCircleFilled32/InfoCircleFilled32.svelte';\n import WarningCircle32 from '@mozaic-ds/icons-svelte/svelte/WarningCircleFilled32/WarningCircleFilled32.svelte';\n import CrossCircle32 from '@mozaic-ds/icons-svelte/svelte/CrossCircleFilled32/CrossCircleFilled32.svelte';\n import CheckCircle32 from '@mozaic-ds/icons-svelte/svelte/CheckCircleFilled32/CheckCircleFilled32.svelte';\n /**\n * A Status Notification is used to draw the user’s attention to important information that needs to be acknowledged. It often provides feedback on a process, highlights a status update, or alerts users about an issue. Notifications are typically triggered by user actions or system events and are designed to be easily noticeable while maintaining a non-intrusive experience.\n *\n * @slot footer - Use this slot to insert a button or a link in the footer\n * @event close {CustomEvent<void>} - Emits when closing the notification.\n */\n interface Props {\n /**\n * Title of the status notification.\n */\n title: string;\n /**\n * Description of the status notification.\n */\n description: string;\n /**\n * Allows to define the status notification type.\n */\n status?: 'info' | 'success' | 'warning' | 'error';\n /**\n * if `true`, display the close button.\n */\n closable?: boolean;\n }\n\n let { title, description, status = 'info', closable }: Props = $props();\n let element: HTMLElement;\n\n const iconMap = [\n { status: 'info', component: InfoCircle32 },\n { status: 'success', component: CheckCircle32 },\n { status: 'warning', component: WarningCircle32 },\n { status: 'error', component: CrossCircle32 },\n ];\n\n function getSelected(status: string) {\n return iconMap.find((icon) => icon.status === status) || iconMap[0];\n }\n\n let selected = $state(getSelected(status));\n\n const onClose = () => {\n const event = new CustomEvent('close', {\n bubbles: true,\n composed: true,\n });\n element.dispatchEvent(event);\n };\n</script>\n\n<section\n class={['mc-status-notification', `mc-status-notification--${status}`]}\n role=\"status\"\n bind:this={element}\n>\n <span class=\"mc-status-notification__icon\" aria-hidden=\"true\">\n <selected.component class=\"mc-status-notification__icon\" aria-hidden=\"true\" />\n </span>\n\n <div class=\"mc-status-notification__content\">\n <h2 class=\"mc-status-notification__title\">{title}</h2>\n <p class=\"mc-status-notification__message\">\n {description}\n </p>\n\n <div class=\"mc-status-notification__footer\">\n <slot name=\"footer\" />\n </div>\n </div>\n\n {#if closable}\n <button\n class=\"mc-status-notification-closable__close mc-button mc-button--s mc-button--icon-button mc-button--ghost\"\n aria-label=\"Close\"\n onclick={onClose}\n >\n <Cross20 class=\"mc-status-notification-closable__icon\" aria-hidden=\"true\" />\n </button>\n {/if}\n</section>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/button';\n @use '@mozaic-ds/styles/components/status-notification';\n\n .mc-status-notification__footer:empty {\n display: none;\n }\n</style>\n"],"names":["title","$.prop","$$props","description","status","closable","element","iconMap","InfoCircle32","CheckCircle32","WarningCircle32","CrossCircle32","getSelected","icon","selected","$.state","$.proxy","onClose","event","$$render","consequent","$.bind_this","section","$$value"],"mappings":";;ijcAAA,qBAiCQA,EAAKC,EAAAC,EAAA,QAAA,CAAA,EAAEC,EAAWF,EAAAC,EAAA,cAAA,CAAA,EAAEE,iBAAS,MAAM,EAAEC,EAAQJ,EAAAC,EAAA,WAAA,CAAA,EAC/CI,QAEEC,EAAO,CACT,CAAA,OAAQ,OAAQ,UAAWC,CAAY,EACvC,CAAA,OAAQ,UAAW,UAAWC,CAAa,EAC3C,CAAA,OAAQ,UAAW,UAAWC,CAAe,EAC7C,CAAA,OAAQ,QAAS,UAAWC,CAAa,YAGpCC,EAAYR,EAAgB,CAC5B,OAAAG,EAAQ,KAAMM,GAASA,EAAK,SAAWT,CAAM,GAAKG,EAAQ,CAAC,CACpE,KAEIO,EAAQC,EAAAC,EAAUJ,EAAYR,EAAM,CAAA,CAAA,CAAA,EAElC,MAAAa,EAAO,IAAS,OACdC,EAAK,IAAO,YAAY,QAAO,CACnC,QAAS,GACT,SAAU,GAAI,EAEhBZ,EAAQ,cAAcY,CAAK,CAC7B,yJAtBmC,OAAM,0VAiD5BD,6GAJRZ,EAAQ,GAAAc,EAAAC,CAAA,gBAjBFC,EAAAC,EAAAC,GAAAjB,QAAAA,CAAO,kBAFV,oDAAqDF,GAAM,2BAStBJ,GAAK,MAE7CG,GAAW,eAdlB"}
|