@antadesign/anta 0.3.28 → 0.3.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICES.md +32 -1
- package/dist/anta_helpers.d.ts +21 -0
- package/dist/anta_helpers.js +24 -0
- package/dist/box-observation.d.ts +8 -0
- package/dist/box-observation.js +41 -0
- package/dist/box-types.d.ts +2 -0
- package/dist/bundle.css +1 -1
- package/dist/bundle.js +66 -29
- package/dist/components/Box.d.ts +28 -12
- package/dist/components/Box.js +18 -11
- package/dist/components/Breadcrumbs.css +1 -1
- package/dist/components/Breadcrumbs.d.ts +1 -1
- package/dist/components/Button.d.ts +3 -3
- package/dist/components/ButtonCopy.d.ts +1 -1
- package/dist/components/Calendar.js +3 -5
- package/dist/components/Checkbox.d.ts +2 -2
- package/dist/components/Input.d.ts +8 -2
- package/dist/components/Input.js +4 -0
- package/dist/components/InputAutocomplete.js +3 -12
- package/dist/components/InputDate.css +1 -1
- package/dist/components/InputDate.js +2 -0
- package/dist/components/Menu.d.ts +4 -4
- package/dist/components/Menu.js +1 -1
- package/dist/components/Panel.d.ts +17 -0
- package/dist/components/Panel.js +22 -0
- package/dist/components/RadioGroup.d.ts +2 -1
- package/dist/components/Select.d.ts +14 -14
- package/dist/components/Select.js +47 -35
- package/dist/components/SelectFaceted.d.ts +17 -6
- package/dist/components/SelectFaceted.js +61 -41
- package/dist/components/Steps.css +1 -1
- package/dist/components/Switch.d.ts +3 -3
- package/dist/components/TabPanel.d.ts +3 -8
- package/dist/components/TabPanel.js +2 -1
- package/dist/components/Tabs.d.ts +2 -2
- package/dist/components/Tabs.js +2 -1
- package/dist/components/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip.js +1 -1
- package/dist/components/select-parts.css +1 -1
- package/dist/elements/a-avatar.css +1 -1
- package/dist/elements/a-banner.css +1 -1
- package/dist/elements/a-box.css +1 -1
- package/dist/elements/a-box.d.ts +6 -6
- package/dist/elements/a-box.js +76 -23
- package/dist/elements/a-button.css +1 -1
- package/dist/elements/a-button.d.ts +9 -1
- package/dist/elements/a-button.js +64 -1
- package/dist/elements/a-calendar.css +1 -1
- package/dist/elements/a-capture.css +1 -1
- package/dist/elements/a-card.css +1 -1
- package/dist/elements/a-checkbox.css +1 -1
- package/dist/elements/a-checkbox.d.ts +3 -0
- package/dist/elements/a-checkbox.js +17 -1
- package/dist/elements/a-copy.css +1 -1
- package/dist/elements/a-dialog.css +1 -1
- package/dist/elements/a-expander.css +1 -1
- package/dist/elements/a-icon.css +1 -1
- package/dist/elements/a-icon.shapes.css +1 -1
- package/dist/elements/a-icon.shapes.d.ts +1 -1
- package/dist/elements/a-input-time.css +1 -1
- package/dist/elements/a-input-time.d.ts +8 -0
- package/dist/elements/a-input-time.js +115 -8
- package/dist/elements/a-input.css +1 -1
- package/dist/elements/a-input.d.ts +27 -1
- package/dist/elements/a-input.js +176 -35
- package/dist/elements/a-loader.css +1 -1
- package/dist/elements/a-menu-group.css +1 -1
- package/dist/elements/a-menu-item.css +1 -1
- package/dist/elements/a-menu-item.js +1 -0
- package/dist/elements/a-menu-separator.css +1 -1
- package/dist/elements/a-menu.css +1 -1
- package/dist/elements/a-menu.d.ts +8 -13
- package/dist/elements/a-menu.js +146 -45
- package/dist/elements/a-panel.css +1 -0
- package/dist/elements/a-panel.d.ts +16 -0
- package/dist/elements/a-panel.js +153 -0
- package/dist/elements/a-progress.css +1 -1
- package/dist/elements/a-radio-group.css +1 -1
- package/dist/elements/a-radio.css +1 -1
- package/dist/elements/a-radio.d.ts +4 -0
- package/dist/elements/a-radio.js +18 -0
- package/dist/elements/a-slider.css +1 -1
- package/dist/elements/a-slider.d.ts +1 -0
- package/dist/elements/a-slider.js +3 -3
- package/dist/elements/a-switch.css +1 -1
- package/dist/elements/a-switch.d.ts +3 -0
- package/dist/elements/a-switch.js +17 -1
- package/dist/elements/a-tab.css +1 -1
- package/dist/elements/a-tabpanel.css +1 -1
- package/dist/elements/a-tabs.css +1 -1
- package/dist/elements/a-tag.css +1 -1
- package/dist/elements/a-text.css +1 -1
- package/dist/elements/a-title.css +1 -1
- package/dist/elements/a-toast.css +1 -1
- package/dist/elements/a-toaster.css +1 -1
- package/dist/elements/a-tooltip.css +1 -1
- package/dist/elements/a-tooltip.js +30 -7
- package/dist/elements/focus.d.ts +9 -0
- package/dist/elements/focus.js +41 -0
- package/dist/elements/index.d.ts +1 -0
- package/dist/elements/index.js +3 -0
- package/dist/elements/panel-focus.d.ts +10 -0
- package/dist/elements/panel-focus.js +86 -0
- package/dist/elements/shadow-aria.d.ts +10 -0
- package/dist/elements/shadow-aria.js +155 -0
- package/dist/general_types.d.ts +48 -19
- package/dist/generate-icons.mjs +3 -0
- package/dist/index.d.ts +4 -1
- package/dist/index.js +2 -0
- package/dist/jsx-runtime.d.ts +20 -1
- package/dist/jsx-runtime.js +12 -0
- package/dist/reset.css +1 -1
- package/dist/theme-antithesis.css +1 -1
- package/dist/theme-antune.css +1 -1
- package/dist/toaster.d.ts +1 -1
- package/dist/tokens.css +1 -1
- package/docs/accessibility.md +4 -2
- package/docs/changelog.md +89 -4
- package/docs/colors.md +6 -6
- package/docs/components/box.md +98 -34
- package/docs/components/breadcrumbs.md +33 -0
- package/docs/components/button.md +2 -2
- package/docs/components/capture.md +8 -8
- package/docs/components/checkbox.md +9 -4
- package/docs/components/input-autocomplete.md +6 -0
- package/docs/components/input-date.md +8 -2
- package/docs/components/input.md +99 -40
- package/docs/components/menu.md +3 -3
- package/docs/components/panel.md +189 -0
- package/docs/components/radio.md +4 -2
- package/docs/components/select-faceted.md +57 -2
- package/docs/components/select.md +63 -51
- package/docs/components/steps.md +4 -4
- package/docs/components/switch.md +12 -6
- package/docs/components/tabs.md +21 -8
- package/docs/components/tooltip.md +6 -4
- package/docs/index.md +2 -0
- package/docs/install-config.md +5 -4
- package/docs/normalization.md +3 -1
- package/docs/packages/plot.md +3771 -0
- package/docs/theming.md +1 -1
- package/package.json +16 -9
package/docs/components/steps.md
CHANGED
|
@@ -260,10 +260,10 @@ Events match [`Tabs`](./tabs.md#events).
|
|
|
260
260
|
| `onStateChange?` | (event, detail) => void | — | Fired whenever the active tab changes — event-first. `detail` is `{ next, prev }` (values; `null` = none). Cancelable: `event.preventDefault()` vetoes it (uncontrolled), or in controlled mode answer by updating `value`. |
|
|
261
261
|
| `onValueChange?` | (event, attrs) => void | — | Like `onChange`, but with a `{ value }` snapshot as the 2nd argument. |
|
|
262
262
|
| `orientation?` | 'horizontal' \| 'vertical' | 'horizontal' | Layout + arrow-key axis. Horizontal ellipsizes labels when tabs overflow (scroll is opt-in via CSS); vertical stacks them. |
|
|
263
|
-
| `priority?` |
|
|
263
|
+
| `priority?` | 'primary' \| 'secondary' \| 'tertiary' | 'secondary' | Visual emphasis. Primary uses a solid selected marker and a stronger completed connector; secondary is the outlined default; tertiary is compact and borderless. |
|
|
264
264
|
| `renderMarker?` | (option, state) => ReactNode | — | Builds a custom marker from a step and its current state. A returned node replaces `marker` and the built-in state marker; return `undefined` to use those fallbacks, or `null` for an empty ring. |
|
|
265
265
|
| `size?` | 'small' \| 'medium' \| 'large' | 'medium' | Size — small 24px · medium 28px · large 32px tall, matching Button's scale (the tab's label leading runs a touch tighter, offset by 1px more block padding per side). |
|
|
266
|
-
| `tone?` |
|
|
266
|
+
| `tone?` | 'neutral' \| 'brand' \| 'info' \| 'success' \| 'warning' \| 'critical' \| '' | 'neutral' | Tone applied to every step without its own `tone`. Error steps stay critical and disabled steps stay neutral. |
|
|
267
267
|
| `value?` | string | — | Controlled active value — the tab `value` to mark selected (and, when a `<TabPanel value="…">` shares it, the panel to reveal). When set, you own selection: the strip renders exactly what this says, and a user pick only *requests* a change via `onStateChange` — apply it by updating this prop. Leave undefined (and use `defaultValue`) for uncontrolled. |
|
|
268
268
|
|
|
269
269
|
## Step option props
|
|
@@ -271,14 +271,14 @@ Events match [`Tabs`](./tabs.md#events).
|
|
|
271
271
|
| Prop | Type | Default | Description |
|
|
272
272
|
|------|------|---------|-------------|
|
|
273
273
|
| `label` | ReactNode | — | Visible phase label. It ellipsizes in a constrained step; its full content is available in a tooltip only when clipped. |
|
|
274
|
-
| `state` |
|
|
274
|
+
| `state` | 'incomplete' \| 'loading' \| 'completed' \| 'error' | — | Application-owned process state. Selection and availability are separate; `error` keeps a critical icon and outline, and selection adds the fill. |
|
|
275
275
|
| `value` | string | — | Stable phase identity. Values must be unique within the sequence. |
|
|
276
276
|
| `className?` | string | — | CSS class on the option's rendered row. |
|
|
277
277
|
| `disabled?` | boolean | — | Disables this phase. A custom `marker` or `renderMarker` result is kept; otherwise it uses the incomplete marker. |
|
|
278
278
|
| `hint?` | ReactNode | — | Secondary text shown below the label. It ellipsizes in a constrained step; its full content is available in a tooltip only when clipped. |
|
|
279
279
|
| `marker?` | StepMarker | — | Replaces the marker derived from `state`. A number is shown directly; an Anta icon shape is rendered as an `<Icon>`. |
|
|
280
280
|
| `style?` | CSSProperties | — | Inline styles on the option's rendered row. |
|
|
281
|
-
| `tone?` |
|
|
281
|
+
| `tone?` | 'neutral' \| 'brand' \| 'info' \| 'success' \| 'warning' \| 'critical' \| '' | inherits Steps `tone | Tone for this phase. It colors the label, hint, marker, and completed connector. Overrides the Steps `tone`; error steps stay critical and disabled steps stay neutral. |
|
|
282
282
|
|
|
283
283
|
## Web Component
|
|
284
284
|
|
|
@@ -6,6 +6,8 @@ The `Switch` wrapper renders a form-associated `<a-switch>` element. It works un
|
|
|
6
6
|
|
|
7
7
|
## Tone
|
|
8
8
|
|
|
9
|
+
Switch is neutral by default. Pass `tone="brand"` or another tone to color the control.
|
|
10
|
+
|
|
9
11
|
`tone` colors the whole control: the checked track, plus the unchecked track border and thumb. Six named tones are available, or pass any CSS color for a custom tone. The label and hint stay neutral.
|
|
10
12
|
|
|
11
13
|
```tsx
|
|
@@ -17,7 +19,7 @@ The `Switch` wrapper renders a form-associated `<a-switch>` element. It works un
|
|
|
17
19
|
|
|
18
20
|
## Selected-only tone
|
|
19
21
|
|
|
20
|
-
`toneScope="selected"`
|
|
22
|
+
To apply a tone only while selected, pass `toneScope="selected"` together with `tone`, such as `tone="brand"`. Only the checked track is tinted; the unchecked track border and thumb stay neutral.
|
|
21
23
|
|
|
22
24
|
```tsx
|
|
23
25
|
<Switch tone="brand" toneScope="selected" label="Off stays neutral" />
|
|
@@ -119,7 +121,10 @@ Use **`onStateChange`** to intercept a toggle or drive a controlled switch. Use
|
|
|
119
121
|
|
|
120
122
|
## Accessibility
|
|
121
123
|
|
|
122
|
-
The wrapper sets `role="switch"
|
|
124
|
+
The wrapper sets `role="switch"`, and the element keeps `aria-checked` in sync
|
|
125
|
+
with the current value. Its light-DOM label supplies the accessible name and its
|
|
126
|
+
hint supplies the accessible description through `ElementInternals`; no generated
|
|
127
|
+
IDs are needed. For a label-less switch, pass `aria-label`.
|
|
123
128
|
|
|
124
129
|
Space toggles the switch. It follows the [WAI-ARIA switch pattern](https://www.w3.org/WAI/ARIA/apg/patterns/switch/).
|
|
125
130
|
|
|
@@ -130,7 +135,7 @@ Space toggles the switch. It follows the [WAI-ARIA switch pattern](https://www.w
|
|
|
130
135
|
| `checked?` | boolean | — | Controlled checked value. In controlled mode, update this in `onStateChange`. |
|
|
131
136
|
| `defaultChecked?` | boolean | false | Initial checked value for an uncontrolled switch. |
|
|
132
137
|
| `disabled?` | boolean | — | Disables interaction and removes the switch from the tab order. |
|
|
133
|
-
| `hint?` | ReactNode | — | Secondary text rendered under the label. It does not become part of the accessible name. |
|
|
138
|
+
| `hint?` | ReactNode | — | Secondary text rendered under the label and exposed as the switch's accessible description. It does not become part of the accessible name. |
|
|
134
139
|
| `label?` | string | — | Visible, stable label for the setting. Use `children` for richer label content. |
|
|
135
140
|
| `labelPosition?` | 'start' \| 'end' | 'end' | Put the visible label before or after the control. Grid layout changes only the visual order, preserving DOM/source order for assistive technologies. |
|
|
136
141
|
| `name?` | string | — | Form field name. A checked switch submits `value` under this name. |
|
|
@@ -139,15 +144,16 @@ Space toggles the switch. It follows the [WAI-ARIA switch pattern](https://www.w
|
|
|
139
144
|
| `onValueChange?` | (event, attrs) => void | — | Post-apply callback with the new form-relevant value snapshot. |
|
|
140
145
|
| `round?` | boolean \| number \| string | — | Fully round the thumb and track. Pass a `number` (px) or CSS length string for a custom track radius; the thumb radius is 3px smaller. |
|
|
141
146
|
| `size?` | 'small' \| 'medium' \| 'large' | 'medium' | Size variant. small=26×16px, medium=30×18px, large=34×20px. |
|
|
142
|
-
| `tone?` | 'brand' \| 'neutral' \| 'info' \| 'success' \| 'warning' \| 'critical' \| (string & {}) | '
|
|
143
|
-
| `toneScope?` |
|
|
147
|
+
| `tone?` | 'brand' \| 'neutral' \| 'info' \| 'success' \| 'warning' \| 'critical' \| (string & {}) | 'neutral' | Color of the track and thumb. A tinted tone also colors the unchecked track border and thumb; use `toneScope="selected"` to color only the checked track. |
|
|
148
|
+
| `toneScope?` | 'all' \| 'selected' | 'all' | Apply `tone` to every state, or only while checked so the unchecked track and thumb stay neutral. |
|
|
144
149
|
| `value?` | string | "on" | Value submitted while checked. |
|
|
145
150
|
|
|
146
151
|
## Web Component
|
|
147
152
|
|
|
148
153
|
Use the web component directly when you are not using React or Preact and a native control does not fit.
|
|
149
154
|
|
|
150
|
-
The focusable host carries the state. Label and hint are light-DOM children
|
|
155
|
+
The focusable host carries the state. Label and hint are light-DOM children that
|
|
156
|
+
the element exposes as its accessible name and description.
|
|
151
157
|
|
|
152
158
|
```html
|
|
153
159
|
<a-switch role="switch" tabindex="0" name="updates" default-state="checked">
|
package/docs/components/tabs.md
CHANGED
|
@@ -271,15 +271,17 @@ const [tab, setTab] = useState('overview')
|
|
|
271
271
|
|
|
272
272
|
## Keyboard & accessibility
|
|
273
273
|
|
|
274
|
-
|
|
275
|
-
|
|
274
|
+
The selected tab is in the page's tab order. Once focus enters the strip, the
|
|
275
|
+
arrow keys move between enabled tabs (wrapping at the ends), `Home` /
|
|
276
276
|
`End` jump to the first / last, and `Space` / `Enter` activate the focused tab;
|
|
277
277
|
arrow / `Home` / `End` navigation activates as it moves (selection follows focus).
|
|
278
278
|
Disabled tabs are skipped and dropped from the tab order.
|
|
279
279
|
|
|
280
280
|
Pass `label` for the tablist's accessible name. Each `<TabPanel>` names its tab as
|
|
281
281
|
its accessible label (`aria-labelledby`), set off-DOM so nothing writes the panel's
|
|
282
|
-
attributes.
|
|
282
|
+
attributes. Static panel content remains readable without making the panel a tab
|
|
283
|
+
stop. Set `tabIndex={0}` when you want a text-only panel itself to receive focus;
|
|
284
|
+
when the panel starts with a focusable control, Tab reaches that control directly.
|
|
283
285
|
|
|
284
286
|
## Routing
|
|
285
287
|
|
|
@@ -357,7 +359,7 @@ so those suit an uncontrolled strip reacting to its own pick. **`onFocus`** /
|
|
|
357
359
|
| `value` | string | — | This tab's identity — pairs it with the `<TabPanel value="…">` of the same value, and the value reported by `onStateChange` / `onChange`. Unique per strip. |
|
|
358
360
|
| `children?` | ReactNode | — | Tab content when you need more than a string — used if `label` is omitted. |
|
|
359
361
|
| `className?` | string | — | CSS class on the option's rendered row. |
|
|
360
|
-
| `disabled?` | boolean | — |
|
|
362
|
+
| `disabled?` | boolean | — | Prevent user activation of this tab. A disabled tab can still indicate the current selection. |
|
|
361
363
|
| `icon?` | IconShape | — | Leading icon shape, rendered before the label. |
|
|
362
364
|
| `iconTrailing?` | IconShape | — | Trailing icon shape, rendered after the label. |
|
|
363
365
|
| `label?` | ReactNode | — | Visible label. The string shorthand for the tab's content; for richer content pass `children` instead (`label` wins when both are set). |
|
|
@@ -371,17 +373,18 @@ so those suit an uncontrolled strip reacting to its own pick. **`onFocus`** /
|
|
|
371
373
|
| Prop | Type | Default | Description |
|
|
372
374
|
|------|------|---------|-------------|
|
|
373
375
|
| `value` | string | — | Pairs this panel with the tab (`options` entry) of the same `value`. |
|
|
374
|
-
| `children?` | ReactNode | — | Panel content — arbitrary React/Preact. |
|
|
375
|
-
| `className?` | string | — | CSS class on the rendered `<a-tabpanel>`. |
|
|
376
376
|
| `hideMode?` | 'display' \| 'visibility' | display | How this panel hides while inactive: `display` (default — removed from layout and the a11y tree) or `visibility` (keeps its layout box, to measure it or avoid reflow). Both stay mounted; to *not render* an inactive panel, render it conditionally off a controlled `value` (see the Tabs docs). |
|
|
377
|
-
| `style?` | CSSProperties | — | Inline style on the rendered `<a-tabpanel>`. |
|
|
378
377
|
|
|
379
378
|
## Web Component
|
|
380
379
|
|
|
381
380
|
Use the web component directly when you are not using React or Preact and a native control does not fit.
|
|
382
381
|
|
|
383
382
|
Keep the tab strip and panels as siblings under one parent. Panels read the active
|
|
384
|
-
value from `<a-tabs>`.
|
|
383
|
+
value from `<a-tabs>`. Give the selected tab `tabindex="0"` and the others
|
|
384
|
+
`tabindex="-1"`; `<a-tabs>` moves focus and selection with the arrow keys, while
|
|
385
|
+
your change handler updates those attributes for the next visit to the strip. Add
|
|
386
|
+
`tabindex="0"` to a text-only panel only when you want the panel itself in the page
|
|
387
|
+
Tab sequence.
|
|
385
388
|
|
|
386
389
|
Add `fill` to make horizontal tabs share the available width equally.
|
|
387
390
|
|
|
@@ -396,6 +399,16 @@ Add `fill` to make horizontal tabs share the available width equally.
|
|
|
396
399
|
</div>
|
|
397
400
|
```
|
|
398
401
|
|
|
402
|
+
```js title="Keep the raw DOM tab stop on the selected tab"
|
|
403
|
+
const tabs = document.querySelector('a-tabs')
|
|
404
|
+
|
|
405
|
+
tabs.addEventListener('change', () => {
|
|
406
|
+
for (const tab of tabs.querySelectorAll('a-tab')) {
|
|
407
|
+
tab.tabIndex = tab.getAttribute('value') === tabs.value ? 0 : -1
|
|
408
|
+
}
|
|
409
|
+
})
|
|
410
|
+
```
|
|
411
|
+
|
|
399
412
|
## Styling
|
|
400
413
|
|
|
401
414
|
Reach for the props first: **`tone`**, **`size`**, **`priority`**. The focus ring is
|
|
@@ -67,9 +67,11 @@ The underlying `<a-tooltip>` works in plain HTML too, as a child of any element:
|
|
|
67
67
|
|
|
68
68
|
### Adjacent and nested tooltips
|
|
69
69
|
|
|
70
|
-
Only one tooltip shows at a time. Moving between **adjacent** anchors
|
|
71
|
-
cleanly — the outgoing bubble cross-fades out as the
|
|
72
|
-
|
|
70
|
+
Only one tooltip shows at a time. Moving between **adjacent** anchors with
|
|
71
|
+
`follow` tooltips hands off cleanly — the outgoing bubble cross-fades out as the
|
|
72
|
+
next fades in (no blink). If either tooltip does not have `follow`, the next
|
|
73
|
+
tooltip waits for its configured delay. With `follow` tooltips (used below to
|
|
74
|
+
show it), the outgoing bubble also keeps
|
|
73
75
|
trailing the cursor and fades by distance from its anchor (transparent by ~100px
|
|
74
76
|
away), so a near hop reads as a smooth cross-fade and a far one is already gone.
|
|
75
77
|
With **nested** anchors, the inner (descendant) tooltip wins while you're over
|
|
@@ -125,7 +127,7 @@ shows.
|
|
|
125
127
|
| `delay?` | number | 300 | Show delay in milliseconds after hover / focus. Never use `0` — use ~`50` for a near-instant tooltip (0 has caused issues in practice). |
|
|
126
128
|
| `follow?` | boolean | — | Follow the cursor instead of pinning under the anchor. The bubble is pinned (anchored beneath the target) by default; pass `follow` for the cursor-tracking behavior, which fades by distance as the cursor leaves. |
|
|
127
129
|
| `interactive?` | boolean | — | Make the bubble hoverable and clickable — enables pointer events and keeps it open while the cursor is over it, so its content (links, buttons) can be interacted with. Always pinned (an interactive bubble can't follow the cursor, even with `follow`). |
|
|
128
|
-
| `placement?` | 'top' \| 'bottom' | bottom | Which side of the anchor the bubble prefers. Auto-flips to the other side when there isn't room. |
|
|
130
|
+
| `placement?` | 'top' \| 'bottom' \| 'left' | bottom | Which side of the anchor the bubble prefers. Auto-flips to the other side when there isn't room. |
|
|
129
131
|
| `round?` | boolean \| number \| string | — | Round the bubble to a 20px radius (matching a round menu). Pass a `number` (px) or a CSS length string for a custom radius. |
|
|
130
132
|
| `truncatedOnly?` | boolean | — | Only show when the target is actually truncated (its text overflows and is ellipsized); a label that fits gets no tooltip. The check is a UI-thread layout read, re-measured on each show. By default it measures every Anta ellipsizing label part inside the anchor, then the anchor itself — override with `truncatedSelector`. |
|
|
131
133
|
| `truncatedSelector?` | string | — | CSS selector (resolved within the anchor) for the element or elements whose overflow decides whether a `truncatedOnly` tooltip shows. |
|
package/docs/index.md
CHANGED
|
@@ -50,8 +50,10 @@ Anta is designed for a clean DOM. Prefer the props and attributes exposed by eac
|
|
|
50
50
|
|
|
51
51
|
- [Box](./components/box.md)
|
|
52
52
|
- [Capture](./components/capture.md)
|
|
53
|
+
- [Panel](./components/panel.md)
|
|
53
54
|
|
|
54
55
|
## Packages
|
|
55
56
|
|
|
57
|
+
- [Plot](./packages/plot.md)
|
|
56
58
|
- [Table](./packages/table.md)
|
|
57
59
|
- [Stickers](./packages/stickers.md)
|
package/docs/install-config.md
CHANGED
|
@@ -61,8 +61,9 @@ seed-derived default palette or provide your own theme.
|
|
|
61
61
|
|
|
62
62
|
### Cascade layers
|
|
63
63
|
|
|
64
|
-
Anta's reset and element CSS use child layers inside `@layer anta`.
|
|
65
|
-
|
|
64
|
+
Anta's reset and element CSS use child layers inside `@layer anta`. Every Anta
|
|
65
|
+
stylesheet reserves the same order, so granular stylesheets remain safe when a
|
|
66
|
+
bundler loads them before `tokens.css`:
|
|
66
67
|
|
|
67
68
|
```css
|
|
68
69
|
@layer base, anta, components, utilities;
|
|
@@ -72,8 +73,8 @@ orders them above preflight resets and below your component and utility layers:
|
|
|
72
73
|
`anta.theme` lets the optional reference palette replace component formulas. The
|
|
73
74
|
outer `anta` layer keeps its public cascade position.
|
|
74
75
|
|
|
75
|
-
To change that order, declare it in CSS loaded **before
|
|
76
|
-
first declaration fixes a layer's position:
|
|
76
|
+
To change that order, declare it in CSS loaded **before any Anta stylesheet**.
|
|
77
|
+
The first declaration fixes a layer's position:
|
|
77
78
|
|
|
78
79
|
```css
|
|
79
80
|
/* your global.css, loaded before anta */
|
package/docs/normalization.md
CHANGED
|
@@ -57,7 +57,9 @@ See `src/reset.css` for the full set. Heading values are duplicated in
|
|
|
57
57
|
|
|
58
58
|
## Cascade layers — how to override
|
|
59
59
|
|
|
60
|
-
Anta
|
|
60
|
+
Every Anta stylesheet reserves the same layer order before defining its rules.
|
|
61
|
+
This keeps granular imports safe when a bundler loads component CSS before
|
|
62
|
+
`tokens.css`:
|
|
61
63
|
|
|
62
64
|
```css
|
|
63
65
|
@layer base, anta, components, utilities;
|