@greypan/web-ui 12.0.1 → 12.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.
Files changed (129) hide show
  1. package/README.CN.md +2 -0
  2. package/README.md +2 -0
  3. package/dist/assets/menu-portal.js +1 -1
  4. package/dist/assets/menu-portal.js.map +1 -1
  5. package/dist/assets/toast-containers.js +1 -1
  6. package/dist/assets/toast-containers.js.map +1 -1
  7. package/dist/components/autocomplete/index.d.ts +5 -0
  8. package/dist/components/autocomplete/index.d.ts.map +1 -1
  9. package/dist/components/autocomplete/index.js +17 -1
  10. package/dist/components/autocomplete/index.js.map +1 -1
  11. package/dist/components/autocomplete/style.js +1 -1
  12. package/dist/components/autocomplete/style.js.map +1 -1
  13. package/dist/components/back-top/style.js +1 -1
  14. package/dist/components/back-top/style.js.map +1 -1
  15. package/dist/components/button-group/style.js +1 -1
  16. package/dist/components/button-group/style.js.map +1 -1
  17. package/dist/components/dialog/index.d.ts +5 -1
  18. package/dist/components/dialog/index.d.ts.map +1 -1
  19. package/dist/components/dialog/index.js +16 -4
  20. package/dist/components/dialog/index.js.map +1 -1
  21. package/dist/components/dialog/style.js +1 -1
  22. package/dist/components/dialog/style.js.map +1 -1
  23. package/dist/components/dropdown/index.js +1 -1
  24. package/dist/components/icon/index.d.ts +1 -1
  25. package/dist/components/icon/index.d.ts.map +1 -1
  26. package/dist/components/index.d.ts +3 -2
  27. package/dist/components/index.d.ts.map +1 -1
  28. package/dist/components/index.js +2 -1
  29. package/dist/components/layout/index.d.ts +8 -0
  30. package/dist/components/layout/index.d.ts.map +1 -1
  31. package/dist/components/layout/index.js +23 -13
  32. package/dist/components/layout/index.js.map +1 -1
  33. package/dist/components/layout/style.js +1 -1
  34. package/dist/components/layout/style.js.map +1 -1
  35. package/dist/components/popover/index.js +1 -1
  36. package/dist/components/popover/style.js +1 -1
  37. package/dist/components/popover/style.js.map +1 -1
  38. package/dist/components/progress/index.d.ts +30 -0
  39. package/dist/components/progress/index.d.ts.map +1 -0
  40. package/dist/components/progress/index.js +103 -0
  41. package/dist/components/progress/index.js.map +1 -0
  42. package/dist/components/progress/style.js +5 -0
  43. package/dist/components/progress/style.js.map +1 -0
  44. package/dist/components/segmented-trigger/index.d.ts +2 -0
  45. package/dist/components/segmented-trigger/index.d.ts.map +1 -1
  46. package/dist/components/segmented-trigger/index.js +7 -0
  47. package/dist/components/segmented-trigger/index.js.map +1 -1
  48. package/dist/components/select/index.d.ts +13 -0
  49. package/dist/components/select/index.d.ts.map +1 -1
  50. package/dist/components/select/index.js +41 -3
  51. package/dist/components/select/index.js.map +1 -1
  52. package/dist/components/select/style.js +1 -1
  53. package/dist/components/select/style.js.map +1 -1
  54. package/dist/components/spinner/index.d.ts +0 -3
  55. package/dist/components/spinner/index.d.ts.map +1 -1
  56. package/dist/components/spinner/index.js +5 -20
  57. package/dist/components/spinner/index.js.map +1 -1
  58. package/dist/components/spinner/style.js +1 -1
  59. package/dist/components/spinner/style.js.map +1 -1
  60. package/dist/components/theme/style.js +1 -1
  61. package/dist/components/theme/style.js.map +1 -1
  62. package/dist/components/tooltip/index.js +1 -1
  63. package/dist/components/tooltip/style.js +1 -1
  64. package/dist/components/tooltip/style.js.map +1 -1
  65. package/dist/icons/generated/ant-design-sync-outlined.d.ts +7 -0
  66. package/dist/icons/generated/ant-design-sync-outlined.d.ts.map +1 -0
  67. package/dist/icons/generated/ant-design-sync-outlined.js +9 -0
  68. package/dist/icons/generated/ant-design-sync-outlined.js.map +1 -0
  69. package/dist/icons/generated/ic-baseline-phonelink.d.ts +7 -0
  70. package/dist/icons/generated/ic-baseline-phonelink.d.ts.map +1 -0
  71. package/dist/icons/generated/ic-baseline-phonelink.js +9 -0
  72. package/dist/icons/generated/ic-baseline-phonelink.js.map +1 -0
  73. package/dist/icons/generated/ic-outline-motion-photos-off.d.ts +7 -0
  74. package/dist/icons/generated/ic-outline-motion-photos-off.d.ts.map +1 -0
  75. package/dist/icons/generated/ic-outline-motion-photos-off.js +9 -0
  76. package/dist/icons/generated/ic-outline-motion-photos-off.js.map +1 -0
  77. package/dist/icons/generated/ic-outline-motion-photos-on.d.ts +7 -0
  78. package/dist/icons/generated/ic-outline-motion-photos-on.d.ts.map +1 -0
  79. package/dist/icons/generated/ic-outline-motion-photos-on.js +9 -0
  80. package/dist/icons/generated/ic-outline-motion-photos-on.js.map +1 -0
  81. package/dist/icons/generated/ic-round-menu-open.d.ts +7 -0
  82. package/dist/icons/generated/ic-round-menu-open.d.ts.map +1 -0
  83. package/dist/icons/generated/ic-round-menu-open.js +9 -0
  84. package/dist/icons/generated/ic-round-menu-open.js.map +1 -0
  85. package/dist/icons/generated/lucide-accessibility.d.ts +7 -0
  86. package/dist/icons/generated/lucide-accessibility.d.ts.map +1 -0
  87. package/dist/icons/generated/lucide-accessibility.js +9 -0
  88. package/dist/icons/generated/lucide-accessibility.js.map +1 -0
  89. package/dist/icons/generated/lucide-boxes.d.ts +7 -0
  90. package/dist/icons/generated/lucide-boxes.d.ts.map +1 -0
  91. package/dist/icons/generated/lucide-boxes.js +9 -0
  92. package/dist/icons/generated/lucide-boxes.js.map +1 -0
  93. package/dist/icons/generated/lucide-contrast.d.ts +7 -0
  94. package/dist/icons/generated/lucide-contrast.d.ts.map +1 -0
  95. package/dist/icons/generated/lucide-contrast.js +9 -0
  96. package/dist/icons/generated/lucide-contrast.js.map +1 -0
  97. package/dist/icons/generated/lucide-keyboard.d.ts +7 -0
  98. package/dist/icons/generated/lucide-keyboard.d.ts.map +1 -0
  99. package/dist/icons/generated/lucide-keyboard.js +9 -0
  100. package/dist/icons/generated/lucide-keyboard.js.map +1 -0
  101. package/dist/icons/generated/lucide-languages.d.ts +7 -0
  102. package/dist/icons/generated/lucide-languages.d.ts.map +1 -0
  103. package/dist/icons/generated/lucide-languages.js +9 -0
  104. package/dist/icons/generated/lucide-languages.js.map +1 -0
  105. package/dist/icons/generated/lucide-list.d.ts +7 -0
  106. package/dist/icons/generated/lucide-list.d.ts.map +1 -0
  107. package/dist/icons/generated/lucide-list.js +9 -0
  108. package/dist/icons/generated/lucide-list.js.map +1 -0
  109. package/dist/icons/generated/lucide-moon.d.ts +7 -0
  110. package/dist/icons/generated/lucide-moon.d.ts.map +1 -0
  111. package/dist/icons/generated/lucide-moon.js +9 -0
  112. package/dist/icons/generated/lucide-moon.js.map +1 -0
  113. package/dist/icons/generated/lucide-sparkles.d.ts +7 -0
  114. package/dist/icons/generated/lucide-sparkles.d.ts.map +1 -0
  115. package/dist/icons/generated/lucide-sparkles.js +9 -0
  116. package/dist/icons/generated/lucide-sparkles.js.map +1 -0
  117. package/dist/icons/generated/lucide-sun.d.ts +7 -0
  118. package/dist/icons/generated/lucide-sun.d.ts.map +1 -0
  119. package/dist/icons/generated/lucide-sun.js +9 -0
  120. package/dist/icons/generated/lucide-sun.js.map +1 -0
  121. package/dist/icons/generated/tabler-brand-typescript.d.ts +7 -0
  122. package/dist/icons/generated/tabler-brand-typescript.d.ts.map +1 -0
  123. package/dist/icons/generated/tabler-brand-typescript.js +9 -0
  124. package/dist/icons/generated/tabler-brand-typescript.js.map +1 -0
  125. package/dist/icons/index.d.ts +87 -72
  126. package/dist/icons/index.js +16 -1
  127. package/dist/shared/locale/builtin-labels.js +2 -1
  128. package/dist/shared/locale/builtin-labels.js.map +1 -1
  129. package/package.json +4 -2
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["glass","overlayMotion","scrollbarStyle","style","lucideChevronDown"],"sources":["../../../src/components/select/index.ts"],"sourcesContent":["import '@/components/icon'\n\nimport { html, LitElement, nothing, type PropertyValues, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport overlayMotion from '@/assets/overlay-motion.css?inline'\nimport scrollbarStyle from '@/assets/scrollbar.css?inline'\nimport glass from '@/classes/glass.css?inline'\nimport type { WebUiOption } from '@/components/option'\nimport { lucideChevronDown } from '@/icons'\nimport { installPointerFocusSuppression } from '@/shared/focus/pointer-focus'\nimport { FormAssociated, defineFormAssociation, FormAssociationController } from '@/shared/form-association'\nimport { dispatchOpenChangeEvent } from '@/shared/open-state'\nimport {\n createComboboxOpenController,\n createOptionListenerBinding,\n defineOptionPortal,\n handleComboboxFocusOut,\n nextWrappingIndex\n} from '@/shared/option-portal'\nimport { defineAnchoredPanel } from '@/shared/overlay/anchored-panel'\nimport { defineOpenOverlay } from '@/shared/overlay/open-overlay'\nimport {\n applyOverlayVariables,\n defineOverlayPortal,\n type OverlayContainer,\n type OverlayPortal\n} from '@/shared/overlay/portal'\nimport { defineScrollLockLease } from '@/shared/scroll-lock/scroll-lock'\n\nimport style from './style.css?inline'\n\ninstallPointerFocusSuppression()\n\n@customElement('web-ui-select')\nexport class WebUiSelect extends FormAssociated(LitElement) {\n static override styles = [unsafeCSS(glass), unsafeCSS(overlayMotion), unsafeCSS(scrollbarStyle), unsafeCSS(style)]\n\n @property({ type: String, reflect: true }) placeholder = ''\n @property({ type: Boolean, reflect: true }) disabled = false\n @property({ type: Boolean, reflect: true }) required = false\n @property({ type: Boolean, reflect: true }) portal = false\n @property({ type: Boolean, reflect: true, attribute: 'no-scroll-lock' }) noScrollLock = false\n @property({ attribute: false }) overlayContainer?: OverlayContainer\n @property({ type: String, reflect: true }) name = ''\n\n // Explicitly delegated accessible naming attributes.\n @property({ type: String, attribute: 'aria-label' }) override ariaLabel: string | null = null\n\n // value 使用内部状态 + 访问器模式,在变更时同步 ElementInternals;\n // @property + reflect 让它与 input/textarea/slider/input-number 的 value 反射语义保持一致。\n @state() private _value = ''\n @property({ type: String, reflect: true })\n get value(): string {\n return this._value\n }\n set value(v: string) {\n const old = this._value\n this._value = v\n this._formAssociation.sync()\n this.toggleAttribute('data-has-value', !!v)\n this.requestUpdate('value', old)\n }\n\n private readonly _formAssociation = defineFormAssociation<string>({\n host: this,\n initialize: () => {\n // 同步 HTML 属性中预设的 value,补全访问器模式不处理 attribute 反射。\n const attrValue = this.getAttribute('value')\n if (attrValue !== null) {\n this._value = attrValue\n this.toggleAttribute('data-has-value', !!attrValue)\n }\n },\n getState: () => this._value,\n setState: value => {\n this.value = value\n },\n getFormValue: () => this._value,\n getFormState: () => this._value,\n restoreState: state => {\n if (typeof state === 'string') this.value = state\n },\n syncValidity: () => this._syncValidity()\n }).make()\n\n private readonly _formAssociationController = new FormAssociationController(this, this._formAssociation)\n\n private get _isDisabled(): boolean {\n return this.disabled || this._formAssociation.isFormDisabled()\n }\n\n @state() private _isOpen = false\n @state() private _activeIndex = -1\n @state() private _selectedLabel = ''\n @state() private _hasTriggerSlot = false\n\n private _typeaheadBuffer = ''\n private _typeaheadLastInputAt = 0\n\n private _options: WebUiOption[] = []\n private _portal?: OverlayPortal\n private _portalContent?: HTMLElement\n private readonly _scrollLock = defineScrollLockLease().make()\n\n private static _nextInstanceId = 0\n\n // option 注册表 / portal 同步 / 微任务调度收敛到 shared 模块(autocomplete 同款)\n private readonly _optionPortal = defineOptionPortal().make({\n element: this,\n // 实例级前缀保证多实例同时展开时 option id 不冲突(aria 引用按 id 定位)\n idPrefix: `web-ui-select-${++WebUiSelect._nextInstanceId}`,\n getPortal: () => this._portal,\n getPortalContent: () => this._portalContent,\n isOpen: () => this.portal && this._isOpen,\n getMigratableNodes: () => [...this.querySelectorAll<WebUiOption>('web-ui-option')],\n hasUpdated: () => this.hasUpdated,\n requestUpdate: () => this.requestUpdate(),\n bindOption: option => this._bindOption(option),\n unbindOption: option => this._unbindOption(option),\n onImmediateSync: () => {\n this._refreshOptions()\n this._syncSelected()\n this._syncActiveOption()\n }\n })\n /*\n * 开启态 overlay 承载「我开着吗」(issue #120 Block 1):本组件不在 keydown 里自行关闭,\n * 只声明「我开着」。宿主级监听在 portal 模式下收不到 panel 内的 Escape,由唯一仲裁者\n * 在 document 捕获阶段判定最内层。\n *\n * 宿主接口除 requestClose 外只再提供一个 isConnected(仅供惰性回收读取):开启状态是\n * 声明而非询问,仲裁时不再回头问 isOpen()。\n */\n private readonly _overlay = defineOpenOverlay().make({\n requestClose: () => this._close(),\n isConnected: () => this.isConnected\n })\n private readonly _panel = defineAnchoredPanel().make({\n getAnchor: () => this.shadowRoot?.querySelector<HTMLElement>('.select-trigger') ?? null,\n getLocalPanel: () => this.shadowRoot?.querySelector<HTMLElement>('.select-overlay') ?? null,\n getPositioning: () => ({\n placement: 'bottom-start',\n offset: 4,\n // panel 宽度统一为 max(内容, trigger, --wui-overlay-min-width),内容自适应展开\n minAnchorWidth: true,\n strategy: this.portal ? 'fixed' : 'absolute'\n }),\n isPortal: () => this.portal,\n createPortal: () => this._createPortal(),\n openOverlay: this._overlay\n })\n\n get isOpen(): boolean {\n return this._isOpen\n }\n\n get open(): boolean {\n return this._isOpen\n }\n\n private _onClickOutside = (e: MouseEvent) => {\n // 在监听器内部判定:composedPath() 在派发结束后会被清空。\n const isInside = e.composedPath().includes(this) || !!this._panel.getHandle()?.containsEvent(e)\n if (this._isOpen && !isInside) {\n this._close()\n }\n }\n\n private _onFocusOut = () => {\n handleComboboxFocusOut(\n this,\n () => this._panel.getHandle(),\n () => this._isOpen,\n () => this._close()\n )\n }\n\n override connectedCallback() {\n super.connectedCallback()\n this._optionPortal.bindHost()\n this.addEventListener('keydown', this._onKeydown)\n this.addEventListener('focusout', this._onFocusOut)\n document.addEventListener('click', this._onClickOutside)\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback()\n this._optionPortal.dispose()\n this.removeEventListener('keydown', this._onKeydown)\n this.removeEventListener('focusout', this._onFocusOut)\n document.removeEventListener('click', this._onClickOutside)\n this._options.forEach(this._unbindOption)\n this._options = []\n this._portal = undefined\n this._portalContent = undefined\n this._close()\n // 撤销登记由 _panel.dispose() 完成(handle 归它持有)。\n this._panel.dispose()\n this._scrollLock.release()\n }\n\n override firstUpdated() {\n requestAnimationFrame(() => {\n if (this.isConnected) this._optionPortal.scheduleRefresh()\n })\n }\n\n override willUpdate() {\n this._refreshOptions()\n this._syncSelected()\n }\n\n override updated(changed: PropertyValues) {\n if (changed.has('portal') || changed.has('overlayContainer'))\n requestAnimationFrame(() => this._reconfigureOverlay())\n if (changed.has('noScrollLock')) this._syncScrollLock()\n this._syncOpenAttribute()\n this._syncOverlayInert()\n this._syncValidity()\n }\n\n private _syncValidity() {\n const internals = this._formAssociation.getInternals()\n if (!internals || typeof internals.setValidity !== 'function') return\n if (this._isDisabled || !this.required || this.value) internals.setValidity({})\n else internals.setValidity({ valueMissing: true }, 'Select an option')\n }\n\n private _syncOpenAttribute() {\n this.toggleAttribute('open', this._isOpen)\n }\n\n /*\n * 禁用态不响应 Escape。仲裁者仍在(吞掉按键并压掉原生 cancel),只是不走关闭入口:\n * 事件不落到下层 overlay,不会把外层一起关掉。\n * 每次渲染后同步即可覆盖 disabled 属性与表单禁用两条来源。\n */\n private _syncOverlayInert() {\n this._panel.getHandle()?.setInert(this._isDisabled)\n }\n\n private _onTriggerSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement\n const hasContent = slot.assignedElements().length > 0\n if (this._hasTriggerSlot === hasContent) return\n this._hasTriggerSlot = hasContent\n this._reconfigureOverlay()\n }\n\n private _syncSelected() {\n this._options.forEach(o => {\n const selected = this.value !== '' && o.value === this.value\n o.selected = selected\n o.setAttribute('role', 'option')\n o.setAttribute('aria-selected', String(selected))\n o.setAttribute('aria-disabled', String(o.disabled))\n })\n if (!this.value) {\n this._selectedLabel = this.placeholder\n return\n }\n const option = this._options.find(o => o.value === this.value)\n this._selectedLabel = option?.label || this.placeholder\n }\n\n private readonly _optionListeners = createOptionListenerBinding({\n // 惰性解引用:handler 字段声明在后者仍可在调用期取到\n onClick: event => this._handleOptionClick(event),\n onPointerOver: event => this._handleOptionPointerOver(event),\n onPointerDown: event => this._handleOptionPointerDown(event),\n onUpdate: () => this._onOptionUpdate()\n })\n private _bindOption = (option: WebUiOption) => this._optionListeners.bind(option)\n private _unbindOption = (option: WebUiOption) => this._optionListeners.unbind(option)\n\n private _refreshOptions() {\n const activeOption = this._options[this._activeIndex]\n // diff 绑定/解绑与激活索引按 option 身份保持在 shared 内完成,\n // 避免移除中间项后激活静默偏移到相邻项\n const next = this._optionPortal.refresh(this._options, activeOption)\n this._options = next.options\n this._activeIndex = next.activeIndex\n // 非 portal 模式 aria-activedescendant 引用真实 option id,需保证已分配\n this._optionPortal.ensureOptionIds(this._options)\n }\n\n private _handleOptionClick = (e: Event) => {\n if (!(e.currentTarget instanceof HTMLElement)) return\n const option = e.currentTarget as WebUiOption\n if (option.disabled || !this._isLive(option)) return\n this.value = option.value\n this._close()\n this._notifyValueChange()\n }\n\n private _onOptionUpdate = () => {\n this._syncSelected()\n this._syncActiveOption()\n }\n\n private _handleOptionPointerOver = (e: PointerEvent) => {\n if (e.pointerType === 'touch') return\n if (!this._isOpen || this._activeIndex < 0 || !(e.currentTarget instanceof HTMLElement)) return\n\n // 指针接管后只保留 :hover,避免键盘激活项与悬停项同时高亮。\n this._activeIndex = -1\n this._resetTypeahead()\n this._syncActiveOption()\n }\n\n private _handleOptionPointerDown = (e: PointerEvent) => {\n // 保持 trigger 焦点,避免 focusout 在 click 前关闭 overlay。\n e.preventDefault()\n }\n\n // slotchange 不冒泡,只能由模板内 slot 自行监听;稳定引用避免 Lit 重挂载\n private _onSlotChange = () => {\n this._optionPortal.scheduleRefresh()\n }\n\n // slotchange/unregister 的刷新依赖 Lit 渲染调度;键盘或 click 事件可能先于其触发,\n // 已从 DOM 移除或被移出 Select/portal panel 的 option 不得再被激活或选中。\n private _isLive(option: WebUiOption): boolean {\n const panel = this.portal ? this._panel.getPanel() : null\n return option.isConnected && (this.contains(option) || (!!panel && panel.contains(option)))\n }\n\n private _onKeydown = (e: KeyboardEvent) => {\n if (this._isDisabled || e.isComposing) return\n\n // Escape 不在本组件处理:由共享仲裁者在 document 捕获阶段归属(issue #120 Block 1)。\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault()\n if (!this._isOpen) {\n this._open(true)\n } else {\n this._navigateActive(1)\n }\n break\n case 'ArrowUp':\n e.preventDefault()\n if (!this._isOpen) this._open(true)\n else this._navigateActive(-1)\n break\n case 'Home':\n if (!this._isOpen) break\n e.preventDefault()\n this._moveActiveToBoundary(true)\n break\n case 'End':\n if (!this._isOpen) break\n e.preventDefault()\n this._moveActiveToBoundary(false)\n break\n case 'Enter': {\n e.preventDefault()\n if (e.repeat) break\n if (!this._isOpen) this._open(true)\n else if (this._activeIndex >= 0) this._selectActiveOption()\n break\n }\n case ' ':\n case 'Space':\n case 'Spacebar': {\n e.preventDefault()\n if (e.repeat) break\n if (!this._isOpen) this._open(true)\n else if (this._activeIndex >= 0) this._selectActiveOption()\n break\n }\n default:\n if (this._isOpen && !e.isComposing && !e.ctrlKey && !e.metaKey && !e.altKey && Array.from(e.key).length === 1) {\n e.preventDefault()\n this._typeahead(e.key)\n }\n break\n }\n }\n\n private _selectActiveOption() {\n const option = this._options[this._activeIndex]\n if (option && this._isLive(option) && !option.disabled) {\n this.value = option.value\n this._notifyValueChange()\n }\n this._close()\n }\n\n private _moveActiveToBoundary(toStart: boolean) {\n this._resetTypeahead()\n const enabled = this._options.filter(option => !option.disabled && this._isLive(option))\n const option = toStart ? enabled[0] : enabled.at(-1)\n if (!option) return\n\n this._activeIndex = this._options.indexOf(option)\n this._syncActiveOption()\n }\n\n private _typeahead(key: string) {\n const enabled = this._options.filter(option => !option.disabled && this._isLive(option))\n if (!enabled.length) return\n\n const now = Date.now()\n const withinSequence = now - this._typeaheadLastInputAt <= 500\n const isRepeatedKey =\n withinSequence &&\n Array.from(this._typeaheadBuffer).length === 1 &&\n this._normalizeTypeaheadText(this._typeaheadBuffer) === this._normalizeTypeaheadText(key)\n const query = isRepeatedKey ? key : withinSequence ? `${this._typeaheadBuffer}${key}` : key\n this._typeaheadBuffer = query\n this._typeaheadLastInputAt = now\n\n const activeOption = this._options[this._activeIndex]\n const activeIndex = activeOption ? enabled.indexOf(activeOption) : -1\n const findMatch = (prefix: string) => {\n const normalizedPrefix = this._normalizeTypeaheadText(prefix)\n for (let offset = 1; offset <= enabled.length; offset++) {\n const option = enabled[(activeIndex + offset + enabled.length) % enabled.length]\n if (this._normalizeTypeaheadText(option.label.trimStart()).startsWith(normalizedPrefix)) return option\n }\n return undefined\n }\n\n const currentMatch =\n query !== key &&\n activeIndex >= 0 &&\n activeOption &&\n this._normalizeTypeaheadText(activeOption.label.trimStart()).startsWith(this._normalizeTypeaheadText(query))\n ? activeOption\n : undefined\n const queryMatch = currentMatch ?? findMatch(query)\n const option = queryMatch ?? (query === key ? undefined : findMatch(key))\n if (!queryMatch && query !== key) this._typeaheadBuffer = key\n if (!option) return\n\n this._activeIndex = this._options.indexOf(option)\n this._syncActiveOption()\n }\n\n private _normalizeTypeaheadText(value: string) {\n return value.toLocaleLowerCase().normalize('NFD').replace(/\\p{M}/gu, '')\n }\n\n private _navigateActive(delta: number) {\n this._resetTypeahead()\n const enabled = this._options.filter(o => !o.disabled && this._isLive(o))\n if (!enabled.length) return\n\n const selectedOption = this._options.find(\n option => option.value === this.value && !option.disabled && this._isLive(option)\n )\n const currentIdx =\n this._activeIndex >= 0 && this._isLive(this._options[this._activeIndex])\n ? enabled.indexOf(this._options[this._activeIndex])\n : selectedOption\n ? enabled.indexOf(selectedOption)\n : delta > 0\n ? -1\n : 0\n const nextOption = enabled[nextWrappingIndex(enabled.length, currentIdx, delta)]\n this._activeIndex = this._options.indexOf(nextOption)\n\n this._syncActiveOption()\n }\n\n // 开合生命周期不变量(guard / 派发顺序 / scroll-lock 配对 / portal rAF dance)\n // 收敛在 shared combobox-shell;select 只注入差异点\n private readonly _openController = createComboboxOpenController({\n canOpen: () => !this._isDisabled,\n getIsOpen: () => this._isOpen,\n setIsOpen: open => {\n this._isOpen = open\n },\n dispatchOpenChange: () => this._dispatchOpenChange(),\n syncScrollLock: open => this._syncScrollLock(open),\n isPortal: () => this.portal,\n openOverlay: isKeyboardNavigation => this._openOverlay(isKeyboardNavigation),\n closeOverlay: () => void this._closeOverlay(),\n onOpen: isKeyboardNavigation => {\n this._syncSelected()\n if (isKeyboardNavigation) this._setInitialActiveOption()\n else this._syncActiveOption()\n },\n onAfterClose: () => {\n this._activeIndex = -1\n this._options.forEach(o => o.removeAttribute('active'))\n }\n })\n\n private _open(isKeyboardNavigation = false) {\n this._resetTypeahead()\n this._openController.open(isKeyboardNavigation)\n }\n\n private _close() {\n this._resetTypeahead()\n this._openController.close()\n }\n\n private _resetTypeahead() {\n this._typeaheadBuffer = ''\n this._typeaheadLastInputAt = 0\n }\n\n private _dispatchOpenChange() {\n dispatchOpenChangeEvent(this, this._isOpen)\n }\n\n private _setInitialActiveOption() {\n const selectedIndex = this._options.findIndex(\n option => option.value === this.value && !option.disabled && this._isLive(option)\n )\n const firstEnabledIndex = this._options.findIndex(option => !option.disabled && this._isLive(option))\n this._activeIndex = selectedIndex >= 0 ? selectedIndex : firstEnabledIndex\n this._syncActiveOption()\n }\n\n private _syncActiveOption() {\n this._options.forEach((option, index) =>\n option.toggleAttribute('active', index === this._activeIndex && this._isLive(option))\n )\n }\n\n private _notifyValueChange() {\n this.dispatchEvent(new Event('input', { bubbles: true, composed: true }))\n this.dispatchEvent(new Event('change', { bubbles: true, composed: true }))\n }\n\n private _syncScrollLock(isOpen = this._isOpen) {\n this._scrollLock.sync(isOpen && !this.noScrollLock)\n }\n\n private _togglePopup() {\n if (this._isDisabled) return\n if (this._isOpen) this._close()\n else this._open()\n }\n\n private _openOverlay(isKeyboardNavigation = false) {\n this._panel.open(isKeyboardNavigation)\n // 新会话的 handle 刚建立,惰性状态需按当前 disabled 重新同步。\n this._syncOverlayInert()\n }\n\n private _createPortal(): OverlayPortal {\n const portal = defineOverlayPortal().make({\n container: this.overlayContainer,\n target: this,\n style: `${glass}\\n${overlayMotion}\\n${scrollbarStyle}\\n${style}`,\n className: 'wui-glass select-overlay portal wui-floating-panel',\n onContentChange: () => this._optionPortal.scheduleRefresh()\n })\n this._portal = portal\n applyOverlayVariables(portal.panel, this, [\n '--wui-overlay-min-width',\n '--wui-select-max-width',\n '--wui-select-max-height'\n ])\n portal.panel.setAttribute('role', 'listbox')\n const scroll = document.createElement('div')\n scroll.className = 'select-scroll wui-scroll'\n const content = document.createElement('div')\n content.className = 'select-content'\n this._portalContent = content\n scroll.append(content)\n portal.panel.append(scroll)\n // 自定义 trigger 必须留在宿主内,不能随 options 迁入 portal panel\n portal.moveContent(\n Array.from(this.children).filter(child => child.slot !== 'trigger'),\n content\n )\n return portal\n }\n\n private _reconfigureOverlay() {\n // reconfigure 会 dispose 并按需重建 portal,旧引用必须同步失效\n this._portal = undefined\n this._portalContent = undefined\n this._panel.reconfigure(this._isOpen)\n /*\n * reconfigure 重新 claim = 新会话,inert 回到 false。实测这条重推是**冗余**的(摘掉本行\n * 全部用例仍绿):这条路径后面跟着一轮渲染,而 `updated()` 每次渲染都会调\n * `_syncOverlayInert()`。留在这里是不想依赖「这条路径必然跟着一次渲染」这个隐含前提。\n */\n this._syncOverlayInert()\n }\n\n private async _closeOverlay() {\n const closed = await this._panel.close(() => this._isOpen)\n // portal 已随关闭 dispose,与 autocomplete 对齐同步失效引用\n if (closed) {\n this._portal = undefined\n this._portalContent = undefined\n }\n }\n\n override render() {\n // portal 模式下 options 被 moveContent 移入 overlay shadow root,id 引用无法跨树作用域\n // 解析,因此 activedescendant 仅在非 portal 模式输出;aria-controls 同理指向同根内 listbox\n const listboxId = `${this.localName}-listbox`\n const activeDescendant =\n !this.portal && this._isOpen && this._activeIndex >= 0\n ? (this._options[this._activeIndex]?.id ?? nothing)\n : nothing\n\n return html`\n <div class=\"wui-select-inner\">\n <div\n class=\"wui-glass select-trigger\"\n ?data-custom-trigger=${this._hasTriggerSlot}\n @click=${this._togglePopup}\n tabindex=${this._isDisabled ? '-1' : '0'}\n role=\"combobox\"\n aria-expanded=${this._isOpen}\n aria-haspopup=\"listbox\"\n aria-controls=${this.portal ? nothing : listboxId}\n aria-disabled=${String(this._isDisabled)}\n aria-activedescendant=${activeDescendant}\n aria-label=${ifDefined(this.ariaLabel)}\n >\n <slot name=\"trigger\" @slotchange=${this._onTriggerSlotChange}></slot>\n ${!this._hasTriggerSlot ? html`<span class=\"label\">${this._selectedLabel}</span>` : nothing}\n <web-ui-icon class=\"arrow\" .icon=${lucideChevronDown}></web-ui-icon>\n </div>\n <div class=\"select-overlay wui-floating-panel wui-glass\" hidden role=\"listbox\" id=${listboxId}>\n <div class=\"select-scroll wui-scroll\">\n <div class=\"select-content\">\n <slot @slotchange=${this._onSlotChange}></slot>\n </div>\n </div>\n </div>\n </div>\n `\n }\n\n declare readonly $events: {\n input: Event\n change: Event\n 'open-change': CustomEvent<{ open: boolean }>\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'web-ui-select': WebUiSelect\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAiCA,+BAA+B;AAGxB,IAAM,cAAN,MAAM,oBAAoB,eAAe,UAAU,CAAC,CAAC;;;;;;EAGD,KAAA,cAAA;EACF,KAAA,WAAA;EACA,KAAA,WAAA;EACF,KAAA,SAAA;EACmC,KAAA,eAAA;EAEtC,KAAA,OAAA;EAGuC,KAAA,YAAA;EAI/D,KAAA,SAAA;EAaU,KAAA,mBAAA,sBAA8B;GAChE,MAAM;GACN,kBAAkB;IAEhB,MAAM,YAAY,KAAK,aAAa,OAAO;IAC3C,IAAI,cAAc,MAAM;KACtB,KAAK,SAAS;KACd,KAAK,gBAAgB,kBAAkB,CAAC,CAAC,SAAS;IACpD;GACF;GACA,gBAAgB,KAAK;GACrB,WAAU,UAAS;IACjB,KAAK,QAAQ;GACf;GACA,oBAAoB,KAAK;GACzB,oBAAoB,KAAK;GACzB,eAAc,UAAS;IACrB,IAAI,OAAO,UAAU,UAAU,KAAK,QAAQ;GAC9C;GACA,oBAAoB,KAAK,cAAc;EACzC,CAAC,CAAC,CAAC,KAAK;EAEsC,KAAA,6BAAA,IAAI,0BAA0B,MAAM,KAAK,gBAAgB;EAM5E,KAAA,UAAA;EACK,KAAA,eAAA;EACE,KAAA,iBAAA;EACC,KAAA,kBAAA;EA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AC,CAAA,GAAA,YAAA,WAAA,SAAA,IAAA;AAwCxC,WAAA,CAAA,MAAM,CAAA,GAAA,YAAA,WAAA,WAAA,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,YAAA,WAAA,gBAAA,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,YAAA,WAAA,kBAAA,KAAA,CAAA;AACN,WAAA,CAAA,MAAM,CAAA,GAAA,YAAA,WAAA,mBAAA,KAAA,CAAA;AA7DR,cAAA,eAAA,WAAA,CAAA,cAAc,eAAe,CAAA,GAAA,WAAA"}
1
+ {"version":3,"file":"index.js","names":["glass","overlayMotion","scrollbarStyle","style","lucideChevronDown"],"sources":["../../../src/components/select/index.ts"],"sourcesContent":["import '@/components/icon'\n\nimport type { Placement } from '@floating-ui/dom'\nimport { html, LitElement, nothing, type PropertyValues, unsafeCSS } from 'lit'\nimport { customElement, property, state } from 'lit/decorators.js'\nimport { ifDefined } from 'lit/directives/if-defined.js'\n\nimport overlayMotion from '@/assets/overlay-motion.css?inline'\nimport scrollbarStyle from '@/assets/scrollbar.css?inline'\nimport glass from '@/classes/glass.css?inline'\nimport type { WebUiOption } from '@/components/option'\nimport { lucideChevronDown } from '@/icons'\nimport { installPointerFocusSuppression } from '@/shared/focus/pointer-focus'\nimport { FormAssociated, defineFormAssociation, FormAssociationController } from '@/shared/form-association'\nimport { normalizeLiteral } from '@/shared/normalize'\nimport { dispatchOpenChangeEvent } from '@/shared/open-state'\nimport {\n createComboboxOpenController,\n createOptionListenerBinding,\n defineOptionPortal,\n handleComboboxFocusOut,\n nextWrappingIndex\n} from '@/shared/option-portal'\nimport { defineAnchoredPanel } from '@/shared/overlay/anchored-panel'\nimport { defineOpenOverlay } from '@/shared/overlay/open-overlay'\nimport { FLOATING_PLACEMENTS } from '@/shared/overlay/placement-props'\nimport {\n applyOverlayVariables,\n defineOverlayPortal,\n type OverlayContainer,\n type OverlayPortal\n} from '@/shared/overlay/portal'\nimport { defineScrollLockLease } from '@/shared/scroll-lock/scroll-lock'\n\nimport style from './style.css?inline'\n\ninstallPointerFocusSuppression()\n\n@customElement('web-ui-select')\nexport class WebUiSelect extends FormAssociated(LitElement) {\n static override styles = [unsafeCSS(glass), unsafeCSS(overlayMotion), unsafeCSS(scrollbarStyle), unsafeCSS(style)]\n\n @property({ type: String, reflect: true }) placeholder = ''\n @property({ type: Boolean, reflect: true }) disabled = false\n\n /**\n * 触发器外观:`label` 为默认的带选中文本与箭头;`icon` 保留右侧箭头,只把 `trigger` slot\n * 的内容换成左侧图标区——带 trigger slot 时触发器贴合内容宽度,高度不变。\n * 图标模式需要消费方提供 `trigger` slot 与 `aria-label`。\n */\n @property({ type: String, reflect: true })\n get trigger(): 'label' | 'icon' {\n return this._trigger\n }\n set trigger(v: string) {\n const old = this._trigger\n this._trigger = normalizeLiteral(v, ['label', 'icon'] as const, 'label')\n this.requestUpdate('trigger', old)\n }\n private _trigger: 'label' | 'icon' = 'label'\n @property({ type: Boolean, reflect: true }) required = false\n @property({ type: Boolean, reflect: true }) portal = false\n /** 下拉 panel 相对触发器的方向;默认贴着触发器左下角向下展开。 */\n @property({ type: String, reflect: true })\n get placement(): Placement {\n return this._placement\n }\n set placement(v: string) {\n const old = this._placement\n this._placement = normalizeLiteral(v, FLOATING_PLACEMENTS, 'bottom-start')\n this.requestUpdate('placement', old)\n }\n private _placement: Placement = 'bottom-start'\n @property({ type: Boolean, reflect: true, attribute: 'no-scroll-lock' }) noScrollLock = false\n @property({ attribute: false }) overlayContainer?: OverlayContainer\n @property({ type: String, reflect: true }) name = ''\n\n // Explicitly delegated accessible naming attributes.\n @property({ type: String, attribute: 'aria-label' }) override ariaLabel: string | null = null\n\n // value 使用内部状态 + 访问器模式,在变更时同步 ElementInternals;\n // @property + reflect 让它与 input/textarea/slider/input-number 的 value 反射语义保持一致。\n @state() private _value = ''\n @property({ type: String, reflect: true })\n get value(): string {\n return this._value\n }\n set value(v: string) {\n const old = this._value\n this._value = v\n this._formAssociation.sync()\n this.toggleAttribute('data-has-value', !!v)\n this.requestUpdate('value', old)\n }\n\n private readonly _formAssociation = defineFormAssociation<string>({\n host: this,\n initialize: () => {\n // 同步 HTML 属性中预设的 value,补全访问器模式不处理 attribute 反射。\n const attrValue = this.getAttribute('value')\n if (attrValue !== null) {\n this._value = attrValue\n this.toggleAttribute('data-has-value', !!attrValue)\n }\n },\n getState: () => this._value,\n setState: value => {\n this.value = value\n },\n getFormValue: () => this._value,\n getFormState: () => this._value,\n restoreState: state => {\n if (typeof state === 'string') this.value = state\n },\n syncValidity: () => this._syncValidity()\n }).make()\n\n private readonly _formAssociationController = new FormAssociationController(this, this._formAssociation)\n\n private get _isDisabled(): boolean {\n return this.disabled || this._formAssociation.isFormDisabled()\n }\n\n @state() private _isOpen = false\n @state() private _activeIndex = -1\n @state() private _selectedLabel = ''\n @state() private _hasTriggerSlot = false\n\n private _typeaheadBuffer = ''\n private _typeaheadLastInputAt = 0\n\n private _options: WebUiOption[] = []\n private _portal?: OverlayPortal\n private _portalContent?: HTMLElement\n private readonly _scrollLock = defineScrollLockLease().make()\n\n private static _nextInstanceId = 0\n\n // option 注册表 / portal 同步 / 微任务调度收敛到 shared 模块(autocomplete 同款)\n private readonly _optionPortal = defineOptionPortal().make({\n element: this,\n // 实例级前缀保证多实例同时展开时 option id 不冲突(aria 引用按 id 定位)\n idPrefix: `web-ui-select-${++WebUiSelect._nextInstanceId}`,\n getPortal: () => this._portal,\n getPortalContent: () => this._portalContent,\n isOpen: () => this.portal && this._isOpen,\n getMigratableNodes: () => [...this.querySelectorAll<WebUiOption>('web-ui-option')],\n hasUpdated: () => this.hasUpdated,\n requestUpdate: () => this.requestUpdate(),\n bindOption: option => this._bindOption(option),\n unbindOption: option => this._unbindOption(option),\n onImmediateSync: () => {\n this._refreshOptions()\n this._syncSelected()\n this._syncActiveOption()\n }\n })\n /*\n * 开启态 overlay 承载「我开着吗」(issue #120 Block 1):本组件不在 keydown 里自行关闭,\n * 只声明「我开着」。宿主级监听在 portal 模式下收不到 panel 内的 Escape,由唯一仲裁者\n * 在 document 捕获阶段判定最内层。\n *\n * 宿主接口除 requestClose 外只再提供一个 isConnected(仅供惰性回收读取):开启状态是\n * 声明而非询问,仲裁时不再回头问 isOpen()。\n */\n private readonly _overlay = defineOpenOverlay().make({\n requestClose: () => this._close(),\n isConnected: () => this.isConnected\n })\n private readonly _panel = defineAnchoredPanel().make({\n getAnchor: () => this.shadowRoot?.querySelector<HTMLElement>('.select-trigger') ?? null,\n getLocalPanel: () => this.shadowRoot?.querySelector<HTMLElement>('.select-overlay') ?? null,\n getPositioning: () => ({\n placement: this.placement,\n offset: 4,\n // panel 宽度统一为 max(内容, trigger, --wui-overlay-min-width),内容自适应展开\n minAnchorWidth: true,\n strategy: this.portal ? 'fixed' : 'absolute'\n }),\n isPortal: () => this.portal,\n createPortal: () => this._createPortal(),\n openOverlay: this._overlay\n })\n\n get isOpen(): boolean {\n return this._isOpen\n }\n\n get open(): boolean {\n return this._isOpen\n }\n\n private _onClickOutside = (e: MouseEvent) => {\n // 在监听器内部判定:composedPath() 在派发结束后会被清空。\n const isInside = e.composedPath().includes(this) || !!this._panel.getHandle()?.containsEvent(e)\n if (this._isOpen && !isInside) {\n this._close()\n }\n }\n\n private _onFocusOut = () => {\n handleComboboxFocusOut(\n this,\n () => this._panel.getHandle(),\n () => this._isOpen,\n () => this._close()\n )\n }\n\n override connectedCallback() {\n super.connectedCallback()\n this._optionPortal.bindHost()\n this.addEventListener('keydown', this._onKeydown)\n this.addEventListener('focusout', this._onFocusOut)\n document.addEventListener('click', this._onClickOutside)\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback()\n this._optionPortal.dispose()\n this.removeEventListener('keydown', this._onKeydown)\n this.removeEventListener('focusout', this._onFocusOut)\n document.removeEventListener('click', this._onClickOutside)\n this._options.forEach(this._unbindOption)\n this._options = []\n this._portal = undefined\n this._portalContent = undefined\n this._close()\n // 撤销登记由 _panel.dispose() 完成(handle 归它持有)。\n this._panel.dispose()\n this._scrollLock.release()\n }\n\n override firstUpdated() {\n requestAnimationFrame(() => {\n if (this.isConnected) this._optionPortal.scheduleRefresh()\n })\n }\n\n override willUpdate() {\n this._refreshOptions()\n this._syncSelected()\n }\n\n override updated(changed: PropertyValues) {\n if (changed.has('portal') || changed.has('overlayContainer'))\n requestAnimationFrame(() => this._reconfigureOverlay())\n if (changed.has('noScrollLock')) this._syncScrollLock()\n if (changed.has('placement')) this._panel.updatePosition()\n this._syncOpenAttribute()\n this._syncOverlayInert()\n this._syncValidity()\n }\n\n private _syncValidity() {\n const internals = this._formAssociation.getInternals()\n if (!internals || typeof internals.setValidity !== 'function') return\n if (this._isDisabled || !this.required || this.value) internals.setValidity({})\n else internals.setValidity({ valueMissing: true }, 'Select an option')\n }\n\n private _syncOpenAttribute() {\n this.toggleAttribute('open', this._isOpen)\n }\n\n /*\n * 禁用态不响应 Escape。仲裁者仍在(吞掉按键并压掉原生 cancel),只是不走关闭入口:\n * 事件不落到下层 overlay,不会把外层一起关掉。\n * 每次渲染后同步即可覆盖 disabled 属性与表单禁用两条来源。\n */\n private _syncOverlayInert() {\n this._panel.getHandle()?.setInert(this._isDisabled)\n }\n\n private _onTriggerSlotChange = (e: Event) => {\n const slot = e.target as HTMLSlotElement\n const hasContent = slot.assignedElements().length > 0\n if (this._hasTriggerSlot === hasContent) return\n this._hasTriggerSlot = hasContent\n this._reconfigureOverlay()\n }\n\n private _syncSelected() {\n this._options.forEach(o => {\n const selected = this.value !== '' && o.value === this.value\n o.selected = selected\n o.setAttribute('role', 'option')\n o.setAttribute('aria-selected', String(selected))\n o.setAttribute('aria-disabled', String(o.disabled))\n })\n if (!this.value) {\n this._selectedLabel = this.placeholder\n return\n }\n const option = this._options.find(o => o.value === this.value)\n this._selectedLabel = option?.label || this.placeholder\n }\n\n private readonly _optionListeners = createOptionListenerBinding({\n // 惰性解引用:handler 字段声明在后者仍可在调用期取到\n onClick: event => this._handleOptionClick(event),\n onPointerOver: event => this._handleOptionPointerOver(event),\n onPointerDown: event => this._handleOptionPointerDown(event),\n onUpdate: () => this._onOptionUpdate()\n })\n private _bindOption = (option: WebUiOption) => this._optionListeners.bind(option)\n private _unbindOption = (option: WebUiOption) => this._optionListeners.unbind(option)\n\n private _refreshOptions() {\n const activeOption = this._options[this._activeIndex]\n // diff 绑定/解绑与激活索引按 option 身份保持在 shared 内完成,\n // 避免移除中间项后激活静默偏移到相邻项\n const next = this._optionPortal.refresh(this._options, activeOption)\n this._options = next.options\n this._activeIndex = next.activeIndex\n // 非 portal 模式 aria-activedescendant 引用真实 option id,需保证已分配\n this._optionPortal.ensureOptionIds(this._options)\n }\n\n private _handleOptionClick = (e: Event) => {\n if (!(e.currentTarget instanceof HTMLElement)) return\n const option = e.currentTarget as WebUiOption\n if (option.disabled || !this._isLive(option)) return\n this.value = option.value\n this._close()\n this._notifyValueChange()\n }\n\n private _onOptionUpdate = () => {\n this._syncSelected()\n this._syncActiveOption()\n }\n\n private _handleOptionPointerOver = (e: PointerEvent) => {\n if (e.pointerType === 'touch') return\n if (!this._isOpen || this._activeIndex < 0 || !(e.currentTarget instanceof HTMLElement)) return\n\n // 指针接管后只保留 :hover,避免键盘激活项与悬停项同时高亮。\n this._activeIndex = -1\n this._resetTypeahead()\n this._syncActiveOption()\n }\n\n private _handleOptionPointerDown = (e: PointerEvent) => {\n // 保持 trigger 焦点,避免 focusout 在 click 前关闭 overlay。\n e.preventDefault()\n }\n\n // slotchange 不冒泡,只能由模板内 slot 自行监听;稳定引用避免 Lit 重挂载\n private _onSlotChange = () => {\n this._optionPortal.scheduleRefresh()\n }\n\n // slotchange/unregister 的刷新依赖 Lit 渲染调度;键盘或 click 事件可能先于其触发,\n // 已从 DOM 移除或被移出 Select/portal panel 的 option 不得再被激活或选中。\n private _isLive(option: WebUiOption): boolean {\n const panel = this.portal ? this._panel.getPanel() : null\n return option.isConnected && (this.contains(option) || (!!panel && panel.contains(option)))\n }\n\n private _onKeydown = (e: KeyboardEvent) => {\n if (this._isDisabled || e.isComposing) return\n\n // Escape 不在本组件处理:由共享仲裁者在 document 捕获阶段归属(issue #120 Block 1)。\n switch (e.key) {\n case 'ArrowDown':\n e.preventDefault()\n if (!this._isOpen) {\n this._open(true)\n } else {\n this._navigateActive(1)\n }\n break\n case 'ArrowUp':\n e.preventDefault()\n if (!this._isOpen) this._open(true)\n else this._navigateActive(-1)\n break\n case 'Home':\n if (!this._isOpen) break\n e.preventDefault()\n this._moveActiveToBoundary(true)\n break\n case 'End':\n if (!this._isOpen) break\n e.preventDefault()\n this._moveActiveToBoundary(false)\n break\n case 'Enter': {\n e.preventDefault()\n if (e.repeat) break\n if (!this._isOpen) this._open(true)\n else if (this._activeIndex >= 0) this._selectActiveOption()\n break\n }\n case ' ':\n case 'Space':\n case 'Spacebar': {\n e.preventDefault()\n if (e.repeat) break\n if (!this._isOpen) this._open(true)\n else if (this._activeIndex >= 0) this._selectActiveOption()\n break\n }\n default:\n if (this._isOpen && !e.isComposing && !e.ctrlKey && !e.metaKey && !e.altKey && Array.from(e.key).length === 1) {\n e.preventDefault()\n this._typeahead(e.key)\n }\n break\n }\n }\n\n private _selectActiveOption() {\n const option = this._options[this._activeIndex]\n if (option && this._isLive(option) && !option.disabled) {\n this.value = option.value\n this._notifyValueChange()\n }\n this._close()\n }\n\n private _moveActiveToBoundary(toStart: boolean) {\n this._resetTypeahead()\n const enabled = this._options.filter(option => !option.disabled && this._isLive(option))\n const option = toStart ? enabled[0] : enabled.at(-1)\n if (!option) return\n\n this._activeIndex = this._options.indexOf(option)\n this._syncActiveOption()\n }\n\n private _typeahead(key: string) {\n const enabled = this._options.filter(option => !option.disabled && this._isLive(option))\n if (!enabled.length) return\n\n const now = Date.now()\n const withinSequence = now - this._typeaheadLastInputAt <= 500\n const isRepeatedKey =\n withinSequence &&\n Array.from(this._typeaheadBuffer).length === 1 &&\n this._normalizeTypeaheadText(this._typeaheadBuffer) === this._normalizeTypeaheadText(key)\n const query = isRepeatedKey ? key : withinSequence ? `${this._typeaheadBuffer}${key}` : key\n this._typeaheadBuffer = query\n this._typeaheadLastInputAt = now\n\n const activeOption = this._options[this._activeIndex]\n const activeIndex = activeOption ? enabled.indexOf(activeOption) : -1\n const findMatch = (prefix: string) => {\n const normalizedPrefix = this._normalizeTypeaheadText(prefix)\n for (let offset = 1; offset <= enabled.length; offset++) {\n const option = enabled[(activeIndex + offset + enabled.length) % enabled.length]\n if (this._normalizeTypeaheadText(option.label.trimStart()).startsWith(normalizedPrefix)) return option\n }\n return undefined\n }\n\n const currentMatch =\n query !== key &&\n activeIndex >= 0 &&\n activeOption &&\n this._normalizeTypeaheadText(activeOption.label.trimStart()).startsWith(this._normalizeTypeaheadText(query))\n ? activeOption\n : undefined\n const queryMatch = currentMatch ?? findMatch(query)\n const option = queryMatch ?? (query === key ? undefined : findMatch(key))\n if (!queryMatch && query !== key) this._typeaheadBuffer = key\n if (!option) return\n\n this._activeIndex = this._options.indexOf(option)\n this._syncActiveOption()\n }\n\n private _normalizeTypeaheadText(value: string) {\n return value.toLocaleLowerCase().normalize('NFD').replace(/\\p{M}/gu, '')\n }\n\n private _navigateActive(delta: number) {\n this._resetTypeahead()\n const enabled = this._options.filter(o => !o.disabled && this._isLive(o))\n if (!enabled.length) return\n\n const selectedOption = this._options.find(\n option => option.value === this.value && !option.disabled && this._isLive(option)\n )\n const currentIdx =\n this._activeIndex >= 0 && this._isLive(this._options[this._activeIndex])\n ? enabled.indexOf(this._options[this._activeIndex])\n : selectedOption\n ? enabled.indexOf(selectedOption)\n : delta > 0\n ? -1\n : 0\n const nextOption = enabled[nextWrappingIndex(enabled.length, currentIdx, delta)]\n this._activeIndex = this._options.indexOf(nextOption)\n\n this._syncActiveOption()\n }\n\n // 开合生命周期不变量(guard / 派发顺序 / scroll-lock 配对 / portal rAF dance)\n // 收敛在 shared combobox-shell;select 只注入差异点\n private readonly _openController = createComboboxOpenController({\n canOpen: () => !this._isDisabled,\n getIsOpen: () => this._isOpen,\n setIsOpen: open => {\n this._isOpen = open\n },\n dispatchOpenChange: () => this._dispatchOpenChange(),\n syncScrollLock: open => this._syncScrollLock(open),\n isPortal: () => this.portal,\n openOverlay: isKeyboardNavigation => this._openOverlay(isKeyboardNavigation),\n closeOverlay: () => void this._closeOverlay(),\n onOpen: isKeyboardNavigation => {\n this._syncSelected()\n if (isKeyboardNavigation) this._setInitialActiveOption()\n else this._syncActiveOption()\n },\n onAfterClose: () => {\n this._activeIndex = -1\n this._options.forEach(o => o.removeAttribute('active'))\n }\n })\n\n private _open(isKeyboardNavigation = false) {\n this._resetTypeahead()\n this._openController.open(isKeyboardNavigation)\n }\n\n private _close() {\n this._resetTypeahead()\n this._openController.close()\n }\n\n private _resetTypeahead() {\n this._typeaheadBuffer = ''\n this._typeaheadLastInputAt = 0\n }\n\n private _dispatchOpenChange() {\n dispatchOpenChangeEvent(this, this._isOpen)\n }\n\n private _setInitialActiveOption() {\n const selectedIndex = this._options.findIndex(\n option => option.value === this.value && !option.disabled && this._isLive(option)\n )\n const firstEnabledIndex = this._options.findIndex(option => !option.disabled && this._isLive(option))\n this._activeIndex = selectedIndex >= 0 ? selectedIndex : firstEnabledIndex\n this._syncActiveOption()\n }\n\n private _syncActiveOption() {\n this._options.forEach((option, index) =>\n option.toggleAttribute('active', index === this._activeIndex && this._isLive(option))\n )\n }\n\n private _notifyValueChange() {\n this.dispatchEvent(new Event('input', { bubbles: true, composed: true }))\n this.dispatchEvent(new Event('change', { bubbles: true, composed: true }))\n }\n\n private _syncScrollLock(isOpen = this._isOpen) {\n this._scrollLock.sync(isOpen && !this.noScrollLock)\n }\n\n private _togglePopup() {\n if (this._isDisabled) return\n if (this._isOpen) this._close()\n else this._open()\n }\n\n private _openOverlay(isKeyboardNavigation = false) {\n this._panel.open(isKeyboardNavigation)\n // 新会话的 handle 刚建立,惰性状态需按当前 disabled 重新同步。\n this._syncOverlayInert()\n }\n\n private _createPortal(): OverlayPortal {\n const portal = defineOverlayPortal().make({\n container: this.overlayContainer,\n target: this,\n style: `${glass}\\n${overlayMotion}\\n${scrollbarStyle}\\n${style}`,\n className: 'wui-glass select-overlay portal wui-floating-panel',\n onContentChange: () => this._optionPortal.scheduleRefresh()\n })\n this._portal = portal\n applyOverlayVariables(portal.panel, this, [\n '--wui-overlay-min-width',\n '--wui-select-max-width',\n '--wui-select-max-height'\n ])\n portal.panel.setAttribute('role', 'listbox')\n const scroll = document.createElement('div')\n scroll.className = 'select-scroll wui-scroll'\n const content = document.createElement('div')\n content.className = 'select-content'\n this._portalContent = content\n scroll.append(content)\n portal.panel.append(scroll)\n // 自定义 trigger 必须留在宿主内,不能随 options 迁入 portal panel\n portal.moveContent(\n Array.from(this.children).filter(child => child.slot !== 'trigger'),\n content\n )\n return portal\n }\n\n private _reconfigureOverlay() {\n // reconfigure 会 dispose 并按需重建 portal,旧引用必须同步失效\n this._portal = undefined\n this._portalContent = undefined\n this._panel.reconfigure(this._isOpen)\n /*\n * reconfigure 重新 claim = 新会话,inert 回到 false。实测这条重推是**冗余**的(摘掉本行\n * 全部用例仍绿):这条路径后面跟着一轮渲染,而 `updated()` 每次渲染都会调\n * `_syncOverlayInert()`。留在这里是不想依赖「这条路径必然跟着一次渲染」这个隐含前提。\n */\n this._syncOverlayInert()\n }\n\n private async _closeOverlay() {\n const closed = await this._panel.close(() => this._isOpen)\n // portal 已随关闭 dispose,与 autocomplete 对齐同步失效引用\n if (closed) {\n this._portal = undefined\n this._portalContent = undefined\n }\n }\n\n override render() {\n // portal 模式下 options 被 moveContent 移入 overlay shadow root,id 引用无法跨树作用域\n // 解析,因此 activedescendant 仅在非 portal 模式输出;aria-controls 同理指向同根内 listbox\n const listboxId = `${this.localName}-listbox`\n const activeDescendant =\n !this.portal && this._isOpen && this._activeIndex >= 0\n ? (this._options[this._activeIndex]?.id ?? nothing)\n : nothing\n\n return html`\n <div class=\"wui-select-inner\">\n <div\n class=\"wui-glass select-trigger\"\n ?data-custom-trigger=${this._hasTriggerSlot}\n @click=${this._togglePopup}\n tabindex=${this._isDisabled ? '-1' : '0'}\n role=\"combobox\"\n aria-expanded=${this._isOpen}\n aria-haspopup=\"listbox\"\n aria-controls=${this.portal ? nothing : listboxId}\n aria-disabled=${String(this._isDisabled)}\n aria-activedescendant=${activeDescendant}\n aria-label=${ifDefined(this.ariaLabel)}\n >\n <span class=\"label\">\n <slot name=\"trigger\" @slotchange=${this._onTriggerSlotChange}>\n ${this._hasTriggerSlot ? nothing : this._selectedLabel}\n </slot>\n </span>\n <web-ui-icon class=\"arrow\" .icon=${lucideChevronDown}></web-ui-icon>\n </div>\n <div class=\"select-overlay wui-floating-panel wui-glass\" hidden role=\"listbox\" id=${listboxId}>\n <div class=\"select-scroll wui-scroll\">\n <div class=\"select-content\">\n <slot @slotchange=${this._onSlotChange}></slot>\n </div>\n </div>\n </div>\n </div>\n `\n }\n\n declare readonly $events: {\n input: Event\n change: Event\n 'open-change': CustomEvent<{ open: boolean }>\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'web-ui-select': WebUiSelect\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAoCA,+BAA+B;AAGxB,IAAM,cAAN,MAAM,oBAAoB,eAAe,UAAU,CAAC,CAAC;;;;;;EAGD,KAAA,cAAA;EACF,KAAA,WAAA;EAgBlB,KAAA,WAAA;EACkB,KAAA,WAAA;EACF,KAAA,SAAA;EAWrB,KAAA,aAAA;EACwD,KAAA,eAAA;EAEtC,KAAA,OAAA;EAGuC,KAAA,YAAA;EAI/D,KAAA,SAAA;EAaU,KAAA,mBAAA,sBAA8B;GAChE,MAAM;GACN,kBAAkB;IAEhB,MAAM,YAAY,KAAK,aAAa,OAAO;IAC3C,IAAI,cAAc,MAAM;KACtB,KAAK,SAAS;KACd,KAAK,gBAAgB,kBAAkB,CAAC,CAAC,SAAS;IACpD;GACF;GACA,gBAAgB,KAAK;GACrB,WAAU,UAAS;IACjB,KAAK,QAAQ;GACf;GACA,oBAAoB,KAAK;GACzB,oBAAoB,KAAK;GACzB,e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1,5 @@
1
1
  // src/components/select/style.css?inline
2
- var style_default = "*,:before,:after{box-sizing:border-box}:host{--wui-select-bg-hover:var(--wui-color-surface-glass-hover,color-mix(in srgb, var(--wui-color-text,#1b1b1b) 6%, var(--wui-color-surface-glass,#fafafa57)));--wui-select-bg-active:var(--wui-color-surface-glass-active,color-mix(in srgb, var(--wui-color-text,#1b1b1b) 15%, var(--wui-color-surface-glass,#fafafa57)));-webkit-user-select:none;user-select:none;display:inline-block}:host([disabled]){cursor:not-allowed;opacity:.4}.wui-select-inner{flex-direction:column;display:flex;position:relative}.select-trigger{--wui-glass-corner-radius:calc(var(--wui-control-size,36px) / 2);cursor:default;gap:var(--wui-space-2,8px);box-sizing:border-box;width:var(--wui-input-width,200px);min-width:var(--wui-control-size,36px);height:var(--wui-control-size,36px);padding:0 var(--wui-space-3,12px);border-radius:var(--wui-radius-control,calc(infinity * 1px));border:none;align-items:center;display:flex;overflow:clip}.select-trigger:focus-visible{outline:var(--wui-focus-ring-width,3px) solid var(--wui-color-focus-ring,color-mix(in srgb, var(--wui-color-accent,#0071e3) 40%, transparent));outline-offset:2px}:host([disabled]) .select-trigger{cursor:not-allowed}@media (hover:hover) and (pointer:fine){:host(:not([disabled])) .select-trigger:hover{background-color:var(--wui-select-bg-hover)}}:host(:not([disabled])) .select-trigger:active,:host([open]:not([disabled])) .select-trigger{background-color:var(--wui-select-bg-active)}.select-trigger[data-custom-trigger]{width:auto}.label{font-size:var(--wui-font-size,14px);color:var(--wui-color-text,#1b1b1b);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}:host(:not([data-has-value])) .label{color:var(--wui-color-text-secondary,#6a6a6a)}::slotted([slot=trigger]){font-size:var(--wui-font-size,14px);color:var(--wui-color-text,#1b1b1b);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}.arrow{color:var(--wui-color-text-secondary,#6a6a6a);flex-shrink:0}:host([open]) .arrow{transform:rotate(180deg)}.select-overlay{--wui-internal-glass-shadow:var(--wui-shadow-panel,0 3px 9px #00000045);--wui-internal-duration-float-enter:var(--wui-duration-float-enter,.24s);--wui-internal-duration-float-exit:var(--wui-duration-float-exit,.16s);--wui-glass-corner-radius:var(--wui-radius-menu,18px);--wui-color-glass-ring:transparent;z-index:var(--wui-layer-inline-overlay,1);box-sizing:border-box;min-width:var(--wui-overlay-min-width,200px);max-width:var(--wui-select-max-width,500px);border-radius:var(--wui-radius-menu,18px);background-color:var(--wui-color-surface-menu,#fafafac2);position:absolute;overflow:hidden}.select-overlay.portal{z-index:var(--wui-layer-menu,100);position:fixed}.select-overlay.hidden{display:none}.select-scroll{max-height:var(--wui-select-max-height,200px);overflow-y:auto}.select-content{padding:var(--wui-space-1,4px)}:host([portal]) .select-overlay{display:none}:host([data-wui-pointer-focus]) .select-trigger:focus-visible{outline-color:#0000}\n";
2
+ var style_default = "*,:before,:after{box-sizing:border-box}:host{--wui-select-bg-hover:var(--wui-color-surface-glass-hover,color-mix(in srgb, var(--wui-color-text,#1b1b1b) 6%, var(--wui-color-surface-glass,#fafafa57)));--wui-select-bg-active:var(--wui-color-surface-glass-active,color-mix(in srgb, var(--wui-color-text,#1b1b1b) 15%, var(--wui-color-surface-glass,#fafafa57)));-webkit-user-select:none;user-select:none;display:inline-block}:host([disabled]){cursor:not-allowed;opacity:.4}.wui-select-inner{flex-direction:column;display:flex;position:relative}.select-trigger{--wui-glass-corner-radius:calc(var(--wui-control-size,36px) / 2);cursor:default;gap:var(--wui-space-2,8px);box-sizing:border-box;width:var(--wui-input-width,200px);min-width:var(--wui-control-size,36px);height:var(--wui-control-size,36px);padding:0 var(--wui-space-3,12px);border-radius:var(--wui-radius-control,calc(infinity * 1px));border:none;align-items:center;display:flex;overflow:clip}.select-trigger:focus-visible{outline:var(--wui-focus-ring-width,3px) solid var(--wui-color-focus-ring,color-mix(in srgb, var(--wui-color-accent,#0071e3) 40%, transparent));outline-offset:2px}:host([disabled]) .select-trigger{cursor:not-allowed}@media (hover:hover) and (pointer:fine){:host(:not([disabled])) .select-trigger:hover{background-color:var(--wui-select-bg-hover)}}:host(:not([disabled])) .select-trigger:active,:host([open]:not([disabled])) .select-trigger{background-color:var(--wui-select-bg-active)}.select-trigger[data-custom-trigger]{width:auto}.label{font-size:var(--wui-font-size,14px);color:var(--wui-color-text,#1b1b1b);text-overflow:ellipsis;white-space:nowrap;flex:1;overflow:hidden}:host(:not([data-has-value])) .label{color:var(--wui-color-text-secondary,#6a6a6a)}:host([trigger=icon]) .label{flex:none;justify-content:center;align-items:center;display:flex;overflow:visible}.arrow{color:var(--wui-color-text-secondary,#6a6a6a);flex-shrink:0}:host([open]) .arrow{transform:rotate(180deg)}.select-overlay{--wui-internal-glass-shadow:var(--wui-shadow-panel,0 3px 9px #00000045);--wui-internal-duration-float-enter:var(--wui-duration-float-enter,.24s);--wui-internal-duration-float-exit:var(--wui-duration-float-exit,.16s);--wui-glass-corner-radius:var(--wui-radius-menu,18px);--wui-color-glass-ring:transparent;z-index:var(--wui-layer-inline-overlay,10);box-sizing:border-box;min-width:var(--wui-overlay-min-width,200px);max-width:var(--wui-select-max-width,500px);border-radius:var(--wui-radius-menu,18px);background-color:var(--wui-color-surface-menu,#fafafac2);position:absolute;overflow:hidden}.select-overlay.portal{z-index:var(--wui-layer-menu,1000);position:fixed}.select-overlay.hidden{display:none}.select-scroll{max-height:var(--wui-select-max-height,200px);overflow-y:auto}.select-content{padding:var(--wui-space-1,4px)}:host([portal]) .select-overlay{display:none}:host([data-wui-pointer-focus]) .select-trigger:focus-visible{outline-color:#0000}\n";
3
3
  export { style_default as default };
4
4
 
5
5
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/select/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n --wui-select-bg-hover: var(\n --wui-color-surface-glass-hover,\n color-mix(in srgb, var(--wui-color-text, #1b1b1b) 6%, var(--wui-color-surface-glass, rgb(250 250 250 / 0.34)))\n );\n --wui-select-bg-active: var(\n --wui-color-surface-glass-active,\n color-mix(in srgb, var(--wui-color-text, #1b1b1b) 15%, var(--wui-color-surface-glass, rgb(250 250 250 / 0.34)))\n );\n user-select: none;\n display: inline-block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.wui-select-inner {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.select-trigger {\n --wui-glass-corner-radius: calc(var(--wui-control-size, 36px) / 2);\n\n cursor: default;\n\n overflow: clip;\n display: flex;\n gap: var(--wui-space-2, 8px);\n align-items: center;\n\n box-sizing: border-box;\n width: var(--wui-input-width, 200px);\n min-width: var(--wui-control-size, 36px);\n height: var(--wui-control-size, 36px);\n padding: 0 var(--wui-space-3, 12px);\n border: none;\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n\n &:focus-visible {\n outline: var(--wui-focus-ring-width, 3px) solid\n var(--wui-color-focus-ring, color-mix(in srgb, var(--wui-color-accent, #0071e3) 40%, transparent));\n outline-offset: 2px;\n }\n}\n\n:host([disabled]) .select-trigger {\n cursor: not-allowed;\n}\n\n@media (hover: hover) and (pointer: fine) {\n :host(:not([disabled])) .select-trigger:hover {\n background-color: var(--wui-select-bg-hover);\n }\n}\n\n:host(:not([disabled])) .select-trigger:active,\n:host([open]:not([disabled])) .select-trigger {\n background-color: var(--wui-select-bg-active);\n}\n\n.select-trigger[data-custom-trigger] {\n width: auto;\n}\n\n.label {\n overflow: hidden;\n flex: 1;\n\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text, #1b1b1b);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n:host(:not([data-has-value])) .label {\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n::slotted([slot='trigger']) {\n overflow: hidden;\n flex: 1;\n\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text, #1b1b1b);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.arrow {\n flex-shrink: 0;\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n:host([open]) .arrow {\n transform: rotate(180deg);\n}\n\n.select-overlay {\n --wui-internal-glass-shadow: var(--wui-shadow-panel, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-internal-duration-float-enter: var(--wui-duration-float-enter, 240ms);\n --wui-internal-duration-float-exit: var(--wui-duration-float-exit, 160ms);\n --wui-glass-corner-radius: var(--wui-radius-menu, 18px);\n\n /* 环底色转 transparent,宽 panel 的长边中段不留铺底,见 menu-portal.css 同处注释。 */\n --wui-color-glass-ring: transparent;\n position: absolute;\n z-index: var(--wui-layer-inline-overlay, 1);\n\n overflow: hidden;\n\n box-sizing: border-box;\n min-width: var(--wui-overlay-min-width, 200px);\n max-width: var(--wui-select-max-width, 500px);\n border-radius: var(--wui-radius-menu, 18px);\n\n /* 玻璃背景:wui-glass 在 panel 自身,这里覆盖其默认玻璃底为 menu surface 色 */\n background-color: var(--wui-color-surface-menu, rgb(250 250 250 / 0.76));\n\n &.portal {\n position: fixed;\n z-index: var(--wui-layer-menu, 100);\n }\n\n &.hidden {\n display: none;\n }\n}\n\n.select-scroll {\n overflow-y: auto;\n max-height: var(--wui-select-max-height, 200px);\n}\n\n.select-content {\n padding: var(--wui-space-1, 4px);\n}\n\n:host([portal]) .select-overlay {\n display: none;\n}\n\n:host([data-wui-pointer-focus]) .select-trigger:focus-visible {\n outline-color: transparent;\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/select/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n --wui-select-bg-hover: var(\n --wui-color-surface-glass-hover,\n color-mix(in srgb, var(--wui-color-text, #1b1b1b) 6%, var(--wui-color-surface-glass, rgb(250 250 250 / 0.34)))\n );\n --wui-select-bg-active: var(\n --wui-color-surface-glass-active,\n color-mix(in srgb, var(--wui-color-text, #1b1b1b) 15%, var(--wui-color-surface-glass, rgb(250 250 250 / 0.34)))\n );\n user-select: none;\n display: inline-block;\n}\n\n:host([disabled]) {\n cursor: not-allowed;\n opacity: 0.4;\n}\n\n.wui-select-inner {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.select-trigger {\n --wui-glass-corner-radius: calc(var(--wui-control-size, 36px) / 2);\n\n cursor: default;\n\n overflow: clip;\n display: flex;\n gap: var(--wui-space-2, 8px);\n align-items: center;\n\n box-sizing: border-box;\n width: var(--wui-input-width, 200px);\n min-width: var(--wui-control-size, 36px);\n height: var(--wui-control-size, 36px);\n padding: 0 var(--wui-space-3, 12px);\n border: none;\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n\n &:focus-visible {\n outline: var(--wui-focus-ring-width, 3px) solid\n var(--wui-color-focus-ring, color-mix(in srgb, var(--wui-color-accent, #0071e3) 40%, transparent));\n outline-offset: 2px;\n }\n}\n\n:host([disabled]) .select-trigger {\n cursor: not-allowed;\n}\n\n@media (hover: hover) and (pointer: fine) {\n :host(:not([disabled])) .select-trigger:hover {\n background-color: var(--wui-select-bg-hover);\n }\n}\n\n:host(:not([disabled])) .select-trigger:active,\n:host([open]:not([disabled])) .select-trigger {\n background-color: var(--wui-select-bg-active);\n}\n\n.select-trigger[data-custom-trigger] {\n width: auto;\n}\n\n.label {\n overflow: hidden;\n flex: 1;\n\n font-size: var(--wui-font-size, 14px);\n color: var(--wui-color-text, #1b1b1b);\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n:host(:not([data-has-value])) .label {\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n:host([trigger='icon']) .label {\n overflow: visible;\n display: flex;\n flex: none;\n align-items: center;\n justify-content: center;\n}\n\n.arrow {\n flex-shrink: 0;\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n:host([open]) .arrow {\n transform: rotate(180deg);\n}\n\n.select-overlay {\n --wui-internal-glass-shadow: var(--wui-shadow-panel, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-internal-duration-float-enter: var(--wui-duration-float-enter, 240ms);\n --wui-internal-duration-float-exit: var(--wui-duration-float-exit, 160ms);\n --wui-glass-corner-radius: var(--wui-radius-menu, 18px);\n\n /* 环底色转 transparent,宽 panel 的长边中段不留铺底,见 menu-portal.css 同处注释。 */\n --wui-color-glass-ring: transparent;\n position: absolute;\n z-index: var(--wui-layer-inline-overlay, 10);\n\n overflow: hidden;\n\n box-sizing: border-box;\n min-width: var(--wui-overlay-min-width, 200px);\n max-width: var(--wui-select-max-width, 500px);\n border-radius: var(--wui-radius-menu, 18px);\n\n /* 玻璃背景:wui-glass 在 panel 自身,这里覆盖其默认玻璃底为 menu surface 色 */\n background-color: var(--wui-color-surface-menu, rgb(250 250 250 / 0.76));\n\n &.portal {\n position: fixed;\n z-index: var(--wui-layer-menu, 1000);\n }\n\n &.hidden {\n display: none;\n }\n}\n\n.select-scroll {\n overflow-y: auto;\n max-height: var(--wui-select-max-height, 200px);\n}\n\n.select-content {\n padding: var(--wui-space-1, 4px);\n}\n\n:host([portal]) .select-overlay {\n display: none;\n}\n\n:host([data-wui-pointer-focus]) .select-trigger:focus-visible {\n outline-color: transparent;\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
@@ -6,9 +6,6 @@ export declare class WebUiSpinner extends LitElement {
6
6
  /** 叶片颜色;空字符串时跟随主题次要文本色。 */
7
7
  color: string;
8
8
  private _ariaLabel?;
9
- private readonly _overlay;
10
- private _overlayHandle?;
11
- private readonly _scrollLock;
12
9
  /**
13
10
  * 显示一个全屏加载实例并挂载到主题 overlay root(无主题时挂载到 fallback overlay root);新实例会替换之前由此方法创建的实例。
14
11
  * @param options 尺寸、说明文字、颜色与可选自动关闭时长。
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/spinner/index.ts"],"mappings":";qBAgCa,qBAAqB;SAChB,sBAAM;EAEqB;EACf;;EAEA;UACiC;mBAE5C;UAIT;mBACS;;;;;;SAOV,KAAK;IAAY;IAAe;IAAmB;IAAsB;MAAmB;SA6B5F;;SAcA,WAAW;;EAGlB;;EAEA,SAAS,kBAAkB;EAElB;EAiBA;YAgBU,QAAQ,OAAO;UAQ1B;UAaA;UAIA;EAOC,wBAAM;;QA2BT;YACI;IACR,kBAAkB"}
1
+ {"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/components/spinner/index.ts"],"mappings":";qBA8Ba,qBAAqB;SAChB,sBAAM;EAEqB;EACf;;EAEA;UACiC;;;;;;SAOtD,KAAK;IAAY;IAAe;IAAmB;IAAsB;MAAmB;SA6B5F;;SAcA,WAAW;;EAGlB;;EAEA,SAAS,kBAAkB;EAElB;EAgBA;YAaU,QAAQ,OAAO;UAQ1B;UAeA;UAIA;EAOC,wBAAM;;QAsBT;YACI;IACR,kBAAkB"}
@@ -1,8 +1,6 @@
1
1
  import __decorate from "../../_virtual/_@oxc-project_runtime@0.155.0/helpers/esm/decorate.js";
2
- import { defineOpenOverlay } from "../../shared/overlay/open-overlay.js";
3
2
  import { getFallbackOverlayRoot } from "../../shared/overlay/overlay-root.js";
4
3
  import { findRootTheme } from "../../shared/overlay/theme-overlay-scope.js";
5
- import { defineScrollLockLease } from "../../shared/scroll-lock/scroll-lock.js";
6
4
  import style_default from "./style.js";
7
5
  import { LitElement, html, nothing, unsafeCSS } from "lit";
8
6
  import { customElement, property } from "lit/decorators.js";
@@ -29,11 +27,6 @@ let WebUiSpinner = class WebUiSpinner extends LitElement {
29
27
  this.size = 24;
30
28
  this.description = "";
31
29
  this.color = "";
32
- this._overlay = defineOpenOverlay().make({
33
- requestClose: () => void 0,
34
- isConnected: () => this.isConnected
35
- });
36
- this._scrollLock = defineScrollLockLease().make();
37
30
  this._imperative = false;
38
31
  }
39
32
  static {
@@ -85,16 +78,12 @@ let WebUiSpinner = class WebUiSpinner extends LitElement {
85
78
  if (_WebUiSpinner._current && _WebUiSpinner._current !== this) _WebUiSpinner._current.remove();
86
79
  _WebUiSpinner._current = this;
87
80
  this.classList.add("wui-spinner-overlay");
88
- this._scrollLock.sync(true);
89
81
  this.requestUpdate();
90
82
  }
91
83
  }
92
84
  disconnectedCallback() {
93
85
  super.disconnectedCallback();
94
86
  this._closeDialog();
95
- this._overlayHandle?.release();
96
- this._overlayHandle = void 0;
97
- this._scrollLock.release();
98
87
  if (this._timer) {
99
88
  const timer = this._timer;
100
89
  queueMicrotask(() => {
@@ -113,9 +102,10 @@ let WebUiSpinner = class WebUiSpinner extends LitElement {
113
102
  if (!this._imperative || !this.isConnected) return;
114
103
  const dialog = this.shadowRoot?.querySelector("dialog");
115
104
  if (!dialog || dialog.open) return;
116
- if (typeof dialog.showModal === "function") {
117
- dialog.showModal();
118
- this._overlayHandle = this._overlay.claim(dialog, { ancestryFrom: this });
105
+ const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null;
106
+ if (typeof dialog.show === "function") {
107
+ dialog.show();
108
+ if (previouslyFocused && previouslyFocused !== document.body) previouslyFocused.focus({ preventScroll: true });
119
109
  } else dialog.setAttribute("open", "");
120
110
  }
121
111
  _handleDialogCancel(event) {
@@ -137,12 +127,7 @@ let WebUiSpinner = class WebUiSpinner extends LitElement {
137
127
  ${this.description ? html`<div class="spinner-description">${this.description}</div>` : nothing}
138
128
  <slot name="description"></slot>
139
129
  `;
140
- return this._imperative ? html`<dialog
141
- class="wui-spinner-overlay"
142
- aria-label=${this._ariaLabel}
143
- aria-modal="true"
144
- @cancel=${this._handleDialogCancel}
145
- >
130
+ return this._imperative ? html`<dialog class="wui-spinner-overlay" aria-label=${this._ariaLabel} @cancel=${this._handleDialogCancel}>
146
131
  <div class="wui-spinner-overlay-content" role="status" aria-label=${this._ariaLabel}>${spinner}</div>
147
132
  </dialog>` : spinner;
148
133
  }
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["style"],"sources":["../../../src/components/spinner/index.ts"],"sourcesContent":["import { html, LitElement, nothing, type PropertyValues, unsafeCSS } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { styleMap } from 'lit/directives/style-map.js'\n\nimport type { WebUiTheme } from '@/components/theme'\nimport { defineOpenOverlay, type OpenOverlayHandle } from '@/shared/overlay/open-overlay'\nimport { getFallbackOverlayRoot } from '@/shared/overlay/overlay-root'\nimport { findRootTheme } from '@/shared/overlay/theme-overlay-scope'\nimport { defineScrollLockLease } from '@/shared/scroll-lock/scroll-lock'\n\nimport style from './style.css?inline'\n\nconst LEAF_COUNT = 8\n\ntype SpinnerMountTarget = {\n element: HTMLElement\n initializingTheme?: WebUiTheme\n}\n\nfunction getSpinnerMountTarget(): SpinnerMountTarget {\n const rootTheme = findRootTheme()\n const overlayRoot = rootTheme?.getOverlayRoot()\n if (overlayRoot) return { element: overlayRoot }\n\n const initializingTheme = Array.from(document.querySelectorAll<WebUiTheme>('web-ui-theme')).find(\n theme => theme.appearance !== undefined\n )\n return initializingTheme ? { element: initializingTheme, initializingTheme } : { element: getFallbackOverlayRoot() }\n}\n\n@customElement('web-ui-spinner')\nexport class WebUiSpinner extends LitElement {\n static override styles = unsafeCSS(style)\n\n @property({ type: Number, reflect: true }) size = 24\n @property({ type: String }) description = ''\n /** 叶片颜色;空字符串时跟随主题次要文本色。 */\n @property({ type: String }) color = ''\n @property({ type: String, attribute: 'aria-label' }) private _ariaLabel?: string\n\n private readonly _overlay = defineOpenOverlay().make({\n requestClose: () => undefined,\n isConnected: () => this.isConnected\n })\n private _overlayHandle?: OpenOverlayHandle\n private readonly _scrollLock = defineScrollLockLease().make()\n\n /**\n * 显示一个全屏加载实例并挂载到主题 overlay root(无主题时挂载到 fallback overlay root);新实例会替换之前由此方法创建的实例。\n * @param options 尺寸、说明文字、颜色与可选自动关闭时长。\n * @returns 已挂载的 spinner 实例。\n */\n static show(options?: { size?: number; duration?: number; description?: string; color?: string }): WebUiSpinner {\n const el = document.createElement('web-ui-spinner')\n el._imperative = true\n if (options?.size) el.size = options.size\n if (options?.description) el.description = options.description\n if (options?.color !== undefined) el.color = options.color\n const mountTarget = getSpinnerMountTarget()\n mountTarget.element.appendChild(el)\n if (mountTarget.initializingTheme) {\n const theme = mountTarget.initializingTheme\n const moveIntoOverlayRoot = () => {\n const overlayRoot = theme.getOverlayRoot()\n if (overlayRoot && theme.isConnected && el.parentElement === theme) overlayRoot.appendChild(el)\n }\n void theme.updateComplete.then(\n () => {\n moveIntoOverlayRoot()\n if (el.parentElement === theme) window.requestAnimationFrame(moveIntoOverlayRoot)\n },\n () => undefined\n )\n }\n if (options?.duration && options.duration > 0) {\n el._timer = window.setTimeout(() => WebUiSpinner.hide(), options.duration)\n }\n return el\n }\n\n // 销毁由 show() 挂载的实例。\n static hide() {\n const current = WebUiSpinner._current\n if (!current) return\n\n if (current._timer) {\n clearTimeout(current._timer)\n current._timer = undefined\n }\n current._closeDialog()\n current.remove()\n if (WebUiSpinner._current === current) WebUiSpinner._current = undefined\n }\n\n /** @internal 当前命令式实例 */\n static _current?: WebUiSpinner\n\n /** @internal */\n _imperative = false\n /** @internal */\n _timer?: ReturnType<typeof setTimeout>\n\n override connectedCallback() {\n super.connectedCallback()\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'status')\n }\n if (!this.hasAttribute('aria-label')) {\n this.setAttribute('aria-label', 'Loading')\n }\n if (this._imperative) {\n if (WebUiSpinner._current && WebUiSpinner._current !== this) WebUiSpinner._current.remove()\n WebUiSpinner._current = this\n this.classList.add('wui-spinner-overlay')\n this._scrollLock.sync(true)\n this.requestUpdate()\n }\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback()\n this._closeDialog()\n this._overlayHandle?.release()\n this._overlayHandle = undefined\n this._scrollLock.release()\n if (this._timer) {\n const timer = this._timer\n queueMicrotask(() => {\n if (this.isConnected || this._timer !== timer) return\n clearTimeout(timer)\n this._timer = undefined\n })\n }\n }\n\n protected override updated(props: PropertyValues) {\n super.updated(props)\n this._syncImperativeOverlay()\n if (props.has('size')) {\n this.style.setProperty('--wui-spinner-size', `${this.size}px`)\n }\n }\n\n private _syncImperativeOverlay() {\n if (!this._imperative || !this.isConnected) return\n const dialog = this.shadowRoot?.querySelector('dialog')\n if (!dialog || dialog.open) return\n\n if (typeof dialog.showModal === 'function') {\n dialog.showModal()\n this._overlayHandle = this._overlay.claim(dialog, { ancestryFrom: this })\n } else {\n dialog.setAttribute('open', '')\n }\n }\n\n private _handleDialogCancel(event: Event) {\n event.preventDefault()\n }\n\n private _closeDialog() {\n const dialog = this.shadowRoot?.querySelector('dialog')\n if (!dialog?.open) return\n if (typeof dialog.close === 'function') dialog.close()\n else dialog.removeAttribute('open')\n }\n\n override render() {\n const spinner = html`\n <div class=\"wui-spinner\" style=${styleMap({ color: this.color || undefined })}>\n ${repeat(\n Array.from({ length: LEAF_COUNT }, (_, i) => i),\n i =>\n html`<span\n style=\"transform:rotate(${i * 45}deg);animation-delay:calc(-${LEAF_COUNT - i} / ${LEAF_COUNT} * var(--wui-duration-spinner, 800ms))\"\n ></span>`\n )}\n </div>\n ${this.description ? html`<div class=\"spinner-description\">${this.description}</div>` : nothing}\n <slot name=\"description\"></slot>\n `\n return this._imperative\n ? html`<dialog\n class=\"wui-spinner-overlay\"\n aria-label=${this._ariaLabel}\n aria-modal=\"true\"\n @cancel=${this._handleDialogCancel}\n >\n <div class=\"wui-spinner-overlay-content\" role=\"status\" aria-label=${this._ariaLabel}>${spinner}</div>\n </dialog>`\n : spinner\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'web-ui-spinner': WebUiSpinner\n }\n}\n"],"mappings":";;;;;;;;;;;;AAaA,MAAM,aAAa;AAOnB,SAAS,wBAA4C;CAEnD,MAAM,cADY,cACU,CAAC,EAAE,eAAe;CAC9C,IAAI,aAAa,OAAO,EAAE,SAAS,YAAY;CAE/C,MAAM,oBAAoB,MAAM,KAAK,SAAS,iBAA6B,cAAc,CAAC,CAAC,CAAC,MAC1F,UAAS,MAAM,eAAe,KAAA,CAChC;CACA,OAAO,oBAAoB;EAAE,SAAS;EAAmB;CAAkB,IAAI,EAAE,SAAS,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Ae;CACvB;CAEA,eAAuB;EACrB,MAAM,SAAS,KAAK,YAAY,cAAc,QAAQ;EACtD,IAAI,CAAC,QAAQ,MAAM;EACnB,IAAI,OAAO,OAAO,UAAU,YAAY,OAAO,MAAM;OAChD,OAAO,gBAAgB,MAAM;CACpC;CAEA,SAAkB;EAChB,MAAM,UAAU,IAAI;uCACe,SAAS,EAAE,OAAO,KAAK,SAAS,KAAA,EAAU,CAAC,EAAE;UAC1E,OACA,MAAM,KAAK,EAAE,QAAQ,WAAW,IAAI,GAAG,MAAM,CAAC,IAC9C,MACE,IAAI;wCACwB,IAAI,GAAG,6BAA6B,aAAa,EAAE,KAAK,WAAW;qBAEnG,EAAE;;QAEF,KAAK,cAAc,IAAI,oCAAoC,KAAK,YAAY,UAAU,QAAQ;;;EAGlG,OAAO,KAAK,cACR,IAAI;;uBAEW,KAAK,WAAW;;oBAEnB,KAAK,oBAAoB;;8EAEiC,KAAK,WAAW,GAAG,QAAQ;qBAEjG;CACN;AACF;AA9JG,WAAA,CAAA,SAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,aAAA,WAAA,QAAA,KAAA,CAAA;AACxC,WAAA,CAAA,SAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,aAAA,WAAA,eAAA,KAAA,CAAA;AAEzB,WAAA,CAAA,SAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,aAAA,WAAA,SAAA,KAAA,CAAA;AACzB,WAAA,CAAA,SAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,aAAA,WAAA,cAAA,KAAA,CAAA;AARpD,eAAA,gBAAA,WAAA,CAAA,cAAc,gBAAgB,CAAA,GAAA,YAAA"}
1
+ {"version":3,"file":"index.js","names":["style"],"sources":["../../../src/components/spinner/index.ts"],"sourcesContent":["import { html, LitElement, nothing, type PropertyValues, unsafeCSS } from 'lit'\nimport { customElement, property } from 'lit/decorators.js'\nimport { repeat } from 'lit/directives/repeat.js'\nimport { styleMap } from 'lit/directives/style-map.js'\n\nimport type { WebUiTheme } from '@/components/theme'\nimport { getFallbackOverlayRoot } from '@/shared/overlay/overlay-root'\nimport { findRootTheme } from '@/shared/overlay/theme-overlay-scope'\n\nimport style from './style.css?inline'\n\nconst LEAF_COUNT = 8\n\ntype SpinnerMountTarget = {\n element: HTMLElement\n initializingTheme?: WebUiTheme\n}\n\nfunction getSpinnerMountTarget(): SpinnerMountTarget {\n const rootTheme = findRootTheme()\n const overlayRoot = rootTheme?.getOverlayRoot()\n if (overlayRoot) return { element: overlayRoot }\n\n const initializingTheme = Array.from(document.querySelectorAll<WebUiTheme>('web-ui-theme')).find(\n theme => theme.appearance !== undefined\n )\n return initializingTheme ? { element: initializingTheme, initializingTheme } : { element: getFallbackOverlayRoot() }\n}\n\n@customElement('web-ui-spinner')\nexport class WebUiSpinner extends LitElement {\n static override styles = unsafeCSS(style)\n\n @property({ type: Number, reflect: true }) size = 24\n @property({ type: String }) description = ''\n /** 叶片颜色;空字符串时跟随主题次要文本色。 */\n @property({ type: String }) color = ''\n @property({ type: String, attribute: 'aria-label' }) private _ariaLabel?: string\n\n /**\n * 显示一个全屏加载实例并挂载到主题 overlay root(无主题时挂载到 fallback overlay root);新实例会替换之前由此方法创建的实例。\n * @param options 尺寸、说明文字、颜色与可选自动关闭时长。\n * @returns 已挂载的 spinner 实例。\n */\n static show(options?: { size?: number; duration?: number; description?: string; color?: string }): WebUiSpinner {\n const el = document.createElement('web-ui-spinner')\n el._imperative = true\n if (options?.size) el.size = options.size\n if (options?.description) el.description = options.description\n if (options?.color !== undefined) el.color = options.color\n const mountTarget = getSpinnerMountTarget()\n mountTarget.element.appendChild(el)\n if (mountTarget.initializingTheme) {\n const theme = mountTarget.initializingTheme\n const moveIntoOverlayRoot = () => {\n const overlayRoot = theme.getOverlayRoot()\n if (overlayRoot && theme.isConnected && el.parentElement === theme) overlayRoot.appendChild(el)\n }\n void theme.updateComplete.then(\n () => {\n moveIntoOverlayRoot()\n if (el.parentElement === theme) window.requestAnimationFrame(moveIntoOverlayRoot)\n },\n () => undefined\n )\n }\n if (options?.duration && options.duration > 0) {\n el._timer = window.setTimeout(() => WebUiSpinner.hide(), options.duration)\n }\n return el\n }\n\n // 销毁由 show() 挂载的实例。\n static hide() {\n const current = WebUiSpinner._current\n if (!current) return\n\n if (current._timer) {\n clearTimeout(current._timer)\n current._timer = undefined\n }\n current._closeDialog()\n current.remove()\n if (WebUiSpinner._current === current) WebUiSpinner._current = undefined\n }\n\n /** @internal 当前命令式实例 */\n static _current?: WebUiSpinner\n\n /** @internal */\n _imperative = false\n /** @internal */\n _timer?: ReturnType<typeof setTimeout>\n\n override connectedCallback() {\n super.connectedCallback()\n if (!this.hasAttribute('role')) {\n this.setAttribute('role', 'status')\n }\n if (!this.hasAttribute('aria-label')) {\n this.setAttribute('aria-label', 'Loading')\n }\n if (this._imperative) {\n if (WebUiSpinner._current && WebUiSpinner._current !== this) WebUiSpinner._current.remove()\n WebUiSpinner._current = this\n this.classList.add('wui-spinner-overlay')\n this.requestUpdate()\n }\n }\n\n override disconnectedCallback() {\n super.disconnectedCallback()\n this._closeDialog()\n if (this._timer) {\n const timer = this._timer\n queueMicrotask(() => {\n if (this.isConnected || this._timer !== timer) return\n clearTimeout(timer)\n this._timer = undefined\n })\n }\n }\n\n protected override updated(props: PropertyValues) {\n super.updated(props)\n this._syncImperativeOverlay()\n if (props.has('size')) {\n this.style.setProperty('--wui-spinner-size', `${this.size}px`)\n }\n }\n\n private _syncImperativeOverlay() {\n if (!this._imperative || !this.isConnected) return\n const dialog = this.shadowRoot?.querySelector('dialog')\n if (!dialog || dialog.open) return\n\n // 加载提示不是模态框:只占位显示状态,页面其余控件与滚动保持可用。\n const previouslyFocused = document.activeElement instanceof HTMLElement ? document.activeElement : null\n if (typeof dialog.show === 'function') {\n dialog.show()\n if (previouslyFocused && previouslyFocused !== document.body) previouslyFocused.focus({ preventScroll: true })\n } else {\n dialog.setAttribute('open', '')\n }\n }\n\n private _handleDialogCancel(event: Event) {\n event.preventDefault()\n }\n\n private _closeDialog() {\n const dialog = this.shadowRoot?.querySelector('dialog')\n if (!dialog?.open) return\n if (typeof dialog.close === 'function') dialog.close()\n else dialog.removeAttribute('open')\n }\n\n override render() {\n const spinner = html`\n <div class=\"wui-spinner\" style=${styleMap({ color: this.color || undefined })}>\n ${repeat(\n Array.from({ length: LEAF_COUNT }, (_, i) => i),\n i =>\n html`<span\n style=\"transform:rotate(${i * 45}deg);animation-delay:calc(-${LEAF_COUNT - i} / ${LEAF_COUNT} * var(--wui-duration-spinner, 800ms))\"\n ></span>`\n )}\n </div>\n ${this.description ? html`<div class=\"spinner-description\">${this.description}</div>` : nothing}\n <slot name=\"description\"></slot>\n `\n return this._imperative\n ? html`<dialog class=\"wui-spinner-overlay\" aria-label=${this._ariaLabel} @cancel=${this._handleDialogCancel}>\n <div class=\"wui-spinner-overlay-content\" role=\"status\" aria-label=${this._ariaLabel}>${spinner}</div>\n </dialog>`\n : spinner\n }\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'web-ui-spinner': WebUiSpinner\n }\n}\n"],"mappings":";;;;;;;;;;AAWA,MAAM,aAAa;AAOnB,SAAS,wBAA4C;CAEnD,MAAM,cADY,cACU,CAAC,EAAE,eAAe;CAC9C,IAAI,aAAa,OAAO,EAAE,SAAS,YAAY;CAE/C,MAAM,oBAAoB,MAAM,KAAK,SAAS,iBAA6B,cAAc,CAAC,CAAC,CAAC,MAC1F,UAAS,MAAM,eAAe,KAAA,CAChC;CACA,OAAO,oBAAoB;EAAE,SAAS;EAAmB;CAAkB,IAAI,EAAE,SAAS,uBAAuB,EAAE;AACrH;AAGO,IAAM,eAAN,MAAM,qBAAqB,WAAW;;;;;;EAGO,KAAA,OAAA;EACR,KAAA,cAAA;EAEN,KAAA,QAAA;EAsDtB,KAAA,cAAA;;;EA3DW,KAAA,SAAA,UAAUA,aAAK;;;;;;;CAaxC,OAAO,KAAK,SAAoG;EAC9G,MAA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;qBAEnG,EAAE;;QAEF,KAAK,cAAc,IAAI,oCAAoC,KAAK,YAAY,UAAU,QAAQ;;;EAGlG,OAAO,KAAK,cACR,IAAI,kDAAkD,KAAK,WAAW,WAAW,KAAK,oBAAoB;8EACpC,KAAK,WAAW,GAAG,QAAQ;qBAEjG;CACN;AACF;AAhJG,WAAA,CAAA,SAAS;CAAE,MAAM;CAAQ,SAAS;AAAK,CAAC,CAAA,GAAA,aAAA,WAAA,QAAA,KAAA,CAAA;AACxC,WAAA,CAAA,SAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,aAAA,WAAA,eAAA,KAAA,CAAA;AAEzB,WAAA,CAAA,SAAS,EAAE,MAAM,OAAO,CAAC,CAAA,GAAA,aAAA,WAAA,SAAA,KAAA,CAAA;AACzB,WAAA,CAAA,SAAS;CAAE,MAAM;CAAQ,WAAW;AAAa,CAAC,CAAA,GAAA,aAAA,WAAA,cAAA,KAAA,CAAA;AARpD,eAAA,gBAAA,WAAA,CAAA,cAAc,gBAAgB,CAAA,GAAA,YAAA"}
@@ -1,5 +1,5 @@
1
1
  // src/components/spinner/style.css?inline
2
- var style_default = "*,:before,:after{box-sizing:border-box}:host{color:var(--wui-color-text-secondary,#6a6a6a);justify-content:center;align-items:center;display:inline-flex}:host(.wui-spinner-overlay){display:contents}.wui-spinner{width:var(--wui-spinner-size,24px);height:var(--wui-spinner-size,24px);position:relative}.wui-spinner span{transform-origin:50%;width:10%;height:100%;animation:wui-spinner-leaf-fade var(--wui-duration-spinner,.8s) linear infinite;position:absolute;top:0;left:50%}.wui-spinner span:before{content:\"\";border-radius:var(--wui-radius-control,calc(infinity * 1px));background-color:currentColor;width:100%;height:30%;margin-top:12%;display:block}.wui-spinner-overlay{pointer-events:auto;z-index:var(--wui-layer-loading,300);width:100%;max-width:none;height:100%;max-height:none;color:inherit;background:0 0;border:0;justify-content:center;align-items:center;margin:0;padding:0;display:flex;position:fixed;inset:0;overflow:hidden}.wui-spinner-overlay::backdrop{background:0 0}.wui-spinner-overlay-content{gap:var(--wui-space-2,8px);flex-direction:column;justify-content:center;align-items:center;display:flex}.spinner-description{max-width:240px;font-size:var(--wui-font-size,14px);line-height:var(--wui-line-height-normal,1.5);color:var(--wui-color-text-secondary,#6a6a6a);text-align:center}@keyframes wui-spinner-leaf-fade{0%{opacity:1}to{opacity:0}}\n";
2
+ var style_default = "*,:before,:after{box-sizing:border-box}:host{color:var(--wui-color-text-secondary,#6a6a6a);justify-content:center;align-items:center;display:inline-flex}:host(.wui-spinner-overlay){display:contents}.wui-spinner{width:var(--wui-spinner-size,24px);height:var(--wui-spinner-size,24px);position:relative}.wui-spinner span{transform-origin:50%;width:10%;height:100%;animation:wui-spinner-leaf-fade var(--wui-duration-spinner,.8s) linear infinite;position:absolute;top:0;left:50%}.wui-spinner span:before{content:\"\";border-radius:var(--wui-radius-control,calc(infinity * 1px));background-color:currentColor;width:100%;height:30%;margin-top:12%;display:block}.wui-spinner-overlay{pointer-events:none;z-index:var(--wui-layer-loading,3000);width:100%;max-width:none;height:100%;max-height:none;color:inherit;background:0 0;border:0;justify-content:center;align-items:center;margin:0;padding:0;display:flex;position:fixed;inset:0;overflow:hidden}.wui-spinner-overlay::backdrop{background:0 0}.wui-spinner-overlay-content{gap:var(--wui-space-2,8px);flex-direction:column;justify-content:center;align-items:center;display:flex}.spinner-description{max-width:240px;font-size:var(--wui-font-size,14px);line-height:var(--wui-line-height-normal,1.5);color:var(--wui-color-text-secondary,#6a6a6a);text-align:center}@keyframes wui-spinner-leaf-fade{0%{opacity:1}to{opacity:0}}\n";
3
3
  export { style_default as default };
4
4
 
5
5
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/spinner/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n:host(.wui-spinner-overlay) {\n display: contents;\n}\n\n.wui-spinner {\n position: relative;\n width: var(--wui-spinner-size, 24px);\n height: var(--wui-spinner-size, 24px);\n\n span {\n position: absolute;\n top: 0;\n left: 50%;\n transform-origin: center center;\n\n width: 10%;\n height: 100%;\n\n animation: wui-spinner-leaf-fade var(--wui-duration-spinner, 800ms) linear infinite;\n\n &::before {\n content: '';\n\n display: block;\n\n width: 100%;\n height: 30%;\n margin-top: 12%;\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n\n background-color: currentcolor;\n }\n }\n}\n\n.wui-spinner-overlay {\n pointer-events: auto;\n\n position: fixed;\n z-index: var(--wui-layer-loading, 300);\n inset: 0;\n\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 100%;\n max-width: none;\n height: 100%;\n max-height: none;\n margin: 0;\n padding: 0;\n border: 0;\n\n color: inherit;\n\n background: transparent;\n\n &::backdrop {\n background: transparent;\n }\n}\n\n.wui-spinner-overlay-content {\n display: flex;\n flex-direction: column;\n gap: var(--wui-space-2, 8px);\n align-items: center;\n justify-content: center;\n}\n\n.spinner-description {\n max-width: 240px;\n\n font-size: var(--wui-font-size, 14px);\n line-height: var(--wui-line-height-normal, 1.5);\n color: var(--wui-color-text-secondary, #6a6a6a);\n text-align: center;\n}\n\n@keyframes wui-spinner-leaf-fade {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/spinner/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n color: var(--wui-color-text-secondary, #6a6a6a);\n}\n\n:host(.wui-spinner-overlay) {\n display: contents;\n}\n\n.wui-spinner {\n position: relative;\n width: var(--wui-spinner-size, 24px);\n height: var(--wui-spinner-size, 24px);\n\n span {\n position: absolute;\n top: 0;\n left: 50%;\n transform-origin: center center;\n\n width: 10%;\n height: 100%;\n\n animation: wui-spinner-leaf-fade var(--wui-duration-spinner, 800ms) linear infinite;\n\n &::before {\n content: '';\n\n display: block;\n\n width: 100%;\n height: 30%;\n margin-top: 12%;\n border-radius: var(--wui-radius-control, calc(infinity * 1px));\n\n background-color: currentcolor;\n }\n }\n}\n\n.wui-spinner-overlay {\n /* 状态提示不占据命中层:全屏实例出现时,页面控件与滚动仍然可用。 */\n pointer-events: none;\n\n position: fixed;\n z-index: var(--wui-layer-loading, 3000);\n inset: 0;\n\n overflow: hidden;\n display: flex;\n align-items: center;\n justify-content: center;\n\n width: 100%;\n max-width: none;\n height: 100%;\n max-height: none;\n margin: 0;\n padding: 0;\n border: 0;\n\n color: inherit;\n\n background: transparent;\n\n &::backdrop {\n background: transparent;\n }\n}\n\n.wui-spinner-overlay-content {\n display: flex;\n flex-direction: column;\n gap: var(--wui-space-2, 8px);\n align-items: center;\n justify-content: center;\n}\n\n.spinner-description {\n max-width: 240px;\n\n font-size: var(--wui-font-size, 14px);\n line-height: var(--wui-line-height-normal, 1.5);\n color: var(--wui-color-text-secondary, #6a6a6a);\n text-align: center;\n}\n\n@keyframes wui-spinner-leaf-fade {\n from {\n opacity: 1;\n }\n\n to {\n opacity: 0;\n }\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
@@ -1,5 +1,5 @@
1
1
  // src/components/theme/style.css?inline
2
- var style_default = "*,:before,:after{box-sizing:border-box}:host{--wui-font-size-caption:12px;--wui-font-size-readout:13px;--wui-font-size:14px;--wui-font-size-title:18px;--wui-font-weight-medium:500;--wui-font-weight-semibold:600;--wui-line-height-tight:1.2;--wui-line-height-snug:1.4;--wui-line-height-normal:1.5;--wui-line-height-relaxed:1.6;--wui-space-1:4px;--wui-space-2:8px;--wui-space-3:12px;--wui-space-4:16px;--wui-space-5:20px;--wui-space-6:24px;--wui-input-width:200px;--wui-control-size:36px;--wui-overlay-min-width:200px;--wui-selection-control-size:18px;--wui-radio-group-gap:var(--wui-space-2);--wui-checkbox-group-gap:var(--wui-space-2);--wui-layer-inline-overlay:1;--wui-layer-header:10;--wui-layer-auxiliary:20;--wui-layer-banner:30;--wui-layer-tabbar:40;--wui-layer-sidebar:50;--wui-layer-menu:100;--wui-layer-menu-nested:110;--wui-layer-toast:200;--wui-layer-loading:300;--wui-duration-press:80ms;--wui-duration-feedback:.1s;--wui-duration-trigger:.16s;--wui-duration-focus:.2s;--wui-duration-float-enter:.24s;--wui-duration-float-exit:.16s;--wui-duration-dialog-enter:.32s;--wui-duration-dialog-exit:.26s;--wui-duration-drawer-enter:.28s;--wui-duration-drawer-exit:.24s;--wui-duration-drawer-nested:.45s;--wui-duration-toast-enter:.28s;--wui-duration-toast-exit:.2s;--wui-duration-collapse-enter:.2s;--wui-duration-collapse-exit:.16s;--wui-duration-layout:.2s;--wui-duration-swipe-settle:.22s;--wui-duration-spin:.6s;--wui-duration-spinner:.8s;--wui-theme-transition-duration:.5s;--wui-theme-transition-easing:ease-in;--wui-ease-enter:cubic-bezier(.23, 1, .32, 1);--wui-ease-dialog:cubic-bezier(.2, 0, 0, 1);--wui-ease-slide:cubic-bezier(.77, 0, .175, 1);--wui-ease-swipe:cubic-bezier(.32, .72, 0, 1);--wui-ease-float:cubic-bezier(.4, .38, .2, 1);--wui-scale-enter:.9;--wui-dialog-scale-enter:1.1;--wui-focus-ring-width:3px;--wui-radius-control:calc(infinity * 1px);--wui-radius-menu:18px;--wui-radius-overlay:28px;display:contents}:host([motion=reduced]){--wui-duration-press:0s;--wui-duration-feedback:0s;--wui-duration-trigger:0s;--wui-duration-focus:0s;--wui-duration-float-enter:0s;--wui-duration-float-exit:0s;--wui-duration-dialog-enter:0s;--wui-duration-dialog-exit:0s;--wui-duration-drawer-enter:0s;--wui-duration-drawer-exit:0s;--wui-duration-drawer-nested:0s;--wui-duration-toast-enter:0s;--wui-duration-toast-exit:0s;--wui-duration-collapse-enter:0s;--wui-duration-collapse-exit:0s;--wui-duration-layout:0s;--wui-duration-swipe-settle:0s;--wui-theme-transition-duration:0s;--wui-duration-spin:1.6s;--wui-duration-spinner:1.6s;--wui-scale-enter:1;--wui-dialog-scale-enter:1}@media (prefers-reduced-motion:reduce){:host([motion=system]){--wui-duration-press:0s;--wui-duration-feedback:0s;--wui-duration-trigger:0s;--wui-duration-focus:0s;--wui-duration-float-enter:0s;--wui-duration-float-exit:0s;--wui-duration-dialog-enter:0s;--wui-duration-dialog-exit:0s;--wui-duration-drawer-enter:0s;--wui-duration-drawer-exit:0s;--wui-duration-drawer-nested:0s;--wui-duration-toast-enter:0s;--wui-duration-toast-exit:0s;--wui-duration-collapse-enter:0s;--wui-duration-collapse-exit:0s;--wui-duration-layout:0s;--wui-duration-swipe-settle:0s;--wui-theme-transition-duration:0s;--wui-duration-spin:1.6s;--wui-duration-spinner:1.6s;--wui-scale-enter:1;--wui-dialog-scale-enter:1}}:host([appearance=light]),:host([appearance=system]){--wui-color-page:#fff;--wui-color-surface:#fff;--wui-color-surface-raised:#f2f2f7;--wui-color-surface-control:#dfdfdf;--wui-color-surface-track:#e5e5ea;--wui-color-surface-menu:#fafafac2;--wui-color-surface-glass:#fafafa57;--wui-color-surface-glass-hover:color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));--wui-color-surface-glass-active:color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));--wui-color-surface-overlay:#f8f8f8eb;--wui-color-surface-sidebar:#e9e9e9d1;--wui-color-surface-segmented:#dfdfdf;--wui-color-surface-segmented-track:#e5e5ea;--wui-color-surface-selected:#fff;--wui-color-text:#1b1b1b;--wui-color-text-secondary:#6a6a6a;--wui-color-text-tertiary:color-mix(in srgb, var(--wui-color-text) 35%, transparent);--wui-color-text-disabled:color-mix(in srgb, var(--wui-color-text) 32%, transparent);--wui-color-state-layer-hover:color-mix(in srgb, var(--wui-color-text) 6%, transparent);--wui-color-state-layer-active:color-mix(in srgb, var(--wui-color-text) 15%, transparent);--wui-color-border:#0000001a;--wui-color-glass-highlight:#ffffffe6;--wui-color-glass-ring:#0000000d;--wui-color-glass-ring-sheen:#ffffff80;--wui-color-glass-ring-shade:#00000008;--wui-glass-brightness:1.06;--wui-color-accent:#0071e3;--wui-color-on-accent:#fff;--wui-color-on-danger:#fff;--wui-color-on-control:#fff;--wui-color-success:#16a34a;--wui-color-warning:#d97706;--wui-color-danger:#dc2626;--wui-color-info:#2563eb;--wui-color-backdrop:#0000001f;--wui-shadow-overlay:2px 16px 40px #0006;--wui-shadow-panel:0 3px 9px #00000045;--wui-shadow-glass:0 0 1px #00000005, 0 0 8px #00000008, 0 2px 16px #00000006, 0 8px 32px #00000004;--wui-color-focus-ring:color-mix(in srgb, var(--wui-color-accent,#0071e3) 40%, transparent);--wui-scrollbar-handle:#00000063;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:host([appearance=dark]){--wui-color-page:#242628;--wui-color-surface:#2c2c2e;--wui-color-surface-raised:#2c2c2e;--wui-color-surface-control:#3a3a3c;--wui-color-surface-track:#444446;--wui-color-surface-menu:#313032bd;--wui-color-surface-glass:#2c2c2e6b;--wui-color-surface-glass-hover:color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));--wui-color-surface-glass-active:color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));--wui-color-surface-overlay:#202222eb;--wui-color-surface-sidebar:#2c2c2ecc;--wui-color-surface-segmented:#3a3a3c;--wui-color-surface-segmented-track:#17191a;--wui-color-surface-selected:#242628;--wui-color-text:#e9eaea;--wui-color-text-secondary:#a1a1a6;--wui-color-text-tertiary:color-mix(in srgb, var(--wui-color-text) 42%, transparent);--wui-color-text-disabled:color-mix(in srgb, var(--wui-color-text) 38%, transparent);--wui-color-state-layer-hover:color-mix(in srgb, var(--wui-color-text) 6%, transparent);--wui-color-state-layer-active:color-mix(in srgb, var(--wui-color-text) 15%, transparent);--wui-color-border:#ffffff24;--wui-color-glass-highlight:#ffffff1a;--wui-color-glass-ring:#ffffff0d;--wui-color-glass-ring-sheen:#fff3;--wui-color-glass-ring-shade:#00000080;--wui-glass-brightness:1.02;--wui-color-accent:#0a84ff;--wui-color-on-accent:#000;--wui-color-on-danger:#000;--wui-color-on-control:#f2f2f7;--wui-color-success:#30d158;--wui-color-warning:#ff9f0a;--wui-color-danger:#ff453a;--wui-color-info:#64d2ff;--wui-color-backdrop:#0000007a;--wui-shadow-overlay:0 18px 48px #0000007a;--wui-shadow-panel:0 4px 16px #00000052;--wui-shadow-glass:0 8px 24px #00000014;--wui-color-focus-ring:color-mix(in srgb, var(--wui-color-accent,#0a84ff) 62%, var(--wui-color-text) 38%);--wui-scrollbar-handle:#ffffff80;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}@media (prefers-color-scheme:dark){:host([appearance=system]){--wui-color-page:#242628;--wui-color-surface:#2c2c2e;--wui-color-surface-raised:#2c2c2e;--wui-color-surface-control:#3a3a3c;--wui-color-surface-track:#444446;--wui-color-surface-menu:#313032bd;--wui-color-surface-glass:#2c2c2e6b;--wui-color-surface-glass-hover:color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));--wui-color-surface-glass-active:color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));--wui-color-surface-overlay:#202222eb;--wui-color-surface-sidebar:#2c2c2ecc;--wui-color-surface-segmented:#3a3a3c;--wui-color-surface-segmented-track:#17191a;--wui-color-surface-selected:#242628;--wui-color-text:#e9eaea;--wui-color-text-secondary:#a1a1a6;--wui-color-text-tertiary:color-mix(in srgb, var(--wui-color-text) 42%, transparent);--wui-color-text-disabled:color-mix(in srgb, var(--wui-color-text) 38%, transparent);--wui-color-state-layer-hover:color-mix(in srgb, var(--wui-color-text) 6%, transparent);--wui-color-state-layer-active:color-mix(in srgb, var(--wui-color-text) 15%, transparent);--wui-color-border:#ffffff24;--wui-color-glass-highlight:#ffffff1a;--wui-color-glass-ring:#ffffff0d;--wui-color-glass-ring-sheen:#fff3;--wui-color-glass-ring-shade:#00000080;--wui-glass-brightness:1.02;--wui-color-accent:#0a84ff;--wui-color-on-accent:#000;--wui-color-on-danger:#000;--wui-color-on-control:#f2f2f7;--wui-color-success:#30d158;--wui-color-warning:#ff9f0a;--wui-color-danger:#ff453a;--wui-color-info:#64d2ff;--wui-color-backdrop:#0000007a;--wui-shadow-overlay:0 18px 48px #0000007a;--wui-shadow-panel:0 4px 16px #00000052;--wui-shadow-glass:0 8px 24px #00000014;--wui-color-focus-ring:color-mix(in srgb, var(--wui-color-accent,#0a84ff) 62%, var(--wui-color-text) 38%);--wui-scrollbar-handle:#ffffff80;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}\n";
2
+ var style_default = "*,:before,:after{box-sizing:border-box}:host{--wui-font-size-caption:12px;--wui-font-size-readout:13px;--wui-font-size:14px;--wui-font-size-title:18px;--wui-font-weight-medium:500;--wui-font-weight-semibold:600;--wui-line-height-tight:1.2;--wui-line-height-snug:1.4;--wui-line-height-normal:1.5;--wui-line-height-relaxed:1.6;--wui-space-1:4px;--wui-space-2:8px;--wui-space-3:12px;--wui-space-4:16px;--wui-space-5:20px;--wui-space-6:24px;--wui-input-width:200px;--wui-control-size:36px;--wui-overlay-min-width:200px;--wui-selection-control-size:18px;--wui-radio-group-gap:var(--wui-space-2);--wui-checkbox-group-gap:var(--wui-space-2);--wui-layer-inline-overlay:10;--wui-layer-header:100;--wui-layer-auxiliary:200;--wui-layer-banner:300;--wui-layer-tabbar:400;--wui-layer-sidebar:500;--wui-layer-menu:1000;--wui-layer-menu-nested:1100;--wui-layer-toast:2000;--wui-layer-loading:3000;--wui-duration-press:80ms;--wui-duration-feedback:.1s;--wui-duration-trigger:.16s;--wui-duration-focus:.2s;--wui-duration-float-enter:.24s;--wui-duration-float-exit:.16s;--wui-duration-dialog-enter:.32s;--wui-duration-dialog-exit:.26s;--wui-duration-drawer-enter:.28s;--wui-duration-drawer-exit:.24s;--wui-duration-drawer-nested:.45s;--wui-duration-toast-enter:.28s;--wui-duration-toast-exit:.2s;--wui-duration-collapse-enter:.2s;--wui-duration-collapse-exit:.16s;--wui-duration-layout:.2s;--wui-duration-swipe-settle:.22s;--wui-duration-spin:.6s;--wui-duration-spinner:.8s;--wui-theme-transition-duration:.5s;--wui-theme-transition-easing:ease-in;--wui-ease-enter:cubic-bezier(.23, 1, .32, 1);--wui-ease-dialog:cubic-bezier(.2, 0, 0, 1);--wui-ease-slide:cubic-bezier(.77, 0, .175, 1);--wui-ease-swipe:cubic-bezier(.32, .72, 0, 1);--wui-ease-float:cubic-bezier(.4, .38, .2, 1);--wui-scale-enter:.9;--wui-dialog-scale-enter:1.1;--wui-focus-ring-width:3px;--wui-radius-control:calc(infinity * 1px);--wui-radius-menu:18px;--wui-radius-overlay:28px;display:contents}:host([motion=reduced]){--wui-duration-press:0s;--wui-duration-feedback:0s;--wui-duration-trigger:0s;--wui-duration-focus:0s;--wui-duration-float-enter:0s;--wui-duration-float-exit:0s;--wui-duration-dialog-enter:0s;--wui-duration-dialog-exit:0s;--wui-duration-drawer-enter:0s;--wui-duration-drawer-exit:0s;--wui-duration-drawer-nested:0s;--wui-duration-toast-enter:0s;--wui-duration-toast-exit:0s;--wui-duration-collapse-enter:0s;--wui-duration-collapse-exit:0s;--wui-duration-layout:0s;--wui-duration-swipe-settle:0s;--wui-theme-transition-duration:0s;--wui-duration-spin:1.6s;--wui-duration-spinner:1.6s;--wui-scale-enter:1;--wui-dialog-scale-enter:1}@media (prefers-reduced-motion:reduce){:host([motion=system]){--wui-duration-press:0s;--wui-duration-feedback:0s;--wui-duration-trigger:0s;--wui-duration-focus:0s;--wui-duration-float-enter:0s;--wui-duration-float-exit:0s;--wui-duration-dialog-enter:0s;--wui-duration-dialog-exit:0s;--wui-duration-drawer-enter:0s;--wui-duration-drawer-exit:0s;--wui-duration-drawer-nested:0s;--wui-duration-toast-enter:0s;--wui-duration-toast-exit:0s;--wui-duration-collapse-enter:0s;--wui-duration-collapse-exit:0s;--wui-duration-layout:0s;--wui-duration-swipe-settle:0s;--wui-theme-transition-duration:0s;--wui-duration-spin:1.6s;--wui-duration-spinner:1.6s;--wui-scale-enter:1;--wui-dialog-scale-enter:1}}:host([appearance=light]),:host([appearance=system]){--wui-color-page:#fff;--wui-color-surface:#fff;--wui-color-surface-raised:#f2f2f7;--wui-color-surface-control:#dfdfdf;--wui-color-surface-track:#e5e5ea;--wui-color-surface-menu:#fafafac2;--wui-color-surface-glass:#fafafa57;--wui-color-surface-glass-hover:color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));--wui-color-surface-glass-active:color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));--wui-color-surface-overlay:#f8f8f8eb;--wui-color-surface-sidebar:#e9e9e9d1;--wui-color-surface-segmented:#dfdfdf;--wui-color-surface-segmented-track:#e5e5ea;--wui-color-surface-selected:#fff;--wui-color-text:#1b1b1b;--wui-color-text-secondary:#6a6a6a;--wui-color-text-tertiary:color-mix(in srgb, var(--wui-color-text) 35%, transparent);--wui-color-text-disabled:color-mix(in srgb, var(--wui-color-text) 32%, transparent);--wui-color-state-layer-hover:color-mix(in srgb, var(--wui-color-text) 6%, transparent);--wui-color-state-layer-active:color-mix(in srgb, var(--wui-color-text) 15%, transparent);--wui-color-border:#0000001a;--wui-color-glass-highlight:#ffffffe6;--wui-color-glass-ring:#0000000d;--wui-color-glass-ring-sheen:#ffffff80;--wui-color-glass-ring-shade:#00000008;--wui-glass-brightness:1.06;--wui-color-accent:#0071e3;--wui-color-on-accent:#fff;--wui-color-on-danger:#fff;--wui-color-on-control:#fff;--wui-color-success:#16a34a;--wui-color-warning:#d97706;--wui-color-danger:#dc2626;--wui-color-info:#2563eb;--wui-color-backdrop:#0000001f;--wui-shadow-overlay:2px 16px 40px #0006;--wui-shadow-panel:0 3px 9px #00000045;--wui-shadow-glass:0 0 1px #00000005, 0 0 8px #00000008, 0 2px 16px #00000006, 0 8px 32px #00000004;--wui-color-focus-ring:color-mix(in srgb, var(--wui-color-accent,#0071e3) 40%, transparent);--wui-scrollbar-handle:#00000063;--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light}:host([appearance=dark]){--wui-color-page:#242628;--wui-color-surface:#2c2c2e;--wui-color-surface-raised:#2c2c2e;--wui-color-surface-control:#3a3a3c;--wui-color-surface-track:#444446;--wui-color-surface-menu:#313032bd;--wui-color-surface-glass:#2c2c2e6b;--wui-color-surface-glass-hover:color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));--wui-color-surface-glass-active:color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));--wui-color-surface-overlay:#202222eb;--wui-color-surface-sidebar:#2c2c2ecc;--wui-color-surface-segmented:#3a3a3c;--wui-color-surface-segmented-track:#17191a;--wui-color-surface-selected:#242628;--wui-color-text:#e9eaea;--wui-color-text-secondary:#a1a1a6;--wui-color-text-tertiary:color-mix(in srgb, var(--wui-color-text) 42%, transparent);--wui-color-text-disabled:color-mix(in srgb, var(--wui-color-text) 38%, transparent);--wui-color-state-layer-hover:color-mix(in srgb, var(--wui-color-text) 6%, transparent);--wui-color-state-layer-active:color-mix(in srgb, var(--wui-color-text) 15%, transparent);--wui-color-border:#ffffff24;--wui-color-glass-highlight:#ffffff1a;--wui-color-glass-ring:#ffffff0d;--wui-color-glass-ring-sheen:#fff3;--wui-color-glass-ring-shade:#00000080;--wui-glass-brightness:1.02;--wui-color-accent:#0a84ff;--wui-color-on-accent:#000;--wui-color-on-danger:#000;--wui-color-on-control:#f2f2f7;--wui-color-success:#30d158;--wui-color-warning:#ff9f0a;--wui-color-danger:#ff453a;--wui-color-info:#64d2ff;--wui-color-backdrop:#0000007a;--wui-shadow-overlay:0 18px 48px #0000007a;--wui-shadow-panel:0 4px 16px #00000052;--wui-shadow-glass:0 8px 24px #00000014;--wui-color-focus-ring:color-mix(in srgb, var(--wui-color-accent,#0a84ff) 62%, var(--wui-color-text) 38%);--wui-scrollbar-handle:#ffffff80;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}@media (prefers-color-scheme:dark){:host([appearance=system]){--wui-color-page:#242628;--wui-color-surface:#2c2c2e;--wui-color-surface-raised:#2c2c2e;--wui-color-surface-control:#3a3a3c;--wui-color-surface-track:#444446;--wui-color-surface-menu:#313032bd;--wui-color-surface-glass:#2c2c2e6b;--wui-color-surface-glass-hover:color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));--wui-color-surface-glass-active:color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));--wui-color-surface-overlay:#202222eb;--wui-color-surface-sidebar:#2c2c2ecc;--wui-color-surface-segmented:#3a3a3c;--wui-color-surface-segmented-track:#17191a;--wui-color-surface-selected:#242628;--wui-color-text:#e9eaea;--wui-color-text-secondary:#a1a1a6;--wui-color-text-tertiary:color-mix(in srgb, var(--wui-color-text) 42%, transparent);--wui-color-text-disabled:color-mix(in srgb, var(--wui-color-text) 38%, transparent);--wui-color-state-layer-hover:color-mix(in srgb, var(--wui-color-text) 6%, transparent);--wui-color-state-layer-active:color-mix(in srgb, var(--wui-color-text) 15%, transparent);--wui-color-border:#ffffff24;--wui-color-glass-highlight:#ffffff1a;--wui-color-glass-ring:#ffffff0d;--wui-color-glass-ring-sheen:#fff3;--wui-color-glass-ring-shade:#00000080;--wui-glass-brightness:1.02;--wui-color-accent:#0a84ff;--wui-color-on-accent:#000;--wui-color-on-danger:#000;--wui-color-on-control:#f2f2f7;--wui-color-success:#30d158;--wui-color-warning:#ff9f0a;--wui-color-danger:#ff453a;--wui-color-info:#64d2ff;--wui-color-backdrop:#0000007a;--wui-shadow-overlay:0 18px 48px #0000007a;--wui-shadow-panel:0 4px 16px #00000052;--wui-shadow-glass:0 8px 24px #00000014;--wui-color-focus-ring:color-mix(in srgb, var(--wui-color-accent,#0a84ff) 62%, var(--wui-color-text) 38%);--wui-scrollbar-handle:#ffffff80;--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark}}\n";
3
3
  export { style_default as default };
4
4
 
5
5
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/theme/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n /*\n * 排版族:按角色命名,不引入数字阶(与 §6.3 的 radius 决策同构——名字回答\n * 「这块文字是什么」,不回答「它是第几号」)。\n *\n * 字号四档,各自对应一个真实角色而非尺寸偏好:\n * caption 12px 密集 chrome label(badge、toast 时间戳、menu 分组头)\n * readout 13px 数字读数(image-preview 计数与缩放比,带 tabular-nums;\n * 13px 是承重的——它要装进 min-width:48px 的胶囊)\n * 14px 正文基准,即下面的 --wui-font-size\n * title 18px 有界卡片标题(dialog、drawer)\n *\n * 行高同理分四档。组件里的 line-height:1 与 0 刻意不 token 化:前者是控件内\n * 单行 label 的垂直居中手段,后者是让包裹盒高收缩到内容的技巧,两者都不是\n * 排版行高,token 化会误导后来者以为可以整体调它们。\n */\n --wui-font-size-caption: 12px;\n --wui-font-size-readout: 13px;\n --wui-font-size: 14px;\n --wui-font-size-title: 18px;\n --wui-font-weight-medium: 500;\n --wui-font-weight-semibold: 600;\n --wui-line-height-tight: 1.2;\n --wui-line-height-snug: 1.4;\n --wui-line-height-normal: 1.5;\n --wui-line-height-relaxed: 1.6;\n\n /*\n * 间距阶:4px 基准的 6 级,止于组件层以生效的静态节奏字面量写入的最大值 24px(唯一更宽的\n * empty padding 由 --wui-empty-size 在 JS 侧派生,属尺寸那根轴)。它不替代组件的\n * 局部覆盖 token(--wui-button-px、--wui-dialog-padding 等),而是充当那些\n * token 的 fallback 默认值——组件继续决定「我的 padding 是多少」,本族提供\n * 「这个值在整套尺度里的位置」,嵌入方因此拿到一个全局密度杠杆。\n *\n * 本族刻意不含 1px / 2px / 6px / 7.5px / 10px 与负值。1px 是发丝线与描边环的\n * 结构宽度;2px、6px、7.5px 是光学修正;10px 是 4px 阶之外的半档耦合值;负\n * margin 用来抵消 flex gap 或 button padding。它们都是「为什么是这个数」各自独立\n * 的答案,不共享「间距」语义,收进同一把尺子只会让覆盖其中之一时误伤其余。\n */\n --wui-space-1: 4px;\n --wui-space-2: 8px;\n --wui-space-3: 12px;\n --wui-space-4: 16px;\n --wui-space-5: 20px;\n --wui-space-6: 24px;\n\n --wui-input-width: 200px;\n --wui-control-size: 36px;\n --wui-overlay-min-width: 200px;\n\n /* radio / checkbox indicator 尺寸。宿主高度由内容撑开,不继承页面行高。 */\n --wui-selection-control-size: 18px;\n\n /* radio-group / checkbox-group 成员间距,两个 group 各自可覆盖。 */\n --wui-radio-group-gap: var(--wui-space-2);\n --wui-checkbox-group-gap: var(--wui-space-2);\n\n --wui-layer-inline-overlay: 1;\n --wui-layer-header: 10;\n --wui-layer-auxiliary: 20;\n --wui-layer-banner: 30;\n --wui-layer-tabbar: 40;\n --wui-layer-sidebar: 50;\n\n --wui-layer-menu: 100;\n --wui-layer-menu-nested: 110;\n --wui-layer-toast: 200;\n --wui-layer-loading: 300;\n --wui-duration-press: 80ms;\n --wui-duration-feedback: 100ms;\n --wui-duration-trigger: 160ms;\n --wui-duration-focus: 200ms;\n\n /* 锚定浮动 panel(menu/popover/select/dropdown/tooltip/autocomplete)的进场与退场时长,\n 出场快于入场。 */\n --wui-duration-float-enter: 240ms;\n --wui-duration-float-exit: 160ms;\n --wui-duration-dialog-enter: 320ms;\n --wui-duration-dialog-exit: 260ms;\n --wui-duration-drawer-enter: 280ms;\n --wui-duration-drawer-exit: 240ms;\n --wui-duration-drawer-nested: 450ms;\n --wui-duration-toast-enter: 280ms;\n --wui-duration-toast-exit: 200ms;\n --wui-duration-collapse-enter: 200ms;\n --wui-duration-collapse-exit: 160ms;\n --wui-duration-layout: 200ms;\n\n /* image-preview 轮播回位:跟手结束后把 track 过渡到目标位。不属于进出场族,故单独成 token。 */\n --wui-duration-swipe-settle: 220ms;\n\n /* 无限循环的加载指示:icon 旋转与 spinner 叶片追光。周期属于动画自身而非转场,\n 但同样受 motion 契约约束,reduce 下只放慢不停。 */\n --wui-duration-spin: 600ms;\n --wui-duration-spinner: 800ms;\n --wui-theme-transition-duration: 500ms;\n --wui-theme-transition-easing: ease-in;\n\n --wui-ease-enter: cubic-bezier(0.23, 1, 0.32, 1);\n --wui-ease-dialog: cubic-bezier(0.2, 0, 0, 1);\n --wui-ease-slide: cubic-bezier(0.77, 0, 0.175, 1);\n\n /* 轮播回位的缓动:起步快、末段极慢,与 --wui-ease-slide(整卡位移)区分开。 */\n --wui-ease-swipe: cubic-bezier(0.32, 0.72, 0, 1);\n\n /* 锚定浮动 panel 专属进场缓动,无回弹弹簧拟合曲线。若改用 --wui-ease-enter,\n 开局 30% 的时间就走完 85% 进度,观感是先弹出再落位。 */\n --wui-ease-float: cubic-bezier(0.4, 0.38, 0.2, 1);\n\n /* 进场缩放起点。两族方向相反,各自成 token:浮动 panel 与 image-preview 由小到大展开\n (0.9 → 1),dialog 由大到小收缩(1.1 → 1,退场反向)。\n 方向由承载层决定。image-preview 是满视口表面,起点 >1 会把贴边的 counter/close/\n toolbar 推出视口并裁掉图片四边,只能留在 <1 的档位。dialog 是有界卡片,起点须低于\n 零越界上限 1/0.9 ≈ 1.111(min(90vw, --wui-dialog-width) 两分支在 400px 视口汇合);\n 1.1 在任意视口都不越界;起点再高(1.2)就会在窄视口短暂越界(约 57ms、卡片不透明度 ≤44.4%,\n 分析见 ADR-0006)。 */\n --wui-scale-enter: 0.9;\n --wui-dialog-scale-enter: 1.1;\n --wui-focus-ring-width: 3px;\n\n /* control=胶囊控件、menu=浮动 menu panel、overlay=大型覆盖层卡片 */\n --wui-radius-control: calc(infinity * 1px);\n --wui-radius-menu: 18px;\n --wui-radius-overlay: 28px;\n\n /* contents:主题宿主不生成盒、不绘制页面背景,嵌入方保留对宿主背景的完全控制\n (组件库不在宿主页面画背景)。自定义属性仍沿 DOM 树正常继承到 slotted 内容。 */\n display: contents;\n}\n\n:host([motion='reduced']) {\n --wui-duration-press: 0ms;\n --wui-duration-feedback: 0ms;\n --wui-duration-trigger: 0ms;\n --wui-duration-focus: 0ms;\n --wui-duration-float-enter: 0ms;\n --wui-duration-float-exit: 0ms;\n --wui-duration-dialog-enter: 0ms;\n --wui-duration-dialog-exit: 0ms;\n --wui-duration-drawer-enter: 0ms;\n --wui-duration-drawer-exit: 0ms;\n --wui-duration-drawer-nested: 0ms;\n --wui-duration-toast-enter: 0ms;\n --wui-duration-toast-exit: 0ms;\n --wui-duration-collapse-enter: 0ms;\n --wui-duration-collapse-exit: 0ms;\n --wui-duration-layout: 0ms;\n --wui-duration-swipe-settle: 0ms;\n --wui-theme-transition-duration: 0ms;\n\n /* 加载循环不在 reduce 下归零:它是「正在进行」的唯一信号,停掉会被读成界面卡死,只放慢。 */\n --wui-duration-spin: 1600ms;\n --wui-duration-spinner: 1600ms;\n\n --wui-scale-enter: 1;\n --wui-dialog-scale-enter: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host([motion='system']) {\n --wui-duration-press: 0ms;\n --wui-duration-feedback: 0ms;\n --wui-duration-trigger: 0ms;\n --wui-duration-focus: 0ms;\n --wui-duration-float-enter: 0ms;\n --wui-duration-float-exit: 0ms;\n --wui-duration-dialog-enter: 0ms;\n --wui-duration-dialog-exit: 0ms;\n --wui-duration-drawer-enter: 0ms;\n --wui-duration-drawer-exit: 0ms;\n --wui-duration-drawer-nested: 0ms;\n --wui-duration-toast-enter: 0ms;\n --wui-duration-toast-exit: 0ms;\n --wui-duration-collapse-enter: 0ms;\n --wui-duration-collapse-exit: 0ms;\n --wui-duration-layout: 0ms;\n --wui-duration-swipe-settle: 0ms;\n --wui-theme-transition-duration: 0ms;\n\n /* 加载循环不在 reduce 下归零:它是「正在进行」的唯一信号,停掉会被读成界面卡死,只放慢。 */\n --wui-duration-spin: 1600ms;\n --wui-duration-spinner: 1600ms;\n\n --wui-scale-enter: 1;\n --wui-dialog-scale-enter: 1;\n }\n}\n\n:host([appearance='light']),\n:host([appearance='system']) {\n --wui-color-page: #fff;\n --wui-color-surface: #fff;\n --wui-color-surface-raised: #f2f2f7;\n --wui-color-surface-control: #dfdfdf;\n --wui-color-surface-track: #e5e5ea;\n --wui-color-surface-menu: rgb(250 250 250 / 0.76);\n --wui-color-surface-glass: rgb(250 250 250 / 0.34);\n --wui-color-surface-glass-hover: color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));\n --wui-color-surface-glass-active: color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));\n --wui-color-surface-overlay: rgb(248 248 248 / 0.92);\n\n /* 侧边栏专用表面:浅色保持中性分层,深色单独抬升一档(见下方 dark 块注释)。 */\n --wui-color-surface-sidebar: rgb(233 233 233 / 0.82);\n\n /* 凹变种 indicator 与中性可交互控件同面:浅色与深色的默认值都取 control(= secondary button 的面)。\n 凸变种那颗另走一条等式(chip 与 page 同色、track 沉到 page 之下),规则见 segmented/style.css。 */\n --wui-color-surface-segmented: #dfdfdf;\n --wui-color-surface-segmented-track: #e5e5ea;\n --wui-color-surface-selected: #fff;\n --wui-color-text: #1b1b1b;\n --wui-color-text-secondary: #6a6a6a;\n --wui-color-text-tertiary: color-mix(in srgb, var(--wui-color-text) 35%, transparent);\n --wui-color-text-disabled: color-mix(in srgb, var(--wui-color-text) 32%, transparent);\n --wui-color-state-layer-hover: color-mix(in srgb, var(--wui-color-text) 6%, transparent);\n --wui-color-state-layer-active: color-mix(in srgb, var(--wui-color-text) 15%, transparent);\n --wui-color-border: rgb(0 0 0 / 0.1);\n\n /*\n * 玻璃色按「绘制在哪一层」分组,两个前缀对应两个互不相干的层:\n *\n * glass-highlight → 元素自身的 box-shadow inset 高光(不是描边环的一部分)\n * glass-ring-* → ::before 用 mask 挖出来的 1px 描边环,共三枚:\n * ring 是铺满整圈的底色,ring-sheen / ring-shade 是其上\n * 两枚对角 radial,只覆盖四个角\n *\n * 底色必须存在:四枚 radial 都锚在角点且半径固定(sheen 2R、shade R),一条边\n * 长过约 3R 就有一段落在所有 radial 之外,只靠 radial 时那段会整段消失。\n */\n --wui-color-glass-highlight: rgb(255 255 255 / 0.9);\n --wui-color-glass-ring: rgb(0 0 0 / 0.05);\n --wui-color-glass-ring-sheen: rgb(255 255 255 / 0.5);\n --wui-color-glass-ring-shade: rgb(0 0 0 / 0.03);\n --wui-glass-brightness: 1.06;\n --wui-color-accent: #0071e3;\n --wui-color-on-accent: #fff;\n --wui-color-on-danger: #fff;\n --wui-color-on-control: #fff;\n --wui-color-success: #16a34a;\n --wui-color-warning: #d97706;\n --wui-color-danger: #dc2626;\n --wui-color-info: #2563eb;\n --wui-color-backdrop: rgb(0 0 0 / 0.12);\n --wui-shadow-overlay: 2px 16px 40px rgb(0 0 0 / 0.4);\n --wui-shadow-panel: 0 3px 9px rgb(0 0 0 / 0.27);\n --wui-shadow-glass:\n 0 0 1px rgb(0 0 0 / 0.02), 0 0 8px rgb(0 0 0 / 0.03), 0 2px 16px rgb(0 0 0 / 0.025), 0 8px 32px rgb(0 0 0 / 0.015);\n --wui-color-focus-ring: color-mix(in srgb, var(--wui-color-accent, #0071e3) 40%, transparent);\n --wui-scrollbar-handle: rgb(0 0 0 / 0.39);\n color-scheme: light;\n}\n\n:host([appearance='dark']) {\n --wui-color-page: #242628;\n --wui-color-surface: #2c2c2e;\n --wui-color-surface-raised: #2c2c2e;\n --wui-color-surface-control: #3a3a3c;\n --wui-color-surface-track: #444446;\n --wui-color-surface-menu: rgb(49 48 50 / 0.74);\n --wui-color-surface-glass: rgb(44 44 46 / 0.42);\n --wui-color-surface-glass-hover: color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));\n --wui-color-surface-glass-active: color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));\n --wui-color-surface-overlay: rgb(32 34 34 / 0.92);\n\n /* 深色 elevation:浮动 panel 与侧边栏都比 page 浅一档。取 --wui-color-surface\n (#2c2c2e)作为「page 之上一档」的基准色,panel 按自身 alpha 叠在 page 上,\n 合成结果约 rgb(46 45 47),与 #2c2c2e 相差不超过 2/255。\n alpha 不取 0.92/0.9:颜色抬升后高 alpha 会让 panel 读成实心纸片,\n 取 0.74/0.8 才保留透感(模糊底内容可透出),层级方向不变。\n overlay 是唯一的例外:dialog/drawer/toast 背后的内容是被遮住的主体内容,\n 透过去会与 overlay 自身文字叠出干扰读的对比,因此单独抬到 0.92 换取可读性,\n 代价是失去透感——它本来也不属于「panel 透出 page」的层级语义。 */\n --wui-color-surface-sidebar: rgb(44 44 46 / 0.8);\n\n /* Segmented 的深色两档。凸变种(raised)复刻浅色那条「indicator 与 page 同色、track 沉一档」的\n 关系:浅色是 chip #fff(= page)浮在 #e5e5ea 上,深色 page(#242628)本来就是阶梯最暗的一档,\n 所以要让 chip 取到 page 色,只能把 track 再往下开一档到 #17191a(比 page 暗 13~14/255,与该主题\n 往上走的档差同量级:page→surface +6~+8、surface→control +14、control→track +10)。凸起方向仍由\n 「chip 比 track 亮」读出,WCAG 亮度比 1.16:1,与浅色的 1.26:1 同量级,不会盖过柔投影。\n 凹变种(inset)不参与:它的语义是「按下去的灰面」,track 取 surface(#2c2c2e)、indicator 取\n control(#3a3a3c,与浅色那颗同档),与 page 同色反而读不出选中。 */\n --wui-color-surface-segmented: #3a3a3c;\n --wui-color-surface-segmented-track: #17191a;\n --wui-color-surface-selected: #242628;\n --wui-color-text: #e9eaea;\n --wui-color-text-secondary: #a1a1a6;\n --wui-color-text-tertiary: color-mix(in srgb, var(--wui-color-text) 42%, transparent);\n --wui-color-text-disabled: color-mix(in srgb, var(--wui-color-text) 38%, transparent);\n --wui-color-state-layer-hover: color-mix(in srgb, var(--wui-color-text) 6%, transparent);\n --wui-color-state-layer-active: color-mix(in srgb, var(--wui-color-text) 15%, transparent);\n --wui-color-border: rgb(255 255 255 / 0.14);\n --wui-color-glass-highlight: rgb(255 255 255 / 0.1);\n --wui-color-glass-ring: rgb(255 255 255 / 0.05);\n --wui-color-glass-ring-sheen: rgb(255 255 255 / 0.2);\n --wui-color-glass-ring-shade: rgb(0 0 0 / 0.5);\n --wui-glass-brightness: 1.02;\n --wui-color-accent: #0a84ff;\n --wui-color-on-accent: #000;\n --wui-color-on-danger: #000;\n --wui-color-on-control: #f2f2f7;\n --wui-color-success: #30d158;\n --wui-color-warning: #ff9f0a;\n --wui-color-danger: #ff453a;\n --wui-color-info: #64d2ff;\n --wui-color-backdrop: rgb(0 0 0 / 0.48);\n --wui-shadow-overlay: 0 18px 48px rgb(0 0 0 / 0.48);\n --wui-shadow-panel: 0 4px 16px rgb(0 0 0 / 0.32);\n --wui-shadow-glass: 0 8px 24px rgb(0 0 0 / 0.08);\n --wui-color-focus-ring: color-mix(in srgb, var(--wui-color-accent, #0a84ff) 62%, var(--wui-color-text) 38%);\n --wui-scrollbar-handle: rgb(255 255 255 / 0.5);\n color-scheme: dark;\n}\n\n@media (prefers-color-scheme: dark) {\n :host([appearance='system']) {\n --wui-color-page: #242628;\n --wui-color-surface: #2c2c2e;\n --wui-color-surface-raised: #2c2c2e;\n --wui-color-surface-control: #3a3a3c;\n --wui-color-surface-track: #444446;\n --wui-color-surface-menu: rgb(49 48 50 / 0.74);\n --wui-color-surface-glass: rgb(44 44 46 / 0.42);\n --wui-color-surface-glass-hover: color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));\n --wui-color-surface-glass-active: color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));\n --wui-color-surface-overlay: rgb(32 34 34 / 0.92);\n --wui-color-surface-sidebar: rgb(44 44 46 / 0.8);\n --wui-color-surface-segmented: #3a3a3c;\n --wui-color-surface-segmented-track: #17191a;\n --wui-color-surface-selected: #242628;\n --wui-color-text: #e9eaea;\n --wui-color-text-secondary: #a1a1a6;\n --wui-color-text-tertiary: color-mix(in srgb, var(--wui-color-text) 42%, transparent);\n --wui-color-text-disabled: color-mix(in srgb, var(--wui-color-text) 38%, transparent);\n --wui-color-state-layer-hover: color-mix(in srgb, var(--wui-color-text) 6%, transparent);\n --wui-color-state-layer-active: color-mix(in srgb, var(--wui-color-text) 15%, transparent);\n --wui-color-border: rgb(255 255 255 / 0.14);\n --wui-color-glass-highlight: rgb(255 255 255 / 0.1);\n --wui-color-glass-ring: rgb(255 255 255 / 0.05);\n --wui-color-glass-ring-sheen: rgb(255 255 255 / 0.2);\n --wui-color-glass-ring-shade: rgb(0 0 0 / 0.5);\n --wui-glass-brightness: 1.02;\n --wui-color-accent: #0a84ff;\n --wui-color-on-accent: #000;\n --wui-color-on-danger: #000;\n --wui-color-on-control: #f2f2f7;\n --wui-color-success: #30d158;\n --wui-color-warning: #ff9f0a;\n --wui-color-danger: #ff453a;\n --wui-color-info: #64d2ff;\n --wui-color-backdrop: rgb(0 0 0 / 0.48);\n --wui-shadow-overlay: 0 18px 48px rgb(0 0 0 / 0.48);\n --wui-shadow-panel: 0 4px 16px rgb(0 0 0 / 0.32);\n --wui-shadow-glass: 0 8px 24px rgb(0 0 0 / 0.08);\n --wui-color-focus-ring: color-mix(in srgb, var(--wui-color-accent, #0a84ff) 62%, var(--wui-color-text) 38%);\n --wui-scrollbar-handle: rgb(255 255 255 / 0.5);\n color-scheme: dark;\n }\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/theme/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n /*\n * 排版族:按角色命名,不引入数字阶(与 §6.3 的 radius 决策同构——名字回答\n * 「这块文字是什么」,不回答「它是第几号」)。\n *\n * 字号四档,各自对应一个真实角色而非尺寸偏好:\n * caption 12px 密集 chrome label(badge、toast 时间戳、menu 分组头)\n * readout 13px 数字读数(image-preview 计数与缩放比,带 tabular-nums;\n * 13px 是承重的——它要装进 min-width:48px 的胶囊)\n * 14px 正文基准,即下面的 --wui-font-size\n * title 18px 有界卡片标题(dialog、drawer)\n *\n * 行高同理分四档。组件里的 line-height:1 与 0 刻意不 token 化:前者是控件内\n * 单行 label 的垂直居中手段,后者是让包裹盒高收缩到内容的技巧,两者都不是\n * 排版行高,token 化会误导后来者以为可以整体调它们。\n */\n --wui-font-size-caption: 12px;\n --wui-font-size-readout: 13px;\n --wui-font-size: 14px;\n --wui-font-size-title: 18px;\n --wui-font-weight-medium: 500;\n --wui-font-weight-semibold: 600;\n --wui-line-height-tight: 1.2;\n --wui-line-height-snug: 1.4;\n --wui-line-height-normal: 1.5;\n --wui-line-height-relaxed: 1.6;\n\n /*\n * 间距阶:4px 基准的 6 级,止于组件层以生效的静态节奏字面量写入的最大值 24px(唯一更宽的\n * empty padding 由 --wui-empty-size 在 JS 侧派生,属尺寸那根轴)。它不替代组件的\n * 局部覆盖 token(--wui-button-px、--wui-dialog-padding 等),而是充当那些\n * token 的 fallback 默认值——组件继续决定「我的 padding 是多少」,本族提供\n * 「这个值在整套尺度里的位置」,嵌入方因此拿到一个全局密度杠杆。\n *\n * 本族刻意不含 1px / 2px / 6px / 7.5px / 10px 与负值。1px 是发丝线与描边环的\n * 结构宽度;2px、6px、7.5px 是光学修正;10px 是 4px 阶之外的半档耦合值;负\n * margin 用来抵消 flex gap 或 button padding。它们都是「为什么是这个数」各自独立\n * 的答案,不共享「间距」语义,收进同一把尺子只会让覆盖其中之一时误伤其余。\n */\n --wui-space-1: 4px;\n --wui-space-2: 8px;\n --wui-space-3: 12px;\n --wui-space-4: 16px;\n --wui-space-5: 20px;\n --wui-space-6: 24px;\n\n --wui-input-width: 200px;\n --wui-control-size: 36px;\n --wui-overlay-min-width: 200px;\n\n /* radio / checkbox indicator 尺寸。宿主高度由内容撑开,不继承页面行高。 */\n --wui-selection-control-size: 18px;\n\n /* radio-group / checkbox-group 成员间距,两个 group 各自可覆盖。 */\n --wui-radio-group-gap: var(--wui-space-2);\n --wui-checkbox-group-gap: var(--wui-space-2);\n\n /*\n * 层级 token 按十位递进:布局层占 10–500,浮动层从 1000 起。应用内容里的局部\n * z-index 保持两位数量级,就不会越过 layout 的 header / sidebar。\n */\n --wui-layer-inline-overlay: 10;\n --wui-layer-header: 100;\n --wui-layer-auxiliary: 200;\n --wui-layer-banner: 300;\n --wui-layer-tabbar: 400;\n --wui-layer-sidebar: 500;\n\n --wui-layer-menu: 1000;\n --wui-layer-menu-nested: 1100;\n --wui-layer-toast: 2000;\n --wui-layer-loading: 3000;\n --wui-duration-press: 80ms;\n --wui-duration-feedback: 100ms;\n --wui-duration-trigger: 160ms;\n --wui-duration-focus: 200ms;\n\n /* 锚定浮动 panel(menu/popover/select/dropdown/tooltip/autocomplete)的进场与退场时长,\n 出场快于入场。 */\n --wui-duration-float-enter: 240ms;\n --wui-duration-float-exit: 160ms;\n --wui-duration-dialog-enter: 320ms;\n --wui-duration-dialog-exit: 260ms;\n --wui-duration-drawer-enter: 280ms;\n --wui-duration-drawer-exit: 240ms;\n --wui-duration-drawer-nested: 450ms;\n --wui-duration-toast-enter: 280ms;\n --wui-duration-toast-exit: 200ms;\n --wui-duration-collapse-enter: 200ms;\n --wui-duration-collapse-exit: 160ms;\n --wui-duration-layout: 200ms;\n\n /* image-preview 轮播回位:跟手结束后把 track 过渡到目标位。不属于进出场族,故单独成 token。 */\n --wui-duration-swipe-settle: 220ms;\n\n /* 无限循环的加载指示:icon 旋转与 spinner 叶片追光。周期属于动画自身而非转场,\n 但同样受 motion 契约约束,reduce 下只放慢不停。 */\n --wui-duration-spin: 600ms;\n --wui-duration-spinner: 800ms;\n --wui-theme-transition-duration: 500ms;\n --wui-theme-transition-easing: ease-in;\n\n --wui-ease-enter: cubic-bezier(0.23, 1, 0.32, 1);\n --wui-ease-dialog: cubic-bezier(0.2, 0, 0, 1);\n --wui-ease-slide: cubic-bezier(0.77, 0, 0.175, 1);\n\n /* 轮播回位的缓动:起步快、末段极慢,与 --wui-ease-slide(整卡位移)区分开。 */\n --wui-ease-swipe: cubic-bezier(0.32, 0.72, 0, 1);\n\n /* 锚定浮动 panel 专属进场缓动,无回弹弹簧拟合曲线。若改用 --wui-ease-enter,\n 开局 30% 的时间就走完 85% 进度,观感是先弹出再落位。 */\n --wui-ease-float: cubic-bezier(0.4, 0.38, 0.2, 1);\n\n /* 进场缩放起点。两族方向相反,各自成 token:浮动 panel 与 image-preview 由小到大展开\n (0.9 → 1),dialog 由大到小收缩(1.1 → 1,退场反向)。\n 方向由承载层决定。image-preview 是满视口表面,起点 >1 会把贴边的 counter/close/\n toolbar 推出视口并裁掉图片四边,只能留在 <1 的档位。dialog 是有界卡片,起点须低于\n 零越界上限 1/0.9 ≈ 1.111(min(90vw, --wui-dialog-width) 两分支在 400px 视口汇合);\n 1.1 在任意视口都不越界;起点再高(1.2)就会在窄视口短暂越界(约 57ms、卡片不透明度 ≤44.4%,\n 分析见 ADR-0006)。 */\n --wui-scale-enter: 0.9;\n --wui-dialog-scale-enter: 1.1;\n --wui-focus-ring-width: 3px;\n\n /* control=胶囊控件、menu=浮动 menu panel、overlay=大型覆盖层卡片 */\n --wui-radius-control: calc(infinity * 1px);\n --wui-radius-menu: 18px;\n --wui-radius-overlay: 28px;\n\n /* contents:主题宿主不生成盒、不绘制页面背景,嵌入方保留对宿主背景的完全控制\n (组件库不在宿主页面画背景)。自定义属性仍沿 DOM 树正常继承到 slotted 内容。 */\n display: contents;\n}\n\n:host([motion='reduced']) {\n --wui-duration-press: 0ms;\n --wui-duration-feedback: 0ms;\n --wui-duration-trigger: 0ms;\n --wui-duration-focus: 0ms;\n --wui-duration-float-enter: 0ms;\n --wui-duration-float-exit: 0ms;\n --wui-duration-dialog-enter: 0ms;\n --wui-duration-dialog-exit: 0ms;\n --wui-duration-drawer-enter: 0ms;\n --wui-duration-drawer-exit: 0ms;\n --wui-duration-drawer-nested: 0ms;\n --wui-duration-toast-enter: 0ms;\n --wui-duration-toast-exit: 0ms;\n --wui-duration-collapse-enter: 0ms;\n --wui-duration-collapse-exit: 0ms;\n --wui-duration-layout: 0ms;\n --wui-duration-swipe-settle: 0ms;\n --wui-theme-transition-duration: 0ms;\n\n /* 加载循环不在 reduce 下归零:它是「正在进行」的唯一信号,停掉会被读成界面卡死,只放慢。 */\n --wui-duration-spin: 1600ms;\n --wui-duration-spinner: 1600ms;\n\n --wui-scale-enter: 1;\n --wui-dialog-scale-enter: 1;\n}\n\n@media (prefers-reduced-motion: reduce) {\n :host([motion='system']) {\n --wui-duration-press: 0ms;\n --wui-duration-feedback: 0ms;\n --wui-duration-trigger: 0ms;\n --wui-duration-focus: 0ms;\n --wui-duration-float-enter: 0ms;\n --wui-duration-float-exit: 0ms;\n --wui-duration-dialog-enter: 0ms;\n --wui-duration-dialog-exit: 0ms;\n --wui-duration-drawer-enter: 0ms;\n --wui-duration-drawer-exit: 0ms;\n --wui-duration-drawer-nested: 0ms;\n --wui-duration-toast-enter: 0ms;\n --wui-duration-toast-exit: 0ms;\n --wui-duration-collapse-enter: 0ms;\n --wui-duration-collapse-exit: 0ms;\n --wui-duration-layout: 0ms;\n --wui-duration-swipe-settle: 0ms;\n --wui-theme-transition-duration: 0ms;\n\n /* 加载循环不在 reduce 下归零:它是「正在进行」的唯一信号,停掉会被读成界面卡死,只放慢。 */\n --wui-duration-spin: 1600ms;\n --wui-duration-spinner: 1600ms;\n\n --wui-scale-enter: 1;\n --wui-dialog-scale-enter: 1;\n }\n}\n\n:host([appearance='light']),\n:host([appearance='system']) {\n --wui-color-page: #fff;\n --wui-color-surface: #fff;\n --wui-color-surface-raised: #f2f2f7;\n --wui-color-surface-control: #dfdfdf;\n --wui-color-surface-track: #e5e5ea;\n --wui-color-surface-menu: rgb(250 250 250 / 0.76);\n --wui-color-surface-glass: rgb(250 250 250 / 0.34);\n --wui-color-surface-glass-hover: color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));\n --wui-color-surface-glass-active: color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));\n --wui-color-surface-overlay: rgb(248 248 248 / 0.92);\n\n /* 侧边栏专用表面:浅色保持中性分层,深色单独抬升一档(见下方 dark 块注释)。 */\n --wui-color-surface-sidebar: rgb(233 233 233 / 0.82);\n\n /* 凹变种 indicator 与中性可交互控件同面:浅色与深色的默认值都取 control(= secondary button 的面)。\n 凸变种那颗另走一条等式(chip 与 page 同色、track 沉到 page 之下),规则见 segmented/style.css。 */\n --wui-color-surface-segmented: #dfdfdf;\n --wui-color-surface-segmented-track: #e5e5ea;\n --wui-color-surface-selected: #fff;\n --wui-color-text: #1b1b1b;\n --wui-color-text-secondary: #6a6a6a;\n --wui-color-text-tertiary: color-mix(in srgb, var(--wui-color-text) 35%, transparent);\n --wui-color-text-disabled: color-mix(in srgb, var(--wui-color-text) 32%, transparent);\n --wui-color-state-layer-hover: color-mix(in srgb, var(--wui-color-text) 6%, transparent);\n --wui-color-state-layer-active: color-mix(in srgb, var(--wui-color-text) 15%, transparent);\n --wui-color-border: rgb(0 0 0 / 0.1);\n\n /*\n * 玻璃色按「绘制在哪一层」分组,两个前缀对应两个互不相干的层:\n *\n * glass-highlight → 元素自身的 box-shadow inset 高光(不是描边环的一部分)\n * glass-ring-* → ::before 用 mask 挖出来的 1px 描边环,共三枚:\n * ring 是铺满整圈的底色,ring-sheen / ring-shade 是其上\n * 两枚对角 radial,只覆盖四个角\n *\n * 底色必须存在:四枚 radial 都锚在角点且半径固定(sheen 2R、shade R),一条边\n * 长过约 3R 就有一段落在所有 radial 之外,只靠 radial 时那段会整段消失。\n */\n --wui-color-glass-highlight: rgb(255 255 255 / 0.9);\n --wui-color-glass-ring: rgb(0 0 0 / 0.05);\n --wui-color-glass-ring-sheen: rgb(255 255 255 / 0.5);\n --wui-color-glass-ring-shade: rgb(0 0 0 / 0.03);\n --wui-glass-brightness: 1.06;\n --wui-color-accent: #0071e3;\n --wui-color-on-accent: #fff;\n --wui-color-on-danger: #fff;\n --wui-color-on-control: #fff;\n --wui-color-success: #16a34a;\n --wui-color-warning: #d97706;\n --wui-color-danger: #dc2626;\n --wui-color-info: #2563eb;\n --wui-color-backdrop: rgb(0 0 0 / 0.12);\n --wui-shadow-overlay: 2px 16px 40px rgb(0 0 0 / 0.4);\n --wui-shadow-panel: 0 3px 9px rgb(0 0 0 / 0.27);\n --wui-shadow-glass:\n 0 0 1px rgb(0 0 0 / 0.02), 0 0 8px rgb(0 0 0 / 0.03), 0 2px 16px rgb(0 0 0 / 0.025), 0 8px 32px rgb(0 0 0 / 0.015);\n --wui-color-focus-ring: color-mix(in srgb, var(--wui-color-accent, #0071e3) 40%, transparent);\n --wui-scrollbar-handle: rgb(0 0 0 / 0.39);\n color-scheme: light;\n}\n\n:host([appearance='dark']) {\n --wui-color-page: #242628;\n --wui-color-surface: #2c2c2e;\n --wui-color-surface-raised: #2c2c2e;\n --wui-color-surface-control: #3a3a3c;\n --wui-color-surface-track: #444446;\n --wui-color-surface-menu: rgb(49 48 50 / 0.74);\n --wui-color-surface-glass: rgb(44 44 46 / 0.42);\n --wui-color-surface-glass-hover: color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));\n --wui-color-surface-glass-active: color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));\n --wui-color-surface-overlay: rgb(32 34 34 / 0.92);\n\n /* 深色 elevation:浮动 panel 与侧边栏都比 page 浅一档。取 --wui-color-surface\n (#2c2c2e)作为「page 之上一档」的基准色,panel 按自身 alpha 叠在 page 上,\n 合成结果约 rgb(46 45 47),与 #2c2c2e 相差不超过 2/255。\n alpha 不取 0.92/0.9:颜色抬升后高 alpha 会让 panel 读成实心纸片,\n 取 0.74/0.8 才保留透感(模糊底内容可透出),层级方向不变。\n overlay 是唯一的例外:dialog/drawer/toast 背后的内容是被遮住的主体内容,\n 透过去会与 overlay 自身文字叠出干扰读的对比,因此单独抬到 0.92 换取可读性,\n 代价是失去透感——它本来也不属于「panel 透出 page」的层级语义。 */\n --wui-color-surface-sidebar: rgb(44 44 46 / 0.8);\n\n /* Segmented 的深色两档。凸变种(raised)复刻浅色那条「indicator 与 page 同色、track 沉一档」的\n 关系:浅色是 chip #fff(= page)浮在 #e5e5ea 上,深色 page(#242628)本来就是阶梯最暗的一档,\n 所以要让 chip 取到 page 色,只能把 track 再往下开一档到 #17191a(比 page 暗 13~14/255,与该主题\n 往上走的档差同量级:page→surface +6~+8、surface→control +14、control→track +10)。凸起方向仍由\n 「chip 比 track 亮」读出,WCAG 亮度比 1.16:1,与浅色的 1.26:1 同量级,不会盖过柔投影。\n 凹变种(inset)不参与:它的语义是「按下去的灰面」,track 取 surface(#2c2c2e)、indicator 取\n control(#3a3a3c,与浅色那颗同档),与 page 同色反而读不出选中。 */\n --wui-color-surface-segmented: #3a3a3c;\n --wui-color-surface-segmented-track: #17191a;\n --wui-color-surface-selected: #242628;\n --wui-color-text: #e9eaea;\n --wui-color-text-secondary: #a1a1a6;\n --wui-color-text-tertiary: color-mix(in srgb, var(--wui-color-text) 42%, transparent);\n --wui-color-text-disabled: color-mix(in srgb, var(--wui-color-text) 38%, transparent);\n --wui-color-state-layer-hover: color-mix(in srgb, var(--wui-color-text) 6%, transparent);\n --wui-color-state-layer-active: color-mix(in srgb, var(--wui-color-text) 15%, transparent);\n --wui-color-border: rgb(255 255 255 / 0.14);\n --wui-color-glass-highlight: rgb(255 255 255 / 0.1);\n --wui-color-glass-ring: rgb(255 255 255 / 0.05);\n --wui-color-glass-ring-sheen: rgb(255 255 255 / 0.2);\n --wui-color-glass-ring-shade: rgb(0 0 0 / 0.5);\n --wui-glass-brightness: 1.02;\n --wui-color-accent: #0a84ff;\n --wui-color-on-accent: #000;\n --wui-color-on-danger: #000;\n --wui-color-on-control: #f2f2f7;\n --wui-color-success: #30d158;\n --wui-color-warning: #ff9f0a;\n --wui-color-danger: #ff453a;\n --wui-color-info: #64d2ff;\n --wui-color-backdrop: rgb(0 0 0 / 0.48);\n --wui-shadow-overlay: 0 18px 48px rgb(0 0 0 / 0.48);\n --wui-shadow-panel: 0 4px 16px rgb(0 0 0 / 0.32);\n --wui-shadow-glass: 0 8px 24px rgb(0 0 0 / 0.08);\n --wui-color-focus-ring: color-mix(in srgb, var(--wui-color-accent, #0a84ff) 62%, var(--wui-color-text) 38%);\n --wui-scrollbar-handle: rgb(255 255 255 / 0.5);\n color-scheme: dark;\n}\n\n@media (prefers-color-scheme: dark) {\n :host([appearance='system']) {\n --wui-color-page: #242628;\n --wui-color-surface: #2c2c2e;\n --wui-color-surface-raised: #2c2c2e;\n --wui-color-surface-control: #3a3a3c;\n --wui-color-surface-track: #444446;\n --wui-color-surface-menu: rgb(49 48 50 / 0.74);\n --wui-color-surface-glass: rgb(44 44 46 / 0.42);\n --wui-color-surface-glass-hover: color-mix(in srgb, var(--wui-color-text) 6%, var(--wui-color-surface-glass));\n --wui-color-surface-glass-active: color-mix(in srgb, var(--wui-color-text) 15%, var(--wui-color-surface-glass));\n --wui-color-surface-overlay: rgb(32 34 34 / 0.92);\n --wui-color-surface-sidebar: rgb(44 44 46 / 0.8);\n --wui-color-surface-segmented: #3a3a3c;\n --wui-color-surface-segmented-track: #17191a;\n --wui-color-surface-selected: #242628;\n --wui-color-text: #e9eaea;\n --wui-color-text-secondary: #a1a1a6;\n --wui-color-text-tertiary: color-mix(in srgb, var(--wui-color-text) 42%, transparent);\n --wui-color-text-disabled: color-mix(in srgb, var(--wui-color-text) 38%, transparent);\n --wui-color-state-layer-hover: color-mix(in srgb, var(--wui-color-text) 6%, transparent);\n --wui-color-state-layer-active: color-mix(in srgb, var(--wui-color-text) 15%, transparent);\n --wui-color-border: rgb(255 255 255 / 0.14);\n --wui-color-glass-highlight: rgb(255 255 255 / 0.1);\n --wui-color-glass-ring: rgb(255 255 255 / 0.05);\n --wui-color-glass-ring-sheen: rgb(255 255 255 / 0.2);\n --wui-color-glass-ring-shade: rgb(0 0 0 / 0.5);\n --wui-glass-brightness: 1.02;\n --wui-color-accent: #0a84ff;\n --wui-color-on-accent: #000;\n --wui-color-on-danger: #000;\n --wui-color-on-control: #f2f2f7;\n --wui-color-success: #30d158;\n --wui-color-warning: #ff9f0a;\n --wui-color-danger: #ff453a;\n --wui-color-info: #64d2ff;\n --wui-color-backdrop: rgb(0 0 0 / 0.48);\n --wui-shadow-overlay: 0 18px 48px rgb(0 0 0 / 0.48);\n --wui-shadow-panel: 0 4px 16px rgb(0 0 0 / 0.32);\n --wui-shadow-glass: 0 8px 24px rgb(0 0 0 / 0.08);\n --wui-color-focus-ring: color-mix(in srgb, var(--wui-color-accent, #0a84ff) 62%, var(--wui-color-text) 38%);\n --wui-scrollbar-handle: rgb(255 255 255 / 0.5);\n color-scheme: dark;\n }\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
@@ -5,10 +5,10 @@ import overlay_motion_default from "../../assets/overlay-motion.js";
5
5
  import { dispatchOpenChangeEvent } from "../../shared/open-state/index.js";
6
6
  import { defineAnchoredPanel } from "../../shared/overlay/anchored-panel.js";
7
7
  import { defineOpenOverlay } from "../../shared/overlay/open-overlay.js";
8
+ import { FLOATING_PLACEMENTS } from "../../shared/overlay/placement-props.js";
8
9
  import { defineOverlayPortal } from "../../shared/overlay/portal.js";
9
10
  import { UserChangeController } from "../../shared/events/user-change.js";
10
11
  import { findFocusTarget } from "../../shared/focus/tabbable.js";
11
- import { FLOATING_PLACEMENTS } from "../../shared/overlay/placement-props.js";
12
12
  import style_default from "./style.js";
13
13
  import { LitElement, html, nothing, unsafeCSS } from "lit";
14
14
  import { customElement, property } from "lit/decorators.js";
@@ -1,5 +1,5 @@
1
1
  // src/components/tooltip/style.css?inline
2
- var style_default = "*,:before,:after{box-sizing:border-box}:host,.tooltip-trigger{display:inline-flex}.tooltip-anchor{display:inline-flex;position:relative}.tooltip-panel{--wui-internal-glass-shadow:var(--wui-shadow-panel,0 3px 9px #00000045);--wui-glass-corner-radius:var(--wui-radius-menu,18px);--wui-color-glass-ring:transparent;pointer-events:none;z-index:var(--wui-layer-inline-overlay,1);box-sizing:border-box;width:max-content;max-width:var(--wui-tooltip-max-width,240px);border-radius:var(--wui-radius-menu,18px);font-size:var(--wui-tooltip-font-size,13px);color:var(--wui-color-text,#1b1b1b);background-color:var(--wui-color-surface-menu,#fafafac2);padding:6px 10px;position:absolute;top:-9999px;left:-9999px}.tooltip-panel.portal{z-index:var(--wui-layer-menu,100);position:fixed}.tooltip-panel.hidden{display:none}.tooltip-text{overflow-wrap:break-word;white-space:normal;display:block}:host([portal]) .tooltip-panel{display:none}\n";
2
+ var style_default = "*,:before,:after{box-sizing:border-box}:host,.tooltip-trigger{display:inline-flex}.tooltip-anchor{display:inline-flex;position:relative}.tooltip-panel{--wui-internal-glass-shadow:var(--wui-shadow-panel,0 3px 9px #00000045);--wui-glass-corner-radius:var(--wui-radius-menu,18px);--wui-color-glass-ring:transparent;pointer-events:none;z-index:var(--wui-layer-inline-overlay,10);box-sizing:border-box;width:max-content;max-width:var(--wui-tooltip-max-width,240px);border-radius:var(--wui-radius-menu,18px);font-size:var(--wui-tooltip-font-size,13px);color:var(--wui-color-text,#1b1b1b);background-color:var(--wui-color-surface-menu,#fafafac2);padding:6px 10px;position:absolute;top:-9999px;left:-9999px}.tooltip-panel.portal{z-index:var(--wui-layer-menu,1000);position:fixed}.tooltip-panel.hidden{display:none}.tooltip-text{overflow-wrap:break-word;white-space:normal;display:block}:host([portal]) .tooltip-panel{display:none}\n";
3
3
  export { style_default as default };
4
4
 
5
5
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/tooltip/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n display: inline-flex;\n}\n\n.tooltip-trigger {\n display: inline-flex;\n}\n\n.tooltip-anchor {\n position: relative;\n display: inline-flex;\n}\n\n.tooltip-panel {\n --wui-internal-glass-shadow: var(--wui-shadow-panel, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-glass-corner-radius: var(--wui-radius-menu, 18px);\n\n /* 环底色转 transparent,宽 panel 的长边中段不留铺底,见 menu-portal.css 同处注释。 */\n --wui-color-glass-ring: transparent;\n\n pointer-events: none;\n\n position: absolute;\n z-index: var(--wui-layer-inline-overlay, 1);\n top: -9999px;\n left: -9999px;\n\n box-sizing: border-box;\n width: max-content;\n max-width: var(--wui-tooltip-max-width, 240px);\n padding: 6px 10px;\n border-radius: var(--wui-radius-menu, 18px);\n\n font-size: var(--wui-tooltip-font-size, 13px);\n color: var(--wui-color-text, #1b1b1b);\n\n /* 玻璃背景:wui-glass 在 panel 自身,这里覆盖其默认玻璃底为 menu surface 色 */\n background-color: var(--wui-color-surface-menu, rgb(250 250 250 / 0.76));\n}\n\n.tooltip-panel.portal {\n position: fixed;\n z-index: var(--wui-layer-menu, 100);\n}\n\n.tooltip-panel.hidden {\n display: none;\n}\n\n.tooltip-text {\n display: block;\n overflow-wrap: break-word;\n white-space: normal;\n}\n\n:host([portal]) .tooltip-panel {\n display: none;\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
1
+ {"version":3,"file":"style.js","names":[],"sources":["../../../src/components/tooltip/style.css?inline"],"sourcesContent":["*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n:host {\n display: inline-flex;\n}\n\n.tooltip-trigger {\n display: inline-flex;\n}\n\n.tooltip-anchor {\n position: relative;\n display: inline-flex;\n}\n\n.tooltip-panel {\n --wui-internal-glass-shadow: var(--wui-shadow-panel, 0 3px 9px rgb(0 0 0 / 0.27));\n --wui-glass-corner-radius: var(--wui-radius-menu, 18px);\n\n /* 环底色转 transparent,宽 panel 的长边中段不留铺底,见 menu-portal.css 同处注释。 */\n --wui-color-glass-ring: transparent;\n\n pointer-events: none;\n\n position: absolute;\n z-index: var(--wui-layer-inline-overlay, 10);\n top: -9999px;\n left: -9999px;\n\n box-sizing: border-box;\n width: max-content;\n max-width: var(--wui-tooltip-max-width, 240px);\n padding: 6px 10px;\n border-radius: var(--wui-radius-menu, 18px);\n\n font-size: var(--wui-tooltip-font-size, 13px);\n color: var(--wui-color-text, #1b1b1b);\n\n /* 玻璃背景:wui-glass 在 panel 自身,这里覆盖其默认玻璃底为 menu surface 色 */\n background-color: var(--wui-color-surface-menu, rgb(250 250 250 / 0.76));\n}\n\n.tooltip-panel.portal {\n position: fixed;\n z-index: var(--wui-layer-menu, 1000);\n}\n\n.tooltip-panel.hidden {\n display: none;\n}\n\n.tooltip-text {\n display: block;\n overflow-wrap: break-word;\n white-space: normal;\n}\n\n:host([portal]) .tooltip-panel {\n display: none;\n}\n"],"mappings":";AAAA,IAAA,gBAAA"}
@@ -0,0 +1,7 @@
1
+ declare const _default: {
2
+ body: string;
3
+ width: number;
4
+ height: number;
5
+ };
6
+ export { _default as default };
7
+ //# sourceMappingURL=ant-design-sync-outlined.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ant-design-sync-outlined.d.ts","names":[],"sources":["../../../src/icons/generated/ant-design-sync-outlined.ts"],"mappings":""}
@@ -0,0 +1,9 @@
1
+ // src/icons/generated/ant-design-sync-outlined.ts
2
+ var ant_design_sync_outlined_default = {
3
+ body: "<path fill=\"currentColor\" d=\"M168 504.2c1-43.7 10-86.1 26.9-126c17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 0 1 755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92C282.7 92 96.3 275.6 92 503.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8m756 7.8h-60c-4.4 0-7.9 3.5-8 7.8c-1 43.7-10 86.1-26.9 126c-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 0 1 512.1 856a342.24 342.24 0 0 1-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 0 0-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 0 0-8-8.2\"/>",
4
+ width: 1024,
5
+ height: 1024
6
+ };
7
+ export { ant_design_sync_outlined_default as default };
8
+
9
+ //# sourceMappingURL=ant-design-sync-outlined.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ant-design-sync-outlined.js","names":[],"sources":["../../../src/icons/generated/ant-design-sync-outlined.ts"],"sourcesContent":["import type { IconifyIcon } from '@iconify/types'\n\nexport default {\n body: '<path fill=\"currentColor\" d=\"M168 504.2c1-43.7 10-86.1 26.9-126c17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 0 1 755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92C282.7 92 96.3 275.6 92 503.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8m756 7.8h-60c-4.4 0-7.9 3.5-8 7.8c-1 43.7-10 86.1-26.9 126c-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 0 1 512.1 856a342.24 342.24 0 0 1-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 0 0-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 0 0-8-8.2\"/>',\n width: 1024,\n height: 1024\n} satisfies IconifyIcon\n"],"mappings":";AAEA,IAAA,mCAAe;CACb,MAAM;CACN,OAAO;CACP,QAAQ;AACV"}