@mozaic-ds/web-components 1.0.0-beta.4 → 1.0.0-beta.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Cross20.js +2 -0
- package/dist/Cross20.js.map +1 -0
- package/dist/Cross24.js +1 -1
- package/dist/CrossCircleFilled24.js +1 -1
- package/dist/attributes.js +1 -1
- package/dist/bundle.d.ts +43 -0
- package/dist/bundle.d.ts.map +1 -0
- package/dist/bundle.js +4 -2
- package/dist/components/avatar/Avatar.js +7 -0
- package/dist/components/avatar/Avatar.js.map +1 -0
- package/dist/components/avatar/Avatar.stories.d.ts +9 -0
- package/dist/components/avatar/Avatar.stories.d.ts.map +1 -0
- package/dist/components/avatar/Avatar.stories.js +67 -0
- package/dist/components/avatar/Avatar.svelte +63 -0
- package/dist/components/avatar/Avatar.svelte.d.ts +37 -0
- package/dist/components/avatar/Avatar.svelte.d.ts.map +1 -0
- package/dist/components/breadcrumb/Breadcrumb.js +9 -6
- package/dist/components/breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.stories.d.ts +6 -5
- package/dist/components/breadcrumb/Breadcrumb.stories.d.ts.map +1 -1
- package/dist/components/breadcrumb/Breadcrumb.stories.js +55 -58
- package/dist/components/breadcrumb/Breadcrumb.svelte +45 -29
- package/dist/components/breadcrumb/Breadcrumb.svelte.d.ts +24 -7
- package/dist/components/breadcrumb/Breadcrumb.svelte.d.ts.map +1 -1
- package/dist/components/button/Button.js +6 -3
- package/dist/components/button/Button.js.map +1 -1
- package/dist/components/button/Button.stories.d.ts.map +1 -1
- package/dist/components/button/Button.stories.js +1 -0
- package/dist/components/button/Button.svelte +105 -102
- package/dist/components/callout/Callout.js +10 -0
- package/dist/components/callout/Callout.js.map +1 -0
- package/dist/components/callout/Callout.stories.d.ts +18 -0
- package/dist/components/callout/Callout.stories.d.ts.map +1 -0
- package/dist/components/callout/Callout.stories.js +122 -0
- package/dist/components/callout/Callout.svelte +112 -0
- package/dist/components/callout/Callout.svelte.d.ts +49 -0
- package/dist/components/callout/Callout.svelte.d.ts.map +1 -0
- package/dist/components/checkbox/Checkbox.js +6 -3
- package/dist/components/checkbox/Checkbox.js.map +1 -1
- package/dist/components/checkbox/Checkbox.svelte +39 -33
- package/dist/components/checkboxgroup/CheckboxGroup.js +7 -4
- package/dist/components/checkboxgroup/CheckboxGroup.js.map +1 -1
- package/dist/components/checkboxgroup/CheckboxGroup.svelte +39 -33
- package/dist/components/circularprogressbar/CircularProgressbar.js +7 -4
- package/dist/components/circularprogressbar/CircularProgressbar.js.map +1 -1
- package/dist/components/circularprogressbar/CircularProgressbar.svelte +17 -14
- package/dist/components/datepicker/Datepicker.js +6 -3
- package/dist/components/datepicker/Datepicker.js.map +1 -1
- package/dist/components/datepicker/Datepicker.svelte +50 -47
- package/dist/components/drawer/Drawer.js +15 -12
- package/dist/components/drawer/Drawer.js.map +1 -1
- package/dist/components/drawer/Drawer.svelte +113 -110
- package/dist/components/field/Field.js +6 -3
- package/dist/components/field/Field.js.map +1 -1
- package/dist/components/field/Field.svelte +18 -15
- package/dist/components/flag/Flag.js +5 -2
- package/dist/components/flag/Flag.js.map +1 -1
- package/dist/components/flag/Flag.svelte +15 -12
- package/dist/components/iconbutton/IconButton.js +5 -2
- package/dist/components/iconbutton/IconButton.js.map +1 -1
- package/dist/components/iconbutton/IconButton.svelte +105 -102
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js +5 -2
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.js.map +1 -1
- package/dist/components/linearprogressbarbuffer/LinearProgressbarBuffer.svelte +7 -3
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.js +5 -3
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.js.map +1 -1
- package/dist/components/linearprogressbarpercentage/LinearProgressbarPercentage.svelte +24 -12
- package/dist/components/link/Link.js +5 -2
- package/dist/components/link/Link.js.map +1 -1
- package/dist/components/link/Link.svelte +12 -9
- package/dist/components/loader/Loader.js +10 -7
- package/dist/components/loader/Loader.js.map +1 -1
- package/dist/components/loader/Loader.svelte +7 -4
- package/dist/components/modal/Modal.js +17 -14
- package/dist/components/modal/Modal.js.map +1 -1
- package/dist/components/modal/Modal.stories.d.ts.map +1 -1
- package/dist/components/modal/Modal.stories.js +1 -0
- package/dist/components/modal/Modal.svelte +115 -111
- package/dist/components/numberbadge/NumberBadge.js +5 -2
- package/dist/components/numberbadge/NumberBadge.js.map +1 -1
- package/dist/components/numberbadge/NumberBadge.svelte +15 -12
- package/dist/components/overlay/Overlay.js +5 -2
- package/dist/components/overlay/Overlay.js.map +1 -1
- package/dist/components/overlay/Overlay.svelte +5 -2
- package/dist/components/overlayloader/OverlayLoader.js +7 -4
- package/dist/components/overlayloader/OverlayLoader.js.map +1 -1
- package/dist/components/overlayloader/OverlayLoader.svelte +9 -6
- package/dist/components/pagination/Pagination.js +11 -8
- package/dist/components/pagination/Pagination.js.map +1 -1
- package/dist/components/pagination/Pagination.svelte +23 -20
- package/dist/components/passwordinput/PasswordInput.js +8 -5
- package/dist/components/passwordinput/PasswordInput.js.map +1 -1
- package/dist/components/passwordinput/PasswordInput.svelte +32 -29
- package/dist/components/pincode/Pincode.js +7 -4
- package/dist/components/pincode/Pincode.js.map +1 -1
- package/dist/components/pincode/Pincode.svelte +19 -16
- package/dist/components/quantityselector/QuantitySelector.js +6 -3
- package/dist/components/quantityselector/QuantitySelector.js.map +1 -1
- package/dist/components/quantityselector/QuantitySelector.svelte +28 -25
- package/dist/components/radio/Radio.js +5 -2
- package/dist/components/radio/Radio.js.map +1 -1
- package/dist/components/radio/Radio.svelte +19 -16
- package/dist/components/radiogroup/RadioGroup.js +7 -4
- package/dist/components/radiogroup/RadioGroup.js.map +1 -1
- package/dist/components/radiogroup/RadioGroup.svelte +34 -31
- package/dist/components/select/Select.js +6 -3
- package/dist/components/select/Select.js.map +1 -1
- package/dist/components/select/Select.svelte +23 -20
- package/dist/components/statusbadge/StatusBadge.js +5 -2
- package/dist/components/statusbadge/StatusBadge.js.map +1 -1
- package/dist/components/statusbadge/StatusBadge.svelte +23 -20
- package/dist/components/statusdot/StatusDot.js +5 -2
- package/dist/components/statusdot/StatusDot.js.map +1 -1
- package/dist/components/statusdot/StatusDot.stories.d.ts +10 -13
- package/dist/components/statusdot/StatusDot.stories.d.ts.map +1 -1
- package/dist/components/statusdot/StatusDot.stories.js +49 -43
- package/dist/components/statusdot/StatusDot.svelte +22 -12
- package/dist/components/statusdot/StatusDot.svelte.d.ts +11 -3
- package/dist/components/statusdot/StatusDot.svelte.d.ts.map +1 -1
- package/dist/components/statusdot/StatusDot.types.d.ts +1 -1
- package/dist/components/statusdot/StatusDot.types.d.ts.map +1 -1
- package/dist/components/statusnotification/StatusNotification.js +6 -2
- package/dist/components/statusnotification/StatusNotification.js.map +1 -1
- package/dist/components/statusnotification/StatusNotification.svelte +364 -49
- package/dist/components/statusnotification/StatusNotification.svelte.d.ts.map +1 -1
- package/dist/components/tabs/Tab.js +5 -2
- package/dist/components/tabs/Tab.js.map +1 -1
- package/dist/components/tabs/Tab.svelte +14 -11
- package/dist/components/tabs/Tabs.js +5 -2
- package/dist/components/tabs/Tabs.js.map +1 -1
- package/dist/components/tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/tabs/Tabs.stories.js +1 -0
- package/dist/components/tabs/Tabs.svelte +22 -19
- package/dist/components/tags/Tag.js +5 -2
- package/dist/components/tags/Tag.js.map +1 -1
- package/dist/components/tags/Tag.svelte +38 -35
- package/dist/components/tags/TagContextualised.js +5 -2
- package/dist/components/tags/TagContextualised.js.map +1 -1
- package/dist/components/tags/TagContextualised.svelte +38 -35
- package/dist/components/tags/TagInteractive.js +5 -2
- package/dist/components/tags/TagInteractive.js.map +1 -1
- package/dist/components/tags/TagInteractive.svelte +38 -35
- package/dist/components/tags/TagRemovable.js +5 -2
- package/dist/components/tags/TagRemovable.js.map +1 -1
- package/dist/components/tags/TagRemovable.svelte +38 -35
- package/dist/components/tags/TagSelectable.js +5 -2
- package/dist/components/tags/TagSelectable.js.map +1 -1
- package/dist/components/tags/TagSelectable.svelte +38 -35
- package/dist/components/textarea/Textarea.js +6 -3
- package/dist/components/textarea/Textarea.js.map +1 -1
- package/dist/components/textarea/Textarea.svelte +35 -32
- package/dist/components/textinput/Textinput.js +8 -5
- package/dist/components/textinput/Textinput.js.map +1 -1
- package/dist/components/textinput/Textinput.svelte +32 -29
- package/dist/components/toaster/Toaster.js +13 -0
- package/dist/components/toaster/Toaster.js.map +1 -0
- package/dist/components/toaster/Toaster.stories.d.ts +20 -0
- package/dist/components/toaster/Toaster.stories.d.ts.map +1 -0
- package/dist/components/toaster/Toaster.stories.js +156 -0
- package/dist/components/toaster/Toaster.svelte +640 -0
- package/dist/components/toaster/Toaster.svelte.d.ts +54 -0
- package/dist/components/toaster/Toaster.svelte.d.ts.map +1 -0
- package/dist/components/toggle/Toggle.js +5 -2
- package/dist/components/toggle/Toggle.js.map +1 -1
- package/dist/components/toggle/Toggle.svelte +24 -21
- package/dist/components/togglegroup/ToggleGroup.js +6 -3
- package/dist/components/togglegroup/ToggleGroup.js.map +1 -1
- package/dist/components/togglegroup/ToggleGroup.svelte +39 -36
- package/dist/components/tooltip/Tooltip.js +7 -4
- package/dist/components/tooltip/Tooltip.js.map +1 -1
- package/dist/components/tooltip/Tooltip.svelte +11 -8
- package/dist/custom-element.js +3 -3
- package/dist/custom-element.js.map +1 -1
- package/dist/each.js +1 -1
- package/dist/each.js.map +1 -1
- package/dist/if.js +1 -1
- package/dist/if.js.map +1 -1
- package/dist/index-client.js +2 -0
- package/dist/index-client.js.map +1 -0
- package/dist/input.js +1 -1
- package/dist/input.js.map +1 -1
- package/dist/legacy.js +1 -1
- package/dist/main.d.ts +7 -4
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +7 -4
- package/dist/slot.js +1 -1
- package/dist/snippet.js +1 -1
- package/package.json +9 -11
- package/dist/icons-storybook.js +0 -88
|
@@ -1,25 +1,38 @@
|
|
|
1
1
|
<svelte:options
|
|
2
2
|
customElement={{
|
|
3
|
-
tag: 'm-breadcrumb'
|
|
4
|
-
props: {
|
|
5
|
-
options: { reflect: true, type: 'Array', attribute: 'links' },
|
|
6
|
-
},
|
|
3
|
+
tag: 'm-breadcrumb'
|
|
7
4
|
}}
|
|
8
5
|
/>
|
|
9
6
|
|
|
10
7
|
<script lang="ts">
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
target: '_blank' | '_self' | '_parent' | '_top' | undefined;
|
|
15
|
-
}
|
|
16
|
-
|
|
8
|
+
/**
|
|
9
|
+
* A breadcrumb is a navigation help that displays the hierarchical path of the current page within a website or application. It helps users understand their location and allows them to navigate back to previous levels easily. Breadcrumbs improve usability and accessibility, especially in multi-level websites, dashboards, and e-commerce platforms.
|
|
10
|
+
*/
|
|
17
11
|
interface Props {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
/**
|
|
13
|
+
* Allows to define the breadcrumb appearance.
|
|
14
|
+
*/
|
|
15
|
+
appearance: 'standard' | 'inverse';
|
|
16
|
+
/**
|
|
17
|
+
* Links of the breadcrumb.
|
|
18
|
+
*/
|
|
19
|
+
links: Array<{
|
|
20
|
+
/**
|
|
21
|
+
* The label displayed for the link.
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* URL for the link.
|
|
26
|
+
*/
|
|
27
|
+
href: string;
|
|
28
|
+
/**
|
|
29
|
+
* Where to open the link.
|
|
30
|
+
*/
|
|
31
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
21
34
|
|
|
22
|
-
let { appearance = 'standard', links = []
|
|
35
|
+
let { appearance = 'standard', links = []}: Props = $props();
|
|
23
36
|
|
|
24
37
|
const isLastLink = (index: number) => index === links.length - 1;
|
|
25
38
|
|
|
@@ -57,8 +70,11 @@
|
|
|
57
70
|
<style>/**
|
|
58
71
|
* Do not edit directly, this file was auto-generated.
|
|
59
72
|
*/
|
|
73
|
+
/**
|
|
74
|
+
* Do not edit directly, this file was auto-generated.
|
|
75
|
+
*/
|
|
60
76
|
.mc-breadcrumb {
|
|
61
|
-
color:
|
|
77
|
+
color: #000000;
|
|
62
78
|
}
|
|
63
79
|
.mc-breadcrumb__container {
|
|
64
80
|
list-style-type: none;
|
|
@@ -74,11 +90,11 @@
|
|
|
74
90
|
}
|
|
75
91
|
.mc-breadcrumb__item:not(:first-child) {
|
|
76
92
|
padding-inline-start: 1.5rem;
|
|
77
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='
|
|
93
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='%23000000' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M8.22 5.303a.75.75 0 0 1 1.06 0l4.167 4.167a.75.75 0 0 1 0 1.06L9.28 14.698a.75.75 0 1 1-1.06-1.06L11.856 10 8.22 6.364a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");
|
|
78
94
|
}
|
|
79
95
|
@media screen and (max-width: 679px) {
|
|
80
96
|
.mc-breadcrumb__item:nth-last-child(2) {
|
|
81
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='
|
|
97
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='%23000000' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M11.78 5.303a.75.75 0 0 1 0 1.06L8.144 10l3.636 3.637a.75.75 0 0 1-1.06 1.06l-4.167-4.166a.75.75 0 0 1 0-1.061l4.166-4.167a.75.75 0 0 1 1.061 0'/%3E%3C/svg%3E");
|
|
82
98
|
}
|
|
83
99
|
.mc-breadcrumb__item:not(:nth-last-child(2)) {
|
|
84
100
|
clip-path: inset(100%);
|
|
@@ -99,14 +115,14 @@
|
|
|
99
115
|
color: currentcolor;
|
|
100
116
|
}
|
|
101
117
|
.mc-breadcrumb--inverse {
|
|
102
|
-
color:
|
|
118
|
+
color: #ffffff;
|
|
103
119
|
}
|
|
104
120
|
.mc-breadcrumb--inverse .mc-breadcrumb__item:not(:first-child) {
|
|
105
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='
|
|
121
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='%23ffffff' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M8.22 5.303a.75.75 0 0 1 1.06 0l4.167 4.167a.75.75 0 0 1 0 1.06L9.28 14.698a.75.75 0 1 1-1.06-1.06L11.856 10 8.22 6.364a.75.75 0 0 1 0-1.06'/%3E%3C/svg%3E");
|
|
106
122
|
}
|
|
107
123
|
@media screen and (max-width: 679px) {
|
|
108
124
|
.mc-breadcrumb--inverse .mc-breadcrumb__item:nth-last-child(2) {
|
|
109
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='
|
|
125
|
+
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.25rem' width='1.25rem' fill='%23ffffff' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M11.78 5.303a.75.75 0 0 1 0 1.06L8.144 10l3.636 3.637a.75.75 0 0 1-1.06 1.06l-4.167-4.166a.75.75 0 0 1 0-1.061l4.166-4.167a.75.75 0 0 1 1.061 0'/%3E%3C/svg%3E");
|
|
110
126
|
}
|
|
111
127
|
}
|
|
112
128
|
|
|
@@ -118,7 +134,7 @@
|
|
|
118
134
|
gap: 0.25rem;
|
|
119
135
|
min-height: 1.5rem;
|
|
120
136
|
text-decoration: none;
|
|
121
|
-
color:
|
|
137
|
+
color: #000000;
|
|
122
138
|
font-size: 0.875rem;
|
|
123
139
|
}
|
|
124
140
|
.mc-link__label {
|
|
@@ -135,7 +151,7 @@
|
|
|
135
151
|
text-decoration: underline;
|
|
136
152
|
}
|
|
137
153
|
.mc-link:focus {
|
|
138
|
-
box-shadow: 0 0 0 0.125rem var(--focus-color-mid,
|
|
154
|
+
box-shadow: 0 0 0 0.125rem var(--focus-color-mid, #ffffff), 0 0 0 0.25rem var(--focus-color-outer, #000000);
|
|
139
155
|
outline: 0.125rem solid transparent;
|
|
140
156
|
outline-offset: 0.125rem;
|
|
141
157
|
}
|
|
@@ -144,22 +160,22 @@
|
|
|
144
160
|
font-size: 1rem;
|
|
145
161
|
}
|
|
146
162
|
.mc-link--secondary {
|
|
147
|
-
color:
|
|
163
|
+
color: #666666;
|
|
148
164
|
}
|
|
149
165
|
.mc-link--accent {
|
|
150
|
-
color:
|
|
166
|
+
color: #117f03;
|
|
151
167
|
}
|
|
152
168
|
.mc-link--inverse {
|
|
153
|
-
--focus-color-mid:
|
|
154
|
-
--focus-color-outer:
|
|
155
|
-
color:
|
|
169
|
+
--focus-color-mid: #000000;
|
|
170
|
+
--focus-color-outer: #ffffff;
|
|
171
|
+
color: #ffffff;
|
|
156
172
|
}
|
|
157
173
|
.mc-link--stand-alone {
|
|
158
174
|
min-height: 2rem;
|
|
159
|
-
font-weight:
|
|
175
|
+
font-weight: 600;
|
|
160
176
|
}
|
|
161
177
|
.mc-link--stand-alone .mc-link__label {
|
|
162
|
-
border-bottom:
|
|
178
|
+
border-bottom: 1px solid currentColor;
|
|
163
179
|
}
|
|
164
180
|
.mc-link--stand-alone:hover .mc-link__label {
|
|
165
181
|
border-color: transparent;
|
|
@@ -1,11 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
target: '_blank' | '_self' | '_parent' | '_top' | undefined;
|
|
5
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* A breadcrumb is a navigation help that displays the hierarchical path of the current page within a website or application. It helps users understand their location and allows them to navigate back to previous levels easily. Breadcrumbs improve usability and accessibility, especially in multi-level websites, dashboards, and e-commerce platforms.
|
|
3
|
+
*/
|
|
6
4
|
interface Props {
|
|
7
|
-
|
|
8
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Allows to define the breadcrumb appearance.
|
|
7
|
+
*/
|
|
8
|
+
appearance: 'standard' | 'inverse';
|
|
9
|
+
/**
|
|
10
|
+
* Links of the breadcrumb.
|
|
11
|
+
*/
|
|
12
|
+
links: Array<{
|
|
13
|
+
/**
|
|
14
|
+
* The label displayed for the link.
|
|
15
|
+
*/
|
|
16
|
+
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* URL for the link.
|
|
19
|
+
*/
|
|
20
|
+
href: string;
|
|
21
|
+
/**
|
|
22
|
+
* Where to open the link.
|
|
23
|
+
*/
|
|
24
|
+
target?: '_blank' | '_self' | '_parent' | '_top';
|
|
25
|
+
}>;
|
|
9
26
|
}
|
|
10
27
|
declare const Breadcrumb: import("svelte").Component<Props, {}, "">;
|
|
11
28
|
type Breadcrumb = ReturnType<typeof Breadcrumb>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Breadcrumb.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.svelte.ts"],"names":[],"mappings":"AAGE,UAAU,
|
|
1
|
+
{"version":3,"file":"Breadcrumb.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/breadcrumb/Breadcrumb.svelte.ts"],"names":[],"mappings":"AAGE;;GAEG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;IACnC;;OAEG;IACL,KAAK,EAAE,KAAK,CAAC;QACT;;WAEG;QACH,KAAK,EAAE,MAAM,CAAC;QACd;;WAEG;QACH,IAAI,EAAE,MAAM,CAAC;QACb;;WAEG;QACH,MAAM,CAAC,EAAE,QAAQ,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,CAAC;KAClD,CAAC,CAAC;CACL;AAwCF,QAAA,MAAM,UAAU,2CAAwC,CAAC;AACzD,KAAK,UAAU,GAAG,UAAU,CAAC,OAAO,UAAU,CAAC,CAAC;AAChD,eAAe,UAAU,CAAC"}
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
import{c as K,p as M,a as N,b as
|
|
1
|
+
import{c as K,p as M,a as N,b as n,f as h,D as O,s as C,d as g,h as i,i as P,j as c,r as f,t as Q,e as R,A,B as E}from"../../custom-element.js";import{i as s}from"../../if.js";import{s as B}from"../../slot.js";import{b as T,C as U}from"../../attributes.js";import{L as V}from"../loader/Loader.js";var W=h('<span class="mc-button__icon svelte-9om05i"><!></span>'),X=h("<span><!></span>"),Y=h('<span class="mc-button__icon svelte-9om05i"><!></span>'),Z=h("<button><!> <!> <!> <!></button>");const $={hash:"svelte-9om05i",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Do not edit directly, this file was auto-generated.
|
|
6
|
+
*/.mc-button.svelte-9om05i {color:#ffffff;background-color:#464e63;font-weight:600;padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;display:inline-flex;justify-content:center;vertical-align:middle;text-align:center;border:2px solid transparent;border-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.svelte-9om05i:hover {background-color:#343b4c;}.mc-button.svelte-9om05i:active {background-color:#242938;}.mc-button.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button.svelte-9om05i .mc-button__label:where(.svelte-9om05i) {font-size:1rem;}.mc-button__label.svelte-9om05i {font-size:1rem;}.mc-button__icon.svelte-9om05i {flex-shrink:0;width:1.5rem;height:1.5rem;}.mc-button.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button.svelte-9om05i:focus-visible {box-shadow:0 0 0 0.125rem var(--focus-color-mid, #ffffff), 0 0 0 0.25rem var(--focus-color-outer, #000000);outline:0.125rem solid transparent;outline-offset:0.125rem;}.mc-button--s.svelte-9om05i {padding:0 calc(0.75rem - 0.125rem);min-height:2rem;min-width:2rem;}.mc-button--s.svelte-9om05i .mc-button__label:where(.svelte-9om05i) {font-size:0.875rem;}.mc-button--s.svelte-9om05i .mc-button__icon:where(.svelte-9om05i) {width:1.25rem;height:1.25rem;}.mc-button--s.svelte-9om05i .mc-button__icon:where(.svelte-9om05i):only-child {width:1.25rem;height:1.25rem;}.mc-button--m.svelte-9om05i {padding:0 calc(1rem - 0.125rem);min-height:3rem;min-width:3rem;}.mc-button--m.svelte-9om05i .mc-button__label:where(.svelte-9om05i) {font-size:1rem;}.mc-button--m.svelte-9om05i .mc-button__icon:where(.svelte-9om05i) {width:1.5rem;height:1.5rem;}.mc-button--m.svelte-9om05i .mc-button__icon:where(.svelte-9om05i):only-child {width:1.5rem;height:1.5rem;}.mc-button--l.svelte-9om05i {padding:0 calc(1.25rem - 0.125rem);min-height:4rem;min-width:4rem;}.mc-button--l.svelte-9om05i .mc-button__label:where(.svelte-9om05i) {font-size:1.125rem;}.mc-button--l.svelte-9om05i .mc-button__icon:where(.svelte-9om05i) {width:2rem;height:2rem;}.mc-button--l.svelte-9om05i .mc-button__icon:where(.svelte-9om05i):only-child {width:2rem;height:2rem;}.mc-button--icon-only.svelte-9om05i {padding:0.25rem;}.mc-button--outlined.svelte-9om05i {color:#242938;border-color:#8891aa;background-color:#ffffff;}.mc-button--outlined.svelte-9om05i:hover {background-color:#eff1f6;}.mc-button--outlined.svelte-9om05i:active {background-color:#c9d0de;}.mc-button--outlined.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--ghost.svelte-9om05i {color:#242938;background-color:rgba(255, 255, 255, 0.01);}.mc-button--ghost.svelte-9om05i:hover {background-color:rgba(70, 78, 99, 0.1);}.mc-button--ghost.svelte-9om05i:active {background-color:rgba(70, 78, 99, 0.2);}.mc-button--ghost.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--accent.svelte-9om05i {color:#ffffff;background-color:#117f03;}.mc-button--accent.svelte-9om05i:hover {background-color:#006902;}.mc-button--accent.svelte-9om05i:active {background-color:#035010;}.mc-button--accent.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--danger.svelte-9om05i {color:#ffffff;background-color:#c61112;}.mc-button--danger.svelte-9om05i:hover {background-color:#8c0003;}.mc-button--danger.svelte-9om05i:active {background-color:#530000;}.mc-button--danger.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--inverse.svelte-9om05i {--focus-color-mid: #000000;--focus-color-outer: #ffffff;color:#242938;background-color:#ffffff;}.mc-button--inverse.svelte-9om05i:hover {background-color:#e6e6e6;}.mc-button--inverse.svelte-9om05i:active {background-color:#cccccc;}.mc-button--inverse.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--icon-button.svelte-9om05i {border-radius:100%;padding:0;}.mc-button--loading.svelte-9om05i .mc-button__label:where(.svelte-9om05i),
|
|
7
|
+
.mc-button--loading.svelte-9om05i .mc-button__icon:where(.svelte-9om05i) {visibility:hidden;}.mc-button--outlined.mc-button--standard.svelte-9om05i {color:#242938;border-color:#8891aa;background-color:#ffffff;}.mc-button--outlined.mc-button--standard.svelte-9om05i:hover {background-color:#eff1f6;}.mc-button--outlined.mc-button--standard.svelte-9om05i:active {background-color:#c9d0de;}.mc-button--outlined.mc-button--standard.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--outlined.mc-button--accent.svelte-9om05i {color:#117f03;border-color:#78be20;background-color:#ffffff;}.mc-button--outlined.mc-button--accent.svelte-9om05i:hover {background-color:#ebf5de;}.mc-button--outlined.mc-button--accent.svelte-9om05i:active {background-color:#c5e39e;}.mc-button--outlined.mc-button--accent.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--outlined.mc-button--danger.svelte-9om05i {color:#c61112;border-color:#ef5f5c;background-color:#ffffff;}.mc-button--outlined.mc-button--danger.svelte-9om05i:hover {background-color:#fdeaea;}.mc-button--outlined.mc-button--danger.svelte-9om05i:active {background-color:#f8bcbb;}.mc-button--outlined.mc-button--danger.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--outlined.mc-button--inverse.svelte-9om05i {color:#ffffff;border-color:#ffffff;background-color:rgba(255, 255, 255, 0.01);}.mc-button--outlined.mc-button--inverse.svelte-9om05i:hover {background-color:rgba(255, 255, 255, 0.1);}.mc-button--outlined.mc-button--inverse.svelte-9om05i:active {background-color:rgba(255, 255, 255, 0.2);}.mc-button--outlined.mc-button--inverse.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--ghost.mc-button--standard.svelte-9om05i {color:#242938;background-color:rgba(255, 255, 255, 0.01);}.mc-button--ghost.mc-button--standard.svelte-9om05i:hover {background-color:rgba(70, 78, 99, 0.1);}.mc-button--ghost.mc-button--standard.svelte-9om05i:active {background-color:rgba(70, 78, 99, 0.2);}.mc-button--ghost.mc-button--standard.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--ghost.mc-button--accent.svelte-9om05i {color:#117f03;background-color:rgba(255, 255, 255, 0.01);}.mc-button--ghost.mc-button--accent.svelte-9om05i:hover {background-color:rgba(17, 127, 3, 0.1);}.mc-button--ghost.mc-button--accent.svelte-9om05i:active {background-color:rgba(17, 127, 3, 0.2);}.mc-button--ghost.mc-button--accent.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--ghost.mc-button--danger.svelte-9om05i {color:#c61112;background-color:rgba(255, 255, 255, 0.01);}.mc-button--ghost.mc-button--danger.svelte-9om05i:hover {background-color:rgba(198, 17, 18, 0.1);}.mc-button--ghost.mc-button--danger.svelte-9om05i:active {background-color:rgba(198, 17, 18, 0.2);}.mc-button--ghost.mc-button--danger.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button--ghost.mc-button--inverse.svelte-9om05i {color:#ffffff;background-color:rgba(255, 255, 255, 0.01);}.mc-button--ghost.mc-button--inverse.svelte-9om05i:hover {background-color:rgba(255, 255, 255, 0.1);}.mc-button--ghost.mc-button--inverse.svelte-9om05i:active {background-color:rgba(255, 255, 255, 0.2);}.mc-button--ghost.mc-button--inverse.svelte-9om05i:disabled {background-color:#d9d9d9;border-color:transparent;color:#737373;cursor:not-allowed;}.mc-button__icon.svelte-9om05i {pointer-events:none;}.hidden.svelte-9om05i {visibility:hidden;}.loader-style.svelte-9om05i {color:currentColor;position:absolute;}`};function oo(D,t){M(t,!0),N(D,$);let _=n(t,"appearance",7,"standard"),k=n(t,"size",7,"m"),p=n(t,"ghost",7,!1),w=n(t,"outlined",7,!1),l=n(t,"iconmode",7),y=n(t,"disabled",7,!1),z=n(t,"type",7,"button"),d=n(t,"isloading",7,!1),u=n(t,"hasiconslot",7,!1),q=O(t,["$$slots","$$events","$$legacy","$$host","appearance","size","ghost","outlined","iconmode","disabled","type","isloading","hasiconslot"]);var v=Z();T(v,o=>({class:`mc-button mc-button--${k()} mc-button--${_()}`,disabled:y(),type:z(),...q,[U]:o}),[()=>({"mc-button--ghost":p(),"mc-button--outlined":w(),"mc-button--icon-only":l()==="only","mc-button--loading":d()})],void 0,"svelte-9om05i");var L=g(v);{var F=o=>{V(o,{theme:"standard",style:"color: currentColor; position: absolute;",size:"m",text:""})};s(L,o=>{d()&&o(F)})}var S=C(L,2);{var G=o=>{var e=W(),a=g(e);{var m=r=>{var b=A(),x=E(b);B(x,t,"icon",{}),i(r,b)};s(a,r=>{u()&&r(m)})}f(e),i(o,e)};s(S,o=>{(l()==="left"||l()==="only")&&o(G)})}var j=C(S,2);{var H=o=>{var e=X();let a;var m=g(e);B(m,t,"default",{}),f(e),Q(r=>a=R(e,1,"mc-button__label svelte-9om05i",null,a,r),[()=>({hidden:d()})]),i(o,e)};s(j,o=>{l()!=="only"&&o(H)})}var I=C(j,2);{var J=o=>{var e=Y(),a=g(e);{var m=r=>{var b=A(),x=E(b);B(x,t,"icon",{}),i(r,b)};s(a,r=>{u()&&r(m)})}f(e),i(o,e)};s(I,o=>{l()==="right"&&o(J)})}return f(v),i(D,v),P({get appearance(){return _()},set appearance(o="standard"){_(o),c()},get size(){return k()},set size(o="m"){k(o),c()},get ghost(){return p()},set ghost(o=!1){p(o),c()},get outlined(){return w()},set outlined(o=!1){w(o),c()},get iconmode(){return l()},set iconmode(o){l(o),c()},get disabled(){return y()},set disabled(o=!1){y(o),c()},get type(){return z()},set type(o="button"){z(o),c()},get isloading(){return d()},set isloading(o=!1){d(o),c()},get hasiconslot(){return u()},set hasiconslot(o=!1){u(o),c()}})}customElements.define("m-button",K(oo,{appearance:{},size:{},ghost:{},outlined:{},iconmode:{},disabled:{},type:{},isloading:{},hasiconslot:{}},["icon","default"],[],!0));export{oo as B};
|
|
5
8
|
//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/button/Button.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-button' }} />\n\n<script lang=\"ts\">\n import type {\n ButtonIconMode,\n ButtonSize,\n ButtonStyle,\n ButtonType,\n } from './button.types';\n\n import Loader from '../loader/Loader.svelte';\n\n interface Props {\n appearance?: ButtonStyle;\n size?: ButtonSize;\n ghost?: boolean;\n outlined?: boolean;\n iconmode?: ButtonIconMode;\n disabled?: boolean;\n type?: ButtonType;\n isloading?: boolean;\n hasiconslot?: boolean;\n [key: string]: any;\n }\n\n let {\n appearance = 'standard',\n size = 'm',\n ghost = false,\n outlined = false,\n iconmode,\n disabled = false,\n type = 'button',\n isloading = false,\n hasiconslot = false,\n ...events\n }: Props = $props();\n</script>\n\n<button\n class={`mc-button mc-button--${size} mc-button--${appearance}`}\n class:mc-button--ghost={ghost}\n class:mc-button--outlined={outlined}\n class:mc-button--icon-only={iconmode === 'only'}\n class:mc-button--loading={isloading}\n {disabled}\n {type}\n {...events}\n>\n {#if isloading}\n <Loader\n theme=\"standard\"\n style=\"color: currentColor; position: absolute;\"\n size=\"m\"\n text=\"\"\n />\n {/if}\n\n {#if iconmode === 'left' || iconmode === 'only'}\n <span class=\"mc-button__icon\">\n {#if hasiconslot}\n <slot name=\"icon\" />\n {/if}\n </span>\n {/if}\n\n {#if iconmode !== 'only'}\n <span class=\"mc-button__label\" class:hidden={isloading}>\n <slot />\n </span>\n {/if}\n\n {#if iconmode === 'right'}\n <span class=\"mc-button__icon\">\n {#if hasiconslot}\n <slot name=\"icon\" />\n {/if}\n </span>\n {/if}\n</button>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/button';\n\n .mc-button__icon {\n pointer-events: none;\n }\n\n .hidden {\n visibility: hidden;\n }\n\n .loader-style {\n color: currentColor;\n position: absolute;\n }\n</style>\n"],"names":["appearance","size","ghost","outlined","iconmode","$.prop","$$props","disabled","type","isloading","hasiconslot","events","$.rest_props","$$render","consequent","consequent_1","consequent_2","consequent_3","consequent_4","consequent_5"],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/button/Button.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-button' }} />\n\n<script lang=\"ts\">\n import type {\n ButtonIconMode,\n ButtonSize,\n ButtonStyle,\n ButtonType,\n } from './button.types';\n\n import Loader from '../loader/Loader.svelte';\n\n interface Props {\n appearance?: ButtonStyle;\n size?: ButtonSize;\n ghost?: boolean;\n outlined?: boolean;\n iconmode?: ButtonIconMode;\n disabled?: boolean;\n type?: ButtonType;\n isloading?: boolean;\n hasiconslot?: boolean;\n [key: string]: any;\n }\n\n let {\n appearance = 'standard',\n size = 'm',\n ghost = false,\n outlined = false,\n iconmode,\n disabled = false,\n type = 'button',\n isloading = false,\n hasiconslot = false,\n ...events\n }: Props = $props();\n</script>\n\n<button\n class={`mc-button mc-button--${size} mc-button--${appearance}`}\n class:mc-button--ghost={ghost}\n class:mc-button--outlined={outlined}\n class:mc-button--icon-only={iconmode === 'only'}\n class:mc-button--loading={isloading}\n {disabled}\n {type}\n {...events}\n>\n {#if isloading}\n <Loader\n theme=\"standard\"\n style=\"color: currentColor; position: absolute;\"\n size=\"m\"\n text=\"\"\n />\n {/if}\n\n {#if iconmode === 'left' || iconmode === 'only'}\n <span class=\"mc-button__icon\">\n {#if hasiconslot}\n <slot name=\"icon\" />\n {/if}\n </span>\n {/if}\n\n {#if iconmode !== 'only'}\n <span class=\"mc-button__label\" class:hidden={isloading}>\n <slot />\n </span>\n {/if}\n\n {#if iconmode === 'right'}\n <span class=\"mc-button__icon\">\n {#if hasiconslot}\n <slot name=\"icon\" />\n {/if}\n </span>\n {/if}\n</button>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/button';\n\n .mc-button__icon {\n pointer-events: none;\n }\n\n .hidden {\n visibility: hidden;\n }\n\n .loader-style {\n color: currentColor;\n position: absolute;\n }\n</style>\n"],"names":["appearance","size","ghost","outlined","iconmode","$.prop","$$props","disabled","type","isloading","hasiconslot","events","$.rest_props","$$render","consequent","consequent_1","consequent_2","consequent_3","consequent_4","consequent_5"],"mappings":";;;;;;kzHAAA,gBA0BI,IAAAA,qBAAa,UAAU,EACvBC,eAAO,GAAG,EACVC,gBAAQ,EAAK,EACbC,mBAAW,EAAK,EAChBC,EAAQC,EAAAC,EAAA,WAAA,CAAA,EACRC,mBAAW,EAAK,EAChBC,eAAO,QAAQ,EACfC,oBAAY,EAAK,EACjBC,sBAAc,EAAK,EAChBC,EAAAC,EAAAN,EAAA,6JAK0B,MAAA,wBAAAL,kBAAmBD,EAAU,CAAA,4BAOxDW,oCANoBT,EAAK,wBACFC,EAAQ,EACP,uBAAAC,EAAQ,IAAK,4BACfK,EAAS,sJAK9BA,EAAS,GAAAI,EAAAC,CAAA,0GAWLJ,EAAW,GAAAG,EAAAE,CAAA,0BAFfX,EAAa,IAAA,QAAUA,MAAa,SAAMS,EAAAG,CAAA,sJASAP,EAAS,CAAA,EAAA,CAAA,kBADnDL,MAAa,QAAMS,EAAAI,CAAA,0GAQfP,EAAW,GAAAG,EAAAK,CAAA,yBAFfd,MAAa,SAAOS,EAAAM,CAAA,wEA9CV,WAAU,6CAChB,IAAG,+CACF,GAAK,qDACF,GAAK,0GAEL,GAAK,6CACT,SAAQ,uDACH,GAAK,2DACH,GAAK,YAGvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.stories.d.ts","sourceRoot":"","sources":["../../../src/components/button/Button.stories.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAW,IAAI,EAAE,MAAM,sBAAsB,CAAC;AAG1D;;;;;GAKG;wBA8DE,IAAI;AA5DT,wBA4DU;AA6BV,eAAO,MAAM,MAAM,KAAoB,CAAC;AAUxC,eAAO,MAAM,QAAQ,KAAoB,CAAC;AAc1C,eAAO,MAAM,KAAK,KAAoB,CAAC;AAqBvC,eAAO,MAAM,IAAI,KAAoB,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { action } from 'storybook/actions';
|
|
2
|
+
import ChevronRight32 from '@mozaic-ds/icons-svelte/custom-elements/ChevronRight32/ChevronRight32.js';
|
|
2
3
|
import { userEvent, expect, within, fn } from 'storybook/test';
|
|
3
4
|
/**
|
|
4
5
|
* Buttons are used to trigger actions. Their appearance depends on the type of action required from the user or the context.
|