@sula-tech/webcomponents 0.1.1 → 0.2.0

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 (63) hide show
  1. package/dist/cjs/{index-7973b779.js → index-3eac14f6.js} +102 -4
  2. package/dist/cjs/index-3eac14f6.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/{sula-avatar_3.cjs.entry.js → sula-avatar_4.cjs.entry.js} +133 -5
  5. package/dist/cjs/sula-avatar_4.cjs.entry.js.map +1 -0
  6. package/dist/cjs/webcomponents.cjs.js +2 -2
  7. package/dist/collection/collection-manifest.json +2 -1
  8. package/dist/collection/components/sula-avatar/sula-avatar.css +1 -1
  9. package/dist/collection/components/sula-avatar/sula-avatar.stories.js +14 -17
  10. package/dist/collection/components/sula-avatar/sula-avatar.stories.js.map +1 -1
  11. package/dist/collection/components/sula-button/sula-button.css +1 -1
  12. package/dist/collection/components/sula-button/sula-button.stories.js +36 -9
  13. package/dist/collection/components/sula-button/sula-button.stories.js.map +1 -1
  14. package/dist/collection/components/sula-icon/sula-icon.css +1 -1
  15. package/dist/collection/components/sula-icon/sula-icon.stories.js +35 -14
  16. package/dist/collection/components/sula-icon/sula-icon.stories.js.map +1 -1
  17. package/dist/collection/components/sula-textfield/model/sula-textfield.model.js +11 -0
  18. package/dist/collection/components/sula-textfield/model/sula-textfield.model.js.map +1 -0
  19. package/dist/collection/components/sula-textfield/sula-textfield.css +1 -0
  20. package/dist/collection/components/sula-textfield/sula-textfield.js +376 -0
  21. package/dist/collection/components/sula-textfield/sula-textfield.js.map +1 -0
  22. package/dist/collection/components/sula-textfield/sula-textfield.stories.js +148 -0
  23. package/dist/collection/components/sula-textfield/sula-textfield.stories.js.map +1 -0
  24. package/dist/components/index.js +1 -1
  25. package/dist/components/{p-81fcc74a.js → p-a07ff261.js} +3 -3
  26. package/dist/components/{p-81fcc74a.js.map → p-a07ff261.js.map} +1 -1
  27. package/dist/components/{p-d3ba6302.js → p-ca146b16.js} +91 -5
  28. package/dist/components/p-ca146b16.js.map +1 -0
  29. package/dist/components/sula-avatar.js +3 -3
  30. package/dist/components/sula-avatar.js.map +1 -1
  31. package/dist/components/sula-button.js +3 -3
  32. package/dist/components/sula-button.js.map +1 -1
  33. package/dist/components/sula-icon.js +1 -1
  34. package/dist/components/sula-textfield.d.ts +11 -0
  35. package/dist/components/sula-textfield.js +171 -0
  36. package/dist/components/sula-textfield.js.map +1 -0
  37. package/dist/esm/{index-9bf8f892.js → index-1dc4ae53.js} +102 -4
  38. package/dist/esm/index-1dc4ae53.js.map +1 -0
  39. package/dist/esm/loader.js +3 -3
  40. package/dist/esm/{sula-avatar_3.entry.js → sula-avatar_4.entry.js} +133 -6
  41. package/dist/esm/sula-avatar_4.entry.js.map +1 -0
  42. package/dist/esm/webcomponents.js +3 -3
  43. package/dist/types/components/sula-avatar/sula-avatar.stories.d.ts +0 -1
  44. package/dist/types/components/sula-button/sula-button.stories.d.ts +2 -0
  45. package/dist/types/components/sula-icon/sula-icon.stories.d.ts +5 -2
  46. package/dist/types/components/sula-textfield/model/sula-textfield.model.d.ts +8 -0
  47. package/dist/types/components/sula-textfield/sula-textfield.d.ts +74 -0
  48. package/dist/types/components/sula-textfield/sula-textfield.stories.d.ts +108 -0
  49. package/dist/types/components.d.ts +116 -0
  50. package/dist/webcomponents/{p-82d7a024.entry.js → p-77709b3c.entry.js} +201 -9
  51. package/dist/webcomponents/p-77709b3c.entry.js.map +1 -0
  52. package/dist/webcomponents/{p-cca32e44.js → p-fbee9d79.js} +426 -325
  53. package/dist/webcomponents/p-fbee9d79.js.map +1 -0
  54. package/dist/webcomponents/webcomponents.esm.js +27 -13
  55. package/dist/webcomponents/webcomponents.esm.js.map +1 -1
  56. package/package.json +20 -12
  57. package/dist/cjs/index-7973b779.js.map +0 -1
  58. package/dist/cjs/sula-avatar_3.cjs.entry.js.map +0 -1
  59. package/dist/components/p-d3ba6302.js.map +0 -1
  60. package/dist/esm/index-9bf8f892.js.map +0 -1
  61. package/dist/esm/sula-avatar_3.entry.js.map +0 -1
  62. package/dist/webcomponents/p-82d7a024.entry.js.map +0 -1
  63. package/dist/webcomponents/p-cca32e44.js.map +0 -1
@@ -1,5 +1,5 @@
1
- import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-d3ba6302.js';
2
- import { d as defineCustomElement$2 } from './p-81fcc74a.js';
1
+ import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-ca146b16.js';
2
+ import { d as defineCustomElement$2 } from './p-a07ff261.js';
3
3
 
4
4
  var SulaButtonAppearance;
5
5
  (function (SulaButtonAppearance) {
@@ -25,7 +25,7 @@ var SulaButtonType;
25
25
  SulaButtonType["Text"] = "text";
26
26
  })(SulaButtonType || (SulaButtonType = {}));
27
27
 
