@sula-tech/webcomponents 0.23.1 → 0.24.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.cjs.js +8 -7
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sula-avatar_32.cjs.entry.js +24 -23
- package/dist/cjs/sula-avatar_32.cjs.entry.js.map +1 -1
- package/dist/cjs/sula-calendar.model-CxjS_EJv.js +10 -0
- package/dist/cjs/sula-calendar.model-CxjS_EJv.js.map +1 -0
- package/dist/cjs/{sula-calendar.model-BI5cNrUo.js → sula-menu.model-BDxbWyPG.js} +2 -8
- package/dist/cjs/sula-menu.model-BDxbWyPG.js.map +1 -0
- package/dist/cjs/sula-profile-menu.cjs.entry.js +55 -0
- package/dist/cjs/sula-profile-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/sula-profile-menu.entry.cjs.js.map +1 -0
- package/dist/cjs/sula-workbench-menu.cjs.entry.js +602 -0
- package/dist/cjs/sula-workbench-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/sula-workbench-menu.entry.cjs.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-menu/sula-menu.css +1 -1
- package/dist/collection/components/sula-menu/sula-menu.js +13 -13
- package/dist/collection/components/sula-menu/sula-menu.js.map +1 -1
- package/dist/collection/components/sula-profile-menu/model/sula-profile-menu.model.js +2 -0
- package/dist/collection/components/sula-profile-menu/model/sula-profile-menu.model.js.map +1 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.css +1 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.js +163 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.js.map +1 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.stories.js +74 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.stories.js.map +1 -0
- package/dist/collection/components/sula-switch/sula-switch.css +1 -1
- package/dist/collection/components/sula-workbench-menu/model/sula-workbench-menu.model.js +2 -0
- package/dist/collection/components/sula-workbench-menu/model/sula-workbench-menu.model.js.map +1 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.css +1 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js +1040 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js.map +1 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js +490 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js.map +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/{p-Dl7qXhBf.js → p-B_WIoxzn.js} +4 -4
- package/dist/components/{p-Dl7qXhBf.js.map → p-B_WIoxzn.js.map} +1 -1
- package/dist/components/{p-V9D4rqf7.js → p-BssyNhpP.js} +3 -3
- package/dist/components/{p-V9D4rqf7.js.map → p-BssyNhpP.js.map} +1 -1
- package/dist/components/{p-DzGiAQVF.js → p-CGpfhGAG.js} +3 -3
- package/dist/components/{p-DzGiAQVF.js.map → p-CGpfhGAG.js.map} +1 -1
- package/dist/components/{p-DRskhGOW.js → p-CWTfj4TV.js} +3 -3
- package/dist/components/{p-DRskhGOW.js.map → p-CWTfj4TV.js.map} +1 -1
- package/dist/components/p-DEhN6ZhJ.js +110 -0
- package/dist/components/p-DEhN6ZhJ.js.map +1 -0
- package/dist/components/{p-DjPqgTzy.js → p-DK8hW-Cd.js} +3 -3
- package/dist/components/{p-DjPqgTzy.js.map → p-DK8hW-Cd.js.map} +1 -1
- package/dist/components/{p-BhhQBGyJ.js → p-DwZCdDhF.js} +3 -3
- package/dist/components/{p-BhhQBGyJ.js.map → p-DwZCdDhF.js.map} +1 -1
- package/dist/components/{p-jsqtM3Ie.js → p-GEr9Dmhq.js} +3 -3
- package/dist/components/{p-jsqtM3Ie.js.map → p-GEr9Dmhq.js.map} +1 -1
- package/dist/components/p-KitH8bea.js +84 -0
- package/dist/components/p-KitH8bea.js.map +1 -0
- package/dist/components/sula-avatar.js +1 -1
- package/dist/components/sula-badge.js +1 -1
- package/dist/components/sula-breadcrumb.js +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-calendar.js +2 -2
- package/dist/components/sula-checkbox.js +1 -1
- package/dist/components/sula-chip.js +2 -2
- package/dist/components/sula-dropdown.js +1 -1
- package/dist/components/sula-icon-picker.js +4 -4
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-menu.js +15 -15
- package/dist/components/sula-menu.js.map +1 -1
- package/dist/components/sula-modal.js +2 -2
- package/dist/components/sula-profile-menu.d.ts +11 -0
- package/dist/components/sula-profile-menu.js +9 -0
- package/dist/components/sula-profile-menu.js.map +1 -0
- package/dist/components/sula-progress-bar.js +1 -1
- package/dist/components/sula-search-bar.js +1 -1
- package/dist/components/sula-segmented-control.js +1 -1
- package/dist/components/sula-switch.js +1 -105
- package/dist/components/sula-switch.js.map +1 -1
- package/dist/components/sula-tag.js +1 -1
- package/dist/components/sula-textfield.js +1 -1
- package/dist/components/sula-tiles.js +1 -1
- package/dist/components/sula-timeline-list.js +1 -1
- package/dist/components/sula-toast-stack.js +2 -2
- package/dist/components/sula-toast.js +1 -1
- package/dist/components/sula-toggle.js +1 -1
- package/dist/components/sula-tooltip.js +1 -1
- package/dist/components/sula-workbench-menu.d.ts +11 -0
- package/dist/components/sula-workbench-menu.js +659 -0
- package/dist/components/sula-workbench-menu.js.map +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-avatar_32.entry.js +18 -17
- package/dist/esm/sula-avatar_32.entry.js.map +1 -1
- package/dist/esm/sula-calendar.model-Cp_4qTxj.js +10 -0
- package/dist/esm/sula-calendar.model-Cp_4qTxj.js.map +1 -0
- package/dist/esm/{sula-calendar.model-BbsLJDfp.js → sula-menu.model-Cs9RR1ZV.js} +3 -9
- package/dist/esm/sula-menu.model-Cs9RR1ZV.js.map +1 -0
- package/dist/esm/sula-profile-menu.entry.js +53 -0
- package/dist/esm/sula-profile-menu.entry.js.map +1 -0
- package/dist/esm/sula-workbench-menu.entry.js +600 -0
- package/dist/esm/sula-workbench-menu.entry.js.map +1 -0
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-profile-menu/model/sula-profile-menu.model.d.ts +22 -0
- package/dist/types/components/sula-profile-menu/sula-profile-menu.d.ts +35 -0
- package/dist/types/components/sula-profile-menu/sula-profile-menu.stories.d.ts +34 -0
- package/dist/types/components/sula-workbench-menu/model/sula-workbench-menu.model.d.ts +19 -0
- package/dist/types/components/sula-workbench-menu/sula-workbench-menu.d.ts +182 -0
- package/dist/types/components/sula-workbench-menu/sula-workbench-menu.stories.d.ts +168 -0
- package/dist/types/components.d.ts +275 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +3 -1
- package/dist/webcomponents/index.esm.js.map +1 -1
- package/dist/webcomponents/p-50ad82d0.entry.js +827 -0
- package/dist/webcomponents/p-50ad82d0.entry.js.map +1 -0
- package/dist/webcomponents/p-88e5171a.entry.js +100 -0
- package/dist/webcomponents/p-88e5171a.entry.js.map +1 -0
- package/dist/webcomponents/{p-20b3135d.entry.js → p-907588e9.entry.js} +193 -191
- package/dist/webcomponents/{p-20b3135d.entry.js.map → p-907588e9.entry.js.map} +1 -1
- package/dist/webcomponents/p-Cp_4qTxj.js +10 -0
- package/dist/webcomponents/p-Cp_4qTxj.js.map +1 -0
- package/dist/webcomponents/{p-BbsLJDfp.js → p-Cs9RR1ZV.js} +4 -11
- package/dist/webcomponents/p-Cs9RR1ZV.js.map +1 -0
- package/dist/webcomponents/sula-profile-menu.entry.esm.js.map +1 -0
- package/dist/webcomponents/sula-workbench-menu.entry.esm.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +34 -9
- package/package.json +1 -1
- package/dist/cjs/sula-calendar.model-BI5cNrUo.js.map +0 -1
- package/dist/esm/sula-calendar.model-BbsLJDfp.js.map +0 -1
- package/dist/webcomponents/p-BbsLJDfp.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
|
|
2
2
|
import { S as SulaToastType } from './p-t0X4JATS.js';
|
|
3
|
-
import { d as defineCustomElement$1 } from './p-
|
|
3
|
+
import { d as defineCustomElement$1 } from './p-DK8hW-Cd.js';
|
|
4
4
|
|
|
5
5
|
const sulaToastCss = "*,: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}.visible{visibility:visible}.absolute{position:absolute}.block{display:block}.hidden{display:none}.blur{--tw-blur:blur(8px);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)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}: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;max-width:400px;width:100%}.toast-copy{overflow-wrap:anywhere}.toast-title{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toast-message{-webkit-box-orient:vertical;-webkit-line-clamp:4;line-clamp:4;display:-webkit-box;overflow:hidden}.toast-action{display:block;max-width:100%;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.toast-surface{-webkit-backdrop-filter:blur(20px);backdrop-filter:blur(20px);box-shadow:0 12px 48px rgba(25,29,29,.2);max-width:400px}.toast-surface--animated{animation:sula-toast-fade-in .28s cubic-bezier(.2,.8,.2,1),sula-toast-border-settle .72s step-end}.toast-border{height:calc(100% + 2px);inset:-1px;overflow:visible;pointer-events:none;position:absolute;width:calc(100% + 2px)}.toast-surface--animated .toast-border{animation:sula-toast-border-overlay .72s step-end}.toast-border__path{x:.5px;y:.5px;rx:12px;fill:none;stroke:var(--toast-border-color);stroke-width:1px;stroke-linecap:round;stroke-dasharray:1;stroke-dashoffset:1;vector-effect:non-scaling-stroke;height:calc(100% - 1px);width:calc(100% - 1px)}.toast-surface--animated .toast-border__path{animation:sula-toast-border-trace .72s cubic-bezier(.4,0,.2,1)}@keyframes sula-toast-fade-in{0%{opacity:0}to{opacity:1}}@keyframes sula-toast-border-settle{0%{border-color:transparent}to{border-color:var(--toast-border-color)}}@keyframes sula-toast-border-overlay{0%{opacity:1}to{opacity:0}}@keyframes sula-toast-border-trace{0%{stroke-dashoffset:1}to{stroke-dashoffset:0}}@supports not (((-webkit-backdrop-filter:blur(20px)) or (backdrop-filter:blur(20px))) or (-webkit-backdrop-filter:blur(20px))){.toast-surface.bg-opacity-toast{background-color:var(--color-surface-body)}}@media (prefers-reduced-motion:reduce){.toast-surface--animated{animation:none}.toast-surface--animated .toast-border{display:none}}: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,.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)}@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\")}.right-16{right:1rem}.top-16{top:1rem}.isolate{isolation:isolate}.box-border{box-sizing:border-box}.h-24{height:1.5rem}.h-44{height:2.75rem}.w-24{width:1.5rem}.w-44{width:2.75rem}.flex-1{flex:1 1 0%}.items-center{align-items:center}.justify-center{justify-content:center}.gap-4{gap:.25rem}.gap-8{gap:.5rem}.self-start{align-self:flex-start}.rounded{border-radius:.25rem}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-brand-primary{border-color:var(--color-brand-primary)}.border-feedback-alert{border-color:var(--color-feedback-alert)}.border-feedback-error{border-color:var(--color-feedback-error)}.border-feedback-informational{border-color:var(--color-feedback-informational)}.border-feedback-success{border-color:var(--color-feedback-success)}.border-line-general{border-color:var(--color-line-general)}.bg-opacity-toast{background-color:var(--color-opacity-toast)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.bg-surface-on-body-brand{background-color:var(--color-surface-on-body-brand)}.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-info{background-color:var(--color-surface-on-body-feedback-info)}.bg-surface-on-body-feedback-success{background-color:var(--color-surface-on-body-feedback-success)}.p-16{padding:1rem}.pr-48{padding-right:3rem}.text-left{text-align:left}.text-2xl{font-size:1.5rem;line-height:2rem}.text-label-medium-bold{font-size:1rem;font-weight:700;letter-spacing:0;line-height:20px}.text-label-medium-regular{font-size:1rem;font-weight:400;letter-spacing:0;line-height:20px}.leading-none{line-height:1}.text-brand-primary{color:var(--color-brand-primary)}.text-feedback-alert{color:var(--color-feedback-alert)}.text-feedback-error{color:var(--color-feedback-error)}.text-feedback-informational{color:var(--color-feedback-informational)}.text-feedback-success{color:var(--color-feedback-success)}.text-icon-primary{color:var(--color-icon-primary)}.text-text-link{color:var(--color-text-link)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.underline{text-decoration-line:underline}.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)}.container{width:100%}@media (min-width:22.5rem){.container{max-width:22.5rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}";
|
|
6
6
|
|
|
@@ -230,6 +230,6 @@ function defineCustomElement() {
|
|
|
230
230
|
defineCustomElement();
|
|
231
231
|
|
|
232
232
|
export { SulaToast as S, defineCustomElement as d };
|
|
233
|
-
//# sourceMappingURL=p-
|
|
233
|
+
//# sourceMappingURL=p-CWTfj4TV.js.map
|
|
234
234
|
|
|
235
|
-
//# sourceMappingURL=p-
|
|
235
|
+
//# sourceMappingURL=p-CWTfj4TV.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"p-DRskhGOW.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,wokBAAwokB;;ACG7pkB,MAAM,gBAAgB,GAAG,IAAI;AAC7B,MAAM,kBAAkB,GAAG,2HAA2H;AAEtJ,MAAM,aAAa,GAAsG;AACvH,IAAA,CAAC,aAAa,CAAC,OAAO,GAAG;AACvB,QA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,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oBAAoB,EAAC,UAAU,EAAC,GAAG,EAAG,CAAA,CAC9C,CACF,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAW,WAAA,EAAA,QAAQ,EAAa,aAAA,EAAA,MAAM,EACrE,EAAA,IAAI,CAAC,YAAY,KAAK,QAAQ,GAAG,IAAI,CAAC,aAAa,GAAG,EAAE,CACrD,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAA,WAAA,EAAW,WAAW,EAAA,aAAA,EAAa,MAAM,EAAA,EACvE,IAAI,CAAC,YAAY,KAAK,WAAW,GAAG,IAAI,CAAC,aAAa,GAAG,EAAE,CACxD,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-toast/sula-toast.scss?tag=sula-toast&encapsulation=shadow","src/components/sula-toast/sula-toast.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n max-width: 400px;\n}\n\n.toast-copy {\n overflow-wrap: anywhere;\n}\n\n.toast-title {\n display: block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.toast-message {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 4;\n line-clamp: 4;\n}\n\n.toast-action {\n display: block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.toast-surface {\n max-width: 400px;\n box-shadow: 0 12px 48px rgba(25, 29, 29, 0.2);\n -webkit-backdrop-filter: blur(20px);\n backdrop-filter: blur(20px);\n}\n\n.toast-surface--animated {\n animation:\n sula-toast-fade-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1),\n sula-toast-border-settle 720ms step-end;\n}\n\n.toast-border {\n position: absolute;\n inset: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n overflow: visible;\n pointer-events: none;\n}\n\n.toast-surface--animated .toast-border {\n animation: sula-toast-border-overlay 720ms step-end;\n}\n\n.toast-border__path {\n x: 0.5px;\n y: 0.5px;\n width: calc(100% - 1px);\n height: calc(100% - 1px);\n rx: 12px;\n fill: none;\n stroke: var(--toast-border-color);\n stroke-width: 1px;\n stroke-linecap: round;\n stroke-dasharray: 1;\n stroke-dashoffset: 1;\n vector-effect: non-scaling-stroke;\n}\n\n.toast-surface--animated .toast-border__path {\n animation: sula-toast-border-trace 720ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n@keyframes sula-toast-fade-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n@keyframes sula-toast-border-settle {\n from {\n border-color: transparent;\n }\n\n to {\n border-color: var(--toast-border-color);\n }\n}\n\n@keyframes sula-toast-border-overlay {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n\n@keyframes sula-toast-border-trace {\n from {\n stroke-dashoffset: 1;\n }\n\n to {\n stroke-dashoffset: 0;\n }\n}\n\n@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {\n .toast-surface.bg-opacity-toast {\n background-color: var(--color-surface-body);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .toast-surface--animated {\n animation: none;\n }\n\n .toast-surface--animated .toast-border {\n display: none;\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaToastAnnouncement, SulaToastDismissEvent, SulaToastType } from './model/sula-toast.model';\n\nconst DEFAULT_DURATION = 5000;\nconst FOCUS_RING_CLASSES = 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-feedback-informational focus-visible:outline-offset-2';\n\nconst TOAST_INTENTS: Record<SulaToastType, { border: string; borderColor: string; color: string; background: string }> = {\n [SulaToastType.Neutral]: {\n border: 'border-line-general',\n borderColor: 'var(--color-line-general)',\n color: 'text-icon-primary',\n background: 'bg-surface-on-body',\n },\n [SulaToastType.Brand]: {\n border: 'border-brand-primary',\n borderColor: 'var(--color-brand-primary)',\n color: 'text-brand-primary',\n background: 'bg-surface-on-body-brand',\n },\n [SulaToastType.Info]: {\n border: 'border-feedback-informational',\n borderColor: 'var(--color-feedback-informational)',\n color: 'text-feedback-informational',\n background: 'bg-surface-on-body-feedback-info',\n },\n [SulaToastType.Success]: {\n border: 'border-feedback-success',\n borderColor: 'var(--color-feedback-success)',\n color: 'text-feedback-success',\n background: 'bg-surface-on-body-feedback-success',\n },\n [SulaToastType.Warning]: {\n border: 'border-feedback-alert',\n borderColor: 'var(--color-feedback-alert)',\n color: 'text-feedback-alert',\n background: 'bg-surface-on-body-feedback-alert',\n },\n [SulaToastType.Danger]: {\n border: 'border-feedback-error',\n borderColor: 'var(--color-feedback-error)',\n color: 'text-feedback-error',\n background: 'bg-surface-on-body-feedback-error',\n },\n};\n\n/**\n * A controlled notification. The consumer removes it after toastDismissRequested.\n * @part container - Notification surface.\n * @part icon - Decorative intent icon.\n * @part content - Title, description and action.\n * @part close-button - Dismiss button.\n */\n@Component({ tag: 'sula-toast', styleUrl: 'sula-toast.scss', shadow: true })\nexport class SulaToast {\n @Element() hostElement: HTMLElement;\n\n /** Notification title. */\n @Prop() toastTitle = '';\n\n /** Optional notification description, displayed on up to four lines. */\n @Prop() message = '';\n\n /** Visual intent, independent of announcement urgency. */\n @Prop() type: SulaToastType = SulaToastType.Neutral;\n\n /** Optional full Phosphor class name. No icon is displayed when omitted or empty. */\n @Prop() icon?: string;\n\n /** Optional single-line action label. The consumer implements the action. */\n @Prop() actionText = '';\n\n /** Whether to display the dismiss button. */\n @Prop() closable = true;\n\n /** Milliseconds before requesting dismissal. Zero persists; omitted means 5000 without an action and persistent with an action. */\n @Prop() duration?: number;\n\n /** Externally pause the remaining timeout, for example while covered by a stack. */\n @Prop() paused = false;\n\n /** Whether to play the entrance animations (fade-in and border trace). Disable when a parent already controls the animation, for example toasts covered in a stack. */\n @Prop() animated = true;\n\n /** Screen reader announcement priority. Use off when a parent owns announcements. */\n @Prop() announcement: SulaToastAnnouncement = 'polite';\n\n /** Accessible dismiss button label. */\n @Prop() closeLabel = 'Fechar notificação';\n\n /** Requests removal by the consumer. Does not remove or hide the element. */\n @Event() toastDismissRequested: EventEmitter<SulaToastDismissEvent>;\n /** Requests the configured action without dismissing the notification. */\n @Event() toastAction: EventEmitter<void>;\n\n @State() announcedText = '';\n private timer?: ReturnType<typeof setTimeout>;\n private observer?: IntersectionObserver;\n private remaining = 0;\n private startedAt = 0;\n private timedOut = false;\n private timeoutEnabled = false;\n private hovering = false;\n private focused = false;\n private visible = false;\n private ready = false;\n private connected = false;\n\n connectedCallback() {\n this.connected = true;\n if (this.ready) this.observeVisibility();\n }\n\n componentDidLoad() {\n this.ready = true;\n this.resetTimeout();\n Promise.resolve().then(() => {\n if (this.connected) this.updateAnnouncement();\n });\n this.observeVisibility();\n }\n\n disconnectedCallback() {\n this.connected = false;\n this.stopTimeout();\n this.observer?.disconnect();\n this.hovering = false;\n this.focused = false;\n }\n\n @Watch('toastTitle')\n @Watch('message')\n @Watch('actionText')\n @Watch('duration')\n handleContentChange() {\n this.resetTimeout();\n this.updateAnnouncement();\n }\n\n @Watch('announcement')\n updateAnnouncement() {\n this.announcedText = this.announcement === 'off' ? '' : [this.toastTitle, this.message].filter(Boolean).join('. ');\n }\n\n @Watch('paused')\n @Listen('visibilitychange', { target: 'document' })\n updateTimeout() {\n const blocked = !this.connected || !this.ready || !this.visible || this.paused || this.hovering || this.focused || document.visibilityState === 'hidden';\n if (blocked) {\n this.stopTimeout();\n } else if (this.timer === undefined && this.timeoutEnabled && !this.timedOut) {\n this.startedAt = Date.now();\n this.timer = setTimeout(() => {\n this.timer = undefined;\n this.remaining = 0;\n this.timedOut = true;\n this.toastDismissRequested.emit({ reason: 'timeout' });\n }, this.remaining);\n }\n }\n\n private resetTimeout() {\n this.stopTimeout();\n this.remaining = this.resolveDuration();\n this.timeoutEnabled = this.remaining > 0;\n this.timedOut = false;\n this.updateTimeout();\n }\n\n private resolveDuration() {\n if (typeof this.duration === 'number' && Number.isFinite(this.duration) && this.duration >= 0) return this.duration;\n return this.actionText ? 0 : DEFAULT_DURATION;\n }\n\n private stopTimeout() {\n if (this.timer !== undefined) {\n clearTimeout(this.timer);\n this.timer = undefined;\n this.remaining = Math.max(0, this.remaining - (Date.now() - this.startedAt));\n }\n }\n\n private observeVisibility() {\n this.observer?.disconnect();\n if (typeof IntersectionObserver === 'undefined') {\n this.visible = true;\n this.updateTimeout();\n return;\n }\n this.visible = false;\n this.observer = new IntersectionObserver(entries => {\n this.visible = entries.some(entry => entry.isIntersecting && entry.intersectionRatio > 0);\n this.updateTimeout();\n });\n this.observer.observe(this.hostElement);\n }\n\n private setHover(value: boolean) {\n this.hovering = value && !(window.matchMedia?.('(hover: none)').matches ?? false);\n this.updateTimeout();\n }\n\n private handleFocusOut = (event: FocusEvent) => {\n const target = event.relatedTarget as Node | null;\n this.focused = !!target && (this.hostElement.contains(target) || this.hostElement.shadowRoot.contains(target));\n this.updateTimeout();\n };\n\n private get intent() {\n return TOAST_INTENTS[this.type] || TOAST_INTENTS[SulaToastType.Neutral];\n }\n\n render() {\n const intent = this.intent;\n return (\n <Host\n onMouseEnter={() => this.setHover(true)}\n onMouseLeave={() => this.setHover(false)}\n onFocusin={() => {\n this.focused = true;\n this.updateTimeout();\n }}\n onFocusout={this.handleFocusOut}\n >\n <div\n part=\"container\"\n class={`toast-surface relative isolate box-border flex items-center w-full p-16 gap-12 rounded-sm border bg-opacity-toast ${intent.border} ${this.animated ? 'toast-surface--animated' : ''}`}\n style={{ '--toast-border-color': intent.borderColor }}\n >\n {this.icon && (\n <div part=\"icon\" aria-hidden=\"true\" class={`flex shrink-0 items-center justify-center w-44 h-44 rounded-xxl ${intent.background}`}>\n <sula-icon icon={this.icon} customClass={`text-2xl ${intent.color}`} class=\"flex leading-none\" />\n </div>\n )}\n <div part=\"content\" class={`flex min-w-0 flex-1 flex-col gap-8 ${this.closable ? 'pr-48' : ''}`}>\n <div class=\"flex flex-col gap-4\">\n {this.toastTitle && (\n <p class=\"toast-copy toast-title text-label-medium-bold text-text-primary\" title={this.toastTitle}>\n {this.toastTitle}\n </p>\n )}\n {this.message && (\n <p class=\"toast-copy toast-message text-label-medium-regular text-text-secondary\" title={this.message}>\n {this.message}\n </p>\n )}\n </div>\n {this.actionText && (\n <button\n type=\"button\"\n class={`toast-copy toast-action self-start text-left text-label-medium-bold text-text-link underline rounded ${FOCUS_RING_CLASSES}`}\n title={this.actionText}\n onClick={() => this.toastAction.emit()}\n >\n {this.actionText}\n </button>\n )}\n </div>\n {this.closable && (\n <button\n part=\"close-button\"\n type=\"button\"\n aria-label={this.closeLabel}\n class={`absolute top-16 right-16 flex items-center justify-center w-24 h-24 rounded ${intent.color} ${FOCUS_RING_CLASSES}`}\n onClick={() => this.toastDismissRequested.emit({ reason: 'close' })}\n >\n <sula-icon aria-hidden=\"true\" icon=\"ph ph-x\" customClass=\"text-2xl\" class=\"flex leading-none\" />\n </button>\n )}\n <svg class=\"toast-border\" aria-hidden=\"true\" focusable=\"false\">\n <rect class=\"toast-border__path\" pathLength=\"1\" />\n </svg>\n </div>\n <div class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {this.announcement === 'polite' ? this.announcedText : ''}\n </div>\n <div class=\"sr-only\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\">\n {this.announcement === 'assertive' ? this.announcedText : ''}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
1
|
+
{"file":"p-CWTfj4TV.js","mappings":";;;;AAAA,MAAM,YAAY,GAAG,wokBAAwokB;;ACG7pkB,MAAM,gBAAgB,GAAG,IA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A,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,cAAc,EAAA,aAAA,EAAa,MAAM,EAAC,SAAS,EAAC,OAAO,EAAA,EAC5D,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,oBAAoB,EAAC,UAAU,EAAC,GAAG,EAAG,CAAA,CAC9C,CACF,EACN,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,QAAQ,EAAW,WAAA,EAAA,QAAQ,EAAa,aAAA,EAAA,MAAM,EACrE,EAAA,IAAI,CAAC,YAAY,KAAK,QAAQ,GAAG,IAAI,CAAC,aAAa,GAAG,EAAE,CACrD,EACN,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,SAAS,EAAC,IAAI,EAAC,OAAO,EAAA,WAAA,EAAW,WAAW,EAAA,aAAA,EAAa,MAAM,EAAA,EACvE,IAAI,CAAC,YAAY,KAAK,WAAW,GAAG,IAAI,CAAC,aAAa,GAAG,EAAE,CACxD,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-toast/sula-toast.scss?tag=sula-toast&encapsulation=shadow","src/components/sula-toast/sula-toast.tsx"],"sourcesContent":[":host {\n display: block;\n width: 100%;\n max-width: 400px;\n}\n\n.toast-copy {\n overflow-wrap: anywhere;\n}\n\n.toast-title {\n display: block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.toast-message {\n display: -webkit-box;\n overflow: hidden;\n -webkit-box-orient: vertical;\n -webkit-line-clamp: 4;\n line-clamp: 4;\n}\n\n.toast-action {\n display: block;\n min-width: 0;\n max-width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.toast-surface {\n max-width: 400px;\n box-shadow: 0 12px 48px rgba(25, 29, 29, 0.2);\n -webkit-backdrop-filter: blur(20px);\n backdrop-filter: blur(20px);\n}\n\n.toast-surface--animated {\n animation:\n sula-toast-fade-in 280ms cubic-bezier(0.2, 0.8, 0.2, 1),\n sula-toast-border-settle 720ms step-end;\n}\n\n.toast-border {\n position: absolute;\n inset: -1px;\n width: calc(100% + 2px);\n height: calc(100% + 2px);\n overflow: visible;\n pointer-events: none;\n}\n\n.toast-surface--animated .toast-border {\n animation: sula-toast-border-overlay 720ms step-end;\n}\n\n.toast-border__path {\n x: 0.5px;\n y: 0.5px;\n width: calc(100% - 1px);\n height: calc(100% - 1px);\n rx: 12px;\n fill: none;\n stroke: var(--toast-border-color);\n stroke-width: 1px;\n stroke-linecap: round;\n stroke-dasharray: 1;\n stroke-dashoffset: 1;\n vector-effect: non-scaling-stroke;\n}\n\n.toast-surface--animated .toast-border__path {\n animation: sula-toast-border-trace 720ms cubic-bezier(0.4, 0, 0.2, 1);\n}\n\n@keyframes sula-toast-fade-in {\n from {\n opacity: 0;\n }\n\n to {\n opacity: 1;\n }\n}\n\n@keyframes sula-toast-border-settle {\n from {\n border-color: transparent;\n }\n\n to {\n border-color: var(--toast-border-color);\n }\n}\n\n@keyframes sula-toast-border-overlay {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n\n@keyframes sula-toast-border-trace {\n from {\n stroke-dashoffset: 1;\n }\n\n to {\n stroke-dashoffset: 0;\n }\n}\n\n@supports not ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {\n .toast-surface.bg-opacity-toast {\n background-color: var(--color-surface-body);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .toast-surface--animated {\n animation: none;\n }\n\n .toast-surface--animated .toast-border {\n display: none;\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaToastAnnouncement, SulaToastDismissEvent, SulaToastType } from './model/sula-toast.model';\n\nconst DEFAULT_DURATION = 5000;\nconst FOCUS_RING_CLASSES = 'focus-visible:outline focus-visible:outline-2 focus-visible:outline-feedback-informational focus-visible:outline-offset-2';\n\nconst TOAST_INTENTS: Record<SulaToastType, { border: string; borderColor: string; color: string; background: string }> = {\n [SulaToastType.Neutral]: {\n border: 'border-line-general',\n borderColor: 'var(--color-line-general)',\n color: 'text-icon-primary',\n background: 'bg-surface-on-body',\n },\n [SulaToastType.Brand]: {\n border: 'border-brand-primary',\n borderColor: 'var(--color-brand-primary)',\n color: 'text-brand-primary',\n background: 'bg-surface-on-body-brand',\n },\n [SulaToastType.Info]: {\n border: 'border-feedback-informational',\n borderColor: 'var(--color-feedback-informational)',\n color: 'text-feedback-informational',\n background: 'bg-surface-on-body-feedback-info',\n },\n [SulaToastType.Success]: {\n border: 'border-feedback-success',\n borderColor: 'var(--color-feedback-success)',\n color: 'text-feedback-success',\n background: 'bg-surface-on-body-feedback-success',\n },\n [SulaToastType.Warning]: {\n border: 'border-feedback-alert',\n borderColor: 'var(--color-feedback-alert)',\n color: 'text-feedback-alert',\n background: 'bg-surface-on-body-feedback-alert',\n },\n [SulaToastType.Danger]: {\n border: 'border-feedback-error',\n borderColor: 'var(--color-feedback-error)',\n color: 'text-feedback-error',\n background: 'bg-surface-on-body-feedback-error',\n },\n};\n\n/**\n * A controlled notification. The consumer removes it after toastDismissRequested.\n * @part container - Notification surface.\n * @part icon - Decorative intent icon.\n * @part content - Title, description and action.\n * @part close-button - Dismiss button.\n */\n@Component({ tag: 'sula-toast', styleUrl: 'sula-toast.scss', shadow: true })\nexport class SulaToast {\n @Element() hostElement: HTMLElement;\n\n /** Notification title. */\n @Prop() toastTitle = '';\n\n /** Optional notification description, displayed on up to four lines. */\n @Prop() message = '';\n\n /** Visual intent, independent of announcement urgency. */\n @Prop() type: SulaToastType = SulaToastType.Neutral;\n\n /** Optional full Phosphor class name. No icon is displayed when omitted or empty. */\n @Prop() icon?: string;\n\n /** Optional single-line action label. The consumer implements the action. */\n @Prop() actionText = '';\n\n /** Whether to display the dismiss button. */\n @Prop() closable = true;\n\n /** Milliseconds before requesting dismissal. Zero persists; omitted means 5000 without an action and persistent with an action. */\n @Prop() duration?: number;\n\n /** Externally pause the remaining timeout, for example while covered by a stack. */\n @Prop() paused = false;\n\n /** Whether to play the entrance animations (fade-in and border trace). Disable when a parent already controls the animation, for example toasts covered in a stack. */\n @Prop() animated = true;\n\n /** Screen reader announcement priority. Use off when a parent owns announcements. */\n @Prop() announcement: SulaToastAnnouncement = 'polite';\n\n /** Accessible dismiss button label. */\n @Prop() closeLabel = 'Fechar notificação';\n\n /** Requests removal by the consumer. Does not remove or hide the element. */\n @Event() toastDismissRequested: EventEmitter<SulaToastDismissEvent>;\n /** Requests the configured action without dismissing the notification. */\n @Event() toastAction: EventEmitter<void>;\n\n @State() announcedText = '';\n private timer?: ReturnType<typeof setTimeout>;\n private observer?: IntersectionObserver;\n private remaining = 0;\n private startedAt = 0;\n private timedOut = false;\n private timeoutEnabled = false;\n private hovering = false;\n private focused = false;\n private visible = false;\n private ready = false;\n private connected = false;\n\n connectedCallback() {\n this.connected = true;\n if (this.ready) this.observeVisibility();\n }\n\n componentDidLoad() {\n this.ready = true;\n this.resetTimeout();\n Promise.resolve().then(() => {\n if (this.connected) this.updateAnnouncement();\n });\n this.observeVisibility();\n }\n\n disconnectedCallback() {\n this.connected = false;\n this.stopTimeout();\n this.observer?.disconnect();\n this.hovering = false;\n this.focused = false;\n }\n\n @Watch('toastTitle')\n @Watch('message')\n @Watch('actionText')\n @Watch('duration')\n handleContentChange() {\n this.resetTimeout();\n this.updateAnnouncement();\n }\n\n @Watch('announcement')\n updateAnnouncement() {\n this.announcedText = this.announcement === 'off' ? '' : [this.toastTitle, this.message].filter(Boolean).join('. ');\n }\n\n @Watch('paused')\n @Listen('visibilitychange', { target: 'document' })\n updateTimeout() {\n const blocked = !this.connected || !this.ready || !this.visible || this.paused || this.hovering || this.focused || document.visibilityState === 'hidden';\n if (blocked) {\n this.stopTimeout();\n } else if (this.timer === undefined && this.timeoutEnabled && !this.timedOut) {\n this.startedAt = Date.now();\n this.timer = setTimeout(() => {\n this.timer = undefined;\n this.remaining = 0;\n this.timedOut = true;\n this.toastDismissRequested.emit({ reason: 'timeout' });\n }, this.remaining);\n }\n }\n\n private resetTimeout() {\n this.stopTimeout();\n this.remaining = this.resolveDuration();\n this.timeoutEnabled = this.remaining > 0;\n this.timedOut = false;\n this.updateTimeout();\n }\n\n private resolveDuration() {\n if (typeof this.duration === 'number' && Number.isFinite(this.duration) && this.duration >= 0) return this.duration;\n return this.actionText ? 0 : DEFAULT_DURATION;\n }\n\n private stopTimeout() {\n if (this.timer !== undefined) {\n clearTimeout(this.timer);\n this.timer = undefined;\n this.remaining = Math.max(0, this.remaining - (Date.now() - this.startedAt));\n }\n }\n\n private observeVisibility() {\n this.observer?.disconnect();\n if (typeof IntersectionObserver === 'undefined') {\n this.visible = true;\n this.updateTimeout();\n return;\n }\n this.visible = false;\n this.observer = new IntersectionObserver(entries => {\n this.visible = entries.some(entry => entry.isIntersecting && entry.intersectionRatio > 0);\n this.updateTimeout();\n });\n this.observer.observe(this.hostElement);\n }\n\n private setHover(value: boolean) {\n this.hovering = value && !(window.matchMedia?.('(hover: none)').matches ?? false);\n this.updateTimeout();\n }\n\n private handleFocusOut = (event: FocusEvent) => {\n const target = event.relatedTarget as Node | null;\n this.focused = !!target && (this.hostElement.contains(target) || this.hostElement.shadowRoot.contains(target));\n this.updateTimeout();\n };\n\n private get intent() {\n return TOAST_INTENTS[this.type] || TOAST_INTENTS[SulaToastType.Neutral];\n }\n\n render() {\n const intent = this.intent;\n return (\n <Host\n onMouseEnter={() => this.setHover(true)}\n onMouseLeave={() => this.setHover(false)}\n onFocusin={() => {\n this.focused = true;\n this.updateTimeout();\n }}\n onFocusout={this.handleFocusOut}\n >\n <div\n part=\"container\"\n class={`toast-surface relative isolate box-border flex items-center w-full p-16 gap-12 rounded-sm border bg-opacity-toast ${intent.border} ${this.animated ? 'toast-surface--animated' : ''}`}\n style={{ '--toast-border-color': intent.borderColor }}\n >\n {this.icon && (\n <div part=\"icon\" aria-hidden=\"true\" class={`flex shrink-0 items-center justify-center w-44 h-44 rounded-xxl ${intent.background}`}>\n <sula-icon icon={this.icon} customClass={`text-2xl ${intent.color}`} class=\"flex leading-none\" />\n </div>\n )}\n <div part=\"content\" class={`flex min-w-0 flex-1 flex-col gap-8 ${this.closable ? 'pr-48' : ''}`}>\n <div class=\"flex flex-col gap-4\">\n {this.toastTitle && (\n <p class=\"toast-copy toast-title text-label-medium-bold text-text-primary\" title={this.toastTitle}>\n {this.toastTitle}\n </p>\n )}\n {this.message && (\n <p class=\"toast-copy toast-message text-label-medium-regular text-text-secondary\" title={this.message}>\n {this.message}\n </p>\n )}\n </div>\n {this.actionText && (\n <button\n type=\"button\"\n class={`toast-copy toast-action self-start text-left text-label-medium-bold text-text-link underline rounded ${FOCUS_RING_CLASSES}`}\n title={this.actionText}\n onClick={() => this.toastAction.emit()}\n >\n {this.actionText}\n </button>\n )}\n </div>\n {this.closable && (\n <button\n part=\"close-button\"\n type=\"button\"\n aria-label={this.closeLabel}\n class={`absolute top-16 right-16 flex items-center justify-center w-24 h-24 rounded ${intent.color} ${FOCUS_RING_CLASSES}`}\n onClick={() => this.toastDismissRequested.emit({ reason: 'close' })}\n >\n <sula-icon aria-hidden=\"true\" icon=\"ph ph-x\" customClass=\"text-2xl\" class=\"flex leading-none\" />\n </button>\n )}\n <svg class=\"toast-border\" aria-hidden=\"true\" focusable=\"false\">\n <rect class=\"toast-border__path\" pathLength=\"1\" />\n </svg>\n </div>\n <div class=\"sr-only\" role=\"status\" aria-live=\"polite\" aria-atomic=\"true\">\n {this.announcement === 'polite' ? this.announcedText : ''}\n </div>\n <div class=\"sr-only\" role=\"alert\" aria-live=\"assertive\" aria-atomic=\"true\">\n {this.announcement === 'assertive' ? this.announcedText : ''}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
|
|
2
|
+
|
|
3
|
+
var SulaSwitchType;
|
|
4
|
+
(function (SulaSwitchType) {
|
|
5
|
+
SulaSwitchType["Default"] = "default";
|
|
6
|
+
SulaSwitchType["List"] = "list";
|
|
7
|
+
})(SulaSwitchType || (SulaSwitchType = {}));
|
|
8
|
+
|
|
9
|
+
const sulaSwitchCss = "*,: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}.relative{position:relative}.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))}.outline{outline-style:solid}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter}.ease-in-out,.transition{transition-timing-function:cubic-bezier(.4,0,.2,1)}: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}.container-focus,.switch-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}.switch-container{cursor:pointer;overflow:hidden;position:relative;transition:background-color .3s ease-in-out}.switch-thumb{position:relative;transition:transform .3s ease-in-out}.switch-on .switch-thumb{animation:slideFromLeft .3s ease-in-out forwards}.switch-off .switch-thumb{animation:slideFromRight .3s ease-in-out forwards}.switch-indicator{transition:width .3s ease-in-out,height .3s ease-in-out,background-color .3s ease-in-out}.switch-indicator-on{animation:growIndicator .3s ease-in-out forwards}.switch-indicator-off{animation:shrinkIndicator .3s ease-in-out forwards}@keyframes slideFromLeft{0%{opacity:0;transform:translateX(-100%)}50%{opacity:.7}to{opacity:1;transform:translateX(0)}}@keyframes slideFromRight{0%{opacity:0;transform:translateX(100%)}50%{opacity:.7}to{opacity:1;transform:translateX(0)}}@keyframes growIndicator{0%{height:4px;opacity:.5;width:10px}to{height:12px;opacity:1;width:12px}}@keyframes shrinkIndicator{0%{height:12px;opacity:.5;width:12px}to{height:4px;opacity:1;width:10px}}: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}.mr-16{margin-right:1rem}.flex{display:flex}.h-12{height:.75rem}.h-32{height:2rem}.h-4{height:.25rem}.h-\\[28px\\]{height:28px}.min-h-\\[85px\\]{min-height:85px}.w-12{width:.75rem}.w-56{width:3.5rem}.w-\\[10px\\]{width:10px}.w-\\[280px\\]{width:280px}.w-\\[28px\\]{width:28px}.w-full{width:100%}.flex-1{flex:1 1 0%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.overflow-hidden{overflow:hidden}.break-words{overflow-wrap:break-word}.rounded-full{border-radius:9999px}.rounded-md{border-radius:1.25rem}.rounded-xxl{border-radius:18.75rem}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-negative-negative-1{background-color:var(--color-negative-negative-1)}.bg-neutral-neutral-3{background-color:var(--color-neutral-neutral-3)}.bg-neutral-neutral-4{background-color:var(--color-neutral-neutral-4)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.p-2{padding:.125rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.py-16{padding-bottom:1rem;padding-top:1rem}.text-base{font-size:1rem;line-height:1.5rem}.font-bold{font-weight:700}.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)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.hover\\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}.active\\:bg-states-empty-bg-pressed:active{background-color:var(--color-states-empty-bg-pressed)}.visible{visibility:visible}.z-50{z-index:50}.mb-16{margin-bottom:1rem}.mb-24{margin-bottom:1.5rem}.mb-40{margin-bottom:2.5rem}.ml-8{margin-left:.5rem}.ml-\\[24px\\]{margin-left:24px}.ml-\\[8px\\]{margin-left:8px}.mr-6{margin-right:1.5rem}.mt-8{margin-top:.5rem}.inline{display:inline}.h-9{height:2.25rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.w-9{width:2.25rem}.min-w-0{min-width:0}.max-w-10{max-width:2.5rem}.flex-none{flex:none}.select-none{user-select:none}.resize{resize:both}.list-none{list-style-type:none}.gap-8{gap:.5rem}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-xs{border-radius:.5rem}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-line-general{border-color:var(--color-line-general)}.bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}.bg-surface-body{background-color:var(--color-surface-body)}.p-8{padding:.5rem}.px-0{padding-left:0;padding-right:0}.px-12{padding-left:.75rem;padding-right:.75rem}.px-8{padding-left:.5rem;padding-right:.5rem}.py-8{padding-bottom:.5rem;padding-top:.5rem}.pb-24{padding-bottom:1.5rem}.pl-8{padding-left:.5rem}.pr-8{padding-right:.5rem}.pt-12{padding-top:.75rem}.text-left{text-align:left}.text-2xl{font-size:1.5rem;line-height:2rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-tight{line-height:1.25}.text-brand-primary{color:var(--color-brand-primary)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.text-negative-negative-1{color:var(--color-negative-negative-1)}.text-text-disabled{color:var(--color-text-disabled)}.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)}.h-10{height:2.5rem}.w-10{width:2.5rem}.gap-12{gap:.75rem}.rounded-sm{border-radius:.75rem}.pb-12{padding-bottom:.75rem}.pt-8{padding-top:.5rem}@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\")}";
|
|
10
|
+
|
|
11
|
+
const SulaSwitch = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H {
|
|
12
|
+
constructor() {
|
|
13
|
+
super();
|
|
14
|
+
this.__registerHost();
|
|
15
|
+
this.__attachShadow();
|
|
16
|
+
this.valueChanged = createEvent(this, "valueChanged");
|
|
17
|
+
this.focusedOn = createEvent(this, "focusedOn");
|
|
18
|
+
this.focusedOut = createEvent(this, "focusedOut");
|
|
19
|
+
/**
|
|
20
|
+
* Switch type
|
|
21
|
+
*/
|
|
22
|
+
this.type = SulaSwitchType.Default;
|
|
23
|
+
/**
|
|
24
|
+
* Is switch active
|
|
25
|
+
*/
|
|
26
|
+
this.active = false;
|
|
27
|
+
/**
|
|
28
|
+
* Is switch disabled
|
|
29
|
+
*/
|
|
30
|
+
this.disabled = false;
|
|
31
|
+
/**
|
|
32
|
+
* Enable responsive layout (full width)
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
this.responsive = false;
|
|
36
|
+
this.isFocus = false;
|
|
37
|
+
this.handleClick = () => {
|
|
38
|
+
if (!this.disabled) {
|
|
39
|
+
this.active = !this.active;
|
|
40
|
+
this.valueChanged.emit(this.active);
|
|
41
|
+
}
|
|
42
|
+
};
|
|
43
|
+
this.handleFocus = () => {
|
|
44
|
+
if (!this.disabled) {
|
|
45
|
+
this.isFocus = true;
|
|
46
|
+
this.focusedOn.emit();
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
this.handleBlur = () => {
|
|
50
|
+
if (!this.disabled) {
|
|
51
|
+
this.focusedOut.emit();
|
|
52
|
+
this.isFocus = false;
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
render() {
|
|
57
|
+
return (h(Host, { key: 'bbc1608ea695438aeeda45b2ad187981499aad28' }, h("div", { key: '272a32b7a2ac9d20c5c9dc53bbda95e622c903c2', class: {
|
|
58
|
+
'outline-none': true,
|
|
59
|
+
'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,
|
|
60
|
+
'flex items-center justify-between bg-surface-on-body rounded-md min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,
|
|
61
|
+
'w-full': this.type === SulaSwitchType.List && this.responsive,
|
|
62
|
+
'w-[280px]': this.type === SulaSwitchType.List && !this.responsive,
|
|
63
|
+
'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,
|
|
64
|
+
'container-focus': this.isFocus && this.type === SulaSwitchType.List,
|
|
65
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: '0df87d2684835be3227a214781294ca0469a695e', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: '6ff194d26b539b1d93c6663c35e6b78097acd4f2', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: '7619e778563ca301f7d4f5363c94fe3b8878cffa', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: 'aeacb7c586eccf26e8b0759a5751884b948f29cb', class: {
|
|
66
|
+
'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,
|
|
67
|
+
'switch-on bg-brand-primary justify-end': this.active,
|
|
68
|
+
'switch-off bg-neutral-neutral-3 justify-start': !this.active,
|
|
69
|
+
'cursor-not-allowed bg-states-bg-disabled': this.disabled,
|
|
70
|
+
'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,
|
|
71
|
+
}, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'bf8765e10f41bc48ec6db0e50e974bd25e8c802d', class: {
|
|
72
|
+
'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,
|
|
73
|
+
'bg-negative-negative-1': !this.disabled,
|
|
74
|
+
'bg-states-bg-disabled shadow-md': this.disabled,
|
|
75
|
+
} }, h("div", { key: 'dc1f1da29ffe89131a85e6e1a8a7131d2b8fdb81', class: {
|
|
76
|
+
'switch-indicator rounded-full': true,
|
|
77
|
+
'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,
|
|
78
|
+
'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,
|
|
79
|
+
'shadow-sm bg-states-bg-disabled': this.disabled,
|
|
80
|
+
} }))))));
|
|
81
|
+
}
|
|
82
|
+
static get style() { return sulaSwitchCss; }
|
|
83
|
+
}, [1, "sula-switch", {
|
|
84
|
+
"type": [1025],
|
|
85
|
+
"active": [1028],
|
|
86
|
+
"disabled": [1028],
|
|
87
|
+
"label": [1025],
|
|
88
|
+
"subTitle": [1025, "sub-title"],
|
|
89
|
+
"responsive": [4],
|
|
90
|
+
"isFocus": [32]
|
|
91
|
+
}]);
|
|
92
|
+
function defineCustomElement() {
|
|
93
|
+
if (typeof customElements === "undefined") {
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
96
|
+
const components = ["sula-switch"];
|
|
97
|
+
components.forEach(tagName => { switch (tagName) {
|
|
98
|
+
case "sula-switch":
|
|
99
|
+
if (!customElements.get(tagName)) {
|
|
100
|
+
customElements.define(tagName, SulaSwitch);
|
|
101
|
+
}
|
|
102
|
+
break;
|
|
103
|
+
} });
|
|
104
|
+
}
|
|
105
|
+
defineCustomElement();
|
|
106
|
+
|
|
107
|
+
export { SulaSwitch as S, defineCustomElement as d };
|
|
108
|
+
//# sourceMappingURL=p-DEhN6ZhJ.js.map
|
|
109
|
+
|
|
110
|
+
//# sourceMappingURL=p-DEhN6ZhJ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"file":"p-DEhN6ZhJ.js","mappings":";;AAAA,IAAY,cAGX;AAHD,CAAA,UAAY,cAAc,EAAA;AACxB,IAAA,cAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,cAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACf,CAAC,EAHW,cAAc,KAAd,cAAc,GAGzB,EAAA,CAAA,CAAA;;ACHD,MAAM,aAAa,GAAG,onkBAAonkB;;MCQ7nkB,UAAU,iBAAAA,kBAAA,CAAA,MAAA,UAAA,SAAAC,CAAA,CAAA;AALvB,IAAA,WAAA,GAAA;;;;;;;AAME;;AAEG;AACsB,QAAA,IAAA,CAAA,IAAI,GAAmB,cAAc,CAAC,OAAO;AAEtE;;AAEG;AACsB,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAEhD;;AAEG;AACsB,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAYlD;;;AAGG;AACK,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;A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EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,8EAA8E,EAAE,IAAI;AACpF,gBAAA,wBAAwB,EAAE,CAAC,IAAI,CAAC,QAAQ;gBACxC,iCAAiC,EAAE,IAAI,CAAC,QAAQ;aACjD,EAAA,EAED,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,+BAA+B,EAAE,IAAI;gBACrC,gDAAgD,EAAE,IAAI,CAAC,MAAM;AAC7D,gBAAA,wDAAwD,EAAE,CAAC,IAAI,CAAC,MAAM;gBACtE,iCAAiC,EAAE,IAAI,CAAC,QAAQ;AACjD,aAAA,EAAA,CACI,CACH,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-switch/model/sula-switch.model.ts","src/components/sula-switch/sula-switch.scss?tag=sula-switch&encapsulation=shadow","src/components/sula-switch/sula-switch.tsx"],"sourcesContent":["export enum SulaSwitchType {\n Default = 'default',\n List = 'list',\n}\n",":host {\n display: block;\n}\n\n.switch-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.container-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.switch-container {\n position: relative;\n transition: background-color 0.3s ease-in-out;\n cursor: pointer;\n overflow: hidden;\n}\n\n.switch-thumb {\n position: relative;\n transition: transform 0.3s ease-in-out;\n}\n\n.switch-on .switch-thumb {\n animation: slideFromLeft 0.3s ease-in-out forwards;\n}\n\n.switch-off .switch-thumb {\n animation: slideFromRight 0.3s ease-in-out forwards;\n}\n\n.switch-indicator {\n transition: width 0.3s ease-in-out, height 0.3s ease-in-out, background-color 0.3s ease-in-out;\n}\n\n.switch-indicator-on {\n animation: growIndicator 0.3s ease-in-out forwards;\n}\n\n.switch-indicator-off {\n animation: shrinkIndicator 0.3s ease-in-out forwards;\n}\n\n@keyframes slideFromLeft {\n 0% {\n transform: translateX(-100%);\n opacity: 0;\n }\n 50% {\n opacity: 0.7;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes slideFromRight {\n 0% {\n transform: translateX(100%);\n opacity: 0;\n }\n 50% {\n opacity: 0.7;\n }\n 100% {\n transform: translateX(0);\n opacity: 1;\n }\n}\n\n@keyframes growIndicator {\n 0% {\n width: 10px;\n height: 4px;\n opacity: 0.5;\n }\n 100% {\n width: 12px;\n height: 12px;\n opacity: 1;\n }\n}\n\n@keyframes shrinkIndicator {\n 0% {\n width: 12px;\n height: 12px;\n opacity: 0.5;\n }\n 100% {\n width: 10px;\n height: 4px;\n opacity: 1;\n }\n}\n","import { Component, Event, EventEmitter, Host, Prop, State, h } from '@stencil/core';\nimport { SulaSwitchType } from './model/sula-switch.model';\n\n@Component({\n tag: 'sula-switch',\n styleUrl: 'sula-switch.scss',\n shadow: true,\n})\nexport class SulaSwitch {\n /**\n * Switch type\n */\n @Prop({ mutable: true }) type: SulaSwitchType = SulaSwitchType.Default;\n\n /**\n * Is switch active\n */\n @Prop({ mutable: true }) active: boolean = false;\n\n /**\n * Is switch disabled\n */\n @Prop({ mutable: true }) disabled: boolean = false;\n\n /**\n * Switch label\n */\n @Prop({ mutable: true }) label?: string;\n\n /**\n * Switch sub title (avaible when is `list` type)\n */\n @Prop({ mutable: true }) subTitle?: string;\n\n /**\n * Enable responsive layout (full width)\n * @default false\n */\n @Prop() responsive: boolean = false;\n\n /**\n * Event emitted when switch value changes.\n */\n @Event()\n valueChanged: EventEmitter<boolean>;\n\n /**\n * Event emitted when switch is focused.\n */\n @Event()\n focusedOn: EventEmitter<void>;\n\n /**\n * Event emitted when switch is focused out.\n */\n @Event()\n focusedOut: EventEmitter<void>;\n\n @State()\n isFocus: boolean = false;\n\n handleClick = () => {\n if (!this.disabled) {\n this.active = !this.active;\n this.valueChanged.emit(this.active);\n }\n };\n\n handleFocus = () => {\n if (!this.disabled) {\n this.isFocus = true;\n this.focusedOn.emit();\n }\n };\n\n handleBlur = () => {\n if (!this.disabled) {\n this.focusedOut.emit();\n this.isFocus = false;\n }\n };\n\n render() {\n return (\n <Host>\n <div\n class={{\n 'outline-none': true,\n 'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,\n 'flex items-center justify-between bg-surface-on-body rounded-md min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,\n 'w-full': this.type === SulaSwitchType.List && this.responsive,\n 'w-[280px]': this.type === SulaSwitchType.List && !this.responsive,\n 'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,\n 'container-focus': this.isFocus && this.type === SulaSwitchType.List,\n }}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n onClick={this.handleClick}\n tabIndex={0}\n >\n {this.type === SulaSwitchType.List && (\n <div class=\"flex flex-col flex-1 mr-16 overflow-hidden\">\n {!!this.label && <label class=\"text-text-primary font-bold text-base cursor-pointer break-words\">{this.label}</label>}\n {!!this.subTitle && <span class=\"text-text-secondary text-base break-words\">{this.subTitle}</span>}\n </div>\n )}\n <div\n class={{\n 'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,\n 'switch-on bg-brand-primary justify-end': this.active,\n 'switch-off bg-neutral-neutral-3 justify-start': !this.active,\n 'cursor-not-allowed bg-states-bg-disabled': this.disabled,\n 'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,\n }}\n tabIndex={0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <div\n class={{\n 'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,\n 'bg-negative-negative-1': !this.disabled,\n 'bg-states-bg-disabled shadow-md': this.disabled,\n }}\n >\n <div\n class={{\n 'switch-indicator rounded-full': true,\n 'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,\n 'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,\n 'shadow-sm bg-states-bg-disabled': this.disabled,\n }}\n ></div>\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
|