@sula-tech/webcomponents 0.23.0 → 0.24.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.
- package/dist/cjs/index.cjs.js +8 -7
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sula-avatar_32.cjs.entry.js +24 -23
- package/dist/cjs/sula-avatar_32.cjs.entry.js.map +1 -1
- package/dist/cjs/sula-calendar.model-CxjS_EJv.js +10 -0
- package/dist/cjs/sula-calendar.model-CxjS_EJv.js.map +1 -0
- package/dist/cjs/{sula-calendar.model-BI5cNrUo.js → sula-menu.model-BDxbWyPG.js} +2 -8
- package/dist/cjs/sula-menu.model-BDxbWyPG.js.map +1 -0
- package/dist/cjs/sula-profile-menu.cjs.entry.js +55 -0
- package/dist/cjs/sula-profile-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/sula-profile-menu.entry.cjs.js.map +1 -0
- package/dist/cjs/sula-toast.cjs.entry.js +1 -1
- package/dist/cjs/sula-workbench-menu.cjs.entry.js +578 -0
- package/dist/cjs/sula-workbench-menu.cjs.entry.js.map +1 -0
- package/dist/cjs/sula-workbench-menu.entry.cjs.js.map +1 -0
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-menu/sula-menu.css +1 -1
- package/dist/collection/components/sula-menu/sula-menu.js +13 -13
- package/dist/collection/components/sula-menu/sula-menu.js.map +1 -1
- package/dist/collection/components/sula-profile-menu/model/sula-profile-menu.model.js +2 -0
- package/dist/collection/components/sula-profile-menu/model/sula-profile-menu.model.js.map +1 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.css +1 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.js +163 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.js.map +1 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.stories.js +74 -0
- package/dist/collection/components/sula-profile-menu/sula-profile-menu.stories.js.map +1 -0
- package/dist/collection/components/sula-switch/sula-switch.css +1 -1
- package/dist/collection/components/sula-toast/sula-toast.css +1 -1
- package/dist/collection/components/sula-workbench-menu/model/sula-workbench-menu.model.js +2 -0
- package/dist/collection/components/sula-workbench-menu/model/sula-workbench-menu.model.js.map +1 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.css +1 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js +996 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.js.map +1 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js +450 -0
- package/dist/collection/components/sula-workbench-menu/sula-workbench-menu.stories.js.map +1 -0
- package/dist/collection/index.js.map +1 -1
- package/dist/components/{p-CajcgsMw.js → p-B_WIoxzn.js} +4 -4
- package/dist/components/{p-CajcgsMw.js.map → p-B_WIoxzn.js.map} +1 -1
- package/dist/components/{p-DayezGbB.js → p-BssyNhpP.js} +3 -3
- package/dist/components/{p-DayezGbB.js.map → p-BssyNhpP.js.map} +1 -1
- package/dist/components/{p-DxlGQRPo.js → p-CGpfhGAG.js} +3 -3
- package/dist/components/{p-DxlGQRPo.js.map → p-CGpfhGAG.js.map} +1 -1
- package/dist/components/{p-3-lLA5aQ.js → p-CWTfj4TV.js} +4 -4
- package/dist/components/{p-3-lLA5aQ.js.map → p-CWTfj4TV.js.map} +1 -1
- package/dist/components/p-DEhN6ZhJ.js +110 -0
- package/dist/components/p-DEhN6ZhJ.js.map +1 -0
- package/dist/components/{p-Yd-vDXTs.js → p-DK8hW-Cd.js} +3 -3
- package/dist/components/{p-Yd-vDXTs.js.map → p-DK8hW-Cd.js.map} +1 -1
- package/dist/components/{p-Bp4cLSzc.js → p-DwZCdDhF.js} +3 -3
- package/dist/components/{p-Bp4cLSzc.js.map → p-DwZCdDhF.js.map} +1 -1
- package/dist/components/{p-Deabropl.js → p-GEr9Dmhq.js} +3 -3
- package/dist/components/{p-Deabropl.js.map → p-GEr9Dmhq.js.map} +1 -1
- package/dist/components/p-KitH8bea.js +84 -0
- package/dist/components/p-KitH8bea.js.map +1 -0
- package/dist/components/sula-avatar.js +1 -1
- package/dist/components/sula-badge.js +1 -1
- package/dist/components/sula-breadcrumb.js +1 -1
- package/dist/components/sula-button.js +1 -1
- package/dist/components/sula-calendar.js +2 -2
- package/dist/components/sula-checkbox.js +1 -1
- package/dist/components/sula-chip.js +2 -2
- package/dist/components/sula-dropdown.js +1 -1
- package/dist/components/sula-icon-picker.js +4 -4
- package/dist/components/sula-icon.js +1 -1
- package/dist/components/sula-menu-select-list.js +1 -1
- package/dist/components/sula-menu.js +15 -15
- package/dist/components/sula-menu.js.map +1 -1
- package/dist/components/sula-modal.js +2 -2
- package/dist/components/sula-profile-menu.d.ts +11 -0
- package/dist/components/sula-profile-menu.js +9 -0
- package/dist/components/sula-profile-menu.js.map +1 -0
- package/dist/components/sula-progress-bar.js +1 -1
- package/dist/components/sula-search-bar.js +1 -1
- package/dist/components/sula-segmented-control.js +1 -1
- package/dist/components/sula-switch.js +1 -105
- package/dist/components/sula-switch.js.map +1 -1
- package/dist/components/sula-tag.js +1 -1
- package/dist/components/sula-textfield.js +1 -1
- package/dist/components/sula-tiles.js +1 -1
- package/dist/components/sula-timeline-list.js +1 -1
- package/dist/components/sula-toast-stack.js +2 -2
- package/dist/components/sula-toast.js +1 -1
- package/dist/components/sula-toggle.js +1 -1
- package/dist/components/sula-tooltip.js +1 -1
- package/dist/components/sula-workbench-menu.d.ts +11 -0
- package/dist/components/sula-workbench-menu.js +633 -0
- package/dist/components/sula-workbench-menu.js.map +1 -0
- package/dist/esm/index.js +2 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-avatar_32.entry.js +18 -17
- package/dist/esm/sula-avatar_32.entry.js.map +1 -1
- package/dist/esm/sula-calendar.model-Cp_4qTxj.js +10 -0
- package/dist/esm/sula-calendar.model-Cp_4qTxj.js.map +1 -0
- package/dist/esm/{sula-calendar.model-BbsLJDfp.js → sula-menu.model-Cs9RR1ZV.js} +3 -9
- package/dist/esm/sula-menu.model-Cs9RR1ZV.js.map +1 -0
- package/dist/esm/sula-profile-menu.entry.js +53 -0
- package/dist/esm/sula-profile-menu.entry.js.map +1 -0
- package/dist/esm/sula-toast.entry.js +1 -1
- package/dist/esm/sula-workbench-menu.entry.js +576 -0
- package/dist/esm/sula-workbench-menu.entry.js.map +1 -0
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-profile-menu/model/sula-profile-menu.model.d.ts +22 -0
- package/dist/types/components/sula-profile-menu/sula-profile-menu.d.ts +35 -0
- package/dist/types/components/sula-profile-menu/sula-profile-menu.stories.d.ts +34 -0
- package/dist/types/components/sula-workbench-menu/model/sula-workbench-menu.model.d.ts +19 -0
- package/dist/types/components/sula-workbench-menu/sula-workbench-menu.d.ts +175 -0
- package/dist/types/components/sula-workbench-menu/sula-workbench-menu.stories.d.ts +145 -0
- package/dist/types/components.d.ts +267 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/webcomponents/index.esm.js +3 -1
- package/dist/webcomponents/index.esm.js.map +1 -1
- package/dist/webcomponents/p-68a6d489.entry.js +807 -0
- package/dist/webcomponents/p-68a6d489.entry.js.map +1 -0
- package/dist/webcomponents/{p-cbb7df72.entry.js → p-705e2424.entry.js} +2 -2
- package/dist/webcomponents/p-88e5171a.entry.js +100 -0
- package/dist/webcomponents/p-88e5171a.entry.js.map +1 -0
- package/dist/webcomponents/{p-c331fc8a.entry.js → p-907588e9.entry.js} +193 -191
- package/dist/webcomponents/{p-c331fc8a.entry.js.map → p-907588e9.entry.js.map} +1 -1
- package/dist/webcomponents/p-Cp_4qTxj.js +10 -0
- package/dist/webcomponents/p-Cp_4qTxj.js.map +1 -0
- package/dist/webcomponents/{p-BbsLJDfp.js → p-Cs9RR1ZV.js} +4 -11
- package/dist/webcomponents/p-Cs9RR1ZV.js.map +1 -0
- package/dist/webcomponents/sula-profile-menu.entry.esm.js.map +1 -0
- package/dist/webcomponents/sula-workbench-menu.entry.esm.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +33 -10
- package/package.json +1 -1
- package/dist/cjs/sula-calendar.model-BI5cNrUo.js.map +0 -1
- package/dist/esm/sula-calendar.model-BbsLJDfp.js.map +0 -1
- package/dist/webcomponents/p-BbsLJDfp.js.map +0 -1
- /package/dist/webcomponents/{p-cbb7df72.entry.js.map → p-705e2424.entry.js.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
*,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! 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}.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))}.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:256px;--sula-menu-collapsed-width:88px;--sula-menu-main-item-font-size:0.875rem;--sula-menu-main-item-line-height:1.25rem;--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.75rem;--sula-menu-main-item-line-height:1rem;--sula-menu-main-item-padding-block:0.375rem}:host(.menu-host--density-comfortable){--sula-menu-main-item-font-size:1rem;--sula-menu-main-item-line-height:1.5rem;--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;transform-origin:left top;transition: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%;will-change:width,transform,box-shadow,border-radius}.menu-shell--expanded{box-shadow:0 10px 24px rgba(15,23,42,.08),0 2px 8px rgba(15,23,42,.06)}.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;transform:translateX(0);width:var(--sula-menu-width);z-index:2}.menu-header{gap:0;transition:padding .36s cubic-bezier(.22,1,.36,1),gap .24s cubic-bezier(.4,0,.2,1)}.menu-nav,.menu-toggle-wrapper{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),margin-left .32s cubic-bezier(.22,1,.36,1);white-space:nowrap;will-change:opacity,transform,max-width,margin-left}.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{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),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-toggle{transition:background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1),padding .32s cubic-bezier(.22,1,.36,1)}.menu-toggle-icon{flex:0 0 auto;transition:transform .32s cubic-bezier(.22,1,.36,1),border-color .22s cubic-bezier(.4,0,.2,1),background-color .22s cubic-bezier(.4,0,.2,1)}.menu-toggle-label{margin-left:0;white-space:nowrap}.menu-toggle-label.menu-copy--visible{margin-left:12px}@media (prefers-reduced-motion:reduce){.menu-brand-image,.menu-copy,.menu-header,.menu-item,.menu-item-caret,.menu-nav,.menu-shell,.menu-toggle,.menu-toggle-icon,.menu-toggle-wrapper,.submenu,.submenu-item,:host{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-0{margin-bottom:0}.mb-3{margin-bottom:.75rem}.ml-8{margin-left:.5rem}.ml-\[-2px\]{margin-left:-2px}.ml-\[1\.6rem\]{margin-left:1.6rem}.mr-6{margin-right:1.5rem}.h-10{height:2.5rem}.h-9{height:2.25rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.w-10{width: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}.list-none{list-style-type:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.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{border-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-line-general{border-color:var(--color-line-general)}.border-negative-negative-1{border-color:var(--color-negative-negative-1)}.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-20{padding-left:1.25rem;padding-right:1.25rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-16{padding-bottom:1rem;padding-top:1rem}.pb-12{padding-bottom:.75rem}.pb-16{padding-bottom:1rem}.pl-16{padding-left:1rem}.pl-20{padding-left:1.25rem}.pl-24{padding-left:1.5rem}.pl-8{padding-left:.5rem}.pt-12{padding-top:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.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)}
|
|
1
|
+
*,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! 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}.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))}.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:256px;--sula-menu-collapsed-width:88px;--sula-menu-main-item-font-size:0.875rem;--sula-menu-main-item-line-height:1.25rem;--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.75rem;--sula-menu-main-item-line-height:1rem;--sula-menu-main-item-padding-block:0.375rem}:host(.menu-host--density-comfortable){--sula-menu-main-item-font-size:1rem;--sula-menu-main-item-line-height:1.5rem;--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;transform-origin:left top;transition: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%;will-change:width,transform,box-shadow,border-radius}.menu-shell--expanded{box-shadow:0 10px 24px rgba(15,23,42,.08),0 2px 8px rgba(15,23,42,.06)}.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;transform:translateX(0);width:var(--sula-menu-width);z-index:2}.menu-header{gap:0;transition:padding .36s cubic-bezier(.22,1,.36,1),gap .24s cubic-bezier(.4,0,.2,1)}.menu-nav,.menu-toggle-wrapper{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),margin-left .32s cubic-bezier(.22,1,.36,1);white-space:nowrap;will-change:opacity,transform,max-width,margin-left}.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{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),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-toggle{transition:background-color .2s cubic-bezier(.4,0,.2,1),color .2s cubic-bezier(.4,0,.2,1),padding .32s cubic-bezier(.22,1,.36,1)}.menu-toggle-icon{flex:0 0 auto;transition:transform .32s cubic-bezier(.22,1,.36,1),border-color .22s cubic-bezier(.4,0,.2,1),background-color .22s cubic-bezier(.4,0,.2,1)}.menu-toggle-label{margin-left:0;white-space:nowrap}.menu-toggle-label.menu-copy--visible{margin-left:12px}@media (prefers-reduced-motion:reduce){.menu-brand-image,.menu-copy,.menu-header,.menu-item,.menu-item-caret,.menu-nav,.menu-shell,.menu-toggle,.menu-toggle-icon,.menu-toggle-wrapper,.submenu,.submenu-item,:host{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-0{margin-bottom:0}.mb-3{margin-bottom:.75rem}.ml-8{margin-left:.5rem}.ml-\[-2px\]{margin-left:-2px}.ml-\[1\.6rem\]{margin-left:1.6rem}.mr-6{margin-right:1.5rem}.h-10{height:2.5rem}.h-9{height:2.25rem}.h-full{height:100%}.max-h-10{max-height:2.5rem}.w-10{width: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}.list-none{list-style-type:none}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-start{justify-content:flex-start}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.space-x-8>:not([hidden])~:not([hidden]){--tw-space-x-reverse:0;margin-left:calc(.5rem*(1 - var(--tw-space-x-reverse)));margin-right:calc(.5rem*var(--tw-space-x-reverse))}.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{border-width:1px}.border-l{border-left-width:1px}.border-l-2{border-left-width:2px}.border-line-general{border-color:var(--color-line-general)}.border-negative-negative-1{border-color:var(--color-negative-negative-1)}.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)}.p-8{padding:.5rem}.px-0{padding-left:0;padding-right:0}.px-12{padding-left:.75rem;padding-right:.75rem}.px-20{padding-left:1.25rem;padding-right:1.25rem}.px-7{padding-left:1.75rem;padding-right:1.75rem}.py-16{padding-bottom:1rem;padding-top:1rem}.pb-12{padding-bottom:.75rem}.pb-16{padding-bottom:1rem}.pl-16{padding-left:1rem}.pl-20{padding-left:1.25rem}.pl-24{padding-left:1.5rem}.pl-8{padding-left:.5rem}.pt-12{padding-top:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-base{font-size:1rem;line-height:1.5rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-bold{font-weight:700}.font-semibold{font-weight:600}.leading-tight{line-height:1.25}.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-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}
|
|
@@ -257,7 +257,7 @@ export class SulaMenu {
|
|
|
257
257
|
if (!childHasChildren) {
|
|
258
258
|
return (h("li", { class: "list-none", key: child.id }, h("a", { class: {
|
|
259
259
|
'submenu-item flex min-w-0 items-center rounded-xs py-16 pl-24 select-none': true,
|
|
260
|
-
'cursor-pointer hover:bg-
|
|
260
|
+
'cursor-pointer hover:bg-states-empty-bg-hover': !child.disabled,
|
|
261
261
|
'cursor-not-allowed': !!child.disabled,
|
|
262
262
|
}, title: child.label, "aria-disabled": !!child.disabled, onClick: () => this.handleSubItemClick(parentItem.id, child) }, h("sula-icon", { icon: child.icon, customClass: this.getSubItemIconClass(child, childActive) }), h("span", { class: {
|
|
263
263
|
'ml-8 truncate text-sm': true,
|
|
@@ -268,7 +268,7 @@ export class SulaMenu {
|
|
|
268
268
|
}
|
|
269
269
|
return (h("li", { class: "list-none", key: child.id }, h("a", { class: {
|
|
270
270
|
'submenu-item submenu-item--branch flex w-full items-center rounded-xs py-16 pl-24 select-none': true,
|
|
271
|
-
'cursor-pointer hover:bg-
|
|
271
|
+
'cursor-pointer hover:bg-states-empty-bg-hover': !child.disabled,
|
|
272
272
|
'cursor-not-allowed': !!child.disabled,
|
|
273
273
|
'ml-[-2px] border-l-2 border-negative-negative-1 font-bold': childActive,
|
|
274
274
|
}, title: child.label, "aria-disabled": !!child.disabled, onClick: () => this.handleSubItemClick(parentItem.id, child) }, h("div", { class: "submenu-item-branch-content flex min-w-0 flex-1 items-center" }, h("sula-icon", { icon: child.icon, customClass: this.getSubItemIconClass(child, childActive) }), h("span", { class: {
|
|
@@ -285,7 +285,7 @@ export class SulaMenu {
|
|
|
285
285
|
const grandchildFaded = this.isItemFaded(grandchild, grandchildActive);
|
|
286
286
|
return (h("li", { class: "list-none", key: grandchild.id }, h("a", { class: {
|
|
287
287
|
'submenu-grandchild-item flex items-center rounded-xs p-8 text-sm': true,
|
|
288
|
-
'cursor-pointer hover:bg-
|
|
288
|
+
'cursor-pointer hover:bg-states-empty-bg-hover': !grandchild.disabled,
|
|
289
289
|
'cursor-not-allowed': !!grandchild.disabled,
|
|
290
290
|
'text-text-primary': !grandchildFaded,
|
|
291
291
|
'text-text-disabled': grandchildFaded,
|
|
@@ -298,24 +298,24 @@ export class SulaMenu {
|
|
|
298
298
|
}
|
|
299
299
|
render() {
|
|
300
300
|
const expandedView = !this.collapsed || this.previewExpanded;
|
|
301
|
-
return (h(Host, { key: '
|
|
301
|
+
return (h(Host, { key: 'af540b4851924d0e70bf6b7028af88a60ee65bd2', class: {
|
|
302
302
|
'menu-host--collapsed': this.collapsed,
|
|
303
303
|
'menu-host--density-compact': this.density === SulaMenuDensity.Compact,
|
|
304
304
|
'menu-host--density-comfortable': this.density === SulaMenuDensity.Comfortable,
|
|
305
|
-
}, style: this.hostStyleVariables }, h("aside", { key: '
|
|
305
|
+
}, style: this.hostStyleVariables }, h("aside", { key: '1257beac3d0036a550a08642f94955bb3a72aeb0', part: "shell", onMouseEnter: () => this.handleMenuMouseEnter(), onMouseLeave: () => this.handleMenuMouseLeave(), class: {
|
|
306
306
|
'menu-shell flex h-full flex-col bg-surface-body py-16 pt-12 shadow-md z-50': true,
|
|
307
307
|
'menu-shell--collapsed': this.collapsed && !this.previewExpanded,
|
|
308
308
|
'menu-shell--expanded': expandedView,
|
|
309
309
|
'menu-shell--preview': this.collapsed && this.previewExpanded,
|
|
310
|
-
} }, h("div", { key: '
|
|
310
|
+
} }, h("div", { key: '09c8e5d9dd8a5a733ce26f13c16d3eca9082fd87', class: {
|
|
311
311
|
'menu-header flex items-center pb-12': true,
|
|
312
312
|
'mb-3 px-7': expandedView,
|
|
313
313
|
'mb-0 justify-center px-0': !expandedView,
|
|
314
|
-
} }, this.image && (h("div", { key: '
|
|
314
|
+
} }, this.image && (h("div", { key: '493b2020a7d077258f77cb7c829b02e7f818b7af', class: { 'menu-brand-image max-h-10 max-w-10 overflow-hidden': true, 'mr-6': expandedView } }, h("img", { key: '2382991d7345d9f6457744802a218fa18fa662cc', src: this.image, alt: this.menuTitle }))), h("div", { key: '1e4ac3a0c4218081dd50c5f3fe187bf632842303', "aria-hidden": !expandedView, title: expandedView ? this.menuTitle : undefined, class: {
|
|
315
315
|
'menu-title menu-copy': true,
|
|
316
316
|
'menu-copy--visible': expandedView,
|
|
317
317
|
'menu-copy--hidden': !expandedView,
|
|
318
|
-
} }, h("h1", { key: '
|
|
318
|
+
} }, h("h1", { key: '8f352add1c924dff98190a9384c2f19580d93c69', part: "title", class: "truncate text-xl font-semibold leading-tight text-text-primary" }, this.menuTitle))), h("nav", { key: '34108859dd07ced1a949ea2f77e8419f2eca10d2', class: {
|
|
319
319
|
'menu-nav flex h-full flex-col overflow-y-auto overflow-x-hidden pb-16': true,
|
|
320
320
|
'px-20': expandedView,
|
|
321
321
|
'px-12': !expandedView,
|
|
@@ -325,7 +325,7 @@ export class SulaMenu {
|
|
|
325
325
|
const itemFaded = this.isItemFaded(item, itemActive);
|
|
326
326
|
return (h("li", { class: "decoration-none list-none", key: item.id }, h("div", { class: {
|
|
327
327
|
'menu-item flex w-full items-center rounded-xs p-8': true,
|
|
328
|
-
'cursor-pointer hover:bg-
|
|
328
|
+
'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled,
|
|
329
329
|
'cursor-not-allowed': !!item.disabled,
|
|
330
330
|
'justify-between': expandedView,
|
|
331
331
|
'justify-center': !expandedView,
|
|
@@ -348,15 +348,15 @@ export class SulaMenu {
|
|
|
348
348
|
'menu-item-caret--visible': expandedView,
|
|
349
349
|
'menu-item-caret--hidden': !expandedView,
|
|
350
350
|
}, icon: "ph ph-caret-down", customClass: this.getCaretIconClass(item) }))), itemHasChildren && (h("ul", { "aria-hidden": !expandedView || !item.expanded, class: { 'submenu': true, 'submenu--expanded': expandedView && !!item.expanded, 'ml-[1.6rem] border-l border-line-general': true } }, this.renderSubmenuItems(item, expandedView)))));
|
|
351
|
-
})), h("div", { key: '
|
|
351
|
+
})), h("div", { key: 'bb91dc9ee09a2d8f42436b61403e56b38b1fce94', class: {
|
|
352
352
|
'menu-toggle-wrapper pb-16': true,
|
|
353
353
|
'px-20': expandedView,
|
|
354
354
|
'px-12': !expandedView,
|
|
355
|
-
} }, h("button", { key: '
|
|
356
|
-
'menu-toggle flex w-full cursor-pointer items-center rounded-xs p-8 hover:bg-
|
|
355
|
+
} }, h("button", { key: '08bc82273187711dd800aafb6c8075fa6a9833a6', type: "button", class: {
|
|
356
|
+
'menu-toggle flex w-full cursor-pointer items-center rounded-xs p-8 hover:bg-states-empty-bg-hover': true,
|
|
357
357
|
'justify-start': expandedView,
|
|
358
358
|
'justify-center': !expandedView,
|
|
359
|
-
}, title: this.collapsed ? 'Fixar menu' : 'Ocultar menu', onClick: () => this.toggleMenu() }, h("div", { key: '
|
|
359
|
+
}, title: this.collapsed ? 'Fixar menu' : 'Ocultar menu', onClick: () => this.toggleMenu() }, h("div", { key: '31e6c23493a8036cb2e624aed34cf742f9b45493', class: "menu-toggle-icon flex h-10 w-10 items-center justify-center rounded-full border border-line-general bg-surface-body" }, h("sula-icon", { key: '0570cdf6c07711d3d0cc6508f937b41ac67862b6', icon: `ph ph-arrow-${this.collapsed ? 'right' : 'left'}`, customClass: "text-text-secondary text-xl" })), h("span", { key: '5cf733e2215f8bc6eda0e0e55edba56d879d2c8d', part: "toggle-label", "aria-hidden": !expandedView, class: {
|
|
360
360
|
'menu-toggle-label menu-copy text-base text-text-secondary': true,
|
|
361
361
|
'menu-copy--visible': expandedView,
|
|
362
362
|
'menu-copy--hidden': !expandedView,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sula-menu.js","sourceRoot":"","sources":["../../../src/components/sula-menu/sula-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,eAAe,CAAC;AAC5F,OAAO,EAAoB,eAAe,EAAgB,qBAAqB,EAAqC,MAAM,yBAAyB,CAAC;AAEpJ;;;;;;;;;;;;;GAaG;AAMH,MAAM,OAAO,QAAQ;IALrB;QAME;;WAEG;QAEH,cAAS,GAAW,EAAE,CAAC;QAEvB;;WAEG;QAEH,UAAK,GAAW,EAAE,CAAC;QAEnB;;;WAGG;QAEH,UAAK,GAAW,EAAE,CAAC;QAEnB;;WAEG;QAEH,YAAO,GAAoB,eAAe,CAAC,OAAO,CAAC;QAEnD;;;WAGG;QAEH,kBAAa,GAA0B,qBAAqB,CAAC,IAAI,CAAC;QAElE;;WAEG;QAEH,UAAK,GAAuB,EAAE,CAAC;QAuB/B,cAAS,GAAY,KAAK,CAAC;QAG3B,oBAAe,GAAY,KAAK,CAAC;KA8iBlC;IAziBC,IAAY,eAAe;;QACzB,MAAM,KAAK,GAAG,MAAA,IAAI,CAAC,KAAK,0CAAE,IAAI,EAAE,CAAC;QACjC,OAAO,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;IACnC,CAAC;IAED,IAAY,kBAAkB;QAC5B,yBACK,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAC9E;IACJ,CAAC;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A2D,EAAE,IAAI;gCACjE,oBAAoB,EAAE,YAAY;gCAClC,mBAAmB,EAAE,CAAC,YAAY;6BACnC,IAEA,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,cAAc,CAC1C,CACA,CACL,CACA,CACH,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { SelectedMenuItem, SulaMenuDensity, SulaMenuItem, SulaMenuLabelOverflow, SulaMenuMainItem, SulaMenuSubItem } from './model/sula-menu.model';\n\n/**\n * Hierarchical navigation menu with collapsible and preview states.\n *\n * @part shell - Main visual container of the menu.\n * @part title - Menu title.\n * @part main-item-label - Label of each top-level menu item.\n * @part toggle-label - Label of the collapse/expand control.\n * @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.\n * @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.\n * @cssprop --sula-menu-main-item-font-size - Font size of top-level item labels.\n * @cssprop --sula-menu-main-item-line-height - Line height of top-level item labels.\n * @cssprop --sula-menu-main-item-max-lines - Maximum number of visible lines when labelOverflow is wrap. Defaults to 2.\n * @cssprop --sula-menu-main-item-padding-block - Vertical padding of top-level menu items.\n */\n@Component({\n tag: 'sula-menu',\n styleUrl: 'sula-menu.scss',\n shadow: true,\n})\nexport class SulaMenu {\n /**\n * Menu title\n */\n @Prop()\n menuTitle: string = '';\n\n /**\n * Menu image\n */\n @Prop()\n image: string = '';\n\n /**\n * Menu width in expanded state. Use a CSS length that does not depend on the\n * host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).\n */\n @Prop()\n width: string = '';\n\n /**\n * Density applied to top-level menu items.\n */\n @Prop()\n density: SulaMenuDensity = SulaMenuDensity.Default;\n\n /**\n * Overflow behavior for top-level item labels. Wrap displays up to two lines\n * by default; the limit can be customized with --sula-menu-main-item-max-lines.\n */\n @Prop()\n labelOverflow: SulaMenuLabelOverflow = SulaMenuLabelOverflow.Wrap;\n\n /**\n * Menu items\n */\n @Prop({ mutable: true, reflect: true })\n items: SulaMenuMainItem[] = [];\n\n /**\n * Emitted when a menu item is selected\n */\n @Event()\n itemSelected: EventEmitter<SulaMenuMainItem | SulaMenuSubItem | SulaMenuItem>;\n\n /**\n * Emitted when a menu item is clicked\n */\n @Event()\n itemClicked: EventEmitter<SulaMenuMainItem | SulaMenuSubItem | SulaMenuItem>;\n\n /**\n * Emitted when the menu is toggled between collapsed and expanded states\n * True: Menu is expanded\n * False: Menu is collapsed\n */\n @Event()\n menuToggled: EventEmitter<boolean>;\n\n @State()\n collapsed: boolean = false;\n\n @State()\n previewExpanded: boolean = false;\n\n @State()\n selectedItem?: SelectedMenuItem;\n\n private get normalizedWidth() {\n const value = this.width?.trim();\n return value ? value : undefined;\n }\n\n private get hostStyleVariables() {\n return {\n ...(this.normalizedWidth ? { '--sula-menu-width': this.normalizedWidth } : {}),\n };\n }\n\n componentWillLoad() {\n this.syncSelectedItemFromItems(this.items);\n }\n\n @Watch('items')\n syncSelectedItemFromItems(items: SulaMenuMainItem[]) {\n const nextSelectedItem = this.findSelectedLeaf(items);\n\n if (nextSelectedItem) {\n this.selectedItem = nextSelectedItem;\n return;\n }\n\n if (this.selectedItem && this.containsSelectedItem(items, this.selectedItem)) {\n return;\n }\n\n this.selectedItem = undefined;\n }\n\n getVisibleItems<T extends SulaMenuItem>(items?: T[]) {\n return items?.filter(item => !item.hidden) ?? [];\n }\n\n getVisibleSubItems(item: Pick<SulaMenuMainItem, 'children'>) {\n return this.getVisibleItems(item.children);\n }\n\n getVisibleGrandchildren(item: Pick<SulaMenuSubItem, 'children'>) {\n return this.getVisibleItems(item.children);\n }\n\n hasVisibleSubItems(item: Pick<SulaMenuMainItem, 'children'>) {\n return this.getVisibleSubItems(item).length > 0;\n }\n\n hasVisibleGrandchildren(item: Pick<SulaMenuSubItem, 'children'>) {\n return this.getVisibleGrandchildren(item).length > 0;\n }\n\n containsSelectedItem(items: SulaMenuMainItem[], selectedItem: SelectedMenuItem) {\n const visibleItems = this.getVisibleItems(items);\n\n if (selectedItem.parentItemId && selectedItem.parentChildId) {\n return visibleItems.some(\n item =>\n item.id === selectedItem.parentItemId &&\n this.getVisibleSubItems(item).some(\n child => child.id === selectedItem.parentChildId && this.getVisibleGrandchildren(child).some(grandchild => grandchild.id === selectedItem.id),\n ),\n );\n }\n\n if (selectedItem.parentItemId) {\n return visibleItems.some(\n item => item.id === selectedItem.parentItemId && this.getVisibleSubItems(item).some(child => child.id === selectedItem.id && !this.hasVisibleGrandchildren(child)),\n );\n }\n\n return visibleItems.some(item => item.id === selectedItem.id && !this.hasVisibleSubItems(item));\n }\n\n findSelectedLeaf(items: SulaMenuMainItem[]) {\n for (const item of this.getVisibleItems(items)) {\n const visibleChildren = this.getVisibleSubItems(item);\n\n if (!visibleChildren.length && item.selected) {\n return { id: item.id };\n }\n\n for (const child of visibleChildren) {\n const selectedGrandchild = this.getVisibleGrandchildren(child).find(grandchild => grandchild.selected);\n\n if (selectedGrandchild) {\n return {\n id: selectedGrandchild.id,\n parentItemId: item.id,\n parentChildId: child.id,\n };\n }\n\n if (!this.hasVisibleGrandchildren(child) && child.selected) {\n return {\n id: child.id,\n parentItemId: item.id,\n };\n }\n }\n }\n\n return undefined;\n }\n\n isMainItemSelected(itemId: string) {\n return this.selectedItem?.id === itemId && !this.selectedItem.parentItemId;\n }\n\n hasSelectedChild(parentItemId: string) {\n return this.selectedItem?.parentItemId === parentItemId;\n }\n\n isSelectedSubItem(parentItemId: string, childId: string) {\n return this.selectedItem?.id === childId && this.selectedItem.parentItemId === parentItemId && !this.selectedItem.parentChildId;\n }\n\n hasSelectedGrandchild(parentItemId: string, parentChildId: string) {\n return this.selectedItem?.parentItemId === parentItemId && this.selectedItem.parentChildId === parentChildId;\n }\n\n isSelectedGrandchild(parentItemId: string, parentChildId: string, grandchildId: string) {\n return this.selectedItem?.id === grandchildId && this.selectedItem.parentItemId === parentItemId && this.selectedItem.parentChildId === parentChildId;\n }\n\n isItemActive(item: Pick<SulaMenuMainItem, 'id' | 'expanded' | 'children'>) {\n return this.isMainItemSelected(item.id) || this.hasSelectedChild(item.id) || (!!item.expanded && this.hasVisibleSubItems(item));\n }\n\n isSubItemActive(parentItemId: string, item: Pick<SulaMenuSubItem, 'id' | 'expanded' | 'children'>) {\n return this.isSelectedSubItem(parentItemId, item.id) || this.hasSelectedGrandchild(parentItemId, item.id) || (!!item.expanded && this.hasVisibleGrandchildren(item));\n }\n\n isItemFaded(item: Pick<SulaMenuItem, 'disabled'>, active: boolean) {\n return !!item.disabled && !active;\n }\n\n handleItemClick(clickedItem: SulaMenuMainItem) {\n if (clickedItem.disabled) {\n return;\n }\n\n this.itemClicked.emit(clickedItem);\n\n if (!this.hasVisibleSubItems(clickedItem)) {\n this.selectedItem = { id: clickedItem.id };\n this.itemSelected.emit(clickedItem);\n return;\n }\n\n this.items = this.items.map(item =>\n item.id === clickedItem.id\n ? {\n ...item,\n expanded: !item.expanded,\n }\n : item,\n );\n }\n\n handleSubItemClick(parentItemId: string, clickedChild: SulaMenuSubItem) {\n if (clickedChild.disabled) {\n return;\n }\n\n this.itemClicked.emit(clickedChild);\n\n if (!this.hasVisibleGrandchildren(clickedChild)) {\n this.selectedItem = {\n id: clickedChild.id,\n parentItemId,\n };\n this.itemSelected.emit(clickedChild);\n return;\n }\n\n this.items = this.items.map(item =>\n item.id === parentItemId\n ? {\n ...item,\n children: item.children?.map(child =>\n child.id === clickedChild.id\n ? {\n ...child,\n expanded: !child.expanded,\n }\n : child,\n ),\n }\n : item,\n );\n }\n\n handleGrandchildClick(parentItemId: string, parentChildId: string, clickedGrandchild: NonNullable<SulaMenuSubItem['children']>[number]) {\n if (clickedGrandchild.disabled) {\n return;\n }\n\n this.itemClicked.emit(clickedGrandchild);\n\n this.selectedItem = {\n id: clickedGrandchild.id,\n parentItemId,\n parentChildId,\n };\n this.itemSelected.emit(clickedGrandchild);\n }\n\n getItemIconClass(item: SulaMenuMainItem) {\n const active = this.isItemActive(item);\n\n if (this.isItemFaded(item, active)) {\n return 'text-icon-disabled text-2xl';\n }\n\n if (active) {\n return 'text-negative-negative-1 text-xl';\n } else {\n return 'text-icon-primary text-2xl';\n }\n }\n\n getSubItemIconClass(item: SulaMenuSubItem, active: boolean) {\n if (this.isItemFaded(item, active)) {\n return 'text-icon-disabled text-xl';\n }\n\n return 'text-icon-primary text-xl';\n }\n\n getSubItemCaretIconClass(item: SulaMenuSubItem, active: boolean) {\n if (this.isItemFaded(item, active)) {\n return 'text-icon-disabled text-base';\n }\n\n return 'text-icon-primary text-base';\n }\n\n getCaretIconClass(item: SulaMenuMainItem) {\n const active = this.isItemActive(item);\n\n if (this.isItemFaded(item, active)) {\n return 'text-text-disabled text-base';\n }\n\n if (active) {\n return 'text-text-primary text-base';\n }\n\n return 'text-text-secondary text-base';\n }\n\n toggleMenu() {\n if (this.collapsed) {\n this.collapsed = false;\n this.previewExpanded = false;\n this.menuToggled.emit(true);\n return;\n }\n\n this.collapsed = true;\n this.menuToggled.emit(false);\n this.previewExpanded = false;\n }\n\n handleMenuMouseEnter() {\n if (this.collapsed) {\n this.previewExpanded = true;\n }\n }\n\n handleMenuMouseLeave() {\n if (this.collapsed) {\n this.previewExpanded = false;\n }\n }\n\n renderSubmenuItems(parentItem: SulaMenuMainItem, expandedView: boolean) {\n return this.getVisibleSubItems(parentItem).map(child => {\n const childHasChildren = this.hasVisibleGrandchildren(child);\n const childExpanded = expandedView && !!child.expanded;\n const childActive = this.isSubItemActive(parentItem.id, child);\n const childFaded = this.isItemFaded(child, childActive);\n\n if (!childHasChildren) {\n return (\n <li class=\"list-none\" key={child.id}>\n <a\n class={{\n 'submenu-item flex min-w-0 items-center rounded-xs py-16 pl-24 select-none': true,\n 'cursor-pointer hover:bg-box-shadow-body': !child.disabled,\n 'cursor-not-allowed': !!child.disabled,\n }}\n title={child.label}\n aria-disabled={!!child.disabled}\n onClick={() => this.handleSubItemClick(parentItem.id, child)}\n >\n <sula-icon icon={child.icon} customClass={this.getSubItemIconClass(child, childActive)}></sula-icon>\n <span\n class={{\n 'ml-8 truncate text-sm': true,\n 'text-text-primary': !childFaded,\n 'text-text-disabled': childFaded,\n 'font-bold': childActive,\n }}\n >\n {child.label}\n </span>\n </a>\n </li>\n );\n }\n\n return (\n <li class=\"list-none\" key={child.id}>\n <a\n class={{\n 'submenu-item submenu-item--branch flex w-full items-center rounded-xs py-16 pl-24 select-none': true,\n 'cursor-pointer hover:bg-box-shadow-body': !child.disabled,\n 'cursor-not-allowed': !!child.disabled,\n 'ml-[-2px] border-l-2 border-negative-negative-1 font-bold': childActive,\n }}\n title={child.label}\n aria-disabled={!!child.disabled}\n onClick={() => this.handleSubItemClick(parentItem.id, child)}\n >\n <div class=\"submenu-item-branch-content flex min-w-0 flex-1 items-center\">\n <sula-icon icon={child.icon} customClass={this.getSubItemIconClass(child, childActive)}></sula-icon>\n <span\n class={{\n 'ml-8 truncate text-sm': true,\n 'text-text-primary': !childFaded,\n 'text-text-disabled': childFaded,\n 'font-bold': childActive,\n }}\n >\n {child.label}\n </span>\n </div>\n <div class=\"submenu-item-branch-caret flex flex-none items-center justify-end pl-8\">\n <sula-icon icon={`ph-bold ph-caret-${childExpanded ? 'up' : 'down'}`} customClass={this.getSubItemCaretIconClass(child, childActive)}></sula-icon>\n </div>\n </a>\n\n <ul\n aria-hidden={!childExpanded}\n class={{\n 'submenu': true,\n 'submenu--expanded': childExpanded,\n 'submenu-branch ml-[-2px] pl-20 border-l-2 border-negative-negative-1': true,\n }}\n >\n {this.getVisibleGrandchildren(child).map(grandchild => {\n const grandchildActive = this.isSelectedGrandchild(parentItem.id, child.id, grandchild.id);\n const grandchildFaded = this.isItemFaded(grandchild, grandchildActive);\n\n return (\n <li class=\"list-none\" key={grandchild.id}>\n <a\n class={{\n 'submenu-grandchild-item flex items-center rounded-xs p-8 text-sm': true,\n 'cursor-pointer hover:bg-box-shadow-body': !grandchild.disabled,\n 'cursor-not-allowed': !!grandchild.disabled,\n 'text-text-primary': !grandchildFaded,\n 'text-text-disabled': grandchildFaded,\n }}\n aria-disabled={!!grandchild.disabled}\n onClick={() => this.handleGrandchildClick(parentItem.id, child.id, grandchild)}\n >\n <span\n class={{\n 'submenu-grandchild-label truncate pl-16 text-sm': true,\n 'font-bold': grandchildActive,\n }}\n title={grandchild.label}\n >\n {grandchild.label}\n </span>\n </a>\n </li>\n );\n })}\n </ul>\n </li>\n );\n });\n }\n\n render() {\n const expandedView = !this.collapsed || this.previewExpanded;\n\n return (\n <Host\n class={{\n 'menu-host--collapsed': this.collapsed,\n 'menu-host--density-compact': this.density === SulaMenuDensity.Compact,\n 'menu-host--density-comfortable': this.density === SulaMenuDensity.Comfortable,\n }}\n style={this.hostStyleVariables}\n >\n <aside\n part=\"shell\"\n onMouseEnter={() => this.handleMenuMouseEnter()}\n onMouseLeave={() => this.handleMenuMouseLeave()}\n class={{\n 'menu-shell flex h-full flex-col bg-surface-body py-16 pt-12 shadow-md z-50': true,\n 'menu-shell--collapsed': this.collapsed && !this.previewExpanded,\n 'menu-shell--expanded': expandedView,\n 'menu-shell--preview': this.collapsed && this.previewExpanded,\n }}\n >\n <div\n class={{\n 'menu-header flex items-center pb-12': true,\n 'mb-3 px-7': expandedView,\n 'mb-0 justify-center px-0': !expandedView,\n }}\n >\n {this.image && (\n <div class={{ 'menu-brand-image max-h-10 max-w-10 overflow-hidden': true, 'mr-6': expandedView }}>\n <img src={this.image} alt={this.menuTitle} />\n </div>\n )}\n <div\n aria-hidden={!expandedView}\n title={expandedView ? this.menuTitle : undefined}\n class={{\n 'menu-title menu-copy': true,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n }}\n >\n <h1 part=\"title\" class=\"truncate text-xl font-semibold leading-tight text-text-primary\">{this.menuTitle}</h1>\n </div>\n </div>\n\n <nav\n class={{\n 'menu-nav flex h-full flex-col overflow-y-auto overflow-x-hidden pb-16': true,\n 'px-20': expandedView,\n 'px-12': !expandedView,\n }}\n >\n {this.getVisibleItems(this.items).map(item => {\n const itemHasChildren = this.hasVisibleSubItems(item);\n const itemActive = this.isItemActive(item);\n const itemFaded = this.isItemFaded(item, itemActive);\n\n return (\n <li class=\"decoration-none list-none\" key={item.id}>\n <div\n class={{\n 'menu-item flex w-full items-center rounded-xs p-8': true,\n 'cursor-pointer hover:bg-box-shadow-body': !item.disabled,\n 'cursor-not-allowed': !!item.disabled,\n 'justify-between': expandedView,\n 'justify-center': !expandedView,\n }}\n title={!expandedView ? item.label : undefined}\n aria-disabled={!!item.disabled}\n onClick={() => this.handleItemClick(item)}\n >\n <div\n class={{\n 'flex items-center': true,\n 'flex-1 min-w-0 space-x-8': expandedView,\n 'justify-center': !expandedView,\n }}\n >\n <div class={{ 'flex flex-none items-center justify-center': true, 'h-9 w-9 rounded-full bg-brand-primary': itemActive }}>\n <sula-icon icon={item.icon} customClass={this.getItemIconClass(item)} class=\"flex items-center justify-center\"></sula-icon>\n </div>\n <span\n part=\"main-item-label\"\n title={expandedView ? item.label : undefined}\n aria-hidden={!expandedView}\n class={{\n 'menu-item-label menu-copy': true,\n 'menu-item-label--truncate': this.labelOverflow === SulaMenuLabelOverflow.Truncate,\n 'menu-item-label--wrap': this.labelOverflow !== SulaMenuLabelOverflow.Truncate,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n 'font-bold text-text-primary': itemActive,\n 'text-text-disabled': itemFaded,\n 'text-text-secondary': !itemActive && !itemFaded,\n }}\n >\n {item.label}\n </span>\n </div>\n {itemHasChildren && (\n <sula-icon\n aria-hidden={!expandedView}\n class={{\n 'menu-item-caret flex items-center justify-center': true,\n 'menu-item-caret--expanded': !!item.expanded,\n 'menu-item-caret--visible': expandedView,\n 'menu-item-caret--hidden': !expandedView,\n }}\n icon=\"ph ph-caret-down\"\n customClass={this.getCaretIconClass(item)}\n ></sula-icon>\n )}\n </div>\n {itemHasChildren && (\n <ul\n aria-hidden={!expandedView || !item.expanded}\n class={{ 'submenu': true, 'submenu--expanded': expandedView && !!item.expanded, 'ml-[1.6rem] border-l border-line-general': true }}\n >\n {this.renderSubmenuItems(item, expandedView)}\n </ul>\n )}\n </li>\n );\n })}\n </nav>\n\n <div\n class={{\n 'menu-toggle-wrapper pb-16': true,\n 'px-20': expandedView,\n 'px-12': !expandedView,\n }}\n >\n <button\n type=\"button\"\n class={{\n 'menu-toggle flex w-full cursor-pointer items-center rounded-xs p-8 hover:bg-box-shadow-body': true,\n 'justify-start': expandedView,\n 'justify-center': !expandedView,\n }}\n title={this.collapsed ? 'Fixar menu' : 'Ocultar menu'}\n onClick={() => this.toggleMenu()}\n >\n <div class=\"menu-toggle-icon flex h-10 w-10 items-center justify-center rounded-full border border-line-general bg-surface-body\">\n <sula-icon icon={`ph ph-arrow-${this.collapsed ? 'right' : 'left'}`} customClass=\"text-text-secondary text-xl\"></sula-icon>\n </div>\n <span\n part=\"toggle-label\"\n aria-hidden={!expandedView}\n class={{\n 'menu-toggle-label menu-copy text-base text-text-secondary': true,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n }}\n >\n {this.collapsed ? 'Fixar menu' : 'Ocultar menu'}\n </span>\n </button>\n </div>\n </aside>\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sula-menu.js","sourceRoot":"","sources":["../../../src/components/sula-menu/sula-menu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,KAAK,EAAgB,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,CA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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Event, EventEmitter, Host, Prop, State, Watch, h } from '@stencil/core';\nimport { SelectedMenuItem, SulaMenuDensity, SulaMenuItem, SulaMenuLabelOverflow, SulaMenuMainItem, SulaMenuSubItem } from './model/sula-menu.model';\n\n/**\n * Hierarchical navigation menu with collapsible and preview states.\n *\n * @part shell - Main visual container of the menu.\n * @part title - Menu title.\n * @part main-item-label - Label of each top-level menu item.\n * @part toggle-label - Label of the collapse/expand control.\n * @cssprop --sula-menu-width - Width of the expanded menu. Defaults to 256px.\n * @cssprop --sula-menu-collapsed-width - Width of the collapsed menu. Defaults to 88px.\n * @cssprop --sula-menu-main-item-font-size - Font size of top-level item labels.\n * @cssprop --sula-menu-main-item-line-height - Line height of top-level item labels.\n * @cssprop --sula-menu-main-item-max-lines - Maximum number of visible lines when labelOverflow is wrap. Defaults to 2.\n * @cssprop --sula-menu-main-item-padding-block - Vertical padding of top-level menu items.\n */\n@Component({\n tag: 'sula-menu',\n styleUrl: 'sula-menu.scss',\n shadow: true,\n})\nexport class SulaMenu {\n /**\n * Menu title\n */\n @Prop()\n menuTitle: string = '';\n\n /**\n * Menu image\n */\n @Prop()\n image: string = '';\n\n /**\n * Menu width in expanded state. Use a CSS length that does not depend on the\n * host width, for example: 256px, 20rem or clamp(16rem, 25vw, 24rem).\n */\n @Prop()\n width: string = '';\n\n /**\n * Density applied to top-level menu items.\n */\n @Prop()\n density: SulaMenuDensity = SulaMenuDensity.Default;\n\n /**\n * Overflow behavior for top-level item labels. Wrap displays up to two lines\n * by default; the limit can be customized with --sula-menu-main-item-max-lines.\n */\n @Prop()\n labelOverflow: SulaMenuLabelOverflow = SulaMenuLabelOverflow.Wrap;\n\n /**\n * Menu items\n */\n @Prop({ mutable: true, reflect: true })\n items: SulaMenuMainItem[] = [];\n\n /**\n * Emitted when a menu item is selected\n */\n @Event()\n itemSelected: EventEmitter<SulaMenuMainItem | SulaMenuSubItem | SulaMenuItem>;\n\n /**\n * Emitted when a menu item is clicked\n */\n @Event()\n itemClicked: EventEmitter<SulaMenuMainItem | SulaMenuSubItem | SulaMenuItem>;\n\n /**\n * Emitted when the menu is toggled between collapsed and expanded states\n * True: Menu is expanded\n * False: Menu is collapsed\n */\n @Event()\n menuToggled: EventEmitter<boolean>;\n\n @State()\n collapsed: boolean = false;\n\n @State()\n previewExpanded: boolean = false;\n\n @State()\n selectedItem?: SelectedMenuItem;\n\n private get normalizedWidth() {\n const value = this.width?.trim();\n return value ? value : undefined;\n }\n\n private get hostStyleVariables() {\n return {\n ...(this.normalizedWidth ? { '--sula-menu-width': this.normalizedWidth } : {}),\n };\n }\n\n componentWillLoad() {\n this.syncSelectedItemFromItems(this.items);\n }\n\n @Watch('items')\n syncSelectedItemFromItems(items: SulaMenuMainItem[]) {\n const nextSelectedItem = this.findSelectedLeaf(items);\n\n if (nextSelectedItem) {\n this.selectedItem = nextSelectedItem;\n return;\n }\n\n if (this.selectedItem && this.containsSelectedItem(items, this.selectedItem)) {\n return;\n }\n\n this.selectedItem = undefined;\n }\n\n getVisibleItems<T extends SulaMenuItem>(items?: T[]) {\n return items?.filter(item => !item.hidden) ?? [];\n }\n\n getVisibleSubItems(item: Pick<SulaMenuMainItem, 'children'>) {\n return this.getVisibleItems(item.children);\n }\n\n getVisibleGrandchildren(item: Pick<SulaMenuSubItem, 'children'>) {\n return this.getVisibleItems(item.children);\n }\n\n hasVisibleSubItems(item: Pick<SulaMenuMainItem, 'children'>) {\n return this.getVisibleSubItems(item).length > 0;\n }\n\n hasVisibleGrandchildren(item: Pick<SulaMenuSubItem, 'children'>) {\n return this.getVisibleGrandchildren(item).length > 0;\n }\n\n containsSelectedItem(items: SulaMenuMainItem[], selectedItem: SelectedMenuItem) {\n const visibleItems = this.getVisibleItems(items);\n\n if (selectedItem.parentItemId && selectedItem.parentChildId) {\n return visibleItems.some(\n item =>\n item.id === selectedItem.parentItemId &&\n this.getVisibleSubItems(item).some(\n child => child.id === selectedItem.parentChildId && this.getVisibleGrandchildren(child).some(grandchild => grandchild.id === selectedItem.id),\n ),\n );\n }\n\n if (selectedItem.parentItemId) {\n return visibleItems.some(\n item => item.id === selectedItem.parentItemId && this.getVisibleSubItems(item).some(child => child.id === selectedItem.id && !this.hasVisibleGrandchildren(child)),\n );\n }\n\n return visibleItems.some(item => item.id === selectedItem.id && !this.hasVisibleSubItems(item));\n }\n\n findSelectedLeaf(items: SulaMenuMainItem[]) {\n for (const item of this.getVisibleItems(items)) {\n const visibleChildren = this.getVisibleSubItems(item);\n\n if (!visibleChildren.length && item.selected) {\n return { id: item.id };\n }\n\n for (const child of visibleChildren) {\n const selectedGrandchild = this.getVisibleGrandchildren(child).find(grandchild => grandchild.selected);\n\n if (selectedGrandchild) {\n return {\n id: selectedGrandchild.id,\n parentItemId: item.id,\n parentChildId: child.id,\n };\n }\n\n if (!this.hasVisibleGrandchildren(child) && child.selected) {\n return {\n id: child.id,\n parentItemId: item.id,\n };\n }\n }\n }\n\n return undefined;\n }\n\n isMainItemSelected(itemId: string) {\n return this.selectedItem?.id === itemId && !this.selectedItem.parentItemId;\n }\n\n hasSelectedChild(parentItemId: string) {\n return this.selectedItem?.parentItemId === parentItemId;\n }\n\n isSelectedSubItem(parentItemId: string, childId: string) {\n return this.selectedItem?.id === childId && this.selectedItem.parentItemId === parentItemId && !this.selectedItem.parentChildId;\n }\n\n hasSelectedGrandchild(parentItemId: string, parentChildId: string) {\n return this.selectedItem?.parentItemId === parentItemId && this.selectedItem.parentChildId === parentChildId;\n }\n\n isSelectedGrandchild(parentItemId: string, parentChildId: string, grandchildId: string) {\n return this.selectedItem?.id === grandchildId && this.selectedItem.parentItemId === parentItemId && this.selectedItem.parentChildId === parentChildId;\n }\n\n isItemActive(item: Pick<SulaMenuMainItem, 'id' | 'expanded' | 'children'>) {\n return this.isMainItemSelected(item.id) || this.hasSelectedChild(item.id) || (!!item.expanded && this.hasVisibleSubItems(item));\n }\n\n isSubItemActive(parentItemId: string, item: Pick<SulaMenuSubItem, 'id' | 'expanded' | 'children'>) {\n return this.isSelectedSubItem(parentItemId, item.id) || this.hasSelectedGrandchild(parentItemId, item.id) || (!!item.expanded && this.hasVisibleGrandchildren(item));\n }\n\n isItemFaded(item: Pick<SulaMenuItem, 'disabled'>, active: boolean) {\n return !!item.disabled && !active;\n }\n\n handleItemClick(clickedItem: SulaMenuMainItem) {\n if (clickedItem.disabled) {\n return;\n }\n\n this.itemClicked.emit(clickedItem);\n\n if (!this.hasVisibleSubItems(clickedItem)) {\n this.selectedItem = { id: clickedItem.id };\n this.itemSelected.emit(clickedItem);\n return;\n }\n\n this.items = this.items.map(item =>\n item.id === clickedItem.id\n ? {\n ...item,\n expanded: !item.expanded,\n }\n : item,\n );\n }\n\n handleSubItemClick(parentItemId: string, clickedChild: SulaMenuSubItem) {\n if (clickedChild.disabled) {\n return;\n }\n\n this.itemClicked.emit(clickedChild);\n\n if (!this.hasVisibleGrandchildren(clickedChild)) {\n this.selectedItem = {\n id: clickedChild.id,\n parentItemId,\n };\n this.itemSelected.emit(clickedChild);\n return;\n }\n\n this.items = this.items.map(item =>\n item.id === parentItemId\n ? {\n ...item,\n children: item.children?.map(child =>\n child.id === clickedChild.id\n ? {\n ...child,\n expanded: !child.expanded,\n }\n : child,\n ),\n }\n : item,\n );\n }\n\n handleGrandchildClick(parentItemId: string, parentChildId: string, clickedGrandchild: NonNullable<SulaMenuSubItem['children']>[number]) {\n if (clickedGrandchild.disabled) {\n return;\n }\n\n this.itemClicked.emit(clickedGrandchild);\n\n this.selectedItem = {\n id: clickedGrandchild.id,\n parentItemId,\n parentChildId,\n };\n this.itemSelected.emit(clickedGrandchild);\n }\n\n getItemIconClass(item: SulaMenuMainItem) {\n const active = this.isItemActive(item);\n\n if (this.isItemFaded(item, active)) {\n return 'text-icon-disabled text-2xl';\n }\n\n if (active) {\n return 'text-negative-negative-1 text-xl';\n } else {\n return 'text-icon-primary text-2xl';\n }\n }\n\n getSubItemIconClass(item: SulaMenuSubItem, active: boolean) {\n if (this.isItemFaded(item, active)) {\n return 'text-icon-disabled text-xl';\n }\n\n return 'text-icon-primary text-xl';\n }\n\n getSubItemCaretIconClass(item: SulaMenuSubItem, active: boolean) {\n if (this.isItemFaded(item, active)) {\n return 'text-icon-disabled text-base';\n }\n\n return 'text-icon-primary text-base';\n }\n\n getCaretIconClass(item: SulaMenuMainItem) {\n const active = this.isItemActive(item);\n\n if (this.isItemFaded(item, active)) {\n return 'text-text-disabled text-base';\n }\n\n if (active) {\n return 'text-text-primary text-base';\n }\n\n return 'text-text-secondary text-base';\n }\n\n toggleMenu() {\n if (this.collapsed) {\n this.collapsed = false;\n this.previewExpanded = false;\n this.menuToggled.emit(true);\n return;\n }\n\n this.collapsed = true;\n this.menuToggled.emit(false);\n this.previewExpanded = false;\n }\n\n handleMenuMouseEnter() {\n if (this.collapsed) {\n this.previewExpanded = true;\n }\n }\n\n handleMenuMouseLeave() {\n if (this.collapsed) {\n this.previewExpanded = false;\n }\n }\n\n renderSubmenuItems(parentItem: SulaMenuMainItem, expandedView: boolean) {\n return this.getVisibleSubItems(parentItem).map(child => {\n const childHasChildren = this.hasVisibleGrandchildren(child);\n const childExpanded = expandedView && !!child.expanded;\n const childActive = this.isSubItemActive(parentItem.id, child);\n const childFaded = this.isItemFaded(child, childActive);\n\n if (!childHasChildren) {\n return (\n <li class=\"list-none\" key={child.id}>\n <a\n class={{\n 'submenu-item flex min-w-0 items-center rounded-xs py-16 pl-24 select-none': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !child.disabled,\n 'cursor-not-allowed': !!child.disabled,\n }}\n title={child.label}\n aria-disabled={!!child.disabled}\n onClick={() => this.handleSubItemClick(parentItem.id, child)}\n >\n <sula-icon icon={child.icon} customClass={this.getSubItemIconClass(child, childActive)}></sula-icon>\n <span\n class={{\n 'ml-8 truncate text-sm': true,\n 'text-text-primary': !childFaded,\n 'text-text-disabled': childFaded,\n 'font-bold': childActive,\n }}\n >\n {child.label}\n </span>\n </a>\n </li>\n );\n }\n\n return (\n <li class=\"list-none\" key={child.id}>\n <a\n class={{\n 'submenu-item submenu-item--branch flex w-full items-center rounded-xs py-16 pl-24 select-none': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !child.disabled,\n 'cursor-not-allowed': !!child.disabled,\n 'ml-[-2px] border-l-2 border-negative-negative-1 font-bold': childActive,\n }}\n title={child.label}\n aria-disabled={!!child.disabled}\n onClick={() => this.handleSubItemClick(parentItem.id, child)}\n >\n <div class=\"submenu-item-branch-content flex min-w-0 flex-1 items-center\">\n <sula-icon icon={child.icon} customClass={this.getSubItemIconClass(child, childActive)}></sula-icon>\n <span\n class={{\n 'ml-8 truncate text-sm': true,\n 'text-text-primary': !childFaded,\n 'text-text-disabled': childFaded,\n 'font-bold': childActive,\n }}\n >\n {child.label}\n </span>\n </div>\n <div class=\"submenu-item-branch-caret flex flex-none items-center justify-end pl-8\">\n <sula-icon icon={`ph-bold ph-caret-${childExpanded ? 'up' : 'down'}`} customClass={this.getSubItemCaretIconClass(child, childActive)}></sula-icon>\n </div>\n </a>\n\n <ul\n aria-hidden={!childExpanded}\n class={{\n 'submenu': true,\n 'submenu--expanded': childExpanded,\n 'submenu-branch ml-[-2px] pl-20 border-l-2 border-negative-negative-1': true,\n }}\n >\n {this.getVisibleGrandchildren(child).map(grandchild => {\n const grandchildActive = this.isSelectedGrandchild(parentItem.id, child.id, grandchild.id);\n const grandchildFaded = this.isItemFaded(grandchild, grandchildActive);\n\n return (\n <li class=\"list-none\" key={grandchild.id}>\n <a\n class={{\n 'submenu-grandchild-item flex items-center rounded-xs p-8 text-sm': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !grandchild.disabled,\n 'cursor-not-allowed': !!grandchild.disabled,\n 'text-text-primary': !grandchildFaded,\n 'text-text-disabled': grandchildFaded,\n }}\n aria-disabled={!!grandchild.disabled}\n onClick={() => this.handleGrandchildClick(parentItem.id, child.id, grandchild)}\n >\n <span\n class={{\n 'submenu-grandchild-label truncate pl-16 text-sm': true,\n 'font-bold': grandchildActive,\n }}\n title={grandchild.label}\n >\n {grandchild.label}\n </span>\n </a>\n </li>\n );\n })}\n </ul>\n </li>\n );\n });\n }\n\n render() {\n const expandedView = !this.collapsed || this.previewExpanded;\n\n return (\n <Host\n class={{\n 'menu-host--collapsed': this.collapsed,\n 'menu-host--density-compact': this.density === SulaMenuDensity.Compact,\n 'menu-host--density-comfortable': this.density === SulaMenuDensity.Comfortable,\n }}\n style={this.hostStyleVariables}\n >\n <aside\n part=\"shell\"\n onMouseEnter={() => this.handleMenuMouseEnter()}\n onMouseLeave={() => this.handleMenuMouseLeave()}\n class={{\n 'menu-shell flex h-full flex-col bg-surface-body py-16 pt-12 shadow-md z-50': true,\n 'menu-shell--collapsed': this.collapsed && !this.previewExpanded,\n 'menu-shell--expanded': expandedView,\n 'menu-shell--preview': this.collapsed && this.previewExpanded,\n }}\n >\n <div\n class={{\n 'menu-header flex items-center pb-12': true,\n 'mb-3 px-7': expandedView,\n 'mb-0 justify-center px-0': !expandedView,\n }}\n >\n {this.image && (\n <div class={{ 'menu-brand-image max-h-10 max-w-10 overflow-hidden': true, 'mr-6': expandedView }}>\n <img src={this.image} alt={this.menuTitle} />\n </div>\n )}\n <div\n aria-hidden={!expandedView}\n title={expandedView ? this.menuTitle : undefined}\n class={{\n 'menu-title menu-copy': true,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n }}\n >\n <h1 part=\"title\" class=\"truncate text-xl font-semibold leading-tight text-text-primary\">{this.menuTitle}</h1>\n </div>\n </div>\n\n <nav\n class={{\n 'menu-nav flex h-full flex-col overflow-y-auto overflow-x-hidden pb-16': true,\n 'px-20': expandedView,\n 'px-12': !expandedView,\n }}\n >\n {this.getVisibleItems(this.items).map(item => {\n const itemHasChildren = this.hasVisibleSubItems(item);\n const itemActive = this.isItemActive(item);\n const itemFaded = this.isItemFaded(item, itemActive);\n\n return (\n <li class=\"decoration-none list-none\" key={item.id}>\n <div\n class={{\n 'menu-item flex w-full items-center rounded-xs p-8': true,\n 'cursor-pointer hover:bg-states-empty-bg-hover': !item.disabled,\n 'cursor-not-allowed': !!item.disabled,\n 'justify-between': expandedView,\n 'justify-center': !expandedView,\n }}\n title={!expandedView ? item.label : undefined}\n aria-disabled={!!item.disabled}\n onClick={() => this.handleItemClick(item)}\n >\n <div\n class={{\n 'flex items-center': true,\n 'flex-1 min-w-0 space-x-8': expandedView,\n 'justify-center': !expandedView,\n }}\n >\n <div class={{ 'flex flex-none items-center justify-center': true, 'h-9 w-9 rounded-full bg-brand-primary': itemActive }}>\n <sula-icon icon={item.icon} customClass={this.getItemIconClass(item)} class=\"flex items-center justify-center\"></sula-icon>\n </div>\n <span\n part=\"main-item-label\"\n title={expandedView ? item.label : undefined}\n aria-hidden={!expandedView}\n class={{\n 'menu-item-label menu-copy': true,\n 'menu-item-label--truncate': this.labelOverflow === SulaMenuLabelOverflow.Truncate,\n 'menu-item-label--wrap': this.labelOverflow !== SulaMenuLabelOverflow.Truncate,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n 'font-bold text-text-primary': itemActive,\n 'text-text-disabled': itemFaded,\n 'text-text-secondary': !itemActive && !itemFaded,\n }}\n >\n {item.label}\n </span>\n </div>\n {itemHasChildren && (\n <sula-icon\n aria-hidden={!expandedView}\n class={{\n 'menu-item-caret flex items-center justify-center': true,\n 'menu-item-caret--expanded': !!item.expanded,\n 'menu-item-caret--visible': expandedView,\n 'menu-item-caret--hidden': !expandedView,\n }}\n icon=\"ph ph-caret-down\"\n customClass={this.getCaretIconClass(item)}\n ></sula-icon>\n )}\n </div>\n {itemHasChildren && (\n <ul\n aria-hidden={!expandedView || !item.expanded}\n class={{ 'submenu': true, 'submenu--expanded': expandedView && !!item.expanded, 'ml-[1.6rem] border-l border-line-general': true }}\n >\n {this.renderSubmenuItems(item, expandedView)}\n </ul>\n )}\n </li>\n );\n })}\n </nav>\n\n <div\n class={{\n 'menu-toggle-wrapper pb-16': true,\n 'px-20': expandedView,\n 'px-12': !expandedView,\n }}\n >\n <button\n type=\"button\"\n class={{\n 'menu-toggle flex w-full cursor-pointer items-center rounded-xs p-8 hover:bg-states-empty-bg-hover': true,\n 'justify-start': expandedView,\n 'justify-center': !expandedView,\n }}\n title={this.collapsed ? 'Fixar menu' : 'Ocultar menu'}\n onClick={() => this.toggleMenu()}\n >\n <div class=\"menu-toggle-icon flex h-10 w-10 items-center justify-center rounded-full border border-line-general bg-surface-body\">\n <sula-icon icon={`ph ph-arrow-${this.collapsed ? 'right' : 'left'}`} customClass=\"text-text-secondary text-xl\"></sula-icon>\n </div>\n <span\n part=\"toggle-label\"\n aria-hidden={!expandedView}\n class={{\n 'menu-toggle-label menu-copy text-base text-text-secondary': true,\n 'menu-copy--visible': expandedView,\n 'menu-copy--hidden': !expandedView,\n }}\n >\n {this.collapsed ? 'Fixar menu' : 'Ocultar menu'}\n </span>\n </button>\n </div>\n </aside>\n </Host>\n );\n }\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sula-profile-menu.model.js","sourceRoot":"","sources":["../../../../src/components/sula-profile-menu/model/sula-profile-menu.model.ts"],"names":[],"mappings":"","sourcesContent":["export interface SulaProfileMenuUser {\n name: string;\n email?: string;\n photo?: string;\n}\n\nexport interface SulaProfileMenuItem {\n id: string;\n label?: string;\n /** Icon font class, for example `ph ph-sign-out` */\n icon?: string;\n /** Renders a switch at the end of the row; `active` holds its state */\n hasSwitch?: boolean;\n active?: boolean;\n /** Renders a separator line instead of a row */\n divider?: boolean;\n disabled?: boolean;\n hidden?: boolean;\n}\n\nexport interface SulaProfileMenuSwitchChange {\n item: SulaProfileMenuItem;\n active: boolean;\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,: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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: ;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-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness:proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--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;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }/*! 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}.flex{display:flex}.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{display:block}.profile-avatar img{height:100%;-o-object-fit:cover;object-fit:cover;width:100%}.profile-divider{background:var(--color-line-general);height:1px;margin:4px 8px}.profile-option{align-items:center;background:none;border:0;border-radius:8px;box-sizing:border-box;display:flex;font:inherit;gap:8px;min-height:40px;padding:0 8px;text-align:left;width:100%}button.profile-option{cursor:pointer;transition:background-color .15s ease-out}button.profile-option:hover:not(.is-disabled){background:var(--color-states-empty-bg-hover)}button.profile-option.is-disabled{cursor:not-allowed}button.profile-option:focus-visible{outline:2px solid var(--color-feedback-informational);outline-offset:-2px}.profile-option sula-icon{display:flex;flex:none;justify-content:center;width:20px}.profile-option sula-switch{flex:none;pointer-events:none;transform:scale(.75);transform-origin:right center}: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)}.visible{visibility:visible}.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}.hidden{display:none}.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-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)}.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-states-empty-bg-hover:hover{background-color:var(--color-states-empty-bg-hover)}.h-10{height:2.5rem}.w-10{width:2.5rem}.gap-12{gap:.75rem}.rounded-sm{border-radius:.75rem}.pb-12{padding-bottom:.75rem}.pt-8{padding-top:.5rem}@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")}.mr-16{margin-right:1rem}.h-12{height:.75rem}.h-32{height:2rem}.h-4{height:.25rem}.h-\[28px\]{height:28px}.min-h-\[85px\]{min-height:85px}.w-12{width:.75rem}.w-56{width:3.5rem}.w-\[10px\]{width:10px}.w-\[280px\]{width:280px}.w-\[28px\]{width:28px}.justify-start{justify-content:flex-start}.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))}.break-words{overflow-wrap:break-word}.rounded-md{border-radius:1.25rem}.rounded-xxl{border-radius:18.75rem}.bg-negative-negative-1{background-color:var(--color-negative-negative-1)}.bg-neutral-neutral-3{background-color:var(--color-neutral-neutral-3)}.bg-neutral-neutral-4{background-color:var(--color-neutral-neutral-4)}.bg-states-bg-disabled{background-color:var(--color-states-bg-disabled)}.bg-surface-on-body{background-color:var(--color-surface-on-body)}.p-2{padding:.125rem}.px-24{padding-left:1.5rem;padding-right:1.5rem}.py-16{padding-bottom:1rem;padding-top:1rem}.shadow-sm{--tw-shadow:0 1px 2px 0 rgba(0,0,0,.05);--tw-shadow-colored:0 1px 2px 0 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}.active\:bg-states-empty-bg-pressed:active{background-color:var(--color-states-empty-bg-pressed)}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import { Host, h } from "@stencil/core";
|
|
2
|
+
/**
|
|
3
|
+
* Profile card with the logged user and a configurable list of options.
|
|
4
|
+
* It has no positioning of its own: place it inside a popover, dropdown or panel.
|
|
5
|
+
* The component only emits events: what each option does is up to the host application.
|
|
6
|
+
*
|
|
7
|
+
* @slot - Extra content rendered after the options.
|
|
8
|
+
* @part card - Card container.
|
|
9
|
+
* @part name - User name.
|
|
10
|
+
* @part option - Each option row.
|
|
11
|
+
* @part divider - Each separator line.
|
|
12
|
+
*/
|
|
13
|
+
export class SulaProfileMenu {
|
|
14
|
+
constructor() {
|
|
15
|
+
/**
|
|
16
|
+
* Options of the list. Use `divider` for a separator and `hasSwitch` + `active` for a toggle row.
|
|
17
|
+
*/
|
|
18
|
+
this.items = [];
|
|
19
|
+
}
|
|
20
|
+
handleClick(item) {
|
|
21
|
+
if (item.disabled)
|
|
22
|
+
return;
|
|
23
|
+
if (!item.hasSwitch) {
|
|
24
|
+
this.itemClicked.emit(item);
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const active = !item.active;
|
|
28
|
+
const updated = Object.assign(Object.assign({}, item), { active });
|
|
29
|
+
this.items = this.items.map(current => (current.id === item.id ? updated : current));
|
|
30
|
+
this.switchChanged.emit({ item: updated, active });
|
|
31
|
+
}
|
|
32
|
+
getInitials(name) {
|
|
33
|
+
return name
|
|
34
|
+
.split(' ')
|
|
35
|
+
.filter(Boolean)
|
|
36
|
+
.slice(0, 2)
|
|
37
|
+
.map(part => part[0].toUpperCase())
|
|
38
|
+
.join('');
|
|
39
|
+
}
|
|
40
|
+
renderItem(item) {
|
|
41
|
+
if (item.divider)
|
|
42
|
+
return h("div", { key: item.id, part: "divider", class: "profile-divider", role: "separator" });
|
|
43
|
+
return (h("button", { key: item.id, type: "button", part: "option", class: { 'profile-option': true, 'is-disabled': !!item.disabled }, role: item.hasSwitch ? 'switch' : undefined, "aria-checked": item.hasSwitch ? String(!!item.active) : undefined, "aria-disabled": item.disabled ? 'true' : undefined, onClick: () => this.handleClick(item) }, item.icon && h("sula-icon", { icon: item.icon, customClass: `text-lg ${item.disabled ? 'text-icon-disabled' : 'text-icon-primary'}` }), h("span", { class: { 'profile-option-label min-w-0 flex-1 truncate text-sm': true, 'text-text-secondary': !item.disabled, 'text-text-disabled': !!item.disabled } }, item.label), item.hasSwitch && h("sula-switch", { active: !!item.active, disabled: !!item.disabled, ref: el => el === null || el === void 0 ? void 0 : el.setAttribute('inert', '') })));
|
|
44
|
+
}
|
|
45
|
+
render() {
|
|
46
|
+
if (!this.user)
|
|
47
|
+
return h(Host, null);
|
|
48
|
+
const { name, email, photo } = this.user;
|
|
49
|
+
const items = this.items.filter(item => !item.hidden);
|
|
50
|
+
return (h(Host, null, h("div", { part: "card", class: "profile-card flex flex-col rounded-sm bg-surface-body px-8 pb-12 pt-8" }, h("div", { class: "profile-header flex min-w-0 items-center gap-12 p-8" }, h("span", { class: "profile-avatar flex h-10 w-10 flex-none items-center justify-center overflow-hidden rounded-full bg-brand-primary text-sm font-semibold text-negative-negative-1" }, photo ? h("img", { src: photo, alt: name }) : this.getInitials(name)), h("span", { class: "flex min-w-0 flex-col" }, h("span", { part: "name", class: "profile-name truncate text-sm font-semibold text-text-primary" }, name), email && h("span", { class: "profile-email truncate text-xs text-text-secondary" }, email))), items.length > 0 && !items[0].divider && h("div", { part: "divider", class: "profile-divider", role: "separator" }), items.map(item => this.renderItem(item)), h("slot", null))));
|
|
51
|
+
}
|
|
52
|
+
static get is() { return "sula-profile-menu"; }
|
|
53
|
+
static get encapsulation() { return "shadow"; }
|
|
54
|
+
static get originalStyleUrls() {
|
|
55
|
+
return {
|
|
56
|
+
"$": ["sula-profile-menu.scss"]
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
static get styleUrls() {
|
|
60
|
+
return {
|
|
61
|
+
"$": ["sula-profile-menu.css"]
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
static get properties() {
|
|
65
|
+
return {
|
|
66
|
+
"user": {
|
|
67
|
+
"type": "unknown",
|
|
68
|
+
"attribute": "user",
|
|
69
|
+
"mutable": false,
|
|
70
|
+
"complexType": {
|
|
71
|
+
"original": "SulaProfileMenuUser",
|
|
72
|
+
"resolved": "SulaProfileMenuUser",
|
|
73
|
+
"references": {
|
|
74
|
+
"SulaProfileMenuUser": {
|
|
75
|
+
"location": "import",
|
|
76
|
+
"path": "./model/sula-profile-menu.model",
|
|
77
|
+
"id": "src/components/sula-profile-menu/model/sula-profile-menu.model.ts::SulaProfileMenuUser"
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
"required": false,
|
|
82
|
+
"optional": true,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": "Logged user. Without a photo, the initials are shown."
|
|
86
|
+
},
|
|
87
|
+
"getter": false,
|
|
88
|
+
"setter": false
|
|
89
|
+
},
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "unknown",
|
|
92
|
+
"attribute": "items",
|
|
93
|
+
"mutable": true,
|
|
94
|
+
"complexType": {
|
|
95
|
+
"original": "SulaProfileMenuItem[]",
|
|
96
|
+
"resolved": "SulaProfileMenuItem[]",
|
|
97
|
+
"references": {
|
|
98
|
+
"SulaProfileMenuItem": {
|
|
99
|
+
"location": "import",
|
|
100
|
+
"path": "./model/sula-profile-menu.model",
|
|
101
|
+
"id": "src/components/sula-profile-menu/model/sula-profile-menu.model.ts::SulaProfileMenuItem"
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
},
|
|
105
|
+
"required": false,
|
|
106
|
+
"optional": false,
|
|
107
|
+
"docs": {
|
|
108
|
+
"tags": [],
|
|
109
|
+
"text": "Options of the list. Use `divider` for a separator and `hasSwitch` + `active` for a toggle row."
|
|
110
|
+
},
|
|
111
|
+
"getter": false,
|
|
112
|
+
"setter": false,
|
|
113
|
+
"defaultValue": "[]"
|
|
114
|
+
}
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
static get events() {
|
|
118
|
+
return [{
|
|
119
|
+
"method": "itemClicked",
|
|
120
|
+
"name": "itemClicked",
|
|
121
|
+
"bubbles": true,
|
|
122
|
+
"cancelable": true,
|
|
123
|
+
"composed": true,
|
|
124
|
+
"docs": {
|
|
125
|
+
"tags": [],
|
|
126
|
+
"text": "Emitted when an option without switch is clicked"
|
|
127
|
+
},
|
|
128
|
+
"complexType": {
|
|
129
|
+
"original": "SulaProfileMenuItem",
|
|
130
|
+
"resolved": "SulaProfileMenuItem",
|
|
131
|
+
"references": {
|
|
132
|
+
"SulaProfileMenuItem": {
|
|
133
|
+
"location": "import",
|
|
134
|
+
"path": "./model/sula-profile-menu.model",
|
|
135
|
+
"id": "src/components/sula-profile-menu/model/sula-profile-menu.model.ts::SulaProfileMenuItem"
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
}, {
|
|
140
|
+
"method": "switchChanged",
|
|
141
|
+
"name": "switchChanged",
|
|
142
|
+
"bubbles": true,
|
|
143
|
+
"cancelable": true,
|
|
144
|
+
"composed": true,
|
|
145
|
+
"docs": {
|
|
146
|
+
"tags": [],
|
|
147
|
+
"text": "Emitted when the switch of an option changes"
|
|
148
|
+
},
|
|
149
|
+
"complexType": {
|
|
150
|
+
"original": "SulaProfileMenuSwitchChange",
|
|
151
|
+
"resolved": "SulaProfileMenuSwitchChange",
|
|
152
|
+
"references": {
|
|
153
|
+
"SulaProfileMenuSwitchChange": {
|
|
154
|
+
"location": "import",
|
|
155
|
+
"path": "./model/sula-profile-menu.model",
|
|
156
|
+
"id": "src/components/sula-profile-menu/model/sula-profile-menu.model.ts::SulaProfileMenuSwitchChange"
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}];
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
//# sourceMappingURL=sula-profile-menu.js.map
|