28
- const sulaButtonCss = "*,: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}.block{display:block}.outline{outline-style:solid}:host{--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-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;display:block}button:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--color-feedback-informational)!important;outline:none!important}: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-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}.flex{display:flex}.h-24{height:1.5rem}.h-\\[40px\\]{height:40px}.h-\\[56px\\]{height:56px}.w-24{width:1.5rem}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[40px\\]{min-width:40px}.min-w-\\[56px\\]{min-width:56px}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rounded-xs{border-radius:.5rem}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-none{border-style:none}.border-brand-primary{border-color:var(--color-brand-primary)}.border-feedback-error{border-color:var(--color-feedback-error)}.border-negative-negative-1{border-color:var(--color-negative-negative-1)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-feedback-error{background-color:var(--color-feedback-error)}.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-hover{background-color:var(--color-states-empty-bg-hover)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-16{padding:1rem}.p-8{padding:.5rem}.px-16{padding-left:1rem;padding-right:1rem}.py-4{padding-bottom:.25rem;padding-top:.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand-primary{color:var(--color-brand-primary)}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.text-negative-negative-1{color:var(--color-negative-negative-1)}.text-negative-negative-2{color:var(--color-negative-negative-2)}.text-text-disabled{color:var(--color-text-disabled)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-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)}.hover\\:bg-states-danger-hover:hover{background-color:var(--color-states-danger-hover)}.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)}.hover\\:bg-states-primary-hover:hover{background-color:var(--color-states-primary-hover)}.focus\\:bg-states-empty-bg-hover:focus{background-color:var(--color-states-empty-bg-hover)}.active\\:bg-states-danger-pressed:active{background-color:var(--color-states-danger-pressed)}.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)}.active\\:bg-states-primary-pressed:active{background-color:var(--color-states-primary-pressed)}.active\\:bg-opacity-85:active{--tw-bg-opacity:0.85}.group:hover .group-hover\\:bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}";
28
+ const sulaButtonCss = "*,: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}.block{display:block}.outline{outline-style:solid}:host{display:block}button:focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--color-feedback-informational)!important;outline:none!important}: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-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}.flex{display:flex}.h-24{height:1.5rem}.h-\\[40px\\]{height:40px}.h-\\[56px\\]{height:56px}.w-24{width:1.5rem}.min-w-\\[120px\\]{min-width:120px}.min-w-\\[40px\\]{min-width:40px}.min-w-\\[56px\\]{min-width:56px}.items-center{align-items:center}.justify-center{justify-content:center}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.rounded-xs{border-radius:.5rem}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-none{border-style:none}.border-brand-primary{border-color:var(--color-brand-primary)}.border-feedback-error{border-color:var(--color-feedback-error)}.border-negative-negative-1{border-color:var(--color-negative-negative-1)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-feedback-error{background-color:var(--color-feedback-error)}.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-hover{background-color:var(--color-states-empty-bg-hover)}.bg-transparent{background-color:transparent}.bg-white{--tw-bg-opacity:1;background-color:rgb(255 255 255/var(--tw-bg-opacity,1))}.p-16{padding:1rem}.p-8{padding:.5rem}.px-16{padding-left:1rem;padding-right:1rem}.py-4{padding-bottom:.25rem;padding-top:.25rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.font-bold{font-weight:700}.text-brand-primary{color:var(--color-brand-primary)}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.text-negative-negative-1{color:var(--color-negative-negative-1)}.text-negative-negative-2{color:var(--color-negative-negative-2)}.text-text-disabled{color:var(--color-text-disabled)}.text-white{--tw-text-opacity:1;color:rgb(255 255 255/var(--tw-text-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)}.hover\\:bg-states-danger-hover:hover{background-color:var(--color-states-danger-hover)}.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)}.hover\\:bg-states-primary-hover:hover{background-color:var(--color-states-primary-hover)}.focus\\:bg-states-empty-bg-hover:focus{background-color:var(--color-states-empty-bg-hover)}.active\\:bg-states-danger-pressed:active{background-color:var(--color-states-danger-pressed)}.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)}.active\\:bg-states-primary-pressed:active{background-color:var(--color-states-primary-pressed)}.active\\:bg-opacity-85:active{--tw-bg-opacity:0.85}.group:hover .group-hover\\:bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}";
29
29
  const SulaButtonStyle0 = sulaButtonCss;
30
30
 
