@kanzo-tech/ui 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/composites/language-picker.d.ts +44 -0
- package/dist/composites/language-picker.d.ts.map +1 -0
- package/dist/composites/language-picker.js +163 -0
- package/dist/composites/language-picker.js.map +1 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +686 -677
- package/dist/index.js.map +1 -1
- package/dist/lib/use-async-collection.d.ts +57 -0
- package/dist/lib/use-async-collection.d.ts.map +1 -0
- package/dist/lib/use-async-collection.js +43 -0
- package/dist/lib/use-async-collection.js.map +1 -0
- package/dist/lib/use-debounced-commit.d.ts +28 -0
- package/dist/lib/use-debounced-commit.d.ts.map +1 -0
- package/dist/lib/use-debounced-commit.js +26 -0
- package/dist/lib/use-debounced-commit.js.map +1 -0
- package/dist/shark-parity.divergences.d.ts.map +1 -1
- package/dist/simples/date-picker.d.ts.map +1 -1
- package/dist/simples/date-picker.js +66 -60
- package/dist/simples/date-picker.js.map +1 -1
- package/dist/simples/field.d.ts +35 -2
- package/dist/simples/field.d.ts.map +1 -1
- package/dist/simples/field.js +146 -116
- package/dist/simples/field.js.map +1 -1
- package/dist/simples/locale.d.ts +4 -0
- package/dist/simples/locale.d.ts.map +1 -0
- package/dist/simples/locale.js +8 -0
- package/dist/simples/locale.js.map +1 -0
- package/dist/simples/segment-group.d.ts.map +1 -1
- package/dist/simples/segment-group.js +67 -61
- package/dist/simples/segment-group.js.map +1 -1
- package/package.json +5 -5
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/** The words this control draws, for a product that is not in English. */
|
|
2
|
+
export interface LanguagePickerTranslations {
|
|
3
|
+
placeholder: string;
|
|
4
|
+
filterPlaceholder: string;
|
|
5
|
+
noMatches: string;
|
|
6
|
+
}
|
|
7
|
+
export interface LanguagePickerProps {
|
|
8
|
+
/** A BCP 47 tag, or `""` for none. */
|
|
9
|
+
value: string;
|
|
10
|
+
/** Called with the tag picked or typed, canonically spelled: `es-mx` arrives as `es-MX`. */
|
|
11
|
+
onValueChange: (tag: string) => void;
|
|
12
|
+
/**
|
|
13
|
+
* The tags on offer. When given, the list is exactly these and a tag outside it cannot be
|
|
14
|
+
* entered; when omitted, a broad default set is offered and any well-formed tag can be typed.
|
|
15
|
+
*/
|
|
16
|
+
languages?: readonly string[];
|
|
17
|
+
/**
|
|
18
|
+
* Draw only the input, for a slot inside another field's control — the trailing addon of a text
|
|
19
|
+
* input — rather than a bordered control of its own.
|
|
20
|
+
*/
|
|
21
|
+
inline?: boolean;
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
readOnly?: boolean;
|
|
24
|
+
invalid?: boolean;
|
|
25
|
+
className?: string;
|
|
26
|
+
"aria-label"?: string;
|
|
27
|
+
translations?: Partial<LanguagePickerTranslations>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* A searchable picker for BCP 47 language tags — the `lang` of a string, a page or a document.
|
|
31
|
+
*
|
|
32
|
+
* Each row shows the language's name in its own language beside its tag, "Español · es", and the
|
|
33
|
+
* search matches either, so "spa", "es" and "español" all find it. With `languages` the list is a
|
|
34
|
+
* closed set and an input that matches nothing reverts on blur; without it the list is a set of
|
|
35
|
+
* suggestions, and a well-formed tag nobody listed stands.
|
|
36
|
+
*
|
|
37
|
+
* The list, the roving focus and the popover are `Combobox`'s; what this owns is the vocabulary —
|
|
38
|
+
* the names, the default set and what counts as a tag.
|
|
39
|
+
*
|
|
40
|
+
* ARIA: a `combobox` with a `listbox` popup, as `Combobox` is. Give it an `aria-label` when there
|
|
41
|
+
* is no `FieldLabel` around it.
|
|
42
|
+
*/
|
|
43
|
+
export declare const LanguagePicker: (props: LanguagePickerProps) => import("react").JSX.Element;
|
|
44
|
+
//# sourceMappingURL=language-picker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-picker.d.ts","sourceRoot":"","sources":["../../src/composites/language-picker.tsx"],"names":[],"mappings":"AAwEA,0EAA0E;AAC1E,MAAM,WAAW,0BAA0B;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAQD,MAAM,WAAW,mBAAmB;IAClC,sCAAsC;IACtC,KAAK,EAAE,MAAM,CAAC;IACd,4FAA4F;IAC5F,aAAa,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC;;;OAGG;IACH,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,YAAY,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;CACpD;AAED;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,cAAc,GAAI,OAAO,mBAAmB,gCAkGxD,CAAC"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
3
|
+
import { createListCollection as M } from "@ark-ui/react/collection";
|
|
4
|
+
import { useFilter as S } from "@ark-ui/react/locale";
|
|
5
|
+
import { useState as T, useId as P, useMemo as b } from "react";
|
|
6
|
+
import { tv as j } from "tailwind-variants";
|
|
7
|
+
import { cn as A } from "../lib/cn.js";
|
|
8
|
+
import { Combobox as E, ComboboxControl as F, ComboboxFieldInput as G, ComboboxInput as O, ComboboxContent as q, ComboboxEmpty as B, ComboboxItem as U } from "../simples/combobox.js";
|
|
9
|
+
const $ = [
|
|
10
|
+
"en",
|
|
11
|
+
"es",
|
|
12
|
+
"fr",
|
|
13
|
+
"de",
|
|
14
|
+
"it",
|
|
15
|
+
"pt",
|
|
16
|
+
"nl",
|
|
17
|
+
"ca",
|
|
18
|
+
"gl",
|
|
19
|
+
"eu",
|
|
20
|
+
"ast",
|
|
21
|
+
"oc",
|
|
22
|
+
"ga",
|
|
23
|
+
"cy",
|
|
24
|
+
"sv",
|
|
25
|
+
"da",
|
|
26
|
+
"nb",
|
|
27
|
+
"nn",
|
|
28
|
+
"fi",
|
|
29
|
+
"is",
|
|
30
|
+
"pl",
|
|
31
|
+
"cs",
|
|
32
|
+
"sk",
|
|
33
|
+
"sl",
|
|
34
|
+
"hr",
|
|
35
|
+
"sr",
|
|
36
|
+
"bg",
|
|
37
|
+
"ro",
|
|
38
|
+
"hu",
|
|
39
|
+
"el",
|
|
40
|
+
"tr",
|
|
41
|
+
"ru",
|
|
42
|
+
"uk",
|
|
43
|
+
"ar",
|
|
44
|
+
"he",
|
|
45
|
+
"fa",
|
|
46
|
+
"hi",
|
|
47
|
+
"bn",
|
|
48
|
+
"ur",
|
|
49
|
+
"zh",
|
|
50
|
+
"ja",
|
|
51
|
+
"ko",
|
|
52
|
+
"th",
|
|
53
|
+
"vi",
|
|
54
|
+
"id",
|
|
55
|
+
"ms",
|
|
56
|
+
"sw",
|
|
57
|
+
"af"
|
|
58
|
+
];
|
|
59
|
+
function z(o) {
|
|
60
|
+
try {
|
|
61
|
+
const t = o.split("-")[0] ?? o, r = new Intl.DisplayNames([o], { type: "language" }).of(t);
|
|
62
|
+
return !r || r.toLowerCase() === t.toLowerCase() ? o : r.charAt(0).toLocaleUpperCase(o) + r.slice(1);
|
|
63
|
+
} catch {
|
|
64
|
+
return o;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
function D(o) {
|
|
68
|
+
try {
|
|
69
|
+
return Intl.getCanonicalLocales(o.trim())[0] ?? null;
|
|
70
|
+
} catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const H = j({
|
|
75
|
+
variants: {
|
|
76
|
+
// A slot inside another field's control — a trailing addon of a text input — is not a control of
|
|
77
|
+
// its own, so it draws no box, no ring and no chevron of its own: the field around it does.
|
|
78
|
+
inline: {
|
|
79
|
+
true: "w-24 min-w-0 border-0 bg-transparent text-inherit outline-none [font:inherit]"
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}), Q = {
|
|
83
|
+
placeholder: "Search or type a tag…",
|
|
84
|
+
filterPlaceholder: "Filter…",
|
|
85
|
+
noMatches: "No matches"
|
|
86
|
+
}, Z = (o) => {
|
|
87
|
+
const {
|
|
88
|
+
value: t,
|
|
89
|
+
onValueChange: r,
|
|
90
|
+
languages: n,
|
|
91
|
+
inline: c = !1,
|
|
92
|
+
disabled: x,
|
|
93
|
+
readOnly: v,
|
|
94
|
+
invalid: I,
|
|
95
|
+
className: f,
|
|
96
|
+
translations: w,
|
|
97
|
+
"aria-label": L
|
|
98
|
+
} = o, m = { ...Q, ...w }, l = !!(n != null && n.length), { contains: u } = S({ sensitivity: "base" }), [d, N] = T(""), V = P(), h = b(
|
|
99
|
+
() => (n != null && n.length ? n : $).map((e) => ({ code: e, name: z(e) })),
|
|
100
|
+
[n]
|
|
101
|
+
), C = b(() => {
|
|
102
|
+
const e = d.trim(), i = e ? h.filter((a) => u(a.code, e) || u(a.name, e)) : h;
|
|
103
|
+
return M({
|
|
104
|
+
items: i,
|
|
105
|
+
itemToValue: (a) => a.code,
|
|
106
|
+
itemToString: (a) => `${a.name} · ${a.code}`
|
|
107
|
+
});
|
|
108
|
+
}, [h, d, u]), k = b(() => t ? [t] : [], [t]), y = l ? m.filterPlaceholder : m.placeholder, g = () => {
|
|
109
|
+
const e = l ? null : D(d);
|
|
110
|
+
e && e !== t && r(e);
|
|
111
|
+
};
|
|
112
|
+
return /* @__PURE__ */ p(
|
|
113
|
+
E,
|
|
114
|
+
{
|
|
115
|
+
"aria-label": L,
|
|
116
|
+
allowCustomValue: !l,
|
|
117
|
+
collection: C,
|
|
118
|
+
disabled: x,
|
|
119
|
+
ids: c ? { input: V } : void 0,
|
|
120
|
+
invalid: I,
|
|
121
|
+
onInputValueChange: (e) => N(e.inputValue),
|
|
122
|
+
onValueChange: (e) => {
|
|
123
|
+
const i = e.value[0];
|
|
124
|
+
i && r(i);
|
|
125
|
+
},
|
|
126
|
+
readOnly: v,
|
|
127
|
+
value: k,
|
|
128
|
+
children: [
|
|
129
|
+
c ? (
|
|
130
|
+
// `ComboboxControl` stays because the popover positions against it.
|
|
131
|
+
/* @__PURE__ */ s(F, { children: /* @__PURE__ */ s(
|
|
132
|
+
G,
|
|
133
|
+
{
|
|
134
|
+
className: A(H({ inline: c }), f),
|
|
135
|
+
onBlur: g,
|
|
136
|
+
placeholder: y
|
|
137
|
+
}
|
|
138
|
+
) })
|
|
139
|
+
) : /* @__PURE__ */ s(
|
|
140
|
+
O,
|
|
141
|
+
{
|
|
142
|
+
className: f,
|
|
143
|
+
onBlur: g,
|
|
144
|
+
placeholder: y,
|
|
145
|
+
showTrigger: l
|
|
146
|
+
}
|
|
147
|
+
),
|
|
148
|
+
/* @__PURE__ */ p(q, { children: [
|
|
149
|
+
/* @__PURE__ */ s(B, { children: m.noMatches }),
|
|
150
|
+
C.items.map((e) => /* @__PURE__ */ p(U, { item: e, children: [
|
|
151
|
+
e.name,
|
|
152
|
+
" · ",
|
|
153
|
+
e.code
|
|
154
|
+
] }, e.code))
|
|
155
|
+
] })
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
);
|
|
159
|
+
};
|
|
160
|
+
export {
|
|
161
|
+
Z as LanguagePicker
|
|
162
|
+
};
|
|
163
|
+
//# sourceMappingURL=language-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"language-picker.js","sources":["../../src/composites/language-picker.tsx"],"sourcesContent":["\"use client\";\n\nimport { createListCollection } from \"@ark-ui/react/collection\";\nimport { useFilter } from \"@ark-ui/react/locale\";\nimport { useId, useMemo, useState } from \"react\";\nimport { tv } from \"tailwind-variants\";\nimport { cn } from \"../lib/cn\";\nimport {\n Combobox,\n ComboboxContent,\n ComboboxControl,\n ComboboxEmpty,\n ComboboxFieldInput,\n ComboboxInput,\n ComboboxItem,\n} from \"../simples/combobox\";\n\n/**\n * A broad default set of language subtags, offered when the host does not pin `languages`. The\n * search filters it, so its length is not a cost.\n */\nconst COMMON_LANGUAGES = [\n \"en\", \"es\", \"fr\", \"de\", \"it\", \"pt\", \"nl\", \"ca\", \"gl\", \"eu\", \"ast\", \"oc\",\n \"ga\", \"cy\", \"sv\", \"da\", \"nb\", \"nn\", \"fi\", \"is\", \"pl\", \"cs\", \"sk\", \"sl\",\n \"hr\", \"sr\", \"bg\", \"ro\", \"hu\", \"el\", \"tr\", \"ru\", \"uk\", \"ar\", \"he\", \"fa\",\n \"hi\", \"bn\", \"ur\", \"zh\", \"ja\", \"ko\", \"th\", \"vi\", \"id\", \"ms\", \"sw\", \"af\",\n] as const;\n\n/**\n * The language's name in its own language, `es` → \"Español\", so a reader recognises theirs\n * without knowing its code. Falls back to the tag when the runtime cannot name it, which is also\n * what `Intl.DisplayNames` reports by echoing the code back.\n */\nfunction endonym(tag: string): string {\n try {\n const base = tag.split(\"-\")[0] ?? tag;\n const name = new Intl.DisplayNames([tag], { type: \"language\" }).of(base);\n if (!name || name.toLowerCase() === base.toLowerCase()) return tag;\n return name.charAt(0).toLocaleUpperCase(tag) + name.slice(1);\n } catch {\n return tag;\n }\n}\n\n/**\n * The canonical spelling of a well-formed BCP 47 tag (`ES-mx` → `es-MX`), or `null` when the\n * string is not one. The runtime is the parser: a hand-written pattern accepts what the grammar\n * refuses and refuses what it accepts.\n */\nfunction canonicalTag(text: string): string | null {\n try {\n return Intl.getCanonicalLocales(text.trim())[0] ?? null;\n } catch {\n return null;\n }\n}\n\ninterface Language {\n code: string;\n name: string;\n}\n\nconst languagePickerInputVariants = tv({\n variants: {\n // A slot inside another field's control — a trailing addon of a text input — is not a control of\n // its own, so it draws no box, no ring and no chevron of its own: the field around it does.\n inline: {\n true: \"w-24 min-w-0 border-0 bg-transparent text-inherit outline-none [font:inherit]\",\n },\n },\n});\n\n/** The words this control draws, for a product that is not in English. */\nexport interface LanguagePickerTranslations {\n placeholder: string;\n filterPlaceholder: string;\n noMatches: string;\n}\n\nconst ENGLISH: LanguagePickerTranslations = {\n placeholder: \"Search or type a tag…\",\n filterPlaceholder: \"Filter…\",\n noMatches: \"No matches\",\n};\n\nexport interface LanguagePickerProps {\n /** A BCP 47 tag, or `\"\"` for none. */\n value: string;\n /** Called with the tag picked or typed, canonically spelled: `es-mx` arrives as `es-MX`. */\n onValueChange: (tag: string) => void;\n /**\n * The tags on offer. When given, the list is exactly these and a tag outside it cannot be\n * entered; when omitted, a broad default set is offered and any well-formed tag can be typed.\n */\n languages?: readonly string[];\n /**\n * Draw only the input, for a slot inside another field's control — the trailing addon of a text\n * input — rather than a bordered control of its own.\n */\n inline?: boolean;\n disabled?: boolean;\n readOnly?: boolean;\n invalid?: boolean;\n className?: string;\n \"aria-label\"?: string;\n translations?: Partial<LanguagePickerTranslations>;\n}\n\n/**\n * A searchable picker for BCP 47 language tags — the `lang` of a string, a page or a document.\n *\n * Each row shows the language's name in its own language beside its tag, \"Español · es\", and the\n * search matches either, so \"spa\", \"es\" and \"español\" all find it. With `languages` the list is a\n * closed set and an input that matches nothing reverts on blur; without it the list is a set of\n * suggestions, and a well-formed tag nobody listed stands.\n *\n * The list, the roving focus and the popover are `Combobox`'s; what this owns is the vocabulary —\n * the names, the default set and what counts as a tag.\n *\n * ARIA: a `combobox` with a `listbox` popup, as `Combobox` is. Give it an `aria-label` when there\n * is no `FieldLabel` around it.\n */\nexport const LanguagePicker = (props: LanguagePickerProps) => {\n const {\n value,\n onValueChange,\n languages,\n inline = false,\n disabled,\n readOnly,\n invalid,\n className,\n translations,\n \"aria-label\": ariaLabel,\n } = props;\n\n const t = { ...ENGLISH, ...translations };\n const constrained = !!languages?.length;\n const { contains } = useFilter({ sensitivity: \"base\" });\n const [query, setQuery] = useState(\"\");\n // Inside a `Field` the machine takes its input id from the field, which is right for the\n // field's own control and wrong for a second control in the same field: the text input has\n // already claimed it, and two elements would share it.\n const inputId = useId();\n\n const items = useMemo<Language[]>(\n () => (languages?.length ? languages : COMMON_LANGUAGES).map((code) => ({ code, name: endonym(code) })),\n [languages]\n );\n\n // Filtering is ours to own — the machine never mutates a collection. Both the tag and the name\n // match.\n const collection = useMemo(() => {\n const q = query.trim();\n const shown = q ? items.filter((i) => contains(i.code, q) || contains(i.name, q)) : items;\n return createListCollection({\n items: shown,\n itemToValue: (i) => i.code,\n itemToString: (i) => `${i.name} · ${i.code}`,\n });\n }, [items, query, contains]);\n\n // Memoised because the machine compares by identity: a fresh array per render reads as a value\n // change on every keystroke and resets the text being typed.\n const selected = useMemo(() => (value ? [value] : []), [value]);\n\n const placeholder = constrained ? t.filterPlaceholder : t.placeholder;\n\n // A typed tag is committed when the input is left, not per keystroke: \"es\" is a tag on the way to\n // \"es-MX\", and committing it there makes the machine swap the text for the name of the language\n // the user was still spelling. A pick has already been reported by `onValueChange`.\n const commitTyped = () => {\n const tag = constrained ? null : canonicalTag(query);\n if (tag && tag !== value) onValueChange(tag);\n };\n\n return (\n <Combobox\n aria-label={ariaLabel}\n // A tag the host did not list is only admissible when the host listed none.\n allowCustomValue={!constrained}\n collection={collection}\n disabled={disabled}\n ids={inline ? { input: inputId } : undefined}\n invalid={invalid}\n onInputValueChange={(details) => setQuery(details.inputValue)}\n onValueChange={(details) => {\n const picked = details.value[0];\n if (picked) onValueChange(picked);\n }}\n readOnly={readOnly}\n value={selected}\n >\n {inline ? (\n // `ComboboxControl` stays because the popover positions against it.\n <ComboboxControl>\n <ComboboxFieldInput\n className={cn(languagePickerInputVariants({ inline }), className)}\n onBlur={commitTyped}\n placeholder={placeholder}\n />\n </ComboboxControl>\n ) : (\n <ComboboxInput\n className={className}\n onBlur={commitTyped}\n placeholder={placeholder}\n showTrigger={constrained}\n />\n )}\n <ComboboxContent>\n <ComboboxEmpty>{t.noMatches}</ComboboxEmpty>\n {collection.items.map((item) => (\n <ComboboxItem item={item} key={item.code}>\n {item.name} · {item.code}\n </ComboboxItem>\n ))}\n </ComboboxContent>\n </Combobox>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AAqBA;AAAyB;AACvB;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAO;AACnE;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAClE;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAClE;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAAM;AAC9D;AAOA;AACE;AACE;AAEA;AAC2D;AAE3D;AAAO;AAEX;AAOA;AACE;AACE;AAAmD;AAEnD;AAAO;AAEX;AAOA;AAAuC;AAC3B;AAAA;AAAA;AAGA;AACA;AAAA;AAGZ;AAS4C;AAC7B;AACM;AAErB;AAwCE;AAAM;AACJ;AACA;AACA;AACS;AACT;AACA;AACA;AACA;AACA;AACc;AAYF;AAC0F;AAC5F;AAMV;AAEA;AAA4B;AACnB;AACe;AACoB;AAC3C;AAaD;AACA;AAA2C;AAG7C;AACE;AAAC;AAAA;AACa;AAEO;AACnB;AACA;AACmC;AACnC;AAC4D;AAE1D;AACA;AAAgC;AAClC;AACA;AACO;AAEN;AAAA;AAAA;AAGG;AAAC;AAAA;AACiE;AACxD;AACR;AAAA;AAEJ;AAEA;AAAC;AAAA;AACC;AACQ;AACR;AACa;AAAA;AAAA;AAIf;AAA4B;AAGvB;AAAK;AAAK;AAAS;AAEvB;AACH;AAAA;AAAA;AAGN;;;;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,9 +12,15 @@ export { MadeWith } from './composites/MadeWith.js';
|
|
|
12
12
|
export type { MadeWithProps } from './composites/MadeWith.js';
|
|
13
13
|
export { Questionnaire, QuestionnaireProgress, QuestionnaireItem, QuestionnaireTitle, QuestionnaireDescription, QuestionnaireError, QuestionnaireChoices, QuestionnaireChoice, QuestionnaireInput, QuestionnaireTextarea, QuestionnaireActions, QuestionnairePrevious, QuestionnaireSkip, QuestionnaireNext, QuestionnaireSubmit, useQuestionnaire, useQuestionnaireItem, } from './composites/Questionnaire.js';
|
|
14
14
|
export type { QuestionnaireAnswer, QuestionnaireAnswers, QuestionnaireQuestion, QuestionnaireProps, QuestionnaireItemProps, QuestionnaireChoicesProps, QuestionnaireChoiceProps, QuestionnaireActionsProps, } from './composites/Questionnaire.js';
|
|
15
|
+
export { LanguagePicker } from './composites/language-picker.js';
|
|
16
|
+
export type { LanguagePickerProps, LanguagePickerTranslations } from './composites/language-picker.js';
|
|
15
17
|
export { cn } from './lib/cn.js';
|
|
16
18
|
export { CHART_SLOTS, categoricalCapacity, categoricalColor, resolveTokenColor, } from './lib/token-color.js';
|
|
17
19
|
export { useChartCapacity, useThemeTick } from './lib/theme-tick.js';
|
|
20
|
+
export { useAsyncCollection } from './lib/use-async-collection.js';
|
|
21
|
+
export type { AsyncCollection, AsyncCollectionOptions } from './lib/use-async-collection.js';
|
|
22
|
+
export { useDebouncedCommit } from './lib/use-debounced-commit.js';
|
|
23
|
+
export type { DebouncedCommit } from './lib/use-debounced-commit.js';
|
|
18
24
|
export { createListCollection, useListCollection, } from '@ark-ui/react/collection';
|
|
19
25
|
export type { ListCollection, CollectionItem } from '@ark-ui/react/collection';
|
|
20
26
|
export { useFilter } from '@ark-ui/react/locale';
|
|
@@ -58,6 +64,7 @@ export * from './simples/item.js';
|
|
|
58
64
|
export * from './simples/json-tree-view.js';
|
|
59
65
|
export * from './simples/kbd.js';
|
|
60
66
|
export * from './simples/listbox.js';
|
|
67
|
+
export * from './simples/locale.js';
|
|
61
68
|
export * from './simples/menu.js';
|
|
62
69
|
export * from './simples/native-select.js';
|
|
63
70
|
export * from './simples/number-input.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@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