@sula-tech/webcomponents 0.21.0 → 0.22.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 (122) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/sula-avatar_32.cjs.entry.js +105 -66
  3. package/dist/cjs/sula-avatar_32.cjs.entry.js.map +1 -1
  4. package/dist/cjs/sula-toast-stack.cjs.entry.js +4 -4
  5. package/dist/cjs/sula-toast.cjs.entry.js +2 -2
  6. package/dist/cjs/webcomponents.cjs.js +1 -1
  7. package/dist/collection/components/sula-calendar/sula-calendar.css +1 -1
  8. package/dist/collection/components/sula-calendar/sula-calendar.js +47 -2
  9. package/dist/collection/components/sula-calendar/sula-calendar.js.map +1 -1
  10. package/dist/collection/components/sula-calendar/sula-calendar.stories.js +36 -0
  11. package/dist/collection/components/sula-calendar/sula-calendar.stories.js.map +1 -1
  12. package/dist/collection/components/sula-checkbox/sula-checkbox.js +3 -3
  13. package/dist/collection/components/sula-chip/model/sula-chip.model.js +5 -0
  14. package/dist/collection/components/sula-chip/model/sula-chip.model.js.map +1 -1
  15. package/dist/collection/components/sula-chip/sula-chip.css +1 -1
  16. package/dist/collection/components/sula-chip/sula-chip.js +40 -5
  17. package/dist/collection/components/sula-chip/sula-chip.js.map +1 -1
  18. package/dist/collection/components/sula-chip/sula-chip.stories.js +14 -1
  19. package/dist/collection/components/sula-chip/sula-chip.stories.js.map +1 -1
  20. package/dist/collection/components/sula-dropdown/sula-dropdown.js +3 -3
  21. package/dist/collection/components/sula-icon/sula-icon.css +1 -1
  22. package/dist/collection/components/sula-icon/sula-icon.js +1 -1
  23. package/dist/collection/components/sula-icon-picker/sula-icon-picker.js +2 -2
  24. package/dist/collection/components/sula-loader/sula-loader.js +1 -1
  25. package/dist/collection/components/sula-menu/sula-menu.js +8 -8
  26. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
  27. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +1 -1
  28. package/dist/collection/components/sula-progress-bar/sula-progress-bar.js +2 -2
  29. package/dist/collection/components/sula-radio-button/sula-radio-button.js +2 -2
  30. package/dist/collection/components/sula-search-bar/sula-search-bar.js +2 -2
  31. package/dist/collection/components/sula-segmented-control/sula-segmented-control.js +1 -1
  32. package/dist/collection/components/sula-switch/sula-switch.js +4 -4
  33. package/dist/collection/components/sula-table/sula-table.js +3 -3
  34. package/dist/collection/components/sula-table-body/sula-table-body.js +1 -1
  35. package/dist/collection/components/sula-table-cell/sula-table-cell.js +2 -2
  36. package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.js +2 -2
  37. package/dist/collection/components/sula-table-header/sula-table-header.js +1 -1
  38. package/dist/collection/components/sula-table-row/sula-table-row.js +1 -1
  39. package/dist/collection/components/sula-tag/sula-tag.js +3 -3
  40. package/dist/collection/components/sula-textarea/sula-textarea.js +6 -6
  41. package/dist/collection/components/sula-textfield/sula-textfield.css +1 -1
  42. package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
  43. package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
  44. package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +1 -1
  45. package/dist/collection/components/sula-toast/sula-toast.js +2 -2
  46. package/dist/collection/components/sula-toast-stack/sula-toast-stack.js +4 -4
  47. package/dist/collection/components/sula-toggle/sula-toggle.js +1 -1
  48. package/dist/collection/components/sula-tooltip/sula-tooltip.js +1 -1
  49. package/dist/components/{p-DtVQ10Ux.js → p-CXm0qTFO.js} +4 -4
  50. package/dist/components/{p-DtVQ10Ux.js.map → p-CXm0qTFO.js.map} +1 -1
  51. package/dist/components/{p-B_NGmHsm.js → p-D5G0T47I.js} +5 -5
  52. package/dist/components/{p-B_NGmHsm.js.map → p-D5G0T47I.js.map} +1 -1
  53. package/dist/components/{p-rm8YKiRh.js → p-DGAtNvje.js} +6 -6
  54. package/dist/components/p-DGAtNvje.js.map +1 -0
  55. package/dist/components/{p-VozP-C7p.js → p-DwyYG9oc.js} +5 -5
  56. package/dist/components/{p-VozP-C7p.js.map → p-DwyYG9oc.js.map} +1 -1
  57. package/dist/components/{p-rCU8ay8s.js → p-MPkJUrNl.js} +3 -3
  58. package/dist/components/{p-rCU8ay8s.js.map → p-MPkJUrNl.js.map} +1 -1
  59. package/dist/components/{p-BlH9b-mx.js → p-fAOl4EhI.js} +5 -5
  60. package/dist/components/{p-BlH9b-mx.js.map → p-fAOl4EhI.js.map} +1 -1
  61. package/dist/components/{p-DaG0HavP.js → p-jplrktAF.js} +4 -4
  62. package/dist/components/{p-DaG0HavP.js.map → p-jplrktAF.js.map} +1 -1
  63. package/dist/components/{p-BjgwRn5o.js → p-t7f_qmad.js} +7 -7
  64. package/dist/components/{p-BjgwRn5o.js.map → p-t7f_qmad.js.map} +1 -1
  65. package/dist/components/sula-avatar.js +1 -1
  66. package/dist/components/sula-badge.js +1 -1
  67. package/dist/components/sula-breadcrumb.js +1 -1
  68. package/dist/components/sula-button.js +1 -1
  69. package/dist/components/sula-calendar.js +31 -5
  70. package/dist/components/sula-calendar.js.map +1 -1
  71. package/dist/components/sula-checkbox.js +4 -4
  72. package/dist/components/sula-chip.js +22 -7
  73. package/dist/components/sula-chip.js.map +1 -1
  74. package/dist/components/sula-dropdown.js +1 -1
  75. package/dist/components/sula-icon-picker.js +6 -6
  76. package/dist/components/sula-icon.js +1 -1
  77. package/dist/components/sula-loader.js +1 -1
  78. package/dist/components/sula-menu-select-list.js +1 -1
  79. package/dist/components/sula-menu.js +9 -9
  80. package/dist/components/sula-modal.js +3 -3
  81. package/dist/components/sula-progress-bar.js +3 -3
  82. package/dist/components/sula-radio-button.js +2 -2
  83. package/dist/components/sula-search-bar.js +1 -1
  84. package/dist/components/sula-segmented-control.js +2 -2
  85. package/dist/components/sula-switch.js +4 -4
  86. package/dist/components/sula-table-body.js +1 -1
  87. package/dist/components/sula-table-cell.js +2 -2
  88. package/dist/components/sula-table-head-cell.js +2 -2
  89. package/dist/components/sula-table-header.js +1 -1
  90. package/dist/components/sula-table-row.js +1 -1
  91. package/dist/components/sula-table.js +3 -3
  92. package/dist/components/sula-tag.js +4 -4
  93. package/dist/components/sula-textarea.js +6 -6
  94. package/dist/components/sula-textfield.js +1 -1
  95. package/dist/components/sula-tiles.js +2 -2
  96. package/dist/components/sula-timeline-list.js +2 -2
  97. package/dist/components/sula-toast-stack.js +6 -6
  98. package/dist/components/sula-toast.js +1 -1
  99. package/dist/components/sula-toggle.js +2 -2
  100. package/dist/components/sula-tooltip.js +2 -2
  101. package/dist/esm/loader.js +1 -1
  102. package/dist/esm/sula-avatar_32.entry.js +105 -66
  103. package/dist/esm/sula-avatar_32.entry.js.map +1 -1
  104. package/dist/esm/sula-toast-stack.entry.js +4 -4
  105. package/dist/esm/sula-toast.entry.js +2 -2
  106. package/dist/esm/webcomponents.js +1 -1
  107. package/dist/types/components/sula-calendar/sula-calendar.d.ts +6 -0
  108. package/dist/types/components/sula-calendar/sula-calendar.stories.d.ts +10 -0
  109. package/dist/types/components/sula-chip/model/sula-chip.model.d.ts +4 -0
  110. package/dist/types/components/sula-chip/sula-chip.d.ts +5 -1
  111. package/dist/types/components/sula-chip/sula-chip.stories.d.ts +12 -1
  112. package/dist/types/components.d.ts +22 -2
  113. package/dist/webcomponents/{p-0004eff8.entry.js → p-22b10b91.entry.js} +264 -203
  114. package/dist/webcomponents/p-22b10b91.entry.js.map +1 -0
  115. package/dist/webcomponents/{p-9a8a1133.entry.js → p-c552c435.entry.js} +16 -16
  116. package/dist/webcomponents/{p-aafb83bd.entry.js → p-df271629.entry.js} +6 -6
  117. package/dist/webcomponents/webcomponents.esm.js +5 -3
  118. package/package.json +1 -1
  119. package/dist/components/p-rm8YKiRh.js.map +0 -1
  120. package/dist/webcomponents/p-0004eff8.entry.js.map +0 -1
  121. /package/dist/webcomponents/{p-9a8a1133.entry.js.map → p-c552c435.entry.js.map} +0 -0
  122. /package/dist/webcomponents/{p-aafb83bd.entry.js.map → p-df271629.entry.js.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
2
- import { d as defineCustomElement$2 } from './p-DaG0HavP.js';
3
- import { d as defineCustomElement$1 } from './p-BlH9b-mx.js';
2
+ import { d as defineCustomElement$2 } from './p-jplrktAF.js';
3
+ import { d as defineCustomElement$1 } from './p-fAOl4EhI.js';
4
4
 
5
5
  const sulaDropdownCss = "*,: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{font-family:Figtree;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,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{display:block}.dropdown-focus{outline:2px solid var(--color-feedback-informational)!important;outline-offset:2px!important}.dropdown-error{outline:2px solid var(--color-feedback-error)!important;outline-offset:2px!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:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.bottom-\\[72px\\]{bottom:72px}.left-0{left:0}.top-\\[72px\\]{top:72px}.z-50{z-index:50}.m-0{margin:0}.ml-8{margin-left:.5rem}.flex{display:flex}.h-\\[72px\\]{height:72px}.w-full{width:100%}.cursor-pointer{cursor:pointer}.resize{resize:both}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-8{gap:.5rem}.overflow-auto{overflow:auto}.rounded-sm,.rounded-xl{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}.p-0{padding:0}.px-16{padding-left:1rem;padding-right:1rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.py-16{padding-bottom:1rem;padding-top:1rem}.pt-4{padding-top:.25rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.font-bold{font-weight:700}.leading-4{line-height:1rem}.leading-6{line-height:1.5rem}.text-icon-disabled{color:var(--color-icon-disabled)}.text-text-disabled{color:var(--color-text-disabled)}.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)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}.placeholder\\:text-text-secondary::placeholder{color:var(--color-text-secondary)}.rounded-sm{border-radius:.75rem}.py-12{padding-bottom:.75rem;padding-top:.75rem}.text-text-brand{color:var(--color-text-brand)}.hover\\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}.mt-8{margin-top:.5rem}.grid{display:grid}.h-56{height:3.5rem}.w-56{width:3.5rem}.gap-12{gap:.75rem}.overflow-y-auto{overflow-y:auto}.border-2{border-width:2px}.border-b{border-bottom-width:1px}.border-brand-primary{border-color:var(--color-brand-primary)}.bg-surface-on-body-brand{background-color:var(--color-surface-on-body-brand)}.p-16{padding:1rem}.p-32{padding:2rem}.text-center{text-align:center}.text-base-label-small-regular{font-size:.875rem;font-weight:400;letter-spacing:0;line-height:14px}.text-brand-primary{color:var(--color-brand-primary)}.text-feedback-error{color:var(--color-feedback-error)}.text-icon-primary{color:var(--color-icon-primary)}.hover\\:border-brand-primary:hover{border-color:var(--color-brand-primary)}.hover\\:bg-surface-on-body-brand:hover{background-color:var(--color-surface-on-body-brand)}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format(\"truetype\")}.h-44{height:2.75rem}.flex-row{flex-direction:row}.space-x-12>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.75rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.75rem*var(--tw-space-x-reverse))}.rounded-xxl{border-radius:18.75rem}.border-surface-on-body{border-color:var(--color-surface-on-body)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.caret-brand-primary{caret-color:var(--color-brand-primary)}.blur{--tw-blur:blur(8px);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.group:hover .group-hover\\:text-brand-primary{color:var(--color-brand-primary)}";
6
6
 
@@ -147,13 +147,13 @@ const SulaDropdown = /*@__PURE__*/ proxyCustomElement(class SulaDropdown extends
147
147
  }
148
148
  render() {
149
149
  var _a;
150
- return (h(Host, { key: '9da83d1a331f6b5b3e7c9c36656b3828911cad27', ref: node => (this.node = node) }, h("div", { key: '5b977c492a1a1cca6f9a1477cd34cb305c785586', class: {
150
+ return (h(Host, { key: 'e849abd7e311239168abc12a37a99c6179ce28ca', ref: node => (this.node = node) }, h("div", { key: 'f11b936209f179ab6c47afca2e2baf436a399b64', class: {
151
151
  'flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative': true,
152
152
  'bg-surface-body cursor-pointer': !this.disabled,
153
153
  'bg-states-bg-disabled': this.disabled,
154
154
  'dropdown-focus': this.isFocused && !this.hasError,
155
155
  'dropdown-error': this.hasError && !this.disabled,
156
- }, onClick: this.handleClick, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: '82ebd74c2d5a19ff38a541a0732c5b8bc85e9c4f', class: "flex flex-col w-full" }, h("label", { key: '0f72ee4508a36f26b247dc9ecb4c5e05702308f0', class: {
156
+ }, onClick: this.handleClick, tabIndex: 0, onFocus: this.handleFocus, onBlur: this.handleBlur }, h("div", { key: 'fcb3b8fe054cd8705a45ec42c6e86fda9e5ca5d9', class: "flex flex-col w-full" }, h("label", { key: 'cd4ed2b14fc138b20fc532d4bb75fc980371468f', class: {
157
157
  'text-base leading-4': !this.selectedItem && !(this.searchable && this.showContent),
158
158
  'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showContent),
159
159
  'text-text-primary': !this.disabled,
@@ -162,7 +162,7 @@ const SulaDropdown = /*@__PURE__*/ proxyCustomElement(class SulaDropdown extends
162
162
  'flex items-center gap-8 text-base leading-4 pt-4': true,
163
163
  'text-text-primary': !this.disabled,
164
164
  'text-text-disabled': this.disabled,
165
- } }, this.selectedItem.icon && h("sula-icon", { icon: this.selectedItem.icon, customClass: "text-lg" }), this.selectedItem.title)))), h("div", { key: '8a20c67149f2b9dfe4bf653912c04d669030117d', class: "flex items-center justify-center ml-8 leading-6 text-2xl" }, h("sula-icon", { key: '8717153a21dc35f9e6408ac0c93869c263354a8b', icon: `ph ph-caret-${this.showContent ? 'up' : 'down'}`, customClass: `${this.getIconClass()} text-2xl` })), this.showContent && (h("div", { key: '3333c25c53c748579f3095da6fc9d704796ad1d2', class: {
165
+ } }, this.selectedItem.icon && h("sula-icon", { icon: this.selectedItem.icon, customClass: "text-lg" }), this.selectedItem.title)))), h("div", { key: '4e75978e9456b72b00f380bd841185bd92f814c7', class: "flex items-center justify-center ml-8 leading-6 text-2xl" }, h("sula-icon", { key: '09cc5f0fa83abf1cc5bf735f0d319815d7c52b33', icon: `ph ph-caret-${this.showContent ? 'up' : 'down'}`, customClass: `${this.getIconClass()} text-2xl` })), this.showContent && (h("div", { key: '1b460ad5a9c81c264a3750880efd0a281cb61b4b', class: {
166
166
  'absolute z-50 left-0 w-full transition-all duration-200 ease-in-out': true,
167
167
  'bottom-[72px]': this.openUpward,
168
168
  'top-[72px]': !this.openUpward,
@@ -227,6 +227,6 @@ function defineCustomElement() {
227
227
  defineCustomElement();
228
228
 
229
229
  export { SulaDropdown as S, defineCustomElement as d };
230
- //# sourceMappingURL=p-BjgwRn5o.js.map
230
+ //# sourceMappingURL=p-t7f_qmad.js.map
231
231
 
232
- //# sourceMappingURL=p-BjgwRn5o.js.map
232
+ //# sourceMappingURL=p-t7f_qmad.js.map
@@ -1 +1 @@
1
- {"file":"p-BjgwRn5o.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,ohgBAAohgB;;MCQ/hgB,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,GAAA;;;;;;;;AAYE;;AAEG;AAEH,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEzB;;AAEG;AAEH,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEzB;;AAEG;AAEH,QAAA,IAAK,CAAA,KAAA,GAAuB,EAAE;AAc9B;;AAEG;AAEH,QAAA,IAAa,CAAA,aAAA,GAAW,GAAG;AAE3B;;AAEG;AAEH,QAAA,IAAgB,CAAA,gBAAA,GAAW,GAAG;AAQ9B;;AAEG;AAEH,QAAA,IAAa,CAAA,aAAA,GAAY,IAAI;AAE7B;;AAEG;AAEH,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AA8BnB,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AAGjB,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAGvB,QAAA,IAAa,CAAA,aAAA,GAAuB,EAAE;AAGtC,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAoE3B,QAAA,IAAW,CAAA,WAAA,GAAG,MAAK;YACjB,IAAI,IAAI,CAAC,QAAQ;gBAAE;AAEnB,YAAA,IAAI,CAAC,eAAe,CAAC,IAAI,EAAE;AAE3B,YAAA,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,C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,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK;AAC/F,YAAA,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAE3F,IAAI,aAAa,EAAE;AACjB,gBAAA,OAAO,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,iGAAiG,kCAAkC;;AAGvJ,YAAA,QACE,CAAA,CAAA,uBAAA,EAAA,EACE,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,aAAa,EAC7B,aAAa,EAAE,IAAI,CAAC,YAAY,EAChC,cAAc,EAAE,IAAI,CAAC,kBAAkB,EAAA,CAChB;SAE5B,GAAG,CACL,CACG,CACP,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-dropdown/sula-dropdown.scss?tag=sula-dropdown&encapsulation=shadow","src/components/sula-dropdown/sula-dropdown.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.dropdown-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.dropdown-error {\n outline: 2px solid var(--color-feedback-error) !important;\n outline-offset: 2px !important;\n}\n","import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaMenuListItem, SulaMenuSelectListCustomEvent } from '../../components';\n\n@Component({\n tag: 'sula-dropdown',\n styleUrl: 'sula-dropdown.scss',\n shadow: true,\n})\nexport class SulaDropdown {\n /**\n * Dropdown label\n */\n @Prop({ mutable: true })\n label: string;\n\n /**\n * Dropdown is disabled\n */\n @Prop({ mutable: true })\n disabled: boolean = false;\n\n /**\n * Shows the error state, highlighting the dropdown border in red\n */\n @Prop({ mutable: true, reflect: true })\n hasError: boolean = false;\n\n /**\n * Items for list\n */\n @Prop({ mutable: true })\n items: SulaMenuListItem[] = [];\n\n /**\n * Value for dropdown\n */\n @Prop({ mutable: true })\n value?: SulaMenuListItem;\n\n /**\n * Enable search/filter functionality in dropdown\n */\n @Prop({ reflect: true })\n searchable?: boolean;\n\n /**\n * Maximum height for dropdown menu in pixels\n */\n @Prop()\n menuMaxHeight: number = 260;\n\n /**\n * Maximum height for custom content area in pixels\n */\n @Prop()\n contentMaxHeight: number = 260;\n\n /**\n * Enable custom content via slot instead of items list\n */\n @Prop({ reflect: true })\n customContent?: boolean;\n\n /**\n * Close dropdown when an item is selected or content is clicked\n */\n @Prop()\n closeOnSelect: boolean = true;\n\n /**\n * Show or hide dropdown content\n */\n @Prop({ mutable: true, reflect: true })\n showContent = false;\n\n /**\n * Event emitted when dropdown is clicked\n */\n @Event()\n dropdownClicked: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused\n */\n @Event()\n dropdownFocused: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused out\n */\n @Event()\n dropdownFocusedOut: EventEmitter<void>;\n\n /**\n * Event emitted when item is selected\n */\n @Event()\n menuItemSelected: EventEmitter<SulaMenuListItem>;\n\n @State()\n selectedItem?: SulaMenuListItem;\n\n @State()\n isFocused = false;\n\n @State()\n searchTerm: string = '';\n\n @State()\n filteredItems: SulaMenuListItem[] = [];\n\n @State()\n openUpward: boolean = false;\n\n node?: HTMLElement;\n searchInputRef?: HTMLInputElement;\n\n @Watch('value')\n handleValueChange() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n @Watch('showContent')\n handleShowContentChange(newValue: boolean) {\n if (!newValue) {\n this.searchTerm = '';\n this.filteredItems = [];\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.node) return;\n\n const path = event.composedPath();\n const clickInside = path.some(el => el === this.node);\n\n if (!clickInside) {\n this.showContent = false;\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n if (this.showContent) {\n this.calculateMenuPosition();\n }\n }\n\n calculateMenuPosition() {\n if (!this.node) return;\n\n const rect = this.node.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n const buffer = 60;\n const requiredSpace = (this.customContent ? this.contentMaxHeight : this.menuMaxHeight) + buffer;\n\n this.openUpward = spaceBelow < requiredSpace && (spaceAbove > requiredSpace || spaceAbove > spaceBelow);\n }\n\n componentWillLoad() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n componentDidRender() {\n if (this.showContent) {\n this.calculateMenuPosition();\n\n if (this.searchable && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n }\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.dropdownClicked.emit();\n\n if (this.customContent || this.items.length > 0) {\n this.showContent = !this.showContent;\n }\n\n if (this.searchable && this.showContent && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n };\n\n handleItemSelected = (item: SulaMenuSelectListCustomEvent<SulaMenuListItem>) => {\n this.selectedItem = item.detail;\n this.searchTerm = '';\n this.menuItemSelected.emit(item.detail);\n\n if (this.closeOnSelect) {\n setTimeout(() => {\n this.showContent = false;\n }, 0);\n }\n };\n\n filterItems = () => {\n if (!this.searchTerm.trim()) {\n return this.items;\n }\n const term = this.searchTerm.toLowerCase();\n return this.items.filter(item => item.title.toLowerCase().includes(term));\n };\n\n handleSearchInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.searchTerm = target.value;\n this.filteredItems = this.filterItems();\n };\n\n getIconClass() {\n if (this.disabled) return 'text-icon-disabled';\n\n return 'text-text-primary';\n }\n\n handleFocus = () => {\n if (this.disabled) return;\n\n this.isFocused = true;\n this.dropdownFocused.emit();\n };\n\n handleBlur = () => {\n if (this.disabled) return;\n\n this.isFocused = false;\n this.dropdownFocusedOut.emit();\n };\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div\n class={{\n 'flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative': true,\n 'bg-surface-body cursor-pointer': !this.disabled,\n 'bg-states-bg-disabled': this.disabled,\n 'dropdown-focus': this.isFocused && !this.hasError,\n 'dropdown-error': this.hasError && !this.disabled,\n }}\n onClick={this.handleClick}\n tabIndex={0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <div class=\"flex flex-col w-full\">\n <label\n class={{\n 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showContent),\n 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showContent),\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.label}\n </label>\n\n {this.searchable && this.showContent ? (\n <input\n ref={el => (this.searchInputRef = el)}\n type=\"text\"\n value={this.searchTerm}\n onInput={this.handleSearchInput}\n placeholder={this.selectedItem?.title || ''}\n class=\"w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4\"\n />\n ) : (\n !!this.selectedItem && (\n <span\n class={{\n 'flex items-center gap-8 text-base leading-4 pt-4': true,\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.selectedItem.icon && <sula-icon icon={this.selectedItem.icon} customClass=\"text-lg\"></sula-icon>}\n {this.selectedItem.title}\n </span>\n )\n )}\n </div>\n <div class=\"flex items-center justify-center ml-8 leading-6 text-2xl\">\n <sula-icon icon={`ph ph-caret-${this.showContent ? 'up' : 'down'}`} customClass={`${this.getIconClass()} text-2xl`}></sula-icon>\n </div>\n\n {this.showContent && (\n <div\n class={{\n 'absolute z-50 left-0 w-full transition-all duration-200 ease-in-out': true,\n 'bottom-[72px]': this.openUpward,\n 'top-[72px]': !this.openUpward,\n }}\n onClick={!this.closeOnSelect ? (e: Event) => e.stopPropagation() : undefined}\n >\n {this.customContent ? (\n <div class=\"bg-surface-body border border-line-general rounded-sm overflow-auto\" style={{ maxHeight: `${this.contentMaxHeight}px` }}>\n <slot></slot>\n </div>\n ) : (\n (() => {\n const itemsToShow = this.searchable && this.searchTerm.trim() ? this.filteredItems : this.items;\n const showNoResults = this.searchable && this.searchTerm.trim() && itemsToShow.length === 0;\n\n if (showNoResults) {\n return <div class=\"bg-surface-body border border-line-general rounded-sm py-16 px-24 text-base text-text-secondary\">Nenhum resultado encontrado</div>;\n }\n\n return (\n <sula-menu-select-list\n items={itemsToShow}\n fullWidth={true}\n maxHeight={this.menuMaxHeight}\n selectedValue={this.selectedItem}\n onItemSelected={this.handleItemSelected}\n ></sula-menu-select-list>\n );\n })()\n )}\n </div>\n )}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"p-t7f_qmad.js","mappings":";;;;AAAA,MAAM,eAAe,GAAG,ohgBAAohgB;;MCQ/hgB,YAAY,iBAAAA,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,GAAA;;;;;;;;AAYE;;AAEG;AAEH,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEzB;;AAEG;AAEH,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAEzB;;AAEG;AAEH,QAAA,IAAK,CAAA,KAAA,GAAuB,EAAE;AAc9B;;AAEG;AAEH,QAAA,IAAa,CAAA,aAAA,GAAW,GAAG;AAE3B;;AAEG;AAEH,QAAA,IAAgB,CAAA,gBAAA,GAAW,GAAG;AAQ9B;;AAEG;AAEH,QAAA,IAAa,CAAA,aAAA,GAAY,IAAI;AAE7B;;AAEG;AAEH,QAAA,IAAW,CAAA,WAAA,GAAG,KAAK;AA8BnB,QAAA,IAAS,CAAA,SAAA,GAAG,KAAK;AAGjB,QAAA,IAAU,CAAA,UAAA,GAAW,EAAE;AAGvB,QAAA,IAAa,CAAA,aAAA,GAAuB,EAAE;AAGtC,QAAA,IAAU,CAAA,UAAA,GAAY,KAAK;AAoE3B,QAAA,IAAW,CAAA,WAAA,GAAG,M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AAA,EAAG,IAAI,CAAC,gBAAgB,CAAI,EAAA,CAAA,EAAE,EAAA,EACjI,CAAa,CAAA,MAAA,EAAA,IAAA,CAAA,CACT,KAEN,CAAC,MAAK;YACJ,MAAM,WAAW,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,IAAI,CAAC,aAAa,GAAG,IAAI,CAAC,KAAK;AAC/F,YAAA,MAAM,aAAa,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC,UAAU,CAAC,IAAI,EAAE,IAAI,WAAW,CAAC,MAAM,KAAK,CAAC;YAE3F,IAAI,aAAa,EAAE;AACjB,gBAAA,OAAO,CAAK,CAAA,KAAA,EAAA,EAAA,KAAK,EAAC,iGAAiG,kCAAkC;;AAGvJ,YAAA,QACE,CAAA,CAAA,uBAAA,EAAA,EACE,KAAK,EAAE,WAAW,EAClB,SAAS,EAAE,IAAI,EACf,SAAS,EAAE,IAAI,CAAC,aAAa,EAC7B,aAAa,EAAE,IAAI,CAAC,YAAY,EAChC,cAAc,EAAE,IAAI,CAAC,kBAAkB,EAAA,CAChB;SAE5B,GAAG,CACL,CACG,CACP,CACG,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-dropdown/sula-dropdown.scss?tag=sula-dropdown&encapsulation=shadow","src/components/sula-dropdown/sula-dropdown.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.dropdown-focus {\n outline: 2px solid var(--color-feedback-informational) !important;\n outline-offset: 2px !important;\n}\n\n.dropdown-error {\n outline: 2px solid var(--color-feedback-error) !important;\n outline-offset: 2px !important;\n}\n","import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaMenuListItem, SulaMenuSelectListCustomEvent } from '../../components';\n\n@Component({\n tag: 'sula-dropdown',\n styleUrl: 'sula-dropdown.scss',\n shadow: true,\n})\nexport class SulaDropdown {\n /**\n * Dropdown label\n */\n @Prop({ mutable: true })\n label: string;\n\n /**\n * Dropdown is disabled\n */\n @Prop({ mutable: true })\n disabled: boolean = false;\n\n /**\n * Shows the error state, highlighting the dropdown border in red\n */\n @Prop({ mutable: true, reflect: true })\n hasError: boolean = false;\n\n /**\n * Items for list\n */\n @Prop({ mutable: true })\n items: SulaMenuListItem[] = [];\n\n /**\n * Value for dropdown\n */\n @Prop({ mutable: true })\n value?: SulaMenuListItem;\n\n /**\n * Enable search/filter functionality in dropdown\n */\n @Prop({ reflect: true })\n searchable?: boolean;\n\n /**\n * Maximum height for dropdown menu in pixels\n */\n @Prop()\n menuMaxHeight: number = 260;\n\n /**\n * Maximum height for custom content area in pixels\n */\n @Prop()\n contentMaxHeight: number = 260;\n\n /**\n * Enable custom content via slot instead of items list\n */\n @Prop({ reflect: true })\n customContent?: boolean;\n\n /**\n * Close dropdown when an item is selected or content is clicked\n */\n @Prop()\n closeOnSelect: boolean = true;\n\n /**\n * Show or hide dropdown content\n */\n @Prop({ mutable: true, reflect: true })\n showContent = false;\n\n /**\n * Event emitted when dropdown is clicked\n */\n @Event()\n dropdownClicked: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused\n */\n @Event()\n dropdownFocused: EventEmitter<void>;\n\n /**\n * Event emitted when dropdown is focused out\n */\n @Event()\n dropdownFocusedOut: EventEmitter<void>;\n\n /**\n * Event emitted when item is selected\n */\n @Event()\n menuItemSelected: EventEmitter<SulaMenuListItem>;\n\n @State()\n selectedItem?: SulaMenuListItem;\n\n @State()\n isFocused = false;\n\n @State()\n searchTerm: string = '';\n\n @State()\n filteredItems: SulaMenuListItem[] = [];\n\n @State()\n openUpward: boolean = false;\n\n node?: HTMLElement;\n searchInputRef?: HTMLInputElement;\n\n @Watch('value')\n handleValueChange() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n @Watch('showContent')\n handleShowContentChange(newValue: boolean) {\n if (!newValue) {\n this.searchTerm = '';\n this.filteredItems = [];\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.node) return;\n\n const path = event.composedPath();\n const clickInside = path.some(el => el === this.node);\n\n if (!clickInside) {\n this.showContent = false;\n }\n }\n\n @Listen('resize', { target: 'window' })\n handleWindowResize() {\n if (this.showContent) {\n this.calculateMenuPosition();\n }\n }\n\n calculateMenuPosition() {\n if (!this.node) return;\n\n const rect = this.node.getBoundingClientRect();\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - rect.bottom;\n const spaceAbove = rect.top;\n const buffer = 60;\n const requiredSpace = (this.customContent ? this.contentMaxHeight : this.menuMaxHeight) + buffer;\n\n this.openUpward = spaceBelow < requiredSpace && (spaceAbove > requiredSpace || spaceAbove > spaceBelow);\n }\n\n componentWillLoad() {\n if (this.value) {\n this.selectedItem = this.value;\n }\n }\n\n componentDidRender() {\n if (this.showContent) {\n this.calculateMenuPosition();\n\n if (this.searchable && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n }\n }\n\n handleClick = () => {\n if (this.disabled) return;\n\n this.dropdownClicked.emit();\n\n if (this.customContent || this.items.length > 0) {\n this.showContent = !this.showContent;\n }\n\n if (this.searchable && this.showContent && this.searchInputRef) {\n this.searchInputRef.focus();\n }\n };\n\n handleItemSelected = (item: SulaMenuSelectListCustomEvent<SulaMenuListItem>) => {\n this.selectedItem = item.detail;\n this.searchTerm = '';\n this.menuItemSelected.emit(item.detail);\n\n if (this.closeOnSelect) {\n setTimeout(() => {\n this.showContent = false;\n }, 0);\n }\n };\n\n filterItems = () => {\n if (!this.searchTerm.trim()) {\n return this.items;\n }\n const term = this.searchTerm.toLowerCase();\n return this.items.filter(item => item.title.toLowerCase().includes(term));\n };\n\n handleSearchInput = (event: Event) => {\n const target = event.target as HTMLInputElement;\n this.searchTerm = target.value;\n this.filteredItems = this.filterItems();\n };\n\n getIconClass() {\n if (this.disabled) return 'text-icon-disabled';\n\n return 'text-text-primary';\n }\n\n handleFocus = () => {\n if (this.disabled) return;\n\n this.isFocused = true;\n this.dropdownFocused.emit();\n };\n\n handleBlur = () => {\n if (this.disabled) return;\n\n this.isFocused = false;\n this.dropdownFocusedOut.emit();\n };\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div\n class={{\n 'flex justify-between items-center border border-line-input h-[72px] px-16 rounded-xl relative': true,\n 'bg-surface-body cursor-pointer': !this.disabled,\n 'bg-states-bg-disabled': this.disabled,\n 'dropdown-focus': this.isFocused && !this.hasError,\n 'dropdown-error': this.hasError && !this.disabled,\n }}\n onClick={this.handleClick}\n tabIndex={0}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <div class=\"flex flex-col w-full\">\n <label\n class={{\n 'text-base leading-4': !this.selectedItem && !(this.searchable && this.showContent),\n 'text-sm leading-4 font-bold': !!this.selectedItem || (this.searchable && this.showContent),\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.label}\n </label>\n\n {this.searchable && this.showContent ? (\n <input\n ref={el => (this.searchInputRef = el)}\n type=\"text\"\n value={this.searchTerm}\n onInput={this.handleSearchInput}\n placeholder={this.selectedItem?.title || ''}\n class=\"w-full text-base text-text-primary bg-transparent border-none outline-none placeholder:text-text-secondary p-0 m-0 leading-4 pt-4\"\n />\n ) : (\n !!this.selectedItem && (\n <span\n class={{\n 'flex items-center gap-8 text-base leading-4 pt-4': true,\n 'text-text-primary': !this.disabled,\n 'text-text-disabled': this.disabled,\n }}\n >\n {this.selectedItem.icon && <sula-icon icon={this.selectedItem.icon} customClass=\"text-lg\"></sula-icon>}\n {this.selectedItem.title}\n </span>\n )\n )}\n </div>\n <div class=\"flex items-center justify-center ml-8 leading-6 text-2xl\">\n <sula-icon icon={`ph ph-caret-${this.showContent ? 'up' : 'down'}`} customClass={`${this.getIconClass()} text-2xl`}></sula-icon>\n </div>\n\n {this.showContent && (\n <div\n class={{\n 'absolute z-50 left-0 w-full transition-all duration-200 ease-in-out': true,\n 'bottom-[72px]': this.openUpward,\n 'top-[72px]': !this.openUpward,\n }}\n onClick={!this.closeOnSelect ? (e: Event) => e.stopPropagation() : undefined}\n >\n {this.customContent ? (\n <div class=\"bg-surface-body border border-line-general rounded-sm overflow-auto\" style={{ maxHeight: `${this.contentMaxHeight}px` }}>\n <slot></slot>\n </div>\n ) : (\n (() => {\n const itemsToShow = this.searchable && this.searchTerm.trim() ? this.filteredItems : this.items;\n const showNoResults = this.searchable && this.searchTerm.trim() && itemsToShow.length === 0;\n\n if (showNoResults) {\n return <div class=\"bg-surface-body border border-line-general rounded-sm py-16 px-24 text-base text-text-secondary\">Nenhum resultado encontrado</div>;\n }\n\n return (\n <sula-menu-select-list\n items={itemsToShow}\n fullWidth={true}\n maxHeight={this.menuMaxHeight}\n selectedValue={this.selectedItem}\n onItemSelected={this.handleItemSelected}\n ></sula-menu-select-list>\n );\n })()\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, h, d as Host } from './p-DYfmicjp.js';
2
- import { d as defineCustomElement$2 } from './p-DaG0HavP.js';
2
+ import { d as defineCustomElement$2 } from './p-jplrktAF.js';
3
3
 
4
4
  var SulaAvatarSize;
5
5
  (function (SulaAvatarSize) {
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h, d as Host } from './p-DYfmicjp.js';
2
- import { d as defineCustomElement$2 } from './p-DaG0HavP.js';
2
+ import { d as defineCustomElement$2 } from './p-jplrktAF.js';
3
3
 
4
4
  var SulaBadgeStatus;
5
5
  (function (SulaBadgeStatus) {
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
2
- import { d as defineCustomElement$2 } from './p-DaG0HavP.js';
2
+ import { d as defineCustomElement$2 } from './p-jplrktAF.js';
3
3
 
4
4
  const sulaBreadcrumbCss = "*,: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{font-family:Figtree;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,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}: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:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.flex{display:flex}.inline-flex{display:inline-flex}.h-\\[5\\.25px\\]{height:5.25px}.w-\\[9px\\]{width:9px}.cursor-default{cursor:default}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.rounded{border-radius:.25rem}.px-12{padding-left:.75rem;padding-right:.75rem}.align-middle{vertical-align:middle}.text-paragraph-medium-bold{font-size:1rem;font-weight:700;letter-spacing:0;line-height:24px}.tracking-\\[-0\\.01em\\]{letter-spacing:-.01em}.text-brand-primary{color:var(--color-brand-primary)}.text-text-secondary{color:var(--color-text-secondary)}.no-underline{text-decoration-line:none}.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-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.hover\\:text-text-primary:hover{color:var(--color-text-primary)}.hover\\:underline:hover{text-decoration-line:underline}.hover\\:decoration-solid:hover{text-decoration-style:solid}.hover\\:decoration-1:hover{text-decoration-thickness:1px}.focus\\:rounded:focus{border-radius:.25rem}.focus\\:outline:focus{outline-style:solid}.focus\\:outline-2:focus{outline-width:2px}.focus\\:outline-offset-2:focus{outline-offset:2px}.focus\\:outline-feedback-informational:focus{outline-color:var(--color-feedback-informational)}.active\\:text-text-secondary:active{color:var(--color-text-secondary)}.active\\:underline:active{text-decoration-line:underline}.active\\:decoration-solid:active{text-decoration-style:solid}.active\\:decoration-1:active{text-decoration-thickness:1px}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format(\"truetype\")}";
5
5
 
@@ -1,4 +1,4 @@
1
- import { S as SulaButton$1, d as defineCustomElement$1 } from './p-DtVQ10Ux.js';
1
+ import { S as SulaButton$1, d as defineCustomElement$1 } from './p-CXm0qTFO.js';
2
2
 
3
3
  const SulaButton = SulaButton$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,9 +1,9 @@
1
1
  import { p as proxyCustomElement, H, c as createEvent, h, d as Host } from './p-DYfmicjp.js';
2
- import { d as defineCustomElement$2, a as SulaTextfieldStatus } from './p-rm8YKiRh.js';
2
+ import { d as defineCustomElement$2, a as SulaTextfieldStatus } from './p-DGAtNvje.js';
3
3
  import { S as SulaCalendarStatus } from './p-Cp_4qTxj.js';
4
- import { d as defineCustomElement$3 } from './p-DaG0HavP.js';
4
+ import { d as defineCustomElement$3 } from './p-jplrktAF.js';
5
5
 
6
- const sulaCalendarCss = "*,: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{font-family:Figtree;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,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{display:block}.calendar-panel{box-shadow:0 4px 19.7px 0 var(--color-box-shadow-shadow-color-2)}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-full{top:100%}.z-50{z-index:50}.mb-8{margin-bottom:.5rem}.mt-8{margin-top:.5rem}.inline{display:inline}.flex{display:flex}.grid{display:grid}.h-22{height:1.375rem}.h-28{height:1.75rem}.h-36{height:2.25rem}.w-1\\/2{width:50%}.w-28{width:1.75rem}.w-36{width:2.25rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.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}.gap-12{gap:.75rem}.gap-24{gap:1.5rem}.gap-y-8{row-gap:.5rem}.rounded-lg{border-radius:2.5rem}.rounded-xs{border-radius:.5rem}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-brand-primary{border-color:var(--color-brand-primary)}.border-line-general{border-color:var(--color-line-general)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body-brand{background-color:var(--color-surface-on-body-brand)}.p-24{padding:1.5rem}.px-4{padding-left:.25rem;padding-right:.25rem}.pt-8{padding-top:.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-label-medium-regular{font-size:1rem;font-weight:400;letter-spacing:0;line-height:20px}.text-label-small-regular{font-size:.875rem;font-weight:400;letter-spacing:0;line-height:16px}.capitalize{text-transform:capitalize}.text-neutral-neutral-1{color:var(--color-neutral-neutral-1)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.line-through{text-decoration-line:line-through}.opacity-50{opacity:.5}.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-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format(\"truetype\")}.mt-4{margin-top:.25rem}.hidden{display:none}.h-\\[72px\\]{height:72px}.cursor-pointer{cursor:pointer}.rounded-sm{border-radius:.75rem}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-transparent{background-color:transparent}.px-16{padding-left:1rem;padding-right:1rem}.pr-12{padding-right:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.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)}.caret-brand-primary{caret-color:var(--color-brand-primary)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}";
6
+ const sulaCalendarCss = "*,: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{font-family:Figtree;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,:host button,:host input,:host option,:host select,:host textarea{font-family:Figtree,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}:host{display:block}.calendar-panel{box-shadow:0 4px 19.7px 0 var(--color-box-shadow-shadow-color-2)}.calendar-panel.calendar-panel--compact{max-width:calc(100vw - 16px);width:356px}:root{--color-green-50:#f1f9f4;--color-green-100:#e6f4ed;--color-green-200:#cae7d8;--color-green-300:#a0d4b8;--color-green-400:#68bb8e;--color-green-500:#04843f;--color-green-600:#037236;--color-green-700:#03632f;--color-green-800:#035428;--color-green-900:#024521;--color-green-950:#012b15;--color-red-50:#fef6f6;--color-red-100:#fde8e8;--color-red-200:#fad1d1;--color-red-300:#f7abab;--color-red-400:#f17474;--color-red-500:#c80505;--color-red-600:#b30404;--color-red-700:#9f0404;--color-red-800:#860303;--color-red-900:#6d0303;--color-red-950:#330d00;--color-yellow-50:#fdf4e7;--color-yellow-100:#fcedd9;--color-yellow-200:#fae0bd;--color-yellow-300:#f6c788;--color-yellow-400:#f3b159;--color-yellow-500:#ef9928;--color-yellow-600:#e49226;--color-yellow-700:#d17e10;--color-yellow-800:#b46d0e;--color-yellow-900:#93590b;--color-yellow-950:#402705;--color-orange-50:#fef4f1;--color-orange-100:#fde8e2;--color-orange-200:#fbd2c6;--color-orange-300:#f8b4a0;--color-orange-400:#f58e70;--color-orange-500:#f05223;--color-orange-600:#ea4210;--color-orange-700:#d23b0e;--color-orange-800:#b5330c;--color-orange-900:#942a0a;--color-orange-950:#401204;--color-blue-50:#ecf0f9;--color-blue-100:#dde3f4;--color-blue-200:#b2c2e5;--color-blue-300:#7994d2;--color-blue-400:#4066bf;--color-blue-500:#001e64;--color-blue-600:#001c5c;--color-blue-700:#00174c;--color-blue-800:#00123d;--color-blue-900:#000f33;--color-blue-950:#000d2b;--color-ambar-50:#fff6eb;--color-ambar-100:#ffefdc;--color-ambar-200:#fedfb9;--color-ambar-300:#fdca8b;--color-ambar-400:#fdb359;--color-ambar-500:#fc9c26;--color-ambar-600:#ec8403;--color-ambar-700:#d87803;--color-ambar-800:#ba6803;--color-ambar-900:#975402;--color-ambar-950:#402301;--color-gray-50:#fff;--color-gray-100:#f3f4f4;--color-gray-200:#e5e6e6;--color-gray-300:#bfc0c0;--color-gray-400:#acaeae;--color-gray-500:#949595;--color-gray-600:#737575;--color-gray-700:#6c6e6e;--color-gray-800:#313333;--color-gray-900:#272929;--color-gray-950:#191d1d;--color-white-opacity-50:#ffffff0d;--color-white-opacity-100:#ffffff1a;--color-white-opacity-200:#ffffff26;--color-white-opacity-300:#ffffff45;--color-white-opacity-400:#ffffff5c;--color-white-opacity-500:#ffffff80;--color-white-opacity-600:#ffffff8c;--color-white-opacity-700:#ffffffa3;--color-white-opacity-800:#ffffffba;--color-white-opacity-900:#fffc;--color-white-opacity-950:#ffffffe8;--color-ciano-50:#f1f6fe;--color-ciano-100:#dfeafc;--color-ciano-200:#c3d9f9;--color-ciano-300:#90b9f4;--color-ciano-400:#5d98ee;--color-ciano-500:#1769e0;--color-ciano-600:#155fcb;--color-ciano-700:#1355b4;--color-ciano-800:#104899;--color-ciano-900:#0d3b7d;--color-ciano-950:#071e40;--color-extra-color-blue-light:#e7f0f4;--color-extra-color-blue-dark:#162931;--color-black-opacity-50:rgba(25,29,29,.02);--color-black-opacity-100:rgba(25,29,29,.05);--color-black-opacity-200:rgba(25,29,29,.11);--color-black-opacity-300:rgba(25,29,29,.28);--color-black-opacity-400:rgba(25,29,29,.36);--color-black-opacity-500:rgba(25,29,29,.44);--color-black-opacity-600:rgba(25,29,29,.62);--color-black-opacity-700:rgba(25,29,29,.64);--color-black-opacity-800:rgba(25,29,29,.72);--color-black-opacity-900:rgba(25,29,29,.8);--color-black-opacity-950:rgba(25,29,29,.96);--color-shadow-opacity-50:rgba(0,0,0,.04);--color-shadow-opacity-100:rgba(0,0,0,.06);--color-shadow-opacity-200:rgba(0,0,0,.12);--color-shadow-opacity-300:rgba(0,0,0,.2);--color-shadow-opacity-400:rgba(0,0,0,.32);--color-shadow-opacity-500:rgba(0,0,0,.5);--color-shadow-opacity-600:rgba(0,0,0,.55);--color-shadow-opacity-700:rgba(0,0,0,.64);--color-shadow-opacity-800:rgba(0,0,0,.73);--color-shadow-opacity-900:rgba(0,0,0,.8);--color-shadow-opacity-950:rgba(0,0,0,.91);--color-feedback-success:#04843f;--color-feedback-error:#c80505;--color-feedback-informational:#1355b4;--color-feedback-alert:#ef9928;--color-brand-primary:#f05223;--color-brand-secondary:#001c5c;--color-brand-tertiary-1:#1769e0;--color-brand-tertiary-2:#fc9c26;--color-surface-body:#fff;--color-surface-on-body:#f3f4f4;--color-surface-on-body-blue:#e7f0f4;--color-surface-on-body-brand:#fff6eb;--color-surface-on-body-feedback-success:#e6f4ed;--color-surface-on-body-feedback-error:#fde8e8;--color-surface-on-body-feedback-alert:#fdf4e7;--color-surface-on-body-feedback-info:#dfeafc;--color-text-brand:#f05223;--color-text-primary:#313333;--color-text-secondary:#6c6e6e;--color-text-disabled:#949595;--color-text-link:#1355b4;--color-states-empty-bg-hover:rgba(25,29,29,.05);--color-states-empty-bg-pressed:rgba(25,29,29,.11);--color-states-bg-disabled:rgba(25,29,29,.02);--color-states-bg-focus:#1355b4;--color-states-primary-hover:#ea4210;--color-states-primary-pressed:#d23b0e;--color-states-danger-hover:#b30404;--color-states-danger-pressed:#9f0404;--color-states-negative-hover:#e5e6e6;--color-states-negative-pressed:#bfc0c0;--color-icon-primary:#6c6e6e;--color-icon-secondary:#fff;--color-icon-tertiary:#b30404;--color-icon-disabled:#acaeae;--color-neutral-neutral-1:#fff;--color-neutral-neutral-2:#f3f4f4;--color-neutral-neutral-3:#acaeae;--color-neutral-neutral-4:#949595;--color-neutral-neutral-5:#737575;--color-neutral-neutral-6:#6c6e6e;--color-neutral-neutral-7:#313333;--color-neutral-neutral-8:#272929;--color-negative-negative-1:#fff;--color-negative-negative-2:#313333;--color-opacity-body:#fffc;--color-opacity-on-body:rgba(25,29,29,.02);--color-opacity-overlay:rgba(25,29,29,.62);--color-opacity-on-overlay:#ffffff1a;--color-opacity-toast:#ffffff45;--color-line-input:#949595;--color-line-general-strong:#bfc0c0;--color-line-general:#e5e6e6;--color-line-hair:rgba(25,29,29,.05);--color-box-shadow-body:#fff;--color-box-shadow-shadow-color-1:rgba(0,0,0,.04);--color-box-shadow-shadow-color-2:rgba(0,0,0,.06)}.static{position:static}.absolute{position:absolute}.relative{position:relative}.inset-x-0{left:0;right:0}.inset-y-0{bottom:0;top:0}.bottom-full{bottom:100%}.left-0{left:0}.right-0{right:0}.top-full{top:100%}.z-50{z-index:50}.mb-8{margin-bottom:.5rem}.mt-8{margin-top:.5rem}.inline-block{display:inline-block}.inline{display:inline}.flex{display:flex}.grid{display:grid}.h-22{height:1.375rem}.h-28{height:1.75rem}.h-36{height:2.25rem}.h-40{height:2.5rem}.w-1\\/2{width:50%}.w-28{width:1.75rem}.w-36{width:2.25rem}.w-full{width:100%}.cursor-not-allowed{cursor:not-allowed}.grid-cols-7{grid-template-columns:repeat(7,minmax(0,1fr))}.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}.gap-12{gap:.75rem}.gap-24{gap:1.5rem}.gap-8{gap:.5rem}.gap-y-8{row-gap:.5rem}.whitespace-nowrap{white-space:nowrap}.rounded-lg{border-radius:2.5rem}.rounded-xs{border-radius:.5rem}.rounded-xxl{border-radius:18.75rem}.border{border-width:1px}.border-brand-primary{border-color:var(--color-brand-primary)}.border-line-general{border-color:var(--color-line-general)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-states-empty-bg-hover{background-color:var(--color-states-empty-bg-hover)}.bg-surface-body{background-color:var(--color-surface-body)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.bg-surface-on-body-brand{background-color:var(--color-surface-on-body-brand)}.p-24{padding:1.5rem}.px-16{padding-left:1rem;padding-right:1rem}.px-4{padding-left:.25rem;padding-right:.25rem}.py-2{padding-bottom:.125rem;padding-top:.125rem}.pt-8{padding-top:.5rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-label-medium-bold{font-size:1rem;font-weight:700;letter-spacing:0;line-height:20px}.text-label-medium-regular{font-size:1rem;font-weight:400;letter-spacing:0;line-height:20px}.text-label-small-regular{font-size:.875rem;font-weight:400;letter-spacing:0;line-height:16px}.capitalize{text-transform:capitalize}.text-neutral-neutral-1{color:var(--color-neutral-neutral-1)}.text-text-disabled{color:var(--color-text-disabled)}.text-text-primary{color:var(--color-text-primary)}.text-text-secondary{color:var(--color-text-secondary)}.line-through{text-decoration-line:line-through}.opacity-50{opacity:.5}.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-colors{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:bg-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Light.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:300;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-LightItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Regular.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:400;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Italic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Medium.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:500;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-MediumItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:600;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-SemiBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Bold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:700;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBold.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:800;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-ExtraBoldItalic.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:normal;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-Black.ttf) format(\"truetype\")}@font-face{font-display:swap;font-family:Figtree;font-style:italic;font-weight:900;src:local(\"Figtree\"),url(@sula-tech/tailwind-css-plugin/assets/fonts/Figtree-BlackItalic.ttf) format(\"truetype\")}.mt-4{margin-top:.25rem}.hidden{display:none}.h-\\[72px\\]{height:72px}.cursor-pointer{cursor:pointer}.rounded-sm{border-radius:.75rem}.border-line-input{border-color:var(--color-line-input)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-transparent{background-color:transparent}.pr-12{padding-right:.75rem}.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)}.caret-brand-primary{caret-color:var(--color-brand-primary)}.outline-none{outline:2px solid transparent;outline-offset:2px}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}";
7
7
 
8
8
  const DATE_PATTERN = /^(\d{2})\/(\d{2})\/(\d{4})$/;
9
9
  const DAYS_IN_WEEK = 7;
@@ -47,6 +47,10 @@ const SulaCalendar$1 = /*@__PURE__*/ proxyCustomElement(class SulaCalendar exten
47
47
  * Renders only the calendar panel, without the input field
48
48
  */
49
49
  this.inline = false;
50
+ /**
51
+ * Renders a smaller chip-like trigger showing only the selected date (`DD/MM/YY`), instead of the input field
52
+ */
53
+ this.compact = false;
50
54
  /**
51
55
  * First day of the week, where 0 is Sunday and 6 is Saturday
52
56
  */
@@ -61,6 +65,15 @@ const SulaCalendar$1 = /*@__PURE__*/ proxyCustomElement(class SulaCalendar exten
61
65
  this.handleFieldClick = () => {
62
66
  this.open();
63
67
  };
68
+ this.handleCompactClick = (event) => {
69
+ event.stopPropagation();
70
+ if (this.showCalendar) {
71
+ this.close();
72
+ }
73
+ else {
74
+ this.open();
75
+ }
76
+ };
64
77
  this.handleFieldKeydown = (event) => {
65
78
  if (event.key === 'ArrowDown') {
66
79
  event.preventDefault();
@@ -266,6 +279,13 @@ const SulaCalendar$1 = /*@__PURE__*/ proxyCustomElement(class SulaCalendar exten
266
279
  this.hoverDate = null;
267
280
  this.calendarClosed.emit();
268
281
  }
282
+ getCompactLabel() {
283
+ const { start, end } = this.getRange();
284
+ const short = (date) => this.formatDate(date).replace(/\/\d{2}(\d{2})$/, '/$1');
285
+ if (!start)
286
+ return this.placeholder || this.label || '';
287
+ return this.range && end ? `${short(start)} - ${short(end)}` : short(start);
288
+ }
269
289
  changeMonth(step) {
270
290
  const date = new Date(this.viewYear, this.viewMonth + step, 1);
271
291
  this.viewMonth = date.getMonth();
@@ -315,14 +335,19 @@ const SulaCalendar$1 = /*@__PURE__*/ proxyCustomElement(class SulaCalendar exten
315
335
  }
316
336
  renderPanel() {
317
337
  return (h("div", { ref: node => (this.panelNode = node), role: this.inline ? 'group' : 'dialog', "aria-label": "Calend\u00E1rio", class: {
318
- 'calendar-panel flex w-full flex-col items-center rounded-lg border border-line-general bg-surface-body p-24': true,
338
+ 'calendar-panel flex flex-col items-center rounded-lg border border-line-general bg-surface-body p-24': true,
339
+ 'w-full': !this.compact || this.inline,
319
340
  'absolute left-0 z-50': !this.inline,
341
+ 'calendar-panel--compact': this.compact && !this.inline,
320
342
  'bottom-full mb-8': !this.inline && this.openUpward,
321
343
  'top-full mt-8': !this.inline && !this.openUpward,
322
344
  } }, h("div", { class: "flex w-full flex-col items-center gap-24" }, this.renderHeader(), h("div", { class: "flex w-full flex-col", role: "grid" }, h("div", { class: "grid grid-cols-7", role: "row" }, this.getWeekdays().map(weekday => (h("div", { role: "columnheader", title: weekday.long, class: "flex h-22 w-full items-center justify-center text-label-small-regular text-text-secondary" }, weekday.short)))), h("div", { role: "rowgroup", class: "grid gap-y-8 pt-8", onMouseLeave: this.handleGridLeave }, this.getWeeks().map(week => (h("div", { class: "grid grid-cols-7", role: "row" }, week.map(day => this.renderDay(day))))))))));
323
345
  }
324
346
  render() {
325
- return (h(Host, { key: 'fa7a9c1c73b8236e681c67ac402ff3233fa40d7d', ref: node => (this.node = node) }, h("div", { key: 'bd4c9ca46f255233838de966350c306a635db18d', class: "relative w-full" }, !this.inline && (h("div", { key: '3965b5ea42a01f676e71c10305747e6ad3e6eb79', onClick: this.handleFieldClick, onKeyDown: this.handleFieldKeydown }, h("sula-textfield", { key: '736f98c7e52e3aa4b7af0b404217da1843caf723', label: this.label, value: this.value, placeholder: this.placeholder, disabled: this.disabled, helpText: this.helpText, status: this.getTextfieldStatus(), icon: "ph ph-calendar-blank", maskPattern: this.range ? '99/99/9999 - 99/99/9999' : '99/99/9999', readOnly: !this.allowTyping, onValueChanged: this.handleInputChanged }))), (this.inline || this.showCalendar) && this.renderPanel())));
347
+ return (h(Host, { key: '03f17f7e0e68a7229d3aca0eff13974e32653d87', ref: node => (this.node = node) }, h("div", { key: '1a480da01747dedffbfe78831404433cbbd75b18', class: { 'relative': true, 'w-full': !this.compact || this.inline, 'inline-block': this.compact && !this.inline } }, !this.inline && this.compact && (h("button", { key: '8f2bf98089507e52f21add599c865e460adefc24', type: "button", disabled: this.disabled, "aria-haspopup": "dialog", "aria-expanded": this.showCalendar ? 'true' : 'false', "aria-label": this.label, onClick: this.handleCompactClick, class: {
348
+ 'flex h-40 items-center justify-center gap-8 rounded-xxl bg-surface-on-body px-16 py-2 text-label-medium-bold text-text-primary': true,
349
+ 'cursor-not-allowed opacity-50': this.disabled,
350
+ } }, h("sula-icon", { key: 'c27d9bca935147017996159a75b163c5f082cd96', icon: "ph ph-calendar-dots", customClass: "text-2xl text-text-secondary" }), h("span", { key: '239d70e9d79003484221a43efafdb503cff36fb2', class: "whitespace-nowrap" }, this.getCompactLabel()), h("sula-icon", { key: '13940e9f9c38e8a2be2bccdbf2b701f6db2b7cae', icon: this.showCalendar ? 'ph ph-caret-up' : 'ph ph-caret-down', customClass: "text-base text-text-primary" }))), !this.inline && !this.compact && (h("div", { key: '2cde57cb84d986160f4e6e5209f3e0537bfe4d1d', onClick: this.handleFieldClick, onKeyDown: this.handleFieldKeydown }, h("sula-textfield", { key: '1aea48c63cd5fb65c833b6673690d9672d8b2e5b', label: this.label, value: this.value, placeholder: this.placeholder, disabled: this.disabled, helpText: this.helpText, status: this.getTextfieldStatus(), icon: "ph ph-calendar-blank", maskPattern: this.range ? '99/99/9999 - 99/99/9999' : '99/99/9999', readOnly: !this.allowTyping, onValueChanged: this.handleInputChanged }))), (this.inline || this.showCalendar) && this.renderPanel())));
326
351
  }
327
352
  static get watchers() { return {
328
353
  "value": ["handleValueChange"]
@@ -341,6 +366,7 @@ const SulaCalendar$1 = /*@__PURE__*/ proxyCustomElement(class SulaCalendar exten
341
366
  "range": [4],
342
367
  "allowTyping": [4, "allow-typing"],
343
368
  "inline": [4],
369
+ "compact": [4],
344
370
  "firstDayOfWeek": [2, "first-day-of-week"],
345
371
  "closeOnSelect": [4, "close-on-select"],
346
372
  "showCalendar": [32],
@@ -1 +1 @@
1
- {"file":"sula-calendar.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,6teAA6te;;ACIrve,MAAM,YAAY,GAAG,6BAA6B;AAClD,MAAM,YAAY,GAAG,CAAC;AACtB,MAAM,eAAe,GAAG,OAAO;MAOlBA,cAAY,iBAAAC,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,GAAA;;;;;;;;;;AAWE;;AAEG;AACsB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAO3C;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAOjC;;AAEG;AACK,QAAA,IAAA,CAAA,MAAM,GAAuB,kBAAkB,CAAC,OAAO;AAE/D;;AAEG;AACK,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO;AAYhC;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;AAE9B;;AAEG;AACK,QAAA,IAAW,CAAA,WAAA,GAAY,IAAI;AAEnC;;AAEG;AACK,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/B;;AAEG;AACK,QAAA,IAAc,CAAA,cAAA,GAAW,CAAC;AAElC;;AAEG;AACK,QAAA,IAAa,CAAA,aAAA,GAAY,IAA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AA,GAAG,EAAE,IAAI,KAAK,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC,EAAA,EACnC,CAAK,CAAA,KAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EAAA,KAAK,EAAC,iBAAiB,EAAA,EACzB,CAAC,IAAI,CAAC,MAAM,KACX,4DAAK,OAAO,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,EAAE,IAAI,CAAC,kBAAkB,EAAA,EACrE,CAAA,CAAA,gBAAA,EAAA,EAAA,GAAA,EAAA,0CAAA,EACE,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,WAAW,EAAE,IAAI,CAAC,WAAW,EAC7B,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,QAAQ,EAAE,IAAI,CAAC,QAAQ,EACvB,MAAM,EAAE,IAAI,CAAC,kBAAkB,EAAE,EACjC,IAAI,EAAC,sBAAsB,EAC3B,WAAW,EAAE,IAAI,CAAC,KAAK,GAAG,yBAAyB,GAAG,YAAY,EAClE,QAAQ,EAAE,CAAC,IAAI,CAAC,WAAW,EAC3B,cAAc,EAAE,IAAI,CAAC,kBAAkB,EAAA,CACvB,CACd,CACP,EAEA,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,WAAW,EAAE,CACrD,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaCalendar","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-calendar/sula-calendar.scss?tag=sula-calendar&encapsulation=shadow","src/components/sula-calendar/sula-calendar.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.calendar-panel {\n box-shadow: 0px 4px 19.7px 0px var(--color-box-shadow-shadow-color-2);\n}\n","import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaTextfieldStatus } from '../sula-textfield/model/sula-textfield.model';\nimport { SulaCalendarDay, SulaCalendarMonthChange, SulaCalendarRange, SulaCalendarStatus, SulaCalendarWeekday } from './model/sula-calendar.model';\n\nconst DATE_PATTERN = /^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/;\nconst DAYS_IN_WEEK = 7;\nconst FALLBACK_LOCALE = 'pt-BR';\n\n@Component({\n tag: 'sula-calendar',\n styleUrl: 'sula-calendar.scss',\n shadow: true,\n})\nexport class SulaCalendar {\n /**\n * The calendar field label\n */\n @Prop() label: string;\n\n /**\n * Selected date in the `DD/MM/YYYY` format. In range mode the format is `DD/MM/YYYY - DD/MM/YYYY`\n */\n @Prop({ mutable: true }) value: string = '';\n\n /**\n * The calendar field placeholder\n */\n @Prop() placeholder?: string;\n\n /**\n * The calendar is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The help text displayed below the field\n */\n @Prop() helpText?: string;\n\n /**\n * The calendar field status\n */\n @Prop() status: SulaCalendarStatus = SulaCalendarStatus.Default;\n\n /**\n * Locale used to format month and weekday names\n */\n @Prop() locale: string = 'pt-BR';\n\n /**\n * Earliest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() minDate?: string;\n\n /**\n * Latest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() maxDate?: string;\n\n /**\n * Enables selecting a date range (start and end dates) instead of a single date\n */\n @Prop() range: boolean = false;\n\n /**\n * Allows typing the date directly in the field. When false, the date can only be picked in the calendar\n */\n @Prop() allowTyping: boolean = true;\n\n /**\n * Renders only the calendar panel, without the input field\n */\n @Prop() inline: boolean = false;\n\n /**\n * First day of the week, where 0 is Sunday and 6 is Saturday\n */\n @Prop() firstDayOfWeek: number = 0;\n\n /**\n * Closes the calendar panel after a date is selected\n */\n @Prop() closeOnSelect: boolean = true;\n\n /**\n * Event emitted when a date is selected, with the date in the `DD/MM/YYYY` format\n */\n @Event() dateSelected: EventEmitter<string>;\n\n /**\n * Event emitted in range mode when both the start and end dates are selected, either by picking or by typing. In range mode `valueChanged` is not emitted\n */\n @Event() rangeSelected: EventEmitter<SulaCalendarRange>;\n\n /**\n * Event emitted when the value changes, either by typing or by selecting a date. Not emitted in range mode, use `rangeSelected` instead\n */\n @Event() valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when the displayed month changes\n */\n @Event() monthChanged: EventEmitter<SulaCalendarMonthChange>;\n\n /**\n * Event emitted when the calendar panel is opened\n */\n @Event() calendarOpened: EventEmitter<void>;\n\n /**\n * Event emitted when the calendar panel is closed\n */\n @Event() calendarClosed: EventEmitter<void>;\n\n @State() showCalendar: boolean = false;\n\n @State() openUpward: boolean = false;\n\n @State() viewMonth: number;\n\n @State() viewYear: number;\n\n @State() hoverDate: Date | null = null;\n\n node?: HTMLElement;\n\n panelNode?: HTMLElement;\n\n @Watch('value')\n handleValueChange() {\n this.hoverDate = null;\n\n // keeps the view on the current month while an incomplete date is being typed\n if (this.selectedDate) {\n this.syncViewWithValue();\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.showCalendar || !this.node) return;\n\n if (!event.composedPath().includes(this.node)) {\n this.close();\n }\n }\n\n @Listen('keydown', { target: 'document' })\n handleDocumentKeydown(event: KeyboardEvent) {\n if (this.showCalendar && event.key === 'Escape') {\n this.close();\n }\n }\n\n componentWillLoad() {\n this.syncViewWithValue();\n }\n\n componentDidRender() {\n if (this.showCalendar) {\n this.calculatePanelPosition();\n }\n }\n\n get selectedDate(): Date | null {\n return this.getRange().start;\n }\n\n private getRange(): { start: Date | null; end: Date | null } {\n if (!this.range) {\n return { start: this.parseDate(this.value), end: null };\n }\n\n const [startText, endText] = (this.value ?? '').split('-');\n\n return { start: this.parseDate(startText), end: this.parseDate(endText) };\n }\n\n private syncViewWithValue() {\n const reference = this.selectedDate ?? new Date();\n\n this.viewMonth = reference.getMonth();\n this.viewYear = reference.getFullYear();\n }\n\n private parseDate(value?: string): Date | null {\n const match = DATE_PATTERN.exec((value ?? '').trim());\n if (!match) return null;\n\n const day = Number(match[1]);\n const month = Number(match[2]);\n const year = Number(match[3]);\n const date = new Date(year, month - 1, day, 0, 0, 0, 0);\n\n const isValid = date.getDate() === day && date.getMonth() === month - 1 && date.getFullYear() === year;\n\n return isValid ? date : null;\n }\n\n private formatDate(date: Date): string {\n const day = `${date.getDate()}`.padStart(2, '0');\n const month = `${date.getMonth() + 1}`.padStart(2, '0');\n\n return `${day}/${month}/${date.getFullYear()}`;\n }\n\n private capitalize(text: string): string {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n\n private isSameDay(first: Date, second: Date): boolean {\n return first.getDate() === second.getDate() && first.getMonth() === second.getMonth() && first.getFullYear() === second.getFullYear();\n }\n\n private isOutOfRange(date: Date, min: Date | null, max: Date | null): boolean {\n return (!!min && date.getTime() < min.getTime()) || (!!max && date.getTime() > max.getTime());\n }\n\n private get weekStart(): number {\n const value = Math.trunc(Number(this.firstDayOfWeek));\n\n return Number.isFinite(value) ? ((value % DAYS_IN_WEEK) + DAYS_IN_WEEK) % DAYS_IN_WEEK : 0;\n }\n\n // an invalid `locale` would make Intl throw and break the whole render\n private createFormatter(options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n try {\n return new Intl.DateTimeFormat(this.locale, options);\n } catch {\n return new Intl.DateTimeFormat(FALLBACK_LOCALE, options);\n }\n }\n\n getMonthLabel(): string {\n const date = new Date(this.viewYear, this.viewMonth, 1);\n const month = this.createFormatter({ month: 'short' }).format(date).replace(/\\./g, '');\n\n return `${this.capitalize(month)} ${this.viewYear}`;\n }\n\n getWeekdays(): SulaCalendarWeekday[] {\n const shortFormatter = this.createFormatter({ weekday: 'short' });\n const longFormatter = this.createFormatter({ weekday: 'long' });\n\n return Array.from({ length: DAYS_IN_WEEK }, (_, index) => {\n // 2024-01-07 is a Sunday, used as a stable reference to build the weekday sequence\n const date = new Date(2024, 0, 7 + ((index + this.weekStart) % DAYS_IN_WEEK));\n\n return {\n short: this.capitalize(shortFormatter.format(date).replace(/\\./g, '')),\n long: this.capitalize(longFormatter.format(date)),\n };\n });\n }\n\n getWeeks(): SulaCalendarDay[][] {\n const today = new Date();\n const { start, end } = this.getRange();\n const previewEnd = this.range && !!start && !end ? this.hoverDate : null;\n const rangeEnd = end ?? previewEnd;\n const hasRange = this.range && !!start && !!rangeEnd;\n const from = hasRange && start.getTime() > rangeEnd.getTime() ? rangeEnd : start;\n const to = hasRange && start.getTime() > rangeEnd.getTime() ? start : rangeEnd;\n const firstOfMonth = new Date(this.viewYear, this.viewMonth, 1);\n const min = this.parseDate(this.minDate);\n const max = this.parseDate(this.maxDate);\n const offset = (firstOfMonth.getDay() - this.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n const daysInMonth = new Date(this.viewYear, this.viewMonth + 1, 0).getDate();\n const totalCells = Math.ceil((offset + daysInMonth) / DAYS_IN_WEEK) * DAYS_IN_WEEK;\n const weeks: SulaCalendarDay[][] = [];\n\n for (let cell = 0; cell < totalCells; cell++) {\n const date = new Date(this.viewYear, this.viewMonth, cell - offset + 1);\n\n const day: SulaCalendarDay = {\n date,\n day: date.getDate(),\n isCurrentMonth: date.getMonth() === this.viewMonth && date.getFullYear() === this.viewYear,\n isSelected: (!!start && this.isSameDay(date, start)) || (this.range && !!end && this.isSameDay(date, end)),\n isRangeStart: hasRange && this.isSameDay(date, from),\n isRangeEnd: hasRange && this.isSameDay(date, to),\n isInRange: hasRange && date.getTime() > from.getTime() && date.getTime() < to.getTime(),\n isRangePreview: !!previewEnd && this.isSameDay(date, previewEnd) && !this.isSameDay(date, start),\n isToday: this.isSameDay(date, today),\n isDisabled: this.isOutOfRange(date, min, max),\n };\n\n if (cell % DAYS_IN_WEEK === 0) weeks.push([]);\n weeks[weeks.length - 1].push(day);\n }\n\n return weeks;\n }\n\n calculatePanelPosition() {\n if (!this.node || this.inline) return;\n\n const rect = this.node.getBoundingClientRect();\n const panelHeight = this.panelNode?.offsetHeight ?? 0;\n const spaceBelow = window.innerHeight - rect.bottom;\n const spaceAbove = rect.top;\n\n this.openUpward = spaceBelow < panelHeight && spaceAbove > spaceBelow;\n }\n\n open() {\n if (this.disabled || this.showCalendar) return;\n\n this.showCalendar = true;\n this.calendarOpened.emit();\n }\n\n close() {\n if (!this.showCalendar) return;\n\n this.showCalendar = false;\n this.hoverDate = null;\n this.calendarClosed.emit();\n }\n\n handleFieldClick = () => {\n this.open();\n };\n\n handleFieldKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.open();\n }\n };\n\n handleInputChanged = (event: CustomEvent<string>) => {\n event.stopPropagation();\n\n const typedValue = event.detail ?? '';\n\n this.value = typedValue;\n\n if (this.range) {\n const { start, end } = this.getRange();\n\n if (start && end && start.getTime() <= end.getTime()) {\n this.rangeSelected.emit({ start: this.formatDate(start), end: this.formatDate(end) });\n }\n\n return;\n }\n\n this.valueChanged.emit(typedValue);\n };\n\n handlePreviousMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(-1);\n };\n\n handleNextMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(1);\n };\n\n changeMonth(step: number) {\n const date = new Date(this.viewYear, this.viewMonth + step, 1);\n\n this.viewMonth = date.getMonth();\n this.viewYear = date.getFullYear();\n\n this.monthChanged.emit({ month: this.viewMonth, year: this.viewYear });\n }\n\n handleSelectDay = (event: MouseEvent, day: SulaCalendarDay) => {\n event.stopPropagation();\n\n if (day.isDisabled || this.disabled) return;\n\n if (this.range) {\n this.selectRangeDay(day.date);\n return;\n }\n\n const formatted = this.formatDate(day.date);\n\n this.value = formatted;\n this.dateSelected.emit(formatted);\n this.valueChanged.emit(formatted);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n };\n\n selectRangeDay(date: Date) {\n const { start, end } = this.getRange();\n\n // first click, or a click after a complete range, starts a new range\n if (!start || end) {\n this.value = this.formatDate(date);\n return;\n }\n\n const [from, to] = date.getTime() < start.getTime() ? [date, start] : [start, date];\n const range: SulaCalendarRange = { start: this.formatDate(from), end: this.formatDate(to) };\n\n this.value = `${range.start} - ${range.end}`;\n this.rangeSelected.emit(range);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n }\n\n handleDayHover(day: SulaCalendarDay) {\n if (!this.range || day.isDisabled) return;\n\n this.hoverDate = day.date;\n }\n\n handleGridLeave = () => {\n this.hoverDate = null;\n };\n\n getTextfieldStatus(): SulaTextfieldStatus {\n return this.status === SulaCalendarStatus.Error ? SulaTextfieldStatus.Error : SulaTextfieldStatus.Default;\n }\n\n renderHeader() {\n return (\n <div class=\"flex h-28 w-full flex-row items-center justify-between gap-12 px-4\">\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Mês anterior\"\n onClick={this.handlePreviousMonth}\n >\n <sula-icon icon=\"ph ph-caret-left\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n\n <span class=\"text-label-medium-regular text-text-primary\" aria-live=\"polite\">\n {this.getMonthLabel()}\n </span>\n\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Próximo mês\"\n onClick={this.handleNextMonth}\n >\n <sula-icon icon=\"ph ph-caret-right\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n </div>\n );\n }\n\n renderDay(day: SulaCalendarDay) {\n return (\n <div\n role=\"gridcell\"\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-disabled={day.isDisabled ? 'true' : null}\n aria-current={day.isToday ? 'date' : null}\n class=\"relative flex w-full items-center justify-center\"\n onMouseEnter={() => this.handleDayHover(day)}\n >\n {(day.isInRange || day.isRangeStart !== day.isRangeEnd) && (\n <span\n data-range-background\n aria-hidden=\"true\"\n class={{\n 'absolute inset-y-0 bg-surface-on-body-brand': true,\n 'inset-x-0': day.isInRange,\n 'right-0 w-1/2': day.isRangeStart && !day.isRangeEnd,\n 'left-0 w-1/2': day.isRangeEnd && !day.isRangeStart,\n }}\n ></span>\n )}\n <button\n type=\"button\"\n disabled={day.isDisabled}\n aria-label={this.formatDate(day.date)}\n onClick={(event: MouseEvent) => this.handleSelectDay(event, day)}\n class={{\n 'relative flex h-36 w-36 items-center justify-center rounded-xxl text-label-small-regular transition-colors': true,\n 'bg-brand-primary text-neutral-neutral-1': day.isSelected,\n 'border border-brand-primary text-text-primary': day.isRangePreview && !day.isSelected,\n 'text-text-primary hover:bg-states-empty-bg-hover': !day.isSelected && day.isCurrentMonth && !day.isDisabled,\n 'text-text-secondary opacity-50 hover:bg-states-empty-bg-hover': !day.isSelected && !day.isCurrentMonth && !day.isDisabled,\n 'cursor-not-allowed text-text-disabled line-through': day.isDisabled,\n }}\n >\n {day.day}\n </button>\n </div>\n );\n }\n\n renderPanel() {\n return (\n <div\n ref={node => (this.panelNode = node)}\n role={this.inline ? 'group' : 'dialog'}\n aria-label=\"Calendário\"\n class={{\n 'calendar-panel flex w-full flex-col items-center rounded-lg border border-line-general bg-surface-body p-24': true,\n 'absolute left-0 z-50': !this.inline,\n 'bottom-full mb-8': !this.inline && this.openUpward,\n 'top-full mt-8': !this.inline && !this.openUpward,\n }}\n >\n <div class=\"flex w-full flex-col items-center gap-24\">\n {this.renderHeader()}\n\n <div class=\"flex w-full flex-col\" role=\"grid\">\n <div class=\"grid grid-cols-7\" role=\"row\">\n {this.getWeekdays().map(weekday => (\n <div role=\"columnheader\" title={weekday.long} class=\"flex h-22 w-full items-center justify-center text-label-small-regular text-text-secondary\">\n {weekday.short}\n </div>\n ))}\n </div>\n\n <div role=\"rowgroup\" class=\"grid gap-y-8 pt-8\" onMouseLeave={this.handleGridLeave}>\n {this.getWeeks().map(week => (\n <div class=\"grid grid-cols-7\" role=\"row\">\n {week.map(day => this.renderDay(day))}\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div class=\"relative w-full\">\n {!this.inline && (\n <div onClick={this.handleFieldClick} onKeyDown={this.handleFieldKeydown}>\n <sula-textfield\n label={this.label}\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n helpText={this.helpText}\n status={this.getTextfieldStatus()}\n icon=\"ph ph-calendar-blank\"\n maskPattern={this.range ? '99/99/9999 - 99/99/9999' : '99/99/9999'}\n readOnly={!this.allowTyping}\n onValueChanged={this.handleInputChanged}\n ></sula-textfield>\n </div>\n )}\n\n {(this.inline || this.showCalendar) && this.renderPanel()}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}
1
+ {"file":"sula-calendar.js","mappings":";;;;;AAAA,MAAM,eAAe,GAAG,wmfAAwmf;;ACIhof,MAAM,YAAY,GAAG,6BAA6B;AAClD,MAAM,YAAY,GAAG,CAAC;AACtB,MAAM,eAAe,GAAG,OAAO;MAOlBA,cAAY,iBAAAC,kBAAA,CAAA,MAAA,YAAA,SAAAC,CAAA,CAAA;AALzB,IAAA,WAAA,GAAA;;;;;;;;;;AAWE;;AAEG;AACsB,QAAA,IAAK,CAAA,KAAA,GAAW,EAAE;AAO3C;;AAEG;AACK,QAAA,IAAQ,CAAA,QAAA,GAAY,KAAK;AAOjC;;AAEG;AACK,QAAA,IAAA,CAAA,MAAM,GAAuB,kBAAkB,CAAC,OAAO;AAE/D;;AAEG;AACK,QAAA,IAAM,CAAA,MAAA,GAAW,OAAO;AAYhC;;AAEG;AACK,QAAA,IAAK,CAAA,KAAA,GAAY,KAAK;AAE9B;;AAEG;AACK,QAAA,IAAW,CAAA,WAAA,GAAY,IAAI;AAEnC;;AAEG;AACK,QAAA,IAAM,CAAA,MAAA,GAAY,KAAK;AAE/B;;AAEG;AACK,QAAA,IAAO,CAAA,OAAA,GAAY,KAAK;AAEhC;;AAEG;AACK,QAAA,IAAc,CAAA,cAAA,GAAW,CAAC;AAElC;;AAEG;AACK,QAAA,IAAa,CAAA,aAAA,GAAY,IAAI;AAgC5B,QAAA,IAAY,CAAA,YAAA,GAAY,KAAK;AAE7B,QAAA,IAAU,CAAA,UAAA,GAAY,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AC3B,cAAc,EAAE,IAAI,CAAC,kBAAkB,EAAA,CACvB,CACd,CACP,EAEA,CAAC,IAAI,CAAC,MAAM,IAAI,IAAI,CAAC,YAAY,KAAK,IAAI,CAAC,WAAW,EAAE,CACrD,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","names":["SulaCalendar","__stencil_proxyCustomElement","HTMLElement"],"sources":["src/components/sula-calendar/sula-calendar.scss?tag=sula-calendar&encapsulation=shadow","src/components/sula-calendar/sula-calendar.tsx"],"sourcesContent":[":host {\n display: block;\n}\n\n.calendar-panel {\n box-shadow: 0px 4px 19.7px 0px var(--color-box-shadow-shadow-color-2);\n}\n\n.calendar-panel.calendar-panel--compact {\n width: 356px;\n max-width: calc(100vw - 16px);\n}\n","import { Component, Event, EventEmitter, Host, Listen, Prop, State, Watch, h } from '@stencil/core';\nimport { SulaTextfieldStatus } from '../sula-textfield/model/sula-textfield.model';\nimport { SulaCalendarDay, SulaCalendarMonthChange, SulaCalendarRange, SulaCalendarStatus, SulaCalendarWeekday } from './model/sula-calendar.model';\n\nconst DATE_PATTERN = /^(\\d{2})\\/(\\d{2})\\/(\\d{4})$/;\nconst DAYS_IN_WEEK = 7;\nconst FALLBACK_LOCALE = 'pt-BR';\n\n@Component({\n tag: 'sula-calendar',\n styleUrl: 'sula-calendar.scss',\n shadow: true,\n})\nexport class SulaCalendar {\n /**\n * The calendar field label\n */\n @Prop() label: string;\n\n /**\n * Selected date in the `DD/MM/YYYY` format. In range mode the format is `DD/MM/YYYY - DD/MM/YYYY`\n */\n @Prop({ mutable: true }) value: string = '';\n\n /**\n * The calendar field placeholder\n */\n @Prop() placeholder?: string;\n\n /**\n * The calendar is disabled\n */\n @Prop() disabled: boolean = false;\n\n /**\n * The help text displayed below the field\n */\n @Prop() helpText?: string;\n\n /**\n * The calendar field status\n */\n @Prop() status: SulaCalendarStatus = SulaCalendarStatus.Default;\n\n /**\n * Locale used to format month and weekday names\n */\n @Prop() locale: string = 'pt-BR';\n\n /**\n * Earliest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() minDate?: string;\n\n /**\n * Latest selectable date in the `DD/MM/YYYY` format\n */\n @Prop() maxDate?: string;\n\n /**\n * Enables selecting a date range (start and end dates) instead of a single date\n */\n @Prop() range: boolean = false;\n\n /**\n * Allows typing the date directly in the field. When false, the date can only be picked in the calendar\n */\n @Prop() allowTyping: boolean = true;\n\n /**\n * Renders only the calendar panel, without the input field\n */\n @Prop() inline: boolean = false;\n\n /**\n * Renders a smaller chip-like trigger showing only the selected date (`DD/MM/YY`), instead of the input field\n */\n @Prop() compact: boolean = false;\n\n /**\n * First day of the week, where 0 is Sunday and 6 is Saturday\n */\n @Prop() firstDayOfWeek: number = 0;\n\n /**\n * Closes the calendar panel after a date is selected\n */\n @Prop() closeOnSelect: boolean = true;\n\n /**\n * Event emitted when a date is selected, with the date in the `DD/MM/YYYY` format\n */\n @Event() dateSelected: EventEmitter<string>;\n\n /**\n * Event emitted in range mode when both the start and end dates are selected, either by picking or by typing. In range mode `valueChanged` is not emitted\n */\n @Event() rangeSelected: EventEmitter<SulaCalendarRange>;\n\n /**\n * Event emitted when the value changes, either by typing or by selecting a date. Not emitted in range mode, use `rangeSelected` instead\n */\n @Event() valueChanged: EventEmitter<string>;\n\n /**\n * Event emitted when the displayed month changes\n */\n @Event() monthChanged: EventEmitter<SulaCalendarMonthChange>;\n\n /**\n * Event emitted when the calendar panel is opened\n */\n @Event() calendarOpened: EventEmitter<void>;\n\n /**\n * Event emitted when the calendar panel is closed\n */\n @Event() calendarClosed: EventEmitter<void>;\n\n @State() showCalendar: boolean = false;\n\n @State() openUpward: boolean = false;\n\n @State() viewMonth: number;\n\n @State() viewYear: number;\n\n @State() hoverDate: Date | null = null;\n\n node?: HTMLElement;\n\n panelNode?: HTMLElement;\n\n @Watch('value')\n handleValueChange() {\n this.hoverDate = null;\n\n // keeps the view on the current month while an incomplete date is being typed\n if (this.selectedDate) {\n this.syncViewWithValue();\n }\n }\n\n @Listen('click', { target: 'document' })\n handleDocumentClick(event: Event) {\n if (!this.showCalendar || !this.node) return;\n\n if (!event.composedPath().includes(this.node)) {\n this.close();\n }\n }\n\n @Listen('keydown', { target: 'document' })\n handleDocumentKeydown(event: KeyboardEvent) {\n if (this.showCalendar && event.key === 'Escape') {\n this.close();\n }\n }\n\n componentWillLoad() {\n this.syncViewWithValue();\n }\n\n componentDidRender() {\n if (this.showCalendar) {\n this.calculatePanelPosition();\n }\n }\n\n get selectedDate(): Date | null {\n return this.getRange().start;\n }\n\n private getRange(): { start: Date | null; end: Date | null } {\n if (!this.range) {\n return { start: this.parseDate(this.value), end: null };\n }\n\n const [startText, endText] = (this.value ?? '').split('-');\n\n return { start: this.parseDate(startText), end: this.parseDate(endText) };\n }\n\n private syncViewWithValue() {\n const reference = this.selectedDate ?? new Date();\n\n this.viewMonth = reference.getMonth();\n this.viewYear = reference.getFullYear();\n }\n\n private parseDate(value?: string): Date | null {\n const match = DATE_PATTERN.exec((value ?? '').trim());\n if (!match) return null;\n\n const day = Number(match[1]);\n const month = Number(match[2]);\n const year = Number(match[3]);\n const date = new Date(year, month - 1, day, 0, 0, 0, 0);\n\n const isValid = date.getDate() === day && date.getMonth() === month - 1 && date.getFullYear() === year;\n\n return isValid ? date : null;\n }\n\n private formatDate(date: Date): string {\n const day = `${date.getDate()}`.padStart(2, '0');\n const month = `${date.getMonth() + 1}`.padStart(2, '0');\n\n return `${day}/${month}/${date.getFullYear()}`;\n }\n\n private capitalize(text: string): string {\n return text.charAt(0).toUpperCase() + text.slice(1);\n }\n\n private isSameDay(first: Date, second: Date): boolean {\n return first.getDate() === second.getDate() && first.getMonth() === second.getMonth() && first.getFullYear() === second.getFullYear();\n }\n\n private isOutOfRange(date: Date, min: Date | null, max: Date | null): boolean {\n return (!!min && date.getTime() < min.getTime()) || (!!max && date.getTime() > max.getTime());\n }\n\n private get weekStart(): number {\n const value = Math.trunc(Number(this.firstDayOfWeek));\n\n return Number.isFinite(value) ? ((value % DAYS_IN_WEEK) + DAYS_IN_WEEK) % DAYS_IN_WEEK : 0;\n }\n\n // an invalid `locale` would make Intl throw and break the whole render\n private createFormatter(options: Intl.DateTimeFormatOptions): Intl.DateTimeFormat {\n try {\n return new Intl.DateTimeFormat(this.locale, options);\n } catch {\n return new Intl.DateTimeFormat(FALLBACK_LOCALE, options);\n }\n }\n\n getMonthLabel(): string {\n const date = new Date(this.viewYear, this.viewMonth, 1);\n const month = this.createFormatter({ month: 'short' }).format(date).replace(/\\./g, '');\n\n return `${this.capitalize(month)} ${this.viewYear}`;\n }\n\n getWeekdays(): SulaCalendarWeekday[] {\n const shortFormatter = this.createFormatter({ weekday: 'short' });\n const longFormatter = this.createFormatter({ weekday: 'long' });\n\n return Array.from({ length: DAYS_IN_WEEK }, (_, index) => {\n // 2024-01-07 is a Sunday, used as a stable reference to build the weekday sequence\n const date = new Date(2024, 0, 7 + ((index + this.weekStart) % DAYS_IN_WEEK));\n\n return {\n short: this.capitalize(shortFormatter.format(date).replace(/\\./g, '')),\n long: this.capitalize(longFormatter.format(date)),\n };\n });\n }\n\n getWeeks(): SulaCalendarDay[][] {\n const today = new Date();\n const { start, end } = this.getRange();\n const previewEnd = this.range && !!start && !end ? this.hoverDate : null;\n const rangeEnd = end ?? previewEnd;\n const hasRange = this.range && !!start && !!rangeEnd;\n const from = hasRange && start.getTime() > rangeEnd.getTime() ? rangeEnd : start;\n const to = hasRange && start.getTime() > rangeEnd.getTime() ? start : rangeEnd;\n const firstOfMonth = new Date(this.viewYear, this.viewMonth, 1);\n const min = this.parseDate(this.minDate);\n const max = this.parseDate(this.maxDate);\n const offset = (firstOfMonth.getDay() - this.weekStart + DAYS_IN_WEEK) % DAYS_IN_WEEK;\n const daysInMonth = new Date(this.viewYear, this.viewMonth + 1, 0).getDate();\n const totalCells = Math.ceil((offset + daysInMonth) / DAYS_IN_WEEK) * DAYS_IN_WEEK;\n const weeks: SulaCalendarDay[][] = [];\n\n for (let cell = 0; cell < totalCells; cell++) {\n const date = new Date(this.viewYear, this.viewMonth, cell - offset + 1);\n\n const day: SulaCalendarDay = {\n date,\n day: date.getDate(),\n isCurrentMonth: date.getMonth() === this.viewMonth && date.getFullYear() === this.viewYear,\n isSelected: (!!start && this.isSameDay(date, start)) || (this.range && !!end && this.isSameDay(date, end)),\n isRangeStart: hasRange && this.isSameDay(date, from),\n isRangeEnd: hasRange && this.isSameDay(date, to),\n isInRange: hasRange && date.getTime() > from.getTime() && date.getTime() < to.getTime(),\n isRangePreview: !!previewEnd && this.isSameDay(date, previewEnd) && !this.isSameDay(date, start),\n isToday: this.isSameDay(date, today),\n isDisabled: this.isOutOfRange(date, min, max),\n };\n\n if (cell % DAYS_IN_WEEK === 0) weeks.push([]);\n weeks[weeks.length - 1].push(day);\n }\n\n return weeks;\n }\n\n calculatePanelPosition() {\n if (!this.node || this.inline) return;\n\n const rect = this.node.getBoundingClientRect();\n const panelHeight = this.panelNode?.offsetHeight ?? 0;\n const spaceBelow = window.innerHeight - rect.bottom;\n const spaceAbove = rect.top;\n\n this.openUpward = spaceBelow < panelHeight && spaceAbove > spaceBelow;\n }\n\n open() {\n if (this.disabled || this.showCalendar) return;\n\n this.showCalendar = true;\n this.calendarOpened.emit();\n }\n\n close() {\n if (!this.showCalendar) return;\n\n this.showCalendar = false;\n this.hoverDate = null;\n this.calendarClosed.emit();\n }\n\n handleFieldClick = () => {\n this.open();\n };\n\n getCompactLabel(): string {\n const { start, end } = this.getRange();\n const short = (date: Date) => this.formatDate(date).replace(/\\/\\d{2}(\\d{2})$/, '/$1');\n\n if (!start) return this.placeholder || this.label || '';\n\n return this.range && end ? `${short(start)} - ${short(end)}` : short(start);\n }\n\n handleCompactClick = (event: MouseEvent) => {\n event.stopPropagation();\n\n if (this.showCalendar) {\n this.close();\n } else {\n this.open();\n }\n };\n\n handleFieldKeydown = (event: KeyboardEvent) => {\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n this.open();\n }\n };\n\n handleInputChanged = (event: CustomEvent<string>) => {\n event.stopPropagation();\n\n const typedValue = event.detail ?? '';\n\n this.value = typedValue;\n\n if (this.range) {\n const { start, end } = this.getRange();\n\n if (start && end && start.getTime() <= end.getTime()) {\n this.rangeSelected.emit({ start: this.formatDate(start), end: this.formatDate(end) });\n }\n\n return;\n }\n\n this.valueChanged.emit(typedValue);\n };\n\n handlePreviousMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(-1);\n };\n\n handleNextMonth = (event: MouseEvent) => {\n event.stopPropagation();\n this.changeMonth(1);\n };\n\n changeMonth(step: number) {\n const date = new Date(this.viewYear, this.viewMonth + step, 1);\n\n this.viewMonth = date.getMonth();\n this.viewYear = date.getFullYear();\n\n this.monthChanged.emit({ month: this.viewMonth, year: this.viewYear });\n }\n\n handleSelectDay = (event: MouseEvent, day: SulaCalendarDay) => {\n event.stopPropagation();\n\n if (day.isDisabled || this.disabled) return;\n\n if (this.range) {\n this.selectRangeDay(day.date);\n return;\n }\n\n const formatted = this.formatDate(day.date);\n\n this.value = formatted;\n this.dateSelected.emit(formatted);\n this.valueChanged.emit(formatted);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n };\n\n selectRangeDay(date: Date) {\n const { start, end } = this.getRange();\n\n // first click, or a click after a complete range, starts a new range\n if (!start || end) {\n this.value = this.formatDate(date);\n return;\n }\n\n const [from, to] = date.getTime() < start.getTime() ? [date, start] : [start, date];\n const range: SulaCalendarRange = { start: this.formatDate(from), end: this.formatDate(to) };\n\n this.value = `${range.start} - ${range.end}`;\n this.rangeSelected.emit(range);\n\n if (this.closeOnSelect && !this.inline) {\n this.close();\n }\n }\n\n handleDayHover(day: SulaCalendarDay) {\n if (!this.range || day.isDisabled) return;\n\n this.hoverDate = day.date;\n }\n\n handleGridLeave = () => {\n this.hoverDate = null;\n };\n\n getTextfieldStatus(): SulaTextfieldStatus {\n return this.status === SulaCalendarStatus.Error ? SulaTextfieldStatus.Error : SulaTextfieldStatus.Default;\n }\n\n renderHeader() {\n return (\n <div class=\"flex h-28 w-full flex-row items-center justify-between gap-12 px-4\">\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Mês anterior\"\n onClick={this.handlePreviousMonth}\n >\n <sula-icon icon=\"ph ph-caret-left\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n\n <span class=\"text-label-medium-regular text-text-primary\" aria-live=\"polite\">\n {this.getMonthLabel()}\n </span>\n\n <button\n type=\"button\"\n class=\"flex h-28 w-28 items-center justify-center rounded-xs hover:bg-states-empty-bg-hover\"\n aria-label=\"Próximo mês\"\n onClick={this.handleNextMonth}\n >\n <sula-icon icon=\"ph ph-caret-right\" customClass=\"text-base text-text-secondary\"></sula-icon>\n </button>\n </div>\n );\n }\n\n renderDay(day: SulaCalendarDay) {\n return (\n <div\n role=\"gridcell\"\n aria-selected={day.isSelected ? 'true' : 'false'}\n aria-disabled={day.isDisabled ? 'true' : null}\n aria-current={day.isToday ? 'date' : null}\n class=\"relative flex w-full items-center justify-center\"\n onMouseEnter={() => this.handleDayHover(day)}\n >\n {(day.isInRange || day.isRangeStart !== day.isRangeEnd) && (\n <span\n data-range-background\n aria-hidden=\"true\"\n class={{\n 'absolute inset-y-0 bg-surface-on-body-brand': true,\n 'inset-x-0': day.isInRange,\n 'right-0 w-1/2': day.isRangeStart && !day.isRangeEnd,\n 'left-0 w-1/2': day.isRangeEnd && !day.isRangeStart,\n }}\n ></span>\n )}\n <button\n type=\"button\"\n disabled={day.isDisabled}\n aria-label={this.formatDate(day.date)}\n onClick={(event: MouseEvent) => this.handleSelectDay(event, day)}\n class={{\n 'relative flex h-36 w-36 items-center justify-center rounded-xxl text-label-small-regular transition-colors': true,\n 'bg-brand-primary text-neutral-neutral-1': day.isSelected,\n 'border border-brand-primary text-text-primary': day.isRangePreview && !day.isSelected,\n 'text-text-primary hover:bg-states-empty-bg-hover': !day.isSelected && day.isCurrentMonth && !day.isDisabled,\n 'text-text-secondary opacity-50 hover:bg-states-empty-bg-hover': !day.isSelected && !day.isCurrentMonth && !day.isDisabled,\n 'cursor-not-allowed text-text-disabled line-through': day.isDisabled,\n }}\n >\n {day.day}\n </button>\n </div>\n );\n }\n\n renderPanel() {\n return (\n <div\n ref={node => (this.panelNode = node)}\n role={this.inline ? 'group' : 'dialog'}\n aria-label=\"Calendário\"\n class={{\n 'calendar-panel flex flex-col items-center rounded-lg border border-line-general bg-surface-body p-24': true,\n 'w-full': !this.compact || this.inline,\n 'absolute left-0 z-50': !this.inline,\n 'calendar-panel--compact': this.compact && !this.inline,\n 'bottom-full mb-8': !this.inline && this.openUpward,\n 'top-full mt-8': !this.inline && !this.openUpward,\n }}\n >\n <div class=\"flex w-full flex-col items-center gap-24\">\n {this.renderHeader()}\n\n <div class=\"flex w-full flex-col\" role=\"grid\">\n <div class=\"grid grid-cols-7\" role=\"row\">\n {this.getWeekdays().map(weekday => (\n <div role=\"columnheader\" title={weekday.long} class=\"flex h-22 w-full items-center justify-center text-label-small-regular text-text-secondary\">\n {weekday.short}\n </div>\n ))}\n </div>\n\n <div role=\"rowgroup\" class=\"grid gap-y-8 pt-8\" onMouseLeave={this.handleGridLeave}>\n {this.getWeeks().map(week => (\n <div class=\"grid grid-cols-7\" role=\"row\">\n {week.map(day => this.renderDay(day))}\n </div>\n ))}\n </div>\n </div>\n </div>\n </div>\n );\n }\n\n render() {\n return (\n <Host ref={node => (this.node = node)}>\n <div class={{ 'relative': true, 'w-full': !this.compact || this.inline, 'inline-block': this.compact && !this.inline }}>\n {!this.inline && this.compact && (\n <button\n type=\"button\"\n disabled={this.disabled}\n aria-haspopup=\"dialog\"\n aria-expanded={this.showCalendar ? 'true' : 'false'}\n aria-label={this.label}\n onClick={this.handleCompactClick}\n class={{\n 'flex h-40 items-center justify-center gap-8 rounded-xxl bg-surface-on-body px-16 py-2 text-label-medium-bold text-text-primary': true,\n 'cursor-not-allowed opacity-50': this.disabled,\n }}\n >\n <sula-icon icon=\"ph ph-calendar-dots\" customClass=\"text-2xl text-text-secondary\"></sula-icon>\n <span class=\"whitespace-nowrap\">{this.getCompactLabel()}</span>\n <sula-icon icon={this.showCalendar ? 'ph ph-caret-up' : 'ph ph-caret-down'} customClass=\"text-base text-text-primary\"></sula-icon>\n </button>\n )}\n\n {!this.inline && !this.compact && (\n <div onClick={this.handleFieldClick} onKeyDown={this.handleFieldKeydown}>\n <sula-textfield\n label={this.label}\n value={this.value}\n placeholder={this.placeholder}\n disabled={this.disabled}\n helpText={this.helpText}\n status={this.getTextfieldStatus()}\n icon=\"ph ph-calendar-blank\"\n maskPattern={this.range ? '99/99/9999 - 99/99/9999' : '99/99/9999'}\n readOnly={!this.allowTyping}\n onValueChanged={this.handleInputChanged}\n ></sula-textfield>\n </div>\n )}\n\n {(this.inline || this.showCalendar) && this.renderPanel()}\n </div>\n </Host>\n );\n }\n}\n"],"version":3}