@xeonr/platform-ui 1.3.1 → 1.5.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/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -1
- package/dist/kit/Anchored.d.ts +13 -2
- package/dist/kit/Anchored.d.ts.map +1 -1
- package/dist/kit/Anchored.js +47 -18
- package/dist/kit/Anchored.js.map +1 -1
- package/dist/kit/Badge.d.ts +1 -0
- package/dist/kit/Badge.d.ts.map +1 -1
- package/dist/kit/Badge.js +14 -0
- package/dist/kit/Badge.js.map +1 -1
- package/dist/kit/Button.d.ts +8 -2
- package/dist/kit/Button.d.ts.map +1 -1
- package/dist/kit/Button.js +17 -3
- package/dist/kit/Button.js.map +1 -1
- package/dist/kit/Chip.d.ts +6 -0
- package/dist/kit/Chip.d.ts.map +1 -1
- package/dist/kit/Chip.js +2 -1
- package/dist/kit/Chip.js.map +1 -1
- package/dist/kit/CodeEditor.js +1 -1
- package/dist/kit/Color.d.ts +69 -0
- package/dist/kit/Color.d.ts.map +1 -0
- package/dist/kit/Color.js +150 -0
- package/dist/kit/Color.js.map +1 -0
- package/dist/kit/Combobox.d.ts +5 -1
- package/dist/kit/Combobox.d.ts.map +1 -1
- package/dist/kit/Combobox.js +39 -28
- package/dist/kit/Combobox.js.map +1 -1
- package/dist/kit/Controls.d.ts +184 -0
- package/dist/kit/Controls.d.ts.map +1 -0
- package/dist/kit/Controls.js +344 -0
- package/dist/kit/Controls.js.map +1 -0
- package/dist/kit/DatePicker.d.ts +125 -0
- package/dist/kit/DatePicker.d.ts.map +1 -0
- package/dist/kit/DatePicker.js +438 -0
- package/dist/kit/DatePicker.js.map +1 -0
- package/dist/kit/Dropzone.d.ts +41 -0
- package/dist/kit/Dropzone.d.ts.map +1 -0
- package/dist/kit/Dropzone.js +118 -0
- package/dist/kit/Dropzone.js.map +1 -0
- package/dist/kit/Form.d.ts +86 -13
- package/dist/kit/Form.d.ts.map +1 -1
- package/dist/kit/Form.js +124 -13
- package/dist/kit/Form.js.map +1 -1
- package/dist/kit/Icon.d.ts +4 -0
- package/dist/kit/Icon.d.ts.map +1 -1
- package/dist/kit/Icon.js +5 -1
- package/dist/kit/Icon.js.map +1 -1
- package/dist/kit/List.d.ts +55 -8
- package/dist/kit/List.d.ts.map +1 -1
- package/dist/kit/List.js +43 -6
- package/dist/kit/List.js.map +1 -1
- package/dist/kit/Menu.d.ts +71 -9
- package/dist/kit/Menu.d.ts.map +1 -1
- package/dist/kit/Menu.js +119 -21
- package/dist/kit/Menu.js.map +1 -1
- package/dist/kit/Modal.d.ts +37 -4
- package/dist/kit/Modal.d.ts.map +1 -1
- package/dist/kit/Modal.js +42 -14
- package/dist/kit/Modal.js.map +1 -1
- package/dist/kit/MultiCombobox.d.ts +48 -1
- package/dist/kit/MultiCombobox.d.ts.map +1 -1
- package/dist/kit/MultiCombobox.js +100 -27
- package/dist/kit/MultiCombobox.js.map +1 -1
- package/dist/kit/Picker.d.ts +6 -1
- package/dist/kit/Picker.d.ts.map +1 -1
- package/dist/kit/Picker.js +10 -5
- package/dist/kit/Picker.js.map +1 -1
- package/dist/kit/Popover.d.ts +13 -1
- package/dist/kit/Popover.d.ts.map +1 -1
- package/dist/kit/Popover.js +31 -9
- package/dist/kit/Popover.js.map +1 -1
- package/dist/kit/Skeleton.d.ts +44 -3
- package/dist/kit/Skeleton.d.ts.map +1 -1
- package/dist/kit/Skeleton.js +39 -1
- package/dist/kit/Skeleton.js.map +1 -1
- package/dist/kit/Stepper.d.ts +33 -0
- package/dist/kit/Stepper.d.ts.map +1 -0
- package/dist/kit/Stepper.js +97 -0
- package/dist/kit/Stepper.js.map +1 -0
- package/dist/theme/brand.js +4 -4
- package/dist/theme/brand.js.map +1 -1
- package/dist/theme/paint.d.ts +1 -1
- package/dist/theme/paint.js +1 -1
- package/dist/theme/tokens.d.ts +1 -0
- package/dist/theme/tokens.d.ts.map +1 -1
- package/dist/theme/tokens.js +17 -14
- package/dist/theme/tokens.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,344 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { Children, Fragment, cloneElement, isValidElement, useEffect, useRef, useState } from "react";
|
|
3
|
+
import styled, { css } from "styled-components";
|
|
4
|
+
import { v } from "../theme/tokens.js";
|
|
5
|
+
import { Icon } from "./Icon.js";
|
|
6
|
+
import { Segmented, useField, useFieldAttrs } from "./Form.js";
|
|
7
|
+
// The form controls the upl.im dashboard had each drawn for itself: a field
|
|
8
|
+
// with a glyph or a unit inside its box, a number field, a slider, a bare
|
|
9
|
+
// checkbox for selecting rows, the on/off/inherit switch, and the
|
|
10
|
+
// name-left-control-right settings row. Added for the upl.im dashboard (1.4).
|
|
11
|
+
/* ------------------------------------------------------------------ InputGroup */
|
|
12
|
+
const GroupBox = styled.div `
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: 8px;
|
|
16
|
+
width: 100%;
|
|
17
|
+
min-width: 0;
|
|
18
|
+
height: 32px;
|
|
19
|
+
padding: 0 10px;
|
|
20
|
+
border-radius: ${v.rCtl};
|
|
21
|
+
background: ${v.field};
|
|
22
|
+
border: 1px solid ${(p) => (p.$invalid ? v.danger : v.fieldLine)};
|
|
23
|
+
color: ${v.text};
|
|
24
|
+
font-size: 12.5px;
|
|
25
|
+
cursor: text;
|
|
26
|
+
transition: border-color 0.14s ease, box-shadow 0.14s ease;
|
|
27
|
+
${(p) => p.$disabled && css `opacity: 0.55; cursor: not-allowed;`}
|
|
28
|
+
&:focus-within {
|
|
29
|
+
border-color: ${(p) => (p.$invalid ? v.danger : v.brand55)};
|
|
30
|
+
box-shadow: 0 0 0 3px ${(p) => (p.$invalid ? v.dangerBg : v.brand08)};
|
|
31
|
+
}
|
|
32
|
+
&:has(input[aria-invalid="true"]) { border-color: ${v.danger}; }
|
|
33
|
+
|
|
34
|
+
/* the input inside gives up its own box: the group is the box */
|
|
35
|
+
> input, > .x-group-input {
|
|
36
|
+
flex: 1 1 auto;
|
|
37
|
+
min-width: 0;
|
|
38
|
+
width: auto;
|
|
39
|
+
height: 100%;
|
|
40
|
+
padding: 0;
|
|
41
|
+
border: none;
|
|
42
|
+
border-radius: 0;
|
|
43
|
+
background: transparent;
|
|
44
|
+
box-shadow: none;
|
|
45
|
+
${(p) => p.$mono && css `font-family: ${v.mono}; font-size: 11.5px;`}
|
|
46
|
+
&:focus, &:focus-visible { outline: none; box-shadow: none; border: none; }
|
|
47
|
+
&:disabled { opacity: 1; cursor: not-allowed; }
|
|
48
|
+
}
|
|
49
|
+
> .glyph { flex: none; color: ${v.faint}; font-size: 12px; display: inline-flex; }
|
|
50
|
+
> .affix {
|
|
51
|
+
flex: none;
|
|
52
|
+
font-size: 12px;
|
|
53
|
+
color: ${v.muted};
|
|
54
|
+
white-space: nowrap;
|
|
55
|
+
${(p) => p.$mono && css `font-family: ${v.mono}; font-size: 11.5px;`}
|
|
56
|
+
}
|
|
57
|
+
> .end { flex: none; display: inline-flex; align-items: center; gap: 2px; margin-right: -6px; }
|
|
58
|
+
`;
|
|
59
|
+
/**
|
|
60
|
+
* InputGroup: an input with a glyph, fixed text or controls inside its box.
|
|
61
|
+
* The affixes are part of the field — a subdomain box reads `luke` `.upl.im`
|
|
62
|
+
* as one value — and a click anywhere on the box focuses the input. Unlike
|
|
63
|
+
* SearchBox it holds no state of its own, so it does not debounce: the input
|
|
64
|
+
* inside is the caller's, controlled as they like.
|
|
65
|
+
*/
|
|
66
|
+
export function InputGroup({ icon, prefix, suffix, end, mono, invalid, disabled, width, style, className, children }) {
|
|
67
|
+
const field = useField();
|
|
68
|
+
const ref = useRef(null);
|
|
69
|
+
return (_jsxs(GroupBox, { ref: ref, className: className, style: width ? { width, ...style } : style, "$invalid": !!invalid || !!field?.invalid, "$disabled": !!disabled, "$mono": !!mono, onMouseDown: (e) => {
|
|
70
|
+
// the box is the field: a press on its padding or an affix focuses the input
|
|
71
|
+
const t = e.target;
|
|
72
|
+
if (t.closest("input, button, a, [tabindex]"))
|
|
73
|
+
return;
|
|
74
|
+
const input = ref.current?.querySelector("input");
|
|
75
|
+
if (input && !input.disabled) {
|
|
76
|
+
e.preventDefault();
|
|
77
|
+
input.focus();
|
|
78
|
+
}
|
|
79
|
+
}, children: [icon ? _jsx("span", { className: "glyph", "aria-hidden": true, children: _jsx(Icon, { name: icon }) }) : null, prefix ? _jsx("span", { className: "affix", "aria-hidden": true, children: prefix }) : null, disabled ? disableChildren(children) : children, suffix ? _jsx("span", { className: "affix", "aria-hidden": true, children: suffix }) : null, end ? _jsx("span", { className: "end", children: end }) : null] }));
|
|
80
|
+
}
|
|
81
|
+
// The input inside goes off with the group, unless it says otherwise itself.
|
|
82
|
+
function disableChildren(children) {
|
|
83
|
+
return Children.map(children, (c) => {
|
|
84
|
+
if (!isValidElement(c) || c.type === Fragment || c.props.disabled !== undefined)
|
|
85
|
+
return c;
|
|
86
|
+
return cloneElement(c, { disabled: true });
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
/* ------------------------------------------------------------------ NumberInput */
|
|
90
|
+
const Step = styled.button `
|
|
91
|
+
width: 20px;
|
|
92
|
+
height: 22px;
|
|
93
|
+
display: inline-grid;
|
|
94
|
+
place-items: center;
|
|
95
|
+
border-radius: 5px;
|
|
96
|
+
color: ${v.faint};
|
|
97
|
+
font-size: 9px;
|
|
98
|
+
&:hover:not(:disabled) { background: ${v.hover}; color: ${v.text}; }
|
|
99
|
+
&:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
100
|
+
`;
|
|
101
|
+
const NumInput = styled.input.attrs(useFieldAttrs) `
|
|
102
|
+
font-variant-numeric: tabular-nums;
|
|
103
|
+
color: ${v.text};
|
|
104
|
+
&::placeholder { color: ${v.faint}; }
|
|
105
|
+
`;
|
|
106
|
+
const clamp = (n, min, max) => Math.min(max ?? Infinity, Math.max(min ?? -Infinity, n));
|
|
107
|
+
// Steps of 0.1 should land on 0.3, not 0.30000000000000004.
|
|
108
|
+
const roundTo = (n, step) => {
|
|
109
|
+
const dp = (String(step).split(".")[1] ?? "").length;
|
|
110
|
+
return dp ? Number(n.toFixed(dp)) : n;
|
|
111
|
+
};
|
|
112
|
+
/**
|
|
113
|
+
* NumberInput: a number with its unit, its bounds and a keyboard step. Typed
|
|
114
|
+
* text is held as typed ("1." stays "1.") and handed up parsed; the bounds are
|
|
115
|
+
* applied when the field is left, not while a person is half-way through
|
|
116
|
+
* typing "150" into a box whose minimum is 100. A text input with
|
|
117
|
+
* `role="spinbutton"`, not `type="number"`, so a scroll wheel passing over it
|
|
118
|
+
* never changes the value and "e" is not a digit.
|
|
119
|
+
*/
|
|
120
|
+
export function NumberInput({ value, onChange, min, max, step = 1, unit, prefix, stepper, placeholder, disabled, width, label, id, name, autoFocus, decimal, }) {
|
|
121
|
+
const show = (n) => (n === null || Number.isNaN(n) ? "" : String(n));
|
|
122
|
+
const [draft, setDraft] = useState(show(value));
|
|
123
|
+
// Follow the value when it changes from outside, without clobbering a draft
|
|
124
|
+
// that already means it ("1." while the value is 1). Adjusted during render.
|
|
125
|
+
const [seen, setSeen] = useState(value);
|
|
126
|
+
if (seen !== value) {
|
|
127
|
+
setSeen(value);
|
|
128
|
+
const parsed = draft.trim() === "" ? null : Number(draft);
|
|
129
|
+
if (parsed !== value)
|
|
130
|
+
setDraft(show(value));
|
|
131
|
+
}
|
|
132
|
+
const allowDot = decimal ?? !Number.isInteger(step);
|
|
133
|
+
const pattern = allowDot ? /^-?\d*\.?\d*$/ : /^-?\d*$/;
|
|
134
|
+
const commit = (n) => {
|
|
135
|
+
setDraft(show(n));
|
|
136
|
+
if (n !== value)
|
|
137
|
+
onChange(n);
|
|
138
|
+
};
|
|
139
|
+
const bump = (dir, times = 1) => {
|
|
140
|
+
const base = value ?? (dir > 0 ? (min ?? 0) - step : (max ?? 0) + step);
|
|
141
|
+
commit(clamp(roundTo(base + dir * step * times, step), min, max));
|
|
142
|
+
};
|
|
143
|
+
return (_jsx(InputGroup, { suffix: unit, prefix: prefix, disabled: disabled, width: width, end: stepper ? (_jsxs(_Fragment, { children: [_jsx(Step, { type: "button", tabIndex: -1, "aria-label": "Decrease", disabled: disabled || (value !== null && min !== undefined && value <= min), onClick: () => bump(-1), children: _jsx(Icon, { name: "minus" }) }), _jsx(Step, { type: "button", tabIndex: -1, "aria-label": "Increase", disabled: disabled || (value !== null && max !== undefined && value >= max), onClick: () => bump(1), children: _jsx(Icon, { name: "add" }) })] })) : undefined, children: _jsx(NumInput, { type: "text", inputMode: allowDot ? "decimal" : "numeric", role: "spinbutton", "aria-label": label, "aria-valuenow": value ?? undefined, "aria-valuemin": min, "aria-valuemax": max, id: id, name: name, autoFocus: autoFocus, autoComplete: "off", value: draft, placeholder: placeholder, disabled: disabled, onChange: (e) => {
|
|
144
|
+
const t = e.target.value.trim();
|
|
145
|
+
if (!pattern.test(t))
|
|
146
|
+
return;
|
|
147
|
+
setDraft(e.target.value);
|
|
148
|
+
if (t === "") {
|
|
149
|
+
if (value !== null)
|
|
150
|
+
onChange(null);
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
const n = Number(t);
|
|
154
|
+
if (Number.isFinite(n) && t !== "-" && n !== value)
|
|
155
|
+
onChange(n);
|
|
156
|
+
}, onBlur: () => {
|
|
157
|
+
if (value === null) {
|
|
158
|
+
setDraft("");
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
commit(clamp(value, min, max));
|
|
162
|
+
}, onKeyDown: (e) => {
|
|
163
|
+
if (e.key === "ArrowUp") {
|
|
164
|
+
e.preventDefault();
|
|
165
|
+
bump(1, e.shiftKey ? 10 : 1);
|
|
166
|
+
}
|
|
167
|
+
else if (e.key === "ArrowDown") {
|
|
168
|
+
e.preventDefault();
|
|
169
|
+
bump(-1, e.shiftKey ? 10 : 1);
|
|
170
|
+
}
|
|
171
|
+
else if (e.key === "Home" && min !== undefined) {
|
|
172
|
+
e.preventDefault();
|
|
173
|
+
commit(min);
|
|
174
|
+
}
|
|
175
|
+
else if (e.key === "End" && max !== undefined) {
|
|
176
|
+
e.preventDefault();
|
|
177
|
+
commit(max);
|
|
178
|
+
}
|
|
179
|
+
} }) }));
|
|
180
|
+
}
|
|
181
|
+
/* ------------------------------------------------------------------ Slider */
|
|
182
|
+
const thumb = css `
|
|
183
|
+
width: 14px;
|
|
184
|
+
height: 14px;
|
|
185
|
+
border-radius: 50%;
|
|
186
|
+
background: ${v.surface};
|
|
187
|
+
border: 2px solid ${v.brand};
|
|
188
|
+
box-shadow: 0 1px 3px ${v.scrim};
|
|
189
|
+
`;
|
|
190
|
+
const SliderWrap = styled.div `
|
|
191
|
+
display: inline-flex;
|
|
192
|
+
align-items: center;
|
|
193
|
+
gap: 10px;
|
|
194
|
+
width: ${(p) => (p.$width ? `${p.$width}px` : "100%")};
|
|
195
|
+
min-width: 0;
|
|
196
|
+
${(p) => p.$disabled && css `opacity: 0.55;`}
|
|
197
|
+
> .val {
|
|
198
|
+
flex: none;
|
|
199
|
+
min-width: 3ch;
|
|
200
|
+
text-align: right;
|
|
201
|
+
font-family: ${v.mono};
|
|
202
|
+
font-size: 11px;
|
|
203
|
+
color: ${v.text};
|
|
204
|
+
font-variant-numeric: tabular-nums;
|
|
205
|
+
}
|
|
206
|
+
`;
|
|
207
|
+
const Range = styled.input `
|
|
208
|
+
flex: 1 1 auto;
|
|
209
|
+
min-width: 60px;
|
|
210
|
+
height: 18px;
|
|
211
|
+
margin: 0;
|
|
212
|
+
background: transparent;
|
|
213
|
+
appearance: none;
|
|
214
|
+
-webkit-appearance: none;
|
|
215
|
+
cursor: pointer;
|
|
216
|
+
&:disabled { cursor: not-allowed; }
|
|
217
|
+
&:focus-visible { outline: none; box-shadow: none; }
|
|
218
|
+
|
|
219
|
+
&::-webkit-slider-runnable-track {
|
|
220
|
+
height: 4px;
|
|
221
|
+
border-radius: 999px;
|
|
222
|
+
background: linear-gradient(to right, ${v.brand} var(--x-fill), ${v.line2} var(--x-fill));
|
|
223
|
+
}
|
|
224
|
+
&::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; margin-top: -5px; ${thumb} }
|
|
225
|
+
&:focus-visible::-webkit-slider-thumb { box-shadow: ${v.ring}; }
|
|
226
|
+
|
|
227
|
+
&::-moz-range-track { height: 4px; border-radius: 999px; background: ${v.line2}; }
|
|
228
|
+
&::-moz-range-progress { height: 4px; border-radius: 999px; background: ${v.brand}; }
|
|
229
|
+
&::-moz-range-thumb { ${thumb} width: 10px; height: 10px; }
|
|
230
|
+
&:focus-visible::-moz-range-thumb { box-shadow: ${v.ring}; }
|
|
231
|
+
`;
|
|
232
|
+
/**
|
|
233
|
+
* Slider: a number picked by feel rather than typed — a stroke width, a blur
|
|
234
|
+
* strength, an opacity. A native range input drawn on the tokens, so the
|
|
235
|
+
* keyboard (arrows, Page Up/Down, Home/End) and the slider role come free.
|
|
236
|
+
* Its value is shown beside it, because a slider whose number you cannot see
|
|
237
|
+
* is a slider people overshoot. Reach for NumberInput when the exact value
|
|
238
|
+
* matters more than the gesture.
|
|
239
|
+
*/
|
|
240
|
+
export function Slider({ value, defaultValue, onChange, onCommit, min = 0, max = 100, step = 1, label, disabled, showValue = true, width, id }) {
|
|
241
|
+
const [own, setOwn] = useState(defaultValue ?? min);
|
|
242
|
+
const current = value ?? own;
|
|
243
|
+
const pct = max > min ? ((clamp(current, min, max) - min) / (max - min)) * 100 : 0;
|
|
244
|
+
const latest = useRef(current);
|
|
245
|
+
useEffect(() => { latest.current = current; });
|
|
246
|
+
return (_jsxs(SliderWrap, { "$width": width, "$disabled": !!disabled, children: [_jsx(Range, { type: "range", id: id, min: min, max: max, step: step, value: current, disabled: disabled, "aria-label": label, style: { "--x-fill": `${pct}%` }, onChange: (e) => {
|
|
247
|
+
const n = Number(e.target.value);
|
|
248
|
+
if (value === undefined)
|
|
249
|
+
setOwn(n);
|
|
250
|
+
onChange?.(n);
|
|
251
|
+
}, onPointerUp: () => onCommit?.(latest.current), onKeyUp: () => onCommit?.(latest.current) }), showValue ? _jsx("span", { className: "val", "aria-hidden": true, children: typeof showValue === "function" ? showValue(current) : current }) : null] }));
|
|
252
|
+
}
|
|
253
|
+
/* ------------------------------------------------------------------ Checkbox */
|
|
254
|
+
const CheckBox = styled.span `
|
|
255
|
+
position: relative;
|
|
256
|
+
display: inline-grid;
|
|
257
|
+
place-items: center;
|
|
258
|
+
flex: none;
|
|
259
|
+
width: ${(p) => p.$size}px;
|
|
260
|
+
height: ${(p) => p.$size}px;
|
|
261
|
+
border-radius: ${(p) => Math.round(p.$size / 3.2)}px;
|
|
262
|
+
border: 1.5px solid ${(p) => (p.$on ? "transparent" : v.line2)};
|
|
263
|
+
background: ${(p) => (p.$on ? v.grad : v.field)};
|
|
264
|
+
color: ${v.onBrand};
|
|
265
|
+
font-size: ${(p) => Math.round(p.$size * 0.6)}px;
|
|
266
|
+
transition: background 0.14s ease, border-color 0.14s ease;
|
|
267
|
+
${(p) => p.$disabled && css `opacity: 0.5;`}
|
|
268
|
+
${(p) => !p.$on && !p.$disabled && css `&:hover { border-color: ${v.brand55}; }`}
|
|
269
|
+
> input {
|
|
270
|
+
position: absolute;
|
|
271
|
+
inset: -4px;
|
|
272
|
+
width: calc(100% + 8px);
|
|
273
|
+
height: calc(100% + 8px);
|
|
274
|
+
margin: 0;
|
|
275
|
+
opacity: 0;
|
|
276
|
+
cursor: ${(p) => (p.$disabled ? "not-allowed" : "pointer")};
|
|
277
|
+
}
|
|
278
|
+
&:has(> input:focus-visible) { box-shadow: ${v.ring}; }
|
|
279
|
+
> svg { pointer-events: none; }
|
|
280
|
+
`;
|
|
281
|
+
/**
|
|
282
|
+
* Checkbox: the box alone, with no label around it — for selecting a table
|
|
283
|
+
* row, a list item or a card, where the row is the label. Toggle and CheckRow
|
|
284
|
+
* wrap their input in a <label>, which inside a row that is itself a link
|
|
285
|
+
* changes what a click activates; this is a real checkbox input the row can
|
|
286
|
+
* stop. `indeterminate` is the select-all over a partial selection.
|
|
287
|
+
*/
|
|
288
|
+
export function Checkbox({ checked, onChange, indeterminate, disabled, label, size = 16, id, name, value, title, onClick, className, style }) {
|
|
289
|
+
const ref = useRef(null);
|
|
290
|
+
useEffect(() => {
|
|
291
|
+
if (ref.current)
|
|
292
|
+
ref.current.indeterminate = !!indeterminate;
|
|
293
|
+
}, [indeterminate]);
|
|
294
|
+
const on = checked || !!indeterminate;
|
|
295
|
+
return (_jsxs(CheckBox, { "$size": size, "$on": on, "$disabled": !!disabled, title: title, className: className, style: style, children: [_jsx("input", { ref: ref, type: "checkbox", id: id, name: name, value: value, checked: checked, disabled: disabled, "aria-label": label, onClick: onClick, onChange: (e) => { if (!disabled)
|
|
296
|
+
onChange?.(e.target.checked, e); } }), indeterminate ? _jsx(Icon, { name: "minus" }) : checked ? _jsx(Icon, { name: "check" }) : null] }));
|
|
297
|
+
}
|
|
298
|
+
/* ------------------------------------------------------------------ TriToggle */
|
|
299
|
+
/**
|
|
300
|
+
* TriToggle: On / Off / Inherit — a setting that is either set here or left
|
|
301
|
+
* to whatever the level above says (a bucket inheriting its account's
|
|
302
|
+
* default, a folder its bucket's). `undefined` is Inherit. The chosen segment
|
|
303
|
+
* wears the answer's colour — on is ok, off is crit, inherit neutral — so a
|
|
304
|
+
* column of them reads at a glance. `inherit={false}` drops the third option
|
|
305
|
+
* where there is nothing to inherit from; there, `undefined` means not yet
|
|
306
|
+
* chosen and neither On nor Off is shown selected — showing Off would read as
|
|
307
|
+
* a decision nobody made. The first segment keeps the tab stop.
|
|
308
|
+
*/
|
|
309
|
+
export function TriToggle({ value, onChange, inherit = true, labels, inheritHint, tones, disabled, label, size }) {
|
|
310
|
+
const current = value === undefined ? (inherit ? "inherit" : "unset") : value ? "on" : "off";
|
|
311
|
+
return (_jsx(Segmented, { label: label, disabled: disabled, size: size, value: current, onChange: (k) => onChange(k === "inherit" ? undefined : k === "on"), options: [
|
|
312
|
+
{ value: "on", label: labels?.on ?? "On", icon: "check", tone: tones?.on ?? "ok" },
|
|
313
|
+
{ value: "off", label: labels?.off ?? "Off", icon: "close", tone: tones?.off ?? "crit" },
|
|
314
|
+
...(inherit
|
|
315
|
+
? [{ value: "inherit", label: labels?.inherit ?? "Inherit", icon: "minus", tone: tones?.inherit ?? "mut", tooltip: inheritHint }]
|
|
316
|
+
: []),
|
|
317
|
+
] }));
|
|
318
|
+
}
|
|
319
|
+
/* ------------------------------------------------------------------ SettingRow */
|
|
320
|
+
const RowWrap = styled.div `
|
|
321
|
+
display: flex;
|
|
322
|
+
align-items: center;
|
|
323
|
+
justify-content: space-between;
|
|
324
|
+
gap: 16px;
|
|
325
|
+
min-width: 0;
|
|
326
|
+
@media (max-width: 640px) { flex-wrap: wrap; }
|
|
327
|
+
> .ctl { flex: none; display: flex; align-items: center; gap: 8px; }
|
|
328
|
+
`;
|
|
329
|
+
const RowText = styled.div `
|
|
330
|
+
min-width: 0;
|
|
331
|
+
flex: 1 1 260px;
|
|
332
|
+
> .name { display: block; font-size: 13px; font-weight: 600; color: ${(p) => (p.$dim ? v.muted : v.text)}; }
|
|
333
|
+
> .desc { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.5; color: ${v.faint}; }
|
|
334
|
+
`;
|
|
335
|
+
/**
|
|
336
|
+
* SettingRow: one setting on one line — its name and what it means on the
|
|
337
|
+
* left, its control on the right. The shape of a settings card that is a list
|
|
338
|
+
* of switches (TriToggle, Toggle, Segmented, a NumberInput) rather than a
|
|
339
|
+
* form of fields; stacks under 640px.
|
|
340
|
+
*/
|
|
341
|
+
export function SettingRow({ label, hint, dim, children, ...rest }) {
|
|
342
|
+
return (_jsxs(RowWrap, { ...rest, children: [_jsxs(RowText, { "$dim": !!dim, children: [_jsx("span", { className: "name", children: label }), hint ? _jsx("span", { className: "desc", children: hint }) : null] }), children ? _jsx("div", { className: "ctl", children: children }) : null] }));
|
|
343
|
+
}
|
|
344
|
+
//# sourceMappingURL=Controls.js.map
|
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AAK,EAAE,SAAkB,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,IAAI,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,CAAC;gBAC1I,CAAC,CAAC,EAAE,CAAC;SACR,GACD,CACH,CAAC;AACJ,CAAC;AAED,mFAAmF;AAEnF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;;;;CAQzB,CAAC;AACF,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAmB;;;wEAG2B,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;2FACf,CAAC,CAAC,KAAK;CACjG,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,QAAQ,EAAE,GAAG,IAAI,EAQZ;IAClD,OAAO,CACL,MAAC,OAAO,OAAK,IAAI,aACf,MAAC,OAAO,YAAO,CAAC,CAAC,GAAG,aAClB,eAAM,SAAS,EAAC,MAAM,YAAE,KAAK,GAAQ,EACpC,IAAI,CAAC,CAAC,CAAC,eAAM,SAAS,EAAC,MAAM,YAAE,IAAI,GAAQ,CAAC,CAAC,CAAC,IAAI,IAC3C,EACT,QAAQ,CAAC,CAAC,CAAC,cAAK,SAAS,EAAC,KAAK,YAAE,QAAQ,GAAO,CAAC,CAAC,CAAC,IAAI,IAChD,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
import { type IconName } from "./Icon.tsx";
|
|
3
|
+
import { type AnchoredAlign, type AnchoredSide } from "./Anchored.tsx";
|
|
4
|
+
/** A local calendar day, `YYYY-MM-DD`. */
|
|
5
|
+
export type DayKey = string;
|
|
6
|
+
/** A range of days; either end is null while the range is half-picked or open-ended. */
|
|
7
|
+
export type DateRangeValue = [DayKey | null, DayKey | null];
|
|
8
|
+
/** The local calendar day a Date falls on, as `YYYY-MM-DD`. */
|
|
9
|
+
export declare function toDayKey(d: Date): DayKey;
|
|
10
|
+
/** `YYYY-MM-DD` as local midnight, or null if it is not one. Any other Date-parsable string is read and truncated to its local day. */
|
|
11
|
+
export declare function fromDayKey(s: string | null | undefined): Date | null;
|
|
12
|
+
interface CalendarCommon {
|
|
13
|
+
/** the earliest day that can be picked (`YYYY-MM-DD` or a Date) */
|
|
14
|
+
min?: DayKey | Date | undefined;
|
|
15
|
+
/** the latest day that can be picked */
|
|
16
|
+
max?: DayKey | Date | undefined;
|
|
17
|
+
/** further days that cannot be picked — weekends, a blackout */
|
|
18
|
+
isDisabled?: ((day: DayKey) => boolean) | undefined;
|
|
19
|
+
/** 1 (default) starts weeks on Monday, 0 on Sunday */
|
|
20
|
+
weekStartsOn?: 0 | 1 | undefined;
|
|
21
|
+
/** BCP 47 locale for the month and weekday names (default: the browser's) */
|
|
22
|
+
locale?: string | undefined;
|
|
23
|
+
/** focus the selected day (or today) on mount, for a calendar opened from a trigger */
|
|
24
|
+
autoFocus?: boolean | undefined;
|
|
25
|
+
}
|
|
26
|
+
export type CalendarProps = CalendarCommon & ({
|
|
27
|
+
mode?: "single" | undefined;
|
|
28
|
+
value: DayKey | null;
|
|
29
|
+
onChange: (day: DayKey) => void;
|
|
30
|
+
} | {
|
|
31
|
+
mode: "range";
|
|
32
|
+
value: DateRangeValue;
|
|
33
|
+
/** every click: `[day, null]` after the first, the ordered pair after the second */
|
|
34
|
+
onChange: (range: DateRangeValue) => void;
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Calendar: one month of days to pick from — one day, or a range. A range
|
|
38
|
+
* takes two clicks in either order (the second may be the same day, for a
|
|
39
|
+
* one-day range) and previews itself under the pointer in between. Keyboard
|
|
40
|
+
* as a date grid: arrows move a day or a week, Page Up/Down a month (with
|
|
41
|
+
* Shift, a year), Home/End the week's ends, Enter or Space picks.
|
|
42
|
+
*/
|
|
43
|
+
export declare function Calendar(props: CalendarProps): import("react").JSX.Element;
|
|
44
|
+
/** A named shortcut — "Last 7 days", "Tomorrow". Computed when the picker opens, so "today" is today. */
|
|
45
|
+
export interface DatePreset<V> {
|
|
46
|
+
label: string;
|
|
47
|
+
value: V | (() => V);
|
|
48
|
+
}
|
|
49
|
+
interface DatePickerCommon extends Omit<CalendarCommon, "autoFocus"> {
|
|
50
|
+
/** shown while nothing is picked (default "Pick a date" / "Any time") */
|
|
51
|
+
placeholder?: ReactNode | undefined;
|
|
52
|
+
/** an × that empties it (default true) */
|
|
53
|
+
clearable?: boolean | undefined;
|
|
54
|
+
disabled?: boolean | undefined;
|
|
55
|
+
/** accessible name, when no Field label names it */
|
|
56
|
+
label?: string | undefined;
|
|
57
|
+
id?: string | undefined;
|
|
58
|
+
/**
|
|
59
|
+
* `field` (default) is a form control the width of its container. `chip`
|
|
60
|
+
* is a filter-bar chip — lit while a value is set, with its own clear ×.
|
|
61
|
+
*/
|
|
62
|
+
variant?: "field" | "chip" | undefined;
|
|
63
|
+
/** the trigger's glyph (default calendar) */
|
|
64
|
+
icon?: IconName | (string & {}) | undefined;
|
|
65
|
+
/** which side of the trigger the calendar opens on (default bottom) */
|
|
66
|
+
side?: AnchoredSide | undefined;
|
|
67
|
+
align?: AnchoredAlign | undefined;
|
|
68
|
+
/** a column beside the calendar — a list of months with counts, say; `close` dismisses the picker */
|
|
69
|
+
aside?: ((close: () => void) => ReactNode) | undefined;
|
|
70
|
+
/** submits the value with a plain <form> under this name (a range as `from/to`) */
|
|
71
|
+
name?: string | undefined;
|
|
72
|
+
}
|
|
73
|
+
export type DatePickerProps = DatePickerCommon & ({
|
|
74
|
+
mode?: "single" | undefined;
|
|
75
|
+
value: DayKey | null;
|
|
76
|
+
onChange: (day: DayKey | null) => void;
|
|
77
|
+
presets?: DatePreset<DayKey>[] | undefined;
|
|
78
|
+
/** how the trigger shows the value (default "3 Mar 2026") */
|
|
79
|
+
format?: ((day: DayKey) => ReactNode) | undefined;
|
|
80
|
+
} | {
|
|
81
|
+
mode: "range";
|
|
82
|
+
value: DateRangeValue;
|
|
83
|
+
/** once a range is complete (both ends), or a preset or clear is chosen */
|
|
84
|
+
onChange: (range: DateRangeValue) => void;
|
|
85
|
+
presets?: DatePreset<DateRangeValue>[] | undefined;
|
|
86
|
+
/** how the trigger shows the value (default "3 Mar 2026 – 9 Mar 2026"; see `months`) */
|
|
87
|
+
format?: ((range: DateRangeValue) => ReactNode) | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* The default caption names whole calendar months: a range that is all of
|
|
90
|
+
* March reads "March 2026" — a month picked from an `aside` list of months
|
|
91
|
+
* (1.4; default false). Ignored when `format` is given.
|
|
92
|
+
*/
|
|
93
|
+
months?: boolean | undefined;
|
|
94
|
+
});
|
|
95
|
+
export interface DescribeDateRangeOptions {
|
|
96
|
+
/** BCP 47 locale (default: the browser's) */
|
|
97
|
+
locale?: string | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* A range that is exactly whole calendar months reads as the months:
|
|
100
|
+
* 1–31 Mar 2026 is "March 2026", 1 Mar–31 May 2026 "March – May 2026"
|
|
101
|
+
* (1.4; default false, so existing captions do not change).
|
|
102
|
+
*/
|
|
103
|
+
months?: boolean | undefined;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* The default caption for a range: "3 Mar 2026 – 9 Mar 2026", "From 3 Mar 2026",
|
|
107
|
+
* "Until 9 Mar 2026". The second argument is a locale or options; with
|
|
108
|
+
* `{ months: true }` a whole calendar month reads "March 2026".
|
|
109
|
+
*/
|
|
110
|
+
export declare function describeDateRange([a, b]: DateRangeValue, opts?: string | DescribeDateRangeOptions): string | null;
|
|
111
|
+
/**
|
|
112
|
+
* DatePicker: a day, or a range of days, picked from a Calendar that opens
|
|
113
|
+
* from a trigger. The `field` variant is a form control (it goes red inside a
|
|
114
|
+
* Field with an `error`); the `chip` variant sits in a filter bar and lights
|
|
115
|
+
* while a value is set. `presets` are the shortcuts a range picker wants
|
|
116
|
+
* ("Last 7 days"). The calendar portals to document.body, flips near a viewport
|
|
117
|
+
* edge, and Escape closes it before any modal it sits in.
|
|
118
|
+
*
|
|
119
|
+
* A range is held inside the picker while it is half-picked and handed up
|
|
120
|
+
* only once both ends are chosen, so a list filtered on it does not refetch
|
|
121
|
+
* for a range that is still being drawn.
|
|
122
|
+
*/
|
|
123
|
+
export declare function DatePicker(props: DatePickerProps): import("react").JSX.Element;
|
|
124
|
+
export {};
|
|
125
|
+
//# sourceMappingURL=DatePicker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DatePicker.d.ts","sourceRoot":"","sources":["../../src/kit/DatePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA0D,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAG/F,OAAO,EAAQ,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEjD,OAAO,EAAY,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAcjF,0CAA0C;AAC1C,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,wFAAwF;AACxF,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;AAI5D,+DAA+D;AAC/D,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,GAAG,MAAM,CAExC;AAED,uIAAuI;AACvI,wBAAgB,UAAU,CAAC,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,GAAG,IAAI,CAMpE;AA+ED,UAAU,cAAc;IACtB,mEAAmE;IACnE,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChC,wCAAwC;IACxC,GAAG,CAAC,EAAE,MAAM,GAA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