@sula-tech/webcomponents 0.8.0 → 0.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (99) hide show
  1. package/dist/cjs/{index-Bbryl0vg.js → index-LR6yFDX7.js} +16 -2
  2. package/dist/cjs/index-LR6yFDX7.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{sula-avatar_18.cjs.entry.js → sula-avatar_19.cjs.entry.js} +370 -47
  5. package/dist/cjs/sula-avatar_19.cjs.entry.js.map +1 -0
  6. package/dist/cjs/webcomponents.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +1 -0
  8. package/dist/collection/components/sula-avatar/sula-avatar.css +1 -1
  9. package/dist/collection/components/sula-badge/sula-badge.css +1 -1
  10. package/dist/collection/components/sula-button/sula-button.css +1 -1
  11. package/dist/collection/components/sula-chip/sula-chip.css +1 -1
  12. package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -1
  13. package/dist/collection/components/sula-dropdown/sula-dropdown.js +74 -9
  14. package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -1
  15. package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +53 -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-icon/sula-icon.js +1 -1
  19. package/dist/collection/components/sula-loader/sula-loader.css +1 -1
  20. package/dist/collection/components/sula-loader/sula-loader.js +1 -1
  21. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
  22. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +33 -2
  23. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -1
  24. package/dist/collection/components/sula-modal/model/sula-modal.model.js +16 -0
  25. package/dist/collection/components/sula-modal/model/sula-modal.model.js.map +1 -0
  26. package/dist/collection/components/sula-modal/sula-modal.css +1 -0
  27. package/dist/collection/components/sula-modal/sula-modal.js +558 -0
  28. package/dist/collection/components/sula-modal/sula-modal.js.map +1 -0
  29. package/dist/collection/components/sula-modal/sula-modal.stories.js +193 -0
  30. package/dist/collection/components/sula-modal/sula-modal.stories.js.map +1 -0
  31. package/dist/collection/components/sula-progress-bar/sula-progress-bar.js +2 -2
  32. package/dist/collection/components/sula-radio-button/sula-radio-button.js +2 -2
  33. package/dist/collection/components/sula-search-bar/sula-search-bar.js +2 -2
  34. package/dist/collection/components/sula-switch/sula-switch.js +4 -4
  35. package/dist/collection/components/sula-tag/sula-tag.js +3 -3
  36. package/dist/collection/components/sula-textarea/sula-textarea.js +6 -6
  37. package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
  38. package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
  39. package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +1 -1
  40. package/dist/components/index.js +19 -0
  41. package/dist/components/index.js.map +1 -1
  42. package/dist/components/p-BSYnh0jH.js +231 -0
  43. package/dist/components/p-BSYnh0jH.js.map +1 -0
  44. package/dist/components/{p-BrY8WoEl.js → p-CN1-5xeF.js} +4 -4
  45. package/dist/components/{p-BrY8WoEl.js.map → p-CN1-5xeF.js.map} +1 -1
  46. package/dist/components/{p-DrUsgtsv.js → p-CyIObO0v.js} +4 -4
  47. package/dist/components/{p-DrUsgtsv.js.map → p-CyIObO0v.js.map} +1 -1
  48. package/dist/components/{p-BNtk_d_S.js → p-DvWN7hVP.js} +14 -6
  49. package/dist/components/p-DvWN7hVP.js.map +1 -0
  50. package/dist/components/sula-avatar.js +2 -2
  51. package/dist/components/sula-badge.js +2 -2
  52. package/dist/components/sula-button.js +1 -226
  53. package/dist/components/sula-button.js.map +1 -1
  54. package/dist/components/sula-checkbox.js +1 -1
  55. package/dist/components/sula-chip.js +3 -3
  56. package/dist/components/sula-chip.js.map +1 -1
  57. package/dist/components/sula-dropdown.js +60 -14
  58. package/dist/components/sula-dropdown.js.map +1 -1
  59. package/dist/components/sula-icon.js +1 -1
  60. package/dist/components/sula-loader.js +1 -1
  61. package/dist/components/sula-menu-select-list.js +1 -1
  62. package/dist/components/sula-modal.d.ts +11 -0
  63. package/dist/components/sula-modal.js +332 -0
  64. package/dist/components/sula-modal.js.map +1 -0
  65. package/dist/components/sula-progress-bar.js +3 -3
  66. package/dist/components/sula-radio-button.js +2 -2
  67. package/dist/components/sula-search-bar.js +3 -3
  68. package/dist/components/sula-switch.js +4 -4
  69. package/dist/components/sula-tag.js +4 -4
  70. package/dist/components/sula-textarea.js +6 -6
  71. package/dist/components/sula-textfield.js +3 -3
  72. package/dist/components/sula-tiles.js +2 -2
  73. package/dist/components/sula-timeline-list.js +2 -2
  74. package/dist/esm/{index-or7qTZgT.js → index-CrFclBiX.js} +16 -2
  75. package/dist/esm/index-CrFclBiX.js.map +1 -0
  76. package/dist/esm/loader.js +3 -3
  77. package/dist/esm/{sula-avatar_18.entry.js → sula-avatar_19.entry.js} +370 -48
  78. package/dist/esm/sula-avatar_19.entry.js.map +1 -0
  79. package/dist/esm/webcomponents.js +3 -3
  80. package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +11 -0
  81. package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +10 -0
  82. package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +4 -0
  83. package/dist/types/components/sula-modal/model/sula-modal.model.d.ts +13 -0
  84. package/dist/types/components/sula-modal/sula-modal.d.ts +94 -0
  85. package/dist/types/components/sula-modal/sula-modal.stories.d.ts +83 -0
  86. package/dist/types/components.d.ts +170 -0
  87. package/dist/webcomponents/{p-bc1f174c.entry.js → p-6f5c973c.entry.js} +660 -287
  88. package/dist/webcomponents/p-6f5c973c.entry.js.map +1 -0
  89. package/dist/webcomponents/{p-or7qTZgT.js → p-CrFclBiX.js} +28 -16
  90. package/dist/webcomponents/p-CrFclBiX.js.map +1 -0
  91. package/dist/webcomponents/webcomponents.esm.js +41 -20
  92. package/package.json +3 -4
  93. package/dist/cjs/index-Bbryl0vg.js.map +0 -1
  94. package/dist/cjs/sula-avatar_18.cjs.entry.js.map +0 -1
  95. package/dist/components/p-BNtk_d_S.js.map +0 -1
  96. package/dist/esm/index-or7qTZgT.js.map +0 -1
  97. package/dist/esm/sula-avatar_18.entry.js.map +0 -1
  98. package/dist/webcomponents/p-bc1f174c.entry.js.map +0 -1
  99. package/dist/webcomponents/p-or7qTZgT.js.map +0 -1
