@sdxc/ui 2026.10.17 → 2026.10.20
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/components/alert-dialog.js +1 -1
- package/dist/components/attachment.js +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/color-picker.js +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/dialog.js +1 -1
- package/dist/components/file-trigger.js +1 -1
- package/dist/components/heading-scope.js +1 -1
- package/dist/components/message-scroller.js +1 -1
- package/dist/components/number-field.js +2 -2
- package/dist/components/range-calendar.js +1 -1
- package/dist/components/resizable.js +1 -1
- package/dist/components/select.js +2 -2
- package/dist/components/shared-element.js +1 -1
- package/dist/mixins/attachment-trigger.js +2 -2
- package/dist/mixins/color-preview.js +1 -1
- package/dist/mixins/context-menu.js +1 -1
- package/dist/mixins/copy-to-clipboard.js +1 -1
- package/dist/mixins/hotkey.js +2 -2
- package/dist/mixins/persist.js +1 -1
- package/dist/mixins/validate.js +1 -1
- package/dist/utils/warn-if-no-accessible-name.js +2 -2
- package/package.json +4 -4
|
@@ -142,7 +142,7 @@ AlertDialog.Action = function AlertDialogAction(handle) {
|
|
|
142
142
|
let resolvedType = type ?? DEFAULT_TYPE;
|
|
143
143
|
let isInvoker = resolvedType === "button";
|
|
144
144
|
let resolvedColor = color ?? DEFAULT_ACTION_COLOR;
|
|
145
|
-
if (import.meta.env
|
|
145
|
+
if (import.meta.env?.DEV && isInvoker && !commandfor) {
|
|
146
146
|
console.warn('AlertDialog.Action: needs "commandfor" naming the panel it dismisses, or type="submit" to submit its enclosing form instead — as rendered, pressing it does nothing.');
|
|
147
147
|
}
|
|
148
148
|
return (_jsx(Button, { ...rest, type: resolvedType, color: resolvedColor, commandfor: isInvoker ? commandfor : undefined, command: isInvoker ? (command ?? DEFAULT_COMMAND) : undefined, "data-slot": "action" }));
|
|
@@ -274,7 +274,7 @@ Attachment.Trigger = function AttachmentTrigger(handle) {
|
|
|
274
274
|
let isConfigured = href !== undefined || commandfor !== undefined;
|
|
275
275
|
let resolvedRole = role ?? (href !== undefined ? "link" : isConfigured ? "button" : undefined);
|
|
276
276
|
let resolvedTabIndex = tabIndex ?? (isConfigured ? 0 : undefined);
|
|
277
|
-
if (import.meta.env
|
|
277
|
+
if (import.meta.env?.DEV && !isConfigured) {
|
|
278
278
|
console.warn('Attachment.Trigger: rendered with neither "href" nor "commandfor" — nothing will happen once `attachmentTrigger()` handles an activation.');
|
|
279
279
|
}
|
|
280
280
|
return (_jsx("div", { ...rest, role: resolvedRole, tabIndex: resolvedTabIndex, "data-slot": "trigger", mix: [
|
|
@@ -67,7 +67,7 @@ export function Calendar(handle) {
|
|
|
67
67
|
return () => {
|
|
68
68
|
let { color, name, value, defaultValue, min, max, step, required, disabled, readOnly, autoComplete, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, children, mix, ...rest } = handle.props;
|
|
69
69
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
70
|
-
if (import.meta.env
|
|
70
|
+
if (import.meta.env?.DEV && !children && !ariaLabel && !ariaLabelledBy) {
|
|
71
71
|
console.warn('Calendar: falling back to a plain "input type=date" needs an "aria-label" or "aria-labelledby" describing what it collects for assistive technology.');
|
|
72
72
|
}
|
|
73
73
|
return (_jsx("div", { ...rest, "data-slot": "calendar", mix: [inlineBlock(), rounded("lg"), p(3), bg("neutral.tint"), mix], children: children ?? (_jsx(Input, { type: "date", color: resolvedColor, name: name, value: value, defaultValue: defaultValue, min: min, max: max, step: step, required: required, disabled: disabled, readOnly: readOnly, autoComplete: autoComplete, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy })) }));
|
|
@@ -64,7 +64,7 @@ const DEFAULT_DIALOG_PLACEMENT = "bottom-start";
|
|
|
64
64
|
export function ColorPicker(handle) {
|
|
65
65
|
return () => {
|
|
66
66
|
let { color, label, description, errorMessage, format, name, value, defaultValue, placeholder, required, disabled, readOnly, autoComplete, parts, children, mix, ...rest } = handle.props;
|
|
67
|
-
if (import.meta.env
|
|
67
|
+
if (import.meta.env?.DEV && !children && !label) {
|
|
68
68
|
console.warn('ColorPicker: falling back to ColorField\'s plain color-notation field needs a "label" describing what it collects for assistive technology.');
|
|
69
69
|
}
|
|
70
70
|
if (!children) {
|
|
@@ -122,7 +122,7 @@ Command.List = function CommandList(handle) {
|
|
|
122
122
|
Command.Item = function CommandItem(handle) {
|
|
123
123
|
return () => {
|
|
124
124
|
let { value, children, mix, ...rest } = handle.props;
|
|
125
|
-
if (import.meta.env
|
|
125
|
+
if (import.meta.env?.DEV && !value) {
|
|
126
126
|
console.warn('Command.Item: needs a "value" — a filter behavior matches typed text against this instead of parsing rendered children.');
|
|
127
127
|
}
|
|
128
128
|
return (_jsx("div", { ...rest, "data-slot": "item", "data-value": value, mix: [
|
|
@@ -28,7 +28,7 @@ import { DateField } from "./date-field.js";
|
|
|
28
28
|
export function DatePicker(handle) {
|
|
29
29
|
return () => {
|
|
30
30
|
let { color, label, description, errorMessage, name, value, defaultValue, min, max, step, required, disabled, readOnly, autoComplete, parts, children, mix, ...rest } = handle.props;
|
|
31
|
-
if (import.meta.env
|
|
31
|
+
if (import.meta.env?.DEV && !children && !label) {
|
|
32
32
|
console.warn('DatePicker: falling back to DateField\'s plain "input type=date" needs a "label" describing what it collects for assistive technology.');
|
|
33
33
|
}
|
|
34
34
|
if (!children) {
|
|
@@ -32,7 +32,7 @@ import { DatePicker } from "./date-picker.js";
|
|
|
32
32
|
export function DateRangePicker(handle) {
|
|
33
33
|
return () => {
|
|
34
34
|
let { color, startLabel, endLabel, startDescription, endDescription, startErrorMessage, endErrorMessage, startName, endName, startValue, endValue, startDefaultValue, endDefaultValue, min, max, step, required, disabled, readOnly, autoComplete, parts, children, mix, ...rest } = handle.props;
|
|
35
|
-
if (import.meta.env
|
|
35
|
+
if (import.meta.env?.DEV && !children) {
|
|
36
36
|
if (!startLabel) {
|
|
37
37
|
console.warn('DateRangePicker: falling back to paired "input type=date" fields needs a "startLabel" describing the range\'s start for assistive technology.');
|
|
38
38
|
}
|
|
@@ -59,7 +59,7 @@ const DEFAULT_CLOSE_COMMAND = "close";
|
|
|
59
59
|
export function Dialog(handle) {
|
|
60
60
|
return () => {
|
|
61
61
|
let { id, children, mix, ...rest } = handle.props;
|
|
62
|
-
if (import.meta.env
|
|
62
|
+
if (import.meta.env?.DEV && !id) {
|
|
63
63
|
console.warn('Dialog rendered without an "id" — "commandfor" on a trigger or close control has nothing to target.');
|
|
64
64
|
}
|
|
65
65
|
return (_jsx("dialog", { ...rest, id: id, "data-slot": "dialog", mix: [
|
|
@@ -40,7 +40,7 @@ export function FileTrigger(handle) {
|
|
|
40
40
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
41
41
|
let resolvedVariant = variant ?? DEFAULT_VARIANT;
|
|
42
42
|
let resolvedSize = size ?? DEFAULT_SIZE;
|
|
43
|
-
if (import.meta.env
|
|
43
|
+
if (import.meta.env?.DEV &&
|
|
44
44
|
!handle.props["aria-label"] &&
|
|
45
45
|
!handle.props["aria-labelledby"] &&
|
|
46
46
|
!hasAccessibleText(children)) {
|
|
@@ -48,7 +48,7 @@ export function readAmbientLevel(handle) {
|
|
|
48
48
|
export function resolveHeadingLevel(handle, explicitLevel) {
|
|
49
49
|
let resolved = explicitLevel ?? readAmbientLevel(handle) ?? DEFAULT_LEVEL;
|
|
50
50
|
if (resolved > MAX_LEVEL) {
|
|
51
|
-
if (import.meta.env
|
|
51
|
+
if (import.meta.env?.DEV) {
|
|
52
52
|
console.warn(`Heading nesting resolved to level ${resolved}, past the native "h1"–"h6" range. Flatten the nesting, or start a new top-level HeadingScope instead of nesting further.`);
|
|
53
53
|
}
|
|
54
54
|
return MAX_LEVEL;
|
|
@@ -141,7 +141,7 @@ MessageScroller.Content = function MessageScrollerContent(handle) {
|
|
|
141
141
|
MessageScroller.Item = function MessageScrollerItem(handle) {
|
|
142
142
|
return () => {
|
|
143
143
|
let { messageId, scrollAnchor, children, mix, ...rest } = handle.props;
|
|
144
|
-
if (import.meta.env
|
|
144
|
+
if (import.meta.env?.DEV && !messageId) {
|
|
145
145
|
console.warn('MessageScroller.Item: needs a "messageId" — a scroll-follow behavior matches rows against this instead of parsing rendered children.');
|
|
146
146
|
}
|
|
147
147
|
return (_jsx("div", { ...rest, "data-slot": "item", "data-message-id": messageId, "data-scroll-anchor": scrollAnchor || undefined, mix: [
|
|
@@ -167,7 +167,7 @@ NumberField.Input = function NumberFieldInput(handle) {
|
|
|
167
167
|
NumberField.DecrementButton = function NumberFieldDecrementButton(handle) {
|
|
168
168
|
return () => {
|
|
169
169
|
let { type, mix, ...rest } = handle.props;
|
|
170
|
-
if (import.meta.env
|
|
170
|
+
if (import.meta.env?.DEV && !handle.props["aria-label"] && !handle.props["aria-labelledby"]) {
|
|
171
171
|
console.warn("NumberField.DecrementButton: needs an `aria-label` describing what it does — its content is a decorative glyph with no accessible name of its own.");
|
|
172
172
|
}
|
|
173
173
|
return (_jsx("button", { type: type ?? DEFAULT_BUTTON_TYPE, ...rest, "data-slot": "decrement", mix: [stepperButtonMix("end"), mix], children: _jsx(MinusIcon, {}) }));
|
|
@@ -188,7 +188,7 @@ NumberField.DecrementButton = function NumberFieldDecrementButton(handle) {
|
|
|
188
188
|
NumberField.IncrementButton = function NumberFieldIncrementButton(handle) {
|
|
189
189
|
return () => {
|
|
190
190
|
let { type, mix, ...rest } = handle.props;
|
|
191
|
-
if (import.meta.env
|
|
191
|
+
if (import.meta.env?.DEV && !handle.props["aria-label"] && !handle.props["aria-labelledby"]) {
|
|
192
192
|
console.warn("NumberField.IncrementButton: needs an `aria-label` describing what it does — its content is a decorative glyph with no accessible name of its own.");
|
|
193
193
|
}
|
|
194
194
|
return (_jsx("button", { type: type ?? DEFAULT_BUTTON_TYPE, ...rest, "data-slot": "increment", mix: [stepperButtonMix("start"), mix], children: _jsx(PlusIcon, {}) }));
|
|
@@ -55,7 +55,7 @@ export function RangeCalendar(handle) {
|
|
|
55
55
|
return () => {
|
|
56
56
|
let { color, startName, endName, startValue, endValue, startDefaultValue, endDefaultValue, min, max, step, required, disabled, readOnly, autoComplete, startLabel, endLabel, parts, children, mix, ...rest } = handle.props;
|
|
57
57
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
58
|
-
if (import.meta.env
|
|
58
|
+
if (import.meta.env?.DEV && !children) {
|
|
59
59
|
if (!startLabel) {
|
|
60
60
|
console.warn('RangeCalendar: falling back to a plain "input type=date" pair needs a "startLabel" describing the range\'s start for assistive technology.');
|
|
61
61
|
}
|
|
@@ -118,7 +118,7 @@ Resizable.Handle = function ResizableHandle(handle) {
|
|
|
118
118
|
return () => {
|
|
119
119
|
let { mix, ...rest } = handle.props;
|
|
120
120
|
let context = handle.context.get(Resizable);
|
|
121
|
-
if (import.meta.env
|
|
121
|
+
if (import.meta.env?.DEV && !rest["aria-label"] && !rest["aria-labelledby"]) {
|
|
122
122
|
console.warn("Resizable.Handle: a resize handle with no `aria-label` or `aria-labelledby` needs one describing what it resizes — assistive technology has no accessible name to announce otherwise.");
|
|
123
123
|
}
|
|
124
124
|
return (_jsx("div", { "data-orientation": context.orientation, "aria-orientation": context.orientation, ...rest, mix: [
|
|
@@ -53,7 +53,7 @@ export function Select(handle) {
|
|
|
53
53
|
return () => {
|
|
54
54
|
let { color, multiple, size, mix, ...rest } = handle.props;
|
|
55
55
|
let resolvedColor = color ?? DEFAULT_COLOR;
|
|
56
|
-
if (import.meta.env
|
|
56
|
+
if (import.meta.env?.DEV && (multiple || (typeof size === "number" && size > 1))) {
|
|
57
57
|
console.warn("Select: `appearance: base-select` styling has no effect on a `multiple` select or one with a `size` greater than 1 — the browser keeps its plain list-box rendering there instead of the customized trigger, value, and option styling.");
|
|
58
58
|
}
|
|
59
59
|
let fieldMix = [
|
|
@@ -263,7 +263,7 @@ Select.Option = function SelectOption(handle) {
|
|
|
263
263
|
Select.Group = function SelectGroup(handle) {
|
|
264
264
|
return () => {
|
|
265
265
|
let { mix, ...rest } = handle.props;
|
|
266
|
-
if (import.meta.env
|
|
266
|
+
if (import.meta.env?.DEV && !rest.label) {
|
|
267
267
|
console.warn("Select.Group: an `optgroup` with no `label` renders with no visible heading for its options — pass a `label` describing the group.");
|
|
268
268
|
}
|
|
269
269
|
return (_jsx("optgroup", { ...rest, mix: [
|
|
@@ -39,7 +39,7 @@ const CROSS_DOCUMENT_TRANSITION_STYLESHEET = `
|
|
|
39
39
|
export function SharedElement(handle) {
|
|
40
40
|
return () => {
|
|
41
41
|
let { id, mix, style, ...rest } = handle.props;
|
|
42
|
-
if (import.meta.env
|
|
42
|
+
if (import.meta.env?.DEV && !id) {
|
|
43
43
|
console.warn('SharedElement rendered without an "id" — the browser has nothing to match it against on the other side of a cross-document view transition.');
|
|
44
44
|
}
|
|
45
45
|
let resolvedStyle = mergeStyle(style, { "view-transition-name": id });
|
|
@@ -56,14 +56,14 @@ function resolveAction(host) {
|
|
|
56
56
|
return undefined;
|
|
57
57
|
let command = host.getAttribute("command") ?? DEFAULT_DIALOG_COMMAND;
|
|
58
58
|
if (command !== DEFAULT_DIALOG_COMMAND) {
|
|
59
|
-
if (import.meta.env
|
|
59
|
+
if (import.meta.env?.DEV) {
|
|
60
60
|
console.warn(`attachmentTrigger(): unsupported command "${command}" — only "${DEFAULT_DIALOG_COMMAND}" opens a dialog from a card activation.`);
|
|
61
61
|
}
|
|
62
62
|
return undefined;
|
|
63
63
|
}
|
|
64
64
|
let dialog = document.getElementById(commandForId);
|
|
65
65
|
if (!(dialog instanceof HTMLDialogElement)) {
|
|
66
|
-
if (import.meta.env
|
|
66
|
+
if (import.meta.env?.DEV) {
|
|
67
67
|
console.warn(`attachmentTrigger(): commandfor="${commandForId}" doesn't reference a <dialog> element.`);
|
|
68
68
|
}
|
|
69
69
|
return undefined;
|
|
@@ -64,7 +64,7 @@ export const colorPreview = createMixin((handle) => {
|
|
|
64
64
|
let host = event.currentTarget;
|
|
65
65
|
let swatch = findSwatch(host);
|
|
66
66
|
if (swatch === null) {
|
|
67
|
-
if (import.meta.env
|
|
67
|
+
if (import.meta.env?.DEV && !hasWarnedMissingSwatch) {
|
|
68
68
|
hasWarnedMissingSwatch = true;
|
|
69
69
|
console.warn(`colorPreview(): no element matching ${SWATCH_SELECTOR} found beneath the ColorField host to update.`);
|
|
70
70
|
}
|
|
@@ -39,7 +39,7 @@ export const contextMenu = createMixin((handle) => {
|
|
|
39
39
|
function openSurfaceAt(id, point, options) {
|
|
40
40
|
let surface = document.getElementById(id);
|
|
41
41
|
if (!surface) {
|
|
42
|
-
if (import.meta.env
|
|
42
|
+
if (import.meta.env?.DEV) {
|
|
43
43
|
console.warn(`contextMenu(): no element with id "${id}" found to open.`);
|
|
44
44
|
}
|
|
45
45
|
return;
|
|
@@ -98,7 +98,7 @@ export const copyToClipboard = createMixin((handle) => {
|
|
|
98
98
|
return;
|
|
99
99
|
let target = resolveCopyTarget(button);
|
|
100
100
|
if (!target) {
|
|
101
|
-
if (import.meta.env
|
|
101
|
+
if (import.meta.env?.DEV) {
|
|
102
102
|
console.warn('copyToClipboard(): button has no "commandfor" target to copy text from.');
|
|
103
103
|
}
|
|
104
104
|
return;
|
package/dist/mixins/hotkey.js
CHANGED
|
@@ -39,7 +39,7 @@ function setOpen(host, open) {
|
|
|
39
39
|
return;
|
|
40
40
|
}
|
|
41
41
|
if (!host.hasAttribute("popover")) {
|
|
42
|
-
if (import.meta.env
|
|
42
|
+
if (import.meta.env?.DEV) {
|
|
43
43
|
console.warn(`hotkey(): host is neither a <dialog> nor a [popover] element, so it cannot be ${open ? "shown" : "hidden"}.`);
|
|
44
44
|
}
|
|
45
45
|
return;
|
|
@@ -86,7 +86,7 @@ export const hotkey = createMixin((handle) => {
|
|
|
86
86
|
});
|
|
87
87
|
return (combo) => {
|
|
88
88
|
parsed = parseKeyCombo(combo);
|
|
89
|
-
if (parsed.key === "" && import.meta.env
|
|
89
|
+
if (parsed.key === "" && import.meta.env?.DEV) {
|
|
90
90
|
console.warn(`hotkey(): "${combo}" has no trigger key and will never match.`);
|
|
91
91
|
}
|
|
92
92
|
};
|
package/dist/mixins/persist.js
CHANGED
|
@@ -57,7 +57,7 @@ export const persist = createMixin((handle) => {
|
|
|
57
57
|
let host = event.currentTarget;
|
|
58
58
|
let checkbox = findToggleCheckbox(host);
|
|
59
59
|
if (checkbox === null) {
|
|
60
|
-
if (import.meta.env
|
|
60
|
+
if (import.meta.env?.DEV) {
|
|
61
61
|
console.warn(`persist(): no element with ${SIDEBAR_TOGGLE_ATTRIBUTE} found beneath the Sidebar root to toggle.`);
|
|
62
62
|
}
|
|
63
63
|
return;
|
package/dist/mixins/validate.js
CHANGED
|
@@ -85,7 +85,7 @@ function mirrorValidity(field, message) {
|
|
|
85
85
|
field.setAttribute("aria-invalid", message === "" ? "false" : "true");
|
|
86
86
|
let slot = findFieldErrorSlot(field);
|
|
87
87
|
if (slot === null) {
|
|
88
|
-
if (import.meta.env
|
|
88
|
+
if (import.meta.env?.DEV && message !== "") {
|
|
89
89
|
console.warn("validate(): no FieldError slot found through this field's aria-describedby; " +
|
|
90
90
|
`add ${FIELD_ERROR_ATTRIBUTE} to the element the field describes its error with.`);
|
|
91
91
|
}
|
|
@@ -28,7 +28,7 @@ import { hasAccessibleText } from "./has-accessible-text.js";
|
|
|
28
28
|
* );
|
|
29
29
|
*/
|
|
30
30
|
export function warnIfNoAccessibleName(props, children, message) {
|
|
31
|
-
if (import.meta.env
|
|
31
|
+
if (import.meta.env?.DEV &&
|
|
32
32
|
!props["aria-label"] &&
|
|
33
33
|
!props["aria-labelledby"] &&
|
|
34
34
|
!hasAccessibleText(children)) {
|
|
@@ -49,7 +49,7 @@ export function warnIfNoAccessibleName(props, children, message) {
|
|
|
49
49
|
* );
|
|
50
50
|
*/
|
|
51
51
|
export function warnIfNoAccessibleLabel(props, message) {
|
|
52
|
-
if (import.meta.env
|
|
52
|
+
if (import.meta.env?.DEV && !props["aria-label"] && !props["aria-labelledby"]) {
|
|
53
53
|
console.warn(message);
|
|
54
54
|
}
|
|
55
55
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sdxc/ui",
|
|
3
|
-
"version": "2026.10.
|
|
3
|
+
"version": "2026.10.20",
|
|
4
4
|
"description": "Styled, accessible remix/component components rendered as server HTML",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -18,14 +18,14 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"@remix-run/ui": "0.12.1",
|
|
21
|
-
"@sdxc/icons": "2026.10.
|
|
22
|
-
"@sdxc/u": "2026.10.
|
|
21
|
+
"@sdxc/icons": "2026.10.20",
|
|
22
|
+
"@sdxc/u": "2026.10.20",
|
|
23
23
|
"@sdxc/uuid": "2026.10.13"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"remix": "3.0.0"
|
|
27
27
|
},
|
|
28
|
-
"gitHead": "
|
|
28
|
+
"gitHead": "bd4473246f405c43055d2fc5e08c62ba35197258",
|
|
29
29
|
"publishConfig": {
|
|
30
30
|
"access": "public"
|
|
31
31
|
},
|