@sula-tech/webcomponents 0.19.3 → 0.20.1
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/cjs/{index-i5WGQEGK.js → index-BjAGuSPl.js} +30 -5
- package/dist/cjs/index-BjAGuSPl.js.map +1 -0
- package/dist/cjs/index.cjs.js +17 -11
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sula-avatar_31.cjs.entry.js +59 -49
- package/dist/cjs/sula-avatar_31.cjs.entry.js.map +1 -1
- package/dist/cjs/sula-menu.model-BDxbWyPG.js +16 -0
- package/dist/cjs/sula-menu.model-BDxbWyPG.js.map +1 -0
- package/dist/cjs/sula-toast-stack.cjs.entry.js +314 -0
- package/dist/cjs/sula-toast-stack.cjs.entry.js.map +1 -0
- package/dist/cjs/sula-toast-stack.entry.cjs.js.map +1 -0
- package/dist/cjs/sula-toast.cjs.entry.js +195 -0
- package/dist/cjs/sula-toast.cjs.entry.js.map +1 -0
- package/dist/cjs/sula-toast.entry.cjs.js.map +1 -0
- package/dist/cjs/sula-toast.model-frnF9yhp.js +14 -0
- package/dist/cjs/sula-toast.model-frnF9yhp.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -0
- package/dist/collection/components/sula-avatar/sula-avatar.css +1 -1
- package/dist/collection/components/sula-badge/sula-badge.css +1 -1
- package/dist/collection/components/sula-breadcrumb/sula-breadcrumb.css +1 -1
- package/dist/collection/components/sula-button/sula-button.css +1 -1
- package/dist/collection/components/sula-checkbox/sula-checkbox.css +1 -1
- package/dist/collection/components/sula-chip/sula-chip.css +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -1
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-icon-picker/model/sula-icon-picker.model.js.map +1 -1
- package/dist/collection/components/sula-icon-picker/sula-icon-picker.css +1 -1
- package/dist/collection/components/sula-icon-picker/sula-icon-picker.js +18 -8
- package/dist/collection/components/sula-icon-picker/sula-icon-picker.js.map +1 -1
- package/dist/collection/components/sula-loader/sula-loader.css +1 -1
- package/dist/collection/components/sula-menu/sula-menu.css +1 -1
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
- package/dist/collection/components/sula-modal/sula-modal.css +1 -1
- package/dist/collection/components/sula-progress-bar/sula-progress-bar.css +1 -1
- package/dist/collection/components/sula-radio-button/sula-radio-button.css +1 -1
- package/dist/collection/components/sula-search-bar/sula-search-bar.css +1 -1
- package/dist/collection/components/sula-segmented-control/sula-segmented-control.css +1 -1
- package/dist/collection/components/sula-switch/sula-switch.css +1 -1
- package/dist/collection/components/sula-table/sula-table.css +1 -1
- package/dist/collection/components/sula-table-body/sula-table-body.css +1 -1
- package/dist/collection/components/sula-table-cell/sula-table-cell.css +1 -1
- package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.css +1 -1
- package/dist/collection/components/sula-table-header/sula-table-header.css +1 -1
- package/dist/collection/components/sula-table-row/sula-table-row.css +1 -1
- package/dist/collection/components/sula-tag/sula-tag.css +1 -1
- package/dist/collection/components/sula-textarea/sula-textarea.css +1 -1
- package/dist/collection/components/sula-textfield/sula-textfield.css +1 -1
- package/dist/collection/components/sula-tiles/sula-tiles.css +1 -1
- package/dist/collection/components/sula-timeline-list/sula-timeline-list.css +1 -1
- package/dist/collection/components/sula-toast/model/sula-toast.model.js +10 -0
- package/dist/collection/components/sula-toast/model/sula-toast.model.js.map +1 -0
- package/dist/collection/components/sula-toast/sula-toast.css +1 -0
- package/dist/collection/components/sula-toast/sula-toast.js +501 -0
- package/dist/collection/components/sula-toast/sula-toast.js.map +1 -0
- package/dist/collection/components/sula-toast/sula-toast.stories.js +101 -0
- package/dist/collection/components/sula-toast/sula-toast.stories.js.map +1 -0
- package/dist/collection/components/sula-toast-stack/model/sula-toast-stack.model.js +2 -0
- package/dist/collection/components/sula-toast-stack/model/sula-toast-stack.model.js.map +1 -0
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.css +1 -0
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.js +333 -0
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.js.map +1 -0
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.motion.js +67 -0
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.motion.js.map +1 -0
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.stories.js +87 -0
- package/dist/collection/components/sula-toast-stack/sula-toast-stack.stories.js.map +1 -0
- package/dist/collection/components/sula-toggle/sula-toggle.css +1 -1
- package/dist/collection/components/sula-toggle/sula-toggle.js +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.css +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.js +1 -1
- package/dist/collection/index.js +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/index.js +3 -15
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-CelSwSJG.js → p-CJ2i2jVV.js} +5 -5
- package/dist/components/{p-CelSwSJG.js.map → p-CJ2i2jVV.js.map} +1 -1
- package/dist/components/p-Cs9RR1ZV.js +16 -0
- package/dist/components/p-Cs9RR1ZV.js.map +1 -0
- package/dist/components/{p-Bqd5Y-Ir.js → p-D0ZAC0yK.js} +6 -6
- package/dist/components/p-D0ZAC0yK.js.map +1 -0
- package/dist/components/{p-BJQZqrGi.js → p-DGfvh6dZ.js} +5 -5
- package/dist/components/{p-BJQZqrGi.js.map → p-DGfvh6dZ.js.map} +1 -1
- package/dist/components/{p-Cy4ZswbA.js → p-DYfmicjp.js} +31 -6
- package/dist/components/p-DYfmicjp.js.map +1 -0
- package/dist/components/{p-f7rEWsEo.js → p-DmCNhtp_.js} +4 -4
- package/dist/components/{p-f7rEWsEo.js.map → p-DmCNhtp_.js.map} +1 -1
- package/dist/components/p-DmQoJS86.js +235 -0
- package/dist/components/p-DmQoJS86.js.map +1 -0
- package/dist/components/{p-bHiC51v2.js → p-DqRqPukj.js} +4 -4
- package/dist/components/{p-bHiC51v2.js.map → p-DqRqPukj.js.map} +1 -1
- package/dist/components/{p-D1tWu3qb.js → p-b7t6bSNa.js} +6 -6
- package/dist/components/{p-D1tWu3qb.js.map → p-b7t6bSNa.js.map} +1 -1
- package/dist/components/p-t0X4JATS.js +14 -0
- package/dist/components/p-t0X4JATS.js.map +1 -0
- package/dist/components/sula-avatar.js +3 -3
- package/dist/components/sula-avatar.js.map +1 -1
- package/dist/components/sula-badge.js +3 -3
- package/dist/components/sula-badge.js.map +1 -1
- package/dist/components/sula-breadcrumb.js +3 -3
- package/dist/components/sula-breadcrumb.js.map +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-checkbox.js +3 -3
- package/dist/components/sula-checkbox.js.map +1 -1
- package/dist/components/sula-chip.js +4 -4
- package/dist/components/sula-chip.js.map +1 -1
- package/dist/components/sula-dropdown.js +1 -1
- package/dist/components/sula-icon-picker.js +24 -14
- package/dist/components/sula-icon-picker.js.map +1 -1
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-loader.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-menu.js +4 -4
- package/dist/components/sula-menu.js.map +1 -1
- package/dist/components/sula-modal.js +5 -5
- package/dist/components/sula-modal.js.map +1 -1
- package/dist/components/sula-progress-bar.js +3 -3
- package/dist/components/sula-progress-bar.js.map +1 -1
- package/dist/components/sula-radio-button.js +2 -2
- package/dist/components/sula-radio-button.js.map +1 -1
- package/dist/components/sula-search-bar.js +1 -1
- package/dist/components/sula-segmented-control.js +3 -3
- package/dist/components/sula-segmented-control.js.map +1 -1
- package/dist/components/sula-switch.js +2 -2
- package/dist/components/sula-switch.js.map +1 -1
- package/dist/components/sula-table-body.js +2 -2
- package/dist/components/sula-table-body.js.map +1 -1
- package/dist/components/sula-table-cell.js +2 -2
- package/dist/components/sula-table-cell.js.map +1 -1
- package/dist/components/sula-table-head-cell.js +2 -2
- package/dist/components/sula-table-head-cell.js.map +1 -1
- package/dist/components/sula-table-header.js +2 -2
- package/dist/components/sula-table-header.js.map +1 -1
- package/dist/components/sula-table-row.js +2 -2
- package/dist/components/sula-table-row.js.map +1 -1
- package/dist/components/sula-table.js +2 -2
- package/dist/components/sula-table.js.map +1 -1
- package/dist/components/sula-tag.js +3 -3
- package/dist/components/sula-tag.js.map +1 -1
- package/dist/components/sula-textarea.js +2 -2
- package/dist/components/sula-textarea.js.map +1 -1
- package/dist/components/sula-textfield.js +3 -3
- package/dist/components/sula-textfield.js.map +1 -1
- package/dist/components/sula-tiles.js +3 -3
- package/dist/components/sula-tiles.js.map +1 -1
- package/dist/components/sula-timeline-list.js +3 -3
- package/dist/components/sula-timeline-list.js.map +1 -1
- package/dist/components/sula-toast-stack.d.ts +11 -0
- package/dist/components/sula-toast-stack.js +352 -0
- package/dist/components/sula-toast-stack.js.map +1 -0
- package/dist/components/sula-toast.d.ts +11 -0
- package/dist/components/sula-toast.js +9 -0
- package/dist/components/sula-toast.js.map +1 -0
- package/dist/components/sula-toggle.js +4 -4
- package/dist/components/sula-toggle.js.map +1 -1
- package/dist/components/sula-tooltip.js +4 -4
- package/dist/components/sula-tooltip.js.map +1 -1
- package/dist/esm/{index-lrQT_q8m.js → index-BL15Tt3m.js} +30 -5
- package/dist/esm/index-BL15Tt3m.js.map +1 -0
- package/dist/esm/index.js +2 -13
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sula-avatar_31.entry.js +53 -43
- package/dist/esm/sula-avatar_31.entry.js.map +1 -1
- package/dist/esm/sula-menu.model-Cs9RR1ZV.js +16 -0
- package/dist/esm/sula-menu.model-Cs9RR1ZV.js.map +1 -0
- package/dist/esm/sula-toast-stack.entry.js +312 -0
- package/dist/esm/sula-toast-stack.entry.js.map +1 -0
- package/dist/esm/sula-toast.entry.js +193 -0
- package/dist/esm/sula-toast.entry.js.map +1 -0
- package/dist/esm/sula-toast.model-t0X4JATS.js +14 -0
- package/dist/esm/sula-toast.model-t0X4JATS.js.map +1 -0
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/components/sula-icon-picker/model/sula-icon-picker.model.d.ts +4 -0
- package/dist/types/components/sula-toast/model/sula-toast.model.d.ts +31 -0
- package/dist/types/components/sula-toast/sula-toast.d.ts +64 -0
- package/dist/types/components/sula-toast/sula-toast.stories.d.ts +188 -0
- package/dist/types/components/sula-toast-stack/model/sula-toast-stack.model.d.ts +8 -0
- package/dist/types/components/sula-toast-stack/sula-toast-stack.d.ts +51 -0
- package/dist/types/components/sula-toast-stack/sula-toast-stack.motion.d.ts +9 -0
- package/dist/types/components/sula-toast-stack/sula-toast-stack.stories.d.ts +64 -0
- package/dist/types/components.d.ts +204 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/webcomponents/index.esm.js +2 -15
- package/dist/webcomponents/index.esm.js.map +1 -1
- package/dist/webcomponents/p-170854a5.entry.js +270 -0
- package/dist/webcomponents/p-170854a5.entry.js.map +1 -0
- package/dist/webcomponents/{p-lrQT_q8m.js → p-BL15Tt3m.js} +240 -215
- package/dist/webcomponents/p-BL15Tt3m.js.map +1 -0
- package/dist/webcomponents/p-Cs9RR1ZV.js +18 -0
- package/dist/webcomponents/p-Cs9RR1ZV.js.map +1 -0
- package/dist/webcomponents/p-c58125e1.entry.js +376 -0
- package/dist/webcomponents/p-c58125e1.entry.js.map +1 -0
- package/dist/webcomponents/{p-95ca03c9.entry.js → p-f4ef50ea.entry.js} +63 -55
- package/dist/webcomponents/p-f4ef50ea.entry.js.map +1 -0
- package/dist/webcomponents/p-t0X4JATS.js +14 -0
- package/dist/webcomponents/p-t0X4JATS.js.map +1 -0
- package/dist/webcomponents/sula-toast-stack.entry.esm.js.map +1 -0
- package/dist/webcomponents/sula-toast.entry.esm.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +35 -6
- package/package.json +2 -2
- package/dist/cjs/index-i5WGQEGK.js.map +0 -1
- package/dist/components/p-Bqd5Y-Ir.js.map +0 -1
- package/dist/components/p-Cy4ZswbA.js.map +0 -1
- package/dist/esm/index-lrQT_q8m.js.map +0 -1
- package/dist/webcomponents/p-95ca03c9.entry.js.map +0 -1
- package/dist/webcomponents/p-lrQT_q8m.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { p as proxyCustomElement, H, c as createEvent, h,
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-DqRqPukj.js';
|
|
3
3
|
|
|
4
4
|
var SulaTimelineListItemIconStatus;
|
|
5
5
|
(function (SulaTimelineListItemIconStatus) {
|
|
@@ -8,7 +8,7 @@ var SulaTimelineListItemIconStatus;
|
|
|
8
8
|
SulaTimelineListItemIconStatus["Warning"] = "warning";
|
|
9
9
|
})(SulaTimelineListItemIconStatus || (SulaTimelineListItemIconStatus = {}));
|
|
10
10
|
|
|
11
|
-
const sulaTimelineListCss = "*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{font-family:Figtree;line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{display:block}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format(\"truetype\")}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-\\[28px\\]{left:28px}.top-56{top:3.5rem}.z-10{z-index:10}.mt-4{margin-top:.25rem}.flex{display:flex}.h-24{height:1.5rem}.h-44{height:2.75rem}.h-56{height:3.5rem}.h-full{height:100%}.w-2{width:.125rem}.w-44{width:2.75rem}.w-56{width:3.5rem}.w-fit{width:fit-content}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-24>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rounded-full{border-radius:9999px}.rounded-md{border-radius:1.25rem}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.bg-surface-on-body-feedback-alert{background-color:var(--color-surface-on-body-feedback-alert)}.bg-surface-on-body-feedback-error{background-color:var(--color-surface-on-body-feedback-error)}.bg-surface-on-body-feedback-success{background-color:var(--color-surface-on-body-feedback-success)}.p-6{padding:1.5rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.py-2{padding-bottom:.125rem;padding-top:.125rem}.py-32{padding-bottom:2rem;padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-3{line-height:.75rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.text-feedback-alert{color:var(--color-feedback-alert)}.text-feedback-error{color:var(--color-feedback-error)}.text-feedback-success{color:var(--color-feedback-success)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.group:hover .group-hover\\:bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}";
|
|
11
|
+
const sulaTimelineListCss = "*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{font-family:Figtree;line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.block{display:block}:host,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{display:block}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format(\"truetype\")}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-\\[28px\\]{left:28px}.top-56{top:3.5rem}.z-10{z-index:10}.mt-4{margin-top:.25rem}.flex{display:flex}.h-24{height:1.5rem}.h-44{height:2.75rem}.h-56{height:3.5rem}.h-full{height:100%}.w-2{width:.125rem}.w-44{width:2.75rem}.w-56{width:3.5rem}.w-fit{width:fit-content}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-24>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rounded-full{border-radius:9999px}.rounded-md{border-radius:1.25rem}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.bg-surface-on-body-feedback-alert{background-color:var(--color-surface-on-body-feedback-alert)}.bg-surface-on-body-feedback-error{background-color:var(--color-surface-on-body-feedback-error)}.bg-surface-on-body-feedback-success{background-color:var(--color-surface-on-body-feedback-success)}.p-6{padding:1.5rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.py-2{padding-bottom:.125rem;padding-top:.125rem}.py-32{padding-bottom:2rem;padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-3{line-height:.75rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.text-feedback-alert{color:var(--color-feedback-alert)}.text-feedback-error{color:var(--color-feedback-error)}.text-feedback-success{color:var(--color-feedback-success)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}.group:hover .group-hover\\:bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}";
|
|
12
12
|
|
|
13
13
|
const SulaTimelineList$1 = /*@__PURE__*/ proxyCustomElement(class SulaTimelineList extends H {
|
|
14
14
|
constructor() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"sula-timeline-list.js","mappings":";;;AAaA,IAAY,8BAIX;AAJD,CAAA,UAAY,8BAA8B,EAAA;AACxC,IAAA,8BAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,8BAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,8BAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,GAIzC,EAAA,CAAA,CAAA;;ACjBD,MAAM,mBAAmB,GAAG,
|
|
1
|
+
{"file":"sula-timeline-list.js","mappings":";;;AAaA,IAAY,8BAIX;AAJD,CAAA,UAAY,8BAA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,EAAA,EAAK,KAAK,EAAC,wDAAwD,EAAO,CAAA,EAEzF,CAAC,UAAU,IAAI,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,MAAM,EAAA,CAAO,CACpC;AAEV,SAAC,CAAC,CACE,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaTimelineList","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-timeline-list/model/sula-timeline-list.model.ts","src/components/sula-timeline-list/sula-timeline-list.scss?tag=sula-timeline-list&encapsulation=shadow","src/components/sula-timeline-list/sula-timeline-list.tsx"],"sourcesContent":["export interface SulaTimelineListItem {\n weekdayText?: SulaTimelineListItemWeekdayText;\n iconStatus?: SulaTimelineListItemIconStatus;\n title: string;\n message?: string;\n hasLink?: boolean;\n}\n\nexport interface SulaTimelineListItemWeekdayText {\n weekday: string;\n day: number;\n}\n\nexport enum SulaTimelineListItemIconStatus {\n Success = 'success',\n Error = 'error',\n Warning = 'warning',\n}\n",":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core';\nimport { SulaTimelineListItem, SulaTimelineListItemIconStatus } from './model/sula-timeline-list.model';\n\n@Component({\n tag: 'sula-timeline-list',\n styleUrl: 'sula-timeline-list.scss',\n shadow: true,\n})\nexport class SulaTimelineList {\n /**\n * Timeline list. (Can be use with weekday text or icon with status)\n */\n @Prop({ mutable: true })\n sulaTimelineList: SulaTimelineListItem[] = [];\n\n /**\n * Event emitted when item is clicked.\n */\n @Event()\n itemClicked: EventEmitter<SulaTimelineListItem>;\n\n handleItemClick = (item: SulaTimelineListItem) => {\n if (!item.hasLink) return;\n this.itemClicked.emit(item);\n };\n\n getIconBackgroundColorByStatus(status: SulaTimelineListItemIconStatus) {\n const iconColorByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'bg-surface-on-body-feedback-success',\n [SulaTimelineListItemIconStatus.Warning]: 'bg-surface-on-body-feedback-alert',\n [SulaTimelineListItemIconStatus.Error]: 'bg-surface-on-body-feedback-error',\n };\n\n return iconColorByStatus[status];\n }\n\n getIconByStatus(status: SulaTimelineListItemIconStatus) {\n const iconByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'ph ph-check-circle',\n [SulaTimelineListItemIconStatus.Warning]: 'ph ph-warning',\n [SulaTimelineListItemIconStatus.Error]: 'ph ph-warning-circle',\n };\n\n return iconByStatus[status];\n }\n\n getIconColorByStatus(status: SulaTimelineListItemIconStatus) {\n const iconByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'text-feedback-success',\n [SulaTimelineListItemIconStatus.Warning]: 'text-feedback-alert',\n [SulaTimelineListItemIconStatus.Error]: 'text-feedback-error',\n };\n\n return iconByStatus[status];\n }\n\n render() {\n return (\n <Host>\n <div class=\"flex flex-col bg-surface-on-body px-24 py-32 w-fit rounded-md\">\n {this.sulaTimelineList.map((item, index) => {\n const isLastItem = index === this.sulaTimelineList.length - 1;\n\n return (\n <div\n class={{\n 'relative timeline-item': true,\n 'cursor-pointer group': item.hasLink,\n }}\n onClick={() => this.handleItemClick(item)}\n >\n <div class=\"flex space-x-24 items-center justify-between flex-row w-full\">\n <div class=\"relative flex flex-row space-x-24 items-center\">\n <div class=\"relative\">\n <div\n class={{\n 'rounded-full h-56 w-56 bg-surface-body flex justify-center items-center relative z-10': true,\n 'p-6': !!item.iconStatus,\n }}\n >\n {item.weekdayText && (\n <div class=\"flex flex-col justify-center items-center space-y-4\">\n <span class=\"text-text-secondary text-xs leading-3\">{item.weekdayText.weekday}</span>\n <span class=\"text-xl leading-5 text-text-primary\">{item.weekdayText.day}</span>\n </div>\n )}\n\n {item.iconStatus && (\n <div\n class={{\n 'flex justify-center items-center w-44 h-44 rounded-full': true,\n [this.getIconBackgroundColorByStatus(item.iconStatus)]: true,\n }}\n >\n <div class=\"flex justify-center items-center leading-6 w-44\">\n <sula-icon icon={this.getIconByStatus(item.iconStatus)} customClass={`${this.getIconColorByStatus(item.iconStatus)} text-2xl`}></sula-icon>\n </div>\n </div>\n )}\n </div>\n </div>\n\n <div class=\"flex flex-col\">\n <span class=\"text-text-primary font-bold text-base leading-4\">{item.title}</span>\n {item.message && <span class=\"text-text-secondary text-base leading-4 mt-4\">{item.message}</span>}\n </div>\n </div>\n\n {item.hasLink && (\n <div\n class={{\n 'px-[6px] py-2 rounded-full leading-6 flex items-center justify-center margin-left': true,\n 'group-hover:bg-states-empty-bg-hover transition': item.hasLink,\n }}\n >\n <sula-icon icon=\"ph ph-caret-right\" customClass=\"text-2xl text-text-primary\"></sula-icon>\n </div>\n )}\n </div>\n\n {!isLastItem && <div class=\"absolute bg-surface-body left-[28px] top-56 w-2 h-full\"></div>}\n\n {!isLastItem && <div class=\"h-24\"></div>}\n </div>\n );\n })}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SulaToastStack extends Components.SulaToastStack, HTMLElement {}
|
|
4
|
+
export const SulaToastStack: {
|
|
5
|
+
prototype: SulaToastStack;
|
|
6
|
+
new (): SulaToastStack;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
|
|
2
|
+
import { d as defineCustomElement$3 } from './p-DqRqPukj.js';
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-DmQoJS86.js';
|
|
4
|
+
|
|
5
|
+
const MOTION_DURATION = 260;
|
|
6
|
+
const MOTION_EASING = 'cubic-bezier(0.2, 0.8, 0.2, 1)';
|
|
7
|
+
class SulaToastStackMotion {
|
|
8
|
+
constructor() {
|
|
9
|
+
this.animations = new Set();
|
|
10
|
+
}
|
|
11
|
+
capture(region, list) {
|
|
12
|
+
const cards = new Map();
|
|
13
|
+
list.querySelectorAll('[data-toast-id]').forEach(element => {
|
|
14
|
+
const rect = element.getBoundingClientRect();
|
|
15
|
+
if (element.dataset.toastId && rect.width && rect.height) {
|
|
16
|
+
cards.set(element.dataset.toastId, { rect, opacity: Number(getComputedStyle(element).opacity) });
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const previous = { height: region.getBoundingClientRect().height, cards };
|
|
20
|
+
this.cancelAnimations();
|
|
21
|
+
this.previous = previous;
|
|
22
|
+
}
|
|
23
|
+
play(region, list) {
|
|
24
|
+
const previous = this.previous;
|
|
25
|
+
this.previous = undefined;
|
|
26
|
+
if (!previous)
|
|
27
|
+
return;
|
|
28
|
+
list.querySelectorAll('[data-toast-id]').forEach(element => {
|
|
29
|
+
const rect = element.getBoundingClientRect();
|
|
30
|
+
const transform = getComputedStyle(element).transform;
|
|
31
|
+
const restingTransform = transform === 'none' ? '' : transform;
|
|
32
|
+
const origin = previous.cards.get(element.dataset.toastId);
|
|
33
|
+
if (!rect.width || !rect.height)
|
|
34
|
+
return;
|
|
35
|
+
if (!origin)
|
|
36
|
+
return;
|
|
37
|
+
const deltaX = origin.rect.left - rect.left;
|
|
38
|
+
const deltaY = origin.rect.top - rect.top;
|
|
39
|
+
const scaleX = origin.rect.width / rect.width;
|
|
40
|
+
const scaleY = origin.rect.height / rect.height;
|
|
41
|
+
const moved = Math.abs(deltaX) > 0.5 || Math.abs(deltaY) > 0.5 || Math.abs(scaleX - 1) > 0.005 || Math.abs(scaleY - 1) > 0.005;
|
|
42
|
+
if (!moved && origin.opacity > 0.995)
|
|
43
|
+
return;
|
|
44
|
+
this.animate(element, [
|
|
45
|
+
{
|
|
46
|
+
opacity: origin.opacity,
|
|
47
|
+
transformOrigin: 'top left',
|
|
48
|
+
transform: `translate(${deltaX}px, ${deltaY}px) ${restingTransform} scale(${scaleX}, ${scaleY})`,
|
|
49
|
+
},
|
|
50
|
+
{ opacity: 1, transformOrigin: 'top left', transform },
|
|
51
|
+
]);
|
|
52
|
+
});
|
|
53
|
+
const height = region.getBoundingClientRect().height;
|
|
54
|
+
if (previous.height !== height)
|
|
55
|
+
this.animate(region, [{ height: `${previous.height}px` }, { height: `${height}px` }]);
|
|
56
|
+
}
|
|
57
|
+
cancel() {
|
|
58
|
+
this.previous = undefined;
|
|
59
|
+
this.cancelAnimations();
|
|
60
|
+
}
|
|
61
|
+
animate(element, frames) {
|
|
62
|
+
const animation = element.animate(frames, { duration: MOTION_DURATION, easing: MOTION_EASING });
|
|
63
|
+
this.animations.add(animation);
|
|
64
|
+
animation.onfinish = animation.oncancel = () => this.animations.delete(animation);
|
|
65
|
+
}
|
|
66
|
+
cancelAnimations() {
|
|
67
|
+
this.animations.forEach(animation => animation.cancel());
|
|
68
|
+
this.animations.clear();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
const sulaToastStackCss = "*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{font-family:Figtree;line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.absolute{position:absolute}.block{display:block}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.container{width:100%}@media (min-width:640px){.container{max-width:640px}}@media (min-width:768px){.container{max-width:768px}}@media (min-width:1024px){.container{max-width:1024px}}@media (min-width:1280px){.container{max-width:1280px}}@media (min-width:1536px){.container{max-width:1536px}}:host,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{background-color:transparent;display:block;max-width:400px;width:100%}.toast-region{background-color:transparent}.toast-list--collapsed{padding-top:var(--toast-layer-offset)}.toast-layer--entering{animation:sula-toast-stack-enter .2s cubic-bezier(.2,.8,.2,1)}@keyframes sula-toast-stack-enter{0%{scale:.98;translate:0 -8px}to{scale:1;translate:0}}@media (prefers-reduced-motion:reduce){.toast-layer--entering{animation:none}}.toast-layer.toast-layer--covered{bottom:0;clip-path:inset(0 0 calc(100% - 12px) 0);position:absolute;top:var(--toast-layer-offset);inset-inline:0;margin-inline:auto;pointer-events:none;transform:translateY(calc(var(--toast-depth)*-12px));width:var(--toast-width)}.toast-layer.toast-layer--covered sula-toast,.toast-layer.toast-layer--covered sula-toast::part(container){height:100%}.toast-layer.toast-layer--covered sula-toast::part(container){box-shadow:none;isolation:auto;overflow:hidden}.toast-layer.toast-layer--covered sula-toast::part(close-button),.toast-layer.toast-layer--covered sula-toast::part(content),.toast-layer.toast-layer--covered sula-toast::part(icon){visibility:hidden}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format(\"truetype\")}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.sr-only{clip:rect(0,0,0,0);border-width:0;height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;white-space:nowrap;width:1px}.static{position:static}.relative{position:relative}.flex{display:flex}.w-full{width:100%}.min-w-0{min-width:0}.shrink-0{flex-shrink:0}.flex-col{flex-direction:column}.gap-12{gap:.75rem}.rounded-sm{border-radius:.75rem}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.blur{--tw-blur:blur(8px)}.blur,.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-feedback-informational:focus-visible{outline-color:var(--color-feedback-informational)}";
|
|
73
|
+
|
|
74
|
+
const MAX_VISIBLE_LAYERS = 3;
|
|
75
|
+
const LAYER_OFFSET = 12;
|
|
76
|
+
const LAYER_WIDTH_STEP = 5;
|
|
77
|
+
const SulaToastStack$1 = /*@__PURE__*/ proxyCustomElement(class SulaToastStack extends H {
|
|
78
|
+
constructor() {
|
|
79
|
+
super();
|
|
80
|
+
this.__registerHost();
|
|
81
|
+
this.__attachShadow();
|
|
82
|
+
this.toastDismissRequested = createEvent(this, "toastDismissRequested");
|
|
83
|
+
this.toastAction = createEvent(this, "toastAction");
|
|
84
|
+
/** Notifications in chronological order, oldest first. Only the latest three are rendered. Replace the array to update it. IDs must be unique. */
|
|
85
|
+
this.items = [];
|
|
86
|
+
this.hovering = false;
|
|
87
|
+
this.focused = false;
|
|
88
|
+
this.noHover = false;
|
|
89
|
+
this.retainingPointerExpansion = false;
|
|
90
|
+
this.announcements = [];
|
|
91
|
+
this.announcementVersions = 0;
|
|
92
|
+
this.announcementSignatures = new Map();
|
|
93
|
+
this.enteringIds = new Set();
|
|
94
|
+
this.keyboardInteraction = false;
|
|
95
|
+
this.releaseFocusAfterRender = false;
|
|
96
|
+
this.ready = false;
|
|
97
|
+
this.connected = false;
|
|
98
|
+
this.motion = new SulaToastStackMotion();
|
|
99
|
+
this.handleMediaChange = (event) => {
|
|
100
|
+
this.noHover = event.matches;
|
|
101
|
+
this.hovering = false;
|
|
102
|
+
this.stopRetainingPointerExpansion();
|
|
103
|
+
};
|
|
104
|
+
this.handlePointerMove = (event) => {
|
|
105
|
+
var _a;
|
|
106
|
+
const bounds = (_a = this.region) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
107
|
+
this.hovering = !!bounds && event.clientX >= bounds.left && event.clientX <= bounds.right && event.clientY >= bounds.top && event.clientY <= bounds.bottom;
|
|
108
|
+
this.stopRetainingPointerExpansion();
|
|
109
|
+
};
|
|
110
|
+
this.handleFocusOut = () => {
|
|
111
|
+
if (this.focusFrame !== undefined)
|
|
112
|
+
cancelAnimationFrame(this.focusFrame);
|
|
113
|
+
this.focusFrame = requestAnimationFrame(() => {
|
|
114
|
+
var _a;
|
|
115
|
+
this.focusFrame = undefined;
|
|
116
|
+
this.focused = !!((_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement);
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
this.dismiss = (event, id) => {
|
|
120
|
+
event.stopPropagation();
|
|
121
|
+
this.toastDismissRequested.emit({ id, reason: event.detail.reason });
|
|
122
|
+
};
|
|
123
|
+
this.action = (event, id) => {
|
|
124
|
+
event.stopPropagation();
|
|
125
|
+
this.toastAction.emit({ id });
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
get expanded() {
|
|
129
|
+
return this.noHover || this.hovering || this.focused || this.retainingPointerExpansion;
|
|
130
|
+
}
|
|
131
|
+
get visibleItems() {
|
|
132
|
+
return this.items.slice(-3);
|
|
133
|
+
}
|
|
134
|
+
get motionTargets() {
|
|
135
|
+
var _a, _b, _c;
|
|
136
|
+
const reduceMotion = (_b = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(prefers-reduced-motion: reduce)').matches) !== null && _b !== void 0 ? _b : false;
|
|
137
|
+
if (!this.ready || this.noHover || reduceMotion || !((_c = this.region) === null || _c === void 0 ? void 0 : _c.animate) || !this.list)
|
|
138
|
+
return;
|
|
139
|
+
return { region: this.region, list: this.list };
|
|
140
|
+
}
|
|
141
|
+
connectedCallback() {
|
|
142
|
+
this.connected = true;
|
|
143
|
+
if (this.ready)
|
|
144
|
+
this.connectListeners();
|
|
145
|
+
}
|
|
146
|
+
componentDidLoad() {
|
|
147
|
+
this.ready = true;
|
|
148
|
+
this.connectListeners();
|
|
149
|
+
Promise.resolve().then(() => {
|
|
150
|
+
if (this.connected)
|
|
151
|
+
this.updateAnnouncements();
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
componentWillRender() {
|
|
155
|
+
if (this.renderedExpanded === this.expanded)
|
|
156
|
+
return;
|
|
157
|
+
this.renderedExpanded = this.expanded;
|
|
158
|
+
const targets = this.motionTargets;
|
|
159
|
+
if (!targets) {
|
|
160
|
+
this.motion.cancel();
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
this.motion.capture(targets.region, targets.list);
|
|
164
|
+
}
|
|
165
|
+
componentDidRender() {
|
|
166
|
+
this.restoreFocus();
|
|
167
|
+
this.releasePointerFocus();
|
|
168
|
+
if (this.region && this.list)
|
|
169
|
+
this.motion.play(this.region, this.list);
|
|
170
|
+
}
|
|
171
|
+
disconnectedCallback() {
|
|
172
|
+
var _a;
|
|
173
|
+
this.connected = false;
|
|
174
|
+
this.motion.cancel();
|
|
175
|
+
(_a = this.media) === null || _a === void 0 ? void 0 : _a.removeEventListener('change', this.handleMediaChange);
|
|
176
|
+
window.removeEventListener('pointermove', this.handlePointerMove);
|
|
177
|
+
if (this.focusFrame !== undefined)
|
|
178
|
+
cancelAnimationFrame(this.focusFrame);
|
|
179
|
+
this.focusFrame = undefined;
|
|
180
|
+
this.keyboardInteraction = false;
|
|
181
|
+
this.retainingPointerExpansion = false;
|
|
182
|
+
this.hovering = false;
|
|
183
|
+
this.focused = false;
|
|
184
|
+
}
|
|
185
|
+
handleItemsChange(next, previous = []) {
|
|
186
|
+
var _a, _b, _c, _d, _e, _f;
|
|
187
|
+
const targets = this.motionTargets;
|
|
188
|
+
if (targets)
|
|
189
|
+
this.motion.capture(targets.region, targets.list);
|
|
190
|
+
else
|
|
191
|
+
this.motion.cancel();
|
|
192
|
+
const active = (_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement;
|
|
193
|
+
const focusedId = (_b = active === null || active === void 0 ? void 0 : active.closest('[data-toast-id]')) === null || _b === void 0 ? void 0 : _b.dataset.toastId;
|
|
194
|
+
const nextVisible = next.slice(-3);
|
|
195
|
+
const previousVisibleIds = new Set(previous.slice(-3).map(item => item.id));
|
|
196
|
+
this.enteringIds = this.ready ? new Set(nextVisible.filter(item => !previousVisibleIds.has(item.id)).map(item => item.id)) : new Set();
|
|
197
|
+
if (focusedId !== undefined && !nextVisible.some(item => item.id === focusedId)) {
|
|
198
|
+
if (this.keyboardInteraction) {
|
|
199
|
+
const visibleIds = new Set(nextVisible.map(item => item.id));
|
|
200
|
+
const index = previous.findIndex(item => item.id === focusedId);
|
|
201
|
+
const following = previous.slice(index + 1).find(item => visibleIds.has(item.id));
|
|
202
|
+
const preceding = previous
|
|
203
|
+
.slice(0, index)
|
|
204
|
+
.reverse()
|
|
205
|
+
.find(item => visibleIds.has(item.id));
|
|
206
|
+
this.focusTarget = (_f = (_d = (_c = following === null || following === void 0 ? void 0 : following.id) !== null && _c !== void 0 ? _c : preceding === null || preceding === void 0 ? void 0 : preceding.id) !== null && _d !== void 0 ? _d : (_e = nextVisible[0]) === null || _e === void 0 ? void 0 : _e.id) !== null && _f !== void 0 ? _f : '';
|
|
207
|
+
}
|
|
208
|
+
else {
|
|
209
|
+
this.focusTarget = undefined;
|
|
210
|
+
this.releaseFocusAfterRender = true;
|
|
211
|
+
if (nextVisible.length && !this.noHover) {
|
|
212
|
+
this.retainingPointerExpansion = true;
|
|
213
|
+
window.addEventListener('pointermove', this.handlePointerMove, { once: true });
|
|
214
|
+
}
|
|
215
|
+
this.focused = false;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
if (this.ready)
|
|
219
|
+
this.updateAnnouncements();
|
|
220
|
+
}
|
|
221
|
+
updateAnnouncements() {
|
|
222
|
+
const records = [];
|
|
223
|
+
const signatures = new Map();
|
|
224
|
+
for (const item of this.visibleItems) {
|
|
225
|
+
const priority = item.announcement || 'polite';
|
|
226
|
+
const text = [item.title, item.message].filter(Boolean).join('. ');
|
|
227
|
+
const signature = JSON.stringify([text, priority]);
|
|
228
|
+
signatures.set(item.id, signature);
|
|
229
|
+
if (priority === 'off' || !text)
|
|
230
|
+
continue;
|
|
231
|
+
const previous = this.announcements.find(record => record.id === item.id);
|
|
232
|
+
records.push(this.announcementSignatures.get(item.id) === signature && previous
|
|
233
|
+
? previous
|
|
234
|
+
: {
|
|
235
|
+
id: item.id,
|
|
236
|
+
text,
|
|
237
|
+
priority,
|
|
238
|
+
version: ++this.announcementVersions,
|
|
239
|
+
});
|
|
240
|
+
}
|
|
241
|
+
this.announcementSignatures = signatures;
|
|
242
|
+
this.announcements = records;
|
|
243
|
+
}
|
|
244
|
+
connectListeners() {
|
|
245
|
+
var _a, _b, _c, _d;
|
|
246
|
+
this.media = (_a = window.matchMedia) === null || _a === void 0 ? void 0 : _a.call(window, '(hover: none)');
|
|
247
|
+
this.noHover = (_c = (_b = this.media) === null || _b === void 0 ? void 0 : _b.matches) !== null && _c !== void 0 ? _c : false;
|
|
248
|
+
(_d = this.media) === null || _d === void 0 ? void 0 : _d.addEventListener('change', this.handleMediaChange);
|
|
249
|
+
}
|
|
250
|
+
stopRetainingPointerExpansion() {
|
|
251
|
+
window.removeEventListener('pointermove', this.handlePointerMove);
|
|
252
|
+
this.retainingPointerExpansion = false;
|
|
253
|
+
}
|
|
254
|
+
restoreFocus() {
|
|
255
|
+
var _a, _b;
|
|
256
|
+
if (this.focusTarget === undefined)
|
|
257
|
+
return;
|
|
258
|
+
const targetId = this.focusTarget;
|
|
259
|
+
this.focusTarget = undefined;
|
|
260
|
+
const target = Array.from(((_a = this.list) === null || _a === void 0 ? void 0 : _a.querySelectorAll('[data-toast-id]')) || []).find(element => element.dataset.toastId === targetId);
|
|
261
|
+
(_b = (target || this.region)) === null || _b === void 0 ? void 0 : _b.focus();
|
|
262
|
+
}
|
|
263
|
+
releasePointerFocus() {
|
|
264
|
+
var _a, _b;
|
|
265
|
+
if (!this.releaseFocusAfterRender)
|
|
266
|
+
return;
|
|
267
|
+
this.releaseFocusAfterRender = false;
|
|
268
|
+
let active = (_a = this.hostElement.shadowRoot) === null || _a === void 0 ? void 0 : _a.activeElement;
|
|
269
|
+
while ((_b = active === null || active === void 0 ? void 0 : active.shadowRoot) === null || _b === void 0 ? void 0 : _b.activeElement)
|
|
270
|
+
active = active.shadowRoot.activeElement;
|
|
271
|
+
active === null || active === void 0 ? void 0 : active.blur();
|
|
272
|
+
this.focused = false;
|
|
273
|
+
}
|
|
274
|
+
render() {
|
|
275
|
+
const expanded = this.expanded;
|
|
276
|
+
const visibleItems = this.visibleItems;
|
|
277
|
+
return (h(Host, { key: 'e52aeb1dd9f0d54498a4c7a0ad2300cdc5d24484' }, h("section", { key: '7c829968e841616450c308571cd1b60341b3c38b', ref: el => (this.region = el), role: "region", "aria-label": "Notifica\u00E7\u00F5es", tabIndex: 0, class: "toast-region w-full rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-feedback-informational focus-visible:outline-offset-2", onMouseEnter: () => {
|
|
278
|
+
if (!this.noHover)
|
|
279
|
+
this.hovering = true;
|
|
280
|
+
}, onMouseLeave: () => (this.hovering = false), onPointerDown: () => {
|
|
281
|
+
this.keyboardInteraction = false;
|
|
282
|
+
this.stopRetainingPointerExpansion();
|
|
283
|
+
}, onKeyDown: () => {
|
|
284
|
+
this.keyboardInteraction = true;
|
|
285
|
+
this.stopRetainingPointerExpansion();
|
|
286
|
+
}, onFocusin: () => (this.focused = true), onFocusout: this.handleFocusOut }, h("div", { key: '2327880499750943034cf47d8f2ea2dfd13d0e5a', ref: el => (this.list = el), class: { 'toast-list relative flex flex-col gap-12': true, 'toast-list--collapsed': !expanded }, style: {
|
|
287
|
+
'--toast-layer-offset': `${Math.max(0, visibleItems.length - 1) * LAYER_OFFSET}px`,
|
|
288
|
+
} }, visibleItems.map((item, index) => {
|
|
289
|
+
var _a, _b, _c, _d;
|
|
290
|
+
const depth = visibleItems.length - 1 - index;
|
|
291
|
+
const covered = !expanded && depth > 0;
|
|
292
|
+
return (h("div", { key: item.id, "data-toast-id": item.id, tabIndex: -1, "aria-hidden": covered ? 'true' : undefined, inert: covered, class: {
|
|
293
|
+
'toast-layer relative w-full min-w-0 shrink-0': true,
|
|
294
|
+
'toast-layer--covered': covered,
|
|
295
|
+
'toast-layer--entering': this.enteringIds.has(item.id),
|
|
296
|
+
}, style: {
|
|
297
|
+
'--toast-depth': String(depth),
|
|
298
|
+
'--toast-width': `${100 - Math.min(depth, MAX_VISIBLE_LAYERS - 1) * LAYER_WIDTH_STEP}%`,
|
|
299
|
+
} }, h("sula-toast", { toastTitle: item.title, message: (_a = item.message) !== null && _a !== void 0 ? _a : '', type: item.type, icon: item.icon, actionText: (_b = item.actionText) !== null && _b !== void 0 ? _b : '', closable: (_c = item.closable) !== null && _c !== void 0 ? _c : true, duration: item.duration, closeLabel: (_d = item.closeLabel) !== null && _d !== void 0 ? _d : 'Fechar notificação', paused: covered || this.hovering || this.focused || this.retainingPointerExpansion, announcement: "off", animated: depth === 0, onToastDismissRequested: event => this.dismiss(event, item.id), onToastAction: event => this.action(event, item.id) })));
|
|
300
|
+
}))), h("div", { key: 'be446beb46594f14b6079a5a0649c9bf3a17b0cb', class: "sr-only", role: "status", "aria-live": "polite", "aria-atomic": "false", "aria-relevant": "additions text" }, this.announcements
|
|
301
|
+
.filter(record => record.priority === 'polite')
|
|
302
|
+
.map(record => (h("p", { key: record.version }, record.text)))), h("div", { key: '5d9e871c11e91fb293f22c92ddd5a590517576f1', class: "sr-only", role: "alert", "aria-live": "assertive", "aria-atomic": "false", "aria-relevant": "additions text" }, this.announcements
|
|
303
|
+
.filter(record => record.priority === 'assertive')
|
|
304
|
+
.map(record => (h("p", { key: record.version }, record.text))))));
|
|
305
|
+
}
|
|
306
|
+
get hostElement() { return this; }
|
|
307
|
+
static get watchers() { return {
|
|
308
|
+
"items": ["handleItemsChange"]
|
|
309
|
+
}; }
|
|
310
|
+
static get style() { return sulaToastStackCss; }
|
|
311
|
+
}, [1, "sula-toast-stack", {
|
|
312
|
+
"items": [16],
|
|
313
|
+
"hovering": [32],
|
|
314
|
+
"focused": [32],
|
|
315
|
+
"noHover": [32],
|
|
316
|
+
"retainingPointerExpansion": [32],
|
|
317
|
+
"announcements": [32]
|
|
318
|
+
}, undefined, {
|
|
319
|
+
"items": ["handleItemsChange"]
|
|
320
|
+
}]);
|
|
321
|
+
function defineCustomElement$1() {
|
|
322
|
+
if (typeof customElements === "undefined") {
|
|
323
|
+
return;
|
|
324
|
+
}
|
|
325
|
+
const components = ["sula-toast-stack", "sula-icon", "sula-toast"];
|
|
326
|
+
components.forEach(tagName => { switch (tagName) {
|
|
327
|
+
case "sula-toast-stack":
|
|
328
|
+
if (!customElements.get(tagName)) {
|
|
329
|
+
customElements.define(tagName, SulaToastStack$1);
|
|
330
|
+
}
|
|
331
|
+
break;
|
|
332
|
+
case "sula-icon":
|
|
333
|
+
if (!customElements.get(tagName)) {
|
|
334
|
+
defineCustomElement$3();
|
|
335
|
+
}
|
|
336
|
+
break;
|
|
337
|
+
case "sula-toast":
|
|
338
|
+
if (!customElements.get(tagName)) {
|
|
339
|
+
defineCustomElement$2();
|
|
340
|
+
}
|
|
341
|
+
break;
|
|
342
|
+
} });
|
|
343
|
+
}
|
|
344
|
+
defineCustomElement$1();
|
|
345
|
+
|
|
346
|
+
const SulaToastStack = SulaToastStack$1;
|
|
347
|
+
const defineCustomElement = defineCustomElement$1;
|
|
348
|
+
|
|
349
|
+
export { SulaToastStack, defineCustomElement };
|
|
350
|
+
//# sourceMappingURL=sula-toast-stack.js.map
|
|
351
|
+
|
|
352
|
+
//# sourceMappingURL=sula-toast-stack.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"sula-toast-stack.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,GAAG;AAC3B,MAAM,aAAa,GAAG,gCAAgC;MAYzC,oBAAoB,CAAA;AAAjC,IAAA,WAAA,GAAA;AAEU,QAAA,IAAA,CAAA,UAAU,GAAG,IAAI,GAAG,EAAa;;IAEzC,OAAO,CAAC,MAAmB,EAAE,IAAiB,EAAA;AAC5C,QAAA,MAAM,KAAK,GAAG,IAAI,GAAG,EAAsB;QAC3C,IAAI,CAAC,gBAAgB,CAAc,iBAAiB,CAAC,CAAC,OAAO,CAAC,OAAO,IAAG;AACtE,YAAA,MAAM,IAAI,GAAG,OAAO,CAAC,qBAAqB,EAAE;AAC5C,YAAA,IAAI,OAAO,CA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AAI,CAAK,CAC1C,CAAC,CACA,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAA,WAAA,EAAW,WAAW,EAAA,aAAA,EAAa,OAAO,EAAe,eAAA,EAAA,gBAAgB,EACvG,EAAA,IAAI,CAAC;aACH,MAAM,CAAC,MAAM,IAAI,MAAM,CAAC,QAAQ,KAAK,WAAW;aAChD,GAAG,CAAC,MAAM,KACT,CAAA,CAAA,GAAA,EAAA,EAAG,GAAG,EAAE,MAAM,CAAC,OAAO,EAAG,EAAA,MAAM,CAAC,IAAI,CAAK,CAC1C,CAAC,CACA,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaToastStack","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-toast-stack/sula-toast-stack.motion.ts","src/components/sula-toast-stack/sula-toast-stack.scss?tag=sula-toast-stack&encapsulation=shadow","src/components/sula-toast-stack/sula-toast-stack.tsx"],"sourcesContent":["const MOTION_DURATION = 260;\nconst MOTION_EASING = 'cubic-bezier(0.2, 0.8, 0.2, 1)';\n\ninterface CardLayout {\n rect: DOMRect;\n opacity: number;\n}\n\ninterface StackLayout {\n height: number;\n cards: Map<string, CardLayout>;\n}\n\nexport class SulaToastStackMotion {\n private previous?: StackLayout;\n private animations = new Set<Animation>();\n\n capture(region: HTMLElement, list: HTMLElement) {\n const cards = new Map<string, CardLayout>();\n list.querySelectorAll<HTMLElement>('[data-toast-id]').forEach(element => {\n const rect = element.getBoundingClientRect();\n if (element.dataset.toastId && rect.width && rect.height) {\n cards.set(element.dataset.toastId, { rect, opacity: Number(getComputedStyle(element).opacity) });\n }\n });\n\n const previous = { height: region.getBoundingClientRect().height, cards };\n this.cancelAnimations();\n this.previous = previous;\n }\n\n play(region: HTMLElement, list: HTMLElement) {\n const previous = this.previous;\n this.previous = undefined;\n if (!previous) return;\n\n list.querySelectorAll<HTMLElement>('[data-toast-id]').forEach(element => {\n const rect = element.getBoundingClientRect();\n const transform = getComputedStyle(element).transform;\n const restingTransform = transform === 'none' ? '' : transform;\n const origin = previous.cards.get(element.dataset.toastId);\n if (!rect.width || !rect.height) return;\n if (!origin) return;\n\n const deltaX = origin.rect.left - rect.left;\n const deltaY = origin.rect.top - rect.top;\n const scaleX = origin.rect.width / rect.width;\n const scaleY = origin.rect.height / rect.height;\n const moved = Math.abs(deltaX) > 0.5 || Math.abs(deltaY) > 0.5 || Math.abs(scaleX - 1) > 0.005 || Math.abs(scaleY - 1) > 0.005;\n if (!moved && origin.opacity > 0.995) return;\n\n this.animate(element, [\n {\n opacity: origin.opacity,\n transformOrigin: 'top left',\n transform: `translate(${deltaX}px, ${deltaY}px) ${restingTransform} scale(${scaleX}, ${scaleY})`,\n },\n { opacity: 1, transformOrigin: 'top left', transform },\n ]);\n });\n\n const height = region.getBoundingClientRect().height;\n if (previous.height !== height) this.animate(region, [{ height: `${previous.height}px` }, { height: `${height}px` }]);\n }\n\n cancel() {\n this.previous = undefined;\n this.cancelAnimations();\n }\n\n private animate(element: HTMLElement, frames: Keyframe[]) {\n const animation = element.animate(frames, { duration: MOTION_DURATION, easing: MOTION_EASING });\n this.animations.add(animation);\n animation.onfinish = animation.oncancel = () => this.animations.delete(animation);\n }\n\n private cancelAnimations() {\n this.animations.forEach(animation => animation.cancel());\n this.animations.clear();\n }\n}\n",":host {\n display: block;\n width: 100%;\n max-width: 400px;\n background-color: transparent;\n}\n\n.toast-region {\n background-color: transparent;\n}\n\n.toast-list--collapsed {\n padding-top: var(--toast-layer-offset);\n}\n\n.toast-layer--entering {\n animation: sula-toast-stack-enter 200ms cubic-bezier(0.2, 0.8, 0.2, 1);\n}\n\n@keyframes sula-toast-stack-enter {\n from {\n translate: 0 -8px;\n scale: 0.98;\n }\n\n to {\n translate: 0;\n scale: 1;\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .toast-layer--entering {\n animation: none;\n }\n}\n\n.toast-layer.toast-layer--covered {\n position: absolute;\n top: var(--toast-layer-offset);\n bottom: 0;\n inset-inline: 0;\n margin-inline: auto;\n width: var(--toast-width);\n transform: translateY(calc(var(--toast-depth) * -12px));\n clip-path: inset(0 0 calc(100% - 12px) 0);\n pointer-events: none;\n\n sula-toast,\n sula-toast::part(container) {\n height: 100%;\n }\n\n sula-toast::part(container) {\n overflow: hidden;\n box-shadow: none;\n isolation: auto;\n }\n\n sula-toast::part(icon),\n sula-toast::part(content),\n sula-toast::part(close-button) {\n visibility: hidden;\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaToastDismissEvent, SulaToastItem, SulaToastStackActionEvent, SulaToastStackDismissEvent } from '../sula-toast/model/sula-toast.model';\nimport type { Announcement } from './model/sula-toast-stack.model';\nimport { SulaToastStackMotion } from './sula-toast-stack.motion';\n\nconst MAX_VISIBLE_LAYERS = 3;\nconst LAYER_OFFSET = 12;\nconst LAYER_WIDTH_STEP = 5;\n\n@Component({ tag: 'sula-toast-stack', styleUrl: 'sula-toast-stack.scss', shadow: true })\nexport class SulaToastStack {\n @Element() hostElement: HTMLElement;\n\n /** Notifications in chronological order, oldest first. Only the latest three are rendered. Replace the array to update it. IDs must be unique. */\n @Prop() items: SulaToastItem[] = [];\n\n /** Requests removal of the identified notification by the consumer. */\n @Event() toastDismissRequested: EventEmitter<SulaToastStackDismissEvent>;\n\n /** Requests the identified notification's action without removing it. */\n @Event() toastAction: EventEmitter<SulaToastStackActionEvent>;\n\n @State() hovering = false;\n @State() focused = false;\n @State() noHover = false;\n @State() retainingPointerExpansion = false;\n @State() announcements: Announcement[] = [];\n\n private region?: HTMLElement;\n private list?: HTMLElement;\n private media?: MediaQueryList;\n private announcementVersions = 0;\n private announcementSignatures = new Map<string, string>();\n private enteringIds = new Set<string>();\n private focusTarget?: string;\n private focusFrame?: number;\n private keyboardInteraction = false;\n private releaseFocusAfterRender = false;\n private ready = false;\n private connected = false;\n private renderedExpanded?: boolean;\n private motion = new SulaToastStackMotion();\n\n private get expanded() {\n return this.noHover || this.hovering || this.focused || this.retainingPointerExpansion;\n }\n\n private get visibleItems() {\n return this.items.slice(-MAX_VISIBLE_LAYERS);\n }\n\n private get motionTargets() {\n const reduceMotion = window.matchMedia?.('(prefers-reduced-motion: reduce)').matches ?? false;\n if (!this.ready || this.noHover || reduceMotion || !this.region?.animate || !this.list) return;\n return { region: this.region, list: this.list };\n }\n\n connectedCallback() {\n this.connected = true;\n if (this.ready) this.connectListeners();\n }\n\n componentDidLoad() {\n this.ready = true;\n this.connectListeners();\n Promise.resolve().then(() => {\n if (this.connected) this.updateAnnouncements();\n });\n }\n\n componentWillRender() {\n if (this.renderedExpanded === this.expanded) return;\n this.renderedExpanded = this.expanded;\n const targets = this.motionTargets;\n if (!targets) {\n this.motion.cancel();\n return;\n }\n this.motion.capture(targets.region, targets.list);\n }\n\n componentDidRender() {\n this.restoreFocus();\n this.releasePointerFocus();\n if (this.region && this.list) this.motion.play(this.region, this.list);\n }\n\n disconnectedCallback() {\n this.connected = false;\n this.motion.cancel();\n this.media?.removeEventListener('change', this.handleMediaChange);\n window.removeEventListener('pointermove', this.handlePointerMove);\n if (this.focusFrame !== undefined) cancelAnimationFrame(this.focusFrame);\n this.focusFrame = undefined;\n this.keyboardInteraction = false;\n this.retainingPointerExpansion = false;\n this.hovering = false;\n this.focused = false;\n }\n\n @Watch('items')\n handleItemsChange(next: SulaToastItem[], previous: SulaToastItem[] = []) {\n const targets = this.motionTargets;\n if (targets) this.motion.capture(targets.region, targets.list);\n else this.motion.cancel();\n const active = this.hostElement.shadowRoot?.activeElement as HTMLElement | null;\n const focusedId = active?.closest<HTMLElement>('[data-toast-id]')?.dataset.toastId;\n const nextVisible = next.slice(-MAX_VISIBLE_LAYERS);\n const previousVisibleIds = new Set(previous.slice(-MAX_VISIBLE_LAYERS).map(item => item.id));\n this.enteringIds = this.ready ? new Set(nextVisible.filter(item => !previousVisibleIds.has(item.id)).map(item => item.id)) : new Set();\n if (focusedId !== undefined && !nextVisible.some(item => item.id === focusedId)) {\n if (this.keyboardInteraction) {\n const visibleIds = new Set(nextVisible.map(item => item.id));\n const index = previous.findIndex(item => item.id === focusedId);\n const following = previous.slice(index + 1).find(item => visibleIds.has(item.id));\n const preceding = previous\n .slice(0, index)\n .reverse()\n .find(item => visibleIds.has(item.id));\n this.focusTarget = following?.id ?? preceding?.id ?? nextVisible[0]?.id ?? '';\n } else {\n this.focusTarget = undefined;\n this.releaseFocusAfterRender = true;\n if (nextVisible.length && !this.noHover) {\n this.retainingPointerExpansion = true;\n window.addEventListener('pointermove', this.handlePointerMove, { once: true });\n }\n this.focused = false;\n }\n }\n if (this.ready) this.updateAnnouncements();\n }\n\n private updateAnnouncements() {\n const records: Announcement[] = [];\n const signatures = new Map<string, string>();\n for (const item of this.visibleItems) {\n const priority = item.announcement || 'polite';\n const text = [item.title, item.message].filter(Boolean).join('. ');\n const signature = JSON.stringify([text, priority]);\n signatures.set(item.id, signature);\n if (priority === 'off' || !text) continue;\n const previous = this.announcements.find(record => record.id === item.id);\n records.push(\n this.announcementSignatures.get(item.id) === signature && previous\n ? previous\n : {\n id: item.id,\n text,\n priority,\n version: ++this.announcementVersions,\n },\n );\n }\n this.announcementSignatures = signatures;\n this.announcements = records;\n }\n\n private connectListeners() {\n this.media = window.matchMedia?.('(hover: none)');\n this.noHover = this.media?.matches ?? false;\n this.media?.addEventListener('change', this.handleMediaChange);\n }\n\n private handleMediaChange = (event: MediaQueryListEvent) => {\n this.noHover = event.matches;\n this.hovering = false;\n this.stopRetainingPointerExpansion();\n };\n\n private handlePointerMove = (event: PointerEvent) => {\n const bounds = this.region?.getBoundingClientRect();\n this.hovering = !!bounds && event.clientX >= bounds.left && event.clientX <= bounds.right && event.clientY >= bounds.top && event.clientY <= bounds.bottom;\n this.stopRetainingPointerExpansion();\n };\n\n private stopRetainingPointerExpansion() {\n window.removeEventListener('pointermove', this.handlePointerMove);\n this.retainingPointerExpansion = false;\n }\n\n private restoreFocus() {\n if (this.focusTarget === undefined) return;\n const targetId = this.focusTarget;\n this.focusTarget = undefined;\n const target = Array.from(this.list?.querySelectorAll<HTMLElement>('[data-toast-id]') || []).find(element => element.dataset.toastId === targetId);\n (target || this.region)?.focus();\n }\n\n private releasePointerFocus() {\n if (!this.releaseFocusAfterRender) return;\n this.releaseFocusAfterRender = false;\n let active = this.hostElement.shadowRoot?.activeElement as HTMLElement | null;\n while (active?.shadowRoot?.activeElement) active = active.shadowRoot.activeElement as HTMLElement;\n active?.blur();\n this.focused = false;\n }\n\n private handleFocusOut = () => {\n if (this.focusFrame !== undefined) cancelAnimationFrame(this.focusFrame);\n this.focusFrame = requestAnimationFrame(() => {\n this.focusFrame = undefined;\n this.focused = !!this.hostElement.shadowRoot?.activeElement;\n });\n };\n\n private dismiss = (event: CustomEvent<SulaToastDismissEvent>, id: string) => {\n event.stopPropagation();\n this.toastDismissRequested.emit({ id, reason: event.detail.reason });\n };\n\n private action = (event: CustomEvent<void>, id: string) => {\n event.stopPropagation();\n this.toastAction.emit({ id });\n };\n\n render() {\n const expanded = this.expanded;\n const visibleItems = this.visibleItems;\n return (\n <Host>\n <section\n ref={el => (this.region = el)}\n role=\"region\"\n aria-label=\"Notificações\"\n tabIndex={0}\n class=\"toast-region w-full rounded-sm focus-visible:outline focus-visible:outline-2 focus-visible:outline-feedback-informational focus-visible:outline-offset-2\"\n onMouseEnter={() => {\n if (!this.noHover) this.hovering = true;\n }}\n onMouseLeave={() => (this.hovering = false)}\n onPointerDown={() => {\n this.keyboardInteraction = false;\n this.stopRetainingPointerExpansion();\n }}\n onKeyDown={() => {\n this.keyboardInteraction = true;\n this.stopRetainingPointerExpansion();\n }}\n onFocusin={() => (this.focused = true)}\n onFocusout={this.handleFocusOut}\n >\n <div\n ref={el => (this.list = el)}\n class={{ 'toast-list relative flex flex-col gap-12': true, 'toast-list--collapsed': !expanded }}\n style={{\n '--toast-layer-offset': `${Math.max(0, visibleItems.length - 1) * LAYER_OFFSET}px`,\n }}\n >\n {visibleItems.map((item, index) => {\n const depth = visibleItems.length - 1 - index;\n const covered = !expanded && depth > 0;\n return (\n <div\n key={item.id}\n data-toast-id={item.id}\n tabIndex={-1}\n aria-hidden={covered ? 'true' : undefined}\n inert={covered}\n class={{\n 'toast-layer relative w-full min-w-0 shrink-0': true,\n 'toast-layer--covered': covered,\n 'toast-layer--entering': this.enteringIds.has(item.id),\n }}\n style={{\n '--toast-depth': String(depth),\n '--toast-width': `${100 - Math.min(depth, MAX_VISIBLE_LAYERS - 1) * LAYER_WIDTH_STEP}%`,\n }}\n >\n <sula-toast\n toastTitle={item.title}\n message={item.message ?? ''}\n type={item.type}\n icon={item.icon}\n actionText={item.actionText ?? ''}\n closable={item.closable ?? true}\n duration={item.duration}\n closeLabel={item.closeLabel ?? 'Fechar notificação'}\n paused={covered || this.hovering || this.focused || this.retainingPointerExpansion}\n announcement=\"off\"\n animated={depth === 0}\n onToastDismissRequested={event => this.dismiss(event, item.id)}\n onToastAction={event => this.action(event, item.id)}\n />\n </div>\n );\n })}\n </div>\n </section>\n <div class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"false\" aria-relevant=\"additions text\">\n {this.announcements\n .filter(record => record.priority === 'polite')\n .map(record => (\n <p key={record.version}>{record.text}</p>\n ))}\n </div>\n <div class=\"sr-only\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"false\" aria-relevant=\"additions text\">\n {this.announcements\n .filter(record => record.priority === 'assertive')\n .map(record => (\n <p key={record.version}>{record.text}</p>\n ))}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Components, JSX } from "../types/components";
|
|
2
|
+
|
|
3
|
+
interface SulaToast extends Components.SulaToast, HTMLElement {}
|
|
4
|
+
export const SulaToast: {
|
|
5
|
+
prototype: SulaToast;
|
|
6
|
+
new (): SulaToast;
|
|
7
|
+
};
|
|
8
|
+
/**
|
|
9
|
+
* Used to define this component and all nested components recursively.
|
|
10
|
+
*/
|
|
11
|
+
export const defineCustomElement: () => void;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { S as SulaToast$1, d as defineCustomElement$1 } from './p-DmQoJS86.js';
|
|
2
|
+
|
|
3
|
+
const SulaToast = SulaToast$1;
|
|
4
|
+
const defineCustomElement = defineCustomElement$1;
|
|
5
|
+
|
|
6
|
+
export { SulaToast, defineCustomElement };
|
|
7
|
+
//# sourceMappingURL=sula-toast.js.map
|
|
8
|
+
|
|
9
|
+
//# sourceMappingURL=sula-toast.js.map
|