@sula-tech/webcomponents 0.19.1 → 0.19.3
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.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sula-avatar_31.cjs.entry.js +178 -36
- package/dist/cjs/sula-avatar_31.cjs.entry.js.map +1 -1
- package/dist/cjs/webcomponents.cjs.js +1 -1
- package/dist/collection/components/sula-avatar/sula-avatar.css +1 -1
- package/dist/collection/components/sula-icon/sula-icon.css +1 -1
- package/dist/collection/components/sula-menu/model/sula-menu.model.js.map +1 -1
- package/dist/collection/components/sula-menu/sula-menu.css +1 -1
- package/dist/collection/components/sula-menu/sula-menu.js +80 -25
- package/dist/collection/components/sula-menu/sula-menu.js.map +1 -1
- package/dist/collection/components/sula-menu/sula-menu.stories.js +79 -2
- package/dist/collection/components/sula-menu/sula-menu.stories.js.map +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.css +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.js +119 -8
- package/dist/collection/components/sula-tooltip/sula-tooltip.js.map +1 -1
- package/dist/collection/components/sula-tooltip/sula-tooltip.stories.js +61 -0
- package/dist/collection/components/sula-tooltip/sula-tooltip.stories.js.map +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/components/{p-DE4pFpiq.js → p-BJQZqrGi.js} +3 -3
- package/dist/components/{p-DE4pFpiq.js.map → p-BJQZqrGi.js.map} +1 -1
- package/dist/components/{p-DoTL1gHf.js → p-Bqd5Y-Ir.js} +4 -4
- package/dist/components/{p-DoTL1gHf.js.map → p-Bqd5Y-Ir.js.map} +1 -1
- package/dist/components/{p-CnGkvX5w.js → p-CelSwSJG.js} +3 -3
- package/dist/components/{p-CnGkvX5w.js.map → p-CelSwSJG.js.map} +1 -1
- package/dist/components/{p-CnjVJ_xQ.js → p-D1tWu3qb.js} +3 -3
- package/dist/components/{p-CnjVJ_xQ.js.map → p-D1tWu3qb.js.map} +1 -1
- package/dist/components/{p-BddXO6fP.js → p-bHiC51v2.js} +3 -3
- package/dist/components/{p-BddXO6fP.js.map → p-bHiC51v2.js.map} +1 -1
- package/dist/components/sula-avatar.js +2 -2
- 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-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 +82 -27
- package/dist/components/sula-menu.js.map +1 -1
- package/dist/components/sula-modal.js +2 -2
- 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-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-toggle.js +1 -1
- package/dist/components/sula-tooltip.js +99 -9
- package/dist/components/sula-tooltip.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sula-avatar_31.entry.js +178 -36
- package/dist/esm/sula-avatar_31.entry.js.map +1 -1
- package/dist/esm/webcomponents.js +1 -1
- package/dist/types/components/sula-menu/model/sula-menu.model.d.ts +1 -0
- package/dist/types/components/sula-menu/sula-menu.d.ts +5 -4
- package/dist/types/components/sula-menu/sula-menu.stories.d.ts +1 -0
- package/dist/types/components/sula-tooltip/sula-tooltip.d.ts +26 -0
- package/dist/types/components/sula-tooltip/sula-tooltip.stories.d.ts +22 -0
- package/dist/types/components.d.ts +12 -0
- package/dist/webcomponents/index.esm.js.map +1 -1
- package/dist/webcomponents/{p-b5c2f1e3.entry.js → p-95ca03c9.entry.js} +200 -57
- package/dist/webcomponents/p-95ca03c9.entry.js.map +1 -0
- package/dist/webcomponents/webcomponents.esm.js +4 -1
- package/package.json +1 -1
- package/dist/webcomponents/p-b5c2f1e3.entry.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sula-menu.stories.js","sourceRoot":"","sources":["../../../src/components/sula-menu/sula-menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAoB,MAAM,yBAAyB,CAAC;AAcnG,MAAM,WAAW,GAAG,2BAA2B,kBAAkB,CAAC;;;;;;CAMjE,CAAC,EAAE,CAAC;AAEL,MAAM,YAAY,GAAuB;IACxC;QACC,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,aAAa;QACpB,IAAI,EAAE,kBAAkB;QACxB,QAAQ,EAAE,IAAI;KACd;IACD;QACC,EAAE,EAAE,YAAY;QAChB,KAAK,EAAE,WAAW;QAClB,IAAI,EAAE,iBAAiB;QACvB,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE;YACT;gBACC,EAAE,EAAE,UAAU;gBACd,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,aAAa;aACnB;YACD;gBACC,EAAE,EAAE,cAAc;gBAClB,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,wBAAwB;aAC9B;YACD;gBACC,EAAE,EAAE,QAAQ;gBACZ,KAAK,EAAE,WAAW;gBAClB,IAAI,EAAE,sBAAsB;aAC5B;SACD;KACD;IACD;QACC,EAAE,EAAE,UAAU;QACd,KAAK,EAAE,eAAe;QACtB,IAAI,EAAE,gBAAgB;QACtB,QAAQ,EAAE;YACT;gBACC,EAAE,EAAE,OAAO;gBACX,KAAK,EAAE,OAAO;gBACd,IAAI,EAAE,mBAAmB;aACzB;YACD;gBACC,EAAE,EAAE,aAAa;gBACjB,KAAK,EAAE,YAAY;gBACnB,IAAI,EAAE,gBAAgB;aACtB;SACD;KACD;CACD,CAAC;AAEF,MAAM,WAAW,GAAuB;I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AC7B,SAAS,EAAE,YAAY;IACvB,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,OAAO;IACd,OAAO,EAAE,eAAe,CAAC,WAAW;IACpC,aAAa,EAAE,qBAAqB,CAAC,IAAI;IACzC,KAAK,EAAE,cAAc;CACrB,CAAC;AACF,sBAAsB,CAAC,UAAU,GAAG;IACnC,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EAAE,yGAAyG;SAChH;KACD;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACjD,eAAe,CAAC,IAAI,GAAG;IACtB,SAAS,EAAE,eAAe;IAC1B,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,eAAe,CAAC,OAAO;IAChC,aAAa,EAAE,qBAAqB,CAAC,IAAI;IACzC,KAAK,EAAE,WAAW;CAClB,CAAC;AACF,eAAe,CAAC,UAAU,GAAG;IAC5B,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EAAE,6KAA6K;SACpL;KACD;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,iBAAiB,CAAC,IAAI,GAAG;IACxB,SAAS,EAAE,oBAAoB;IAC/B,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,eAAe,CAAC,OAAO;IAChC,aAAa,EAAE,qBAAqB,CAAC,IAAI;IACzC,KAAK,EAAE,YAAY;CACnB,CAAC;AACF,iBAAiB,CAAC,UAAU,GAAG;IAC9B,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EAAE,0GAA0G;SACjH;KACD;CACD,CAAC","sourcesContent":["import { SulaMenuDensity, SulaMenuLabelOverflow, SulaMenuMainItem } from './model/sula-menu.model';\n\ntype StoryArgs = {\n\tmenuTitle: string;\n\timage: string;\n\twidth: string;\n\tdensity: SulaMenuDensity;\n\tlabelOverflow: SulaMenuLabelOverflow;\n\titems: SulaMenuMainItem[];\n\titemSelected: EventListener;\n\titemClicked: EventListener;\n\tmenuToggled: EventListener;\n};\n\nconst BRAND_IMAGE = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg width=\"80\" height=\"80\" viewBox=\"0 0 80 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<rect width=\"80\" height=\"80\" rx=\"20\" fill=\"#E5231B\"/>\n\t\t<rect x=\"12\" y=\"12\" width=\"56\" height=\"56\" rx=\"18\" fill=\"white\" fill-opacity=\"0.08\"/>\n\t\t<path d=\"M52 24H35.5C31.3579 24 28 27.3579 28 31.5C28 35.6421 31.3579 39 35.5 39H44.5C48.6421 39 52 42.3579 52 46.5C52 50.6421 48.6421 54 44.5 54H28\" stroke=\"white\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n\t</svg>\n`)}`;\n\nconst defaultItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'overview',\n\t\tlabel: 'Visao Geral',\n\t\ticon: 'ph ph-house-line',\n\t\tselected: true,\n\t},\n\t{\n\t\tid: 'operations',\n\t\tlabel: 'Operacoes',\n\t\ticon: 'ph ph-briefcase',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'policies',\n\t\t\t\tlabel: 'Apolices',\n\t\t\t\ticon: 'ph ph-files',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'endorsements',\n\t\t\t\tlabel: 'Endossos',\n\t\t\t\ticon: 'ph ph-arrows-clockwise',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'claims',\n\t\t\t\tlabel: 'Sinistros',\n\t\t\t\ticon: 'ph ph-warning-circle',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'settings',\n\t\tlabel: 'Configuracoes',\n\t\ticon: 'ph ph-gear-six',\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'teams',\n\t\t\t\tlabel: 'Times',\n\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'permissions',\n\t\t\t\tlabel: 'Permissoes',\n\t\t\t\ticon: 'ph ph-lock-key',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst nestedItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'sula-os',\n\t\tlabel: 'Sula OS',\n\t\ticon: 'ph ph-app-window',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'dashboard',\n\t\t\t\tlabel: 'Dashboard',\n\t\t\t\ticon: 'ph ph-gauge',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'canvas',\n\t\t\t\tlabel: 'Canvas',\n\t\t\t\ticon: 'ph ph-frame-corners',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'chapters',\n\t\t\t\t\t\tlabel: 'Capitulos/Jornadas',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t\tselected: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'tribes',\n\t\t\t\t\t\tlabel: 'Tribes/Areas',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'analytics',\n\t\tlabel: 'Analytics',\n\t\ticon: 'ph ph-chart-line-up',\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'portfolio',\n\t\t\t\tlabel: 'Portfolio',\n\t\t\t\ticon: 'ph ph-chart-pie-slice',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst longLabelItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'protocol-center',\n\t\tlabel: 'Central de protocolos e acompanhamentos operacionais',\n\t\ticon: 'ph ph-folders',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'technical-underwriting',\n\t\t\t\tlabel: 'Analise tecnica e de subscricao para contas corporativas',\n\t\t\t\ticon: 'ph ph-file-search',\n\t\t\t\tselected: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'journey-builder',\n\t\t\t\tlabel: 'Construtor de jornadas e configuracoes de experiencia',\n\t\t\t\ticon: 'ph ph-path',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'audiences',\n\t\t\t\t\t\tlabel: 'Segmentos e audiencias de relacionamento',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'rules',\n\t\t\t\t\t\tlabel: 'Regras e validacoes com nomenclaturas extensas',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'governance',\n\t\tlabel: 'Governanca de acessos e seguranca',\n\t\ticon: 'ph ph-shield-check',\n\t},\n];\n\nconst hiddenItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'overview-hidden',\n\t\tlabel: 'Visao Geral',\n\t\ticon: 'ph ph-house-line',\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'reports',\n\t\tlabel: 'Relatorios',\n\t\ticon: 'ph ph-chart-bar',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'archived',\n\t\t\t\tlabel: 'Arquivados',\n\t\t\t\ticon: 'ph ph-archive-box',\n\t\t\t\thidden: true,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'settings-hidden',\n\t\tlabel: 'Configuracoes',\n\t\ticon: 'ph ph-gear-six',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'users-hidden',\n\t\t\t\tlabel: 'Usuarios ocultos',\n\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t\thidden: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'roles',\n\t\t\t\tlabel: 'Perfis de acesso',\n\t\t\t\ticon: 'ph ph-lock-key',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'legacy-role',\n\t\t\t\t\t\tlabel: 'Perfil legado',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t\thidden: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'brokers',\n\t\t\t\t\t\tlabel: 'Corretores',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t\tselected: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'teams-visible',\n\t\t\t\tlabel: 'Times',\n\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst cloneMenuItems = (items: SulaMenuMainItem[]) => {\n\treturn items.map(item => ({\n\t\t...item,\n\t\tchildren: item.children?.map(child => ({\n\t\t\t...child,\n\t\t\tchildren: child.children?.map(grandchild => ({ ...grandchild })),\n\t\t})),\n\t}));\n};\n\nconst createStoryShell = () => {\n\tconst container = document.createElement('div');\n\tcontainer.style.margin = '20px';\n\tcontainer.style.padding = '24px';\n\tcontainer.style.background = 'linear-gradient(180deg, #f8f9f9 0%, #eef2f2 100%)';\n\tcontainer.style.borderRadius = '24px';\n\tcontainer.style.boxSizing = 'border-box';\n\n\tconst shell = document.createElement('div');\n\tshell.style.display = 'flex';\n\tshell.style.width = '960px';\n\tshell.style.maxWidth = '100%';\n\tshell.style.height = '720px';\n\tshell.style.borderRadius = '24px';\n\tshell.style.overflow = 'visible';\n\tshell.style.background = '#ffffff';\n\tshell.style.border = '1px solid #dfe5e5';\n\tshell.style.boxShadow = '0 20px 48px rgba(15, 23, 42, 0.08)';\n\n\tconst contentPanel = document.createElement('div');\n\tcontentPanel.style.flex = '1';\n\tcontentPanel.style.padding = '40px';\n\tcontentPanel.style.background = 'linear-gradient(180deg, #ffffff 0%, #f7f9f9 100%)';\n\tcontentPanel.style.borderRadius = '0 24px 24px 0';\n\tcontentPanel.style.boxSizing = 'border-box';\n\n\tconst contentTitle = document.createElement('h3');\n\tcontentTitle.textContent = 'Area de conteudo';\n\tcontentTitle.style.margin = '0 0 12px';\n\tcontentTitle.style.fontSize = '24px';\n\tcontentTitle.style.fontWeight = '700';\n\tcontentTitle.style.color = '#2f3131';\n\n\tconst contentDescription = document.createElement('p');\n\tcontentDescription.textContent = 'Use o botao no rodape do menu para colapsar, passe o mouse sobre o menu colapsado para visualizar o preview e clique nos itens para observar os eventos no painel Actions.';\n\tcontentDescription.style.margin = '0 0 24px';\n\tcontentDescription.style.maxWidth = '520px';\n\tcontentDescription.style.fontSize = '14px';\n\tcontentDescription.style.lineHeight = '22px';\n\tcontentDescription.style.color = '#6c6e6e';\n\n\tconst infoCard = document.createElement('div');\n\tinfoCard.style.padding = '20px 24px';\n\tinfoCard.style.borderRadius = '20px';\n\tinfoCard.style.background = '#f4f7f7';\n\tinfoCard.style.border = '1px solid #e3e9e9';\n\tinfoCard.style.maxWidth = '460px';\n\n\tconst infoTitle = document.createElement('strong');\n\tinfoTitle.textContent = 'Fluxos demonstrados';\n\tinfoTitle.style.display = 'block';\n\tinfoTitle.style.marginBottom = '12px';\n\tinfoTitle.style.fontSize = '15px';\n\tinfoTitle.style.color = '#2f3131';\n\n\tconst infoList = document.createElement('ul');\n\tinfoList.style.margin = '0';\n\tinfoList.style.paddingLeft = '18px';\n\tinfoList.style.color = '#5d5f5f';\n\tinfoList.style.fontSize = '14px';\n\tinfoList.style.lineHeight = '22px';\n\tinfoList.innerHTML = '<li>Selecao unica de itens folha</li><li>Expansao independente de branches</li><li>Submenus em dois niveis</li><li>Preview do menu sobre o conteudo</li>';\n\n\tinfoCard.appendChild(infoTitle);\n\tinfoCard.appendChild(infoList);\n\tcontentPanel.appendChild(contentTitle);\n\tcontentPanel.appendChild(contentDescription);\n\tcontentPanel.appendChild(infoCard);\n\tshell.appendChild(contentPanel);\n\tcontainer.appendChild(shell);\n\n\treturn { container, shell };\n};\n\nexport default {\n\ttitle: 'Components/sula-menu',\n\ttags: ['autodocs'],\n\targTypes: {\n\t\tmenuTitle: {\n\t\t\tcontrol: 'text',\n\t\t\tdefaultValue: 'Sula Hub',\n\t\t\tdescription: 'Titulo exibido no cabecalho do menu.',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\timage: {\n\t\t\tcontrol: 'text',\n\t\t\tdefaultValue: BRAND_IMAGE,\n\t\t\tdescription: 'Imagem de marca exibida ao lado do titulo.',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\twidth: {\n\t\t\tcontrol: 'text',\n\t\t\tdefaultValue: '',\n\t\t\tdescription: 'Largura do menu expandido. Use medidas independentes do host, como 320px, 20rem ou clamp(16rem, 25vw, 24rem).',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\tdensity: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuDensity),\n\t\t\tdescription: 'Define a densidade visual e tipografica dos itens principais.',\n\t\t\ttable: {\n\t\t\t\ttype: { summary: 'SulaMenuDensity' },\n\t\t\t\tdefaultValue: { summary: 'SulaMenuDensity.Default' },\n\t\t\t},\n\t\t},\n\t\tlabelOverflow: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuLabelOverflow),\n\t\t\tdescription: 'Define se labels longos quebram em ate duas linhas ou usam ellipsis.',\n\t\t\ttable: {\n\t\t\t\ttype: { summary: 'SulaMenuLabelOverflow' },\n\t\t\t\tdefaultValue: { summary: 'SulaMenuLabelOverflow.Wrap' },\n\t\t\t},\n\t\t},\n\t\titems: {\n\t\t\tcontrol: 'object',\n\t\t\tdefaultValue: defaultItems,\n\t\t\tdescription: 'Estrutura hierarquica do menu, com suporte a itens, subitens, netos e ocultacao via hidden.',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\titemSelected: {\n\t\t\taction: 'itemSelected',\n\t\t\tdescription: 'Evento emitido quando um item folha e selecionado.',\n\t\t},\n\t\titemClicked: {\n\t\t\taction: 'itemClicked',\n\t\t\tdescription: 'Evento emitido a cada clique em qualquer item do menu.',\n\t\t},\n\t\tmenuToggled: {\n\t\t\taction: 'menuToggled',\n\t\t\tdescription: 'Evento emitido ao colapsar ou expandir o menu.',\n\t\t},\n\t},\n\tparameters: {\n\t\tdocs: {\n\t\t\tdescription: {\n\t\t\t\tcomponent:\n\t\t\t\t\t'O componente Sula Menu organiza navegacao hierarquica com suporte a expansao de submenus, selecao unica de itens folha, ocultacao declarativa via hidden, colapso com preview em hover e emissao de eventos para clique, selecao e toggle do container.',\n\t\t\t},\n\t\t},\n\t},\n};\n\nconst Template: any = (args: StoryArgs) => {\n\tconst { container, shell } = createStoryShell();\n\tconst el = document.createElement('sula-menu');\n\n\tel.menuTitle = args.menuTitle;\n\tel.image = args.image;\n\tel.width = args.width;\n\tel.density = args.density;\n\tel.labelOverflow = args.labelOverflow;\n\tel.items = cloneMenuItems(args.items);\n\n\tel.addEventListener('itemSelected', args.itemSelected);\n\tel.addEventListener('itemClicked', args.itemClicked);\n\tel.addEventListener('menuToggled', args.menuToggled);\n\n\tshell.prepend(el);\n\n\treturn container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n\tmenuTitle: 'Sula Hub',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: defaultItems,\n};\nDefault.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Exemplo principal do menu com marca, um item folha selecionado e uma secao expandida. Interaja com os itens e com o toggle do rodape para validar os eventos e os estados visuais.',\n\t\t},\n\t},\n};\n\nexport const WithNestedNavigation = Template.bind({});\nWithNestedNavigation.args = {\n\tmenuTitle: 'Sula OS',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: nestedItems,\n};\nWithNestedNavigation.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Demonstra a navegacao com branch aninhado e um neto previamente selecionado, cobrindo o fluxo de expansao em dois niveis.',\n\t\t},\n\t},\n};\n\nexport const WithLongLabels = Template.bind({});\nWithLongLabels.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: longLabelItems,\n};\nWithLongLabels.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Cenario padrao para labels extensos, com tipografia de 14px e quebra em ate duas linhas nos itens principais.',\n\t\t},\n\t},\n};\n\nexport const WithTruncatedLongLabels = Template.bind({});\nWithTruncatedLongLabels.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Truncate,\n\titems: longLabelItems,\n};\nWithTruncatedLongLabels.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Alternativa explicita com ellipsis para produtos que precisam manter todos os itens principais em uma unica linha.',\n\t\t},\n\t},\n};\n\nexport const WithLongLabelsCustomLayout = Template.bind({});\nWithLongLabelsCustomLayout.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '320px',\n\tdensity: SulaMenuDensity.Compact,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: longLabelItems,\n};\nWithLongLabelsCustomLayout.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Cenario para muitos labels longos: combina largura de 320px, densidade compacta e quebra em ate duas linhas por meio da API oficial.',\n\t\t},\n\t},\n};\n\nexport const WithComfortableDensity = Template.bind({});\nWithComfortableDensity.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '320px',\n\tdensity: SulaMenuDensity.Comfortable,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: longLabelItems,\n};\nWithComfortableDensity.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Variante com maior area de toque e tipografia de 16px para contextos que priorizam conforto de leitura.',\n\t\t},\n\t},\n};\n\nexport const WithHiddenItems = Template.bind({});\nWithHiddenItems.args = {\n\tmenuTitle: 'Administracao',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: hiddenItems,\n};\nWithHiddenItems.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Demonstra a omissao de itens marcados com hidden em todos os niveis, incluindo o caso em que um branch deixa de expandir porque seus descendentes visiveis foram filtrados.',\n\t\t},\n\t},\n};\n\nexport const WithoutBrandImage = Template.bind({});\nWithoutBrandImage.args = {\n\tmenuTitle: 'Menu sem logomarca',\n\timage: '',\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: defaultItems,\n};\nWithoutBrandImage.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Mostra o comportamento do componente quando apenas o titulo e exibido no cabecalho, sem imagem de marca.',\n\t\t},\n\t},\n};\n"]}
|
|
1
|
+
{"version":3,"file":"sula-menu.stories.js","sourceRoot":"","sources":["../../../src/components/sula-menu/sula-menu.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAoB,MAAM,yBAAyB,CAAC;AAcnG,MAAM,WAAW,GAAG,2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,EAAE,EAAE;IACT,OAAO,EAAE,eAAe,CAAC,OAAO;IAChC,aAAa,EAAE,qBAAqB,CAAC,IAAI;IACzC,KAAK,EAAE,WAAW;CAClB,CAAC;AACF,eAAe,CAAC,UAAU,GAAG;IAC5B,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EAAE,6KAA6K;SACpL;KACD;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,iBAAiB,CAAC,IAAI,GAAG;IACxB,SAAS,EAAE,eAAe;IAC1B,KAAK,EAAE,WAAW;IAClB,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,eAAe,CAAC,OAAO;IAChC,aAAa,EAAE,qBAAqB,CAAC,IAAI;IACzC,KAAK,EAAE,aAAa;CACpB,CAAC;AACF,iBAAiB,CAAC,UAAU,GAAG;IAC9B,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EACJ,iUAAiU;SAClU;KACD;CACD,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAG,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACnD,iBAAiB,CAAC,IAAI,GAAG;IACxB,SAAS,EAAE,oBAAoB;IAC/B,KAAK,EAAE,EAAE;IACT,KAAK,EAAE,EAAE;IACT,OAAO,EAAE,eAAe,CAAC,OAAO;IAChC,aAAa,EAAE,qBAAqB,CAAC,IAAI;IACzC,KAAK,EAAE,YAAY;CACnB,CAAC;AACF,iBAAiB,CAAC,UAAU,GAAG;IAC9B,IAAI,EAAE;QACL,WAAW,EAAE;YACZ,KAAK,EAAE,0GAA0G;SACjH;KACD;CACD,CAAC","sourcesContent":["import { SulaMenuDensity, SulaMenuLabelOverflow, SulaMenuMainItem } from './model/sula-menu.model';\n\ntype StoryArgs = {\n\tmenuTitle: string;\n\timage: string;\n\twidth: string;\n\tdensity: SulaMenuDensity;\n\tlabelOverflow: SulaMenuLabelOverflow;\n\titems: SulaMenuMainItem[];\n\titemSelected: EventListener;\n\titemClicked: EventListener;\n\tmenuToggled: EventListener;\n};\n\nconst BRAND_IMAGE = `data:image/svg+xml;utf8,${encodeURIComponent(`\n\t<svg width=\"80\" height=\"80\" viewBox=\"0 0 80 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n\t\t<rect width=\"80\" height=\"80\" rx=\"20\" fill=\"#E5231B\"/>\n\t\t<rect x=\"12\" y=\"12\" width=\"56\" height=\"56\" rx=\"18\" fill=\"white\" fill-opacity=\"0.08\"/>\n\t\t<path d=\"M52 24H35.5C31.3579 24 28 27.3579 28 31.5C28 35.6421 31.3579 39 35.5 39H44.5C48.6421 39 52 42.3579 52 46.5C52 50.6421 48.6421 54 44.5 54H28\" stroke=\"white\" stroke-width=\"8\" stroke-linecap=\"round\" stroke-linejoin=\"round\"/>\n\t</svg>\n`)}`;\n\nconst defaultItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'overview',\n\t\tlabel: 'Visao Geral',\n\t\ticon: 'ph ph-house-line',\n\t\tselected: true,\n\t},\n\t{\n\t\tid: 'operations',\n\t\tlabel: 'Operacoes',\n\t\ticon: 'ph ph-briefcase',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'policies',\n\t\t\t\tlabel: 'Apolices',\n\t\t\t\ticon: 'ph ph-files',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'endorsements',\n\t\t\t\tlabel: 'Endossos',\n\t\t\t\ticon: 'ph ph-arrows-clockwise',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'claims',\n\t\t\t\tlabel: 'Sinistros',\n\t\t\t\ticon: 'ph ph-warning-circle',\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'settings',\n\t\tlabel: 'Configuracoes',\n\t\ticon: 'ph ph-gear-six',\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'teams',\n\t\t\t\tlabel: 'Times',\n\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'permissions',\n\t\t\t\tlabel: 'Permissoes',\n\t\t\t\ticon: 'ph ph-lock-key',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst nestedItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'sula-os',\n\t\tlabel: 'Sula OS',\n\t\ticon: 'ph ph-app-window',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'dashboard',\n\t\t\t\tlabel: 'Dashboard',\n\t\t\t\ticon: 'ph ph-gauge',\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'canvas',\n\t\t\t\tlabel: 'Canvas',\n\t\t\t\ticon: 'ph ph-frame-corners',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'chapters',\n\t\t\t\t\t\tlabel: 'Capitulos/Jornadas',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t\tselected: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'tribes',\n\t\t\t\t\t\tlabel: 'Tribes/Areas',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'analytics',\n\t\tlabel: 'Analytics',\n\t\ticon: 'ph ph-chart-line-up',\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'portfolio',\n\t\t\t\tlabel: 'Portfolio',\n\t\t\t\ticon: 'ph ph-chart-pie-slice',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst longLabelItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'protocol-center',\n\t\tlabel: 'Central de protocolos e acompanhamentos operacionais',\n\t\ticon: 'ph ph-folders',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'technical-underwriting',\n\t\t\t\tlabel: 'Analise tecnica e de subscricao para contas corporativas',\n\t\t\t\ticon: 'ph ph-file-search',\n\t\t\t\tselected: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'journey-builder',\n\t\t\t\tlabel: 'Construtor de jornadas e configuracoes de experiencia',\n\t\t\t\ticon: 'ph ph-path',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'audiences',\n\t\t\t\t\t\tlabel: 'Segmentos e audiencias de relacionamento',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'rules',\n\t\t\t\t\t\tlabel: 'Regras e validacoes com nomenclaturas extensas',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'governance',\n\t\tlabel: 'Governanca de acessos e seguranca',\n\t\ticon: 'ph ph-shield-check',\n\t},\n];\n\nconst hiddenItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'overview-hidden',\n\t\tlabel: 'Visao Geral',\n\t\ticon: 'ph ph-house-line',\n\t\thidden: true,\n\t},\n\t{\n\t\tid: 'reports',\n\t\tlabel: 'Relatorios',\n\t\ticon: 'ph ph-chart-bar',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'archived',\n\t\t\t\tlabel: 'Arquivados',\n\t\t\t\ticon: 'ph ph-archive-box',\n\t\t\t\thidden: true,\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'settings-hidden',\n\t\tlabel: 'Configuracoes',\n\t\ticon: 'ph ph-gear-six',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'users-hidden',\n\t\t\t\tlabel: 'Usuarios ocultos',\n\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t\thidden: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'roles',\n\t\t\t\tlabel: 'Perfis de acesso',\n\t\t\t\ticon: 'ph ph-lock-key',\n\t\t\t\texpanded: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'legacy-role',\n\t\t\t\t\t\tlabel: 'Perfil legado',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t\thidden: true,\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'brokers',\n\t\t\t\t\t\tlabel: 'Corretores',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t\tselected: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'teams-visible',\n\t\t\t\tlabel: 'Times',\n\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst disabledItems: SulaMenuMainItem[] = [\n\t{\n\t\tid: 'overview-disabled',\n\t\tlabel: 'Visao Geral',\n\t\ticon: 'ph ph-house-line',\n\t\tdisabled: true,\n\t},\n\t{\n\t\tid: 'operations',\n\t\tlabel: 'Operacoes',\n\t\ticon: 'ph ph-briefcase',\n\t\texpanded: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'policies-disabled',\n\t\t\t\tlabel: 'Apolices',\n\t\t\t\ticon: 'ph ph-files',\n\t\t\t\tdisabled: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'endorsements',\n\t\t\t\tlabel: 'Endossos',\n\t\t\t\ticon: 'ph ph-arrows-clockwise',\n\t\t\t\tselected: true,\n\t\t\t},\n\t\t\t{\n\t\t\t\tid: 'claims',\n\t\t\t\tlabel: 'Sinistros',\n\t\t\t\ticon: 'ph ph-warning-circle',\n\t\t\t\texpanded: true,\n\t\t\t\tdisabled: true,\n\t\t\t\tchildren: [\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'claims-open',\n\t\t\t\t\t\tlabel: 'Sinistros abertos',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\tid: 'claims-archived',\n\t\t\t\t\t\tlabel: 'Sinistros arquivados',\n\t\t\t\t\t\ticon: 'ph ph-dot-outline',\n\t\t\t\t\t\tdisabled: true,\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t},\n\t\t],\n\t},\n\t{\n\t\tid: 'settings',\n\t\tlabel: 'Configuracoes',\n\t\ticon: 'ph ph-gear-six',\n\t\tdisabled: true,\n\t\tchildren: [\n\t\t\t{\n\t\t\t\tid: 'teams',\n\t\t\t\tlabel: 'Times',\n\t\t\t\ticon: 'ph ph-users-three',\n\t\t\t},\n\t\t],\n\t},\n];\n\nconst cloneMenuItems = (items: SulaMenuMainItem[]) => {\n\treturn items.map(item => ({\n\t\t...item,\n\t\tchildren: item.children?.map(child => ({\n\t\t\t...child,\n\t\t\tchildren: child.children?.map(grandchild => ({ ...grandchild })),\n\t\t})),\n\t}));\n};\n\nconst createStoryShell = () => {\n\tconst container = document.createElement('div');\n\tcontainer.style.margin = '20px';\n\tcontainer.style.padding = '24px';\n\tcontainer.style.background = 'linear-gradient(180deg, #f8f9f9 0%, #eef2f2 100%)';\n\tcontainer.style.borderRadius = '24px';\n\tcontainer.style.boxSizing = 'border-box';\n\n\tconst shell = document.createElement('div');\n\tshell.style.display = 'flex';\n\tshell.style.width = '960px';\n\tshell.style.maxWidth = '100%';\n\tshell.style.height = '720px';\n\tshell.style.borderRadius = '24px';\n\tshell.style.overflow = 'visible';\n\tshell.style.background = '#ffffff';\n\tshell.style.border = '1px solid #dfe5e5';\n\tshell.style.boxShadow = '0 20px 48px rgba(15, 23, 42, 0.08)';\n\n\tconst contentPanel = document.createElement('div');\n\tcontentPanel.style.flex = '1';\n\tcontentPanel.style.padding = '40px';\n\tcontentPanel.style.background = 'linear-gradient(180deg, #ffffff 0%, #f7f9f9 100%)';\n\tcontentPanel.style.borderRadius = '0 24px 24px 0';\n\tcontentPanel.style.boxSizing = 'border-box';\n\n\tconst contentTitle = document.createElement('h3');\n\tcontentTitle.textContent = 'Area de conteudo';\n\tcontentTitle.style.margin = '0 0 12px';\n\tcontentTitle.style.fontSize = '24px';\n\tcontentTitle.style.fontWeight = '700';\n\tcontentTitle.style.color = '#2f3131';\n\n\tconst contentDescription = document.createElement('p');\n\tcontentDescription.textContent = 'Use o botao no rodape do menu para colapsar, passe o mouse sobre o menu colapsado para visualizar o preview e clique nos itens para observar os eventos no painel Actions.';\n\tcontentDescription.style.margin = '0 0 24px';\n\tcontentDescription.style.maxWidth = '520px';\n\tcontentDescription.style.fontSize = '14px';\n\tcontentDescription.style.lineHeight = '22px';\n\tcontentDescription.style.color = '#6c6e6e';\n\n\tconst infoCard = document.createElement('div');\n\tinfoCard.style.padding = '20px 24px';\n\tinfoCard.style.borderRadius = '20px';\n\tinfoCard.style.background = '#f4f7f7';\n\tinfoCard.style.border = '1px solid #e3e9e9';\n\tinfoCard.style.maxWidth = '460px';\n\n\tconst infoTitle = document.createElement('strong');\n\tinfoTitle.textContent = 'Fluxos demonstrados';\n\tinfoTitle.style.display = 'block';\n\tinfoTitle.style.marginBottom = '12px';\n\tinfoTitle.style.fontSize = '15px';\n\tinfoTitle.style.color = '#2f3131';\n\n\tconst infoList = document.createElement('ul');\n\tinfoList.style.margin = '0';\n\tinfoList.style.paddingLeft = '18px';\n\tinfoList.style.color = '#5d5f5f';\n\tinfoList.style.fontSize = '14px';\n\tinfoList.style.lineHeight = '22px';\n\tinfoList.innerHTML = '<li>Selecao unica de itens folha</li><li>Expansao independente de branches</li><li>Submenus em dois niveis</li><li>Preview do menu sobre o conteudo</li>';\n\n\tinfoCard.appendChild(infoTitle);\n\tinfoCard.appendChild(infoList);\n\tcontentPanel.appendChild(contentTitle);\n\tcontentPanel.appendChild(contentDescription);\n\tcontentPanel.appendChild(infoCard);\n\tshell.appendChild(contentPanel);\n\tcontainer.appendChild(shell);\n\n\treturn { container, shell };\n};\n\nexport default {\n\ttitle: 'Components/sula-menu',\n\ttags: ['autodocs'],\n\targTypes: {\n\t\tmenuTitle: {\n\t\t\tcontrol: 'text',\n\t\t\tdefaultValue: 'Sula Hub',\n\t\t\tdescription: 'Titulo exibido no cabecalho do menu.',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\timage: {\n\t\t\tcontrol: 'text',\n\t\t\tdefaultValue: BRAND_IMAGE,\n\t\t\tdescription: 'Imagem de marca exibida ao lado do titulo.',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\twidth: {\n\t\t\tcontrol: 'text',\n\t\t\tdefaultValue: '',\n\t\t\tdescription: 'Largura do menu expandido. Use medidas independentes do host, como 320px, 20rem ou clamp(16rem, 25vw, 24rem).',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\tdensity: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuDensity),\n\t\t\tdescription: 'Define a densidade visual e tipografica dos itens principais.',\n\t\t\ttable: {\n\t\t\t\ttype: { summary: 'SulaMenuDensity' },\n\t\t\t\tdefaultValue: { summary: 'SulaMenuDensity.Default' },\n\t\t\t},\n\t\t},\n\t\tlabelOverflow: {\n\t\t\tcontrol: { type: 'select' },\n\t\t\toptions: Object.values(SulaMenuLabelOverflow),\n\t\t\tdescription: 'Define se labels longos quebram em ate duas linhas ou usam ellipsis.',\n\t\t\ttable: {\n\t\t\t\ttype: { summary: 'SulaMenuLabelOverflow' },\n\t\t\t\tdefaultValue: { summary: 'SulaMenuLabelOverflow.Wrap' },\n\t\t\t},\n\t\t},\n\t\titems: {\n\t\t\tcontrol: 'object',\n\t\t\tdefaultValue: defaultItems,\n\t\t\tdescription: 'Estrutura hierarquica do menu, com suporte a itens, subitens, netos, ocultacao via hidden e bloqueio via disabled.',\n\t\t\ttype: {\n\t\t\t\trequired: false,\n\t\t\t},\n\t\t},\n\t\titemSelected: {\n\t\t\taction: 'itemSelected',\n\t\t\tdescription: 'Evento emitido quando um item folha e selecionado.',\n\t\t},\n\t\titemClicked: {\n\t\t\taction: 'itemClicked',\n\t\t\tdescription: 'Evento emitido a cada clique em qualquer item do menu.',\n\t\t},\n\t\tmenuToggled: {\n\t\t\taction: 'menuToggled',\n\t\t\tdescription: 'Evento emitido ao colapsar ou expandir o menu.',\n\t\t},\n\t},\n\tparameters: {\n\t\tdocs: {\n\t\t\tdescription: {\n\t\t\t\tcomponent:\n\t\t\t\t\t'O componente Sula Menu organiza navegacao hierarquica com suporte a expansao de submenus, selecao unica de itens folha, ocultacao declarativa via hidden, bloqueio declarativo via disabled (impede clique/expansao/selecao e aplica estilo apagado, exceto quando o item ja esta ativo/selecionado), colapso com preview em hover e emissao de eventos para clique, selecao e toggle do container.',\n\t\t\t},\n\t\t},\n\t},\n};\n\nconst Template: any = (args: StoryArgs) => {\n\tconst { container, shell } = createStoryShell();\n\tconst el = document.createElement('sula-menu');\n\n\tel.menuTitle = args.menuTitle;\n\tel.image = args.image;\n\tel.width = args.width;\n\tel.density = args.density;\n\tel.labelOverflow = args.labelOverflow;\n\tel.items = cloneMenuItems(args.items);\n\n\tel.addEventListener('itemSelected', args.itemSelected);\n\tel.addEventListener('itemClicked', args.itemClicked);\n\tel.addEventListener('menuToggled', args.menuToggled);\n\n\tshell.prepend(el);\n\n\treturn container;\n};\n\nexport const Default = Template.bind({});\nDefault.args = {\n\tmenuTitle: 'Sula Hub',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: defaultItems,\n};\nDefault.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Exemplo principal do menu com marca, um item folha selecionado e uma secao expandida. Interaja com os itens e com o toggle do rodape para validar os eventos e os estados visuais.',\n\t\t},\n\t},\n};\n\nexport const WithNestedNavigation = Template.bind({});\nWithNestedNavigation.args = {\n\tmenuTitle: 'Sula OS',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: nestedItems,\n};\nWithNestedNavigation.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Demonstra a navegacao com branch aninhado e um neto previamente selecionado, cobrindo o fluxo de expansao em dois niveis.',\n\t\t},\n\t},\n};\n\nexport const WithLongLabels = Template.bind({});\nWithLongLabels.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: longLabelItems,\n};\nWithLongLabels.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Cenario padrao para labels extensos, com tipografia de 14px e quebra em ate duas linhas nos itens principais.',\n\t\t},\n\t},\n};\n\nexport const WithTruncatedLongLabels = Template.bind({});\nWithTruncatedLongLabels.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Truncate,\n\titems: longLabelItems,\n};\nWithTruncatedLongLabels.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Alternativa explicita com ellipsis para produtos que precisam manter todos os itens principais em uma unica linha.',\n\t\t},\n\t},\n};\n\nexport const WithLongLabelsCustomLayout = Template.bind({});\nWithLongLabelsCustomLayout.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '320px',\n\tdensity: SulaMenuDensity.Compact,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: longLabelItems,\n};\nWithLongLabelsCustomLayout.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Cenario para muitos labels longos: combina largura de 320px, densidade compacta e quebra em ate duas linhas por meio da API oficial.',\n\t\t},\n\t},\n};\n\nexport const WithComfortableDensity = Template.bind({});\nWithComfortableDensity.args = {\n\tmenuTitle: 'Governanca',\n\timage: BRAND_IMAGE,\n\twidth: '320px',\n\tdensity: SulaMenuDensity.Comfortable,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: longLabelItems,\n};\nWithComfortableDensity.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Variante com maior area de toque e tipografia de 16px para contextos que priorizam conforto de leitura.',\n\t\t},\n\t},\n};\n\nexport const WithHiddenItems = Template.bind({});\nWithHiddenItems.args = {\n\tmenuTitle: 'Administracao',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: hiddenItems,\n};\nWithHiddenItems.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Demonstra a omissao de itens marcados com hidden em todos os niveis, incluindo o caso em que um branch deixa de expandir porque seus descendentes visiveis foram filtrados.',\n\t\t},\n\t},\n};\n\nexport const WithDisabledItems = Template.bind({});\nWithDisabledItems.args = {\n\tmenuTitle: 'Administracao',\n\timage: BRAND_IMAGE,\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: disabledItems,\n};\nWithDisabledItems.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory:\n\t\t\t\t'Demonstra itens com disabled em todos os niveis (principal, subitem e neto): eles ficam com aparencia apagada, cursor de bloqueio e nao respondem a clique, expansao ou selecao. O branch \"Sinistros\" mostra que, quando um item disabled ja esta ativo/expandido, o destaque de estado ativo prevalece sobre o estilo apagado.',\n\t\t},\n\t},\n};\n\nexport const WithoutBrandImage = Template.bind({});\nWithoutBrandImage.args = {\n\tmenuTitle: 'Menu sem logomarca',\n\timage: '',\n\twidth: '',\n\tdensity: SulaMenuDensity.Default,\n\tlabelOverflow: SulaMenuLabelOverflow.Wrap,\n\titems: defaultItems,\n};\nWithoutBrandImage.parameters = {\n\tdocs: {\n\t\tdescription: {\n\t\t\tstory: 'Mostra o comportamento do componente quando apenas o titulo e exibido no cabecalho, sem imagem de marca.',\n\t\t},\n\t},\n};\n"]}
|
|
@@ -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}.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))}: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}.tooltip-arrow,.tooltip-arrow:before{height:8px;position:absolute;width:8px}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{background:var(--color-neutral-neutral-8);content:"";transform:rotate(45deg);visibility:visible}.hint-bubble[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.hint-bubble[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.hint-bubble[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.hint-bubble[data-popper-placement^=right]>.tooltip-arrow{left:-4px}@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-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)}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:0}.z-50{z-index:50}.box-border{box-sizing:border-box}.inline-block{display:inline-block}.flex{display:flex}.h-\[22px\]{height:22px}.h-full{height:100%}.w-\[22px\]{width:22px}.w-full{width:100%}.max-w-\[200px\]{max-width:200px}.cursor-pointer{cursor:pointer}.items-center{align-items:center}.justify-center{justify-content:center}.overflow-visible{overflow:visible}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.rounded-full{border-radius:9999px}.border{border-width:1px}.border-solid{border-style:solid}.border-feedback-informational{border-color:var(--color-feedback-informational)}.border-transparent{border-color:transparent}.bg-neutral-neutral-8{background-color:var(--color-neutral-neutral-8)}.bg-transparent{background-color:transparent}.px-12{padding-left:.75rem;padding-right:.75rem}.py-8{padding-bottom:.5rem;padding-top:.5rem}.text-\[18px\]{font-size:18px}.text-sm{font-size:.875rem;line-height:1.25rem}.leading-\[0\]{line-height:0}.leading-none{line-height:1}.leading-normal{line-height:1.5}.text-icon-primary{color:var(--color-icon-primary)}.text-neutral-neutral-1{color:var(--color-neutral-neutral-1)}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\[0_4px_16px_rgba\(0\2c 0\2c 0\2c 0\.24\)\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_rgba\(0\2c 0\2c 0\2c 0\.24\)\]{--tw-shadow:0 4px 16px rgba(0,0,0,.24);--tw-shadow-colored:0 4px 16px var(--tw-shadow-color)}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.transition-all{transition-duration:.15s;transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1)}.transition-opacity{transition-duration:.15s;transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}
|
|
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}.hidden{display:none}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.border{border-width:1px}.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}.tooltip-trigger{align-items:center;background:transparent;cursor:pointer;display:inline-flex;justify-content:center;line-height:0;position:relative}.tooltip-trigger:before{border:1px solid transparent;border-radius:9999px;box-sizing:border-box;content:"";inset:-2px;pointer-events:none;position:absolute;transition:border-color .2s ease}.tooltip-trigger.is-focused:before{border-color:var(--color-feedback-informational)}.tooltip-arrow,.tooltip-arrow:before{height:8px;position:absolute;width:8px}.tooltip-arrow{visibility:hidden}.tooltip-arrow:before{background:var(--color-neutral-neutral-8);content:"";transform:rotate(45deg);visibility:visible}.hint-bubble[data-popper-placement^=top]>.tooltip-arrow{bottom:-4px}.hint-bubble[data-popper-placement^=bottom]>.tooltip-arrow{top:-4px}.hint-bubble[data-popper-placement^=left]>.tooltip-arrow{right:-4px}.hint-bubble[data-popper-placement^=right]>.tooltip-arrow{left:-4px}@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-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)}.pointer-events-none{pointer-events:none}.invisible{visibility:hidden}.static{position:static}.fixed{position:fixed}.inset-0{inset:0}.z-50{z-index:50}.inline-block{display:inline-block}.flex{display:flex}.max-w-\[200px\]{max-width:200px}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.break-words{overflow-wrap:break-word}.rounded{border-radius:.25rem}.bg-neutral-neutral-8{background-color:var(--color-neutral-neutral-8)}.px-12{padding-left:.75rem;padding-right:.75rem}.py-8{padding-bottom:.5rem;padding-top:.5rem}.text-\[18px\]{font-size:18px}.text-sm{font-size:.875rem;line-height:1.25rem}.leading-\[0\]{line-height:0}.leading-none{line-height:1}.leading-normal{line-height:1.5}.text-icon-primary{color:var(--color-icon-primary)}.text-neutral-neutral-1{color:var(--color-neutral-neutral-1)}.opacity-0{opacity:0}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 rgba(0,0,0,.1),0 1px 2px -1px rgba(0,0,0,.1);--tw-shadow-colored:0 1px 3px 0 var(--tw-shadow-color),0 1px 2px -1px var(--tw-shadow-color)}.shadow,.shadow-\[0_4px_16px_rgba\(0\2c 0\2c 0\2c 0\.24\)\]{box-shadow:var(--tw-ring-offset-shadow,0 0 #0000),var(--tw-ring-shadow,0 0 #0000),var(--tw-shadow)}.shadow-\[0_4px_16px_rgba\(0\2c 0\2c 0\2c 0\.24\)\]{--tw-shadow:0 4px 16px rgba(0,0,0,.24);--tw-shadow-colored:0 4px 16px var(--tw-shadow-color)}.ring{--tw-ring-offset-shadow:var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow:var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow,0 0 #0000)}.transition-\[opacity\2c visibility\]{transition-duration:.15s;transition-property:opacity,visibility;transition-timing-function:cubic-bezier(.4,0,.2,1)}.duration-200{transition-duration:.2s}.container{width:100%}@media (min-width:22.5rem){.container{max-width:22.5rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}
|
|
@@ -4,6 +4,10 @@ import { SulaTooltipPosition, SulaTooltipTrigger } from "./model/sula-tooltip.mo
|
|
|
4
4
|
const MAX_TEXT_LENGTH = 300;
|
|
5
5
|
export class SulaTooltip {
|
|
6
6
|
constructor() {
|
|
7
|
+
/**
|
|
8
|
+
* Tooltip hint text — max 300 characters
|
|
9
|
+
*/
|
|
10
|
+
this.text = '';
|
|
7
11
|
/**
|
|
8
12
|
* Tooltip position relative to trigger
|
|
9
13
|
*/
|
|
@@ -28,22 +32,44 @@ export class SulaTooltip {
|
|
|
28
32
|
* appears on hover of that parent.
|
|
29
33
|
*/
|
|
30
34
|
this.trigger = SulaTooltipTrigger.Icon;
|
|
35
|
+
/**
|
|
36
|
+
* When true, the hint bubble is rendered in a portal appended to
|
|
37
|
+
* `document.body` instead of staying inside the component's local DOM
|
|
38
|
+
* subtree. Use this when the tooltip lives inside a container that clips
|
|
39
|
+
* overflow (e.g. `overflow-x-auto`/`overflow: hidden`, such as `sula-table`
|
|
40
|
+
* cells) — those ancestors clip `position: fixed` descendants too, so the
|
|
41
|
+
* bubble can get cut off or hidden behind other elements regardless of the
|
|
42
|
+
* Popper.js `flip`/`preventOverflow` modifiers.
|
|
43
|
+
*/
|
|
44
|
+
this.appendToBody = false;
|
|
31
45
|
this.isVisible = false;
|
|
32
46
|
this.parentEl = null;
|
|
33
47
|
this.hintEl = null;
|
|
34
48
|
this.triggerEl = null;
|
|
35
49
|
this.arrowEl = null;
|
|
36
50
|
this.popperInstance = null;
|
|
51
|
+
this.portalHost = null;
|
|
52
|
+
this.portalShadow = null;
|
|
53
|
+
this.hintTextNode = null;
|
|
37
54
|
this.handleMouseEnter = () => {
|
|
38
55
|
var _a;
|
|
39
56
|
this.isVisible = true;
|
|
57
|
+
this.syncPortalVisibility();
|
|
40
58
|
(_a = this.popperInstance) === null || _a === void 0 ? void 0 : _a.update();
|
|
41
59
|
};
|
|
42
60
|
this.handleMouseLeave = () => {
|
|
43
61
|
this.isVisible = false;
|
|
62
|
+
this.syncPortalVisibility();
|
|
44
63
|
};
|
|
45
64
|
}
|
|
46
65
|
componentDidLoad() {
|
|
66
|
+
// Ancestors like sula-table-cell replace their own host element with a
|
|
67
|
+
// plain <td> synchronously in their own componentDidLoad, which moves
|
|
68
|
+
// this element in the DOM. Defer setup to the next frame so it runs
|
|
69
|
+
// after any such ancestor DOM moves have already settled.
|
|
70
|
+
requestAnimationFrame(() => this.mount());
|
|
71
|
+
}
|
|
72
|
+
mount() {
|
|
47
73
|
if (this.trigger === SulaTooltipTrigger.Parent) {
|
|
48
74
|
this.parentEl = this.el.parentElement;
|
|
49
75
|
if (this.parentEl) {
|
|
@@ -51,6 +77,9 @@ export class SulaTooltip {
|
|
|
51
77
|
this.parentEl.addEventListener('mouseleave', this.handleMouseLeave);
|
|
52
78
|
}
|
|
53
79
|
}
|
|
80
|
+
if (this.appendToBody) {
|
|
81
|
+
this.createPortalHint();
|
|
82
|
+
}
|
|
54
83
|
this.initPopper();
|
|
55
84
|
}
|
|
56
85
|
disconnectedCallback() {
|
|
@@ -63,6 +92,60 @@ export class SulaTooltip {
|
|
|
63
92
|
this.popperInstance.destroy();
|
|
64
93
|
this.popperInstance = null;
|
|
65
94
|
}
|
|
95
|
+
this.destroyPortalHint();
|
|
96
|
+
}
|
|
97
|
+
handleTextChange() {
|
|
98
|
+
if (this.hintTextNode) {
|
|
99
|
+
this.hintTextNode.textContent = this.displayText;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Builds the hint bubble outside of Stencil's own DOM subtree and appends
|
|
104
|
+
* it to `document.body`, so ancestor containers with `overflow` set can no
|
|
105
|
+
* longer clip it. The bubble's styles are copied from this component's own
|
|
106
|
+
* shadow root (adopted stylesheets or `<style>` tags) into a dedicated
|
|
107
|
+
* shadow root on the portal host to keep styling encapsulated.
|
|
108
|
+
*/
|
|
109
|
+
createPortalHint() {
|
|
110
|
+
if (!this.displayText || this.portalHost)
|
|
111
|
+
return;
|
|
112
|
+
this.portalHost = document.createElement('div');
|
|
113
|
+
this.portalShadow = this.portalHost.attachShadow({ mode: 'open' });
|
|
114
|
+
this.copyStylesInto(this.portalShadow);
|
|
115
|
+
this.hintEl = document.createElement('div');
|
|
116
|
+
this.hintEl.setAttribute('role', 'tooltip');
|
|
117
|
+
this.hintEl.className = this.getHintClasses();
|
|
118
|
+
this.hintTextNode = document.createTextNode(this.displayText);
|
|
119
|
+
this.hintEl.appendChild(this.hintTextNode);
|
|
120
|
+
this.arrowEl = document.createElement('div');
|
|
121
|
+
this.arrowEl.className = 'tooltip-arrow';
|
|
122
|
+
this.arrowEl.setAttribute('data-popper-arrow', '');
|
|
123
|
+
this.hintEl.appendChild(this.arrowEl);
|
|
124
|
+
this.portalShadow.appendChild(this.hintEl);
|
|
125
|
+
document.body.appendChild(this.portalHost);
|
|
126
|
+
}
|
|
127
|
+
copyStylesInto(root) {
|
|
128
|
+
const sourceRoot = this.el.shadowRoot;
|
|
129
|
+
if (!sourceRoot)
|
|
130
|
+
return;
|
|
131
|
+
const adopted = sourceRoot.adoptedStyleSheets;
|
|
132
|
+
if ((adopted === null || adopted === void 0 ? void 0 : adopted.length) && 'adoptedStyleSheets' in root) {
|
|
133
|
+
root.adoptedStyleSheets = adopted;
|
|
134
|
+
}
|
|
135
|
+
else {
|
|
136
|
+
sourceRoot.querySelectorAll('style').forEach((style) => root.appendChild(style.cloneNode(true)));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
destroyPortalHint() {
|
|
140
|
+
var _a;
|
|
141
|
+
(_a = this.portalHost) === null || _a === void 0 ? void 0 : _a.remove();
|
|
142
|
+
this.portalHost = null;
|
|
143
|
+
this.portalShadow = null;
|
|
144
|
+
this.hintTextNode = null;
|
|
145
|
+
if (this.appendToBody) {
|
|
146
|
+
this.hintEl = null;
|
|
147
|
+
this.arrowEl = null;
|
|
148
|
+
}
|
|
66
149
|
}
|
|
67
150
|
initPopper() {
|
|
68
151
|
const reference = this.trigger === SulaTooltipTrigger.Parent ? this.el.parentElement : this.triggerEl;
|
|
@@ -90,23 +173,24 @@ export class SulaTooltip {
|
|
|
90
173
|
: this.text;
|
|
91
174
|
}
|
|
92
175
|
getIconClasses() {
|
|
93
|
-
|
|
94
|
-
const borderColor = this.focused
|
|
95
|
-
? 'border-feedback-informational'
|
|
96
|
-
: 'border-transparent';
|
|
97
|
-
return `${baseClasses} ${borderColor}`;
|
|
176
|
+
return this.focused ? 'tooltip-trigger is-focused' : 'tooltip-trigger';
|
|
98
177
|
}
|
|
99
178
|
getHintClasses() {
|
|
100
179
|
const baseClasses = 'hint-bubble fixed z-50 px-12 py-8 bg-neutral-neutral-8 text-neutral-neutral-1 text-sm rounded pointer-events-none leading-normal shadow-[0_4px_16px_rgba(0,0,0,0.24)] max-w-[200px] break-words';
|
|
101
180
|
const visibilityClasses = this.isVisible ? 'opacity-100 visible' : 'opacity-0 invisible';
|
|
102
|
-
return `${baseClasses} ${visibilityClasses} transition-opacity duration-200`;
|
|
181
|
+
return `${baseClasses} ${visibilityClasses} transition-[opacity,visibility] duration-200`;
|
|
182
|
+
}
|
|
183
|
+
syncPortalVisibility() {
|
|
184
|
+
if (this.appendToBody && this.hintEl) {
|
|
185
|
+
this.hintEl.className = this.getHintClasses();
|
|
186
|
+
}
|
|
103
187
|
}
|
|
104
188
|
render() {
|
|
105
189
|
const isParentMode = this.trigger === SulaTooltipTrigger.Parent;
|
|
106
190
|
const hostClass = isParentMode
|
|
107
191
|
? 'absolute inset-0 pointer-events-none overflow-visible'
|
|
108
192
|
: 'inline-block relative';
|
|
109
|
-
return (h(Host, { key: '
|
|
193
|
+
return (h(Host, { key: '61c4c6e0c47bb8ad3e08d5c7b7f387cd7b731a70', class: hostClass }, !isParentMode && (h("div", { key: '4f9f1fb595e4a8af3c0055dee12b65440b5a898a', class: this.getIconClasses(), onMouseEnter: this.handleMouseEnter, onMouseLeave: this.handleMouseLeave, role: "button", "aria-label": "Tooltip trigger", ref: (el) => (this.triggerEl = el) }, h("sula-icon", { key: 'e58c0b055e2ac514a46cd9c899e7ac1fa6bac99c', class: "flex leading-[0]", icon: this.icon, customClass: this.iconClass }))), !this.appendToBody && this.displayText && (h("div", { key: 'c85b60f60dd2ea1099bc56367b4845b9384def2a', class: this.getHintClasses(), role: "tooltip", ref: (el) => (this.hintEl = el) }, this.displayText, h("div", { key: '9f1519f1f5315409449e5e3184817cb1bae0480e', class: "tooltip-arrow", "data-popper-arrow": true, ref: (el) => (this.arrowEl = el) })))));
|
|
110
194
|
}
|
|
111
195
|
static get is() { return "sula-tooltip"; }
|
|
112
196
|
static get encapsulation() { return "shadow"; }
|
|
@@ -139,7 +223,8 @@ export class SulaTooltip {
|
|
|
139
223
|
},
|
|
140
224
|
"getter": false,
|
|
141
225
|
"setter": false,
|
|
142
|
-
"reflect": false
|
|
226
|
+
"reflect": false,
|
|
227
|
+
"defaultValue": "''"
|
|
143
228
|
},
|
|
144
229
|
"position": {
|
|
145
230
|
"type": "string",
|
|
@@ -252,6 +337,26 @@ export class SulaTooltip {
|
|
|
252
337
|
"setter": false,
|
|
253
338
|
"reflect": false,
|
|
254
339
|
"defaultValue": "SulaTooltipTrigger.Icon"
|
|
340
|
+
},
|
|
341
|
+
"appendToBody": {
|
|
342
|
+
"type": "boolean",
|
|
343
|
+
"attribute": "append-to-body",
|
|
344
|
+
"mutable": false,
|
|
345
|
+
"complexType": {
|
|
346
|
+
"original": "boolean",
|
|
347
|
+
"resolved": "boolean",
|
|
348
|
+
"references": {}
|
|
349
|
+
},
|
|
350
|
+
"required": false,
|
|
351
|
+
"optional": false,
|
|
352
|
+
"docs": {
|
|
353
|
+
"tags": [],
|
|
354
|
+
"text": "When true, the hint bubble is rendered in a portal appended to\n`document.body` instead of staying inside the component's local DOM\nsubtree. Use this when the tooltip lives inside a container that clips\noverflow (e.g. `overflow-x-auto`/`overflow: hidden`, such as `sula-table`\ncells) \u2014 those ancestors clip `position: fixed` descendants too, so the\nbubble can get cut off or hidden behind other elements regardless of the\nPopper.js `flip`/`preventOverflow` modifiers."
|
|
355
|
+
},
|
|
356
|
+
"getter": false,
|
|
357
|
+
"setter": false,
|
|
358
|
+
"reflect": false,
|
|
359
|
+
"defaultValue": "false"
|
|
255
360
|
}
|
|
256
361
|
};
|
|
257
362
|
}
|
|
@@ -261,5 +366,11 @@ export class SulaTooltip {
|
|
|
261
366
|
};
|
|
262
367
|
}
|
|
263
368
|
static get elementRef() { return "el"; }
|
|
369
|
+
static get watchers() {
|
|
370
|
+
return [{
|
|
371
|
+
"propName": "text",
|
|
372
|
+
"methodName": "handleTextChange"
|
|
373
|
+
}];
|
|
374
|
+
}
|
|
264
375
|
}
|
|
265
376
|
//# sourceMappingURL=sula-tooltip.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sula-tooltip.js","sourceRoot":"","sources":["../../../src/components/sula-tooltip/sula-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAErF,MAAM,eAAe,GAAG,GAAG,CAAC;AAO5B,MAAM,OAAO,WAAW;IALxB;QAaE;;WAEG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EAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,WAAW,EAAE,IAAI,CAAC,SAAS,GAAc,CACpI,CACP;YAEA,IAAI,CAAC,WAAW,IAAI,CACnB,4DAAK,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,EAAE,IAAI,EAAC,SAAS,EAAC,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,MAAM,GAAG,EAAiB,CAAC;gBAC7F,IAAI,CAAC,WAAW;gBACjB,4DAAK,KAAK,EAAC,eAAe,6BAAmB,GAAG,EAAE,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,GAAG,EAAiB,CAAC,GAAQ,CAChG,CACP,CACI,CACR,CAAC;IACJ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, h, State } from '@stencil/core';\nimport { createPopper } from '@popperjs/core';\nimport type { Instance as PopperInstance } from '@popperjs/core';\nimport { SulaTooltipPosition, SulaTooltipTrigger } from './model/sula-tooltip.model';\n\nconst MAX_TEXT_LENGTH = 300;\n\n@Component({\n tag: 'sula-tooltip',\n styleUrl: 'sula-tooltip.scss',\n shadow: true,\n})\nexport class SulaTooltip {\n @Element() el: HTMLElement;\n\n /**\n * Tooltip hint text — max 300 characters\n */\n @Prop() text: string;\n\n /**\n * Tooltip position relative to trigger\n */\n @Prop() position: SulaTooltipPosition = SulaTooltipPosition.Top;\n\n /**\n * Icon class used as the tooltip trigger (Phosphor icon name)\n */\n @Prop() icon: string = 'ph ph-info';\n\n /**\n * Extra classes applied to the trigger icon\n */\n @Prop() iconClass: string = 'text-icon-primary text-[18px] leading-none';\n\n /**\n * When true, renders a focus ring (21.5×21.5px, 1px border) around the icon.\n */\n @Prop() focused: boolean = false;\n\n /**\n * Trigger mode.\n * - `'icon'` (default): the built-in info icon is the hover target.\n * - `'parent'`: the icon is hidden; the component stretches to fill the\n * parent element (which **must** have `position: relative`) and the hint\n * appears on hover of that parent.\n */\n @Prop() trigger: SulaTooltipTrigger = SulaTooltipTrigger.Icon;\n\n @State() isVisible: boolean = false;\n\n private parentEl: HTMLElement | null = null;\n private hintEl: HTMLElement | null = null;\n private triggerEl: HTMLElement | null = null;\n private arrowEl: HTMLElement | null = null;\n private popperInstance: PopperInstance | null = null;\n\n componentDidLoad() {\n if (this.trigger === SulaTooltipTrigger.Parent) {\n this.parentEl = this.el.parentElement;\n if (this.parentEl) {\n this.parentEl.addEventListener('mouseenter', this.handleMouseEnter);\n this.parentEl.addEventListener('mouseleave', this.handleMouseLeave);\n }\n }\n this.initPopper();\n }\n\n disconnectedCallback() {\n if (this.parentEl) {\n this.parentEl.removeEventListener('mouseenter', this.handleMouseEnter);\n this.parentEl.removeEventListener('mouseleave', this.handleMouseLeave);\n this.parentEl = null;\n }\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n }\n\n private initPopper() {\n const reference =\n this.trigger === SulaTooltipTrigger.Parent ? this.el.parentElement : this.triggerEl;\n if (!reference || !this.hintEl) return;\n\n if (this.popperInstance) {\n this.popperInstance.destroy();\n }\n\n this.popperInstance = createPopper(reference, this.hintEl, {\n placement: this.position as any,\n strategy: 'fixed',\n modifiers: [\n { name: 'offset', options: { offset: [0, 8] } },\n { name: 'arrow', options: { element: this.arrowEl } },\n { name: 'preventOverflow', options: { padding: 8 } },\n { name: 'flip' },\n ],\n });\n }\n\n private get displayText(): string {\n if (!this.text) return '';\n return this.text.length > MAX_TEXT_LENGTH\n ? this.text.slice(0, MAX_TEXT_LENGTH)\n : this.text;\n }\n\n private getIconClasses() {\n const baseClasses = 'relative w-[22px] h-[22px] box-border flex items-center justify-center rounded-full cursor-pointer transition-all opacity-100 border border-solid bg-transparent';\n const borderColor = this.focused\n ? 'border-feedback-informational'\n : 'border-transparent';\n\n return `${baseClasses} ${borderColor}`;\n }\n\n private getHintClasses() {\n const baseClasses =\n 'hint-bubble fixed z-50 px-12 py-8 bg-neutral-neutral-8 text-neutral-neutral-1 text-sm rounded pointer-events-none leading-normal shadow-[0_4px_16px_rgba(0,0,0,0.24)] max-w-[200px] break-words';\n const visibilityClasses = this.isVisible ? 'opacity-100 visible' : 'opacity-0 invisible';\n return `${baseClasses} ${visibilityClasses} transition-opacity duration-200`;\n }\n\n private handleMouseEnter = () => {\n this.isVisible = true;\n this.popperInstance?.update();\n };\n\n private handleMouseLeave = () => {\n this.isVisible = false;\n };\n\n render() {\n const isParentMode = this.trigger === SulaTooltipTrigger.Parent;\n const hostClass = isParentMode\n ? 'absolute inset-0 pointer-events-none overflow-visible'\n : 'inline-block relative';\n\n return (\n <Host class={hostClass}>\n {!isParentMode && (\n <div\n class={this.getIconClasses()}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n role=\"button\"\n aria-label=\"Tooltip trigger\"\n ref={(el) => (this.triggerEl = el as HTMLElement)}\n >\n <sula-icon class=\"flex items-center justify-center w-full h-full leading-[0]\" icon={this.icon} customClass={this.iconClass}></sula-icon>\n </div>\n )}\n\n {this.displayText && (\n <div class={this.getHintClasses()} role=\"tooltip\" ref={(el) => (this.hintEl = el as HTMLElement)}>\n {this.displayText}\n <div class=\"tooltip-arrow\" data-popper-arrow ref={(el) => (this.arrowEl = el as HTMLElement)}></div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"sula-tooltip.js","sourceRoot":"","sources":["../../../src/components/sula-tooltip/sula-tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAChF,OAAO,EAAE,YAAY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;;;;;;;;;;;;;;;;;;;;;;;CACF","sourcesContent":["import { Component, Element, Host, Prop, Watch, h, State } from '@stencil/core';\nimport { createPopper } from '@popperjs/core';\nimport type { Instance as PopperInstance } from '@popperjs/core';\nimport { SulaTooltipPosition, SulaTooltipTrigger } from './model/sula-tooltip.model';\n\nconst MAX_TEXT_LENGTH = 300;\n\n@Component({\n tag: 'sula-tooltip',\n styleUrl: 'sula-tooltip.scss',\n shadow: true,\n})\nexport class SulaTooltip {\n @Element() el!: HTMLElement;\n\n /**\n * Tooltip hint text — max 300 characters\n */\n @Prop() text: string = '';\n\n /**\n * Tooltip position relative to trigger\n */\n @Prop() position: SulaTooltipPosition = SulaTooltipPosition.Top;\n\n /**\n * Icon class used as the tooltip trigger (Phosphor icon name)\n */\n @Prop() icon: string = 'ph ph-info';\n\n /**\n * Extra classes applied to the trigger icon\n */\n @Prop() iconClass: string = 'text-icon-primary text-[18px] leading-none';\n\n /**\n * When true, renders a focus ring (21.5×21.5px, 1px border) around the icon.\n */\n @Prop() focused: boolean = false;\n\n /**\n * Trigger mode.\n * - `'icon'` (default): the built-in info icon is the hover target.\n * - `'parent'`: the icon is hidden; the component stretches to fill the\n * parent element (which **must** have `position: relative`) and the hint\n * appears on hover of that parent.\n */\n @Prop() trigger: SulaTooltipTrigger = SulaTooltipTrigger.Icon;\n\n /**\n * When true, the hint bubble is rendered in a portal appended to\n * `document.body` instead of staying inside the component's local DOM\n * subtree. Use this when the tooltip lives inside a container that clips\n * overflow (e.g. `overflow-x-auto`/`overflow: hidden`, such as `sula-table`\n * cells) — those ancestors clip `position: fixed` descendants too, so the\n * bubble can get cut off or hidden behind other elements regardless of the\n * Popper.js `flip`/`preventOverflow` modifiers.\n */\n @Prop() appendToBody: boolean = false;\n\n @State() isVisible: boolean = false;\n\n private parentEl: HTMLElement | null = null;\n private hintEl: HTMLElement | null = null;\n private triggerEl: HTMLElement | null = null;\n private arrowEl: HTMLElement | null = null;\n private popperInstance: PopperInstance | null = null;\n private portalHost: HTMLDivElement | null = null;\n private portalShadow: ShadowRoot | null = null;\n private hintTextNode: Text | null = null;\n\n componentDidLoad() {\n // Ancestors like sula-table-cell replace their own host element with a\n // plain <td> synchronously in their own componentDidLoad, which moves\n // this element in the DOM. Defer setup to the next frame so it runs\n // after any such ancestor DOM moves have already settled.\n requestAnimationFrame(() => this.mount());\n }\n\n private mount() {\n if (this.trigger === SulaTooltipTrigger.Parent) {\n this.parentEl = this.el.parentElement;\n if (this.parentEl) {\n this.parentEl.addEventListener('mouseenter', this.handleMouseEnter);\n this.parentEl.addEventListener('mouseleave', this.handleMouseLeave);\n }\n }\n if (this.appendToBody) {\n this.createPortalHint();\n }\n this.initPopper();\n }\n\n disconnectedCallback() {\n if (this.parentEl) {\n this.parentEl.removeEventListener('mouseenter', this.handleMouseEnter);\n this.parentEl.removeEventListener('mouseleave', this.handleMouseLeave);\n this.parentEl = null;\n }\n if (this.popperInstance) {\n this.popperInstance.destroy();\n this.popperInstance = null;\n }\n this.destroyPortalHint();\n }\n\n @Watch('text')\n handleTextChange() {\n if (this.hintTextNode) {\n this.hintTextNode.textContent = this.displayText;\n }\n }\n\n /**\n * Builds the hint bubble outside of Stencil's own DOM subtree and appends\n * it to `document.body`, so ancestor containers with `overflow` set can no\n * longer clip it. The bubble's styles are copied from this component's own\n * shadow root (adopted stylesheets or `<style>` tags) into a dedicated\n * shadow root on the portal host to keep styling encapsulated.\n */\n private createPortalHint() {\n if (!this.displayText || this.portalHost) return;\n\n this.portalHost = document.createElement('div');\n this.portalShadow = this.portalHost.attachShadow({ mode: 'open' });\n this.copyStylesInto(this.portalShadow);\n\n this.hintEl = document.createElement('div');\n this.hintEl.setAttribute('role', 'tooltip');\n this.hintEl.className = this.getHintClasses();\n\n this.hintTextNode = document.createTextNode(this.displayText);\n this.hintEl.appendChild(this.hintTextNode);\n\n this.arrowEl = document.createElement('div');\n this.arrowEl.className = 'tooltip-arrow';\n this.arrowEl.setAttribute('data-popper-arrow', '');\n this.hintEl.appendChild(this.arrowEl);\n\n this.portalShadow.appendChild(this.hintEl);\n document.body.appendChild(this.portalHost);\n }\n\n private copyStylesInto(root: ShadowRoot) {\n const sourceRoot = this.el.shadowRoot;\n if (!sourceRoot) return;\n\n const adopted = (sourceRoot as unknown as { adoptedStyleSheets?: CSSStyleSheet[] }).adoptedStyleSheets;\n if (adopted?.length && 'adoptedStyleSheets' in root) {\n (root as unknown as { adoptedStyleSheets: CSSStyleSheet[] }).adoptedStyleSheets = adopted;\n } else {\n sourceRoot.querySelectorAll('style').forEach((style) => root.appendChild(style.cloneNode(true)));\n }\n }\n\n private destroyPortalHint() {\n this.portalHost?.remove();\n this.portalHost = null;\n this.portalShadow = null;\n this.hintTextNode = null;\n if (this.appendToBody) {\n this.hintEl = null;\n this.arrowEl = null;\n }\n }\n\n private initPopper() {\n const reference =\n this.trigger === SulaTooltipTrigger.Parent ? this.el.parentElement : this.triggerEl;\n if (!reference || !this.hintEl) return;\n\n if (this.popperInstance) {\n this.popperInstance.destroy();\n }\n\n this.popperInstance = createPopper(reference, this.hintEl, {\n placement: this.position as any,\n strategy: 'fixed',\n modifiers: [\n { name: 'offset', options: { offset: [0, 8] } },\n { name: 'arrow', options: { element: this.arrowEl } },\n { name: 'preventOverflow', options: { padding: 8 } },\n { name: 'flip' },\n ],\n });\n }\n\n private get displayText(): string {\n if (!this.text) return '';\n return this.text.length > MAX_TEXT_LENGTH\n ? this.text.slice(0, MAX_TEXT_LENGTH)\n : this.text;\n }\n\n private getIconClasses() {\n return this.focused ? 'tooltip-trigger is-focused' : 'tooltip-trigger';\n }\n\n private getHintClasses() {\n const baseClasses =\n 'hint-bubble fixed z-50 px-12 py-8 bg-neutral-neutral-8 text-neutral-neutral-1 text-sm rounded pointer-events-none leading-normal shadow-[0_4px_16px_rgba(0,0,0,0.24)] max-w-[200px] break-words';\n const visibilityClasses = this.isVisible ? 'opacity-100 visible' : 'opacity-0 invisible';\n return `${baseClasses} ${visibilityClasses} transition-[opacity,visibility] duration-200`;\n }\n\n private handleMouseEnter = () => {\n this.isVisible = true;\n this.syncPortalVisibility();\n this.popperInstance?.update();\n };\n\n private handleMouseLeave = () => {\n this.isVisible = false;\n this.syncPortalVisibility();\n };\n\n private syncPortalVisibility() {\n if (this.appendToBody && this.hintEl) {\n this.hintEl.className = this.getHintClasses();\n }\n }\n\n render() {\n const isParentMode = this.trigger === SulaTooltipTrigger.Parent;\n const hostClass = isParentMode\n ? 'absolute inset-0 pointer-events-none overflow-visible'\n : 'inline-block relative';\n\n return (\n <Host class={hostClass}>\n {!isParentMode && (\n <div\n class={this.getIconClasses()}\n onMouseEnter={this.handleMouseEnter}\n onMouseLeave={this.handleMouseLeave}\n role=\"button\"\n aria-label=\"Tooltip trigger\"\n ref={(el) => (this.triggerEl = el as HTMLElement)}\n >\n <sula-icon class=\"flex leading-[0]\" icon={this.icon} customClass={this.iconClass}></sula-icon>\n </div>\n )}\n\n {!this.appendToBody && this.displayText && (\n <div class={this.getHintClasses()} role=\"tooltip\" ref={(el) => (this.hintEl = el as HTMLElement)}>\n {this.displayText}\n <div class=\"tooltip-arrow\" data-popper-arrow ref={(el) => (this.arrowEl = el as HTMLElement)}></div>\n </div>\n )}\n </Host>\n );\n }\n}\n"]}
|
|
@@ -45,6 +45,14 @@ export default {
|
|
|
45
45
|
defaultValue: { summary: 'SulaTooltipTrigger.Icon' },
|
|
46
46
|
},
|
|
47
47
|
},
|
|
48
|
+
appendToBody: {
|
|
49
|
+
control: 'boolean',
|
|
50
|
+
description: 'Renderiza o hint anexado ao document.body, evitando overflow do conteúdo.',
|
|
51
|
+
table: {
|
|
52
|
+
type: { summary: 'boolean' },
|
|
53
|
+
defaultValue: { summary: 'false' },
|
|
54
|
+
},
|
|
55
|
+
},
|
|
48
56
|
},
|
|
49
57
|
parameters: {
|
|
50
58
|
docs: {
|
|
@@ -75,6 +83,7 @@ const Template = args => {
|
|
|
75
83
|
el.setAttribute('icon', args.icon || 'ph ph-info');
|
|
76
84
|
el.setAttribute('focused', args.focused ? 'true' : 'false');
|
|
77
85
|
el.setAttribute('trigger', args.trigger || 'icon');
|
|
86
|
+
el.setAttribute('append-to-body', args.appendToBody ? 'true' : 'false');
|
|
78
87
|
container.appendChild(el);
|
|
79
88
|
return container;
|
|
80
89
|
};
|
|
@@ -85,6 +94,7 @@ Playground.args = {
|
|
|
85
94
|
icon: 'ph ph-info',
|
|
86
95
|
focused: false,
|
|
87
96
|
trigger: SulaTooltipTrigger.Icon,
|
|
97
|
+
appendToBody: false,
|
|
88
98
|
};
|
|
89
99
|
export const Positions = () => {
|
|
90
100
|
const container = document.createElement('div');
|
|
@@ -176,4 +186,55 @@ export const ParentTrigger = () => {
|
|
|
176
186
|
ParentTrigger.parameters = {
|
|
177
187
|
docs: { description: { story: 'Tooltip disparado pelo hover no elemento pai (ícone oculto).' } },
|
|
178
188
|
};
|
|
189
|
+
export const AppendToBody = () => {
|
|
190
|
+
const wrapper = document.createElement('div');
|
|
191
|
+
wrapper.style.display = 'flex';
|
|
192
|
+
wrapper.style.gap = '32px';
|
|
193
|
+
wrapper.style.padding = '32px';
|
|
194
|
+
wrapper.style.flexWrap = 'wrap';
|
|
195
|
+
// overflow: hidden só clipa position: fixed quando o container também
|
|
196
|
+
// cria um containing block para fixed (aqui via transform).
|
|
197
|
+
const buildBox = (title, appendToBody) => {
|
|
198
|
+
const column = document.createElement('div');
|
|
199
|
+
const heading = document.createElement('h4');
|
|
200
|
+
heading.style.fontSize = '14px';
|
|
201
|
+
heading.style.fontWeight = 'bold';
|
|
202
|
+
heading.style.marginBottom = '8px';
|
|
203
|
+
heading.textContent = title;
|
|
204
|
+
const box = document.createElement('div');
|
|
205
|
+
box.style.width = '220px';
|
|
206
|
+
box.style.height = '70px';
|
|
207
|
+
box.style.overflow = 'hidden';
|
|
208
|
+
box.style.transform = 'translateZ(0)';
|
|
209
|
+
box.style.border = '1px solid #e0e0e0';
|
|
210
|
+
box.style.borderRadius = '8px';
|
|
211
|
+
box.style.padding = '0.75rem';
|
|
212
|
+
box.style.display = 'flex';
|
|
213
|
+
box.style.alignItems = 'center';
|
|
214
|
+
const label = document.createElement('span');
|
|
215
|
+
label.style.fontSize = '14px';
|
|
216
|
+
label.textContent = 'Passe o mouse';
|
|
217
|
+
const tooltip = document.createElement('sula-tooltip');
|
|
218
|
+
tooltip.setAttribute('text', appendToBody
|
|
219
|
+
? 'Este hint escapa do overflow do container via portal no document.body.'
|
|
220
|
+
: 'Este hint deveria aparecer acima, mas é cortado pelo overflow do container.');
|
|
221
|
+
tooltip.setAttribute('position', SulaTooltipPosition.Top);
|
|
222
|
+
tooltip.setAttribute('append-to-body', appendToBody ? 'true' : 'false');
|
|
223
|
+
box.appendChild(label);
|
|
224
|
+
box.appendChild(tooltip);
|
|
225
|
+
column.appendChild(heading);
|
|
226
|
+
column.appendChild(box);
|
|
227
|
+
return column;
|
|
228
|
+
};
|
|
229
|
+
wrapper.appendChild(buildBox('Sem append-to-body (cortado)', false));
|
|
230
|
+
wrapper.appendChild(buildBox('Com append-to-body (funciona)', true));
|
|
231
|
+
return wrapper;
|
|
232
|
+
};
|
|
233
|
+
AppendToBody.parameters = {
|
|
234
|
+
docs: {
|
|
235
|
+
description: {
|
|
236
|
+
story: 'Quando o container tem `overflow` + `transform` (criando um containing block para `fixed`), o hint fica preso ao clipping. Com `append-to-body`, o hint é renderizado em um portal no `document.body` e escapa desse clipping.',
|
|
237
|
+
},
|
|
238
|
+
},
|
|
239
|
+
};
|
|
179
240
|
//# sourceMappingURL=sula-tooltip.stories.js.map
|