@ensi-platform/admin-ui 0.14.0 → 0.14.1
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/{Component-_PP1i9V1.js → Component-Bs-kDKZf.js} +3 -3
- package/dist/{Component-_PP1i9V1.js.map → Component-Bs-kDKZf.js.map} +1 -1
- package/dist/{Component-DrdEP1wD.js → Component-DNQetS8Y.js} +3 -3
- package/dist/{Component-DrdEP1wD.js.map → Component-DNQetS8Y.js.map} +1 -1
- package/dist/{Component--pn4mDeS.js → Component-Q_eH0Y9C.js} +2 -2
- package/dist/{Component--pn4mDeS.js.map → Component-Q_eH0Y9C.js.map} +1 -1
- package/dist/{Component-COgt_U9z.js → Component-jpe2PT8K.js} +3 -3
- package/dist/{Component-COgt_U9z.js.map → Component-jpe2PT8K.js.map} +1 -1
- package/dist/assets/index.css +1 -1
- package/dist/assets/index12.css +1 -1
- package/dist/assets/index15.css +1 -1
- package/dist/assets/index16.css +1 -1
- package/dist/assets/index17.css +1 -1
- package/dist/assets/index18.css +1 -1
- package/dist/assets/index22.css +1 -1
- package/dist/assets/index34.css +1 -1
- package/dist/assets/index9.css +1 -1
- package/dist/autocomplete/index.js +1 -1
- package/dist/autocomplete-async/index.js +2 -2
- package/dist/color-field/index.js +22 -22
- package/dist/color-field/index.js.map +1 -1
- package/dist/combobox/components/MultiTrigger/index.d.ts.map +1 -1
- package/dist/combobox/components/Trigger/index.d.ts.map +1 -1
- package/dist/combobox/index.js +3 -3
- package/dist/data-table/index.js +1 -1
- package/dist/date-picker/Component.d.ts.map +1 -1
- package/dist/date-picker/index.js +142 -134
- package/dist/date-picker/index.js.map +1 -1
- package/dist/date-range-picker/Component.d.ts.map +1 -1
- package/dist/date-range-picker/index.js +150 -142
- package/dist/date-range-picker/index.js.map +1 -1
- package/dist/flex-layout/Component.d.ts +1 -1
- package/dist/flex-layout/Component.d.ts.map +1 -1
- package/dist/flex-layout/index.js +60 -52
- package/dist/flex-layout/index.js.map +1 -1
- package/dist/flex-layout/types.d.ts +10 -1
- package/dist/flex-layout/types.d.ts.map +1 -1
- package/dist/grid-layout/Component.d.ts +1 -1
- package/dist/grid-layout/Component.d.ts.map +1 -1
- package/dist/grid-layout/index.js +57 -53
- package/dist/grid-layout/index.js.map +1 -1
- package/dist/grid-layout/types.d.ts +6 -0
- package/dist/grid-layout/types.d.ts.map +1 -1
- package/dist/index-BVJblFhG.js +275 -0
- package/dist/index-BVJblFhG.js.map +1 -0
- package/dist/index-DtpMocgp.js +106 -0
- package/dist/index-DtpMocgp.js.map +1 -0
- package/dist/multi-autocomplete/index.js +1 -1
- package/dist/multi-autocomplete-async/index.js +1 -1
- package/dist/multi-select/index.js +2 -2
- package/dist/select/index.js +1 -1
- package/dist/table/index.js +1 -1
- package/dist/time-field/Component.d.ts.map +1 -1
- package/dist/time-field/index.js +87 -79
- package/dist/time-field/index.js.map +1 -1
- package/dist/{utils-Dfp1NDWx.js → utils-C3l0oYwN.js} +8 -8
- package/dist/utils-C3l0oYwN.js.map +1 -0
- package/package.json +1 -1
- package/src/color-field/docs/cssVariables.ts +8 -2
- package/src/date-picker/docs/cssVariables.ts +4 -0
- package/src/date-range-picker/docs/cssVariables.ts +4 -0
- package/src/flex-layout/docs/Description.md +3 -1
- package/src/flex-layout/types.ts +11 -1
- package/src/grid-layout/docs/Description.md +3 -1
- package/src/grid-layout/types.ts +6 -0
- package/src/time-field/docs/cssVariables.ts +4 -0
- package/dist/index-CYUeRS10.js +0 -262
- package/dist/index-CYUeRS10.js.map +0 -1
- package/dist/index-Rx06m88a.js +0 -101
- package/dist/index-Rx06m88a.js.map +0 -1
- package/dist/utils-Dfp1NDWx.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as l, jsxs as z } from "react/jsx-runtime";
|
|
2
|
-
import { useState as h, useRef as w, useCallback as pe, useEffect as
|
|
2
|
+
import { useState as h, useRef as w, useCallback as pe, useEffect as K } from "react";
|
|
3
3
|
import k from "classnames";
|
|
4
4
|
import { DialogTrigger as be, Button as U, ColorSwatch as ge, Popover as he, Dialog as _e } from "react-aria-components";
|
|
5
5
|
import { s as ye } from "../index-h8z54aFR.js";
|
|
@@ -10,7 +10,7 @@ import { cva as we } from "class-variance-authority";
|
|
|
10
10
|
import { typographyStyles as E } from "../typography/index.js";
|
|
11
11
|
import { F, u as Fe } from "../Component-BJc8tKRD.js";
|
|
12
12
|
import { u as ke, g as Ne } from "../useFieldHook-o47pjrRg.js";
|
|
13
|
-
import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "aub_styles-module_block_88782", He = "aub_styles-module_group_4501d", Se = "aub_styles-module_swatch_7c309", $e = "aub_styles-module_clear_36c5c", Be = "aub_styles-module_sm_27b98", De = "aub_styles-module_md_2abd6", Ee = "aub_styles-module_lg_f2dbc", ze = "aub_styles-module_primary_fed91", Te = "aub_styles-
|
|
13
|
+
import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "aub_styles-module_block_88782", He = "aub_styles-module_group_4501d", Se = "aub_styles-module_swatch_7c309", $e = "aub_styles-module_clear_36c5c", Be = "aub_styles-module_sm_27b98", De = "aub_styles-module_md_2abd6", Ee = "aub_styles-module_lg_f2dbc", ze = "aub_styles-module_primary_fed91", Te = "aub_styles-module_icon_5c0c1", Le = "aub_styles-module_swatchColor_8141a", Ve = "aub_styles-module_hex_169fb", Ge = "aub_styles-module_popover_24de0", Ie = "aub_styles-module_dialog_788ed", o = {
|
|
14
14
|
root: Pe,
|
|
15
15
|
block: Re,
|
|
16
16
|
group: He,
|
|
@@ -20,9 +20,9 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
20
20
|
md: De,
|
|
21
21
|
lg: Ee,
|
|
22
22
|
primary: ze,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
icon: Te,
|
|
24
|
+
swatchColor: Le,
|
|
25
|
+
hex: Ve,
|
|
26
26
|
popover: Ge,
|
|
27
27
|
dialog: Ie
|
|
28
28
|
}, Oe = we(o.group, {
|
|
@@ -45,11 +45,11 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
45
45
|
variant: "primary",
|
|
46
46
|
block: !0
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), Me = /^[0-9a-fA-F]+$/, je = /^(rgb|rgba|hsl|hsla|hsb|hsba)\([^)]+\)$/i, W = (t, r) => {
|
|
49
49
|
const s = t.trim();
|
|
50
50
|
if (!s) return r === "settle" ? "" : null;
|
|
51
51
|
const i = s.startsWith("#") ? s.slice(1) : s;
|
|
52
|
-
if (
|
|
52
|
+
if (Me.test(i)) {
|
|
53
53
|
if (i.length === 6) return `#${i.toLowerCase()}`;
|
|
54
54
|
if (r === "settle" && i.length === 3) {
|
|
55
55
|
const [u, a, d] = i.toLowerCase();
|
|
@@ -58,7 +58,7 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
58
58
|
return null;
|
|
59
59
|
}
|
|
60
60
|
const c = Y(s);
|
|
61
|
-
return !c || r === "live" && !
|
|
61
|
+
return !c || r === "live" && !je.test(s) ? null : c;
|
|
62
62
|
}, X = (t) => {
|
|
63
63
|
if (t == null || t.trim() === "")
|
|
64
64
|
return { text: "", hex: null, unrecognized: !1 };
|
|
@@ -97,17 +97,17 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
97
97
|
t && (t.current = e);
|
|
98
98
|
},
|
|
99
99
|
[t]
|
|
100
|
-
), $ = w(!1), v = w(!1), B = w(p),
|
|
101
|
-
|
|
100
|
+
), $ = w(!1), v = w(!1), B = w(p), M = u || L === !0 || L === "true" || m.unrecognized, D = ae ?? m.hex, de = d && !a && (G !== "" || !!m.hex);
|
|
101
|
+
K(() => {
|
|
102
102
|
B.current = p;
|
|
103
|
-
}, [p, I]),
|
|
103
|
+
}, [p, I]), K(() => {
|
|
104
104
|
if ($.current) return;
|
|
105
105
|
const e = X(p);
|
|
106
106
|
b(e.text), g(null);
|
|
107
107
|
}, [p, I]);
|
|
108
108
|
const x = (e, n) => {
|
|
109
109
|
v.current = !1, g(e || null), b(n !== void 0 && n.toLowerCase() === e ? n : e), B.current !== e && (B.current = e, V || se(e), e !== p && R?.(e));
|
|
110
|
-
},
|
|
110
|
+
}, j = (e) => {
|
|
111
111
|
if (!v.current && e === m.text) return;
|
|
112
112
|
const n = W(e, "settle");
|
|
113
113
|
if (v.current = !1, n == null) {
|
|
@@ -118,17 +118,17 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
118
118
|
}, me = (e) => {
|
|
119
119
|
const n = e.target.value;
|
|
120
120
|
v.current = !0, b(n), g(null);
|
|
121
|
-
const
|
|
122
|
-
|
|
121
|
+
const A = W(n, "live");
|
|
122
|
+
A && x(A, n);
|
|
123
123
|
}, fe = (e) => {
|
|
124
|
-
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(),
|
|
124
|
+
e.key === "Enter" && (e.preventDefault(), e.stopPropagation(), j(e.currentTarget.value));
|
|
125
125
|
};
|
|
126
126
|
return /* @__PURE__ */ l("div", { ...Z, className: k(o.root, c && o.block, H), children: /* @__PURE__ */ z(
|
|
127
127
|
"div",
|
|
128
128
|
{
|
|
129
129
|
ref: ue,
|
|
130
130
|
className: Oe({ size: s, variant: i, block: c }),
|
|
131
|
-
"data-invalid":
|
|
131
|
+
"data-invalid": M || void 0,
|
|
132
132
|
"data-disabled": a || void 0,
|
|
133
133
|
"data-test-id": y,
|
|
134
134
|
children: [
|
|
@@ -150,7 +150,7 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
150
150
|
children: D ? /* @__PURE__ */ l(ge, { className: o.swatchColor, color: D }) : null
|
|
151
151
|
}
|
|
152
152
|
),
|
|
153
|
-
/* @__PURE__ */ l(he, { className: o.popover, placement: "bottom start", triggerRef: O, children: /* @__PURE__ */ l(
|
|
153
|
+
/* @__PURE__ */ l(he, { className: o.popover, placement: "bottom start", triggerRef: O, isNonModal: !0, children: /* @__PURE__ */ l(
|
|
154
154
|
_e,
|
|
155
155
|
{
|
|
156
156
|
className: o.dialog,
|
|
@@ -184,7 +184,7 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
184
184
|
"aria-label": T ? void 0 : C ?? oe,
|
|
185
185
|
"aria-labelledby": T,
|
|
186
186
|
"aria-describedby": Q,
|
|
187
|
-
"aria-invalid":
|
|
187
|
+
"aria-invalid": M || void 0,
|
|
188
188
|
placeholder: "#RRGGBB",
|
|
189
189
|
spellCheck: !1,
|
|
190
190
|
autoComplete: "off",
|
|
@@ -196,7 +196,7 @@ import '../assets/index16.css';const Pe = "aub_styles-module_root_2023e", Re = "
|
|
|
196
196
|
},
|
|
197
197
|
onChange: me,
|
|
198
198
|
onBlur: (e) => {
|
|
199
|
-
$.current = !1,
|
|
199
|
+
$.current = !1, j(e.target.value), ce((n) => n + 1), _?.();
|
|
200
200
|
},
|
|
201
201
|
onKeyDown: fe
|
|
202
202
|
}
|
|
@@ -235,7 +235,7 @@ const J = ({ value: t, onChange: r, onBlur: s, ...i }) => {
|
|
|
235
235
|
);
|
|
236
236
|
};
|
|
237
237
|
J.displayName = "FormColorFieldControl";
|
|
238
|
-
const
|
|
238
|
+
const Ae = ({
|
|
239
239
|
name: t,
|
|
240
240
|
label: r,
|
|
241
241
|
hint: s,
|
|
@@ -277,9 +277,9 @@ const Ke = ({
|
|
|
277
277
|
}
|
|
278
278
|
);
|
|
279
279
|
};
|
|
280
|
-
|
|
280
|
+
Ae.displayName = "FormColorField";
|
|
281
281
|
export {
|
|
282
282
|
q as ColorField,
|
|
283
|
-
|
|
283
|
+
Ae as FormColorField
|
|
284
284
|
};
|
|
285
285
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../src/color-field/theme.ts","../../src/color-field/utils.ts","../../src/color-field/Component.tsx","../../src/color-field/FormColorField.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport cn from 'classnames';\n\nimport { typographyStyles } from '@ds/typography';\n\nimport styles from './styles.module.css';\n\nexport const colorFieldGroupVariants = cva(styles.group, {\n variants: {\n size: {\n sm: cn(styles.sm, typographyStyles.bodyS),\n md: cn(styles.md, typographyStyles.bodyS),\n lg: cn(styles.lg, typographyStyles.bodyM),\n },\n variant: {\n primary: styles.primary,\n },\n block: {\n true: styles.block,\n false: null,\n },\n },\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n block: true,\n },\n});\n","import { toHexColor } from '@/color-picker';\n\nexport type TCommitMode = 'live' | 'settle';\n\nconst HEX_BODY = /^[0-9a-fA-F]+$/;\nconst COMPLETE_CSS = /^(rgb|rgba|hsl|hsla|hsb|hsba)\\([^)]+\\)$/i;\n\n/**\n * Hex to publish.\n * `''` clears on settle. `null` means \"keep typing\" or \"not a color\".\n * Three-digit hex expands only on settle, so `#abcdef` can be typed.\n */\nexport const commitHexInput = (raw: string, mode: TCommitMode): string | null => {\n const trimmed = raw.trim();\n\n if (!trimmed) return mode === 'settle' ? '' : null;\n\n const body = trimmed.startsWith('#') ? trimmed.slice(1) : trimmed;\n\n if (HEX_BODY.test(body)) {\n if (body.length === 6) return `#${body.toLowerCase()}`;\n\n if (mode === 'settle' && body.length === 3) {\n const [red, green, blue] = body.toLowerCase();\n\n return `#${red}${red}${green}${green}${blue}${blue}`;\n }\n\n return null;\n }\n\n const parsed = toHexColor(trimmed);\n\n if (!parsed) return null;\n\n if (mode === 'live' && !COMPLETE_CSS.test(trimmed)) return null;\n\n return parsed;\n};\n\n/** How a stored string should look in the field before the user edits it. */\nexport const describeColorValue = (\n value: string | null | undefined\n): { text: string; hex: string | null; unrecognized: boolean } => {\n if (value == null || value.trim() === '') {\n return { text: '', hex: null, unrecognized: false };\n }\n\n const hex = toHexColor(value);\n\n if (!hex) return { text: '', hex: null, unrecognized: true };\n\n return { text: hex, hex, unrecognized: false };\n};\n","import { type ChangeEvent, type KeyboardEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\nimport { Button as RacButton, ColorSwatch, Dialog, DialogTrigger, Popover } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { ColorPicker } from '@/color-picker';\nimport { Clear } from '@/icons';\nimport { useAuiLabels } from '@/provider';\n\nimport { colorFieldGroupVariants } from './theme';\nimport { type IColorFieldProps } from './types';\nimport { commitHexInput, describeColorValue } from './utils';\n\nimport styles from './styles.module.css';\n\nexport const ColorField = supportRef(\n ({\n ref,\n inputRef,\n size = 'md',\n variant = 'primary',\n block = true,\n invalid = false,\n disabled = false,\n clear = false,\n presets,\n value,\n defaultValue,\n onChange,\n onBlur,\n className,\n dataTestId,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n ...domProps\n }: IColorFieldProps) => {\n const { clear: clearLabel, openPalette, colorCode, colorPalette } = useAuiLabels();\n const isControlled = value !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? '');\n const current = isControlled ? value : uncontrolledValue;\n const display = describeColorValue(current);\n const [text, setText] = useState(display.text);\n const [previewHex, setPreviewHex] = useState<string | null>(null);\n const [hue, setHue] = useState<number | undefined>(undefined);\n /** Forces a resync after blur when the parent rejected the change and `current` did not move. */\n const [settledTick, setSettledTick] = useState(0);\n const groupRef = useRef<HTMLDivElement>(null);\n const setGroupRef = useCallback(\n (node: HTMLDivElement | null) => {\n groupRef.current = node;\n\n if (typeof ref === 'function') {\n ref(node);\n\n return;\n }\n\n if (ref) ref.current = node;\n },\n [ref]\n );\n const focusedRef = useRef(false);\n const dirtyRef = useRef(false);\n const lastEmittedRef = useRef(current);\n const markedInvalid = invalid || ariaInvalid === true || ariaInvalid === 'true' || display.unrecognized;\n const swatchColor = previewHex ?? display.hex;\n const showClear = clear && !disabled && (text !== '' || Boolean(display.hex));\n\n useEffect(() => {\n lastEmittedRef.current = current;\n }, [current, settledTick]);\n\n useEffect(() => {\n if (focusedRef.current) return;\n\n const next = describeColorValue(current);\n\n setText(next.text);\n setPreviewHex(null);\n }, [current, settledTick]);\n\n const emit = (hex: string, typed?: string) => {\n dirtyRef.current = false;\n setPreviewHex(hex || null);\n setText(typed !== undefined && typed.toLowerCase() === hex ? typed : hex);\n\n if (lastEmittedRef.current === hex) return;\n\n lastEmittedRef.current = hex;\n\n if (!isControlled) setUncontrolledValue(hex);\n\n if (hex === current) return;\n\n onChange?.(hex);\n };\n\n const settle = (raw: string) => {\n if (!dirtyRef.current && raw === display.text) return;\n\n const committed = commitHexInput(raw, 'settle');\n\n dirtyRef.current = false;\n\n if (committed == null) {\n setText(display.text);\n setPreviewHex(display.hex);\n\n return;\n }\n\n emit(committed);\n };\n\n const onInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n const next = event.target.value;\n\n dirtyRef.current = true;\n setText(next);\n setPreviewHex(null);\n\n const committed = commitHexInput(next, 'live');\n\n if (committed) emit(committed, next);\n };\n\n const onInputKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== 'Enter') return;\n\n event.preventDefault();\n event.stopPropagation();\n settle(event.currentTarget.value);\n };\n\n return (\n <div {...domProps} className={cn(styles.root, block && styles.block, className)}>\n <div\n ref={setGroupRef}\n className={colorFieldGroupVariants({ size, variant, block })}\n data-invalid={markedInvalid || undefined}\n data-disabled={disabled || undefined}\n data-test-id={dataTestId}\n >\n <DialogTrigger\n onOpenChange={open => {\n if (!open) onBlur?.();\n }}\n >\n <RacButton\n className={styles.swatch}\n aria-label={openPalette}\n isDisabled={disabled}\n data-empty={swatchColor ? undefined : true}\n data-test-id=\"color-field-trigger\"\n >\n {swatchColor ? <ColorSwatch className={styles.swatchColor} color={swatchColor} /> : null}\n </RacButton>\n <Popover className={styles.popover} placement=\"bottom start\" triggerRef={groupRef}>\n <Dialog\n className={styles.dialog}\n aria-label={colorPalette}\n data-test-id=\"color-field-dialog\"\n >\n <ColorPicker\n value={display.hex ?? ''}\n hue={hue}\n presets={presets}\n disabled={disabled}\n onHueChange={setHue}\n onPreview={hex => {\n setPreviewHex(hex);\n setText(hex);\n }}\n onChange={emit}\n />\n </Dialog>\n </Popover>\n </DialogTrigger>\n <input\n ref={inputRef}\n id={id}\n className={styles.hex}\n aria-label={ariaLabelledby ? undefined : (ariaLabel ?? colorCode)}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n aria-invalid={markedInvalid || undefined}\n placeholder=\"#RRGGBB\"\n spellCheck={false}\n autoComplete=\"off\"\n disabled={disabled}\n value={text}\n data-test-id=\"color-field-input\"\n onFocus={() => {\n focusedRef.current = true;\n }}\n onChange={onInputChange}\n onBlur={event => {\n focusedRef.current = false;\n settle(event.target.value);\n setSettledTick(tick => tick + 1);\n onBlur?.();\n }}\n onKeyDown={onInputKeyDown}\n />\n {showClear ? (\n <RacButton\n className={styles.clear}\n aria-label={clearLabel}\n data-test-id=\"color-field-clear\"\n excludeFromTabOrder\n onPress={() => emit('')}\n >\n <Clear className={styles.icon} />\n </RacButton>\n ) : null}\n </div>\n </div>\n );\n }\n);\n\nColorField.displayName = 'ColorField';\n","import { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { ColorField } from './Component';\nimport { type IColorFieldProps, type IFormColorFieldProps } from './types';\n\ntype TFormColorFieldControlProps = Omit<IColorFieldProps, 'size' | 'invalid' | 'disabled' | 'value' | 'onChange'> & {\n value: string;\n onChange: (value: string) => void;\n};\n\nconst FormColorFieldControl = ({ value, onChange, onBlur, ...props }: TFormColorFieldControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return (\n <ColorField\n {...controlProps}\n {...props}\n size={size}\n invalid={invalid}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n};\n\nFormColorFieldControl.displayName = 'FormColorFieldControl';\n\nexport const FormColorField = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n className,\n dataTestId,\n ...inputProps\n}: IFormColorFieldProps) => {\n const { field, fieldState, inputProps: rhfInputProps, onChange, onBlurHandler } = useFieldHook({ name });\n const error = getError(fieldState.error)?.message;\n const isDisabled = disabled ?? rhfInputProps.disabled;\n\n return (\n <Field\n invalid={Boolean(error)}\n disabled={isDisabled}\n size={size}\n block={block}\n className={className}\n dataTestId={dataTestId}\n >\n {label ? <Field.Label>{label}</Field.Label> : null}\n <FormColorFieldControl\n {...inputProps}\n block={block}\n inputRef={field.ref}\n value={typeof field.value === 'string' ? field.value : ''}\n onChange={next => {\n field.onChange(next);\n onChange(name, next as never);\n }}\n onBlur={() => onBlurHandler()}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormColorField.displayName = 'FormColorField';\n"],"names":["colorFieldGroupVariants","cva","styles","cn","typographyStyles","HEX_BODY","COMPLETE_CSS","commitHexInput","raw","mode","trimmed","body","red","green","blue","parsed","toHexColor","describeColorValue","value","hex","ColorField","supportRef","ref","inputRef","size","variant","block","invalid","disabled","clear","presets","defaultValue","onChange","onBlur","className","dataTestId","id","ariaLabel","ariaLabelledby","ariaDescribedby","ariaInvalid","domProps","clearLabel","openPalette","colorCode","colorPalette","useAuiLabels","isControlled","uncontrolledValue","setUncontrolledValue","useState","current","display","text","setText","previewHex","setPreviewHex","hue","setHue","settledTick","setSettledTick","groupRef","useRef","setGroupRef","useCallback","node","focusedRef","dirtyRef","lastEmittedRef","markedInvalid","swatchColor","showClear","useEffect","next","emit","typed","settle","committed","onInputChange","event","onInputKeyDown","jsx","jsxs","DialogTrigger","open","RacButton","ColorSwatch","Popover","Dialog","ColorPicker","tick","Clear","FormColorFieldControl","props","controlProps","useField","FormColorField","name","label","hint","inputProps","field","fieldState","rhfInputProps","onBlurHandler","useFieldHook","error","getError","isD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AAA,MACA,YAAAC;AAAA,MAEC,UAAA;AAAA,QAAA+D,IAAQ,gBAAAjB,EAAC4B,EAAM,OAAN,EAAa,aAAM,IAAiB;AAAA,QAC9C,gBAAA5B;AAAA,UAACW;AAAA,UAAA;AAAA,YACI,GAAGQ;AAAA,YACJ,OAAA1E;AAAA,YACA,UAAU2E,EAAM;AAAA,YAChB,OAAO,OAAOA,EAAM,SAAU,WAAWA,EAAM,QAAQ;AAAA,YACvD,UAAU,CAAA5B,MAAQ;AACd,cAAA4B,EAAM,SAAS5B,CAAI,GACnBzC,EAASiE,GAAMxB,CAAa;AAAA,YAChC;AAAA,YACA,QAAQ,MAAM+B,EAAA;AAAA,UAAc;AAAA,QAAA;AAAA,QAE/BL,IAAO,gBAAAlB,EAAC4B,EAAM,MAAN,EAAY,aAAK,IAAgB;AAAA,QAC1C,gBAAA5B,EAAC4B,EAAM,OAAN,EAAa,UAAAH,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEAV,GAAe,cAAc;"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../src/color-field/theme.ts","../../src/color-field/utils.ts","../../src/color-field/Component.tsx","../../src/color-field/FormColorField.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport cn from 'classnames';\n\nimport { typographyStyles } from '@ds/typography';\n\nimport styles from './styles.module.css';\n\nexport const colorFieldGroupVariants = cva(styles.group, {\n variants: {\n size: {\n sm: cn(styles.sm, typographyStyles.bodyS),\n md: cn(styles.md, typographyStyles.bodyS),\n lg: cn(styles.lg, typographyStyles.bodyM),\n },\n variant: {\n primary: styles.primary,\n },\n block: {\n true: styles.block,\n false: null,\n },\n },\n defaultVariants: {\n size: 'md',\n variant: 'primary',\n block: true,\n },\n});\n","import { toHexColor } from '@/color-picker';\n\nexport type TCommitMode = 'live' | 'settle';\n\nconst HEX_BODY = /^[0-9a-fA-F]+$/;\nconst COMPLETE_CSS = /^(rgb|rgba|hsl|hsla|hsb|hsba)\\([^)]+\\)$/i;\n\n/**\n * Hex to publish.\n * `''` clears on settle. `null` means \"keep typing\" or \"not a color\".\n * Three-digit hex expands only on settle, so `#abcdef` can be typed.\n */\nexport const commitHexInput = (raw: string, mode: TCommitMode): string | null => {\n const trimmed = raw.trim();\n\n if (!trimmed) return mode === 'settle' ? '' : null;\n\n const body = trimmed.startsWith('#') ? trimmed.slice(1) : trimmed;\n\n if (HEX_BODY.test(body)) {\n if (body.length === 6) return `#${body.toLowerCase()}`;\n\n if (mode === 'settle' && body.length === 3) {\n const [red, green, blue] = body.toLowerCase();\n\n return `#${red}${red}${green}${green}${blue}${blue}`;\n }\n\n return null;\n }\n\n const parsed = toHexColor(trimmed);\n\n if (!parsed) return null;\n\n if (mode === 'live' && !COMPLETE_CSS.test(trimmed)) return null;\n\n return parsed;\n};\n\n/** How a stored string should look in the field before the user edits it. */\nexport const describeColorValue = (\n value: string | null | undefined\n): { text: string; hex: string | null; unrecognized: boolean } => {\n if (value == null || value.trim() === '') {\n return { text: '', hex: null, unrecognized: false };\n }\n\n const hex = toHexColor(value);\n\n if (!hex) return { text: '', hex: null, unrecognized: true };\n\n return { text: hex, hex, unrecognized: false };\n};\n","import { type ChangeEvent, type KeyboardEvent, useCallback, useEffect, useRef, useState } from 'react';\n\nimport cn from 'classnames';\nimport { Button as RacButton, ColorSwatch, Dialog, DialogTrigger, Popover } from 'react-aria-components';\n\nimport { supportRef } from '@ds/common/support-ref';\n\nimport { ColorPicker } from '@/color-picker';\nimport { Clear } from '@/icons';\nimport { useAuiLabels } from '@/provider';\n\nimport { colorFieldGroupVariants } from './theme';\nimport { type IColorFieldProps } from './types';\nimport { commitHexInput, describeColorValue } from './utils';\n\nimport styles from './styles.module.css';\n\nexport const ColorField = supportRef(\n ({\n ref,\n inputRef,\n size = 'md',\n variant = 'primary',\n block = true,\n invalid = false,\n disabled = false,\n clear = false,\n presets,\n value,\n defaultValue,\n onChange,\n onBlur,\n className,\n dataTestId,\n id,\n 'aria-label': ariaLabel,\n 'aria-labelledby': ariaLabelledby,\n 'aria-describedby': ariaDescribedby,\n 'aria-invalid': ariaInvalid,\n ...domProps\n }: IColorFieldProps) => {\n const { clear: clearLabel, openPalette, colorCode, colorPalette } = useAuiLabels();\n const isControlled = value !== undefined;\n const [uncontrolledValue, setUncontrolledValue] = useState(defaultValue ?? '');\n const current = isControlled ? value : uncontrolledValue;\n const display = describeColorValue(current);\n const [text, setText] = useState(display.text);\n const [previewHex, setPreviewHex] = useState<string | null>(null);\n const [hue, setHue] = useState<number | undefined>(undefined);\n /** Forces a resync after blur when the parent rejected the change and `current` did not move. */\n const [settledTick, setSettledTick] = useState(0);\n const groupRef = useRef<HTMLDivElement>(null);\n const setGroupRef = useCallback(\n (node: HTMLDivElement | null) => {\n groupRef.current = node;\n\n if (typeof ref === 'function') {\n ref(node);\n\n return;\n }\n\n if (ref) ref.current = node;\n },\n [ref]\n );\n const focusedRef = useRef(false);\n const dirtyRef = useRef(false);\n const lastEmittedRef = useRef(current);\n const markedInvalid = invalid || ariaInvalid === true || ariaInvalid === 'true' || display.unrecognized;\n const swatchColor = previewHex ?? display.hex;\n const showClear = clear && !disabled && (text !== '' || Boolean(display.hex));\n\n useEffect(() => {\n lastEmittedRef.current = current;\n }, [current, settledTick]);\n\n useEffect(() => {\n if (focusedRef.current) return;\n\n const next = describeColorValue(current);\n\n setText(next.text);\n setPreviewHex(null);\n }, [current, settledTick]);\n\n const emit = (hex: string, typed?: string) => {\n dirtyRef.current = false;\n setPreviewHex(hex || null);\n setText(typed !== undefined && typed.toLowerCase() === hex ? typed : hex);\n\n if (lastEmittedRef.current === hex) return;\n\n lastEmittedRef.current = hex;\n\n if (!isControlled) setUncontrolledValue(hex);\n\n if (hex === current) return;\n\n onChange?.(hex);\n };\n\n const settle = (raw: string) => {\n if (!dirtyRef.current && raw === display.text) return;\n\n const committed = commitHexInput(raw, 'settle');\n\n dirtyRef.current = false;\n\n if (committed == null) {\n setText(display.text);\n setPreviewHex(display.hex);\n\n return;\n }\n\n emit(committed);\n };\n\n const onInputChange = (event: ChangeEvent<HTMLInputElement>) => {\n const next = event.target.value;\n\n dirtyRef.current = true;\n setText(next);\n setPreviewHex(null);\n\n const committed = commitHexInput(next, 'live');\n\n if (committed) emit(committed, next);\n };\n\n const onInputKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key !== 'Enter') return;\n\n event.preventDefault();\n event.stopPropagation();\n settle(event.currentTarget.value);\n };\n\n return (\n <div {...domProps} className={cn(styles.root, block && styles.block, className)}>\n <div\n ref={setGroupRef}\n className={colorFieldGroupVariants({ size, variant, block })}\n data-invalid={markedInvalid || undefined}\n data-disabled={disabled || undefined}\n data-test-id={dataTestId}\n >\n <DialogTrigger\n onOpenChange={open => {\n if (!open) onBlur?.();\n }}\n >\n <RacButton\n className={styles.swatch}\n aria-label={openPalette}\n isDisabled={disabled}\n data-empty={swatchColor ? undefined : true}\n data-test-id=\"color-field-trigger\"\n >\n {swatchColor ? <ColorSwatch className={styles.swatchColor} color={swatchColor} /> : null}\n </RacButton>\n <Popover className={styles.popover} placement=\"bottom start\" triggerRef={groupRef} isNonModal>\n <Dialog\n className={styles.dialog}\n aria-label={colorPalette}\n data-test-id=\"color-field-dialog\"\n >\n <ColorPicker\n value={display.hex ?? ''}\n hue={hue}\n presets={presets}\n disabled={disabled}\n onHueChange={setHue}\n onPreview={hex => {\n setPreviewHex(hex);\n setText(hex);\n }}\n onChange={emit}\n />\n </Dialog>\n </Popover>\n </DialogTrigger>\n <input\n ref={inputRef}\n id={id}\n className={styles.hex}\n aria-label={ariaLabelledby ? undefined : (ariaLabel ?? colorCode)}\n aria-labelledby={ariaLabelledby}\n aria-describedby={ariaDescribedby}\n aria-invalid={markedInvalid || undefined}\n placeholder=\"#RRGGBB\"\n spellCheck={false}\n autoComplete=\"off\"\n disabled={disabled}\n value={text}\n data-test-id=\"color-field-input\"\n onFocus={() => {\n focusedRef.current = true;\n }}\n onChange={onInputChange}\n onBlur={event => {\n focusedRef.current = false;\n settle(event.target.value);\n setSettledTick(tick => tick + 1);\n onBlur?.();\n }}\n onKeyDown={onInputKeyDown}\n />\n {showClear ? (\n <RacButton\n className={styles.clear}\n aria-label={clearLabel}\n data-test-id=\"color-field-clear\"\n excludeFromTabOrder\n onPress={() => emit('')}\n >\n <Clear className={styles.icon} />\n </RacButton>\n ) : null}\n </div>\n </div>\n );\n }\n);\n\nColorField.displayName = 'ColorField';\n","import { Field, useField } from '@/field';\nimport { useFieldHook } from '@/form/hooks/useFieldHook';\nimport { getError } from '@/form/utils';\n\nimport { ColorField } from './Component';\nimport { type IColorFieldProps, type IFormColorFieldProps } from './types';\n\ntype TFormColorFieldControlProps = Omit<IColorFieldProps, 'size' | 'invalid' | 'disabled' | 'value' | 'onChange'> & {\n value: string;\n onChange: (value: string) => void;\n};\n\nconst FormColorFieldControl = ({ value, onChange, onBlur, ...props }: TFormColorFieldControlProps) => {\n const { controlProps, size, invalid, disabled } = useField();\n\n return (\n <ColorField\n {...controlProps}\n {...props}\n size={size}\n invalid={invalid}\n disabled={disabled}\n value={value}\n onChange={onChange}\n onBlur={onBlur}\n />\n );\n};\n\nFormColorFieldControl.displayName = 'FormColorFieldControl';\n\nexport const FormColorField = ({\n name,\n label,\n hint,\n size = 'md',\n block = true,\n disabled,\n className,\n dataTestId,\n ...inputProps\n}: IFormColorFieldProps) => {\n const { field, fieldState, inputProps: rhfInputProps, onChange, onBlurHandler } = useFieldHook({ name });\n const error = getError(fieldState.error)?.message;\n const isDisabled = disabled ?? rhfInputProps.disabled;\n\n return (\n <Field\n invalid={Boolean(error)}\n disabled={isDisabled}\n size={size}\n block={block}\n className={className}\n dataTestId={dataTestId}\n >\n {label ? <Field.Label>{label}</Field.Label> : null}\n <FormColorFieldControl\n {...inputProps}\n block={block}\n inputRef={field.ref}\n value={typeof field.value === 'string' ? field.value : ''}\n onChange={next => {\n field.onChange(next);\n onChange(name, next as never);\n }}\n onBlur={() => onBlurHandler()}\n />\n {hint ? <Field.Hint>{hint}</Field.Hint> : null}\n <Field.Error>{error}</Field.Error>\n </Field>\n );\n};\n\nFormColorField.displayName = 'FormColorField';\n"],"names":["colorFieldGroupVariants","cva","styles","cn","typographyStyles","HEX_BODY","COMPLETE_CSS","commitHexInput","raw","mode","trimmed","body","red","green","blue","parsed","toHexColor","describeColorValue","value","hex","ColorField","supportRef","ref","inputRef","size","variant","block","invalid","disabled","clear","presets","defaultValue","onChange","onBlur","className","dataTestId","id","ariaLabel","ariaLabelledby","ariaDescribedby","ariaInvalid","domProps","clearLabel","openPalette","colorCode","colorPalette","useAuiLabels","isControlled","uncontrolledValue","setUncontrolledValue","useState","current","display","text","setText","previewHex","setPreviewHex","hue","setHue","settledTick","setSettledTick","groupRef","useRef","setGroupRef","useCallback","node","focusedRef","dirtyRef","lastEmittedRef","markedInvalid","swatchColor","showClear","useEffect","next","emit","typed","settle","committed","onInputChange","event","onInputKeyDown","jsx","jsxs","DialogTrigger","open","RacButton","ColorSwatch","Popover","Dialog","ColorPicker","tick","Clear","FormColorFieldControl","props","controlProps","useField","FormColorField","name","label","hint","inputProps","field","fieldState","rhfInputProps","onBlurHandler","useFieldHook","error","getError","isDisabled","Field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;GAOaA,KAA0BC,GAAIC,EAAO,OAAO;AAAA,EACrD,UAAU;AAAA,IACN,MAAM;AAAA,MACF,IAAIC,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,MACxC,IAAID,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,MACxC,IAAID,EAAGD,EAAO,IAAIE,EAAiB,KAAK;AAAA,IAAA;AAAA,IAE5C,SAAS;AAAA,MACL,SAASF,EAAO;AAAA,IAAA;AAAA,IAEpB,OAAO;AAAA,MACH,MAAMA,EAAO;AAAA,MACb,OAAO;AAAA,IAAA;AAAA,EACX;AAAA,EAEJ,iBAAiB;AAAA,IACb,MAAM;AAAA,IACN,SAAS;AAAA,IACT,OAAO;AAAA,EAAA;A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N,EAAY,aAAK,IAAgB;AAAA,QAC1C,gBAAA5B,EAAC4B,EAAM,OAAN,EAAa,UAAAH,EAAA,CAAM;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGhC;AAEAV,GAAe,cAAc;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/combobox/components/MultiTrigger/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/combobox/components/MultiTrigger/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIH,KAAK,SAAS,EAMjB,MAAM,OAAO,CAAC;AAef,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA0B9F,MAAM,WAAW,0BAA0B;IACvC,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7C,OAAO,EAAE,eAAe,EAAE,CAAC;IAC3B,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC5B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED,eAAO,MAAM,oBAAoB;mLAc9B,0BAA0B;;CAyI5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/combobox/components/Trigger/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/combobox/components/Trigger/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAKH,KAAK,SAAS,EAGjB,MAAM,OAAO,CAAC;AAef,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAQxE,eAAO,MAAM,6BAA6B,kCAAsB,CAAC;AAEjE,MAAM,WAAW,qBAAqB;IAClC,UAAU,EAAE,SAAS,CAAC,cAAc,GAAG,IAAI,CAAC,CAAC;IAC7C,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,gBAAgB,CAAC;IAC1B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,sEAAsE;IACtE,IAAI,EAAE,QAAQ,GAAG,UAAU,CAAC;IAC5B,mBAAmB;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,sCAAsC;IACtC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,eAAe;8GAWzB,qBAAqB;;CA4FvB,CAAC"}
|
package/dist/combobox/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { C as s, a as e, b as a, c as r, i as b, r as i, t as m } from "../utils-
|
|
1
|
+
import { C as s, a as e, b as a, c as r, i as b, r as i, t as m } from "../utils-C3l0oYwN.js";
|
|
2
2
|
import { C as x, r as g, u as n } from "../metrics-D4vChkd-.js";
|
|
3
|
-
import { C as c } from "../index-
|
|
4
|
-
import { C as l, a as u } from "../index-
|
|
3
|
+
import { C as c } from "../index-BVJblFhG.js";
|
|
4
|
+
import { C as l, a as u } from "../index-DtpMocgp.js";
|
|
5
5
|
export {
|
|
6
6
|
s as ComboboxItemContent,
|
|
7
7
|
e as ComboboxList,
|
package/dist/data-table/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as C, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { useContext as x, createContext as N, Children as y, isValidElement as h, useMemo as _ } from "react";
|
|
3
3
|
import { s as F } from "../index-h8z54aFR.js";
|
|
4
|
-
import { T as t } from "../Component
|
|
4
|
+
import { T as t } from "../Component-Q_eH0Y9C.js";
|
|
5
5
|
import A from "classnames";
|
|
6
6
|
import { M as P } from "../SortDescending-DziKhSYN.js";
|
|
7
7
|
import { u as R } from "../hooks-BSSTu-2y.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/date-picker/Component.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAehD,eAAO,MAAM,UAAU,0PAqBhB,gBAAgB;;
|
|
1
|
+
{"version":3,"file":"Component.d.ts","sourceRoot":"","sources":["../../../src/date-picker/Component.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAehD,eAAO,MAAM,UAAU,0PAqBhB,gBAAgB;;CA+HtB,CAAC"}
|