@xenosystem/elements-react 0.0.11 → 0.0.12

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.
@@ -0,0 +1,22 @@
1
+ import type { HTMLAttributes, ReactElement } from 'react';
2
+ export interface PaginationProps extends Omit<HTMLAttributes<HTMLElement>, 'onChange'> {
3
+ /** 1-based current page number. */
4
+ readonly page: number;
5
+ /** Total number of pages (>= 1). */
6
+ readonly totalPages: number;
7
+ /** Called with the next 1-based page number. */
8
+ readonly onPageChange: (page: number) => void;
9
+ /** Number of sibling pages on each side of the current page. Defaults to `1`. */
10
+ readonly siblingCount?: number;
11
+ /** Optional total item count to display a tabular range summary. */
12
+ readonly totalItems?: number;
13
+ /** Page size used with `totalItems` for summary text. */
14
+ readonly pageSize?: number;
15
+ /** Accessible `<nav>` landmark label. */
16
+ readonly label?: string;
17
+ }
18
+ /**
19
+ * `<Pagination>` — accessible 1-based page navigator with `aria-current="page"`,
20
+ * logical start/end direction controls, ellipsis condensation, and tabular-nums readout.
21
+ */
22
+ export declare function Pagination({ page, totalPages, onPageChange, siblingCount, totalItems, pageSize, label, className, ...rest }: PaginationProps): ReactElement;
@@ -0,0 +1,35 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../controls/util.js';
3
+ function buildRange(page, total, siblings) {
4
+ if (total <= 5 + siblings * 2) {
5
+ return Array.from({ length: total }, (_, i) => i + 1);
6
+ }
7
+ const left = Math.max(2, page - siblings);
8
+ const right = Math.min(total - 1, page + siblings);
9
+ const out = [1];
10
+ if (left > 2)
11
+ out.push('ellipsis');
12
+ for (let p = left; p <= right; p++)
13
+ out.push(p);
14
+ if (right < total - 1)
15
+ out.push('ellipsis');
16
+ out.push(total);
17
+ return out;
18
+ }
19
+ /**
20
+ * `<Pagination>` — accessible 1-based page navigator with `aria-current="page"`,
21
+ * logical start/end direction controls, ellipsis condensation, and tabular-nums readout.
22
+ */
23
+ export function Pagination({ page, totalPages, onPageChange, siblingCount = 1, totalItems, pageSize, label = 'Pagination', className, ...rest }) {
24
+ const safeTotal = Math.max(1, Math.floor(totalPages));
25
+ const safePage = Math.max(1, Math.min(safeTotal, Math.floor(page)));
26
+ const items = buildRange(safePage, safeTotal, siblingCount);
27
+ const summary = totalItems !== undefined && pageSize !== undefined && pageSize > 0
28
+ ? (() => {
29
+ const start = totalItems === 0 ? 0 : (safePage - 1) * pageSize + 1;
30
+ const end = Math.min(totalItems, safePage * pageSize);
31
+ return `${start}–${end} of ${totalItems}`;
32
+ })()
33
+ : null;
34
+ return (_jsxs("nav", { className: cx('xeno-pagination', className), "aria-label": label, ...rest, children: [summary ? _jsx("span", { className: "xeno-pagination-summary", children: summary }) : null, _jsxs("div", { className: "xeno-pagination-pages", children: [_jsx("button", { type: "button", className: "xeno-pagination-btn", "aria-label": "Previous page", disabled: safePage <= 1, onClick: () => onPageChange(safePage - 1), children: "Prev" }), items.map((item, idx) => item === 'ellipsis' ? (_jsx("span", { className: "xeno-pagination-ellipsis", "aria-hidden": "true", children: "\u2026" }, `e-${idx}`)) : (_jsx("button", { type: "button", className: "xeno-pagination-btn", "aria-label": `Page ${item}`, "aria-current": item === safePage ? 'page' : undefined, "data-active": item === safePage ? 'true' : undefined, onClick: () => onPageChange(item), children: item }, item))), _jsx("button", { type: "button", className: "xeno-pagination-btn", "aria-label": "Next page", disabled: safePage >= safeTotal, onClick: () => onPageChange(safePage + 1), children: "Next" })] })] }));
35
+ }
@@ -0,0 +1,30 @@
1
+ import type { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ export type DrawerSide = 'start' | 'end' | 'left' | 'right';
3
+ export interface DrawerProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title' | 'children'> {
4
+ /** Controlled visibility. Renders nothing when false. */
5
+ readonly open: boolean;
6
+ /** Called on Esc, scrim click, or close button click. */
7
+ readonly onClose: () => void;
8
+ /** Logical or physical edge (`end` = right in LTR / left in RTL). Defaults to `'end'`. */
9
+ readonly side?: DrawerSide;
10
+ /** Panel width in px or CSS length. Defaults to `400`. */
11
+ readonly width?: number | string;
12
+ /** Drawer heading linked via `aria-labelledby`. */
13
+ readonly title?: ReactNode;
14
+ /** Optional subtitle below the title. */
15
+ readonly subtitle?: ReactNode;
16
+ /** Scrollable body content. */
17
+ readonly children?: ReactNode;
18
+ /** Optional sticky footer actions. */
19
+ readonly footer?: ReactNode;
20
+ /** Accessible label for the close button. */
21
+ readonly closeLabel?: string;
22
+ /** Portal to `document.body` on client. Defaults to `true`. */
23
+ readonly portal?: boolean;
24
+ }
25
+ /**
26
+ * `<Drawer>` — accessible side sheet backed by `useDialog` (Escape, focus trap, focus restoration,
27
+ * refcounted page-scroll lock, `aria-modal="true"`) with logical `inset-inline-start` / `end`
28
+ * positioning so RTL mirrors automatically.
29
+ */
30
+ export declare function Drawer({ open, onClose, side, width, title, subtitle, children, footer, closeLabel, portal, className, style, ...rest }: DrawerProps): ReactElement | null;
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useId, useRef } from 'react';
3
+ import { createPortal } from 'react-dom';
4
+ import X from '@xenosystem/elements/elements/x';
5
+ import { IconButton } from '../controls/IconButton.js';
6
+ import { cx } from '../controls/util.js';
7
+ import { useDialog } from '../useDialog.js';
8
+ function normalizeSide(side) {
9
+ if (side === 'left')
10
+ return 'start';
11
+ if (side === 'right')
12
+ return 'end';
13
+ return side;
14
+ }
15
+ /**
16
+ * `<Drawer>` — accessible side sheet backed by `useDialog` (Escape, focus trap, focus restoration,
17
+ * refcounted page-scroll lock, `aria-modal="true"`) with logical `inset-inline-start` / `end`
18
+ * positioning so RTL mirrors automatically.
19
+ */
20
+ export function Drawer({ open, onClose, side = 'end', width = 400, title, subtitle, children, footer, closeLabel = 'Close drawer', portal = true, className, style, ...rest }) {
21
+ const titleId = useId();
22
+ const scrimArmed = useRef(false);
23
+ const { panelProps } = useDialog({ open, onClose });
24
+ if (!open)
25
+ return null;
26
+ const logicalSide = normalizeSide(side);
27
+ const resolvedWidth = typeof width === 'number' ? `${width}px` : width;
28
+ const onScrimMouseDown = (e) => {
29
+ scrimArmed.current = e.target === e.currentTarget;
30
+ };
31
+ const onScrimClick = (e) => {
32
+ if (e.target === e.currentTarget && scrimArmed.current)
33
+ onClose();
34
+ scrimArmed.current = false;
35
+ };
36
+ const node = (_jsx("div", { className: "xeno-drawer-overlay", "data-side": logicalSide, onMouseDown: onScrimMouseDown, onClick: onScrimClick, children: _jsxs("div", { ...rest, ...panelProps, role: "dialog", "aria-modal": "true", ...(title !== undefined ? { 'aria-labelledby': titleId } : {}), className: cx('xeno-drawer', className), "data-side": logicalSide, style: { ...style, width: resolvedWidth }, children: [_jsxs("header", { className: "xeno-drawer-header", children: [_jsxs("div", { className: "xeno-drawer-titles", children: [title !== undefined ? (_jsx("h2", { id: titleId, className: "xeno-drawer-title", children: title })) : null, subtitle !== undefined ? (_jsx("p", { className: "xeno-drawer-subtitle", children: subtitle })) : null] }), _jsx(IconButton, { icon: X, "aria-label": closeLabel, size: "sm", onClick: onClose })] }), _jsx("div", { className: "xeno-drawer-body", children: children }), footer !== undefined ? _jsx("footer", { className: "xeno-drawer-footer", children: footer }) : null] }) }));
37
+ if (portal && typeof document !== 'undefined' && document.body) {
38
+ return createPortal(node, document.body);
39
+ }
40
+ return node;
41
+ }
@@ -9,13 +9,16 @@ function readThemeContext(anchor) {
9
9
  const themed = anchor.closest('[data-theme]');
10
10
  const chromed = anchor.closest('[data-chrome]');
11
11
  const dense = anchor.closest('[data-density]');
12
+ const laidOut = anchor.closest('[data-layout]');
12
13
  const theme = themed?.getAttribute('data-theme') ?? undefined;
13
14
  const chrome = chromed?.getAttribute('data-chrome') ?? undefined;
14
15
  const density = dense?.getAttribute('data-density') ?? undefined;
16
+ const layout = laidOut?.getAttribute('data-layout') ?? undefined;
15
17
  return {
16
18
  ...(theme ? { theme } : {}),
17
19
  ...(chrome ? { chrome } : {}),
18
20
  ...(density ? { density } : {}),
21
+ ...(layout ? { layout } : {}),
19
22
  };
20
23
  }
