@sula-tech/webcomponents 0.0.0-snapshot-feature-workbench-menu-57f51ec → 0.0.0-snapshot-update-release-workflow-eeeefa9

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 (164) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/sula-avatar_32.cjs.entry.js +176 -99
  3. package/dist/cjs/sula-avatar_32.cjs.entry.js.map +1 -1
  4. package/dist/cjs/sula-profile-menu.cjs.entry.js +1 -1
  5. package/dist/cjs/sula-profile-menu.cjs.entry.js.map +1 -1
  6. package/dist/cjs/sula-profile-menu.entry.cjs.js.map +1 -1
  7. package/dist/cjs/sula-toast-stack.cjs.entry.js +4 -4
  8. package/dist/cjs/sula-toast.cjs.entry.js +2 -2
  9. package/dist/cjs/sula-workbench-menu.cjs.entry.js +124 -61
  10. package/dist/cjs/sula-workbench-menu.cjs.entry.js.map +1 -1
  11. package/dist/cjs/sula-workbench-menu.entry.cjs.js.map +1 -1
  12. package/dist/cjs/webcomponents.cjs.js +1 -1
  13. package/dist/collection/components/sula-button/sula-button.css +1 -1
  14. package/dist/collection/components/sula-calendar/sula-calendar.css +1 -1
  15. package/dist/collection/components/sula-calendar/sula-calendar.js +56 -17
  16. package/dist/collection/components/sula-calendar/sula-calendar.js.map +1 -1
  17. package/dist/collection/components/sula-calendar/sula-calendar.stories.js +16 -1
  18. package/dist/collection/components/sula-calendar/sula-calendar.stories.js.map +1 -1
  19. package/dist/collection/components/sula-chip/sula-chip.css +1 -1
  20. package/dist/collection/components/sula-chip/sula-chip.js +30 -4
  21. package/dist/collection/components/sula-chip/sula-chip.js.map +1 -1
  22. package/dist/collection/components/sula-chip/sula-chip.stories.js +55 -0
  23. package/dist/collection/components/sula-chip/sula-chip.stories.js.map +1 -1
  24. package/dist/collection/components/sula-dropdown/sula-dropdown.js +3 -3
  25. package/dist/collection/components/sula-icon/sula-icon.css +1 -1
  26. package/dist/collection/components/sula-icon/sula-icon.js +1 -1
  27. package/dist/collection/components/sula-icon-picker/sula-icon-picker.js +2 -2
  28. package/dist/collection/components/sula-loader/sula-loader.css +1 -1
  29. package/dist/collection/components/sula-loader/sula-loader.js +1 -1
  30. package/dist/collection/components/sula-menu/sula-menu.css +1 -1
  31. package/dist/collection/components/sula-menu/sula-menu.js +13 -13
  32. package/dist/collection/components/sula-menu/sula-menu.js.map +1 -1
  33. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.css +1 -1
  34. package/dist/collection/components/sula-menu-select-list/sula-menu-select-list.js +1 -1
  35. package/dist/collection/components/sula-modal/sula-modal.css +1 -1
  36. package/dist/collection/components/sula-modal/sula-modal.js +142 -11
  37. package/dist/collection/components/sula-modal/sula-modal.js.map +1 -1
  38. package/dist/collection/components/sula-modal/sula-modal.stories.js +48 -0
  39. package/dist/collection/components/sula-modal/sula-modal.stories.js.map +1 -1
  40. package/dist/collection/components/sula-profile-menu/sula-profile-menu.css +1 -1
  41. package/dist/collection/components/sula-progress-bar/sula-progress-bar.js +2 -2
  42. package/dist/collection/components/sula-radio-button/sula-radio-button.js +2 -2
  43. package/dist/collection/components/sula-search-bar/sula-search-bar.js +2 -2
  44. package/dist/collection/components/sula-segmented-control/sula-segmented-control.js +1 -1
  45. package/dist/collection/components/sula-switch/sula-switch.css +1 -1
  46. package/dist/collection/components/sula-switch/sula-switch.js +4 -4
  47. package/dist/collection/components/sula-table/sula-table.js +3 -3
  48. package/dist/collection/components/sula-table-body/sula-table-body.js +1 -1
  49. package/dist/collection/components/sula-table-cell/sula-table-cell.js +2 -2
  50. package/dist/collection/components/sula-table-head-cell/sula-table-head-cell.js +2 -2
  51. package/dist/collection/components/sula-table-header/sula-table-header.js +1 -1
  52. package/dist/collection/components/sula-table-row/sula-table-row.js +1 -1
  53. package/dist/collection/components/sula-tag/sula-tag.js +3 -3
  54. package/dist/collection/components/sula-textarea/sula-textarea.js +6 -6
  55. package/dist/collection/components/sula-textfield/sula-textfield.css +1 -1
  56. package/dist/collection/components/sula-textfield/sula-textfield.js +2 -2
  57. package/dist/collection/components/sula-tiles/sula-tiles.js +1 -1
  58. package/dist/collection/components/sula-timeline-list/sula-timeline-list.js +1 -1
  59. package/dist/collection/components/sula-toast/sula-toast.js +2 -2
  60. package/dist/collection/components/sula-toast-stack/sula-toast-stack.js +4 -4
  61. package/dist/collection/components/sula-toggle/sula-toggle.js +1 -1
  62. package/dist/collection/components/sula-tooltip/sula-tooltip.js +1 -1
  63. package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.css +1 -1
  64. package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js +138 -74
  65. package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js.map +1 -1
  66. package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js +218 -99
  67. package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js.map +1 -1
  68. package/dist/components/{p-Wd3q-zRy.js → p-1SBJ2JjF.js} +6 -6
  69. package/dist/components/{p-Wd3q-zRy.js.map → p-1SBJ2JjF.js.map} +1 -1
  70. package/dist/components/{p-YsuXC_9x.js → p-BD4DLCMm.js} +5 -5
  71. package/dist/components/{p-YsuXC_9x.js.map → p-BD4DLCMm.js.map} +1 -1
  72. package/dist/components/{p-DkXdsyPr.js → p-Bdc73E-Z.js} +7 -7
  73. package/dist/components/{p-DkXdsyPr.js.map → p-Bdc73E-Z.js.map} +1 -1
  74. package/dist/components/{p-MPkJUrNl.js → p-BlRYoc3b.js} +4 -4
  75. package/dist/components/{p-MPkJUrNl.js.map → p-BlRYoc3b.js.map} +1 -1
  76. package/dist/components/{p-B5MmQ8zn.js → p-BrjLS4Oh.js} +5 -5
  77. package/dist/components/{p-B5MmQ8zn.js.map → p-BrjLS4Oh.js.map} +1 -1
  78. package/dist/components/{p-CZdy_Df-.js → p-Cktbp7SD.js} +5 -5
  79. package/dist/components/{p-CZdy_Df-.js.map → p-Cktbp7SD.js.map} +1 -1
  80. package/dist/components/{p-DpW2KDYm.js → p-DP9qGgPM.js} +4 -4
  81. package/dist/components/{p-DpW2KDYm.js.map → p-DP9qGgPM.js.map} +1 -1
  82. package/dist/components/{p-CvpbIDzE.js → p-DTZo84U5.js} +5 -5
  83. package/dist/components/{p-CvpbIDzE.js.map → p-DTZo84U5.js.map} +1 -1
  84. package/dist/components/{p-B8AsfKSM.js → p-KIC3LfH4.js} +7 -7
  85. package/dist/components/{p-B8AsfKSM.js.map → p-KIC3LfH4.js.map} +1 -1
  86. package/dist/components/{p-DCGHpgTv.js → p-boQwbNNO.js} +5 -5
  87. package/dist/components/{p-DCGHpgTv.js.map → p-boQwbNNO.js.map} +1 -1
  88. package/dist/components/sula-avatar.js +1 -1
  89. package/dist/components/sula-badge.js +1 -1
  90. package/dist/components/sula-breadcrumb.js +1 -1
  91. package/dist/components/sula-button.js +1 -1
  92. package/dist/components/sula-calendar.js +59 -20
  93. package/dist/components/sula-calendar.js.map +1 -1
  94. package/dist/components/sula-checkbox.js +1 -1
  95. package/dist/components/sula-chip.js +15 -7
  96. package/dist/components/sula-chip.js.map +1 -1
  97. package/dist/components/sula-dropdown.js +1 -1
  98. package/dist/components/sula-icon-picker.js +6 -6
  99. package/dist/components/sula-icon.js +1 -1
  100. package/dist/components/sula-loader.js +1 -1
  101. package/dist/components/sula-menu-select-list.js +1 -1
  102. package/dist/components/sula-menu.js +15 -15
  103. package/dist/components/sula-menu.js.map +1 -1
  104. package/dist/components/sula-modal.js +51 -15
  105. package/dist/components/sula-modal.js.map +1 -1
  106. package/dist/components/sula-profile-menu.js +1 -1
  107. package/dist/components/sula-progress-bar.js +3 -3
  108. package/dist/components/sula-radio-button.js +2 -2
  109. package/dist/components/sula-search-bar.js +1 -1
  110. package/dist/components/sula-segmented-control.js +2 -2
  111. package/dist/components/sula-switch.js +1 -1
  112. package/dist/components/sula-table-body.js +1 -1
  113. package/dist/components/sula-table-cell.js +2 -2
  114. package/dist/components/sula-table-head-cell.js +2 -2
  115. package/dist/components/sula-table-header.js +1 -1
  116. package/dist/components/sula-table-row.js +1 -1
  117. package/dist/components/sula-table.js +3 -3
  118. package/dist/components/sula-tag.js +4 -4
  119. package/dist/components/sula-textarea.js +6 -6
  120. package/dist/components/sula-textfield.js +1 -1
  121. package/dist/components/sula-tiles.js +2 -2
  122. package/dist/components/sula-timeline-list.js +2 -2
  123. package/dist/components/sula-toast-stack.js +6 -6
  124. package/dist/components/sula-toast.js +1 -1
  125. package/dist/components/sula-toggle.js +2 -2
  126. package/dist/components/sula-tooltip.js +2 -2
  127. package/dist/components/sula-workbench-menu.js +131 -66
  128. package/dist/components/sula-workbench-menu.js.map +1 -1
  129. package/dist/esm/loader.js +1 -1
  130. package/dist/esm/sula-avatar_32.entry.js +176 -99
  131. package/dist/esm/sula-avatar_32.entry.js.map +1 -1
  132. package/dist/esm/sula-profile-menu.entry.js +1 -1
  133. package/dist/esm/sula-profile-menu.entry.js.map +1 -1
  134. package/dist/esm/sula-toast-stack.entry.js +4 -4
  135. package/dist/esm/sula-toast.entry.js +2 -2
  136. package/dist/esm/sula-workbench-menu.entry.js +124 -61
  137. package/dist/esm/sula-workbench-menu.entry.js.map +1 -1
  138. package/dist/esm/webcomponents.js +1 -1
  139. package/dist/types/components/sula-calendar/sula-calendar.d.ts +9 -3
  140. package/dist/types/components/sula-calendar/sula-calendar.stories.d.ts +1 -0
  141. package/dist/types/components/sula-chip/sula-chip.d.ts +5 -0
  142. package/dist/types/components/sula-chip/sula-chip.stories.d.ts +12 -0
  143. package/dist/types/components/sula-modal/sula-modal.d.ts +21 -0
  144. package/dist/types/components/sula-modal/sula-modal.stories.d.ts +22 -0
  145. package/dist/types/components/sula-workbench-menu/sula-workbench-menu.d.ts +18 -9
  146. package/dist/types/components/sula-workbench-menu/sula-workbench-menu.stories.d.ts +26 -19
  147. package/dist/types/components.d.ts +79 -23
  148. package/dist/webcomponents/{p-df271629.entry.js → p-18c84807.entry.js} +6 -6
  149. package/dist/webcomponents/p-235dcb90.entry.js +880 -0
  150. package/dist/webcomponents/p-235dcb90.entry.js.map +1 -0
  151. package/dist/webcomponents/{p-60d2ad8f.entry.js → p-3344a9f9.entry.js} +406 -289
  152. package/dist/webcomponents/p-3344a9f9.entry.js.map +1 -0
  153. package/dist/webcomponents/{p-c552c435.entry.js → p-705e2424.entry.js} +16 -16
  154. package/dist/webcomponents/{p-4251c973.entry.js → p-7e31b463.entry.js} +2 -2
  155. package/dist/webcomponents/sula-profile-menu.entry.esm.js.map +1 -1
  156. package/dist/webcomponents/sula-workbench-menu.entry.esm.js.map +1 -1
  157. package/dist/webcomponents/webcomponents.esm.js +15 -7
  158. package/package.json +1 -1
  159. package/dist/webcomponents/p-569d0bad.entry.js +0 -807
  160. package/dist/webcomponents/p-569d0bad.entry.js.map +0 -1
  161. package/dist/webcomponents/p-60d2ad8f.entry.js.map +0 -1
  162. /package/dist/webcomponents/{p-df271629.entry.js.map → p-18c84807.entry.js.map} +0 -0
  163. /package/dist/webcomponents/{p-c552c435.entry.js.map → p-705e2424.entry.js.map} +0 -0
  164. /package/dist/webcomponents/{p-4251c973.entry.js.map → p-7e31b463.entry.js.map} +0 -0
