@namroodinc/liquid-editorial 0.6.5 → 0.6.7
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/README.md +23 -0
- package/UPGRADING.md +86 -0
- package/dist/chunks/{Avatar-C9ublbzK.cjs → Avatar-B_2lI7fS.cjs} +2 -2
- package/dist/chunks/{Avatar-C9ublbzK.cjs.map → Avatar-B_2lI7fS.cjs.map} +1 -1
- package/dist/chunks/{Avatar-BtblwihO.js → Avatar-DdFEOumt.js} +2 -2
- package/dist/chunks/{Avatar-BtblwihO.js.map → Avatar-DdFEOumt.js.map} +1 -1
- package/dist/chunks/{Board-z688-51u.js → Board-B8wK079I.js} +2 -2
- package/dist/chunks/{Board-z688-51u.js.map → Board-B8wK079I.js.map} +1 -1
- package/dist/chunks/{Board-CUt4j2-8.cjs → Board-CMf5Azt0.cjs} +2 -2
- package/dist/chunks/{Board-CUt4j2-8.cjs.map → Board-CMf5Azt0.cjs.map} +1 -1
- package/dist/chunks/{ColourField-DXGpNP08.js → ColourField-DC6cLb9h.js} +2 -2
- package/dist/chunks/{ColourField-DXGpNP08.js.map → ColourField-DC6cLb9h.js.map} +1 -1
- package/dist/chunks/{ColourField-BqhYB4ZE.cjs → ColourField-NnFxLEsh.cjs} +2 -2
- package/dist/chunks/{ColourField-BqhYB4ZE.cjs.map → ColourField-NnFxLEsh.cjs.map} +1 -1
- package/dist/chunks/EntryPicker-CR8Phuzl.js +180 -0
- package/dist/chunks/EntryPicker-CR8Phuzl.js.map +1 -0
- package/dist/chunks/EntryPicker-D7JIgx23.cjs +2 -0
- package/dist/chunks/EntryPicker-D7JIgx23.cjs.map +1 -0
- package/dist/chunks/{FormEditor-C5XtP-N7.js → FormEditor-BSfxVqLn.js} +192 -146
- package/dist/chunks/FormEditor-BSfxVqLn.js.map +1 -0
- package/dist/chunks/FormEditor-DNcSAnRF.cjs +2 -0
- package/dist/chunks/FormEditor-DNcSAnRF.cjs.map +1 -0
- package/dist/chunks/{RichTextEditor-DEJ-u-ZR.js → RichTextEditor-CNkwWist.js} +2 -2
- package/dist/chunks/{RichTextEditor-DEJ-u-ZR.js.map → RichTextEditor-CNkwWist.js.map} +1 -1
- package/dist/chunks/{RichTextEditor-Ddk7qaqg.cjs → RichTextEditor-DAnjElUO.cjs} +2 -2
- package/dist/chunks/{RichTextEditor-Ddk7qaqg.cjs.map → RichTextEditor-DAnjElUO.cjs.map} +1 -1
- package/dist/chunks/context-BONPXF-V.cjs.map +1 -1
- package/dist/chunks/context-CXvOl4Kt.js.map +1 -1
- package/dist/chunks/frame-BBVQTBcX.cjs +2 -0
- package/dist/chunks/frame-BBVQTBcX.cjs.map +1 -0
- package/dist/chunks/frame-De6IuTQz.js +189 -0
- package/dist/chunks/frame-De6IuTQz.js.map +1 -0
- package/dist/chunks/group-Bj9ZKc0R.cjs +2 -0
- package/dist/chunks/group-Bj9ZKc0R.cjs.map +1 -0
- package/dist/chunks/group-Ckz4Xya-.js +34 -0
- package/dist/chunks/group-Ckz4Xya-.js.map +1 -0
- package/dist/chunks/limit-BX6-o1a2.cjs +2 -0
- package/dist/chunks/limit-BX6-o1a2.cjs.map +1 -0
- package/dist/chunks/limit-ChteDN4T.js +18 -0
- package/dist/chunks/limit-ChteDN4T.js.map +1 -0
- package/dist/chunks/mergeRefs-C6_5pADN.js +19 -0
- package/dist/chunks/mergeRefs-C6_5pADN.js.map +1 -0
- package/dist/chunks/mergeRefs-CZ-SArlE.cjs +2 -0
- package/dist/chunks/mergeRefs-CZ-SArlE.cjs.map +1 -0
- package/dist/chunks/useLimit-BOmHKdJE.js +73 -0
- package/dist/chunks/useLimit-BOmHKdJE.js.map +1 -0
- package/dist/chunks/useLimit-DXe_VmYl.cjs +2 -0
- package/dist/chunks/useLimit-DXe_VmYl.cjs.map +1 -0
- package/dist/components/AppShell/index.cjs +1 -1
- package/dist/components/AppShell/index.js +1 -1
- package/dist/components/Avatar/index.cjs +1 -1
- package/dist/components/Avatar/index.js +1 -1
- package/dist/components/Board/index.cjs +1 -1
- package/dist/components/Board/index.js +1 -1
- package/dist/components/Choice/index.cjs +1 -1
- package/dist/components/Choice/index.js +1 -1
- package/dist/components/ColourField/index.cjs +1 -1
- package/dist/components/ColourField/index.js +1 -1
- package/dist/components/Drawer/index.cjs +1 -1
- package/dist/components/Drawer/index.js +1 -1
- package/dist/components/EditLayout/index.cjs +1 -1
- package/dist/components/EditLayout/index.js +1 -1
- package/dist/components/EntryPicker/index.cjs +1 -2
- package/dist/components/EntryPicker/index.d.cts.map +1 -1
- package/dist/components/EntryPicker/index.d.ts.map +1 -1
- package/dist/components/EntryPicker/index.js +1 -171
- package/dist/components/EntryPicker/limit.d.cts +8 -0
- package/dist/components/EntryPicker/limit.d.cts.map +1 -0
- package/dist/components/EntryPicker/limit.d.ts +8 -0
- package/dist/components/EntryPicker/limit.d.ts.map +1 -0
- package/dist/components/Field/context.d.cts +6 -0
- package/dist/components/Field/context.d.cts.map +1 -1
- package/dist/components/Field/context.d.ts +6 -0
- package/dist/components/Field/context.d.ts.map +1 -1
- package/dist/components/Field/frame.d.cts +1 -1
- package/dist/components/Field/frame.d.cts.map +1 -1
- package/dist/components/Field/frame.d.ts +1 -1
- package/dist/components/Field/frame.d.ts.map +1 -1
- package/dist/components/Field/group.d.cts +1 -1
- package/dist/components/Field/group.d.cts.map +1 -1
- package/dist/components/Field/group.d.ts +1 -1
- package/dist/components/Field/group.d.ts.map +1 -1
- package/dist/components/Field/header.d.cts +12 -0
- package/dist/components/Field/header.d.cts.map +1 -0
- package/dist/components/Field/header.d.ts +12 -0
- package/dist/components/Field/header.d.ts.map +1 -0
- package/dist/components/Field/index.cjs +1 -1
- package/dist/components/Field/index.cjs.map +1 -1
- package/dist/components/Field/index.d.cts +1 -1
- package/dist/components/Field/index.d.cts.map +1 -1
- package/dist/components/Field/index.d.ts +1 -1
- package/dist/components/Field/index.d.ts.map +1 -1
- package/dist/components/Field/index.js +1 -1
- package/dist/components/Field/index.js.map +1 -1
- package/dist/components/Field/limit-reading.d.cts +12 -0
- package/dist/components/Field/limit-reading.d.cts.map +1 -0
- package/dist/components/Field/limit-reading.d.ts +12 -0
- package/dist/components/Field/limit-reading.d.ts.map +1 -0
- package/dist/components/Field/limit.d.cts +8 -0
- package/dist/components/Field/limit.d.cts.map +1 -0
- package/dist/components/Field/limit.d.ts +8 -0
- package/dist/components/Field/limit.d.ts.map +1 -0
- package/dist/components/Field/style.css +77 -0
- package/dist/components/Field/types.d.cts +12 -1
- package/dist/components/Field/types.d.cts.map +1 -1
- package/dist/components/Field/types.d.ts +12 -1
- package/dist/components/Field/types.d.ts.map +1 -1
- package/dist/components/Field/useLimit.d.cts +18 -0
- package/dist/components/Field/useLimit.d.cts.map +1 -0
- package/dist/components/Field/useLimit.d.ts +18 -0
- package/dist/components/Field/useLimit.d.ts.map +1 -0
- package/dist/components/FormEditor/README.md +62 -0
- package/dist/components/FormEditor/control.d.cts.map +1 -1
- package/dist/components/FormEditor/control.d.ts.map +1 -1
- package/dist/components/FormEditor/index.cjs +1 -1
- package/dist/components/FormEditor/index.d.cts.map +1 -1
- package/dist/components/FormEditor/index.d.ts.map +1 -1
- package/dist/components/FormEditor/index.js +1 -1
- package/dist/components/FormEditor/model.d.cts +21 -8
- package/dist/components/FormEditor/model.d.cts.map +1 -1
- package/dist/components/FormEditor/model.d.ts +21 -8
- package/dist/components/FormEditor/model.d.ts.map +1 -1
- package/dist/components/Modal/index.cjs +1 -1
- package/dist/components/Modal/index.js +1 -1
- package/dist/components/Popover/index.cjs +1 -1
- package/dist/components/Popover/index.js +1 -1
- package/dist/components/RichTextEditor/index.cjs +1 -1
- package/dist/components/RichTextEditor/index.js +1 -1
- package/dist/components/SearchField/index.cjs +1 -1
- package/dist/components/SearchField/index.cjs.map +1 -1
- package/dist/components/SearchField/index.d.cts.map +1 -1
- package/dist/components/SearchField/index.d.ts.map +1 -1
- package/dist/components/SearchField/index.js +27 -22
- package/dist/components/SearchField/index.js.map +1 -1
- package/dist/components/SelectionCard/index.cjs +1 -1
- package/dist/components/SelectionCard/index.js +1 -1
- package/dist/components/SortableList/index.cjs +1 -1
- package/dist/components/SortableList/index.js +1 -1
- package/dist/components/TagsInput/index.cjs +1 -1
- package/dist/components/TagsInput/index.cjs.map +1 -1
- package/dist/components/TagsInput/index.d.cts.map +1 -1
- package/dist/components/TagsInput/index.d.ts.map +1 -1
- package/dist/components/TagsInput/index.js +36 -30
- package/dist/components/TagsInput/index.js.map +1 -1
- package/dist/components/TextField/index.cjs +1 -1
- package/dist/components/TextField/index.cjs.map +1 -1
- package/dist/components/TextField/index.d.cts.map +1 -1
- package/dist/components/TextField/index.d.ts.map +1 -1
- package/dist/components/TextField/index.js +35 -20
- package/dist/components/TextField/index.js.map +1 -1
- package/dist/components/Time/index.cjs +1 -1
- package/dist/components/Time/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -6
- package/dist/internal/mergeRefs.d.cts +5 -1
- package/dist/internal/mergeRefs.d.cts.map +1 -1
- package/dist/internal/mergeRefs.d.ts +5 -1
- package/dist/internal/mergeRefs.d.ts.map +1 -1
- package/package.json +1 -1
- package/dist/chunks/FormEditor-BbsvbufQ.cjs +0 -2
- package/dist/chunks/FormEditor-BbsvbufQ.cjs.map +0 -1
- package/dist/chunks/FormEditor-C5XtP-N7.js.map +0 -1
- package/dist/chunks/frame-Bs_jaQRw.js +0 -70
- package/dist/chunks/frame-Bs_jaQRw.js.map +0 -1
- package/dist/chunks/frame-CNxvbg0D.cjs +0 -2
- package/dist/chunks/frame-CNxvbg0D.cjs.map +0 -1
- package/dist/chunks/group-CzbacuAY.js +0 -29
- package/dist/chunks/group-CzbacuAY.js.map +0 -1
- package/dist/chunks/group-pKDQtq-9.cjs +0 -2
- package/dist/chunks/group-pKDQtq-9.cjs.map +0 -1
- package/dist/chunks/mergeRefs-Bc3qS0Tt.cjs +0 -2
- package/dist/chunks/mergeRefs-Bc3qS0Tt.cjs.map +0 -1
- package/dist/chunks/mergeRefs-DGM402mE.js +0 -10
- package/dist/chunks/mergeRefs-DGM402mE.js.map +0 -1
- package/dist/components/EntryPicker/index.cjs.map +0 -1
- package/dist/components/EntryPicker/index.js.map +0 -1
|
@@ -1,60 +1,66 @@
|
|
|
1
1
|
import { Button as e } from "../Button/index.js";
|
|
2
2
|
/* empty css */
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
3
|
+
import { t } from "../../chunks/useLimit-BOmHKdJE.js";
|
|
4
|
+
import { forwardRef as n, useRef as r, useState as i } from "react";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
6
|
//#region src/components/TagsInput/index.tsx
|
|
6
|
-
function
|
|
7
|
+
function s(...e) {
|
|
7
8
|
return e.filter(Boolean).join(" ");
|
|
8
9
|
}
|
|
9
|
-
var
|
|
10
|
-
let [
|
|
11
|
-
|
|
12
|
-
|
|
10
|
+
var c = n(function({ value: n, defaultValue: c = [], onValueChange: l, placeholder: u = "Add a tag", size: d = "md", max: f, isDisabled: p = !1, isInvalid: m = !1, required: h, "aria-invalid": g, className: _, ...v }, y) {
|
|
11
|
+
let [b, x] = i(c), S = n ?? b;
|
|
12
|
+
t(v, f === void 0 ? void 0 : {
|
|
13
|
+
count: S.length,
|
|
14
|
+
max: f
|
|
15
|
+
});
|
|
16
|
+
let [C, w] = i(""), T = r(null), E = (e) => {
|
|
17
|
+
n === void 0 && x(e), l?.(e);
|
|
18
|
+
}, D = (e) => {
|
|
13
19
|
let t = e.trim();
|
|
14
|
-
t && !
|
|
20
|
+
t && !S.includes(t) && (f !== void 0 && S.length >= f || E([...S, t]));
|
|
15
21
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
className:
|
|
18
|
-
"data-size":
|
|
19
|
-
"data-disabled":
|
|
20
|
-
"aria-invalid":
|
|
21
|
-
onClick: () =>
|
|
22
|
-
children: [
|
|
22
|
+
return /* @__PURE__ */ o("div", {
|
|
23
|
+
className: s("ds-field-skin", "ds-tags", _),
|
|
24
|
+
"data-size": d,
|
|
25
|
+
"data-disabled": p || void 0,
|
|
26
|
+
"aria-invalid": m || g || void 0,
|
|
27
|
+
onClick: () => T.current?.focus(),
|
|
28
|
+
children: [S.map((t) => /* @__PURE__ */ o("span", {
|
|
23
29
|
className: "ds-tags__tag",
|
|
24
|
-
children: [t, /* @__PURE__ */
|
|
30
|
+
children: [t, /* @__PURE__ */ a(e, {
|
|
25
31
|
variant: "simple",
|
|
26
32
|
size: "xs",
|
|
27
33
|
isIconOnly: !0,
|
|
28
34
|
iconStart: "x",
|
|
29
35
|
"aria-label": `Remove ${t}`,
|
|
30
|
-
isDisabled:
|
|
36
|
+
isDisabled: p,
|
|
31
37
|
onClick: (e) => {
|
|
32
|
-
e.stopPropagation(),
|
|
38
|
+
e.stopPropagation(), E(S.filter((e) => e !== t));
|
|
33
39
|
}
|
|
34
40
|
})]
|
|
35
|
-
}, t)), /* @__PURE__ */
|
|
41
|
+
}, t)), /* @__PURE__ */ a("input", {
|
|
36
42
|
ref: (e) => {
|
|
37
|
-
|
|
43
|
+
T.current = e, typeof y == "function" ? y(e) : y && (y.current = e);
|
|
38
44
|
},
|
|
39
45
|
type: "text",
|
|
40
46
|
className: "ds-tags__input",
|
|
41
|
-
value:
|
|
42
|
-
placeholder:
|
|
43
|
-
disabled:
|
|
44
|
-
"aria-invalid":
|
|
45
|
-
"aria-required":
|
|
46
|
-
onChange: (e) =>
|
|
47
|
+
value: C,
|
|
48
|
+
placeholder: S.length === 0 ? u : "",
|
|
49
|
+
disabled: p,
|
|
50
|
+
"aria-invalid": m || g || void 0,
|
|
51
|
+
"aria-required": h || void 0,
|
|
52
|
+
onChange: (e) => w(e.target.value),
|
|
47
53
|
onKeyDown: (e) => {
|
|
48
|
-
e.key === "Enter" || e.key === "," ? (e.preventDefault(),
|
|
54
|
+
e.key === "Enter" || e.key === "," ? (e.preventDefault(), D(C), w("")) : e.key === "Backspace" && C === "" && S.length > 0 && E(S.slice(0, -1));
|
|
49
55
|
},
|
|
50
56
|
onBlur: () => {
|
|
51
|
-
|
|
57
|
+
D(C), w("");
|
|
52
58
|
},
|
|
53
|
-
...
|
|
59
|
+
...v
|
|
54
60
|
})]
|
|
55
61
|
});
|
|
56
62
|
});
|
|
57
63
|
//#endregion
|
|
58
|
-
export {
|
|
64
|
+
export { c as TagsInput };
|
|
59
65
|
|
|
60
66
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["cx","parts","TagsInput","forwardRef","ariaInvalid","rest","internal","setInternal","useState","defaultValue","current","value","draft","setDraft","inputRef","useRef","commit","next","onValueChange","add","tag","raw","
|
|
1
|
+
{"version":3,"file":"index.js","names":["cx","parts","TagsInput","forwardRef","ariaInvalid","rest","internal","setInternal","useState","defaultValue","current","value","max","draft","setDraft","inputRef","useRef","commit","next","onValueChange","add","tag","raw","className","size","isDisabled","isInvalid","Button","event","item","node","ref","placeholder","required"],"sources":["../../../src/components/TagsInput/index.tsx"],"sourcesContent":["import { forwardRef, useRef, useState, type KeyboardEvent } from \"react\";\nimport { Button } from \"../Button\";\nimport type { FieldBinding, FieldSize } from \"../Field\";\nimport { useReportedLimit } from \"../Field/useLimit\";\nimport \"../Field/style.css\";\nimport \"./style.css\";\n\nfunction cx(...parts: (string | undefined | false)[]) {\n return parts.filter(Boolean).join(\" \");\n}\n\nexport interface TagsInputProps extends FieldBinding {\n value?: string[];\n defaultValue?: string[];\n onValueChange?: (value: string[]) => void;\n placeholder?: string;\n size?: FieldSize;\n /** Stop accepting new tags past this count. */\n max?: number;\n isDisabled?: boolean;\n isInvalid?: boolean;\n className?: string;\n}\n\n/**\n * Free-text keywords. Enter or comma commits a tag, Backspace on an empty\n * input removes the last one. Tags are plain strings — never status tones.\n */\nexport const TagsInput = forwardRef<HTMLInputElement, TagsInputProps>(function TagsInput(\n {\n value,\n defaultValue = [],\n onValueChange,\n placeholder = \"Add a tag\",\n size = \"md\",\n max,\n isDisabled = false,\n isInvalid = false,\n required,\n \"aria-invalid\": ariaInvalid,\n className,\n ...rest\n },\n ref,\n) {\n const [internal, setInternal] = useState<string[]>(defaultValue);\n const current = value ?? internal;\n useReportedLimit(rest, max === undefined ? undefined : { count: current.length, max });\n const [draft, setDraft] = useState(\"\");\n const inputRef = useRef<HTMLInputElement | null>(null);\n\n const commit = (next: string[]) => {\n if (value === undefined) {\n setInternal(next);\n }\n onValueChange?.(next);\n };\n\n const add = (raw: string) => {\n const tag = raw.trim();\n if (!tag || current.includes(tag)) {\n return;\n }\n if (max !== undefined && current.length >= max) {\n return;\n }\n commit([...current, tag]);\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLInputElement>) => {\n if (event.key === \"Enter\" || event.key === \",\") {\n event.preventDefault();\n add(draft);\n setDraft(\"\");\n } else if (event.key === \"Backspace\" && draft === \"\" && current.length > 0) {\n commit(current.slice(0, -1));\n }\n };\n\n return (\n <div\n className={cx(\"ds-field-skin\", \"ds-tags\", className)}\n data-size={size}\n data-disabled={isDisabled || undefined}\n aria-invalid={isInvalid || ariaInvalid || undefined}\n onClick={() => inputRef.current?.focus()}\n >\n {current.map((tag) => (\n <span\n key={tag}\n className=\"ds-tags__tag\"\n >\n {tag}\n <Button\n variant=\"simple\"\n size=\"xs\"\n isIconOnly\n iconStart=\"x\"\n aria-label={`Remove ${tag}`}\n isDisabled={isDisabled}\n onClick={(event) => {\n event.stopPropagation();\n commit(current.filter((item) => item !== tag));\n }}\n />\n </span>\n ))}\n <input\n ref={(node) => {\n inputRef.current = node;\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref) {\n ref.current = node;\n }\n }}\n type=\"text\"\n className=\"ds-tags__input\"\n value={draft}\n placeholder={current.length === 0 ? placeholder : \"\"}\n disabled={isDisabled}\n aria-invalid={isInvalid || ariaInvalid || undefined}\n aria-required={required || undefined}\n onChange={(event) => setDraft(event.target.value)}\n onKeyDown={onKeyDown}\n onBlur={() => {\n add(draft);\n setDraft(\"\");\n }}\n {...rest}\n />\n </div>\n );\n});\n"],"mappings":";;;;;;AAOA,SAASA,EAAG,GAAGC,GAAuC;CACpD,OAAOA,EAAM,OAAO,OAAO,CAAC,CAAC,KAAK,GAAG;AACvC;AAmBA,IAAaC,IAAYC,EAA6C,SACpE,EACE,UACA,kBAAe,CAAC,GAChB,kBACA,iBAAc,aACd,UAAO,MACP,QACA,gBAAa,IACb,eAAY,IACZ,aACA,gBAAgBC,GAChB,cACA,GAAGC,KAEL,GACA;CACA,IAAM,CAACC,GAAUC,KAAeC,EAAmBC,CAAY,GACzDC,IAAUC,KAASL;CACzB,EAAiBD,GAAMO,MAAQ,KAAA,IAAY,KAAA,IAAY;EAAE,OAAOF,EAAQ;EAAQ;CAAI,CAAC;CACrF,IAAM,CAACG,GAAOC,KAAYN,EAAS,EAAE,GAC/BO,IAAWC,EAAgC,IAAI,GAE/CC,KAAU,MAAmB;EAIjC,AAHIN,MAAU,KAAA,KACZJ,EAAYW,CAAI,GAElBC,IAAgBD,CAAI;CACtB,GAEME,KAAO,MAAgB;EAC3B,IAAMC,IAAMC,EAAI,KAAK;EACrB,AAAKD,KAAO,GAAQ,SAASA,CAAG,MAG5BT,MAAQ,KAAA,KAAaF,EAAQ,UAAUE,KAG3CK,EAAO,CAAC,GAAGP,GAASW,CAAG,CAAC;CAC1B;CAYA,OACE,kBAAC,OAAD;EACE,WAAWrB,EAAG,iBAAiB,WAAWuB,CAAS;EACnD,aAAWC;EACX,iBAAeC,KAAc,KAAA;EAC7B,gBAAcC,KAAatB,KAAe,KAAA;EAC1C,eAAeW,EAAS,SAAS,MAAM;EALzC,UAAA,CAOGL,EAAQ,KAAK,MACZ,kBAAC,QAAD;GAEE,WAAU;GAFZ,UAAA,CAIGW,GACD,kBAACM,GAAD;IACE,SAAQ;IACR,MAAK;IACL,YAAA;IACA,WAAU;IACV,cAAY,UAAUN;IACV;IACZ,UAAU,MAAU;KAElB,AADAO,EAAM,gBAAgB,GACtBX,EAAOP,EAAQ,QAAQ,MAASmB,MAASR,CAAG,CAAC;IAC/C;GACD,CAAA,CACG;EAhBC,GAAAA,CAgBD,CACP,GACD,kBAAC,SAAD;GACE,MAAM,MAAS;IAEb,AADA,EAAS,UAAUS,GACf,OAAOC,KAAQ,aACjBA,EAAID,CAAI,IACCC,MACT,EAAI,UAAUD;GAElB;GACA,MAAK;GACL,WAAU;GACV,OAAOjB;GACP,aAAaH,EAAQ,WAAW,IAAIsB,IAAc;GAClD,UAAUP;GACV,gBAAcC,KAAatB,KAAe,KAAA;GAC1C,iBAAe6B,KAAY,KAAA;GAC3B,WAAW,MAAUnB,EAASc,EAAM,OAAO,KAAK;GACrC,YAvDE,MAA2C;IAC5D,AAAIA,EAAM,QAAQ,WAAWA,EAAM,QAAQ,OACzCA,EAAM,eAAe,GACrBR,EAAIP,CAAK,GACTC,EAAS,EAAE,KACFc,EAAM,QAAQ,eAAef,MAAU,MAAMH,EAAQ,SAAS,KACvEO,EAAOP,EAAQ,MAAM,GAAG,EAAE,CAAC;GAE/B;GAgDM,cAAc;IAEZ,AADAU,EAAIP,CAAK,GACTC,EAAS,EAAE;GACb;GACA,GAAIT;EACL,CAAA,CACE;;AAET,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`})
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/mergeRefs-CZ-SArlE.cjs");;/* empty css */const t=require("../../chunks/useLimit-DXe_VmYl.cjs");let n=require("react"),r=require("react/jsx-runtime");var i=new Set([`text`,`search`,`url`,`tel`,`email`,`password`]),a=(0,n.forwardRef)(function({size:a=`md`,className:o,type:s=`text`,...c},l){let u=(0,n.useRef)(null),d=(0,n.useMemo)(()=>e.t(u,l),[l]);return t.n(u,i.has(s.toLowerCase())?c:{...c,maxLength:void 0}),(0,r.jsx)(`input`,{ref:d,type:s,"data-size":a,className:[`ds-field-skin`,o].filter(Boolean).join(` `),...c})}),o=(0,n.forwardRef)(function({rows:i=3,className:a,onInput:o,...s},c){let l=(0,n.useRef)(null),u=(0,n.useMemo)(()=>e.t(l,c),[c]);t.n(l,s);let d=(0,n.useCallback)(e=>{let t=e.currentTarget;t.style.height=`auto`,t.style.height=`${t.scrollHeight}px`,o?.(e)},[o]);return(0,r.jsx)(`textarea`,{ref:u,rows:i,onInput:d,className:[`ds-field-skin`,a].filter(Boolean).join(` `),...s})});exports.TextArea=o,exports.TextField=a;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":["forwardRef","useCallback","react","react_jsx_runtime","TextField","rest","size","className","TextArea","autoGrow","el","event","onInput"],"sources":["../../../src/components/TextField/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n type FormEvent,\n type InputHTMLAttributes,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport type { FieldSize } from \"../Field\";\nimport \"../Field/style.css\";\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n size?: FieldSize;\n}\n\n/** Single-line input wearing the shared field skin. */\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n { size = \"md\", className, type = \"text\", ...rest },\n ref,\n) {\n return (\n <input\n ref={
|
|
1
|
+
{"version":3,"file":"index.cjs","names":["forwardRef","useRef","useMemo","mergeRefs","useCallback","require_mergeRefs","require_useLimit","react","react_jsx_runtime","lengthLimitedTypes","TextField","rest","inputRef","mergedRef","ref","type","size","className","TextArea","textareaRef","autoGrow","el","event","onInput"],"sources":["../../../src/components/TextField/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useMemo,\n useRef,\n type FormEvent,\n type InputHTMLAttributes,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport type { FieldSize } from \"../Field\";\nimport { useTextLimit } from \"../Field/useLimit\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport \"../Field/style.css\";\n\n/** Browsers enforce maxLength only on these input types, so only they report usage. */\nconst lengthLimitedTypes = new Set([\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"]);\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n size?: FieldSize;\n}\n\n/** Single-line input wearing the shared field skin. */\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n { size = \"md\", className, type = \"text\", ...rest },\n ref,\n) {\n const inputRef = useRef<HTMLInputElement | null>(null);\n const mergedRef = useMemo(() => mergeRefs(inputRef, ref), [ref]);\n useTextLimit(\n inputRef,\n lengthLimitedTypes.has(type.toLowerCase()) ? rest : { ...rest, maxLength: undefined },\n );\n return (\n <input\n ref={mergedRef}\n type={type}\n data-size={size}\n className={[\"ds-field-skin\", className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;\n\n/** Multi-line input. Grows to its content and never scrolls. */\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(function TextArea(\n { rows = 3, className, onInput, ...rest },\n ref,\n) {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const mergedRef = useMemo(() => mergeRefs(textareaRef, ref), [ref]);\n useTextLimit(textareaRef, rest);\n const autoGrow = useCallback(\n (event: FormEvent<HTMLTextAreaElement>) => {\n const el = event.currentTarget;\n el.style.height = \"auto\";\n el.style.height = `${el.scrollHeight}px`;\n onInput?.(event as Parameters<NonNullable<typeof onInput>>[0]);\n },\n [onInput],\n );\n\n return (\n <textarea\n ref={mergedRef}\n rows={rows}\n onInput={autoGrow}\n className={[\"ds-field-skin\", className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n"],"mappings":"A,iRAeA,IAAMS,EAAqB,IAAI,IAAI,CAAC,OAAQ,SAAU,MAAO,MA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AA,CAEL,CAAC,E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../../../src/components/TextField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC5B,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,OAAO,oBAAoB,CAAC;AAK5B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACzF,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,uDAAuD;AACvD,eAAO,MAAM,SAAS,6GAmBpB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAExE,gEAAgE;AAChE,eAAO,MAAM,QAAQ,+GA0BnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/TextField/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,mBAAmB,EACxB,KAAK,sBAAsB,EAC5B,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAG1C,OAAO,oBAAoB,CAAC;AAK5B,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC;IACzF,IAAI,CAAC,EAAE,SAAS,CAAC;CAClB;AAED,uDAAuD;AACvD,eAAO,MAAM,SAAS,6GAmBpB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,sBAAsB,CAAC,mBAAmB,CAAC,CAAC;AAExE,gEAAgE;AAChE,eAAO,MAAM,QAAQ,+GA0BnB,CAAC"}
|
|
@@ -1,29 +1,44 @@
|
|
|
1
|
+
import { t as e } from "../../chunks/mergeRefs-C6_5pADN.js";
|
|
1
2
|
/* empty css */
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
3
|
+
import { n as t } from "../../chunks/useLimit-BOmHKdJE.js";
|
|
4
|
+
import { forwardRef as n, useCallback as r, useMemo as i, useRef as a } from "react";
|
|
5
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
4
6
|
//#region src/components/TextField/index.tsx
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
var s = /* @__PURE__ */ new Set([
|
|
8
|
+
"text",
|
|
9
|
+
"search",
|
|
10
|
+
"url",
|
|
11
|
+
"tel",
|
|
12
|
+
"email",
|
|
13
|
+
"password"
|
|
14
|
+
]), c = n(function({ size: n = "md", className: r, type: c = "text", ...l }, u) {
|
|
15
|
+
let d = a(null), f = i(() => e(d, u), [u]);
|
|
16
|
+
return t(d, s.has(c.toLowerCase()) ? l : {
|
|
17
|
+
...l,
|
|
18
|
+
maxLength: void 0
|
|
19
|
+
}), /* @__PURE__ */ o("input", {
|
|
20
|
+
ref: f,
|
|
21
|
+
type: c,
|
|
22
|
+
"data-size": n,
|
|
23
|
+
className: ["ds-field-skin", r].filter(Boolean).join(" "),
|
|
24
|
+
...l
|
|
12
25
|
});
|
|
13
|
-
}),
|
|
14
|
-
let
|
|
26
|
+
}), l = n(function({ rows: n = 3, className: s, onInput: c, ...l }, u) {
|
|
27
|
+
let d = a(null), f = i(() => e(d, u), [u]);
|
|
28
|
+
t(d, l);
|
|
29
|
+
let p = r((e) => {
|
|
15
30
|
let t = e.currentTarget;
|
|
16
|
-
t.style.height = "auto", t.style.height = `${t.scrollHeight}px`,
|
|
17
|
-
}, [
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
ref:
|
|
20
|
-
rows:
|
|
21
|
-
onInput:
|
|
22
|
-
className: ["ds-field-skin",
|
|
23
|
-
...
|
|
31
|
+
t.style.height = "auto", t.style.height = `${t.scrollHeight}px`, c?.(e);
|
|
32
|
+
}, [c]);
|
|
33
|
+
return /* @__PURE__ */ o("textarea", {
|
|
34
|
+
ref: f,
|
|
35
|
+
rows: n,
|
|
36
|
+
onInput: p,
|
|
37
|
+
className: ["ds-field-skin", s].filter(Boolean).join(" "),
|
|
38
|
+
...l
|
|
24
39
|
});
|
|
25
40
|
});
|
|
26
41
|
//#endregion
|
|
27
|
-
export {
|
|
42
|
+
export { l as TextArea, c as TextField };
|
|
28
43
|
|
|
29
44
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["TextField","forwardRef","rest","size","className","TextArea","autoGrow","useCallback","el","event","onInput"],"sources":["../../../src/components/TextField/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n type FormEvent,\n type InputHTMLAttributes,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport type { FieldSize } from \"../Field\";\nimport \"../Field/style.css\";\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n size?: FieldSize;\n}\n\n/** Single-line input wearing the shared field skin. */\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n { size = \"md\", className, type = \"text\", ...rest },\n ref,\n) {\n return (\n <input\n ref={
|
|
1
|
+
{"version":3,"file":"index.js","names":["mergeRefs","useTextLimit","lengthLimitedTypes","TextField","forwardRef","rest","inputRef","useRef","mergedRef","useMemo","ref","type","size","className","TextArea","textareaRef","autoGrow","useCallback","el","event","onInput"],"sources":["../../../src/components/TextField/index.tsx"],"sourcesContent":["import {\n forwardRef,\n useCallback,\n useMemo,\n useRef,\n type FormEvent,\n type InputHTMLAttributes,\n type TextareaHTMLAttributes,\n} from \"react\";\nimport type { FieldSize } from \"../Field\";\nimport { useTextLimit } from \"../Field/useLimit\";\nimport { mergeRefs } from \"../../internal/mergeRefs\";\nimport \"../Field/style.css\";\n\n/** Browsers enforce maxLength only on these input types, so only they report usage. */\nconst lengthLimitedTypes = new Set([\"text\", \"search\", \"url\", \"tel\", \"email\", \"password\"]);\n\nexport interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, \"size\"> {\n size?: FieldSize;\n}\n\n/** Single-line input wearing the shared field skin. */\nexport const TextField = forwardRef<HTMLInputElement, TextFieldProps>(function TextField(\n { size = \"md\", className, type = \"text\", ...rest },\n ref,\n) {\n const inputRef = useRef<HTMLInputElement | null>(null);\n const mergedRef = useMemo(() => mergeRefs(inputRef, ref), [ref]);\n useTextLimit(\n inputRef,\n lengthLimitedTypes.has(type.toLowerCase()) ? rest : { ...rest, maxLength: undefined },\n );\n return (\n <input\n ref={mergedRef}\n type={type}\n data-size={size}\n className={[\"ds-field-skin\", className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n\nexport type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement>;\n\n/** Multi-line input. Grows to its content and never scrolls. */\nexport const TextArea = forwardRef<HTMLTextAreaElement, TextAreaProps>(function TextArea(\n { rows = 3, className, onInput, ...rest },\n ref,\n) {\n const textareaRef = useRef<HTMLTextAreaElement | null>(null);\n const mergedRef = useMemo(() => mergeRefs(textareaRef, ref), [ref]);\n useTextLimit(textareaRef, rest);\n const autoGrow = useCallback(\n (event: FormEvent<HTMLTextAreaElement>) => {\n const el = event.currentTarget;\n el.style.height = \"auto\";\n el.style.height = `${el.scrollHeight}px`;\n onInput?.(event as Parameters<NonNullable<typeof onInput>>[0]);\n },\n [onInput],\n );\n\n return (\n <textarea\n ref={mergedRef}\n rows={rows}\n onInput={autoGrow}\n className={[\"ds-field-skin\", className].filter(Boolean).join(\" \")}\n {...rest}\n />\n );\n});\n"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
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../chunks/mergeRefs-CZ-SArlE.cjs"),t=require("../../chunks/useTooltip-bTE_a2Xn.cjs");let n=require("react"),r=require("react/jsx-runtime");function i(...e){return e.filter(Boolean).join(` `)}var a=[`Jan`,`Feb`,`Mar`,`Apr`,`May`,`Jun`,`Jul`,`Aug`,`Sep`,`Oct`,`Nov`,`Dec`],o=6e4,s=60*o,c=24*s,l=7*c;function u(e){return String(e).padStart(2,`0`)}function d(e,t={}){let{hasYear:n=!0}=t,r=`${e.getDate()} ${a[e.getMonth()]}`;return n?`${r} ${e.getFullYear()}`:r}function f(e,t={}){let{hasTimeZone:n=!0}=t,r=`${d(e)}, ${u(e.getHours())}:${u(e.getMinutes())}`;if(!n)return r;let i=new Intl.DateTimeFormat(void 0,{timeZoneName:`short`}).formatToParts(e).find(e=>e.type===`timeZoneName`)?.value;return i?`${r} ${i}`:r}function p(e,t=new Date){let n=t.getTime()-e.getTime();if(n<0)return d(e,{hasYear:e.getFullYear()!==t.getFullYear()});if(n<o)return`Just now`;if(n<s)return`${Math.floor(n/o)}m ago`;if(n<c)return`${Math.floor(n/s)}h ago`;if(n<l){let e=Math.floor(n/c);return`${e} ${e===1?`day`:`days`} ago`}return d(e,{hasYear:e.getFullYear()!==t.getFullYear()})}var m=(0,n.forwardRef)(function({value:a,format:o=`auto`,hasTooltip:s=!0,hasTimeZone:c=!0,now:l,refreshInterval:u=3e4,className:m,tabIndex:h,title:g,onMouseEnter:_,onMouseLeave:v,onFocus:y,onBlur:b,"aria-describedby":x,...S},C){let w=a instanceof Date?a:new Date(a),T=!Number.isNaN(w.getTime()),[,E]=(0,n.useState)(0);(0,n.useEffect)(()=>{if(o===`absolute`||l)return;let e=window.setInterval(()=>E(e=>e+1),u);return()=>window.clearInterval(e)},[o,l,u]);let D=T?o===`absolute`?d(w):p(w,l??new Date):``,O=T?f(w,{hasTimeZone:c}):``,k=T&&s&&D!==O,{anchorRef:A,description:j,triggerProps:M,panel:N}=t.t(k&&O,{className:`ds-time-tooltip`}),P=(0,n.useMemo)(()=>e.t(A,C),[A,C]);return T?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`time`,{ref:P,dateTime:w.toISOString(),suppressHydrationWarning:!0,className:i(`ds-time`,!k&&`ds-time--plain`,m),tabIndex:h??(k?0:void 0),"aria-describedby":[x,j].filter(Boolean).join(` `)||void 0,title:g??(k?void 0:O),...M({onMouseEnter:_,onMouseLeave:v,onFocus:y,onBlur:b}),...S,children:D}),N]}):null});exports.Time=m,exports.formatAbsoluteDate=d,exports.formatAbsoluteTime=f,exports.formatRelativeTime=p;
|
|
2
2
|
//# sourceMappingURL=index.cjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "../../chunks/mergeRefs-
|
|
1
|
+
import { t as e } from "../../chunks/mergeRefs-C6_5pADN.js";
|
|
2
2
|
import { t } from "../../chunks/useTooltip-C5gvEoYk.js";
|
|
3
3
|
import { forwardRef as n, useEffect as r, useMemo as i, useState as a } from "react";
|
|
4
4
|
import { Fragment as o, jsx as s, jsxs as c } from "react/jsx-runtime";
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./chunks/Icon-WOhlu6Rp.cjs"),t=require("./components/Button/index.cjs"),n=require("./components/Drawer/index.cjs"),r=require("./components/SideNav/index.cjs"),i=require("./components/TopNav/index.cjs"),a=require("./components/AppShell/index.cjs"),o=require("./components/ButtonGroup/index.cjs"),s=require("./components/Badge/index.cjs"),c=require("./components/Field/index.cjs"),l=require("./components/Modal/index.cjs"),u=require("./components/TextField/index.cjs"),d=require("./chunks/RichTextEditor-
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./chunks/Icon-WOhlu6Rp.cjs"),t=require("./components/Button/index.cjs"),n=require("./components/Drawer/index.cjs"),r=require("./components/SideNav/index.cjs"),i=require("./components/TopNav/index.cjs"),a=require("./components/AppShell/index.cjs"),o=require("./components/ButtonGroup/index.cjs"),s=require("./components/Badge/index.cjs"),c=require("./components/Field/index.cjs"),l=require("./components/Modal/index.cjs"),u=require("./components/TextField/index.cjs"),d=require("./chunks/RichTextEditor-DAnjElUO.cjs"),f=require("./components/Container/index.cjs"),p=require("./components/FieldAffix/index.cjs"),m=require("./components/SearchField/index.cjs"),h=require("./components/SortableList/index.cjs"),g=require("./chunks/EntryPicker-D7JIgx23.cjs"),_=require("./components/NumberField/index.cjs"),v=require("./components/Popover/index.cjs"),y=require("./components/Select/index.cjs"),b=require("./components/Switch/index.cjs"),x=require("./chunks/ColourField-NnFxLEsh.cjs"),S=require("./chunks/Slider-k8weRl34.cjs"),C=require("./chunks/DatePicker-01sor8iD.cjs"),w=require("./components/TagsInput/index.cjs"),T=require("./components/Grid/index.cjs"),E=require("./components/Choice/index.cjs"),D=require("./components/SelectionCard/index.cjs"),O=require("./chunks/FormEditor-DNcSAnRF.cjs"),k=require("./chunks/Board-CMf5Azt0.cjs"),A=require("./chunks/Avatar-B_2lI7fS.cjs"),j=require("./components/Table/index.cjs"),M=require("./components/Menu/index.cjs"),N=require("./components/Toast/index.cjs"),P=require("./components/Banner/index.cjs"),F=require("./components/Skeleton/index.cjs"),I=require("./components/SubNav/index.cjs"),L=require("./components/Stepper/index.cjs"),R=require("./components/AssetCard/index.cjs"),z=require("./components/AssetGrid/index.cjs"),B=require("./components/ImageCropper/index.cjs"),V=require("./components/Time/index.cjs"),H=require("./components/Pagination/index.cjs"),U=require("./components/EditLayout/index.cjs");exports.AppShell=a.AppShell,exports.AssetCard=R.AssetCard,exports.AssetTile=R.AssetCard,exports.AssetCardSkeleton=R.AssetCardSkeleton,exports.AssetTileSkeleton=R.AssetCardSkeleton,exports.AssetGrid=z.AssetGrid,exports.AssetGridEmpty=z.AssetGridEmpty,exports.Avatar=A.t,exports.AvatarGroup=A.n,exports.Badge=s.Badge,exports.Banner=P.Banner,exports.Board=k.t,exports.BoardCard=k.n,exports.BoardColumn=k.r,exports.Button=t.Button,exports.ButtonGroup=o.ButtonGroup,exports.Calendar=C.t,exports.Checkbox=E.Checkbox,exports.CheckboxCard=D.CheckboxCard,exports.ChoiceGroup=E.ChoiceGroup,exports.ColourField=x.t,exports.ColourPanel=x.n,exports.Container=f.Container,exports.DateField=C.n,exports.DateRangeField=C.r,exports.Drawer=n.Drawer,exports.EditLayout=U.EditLayout,exports.EntryPicker=g.t,exports.Field=c.Field,exports.FieldAffix=p.FieldAffix,exports.FormEditor=O.t,exports.Grid=T.Grid,exports.GridItem=T.GridItem,exports.Icon=e.t,exports.ImageCropper=B.ImageCropper,exports.Menu=M.Menu,exports.MenuItem=M.MenuItem,exports.MenuLabel=M.MenuLabel,exports.MenuSeparator=M.MenuSeparator,exports.Modal=l.Modal,exports.NumberField=_.NumberField,exports.NumberRangeField=_.NumberRangeField,exports.Pagination=H.Pagination,exports.Popover=v.Popover,exports.Radio=E.Radio,exports.RadioCard=D.RadioCard,exports.RangeSlider=S.t,exports.RichTextEditor=d.t,exports.SearchField=m.SearchField,exports.Select=y.Select,exports.SelectionCardGroup=D.SelectionCardGroup,exports.SideNav=r.SideNav,exports.SideNavFooter=r.SideNavFooter,exports.SideNavHeader=r.SideNavHeader,exports.SideNavItem=r.SideNavItem,exports.SideNavSection=r.SideNavSection,exports.Skeleton=F.Skeleton,exports.SkeletonText=F.SkeletonText,exports.Slider=S.n,exports.SortableList=h.SortableList,exports.SortableListItem=h.SortableListItem,exports.Stack=T.Stack,exports.Stepper=L.Stepper,exports.SubNav=I.SubNav,exports.SubNavButton=I.SubNavButton,exports.SubNavItem=I.SubNavItem,exports.Switch=b.Switch,exports.Table=j.Table,exports.TableBody=j.TableBody,exports.TableCell=j.TableCell,exports.TableEmpty=j.TableEmpty,exports.TableFrame=j.TableFrame,exports.TableHead=j.TableHead,exports.TableHeaderCell=j.TableHeaderCell,exports.TableRow=j.TableRow,exports.TableToolbar=j.TableToolbar,exports.TagsInput=w.TagsInput,exports.TextArea=u.TextArea,exports.TextField=u.TextField,exports.Time=V.Time,exports.Toast=N.Toast,exports.ToastProvider=N.ToastProvider,exports.TopNav=i.TopNav,exports.TopNavItem=i.TopNavItem,exports.cropToBlob=B.cropToBlob,exports.formatAbsoluteDate=V.formatAbsoluteDate,exports.formatAbsoluteTime=V.formatAbsoluteTime,exports.formatIsoDate=C.i,exports.formatRelativeTime=V.formatRelativeTime,exports.iconNames=e.n,exports.icons=e.r,exports.useSideNavCollapsed=r.useSideNavCollapsed,exports.useToast=N.useToast,exports.validateFormValues=O.n;
|
package/dist/index.d.cts
CHANGED
|
@@ -23,7 +23,7 @@ export type { BadgeProps, BadgeShape, BadgeAppearance, StatusTone } from "./comp
|
|
|
23
23
|
export { Avatar, AvatarGroup } from "./components/Avatar/index.cjs";
|
|
24
24
|
export type { AvatarProps, AvatarGroupProps, AvatarSize } from "./components/Avatar/index.cjs";
|
|
25
25
|
export { Field } from "./components/Field/index.cjs";
|
|
26
|
-
export type { FieldBinding, FieldProps, FieldRenderProps, FieldSize } from "./components/Field/index.cjs";
|
|
26
|
+
export type { FieldBinding, FieldLimit, FieldLimitOptions, FieldProps, FieldRenderProps, FieldSize, } from "./components/Field/index.cjs";
|
|
27
27
|
export { TextField, TextArea } from "./components/TextField/index.cjs";
|
|
28
28
|
export type { TextFieldProps, TextAreaProps } from "./components/TextField/index.cjs";
|
|
29
29
|
export { Checkbox, Radio, ChoiceGroup } from "./components/Choice/index.cjs";
|
package/dist/index.d.cts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAA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;AACvD,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EACL,IAAI,EACJ,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -23,7 +23,7 @@ export type { BadgeProps, BadgeShape, BadgeAppearance, StatusTone } from "./comp
|
|
|
23
23
|
export { Avatar, AvatarGroup } from "./components/Avatar/index.js";
|
|
24
24
|
export type { AvatarProps, AvatarGroupProps, AvatarSize } from "./components/Avatar/index.js";
|
|
25
25
|
export { Field } from "./components/Field/index.js";
|
|
26
|
-
export type { FieldBinding, FieldProps, FieldRenderProps, FieldSize } from "./components/Field/index.js";
|
|
26
|
+
export type { FieldBinding, FieldLimit, FieldLimitOptions, FieldProps, FieldRenderProps, FieldSize, } from "./components/Field/index.js";
|
|
27
27
|
export { TextField, TextArea } from "./components/TextField/index.js";
|
|
28
28
|
export type { TextFieldProps, TextAreaProps } from "./components/TextField/index.js";
|
|
29
29
|
export { Checkbox, Radio, ChoiceGroup } from "./components/Choice/index.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,YAAY,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAElF,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAEzF,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAC7D,YAAY,EACV,mBAAmB,EACnB,kBAAkB,EAClB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AACzE,YAAY,EACV,eAAe,EACf,UAAU,EACV,UAAU,EACV,SAAS,EACT,WAAW,EACX,QAAQ,EACR,UAAU,EACV,UAAU,EACV,cAAc,EACd,UAAU,EACV,cAAc,GACf,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AACnE,YAAY,EACV,UAAU,EACV,gBAAgB,EAChB,cAAc,EACd,SAAS,EACT,eAAe,GAChB,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC3E,YAAY,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAE1F,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,YAAY,EAAE,WA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,OAAO,GACR,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACpE,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AACnF,YAAY,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAE7D,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,YAAY,EAAE,gBAAgB,EAAE,SAAS,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAE7F,OAAO,EACL,IAAI,EACJ,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAE/D,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,YAAY,EAAE,YAAY,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAChG,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -9,26 +9,26 @@ import { Badge as p } from "./components/Badge/index.js";
|
|
|
9
9
|
import { Field as m } from "./components/Field/index.js";
|
|
10
10
|
import { Modal as h } from "./components/Modal/index.js";
|
|
11
11
|
import { TextArea as g, TextField as _ } from "./components/TextField/index.js";
|
|
12
|
-
import { t as v } from "./chunks/RichTextEditor-
|
|
12
|
+
import { t as v } from "./chunks/RichTextEditor-CNkwWist.js";
|
|
13
13
|
import { Container as y } from "./components/Container/index.js";
|
|
14
14
|
import { FieldAffix as b } from "./components/FieldAffix/index.js";
|
|
15
15
|
import { SearchField as x } from "./components/SearchField/index.js";
|
|
16
16
|
import { SortableList as S, SortableListItem as C } from "./components/SortableList/index.js";
|
|
17
|
-
import {
|
|
17
|
+
import { t as w } from "./chunks/EntryPicker-CR8Phuzl.js";
|
|
18
18
|
import { NumberField as T, NumberRangeField as E } from "./components/NumberField/index.js";
|
|
19
19
|
import { Popover as D } from "./components/Popover/index.js";
|
|
20
20
|
import { Select as O } from "./components/Select/index.js";
|
|
21
21
|
import { Switch as k } from "./components/Switch/index.js";
|
|
22
|
-
import { n as A, t as j } from "./chunks/ColourField-
|
|
22
|
+
import { n as A, t as j } from "./chunks/ColourField-DC6cLb9h.js";
|
|
23
23
|
import { n as M, t as N } from "./chunks/Slider-vdMFLX-H.js";
|
|
24
24
|
import { i as P, n as F, r as I, t as L } from "./chunks/DatePicker-DJAqXUDJ.js";
|
|
25
25
|
import { TagsInput as R } from "./components/TagsInput/index.js";
|
|
26
26
|
import { Grid as z, GridItem as B, Stack as V } from "./components/Grid/index.js";
|
|
27
27
|
import { Checkbox as H, ChoiceGroup as U, Radio as W } from "./components/Choice/index.js";
|
|
28
28
|
import { CheckboxCard as G, RadioCard as K, SelectionCardGroup as q } from "./components/SelectionCard/index.js";
|
|
29
|
-
import { n as J, t as ne } from "./chunks/FormEditor-
|
|
30
|
-
import { n as Y, r as X, t as Z } from "./chunks/Board-
|
|
31
|
-
import { n as re, t as ie } from "./chunks/Avatar-
|
|
29
|
+
import { n as J, t as ne } from "./chunks/FormEditor-BSfxVqLn.js";
|
|
30
|
+
import { n as Y, r as X, t as Z } from "./chunks/Board-B8wK079I.js";
|
|
31
|
+
import { n as re, t as ie } from "./chunks/Avatar-DdFEOumt.js";
|
|
32
32
|
import { Table as ae, TableBody as oe, TableCell as se, TableEmpty as ce, TableFrame as le, TableHead as ue, TableHeaderCell as de, TableRow as fe, TableToolbar as pe } from "./components/Table/index.js";
|
|
33
33
|
import { Menu as me, MenuItem as he, MenuLabel as ge, MenuSeparator as _e } from "./components/Menu/index.js";
|
|
34
34
|
import { Toast as ve, ToastProvider as ye, useToast as be } from "./components/Toast/index.js";
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { Ref, RefCallback } from "react";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Send the same node to internal and forwarded refs. The returned cleanup keeps
|
|
4
|
+
* host-ref semantics on React 19: a callback ref's own cleanup runs on detach in
|
|
5
|
+
* place of a null call. React 18 ignores it and detaches with null as before.
|
|
6
|
+
*/
|
|
3
7
|
export declare function mergeRefs<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;
|
|
4
8
|
//# sourceMappingURL=mergeRefs.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeRefs.d.cts","sourceRoot":"","sources":["../../src/internal/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"mergeRefs.d.cts","sourceRoot":"","sources":["../../src/internal/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAgB5E"}
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
import type { Ref, RefCallback } from "react";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Send the same node to internal and forwarded refs. The returned cleanup keeps
|
|
4
|
+
* host-ref semantics on React 19: a callback ref's own cleanup runs on detach in
|
|
5
|
+
* place of a null call. React 18 ignores it and detaches with null as before.
|
|
6
|
+
*/
|
|
3
7
|
export declare function mergeRefs<T>(...refs: (Ref<T> | undefined)[]): RefCallback<T>;
|
|
4
8
|
//# sourceMappingURL=mergeRefs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mergeRefs.d.ts","sourceRoot":"","sources":["../../src/internal/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C
|
|
1
|
+
{"version":3,"file":"mergeRefs.d.ts","sourceRoot":"","sources":["../../src/internal/mergeRefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,SAAS,CAAC,EAAE,GAAG,WAAW,CAAC,CAAC,CAAC,CAgB5E"}
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
const e=require("./colour-BmtxDlWF.cjs"),t=require("../components/Button/index.cjs"),n=require("../components/Field/index.cjs"),r=require("../components/TextField/index.cjs"),i=require("./RichTextEditor-Ddk7qaqg.cjs"),a=require("../components/Container/index.cjs"),o=require("../components/EntryPicker/index.cjs"),s=require("../components/NumberField/index.cjs"),c=require("../components/Select/index.cjs"),l=require("../components/Switch/index.cjs"),u=require("./ColourField-BqhYB4ZE.cjs"),d=require("./Slider-k8weRl34.cjs"),f=require("./DatePicker-01sor8iD.cjs"),p=require("../components/TagsInput/index.cjs"),m=require("../components/Choice/index.cjs"),h=require("../components/SelectionCard/index.cjs");let g=require("react"),_=require("react/jsx-runtime");var v=[`wide`,`full`],y=[`sm`,`md`,`lg`],b=new Set([`shortText`,`longText`,`richText`,`number`,`boolean`,`dateTime`,`asset`,`reference`,`select`,`slider`,`rangeSlider`,`colour`,`radioGroup`,`checkboxGroup`,`tags`,`date`,`divider`]);function x(e){let t=new Set;for(let n of e.fields){if(!n.id?.trim()||t.has(n.id))throw Error(`Form field IDs must be nonempty and unique.`);if(!b.has(n.type))throw Error(`Unsupported form field type: ${n.type}`);(n.type===`select`||n.type===`radioGroup`||n.type===`checkboxGroup`)&&w(n),(n.type===`slider`||n.type===`rangeSlider`)&&C(n),n.type!==`divider`&&S(n),t.add(n.id)}}function S(e){if(e.width!==void 0&&!y.includes(e.width))throw Error(`Field ${e.id} needs a width of sm, md or lg.`);if(e.type===`richText`&&e.expandedWidth!==void 0&&!v.includes(e.expandedWidth))throw Error(`Rich text field ${e.id} needs an expandedWidth of wide or full.`)}function C(e){let{min:t,max:n,step:r}=d.a(e);if(![t,n,r].every(Number.isFinite)||t>=n||r<=0)throw Error(`Slider field ${e.id} needs finite min < max and a positive step.`);if(e.type===`rangeSlider`&&r>d.i(n,-t))throw Error(`Range slider ${e.id} needs room for at least one step.`)}function w(e){if(!Array.isArray(e.options)){let t=e.type===`select`?`Select`:`Choice`;throw Error(`${t} field ${e.id} needs an options array.`)}if(e.type===`select`)return;let t=e.options.map(e=>e.value);if(t.some(e=>typeof e!=`string`||!e.trim())||new Set(t).size!==t.length)throw Error(`Choice field ${e.id} needs nonempty, unique option values.`)}var T={asset:{key:`assetId`,itemLabel:`asset`,itemsLabel:`assets`},reference:{key:`entryId`,itemLabel:`entry`,itemsLabel:`entries`}};function E(e){return e.type===`asset`||e.type===`reference`?e.picker?.label??e.label:e.label}function D(e){let t=T[e.type],{addLabel:n=`Choose ${E(e)}`,emptyLabel:r,itemLabel:i=t.itemLabel,itemsLabel:a=t.itemsLabel,max:o,isReorderable:s}=e.picker??{};return{addLabel:n,emptyLabel:r,itemLabel:i,itemsLabel:a,max:o,isReorderable:s}}function O(e,t){let{key:n}=T[e.type];return(Array.isArray(t)?t:t===void 0?[]:[t]).flatMap(e=>A(e,n)?[e[n]]:[])}function k(e){if(typeof e!=`string`)return;let t=/^(\d{4}-\d{2}-\d{2}T\d{2}:\d{2})(?::(\d{2})(?:\.(\d{1,3}))?)?(?:Z|\+00:00)$/.exec(e);if(!t)return;let n=`${t[1]}:${t[2]??`00`}.${(t[3]??``).padEnd(3,`0`)}Z`,r=new Date(n);if(Number.isFinite(r.getTime())&&r.toISOString()===n)return n}function A(e,t){return!!e&&typeof e==`object`&&t in e&&typeof e[t]==`string`&&e[t].trim().length>0}function j(e){return!!e.text?.trim()||e.type===`horizontalRule`||!!e.content?.some(j)}function M(e){return`${E(e)} is required.`}function N(e,t){if(typeof t!=`string`)return`Enter text.`;if(e.required&&!t.trim())return M(e);if((e.type===`shortText`||e.type===`longText`)&&e.maxLength!==void 0&&t.length>e.maxLength)return`Enter no more than ${e.maxLength} characters.`}function P(e,t){let n=i.n(t);if(n)return n;if(e.required&&!j(t))return M(e)}function F(e,t){if(typeof t!=`string`)return`Choose an available option.`;if(t===``)return e.required?M(e):void 0;if((e.type===`select`||e.type===`radioGroup`)&&e.options.length>0&&!e.options.some(e=>e.value===t))return`Choose an available option.`}function I(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function L(e,t){if(!Array.isArray(t)||!t.every(e=>typeof e==`string`&&e.trim())||new Set(t).size!==t.length)return`Enter a list of unique, nonempty text values.`;if(e.required&&!t.length)return M(e);if(e.type===`tags`&&e.max!==void 0&&t.length>e.max)return`Enter no more than ${e.max} tags.`;if(e.type===`checkboxGroup`&&e.options.length&&t.some(t=>!e.options.some(e=>e.value===t)))return`Choose available options.`}function R(e,t){if(typeof t!=`number`||!Number.isFinite(t))return`Enter a finite number.`;let{min:n,max:r}=e.type===`slider`||e.type===`rangeSlider`?d.a(e):e.type===`number`?e:{};if(n!==void 0&&t<n)return`Enter a number of at least ${n}.`;if(r!==void 0&&t>r)return`Enter a number no greater than ${r}.`}function z(e,t){if(typeof t!=`string`)return`Enter a valid calendar date (YYYY-MM-DD).`;if(!t)return e.required?M(e):void 0;if(!f.a(t))return`Enter a valid calendar date (YYYY-MM-DD).`;if(e.type===`date`){if(e.min&&t<e.min)return`Choose a date on or after ${e.min}.`;if(e.max&&t>e.max)return`Choose a date on or before ${e.max}.`}}function B(e,t){return typeof e==`number`&&Number.isFinite(e)?d.r(e,t):void 0}function V(e,t){let n=e,r=B(n?.min,t),i=B(n?.max,t);if(r===void 0&&i===void 0)return;let[a,o]=[r??t.min,i??t.max].sort((e,t)=>e-t);return{min:a,max:o}}function H(e,t){if(!t||typeof t!=`object`||Array.isArray(t))return`Enter a range.`;let n=t,r=n.min,i=n.max,a=R(e,r)??R(e,i);if(a)return a;if(r>i)return`The start must not be greater than the end.`;if(e.type===`rangeSlider`&&d.i(i,-r)<d.a(e).step)return`Keep the range endpoints at least one step apart.`}function U(t,n){return typeof n==`string`?n.trim()?e.i(n)?void 0:`Enter a valid colour.`:t.required?M(t):void 0:`Enter a valid colour.`}function W(e,t){if(e.type!==`asset`&&e.type!==`reference`)return;let{key:n,itemLabel:r,itemsLabel:i}=T[e.type];if(!e.multiple)return A(t,n)?void 0:`Choose an ${r}.`;if(!Array.isArray(t)||!t.every(e=>A(e,n)))return`Choose a list of ${i}.`;if(e.required&&t.length===0)return M(e);let a=e.picker?.max;if(a!==void 0&&t.length>a)return`Choose no more than ${a} ${D(e).itemsLabel}.`}var G={shortText:N,longText:N,richText:P,number:R,slider:R,rangeSlider:H,date:z,colour:U,radioGroup:F,checkboxGroup:L,tags:L,boolean:(e,t)=>typeof t==`boolean`?void 0:`Choose a boolean value.`,dateTime:(e,t)=>k(t)?void 0:`Enter a valid UTC date and time.`,select:F,asset:W,reference:W};function K(e,t){return t===void 0?e.required?M(e):void 0:G[e.type](e,t)}function q(e,t){return x(e),Object.fromEntries(e.fields.flatMap(e=>{if(e.type===`divider`)return[];let n=K(e,Object.hasOwn(t,e.id)?t[e.id]:void 0);return n?[[e.id,n]]:[]}))}function J({field:e,option:t,name:n,checked:r,isDisabled:i,invalid:a,onChange:o}){let s={name:n,value:t.value,checked:r,disabled:i||t.isDisabled,"aria-invalid":a,onChange:()=>{!i&&!t.isDisabled&&o()}};if(e.appearance===`card`){let n=e.type===`radioGroup`?h.RadioCard:h.CheckboxCard;return(0,_.jsx)(n,{...s,title:t.label,description:t.description})}let c=e.type===`radioGroup`?m.Radio:m.Checkbox;return(0,_.jsx)(c,{...s,children:(0,_.jsxs)(`span`,{children:[t.label,t.description&&(0,_.jsx)(`span`,{className:`ds-form-editor__option-description`,children:t.description})]})})}function Y({field:e,stored:n,isDisabled:r,required:i,accessibility:a,onChange:o}){let s=e.type===`checkboxGroup`,c=s?I(n):typeof n==`string`&&n?[n]:[],l=e.appearance===`card`?h.SelectionCardGroup:m.ChoiceGroup;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(l,{...a,label:e.label,columns:e.columns??(e.appearance===`card`?2:1),children:e.options.map(t=>(0,_.jsx)(J,{field:e,option:t,name:a.id,checked:c.includes(t.value),isDisabled:r,invalid:a[`aria-invalid`],onChange:()=>{o(s?c.includes(t.value)?c.filter(e=>e!==t.value):[...c,t.value]:t.value)}},t.value))}),!s&&!i&&c.length>0&&(0,_.jsxs)(t.Button,{variant:`simple`,size:`sm`,isDisabled:r,onClick:()=>o(void 0),children:[`Clear `,e.label]})]})}function X({field:e,stored:t,isDisabled:n,accessibility:r,onChange:i}){let a=d.a(e),o=B(t,a);return(0,_.jsx)(d.n,{...r,...a,prefix:e.prefix,suffix:e.suffix,hasValueLabel:e.hasValueLabel,valueText:o===void 0?e.placeholder??`Not set`:void 0,autoFocus:e.autoFocus,isDisabled:n,value:o??a.min,onValueChange:i,onValueCommit:e=>{o===void 0&&i(e)}})}function Z({field:e,stored:t,isDisabled:n,accessibility:r,onChange:i}){let a=d.a(e),o=V(t,a);return(0,_.jsx)(d.t,{...r,...a,prefix:e.prefix,suffix:e.suffix,hasValueLabel:e.hasValueLabel,minLabel:`${e.label} minimum`,maxLabel:`${e.label} maximum`,isDisabled:n,valueText:o===void 0?e.placeholder??`Not set`:void 0,hasFill:o!==void 0,value:o??{min:a.min,max:a.max},onValueChange:i,onValueCommit:e=>{o===void 0&&i(e)}})}function Q({field:t,stored:n,isDisabled:r,required:i,accessibility:a,onChange:o}){let s={stored:n,isDisabled:r,required:i,accessibility:a,onChange:o};switch(t.type){case`radioGroup`:case`checkboxGroup`:return(0,_.jsx)(Y,{field:t,...s});case`rangeSlider`:return(0,_.jsx)(Z,{field:t,...s});case`slider`:return(0,_.jsx)(X,{field:t,...s});case`colour`:return(0,_.jsx)(u.t,{...a,required:i,placeholder:t.placeholder,presets:t.presets,showPresets:t.showPresets,picker:t.picker,placement:t.placement,readOnly:t.readOnly,autoFocus:t.autoFocus,isDisabled:r,value:typeof n==`string`?n:``,onInput:t=>{let n=t.currentTarget.value;n.trim()&&!e.i(n)&&o(n)},onValueChange:e=>o(e===``?void 0:e)});case`tags`:return(0,_.jsx)(p.TagsInput,{...a,required:i,placeholder:t.placeholder,max:t.max,isDisabled:r,value:I(n),onValueChange:o});case`date`:return(0,_.jsx)(f.n,{...a,placeholder:t.placeholder,min:t.min,max:t.max,placement:t.placement,isDisabled:r,isClearable:!0,clearLabel:`Clear ${t.label}`,value:typeof n==`string`?n:``,onValueChange:e=>o(e===``?void 0:e)})}}function $(e,t){if(e.type===`asset`){let n=t.map(e=>({assetId:e}));return e.multiple?n:n[0]}let n=t.map(e=>({entryId:e}));return e.multiple?n:n[0]}function ee({field:e,stored:t,isDisabled:n,required:r,accessibility:i,onChange:a}){return(0,_.jsx)(s.NumberField,{...i,required:r,isDisabled:n,placeholder:e.placeholder,min:e.min,max:e.max,step:e.step??`any`,hasSteppers:e.hasSteppers??!1,prefix:e.prefix,suffix:e.suffix,autoFocus:e.autoFocus,decreaseLabel:`Decrease ${e.label}`,increaseLabel:`Increase ${e.label}`,value:typeof t==`number`&&Number.isFinite(t)?t:``,onValueChange:e=>{(e===``||Number.isFinite(e))&&a(e===``?void 0:e)}})}function te({field:e,stored:t,isDisabled:n,required:r,accessibility:i,onChange:a}){let o=!r&&!e.options.some(e=>e.value===``);return(0,_.jsx)(c.Select,{...i,"aria-required":r||void 0,isDisabled:n,isInvalid:i[`aria-invalid`],options:o?[{value:``,label:e.placeholder??`None`},...e.options]:e.options,placeholder:e.placeholder,autoFocus:e.autoFocus,value:typeof t==`string`?t:``,onValueChange:e=>a(e===``?void 0:e)})}function ne({field:e,selected:t,items:n,isDisabled:r,accessibility:i,onChange:a}){return(0,_.jsx)(o.EntryPicker,{...i,items:n,value:t,...D(e),mode:e.multiple?`multiple`:`single`,isDisabled:r,onValueChange:t=>a($(e,t))})}function re({field:e,stored:t,selected:n,items:a,isDisabled:o,accessibility:{required:s,...c},onChange:u}){let d={stored:t,isDisabled:o,required:s,accessibility:c,onChange:u};switch(e.type){case`shortText`:return(0,_.jsx)(r.TextField,{...c,required:s,disabled:o,placeholder:e.placeholder,type:e.inputType,maxLength:e.maxLength,readOnly:e.readOnly,autoFocus:e.autoFocus,value:typeof t==`string`?t:``,onChange:e=>u(e.target.value)});case`longText`:return(0,_.jsx)(r.TextArea,{...c,required:s,disabled:o,placeholder:e.placeholder,rows:e.rows,maxLength:e.maxLength,readOnly:e.readOnly,autoFocus:e.autoFocus,value:typeof t==`string`?t:``,onChange:e=>u(e.target.value)});case`number`:return(0,_.jsx)(ee,{field:e,...d});case`boolean`:return(0,_.jsx)(l.Switch,{...c,isDisabled:o,autoFocus:e.autoFocus,isSelected:t===!0,onSelectedChange:u});case`dateTime`:return(0,_.jsx)(r.TextField,{...c,required:s,disabled:o,type:`datetime-local`,step:`0.001`,autoFocus:e.autoFocus,value:k(t)?.slice(0,-1)??``,onChange:e=>u(k(`${e.target.value}Z`))});case`richText`:return(0,_.jsx)(i.t,{...c,expandedWidth:e.expandedWidth,label:e.label,isRequired:s,isDisabled:o,placeholder:e.placeholder,format:`json`,value:t===void 0?i.r:t,onChange:u});case`select`:return(0,_.jsx)(te,{field:e,...d});case`asset`:case`reference`:return(0,_.jsx)(ne,{field:e,items:a,selected:n??[],...d});default:return(0,_.jsx)(Q,{field:e,...d})}}function ie({field:e,stored:t,items:r,isDisabled:i,error:o,isErrorVisible:s,onChange:c}){let l=(0,g.useMemo)(()=>o===void 0&&s?K(e,t):void 0,[o,s,e,t]),u=(0,g.useMemo)(()=>e.type===`asset`||e.type===`reference`?O(e,t):void 0,[e,t]);return(0,_.jsx)(a.Container,{width:e.width,padded:!1,center:!1,className:`ds-form-editor__field`,children:(0,_.jsx)(n.Field,{label:e.type===`dateTime`?`${e.label} (UTC)`:E(e),hint:e.hint,error:o??l,isRequired:e.required,count:u?.length??(e.type===`checkboxGroup`?I(t).length:void 0),isGroup:u!==void 0||ae.has(e.type),children:n=>(0,_.jsx)(re,{field:e,stored:t,selected:u,items:r,isDisabled:i,accessibility:n,onChange:c})})})}var ae=new Set([`radioGroup`,`checkboxGroup`,`rangeSlider`]),oe=new Set([`slider`,`rangeSlider`,`date`,`colour`]);function se({schema:e,value:t,defaultValue:n={},onValueChange:r,pickerItems:i={},errors:a={},isDisabled:o=!1,showAllErrors:s=!1,columns:c=1,minColumnWidth:l=`16rem`,className:u,style:d,...f}){let[p,m]=(0,g.useState)(n),[h,v]=(0,g.useState)(()=>new Set),y=t??p;(0,g.useMemo)(()=>x(e),[e]);let b=(e,n)=>{let i={...y};n===void 0?delete i[e]:i[e]=n,t===void 0&&m(i),v(t=>new Set(t).add(e)),r?.(i,{fieldId:e})},S=c===`auto`?{"--form-editor-min-column":l}:{"--form-editor-columns":c,"--form-editor-min-column":l};return(0,_.jsx)(`div`,{className:[`ds-form-editor`,c===`auto`&&`ds-form-editor--auto`,u].filter(Boolean).join(` `),style:{...S,...d},...f,children:e.fields.map(e=>{if(e.type===`divider`)return(0,_.jsx)(`hr`,{className:`ds-form-editor__divider`},e.id);let t=Object.hasOwn(y,e.id)?y[e.id]:void 0,n=o||!!e.isDisabled,r=n||`readOnly`in e&&!!e.readOnly,c=typeof t==`string`?t.trim()!==``:t!==void 0,l=s||h.has(e.id)||c&&oe.has(e.type)||e.type===`number`&&typeof t==`number`;return(0,_.jsx)(ie,{field:e,stored:t,items:i[e.id]??[],isDisabled:n,error:a[e.id],isErrorVisible:l,onChange:t=>{r||b(e.id,t)}},e.id)})})}Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return q}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return se}});
|
|
2
|
-
//# sourceMappingURL=FormEditor-BbsvbufQ.cjs.map
|