@antadesign/anta 0.3.31 → 0.3.32

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.
@@ -14,6 +14,13 @@ export interface BoxProps extends BaseProps {
14
14
  * pixels; a string is any CSS length or two-value gap (`'1rem'`,
15
15
  * `'8px 16px'`). Applies while the Box is a flex or grid container. */
16
16
  gap?: number | string;
17
+ /** CSS selector for descendants whose border boxes are included in
18
+ * `measurement.rects` when Box measures. Coordinates are relative to this
19
+ * Box's top-left border edge; matches are in document order. Box reads and
20
+ * compares matching rects for each measurement event. With `observe="scroll"`,
21
+ * use `throttle` when the selector matches many descendants; it also delays
22
+ * CSS state updates after the initial read. */
23
+ includeRectsFor?: string;
17
24
  /** Inner spacing, matching CSS `padding`. Numbers are pixels; strings accept
18
25
  * CSS shorthand, percentages, and custom properties. Omission adds no style. */
19
26
  padding?: number | string;
@@ -31,9 +38,13 @@ export interface BoxProps extends BaseProps {
31
38
  * overflow adds content observation; hidden edges and scroll add scroll reads.
32
39
  * Without handlers or `fade`, omission stays idle. */
33
40
  observe?: BoxObservation | readonly BoxObservation[];
34
- /** Minimum interval between measurement events, in milliseconds. The first
35
- * report has no added delay; a trailing report delivers the latest values.
36
- * Active observers and CSS clipping states are not throttled.
41
+ /** Keeps measurement events and CSS clipping states current outside the
42
+ * viewport. Has no effect unless `observe` or `fade` selects measurement. */
43
+ observeOffscreen?: boolean;
44
+ /** Minimum interval between measurements, in milliseconds. The initial
45
+ * measurement runs immediately; a trailing read updates CSS states and
46
+ * delivers the latest event. Descendant rects are read only for emitted
47
+ * events. The `measurement` getter always reads fresh values.
37
48
  * @defaultValue 0 */
38
49
  throttle?: number;
39
50
  /** Fades out every edge that currently hides clipped content, and drops the
@@ -43,8 +54,9 @@ export interface BoxProps extends BaseProps {
43
54
  * length.
44
55
  * @defaultValue 24 */
45
56
  fadeSize?: number | string;
46
- /** Fired when a selected measurement field changes. `detail` contains all
47
- * fields changed since the last event and a full current snapshot. */
57
+ /** Fired when a selected measurement field changes. `detail.changed` contains
58
+ * fields changed since the previous event; `detail.current` includes the full
59
+ * snapshot with matching rects. Rect changes alone do not trigger an event. */
48
60
  onMeasureChange?: (event: CustomEvent<BoxMeasurementChange>, detail: BoxMeasurementChange) => void;
49
61
  /** Fired after Box's browser and local rendering context changes. `detail`
50
62
  * contains the changed fields and a full current snapshot. */
@@ -65,4 +77,4 @@ export interface BoxProps extends BaseProps {
65
77
  * </Box>
66
78
  * ```
67
79
  */
68
- export declare const Box: ({ display, round, gap, padding, margin, observe, throttle, fade, fadeSize, onMeasureChange, onContextChange, className, style, children, ...rest }: BoxProps) => any;
80
+ export declare const Box: ({ display, round, gap, includeRectsFor, padding, margin, observe, observeOffscreen, throttle, fade, fadeSize, onMeasureChange, onContextChange, className, style, children, ...rest }: BoxProps) => any;
@@ -18,9 +18,11 @@ const Box = ({
18
18
  display,
19
19
  round,
20
20
  gap,
21
+ includeRectsFor,
21
22
  padding,
22
23
  margin,
23
24
  observe,
25
+ observeOffscreen,
24
26
  throttle,
25
27
  fade,
26
28
  fadeSize,
@@ -42,9 +44,11 @@ const Box = ({
42
44
  display: display === "block" ? void 0 : display,
43
45
  round: roundAttr(round),
44
46
  gap: gap != null ? "" : void 0,
47
+ "include-rects-for": includeRectsFor,
45
48
  padding: padding != null ? "" : void 0,
46
49
  margin: margin != null ? "" : void 0,
47
50
  observe: observeAttr(observe, onMeasureChange, onContextChange),
51
+ "observe-offscreen": observeOffscreen ? "" : void 0,
48
52
  throttle,
49
53
  fade: fade ? "" : void 0,
50
54
  "fade-size": fade && fadeSize != null ? cssLength(fadeSize) : void 0,
@@ -23,16 +23,24 @@ export interface ExpanderProps extends Omit<BaseProps, "title"> {
23
23
  * bare disclosure).
24
24
  * @defaultValue 'secondary' */
25
25
  priority?: "primary" | "secondary" | "tertiary";
26
- /** Outdent the chevron into the left gutter so the title and body sit
27
- * flush with surrounding content (the docs-header layout). Only takes
28
- * effect with `priority="tertiary"` — on the filled priorities the
29
- * container edge has to bound the chevron, so it's a no-op there. */
26
+ /** Align the title and body with surrounding content on a tertiary
27
+ * expander. With the default start indicator, the mark hangs in the
28
+ * gutter; an end indicator stays inside its edge. */
30
29
  outdent?: boolean;
31
- /** Header actions (e.g. buttons, tags) rendered at the end of the
32
- * header row, OUTSIDE the toggle trigger — clicking them never
33
- * toggles, they're separately focusable, and screen readers see them
34
- * as separate controls. */
30
+ /** Header actions rendered outside the toggle trigger. With an end
31
+ * indicator, actions sit between the title and indicator. */
35
32
  actions?: React.ReactNode;
33
+ /** Built-in disclosure mark, a decorative node, or separate closed/open
34
+ * visuals. Other primitive values leave the indicator empty. Custom nodes
35
+ * are passive; use `actions` for controls.
36
+ * @defaultValue 'chevron' */
37
+ indicator?: "chevron" | "triangle" | "plus" | React.ReactNode | {
38
+ closed: React.ReactNode;
39
+ open: React.ReactNode;
40
+ };
41
+ /** Place the disclosure mark before the title or after the actions.
42
+ * @defaultValue 'start' */
43
+ indicatorPlacement?: "start" | "end";
36
44
  /** Disables the header: not clickable or focusable, hover affordance
37
45
  * off, text dimmed. The open state freezes as-is — disabling an open
38
46
  * expander keeps it open. `actions` stay live; disable them
@@ -76,4 +84,4 @@ export interface ExpanderProps extends Omit<BaseProps, "title"> {
76
84
  * giving real controlled semantics (a consumer can reject a toggle). See
77
85
  * STATEFUL-COMPONENTS.md.
78
86
  */
79
- export declare const Expander: ({ title, level, tone, priority, outdent, actions, disabled, round, open, defaultOpen, onStateChange, className, style, children, ...rest }: ExpanderProps) => any;
87
+ export declare const Expander: ({ title, level, tone, priority, outdent, actions, indicator, indicatorPlacement, disabled, round, open, defaultOpen, onStateChange, className, style, children, ...rest }: ExpanderProps) => any;
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "@antadesign/anta/jsx-runtime";
1
+ import { Fragment, jsx, jsxs } from "@antadesign/anta/jsx-runtime";
2
2
  import { nativeStateChange, neutralToneAttr, toneStyle, roundStyle, roundAttr } from "../anta_helpers";
3
3
  const Expander = ({
4
4
  title,
@@ -7,6 +7,8 @@ const Expander = ({
7
7
  priority,
8
8
  outdent,
9
9
  actions,
10
+ indicator,
11
+ indicatorPlacement,
10
12
  disabled,
11
13
  round,
12
14
  open,
@@ -18,6 +20,10 @@ const Expander = ({
18
20
  ...rest
19
21
  }) => {
20
22
  const controlled = open !== void 0;
23
+ const presetIndicator = typeof indicator === "string" && (indicator === "chevron" || indicator === "triangle" || indicator === "plus") ? indicator : void 0;
24
+ const pairedIndicator = indicator != null && typeof indicator === "object" && "closed" in indicator && "open" in indicator ? indicator : void 0;
25
+ const useCustomSlot = indicator != null && !presetIndicator && !pairedIndicator;
26
+ const customIndicator = typeof indicator === "object" ? indicator : null;
21
27
  const computedStyle = roundStyle(round, "--expander-round", toneStyle(tone, "--expander-tone-source", style));
22
28
  const titleNode = typeof title === "object" && title !== null ? /* @__PURE__ */ jsx("span", { slot: "title", style: { display: "contents" }, children: title }) : /* @__PURE__ */ jsx("a-expander-summary", { slot: "title", children: title });
23
29
  return /* @__PURE__ */ jsxs(
@@ -31,6 +37,8 @@ const Expander = ({
31
37
  outdent: outdent ? "" : void 0,
32
38
  round: roundAttr(round),
33
39
  disabled: disabled ? "" : void 0,
40
+ indicator: presetIndicator,
41
+ "indicator-placement": indicatorPlacement && indicatorPlacement !== "start" ? indicatorPlacement : void 0,
34
42
  onstatechange: onStateChange ? (e) => {
35
43
  const { event, detail, isOwn } = nativeStateChange(e);
36
44
  if (isOwn && detail)
@@ -45,6 +53,11 @@ const Expander = ({
45
53
  children: [
46
54
  titleNode,
47
55
  actions != null && /* @__PURE__ */ jsx("span", { slot: "actions", children: actions }),
56
+ pairedIndicator && /* @__PURE__ */ jsxs(Fragment, { children: [
57
+ /* @__PURE__ */ jsx("span", { slot: "indicator", "data-when": "closed", "aria-hidden": "true", inert: true, children: pairedIndicator.closed }),
58
+ /* @__PURE__ */ jsx("span", { slot: "indicator", "data-when": "open", "aria-hidden": "true", inert: true, children: pairedIndicator.open })
59
+ ] }),
60
+ useCustomSlot && /* @__PURE__ */ jsx("span", { slot: "indicator", "aria-hidden": "true", inert: true, children: customIndicator }),
48
61
  /* @__PURE__ */ jsx("a-expander-details", { children })
49
62
  ]
50
63
  }
@@ -1 +1 @@
1
- @layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;@layer anta.components{a-box{display:block;min-width:0}a-box[display=inline-block]{display:inline-block}a-box[display=flex]{display:flex}a-box[display=inline-flex]{display:inline-flex}a-box[display=grid]{display:grid}a-box[display=inline-grid]{display:inline-grid}a-box[gap]{gap:var(--box-gap, normal);@supports (border-radius: attr(probe type(<length>),1px)){--box-gap: attr(gap type(<length>))}}a-box[padding]{padding:var(--box-padding, 0px);@supports (padding: attr(padding type(*))){--box-padding: attr(padding type(*), 0px)}}a-box[margin]{margin:var(--box-margin, 0px);@supports (margin: attr(margin type(*))){--box-margin: attr(margin type(*), 0px)}}a-box[round]{border-radius:var(--box-round, 999px);@supports (border-radius: attr(probe type(<length>),1px)){--box-round: attr(round type(<length>))}}a-box[fade]{--box-fade-size: 24px;--box-fade-x: linear-gradient(transparent, transparent);--box-fade-y: linear-gradient(transparent, transparent);--box-fade-to-start: to left;--box-fade-to-end: to right}a-box[fade]:is(:state(hidden-start-x),:state(hidden-end-x),:state(hidden-start-y),:state(hidden-end-y)){mask-image:linear-gradient(#000,#000),var(--box-fade-x),var(--box-fade-y);mask-clip:border-box,padding-box,padding-box;mask-origin:border-box,padding-box,padding-box;mask-composite:exclude,add,add;mask-repeat:no-repeat;mask-size:100% 100%}a-box[fade][fade-size]{--box-fade-size: 24px;@supports (border-radius: attr(probe type(<length>),1px)){--box-fade-size: attr(fade-size type(<length>), 24px)}}a-box[fade]:dir(rtl){--box-fade-to-start: to right;--box-fade-to-end: to left}a-box[fade]:state(hidden-end-x){--box-fade-x: linear-gradient(var(--box-fade-to-end), transparent calc(100% - var(--box-fade-size)), black)}a-box[fade]:state(hidden-start-x){--box-fade-x: linear-gradient(var(--box-fade-to-start), transparent calc(100% - var(--box-fade-size)), black)}a-box[fade]:state(hidden-start-x):state(hidden-end-x){--box-fade-x: linear-gradient( to right, black, transparent var(--box-fade-size), transparent calc(100% - var(--box-fade-size)), black )}a-box[fade]:state(hidden-end-y){--box-fade-y: linear-gradient(to bottom, transparent calc(100% - var(--box-fade-size)), black)}a-box[fade]:state(hidden-start-y){--box-fade-y: linear-gradient(to top, transparent calc(100% - var(--box-fade-size)), black)}a-box[fade]:state(hidden-start-y):state(hidden-end-y){--box-fade-y: linear-gradient( to bottom, black, transparent var(--box-fade-size), transparent calc(100% - var(--box-fade-size)), black )}}
1
+ @layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;@property --box-fade-start-x-strength{syntax: "<number>"; inherits: false; initial-value: 0;}@property --box-fade-end-x-strength{syntax: "<number>"; inherits: false; initial-value: 0;}@property --box-fade-start-y-strength{syntax: "<number>"; inherits: false; initial-value: 0;}@property --box-fade-end-y-strength{syntax: "<number>"; inherits: false; initial-value: 0;}@layer anta.components{a-box{display:block;min-width:0;position:relative}a-box[display=inline-block]{display:inline-block}a-box[display=flex]{display:flex}a-box[display=inline-flex]{display:inline-flex}a-box[display=grid]{display:grid}a-box[display=inline-grid]{display:inline-grid}a-box[gap]{gap:var(--box-gap, normal);@supports (border-radius: attr(probe type(<length>),1px)){--box-gap: attr(gap type(<length>))}}a-box[padding]{padding:var(--box-padding, 0px);@supports (padding: attr(padding type(*))){--box-padding: attr(padding type(*), 0px)}}a-box[margin]{margin:var(--box-margin, 0px);@supports (margin: attr(margin type(*))){--box-margin: attr(margin type(*), 0px)}}a-box[round]{border-radius:var(--box-round, 999px);@supports (border-radius: attr(probe type(<length>),1px)){--box-round: attr(round type(<length>))}}a-box[fade]{--box-fade-size: 24px;--box-fade-left-strength: var(--box-fade-start-x-strength);--box-fade-right-strength: var(--box-fade-end-x-strength);transition:--box-fade-start-x-strength .14s ease-out,--box-fade-end-x-strength .14s ease-out,--box-fade-start-y-strength .14s ease-out,--box-fade-end-y-strength .14s ease-out}a-box[fade]:state(fade-mask-active){mask-image:linear-gradient(#000,#000),linear-gradient(to right,rgb(0 0 0 / var(--box-fade-left-strength)),transparent var(--box-fade-size),transparent calc(100% - var(--box-fade-size)),rgb(0 0 0 / var(--box-fade-right-strength))),linear-gradient(to bottom,rgb(0 0 0 / var(--box-fade-start-y-strength)),transparent var(--box-fade-size),transparent calc(100% - var(--box-fade-size)),rgb(0 0 0 / var(--box-fade-end-y-strength)));mask-clip:border-box,padding-box,padding-box;mask-origin:border-box,padding-box,padding-box;mask-composite:exclude,add,add;mask-repeat:no-repeat;mask-size:100% 100%}a-box[fade][fade-size]{--box-fade-size: 24px;@supports (border-radius: attr(probe type(<length>),1px)){--box-fade-size: attr(fade-size type(<length>), 24px)}}a-box[fade]:dir(rtl){--box-fade-left-strength: var(--box-fade-end-x-strength);--box-fade-right-strength: var(--box-fade-start-x-strength)}a-box[fade]:state(hidden-end-x){--box-fade-end-x-strength: 1}a-box[fade]:state(hidden-start-x){--box-fade-start-x-strength: 1}a-box[fade]:state(hidden-end-y){--box-fade-end-y-strength: 1}a-box[fade]:state(hidden-start-y){--box-fade-start-y-strength: 1}@media(prefers-reduced-motion:reduce){a-box[fade]{transition:none}}}
@@ -11,6 +11,8 @@ import './a-box.css';
11
11
  * measurement fields or presets, including `context` and `all`. `fade` keeps
12
12
  * clipping states current without selecting event fields. A box with neither
13
13
  * runs no observers at all, including the shared visibility observer.
14
+ * `observe-offscreen` opts out of the pause: measurement keeps running while
15
+ * the box is off screen, and the box skips the visibility observer entirely.
14
16
  * The `measurement` / `context` / `isTruncated` getters still read on demand.
15
17
  *
16
18
  * Attributes rather than "is a listener attached" on purpose. A listener tally
@@ -1,8 +1,9 @@
1
1
  import { HTMLElementBase } from "../anta_helpers";
2
- import { throttle } from "es-toolkit";
2
+ import { isEqual, throttle } from "es-toolkit";
3
3
  import { boxObservation } from "../box-observation";
4
4
  import "./a-box.css";
5
5
  const stores = /* @__PURE__ */ new WeakMap();
6
+ const FADE_TRANSITION_MS = 140;
6
7
  const MODE_CLASS = /(?:^|\s)(?:dark|light)(?:\s|$)/;
7
8
  function hasModeClass(element) {
8
9
  return element.classList.contains("dark") || element.classList.contains("light");
@@ -200,21 +201,13 @@ function deviceSnapshot(navigator) {
200
201
  mobile: uaData.userAgentData?.mobile ?? /android|mobi|iphone|ipad|ipod/.test(source)
201
202
  };
202
203
  }
203
- function equal(a, b) {
204
- if (a === b) return true;
205
- if (typeof a !== "object" || typeof b !== "object" || a === null || b === null) return false;
206
- const left = a;
207
- const right = b;
208
- const keys = Object.keys(left);
209
- return keys.length === Object.keys(right).length && keys.every((key) => left[key] === right[key]);
210
- }
211
204
  function same(a, b) {
212
- return a !== void 0 && Object.keys(b).every((key) => equal(a[key], b[key]));
205
+ return a !== void 0 && Object.keys(b).every((key) => isEqual(a[key], b[key]));
213
206
  }
214
207
  function changed(previous, current) {
215
208
  if (!previous) return { ...current };
216
209
  return Object.fromEntries(
217
- Object.entries(current).filter(([key, value]) => !equal(previous[key], value))
210
+ Object.entries(current).filter(([key, value]) => !isEqual(previous[key], value))
218
211
  );
219
212
  }
220
213
  function px(value) {
@@ -264,7 +257,7 @@ function rounded(value) {
264
257
  return Math.round(value * 100) / 100;
265
258
  }
266
259
  class ABoxElement extends HTMLElementBase {
267
- static observedAttributes = ["fade", "observe", "throttle"];
260
+ static observedAttributes = ["fade", "observe", "observe-offscreen", "throttle"];
268
261
  #internals = this.attachInternals?.();
269
262
  #store;
270
263
  #resizeObserver;
@@ -276,9 +269,10 @@ class ABoxElement extends HTMLElementBase {
276
269
  #measurementFields = /* @__PURE__ */ new Set();
277
270
  #watchContent = false;
278
271
  #watchScroll = false;
279
- // Filtering and throttling compare against the last event, not the last read.
272
+ // Filtering compares against the last event, not the last read.
280
273
  #reportedMeasurement;
281
274
  #throttledReport;
275
+ #fadeMaskTimer;
282
276
  #context;
283
277
  #measuring = false;
284
278
  #clips = false;
@@ -298,6 +292,7 @@ class ABoxElement extends HTMLElementBase {
298
292
  this.#sync();
299
293
  }
300
294
  disconnectedCallback() {
295
+ this.#clearFadeMask();
301
296
  this.#stopMeasuring();
302
297
  this.#stopReportingContext();
303
298
  this.#store?.unobserveVisibility(this);
@@ -311,8 +306,9 @@ class ABoxElement extends HTMLElementBase {
311
306
  and the later connect would see the flags already set and skip it. */
312
307
  attributeChangedCallback(name, previous, current) {
313
308
  if (previous === current) return;
309
+ if (name === "fade" && current === null) this.#clearFadeMask();
314
310
  if (!this.#store) return;
315
- if (name === "fade" || name === "observe") this.#sync();
311
+ if (name === "fade" || name === "observe" || name === "observe-offscreen") this.#sync();
316
312
  if (name === "throttle") this.#configureThrottle();
317
313
  if (name === "observe" || name === "throttle") this.#queueMeasurement();
318
314
  }
@@ -327,7 +323,7 @@ class ABoxElement extends HTMLElementBase {
327
323
  }
328
324
  /** Allows a nested `Tooltip truncatedOnly` to use Box's clipping decision. */
329
325
  get isTruncated() {
330
- const measurement = this.#readMeasurement();
326
+ const measurement = this.#readMeasurement(false);
331
327
  return measurement.clippedX || measurement.clippedY;
332
328
  }
333
329
  /** Called by the per-window context cache. It is intentionally not a JSX prop. */
@@ -355,11 +351,12 @@ class ABoxElement extends HTMLElementBase {
355
351
  this.#watchContent = this.hasAttribute("fade") || content;
356
352
  this.#watchScroll = this.hasAttribute("fade") || scroll;
357
353
  const wantsMeasurement = this.hasAttribute("fade") || fields.size > 0;
358
- const measure = this.isConnected && wantsMeasurement && (this.#visible ?? this.hasAttribute("fade"));
354
+ const offscreen = this.hasAttribute("observe-offscreen");
355
+ const measure = this.isConnected && wantsMeasurement && (offscreen || (this.#visible ?? this.hasAttribute("fade")));
359
356
  if (measure) this.#startMeasuring();
360
357
  else this.#stopMeasuring();
361
358
  if (this.#measuring) this.#syncMeasurementSources();
362
- if (this.isConnected && wantsMeasurement) this.#store?.observeVisibility(this);
359
+ if (this.isConnected && wantsMeasurement && !offscreen) this.#store?.observeVisibility(this);
363
360
  else this.#store?.unobserveVisibility(this);
364
361
  if (this.isConnected && wantsContext) this.#startReportingContext();
365
362
  else this.#stopReportingContext();
@@ -391,7 +388,7 @@ class ABoxElement extends HTMLElementBase {
391
388
  this.#resizeObserver = new this.view.ResizeObserver(this.#queueMeasurement);
392
389
  this.#resizeObserver.observe(this);
393
390
  this.doc.fonts?.addEventListener("loadingdone", this.#queueMeasurement);
394
- this.#measurement = this.#readMeasurement();
391
+ this.#measurement = this.#readMeasurement(false);
395
392
  this.#setMeasurementStates(this.#measurement);
396
393
  this.#syncChildObservation();
397
394
  this.#initialMeasurement = true;
@@ -488,7 +485,8 @@ class ABoxElement extends HTMLElementBase {
488
485
  this.#frame = this.view.requestAnimationFrame(() => {
489
486
  this.#frame = void 0;
490
487
  if (!this.#measuring) return;
491
- this.#reportMeasurement();
488
+ if (this.#throttledReport) this.#throttledReport();
489
+ else this.#reportMeasurement();
492
490
  });
493
491
  };
494
492
  #queueContext = () => {
@@ -502,7 +500,30 @@ class ABoxElement extends HTMLElementBase {
502
500
  this.#reportContext(initial);
503
501
  });
504
502
  };
505
- #readMeasurement() {
503
+ #readRects(rect) {
504
+ let rects = [];
505
+ const selector = this.getAttribute("include-rects-for");
506
+ if (selector) {
507
+ try {
508
+ const boxRect = rect ?? this.getBoundingClientRect();
509
+ rects = Array.from(this.querySelectorAll(selector), (element) => {
510
+ const target = element.getBoundingClientRect();
511
+ return {
512
+ top: rounded(target.top - boxRect.top),
513
+ right: rounded(target.right - boxRect.left),
514
+ bottom: rounded(target.bottom - boxRect.top),
515
+ left: rounded(target.left - boxRect.left),
516
+ width: rounded(target.width),
517
+ height: rounded(target.height)
518
+ };
519
+ });
520
+ } catch (error) {
521
+ if (!(error instanceof this.view.DOMException) || error.name !== "SyntaxError") throw error;
522
+ }
523
+ }
524
+ return rects;
525
+ }
526
+ #readMeasurement(includeRects = true) {
506
527
  const rect = this.getBoundingClientRect();
507
528
  const clientWidth = this.clientWidth;
508
529
  const clientHeight = this.clientHeight;
@@ -524,6 +545,7 @@ class ABoxElement extends HTMLElementBase {
524
545
  return {
525
546
  width: rounded(rect.width),
526
547
  height: rounded(rect.height),
548
+ rects: includeRects ? this.#readRects(rect) : [],
527
549
  clientWidth,
528
550
  clientHeight,
529
551
  scrollWidth,
@@ -559,7 +581,7 @@ class ABoxElement extends HTMLElementBase {
559
581
  this.#throttledReport = void 0;
560
582
  const interval = Number(this.getAttribute("throttle"));
561
583
  if (this.#measuring && Number.isFinite(interval) && interval > 0) {
562
- this.#throttledReport = throttle(this.#emitMeasurement, Math.min(interval, 2147483647));
584
+ this.#throttledReport = throttle(() => this.#reportMeasurement(), Math.min(interval, 2147483647));
563
585
  }
564
586
  }
565
587
  #hasMeasurementChange(current) {
@@ -572,27 +594,22 @@ class ABoxElement extends HTMLElementBase {
572
594
  return false;
573
595
  }
574
596
  #reportMeasurement() {
575
- const current = this.#readMeasurement();
597
+ const current = this.#readMeasurement(false);
576
598
  this.#measurement = current;
577
599
  this.#setMeasurementStates(current);
578
600
  this.#syncChildObservation();
579
601
  if (!this.#hasMeasurementChange(current)) return;
580
- if (this.#throttledReport) this.#throttledReport();
581
- else this.#emitMeasurement();
582
- }
583
- #emitMeasurement = () => {
584
- const current = this.#measurement;
585
- if (!this.#measuring || !current || !this.#hasMeasurementChange(current)) return;
602
+ const snapshot = { ...current, rects: this.#readRects() };
586
603
  const initial = this.#initialMeasurement;
587
604
  const previous = this.#reportedMeasurement;
588
605
  this.#initialMeasurement = false;
589
- this.#reportedMeasurement = current;
606
+ this.#reportedMeasurement = snapshot;
590
607
  const detail = {
591
- changed: initial ? { ...current } : changed(previous, current),
592
- current
608
+ changed: changed(initial ? void 0 : previous, snapshot),
609
+ current: snapshot
593
610
  };
594
611
  this.dispatchEvent(new this.view.CustomEvent("measurechange", { detail }));
595
- };
612
+ }
596
613
  #reportContext(initial) {
597
614
  const current = this.#readContext();
598
615
  const previous = this.#context;
@@ -620,6 +637,31 @@ class ABoxElement extends HTMLElementBase {
620
637
  this.#setState("hidden-end-x", measurement.hiddenEndX);
621
638
  this.#setState("hidden-start-y", measurement.hiddenStartY);
622
639
  this.#setState("hidden-end-y", measurement.hiddenEndY);
640
+ this.#syncFadeMask(measurement);
641
+ }
642
+ #syncFadeMask(measurement) {
643
+ const hidden = measurement.hiddenStartX || measurement.hiddenEndX || measurement.hiddenStartY || measurement.hiddenEndY;
644
+ if (hidden && this.hasAttribute("fade")) {
645
+ if (this.#fadeMaskTimer !== void 0) this.view.clearTimeout(this.#fadeMaskTimer);
646
+ this.#fadeMaskTimer = void 0;
647
+ this.#setState("fade-mask-active", true);
648
+ return;
649
+ }
650
+ if (!this.hasAttribute("fade")) {
651
+ this.#clearFadeMask();
652
+ return;
653
+ }
654
+ if (!this.#internals?.states?.has("fade-mask-active") || this.#fadeMaskTimer !== void 0) return;
655
+ if (this.view.matchMedia("(prefers-reduced-motion: reduce)").matches) {
656
+ this.#clearFadeMask();
657
+ return;
658
+ }
659
+ this.#fadeMaskTimer = this.view.setTimeout(() => this.#clearFadeMask(), FADE_TRANSITION_MS);
660
+ }
661
+ #clearFadeMask() {
662
+ if (this.#fadeMaskTimer !== void 0) this.view.clearTimeout(this.#fadeMaskTimer);
663
+ this.#fadeMaskTimer = void 0;
664
+ this.#setState("fade-mask-active", false);
623
665
  }
624
666
  #setState(name, active) {
625
667
  if (active) this.#internals?.states?.add(name);
@@ -114,6 +114,8 @@ const SHADOW_STYLE = `
114
114
  display: none;
115
115
  flex: 0 0 auto;
116
116
  padding: var(--dialog-header-padding, 18px 20px 8px);
117
+ overflow: clip;
118
+ overflow-wrap: anywhere;
117
119
  font-size: 17px;
118
120
  font-weight: 560;
119
121
  line-height: 24px;
@@ -1 +1 @@
1
- @layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;@layer anta.components{a-expander,details[data-anta]{--_expander-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3e%3cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 18 6-6-6-6'/%3e%3c/svg%3e")}a-expander{--expander-text: var(--text-2);--expander-text-hover: var(--text-1);--expander-bg-secondary: var(--bg-2);--expander-border-secondary: var(--border-5);--expander-bg-primary: var(--bg-4);--expander-border-primary: var(--border-4);--expander-bg: var(--expander-bg-secondary);--expander-border: var(--expander-border-secondary);--expander-bg-hover-lift: .01;--expander-bg-hover: oklch(from var(--expander-bg) calc(l + var(--expander-bg-hover-lift)) c h);--expander-gutter: 24px;display:block;width:100%;box-sizing:border-box;border:1px solid var(--expander-border);border-radius:4px;color:var(--expander-text);background:var(--expander-bg);transition:background-color .1s ease}a-expander[round]{border-radius:var(--expander-round, var(--_expander-round-radius, 999px));@supports (border-radius: attr(probe type(<length>),1px)){--expander-round: attr(round type(<length>))}}a-expander>span[slot=actions]{display:contents}a-expander:not(:defined) a-expander-details{display:none}a-expander:not(:defined)[state=open] a-expander-details,a-expander:not(:defined)[default-state=open] a-expander-details{display:block}a-expander:not(:defined) a-expander-summary{position:relative;padding:6px 4px 6px var(--expander-gutter)}a-expander:not(:defined) a-expander-summary:before{content:"";position:absolute;left:calc(var(--expander-gutter) - 16px - 2px);top:50%;width:16px;height:16px;transform:translateY(-50%);background-color:currentColor;-webkit-mask:var(--_expander-chevron) center / contain no-repeat;mask:var(--_expander-chevron) center / contain no-repeat;opacity:.6}a-expander:not(:defined){display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center}a-expander:not(:defined) a-expander-summary{grid-column:1}a-expander:not(:defined)>[slot=actions]{grid-column:2;display:flex;align-items:center;gap:2px;flex-shrink:0;margin-inline-start:8px;margin-inline-end:4px}a-expander:not(:defined) a-expander-details{grid-column:1 / -1}a-expander-summary{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;line-height:20px;font-weight:584.62;letter-spacing:0;text-decoration-line:var(--_summary-underline, none);text-decoration-style:dotted;text-decoration-color:color-mix(in oklch,currentColor 75%,transparent);text-decoration-thickness:1px;text-underline-offset:3px;transition:color .15s ease}a-expander[level="1"] a-expander-summary{font-size:28px;line-height:32px}a-expander[level="2"] a-expander-summary{font-size:24px;line-height:28px}a-expander[level="3"] a-expander-summary{font-size:20px;line-height:24px}a-expander[level="4"] a-expander-summary{font-size:17px;line-height:20px}a-expander[level="6"] a-expander-summary{font-size:13px;line-height:16px}a-expander-details{display:block;padding:2px 4px 6px var(--expander-gutter);line-height:20px;overflow:auto}a-expander[priority=tertiary][outdent] a-expander-details{padding-inline-start:4px;margin-inline-start:-4px}a-expander[priority=primary]{--expander-bg: var(--expander-bg-primary);--expander-border: var(--expander-border-primary)}a-expander[priority=tertiary]{--expander-bg: transparent;--expander-border: transparent}a-expander:not([disabled]):not(:state(open)):hover{background:var(--expander-bg-hover)}a-expander:not([disabled]):not(:state(open)):active{background:var(--expander-bg)}a-expander[priority=tertiary][outdent]{--expander-gutter: 0px}a-expander[tone=brand]{--expander-text: var(--text-2-brand);--expander-text-hover: var(--text-1-brand);--expander-bg-secondary: var(--bg-2-brand);--expander-border-secondary: var(--border-5-brand);--expander-bg-primary: var(--bg-4-brand);--expander-border-primary: var(--border-4-brand)}a-expander[tone=info]{--expander-text: var(--text-2-info);--expander-text-hover: var(--text-1-info);--expander-bg-secondary: var(--bg-2-info);--expander-border-secondary: var(--border-5-info);--expander-bg-primary: var(--bg-4-info);--expander-border-primary: var(--border-4-info)}a-expander[tone=success]{--expander-text: var(--text-2-success);--expander-text-hover: var(--text-1-success);--expander-bg-secondary: var(--bg-2-success);--expander-border-secondary: var(--border-5-success);--expander-bg-primary: var(--bg-4-success);--expander-border-primary: var(--border-4-success)}a-expander[tone=warning]{--expander-text: var(--text-2-warning);--expander-text-hover: var(--text-1-warning);--expander-bg-secondary: var(--bg-2-warning);--expander-border-secondary: var(--border-5-warning);--expander-bg-primary: var(--bg-4-warning);--expander-border-primary: var(--border-4-warning)}a-expander[tone=critical]{--expander-text: var(--text-2-critical);--expander-text-hover: var(--text-1-critical);--expander-bg-secondary: var(--bg-2-critical);--expander-border-secondary: var(--border-5-critical);--expander-bg-primary: var(--bg-4-critical);--expander-border-primary: var(--border-4-critical)}a-expander[tone]:not([tone=neutral],[tone=brand],[tone=info],[tone=success],[tone=warning],[tone=critical]){--expander-tone-source: currentColor;--expander-text: light-dark(oklch(from var(--expander-tone-source) .5 .125 h), oklch(from var(--expander-tone-source) .77 .11 h));--expander-text-hover: light-dark(oklch(from var(--expander-tone-source) .4 .11 h), oklch(from var(--expander-tone-source) .85 .1 h));--expander-bg-secondary: light-dark(oklch(from var(--expander-tone-source) .99 .004 h), oklch(from var(--expander-tone-source) .13 .02 h));--expander-border-secondary: light-dark(oklch(from var(--expander-tone-source) .935 .028 h), oklch(from var(--expander-tone-source) .21 .045 h));--expander-bg-primary: light-dark(oklch(from var(--expander-tone-source) .955 .02 h), oklch(from var(--expander-tone-source) .185 .05 h));--expander-border-primary: light-dark(oklch(from var(--expander-tone-source) .9 .04 h), oklch(from var(--expander-tone-source) .26 .06 h));@supports (color: attr(probe type(<color>),red)){--expander-tone-source: attr(tone type(<color>), currentColor)}}a-expander[disabled],a-expander[disabled][tone]{--expander-text: light-dark(#afa9b1, #635b65)}details[data-anta]{--native-expander-gutter: 24px;--native-expander-summary-padding-block: 6px;--native-expander-summary-font-size: 15px;--native-expander-summary-line-height: 20px;--native-expander-chevron-size: 16px;--native-expander-text: var(--text-2);--native-expander-text-hover: var(--text-1);--native-expander-bg-secondary: var(--bg-2);--native-expander-border-secondary: var(--border-5);--native-expander-bg-primary: var(--bg-4);--native-expander-border-primary: var(--border-4);--native-expander-round-size: 16px;--native-expander-round: 4px;--native-expander-bg: transparent;--native-expander-border: transparent;display:block;inline-size:100%;box-sizing:border-box;border:0 solid var(--native-expander-border);border-radius:var(--native-expander-round);color:var(--native-expander-text);background:var(--native-expander-bg);font-family:var(--sans-serif);font-size:15px;line-height:var(--native-expander-summary-line-height);transition:background-color .1s ease}details[data-anta][priority=secondary]{--native-expander-bg: var(--native-expander-bg-secondary);--native-expander-border: var(--native-expander-border-secondary);border-width:1px}details[data-anta][priority=primary]{--native-expander-bg: var(--native-expander-bg-primary);--native-expander-border: var(--native-expander-border-primary);border-width:1px}details[data-anta][level="1"]{--native-expander-summary-font-size: 28px;--native-expander-summary-line-height: 32px;--native-expander-round-size: 22px}details[data-anta][level="2"]{--native-expander-summary-font-size: 24px;--native-expander-summary-line-height: 28px;--native-expander-round-size: 20px}details[data-anta][level="3"]{--native-expander-summary-font-size: 20px;--native-expander-summary-line-height: 24px;--native-expander-round-size: 18px}details[data-anta][level="4"]{--native-expander-summary-font-size: 17px;--native-expander-summary-line-height: 20px}details[data-anta][level="6"]{--native-expander-summary-font-size: 13px;--native-expander-summary-line-height: 16px;--native-expander-round-size: 14px}details[data-anta][round]{--native-expander-round: var(--native-expander-round-size)}details[data-anta][round]:not([round=""]){--native-expander-round: var(--native-expander-round-size);@supports (border-radius: attr(probe type(<length>),1px)){--native-expander-round: attr(round type(<length>), var(--native-expander-round-size))}}details[data-anta][priority=tertiary][outdent]{--native-expander-gutter: 0px}details[data-anta][tone=brand]{--native-expander-text: var(--text-2-brand);--native-expander-text-hover: var(--text-1-brand);--native-expander-bg-secondary: var(--bg-2-brand);--native-expander-border-secondary: var(--border-5-brand);--native-expander-bg-primary: var(--bg-4-brand);--native-expander-border-primary: var(--border-4-brand)}details[data-anta][tone=info]{--native-expander-text: var(--text-2-info);--native-expander-text-hover: var(--text-1-info);--native-expander-bg-secondary: var(--bg-2-info);--native-expander-border-secondary: var(--border-5-info);--native-expander-bg-primary: var(--bg-4-info);--native-expander-border-primary: var(--border-4-info)}details[data-anta][tone=success]{--native-expander-text: var(--text-2-success);--native-expander-text-hover: var(--text-1-success);--native-expander-bg-secondary: var(--bg-2-success);--native-expander-border-secondary: var(--border-5-success);--native-expander-bg-primary: var(--bg-4-success);--native-expander-border-primary: var(--border-4-success)}details[data-anta][tone=warning]{--native-expander-text: var(--text-2-warning);--native-expander-text-hover: var(--text-1-warning);--native-expander-bg-secondary: var(--bg-2-warning);--native-expander-border-secondary: var(--border-5-warning);--native-expander-bg-primary: var(--bg-4-warning);--native-expander-border-primary: var(--border-4-warning)}details[data-anta][tone=critical]{--native-expander-text: var(--text-2-critical);--native-expander-text-hover: var(--text-1-critical);--native-expander-bg-secondary: var(--bg-2-critical);--native-expander-border-secondary: var(--border-5-critical);--native-expander-bg-primary: var(--bg-4-critical);--native-expander-border-primary: var(--border-4-critical)}details[data-anta][tone]:not([tone=""],[tone=neutral],[tone=brand],[tone=info],[tone=success],[tone=warning],[tone=critical]){--native-expander-tone-source: currentColor;--native-expander-text: light-dark(oklch(from var(--native-expander-tone-source) .5 .125 h), oklch(from var(--native-expander-tone-source) .77 .11 h));--native-expander-text-hover: light-dark(oklch(from var(--native-expander-tone-source) .4 .11 h), oklch(from var(--native-expander-tone-source) .85 .1 h));--native-expander-bg-secondary: light-dark(oklch(from var(--native-expander-tone-source) .99 .004 h), oklch(from var(--native-expander-tone-source) .13 .02 h));--native-expander-border-secondary: light-dark(oklch(from var(--native-expander-tone-source) .935 .028 h), oklch(from var(--native-expander-tone-source) .21 .045 h));--native-expander-bg-primary: light-dark(oklch(from var(--native-expander-tone-source) .955 .02 h), oklch(from var(--native-expander-tone-source) .185 .05 h));--native-expander-border-primary: light-dark(oklch(from var(--native-expander-tone-source) .9 .04 h), oklch(from var(--native-expander-tone-source) .26 .06 h));@supports (color: attr(probe type(<color>),red)){--native-expander-tone-source: attr(tone type(<color>), currentColor)}}details[data-anta]>summary{position:relative;box-sizing:border-box;display:block;min-width:0;padding:var(--native-expander-summary-padding-block) 4px var(--native-expander-summary-padding-block) var(--native-expander-gutter);color:inherit;cursor:pointer;font:inherit;font-variation-settings:inherit;font-size:var(--native-expander-summary-font-size);line-height:var(--native-expander-summary-line-height);font-weight:584.62;letter-spacing:0;list-style:none;text-decoration-line:none;transition:color .15s ease}details[data-anta]>summary::-webkit-details-marker{display:none}details[data-anta]>summary::marker{content:""}details[data-anta]>summary:before{content:"";position:absolute;left:calc(var(--native-expander-gutter) - var(--native-expander-chevron-size) - 2px);top:var(--native-expander-summary-padding-block);width:var(--native-expander-chevron-size);height:var(--native-expander-summary-line-height);background-color:currentColor;-webkit-mask:var(--_expander-chevron) center / var(--native-expander-chevron-size) no-repeat;mask:var(--_expander-chevron) center / var(--native-expander-chevron-size) no-repeat;opacity:.6;transform:rotate(0);transition:transform .15s ease,opacity .15s ease,background-color .15s ease}details[data-anta][open]>summary:before{opacity:1;transform:rotate(90deg)}details[data-anta]:is([priority=primary],[priority=secondary]):not([open]):hover{background:oklch(from var(--native-expander-bg) calc(l + .01) c h)}details[data-anta]:is([priority=primary],[priority=secondary]):not([open]):active{background:var(--native-expander-bg)}details[data-anta]>summary:hover{color:var(--native-expander-text-hover);text-decoration-line:underline;text-decoration-style:dotted;text-decoration-color:color-mix(in oklch,currentColor 75%,transparent);text-decoration-thickness:1px;text-underline-offset:3px}details[data-anta]>summary:hover:before{opacity:1}details[data-anta]>summary:active{color:var(--native-expander-text)}details[data-anta]>summary:focus-visible{outline:1px solid var(--focus-ring);outline-offset:1px}details[data-anta]>:not(summary){display:block;padding:2px 4px 6px var(--native-expander-gutter);line-height:20px}@media(forced-colors:active){:is(a-expander,details[data-anta]){border-color:CanvasText}:is(a-expander,details[data-anta]):not([priority=primary],[priority=tertiary]){border-style:dashed}:is(a-expander,details[data-anta])[priority=tertiary]{border-color:Canvas}a-expander::part(summary):before,a-expander:not(:defined) a-expander-summary:before,details[data-anta]>summary:before{forced-color-adjust:none;background-color:CanvasText}a-expander[disabled]::part(summary):before{background-color:GrayText}}}a-expander-details>p:last-child,a-expander-details>:not([slot])>p:last-child,details[data-anta]>p:last-child,details[data-anta]>:not(summary)>p:last-child{margin-block-end:0}
1
+ @layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;@layer anta.components{a-expander,details[data-anta]{--_expander-chevron: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24'%3e%3cpath stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m9 18 6-6-6-6'/%3e%3c/svg%3e")}a-expander{--expander-text: var(--text-2);--expander-text-hover: var(--text-1);--expander-bg-secondary: var(--bg-2);--expander-border-secondary: var(--border-5);--expander-bg-primary: var(--bg-4);--expander-border-primary: var(--border-4);--expander-bg: var(--expander-bg-secondary);--expander-border: var(--expander-border-secondary);--expander-bg-hover-lift: .01;--expander-bg-hover: oklch(from var(--expander-bg) calc(l + var(--expander-bg-hover-lift)) c h);--expander-gutter: 24px;--_expander-indicator-size: 16px;--_expander-indicator-edge: 6px;--_expander-indicator-gap: 2px;--_expander-indicator-stroke: 2px;--_expander-indicator-track: calc(var(--_expander-indicator-edge) + var(--_expander-indicator-size) + var(--_expander-indicator-gap));--_expander-indicator-start: calc(var(--expander-gutter) - var(--_expander-indicator-size) - var(--_expander-indicator-gap));--_expander-indicator-mask: var(--_expander-chevron);--_expander-skeleton-indicator-start: var(--_expander-indicator-start);--_expander-skeleton-indicator-end: auto;--_expander-skeleton-indicator-top: 50%;--_expander-skeleton-indicator-transform: translateY(-50%);--_expander-header-padding-block: 6px;--_expander-header-padding-end: 4px;--_expander-actions-gap: 2px;--_expander-actions-start: 8px;--_expander-actions-end: 4px;display:block;width:100%;box-sizing:border-box;border:1px solid var(--expander-border);border-radius:4px;color:var(--expander-text);background:var(--expander-bg);transition:background-color .1s ease}a-expander[indicator-placement=end]{--expander-gutter: 12px;--_expander-skeleton-indicator-start: auto;--_expander-skeleton-indicator-end: var(--_expander-indicator-edge);--_expander-skeleton-indicator-top: 8px;--_expander-skeleton-indicator-transform: rotate(90deg);--_expander-actions-end: var(--_expander-actions-gap)}a-expander[indicator=triangle]{--_expander-indicator-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M5 2.5 12 8l-7 5.5z'/%3E%3C/svg%3E")}a-expander[indicator=plus]{--_expander-indicator-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M7 2h2v12H7zM2 7h12v2H2z'/%3E%3C/svg%3E")}a-expander:not(:defined):has(>[slot=indicator]){--_expander-skeleton-indicator-display: none}a-expander[round]{border-radius:var(--expander-round, var(--_expander-round-radius, 999px));@supports (border-radius: attr(probe type(<length>),1px)){--expander-round: attr(round type(<length>))}}a-expander>span[slot=actions]{display:contents}a-expander:not(:defined) a-expander-details{display:none}a-expander:not(:defined)[state=open] a-expander-details,a-expander:not(:defined)[default-state=open] a-expander-details{display:block}a-expander:not(:defined) a-expander-summary{position:relative;padding:var(--_expander-header-padding-block) var(--_expander-header-padding-end) var(--_expander-header-padding-block) var(--expander-gutter)}a-expander:not(:defined) a-expander-summary:before{content:"";display:var(--_expander-skeleton-indicator-display, block);position:absolute;inset-inline-start:var(--_expander-skeleton-indicator-start);inset-inline-end:var(--_expander-skeleton-indicator-end);top:var(--_expander-skeleton-indicator-top);width:var(--_expander-indicator-size);height:var(--_expander-indicator-size);transform:var(--_expander-skeleton-indicator-transform);background-color:currentColor;-webkit-mask:var(--_expander-indicator-mask) center / contain no-repeat;mask:var(--_expander-indicator-mask) center / contain no-repeat;opacity:.6;pointer-events:none}a-expander:not(:defined)[indicator-placement=end] a-expander-summary{position:static;grid-column:1;padding-inline-start:var(--expander-gutter);padding-inline-end:var(--_expander-header-padding-end)}a-expander:not(:defined)>[slot=indicator]{display:grid;place-items:center;position:absolute;inset-inline-start:var(--_expander-indicator-start);top:8px;width:var(--_expander-indicator-size);height:var(--_expander-indicator-size);pointer-events:none}a-expander:not(:defined)[indicator-placement=end]>[slot=indicator]{inset-inline-start:auto;inset-inline-end:var(--_expander-indicator-edge)}a-expander:not(:defined)>[slot=indicator][data-when=open]{display:none}a-expander:not(:defined):is([state=open],[default-state=open])>[slot=indicator][data-when=open]{display:grid}a-expander:not(:defined):is([state=open],[default-state=open])>[slot=indicator][data-when=closed]{display:none}a-expander:not(:defined):is([state=open],[default-state=open])>[slot=indicator]:not([data-when]){transform:rotate(90deg)}a-expander:not(:defined)[indicator-placement=end]:is([state=open],[default-state=open])>[slot=indicator]:not([data-when]){transform:rotate(180deg)}a-expander:not(:defined)[indicator-placement=end]{grid-template-columns:minmax(0,1fr) auto var(--_expander-indicator-track)}a-expander:not(:defined){display:grid;position:relative;grid-template-columns:minmax(0,1fr) auto;align-items:center}a-expander:not(:defined) a-expander-summary{grid-column:1}a-expander:not(:defined)>[slot=actions]{grid-column:2;display:flex;align-items:center;gap:var(--_expander-actions-gap);flex-shrink:0;margin-inline-start:var(--_expander-actions-start);margin-inline-end:var(--_expander-actions-end)}a-expander:not(:defined) a-expander-details{grid-column:1 / -1}a-expander-summary{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:15px;line-height:20px;font-weight:584.62;letter-spacing:0;text-decoration-line:var(--_summary-underline, none);text-decoration-style:dotted;text-decoration-color:color-mix(in oklch,currentColor 75%,transparent);text-decoration-thickness:1px;text-underline-offset:3px;transition:color .15s ease}a-expander[level="1"] a-expander-summary{font-size:28px;line-height:32px}a-expander[level="2"] a-expander-summary{font-size:24px;line-height:28px}a-expander[level="3"] a-expander-summary{font-size:20px;line-height:24px}a-expander[level="4"] a-expander-summary{font-size:17px;line-height:20px}a-expander[level="6"] a-expander-summary{font-size:13px;line-height:16px}a-expander-details{display:block;padding:2px 4px 6px var(--expander-gutter);line-height:20px;overflow:auto}a-expander[indicator-placement=end] a-expander-details{padding-inline-start:var(--expander-gutter)}a-expander[priority=tertiary][outdent] a-expander-details{padding-inline-start:4px;margin-inline-start:-4px}a-expander[priority=primary]{--expander-bg: var(--expander-bg-primary);--expander-border: var(--expander-border-primary)}a-expander[priority=tertiary]{--expander-bg: transparent;--expander-border: transparent}a-expander:not([disabled]):not(:state(open)):hover{background:var(--expander-bg-hover)}a-expander:not([disabled]):not(:state(open)):active{background:var(--expander-bg)}a-expander[priority=tertiary][outdent]{--expander-gutter: 0px}a-expander[tone=brand]{--expander-text: var(--text-2-brand);--expander-text-hover: var(--text-1-brand);--expander-bg-secondary: var(--bg-2-brand);--expander-border-secondary: var(--border-5-brand);--expander-bg-primary: var(--bg-4-brand);--expander-border-primary: var(--border-4-brand)}a-expander[tone=info]{--expander-text: var(--text-2-info);--expander-text-hover: var(--text-1-info);--expander-bg-secondary: var(--bg-2-info);--expander-border-secondary: var(--border-5-info);--expander-bg-primary: var(--bg-4-info);--expander-border-primary: var(--border-4-info)}a-expander[tone=success]{--expander-text: var(--text-2-success);--expander-text-hover: var(--text-1-success);--expander-bg-secondary: var(--bg-2-success);--expander-border-secondary: var(--border-5-success);--expander-bg-primary: var(--bg-4-success);--expander-border-primary: var(--border-4-success)}a-expander[tone=warning]{--expander-text: var(--text-2-warning);--expander-text-hover: var(--text-1-warning);--expander-bg-secondary: var(--bg-2-warning);--expander-border-secondary: var(--border-5-warning);--expander-bg-primary: var(--bg-4-warning);--expander-border-primary: var(--border-4-warning)}a-expander[tone=critical]{--expander-text: var(--text-2-critical);--expander-text-hover: var(--text-1-critical);--expander-bg-secondary: var(--bg-2-critical);--expander-border-secondary: var(--border-5-critical);--expander-bg-primary: var(--bg-4-critical);--expander-border-primary: var(--border-4-critical)}a-expander[tone]:not([tone=neutral],[tone=brand],[tone=info],[tone=success],[tone=warning],[tone=critical]){--expander-tone-source: currentColor;--expander-text: light-dark(oklch(from var(--expander-tone-source) .5 .125 h), oklch(from var(--expander-tone-source) .77 .11 h));--expander-text-hover: light-dark(oklch(from var(--expander-tone-source) .4 .11 h), oklch(from var(--expander-tone-source) .85 .1 h));--expander-bg-secondary: light-dark(oklch(from var(--expander-tone-source) .99 .004 h), oklch(from var(--expander-tone-source) .13 .02 h));--expander-border-secondary: light-dark(oklch(from var(--expander-tone-source) .935 .028 h), oklch(from var(--expander-tone-source) .21 .045 h));--expander-bg-primary: light-dark(oklch(from var(--expander-tone-source) .955 .02 h), oklch(from var(--expander-tone-source) .185 .05 h));--expander-border-primary: light-dark(oklch(from var(--expander-tone-source) .9 .04 h), oklch(from var(--expander-tone-source) .26 .06 h));@supports (color: attr(probe type(<color>),red)){--expander-tone-source: attr(tone type(<color>), currentColor)}}a-expander[disabled],a-expander[disabled][tone]{--expander-text: light-dark(#afa9b1, #635b65)}details[data-anta]{--native-expander-gutter: 24px;--native-expander-summary-padding-block: 6px;--native-expander-summary-font-size: 15px;--native-expander-summary-line-height: 20px;--native-expander-chevron-size: 16px;--native-expander-text: var(--text-2);--native-expander-text-hover: var(--text-1);--native-expander-bg-secondary: var(--bg-2);--native-expander-border-secondary: var(--border-5);--native-expander-bg-primary: var(--bg-4);--native-expander-border-primary: var(--border-4);--native-expander-round-size: 16px;--native-expander-round: 4px;--native-expander-bg: transparent;--native-expander-border: transparent;display:block;inline-size:100%;box-sizing:border-box;border:0 solid var(--native-expander-border);border-radius:var(--native-expander-round);color:var(--native-expander-text);background:var(--native-expander-bg);font-family:var(--sans-serif);font-size:15px;line-height:var(--native-expander-summary-line-height);transition:background-color .1s ease}details[data-anta][priority=secondary]{--native-expander-bg: var(--native-expander-bg-secondary);--native-expander-border: var(--native-expander-border-secondary);border-width:1px}details[data-anta][priority=primary]{--native-expander-bg: var(--native-expander-bg-primary);--native-expander-border: var(--native-expander-border-primary);border-width:1px}details[data-anta][level="1"]{--native-expander-summary-font-size: 28px;--native-expander-summary-line-height: 32px;--native-expander-round-size: 22px}details[data-anta][level="2"]{--native-expander-summary-font-size: 24px;--native-expander-summary-line-height: 28px;--native-expander-round-size: 20px}details[data-anta][level="3"]{--native-expander-summary-font-size: 20px;--native-expander-summary-line-height: 24px;--native-expander-round-size: 18px}details[data-anta][level="4"]{--native-expander-summary-font-size: 17px;--native-expander-summary-line-height: 20px}details[data-anta][level="6"]{--native-expander-summary-font-size: 13px;--native-expander-summary-line-height: 16px;--native-expander-round-size: 14px}details[data-anta][round]{--native-expander-round: var(--native-expander-round-size)}details[data-anta][round]:not([round=""]){--native-expander-round: var(--native-expander-round-size);@supports (border-radius: attr(probe type(<length>),1px)){--native-expander-round: attr(round type(<length>), var(--native-expander-round-size))}}details[data-anta][priority=tertiary][outdent]{--native-expander-gutter: 0px}details[data-anta][tone=brand]{--native-expander-text: var(--text-2-brand);--native-expander-text-hover: var(--text-1-brand);--native-expander-bg-secondary: var(--bg-2-brand);--native-expander-border-secondary: var(--border-5-brand);--native-expander-bg-primary: var(--bg-4-brand);--native-expander-border-primary: var(--border-4-brand)}details[data-anta][tone=info]{--native-expander-text: var(--text-2-info);--native-expander-text-hover: var(--text-1-info);--native-expander-bg-secondary: var(--bg-2-info);--native-expander-border-secondary: var(--border-5-info);--native-expander-bg-primary: var(--bg-4-info);--native-expander-border-primary: var(--border-4-info)}details[data-anta][tone=success]{--native-expander-text: var(--text-2-success);--native-expander-text-hover: var(--text-1-success);--native-expander-bg-secondary: var(--bg-2-success);--native-expander-border-secondary: var(--border-5-success);--native-expander-bg-primary: var(--bg-4-success);--native-expander-border-primary: var(--border-4-success)}details[data-anta][tone=warning]{--native-expander-text: var(--text-2-warning);--native-expander-text-hover: var(--text-1-warning);--native-expander-bg-secondary: var(--bg-2-warning);--native-expander-border-secondary: var(--border-5-warning);--native-expander-bg-primary: var(--bg-4-warning);--native-expander-border-primary: var(--border-4-warning)}details[data-anta][tone=critical]{--native-expander-text: var(--text-2-critical);--native-expander-text-hover: var(--text-1-critical);--native-expander-bg-secondary: var(--bg-2-critical);--native-expander-border-secondary: var(--border-5-critical);--native-expander-bg-primary: var(--bg-4-critical);--native-expander-border-primary: var(--border-4-critical)}details[data-anta][tone]:not([tone=""],[tone=neutral],[tone=brand],[tone=info],[tone=success],[tone=warning],[tone=critical]){--native-expander-tone-source: currentColor;--native-expander-text: light-dark(oklch(from var(--native-expander-tone-source) .5 .125 h), oklch(from var(--native-expander-tone-source) .77 .11 h));--native-expander-text-hover: light-dark(oklch(from var(--native-expander-tone-source) .4 .11 h), oklch(from var(--native-expander-tone-source) .85 .1 h));--native-expander-bg-secondary: light-dark(oklch(from var(--native-expander-tone-source) .99 .004 h), oklch(from var(--native-expander-tone-source) .13 .02 h));--native-expander-border-secondary: light-dark(oklch(from var(--native-expander-tone-source) .935 .028 h), oklch(from var(--native-expander-tone-source) .21 .045 h));--native-expander-bg-primary: light-dark(oklch(from var(--native-expander-tone-source) .955 .02 h), oklch(from var(--native-expander-tone-source) .185 .05 h));--native-expander-border-primary: light-dark(oklch(from var(--native-expander-tone-source) .9 .04 h), oklch(from var(--native-expander-tone-source) .26 .06 h));@supports (color: attr(probe type(<color>),red)){--native-expander-tone-source: attr(tone type(<color>), currentColor)}}details[data-anta]>summary{position:relative;box-sizing:border-box;display:block;min-width:0;padding:var(--native-expander-summary-padding-block) 4px var(--native-expander-summary-padding-block) var(--native-expander-gutter);color:inherit;cursor:pointer;font:inherit;font-variation-settings:inherit;font-size:var(--native-expander-summary-font-size);line-height:var(--native-expander-summary-line-height);font-weight:584.62;letter-spacing:0;list-style:none;text-decoration-line:none;transition:color .15s ease}details[data-anta]>summary::-webkit-details-marker{display:none}details[data-anta]>summary::marker{content:""}details[data-anta]>summary:before{content:"";position:absolute;left:calc(var(--native-expander-gutter) - var(--native-expander-chevron-size) - 2px);top:var(--native-expander-summary-padding-block);width:var(--native-expander-chevron-size);height:var(--native-expander-summary-line-height);background-color:currentColor;-webkit-mask:var(--_expander-chevron) center / var(--native-expander-chevron-size) no-repeat;mask:var(--_expander-chevron) center / var(--native-expander-chevron-size) no-repeat;opacity:.6;transform:rotate(0);transition:transform .15s ease,opacity .15s ease,background-color .15s ease}details[data-anta][open]>summary:before{opacity:1;transform:rotate(90deg)}details[data-anta]:is([priority=primary],[priority=secondary]):not([open]):hover{background:oklch(from var(--native-expander-bg) calc(l + .01) c h)}details[data-anta]:is([priority=primary],[priority=secondary]):not([open]):active{background:var(--native-expander-bg)}details[data-anta]>summary:hover{color:var(--native-expander-text-hover);text-decoration-line:underline;text-decoration-style:dotted;text-decoration-color:color-mix(in oklch,currentColor 75%,transparent);text-decoration-thickness:1px;text-underline-offset:3px}details[data-anta]>summary:hover:before{opacity:1}details[data-anta]>summary:active{color:var(--native-expander-text)}details[data-anta]>summary:focus-visible{outline:1px solid var(--focus-ring);outline-offset:1px}details[data-anta]>:not(summary){display:block;padding:2px 4px 6px var(--native-expander-gutter);line-height:20px}@media(forced-colors:active){:is(a-expander,details[data-anta]){border-color:CanvasText}:is(a-expander,details[data-anta]):not([priority=primary],[priority=tertiary]){border-style:dashed}:is(a-expander,details[data-anta])[priority=tertiary]{border-color:Canvas}a-expander::part(indicator){forced-color-adjust:none;color:CanvasText}a-expander[disabled]::part(indicator){color:GrayText}a-expander:not(:defined) a-expander-summary:before,details[data-anta]>summary:before{forced-color-adjust:none;background-color:CanvasText}a-expander:not(:defined)[disabled] a-expander-summary:before{background-color:GrayText}}}a-expander-details>p:last-child,a-expander-details>:not([slot])>p:last-child,details[data-anta]>p:last-child,details[data-anta]>:not(summary)>p:last-child{margin-block-end:0}