@ds-mo/ui 9.0.0 → 9.1.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 +28 -0
- package/dist/.build-stamp +1 -1
- package/dist/agent-patterns.json +233 -0
- package/dist/agent.json +155 -19
- package/dist/angular/ds-menu.d.ts +6 -1
- package/dist/angular/ds-menu.js +7 -4
- package/dist/angular/ds-swatch-picker.d.ts +15 -0
- package/dist/angular/ds-swatch-picker.js +42 -0
- package/dist/angular/index.d.ts +1 -1
- package/dist/angular/index.js +1 -0
- package/dist/angular/proxies.d.ts +1 -0
- package/dist/angular/proxies.js +1 -0
- package/dist/components/ds-app-shell.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-menu.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-select-multi.js +1 -1
- package/dist/components/ds-select-multi.js.map +1 -1
- package/dist/components/ds-select.js +1 -1
- package/dist/components/ds-select.js.map +1 -1
- package/dist/components/ds-shell-gradient-picker.js +1 -1
- package/dist/components/ds-shell-gradient-picker.js.map +1 -1
- package/dist/components/ds-shell-gradient-swatch.js +1 -1
- package/dist/components/ds-shell-gradient-swatch.js.map +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.d.ts +11 -0
- package/dist/components/ds-swatch-picker.js +2 -0
- package/dist/components/ds-swatch-picker.js.map +1 -0
- package/dist/components/ds-tooltip-data-viz.js +1 -1
- package/dist/components/p-D1HFMTdC.js +2 -0
- package/dist/components/p-D1HFMTdC.js.map +1 -0
- package/dist/components/p-HBIxvS5C.js +2 -0
- package/dist/components/p-HBIxvS5C.js.map +1 -0
- package/dist/components/p-l6PmnW_P.js +2 -0
- package/dist/components/p-l6PmnW_P.js.map +1 -0
- package/dist/components/p-tQ1QHeOE.js +2 -0
- package/dist/components/p-tQ1QHeOE.js.map +1 -0
- package/dist/docs/components.json +268 -30
- package/dist/lib/components/Menu/menu-placement.d.ts +6 -3
- package/dist/lib/shell/index.d.ts +2 -2
- package/dist/lib/shell/index.js +40 -39
- package/dist/lib/shell/index.js.map +3 -3
- package/dist/lib/shell/shell-gradient-presets.d.ts +15 -0
- package/dist/lib/utils/choice-popup-alignment.d.ts +20 -0
- package/dist/lib/utils/index.d.ts +2 -0
- package/dist/lib/utils/index.js +16 -0
- package/dist/lib/utils/index.js.map +3 -3
- package/dist/mcp/cli.js +31409 -0
- package/dist/mcp-data/registry/app-shell.json +210 -0
- package/dist/mcp-data/registry/badge.json +289 -0
- package/dist/mcp-data/registry/banner.json +206 -0
- package/dist/mcp-data/registry/bar-nav.json +341 -0
- package/dist/mcp-data/registry/button-filled.json +386 -0
- package/dist/mcp-data/registry/button-unfilled.json +537 -0
- package/dist/mcp-data/registry/card-data-viz-donut.json +143 -0
- package/dist/mcp-data/registry/card-setting.json +194 -0
- package/dist/mcp-data/registry/card-shell-data-viz.json +173 -0
- package/dist/mcp-data/registry/card.json +126 -0
- package/dist/mcp-data/registry/chart-bar.json +121 -0
- package/dist/mcp-data/registry/chart-donut.json +257 -0
- package/dist/mcp-data/registry/chart-legend.json +209 -0
- package/dist/mcp-data/registry/chart-line.json +153 -0
- package/dist/mcp-data/registry/checkbox.json +361 -0
- package/dist/mcp-data/registry/chip.json +276 -0
- package/dist/mcp-data/registry/divider.json +225 -0
- package/dist/mcp-data/registry/empty-state.json +197 -0
- package/dist/mcp-data/registry/field.json +222 -0
- package/dist/mcp-data/registry/icon.json +242 -0
- package/dist/mcp-data/registry/input.json +597 -0
- package/dist/mcp-data/registry/loader.json +192 -0
- package/dist/mcp-data/registry/menu.json +459 -0
- package/dist/mcp-data/registry/modal.json +150 -0
- package/dist/mcp-data/registry/panel-nav.json +622 -0
- package/dist/mcp-data/registry/panel-sub-nav.json +249 -0
- package/dist/mcp-data/registry/panel-tools.json +374 -0
- package/dist/mcp-data/registry/radio.json +374 -0
- package/dist/mcp-data/registry/registry.json +5389 -0
- package/dist/mcp-data/registry/select-multi.json +755 -0
- package/dist/mcp-data/registry/select.json +740 -0
- package/dist/mcp-data/registry/shell-gradient-picker.json +195 -0
- package/dist/mcp-data/registry/shell-gradient-swatch.json +215 -0
- package/dist/mcp-data/registry/skeleton.json +282 -0
- package/dist/mcp-data/registry/slider.json +657 -0
- package/dist/mcp-data/registry/swatch-picker.json +231 -0
- package/dist/mcp-data/registry/switch.json +361 -0
- package/dist/mcp-data/registry/tab-group.json +255 -0
- package/dist/mcp-data/registry/tag.json +352 -0
- package/dist/mcp-data/registry/text.json +371 -0
- package/dist/mcp-data/registry/tooltip-data-viz.json +158 -0
- package/dist/mcp-data/registry/tooltip.json +311 -0
- package/dist/react/components.d.ts +1 -0
- package/dist/react/components.js +1 -0
- package/dist/react/ds-menu.d.ts +1 -0
- package/dist/react/ds-menu.js +2 -1
- package/dist/react/ds-swatch-picker.d.ts +12 -0
- package/dist/react/ds-swatch-picker.js +12 -0
- package/dist/types/components/Menu/Menu.d.ts +7 -1
- package/dist/types/components/Menu/menu-placement.d.ts +6 -3
- package/dist/types/components/Menu/menu-types.d.ts +14 -1
- package/dist/types/components/ShellGradientPicker/ShellGradientPicker.d.ts +2 -5
- package/dist/types/components/ShellGradientSwatch/ShellGradientSwatch.d.ts +1 -0
- package/dist/types/components/SwatchPicker/SwatchPicker.d.ts +21 -0
- package/dist/types/components/SwatchPicker/swatch-picker-types.d.ts +26 -0
- package/dist/types/components.d.ts +117 -0
- package/dist/types/shell/index.d.ts +2 -2
- package/dist/types/shell/shell-gradient-presets.d.ts +15 -0
- package/dist/types/utils/choice-popup-alignment.d.ts +21 -0
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +6 -2
- package/dist/components/p-Bafp65bw.js +0 -2
- package/dist/components/p-Bafp65bw.js.map +0 -1
- package/dist/components/p-BdnR3jxi.js +0 -2
- package/dist/components/p-BdnR3jxi.js.map +0 -1
- package/dist/components/p-C_cu-HIT.js +0 -2
- package/dist/components/p-C_cu-HIT.js.map +0 -1
- package/dist/components/p-D0B9uDTP.js +0 -2
- package/dist/components/p-D0B9uDTP.js.map +0 -1
- package/dist/components/p-DF0yLZG_.js +0 -2
- package/dist/components/p-DF0yLZG_.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["computeMenuPosition","computeAnchoredPopupPosition","isMenuGradientPickerSection","section","variant","isMenuSwatchPickerSection","isMenuPickerSection","menuCss","POSITION_RETRY_BUDGET","MENU_FOCUSABLE_SELECTOR","join","Menu","__stencil_proxyCustomElement","HTMLElement","constructor","registerHost","this","open","items","sections","side","align","anchorAlignment","sideOffset","TOKEN_CSS_LENGTHS","space050","alignOffset","initialFocusVisible","menuLabel","shouldRender","closing","pos","x","y","focusedIndex","positionReady","focusRingVisible","clickOutsideHandler","scrollResizeHandler","closeTimer","itemEls","positionRetryRaf","listenersReady","componentDidLoad","onOpenChange","disconnectedCallback","cancelPositionRetry","teardownListeners","isOpen","setupListeners","schedulePositionUpdate","focusInitialItem","closeAnimationMs","finishClose","setTimeout","onAnchorChange","onPositionPropsChange","viewportPadPx","resolveCssLengthPx","TOKEN_DEFAULTS","sideOffsetPx","alignOffsetPx","popupFallbackWidthPx","menuWidthXs","popupFallbackHeightPx","menuFallbackHeight","resolveMotionTimeMs","motionShort2","animationDurationShort3","resolvedAnchor","anchor","anchorId","document","getElementById","anchorFocusTarget","matches","querySelector","focusAnchor","setFocus","focus","moveFocusAfterTab","backwards","candidates","Array","from","querySelectorAll","filter","element","closest","getClientRects","length","index","indexOf","compositeTabLeavesPopup","event","popup","el","focusables","currentIndex","target","shiftKey","activeSections","flatItems","flatMap","hasCompositeSections","some","cancelAnimationFrame","onReady","remaining","attempt","calculatePosition","requestAnimationFrame","anchorEl","anchorRect","getBoundingClientRect","sectionInsetPx","minWidth","style","choicePopupMinWidth","width","removeProperty","popupWidth","offsetWidth","popupHeight","offsetHeight","resolveChoicePopupAlignOffset","viewportWidth","window","innerWidth","viewportHeight","innerHeight","flat","selectedIdx","findIndex","it","isSelected","isInactive","firstEnabledIdx","btns","e","t","contains","close","addEventListener","removeEventListener","clearTimeout","restoreFocus","dsClose","emit","handleKeyDown","key","preventDefault","enabled","map","i","cur","safe","stopPropagation","focusItem","idx","handleItemClick","item","dsSelect","handleGradientSelect","preset","dsGradientSelect","handleSwatchSelect","value","dsSwatchSelect","render","h","Host","display","flatIdx","popupStyle","position","left","top","transform","Math","round","zIndex","visibility","menuWidth","class","role","undefined","si","header","as","emphasis","color","groupLabel","shellGradientPickerSections","onDsChange","detail","options","isFocused","type","isDestructive","showSwitch","String","switchValue","disabled","tabIndex","onMouseDown","onClick","onFocus","label","subtext","dot","hasRing","size","checked","presentation"],"sources":["src/wc/components/Menu/menu-position.ts","src/wc/components/Menu/menu-types.ts","src/wc/components/Menu/Menu.css?tag=ds-menu&encapsulation=scoped","src/wc/components/Menu/Menu.tsx"],"sourcesContent":["import {\n computeAnchoredPopupPosition,\n type AnchoredPopupAlign,\n type AnchoredPopupPositionInput,\n type AnchoredPopupSide,\n} from '../../utils/anchored-popup';\n\nexport type MenuSide = AnchoredPopupSide;\nexport type MenuAlign = AnchoredPopupAlign;\nexport type MenuPositionInput = AnchoredPopupPositionInput;\n\n/** Backward-compatible menu alias for the shared anchored-popup layout math. */\nexport const computeMenuPosition = computeAnchoredPopupPosition;\n","import type { ShellGradientPreset } from '../../shell/shell-gradient-presets';\nimport type { SwatchPickerOption, SwatchPickerSection } from '../SwatchPicker/swatch-picker-types';\n\nexport type { MenuAlign, MenuSide } from './menu-position';\nexport {\n PANEL_NAV_USER_MENU_PLACEMENT,\n type MenuPlacement,\n} from './menu-placement';\n\nexport interface MenuItemData {\n label: string;\n value?: string;\n subtext?: string;\n /** Show a supplemental brand notification dot. */\n dot?: boolean;\n isSelected?: boolean;\n isInactive?: boolean;\n isDestructive?: boolean;\n /** Render a compact switch indicator; the menu row owns interaction. */\n showSwitch?: boolean;\n switchValue?: boolean;\n}\n\nexport interface MenuItemsSection {\n header?: string;\n items: MenuItemData[];\n}\n\nexport interface MenuGradientPickerSection {\n header?: string;\n /** @deprecated Use the generic `swatch-picker` section. */\n variant: 'gradient-picker';\n value: ShellGradientPreset;\n}\n\nexport interface MenuSwatchPickerSection {\n header?: string;\n variant: 'swatch-picker';\n value: string;\n options?: SwatchPickerOption[];\n sections?: SwatchPickerSection[];\n groupLabel?: string;\n}\n\nexport type MenuSection =\n | MenuItemsSection\n | MenuGradientPickerSection\n | MenuSwatchPickerSection;\n\nexport function isMenuGradientPickerSection(\n section: MenuSection,\n): section is MenuGradientPickerSection {\n return 'variant' in section && section.variant === 'gradient-picker';\n}\n\nexport function isMenuSwatchPickerSection(\n section: MenuSection,\n): section is MenuSwatchPickerSection {\n return 'variant' in section && section.variant === 'swatch-picker';\n}\n\nexport function isMenuPickerSection(\n section: MenuSection,\n): section is MenuGradientPickerSection | MenuSwatchPickerSection {\n return isMenuGradientPickerSection(section) || isMenuSwatchPickerSection(section);\n}\n\nexport type { ShellGradientPreset };\nexport type { SwatchPickerOption, SwatchPickerSection };\n","@import '../../utils/choice-list.css';\n\n/* Inactive: `.ds-control-inactive` (25% opacity). */\n\n.menu-item--destructive .menu-item__label {\n /* Beat ds-text color-* host classes for destructive rows. */\n color: var(--color-foreground-bold-negative) !important;\n}\n\n/* Standard md icon zone keeps the dot aligned with other control suffixes. */\n.menu-item__dot-box {\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n width: var(--ds-control-icon, var(--dimension-iconography-md));\n height: var(--ds-control-icon, var(--dimension-iconography-md));\n pointer-events: none;\n}\n\n/* ── Switch suffix ───────────────────────────────────────────────────────── */\n\n.menu-item__switch {\n flex-shrink: 0;\n}\n","import { Component, Prop, State, Event, EventEmitter, Element, Watch, Listen, h, Host } from '@stencil/core';\nimport {\n choicePopupMinWidth,\n resolveChoicePopupAlignOffset,\n resolveCssLengthPx,\n resolveMotionTimeMs,\n TOKEN_CSS_LENGTHS,\n TOKEN_DEFAULTS,\n type ChoicePopupAnchorAlignment,\n} from '../../utils';\nimport { computeMenuPosition, type MenuAlign, type MenuSide } from './menu-position';\nimport type { MenuItemData, MenuSection } from './menu-types';\nimport {\n isMenuGradientPickerSection,\n isMenuPickerSection,\n isMenuSwatchPickerSection,\n} from './menu-types';\nimport {\n shellGradientPickerSections,\n type ShellGradientPreset,\n} from '../../shell/shell-gradient-presets';\n\n/** rAF retries while the popup mounts or the anchor resolves. */\nconst POSITION_RETRY_BUDGET = 8;\nconst MENU_FOCUSABLE_SELECTOR = [\n 'a[href]',\n 'button:not([disabled])',\n 'input:not([disabled]):not([type=\"hidden\"])',\n 'select:not([disabled])',\n 'textarea:not([disabled])',\n '[tabindex]:not([tabindex=\"-1\"])',\n].join(',');\n\n@Component({\n tag: 'ds-menu',\n styleUrl: 'Menu.css',\n scoped: true,\n})\nexport class Menu {\n @Element() el!: HTMLElement;\n\n @Prop({ mutable: true }) open: boolean = false;\n @Prop() items: MenuItemData[] = [];\n @Prop() sections: MenuSection[] = [];\n @Prop() side: MenuSide = 'bottom';\n @Prop() align: MenuAlign = 'start';\n /** Align choice-row edges to the anchor by default; use `popup-frame` only for custom frame geometry. */\n @Prop() anchorAlignment: ChoicePopupAnchorAlignment = 'choice-cell';\n /** Gap between anchor and menu — number (px) or TokoMo length (`var(--dimension-space-050)`, etc.). */\n @Prop() sideOffset: number | string = TOKEN_CSS_LENGTHS.space050;\n /** Cross-axis offset — number (px) or TokoMo length. */\n @Prop() alignOffset: number | string = 0;\n @Prop() menuWidth: string | undefined;\n @Prop() minWidth: string | undefined;\n /** External trigger element to position against. Set via JS: menuEl.anchor = buttonEl */\n @Prop() anchor: HTMLElement | undefined;\n /** ID of the external trigger element for positioning */\n @Prop() anchorId: string | undefined;\n /** Show a visible ring on the initially focused menu item. Use only when the opener was keyboard-driven. */\n @Prop() initialFocusVisible: boolean = false;\n /** Accessible name for the popup menu. */\n @Prop() menuLabel: string = 'Menu';\n\n @State() private shouldRender: boolean = false;\n @State() private closing: boolean = false;\n @State() private pos: { x: number; y: number } = { x: 0, y: 0 };\n @State() private focusedIndex: number = 0;\n @State() private positionReady: boolean = false;\n @State() private focusRingVisible: boolean = false;\n\n @Event() dsClose!: EventEmitter<void>;\n @Event() dsSelect!: EventEmitter<MenuItemData>;\n /** Emitted when a `gradient-picker` section swatch is chosen. */\n @Event() dsGradientSelect!: EventEmitter<ShellGradientPreset>;\n /** Emitted when a generic `swatch-picker` section option is chosen. */\n @Event() dsSwatchSelect!: EventEmitter<string>;\n\n private clickOutsideHandler: ((e: MouseEvent) => void) | null = null;\n private scrollResizeHandler: (() => void) | null = null;\n private closeTimer: ReturnType<typeof setTimeout> | null = null;\n private itemEls: HTMLElement[] = [];\n private positionRetryRaf: number | null = null;\n private listenersReady = false;\n\n componentDidLoad() {\n if (this.open) this.onOpenChange(true);\n }\n\n disconnectedCallback() {\n this.cancelPositionRetry();\n this.teardownListeners();\n }\n\n @Watch('open')\n onOpenChange(isOpen: boolean) {\n if (isOpen) {\n this.teardownListeners();\n this.shouldRender = true;\n this.closing = false;\n this.positionReady = false;\n this.listenersReady = false;\n this.focusRingVisible = this.initialFocusVisible;\n this.listenersReady = true;\n this.setupListeners();\n this.schedulePositionUpdate(() => {\n this.focusInitialItem();\n });\n } else if (this.shouldRender) {\n this.cancelPositionRetry();\n this.closing = true;\n this.teardownListeners();\n this.listenersReady = false;\n const closeAnimationMs = this.closeAnimationMs;\n if (closeAnimationMs <= 0) {\n this.finishClose();\n return;\n }\n this.closeTimer = setTimeout(() => {\n this.closeTimer = null;\n this.finishClose();\n }, closeAnimationMs);\n }\n }\n\n @Watch('anchor')\n @Watch('anchorId')\n onAnchorChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n @Watch('side')\n @Watch('align')\n @Watch('anchorAlignment')\n @Watch('sideOffset')\n @Watch('alignOffset')\n onPositionPropsChange() {\n if (this.open) this.schedulePositionUpdate();\n }\n\n private get viewportPadPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.space050, TOKEN_DEFAULTS.space050);\n }\n\n private get sideOffsetPx(): number {\n return resolveCssLengthPx(this.sideOffset, TOKEN_DEFAULTS.space050);\n }\n\n private get alignOffsetPx(): number {\n return resolveCssLengthPx(this.alignOffset, 0);\n }\n\n private get popupFallbackWidthPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuWidthXs, TOKEN_DEFAULTS.menuWidthXs);\n }\n\n private get popupFallbackHeightPx(): number {\n return resolveCssLengthPx(TOKEN_DEFAULTS.menuFallbackHeight, TOKEN_DEFAULTS.menuFallbackHeight);\n }\n\n private get closeAnimationMs(): number {\n return resolveMotionTimeMs(TOKEN_DEFAULTS.motionShort2, TOKEN_DEFAULTS.animationDurationShort3);\n }\n\n private finishClose() {\n this.shouldRender = false;\n this.closing = false;\n }\n\n private get resolvedAnchor(): HTMLElement | null {\n if (this.anchor) return this.anchor;\n if (this.anchorId) return document.getElementById(this.anchorId);\n return null;\n }\n\n private get anchorFocusTarget(): HTMLElement | null {\n const anchor = this.resolvedAnchor;\n if (!anchor) return null;\n if (anchor.matches(MENU_FOCUSABLE_SELECTOR)) return anchor;\n return anchor.querySelector<HTMLElement>(MENU_FOCUSABLE_SELECTOR) ?? anchor;\n }\n\n private focusAnchor() {\n const anchor = this.resolvedAnchor as (HTMLElement & { setFocus?: () => Promise<void> | void }) | null;\n if (anchor?.setFocus) {\n anchor.setFocus();\n return;\n }\n this.anchorFocusTarget?.focus();\n }\n\n private moveFocusAfterTab(backwards: boolean) {\n const anchor = this.anchorFocusTarget;\n if (!anchor) return;\n if (backwards) {\n anchor.focus();\n return;\n }\n\n const candidates = Array.from(document.querySelectorAll<HTMLElement>(MENU_FOCUSABLE_SELECTOR))\n .filter(element => (\n !element.closest('.menu-popup') &&\n !element.closest('[inert]') &&\n element.getClientRects().length > 0\n ));\n const index = candidates.indexOf(anchor);\n (candidates[index + 1] ?? anchor).focus();\n }\n\n private compositeTabLeavesPopup(event: KeyboardEvent): boolean {\n const popup = this.el.querySelector<HTMLElement>('.menu-popup');\n if (!popup) return true;\n const focusables = Array.from(popup.querySelectorAll<HTMLElement>(MENU_FOCUSABLE_SELECTOR))\n .filter(element => element.getClientRects().length > 0);\n const currentIndex = focusables.indexOf(event.target as HTMLElement);\n if (currentIndex < 0) return true;\n return event.shiftKey ? currentIndex === 0 : currentIndex === focusables.length - 1;\n }\n\n private get activeSections(): MenuSection[] {\n if (this.sections.length > 0) return this.sections;\n if (this.items.length > 0) return [{ items: this.items }];\n return [];\n }\n\n private get flatItems(): MenuItemData[] {\n return this.activeSections.flatMap(section =>\n isMenuPickerSection(section) ? [] : section.items,\n );\n }\n\n /** Rich preference content is a non-modal dialog, not an ARIA action menu. */\n private get hasCompositeSections(): boolean {\n return this.activeSections.some(isMenuPickerSection);\n }\n\n private cancelPositionRetry() {\n if (this.positionRetryRaf !== null) {\n cancelAnimationFrame(this.positionRetryRaf);\n this.positionRetryRaf = null;\n }\n }\n\n /** Retry until anchor + popup exist — do not reveal at 0,0 on a failed first pass. */\n private schedulePositionUpdate(onReady?: () => void) {\n if (!this.open) return;\n\n this.cancelPositionRetry();\n this.positionReady = false;\n\n let remaining = POSITION_RETRY_BUDGET;\n\n const attempt = () => {\n this.positionRetryRaf = null;\n if (!this.open) return;\n\n if (this.calculatePosition()) {\n this.positionReady = true;\n onReady?.();\n return;\n }\n\n if (remaining > 0) {\n remaining -= 1;\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n };\n\n this.positionRetryRaf = requestAnimationFrame(attempt);\n }\n\n /** @returns `true` when anchor and popup were found and `pos` was updated. */\n private calculatePosition(): boolean {\n const anchorEl = this.resolvedAnchor;\n if (!anchorEl) return false;\n const popup = this.el.querySelector('.menu-popup') as HTMLElement | null;\n if (!popup) return false;\n\n const anchorRect = anchorEl.getBoundingClientRect();\n const sectionInsetPx = this.viewportPadPx;\n if (!this.minWidth) {\n if (this.anchorAlignment === 'choice-cell' && (this.side === 'top' || this.side === 'bottom')) {\n popup.style.minWidth = `max(var(--dimension-menu-width-xs), ${choicePopupMinWidth(anchorRect.width, sectionInsetPx)}px)`;\n } else {\n popup.style.removeProperty('min-width');\n }\n }\n\n this.pos = computeMenuPosition({\n anchorRect,\n popupWidth: popup.offsetWidth || this.popupFallbackWidthPx,\n popupHeight: popup.offsetHeight || this.popupFallbackHeightPx,\n side: this.side,\n align: this.align,\n sideOffsetPx: this.sideOffsetPx,\n alignOffsetPx: resolveChoicePopupAlignOffset({\n align: this.align,\n alignOffsetPx: this.alignOffsetPx,\n sectionInsetPx,\n anchorAlignment: this.anchorAlignment,\n }),\n viewportPadPx: this.viewportPadPx,\n viewportWidth: window.innerWidth,\n viewportHeight: window.innerHeight,\n });\n return true;\n }\n\n /** Focus the selected item when present, otherwise the first enabled item. */\n private focusInitialItem() {\n if (this.hasCompositeSections) {\n requestAnimationFrame(() => {\n this.el.querySelector<HTMLElement>('.menu-popup [tabindex=\"0\"]')?.focus();\n });\n return;\n }\n\n const flat = this.flatItems;\n const selectedIdx = flat.findIndex(it => it.isSelected && !it.isInactive);\n const firstEnabledIdx = flat.findIndex(it => !it.isInactive);\n this.focusedIndex = selectedIdx >= 0\n ? selectedIdx\n : (firstEnabledIdx >= 0 ? firstEnabledIdx : 0);\n\n requestAnimationFrame(() => {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[this.focusedIndex]?.focus();\n });\n }\n\n private setupListeners() {\n this.clickOutsideHandler = (e: MouseEvent) => {\n const t = e.target as Node;\n const popup = this.el.querySelector('.menu-popup');\n const anchorEl = this.resolvedAnchor;\n if (popup?.contains(t) || anchorEl?.contains(t)) return;\n this.close();\n };\n\n this.scrollResizeHandler = () => {\n if (this.shouldRender && !this.closing) this.calculatePosition();\n };\n\n document.addEventListener('mousedown', this.clickOutsideHandler, true);\n window.addEventListener('scroll', this.scrollResizeHandler, true);\n window.addEventListener('resize', this.scrollResizeHandler);\n }\n\n private teardownListeners() {\n if (this.clickOutsideHandler) {\n document.removeEventListener('mousedown', this.clickOutsideHandler, true);\n this.clickOutsideHandler = null;\n }\n if (this.scrollResizeHandler) {\n window.removeEventListener('scroll', this.scrollResizeHandler, true);\n window.removeEventListener('resize', this.scrollResizeHandler);\n this.scrollResizeHandler = null;\n }\n if (this.closeTimer) {\n clearTimeout(this.closeTimer);\n this.closeTimer = null;\n }\n }\n\n private close(restoreFocus = true) {\n if (restoreFocus) this.focusAnchor();\n this.dsClose.emit();\n this.open = false;\n this.onOpenChange(false);\n }\n\n @Listen('keydown')\n handleKeyDown(e: KeyboardEvent) {\n if (!this.shouldRender || this.closing) return;\n\n if (e.key === 'Escape') {\n e.preventDefault();\n this.close();\n return;\n }\n\n if (e.key === 'Tab') {\n if (this.hasCompositeSections && !this.compositeTabLeavesPopup(e)) return;\n e.preventDefault();\n this.close(false);\n this.moveFocusAfterTab(e.shiftKey);\n return;\n }\n\n if (this.hasCompositeSections) return;\n\n const flat = this.flatItems;\n const enabled = flat.map((it, i) => ({ it, i })).filter(({ it }) => !it.isInactive).map(({ i }) => i);\n if (!enabled.length) return;\n\n const cur = enabled.indexOf(this.focusedIndex);\n const safe = cur < 0 ? 0 : cur;\n\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe + 1) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'ArrowUp':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[(safe - 1 + enabled.length) % enabled.length];\n this.focusItem(this.focusedIndex);\n break;\n case 'Home':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[0];\n this.focusItem(this.focusedIndex);\n break;\n case 'End':\n e.preventDefault(); e.stopPropagation();\n this.focusRingVisible = true;\n this.focusedIndex = enabled[enabled.length - 1];\n this.focusItem(this.focusedIndex);\n break;\n }\n }\n\n private focusItem(idx: number) {\n const btns = this.el.querySelectorAll<HTMLElement>('.menu-item');\n btns[idx]?.focus();\n }\n\n private handleItemClick(item: MenuItemData) {\n if (item.isInactive) return;\n this.dsSelect.emit(item);\n }\n\n private handleGradientSelect(preset: ShellGradientPreset) {\n this.dsGradientSelect.emit(preset);\n }\n\n private handleSwatchSelect(value: string) {\n this.dsSwatchSelect.emit(value);\n }\n\n render() {\n if (!this.shouldRender) return <Host style={{ display: 'contents' }} />;\n\n const sections = this.activeSections;\n let flatIdx = 0;\n\n const popupStyle: Record<string, string> = {\n position: 'fixed',\n left: '0',\n top: '0',\n transform: `translate(${Math.round(this.pos.x)}px, ${Math.round(this.pos.y)}px)`,\n zIndex: '9998',\n visibility: this.positionReady ? 'visible' : 'hidden',\n };\n\n if (this.menuWidth) popupStyle['width'] = this.menuWidth;\n if (this.minWidth) popupStyle['min-width'] = this.minWidth;\n\n return (\n <Host style={{ display: 'contents' }}>\n <div\n class={{\n 'menu-popup': true,\n 'menu-popup--closing': this.closing,\n 'ds-choice-popup': true,\n 'ds-choice-popup--closing': this.closing,\n }}\n style={popupStyle}\n role={this.hasCompositeSections ? 'dialog' : 'menu'}\n aria-label={this.menuLabel}\n aria-orientation={this.hasCompositeSections ? undefined : 'vertical'}\n >\n <div class=\"ds-choice-list\">\n {sections.map((section, si) => (\n <div\n key={si}\n class={{\n 'menu-section': true,\n 'menu-section--divided': si < sections.length - 1,\n 'menu-section--gradient-picker': isMenuPickerSection(section),\n 'ds-choice-section': true,\n 'ds-choice-section--divided': si < sections.length - 1,\n }}\n role={section.header ? 'group' : undefined}\n aria-label={section.header}\n >\n {section.header && (\n <ds-text\n class=\"section-header ds-choice-section__header ds-control--md\"\n as=\"span\"\n variant=\"text-body-small\"\n emphasis\n color=\"primary\"\n aria-hidden=\"true\"\n >\n {section.header}\n </ds-text>\n )}\n {isMenuGradientPickerSection(section) ? (\n <ds-swatch-picker\n value={section.value}\n groupLabel={section.header ?? 'Shell gradient theme'}\n sections={shellGradientPickerSections()}\n onDsChange={(e: CustomEvent<string>) => {\n e.stopPropagation();\n this.handleGradientSelect(e.detail as ShellGradientPreset);\n }}\n />\n ) : isMenuSwatchPickerSection(section) ? (\n <ds-swatch-picker\n value={section.value}\n groupLabel={section.groupLabel ?? section.header ?? 'Swatch options'}\n options={section.options ?? []}\n sections={section.sections ?? []}\n onDsChange={(e: CustomEvent<string>) => {\n e.stopPropagation();\n this.handleSwatchSelect(e.detail);\n }}\n />\n ) : (\n section.items.map(item => {\n const idx = flatIdx++;\n const isFocused = this.focusedIndex === idx;\n return (\n <button\n key={idx}\n type=\"button\"\n class={{\n 'menu-item': true,\n 'ds-choice-item': true,\n 'ds-control--md': true,\n 'ds-focus-ring-inset': true,\n 'ds-focus-ring--visible': isFocused && this.focusRingVisible,\n 'ds-interaction-fill': !item.isInactive,\n 'ds-interaction-fill--selected': !!item.isSelected && !item.isInactive,\n 'menu-item--selected': !!item.isSelected,\n 'ds-control-inactive': !!item.isInactive,\n 'menu-item--destructive': !!item.isDestructive,\n 'menu-item--focused': isFocused,\n }}\n role={this.hasCompositeSections ? undefined : item.showSwitch ? 'menuitemcheckbox' : 'menuitem'}\n aria-checked={!this.hasCompositeSections && item.showSwitch ? String(!!item.switchValue) : undefined}\n aria-pressed={this.hasCompositeSections\n ? String(item.showSwitch ? !!item.switchValue : !!item.isSelected)\n : undefined}\n aria-current={!this.hasCompositeSections && !item.showSwitch && item.isSelected ? 'true' : undefined}\n disabled={item.isInactive}\n tabIndex={this.hasCompositeSections ? 0 : isFocused ? 0 : -1}\n onMouseDown={() => { this.focusRingVisible = false; }}\n onClick={() => this.handleItemClick(item)}\n onFocus={() => { this.focusedIndex = idx; }}\n >\n <div class=\"menu-item__content ds-choice-item__content ds-interaction-fill__content\">\n <ds-text\n class=\"menu-item__label ds-choice-item__label\"\n as=\"span\"\n variant=\"text-body-medium\"\n color={item.isSelected ? 'primary' : 'secondary'}\n >\n {item.label}\n </ds-text>\n {item.subtext && (\n <ds-text class=\"menu-item__subtext ds-choice-item__subtext\" as=\"span\" variant=\"text-body-small\" color=\"secondary\">\n {item.subtext}\n </ds-text>\n )}\n </div>\n {item.dot && (\n <span class=\"menu-item__dot-box ds-interaction-fill__content\" aria-hidden=\"true\">\n <ds-badge\n class=\"menu-item__dot\"\n variant=\"dot\"\n hasRing={false}\n label=\"\"\n />\n </span>\n )}\n {item.showSwitch && (\n <ds-switch\n class=\"menu-item__switch ds-interaction-fill__content\"\n size=\"md\"\n checked={!!item.switchValue}\n presentation\n />\n )}\n </button>\n );\n }))}\n </div>\n ))}\n </div>\n </div>\n </Host>\n );\n }\n}\n"],"mappings":"sZAYO,MAAMA,EAAsBC,ECqC7B,SAAUC,EACdC,GAEA,MAAO,YAAaA,GAAWA,EAAQC,UAAY,iBACrD,CAEM,SAAUC,EACdF,GAEA,MAAO,YAAaA,GAAWA,EAAQC,UAAY,eACrD,CAEM,SAAUE,EACdH,GAEA,OAAOD,EAA4BC,IAAYE,EAA0BF,EAC3E,CCjEA,MAAMI,EAAU,IAAM,mqYCuBtB,MAAMC,EAAwB,EAC9B,MAAMC,EAA0B,CAC9B,UACA,yBACA,6CACA,yBACA,2BACA,mCACAC,KAAK,K,MAOMC,EAAIC,EAAA,MAAAD,UAAAE,EALjB,WAAAC,CAAAC,G,0MAQ2BC,KAAAC,KAAgB,MACjCD,KAAAE,MAAwB,GACxBF,KAAAG,SAA0B,GAC1BH,KAAAI,KAAiB,SACjBJ,KAAAK,MAAmB,QAEnBL,KAAAM,gBAA8C,cAE9CN,KAAAO,WAA8BC,EAAkBC,SAEhDT,KAAAU,YAA+B,EAQ/BV,KAAAW,oBAA+B,MAE/BX,KAAAY,UAAoB,OAEXZ,KAAAa,aAAwB,MACxBb,KAAAc,QAAmB,MACnBd,KAAAe,IAAgC,CAAEC,EAAG,EAAGC,EAAG,GAC3CjB,KAAAkB,aAAuB,EACvBlB,KAAAmB,cAAyB,MACzBnB,KAAAoB,iBAA4B,MASrCpB,KAAAq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AQ,MACR+M,QAAS,MACTH,MAAM,MAIX/C,EAAKuC,YACJ9B,EAAA,aACEc,MAAM,iDACN4B,KAAK,KACLC,UAAWpD,EAAKyC,YAChBY,aAAY,OAGT,S","ignoreList":[]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"timestamp": "2026-07-
|
|
2
|
+
"timestamp": "2026-07-17T23:45:36",
|
|
3
3
|
"compiler": {
|
|
4
4
|
"name": "@stencil/core",
|
|
5
5
|
"version": "4.43.5",
|
|
@@ -1092,12 +1092,9 @@
|
|
|
1092
1092
|
],
|
|
1093
1093
|
"ds-menu": [
|
|
1094
1094
|
"ds-text",
|
|
1095
|
-
"ds-
|
|
1095
|
+
"ds-swatch-picker",
|
|
1096
1096
|
"ds-badge",
|
|
1097
1097
|
"ds-switch"
|
|
1098
|
-
],
|
|
1099
|
-
"ds-shell-gradient-picker": [
|
|
1100
|
-
"ds-shell-gradient-swatch"
|
|
1101
1098
|
]
|
|
1102
1099
|
}
|
|
1103
1100
|
},
|
|
@@ -6855,6 +6852,47 @@
|
|
|
6855
6852
|
"getter": false,
|
|
6856
6853
|
"setter": false
|
|
6857
6854
|
},
|
|
6855
|
+
{
|
|
6856
|
+
"name": "anchorAlignment",
|
|
6857
|
+
"type": "\"choice-cell\" | \"popup-frame\"",
|
|
6858
|
+
"complexType": {
|
|
6859
|
+
"original": "ChoicePopupAnchorAlignment",
|
|
6860
|
+
"resolved": "\"choice-cell\" | \"popup-frame\"",
|
|
6861
|
+
"references": {
|
|
6862
|
+
"ChoicePopupAnchorAlignment": {
|
|
6863
|
+
"location": "import",
|
|
6864
|
+
"path": "../../utils",
|
|
6865
|
+
"id": "src/wc/utils/index.ts::ChoicePopupAnchorAlignment",
|
|
6866
|
+
"referenceLocation": "ChoicePopupAnchorAlignment"
|
|
6867
|
+
}
|
|
6868
|
+
}
|
|
6869
|
+
},
|
|
6870
|
+
"mutable": false,
|
|
6871
|
+
"attr": "anchor-alignment",
|
|
6872
|
+
"reflectToAttr": false,
|
|
6873
|
+
"docs": "Align choice-row edges to the anchor by default; use `popup-frame` only for custom frame geometry.",
|
|
6874
|
+
"docsTags": [
|
|
6875
|
+
{
|
|
6876
|
+
"name": "default",
|
|
6877
|
+
"text": "'choice-cell'"
|
|
6878
|
+
}
|
|
6879
|
+
],
|
|
6880
|
+
"default": "'choice-cell'",
|
|
6881
|
+
"values": [
|
|
6882
|
+
{
|
|
6883
|
+
"value": "choice-cell",
|
|
6884
|
+
"type": "string"
|
|
6885
|
+
},
|
|
6886
|
+
{
|
|
6887
|
+
"value": "popup-frame",
|
|
6888
|
+
"type": "string"
|
|
6889
|
+
}
|
|
6890
|
+
],
|
|
6891
|
+
"optional": false,
|
|
6892
|
+
"required": false,
|
|
6893
|
+
"getter": false,
|
|
6894
|
+
"setter": false
|
|
6895
|
+
},
|
|
6858
6896
|
{
|
|
6859
6897
|
"name": "anchorId",
|
|
6860
6898
|
"type": "string | undefined",
|
|
@@ -7229,6 +7267,20 @@
|
|
|
7229
7267
|
"composed": true,
|
|
7230
7268
|
"docs": "",
|
|
7231
7269
|
"docsTags": []
|
|
7270
|
+
},
|
|
7271
|
+
{
|
|
7272
|
+
"event": "dsSwatchSelect",
|
|
7273
|
+
"detail": "string",
|
|
7274
|
+
"bubbles": true,
|
|
7275
|
+
"complexType": {
|
|
7276
|
+
"original": "string",
|
|
7277
|
+
"resolved": "string",
|
|
7278
|
+
"references": {}
|
|
7279
|
+
},
|
|
7280
|
+
"cancelable": true,
|
|
7281
|
+
"composed": true,
|
|
7282
|
+
"docs": "Emitted when a generic `swatch-picker` section option is chosen.",
|
|
7283
|
+
"docsTags": []
|
|
7232
7284
|
}
|
|
7233
7285
|
],
|
|
7234
7286
|
"listeners": [
|
|
@@ -7247,20 +7299,17 @@
|
|
|
7247
7299
|
],
|
|
7248
7300
|
"dependencies": [
|
|
7249
7301
|
"ds-text",
|
|
7250
|
-
"ds-
|
|
7302
|
+
"ds-swatch-picker",
|
|
7251
7303
|
"ds-badge",
|
|
7252
7304
|
"ds-switch"
|
|
7253
7305
|
],
|
|
7254
7306
|
"dependencyGraph": {
|
|
7255
7307
|
"ds-menu": [
|
|
7256
7308
|
"ds-text",
|
|
7257
|
-
"ds-
|
|
7309
|
+
"ds-swatch-picker",
|
|
7258
7310
|
"ds-badge",
|
|
7259
7311
|
"ds-switch"
|
|
7260
7312
|
],
|
|
7261
|
-
"ds-shell-gradient-picker": [
|
|
7262
|
-
"ds-shell-gradient-swatch"
|
|
7263
|
-
],
|
|
7264
7313
|
"ds-badge": [
|
|
7265
7314
|
"ds-text"
|
|
7266
7315
|
],
|
|
@@ -11288,7 +11337,12 @@
|
|
|
11288
11337
|
"encapsulation": "scoped",
|
|
11289
11338
|
"tag": "ds-shell-gradient-picker",
|
|
11290
11339
|
"docs": "",
|
|
11291
|
-
"docsTags": [
|
|
11340
|
+
"docsTags": [
|
|
11341
|
+
{
|
|
11342
|
+
"name": "deprecated",
|
|
11343
|
+
"text": "Use `ds-swatch-picker` with shell preset options."
|
|
11344
|
+
}
|
|
11345
|
+
],
|
|
11292
11346
|
"usage": {},
|
|
11293
11347
|
"props": [
|
|
11294
11348
|
{
|
|
@@ -11403,27 +11457,28 @@
|
|
|
11403
11457
|
"slots": [],
|
|
11404
11458
|
"parts": [],
|
|
11405
11459
|
"states": [],
|
|
11406
|
-
"dependents": [
|
|
11407
|
-
"ds-menu"
|
|
11408
|
-
],
|
|
11460
|
+
"dependents": [],
|
|
11409
11461
|
"dependencies": [
|
|
11410
|
-
"ds-
|
|
11462
|
+
"ds-swatch-picker"
|
|
11411
11463
|
],
|
|
11412
11464
|
"dependencyGraph": {
|
|
11413
11465
|
"ds-shell-gradient-picker": [
|
|
11414
|
-
"ds-
|
|
11415
|
-
],
|
|
11416
|
-
"ds-menu": [
|
|
11417
|
-
"ds-shell-gradient-picker"
|
|
11466
|
+
"ds-swatch-picker"
|
|
11418
11467
|
]
|
|
11419
|
-
}
|
|
11468
|
+
},
|
|
11469
|
+
"deprecation": "Use `ds-swatch-picker` with shell preset options."
|
|
11420
11470
|
},
|
|
11421
11471
|
{
|
|
11422
11472
|
"filePath": "src/wc/components/ShellGradientSwatch/ShellGradientSwatch.tsx",
|
|
11423
11473
|
"encapsulation": "scoped",
|
|
11424
11474
|
"tag": "ds-shell-gradient-swatch",
|
|
11425
11475
|
"docs": "",
|
|
11426
|
-
"docsTags": [
|
|
11476
|
+
"docsTags": [
|
|
11477
|
+
{
|
|
11478
|
+
"name": "deprecated",
|
|
11479
|
+
"text": "Use `ds-swatch-picker`; individual swatches are implementation detail."
|
|
11480
|
+
}
|
|
11481
|
+
],
|
|
11427
11482
|
"usage": {},
|
|
11428
11483
|
"props": [
|
|
11429
11484
|
{
|
|
@@ -11599,15 +11654,10 @@
|
|
|
11599
11654
|
"slots": [],
|
|
11600
11655
|
"parts": [],
|
|
11601
11656
|
"states": [],
|
|
11602
|
-
"dependents": [
|
|
11603
|
-
"ds-shell-gradient-picker"
|
|
11604
|
-
],
|
|
11657
|
+
"dependents": [],
|
|
11605
11658
|
"dependencies": [],
|
|
11606
|
-
"dependencyGraph": {
|
|
11607
|
-
|
|
11608
|
-
"ds-shell-gradient-swatch"
|
|
11609
|
-
]
|
|
11610
|
-
}
|
|
11659
|
+
"dependencyGraph": {},
|
|
11660
|
+
"deprecation": "Use `ds-swatch-picker`; individual swatches are implementation detail."
|
|
11611
11661
|
},
|
|
11612
11662
|
{
|
|
11613
11663
|
"filePath": "src/wc/components/Skeleton/Skeleton.tsx",
|
|
@@ -12943,6 +12993,179 @@
|
|
|
12943
12993
|
]
|
|
12944
12994
|
}
|
|
12945
12995
|
},
|
|
12996
|
+
{
|
|
12997
|
+
"filePath": "src/wc/components/SwatchPicker/SwatchPicker.tsx",
|
|
12998
|
+
"encapsulation": "scoped",
|
|
12999
|
+
"tag": "ds-swatch-picker",
|
|
13000
|
+
"docs": "",
|
|
13001
|
+
"docsTags": [],
|
|
13002
|
+
"usage": {},
|
|
13003
|
+
"props": [
|
|
13004
|
+
{
|
|
13005
|
+
"name": "groupLabel",
|
|
13006
|
+
"type": "string",
|
|
13007
|
+
"complexType": {
|
|
13008
|
+
"original": "string",
|
|
13009
|
+
"resolved": "string",
|
|
13010
|
+
"references": {}
|
|
13011
|
+
},
|
|
13012
|
+
"mutable": false,
|
|
13013
|
+
"attr": "group-label",
|
|
13014
|
+
"reflectToAttr": false,
|
|
13015
|
+
"docs": "Accessible name for the complete one-of-many choice.",
|
|
13016
|
+
"docsTags": [
|
|
13017
|
+
{
|
|
13018
|
+
"name": "default",
|
|
13019
|
+
"text": "'Swatch options'"
|
|
13020
|
+
}
|
|
13021
|
+
],
|
|
13022
|
+
"default": "'Swatch options'",
|
|
13023
|
+
"values": [
|
|
13024
|
+
{
|
|
13025
|
+
"type": "string"
|
|
13026
|
+
}
|
|
13027
|
+
],
|
|
13028
|
+
"optional": false,
|
|
13029
|
+
"required": false,
|
|
13030
|
+
"getter": false,
|
|
13031
|
+
"setter": false
|
|
13032
|
+
},
|
|
13033
|
+
{
|
|
13034
|
+
"name": "options",
|
|
13035
|
+
"type": "SwatchPickerOption[]",
|
|
13036
|
+
"complexType": {
|
|
13037
|
+
"original": "SwatchPickerOption[]",
|
|
13038
|
+
"resolved": "SwatchPickerOption[]",
|
|
13039
|
+
"references": {
|
|
13040
|
+
"SwatchPickerOption": {
|
|
13041
|
+
"location": "import",
|
|
13042
|
+
"path": "./swatch-picker-types",
|
|
13043
|
+
"id": "src/wc/components/SwatchPicker/swatch-picker-types.ts::SwatchPickerOption",
|
|
13044
|
+
"referenceLocation": "SwatchPickerOption"
|
|
13045
|
+
}
|
|
13046
|
+
}
|
|
13047
|
+
},
|
|
13048
|
+
"mutable": false,
|
|
13049
|
+
"reflectToAttr": false,
|
|
13050
|
+
"docs": "Flat option list. Sections take precedence when supplied. Assign as a JavaScript property.",
|
|
13051
|
+
"docsTags": [
|
|
13052
|
+
{
|
|
13053
|
+
"name": "default",
|
|
13054
|
+
"text": "[]"
|
|
13055
|
+
}
|
|
13056
|
+
],
|
|
13057
|
+
"default": "[]",
|
|
13058
|
+
"values": [
|
|
13059
|
+
{
|
|
13060
|
+
"type": "SwatchPickerOption[]"
|
|
13061
|
+
}
|
|
13062
|
+
],
|
|
13063
|
+
"optional": false,
|
|
13064
|
+
"required": false,
|
|
13065
|
+
"getter": false,
|
|
13066
|
+
"setter": false
|
|
13067
|
+
},
|
|
13068
|
+
{
|
|
13069
|
+
"name": "sections",
|
|
13070
|
+
"type": "SwatchPickerSection[]",
|
|
13071
|
+
"complexType": {
|
|
13072
|
+
"original": "SwatchPickerSection[]",
|
|
13073
|
+
"resolved": "SwatchPickerSection[]",
|
|
13074
|
+
"references": {
|
|
13075
|
+
"SwatchPickerSection": {
|
|
13076
|
+
"location": "import",
|
|
13077
|
+
"path": "./swatch-picker-types",
|
|
13078
|
+
"id": "src/wc/components/SwatchPicker/swatch-picker-types.ts::SwatchPickerSection",
|
|
13079
|
+
"referenceLocation": "SwatchPickerSection"
|
|
13080
|
+
}
|
|
13081
|
+
}
|
|
13082
|
+
},
|
|
13083
|
+
"mutable": false,
|
|
13084
|
+
"reflectToAttr": false,
|
|
13085
|
+
"docs": "Visually separated option groups that remain one radio group. Assign as a JavaScript property.",
|
|
13086
|
+
"docsTags": [
|
|
13087
|
+
{
|
|
13088
|
+
"name": "default",
|
|
13089
|
+
"text": "[]"
|
|
13090
|
+
}
|
|
13091
|
+
],
|
|
13092
|
+
"default": "[]",
|
|
13093
|
+
"values": [
|
|
13094
|
+
{
|
|
13095
|
+
"type": "SwatchPickerSection[]"
|
|
13096
|
+
}
|
|
13097
|
+
],
|
|
13098
|
+
"optional": false,
|
|
13099
|
+
"required": false,
|
|
13100
|
+
"getter": false,
|
|
13101
|
+
"setter": false
|
|
13102
|
+
},
|
|
13103
|
+
{
|
|
13104
|
+
"name": "value",
|
|
13105
|
+
"type": "string",
|
|
13106
|
+
"complexType": {
|
|
13107
|
+
"original": "string",
|
|
13108
|
+
"resolved": "string",
|
|
13109
|
+
"references": {}
|
|
13110
|
+
},
|
|
13111
|
+
"mutable": true,
|
|
13112
|
+
"attr": "value",
|
|
13113
|
+
"reflectToAttr": true,
|
|
13114
|
+
"docs": "Selected option value.",
|
|
13115
|
+
"docsTags": [
|
|
13116
|
+
{
|
|
13117
|
+
"name": "default",
|
|
13118
|
+
"text": "''"
|
|
13119
|
+
}
|
|
13120
|
+
],
|
|
13121
|
+
"default": "''",
|
|
13122
|
+
"values": [
|
|
13123
|
+
{
|
|
13124
|
+
"type": "string"
|
|
13125
|
+
}
|
|
13126
|
+
],
|
|
13127
|
+
"optional": false,
|
|
13128
|
+
"required": false,
|
|
13129
|
+
"getter": false,
|
|
13130
|
+
"setter": false
|
|
13131
|
+
}
|
|
13132
|
+
],
|
|
13133
|
+
"methods": [],
|
|
13134
|
+
"events": [
|
|
13135
|
+
{
|
|
13136
|
+
"event": "dsChange",
|
|
13137
|
+
"detail": "string",
|
|
13138
|
+
"bubbles": true,
|
|
13139
|
+
"complexType": {
|
|
13140
|
+
"original": "string",
|
|
13141
|
+
"resolved": "string",
|
|
13142
|
+
"references": {}
|
|
13143
|
+
},
|
|
13144
|
+
"cancelable": true,
|
|
13145
|
+
"composed": true,
|
|
13146
|
+
"docs": "",
|
|
13147
|
+
"docsTags": []
|
|
13148
|
+
}
|
|
13149
|
+
],
|
|
13150
|
+
"listeners": [],
|
|
13151
|
+
"styles": [],
|
|
13152
|
+
"slots": [],
|
|
13153
|
+
"parts": [],
|
|
13154
|
+
"states": [],
|
|
13155
|
+
"dependents": [
|
|
13156
|
+
"ds-menu",
|
|
13157
|
+
"ds-shell-gradient-picker"
|
|
13158
|
+
],
|
|
13159
|
+
"dependencies": [],
|
|
13160
|
+
"dependencyGraph": {
|
|
13161
|
+
"ds-menu": [
|
|
13162
|
+
"ds-swatch-picker"
|
|
13163
|
+
],
|
|
13164
|
+
"ds-shell-gradient-picker": [
|
|
13165
|
+
"ds-swatch-picker"
|
|
13166
|
+
]
|
|
13167
|
+
}
|
|
13168
|
+
},
|
|
12946
13169
|
{
|
|
12947
13170
|
"filePath": "src/wc/components/Switch/Switch.tsx",
|
|
12948
13171
|
"encapsulation": "shadow",
|
|
@@ -15681,7 +15904,7 @@
|
|
|
15681
15904
|
"path": "src/wc/components/Menu/menu-types.ts"
|
|
15682
15905
|
},
|
|
15683
15906
|
"src/wc/components/Menu/menu-types.ts::MenuSection": {
|
|
15684
|
-
"declaration": "export type MenuSection
|
|
15907
|
+
"declaration": "export type MenuSection =\n | MenuItemsSection\n | MenuGradientPickerSection\n | MenuSwatchPickerSection;",
|
|
15685
15908
|
"docstring": "",
|
|
15686
15909
|
"path": "src/wc/components/Menu/menu-types.ts"
|
|
15687
15910
|
},
|
|
@@ -15695,6 +15918,11 @@
|
|
|
15695
15918
|
"docstring": "",
|
|
15696
15919
|
"path": "src/wc/components/Menu/menu-position.ts"
|
|
15697
15920
|
},
|
|
15921
|
+
"src/wc/utils/index.ts::ChoicePopupAnchorAlignment": {
|
|
15922
|
+
"declaration": "any",
|
|
15923
|
+
"docstring": "",
|
|
15924
|
+
"path": "src/wc/utils/index.ts"
|
|
15925
|
+
},
|
|
15698
15926
|
"src/wc/components/PanelNav/panel-nav-types.ts::PanelNavGroup": {
|
|
15699
15927
|
"declaration": "export interface PanelNavGroup {\n id?: string;\n label?: string;\n items: PanelNavItem[];\n}",
|
|
15700
15928
|
"docstring": "",
|
|
@@ -15729,6 +15957,16 @@
|
|
|
15729
15957
|
"declaration": "any",
|
|
15730
15958
|
"docstring": "",
|
|
15731
15959
|
"path": "src/wc/components/ShellGradientSwatch/shell-gradient-swatch-types.ts"
|
|
15960
|
+
},
|
|
15961
|
+
"src/wc/components/SwatchPicker/swatch-picker-types.ts::SwatchPickerOption": {
|
|
15962
|
+
"declaration": "export interface SwatchPickerOption {\n /** Stable value emitted when this option is selected. */\n value: string;\n /** Accessible option name; the visual preview never replaces this label. */\n label: string;\n preview: SwatchPickerPreview;\n isInactive?: boolean;\n}",
|
|
15963
|
+
"docstring": "",
|
|
15964
|
+
"path": "src/wc/components/SwatchPicker/swatch-picker-types.ts"
|
|
15965
|
+
},
|
|
15966
|
+
"src/wc/components/SwatchPicker/swatch-picker-types.ts::SwatchPickerSection": {
|
|
15967
|
+
"declaration": "export interface SwatchPickerSection {\n /** Sections remain one radio group and are separated visually. */\n options: SwatchPickerOption[];\n}",
|
|
15968
|
+
"docstring": "",
|
|
15969
|
+
"path": "src/wc/components/SwatchPicker/swatch-picker-types.ts"
|
|
15732
15970
|
}
|
|
15733
15971
|
}
|
|
15734
15972
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
+
import type { ChoicePopupAnchorAlignment } from '../../utils/choice-popup-alignment';
|
|
1
2
|
import type { MenuAlign, MenuSide } from './menu-position';
|
|
2
3
|
/** Placement props bindable on `ds-menu` (side, align, offsets). */
|
|
3
4
|
export interface MenuPlacement {
|
|
4
5
|
side: MenuSide;
|
|
5
6
|
align: MenuAlign;
|
|
7
|
+
anchorAlignment: ChoicePopupAnchorAlignment;
|
|
6
8
|
sideOffset: number | string;
|
|
7
9
|
alignOffset: number | string;
|
|
8
10
|
}
|
|
@@ -11,13 +13,14 @@ export interface MenuPlacement {
|
|
|
11
13
|
* Anchor from `dsNavUserAction` detail `{ anchor }` (id `ds-panel-nav-user-menu-anchor`).
|
|
12
14
|
*
|
|
13
15
|
* Not for BarNav overflow menus — those use `side="bottom"` / `align="end"` internally.
|
|
14
|
-
* `align: 'end'` bottom-aligns on the anchor;
|
|
16
|
+
* `align: 'end'` bottom-aligns the last choice cell on the anchor; the side offset nudges into the content area:
|
|
15
17
|
* - `sideOffset` space-100 + space-050 (12px): 4px past the panel-nav outer edge (anchor is ~8px inset).
|
|
16
|
-
* - `
|
|
18
|
+
* - `anchorAlignment: 'choice-cell'`: the shared section inset puts the last row edge on the footer user row.
|
|
17
19
|
*/
|
|
18
20
|
export declare const PANEL_NAV_USER_MENU_PLACEMENT: {
|
|
19
21
|
readonly side: "right";
|
|
20
22
|
readonly align: "end";
|
|
23
|
+
readonly anchorAlignment: "choice-cell";
|
|
21
24
|
readonly sideOffset: "calc(var(--dimension-space-100) + var(--dimension-space-050))";
|
|
22
|
-
readonly alignOffset:
|
|
25
|
+
readonly alignOffset: 0;
|
|
23
26
|
};
|
|
@@ -6,8 +6,8 @@ export { SHELL_GRADIENT_IMAGE_VAR, SHELL_GRADIENT_SIZE_VAR, SHELL_GRADIENT_POSIT
|
|
|
6
6
|
export type { ShellGradientLayout, ShellViewportDimensions } from './shell-gradient';
|
|
7
7
|
export type { MenuPlacement } from '../components/Menu/menu-placement';
|
|
8
8
|
export { PANEL_NAV_USER_MENU_PLACEMENT, } from '../components/Menu/menu-placement';
|
|
9
|
-
export type { ShellGradientPreset } from './shell-gradient-presets';
|
|
10
|
-
export { DEFAULT_SHELL_GRADIENT_PRESET, SHELL_GRADIENT_PRESETS, SHELL_GRADIENT_PRESET_LABELS, buildShellRadialGradientForPreset, isShellGradientPreset, normalizeShellGradientPreset, shellGradientPresetStopToken, } from './shell-gradient-presets';
|
|
9
|
+
export type { ShellGradientPickerOption, ShellGradientPickerPreview, ShellGradientPickerSection, ShellGradientPreset, } from './shell-gradient-presets';
|
|
10
|
+
export { DEFAULT_SHELL_GRADIENT_PRESET, SHELL_GRADIENT_PRESETS, SHELL_GRADIENT_PRESET_LABELS, buildShellRadialGradientForPreset, isShellGradientPreset, normalizeShellGradientPreset, shellGradientPickerSections, shellGradientPresetStopToken, } from './shell-gradient-presets';
|
|
11
11
|
export type { ChromeTransitionDetail, ChromeTransitionSource } from './chrome-transition';
|
|
12
12
|
export { CHROME_TRANSITION_END, CHROME_TRANSITION_START, ChromeTransitionDepth, createRafCoalescer, readChromeTransitionSource, readChromeTransitionPhase, } from './chrome-transition';
|
|
13
13
|
export { barGradientPositionFromPanelWidth, isPanelNavCollapsed, panelWidthPxFromTokens, readCssVarWidthPx, readPanelNavWidthTokens, } from './shell-chrome-metrics';
|
package/dist/lib/shell/index.js
CHANGED
|
@@ -137,6 +137,12 @@ var SHELL_GRADIENT_PRESETS = [
|
|
|
137
137
|
"warm",
|
|
138
138
|
"fresh"
|
|
139
139
|
];
|
|
140
|
+
var SHELL_GRADIENT_WASH_PRESETS = [
|
|
141
|
+
"cool",
|
|
142
|
+
"neutral",
|
|
143
|
+
"warm",
|
|
144
|
+
"fresh"
|
|
145
|
+
];
|
|
140
146
|
var DEFAULT_SHELL_GRADIENT_PRESET = "neutral";
|
|
141
147
|
var SHELL_GRADIENT_PRESET_LABELS = {
|
|
142
148
|
none: "None",
|
|
@@ -184,6 +190,13 @@ function shellGradientPresetStopToken(preset) {
|
|
|
184
190
|
const stops = SHELL_GRADIENT_RECIPES[preset].stops;
|
|
185
191
|
return stops[stops.length - 1]?.color ?? null;
|
|
186
192
|
}
|
|
193
|
+
function shellGradientPresetRecipe(preset) {
|
|
194
|
+
const normalized = normalizeShellGradientPreset(preset);
|
|
195
|
+
return normalized === "none" ? null : SHELL_GRADIENT_RECIPES[normalized];
|
|
196
|
+
}
|
|
197
|
+
function shellGradientPresetOpacity(preset) {
|
|
198
|
+
return String(shellGradientPresetRecipe(preset)?.opacity ?? 0);
|
|
199
|
+
}
|
|
187
200
|
function isShellGradientPreset(value) {
|
|
188
201
|
return SHELL_GRADIENT_PRESETS.includes(value);
|
|
189
202
|
}
|
|
@@ -199,6 +212,30 @@ function buildShellRadialGradientFromStops(stops) {
|
|
|
199
212
|
const serialized = stops.map((stop) => `${stop.color} ${stop.position}%`).join(", ");
|
|
200
213
|
return `radial-gradient(${GRADIENT_GEOMETRY}, ${serialized})`;
|
|
201
214
|
}
|
|
215
|
+
function shellGradientPickerSections() {
|
|
216
|
+
return [
|
|
217
|
+
{
|
|
218
|
+
options: [{
|
|
219
|
+
value: "none",
|
|
220
|
+
label: SHELL_GRADIENT_PRESET_LABELS.none,
|
|
221
|
+
preview: {
|
|
222
|
+
backgroundColor: "var(--color-background-secondary)"
|
|
223
|
+
}
|
|
224
|
+
}]
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
options: SHELL_GRADIENT_WASH_PRESETS.map((preset) => ({
|
|
228
|
+
value: preset,
|
|
229
|
+
label: SHELL_GRADIENT_PRESET_LABELS[preset],
|
|
230
|
+
preview: {
|
|
231
|
+
backgroundColor: "var(--color-background-secondary)",
|
|
232
|
+
backgroundImage: buildShellRadialGradientForPreset(preset),
|
|
233
|
+
opacity: Number(shellGradientPresetOpacity(preset))
|
|
234
|
+
}
|
|
235
|
+
}))
|
|
236
|
+
}
|
|
237
|
+
];
|
|
238
|
+
}
|
|
202
239
|
|
|
203
240
|
// src/wc/shell/shell-gradient.ts
|
|
204
241
|
var SHELL_GRADIENT_IMAGE_VAR = "--ds-shell-gradient-image";
|
|
@@ -238,50 +275,13 @@ function shellChromeSurfacePosition(leftPx, topPx) {
|
|
|
238
275
|
return `${-Math.round(leftPx)}px ${-Math.round(topPx)}px`;
|
|
239
276
|
}
|
|
240
277
|
|
|
241
|
-
// src/wc/utils/token-defaults.ts
|
|
242
|
-
import {
|
|
243
|
-
dimensionIconographyMd,
|
|
244
|
-
dimensionIconographySm,
|
|
245
|
-
dimensionIconographyXs,
|
|
246
|
-
dimensionMenuWidthXs,
|
|
247
|
-
dimensionPanelWidth2xs,
|
|
248
|
-
dimensionPanelWidthLg,
|
|
249
|
-
dimensionPanelWidthMd,
|
|
250
|
-
dimensionRadius025,
|
|
251
|
-
dimensionSize200,
|
|
252
|
-
dimensionSize300,
|
|
253
|
-
dimensionSize400,
|
|
254
|
-
dimensionSize600,
|
|
255
|
-
dimensionSize800,
|
|
256
|
-
dimensionSpace050,
|
|
257
|
-
dimensionSpace200,
|
|
258
|
-
typographyLineheightLg,
|
|
259
|
-
typographyLineheightMd,
|
|
260
|
-
typographyLineheightSm,
|
|
261
|
-
typographyLineheightXl,
|
|
262
|
-
typographyLineheightXs,
|
|
263
|
-
effectAnimationDelayLong2,
|
|
264
|
-
effectAnimationDelayMedium1,
|
|
265
|
-
effectAnimationDelayMedium3,
|
|
266
|
-
effectAnimationDelayInstant,
|
|
267
|
-
effectAnimationDelayShort2,
|
|
268
|
-
effectAnimationDurationMedium1,
|
|
269
|
-
effectAnimationDurationShort3,
|
|
270
|
-
effectMotionShort2,
|
|
271
|
-
effectMotionShort3
|
|
272
|
-
} from "@ds-mo/tokens/ts";
|
|
273
|
-
var TOKEN_CSS_LENGTHS = {
|
|
274
|
-
space050: `var(${dimensionSpace050})`,
|
|
275
|
-
space200: `var(${dimensionSpace200})`,
|
|
276
|
-
menuWidthXs: `var(${dimensionMenuWidthXs})`
|
|
277
|
-
};
|
|
278
|
-
|
|
279
278
|
// src/wc/components/Menu/menu-placement.ts
|
|
280
279
|
var PANEL_NAV_USER_MENU_PLACEMENT = {
|
|
281
280
|
side: "right",
|
|
282
281
|
align: "end",
|
|
282
|
+
anchorAlignment: "choice-cell",
|
|
283
283
|
sideOffset: "calc(var(--dimension-space-100) + var(--dimension-space-050))",
|
|
284
|
-
alignOffset:
|
|
284
|
+
alignOffset: 0
|
|
285
285
|
};
|
|
286
286
|
|
|
287
287
|
// src/wc/shell/chrome-transition.ts
|
|
@@ -469,6 +469,7 @@ export {
|
|
|
469
469
|
shellChromeLayerActive,
|
|
470
470
|
shellChromeSurfacePosition,
|
|
471
471
|
shellGradientImage,
|
|
472
|
+
shellGradientPickerSections,
|
|
472
473
|
shellGradientPositionBar,
|
|
473
474
|
shellGradientPositionPanel,
|
|
474
475
|
shellGradientPresetStopToken,
|