@sula-tech/webcomponents 0.11.0 → 0.11.2
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-LR6yFDX7.js → index-C19aFtyq.js} +5 -2
- package/dist/cjs/index-C19aFtyq.js.map +1 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/sula-avatar_21.cjs.entry.js +73 -26
- package/dist/cjs/sula-avatar_21.cjs.entry.js.map +1 -1
- package/dist/cjs/webcomponents.cjs.js +2 -2
- package/dist/collection/components/sula-chip/sula-chip.css +1 -1
- package/dist/collection/components/sula-chip/sula-chip.js +33 -7
- package/dist/collection/components/sula-chip/sula-chip.js.map +1 -1
- package/dist/collection/components/sula-chip/sula-chip.stories.js +22 -0
- package/dist/collection/components/sula-chip/sula-chip.stories.js.map +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.js +62 -7
- package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -1
- package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +94 -0
- package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js.map +1 -1
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +28 -2
- package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -1
- package/dist/collection/components/sula-switch/sula-switch.css +1 -1
- package/dist/collection/components/sula-switch/sula-switch.js +35 -5
- package/dist/collection/components/sula-switch/sula-switch.js.map +1 -1
- package/dist/collection/components/sula-switch/sula-switch.stories.js +22 -0
- package/dist/collection/components/sula-switch/sula-switch.stories.js.map +1 -1
- package/dist/components/index.js +3 -0
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-CD0__3qt.js → p-BlyFOqde.js} +3 -3
- package/dist/components/{p-CD0__3qt.js.map → p-BlyFOqde.js.map} +1 -1
- package/dist/components/{p-CFhhi4NQ.js → p-DksR9NcR.js} +12 -5
- package/dist/components/p-DksR9NcR.js.map +1 -0
- package/dist/components/{p-DO7voMbe.js → p-tr2oA4pB.js} +3 -3
- package/dist/components/{p-DO7voMbe.js.map → p-tr2oA4pB.js.map} +1 -1
- 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-checkbox.js +1 -1
- package/dist/components/sula-chip.js +17 -10
- package/dist/components/sula-chip.js.map +1 -1
- package/dist/components/sula-dropdown.js +41 -11
- package/dist/components/sula-dropdown.js.map +1 -1
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-modal.js +2 -2
- 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 +14 -6
- 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/esm/{index-CrFclBiX.js → index-CwIBTB8E.js} +5 -2
- package/dist/esm/index-CwIBTB8E.js.map +1 -0
- package/dist/esm/loader.js +3 -3
- package/dist/esm/sula-avatar_21.entry.js +73 -26
- package/dist/esm/sula-avatar_21.entry.js.map +1 -1
- package/dist/esm/webcomponents.js +3 -3
- package/dist/types/components/sula-chip/sula-chip.d.ts +4 -0
- package/dist/types/components/sula-chip/sula-chip.stories.d.ts +9 -0
- package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +7 -0
- package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +9 -0
- package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +4 -0
- package/dist/types/components/sula-switch/sula-switch.d.ts +5 -0
- package/dist/types/components/sula-switch/sula-switch.stories.d.ts +10 -0
- package/dist/types/components.d.ts +40 -0
- package/dist/webcomponents/{p-491c4d76.entry.js → p-1b6e77dc.entry.js} +85 -41
- package/dist/webcomponents/p-1b6e77dc.entry.js.map +1 -0
- package/dist/webcomponents/{p-CrFclBiX.js → p-CwIBTB8E.js} +5 -2
- package/dist/webcomponents/p-CwIBTB8E.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +10 -5
- package/package.json +1 -1
- package/dist/cjs/index-LR6yFDX7.js.map +0 -1
- package/dist/components/p-CFhhi4NQ.js.map +0 -1
- package/dist/esm/index-CrFclBiX.js.map +0 -1
- package/dist/webcomponents/p-491c4d76.entry.js.map +0 -1
- package/dist/webcomponents/p-CrFclBiX.js.map +0 -1
|
@@ -6,7 +6,7 @@ var SulaSwitchType;
|
|
|
6
6
|
SulaSwitchType["List"] = "list";
|
|
7
7
|
})(SulaSwitchType || (SulaSwitchType = {}));
|
|
8
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{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{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-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}.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)}";
|
|
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{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{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-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)}";
|
|
10
10
|
|
|
11
11
|
const SulaSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H {
|
|
12
12
|
constructor() {
|
|
@@ -28,6 +28,11 @@ const SulaSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H
|
|
|
28
28
|
* Is switch disabled
|
|
29
29
|
*/
|
|
30
30
|
this.disabled = false;
|
|
31
|
+
/**
|
|
32
|
+
* Enable responsive layout (full width)
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
this.responsive = false;
|
|
31
36
|
this.isFocus = false;
|
|
32
37
|
this.handleClick = () => {
|
|
33
38
|
if (!this.disabled) {
|
|
@@ -49,23 +54,25 @@ const SulaSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H
|
|
|
49
54
|
};
|
|
50
55
|
}
|
|
51
56
|
render() {
|
|
52
|
-
return (h(Host, { key: '
|
|
57
|
+
return (h(Host, { key: '63e6240141744f8747d886c4ae377ec6e75a1430' }, h("div", { key: '734068ba86c268d388e892a9601dac6c5af585a9', class: {
|
|
53
58
|
'outline-none': true,
|
|
54
59
|
'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,
|
|
55
|
-
'flex items-center justify-between bg-surface-on-body rounded-md
|
|
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,
|
|
56
63
|
'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,
|
|
57
64
|
'container-focus': this.isFocus && this.type === SulaSwitchType.List,
|
|
58
|
-
}, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: '
|
|
65
|
+
}, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: 'ab024dd2bd23e5ed2aaa970eb129d3df8f957df1', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: '26f9c644700d2e2209111220381b9848fc70d8a9', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: 'aa7e3aceb3ef01b6cb36f1dc787c844eff1f5c46', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: '61634f3d849823aafb178cdde05ae31b1e76bf0b', class: {
|
|
59
66
|
'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,
|
|
60
67
|
'switch-on bg-brand-primary justify-end': this.active,
|
|
61
68
|
'switch-off bg-neutral-neutral-3 justify-start': !this.active,
|
|
62
69
|
'cursor-not-allowed bg-states-bg-disabled': this.disabled,
|
|
63
70
|
'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,
|
|
64
|
-
}, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '
|
|
71
|
+
}, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '3bb4ef78190458168de783224a21620bd134d8d5', class: {
|
|
65
72
|
'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,
|
|
66
73
|
'bg-negative-negative-1': !this.disabled,
|
|
67
74
|
'bg-states-bg-disabled shadow-md': this.disabled,
|
|
68
|
-
} }, h("div", { key: '
|
|
75
|
+
} }, h("div", { key: '867441effcc9169ca9aeb24d16e919a8896b4cc2', class: {
|
|
69
76
|
'switch-indicator rounded-full': true,
|
|
70
77
|
'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,
|
|
71
78
|
'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,
|
|
@@ -79,6 +86,7 @@ const SulaSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H
|
|
|
79
86
|
"disabled": [1028],
|
|
80
87
|
"label": [1025],
|
|
81
88
|
"subTitle": [1025, "sub-title"],
|
|
89
|
+
"responsive": [4],
|
|
82
90
|
"isFocus": [32]
|
|
83
91
|
}]);
|
|
84
92
|
function defineCustomElement$1() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"file":"sula-switch.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,
|
|
1
|
+
{"file":"sula-switch.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,m/ZAAm/Z;;MCQ5/ZA,YAAU,iBAAAC,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;AAqBnC,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAExB,QAAA,IAAW,CAAA,WAAA,GAAG,MAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClB,gBAAA,IAAI,CAAC,MAAM,GAAG,CAAC,IAAI,CAAC,MAAM;gBAC1B,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC;;AAEvC,SAAC;AAED,QAAA,IAAW,CAAA,WAAA,GAAG,MAAK;AACjB,YAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClB,gBAAA,IAAI,CAAC,OAAO,GAAG,IAAI;AACnB,gBAAA,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE;;AAEzB,SAAC;AAED,QAAA,IAAU,CAAA,UAAA,GAAG,MAAK;AAChB,YAAA,IAAI,CAAC,IAAI,CAAC,QAAQ,EAAE;AAClB,gBAAA,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE;AACtB,gBAAA,IAAI,CAAC,OAAO,GAAG,KAAK;;AAExB,SAAC;AA2DF;IAzDC,MAAM,GAAA;QACJ,QACE,EAAC,IAAI,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,EACH,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,cAAc,EAAE,IAAI;AACpB,gBAAA,8BAA8B,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO;AACpF,gBAAA,0FAA0F,EAAE,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI;gBAC7H,QAAQ,EAAE,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,IAAI,IAAI,CAAC,UAAU;AAC9D,gBAAA,WAAW,EAAE,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU;AAClE,gBAAA,iFAAiF,EAAE,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,QAAQ;gBACtI,iBAAiB,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI;aACrE,EACD,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EACvB,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,QAAQ,EAAE,CAAC,EAAA,EAEV,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,IAAI,KAChC,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAK,KAAK,EAAC,4CAA4C,EAAA,EACpD,CAAC,CAAC,IAAI,CAAC,KAAK,IAAI,CAAA,CAAA,OAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAO,KAAK,EAAC,kEAAkE,EAAA,EAAE,IAAI,CAAC,KAAK,CAAS,EACpH,CAAC,CAAC,IAAI,CAAC,QAAQ,IAAI,CAAM,CAAA,MAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,2CAA2C,IAAE,IAAI,CAAC,QAAQ,CAAQ,CAC9F,CACP,EACD,CAAA,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE;AACL,gBAAA,2EAA2E,EAAE,IAAI;gBACjF,wCAAwC,EAAE,IAAI,CAAC,MAAM;AACrD,gBAAA,+CAA+C,EAAE,CAAC,IAAI,CAAC,MAAM;gBAC7D,0CAA0C,EAAE,IAAI,CAAC,QAAQ;gBACzD,cAAc,EAAE,IAAI,CAAC,OAAO,IAAI,IAAI,CAAC,IAAI,KAAK,cAAc,CAAC,OAAO;aACrE,EACD,QAAQ,EAAE,CAAC,EACX,OAAO,EAAE,IAAI,CAAC,WAAW,EACzB,MAAM,EAAE,IAAI,CAAC,UAAU,EAAA,EAEvB,CAAA,CAAA,KAAA,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":["SulaSwitch","__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}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
2
|
import { g as getDefaultExportFromCjs } from './p-B85MJLTf.js';
|
|
3
|
-
import { d as defineCustomElement$2 } from './p-
|
|
3
|
+
import { d as defineCustomElement$2 } from './p-tr2oA4pB.js';
|
|
4
4
|
|
|
5
5
|
var SulaTextfieldType;
|
|
6
6
|
(function (SulaTextfieldType) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
|
|
2
|
-
import { d as defineCustomElement$2 } from './p-
|
|
2
|
+
import { d as defineCustomElement$2 } from './p-tr2oA4pB.js';
|
|
3
3
|
|
|
4
4
|
var SulaTimelineListItemIconStatus;
|
|
5
5
|
(function (SulaTimelineListItemIconStatus) {
|
|
@@ -1472,6 +1472,9 @@ var getHostListenerTarget = (doc, elm, flags) => {
|
|
|
1472
1472
|
if (flags & 4 /* TargetDocument */) {
|
|
1473
1473
|
return doc;
|
|
1474
1474
|
}
|
|
1475
|
+
if (flags & 8 /* TargetWindow */) {
|
|
1476
|
+
return win;
|
|
1477
|
+
}
|
|
1475
1478
|
return elm;
|
|
1476
1479
|
};
|
|
1477
1480
|
var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
@@ -1483,6 +1486,6 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
|
|
|
1483
1486
|
var setNonce = (nonce) => plt.$nonce$ = nonce;
|
|
1484
1487
|
|
|
1485
1488
|
export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
|
|
1486
|
-
//# sourceMappingURL=index-
|
|
1489
|
+
//# sourceMappingURL=index-CwIBTB8E.js.map
|
|
1487
1490
|
|
|
1488
|
-
//# sourceMappingURL=index-
|
|
1491
|
+
//# sourceMappingURL=index-CwIBTB8E.js.map
|