31
31
  const SulaButton$1 = /*@__PURE__*/ proxyCustomElement(class SulaButton extends H {
@@ -1 +1 @@
1
- {"file":"sula-button.js","mappings":";;;AAAA,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,+CAAuB,CAAA;IACvB,qCAAa,CAAA;AACf,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,6BAAW,CAAA;AACb,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAA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E;YACjD,QACE,WAAK,KAAK,EAAE,IAAI,CAAC,qBAAqB,EAAE,IACtC,iBAAW,IAAI,EAAC,wBAAwB,EAAC,WAAW,EAAC,SAAS,GAAa,CACvE,EACN;SACH;QACD,OAAO,IAAI,CAAC;KACb;IAQD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,+DAAQ,EAAE,EAAC,kBAAkB,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,IACrH,IAAI,CAAC,iBAAiB,EAAE,EACxB,IAAI,CAAC,iBAAiB,EAAE,EACxB,IAAI,CAAC,eAAe,EAAE,CAChB,CACJ,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaButton"],"sources":["src/components/sula-button/model/sula-button.model.ts","src/components/sula-button/sula-button.scss?tag=sula-button&encapsulation=shadow","src/components/sula-button/sula-button.tsx"],"sourcesContent":["export enum SulaButtonAppearance {\n Default = 'default',\n Secondary = 'secondary',\n Text = 'text',\n}\n\nexport enum SulaButtonSize {\n Large = 'large',\n Default = 'default',\n Cta = 'cta',\n}\n\nexport enum SulaButtonStatus {\n Primary = 'primary',\n Danger = 'danger',\n Negative = 'negative',\n}\n\nexport enum SulaButtonType {\n Icon = 'icon',\n Text = 'text',\n}\n",":host {\n display: block;\n}\n\nbutton {\n &:focus {\n outline: none !important;\n box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-feedback-informational) !important;\n }\n}\n","import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core';\nimport { SulaButtonAppearance, SulaButtonSize, SulaButtonStatus, SulaButtonType } from './model/sula-button.model';\n\n@Component({\n tag: 'sula-button',\n styleUrl: 'sula-button.scss',\n shadow: true,\n})\nexport class SulaButton {\n /**\n * Button text when is text type\n */\n @Prop({ mutable: true }) text: string;\n\n /**\n * Button icon when is Icon type\n */\n @Prop({ mutable: true }) icon: string;\n\n /**\n * Button appearance\n */\n @Prop({ mutable: true }) appearance: SulaButtonAppearance = SulaButtonAppearance.Default;\n\n /**\n * Button type\n */\n @Prop({ mutable: true }) type: SulaButtonType = SulaButtonType.Text;\n\n /**\n * Button size\n */\n @Prop({ mutable: true }) size: SulaButtonSize = SulaButtonSize.Default;\n\n /**\n * Button status\n */\n @Prop({ mutable: true }) status: SulaButtonStatus = SulaButtonStatus.Primary;\n\n /**\n * Is button loading\n */\n @Prop({ mutable: true }) loading: boolean = false;\n\n /**\n * Is button disabled\n */\n @Prop({ mutable: true }) buttonDisabled: boolean = false;\n\n /**\n * Event emitted when button is clicked.\n * @note If button is disabled event won't be emitted\n */\n @Event()\n buttonClicked: EventEmitter<void>;\n\n private getAppearanceClass() {\n const appearanceStyles = {\n [SulaButtonAppearance.Default]: this.getDefaultButtonStyles(),\n [SulaButtonAppearance.Secondary]: `border ${this.getSecondaryButtonStyles()}`,\n [SulaButtonAppearance.Text]: `flex items-center space-x-8 ${this.getTextButtonStyles()}`,\n };\n\n return appearanceStyles[this.appearance];\n }\n\n private getButtonDisabledClass() {\n return this.appearance === SulaButtonAppearance.Text ? 'text-text-disabled' : 'bg-states-bg-disabled text-text-disabled border-none';\n }\n\n private getDefaultButtonStyles() {\n if (this.buttonDisabled) {\n return this.getButtonDisabledClass();\n }\n\n const statusStyles = {\n [SulaButtonStatus.Primary]: 'bg-brand-primary text-white hover:bg-states-primary-hover active:bg-states-primary-pressed',\n [SulaButtonStatus.Danger]: 'bg-feedback-error text-white hover:bg-states-danger-hover active:bg-opacity-85 active:bg-states-danger-pressed',\n [SulaButtonStatus.Negative]: 'bg-negative-negative-1 text-negative-negative-2 hover:bg-states-negative-hover active:bg-states-negative-pressed',\n };\n\n return statusStyles[this.status];\n }\n\n private getSecondaryButtonStyles() {\n if (this.buttonDisabled) {\n return this.getButtonDisabledClass();\n }\n\n const statusStyles = {\n [SulaButtonStatus.Primary]: 'border-brand-primary text-brand-primary hover:bg-states-empty-bg-hover bg-white active:bg-states-empty-bg-pressed',\n [SulaButtonStatus.Danger]: 'border-feedback-error text-feedback-error hover:bg-states-empty-bg-hover bg-white active:bg-states-empty-bg-pressed',\n [SulaButtonStatus.Negative]: 'border-negative-negative-1 text-negative-negative-1 bg-transparent hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed',\n };\n\n return statusStyles[this.status];\n }\n\n private getTextButtonStyles() {\n if (this.buttonDisabled) {\n return this.getButtonDisabledClass();\n }\n\n const statusStyles = {\n [SulaButtonStatus.Primary]: 'text-brand-primary',\n [SulaButtonStatus.Danger]: 'text-feedback-error',\n [SulaButtonStatus.Negative]: 'text-negative-negative-1',\n };\n\n return statusStyles[this.status];\n }\n\n private getTextTypeSizeClass() {\n const sizeClasses = {\n [SulaButtonSize.Default]: 'py-4 h-[40px]',\n [SulaButtonSize.Large]: 'py-4 h-[56px]',\n };\n\n return sizeClasses[this.size];\n }\n\n private getButtonSizeByTypeClass() {\n if (this.type === SulaButtonType.Text) {\n return this.appearance === SulaButtonAppearance.Text\n ? { [this.getTextTypeSizeClass()]: true }\n : {\n ['px-16 py-4 min-w-[120px] h-[40px]']: this.size === SulaButtonSize.Default,\n ['px-16 py-4 min-w-[120px] h-[56px]']: this.size === SulaButtonSize.Large,\n };\n }\n\n return {\n 'flex justify-center items-center': true,\n ['p-8 h-[40px] min-w-[40px]']: this.size === SulaButtonSize.Default,\n ['p-16 py-4 min-w-[56px] h-[56px]']: this.size === SulaButtonSize.Large,\n };\n }\n\n private getIconContainerClass() {\n return {\n 'flex items-center justify-center w-24 h-24 rounded-xxl': true,\n 'text-icon-primary group-hover:bg-states-empty-bg-hover': !this.buttonDisabled,\n 'text-icon-disabled': this.buttonDisabled,\n };\n }\n\n private getBaseButtonClass() {\n return {\n [this.getAppearanceClass()]: true,\n ...this.getButtonSizeByTypeClass(),\n 'rounded-xxl': this.appearance !== SulaButtonAppearance.Text,\n 'rounded-xs focus:bg-states-empty-bg-hover': this.appearance === SulaButtonAppearance.Text,\n 'font-bold text-base group': true,\n 'disabled': this.buttonDisabled,\n };\n }\n\n private renderIconContent() {\n if (this.type === SulaButtonType.Icon) {\n return <sula-icon id=\"button-icon\" icon={this.icon}></sula-icon>;\n }\n return null;\n }\n\n private renderTextContent() {\n if (this.text && this.type === SulaButtonType.Text) {\n return <div id=\"button-text\">{this.text}</div>;\n }\n return null;\n }\n\n private renderArrowIcon() {\n if (this.appearance === SulaButtonAppearance.Text) {\n return (\n <div class={this.getIconContainerClass()}>\n <sula-icon icon=\"ph-bold ph-caret-right\" customClass=\"text-lg\"></sula-icon>\n </div>\n );\n }\n return null;\n }\n\n handleClick = () => {\n if (!this.buttonDisabled) {\n this.buttonClicked.emit();\n }\n };\n\n render() {\n return (\n <Host>\n <button id=\"button-container\" class={this.getBaseButtonClass()} disabled={this.buttonDisabled} onClick={this.handleClick}>\n {this.renderIconContent()}\n {this.renderTextContent()}\n {this.renderArrowIcon()}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"sula-button.js","mappings":";;;AAAA,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC9B,2CAAmB,CAAA;IACnB,+CAAuB,CAAA;IACvB,qCAAa,CAAA;AACf,CAAC,EAJW,oBAAoB,KAApB,oBAAoB,QAI/B;AAED,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,iCAAe,CAAA;IACf,qCAAmB,CAAA;IACnB,6BAAW,CAAA;AACb,CAAC,EAJW,cAAc,KAAd,cAAc,QAIzB;AAED,IAAY,gBAIX;AAJD,WAAY,gBAAgB;IAC1B,uCAAmB,CAAA;IACnB,qCAAiB,CAAA;IACjB,yCAAqB,CAAA;AACvB,CAAC,EAJW,gBAAgB,KAAhB,gBAAgB,QAI3B;AAED,IAAY,cAGX;AAHD,WAAY,cAAc;IACxB,+BAAa,CAAA;IACb,+BAAa,CAAA;AACf,CAAC,EAHW,cAAc,KAAd,cAAc;;AClB1B,MAAM,aAAa,GAAG,g2WAAg2W,CAAC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C,wBAAwB,EAAC,WAAW,EAAC,SAAS,GAAa,CACvE,EACN;SACH;QACD,OAAO,IAAI,CAAC;KACb;IAQD,MAAM;QACJ,QACE,EAAC,IAAI,uDACH,+DAAQ,EAAE,EAAC,kBAAkB,EAAC,KAAK,EAAE,IAAI,CAAC,kBAAkB,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,cAAc,EAAE,OAAO,EAAE,IAAI,CAAC,WAAW,IACrH,IAAI,CAAC,iBAAiB,EAAE,EACxB,IAAI,CAAC,iBAAiB,EAAE,EACxB,IAAI,CAAC,eAAe,EAAE,CAChB,CACJ,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaButton"],"sources":["src/components/sula-button/model/sula-button.model.ts","src/components/sula-button/sula-button.scss?tag=sula-button&encapsulation=shadow","src/components/sula-button/sula-button.tsx"],"sourcesContent":["export enum SulaButtonAppearance {\n Default = 'default',\n Secondary = 'secondary',\n Text = 'text',\n}\n\nexport enum SulaButtonSize {\n Large = 'large',\n Default = 'default',\n Cta = 'cta',\n}\n\nexport enum SulaButtonStatus {\n Primary = 'primary',\n Danger = 'danger',\n Negative = 'negative',\n}\n\nexport enum SulaButtonType {\n Icon = 'icon',\n Text = 'text',\n}\n",":host {\n display: block;\n}\n\nbutton {\n &:focus {\n outline: none !important;\n box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-feedback-informational) !important;\n }\n}\n","import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core';\nimport { SulaButtonAppearance, SulaButtonSize, SulaButtonStatus, SulaButtonType } from './model/sula-button.model';\n\n@Component({\n tag: 'sula-button',\n styleUrl: 'sula-button.scss',\n shadow: true,\n})\nexport class SulaButton {\n /**\n * Button text when is text type\n */\n @Prop({ mutable: true }) text: string;\n\n /**\n * Button icon when is Icon type\n */\n @Prop({ mutable: true }) icon: string;\n\n /**\n * Button appearance\n */\n @Prop({ mutable: true }) appearance: SulaButtonAppearance = SulaButtonAppearance.Default;\n\n /**\n * Button type\n */\n @Prop({ mutable: true }) type: SulaButtonType = SulaButtonType.Text;\n\n /**\n * Button size\n */\n @Prop({ mutable: true }) size: SulaButtonSize = SulaButtonSize.Default;\n\n /**\n * Button status\n */\n @Prop({ mutable: true }) status: SulaButtonStatus = SulaButtonStatus.Primary;\n\n /**\n * Is button loading\n */\n @Prop({ mutable: true }) loading: boolean = false;\n\n /**\n * Is button disabled\n */\n @Prop({ mutable: true }) buttonDisabled: boolean = false;\n\n /**\n * Event emitted when button is clicked.\n * @note If button is disabled event won't be emitted\n */\n @Event()\n buttonClicked: EventEmitter<void>;\n\n private getAppearanceClass() {\n const appearanceStyles = {\n [SulaButtonAppearance.Default]: this.getDefaultButtonStyles(),\n [SulaButtonAppearance.Secondary]: `border ${this.getSecondaryButtonStyles()}`,\n [SulaButtonAppearance.Text]: `flex items-center space-x-8 ${this.getTextButtonStyles()}`,\n };\n\n return appearanceStyles[this.appearance];\n }\n\n private getButtonDisabledClass() {\n return this.appearance === SulaButtonAppearance.Text ? 'text-text-disabled' : 'bg-states-bg-disabled text-text-disabled border-none';\n }\n\n private getDefaultButtonStyles() {\n if (this.buttonDisabled) {\n return this.getButtonDisabledClass();\n }\n\n const statusStyles = {\n [SulaButtonStatus.Primary]: 'bg-brand-primary text-white hover:bg-states-primary-hover active:bg-states-primary-pressed',\n [SulaButtonStatus.Danger]: 'bg-feedback-error text-white hover:bg-states-danger-hover active:bg-opacity-85 active:bg-states-danger-pressed',\n [SulaButtonStatus.Negative]: 'bg-negative-negative-1 text-negative-negative-2 hover:bg-states-negative-hover active:bg-states-negative-pressed',\n };\n\n return statusStyles[this.status];\n }\n\n private getSecondaryButtonStyles() {\n if (this.buttonDisabled) {\n return this.getButtonDisabledClass();\n }\n\n const statusStyles = {\n [SulaButtonStatus.Primary]: 'border-brand-primary text-brand-primary hover:bg-states-empty-bg-hover bg-white active:bg-states-empty-bg-pressed',\n [SulaButtonStatus.Danger]: 'border-feedback-error text-feedback-error hover:bg-states-empty-bg-hover bg-white active:bg-states-empty-bg-pressed',\n [SulaButtonStatus.Negative]: 'border-negative-negative-1 text-negative-negative-1 bg-transparent hover:bg-states-empty-bg-hover active:bg-states-empty-bg-pressed',\n };\n\n return statusStyles[this.status];\n }\n\n private getTextButtonStyles() {\n if (this.buttonDisabled) {\n return this.getButtonDisabledClass();\n }\n\n const statusStyles = {\n [SulaButtonStatus.Primary]: 'text-brand-primary',\n [SulaButtonStatus.Danger]: 'text-feedback-error',\n [SulaButtonStatus.Negative]: 'text-negative-negative-1',\n };\n\n return statusStyles[this.status];\n }\n\n private getTextTypeSizeClass() {\n const sizeClasses = {\n [SulaButtonSize.Default]: 'py-4 h-[40px]',\n [SulaButtonSize.Large]: 'py-4 h-[56px]',\n };\n\n return sizeClasses[this.size];\n }\n\n private getButtonSizeByTypeClass() {\n if (this.type === SulaButtonType.Text) {\n return this.appearance === SulaButtonAppearance.Text\n ? { [this.getTextTypeSizeClass()]: true }\n : {\n ['px-16 py-4 min-w-[120px] h-[40px]']: this.size === SulaButtonSize.Default,\n ['px-16 py-4 min-w-[120px] h-[56px]']: this.size === SulaButtonSize.Large,\n };\n }\n\n return {\n 'flex justify-center items-center': true,\n ['p-8 h-[40px] min-w-[40px]']: this.size === SulaButtonSize.Default,\n ['p-16 py-4 min-w-[56px] h-[56px]']: this.size === SulaButtonSize.Large,\n };\n }\n\n private getIconContainerClass() {\n return {\n 'flex items-center justify-center w-24 h-24 rounded-xxl': true,\n 'text-icon-primary group-hover:bg-states-empty-bg-hover': !this.buttonDisabled,\n 'text-icon-disabled': this.buttonDisabled,\n };\n }\n\n private getBaseButtonClass() {\n return {\n [this.getAppearanceClass()]: true,\n ...this.getButtonSizeByTypeClass(),\n 'rounded-xxl': this.appearance !== SulaButtonAppearance.Text,\n 'rounded-xs focus:bg-states-empty-bg-hover': this.appearance === SulaButtonAppearance.Text,\n 'font-bold text-base group': true,\n 'disabled': this.buttonDisabled,\n };\n }\n\n private renderIconContent() {\n if (this.type === SulaButtonType.Icon) {\n return <sula-icon id=\"button-icon\" icon={this.icon}></sula-icon>;\n }\n return null;\n }\n\n private renderTextContent() {\n if (this.text && this.type === SulaButtonType.Text) {\n return <div id=\"button-text\">{this.text}</div>;\n }\n return null;\n }\n\n private renderArrowIcon() {\n if (this.appearance === SulaButtonAppearance.Text) {\n return (\n <div class={this.getIconContainerClass()}>\n <sula-icon icon=\"ph-bold ph-caret-right\" customClass=\"text-lg\"></sula-icon>\n </div>\n );\n }\n return null;\n }\n\n handleClick = () => {\n if (!this.buttonDisabled) {\n this.buttonClicked.emit();\n }\n };\n\n render() {\n return (\n <Host>\n <button id=\"button-container\" class={this.getBaseButtonClass()} disabled={this.buttonDisabled} onClick={this.handleClick}>\n {this.renderIconContent()}\n {this.renderTextContent()}\n {this.renderArrowIcon()}\n </button>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,4 +1,4 @@
1
- import { S as SulaIcon$1, d as defineCustomElement$1 } from './p-81fcc74a.js';
1
+ import { S as SulaIcon$1, d as defineCustomElement$1 } from './p-a07ff261.js';
2
2
 
3
3
  const SulaIcon = SulaIcon$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SulaTextfield extends Components.SulaTextfield, HTMLElement {}
4
+ export const SulaTextfield: {
5
+ prototype: SulaTextfield;
6
+ new (): SulaTextfield;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,171 @@
1
+ import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-ca146b16.js';
2
+ import { d as defineCustomElement$2 } from './p-a07ff261.js';
3
+
4
+ var SulaTextfieldType;
5
+ (function (SulaTextfieldType) {
6
+ SulaTextfieldType["Text"] = "text";
7
+ SulaTextfieldType["Password"] = "password";
8
+ })(SulaTextfieldType || (SulaTextfieldType = {}));
9
+ var SulaTextfieldStatus;
10
+ (function (SulaTextfieldStatus) {
11
+ SulaTextfieldStatus["Default"] = "default";
12
+ SulaTextfieldStatus["Error"] = "error";
13
+ })(SulaTextfieldStatus || (SulaTextfieldStatus = {}));
14
+
15
+ const sulaTextfieldCss = "*,: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}.block{display:block}.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}:host{display:block}.button-focus{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--color-feedback-informational)!important;outline:none!important}.button-error{box-shadow:0 0 0 2px #fff,0 0 0 4px var(--color-feedback-error)!important}.from-down{animation:from-down .2s ease-in-out}.from-up{animation:from-up .2s ease-in-out}@keyframes from-down{0%{opacity:0;transform:translateY(75%)}to{opacity:1;transform:translateY(0)}}@keyframes from-up{0%{opacity:0;transform:translateY(-75%)}to{opacity:1;transform:translateY(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-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}.mt-4{margin-top:.25rem}.flex{display:flex}.hidden{display:none}.h-\\[72px\\]{height:72px}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.rounded-sm{border-radius:.75rem}.border{border-width:1px}.border-line-general{border-color:var(--color-line-general)}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-surface-body{background-color:var(--color-surface-body)}.px-16{padding-left:1rem;padding-right:1rem}.pr-12{padding-right:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.caret-brand-primary{caret-color:var(--color-brand-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}";
16
+ const SulaTextfieldStyle0 = sulaTextfieldCss;
17
+
18
+ const SulaTextfield$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextfield extends H {
19
+ constructor() {
20
+ super();
21
+ this.__registerHost();
22
+ this.__attachShadow();
23
+ this.valueChanged = createEvent(this, "valueChanged", 7);
24
+ this.focusedOn = createEvent(this, "focusedOn", 7);
25
+ this.focusedOut = createEvent(this, "focusedOut", 7);
26
+ /**
27
+ * The textfield type
28
+ */
29
+ this.type = SulaTextfieldType.Text;
30
+ /**
31
+ * The textfield status
32
+ */
33
+ this.status = SulaTextfieldStatus.Default;
34
+ this.inputIsOpen = false;
35
+ this.textValue = '';
36
+ this.showPassword = false;
37
+ this.inputIsFocused = false;
38
+ this.handleInputClick = () => {
39
+ this.toggleOptions(true);
40
+ };
41
+ this.handleInputChanges = (event) => {
42
+ const newValue = event.target.value;
43
+ this.textValue = newValue;
44
+ this.valueChanged.emit(newValue);
45
+ };
46
+ this.handleFocus = () => {
47
+ if (this.disabled)
48
+ return;
49
+ this.toggleOptions(true);
50
+ this.inputElement.focus();
51
+ };
52
+ this.handleBlur = () => {
53
+ this.toggleOptions(false);
54
+ this.focusedOut.emit();
55
+ this.inputIsFocused = false;
56
+ };
57
+ this.handleInputFocus = () => {
58
+ this.focusedOn.emit();
59
+ this.inputIsFocused = true;
60
+ };
61
+ this.handleIconClick = (event) => {
62
+ if (this.type === SulaTextfieldType.Password) {
63
+ event.stopPropagation();
64
+ this.handlePasswordIconClicked();
65
+ }
66
+ };
67
+ }
68
+ handleClick(event) {
69
+ if (!this.node)
70
+ return;
71
+ const clickInside = this.node.contains(event.target);
72
+ if (!clickInside) {
73
+ this.toggleOptions(false);
74
+ this.focusedOut.emit();
75
+ this.inputIsFocused = false;
76
+ }
77
+ }
78
+ componentWillLoad() {
79
+ if (this.value && this.value.trim().length > 0) {
80
+ this.textValue = this.value;
81
+ this.inputIsOpen = true;
82
+ }
83
+ }
84
+ componentDidLoad() {
85
+ if (this.textValue && this.textValue.trim().length > 0) {
86
+ this.changeElementsStyle();
87
+ }
88
+ }
89
+ toggleOptions(inputIsOpen) {
90
+ if ((this.inputIsOpen && this.textValue && this.textValue.length > 0) || this.disabled)
91
+ return;
92
+ this.inputIsOpen = inputIsOpen;
93
+ this.changeElementsStyle();
94
+ this.inputElement.focus();
95
+ }
96
+ changeElementsStyle() {
97
+ this.inputContainer.style.display = this.inputIsOpen ? 'flex' : 'none';
98
+ this.labelElement.style.display = this.inputIsOpen ? 'none' : 'block';
99
+ if (!this.inputIsOpen) {
100
+ this.labelElement.classList.add('from-up');
101
+ }
102
+ }
103
+ handlePasswordIconClicked() {
104
+ const cursorPosition = this.inputElement.selectionStart;
105
+ const inputValue = this.inputElement.value;
106
+ const inputType = this.showPassword ? SulaTextfieldType.Password : SulaTextfieldType.Text;
107
+ this.inputElement.setAttribute('type', inputType);
108
+ this.showPassword = !this.showPassword;
109
+ setTimeout(() => {
110
+ this.inputElement.value = inputValue;
111
+ this.inputElement.setSelectionRange(cursorPosition, cursorPosition);
112
+ }, 0);
113
+ }
114
+ getInputIcon() {
115
+ if (this.type === SulaTextfieldType.Password) {
116
+ return this.showPassword ? 'ph ph-eye' : 'ph ph-eye-slash';
117
+ }
118
+ return this.icon;
119
+ }
120
+ render() {
121
+ return (h(Host, { key: 'a8bac04c291ef9f7f894b8ee191fb47f223023ce', ref: node => (this.node = node) }, h("div", { key: '5ec9505052d5fee9d54459dea2c1281842bbf61a' }, h("div", { key: '3d8e4377e67e755815446f58bad127fcad4575d4', id: "button-container", class: {
122
+ 'flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary': true,
123
+ 'flex-row justify-between': !!this.icon || this.type === SulaTextfieldType.Password,
124
+ 'button-focus': this.inputIsFocused && !this.disabled && this.status === SulaTextfieldStatus.Default,
125
+ 'button-error': this.status === SulaTextfieldStatus.Error && !this.disabled,
126
+ 'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
127
+ 'bg-surface-body border-line-input cursor-pointer': !this.disabled,
128
+ }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '67286a579ce0cece357d02673c4ac695c56fe23d', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: 'f2915de1058c93d3937726dcef145cb9e217aed2', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: '09f663b3cc2c3dbd58cda35cb949fcd708c87111', type: this.type, ref: node => (this.inputElement = node), placeholder: this.placeholder, class: "outline-none text-base text-text-primary", onInput: this.handleInputChanges, onFocus: this.handleInputFocus, value: this.value }))), h("div", { key: '68615e768117e4f3d0eb09d9a8f56878e61377e0', 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: 'cfe8edb41b2163e391ec9c6615c77afc69fc35a4', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: '2676c22599c2df06eb8cc4bb1fa425e702166e11', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '77956a01dd5670649edbb65ada3e08831b6347dc', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: '7e2ac49e3a1e8cf596313d34f084ac2b2b209797', 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: '322b4c132531b57c7e503464d4bb6115311201b2', 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)))))));
129
+ }
130
+ static get style() { return SulaTextfieldStyle0; }
131
+ }, [1, "sula-textfield", {
132
+ "value": [1025],
133
+ "type": [1],
134
+ "status": [1025],
135
+ "label": [1],
136
+ "placeholder": [1],
137
+ "disabled": [1028],
138
+ "helpText": [1, "help-text"],
139
+ "maxLength": [2, "max-length"],
140
+ "icon": [1],
141
+ "inputIsOpen": [32],
142
+ "textValue": [32],
143
+ "showPassword": [32],
144
+ "inputIsFocused": [32]
145
+ }, [[4, "click", "handleClick"]]]);
146
+ function defineCustomElement$1() {
147
+ if (typeof customElements === "undefined") {
148
+ return;
149
+ }
150
+ const components = ["sula-textfield", "sula-icon"];
151
+ components.forEach(tagName => { switch (tagName) {
152
+ case "sula-textfield":
153
+ if (!customElements.get(tagName)) {
154
+ customElements.define(tagName, SulaTextfield$1);
155
+ }
156
+ break;
157
+ case "sula-icon":
158
+ if (!customElements.get(tagName)) {
159
+ defineCustomElement$2();
160
+ }
161
+ break;
162
+ } });
163
+ }
164
+ defineCustomElement$1();
165
+
166
+ const SulaTextfield = SulaTextfield$1;
167
+ const defineCustomElement = defineCustomElement$1;
168
+
169
+ export { SulaTextfield, defineCustomElement };
170
+
171
+ //# sourceMappingURL=sula-textfield.js.map
@@ -0,0 +1 @@
1
+ {"file":"sula-textfield.js","mappings":";;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M,GAAG,CAAC,OAAG,IAAI,CAAC,SAAS,CACxD,CACP,CACG,CACP,CACG,CACD,EACP;KACH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaTextfield"],"sources":["src/components/sula-textfield/model/sula-textfield.model.ts","src/components/sula-textfield/sula-textfield.scss?tag=sula-textfield&encapsulation=shadow","src/components/sula-textfield/sula-textfield.tsx"],"sourcesContent":["export enum SulaTextfieldType {\n Text = 'text',\n Password = 'password',\n}\n\nexport enum SulaTextfieldStatus {\n Default = 'default',\n Error = 'error',\n}\n",":host {\n display: block;\n}\n\n.button-focus {\n outline: none !important;\n box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-feedback-informational) !important;\n}\n\n.button-error {\n box-shadow: 0 0 0 2px white, 0 0 0 4px var(--color-feedback-error) !important;\n}\n\n.from-down {\n animation: from-down 0.2s ease-in-out;\n}\n\n.from-up {\n animation: from-up 0.2s ease-in-out;\n}\n\n@keyframes from-down {\n from {\n transform: translateY(75%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n\n@keyframes from-up {\n from {\n transform: translateY(-75%);\n opacity: 0;\n }\n to {\n transform: translateY(0);\n opacity: 1;\n }\n}\n","import { Component, Event, EventEmitter, Host, Listen, Prop, State, h } from '@stencil/core';\nimport { SulaTextfieldStatus, SulaTextfieldType } from './model/sula-textfield.model';\n\n@Component({\n tag: 'sula-textfield',\n styleUrl: 'sula-textfield.scss',\n shadow: true,\n})\nexport class SulaTextfield {\n /**\n * Value for the input.\n */\n @Prop({ mutable: true })\n value?: string;\n\n /**\n * The textfield type\n */\n @Prop() type: SulaTextfieldType = SulaTextfieldType.Text;\n\n /**\n * The textfield status\n */\n @Prop({ mutable: true }) status: SulaTextfieldStatus = SulaTextfieldStatus.Default;\n\n /**\n * The textfield label\n */\n @Prop() label: string;\n\n /**\n * The textfield placeholder\n */\n @Prop() placeholder: string;\n\n /**\n * The textfield is disabled\n */\n @Prop({ mutable: true }) disabled: boolean;\n\n /**\n * The help text for textfield\n */\n @Prop() helpText?: string;\n\n /**\n * The textfield max length\n */\n @Prop() maxLength?: number;\n\n /**\n * The textfield icon\n */\n @Prop() icon?: string;\n\n /**\n * Event emitted when input value changes.\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when input is focused.\n */\n @Event()\n focusedOn: EventEmitter<void>;\n\n /**\n * Event emitted when input is focused out.\n */\n @Event()\n focusedOut: EventEmitter<void>;\n\n @State()\n inputIsOpen = false;\n\n @State()\n textValue: string = '';\n\n @State()\n showPassword = false;\n\n @State()\n inputIsFocused = false;\n\n inputContainer: HTMLDivElement;\n inputElement: HTMLInputElement;\n labelElement: HTMLDivElement;\n\n node?: HTMLElement;\n\n @Listen('click', { target: 'document' })\n handleClick(event: Event) {\n if (!this.node) return;\n\n const clickInside = this.node.contains(event.target as Node);\n\n if (!clickInside) {\n this.toggleOptions(false);\n this.focusedOut.emit();\n this.inputIsFocused = false;\n }\n }\n\n componentWillLoad() {\n if (this.value && this.value.trim().length > 0) {\n this.textValue = this.value;\n this.inputIsOpen = true;\n }\n }\n\n componentDidLoad() {\n if (this.textValue && this.textValue.trim().length > 0) {\n this.changeElementsStyle();\n }\n }\n\n handleInputClick = () => {\n this.toggleOptions(true);\n };\n\n toggleOptions(inputIsOpen: boolean) {\n if ((this.inputIsOpen && this.textValue && this.textValue.length > 0) || this.disabled) return;\n\n this.inputIsOpen = inputIsOpen;\n this.changeElementsStyle();\n this.inputElement.focus();\n }\n\n changeElementsStyle() {\n this.inputContainer.style.display = this.inputIsOpen ? 'flex' : 'none';\n this.labelElement.style.display = this.inputIsOpen ? 'none' : 'block';\n if (!this.inputIsOpen) {\n this.labelElement.classList.add('from-up');\n }\n }\n\n handleInputChanges = (event: InputEvent) => {\n const newValue = (event.target as HTMLInputElement).value;\n this.textValue = newValue;\n\n this.valueChanged.emit(newValue);\n };\n\n handleFocus = () => {\n if (this.disabled) return;\n this.toggleOptions(true);\n this.inputElement.focus();\n };\n\n handleBlur = () => {\n this.toggleOptions(false);\n\n this.focusedOut.emit();\n this.inputIsFocused = false;\n };\n\n handleInputFocus = () => {\n this.focusedOn.emit();\n this.inputIsFocused = true;\n };\n\n handleIconClick = (event: MouseEvent) => {\n if (this.type === SulaTextfieldType.Password) {\n event.stopPropagation();\n this.handlePasswordIconClicked();\n }\n };\n\n handlePasswordIconClicked() {\n const cursorPosition = this.inputElement.selectionStart;\n const inputValue = this.inputElement.value;\n const inputType = this.showPassword ? SulaTextfieldType.Password : SulaTextfieldType.Text;\n\n this.inputElement.setAttribute('type', inputType);\n this.showPassword = !this.showPassword;\n\n setTimeout(() => {\n this.inputElement.value = inputValue;\n\n this.inputElement.setSelectionRange(cursorPosition, cursorPosition);\n }, 0);\n }\n\n getInputIcon() {\n if (this.type === SulaTextfieldType.Password) {\n return this.showPassword ? 'ph ph-eye' : 'ph ph-eye-slash';\n }\n\n return this.icon;\n }\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div>\n <div\n id=\"button-container\"\n class={{\n 'flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary': true,\n 'flex-row justify-between': !!this.icon || this.type === SulaTextfieldType.Password,\n 'button-focus': this.inputIsFocused && !this.disabled && this.status === SulaTextfieldStatus.Default,\n 'button-error': this.status === SulaTextfieldStatus.Error && !this.disabled,\n 'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,\n 'bg-surface-body border-line-input cursor-pointer': !this.disabled,\n }}\n tabIndex={0}\n onFocus={this.handleFocus}\n onClick={this.handleInputClick}\n >\n {!this.disabled && (\n <div class={{ 'hidden flex-col w-full': true, 'pr-12': !!this.icon }} ref={node => (this.inputContainer = node)}>\n <label class=\"font-bold text-sm text-text-primary from-down\">{this.label}</label>\n <input\n type={this.type}\n ref={node => (this.inputElement = node)}\n placeholder={this.placeholder}\n class=\"outline-none text-base text-text-primary\"\n onInput={this.handleInputChanges}\n onFocus={this.handleInputFocus}\n value={this.value}\n />\n </div>\n )}\n\n <div\n id=\"textfield-label\"\n class={{ 'text-base flex items-center': true, 'text-text-primary': !this.disabled, 'text-text-disabled': this.disabled }}\n ref={node => (this.labelElement = node)}\n >\n {this.label}\n </div>\n\n {(!!this.icon || this.type === SulaTextfieldType.Password) && (\n <div class=\"flex items-center justify-center\" onClick={this.handleIconClick}>\n <sula-icon icon={this.getInputIcon()} customClass={`text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}`} />\n </div>\n )}\n </div>\n\n {(this.helpText || this.maxLength) && !this.disabled && (\n <div class=\"flex justify-between items-center px-16 mt-4 text-sm\">\n {this.helpText && (\n <div id=\"textfield-help-text\" class={{ 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error }}>\n {this.helpText}\n </div>\n )}\n {this.maxLength && (\n <div\n id=\"max-length-container\"\n class={{ 'text-text-primary': this.status === SulaTextfieldStatus.Default, 'text-feedback-error': this.status === SulaTextfieldStatus.Error }}\n >\n {this.textValue ? this.textValue.length : 0}/{this.maxLength}\n </div>\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'webcomponents';
2
- const BUILD = /* webcomponents */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: false, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: false, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: false, hostListenerTarget: false, hostListenerTargetBody: false, hostListenerTargetDocument: false, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: true, isDev: false, isTesting: false, lazyLoad: true, lifecycle: false, lifecycleDOMEvents: true, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: false, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: false, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: false, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
2
+ const BUILD = /* webcomponents */ { allRenderFn: true, appendChildSlotFix: false, asyncLoading: true, asyncQueue: false, attachStyles: true, cloneNodeFix: false, cmpDidLoad: true, cmpDidRender: false, cmpDidUnload: false, cmpDidUpdate: false, cmpShouldUpdate: false, cmpWillLoad: true, cmpWillRender: false, cmpWillUpdate: false, connectedCallback: false, constructableCSS: true, cssAnnotations: true, devTools: false, disconnectedCallback: false, element: false, event: true, experimentalScopedSlotChanges: false, experimentalSlotFixes: false, formAssociated: false, hasRenderFn: true, hostListener: true, hostListenerTarget: true, hostListenerTargetBody: false, hostListenerTargetDocument: true, hostListenerTargetParent: false, hostListenerTargetWindow: false, hotModuleReplacement: false, hydrateClientSide: false, hydrateServerSide: false, hydratedAttribute: false, hydratedClass: true, hydratedSelectorName: "hydrated", initializeNextTick: false, invisiblePrehydration: true, isDebug: true, isDev: false, isTesting: false, lazyLoad: true, lifecycle: true, lifecycleDOMEvents: true, member: true, method: false, mode: false, modernPropertyDecls: false, observeAttribute: true, profile: false, prop: true, propBoolean: true, propMutable: true, propNumber: true, propString: true, reflect: false, scoped: false, scopedSlotTextContentFix: false, scriptDataOpts: false, shadowDelegatesFocus: false, shadowDom: true, slot: false, slotChildNodesFix: false, slotRelocation: false, state: true, style: true, svg: false, taskQueue: true, transformTagName: false, updatable: true, vdomAttribute: true, vdomClass: true, vdomFunctional: false, vdomKey: true, vdomListener: true, vdomPropOrAttr: true, vdomRef: true, vdomRender: true, vdomStyle: false, vdomText: true, vdomXlink: false, watchCallback: false };
3
3
 
4
4
  /*
5
5
  Stencil Client Platform v4.26.0 | MIT Licensed | https://stenciljs.com
@@ -82,6 +82,22 @@ var plt = {
82
82
  rel: (el, eventName, listener, opts) => el.removeEventListener(eventName, listener, opts),
83
83
  ce: (eventName, opts) => new CustomEvent(eventName, opts)
84
84
  };
85
+ var supportsListenerOptions = /* @__PURE__ */ (() => {
86
+ let supportsListenerOptions2 = false;
87
+ try {
88
+ doc.addEventListener(
89
+ "e",
90
+ null,
91
+ Object.defineProperty({}, "passive", {
92
+ get() {
93
+ supportsListenerOptions2 = true;
94
+ }
95
+ })
96
+ );
97
+ } catch (e) {
98
+ }
99
+ return supportsListenerOptions2;
100
+ })();
85
101
  var promiseResolve = (v) => Promise.resolve(v);
86
102
  var supportsConstructableStylesheets = /* @__PURE__ */ (() => {
87
103
  try {
@@ -268,6 +284,9 @@ var parsePropertyValue = (propValue, propType) => {
268
284
  if (propType & 4 /* Boolean */) {
269
285
  return propValue === "false" ? false : propValue === "" || !!propValue;
270
286
  }
287
+ if (propType & 2 /* Number */) {
288
+ return parseFloat(propValue);
289
+ }
271
290
  if (propType & 1 /* String */) {
272
291
  return String(propValue);
273
292
  }
@@ -401,7 +420,11 @@ var setAccessor = (elm, memberName, oldValue, newValue, isSvg, flags, initialRen
401
420
  classList.remove(...oldClasses.filter((c) => c && !newClasses.includes(c)));
402
421
  classList.add(...newClasses.filter((c) => c && !oldClasses.includes(c)));
403
422
  }
404
- } else if (memberName === "key") ; else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
423
+ } else if (memberName === "key") ; else if (memberName === "ref") {
424
+ if (newValue) {
425
+ newValue(elm);
426
+ }
427
+ } else if ((!isProp ) && memberName[0] === "o" && memberName[1] === "n") {
405
428
  if (memberName[2] === "-") {
406
429
  memberName = memberName.slice(3);
407
430
  } else if (isMemberInElement(win, ln)) {
@@ -555,6 +578,7 @@ var removeVnodes = (vnodes, startIdx, endIdx) => {
555
578
  const vnode = vnodes[index];
556
579
  if (vnode) {
557
580
  const elm = vnode.$elm$;
581
+ nullifyVNodeRefs(vnode);
558
582
  if (elm) {
559
583
  elm.remove();
560
584
  }
@@ -685,6 +709,12 @@ var patch = (oldVNode, newVNode2, isInitialRender = false) => {
685
709
  elm.data = text;
686
710
  }
687
711
  };
712
+ var nullifyVNodeRefs = (vNode) => {
713
+ {
714
+ vNode.$attrs$ && vNode.$attrs$.ref && vNode.$attrs$.ref(null);
715
+ vNode.$children$ && vNode.$children$.map(nullifyVNodeRefs);
716
+ }
717
+ };
688
718
  var insertBefore = (parent, newNode, reference) => {
689
719
  {
690
720
  return parent == null ? void 0 : parent.insertBefore(newNode, reference);
@@ -747,7 +777,17 @@ var dispatchHooks = (hostRef, isInitialLoad) => {
747
777
  }
748
778
  let maybePromise;
749
779
  if (isInitialLoad) {
780
+ {
781
+ hostRef.$flags$ |= 256 /* isListenReady */;
782
+ if (hostRef.$queuedListeners$) {
783
+ hostRef.$queuedListeners$.map(([methodName, event]) => safeCall(instance, methodName, event, elm));
784
+ hostRef.$queuedListeners$ = void 0;
785
+ }
786
+ }
750
787
  emitLifecycleEvent(elm, "componentWillLoad");
788
+ {
789
+ maybePromise = safeCall(instance, "componentWillLoad", void 0, elm);
790
+ }
751
791
  } else {
752
792
  emitLifecycleEvent(elm, "componentWillUpdate");
753
793
  }
@@ -815,6 +855,7 @@ var postUpdateComponent = (hostRef) => {
815
855
  const tagName = hostRef.$cmpMeta$.$tagName$;
816
856
  const elm = hostRef.$hostElement$;
817
857
  const endPostUpdate = createTime("postUpdate", tagName);
858
+ const instance = hostRef.$lazyInstance$ ;
818
859
  const ancestorComponent = hostRef.$ancestorComponent$;
819
860
  emitLifecycleEvent(elm, "componentDidRender");
820
861
  if (!(hostRef.$flags$ & 64 /* hasLoadedComponent */)) {
@@ -822,6 +863,9 @@ var postUpdateComponent = (hostRef) => {
822
863
  {
823
864
  addHydratedFlag(elm);
824
865
  }
866
+ {
867
+ safeCall(instance, "componentDidLoad", void 0, elm);
868
+ }
825
869
  emitLifecycleEvent(elm, "componentDidLoad");
826
870
  endPostUpdate();
827
871
  {
@@ -848,6 +892,16 @@ var postUpdateComponent = (hostRef) => {
848
892
  var appDidLoad = (who) => {
849
893
  nextTick(() => emitEvent(win, "appload", { detail: { namespace: NAMESPACE } }));
850
894
  };
895
+ var safeCall = (instance, method, arg, elm) => {
896
+ if (instance && instance[method]) {
897
+ try {
898
+ return instance[method](arg);
899
+ } catch (e) {
900
+ consoleError(e, elm);
901
+ }
902
+ }
903
+ return void 0;
904
+ };
851
905
  var emitLifecycleEvent = (elm, lifecycleName) => {
852
906
  {
853
907
  emitEvent(elm, "stencil_" + lifecycleName, {
@@ -1104,6 +1158,7 @@ var connectedCallback = (elm) => {
1104
1158
  initializeComponent(elm, hostRef, cmpMeta);
1105
1159
  }
1106
1160
  } else {
1161
+ addHostEventListeners(elm, hostRef, cmpMeta.$listeners$);
1107
1162
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1108
1163
  hostRef.$onReadyPromise$.then(() => fireConnectedCallback());
1109
1164
  }
@@ -1116,6 +1171,12 @@ var disconnectInstance = (instance, elm) => {
1116
1171
  var disconnectedCallback = async (elm) => {
1117
1172
  if ((plt.$flags$ & 1 /* isTmpDisconnected */) === 0) {
1118
1173
  const hostRef = getHostRef(elm);
1174
+ {
1175
+ if (hostRef.$rmListeners$) {
1176
+ hostRef.$rmListeners$.map((rmListener) => rmListener());
1177
+ hostRef.$rmListeners$ = void 0;
1178
+ }
1179
+ }
1119
1180
  if (hostRef == null ? void 0 : hostRef.$lazyInstance$) ; else if (hostRef == null ? void 0 : hostRef.$onReadyPromise$) {
1120
1181
  hostRef.$onReadyPromise$.then(() => disconnectInstance());
1121
1182
  }
@@ -1158,6 +1219,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1158
1219
  {
1159
1220
  cmpMeta.$members$ = compactMeta[2];
1160
1221
  }
1222
+ {
1223
+ cmpMeta.$listeners$ = compactMeta[3];
1224
+ }
1161
1225
  const tagName = cmpMeta.$tagName$;
1162
1226
  const HostElement = class extends HTMLElement {
1163
1227
  // StencilLazyHost
@@ -1183,9 +1247,10 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1183
1247
  }
1184
1248
  }
1185
1249
  connectedCallback() {
1186
- getHostRef(this);
1250
+ const hostRef = getHostRef(this);
1187
1251
  if (!this.hasRegisteredEventListeners) {
1188
1252
  this.hasRegisteredEventListeners = true;
1253
+ addHostEventListeners(this, hostRef, cmpMeta.$listeners$);
1189
1254
  }
1190
1255
  if (appLoadFallback) {
1191
1256
  clearTimeout(appLoadFallback);
@@ -1251,10 +1316,43 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1251
1316
  }
1252
1317
  endBootstrap();
1253
1318
  };
1319
+ var addHostEventListeners = (elm, hostRef, listeners, attachParentListeners) => {
1320
+ if (listeners) {
1321
+ listeners.map(([flags, name, method]) => {
1322
+ const target = getHostListenerTarget(elm, flags) ;
1323
+ const handler = hostListenerProxy(hostRef, method);
1324
+ const opts = hostListenerOpts(flags);
1325
+ plt.ael(target, name, handler, opts);
1326
+ (hostRef.$rmListeners$ = hostRef.$rmListeners$ || []).push(() => plt.rel(target, name, handler, opts));
1327
+ });
1328
+ }
1329
+ };
1330
+ var hostListenerProxy = (hostRef, methodName) => (ev) => {
1331
+ var _a;
1332
+ try {
1333
+ {
1334
+ if (hostRef.$flags$ & 256 /* isListenReady */) {
1335
+ (_a = hostRef.$lazyInstance$) == null ? void 0 : _a[methodName](ev);
1336
+ } else {
1337
+ (hostRef.$queuedListeners$ = hostRef.$queuedListeners$ || []).push([methodName, ev]);
1338
+ }
1339
+ }
1340
+ } catch (e) {
1341
+ consoleError(e, hostRef.$hostElement$);
1342
+ }
1343
+ };
1344
+ var getHostListenerTarget = (elm, flags) => {
1345
+ if (flags & 4 /* TargetDocument */) return doc;
1346
+ return elm;
1347
+ };
1348
+ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1349
+ passive: (flags & 1 /* Passive */) !== 0,
1350
+ capture: (flags & 2 /* Capture */) !== 0
1351
+ } : (flags & 2 /* Capture */) !== 0;
1254
1352
 
1255
1353
  // src/runtime/nonce.ts
1256
1354
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1257
1355
 
1258
1356
  export { Host as H, bootstrapLazy as b, createEvent as c, h, promiseResolve as p, registerInstance as r, setNonce as s };
1259
1357
 
1260
- //# sourceMappingURL=index-9bf8f892.js.map
1358
+ //# sourceMappingURL=index-1dc4ae53.js.map