@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.
Files changed (79) hide show
  1. package/dist/cjs/{index-LR6yFDX7.js → index-C19aFtyq.js} +5 -2
  2. package/dist/cjs/index-C19aFtyq.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/sula-avatar_21.cjs.entry.js +73 -26
  5. package/dist/cjs/sula-avatar_21.cjs.entry.js.map +1 -1
  6. package/dist/cjs/webcomponents.cjs.js +2 -2
  7. package/dist/collection/components/sula-chip/sula-chip.css +1 -1
  8. package/dist/collection/components/sula-chip/sula-chip.js +33 -7
  9. package/dist/collection/components/sula-chip/sula-chip.js.map +1 -1
  10. package/dist/collection/components/sula-chip/sula-chip.stories.js +22 -0
  11. package/dist/collection/components/sula-chip/sula-chip.stories.js.map +1 -1
  12. package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -1
  13. package/dist/collection/components/sula-dropdown/sula-dropdown.js +62 -7
  14. package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -1
  15. package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +94 -0
  16. package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js.map +1 -1
  17. package/dist/collection/components/sula-icon/sula-icon.css +1 -1
  18. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
  19. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +28 -2
  20. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -1
  21. package/dist/collection/components/sula-switch/sula-switch.css +1 -1
  22. package/dist/collection/components/sula-switch/sula-switch.js +35 -5
  23. package/dist/collection/components/sula-switch/sula-switch.js.map +1 -1
  24. package/dist/collection/components/sula-switch/sula-switch.stories.js +22 -0
  25. package/dist/collection/components/sula-switch/sula-switch.stories.js.map +1 -1
  26. package/dist/components/index.js +3 -0
  27. package/dist/components/index.js.map +1 -1
  28. package/dist/components/{p-CD0__3qt.js → p-BlyFOqde.js} +3 -3
  29. package/dist/components/{p-CD0__3qt.js.map → p-BlyFOqde.js.map} +1 -1
  30. package/dist/components/{p-CFhhi4NQ.js → p-DksR9NcR.js} +12 -5
  31. package/dist/components/p-DksR9NcR.js.map +1 -0
  32. package/dist/components/{p-DO7voMbe.js → p-tr2oA4pB.js} +3 -3
  33. package/dist/components/{p-DO7voMbe.js.map → p-tr2oA4pB.js.map} +1 -1
  34. package/dist/components/sula-avatar.js +1 -1
  35. package/dist/components/sula-badge.js +1 -1
  36. package/dist/components/sula-breadcrumb.js +1 -1
  37. package/dist/components/sula-button.js +1 -1
  38. package/dist/components/sula-checkbox.js +1 -1
  39. package/dist/components/sula-chip.js +17 -10
  40. package/dist/components/sula-chip.js.map +1 -1
  41. package/dist/components/sula-dropdown.js +41 -11
  42. package/dist/components/sula-dropdown.js.map +1 -1
  43. package/dist/components/sula-icon.js +1 -1
  44. package/dist/components/sula-menu-select-list.js +1 -1
  45. package/dist/components/sula-modal.js +2 -2
  46. package/dist/components/sula-progress-bar.js +1 -1
  47. package/dist/components/sula-search-bar.js +1 -1
  48. package/dist/components/sula-segmented-control.js +1 -1
  49. package/dist/components/sula-switch.js +14 -6
  50. package/dist/components/sula-switch.js.map +1 -1
  51. package/dist/components/sula-tag.js +1 -1
  52. package/dist/components/sula-textfield.js +1 -1
  53. package/dist/components/sula-tiles.js +1 -1
  54. package/dist/components/sula-timeline-list.js +1 -1
  55. package/dist/esm/{index-CrFclBiX.js → index-CwIBTB8E.js} +5 -2
  56. package/dist/esm/index-CwIBTB8E.js.map +1 -0
  57. package/dist/esm/loader.js +3 -3
  58. package/dist/esm/sula-avatar_21.entry.js +73 -26
  59. package/dist/esm/sula-avatar_21.entry.js.map +1 -1
  60. package/dist/esm/webcomponents.js +3 -3
  61. package/dist/types/components/sula-chip/sula-chip.d.ts +4 -0
  62. package/dist/types/components/sula-chip/sula-chip.stories.d.ts +9 -0
  63. package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +7 -0
  64. package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +9 -0
  65. package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +4 -0
  66. package/dist/types/components/sula-switch/sula-switch.d.ts +5 -0
  67. package/dist/types/components/sula-switch/sula-switch.stories.d.ts +10 -0
  68. package/dist/types/components.d.ts +40 -0
  69. package/dist/webcomponents/{p-491c4d76.entry.js → p-1b6e77dc.entry.js} +85 -41
  70. package/dist/webcomponents/p-1b6e77dc.entry.js.map +1 -0
  71. package/dist/webcomponents/{p-CrFclBiX.js → p-CwIBTB8E.js} +5 -2
  72. package/dist/webcomponents/p-CwIBTB8E.js.map +1 -0
  73. package/dist/webcomponents/webcomponents.esm.js +10 -5
  74. package/package.json +1 -1
  75. package/dist/cjs/index-LR6yFDX7.js.map +0 -1
  76. package/dist/components/p-CFhhi4NQ.js.map +0 -1
  77. package/dist/esm/index-CrFclBiX.js.map +0 -1
  78. package/dist/webcomponents/p-491c4d76.entry.js.map +0 -1
  79. package/dist/webcomponents/p-CrFclBiX.js.map +0 -1
