@lutra-ui-system/react 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +240 -0
- package/dist/components/button/button.d.ts +105 -0
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/button/button.js +91 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/index.d.ts +3 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +2 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/card/card.d.ts +100 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +51 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +2 -0
- package/dist/components/card/index.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +67 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +63 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/dialog/dialog.d.ts +88 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -0
- package/dist/components/dialog/dialog.js +156 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dialog/index.js.map +1 -0
- package/dist/components/dropdown/dropdown.d.ts +89 -0
- package/dist/components/dropdown/dropdown.d.ts.map +1 -0
- package/dist/components/dropdown/dropdown.js +173 -0
- package/dist/components/dropdown/dropdown.js.map +1 -0
- package/dist/components/dropdown/index.d.ts +3 -0
- package/dist/components/dropdown/index.d.ts.map +1 -0
- package/dist/components/dropdown/index.js +2 -0
- package/dist/components/dropdown/index.js.map +1 -0
- package/dist/components/error-summary/error-summary.d.ts +81 -0
- package/dist/components/error-summary/error-summary.d.ts.map +1 -0
- package/dist/components/error-summary/error-summary.js +85 -0
- package/dist/components/error-summary/error-summary.js.map +1 -0
- package/dist/components/error-summary/index.d.ts +3 -0
- package/dist/components/error-summary/index.d.ts.map +1 -0
- package/dist/components/error-summary/index.js +2 -0
- package/dist/components/error-summary/index.js.map +1 -0
- package/dist/components/field/field.d.ts +55 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/field.js +26 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/index.d.ts +3 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/index.js +2 -0
- package/dist/components/field/index.js.map +1 -0
- package/dist/components/field-group/field-group.d.ts +67 -0
- package/dist/components/field-group/field-group.d.ts.map +1 -0
- package/dist/components/field-group/field-group.js +38 -0
- package/dist/components/field-group/field-group.js.map +1 -0
- package/dist/components/field-group/index.d.ts +3 -0
- package/dist/components/field-group/index.d.ts.map +1 -0
- package/dist/components/field-group/index.js +2 -0
- package/dist/components/field-group/index.js.map +1 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input.d.ts +96 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.js +26 -0
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/link/index.d.ts +3 -0
- package/dist/components/link/index.d.ts.map +1 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/link/index.js.map +1 -0
- package/dist/components/link/link.d.ts +44 -0
- package/dist/components/link/link.d.ts.map +1 -0
- package/dist/components/link/link.js +26 -0
- package/dist/components/link/link.js.map +1 -0
- package/dist/components/link-card/index.d.ts +3 -0
- package/dist/components/link-card/index.d.ts.map +1 -0
- package/dist/components/link-card/index.js +2 -0
- package/dist/components/link-card/index.js.map +1 -0
- package/dist/components/link-card/link-card.d.ts +62 -0
- package/dist/components/link-card/link-card.d.ts.map +1 -0
- package/dist/components/link-card/link-card.js +43 -0
- package/dist/components/link-card/link-card.js.map +1 -0
- package/dist/components/mobile-navigation/index.d.ts +3 -0
- package/dist/components/mobile-navigation/index.d.ts.map +1 -0
- package/dist/components/mobile-navigation/index.js +2 -0
- package/dist/components/mobile-navigation/index.js.map +1 -0
- package/dist/components/mobile-navigation/mobile-navigation.d.ts +88 -0
- package/dist/components/mobile-navigation/mobile-navigation.d.ts.map +1 -0
- package/dist/components/mobile-navigation/mobile-navigation.js +153 -0
- package/dist/components/mobile-navigation/mobile-navigation.js.map +1 -0
- package/dist/components/navigation-item/index.d.ts +3 -0
- package/dist/components/navigation-item/index.d.ts.map +1 -0
- package/dist/components/navigation-item/index.js +2 -0
- package/dist/components/navigation-item/index.js.map +1 -0
- package/dist/components/navigation-item/navigation-item.d.ts +38 -0
- package/dist/components/navigation-item/navigation-item.d.ts.map +1 -0
- package/dist/components/navigation-item/navigation-item.js +22 -0
- package/dist/components/navigation-item/navigation-item.js.map +1 -0
- package/dist/components/radio/index.d.ts +3 -0
- package/dist/components/radio/index.d.ts.map +1 -0
- package/dist/components/radio/index.js +2 -0
- package/dist/components/radio/index.js.map +1 -0
- package/dist/components/radio/radio.d.ts +58 -0
- package/dist/components/radio/radio.d.ts.map +1 -0
- package/dist/components/radio/radio.js +37 -0
- package/dist/components/radio/radio.js.map +1 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +2 -0
- package/dist/components/select/index.js.map +1 -0
- package/dist/components/select/select.d.ts +67 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +25 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/select-field/index.d.ts +3 -0
- package/dist/components/select-field/index.d.ts.map +1 -0
- package/dist/components/select-field/index.js +2 -0
- package/dist/components/select-field/index.js.map +1 -0
- package/dist/components/select-field/select-field.d.ts +43 -0
- package/dist/components/select-field/select-field.d.ts.map +1 -0
- package/dist/components/select-field/select-field.js +24 -0
- package/dist/components/select-field/select-field.js.map +1 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.d.ts.map +1 -0
- package/dist/components/table/index.js +2 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/table.d.ts +251 -0
- package/dist/components/table/table.d.ts.map +1 -0
- package/dist/components/table/table.js +209 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/index.d.ts.map +1 -0
- package/dist/components/toggle/index.js +2 -0
- package/dist/components/toggle/index.js.map +1 -0
- package/dist/components/toggle/toggle.d.ts +66 -0
- package/dist/components/toggle/toggle.d.ts.map +1 -0
- package/dist/components/toggle/toggle.js +49 -0
- package/dist/components/toggle/toggle.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +2 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +74 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +180 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/index.d.ts +57 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +38 -0
- package/dist/index.js.map +1 -0
- package/dist/internal/development.d.ts +2 -0
- package/dist/internal/development.d.ts.map +1 -0
- package/dist/internal/development.js +2 -0
- package/dist/internal/development.js.map +1 -0
- package/dist/internal/field-support.d.ts +68 -0
- package/dist/internal/field-support.d.ts.map +1 -0
- package/dist/internal/field-support.js +42 -0
- package/dist/internal/field-support.js.map +1 -0
- package/dist/internal/isomorphic-layout-effect.d.ts +26 -0
- package/dist/internal/isomorphic-layout-effect.d.ts.map +1 -0
- package/dist/internal/isomorphic-layout-effect.js +26 -0
- package/dist/internal/isomorphic-layout-effect.js.map +1 -0
- package/dist/styles.css +3474 -0
- package/dist/tokens.json +995 -0
- package/package.json +76 -0
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback, useEffect, useId, useRef, useState } from 'react';
|
|
3
|
+
import { Button } from '../button/index.js';
|
|
4
|
+
/** The first focusable thing in the panel, in DOM order. */
|
|
5
|
+
const FOCUSABLE = 'a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
6
|
+
function MenuIcon() {
|
|
7
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", focusable: "false", children: _jsx("path", { d: "M2 4h12M2 8h12M2 12h12", strokeLinecap: "round" }) }));
|
|
8
|
+
}
|
|
9
|
+
function CloseIcon() {
|
|
10
|
+
return (_jsx("svg", { viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", focusable: "false", children: _jsx("path", { d: "M4 4l8 8M12 4l-8 8", strokeLinecap: "round" }) }));
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Marks everything outside `element` as `inert`, walking up to `document.body` and marking the
|
|
14
|
+
* siblings at each level. Returns a function that restores exactly what was changed.
|
|
15
|
+
*
|
|
16
|
+
* Only elements that were not already inert are touched, so a consumer's own `inert` survives.
|
|
17
|
+
*/
|
|
18
|
+
function inertOutside(element) {
|
|
19
|
+
const marked = [];
|
|
20
|
+
let node = element;
|
|
21
|
+
while (node && node.parentElement) {
|
|
22
|
+
for (const sibling of Array.from(node.parentElement.children)) {
|
|
23
|
+
if (sibling === node)
|
|
24
|
+
continue;
|
|
25
|
+
if (!(sibling instanceof HTMLElement))
|
|
26
|
+
continue;
|
|
27
|
+
if (sibling.hasAttribute('inert'))
|
|
28
|
+
continue;
|
|
29
|
+
sibling.setAttribute('inert', '');
|
|
30
|
+
marked.push(sibling);
|
|
31
|
+
}
|
|
32
|
+
node = node.parentElement;
|
|
33
|
+
}
|
|
34
|
+
return () => {
|
|
35
|
+
for (const element of marked)
|
|
36
|
+
element.removeAttribute('inert');
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The mobile primary-navigation disclosure: a button that reveals a panel of destinations.
|
|
41
|
+
*
|
|
42
|
+
* **It is a disclosure, not a dialog.** The annotation asks for a button carrying `aria-expanded`
|
|
43
|
+
* and `aria-controls`, and the page guidance says not to apply dialog semantics or a focus trap. So
|
|
44
|
+
* there is no `role="dialog"`, no `aria-modal`, and no focus-trap loop. The panel is a `nav`
|
|
45
|
+
* landmark with its own accessible name, holding ordinary anchors.
|
|
46
|
+
*
|
|
47
|
+
* Behaviour, all of it from the annotation:
|
|
48
|
+
*
|
|
49
|
+
* - The trigger is a real button, so Enter and Space open it.
|
|
50
|
+
* - `aria-expanded` reflects the state; `aria-controls` points at the panel.
|
|
51
|
+
* - Opening moves focus into the panel.
|
|
52
|
+
* - Escape closes it and returns focus to the trigger.
|
|
53
|
+
* - The close button and a pointer press outside also close it, and Escape and the close button both
|
|
54
|
+
* return focus to the trigger.
|
|
55
|
+
* - Every target holds the 44px minimum; that is in the stylesheet.
|
|
56
|
+
*
|
|
57
|
+
* The one place the two Figma sources disagree is background containment, and that is resolved by
|
|
58
|
+
* `containBackground` — see the prop, and `mobile-navigation.md` for the full argument.
|
|
59
|
+
*
|
|
60
|
+
* Figma's `Mobile Navigation` component draws the open panel only; the trigger lives in the header
|
|
61
|
+
* pattern. It is owned here because `aria-expanded`, `aria-controls` and the focus round trip are one
|
|
62
|
+
* mechanism, and splitting them across two components would leave neither able to keep the contract.
|
|
63
|
+
*/
|
|
64
|
+
export function MobileNavigation({ label = 'Menu', navLabel = 'Primary', closeLabel = 'Close navigation', children, open: controlledOpen, defaultOpen = false, onOpenChange, containBackground = false, align = 'start', className, }) {
|
|
65
|
+
const panelId = `lutra-mobile-navigation-${useId()}`;
|
|
66
|
+
const [uncontrolledOpen, setUncontrolledOpen] = useState(defaultOpen);
|
|
67
|
+
const isControlled = controlledOpen !== undefined;
|
|
68
|
+
const open = isControlled ? controlledOpen : uncontrolledOpen;
|
|
69
|
+
const wrapperRef = useRef(null);
|
|
70
|
+
const triggerRef = useRef(null);
|
|
71
|
+
const panelRef = useRef(null);
|
|
72
|
+
// Set when this component closes itself, so focus returns to the trigger on those paths and not
|
|
73
|
+
// when a consumer closes the panel for their own reasons — a route change, say.
|
|
74
|
+
const returnFocus = useRef(false);
|
|
75
|
+
const setOpen = useCallback((next) => {
|
|
76
|
+
if (!isControlled)
|
|
77
|
+
setUncontrolledOpen(next);
|
|
78
|
+
onOpenChange?.(next);
|
|
79
|
+
}, [isControlled, onOpenChange]);
|
|
80
|
+
const close = useCallback(({ focusTrigger }) => {
|
|
81
|
+
returnFocus.current = focusTrigger;
|
|
82
|
+
setOpen(false);
|
|
83
|
+
}, [setOpen]);
|
|
84
|
+
// The trigger toggles, and one press must produce exactly one notification. It sets the
|
|
85
|
+
// focus-return flag directly rather than going through `close` first: closing and then opening
|
|
86
|
+
// would report `false` before `true` on the way open, and `false` twice on the way closed, which
|
|
87
|
+
// is a state change a consumer never asked for.
|
|
88
|
+
const toggle = useCallback(() => {
|
|
89
|
+
returnFocus.current = false;
|
|
90
|
+
setOpen(!open);
|
|
91
|
+
}, [open, setOpen]);
|
|
92
|
+
// Focus moves into the panel on open, and back to the trigger when this component closed it.
|
|
93
|
+
useEffect(() => {
|
|
94
|
+
if (open) {
|
|
95
|
+
panelRef.current?.querySelector(FOCUSABLE)?.focus();
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
if (returnFocus.current) {
|
|
99
|
+
returnFocus.current = false;
|
|
100
|
+
triggerRef.current?.focus();
|
|
101
|
+
}
|
|
102
|
+
}, [open]);
|
|
103
|
+
// Background containment. `inert` is native, so the browser does the work; there is no focus-trap
|
|
104
|
+
// loop here and nothing is given dialog semantics.
|
|
105
|
+
useEffect(() => {
|
|
106
|
+
const wrapper = wrapperRef.current;
|
|
107
|
+
if (!open || !containBackground || !wrapper)
|
|
108
|
+
return;
|
|
109
|
+
return inertOutside(wrapper);
|
|
110
|
+
}, [open, containBackground]);
|
|
111
|
+
// A pointer press outside closes the panel. `pointerdown` rather than `click`, and nothing is
|
|
112
|
+
// prevented, so whatever was pressed still receives its own event. With `containBackground` on
|
|
113
|
+
// there is nothing outside to press — that trade-off is documented on the prop.
|
|
114
|
+
useEffect(() => {
|
|
115
|
+
if (!open)
|
|
116
|
+
return;
|
|
117
|
+
const onPointerDown = (event) => {
|
|
118
|
+
const target = event.target;
|
|
119
|
+
if (target instanceof Node && wrapperRef.current?.contains(target))
|
|
120
|
+
return;
|
|
121
|
+
close({ focusTrigger: false });
|
|
122
|
+
};
|
|
123
|
+
document.addEventListener('pointerdown', onPointerDown);
|
|
124
|
+
return () => {
|
|
125
|
+
document.removeEventListener('pointerdown', onPointerDown);
|
|
126
|
+
};
|
|
127
|
+
}, [open, close]);
|
|
128
|
+
// Escape is delegated with a native listener on the wrapper rather than a JSX handler, the same as
|
|
129
|
+
// Dropdown: the wrapper is a positioning container, not something interactive, and hanging a key
|
|
130
|
+
// handler off a plain div is what `jsx-a11y/no-static-element-interactions` rightly objects to. The
|
|
131
|
+
// real handling belongs to the button and the links whose events bubble up through it.
|
|
132
|
+
useEffect(() => {
|
|
133
|
+
const wrapper = wrapperRef.current;
|
|
134
|
+
if (!open || !wrapper)
|
|
135
|
+
return;
|
|
136
|
+
const onKeyDown = (event) => {
|
|
137
|
+
if (event.key !== 'Escape')
|
|
138
|
+
return;
|
|
139
|
+
// One press, one layer, the same two mechanisms Dropdown uses: `preventDefault()` so a native
|
|
140
|
+
// modal `<dialog>` above the panel does not also treat this press as a close request, and
|
|
141
|
+
// `stopPropagation()` so a JavaScript layer listening for the key does not act on it either.
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
event.stopPropagation();
|
|
144
|
+
close({ focusTrigger: true });
|
|
145
|
+
};
|
|
146
|
+
wrapper.addEventListener('keydown', onKeyDown);
|
|
147
|
+
return () => {
|
|
148
|
+
wrapper.removeEventListener('keydown', onKeyDown);
|
|
149
|
+
};
|
|
150
|
+
}, [open, close]);
|
|
151
|
+
return (_jsxs("div", { ref: wrapperRef, className: className === undefined ? 'lutra-mobile-navigation' : `lutra-mobile-navigation ${className}`, children: [_jsx(Button, { ref: triggerRef, variant: "secondary", contentType: "icon-only", "aria-label": label, "aria-expanded": open, "aria-controls": panelId, onClick: toggle, children: _jsx(MenuIcon, {}) }), open && (_jsxs("div", { ref: panelRef, id: panelId, className: "lutra-mobile-navigation__panel", "data-align": align, children: [_jsx("div", { className: "lutra-mobile-navigation__controls", children: _jsx(Button, { variant: "secondary", contentType: "icon-only", "aria-label": closeLabel, onClick: () => close({ focusTrigger: true }), children: _jsx(CloseIcon, {}) }) }), _jsx("nav", { className: "lutra-mobile-navigation__nav", "aria-label": navLabel, children: children })] }))] }));
|
|
152
|
+
}
|
|
153
|
+
//# sourceMappingURL=mobile-navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mobile-navigation.js","sourceRoot":"","sources":["../../../src/components/mobile-navigation/mobile-navigation.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGxE,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAgE5C,4DAA4D;AAC5D,MAAM,SAAS,GAAG,kEAAkE,CAAC;AAErF,SAAS,QAAQ;IACf,OAAO,CACL,cAAK,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,SAAS,EAAC,OAAO,YAC1F,eAAM,CAAC,EAAC,wBAAwB,EAAC,aAAa,EAAC,OAAO,GAAG,GACrD,CACP,CAAC;AACJ,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AEjB,cAAK,SAAS,EAAC,mCAAmC,YAChD,KAAC,MAAM,IACL,OAAO,EAAC,WAAW,EACnB,WAAW,EAAC,WAAW,gBACX,UAAU,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,EAAE,YAAY,EAAE,IAAI,EAAE,CAAC,YAE5C,KAAC,SAAS,KAAG,GACN,GACL,EAIN,cAAK,SAAS,EAAC,8BAA8B,gBAAa,QAAQ,YAC/D,QAAQ,GACL,IACF,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/navigation-item/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { AnchorHTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Native `<a>` attributes. Nothing is removed — `href`, `target`, `rel`, every `aria-*` and every
|
|
4
|
+
* event handler pass straight through, the same as `Link`.
|
|
5
|
+
*/
|
|
6
|
+
type NativeAnchorProps = AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
7
|
+
export interface NavigationItemProps extends NativeAnchorProps {
|
|
8
|
+
/**
|
|
9
|
+
* Marks this item as the page you are on. Sets `aria-current="page"`.
|
|
10
|
+
*
|
|
11
|
+
* **Exactly one item per navigation context may have it.** Two current items say two different
|
|
12
|
+
* things are the current page, which is worse than none.
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
current?: boolean;
|
|
17
|
+
/** The visible text, which is the accessible name. */
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* One destination in a navigation landmark. Renders a native `<a>`.
|
|
22
|
+
*
|
|
23
|
+
* It is a separate component from `Link` because it is a separate component in Figma with a
|
|
24
|
+
* different job: `Link` is for prose and standalone links, this is for a list of destinations where
|
|
25
|
+
* one of them is where you already are. Sharing an implementation would mean one of the two carrying
|
|
26
|
+
* props it has no use for.
|
|
27
|
+
*
|
|
28
|
+
* **The current state is shown three ways, not one.** The annotation asks for a weight change and an
|
|
29
|
+
* indicator bar as well as colour, because colour alone is not available to everyone, and because a
|
|
30
|
+
* bar alone disappears in forced-colours modes. All three are in the stylesheet; `aria-current="page"`
|
|
31
|
+
* is what carries it to assistive technology.
|
|
32
|
+
*
|
|
33
|
+
* The focus ring is drawn independently of the current indicator, so the item you are on and the item
|
|
34
|
+
* you have focused never look like the same thing.
|
|
35
|
+
*/
|
|
36
|
+
export declare const NavigationItem: import("react").ForwardRefExoticComponent<NavigationItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
37
|
+
export {};
|
|
38
|
+
//# sourceMappingURL=navigation-item.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-item.d.ts","sourceRoot":"","sources":["../../../src/components/navigation-item/navigation-item.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD;;;GAGG;AACH,KAAK,iBAAiB,GAAG,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AAEjE,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,sDAAsD;IACtD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,cAAc,mHAqB1B,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* One destination in a navigation landmark. Renders a native `<a>`.
|
|
5
|
+
*
|
|
6
|
+
* It is a separate component from `Link` because it is a separate component in Figma with a
|
|
7
|
+
* different job: `Link` is for prose and standalone links, this is for a list of destinations where
|
|
8
|
+
* one of them is where you already are. Sharing an implementation would mean one of the two carrying
|
|
9
|
+
* props it has no use for.
|
|
10
|
+
*
|
|
11
|
+
* **The current state is shown three ways, not one.** The annotation asks for a weight change and an
|
|
12
|
+
* indicator bar as well as colour, because colour alone is not available to everyone, and because a
|
|
13
|
+
* bar alone disappears in forced-colours modes. All three are in the stylesheet; `aria-current="page"`
|
|
14
|
+
* is what carries it to assistive technology.
|
|
15
|
+
*
|
|
16
|
+
* The focus ring is drawn independently of the current indicator, so the item you are on and the item
|
|
17
|
+
* you have focused never look like the same thing.
|
|
18
|
+
*/
|
|
19
|
+
export const NavigationItem = forwardRef(function NavigationItem({ current = false, className, children, ...nativeProps }, ref) {
|
|
20
|
+
return (_jsxs("a", { ...nativeProps, ref: ref, className: className === undefined ? 'lutra-navigation-item' : `lutra-navigation-item ${className}`, ...(current ? { 'aria-current': 'page' } : {}), children: [_jsx("span", { className: "lutra-navigation-item__label", children: children }), current && _jsx("span", { className: "lutra-navigation-item__indicator", "aria-hidden": "true" })] }));
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=navigation-item.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation-item.js","sourceRoot":"","sources":["../../../src/components/navigation-item/navigation-item.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAuBnC;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CACtC,SAAS,cAAc,CAAC,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,EAAE,GAAG;IACnF,OAAO,CACL,gBACM,WAAW,EACf,GAAG,EAAE,GAAG,EACR,SAAS,EACP,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,yBAAyB,SAAS,EAAE,KAKtF,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,MAAe,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,aAExD,eAAM,SAAS,EAAC,8BAA8B,YAAE,QAAQ,GAAQ,EAG/D,OAAO,IAAI,eAAM,SAAS,EAAC,kCAAkC,iBAAa,MAAM,GAAG,IAClF,CACL,CAAC;AACJ,CAAC,CACF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/radio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAC9C,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/radio/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { InputHTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/** Native `<input type="radio">` attributes, minus what this component owns. */
|
|
3
|
+
type NativeRadioProps = Omit<InputHTMLAttributes<HTMLInputElement>, 'type' | 'aria-invalid' | 'children' | 'size'>;
|
|
4
|
+
export interface RadioProps extends NativeRadioProps {
|
|
5
|
+
/**
|
|
6
|
+
* Draws the option in its error treatment.
|
|
7
|
+
*
|
|
8
|
+
* **Visual only, and deliberately so.** A single radio cannot usefully be invalid on its own —
|
|
9
|
+
* validity belongs to the question, not to one of its answers. ARIA 1.2 does inherit
|
|
10
|
+
* `aria-invalid` into the `radio` role, but marks it **deprecated** there for that reason, so it
|
|
11
|
+
* is not used. The semantic state lives at group level: `FieldGroup` renders the message and
|
|
12
|
+
* connects it to the `<fieldset>`.
|
|
13
|
+
*
|
|
14
|
+
* This is the one place in the library where a visual state is not paired with a semantic one, and
|
|
15
|
+
* it is because pairing them here would be wrong rather than merely redundant. Checkbox, which
|
|
16
|
+
* genuinely can fail on its own, does set `aria-invalid`.
|
|
17
|
+
*
|
|
18
|
+
* @default false
|
|
19
|
+
*/
|
|
20
|
+
invalid?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A radio button. Renders a native `<input type="radio">`.
|
|
24
|
+
*
|
|
25
|
+
* **Grouping is native: radios that share a `name` are one group.** The browser then supplies
|
|
26
|
+
* everything a radio group needs — arrow keys move between the options and select as they go, the
|
|
27
|
+
* group is one Tab stop, `Home` and `End` work, and selecting one option deselects the rest. None of
|
|
28
|
+
* that is reimplemented here, because reimplementing it is how radio groups get broken.
|
|
29
|
+
*
|
|
30
|
+
* That is also why this primitive takes no `options` array and knows nothing about its siblings:
|
|
31
|
+
* there is no state to coordinate. The Figma library has a `Radio` and a `Radio Item` but no group
|
|
32
|
+
* component; grouping semantics come from `FieldGroup`, which supplies the `<fieldset>` and
|
|
33
|
+
* `<legend>`.
|
|
34
|
+
*
|
|
35
|
+
* **Every rendered Radio must have an accessible name.** Use `RadioItem` for the ordinary labelled
|
|
36
|
+
* composition.
|
|
37
|
+
*/
|
|
38
|
+
export declare const Radio: import("react").ForwardRefExoticComponent<RadioProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
39
|
+
export interface RadioItemProps extends RadioProps {
|
|
40
|
+
/** The visible label. It is the radio's accessible name. */
|
|
41
|
+
label: ReactNode;
|
|
42
|
+
/** Supporting text below the label, connected with `aria-describedby`. */
|
|
43
|
+
description?: ReactNode;
|
|
44
|
+
/** Extra class on the item wrapper, not on the control. */
|
|
45
|
+
className?: string;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* A radio button with its visible label, and optionally a description.
|
|
49
|
+
*
|
|
50
|
+
* The composition the Figma `Radio Item` component draws. The label is a real `<label>` associated by
|
|
51
|
+
* `for`/`id`, so clicking anywhere on it selects the option.
|
|
52
|
+
*
|
|
53
|
+
* Give every option in a group the same `name`. The label and description grow with their content;
|
|
54
|
+
* nothing sets a fixed height.
|
|
55
|
+
*/
|
|
56
|
+
export declare const RadioItem: import("react").ForwardRefExoticComponent<RadioItemProps & import("react").RefAttributes<HTMLInputElement>>;
|
|
57
|
+
export {};
|
|
58
|
+
//# sourceMappingURL=radio.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.d.ts","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAI5D,gFAAgF;AAChF,KAAK,gBAAgB,GAAG,IAAI,CAC1B,mBAAmB,CAAC,gBAAgB,CAAC,EACrC,MAAM,GAAG,cAAc,GAAG,UAAU,GAAG,MAAM,CAC9C,CAAC;AAEF,MAAM,WAAW,UAAW,SAAQ,gBAAgB;IAClD;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,KAAK,yGAehB,CAAC;AAEH,MAAM,WAAW,cAAe,SAAQ,UAAU;IAChD,4DAA4D;IAC5D,KAAK,EAAE,SAAS,CAAC;IACjB,0EAA0E;IAC1E,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,6GAuCpB,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { useFieldIds } from '../../internal/field-support.js';
|
|
4
|
+
/**
|
|
5
|
+
* A radio button. Renders a native `<input type="radio">`.
|
|
6
|
+
*
|
|
7
|
+
* **Grouping is native: radios that share a `name` are one group.** The browser then supplies
|
|
8
|
+
* everything a radio group needs — arrow keys move between the options and select as they go, the
|
|
9
|
+
* group is one Tab stop, `Home` and `End` work, and selecting one option deselects the rest. None of
|
|
10
|
+
* that is reimplemented here, because reimplementing it is how radio groups get broken.
|
|
11
|
+
*
|
|
12
|
+
* That is also why this primitive takes no `options` array and knows nothing about its siblings:
|
|
13
|
+
* there is no state to coordinate. The Figma library has a `Radio` and a `Radio Item` but no group
|
|
14
|
+
* component; grouping semantics come from `FieldGroup`, which supplies the `<fieldset>` and
|
|
15
|
+
* `<legend>`.
|
|
16
|
+
*
|
|
17
|
+
* **Every rendered Radio must have an accessible name.** Use `RadioItem` for the ordinary labelled
|
|
18
|
+
* composition.
|
|
19
|
+
*/
|
|
20
|
+
export const Radio = forwardRef(function Radio({ invalid = false, className, ...nativeProps }, ref) {
|
|
21
|
+
return (_jsx("input", { ...nativeProps, ref: ref, type: "radio", className: className === undefined ? 'lutra-radio' : `lutra-radio ${className}`, "data-invalid": invalid ? 'true' : undefined }));
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* A radio button with its visible label, and optionally a description.
|
|
25
|
+
*
|
|
26
|
+
* The composition the Figma `Radio Item` component draws. The label is a real `<label>` associated by
|
|
27
|
+
* `for`/`id`, so clicking anywhere on it selects the option.
|
|
28
|
+
*
|
|
29
|
+
* Give every option in a group the same `name`. The label and description grow with their content;
|
|
30
|
+
* nothing sets a fixed height.
|
|
31
|
+
*/
|
|
32
|
+
export const RadioItem = forwardRef(function RadioItem({ label, description, className, id, disabled = false, 'aria-describedby': describedBy, ...radioProps }, ref) {
|
|
33
|
+
const hasDescription = description !== undefined && description !== null && description !== false;
|
|
34
|
+
const ids = useFieldIds({ id, hasHint: hasDescription, hasError: false, describedBy });
|
|
35
|
+
return (_jsxs("div", { className: className === undefined ? 'lutra-choice' : `lutra-choice ${className}`, "data-disabled": disabled ? 'true' : undefined, children: [_jsx(Radio, { ...radioProps, ref: ref, id: ids.controlId, disabled: disabled, "aria-describedby": ids.describedBy }), _jsxs("div", { className: "lutra-choice__content", children: [_jsx("label", { className: "lutra-choice__label", htmlFor: ids.controlId, children: label }), hasDescription && (_jsx("p", { className: "lutra-choice__description", id: ids.hintId, children: description }))] })] }));
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio.js","sourceRoot":"","sources":["../../../src/components/radio/radio.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAGnC,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AA2B9D;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,UAAU,CAA+B,SAAS,KAAK,CAC1E,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,EAAE,GAAG,WAAW,EAAE,EAC9C,GAAG;IAEH,OAAO,CACL,mBACM,WAAW,EACf,GAAG,EAAE,GAAG,EACR,IAAI,EAAC,OAAO,EACZ,SAAS,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,SAAS,EAAE,kBAGjE,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,GAC1C,CACH,CAAC;AACJ,CAAC,CAAC,CAAC;AAWH;;;;;;;;GAQG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAmC,SAAS,SAAS,CACtF,EACE,KAAK,EACL,WAAW,EACX,SAAS,EACT,EAAE,EACF,QAAQ,GAAG,KAAK,EAChB,kBAAkB,EAAE,WAAW,EAC/B,GAAG,UAAU,EACd,EACD,GAAG;IAEH,MAAM,cAAc,GAAG,WAAW,KAAK,SAAS,IAAI,WAAW,KAAK,IAAI,IAAI,WAAW,KAAK,KAAK,CAAC;IAClG,MAAM,GAAG,GAAG,WAAW,CAAC,EAAE,EAAE,EAAE,OAAO,EAAE,cAAc,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IAEvF,OAAO,CACL,eACE,SAAS,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB,SAAS,EAAE,mBAClE,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,aAE5C,KAAC,KAAK,OACA,UAAU,EACd,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,GAAG,CAAC,SAAS,EACjB,QAAQ,EAAE,QAAQ,sBACA,GAAG,CAAC,WAAW,GACjC,EACF,eAAK,SAAS,EAAC,uBAAuB,aACpC,gBAAO,SAAS,EAAC,qBAAqB,EAAC,OAAO,EAAE,GAAG,CAAC,SAAS,YAC1D,KAAK,GACA,EACP,cAAc,IAAI,CACjB,YAAG,SAAS,EAAC,2BAA2B,EAAC,EAAE,EAAE,GAAG,CAAC,MAAM,YACpD,WAAW,GACV,CACL,IACG,IACF,CACP,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/select/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import type { SelectHTMLAttributes } from 'react';
|
|
2
|
+
/** Drawn size. Maps to the `size` axis of the Figma component set. */
|
|
3
|
+
export type SelectSize = 'sm' | 'md' | 'lg';
|
|
4
|
+
/**
|
|
5
|
+
* Native `<select>` attributes, minus the three this component redefines or refuses.
|
|
6
|
+
*
|
|
7
|
+
* Keeping the rest means `name`, `value`, `defaultValue`, `required`, `disabled`, `autoComplete`,
|
|
8
|
+
* `form`, `onChange`, every other `aria-*` and every `data-*` behave exactly as they do on a plain
|
|
9
|
+
* `<select>`.
|
|
10
|
+
*
|
|
11
|
+
* - `size` is redefined. The native attribute is the number of rows shown in a list box; Lutra's is
|
|
12
|
+
* the design system's size scale, and that is the meaning a consumer of this library expects.
|
|
13
|
+
* - `multiple` is removed. It turns the control into a scrolling list box with a completely
|
|
14
|
+
* different shape and interaction model, which the Figma component does not draw and this styling
|
|
15
|
+
* would misrepresent. A multi-select need is a checkbox group or a component of its own.
|
|
16
|
+
* - `aria-invalid` is removed on purpose — see `invalid`.
|
|
17
|
+
*/
|
|
18
|
+
type NativeSelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size' | 'multiple' | 'aria-invalid'>;
|
|
19
|
+
export interface SelectProps extends NativeSelectProps {
|
|
20
|
+
/**
|
|
21
|
+
* Drawn size.
|
|
22
|
+
*
|
|
23
|
+
* `'sm'` sets 14px text. Mobile Safari zooms the page when a focused control's text is below
|
|
24
|
+
* 16px, so prefer `'md'` for anything filled in on a phone.
|
|
25
|
+
*
|
|
26
|
+
* @default 'md'
|
|
27
|
+
*/
|
|
28
|
+
size?: SelectSize;
|
|
29
|
+
/**
|
|
30
|
+
* Marks the selection as failing validation. Sets both the visual treatment and
|
|
31
|
+
* `aria-invalid="true"` from the one value, so they cannot disagree — the same contract Input
|
|
32
|
+
* uses. `aria-invalid` is therefore not accepted as a separate prop.
|
|
33
|
+
*
|
|
34
|
+
* Select owns the invalid state; the error message belongs to `SelectField`.
|
|
35
|
+
*
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
invalid?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Stretches the control to the width of its container. Layout only.
|
|
41
|
+
*
|
|
42
|
+
* @default false
|
|
43
|
+
*/
|
|
44
|
+
fullWidth?: boolean;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* A single-choice dropdown. Renders a native `<select>`.
|
|
48
|
+
*
|
|
49
|
+
* Native on purpose, and not merely for convenience: the accessibility annotation describes an
|
|
50
|
+
* ordinary select, and the platform control brings typeahead, Home and End, the arrow-key model
|
|
51
|
+
* each platform expects, form participation, and — on touch devices — the system picker. A custom
|
|
52
|
+
* ARIA combobox would have to reimplement all of that to look the same, and would be worse at it.
|
|
53
|
+
* Nothing in the Figma component describes behaviour a `<select>` cannot provide.
|
|
54
|
+
*
|
|
55
|
+
* Options are the consumer's own `<option>` and `<optgroup>` elements, passed as children.
|
|
56
|
+
*
|
|
57
|
+
* Hover and focus are browser states expressed in CSS, not props. The only states Select models are
|
|
58
|
+
* the ones a consumer owns: `disabled`, `required` and `invalid`.
|
|
59
|
+
*
|
|
60
|
+
* **Every rendered Select must have an accessible name**, from a `<label htmlFor>` — normally
|
|
61
|
+
* supplied by `SelectField` — or from `aria-label` / `aria-labelledby`.
|
|
62
|
+
*
|
|
63
|
+
* `forwardRef` rather than a plain `ref` prop: this package supports React 18.3 as well as 19.
|
|
64
|
+
*/
|
|
65
|
+
export declare const Select: import("react").ForwardRefExoticComponent<SelectProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
66
|
+
export {};
|
|
67
|
+
//# sourceMappingURL=select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAElD,sEAAsE;AACtE,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C;;;;;;;;;;;;;GAaG;AACH,KAAK,iBAAiB,GAAG,IAAI,CAC3B,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,MAAM,GAAG,UAAU,GAAG,cAAc,CACrC,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,iBAAiB;IACpD;;;;;;;OAOG;IACH,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB;;;;;;;;OAQG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,MAAM,2GAuBjB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* A single-choice dropdown. Renders a native `<select>`.
|
|
5
|
+
*
|
|
6
|
+
* Native on purpose, and not merely for convenience: the accessibility annotation describes an
|
|
7
|
+
* ordinary select, and the platform control brings typeahead, Home and End, the arrow-key model
|
|
8
|
+
* each platform expects, form participation, and — on touch devices — the system picker. A custom
|
|
9
|
+
* ARIA combobox would have to reimplement all of that to look the same, and would be worse at it.
|
|
10
|
+
* Nothing in the Figma component describes behaviour a `<select>` cannot provide.
|
|
11
|
+
*
|
|
12
|
+
* Options are the consumer's own `<option>` and `<optgroup>` elements, passed as children.
|
|
13
|
+
*
|
|
14
|
+
* Hover and focus are browser states expressed in CSS, not props. The only states Select models are
|
|
15
|
+
* the ones a consumer owns: `disabled`, `required` and `invalid`.
|
|
16
|
+
*
|
|
17
|
+
* **Every rendered Select must have an accessible name**, from a `<label htmlFor>` — normally
|
|
18
|
+
* supplied by `SelectField` — or from `aria-label` / `aria-labelledby`.
|
|
19
|
+
*
|
|
20
|
+
* `forwardRef` rather than a plain `ref` prop: this package supports React 18.3 as well as 19.
|
|
21
|
+
*/
|
|
22
|
+
export const Select = forwardRef(function Select({ size = 'md', invalid = false, fullWidth = false, className, children, ...nativeProps }, ref) {
|
|
23
|
+
return (_jsx("span", { className: "lutra-select-wrapper", "data-full-width": fullWidth ? 'true' : undefined, children: _jsx("select", { ...nativeProps, ref: ref, className: className === undefined ? 'lutra-select' : `lutra-select ${className}`, "aria-invalid": invalid || undefined, "data-size": size, "data-full-width": fullWidth ? 'true' : undefined, children: children }) }));
|
|
24
|
+
});
|
|
25
|
+
//# sourceMappingURL=select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select.js","sourceRoot":"","sources":["../../../src/components/select/select.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAqDnC;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,CAAC,MAAM,MAAM,GAAG,UAAU,CAAiC,SAAS,MAAM,CAC9E,EAAE,IAAI,GAAG,IAAI,EAAE,OAAO,GAAG,KAAK,EAAE,SAAS,GAAG,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,EACxF,GAAG;IAEH,OAAO,CAKL,eAAM,SAAS,EAAC,sBAAsB,qBAAkB,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YACpF,oBACM,WAAW,EACf,GAAG,EAAE,GAAG,EACR,SAAS,EAAE,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,gBAAgB,SAAS,EAAE,kBAEnE,OAAO,IAAI,SAAS,eACvB,IAAI,qBACE,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,YAE9C,QAAQ,GACF,GACJ,CACR,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/select-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/select-field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { FieldIndicator } from '../../internal/field-support.js';
|
|
3
|
+
import type { SelectProps } from '../select/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Select props that SelectField derives rather than forwards. `invalid` comes from `error`, exactly
|
|
6
|
+
* as it does in Field.
|
|
7
|
+
*/
|
|
8
|
+
type ForwardedSelectProps = Omit<SelectProps, 'invalid'>;
|
|
9
|
+
export interface SelectFieldProps extends ForwardedSelectProps {
|
|
10
|
+
/** The visible label. Always required. */
|
|
11
|
+
label: ReactNode;
|
|
12
|
+
/** Supporting text shown above the control and connected with `aria-describedby`. */
|
|
13
|
+
hint?: ReactNode;
|
|
14
|
+
/**
|
|
15
|
+
* The error message. Its presence is what puts the field in the error state — it drives the red
|
|
16
|
+
* treatment, `aria-invalid` on the control, and the visible message together.
|
|
17
|
+
*/
|
|
18
|
+
error?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* The word shown after the label text and included in the accessible name. Defaults to
|
|
21
|
+
* `'required'` when the native `required` attribute is set.
|
|
22
|
+
*/
|
|
23
|
+
indicator?: FieldIndicator;
|
|
24
|
+
/** Extra class on the field wrapper, not on the control. */
|
|
25
|
+
className?: string;
|
|
26
|
+
/** The `<option>` and `<optgroup>` elements. */
|
|
27
|
+
children: ReactNode;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A labelled dropdown: label, optional hint, a `Select`, and an optional error message.
|
|
31
|
+
*
|
|
32
|
+
* Identical composition to `Field`, around a different control. Both render the same shell — the
|
|
33
|
+
* same label element, the same indicator placement, the same id derivation, the same
|
|
34
|
+
* `aria-describedby` assembly — so a text field and a dropdown behave and read the same way in a
|
|
35
|
+
* form, and a change to that behaviour lands in one place.
|
|
36
|
+
*
|
|
37
|
+
* Everything not listed above is forwarded to `Select`, so `name`, `value`, `defaultValue`,
|
|
38
|
+
* `required`, `onChange`, `size` and `fullWidth` behave as they do there. A `ref` reaches the native
|
|
39
|
+
* `<select>`.
|
|
40
|
+
*/
|
|
41
|
+
export declare const SelectField: import("react").ForwardRefExoticComponent<SelectFieldProps & import("react").RefAttributes<HTMLSelectElement>>;
|
|
42
|
+
export {};
|
|
43
|
+
//# sourceMappingURL=select-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-field.d.ts","sourceRoot":"","sources":["../../../src/components/select-field/select-field.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAEtE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,KAAK,oBAAoB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAEzD,MAAM,WAAW,gBAAiB,SAAQ,oBAAoB;IAC5D,0CAA0C;IAC1C,KAAK,EAAE,SAAS,CAAC;IACjB,qFAAqF;IACrF,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;OAGG;IACH,SAAS,CAAC,EAAE,cAAc,CAAC;IAC3B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gDAAgD;IAChD,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,gHA+CtB,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef } from 'react';
|
|
3
|
+
import { FieldShell, useFieldIds } from '../../internal/field-support.js';
|
|
4
|
+
import { Select } from '../select/index.js';
|
|
5
|
+
/**
|
|
6
|
+
* A labelled dropdown: label, optional hint, a `Select`, and an optional error message.
|
|
7
|
+
*
|
|
8
|
+
* Identical composition to `Field`, around a different control. Both render the same shell — the
|
|
9
|
+
* same label element, the same indicator placement, the same id derivation, the same
|
|
10
|
+
* `aria-describedby` assembly — so a text field and a dropdown behave and read the same way in a
|
|
11
|
+
* form, and a change to that behaviour lands in one place.
|
|
12
|
+
*
|
|
13
|
+
* Everything not listed above is forwarded to `Select`, so `name`, `value`, `defaultValue`,
|
|
14
|
+
* `required`, `onChange`, `size` and `fullWidth` behave as they do there. A `ref` reaches the native
|
|
15
|
+
* `<select>`.
|
|
16
|
+
*/
|
|
17
|
+
export const SelectField = forwardRef(function SelectField({ label, hint, error, indicator, className, id, required = false, disabled = false, 'aria-describedby': describedBy, children, ...selectProps }, ref) {
|
|
18
|
+
const hasHint = hint !== undefined && hint !== null && hint !== false;
|
|
19
|
+
const hasError = error !== undefined && error !== null && error !== false;
|
|
20
|
+
const ids = useFieldIds({ id, hasHint, hasError, describedBy });
|
|
21
|
+
const resolvedIndicator = indicator ?? (required ? 'required' : 'none');
|
|
22
|
+
return (_jsx(FieldShell, { controlId: ids.controlId, label: label, indicator: resolvedIndicator, hint: hint, hintId: ids.hintId, error: error, errorId: ids.errorId, disabled: disabled, className: className, children: _jsx(Select, { ...selectProps, ref: ref, id: ids.controlId, required: required, disabled: disabled, invalid: hasError, "aria-describedby": ids.describedBy, children: children }) }));
|
|
23
|
+
});
|
|
24
|
+
//# sourceMappingURL=select-field.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-field.js","sourceRoot":"","sources":["../../../src/components/select-field/select-field.tsx"],"names":[],"mappings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,EACjB,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,QAAQ,sBACC,GAAG,CAAC,WAAW,YAEhC,QAAQ,GACF,GACE,CACd,CAAC;AACJ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Table, TableRow, TableHeaderCell, TableCell, TableSelectionCell, TableRowActions, TableEmptyState, } from './table.js';
|
|
2
|
+
export type { TableProps, TableRowProps, TableHeaderCellProps, TableCellProps, TableSelectionCellProps, TableRowActionsProps, TableEmptyStateProps, TableAlign, TableSortState, } from './table.js';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,QAAQ,EACR,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,YAAY,EACV,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,cAAc,EACd,uBAAuB,EACvB,oBAAoB,EACpB,oBAAoB,EACpB,UAAU,EACV,cAAc,GACf,MAAM,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/table/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,EACL,QAAQ,EACR,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,eAAe,EACf,eAAe,GAChB,MAAM,YAAY,CAAC"}
|