@skeletonlabs/skeleton 0.132.5 → 1.0.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 +7 -6
- package/components/Accordion/Accordion.svelte.d.ts +3 -3
- package/components/Accordion/AccordionItem.svelte +1 -1
- package/components/AppBar/AppBar.svelte.d.ts +2 -2
- package/components/AppRail/AppRailTile.svelte +1 -1
- package/components/AppRail/AppRailTile.svelte.d.ts +4 -4
- package/components/AppShell/AppShell.svelte +1 -1
- package/components/AppShell/AppShell.svelte.d.ts +8 -8
- package/components/Avatar/Avatar.svelte +1 -1
- package/components/ConicGradient/ConicGradient.svelte +2 -2
- package/components/ConicGradient/ConicGradient.svelte.d.ts +6 -6
- package/components/FileButton/FileButton.svelte +9 -3
- package/components/FileButton/FileButton.svelte.d.ts +2 -0
- package/components/FileDropzone/FileDropzone.svelte +5 -2
- package/components/FileDropzone/FileDropzone.svelte.d.ts +7 -5
- package/components/InputChip/InputChip.svelte +1 -0
- package/components/ListBox/ListBox.svelte +1 -1
- package/components/ListBox/ListBox.svelte.d.ts +1 -0
- package/components/ProgressBar/ProgressBar.svelte +1 -1
- package/components/ProgressRadial/ProgressRadial.svelte +3 -2
- package/components/ProgressRadial/ProgressRadial.svelte.d.ts +2 -0
- package/components/Radio/RadioGroup.svelte.d.ts +1 -0
- package/components/Radio/RadioItem.svelte +3 -1
- package/components/Radio/RadioItem.svelte.d.ts +2 -0
- package/components/RangeSlider/RangeSlider.svelte +1 -1
- package/components/Stepper/Step.svelte +10 -3
- package/components/Stepper/Step.svelte.d.ts +3 -0
- package/components/Stepper/Stepper.svelte +8 -1
- package/components/Stepper/Stepper.svelte.d.ts +11 -3
- package/components/Tab/Tab.svelte +2 -1
- package/components/Tab/Tab.svelte.d.ts +2 -0
- package/components/Tab/TabGroup.svelte +4 -2
- package/components/Tab/TabGroup.svelte.d.ts +2 -0
- package/components/Table/Table.svelte +2 -0
- package/components/Table/Table.svelte.d.ts +2 -0
- package/components/TableOfContents/TableOfContents.svelte +25 -18
- package/package.json +1 -1
- package/styles/elements/buttons.css +4 -0
- package/styles/elements/forms.css +4 -1
- package/styles/elements/logo-clouds.css +1 -1
- package/styles/elements/tables.css +4 -3
- package/styles/tailwind.css +1 -1
- package/styles/typography.css +12 -10
- package/styles/variants.css +3 -1
- package/tailwind/generated/intellisense-classes.cjs +1 -1
- package/tailwind/generated/intellisense-classes.d.cts +230 -121
- package/tailwind/tokens/backgrounds.cjs +1 -1
- package/tailwind/tokens/border-radius.cjs +1 -1
- package/tailwind/tokens/borders.cjs +1 -1
- package/tailwind/tokens/fills.cjs +1 -1
- package/tailwind/tokens/rings.cjs +1 -1
- package/tailwind/tokens/text.cjs +1 -1
- package/themes/theme-gold-nouveau.css +3 -10
- package/themes/theme-rocket.css +5 -5
- package/themes/theme-skeleton.css +3 -14
- package/types/tailwind.d.ts +1 -1
- package/types/tailwind.js +1 -1
- package/utilities/CodeBlock/CodeBlock.svelte.d.ts +9 -9
- package/utilities/Drawer/Drawer.svelte.d.ts +2 -2
- package/utilities/Drawer/types.d.ts +3 -3
- package/utilities/LightSwitch/LightSwitch.svelte +2 -2
- package/utilities/Modal/Modal.svelte.d.ts +1 -1
- package/utilities/Modal/types.d.ts +5 -5
- package/utilities/Popup/popup.js +10 -6
- package/utilities/Toast/types.d.ts +1 -4
|
@@ -132,16 +132,9 @@
|
|
|
132
132
|
|
|
133
133
|
/* Applied to body with `<body data-theme="gold-nouveau">` */
|
|
134
134
|
/* Created with: https://csshero.org/mesher/ */
|
|
135
|
+
/* prettier-ignore */
|
|
135
136
|
[data-theme='gold-nouveau'] {
|
|
136
|
-
background: #e5dcef;
|
|
137
|
-
/* prettier-ignore */
|
|
138
137
|
background-image:
|
|
139
|
-
radial-gradient(at
|
|
140
|
-
radial-gradient(at
|
|
141
|
-
}
|
|
142
|
-
.dark [data-theme='gold-nouveau'] {
|
|
143
|
-
/* prettier-ignore */
|
|
144
|
-
background-image:
|
|
145
|
-
radial-gradient(at 77% 0%, hsla(37, 81%, 56%, 0.1) 0px, transparent 50%),
|
|
146
|
-
radial-gradient(at 7% 0%, hsla(37, 81%, 56%, 0) 0px, transparent 50%);
|
|
138
|
+
radial-gradient(at 0% 100%, rgba(var(--color-secondary-500) / 0.33) 0px, transparent 50%),
|
|
139
|
+
radial-gradient(at 98% 100%, rgba(var(--color-error-500) / 0.33) 0px, transparent 50%);
|
|
147
140
|
}
|
package/themes/theme-rocket.css
CHANGED
|
@@ -110,10 +110,10 @@
|
|
|
110
110
|
}
|
|
111
111
|
|
|
112
112
|
/* Applied to body with `<body data-theme="rocket">` */
|
|
113
|
-
/*
|
|
113
|
+
/* Created with: https://csshero.org/mesher/ */
|
|
114
|
+
/* prettier-ignore */
|
|
114
115
|
[data-theme='rocket'] {
|
|
115
|
-
background-image:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 304 304' width='304' height='304'%3E%3Cpath fill='%233c4653' fill-opacity='0.2' d='M44.1 224a5 5 0 1 1 0 2H0v-2h44.1zm160 48a5 5 0 1 1 0 2H82v-2h122.1zm57.8-46a5 5 0 1 1 0-2H304v2h-42.1zm0 16a5 5 0 1 1 0-2H304v2h-42.1zm6.2-114a5 5 0 1 1 0 2h-86.2a5 5 0 1 1 0-2h86.2zm-256-48a5 5 0 1 1 0 2H0v-2h12.1zm185.8 34a5 5 0 1 1 0-2h86.2a5 5 0 1 1 0 2h-86.2zM258 12.1a5 5 0 1 1-2 0V0h2v12.1zm-64 208a5 5 0 1 1-2 0v-54.2a5 5 0 1 1 2 0v54.2zm48-198.2V80h62v2h-64V21.9a5 5 0 1 1 2 0zm16 16V64h46v2h-48V37.9a5 5 0 1 1 2 0zm-128 96V208h16v12.1a5 5 0 1 1-2 0V210h-16v-76.1a5 5 0 1 1 2 0zm-5.9-21.9a5 5 0 1 1 0 2H114v48H85.9a5 5 0 1 1 0-2H112v-48h12.1zm-6.2 130a5 5 0 1 1 0-2H176v-74.1a5 5 0 1 1 2 0V242h-60.1zm-16-64a5 5 0 1 1 0-2H114v48h10.1a5 5 0 1 1 0 2H112v-48h-10.1zM66 284.1a5 5 0 1 1-2 0V274H50v30h-2v-32h18v12.1zM236.1 176a5 5 0 1 1 0 2H226v94h48v32h-2v-30h-48v-98h12.1zm25.8-30a5 5 0 1 1 0-2H274v44.1a5 5 0 1 1-2 0V146h-10.1zm-64 96a5 5 0 1 1 0-2H208v-80h16v-14h-42.1a5 5 0 1 1 0-2H226v18h-16v80h-12.1zm86.2-210a5 5 0 1 1 0 2H272V0h2v32h10.1zM98 101.9V146H53.9a5 5 0 1 1 0-2H96v-42.1a5 5 0 1 1 2 0zM53.9 34a5 5 0 1 1 0-2H80V0h2v34H53.9zm60.1 3.9V66H82v64H69.9a5 5 0 1 1 0-2H80V64h32V37.9a5 5 0 1 1 2 0zM101.9 82a5 5 0 1 1 0-2H128V37.9a5 5 0 1 1 2 0V82h-28.1zm16-64a5 5 0 1 1 0-2H146v44.1a5 5 0 1 1-2 0V18h-26.1zm102.2 270a5 5 0 1 1 0 2H98v14h-2v-16h124.1zM242 149.9V160h16v34h-16v62h48v48h-2v-46h-48v-66h16v-30h-16v-12.1a5 5 0 1 1 2 0zM53.9 18a5 5 0 1 1 0-2H64V2H48V0h18v18H53.9zm112 32a5 5 0 1 1 0-2H192V0h50v2h-48v48h-28.1zm-48-48a5 5 0 0 1-9.8-2h2.07a3 3 0 1 0 5.66 0H178v34h-18V21.9a5 5 0 1 1 2 0V32h14V2h-58.1zm0 96a5 5 0 1 1 0-2H137l32-32h39V21.9a5 5 0 1 1 2 0V66h-40.17l-32 32H117.9zm28.1 90.1a5 5 0 1 1-2 0v-76.51L175.59 80H224V21.9a5 5 0 1 1 2 0V82h-49.59L146 112.41v75.69zm16 32a5 5 0 1 1-2 0v-99.51L184.59 96H300.1a5 5 0 0 1 3.9-3.9v2.07a3 3 0 0 0 0 5.66v2.07a5 5 0 0 1-3.9-3.9H185.41L162 121.41v98.69zm-144-64a5 5 0 1 1-2 0v-3.51l48-48V48h32V0h2v50H66v55.41l-48 48v2.69zM50 53.9v43.51l-48 48V208h26.1a5 5 0 1 1 0 2H0v-65.41l48-48V53.9a5 5 0 1 1 2 0zm-16 16V89.41l-34 34v-2.82l32-32V69.9a5 5 0 1 1 2 0zM12.1 32a5 5 0 1 1 0 2H9.41L0 43.41V40.6L8.59 32h3.51zm265.8 18a5 5 0 1 1 0-2h18.69l7.41-7.41v2.82L297.41 50H277.9zm-16 160a5 5 0 1 1 0-2H288v-71.41l16-16v2.82l-14 14V210h-28.1zm-208 32a5 5 0 1 1 0-2H64v-22.59L40.59 194H21.9a5 5 0 1 1 0-2H41.41L66 216.59V242H53.9zm150.2 14a5 5 0 1 1 0 2H96v-56.6L56.6 162H37.9a5 5 0 1 1 0-2h19.5L98 200.6V256h106.1zm-150.2 2a5 5 0 1 1 0-2H80v-46.59L48.59 178H21.9a5 5 0 1 1 0-2H49.41L82 208.59V258H53.9zM34 39.8v1.61L9.41 66H0v-2h8.59L32 40.59V0h2v39.8zM2 300.1a5 5 0 0 1 3.9 3.9H3.83A3 3 0 0 0 0 302.17V256h18v48h-2v-46H2v42.1zM34 241v63h-2v-62H0v-2h34v1zM17 18H0v-2h16V0h2v18h-1zm273-2h14v2h-16V0h2v16zm-32 273v15h-2v-14h-14v14h-2v-16h18v1zM0 92.1A5.02 5.02 0 0 1 6 97a5 5 0 0 1-6 4.9v-2.07a3 3 0 1 0 0-5.66V92.1zM80 272h2v32h-2v-32zm37.9 32h-2.07a3 3 0 0 0-5.66 0h-2.07a5 5 0 0 1 9.8 0zM5.9 0A5.02 5.02 0 0 1 0 5.9V3.83A3 3 0 0 0 3.83 0H5.9zm294.2 0h2.07A3 3 0 0 0 304 3.83V5.9a5 5 0 0 1-3.9-5.9zm3.9 300.1v2.07a3 3 0 0 0-1.83 1.83h-2.07a5 5 0 0 1 3.9-3.9zM97 100a3 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
|
+
background-image:
|
|
117
|
+
radial-gradient(at 0% 0%, rgba(var(--color-secondary-500) / 0.33) 0px, transparent 50%),
|
|
118
|
+
radial-gradient(at 98% 1%, rgba(var(--color-error-500) / 0.33) 0px, transparent 50%);
|
|
119
119
|
}
|
|
@@ -110,20 +110,9 @@
|
|
|
110
110
|
|
|
111
111
|
/* Applied to body with `<body data-theme="skeleton">` */
|
|
112
112
|
/* Created with: https://csshero.org/mesher/ */
|
|
113
|
+
/* prettier-ignore */
|
|
113
114
|
[data-theme='skeleton'] {
|
|
114
|
-
/* prettier-ignore */
|
|
115
115
|
background-image:
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
radial-gradient(at 88% 64%, hsla(290,68%,62%,0.20) 0px, transparent 50%),
|
|
119
|
-
radial-gradient(at 67% 14%, hsla(167,87%,76%,0.20) 0px, transparent 50%),
|
|
120
|
-
radial-gradient(at 70% 75%, hsla(170,71%,68%,0.20) 0px, transparent 50%),
|
|
121
|
-
radial-gradient(at 98% 62%, hsla(244,77%,60%,0.18) 0px, transparent 50%),
|
|
122
|
-
radial-gradient(at 50% 19%, hsla(322,97%,63%,0.20) 0px, transparent 50%);
|
|
123
|
-
}
|
|
124
|
-
.dark [data-theme='skeleton'] {
|
|
125
|
-
/* prettier-ignore */
|
|
126
|
-
background-image:
|
|
127
|
-
radial-gradient(at 36% 0%, hsla(240,73%,56%,0.25) 0px, transparent 50%),
|
|
128
|
-
radial-gradient(at 71% 4%, hsla(330,78%,46%,0.25) 0px, transparent 50%);
|
|
116
|
+
radial-gradient(at 0% 0%, rgba(var(--color-secondary-500) / 0.33) 0px, transparent 50%),
|
|
117
|
+
radial-gradient(at 98% 1%, rgba(var(--color-error-500) / 0.33) 0px, transparent 50%);
|
|
129
118
|
}
|
package/types/tailwind.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const tailwindNumbers: readonly ["50", "100", "200", "300", "400", "500", "600", "700", "800", "900"];
|
|
2
2
|
export type TailwindNumbers = (typeof tailwindNumbers)[number];
|
|
3
|
-
export declare const semanticNames: readonly ["primary", "secondary", "tertiary", "success", "warning"];
|
|
3
|
+
export declare const semanticNames: readonly ["primary", "secondary", "tertiary", "success", "warning", "error", "surface"];
|
|
4
4
|
export type SemanticNames = (typeof semanticNames)[number];
|
package/types/tailwind.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export const tailwindNumbers = ['50', '100', '200', '300', '400', '500', '600', '700', '800', '900'];
|
|
2
|
-
export const semanticNames = ['primary', 'secondary', 'tertiary', 'success', 'warning'];
|
|
2
|
+
export const semanticNames = ['primary', 'secondary', 'tertiary', 'success', 'warning', 'error', 'surface'];
|
|
@@ -4,25 +4,25 @@ declare const __propDef: {
|
|
|
4
4
|
[x: string]: any;
|
|
5
5
|
/** Sets a language alias for Highlight.js syntax highlighting.*/
|
|
6
6
|
language?: string | undefined;
|
|
7
|
-
/** Provide the code to render. Be mindful to escape as needed!*/
|
|
7
|
+
/** Provide the code snippet to render. Be mindful to escape as needed!*/
|
|
8
8
|
code?: string | undefined;
|
|
9
|
-
/**
|
|
9
|
+
/** Provide classes to set the background color.*/
|
|
10
10
|
background?: string | undefined;
|
|
11
11
|
/** Provided classes to set the backdrop blur.*/
|
|
12
12
|
blur?: string | undefined;
|
|
13
|
-
/**
|
|
13
|
+
/** Provide classes to set the text size.*/
|
|
14
14
|
text?: string | undefined;
|
|
15
|
-
/**
|
|
15
|
+
/** Provide classes to set the text color.*/
|
|
16
16
|
color?: string | undefined;
|
|
17
|
-
/**
|
|
17
|
+
/** Provide classes to set the border radius.*/
|
|
18
18
|
rounded?: string | undefined;
|
|
19
|
-
/**
|
|
19
|
+
/** Provide classes to set the box shadow.*/
|
|
20
20
|
shadow?: string | undefined;
|
|
21
|
-
/**
|
|
21
|
+
/** Provide classes to set the button styles.*/
|
|
22
22
|
button?: string | undefined;
|
|
23
|
-
/**
|
|
23
|
+
/** Provide the button label text.*/
|
|
24
24
|
buttonLabel?: string | undefined;
|
|
25
|
-
/**
|
|
25
|
+
/** Provide the button label text when copied.*/
|
|
26
26
|
buttonCopied?: string | undefined;
|
|
27
27
|
};
|
|
28
28
|
events: {
|
|
@@ -24,9 +24,9 @@ declare const __propDef: {
|
|
|
24
24
|
width?: string | undefined;
|
|
25
25
|
/** Drawer - Provide classes to override the height.*/
|
|
26
26
|
height?: string | undefined;
|
|
27
|
-
/** Provide
|
|
27
|
+
/** Provide arbitrary classes to the backdrop region.*/
|
|
28
28
|
regionBackdrop?: string | undefined;
|
|
29
|
-
/** Provide
|
|
29
|
+
/** Provide arbitrary classes to the drawer region.*/
|
|
30
30
|
regionDrawer?: string | undefined;
|
|
31
31
|
/** Provide an ID of the element labeling the drawer.*/
|
|
32
32
|
labelledby?: string | undefined;
|
|
@@ -2,7 +2,7 @@ export interface DrawerSettings {
|
|
|
2
2
|
open?: boolean;
|
|
3
3
|
/** A unique identifier, useful for setting contents. */
|
|
4
4
|
id?: string;
|
|
5
|
-
/** Pass
|
|
5
|
+
/** Pass arbitrary information for your own persona use. */
|
|
6
6
|
meta?: any;
|
|
7
7
|
/** Set the anchor position.
|
|
8
8
|
* @type {'left' | 'top' | 'right' | 'bottom'}
|
|
@@ -28,9 +28,9 @@ export interface DrawerSettings {
|
|
|
28
28
|
width?: string;
|
|
29
29
|
/** Drawer - Provide classes to override the height.*/
|
|
30
30
|
height?: string;
|
|
31
|
-
/** Provide
|
|
31
|
+
/** Provide arbitrary classes to the backdrop region. */
|
|
32
32
|
regionBackdrop?: string;
|
|
33
|
-
/** Provide
|
|
33
|
+
/** Provide arbitrary classes to the drawer region. */
|
|
34
34
|
regionDrawer?: string;
|
|
35
35
|
/** Provide an ID of the element labeling the drawer.*/
|
|
36
36
|
labelledby?: string;
|
|
@@ -4,7 +4,7 @@ export let bgDark = "bg-surface-900";
|
|
|
4
4
|
export let fillLight = "fill-surface-50";
|
|
5
5
|
export let fillDark = "fill-surface-900";
|
|
6
6
|
export let width = "w-12";
|
|
7
|
-
export let height = "
|
|
7
|
+
export let height = "h-6";
|
|
8
8
|
export let ring = "ring-[1px] ring-surface-500/30";
|
|
9
9
|
export let rounded = "rounded-token";
|
|
10
10
|
const cTransition = `transition-all duration-[200ms]`;
|
|
@@ -43,7 +43,7 @@ $:
|
|
|
43
43
|
</script>
|
|
44
44
|
|
|
45
45
|
<svelte:head>
|
|
46
|
-
{@html `<script
|
|
46
|
+
{@html `<script>(${setInitialClassState.toString()})();</script>`}
|
|
47
47
|
</svelte:head>
|
|
48
48
|
|
|
49
49
|
<div
|
|
@@ -19,7 +19,7 @@ declare const __propDef: {
|
|
|
19
19
|
background?: string | undefined;
|
|
20
20
|
/** Provide classes to style the modal width.*/
|
|
21
21
|
width?: string | undefined;
|
|
22
|
-
/** Provide classes to style the modal.*/
|
|
22
|
+
/** Provide classes to style the modal height.*/
|
|
23
23
|
height?: string | undefined;
|
|
24
24
|
/** Provide classes to style the modal padding.*/
|
|
25
25
|
padding?: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface ModalComponent {
|
|
2
2
|
/** Import and provide your component reference. */
|
|
3
3
|
ref: any;
|
|
4
|
-
/** Provide
|
|
4
|
+
/** Provide component props as key/value pairs. */
|
|
5
5
|
props?: Record<string, unknown>;
|
|
6
6
|
/** Provide an HTML template literal for the default slot. */
|
|
7
7
|
slot?: string;
|
|
@@ -23,11 +23,11 @@ export interface ModalSettings {
|
|
|
23
23
|
valueAttr?: object;
|
|
24
24
|
/** Provide your component reference key or object. */
|
|
25
25
|
component?: ModalComponent | string;
|
|
26
|
-
/** Provide a function. Returns the
|
|
26
|
+
/** Provide a function. Returns the response value. */
|
|
27
27
|
response?: (r: any) => void;
|
|
28
|
-
/** Provide
|
|
28
|
+
/** Provide arbitrary classes to the backdrop. */
|
|
29
29
|
backdropClasses?: string;
|
|
30
|
-
/** Provide
|
|
30
|
+
/** Provide arbitrary classes to the modal window. */
|
|
31
31
|
modalClasses?: string;
|
|
32
32
|
/** Override the Cancel button label. */
|
|
33
33
|
buttonTextCancel?: string;
|
|
@@ -35,6 +35,6 @@ export interface ModalSettings {
|
|
|
35
35
|
buttonTextConfirm?: string;
|
|
36
36
|
/** Override the Submit button label. */
|
|
37
37
|
buttonTextSubmit?: string;
|
|
38
|
-
/** Pass
|
|
38
|
+
/** Pass arbitrary data per modal instance. */
|
|
39
39
|
meta?: any;
|
|
40
40
|
}
|
package/utilities/Popup/popup.js
CHANGED
|
@@ -12,6 +12,7 @@ export function popup(node, args) {
|
|
|
12
12
|
const elemPopup = document.querySelector(`[data-popup="${target}"]`);
|
|
13
13
|
const elemArrow = elemPopup?.querySelector(`.arrow`) ?? null;
|
|
14
14
|
let isVisible = false;
|
|
15
|
+
let autoUpdateCleanup;
|
|
15
16
|
// Local A11y Variables
|
|
16
17
|
const elemWhitelist = 'a[href], button, input, textarea, select, details, [tabindex]:not([tabindex="-1"])';
|
|
17
18
|
let activeFocusIdx;
|
|
@@ -63,9 +64,9 @@ export function popup(node, args) {
|
|
|
63
64
|
[staticSide]: '-4px'
|
|
64
65
|
});
|
|
65
66
|
}
|
|
67
|
+
// Set Focusable State
|
|
68
|
+
setFocusableState();
|
|
66
69
|
});
|
|
67
|
-
// Set Focusable State
|
|
68
|
-
setFocusableState();
|
|
69
70
|
}
|
|
70
71
|
// Set Focusable State
|
|
71
72
|
function setFocusableState() {
|
|
@@ -128,6 +129,9 @@ export function popup(node, args) {
|
|
|
128
129
|
elemPopup.style.pointerEvents = 'initial';
|
|
129
130
|
isVisible = true;
|
|
130
131
|
stateEventHandler(true);
|
|
132
|
+
// Utilize autoUpdate ONLY when the popup is.
|
|
133
|
+
// https://floating-ui.com/docs/autoUpdate
|
|
134
|
+
autoUpdateCleanup = autoUpdate(node, elemPopup, render);
|
|
131
135
|
}
|
|
132
136
|
function close() {
|
|
133
137
|
if (!elemPopup)
|
|
@@ -140,6 +144,9 @@ export function popup(node, args) {
|
|
|
140
144
|
isVisible = false;
|
|
141
145
|
stateEventHandler(false);
|
|
142
146
|
}, cssTransitionDuration);
|
|
147
|
+
// Cleanup autoUpdate on close (REQUIRED)
|
|
148
|
+
if (autoUpdateCleanup)
|
|
149
|
+
autoUpdateCleanup();
|
|
143
150
|
}
|
|
144
151
|
// State Handler
|
|
145
152
|
const stateEventHandler = (value) => {
|
|
@@ -184,12 +191,9 @@ export function popup(node, args) {
|
|
|
184
191
|
};
|
|
185
192
|
// On Init
|
|
186
193
|
render();
|
|
187
|
-
// Auto Update
|
|
188
|
-
autoUpdate(node, elemPopup, render);
|
|
189
194
|
// Event Listners
|
|
190
195
|
if (event === 'click') {
|
|
191
196
|
window.addEventListener('click', onWindowClick, true);
|
|
192
|
-
// node.addEventListener('click', onNodeClick, true);
|
|
193
197
|
}
|
|
194
198
|
if (event === 'hover') {
|
|
195
199
|
node.addEventListener('mouseover', show, true);
|
|
@@ -207,8 +211,8 @@ export function popup(node, args) {
|
|
|
207
211
|
args = newArgs;
|
|
208
212
|
},
|
|
209
213
|
destroy() {
|
|
214
|
+
// ---
|
|
210
215
|
window.removeEventListener('click', onWindowClick, true);
|
|
211
|
-
// node.removeEventListener('click', onNodeClick, true);
|
|
212
216
|
node.removeEventListener('mouseover', onMouseOver, true);
|
|
213
217
|
node.removeEventListener('mouseout', onMouseOut, true);
|
|
214
218
|
// ---
|
|
@@ -1,10 +1,7 @@
|
|
|
1
1
|
export interface ToastSettings {
|
|
2
2
|
/** Provide the toast message. Supports HTML. */
|
|
3
3
|
message: string;
|
|
4
|
-
/**
|
|
5
|
-
* Applies a canned set of styles.
|
|
6
|
-
* @type {'primary' | 'secondary' | 'tertiary' | 'warning' | 'success' | 'error'}
|
|
7
|
-
*/
|
|
4
|
+
/** Provide CSS classes to set the background color. */
|
|
8
5
|
background?: string;
|
|
9
6
|
/** Enables auto-hide after the timeout duration. */
|
|
10
7
|
autohide?: boolean;
|