@sula-tech/webcomponents 0.4.0 → 0.5.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 (95) hide show
  1. package/dist/cjs/{index-BtkenDV1.js → index-Bbryl0vg.js} +30 -4
  2. package/dist/cjs/index-Bbryl0vg.js.map +1 -0
  3. package/dist/cjs/loader.cjs.js +2 -2
  4. package/dist/cjs/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-dropdown.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.sula-timeline-list.entry.cjs.js.map +1 -0
  5. package/dist/cjs/{sula-avatar_14.cjs.entry.js → sula-avatar_16.cjs.entry.js} +215 -33
  6. package/dist/cjs/sula-avatar_16.cjs.entry.js.map +1 -0
  7. package/dist/cjs/webcomponents.cjs.js +2 -2
  8. package/dist/collection/collection-manifest.json +3 -1
  9. package/dist/collection/components/sula-chip/sula-chip.css +1 -1
  10. package/dist/collection/components/sula-dropdown/sula-dropdown.css +1 -0
  11. package/dist/collection/components/sula-dropdown/sula-dropdown.js +275 -0
  12. package/dist/collection/components/sula-dropdown/sula-dropdown.js.map +1 -0
  13. package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js +155 -0
  14. package/dist/collection/components/sula-dropdown/sula-dropdown.stories.js.map +1 -0
  15. package/dist/collection/components/sula-icon/sula-icon.css +1 -1
  16. package/dist/collection/components/sula-icon/sula-icon.js +1 -1
  17. package/dist/collection/components/sula-loader/sula-loader.js +1 -1
  18. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
  19. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +29 -1
  20. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js.map +1 -1
  21. package/dist/collection/components/sula-radio-button/sula-radio-button.js +2 -2
  22. package/dist/collection/components/sula-switch/sula-switch.js +4 -4
  23. package/dist/collection/components/sula-tag/sula-tag.js +3 -3
  24. package/dist/collection/components/sula-textarea/sula-textarea.css +1 -1
  25. package/dist/collection/components/sula-textarea/sula-textarea.js +26 -13
  26. package/dist/collection/components/sula-textarea/sula-textarea.js.map +1 -1
  27. package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
  28. package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
  29. package/dist/collection/components/sula-timeline-list/model/sula-timeline-list.model.js +7 -0
  30. package/dist/collection/components/sula-timeline-list/model/sula-timeline-list.model.js.map +1 -0
  31. package/dist/collection/components/sula-timeline-list/sula-timeline-list.css +1 -0
  32. package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +123 -0
  33. package/dist/collection/components/sula-timeline-list/sula-timeline-list.js.map +1 -0
  34. package/dist/collection/components/sula-timeline-list/sula-timeline-list.stories.js +217 -0
  35. package/dist/collection/components/sula-timeline-list/sula-timeline-list.stories.js.map +1 -0
  36. package/dist/components/index.js +20 -2
  37. package/dist/components/index.js.map +1 -1
  38. package/dist/components/{p-CEU3PNQs.js → p-CYhL1fU6.js} +4 -4
  39. package/dist/components/{p-CEU3PNQs.js.map → p-CYhL1fU6.js.map} +1 -1
  40. package/dist/components/{p-DJGFqp8r.js → p-CjYWDIHR.js} +14 -5
  41. package/dist/components/p-CjYWDIHR.js.map +1 -0
  42. package/dist/components/sula-avatar.js +1 -1
  43. package/dist/components/sula-badge.js +1 -1
  44. package/dist/components/sula-button.js +1 -1
  45. package/dist/components/sula-checkbox.js +1 -1
  46. package/dist/components/sula-chip.js +3 -3
  47. package/dist/components/sula-chip.js.map +1 -1
  48. package/dist/components/sula-dropdown.d.ts +11 -0
  49. package/dist/components/sula-dropdown.js +137 -0
  50. package/dist/components/sula-dropdown.js.map +1 -0
  51. package/dist/components/sula-icon.js +1 -1
  52. package/dist/components/sula-loader.js +1 -1
  53. package/dist/components/sula-menu-select-list.js +1 -1
  54. package/dist/components/sula-radio-button.js +2 -2
  55. package/dist/components/sula-switch.js +4 -4
  56. package/dist/components/sula-tag.js +4 -4
  57. package/dist/components/sula-textarea.js +27 -14
  58. package/dist/components/sula-textarea.js.map +1 -1
  59. package/dist/components/sula-textfield.js +3 -3
  60. package/dist/components/sula-tiles.js +2 -2
  61. package/dist/components/sula-timeline-list.d.ts +11 -0
  62. package/dist/components/sula-timeline-list.js +101 -0
  63. package/dist/components/sula-timeline-list.js.map +1 -0
  64. package/dist/esm/{index-Yyeke16a.js → index-or7qTZgT.js} +30 -4
  65. package/dist/esm/index-or7qTZgT.js.map +1 -0
  66. package/dist/esm/loader.js +3 -3
  67. package/dist/esm/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-dropdown.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.sula-timeline-list.entry.js.map +1 -0
  68. package/dist/esm/{sula-avatar_14.entry.js → sula-avatar_16.entry.js} +214 -34
  69. package/dist/esm/sula-avatar_16.entry.js.map +1 -0
  70. package/dist/esm/webcomponents.js +3 -3
  71. package/dist/types/components/sula-dropdown/sula-dropdown.d.ts +49 -0
  72. package/dist/types/components/sula-dropdown/sula-dropdown.stories.d.ts +68 -0
  73. package/dist/types/components/sula-menu-select-list/sula-menu-select-list.d.ts +4 -0
  74. package/dist/types/components/sula-textarea/sula-textarea.d.ts +4 -1
  75. package/dist/types/components/sula-timeline-list/model/sula-timeline-list.model.d.ts +16 -0
  76. package/dist/types/components/sula-timeline-list/sula-timeline-list.d.ts +17 -0
  77. package/dist/types/components/sula-timeline-list/sula-timeline-list.stories.d.ts +47 -0
  78. package/dist/types/components.d.ts +139 -0
  79. package/dist/webcomponents/{p-67f9fa90.entry.js → p-51f9d6a5.entry.js} +1138 -884
  80. package/dist/webcomponents/p-51f9d6a5.entry.js.map +1 -0
  81. package/dist/webcomponents/{p-Yyeke16a.js → p-or7qTZgT.js} +229 -204
  82. package/dist/webcomponents/p-or7qTZgT.js.map +1 -0
  83. package/dist/webcomponents/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-dropdown.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.sula-timeline-list.entry.esm.js.map +1 -0
  84. package/dist/webcomponents/webcomponents.esm.js +22 -10
  85. package/package.json +1 -1
  86. package/dist/cjs/index-BtkenDV1.js.map +0 -1
  87. package/dist/cjs/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.cjs.js.map +0 -1
  88. package/dist/cjs/sula-avatar_14.cjs.entry.js.map +0 -1
  89. package/dist/components/p-DJGFqp8r.js.map +0 -1
  90. package/dist/esm/index-Yyeke16a.js.map +0 -1
  91. package/dist/esm/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.js.map +0 -1
  92. package/dist/esm/sula-avatar_14.entry.js.map +0 -1
  93. package/dist/webcomponents/p-67f9fa90.entry.js.map +0 -1
  94. package/dist/webcomponents/p-Yyeke16a.js.map +0 -1
  95. package/dist/webcomponents/sula-avatar.sula-badge.sula-button.sula-checkbox.sula-chip.sula-icon.sula-loader.sula-menu-select-list.sula-radio-button.sula-switch.sula-tag.sula-textarea.sula-textfield.sula-tiles.entry.esm.js.map +0 -1
