@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
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { activeFocus, canFocus, containsFocus, cycleFocus, tabStops } from "./focus";
|
|
2
|
+
import { activeFocus as activeFocus2 } from "./focus";
|
|
3
|
+
const scopes = /* @__PURE__ */ new WeakMap();
|
|
4
|
+
class PanelFocusScope {
|
|
5
|
+
#stack;
|
|
6
|
+
#doc;
|
|
7
|
+
#surface;
|
|
8
|
+
#previous = null;
|
|
9
|
+
#lastInside = null;
|
|
10
|
+
#active = false;
|
|
11
|
+
#redirecting = false;
|
|
12
|
+
constructor(surface) {
|
|
13
|
+
this.#surface = surface;
|
|
14
|
+
this.#doc = surface.ownerDocument;
|
|
15
|
+
this.#stack = scopes.get(this.#doc) ?? [];
|
|
16
|
+
scopes.set(this.#doc, this.#stack);
|
|
17
|
+
}
|
|
18
|
+
get #ownsFocus() {
|
|
19
|
+
return this.#stack.at(-1) === this && this.#surface.matches(":popover-open");
|
|
20
|
+
}
|
|
21
|
+
activate(previous) {
|
|
22
|
+
if (this.#active) return;
|
|
23
|
+
this.#active = true;
|
|
24
|
+
this.#previous = previous;
|
|
25
|
+
this.#lastInside = containsFocus(this.#surface, previous) ? previous : null;
|
|
26
|
+
this.#stack.push(this);
|
|
27
|
+
this.#doc.addEventListener("focusin", this.#onFocus, true);
|
|
28
|
+
this.#doc.addEventListener("keydown", this.#onKeyDown);
|
|
29
|
+
}
|
|
30
|
+
focusInside(preferred = this.#lastInside) {
|
|
31
|
+
if (!this.#ownsFocus) return;
|
|
32
|
+
const target = containsFocus(this.#surface, preferred) && canFocus(preferred) ? preferred : tabStops(this.#surface)[0] ?? this.#surface;
|
|
33
|
+
target.focus({ preventScroll: true });
|
|
34
|
+
}
|
|
35
|
+
/** Remove listeners before hiding the popover, then restore focus after layout. */
|
|
36
|
+
deactivate() {
|
|
37
|
+
if (!this.#active) return () => {
|
|
38
|
+
};
|
|
39
|
+
const current = activeFocus(this.#doc);
|
|
40
|
+
const restore = this.#stack.at(-1) === this && containsFocus(this.#surface, current);
|
|
41
|
+
const previous = this.#previous;
|
|
42
|
+
const target = previous && !containsFocus(this.#surface, previous) ? previous : current;
|
|
43
|
+
this.#active = false;
|
|
44
|
+
const index = this.#stack.indexOf(this);
|
|
45
|
+
if (index >= 0) this.#stack.splice(index, 1);
|
|
46
|
+
this.#doc.removeEventListener("focusin", this.#onFocus, true);
|
|
47
|
+
this.#doc.removeEventListener("keydown", this.#onKeyDown);
|
|
48
|
+
this.#previous = this.#lastInside = null;
|
|
49
|
+
return () => {
|
|
50
|
+
if (!restore) return;
|
|
51
|
+
if (canFocus(target)) target.focus({ preventScroll: true });
|
|
52
|
+
else if (canFocus(current)) current.focus({ preventScroll: true });
|
|
53
|
+
else if (canFocus(previous)) previous.focus({ preventScroll: true });
|
|
54
|
+
else this.#stack.at(-1)?.focusInside();
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
#inModal(path) {
|
|
58
|
+
for (const node of path) {
|
|
59
|
+
if (node === this.#surface) return false;
|
|
60
|
+
if (node instanceof Element && node.matches(":modal")) return true;
|
|
61
|
+
}
|
|
62
|
+
return false;
|
|
63
|
+
}
|
|
64
|
+
#onFocus = (event) => {
|
|
65
|
+
if (!this.#ownsFocus || this.#redirecting) return;
|
|
66
|
+
const path = event.composedPath();
|
|
67
|
+
if (this.#inModal(path)) return;
|
|
68
|
+
if (path.includes(this.#surface)) {
|
|
69
|
+
this.#lastInside = activeFocus(this.#doc);
|
|
70
|
+
return;
|
|
71
|
+
}
|
|
72
|
+
this.#redirecting = true;
|
|
73
|
+
this.focusInside();
|
|
74
|
+
this.#redirecting = false;
|
|
75
|
+
};
|
|
76
|
+
#onKeyDown = (event) => {
|
|
77
|
+
if (!this.#ownsFocus || event.defaultPrevented || event.key !== "Tab" || event.altKey || event.ctrlKey || event.metaKey) return;
|
|
78
|
+
if (this.#inModal(event.composedPath())) return;
|
|
79
|
+
event.preventDefault();
|
|
80
|
+
cycleFocus(tabStops(this.#surface), activeFocus(this.#doc), event.shiftKey, this.#surface);
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
export {
|
|
84
|
+
PanelFocusScope,
|
|
85
|
+
activeFocus2 as activeFocus
|
|
86
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/** Standard semantic attributes that a shadow-hosted control may consume from
|
|
2
|
+
* its custom-element host. Keeping the public spelling standard lets raw HTML,
|
|
3
|
+
* React, Preact, and custom JSX runtimes use the same API. */
|
|
4
|
+
export declare const SHADOW_ARIA_ATTRIBUTES: readonly ['role', 'aria-activedescendant', 'aria-atomic', 'aria-autocomplete', 'aria-braillelabel', 'aria-brailleroledescription', 'aria-busy', 'aria-checked', 'aria-colcount', 'aria-colindex', 'aria-colspan', 'aria-controls', 'aria-current', 'aria-description', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-expanded', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-level', 'aria-live', 'aria-modal', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed', 'aria-readonly', 'aria-relevant', 'aria-required', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-setsize', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext'];
|
|
5
|
+
export type ShadowAriaAttribute = (typeof SHADOW_ARIA_ATTRIBUTES)[number];
|
|
6
|
+
export declare const SHADOW_ARIA_ATTRIBUTE_SET: Set<string>;
|
|
7
|
+
export declare function ariaAttributeProperty(name: ShadowAriaAttribute): string;
|
|
8
|
+
/** Apply one consumed host attribute to a shadow control. ID-reference ARIA
|
|
9
|
+
* uses element reflection so a shadow control can reference the host's tree. */
|
|
10
|
+
export declare function applyShadowAria(host: Element, target: Element, name: ShadowAriaAttribute, value: string | null): void;
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
const SHADOW_ARIA_ATTRIBUTES = [
|
|
2
|
+
"role",
|
|
3
|
+
"aria-activedescendant",
|
|
4
|
+
"aria-atomic",
|
|
5
|
+
"aria-autocomplete",
|
|
6
|
+
"aria-braillelabel",
|
|
7
|
+
"aria-brailleroledescription",
|
|
8
|
+
"aria-busy",
|
|
9
|
+
"aria-checked",
|
|
10
|
+
"aria-colcount",
|
|
11
|
+
"aria-colindex",
|
|
12
|
+
"aria-colspan",
|
|
13
|
+
"aria-controls",
|
|
14
|
+
"aria-current",
|
|
15
|
+
"aria-description",
|
|
16
|
+
"aria-describedby",
|
|
17
|
+
"aria-details",
|
|
18
|
+
"aria-disabled",
|
|
19
|
+
"aria-dropeffect",
|
|
20
|
+
"aria-errormessage",
|
|
21
|
+
"aria-expanded",
|
|
22
|
+
"aria-flowto",
|
|
23
|
+
"aria-grabbed",
|
|
24
|
+
"aria-haspopup",
|
|
25
|
+
"aria-hidden",
|
|
26
|
+
"aria-invalid",
|
|
27
|
+
"aria-keyshortcuts",
|
|
28
|
+
"aria-label",
|
|
29
|
+
"aria-labelledby",
|
|
30
|
+
"aria-level",
|
|
31
|
+
"aria-live",
|
|
32
|
+
"aria-modal",
|
|
33
|
+
"aria-multiline",
|
|
34
|
+
"aria-multiselectable",
|
|
35
|
+
"aria-orientation",
|
|
36
|
+
"aria-owns",
|
|
37
|
+
"aria-placeholder",
|
|
38
|
+
"aria-posinset",
|
|
39
|
+
"aria-pressed",
|
|
40
|
+
"aria-readonly",
|
|
41
|
+
"aria-relevant",
|
|
42
|
+
"aria-required",
|
|
43
|
+
"aria-roledescription",
|
|
44
|
+
"aria-rowcount",
|
|
45
|
+
"aria-rowindex",
|
|
46
|
+
"aria-rowspan",
|
|
47
|
+
"aria-selected",
|
|
48
|
+
"aria-setsize",
|
|
49
|
+
"aria-sort",
|
|
50
|
+
"aria-valuemax",
|
|
51
|
+
"aria-valuemin",
|
|
52
|
+
"aria-valuenow",
|
|
53
|
+
"aria-valuetext"
|
|
54
|
+
];
|
|
55
|
+
const SHADOW_ARIA_ATTRIBUTE_SET = new Set(SHADOW_ARIA_ATTRIBUTES);
|
|
56
|
+
const SHADOW_ARIA_PROPERTIES = {
|
|
57
|
+
role: "role",
|
|
58
|
+
"aria-activedescendant": "ariaActiveDescendant",
|
|
59
|
+
"aria-atomic": "ariaAtomic",
|
|
60
|
+
"aria-autocomplete": "ariaAutoComplete",
|
|
61
|
+
"aria-braillelabel": "ariaBrailleLabel",
|
|
62
|
+
"aria-brailleroledescription": "ariaBrailleRoleDescription",
|
|
63
|
+
"aria-busy": "ariaBusy",
|
|
64
|
+
"aria-checked": "ariaChecked",
|
|
65
|
+
"aria-colcount": "ariaColCount",
|
|
66
|
+
"aria-colindex": "ariaColIndex",
|
|
67
|
+
"aria-colspan": "ariaColSpan",
|
|
68
|
+
"aria-controls": "ariaControls",
|
|
69
|
+
"aria-current": "ariaCurrent",
|
|
70
|
+
"aria-description": "ariaDescription",
|
|
71
|
+
"aria-describedby": "ariaDescribedBy",
|
|
72
|
+
"aria-details": "ariaDetails",
|
|
73
|
+
"aria-disabled": "ariaDisabled",
|
|
74
|
+
"aria-dropeffect": "ariaDropEffect",
|
|
75
|
+
"aria-errormessage": "ariaErrorMessage",
|
|
76
|
+
"aria-expanded": "ariaExpanded",
|
|
77
|
+
"aria-flowto": "ariaFlowTo",
|
|
78
|
+
"aria-grabbed": "ariaGrabbed",
|
|
79
|
+
"aria-haspopup": "ariaHasPopup",
|
|
80
|
+
"aria-hidden": "ariaHidden",
|
|
81
|
+
"aria-invalid": "ariaInvalid",
|
|
82
|
+
"aria-keyshortcuts": "ariaKeyShortcuts",
|
|
83
|
+
"aria-label": "ariaLabel",
|
|
84
|
+
"aria-labelledby": "ariaLabelledBy",
|
|
85
|
+
"aria-level": "ariaLevel",
|
|
86
|
+
"aria-live": "ariaLive",
|
|
87
|
+
"aria-modal": "ariaModal",
|
|
88
|
+
"aria-multiline": "ariaMultiLine",
|
|
89
|
+
"aria-multiselectable": "ariaMultiSelectable",
|
|
90
|
+
"aria-orientation": "ariaOrientation",
|
|
91
|
+
"aria-owns": "ariaOwns",
|
|
92
|
+
"aria-placeholder": "ariaPlaceholder",
|
|
93
|
+
"aria-posinset": "ariaPosInSet",
|
|
94
|
+
"aria-pressed": "ariaPressed",
|
|
95
|
+
"aria-readonly": "ariaReadOnly",
|
|
96
|
+
"aria-relevant": "ariaRelevant",
|
|
97
|
+
"aria-required": "ariaRequired",
|
|
98
|
+
"aria-roledescription": "ariaRoleDescription",
|
|
99
|
+
"aria-rowcount": "ariaRowCount",
|
|
100
|
+
"aria-rowindex": "ariaRowIndex",
|
|
101
|
+
"aria-rowspan": "ariaRowSpan",
|
|
102
|
+
"aria-selected": "ariaSelected",
|
|
103
|
+
"aria-setsize": "ariaSetSize",
|
|
104
|
+
"aria-sort": "ariaSort",
|
|
105
|
+
"aria-valuemax": "ariaValueMax",
|
|
106
|
+
"aria-valuemin": "ariaValueMin",
|
|
107
|
+
"aria-valuenow": "ariaValueNow",
|
|
108
|
+
"aria-valuetext": "ariaValueText"
|
|
109
|
+
};
|
|
110
|
+
function ariaAttributeProperty(name) {
|
|
111
|
+
return SHADOW_ARIA_PROPERTIES[name];
|
|
112
|
+
}
|
|
113
|
+
const ELEMENT_REFERENCE_PROPERTIES = {
|
|
114
|
+
"aria-activedescendant": "ariaActiveDescendantElement",
|
|
115
|
+
"aria-controls": "ariaControlsElements",
|
|
116
|
+
"aria-describedby": "ariaDescribedByElements",
|
|
117
|
+
"aria-details": "ariaDetailsElements",
|
|
118
|
+
"aria-errormessage": "ariaErrorMessageElements",
|
|
119
|
+
"aria-flowto": "ariaFlowToElements",
|
|
120
|
+
"aria-labelledby": "ariaLabelledByElements",
|
|
121
|
+
"aria-owns": "ariaOwnsElements"
|
|
122
|
+
};
|
|
123
|
+
function referencedElements(host, value) {
|
|
124
|
+
const root = host.getRootNode();
|
|
125
|
+
if (!("getElementById" in root)) return [];
|
|
126
|
+
return value.trim().split(/\s+/).filter(Boolean).map((id) => root.getElementById(id)).filter((element) => element != null);
|
|
127
|
+
}
|
|
128
|
+
function applyShadowAria(host, target, name, value) {
|
|
129
|
+
const property = ELEMENT_REFERENCE_PROPERTIES[name];
|
|
130
|
+
if (!property) {
|
|
131
|
+
if (value == null) target.removeAttribute(name);
|
|
132
|
+
else target.setAttribute(name, value);
|
|
133
|
+
return;
|
|
134
|
+
}
|
|
135
|
+
const reflected = target;
|
|
136
|
+
const elements = value == null ? [] : referencedElements(host, value);
|
|
137
|
+
try {
|
|
138
|
+
if (!(property in reflected)) throw new Error("ARIA element reflection is unavailable");
|
|
139
|
+
if (name === "aria-activedescendant") {
|
|
140
|
+
reflected.ariaActiveDescendantElement = elements[0] ?? null;
|
|
141
|
+
} else {
|
|
142
|
+
;
|
|
143
|
+
reflected[property] = elements;
|
|
144
|
+
}
|
|
145
|
+
} catch {
|
|
146
|
+
if (value == null) target.removeAttribute(name);
|
|
147
|
+
else target.setAttribute(name, value);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
export {
|
|
151
|
+
SHADOW_ARIA_ATTRIBUTES,
|
|
152
|
+
SHADOW_ARIA_ATTRIBUTE_SET,
|
|
153
|
+
applyShadowAria,
|
|
154
|
+
ariaAttributeProperty
|
|
155
|
+
};
|
package/dist/general_types.d.ts
CHANGED
|
@@ -272,6 +272,22 @@ export interface ATextAttributes extends BaseAttributes {
|
|
|
272
272
|
/** ARIA disclosure state, mirrors the JSX wrapper's `expanded` flag. */
|
|
273
273
|
'aria-expanded'?: boolean | 'true' | 'false';
|
|
274
274
|
}
|
|
275
|
+
/** Panel presentation state. Normal panels remain visible in their parent layout. */
|
|
276
|
+
export type PanelState = 'normal' | 'maximized';
|
|
277
|
+
/** Attributes for the persistent viewport-capable container. */
|
|
278
|
+
export interface APanelAttributes extends BaseAttributes {
|
|
279
|
+
state?: PanelState;
|
|
280
|
+
'default-state'?: PanelState;
|
|
281
|
+
onstatechange?: (event: CustomEvent<{
|
|
282
|
+
next: PanelState;
|
|
283
|
+
prev: PanelState;
|
|
284
|
+
}> | {
|
|
285
|
+
nativeEvent: CustomEvent<{
|
|
286
|
+
next: PanelState;
|
|
287
|
+
prev: PanelState;
|
|
288
|
+
}>;
|
|
289
|
+
}) => void;
|
|
290
|
+
}
|
|
275
291
|
/** Attributes for the opt-in light-DOM capture surface. */
|
|
276
292
|
export interface ACaptureAttributes extends BaseAttributes {
|
|
277
293
|
/** Space-separated accepted wheel directions. Bare means all; `none` preserves settling while declining input. */
|
|
@@ -318,20 +334,28 @@ export interface ABoxAttributes extends BaseAttributes {
|
|
|
318
334
|
* typed `attr()` read it from `--box-gap` in the host's inline style
|
|
319
335
|
* instead, which is what the JSX wrapper always sets. */
|
|
320
336
|
gap?: boolean | '' | number | string;
|
|
337
|
+
/** CSS padding shorthand (`padding="8px 16px"`). Without typed `attr()`
|
|
338
|
+
* support, set `--box-padding` as well. The JSX wrapper supplies it. */
|
|
339
|
+
padding?: boolean | '' | number | string;
|
|
340
|
+
/** CSS margin shorthand (`margin="0 auto"`). Without typed `attr()`
|
|
341
|
+
* support, set `--box-margin` as well. The JSX wrapper supplies it. */
|
|
342
|
+
margin?: boolean | '' | number | string;
|
|
321
343
|
/** Masks every edge that currently hides clipped content. */
|
|
322
344
|
fade?: boolean | '';
|
|
323
|
-
/**
|
|
324
|
-
*
|
|
325
|
-
*
|
|
326
|
-
*
|
|
327
|
-
*
|
|
328
|
-
|
|
329
|
-
|
|
345
|
+
/** Space-separated selections: `width`, `height`, `size`, `context`,
|
|
346
|
+
* `overflow`, `edges`, `scroll`, or `all`, in any order. `size` selects
|
|
347
|
+
* width and height; `edges` selects edge transitions. A bare
|
|
348
|
+
* attribute means `all`. Omission runs no observers unless `fade` is set;
|
|
349
|
+
* a native event listener alone does not enable observation. */
|
|
350
|
+
observe?: string;
|
|
351
|
+
/** Minimum interval between measurement events in milliseconds. Omit or
|
|
352
|
+
* pass `0` for frame-based reporting. Invalid or negative values use `0`. */
|
|
353
|
+
throttle?: number | string;
|
|
330
354
|
/** Depth of that mask, as a length value (`fade-size="2rem"`). Engines
|
|
331
355
|
* without typed `attr()` read it from `--box-fade-size` in the host's
|
|
332
356
|
* inline style instead, which is what the JSX wrapper always sets. */
|
|
333
357
|
'fade-size'?: number | string;
|
|
334
|
-
/** Native event fired when
|
|
358
|
+
/** Native event fired when a selected measurement field changes. */
|
|
335
359
|
onmeasurechange?: (event: CustomEvent<BoxMeasurementChange> | {
|
|
336
360
|
nativeEvent: CustomEvent<BoxMeasurementChange>;
|
|
337
361
|
}) => void;
|
|
@@ -520,7 +544,7 @@ export interface ATooltipAttributes extends BaseAttributes {
|
|
|
520
544
|
/** Show delay in milliseconds. Never use `0` — use ~`50`. Defaults to 300. */
|
|
521
545
|
delay?: number | string;
|
|
522
546
|
/** Preferred side; auto-flips when there's no room. Defaults to `'bottom'`. */
|
|
523
|
-
placement?: 'top' | 'bottom';
|
|
547
|
+
placement?: 'top' | 'bottom' | 'left';
|
|
524
548
|
/** Follow the cursor instead of pinning under the anchor (pinned is the
|
|
525
549
|
* default). Presence-based (`''` on, omit off). */
|
|
526
550
|
follow?: boolean | '';
|
|
@@ -647,6 +671,9 @@ export interface ASwitchAttributes extends BaseAttributes {
|
|
|
647
671
|
* for styling, and `:state(filled)` / `:state(invalid)` as CSS hooks.
|
|
648
672
|
*/
|
|
649
673
|
export interface AInputAttributes extends BaseAttributes {
|
|
674
|
+
/** Standard ARIA attributes describe the native input/textarea in the shadow
|
|
675
|
+
* tree and are delegated there when the element upgrades. */
|
|
676
|
+
[key: `aria-${string}`]: unknown;
|
|
650
677
|
/** Controlled value (string). Reflected to the shadow control only when it
|
|
651
678
|
* differs, so the caret survives re-renders. */
|
|
652
679
|
value?: string;
|
|
@@ -669,6 +696,8 @@ export interface AInputAttributes extends BaseAttributes {
|
|
|
669
696
|
disabled?: boolean | '';
|
|
670
697
|
/** Read-only state. Presence-based. */
|
|
671
698
|
readonly?: boolean | '';
|
|
699
|
+
/** Render a native button inside the field surface. Presence-based. */
|
|
700
|
+
button?: boolean | '';
|
|
672
701
|
/** Required — drives native validity. Presence-based. */
|
|
673
702
|
required?: boolean | '';
|
|
674
703
|
/** Dim the leading/trailing adornments at rest (0.6); they brighten to full
|
|
@@ -767,6 +796,9 @@ export interface ASliderAttributes extends BaseAttributes {
|
|
|
767
796
|
/** Attributes for the `<a-input-time>` custom element — a segmented wall-clock
|
|
768
797
|
* time field (hour / minute / AM-PM native text-input sections in one box). */
|
|
769
798
|
export interface AInputTimeAttributes extends BaseAttributes {
|
|
799
|
+
/** Standard naming/description ARIA describes the complete segmented field;
|
|
800
|
+
* invalid/error state is delegated to its focusable segments. */
|
|
801
|
+
[key: `aria-${string}`]: unknown;
|
|
770
802
|
/** Controlled value — 24-hour `"HH:mm"`, `''` when incomplete. */
|
|
771
803
|
value?: string;
|
|
772
804
|
/** Focus this field when its containing `a-dialog` opens. Presence-based. */
|
|
@@ -912,11 +944,9 @@ export interface AMenuAttributes extends BaseAttributes {
|
|
|
912
944
|
next: 'open' | 'closed';
|
|
913
945
|
prev: 'open' | 'closed';
|
|
914
946
|
}>) => void;
|
|
915
|
-
/** Combobox-mode cursor report
|
|
916
|
-
*
|
|
917
|
-
*
|
|
918
|
-
* `aria-activedescendant` on the (light-DOM) filter field itself; the reactive
|
|
919
|
-
* layer that owns the field (e.g. `Select`) listens here and reflects it.
|
|
947
|
+
/** Combobox-mode cursor report for custom fields and observers. Fires when
|
|
948
|
+
* the active option changes, with `detail.id` containing an authored option
|
|
949
|
+
* ID or `null`. Built-in Anta Inputs receive a direct ARIA element relation.
|
|
920
950
|
* All-lowercase so React/Preact bind it to the CustomEvent. */
|
|
921
951
|
onactivedescendant?: (e: CustomEvent<{
|
|
922
952
|
id: string | null;
|
|
@@ -1265,11 +1295,10 @@ export interface ATabsAttributes extends BaseAttributes {
|
|
|
1265
1295
|
/**
|
|
1266
1296
|
* Attributes for the `<a-tabpanel>` styled tag.
|
|
1267
1297
|
*
|
|
1268
|
-
* `<a-tabpanel>`
|
|
1269
|
-
*
|
|
1270
|
-
*
|
|
1271
|
-
*
|
|
1272
|
-
* from `@antadesign/anta`.
|
|
1298
|
+
* `<a-tabpanel>` finds its sibling `<a-tabs>`, exposes its active state through
|
|
1299
|
+
* `ElementInternals`, and points its accessible label at the matching tab. Low-level
|
|
1300
|
+
* attributes; for the typed JSX wrapper use `TabPanel` (inside `Tabs`) from
|
|
1301
|
+
* `@antadesign/anta`.
|
|
1273
1302
|
*/
|
|
1274
1303
|
export interface ATabpanelAttributes extends BaseAttributes {
|
|
1275
1304
|
/** Pairs the panel with the tab of the same value. The element reads its
|
package/dist/generate-icons.mjs
CHANGED
|
@@ -65,6 +65,9 @@ export async function generate({ input, output = '.', name = 'a-icon.shapes', in
|
|
|
65
65
|
const cssLines = [
|
|
66
66
|
'/* Auto-generated by @antadesign/anta. Do not edit by hand. */',
|
|
67
67
|
'',
|
|
68
|
+
'@layer base, anta, components, utilities;',
|
|
69
|
+
'@layer anta.reset, anta.components, anta.theme;',
|
|
70
|
+
'',
|
|
68
71
|
'@layer anta.components {',
|
|
69
72
|
'',
|
|
70
73
|
]
|
package/dist/index.d.ts
CHANGED
|
@@ -30,8 +30,11 @@ export { Box } from './components/Box';
|
|
|
30
30
|
export type { BoxProps } from './components/Box';
|
|
31
31
|
export { Capture } from './components/Capture';
|
|
32
32
|
export type { CaptureProps } from './components/Capture';
|
|
33
|
+
export { Panel } from './components/Panel';
|
|
34
|
+
export type { PanelProps } from './components/Panel';
|
|
35
|
+
export type { PanelState } from './general_types';
|
|
33
36
|
export type { CaptureInputCancelReason, CaptureInputDirection, CaptureInputDirections, CaptureInputGeometry, CaptureInputModifier, CapturePan, CapturePanInertia, CapturePanInput, CapturePointerActivationReason, CapturePointerCapture, CapturePointerInput, CapturePointerStart, CapturePointerType, CaptureWheelActivation, CaptureWheelActivationReason, CaptureWheelInput, CaptureWheelSettle, SerializedMouseEvent, SerializedPointerEvent, SerializedWheelEvent, } from './capture-types';
|
|
34
|
-
export type { BoxChange, BoxContext, BoxContextChange, BoxDisplay, BoxFont, BoxInset, BoxMeasurement, BoxMeasurementChange, BoxMode, BoxOS, BoxBrowser, BoxPointer, } from './box-types';
|
|
37
|
+
export type { BoxChange, BoxContext, BoxContextChange, BoxDisplay, BoxFont, BoxInset, BoxMeasurement, BoxMeasurementChange, BoxObservation, BoxMode, BoxOS, BoxBrowser, BoxPointer, } from './box-types';
|
|
35
38
|
export { Title } from './components/Title';
|
|
36
39
|
export type { TitleProps } from './components/Title';
|
|
37
40
|
export { Tag } from './components/Tag';
|
package/dist/index.js
CHANGED
|
@@ -17,6 +17,7 @@ import { Loader } from "./components/Loader";
|
|
|
17
17
|
import { Text } from "./components/Text";
|
|
18
18
|
import { Box } from "./components/Box";
|
|
19
19
|
import { Capture } from "./components/Capture";
|
|
20
|
+
import { Panel } from "./components/Panel";
|
|
20
21
|
import { Title } from "./components/Title";
|
|
21
22
|
import { Tag } from "./components/Tag";
|
|
22
23
|
import { Icon } from "./components/Icon";
|
|
@@ -93,6 +94,7 @@ export {
|
|
|
93
94
|
MenuItem,
|
|
94
95
|
MenuItemCopy,
|
|
95
96
|
MenuSeparator,
|
|
97
|
+
Panel,
|
|
96
98
|
Progress,
|
|
97
99
|
RadioGroup,
|
|
98
100
|
Select,
|
package/dist/jsx-runtime.d.ts
CHANGED
|
@@ -8,6 +8,10 @@ type JsxFunction = {
|
|
|
8
8
|
type UseState = <S>(initial: S | (() => S)) => [S, (next: S | ((prev: S) => S)) => void];
|
|
9
9
|
type UseId = () => string;
|
|
10
10
|
type UseMemo = <T>(factory: () => T, deps: unknown[]) => T;
|
|
11
|
+
type UseRef = <T>(initial: T) => {
|
|
12
|
+
current: T;
|
|
13
|
+
};
|
|
14
|
+
type UseLayoutEffect = (effect: () => void | (() => void), deps?: unknown[]) => void;
|
|
11
15
|
type UseSyncExternalStore = <T>(subscribe: (onChange: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T) => T;
|
|
12
16
|
declare let _Fragment: ComponentType;
|
|
13
17
|
/**
|
|
@@ -33,6 +37,8 @@ export declare function configure(jsx: JsxFunction, Fragment?: ComponentType, ho
|
|
|
33
37
|
useState?: UseState;
|
|
34
38
|
useId?: UseId;
|
|
35
39
|
useMemo?: UseMemo;
|
|
40
|
+
useRef?: UseRef;
|
|
41
|
+
useLayoutEffect?: UseLayoutEffect;
|
|
36
42
|
useSyncExternalStore?: UseSyncExternalStore;
|
|
37
43
|
}): void;
|
|
38
44
|
/** Hooks indirection so wrappers depend on the configured renderer, not a hard
|
|
@@ -40,11 +46,15 @@ export declare function configure(jsx: JsxFunction, Fragment?: ComponentType, ho
|
|
|
40
46
|
export declare function useState<S>(initial: S | (() => S)): [S, (next: S | ((prev: S) => S)) => void];
|
|
41
47
|
export declare function useId(): string;
|
|
42
48
|
export declare function useMemo<T>(factory: () => T, deps: unknown[]): T;
|
|
49
|
+
export declare function useRef<T>(initial: T): {
|
|
50
|
+
current: T;
|
|
51
|
+
};
|
|
52
|
+
export declare function useLayoutEffect(effect: () => void | (() => void), deps?: unknown[]): void;
|
|
43
53
|
export declare function useSyncExternalStore<T>(subscribe: (onChange: () => void) => () => void, getSnapshot: () => T, getServerSnapshot?: () => T): T;
|
|
44
54
|
export declare function jsx(type: ComponentType, props: Record<string, unknown> | null, key?: string | number): unknown;
|
|
45
55
|
export declare function jsxs(type: ComponentType, props: Record<string, unknown> | null, key?: string | number): unknown;
|
|
46
56
|
export { _Fragment as Fragment };
|
|
47
|
-
import type { AAvatarAttributes, AProgressAttributes, ALoaderAttributes, ATextAttributes, ABoxAttributes, ACaptureAttributes, ATitleAttributes, ATagAttributes, AExpanderAttributes, AIconAttributes, AButtonAttributes, ACopyAttributes, ACheckboxAttributes, ASwitchAttributes, ATooltipAttributes, AInputAttributes, ASliderAttributes, AInputTimeAttributes, ACalendarAttributes, ARadioAttributes, ARadioGroupAttributes, AMenuAttributes, AMenuItemAttributes, AMenuGroupAttributes, ATabsAttributes, ATabAttributes, ATabpanelAttributes, ADialogAttributes, ACardAttributes, ABannerAttributes, AToasterAttributes, AToastAttributes, BaseAttributes } from './general_types';
|
|
57
|
+
import type { AAvatarAttributes, AProgressAttributes, ALoaderAttributes, ATextAttributes, ABoxAttributes, ACaptureAttributes, APanelAttributes, ATitleAttributes, ATagAttributes, AExpanderAttributes, AIconAttributes, AButtonAttributes, ACopyAttributes, ACheckboxAttributes, ASwitchAttributes, ATooltipAttributes, AInputAttributes, ASliderAttributes, AInputTimeAttributes, ACalendarAttributes, ARadioAttributes, ARadioGroupAttributes, AMenuAttributes, AMenuItemAttributes, AMenuGroupAttributes, ATabsAttributes, ATabAttributes, ATabpanelAttributes, ADialogAttributes, ACardAttributes, ABannerAttributes, AToasterAttributes, AToastAttributes, BaseAttributes } from './general_types';
|
|
48
58
|
export declare namespace JSX {
|
|
49
59
|
interface IntrinsicElements extends React.JSX.IntrinsicElements, AntaIntrinsicElements {
|
|
50
60
|
}
|
|
@@ -62,6 +72,7 @@ export interface AntaIntrinsicElements {
|
|
|
62
72
|
'a-text': ATextAttributes;
|
|
63
73
|
'a-box': ABoxAttributes;
|
|
64
74
|
'a-capture': ACaptureAttributes;
|
|
75
|
+
'a-panel': APanelAttributes;
|
|
65
76
|
'a-title': ATitleAttributes;
|
|
66
77
|
'a-tag': ATagAttributes;
|
|
67
78
|
'a-tag-label': BaseAttributes;
|
|
@@ -101,6 +112,14 @@ export interface AntaIntrinsicElements {
|
|
|
101
112
|
'a-menu-separator': BaseAttributes;
|
|
102
113
|
'a-menu-header': BaseAttributes;
|
|
103
114
|
'a-menu-footer': BaseAttributes;
|
|
115
|
+
'a-select-field': BaseAttributes & {
|
|
116
|
+
size?: string;
|
|
117
|
+
status?: string;
|
|
118
|
+
disabled?: boolean | '';
|
|
119
|
+
};
|
|
120
|
+
'a-select-label': BaseAttributes;
|
|
121
|
+
'a-select-hint': BaseAttributes;
|
|
122
|
+
'a-select-leading': BaseAttributes;
|
|
104
123
|
'a-select-header': BaseAttributes;
|
|
105
124
|
'a-select-footer': BaseAttributes;
|
|
106
125
|
'a-select-chevron': BaseAttributes & {
|
package/dist/jsx-runtime.js
CHANGED
|
@@ -4,6 +4,8 @@ let _Fragment = React.Fragment;
|
|
|
4
4
|
let _useState = React.useState;
|
|
5
5
|
let _useId = React.useId;
|
|
6
6
|
let _useMemo = React.useMemo;
|
|
7
|
+
let _useRef = React.useRef;
|
|
8
|
+
let _useLayoutEffect = React.useLayoutEffect;
|
|
7
9
|
let _useSyncExternalStore = React.useSyncExternalStore;
|
|
8
10
|
function configure(jsx2, Fragment, hooks) {
|
|
9
11
|
_jsx = jsx2;
|
|
@@ -11,6 +13,8 @@ function configure(jsx2, Fragment, hooks) {
|
|
|
11
13
|
if (hooks?.useState) _useState = hooks.useState;
|
|
12
14
|
if (hooks?.useId) _useId = hooks.useId;
|
|
13
15
|
if (hooks?.useMemo) _useMemo = hooks.useMemo;
|
|
16
|
+
if (hooks?.useRef) _useRef = hooks.useRef;
|
|
17
|
+
if (hooks?.useLayoutEffect) _useLayoutEffect = hooks.useLayoutEffect;
|
|
14
18
|
if (hooks?.useSyncExternalStore) _useSyncExternalStore = hooks.useSyncExternalStore;
|
|
15
19
|
}
|
|
16
20
|
function useState(initial) {
|
|
@@ -22,6 +26,12 @@ function useId() {
|
|
|
22
26
|
function useMemo(factory, deps) {
|
|
23
27
|
return _useMemo(factory, deps);
|
|
24
28
|
}
|
|
29
|
+
function useRef(initial) {
|
|
30
|
+
return _useRef(initial);
|
|
31
|
+
}
|
|
32
|
+
function useLayoutEffect(effect, deps) {
|
|
33
|
+
return _useLayoutEffect(effect, deps);
|
|
34
|
+
}
|
|
25
35
|
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
26
36
|
return _useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
27
37
|
}
|
|
@@ -47,7 +57,9 @@ export {
|
|
|
47
57
|
jsx,
|
|
48
58
|
jsxs,
|
|
49
59
|
useId,
|
|
60
|
+
useLayoutEffect,
|
|
50
61
|
useMemo,
|
|
62
|
+
useRef,
|
|
51
63
|
useState,
|
|
52
64
|
useSyncExternalStore
|
|
53
65
|
};
|
package/dist/reset.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer anta.reset{*,*:before,*:after{box-sizing:border-box}*{margin:0}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;font-variation-settings:inherit}:focus-visible{outline:1px solid var(--focus-ring);outline-offset:2px}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}html{color:var(--text-2);font-family:var(--sans-serif);line-height:calc(22 / 15);-webkit-tap-highlight-color:transparent}body{background:var(--bg-2)}h1,h2,h3,h4,h5,h6{color:var(--text-1);font-weight:584.62;letter-spacing:0}h1{font-size:28px;line-height:32px;margin-block:0 16px}h2{font-size:24px;line-height:28px;margin-block:32px 12px}h3{font-size:20px;line-height:24px;margin-block:24px 12px}h4{font-size:17px;line-height:20px;margin-block:20px 8px}h5{font-size:15px;line-height:20px;margin-block:16px 8px}h6{font-size:13px;line-height:16px;margin-block:16px 4px}b,strong{font-weight:600}dfn{font-style:normal;text-decoration:underline dotted;text-underline-offset:3px;text-decoration-color:color-mix(in oklch,currentColor 50%,transparent)}mark{color:color-mix(in oklch,black 90%,transparent);background-color:light-dark(hsl(55 100% 61.85%),hsl(55 100% 35%));border-radius:2px}del{color:var(--text-2-critical);text-decoration:line-through}ins{color:var(--text-2-success);text-decoration:none}var,dt{font-style:italic;font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}small,figcaption{font-size:calc(13em / 15)}figcaption{color:var(--text-3)}hr{border:0;border-block-start:1px solid var(--border-4)}code{font-family:var(--monospace);font-size:.933em;line-height:1em;color:inherit;background:light-dark(color-mix(in oklch,currentColor 6%,transparent),color-mix(in oklch,currentColor 10%,transparent));border:none;padding:.25em .4ch .2em;border-radius:3px}pre{padding:10px 1rem 6px;border:1px solid var(--border-5);border-radius:6px;background:var(--bg-3);color:var(--text-1);font-family:var(--monospace);font-size:13px;font-weight:440;line-height:20px;overflow-x:auto}pre code{background:none;padding:0;font:inherit;font-variation-settings:inherit}code,samp,pre{letter-spacing:0}p,ul,ol,blockquote,dl,pre,figure{margin-block-end:1rem}:is(p,ul,ol,blockquote,dl,pre,figure):last-child{margin-block-end:0}ul,ol{padding-left:3ch}:is(ul,ol)>li{margin-bottom:.5em}:is(ul,ol)>li::marker{color:var(--text-5)}blockquote{border-left:3px solid var(--text-5);padding-left:calc(2ch - 3px)}menu{list-style:none;padding:0;margin:0}menu>li{margin:0}a:not(:where([role=button])),a:not(:where([role=button])):link,a:not(:where([role=button])):visited{color:var(--link-color);text-decoration:underline;text-decoration-style:solid;text-decoration-color:color-mix(in srgb,currentColor 75%,transparent);text-decoration-thickness:.5px;text-underline-offset:3px}@media(hover:hover)and (pointer:fine){a:not(:where([role=button])):hover{color:var(--link-color-hover);text-decoration-thickness:1px}}a:not(:where([role=button])):active{text-decoration-color:color-mix(in srgb,currentColor 75%,transparent)}::selection{background:light-dark(color-mix(in oklch,var(--focus-ring) 20%,transparent),color-mix(in oklch,var(--focus-ring) 30%,transparent))}table{border-collapse:collapse;font-variant-numeric:lining-nums tabular-nums}caption{text-align:left;color:var(--text-3);padding-left:10px;margin-bottom:.25em}th,td{padding:5px 10px;text-align:left;vertical-align:top;border-bottom:1px solid var(--border-4)}thead th{font-weight:600}tfoot tr:last-child>:is(th,td),table:not(:has(tfoot)) tbody tr:last-child>:is(th,td){border-bottom:none}table[data-bordered]{border-collapse:separate;border-spacing:0;border:1px solid var(--border-4);border-radius:3px}table[data-bordered] :is(th,td){border-right:1px solid var(--border-4)}table[data-bordered] tr>:is(th,td):last-child{border-right:0}}
|
|
1
|
+
@layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;@layer anta.reset{*,*:before,*:after{box-sizing:border-box}*{margin:0}img,picture,video,canvas,svg{display:block;max-width:100%}input,button,textarea,select{font:inherit;font-variation-settings:inherit}:focus-visible{outline:1px solid var(--focus-ring);outline-offset:2px}p,h1,h2,h3,h4,h5,h6{overflow-wrap:break-word}p{text-wrap:pretty}h1,h2,h3,h4,h5,h6{text-wrap:balance}html{color:var(--text-2);font-family:var(--sans-serif);line-height:calc(22 / 15);-webkit-tap-highlight-color:transparent}body{background:var(--bg-2)}h1,h2,h3,h4,h5,h6{color:var(--text-1);font-weight:584.62;letter-spacing:0}h1{font-size:28px;line-height:32px;margin-block:0 16px}h2{font-size:24px;line-height:28px;margin-block:32px 12px}h3{font-size:20px;line-height:24px;margin-block:24px 12px}h4{font-size:17px;line-height:20px;margin-block:20px 8px}h5{font-size:15px;line-height:20px;margin-block:16px 8px}h6{font-size:13px;line-height:16px;margin-block:16px 4px}b,strong{font-weight:600}dfn{font-style:normal;text-decoration:underline dotted;text-underline-offset:3px;text-decoration-color:color-mix(in oklch,currentColor 50%,transparent)}mark{color:color-mix(in oklch,black 90%,transparent);background-color:light-dark(hsl(55 100% 61.85%),hsl(55 100% 35%));border-radius:2px}del{color:var(--text-2-critical);text-decoration:line-through}ins{color:var(--text-2-success);text-decoration:none}var,dt{font-style:italic;font-weight:600}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sup{top:-.5em}sub{bottom:-.25em}small,figcaption{font-size:calc(13em / 15)}figcaption{color:var(--text-3)}hr{border:0;border-block-start:1px solid var(--border-4)}code{font-family:var(--monospace);font-size:.933em;line-height:1em;color:inherit;background:light-dark(color-mix(in oklch,currentColor 6%,transparent),color-mix(in oklch,currentColor 10%,transparent));border:none;padding:.25em .4ch .2em;border-radius:3px}pre{padding:10px 1rem 6px;border:1px solid var(--border-5);border-radius:6px;background:var(--bg-3);color:var(--text-1);font-family:var(--monospace);font-size:13px;font-weight:440;line-height:20px;overflow-x:auto}pre code{background:none;padding:0;font:inherit;font-variation-settings:inherit}code,samp,pre{letter-spacing:0}p,ul,ol,blockquote,dl,pre,figure{margin-block-end:1rem}:is(p,ul,ol,blockquote,dl,pre,figure):last-child{margin-block-end:0}ul,ol{padding-left:3ch}:is(ul,ol)>li{margin-bottom:.5em}:is(ul,ol)>li::marker{color:var(--text-5)}blockquote{border-left:3px solid var(--text-5);padding-left:calc(2ch - 3px)}menu{list-style:none;padding:0;margin:0}menu>li{margin:0}a:not(:where([role=button])),a:not(:where([role=button])):link,a:not(:where([role=button])):visited{color:var(--link-color);text-decoration:underline;text-decoration-style:solid;text-decoration-color:color-mix(in srgb,currentColor 75%,transparent);text-decoration-thickness:.5px;text-underline-offset:3px}@media(hover:hover)and (pointer:fine){a:not(:where([role=button])):hover{color:var(--link-color-hover);text-decoration-thickness:1px}}a:not(:where([role=button])):active{text-decoration-color:color-mix(in srgb,currentColor 75%,transparent)}::selection{background:light-dark(color-mix(in oklch,var(--focus-ring) 20%,transparent),color-mix(in oklch,var(--focus-ring) 30%,transparent))}table{border-collapse:collapse;font-variant-numeric:lining-nums tabular-nums}caption{text-align:left;color:var(--text-3);padding-left:10px;margin-bottom:.25em}th,td{padding:5px 10px;text-align:left;vertical-align:top;border-bottom:1px solid var(--border-4)}thead th{font-weight:600}tfoot tr:last-child>:is(th,td),table:not(:has(tfoot)) tbody tr:last-child>:is(th,td){border-bottom:none}table[data-bordered]{border-collapse:separate;border-spacing:0;border:1px solid var(--border-4);border-radius:3px}table[data-bordered] :is(th,td){border-right:1px solid var(--border-4)}table[data-bordered] tr>:is(th,td):last-child{border-right:0}}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@font-face{font-family:TT Interphases Pro Variable;src:url(https://assets.anta.design/fonts/TT_Interphases_Pro_Variable.woff2) format("woff2");font-style:normal;font-weight:100 900;font-stretch:75% 100%;font-feature-settings:"ss02","ss05","tnum";font-variation-settings:"slnt" 0;font-display:swap}@font-face{font-family:TT Interphases Pro Variable;src:url(https://assets.anta.design/fonts/TT_Interphases_Pro_Variable.woff2) format("woff2");font-style:italic;font-weight:100 900;font-stretch:75% 100%;font-feature-settings:"ss02","ss05","tnum";font-variation-settings:"slnt" 11;font-display:swap}@font-face{font-family:Stringer;src:url(https://assets.anta.design/fonts/Stringer-Regular-Web.woff2) format("woff2");font-style:normal;font-weight:400;font-display:swap}@font-face{font-family:Antithesis Mono;src:url(https://assets.anta.design/fonts/Antithesis_mono_VF_Upright.woff2) format("woff2");font-style:normal;font-weight:400 700;font-display:swap}@font-face{font-family:Antithesis Mono;src:url(https://assets.anta.design/fonts/Antithesis_mono_VF_Italic.woff2) format("woff2");font-style:italic;font-weight:400 700;font-display:swap}
|
|
1
|
+
@layer base,anta,components,utilities;@layer anta.reset,anta.components,anta.theme;@font-face{font-family:TT Interphases Pro Variable;src:url(https://assets.anta.design/fonts/TT_Interphases_Pro_Variable.woff2) format("woff2");font-style:normal;font-weight:100 900;font-stretch:75% 100%;font-feature-settings:"ss02","ss05","tnum";font-variation-settings:"slnt" 0;font-display:swap}@font-face{font-family:TT Interphases Pro Variable;src:url(https://assets.anta.design/fonts/TT_Interphases_Pro_Variable.woff2) format("woff2");font-style:italic;font-weight:100 900;font-stretch:75% 100%;font-feature-settings:"ss02","ss05","tnum";font-variation-settings:"slnt" 11;font-display:swap}@font-face{font-family:Stringer;src:url(https://assets.anta.design/fonts/Stringer-Regular-Web.woff2) format("woff2");font-style:normal;font-weight:400;font-display:swap}@font-face{font-family:Antithesis Mono;src:url(https://assets.anta.design/fonts/Antithesis_mono_VF_Upright.woff2) format("woff2");font-style:normal;font-weight:400 700;font-display:swap}@font-face{font-family:Antithesis Mono;src:url(https://assets.anta.design/fonts/Antithesis_mono_VF_Italic.woff2) format("woff2");font-style:italic;font-weight:400 700;font-display:swap}:root,.light{--sans-serif: "TT Interphases Pro Variable", sans-serif;--serif: "Stringer", serif;--monospace: "Antithesis Mono", ui-monospace, monospace;font-variation-settings:"slnt" 0}:root,.light{--anta-seed-brand: #cc4636;--anta-seed-neutral: #65605b}@layer anta.theme{:is(address,cite,em,i,var,dt){font-variation-settings:"slnt" 11;font-synthesis:none}dfn{font-variation-settings:"slnt" 0}a-button,a[role=button][data-anta],button[data-anta],input[data-anta]:is([type=reset],[type=submit]),a-tab{font-stretch:88%}a-button,a[role=button][data-anta],button[data-anta],input[data-anta]:is([type=reset],[type=submit]){letter-spacing:.05ch}a-input{--_input-adornment-font-stretch: 88%}a-tag{font-feature-settings:"tnum" 1,"ss05" 1,"lnum","ss01","ss04","case","calt";letter-spacing:.02ch}a-tag[allcaps]{font-feature-settings:"tnum" 1,"ss05" 1,"ss01","case","calt";letter-spacing:.08ch}:is(h1,h2,h3,a-title[level="1"],a-title[level="2"],a-title[level="3"]){font-family:var(--serif)}:is(a-button,a[role=button][data-anta],button[data-anta],input[data-anta]:is([type=reset],[type=submit])):not([round]){--_radius: 999px}a-input:not([round])::part(field),a-input:not([round]):not(:defined):after{border-radius:0}:is(input[data-anta]:not([type=checkbox],[type=radio],[type=range],[type=color],[type=file],[type=button],[type=reset],[type=submit],[type=image],[type=hidden]),textarea[data-anta],select[data-anta]):not([round]){--native-field-round: 0px}a-tag{border-radius:1px}}
|