@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
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Foundations/Container',
|
|
6
|
+
component: 'm-container',
|
|
7
|
+
args: {
|
|
8
|
+
default: `<h1>Container</h1>`,
|
|
9
|
+
},
|
|
10
|
+
render: (args) => html `
|
|
11
|
+
<m-container fluid=${ifDefined(args.fluid)}>
|
|
12
|
+
${unsafeHTML(ifDefined(args.default))}
|
|
13
|
+
</m-container>
|
|
14
|
+
`,
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const Standard = {};
|
|
18
|
+
export const Fluid = {
|
|
19
|
+
args: {
|
|
20
|
+
fluid: true,
|
|
21
|
+
default: `<h1>Fluid Container</h1>`,
|
|
22
|
+
},
|
|
23
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<svelte:options customElement={{ tag: 'm-container' }} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
/**
|
|
5
|
+
* The Container component is designed to wrap your page or section content, typically grids or other layout elements. By default, it centers the content with a maximum width to ensure consistent alignment and spacing.
|
|
6
|
+
*
|
|
7
|
+
* @slot default - Use this slot to insert the content of the container.
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
/**
|
|
11
|
+
* If `true`, the container will take the full width.
|
|
12
|
+
*/
|
|
13
|
+
fluid?: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
let { fluid }: Props = $props();
|
|
17
|
+
</script>
|
|
18
|
+
|
|
19
|
+
<div class={['ml-container', fluid && 'ml-container--fluid']}>
|
|
20
|
+
<slot />
|
|
21
|
+
</div>
|
|
22
|
+
|
|
23
|
+
<style>/**
|
|
24
|
+
* Do not edit directly, this file was auto-generated.
|
|
25
|
+
*/
|
|
26
|
+
.ml-container {
|
|
27
|
+
padding-inline: 1rem;
|
|
28
|
+
width: 100%;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
margin-inline: auto;
|
|
31
|
+
}
|
|
32
|
+
@media (width >= 680px) {
|
|
33
|
+
.ml-container {
|
|
34
|
+
padding-inline: 1.5rem;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
@media (width >= 1024px) {
|
|
38
|
+
.ml-container {
|
|
39
|
+
padding-inline: initial;
|
|
40
|
+
max-width: 944px;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
@media (width >= 1280px) {
|
|
44
|
+
.ml-container {
|
|
45
|
+
max-width: 1200px;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
@media (width >= 1920px) {
|
|
49
|
+
.ml-container {
|
|
50
|
+
max-width: 1480px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
.ml-container--fluid {
|
|
54
|
+
max-width: none;
|
|
55
|
+
}
|
|
56
|
+
@media (width >= 1024px) {
|
|
57
|
+
.ml-container--fluid {
|
|
58
|
+
padding-inline: 2.5rem;
|
|
59
|
+
}
|
|
60
|
+
}</style>
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Container component is designed to wrap your page or section content, typically grids or other layout elements. By default, it centers the content with a maximum width to ensure consistent alignment and spacing.
|
|
3
|
+
*
|
|
4
|
+
* @slot default - Use this slot to insert the content of the container.
|
|
5
|
+
*/
|
|
6
|
+
interface Props {
|
|
7
|
+
/**
|
|
8
|
+
* If `true`, the container will take the full width.
|
|
9
|
+
*/
|
|
10
|
+
fluid?: boolean;
|
|
11
|
+
}
|
|
12
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
13
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
14
|
+
$$bindings?: Bindings;
|
|
15
|
+
} & Exports;
|
|
16
|
+
(internal: unknown, props: Props & {
|
|
17
|
+
$$events?: Events;
|
|
18
|
+
$$slots?: Slots;
|
|
19
|
+
}): Exports & {
|
|
20
|
+
$set?: any;
|
|
21
|
+
$on?: any;
|
|
22
|
+
};
|
|
23
|
+
z_$$bindings?: Bindings;
|
|
24
|
+
}
|
|
25
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
26
|
+
default: any;
|
|
27
|
+
} ? Props extends Record<string, never> ? any : {
|
|
28
|
+
children?: any;
|
|
29
|
+
} : {});
|
|
30
|
+
declare const Container: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<Props, {
|
|
31
|
+
default: {};
|
|
32
|
+
}>, {
|
|
33
|
+
[evt: string]: CustomEvent<any>;
|
|
34
|
+
}, {
|
|
35
|
+
default: {};
|
|
36
|
+
}, {}, "">;
|
|
37
|
+
type Container = InstanceType<typeof Container>;
|
|
38
|
+
export default Container;
|
|
39
|
+
//# sourceMappingURL=Container.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Container.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/container/Container.svelte.ts"],"names":[],"mappings":"AAGE;;;;GAIG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAiBH,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AACD,KAAK,gCAAgC,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,GACvD,CAAC,KAAK,SAAS;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GACzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,GAAG,GACH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,GAClB,EAAE,CAAC,CAAC;AAId,QAAA,MAAM,SAAS;;;;;;UAAqF,CAAC;AACnF,KAAK,SAAS,GAAG,YAAY,CAAC,OAAO,SAAS,CAAC,CAAC;AAClD,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# `m-container`
|
|
2
|
+
|
|
3
|
+
The Container component is designed to wrap your page or section content, typically grids or other layout elements. By default, it centers the content with a maximum width to ensure consistent alignment and spacing.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Description | Type | Default |
|
|
8
|
+
|------|-------------|------|---------|
|
|
9
|
+
| `fluid` | If `true`, the container will take the full width. | `boolean` | |
|
|
10
|
+
|
|
11
|
+
## Slots
|
|
12
|
+
|
|
13
|
+
| Name | Description |
|
|
14
|
+
|------|-------------|
|
|
15
|
+
| `default` | Use this slot to insert the content of the container. |
|
|
16
|
+
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import{v as
|
|
1
|
+
import{v as B,c as D,p as F,a as L,b as o,f as H,s as k,d as c,t as V,i as y,j as O,k as t,r as d,h as S,e as q,g as A}from"../../custom-element.js";import{i as G}from"../../if.js";import{r as I,s as g}from"../../attributes.js";import{c as J}from"../../input.js";import{c as K}from"../../custom-element-forward-events.js";import{C as N}from"../../CrossCircleFilled24.js";import"../../legacy.js";var P=H('<div class="mc-datepicker__controls-options mc-controls-options svelte-xj4ivh"><button type="button" class="mc-controls-options__button svelte-xj4ivh"><!> <span class="mc-controls-options__label svelte-xj4ivh"> </span></button></div>'),Q=H('<div><input class="mc-datepicker__control mc-text-input__control svelte-xj4ivh" type="date"/> <!></div>');const R={hash:"svelte-xj4ivh",code:`/**
|
|
2
2
|
* Do not edit directly, this file was auto-generated.
|
|
3
3
|
*/
|
|
4
|
-
/* stylelint-disable string-no-newline */.mc-text-input.svelte-xj4ivh {transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-s,
|
|
4
|
+
/* stylelint-disable string-no-newline */.mc-text-input.svelte-xj4ivh {transition:box-shadow 200ms ease;background-color:var(--forms-color-background-default, #ffffff);border:var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);border-radius:var(--forms-border-radius, 0.25rem);transition:all ease 200ms;color:var(--forms-color-text-default, #000000);display:block;width:100%;height:3rem;box-sizing:border-box;display:flex;align-items:center;gap:0.5rem;}.mc-text-input__control.svelte-xj4ivh {background-color:transparent;border-width:0;font-family:inherit;outline:none;}.mc-text-input__control.svelte-xj4ivh {padding:0.75rem 0.6875rem;font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-regular, 400);flex-grow:1;}.mc-text-input__control.svelte-xj4ivh::placeholder {color:var(--forms-color-placeholder, #666666);}.mc-text-input__icon.svelte-xj4ivh {fill:var(--forms-color-icon-default, #666666);height:1.5rem;width:1.5rem;flex-shrink:0;}.mc-text-input.svelte-xj4ivh:focus-within {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-text-input.svelte-xj4ivh:hover:not(:focus-within) {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-text-input.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:none;}.mc-text-input.svelte-xj4ivh:has(input[readonly]:where(.svelte-xj4ivh)) {border-color:var(--forms-color-border-read-only, #cccccc);pointer-events:none;}.mc-text-input.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) {padding-inline-end:0.6875rem;}.mc-text-input.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) .mc-text-input__control:where(.svelte-xj4ivh) {padding-inline-end:0;}.mc-text-input--s.svelte-xj4ivh {height:2rem;}.mc-text-input--s.svelte-xj4ivh .mc-text-input__control:where(.svelte-xj4ivh) {padding:0.375rem 0.6875rem;font-size:var(--font-size-100, 0.875rem);line-height:var(--line-height-s, 1.3);}.mc-text-input--s.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) {padding-inline-end:0.4375rem;}.mc-text-input.is-invalid.svelte-xj4ivh {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-text-input.is-invalid.svelte-xj4ivh:hover:not(:focus-within) {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-text-input.svelte-xj4ivh :where(.svelte-xj4ivh) {box-sizing:border-box;}
|
|
5
5
|
|
|
6
|
-
/* stylelint-enable string-no-newline */.mc-datepicker.svelte-xj4ivh {border-radius:var(--radius-s, 0.25rem);position:relative;}.mc-datepicker__control.svelte-xj4ivh {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' fill='var(--forms-color-icon-interactive, %23000000)' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E");font-family:var(--font-family, LeroyMerlin), sans-serif;background-repeat:no-repeat;background-position:right 0.75rem center;display:block;padding:0 0.75rem;}.mc-datepicker__control.svelte-xj4ivh::-webkit-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.svelte-xj4ivh::-moz-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.is-invalid.svelte-xj4ivh {border-color:var(--forms-color-border-invalid, #ea302d);box-shadow:0 0 0 var(--border-s,
|
|
6
|
+
/* stylelint-enable string-no-newline */.mc-datepicker.svelte-xj4ivh {border-radius:var(--border-radius-s, 0.25rem);position:relative;}.mc-datepicker__control.svelte-xj4ivh {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' fill='var(--forms-color-icon-interactive, %23000000)' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E");font-family:var(--font-family, LeroyMerlin), sans-serif;background-repeat:no-repeat;background-position:right 0.75rem center;display:block;padding:0 0.75rem;}.mc-datepicker__control.svelte-xj4ivh::-webkit-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.svelte-xj4ivh::-moz-calendar-picker-indicator {padding-right:1rem;opacity:0;transform:scale(2);}.mc-datepicker__control.is-invalid.svelte-xj4ivh {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-datepicker__control.is-invalid.svelte-xj4ivh:hover:not(:focus-within) {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-datepicker__control.svelte-xj4ivh:disabled {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' fill='var(--forms-color-icon-disabled, %23737373)' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E");background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker__control.svelte-xj4ivh:disabled:hover:not(:focus-within) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker.svelte-xj4ivh:has(.mc-controls-options:where(.svelte-xj4ivh)) {padding-inline-end:0;}.mc-datepicker.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled) {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);pointer-events:all;cursor:not-allowed;}.mc-datepicker.svelte-xj4ivh:has(input:where(.svelte-xj4ivh):disabled):hover {background-color:var(--forms-color-background-disabled, #d9d9d9);cursor:not-allowed;border-color:transparent;box-shadow:none;color:var(--forms-color-text-disabled, #737373);}.mc-datepicker--s.svelte-xj4ivh .mc-datepicker__control:where(.svelte-xj4ivh) {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' fill='var(--forms-color-icon-interactive, %23000000)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E");}.mc-datepicker--s.svelte-xj4ivh .mc-datepicker__control:where(.svelte-xj4ivh):disabled {background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' width='1.25rem' height='1.25rem' fill='var(--forms-color-icon-disabled, %23737373)' viewBox='0 0 20 20'%3E%3Cpath fill-rule='evenodd' d='M7 2.5a.75.75 0 0 0-1.5 0v.917h-3a.75.75 0 0 0-.75.75V17.5c0 .414.336.75.75.75h15a.75.75 0 0 0 .75-.75V4.167a.75.75 0 0 0-.75-.75h-3V2.5a.75.75 0 0 0-1.5 0v.917h-2.25V2.5a.75.75 0 0 0-1.5 0v.917H7zm6 2.417h-2.25v.916a.75.75 0 0 1-1.5 0v-.916H7v.916a.75.75 0 1 1-1.5 0v-.916H3.25V8h13.5V4.917H14.5v.916a.75.75 0 0 1-1.5 0zM3.25 9.5v7.25h13.5V9.5z'/%3E%3C/svg%3E");}.mc-datepicker__controls-options.svelte-xj4ivh {position:absolute;right:2.75rem;top:0.75rem;}.mc-controls-options.svelte-xj4ivh {align-items:center;display:inline-flex;justify-content:center;gap:0.5rem;}.mc-controls-options__button.svelte-xj4ivh {background-color:transparent;border-width:0;color:initial;font-family:inherit;outline:none;appearance:none;cursor:pointer;padding:0;border-radius:var(--border-radius-full, 100%);}.mc-controls-options__button.svelte-xj4ivh: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-controls-options__icon.svelte-xj4ivh {fill:var(--forms-color-icon-clear, #666666);}.mc-controls-options__button.svelte-xj4ivh, .mc-controls-options__icon.svelte-xj4ivh {height:1.5rem;width:1.5rem;}.mc-controls-options__label.svelte-xj4ivh {clip-path:inset(100%);clip:rect(1px, 1px, 1px, 1px);height:1px;overflow:hidden;position:absolute;white-space:nowrap;padding:0;width:1px;}.mc-controls-options__unit.svelte-xj4ivh {font-size:var(--font-size-150, 1rem);line-height:var(--line-height-s, 1.3);font-weight:var(--font-weight-semi-bold, 600);color:var(--forms-color-text-default, #000000);}`};function T(w,r){F(r,!0),L(w,R);let v=o(r,"id",7),h=o(r,"name",7),a=o(r,"value",15),l=o(r,"isinvalid",7),m=o(r,"disabled",7),s=o(r,"size",7,"m"),u=o(r,"readonly",7),p=o(r,"isclearable",7),b=o(r,"clearlabel",7,"clear content");const z=()=>a("");var C={get id(){return v()},set id(e){v(e),t()},get name(){return h()},set name(e){h(e),t()},get value(){return a()},set value(e){a(e),t()},get isinvalid(){return l()},set isinvalid(e){l(e),t()},get disabled(){return m()},set disabled(e){m(e),t()},get size(){return s()},set size(e="m"){s(e),t()},get readonly(){return u()},set readonly(e){u(e),t()},get isclearable(){return p()},set isclearable(e){p(e),t()},get clearlabel(){return b()},set clearlabel(e="clear content"){b(e),t()}},n=Q(),i=c(n);I(i);var E=k(i,2);{var M=e=>{var x=P(),f=c(x);f.__click=z;var _=c(f);N(_,{class:"mc-controls-options__icon","aria-hidden":"true"});var j=k(_,2),Z=c(j,!0);d(j),d(f),d(x),V(()=>S(Z,b())),y(e,x)};G(E,e=>{p()&&a()&&e(M)})}return d(n),V(()=>{q(n,1,A(["mc-datepicker mc-text-input",`mc-text-input--${s()}`,`mc-datepicker--${s()}`,l()&&"is-invalid"]),"svelte-xj4ivh"),g(i,"id",v()),g(i,"name",h()),i.disabled=m(),i.readOnly=u(),g(i,"aria-invalid",l())}),J(i,a),y(w,n),O(C)}B(["click"]);customElements.define("m-datepicker",D(T,{id:{},name:{},value:{},isinvalid:{},disabled:{},size:{},readonly:{},isclearable:{},clearlabel:{}},[],[],!0,K));
|
|
7
7
|
//# sourceMappingURL=Datepicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Datepicker.js","sources":["../../../src/components/datepicker/Datepicker.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-datepicker', extend: customElementForwardEvents }} />\n\n<script lang=\"ts\">\n import { customElementForwardEvents } from '../../utils';\n import CrossCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/CrossCircleFilled24/CrossCircleFilled24.svelte';\n /**\n * A date picker is an input component that allows users to select a date from a calendar interface or manually enter a date value. It enhances usability by providing structured date selection, reducing input errors, and ensuring format consistency. Date Pickers are commonly used in forms, booking systems, scheduling tools, and data filtering interfaces to facilitate accurate date entry.\n */\n interface Props {\n /**\n * A unique identifier for the datepicker element, used to associate the label with the form element.\n */\n id: string;\n /**\n * The name attribute for the datepicker element, typically used for form submission.\n */\n name?: string;\n /**\n * The current value of the datepicker field.\n */\n value?: string | number;\n /**\n * If `true`, applies an invalid state to the datepicker.\n */\n isinvalid?: boolean;\n /**\n * If `true`, disables the datepicker, making it non-interactive.\n */\n disabled?: boolean;\n /**\n * Determines the size of the datepicker.\n */\n size?: 's' | 'm';\n /**\n * If `true`, the datepicker is read-only (cannot be edited).\n */\n readonly?: boolean;\n /**\n * If `true`, a clear button will appear when the datepicker has a value.\n */\n isclearable?: boolean;\n /**\n * The label text for the clear button.\n */\n clearlabel?: string;\n }\n\n let {\n id,\n name,\n value = $bindable(),\n isinvalid,\n disabled,\n size = 'm',\n readonly,\n isclearable,\n clearlabel = 'clear content',\n }: Props = $props();\n\n const resetValue = () => (value = '');\n</script>\n\n<div\n class={[\n 'mc-datepicker mc-text-input',\n `mc-text-input--${size}`,\n `mc-datepicker--${size}`,\n isinvalid && 'is-invalid',\n ]}\n>\n <input\n class=\"mc-datepicker__control mc-text-input__control\"\n type=\"date\"\n bind:value\n {id}\n {name}\n {disabled}\n {readonly}\n aria-invalid={isinvalid}\n />\n\n {#if isclearable && value}\n <div class=\"mc-datepicker__controls-options mc-controls-options\">\n <button type=\"button\" class=\"mc-controls-options__button\" onclick={resetValue}>\n <CrossCircleFilled24 class=\"mc-controls-options__icon\" aria-hidden=\"true\" />\n <span class=\"mc-controls-options__label\">{clearlabel}</span>\n </button>\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/text-input';\n @use '@mozaic-ds/styles/components/datepicker';\n @use '@mozaic-ds/styles/components/controls-options';\n</style>\n"],"names":["
|
|
1
|
+
{"version":3,"file":"Datepicker.js","sources":["../../../src/components/datepicker/Datepicker.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-datepicker', extend: customElementForwardEvents }} />\n\n<script lang=\"ts\">\n import { customElementForwardEvents } from '../../utils';\n import CrossCircleFilled24 from '@mozaic-ds/icons-svelte/svelte/CrossCircleFilled24/CrossCircleFilled24.svelte';\n /**\n * A date picker is an input component that allows users to select a date from a calendar interface or manually enter a date value. It enhances usability by providing structured date selection, reducing input errors, and ensuring format consistency. Date Pickers are commonly used in forms, booking systems, scheduling tools, and data filtering interfaces to facilitate accurate date entry.\n */\n interface Props {\n /**\n * A unique identifier for the datepicker element, used to associate the label with the form element.\n */\n id: string;\n /**\n * The name attribute for the datepicker element, typically used for form submission.\n */\n name?: string;\n /**\n * The current value of the datepicker field.\n */\n value?: string | number;\n /**\n * If `true`, applies an invalid state to the datepicker.\n */\n isinvalid?: boolean;\n /**\n * If `true`, disables the datepicker, making it non-interactive.\n */\n disabled?: boolean;\n /**\n * Determines the size of the datepicker.\n */\n size?: 's' | 'm';\n /**\n * If `true`, the datepicker is read-only (cannot be edited).\n */\n readonly?: boolean;\n /**\n * If `true`, a clear button will appear when the datepicker has a value.\n */\n isclearable?: boolean;\n /**\n * The label text for the clear button.\n */\n clearlabel?: string;\n }\n\n let {\n id,\n name,\n value = $bindable(),\n isinvalid,\n disabled,\n size = 'm',\n readonly,\n isclearable,\n clearlabel = 'clear content',\n }: Props = $props();\n\n const resetValue = () => (value = '');\n</script>\n\n<div\n class={[\n 'mc-datepicker mc-text-input',\n `mc-text-input--${size}`,\n `mc-datepicker--${size}`,\n isinvalid && 'is-invalid',\n ]}\n>\n <input\n class=\"mc-datepicker__control mc-text-input__control\"\n type=\"date\"\n bind:value\n {id}\n {name}\n {disabled}\n {readonly}\n aria-invalid={isinvalid}\n />\n\n {#if isclearable && value}\n <div class=\"mc-datepicker__controls-options mc-controls-options\">\n <button type=\"button\" class=\"mc-controls-options__button\" onclick={resetValue}>\n <CrossCircleFilled24 class=\"mc-controls-options__icon\" aria-hidden=\"true\" />\n <span class=\"mc-controls-options__label\">{clearlabel}</span>\n </button>\n </div>\n {/if}\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/text-input';\n @use '@mozaic-ds/styles/components/datepicker';\n @use '@mozaic-ds/styles/components/controls-options';\n</style>\n"],"names":["id","$.prop","$$props","name","value","isinvalid","disabled","size","readonly","isclearable","clearlabel","resetValue","$$render","consequent","customElementForwardEvents"],"mappings":";;;;;i/LAAA,oBAgDIA,EAAEC,EAAAC,EAAA,KAAA,CAAA,EACFC,EAAIF,EAAAC,EAAA,OAAA,CAAA,EACJE,EAAKH,EAAAC,EAAA,QAAA,EAAA,EACLG,EAASJ,EAAAC,EAAA,YAAA,CAAA,EACTI,EAAQL,EAAAC,EAAA,WAAA,CAAA,EACRK,eAAO,GAAG,EACVC,EAAQP,EAAAC,EAAA,WAAA,CAAA,EACRO,EAAWR,EAAAC,EAAA,cAAA,CAAA,EACXQ,qBAAa,eAAe,QAGxBC,EAAU,IAAUP,EAAQ,EAAE,4RAN3B,IAAG,yKAGG,gBAAe,iFA2ByCO,2HAEvBD,EAAU,CAAA,CAAA,kBAJrDD,EAAW,GAAIL,KAAKQ,EAAAC,CAAA,gCAjBvB,gDACkBN,EAAI,CAAA,qBACJA,EAAI,CAAA,GACtBF,KAAa,+GAWCA,GAAS,sBAlB3B,mKA5D8DS"}
|
|
@@ -96,8 +96,8 @@
|
|
|
96
96
|
.mc-text-input {
|
|
97
97
|
transition: box-shadow 200ms ease;
|
|
98
98
|
background-color: var(--forms-color-background-default, #ffffff);
|
|
99
|
-
border: var(--border-s,
|
|
100
|
-
border-radius: var(--forms-radius
|
|
99
|
+
border: var(--border-width-s, 0.0625rem) solid var(--forms-color-border-default, #666666);
|
|
100
|
+
border-radius: var(--forms-border-radius, 0.25rem);
|
|
101
101
|
transition: all ease 200ms;
|
|
102
102
|
color: var(--forms-color-text-default, #000000);
|
|
103
103
|
display: block;
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
}
|
|
152
152
|
.mc-text-input:hover:not(:focus-within) {
|
|
153
153
|
border-color: var(--forms-color-border-hover, #4d4d4d);
|
|
154
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
154
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-hover, #4d4d4d);
|
|
155
155
|
}
|
|
156
156
|
.mc-text-input:has(input:disabled) {
|
|
157
157
|
background-color: var(--forms-color-background-disabled, #d9d9d9);
|
|
@@ -193,11 +193,11 @@
|
|
|
193
193
|
}
|
|
194
194
|
.mc-text-input.is-invalid {
|
|
195
195
|
border-color: var(--forms-color-border-invalid, #ea302d);
|
|
196
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
196
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);
|
|
197
197
|
}
|
|
198
198
|
.mc-text-input.is-invalid:hover:not(:focus-within) {
|
|
199
199
|
border-color: var(--forms-color-border-invalid-hover, #c61112);
|
|
200
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
200
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);
|
|
201
201
|
}
|
|
202
202
|
.mc-text-input * {
|
|
203
203
|
box-sizing: border-box;
|
|
@@ -205,7 +205,7 @@
|
|
|
205
205
|
|
|
206
206
|
/* stylelint-enable string-no-newline */
|
|
207
207
|
.mc-datepicker {
|
|
208
|
-
border-radius: var(--radius-s, 0.25rem);
|
|
208
|
+
border-radius: var(--border-radius-s, 0.25rem);
|
|
209
209
|
position: relative;
|
|
210
210
|
}
|
|
211
211
|
.mc-datepicker__control {
|
|
@@ -228,11 +228,11 @@
|
|
|
228
228
|
}
|
|
229
229
|
.mc-datepicker__control.is-invalid {
|
|
230
230
|
border-color: var(--forms-color-border-invalid, #ea302d);
|
|
231
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
231
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid, #ea302d);
|
|
232
232
|
}
|
|
233
233
|
.mc-datepicker__control.is-invalid:hover:not(:focus-within) {
|
|
234
234
|
border-color: var(--forms-color-border-invalid-hover, #c61112);
|
|
235
|
-
box-shadow: 0 0 0 var(--border-s,
|
|
235
|
+
box-shadow: 0 0 0 var(--border-width-s, 0.0625rem) var(--forms-color-border-invalid-hover, #c61112);
|
|
236
236
|
}
|
|
237
237
|
.mc-datepicker__control:disabled {
|
|
238
238
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' aria-hidden='true' height='1.5rem' width='1.5rem' fill='var(--forms-color-icon-disabled, %23737373)' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M8.5 3c0-.55228-.44772-1-1-1s-1 .44772-1 1v1H3c-.55228 0-1 .44772-1 1v16c0 .5523.44772 1 1 1h18c.5523 0 1-.4477 1-1V5c0-.55228-.4477-1-1-1h-3.5V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H13V3c0-.55228-.4477-1-1-1s-1 .44772-1 1v1H8.5V3Zm7 3H13v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6H8.5v1c0 .55228-.44772 1-1 1s-1-.44772-1-1V6H4v3.5h16V6h-2.5v1c0 .55228-.4477 1-1 1s-1-.44772-1-1V6ZM4 11.5V20h16v-8.5H4Z'/%3E%3C/svg%3E");
|
|
@@ -295,7 +295,7 @@
|
|
|
295
295
|
appearance: none;
|
|
296
296
|
cursor: pointer;
|
|
297
297
|
padding: 0;
|
|
298
|
-
border-radius: var(--radius-full, 100%);
|
|
298
|
+
border-radius: var(--border-radius-full, 100%);
|
|
299
299
|
}
|
|
300
300
|
.mc-controls-options__button:hover .mc-controls-options__icon {
|
|
301
301
|
fill: var(--forms-color-icon-clear-hover, #4d4d4d);
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{c as m,p as f,a as h,b as d,f as p,s as u,d as g,t as y,i as z,j as b,k as o,r as k,e as _,g as w}from"../../custom-element.js";import{s as x}from"../../slot.js";var D=p('<div class="mc-divider svelte-a5fs23"><div></div> <!></div>');const j={hash:"svelte-a5fs23",code:`/**
|
|
2
|
+
* Do not edit directly, this file was auto-generated.
|
|
3
|
+
*/.mc-divider.svelte-a5fs23 {position:relative;}.mc-divider-horizontal.svelte-a5fs23 {background:var(--divider-color-primary, #cccccc);height:0.0625rem;}.mc-divider-horizontal--secondary.svelte-a5fs23 {background:var(--divider-color-secondary, #999999);}.mc-divider-horizontal--tertiary.svelte-a5fs23 {background:var(--divider-color-tertiary, #333333);}.mc-divider-horizontal--inverse.svelte-a5fs23 {background:var(--divider-color-inverse, #ffffff);}.mc-divider-horizontal--m.svelte-a5fs23 {height:0.25rem;}.mc-divider-horizontal--l.svelte-a5fs23 {height:0.5rem;}.mc-divider-vertical.svelte-a5fs23 {background:var(--divider-color-primary, #cccccc);width:0.0625rem;}.mc-divider-vertical--secondary.svelte-a5fs23 {background:var(--divider-color-secondary, #999999);}.mc-divider-vertical--tertiary.svelte-a5fs23 {background:var(--divider-color-tertiary, #333333);}.mc-divider-vertical--inverse.svelte-a5fs23 {background:var(--divider-color-inverse, #ffffff);}.mc-divider-vertical--m.svelte-a5fs23 {height:0.25rem;}.mc-divider-vertical--l.svelte-a5fs23 {height:0.5rem;}.mc-divider-vertical.svelte-a5fs23 {content:"";display:block;height:100%;position:absolute;top:50%;transform:translateY(-50%);}`};function E(c,e){f(e,!0),h(c,j);let i=d(e,"orientation",7,"horizontal"),a=d(e,"appearance",7,"primary"),t=d(e,"size",7,"s");var l={get orientation(){return i()},set orientation(r="horizontal"){i(r),o()},get appearance(){return a()},set appearance(r="primary"){a(r),o()},get size(){return t()},set size(r="s"){t(r),o()}},s=D(),v=g(s),n=u(v,2);return x(n,e,"default",{}),k(s),y(()=>_(v,1,w([`mc-divider-${i()}`,`mc-divider-horizontal--${a()}`,`mc-divider-horizontal--${t()}`]),"svelte-a5fs23")),z(c,s),b(l)}customElements.define("m-divider",m(E,{orientation:{},appearance:{},size:{}},["default"],[],!0));
|
|
4
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.js","sources":["../../../src/components/divider/Divider.svelte"],"sourcesContent":["<svelte:options customElement={{ tag: 'm-divider' }} />\n\n<script lang=\"ts\">\n /**\n * A divider is a visual element used to separate content or sections within an interface. It helps improve readability and organization by creating clear distinctions between groups of information. Dividers can be thin lines, thick separators, or even styled with spacing variations, adapting to different layouts. They are commonly used in menus, lists, forms, and content blocks to create a structured visual hierarchy.\n *\n * @slot default - Use this slot to insert the content who need a vertical divider\n */\n interface Props {\n /**\n * Determines the orientation of the divider.\n */\n orientation?: 'vertical' | 'horizontal';\n /**\n * Determines the appearance of the divider.\n */\n appearance?: 'primary' | 'secondary' | 'tertiary' | 'inverse';\n /**\n * Determines the size of the divider.\n */\n size?: 's' | 'm' | 'l';\n }\n\n let { orientation = 'horizontal', appearance = 'primary', size = 's' }: Props = $props();\n</script>\n\n<div class=\"mc-divider\">\n <div\n class={[\n `mc-divider-${orientation}`,\n `mc-divider-horizontal--${appearance}`,\n `mc-divider-horizontal--${size}`,\n ]}\n ></div>\n <slot />\n</div>\n\n<style lang=\"scss\">\n @use '@mozaic-ds/styles/components/divider';\n\n .mc-divider-vertical {\n content: '';\n display: block;\n height: 100%;\n position: absolute;\n top: 50%;\n transform: translateY(-50%);\n }\n</style>\n"],"names":["orientation","appearance","size"],"mappings":";;2rCAAA,gBAuBQ,IAAAA,sBAAc,YAAY,EAAEC,qBAAa,SAAS,EAAEC,eAAO,GAAG,yDAAhD,aAAY,yDAAe,UAAS,6CAAS,IAAG,+FAMlDF,EAAW,CAAA,6BACCC,EAAU,CAAA,6BACVC,GAAI,kCAPpC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { describe, it, expect } from 'vitest';
|
|
2
|
+
import { render } from '@testing-library/svelte';
|
|
3
|
+
import Divider from './Divider.svelte';
|
|
4
|
+
describe('m-divider component', () => {
|
|
5
|
+
it('renders with default classes', () => {
|
|
6
|
+
const { container } = render(Divider, {
|
|
7
|
+
props: {},
|
|
8
|
+
});
|
|
9
|
+
const wrapper = container.querySelector('.mc-divider');
|
|
10
|
+
const divider = wrapper.querySelector('div');
|
|
11
|
+
expect(wrapper).toBeTruthy();
|
|
12
|
+
expect(divider).toBeTruthy();
|
|
13
|
+
expect(divider.classList.contains('mc-divider-horizontal--primary')).toBe(true);
|
|
14
|
+
expect(divider.classList.contains('mc-divider-horizontal--s')).toBe(true);
|
|
15
|
+
expect(divider.classList.contains('mc-divider-vertical')).toBe(false);
|
|
16
|
+
});
|
|
17
|
+
it('applies correct classes for vertical orientation', () => {
|
|
18
|
+
const { container } = render(Divider, {
|
|
19
|
+
props: {
|
|
20
|
+
orientation: 'vertical',
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
const divider = container.querySelector('.mc-divider > div');
|
|
24
|
+
expect(divider.classList.contains('mc-divider-vertical')).toBe(true);
|
|
25
|
+
});
|
|
26
|
+
it('applies correct classes for appearance and size props', () => {
|
|
27
|
+
const { container } = render(Divider, {
|
|
28
|
+
props: {
|
|
29
|
+
appearance: 'secondary',
|
|
30
|
+
size: 'l',
|
|
31
|
+
},
|
|
32
|
+
});
|
|
33
|
+
const divider = container.querySelector('.mc-divider > div');
|
|
34
|
+
expect(divider.classList.contains('mc-divider-horizontal--secondary')).toBe(true);
|
|
35
|
+
expect(divider.classList.contains('mc-divider-horizontal--l')).toBe(true);
|
|
36
|
+
});
|
|
37
|
+
it('combines all prop-driven classes correctly', () => {
|
|
38
|
+
const { container } = render(Divider, {
|
|
39
|
+
props: {
|
|
40
|
+
orientation: 'vertical',
|
|
41
|
+
appearance: 'tertiary',
|
|
42
|
+
size: 'm',
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
const divider = container.querySelector('.mc-divider > div');
|
|
46
|
+
expect(divider.classList.contains('mc-divider-vertical')).toBe(true);
|
|
47
|
+
expect(divider.classList.contains('mc-divider-horizontal--tertiary')).toBe(true);
|
|
48
|
+
expect(divider.classList.contains('mc-divider-horizontal--m')).toBe(true);
|
|
49
|
+
});
|
|
50
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
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 Standard: Story;
|
|
6
|
+
export declare const Vertical: Story;
|
|
7
|
+
export declare const Size: Story;
|
|
8
|
+
export declare const Secondary: Story;
|
|
9
|
+
//# sourceMappingURL=Divider.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.stories.d.ts","sourceRoot":"","sources":["../../../src/components/divider/Divider.stories.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAKrE,QAAA,MAAM,IAAI,EAAE,IA6BX,CAAC;AACF,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC;AAEtB,eAAO,MAAM,QAAQ,EAAE,KAAU,CAAC;AAElC,eAAO,MAAM,QAAQ,EAAE,KAetB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,KAElB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,KAEvB,CAAC"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { ifDefined } from 'lit-html/directives/if-defined.js';
|
|
3
|
+
import { unsafeHTML } from 'lit/directives/unsafe-html.js';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'Structure/Divider',
|
|
6
|
+
component: 'm-divider',
|
|
7
|
+
tags: ['v2'],
|
|
8
|
+
argTypes: {
|
|
9
|
+
size: {
|
|
10
|
+
control: 'inline-radio',
|
|
11
|
+
options: ['s', 'm', 'l'],
|
|
12
|
+
},
|
|
13
|
+
orientation: {
|
|
14
|
+
control: 'radio',
|
|
15
|
+
options: ['vertical', 'horizontal'],
|
|
16
|
+
},
|
|
17
|
+
appearance: {
|
|
18
|
+
control: 'radio',
|
|
19
|
+
options: ['primary', 'secondary', 'tertiary', 'inverse'],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
render: (args) => html `
|
|
23
|
+
<div>
|
|
24
|
+
<m-divider
|
|
25
|
+
orientation=${ifDefined(args.orientation)}
|
|
26
|
+
appearance=${ifDefined(args.appearance)}
|
|
27
|
+
size=${ifDefined(args.size)}
|
|
28
|
+
>${unsafeHTML(ifDefined(args.default))}</m-divider
|
|
29
|
+
>
|
|
30
|
+
<p style="padding: 1rem">Horizontal Divider</p>
|
|
31
|
+
</div>
|
|
32
|
+
`,
|
|
33
|
+
};
|
|
34
|
+
export default meta;
|
|
35
|
+
export const Standard = {};
|
|
36
|
+
export const Vertical = {
|
|
37
|
+
args: {
|
|
38
|
+
orientation: 'vertical',
|
|
39
|
+
default: `<p style="padding: 1rem">Vertical Divider</p>`,
|
|
40
|
+
},
|
|
41
|
+
render: (args) => html `
|
|
42
|
+
<div>
|
|
43
|
+
<m-divider
|
|
44
|
+
orientation=${ifDefined(args.orientation)}
|
|
45
|
+
appearance=${ifDefined(args.appearance)}
|
|
46
|
+
size=${ifDefined(args.size)}
|
|
47
|
+
>${unsafeHTML(ifDefined(args.default))}</m-divider
|
|
48
|
+
>
|
|
49
|
+
</div>
|
|
50
|
+
`,
|
|
51
|
+
};
|
|
52
|
+
export const Size = {
|
|
53
|
+
args: { size: 'm' },
|
|
54
|
+
};
|
|
55
|
+
export const Secondary = {
|
|
56
|
+
args: { appearance: 'secondary' },
|
|
57
|
+
};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
<svelte:options customElement={{ tag: 'm-divider' }} />
|
|
2
|
+
|
|
3
|
+
<script lang="ts">
|
|
4
|
+
/**
|
|
5
|
+
* A divider is a visual element used to separate content or sections within an interface. It helps improve readability and organization by creating clear distinctions between groups of information. Dividers can be thin lines, thick separators, or even styled with spacing variations, adapting to different layouts. They are commonly used in menus, lists, forms, and content blocks to create a structured visual hierarchy.
|
|
6
|
+
*
|
|
7
|
+
* @slot default - Use this slot to insert the content who need a vertical divider
|
|
8
|
+
*/
|
|
9
|
+
interface Props {
|
|
10
|
+
/**
|
|
11
|
+
* Determines the orientation of the divider.
|
|
12
|
+
*/
|
|
13
|
+
orientation?: 'vertical' | 'horizontal';
|
|
14
|
+
/**
|
|
15
|
+
* Determines the appearance of the divider.
|
|
16
|
+
*/
|
|
17
|
+
appearance?: 'primary' | 'secondary' | 'tertiary' | 'inverse';
|
|
18
|
+
/**
|
|
19
|
+
* Determines the size of the divider.
|
|
20
|
+
*/
|
|
21
|
+
size?: 's' | 'm' | 'l';
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
let { orientation = 'horizontal', appearance = 'primary', size = 's' }: Props = $props();
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<div class="mc-divider">
|
|
28
|
+
<div
|
|
29
|
+
class={[
|
|
30
|
+
`mc-divider-${orientation}`,
|
|
31
|
+
`mc-divider-horizontal--${appearance}`,
|
|
32
|
+
`mc-divider-horizontal--${size}`,
|
|
33
|
+
]}
|
|
34
|
+
></div>
|
|
35
|
+
<slot />
|
|
36
|
+
</div>
|
|
37
|
+
|
|
38
|
+
<style>/**
|
|
39
|
+
* Do not edit directly, this file was auto-generated.
|
|
40
|
+
*/
|
|
41
|
+
.mc-divider {
|
|
42
|
+
position: relative;
|
|
43
|
+
}
|
|
44
|
+
.mc-divider-horizontal {
|
|
45
|
+
background: var(--divider-color-primary, #cccccc);
|
|
46
|
+
height: 0.0625rem;
|
|
47
|
+
}
|
|
48
|
+
.mc-divider-horizontal--secondary {
|
|
49
|
+
background: var(--divider-color-secondary, #999999);
|
|
50
|
+
}
|
|
51
|
+
.mc-divider-horizontal--tertiary {
|
|
52
|
+
background: var(--divider-color-tertiary, #333333);
|
|
53
|
+
}
|
|
54
|
+
.mc-divider-horizontal--inverse {
|
|
55
|
+
background: var(--divider-color-inverse, #ffffff);
|
|
56
|
+
}
|
|
57
|
+
.mc-divider-horizontal--m {
|
|
58
|
+
height: 0.25rem;
|
|
59
|
+
}
|
|
60
|
+
.mc-divider-horizontal--l {
|
|
61
|
+
height: 0.5rem;
|
|
62
|
+
}
|
|
63
|
+
.mc-divider-vertical {
|
|
64
|
+
background: var(--divider-color-primary, #cccccc);
|
|
65
|
+
width: 0.0625rem;
|
|
66
|
+
}
|
|
67
|
+
.mc-divider-vertical--secondary {
|
|
68
|
+
background: var(--divider-color-secondary, #999999);
|
|
69
|
+
}
|
|
70
|
+
.mc-divider-vertical--tertiary {
|
|
71
|
+
background: var(--divider-color-tertiary, #333333);
|
|
72
|
+
}
|
|
73
|
+
.mc-divider-vertical--inverse {
|
|
74
|
+
background: var(--divider-color-inverse, #ffffff);
|
|
75
|
+
}
|
|
76
|
+
.mc-divider-vertical--m {
|
|
77
|
+
height: 0.25rem;
|
|
78
|
+
}
|
|
79
|
+
.mc-divider-vertical--l {
|
|
80
|
+
height: 0.5rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.mc-divider-vertical {
|
|
84
|
+
content: "";
|
|
85
|
+
display: block;
|
|
86
|
+
height: 100%;
|
|
87
|
+
position: absolute;
|
|
88
|
+
top: 50%;
|
|
89
|
+
transform: translateY(-50%);
|
|
90
|
+
}</style>
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A divider is a visual element used to separate content or sections within an interface. It helps improve readability and organization by creating clear distinctions between groups of information. Dividers can be thin lines, thick separators, or even styled with spacing variations, adapting to different layouts. They are commonly used in menus, lists, forms, and content blocks to create a structured visual hierarchy.
|
|
3
|
+
*
|
|
4
|
+
* @slot default - Use this slot to insert the content who need a vertical divider
|
|
5
|
+
*/
|
|
6
|
+
interface Props {
|
|
7
|
+
/**
|
|
8
|
+
* Determines the orientation of the divider.
|
|
9
|
+
*/
|
|
10
|
+
orientation?: 'vertical' | 'horizontal';
|
|
11
|
+
/**
|
|
12
|
+
* Determines the appearance of the divider.
|
|
13
|
+
*/
|
|
14
|
+
appearance?: 'primary' | 'secondary' | 'tertiary' | 'inverse';
|
|
15
|
+
/**
|
|
16
|
+
* Determines the size of the divider.
|
|
17
|
+
*/
|
|
18
|
+
size?: 's' | 'm' | 'l';
|
|
19
|
+
}
|
|
20
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
21
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
22
|
+
$$bindings?: Bindings;
|
|
23
|
+
} & Exports;
|
|
24
|
+
(internal: unknown, props: Props & {
|
|
25
|
+
$$events?: Events;
|
|
26
|
+
$$slots?: Slots;
|
|
27
|
+
}): Exports & {
|
|
28
|
+
$set?: any;
|
|
29
|
+
$on?: any;
|
|
30
|
+
};
|
|
31
|
+
z_$$bindings?: Bindings;
|
|
32
|
+
}
|
|
33
|
+
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
34
|
+
default: any;
|
|
35
|
+
} ? Props extends Record<string, never> ? any : {
|
|
36
|
+
children?: any;
|
|
37
|
+
} : {});
|
|
38
|
+
declare const Divider: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<Props, {
|
|
39
|
+
default: {};
|
|
40
|
+
}>, {
|
|
41
|
+
[evt: string]: CustomEvent<any>;
|
|
42
|
+
}, {
|
|
43
|
+
default: {};
|
|
44
|
+
}, {}, "">;
|
|
45
|
+
type Divider = InstanceType<typeof Divider>;
|
|
46
|
+
export default Divider;
|
|
47
|
+
//# sourceMappingURL=Divider.svelte.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Divider.svelte.d.ts","sourceRoot":"","sources":["../../../src/components/divider/Divider.svelte.ts"],"names":[],"mappings":"AAGE;;;;GAIG;AACH,UAAU,KAAK;IACb;;OAEG;IACH,WAAW,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;IACxC;;OAEG;IACH,UAAU,CAAC,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,GAAG,SAAS,CAAC;IAC9D;;OAEG;IACH,IAAI,CAAC,EAAE,GAAG,GAAG,GAAG,GAAG,GAAG,CAAC;CACxB;AAsBH,UAAU,kCAAkC,CAAC,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,GAAG,EAAE,OAAO,GAAG,EAAE,EAAE,QAAQ,GAAG,MAAM;IACpM,KAAK,OAAO,EAAE,OAAO,QAAQ,EAAE,2BAA2B,CAAC,KAAK,CAAC,GAAG,OAAO,QAAQ,EAAE,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,GAAG;QAAE,UAAU,CAAC,EAAE,QAAQ,CAAA;KAAE,GAAG,OAAO,CAAC;IACjK,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,GAAG;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,KAAK,CAAA;KAAC,GAAG,OAAO,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAC;QAAC,GAAG,CAAC,EAAE,GAAG,CAAA;KAAE,CAAC;IAC9G,YAAY,CAAC,EAAE,QAAQ,CAAC;CAC3B;AACD,KAAK,gCAAgC,CAAC,KAAK,EAAE,KAAK,IAAI,KAAK,GACvD,CAAC,KAAK,SAAS;IAAE,OAAO,EAAE,GAAG,CAAA;CAAE,GACzB,KAAK,SAAS,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,GACnC,GAAG,GACH;IAAE,QAAQ,CAAC,EAAE,GAAG,CAAA;CAAE,GAClB,EAAE,CAAC,CAAC;AAId,QAAA,MAAM,OAAO;;;;;;UAAqF,CAAC;AACjF,KAAK,OAAO,GAAG,YAAY,CAAC,OAAO,OAAO,CAAC,CAAC;AAC9C,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# `m-divider`
|
|
2
|
+
|
|
3
|
+
A divider is a visual element used to separate content or sections within an interface. It helps improve readability and organization by creating clear distinctions between groups of information. Dividers can be thin lines, thick separators, or even styled with spacing variations, adapting to different layouts. They are commonly used in menus, lists, forms, and content blocks to create a structured visual hierarchy.
|
|
4
|
+
|
|
5
|
+
## Props
|
|
6
|
+
|
|
7
|
+
| Name | Description | Type | Default |
|
|
8
|
+
|------|-------------|------|---------|
|
|
9
|
+
| `orientation` | Determines the orientation of the divider. | `'vertical'` `'horizontal'` | `horizontal` |
|
|
10
|
+
| `appearance` | Determines the appearance of the divider. | `'primary'` `'secondary'` `'tertiary'` `'inverse'` | `primary` |
|
|
11
|
+
| `size` | Determines the size of the divider. | `'s'` `'m'` `'l'` | `s` |
|
|
12
|
+
|
|
13
|
+
## Slots
|
|
14
|
+
|
|
15
|
+
| Name | Description |
|
|
16
|
+
|------|-------------|
|
|
17
|
+
| `default` | Use this slot to insert the content who need a vertical divider |
|
|
18
|
+
|