@lobehub/ui 5.45.3 → 5.46.1

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.
@@ -36,7 +36,7 @@ const installGlobalFocusRing = (doc = document) => {
36
36
  const sync = () => {
37
37
  if (disposed) return;
38
38
  const next = doc.activeElement;
39
- if (next === target && next?.matches(":focus-visible") && next.isConnected) return;
39
+ if (next === target && next?.matches(":focus-visible") && next.isConnected && ring.matches(":popover-open")) return;
40
40
  clear();
41
41
  if (!next || next === doc.body || next.namespaceURI !== "http://www.w3.org/1999/xhtml" || next.shadowRoot || next.closest("[data-lobe-focus-ring=\"off\"]") || next.matches("textarea") || next.isContentEditable || next.matches("input") && ![
42
42
  "button",
@@ -104,7 +104,7 @@ const installGlobalFocusRing = (doc = document) => {
104
104
  const blur = () => {
105
105
  win.cancelAnimationFrame(frame);
106
106
  frame = 0;
107
- clear();
107
+ if (ring.matches(":popover-open")) ring.hidePopover();
108
108
  };
109
109
  const observer = new MutationObserver(() => {
110
110
  if (target && !target.isConnected) clear();
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/GlobalFocusRing/index.ts"],"sourcesContent":["import { globalFocusRingCSS } from './style';\n\nconst installations = new WeakMap<Document, { dispose: () => void; users: number }>();\n\n/** Install once per document. The returned cleanup is safe for nested providers and Strict Mode. */\nexport const installGlobalFocusRing = (doc: Document = document): (() => void) => {\n const existing = installations.get(doc);\n if (existing) {\n existing.users += 1;\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (--existing.users === 0) existing.dispose();\n };\n }\n\n const win = doc.defaultView;\n if (\n !win ||\n !doc.body ||\n !win.CSS?.supports('top', 'anchor(top)') ||\n !win.CSS.supports('position-visibility', 'anchors-visible') ||\n !('showPopover' in doc.createElement('div'))\n )\n return () => {};\n\n const sheet = doc.createElement('style');\n sheet.textContent = globalFocusRingCSS;\n const ring = doc.createElement('div');\n ring.setAttribute('data-lobe-global-focus-ring', '');\n ring.setAttribute('aria-hidden', 'true');\n ring.setAttribute('popover', 'manual');\n doc.head.append(sheet);\n doc.body.append(ring);\n\n let target: HTMLElement | undefined;\n let restoreTarget: (() => void) | undefined;\n let frame = 0;\n let disposed = false;\n\n const clear = () => {\n if (ring.matches(':popover-open')) ring.hidePopover();\n restoreTarget?.();\n restoreTarget = undefined;\n target = undefined;\n };\n\n const sync = () => {\n if (disposed) return;\n const next = doc.activeElement;\n if (next === target && next?.matches(':focus-visible') && next.isConnected) return;\n clear();\n // Shadow roots and fragmented inline text retain their own focus treatment.\n if (\n !next ||\n next === doc.body ||\n next.namespaceURI !== 'http://www.w3.org/1999/xhtml' ||\n next.shadowRoot ||\n next.closest('[data-lobe-focus-ring=\"off\"]') ||\n next.matches('textarea') ||\n (next as HTMLElement).isContentEditable ||\n (next.matches('input') &&\n ![\n 'button',\n 'submit',\n 'reset',\n 'image',\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n ].includes((next as HTMLInputElement).type)) ||\n !next.matches(':focus-visible') ||\n next.getClientRects().length !== 1\n )\n return;\n\n const element = next as HTMLElement;\n const computed = win.getComputedStyle(element);\n const rect = element.getBoundingClientRect();\n if (!rect.width || !rect.height || computed.visibility !== 'visible') return;\n\n const saved = ['anchor-name', 'outline'].map((property) => ({\n priority: element.style.getPropertyPriority(property),\n property,\n value: element.style.getPropertyValue(property),\n }));\n const oldMarker = element.getAttribute('data-lobe-focus-ring');\n const anchor = computed.getPropertyValue('anchor-name').trim();\n const assignedAnchor =\n anchor && anchor !== 'none' ? `${anchor}, --lobe-global-focus` : '--lobe-global-focus';\n element.style.setProperty('anchor-name', assignedAnchor, 'important');\n ring.style.borderRadius = computed.borderRadius;\n ring.style.setProperty(\n '--lobe-focus-ring-color',\n computed.getPropertyValue('--lobe-focus-ring-color').trim() ||\n computed.getPropertyValue('--ant-color-info').trim() ||\n '#1677ff',\n );\n\n restoreTarget = () => {\n for (const { property, value, priority } of saved) {\n const assigned = property === 'anchor-name' ? assignedAnchor : 'none';\n if (element.style.getPropertyValue(property) !== assigned) continue;\n if (value) element.style.setProperty(property, value, priority);\n else element.style.removeProperty(property);\n }\n if (element.getAttribute('data-lobe-focus-ring') === 'managed') {\n if (oldMarker === null) element.removeAttribute('data-lobe-focus-ring');\n else element.setAttribute('data-lobe-focus-ring', oldMarker);\n }\n };\n try {\n ring.showPopover();\n // Do not suppress a working native outline when an anchor cannot resolve.\n const bounds = ring.getBoundingClientRect();\n if (\n Math.max(\n ...(['top', 'right', 'bottom', 'left'] as const).map((edge) =>\n Math.abs(bounds[edge] - rect[edge]),\n ),\n ) > 1\n ) {\n clear();\n return;\n }\n element.style.setProperty('outline', 'none', 'important');\n element.setAttribute('data-lobe-focus-ring', 'managed');\n target = element;\n } catch {\n clear();\n }\n };\n\n const schedule = () => {\n if (!frame)\n frame = win.requestAnimationFrame(() => {\n frame = 0;\n sync();\n });\n };\n const blur = () => {\n win.cancelAnimationFrame(frame);\n frame = 0;\n clear();\n };\n const observer = new MutationObserver(() => {\n if (target && !target.isConnected) clear();\n });\n observer.observe(doc.body, { childList: true, subtree: true });\n doc.addEventListener('focusin', sync, true);\n doc.addEventListener('focusout', schedule, true);\n doc.addEventListener('keydown', schedule, true);\n doc.addEventListener('pointerdown', schedule, true);\n win.addEventListener('blur', blur);\n win.addEventListener('focus', schedule);\n\n const installation = {\n dispose: () => {\n disposed = true;\n win.cancelAnimationFrame(frame);\n observer.disconnect();\n doc.removeEventListener('focusin', sync, true);\n doc.removeEventListener('focusout', schedule, true);\n doc.removeEventListener('keydown', schedule, true);\n doc.removeEventListener('pointerdown', schedule, true);\n win.removeEventListener('blur', blur);\n win.removeEventListener('focus', schedule);\n clear();\n ring.remove();\n sheet.remove();\n installations.delete(doc);\n },\n users: 0,\n };\n installations.set(doc, installation);\n sync();\n return installGlobalFocusRing(doc);\n};\n"],"mappings":";;AAEA,MAAM,gCAAgB,IAAI,QAA0D;;AAGpF,MAAa,0BAA0B,MAAgB,aAA2B;CACh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KAAK;CACL,OAAO,uBAAuB,GAAG;AACnC"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/GlobalFocusRing/index.ts"],"sourcesContent":["import { globalFocusRingCSS } from './style';\n\nconst installations = new WeakMap<Document, { dispose: () => void; users: number }>();\n\n/** Install once per document. The returned cleanup is safe for nested providers and Strict Mode. */\nexport const installGlobalFocusRing = (doc: Document = document): (() => void) => {\n const existing = installations.get(doc);\n if (existing) {\n existing.users += 1;\n let released = false;\n return () => {\n if (released) return;\n released = true;\n if (--existing.users === 0) existing.dispose();\n };\n }\n\n const win = doc.defaultView;\n if (\n !win ||\n !doc.body ||\n !win.CSS?.supports('top', 'anchor(top)') ||\n !win.CSS.supports('position-visibility', 'anchors-visible') ||\n !('showPopover' in doc.createElement('div'))\n )\n return () => {};\n\n const sheet = doc.createElement('style');\n sheet.textContent = globalFocusRingCSS;\n const ring = doc.createElement('div');\n ring.setAttribute('data-lobe-global-focus-ring', '');\n ring.setAttribute('aria-hidden', 'true');\n ring.setAttribute('popover', 'manual');\n doc.head.append(sheet);\n doc.body.append(ring);\n\n let target: HTMLElement | undefined;\n let restoreTarget: (() => void) | undefined;\n let frame = 0;\n let disposed = false;\n\n const clear = () => {\n if (ring.matches(':popover-open')) ring.hidePopover();\n restoreTarget?.();\n restoreTarget = undefined;\n target = undefined;\n };\n\n const sync = () => {\n if (disposed) return;\n const next = doc.activeElement;\n if (\n next === target &&\n next?.matches(':focus-visible') &&\n next.isConnected &&\n ring.matches(':popover-open')\n )\n return;\n clear();\n // Shadow roots and fragmented inline text retain their own focus treatment.\n if (\n !next ||\n next === doc.body ||\n next.namespaceURI !== 'http://www.w3.org/1999/xhtml' ||\n next.shadowRoot ||\n next.closest('[data-lobe-focus-ring=\"off\"]') ||\n next.matches('textarea') ||\n (next as HTMLElement).isContentEditable ||\n (next.matches('input') &&\n ![\n 'button',\n 'submit',\n 'reset',\n 'image',\n 'checkbox',\n 'radio',\n 'range',\n 'color',\n 'file',\n ].includes((next as HTMLInputElement).type)) ||\n !next.matches(':focus-visible') ||\n next.getClientRects().length !== 1\n )\n return;\n\n const element = next as HTMLElement;\n const computed = win.getComputedStyle(element);\n const rect = element.getBoundingClientRect();\n if (!rect.width || !rect.height || computed.visibility !== 'visible') return;\n\n const saved = ['anchor-name', 'outline'].map((property) => ({\n priority: element.style.getPropertyPriority(property),\n property,\n value: element.style.getPropertyValue(property),\n }));\n const oldMarker = element.getAttribute('data-lobe-focus-ring');\n const anchor = computed.getPropertyValue('anchor-name').trim();\n const assignedAnchor =\n anchor && anchor !== 'none' ? `${anchor}, --lobe-global-focus` : '--lobe-global-focus';\n element.style.setProperty('anchor-name', assignedAnchor, 'important');\n ring.style.borderRadius = computed.borderRadius;\n ring.style.setProperty(\n '--lobe-focus-ring-color',\n computed.getPropertyValue('--lobe-focus-ring-color').trim() ||\n computed.getPropertyValue('--ant-color-info').trim() ||\n '#1677ff',\n );\n\n restoreTarget = () => {\n for (const { property, value, priority } of saved) {\n const assigned = property === 'anchor-name' ? assignedAnchor : 'none';\n if (element.style.getPropertyValue(property) !== assigned) continue;\n if (value) element.style.setProperty(property, value, priority);\n else element.style.removeProperty(property);\n }\n if (element.getAttribute('data-lobe-focus-ring') === 'managed') {\n if (oldMarker === null) element.removeAttribute('data-lobe-focus-ring');\n else element.setAttribute('data-lobe-focus-ring', oldMarker);\n }\n };\n try {\n ring.showPopover();\n // Do not suppress a working native outline when an anchor cannot resolve.\n const bounds = ring.getBoundingClientRect();\n if (\n Math.max(\n ...(['top', 'right', 'bottom', 'left'] as const).map((edge) =>\n Math.abs(bounds[edge] - rect[edge]),\n ),\n ) > 1\n ) {\n clear();\n return;\n }\n element.style.setProperty('outline', 'none', 'important');\n element.setAttribute('data-lobe-focus-ring', 'managed');\n target = element;\n } catch {\n clear();\n }\n };\n\n const schedule = () => {\n if (!frame)\n frame = win.requestAnimationFrame(() => {\n frame = 0;\n sync();\n });\n };\n const blur = () => {\n win.cancelAnimationFrame(frame);\n frame = 0;\n if (ring.matches(':popover-open')) ring.hidePopover();\n };\n const observer = new MutationObserver(() => {\n if (target && !target.isConnected) clear();\n });\n observer.observe(doc.body, { childList: true, subtree: true });\n doc.addEventListener('focusin', sync, true);\n doc.addEventListener('focusout', schedule, true);\n doc.addEventListener('keydown', schedule, true);\n doc.addEventListener('pointerdown', schedule, true);\n win.addEventListener('blur', blur);\n win.addEventListener('focus', schedule);\n\n const installation = {\n dispose: () => {\n disposed = true;\n win.cancelAnimationFrame(frame);\n observer.disconnect();\n doc.removeEventListener('focusin', sync, true);\n doc.removeEventListener('focusout', schedule, true);\n doc.removeEventListener('keydown', schedule, true);\n doc.removeEventListener('pointerdown', schedule, true);\n win.removeEventListener('blur', blur);\n win.removeEventListener('focus', schedule);\n clear();\n ring.remove();\n sheet.remove();\n installations.delete(doc);\n },\n users: 0,\n };\n installations.set(doc, installation);\n sync();\n return installGlobalFocusRing(doc);\n};\n"],"mappings":";;AAEA,MAAM,gCAAgB,IAAI,QAA0D;;AAGpF,MAAa,0BAA0B,MAAgB,aAA2B;CAChF,MAAM,WAAW,cAAc,IAAI,GAAG;CACtC,IAAI,UAAU;EACZ,SAAS,SAAS;EAClB,IAAI,WAAW;EACf,aAAa;GACX,IAAI,UAAU;GACd,WAAW;GACX,IAAI,EAAE,SAAS,UAAU,GAAG,SAAS,QAAQ;EAC/C;CACF;CAEA,MAAM,MAAM,IAAI;CAChB,IACE,CAAC,OACD,CAAC,IAAI,QACL,CAAC,IAAI,KAAK,SAAS,OAAO,aAAa,KACvC,CAAC,IAAI,IAAI,SAAS,uBAAuB,iBAAiB,KAC1D,EAAE,iBAAiB,IAAI,cAAc,KAAK,IAE1C,aAAa,CAAC;CAEhB,MAAM,QAAQ,IAAI,cAAc,OAAO;CACvC,MAAM,cAAc;CACpB,MAAM,OAAO,IAAI,cAAc,KAAK;CACpC,KAAK,aAAa,+BAA+B,EAAE;CACnD,KAAK,aAAa,eAAe,MAAM;CACvC,KAAK,aAAa,WAAW,QAAQ;C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,SAAS,QAAQ,IAAI,MAAM;EAAE,WAAW;EAAM,SAAS;CAAK,CAAC;CAC7D,IAAI,iBAAiB,WAAW,MAAM,IAAI;CAC1C,IAAI,iBAAiB,YAAY,UAAU,IAAI;CAC/C,IAAI,iBAAiB,WAAW,UAAU,IAAI;CAC9C,IAAI,iBAAiB,eAAe,UAAU,IAAI;CAClD,IAAI,iBAAiB,QAAQ,IAAI;CACjC,IAAI,iBAAiB,SAAS,QAAQ;CAoBtC,cAAc,IAAI,KAAK;EAjBrB,eAAe;GACb,WAAW;GACX,IAAI,qBAAqB,KAAK;GAC9B,SAAS,WAAW;GACpB,IAAI,oBAAoB,WAAW,MAAM,IAAI;GAC7C,IAAI,oBAAoB,YAAY,UAAU,IAAI;GAClD,IAAI,oBAAoB,WAAW,UAAU,IAAI;GACjD,IAAI,oBAAoB,eAAe,UAAU,IAAI;GACrD,IAAI,oBAAoB,QAAQ,IAAI;GACpC,IAAI,oBAAoB,SAAS,QAAQ;GACzC,MAAM;GACN,KAAK,OAAO;GACZ,MAAM,OAAO;GACb,cAAc,OAAO,GAAG;EAC1B;EACA,OAAO;CAEyB,CAAC;CACnC,KAAK;CACL,OAAO,uBAAuB,GAAG;AACnC"}
@@ -25,6 +25,23 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
25
25
  content: css`
26
26
  font-size: 14px;
27
27
  line-height: 1.6;
28
+ transition:
29
+ opacity 200ms ${cssVar.motionEaseOut},
30
+ translate 200ms ${cssVar.motionEaseOut};
31
+
32
+ [data-starting-style] & {
33
+ translate: 0 6px;
34
+ opacity: 0;
35
+ }
36
+
37
+ [data-ending-style] & {
38
+ translate: 0 -6px;
39
+ opacity: 0;
40
+ }
41
+
42
+ @media (prefers-reduced-motion: reduce) {
43
+ transition-duration: 0s;
44
+ }
28
45
  `,
29
46
  contentBorderless: css`
30
47
  padding-block: 0 12px;
@@ -36,7 +53,7 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
36
53
  padding-inline-start: 40px;
37
54
  `,
38
55
  contentOutlined: css`
39
- padding-block: 0 14px;
56
+ padding-block: 4px 14px;
40
57
  padding-inline: 16px;
41
58
  `,
42
59
  header: css`
@@ -121,9 +138,11 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
121
138
  `,
122
139
  panel: css`
123
140
  overflow: hidden;
124
- height: var(--accordion-panel-height);
141
+ height: auto;
125
142
  transition: height 200ms ${cssVar.motionEaseOut};
126
143
 
144
+ interpolate-size: allow-keywords;
145
+
127
146
  &[data-starting-style],
128
147
  &[data-ending-style] {
129
148
  height: 0;
@@ -179,6 +198,10 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
179
198
  triggerOutlined: css`
180
199
  padding-block: 12px;
181
200
  padding-inline: 16px;
201
+
202
+ &[data-panel-open] {
203
+ padding-block-end: 8px;
204
+ }
182
205
  `
183
206
  }));
184
207
  const rootVariants = cva(styles.root, {
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Accordion/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { focusRing } from '@/base-ui/focusRing';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n action: css`\n display: flex;\n flex-shrink: 0;\n gap: 4px;\n align-items: center;\n\n opacity: 0;\n\n transition: opacity 150ms ${cssVar.motionEaseOut};\n `,\n actionAlwaysVisible: css`\n opacity: 1;\n `,\n actionBorderless: css`\n padding-inline-end: var(--accordion-hover-inset, 8px);\n `,\n actionOutlined: css`\n padding-inline-end: 16px;\n `,\n content: css`\n font-size: 14px;\n line-height: 1.6;\n `,\n contentBorderless: css`\n padding-block: 0 12px;\n `,\n contentIndent: css`\n padding-inline-start: 24px;\n `,\n contentIndentOutlined: css`\n padding-inline-start: 40px;\n `,\n contentOutlined: css`\n padding-block: 0 14px;\n padding-inline: 16px;\n `,\n header: css`\n position: relative;\n\n display: flex;\n align-items: center;\n\n margin: 0;\n\n font-size: inherit;\n font-weight: inherit;\n\n transition: background 150ms ${cssVar.motionEaseOut};\n\n &:hover:not(:has([data-disabled])) {\n background: ${cssVar.colorFillTertiary};\n }\n\n &:hover .accordion-action,\n &:focus-within .accordion-action {\n opacity: 1;\n }\n `,\n headerBorderless: css`\n margin-inline: calc(var(--accordion-hover-inset, 8px) * -1);\n border-radius: ${cssVar.borderRadius};\n `,\n headerInline: css`\n margin-inline: 0;\n\n > .accordion-action {\n padding-block: 4px;\n }\n `,\n contentInline: css`\n padding-block: 0;\n `,\n indicator: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n color: ${cssVar.colorTextDescription};\n\n transition: transform 200ms ${cssVar.motionEaseOut};\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n indicatorInline: css`\n justify-content: center;\n width: 18px;\n height: 18px;\n margin-inline-start: -6px;\n\n [data-panel-open] & {\n transform: rotate(90deg);\n }\n `,\n indicatorEnd: css`\n margin-inline-start: auto;\n\n [data-panel-open] & {\n transform: rotate(180deg);\n }\n `,\n indicatorStart: css`\n [data-panel-open] & {\n transform: rotate(90deg);\n }\n `,\n item: css`\n display: flex;\n flex-direction: column;\n `,\n itemOutlined: css`\n & + & {\n border-block-start: 1px solid ${cssVar.colorBorderSecondary};\n }\n `,\n panel: css`\n overflow: hidden;\n height: var(--accordion-panel-height);\n transition: height 200ms ${cssVar.motionEaseOut};\n\n &[data-starting-style],\n &[data-ending-style] {\n height: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n root: css`\n display: flex;\n flex-direction: column;\n width: 100%;\n `,\n rootOutlined: css`\n overflow: hidden;\n border: 1px solid ${cssVar.colorBorderSecondary};\n border-radius: ${cssVar.borderRadiusLG};\n `,\n trigger: css`\n cursor: pointer;\n user-select: none;\n\n display: flex;\n flex: 1;\n gap: 8px;\n align-items: center;\n\n min-width: 0;\n border: 0;\n border-radius: inherit;\n\n font: inherit;\n font-size: 14px;\n font-weight: 500;\n color: ${cssVar.colorText};\n text-align: start;\n\n background: none;\n outline: none;\n\n ${focusRing};\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n `,\n triggerBorderless: css`\n padding-block: 8px;\n padding-inline: var(--accordion-hover-inset, 8px);\n `,\n triggerOutlined: css`\n padding-block: 12px;\n padding-inline: 16px;\n `,\n}));\n\nexport const rootVariants = cva(styles.root, {\n defaultVariants: { variant: 'borderless' },\n variants: {\n variant: {\n borderless: null,\n outlined: styles.rootOutlined,\n },\n },\n});\n\nexport const itemVariants = cva(styles.item, {\n defaultVariants: { variant: 'borderless' },\n variants: {\n variant: {\n borderless: null,\n outlined: styles.itemOutlined,\n },\n },\n});\n\nexport const headerVariants = cva(styles.header, {\n compoundVariants: [{ class: styles.headerInline, inline: true, variant: 'borderless' }],\n defaultVariants: { inline: false, variant: 'borderless' },\n variants: {\n inline: {\n false: null,\n true: null,\n },\n variant: {\n borderless: styles.headerBorderless,\n outlined: null,\n },\n },\n});\n\nexport const triggerVariants = cva(styles.trigger, {\n defaultVariants: { variant: 'borderless' },\n variants: {\n variant: {\n borderless: styles.triggerBorderless,\n outlined: styles.triggerOutlined,\n },\n },\n});\n\nexport const indicatorVariants = cva(styles.indicator, {\n defaultVariants: { placement: 'start' },\n variants: {\n placement: {\n end: styles.indicatorEnd,\n inline: styles.indicatorInline,\n start: styles.indicatorStart,\n },\n },\n});\n\nexport const contentVariants = cva(styles.content, {\n compoundVariants: [\n {\n class: styles.contentInline,\n inline: true,\n variant: 'borderless',\n },\n {\n class: styles.contentIndent,\n indent: true,\n variant: 'borderless',\n },\n {\n class: styles.contentIndentOutlined,\n indent: true,\n variant: 'outlined',\n },\n ],\n defaultVariants: { indent: true, inline: false, variant: 'borderless' },\n variants: {\n indent: {\n false: null,\n true: null,\n },\n inline: {\n false: null,\n true: null,\n },\n variant: {\n borderless: styles.contentBorderless,\n outlined: styles.contentOutlined,\n },\n },\n});\n\nexport const actionVariants = cva(styles.action, {\n defaultVariants: { alwaysVisible: false, variant: 'borderless' },\n variants: {\n alwaysVisible: {\n false: null,\n true: styles.actionAlwaysVisible,\n },\n variant: {\n borderless: styles.actionBorderless,\n outlined: styles.actionOutlined,\n },\n },\n});\n"],"mappings":";;;;AAKA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,QAAQ,GAAG;;;;;;;;gCAQmB,OAAO,cAAc;;CAEnD,qBAAqB,GAAG;;;CAGxB,kBAAkB,GAAG;;;CAGrB,gBAAgB,GAAG;;;CAGnB,SAAS,GAAG;;;;CAIZ,mBAAmB,GAAG;;;CAGtB,eAAe,GAAG;;;CAGlB,uBAAuB,GAAG;;;CAG1B,iBAAiB,GAAG;;;;CAIpB,QAAQ,GAAG;;;;;;;;;;;mCAWsB,OAAO,cAAc;;;oBAGpC,OAAO,kBAAkB;;;;;;;;CAQ3C,kBAAkB,GAAG;;qBAEF,OAAO,aAAa;;CAEvC,cAAc,GAAG;;;;;;;CAOjB,eAAe,GAAG;;;CAGlB,WAAW,GAAG;;;;;aAKH,OAAO,qBAAqB;;kCAEP,OAAO,cAAc;;;;;;CAMrD,iBAAiB,GAAG;;;;;;;;;;CAUpB,cAAc,GAAG;;;;;;;CAOjB,gBAAgB,GAAG;;;;;CAKnB,MAAM,GAAG;;;;CAIT,cAAc,GAAG;;sCAEmB,OAAO,qBAAqB;;;CAGhE,OAAO,GAAG;;;+BAGmB,OAAO,cAAc;;;;;;;;;;;CAWlD,MAAM,GAAG;;;;;CAKT,cAAc,GAAG;;wBAEK,OAAO,qBAAqB;qBAC/B,OAAO,eAAe;;CAEzC,SAAS,GAAG;;;;;;;;;;;;;;;;aAgBD,OAAO,UAAU;;;;;;MAMxB,UAAU;;;;eAID,OAAO,kBAAkB;;;CAGtC,mBAAmB,GAAG;;;;CAItB,iBAAiB,GAAG;;;;AAItB,EAAE;AAEF,MAAa,eAAe,IAAI,OAAO,MAAM;CAC3C,iBAAiB,EAAE,SAAS,aAAa;CACzC,UAAU,EAC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AAI,OAAO,QAAQ;CAC/C,iBAAiB;EAAE,eAAe;EAAO,SAAS;CAAa;CAC/D,UAAU;EACR,eAAe;GACb,OAAO;GACP,MAAM,OAAO;EACf;EACA,SAAS;GACP,YAAY,OAAO;GACnB,UAAU,OAAO;EACnB;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Accordion/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\nimport { cva } from 'class-variance-authority';\n\nimport { focusRing } from '@/base-ui/focusRing';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n action: css`\n display: flex;\n flex-shrink: 0;\n gap: 4px;\n align-items: center;\n\n opacity: 0;\n\n transition: opacity 150ms ${cssVar.motionEaseOut};\n `,\n actionAlwaysVisible: css`\n opacity: 1;\n `,\n actionBorderless: css`\n padding-inline-end: var(--accordion-hover-inset, 8px);\n `,\n actionOutlined: css`\n padding-inline-end: 16px;\n `,\n content: css`\n font-size: 14px;\n line-height: 1.6;\n transition:\n opacity 200ms ${cssVar.motionEaseOut},\n translate 200ms ${cssVar.motionEaseOut};\n\n [data-starting-style] & {\n translate: 0 6px;\n opacity: 0;\n }\n\n [data-ending-style] & {\n translate: 0 -6px;\n opacity: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n contentBorderless: css`\n padding-block: 0 12px;\n `,\n contentIndent: css`\n padding-inline-start: 24px;\n `,\n contentIndentOutlined: css`\n padding-inline-start: 40px;\n `,\n contentOutlined: css`\n padding-block: 4px 14px;\n padding-inline: 16px;\n `,\n header: css`\n position: relative;\n\n display: flex;\n align-items: center;\n\n margin: 0;\n\n font-size: inherit;\n font-weight: inherit;\n\n transition: background 150ms ${cssVar.motionEaseOut};\n\n &:hover:not(:has([data-disabled])) {\n background: ${cssVar.colorFillTertiary};\n }\n\n &:hover .accordion-action,\n &:focus-within .accordion-action {\n opacity: 1;\n }\n `,\n headerBorderless: css`\n margin-inline: calc(var(--accordion-hover-inset, 8px) * -1);\n border-radius: ${cssVar.borderRadius};\n `,\n headerInline: css`\n margin-inline: 0;\n\n > .accordion-action {\n padding-block: 4px;\n }\n `,\n contentInline: css`\n padding-block: 0;\n `,\n indicator: css`\n display: flex;\n flex-shrink: 0;\n align-items: center;\n\n color: ${cssVar.colorTextDescription};\n\n transition: transform 200ms ${cssVar.motionEaseOut};\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n indicatorInline: css`\n justify-content: center;\n width: 18px;\n height: 18px;\n margin-inline-start: -6px;\n\n [data-panel-open] & {\n transform: rotate(90deg);\n }\n `,\n indicatorEnd: css`\n margin-inline-start: auto;\n\n [data-panel-open] & {\n transform: rotate(180deg);\n }\n `,\n indicatorStart: css`\n [data-panel-open] & {\n transform: rotate(90deg);\n }\n `,\n item: css`\n display: flex;\n flex-direction: column;\n `,\n itemOutlined: css`\n & + & {\n border-block-start: 1px solid ${cssVar.colorBorderSecondary};\n }\n `,\n panel: css`\n overflow: hidden;\n height: auto;\n transition: height 200ms ${cssVar.motionEaseOut};\n\n interpolate-size: allow-keywords;\n\n &[data-starting-style],\n &[data-ending-style] {\n height: 0;\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n root: css`\n display: flex;\n flex-direction: column;\n width: 100%;\n `,\n rootOutlined: css`\n overflow: hidden;\n border: 1px solid ${cssVar.colorBorderSecondary};\n border-radius: ${cssVar.borderRadiusLG};\n `,\n trigger: css`\n cursor: pointer;\n user-select: none;\n\n display: flex;\n flex: 1;\n gap: 8px;\n align-items: center;\n\n min-width: 0;\n border: 0;\n border-radius: inherit;\n\n font: inherit;\n font-size: 14px;\n font-weight: 500;\n color: ${cssVar.colorText};\n text-align: start;\n\n background: none;\n outline: none;\n\n ${focusRing};\n\n &[data-disabled] {\n cursor: not-allowed;\n color: ${cssVar.colorTextDisabled};\n }\n `,\n triggerBorderless: css`\n padding-block: 8px;\n padding-inline: var(--accordion-hover-inset, 8px);\n `,\n triggerOutlined: css`\n padding-block: 12px;\n padding-inline: 16px;\n\n &[data-panel-open] {\n padding-block-end: 8px;\n }\n `,\n}));\n\nexport const rootVariants = cva(styles.root, {\n defaultVariants: { variant: 'borderless' },\n variants: {\n variant: {\n borderless: null,\n outlined: styles.rootOutlined,\n },\n },\n});\n\nexport const itemVariants = cva(styles.item, {\n defaultVariants: { variant: 'borderless' },\n variants: {\n variant: {\n borderless: null,\n outlined: styles.itemOutlined,\n },\n },\n});\n\nexport const headerVariants = cva(styles.header, {\n compoundVariants: [{ class: styles.headerInline, inline: true, variant: 'borderless' }],\n defaultVariants: { inline: false, variant: 'borderless' },\n variants: {\n inline: {\n false: null,\n true: null,\n },\n variant: {\n borderless: styles.headerBorderless,\n outlined: null,\n },\n },\n});\n\nexport const triggerVariants = cva(styles.trigger, {\n defaultVariants: { variant: 'borderless' },\n variants: {\n variant: {\n borderless: styles.triggerBorderless,\n outlined: styles.triggerOutlined,\n },\n },\n});\n\nexport const indicatorVariants = cva(styles.indicator, {\n defaultVariants: { placement: 'start' },\n variants: {\n placement: {\n end: styles.indicatorEnd,\n inline: styles.indicatorInline,\n start: styles.indicatorStart,\n },\n },\n});\n\nexport const contentVariants = cva(styles.content, {\n compoundVariants: [\n {\n class: styles.contentInline,\n inline: true,\n variant: 'borderless',\n },\n {\n class: styles.contentIndent,\n indent: true,\n variant: 'borderless',\n },\n {\n class: styles.contentIndentOutlined,\n indent: true,\n variant: 'outlined',\n },\n ],\n defaultVariants: { indent: true, inline: false, variant: 'borderless' },\n variants: {\n indent: {\n false: null,\n true: null,\n },\n inline: {\n false: null,\n true: null,\n },\n variant: {\n borderless: styles.contentBorderless,\n outlined: styles.contentOutlined,\n },\n },\n});\n\nexport const actionVariants = cva(styles.action, {\n defaultVariants: { alwaysVisible: false, variant: 'borderless' },\n variants: {\n alwaysVisible: {\n false: null,\n true: styles.actionAlwaysVisible,\n },\n variant: {\n borderless: styles.actionBorderless,\n outlined: styles.actionO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AAa;CAC/D,UAAU;EACR,eAAe;GACb,OAAO;GACP,MAAM,OAAO;EACf;EACA,SAAS;GACP,YAAY,OAAO;GACnB,UAAU,OAAO;EACnB;CACF;AACF,CAAC"}
@@ -42,7 +42,7 @@ declare const variants: (props?: ({
42
42
  mark?: boolean | null | undefined;
43
43
  shiny?: boolean | null | undefined;
44
44
  strong?: boolean | null | undefined;
45
- type?: "danger" | "warning" | "success" | "info" | "secondary" | null | undefined;
45
+ type?: "danger" | "success" | "info" | "warning" | "secondary" | null | undefined;
46
46
  underline?: boolean | null | undefined;
47
47
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
48
48
  //#endregion
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "5.45.3",
3
+ "version": "5.46.1",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",