@cognitap/radiant 0.0.7 → 0.0.8
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/CHANGELOG.md +4 -0
- package/README.md +2 -2
- package/dist/library/Select.d.ts +87 -0
- package/dist/library/Select.d.ts.map +1 -0
- package/dist/library/Select.js +454 -0
- package/dist/library/Select.js.map +1 -0
- package/dist/library/cn.d.ts.map +1 -1
- package/dist/library/cn.js +20 -3
- package/dist/library/cn.js.map +1 -1
- package/dist/library/examples/glass.d.ts.map +1 -1
- package/dist/library/examples/glass.js +5 -0
- package/dist/library/examples/glass.js.map +1 -1
- package/dist/library/index.d.ts +2 -0
- package/dist/library/index.d.ts.map +1 -1
- package/dist/library/index.js +1 -0
- package/dist/library/index.js.map +1 -1
- package/dist/library/internal/select.d.ts +37 -0
- package/dist/library/internal/select.d.ts.map +1 -0
- package/dist/library/internal/select.js +42 -0
- package/dist/library/internal/select.js.map +1 -0
- package/dist/library/motion/host.d.ts +2 -1
- package/dist/library/motion/host.d.ts.map +1 -1
- package/dist/library/motion/host.js.map +1 -1
- package/dist/library/motion/popup.d.ts +5 -0
- package/dist/library/motion/popup.d.ts.map +1 -0
- package/dist/library/motion/popup.js +60 -0
- package/dist/library/motion/popup.js.map +1 -0
- package/dist/library/motion/react.d.ts.map +1 -1
- package/dist/library/motion/react.js +3 -1
- package/dist/library/motion/react.js.map +1 -1
- package/dist/library/react/useControllableState.d.ts +1 -0
- package/dist/library/react/useControllableState.d.ts.map +1 -1
- package/dist/library/react/useControllableState.js +8 -1
- package/dist/library/react/useControllableState.js.map +1 -1
- package/dist/library/selectStyles.d.ts +4 -0
- package/dist/library/selectStyles.d.ts.map +1 -0
- package/dist/library/selectStyles.js +32 -0
- package/dist/library/selectStyles.js.map +1 -0
- package/dist/library/styles.css +1 -1
- package/dist/library/themes/components.d.ts +24 -0
- package/dist/library/themes/components.d.ts.map +1 -1
- package/dist/library/themes/components.js +24 -0
- package/dist/library/themes/components.js.map +1 -1
- package/docs/architecture.md +14 -3
- package/docs/motion.md +4 -4
- package/package.json +1 -1
- package/src/Select.tsx +781 -0
- package/src/cn.ts +20 -3
- package/src/examples/glass.ts +5 -0
- package/src/index.ts +27 -0
- package/src/internal/select.ts +80 -0
- package/src/motion/host.ts +2 -1
- package/src/motion/popup.ts +55 -0
- package/src/motion/react.ts +3 -1
- package/src/react/useControllableState.ts +7 -1
- package/src/selectStyles.ts +34 -0
- package/src/themes/components.ts +24 -0
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,10 @@ for versioning. Use the JavaScript and CSS from the same version.
|
|
|
5
5
|
|
|
6
6
|
## Unreleased
|
|
7
7
|
|
|
8
|
+
## 0.0.8
|
|
9
|
+
|
|
10
|
+
- Add Select with item focus, Field/native forms, themes and springs; open at trigger width without drift or flashes.
|
|
11
|
+
|
|
8
12
|
## 0.0.7
|
|
9
13
|
|
|
10
14
|
- Breaking: the example themes moved out of the core entry. Before, `import { jelly, themes } from '@cognitap/radiant'`. After, `import { jelly, themes } from '@cognitap/radiant/examples'`. `defaultTheme` stays in core, and `themeDefinitions` exposes each example's definition.
|
package/README.md
CHANGED
|
@@ -4,8 +4,8 @@ React components built on native HTML elements, with shared themes. Published
|
|
|
4
4
|
as [`@cognitap/radiant`](https://www.npmjs.com/package/@cognitap/radiant) under
|
|
5
5
|
the [MIT license](LICENSE). Radiant is experimental during 0.x.
|
|
6
6
|
|
|
7
|
-
It has
|
|
8
|
-
Collapsible, Accordion and Card.
|
|
7
|
+
It has eleven families: Button, Link, Field, Input, Select, Checkbox, RadioGroup,
|
|
8
|
+
Dialog, Collapsible, Accordion and Card.
|
|
9
9
|
|
|
10
10
|
## Install
|
|
11
11
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { type ButtonProps } from './Button.js';
|
|
3
|
+
import type { ValueOwner } from './react/useNativeOwner.js';
|
|
4
|
+
import type { ControlSize } from './presentation.js';
|
|
5
|
+
import type { ThemeStyle } from './themes/defineTheme.js';
|
|
6
|
+
export type SelectOption = {
|
|
7
|
+
value: string;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
} & ({
|
|
10
|
+
label: string;
|
|
11
|
+
textValue?: string;
|
|
12
|
+
} | {
|
|
13
|
+
label: ReactNode;
|
|
14
|
+
textValue: string;
|
|
15
|
+
});
|
|
16
|
+
export type SelectProps = ValueOwner<string | null> & ({
|
|
17
|
+
open: boolean;
|
|
18
|
+
defaultOpen?: never;
|
|
19
|
+
} | {
|
|
20
|
+
open?: undefined;
|
|
21
|
+
defaultOpen?: boolean;
|
|
22
|
+
}) & {
|
|
23
|
+
/** One registry for native options, SSR value text and keyboard matching. Values must be unique. */
|
|
24
|
+
items: readonly SelectOption[];
|
|
25
|
+
onValueChange?: (value: string | null) => void;
|
|
26
|
+
onOpenChange?: (open: boolean) => void;
|
|
27
|
+
name?: string;
|
|
28
|
+
form?: string;
|
|
29
|
+
autoComplete?: string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
required?: boolean;
|
|
32
|
+
controlSize?: ControlSize;
|
|
33
|
+
children?: ReactNode;
|
|
34
|
+
};
|
|
35
|
+
export type SelectState = {
|
|
36
|
+
value: string | null;
|
|
37
|
+
open: boolean;
|
|
38
|
+
disabled: boolean;
|
|
39
|
+
setValue(value: string | null): void;
|
|
40
|
+
setOpen(open: boolean): void;
|
|
41
|
+
};
|
|
42
|
+
export declare function useSelect(): SelectState | null;
|
|
43
|
+
/** Custom selection presentation with a real native form control. */
|
|
44
|
+
export declare function Select({ items, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, name, form, autoComplete, disabled: disabledProp, required: requiredProp, controlSize, children }: SelectProps): import("react").JSX.Element;
|
|
45
|
+
export type SelectTriggerProps = Omit<ButtonProps, 'variant' | 'tone' | 'type' | 'pending' | 'controlSize' | 'disabled'>;
|
|
46
|
+
export declare function SelectTrigger({ className, onClick, onKeyDown, ref, children, ...props }: SelectTriggerProps): import("react").JSX.Element;
|
|
47
|
+
export type SelectValueProps = Omit<ComponentProps<'span'>, 'style'> & {
|
|
48
|
+
placeholder?: ReactNode;
|
|
49
|
+
style?: ThemeStyle;
|
|
50
|
+
};
|
|
51
|
+
export declare function SelectValue({ placeholder, children, className, ...props }: SelectValueProps): import("react").JSX.Element;
|
|
52
|
+
export type SelectIconProps = Omit<ComponentProps<'span'>, 'style'> & {
|
|
53
|
+
style?: ThemeStyle;
|
|
54
|
+
};
|
|
55
|
+
export declare function SelectIcon({ children, className, ...props }: SelectIconProps): import("react").JSX.Element;
|
|
56
|
+
/** Portal into the trigger's local scope; the top layer escapes clipping and modal bounds. */
|
|
57
|
+
export declare function SelectPortal({ children }: {
|
|
58
|
+
children?: ReactNode;
|
|
59
|
+
}): import("react").ReactPortal | null;
|
|
60
|
+
export type SelectContentProps = Omit<ComponentProps<'div'>, 'style' | 'popover'> & {
|
|
61
|
+
style?: ThemeStyle;
|
|
62
|
+
position?: 'item-aligned' | 'popper';
|
|
63
|
+
sideOffset?: number;
|
|
64
|
+
collisionPadding?: number;
|
|
65
|
+
motion?: 'inherit' | 'off';
|
|
66
|
+
};
|
|
67
|
+
export declare function SelectContent({ children, position, sideOffset, collisionPadding, motion, className, onKeyDown, ref, ...props }: SelectContentProps): import("react").JSX.Element;
|
|
68
|
+
export type SelectViewportProps = Omit<ComponentProps<'div'>, 'style'> & {
|
|
69
|
+
style?: ThemeStyle;
|
|
70
|
+
};
|
|
71
|
+
export declare function SelectViewport({ className, ...props }: SelectViewportProps): import("react").JSX.Element;
|
|
72
|
+
export type SelectItemProps = Omit<ComponentProps<'div'>, 'style'> & {
|
|
73
|
+
value: string;
|
|
74
|
+
style?: ThemeStyle;
|
|
75
|
+
};
|
|
76
|
+
export declare function SelectItem({ value, children, className, onKeyDown, onClick, onPointerMove, ...props }: SelectItemProps): import("react").JSX.Element;
|
|
77
|
+
export type SelectItemTextProps = Omit<ComponentProps<'span'>, 'style'> & {
|
|
78
|
+
style?: ThemeStyle;
|
|
79
|
+
};
|
|
80
|
+
export declare function SelectItemText({ children, className, ...props }: SelectItemTextProps): import("react").JSX.Element;
|
|
81
|
+
export declare function SelectItemIndicator({ children, className, ...props }: SelectIconProps): import("react").JSX.Element;
|
|
82
|
+
export type SelectGroupProps = Omit<ComponentProps<'div'>, 'style'> & {
|
|
83
|
+
label: ReactNode;
|
|
84
|
+
style?: ThemeStyle;
|
|
85
|
+
};
|
|
86
|
+
export declare function SelectGroup({ label, children, className, ...props }: SelectGroupProps): import("react").JSX.Element;
|
|
87
|
+
//# sourceMappingURL=Select.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Select.d.ts","sourceRoot":"","sources":["../../src/Select.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAa,MAAM,OAAO,CAAA;AAEjE,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAQtD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAA;AAC3D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAA;AAGzD,MAAM,MAAM,YAAY,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,CAC/D;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAC1C,CAAA;AACD,MAAM,MAAM,WAAW,GAAG,UAAU,CAAC,MAAM,GAAG,IAAI,CAAC,GACjD,CAAC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,WAAW,CAAC,EAAE,KAAK,CAAA;CAAE,GAAG;IAAE,IAAI,CAAC,EA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
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
3
|
+
/* oxlint-disable jsx-a11y/prefer-tag-over-role -- A custom select needs ARIA on its trigger/listbox/options; the native select is a separate form bridge. */
|
|
4
|
+
import { createContext, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from 'react';
|
|
5
|
+
import { createPortal } from 'react-dom';
|
|
6
|
+
import { Button } from './Button.js';
|
|
7
|
+
import { useField, useFieldControl } from './Field.js';
|
|
8
|
+
import { cn } from './cn.js';
|
|
9
|
+
import { controlMetrics } from './controlStyles.js';
|
|
10
|
+
import { matchSelectText, moveSelectFocus, positionSelect } from './internal/select.js';
|
|
11
|
+
import { useComposedRefs } from './react/useComposedRefs.js';
|
|
12
|
+
import { useControllableState } from './react/useControllableState.js';
|
|
13
|
+
import { useTransitionHost } from './motion/host.js';
|
|
14
|
+
import { selectContentClass, selectItemClass, selectTriggerClass } from './selectStyles.js';
|
|
15
|
+
const SelectContext = createContext(null);
|
|
16
|
+
const SelectItemContext = createContext(null);
|
|
17
|
+
export function useSelect() {
|
|
18
|
+
return useContext(SelectContext);
|
|
19
|
+
}
|
|
20
|
+
function useSelectContext() {
|
|
21
|
+
const select = useContext(SelectContext);
|
|
22
|
+
if (!select)
|
|
23
|
+
throw new Error('Select parts must render inside Select.');
|
|
24
|
+
return select;
|
|
25
|
+
}
|
|
26
|
+
/** Custom selection presentation with a real native form control. */
|
|
27
|
+
export function Select({ items, value, defaultValue, onValueChange, open, defaultOpen, onOpenChange, name, form, autoComplete, disabled: disabledProp, required: requiredProp, controlSize = 'medium', children }) {
|
|
28
|
+
const ids = useId();
|
|
29
|
+
const field = useField();
|
|
30
|
+
const disabled = !!(disabledProp || field?.disabled);
|
|
31
|
+
const required = !!(requiredProp || field?.required);
|
|
32
|
+
const entries = items.map(item => ({
|
|
33
|
+
value: item.value,
|
|
34
|
+
disabled: item.disabled,
|
|
35
|
+
textValue: item.textValue ?? (typeof item.label === 'string' ? item.label : '')
|
|
36
|
+
}));
|
|
37
|
+
if (new Set(entries.map(item => item.value)).size !== items.length)
|
|
38
|
+
throw new TypeError('Select item values must be distinct.');
|
|
39
|
+
if (entries.some(item => typeof item.value !== 'string' || !item.textValue.trim()))
|
|
40
|
+
throw new TypeError('Select items need a string value and readable textValue.');
|
|
41
|
+
const selection = useControllableState({
|
|
42
|
+
name: 'Select',
|
|
43
|
+
value,
|
|
44
|
+
defaultValue,
|
|
45
|
+
initialValue: null,
|
|
46
|
+
onChange: onValueChange
|
|
47
|
+
});
|
|
48
|
+
const expansion = useControllableState({
|
|
49
|
+
name: 'Select open',
|
|
50
|
+
value: open,
|
|
51
|
+
defaultValue: defaultOpen,
|
|
52
|
+
initialValue: false,
|
|
53
|
+
onChange: onOpenChange
|
|
54
|
+
});
|
|
55
|
+
const [trigger, setTrigger] = useState(null);
|
|
56
|
+
const bridge = useRef(null);
|
|
57
|
+
const content = useRef(null);
|
|
58
|
+
const restoreFocus = useRef(true);
|
|
59
|
+
const pendingUser = useRef(null);
|
|
60
|
+
const dispatching = useRef(false);
|
|
61
|
+
const searchBuffer = useRef({ text: '', at: 0 });
|
|
62
|
+
const selected = items.find(item => item.value === selection.value);
|
|
63
|
+
const nativeValue = selected?.value ?? '';
|
|
64
|
+
const [initialNativeValue] = useState(nativeValue);
|
|
65
|
+
const isOpen = expansion.value && !disabled;
|
|
66
|
+
const unavailable = () => disabled || !!trigger?.matches(':disabled');
|
|
67
|
+
const setOpen = (next) => {
|
|
68
|
+
if (next && unavailable())
|
|
69
|
+
return;
|
|
70
|
+
searchBuffer.current = { text: '', at: 0 };
|
|
71
|
+
restoreFocus.current = true;
|
|
72
|
+
expansion.request(next);
|
|
73
|
+
};
|
|
74
|
+
const close = (restore = true) => {
|
|
75
|
+
restoreFocus.current = restore;
|
|
76
|
+
expansion.request(false);
|
|
77
|
+
};
|
|
78
|
+
const focus = (itemValue) => {
|
|
79
|
+
const nodes = content.current?.querySelectorAll('[data-slot~="select-item"]');
|
|
80
|
+
const option = Array.from(nodes ?? []).find(node => node.dataset.value === itemValue && node.getAttribute('aria-disabled') !== 'true');
|
|
81
|
+
option?.focus({ preventScroll: true });
|
|
82
|
+
option?.scrollIntoView({ block: 'nearest' });
|
|
83
|
+
};
|
|
84
|
+
const commit = (next) => {
|
|
85
|
+
if (unavailable() || !items.some(item => item.value === next && !item.disabled))
|
|
86
|
+
return;
|
|
87
|
+
if (next !== selection.value)
|
|
88
|
+
pendingUser.current = next;
|
|
89
|
+
selection.request(next);
|
|
90
|
+
close();
|
|
91
|
+
// A declined controlled request must not become a later programmatic change event.
|
|
92
|
+
queueMicrotask(() => {
|
|
93
|
+
pendingUser.current = null;
|
|
94
|
+
});
|
|
95
|
+
};
|
|
96
|
+
const latest = useRef({ selection, close, nativeValue });
|
|
97
|
+
useLayoutEffect(() => {
|
|
98
|
+
latest.current = { selection, close, nativeValue };
|
|
99
|
+
});
|
|
100
|
+
useLayoutEffect(() => {
|
|
101
|
+
const node = bridge.current;
|
|
102
|
+
if (!node)
|
|
103
|
+
return;
|
|
104
|
+
node.value = nativeValue;
|
|
105
|
+
if (selection.controlled)
|
|
106
|
+
for (const option of node.options)
|
|
107
|
+
option.defaultSelected = option.value === nativeValue;
|
|
108
|
+
if (pendingUser.current !== null && pendingUser.current === nativeValue) {
|
|
109
|
+
pendingUser.current = null;
|
|
110
|
+
dispatching.current = true;
|
|
111
|
+
try {
|
|
112
|
+
node.dispatchEvent(new Event('change', { bubbles: true }));
|
|
113
|
+
}
|
|
114
|
+
finally {
|
|
115
|
+
dispatching.current = false;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
useEffect(() => {
|
|
120
|
+
const node = bridge.current;
|
|
121
|
+
const owner = node?.form;
|
|
122
|
+
if (!owner)
|
|
123
|
+
return;
|
|
124
|
+
const win = node.ownerDocument.defaultView;
|
|
125
|
+
let resetTimer;
|
|
126
|
+
const reset = (event) => {
|
|
127
|
+
win.clearTimeout(resetTimer);
|
|
128
|
+
resetTimer = win.setTimeout(() => {
|
|
129
|
+
if (event.defaultPrevented || !node.isConnected)
|
|
130
|
+
return;
|
|
131
|
+
latest.current.selection.reset();
|
|
132
|
+
if (latest.current.selection.controlled)
|
|
133
|
+
node.value = latest.current.nativeValue;
|
|
134
|
+
latest.current.close(false);
|
|
135
|
+
}, 0);
|
|
136
|
+
};
|
|
137
|
+
owner.addEventListener('reset', reset);
|
|
138
|
+
return () => {
|
|
139
|
+
owner.removeEventListener('reset', reset);
|
|
140
|
+
win.clearTimeout(resetTimer);
|
|
141
|
+
};
|
|
142
|
+
}, [form, trigger]);
|
|
143
|
+
useEffect(() => {
|
|
144
|
+
if (!isOpen &&
|
|
145
|
+
restoreFocus.current &&
|
|
146
|
+
content.current?.contains(content.current.ownerDocument.activeElement))
|
|
147
|
+
trigger?.focus({ preventScroll: true });
|
|
148
|
+
}, [isOpen, trigger]);
|
|
149
|
+
const context = {
|
|
150
|
+
value: selection.value,
|
|
151
|
+
setValue: selection.request,
|
|
152
|
+
open: isOpen,
|
|
153
|
+
setOpen,
|
|
154
|
+
disabled,
|
|
155
|
+
items,
|
|
156
|
+
entries,
|
|
157
|
+
controlSize,
|
|
158
|
+
required,
|
|
159
|
+
triggerId: field?.controlProps?.id ?? `${ids}-trigger`,
|
|
160
|
+
contentId: `${ids}-content`,
|
|
161
|
+
labelId: field?.layout === 'control' ? field.labelId : undefined,
|
|
162
|
+
trigger,
|
|
163
|
+
setTrigger,
|
|
164
|
+
content,
|
|
165
|
+
focus,
|
|
166
|
+
commit,
|
|
167
|
+
close,
|
|
168
|
+
restoreFocus,
|
|
169
|
+
search(key, current) {
|
|
170
|
+
const now = Date.now();
|
|
171
|
+
const text = (now - searchBuffer.current.at < 1000 ? searchBuffer.current.text : '') + key;
|
|
172
|
+
searchBuffer.current = { text, at: now };
|
|
173
|
+
return matchSelectText(entries, text, current);
|
|
174
|
+
}
|
|
175
|
+
};
|
|
176
|
+
return (_jsxs(SelectContext.Provider, { value: context, children: [children ?? (_jsxs(_Fragment, { children: [_jsxs(SelectTrigger, { children: [_jsx(SelectValue, {}), _jsx(SelectIcon, {})] }), _jsx(SelectPortal, { children: _jsx(SelectContent, {}) })] })), _jsxs("select", { ref: bridge, name: name, form: form, autoComplete: autoComplete, required: required, disabled: disabled, "aria-hidden": "true", tabIndex: -1, className: "sr-only", "data-slot": "select-native", defaultValue: initialNativeValue, onFocus: () => trigger?.focus(), onInvalid: event => {
|
|
177
|
+
event.preventDefault();
|
|
178
|
+
trigger?.focus();
|
|
179
|
+
}, onChange: event => {
|
|
180
|
+
if (dispatching.current)
|
|
181
|
+
return;
|
|
182
|
+
const next = event.currentTarget.value;
|
|
183
|
+
if (unavailable()) {
|
|
184
|
+
event.currentTarget.value = latest.current.nativeValue;
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
if (items.some(item => item.value === next && !item.disabled))
|
|
188
|
+
selection.request(next);
|
|
189
|
+
if (selection.controlled)
|
|
190
|
+
event.currentTarget.value = nativeValue;
|
|
191
|
+
}, children: [!items.some(item => item.value === '') && _jsx("option", { value: "", children: "No selection" }), items.map(item => (_jsx("option", { value: item.value, disabled: item.disabled, children: item.textValue ?? item.label }, item.value)))] })] }));
|
|
192
|
+
}
|
|
193
|
+
export function SelectTrigger({ className, onClick, onKeyDown, ref, children, ...props }) {
|
|
194
|
+
const select = useSelectContext();
|
|
195
|
+
const control = useFieldControl({
|
|
196
|
+
id: props.id ?? select.triggerId,
|
|
197
|
+
disabled: select.disabled,
|
|
198
|
+
required: select.required,
|
|
199
|
+
'aria-describedby': props['aria-describedby'],
|
|
200
|
+
'aria-invalid': props['aria-invalid']
|
|
201
|
+
});
|
|
202
|
+
const hostRef = useComposedRefs(select.setTrigger, ref);
|
|
203
|
+
return (_jsx(Button, { ...props, ...control, ref: hostRef, variant: "outline", tone: "neutral", type: "button", controlSize: select.controlSize, className: cn(selectTriggerClass, controlMetrics({ controlSize: select.controlSize }), className), role: "combobox", "aria-haspopup": "listbox", "aria-controls": select.contentId, "aria-expanded": select.open, "aria-required": select.required || undefined, "data-slot": "button select-trigger", "data-state": select.open ? 'open' : 'closed', "data-placeholder": select.value === null ? '' : undefined, onClick: event => {
|
|
204
|
+
onClick?.(event);
|
|
205
|
+
if (!event.defaultPrevented)
|
|
206
|
+
select.setOpen(!select.open);
|
|
207
|
+
}, onKeyDown: event => {
|
|
208
|
+
onKeyDown?.(event);
|
|
209
|
+
if (event.defaultPrevented || event.ctrlKey || event.altKey || event.metaKey)
|
|
210
|
+
return;
|
|
211
|
+
if (['Enter', ' ', 'ArrowDown', 'ArrowUp'].includes(event.key)) {
|
|
212
|
+
event.preventDefault();
|
|
213
|
+
select.setOpen(true);
|
|
214
|
+
}
|
|
215
|
+
else if (event.key.length === 1) {
|
|
216
|
+
const next = select.search(event.key, select.value);
|
|
217
|
+
if (next !== undefined) {
|
|
218
|
+
event.preventDefault();
|
|
219
|
+
select.commit(next);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
}, children: children ?? (_jsxs(_Fragment, { children: [_jsx(SelectValue, {}), _jsx(SelectIcon, {})] })) }));
|
|
223
|
+
}
|
|
224
|
+
export function SelectValue({ placeholder = 'Select an option', children, className, ...props }) {
|
|
225
|
+
const select = useSelectContext();
|
|
226
|
+
return (_jsx("span", { ...props, className: cn('min-w-0 truncate', className), "data-slot": "select-value", children: children ?? select.items.find(item => item.value === select.value)?.label ?? placeholder }));
|
|
227
|
+
}
|
|
228
|
+
export function SelectIcon({ children, className, ...props }) {
|
|
229
|
+
return (_jsx("span", { ...props, "aria-hidden": "true", "data-slot": "select-icon", className: cn('shrink-0', className), children: children ?? (_jsx("svg", { width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", children: _jsx("path", { d: "m4 6 4 4 4-4", stroke: "currentColor", strokeWidth: "1.5" }) })) }));
|
|
230
|
+
}
|
|
231
|
+
/** Portal into the trigger's local scope; the top layer escapes clipping and modal bounds. */
|
|
232
|
+
export function SelectPortal({ children }) {
|
|
233
|
+
const select = useSelectContext();
|
|
234
|
+
return select.trigger?.parentElement ? createPortal(children, select.trigger.parentElement) : null;
|
|
235
|
+
}
|
|
236
|
+
export function SelectContent({ children, position = 'item-aligned', sideOffset = 4, collisionPadding = 8, motion = 'inherit', className, onKeyDown, ref, ...props }) {
|
|
237
|
+
const select = useSelectContext();
|
|
238
|
+
const mergedRef = useComposedRefs(select.content, ref);
|
|
239
|
+
const { ref: transitionRef, active: motionActive, off: motionOff } = useTransitionHost('popup', mergedRef, motion === 'off');
|
|
240
|
+
const latest = useRef(select);
|
|
241
|
+
useLayoutEffect(() => {
|
|
242
|
+
latest.current = select;
|
|
243
|
+
});
|
|
244
|
+
const wasOpen = useRef(false);
|
|
245
|
+
useLayoutEffect(() => {
|
|
246
|
+
const state = latest.current;
|
|
247
|
+
const node = state.content.current;
|
|
248
|
+
const trigger = state.trigger;
|
|
249
|
+
if (!node || !trigger)
|
|
250
|
+
return;
|
|
251
|
+
const doc = trigger.ownerDocument;
|
|
252
|
+
const win = doc.defaultView;
|
|
253
|
+
if (!state.open) {
|
|
254
|
+
if (wasOpen.current &&
|
|
255
|
+
latest.current.restoreFocus.current &&
|
|
256
|
+
node.contains(doc.activeElement))
|
|
257
|
+
trigger.focus({ preventScroll: true });
|
|
258
|
+
if (node.matches(':popover-open'))
|
|
259
|
+
node.hidePopover();
|
|
260
|
+
wasOpen.current = false;
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
const seedWidth = () => {
|
|
264
|
+
const available = (win.visualViewport?.width ?? win.innerWidth) - 2 * Math.max(0, collisionPadding);
|
|
265
|
+
const width = `${Math.min(trigger.getBoundingClientRect().width, Math.max(0, available))}px`;
|
|
266
|
+
if (node.style.getPropertyValue('--_rad-select-width') !== width)
|
|
267
|
+
node.style.setProperty('--_rad-select-width', width);
|
|
268
|
+
};
|
|
269
|
+
// Top-layer auto layout is viewport-sized. Establish the anchor width before it can paint.
|
|
270
|
+
seedWidth();
|
|
271
|
+
node.showPopover();
|
|
272
|
+
const place = () => {
|
|
273
|
+
if (!node.isConnected || !node.matches(':popover-open'))
|
|
274
|
+
return;
|
|
275
|
+
seedWidth();
|
|
276
|
+
const viewport = win.visualViewport;
|
|
277
|
+
const selected = Array.from(node.querySelectorAll('[data-slot~="select-item"]')).find(item => item.dataset.value === latest.current.value);
|
|
278
|
+
const rect = trigger.getBoundingClientRect();
|
|
279
|
+
const computed = win.getComputedStyle(node);
|
|
280
|
+
const viewportNode = node.querySelector('[data-slot="select-viewport"]');
|
|
281
|
+
const naturalHeight = viewportNode
|
|
282
|
+
? viewportNode.scrollHeight +
|
|
283
|
+
parseFloat(computed.paddingTop) +
|
|
284
|
+
parseFloat(computed.paddingBottom)
|
|
285
|
+
: node.scrollHeight;
|
|
286
|
+
const next = positionSelect({
|
|
287
|
+
trigger: rect,
|
|
288
|
+
width: node.getBoundingClientRect().width,
|
|
289
|
+
height: naturalHeight +
|
|
290
|
+
parseFloat(computed.borderTopWidth) +
|
|
291
|
+
parseFloat(computed.borderBottomWidth),
|
|
292
|
+
selectedOffset: selected ? selected.offsetTop + selected.offsetHeight / 2 : 24,
|
|
293
|
+
viewport: {
|
|
294
|
+
top: viewport?.offsetTop ?? 0,
|
|
295
|
+
left: viewport?.offsetLeft ?? 0,
|
|
296
|
+
width: viewport?.width ?? win.innerWidth,
|
|
297
|
+
height: viewport?.height ?? win.innerHeight
|
|
298
|
+
},
|
|
299
|
+
padding: Math.max(0, collisionPadding),
|
|
300
|
+
offset: sideOffset,
|
|
301
|
+
aligned: position === 'item-aligned',
|
|
302
|
+
rtl: win.getComputedStyle(trigger).direction === 'rtl'
|
|
303
|
+
});
|
|
304
|
+
for (const [key, value] of Object.entries({
|
|
305
|
+
top: next.top,
|
|
306
|
+
left: next.left,
|
|
307
|
+
width: next.width,
|
|
308
|
+
'max-height': next.maxHeight
|
|
309
|
+
}))
|
|
310
|
+
if (node.style.getPropertyValue(`--_rad-select-${key}`) !== `${value}px`)
|
|
311
|
+
node.style.setProperty(`--_rad-select-${key}`, `${value}px`);
|
|
312
|
+
};
|
|
313
|
+
place();
|
|
314
|
+
const active = doc.activeElement;
|
|
315
|
+
if (!wasOpen.current ||
|
|
316
|
+
active === doc.body ||
|
|
317
|
+
active?.getAttribute('aria-disabled') === 'true') {
|
|
318
|
+
const first = state.items.find(item => item.value === state.value && !item.disabled) ??
|
|
319
|
+
state.items.find(item => !item.disabled);
|
|
320
|
+
if (first)
|
|
321
|
+
state.focus(first.value);
|
|
322
|
+
else
|
|
323
|
+
node.focus();
|
|
324
|
+
}
|
|
325
|
+
wasOpen.current = true;
|
|
326
|
+
const outside = (event) => {
|
|
327
|
+
const target = event.target;
|
|
328
|
+
if (!(target instanceof win.Node) || node.contains(target) || trigger.contains(target))
|
|
329
|
+
return;
|
|
330
|
+
latest.current.close(false);
|
|
331
|
+
};
|
|
332
|
+
const focusOut = (event) => {
|
|
333
|
+
const target = event.target;
|
|
334
|
+
if (target === doc.body || target === doc.documentElement)
|
|
335
|
+
return;
|
|
336
|
+
if (target instanceof win.Node && !node.contains(target) && !trigger.contains(target))
|
|
337
|
+
latest.current.close(false);
|
|
338
|
+
};
|
|
339
|
+
const scroll = (event) => {
|
|
340
|
+
if (!(event.target instanceof win.Node) || !node.contains(event.target))
|
|
341
|
+
place();
|
|
342
|
+
};
|
|
343
|
+
let frame = 0;
|
|
344
|
+
const schedule = () => {
|
|
345
|
+
if (!frame)
|
|
346
|
+
frame = win.requestAnimationFrame(() => {
|
|
347
|
+
frame = 0;
|
|
348
|
+
place();
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
const observer = new win.ResizeObserver(schedule);
|
|
352
|
+
const mutations = new win.MutationObserver(schedule);
|
|
353
|
+
mutations.observe(node, { childList: true, subtree: true, characterData: true });
|
|
354
|
+
observer.observe(trigger);
|
|
355
|
+
observer.observe(node);
|
|
356
|
+
doc.addEventListener('pointerdown', outside, true);
|
|
357
|
+
doc.addEventListener('focusin', focusOut);
|
|
358
|
+
doc.addEventListener('scroll', scroll, true);
|
|
359
|
+
win.addEventListener('resize', place);
|
|
360
|
+
win.visualViewport?.addEventListener('resize', place);
|
|
361
|
+
win.visualViewport?.addEventListener('scroll', place);
|
|
362
|
+
return () => {
|
|
363
|
+
observer.disconnect();
|
|
364
|
+
mutations.disconnect();
|
|
365
|
+
win.cancelAnimationFrame(frame);
|
|
366
|
+
doc.removeEventListener('pointerdown', outside, true);
|
|
367
|
+
doc.removeEventListener('focusin', focusOut);
|
|
368
|
+
doc.removeEventListener('scroll', scroll, true);
|
|
369
|
+
win.removeEventListener('resize', place);
|
|
370
|
+
win.visualViewport?.removeEventListener('resize', place);
|
|
371
|
+
win.visualViewport?.removeEventListener('scroll', place);
|
|
372
|
+
};
|
|
373
|
+
}, [select.open, select.trigger, select.items, position, sideOffset, collisionPadding]);
|
|
374
|
+
useLayoutEffect(() => {
|
|
375
|
+
const node = select.content.current;
|
|
376
|
+
const trigger = select.trigger;
|
|
377
|
+
return () => {
|
|
378
|
+
if (node?.contains(node.ownerDocument.activeElement) && trigger?.isConnected)
|
|
379
|
+
trigger.focus({ preventScroll: true });
|
|
380
|
+
};
|
|
381
|
+
}, [select.content, select.trigger]);
|
|
382
|
+
return (_jsx("div", { ...props, ref: transitionRef, id: select.contentId, popover: "manual", role: "listbox", tabIndex: -1, "aria-labelledby": props['aria-label'] ? undefined : (select.labelId ?? select.trigger?.id ?? select.triggerId), className: cn(selectContentClass, controlMetrics({ controlSize: select.controlSize }), motionActive &&
|
|
383
|
+
!motionOff &&
|
|
384
|
+
'opacity-[var(--_rad-select-enter,0)] motion-reduce:opacity-100', className), "data-slot": "select-content", "data-state": select.open ? 'open' : 'closed', "data-motion": motion, "data-position": position, onKeyDown: event => {
|
|
385
|
+
onKeyDown?.(event);
|
|
386
|
+
if (event.defaultPrevented)
|
|
387
|
+
return;
|
|
388
|
+
if (event.key === 'Escape') {
|
|
389
|
+
event.preventDefault();
|
|
390
|
+
event.stopPropagation();
|
|
391
|
+
select.close();
|
|
392
|
+
return;
|
|
393
|
+
}
|
|
394
|
+
if (event.key === 'Tab') {
|
|
395
|
+
event.preventDefault();
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
if (event.ctrlKey || event.altKey || event.metaKey)
|
|
399
|
+
return;
|
|
400
|
+
const target = event.target;
|
|
401
|
+
const current = target.closest('[data-slot~="select-item"]')?.dataset.value ?? null;
|
|
402
|
+
if (['ArrowDown', 'ArrowUp', 'Home', 'End'].includes(event.key)) {
|
|
403
|
+
event.preventDefault();
|
|
404
|
+
select.focus(moveSelectFocus(select.entries, current, event.key));
|
|
405
|
+
}
|
|
406
|
+
else if (event.key.length === 1 && event.key !== ' ') {
|
|
407
|
+
event.preventDefault();
|
|
408
|
+
select.focus(select.search(event.key, current));
|
|
409
|
+
}
|
|
410
|
+
}, children: children ?? (_jsx(SelectViewport, { children: select.items.map(item => (_jsxs(SelectItem, { value: item.value, children: [_jsx(SelectItemText, {}), _jsx(SelectItemIndicator, {})] }, item.value))) })) }));
|
|
411
|
+
}
|
|
412
|
+
export function SelectViewport({ className, ...props }) {
|
|
413
|
+
return (_jsx("div", { ...props, "data-slot": "select-viewport", className: cn('max-h-[calc(var(--_rad-select-max-height,100dvh)-0.5rem)] overflow-y-auto overscroll-contain', className) }));
|
|
414
|
+
}
|
|
415
|
+
export function SelectItem({ value, children, className, onKeyDown, onClick, onPointerMove, ...props }) {
|
|
416
|
+
const select = useSelectContext();
|
|
417
|
+
const item = select.items.find(item => item.value === value);
|
|
418
|
+
if (!item)
|
|
419
|
+
throw new Error('SelectItem value must exist in Select items.');
|
|
420
|
+
return (_jsx(SelectItemContext.Provider, { value: item, children: _jsx("div", { ...props, role: "option", tabIndex: -1, "aria-selected": select.value === value, "aria-disabled": item.disabled || undefined, "data-slot": "select-item", "data-value": value, "data-disabled": item.disabled ? '' : undefined, "data-state": select.value === value ? 'checked' : 'unchecked', className: cn(selectItemClass, className), onClick: event => {
|
|
421
|
+
onClick?.(event);
|
|
422
|
+
if (!event.defaultPrevented && !item.disabled)
|
|
423
|
+
select.commit(value);
|
|
424
|
+
}, onPointerMove: event => {
|
|
425
|
+
onPointerMove?.(event);
|
|
426
|
+
if (!event.defaultPrevented && event.pointerType === 'mouse' && !item.disabled)
|
|
427
|
+
event.currentTarget.focus({ preventScroll: true });
|
|
428
|
+
}, onKeyDown: event => {
|
|
429
|
+
onKeyDown?.(event);
|
|
430
|
+
if (!event.defaultPrevented && ['Enter', ' '].includes(event.key)) {
|
|
431
|
+
event.preventDefault();
|
|
432
|
+
if (!item.disabled)
|
|
433
|
+
select.commit(value);
|
|
434
|
+
}
|
|
435
|
+
}, children: children ?? (_jsxs(_Fragment, { children: [_jsx(SelectItemText, {}), _jsx(SelectItemIndicator, {})] })) }) }));
|
|
436
|
+
}
|
|
437
|
+
export function SelectItemText({ children, className, ...props }) {
|
|
438
|
+
const item = useContext(SelectItemContext);
|
|
439
|
+
if (!item)
|
|
440
|
+
throw new Error('SelectItemText must render inside SelectItem.');
|
|
441
|
+
return (_jsx("span", { ...props, "data-slot": "select-item-text", className: cn('min-w-0 flex-1', className), children: children ?? item.label }));
|
|
442
|
+
}
|
|
443
|
+
export function SelectItemIndicator({ children, className, ...props }) {
|
|
444
|
+
const select = useSelectContext();
|
|
445
|
+
const item = useContext(SelectItemContext);
|
|
446
|
+
if (!item)
|
|
447
|
+
throw new Error('SelectItemIndicator must render inside SelectItem.');
|
|
448
|
+
return (_jsx("span", { ...props, "data-slot": "select-item-indicator", "aria-hidden": "true", className: cn('shrink-0', select.value !== item.value && 'invisible', className), children: children ?? '✓' }));
|
|
449
|
+
}
|
|
450
|
+
export function SelectGroup({ label, children, className, ...props }) {
|
|
451
|
+
const id = useId();
|
|
452
|
+
return (_jsxs("div", { ...props, role: "group", "aria-labelledby": id, "data-slot": "select-group", className: className, children: [_jsx("div", { id: id, "data-slot": "select-label", className: "px-3 py-2 text-sm font-semibold", children: label }), children] }));
|
|
453
|
+
}
|
|
454
|
+
//# sourceMappingURL=Select.js.map
|