@@ -1 +1 @@
1
- *,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! 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}.block{display:block}:host{display:block}.sula-menu-select-list{box-shadow:0 8px 16px 0 rgba(0,0,0,.039)}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.top-40{top:2.5rem}.z-50{z-index:50}.ml-8{margin-left:.5rem}.flex{display:flex}.min-h-40{min-height:2.5rem}.w-fit{width:fit-content}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-line-input{border-color:var(--color-line-input)}.bg-negative-negative-1{background-color:var(--color-negative-negative-1)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-states-empty-bg-pressed{background-color:var(--color-states-empty-bg-pressed)}.bg-states-negative-pressed{background-color:var(--color-states-negative-pressed)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.px-16{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.125rem;padding-top:.125rem}.text-base{font-size:1rem;line-height:1.5rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.text-negative-negative-2{color:var(--color-negative-negative-2)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.hover\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}.hover\:bg-states-negative-hover:hover{background-color:var(--color-states-negative-hover)}.active\:bg-states-empty-bg-pressed:active{background-color:var(--color-states-empty-bg-pressed)}.active\:bg-states-negative-pressed:active{background-color:var(--color-states-negative-pressed)}.max-h-\[260px\]{max-height:260px}.w-full{width:100%}.overflow-auto{overflow:auto}.rounded-sm{border-radius:.75rem}.border-line-general{border-color:var(--color-line-general)}.bg-surface-body{background-color:var(--color-surface-body)}.px-24{padding-left:1.5rem;padding-right:1.5rem}.py-12{padding-bottom:.75rem;padding-top:.75rem}.py-16{padding-bottom:1rem;padding-top:1rem}.text-text-brand{color:var(--color-text-brand)}.top-\[72px\]{top:72px}.m-0{margin:0}.h-\[72px\]{height:72px}.flex-col{flex-direction:column}.justify-between{justify-content:space-between}.rounded-sm,.rounded-xl{border-radius:.75rem}.border-none{border-style:none}.bg-transparent{background-color:transparent}.p-0{padding:0}.pt-4{padding-top:.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.leading-6{line-height:1.5rem}.text-icon-disabled{color:var(--color-icon-disabled)}.text-text-secondary{color:var(--color-text-secondary)}.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)}.placeholder\:text-text-secondary::placeholder{color:var(--color-text-secondary)}
1
+ *,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! 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}.block{display:block}:host{display:block}.sula-menu-select-list{box-shadow:0 8px 16px 0 rgba(0,0,0,.039)}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-0{left:0}.top-40{top:2.5rem}.z-50{z-index:50}.ml-8{margin-left:.5rem}.flex{display:flex}.min-h-40{min-height:2.5rem}.w-fit{width:fit-content}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-line-input{border-color:var(--color-line-input)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-negative-negative-1{background-color:var(--color-negative-negative-1)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-states-empty-bg-pressed{background-color:var(--color-states-empty-bg-pressed)}.bg-states-negative-pressed{background-color:var(--color-states-negative-pressed)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.px-16{padding-left:1rem;padding-right:1rem}.py-2{padding-bottom:.125rem;padding-top:.125rem}.text-base{font-size:1rem;line-height:1.5rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.text-negative-negative-1{color:var(--color-negative-negative-1)}.text-negative-negative-2{color:var(--color-negative-negative-2)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.hover\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}.hover\:bg-states-negative-hover:hover{background-color:var(--color-states-negative-hover)}.active\:bg-states-empty-bg-pressed:active{background-color:var(--color-states-empty-bg-pressed)}.active\:bg-states-negative-pressed:active{background-color:var(--color-states-negative-pressed)}.w-full{width:100%}.overflow-auto{overflow:auto}.rounded-sm{border-radius:.75rem}.border-line-general{border-color:var(--color-line-general)}.bg-surface-body{background-color:var(--color-surface-body)}.px-24{padding-left:1.5rem;padding-right:1.5rem}.py-12{padding-bottom:.75rem;padding-top:.75rem}.py-16{padding-bottom:1rem;padding-top:1rem}.text-text-brand{color:var(--color-text-brand)}.bottom-\[72px\]{bottom:72px}.top-\[72px\]{top:72px}.m-0{margin:0}.h-\[72px\]{height:72px}.resize{resize:both}.flex-col{flex-direction:column}.justify-between{justify-content:space-between}.rounded-sm,.rounded-xl{border-radius:.75rem}.border-none{border-style:none}.bg-transparent{background-color:transparent}.p-0{padding:0}.pt-4{padding-top:.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-sm{font-size:.875rem;line-height:1.25rem}.leading-6{line-height:1.5rem}.text-icon-disabled{color:var(--color-icon-disabled)}.text-text-secondary{color:var(--color-text-secondary)}.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)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.placeholder\:text-text-secondary::placeholder{color:var(--color-text-secondary)}
@@ -9,15 +9,21 @@ export class SulaMenuSelectList {
9
9
  * Menu is full width
10
10
  */
11
11
  this.fullWidth = false;
12
+ /**
13
+ * Maximum height for menu in pixels
14
+ */
15
+ this.maxHeight = 260;
12
16
  this.handleClick = (item) => {
13
17
  this.itemSelected.emit(item);
14
18
  };
15
19
  }
16
20
  render() {
17
- return (h(Host, { key: 'e2ebd128ad92b6e8a88a068f2b50797c2388659d' }, h("ul", { key: '4609da5d501bf2ee036ef846f26476c94e6a1910', class: {
18
- 'bg-surface-body border border-line-general sula-menu-select-list rounded-sm py-12 max-h-[260px] overflow-auto': true,
21
+ return (h(Host, { key: '2a2fdaa683ff196bbed89135c74ebd4e1c6e40d6' }, h("ul", { key: '2deeba582947828b4548d41a5a231c9646f38b0e', class: {
22
+ 'bg-surface-body border border-line-general sula-menu-select-list rounded-sm py-12 overflow-auto': true,
19
23
  'w-300': !this.fullWidth,
20
24
  'w-full': this.fullWidth,
25
+ }, style: {
26
+ maxHeight: `${this.maxHeight}px`,
21
27
  } }, this.items.map(item => {
22
28
  const isSelected = this.selectedValue && this.selectedValue.id === item.id;
23
29
  return (h("li", { class: {
@@ -86,6 +92,26 @@ export class SulaMenuSelectList {
86
92
  "reflect": false,
87
93
  "defaultValue": "false"
88
94
  },
95
+ "maxHeight": {
96
+ "type": "number",
97
+ "attribute": "max-height",
98
+ "mutable": false,
99
+ "complexType": {
100
+ "original": "number",
101
+ "resolved": "number",
102
+ "references": {}
103
+ },
104
+ "required": false,
105
+ "optional": false,
106
+ "docs": {
107
+ "tags": [],
108
+ "text": "Maximum height for menu in pixels"
109
+ },
110
+ "getter": false,
111
+ "setter": false,
112
+ "reflect": false,
113
+ "defaultValue": "260"
114
+ },
89
115
  "selectedValue": {
90
116
  "type": "unknown",
91
117
  "attribute": "selected-value",
@@ -1 +1 @@
1
- {"version":3,"file":"sula-menu-select-list.js","sourceRoot":"","sources":["../../../src/components/sula-menu-select-list/sula-menu-select-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQ9E,MAAM,OAAO,kBAAkB;IAL/B;QAME;;WAEG;QAEH,UAAK,GAAuB,EAAE,CAAC;QAE/B;;WAEG;QAEH,cAAS,GAAG,KAAK,CAAC;QAclB,gBAAW,GAAG,CAAC,IAAsB,EAAE,EAAE;YACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC;KAgCH;IA9BC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,2DACE,KAAK,EAAE;oBACL,+GAA+G,EAAE,IAAI;oBACrH,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS;oBACxB,QAAQ,EAAE,IAAI,CAAC,SAAS;iBACzB,IAEA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBACrB,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;gBAC3E,OAAO,CACL,UACE,KAAK,EAAE;wBACL,sFAAsF,EAAE,IAAI;wBAC5F,mBAAmB,EAAE,CAAC,UAAU;wBAChC,2BAA2B,EAAE,UAAU;qBACxC,EACD,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAEpC,IAAI,CAAC,KAAK,CACR,CACN,CAAC;YACJ,CAAC,CAAC,CACC,CACA,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core';\nimport { SulaMenuListItem } from './model/sula-menu-select-list.model';\n\n@Component({\n tag: 'sula-menu-select-list',\n styleUrl: 'sula-menu-select-list.scss',\n shadow: true,\n})\nexport class SulaMenuSelectList {\n /**\n * Items for list\n */\n @Prop({ mutable: true })\n items: SulaMenuListItem[] = [];\n\n /**\n * Menu is full width\n */\n @Prop()\n fullWidth = false;\n\n /**\n * Selected value\n */\n @Prop()\n selectedValue?: SulaMenuListItem;\n\n /**\n * Event emitted when item is selected\n */\n @Event()\n itemSelected: EventEmitter<SulaMenuListItem>;\n\n handleClick = (item: SulaMenuListItem) => {\n this.itemSelected.emit(item);\n };\n\n render() {\n return (\n <Host>\n <ul\n class={{\n 'bg-surface-body border border-line-general sula-menu-select-list rounded-sm py-12 max-h-[260px] overflow-auto': true,\n 'w-300': !this.fullWidth,\n 'w-full': this.fullWidth,\n }}\n >\n {this.items.map(item => {\n const isSelected = this.selectedValue && this.selectedValue.id === item.id;\n return (\n <li \n class={{\n 'w-full px-24 py-16 text-base leading-4 hover:bg-states-empty-bg-hover cursor-pointer': true,\n 'text-text-primary': !isSelected,\n 'text-text-brand font-bold': isSelected,\n }} \n key={item.id} \n onClick={() => this.handleClick(item)}\n >\n {item.title}\n </li>\n );\n })}\n </ul>\n </Host>\n );\n }\n}\n"]}
1
+ {"version":3,"file":"sula-menu-select-list.js","sourceRoot":"","sources":["../../../src/components/sula-menu-select-list/sula-menu-select-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAQ9E,MAAM,OAAO,kBAAkB;IAL/B;QAME;;WAEG;QAEH,UAAK,GAAuB,EAAE,CAAC;QAE/B;;WAEG;QAEH,cAAS,GAAG,KAAK,CAAC;QAElB;;WAEG;QAEH,cAAS,GAAW,GAAG,CAAC;QAcxB,gBAAW,GAAG,CAAC,IAAsB,EAAE,EAAE;YACvC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC;KAmCH;IAjCC,MAAM;QACJ,OAAO,CACL,EAAC,IAAI;YACH,2DACE,KAAK,EAAE;oBACL,iGAAiG,EAAE,IAAI;oBACvG,OAAO,EAAE,CAAC,IAAI,CAAC,SAAS;oBACxB,QAAQ,EAAE,IAAI,CAAC,SAAS;iBACzB,EACD,KAAK,EAAE;oBACL,SAAS,EAAE,GAAG,IAAI,CAAC,SAAS,IAAI;iBACjC,IAEA,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;gBACrB,MAAM,UAAU,GAAG,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,KAAK,IAAI,CAAC,EAAE,CAAC;gBAC3E,OAAO,CACL,UACE,KAAK,EAAE;wBACL,sFAAsF,EAAE,IAAI;wBAC5F,mBAAmB,EAAE,CAAC,UAAU;wBAChC,2BAA2B,EAAE,UAAU;qBACxC,EACD,GAAG,EAAE,IAAI,CAAC,EAAE,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,IAEpC,IAAI,CAAC,KAAK,CACR,CACN,CAAC;YACJ,CAAC,CAAC,CACC,CACA,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core';\nimport { SulaMenuListItem } from './model/sula-menu-select-list.model';\n\n@Component({\n tag: 'sula-menu-select-list',\n styleUrl: 'sula-menu-select-list.scss',\n shadow: true,\n})\nexport class SulaMenuSelectList {\n /**\n * Items for list\n */\n @Prop({ mutable: true })\n items: SulaMenuListItem[] = [];\n\n /**\n * Menu is full width\n */\n @Prop()\n fullWidth = false;\n\n /**\n * Maximum height for menu in pixels\n */\n @Prop()\n maxHeight: number = 260;\n\n /**\n * Selected value\n */\n @Prop()\n selectedValue?: SulaMenuListItem;\n\n /**\n * Event emitted when item is selected\n */\n @Event()\n itemSelected: EventEmitter<SulaMenuListItem>;\n\n handleClick = (item: SulaMenuListItem) => {\n this.itemSelected.emit(item);\n };\n\n render() {\n return (\n <Host>\n <ul\n class={{\n 'bg-surface-body border border-line-general sula-menu-select-list rounded-sm py-12 overflow-auto': true,\n 'w-300': !this.fullWidth,\n 'w-full': this.fullWidth,\n }}\n style={{\n maxHeight: `${this.maxHeight}px`,\n }}\n >\n {this.items.map(item => {\n const isSelected = this.selectedValue && this.selectedValue.id === item.id;\n return (\n <li \n class={{\n 'w-full px-24 py-16 text-base leading-4 hover:bg-states-empty-bg-hover cursor-pointer': true,\n 'text-text-primary': !isSelected,\n 'text-text-brand font-bold': isSelected,\n }} \n key={item.id} \n onClick={() => this.handleClick(item)}\n >\n {item.title}\n </li>\n );\n })}\n </ul>\n </Host>\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- *,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! 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)}
1
+ *,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! 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)}
@@ -14,6 +14,11 @@ export class SulaSwitch {
14
14
  * Is switch disabled
15
15
  */
16
16
  this.disabled = false;
17
+ /**
18
+ * Enable responsive layout (full width)
19
+ * @default false
20
+ */
21
+ this.responsive = false;
17
22
  this.isFocus = false;
18
23
  this.handleClick = () => {
19
24
  if (!this.disabled) {
@@ -35,23 +40,25 @@ export class SulaSwitch {
35
40
  };
36
41
  }
37
42
  render() {
38
- return (h(Host, { key: '5147ccb90d8e6a9b3de3eaa1ceefb3dd4e655f37' }, h("div", { key: 'ebae10c01afe26b23afcbaa86bab531fe56e617f', class: {
43
+ return (h(Host, { key: '63e6240141744f8747d886c4ae377ec6e75a1430' }, h("div", { key: '734068ba86c268d388e892a9601dac6c5af585a9', class: {
39
44
  'outline-none': true,
40
45
  'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,
41
- 'flex items-center justify-between bg-surface-on-body rounded-md w-[280px] min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,
46
+ 'flex items-center justify-between bg-surface-on-body rounded-md min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,
47
+ 'w-full': this.type === SulaSwitchType.List && this.responsive,
48
+ 'w-[280px]': this.type === SulaSwitchType.List && !this.responsive,
42
49
  'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,
43
50
  'container-focus': this.isFocus && this.type === SulaSwitchType.List,
44
- }, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: '6e3132438518dee7a1337db52a204387d2828ec3', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: '830b2c235cc07efb236f6a86d90dd7d62b3b776a', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: 'd085e4e303aad5b75d275d894f03b0e9ea201a47', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: 'ff6f20db45aa6c0050b233ff541f8973cd5f4244', class: {
51
+ }, 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: {
45
52
  'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,
46
53
  'switch-on bg-brand-primary justify-end': this.active,
47
54
  'switch-off bg-neutral-neutral-3 justify-start': !this.active,
48
55
  'cursor-not-allowed bg-states-bg-disabled': this.disabled,
49
56
  'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,
50
- }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'e43cca2e88a20a524201ed0d785a8ba81ed8a4f7', class: {
57
+ }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '3bb4ef78190458168de783224a21620bd134d8d5', class: {
51
58
  'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,
52
59
  'bg-negative-negative-1': !this.disabled,
53
60
  'bg-states-bg-disabled shadow-md': this.disabled,
54
- } }, h("div", { key: '248043d5d4e7e53718563cc722937644362c47bf', class: {
61
+ } }, h("div", { key: '867441effcc9169ca9aeb24d16e919a8896b4cc2', class: {
55
62
  'switch-indicator rounded-full': true,
56
63
  'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,
57
64
  'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,
@@ -175,6 +182,29 @@ export class SulaSwitch {
175
182
  "getter": false,
176
183
  "setter": false,
177
184
  "reflect": false
185
+ },
186
+ "responsive": {
187
+ "type": "boolean",
188
+ "attribute": "responsive",
189
+ "mutable": false,
190
+ "complexType": {
191
+ "original": "boolean",
192
+ "resolved": "boolean",
193
+ "references": {}
194
+ },
195
+ "required": false,
196
+ "optional": false,
197
+ "docs": {
198
+ "tags": [{
199
+ "name": "default",
200
+ "text": "false"
201
+ }],
202
+ "text": "Enable responsive layout (full width)"
203
+ },
204
+ "getter": false,
205
+ "setter": false,
206
+ "reflect": false,
207
+ "defaultValue": "false"
178
208
  }
179
209
  };
180
210
  }
@@ -1 +1 @@
1
- {"version":3,"file":"sula-switch.js","sourceRoot":"","sources":["../../../src/components/sula-switch/sula-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;A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EAAE,IAAI,CAAC,QAAQ;6BACjD,GACI,CACH,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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 * 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 w-[280px] min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,\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"]}
1
+ {"version":3,"file":"sula-switch.js","sourceRoot":"","sources":["../../../src/components/sula-switch/sula-switch.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AACrF,OAAO,EAAE,cAAc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;4BACxC,iCAAiC,EAAE,IAAI,CAAC,QAAQ;yBACjD;wBAED,4DACE,KAAK,EAAE;gCACL,+BAA+B,EAAE,IAAI;gCACrC,gDAAgD,EAAE,IAAI,CAAC,MAAM;gCAC7D,wDAAwD,EAAE,CAAC,IAAI,CAAC,MAAM;gCACtE,iCAAiC,EAAE,IAAI,CAAC,QAAQ;6BACjD,GACI,CACH,CACF,CACF,CACD,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["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"]}
@@ -44,6 +44,14 @@ export default {
44
44
  required: false,
45
45
  },
46
46
  },
47
+ responsive: {
48
+ control: 'boolean',
49
+ defaultValue: false,
50
+ description: 'Enable responsive layout (full width)',
51
+ type: {
52
+ required: false,
53
+ },
54
+ },
47
55
  valueChanged: {
48
56
  action: 'valueChanged',
49
57
  description: 'Event emitted when switch value changes',
@@ -79,6 +87,7 @@ const Template = args => {
79
87
  el.setAttribute('sub-title', args.subTitle);
80
88
  el.setAttribute('disabled', args.disabled.toString());
81
89
  el.setAttribute('active', args.active.toString());
90
+ el.setAttribute('responsive', args.responsive.toString());
82
91
  el.addEventListener('valueChanged', args.valueChanged);
83
92
  el.addEventListener('focusedOn', args.focusedOn);
84
93
  el.addEventListener('focusedOut', args.focusedOut);
@@ -92,6 +101,7 @@ Default.args = {
92
101
  subTitle: '',
93
102
  disabled: false,
94
103
  active: false,
104
+ responsive: false,
95
105
  };
96
106
  export const DefaultActive = Template.bind({});
97
107
  DefaultActive.args = Object.assign(Object.assign({}, Default.args), { active: true });
@@ -108,6 +118,7 @@ List.args = {
108
118
  subTitle: 'Alterar para tema escuro da aplicação',
109
119
  disabled: false,
110
120
  active: false,
121
+ responsive: false,
111
122
  };
112
123
  export const ListActive = Template.bind({});
113
124
  ListActive.args = Object.assign(Object.assign({}, List.args), { active: true });
@@ -115,4 +126,15 @@ export const ListDisabled = Template.bind({});
115
126
  ListDisabled.args = Object.assign(Object.assign({}, List.args), { disabled: true });
116
127
  export const ListActiveDisabled = Template.bind({});
117
128
  ListActiveDisabled.args = Object.assign(Object.assign({}, List.args), { active: true, disabled: true });
129
+ export const ListResponsive = Template.bind({});
130
+ ListResponsive.args = {
131
+ type: SulaSwitchType.List,
132
+ label: 'Modo responsivo',
133
+ subTitle: 'Este switch ocupa a largura total do container',
134
+ disabled: false,
135
+ active: false,
136
+ responsive: true,
137
+ };
138
+ export const ListResponsiveActive = Template.bind({});
139
+ ListResponsiveActive.args = Object.assign(Object.assign({}, ListResponsive.args), { active: true });
118
140
  //# sourceMappingURL=sula-switch.stories.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sula-switch.stories.js","sourceRoot":"","sources":["../../../src/components/sula-switch/sula-switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,eAAe;IACb,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;YACtC,YAAY,EAAE,cAAc,CAAC,OAAO;YACpC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,OAAO;YACrB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,mDAAmD;YAChE,IAAI,EAAE;gBACJ,QAAQ,EAA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CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtC,IAAI,CAAC,IAAI,GAAG;IACV,IAAI,EAAE,cAAc,CAAC,IAAI;IACzB,KAAK,EAAE,aAAa;IACpB,QAAQ,EAAE,uCAAuC;IACjD,QAAQ,EAAE,KAAK;IACf,MAAM,EAAE,KAAK;CACd,CAAC;AAEF,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5C,UAAU,CAAC,IAAI,mCACV,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,IAAI,GACb,CAAC;AAEF,MAAM,CAAC,MAAM,YAAY,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC9C,YAAY,CAAC,IAAI,mCACZ,IAAI,CAAC,IAAI,KACZ,QAAQ,EAAE,IAAI,GACf,CAAC;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACpD,kBAAkB,CAAC,IAAI,mCAClB,IAAI,CAAC,IAAI,KACZ,MAAM,EAAE,IAAI,EACZ,QAAQ,EAAE,IAAI,GACf,CAAC","sourcesContent":["import { SulaSwitchType } from './model/sula-switch.model';\n\nexport default {\n title: 'Components/sula-switch',\n tags: ['autodocs'],\n argTypes: {\n type: {\n control: { type: 'select' },\n options: Object.values(SulaSwitchType),\n defaultValue: SulaSwitchType.Default,\n description: 'The switch type',\n type: {\n required: false,\n },\n },\n active: {\n control: 'boolean',\n defaultValue: false,\n description: 'Whether the switch is active',\n type: {\n required: false,\n },\n },\n disabled: {\n control: 'boolean',\n defaultValue: false,\n description: 'Whether the switch is disabled',\n type: {\n required: false,\n },\n },\n label: {\n control: 'text',\n defaultValue: 'Label',\n description: 'The switch label',\n type: {\n required: false,\n },\n },\n subTitle: {\n control: 'text',\n defaultValue: '',\n description: 'The switch subtitle (available when type is List)',\n type: {\n required: false,\n },\n },\n valueChanged: {\n action: 'valueChanged',\n description: 'Event emitted when switch value changes',\n },\n focusedOn: {\n action: 'focusedOn',\n description: 'Event emitted when switch is focused',\n },\n focusedOut: {\n action: 'focusedOut',\n description: 'Event emitted when switch loses focus',\n },\n },\n parameters: {\n docs: {\n description: {\n component: 'O componente Switch Sula Design System é um componente que permite ao usuário alternar entre os estados de on (ativo) e off (inativo) em uma interface.',\n },\n },\n },\n};\n\nconst Template = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.display = 'flex';\n container.style.flexDirection = 'column';\n container.style.gap = '20px';\n\n const el = document.createElement('sula-switch');\n\n el.setAttribute('type', args.type);\n if (args.label) el.setAttribute('label', args.label);\n if (args.subTitle) el.setAttribute('sub-title', args.subTitle);\n el.setAttribute('disabled', args.disabled.toString());\n el.setAttribute('active', args.active.toString());\n\n el.addEventListener('valueChanged', args.valueChanged);\n el.addEventListener('focusedOn', args.focusedOn);\n el.addEventListener('focusedOut', args.focusedOut);\n\n container.appendChild(el);\n\n return container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n type: SulaSwitchType.Default,\n label: 'Ativar notificações',\n subTitle: '',\n disabled: false,\n active: false,\n};\n\nexport const DefaultActive = Template.bind({});\nDefaultActive.args = {\n ...Default.args,\n active: true,\n};\n\nexport const DefaultDisabled = Template.bind({});\nDefaultDisabled.args = {\n ...Default.args,\n disabled: true,\n};\n\nexport const DefaultActiveDisabled = Template.bind({});\nDefaultActiveDisabled.args = {\n ...Default.args,\n active: true,\n disabled: true,\n};\n\nexport const DefaultWithoutLabel = Template.bind({});\nDefaultWithoutLabel.args = {\n ...Default.args,\n label: '',\n};\n\nexport const List = Template.bind({});\nList.args = {\n type: SulaSwitchType.List,\n label: 'Modo escuro',\n subTitle: 'Alterar para tema escuro da aplicação',\n disabled: false,\n active: false,\n};\n\nexport const ListActive = Template.bind({});\nListActive.args = {\n ...List.args,\n active: true,\n};\n\nexport const ListDisabled = Template.bind({});\nListDisabled.args = {\n ...List.args,\n disabled: true,\n};\n\nexport const ListActiveDisabled = Template.bind({});\nListActiveDisabled.args = {\n ...List.args,\n active: true,\n disabled: true,\n};\n"]}
1
+ {"version":3,"file":"sula-switch.stories.js","sourceRoot":"","sources":["../../../src/components/sula-switch/sula-switch.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAE3D,eAAe;IACb,KAAK,EAAE,wBAAwB;IAC/B,IAAI,EAAE,CAAC,UAAU,CAAC;IAClB,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;YAC3B,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,cAAc,CAAC;YACtC,YAAY,EAAE,cAAc,CAAC,OAAO;YACpC,WAAW,EAAE,iBAAiB;YAC9B,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,MAAM,EAAE;YACN,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,8BAA8B;YAC3C,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,SAAS;YAClB,YAAY,EAAE,KAAK;YACnB,WAAW,EAAE,gCAAgC;YAC7C,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,KAAK,EAAE;YACL,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,OAAO;YACrB,WAAW,EAAE,kBAAkB;YAC/B,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,QAAQ,EAAE;YACR,OAAO,EAAE,MAAM;YACf,YAAY,EAAE,EAAE;YAChB,WAAW,EAAE,mDAAmD;YAChE,IAAI,EAAE;gBACJ,QAAQ,EAAE,KAAK;aAChB;SACF;QACD,UAAU,EAAE;YACV,OAAO,EAAE,SAAS;YACl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K;IACf,MAAM,EAAE,KAAK;IACb,UAAU,EAAE,IAAI;CACjB,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACtD,oBAAoB,CAAC,IAAI,mCACpB,cAAc,CAAC,IAAI,KACtB,MAAM,EAAE,IAAI,GACb,CAAC","sourcesContent":["import { SulaSwitchType } from './model/sula-switch.model';\n\nexport default {\n title: 'Components/sula-switch',\n tags: ['autodocs'],\n argTypes: {\n type: {\n control: { type: 'select' },\n options: Object.values(SulaSwitchType),\n defaultValue: SulaSwitchType.Default,\n description: 'The switch type',\n type: {\n required: false,\n },\n },\n active: {\n control: 'boolean',\n defaultValue: false,\n description: 'Whether the switch is active',\n type: {\n required: false,\n },\n },\n disabled: {\n control: 'boolean',\n defaultValue: false,\n description: 'Whether the switch is disabled',\n type: {\n required: false,\n },\n },\n label: {\n control: 'text',\n defaultValue: 'Label',\n description: 'The switch label',\n type: {\n required: false,\n },\n },\n subTitle: {\n control: 'text',\n defaultValue: '',\n description: 'The switch subtitle (available when type is List)',\n type: {\n required: false,\n },\n },\n responsive: {\n control: 'boolean',\n defaultValue: false,\n description: 'Enable responsive layout (full width)',\n type: {\n required: false,\n },\n },\n valueChanged: {\n action: 'valueChanged',\n description: 'Event emitted when switch value changes',\n },\n focusedOn: {\n action: 'focusedOn',\n description: 'Event emitted when switch is focused',\n },\n focusedOut: {\n action: 'focusedOut',\n description: 'Event emitted when switch loses focus',\n },\n },\n parameters: {\n docs: {\n description: {\n component: 'O componente Switch Sula Design System é um componente que permite ao usuário alternar entre os estados de on (ativo) e off (inativo) em uma interface.',\n },\n },\n },\n};\n\nconst Template = args => {\n const container = document.createElement('div');\n container.style.margin = '20px';\n container.style.display = 'flex';\n container.style.flexDirection = 'column';\n container.style.gap = '20px';\n\n const el = document.createElement('sula-switch');\n\n el.setAttribute('type', args.type);\n if (args.label) el.setAttribute('label', args.label);\n if (args.subTitle) el.setAttribute('sub-title', args.subTitle);\n el.setAttribute('disabled', args.disabled.toString());\n el.setAttribute('active', args.active.toString());\n el.setAttribute('responsive', args.responsive.toString());\n\n el.addEventListener('valueChanged', args.valueChanged);\n el.addEventListener('focusedOn', args.focusedOn);\n el.addEventListener('focusedOut', args.focusedOut);\n\n container.appendChild(el);\n\n return container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n type: SulaSwitchType.Default,\n label: 'Ativar notificações',\n subTitle: '',\n disabled: false,\n active: false,\n responsive: false,\n};\n\nexport const DefaultActive = Template.bind({});\nDefaultActive.args = {\n ...Default.args,\n active: true,\n};\n\nexport const DefaultDisabled = Template.bind({});\nDefaultDisabled.args = {\n ...Default.args,\n disabled: true,\n};\n\nexport const DefaultActiveDisabled = Template.bind({});\nDefaultActiveDisabled.args = {\n ...Default.args,\n active: true,\n disabled: true,\n};\n\nexport const DefaultWithoutLabel = Template.bind({});\nDefaultWithoutLabel.args = {\n ...Default.args,\n label: '',\n};\n\nexport const List = Template.bind({});\nList.args = {\n type: SulaSwitchType.List,\n label: 'Modo escuro',\n subTitle: 'Alterar para tema escuro da aplicação',\n disabled: false,\n active: false,\n responsive: false,\n};\n\nexport const ListActive = Template.bind({});\nListActive.args = {\n ...List.args,\n active: true,\n};\n\nexport const ListDisabled = Template.bind({});\nListDisabled.args = {\n ...List.args,\n disabled: true,\n};\n\nexport const ListActiveDisabled = Template.bind({});\nListActiveDisabled.args = {\n ...List.args,\n active: true,\n disabled: true,\n};\n\nexport const ListResponsive = Template.bind({});\nListResponsive.args = {\n type: SulaSwitchType.List,\n label: 'Modo responsivo',\n subTitle: 'Este switch ocupa a largura total do container',\n disabled: false,\n active: false,\n responsive: true,\n};\n\nexport const ListResponsiveActive = Template.bind({});\nListResponsiveActive.args = {\n ...ListResponsive.args,\n active: true,\n};\n"]}
@@ -1258,6 +1258,9 @@ var getHostListenerTarget = (doc, elm, flags) => {
1258
1258
  if (flags & 4 /* TargetDocument */) {
1259
1259
  return doc;
1260
1260
  }
1261
+ if (flags & 8 /* TargetWindow */) {
1262
+ return win;
1263
+ }
1261
1264
  return elm;
1262
1265
  };
1263
1266
  var hostListenerOpts = (flags) => supportsListenerOptions ? {