@@ -6,7 +6,7 @@ var SulaTextareaStatus;
6
6
  SulaTextareaStatus["Error"] = "error";
7
7
  })(SulaTextareaStatus || (SulaTextareaStatus = {}));
8
8
 
9
- const sulaTextareaCss = "*,: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;width:100%}.textarea-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}.textarea-error{outline:2px solid var(--color-feedback-error)!important;outline-offset:2px!important}.label-up{animation:labelMoveUp .2s ease-in-out}.label-down{animation:labelMoveDown .2s ease-in-out}@keyframes labelMoveUp{0%{font-size:1rem;left:12px;top:16px}to{font-size:.875rem;left:16px;top:12px}}@keyframes labelMoveDown{0%{font-size:.875rem;left:16px;top:12px}to{font-size:1rem;left:12px;top:16px}}: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}.pointer-events-none{pointer-events:none}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-12{left:.75rem}.left-16{left:1rem}.top-12{top:.75rem}.top-16{top:1rem}.z-10{z-index:10}.mt-4{margin-top:.25rem}.flex{display:flex}.h-full{height:100%}.w-\\[85\\%\\]{width:85%}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-text{cursor:text}.resize-none{resize:none}.items-center{align-items:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded-sm{border-radius:.75rem}.border{border-width:1px}.border-none{border-style:none}.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)}.bg-transparent{background-color:transparent}.px-16{padding-left:1rem;padding-right:1rem}.py-12{padding-bottom:.75rem;padding-top:.75rem}.pt-0{padding-top:0}.pt-6{padding-top:1.5rem}.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-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}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}";
9
+ const sulaTextareaCss = "*,: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;width:100%}.textarea-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}.textarea-error{outline:2px solid var(--color-feedback-error)!important;outline-offset:2px!important}.active-label{width:calc(100% - 3rem)}.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-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}.pointer-events-none{pointer-events:none}.static{position:static}.absolute{position:absolute}.relative{position:relative}.left-12{left:.75rem}.left-16{left:1rem}.top-12{top:.75rem}.top-16{top:1rem}.z-10{z-index:10}.mt-4{margin-top:.25rem}.flex{display:flex}.hidden{display:none}.h-full{height:100%}.w-\\[85\\%\\]{width:85%}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.cursor-text{cursor:text}.resize-none{resize:none}.items-center{align-items:center}.justify-between{justify-content:space-between}.overflow-hidden{overflow:hidden}.rounded-sm{border-radius:.75rem}.border{border-width:1px}.border-none{border-style:none}.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)}.bg-transparent{background-color:transparent}.px-16{padding-left:1rem;padding-right:1rem}.py-12{padding-bottom:.75rem;padding-top:.75rem}.pt-0{padding-top:0}.pt-6{padding-top:1.5rem}.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-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}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}";
10
10
 
