@skiddph/prui 0.12.0 → 0.13.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/core/index.d.ts +1 -0
- package/dist/core/tag-input.d.ts +49 -0
- package/dist/core/tag-input.js +147 -0
- package/dist/core.js +140 -137
- package/dist/i18n/index.d.ts +1 -0
- package/dist/i18n.js +12 -11
- package/dist/index.js +240 -237
- package/dist/prui-utilities.css +1 -1
- package/dist/prui.css +1 -1
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { Portal, useReducedMotion, useFocusTrap, useEscapeKey, useScrollLock, us
|
|
|
6
6
|
export { moveIndex, homeIndex, endIndex, typeaheadIndex } from './list-nav';
|
|
7
7
|
export { Button, buttonPropsMeta, type ButtonProps, type ButtonVariant, type ButtonSize, } from './button';
|
|
8
8
|
export { Input, inputPropsMeta, Textarea, textareaPropsMeta, type InputProps, type TextareaProps, } from './input';
|
|
9
|
+
export { TagInput, tagInputPropsMeta, type TagInputProps, type TagInputSize, } from './tag-input';
|
|
9
10
|
export { Label, labelPropsMeta, Separator, separatorPropsMeta, type LabelProps, type SeparatorProps } from './label';
|
|
10
11
|
export { Select, SelectTrigger, SelectValue, SelectContent, SelectItem, selectPropsMeta, type SelectProps, type SelectOption, type SelectTriggerProps, type SelectValueProps, type SelectContentProps, type SelectItemProps, } from './select';
|
|
11
12
|
export { Switch, switchPropsMeta, type SwitchProps } from './switch';
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { SurfaceProps } from './surface';
|
|
2
|
+
import { PropsMeta } from './props-meta';
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
/**
|
|
5
|
+
* TagInput: comma-separated entry as removable chips (tags, email
|
|
6
|
+
* recipients, keywords). Text commits the moment a separator arrives — by
|
|
7
|
+
* keydown, or through the input value itself (IME, virtual keyboards,
|
|
8
|
+
* autofill, multi-char separators like " and ") — plus Enter, multi-value
|
|
9
|
+
* paste, or blur; Backspace on an empty field removes the last tag. The
|
|
10
|
+
* chip and the value are separate concerns: labelFor decides what the chip
|
|
11
|
+
* displays while onChange keeps emitting the original strings, and
|
|
12
|
+
* renderTag takes over the chip entirely.
|
|
13
|
+
*/
|
|
14
|
+
export type TagInputSize = "sm" | "md" | "lg";
|
|
15
|
+
export interface TagInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "value" | "defaultValue" | "onChange" | "children">, SurfaceProps {
|
|
16
|
+
/** Control height step (the field grows vertically with wrapped chips). */
|
|
17
|
+
size?: TagInputSize;
|
|
18
|
+
/** Visual variant: outlined (default) or filled. */
|
|
19
|
+
variant?: "default" | "filled";
|
|
20
|
+
/** Controlled tag values. */
|
|
21
|
+
value?: string[];
|
|
22
|
+
/** Initial tags for the uncontrolled field. */
|
|
23
|
+
defaultValue?: string[];
|
|
24
|
+
/** Emits the full tag array on every add/remove. */
|
|
25
|
+
onChange?: (tags: string[]) => void;
|
|
26
|
+
/** Characters that commit the typed text as a tag (default: comma). */
|
|
27
|
+
separators?: string[];
|
|
28
|
+
/** Commit the pending text when the field blurs (default true). */
|
|
29
|
+
commitOnBlur?: boolean;
|
|
30
|
+
/** Programmable commit: split raw text into tag values. Defaults to
|
|
31
|
+
* splitting on `separators`, trimming, and dropping empties. Use it to
|
|
32
|
+
* accept pair syntaxes (e.g. "Name, email" -> "Name <email>"). */
|
|
33
|
+
parseInput?: (raw: string) => string[];
|
|
34
|
+
/** Reject a candidate; rejected text stays editable in the field. */
|
|
35
|
+
validate?: (tag: string) => boolean;
|
|
36
|
+
/** Stop accepting new tags at this count. */
|
|
37
|
+
maxTags?: number;
|
|
38
|
+
/** Allow the same value more than once (default false). */
|
|
39
|
+
allowDuplicates?: boolean;
|
|
40
|
+
/** What the chip displays — the emitted value keeps the original string
|
|
41
|
+
* (e.g. show only the name for "Name <email>"). */
|
|
42
|
+
labelFor?: (tag: string) => React.ReactNode;
|
|
43
|
+
/** Fully custom chip: (tag, { remove }) => node. */
|
|
44
|
+
renderTag?: (tag: string, api: {
|
|
45
|
+
remove: () => void;
|
|
46
|
+
}) => React.ReactNode;
|
|
47
|
+
}
|
|
48
|
+
export declare const TagInput: React.ForwardRefExoticComponent<TagInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
49
|
+
export declare const tagInputPropsMeta: PropsMeta;
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { jsxs as D, jsx as u } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { X as Q } from "lucide-react";
|
|
4
|
+
import { resolveSurface as W, withSurface as Y } from "./surface.js";
|
|
5
|
+
import { cn as Z } from "./cn.js";
|
|
6
|
+
import { usePruiI18n as ee } from "../i18n.js";
|
|
7
|
+
const te = (h) => h.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), ne = {
|
|
8
|
+
sm: "min-h-8 text-sm",
|
|
9
|
+
md: "min-h-9 text-sm",
|
|
10
|
+
lg: "min-h-11 text-base"
|
|
11
|
+
}, re = d.forwardRef(function({
|
|
12
|
+
className: j,
|
|
13
|
+
style: k,
|
|
14
|
+
size: R = "md",
|
|
15
|
+
variant: T = "default",
|
|
16
|
+
value: v,
|
|
17
|
+
defaultValue: B,
|
|
18
|
+
onChange: m,
|
|
19
|
+
separators: a = [","],
|
|
20
|
+
commitOnBlur: C = !0,
|
|
21
|
+
parseInput: P,
|
|
22
|
+
validate: b,
|
|
23
|
+
maxTags: y,
|
|
24
|
+
allowDuplicates: S = !1,
|
|
25
|
+
labelFor: x,
|
|
26
|
+
renderTag: w,
|
|
27
|
+
disabled: f,
|
|
28
|
+
bg: z,
|
|
29
|
+
fg: E,
|
|
30
|
+
radius: F,
|
|
31
|
+
texture: K,
|
|
32
|
+
textureColor: A,
|
|
33
|
+
elevation: M,
|
|
34
|
+
...r
|
|
35
|
+
}, O) {
|
|
36
|
+
const { t: U } = ee(), N = v !== void 0, [V, X] = d.useState(B ?? []), o = N ? v : V, [l, p] = d.useState(""), _ = P ?? ((e) => e.split(new RegExp(a.map(te).join("|"))).map((t) => t.trim()).filter(Boolean)), I = (e) => {
|
|
37
|
+
N || X(e), m == null || m(e);
|
|
38
|
+
}, c = (e) => {
|
|
39
|
+
const t = _(e);
|
|
40
|
+
if (!t.length) {
|
|
41
|
+
p("");
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
const n = [...o], i = [];
|
|
45
|
+
for (const s of t)
|
|
46
|
+
y !== void 0 && n.length >= y ? i.push(s) : !S && n.includes(s) || (b && !b(s) ? i.push(s) : n.push(s));
|
|
47
|
+
p(i.join(a[0] ?? ", ")), n.length !== o.length && I(n);
|
|
48
|
+
}, g = (e) => I(o.filter((t, n) => n !== e)), q = (e) => {
|
|
49
|
+
var t;
|
|
50
|
+
e.key === "Enter" || a.includes(e.key) ? (e.preventDefault(), c(l)) : e.key === "Backspace" && !l && o.length && (e.preventDefault(), g(o.length - 1)), (t = r.onKeyDown) == null || t.call(r, e);
|
|
51
|
+
}, G = (e) => {
|
|
52
|
+
var n;
|
|
53
|
+
const t = e.clipboardData.getData("text");
|
|
54
|
+
if (t && a.some((i) => t.includes(i))) {
|
|
55
|
+
e.preventDefault(), c(l ? `${l}${a[0] ?? ","}${t}` : t);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
(n = r.onPaste) == null || n.call(r, e);
|
|
59
|
+
}, H = (e) => {
|
|
60
|
+
var t;
|
|
61
|
+
C && c(l), (t = r.onBlur) == null || t.call(r, e);
|
|
62
|
+
}, J = (e) => {
|
|
63
|
+
const t = e.target.value;
|
|
64
|
+
if (a.some((n) => t.includes(n))) {
|
|
65
|
+
c(t);
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
p(t);
|
|
69
|
+
}, L = W({ bg: z, fg: E, radius: F, texture: K, textureColor: A, elevation: M }), $ = Y(
|
|
70
|
+
Z(
|
|
71
|
+
"prui-f-control prui-taginput flex w-full flex-wrap items-center gap-1 px-1.5 py-1",
|
|
72
|
+
"border border-[var(--prui-line)] rounded-[var(--prui-s-radius,var(--prui-radius))]",
|
|
73
|
+
"bg-[var(--prui-s-bg,var(--prui-background))] text-[var(--prui-s-fg,var(--prui-fg))] placeholder:text-[var(--prui-dim)]",
|
|
74
|
+
"outline-none transition-colors focus-within:border-[var(--prui-brand)] focus-within:ring-2 focus-within:ring-[var(--prui-brand)]/30",
|
|
75
|
+
ne[R],
|
|
76
|
+
T === "filled" && "bg-[var(--prui-s-bg,var(--prui-raise))] border-transparent",
|
|
77
|
+
f && "opacity-50 cursor-not-allowed",
|
|
78
|
+
j
|
|
79
|
+
),
|
|
80
|
+
k,
|
|
81
|
+
L
|
|
82
|
+
);
|
|
83
|
+
return /* @__PURE__ */ D("div", { className: $.className, style: $.style, children: [
|
|
84
|
+
o.map(
|
|
85
|
+
(e, t) => w ? /* @__PURE__ */ u(d.Fragment, { children: w(e, { remove: () => g(t) }) }, `${e}-${t}`) : /* @__PURE__ */ D(
|
|
86
|
+
"span",
|
|
87
|
+
{
|
|
88
|
+
className: "inline-flex max-w-full items-center gap-1 rounded-[var(--prui-radius-full)] border border-[var(--prui-line)] bg-[var(--prui-raise)] py-0.5 pl-2 pr-1 text-xs text-[var(--prui-fg)]",
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ u("span", { className: "max-w-64 truncate", children: x ? x(e) : e }),
|
|
91
|
+
/* @__PURE__ */ u(
|
|
92
|
+
"button",
|
|
93
|
+
{
|
|
94
|
+
type: "button",
|
|
95
|
+
"aria-label": U.removeTag.replace("{label}", e),
|
|
96
|
+
disabled: f,
|
|
97
|
+
onClick: () => g(t),
|
|
98
|
+
className: "flex h-4 w-4 cursor-pointer items-center justify-center rounded-full text-[var(--prui-dim)] hover:bg-[var(--prui-line)] hover:text-[var(--prui-fg)] disabled:cursor-not-allowed",
|
|
99
|
+
children: /* @__PURE__ */ u(Q, { className: "h-3 w-3", "aria-hidden": !0 })
|
|
100
|
+
}
|
|
101
|
+
)
|
|
102
|
+
]
|
|
103
|
+
},
|
|
104
|
+
`${e}-${t}`
|
|
105
|
+
)
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ u(
|
|
108
|
+
"input",
|
|
109
|
+
{
|
|
110
|
+
ref: O,
|
|
111
|
+
value: l,
|
|
112
|
+
onChange: J,
|
|
113
|
+
onKeyDown: q,
|
|
114
|
+
onPaste: G,
|
|
115
|
+
onBlur: H,
|
|
116
|
+
disabled: f,
|
|
117
|
+
...r,
|
|
118
|
+
className: "h-7 min-w-16 flex-1 bg-transparent text-sm outline-none placeholder:text-[var(--prui-dim)] disabled:cursor-not-allowed"
|
|
119
|
+
}
|
|
120
|
+
)
|
|
121
|
+
] });
|
|
122
|
+
});
|
|
123
|
+
re.displayName = "TagInput";
|
|
124
|
+
const ue = {
|
|
125
|
+
name: "TagInput",
|
|
126
|
+
props: [
|
|
127
|
+
{ name: "value", type: "string[]", default: "uncontrolled", control: "none" },
|
|
128
|
+
{ name: "defaultValue", type: "string[]", default: "[]", control: "none" },
|
|
129
|
+
{ name: "onChange", type: "(tags: string[]) => void", default: null, control: "none" },
|
|
130
|
+
{ name: "separators", type: "string[]", default: "[',']", control: "none", description: "Characters that commit the typed text (plus Enter, paste, blur)." },
|
|
131
|
+
{ name: "commitOnBlur", type: "boolean", default: "true", control: "boolean" },
|
|
132
|
+
{ name: "parseInput", type: "(raw: string) => string[]", default: "split on separators", control: "none", description: "Programmable commit: build tag values from raw text (pair syntaxes, normalization)." },
|
|
133
|
+
{ name: "validate", type: "(tag: string) => boolean", default: "undefined", control: "none", description: "Reject a candidate; it stays editable in the field." },
|
|
134
|
+
{ name: "labelFor", type: "(tag: string) => ReactNode", default: "undefined", control: "none", description: "Chip display; onChange keeps emitting the original strings." },
|
|
135
|
+
{ name: "renderTag", type: "(tag, { remove }) => ReactNode", default: "default chip", control: "none", description: "Fully custom chip rendering." },
|
|
136
|
+
{ name: "maxTags", type: "number", default: "undefined", control: "number" },
|
|
137
|
+
{ name: "allowDuplicates", type: "boolean", default: "false", control: "boolean" },
|
|
138
|
+
{ name: "size", type: "'sm' | 'md' | 'lg'", default: "'md'", control: "select", options: ["sm", "md", "lg"] },
|
|
139
|
+
{ name: "variant", type: "'default' | 'filled'", default: "'default'", control: "select", options: ["default", "filled"] },
|
|
140
|
+
{ name: "placeholder", type: "string", default: "undefined", control: "text" },
|
|
141
|
+
{ name: "disabled", type: "boolean", default: "false", control: "boolean" }
|
|
142
|
+
]
|
|
143
|
+
};
|
|
144
|
+
export {
|
|
145
|
+
re as TagInput,
|
|
146
|
+
ue as tagInputPropsMeta
|
|
147
|
+
};
|
package/dist/core.js
CHANGED
|
@@ -1,159 +1,162 @@
|
|
|
1
1
|
import { cn as r } from "./core/cn.js";
|
|
2
2
|
import { resolveSurface as a, withSurface as p } from "./core/surface.js";
|
|
3
|
-
import { Portal as i, getFocusable as
|
|
3
|
+
import { Portal as i, getFocusable as m, isTopOverlay as l, overlayCount as P, overlayPropsMeta as c, pushOverlay as n, removeOverlay as d, useEscapeKey as x, useFocusTrap as M, useInertBackground as f, useOverlay as u, useOverlayStack as g, useReducedMotion as b, useScrollLock as T } from "./core/overlay.js";
|
|
4
4
|
import { endIndex as D, homeIndex as S, moveIndex as v, typeaheadIndex as C } from "./core/list-nav.js";
|
|
5
|
-
import { Button as h, buttonPropsMeta as
|
|
5
|
+
import { Button as h, buttonPropsMeta as I } from "./core/button.js";
|
|
6
6
|
import { Input as A, Textarea as B, inputPropsMeta as R, textareaPropsMeta as F } from "./core/input.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
7
|
+
import { TagInput as K, tagInputPropsMeta as L } from "./core/tag-input.js";
|
|
8
|
+
import { Label as E, Separator as G, labelPropsMeta as H, separatorPropsMeta as U } from "./core/label.js";
|
|
9
|
+
import { Select as q, SelectContent as z, SelectItem as J, SelectTrigger as N, SelectValue as Q, selectPropsMeta as W } from "./core/select.js";
|
|
10
|
+
import { Switch as Y, switchPropsMeta as Z } from "./core/switch.js";
|
|
11
|
+
import { Tabs as $, TabsContent as ee, TabsList as oe, TabsTrigger as re, tabsPropsMeta as te } from "./core/tabs.js";
|
|
12
|
+
import { Avatar as pe, Badge as se, Card as ie, CardContent as me, CardDescription as le, CardFooter as Pe, CardHeader as ce, CardTitle as ne, avatarPropsMeta as de, badgePropsMeta as xe, cardPropsMeta as Me } from "./core/card.js";
|
|
13
|
+
import { Dialog as ue, DialogBody as ge, DialogContent as be, DialogDescription as Te, DialogFooter as ke, DialogHeader as De, DialogTitle as Se, dialogBodyPropsMeta as ve, dialogPropsMeta as Ce } from "./core/dialog.js";
|
|
14
|
+
import { Dropdown as he, dropdownPropsMeta as Ie } from "./core/dropdown.js";
|
|
15
|
+
import { ScrollArea as Ae, scrollAreaPropsMeta as Be } from "./core/scroll-area.js";
|
|
16
|
+
import { Modal as Fe, confirmModal as Oe, confirmModalPropsMeta as Ke, modalPropsMeta as Le } from "./core/modal.js";
|
|
17
|
+
import { computePosition as Ee, useAnchoredPosition as Ge } from "./core/anchor.js";
|
|
18
|
+
import { Spinner as Ue, spinnerPropsMeta as je } from "./core/spinner.js";
|
|
19
|
+
import { Skeleton as ze, skeletonPropsMeta as Je } from "./core/skeleton.js";
|
|
20
|
+
import { Alert as Qe, alertPropsMeta as We } from "./core/alert.js";
|
|
21
|
+
import { Progress as Ye, progressPropsMeta as Ze } from "./core/progress.js";
|
|
22
|
+
import { Toaster as $e, dismissAllToasts as eo, toast as oo, toastPropsMeta as ro, toasterPropsMeta as to } from "./core/toast.js";
|
|
23
|
+
import { Tooltip as po, tooltipPropsMeta as so } from "./core/tooltip.js";
|
|
24
|
+
import { Popover as mo, popoverPropsMeta as lo } from "./core/popover.js";
|
|
25
|
+
import { Drawer as co, Sheet as no, drawerPropsMeta as xo, sheetPropsMeta as Mo } from "./core/drawer.js";
|
|
26
|
+
import { Checkbox as uo, checkboxPropsMeta as go } from "./core/checkbox.js";
|
|
27
|
+
import { Radio as To, RadioGroup as ko, radioGroupPropsMeta as Do } from "./core/radio.js";
|
|
28
|
+
import { Combobox as vo, comboboxPropsMeta as Co } from "./core/combobox.js";
|
|
29
|
+
import { Accordion as ho, AccordionItem as Io, accordionPropsMeta as wo } from "./core/accordion.js";
|
|
30
|
+
import { Breadcrumb as Bo, BreadcrumbEllipsis as Ro, BreadcrumbItem as Fo, breadcrumbPropsMeta as Oo } from "./core/breadcrumb.js";
|
|
31
|
+
import { TreeView as Lo, treeViewPropsMeta as Vo } from "./core/tree-view.js";
|
|
32
|
+
import { Timeline as Go, timelinePropsMeta as Ho } from "./core/timeline.js";
|
|
33
|
+
import { Calendar as jo, calendarPropsMeta as qo, fromDateKey as zo, toDateKey as Jo } from "./core/calendar.js";
|
|
34
|
+
import { DatePicker as Qo, DateRangePicker as Wo, datePickerPropsMeta as Xo, dateRangePickerPropsMeta as Yo } from "./core/date-picker.js";
|
|
35
|
+
import { TimePanel as _o, TimePicker as $o, TimeRangePicker as er, timePickerPropsMeta as or, timeRangePickerPropsMeta as rr } from "./core/time-picker.js";
|
|
36
|
+
import { FileUpload as ar, fileUploadPropsMeta as pr } from "./core/file-upload.js";
|
|
36
37
|
export {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
ho as Accordion,
|
|
39
|
+
Io as AccordionItem,
|
|
40
|
+
Qe as Alert,
|
|
41
|
+
pe as Avatar,
|
|
42
|
+
se as Badge,
|
|
43
|
+
Bo as Breadcrumb,
|
|
44
|
+
Ro as BreadcrumbEllipsis,
|
|
45
|
+
Fo as BreadcrumbItem,
|
|
45
46
|
h as Button,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
47
|
+
jo as Calendar,
|
|
48
|
+
ie as Card,
|
|
49
|
+
me as CardContent,
|
|
50
|
+
le as CardDescription,
|
|
51
|
+
Pe as CardFooter,
|
|
52
|
+
ce as CardHeader,
|
|
53
|
+
ne as CardTitle,
|
|
54
|
+
uo as Checkbox,
|
|
55
|
+
vo as Combobox,
|
|
56
|
+
Qo as DatePicker,
|
|
57
|
+
Wo as DateRangePicker,
|
|
58
|
+
ue as Dialog,
|
|
59
|
+
ge as DialogBody,
|
|
60
|
+
be as DialogContent,
|
|
61
|
+
Te as DialogDescription,
|
|
62
|
+
ke as DialogFooter,
|
|
63
|
+
De as DialogHeader,
|
|
64
|
+
Se as DialogTitle,
|
|
65
|
+
co as Drawer,
|
|
66
|
+
he as Dropdown,
|
|
67
|
+
ar as FileUpload,
|
|
67
68
|
A as Input,
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
E as Label,
|
|
70
|
+
Fe as Modal,
|
|
71
|
+
mo as Popover,
|
|
71
72
|
i as Portal,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
73
|
+
Ye as Progress,
|
|
74
|
+
To as Radio,
|
|
75
|
+
ko as RadioGroup,
|
|
76
|
+
Ae as ScrollArea,
|
|
77
|
+
q as Select,
|
|
78
|
+
z as SelectContent,
|
|
79
|
+
J as SelectItem,
|
|
80
|
+
N as SelectTrigger,
|
|
81
|
+
Q as SelectValue,
|
|
82
|
+
G as Separator,
|
|
83
|
+
no as Sheet,
|
|
84
|
+
ze as Skeleton,
|
|
85
|
+
Ue as Spinner,
|
|
86
|
+
Y as Switch,
|
|
87
|
+
$ as Tabs,
|
|
88
|
+
ee as TabsContent,
|
|
89
|
+
oe as TabsList,
|
|
90
|
+
re as TabsTrigger,
|
|
91
|
+
K as TagInput,
|
|
90
92
|
B as Textarea,
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
93
|
+
_o as TimePanel,
|
|
94
|
+
$o as TimePicker,
|
|
95
|
+
er as TimeRangePicker,
|
|
96
|
+
Go as Timeline,
|
|
97
|
+
$e as Toaster,
|
|
98
|
+
po as Tooltip,
|
|
99
|
+
Lo as TreeView,
|
|
100
|
+
wo as accordionPropsMeta,
|
|
101
|
+
We as alertPropsMeta,
|
|
102
|
+
de as avatarPropsMeta,
|
|
103
|
+
xe as badgePropsMeta,
|
|
104
|
+
Oo as breadcrumbPropsMeta,
|
|
105
|
+
I as buttonPropsMeta,
|
|
106
|
+
qo as calendarPropsMeta,
|
|
107
|
+
Me as cardPropsMeta,
|
|
108
|
+
go as checkboxPropsMeta,
|
|
107
109
|
r as cn,
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
110
|
+
Co as comboboxPropsMeta,
|
|
111
|
+
Ee as computePosition,
|
|
112
|
+
Oe as confirmModal,
|
|
113
|
+
Ke as confirmModalPropsMeta,
|
|
114
|
+
Xo as datePickerPropsMeta,
|
|
115
|
+
Yo as dateRangePickerPropsMeta,
|
|
116
|
+
ve as dialogBodyPropsMeta,
|
|
117
|
+
Ce as dialogPropsMeta,
|
|
118
|
+
eo as dismissAllToasts,
|
|
119
|
+
xo as drawerPropsMeta,
|
|
120
|
+
Ie as dropdownPropsMeta,
|
|
119
121
|
D as endIndex,
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
122
|
+
pr as fileUploadPropsMeta,
|
|
123
|
+
zo as fromDateKey,
|
|
124
|
+
m as getFocusable,
|
|
123
125
|
S as homeIndex,
|
|
124
126
|
R as inputPropsMeta,
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
127
|
+
l as isTopOverlay,
|
|
128
|
+
H as labelPropsMeta,
|
|
129
|
+
Le as modalPropsMeta,
|
|
128
130
|
v as moveIndex,
|
|
129
131
|
P as overlayCount,
|
|
130
132
|
c as overlayPropsMeta,
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
133
|
+
lo as popoverPropsMeta,
|
|
134
|
+
Ze as progressPropsMeta,
|
|
135
|
+
n as pushOverlay,
|
|
136
|
+
Do as radioGroupPropsMeta,
|
|
137
|
+
d as removeOverlay,
|
|
136
138
|
a as resolveSurface,
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
139
|
+
Be as scrollAreaPropsMeta,
|
|
140
|
+
W as selectPropsMeta,
|
|
141
|
+
U as separatorPropsMeta,
|
|
142
|
+
Mo as sheetPropsMeta,
|
|
143
|
+
Je as skeletonPropsMeta,
|
|
144
|
+
je as spinnerPropsMeta,
|
|
145
|
+
Z as switchPropsMeta,
|
|
146
|
+
te as tabsPropsMeta,
|
|
147
|
+
L as tagInputPropsMeta,
|
|
145
148
|
F as textareaPropsMeta,
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
or as timePickerPropsMeta,
|
|
150
|
+
rr as timeRangePickerPropsMeta,
|
|
151
|
+
Ho as timelinePropsMeta,
|
|
152
|
+
Jo as toDateKey,
|
|
153
|
+
oo as toast,
|
|
154
|
+
ro as toastPropsMeta,
|
|
155
|
+
to as toasterPropsMeta,
|
|
156
|
+
so as tooltipPropsMeta,
|
|
157
|
+
Vo as treeViewPropsMeta,
|
|
155
158
|
C as typeaheadIndex,
|
|
156
|
-
|
|
159
|
+
Ge as useAnchoredPosition,
|
|
157
160
|
x as useEscapeKey,
|
|
158
161
|
M as useFocusTrap,
|
|
159
162
|
f as useInertBackground,
|
package/dist/i18n/index.d.ts
CHANGED
package/dist/i18n.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as a from "react";
|
|
3
3
|
const i = {
|
|
4
4
|
close: "Close",
|
|
5
5
|
closeDialog: "Close dialog",
|
|
@@ -39,6 +39,7 @@ const i = {
|
|
|
39
39
|
notifications: "Notifications",
|
|
40
40
|
showPassword: "Show password",
|
|
41
41
|
hidePassword: "Hide password",
|
|
42
|
+
removeTag: "Remove {label}",
|
|
42
43
|
mainNavigation: "Main",
|
|
43
44
|
openNavigation: "Open navigation",
|
|
44
45
|
closeNavigation: "Close navigation",
|
|
@@ -73,25 +74,25 @@ function f() {
|
|
|
73
74
|
function p() {
|
|
74
75
|
return o;
|
|
75
76
|
}
|
|
76
|
-
const l =
|
|
77
|
+
const l = a.createContext(null);
|
|
77
78
|
function w({
|
|
78
79
|
dictionary: e,
|
|
79
|
-
children:
|
|
80
|
+
children: r
|
|
80
81
|
}) {
|
|
81
|
-
|
|
82
|
+
a.useEffect(() => {
|
|
82
83
|
if (!e) return;
|
|
83
84
|
const c = o;
|
|
84
85
|
return u(e), () => {
|
|
85
86
|
o = c, n();
|
|
86
87
|
};
|
|
87
88
|
}, [e]);
|
|
88
|
-
const t =
|
|
89
|
-
return /* @__PURE__ */ m(l.Provider, { value: t, children:
|
|
89
|
+
const t = a.useMemo(() => ({ ...o, ...e }), [e]);
|
|
90
|
+
return /* @__PURE__ */ m(l.Provider, { value: t, children: r });
|
|
90
91
|
}
|
|
91
|
-
function
|
|
92
|
-
const e =
|
|
93
|
-
return
|
|
94
|
-
const t =
|
|
92
|
+
function g() {
|
|
93
|
+
const e = a.useContext(l), [, r] = a.useReducer((t) => t + 1, 0);
|
|
94
|
+
return a.useEffect(() => {
|
|
95
|
+
const t = r;
|
|
95
96
|
return s.add(t), () => {
|
|
96
97
|
s.delete(t);
|
|
97
98
|
};
|
|
@@ -103,5 +104,5 @@ export {
|
|
|
103
104
|
p as getPruiDictionary,
|
|
104
105
|
f as resetPruiDictionary,
|
|
105
106
|
u as setPruiDictionary,
|
|
106
|
-
|
|
107
|
+
g as usePruiI18n
|
|
107
108
|
};
|