@ds-mo/ui 12.8.0 → 13.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/.package-ready.json +1 -0
- package/dist/agent-patterns.json +124 -135
- package/dist/agent.json +260 -1104
- package/dist/angular/ds-bar-nav.d.ts +1 -1
- package/dist/angular/ds-bar-nav.js +3 -3
- package/dist/angular/ds-button-filled.d.ts +1 -1
- package/dist/angular/ds-button-filled.js +3 -3
- package/dist/angular/ds-card-data-viz.d.ts +18 -0
- package/dist/angular/{ds-card-data-viz-donut.js → ds-card-data-viz.js} +12 -12
- package/dist/angular/ds-card-overview.d.ts +1 -1
- package/dist/angular/ds-card-overview.js +3 -3
- package/dist/angular/ds-chart-bar.d.ts +1 -1
- package/dist/angular/ds-chart-bar.js +3 -3
- package/dist/angular/ds-menu.d.ts +1 -7
- package/dist/angular/ds-menu.js +2 -5
- package/dist/angular/ds-mobile-header.d.ts +1 -1
- package/dist/angular/ds-mobile-header.js +3 -3
- package/dist/angular/ds-mobile-section-switcher.d.ts +1 -1
- package/dist/angular/ds-mobile-section-switcher.js +3 -3
- package/dist/angular/ds-panel-tools.d.ts +1 -1
- package/dist/angular/ds-panel-tools.js +3 -3
- package/dist/angular/ds-select.d.ts +5 -4
- package/dist/angular/ds-select.js +3 -3
- package/dist/angular/ds-shell-app.d.ts +90 -1
- package/dist/angular/ds-shell-app.js +44 -4
- package/dist/angular/ds-shell-tools.d.ts +1 -1
- package/dist/angular/ds-shell-tools.js +3 -3
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +1 -8
- package/dist/angular/proxies.d.ts +1 -8
- package/dist/angular/proxies.js +1 -8
- package/dist/components/ds-agent-activity.js +1 -1
- package/dist/components/ds-agent-response.js +1 -1
- package/dist/components/ds-agent-source-list.js +1 -1
- package/dist/components/ds-agent-tool-call.js +1 -1
- package/dist/components/ds-attachment-list.js +1 -1
- package/dist/components/ds-badge.js +1 -1
- package/dist/components/ds-bar-nav.js +1 -1
- package/dist/components/ds-bar-nav.js.map +1 -1
- package/dist/components/ds-bar-title.js +1 -1
- package/dist/components/ds-bar-title.js.map +1 -1
- package/dist/components/ds-bar-workflow.js +1 -1
- package/dist/components/ds-breadcrumb.js +1 -1
- package/dist/components/ds-button-filled.js +1 -1
- package/dist/components/ds-button-unfilled.js +1 -1
- package/dist/components/{ds-select-multi.d.ts → ds-card-data-viz.d.ts} +4 -4
- package/dist/components/ds-card-data-viz.js +2 -0
- package/dist/components/ds-card-data-viz.js.map +1 -0
- package/dist/components/ds-card-overview.js +1 -1
- package/dist/components/ds-card-overview.js.map +1 -1
- package/dist/components/ds-card-setting.js +1 -1
- package/dist/components/ds-chart-bar.js +1 -1
- package/dist/components/ds-chart-bar.js.map +1 -1
- package/dist/components/ds-chart-donut.js +1 -1
- package/dist/components/ds-chart-legend.js +1 -1
- package/dist/components/ds-chart-legend.js.map +1 -1
- package/dist/components/ds-chart-line.js +1 -1
- package/dist/components/ds-chart-line.js.map +1 -1
- package/dist/components/ds-checkbox.js +1 -1
- package/dist/components/ds-chip.js +1 -1
- package/dist/components/ds-code-block.js +1 -1
- package/dist/components/ds-conversation-list-item.js +1 -1
- package/dist/components/ds-conversation-list-item.js.map +1 -1
- package/dist/components/ds-conversation-list-section.js +1 -1
- package/dist/components/ds-conversation-list.js +1 -1
- package/dist/components/ds-divider.js +1 -1
- package/dist/components/ds-empty-state.js +1 -1
- package/dist/components/ds-field.js +1 -1
- package/dist/components/ds-input.js +1 -1
- package/dist/components/ds-input.js.map +1 -1
- package/dist/components/ds-markdown.js +1 -1
- package/dist/components/ds-menu.js +1 -1
- package/dist/components/ds-message-bubble.js +1 -1
- package/dist/components/ds-message-composer.js +1 -1
- package/dist/components/ds-message-composer.js.map +1 -1
- package/dist/components/ds-message-scroller.js +1 -1
- package/dist/components/ds-message.js +1 -1
- package/dist/components/ds-mobile-bar-nav.js +1 -1
- package/dist/components/ds-mobile-bar-nav.js.map +1 -1
- package/dist/components/ds-mobile-header.js +1 -1
- package/dist/components/ds-mobile-section-switcher.js +1 -1
- package/dist/components/ds-mobile-sheet-nav.js +1 -1
- package/dist/components/ds-mobile-sheet-nav.js.map +1 -1
- package/dist/components/ds-modal.js +1 -1
- package/dist/components/ds-panel-nav.js +1 -1
- package/dist/components/ds-panel-nav.js.map +1 -1
- package/dist/components/ds-panel-sub-nav.js +1 -1
- package/dist/components/ds-panel-tool-header.js +1 -1
- package/dist/components/ds-panel-tool-search.js +1 -1
- package/dist/components/ds-panel-tools.js +1 -1
- package/dist/components/ds-radio.js +1 -1
- package/dist/components/ds-radio.js.map +1 -1
- package/dist/components/ds-scroll-overlay.js +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-app.js +1 -1
- package/dist/components/ds-shell-app.js.map +1 -1
- package/dist/components/ds-shell-page.js +1 -1
- package/dist/components/ds-shell-page.js.map +1 -1
- package/dist/components/ds-shell-tools.js +1 -1
- package/dist/components/ds-shell-tools.js.map +1 -1
- package/dist/components/ds-skeleton.js +1 -1
- package/dist/components/ds-slider.js +1 -1
- package/dist/components/ds-slider.js.map +1 -1
- package/dist/components/ds-swatch-picker.js +1 -1
- package/dist/components/ds-switch.js +1 -1
- package/dist/components/ds-tab-group.js +1 -1
- package/dist/components/ds-tag.js +1 -1
- package/dist/components/ds-text.js +1 -1
- package/dist/components/ds-toast.js +1 -1
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/ds-tooltip.js +1 -1
- package/dist/components/ds-typing-indicator.js +1 -1
- package/dist/components/{p-DB9XJm2c.js → p-6qXDqCj_.js} +2 -2
- package/dist/components/{p-CPwpgUWT.js → p-Ay1AX7Ql.js} +2 -2
- package/dist/components/p-Ay1AX7Ql.js.map +1 -0
- package/dist/components/p-B-qDb_Zo.js +2 -0
- package/dist/components/p-B-qDb_Zo.js.map +1 -0
- package/dist/components/{p-DhLmoCe_.js → p-B1cbQ0SG.js} +2 -2
- package/dist/components/p-BBxcMVqk.js +2 -0
- package/dist/components/p-BBxcMVqk.js.map +1 -0
- package/dist/components/{p-BKOlvCGS.js → p-BUZXuod2.js} +2 -2
- package/dist/components/{p-Utr23NC-.js → p-BaUsq_VK.js} +2 -2
- package/dist/components/p-BbMJTilO.js +2 -0
- package/dist/components/p-BbMJTilO.js.map +1 -0
- package/dist/components/{p-BO5aqZcf.js → p-BcTYhmku.js} +2 -2
- package/dist/components/p-Bkv3UjZz.js +2 -0
- package/dist/components/p-Bkv3UjZz.js.map +1 -0
- package/dist/components/p-BnQXAbif.js +2 -0
- package/dist/components/p-BnQXAbif.js.map +1 -0
- package/dist/components/p-BnbbnuVC.js +2 -0
- package/dist/components/p-BnbbnuVC.js.map +1 -0
- package/dist/components/{p-BlHzmszE.js → p-BroVnDzE.js} +2 -2
- package/dist/components/{p-BFRMwl93.js → p-BsoqsbBh.js} +2 -2
- package/dist/components/p-BwT6B5Fi.js +2 -0
- package/dist/components/p-BwT6B5Fi.js.map +1 -0
- package/dist/components/p-BybqPD8K.js +2 -0
- package/dist/components/p-BybqPD8K.js.map +1 -0
- package/dist/components/p-C-vRkDyn.js +2 -0
- package/dist/components/p-C-vRkDyn.js.map +1 -0
- package/dist/components/p-C3ArcO50.js +2 -0
- package/dist/components/p-C3ArcO50.js.map +1 -0
- package/dist/components/p-C4uYvyq6.js +2 -0
- package/dist/components/p-C4uYvyq6.js.map +1 -0
- package/dist/components/{p-ukB-dPOK.js → p-CBazaRlE.js} +2 -2
- package/dist/components/{p-CNgPwd11.js → p-CHuh71-U.js} +2 -2
- package/dist/components/{p-D9u1_OEZ.js → p-CMWata9g.js} +2 -2
- package/dist/components/p-CS6CHlHK.js +2 -0
- package/dist/components/p-CS6CHlHK.js.map +1 -0
- package/dist/components/p-CTTnM7cE.js +2 -0
- package/dist/components/p-CTTnM7cE.js.map +1 -0
- package/dist/components/{p-CsX3ICz7.js → p-CWoXKe_h.js} +2 -2
- package/dist/components/p-CWoXKe_h.js.map +1 -0
- package/dist/components/p-CwwuSGER.js +2 -0
- package/dist/components/p-CwwuSGER.js.map +1 -0
- package/dist/components/p-D09HINr_.js +2 -0
- package/dist/components/p-D09HINr_.js.map +1 -0
- package/dist/components/p-D2xWcVv6.js +2 -0
- package/dist/components/p-D2xWcVv6.js.map +1 -0
- package/dist/components/p-DAW6G8Sl.js +2 -0
- package/dist/components/p-DAW6G8Sl.js.map +1 -0
- package/dist/components/p-DEaszb15.js +2 -0
- package/dist/components/p-DEaszb15.js.map +1 -0
- package/dist/components/{p-BgGP65Nn.js → p-DOUk4KoT.js} +1 -1
- package/dist/components/p-DOUk4KoT.js.map +1 -0
- package/dist/components/p-DbQr7Kwr.js +2 -0
- package/dist/components/p-DbQr7Kwr.js.map +1 -0
- package/dist/components/p-DdvEZyX4.js +2 -0
- package/dist/components/p-DdvEZyX4.js.map +1 -0
- package/dist/components/{p-38PfdMkF.js → p-DeQwkbT1.js} +2 -2
- package/dist/components/{p-Vdufoj7G.js → p-Df17mJqI.js} +2 -2
- package/dist/components/p-Dg1LBXJ2.js +2 -0
- package/dist/components/p-Dg1LBXJ2.js.map +1 -0
- package/dist/components/p-DsiCDzoF.js +2 -0
- package/dist/components/p-DsiCDzoF.js.map +1 -0
- package/dist/components/p-_DzUXA86.js +2 -0
- package/dist/components/p-_DzUXA86.js.map +1 -0
- package/dist/components/p-lyZNvRvO.js +2 -0
- package/dist/components/p-lyZNvRvO.js.map +1 -0
- package/dist/components/{p-69lHhJiX.js → p-ohsLFap_.js} +2 -2
- package/dist/components/{p-DjbTFy2B.js → p-ymtdhOU5.js} +1 -1
- package/dist/components/p-ymtdhOU5.js.map +1 -0
- package/dist/components/p-z5RIrXuX.js +2 -0
- package/dist/components/p-z5RIrXuX.js.map +1 -0
- package/dist/docs/components.json +1006 -2356
- package/dist/framework/angular.d.ts +0 -1
- package/dist/framework/angular.js +0 -1
- package/dist/lib/components/BarTitle/bar-title-types.d.ts +28 -0
- package/dist/lib/components/Breadcrumb/breadcrumb-types.d.ts +16 -0
- package/dist/lib/components/ButtonFilled/ButtonFilled.d.ts +83 -0
- package/dist/lib/components/MobileHeader/mobile-header-types.d.ts +4 -0
- package/dist/lib/components/PanelTools/panel-tools-types.d.ts +21 -7
- package/dist/lib/components/ShellApp/shell-app-types.d.ts +91 -0
- package/dist/lib/shell/index.d.ts +5 -13
- package/dist/lib/shell/index.js +87 -358
- package/dist/lib/shell/index.js.map +3 -3
- package/dist/lib/shell/shell-responsive.d.ts +2 -1
- package/dist/lib/utils/button-render.d.ts +17 -0
- package/dist/lib/utils/button-types.d.ts +10 -0
- package/dist/lib/utils/choice-list.d.ts +25 -0
- package/dist/lib/utils/control-press.d.ts +8 -0
- package/dist/lib/utils/form-association.d.ts +22 -0
- package/dist/lib/utils/index.d.ts +4 -0
- package/dist/lib/utils/index.js +63 -0
- package/dist/lib/utils/index.js.map +3 -3
- package/dist/lib/utils/required-validity.d.ts +1 -1
- package/dist/lib/utils/safe-url.d.ts +11 -0
- package/dist/mcp/cli.js +38 -10
- package/dist/mcp-data/registry/agent-source-list.json +1 -1
- package/dist/mcp-data/registry/attachment-list.json +1 -1
- package/dist/mcp-data/registry/bar-nav.json +3 -21
- package/dist/mcp-data/registry/breadcrumb.json +1 -1
- package/dist/mcp-data/registry/button-filled.json +4 -19
- package/dist/mcp-data/registry/button-unfilled.json +14 -11
- package/dist/mcp-data/registry/card-data-viz.json +241 -0
- package/dist/mcp-data/registry/card-overview.json +87 -16
- package/dist/mcp-data/registry/card-setting.json +2 -2
- package/dist/mcp-data/registry/chart-bar.json +66 -18
- package/dist/mcp-data/registry/chart-donut.json +5 -5
- package/dist/mcp-data/registry/chart-legend.json +7 -9
- package/dist/mcp-data/registry/chart-line.json +1 -2
- package/dist/mcp-data/registry/checkbox.json +2 -2
- package/dist/mcp-data/registry/conversation-list-item.json +1 -1
- package/dist/mcp-data/registry/field.json +2 -3
- package/dist/mcp-data/registry/input.json +1 -1
- package/dist/mcp-data/registry/markdown.json +1 -1
- package/dist/mcp-data/registry/menu.json +10 -21
- package/dist/mcp-data/registry/mobile-bar-nav.json +1 -1
- package/dist/mcp-data/registry/mobile-header.json +1 -37
- package/dist/mcp-data/registry/mobile-section-switcher.json +1 -19
- package/dist/mcp-data/registry/panel-nav.json +2 -2
- package/dist/mcp-data/registry/panel-tool-search.json +1 -1
- package/dist/mcp-data/registry/panel-tools.json +19 -55
- package/dist/mcp-data/registry/radio.json +1 -1
- package/dist/mcp-data/registry/registry.json +309 -1174
- package/dist/mcp-data/registry/select.json +59 -25
- package/dist/mcp-data/registry/shell-app.json +345 -20
- package/dist/mcp-data/registry/shell-page.json +1 -1
- package/dist/mcp-data/registry/shell-tools.json +12 -43
- package/dist/mcp-data/registry/slider.json +1 -1
- package/dist/mcp-data/registry/switch.json +1 -1
- package/dist/mcp-data/registry/text.json +2 -2
- package/dist/react/components.d.ts +1 -8
- package/dist/react/components.js +1 -8
- package/dist/react/ds-card-data-viz.d.ts +12 -0
- package/dist/react/ds-card-data-viz.js +12 -0
- package/dist/react/ds-menu.d.ts +1 -2
- package/dist/react/ds-menu.js +0 -1
- package/dist/react/ds-select.d.ts +2 -2
- package/dist/react/ds-shell-app.d.ts +24 -1
- package/dist/react/ds-shell-app.js +16 -1
- package/dist/types/components/AgentSourceList/AgentSourceList.d.ts +0 -1
- package/dist/types/components/BarNav/BarNav.d.ts +0 -2
- package/dist/types/components/BarNav/bar-nav-utils.d.ts +2 -4
- package/dist/types/components/ButtonFilled/ButtonFilled.d.ts +5 -11
- package/dist/types/components/ButtonUnfilled/ButtonUnfilled.d.ts +13 -10
- package/dist/types/components/CardDataViz/CardDataViz.d.ts +32 -0
- package/dist/types/components/CardDataViz/index.d.ts +2 -0
- package/dist/types/components/CardOverview/CardOverview.d.ts +25 -3
- package/dist/types/components/CardOverview/card-overview-controller.d.ts +16 -0
- package/dist/types/components/CardOverview/card-overview-types.d.ts +2 -0
- package/dist/types/components/CardOverview/index.d.ts +1 -1
- package/dist/types/components/ChartBar/ChartBar.d.ts +12 -1
- package/dist/types/components/ChartBar/index.d.ts +2 -1
- package/dist/types/components/Menu/Menu.d.ts +0 -5
- package/dist/types/components/Menu/menu-sections.d.ts +4 -0
- package/dist/types/components/Menu/menu-types.d.ts +2 -11
- package/dist/types/components/MobileHeader/MobileHeader.d.ts +0 -5
- package/dist/types/components/MobileSectionSwitcher/MobileSectionSwitcher.d.ts +0 -2
- package/dist/types/components/PanelTools/PanelTools.d.ts +0 -4
- package/dist/types/components/PanelTools/index.d.ts +1 -1
- package/dist/types/components/PanelTools/panel-tools-types.d.ts +21 -7
- package/dist/types/components/PanelTools/panel-tools-utils.d.ts +1 -1
- package/dist/types/components/Select/Select.d.ts +12 -4
- package/dist/types/components/Select/index.d.ts +1 -1
- package/dist/types/components/ShellApp/ShellApp.d.ts +98 -0
- package/dist/types/components/ShellApp/shell-app-types.d.ts +92 -0
- package/dist/types/components/ShellPage/ShellPage.d.ts +5 -0
- package/dist/types/components/ShellTools/ShellTools.d.ts +2 -2
- package/dist/types/components.d.ts +238 -895
- package/dist/types/shell/index.d.ts +5 -13
- package/dist/types/shell/shell-responsive.d.ts +2 -1
- package/dist/types/utils/anchored-position-controller.d.ts +9 -0
- package/dist/types/utils/button-render.d.ts +18 -0
- package/dist/types/utils/button-story-foundation.d.ts +9 -0
- package/dist/types/utils/button-types.d.ts +11 -0
- package/dist/types/utils/form-association.d.ts +23 -0
- package/dist/types/utils/index.d.ts +4 -0
- package/dist/types/utils/required-validity.d.ts +1 -1
- package/dist/types/utils/safe-url.d.ts +12 -0
- package/dist/types/utils/select-controller.d.ts +1 -1
- package/package.json +16 -8
- package/dist/.build-stamp +0 -1
- package/dist/angular/ds-card-data-viz-bar.d.ts +0 -18
- package/dist/angular/ds-card-data-viz-bar.js +0 -42
- package/dist/angular/ds-card-data-viz-donut.d.ts +0 -18
- package/dist/angular/ds-card-data-viz-line.d.ts +0 -18
- package/dist/angular/ds-card-data-viz-line.js +0 -42
- package/dist/angular/ds-card-shell-data-viz.d.ts +0 -12
- package/dist/angular/ds-card-shell-data-viz.js +0 -38
- package/dist/angular/ds-chart-bar-stacked.d.ts +0 -12
- package/dist/angular/ds-chart-bar-stacked.js +0 -38
- package/dist/angular/ds-select-multi.d.ts +0 -28
- package/dist/angular/ds-select-multi.js +0 -49
- package/dist/angular/ds-shell-gradient-picker.d.ts +0 -16
- package/dist/angular/ds-shell-gradient-picker.js +0 -42
- package/dist/angular/ds-shell-gradient-swatch.d.ts +0 -16
- package/dist/angular/ds-shell-gradient-swatch.js +0 -42
- package/dist/components/ds-card-data-viz-bar.d.ts +0 -11
- package/dist/components/ds-card-data-viz-bar.js +0 -2
- package/dist/components/ds-card-data-viz-bar.js.map +0 -1
- package/dist/components/ds-card-data-viz-donut.d.ts +0 -11
- package/dist/components/ds-card-data-viz-donut.js +0 -2
- package/dist/components/ds-card-data-viz-donut.js.map +0 -1
- package/dist/components/ds-card-data-viz-line.d.ts +0 -11
- package/dist/components/ds-card-data-viz-line.js +0 -2
- package/dist/components/ds-card-data-viz-line.js.map +0 -1
- package/dist/components/ds-card-shell-data-viz.d.ts +0 -11
- package/dist/components/ds-card-shell-data-viz.js +0 -2
- package/dist/components/ds-card-shell-data-viz.js.map +0 -1
- package/dist/components/ds-chart-bar-stacked.d.ts +0 -11
- package/dist/components/ds-chart-bar-stacked.js +0 -2
- package/dist/components/ds-chart-bar-stacked.js.map +0 -1
- package/dist/components/ds-select-multi.js +0 -2
- package/dist/components/ds-select-multi.js.map +0 -1
- package/dist/components/ds-shell-gradient-picker.d.ts +0 -11
- package/dist/components/ds-shell-gradient-picker.js +0 -2
- package/dist/components/ds-shell-gradient-picker.js.map +0 -1
- package/dist/components/ds-shell-gradient-swatch.d.ts +0 -11
- package/dist/components/ds-shell-gradient-swatch.js +0 -2
- package/dist/components/ds-shell-gradient-swatch.js.map +0 -1
- package/dist/components/p-2foAUsDN.js +0 -2
- package/dist/components/p-2foAUsDN.js.map +0 -1
- package/dist/components/p-B6NvVdeO.js +0 -2
- package/dist/components/p-B6NvVdeO.js.map +0 -1
- package/dist/components/p-B6vE3ujd.js +0 -2
- package/dist/components/p-B6vE3ujd.js.map +0 -1
- package/dist/components/p-BBePKRHC.js +0 -2
- package/dist/components/p-BBePKRHC.js.map +0 -1
- package/dist/components/p-BOQnc-M4.js +0 -2
- package/dist/components/p-BOQnc-M4.js.map +0 -1
- package/dist/components/p-BXaieghV.js +0 -2
- package/dist/components/p-BXaieghV.js.map +0 -1
- package/dist/components/p-BgGP65Nn.js.map +0 -1
- package/dist/components/p-BrusnEYP.js +0 -2
- package/dist/components/p-BrusnEYP.js.map +0 -1
- package/dist/components/p-By_s1wNN.js +0 -2
- package/dist/components/p-By_s1wNN.js.map +0 -1
- package/dist/components/p-C61yJkfr.js +0 -2
- package/dist/components/p-C61yJkfr.js.map +0 -1
- package/dist/components/p-CH3w-P2H.js +0 -2
- package/dist/components/p-CH3w-P2H.js.map +0 -1
- package/dist/components/p-CNjOyUQu.js +0 -2
- package/dist/components/p-CNjOyUQu.js.map +0 -1
- package/dist/components/p-CPwpgUWT.js.map +0 -1
- package/dist/components/p-CU2673IJ.js +0 -2
- package/dist/components/p-CU2673IJ.js.map +0 -1
- package/dist/components/p-CsX3ICz7.js.map +0 -1
- package/dist/components/p-D0e77tkd.js +0 -2
- package/dist/components/p-D0e77tkd.js.map +0 -1
- package/dist/components/p-D1HFMTdC.js +0 -2
- package/dist/components/p-D1HFMTdC.js.map +0 -1
- package/dist/components/p-D1bNvIpb.js +0 -2
- package/dist/components/p-D1bNvIpb.js.map +0 -1
- package/dist/components/p-D2x17ei-.js +0 -2
- package/dist/components/p-D2x17ei-.js.map +0 -1
- package/dist/components/p-DIFUsoM-.js +0 -2
- package/dist/components/p-DIFUsoM-.js.map +0 -1
- package/dist/components/p-DjbTFy2B.js.map +0 -1
- package/dist/components/p-DmAHufd5.js +0 -2
- package/dist/components/p-DmAHufd5.js.map +0 -1
- package/dist/components/p-DzM3SzPz.js +0 -2
- package/dist/components/p-DzM3SzPz.js.map +0 -1
- package/dist/components/p-G3qIxpQj.js +0 -2
- package/dist/components/p-G3qIxpQj.js.map +0 -1
- package/dist/components/p-Re2kPrXm.js +0 -2
- package/dist/components/p-Re2kPrXm.js.map +0 -1
- package/dist/components/p-huw1oRbt.js +0 -2
- package/dist/components/p-huw1oRbt.js.map +0 -1
- package/dist/framework/select-multi-value-accessor.d.ts +0 -9
- package/dist/framework/select-multi-value-accessor.js +0 -40
- package/dist/lib/shell/badge-gradient-ring.d.ts +0 -27
- package/dist/lib/shell/chrome-transition.d.ts +0 -32
- package/dist/lib/shell/shell-chrome-metrics.d.ts +0 -11
- package/dist/lib/shell/shell-gradient.d.ts +0 -41
- package/dist/lib/shell/shell-view-transition.d.ts +0 -23
- package/dist/mcp-data/registry/card-data-viz-bar.json +0 -213
- package/dist/mcp-data/registry/card-data-viz-donut.json +0 -214
- package/dist/mcp-data/registry/card-data-viz-line.json +0 -207
- package/dist/mcp-data/registry/card-shell-data-viz.json +0 -180
- package/dist/mcp-data/registry/chart-bar-stacked.json +0 -230
- package/dist/mcp-data/registry/select-multi.json +0 -758
- package/dist/mcp-data/registry/shell-gradient-picker.json +0 -195
- package/dist/mcp-data/registry/shell-gradient-swatch.json +0 -215
- package/dist/react/ds-card-data-viz-bar.d.ts +0 -12
- package/dist/react/ds-card-data-viz-bar.js +0 -12
- package/dist/react/ds-card-data-viz-donut.d.ts +0 -12
- package/dist/react/ds-card-data-viz-donut.js +0 -12
- package/dist/react/ds-card-data-viz-line.d.ts +0 -12
- package/dist/react/ds-card-data-viz-line.js +0 -12
- package/dist/react/ds-card-shell-data-viz.d.ts +0 -9
- package/dist/react/ds-card-shell-data-viz.js +0 -12
- package/dist/react/ds-chart-bar-stacked.d.ts +0 -9
- package/dist/react/ds-chart-bar-stacked.js +0 -12
- package/dist/react/ds-select-multi.d.ts +0 -14
- package/dist/react/ds-select-multi.js +0 -16
- package/dist/react/ds-shell-gradient-picker.d.ts +0 -12
- package/dist/react/ds-shell-gradient-picker.js +0 -12
- package/dist/react/ds-shell-gradient-swatch.d.ts +0 -12
- package/dist/react/ds-shell-gradient-swatch.js +0 -12
- package/dist/types/components/CardDataVizBar/CardDataVizBar.d.ts +0 -24
- package/dist/types/components/CardDataVizBar/index.d.ts +0 -2
- package/dist/types/components/CardDataVizDonut/CardDataVizDonut.d.ts +0 -28
- package/dist/types/components/CardDataVizDonut/index.d.ts +0 -2
- package/dist/types/components/CardDataVizLine/CardDataVizLine.d.ts +0 -24
- package/dist/types/components/CardDataVizLine/index.d.ts +0 -2
- package/dist/types/components/CardShellDataViz/CardShellDataViz.d.ts +0 -13
- package/dist/types/components/CardShellDataViz/index.d.ts +0 -2
- package/dist/types/components/ChartBarStacked/ChartBarStacked.d.ts +0 -26
- package/dist/types/components/ChartBarStacked/index.d.ts +0 -3
- package/dist/types/components/SelectMulti/SelectMulti.d.ts +0 -121
- package/dist/types/components/SelectMulti/index.d.ts +0 -2
- package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +0 -12
- package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +0 -15
- package/dist/types/components/ShellGradientSwatch/shell-gradient-swatch-types.d.ts +0 -4
- /package/dist/components/{p-DB9XJm2c.js.map → p-6qXDqCj_.js.map} +0 -0
- /package/dist/components/{p-DhLmoCe_.js.map → p-B1cbQ0SG.js.map} +0 -0
- /package/dist/components/{p-BKOlvCGS.js.map → p-BUZXuod2.js.map} +0 -0
- /package/dist/components/{p-Utr23NC-.js.map → p-BaUsq_VK.js.map} +0 -0
- /package/dist/components/{p-BO5aqZcf.js.map → p-BcTYhmku.js.map} +0 -0
- /package/dist/components/{p-BlHzmszE.js.map → p-BroVnDzE.js.map} +0 -0
- /package/dist/components/{p-BFRMwl93.js.map → p-BsoqsbBh.js.map} +0 -0
- /package/dist/components/{p-ukB-dPOK.js.map → p-CBazaRlE.js.map} +0 -0
- /package/dist/components/{p-CNgPwd11.js.map → p-CHuh71-U.js.map} +0 -0
- /package/dist/components/{p-D9u1_OEZ.js.map → p-CMWata9g.js.map} +0 -0
- /package/dist/components/{p-38PfdMkF.js.map → p-DeQwkbT1.js.map} +0 -0
- /package/dist/components/{p-Vdufoj7G.js.map → p-Df17mJqI.js.map} +0 -0
- /package/dist/components/{p-69lHhJiX.js.map → p-ohsLFap_.js.map} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,h as a,a as t,t as i}from"./index.js";import{d}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,h as a,a as t,t as i}from"./index.js";import{d}from"./p-Ay1AX7Ql.js";const n=()=>`.sc-ds-message-h{display:block;box-sizing:border-box;content-visibility:auto;contain-intrinsic-size:auto var(--dimension-size-800);-webkit-user-select:none;user-select:none}.message-host--group-middle.sc-ds-message-h,.message-host--group-last.sc-ds-message-h{margin-block-start:calc(var(--dimension-space-050) - var(--dimension-space-300))}.message.sc-ds-message{display:grid;grid-template-columns:minmax(0, 1fr) auto;align-items:end;gap:0;width:100%;box-sizing:border-box}.message--outgoing.sc-ds-message{grid-template-columns:minmax(0, 1fr) auto}.message__header.sc-ds-message:empty,.message__footer.sc-ds-message:empty,.message__actions.sc-ds-message:empty{display:none}.message__actions.sc-ds-message:not(:empty){margin-inline-start:var(--dimension-space-075)}.message__body.sc-ds-message{display:flex;flex-direction:column;min-width:0;gap:var(--dimension-space-050)}.message--incoming.sc-ds-message .message__body.sc-ds-message{width:100%}.message--outgoing.sc-ds-message .message__body.sc-ds-message{align-items:flex-end}.message--outgoing.sc-ds-message .message__header.sc-ds-message{display:none}.message--system.sc-ds-message .message__body.sc-ds-message{align-items:center}.message__header.sc-ds-message,.message__footer.sc-ds-message,.message__actions.sc-ds-message{display:flex;align-items:center;gap:var(--dimension-space-050)}.message__content.sc-ds-message{width:100%;min-width:0;-webkit-user-select:text;user-select:text}.message--outgoing.sc-ds-message .message__content.sc-ds-message{display:flex;justify-content:flex-end}.message__footer.sc-ds-message time.sc-ds-message{display:inline-flex}.message--group-middle.sc-ds-message .message__header.sc-ds-message,.message--group-last.sc-ds-message .message__header.sc-ds-message{display:none}.message--group-first.sc-ds-message .message__footer.sc-ds-message,.message--group-middle.sc-ds-message .message__footer.sc-ds-message{display:none}`;const c={sending:"Sending",sent:"Sent",delivered:"Delivered",read:"Read",failed:"Failed to send"};const m=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.messageId="";this.direction="incoming";this.groupPosition="single";this.author="";this.showAuthor=true;this.timestamp="";this.streaming=false;this.scrollAnchor=false}formattedTimestamp(){if(!this.timestamp)return"";const e=Date.parse(this.timestamp);if(Number.isNaN(e))return this.timestamp;return new Intl.DateTimeFormat(undefined,{hour:"numeric",minute:"2-digit"}).format(new Date(e))}render(){const e=this.deliveryState?c[this.deliveryState]:"";const s=this.formattedTimestamp();return a(t,{key:"02650aa73a12be1040165b470840315e17a29391",class:`message-host--group-${this.groupPosition}`,"data-message-id":this.messageId||undefined,"data-scroll-anchor":this.scrollAnchor?"true":undefined,"aria-busy":this.streaming?"true":undefined},a("article",{key:"56f3cb7580cd163206a8b230d14d1bedec46c7cd",class:{message:true,[`message--${this.direction}`]:true,[`message--group-${this.groupPosition}`]:true},"aria-label":this.author?`Message from ${this.author}`:"Message"},a("div",{key:"5442f9e927e357e30854a673624f69287c3579e8",class:"message__body"},a("div",{key:"509c5d39ad6e14a1cac901977f7fd9b2a7894ffe",class:"message__header"},a("slot",{key:"63e9f398213a69e06ac7cef9cb2dc5d0500bad1e",name:"header"}),this.author&&this.showAuthor?a("ds-text",{as:"span",variant:"text-body-small",emphasis:true,color:"primary"},this.author):null),a("div",{key:"e1e30acca4c8094d4c7bec41ddb731ae27d83584",class:"message__content"},a("slot",{key:"b1e5d3010be6a3adf1322dec6c000ac8600aea42"})),a("div",{key:"cdbe4e1c1ec457bf9cefa22cae6faad04cb44369",class:"message__footer"},a("slot",{key:"f473303e22698c99733a3ceeeabecb8428a25e02",name:"footer"}),e?a("ds-text",{as:"span",variant:"text-caption",color:this.deliveryState==="failed"?"negative":"secondary"},e):null,this.deliveryState==="failed"&&s?a("ds-text",{as:"span",variant:"text-caption",color:"tertiary","aria-hidden":"true"},"·"):null,s?a("time",{dateTime:this.timestamp},a("ds-text",{as:"span",variant:"text-caption",color:"secondary"},s)):null)),a("div",{key:"85e128c5a9b392bb68cc7c2b7161215fe0de3e92",class:"message__actions"},a("slot",{key:"15c3dabf43498ae978b8e60131bfe7745cef98ec",name:"actions"}))))}static get style(){return n()}},[262,"ds-message",{messageId:[513,"message-id"],direction:[513],groupPosition:[1,"group-position"],author:[1],showAuthor:[4,"show-author"],timestamp:[1],deliveryState:[1,"delivery-state"],streaming:[4],scrollAnchor:[516,"scroll-anchor"]}]);function o(){if(typeof customElements==="undefined"){return}const e=["ds-message","ds-text"];e.forEach((e=>{switch(e){case"ds-message":if(!customElements.get(i(e))){customElements.define(i(e),m)}break;case"ds-text":if(!customElements.get(i(e))){d()}break}}))}o();export{m as M,o as d};
|
|
2
|
+
//# sourceMappingURL=p-6qXDqCj_.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as t,H as e,h as s,a as r,t as i}from"./index.js";function a(t){return`ds-text--${t.replace(/^text-/,"")}`}function d(t){return t==="span"||t==="label"?"ds-text--inline-box":"ds-text--block-box"}const o=()=>`.ds-text--display-medium.sc-ds-text-h,.ds-text--display-medium.sc-ds-text{font-size:var(--typography-fontsize-3xl);line-height:var(--typography-lineheight-3xl)}.ds-text--display-small.sc-ds-text-h,.ds-text--display-small.sc-ds-text{font-size:var(--typography-fontsize-2xl);line-height:var(--typography-lineheight-2xl)}.ds-text--title-large.sc-ds-text-h,.ds-text--title-large.sc-ds-text{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl)}.ds-text--title-medium.sc-ds-text-h,.ds-text--title-medium.sc-ds-text{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--title-small.sc-ds-text-h,.ds-text--title-small.sc-ds-text{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-large.sc-ds-text-h,.ds-text--body-large.sc-ds-text{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--body-medium.sc-ds-text-h,.ds-text--body-medium.sc-ds-text{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-small.sc-ds-text-h,.ds-text--body-small.sc-ds-text{font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm)}.ds-text--caption.sc-ds-text-h,.ds-text--caption.sc-ds-text{font-size:var(--typography-fontsize-xs);line-height:var(--typography-lineheight-xs);text-transform:uppercase}.ds-text--display-medium.ds-text--emphasis.sc-ds-text-h,.ds-text--display-small.ds-text--emphasis.sc-ds-text-h,.ds-text--display-medium.ds-text--emphasis.sc-ds-text,.ds-text--display-small.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-bold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--display-medium.ds-text--regular.sc-ds-text-h,.ds-text--display-small.ds-text--regular.sc-ds-text-h,.ds-text--display-medium.ds-text--regular.sc-ds-text,.ds-text--display-small.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-large.ds-text--emphasis.sc-ds-text-h,.ds-text--title-large.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--title-large.ds-text--regular.sc-ds-text-h,.ds-text--title-large.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--emphasis.sc-ds-text-h,.ds-text--title-small.ds-text--emphasis.sc-ds-text-h,.ds-text--title-medium.ds-text--emphasis.sc-ds-text,.ds-text--title-small.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--regular.sc-ds-text-h,.ds-text--title-small.ds-text--regular.sc-ds-text-h,.ds-text--title-medium.ds-text--regular.sc-ds-text,.ds-text--title-small.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-large.ds-text--emphasis.sc-ds-text-h,.ds-text--body-medium.ds-text--emphasis.sc-ds-text-h,.ds-text--body-large.ds-text--emphasis.sc-ds-text,.ds-text--body-medium.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--body-large.ds-text--regular.sc-ds-text-h,.ds-text--body-medium.ds-text--regular.sc-ds-text-h,.ds-text--body-large.ds-text--regular.sc-ds-text,.ds-text--body-medium.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--emphasis.sc-ds-text-h,.ds-text--body-small.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--regular.sc-ds-text-h,.ds-text--body-small.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-none)}.ds-text--caption.ds-text--emphasis.sc-ds-text-h,.ds-text--caption.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-positive)}.ds-text--caption.ds-text--regular.sc-ds-text-h,.ds-text--caption.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-positive)}@keyframes ds-shimmer-text-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}@keyframes ds-shimmer-surface-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}.ds-shimmer-text.sc-ds-text{--ds-shimmer-base:currentColor;--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );background-color:var(--ds-shimmer-base);background-image:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:ds-shimmer-text-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}.ds-shimmer-surface.sc-ds-text{--ds-shimmer-surface-base:var(--color-foreground-quaternary);--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );position:relative;overflow:hidden;background-color:var(--ds-shimmer-surface-base)}.ds-shimmer-surface.sc-ds-text::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;animation:ds-shimmer-surface-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}@media (prefers-reduced-motion: reduce){.ds-shimmer-text.sc-ds-text{animation:none;background-image:none;-webkit-text-fill-color:currentColor}.ds-shimmer-surface.sc-ds-text::after{display:none;animation:none}}.sc-ds-text-h{box-sizing:border-box;max-width:100%;min-width:0;margin:0;padding:0;border:0;font-family:var(--typography-font-family)}.sc-ds-text-h:where(.ds-text--inline-box){display:inline-block}.sc-ds-text-h:where(.ds-text--block-box){display:block;width:100%}.ds-text__element.sc-ds-text{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;border:0;font:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;text-transform:inherit;text-align:inherit;text-decoration:inherit;font-style:inherit;font-variant-numeric:inherit;font-feature-settings:inherit;-webkit-user-select:inherit;user-select:inherit;white-space:inherit;text-wrap:inherit;overflow-wrap:inherit;word-break:inherit;overflow:inherit;text-overflow:inherit}.ds-text--truncate-1.sc-ds-text-h{overflow:hidden}.ds-text--truncate-1.sc-ds-text-h .ds-text__element.sc-ds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ds-text--truncate-2.sc-ds-text-h,.ds-text--truncate-3.sc-ds-text-h,.ds-text--truncate-4.sc-ds-text-h,.ds-text--truncate-5.sc-ds-text-h{overflow:hidden}.ds-text--truncate-2.sc-ds-text-h .ds-text__element.sc-ds-text,.ds-text--truncate-3.sc-ds-text-h .ds-text__element.sc-ds-text,.ds-text--truncate-4.sc-ds-text-h .ds-text__element.sc-ds-text,.ds-text--truncate-5.sc-ds-text-h .ds-text__element.sc-ds-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.ds-text--truncate-2.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:2}.ds-text--truncate-3.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:3}.ds-text--truncate-4.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:4}.ds-text--truncate-5.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:5}.ds-text--nowrap.sc-ds-text-h,.ds-text--nowrap.sc-ds-text-h .ds-text__element.sc-ds-text{white-space:nowrap;word-break:normal;overflow:hidden;text-overflow:ellipsis;min-width:0}.ds-text--balance.sc-ds-text-h,.ds-text--balance.sc-ds-text-h .ds-text__element.sc-ds-text{text-wrap:balance}.ds-text--pretty.sc-ds-text-h,.ds-text--pretty.sc-ds-text-h .ds-text__element.sc-ds-text{text-wrap:pretty}.ds-text--color-primary.sc-ds-text-h{color:var(--color-foreground-primary)}.ds-text--color-secondary.sc-ds-text-h{color:var(--color-foreground-secondary)}.ds-text--color-tertiary.sc-ds-text-h{color:var(--color-foreground-tertiary)}.ds-text--color-quaternary.sc-ds-text-h{color:var(--color-foreground-quaternary)}.ds-text--color-brand.sc-ds-text-h{color:var(--color-foreground-bold-brand)}.ds-text--color-negative.sc-ds-text-h{color:var(--color-foreground-bold-negative)}.ds-text--color-positive.sc-ds-text-h{color:var(--color-foreground-bold-positive)}.ds-text--color-warning.sc-ds-text-h{color:var(--color-foreground-bold-warning)}.ds-text--color-caution.sc-ds-text-h{color:var(--color-foreground-bold-caution)}.ds-text--color-ai.sc-ds-text-h{color:var(--color-foreground-bold-ai)}.ds-text--color-on-strong.sc-ds-text-h{color:var(--color-foreground-on-strong-background-primary)}.ds-text--color-on-bold.sc-ds-text-h{color:var(--color-foreground-on-bold-background-primary)}.ds-text--color-inherit.sc-ds-text-h{color:inherit}.ds-text--decoration-underline.sc-ds-text-h{text-decoration:underline;text-decoration-color:var(--color-foreground-tertiary);text-underline-offset:2px;text-decoration-thickness:1px}.ds-text--decoration-dotted-underline.sc-ds-text-h{text-decoration:underline dotted;text-decoration-color:var(--color-foreground-tertiary);text-underline-offset:2px;text-decoration-thickness:1px}.ds-text--italic.sc-ds-text-h{font-style:italic}.ds-text--font-feature-tabular-nums.sc-ds-text-h{font-variant-numeric:tabular-nums;font-feature-settings:'tnum'}.ds-text--align-left.sc-ds-text-h{text-align:left}.ds-text--align-center.sc-ds-text-h{text-align:center}.ds-text--align-right.sc-ds-text-h{text-align:right}`;const n=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.variant="text-body-medium";this.emphasis=false;this.color="inherit";this.italic=false;this.shimmer=false;this.lineTruncation="none";this.fontFeature="normal";this.as="p"}render(){const t=this.as;const e=t=>typeof t==="string"&&t.startsWith("var(--");const i=Number(this.lineTruncation);const o={"ds-text":true,[d(this.as)]:true,[a(this.variant)]:true,"ds-text--emphasis":this.emphasis,"ds-text--regular":!this.emphasis,"ds-text--nowrap":this.wrap==="nowrap","ds-text--balance":this.wrap==="balance","ds-text--pretty":this.wrap==="pretty","ds-text--truncate-1":i===1&&this.wrap!=="nowrap","ds-text--truncate-2":i===2&&this.wrap!=="nowrap","ds-text--truncate-3":i===3&&this.wrap!=="nowrap","ds-text--truncate-4":i===4&&this.wrap!=="nowrap","ds-text--truncate-5":i===5&&this.wrap!=="nowrap","ds-text--color-primary":this.color==="primary","ds-text--color-secondary":this.color==="secondary","ds-text--color-tertiary":this.color==="tertiary","ds-text--color-quaternary":this.color==="quaternary","ds-text--color-brand":this.color==="brand","ds-text--color-negative":this.color==="negative","ds-text--color-positive":this.color==="positive","ds-text--color-warning":this.color==="warning","ds-text--color-caution":this.color==="caution","ds-text--color-ai":this.color==="ai","ds-text--color-on-strong":this.color==="on-strong","ds-text--color-on-bold":this.color==="on-bold","ds-text--color-inherit":this.color==="inherit","ds-text--decoration-underline":this.decoration==="underline","ds-text--decoration-dotted-underline":this.decoration==="dotted-underline","ds-text--italic":this.italic,"ds-text--align-left":this.align==="left","ds-text--align-center":this.align==="center","ds-text--align-right":this.align==="right","ds-text--font-feature-tabular-nums":this.fontFeature==="tabular-nums"};const n=this.color&&e(this.color)?{color:this.color}:undefined;const l={};if(this.as==="label"&&this.for)l["for"]=this.for;if(this.textId)l["id"]=this.textId;return s(r,{key:"9d858623dbbe0e6a7a1f401c15586507de34c240",class:o,style:n},s(t,{key:"25d4abe4f1df0764497cf7d5f35a91bcf7958375",class:{"ds-text__element":true,"ds-shimmer-text":this.shimmer},...l},s("slot",{key:"4162e73b50f54b014da0d38df279b44c72ff11b2"})))}static get style(){return o()}},[262,"ds-text",{variant:[1],emphasis:[4],color:[1],decoration:[1],italic:[4],shimmer:[4],align:[1],lineTruncation:[8,"line-truncation"],wrap:[1],fontFeature:[1,"font-feature"],as:[1],for:[1],textId:[1,"text-id"]}]);function l(){if(typeof customElements==="undefined"){return}const t=["ds-text"];t.forEach((t=>{switch(t){case"ds-text":if(!customElements.get(i(t))){customElements.define(i(t),n)}break}}))}l();export{n as T,l as d};
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as t,H as e,h as s,a as r,t as i}from"./index.js";function a(t){return`ds-text--${t.replace(/^text-/,"")}`}function d(t){return t==="span"||t==="label"?"ds-text--inline-box":"ds-text--block-box"}const o=()=>`.ds-text--display-medium.sc-ds-text-h,.ds-text--display-medium.sc-ds-text{font-size:var(--typography-fontsize-3xl);line-height:var(--typography-lineheight-3xl)}.ds-text--display-small.sc-ds-text-h,.ds-text--display-small.sc-ds-text{font-size:var(--typography-fontsize-2xl);line-height:var(--typography-lineheight-2xl)}.ds-text--title-large.sc-ds-text-h,.ds-text--title-large.sc-ds-text{font-size:var(--typography-fontsize-xl);line-height:var(--typography-lineheight-xl)}.ds-text--title-medium.sc-ds-text-h,.ds-text--title-medium.sc-ds-text{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--title-small.sc-ds-text-h,.ds-text--title-small.sc-ds-text{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-large.sc-ds-text-h,.ds-text--body-large.sc-ds-text{font-size:var(--typography-fontsize-lg);line-height:var(--typography-lineheight-lg)}.ds-text--body-medium.sc-ds-text-h,.ds-text--body-medium.sc-ds-text{font-size:var(--typography-fontsize-md);line-height:var(--typography-lineheight-md)}.ds-text--body-small.sc-ds-text-h,.ds-text--body-small.sc-ds-text{font-size:var(--typography-fontsize-sm);line-height:var(--typography-lineheight-sm)}.ds-text--caption.sc-ds-text-h,.ds-text--caption.sc-ds-text{font-size:var(--typography-fontsize-xs);line-height:var(--typography-lineheight-xs);text-transform:uppercase}.ds-text--display-medium.ds-text--emphasis.sc-ds-text-h,.ds-text--display-small.ds-text--emphasis.sc-ds-text-h,.ds-text--display-medium.ds-text--emphasis.sc-ds-text,.ds-text--display-small.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-bold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--display-medium.ds-text--regular.sc-ds-text-h,.ds-text--display-small.ds-text--regular.sc-ds-text-h,.ds-text--display-medium.ds-text--regular.sc-ds-text,.ds-text--display-small.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-large.ds-text--emphasis.sc-ds-text-h,.ds-text--title-large.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative-double)}.ds-text--title-large.ds-text--regular.sc-ds-text-h,.ds-text--title-large.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--emphasis.sc-ds-text-h,.ds-text--title-small.ds-text--emphasis.sc-ds-text-h,.ds-text--title-medium.ds-text--emphasis.sc-ds-text,.ds-text--title-small.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--title-medium.ds-text--regular.sc-ds-text-h,.ds-text--title-small.ds-text--regular.sc-ds-text-h,.ds-text--title-medium.ds-text--regular.sc-ds-text,.ds-text--title-small.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-large.ds-text--emphasis.sc-ds-text-h,.ds-text--body-medium.ds-text--emphasis.sc-ds-text-h,.ds-text--body-large.ds-text--emphasis.sc-ds-text,.ds-text--body-medium.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative)}.ds-text--body-large.ds-text--regular.sc-ds-text-h,.ds-text--body-medium.ds-text--regular.sc-ds-text-h,.ds-text--body-large.ds-text--regular.sc-ds-text,.ds-text--body-medium.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--emphasis.sc-ds-text-h,.ds-text--body-small.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-negative-half)}.ds-text--body-small.ds-text--regular.sc-ds-text-h,.ds-text--body-small.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-regular);letter-spacing:var(--typography-letterspacing-none)}.ds-text--caption.ds-text--emphasis.sc-ds-text-h,.ds-text--caption.ds-text--emphasis.sc-ds-text{font-weight:var(--typography-weight-semibold);letter-spacing:var(--typography-letterspacing-positive)}.ds-text--caption.ds-text--regular.sc-ds-text-h,.ds-text--caption.ds-text--regular.sc-ds-text{font-weight:var(--typography-weight-medium);letter-spacing:var(--typography-letterspacing-positive)}@keyframes ds-shimmer-text-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}@keyframes ds-shimmer-surface-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}.ds-shimmer-text.sc-ds-text{--ds-shimmer-base:currentColor;--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );background-color:var(--ds-shimmer-base);background-image:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:ds-shimmer-text-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}.ds-shimmer-surface.sc-ds-text{--ds-shimmer-surface-base:var(--color-foreground-quaternary);--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );position:relative;overflow:hidden;background-color:var(--ds-shimmer-surface-base)}.ds-shimmer-surface.sc-ds-text::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;animation:ds-shimmer-surface-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}@media (prefers-reduced-motion: reduce){.ds-shimmer-text.sc-ds-text{animation:none;background-image:none;-webkit-text-fill-color:currentColor}.ds-shimmer-surface.sc-ds-text::after{display:none;animation:none}}.sc-ds-text-h{box-sizing:border-box;max-width:100%;min-width:0;margin:0;padding:0;border:0;font-family:var(--typography-font-family)}.sc-ds-text-h:where(.ds-text--inline-box){display:inline-block}.sc-ds-text-h:where(.ds-text--block-box){display:block;width:100%}.ds-text__element.sc-ds-text{display:block;box-sizing:border-box;width:100%;min-width:0;margin:0;padding:0;border:0;font:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;text-transform:inherit;text-align:inherit;text-decoration:inherit;font-style:inherit;font-variant-numeric:inherit;font-feature-settings:inherit;-webkit-user-select:inherit;user-select:inherit;white-space:inherit;text-wrap:inherit;overflow-wrap:inherit;word-break:inherit;overflow:inherit;text-overflow:inherit}.ds-text--truncate-1.sc-ds-text-h{overflow:hidden}.ds-text--truncate-1.sc-ds-text-h .ds-text__element.sc-ds-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ds-text--truncate-2.sc-ds-text-h,.ds-text--truncate-3.sc-ds-text-h,.ds-text--truncate-4.sc-ds-text-h,.ds-text--truncate-5.sc-ds-text-h{overflow:hidden}.ds-text--truncate-2.sc-ds-text-h .ds-text__element.sc-ds-text,.ds-text--truncate-3.sc-ds-text-h .ds-text__element.sc-ds-text,.ds-text--truncate-4.sc-ds-text-h .ds-text__element.sc-ds-text,.ds-text--truncate-5.sc-ds-text-h .ds-text__element.sc-ds-text{display:-webkit-box;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;word-break:break-word}.ds-text--truncate-2.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:2}.ds-text--truncate-3.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:3}.ds-text--truncate-4.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:4}.ds-text--truncate-5.sc-ds-text-h .ds-text__element.sc-ds-text{-webkit-line-clamp:5}.ds-text--nowrap.sc-ds-text-h,.ds-text--nowrap.sc-ds-text-h .ds-text__element.sc-ds-text{white-space:nowrap;word-break:normal;overflow:hidden;text-overflow:ellipsis;min-width:0}.ds-text--balance.sc-ds-text-h,.ds-text--balance.sc-ds-text-h .ds-text__element.sc-ds-text{text-wrap:balance}.ds-text--pretty.sc-ds-text-h,.ds-text--pretty.sc-ds-text-h .ds-text__element.sc-ds-text{text-wrap:pretty}.ds-text--color-primary.sc-ds-text-h{color:var(--color-foreground-primary)}.ds-text--color-secondary.sc-ds-text-h{color:var(--color-foreground-secondary)}.ds-text--color-tertiary.sc-ds-text-h{color:var(--color-foreground-tertiary)}.ds-text--color-quaternary.sc-ds-text-h{color:var(--color-foreground-quaternary)}.ds-text--color-brand.sc-ds-text-h{color:var(--color-foreground-bold-brand)}.ds-text--color-negative.sc-ds-text-h{color:var(--color-foreground-bold-negative)}.ds-text--color-positive.sc-ds-text-h{color:var(--color-foreground-bold-positive)}.ds-text--color-warning.sc-ds-text-h{color:var(--color-foreground-bold-warning)}.ds-text--color-caution.sc-ds-text-h{color:var(--color-foreground-bold-caution)}.ds-text--color-ai.sc-ds-text-h{color:var(--color-foreground-bold-ai)}.ds-text--color-on-strong.sc-ds-text-h{color:var(--color-foreground-on-strong-background-primary)}.ds-text--color-on-bold.sc-ds-text-h{color:var(--color-foreground-on-bold-background-primary)}.ds-text--decoration-underline.sc-ds-text-h{text-decoration:underline;text-decoration-color:var(--color-foreground-tertiary);text-underline-offset:2px;text-decoration-thickness:1px}.ds-text--decoration-dotted-underline.sc-ds-text-h{text-decoration:underline dotted;text-decoration-color:var(--color-foreground-tertiary);text-underline-offset:2px;text-decoration-thickness:1px}.ds-text--italic.sc-ds-text-h{font-style:italic}.ds-text--font-feature-tabular-nums.sc-ds-text-h{font-variant-numeric:tabular-nums;font-feature-settings:'tnum'}.ds-text--align-left.sc-ds-text-h{text-align:left}.ds-text--align-center.sc-ds-text-h{text-align:center}.ds-text--align-right.sc-ds-text-h{text-align:right}`;const n=t(class t extends e{constructor(t){super();if(t!==false){this.__registerHost()}this.variant="text-body-medium";this.emphasis=false;this.color="inherit";this.italic=false;this.shimmer=false;this.lineTruncation="none";this.fontFeature="normal";this.as="p"}render(){const t=this.as;const e=t=>typeof t==="string"&&t.startsWith("var(--");const i=Number(this.lineTruncation);const o={"ds-text":true,[d(this.as)]:true,[a(this.variant)]:true,"ds-text--emphasis":this.emphasis,"ds-text--regular":!this.emphasis,"ds-text--nowrap":this.wrap==="nowrap","ds-text--balance":this.wrap==="balance","ds-text--pretty":this.wrap==="pretty","ds-text--truncate-1":i===1&&this.wrap!=="nowrap","ds-text--truncate-2":i===2&&this.wrap!=="nowrap","ds-text--truncate-3":i===3&&this.wrap!=="nowrap","ds-text--truncate-4":i===4&&this.wrap!=="nowrap","ds-text--truncate-5":i===5&&this.wrap!=="nowrap","ds-text--color-primary":this.color==="primary","ds-text--color-secondary":this.color==="secondary","ds-text--color-tertiary":this.color==="tertiary","ds-text--color-quaternary":this.color==="quaternary","ds-text--color-brand":this.color==="brand","ds-text--color-negative":this.color==="negative","ds-text--color-positive":this.color==="positive","ds-text--color-warning":this.color==="warning","ds-text--color-caution":this.color==="caution","ds-text--color-ai":this.color==="ai","ds-text--color-on-strong":this.color==="on-strong","ds-text--color-on-bold":this.color==="on-bold","ds-text--color-inherit":this.color==="inherit","ds-text--decoration-underline":this.decoration==="underline","ds-text--decoration-dotted-underline":this.decoration==="dotted-underline","ds-text--italic":this.italic,"ds-text--align-left":this.align==="left","ds-text--align-center":this.align==="center","ds-text--align-right":this.align==="right","ds-text--font-feature-tabular-nums":this.fontFeature==="tabular-nums"};const n=this.color&&e(this.color)?{color:this.color}:undefined;const l={};if(this.as==="label"&&this.for)l["for"]=this.for;if(this.textId)l["id"]=this.textId;return s(r,{key:"865e7619556ffaff1849c1f22696da8789068d85",class:o,style:n},s(t,{key:"6d4bf99163307c9482ad790fe57a177141e7f15b",class:{"ds-text__element":true,"ds-shimmer-text":this.shimmer},...l},s("slot",{key:"2a75a8c68f3e40b081aa358aa1939bf2eae3ee62"})))}static get style(){return o()}},[262,"ds-text",{variant:[1],emphasis:[4],color:[1],decoration:[1],italic:[4],shimmer:[4],align:[1],lineTruncation:[8,"line-truncation"],wrap:[1],fontFeature:[1,"font-feature"],as:[1],for:[1],textId:[1,"text-id"]}]);function l(){if(typeof customElements==="undefined"){return}const t=["ds-text"];t.forEach((t=>{switch(t){case"ds-text":if(!customElements.get(i(t))){customElements.define(i(t),n)}break}}))}l();export{n as T,l as d};
|
|
2
|
+
//# sourceMappingURL=p-Ay1AX7Ql.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["textVariantClass","variant","replace","textDisplayClass","element","textCss","Text","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","emphasis","color","italic","shimmer","lineTruncation","fontFeature","as","render","Tag","isCustomColor","c","startsWith","truncationLines","Number","cls","wrap","decoration","align","style","undefined","extraProps","for","textId","h","Host","key","class"],"sources":["src/wc/components/Text/text-utils.ts","src/wc/components/Text/Text.css?tag=ds-text&encapsulation=scoped","src/wc/components/Text/Text.tsx"],"sourcesContent":["import type { TextElement, TextVariant } from './text-types';\n\n/** `text-body-medium` → `ds-text--body-medium` */\nexport function textVariantClass(variant: TextVariant): string {\n return `ds-text--${variant.replace(/^text-/, '')}`;\n}\n\n/** Inline semantics get a measurable inline box; paragraphs/headings get a block box. */\nexport function textDisplayClass(element: TextElement): string {\n return element === 'span' || element === 'label'\n ? 'ds-text--inline-box'\n : 'ds-text--block-box';\n}\n","@import '../../utils/typography.css';\n@import '../../utils/shimmer.css';\n\n:host {\n box-sizing: border-box;\n max-width: 100%;\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n font-family: var(--typography-font-family);\n}\n\n:host(:where(.ds-text--inline-box)) {\n display: inline-block;\n}\n\n:host(:where(.ds-text--block-box)) {\n display: block;\n width: 100%;\n}\n\n/*\n * The host is the measurable typography box. The semantic inner element fills\n * it and inherits every text metric without adding margins, padding, or its own\n * line-height strut. One rendered line therefore measures exactly one token\n * line-height; N lines measure N × that token.\n */\n.ds-text__element {\n display: block;\n box-sizing: border-box;\n width: 100%;\n min-width: 0;\n margin: 0;\n padding: 0;\n border: 0;\n font: inherit;\n line-height: inherit;\n letter-spacing: inherit;\n color: inherit;\n text-transform: inherit;\n text-align: inherit;\n text-decoration: inherit;\n font-style: inherit;\n font-variant-numeric: inherit;\n font-feature-settings: inherit;\n -webkit-user-select: inherit;\n user-select: inherit;\n white-space: inherit;\n text-wrap: inherit;\n overflow-wrap: inherit;\n word-break: inherit;\n /* Consumer truncation on the host (PanelNav, ChartLegend, …) must reach the\n text node — overflow/text-overflow are not inherited by default. */\n overflow: inherit;\n text-overflow: inherit;\n}\n\n/* ── Truncation ─────────────────────────────────────────────────────────── */\n\n:host(.ds-text--truncate-1) {\n overflow: hidden;\n}\n\n:host(.ds-text--truncate-1) .ds-text__element {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n:host(.ds-text--truncate-2),\n:host(.ds-text--truncate-3),\n:host(.ds-text--truncate-4),\n:host(.ds-text--truncate-5) {\n overflow: hidden;\n}\n\n:host(.ds-text--truncate-2) .ds-text__element,\n:host(.ds-text--truncate-3) .ds-text__element,\n:host(.ds-text--truncate-4) .ds-text__element,\n:host(.ds-text--truncate-5) .ds-text__element {\n display: -webkit-box;\n -webkit-box-orient: vertical;\n overflow: hidden;\n text-overflow: ellipsis;\n word-break: break-word;\n}\n\n:host(.ds-text--truncate-2) .ds-text__element { -webkit-line-clamp: 2; }\n:host(.ds-text--truncate-3) .ds-text__element { -webkit-line-clamp: 3; }\n:host(.ds-text--truncate-4) .ds-text__element { -webkit-line-clamp: 4; }\n:host(.ds-text--truncate-5) .ds-text__element { -webkit-line-clamp: 5; }\n\n/* ── Wrap ───────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--nowrap),\n:host(.ds-text--nowrap) .ds-text__element {\n white-space: nowrap;\n word-break: normal;\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n}\n\n:host(.ds-text--balance),\n:host(.ds-text--balance) .ds-text__element { text-wrap: balance; }\n\n:host(.ds-text--pretty),\n:host(.ds-text--pretty) .ds-text__element { text-wrap: pretty; }\n\n/* ── Color ──────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--color-primary) { color: var(--color-foreground-primary); }\n:host(.ds-text--color-secondary) { color: var(--color-foreground-secondary); }\n:host(.ds-text--color-tertiary) { color: var(--color-foreground-tertiary); }\n:host(.ds-text--color-quaternary) { color: var(--color-foreground-quaternary); }\n:host(.ds-text--color-brand) { color: var(--color-foreground-bold-brand); }\n:host(.ds-text--color-negative) { color: var(--color-foreground-bold-negative); }\n:host(.ds-text--color-positive) { color: var(--color-foreground-bold-positive); }\n:host(.ds-text--color-warning) { color: var(--color-foreground-bold-warning); }\n:host(.ds-text--color-caution) { color: var(--color-foreground-bold-caution); }\n:host(.ds-text--color-ai) { color: var(--color-foreground-bold-ai); }\n:host(.ds-text--color-on-strong) { color: var(--color-foreground-on-strong-background-primary); }\n:host(.ds-text--color-on-bold) { color: var(--color-foreground-on-bold-background-primary); }\n/*\n * The inherit state intentionally has no declaration. `color` inherits\n * naturally, while omitting a host rule lets an owning component apply a\n * semantic token directly to ds-text without depending on stylesheet order.\n */\n\n/* ── Decorations ─────────────────────────────────────────────────────────── */\n\n:host(.ds-text--decoration-underline) {\n text-decoration: underline;\n text-decoration-color: var(--color-foreground-tertiary);\n text-underline-offset: 2px;\n text-decoration-thickness: 1px;\n}\n\n:host(.ds-text--decoration-dotted-underline) {\n text-decoration: underline dotted;\n text-decoration-color: var(--color-foreground-tertiary);\n text-underline-offset: 2px;\n text-decoration-thickness: 1px;\n}\n\n/* ── Style ──────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--italic) { font-style: italic; }\n\n:host(.ds-text--font-feature-tabular-nums) {\n font-variant-numeric: tabular-nums;\n font-feature-settings: 'tnum';\n}\n\n/* ── Align ──────────────────────────────────────────────────────────────── */\n\n:host(.ds-text--align-left) { text-align: left; }\n:host(.ds-text--align-center) { text-align: center; }\n:host(.ds-text--align-right) { text-align: right; }\n","import { Component, Prop, h, Host } from '@stencil/core';\nimport { textDisplayClass, textVariantClass } from './text-utils';\nimport type {\n TextAlign,\n TextColor,\n TextDecoration,\n TextElement,\n TextFontFeature,\n TextVariant,\n LineTruncation,\n TextWrap,\n} from './text-types';\n\n@Component({\n tag: 'ds-text',\n styleUrl: 'Text.css',\n scoped: true,\n})\nexport class Text {\n @Prop() variant: TextVariant = 'text-body-medium';\n /**\n * Heavier weight + tighter letter-spacing for the variant.\n * `false` (default): one step below emphasis (display semibold, title/body\n * medium, caption medium).\n * `true`: display bold, title/caption semibold, body medium.\n */\n @Prop() emphasis: boolean = false;\n /**\n * Semantic foreground color token or CSS variable. `tertiary` and the\n * still-fainter `quaternary` are restricted to genuinely inactive/disabled\n * UI content or purely decorative content; prefer the owning control's\n * inactive state whenever one exists.\n */\n @Prop() color: TextColor = 'inherit';\n /** Link underline or dotted hidden-interaction affordance; does not add semantics. */\n @Prop() decoration: TextDecoration | undefined;\n @Prop() italic: boolean = false;\n /** Animate the visible glyphs with the shared loading shimmer treatment. */\n @Prop() shimmer: boolean = false;\n @Prop() align: TextAlign | undefined;\n @Prop() lineTruncation: LineTruncation = 'none';\n @Prop() wrap: TextWrap | undefined;\n @Prop() fontFeature: TextFontFeature = 'normal';\n @Prop() as: TextElement = 'p';\n /** Maps to `for` attribute on <label> elements. */\n @Prop() for: string | undefined;\n /** Forwarded to the inner element (e.g. aria-labelledby targets). */\n @Prop() textId: string | undefined;\n\n render() {\n // Polymorphic element: TSX treats a variable tag as a component, so a\n // dynamic intrinsic element name must be cast to `any` to render.\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n const Tag = this.as as any;\n const isCustomColor = (c: TextColor) => typeof c === 'string' && c.startsWith('var(--');\n const truncationLines = Number(this.lineTruncation);\n\n const cls: Record<string, boolean> = {\n 'ds-text': true,\n [textDisplayClass(this.as)]: true,\n [textVariantClass(this.variant)]: true,\n 'ds-text--emphasis': this.emphasis,\n 'ds-text--regular': !this.emphasis,\n 'ds-text--nowrap': this.wrap === 'nowrap',\n 'ds-text--balance': this.wrap === 'balance',\n 'ds-text--pretty': this.wrap === 'pretty',\n 'ds-text--truncate-1': truncationLines === 1 && this.wrap !== 'nowrap',\n 'ds-text--truncate-2': truncationLines === 2 && this.wrap !== 'nowrap',\n 'ds-text--truncate-3': truncationLines === 3 && this.wrap !== 'nowrap',\n 'ds-text--truncate-4': truncationLines === 4 && this.wrap !== 'nowrap',\n 'ds-text--truncate-5': truncationLines === 5 && this.wrap !== 'nowrap',\n 'ds-text--color-primary': this.color === 'primary',\n 'ds-text--color-secondary': this.color === 'secondary',\n 'ds-text--color-tertiary': this.color === 'tertiary',\n 'ds-text--color-quaternary': this.color === 'quaternary',\n 'ds-text--color-brand': this.color === 'brand',\n 'ds-text--color-negative': this.color === 'negative',\n 'ds-text--color-positive': this.color === 'positive',\n 'ds-text--color-warning': this.color === 'warning',\n 'ds-text--color-caution': this.color === 'caution',\n 'ds-text--color-ai': this.color === 'ai',\n 'ds-text--color-on-strong': this.color === 'on-strong',\n 'ds-text--color-on-bold': this.color === 'on-bold',\n 'ds-text--color-inherit': this.color === 'inherit',\n 'ds-text--decoration-underline': this.decoration === 'underline',\n 'ds-text--decoration-dotted-underline': this.decoration === 'dotted-underline',\n 'ds-text--italic': this.italic,\n 'ds-text--align-left': this.align === 'left',\n 'ds-text--align-center': this.align === 'center',\n 'ds-text--align-right': this.align === 'right',\n 'ds-text--font-feature-tabular-nums': this.fontFeature === 'tabular-nums',\n };\n\n const style = this.color && isCustomColor(this.color)\n ? { color: this.color as string }\n : undefined;\n\n const extraProps: Record<string, string> = {};\n if (this.as === 'label' && this.for) extraProps['for'] = this.for;\n if (this.textId) extraProps['id'] = this.textId;\n\n return (\n <Host class={cls} style={style}>\n <Tag\n class={{\n 'ds-text__element': true,\n 'ds-shimmer-text': this.shimmer,\n }}\n {...extraProps}\n >\n <slot />\n </Tag>\n </Host>\n );\n }\n}\n"],"mappings":"2DAGM,SAAUA,EAAiBC,GAC/B,MAAO,YAAYA,EAAQC,QAAQ,SAAU,KAC/C,CAGM,SAAUC,EAAiBC,GAC/B,OAAOA,IAAY,QAAUA,IAAY,QACrC,sBACA,oBACN,CCZA,MAAMC,EAAU,IAAM,o0V,MCkBTC,EAAIC,EAAA,MAAAD,UAAAE,EALjB,WAAAC,CAAAC,G,4CAMUC,KAAAV,QAAuB,mBAOvBU,KAAAC,SAAoB,MAOpBD,KAAAE,MAAmB,UAGnBF,KAAAG,OAAkB,MAElBH,KAAAI,QAAmB,MAEnBJ,KAAAK,eAAiC,OAEjCL,KAAAM,YAA+B,SAC/BN,KAAAO,GAAkB,GAwE3B,CAlEC,MAAAC,GAIE,MAAMC,EAAMT,KAAKO,GACjB,MAAMG,EAAiBC,UAAwBA,IAAM,UAAYA,EAAEC,WAAW,UAC9E,MAAMC,EAAkBC,OAAOd,KAAKK,gBAEpC,MAAMU,EAA+B,CACnC,UAAW,KACX,CAACvB,EAAiBQ,KAAKO,KAAM,KAC7B,CAAClB,EAAiBW,KAAKV,UAAW,KAClC,oBAAqBU,KAAKC,SAC1B,oBAAqBD,KAAKC,SAC1B,kBAAmBD,KAAKgB,OAAS,SACjC,mBAAoBhB,KAAKgB,OAAS,UAClC,kBAAmBhB,KAAKgB,OAAS,SACjC,sBAAuBH,IAAoB,GAAKb,KAAKgB,OAAS,SAC9D,sBAAuBH,IAAoB,GAAKb,KAAKgB,OAAS,SAC9D,sBAAuBH,IAAoB,GAAKb,KAAKgB,OAAS,SAC9D,sBAAuBH,IAAoB,GAAKb,KAAKgB,OAAS,SAC9D,sBAAuBH,IAAoB,GAAKb,KAAKgB,OAAS,SAC9D,yBAA4BhB,KAAKE,QAAU,UAC3C,2BAA4BF,KAAKE,QAAU,YAC3C,0BAA4BF,KAAKE,QAAU,WAC3C,4BAA6BF,KAAKE,QAAU,aAC5C,uBAA4BF,KAAKE,QAAU,QAC3C,0BAA4BF,KAAKE,QAAU,WAC3C,0BAA4BF,KAAKE,QAAU,WAC3C,yBAA4BF,KAAKE,QAAU,UAC3C,yBAA4BF,KAAKE,QAAU,UAC3C,oBAA4BF,KAAKE,QAAU,KAC3C,2BAA4BF,KAAKE,QAAU,YAC3C,yBAA4BF,KAAKE,QAAU,UAC3C,yBAA4BF,KAAKE,QAAU,UAC3C,gCAAwCF,KAAKiB,aAAe,YAC5D,uCAAwCjB,KAAKiB,aAAe,mBAC5D,kBAAmBjB,KAAKG,OACxB,sBAAyBH,KAAKkB,QAAU,OACxC,wBAAyBlB,KAAKkB,QAAU,SACxC,uBAAyBlB,KAAKkB,QAAU,QACxC,qCAAsClB,KAAKM,cAAgB,gBAG7D,MAAMa,EAAQnB,KAAKE,OAASQ,EAAcV,KAAKE,OAC3C,CAAEA,MAAOF,KAAKE,OACdkB,UAEJ,MAAMC,EAAqC,GAC3C,GAAIrB,KAAKO,KAAO,SAAWP,KAAKsB,IAAKD,EAAW,OAASrB,KAAKsB,IAC9D,GAAItB,KAAKuB,OAAQF,EAAW,MAAQrB,KAAKuB,OAEzC,OACEC,EAACC,EAAI,CAAAC,IAAA,2CAACC,MAAOZ,EAAKI,MAAOA,GACvBK,EAACf,EAAG,CAAAiB,IAAA,2CACFC,MAAO,CACL,mBAAoB,KACpB,kBAAmB3B,KAAKI,YAEtBiB,GAEJG,EAAA,QAAAE,IAAA,8C","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as s,H as e,h as t,a as r,t as i}from"./index.js";import{d as n}from"./p-BAfG3M8z.js";import{d as a}from"./p-Ay1AX7Ql.js";import{r as o}from"./p-C-vRkDyn.js";const c=()=>`.sc-ds-agent-source-list-h{display:block}.agent-sources.sc-ds-agent-source-list{border-block-start:var(--dimension-stroke-width-012) solid var(--color-border-tertiary)}summary.sc-ds-agent-source-list{align-items:center;cursor:default;display:flex;gap:var(--dimension-space-050);list-style:none;padding-block:var(--dimension-space-075)}summary.sc-ds-agent-source-list::-webkit-details-marker{display:none}details[open].sc-ds-agent-source-list summary.sc-ds-agent-source-list ds-icon.sc-ds-agent-source-list{transform:rotate(90deg)}ol.sc-ds-agent-source-list{display:grid;gap:var(--dimension-space-075);margin:0;padding:0 0 var(--dimension-space-075) var(--dimension-space-150)}li.sc-ds-agent-source-list{display:grid;gap:var(--dimension-space-025)}a.sc-ds-agent-source-list{align-items:center;color:inherit;display:inline-flex;gap:var(--dimension-space-025);text-decoration-color:var(--color-foreground-tertiary);width:fit-content}@media (prefers-reduced-motion: no-preference){summary.sc-ds-agent-source-list ds-icon.sc-ds-agent-source-list{transition:transform var(--effect-motion-short-2)}}`;const l=s(class s extends e{constructor(s){super();if(s!==false){this.__registerHost()}this.items=[];this.heading="Sources";this.open=false}render(){if(!this.items.length)return null;return t(r,null,t("details",{class:"agent-sources",open:this.open},t("summary",null,t("ds-icon",{name:"ChevronRight",size:"xs",color:"inherit"}),t("ds-text",{variant:"text-body-small",emphasis:true},this.heading," · ",this.items.length)),t("ol",null,this.items.map((s=>{const e=o(s.url);return t("li",null,e?t("a",{href:e,target:"_blank",rel:"noopener noreferrer"},t("ds-text",{variant:"text-body-small",emphasis:true},s.title),t("ds-icon",{name:"ExternalLink",size:"xs",color:"inherit"})):t("ds-text",{variant:"text-body-small",emphasis:true},s.title),s.description?t("ds-text",{variant:"text-caption",color:"secondary"},s.description):null)})))))}static get style(){return c()}},[2,"ds-agent-source-list",{items:[16],heading:[1],open:[4]}]);function d(){if(typeof customElements==="undefined"){return}const s=["ds-agent-source-list","ds-icon","ds-text"];s.forEach((s=>{switch(s){case"ds-agent-source-list":if(!customElements.get(i(s))){customElements.define(i(s),l)}break;case"ds-icon":if(!customElements.get(i(s))){n()}break;case"ds-text":if(!customElements.get(i(s))){a()}break}}))}d();export{l as A,d};
|
|
2
|
+
//# sourceMappingURL=p-B-qDb_Zo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["agentSourceListCss","AgentSourceList","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","items","heading","open","render","length","h","Host","class","name","size","color","variant","emphasis","map","source","href","resolveSafeUrl","url","target","rel","title","description"],"sources":["src/wc/components/AgentSourceList/AgentSourceList.css?tag=ds-agent-source-list&encapsulation=scoped","src/wc/components/AgentSourceList/AgentSourceList.tsx"],"sourcesContent":[":host { display: block; }\n.agent-sources { border-block-start: var(--dimension-stroke-width-012) solid var(--color-border-tertiary); }\nsummary { align-items: center; cursor: default; display: flex; gap: var(--dimension-space-050); list-style: none; padding-block: var(--dimension-space-075); }\nsummary::-webkit-details-marker { display: none; }\ndetails[open] summary ds-icon { transform: rotate(90deg); }\nol { display: grid; gap: var(--dimension-space-075); margin: 0; padding: 0 0 var(--dimension-space-075) var(--dimension-space-150); }\nli { display: grid; gap: var(--dimension-space-025); }\na { align-items: center; color: inherit; display: inline-flex; gap: var(--dimension-space-025); text-decoration-color: var(--color-foreground-tertiary); width: fit-content; }\n\n@media (prefers-reduced-motion: no-preference) { summary ds-icon { transition: transform var(--effect-motion-short-2); } }\n","import { Component, Prop, h, Host } from '@stencil/core';\nimport { resolveSafeUrl } from '../../utils';\nimport type { AgentSource } from '../conversation-types';\n\n@Component({ tag: 'ds-agent-source-list', styleUrl: 'AgentSourceList.css', scoped: true })\nexport class AgentSourceList {\n @Prop() items: AgentSource[] = [];\n @Prop() heading: string = 'Sources';\n @Prop() open: boolean = false;\n\n render() {\n if (!this.items.length) return null;\n return (\n <Host>\n <details class=\"agent-sources\" open={this.open}>\n <summary>\n <ds-icon name=\"ChevronRight\" size=\"xs\" color=\"inherit\" />\n <ds-text variant=\"text-body-small\" emphasis>{this.heading} · {this.items.length}</ds-text>\n </summary>\n <ol>\n {this.items.map(source => {\n const href = resolveSafeUrl(source.url);\n return <li>\n {href\n ? <a href={href} target=\"_blank\" rel=\"noopener noreferrer\"><ds-text variant=\"text-body-small\" emphasis>{source.title}</ds-text><ds-icon name=\"ExternalLink\" size=\"xs\" color=\"inherit\" /></a>\n : <ds-text variant=\"text-body-small\" emphasis>{source.title}</ds-text>}\n {source.description ? <ds-text variant=\"text-caption\" color=\"secondary\">{source.description}</ds-text> : null}\n </li>;\n })}\n </ol>\n </details>\n </Host>\n );\n }\n}\n"],"mappings":"uKAAA,MAAMA,EAAqB,IAAM,ukC,MCKpBC,EAAeC,EAAA,MAAAD,UAAAE,EAD5B,WAAAC,CAAAC,G,4CAEUC,KAAAC,MAAuB,GACvBD,KAAAE,QAAkB,UAClBF,KAAAG,KAAgB,KA0BzB,CAxBC,MAAAC,GACE,IAAKJ,KAAKC,MAAMI,OAAQ,OAAO,KAC/B,OACEC,EAACC,EAAI,KACHD,EAAA,WAASE,MAAM,gBAAgBL,KAAMH,KAAKG,MACxCG,EAAA,eACEA,EAAA,WAASG,KAAK,eAAeC,KAAK,KAAKC,MAAM,YAC7CL,EAAA,WAASM,QAAQ,kBAAkBC,SAAQ,MAAEb,KAAKE,QAAO,MAAKF,KAAKC,MAAMI,SAE3EC,EAAA,UACGN,KAAKC,MAAMa,KAAIC,IACd,MAAMC,EAAOC,EAAeF,EAAOG,KACnC,OAAOZ,EAAA,UACJU,EACGV,EAAA,KAAGU,KAAMA,EAAMG,OAAO,SAASC,IAAI,uBAAsBd,EAAA,WAASM,QAAQ,kBAAkBC,SAAQ,MAAEE,EAAOM,OAAgBf,EAAA,WAASG,KAAK,eAAeC,KAAK,KAAKC,MAAM,aAC1KL,EAAA,WAASM,QAAQ,kBAAkBC,SAAQ,MAAEE,EAAOM,OACvDN,EAAOO,YAAchB,EAAA,WAASM,QAAQ,eAAeD,MAAM,aAAaI,EAAOO,aAAyB,KACtG,M","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,c as o,h as a,a as d,t as n}from"./index.js";import{d as l}from"./p-
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,c as o,h as a,a as d,t as n}from"./index.js";import{d as l}from"./p-BsoqsbBh.js";import{d as i}from"./p-DsiCDzoF.js";import{d as r}from"./p-BAfG3M8z.js";import{d as t}from"./p-Ca-I2UnB.js";import{d as c}from"./p-Ay1AX7Ql.js";import{d as h}from"./p-ohsLFap_.js";const p=()=>`.ds-control--lg.sc-ds-panel-tool-header,.ds-control--lg.sc-ds-panel-tool-header-h,.ds-control--md.sc-ds-panel-tool-header-h,.ds-control--md.sc-ds-panel-tool-header,.ds-control--sm.sc-ds-panel-tool-header-h,.ds-control--sm.sc-ds-panel-tool-header,.ds-control--xs.sc-ds-panel-tool-header-h,.ds-control--xs.sc-ds-panel-tool-header{--ds-control-radius:var(--dimension-radius-025)}.ds-control--lg.sc-ds-panel-tool-header-h,.ds-control--lg.sc-ds-panel-tool-header{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}.ds-control--md.sc-ds-panel-tool-header-h,.ds-control--md.sc-ds-panel-tool-header{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}.ds-control--sm.sc-ds-panel-tool-header-h,.ds-control--sm.sc-ds-panel-tool-header{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}.ds-control--xs.sc-ds-panel-tool-header-h,.ds-control--xs.sc-ds-panel-tool-header{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}.ds-chrome-space--sm.sc-ds-panel-tool-header-h,.ds-chrome-space--sm.sc-ds-panel-tool-header{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-panel-tool-header-h,.ds-chrome-space--md.sc-ds-panel-tool-header{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-panel-tool-header-h,.ds-chrome-space--lg.sc-ds-panel-tool-header{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-panel-tool-header-h,.ds-chrome-row.sc-ds-panel-tool-header,.ds-chrome-column.sc-ds-panel-tool-header-h,.ds-chrome-column.sc-ds-panel-tool-header,.ds-chrome-grid.sc-ds-panel-tool-header-h,.ds-chrome-grid.sc-ds-panel-tool-header{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-panel-tool-header-h,.ds-chrome-row.sc-ds-panel-tool-header{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-panel-tool-header-h,.ds-chrome-column.sc-ds-panel-tool-header{flex-direction:column}.ds-chrome-grid.sc-ds-panel-tool-header-h,.ds-chrome-grid.sc-ds-panel-tool-header{display:grid;align-items:center}.sc-ds-panel-tool-header-h{display:block;flex:0 0 auto;box-sizing:border-box}.panel-tool-header.sc-ds-panel-tool-header{height:var(--dimension-size-600);border-bottom:var(--dimension-stroke-width-012) solid var(--color-border-tertiary);color:var(--color-foreground-primary);-webkit-user-select:none;user-select:none}.panel-tool-header__leading.sc-ds-panel-tool-header,.panel-tool-header__trailing.sc-ds-panel-tool-header{display:flex;align-items:center;min-width:0}.panel-tool-header__leading.sc-ds-panel-tool-header:empty,.panel-tool-header__trailing.sc-ds-panel-tool-header:empty{display:none}.panel-tool-header__leading.sc-ds-panel-tool-header{flex:0 0 auto}.panel-tool-header__trailing.sc-ds-panel-tool-header{flex:0 0 auto;gap:var(--dimension-space-050);justify-content:flex-end}ds-text.panel-tool-header__heading.sc-ds-panel-tool-header{display:inline-flex;flex:1 1 0;align-items:center;width:auto;min-width:0;height:var(--ds-control-height);padding-inline:calc(var(--ds-control-padding-inline) + var(--ds-control-label-inset));box-sizing:border-box;text-align:left;-webkit-user-select:none;user-select:none}`;const m=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.dsBack=o(this,"dsBack");this.dsMenuToggle=o(this,"dsMenuToggle");this.dsAction=o(this,"dsAction");this.heading="";this.showBack=false;this.backIcon="ChevronLeft";this.backAriaLabel="Back";this.showMenu=true;this.menuAriaLabel="More options";this.menuTriggerId="";this.menuExpanded=false;this.actions=[]}async focusMenuTrigger(){const e=this.el.querySelector('ds-button-unfilled.panel-tool-header__menu, ds-button-unfilled[data-header-action-id="menu"]');await(e?.setFocus?.())}render(){const e=this.actions.length>0;const s=e?this.actions:this.showMenu?[{id:"menu",icon:"Ellipses",ariaLabel:this.menuAriaLabel,triggerId:this.menuTriggerId,controls:this.menuControls,expanded:this.menuExpanded,haspopup:"menu"}]:[];return a(d,{key:"d6c0245fafe67140abd8b666345beb85e129b660"},a("header",{key:"2c423e71c59e014b26e3de108388a3468418415f",class:"panel-tool-header ds-chrome-row ds-chrome-space--md"},a("div",{key:"afb8bd928a0562fba617d00915724d267df1d94c",class:"panel-tool-header__leading"},this.showBack?a("ds-tooltip",{label:this.backAriaLabel,side:"bottom",size:"sm"},a("ds-button-unfilled",{class:"panel-tool-header__back",variant:"icon",icon:this.backIcon,size:"md","aria-label":this.backAriaLabel,activeFill:false,hasBorder:false,onDsClick:e=>this.dsBack.emit(e.detail)})):null),a("ds-text",{key:"b4e552a1005d53042715a20e59f2228136a41baa",class:"panel-tool-header__heading ds-control--md",as:"h2",variant:"text-body-medium",emphasis:true,color:"primary",lineTruncation:1},this.heading),a("div",{key:"1df00dec4bab667d6b8d7508a916ff781aa40295",class:"panel-tool-header__trailing"},s.map((s=>a("ds-tooltip",{key:s.id,label:s.ariaLabel,side:"bottom",size:"sm"},a("ds-button-unfilled",{id:s.triggerId||undefined,"data-header-action-id":s.id,class:{"panel-tool-header__action":true,"panel-tool-header__menu":s.id==="menu"},variant:"icon",icon:s.icon,size:"md","aria-label":s.ariaLabel,haspopup:s.haspopup,controls:s.controls,expanded:s.expanded,pressed:s.pressed,isActive:!!s.expanded,isInactive:s.isInactive,activeFill:false,hasBorder:false,onDsClick:o=>{if(!e&&s.id==="menu")this.dsMenuToggle.emit(o.detail);this.dsAction.emit({id:s.id,originalEvent:o.detail})}})))))))}get el(){return this}static get style(){return p()}},[2,"ds-panel-tool-header",{heading:[1],showBack:[4,"show-back"],backIcon:[1,"back-icon"],backAriaLabel:[1,"back-aria-label"],showMenu:[4,"show-menu"],menuAriaLabel:[1,"menu-aria-label"],menuTriggerId:[1,"menu-trigger-id"],menuControls:[1,"menu-controls"],menuExpanded:[4,"menu-expanded"],actions:[16],focusMenuTrigger:[64]}]);function g(){if(typeof customElements==="undefined"){return}const e=["ds-panel-tool-header","ds-badge","ds-button-unfilled","ds-icon","ds-loader","ds-text","ds-tooltip"];e.forEach((e=>{switch(e){case"ds-panel-tool-header":if(!customElements.get(n(e))){customElements.define(n(e),m)}break;case"ds-badge":if(!customElements.get(n(e))){l()}break;case"ds-button-unfilled":if(!customElements.get(n(e))){i()}break;case"ds-icon":if(!customElements.get(n(e))){r()}break;case"ds-loader":if(!customElements.get(n(e))){t()}break;case"ds-text":if(!customElements.get(n(e))){c()}break;case"ds-tooltip":if(!customElements.get(n(e))){h()}break}}))}g();export{m as P,g as d};
|
|
2
|
+
//# sourceMappingURL=p-B1cbQ0SG.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{c as t}from"./p-BX0BMhgz.js";const i=8;class s{constructor(t){this.scrollResizeHandler=null;this.resizeObserver=null;this.retryRaf=null;this.liveRaf=null;this.last=null;this.isReady=false;this.options=t}get ready(){return this.isReady}observe(){this.bindListeners()}unobserve(){this.unbindListeners();this.cancel();this.last=null;this.isReady=false}schedule(t){this.cancelRetry();this.isReady=false;let s=this.options.retryBudget??i;const e=()=>{this.retryRaf=null;if(this.update()){this.isReady=true;this.options.onReady?.();t?.();return}if(s>0){s-=1;this.retryRaf=requestAnimationFrame(e)}};this.retryRaf=requestAnimationFrame(e)}update(){const i=this.options.getAnchor();if(!i)return false;const s=this.options.getPopup();if(!s)return false;if(this.options.topLayer&&typeof s.showPopover==="function"&&!s.matches(":popover-open")){try{s.showPopover()}catch{return false}}const e=this.options.measure(i,s);if(!e)return false;const h=t(e);if(!this.last||this.last.x!==h.x||this.last.y!==h.y||this.last.resolvedSide!==h.resolvedSide){this.last=h;this.options.apply(h)}return true}scheduleLiveUpdate(){const t=this.options.liveUpdate??"sync";if(t==="sync"){this.update();return}if(this.liveRaf!==null)return;if(t==="frame"){this.liveRaf=requestAnimationFrame((()=>{this.liveRaf=null;this.update()}));return}this.liveRaf=requestAnimationFrame((()=>{this.update();this.liveRaf=requestAnimationFrame((()=>{this.liveRaf=null;this.update()}))}))}cancel(){this.cancelRetry();if(this.liveRaf!==null){cancelAnimationFrame(this.liveRaf);this.liveRaf=null}}cancelRetry(){if(this.retryRaf===null)return;cancelAnimationFrame(this.retryRaf);this.retryRaf=null}bindListeners(){this.unbindListeners();this.scrollResizeHandler=()=>this.scheduleLiveUpdate();window.addEventListener("scroll",this.scrollResizeHandler,true);window.addEventListener("resize",this.scrollResizeHandler);if(this.options.observeResize&&typeof ResizeObserver!=="undefined"){this.resizeObserver=new ResizeObserver((()=>this.update()));this.observeResizeTargets()}}unbindListeners(){if(this.scrollResizeHandler){window.removeEventListener("scroll",this.scrollResizeHandler,true);window.removeEventListener("resize",this.scrollResizeHandler);this.scrollResizeHandler=null}this.resizeObserver?.disconnect();this.resizeObserver=null}observeResizeTargets(){if(!this.resizeObserver)return;const t=this.options.getPopup();if(t)this.resizeObserver.observe(t);const i=this.options.getAnchor();if(i)this.resizeObserver.observe(i)}}export{s as A};
|
|
2
|
+
//# sourceMappingURL=p-BBxcMVqk.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["POSITION_RETRY_BUDGET","AnchoredPositionController","constructor","options","this","scrollResizeHandler","resizeObserver","retryRaf","liveRaf","last","isReady","ready","observe","bindListeners","unobserve","unbindListeners","cancel","schedule","onReady","cancelRetry","remaining","retryBudget","attempt","update","requestAnimationFrame","anchor","getAnchor","popup","getPopup","topLayer","showPopover","matches","input","measure","next","computeAnchoredPosition","x","y","resolvedSide","apply","scheduleLiveUpdate","mode","liveUpdate","cancelAnimationFrame","window","addEventListener","observeResize","ResizeObserver","observeResizeTargets","removeEventListener","disconnect"],"sources":["src/wc/utils/anchored-position-controller.ts"],"sourcesContent":["import {\n computeAnchoredPosition,\n type AnchoredPosition,\n type AnchoredPositionInput,\n} from './anchored-position';\n\n/** Frames to wait for an anchor and popup to become measurable before giving up. */\nconst POSITION_RETRY_BUDGET = 8;\n\n/**\n * How the scroll/resize path reschedules. Each consumer family measured\n * differently before consolidation, and the differences are preserved verbatim\n * so placement timing is unchanged.\n *\n * - `sync` — measure inside the listener. Selects.\n * - `frame` — coalesce and measure on the next frame. Tooltips.\n * - `double-frame` — coalesce, measure next frame, then measure once more the\n * frame after. Scroll-driven owners such as ShellPage commit a compact-header\n * render in the frame after the scroll event, so a single frame reads a stale\n * anchor rect. Menus.\n */\nexport type AnchoredLiveUpdateMode = 'sync' | 'frame' | 'double-frame';\n\nexport interface AnchoredPositionControllerOptions {\n /** Resolve the anchor at measure time; positioning retries while this is null. */\n getAnchor: () => HTMLElement | null;\n /** Resolve the popup at measure time; positioning retries while this is null. */\n getPopup: () => HTMLElement | null;\n /**\n * Build the layout input for one measurement pass.\n *\n * The owning component keeps its own anchor semantics here — inner-cell align\n * offsets, minimum widths, and token resolution stay with the component rather\n * than moving into this controller. Return `null` when the component's own\n * guards say the popup is not measurable yet, which schedules a retry.\n */\n measure: (anchor: HTMLElement, popup: HTMLElement) => AnchoredPositionInput | null;\n /** Commit a changed position. Not called when the result is unchanged. */\n apply: (position: AnchoredPosition) => void;\n /**\n * Move a `popover=\"manual\"` popup into the native top layer before measuring.\n *\n * Use this for popups that remain in their owner's DOM tree. The top layer\n * gives `position: fixed` viewport coordinates even when an application\n * ancestor establishes a fixed-position containing block through containment,\n * transforms, or filters.\n */\n topLayer?: boolean;\n /** Fired once per `start()` when the first measurement succeeds. */\n onReady?: () => void;\n /** Scroll/resize behavior. Defaults to `sync`. */\n liveUpdate?: AnchoredLiveUpdateMode;\n /**\n * Re-measure when the popup or anchor resizes. Tooltips need this because the\n * label's `ds-text` upgrade changes the measured width after mount.\n */\n observeResize?: boolean;\n retryBudget?: number;\n}\n\n/**\n * Lifecycle owner for an element-anchored popup: listener binding, measurement\n * retries, frame coalescing, and teardown.\n *\n * Pairs with `computeAnchoredPosition`, which owns the geometry. Split this way\n * because the geometry is pure and exhaustively testable while the lifecycle is\n * timing-dependent; keeping them separate means the risky half lives in exactly\n * one place.\n *\n * Not suitable for overlays that place several popups in one shared pass — Toast\n * positions N anchored records inside a single layout commit and keeps its own\n * scheduler, using only the geometry function.\n */\nexport class AnchoredPositionController {\n private readonly options: AnchoredPositionControllerOptions;\n private scrollResizeHandler: (() => void) | null = null;\n private resizeObserver: ResizeObserver | null = null;\n private retryRaf: number | null = null;\n private liveRaf: number | null = null;\n private last: AnchoredPosition | null = null;\n private isReady = false;\n\n constructor(options: AnchoredPositionControllerOptions) {\n this.options = options;\n }\n\n /** `true` once a measurement has succeeded, for gating popup reveal. */\n get ready(): boolean {\n return this.isReady;\n }\n\n /**\n * Bind scroll/resize tracking for an opening popup.\n *\n * Deliberately does not schedule placement: every consumer binds listeners and\n * then schedules in its own order, and folding both into one call produced two\n * overlapping retry loops. Call `schedule()` or `update()` separately.\n */\n observe(): void {\n this.bindListeners();\n }\n\n /** Unbind tracking, cancel pending frames, and clear the cached position. */\n unobserve(): void {\n this.unbindListeners();\n this.cancel();\n this.last = null;\n this.isReady = false;\n }\n\n /**\n * Retry measurement each frame until it succeeds or the budget runs out, so a\n * popup is never revealed at 0,0 after a failed first pass.\n */\n schedule(onReady?: () => void): void {\n this.cancelRetry();\n this.isReady = false;\n\n let remaining = this.options.retryBudget ?? POSITION_RETRY_BUDGET;\n\n const attempt = () => {\n this.retryRaf = null;\n if (this.update()) {\n this.isReady = true;\n this.options.onReady?.();\n onReady?.();\n return;\n }\n if (remaining > 0) {\n remaining -= 1;\n this.retryRaf = requestAnimationFrame(attempt);\n }\n };\n\n this.retryRaf = requestAnimationFrame(attempt);\n }\n\n /** Measure and commit once. @returns `false` when the popup is not measurable. */\n update(): boolean {\n const anchor = this.options.getAnchor();\n if (!anchor) return false;\n const popup = this.options.getPopup();\n if (!popup) return false;\n\n if (\n this.options.topLayer &&\n typeof popup.showPopover === 'function' &&\n !popup.matches(':popover-open')\n ) {\n try {\n popup.showPopover();\n } catch {\n // The popup may not be connected yet. The scheduled retry will try again\n // on the next frame instead of measuring it in the wrong coordinate space.\n return false;\n }\n }\n\n const input = this.options.measure(anchor, popup);\n if (!input) return false;\n\n const next = computeAnchoredPosition(input);\n if (\n !this.last ||\n this.last.x !== next.x ||\n this.last.y !== next.y ||\n this.last.resolvedSide !== next.resolvedSide\n ) {\n this.last = next;\n this.options.apply(next);\n }\n return true;\n }\n\n /** Reposition an already-open popup without hiding it. */\n scheduleLiveUpdate(): void {\n const mode = this.options.liveUpdate ?? 'sync';\n if (mode === 'sync') {\n this.update();\n return;\n }\n\n if (this.liveRaf !== null) return;\n\n if (mode === 'frame') {\n this.liveRaf = requestAnimationFrame(() => {\n this.liveRaf = null;\n this.update();\n });\n return;\n }\n\n // double-frame stays coalesced until the second frame resolves.\n this.liveRaf = requestAnimationFrame(() => {\n this.update();\n this.liveRaf = requestAnimationFrame(() => {\n this.liveRaf = null;\n this.update();\n });\n });\n }\n\n /** Cancel pending retry and live frames without unbinding listeners. */\n cancel(): void {\n this.cancelRetry();\n if (this.liveRaf !== null) {\n cancelAnimationFrame(this.liveRaf);\n this.liveRaf = null;\n }\n }\n\n private cancelRetry(): void {\n if (this.retryRaf === null) return;\n cancelAnimationFrame(this.retryRaf);\n this.retryRaf = null;\n }\n\n private bindListeners(): void {\n this.unbindListeners();\n this.scrollResizeHandler = () => this.scheduleLiveUpdate();\n // Capture phase so scrolling inside any ancestor repositions the popup.\n window.addEventListener('scroll', this.scrollResizeHandler, true);\n window.addEventListener('resize', this.scrollResizeHandler);\n\n if (this.options.observeResize && typeof ResizeObserver !== 'undefined') {\n this.resizeObserver = new ResizeObserver(() => this.update());\n this.observeResizeTargets();\n }\n }\n\n private unbindListeners(): void {\n if (this.scrollResizeHandler) {\n window.removeEventListener('scroll', this.scrollResizeHandler, true);\n window.removeEventListener('resize', this.scrollResizeHandler);\n this.scrollResizeHandler = null;\n }\n this.resizeObserver?.disconnect();\n this.resizeObserver = null;\n }\n\n /**\n * Re-attach the resize observer after the popup remounts. Safe to call\n * repeatedly; `ResizeObserver.observe` ignores duplicate targets.\n */\n observeResizeTargets(): void {\n if (!this.resizeObserver) return;\n const popup = this.options.getPopup();\n if (popup) this.resizeObserver.observe(popup);\n const anchor = this.options.getAnchor();\n if (anchor) this.resizeObserver.observe(anchor);\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as e,H as s,h as o,a as n,t as r}from"./index.js";const a=()=>`.ds-control--lg,:host(.ds-control--lg),:host(.ds-control--md),.ds-control--md,:host(.ds-control--sm),.ds-control--sm,:host(.ds-control--xs),.ds-control--xs{--ds-control-radius:var(--dimension-radius-025)}:host(.ds-control--lg),.ds-control--lg{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--md),.ds-control--md{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--sm),.ds-control--sm{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}:host(.ds-control--xs),.ds-control--xs{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}@keyframes ds-shimmer-text-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}@keyframes ds-shimmer-surface-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}.ds-shimmer-text{--ds-shimmer-base:currentColor;--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );background-color:var(--ds-shimmer-base);background-image:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:ds-shimmer-text-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}.ds-shimmer-surface{--ds-shimmer-surface-base:var(--color-foreground-quaternary);--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );position:relative;overflow:hidden;background-color:var(--ds-shimmer-surface-base)}.ds-shimmer-surface::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;animation:ds-shimmer-surface-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}@media (prefers-reduced-motion: reduce){.ds-shimmer-text{animation:none;background-image:none;-webkit-text-fill-color:currentColor}.ds-shimmer-surface::after{display:none;animation:none}}:host{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;vertical-align:middle;--ds-skeleton-base:var(--color-foreground-quaternary);--ds-shimmer:var(--color-shimmer-shimmer)}.skeleton__shape{--ds-shimmer-surface-base:var(--ds-skeleton-base);display:block;width:100%;height:100%;flex:0 0 auto;background-color:var(--ds-skeleton-base);border-radius:var(--dimension-radius-025)}:host(.skeleton--background-medium){--ds-skeleton-base:var(--color-foreground-on-medium-background-quaternary);--ds-shimmer:var(--color-shimmer-shimmer-on-medium-background)}:host(.skeleton--background-bold){--ds-skeleton-base:var(--color-foreground-on-bold-background-quaternary);--ds-shimmer:var(--color-shimmer-shimmer-on-bold-background)}:host(.skeleton--background-strong){--ds-skeleton-base:var(--color-foreground-on-strong-background-quaternary);--ds-shimmer:var(--color-shimmer-shimmer-on-strong-background)}:host(.skeleton--background-translucent){--ds-skeleton-base:var(--color-translucent-foreground-quaternary);--ds-shimmer:var(--color-translucent-shimmer)}:host(.skeleton--background-inverted){--ds-skeleton-base:var(--color-inverted-foreground-quaternary);--ds-shimmer:var(--color-inverted-shimmer)}:host(.skeleton--background-media){--ds-skeleton-base:var(--color-media-foreground-quaternary);--ds-shimmer:var(--color-media-shimmer)}:host(.skeleton--background-always-dark){--ds-skeleton-base:var(--color-always-dark-foreground-quaternary);--ds-shimmer:var(--color-always-dark-shimmer)}:host(.skeleton--background-navigation){--ds-skeleton-base:var(--color-navigation-foreground-quaternary);--ds-shimmer:var(--color-navigation-shimmer)}:host(.skeleton--text){width:100%;height:var(--ds-skeleton-canvas-size);padding-block:var(--dimension-space-025)}:host(.skeleton--text) .skeleton__shape{height:calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050))}:host(.skeleton--text-text-display-medium){--ds-skeleton-canvas-size:var(--typography-lineheight-3xl)}:host(.skeleton--text-text-display-small){--ds-skeleton-canvas-size:var(--typography-lineheight-2xl)}:host(.skeleton--text-text-title-large){--ds-skeleton-canvas-size:var(--typography-lineheight-xl)}:host(.skeleton--text-text-title-medium),:host(.skeleton--text-text-body-large){--ds-skeleton-canvas-size:var(--typography-lineheight-lg)}:host(.skeleton--text-text-title-small),:host(.skeleton--text-text-body-medium){--ds-skeleton-canvas-size:var(--typography-lineheight-md)}:host(.skeleton--text-text-body-small){--ds-skeleton-canvas-size:var(--typography-lineheight-sm)}:host(.skeleton--text-text-caption){--ds-skeleton-canvas-size:var(--typography-lineheight-xs)}:host(.skeleton--icon){width:var(--ds-skeleton-canvas-size);height:var(--ds-skeleton-canvas-size);padding:var(--dimension-space-025)}:host(.skeleton--icon) .skeleton__shape{width:calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));height:calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050))}:host(.skeleton--icon.skeleton--rounded) .skeleton__shape{border-radius:var(--dimension-radius-half)}:host(.skeleton--icon-xs){--ds-skeleton-canvas-size:var(--dimension-iconography-xs)}:host(.skeleton--icon-sm){--ds-skeleton-canvas-size:var(--dimension-iconography-sm)}:host(.skeleton--icon-md){--ds-skeleton-canvas-size:var(--dimension-iconography-md)}:host(.skeleton--icon-lg){--ds-skeleton-canvas-size:var(--dimension-iconography-lg)}:host(.skeleton--icon-xl){--ds-skeleton-canvas-size:var(--dimension-iconography-xl)}:host(.skeleton--icon-2xl){--ds-skeleton-canvas-size:var(--dimension-iconography-2xl)}:host(.skeleton--icon-3xl){--ds-skeleton-canvas-size:var(--dimension-iconography-3xl)}:host(.skeleton--control){width:100%;height:var(--ds-control-height)}:host(.skeleton--control) .skeleton__shape{border-radius:var(--ds-control-radius, var(--dimension-radius-025))}:host(.skeleton--control.skeleton--rounded) .skeleton__shape{border-radius:var(--dimension-radius-half)}`;const t=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.variant="text";this.textVariant="text-body-medium";this.iconSize="md";this.controlSize="md";this.rounded=false;this.shimmer=true}get widthCss(){const e=this.width;if(e==null)return undefined;return typeof e==="number"?`${e}px`:e}render(){return o(n,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as e,H as s,h as o,a as n,t as r}from"./index.js";const a=()=>`.ds-control--lg,:host(.ds-control--lg),:host(.ds-control--md),.ds-control--md,:host(.ds-control--sm),.ds-control--sm,:host(.ds-control--xs),.ds-control--xs{--ds-control-radius:var(--dimension-radius-025)}:host(.ds-control--lg),.ds-control--lg{--ds-control-height:var(--dimension-size-500);--ds-control-icon:var(--dimension-iconography-lg);--ds-control-padding-inline:var(--dimension-space-100);--ds-control-label-inset:var(--dimension-space-050);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--md),.ds-control--md{--ds-control-height:var(--dimension-size-400);--ds-control-icon:var(--dimension-iconography-md);--ds-control-padding-inline:var(--dimension-space-075);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-050)}:host(.ds-control--sm),.ds-control--sm{--ds-control-height:var(--dimension-size-300);--ds-control-icon:var(--dimension-iconography-sm);--ds-control-padding-inline:var(--dimension-space-050);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:var(--dimension-space-025)}:host(.ds-control--xs),.ds-control--xs{--ds-control-height:var(--dimension-size-200);--ds-control-icon:var(--dimension-iconography-xs);--ds-control-padding-inline:var(--dimension-space-025);--ds-control-label-inset:var(--dimension-space-025);--ds-control-gap:0}@keyframes ds-shimmer-text-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}@keyframes ds-shimmer-surface-motion{0%{background-position:100% 0}76.923%{background-position:0 0}100%{background-position:0 0}}.ds-shimmer-text{--ds-shimmer-base:currentColor;--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );background-color:var(--ds-shimmer-base);background-image:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent;animation:ds-shimmer-text-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}.ds-shimmer-surface{--ds-shimmer-surface-base:var(--color-foreground-quaternary);--ds-shimmer-duration:var(--effect-animation-duration-long-2);--ds-shimmer-repeat-delay:var(--effect-animation-delay-short-3);--ds-shimmer-cycle-duration:calc( var(--ds-shimmer-duration) + var(--ds-shimmer-repeat-delay) );--ds-shimmer-easing:var(--effect-animation-easing-linear);--ds-shimmer-spread:var(--dimension-size-500);--ds-shimmer-travel:calc( var(--dimension-size-800) + var(--dimension-size-500) + var(--dimension-size-200) );position:relative;overflow:hidden;background-color:var(--ds-shimmer-surface-base)}.ds-shimmer-surface::after{content:'';position:absolute;inset:0;pointer-events:none;background:linear-gradient( 330deg, transparent calc(50% - var(--ds-shimmer-spread)), var(--ds-shimmer, var(--color-shimmer-shimmer)) 50%, transparent calc(50% + var(--ds-shimmer-spread)) );background-repeat:no-repeat;background-position:100% 0;background-size:calc( 200% + var(--ds-shimmer-spread) * 2 + var(--ds-shimmer-travel) * 2 ) 100%;animation:ds-shimmer-surface-motion var(--ds-shimmer-cycle-duration) var(--ds-shimmer-easing) infinite}@media (prefers-reduced-motion: reduce){.ds-shimmer-text{animation:none;background-image:none;-webkit-text-fill-color:currentColor}.ds-shimmer-surface::after{display:none;animation:none}}:host{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:0;vertical-align:middle;--ds-skeleton-base:var(--color-foreground-quaternary);--ds-shimmer:var(--color-shimmer-shimmer)}.skeleton__shape{--ds-shimmer-surface-base:var(--ds-skeleton-base);display:block;width:100%;height:100%;flex:0 0 auto;background-color:var(--ds-skeleton-base);border-radius:var(--dimension-radius-025)}:host(.skeleton--background-medium){--ds-skeleton-base:var(--color-foreground-on-medium-background-quaternary);--ds-shimmer:var(--color-shimmer-shimmer-on-medium-background)}:host(.skeleton--background-bold){--ds-skeleton-base:var(--color-foreground-on-bold-background-quaternary);--ds-shimmer:var(--color-shimmer-shimmer-on-bold-background)}:host(.skeleton--background-strong){--ds-skeleton-base:var(--color-foreground-on-strong-background-quaternary);--ds-shimmer:var(--color-shimmer-shimmer-on-strong-background)}:host(.skeleton--background-translucent){--ds-skeleton-base:var(--color-translucent-foreground-quaternary);--ds-shimmer:var(--color-translucent-shimmer)}:host(.skeleton--background-inverted){--ds-skeleton-base:var(--color-inverted-foreground-quaternary);--ds-shimmer:var(--color-inverted-shimmer)}:host(.skeleton--background-media){--ds-skeleton-base:var(--color-media-foreground-quaternary);--ds-shimmer:var(--color-media-shimmer)}:host(.skeleton--background-always-dark){--ds-skeleton-base:var(--color-always-dark-foreground-quaternary);--ds-shimmer:var(--color-always-dark-shimmer)}:host(.skeleton--background-navigation){--ds-skeleton-base:var(--color-navigation-foreground-quaternary);--ds-shimmer:var(--color-navigation-shimmer)}:host(.skeleton--text){width:100%;height:var(--ds-skeleton-canvas-size);padding-block:var(--dimension-space-025)}:host(.skeleton--text) .skeleton__shape{height:calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050))}:host(.skeleton--text-text-display-medium){--ds-skeleton-canvas-size:var(--typography-lineheight-3xl)}:host(.skeleton--text-text-display-small){--ds-skeleton-canvas-size:var(--typography-lineheight-2xl)}:host(.skeleton--text-text-title-large){--ds-skeleton-canvas-size:var(--typography-lineheight-xl)}:host(.skeleton--text-text-title-medium),:host(.skeleton--text-text-body-large){--ds-skeleton-canvas-size:var(--typography-lineheight-lg)}:host(.skeleton--text-text-title-small),:host(.skeleton--text-text-body-medium){--ds-skeleton-canvas-size:var(--typography-lineheight-md)}:host(.skeleton--text-text-body-small){--ds-skeleton-canvas-size:var(--typography-lineheight-sm)}:host(.skeleton--text-text-caption){--ds-skeleton-canvas-size:var(--typography-lineheight-xs)}:host(.skeleton--icon){width:var(--ds-skeleton-canvas-size);height:var(--ds-skeleton-canvas-size);padding:var(--dimension-space-025)}:host(.skeleton--icon) .skeleton__shape{width:calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050));height:calc(var(--ds-skeleton-canvas-size) - var(--dimension-space-050))}:host(.skeleton--icon.skeleton--rounded) .skeleton__shape{border-radius:var(--dimension-radius-half)}:host(.skeleton--icon-xs){--ds-skeleton-canvas-size:var(--dimension-iconography-xs)}:host(.skeleton--icon-sm){--ds-skeleton-canvas-size:var(--dimension-iconography-sm)}:host(.skeleton--icon-md){--ds-skeleton-canvas-size:var(--dimension-iconography-md)}:host(.skeleton--icon-lg){--ds-skeleton-canvas-size:var(--dimension-iconography-lg)}:host(.skeleton--icon-xl){--ds-skeleton-canvas-size:var(--dimension-iconography-xl)}:host(.skeleton--icon-2xl){--ds-skeleton-canvas-size:var(--dimension-iconography-2xl)}:host(.skeleton--icon-3xl){--ds-skeleton-canvas-size:var(--dimension-iconography-3xl)}:host(.skeleton--control){width:100%;height:var(--ds-control-height)}:host(.skeleton--control) .skeleton__shape{border-radius:var(--ds-control-radius, var(--dimension-radius-025))}:host(.skeleton--control.skeleton--rounded) .skeleton__shape{border-radius:var(--dimension-radius-half)}`;const t=e(class e extends s{constructor(e){super();if(e!==false){this.__registerHost()}this.__attachShadow();this.variant="text";this.textVariant="text-body-medium";this.iconSize="md";this.controlSize="md";this.rounded=false;this.shimmer=true}get widthCss(){const e=this.width;if(e==null)return undefined;return typeof e==="number"?`${e}px`:e}render(){return o(n,{key:"d5264ad20fabf57957c59c6531c3e05f045de402","aria-hidden":"true",class:{skeleton:true,[`skeleton--${this.variant}`]:true,[`skeleton--text-${this.textVariant}`]:this.variant==="text",[`skeleton--icon-${this.iconSize}`]:this.variant==="icon",[`ds-control--${this.controlSize}`]:this.variant==="control",[`skeleton--background-${this.background}`]:!!this.background,"skeleton--rounded":this.variant!=="text"&&this.rounded},style:this.variant==="icon"?undefined:{width:this.widthCss}},o("span",{key:"91cafec46447457b51a98c2ba5c30e2f01efe894",class:{skeleton__shape:true,"ds-shimmer-surface":this.shimmer}}))}static get style(){return a()}},[1,"ds-skeleton",{variant:[1],textVariant:[1,"text-variant"],iconSize:[1,"icon-size"],controlSize:[1,"control-size"],width:[8],rounded:[4],shimmer:[4],background:[1]}]);function i(){if(typeof customElements==="undefined"){return}const e=["ds-skeleton"];e.forEach((e=>{switch(e){case"ds-skeleton":if(!customElements.get(r(e))){customElements.define(r(e),t)}break}}))}i();export{t as S,i as d};
|
|
2
|
+
//# sourceMappingURL=p-BUZXuod2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as s,H as i,c,h as e,a as t,t as r}from"./index.js";function o(s,i){return i.length>0?i.flatMap((s=>s.options)):[...s]}function a(s,i){const c=s.findIndex((s=>s.value===i&&!s.isInactive));if(c>=0)return c;return s.findIndex((s=>!s.isInactive))}function n(s,i,c){const e=s.map(((s,i)=>({option:s,index:i}))).filter((({option:s})=>!s.isInactive)).map((({index:s})=>s));if(e.length===0)return null;if(c==="Home")return e[0];if(c==="End")return e[e.length-1];const t=c==="ArrowRight"||c==="ArrowDown"?1:-1;const r=e.indexOf(i);if(r<0){return t>0?e[0]:e[e.length-1]}return e[(r+t+e.length)%e.length]}function d(s){if(s===undefined||!Number.isFinite(s))return 1;return Math.min(1,Math.max(0,s))}const h=()=>`.sc-ds-swatch-picker-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-swatch-picker-h,.ds-focus-ring.sc-ds-swatch-picker,.ds-focus-ring-inset.sc-ds-swatch-picker-h,.ds-focus-ring-inset.sc-ds-swatch-picker{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-swatch-picker-h:focus-visible,.ds-focus-ring.sc-ds-swatch-picker:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-swatch-picker-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-swatch-picker{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-swatch-picker-h:focus-visible,.ds-focus-ring-inset.sc-ds-swatch-picker:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-swatch-picker-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-swatch-picker:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-control-inactive.sc-ds-swatch-picker-h,.ds-control-inactive.sc-ds-swatch-picker{opacity:0.5;pointer-events:none;cursor:not-allowed}.sc-ds-swatch-picker-h{box-sizing:border-box;display:block;width:100%;--_swatch-inner-inset:calc( var(--dimension-stroke-width-025) + var(--dimension-space-025) );--_swatch-ring-bg:var(--color-background-primary);--_swatch-select-motion:var(--effect-motion-short-3)}.swatch-picker.sc-ds-swatch-picker{box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;width:100%;min-height:var(--dimension-size-400);gap:var(--dimension-space-100);padding:var(--dimension-space-100)}.swatch-picker__option.sc-ds-swatch-picker{position:relative;box-sizing:border-box;flex:0 0 auto;width:var(--dimension-size-300);height:var(--dimension-size-300);padding:0;border:none;border-radius:var(--dimension-radius-half);background:transparent;cursor:default;isolation:isolate}.swatch-picker__fill.sc-ds-swatch-picker,.swatch-picker__border.sc-ds-swatch-picker,.swatch-picker__interaction.sc-ds-swatch-picker,.swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__stroke.sc-ds-swatch-picker{position:absolute;inset:0;border-radius:inherit;pointer-events:none}.swatch-picker__fill.sc-ds-swatch-picker{z-index:1;background-color:var(--_swatch-preview-color);background-image:var(--_swatch-preview-image);background-repeat:no-repeat;background-position:center;background-size:cover;opacity:var(--_swatch-preview-opacity);transition:inset var(--_swatch-select-motion)}.swatch-picker__border.sc-ds-swatch-picker{z-index:2;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary);transition:inset var(--_swatch-select-motion)}.swatch-picker__interaction.sc-ds-swatch-picker{z-index:3;background-color:transparent;transition:inset var(--_swatch-select-motion), background-color 0s}.swatch-picker__option.sc-ds-swatch-picker:hover:not(:disabled) .swatch-picker__interaction.sc-ds-swatch-picker{background-color:var(--color-interaction-hover)}.swatch-picker__option.sc-ds-swatch-picker:active:not(:disabled) .swatch-picker__interaction.sc-ds-swatch-picker{background-color:var(--color-interaction-pressed)}.swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__stroke.sc-ds-swatch-picker{opacity:0;transform:scale(1.2);transform-origin:center;transition:opacity var(--_swatch-select-motion), transform var(--_swatch-select-motion)}.swatch-picker__halo.sc-ds-swatch-picker{z-index:4;box-shadow:inset 0 0 0 var(--_swatch-inner-inset) var(--_swatch-ring-bg)}.swatch-picker__stroke.sc-ds-swatch-picker{z-index:5;box-shadow:inset 0 0 0 var(--dimension-stroke-width-025) var(--color-border-bold-brand)}.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__fill.sc-ds-swatch-picker,.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__border.sc-ds-swatch-picker,.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__interaction.sc-ds-swatch-picker{inset:var(--_swatch-inner-inset)}.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__stroke.sc-ds-swatch-picker{opacity:1;transform:scale(1)}.swatch-picker__divider.sc-ds-swatch-picker{flex:0 0 auto;align-self:center;width:var(--dimension-stroke-width-012);height:var(--dimension-size-300);background-color:var(--color-border-tertiary)}@media (prefers-reduced-motion: reduce){.swatch-picker__fill.sc-ds-swatch-picker,.swatch-picker__border.sc-ds-swatch-picker,.swatch-picker__interaction.sc-ds-swatch-picker,.swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__stroke.sc-ds-swatch-picker{transition:none}}`;const p=s(class s extends i{constructor(s){super();if(s!==false){this.__registerHost()}this.dsChange=c(this,"dsChange");this.value="";this.options=[];this.sections=[];this.groupLabel="Swatch options"}get activeOptions(){return o(this.options,this.sections)}selectOption(s){if(s.isInactive||s.value===this.value)return;this.value=s.value;this.dsChange.emit(s.value)}focusOption(s){requestAnimationFrame((()=>{const i=this.el.querySelectorAll(".swatch-picker__option");i[s]?.focus()}))}handleOptionKeyDown(s,i){const c=s.key;if(!["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Home","End"].includes(c)){return}const e=n(this.activeOptions,i,c);if(e===null)return;s.preventDefault();const t=this.activeOptions[e];this.selectOption(t);this.focusOption(e)}renderOption(s,i,c){const t=s.value===this.value;const r=d(s.preview.opacity);return e("button",{key:s.value,type:"button",class:{"swatch-picker__option":true,"swatch-picker__option--selected":t,"ds-focus-ring-inset":true,"ds-control-inactive":!!s.isInactive},style:{"--_swatch-preview-color":s.preview.backgroundColor??"var(--color-background-secondary)","--_swatch-preview-image":s.preview.backgroundImage??"none","--_swatch-preview-opacity":String(r)},role:"radio","aria-label":s.label,"aria-checked":t?"true":"false",tabIndex:i===c?0:-1,disabled:s.isInactive,onClick:()=>this.selectOption(s),onKeyDown:s=>this.handleOptionKeyDown(s,i)},e("span",{class:"swatch-picker__fill","aria-hidden":"true"}),e("span",{class:"swatch-picker__border","aria-hidden":"true"}),e("span",{class:"swatch-picker__interaction","aria-hidden":"true"}),e("span",{class:"swatch-picker__halo","aria-hidden":"true"}),e("span",{class:"swatch-picker__stroke","aria-hidden":"true"}))}render(){const s=this.activeOptions;const i=a(s,this.value);let c=0;return e(t,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as s,H as i,c,h as e,a as t,t as r}from"./index.js";function o(s,i){return i.length>0?i.flatMap((s=>s.options)):[...s]}function a(s,i){const c=s.findIndex((s=>s.value===i&&!s.isInactive));if(c>=0)return c;return s.findIndex((s=>!s.isInactive))}function n(s,i,c){const e=s.map(((s,i)=>({option:s,index:i}))).filter((({option:s})=>!s.isInactive)).map((({index:s})=>s));if(e.length===0)return null;if(c==="Home")return e[0];if(c==="End")return e[e.length-1];const t=c==="ArrowRight"||c==="ArrowDown"?1:-1;const r=e.indexOf(i);if(r<0){return t>0?e[0]:e[e.length-1]}return e[(r+t+e.length)%e.length]}function d(s){if(s===undefined||!Number.isFinite(s))return 1;return Math.min(1,Math.max(0,s))}const h=()=>`.sc-ds-swatch-picker-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-swatch-picker-h,.ds-focus-ring.sc-ds-swatch-picker,.ds-focus-ring-inset.sc-ds-swatch-picker-h,.ds-focus-ring-inset.sc-ds-swatch-picker{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-swatch-picker-h:focus-visible,.ds-focus-ring.sc-ds-swatch-picker:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-swatch-picker-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-swatch-picker{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-swatch-picker-h:focus-visible,.ds-focus-ring-inset.sc-ds-swatch-picker:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-swatch-picker-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-swatch-picker:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-swatch-picker::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-control-inactive.sc-ds-swatch-picker-h,.ds-control-inactive.sc-ds-swatch-picker{opacity:0.5;pointer-events:none;cursor:not-allowed}.sc-ds-swatch-picker-h{box-sizing:border-box;display:block;width:100%;--_swatch-inner-inset:calc( var(--dimension-stroke-width-025) + var(--dimension-space-025) );--_swatch-ring-bg:var(--color-background-primary);--_swatch-select-motion:var(--effect-motion-short-3)}.swatch-picker.sc-ds-swatch-picker{box-sizing:border-box;display:flex;align-items:center;flex-wrap:wrap;width:100%;min-height:var(--dimension-size-400);gap:var(--dimension-space-100);padding:var(--dimension-space-100)}.swatch-picker__option.sc-ds-swatch-picker{position:relative;box-sizing:border-box;flex:0 0 auto;width:var(--dimension-size-300);height:var(--dimension-size-300);padding:0;border:none;border-radius:var(--dimension-radius-half);background:transparent;cursor:default;isolation:isolate}.swatch-picker__fill.sc-ds-swatch-picker,.swatch-picker__border.sc-ds-swatch-picker,.swatch-picker__interaction.sc-ds-swatch-picker,.swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__stroke.sc-ds-swatch-picker{position:absolute;inset:0;border-radius:inherit;pointer-events:none}.swatch-picker__fill.sc-ds-swatch-picker{z-index:1;background-color:var(--_swatch-preview-color);background-image:var(--_swatch-preview-image);background-repeat:no-repeat;background-position:center;background-size:cover;opacity:var(--_swatch-preview-opacity);transition:inset var(--_swatch-select-motion)}.swatch-picker__border.sc-ds-swatch-picker{z-index:2;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-secondary);transition:inset var(--_swatch-select-motion)}.swatch-picker__interaction.sc-ds-swatch-picker{z-index:3;background-color:transparent;transition:inset var(--_swatch-select-motion), background-color 0s}.swatch-picker__option.sc-ds-swatch-picker:hover:not(:disabled) .swatch-picker__interaction.sc-ds-swatch-picker{background-color:var(--color-interaction-hover)}.swatch-picker__option.sc-ds-swatch-picker:active:not(:disabled) .swatch-picker__interaction.sc-ds-swatch-picker{background-color:var(--color-interaction-pressed)}.swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__stroke.sc-ds-swatch-picker{opacity:0;transform:scale(1.2);transform-origin:center;transition:opacity var(--_swatch-select-motion), transform var(--_swatch-select-motion)}.swatch-picker__halo.sc-ds-swatch-picker{z-index:4;box-shadow:inset 0 0 0 var(--_swatch-inner-inset) var(--_swatch-ring-bg)}.swatch-picker__stroke.sc-ds-swatch-picker{z-index:5;box-shadow:inset 0 0 0 var(--dimension-stroke-width-025) var(--color-border-bold-brand)}.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__fill.sc-ds-swatch-picker,.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__border.sc-ds-swatch-picker,.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__interaction.sc-ds-swatch-picker{inset:var(--_swatch-inner-inset)}.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__option--selected.sc-ds-swatch-picker .swatch-picker__stroke.sc-ds-swatch-picker{opacity:1;transform:scale(1)}.swatch-picker__divider.sc-ds-swatch-picker{flex:0 0 auto;align-self:center;width:var(--dimension-stroke-width-012);height:var(--dimension-size-300);background-color:var(--color-border-tertiary)}@media (prefers-reduced-motion: reduce){.swatch-picker__fill.sc-ds-swatch-picker,.swatch-picker__border.sc-ds-swatch-picker,.swatch-picker__interaction.sc-ds-swatch-picker,.swatch-picker__halo.sc-ds-swatch-picker,.swatch-picker__stroke.sc-ds-swatch-picker{transition:none}}`;const p=s(class s extends i{constructor(s){super();if(s!==false){this.__registerHost()}this.dsChange=c(this,"dsChange");this.value="";this.options=[];this.sections=[];this.groupLabel="Swatch options"}get activeOptions(){return o(this.options,this.sections)}selectOption(s){if(s.isInactive||s.value===this.value)return;this.value=s.value;this.dsChange.emit(s.value)}focusOption(s){requestAnimationFrame((()=>{const i=this.el.querySelectorAll(".swatch-picker__option");i[s]?.focus()}))}handleOptionKeyDown(s,i){const c=s.key;if(!["ArrowDown","ArrowLeft","ArrowRight","ArrowUp","Home","End"].includes(c)){return}const e=n(this.activeOptions,i,c);if(e===null)return;s.preventDefault();const t=this.activeOptions[e];this.selectOption(t);this.focusOption(e)}renderOption(s,i,c){const t=s.value===this.value;const r=d(s.preview.opacity);return e("button",{key:s.value,type:"button",class:{"swatch-picker__option":true,"swatch-picker__option--selected":t,"ds-focus-ring-inset":true,"ds-control-inactive":!!s.isInactive},style:{"--_swatch-preview-color":s.preview.backgroundColor??"var(--color-background-secondary)","--_swatch-preview-image":s.preview.backgroundImage??"none","--_swatch-preview-opacity":String(r)},role:"radio","aria-label":s.label,"aria-checked":t?"true":"false",tabIndex:i===c?0:-1,disabled:s.isInactive,onClick:()=>this.selectOption(s),onKeyDown:s=>this.handleOptionKeyDown(s,i)},e("span",{class:"swatch-picker__fill","aria-hidden":"true"}),e("span",{class:"swatch-picker__border","aria-hidden":"true"}),e("span",{class:"swatch-picker__interaction","aria-hidden":"true"}),e("span",{class:"swatch-picker__halo","aria-hidden":"true"}),e("span",{class:"swatch-picker__stroke","aria-hidden":"true"}))}render(){const s=this.activeOptions;const i=a(s,this.value);let c=0;return e(t,{key:"b1ca49116cb316f97b4f57ac03b2a12a31a21e7c"},e("div",{key:"e2c2f4d85f1ba6231e28bcfe7d1772161134d672",class:"swatch-picker",role:"radiogroup","aria-label":this.groupLabel},(this.sections.length>0?this.sections:[{options:this.options}]).map(((s,t)=>[s.options.map((s=>{const e=c++;return this.renderOption(s,e,i)})),t<(this.sections.length>0?this.sections.length:1)-1&&e("span",{class:"swatch-picker__divider","aria-hidden":"true"})]))))}get el(){return this}static get style(){return h()}},[2,"ds-swatch-picker",{value:[1537],options:[16],sections:[16],groupLabel:[1,"group-label"]}]);function w(){if(typeof customElements==="undefined"){return}const s=["ds-swatch-picker"];s.forEach((s=>{switch(s){case"ds-swatch-picker":if(!customElements.get(r(s))){customElements.define(r(s),p)}break}}))}w();export{p as S,w as d};
|
|
2
|
+
//# sourceMappingURL=p-BaUsq_VK.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as i,H as e,c as n,h as s,a as o,t as a}from"./index.js";import{s as r}from"./p-BnQXAbif.js";import{d as t}from"./p-BsoqsbBh.js";import{d as c}from"./p-BAfG3M8z.js";import{d}from"./p-Ay1AX7Ql.js";const l=()=>`.ds-chrome-space--sm.sc-ds-mobile-bar-nav-h,.ds-chrome-space--sm.sc-ds-mobile-bar-nav{--ds-chrome-padding:var(--dimension-space-050);--ds-chrome-gap:var(--dimension-space-050)}.ds-chrome-space--md.sc-ds-mobile-bar-nav-h,.ds-chrome-space--md.sc-ds-mobile-bar-nav{--ds-chrome-padding:var(--dimension-space-100);--ds-chrome-gap:var(--dimension-space-100)}.ds-chrome-space--lg.sc-ds-mobile-bar-nav-h,.ds-chrome-space--lg.sc-ds-mobile-bar-nav{--ds-chrome-padding:var(--dimension-space-200);--ds-chrome-gap:var(--dimension-space-200)}.ds-chrome-row.sc-ds-mobile-bar-nav-h,.ds-chrome-row.sc-ds-mobile-bar-nav,.ds-chrome-column.sc-ds-mobile-bar-nav-h,.ds-chrome-column.sc-ds-mobile-bar-nav,.ds-chrome-grid.sc-ds-mobile-bar-nav-h,.ds-chrome-grid.sc-ds-mobile-bar-nav{display:flex;box-sizing:border-box;gap:var(--ds-chrome-gap, var(--dimension-space-100));padding:var(--ds-chrome-padding, var(--dimension-space-100))}.ds-chrome-row.sc-ds-mobile-bar-nav-h,.ds-chrome-row.sc-ds-mobile-bar-nav{flex-direction:row;align-items:center}.ds-chrome-column.sc-ds-mobile-bar-nav-h,.ds-chrome-column.sc-ds-mobile-bar-nav{flex-direction:column}.ds-chrome-grid.sc-ds-mobile-bar-nav-h,.ds-chrome-grid.sc-ds-mobile-bar-nav{display:grid;align-items:center}.sc-ds-mobile-bar-nav-h{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}.ds-focus-ring.sc-ds-mobile-bar-nav-h,.ds-focus-ring.sc-ds-mobile-bar-nav,.ds-focus-ring-inset.sc-ds-mobile-bar-nav-h,.ds-focus-ring-inset.sc-ds-mobile-bar-nav{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}.ds-focus-ring.sc-ds-mobile-bar-nav-h:focus-visible,.ds-focus-ring.sc-ds-mobile-bar-nav:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring.ds-focus-ring--visible.sc-ds-mobile-bar-nav-h,.ds-focus-ring.ds-focus-ring--visible.sc-ds-mobile-bar-nav{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}.ds-focus-ring-inset.sc-ds-mobile-bar-nav-h:focus-visible,.ds-focus-ring-inset.sc-ds-mobile-bar-nav:focus-visible{outline:none}.ds-focus-ring-inset.sc-ds-mobile-bar-nav-h:focus-visible::after,.ds-focus-ring-inset.sc-ds-mobile-bar-nav:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-bar-nav-h,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-bar-nav{outline:none}.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-bar-nav-h::after,.ds-focus-ring-inset.ds-focus-ring--visible.sc-ds-mobile-bar-nav::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}.ds-interaction-fill.sc-ds-mobile-bar-nav-h,.ds-interaction-fill.sc-ds-mobile-bar-nav{position:relative;z-index:0;cursor:default;--ds-interaction-hover:var(--color-interaction-hover);--ds-interaction-pressed:var(--color-interaction-pressed);--ds-interaction-active:var(--color-interaction-active-brand);--ds-interaction-border-width:0px;--ds-interaction-border-color:transparent}.ds-interaction-fill.sc-ds-mobile-bar-nav-h::before,.ds-interaction-fill.sc-ds-mobile-bar-nav::before,.ds-interaction-fill.sc-ds-mobile-bar-nav-h::after,.ds-interaction-fill.sc-ds-mobile-bar-nav::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none;cursor:inherit;transition:none}.ds-interaction-fill.sc-ds-mobile-bar-nav-h::before,.ds-interaction-fill.sc-ds-mobile-bar-nav::before{z-index:1}.ds-interaction-fill.sc-ds-mobile-bar-nav-h::after,.ds-interaction-fill.sc-ds-mobile-bar-nav::after{z-index:3;box-shadow:inset 0 0 0 var(--ds-interaction-border-width) var(--ds-interaction-border-color)}.ds-interaction-fill--bordered.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--bordered.sc-ds-mobile-bar-nav{--ds-interaction-border-width:var(--dimension-stroke-width-012);--ds-interaction-border-color:var(--color-border-secondary)}.ds-interaction-fill--selected.sc-ds-mobile-bar-nav-h::before,.ds-interaction-fill--selected.sc-ds-mobile-bar-nav::before{background:var(--ds-interaction-active)}.ds-interaction-fill--selected.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--selected.sc-ds-mobile-bar-nav{--ds-interaction-dot-ring:var(--ds-interaction-active)}@media (hover: hover) and (pointer: fine){.ds-interaction-fill.sc-ds-mobile-bar-nav-h:hover:not(:disabled)::after,.ds-interaction-fill.sc-ds-mobile-bar-nav:hover:not(:disabled)::after{background:var(--ds-interaction-hover)}}.ds-interaction-fill.sc-ds-mobile-bar-nav-h:active:not(:disabled)::after,.ds-interaction-fill.sc-ds-mobile-bar-nav:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}.ds-interaction-fill.sc-ds-mobile-bar-nav-h>.ds-interaction-fill__content.sc-ds-mobile-bar-nav,.ds-interaction-fill.sc-ds-mobile-bar-nav>.ds-interaction-fill__content.sc-ds-mobile-bar-nav,.ds-interaction-fill__content.sc-ds-mobile-bar-nav{position:relative;z-index:2;cursor:inherit}.ds-interaction-fill--on-faint.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-faint.sc-ds-mobile-bar-nav{--ds-interaction-active:var(--color-interaction-active)}.ds-interaction-fill--on-medium.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-medium.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-interaction-on-medium-background-hover);--ds-interaction-pressed:var(--color-interaction-on-medium-background-pressed);--ds-interaction-active:var(--color-interaction-on-medium-background-active);--ds-focus-ring-color:var(--color-interaction-on-medium-background-focus)}.ds-interaction-fill--on-bold.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-bold.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-interaction-on-bold-background-hover);--ds-interaction-pressed:var(--color-interaction-on-bold-background-pressed);--ds-interaction-active:var(--color-interaction-on-bold-background-active);--ds-focus-ring-color:var(--color-interaction-on-bold-background-focus)}.ds-interaction-fill--on-strong.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-strong.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-interaction-on-strong-background-hover);--ds-interaction-pressed:var(--color-interaction-on-strong-background-pressed);--ds-interaction-active:var(--color-interaction-on-strong-background-active);--ds-focus-ring-color:var(--color-interaction-on-strong-background-focus)}.ds-interaction-fill--on-translucent.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-translucent.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-translucent-interaction-hover);--ds-interaction-pressed:var(--color-translucent-interaction-pressed);--ds-interaction-active:var(--color-translucent-interaction-active);--ds-focus-ring-color:var(--color-translucent-interaction-focus)}.ds-interaction-fill--on-inverted.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-inverted.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-inverted-interaction-hover);--ds-interaction-pressed:var(--color-inverted-interaction-pressed);--ds-interaction-active:var(--color-inverted-interaction-active);--ds-focus-ring-color:var(--color-inverted-interaction-focus)}.ds-interaction-fill--on-media.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-media.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-media-interaction-hover);--ds-interaction-pressed:var(--color-media-interaction-pressed);--ds-interaction-active:var(--color-media-interaction-active);--ds-focus-ring-color:var(--color-media-interaction-focus)}.ds-interaction-fill--on-always-dark.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-always-dark.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-always-dark-interaction-hover);--ds-interaction-pressed:var(--color-always-dark-interaction-pressed);--ds-interaction-active:var(--color-always-dark-interaction-active);--ds-focus-ring-color:var(--color-always-dark-interaction-focus)}.ds-interaction-fill--on-navigation.sc-ds-mobile-bar-nav-h,.ds-interaction-fill--on-navigation.sc-ds-mobile-bar-nav{--ds-interaction-hover:var(--color-navigation-interaction-hover);--ds-interaction-pressed:var(--color-navigation-interaction-pressed);--ds-interaction-active:var(--color-navigation-interaction-active);--ds-focus-ring-color:var(--color-navigation-interaction-focus)}.sc-ds-mobile-bar-nav-h{display:block;min-width:0;background:var(--color-background-secondary);color:var(--color-foreground-tertiary);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.mobile-bar-nav.sc-ds-mobile-bar-nav{justify-content:space-between;min-width:0;padding-block-end:max(var(--ds-chrome-padding), env(safe-area-inset-bottom));border-top:var(--dimension-stroke-width-012) solid var(--color-border-tertiary);background:var(--color-background-secondary);-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}.mobile-bar-nav__group.sc-ds-mobile-bar-nav{display:flex;align-items:center;gap:var(--dimension-space-100)}.mobile-bar-nav__item.sc-ds-mobile-bar-nav{appearance:none;flex:0 0 var(--dimension-size-500);width:var(--dimension-size-500);height:var(--dimension-size-500);padding:var(--dimension-space-100);border:0;border-radius:var(--dimension-radius-025);background:transparent;color:inherit;display:inline-flex;align-items:center;justify-content:center;cursor:default}.mobile-bar-nav__item--selected.sc-ds-mobile-bar-nav{color:var(--color-foreground-primary)}@media (hover: none) and (pointer: coarse){.mobile-bar-nav__item.ds-interaction-fill.sc-ds-mobile-bar-nav:active:not(:disabled)::after{background:transparent}.mobile-bar-nav__item--pressed.ds-interaction-fill.sc-ds-mobile-bar-nav::after,.mobile-bar-nav__item--pressed.ds-interaction-fill.sc-ds-mobile-bar-nav:active:not(:disabled)::after{background:var(--ds-interaction-pressed)}}.mobile-bar-nav__divider.sc-ds-mobile-bar-nav{flex:0 0 var(--dimension-stroke-width-012);width:var(--dimension-stroke-width-012);height:var(--dimension-iconography-lg);background:var(--color-border-tertiary);pointer-events:none;-webkit-user-select:none;user-select:none}.mobile-bar-nav__icon.sc-ds-mobile-bar-nav{position:relative;display:inline-flex;align-items:center;justify-content:center;width:var(--dimension-iconography-lg);height:var(--dimension-iconography-lg)}.mobile-bar-nav__dot.sc-ds-mobile-bar-nav{position:absolute;inset-block-start:calc(var(--dimension-space-025) * -1);inset-inline-end:calc(var(--dimension-space-025) * -1)}`;const b=120;const v=i(class i extends e{constructor(i){super();if(i!==false){this.__registerHost()}this.dsSheetNavToggle=n(this,"dsSheetNavToggle");this.dsDestinationChange=n(this,"dsDestinationChange");this.activeDestination="area";this.currentArea={id:"tracking",icon:"MapPage",label:"Tracking"};this.sheetNavExpanded=false;this.menuLabel="Menu";this.searchLabel="Search";this.agentsLabel="Agents";this.inboxLabel="Inbox";this.helpLabel="Help & Support";this.searchDot=false;this.agentsDot=false;this.inboxDot=false;this.pressedItemId=null;this.activePointerId=null;this.pressedAt=0;this.pressClearTimer=null}disconnectedCallback(){this.clearPressedItem()}clearPressTimer(){if(this.pressClearTimer===null)return;clearTimeout(this.pressClearTimer);this.pressClearTimer=null}clearPressedItem(){this.clearPressTimer();this.activePointerId=null;this.pressedItemId=null}beginDirectPress(i,e){if(!e.isPrimary||e.pointerType==="mouse"||e.button!==0)return;this.clearPressTimer();this.activePointerId=e.pointerId;this.pressedAt=performance.now();this.pressedItemId=i;const n=e.currentTarget;try{n.setPointerCapture(e.pointerId)}catch{}}finishDirectPress(i){if(i.pointerId!==this.activePointerId)return;this.activePointerId=null;const e=Math.max(0,b-(performance.now()-this.pressedAt));this.clearPressTimer();this.pressClearTimer=setTimeout((()=>{this.pressClearTimer=null;this.pressedItemId=null}),e)}cancelDirectPress(i){if(i.pointerId!==this.activePointerId)return;this.clearPressedItem()}pressHandlers(i){return{onPointerDown:e=>this.beginDirectPress(i,e),onPointerUp:i=>this.finishDirectPress(i),onPointerCancel:i=>this.cancelDirectPress(i),onLostPointerCapture:i=>this.finishDirectPress(i)}}destinationConfig(){const i=this.activeDestination==="help"?{id:"help",icon:"CircleQuestion",label:this.helpLabel,dot:false}:{id:"area",icon:this.currentArea.icon||"MapPage",label:this.currentArea.label||"Area",dot:false};return[i,{id:"search",icon:"MagnifyingGlass",label:this.searchLabel,dot:this.searchDot},{id:"inbox",icon:"Inbox",label:this.inboxLabel,dot:this.inboxDot},{id:"agents",icon:"AI",label:this.agentsLabel,dot:this.agentsDot}]}selectDestination(i){if(!r(this.activeDestination,i,this.sheetNavExpanded)){return}this.dsDestinationChange.emit({destination:i});requestAnimationFrame((()=>{void this.focusDestination(i)}))}async focusDestination(i){const e=this.el.querySelector(`#${i==="sheet-nav"?"ds-mobile-sheet-nav-trigger":`ds-mobile-bar-${i}-trigger`}`);e?.focus({preventScroll:true})}renderDestination(i){const e=!this.sheetNavExpanded&&i.id===this.activeDestination;return s("button",{id:`ds-mobile-bar-${i.id}-trigger`,type:"button",class:{"mobile-bar-nav__item":true,"mobile-bar-nav__item--selected":e,"mobile-bar-nav__item--pressed":this.pressedItemId===i.id,"ds-focus-ring-inset":true,"ds-interaction-fill":true},"aria-label":i.label,"aria-current":e?"page":undefined,onClick:()=>this.selectDestination(i.id),...this.pressHandlers(i.id)},s("span",{class:"mobile-bar-nav__icon ds-interaction-fill__content"},s("ds-icon",{name:i.icon,size:"lg",color:"inherit"}),i.dot&&s("ds-badge",{class:"mobile-bar-nav__dot",variant:"dot",label:"","aria-hidden":"true"})))}render(){const[i,...e]=this.destinationConfig();return s(o,{key:"1fdb0a76033e09a1038a01a90a67b6a1ebe5d89a"},s("nav",{key:"9ecc80c5a54dae383a10ca670bb932b7eeba4ad8",class:"mobile-bar-nav ds-chrome-row ds-chrome-space--md","aria-label":"Primary"},s("div",{key:"ef1f41f19397b75d69b23491f7bb37023f4a61a4",class:"mobile-bar-nav__group mobile-bar-nav__group--context"},s("button",{key:"eb3ac35e96dd4dbd1f2aab6cf572ce2e7c2844e7",id:"ds-mobile-sheet-nav-trigger",type:"button",class:{"mobile-bar-nav__item":true,"mobile-bar-nav__item--selected":this.sheetNavExpanded,"mobile-bar-nav__item--pressed":this.pressedItemId==="sheet-nav","ds-focus-ring-inset":true,"ds-interaction-fill":true},"aria-label":this.menuLabel,"aria-expanded":String(this.sheetNavExpanded),"aria-controls":"ds-mobile-sheet-nav",onClick:()=>this.dsSheetNavToggle.emit(!this.sheetNavExpanded),...this.pressHandlers("sheet-nav")},s("span",{key:"c5dc4d75abca75b3635fa9855a4dd27b8577dea3",class:"mobile-bar-nav__icon ds-interaction-fill__content"},s("ds-icon",{key:"0e707db8ee663f3a342f070fd2bc2da665837514",name:this.sheetNavExpanded?"Cross":"Hamburger",size:"lg",color:"inherit"}))),s("span",{key:"949ce74732f39e9361e9693d80ed5ad574fe2e80",class:"mobile-bar-nav__divider","aria-hidden":"true"}),this.renderDestination(i)),s("div",{key:"fe0bde69cb751898fb65aa67d463bf7904ad7c57",class:"mobile-bar-nav__group mobile-bar-nav__group--tools"},e.map((i=>this.renderDestination(i))))))}get el(){return this}static get style(){return l()}},[2,"ds-mobile-bar-nav",{activeDestination:[1,"active-destination"],currentArea:[16],sheetNavExpanded:[4,"sheet-nav-expanded"],menuLabel:[1,"menu-label"],searchLabel:[1,"search-label"],agentsLabel:[1,"agents-label"],inboxLabel:[1,"inbox-label"],helpLabel:[1,"help-label"],searchDot:[4,"search-dot"],agentsDot:[4,"agents-dot"],inboxDot:[4,"inbox-dot"],pressedItemId:[32],focusDestination:[64]}]);function m(){if(typeof customElements==="undefined"){return}const i=["ds-mobile-bar-nav","ds-badge","ds-icon","ds-text"];i.forEach((i=>{switch(i){case"ds-mobile-bar-nav":if(!customElements.get(a(i))){customElements.define(a(i),v)}break;case"ds-badge":if(!customElements.get(a(i))){t()}break;case"ds-icon":if(!customElements.get(a(i))){c()}break;case"ds-text":if(!customElements.get(a(i))){d()}break}}))}m();export{v as M,m as d};
|
|
2
|
+
//# sourceMappingURL=p-BbMJTilO.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["mobileBarNavCss","MINIMUM_DIRECT_PRESS_MS","MobileBarNav","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","activeDestination","currentArea","id","icon","label","sheetNavExpanded","menuLabel","searchLabel","agentsLabel","inboxLabel","helpLabel","searchDot","agentsDot","inboxDot","pressedItemId","activePointerId","pressedAt","pressClearTimer","disconnectedCallback","clearPressedItem","clearPressTimer","clearTimeout","beginDirectPress","itemId","event","isPrimary","pointerType","button","pointerId","performance","now","target","currentTarget","setPointerCapture","finishDirectPress","remaining","Math","max","setTimeout","cancelDirectPress","pressHandlers","onPointerDown","onPointerUp","onPointerCancel","onLostPointerCapture","destinationConfig","dot","selectDestination","destination","shouldEmitMobileDestinationChange","dsDestinationChange","emit","requestAnimationFrame","focusDestination","el","querySelector","focus","preventScroll","renderDestination","item","selected","h","type","class","undefined","onClick","name","size","color","variant","render","tools","Host","key","String","dsSheetNavToggle","map"],"sources":["src/wc/components/MobileBarNav/MobileBarNav.css?tag=ds-mobile-bar-nav&encapsulation=scoped","src/wc/components/MobileBarNav/MobileBarNav.tsx"],"sourcesContent":["@import '../../utils/chrome-layout.css';\n@import '../../utils/focus-ring.css';\n@import '../../utils/interaction-fill.css';\n\n:host {\n display: block;\n min-width: 0;\n background: var(--color-background-secondary);\n color: var(--color-foreground-tertiary);\n -webkit-user-select: none;\n user-select: none;\n -webkit-touch-callout: none;\n}\n\n.mobile-bar-nav {\n justify-content: space-between;\n min-width: 0;\n padding-block-end: max(var(--ds-chrome-padding), env(safe-area-inset-bottom));\n border-top: var(--dimension-stroke-width-012) solid var(--color-border-tertiary);\n background: var(--color-background-secondary);\n -webkit-user-select: none;\n user-select: none;\n -webkit-touch-callout: none;\n}\n\n.mobile-bar-nav__group {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-100);\n}\n\n.mobile-bar-nav__item {\n appearance: none;\n flex: 0 0 var(--dimension-size-500);\n width: var(--dimension-size-500);\n height: var(--dimension-size-500);\n padding: var(--dimension-space-100);\n border: 0;\n border-radius: var(--dimension-radius-025);\n background: transparent;\n color: inherit;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n cursor: default;\n}\n\n.mobile-bar-nav__item--selected {\n color: var(--color-foreground-primary);\n}\n\n/*\n * Safari can retain its native :active state after a direct touch. On coarse\n * touch-only pointers, the component-owned class provides one deterministic\n * press frame and clears it after release/cancel.\n */\n@media (hover: none) and (pointer: coarse) {\n .mobile-bar-nav__item.ds-interaction-fill:active:not(:disabled)::after {\n background: transparent;\n }\n\n .mobile-bar-nav__item--pressed.ds-interaction-fill::after,\n .mobile-bar-nav__item--pressed.ds-interaction-fill:active:not(:disabled)::after {\n background: var(--ds-interaction-pressed);\n }\n}\n\n.mobile-bar-nav__divider {\n flex: 0 0 var(--dimension-stroke-width-012);\n width: var(--dimension-stroke-width-012);\n height: var(--dimension-iconography-lg);\n background: var(--color-border-tertiary);\n pointer-events: none;\n -webkit-user-select: none;\n user-select: none;\n}\n\n.mobile-bar-nav__icon {\n position: relative;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: var(--dimension-iconography-lg);\n height: var(--dimension-iconography-lg);\n}\n\n.mobile-bar-nav__dot {\n position: absolute;\n inset-block-start: calc(var(--dimension-space-025) * -1);\n inset-inline-end: calc(var(--dimension-space-025) * -1);\n}\n","import {\n Component,\n Element,\n Event,\n EventEmitter,\n h,\n Host,\n Method,\n Prop,\n State,\n} from '@stencil/core';\nimport {\n shouldEmitMobileDestinationChange,\n type MobileDestination,\n} from '../../shell/shell-responsive';\nimport type { PanelNavItem } from '../PanelNav/panel-nav-types';\nimport type { MobileBarNavDestinationDetail } from './mobile-bar-nav-types';\n\ninterface DestinationConfig {\n id: MobileDestination;\n icon: string;\n label: string;\n dot: boolean;\n}\n\nconst MINIMUM_DIRECT_PRESS_MS = 120;\n\n@Component({\n tag: 'ds-mobile-bar-nav',\n styleUrl: 'MobileBarNav.css',\n scoped: true,\n})\nexport class MobileBarNav {\n @Element() el!: HTMLElement;\n\n @Prop() activeDestination: MobileDestination = 'area';\n @Prop() currentArea: PanelNavItem = {\n id: 'tracking',\n icon: 'MapPage',\n label: 'Tracking',\n };\n @Prop() sheetNavExpanded: boolean = false;\n @Prop() menuLabel: string = 'Menu';\n @Prop() searchLabel: string = 'Search';\n @Prop() agentsLabel: string = 'Agents';\n @Prop() inboxLabel: string = 'Inbox';\n @Prop() helpLabel: string = 'Help & Support';\n @Prop() searchDot: boolean = false;\n @Prop() agentsDot: boolean = false;\n @Prop() inboxDot: boolean = false;\n\n @State() private pressedItemId: string | null = null;\n\n @Event() dsSheetNavToggle!: EventEmitter<boolean>;\n @Event() dsDestinationChange!: EventEmitter<MobileBarNavDestinationDetail>;\n\n private activePointerId: number | null = null;\n private pressedAt = 0;\n private pressClearTimer: ReturnType<typeof setTimeout> | null = null;\n\n disconnectedCallback() {\n this.clearPressedItem();\n }\n\n private clearPressTimer() {\n if (this.pressClearTimer === null) return;\n clearTimeout(this.pressClearTimer);\n this.pressClearTimer = null;\n }\n\n private clearPressedItem() {\n this.clearPressTimer();\n this.activePointerId = null;\n this.pressedItemId = null;\n }\n\n private beginDirectPress(itemId: string, event: PointerEvent) {\n if (!event.isPrimary || event.pointerType === 'mouse' || event.button !== 0) return;\n\n this.clearPressTimer();\n this.activePointerId = event.pointerId;\n this.pressedAt = performance.now();\n this.pressedItemId = itemId;\n\n const target = event.currentTarget as HTMLElement;\n try {\n target.setPointerCapture(event.pointerId);\n } catch {\n // Pointer capture can fail if Safari has already cancelled the stream.\n }\n }\n\n private finishDirectPress(event: PointerEvent) {\n if (event.pointerId !== this.activePointerId) return;\n\n this.activePointerId = null;\n const remaining = Math.max(\n 0,\n MINIMUM_DIRECT_PRESS_MS - (performance.now() - this.pressedAt)\n );\n\n this.clearPressTimer();\n this.pressClearTimer = setTimeout(() => {\n this.pressClearTimer = null;\n this.pressedItemId = null;\n }, remaining);\n }\n\n private cancelDirectPress(event: PointerEvent) {\n if (event.pointerId !== this.activePointerId) return;\n this.clearPressedItem();\n }\n\n private pressHandlers(itemId: string) {\n return {\n onPointerDown: (event: PointerEvent) => this.beginDirectPress(itemId, event),\n onPointerUp: (event: PointerEvent) => this.finishDirectPress(event),\n onPointerCancel: (event: PointerEvent) => this.cancelDirectPress(event),\n onLostPointerCapture: (event: PointerEvent) => this.finishDirectPress(event),\n };\n }\n\n private destinationConfig(): DestinationConfig[] {\n const currentArea =\n this.activeDestination === 'help'\n ? {\n id: 'help' as const,\n icon: 'CircleQuestion',\n label: this.helpLabel,\n dot: false,\n }\n : {\n id: 'area' as const,\n icon: this.currentArea.icon || 'MapPage',\n label: this.currentArea.label || 'Area',\n dot: false,\n };\n\n return [\n currentArea,\n { id: 'search', icon: 'MagnifyingGlass', label: this.searchLabel, dot: this.searchDot },\n { id: 'inbox', icon: 'Inbox', label: this.inboxLabel, dot: this.inboxDot },\n { id: 'agents', icon: 'AI', label: this.agentsLabel, dot: this.agentsDot },\n ];\n }\n\n private selectDestination(destination: MobileDestination) {\n if (\n !shouldEmitMobileDestinationChange(\n this.activeDestination,\n destination,\n this.sheetNavExpanded\n )\n ) {\n return;\n }\n this.dsDestinationChange.emit({ destination });\n // Owners may replace the visible mobile stage (and transiently drop focus\n // in WebKit) while handling the controlled destination change.\n requestAnimationFrame(() => {\n void this.focusDestination(destination);\n });\n }\n\n @Method()\n async focusDestination(destination: MobileDestination | 'sheet-nav') {\n const target = this.el.querySelector<HTMLElement>(\n `#${\n destination === 'sheet-nav'\n ? 'ds-mobile-sheet-nav-trigger'\n : `ds-mobile-bar-${destination}-trigger`\n }`\n );\n target?.focus({ preventScroll: true });\n }\n\n private renderDestination(item: DestinationConfig) {\n const selected = !this.sheetNavExpanded && item.id === this.activeDestination;\n return (\n <button\n id={`ds-mobile-bar-${item.id}-trigger`}\n type=\"button\"\n class={{\n 'mobile-bar-nav__item': true,\n 'mobile-bar-nav__item--selected': selected,\n 'mobile-bar-nav__item--pressed': this.pressedItemId === item.id,\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n }}\n aria-label={item.label}\n aria-current={selected ? 'page' : undefined}\n onClick={() => this.selectDestination(item.id)}\n {...this.pressHandlers(item.id)}\n >\n <span class=\"mobile-bar-nav__icon ds-interaction-fill__content\">\n <ds-icon name={item.icon} size=\"lg\" color=\"inherit\" />\n {item.dot && (\n <ds-badge class=\"mobile-bar-nav__dot\" variant=\"dot\" label=\"\" aria-hidden=\"true\" />\n )}\n </span>\n </button>\n );\n }\n\n render() {\n const [currentArea, ...tools] = this.destinationConfig();\n\n return (\n <Host>\n <nav class=\"mobile-bar-nav ds-chrome-row ds-chrome-space--md\" aria-label=\"Primary\">\n <div class=\"mobile-bar-nav__group mobile-bar-nav__group--context\">\n <button\n id=\"ds-mobile-sheet-nav-trigger\"\n type=\"button\"\n class={{\n 'mobile-bar-nav__item': true,\n 'mobile-bar-nav__item--selected': this.sheetNavExpanded,\n 'mobile-bar-nav__item--pressed':\n this.pressedItemId === 'sheet-nav',\n 'ds-focus-ring-inset': true,\n 'ds-interaction-fill': true,\n }}\n aria-label={this.menuLabel}\n aria-expanded={String(this.sheetNavExpanded)}\n aria-controls=\"ds-mobile-sheet-nav\"\n onClick={() => this.dsSheetNavToggle.emit(!this.sheetNavExpanded)}\n {...this.pressHandlers('sheet-nav')}\n >\n <span class=\"mobile-bar-nav__icon ds-interaction-fill__content\">\n <ds-icon\n name={this.sheetNavExpanded ? 'Cross' : 'Hamburger'}\n size=\"lg\"\n color=\"inherit\"\n />\n </span>\n </button>\n <span class=\"mobile-bar-nav__divider\" aria-hidden=\"true\" />\n {this.renderDestination(currentArea)}\n </div>\n <div class=\"mobile-bar-nav__group mobile-bar-nav__group--tools\">\n {tools.map(item => this.renderDestination(item))}\n </div>\n </nav>\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{p as i,H as d,h as e,a as r,t as s}from"./index.js";const a=()=>`.sc-ds-divider-h{--_divider-color:var(--color-divider-divider);--_divider-inset:0;--_divider-length:100%;display:block;flex-shrink:0;width:var(--_divider-length);height:var(--dimension-stroke-width-012);margin:0 var(--_divider-inset);border:none;background-color:var(--_divider-color)}.divider--vertical.sc-ds-divider-h{width:var(--dimension-stroke-width-012);height:var(--_divider-length);min-height:var(--dimension-stroke-width-012);margin:var(--_divider-inset) 0;align-self:stretch}.divider--vertical.divider--custom-length.sc-ds-divider-h{align-self:center}[background='bold'].sc-ds-divider-h,.divider--background-bold.sc-ds-divider-h{--_divider-color:var(--color-divider-divider-on-bold-background)}[background='strong'].sc-ds-divider-h,.divider--background-strong.sc-ds-divider-h{--_divider-color:var(--color-divider-divider-on-strong-background)}[background='medium'].sc-ds-divider-h,.divider--background-medium.sc-ds-divider-h{--_divider-color:var(--color-divider-divider-on-medium-background)}[background='translucent'].sc-ds-divider-h,.divider--background-translucent.sc-ds-divider-h{--_divider-color:var(--color-translucent-divider)}[background='navigation'].sc-ds-divider-h,.divider--background-navigation.sc-ds-divider-h{--_divider-color:var(--color-navigation-divider)}[background='media'].sc-ds-divider-h,.divider--background-media.sc-ds-divider-h{--_divider-color:var(--color-media-divider)}[background='always-dark'].sc-ds-divider-h,.divider--background-always-dark.sc-ds-divider-h{--_divider-color:var(--color-always-dark-divider)}[background='inverted'].sc-ds-divider-h,.divider--background-inverted.sc-ds-divider-h{--_divider-color:var(--color-inverted-divider)}`;const n={none:"0","space-000":"var(--dimension-space-000)","space-012":"var(--dimension-space-012)","space-025":"var(--dimension-space-025)","space-050":"var(--dimension-space-050)","space-075":"var(--dimension-space-075)","space-100":"var(--dimension-space-100)","space-125":"var(--dimension-space-125)","space-150":"var(--dimension-space-150)","space-175":"var(--dimension-space-175)","space-200":"var(--dimension-space-200)","space-250":"var(--dimension-space-250)","space-300":"var(--dimension-space-300)","space-400":"var(--dimension-space-400)","space-600":"var(--dimension-space-600)","space-800":"var(--dimension-space-800)"};const o=i(class i extends d{constructor(i){super();if(i!==false){this.__registerHost()}this.orientation="horizontal";this.inset="none";this.length="auto";this.semantic=false}resolveInset(){return Object.prototype.hasOwnProperty.call(n,this.inset)?n[this.inset]:this.inset}resolveLength(){return this.length==="auto"||this.length==="full"?"100%":this.length}render(){const i=this.orientation==="vertical";const d=this.length!=="auto"&&this.length!=="full";return e(r,{key:"
|
|
2
|
-
//# sourceMappingURL=p-
|
|
1
|
+
import{p as i,H as d,h as e,a as r,t as s}from"./index.js";const a=()=>`.sc-ds-divider-h{--_divider-color:var(--color-divider-divider);--_divider-inset:0;--_divider-length:100%;display:block;flex-shrink:0;width:var(--_divider-length);height:var(--dimension-stroke-width-012);margin:0 var(--_divider-inset);border:none;background-color:var(--_divider-color)}.divider--vertical.sc-ds-divider-h{width:var(--dimension-stroke-width-012);height:var(--_divider-length);min-height:var(--dimension-stroke-width-012);margin:var(--_divider-inset) 0;align-self:stretch}.divider--vertical.divider--custom-length.sc-ds-divider-h{align-self:center}[background='bold'].sc-ds-divider-h,.divider--background-bold.sc-ds-divider-h{--_divider-color:var(--color-divider-divider-on-bold-background)}[background='strong'].sc-ds-divider-h,.divider--background-strong.sc-ds-divider-h{--_divider-color:var(--color-divider-divider-on-strong-background)}[background='medium'].sc-ds-divider-h,.divider--background-medium.sc-ds-divider-h{--_divider-color:var(--color-divider-divider-on-medium-background)}[background='translucent'].sc-ds-divider-h,.divider--background-translucent.sc-ds-divider-h{--_divider-color:var(--color-translucent-divider)}[background='navigation'].sc-ds-divider-h,.divider--background-navigation.sc-ds-divider-h{--_divider-color:var(--color-navigation-divider)}[background='media'].sc-ds-divider-h,.divider--background-media.sc-ds-divider-h{--_divider-color:var(--color-media-divider)}[background='always-dark'].sc-ds-divider-h,.divider--background-always-dark.sc-ds-divider-h{--_divider-color:var(--color-always-dark-divider)}[background='inverted'].sc-ds-divider-h,.divider--background-inverted.sc-ds-divider-h{--_divider-color:var(--color-inverted-divider)}`;const n={none:"0","space-000":"var(--dimension-space-000)","space-012":"var(--dimension-space-012)","space-025":"var(--dimension-space-025)","space-050":"var(--dimension-space-050)","space-075":"var(--dimension-space-075)","space-100":"var(--dimension-space-100)","space-125":"var(--dimension-space-125)","space-150":"var(--dimension-space-150)","space-175":"var(--dimension-space-175)","space-200":"var(--dimension-space-200)","space-250":"var(--dimension-space-250)","space-300":"var(--dimension-space-300)","space-400":"var(--dimension-space-400)","space-600":"var(--dimension-space-600)","space-800":"var(--dimension-space-800)"};const o=i(class i extends d{constructor(i){super();if(i!==false){this.__registerHost()}this.orientation="horizontal";this.inset="none";this.length="auto";this.semantic=false}resolveInset(){return Object.prototype.hasOwnProperty.call(n,this.inset)?n[this.inset]:this.inset}resolveLength(){return this.length==="auto"||this.length==="full"?"100%":this.length}render(){const i=this.orientation==="vertical";const d=this.length!=="auto"&&this.length!=="full";return e(r,{key:"f6a56ef653253d263960139f0ce9a7738c37d2c7",role:this.semantic?"separator":undefined,"aria-orientation":this.semantic?this.orientation:undefined,"aria-hidden":this.semantic?undefined:"true",class:{divider:true,"divider--vertical":i,"divider--custom-length":d,[`divider--background-${this.background}`]:!!this.background},style:{"--_divider-inset":this.resolveInset(),"--_divider-length":this.resolveLength()}})}static get style(){return a()}},[2,"ds-divider",{orientation:[1],background:[1],inset:[1],length:[1],semantic:[4]}]);function c(){if(typeof customElements==="undefined"){return}const i=["ds-divider"];i.forEach((i=>{switch(i){case"ds-divider":if(!customElements.get(s(i))){customElements.define(s(i),o)}break}}))}c();export{o as D,c as d};
|
|
2
|
+
//# sourceMappingURL=p-BcTYhmku.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as s,H as i,c as t,h as e,a as n,t as o}from"./index.js";import{D as r,s as a}from"./p-DOUk4KoT.js";import{s as d}from"./p-D2xWcVv6.js";const h=()=>`:host{--ds-focus-ring-width:var(--dimension-stroke-width-025, 2px);--ds-focus-ring-offset:var(--dimension-space-025, 2px);--ds-focus-ring-color:var(--color-interaction-focus)}:host(.ds-focus-ring),.ds-focus-ring,:host(.ds-focus-ring-inset),.ds-focus-ring-inset{outline:none;-webkit-tap-highlight-color:transparent;touch-action:manipulation}:host(.ds-focus-ring:focus-visible),.ds-focus-ring:focus-visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring.ds-focus-ring--visible),.ds-focus-ring.ds-focus-ring--visible{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:var(--ds-focus-ring-offset)}:host(.ds-focus-ring-inset:focus-visible),.ds-focus-ring-inset:focus-visible{outline:none}:host(.ds-focus-ring-inset:focus-visible)::after,.ds-focus-ring-inset:focus-visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}:host(.ds-focus-ring-inset.ds-focus-ring--visible),.ds-focus-ring-inset.ds-focus-ring--visible{outline:none}:host(.ds-focus-ring-inset.ds-focus-ring--visible)::after,.ds-focus-ring-inset.ds-focus-ring--visible::after{outline:var(--ds-focus-ring-width) solid var(--ds-focus-ring-color);outline-offset:calc(-1 * var(--ds-focus-ring-width))}:host(.ds-control-inactive),.ds-control-inactive{opacity:0.5;pointer-events:none;cursor:not-allowed}:host{--ds-switch-width:var(--dimension-size-400);--ds-switch-height:var(--dimension-size-250);--ds-switch-thumb-size:var(--dimension-size-150);--ds-switch-gap:var(--dimension-space-050);--ds-switch-stroke:var(--dimension-stroke-width-012);--ds-switch-inset:var(--ds-switch-gap);--ds-switch-thumb-hover:var(--color-interaction-hover);--ds-switch-thumb-pressed:var(--color-interaction-pressed);--ds-switch-travel:calc( var(--ds-switch-width) - var(--ds-switch-thumb-size) - var(--ds-switch-inset) - var(--ds-switch-inset) );position:relative;display:inline-flex;width:var(--ds-switch-width);height:var(--ds-switch-height);padding:0;border:none;border-radius:var(--dimension-radius-half);box-sizing:border-box;flex-shrink:0;overflow:visible;cursor:default;user-select:none;outline:none;background-color:transparent;box-shadow:inset 0 0 0 var(--ds-switch-stroke) var(--color-border-secondary);transition:background-color var(--effect-motion-short-3), box-shadow var(--effect-motion-short-3)}:host(.switch--lg){--ds-switch-width:var(--dimension-size-500);--ds-switch-height:var(--dimension-size-300);--ds-switch-thumb-size:var(--dimension-iconography-sm);--ds-switch-gap:var(--dimension-space-050)}:host(.switch--sm){--ds-switch-width:var(--dimension-size-300);--ds-switch-height:var(--dimension-size-200);--ds-switch-thumb-size:calc(var(--dimension-size-base) * 5 / 4);--ds-switch-gap:calc(var(--dimension-space-025) + var(--dimension-space-012))}:host(.switch--xs){--ds-switch-width:var(--dimension-size-250);--ds-switch-height:var(--dimension-size-150);--ds-switch-thumb-size:var(--dimension-size-100);--ds-switch-gap:var(--dimension-space-025)}:host(.checked){background-color:var(--color-background-bold-brand);box-shadow:none}:host(.switch--readonly),:host(.switch--presentation){cursor:default}:host(.switch--presentation){pointer-events:none}.thumb{position:absolute;top:50%;left:var(--ds-switch-inset);width:var(--ds-switch-thumb-size);height:var(--ds-switch-thumb-size);border-radius:var(--dimension-radius-half);background-color:var(--color-foreground-tertiary);box-shadow:none;transform:translateY(-50%);transition:background-color var(--effect-motion-short-3), transform var(--effect-motion-short-3);pointer-events:none}.thumb::after{content:'';position:absolute;inset:0;border-radius:inherit;background:transparent;pointer-events:none}:host(:hover:not(:disabled):not(.ds-control-inactive):not(.switch--readonly):not(.switch--presentation)) .thumb::after{background:var(--ds-switch-thumb-hover)}:host(:active:not(:disabled):not(.ds-control-inactive):not(.switch--readonly):not(.switch--presentation)) .thumb::after{background:var(--ds-switch-thumb-pressed)}:host(.checked) .thumb{background-color:var(--color-background-primary);box-shadow:none;transform:translate3d(var(--ds-switch-travel), -50%, 0)}@media (prefers-reduced-motion: reduce){:host{transition:none}.thumb{transition:none}}`;let c=0;const u=s(class s extends i{constructor(s){super();if(s!==false){this.__registerHost()}this.__attachShadow();this.dsChange=t(this,"dsChange");this.internals=this.attachInternals();this.checked=false;this.value="on";this.disabled=false;this.readOnly=false;this.required=false;this.requiredMessage=r;this.isInactive=false;this.size="md";this.presentation=false;this.initialChecked=false;this.formDisabled=false;this.focused=false;this.touched=false;this.handleClick=()=>{if(this.presentation||this.readOnly||this.isInactive||this.disabled||this.formDisabled)return;this.checked=!this.checked;this.dsChange.emit(this.checked)};this.handleKeyDown=s=>{if(this.presentation||this.readOnly||this.isInactive||this.disabled||this.formDisabled)return;if(s.key===" "||s.key==="Enter"){s.preventDefault();this.handleClick()}};this.handleFocus=()=>{if(!this.presentation)this.focused=true};this.handleBlur=()=>{if(this.presentation)return;this.focused=false;this.touched=true}}componentWillLoad(){this.initialChecked=this.checked;this.syncFormValue()}componentDidLoad(){this.syncNativeLabels()}syncFormValue(){const s=this.presentation||this.isInactive||this.disabled||this.formDisabled;const i=this.checked?this.value:this.uncheckedValue??null;const t=this.checked?"checked":"unchecked";d(this.internals,i,{inactive:s,state:t});const e=this.required&&!s&&!this.checked;a(this.internals,e,this.requiredMessage)}formDisabledCallback(s){this.formDisabled=s;this.syncFormValue()}formResetCallback(){this.checked=this.initialChecked;this.focused=false;this.touched=false}formStateRestoreCallback(s){this.checked=s==="checked"}syncNativeLabels(){if(this.presentation)return;if(this.el.hasAttribute("aria-label")||this.el.hasAttribute("aria-labelledby"))return;const s=Array.from(this.internals.labels).map((s=>{if(!s.id)s.id=`ds-switch-label-${++c}`;return s.id}));if(s.length)this.el.setAttribute("aria-labelledby",s.join(" "))}render(){const s=this.isInactive||this.disabled||this.formDisabled;const i=this.required&&!s&&!this.checked;const t=this.checked!==this.initialChecked;return e(n,{key:"70ea6f3626f481103f705f54b612f7c47fa576b0",role:this.presentation?undefined:"switch","aria-checked":this.presentation?undefined:String(this.checked),"aria-disabled":!this.presentation&&s?"true":undefined,"aria-readonly":!this.presentation&&this.readOnly?"true":undefined,"aria-required":!this.presentation&&this.required?"true":undefined,"aria-invalid":!this.presentation&&i?"true":undefined,"aria-hidden":this.presentation?"true":undefined,"data-checked":this.checked?"":undefined,"data-unchecked":!this.checked?"":undefined,"data-disabled":s?"":undefined,"data-readonly":this.readOnly?"":undefined,"data-required":this.required?"":undefined,"data-focused":!this.presentation&&this.focused?"":undefined,"data-filled":!this.presentation&&this.checked?"":undefined,"data-dirty":!this.presentation&&t?"":undefined,"data-touched":!this.presentation&&this.touched?"":undefined,"data-valid":!this.presentation&&!s&&!i?"":undefined,"data-invalid":!this.presentation&&i?"":undefined,tabIndex:this.presentation||s?-1:0,class:{switch:true,checked:this.checked,"switch--lg":this.size==="lg","switch--md":this.size==="md","switch--sm":this.size==="sm","switch--xs":this.size==="xs","switch--readonly":this.readOnly,"switch--presentation":this.presentation,"ds-focus-ring":true,"ds-control-inactive":s},onClick:this.handleClick,onKeyDown:this.handleKeyDown,onFocus:this.handleFocus,onBlur:this.handleBlur},e("span",{key:"0e2f08250071fb580fb8c77d4414ed40520df259",class:"thumb"}))}static get formAssociated(){return true}get el(){return this}static get watchers(){return{checked:[{syncFormValue:0}],value:[{syncFormValue:0}],uncheckedValue:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],presentation:[{syncFormValue:0}],required:[{syncFormValue:0}]}}static get style(){return h()}},[65,"ds-switch",{checked:[1028],name:[513],value:[1],uncheckedValue:[1,"unchecked-value"],form:[513],disabled:[516],readOnly:[516,"read-only"],required:[516],requiredMessage:[1,"required-message"],isInactive:[4,"is-inactive"],size:[1],presentation:[4],formDisabled:[32],focused:[32],touched:[32]},undefined,{checked:[{syncFormValue:0}],value:[{syncFormValue:0}],uncheckedValue:[{syncFormValue:0}],disabled:[{syncFormValue:0}],isInactive:[{syncFormValue:0}],presentation:[{syncFormValue:0}],required:[{syncFormValue:0}]}]);function l(){if(typeof customElements==="undefined"){return}const s=["ds-switch"];s.forEach((s=>{switch(s){case"ds-switch":if(!customElements.get(o(s))){customElements.define(o(s),u)}break}}))}l();export{u as S,l as d};
|
|
2
|
+
//# sourceMappingURL=p-Bkv3UjZz.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["switchCss","generatedLabelId","Switch","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","checked","value","disabled","readOnly","required","requiredMessage","DEFAULT_REQUIRED_MESSAGE","isInactive","size","presentation","initialChecked","formDisabled","focused","touched","handleClick","dsChange","emit","handleKeyDown","event","key","preventDefault","handleFocus","handleBlur","componentWillLoad","syncFormValue","componentDidLoad","syncNativeLabels","inactive","submissionValue","uncheckedValue","state","setFormControlValue","internals","missing","setRequiredValidity","formDisabledCallback","formResetCallback","formStateRestoreCallback","el","hasAttribute","labelIds","Array","from","labels","map","label","id","length","setAttribute","join","render","invalid","dirty","h","Host","role","undefined","String","tabIndex","class","switch","onClick","onKeyDown","onFocus","onBlur"],"sources":["src/wc/components/Switch/Switch.css?tag=ds-switch&encapsulation=shadow","src/wc/components/Switch/Switch.tsx"],"sourcesContent":["@import '../../utils/focus-ring.css';\n@import '../../utils/control-inactive.css';\n\n:host {\n --ds-switch-width: var(--dimension-size-400);\n --ds-switch-height: var(--dimension-size-250);\n --ds-switch-thumb-size: var(--dimension-size-150);\n --ds-switch-gap: var(--dimension-space-050);\n --ds-switch-stroke: var(--dimension-stroke-width-012);\n --ds-switch-inset: var(--ds-switch-gap);\n --ds-switch-thumb-hover: var(--color-interaction-hover);\n --ds-switch-thumb-pressed: var(--color-interaction-pressed);\n --ds-switch-travel: calc(\n var(--ds-switch-width) - var(--ds-switch-thumb-size) - var(--ds-switch-inset) -\n var(--ds-switch-inset)\n );\n position: relative;\n display: inline-flex;\n width: var(--ds-switch-width);\n height: var(--ds-switch-height);\n padding: 0;\n border: none;\n border-radius: var(--dimension-radius-half);\n box-sizing: border-box;\n flex-shrink: 0;\n overflow: visible;\n cursor: default;\n user-select: none;\n outline: none;\n background-color: transparent;\n box-shadow: inset 0 0 0 var(--ds-switch-stroke) var(--color-border-secondary);\n transition:\n background-color var(--effect-motion-short-3),\n box-shadow var(--effect-motion-short-3);\n}\n\n:host(.switch--lg) {\n --ds-switch-width: var(--dimension-size-500);\n --ds-switch-height: var(--dimension-size-300);\n --ds-switch-thumb-size: var(--dimension-iconography-sm);\n --ds-switch-gap: var(--dimension-space-050);\n}\n\n:host(.switch--sm) {\n --ds-switch-width: var(--dimension-size-300);\n --ds-switch-height: var(--dimension-size-200);\n --ds-switch-thumb-size: calc(var(--dimension-size-base) * 5 / 4);\n --ds-switch-gap: calc(var(--dimension-space-025) + var(--dimension-space-012));\n}\n\n:host(.switch--xs) {\n --ds-switch-width: var(--dimension-size-250);\n --ds-switch-height: var(--dimension-size-150);\n --ds-switch-thumb-size: var(--dimension-size-100);\n --ds-switch-gap: var(--dimension-space-025);\n}\n\n:host(.checked) {\n background-color: var(--color-background-bold-brand);\n box-shadow: none;\n}\n\n:host(.switch--readonly),\n:host(.switch--presentation) {\n cursor: default;\n}\n\n:host(.switch--presentation) {\n pointer-events: none;\n}\n\n/* Inactive: `.ds-control-inactive` (50% opacity). */\n\n.thumb {\n position: absolute;\n top: 50%;\n left: var(--ds-switch-inset);\n width: var(--ds-switch-thumb-size);\n height: var(--ds-switch-thumb-size);\n border-radius: var(--dimension-radius-half);\n background-color: var(--color-foreground-tertiary);\n box-shadow: none;\n transform: translateY(-50%);\n transition:\n background-color var(--effect-motion-short-3),\n transform var(--effect-motion-short-3);\n pointer-events: none;\n}\n\n.thumb::after {\n content: '';\n position: absolute;\n inset: 0;\n border-radius: inherit;\n background: transparent;\n pointer-events: none;\n}\n\n:host(:hover:not(:disabled):not(.ds-control-inactive):not(.switch--readonly):not(.switch--presentation))\n .thumb::after {\n background: var(--ds-switch-thumb-hover);\n}\n\n:host(:active:not(:disabled):not(.ds-control-inactive):not(.switch--readonly):not(.switch--presentation))\n .thumb::after {\n background: var(--ds-switch-thumb-pressed);\n}\n\n:host(.checked) .thumb {\n background-color: var(--color-background-primary);\n box-shadow: none;\n transform: translate3d(var(--ds-switch-travel), -50%, 0);\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host {\n transition: none;\n }\n\n .thumb {\n transition: none;\n }\n}\n","import { AttachInternals, Component, Element, Prop, State, Event, EventEmitter, Watch, h, Host } from '@stencil/core';\nimport { DEFAULT_REQUIRED_MESSAGE, setFormControlValue, setRequiredValidity } from '../../utils';\n\nexport type SwitchSize = 'lg' | 'md' | 'sm' | 'xs';\n\nlet generatedLabelId = 0;\n\n@Component({\n tag: 'ds-switch',\n styleUrl: 'Switch.css',\n shadow: true,\n formAssociated: true,\n})\nexport class Switch {\n @Element() el!: HTMLElement;\n @AttachInternals() internals!: ElementInternals;\n\n /** Current on/off state. The initial value is restored when the owning form resets. */\n @Prop({ mutable: true }) checked: boolean = false;\n\n @Prop({ reflect: true }) name: string | undefined;\n @Prop() value: string = 'on';\n\n /** Optional value submitted when unchecked; omitted by default like a native checkbox. */\n @Prop() uncheckedValue: string | undefined;\n\n /** Associates the switch with a form by id when it is rendered outside that form. */\n @Prop({ reflect: true }) form: string | undefined;\n\n @Prop({ reflect: true }) disabled: boolean = false;\n @Prop({ reflect: true }) readOnly: boolean = false;\n @Prop({ reflect: true }) required: boolean = false;\n @Prop() requiredMessage: string = DEFAULT_REQUIRED_MESSAGE;\n @Prop() isInactive: boolean = false;\n\n /** Compact track size for placement inside controls, menus, and form rows. */\n @Prop() size: SwitchSize = 'md';\n\n /**\n * Removes standalone control semantics so a composite owner such as a\n * `menuitemcheckbox` can use the switch as an aria-hidden visual indicator.\n */\n @Prop() presentation: boolean = false;\n\n @Event() dsChange!: EventEmitter<boolean>;\n\n private initialChecked = false;\n @State() private formDisabled = false;\n @State() private focused = false;\n @State() private touched = false;\n\n componentWillLoad() {\n this.initialChecked = this.checked;\n this.syncFormValue();\n }\n\n componentDidLoad() {\n this.syncNativeLabels();\n }\n\n @Watch('checked')\n @Watch('value')\n @Watch('uncheckedValue')\n @Watch('disabled')\n @Watch('isInactive')\n @Watch('presentation')\n @Watch('required')\n syncFormValue() {\n const inactive = this.presentation || this.isInactive || this.disabled || this.formDisabled;\n const submissionValue = this.checked ? this.value : this.uncheckedValue ?? null;\n const state = this.checked ? 'checked' : 'unchecked';\n setFormControlValue(this.internals, submissionValue, { inactive, state });\n\n const missing = this.required && !inactive && !this.checked;\n setRequiredValidity(this.internals, missing, this.requiredMessage);\n }\n\n formDisabledCallback(disabled: boolean) {\n this.formDisabled = disabled;\n this.syncFormValue();\n }\n\n formResetCallback() {\n this.checked = this.initialChecked;\n this.focused = false;\n this.touched = false;\n }\n\n formStateRestoreCallback(state: string | File | FormData | null) {\n this.checked = state === 'checked';\n }\n\n private syncNativeLabels() {\n if (this.presentation) return;\n if (this.el.hasAttribute('aria-label') || this.el.hasAttribute('aria-labelledby')) return;\n\n const labelIds = (Array.from(this.internals.labels) as HTMLLabelElement[]).map(label => {\n if (!label.id) label.id = `ds-switch-label-${++generatedLabelId}`;\n return label.id;\n });\n if (labelIds.length) this.el.setAttribute('aria-labelledby', labelIds.join(' '));\n }\n\n private handleClick = () => {\n if (this.presentation || this.readOnly || this.isInactive || this.disabled || this.formDisabled) return;\n this.checked = !this.checked;\n this.dsChange.emit(this.checked);\n };\n\n private handleKeyDown = (event: KeyboardEvent) => {\n if (this.presentation || this.readOnly || this.isInactive || this.disabled || this.formDisabled) return;\n if (event.key === ' ' || event.key === 'Enter') {\n event.preventDefault();\n this.handleClick();\n }\n };\n\n private handleFocus = () => {\n if (!this.presentation) this.focused = true;\n };\n\n private handleBlur = () => {\n if (this.presentation) return;\n this.focused = false;\n this.touched = true;\n };\n\n render() {\n const inactive = this.isInactive || this.disabled || this.formDisabled;\n const invalid = this.required && !inactive && !this.checked;\n const dirty = this.checked !== this.initialChecked;\n // Switch owns its structural track and thumb strokes so nested interaction layers cannot cover them.\n return (\n <Host\n role={this.presentation ? undefined : 'switch'}\n aria-checked={this.presentation ? undefined : String(this.checked)}\n aria-disabled={!this.presentation && inactive ? 'true' : undefined}\n aria-readonly={!this.presentation && this.readOnly ? 'true' : undefined}\n aria-required={!this.presentation && this.required ? 'true' : undefined}\n aria-invalid={!this.presentation && invalid ? 'true' : undefined}\n aria-hidden={this.presentation ? 'true' : undefined}\n data-checked={this.checked ? '' : undefined}\n data-unchecked={!this.checked ? '' : undefined}\n data-disabled={inactive ? '' : undefined}\n data-readonly={this.readOnly ? '' : undefined}\n data-required={this.required ? '' : undefined}\n data-focused={!this.presentation && this.focused ? '' : undefined}\n data-filled={!this.presentation && this.checked ? '' : undefined}\n data-dirty={!this.presentation && dirty ? '' : undefined}\n data-touched={!this.presentation && this.touched ? '' : undefined}\n data-valid={!this.presentation && !inactive && !invalid ? '' : undefined}\n data-invalid={!this.presentation && invalid ? '' : undefined}\n tabIndex={this.presentation || inactive ? -1 : 0}\n class={{\n switch: true,\n checked: this.checked,\n 'switch--lg': this.size === 'lg',\n 'switch--md': this.size === 'md',\n 'switch--sm': this.size === 'sm',\n 'switch--xs': this.size === 'xs',\n 'switch--readonly': this.readOnly,\n 'switch--presentation': this.presentation,\n 'ds-focus-ring': true,\n 'ds-control-inactive': inactive,\n }}\n onClick={this.handleClick}\n onKeyDown={this.handleKeyDown}\n onFocus={this.handleFocus}\n onBlur={this.handleBlur}\n >\n <span class=\"thumb\" />\n </Host>\n );\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const t=1200;const r=768;const n="messages";function e(n){if(n>=t)return"desktop";if(n>=r)return"tablet";return"mobile"}function s(t,r){if(t==="desktop")return r?"compact":"roomy";return r?"constrained":"compact"}function a(t,r){if(!r)return"area";if(r==="help")return"help";if(r==="search")return"search";if(r==="agents")return"agents";return"inbox"}function i(t){return t==="messages"||t==="stacks"||t==="activity"}function u(t,r){const e=r.filter(i);if(i(t)&&e.includes(t))return t;if(e.includes(n))return n;return e[0]??""}function c(t,r,n){return n||t!==r}export{t as S,a,e as b,s as c,i,u as r,c as s};
|
|
2
|
+
//# sourceMappingURL=p-BnQXAbif.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SHELL_DESKTOP_BREAKPOINT","SHELL_MOBILE_BREAKPOINT","SHELL_DEFAULT_INBOX_TOOL","resolveShellResponsiveMode","width","resolveManagedShellPageCapacity","mode","toolsOpen","shellMobileDestinationForTool","open","tool","isShellInboxTool","resolveAvailableInboxTool","preferred","available","inbox","filter","includes","shouldEmitMobileDestinationChange","active","next","navigationOpen"],"sources":["src/wc/shell/shell-responsive.ts"],"sourcesContent":["import type { PanelToolsToolId } from '../components/PanelTools/panel-tools-types';\n\nexport type ShellResponsiveMode = 'desktop' | 'tablet' | 'mobile';\nexport type MobileDestination = 'area' | 'search' | 'agents' | 'inbox' | 'help';\nexport type ShellInboxToolId = PanelToolsToolId;\n\nexport const SHELL_DESKTOP_BREAKPOINT = 1200;\nexport const SHELL_MOBILE_BREAKPOINT = 768;\nexport const SHELL_DEFAULT_INBOX_TOOL: ShellInboxToolId = 'messages';\n\nexport function resolveShellResponsiveMode(width: number): ShellResponsiveMode {\n if (width >= SHELL_DESKTOP_BREAKPOINT) return 'desktop';\n if (width >= SHELL_MOBILE_BREAKPOINT) return 'tablet';\n return 'mobile';\n}\n\nexport function resolveManagedShellPageCapacity(\n mode: ShellResponsiveMode,\n toolsOpen: boolean\n): 'roomy' | 'compact' | 'constrained' {\n if (mode === 'desktop') return toolsOpen ? 'compact' : 'roomy';\n return toolsOpen ? 'constrained' : 'compact';\n}\n\nexport function shellMobileDestinationForTool(\n open: boolean,\n tool: PanelToolsToolId | ''\n): MobileDestination {\n if (!open || !tool) return 'area';\n if (tool === 'help') return 'help';\n if (tool === 'search') return 'search';\n if (tool === 'agents') return 'agents';\n return 'inbox';\n}\n\nexport function isShellInboxTool(tool: string): tool is ShellInboxToolId {\n return tool === 'messages' || tool === 'stacks' || tool === 'activity';\n}\n\nexport function resolveAvailableInboxTool(\n preferred: string,\n available: readonly PanelToolsToolId[]\n): ShellInboxToolId | '' {\n const inbox = available.filter(isShellInboxTool);\n if (isShellInboxTool(preferred) && inbox.includes(preferred)) return preferred;\n if (inbox.includes(SHELL_DEFAULT_INBOX_TOOL)) return SHELL_DEFAULT_INBOX_TOOL;\n return inbox[0] ?? '';\n}\n\n/** Active-destination reselects are inert unless they also dismiss the Menu pane. */\nexport function shouldEmitMobileDestinationChange(\n active: MobileDestination,\n next: MobileDestination,\n navigationOpen: boolean\n): boolean {\n return navigationOpen || active !== next;\n}\n"],"mappings":"AAMO,MAAMA,EAA2B,KACjC,MAAMC,EAA0B,IAChC,MAAMC,EAA6C,WAEpD,SAAUC,EAA2BC,GACzC,GAAIA,GAASJ,EAA0B,MAAO,UAC9C,GAAII,GAASH,EAAyB,MAAO,SAC7C,MAAO,QACT,CAEM,SAAUI,EACdC,EACAC,GAEA,GAAID,IAAS,UAAW,OAAOC,EAAY,UAAY,QACvD,OAAOA,EAAY,cAAgB,SACrC,CAEM,SAAUC,EACdC,EACAC,GAEA,IAAcA,EAAM,MAAO,OAC3B,GAAIA,IAAS,OAAQ,MAAO,OAC5B,GAAIA,IAAS,SAAU,MAAO,SAC9B,GAAIA,IAAS,SAAU,MAAO,SAC9B,MAAO,OACT,CAEM,SAAUC,EAAiBD,GAC/B,OAAOA,IAAS,YAAcA,IAAS,UAAYA,IAAS,UAC9D,CAEM,SAAUE,EACdC,EACAC,GAEA,MAAMC,EAAQD,EAAUE,OAAOL,GAC/B,GAAIA,EAAiBE,IAAcE,EAAME,SAASJ,GAAY,OAAOA,EACrE,GAAIE,EAAME,SAASf,GAA2B,OAAOA,EACrD,OAAOa,EAAM,IAAM,EACrB,C,SAGgBG,EACdC,EACAC,EACAC,GAEA,OAAOA,GAAkBF,IAAWC,CACtC,Q","ignoreList":[]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{p as t,H as s,h as e,a,t as i}from"./index.js";import{d as n}from"./p-BAfG3M8z.js";import{d as o}from"./p-Ay1AX7Ql.js";import{r}from"./p-C-vRkDyn.js";const c=()=>`.sc-ds-attachment-list-h{display:block;min-width:0;box-sizing:border-box}.attachment-list.sc-ds-attachment-list{display:flex;flex-wrap:wrap;gap:var(--dimension-space-050)}.attachment-list__item.sc-ds-attachment-list{display:flex;max-width:var(--dimension-form-width-sm);padding:var(--dimension-space-075);border-radius:var(--dimension-radius-025);background:var(--color-background-secondary);color:inherit;box-shadow:inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-tertiary);text-decoration:none;box-sizing:border-box}a.attachment-list__item.sc-ds-attachment-list:focus-visible{outline:var(--dimension-stroke-width-025) solid var(--color-border-bold-brand);outline-offset:var(--dimension-stroke-width-012)}.attachment-list__item-content.sc-ds-attachment-list{display:flex;align-items:center;gap:var(--dimension-space-075);min-width:0}.attachment-list__copy.sc-ds-attachment-list{display:flex;flex-direction:column;min-width:0}`;const d=t(class t extends s{constructor(t){super();if(t!==false){this.__registerHost()}this.items=[];this.label="Attachments"}renderItem(t){const s=r(t.url,{protocols:["http:","https:","blob:"]});const a=e("span",{class:"attachment-list__item-content"},e("ds-icon",{name:"Document",size:"sm",color:"secondary"}),e("span",{class:"attachment-list__copy"},e("ds-text",{as:"span",variant:"text-body-small",emphasis:true,color:"primary",lineTruncation:1},t.name),t.mediaType||t.size?e("ds-text",{as:"span",variant:"text-caption",color:"secondary"},[t.mediaType,t.size].filter(Boolean).join(" · ")):null));return s?e("a",{class:"attachment-list__item",href:s,target:"_blank",rel:"noopener noreferrer"},a):e("div",{class:"attachment-list__item"},a)}render(){return e(a,{key:"573bdad858ff3f030a77c06feeeed77bcda77d4c"},e("div",{key:"42cb782712622002ded614035f8fa57dc4079bb2",class:"attachment-list",role:"list","aria-label":this.label},this.items.map((t=>e("div",{role:"listitem",key:t.id},this.renderItem(t))))))}static get style(){return c()}},[2,"ds-attachment-list",{items:[16],label:[1]}]);function l(){if(typeof customElements==="undefined"){return}const t=["ds-attachment-list","ds-icon","ds-text"];t.forEach((t=>{switch(t){case"ds-attachment-list":if(!customElements.get(i(t))){customElements.define(i(t),d)}break;case"ds-icon":if(!customElements.get(i(t))){n()}break;case"ds-text":if(!customElements.get(i(t))){o()}break}}))}l();export{d as A,l as d};
|
|
2
|
+
//# sourceMappingURL=p-BnbbnuVC.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["attachmentListCss","AttachmentList","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","items","label","renderItem","item","url","resolveSafeUrl","protocols","content","h","class","name","size","color","as","variant","emphasis","lineTruncation","mediaType","filter","Boolean","join","href","target","rel","render","Host","key","role","map","id"],"sources":["src/wc/components/AttachmentList/AttachmentList.css?tag=ds-attachment-list&encapsulation=scoped","src/wc/components/AttachmentList/AttachmentList.tsx"],"sourcesContent":[":host {\n display: block;\n min-width: 0;\n box-sizing: border-box;\n}\n\n.attachment-list {\n display: flex;\n flex-wrap: wrap;\n gap: var(--dimension-space-050);\n}\n\n.attachment-list__item {\n display: flex;\n max-width: var(--dimension-form-width-sm);\n padding: var(--dimension-space-075);\n border-radius: var(--dimension-radius-025);\n background: var(--color-background-secondary);\n color: inherit;\n box-shadow: inset 0 0 0 var(--dimension-stroke-width-012) var(--color-border-tertiary);\n text-decoration: none;\n box-sizing: border-box;\n}\n\na.attachment-list__item:focus-visible {\n outline: var(--dimension-stroke-width-025) solid var(--color-border-bold-brand);\n outline-offset: var(--dimension-stroke-width-012);\n}\n\n.attachment-list__item-content {\n display: flex;\n align-items: center;\n gap: var(--dimension-space-075);\n min-width: 0;\n}\n\n.attachment-list__copy {\n display: flex;\n flex-direction: column;\n min-width: 0;\n}\n","import { Component, h, Host, Prop } from '@stencil/core';\nimport { resolveSafeUrl } from '../../utils';\nimport type { ConversationAttachment } from '../conversation-types';\n\n@Component({\n tag: 'ds-attachment-list',\n styleUrl: 'AttachmentList.css',\n scoped: true,\n})\nexport class AttachmentList {\n @Prop() items: ConversationAttachment[] = [];\n @Prop() label: string = 'Attachments';\n\n private renderItem(item: ConversationAttachment) {\n const url = resolveSafeUrl(item.url, {\n protocols: ['http:', 'https:', 'blob:'],\n });\n const content = (\n <span class=\"attachment-list__item-content\">\n <ds-icon name=\"Document\" size=\"sm\" color=\"secondary\" />\n <span class=\"attachment-list__copy\">\n <ds-text as=\"span\" variant=\"text-body-small\" emphasis color=\"primary\" lineTruncation={1}>{item.name}</ds-text>\n {item.mediaType || item.size ? (\n <ds-text as=\"span\" variant=\"text-caption\" color=\"secondary\">\n {[item.mediaType, item.size].filter(Boolean).join(' · ')}\n </ds-text>\n ) : null}\n </span>\n </span>\n );\n return url ? (\n <a class=\"attachment-list__item\" href={url} target=\"_blank\" rel=\"noopener noreferrer\">{content}</a>\n ) : (\n <div class=\"attachment-list__item\">{content}</div>\n );\n }\n\n render() {\n return (\n <Host>\n <div class=\"attachment-list\" role=\"list\" aria-label={this.label}>\n {this.items.map(item => <div role=\"listitem\" key={item.id}>{this.renderItem(item)}</div>)}\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"6JAAA,MAAMA,EAAoB,IAAM,k7B,MCSnBC,EAAcC,EAAA,MAAAD,UAAAE,EAL3B,WAAAC,CAAAC,G,4CAMUC,KAAAC,MAAkC,GAClCD,KAAAE,MAAgB,aAmCzB,CAjCS,UAAAC,CAAWC,GACjB,MAAMC,EAAMC,EAAeF,EAAKC,IAAK,CACnCE,UAAW,CAAC,QAAS,SAAU,WAEjC,MAAMC,EACJC,EAAA,QAAMC,MAAM,iCACVD,EAAA,WAASE,KAAK,WAAWC,KAAK,KAAKC,MAAM,cACzCJ,EAAA,QAAMC,MAAM,yBACVD,EAAA,WAASK,GAAG,OAAOC,QAAQ,kBAAkBC,SAAQ,KAACH,MAAM,UAAUI,eAAgB,GAAIb,EAAKO,MAC9FP,EAAKc,WAAad,EAAKQ,KACtBH,EAAA,WAASK,GAAG,OAAOC,QAAQ,eAAeF,MAAM,aAC7C,CAACT,EAAKc,UAAWd,EAAKQ,MAAMO,OAAOC,SAASC,KAAK,QAElD,OAIV,OAAOhB,EACLI,EAAA,KAAGC,MAAM,wBAAwBY,KAAMjB,EAAKkB,OAAO,SAASC,IAAI,uBAAuBhB,GAEvFC,EAAA,OAAKC,MAAM,yBAAyBF,E,CAIxC,MAAAiB,GACE,OACEhB,EAACiB,EAAI,CAAAC,IAAA,4CACHlB,EAAA,OAAAkB,IAAA,2CAAKjB,MAAM,kBAAkBkB,KAAK,OAAM,aAAa5B,KAAKE,OACvDF,KAAKC,MAAM4B,KAAIzB,GAAQK,EAAA,OAAKmB,KAAK,WAAWD,IAAKvB,EAAK0B,IAAK9B,KAAKG,WAAWC,O","ignoreList":[]}
|