11
11
  const SulaTextarea$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextarea extends H {
12
12
  constructor() {
@@ -27,7 +27,6 @@ const SulaTextarea$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextarea exten
27
27
  this.isActive = false;
28
28
  this.textValue = '';
29
29
  this.textareaIsFocused = false;
30
- this.labelAnimationClass = '';
31
30
  this.handleTextareaClick = () => {
32
31
  if (this.disabled)
33
32
  return;
@@ -83,45 +82,60 @@ const SulaTextarea$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextarea exten
83
82
  this.isActive = true;
84
83
  }
85
84
  }
85
+ componentDidLoad() {
86
+ if (this.value && this.value.trim().length > 0) {
87
+ this.changeElementsStyle();
88
+ }
89
+ }
86
90
  setLabelUp() {
87
91
  if (!this.isActive) {
88
- this.labelAnimationClass = 'label-up';
89
92
  this.isActive = true;
90
93
  }
94
+ this.changeElementsStyle();
91
95
  }
92
96
  setLabelDown() {
93
97
  if (this.isActive && (!this.textValue || this.textValue.trim().length === 0)) {
94
- this.labelAnimationClass = 'label-down';
95
98
  this.isActive = false;
96
99
  }
100
+ this.changeElementsStyle();
101
+ }
102
+ changeElementsStyle() {
103
+ this.activeLabelElement.style.display = this.isActive ? 'flex' : 'none';
104
+ this.labelElement.style.display = this.isActive ? 'none' : 'block';
105
+ if (!this.isActive) {
106
+ this.labelElement.classList.add('from-up');
107
+ }
97
108
  }
98
109
  render() {
99
110
  const containerHeight = this.rows * 24 + 48;
100
- return (h(Host, { key: '57c232e61727c00ddebfff0aec234d32b5d7ab20', ref: node => (this.node = node) }, h("div", { key: '9973953fb0a42915f5829c464966a85fc8de29a5' }, h("div", { key: '5a0e22f5a0da4b3a5f756b9630f1aa81c7bc89c4', id: "textarea-container", class: {
111
+ return (h(Host, { key: 'f92eb28cf8d28e5489f27978c839f65591c79146', ref: node => (this.node = node) }, h("div", { key: '41adf9b4d79527dd5e9690062f026324123fb65d' }, h("div", { key: '87300f79d1a4ac9340b746b938cf74bfe0dcc6be', id: "textarea-container", class: {
101
112
  'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,
102
113
  'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,
103
114
  'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,
104
115
  'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
105
116
  'bg-surface-body border-line-input cursor-text': !this.disabled,
106
- }, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '18c83444b42e60e93dd8245127f9f84e6fc4dcc0', class: {
107
- 'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,
117
+ }, style: { height: `${containerHeight}px` }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleTextareaClick }, h("label", { key: '2b0cd8be5aa596dd69809f6c4d7234491750f8c3', class: {
118
+ 'text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,
119
+ 'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
120
+ 'text-text-disabled': this.disabled,
121
+ 'bg-surface-body': !this.disabled && this.isActive,
122
+ }, ref: node => (this.labelElement = node) }, this.label), h("label", { key: 'ef9f0f3ed0e456c6ad28345f27438d1f2b248f5e', class: {
123
+ 'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down': true,
108
124
  'text-sm top-12 left-16': this.isActive,
109
- 'text-base top-16 left-12': !this.isActive,
110
125
  'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),
111
126
  'text-text-disabled': this.disabled,
112
127
  'bg-surface-body': !this.disabled && this.isActive,
113
- [this.labelAnimationClass]: true,
114
- }, style: this.isActive ? { padding: '0 4px', marginLeft: '-4px' } : {} }, this.label), h("textarea", { key: '17049dd7636d3bee5dc37a6270f2a1289c6777b6', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
128
+ }, ref: node => (this.activeLabelElement = node) }, this.label), h("textarea", { key: '35048b74ed9a1bcd9df10ea7af1d1aaee2c5e640', ref: node => (this.textareaElement = node), placeholder: this.isActive ? this.placeholder : '', rows: this.rows, maxLength: this.maxLength, disabled: this.disabled, class: {
115
129
  'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,
116
130
  'pt-6': this.isActive,
117
131
  'pt-0': !this.isActive,
118
132
  'text-text-primary': !this.disabled,
119
133
  'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,
120
- }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: 'e0cc23cc8dc42a88627ab81cf68d6f2d57441df4', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'c208c32ea302af2dd85606582733f1ad83a4167b', id: "textarea-help-text", class: {
134
+ }, onInput: this.handleTextareaChanges, onFocus: this.handleTextareaFocus, onBlur: this.handleBlur, value: this.textValue })), (this.helpText || this.maxLength) && (h("div", { key: '220803fef223bc00db7cb9137995a9e950abb842', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: 'f3a26a35db2cb8a70471126a82f1fca21dcbb058', id: "textarea-help-text", class: {
121
135
  'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
122
136
  'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
123
137
  'text-text-disabled': this.disabled,
124
- } }, this.helpText)), this.maxLength && (h("div", { key: '0c397be8232862d45b922bc0eab6eef452d02040', id: "max-length-container", class: {
138
+ } }, this.helpText)), this.maxLength && (h("div", { key: '34c3b09e22a85973a65718908fb1744abbffc10a', id: "max-length-container", class: {
125
139
  'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,
126
140
  'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,
127
141
  'text-text-disabled': this.disabled,
@@ -139,8 +153,7 @@ const SulaTextarea$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextarea exten
139
153
  "rows": [2],
140
154
  "isActive": [32],
141
155
  "textValue": [32],
142
- "textareaIsFocused": [32],
143
- "labelAnimationClass": [32]
156
+ "textareaIsFocused": [32]
144
157
  }, [[4, "click", "handleClick"]]]);
145
158
  function defineCustomElement$1() {
146
159
  if (typeof customElements === "undefined") {
@@ -1 +1 @@
1
- {"file":"sula-textarea.js","mappings":";;AAAA,IAAY,kBAGX;AAHD,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,S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CAAC,QAAQ;gBACjF,oBAAoB,EAAE,IAAI,CAAC,QAAQ;AACpC,aAAA,EAAA,EAEA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,OAAG,IAAI,CAAC,SAAS,CACxD,CACP,CACG,CACP,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaTextarea","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-textarea/model/sula-textarea.model.ts","src/components/sula-textarea/sula-textarea.scss?tag=sula-textarea&encapsulation=shadow","src/components/sula-textarea/sula-textarea.tsx"],"sourcesContent":["export enum SulaTextareaStatus {\n Default = 'default',\n Error = 'error',\n}\n",":host {\n display: block;\n width: 100%;\n}\n\n.textarea-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.textarea-error {\n outline: 2px solid var(--color-feedback-error) !important;\n outline-offset: 2px !important;\n}\n\n.label-up {\n animation: labelMoveUp 0.2s ease-in-out;\n}\n\n.label-down {\n animation: labelMoveDown 0.2s ease-in-out;\n}\n\n@keyframes labelMoveUp {\n from {\n font-size: 1rem;\n top: 16px;\n left: 12px;\n }\n to {\n font-size: 0.875rem;\n top: 12px;\n left: 16px;\n }\n}\n\n@keyframes labelMoveDown {\n from {\n font-size: 0.875rem;\n top: 12px;\n left: 16px;\n }\n to {\n font-size: 1rem;\n top: 16px;\n left: 12px;\n }\n}\n","import { Component, Event, EventEmitter, Host, Listen, Prop, State, h } from '@stencil/core';\nimport { SulaTextareaStatus } from './model/sula-textarea.model';\n\n@Component({\n tag: 'sula-textarea',\n styleUrl: 'sula-textarea.scss',\n shadow: true,\n})\nexport class SulaTextarea {\n /**\n * Value for the textarea.\n */\n @Prop({ mutable: true })\n value?: string;\n\n /**\n * The textarea status\n */\n @Prop({ mutable: true }) status: SulaTextareaStatus = SulaTextareaStatus.Default;\n\n /**\n * The textarea label\n */\n @Prop() label: string;\n\n /**\n * The textarea placeholder\n */\n @Prop() placeholder: string;\n\n /**\n * The textarea is disabled\n */\n @Prop({ mutable: true }) disabled: boolean;\n\n /**\n * The help text for textarea\n */\n @Prop() helpText?: string;\n\n /**\n * The textarea max length\n */\n @Prop() maxLength?: number;\n\n /**\n * The textarea rows (height)\n */\n @Prop() rows: number = 4;\n\n /**\n * Event emitted when textarea value changes.\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when textarea is focused.\n */\n @Event()\n focusedOn: EventEmitter<void>;\n\n /**\n * Event emitted when textarea is focused out.\n */\n @Event()\n focusedOut: EventEmitter<void>;\n\n @State()\n isActive = false;\n\n @State()\n textValue: string = '';\n\n @State()\n textareaIsFocused = false;\n\n @State()\n labelAnimationClass = '';\n\n textareaElement: HTMLTextAreaElement;\n\n node?: HTMLElement;\n\n @Listen('click', { target: 'document' })\n handleClick(event: Event) {\n if (!this.node || !this.textareaIsFocused) return;\n\n const clickInside = this.node.contains(event.target as Node);\n\n if (!clickInside && (!this.textValue || this.textValue.trim().length === 0)) {\n this.setLabelDown();\n this.focusedOut.emit();\n this.textareaIsFocused = false;\n }\n }\n\n focusOnTextarea() {\n setTimeout(() => {\n this.textareaElement.focus();\n }, 0);\n }\n\n componentWillLoad() {\n if (this.value && this.value.trim().length > 0) {\n this.textValue = this.value;\n this.isActive = true;\n }\n }\n\n setLabelUp() {\n if (!this.isActive) {\n this.labelAnimationClass = 'label-up';\n this.isActive = true;\n }\n }\n\n setLabelDown() {\n if (this.isActive && (!this.textValue || this.textValue.trim().length === 0)) {\n this.labelAnimationClass = 'label-down';\n this.isActive = false;\n }\n }\n\n handleTextareaClick = () => {\n if (this.disabled) return;\n this.setLabelUp();\n this.focusOnTextarea();\n };\n\n handleTextareaChanges = (event: InputEvent) => {\n const newValue = (event.target as HTMLTextAreaElement).value;\n this.textValue = newValue;\n this.value = newValue;\n\n if (newValue.length > 0 || this.textareaIsFocused) {\n this.setLabelUp();\n }\n\n this.valueChanged.emit(newValue);\n };\n\n handleFocus = () => {\n if (this.disabled) return;\n\n this.setLabelUp();\n this.focusOnTextarea();\n };\n\n handleBlur = () => {\n if (!this.textValue || this.textValue.trim().length === 0) {\n this.setLabelDown();\n }\n\n this.focusedOut.emit();\n this.textareaIsFocused = false;\n };\n\n handleTextareaFocus = () => {\n this.focusedOn.emit();\n this.textareaIsFocused = true;\n this.setLabelUp();\n };\n\n render() {\n const containerHeight = this.rows * 24 + 48;\n\n return (\n <Host ref={node => (this.node = node)}>\n <div>\n <div\n id=\"textarea-container\"\n class={{\n 'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,\n 'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,\n 'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,\n 'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,\n 'bg-surface-body border-line-input cursor-text': !this.disabled,\n }}\n style={{ height: `${containerHeight}px` }}\n tabIndex={0}\n onFocus={this.handleFocus}\n onClick={this.handleTextareaClick}\n >\n <label\n class={{\n 'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,\n 'text-sm top-12 left-16': this.isActive,\n 'text-base top-16 left-12': !this.isActive,\n 'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),\n 'text-text-disabled': this.disabled,\n 'bg-surface-body': !this.disabled && this.isActive,\n [this.labelAnimationClass]: true,\n }}\n style={this.isActive ? { padding: '0 4px', marginLeft: '-4px' } : {}}\n >\n {this.label}\n </label>\n\n <textarea\n ref={node => (this.textareaElement = node)}\n placeholder={this.isActive ? this.placeholder : ''}\n rows={this.rows}\n maxLength={this.maxLength}\n disabled={this.disabled}\n class={{\n 'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,\n 'pt-6': this.isActive,\n 'pt-0': !this.isActive,\n 'text-text-primary': !this.disabled,\n 'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,\n }}\n onInput={this.handleTextareaChanges}\n onFocus={this.handleTextareaFocus}\n onBlur={this.handleBlur}\n value={this.textValue}\n />\n </div>\n\n {(this.helpText || this.maxLength) && (\n <div class=\"flex justify-between items-center px-16 mt-4 text-sm\">\n {this.helpText && (\n <div\n id=\"textarea-help-text\"\n class={{\n 'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,\n 'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.helpText}\n </div>\n )}\n {this.maxLength && (\n <div\n id=\"max-length-container\"\n class={{\n 'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,\n 'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\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
+ {"file":"sula-textarea.js","mappings":";;AAAA,IAAY,kBAGX;AAHD,CAAA,UAAY,kBAAkB,EAAA;AAC5B,IAAA,kBAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,kBAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACjB,CAAC,EAHW,kBAAkB,KAAlB,kBAAkB,GAG7B,EAAA,CAAA,CAAA;;ACHD,MAAM,eAAe,GAAG,wsVAAwsV;;MCQntVA,cAAY,iBAAAC,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,GAAA;;;;;;;AAYE;;AAEG;AACsB,QAAA,IAAA,CAAA,MAAM,GAAuB,kBAAkB,CAAC,OAAO;AA2BhF;;AAEG;AACK,QAAA,IAAI,CAAA,IAAA,GAAW,CAAC;AAqBxB,QAAA,IAAQ,CAAA,QAAA,GAAG,KAAK;AAGhB,QAAA,IAAS,CAAA,SAAA,GAAW,EAAE;AAGtB,QAAA,IAAiB,CAAA,iBAAA,GAAG,KAAK;AA+DzB,QAAA,IAAmB,CAA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BAAA,mBAAmB,EAAE,IAAI,CAAC,MAAM,KAAK,kBAAkB,CAAC,OAAO,IAAI,CAAC,IAAI,CAAC,QAAQ;AACjF,gBAAA,qBAAqB,EAAE,IAAI,CAAC,MAAM,KAAK,kBAAkB,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,QAAQ;gBACjF,oBAAoB,EAAE,IAAI,CAAC,QAAQ;AACpC,aAAA,EAAA,EAEA,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,OAAG,IAAI,CAAC,SAAS,CACxD,CACP,CACG,CACP,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaTextarea","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-textarea/model/sula-textarea.model.ts","src/components/sula-textarea/sula-textarea.scss?tag=sula-textarea&encapsulation=shadow","src/components/sula-textarea/sula-textarea.tsx"],"sourcesContent":["export enum SulaTextareaStatus {\n Default = 'default',\n Error = 'error',\n}\n",":host {\n display: block;\n width: 100%;\n}\n\n.textarea-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.textarea-error {\n outline: 2px solid var(--color-feedback-error) !important;\n outline-offset: 2px !important;\n}\n\n.active-label {\n width: calc(100% - 3rem);\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 { SulaTextareaStatus } from './model/sula-textarea.model';\n\n@Component({\n tag: 'sula-textarea',\n styleUrl: 'sula-textarea.scss',\n shadow: true,\n})\nexport class SulaTextarea {\n /**\n * Value for the textarea.\n */\n @Prop({ mutable: true })\n value?: string;\n\n /**\n * The textarea status\n */\n @Prop({ mutable: true }) status: SulaTextareaStatus = SulaTextareaStatus.Default;\n\n /**\n * The textarea label\n */\n @Prop() label: string;\n\n /**\n * The textarea placeholder\n */\n @Prop() placeholder: string;\n\n /**\n * The textarea is disabled\n */\n @Prop({ mutable: true }) disabled: boolean;\n\n /**\n * The help text for textarea\n */\n @Prop() helpText?: string;\n\n /**\n * The textarea max length\n */\n @Prop() maxLength?: number;\n\n /**\n * The textarea rows (height)\n */\n @Prop() rows: number = 4;\n\n /**\n * Event emitted when textarea value changes.\n */\n @Event()\n valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when textarea is focused.\n */\n @Event()\n focusedOn: EventEmitter<void>;\n\n /**\n * Event emitted when textarea is focused out.\n */\n @Event()\n focusedOut: EventEmitter<void>;\n\n @State()\n isActive = false;\n\n @State()\n textValue: string = '';\n\n @State()\n textareaIsFocused = false;\n\n textareaElement: HTMLTextAreaElement;\n\n node?: HTMLElement;\n\n activeLabelElement: HTMLLabelElement;\n labelElement: HTMLLabelElement;\n\n @Listen('click', { target: 'document' })\n handleClick(event: Event) {\n if (!this.node || !this.textareaIsFocused) return;\n\n const clickInside = this.node.contains(event.target as Node);\n\n if (!clickInside && (!this.textValue || this.textValue.trim().length === 0)) {\n this.setLabelDown();\n this.focusedOut.emit();\n this.textareaIsFocused = false;\n }\n }\n\n focusOnTextarea() {\n setTimeout(() => {\n this.textareaElement.focus();\n }, 0);\n }\n\n componentWillLoad() {\n if (this.value && this.value.trim().length > 0) {\n this.textValue = this.value;\n this.isActive = true;\n }\n }\n\n componentDidLoad() {\n if (this.value && this.value.trim().length > 0) {\n this.changeElementsStyle();\n }\n }\n\n setLabelUp() {\n if (!this.isActive) {\n this.isActive = true;\n }\n this.changeElementsStyle();\n }\n\n setLabelDown() {\n if (this.isActive && (!this.textValue || this.textValue.trim().length === 0)) {\n this.isActive = false;\n }\n this.changeElementsStyle();\n }\n\n changeElementsStyle() {\n this.activeLabelElement.style.display = this.isActive ? 'flex' : 'none';\n this.labelElement.style.display = this.isActive ? 'none' : 'block';\n if (!this.isActive) {\n this.labelElement.classList.add('from-up');\n }\n }\n\n handleTextareaClick = () => {\n if (this.disabled) return;\n this.setLabelUp();\n this.focusOnTextarea();\n };\n\n handleTextareaChanges = (event: InputEvent) => {\n const newValue = (event.target as HTMLTextAreaElement).value;\n this.textValue = newValue;\n this.value = newValue;\n\n if (newValue.length > 0 || this.textareaIsFocused) {\n this.setLabelUp();\n }\n\n this.valueChanged.emit(newValue);\n };\n\n handleFocus = () => {\n if (this.disabled) return;\n\n this.setLabelUp();\n this.focusOnTextarea();\n };\n\n handleBlur = () => {\n if (!this.textValue || this.textValue.trim().length === 0) {\n this.setLabelDown();\n }\n\n this.focusedOut.emit();\n this.textareaIsFocused = false;\n };\n\n handleTextareaFocus = () => {\n this.focusedOn.emit();\n this.textareaIsFocused = true;\n this.setLabelUp();\n };\n\n render() {\n const containerHeight = this.rows * 24 + 48;\n\n return (\n <Host ref={node => (this.node = node)}>\n <div>\n <div\n id=\"textarea-container\"\n class={{\n 'relative border rounded-sm px-16 py-12 outline-none caret-brand-primary': true,\n 'textarea-focus': this.textareaIsFocused && !this.disabled && this.status === SulaTextareaStatus.Default,\n 'textarea-error': this.status === SulaTextareaStatus.Error && !this.disabled,\n 'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,\n 'bg-surface-body border-line-input cursor-text': !this.disabled,\n }}\n style={{ height: `${containerHeight}px` }}\n tabIndex={0}\n onFocus={this.handleFocus}\n onClick={this.handleTextareaClick}\n >\n <label\n class={{\n 'text-base top-16 left-12 absolute transition-all duration-200 ease-in-out pointer-events-none z-10 w-[85%]': true,\n 'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),\n 'text-text-disabled': this.disabled,\n 'bg-surface-body': !this.disabled && this.isActive,\n }}\n ref={node => (this.labelElement = node)}\n >\n {this.label}\n </label>\n\n <label\n class={{\n 'absolute font-bold transition-all duration-200 ease-in-out pointer-events-none z-10 active-label hidden from-down': true,\n 'text-sm top-12 left-16': this.isActive,\n 'text-text-primary': !this.disabled && (this.isActive || this.status === SulaTextareaStatus.Default),\n 'text-text-disabled': this.disabled,\n 'bg-surface-body': !this.disabled && this.isActive,\n }}\n ref={node => (this.activeLabelElement = node)}\n >\n {this.label}\n </label>\n\n <textarea\n ref={node => (this.textareaElement = node)}\n placeholder={this.isActive ? this.placeholder : ''}\n rows={this.rows}\n maxLength={this.maxLength}\n disabled={this.disabled}\n class={{\n 'w-full h-full outline-none text-base bg-transparent border-none resize-none': true,\n 'pt-6': this.isActive,\n 'pt-0': !this.isActive,\n 'text-text-primary': !this.disabled,\n 'text-text-disabled cursor-not-allowed overflow-hidden': this.disabled,\n }}\n onInput={this.handleTextareaChanges}\n onFocus={this.handleTextareaFocus}\n onBlur={this.handleBlur}\n value={this.textValue}\n />\n </div>\n\n {(this.helpText || this.maxLength) && (\n <div class=\"flex justify-between items-center px-16 mt-4 text-sm\">\n {this.helpText && (\n <div\n id=\"textarea-help-text\"\n class={{\n 'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,\n 'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.helpText}\n </div>\n )}\n {this.maxLength && (\n <div\n id=\"max-length-container\"\n class={{\n 'text-text-primary': this.status === SulaTextareaStatus.Default && !this.disabled,\n 'text-feedback-error': this.status === SulaTextareaStatus.Error && !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\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
  import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
2
- import { d as defineCustomElement$2 } from './p-CEU3PNQs.js';
2
+ import { d as defineCustomElement$2 } from './p-CYhL1fU6.js';
3
3
 
4
4
  var SulaTextfieldType;
5
5
  (function (SulaTextfieldType) {
@@ -117,14 +117,14 @@ const SulaTextfield$1 = /*@__PURE__*/ proxyCustomElement(class SulaTextfield ext
117
117
  return this.icon;
118
118
  }
119
119
  render() {
120
- return (h(Host, { key: '9c4193ba6e336add0d1c51605afd361af3066b71', ref: node => (this.node = node) }, h("div", { key: 'd54d4a4e3476dce6465152110926d911cd6fe76f' }, h("div", { key: 'ad310e6e6665b7b4dc86d063c6eb231b30da03d6', id: "button-container", class: {
120
+ return (h(Host, { key: 'fb42aa8b4a5f44271aedb2080f82f6c322cfef0e', ref: node => (this.node = node) }, h("div", { key: '47636efa9e1a6608d1c1636806df19b8c894deb8' }, h("div", { key: '2d42ce76232efc9c82061866cb508668e166de98', id: "button-container", class: {
121
121
  'flex items-center border rounded-sm px-16 outline-none h-[72px] caret-brand-primary': true,
122
122
  'flex-row justify-between': !!this.icon || this.type === SulaTextfieldType.Password,
123
123
  'button-focus': this.inputIsFocused && !this.disabled && this.status === SulaTextfieldStatus.Default,
124
124
  'button-error': this.status === SulaTextfieldStatus.Error && !this.disabled,
125
125
  'bg-states-bg-disabled border-line-general cursor-not-allowed': this.disabled,
126
126
  'bg-surface-body border-line-input cursor-pointer': !this.disabled,
127
- }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '7c95cc92de32eb596c005d54244feb8a0431c024', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: '5368c5c52c308503ac6bf004fec6b61cff70e585', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: 'aecd88e5ab8c717ecc8b94e49f8f363b09be5da9', 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.value }))), h("div", { key: '11db876fe9c49527ba3b25e57f23fbc2eb14fc0e', 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: '2f4200a031dbe7afa38b69873822f92a84bcf87b', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: 'd0d7d25d69685a37c46fb4139f5432efa415e7fa', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '20b99afe2b36b2ee1c5c3eca47cc928238d767ca', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: '70d9144ca98f4bd429ed02a9220130ef3e249c26', 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: '13218dba2cbd936c8b37d0b0bcd6633b07827746', 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)))))));
127
+ }, tabIndex: 0, onFocus: this.handleFocus, onClick: this.handleInputClick }, !this.disabled && (h("div", { key: '3759391f009592e655651e3fb0eb4d3c635c567a', class: { 'hidden flex-col w-full': true, 'pr-12': !!this.icon }, ref: node => (this.inputContainer = node) }, h("label", { key: 'ff77510dc8323c9cb5754ae2fa18d746c5191025', class: "font-bold text-sm text-text-primary from-down" }, this.label), h("input", { key: '3a4d2f7d630cca89c1bf019246ba0be75551610f', 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.value }))), h("div", { key: '66812a11a436f2d1b9eea5b413b04d8ff1f142f9', 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: 'e04dd7cb805f1e3806391da6c8dfc83f761127bc', class: "flex items-center justify-center", onClick: this.handleIconClick }, h("sula-icon", { key: '84d70edba3000e811829c2bc621b513d6bc61c19', icon: this.getInputIcon(), customClass: `text-2xl ${this.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` })))), (this.helpText || this.maxLength) && !this.disabled && (h("div", { key: '23378a19e251dc0d9b1785367ef1d36fa526af3c', class: "flex justify-between items-center px-16 mt-4 text-sm" }, this.helpText && (h("div", { key: '65a5aeccf4efbaedd86341847fef7b77e6e5da8f', 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: 'ce5dcdbe6d338f56b0462a164d49c56230f59663', 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)))))));
128
128
  }
129
129
  static get style() { return sulaTextfieldCss; }
130
130
  }, [1, "sula-textfield", {
@@ -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-CEU3PNQs.js';
2
+ import { d as defineCustomElement$2 } from './p-CYhL1fU6.js';
3
3
 
4
4
  var SulaTilesType;
5
5
  (function (SulaTilesType) {
@@ -139,7 +139,7 @@ const SulaTiles$1 = /*@__PURE__*/ proxyCustomElement(class SulaTiles extends H {
139
139
  return (h("div", { class: this.getTextContainerClasses() }, h("span", { class: this.getTextClasses(true), title: this.ellipsis ? this.text : undefined }, this.text), this.hasSubText && (h("span", { class: this.getTextClasses(false), title: this.ellipsis ? this.subText : undefined }, this.subText))));
140
140
  }
141
141
  render() {
142
- return (h(Host, { key: '571dd0142465ec3483c7a460feedf63542836cfa' }, h("div", { key: '7bb61260329cbded9fb9a25201c74de94a060268', class: this.getContainerClasses(), tabIndex: this.getTabIndex(this.isSquare), onClick: this.handleClick }, this.renderIcon(), this.renderText())));
142
+ return (h(Host, { key: '74220546ceb45c4a934a7bf7e51ab1868d335ed0' }, h("div", { key: 'b0afa8752ee1a07de5652d7b2109272062abaf42', class: this.getContainerClasses(), tabIndex: this.getTabIndex(this.isSquare), onClick: this.handleClick }, this.renderIcon(), this.renderText())));
143
143
  }
144
144
  static get style() { return sulaTilesCss; }
145
145
  }, [1, "sula-tiles", {
@@ -0,0 +1,11 @@
1
+ import type { Components, JSX } from "../types/components";
2
+
3
+ interface SulaTimelineList extends Components.SulaTimelineList, HTMLElement {}
4
+ export const SulaTimelineList: {
5
+ prototype: SulaTimelineList;
6
+ new (): SulaTimelineList;
7
+ };
8
+ /**
9
+ * Used to define this component and all nested components recursively.
10
+ */
11
+ export const defineCustomElement: () => void;
@@ -0,0 +1,101 @@
1
+ import { p as proxyCustomElement, H, c as createEvent, h, a as Host } from './index.js';
2
+ import { d as defineCustomElement$2 } from './p-CYhL1fU6.js';
3
+
4
+ var SulaTimelineListItemIconStatus;
5
+ (function (SulaTimelineListItemIconStatus) {
6
+ SulaTimelineListItemIconStatus["Success"] = "success";
7
+ SulaTimelineListItemIconStatus["Error"] = "error";
8
+ SulaTimelineListItemIconStatus["Warning"] = "warning";
9
+ })(SulaTimelineListItemIconStatus || (SulaTimelineListItemIconStatus = {}));
10
+
11
+ const sulaTimelineListCss = "*,: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}:host{display:block}: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}.left-\\[28px\\]{left:28px}.top-56{top:3.5rem}.z-10{z-index:10}.mt-4{margin-top:.25rem}.flex{display:flex}.h-24{height:1.5rem}.h-44{height:2.75rem}.h-56{height:3.5rem}.h-full{height:100%}.w-2{width:.125rem}.w-44{width:2.75rem}.w-56{width:3.5rem}.w-fit{width:fit-content}.w-full{width:100%}.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}.space-x-24>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(1.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(1.5rem*var(--tw-space-x-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse:0;margin-bottom:calc(.25rem*var(--tw-space-y-reverse));margin-top:calc(.25rem*(1 - var(--tw-space-y-reverse)))}.rounded-full{border-radius:9999px}.rounded-md{border-radius:1.25rem}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.bg-surface-on-body-feedback-alert{background-color:var(--color-surface-on-body-feedback-alert)}.bg-surface-on-body-feedback-error{background-color:var(--color-surface-on-body-feedback-error)}.bg-surface-on-body-feedback-success{background-color:var(--color-surface-on-body-feedback-success)}.p-6{padding:1.5rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.px-\\[6px\\]{padding-left:6px;padding-right:6px}.py-2{padding-bottom:.125rem;padding-top:.125rem}.py-32{padding-bottom:2rem;padding-top:2rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.leading-3{line-height:.75rem}.leading-4{line-height:1rem}.leading-5{line-height:1.25rem}.leading-6{line-height:1.5rem}.text-feedback-alert{color:var(--color-feedback-alert)}.text-feedback-error{color:var(--color-feedback-error)}.text-feedback-success{color:var(--color-feedback-success)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.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)}.group:hover .group-hover\\:bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}";
12
+
13
+ const SulaTimelineList$1 = /*@__PURE__*/ proxyCustomElement(class SulaTimelineList extends H {
14
+ constructor() {
15
+ super();
16
+ this.__registerHost();
17
+ this.__attachShadow();
18
+ this.itemClicked = createEvent(this, "itemClicked");
19
+ /**
20
+ * Timeline list. (Can be use with weekday text or icon with status)
21
+ */
22
+ this.sulaTimelineList = [];
23
+ this.handleItemClick = (item) => {
24
+ if (!item.hasLink)
25
+ return;
26
+ this.itemClicked.emit(item);
27
+ };
28
+ }
29
+ getIconBackgroundColorByStatus(status) {
30
+ const iconColorByStatus = {
31
+ [SulaTimelineListItemIconStatus.Success]: 'bg-surface-on-body-feedback-success',
32
+ [SulaTimelineListItemIconStatus.Warning]: 'bg-surface-on-body-feedback-alert',
33
+ [SulaTimelineListItemIconStatus.Error]: 'bg-surface-on-body-feedback-error',
34
+ };
35
+ return iconColorByStatus[status];
36
+ }
37
+ getIconByStatus(status) {
38
+ const iconByStatus = {
39
+ [SulaTimelineListItemIconStatus.Success]: 'ph ph-check-circle',
40
+ [SulaTimelineListItemIconStatus.Warning]: 'ph ph-warning',
41
+ [SulaTimelineListItemIconStatus.Error]: 'ph ph-warning-circle',
42
+ };
43
+ return iconByStatus[status];
44
+ }
45
+ getIconColorByStatus(status) {
46
+ const iconByStatus = {
47
+ [SulaTimelineListItemIconStatus.Success]: 'text-feedback-success',
48
+ [SulaTimelineListItemIconStatus.Warning]: 'text-feedback-alert',
49
+ [SulaTimelineListItemIconStatus.Error]: 'text-feedback-error',
50
+ };
51
+ return iconByStatus[status];
52
+ }
53
+ render() {
54
+ return (h(Host, { key: '07297e038cc1d0dd20219b34ebc3539c408fdab5' }, h("div", { key: '20094eed02e4e6ba917576bdae2e67337cbfac68', class: "flex flex-col bg-surface-on-body px-24 py-32 w-fit rounded-md" }, this.sulaTimelineList.map((item, index) => {
55
+ const isLastItem = index === this.sulaTimelineList.length - 1;
56
+ return (h("div", { class: {
57
+ 'relative timeline-item': true,
58
+ 'cursor-pointer group': item.hasLink,
59
+ }, onClick: () => this.handleItemClick(item) }, h("div", { class: "flex space-x-24 items-center justify-between flex-row w-full" }, h("div", { class: "relative flex flex-row space-x-24 items-center" }, h("div", { class: "relative" }, h("div", { class: {
60
+ 'rounded-full h-56 w-56 bg-surface-body flex justify-center items-center relative z-10': true,
61
+ 'p-6': !!item.iconStatus,
62
+ } }, item.weekdayText && (h("div", { class: "flex flex-col justify-center items-center space-y-4" }, h("span", { class: "text-text-secondary text-xs leading-3" }, item.weekdayText.weekday), h("span", { class: "text-xl leading-5 text-text-primary" }, item.weekdayText.day))), item.iconStatus && (h("div", { class: {
63
+ 'flex justify-center items-center w-44 h-44 rounded-full': true,
64
+ [this.getIconBackgroundColorByStatus(item.iconStatus)]: true,
65
+ } }, h("div", { class: "flex justify-center items-center leading-6 w-44" }, h("sula-icon", { icon: this.getIconByStatus(item.iconStatus), customClass: `${this.getIconColorByStatus(item.iconStatus)} text-2xl` })))))), h("div", { class: "flex flex-col" }, h("span", { class: "text-text-primary font-bold text-base leading-4" }, item.title), item.message && h("span", { class: "text-text-secondary text-base leading-4 mt-4" }, item.message))), item.hasLink && (h("div", { class: {
66
+ 'px-[6px] py-2 rounded-full leading-6 flex items-center justify-center margin-left': true,
67
+ 'group-hover:bg-states-empty-bg-hover transition': item.hasLink,
68
+ } }, h("sula-icon", { icon: "ph ph-caret-right", customClass: "text-2xl text-text-primary" })))), !isLastItem && h("div", { class: "absolute bg-surface-body left-[28px] top-56 w-2 h-full" }), !isLastItem && h("div", { class: "h-24" })));
69
+ }))));
70
+ }
71
+ static get style() { return sulaTimelineListCss; }
72
+ }, [1, "sula-timeline-list", {
73
+ "sulaTimelineList": [1040, "sula-timeline-list"]
74
+ }]);
75
+ function defineCustomElement$1() {
76
+ if (typeof customElements === "undefined") {
77
+ return;
78
+ }
79
+ const components = ["sula-timeline-list", "sula-icon"];
80
+ components.forEach(tagName => { switch (tagName) {
81
+ case "sula-timeline-list":
82
+ if (!customElements.get(tagName)) {
83
+ customElements.define(tagName, SulaTimelineList$1);
84
+ }
85
+ break;
86
+ case "sula-icon":
87
+ if (!customElements.get(tagName)) {
88
+ defineCustomElement$2();
89
+ }
90
+ break;
91
+ } });
92
+ }
93
+ defineCustomElement$1();
94
+
95
+ const SulaTimelineList = SulaTimelineList$1;
96
+ const defineCustomElement = defineCustomElement$1;
97
+
98
+ export { SulaTimelineList, defineCustomElement };
99
+ //# sourceMappingURL=sula-timeline-list.js.map
100
+
101
+ //# sourceMappingURL=sula-timeline-list.js.map
@@ -0,0 +1 @@
1
+ {"file":"sula-timeline-list.js","mappings":";;;AAaA,IAAY,8BAIX;AAJD,CAAA,UAAY,8BAA8B,EAAA;AACxC,IAAA,8BAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACnB,IAAA,8BAAA,CAAA,OAAA,CAAA,GAAA,OAAe;AACf,IAAA,8BAAA,CAAA,SAAA,CAAA,GAAA,SAAmB;AACrB,CAAC,EAJW,8BAA8B,KAA9B,8BAA8B,GAIzC,EAAA,CAAA,CAAA;;ACjBD,MAAM,mBAAmB,GAAG,+yVAA+yV;;MCQ9zVA,kBAAgB,iBAAAC,kBAAA,CAAA,MAAA,gBAAA,SAAAC,CAAA,CAAA;AAL7B,IAAA,WAAA,GAAA;;;;;AAME;;AAEG;AAEH,QAAA,IAAgB,CAAA,gBAA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,iDAAiD,EAAA,EAC1D,CAAA,CAAA,WAAA,EAAA,EAAW,IAAI,EAAE,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,CAAG,EAAA,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,UAAU,CAAC,WAAW,EAAA,CAAc,CACvI,CACF,CACP,CACG,CACF,EAEN,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,eAAe,EAAA,EACxB,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,iDAAiD,IAAE,IAAI,CAAC,KAAK,CAAQ,EAChF,IAAI,CAAC,OAAO,IAAI,CAAA,CAAA,MAAA,EAAA,EAAM,KAAK,EAAC,8CAA8C,EAAA,EAAE,IAAI,CAAC,OAAO,CAAQ,CAC7F,CACF,EAEL,IAAI,CAAC,OAAO,KACX,CAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAE;AACL,oBAAA,mFAAmF,EAAE,IAAI;oBACzF,iDAAiD,EAAE,IAAI,CAAC,OAAO;iBAChE,EAAA,EAED,CAAW,CAAA,WAAA,EAAA,EAAA,IAAI,EAAC,mBAAmB,EAAC,WAAW,EAAC,4BAA4B,EAAA,CAAa,CACrF,CACP,CACG,EAEL,CAAC,UAAU,IAAI,CAAA,CAAA,KAAA,EAAA,EAAK,KAAK,EAAC,wDAAwD,EAAO,CAAA,EAEzF,CAAC,UAAU,IAAI,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,MAAM,EAAA,CAAO,CACpC;AAEV,SAAC,CAAC,CACE,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaTimelineList","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-timeline-list/model/sula-timeline-list.model.ts","src/components/sula-timeline-list/sula-timeline-list.scss?tag=sula-timeline-list&encapsulation=shadow","src/components/sula-timeline-list/sula-timeline-list.tsx"],"sourcesContent":["export interface SulaTimelineListItem {\n weekdayText?: SulaTimelineListItemWeekdayText;\n iconStatus?: SulaTimelineListItemIconStatus;\n title: string;\n message?: string;\n hasLink?: boolean;\n}\n\nexport interface SulaTimelineListItemWeekdayText {\n weekday: string;\n day: number;\n}\n\nexport enum SulaTimelineListItemIconStatus {\n Success = 'success',\n Error = 'error',\n Warning = 'warning',\n}\n",":host {\n display: block;\n}\n","import { Component, Event, EventEmitter, Host, Prop, h } from '@stencil/core';\nimport { SulaTimelineListItem, SulaTimelineListItemIconStatus } from './model/sula-timeline-list.model';\n\n@Component({\n tag: 'sula-timeline-list',\n styleUrl: 'sula-timeline-list.scss',\n shadow: true,\n})\nexport class SulaTimelineList {\n /**\n * Timeline list. (Can be use with weekday text or icon with status)\n */\n @Prop({ mutable: true })\n sulaTimelineList: SulaTimelineListItem[] = [];\n\n /**\n * Event emitted when item is clicked.\n */\n @Event()\n itemClicked: EventEmitter<SulaTimelineListItem>;\n\n handleItemClick = (item: SulaTimelineListItem) => {\n if (!item.hasLink) return;\n this.itemClicked.emit(item);\n };\n\n getIconBackgroundColorByStatus(status: SulaTimelineListItemIconStatus) {\n const iconColorByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'bg-surface-on-body-feedback-success',\n [SulaTimelineListItemIconStatus.Warning]: 'bg-surface-on-body-feedback-alert',\n [SulaTimelineListItemIconStatus.Error]: 'bg-surface-on-body-feedback-error',\n };\n\n return iconColorByStatus[status];\n }\n\n getIconByStatus(status: SulaTimelineListItemIconStatus) {\n const iconByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'ph ph-check-circle',\n [SulaTimelineListItemIconStatus.Warning]: 'ph ph-warning',\n [SulaTimelineListItemIconStatus.Error]: 'ph ph-warning-circle',\n };\n\n return iconByStatus[status];\n }\n\n getIconColorByStatus(status: SulaTimelineListItemIconStatus) {\n const iconByStatus = {\n [SulaTimelineListItemIconStatus.Success]: 'text-feedback-success',\n [SulaTimelineListItemIconStatus.Warning]: 'text-feedback-alert',\n [SulaTimelineListItemIconStatus.Error]: 'text-feedback-error',\n };\n\n return iconByStatus[status];\n }\n\n render() {\n return (\n <Host>\n <div class=\"flex flex-col bg-surface-on-body px-24 py-32 w-fit rounded-md\">\n {this.sulaTimelineList.map((item, index) => {\n const isLastItem = index === this.sulaTimelineList.length - 1;\n\n return (\n <div\n class={{\n 'relative timeline-item': true,\n 'cursor-pointer group': item.hasLink,\n }}\n onClick={() => this.handleItemClick(item)}\n >\n <div class=\"flex space-x-24 items-center justify-between flex-row w-full\">\n <div class=\"relative flex flex-row space-x-24 items-center\">\n <div class=\"relative\">\n <div\n class={{\n 'rounded-full h-56 w-56 bg-surface-body flex justify-center items-center relative z-10': true,\n 'p-6': !!item.iconStatus,\n }}\n >\n {item.weekdayText && (\n <div class=\"flex flex-col justify-center items-center space-y-4\">\n <span class=\"text-text-secondary text-xs leading-3\">{item.weekdayText.weekday}</span>\n <span class=\"text-xl leading-5 text-text-primary\">{item.weekdayText.day}</span>\n </div>\n )}\n\n {item.iconStatus && (\n <div\n class={{\n 'flex justify-center items-center w-44 h-44 rounded-full': true,\n [this.getIconBackgroundColorByStatus(item.iconStatus)]: true,\n }}\n >\n <div class=\"flex justify-center items-center leading-6 w-44\">\n <sula-icon icon={this.getIconByStatus(item.iconStatus)} customClass={`${this.getIconColorByStatus(item.iconStatus)} text-2xl`}></sula-icon>\n </div>\n </div>\n )}\n </div>\n </div>\n\n <div class=\"flex flex-col\">\n <span class=\"text-text-primary font-bold text-base leading-4\">{item.title}</span>\n {item.message && <span class=\"text-text-secondary text-base leading-4 mt-4\">{item.message}</span>}\n </div>\n </div>\n\n {item.hasLink && (\n <div\n class={{\n 'px-[6px] py-2 rounded-full leading-6 flex items-center justify-center margin-left': true,\n 'group-hover:bg-states-empty-bg-hover transition': item.hasLink,\n }}\n >\n <sula-icon icon=\"ph ph-caret-right\" customClass=\"text-2xl text-text-primary\"></sula-icon>\n </div>\n )}\n </div>\n\n {!isLastItem && <div class=\"absolute bg-surface-body left-[28px] top-56 w-2 h-full\"></div>}\n\n {!isLastItem && <div class=\"h-24\"></div>}\n </div>\n );\n })}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
@@ -1,5 +1,5 @@
1
1
  const NAMESPACE = 'webcomponents';
2
- const BUILD = /* webcomponents */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true, watchCallback: false };
2
+ const BUILD = /* webcomponents */ { hydratedSelectorName: "hydrated", lazyLoad: true, updatable: true};
3
3
 
4
4
  const globalScripts = () => {};
5
5
  const globalStyles = "*,:after,:before{--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(59,130,246,.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;}::backdrop{--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(59,130,246,.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{border:0 solid #e5e7eb;box-sizing:border-box }: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,figure,h1,h2,h3,h4,h5,h6,hr,p,pre{margin:0}fieldset{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}:root{text-rendering:optimizeLegibility}";
@@ -988,6 +988,7 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
988
988
  `Couldn't find host element for "${cmpMeta.$tagName$}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/stenciljs/core/issues/5457).`
989
989
  );
990
990
  }
991
+ const elm = hostRef.$hostElement$ ;
991
992
  const oldVal = hostRef.$instanceValues$.get(propName);
992
993
  const flags = hostRef.$flags$;
993
994
  const instance = hostRef.$lazyInstance$ ;
@@ -999,6 +1000,18 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
999
1000
  if ((!(flags & 8 /* isConstructingInstance */) || oldVal === void 0) && didValueChange) {
1000
1001
  hostRef.$instanceValues$.set(propName, newVal);
1001
1002
  if (instance) {
1003
+ if (cmpMeta.$watchers$ && flags & 128 /* isWatchReady */) {
1004
+ const watchMethods = cmpMeta.$watchers$[propName];
1005
+ if (watchMethods) {
1006
+ watchMethods.map((watchMethodName) => {
1007
+ try {
1008
+ instance[watchMethodName](newVal, oldVal, propName);
1009
+ } catch (e) {
1010
+ consoleError(e, elm);
1011
+ }
1012
+ });
1013
+ }
1014
+ }
1002
1015
  if ((flags & (2 /* hasRendered */ | 16 /* isQueuedForUpdate */)) === 2 /* hasRendered */) {
1003
1016
  if (instance.componentShouldUpdate) {
1004
1017
  if (instance.componentShouldUpdate(newVal, oldVal, propName) === false) {
@@ -1015,7 +1028,10 @@ var setValue = (ref, propName, newVal, cmpMeta) => {
1015
1028
  var proxyComponent = (Cstr, cmpMeta, flags) => {
1016
1029
  var _a, _b;
1017
1030
  const prototype = Cstr.prototype;
1018
- if (cmpMeta.$members$ || BUILD.watchCallback) {
1031
+ if (cmpMeta.$members$ || (cmpMeta.$watchers$ || Cstr.watchers)) {
1032
+ if (Cstr.watchers && !cmpMeta.$watchers$) {
1033
+ cmpMeta.$watchers$ = Cstr.watchers;
1034
+ }
1019
1035
  const members = Object.entries((_a = cmpMeta.$members$) != null ? _a : {});
1020
1036
  members.map(([memberName, [memberFlags]]) => {
1021
1037
  if ((memberFlags & 31 /* Prop */ || (flags & 2 /* proxyState */) && memberFlags & 32 /* State */)) {
@@ -1157,6 +1173,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1157
1173
  throw new Error(`Constructor for "${cmpMeta.$tagName$}#${hostRef.$modeName$}" was not found`);
1158
1174
  }
1159
1175
  if (!Cstr.isProxied) {
1176
+ {
1177
+ cmpMeta.$watchers$ = Cstr.watchers;
1178
+ }
1160
1179
  proxyComponent(Cstr, cmpMeta, 2 /* proxyState */);
1161
1180
  Cstr.isProxied = true;
1162
1181
  }
@@ -1172,6 +1191,9 @@ var initializeComponent = async (elm, hostRef, cmpMeta, hmrVersionId) => {
1172
1191
  {
1173
1192
  hostRef.$flags$ &= -9 /* isConstructingInstance */;
1174
1193
  }
1194
+ {
1195
+ hostRef.$flags$ |= 128 /* isWatchReady */;
1196
+ }
1175
1197
  endNewInstance();
1176
1198
  fireConnectedCallback(hostRef.$lazyInstance$, elm);
1177
1199
  } else {
@@ -1296,6 +1318,7 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1296
1318
  let hasSlotRelocation = false;
1297
1319
  lazyBundles.map((lazyBundle) => {
1298
1320
  lazyBundle[1].map((compactMeta) => {
1321
+ var _a2;
1299
1322
  const cmpMeta = {
1300
1323
  $flags$: compactMeta[0],
1301
1324
  $tagName$: compactMeta[1],
@@ -1311,6 +1334,9 @@ var bootstrapLazy = (lazyBundles, options = {}) => {
1311
1334
  {
1312
1335
  cmpMeta.$listeners$ = compactMeta[3];
1313
1336
  }
1337
+ {
1338
+ cmpMeta.$watchers$ = (_a2 = compactMeta[4]) != null ? _a2 : {};
1339
+ }
1314
1340
  const tagName = cmpMeta.$tagName$;
1315
1341
  const HostElement = class extends HTMLElement {
1316
1342
  // StencilLazyHost
@@ -1443,6 +1469,6 @@ var hostListenerOpts = (flags) => supportsListenerOptions ? {
1443
1469
  var setNonce = (nonce) => plt.$nonce$ = nonce;
1444
1470
 
1445
1471
  export { Host as H, getElement as a, bootstrapLazy as b, createEvent as c, globalScripts as g, h, promiseResolve as p, registerInstance as r, setNonce as s };
1446
- //# sourceMappingURL=index-Yyeke16a.js.map
1472
+ //# sourceMappingURL=index-or7qTZgT.js.map
1447
1473
 
1448
- //# sourceMappingURL=index-Yyeke16a.js.map
1474
+ //# sourceMappingURL=index-or7qTZgT.js.map