21
24
  export function computeFloatingPosition(anchor, panel, viewport, align, preferredSide, offset) {
@@ -127,6 +130,6 @@ export function Popover({ open, onOpenChange, trigger, children, align = 'start'
127
130
  const panelNode = open ? (_jsx("div", { ref: attachPanelRef, className: cx('xeno-popover-panel', portalTarget ? 'xeno-popover-panel--portaled' : false, panelClassName), "data-align": align, "data-side": pos?.side ?? side, style: floatingStyle, ...restPanel, children: children })) : null;
128
131
  return (_jsxs("div", { ref: rootRef, className: cx('xeno-popover', className), ...rest, children: [trigger, panelNode &&
129
132
  (portalTarget
130
- ? createPortal(_jsx("div", { className: "xeno xeno-popover-portal", "data-theme": themeCtx.theme, "data-chrome": themeCtx.chrome, "data-density": themeCtx.density, children: panelNode }), portalTarget)
133
+ ? createPortal(_jsx("div", { className: "xeno xeno-popover-portal", "data-theme": themeCtx.theme, "data-chrome": themeCtx.chrome, "data-density": themeCtx.density, "data-layout": themeCtx.layout, children: panelNode }), portalTarget)
131
134
  : panelNode)] }));
132
135
  }
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ export interface EmptyStateProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {
3
+ /** Optional leading icon mark. */
4
+ readonly icon?: ReactNode;
5
+ /** Concise empty-state headline. */
6
+ readonly title: ReactNode;
7
+ /** Optional explanatory copy below the title. */
8
+ readonly description?: ReactNode;
9
+ /** Primary recovery CTA button. */
10
+ readonly action?: ReactNode;
11
+ /** Optional secondary action link or ghost button. */
12
+ readonly secondaryAction?: ReactNode;
13
+ /** Tighter padding for embedded panels and cards. */
14
+ readonly compact?: boolean;
15
+ }
16
+ /**
17
+ * `<EmptyState>` — calm, structured empty/zero-data surface shared across tables, lists,
18
+ * search results, and consoles.
19
+ */
20
+ export declare function EmptyState({ icon, title, description, action, secondaryAction, compact, className, ...rest }: EmptyStateProps): ReactElement;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../controls/util.js';
3
+ /**
4
+ * `<EmptyState>` — calm, structured empty/zero-data surface shared across tables, lists,
5
+ * search results, and consoles.
6
+ */
7
+ export function EmptyState({ icon, title, description, action, secondaryAction, compact = false, className, ...rest }) {
8
+ return (_jsxs("div", { className: cx('xeno-empty-state', className), "data-compact": compact ? 'true' : undefined, ...rest, children: [icon != null ? (_jsx("div", { className: "xeno-empty-state-icon", "aria-hidden": "true", children: icon })) : null, _jsx("h3", { className: "xeno-empty-state-title", children: title }), description != null ? _jsx("p", { className: "xeno-empty-state-desc", children: description }) : null, action != null || secondaryAction != null ? (_jsxs("div", { className: "xeno-empty-state-actions", children: [action, secondaryAction] })) : null] }));
9
+ }
@@ -0,0 +1,36 @@
1
+ import type { HTMLAttributes, ReactElement, ReactNode } from 'react';
2
+ export interface SkeletonProps extends HTMLAttributes<HTMLSpanElement> {
3
+ /** Explicit CSS width (e.g. `'100%'`, `140`). */
4
+ readonly width?: number | string;
5
+ /** Explicit CSS height (e.g. `14`, `'2rem'`). Defaults to `'1em'`. */
6
+ readonly height?: number | string;
7
+ /** Corner radius override (defaults to `--xeno-radius-sm`, never circles). */
8
+ readonly radius?: number | string;
9
+ /** When > 1, renders a vertical stack of `lines` bones with the last line at 72% width. */
10
+ readonly lines?: number;
11
+ /** Vertical gap between multi-line bones in px. Defaults to `6`. */
12
+ readonly gap?: number;
13
+ /** Disables subtle pulse animation when true. */
14
+ readonly static?: boolean;
15
+ }
16
+ /**
17
+ * `<Skeleton>` — zero-layout-shift bone primitive drawn strictly from `--xeno-*` tokens.
18
+ * Honors `prefers-reduced-motion` and uses rectangular token radii (zero circles).
19
+ */
20
+ export declare function Skeleton({ width, height, radius, lines, gap, static: isStatic, className, style, ...rest }: SkeletonProps): ReactElement;
21
+ export interface SkeletonContainerProps extends HTMLAttributes<HTMLDivElement> {
22
+ /** When true, displays the bone geometry in-place with zero bounding-box shift. */
23
+ readonly loading: boolean;
24
+ /** Accessible status text announced while loading. Defaults to `'Loading'`. */
25
+ readonly loadingLabel?: string;
26
+ /** Optional custom bone overlay; when omitted, mirrors the exact child footprint. */
27
+ readonly skeleton?: ReactNode;
28
+ /** Real content rendered when loaded (and used to lock exact dimensions when loading). */
29
+ readonly children: ReactNode;
30
+ }
31
+ /**
32
+ * `<SkeletonContainer>` — guarantees mathematically `0px` Cumulative Layout Shift (CLS)
33
+ * by locking both the loaded content and its skeleton bone into the same `grid-area: 1/1`
34
+ * footprint so arriving data replaces the placeholder in-place with zero reflow.
35
+ */
36
+ export declare function SkeletonContainer({ loading, loadingLabel, skeleton, children, className, ...rest }: SkeletonContainerProps): ReactElement;
@@ -0,0 +1,31 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { cx } from '../controls/util.js';
3
+ const toDim = (v) => v === undefined ? undefined : typeof v === 'number' ? `${v}px` : v;
4
+ /**
5
+ * `<Skeleton>` — zero-layout-shift bone primitive drawn strictly from `--xeno-*` tokens.
6
+ * Honors `prefers-reduced-motion` and uses rectangular token radii (zero circles).
7
+ */
8
+ export function Skeleton({ width, height, radius, lines = 1, gap = 6, static: isStatic = false, className, style, ...rest }) {
9
+ const boneStyle = {
10
+ ...(width !== undefined ? { width: toDim(width) } : {}),
11
+ ...(height !== undefined ? { height: toDim(height) } : {}),
12
+ ...(radius !== undefined ? { borderRadius: toDim(radius) } : {}),
13
+ ...style,
14
+ };
15
+ if (lines > 1) {
16
+ return (_jsx("span", { className: cx('xeno-skeleton-stack', className), style: { gap: `${gap}px`, ...(width !== undefined ? { width: toDim(width) } : {}) }, "aria-hidden": "true", ...rest, children: Array.from({ length: lines }, (_, idx) => (_jsx("span", { className: "xeno-skeleton", "data-static": isStatic ? 'true' : undefined, style: {
17
+ height: toDim(height) ?? '1em',
18
+ width: idx === lines - 1 ? '72%' : '100%',
19
+ ...(radius !== undefined ? { borderRadius: toDim(radius) } : {}),
20
+ } }, idx))) }));
21
+ }
22
+ return (_jsx("span", { className: cx('xeno-skeleton', className), "data-static": isStatic ? 'true' : undefined, style: boneStyle, "aria-hidden": "true", ...rest }));
23
+ }
24
+ /**
25
+ * `<SkeletonContainer>` — guarantees mathematically `0px` Cumulative Layout Shift (CLS)
26
+ * by locking both the loaded content and its skeleton bone into the same `grid-area: 1/1`
27
+ * footprint so arriving data replaces the placeholder in-place with zero reflow.
28
+ */
29
+ export function SkeletonContainer({ loading, loadingLabel = 'Loading', skeleton, children, className, ...rest }) {
30
+ return (_jsxs("div", { className: cx('xeno-skeleton-container', className), "data-loading": loading ? 'true' : 'false', "aria-busy": loading || undefined, "aria-label": loading ? loadingLabel : undefined, ...rest, children: [_jsx("div", { className: "xeno-skeleton-layer xeno-skeleton-content", "aria-hidden": loading || undefined, children: children }), loading ? (_jsx("div", { className: "xeno-skeleton-layer xeno-skeleton-overlay", "aria-hidden": "true", children: skeleton ?? _jsx(Skeleton, { width: "100%", height: "100%" }) })) : null] }));
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xenosystem/elements-react",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "license": "UNLICENSED",
5
5
  "description": "The XENO web renderer — interprets element declarations as React/SVG. CSS-first, 0 kb runtime.",
6
6
  "author": "XENO Corporation <emilian@bnkrsys.com>",
@@ -48,7 +48,7 @@
48
48
  "@fontsource-variable/dm-sans": "^5.3.0",
49
49
  "@fontsource-variable/inter": "^5.3.0",
50
50
  "@fontsource/dm-mono": "^5.3.0",
51
- "@xenosystem/elements": "0.0.11",
51
+ "@xenosystem/elements": "0.0.12",
52
52
  "@xenosystem/generate": "0.0.10"
53
53
  },
54
54
  "devDependencies": {
@@ -0,0 +1,78 @@
1
+ .xeno-form-field {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 5px;
5
+ min-width: 0;
6
+ box-sizing: border-box;
7
+ }
8
+
9
+ .xeno-form-field[data-inline='true'] {
10
+ display: grid;
11
+ grid-template-columns: minmax(110px, 160px) minmax(0, 1fr);
12
+ column-gap: 12px;
13
+ row-gap: 4px;
14
+ align-items: center;
15
+ }
16
+
17
+ .xeno-form-field[data-inline='true'] > .xeno-form-field-error,
18
+ .xeno-form-field[data-inline='true'] > .xeno-form-field-hint {
19
+ grid-column: 2;
20
+ }
21
+
22
+ .xeno-form-field-head {
23
+ display: flex;
24
+ align-items: center;
25
+ justify-content: space-between;
26
+ gap: 8px;
27
+ min-width: 0;
28
+ }
29
+
30
+ .xeno-form-field-label {
31
+ display: inline-flex;
32
+ align-items: center;
33
+ gap: 3px;
34
+ font-size: 12px;
35
+ font-weight: 500;
36
+ color: var(--xeno-text);
37
+ cursor: pointer;
38
+ }
39
+
40
+ .xeno-form-field[data-disabled='true'] .xeno-form-field-label {
41
+ color: var(--xeno-muted-text);
42
+ cursor: default;
43
+ }
44
+
45
+ .xeno-form-field-req {
46
+ color: var(--xeno-danger-text);
47
+ font-weight: 600;
48
+ }
49
+
50
+ .xeno-form-field-action {
51
+ font-size: 11px;
52
+ color: var(--xeno-muted-text);
53
+ font-variant-numeric: tabular-nums;
54
+ }
55
+
56
+ .xeno-form-field-control {
57
+ min-width: 0;
58
+ }
59
+
60
+ .xeno-form-field[data-invalid='true'] .xeno-input,
61
+ .xeno-form-field[data-invalid='true'] .xeno-textarea,
62
+ .xeno-form-field[data-invalid='true'] .xeno-select-trigger,
63
+ .xeno-form-field[data-invalid='true'] .xeno-combobox-box,
64
+ .xeno-form-field[data-invalid='true'] .xeno-num-input {
65
+ border-color: var(--xeno-danger-text);
66
+ }
67
+
68
+ .xeno-form-field-error {
69
+ font-size: 11.5px;
70
+ color: var(--xeno-danger-text);
71
+ line-height: 1.35;
72
+ }
73
+
74
+ .xeno-form-field-hint {
75
+ font-size: 11.5px;
76
+ color: var(--xeno-muted-text);
77
+ line-height: 1.35;
78
+ }
@@ -0,0 +1,86 @@
1
+ .xeno-num-input {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ height: var(--xeno-h-md, 32px);
5
+ border-radius: var(--xeno-radius-control, 6px);
6
+ border: 1px solid var(--xeno-border);
7
+ background: var(--xeno-field, var(--xeno-canvas));
8
+ color: var(--xeno-text);
9
+ overflow: hidden;
10
+ box-sizing: border-box;
11
+ }
12
+
13
+ .xeno-num-input[data-size='sm'] {
14
+ height: var(--xeno-h-sm, 26px);
15
+ }
16
+
17
+ .xeno-num-input[data-size='lg'] {
18
+ height: var(--xeno-h-lg, 38px);
19
+ }
20
+
21
+ .xeno-num-input:focus-within {
22
+ border-color: var(--xeno-border-strong);
23
+ }
24
+
25
+ .xeno-num-input[data-availability='disabled'] {
26
+ opacity: 0.45;
27
+ }
28
+
29
+ .xeno-num-field {
30
+ flex: 1 1 auto;
31
+ min-width: 44px;
32
+ width: 64px;
33
+ height: 100%;
34
+ border: 0;
35
+ background: transparent;
36
+ color: inherit;
37
+ padding-inline: 8px;
38
+ font-family: var(--xeno-font-mono);
39
+ font-size: 12.5px;
40
+ font-variant-numeric: tabular-nums;
41
+ text-align: center;
42
+ outline: none;
43
+ }
44
+
45
+ .xeno-num-unit {
46
+ padding-inline-end: 8px;
47
+ font-size: 11px;
48
+ font-family: var(--xeno-font-mono);
49
+ color: var(--xeno-muted-text);
50
+ user-select: none;
51
+ }
52
+
53
+ .xeno-num-step {
54
+ appearance: none;
55
+ flex: none;
56
+ width: 26px;
57
+ height: 100%;
58
+ border: 0;
59
+ background: var(--xeno-control);
60
+ color: var(--xeno-muted-text);
61
+ font-size: 13px;
62
+ line-height: 1;
63
+ cursor: pointer;
64
+ display: grid;
65
+ place-items: center;
66
+ padding: 0;
67
+ transition: background 120ms ease, color 120ms ease;
68
+ }
69
+
70
+ .xeno-num-step:first-child {
71
+ border-inline-end: 1px solid var(--xeno-border-subtle);
72
+ }
73
+
74
+ .xeno-num-step:last-child {
75
+ border-inline-start: 1px solid var(--xeno-border-subtle);
76
+ }
77
+
78
+ .xeno-num-step:hover:not(:disabled) {
79
+ background: var(--xeno-hover-strong, var(--xeno-elevated));
80
+ color: var(--xeno-text);
81
+ }
82
+
83
+ .xeno-num-step:disabled {
84
+ opacity: 0.35;
85
+ cursor: default;
86
+ }
@@ -0,0 +1,210 @@
1
+ .xeno-select,
2
+ .xeno-combobox {
3
+ display: inline-flex;
4
+ width: 100%;
5
+ min-width: 0;
6
+ }
7
+
8
+ .xeno-select-trigger,
9
+ .xeno-combobox-box {
10
+ display: flex;
11
+ align-items: center;
12
+ justify-content: space-between;
13
+ gap: 8px;
14
+ width: 100%;
15
+ min-height: var(--xeno-h-md, 32px);
16
+ padding-inline: 10px;
17
+ padding-block: 4px;
18
+ border-radius: var(--xeno-radius-control, 6px);
19
+ border: 1px solid var(--xeno-border);
20
+ background: var(--xeno-field, var(--xeno-canvas));
21
+ color: var(--xeno-text);
22
+ font-family: var(--xeno-font-sans);
23
+ font-size: 12.5px;
24
+ text-align: start;
25
+ cursor: pointer;
26
+ box-sizing: border-box;
27
+ transition: border-color 120ms ease, background 120ms ease;
28
+ }
29
+
30
+ .xeno-select-trigger[data-size='sm'],
31
+ .xeno-combobox-box[data-size='sm'] {
32
+ min-height: var(--xeno-h-sm, 26px);
33
+ padding-inline: 8px;
34
+ font-size: 12px;
35
+ }
36
+
37
+ .xeno-select-trigger[data-size='lg'],
38
+ .xeno-combobox-box[data-size='lg'] {
39
+ min-height: var(--xeno-h-lg, 38px);
40
+ padding-inline: 12px;
41
+ font-size: 13.5px;
42
+ }
43
+
44
+ .xeno-select-trigger:hover:not(:disabled),
45
+ .xeno-combobox-box:hover:not([data-disabled='true']) {
46
+ border-color: var(--xeno-border-strong);
47
+ }
48
+
49
+ .xeno-select-trigger[data-open='true'],
50
+ .xeno-combobox-box[data-open='true'],
51
+ .xeno-select-trigger:focus-visible,
52
+ .xeno-combobox-box:focus-within {
53
+ border-color: var(--xeno-accent);
54
+ outline: none;
55
+ }
56
+
57
+ .xeno-select-trigger:disabled,
58
+ .xeno-combobox-box[data-disabled='true'] {
59
+ opacity: 0.45;
60
+ cursor: default;
61
+ }
62
+
63
+ .xeno-select-trigger[data-placeholder='true'] .xeno-select-value {
64
+ color: var(--xeno-muted-text);
65
+ }
66
+
67
+ .xeno-select-value {
68
+ flex: 1 1 auto;
69
+ min-width: 0;
70
+ white-space: nowrap;
71
+ overflow: hidden;
72
+ text-overflow: ellipsis;
73
+ }
74
+
75
+ .xeno-select-caret {
76
+ flex: none;
77
+ color: var(--xeno-muted-text);
78
+ transition: transform 140ms ease;
79
+ }
80
+
81
+ .xeno-select-trigger[data-open='true'] .xeno-select-caret {
82
+ transform: rotate(180deg);
83
+ }
84
+
85
+ .xeno-combobox-box {
86
+ flex-wrap: wrap;
87
+ justify-content: flex-start;
88
+ gap: 4px;
89
+ cursor: text;
90
+ }
91
+
92
+ .xeno-combobox-chips {
93
+ display: inline-flex;
94
+ flex-wrap: wrap;
95
+ gap: 4px;
96
+ }
97
+
98
+ .xeno-combobox-chip {
99
+ display: inline-flex;
100
+ align-items: center;
101
+ gap: 4px;
102
+ height: 20px;
103
+ padding-inline: 6px;
104
+ border-radius: var(--xeno-radius-sm, 4px);
105
+ background: var(--xeno-control);
106
+ border: 1px solid var(--xeno-border);
107
+ font-size: 11px;
108
+ color: var(--xeno-text);
109
+ }
110
+
111
+ .xeno-combobox-chip-x {
112
+ appearance: none;
113
+ border: 0;
114
+ background: transparent;
115
+ color: var(--xeno-muted-text);
116
+ cursor: pointer;
117
+ padding: 0 2px;
118
+ font-size: 12px;
119
+ line-height: 1;
120
+ }
121
+
122
+ .xeno-combobox-chip-x:hover {
123
+ color: var(--xeno-text);
124
+ }
125
+
126
+ .xeno-combobox-input {
127
+ flex: 1 1 80px;
128
+ min-width: 60px;
129
+ border: 0;
130
+ background: transparent;
131
+ color: var(--xeno-text);
132
+ font: inherit;
133
+ outline: none;
134
+ padding: 0;
135
+ }
136
+
137
+ .xeno-combobox-input::placeholder {
138
+ color: var(--xeno-muted-text);
139
+ }
140
+
141
+ .xeno-select-list {
142
+ min-width: 200px;
143
+ max-height: 260px;
144
+ overflow-y: auto;
145
+ padding: 4px;
146
+ border-radius: var(--xeno-radius-md, 8px);
147
+ background: var(--xeno-elevated, var(--xeno-surface));
148
+ border: 1px solid var(--xeno-border-strong, var(--xeno-border));
149
+ box-shadow: var(--xeno-pop);
150
+ display: flex;
151
+ flex-direction: column;
152
+ gap: 2px;
153
+ }
154
+
155
+ .xeno-select-option {
156
+ display: flex;
157
+ align-items: center;
158
+ justify-content: space-between;
159
+ gap: 8px;
160
+ padding-block: 6px;
161
+ padding-inline: 8px;
162
+ border-radius: var(--xeno-radius-sm, 5px);
163
+ font-size: 12.5px;
164
+ color: var(--xeno-text);
165
+ cursor: pointer;
166
+ user-select: none;
167
+ }
168
+
169
+ .xeno-select-option[data-active='true'] {
170
+ background: var(--xeno-hover);
171
+ }
172
+
173
+ .xeno-select-option[data-selected='true'] {
174
+ background: var(--xeno-hover-strong, var(--xeno-control));
175
+ font-weight: 500;
176
+ }
177
+
178
+ .xeno-select-option[data-disabled='true'] {
179
+ opacity: 0.4;
180
+ cursor: default;
181
+ }
182
+
183
+ .xeno-select-opt-text {
184
+ display: flex;
185
+ flex-direction: column;
186
+ min-width: 0;
187
+ }
188
+
189
+ .xeno-select-opt-label {
190
+ white-space: nowrap;
191
+ overflow: hidden;
192
+ text-overflow: ellipsis;
193
+ }
194
+
195
+ .xeno-select-opt-desc {
196
+ font-size: 11px;
197
+ color: var(--xeno-muted-text);
198
+ }
199
+
200
+ .xeno-select-check {
201
+ flex: none;
202
+ color: var(--xeno-success-text, var(--xeno-accent));
203
+ }
204
+
205
+ .xeno-select-empty {
206
+ padding: 12px 8px;
207
+ text-align: center;
208
+ font-size: 12px;
209
+ color: var(--xeno-muted-text);
210
+ }