@@ -1,807 +0,0 @@
1
- import { r as e, c as t, h as i, H as r, a as o } from "./p-BL15Tt3m.js";
2
-
3
- import { S as n, a } from "./p-Cs9RR1ZV.js";
4
-
5
- const s = '*,: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}.visible{visibility:visible}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.block{display:block}.flex{display:flex}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.outline{outline-style:solid}.transition{transition-duration:.15s;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1)}: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{--sula-menu-width:280px;--sula-menu-collapsed-width:88px;--sula-menu-main-item-font-size:1rem;--sula-menu-main-item-line-height:1.25rem;--sula-menu-sub-item-font-size:0.9375rem;--sula-menu-main-item-max-lines:2;--sula-menu-main-item-padding-block:0.5rem;display:block;height:100%;overflow:visible;position:relative;transition:width .36s cubic-bezier(.22,1,.36,1);width:var(--sula-menu-width)}:host(.menu-host--density-compact){--sula-menu-main-item-font-size:0.875rem;--sula-menu-main-item-line-height:1.125rem;--sula-menu-sub-item-font-size:0.8125rem;--sula-menu-main-item-padding-block:0.375rem}:host(.menu-host--density-comfortable){--sula-menu-main-item-font-size:1.0625rem;--sula-menu-main-item-line-height:1.5rem;--sula-menu-sub-item-font-size:1rem;--sula-menu-main-item-padding-block:0.625rem}:host(.menu-host--collapsed){width:var(--sula-menu-collapsed-width)}.menu-shell{min-height:100%;overflow:hidden;padding:20px 0 12px;position:relative;transition:padding .36s cubic-bezier(.22,1,.36,1),width .36s cubic-bezier(.22,1,.36,1),transform .36s cubic-bezier(.22,1,.36,1),box-shadow .36s cubic-bezier(.22,1,.36,1),border-radius .28s cubic-bezier(.4,0,.2,1),background-color .22s cubic-bezier(.4,0,.2,1);width:100%}.menu-shell--expanded{box-shadow:0 10px 24px rgba(15,23,42,.08),0 2px 8px rgba(15,23,42,.06);padding:20px 20px 12px;width:var(--sula-menu-width)}.menu-shell--collapsed{box-shadow:0 8px 18px rgba(15,23,42,.06),0 1px 4px rgba(15,23,42,.04)}.menu-shell--preview{border-radius:0 24px 24px 0;bottom:0;box-shadow:0 28px 60px rgba(15,23,42,.18),0 10px 24px rgba(15,23,42,.12);left:0;position:absolute;top:0;width:var(--sula-menu-width);z-index:2}.menu-header{gap:0;transition:padding .36s cubic-bezier(.22,1,.36,1)}.menu-group+.menu-group{margin-top:8px}.submenu>li.is-selected{position:relative}.submenu>li.is-selected:before{background:var(--color-brand-primary,#f05223);border-radius:2px;bottom:6px;content:"";left:-1.5px;position:absolute;top:6px;width:2px}.menu-toggle{background:var(--color-surface-body,#fff);border:1px solid var(--color-line-general,#e5e6e6);border-radius:999px;color:var(--color-icon-primary,#6c6e6e);cursor:pointer;height:32px;margin-left:auto;padding:0;transition:color .16s cubic-bezier(.4,0,.2,1),border-color .16s cubic-bezier(.4,0,.2,1),background-color .16s cubic-bezier(.4,0,.2,1);width:32px}.menu-toggle:hover{border-color:var(--color-brand-primary,#f05223);color:var(--color-brand-primary,#f05223)}.menu-toggle:focus-visible{outline:2px solid var(--color-states-bg-focus,#1355b4);outline-offset:2px}.menu-shell--collapsed .menu-toggle{margin:16px 0 0}.menu-shell--collapsed .menu-item{margin-inline:0;padding-block:10px}.menu-shell--collapsed .item-icon{height:20px;width:20px}.menu-shell--collapsed .item-icon i{font-size:20px}.menu-shell--expanded .user-info{margin-inline:-8px}.menu-shell--collapsed .menu-footer{padding-inline:18px}.menu-shell--collapsed .menu-nav{scrollbar-width:none}.menu-shell--collapsed .menu-nav::-webkit-scrollbar{display:none}.menu-copy--hidden.menu-item-label--wrap{white-space:nowrap}.menu-nav{scrollbar-color:var(--color-line-general-strong,#bfc0c0) transparent;scrollbar-width:thin;transition:padding .36s cubic-bezier(.22,1,.36,1)}.menu-shell--expanded .menu-nav{margin-inline:-20px;padding-left:20px;padding-right:14px;scrollbar-gutter:stable}.menu-nav::-webkit-scrollbar{width:6px}.menu-nav::-webkit-scrollbar-track{background:transparent}.menu-nav::-webkit-scrollbar-thumb{background:var(--color-line-general-strong,#bfc0c0);border-radius:999px}.menu-nav::-webkit-scrollbar-thumb:hover{background:var(--color-text-disabled,#949595)}.item-icon{height:16px;width:16px}.menu-nav .menu-item,.menu-nav .menu-item>div,.menu-nav .submenu-item,.menu-nav .submenu-item-branch-caret,.menu-nav .submenu-item-branch-content{align-items:flex-start}.submenu-item .submenu-item-label{font-size:var(--sula-menu-sub-item-font-size);line-height:1.25rem}.menu-nav .item-icon,.menu-nav .menu-item-caret,.menu-nav .submenu-item-branch-caret{height:1.25rem}.menu-shell--expanded .menu-item .item-icon{width:18px}.menu-shell--expanded .menu-item .item-icon i{font-size:18px}.menu-footer{transition:padding .36s cubic-bezier(.22,1,.36,1)}.menu-brand-image{flex:0 0 auto;transition:margin .32s cubic-bezier(.22,1,.36,1),transform .32s cubic-bezier(.22,1,.36,1)}.menu-copy{display:block;max-width:220px;min-width:0;opacity:1;overflow:hidden;transform:translateX(0);transform-origin:left center;transition:max-width .32s cubic-bezier(.22,1,.36,1),opacity .2s cubic-bezier(.4,0,.2,1),transform .32s cubic-bezier(.22,1,.36,1);white-space:nowrap}.menu-copy--visible{max-width:100%;opacity:1;pointer-events:auto;transform:translateX(0)}.menu-copy--hidden{max-width:0;opacity:0;pointer-events:none;transform:translateX(-10px)}.menu-title{flex:1 1 auto;min-width:0}.menu-title.menu-copy--visible{max-width:100%}.menu-item-label{flex:1 1 auto;font-size:var(--sula-menu-main-item-font-size);line-height:var(--sula-menu-main-item-line-height)}.menu-item-label--truncate{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.menu-item-label--wrap{-webkit-box-orient:vertical;-webkit-line-clamp:var(--sula-menu-main-item-max-lines);line-clamp:var(--sula-menu-main-item-max-lines);display:-webkit-box;overflow:hidden;overflow-wrap:anywhere;text-overflow:clip;white-space:normal;word-break:break-word}.menu-item{margin-inline:-8px;padding-block:var(--sula-menu-main-item-padding-block);transition:background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1),border-color .24s cubic-bezier(.22,1,.36,1),margin-left .24s cubic-bezier(.22,1,.36,1),padding .32s cubic-bezier(.22,1,.36,1)}.menu-item-caret{max-width:16px;opacity:1;overflow:hidden;transition:transform .28s cubic-bezier(.22,1,.36,1),opacity .18s cubic-bezier(.4,0,.2,1),max-width .28s cubic-bezier(.22,1,.36,1),margin-left .28s cubic-bezier(.22,1,.36,1)}.menu-item-caret--visible{margin-left:12px;max-width:16px;opacity:1}.menu-item-caret--hidden{margin-left:0;max-width:0;opacity:0;transform:translateX(-8px)}.menu-item-caret--expanded{transform:rotate(180deg)}.submenu{max-height:0;opacity:0;overflow:hidden;pointer-events:none;transform:translateY(-6px);transform-origin:top left;transition:max-height .26s cubic-bezier(.22,1,.36,1),opacity .12s cubic-bezier(.4,0,.2,1),transform .18s cubic-bezier(.22,1,.36,1);will-change:max-height,opacity,transform}.submenu--expanded{max-height:999px;opacity:1;pointer-events:auto;transform:translateY(0)}.submenu-item{transition:background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1),transform .24s cubic-bezier(.22,1,.36,1)}.submenu-item--branch{transition:background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1),border-color .24s cubic-bezier(.22,1,.36,1),margin-left .24s cubic-bezier(.22,1,.36,1)}.submenu-item-branch-content{min-width:0}.submenu-branch{transform-origin:top left}.submenu-grandchild-item{transition:background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1),transform .24s cubic-bezier(.22,1,.36,1)}.submenu-grandchild-label{display:block}.menu-header--drilldown{animation:drill-header-in .22s cubic-bezier(.4,0,.2,1)}.identity-strip{align-items:center;background:transparent;border:none;border-radius:8px;color:inherit;cursor:pointer;display:flex;flex:1 1 auto;font:inherit;margin:0 0 0 -8px;min-width:0;padding:6px 8px;text-align:left;transition:background-color .16s cubic-bezier(.4,0,.2,1)}.identity-row{margin-bottom:12px}.identity-strip:hover{background:var(--color-surface-on-body,#f3f4f4)}.identity-image{border-radius:5px;flex:none;height:20px;margin-right:8px;overflow:hidden;width:20px}.identity-image img{display:block;height:100%;width:100%}.identity-label{color:var(--color-text-secondary,#6c6e6e);font-size:13px;font-weight:500;min-width:0}.breadcrumb-row{margin-bottom:10px;min-width:0;position:relative}.back-btn,.breadcrumb-row{align-items:center;display:flex}.back-btn{background:transparent;border:none;border-radius:8px;cursor:pointer;flex:none;height:28px;justify-content:center;margin:0 2px 0 -6px;padding:0;transition:background-color .16s cubic-bezier(.4,0,.2,1);width:28px}.back-btn:hover{background:var(--color-surface-on-body,#f3f4f4)}.crumb-trail{flex:1 1 auto;gap:2px;min-width:0}.crumb-btn{background:transparent;border:none;border-radius:6px;color:var(--color-text-secondary,#6c6e6e);cursor:pointer;flex:0 1 auto;font:inherit;font-size:12px;font-weight:500;max-width:120px;min-width:28px;overflow:hidden;padding:3px 4px;text-align:left;text-overflow:ellipsis;transition:background-color .16s cubic-bezier(.4,0,.2,1),color .16s cubic-bezier(.4,0,.2,1);white-space:nowrap}.crumb-btn:hover{background:var(--color-surface-on-body,#f3f4f4);color:var(--color-text-primary,#313333)}.crumb-btn--ellipsis{align-items:center;display:flex;flex:none;max-width:none;padding:3px 5px}.crumb-sep{color:var(--color-text-disabled,#949595);flex:none}.crumb-dropdown{background:var(--color-surface-body,#fff);border:1px solid var(--color-line-general,#e5e6e6);border-radius:10px;box-shadow:0 14px 32px rgba(15,23,42,.16);display:flex;flex-direction:column;gap:1px;max-width:230px;min-width:172px;padding:6px;position:absolute;z-index:30}.crumb-dropdown-item{align-items:center;background:transparent;border:none;border-radius:6px;color:var(--color-text-primary,#313333);cursor:pointer;display:flex;font:inherit;font-size:13px;gap:8px;overflow:hidden;padding:7px 8px;text-align:left;white-space:nowrap}.crumb-dropdown-item:hover{background:var(--color-surface-on-body,#f3f4f4)}.context-row{min-width:0}.context-icon{height:20px;margin-right:8px;width:20px}.context-title{min-width:0}.menu-panel--forward{animation:drill-slide-forward .26s cubic-bezier(.22,1,.36,1)}.menu-panel--back{animation:drill-slide-back .26s cubic-bezier(.22,1,.36,1)}@keyframes drill-header-in{0%{opacity:0;transform:translateY(-4px)}to{opacity:1;transform:translateY(0)}}@keyframes drill-slide-forward{0%{opacity:0;transform:translateX(20px)}to{opacity:1;transform:translateX(0)}}@keyframes drill-slide-back{0%{opacity:0;transform:translateX(-20px)}to{opacity:1;transform:translateX(0)}}sula-icon{align-items:center;display:inline-flex;flex:none;justify-content:center;line-height:1}sula-icon>i{display:block;line-height:1}.item-icon>.menu-item-image,.item-icon>sula-icon{flex:none}.menu-item-image{display:block;flex:none;-o-object-fit:contain;object-fit:contain;transition:opacity .2s cubic-bezier(.4,0,.2,1)}.menu-item-image--sm{height:.875rem;width:.875rem}.menu-item-image--md{height:1rem;width:1rem}.menu-item-image--lg{height:1.25rem;width:1.25rem}.menu-item-image.is-faded{opacity:.5}.item-icon>.menu-item-image{aspect-ratio:1/1;height:auto;width:100%}.menu-item-image--mask{background-color:currentColor;-webkit-mask:var(--menu-item-image) center/contain no-repeat;mask:var(--menu-item-image) center/contain no-repeat}.user-copy{display:flex;flex-direction:column;min-width:0;overflow:hidden;transition:max-width .32s cubic-bezier(.22,1,.36,1),opacity .2s cubic-bezier(.4,0,.2,1)}.user-copy--visible{max-width:100%;opacity:1;transition:max-width .32s cubic-bezier(.22,1,.36,1),opacity .2s cubic-bezier(.4,0,.2,1) .12s}.user-copy--hidden{max-width:0;opacity:0}.user-avatar img{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.profile-popover{background:var(--color-surface-body);border:1px solid var(--color-line-general);border-radius:12px;box-shadow:0 12px 32px rgba(15,23,42,.12),0 2px 8px rgba(15,23,42,.06);box-sizing:border-box;opacity:0;outline:none;position:fixed;transform:translateY(6px) scale(.98);transform-origin:bottom left;transition:opacity .16s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.22,1,.36,1),visibility 0s linear .2s;visibility:hidden;width:256px;z-index:60}.profile-popover--side{transform:translateX(-6px) scale(.98)}.profile-popover--open{opacity:1;transform:none;transition:opacity .16s cubic-bezier(.4,0,.2,1),transform .2s cubic-bezier(.22,1,.36,1);visibility:visible}@media (prefers-reduced-motion:reduce){.menu-brand-image,.menu-copy,.menu-footer,.menu-header,.menu-header--drilldown,.menu-item,.menu-item-caret,.menu-nav,.menu-panel--back,.menu-panel--forward,.menu-shell,.menu-toggle,.submenu,.submenu-item,:host{animation:none}.menu-item-caret,.profile-popover,.submenu-grandchild-item,.submenu-item{transition:none}}@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")}: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}.z-50{z-index:50}.mb-16{margin-bottom:1rem}.mb-24{margin-bottom:1.5rem}.mb-40{margin-bottom:2.5rem}.ml-8{margin-left:.5rem}.ml-\\[24px\\]{margin-left:24px}.ml-\\[8px\\]{margin-left:8px}.mr-6{margin-right:1.5rem}.mt-8{margin-top:.5rem}.inline{display:inline}.h-9{height:2.25rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.w-9{width:2.25rem}.w-full{width:100%}.min-w-0{min-width:0}.max-w-10{max-width:2.5rem}.flex-1{flex:1 1 0%}.flex-none{flex:none}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.select-none{user-select:none}.resize{resize:both}.list-none{list-style-type:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-8{gap:.5rem}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.overflow-x-hidden{overflow-x:hidden}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded-full{border-radius:9999px}.rounded-xs{border-radius:.5rem}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-t{border-top-width:1px}.border-line-general{border-color:var(--color-line-general)}.bg-box-shadow-body{background-color:var(--color-box-shadow-body)}.bg-brand-primary{background-color:var(--color-brand-primary)}.bg-surface-body{background-color:var(--color-surface-body)}.p-8{padding:.5rem}.px-0{padding-left:0;padding-right:0}.px-12{padding-left:.75rem;padding-right:.75rem}.px-8{padding-left:.5rem;padding-right:.5rem}.py-8{padding-bottom:.5rem;padding-top:.5rem}.pb-24{padding-bottom:1.5rem}.pl-8{padding-left:.5rem}.pr-8{padding-right:.5rem}.pt-12{padding-top:.75rem}.text-left{text-align:left}.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}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-7{line-height:1.75rem}.leading-tight{line-height:1.25}.text-brand-primary{color:var(--color-brand-primary)}.text-icon-disabled{color:var(--color-icon-disabled)}.text-icon-primary{color:var(--color-icon-primary)}.text-negative-negative-1{color:var(--color-negative-negative-1)}.text-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)}.shadow,.shadow-md{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -2px rgba(0,0,0,.1);--tw-shadow-colored:0 4px 6px -1px var(--tw-shadow-color),0 2px 4px -2px var(--tw-shadow-color)}.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)}.hover\\:bg-box-shadow-body:hover{background-color:var(--color-box-shadow-body)}';
6
-
7
- const l = class {
8
- constructor(i) {
9
- e(this, i);
10
- this.itemSelected = t(this, "itemSelected");
11
- this.itemClicked = t(this, "itemClicked");
12
- this.levelChanged = t(this, "levelChanged");
13
- this.profileClicked = t(this, "profileClicked");
14
- this.profileItemClicked = t(this, "profileItemClicked");
15
- this.profileSwitchChanged = t(this, "profileSwitchChanged");
16
- this.menuToggled = t(this, "menuToggled");
17
- /**
18
- * Menu title
19
- */ this.menuTitle = "";
20
- /**
21
- * Menu image
22
- */ this.image = "";
23
- /**
24
- * Menu width in expanded state. Use a CSS length that does not depend on the
25
- * host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).
26
- */ this.width = "";
27
- /**
28
- * Density applied to menu items.
29
- */ this.density = n.Default;
30
- /**
31
- * Overflow behavior for item labels.
32
- */ this.labelOverflow = a.Wrap;
33
- /**
34
- * Depth (1-based) from which items with children open a drill-down panel instead of expanding in place.
35
- * With the default of 3, the first two levels expand inline and deeper branches drill down.
36
- */ this.drilldownLevel = 3;
37
- /**
38
- * Menu items. Each item may use `icon` (icon font class) or `image` (URL or data URI of an image or SVG).
39
- */ this.items = [];
40
- /**
41
- * Icon used for items without `icon` or `image`. Use an empty string to show no icon.
42
- */ this.defaultIcon = "ph ph-dot-outline";
43
- /**
44
- * Options of the profile popover. Use `divider` for a separator and `hasSwitch` + `active` for a toggle row.
45
- */ this.profileItems = [];
46
- this.collapsed = false;
47
- this.previewExpanded = false;
48
- this.stack = [];
49
- this.direction = "forward";
50
- this.selectedPath = [];
51
- this.crumbMenu = {
52
- open: false,
53
- left: 0,
54
- top: 0
55
- };
56
- this.profileOpen = false;
57
- this.hovering = false;
58
- }
59
- get normalizedWidth() {
60
- var e;
61
- const t = (e = this.width) === null || e === void 0 ? void 0 : e.trim();
62
- return t ? t : undefined;
63
- }
64
- get hostStyleVariables() {
65
- return Object.assign({}, this.normalizedWidth ? {
66
- "--sula-menu-width": this.normalizedWidth
67
- } : {});
68
- }
69
- componentWillLoad() {
70
- this.syncWithItems(this.items);
71
- }
72
- syncWithItems(e) {
73
- const t = this.findSelectedIds(e);
74
- if (t) {
75
- this.selectedPath = t;
76
- } else if (!this.selectedPath.length || !this.isStillSelectable(e, this.selectedPath)) {
77
- this.selectedPath = [];
78
- }
79
- this.stack = this.rebuildStack(e, this.stack);
80
- }
81
- componentDidRender() {
82
- this.positionProfile();
83
- }
84
- onDocumentClick(e) {
85
- const t = e.composedPath();
86
- if (this.profileOpen && !t.includes(this.profileEl) && !t.includes(this.userInfoEl)) this.closeProfile();
87
- if (!this.crumbMenu.open) return;
88
- if (t.includes(this.crumbEllipsisEl) || t.includes(this.crumbDropdownEl)) return;
89
- this.closeCrumbMenu();
90
- }
91
- onDocumentKeydown(e) {
92
- var t;
93
- if (e.key !== "Escape") return;
94
- this.closeCrumbMenu();
95
- if (this.profileOpen) {
96
- this.closeProfile();
97
- (t = this.userInfoEl) === null || t === void 0 ? void 0 : t.focus();
98
- }
99
- }
100
- onWindowResize() {
101
- this.positionProfile();
102
- }
103
- getVisibleItems(e) {
104
- var t;
105
- return (t = e === null || e === void 0 ? void 0 : e.filter((e => !e.hidden))) !== null && t !== void 0 ? t : [];
106
- }
107
- hasVisibleChildren(e) {
108
- return this.getVisibleItems(e.children).length > 0;
109
- }
110
- isDrilled() {
111
- return this.stack.length >= this.drilldownLevel;
112
- }
113
- findSelectedIds(e, t = []) {
114
- for (const i of this.getVisibleItems(e)) {
115
- if (!this.hasVisibleChildren(i)) {
116
- if (i.selected) return [ ...t, i.id ];
117
- continue;
118
- }
119
- const e = this.findSelectedIds(i.children, [ ...t, i.id ]);
120
- if (e) return e;
121
- }
122
- return undefined;
123
- }
124
- isStillSelectable(e, t) {
125
- const i = this.findPath(e, t[t.length - 1]);
126
- return !!i && !this.hasVisibleChildren(i[i.length - 1]);
127
- }
128
- toggleExpanded(e, t) {
129
- return e.map((e => {
130
- if (e.id === t) return Object.assign(Object.assign({}, e), {
131
- expanded: !e.expanded
132
- });
133
- if (!e.children) return e;
134
- return Object.assign(Object.assign({}, e), {
135
- children: this.toggleExpanded(e.children, t)
136
- });
137
- }));
138
- }
139
- findPath(e, t, i = []) {
140
- var r;
141
- for (const o of this.getVisibleItems(e)) {
142
- const e = [ ...i, o ];
143
- if (o.id === t) return e;
144
- const n = this.findPath((r = o.children) !== null && r !== void 0 ? r : [], t, e);
145
- if (n) return n;
146
- }
147
- return undefined;
148
- }
149
- rebuildStack(e, t) {
150
- var i;
151
- const r = [];
152
- let o = e;
153
- for (const e of t) {
154
- const t = this.getVisibleItems(o).find((t => t.id === e.id));
155
- if (!t) break;
156
- r.push(t);
157
- o = (i = t.children) !== null && i !== void 0 ? i : [];
158
- }
159
- return r;
160
- }
161
- isActive(e, t) {
162
- if (t) return this.selectedPath.includes(e.id);
163
- return this.selectedPath.length > 0 && this.selectedPath[this.selectedPath.length - 1] === e.id;
164
- }
165
- isFaded(e, t) {
166
- return !!e.disabled && !t;
167
- }
168
- emitLevel() {
169
- this.levelChanged.emit(this.stack.map((e => e.id)));
170
- }
171
- toggleInline(e) {
172
- this.items = this.toggleExpanded(this.items, e);
173
- }
174
- enterDrill(e) {
175
- var t;
176
- const i = (t = this.findPath(this.items, e.id)) !== null && t !== void 0 ? t : [ e ];
177
- this.direction = "forward";
178
- this.stack = i;
179
- this.closeCrumbMenu();
180
- this.emitLevel();
181
- }
182
- markSelected(e, t) {
183
- return e.map((e => Object.assign(Object.assign(Object.assign({}, e), {
184
- selected: e.id === t
185
- }), e.children ? {
186
- children: this.markSelected(e.children, t)
187
- } : {})));
188
- }
189
- // Selection lives on the items (like `expanded`), so re-assigning items when a branch is
190
- // toggled keeps the user's choice instead of falling back to the initially selected item.
191
- selectItem(e) {
192
- var t;
193
- const i = (t = this.findPath(this.items, e.id)) !== null && t !== void 0 ? t : [ e ];
194
- this.items = this.markSelected(this.items, e.id);
195
- this.selectedPath = i.map((e => e.id));
196
- this.itemSelected.emit(e);
197
- }
198
- handleRowClick(e, t) {
199
- if (e.disabled) return;
200
- this.itemClicked.emit(e);
201
- if (this.hasVisibleChildren(e)) {
202
- if (t < this.drilldownLevel) {
203
- this.toggleInline(e.id);
204
- } else {
205
- this.enterDrill(e);
206
- }
207
- return;
208
- }
209
- this.selectItem(e);
210
- }
211
- goToDepth(e) {
212
- this.direction = "back";
213
- this.stack = e < 0 ? [] : this.stack.slice(0, e + 1);
214
- this.closeCrumbMenu();
215
- this.emitLevel();
216
- }
217
- toggleCrumbMenu(e) {
218
- if (this.crumbMenu.open) {
219
- this.closeCrumbMenu();
220
- return;
221
- }
222
- const t = e.currentTarget;
223
- this.crumbMenu = {
224
- open: true,
225
- left: t.offsetLeft,
226
- top: t.offsetTop + t.offsetHeight + 6
227
- };
228
- }
229
- closeCrumbMenu() {
230
- if (this.crumbMenu.open) this.crumbMenu = Object.assign(Object.assign({}, this.crumbMenu), {
231
- open: false
232
- });
233
- }
234
- toggleMenu() {
235
- this.closeProfile();
236
- if (this.collapsed) {
237
- this.collapsed = false;
238
- this.previewExpanded = false;
239
- this.menuToggled.emit(true);
240
- return;
241
- }
242
- this.collapsed = true;
243
- this.menuToggled.emit(false);
244
- this.previewExpanded = false;
245
- }
246
- handleMenuMouseEnter() {
247
- this.hovering = true;
248
- if (this.collapsed) this.previewExpanded = true;
249
- }
250
- // While the popover is open the preview stays expanded, so the popover keeps its anchor.
251
- handleMenuMouseLeave() {
252
- this.hovering = false;
253
- if (this.collapsed && !this.profileOpen) this.previewExpanded = false;
254
- }
255
- toggleProfile() {
256
- if (this.profileOpen) {
257
- this.closeProfile();
258
- return;
259
- }
260
- if (this.profileClicked.emit(this.user).defaultPrevented) return;
261
- this.profileOpen = true;
262
- requestAnimationFrame((() => {
263
- var e;
264
- return (e = this.profileEl) === null || e === void 0 ? void 0 : e.focus();
265
- }));
266
- }
267
- closeProfile() {
268
- if (!this.profileOpen) return;
269
- this.profileOpen = false;
270
- if (this.collapsed && !this.hovering) this.previewExpanded = false;
271
- }
272
- // Fixed position, so ancestors with overflow hidden do not clip the popover.
273
- positionProfile() {
274
- if (!this.profileOpen || !this.profileEl || !this.userInfoEl || !this.shellEl) return;
275
- const e = 8;
276
- const t = 12;
277
- const i = this.userInfoEl.getBoundingClientRect();
278
- const r = this.shellEl.getBoundingClientRect();
279
- const o = this.profileEl.style;
280
- if (!this.collapsed || this.previewExpanded) {
281
- o.left = `${r.left + t}px`;
282
- o.width = `${r.width - t * 2}px`;
283
- o.bottom = `${window.innerHeight - i.top + e}px`;
284
- return;
285
- }
286
- o.left = `${r.right + e}px`;
287
- o.width = "";
288
- o.bottom = `${window.innerHeight - i.bottom}px`;
289
- }
290
- // Inner events are composed; stopping them avoids clashing with this menu's own itemClicked.
291
- handleProfileItemClicked(e) {
292
- e.stopPropagation();
293
- this.closeProfile();
294
- this.profileItemClicked.emit(e.detail);
295
- }
296
- handleProfileSwitchChanged(e) {
297
- e.stopPropagation();
298
- const {item: t} = e.detail;
299
- this.profileItems = this.profileItems.map((e => e.id === t.id ? t : e));
300
- this.profileSwitchChanged.emit(e.detail);
301
- }
302
- renderProfilePopover(e) {
303
- return i("div", {
304
- part: "profile-popover",
305
- role: "dialog",
306
- "aria-label": `Perfil de ${this.user.name}`,
307
- "aria-hidden": String(!this.profileOpen),
308
- tabIndex: -1,
309
- ref: e => this.profileEl = e,
310
- class: {
311
- "profile-popover": true,
312
- "profile-popover--open": this.profileOpen,
313
- "profile-popover--side": !e
314
- }
315
- }, i("sula-profile-menu", {
316
- user: this.user,
317
- items: this.profileItems,
318
- onItemClicked: e => this.handleProfileItemClicked(e),
319
- onSwitchChanged: e => this.handleProfileSwitchChanged(e)
320
- }, i("slot", {
321
- name: "profile-content"
322
- })));
323
- }
324
- isValidIcon(e) {
325
- return !!e && /ph-[a-z]/.test(e);
326
- }
327
- isSvg(e) {
328
- return /^data:image\/svg\+xml/i.test(e) || /\.svg(\?|#|$)/i.test(e);
329
- }
330
- iconOf(e) {
331
- return this.isValidIcon(e.icon) ? e.icon : this.defaultIcon;
332
- }
333
- hasIcon(e) {
334
- return !!e.image || this.isValidIcon(this.iconOf(e));
335
- }
336
- renderItemIcon(e, t, r, o = false) {
337
- if (!this.hasIcon(e)) return null;
338
- if (e.image && this.isSvg(e.image)) {
339
- // SVGs are painted with currentColor through a mask, so they follow the same state colors as the icon font.
340
- return i("span", {
341
- class: `menu-item-image menu-item-image--mask menu-item-image--${r} ${t}`,
342
- style: {
343
- "--menu-item-image": `url("${e.image.replace(/"/g, "%22")}")`
344
- },
345
- "aria-hidden": "true"
346
- });
347
- }
348
- if (e.image) {
349
- return i("img", {
350
- class: {
351
- "menu-item-image": true,
352
- [`menu-item-image--${r}`]: true,
353
- "is-faded": o
354
- },
355
- src: e.image,
356
- alt: ""
357
- });
358
- }
359
- return i("sula-icon", {
360
- icon: this.iconOf(e),
361
- customClass: t
362
- });
363
- }
364
- getInitials(e) {
365
- return e.split(" ").filter(Boolean).slice(0, 2).map((e => e[0].toUpperCase())).join("");
366
- }
367
- renderUserInfo(e) {
368
- const t = this.user;
369
- return i("button", {
370
- type: "button",
371
- class: {
372
- "user-info flex min-w-0 cursor-pointer items-center rounded-xs p-8 text-left hover:bg-box-shadow-body": true,
373
- "user-info--active bg-box-shadow-body": this.profileOpen,
374
- "flex-1": e
375
- },
376
- title: `Ver perfil de ${t.name}`,
377
- "aria-label": `Ver perfil de ${t.name}`,
378
- "aria-haspopup": "dialog",
379
- "aria-expanded": String(this.profileOpen),
380
- ref: e => this.userInfoEl = e,
381
- onClick: () => this.toggleProfile()
382
- }, i("span", {
383
- class: "user-avatar flex h-9 w-9 flex-none items-center justify-center overflow-hidden rounded-full bg-brand-primary text-sm font-semibold text-negative-negative-1"
384
- }, t.photo ? i("img", {
385
- src: t.photo,
386
- alt: t.name
387
- }) : this.getInitials(t.name)), i("span", {
388
- "aria-hidden": !e,
389
- class: {
390
- "user-copy": true,
391
- "ml-8": true,
392
- "user-copy--visible": e,
393
- "user-copy--hidden": !e
394
- }
395
- }, i("span", {
396
- part: "user-name",
397
- class: "user-name truncate text-sm font-semibold text-text-primary"
398
- }, t.name), t.email && i("span", {
399
- part: "user-email",
400
- class: "user-email truncate text-xs text-text-secondary"
401
- }, t.email)));
402
- }
403
- getIconClass(e, t, i) {
404
- if (t) return `text-icon-disabled ${i}`;
405
- if (e) return `text-brand-primary ${i}`;
406
- return `text-icon-primary ${i}`;
407
- }
408
- renderCollapseButton() {
409
- const e = this.collapsed ? "Expandir menu" : "Recolher menu";
410
- return i("button", {
411
- type: "button",
412
- class: "menu-toggle flex flex-none items-center justify-center",
413
- title: e,
414
- "aria-label": e,
415
- "aria-expanded": String(!this.collapsed),
416
- onClick: () => this.toggleMenu()
417
- }, i("sula-icon", {
418
- icon: `ph-bold ph-caret-${this.collapsed ? "right" : "left"}`,
419
- customClass: "text-lg"
420
- }));
421
- }
422
- renderRootHeader(e) {
423
- return i("div", {
424
- class: {
425
- "menu-header flex items-center": true,
426
- "mb-40": e,
427
- "mb-24 flex-col justify-center px-0": !e
428
- }
429
- }, this.image && i("div", {
430
- class: {
431
- "menu-brand-image max-h-10 max-w-10 overflow-hidden": true,
432
- "mr-6": e
433
- }
434
- }, i("img", {
435
- src: this.image,
436
- alt: this.menuTitle
437
- })), i("div", {
438
- "aria-hidden": !e,
439
- title: e ? this.menuTitle : undefined,
440
- class: {
441
- "menu-title menu-copy": true,
442
- "menu-copy--visible": e,
443
- "menu-copy--hidden": !e
444
- }
445
- }, i("h1", {
446
- part: "title",
447
- class: "truncate text-2xl font-bold leading-7 text-text-secondary"
448
- }, this.menuTitle)), this.renderCollapseButton());
449
- }
450
- renderTrail(e) {
451
- const t = e.length > 2;
452
- const r = t ? e.slice(-2) : e;
453
- const o = [];
454
- if (t) {
455
- o.push(i("button", {
456
- key: "ellipsis",
457
- type: "button",
458
- class: "crumb-btn crumb-btn--ellipsis",
459
- "aria-haspopup": "true",
460
- "aria-expanded": String(this.crumbMenu.open),
461
- title: `${e.length - 2} nível(is) anterior(es)`,
462
- ref: e => this.crumbEllipsisEl = e,
463
- onClick: e => this.toggleCrumbMenu(e)
464
- }, i("sula-icon", {
465
- icon: "ph-bold ph-dots-three",
466
- customClass: "text-base text-text-secondary"
467
- })));
468
- }
469
- r.forEach((e => {
470
- o.push(i("button", {
471
- key: e.id,
472
- type: "button",
473
- class: "crumb-btn",
474
- title: e.label,
475
- onClick: () => this.goToDepth(this.stack.indexOf(e))
476
- }, e.label));
477
- }));
478
- const n = [];
479
- o.forEach(((e, t) => {
480
- if (t > 0) n.push(i("sula-icon", {
481
- key: `sep-${t}`,
482
- icon: "ph ph-caret-right",
483
- customClass: "crumb-sep text-xs"
484
- }));
485
- n.push(e);
486
- }));
487
- return i("nav", {
488
- class: "crumb-trail flex min-w-0 items-center",
489
- "aria-label": "Caminho de navegação"
490
- }, n);
491
- }
492
- renderCrumbDropdown(e) {
493
- if (!this.crumbMenu.open || e.length <= 2) return null;
494
- const t = e.slice(0, -2);
495
- return i("div", {
496
- class: "crumb-dropdown",
497
- role: "menu",
498
- ref: e => this.crumbDropdownEl = e,
499
- style: {
500
- left: `${this.crumbMenu.left}px`,
501
- top: `${this.crumbMenu.top}px`
502
- }
503
- }, t.map((e => i("button", {
504
- key: e.id,
505
- type: "button",
506
- role: "menuitem",
507
- class: "crumb-dropdown-item",
508
- onClick: () => this.goToDepth(this.stack.indexOf(e))
509
- }, i("span", {
510
- class: "item-icon flex flex-none items-center justify-center"
511
- }, this.renderItemIcon(e, "text-sm text-icon-primary", "sm")), i("span", {
512
- class: "truncate"
513
- }, e.label)))));
514
- }
515
- renderDrillHeader(e) {
516
- const t = this.stack.slice(0, -1);
517
- const r = t.length ? t[t.length - 1].label : this.menuTitle || "Início";
518
- const o = i("button", {
519
- type: "button",
520
- class: "back-btn",
521
- title: `Voltar para ${r}`,
522
- "aria-label": `Voltar para ${r}`,
523
- onClick: () => this.goToDepth(this.stack.length - 2)
524
- }, i("sula-icon", {
525
- icon: "ph ph-arrow-left",
526
- customClass: "text-lg text-icon-primary"
527
- }));
528
- return i("div", {
529
- class: "menu-header menu-header--drilldown mb-16 flex flex-col border-b border-line-general pb-24"
530
- }, i("div", {
531
- class: "identity-row flex items-center"
532
- }, i("button", {
533
- type: "button",
534
- class: "identity-strip",
535
- title: `Ir para o início de ${this.menuTitle}`,
536
- onClick: () => this.goToDepth(-1)
537
- }, this.image && i("span", {
538
- class: "identity-image"
539
- }, i("img", {
540
- src: this.image,
541
- alt: ""
542
- })), i("span", {
543
- class: "identity-label truncate"
544
- }, this.menuTitle)), this.renderCollapseButton()), t.length > 0 && i("div", {
545
- class: "breadcrumb-row"
546
- }, o, this.renderTrail(t), this.renderCrumbDropdown(t)), i("div", {
547
- class: {
548
- "context-row flex items-center min-w-0": true,
549
- "mt-8": t.length > 0
550
- }
551
- }, t.length === 0 && o, this.hasIcon(e) && i("span", {
552
- class: "context-icon flex flex-none items-center justify-center"
553
- }, this.renderItemIcon(e, "text-xl text-brand-primary", "md")), i("h1", {
554
- part: "title",
555
- class: "context-title truncate text-xl font-semibold leading-tight text-text-primary"
556
- }, e.label)));
557
- }
558
- renderDrillRow(e, t) {
559
- const r = this.hasVisibleChildren(e);
560
- const o = this.isActive(e, r);
561
- const n = this.isFaded(e, o);
562
- return i("li", {
563
- class: "list-none",
564
- key: e.id
565
- }, i("div", {
566
- class: {
567
- "menu-item flex items-center justify-between rounded-xs px-8": true,
568
- "cursor-pointer hover:bg-box-shadow-body": !e.disabled && !o,
569
- "cursor-pointer": !e.disabled && o,
570
- "cursor-not-allowed": !!e.disabled
571
- },
572
- "aria-disabled": !!e.disabled,
573
- onClick: () => this.handleRowClick(e, this.stack.length + 1)
574
- }, i("span", {
575
- class: "flex min-w-0 flex-1 items-center gap-8"
576
- }, this.renderIconSlot(e, this.getIconClass(o, n, "text-base"), n, t), i("span", {
577
- part: "item-label",
578
- class: {
579
- "menu-item-label truncate": this.labelOverflow !== a.Wrap,
580
- "menu-item-label menu-item-label--wrap": this.labelOverflow === a.Wrap,
581
- "font-bold text-text-primary": o,
582
- "text-text-disabled": n,
583
- "text-text-secondary": !o && !n
584
- }
585
- }, e.label)), r && i("sula-icon", {
586
- icon: "ph ph-caret-right",
587
- customClass: n ? "text-text-disabled text-xs" : "text-text-secondary text-xs"
588
- })));
589
- }
590
- renderDrillPanel() {
591
- const e = this.stack[this.stack.length - 1];
592
- const t = this.stack.map((e => e.id)).join("/");
593
- return i("ul", {
594
- key: t,
595
- class: {
596
- "menu-panel flex flex-col": true,
597
- "menu-panel--forward": this.direction === "forward",
598
- "menu-panel--back": this.direction === "back"
599
- }
600
- }, this.getVisibleItems(e.children).map((t => this.renderDrillRow(t, this.siblingsHaveIcon(e.children)))));
601
- }
602
- getMainIconClass(e, t) {
603
- if (t) return "text-icon-disabled text-base";
604
- if (e) return "text-brand-primary text-base";
605
- return "text-icon-primary text-base";
606
- }
607
- getMainCaretClass(e, t) {
608
- if (t) return "text-text-disabled text-xs";
609
- if (e) return "text-text-primary text-xs";
610
- return "text-text-secondary text-xs";
611
- }
612
- getSubIconClass(e, t = false) {
613
- if (e) return "text-icon-disabled text-base";
614
- if (t) return "text-brand-primary text-base";
615
- return "text-icon-primary text-base";
616
- }
617
- getSubCaretClass(e) {
618
- return e ? "text-icon-disabled text-xs" : "text-icon-primary text-xs";
619
- }
620
- siblingsHaveIcon(e) {
621
- return this.getVisibleItems(e).some((e => this.hasIcon(e)));
622
- }
623
- renderIconSlot(e, t, r, o = true) {
624
- if (!o && !this.hasIcon(e)) return null;
625
- return i("span", {
626
- class: "item-icon flex flex-none items-center justify-center"
627
- }, this.renderItemIcon(e, t, "lg", r));
628
- }
629
- renderMainRow(e, t, r, o, n, s, l) {
630
- const c = this.labelOverflow === a.Truncate;
631
- return i("div", {
632
- class: {
633
- "menu-item flex items-center rounded-xs px-8": true,
634
- "cursor-pointer hover:bg-box-shadow-body": !e.disabled,
635
- "cursor-not-allowed": !!e.disabled,
636
- "justify-between": t,
637
- "justify-center": !t
638
- },
639
- title: !t ? e.label : undefined,
640
- "aria-disabled": !!e.disabled,
641
- onClick: () => this.handleRowClick(e, 1)
642
- }, i("div", {
643
- class: {
644
- "flex items-center": true,
645
- "flex-1 min-w-0 gap-8": t,
646
- "justify-center": !t
647
- }
648
- }, this.renderIconSlot(e, this.getMainIconClass(n, s), s, l), i("span", {
649
- part: "main-item-label",
650
- title: t ? e.label : undefined,
651
- "aria-hidden": !t,
652
- class: {
653
- "menu-item-label menu-copy": true,
654
- "menu-item-label--truncate": c,
655
- "menu-item-label--wrap": !c,
656
- "menu-copy--visible": t,
657
- "menu-copy--hidden": !t,
658
- "font-bold text-text-primary": n,
659
- "text-text-disabled": s,
660
- "text-text-secondary": !n && !s
661
- }
662
- }, e.label)), r && i("sula-icon", {
663
- "aria-hidden": !t,
664
- class: {
665
- "menu-item-caret flex items-center justify-center": true,
666
- "menu-item-caret--expanded": o,
667
- "menu-item-caret--visible": t,
668
- "menu-item-caret--hidden": !t
669
- },
670
- icon: "ph ph-caret-down",
671
- customClass: this.getMainCaretClass(n, s)
672
- }));
673
- }
674
- renderSubRow(e, t, r, o, n, s, l, c) {
675
- const d = l ? "ph-bold ph-caret-right" : `ph-bold ph-caret-${o && t ? "up" : "down"}`;
676
- const onClick = () => this.handleRowClick(e, this.depthOf(e));
677
- const u = {
678
- "submenu-item flex min-w-0 items-center rounded-xs py-8 pr-8 select-none": true,
679
- "submenu-item--branch w-full": r,
680
- "cursor-pointer hover:bg-box-shadow-body": !e.disabled,
681
- "cursor-not-allowed": !!e.disabled,
682
- "font-bold": n && r
683
- };
684
- const f = i("span", {
685
- class: {
686
- "submenu-item-label min-w-0 flex-1": true,
687
- "ml-8": c || this.hasIcon(e),
688
- "menu-item-label--truncate": this.labelOverflow === a.Truncate,
689
- "menu-item-label--wrap": this.labelOverflow !== a.Truncate,
690
- "text-text-primary": !s,
691
- "text-text-disabled": s,
692
- "font-bold": n
693
- }
694
- }, e.label);
695
- if (!r) {
696
- return i("a", {
697
- class: u,
698
- style: {
699
- paddingLeft: "16px"
700
- },
701
- title: e.label,
702
- "aria-disabled": !!e.disabled,
703
- onClick
704
- }, this.renderIconSlot(e, this.getSubIconClass(s, n && !r), s, c), f);
705
- }
706
- return i("a", {
707
- class: u,
708
- style: {
709
- paddingLeft: "16px"
710
- },
711
- title: e.label,
712
- "aria-disabled": !!e.disabled,
713
- onClick
714
- }, i("div", {
715
- class: "submenu-item-branch-content flex min-w-0 flex-1 items-center"
716
- }, this.renderIconSlot(e, this.getSubIconClass(s, n && !r), s, c), f), i("div", {
717
- class: "submenu-item-branch-caret flex flex-none items-center justify-end pl-8"
718
- }, i("sula-icon", {
719
- icon: d,
720
- customClass: this.getSubCaretClass(s)
721
- })));
722
- }
723
- depthOf(e) {
724
- const t = this.findPath(this.items, e.id);
725
- return t ? t.length : 1;
726
- }
727
- renderInlineList(e, t, r) {
728
- const o = this.siblingsHaveIcon(e);
729
- return this.getVisibleItems(e).map((e => {
730
- const n = this.hasVisibleChildren(e);
731
- const a = n && t >= this.drilldownLevel;
732
- const s = n && !a;
733
- const l = s && !!e.expanded;
734
- const c = this.isActive(e, n) || l;
735
- const d = this.isFaded(e, c);
736
- const u = t === 1 ? this.renderMainRow(e, r, n, l, c, d, o) : this.renderSubRow(e, r, n, l, c, d, a, o);
737
- return i("li", {
738
- class: {
739
- "decoration-none list-none": true,
740
- "menu-group": t === 1,
741
- "is-selected": t > 1 && c && !n
742
- },
743
- key: e.id
744
- }, u, s && i("ul", {
745
- "aria-hidden": !r || !l,
746
- class: {
747
- submenu: true,
748
- "submenu--expanded": r && l,
749
- "ml-[8px] border-l border-line-general": t === 1,
750
- "submenu-branch ml-[24px] border-l border-line-general": t > 1
751
- }
752
- }, this.renderInlineList(e.children, t + 1, r)));
753
- }));
754
- }
755
- render() {
756
- const e = !this.collapsed || this.previewExpanded;
757
- const t = e && this.isDrilled();
758
- const o = this.stack[this.stack.length - 1];
759
- return i(r, {
760
- key: "fa3316250db59fc3a5efcc4955fe8f3d16bd6124",
761
- class: {
762
- "menu-host--collapsed": this.collapsed,
763
- "menu-host--preview": this.collapsed && this.previewExpanded,
764
- "menu-host--density-compact": this.density === n.Compact,
765
- "menu-host--density-comfortable": this.density === n.Comfortable
766
- },
767
- style: this.hostStyleVariables,
768
- onMouseEnter: () => this.handleMenuMouseEnter(),
769
- onMouseLeave: () => this.handleMenuMouseLeave()
770
- }, i("aside", {
771
- key: "250446792bed12a5811a513bcf2d437b99d5dfb0",
772
- part: "shell",
773
- ref: e => this.shellEl = e,
774
- class: {
775
- "menu-shell flex h-full flex-col bg-surface-body shadow-md z-50": true,
776
- "menu-shell--collapsed": this.collapsed && !this.previewExpanded,
777
- "menu-shell--expanded": e,
778
- "menu-shell--preview": this.collapsed && this.previewExpanded
779
- }
780
- }, t ? this.renderDrillHeader(o) : this.renderRootHeader(e), i("nav", {
781
- key: "e9a5cf34e8bed42747ae8a44b891440d6effd708",
782
- class: {
783
- "menu-nav flex h-full flex-col overflow-y-auto overflow-x-hidden": true,
784
- "px-12": !e
785
- }
786
- }, t ? this.renderDrillPanel() : i("ul", {
787
- class: "flex flex-col"
788
- }, this.renderInlineList(this.items, 1, e))), this.user && i("div", {
789
- key: "c0797a8bb709541aa54aa6d41b9da91b3a319f30",
790
- class: "menu-footer border-t border-line-general pt-12"
791
- }, this.renderUserInfo(e))), this.user && this.renderProfilePopover(e));
792
- }
793
- get el() {
794
- return o(this);
795
- }
796
- static get watchers() {
797
- return {
798
- items: [ "syncWithItems" ]
799
- };
800
- }
801
- };
802
-
803
- l.style = s;
804
-
805
- export { l as sula_workbench_menu };
806
- //# sourceMappingURL=sula-workbench-menu.entry.esm.js.map
807
- //# sourceMappingURL=p-569d0bad.entry.js.map