@@ -0,0 +1,332 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
2
+ import { d as defineCustomElement$4, a as SulaButtonAppearance } from './p-BSYnh0jH.js';
3
+ import { d as defineCustomElement$3 } from './p-CN1-5xeF.js';
4
+ import { d as defineCustomElement$2 } from './p-CyIObO0v.js';
5
+
6
+ var SulaModalType;
7
+ (function (SulaModalType) {
8
+ SulaModalType["Alert"] = "alert";
9
+ SulaModalType["Custom"] = "custom";
10
+ SulaModalType["Promo"] = "promo";
11
+ SulaModalType["List"] = "list";
12
+ SulaModalType["CustomFull"] = "custom-full";
13
+ SulaModalType["Side"] = "side";
14
+ SulaModalType["SpecialSide"] = "special-side";
15
+ })(SulaModalType || (SulaModalType = {}));
16
+ var SulaModalSlotOverflow;
17
+ (function (SulaModalSlotOverflow) {
18
+ SulaModalSlotOverflow["Auto"] = "auto";
19
+ SulaModalSlotOverflow["Hidden"] = "hidden";
20
+ })(SulaModalSlotOverflow || (SulaModalSlotOverflow = {}));
21
+
22
+ const sulaModalCss = "*,:after,:before{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;border:0 solid #e5e7eb;box-sizing:border-box}::backdrop{--tw-ring-color:rgba(59,130,246,.5);--tw-border-spacing-x:0;--tw-border-spacing-y:0;--tw-translate-x:0;--tw-translate-y:0;--tw-rotate:0;--tw-skew-x:0;--tw-skew-y:0;--tw-scale-x:1;--tw-scale-y:1;--tw-scroll-snap-strictness:proximity;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-color:rgba(147,197,253,.5);--tw-ring-offset-shadow:0 0 #0000;--tw-ring-shadow:0 0 #0000;--tw-shadow:0 0 #0000;--tw-shadow-colored:0 0 #0000;}/*! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com*/:after,:before{--tw-content:\"\"}:host,html{-webkit-text-size-adjust:100%;font-feature-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;font-variation-settings:normal;line-height:1.5;-moz-tab-size:4;tab-size:4}body{line-height:inherit;margin:0}hr{border-top-width:1px;color:inherit;height:0}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-feature-settings:normal;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:1em;font-variation-settings:normal}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{border-collapse:collapse;border-color:inherit;text-indent:0}button,input,optgroup,select,textarea{font-feature-settings:inherit;color:inherit;font-family:inherit;font-size:100%;font-variation-settings:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dd,dl,fieldset,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset,legend{padding:0}menu,ol,ul{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{color:#9ca3af;opacity:1}[role=button],button{cursor:pointer}:disabled{cursor:default}audio,canvas,embed,iframe,img,object,svg,video{display:block;vertical-align:middle}img,video{height:auto;max-width:100%}[hidden]:where(:not([hidden=until-found])){display:none}.contents{display:contents}.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))}.opacity-0{opacity:0}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}:host{display:contents}.modal-overlay{transition:opacity .3s ease-out}.modal-overlay.opacity-0{pointer-events:none}.modal-slide-up{transform:translateY(100%)}@media (min-width:768px){.modal-slide-up{transform:translateY(20px) scale(.95)}}.modal-slide-up.modal-active{transform:translateY(0) scale(1)}.modal-slide-right{transform:translateX(100%)}.modal-slide-right.modal-active{transform:translateX(0)}: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:#02361a;--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:#500202;--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:#683f08;--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:#691e07;--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:#6a3b01;--color-gray-50:#fff;--color-gray-100:#f4f4f4;--color-gray-200:#e6e6e6;--color-gray-300:#c3c3c3;--color-gray-400:#b9b9b9;--color-gray-500:#949494;--color-gray-600:#737373;--color-gray-700:#5c5c5c;--color-gray-800:#323232;--color-gray-900:#292929;--color-gray-950:#141414;--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:#0a2e61;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:#14141405;--color-black-opacity-100:#1414141a;--color-black-opacity-200:#14141426;--color-black-opacity-300:#14141445;--color-black-opacity-400:#1414145c;--color-black-opacity-500:#14141480;--color-black-opacity-600:#1414148c;--color-black-opacity-700:#141414a3;--color-black-opacity-800:#141414ba;--color-black-opacity-900:#141414cc;--color-black-opacity-950:#141414e8;--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:#f4f4f4;--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:#323232;--color-text-secondary:#5c5c5c;--color-text-disabled:#949494;--color-text-link:#1355b4;--color-states-empty-bg-hover:#1414141a;--color-states-empty-bg-pressed:#14141426;--color-states-bg-disabled:#14141405;--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:#e6e6e6;--color-states-negative-pressed:#c3c3c3;--color-icon-primary:#5c5c5c;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#b9b9b9;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f4f4f4;--color-neutral-neutral-3:#b9b9b9;--color-neutral-neutral-4:#949494;--color-neutral-neutral-5:#737373;--color-neutral-neutral-6:#5c5c5c;--color-neutral-neutral-7:#323232;--color-neutral-neutral-8:#292929;--color-negative-negative-1:#fff;--color-negative-negative-2:#323232;--color-opacity-body:#fffc;--color-opacity-on-body:#14141405;--color-opacity-overlay:#1414148c;--color-opacity-on-overlay:#ffffff1a;--color-line-input:#949494;--color-line-general-strong:#c3c3c3;--color-line-general:#e6e6e6}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-0{inset:0}.-top-16{top:-1rem}.-top-64{top:-4rem}.-top-8{top:-.5rem}.right-0{right:0}.right-12{right:.75rem}.right-20{right:1.25rem}.right-32{right:2rem}.top-20{top:1.25rem}.top-32{top:2rem}.z-\\[999\\]{z-index:999}.mt-12{margin-top:.75rem}.mt-48{margin-top:3rem}.flex{display:flex}.hidden{display:none}.h-40{height:2.5rem}.h-64{height:4rem}.h-\\[20vh\\]{height:20vh}.h-\\[50vh\\]{height:50vh}.h-\\[70vh\\]{height:70vh}.h-full{height:100%}.max-h-\\[40vh\\]{max-height:40vh}.max-h-\\[67\\.6vh\\]{max-height:67.6vh}.max-h-\\[72\\.7vh\\]{max-height:72.7vh}.max-h-\\[80vh\\]{max-height:80vh}.max-h-\\[87\\%\\]{max-height:87%}.max-h-\\[90vh\\]{max-height:90vh}.w-1\\/2{width:50%}.w-40{width:2.5rem}.w-64{width:4rem}.w-\\[440px\\]{width:440px}.w-full{width:100%}.cursor-pointer{cursor:pointer}.flex-row-reverse{flex-direction:row-reverse}.flex-col{flex-direction:column}.items-end{align-items:flex-end}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.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))}.space-y-12>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.75rem*var(--tw-space-y-reverse));margin-top:calc(.75rem*(1 - var(--tw-space-y-reverse)))}.space-x-reverse>:not([hidden])~:not([hidden]){--tw-space-x-reverse:1}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:2.5rem}.rounded-none{border-radius:0}.rounded-b-none{border-bottom-left-radius:0;border-bottom-right-radius:0}.rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.border{border-width:1px}.border-line-general{border-color:var(--color-line-general)}.bg-opacity-on-overlay{background-color:var(--color-opacity-on-overlay)}.bg-opacity-overlay{background-color:var(--color-opacity-overlay)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.object-cover{object-fit:cover}.px-14{padding-left:.875rem;padding-right:.875rem}.py-24{padding-bottom:1.5rem;padding-top:1.5rem}.py-48{padding-bottom:3rem;padding-top:3rem}.pb-0{padding-bottom:0}.pb-24{padding-bottom:1.5rem}.pb-32{padding-bottom:2rem}.pb-40{padding-bottom:2.5rem}.pr-16{padding-right:1rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-5xl{font-size:3rem;line-height:1}.text-icon-primary{color:var(--color-icon-primary)}.text-negative-negative-1{color:var(--color-negative-negative-1)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-300{transition-duration:.3s}.ease-out{transition-timing-function:cubic-bezier(0,0,.2,1)}.hover\\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}@media (min-width:744px){.md\\:relative{position:relative}.md\\:-top-16{top:-1rem}.md\\:right-0{right:0}.md\\:h-auto{height:auto}.md\\:w-1\\/2{width:50%}.md\\:w-\\[448px\\]{width:448px}.md\\:w-\\[768px\\]{width:768px}.md\\:w-\\[80vw\\]{width:80vw}.md\\:w-\\[852px\\]{width:852px}.md\\:flex-row{flex-direction:row}.md\\:items-center{align-items:center}.md\\:rounded-lg{border-radius:2.5rem}.md\\:rounded-b-lg{border-bottom-left-radius:2.5rem;border-bottom-right-radius:2.5rem}.md\\:rounded-l-none{border-bottom-left-radius:0;border-top-left-radius:0}.md\\:rounded-r-none{border-bottom-right-radius:0;border-top-right-radius:0}.md\\:bg-surface-on-body{background-color:var(--color-surface-on-body)}.md\\:px-32{padding-left:2rem;padding-right:2rem}.md\\:py-48{padding-bottom:3rem;padding-top:3rem}.md\\:pb-24{padding-bottom:1.5rem}.md\\:pb-96{padding-bottom:6rem}.md\\:text-icon-primary{color:var(--color-icon-primary)}}";
23
+
24
+ const SulaModal$1 = /*@__PURE__*/ proxyCustomElement(class SulaModal extends H {
25
+ constructor() {
26
+ super();
27
+ this.__registerHost();
28
+ this.__attachShadow();
29
+ this.modalClosed = createEvent(this, "modalClosed");
30
+ this.primaryButtonClicked = createEvent(this, "primaryButtonClicked");
31
+ this.secondaryButtonClicked = createEvent(this, "secondaryButtonClicked");
32
+ /**
33
+ * Is modal opened
34
+ */
35
+ this.opened = false;
36
+ /**
37
+ * Block body scroll when modal is opened
38
+ */
39
+ this.blockBodyScroll = true;
40
+ /**
41
+ * Close modal when clicking outside
42
+ */
43
+ this.closeOnClickOutside = true;
44
+ /**
45
+ * Type of the modal
46
+ */
47
+ this.type = SulaModalType.Custom;
48
+ /**
49
+ * Icon of the modal header
50
+ */
51
+ this.headerIcon = '';
52
+ /**
53
+ * Title of the modal
54
+ */
55
+ this.modalTitle = '';
56
+ /**
57
+ * Promotional image URL for promo type modal
58
+ */
59
+ this.promoImage = '';
60
+ /**
61
+ * Subtitle of the modal
62
+ */
63
+ this.subTitle = '';
64
+ /**
65
+ * Primary button text
66
+ */
67
+ this.primaryButtonText = '';
68
+ /**
69
+ * Secondary button text
70
+ */
71
+ this.secondaryButtonText = '';
72
+ /**
73
+ * Slot overflow behavior
74
+ */
75
+ this.slotOverflow = SulaModalSlotOverflow.Auto;
76
+ this.isAnimating = false;
77
+ this.shouldRender = false;
78
+ }
79
+ handleOpenedChange(newValue) {
80
+ if (newValue) {
81
+ this.shouldRender = true;
82
+ requestAnimationFrame(() => {
83
+ requestAnimationFrame(() => {
84
+ this.isAnimating = true;
85
+ });
86
+ });
87
+ }
88
+ else {
89
+ this.isAnimating = false;
90
+ this.closeTimeout = setTimeout(() => {
91
+ this.shouldRender = false;
92
+ }, 300);
93
+ }
94
+ this.handleParentOverflow();
95
+ }
96
+ componentWillLoad() {
97
+ if (this.opened) {
98
+ this.shouldRender = true;
99
+ this.isAnimating = true;
100
+ }
101
+ this.handleParentOverflow();
102
+ }
103
+ disconnectedCallback() {
104
+ if (this.closeTimeout) {
105
+ clearTimeout(this.closeTimeout);
106
+ }
107
+ }
108
+ handleParentOverflow() {
109
+ var _a;
110
+ const overflow = this.opened && this.blockBodyScroll ? 'hidden' : 'inherit';
111
+ if ((_a = this.hostElement) === null || _a === void 0 ? void 0 : _a.parentElement) {
112
+ this.hostElement.parentElement.style.overflow = overflow;
113
+ }
114
+ }
115
+ closeModal() {
116
+ this.opened = false;
117
+ this.modalClosed.emit();
118
+ }
119
+ handleClickOutside(event) {
120
+ if (this.closeOnClickOutside && event.target === event.currentTarget) {
121
+ this.closeModal();
122
+ }
123
+ }
124
+ handlePrimaryButtonClick() {
125
+ this.primaryButtonClicked.emit();
126
+ }
127
+ handleSecondaryButtonClick() {
128
+ this.secondaryButtonClicked.emit();
129
+ }
130
+ isAlertOrCustomOrPromo() {
131
+ return this.type === SulaModalType.Alert || this.type === SulaModalType.Custom || this.type === SulaModalType.Promo;
132
+ }
133
+ isListOrCustomFull() {
134
+ return this.type === SulaModalType.List || this.type === SulaModalType.CustomFull;
135
+ }
136
+ isSideModal() {
137
+ return this.type === SulaModalType.Side || this.type === SulaModalType.SpecialSide;
138
+ }
139
+ isPromoOrSpecialSide() {
140
+ return this.type === SulaModalType.Promo || this.type === SulaModalType.SpecialSide;
141
+ }
142
+ hasSlotContent() {
143
+ return (this.type === SulaModalType.Custom || this.type === SulaModalType.Promo || this.type === SulaModalType.List || this.type === SulaModalType.CustomFull || this.isSideModal());
144
+ }
145
+ hasButtons() {
146
+ return this.type === SulaModalType.Alert || this.type === SulaModalType.Custom;
147
+ }
148
+ getOverlayClasses() {
149
+ return {
150
+ 'modal-overlay absolute inset-0 bg-opacity-overlay flex z-[999] transition-opacity duration-300': true,
151
+ 'opacity-100': this.isAnimating,
152
+ 'opacity-0': !this.isAnimating,
153
+ 'items-end justify-center md:items-center': this.isAlertOrCustomOrPromo(),
154
+ 'items-end justify-center': this.isListOrCustomFull(),
155
+ 'justify-end': this.isSideModal(),
156
+ };
157
+ }
158
+ getWrapperClasses() {
159
+ return {
160
+ 'modal-wrapper transition-all duration-300 ease-out': true,
161
+ 'w-full md:w-[852px] flex md:flex-row flex-col h-[70vh] md:h-auto relative': this.type === SulaModalType.Promo,
162
+ 'w-full flex justify-center items-center': !this.isPromoOrSpecialSide() && !this.isSideModal(),
163
+ 'w-full flex justify-end': this.isSideModal(),
164
+ 'modal-slide-up': (this.isAlertOrCustomOrPromo() || this.isListOrCustomFull()) && !this.isSideModal(),
165
+ 'modal-slide-right': this.isSideModal(),
166
+ 'modal-active': this.isAnimating,
167
+ };
168
+ }
169
+ getContentClasses() {
170
+ return {
171
+ 'bg-box-shadow-body rounded-b-none border border-line-hair px-14 py-24 md:px-32 md:py-48': true,
172
+ 'md:rounded-b-lg rounded-lg': !this.isSideModal(),
173
+ 'w-full md:w-[448px]': this.type === SulaModalType.Alert,
174
+ 'w-full md:w-[768px] pb-32': this.type === SulaModalType.Custom,
175
+ 'w-full md:w-1/2 h-[50vh] md:h-auto pb-0 md:pb-96 rounded-none md:rounded-lg md:rounded-l-none': this.type === SulaModalType.Promo,
176
+ 'w-full md:w-[80vw] max-h-[90vh] rounded-b-none relative': this.isListOrCustomFull(),
177
+ 'rounded-none w-[440px]': this.type === SulaModalType.Side,
178
+ 'rounded-none w-1/2': this.type === SulaModalType.SpecialSide,
179
+ };
180
+ }
181
+ getHeaderClasses() {
182
+ return {
183
+ 'flex w-full': true,
184
+ 'relative': !this.isListOrCustomFull() && this.type !== SulaModalType.Promo && this.type !== SulaModalType.Side,
185
+ 'pb-24': this.type !== SulaModalType.Promo && this.type !== SulaModalType.Side,
186
+ 'pb-0 md:pb-24 md:relative': this.type === SulaModalType.Promo,
187
+ 'pb-40': this.type === SulaModalType.Side,
188
+ };
189
+ }
190
+ getCloseButtonClasses() {
191
+ return {
192
+ 'w-40 h-40 rounded-full absolute right-0 flex justify-center items-center cursor-pointer': true,
193
+ '-top-8 md:-top-16': !this.isListOrCustomFull() && this.type !== SulaModalType.Promo && this.type !== SulaModalType.Side,
194
+ 'bg-surface-on-body hover:bg-states-empty-bg-hover text-icon-primary': !this.isListOrCustomFull() && this.type !== SulaModalType.Promo,
195
+ 'top-20 right-20 bg-opacity-overlay text-negative-negative-1 md:bg-surface-on-body hover:bg-states-empty-bg-hover md:-top-16 md:text-icon-primary': this.type === SulaModalType.Promo,
196
+ '-top-64 right-12 md:right-0 bg-opacity-on-overlay text-negative-negative-1': this.isListOrCustomFull(),
197
+ 'top-32 right-32': this.type === SulaModalType.Side,
198
+ };
199
+ }
200
+ getTitleContainerClasses() {
201
+ return {
202
+ 'flex flex-col space-y-12': true,
203
+ 'items-center justify-center': this.type === SulaModalType.List,
204
+ };
205
+ }
206
+ getTitleClasses() {
207
+ return {
208
+ 'text-heading-small text-text-primary pr-16': true,
209
+ 'text-paragraph-large-bold': this.type === SulaModalType.List,
210
+ 'text-heading-medium': this.type === SulaModalType.List,
211
+ };
212
+ }
213
+ getSlotClasses() {
214
+ return {
215
+ 'mt-12 w-full max-h-[40vh]': true,
216
+ 'max-h-[80vh]': this.type === SulaModalType.List,
217
+ 'max-h-[67.6vh]': this.type === SulaModalType.CustomFull,
218
+ 'max-h-[72.7vh]': this.type === SulaModalType.Side,
219
+ 'max-h-[87%]': this.type === SulaModalType.SpecialSide,
220
+ 'overflow-auto': this.slotOverflow === SulaModalSlotOverflow.Auto,
221
+ 'overflow-hidden': this.slotOverflow === SulaModalSlotOverflow.Hidden,
222
+ };
223
+ }
224
+ getButtonContainerClasses() {
225
+ return {
226
+ 'w-full mt-48 flex': true,
227
+ 'flex-col space-y-12': this.type === SulaModalType.Alert,
228
+ 'flex-row-reverse space-x-reverse space-x-12': this.type === SulaModalType.Custom,
229
+ };
230
+ }
231
+ renderPromoImage() {
232
+ if (!this.isPromoOrSpecialSide()) {
233
+ return null;
234
+ }
235
+ const imageClasses = {
236
+ 'w-full md:w-1/2 h-[20vh] md:h-auto overflow-hidden flex': true,
237
+ 'rounded-b-none md:rounded-b-lg md:rounded-r-none rounded-lg': this.type === SulaModalType.Promo,
238
+ };
239
+ return (h("div", { class: imageClasses }, h("img", { src: this.promoImage, alt: "Promotional Image", class: "w-full h-full object-cover" })));
240
+ }
241
+ renderHeaderIcon() {
242
+ if ((this.type === SulaModalType.Alert || this.type === SulaModalType.Custom) && this.headerIcon) {
243
+ return (h("div", { class: "w-64 h-64 border border-line-general flex justify-center items-center rounded-full" }, h("sula-icon", { icon: this.headerIcon, customClass: "text-5xl text-icon-primary", class: "flex" })));
244
+ }
245
+ return null;
246
+ }
247
+ renderCloseButton() {
248
+ return (h("div", { class: this.getCloseButtonClasses(), onClick: () => this.closeModal() }, h("sula-icon", { icon: "ph ph-x", customClass: "text-2xl", class: "flex" })));
249
+ }
250
+ renderTitleSection() {
251
+ if (!this.modalTitle && !this.subTitle) {
252
+ return null;
253
+ }
254
+ return (h("div", { class: this.getTitleContainerClasses() }, this.modalTitle && h("h1", { class: this.getTitleClasses() }, this.modalTitle), this.subTitle && h("p", { class: "text-paragraph-medium-regular text-text-secondary" }, this.subTitle)));
255
+ }
256
+ renderSlot() {
257
+ if (!this.hasSlotContent()) {
258
+ return null;
259
+ }
260
+ return (h("div", { class: this.getSlotClasses() }, h("slot", null)));
261
+ }
262
+ renderButtons() {
263
+ if (!this.hasButtons()) {
264
+ return null;
265
+ }
266
+ return (h("div", { class: this.getButtonContainerClasses() }, this.primaryButtonText && h("sula-button", { text: this.primaryButtonText, fullWidth: true, onButtonClicked: () => this.handlePrimaryButtonClick() }), this.secondaryButtonText && (h("sula-button", { onButtonClicked: () => this.handleSecondaryButtonClick(), appearance: SulaButtonAppearance.Secondary, text: this.secondaryButtonText, fullWidth: true }))));
267
+ }
268
+ render() {
269
+ if (!this.shouldRender) {
270
+ return h(Host, null);
271
+ }
272
+ return (h(Host, null, h("div", { class: this.getOverlayClasses(), onClick: event => this.handleClickOutside(event) }, h("div", { class: this.getWrapperClasses() }, this.renderPromoImage(), h("div", { class: this.getContentClasses() }, h("div", { class: this.getHeaderClasses() }, this.renderHeaderIcon(), this.renderCloseButton()), this.renderTitleSection(), this.renderSlot(), this.renderButtons())))));
273
+ }
274
+ get hostElement() { return this; }
275
+ static get watchers() { return {
276
+ "opened": ["handleOpenedChange"]
277
+ }; }
278
+ static get style() { return sulaModalCss; }
279
+ }, [1, "sula-modal", {
280
+ "opened": [1028],
281
+ "blockBodyScroll": [1028, "block-body-scroll"],
282
+ "closeOnClickOutside": [1028, "close-on-click-outside"],
283
+ "type": [1],
284
+ "headerIcon": [1, "header-icon"],
285
+ "modalTitle": [1, "modal-title"],
286
+ "promoImage": [1, "promo-image"],
287
+ "subTitle": [1, "sub-title"],
288
+ "primaryButtonText": [1, "primary-button-text"],
289
+ "secondaryButtonText": [1, "secondary-button-text"],
290
+ "slotOverflow": [1, "slot-overflow"],
291
+ "isAnimating": [32],
292
+ "shouldRender": [32]
293
+ }, undefined, {
294
+ "opened": ["handleOpenedChange"]
295
+ }]);
296
+ function defineCustomElement$1() {
297
+ if (typeof customElements === "undefined") {
298
+ return;
299
+ }
300
+ const components = ["sula-modal", "sula-button", "sula-icon", "sula-loader"];
301
+ components.forEach(tagName => { switch (tagName) {
302
+ case "sula-modal":
303
+ if (!customElements.get(tagName)) {
304
+ customElements.define(tagName, SulaModal$1);
305
+ }
306
+ break;
307
+ case "sula-button":
308
+ if (!customElements.get(tagName)) {
309
+ defineCustomElement$4();
310
+ }
311
+ break;
312
+ case "sula-icon":
313
+ if (!customElements.get(tagName)) {
314
+ defineCustomElement$3();
315
+ }
316
+ break;
317
+ case "sula-loader":
318
+ if (!customElements.get(tagName)) {
319
+ defineCustomElement$2();
320
+ }
321
+ break;
322
+ } });
323
+ }
324
+ defineCustomElement$1();
325
+
326
+ const SulaModal = SulaModal$1;
327
+ const defineCustomElement = defineCustomElement$1;
328
+
329
+ export { SulaModal, defineCustomElement };
330
+ //# sourceMappingURL=sula-modal.js.map
331
+
332
+ //# sourceMappingURL=sula-modal.js.map
@@ -0,0 +1 @@
1
+ {"file":"sula-modal.js","mappings":";;;;;AAAA,IAAY,aAQX;AARD,CAAA,UAAY,aAAa,EAAA;AACvB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,aAAA,CAAA,QAAA,CAAA,GAAA,QAAiB;AACjB,IAAA,aAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,aAAA,CAAA,YAAA,CAAA,GAAA,aAA0B;AAC1B,IAAA,aAAA,CAAA,MAAA,CAAA,GAAA,MAAa;AACb,IAAA,aAAA,CAAA,aAAA,CAAA,GAAA,cAA4B;AAC9B,CAAC,EARW,aAAa,KAAb,aAAa,GAQxB,EAAA,CAAA,CAAA;AAED,IA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AgB,EAAE,EACvB,IAAI,CAAC,iBAAiB,EAAE,CACrB,EACL,IAAI,CAAC,kBAAkB,EAAE,EACzB,IAAI,CAAC,UAAU,EAAE,EACjB,IAAI,CAAC,aAAa,EAAE,CACjB,CACF,CACF,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaModal","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-modal/model/sula-modal.model.ts","src/components/sula-modal/sula-modal.scss?tag=sula-modal&encapsulation=shadow","src/components/sula-modal/sula-modal.tsx"],"sourcesContent":["export enum SulaModalType {\n Alert = 'alert',\n Custom = 'custom',\n Promo = 'promo',\n List = 'list',\n CustomFull = 'custom-full',\n Side = 'side',\n SpecialSide = 'special-side',\n}\n\nexport enum SulaModalSlotOverflow {\n Auto = 'auto',\n Hidden = 'hidden',\n}\n",":host {\n display: contents;\n}\n\n.modal-overlay {\n transition: opacity 300ms ease-out;\n\n &.opacity-0 {\n pointer-events: none;\n }\n}\n\n.modal-slide-up {\n transform: translateY(100%);\n\n @media (min-width: 768px) {\n transform: translateY(20px) scale(0.95);\n }\n\n &.modal-active {\n transform: translateY(0) scale(1);\n }\n}\n\n.modal-slide-right {\n transform: translateX(100%);\n\n &.modal-active {\n transform: translateX(0);\n }\n}\n","import { Component, Element, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaModalSlotOverflow, SulaModalType } from './model/sula-modal.model';\nimport { SulaButtonAppearance } from '../sula-button/model/sula-button.model';\n\n@Component({\n tag: 'sula-modal',\n styleUrl: 'sula-modal.scss',\n shadow: true,\n})\nexport class SulaModal {\n /**\n * Is modal opened\n */\n @Prop({ mutable: true }) opened: boolean = false;\n\n /**\n * Block body scroll when modal is opened\n */\n @Prop({ mutable: true }) blockBodyScroll: boolean = true;\n\n /**\n * Close modal when clicking outside\n */\n @Prop({ mutable: true }) closeOnClickOutside: boolean = true;\n\n /**\n * Type of the modal\n */\n @Prop() type: SulaModalType = SulaModalType.Custom;\n\n /**\n * Icon of the modal header\n */\n @Prop() headerIcon: string = '';\n\n /**\n * Title of the modal\n */\n @Prop() modalTitle: string = '';\n\n /**\n * Promotional image URL for promo type modal\n */\n @Prop() promoImage: string = '';\n\n /**\n * Subtitle of the modal\n */\n @Prop() subTitle: string = '';\n\n /**\n * Primary button text\n */\n @Prop() primaryButtonText: string = '';\n\n /**\n * Secondary button text\n */\n @Prop() secondaryButtonText: string = '';\n\n /**\n * Slot overflow behavior\n */\n @Prop() slotOverflow: SulaModalSlotOverflow = SulaModalSlotOverflow.Auto;\n\n /**\n * Event emitted when the modal is closed\n */\n @Event()\n modalClosed: EventEmitter<void>;\n\n /**\n * Event emitted when the primary button is clicked\n */\n @Event()\n primaryButtonClicked: EventEmitter<void>;\n\n /**\n * Event emitted when the secondary button is clicked\n */\n @Event()\n secondaryButtonClicked: EventEmitter<void>;\n\n @Element() hostElement: HTMLElement;\n\n @State() isAnimating: boolean = false;\n @State() shouldRender: boolean = false;\n\n private closeTimeout: NodeJS.Timeout;\n\n @Watch('opened')\n handleOpenedChange(newValue: boolean) {\n if (newValue) {\n this.shouldRender = true;\n\n requestAnimationFrame(() => {\n requestAnimationFrame(() => {\n this.isAnimating = true;\n });\n });\n } else {\n this.isAnimating = false;\n\n this.closeTimeout = setTimeout(() => {\n this.shouldRender = false;\n }, 300);\n }\n this.handleParentOverflow();\n }\n\n componentWillLoad() {\n if (this.opened) {\n this.shouldRender = true;\n this.isAnimating = true;\n }\n this.handleParentOverflow();\n }\n\n disconnectedCallback() {\n if (this.closeTimeout) {\n clearTimeout(this.closeTimeout);\n }\n }\n\n handleParentOverflow(): void {\n const overflow = this.opened && this.blockBodyScroll ? 'hidden' : 'inherit';\n\n if (this.hostElement?.parentElement) {\n this.hostElement.parentElement.style.overflow = overflow;\n }\n }\n\n closeModal(): void {\n this.opened = false;\n this.modalClosed.emit();\n }\n\n handleClickOutside(event: MouseEvent): void {\n if (this.closeOnClickOutside && event.target === event.currentTarget) {\n this.closeModal();\n }\n }\n\n handlePrimaryButtonClick(): void {\n this.primaryButtonClicked.emit();\n }\n\n handleSecondaryButtonClick(): void {\n this.secondaryButtonClicked.emit();\n }\n\n isAlertOrCustomOrPromo(): boolean {\n return this.type === SulaModalType.Alert || this.type === SulaModalType.Custom || this.type === SulaModalType.Promo;\n }\n\n isListOrCustomFull(): boolean {\n return this.type === SulaModalType.List || this.type === SulaModalType.CustomFull;\n }\n\n isSideModal(): boolean {\n return this.type === SulaModalType.Side || this.type === SulaModalType.SpecialSide;\n }\n\n isPromoOrSpecialSide(): boolean {\n return this.type === SulaModalType.Promo || this.type === SulaModalType.SpecialSide;\n }\n\n hasSlotContent(): boolean {\n return (\n this.type === SulaModalType.Custom || this.type === SulaModalType.Promo || this.type === SulaModalType.List || this.type === SulaModalType.CustomFull || this.isSideModal()\n );\n }\n\n hasButtons(): boolean {\n return this.type === SulaModalType.Alert || this.type === SulaModalType.Custom;\n }\n\n getOverlayClasses(): Record<string, boolean> {\n return {\n 'modal-overlay absolute inset-0 bg-opacity-overlay flex z-[999] transition-opacity duration-300': true,\n 'opacity-100': this.isAnimating,\n 'opacity-0': !this.isAnimating,\n 'items-end justify-center md:items-center': this.isAlertOrCustomOrPromo(),\n 'items-end justify-center': this.isListOrCustomFull(),\n 'justify-end': this.isSideModal(),\n };\n }\n\n getWrapperClasses(): Record<string, boolean> {\n return {\n 'modal-wrapper transition-all duration-300 ease-out': true,\n 'w-full md:w-[852px] flex md:flex-row flex-col h-[70vh] md:h-auto relative': this.type === SulaModalType.Promo,\n 'w-full flex justify-center items-center': !this.isPromoOrSpecialSide() && !this.isSideModal(),\n 'w-full flex justify-end': this.isSideModal(),\n\n 'modal-slide-up': (this.isAlertOrCustomOrPromo() || this.isListOrCustomFull()) && !this.isSideModal(),\n 'modal-slide-right': this.isSideModal(),\n 'modal-active': this.isAnimating,\n };\n }\n\n getContentClasses(): Record<string, boolean> {\n return {\n 'bg-box-shadow-body rounded-b-none border border-line-hair px-14 py-24 md:px-32 md:py-48': true,\n 'md:rounded-b-lg rounded-lg': !this.isSideModal(),\n 'w-full md:w-[448px]': this.type === SulaModalType.Alert,\n 'w-full md:w-[768px] pb-32': this.type === SulaModalType.Custom,\n 'w-full md:w-1/2 h-[50vh] md:h-auto pb-0 md:pb-96 rounded-none md:rounded-lg md:rounded-l-none': this.type === SulaModalType.Promo,\n 'w-full md:w-[80vw] max-h-[90vh] rounded-b-none relative': this.isListOrCustomFull(),\n 'rounded-none w-[440px]': this.type === SulaModalType.Side,\n 'rounded-none w-1/2': this.type === SulaModalType.SpecialSide,\n };\n }\n\n getHeaderClasses(): Record<string, boolean> {\n return {\n 'flex w-full': true,\n 'relative': !this.isListOrCustomFull() && this.type !== SulaModalType.Promo && this.type !== SulaModalType.Side,\n 'pb-24': this.type !== SulaModalType.Promo && this.type !== SulaModalType.Side,\n 'pb-0 md:pb-24 md:relative': this.type === SulaModalType.Promo,\n 'pb-40': this.type === SulaModalType.Side,\n };\n }\n\n getCloseButtonClasses(): Record<string, boolean> {\n return {\n 'w-40 h-40 rounded-full absolute right-0 flex justify-center items-center cursor-pointer': true,\n '-top-8 md:-top-16': !this.isListOrCustomFull() && this.type !== SulaModalType.Promo && this.type !== SulaModalType.Side,\n 'bg-surface-on-body hover:bg-states-empty-bg-hover text-icon-primary': !this.isListOrCustomFull() && this.type !== SulaModalType.Promo,\n 'top-20 right-20 bg-opacity-overlay text-negative-negative-1 md:bg-surface-on-body hover:bg-states-empty-bg-hover md:-top-16 md:text-icon-primary':\n this.type === SulaModalType.Promo,\n '-top-64 right-12 md:right-0 bg-opacity-on-overlay text-negative-negative-1': this.isListOrCustomFull(),\n 'top-32 right-32': this.type === SulaModalType.Side,\n };\n }\n\n getTitleContainerClasses(): Record<string, boolean> {\n return {\n 'flex flex-col space-y-12': true,\n 'items-center justify-center': this.type === SulaModalType.List,\n };\n }\n\n getTitleClasses(): Record<string, boolean> {\n return {\n 'text-heading-small text-text-primary pr-16': true,\n 'text-paragraph-large-bold': this.type === SulaModalType.List,\n 'text-heading-medium': this.type === SulaModalType.List,\n };\n }\n\n getSlotClasses(): Record<string, boolean> {\n return {\n 'mt-12 w-full max-h-[40vh]': true,\n 'max-h-[80vh]': this.type === SulaModalType.List,\n 'max-h-[67.6vh]': this.type === SulaModalType.CustomFull,\n 'max-h-[72.7vh]': this.type === SulaModalType.Side,\n 'max-h-[87%]': this.type === SulaModalType.SpecialSide,\n 'overflow-auto': this.slotOverflow === SulaModalSlotOverflow.Auto,\n 'overflow-hidden': this.slotOverflow === SulaModalSlotOverflow.Hidden,\n };\n }\n\n getButtonContainerClasses(): Record<string, boolean> {\n return {\n 'w-full mt-48 flex': true,\n 'flex-col space-y-12': this.type === SulaModalType.Alert,\n 'flex-row-reverse space-x-reverse space-x-12': this.type === SulaModalType.Custom,\n };\n }\n\n renderPromoImage() {\n if (!this.isPromoOrSpecialSide()) {\n return null;\n }\n\n const imageClasses = {\n 'w-full md:w-1/2 h-[20vh] md:h-auto overflow-hidden flex': true,\n 'rounded-b-none md:rounded-b-lg md:rounded-r-none rounded-lg': this.type === SulaModalType.Promo,\n };\n\n return (\n <div class={imageClasses}>\n <img src={this.promoImage} alt=\"Promotional Image\" class=\"w-full h-full object-cover\" />\n </div>\n );\n }\n\n renderHeaderIcon() {\n if ((this.type === SulaModalType.Alert || this.type === SulaModalType.Custom) && this.headerIcon) {\n return (\n <div class=\"w-64 h-64 border border-line-general flex justify-center items-center rounded-full\">\n <sula-icon icon={this.headerIcon} customClass=\"text-5xl text-icon-primary\" class=\"flex\" />\n </div>\n );\n }\n return null;\n }\n\n renderCloseButton() {\n return (\n <div class={this.getCloseButtonClasses()} onClick={() => this.closeModal()}>\n <sula-icon icon=\"ph ph-x\" customClass=\"text-2xl\" class=\"flex\" />\n </div>\n );\n }\n\n renderTitleSection() {\n if (!this.modalTitle && !this.subTitle) {\n return null;\n }\n\n return (\n <div class={this.getTitleContainerClasses()}>\n {this.modalTitle && <h1 class={this.getTitleClasses()}>{this.modalTitle}</h1>}\n {this.subTitle && <p class=\"text-paragraph-medium-regular text-text-secondary\">{this.subTitle}</p>}\n </div>\n );\n }\n\n renderSlot() {\n if (!this.hasSlotContent()) {\n return null;\n }\n\n return (\n <div class={this.getSlotClasses()}>\n <slot></slot>\n </div>\n );\n }\n\n renderButtons() {\n if (!this.hasButtons()) {\n return null;\n }\n\n return (\n <div class={this.getButtonContainerClasses()}>\n {this.primaryButtonText && <sula-button text={this.primaryButtonText} fullWidth={true} onButtonClicked={() => this.handlePrimaryButtonClick()} />}\n {this.secondaryButtonText && (\n <sula-button onButtonClicked={() => this.handleSecondaryButtonClick()} appearance={SulaButtonAppearance.Secondary} text={this.secondaryButtonText} fullWidth={true} />\n )}\n </div>\n );\n }\n\n render() {\n if (!this.shouldRender) {\n return <Host />;\n }\n\n return (\n <Host>\n <div class={this.getOverlayClasses()} onClick={event => this.handleClickOutside(event)}>\n <div class={this.getWrapperClasses()}>\n {this.renderPromoImage()}\n <div class={this.getContentClasses()}>\n <div class={this.getHeaderClasses()}>\n {this.renderHeaderIcon()}\n {this.renderCloseButton()}\n </div>\n {this.renderTitleSection()}\n {this.renderSlot()}\n {this.renderButtons()}\n </div>\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
- import { d as defineCustomElement$2 } from './p-BrY8WoEl.js';
2
+ import { d as defineCustomElement$2 } from './p-CN1-5xeF.js';
3
3
 
4
4
  var SulaProgressBarAppearance;
5
5
  (function (SulaProgressBarAppearance) {
@@ -74,10 +74,10 @@ const SulaProgressBar$1 = /*@__PURE__*/ proxyCustomElement(class SulaProgressBar
74
74
  }
75
75
  }
76
76
  render() {
77
- return (h(Host, { key: '1ad9ff8449cb58eee5064aa925668761a0ff39b1' }, h("div", { key: '00d3cd84503e4692d31e6a1831957bf7442972aa', class: "flex flex-col w-full space-y-8" }, h("div", { key: '3b98e59266848cef57ed6e81e8ee4dd0671826c6', class: "flex justify-between items-center" }, h("label", { key: '1c008e6734f01f6390a591e36ed8f84c1d10f9e2', class: "text-sm text-text-secondary leading-[14px]" }, this.topLabel), this.getProgressBarStateElement()), h("div", { key: '12c79bd68d673c6a7dfeb8fc9136529d8937d137', style: { width: `${this.progress}%` }, class: {
77
+ return (h(Host, { key: '5f7922714d99330253ee04dbfe197b8cffb60e33' }, h("div", { key: '5246d62bfcb514b5976d698bb07699e9df7ae864', class: "flex flex-col w-full space-y-8" }, h("div", { key: '5f46e226f9c515d0640bafb42bb882580254e747', class: "flex justify-between items-center" }, h("label", { key: 'f61b7f5a837961a03ea1e4e72d803831c40189c5', class: "text-sm text-text-secondary leading-[14px]" }, this.topLabel), this.getProgressBarStateElement()), h("div", { key: 'b8631511218ace18082299186507c924d34da696', style: { width: `${this.progress}%` }, class: {
78
78
  'h-12 rounded-xxl': true,
79
79
  [this.getProgressBarStyle()]: true,
80
- } }), h("label", { key: 'cbb3870b08995c13f202413ab06c4e3d54f3bd6c', class: "text-sm text-text-secondary leading-[14px]" }, this.bottomLabel))));
80
+ } }), h("label", { key: '1d73f69f9868c2ae1be227d00c17b348021e1bb7', class: "text-sm text-text-secondary leading-[14px]" }, this.bottomLabel))));
81
81
  }
82
82
  static get watchers() { return {
83
83
  "progress": ["validateProgress"]
@@ -43,14 +43,14 @@ const SulaRadioButton$1 = /*@__PURE__*/ proxyCustomElement(class SulaRadioButton
43
43
  };
44
44
  }
45
45
  render() {
46
- return (h(Host, { key: 'd2899b9a6aeb8d81ecb0eb28c4d415b42ad75af5' }, h("div", { key: 'db1003e3d7923491bad2bd7c2cf2871dd87874f0', class: { 'w-fit': true, 'flex items-center': !!this.label }, onClick: this.handleClick }, h("div", { key: '835101bafd897ff0a557555d6b8b0b934fa06071', class: {
46
+ return (h(Host, { key: 'ec9162a63e7ef550bad0fac4f50201c545e36b7a' }, h("div", { key: '2acbb141714c47d79ef1517b25125d57d7773a43', class: { 'w-fit': true, 'flex items-center': !!this.label }, onClick: this.handleClick }, h("div", { key: 'fe8c9b23d3e43981e36d199e951128c07bfdef98', class: {
47
47
  'min-w-[30px] min-h-[30px] rounded-full flex justify-center items-center outline-none': true,
48
48
  'active:bg-states-empty-bg-pressed cursor-pointer': !this.disabled,
49
49
  'bg-brand-primary': this.checked,
50
50
  'border border-line-input': !this.checked,
51
51
  'container-focus': this.radioIsFocus,
52
52
  'bg-states-bg-disabled border-2 border-states-bg-disabled cursor-not-allowed': this.disabled,
53
- }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleFocusOut }, this.checked && h("div", { key: '5770f4d5e4c59f6df73974e083e3f6dd4761d897', class: "bg-transparent border-2 border-negative-negative-1 w-[18px] h-[18px] rounded-full" })), this.label && h("label", { key: '5e148846e64adc3d001457f8a677dfed3fd376ed', class: { 'ml-16 text-base text-text-primary': true, 'cursor-pointer': !this.disabled } }, this.label))));
53
+ }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleFocusOut }, this.checked && h("div", { key: 'e82a794f53e8771171008696a19c176594e36c29', class: "bg-transparent border-2 border-negative-negative-1 w-[18px] h-[18px] rounded-full" })), this.label && h("label", { key: '77844f1c95772931153a75298dc871f787e60dde', class: { 'ml-16 text-base text-text-primary': true, 'cursor-pointer': !this.disabled } }, this.label))));
54
54
  }
55
55
  static get style() { return sulaRadioButtonCss; }
56
56
  }, [1, "sula-radio-button", {
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
2
- import { d as defineCustomElement$2 } from './p-BrY8WoEl.js';
2
+ import { d as defineCustomElement$2 } from './p-CN1-5xeF.js';
3
3
 
4
4
  var SulaSearchBarStyle;
5
5
  (function (SulaSearchBarStyle) {
@@ -59,11 +59,11 @@ const SulaSearchBar$1 = /*@__PURE__*/ proxyCustomElement(class SulaSearchBar ext
59
59
  return style[this.searchBarStyle];
60
60
  }
61
61
  render() {
62
- return (h(Host, { key: 'd4d90e7c772577043a926f5c4da9940cb5540fb9' }, h("div", { key: '9d99122174667fca977c37e3cd707571f2fb5d54', class: {
62
+ return (h(Host, { key: '7ac3cb2028df077a2489a7343c7618f04976e211' }, h("div", { key: '720808c66eb0b5eeaaf38384e9c954ce2a2f42ff', class: {
63
63
  'flex flex-row items-center space-x-12 px-16 rounded-xxl h-44 caret-brand-primary outline-none group': true,
64
64
  [this.getStyleClass()]: true,
65
65
  'search-bar-focus': this.isFocused,
66
- }, tabIndex: 0, onFocus: this.handleInputFocus, onClick: this.handleInputFocus }, !this.isFocused && this.leftIcon && (h("div", { key: 'c95b9cdde31fcae4c990a9b1fd31e26354925903', class: "flex justify-center items-center leading-6" }, h("sula-icon", { key: '7c8087041097973cbef0a2b694c80e17545b1667', icon: this.leftIcon, customClass: "text-2xl text-icon-primary group-hover:text-brand-primary" }))), h("input", { key: '394b9eec2b9ebaa7f6ad0a622e6e9176bfc8c440', ref: node => (this.inputElement = node), type: "text", class: "outline-none border-none w-full bg-transparent text-text-primary", placeholder: this.placeholder, onBlur: this.handleInputBlur, value: this.value, onInput: this.handleValueChanges }), this.rightIcon && (h("div", { key: 'b5f7d07b3b2f100306a2cf3d8ae0f217afcf48c2', class: "flex justify-center items-center leading-6 cursor-pointer", onClick: this.handleRightIconClick, onMouseDown: e => e.preventDefault() }, h("sula-icon", { key: '7031e6bbd4b828c7697fa3b9659a76d1ca8e344a', icon: this.rightIcon, customClass: "text-2xl text-icon-primary" }))))));
66
+ }, tabIndex: 0, onFocus: this.handleInputFocus, onClick: this.handleInputFocus }, !this.isFocused && this.leftIcon && (h("div", { key: '0d5668fc5b271feb3c7b5aea735652c2f2abdeb1', class: "flex justify-center items-center leading-6" }, h("sula-icon", { key: '0f61816afeef7db9f9c36fed903c87ea9d71edc5', icon: this.leftIcon, customClass: "text-2xl text-icon-primary group-hover:text-brand-primary" }))), h("input", { key: '27f2199404e9c197fb8d31cc8a8ab53c32f38c2e', ref: node => (this.inputElement = node), type: "text", class: "outline-none border-none w-full bg-transparent text-text-primary", placeholder: this.placeholder, onBlur: this.handleInputBlur, value: this.value, onInput: this.handleValueChanges }), this.rightIcon && (h("div", { key: 'c47335437563eb82df68215411f6add6f91c41a7', class: "flex justify-center items-center leading-6 cursor-pointer", onClick: this.handleRightIconClick, onMouseDown: e => e.preventDefault() }, h("sula-icon", { key: '83759286dee48cea835b9a16a970d4bc16c33f83', icon: this.rightIcon, customClass: "text-2xl text-icon-primary" }))))));
67
67
  }
68
68
  static get style() { return sulaSearchBarCss; }
69
69
  }, [1, "sula-search-bar", {
@@ -49,23 +49,23 @@ const SulaSwitch$1 = /*@__PURE__*/ proxyCustomElement(class SulaSwitch extends H
49
49
  };
50
50
  }
51
51
  render() {
52
- return (h(Host, { key: 'e920dbb868a5bdde5e34ac4d015529aef08a8e3d' }, h("div", { key: '7552191cc1632d04c0c496f382fdbbb166547236', class: {
52
+ return (h(Host, { key: 'bbc4902ea0d731995e0c8600243018a171b65120' }, h("div", { key: 'b7e277261642fb9c909a8549dfe7a6295cb4dc01', class: {
53
53
  'outline-none': true,
54
54
  'flex items-center space-x-12': !!this.label && this.type === SulaSwitchType.Default,
55
55
  'flex items-center justify-between bg-surface-on-body rounded-md w-[280px] min-h-[85px] px-24 py-16': this.type === SulaSwitchType.List,
56
56
  'hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed cursor-pointer': this.type === SulaSwitchType.List && !this.disabled,
57
57
  'container-focus': this.isFocus && this.type === SulaSwitchType.List,
58
- }, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: '322c268b6e010f49cb1b61509398d9f7a1b9b8a1', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: '0da8b536c781a7d0fdfc1539b115c11171328455', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: '8ff30bb13d52d759c6b2a2892ec608d14e9ece86', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: 'cec3a0d3f3620af6e25c2ae1e6ac771eb7acaef2', class: {
58
+ }, onFocus: this.handleFocus, onBlur: this.handleBlur, onClick: this.handleClick, tabIndex: 0 }, this.type === SulaSwitchType.List && (h("div", { key: 'd15acc295e424576ab121dd5419465539ecfe440', class: "flex flex-col flex-1 mr-16 overflow-hidden" }, !!this.label && h("label", { key: '01e72df5708151314ff0155bcf7d9a7fafbd55e2', class: "text-text-primary font-bold text-base cursor-pointer break-words" }, this.label), !!this.subTitle && h("span", { key: 'c6871b59d4fe3094196bff0c78463910a2c900bd', class: "text-text-secondary text-base break-words" }, this.subTitle))), h("div", { key: 'ec2df308d747f232d71dc9d3dbd6fc99c25f85d8', class: {
59
59
  'switch-container w-56 h-32 flex items-center rounded-xxl p-2 outline-none': true,
60
60
  'switch-on bg-brand-primary justify-end': this.active,
61
61
  'switch-off bg-neutral-neutral-3 justify-start': !this.active,
62
62
  'cursor-not-allowed bg-states-bg-disabled': this.disabled,
63
63
  'switch-focus': this.isFocus && this.type === SulaSwitchType.Default,
64
- }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'ae01eb32010e93fbc3fb652c0fdd653df57b7835', class: {
64
+ }, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'a10f04862c4257df7a1753d0569dc32e8c0cd099', class: {
65
65
  'switch-thumb w-[28px] h-[28px] rounded-full flex justify-center items-center': true,
66
66
  'bg-negative-negative-1': !this.disabled,
67
67
  'bg-states-bg-disabled shadow-md': this.disabled,
68
- } }, h("div", { key: 'f965f1fa8af298f87383c8549a82990a9daeafee', class: {
68
+ } }, h("div", { key: '50c1173d038c8db02559aa6041bffc42a318964a', class: {
69
69
  'switch-indicator rounded-full': true,
70
70
  'switch-indicator-on w-12 h-12 bg-brand-primary': this.active,
71
71
  'switch-indicator-off w-[10px] h-4 bg-neutral-neutral-4': !this.active,
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h, a as Host } from './index.js';
2
- import { d as defineCustomElement$2 } from './p-BrY8WoEl.js';
2
+ import { d as defineCustomElement$2 } from './p-CN1-5xeF.js';
3
3
 
4
4
  var SulaTagSize;
5
5
  (function (SulaTagSize) {
@@ -106,14 +106,14 @@ const SulaTag$1 = /*@__PURE__*/ proxyCustomElement(class SulaTag extends H {
106
106
  return iconStatusStyles[this.iconStatus];
107
107
  }
108
108
  render() {
109
- return (h(Host, { key: 'ea42eeb4ee80620a790938eb08c6322fa4dee214' }, h("div", { key: '29745dd127c152c8e2e74534f8fa53cc8d305534', class: {
109
+ return (h(Host, { key: 'ef5f2947ea5a21a8f924a6b5140ea9382c268ac4' }, h("div", { key: 'bd55eb96395012c1a3634d193e14069a88be1b2d', class: {
110
110
  'flex items-center rounded-xxl w-fit': true,
111
111
  [this.getSizeClass()]: true,
112
112
  [this.getAppearanceClass()]: true,
113
- } }, this.icon && (h("div", { key: '2eb1b3d506d98a12b5513c947237289fcacfe035', class: {
113
+ } }, this.icon && (h("div", { key: '6c37c84e7a215d0bb8f29048c0e53f4f0fa7953e', class: {
114
114
  'flex justify-center items-center mr-8 rounded-full leading-4 px-2 py-1': true,
115
115
  [this.getIconStatusClass()]: true,
116
- } }, h("sula-icon", { key: 'b3daed5248632ce22ee43f9d64987939a3682242', icon: this.icon, "custom-class": "text-base text-negative-negative-1 leading-4" }))), h("span", { key: 'd436740cbce0feab73152447b7694818fe87f90e', class: {
116
+ } }, h("sula-icon", { key: 'f5ce8b83627858d804b67b15372173a94d1d4695', icon: this.icon, "custom-class": "text-base text-negative-negative-1 leading-4" }))), h("span", { key: 'ca436796841e583b7e5d80278cd3d0d7138678f3', class: {
117
117
  'text-base leading-4': true,
118
118
  [this.getTextColorClass()]: true,
119
119
  [this.getTextWeightClass()]: true,
@@ -138,32 +138,32 @@ const SulaTextarea$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextarea exten
138
138
  }
139
139
  render() {
140
140
  const containerHeight = this.rows * 24 + 48;
141
- return (h(Host, { key: '0586b5e31d5bda244cc4c1f993f883eb785f39b3', ref: node => (this.node = node) }, h("div", { key: '28d230964948161540ba96b948a4d7a63ecd8748' }, h("div", { key: '478bf00ea0f45407ecc36708bcfe4fb95fe49619', id: "textarea-container", class: {
141
+ return (h(Host, { key: '2fcc7b99d23820764799bcf3eed0a7605c9d2f72', ref: node => (this.node = node) }, h("div", { key: '5b6fecfaef896755b1862cf8468fb31297169885' }, h("div", { key: 'ed641bb610135c66bd663bfa284f0d81e7e1738d', id: "textarea-container", class: {
142
142
  'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,
143
143
  'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,
144
144
  'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,
145
145
  'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
146
146
  'bg-surface-body border-line-input cursor-text': !this.disabled,
147
- }, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: 'c0450390c2d40f2a3e0e4b486fc9580c369bf912', class: {
147
+ }, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '69ad1cd86d7395ecdeb7a6aeac02273370a10fef', class: {
148
148
  'text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,
149
149
  'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
150
150
  'text-text-disabled': this.disabled,
151
151
  'bg-surface-body': !this.disabled && this.isActive,
152
- }, ref: node => (this.labelElement = node) }, this.label), h("label", { key: '2d73abbc98c3cb70d0234f9629b392cb1cd8f83e', class: {
152
+ }, ref: node => (this.labelElement = node) }, this.label), h("label", { key: '0352260db567f497becd5f8f347cf206aecb595b', class: {
153
153
  'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down': true,
154
154
  'text-sm top-12 left-16': this.isActive,
155
155
  'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
156
156
  'text-text-disabled': this.disabled,
157
157
  'bg-surface-body': !this.disabled && this.isActive,
158
- }, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: 'ce8af45adb97d797dbc07a557235c47378a10bb2', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
158
+ }, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: 'edeacd0e14078081c1d5986e60852b8ed5b6a6a6', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
159
159
  'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,
160
160
  'text-text-primary': !this.disabled,
161
161
  'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,
162
- }, style: { paddingTop: this.isActive ? `${this.labelPadding}px` : '0' }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: '676e2be41409e297c350dd95a715014f0589594c', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: '69a22552f623c03a458137f3bfa4f92a2fb0a62d', id: "textarea-help-text", class: {
162
+ }, style: { paddingTop: this.isActive ? `${this.labelPadding}px` : '0' }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: 'f1036cde3cf5bbd60fba5938fc2054d12d110624', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'db55a3ae78e63964a9d26a8cd44a71874a500004', id: "textarea-help-text", class: {
163
163
  'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
164
164
  'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
165
165
  'text-text-disabled': this.disabled,
166
- } }, this.helpText)), this.maxLength && (h("div", { key: '29ab1273eef5520bb5436aaa0baa767cd24644c4', id: "max-length-container", class: {
166
+ } }, this.helpText)), this.maxLength && (h("div", { key: '4e73a6934d1b959c86fa2c9f4cfb5dadaf20e943', id: "max-length-container", class: {
167
167
  'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
168
168
  'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
169
169
  'text-text-disabled': this.disabled,
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
2
2
  import { g as getDefaultExportFromCjs } from './p-B85MJLTf.js';
3
- import { d as defineCustomElement$2 } from './p-BrY8WoEl.js';
3
+ import { d as defineCustomElement$2 } from './p-CN1-5xeF.js';
4
4
 
5
5
  var SulaTextfieldType;
6
6
  (function (SulaTextfieldType) {
@@ -384,14 +384,14 @@ const SulaTextfield$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextfield ext
384
384
  return this.icon;
385
385
  }
386
386
  render() {
387
- return (h(Host, { key: '2287b38b1441da7fcab2caa4dd495bc593a4e268', ref: node => (this.node = node) }, h("div", { key: '1e9538652f7a57c1f8a99760028a45726d4cf1b8' }, h("div", { key: '48b038746bbe3ba11ea374c7cc5e28cae65d5d30', id: "button-container", class: {
387
+ return (h(Host, { key: '7f3d6752bea3a556fa77a52513eabe0655d9234d', ref: node => (this.node = node) }, h("div", { key: 'cd9cbc06a0244161c06e770d87834ddd7311ada3' }, h("div", { key: 'b66f4f6f2a5cfdcbc212264d500d219b4deb335e', id: "button-container", class: {
388
388
  'flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary': true,
389
389
  'flex-row justify-between': !!this.icon || this.type === SulaTextfieldType.Password,
390
390
  'button-focus': this.inputIsFocused && !this.disabled && this.status === SulaTextfieldStatus.Default,
391
391
  'button-error': this.status === SulaTextfieldStatus.Error && !this.disabled,
392
392
  'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
393
393
  'bg-surface-body border-line-input cursor-pointer': !this.disabled,
394
- }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '9c4a9e1e7017593db75a77585c1392125b1a98b9', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: 'd07846ebd85fff94f477f59b512304e00102bb58', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: '92955b96950cae398681755cec9fcbf0a8327695', type: this.type, ref: node => (this.inputElement = node), placeholder: this.placeholder, class: "outline-none text-base text-text-primary bg-transparent", onInput: this.handleInputChanges, onFocus: this.handleInputFocus, value: this.textValue }))), h("div", { key: 'cadc6f4d64f3e85dee539b9bf270a839709c1bfa', id: "textfield-label", class: { 'text-base flex items-center': true, 'text-text-primary': !this.disabled, 'text-text-disabled': this.disabled }, ref: node => (this.labelElement = node) }, this.label), (!!this.icon || this.type === SulaTextfieldType.Password) && (h("div", { key: '5f0fee95a1d89743084c86f9b9bdec69b3976da5', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: 'a41969ee7b207c6fdcaf43c0345e927a19b58d1c', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '14e36d4ee992aeb3ab3341f030fc05231c803e3d', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'e4286e8635c5b6f8fc3032359567cbdba2479748', id: "textfield-help-text", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.helpText)), this.maxLength && (h("div", { key: 'd2813e234f057e952f85ded243510a4a12a43654', id: "max-length-container", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.textValue ? this.textValue.length : 0, "/", this.maxLength)))))));
394
+ }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '79eabd37134b96bbb5a315ca73d81d0c8be01ce4', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: 'd24af603a0e365d1482daea31b75fa8e86fd5e8a', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: 'aea523483b4a39f31b0d2c9506001d69c397da70', type: this.type, ref: node => (this.inputElement = node), placeholder: this.placeholder, class: "outline-none text-base text-text-primary bg-transparent", onInput: this.handleInputChanges, onFocus: this.handleInputFocus, value: this.textValue }))), h("div", { key: '2e3d9fbe37ba1dc5aceea8e8ce7e6152f740a955', id: "textfield-label", class: { 'text-base flex items-center': true, 'text-text-primary': !this.disabled, 'text-text-disabled': this.disabled }, ref: node => (this.labelElement = node) }, this.label), (!!this.icon || this.type === SulaTextfieldType.Password) && (h("div", { key: 'd6f5aacd486e093d64307117d8c6b0bfea460f49', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: 'cfc400df76f2c487a09b641c101543a3e2895bd1', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '8d450abc836ba702aeda16f4f6c1d379373ee698', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'e0d25ac6878865510a0afc793d81b07d8a016bb5', id: "textfield-help-text", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.helpText)), this.maxLength && (h("div", { key: '6384a6d5468b03bef0ddf2e0345438efe1b5fd32', id: "max-length-container", class: { 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error } }, this.textValue ? this.textValue.length : 0, "/", this.maxLength)))))));
395
395
  }
396
396
  static get watchers() { return {
397
397
  "value": ["watchValueHandler"]