wimui 0.73.0 → 0.74.2
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/components/_internal/FeedbackCloseButton.cjs +1 -1
- package/dist/components/_internal/FeedbackCloseButton.d.ts +2 -1
- package/dist/components/_internal/FeedbackCloseButton.js +27 -15
- package/dist/components/_internal/OverlayBase.cjs +1 -1
- package/dist/components/_internal/OverlayBase.js +34 -38
- package/dist/components/_internal/bodyScrollLock.cjs +2 -0
- package/dist/components/_internal/bodyScrollLock.d.ts +11 -0
- package/dist/components/_internal/bodyScrollLock.js +29 -0
- package/dist/components/_internal/choice-label.module.cjs +1 -1
- package/dist/components/_internal/choice-label.module.js +1 -1
- package/dist/components/_internal/focusHandoff.cjs +2 -0
- package/dist/components/_internal/focusHandoff.d.ts +9 -0
- package/dist/components/_internal/focusHandoff.js +20 -0
- package/dist/components/_internal/weekStart.cjs +2 -0
- package/dist/components/_internal/weekStart.d.ts +6 -0
- package/dist/components/_internal/weekStart.js +18 -0
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.cjs +1 -1
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.js +1 -1
- package/dist/components/ai/AgentStatus/agent-status.module.cjs +1 -1
- package/dist/components/ai/AgentStatus/agent-status.module.js +3 -3
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.cjs +1 -1
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.js +2 -2
- package/dist/components/ai/StreamingText/streaming-text.module.cjs +1 -1
- package/dist/components/ai/StreamingText/streaming-text.module.js +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.cjs +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.js +4 -4
- package/dist/components/ai/ThreadList/ThreadList.cjs +1 -1
- package/dist/components/ai/ThreadList/ThreadList.js +80 -72
- package/dist/components/ai/ThreadList/thread-list.module.cjs +1 -1
- package/dist/components/ai/ThreadList/thread-list.module.js +8 -8
- package/dist/components/ai/UsageMeter/usage-meter.module.cjs +1 -1
- package/dist/components/ai/UsageMeter/usage-meter.module.js +1 -1
- package/dist/components/charts/GanttChart/GanttChart.cjs +1 -1
- package/dist/components/charts/GanttChart/GanttChart.js +1 -2
- package/dist/components/charts/GanttChart/gantt-chart.module.cjs +1 -1
- package/dist/components/charts/GanttChart/gantt-chart.module.js +1 -1
- package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
- package/dist/components/data-display/Calendar/Calendar.d.ts +1 -1
- package/dist/components/data-display/Calendar/Calendar.js +179 -177
- package/dist/components/data-display/Calendar/RangeCalendar.d.ts +2 -1
- package/dist/components/data-display/Calendar/calendar.module.cjs +1 -1
- package/dist/components/data-display/Calendar/calendar.module.js +1 -1
- package/dist/components/data-display/Calendar/useCalendar.d.ts +5 -1
- package/dist/components/data-display/CalendarHeatmap/calendar-heatmap.module.cjs +1 -1
- package/dist/components/data-display/CalendarHeatmap/calendar-heatmap.module.js +1 -1
- package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
- package/dist/components/data-display/Carousel/carousel.module.js +1 -1
- package/dist/components/data-display/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/components/data-display/JsonViewer/JsonViewer.js +5 -1
- package/dist/components/data-display/Kanban/kanban.module.cjs +1 -1
- package/dist/components/data-display/Kanban/kanban.module.js +1 -1
- package/dist/components/data-display/Reaction/reaction.module.cjs +1 -1
- package/dist/components/data-display/Reaction/reaction.module.js +1 -1
- package/dist/components/data-display/ScheduleView/schedule-view.module.cjs +1 -1
- package/dist/components/data-display/ScheduleView/schedule-view.module.js +1 -1
- package/dist/components/data-display/SwipeAction/SwipeAction.cjs +1 -1
- package/dist/components/data-display/SwipeAction/SwipeAction.js +75 -74
- package/dist/components/data-display/Timeline/timeline.module.cjs +1 -1
- package/dist/components/data-display/Timeline/timeline.module.js +1 -1
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.js +9 -9
- package/dist/components/data-display/TreeView/tree-view.module.cjs +1 -1
- package/dist/components/data-display/TreeView/tree-view.module.js +9 -9
- package/dist/components/feedback/Alert/Alert.d.ts +1 -1
- package/dist/components/feedback/Banner/Banner.d.ts +1 -1
- package/dist/components/feedback/Indicator/indicator.module.cjs +1 -1
- package/dist/components/feedback/Indicator/indicator.module.js +6 -6
- package/dist/components/feedback/Loader/loader.module.cjs +1 -1
- package/dist/components/feedback/Loader/loader.module.js +4 -4
- package/dist/components/feedback/Notification/Notification.d.ts +1 -1
- package/dist/components/feedback/Progress/progress.module.cjs +1 -1
- package/dist/components/feedback/Progress/progress.module.js +2 -2
- package/dist/components/feedback/Toast/Toast.cjs +1 -1
- package/dist/components/feedback/Toast/Toast.d.ts +1 -1
- package/dist/components/feedback/Toast/Toast.js +42 -27
- package/dist/components/form/ColorPicker/ColorPicker.cjs +1 -1
- package/dist/components/form/ColorPicker/ColorPicker.d.ts +38 -1
- package/dist/components/form/ColorPicker/ColorPicker.js +75 -15
- package/dist/components/form/ColorPicker/color-picker.module.cjs +1 -1
- package/dist/components/form/ColorPicker/color-picker.module.js +8 -2
- package/dist/components/form/CopyButton/CopyButton.cjs +1 -1
- package/dist/components/form/CopyButton/CopyButton.js +1 -1
- package/dist/components/form/InputBase/InputBase.cjs +1 -1
- package/dist/components/form/InputBase/InputBase.js +3 -1
- package/dist/components/form/NumberInput/NumberInput.cjs +1 -1
- package/dist/components/form/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/form/NumberInput/NumberInput.js +18 -16
- package/dist/components/form/QueryBuilder/QueryBuilder.cjs +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.js +8 -7
- package/dist/components/form/Radio/radio.module.cjs +1 -1
- package/dist/components/form/Radio/radio.module.js +1 -1
- package/dist/components/form/RangeSlider/range-slider.module.cjs +1 -1
- package/dist/components/form/RangeSlider/range-slider.module.js +1 -1
- package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
- package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
- package/dist/components/form/Slider/slider.module.cjs +1 -1
- package/dist/components/form/Slider/slider.module.js +1 -1
- package/dist/components/form/Switch/switch.module.cjs +1 -1
- package/dist/components/form/Switch/switch.module.js +1 -1
- package/dist/components/form/ThemeToggle/theme-toggle.module.cjs +1 -1
- package/dist/components/form/ThemeToggle/theme-toggle.module.js +1 -1
- package/dist/components/form/ToggleGroup/toggle-group.module.cjs +1 -1
- package/dist/components/form/ToggleGroup/toggle-group.module.js +1 -1
- package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
- package/dist/components/layout/Dashboard/Dashboard.js +70 -68
- package/dist/components/media/ImageCompare/image-compare.module.cjs +1 -1
- package/dist/components/media/ImageCompare/image-compare.module.js +6 -6
- package/dist/components/navigation/Anchor/anchor.module.cjs +1 -1
- package/dist/components/navigation/Anchor/anchor.module.js +1 -1
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.cjs +1 -1
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.js +1 -1
- package/dist/components/navigation/Pagination/pagination.module.cjs +1 -1
- package/dist/components/navigation/Pagination/pagination.module.js +6 -6
- package/dist/components/navigation/TabNavigation/tab-navigation.module.cjs +1 -1
- package/dist/components/navigation/TabNavigation/tab-navigation.module.js +1 -1
- package/dist/components/navigation/Tabs/tabs.module.cjs +1 -1
- package/dist/components/navigation/Tabs/tabs.module.js +1 -1
- package/dist/components/overlay/BottomSheet/bottom-sheet.module.cjs +1 -1
- package/dist/components/overlay/BottomSheet/bottom-sheet.module.js +1 -1
- package/dist/components/overlay/Tooltip/Tooltip.cjs +1 -1
- package/dist/components/overlay/Tooltip/Tooltip.js +99 -65
- package/dist/i18n/generated/form.cjs +1 -1
- package/dist/i18n/generated/form.d.ts +1 -1
- package/dist/i18n/generated/form.js +6 -3
- package/dist/i18n/instance.cjs +1 -1
- package/dist/i18n/instance.d.ts +6 -0
- package/dist/i18n/instance.js +21 -18
- package/dist/llms/Alert.md +1 -1
- package/dist/llms/Anchor.md +1 -1
- package/dist/llms/Banner.md +1 -1
- package/dist/llms/Calendar.md +1 -1
- package/dist/llms/ColorPicker.md +3 -1
- package/dist/llms/Notification.md +1 -1
- package/dist/llms/NumberInput.md +1 -1
- package/dist/llms/RangeCalendar.md +1 -1
- package/dist/llms/Switch.md +1 -1
- package/dist/llms/Toast.md +1 -1
- package/dist/llms-full.txt +20 -9
- package/dist/llms.txt +2 -2
- package/dist/locales/en/form.json +3 -0
- package/dist/locales/ja/form.json +3 -0
- package/dist/locales/pt/form.json +3 -0
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +8 -7
|
@@ -1,107 +1,141 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import e from "./tooltip.module.js";
|
|
3
|
-
import t, {
|
|
4
|
-
import
|
|
5
|
-
import { jsx as
|
|
6
|
-
import { FloatingArrow as
|
|
3
|
+
import t, { useLayoutEffect as n, useRef as r, useState as i } from "react";
|
|
4
|
+
import a from "classnames";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { FloatingArrow as c, FloatingPortal as l, arrow as u, autoUpdate as d, flip as f, offset as p, safePolygon as m, shift as h, useDismiss as g, useFloating as _, useFocus as v, useHover as y, useInteractions as b, useMergeRefs as x, useRole as S } from "@floating-ui/react";
|
|
7
7
|
//#region src/components/overlay/Tooltip/Tooltip.tsx
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
8
|
+
function C(e) {
|
|
9
|
+
return e.replace(/\s+/g, " ").trim();
|
|
10
|
+
}
|
|
11
|
+
function w(e) {
|
|
12
|
+
if (e == null || typeof e == "boolean") return "";
|
|
13
|
+
if (typeof e == "string" || typeof e == "number") return String(e);
|
|
14
|
+
if (Array.isArray(e)) return e.map(w).join("");
|
|
15
|
+
if (t.isValidElement(e)) {
|
|
16
|
+
let t = e.props;
|
|
17
|
+
return w(t.children);
|
|
18
|
+
}
|
|
19
|
+
return "";
|
|
20
|
+
}
|
|
21
|
+
function T(e, t) {
|
|
22
|
+
let n = e["aria-labelledby"];
|
|
23
|
+
if (typeof n == "string" && n.trim() && typeof document < "u") return C(n.split(/\s+/).filter(Boolean).map((e) => document.getElementById(e)?.textContent ?? "").join(" "));
|
|
24
|
+
let r = e["aria-label"];
|
|
25
|
+
return C(typeof r == "string" ? r : w(t));
|
|
26
|
+
}
|
|
27
|
+
function E(e, t, n, r) {
|
|
28
|
+
if (!n || !r) return;
|
|
29
|
+
let i = e["aria-describedby"];
|
|
30
|
+
if (typeof i != "string" || !i.trim()) return;
|
|
31
|
+
let a = T(e, t);
|
|
32
|
+
if (!a || a !== n) return;
|
|
33
|
+
let o = i.split(/\s+/).filter((e) => e && e !== r);
|
|
34
|
+
o.length > 0 ? e["aria-describedby"] = o.join(" ") : delete e["aria-describedby"];
|
|
35
|
+
}
|
|
36
|
+
var D = t.createContext(null), O = ({ children: t, className: n, delay: s = 200, open: c, onOpenChange: l, placement: x = "top", variant: C = "default" }) => {
|
|
37
|
+
let [w, T] = i(!1), [E, O] = i(""), k = c ?? w, A = (e) => {
|
|
38
|
+
c === void 0 && T(e), l?.(e);
|
|
39
|
+
}, j = r(null), { refs: M, floatingStyles: N, context: P, placement: F } = _({
|
|
40
|
+
open: k,
|
|
41
|
+
onOpenChange: A,
|
|
42
|
+
placement: x,
|
|
43
|
+
whileElementsMounted: d,
|
|
16
44
|
middleware: [
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
45
|
+
p(8),
|
|
46
|
+
f({ fallbackAxisSideDirection: "start" }),
|
|
47
|
+
h(),
|
|
48
|
+
u({ element: j })
|
|
21
49
|
]
|
|
22
|
-
}),
|
|
50
|
+
}), I = y(P, {
|
|
23
51
|
move: !1,
|
|
24
52
|
delay: {
|
|
25
53
|
open: s,
|
|
26
54
|
close: 100
|
|
27
55
|
},
|
|
28
|
-
handleClose:
|
|
29
|
-
}),
|
|
30
|
-
P,
|
|
31
|
-
F,
|
|
56
|
+
handleClose: m()
|
|
57
|
+
}), L = v(P), R = g(P), z = S(P, { role: "tooltip" }), { getReferenceProps: B, getFloatingProps: V } = b([
|
|
32
58
|
I,
|
|
33
|
-
L
|
|
59
|
+
L,
|
|
60
|
+
R,
|
|
61
|
+
z
|
|
34
62
|
]);
|
|
35
|
-
return /* @__PURE__ */
|
|
63
|
+
return /* @__PURE__ */ o(D.Provider, {
|
|
36
64
|
value: {
|
|
37
|
-
open:
|
|
38
|
-
setOpen:
|
|
39
|
-
refs:
|
|
40
|
-
floatingStyles:
|
|
41
|
-
context:
|
|
42
|
-
getReferenceProps:
|
|
43
|
-
getFloatingProps:
|
|
44
|
-
arrowRef:
|
|
45
|
-
placement:
|
|
46
|
-
variant:
|
|
65
|
+
open: k,
|
|
66
|
+
setOpen: A,
|
|
67
|
+
refs: M,
|
|
68
|
+
floatingStyles: N,
|
|
69
|
+
context: P,
|
|
70
|
+
getReferenceProps: B,
|
|
71
|
+
getFloatingProps: V,
|
|
72
|
+
arrowRef: j,
|
|
73
|
+
placement: F,
|
|
74
|
+
variant: C,
|
|
75
|
+
descriptionText: E,
|
|
76
|
+
setDescriptionText: O,
|
|
77
|
+
floatingId: P.floatingId
|
|
47
78
|
},
|
|
48
|
-
children: /* @__PURE__ */
|
|
49
|
-
className:
|
|
79
|
+
children: /* @__PURE__ */ o("div", {
|
|
80
|
+
className: a("wim-tooltip", e.root, n),
|
|
50
81
|
children: t
|
|
51
82
|
})
|
|
52
83
|
});
|
|
53
|
-
},
|
|
54
|
-
let l = t.useContext(
|
|
84
|
+
}, k = t.forwardRef(({ children: n, className: r, asChild: i, ...s }, c) => {
|
|
85
|
+
let l = t.useContext(D);
|
|
55
86
|
if (l == null) throw Error("Tooltip components must be wrapped in <Tooltip />");
|
|
56
|
-
let u = n.ref, d =
|
|
87
|
+
let u = n.ref, d = x([
|
|
57
88
|
l.refs.setReference,
|
|
58
89
|
c,
|
|
59
90
|
u ?? null
|
|
60
91
|
]);
|
|
61
|
-
if (
|
|
62
|
-
let e = n.props,
|
|
92
|
+
if (i && t.isValidElement(n)) {
|
|
93
|
+
let e = n.props, i = l.getReferenceProps({
|
|
63
94
|
ref: d,
|
|
64
95
|
...s,
|
|
65
96
|
...e,
|
|
66
|
-
className:
|
|
97
|
+
className: a(r, e.className)
|
|
67
98
|
});
|
|
68
|
-
return t.cloneElement(n, {
|
|
69
|
-
...
|
|
99
|
+
return E(i, n, l.descriptionText, l.floatingId), t.cloneElement(n, {
|
|
100
|
+
...i,
|
|
70
101
|
"data-state": l.open ? "open" : "closed"
|
|
71
102
|
});
|
|
72
103
|
}
|
|
73
|
-
|
|
104
|
+
let f = l.getReferenceProps(s);
|
|
105
|
+
return E(f, n, l.descriptionText, l.floatingId), /* @__PURE__ */ o("button", {
|
|
74
106
|
ref: d,
|
|
75
107
|
type: "button",
|
|
76
|
-
className:
|
|
108
|
+
className: a(e.trigger, r),
|
|
77
109
|
"data-state": l.open ? "open" : "closed",
|
|
78
|
-
...
|
|
110
|
+
...f,
|
|
79
111
|
children: n
|
|
80
112
|
});
|
|
81
113
|
});
|
|
82
|
-
|
|
83
|
-
var
|
|
84
|
-
let
|
|
85
|
-
if (
|
|
86
|
-
let { context:
|
|
87
|
-
return
|
|
88
|
-
|
|
114
|
+
k.displayName = "TooltipTrigger";
|
|
115
|
+
var A = t.forwardRef(({ children: r, className: i, style: u, ...d }, f) => {
|
|
116
|
+
let p = t.useContext(D);
|
|
117
|
+
if (p == null) throw Error("Tooltip components must be wrapped in <Tooltip />");
|
|
118
|
+
let { context: m, open: h, refs: g, floatingStyles: _, getFloatingProps: v, arrowRef: y, setDescriptionText: b } = p, S = x([g.setFloating, f]), T = C(w(r));
|
|
119
|
+
return n(() => {
|
|
120
|
+
b(T);
|
|
121
|
+
}, [T, b]), h ? /* @__PURE__ */ o(l, { children: /* @__PURE__ */ s("div", {
|
|
122
|
+
ref: S,
|
|
89
123
|
style: {
|
|
90
|
-
...
|
|
91
|
-
...
|
|
124
|
+
..._,
|
|
125
|
+
...u
|
|
92
126
|
},
|
|
93
|
-
className:
|
|
94
|
-
...
|
|
95
|
-
children: [
|
|
96
|
-
ref:
|
|
97
|
-
context:
|
|
98
|
-
fill:
|
|
99
|
-
strokeWidth: +(
|
|
100
|
-
stroke:
|
|
127
|
+
className: a(e.content, e[p.variant], i),
|
|
128
|
+
...v(d),
|
|
129
|
+
children: [r, /* @__PURE__ */ o(c, {
|
|
130
|
+
ref: y,
|
|
131
|
+
context: m,
|
|
132
|
+
fill: p.variant === "glass" ? "var(--wim-color-glass-bg)" : "var(--wim-comp-tooltip-bg)",
|
|
133
|
+
strokeWidth: +(p.variant === "glass"),
|
|
134
|
+
stroke: p.variant === "glass" ? "var(--wim-color-glass-border)" : "transparent",
|
|
101
135
|
className: e.arrow
|
|
102
136
|
})]
|
|
103
137
|
}) }) : null;
|
|
104
138
|
});
|
|
105
|
-
|
|
139
|
+
A.displayName = "TooltipContent";
|
|
106
140
|
//#endregion
|
|
107
|
-
export {
|
|
141
|
+
export { O as Tooltip, A as TooltipContent, k as TooltipTrigger };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e={name:`form`,resources:{en:{prompt_input:{send_label:`Send`,attach_label:`Attach file`,aria_label:`Prompt input`},ai_feedback:{positive_label:`Helpful`,negative_label:`Not helpful`,regenerate_label:`Regenerate response`,group_label:`Response feedback`},source_citation:{source_label:`Source {{index}}`},code_block:{copy_label:`Copy code`,copied_label:`Copied!`,expand_label:`Expand`,collapse_label:`Collapse`},button:{clear:`Clear`},dropzone:{description:`Drag and drop files here, or click to select`},fileupload:{button:`Choose file`,no_file:`No file selected`,selected:`Selected: {{files}}`},form:{optional:`Optional`,required:`Required`},phone:{select_country:`Select country`,countries:{US:`United States`,JP:`Japan`,GB:`United Kingdom`,AU:`Australia`,DE:`Germany`,FR:`France`,CN:`China`,KR:`South Korea`,IN:`India`,BR:`Brazil`}},select:{no_options:`No options found`},tag_input:{input_label:`Tags`},smart_search:{input_label:`Search`},markdown:{task_done:`Completed task`,task_todo:`Incomplete task`},transfer:{no_data:`No data`,move_to_source:`Move to available`,move_to_target:`Move to selected`,source:`Available`,status_moved_to_source:`Moved to available: {{count}}`,status_moved_to_target:`Moved to selected: {{count}}`,target:`Selected`},password_strength:{very_weak:`Very weak`,weak:`Weak`,fair:`Fair`,strong:`Strong`,very_strong:`Very strong`},image_cropper:{no_image:`No image selected`,position_label:`Image position`,position_hint:`Use the arrow keys to move the image. Hold Shift for larger steps. Home centers it.`,zoom:`Zoom`,rotate:`Rotate`,apply:`Apply Crop`,confirm_title:`Apply Crop`,confirm_message:`Do you want to save the image with this crop?`,confirm:`Apply`,cancel:`Cancel`},code_diff_viewer:{copy_label:`Copy`,copied_label:`Copied!`,apply:`Apply`,applied:`Applied`,reject:`Reject`,split_view:`Split`,unified_view:`Unified`},terminal:{copy_label:`Copy output`,copied_label:`Copied!`,clear_label:`Clear`},agent_status:{idle:`Idle`,thinking:`Thinking…`,running:`Running…`,waiting:`Waiting…`,done:`Done`,error:`Error`},artifact_overlay:{minimize:`Minimize`,maximize:`Maximize`}},ja:{agent_status:{done:`完了`,error:`エラー`,idle:`待機中`,running:`実行中…`,thinking:`思考中…`,waiting:`待機中…`},ai_feedback:{group_label:`回答へのフィードバック`,negative_label:`役に立たなかった`,positive_label:`役に立った`,regenerate_label:`再生成`},artifact_overlay:{maximize:`最大化`,minimize:`最小化`},button:{clear:`クリア`},code_block:{collapse_label:`折りたたむ`,copied_label:`コピーしました`,copy_label:`コードをコピー`,expand_label:`展開`},code_diff_viewer:{applied:`適用済み`,apply:`適用`,copied_label:`コピーしました!`,copy_label:`コピー`,reject:`却下`,split_view:`分割`,unified_view:`統合`},dropzone:{description:`ここにファイルをドラッグ&ドロップ、またはクリックして選択`},fileupload:{button:`ファイルを選択`,no_file:`選択されていません`,selected:`選択したファイル: {{files}}`},form:{optional:`任意`,required:`必須`},image_cropper:{apply:`クロップを適用`,cancel:`キャンセル`,confirm:`適用`,confirm_message:`この範囲で画像を保存しますか?`,confirm_title:`クロップの適用`,no_image:`画像が選択されていません`,position_hint:`矢印キーで画像を動かします。Shift を押しながらだと大きく動きます。Home で中央に戻ります。`,position_label:`画像の位置`,rotate:`回転`,zoom:`ズーム`},password_strength:{fair:`普通`,strong:`強い`,very_strong:`とても強い`,very_weak:`とても弱い`,weak:`弱い`},phone:{select_country:`国を選択`,countries:{US:`アメリカ合衆国`,JP:`日本`,GB:`イギリス`,AU:`オーストラリア`,DE:`ドイツ`,FR:`フランス`,CN:`中国`,KR:`韓国`,IN:`インド`,BR:`ブラジル`}},prompt_input:{aria_label:`プロンプト入力`,attach_label:`ファイルを添付`,send_label:`送信`},select:{no_options:`該当する選択肢がありません`},tag_input:{input_label:`タグ`},smart_search:{input_label:`検索`},markdown:{task_done:`完了したタスク`,task_todo:`未完了のタスク`},source_citation:{source_label:`ソース {{index}}`},terminal:{clear_label:`クリア`,copied_label:`コピーしました!`,copy_label:`出力をコピー`},transfer:{move_to_source:`選択可能に移動`,move_to_target:`選択済みに移動`,no_data:`データがありません`,source:`選択可能`,status_moved_to_source:`{{count}} 件を選択可能リストに移動しました`,status_moved_to_target:`{{count}} 件を選択済みリストに移動しました`,target:`選択済み`}},pt:{agent_status:{done:`Concluído`,error:`Erro`,idle:`Ocioso`,running:`Executando…`,thinking:`Pensando…`,waiting:`Aguardando…`},ai_feedback:{group_label:`Avaliação da resposta`,negative_label:`Não foi útil`,positive_label:`Útil`,regenerate_label:`Regenerar resposta`},artifact_overlay:{maximize:`Maximizar`,minimize:`Minimizar`},button:{clear:`Limpar`},code_block:{collapse_label:`Recolher`,copied_label:`Copiado!`,copy_label:`Copiar código`,expand_label:`Expandir`},code_diff_viewer:{applied:`Aplicado`,apply:`Aplicar`,copied_label:`Copiado!`,copy_label:`Copiar`,reject:`Rejeitar`,split_view:`Dividido`,unified_view:`Unificado`},dropzone:{description:`Arraste e solte os arquivos aqui ou clique para selecionar`},fileupload:{button:`Selecionar arquivo`,no_file:`Nenhum arquivo selecionado`,selected:`Selecionado: {{files}}`},form:{optional:`Opcional`,required:`Obrigatório`},image_cropper:{apply:`Aplicar recorte`,cancel:`Cancelar`,confirm:`Aplicar`,confirm_message:`Deseja salvar a imagem com este recorte?`,confirm_title:`Aplicar recorte`,no_image:`Nenhuma imagem selecionada`,position_hint:`Use as setas para mover a imagem. Segure Shift para passos maiores. Home centraliza a imagem.`,position_label:`Posição da imagem`,rotate:`Rodar`,zoom:`Zoom`},password_strength:{fair:`Razoável`,strong:`Forte`,very_strong:`Muito forte`,very_weak:`Muito fraca`,weak:`Fraca`},phone:{select_country:`Selecionar país`,countries:{US:`Estados Unidos`,JP:`Japão`,GB:`Reino Unido`,AU:`Austrália`,DE:`Alemanha`,FR:`França`,CN:`China`,KR:`Coreia do Sul`,IN:`Índia`,BR:`Brasil`}},prompt_input:{aria_label:`Campo de prompt`,attach_label:`Anexar arquivo`,send_label:`Enviar`},select:{no_options:`Nenhuma opção encontrada`},tag_input:{input_label:`Tags`},smart_search:{input_label:`Pesquisar`},markdown:{task_done:`Tarefa concluída`,task_todo:`Tarefa pendente`},source_citation:{source_label:`Fonte {{index}}`},terminal:{clear_label:`Limpar`,copied_label:`Copiado!`,copy_label:`Copiar saída`},transfer:{move_to_source:`Mover para disponível`,move_to_target:`Mover para selecionado`,no_data:`Sem dados`,source:`Disponível`,status_moved_to_source:`Movidos para a lista disponível: {{count}}`,status_moved_to_target:`Movidos para a lista selecionada: {{count}}`,target:`Selecionado`}}}};exports.formNs=e;
|
|
2
|
+
var e={name:`form`,resources:{en:{prompt_input:{send_label:`Send`,attach_label:`Attach file`,aria_label:`Prompt input`},ai_feedback:{positive_label:`Helpful`,negative_label:`Not helpful`,regenerate_label:`Regenerate response`,group_label:`Response feedback`},source_citation:{source_label:`Source {{index}}`},code_block:{copy_label:`Copy code`,copied_label:`Copied!`,expand_label:`Expand`,collapse_label:`Collapse`},button:{clear:`Clear`},dropzone:{description:`Drag and drop files here, or click to select`},fileupload:{button:`Choose file`,no_file:`No file selected`,selected:`Selected: {{files}}`},form:{optional:`Optional`,required:`Required`},phone:{select_country:`Select country`,countries:{US:`United States`,JP:`Japan`,GB:`United Kingdom`,AU:`Australia`,DE:`Germany`,FR:`France`,CN:`China`,KR:`South Korea`,IN:`India`,BR:`Brazil`}},select:{no_options:`No options found`},tag_input:{input_label:`Tags`},smart_search:{input_label:`Search`},markdown:{task_done:`Completed task`,task_todo:`Incomplete task`},transfer:{no_data:`No data`,move_to_source:`Move to available`,move_to_target:`Move to selected`,source:`Available`,status_moved_to_source:`Moved to available: {{count}}`,status_moved_to_target:`Moved to selected: {{count}}`,target:`Selected`},password_strength:{very_weak:`Very weak`,weak:`Weak`,fair:`Fair`,strong:`Strong`,very_strong:`Very strong`},image_cropper:{no_image:`No image selected`,position_label:`Image position`,position_hint:`Use the arrow keys to move the image. Hold Shift for larger steps. Home centers it.`,zoom:`Zoom`,rotate:`Rotate`,apply:`Apply Crop`,confirm_title:`Apply Crop`,confirm_message:`Do you want to save the image with this crop?`,confirm:`Apply`,cancel:`Cancel`},code_diff_viewer:{copy_label:`Copy`,copied_label:`Copied!`,apply:`Apply`,applied:`Applied`,reject:`Reject`,split_view:`Split`,unified_view:`Unified`},terminal:{copy_label:`Copy output`,copied_label:`Copied!`,clear_label:`Clear`},agent_status:{idle:`Idle`,thinking:`Thinking…`,running:`Running…`,waiting:`Waiting…`,done:`Done`,error:`Error`},artifact_overlay:{minimize:`Minimize`,maximize:`Maximize`},color_picker:{swatches:`Color swatches`}},ja:{agent_status:{done:`完了`,error:`エラー`,idle:`待機中`,running:`実行中…`,thinking:`思考中…`,waiting:`待機中…`},ai_feedback:{group_label:`回答へのフィードバック`,negative_label:`役に立たなかった`,positive_label:`役に立った`,regenerate_label:`再生成`},artifact_overlay:{maximize:`最大化`,minimize:`最小化`},button:{clear:`クリア`},code_block:{collapse_label:`折りたたむ`,copied_label:`コピーしました`,copy_label:`コードをコピー`,expand_label:`展開`},code_diff_viewer:{applied:`適用済み`,apply:`適用`,copied_label:`コピーしました!`,copy_label:`コピー`,reject:`却下`,split_view:`分割`,unified_view:`統合`},dropzone:{description:`ここにファイルをドラッグ&ドロップ、またはクリックして選択`},fileupload:{button:`ファイルを選択`,no_file:`選択されていません`,selected:`選択したファイル: {{files}}`},form:{optional:`任意`,required:`必須`},image_cropper:{apply:`クロップを適用`,cancel:`キャンセル`,confirm:`適用`,confirm_message:`この範囲で画像を保存しますか?`,confirm_title:`クロップの適用`,no_image:`画像が選択されていません`,position_hint:`矢印キーで画像を動かします。Shift を押しながらだと大きく動きます。Home で中央に戻ります。`,position_label:`画像の位置`,rotate:`回転`,zoom:`ズーム`},password_strength:{fair:`普通`,strong:`強い`,very_strong:`とても強い`,very_weak:`とても弱い`,weak:`弱い`},phone:{select_country:`国を選択`,countries:{US:`アメリカ合衆国`,JP:`日本`,GB:`イギリス`,AU:`オーストラリア`,DE:`ドイツ`,FR:`フランス`,CN:`中国`,KR:`韓国`,IN:`インド`,BR:`ブラジル`}},prompt_input:{aria_label:`プロンプト入力`,attach_label:`ファイルを添付`,send_label:`送信`},select:{no_options:`該当する選択肢がありません`},tag_input:{input_label:`タグ`},smart_search:{input_label:`検索`},markdown:{task_done:`完了したタスク`,task_todo:`未完了のタスク`},source_citation:{source_label:`ソース {{index}}`},terminal:{clear_label:`クリア`,copied_label:`コピーしました!`,copy_label:`出力をコピー`},transfer:{move_to_source:`選択可能に移動`,move_to_target:`選択済みに移動`,no_data:`データがありません`,source:`選択可能`,status_moved_to_source:`{{count}} 件を選択可能リストに移動しました`,status_moved_to_target:`{{count}} 件を選択済みリストに移動しました`,target:`選択済み`},color_picker:{swatches:`色の見本`}},pt:{agent_status:{done:`Concluído`,error:`Erro`,idle:`Ocioso`,running:`Executando…`,thinking:`Pensando…`,waiting:`Aguardando…`},ai_feedback:{group_label:`Avaliação da resposta`,negative_label:`Não foi útil`,positive_label:`Útil`,regenerate_label:`Regenerar resposta`},artifact_overlay:{maximize:`Maximizar`,minimize:`Minimizar`},button:{clear:`Limpar`},code_block:{collapse_label:`Recolher`,copied_label:`Copiado!`,copy_label:`Copiar código`,expand_label:`Expandir`},code_diff_viewer:{applied:`Aplicado`,apply:`Aplicar`,copied_label:`Copiado!`,copy_label:`Copiar`,reject:`Rejeitar`,split_view:`Dividido`,unified_view:`Unificado`},dropzone:{description:`Arraste e solte os arquivos aqui ou clique para selecionar`},fileupload:{button:`Selecionar arquivo`,no_file:`Nenhum arquivo selecionado`,selected:`Selecionado: {{files}}`},form:{optional:`Opcional`,required:`Obrigatório`},image_cropper:{apply:`Aplicar recorte`,cancel:`Cancelar`,confirm:`Aplicar`,confirm_message:`Deseja salvar a imagem com este recorte?`,confirm_title:`Aplicar recorte`,no_image:`Nenhuma imagem selecionada`,position_hint:`Use as setas para mover a imagem. Segure Shift para passos maiores. Home centraliza a imagem.`,position_label:`Posição da imagem`,rotate:`Rodar`,zoom:`Zoom`},password_strength:{fair:`Razoável`,strong:`Forte`,very_strong:`Muito forte`,very_weak:`Muito fraca`,weak:`Fraca`},phone:{select_country:`Selecionar país`,countries:{US:`Estados Unidos`,JP:`Japão`,GB:`Reino Unido`,AU:`Austrália`,DE:`Alemanha`,FR:`França`,CN:`China`,KR:`Coreia do Sul`,IN:`Índia`,BR:`Brasil`}},prompt_input:{aria_label:`Campo de prompt`,attach_label:`Anexar arquivo`,send_label:`Enviar`},select:{no_options:`Nenhuma opção encontrada`},tag_input:{input_label:`Tags`},smart_search:{input_label:`Pesquisar`},markdown:{task_done:`Tarefa concluída`,task_todo:`Tarefa pendente`},source_citation:{source_label:`Fonte {{index}}`},terminal:{clear_label:`Limpar`,copied_label:`Copiado!`,copy_label:`Copiar saída`},transfer:{move_to_source:`Mover para disponível`,move_to_target:`Mover para selecionado`,no_data:`Sem dados`,source:`Disponível`,status_moved_to_source:`Movidos para a lista disponível: {{count}}`,status_moved_to_target:`Movidos para a lista selecionada: {{count}}`,target:`Selecionado`},color_picker:{swatches:`Amostras de cor`}}}};exports.formNs=e;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { WimNamespace } from '../instance';
|
|
2
|
-
export type FormKey = "agent_status.done" | "agent_status.error" | "agent_status.idle" | "agent_status.running" | "agent_status.thinking" | "agent_status.waiting" | "ai_feedback.group_label" | "ai_feedback.negative_label" | "ai_feedback.positive_label" | "ai_feedback.regenerate_label" | "artifact_overlay.maximize" | "artifact_overlay.minimize" | "button.clear" | "button.close" | "button.consistency" | "button.dismiss" | "button.label" | "code_block.collapse_label" | "code_block.copied_label" | "code_block.copy_label" | "code_block.expand_label" | "code_diff_viewer.applied" | "code_diff_viewer.apply" | "code_diff_viewer.copied_label" | "code_diff_viewer.copy_label" | "code_diff_viewer.reject" | "code_diff_viewer.split_view" | "code_diff_viewer.unified_view" | "combobox.no_results" | "dropzone.description" | "fileupload.button" | "fileupload.no_file" | "fileupload.selected" | "form.optional" | "form.required" | "image_cropper.apply" | "image_cropper.cancel" | "image_cropper.confirm" | "image_cropper.confirm_message" | "image_cropper.confirm_title" | "image_cropper.no_image" | "image_cropper.position_hint" | "image_cropper.position_label" | "image_cropper.rotate" | "image_cropper.zoom" | "markdown.task_done" | "markdown.task_todo" | "otp.digit" | "password_strength.fair" | "password_strength.strong" | "password_strength.very_strong" | "password_strength.very_weak" | "password_strength.weak" | "phone.countries.AU" | "phone.countries.BR" | "phone.countries.CN" | "phone.countries.DE" | "phone.countries.FR" | "phone.countries.GB" | "phone.countries.IN" | "phone.countries.JP" | "phone.countries.KR" | "phone.countries.US" | "phone.number" | "phone.select_country" | "prompt_input.aria_label" | "prompt_input.attach_label" | "prompt_input.send_label" | "select.no_options" | "select.option" | "smart_search.input_label" | "source_citation.open_source" | "source_citation.source_label" | "tag_input.input_label" | "terminal.clear_label" | "terminal.copied_label" | "terminal.copy_label" | "transfer.move_to_source" | "transfer.move_to_target" | "transfer.no_data" | "transfer.source" | "transfer.status_moved_to_source" | "transfer.status_moved_to_target" | "transfer.target";
|
|
2
|
+
export type FormKey = "agent_status.done" | "agent_status.error" | "agent_status.idle" | "agent_status.running" | "agent_status.thinking" | "agent_status.waiting" | "ai_feedback.group_label" | "ai_feedback.negative_label" | "ai_feedback.positive_label" | "ai_feedback.regenerate_label" | "artifact_overlay.maximize" | "artifact_overlay.minimize" | "button.clear" | "button.close" | "button.consistency" | "button.dismiss" | "button.label" | "code_block.collapse_label" | "code_block.copied_label" | "code_block.copy_label" | "code_block.expand_label" | "code_diff_viewer.applied" | "code_diff_viewer.apply" | "code_diff_viewer.copied_label" | "code_diff_viewer.copy_label" | "code_diff_viewer.reject" | "code_diff_viewer.split_view" | "code_diff_viewer.unified_view" | "color_picker.swatches" | "combobox.no_results" | "dropzone.description" | "fileupload.button" | "fileupload.no_file" | "fileupload.selected" | "form.optional" | "form.required" | "image_cropper.apply" | "image_cropper.cancel" | "image_cropper.confirm" | "image_cropper.confirm_message" | "image_cropper.confirm_title" | "image_cropper.no_image" | "image_cropper.position_hint" | "image_cropper.position_label" | "image_cropper.rotate" | "image_cropper.zoom" | "markdown.task_done" | "markdown.task_todo" | "otp.digit" | "password_strength.fair" | "password_strength.strong" | "password_strength.very_strong" | "password_strength.very_weak" | "password_strength.weak" | "phone.countries.AU" | "phone.countries.BR" | "phone.countries.CN" | "phone.countries.DE" | "phone.countries.FR" | "phone.countries.GB" | "phone.countries.IN" | "phone.countries.JP" | "phone.countries.KR" | "phone.countries.US" | "phone.number" | "phone.select_country" | "prompt_input.aria_label" | "prompt_input.attach_label" | "prompt_input.send_label" | "select.no_options" | "select.option" | "smart_search.input_label" | "source_citation.open_source" | "source_citation.source_label" | "tag_input.input_label" | "terminal.clear_label" | "terminal.copied_label" | "terminal.copy_label" | "transfer.move_to_source" | "transfer.move_to_target" | "transfer.no_data" | "transfer.source" | "transfer.status_moved_to_source" | "transfer.status_moved_to_target" | "transfer.target";
|
|
3
3
|
export declare const formNs: WimNamespace<"form", FormKey>;
|
|
@@ -108,7 +108,8 @@ var e = {
|
|
|
108
108
|
artifact_overlay: {
|
|
109
109
|
minimize: "Minimize",
|
|
110
110
|
maximize: "Maximize"
|
|
111
|
-
}
|
|
111
|
+
},
|
|
112
|
+
color_picker: { swatches: "Color swatches" }
|
|
112
113
|
},
|
|
113
114
|
ja: {
|
|
114
115
|
agent_status: {
|
|
@@ -215,7 +216,8 @@ var e = {
|
|
|
215
216
|
status_moved_to_source: "{{count}} 件を選択可能リストに移動しました",
|
|
216
217
|
status_moved_to_target: "{{count}} 件を選択済みリストに移動しました",
|
|
217
218
|
target: "選択済み"
|
|
218
|
-
}
|
|
219
|
+
},
|
|
220
|
+
color_picker: { swatches: "色の見本" }
|
|
219
221
|
},
|
|
220
222
|
pt: {
|
|
221
223
|
agent_status: {
|
|
@@ -322,7 +324,8 @@ var e = {
|
|
|
322
324
|
status_moved_to_source: "Movidos para a lista disponível: {{count}}",
|
|
323
325
|
status_moved_to_target: "Movidos para a lista selecionada: {{count}}",
|
|
324
326
|
target: "Selecionado"
|
|
325
|
-
}
|
|
327
|
+
},
|
|
328
|
+
color_picker: { swatches: "Amostras de cor" }
|
|
326
329
|
}
|
|
327
330
|
}
|
|
328
331
|
};
|
package/dist/i18n/instance.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("./generated/locales.cjs");var t=`en`,n=e.wimLocales.includes(t)?t:e.wimLocales[0]??t,r=new Set;function
|
|
2
|
+
const e=require("./generated/locales.cjs");var t=`en`,n=e.wimLocales.includes(t)?t:e.wimLocales[0]??t,r=n,i=new Set;function a(){return n}function o(){return r}function s(t){let a=typeof t==`string`?t.split(`-`)[0]:``,o=e.wimLocales.includes(t)?t:e.wimLocales.includes(a)?a:t;if(o!==n||t!==r){n=o,r=t;for(let e of i)e()}}function c(e){return i.add(e),()=>i.delete(e)}function l(e,t){return t.split(`.`).reduce((e,t)=>{if(e&&typeof e==`object`)return e[t]},e)}function u(e,t,n){let r=n.indexOf(`:`);if(r!==-1){let i=l(t.find(e=>e.name===n.slice(0,r))?.resources[e],n.slice(r+1));if(i!==void 0)return i}for(let r of t){let t=l(r.resources[e],n);if(t!==void 0)return t}}function d(e,t){return t?e.replace(/\{\{\s*([\w.]+)\s*\}\}/g,(e,n)=>{let r=t[n];return r==null?e:String(r)}):e}function f(e,r,i){let a=u(n,e,r);return a===void 0&&n!==t&&(a=u(t,e,r)),typeof a==`string`?d(a,i):i?.defaultValue??r}exports.getWimFormatLocale=o,exports.getWimLocale=a,exports.setWimLocale=s,exports.subscribeWimLocale=c,exports.wimTranslate=f;
|
package/dist/i18n/instance.d.ts
CHANGED
|
@@ -12,9 +12,15 @@ export interface WimNamespace<Name extends string = string, Key extends string =
|
|
|
12
12
|
}
|
|
13
13
|
/** 現在のロケール(例: "en" / "ja" / "pt")を返す。 */
|
|
14
14
|
export declare function getWimLocale(): string;
|
|
15
|
+
/**
|
|
16
|
+
* 暦の計算(`Intl`)に使うロケール。`setWimLocale` に渡したままの値("en-GB" など)。
|
|
17
|
+
* `Intl` が読める値とは限らないので、使う側で `toIntlLocale` を通す。部品の中だけで使う。
|
|
18
|
+
*/
|
|
19
|
+
export declare function getWimFormatLocale(): string;
|
|
15
20
|
/**
|
|
16
21
|
* ライブラリ内蔵コンポーネントの表示言語を切り替える。
|
|
17
22
|
* 未対応の言語コードは言語サブタグ("ja-JP" → "ja")で解決を試みる。
|
|
23
|
+
* 地域("en-GB" の "GB")は文言には効かないが、暦(Calendar の週の始まり・曜日名・月名)には効く。
|
|
18
24
|
*/
|
|
19
25
|
export declare function setWimLocale(locale: string): void;
|
|
20
26
|
/** ロケール変更を購読する(React 連携用)。返り値で解除。 */
|
package/dist/i18n/instance.js
CHANGED
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { wimLocales as e } from "./generated/locales.js";
|
|
3
3
|
//#region src/i18n/instance.ts
|
|
4
|
-
var t = "en", n = e.includes(t) ? t : e[0] ?? t, r = /* @__PURE__ */ new Set();
|
|
5
|
-
function
|
|
4
|
+
var t = "en", n = e.includes(t) ? t : e[0] ?? t, r = n, i = /* @__PURE__ */ new Set();
|
|
5
|
+
function a() {
|
|
6
6
|
return n;
|
|
7
7
|
}
|
|
8
|
-
function
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
function o() {
|
|
9
|
+
return r;
|
|
10
|
+
}
|
|
11
|
+
function s(t) {
|
|
12
|
+
let a = typeof t == "string" ? t.split("-")[0] : "", o = e.includes(t) ? t : e.includes(a) ? a : t;
|
|
13
|
+
if (o !== n || t !== r) {
|
|
14
|
+
n = o, r = t;
|
|
15
|
+
for (let e of i) e();
|
|
13
16
|
}
|
|
14
17
|
}
|
|
15
|
-
function
|
|
16
|
-
return
|
|
18
|
+
function c(e) {
|
|
19
|
+
return i.add(e), () => i.delete(e);
|
|
17
20
|
}
|
|
18
|
-
function
|
|
21
|
+
function l(e, t) {
|
|
19
22
|
return t.split(".").reduce((e, t) => {
|
|
20
23
|
if (e && typeof e == "object") return e[t];
|
|
21
24
|
}, e);
|
|
22
25
|
}
|
|
23
|
-
function
|
|
26
|
+
function u(e, t, n) {
|
|
24
27
|
let r = n.indexOf(":");
|
|
25
28
|
if (r !== -1) {
|
|
26
|
-
let i =
|
|
29
|
+
let i = l(t.find((e) => e.name === n.slice(0, r))?.resources[e], n.slice(r + 1));
|
|
27
30
|
if (i !== void 0) return i;
|
|
28
31
|
}
|
|
29
32
|
for (let r of t) {
|
|
30
|
-
let t =
|
|
33
|
+
let t = l(r.resources[e], n);
|
|
31
34
|
if (t !== void 0) return t;
|
|
32
35
|
}
|
|
33
36
|
}
|
|
34
|
-
function
|
|
37
|
+
function d(e, t) {
|
|
35
38
|
return t ? e.replace(/\{\{\s*([\w.]+)\s*\}\}/g, (e, n) => {
|
|
36
39
|
let r = t[n];
|
|
37
40
|
return r == null ? e : String(r);
|
|
38
41
|
}) : e;
|
|
39
42
|
}
|
|
40
|
-
function
|
|
41
|
-
let a =
|
|
42
|
-
return a === void 0 && n !== t && (a =
|
|
43
|
+
function f(e, r, i) {
|
|
44
|
+
let a = u(n, e, r);
|
|
45
|
+
return a === void 0 && n !== t && (a = u(t, e, r)), typeof a == "string" ? d(a, i) : i?.defaultValue ?? r;
|
|
43
46
|
}
|
|
44
47
|
//#endregion
|
|
45
|
-
export {
|
|
48
|
+
export { o as getWimFormatLocale, a as getWimLocale, s as setWimLocale, c as subscribeWimLocale, f as wimTranslate };
|
package/dist/llms/Alert.md
CHANGED
|
@@ -16,7 +16,7 @@ import { Alert } from "wimui/feedback";
|
|
|
16
16
|
- `description: React.ReactNode` — Description text of the alert
|
|
17
17
|
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the alert @default "default"
|
|
18
18
|
- `icon: React.ReactNode` — Custom icon. When omitted, a default icon matching the intent is displayed.
|
|
19
|
-
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button.
|
|
19
|
+
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button. When the close button disappears while it has focus, focus moves to the focusable element just before the component. To send it somewhere else, move focus inside this callback.
|
|
20
20
|
- `className: string` — Additional CSS class name
|
|
21
21
|
- `children: React.ReactNode` — Content of the alert (treated as the description)
|
|
22
22
|
|
package/dist/llms/Anchor.md
CHANGED
package/dist/llms/Banner.md
CHANGED
|
@@ -16,7 +16,7 @@ import { Banner } from "wimui/feedback";
|
|
|
16
16
|
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the banner @default "default"
|
|
17
17
|
- `icon: boolean | React.ReactNode` = true — Whether to show the icon, or a custom icon element @default true
|
|
18
18
|
- `extra: React.ReactNode` — Action element (e.g. a Button component)
|
|
19
|
-
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button.
|
|
19
|
+
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button. When the close button disappears while it has focus, focus moves to the focusable element just before the component. To send it somewhere else, move focus inside this callback.
|
|
20
20
|
- `className: string` — Additional CSS class name
|
|
21
21
|
- `children: React.ReactNode` — Content of the banner
|
|
22
22
|
|
package/dist/llms/Calendar.md
CHANGED
|
@@ -17,7 +17,7 @@ import { Calendar } from "wimui/data-display";
|
|
|
17
17
|
- `maxDate: Date` — Latest selectable date
|
|
18
18
|
- `disabledDates: Date[]` — Dates that cannot be selected
|
|
19
19
|
- `isDateDisabled: (date: Date) => boolean` — Function returning whether a given date is disabled
|
|
20
|
-
- `weekStartsOn: 0 | 1`
|
|
20
|
+
- `weekStartsOn: 0 | 1` — First day of the week (0 = Sunday, 1 = Monday). In `Calendar`, it defaults to the locale's first day (`en-GB` and `de` start on Monday; a locale that starts on Saturday, or a browser without `Intl.Locale` week info, falls back to Sunday).
|
|
21
21
|
- `className: string` — Additional class names
|
|
22
22
|
- `disabled: boolean` = false — Whether the calendar is disabled
|
|
23
23
|
- `onChange: (date: Date) => void` — Callback when a date is selected (single mode)
|
package/dist/llms/ColorPicker.md
CHANGED
|
@@ -14,6 +14,8 @@ import { ColorPicker } from "wimui/form";
|
|
|
14
14
|
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
15
15
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
16
16
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
17
|
+
- `swatches: ColorPickerSwatch[]` — Preset colors shown next to the field. Choosing one sets it as the value and fires `onChange` like the native picker does. Use `#rrggbb` (or `#rgb`). Name the field with the `label` prop rather than wrapping it in a `<label>`: the swatch buttons inside a `<label>` would be read as part of the field's name. With react-hook-form, use `Controller` rather than `register` if the form is reset: `reset()` writes the input without an event, so the selected swatch would not follow until the next change.
|
|
18
|
+
- `swatchesLabel: string` — Accessible name of the swatch group
|
|
17
19
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
18
20
|
- `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
|
|
19
21
|
- `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
|
|
@@ -40,7 +42,7 @@ import { ColorPicker } from "wimui/form";
|
|
|
40
42
|
|
|
41
43
|
## Design tokens it reads
|
|
42
44
|
|
|
43
|
-
`--wim-height-md`, `--wim-radius-sm`
|
|
45
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-color-border`, `--wim-color-focus-outline`, `--wim-color-surface`, `--wim-color-text-primary`, `--wim-height-md`, `--wim-opacity-disabled`, `--wim-radius-sm`, `--wim-spacing-sm`, `--wim-spacing-xs`, `--wim-swatch-fill`, `--wim-tap-target-min`
|
|
44
46
|
|
|
45
47
|
---
|
|
46
48
|
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
|
@@ -16,7 +16,7 @@ import { Notification } from "wimui/feedback";
|
|
|
16
16
|
- `description: ReactNode` — The description of notification
|
|
17
17
|
- `icon: ReactNode` — The icon of notification
|
|
18
18
|
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — The intent of notification @default "default"
|
|
19
|
-
- `onClose: (id?: string) => void` — Callback when notification is closed
|
|
19
|
+
- `onClose: (id?: string) => void` — Callback when notification is closed. When the close button disappears while it has focus, focus moves to the focusable element just before the component. To send it somewhere else, move focus inside this callback.
|
|
20
20
|
- `closable: boolean` = true — Whether to show close button
|
|
21
21
|
- `className: string` — Additional class name
|
|
22
22
|
- `aria-label: string` — Accessible name for the notification.
|
package/dist/llms/NumberInput.md
CHANGED
|
@@ -15,7 +15,7 @@ import { NumberInput } from "wimui/form";
|
|
|
15
15
|
|
|
16
16
|
- `mode: "number" | "text"` = "number" — 'number': uses the native type="number" (e.g. quantity steppers) 'text': uses type="text" + inputmode (e.g. card numbers or IDs where leading zeros must be kept)
|
|
17
17
|
- `hideSpinButton: boolean` = true — Whether to hide the spin buttons
|
|
18
|
-
- `allowDecimal: boolean` = false — Whether to allow
|
|
18
|
+
- `allowDecimal: boolean` = false — Whether to allow decimals (effective only when mode="number"). When false, both "." and "," are blocked — a browser in a locale that writes decimals with a comma takes "," as the decimal separator.
|
|
19
19
|
- `allowNegative: boolean` = false — Whether to allow negative numbers (effective only when mode="number")
|
|
20
20
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
21
21
|
|
|
@@ -20,7 +20,7 @@ import { RangeCalendar } from "wimui/data-display";
|
|
|
20
20
|
- `maxDate: Date` — 選択可能な最大日付。
|
|
21
21
|
- `disabledDates: Date[]` — 無効化する日付の配列。
|
|
22
22
|
- `isDateDisabled: (date: Date) => boolean` — 特定の日付を無効化する関数。
|
|
23
|
-
- `weekStartsOn: 0 | 1` —
|
|
23
|
+
- `weekStartsOn: 0 | 1` — First day of the week (0 = Sunday, 1 = Monday). Defaults to the locale's first day, as in `Calendar`.
|
|
24
24
|
|
|
25
25
|
---
|
|
26
26
|
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
package/dist/llms/Switch.md
CHANGED
|
@@ -21,7 +21,7 @@ import { Switch } from "wimui/form";
|
|
|
21
21
|
|
|
22
22
|
## Design tokens it reads
|
|
23
23
|
|
|
24
|
-
`--wim-border-width-thick`, `--wim-color-border-secondary`, `--wim-color-danger`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-text-danger`, `--wim-color-white`, `--wim-duration-base`, `--wim-duration-fast`, `--wim-duration-ultra-fast`, `--wim-easing-entrance`, `--wim-easing-standard`, `--wim-opacity-ghost`, `--wim-radius-full`, `--wim-scale-active`, `--wim-shadow-error-ring`, `--wim-shadow-focus`, `--wim-shadow-sm`, `--wim-spacing-2xs`, `--wim-spacing-sm`, `--wim-switch-height-lg`, `--wim-switch-height-md`, `--wim-switch-height-sm`, `--wim-switch-width-lg`, `--wim-switch-width-md`, `--wim-switch-width-sm`, `--wim-tap-target-min`
|
|
24
|
+
`--wim-border-width-thick`, `--wim-border-width-thin`, `--wim-color-border-secondary`, `--wim-color-danger`, `--wim-color-focus-outline`, `--wim-color-primary`, `--wim-color-text-danger`, `--wim-color-white`, `--wim-duration-base`, `--wim-duration-fast`, `--wim-duration-ultra-fast`, `--wim-easing-entrance`, `--wim-easing-standard`, `--wim-opacity-ghost`, `--wim-radius-full`, `--wim-scale-active`, `--wim-shadow-error-ring`, `--wim-shadow-focus`, `--wim-shadow-sm`, `--wim-spacing-2xs`, `--wim-spacing-sm`, `--wim-switch-height-lg`, `--wim-switch-height-md`, `--wim-switch-height-sm`, `--wim-switch-width-lg`, `--wim-switch-width-md`, `--wim-switch-width-sm`, `--wim-tap-target-min`
|
|
25
25
|
|
|
26
26
|
---
|
|
27
27
|
Setup, composition rules and the full catalog: `llms.txt` / `llms-full.txt` in the same package.
|
package/dist/llms/Toast.md
CHANGED
|
@@ -17,7 +17,7 @@ import { Toast } from "wimui/feedback";
|
|
|
17
17
|
- `title: string` — Title of the toast.
|
|
18
18
|
- `description: string` — Description text displayed below the title.
|
|
19
19
|
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the toast. @default "default"
|
|
20
|
-
- `duration: number` = 3000 — Time in milliseconds before the toast closes automatically. Set 0 to disable auto-close. @default 3000
|
|
20
|
+
- `duration: number` = 3000 — Time in milliseconds before the toast closes automatically. The timer pauses while the pointer is over the toast or focus is inside it, and resumes from the remaining time. Set 0 to disable auto-close. @default 3000
|
|
21
21
|
- `open: boolean` = true — Whether the toast is shown. @default true
|
|
22
22
|
- `onClose: (id?: string) => void` — Called with the toast id when the toast is closed.
|
|
23
23
|
- `className: string` — Additional CSS class name.
|
package/dist/llms-full.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.74.2 — a React 19 component library: 230 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -1063,6 +1063,14 @@ so the unit does not have to be repeated in the label.
|
|
|
1063
1063
|
- `intent: "default" | "danger"` = "default" — Semantic intent of the field (e.g. error state)
|
|
1064
1064
|
- `variant: "outline" | "ghost"` = "outline" — Visual style variant of the field
|
|
1065
1065
|
- `fullWidth: boolean` = false — Whether to take full width of parent
|
|
1066
|
+
- `swatches: ColorPickerSwatch[]` — Preset colors shown next to the field. Choosing one sets it as the value
|
|
1067
|
+
and fires `onChange` like the native picker does. Use `#rrggbb` (or `#rgb`).
|
|
1068
|
+
Name the field with the `label` prop rather than wrapping it in a `<label>`:
|
|
1069
|
+
the swatch buttons inside a `<label>` would be read as part of the field's name.
|
|
1070
|
+
With react-hook-form, use `Controller` rather than `register` if the form is
|
|
1071
|
+
reset: `reset()` writes the input without an event, so the selected swatch
|
|
1072
|
+
would not follow until the next change.
|
|
1073
|
+
- `swatchesLabel: string` — Accessible name of the swatch group
|
|
1066
1074
|
- `leftIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the left side
|
|
1067
1075
|
- `rightIcon: React.ComponentProps<typeof Icon>["name"]` — Icon name to display on the right side
|
|
1068
1076
|
- `leftIconColor: React.ComponentProps<typeof Icon>["color"]` — Color of the left icon
|
|
@@ -1468,7 +1476,7 @@ so the unit does not have to be repeated in the label.
|
|
|
1468
1476
|
- `mode: "number" | "text"` = "number" — 'number': uses the native type="number" (e.g. quantity steppers)
|
|
1469
1477
|
'text': uses type="text" + inputmode (e.g. card numbers or IDs where leading zeros must be kept)
|
|
1470
1478
|
- `hideSpinButton: boolean` = true — Whether to hide the spin buttons
|
|
1471
|
-
- `allowDecimal: boolean` = false — Whether to allow
|
|
1479
|
+
- `allowDecimal: boolean` = false — Whether to allow decimals (effective only when mode="number"). When false, both "." and "," are blocked — a browser in a locale that writes decimals with a comma takes "," as the decimal separator.
|
|
1472
1480
|
- `allowNegative: boolean` = false — Whether to allow negative numbers (effective only when mode="number")
|
|
1473
1481
|
- `asChild: boolean` = false — Whether to render as a child element.
|
|
1474
1482
|
- **OtpInput** — One-time password fields (aka Pin Input, Input OTP, PIN Code Input)
|
|
@@ -1958,7 +1966,7 @@ section of the page.
|
|
|
1958
1966
|
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the alert
|
|
1959
1967
|
@default "default"
|
|
1960
1968
|
- `icon: React.ReactNode` — Custom icon. When omitted, a default icon matching the intent is displayed.
|
|
1961
|
-
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button.
|
|
1969
|
+
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button. When the close button disappears while it has focus, focus moves to the focusable element just before the component. To send it somewhere else, move focus inside this callback.
|
|
1962
1970
|
- `className: string` — Additional CSS class name
|
|
1963
1971
|
- `children: React.ReactNode` — Content of the alert (treated as the description)
|
|
1964
1972
|
- **Autosave** — Inline status indicator for automatic save state
|
|
@@ -1973,7 +1981,7 @@ section of the page.
|
|
|
1973
1981
|
- `icon: boolean | React.ReactNode` = true — Whether to show the icon, or a custom icon element
|
|
1974
1982
|
@default true
|
|
1975
1983
|
- `extra: React.ReactNode` — Action element (e.g. a Button component)
|
|
1976
|
-
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button.
|
|
1984
|
+
- `onClose: () => void` — Called when the close button is clicked. Providing it shows the close button. When the close button disappears while it has focus, focus moves to the focusable element just before the component. To send it somewhere else, move focus inside this callback.
|
|
1977
1985
|
- `className: string` — Additional CSS class name
|
|
1978
1986
|
- `children: React.ReactNode` — Content of the banner
|
|
1979
1987
|
- **ErrorBoundary** — Runtime error fallback
|
|
@@ -2041,7 +2049,7 @@ origin while the card it was meant to cover was 1248x75.
|
|
|
2041
2049
|
- `icon: ReactNode` — The icon of notification
|
|
2042
2050
|
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — The intent of notification
|
|
2043
2051
|
@default "default"
|
|
2044
|
-
- `onClose: (id?: string) => void` — Callback when notification is closed
|
|
2052
|
+
- `onClose: (id?: string) => void` — Callback when notification is closed. When the close button disappears while it has focus, focus moves to the focusable element just before the component. To send it somewhere else, move focus inside this callback.
|
|
2045
2053
|
- `closable: boolean` = true — Whether to show close button
|
|
2046
2054
|
- `className: string` — Additional class name
|
|
2047
2055
|
- `aria-label: string` — Accessible name for the notification.
|
|
@@ -2153,7 +2161,7 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2153
2161
|
- `description: string` — Description text displayed below the title.
|
|
2154
2162
|
- `intent: "default" | "info" | "success" | "warning" | "danger"` = "default" — Intent (semantic state) of the toast.
|
|
2155
2163
|
@default "default"
|
|
2156
|
-
- `duration: number` = 3000 — Time in milliseconds before the toast closes automatically. Set 0 to disable auto-close.
|
|
2164
|
+
- `duration: number` = 3000 — Time in milliseconds before the toast closes automatically. The timer pauses while the pointer is over the toast or focus is inside it, and resumes from the remaining time. Set 0 to disable auto-close.
|
|
2157
2165
|
@default 3000
|
|
2158
2166
|
- `open: boolean` = true — Whether the toast is shown.
|
|
2159
2167
|
@default true
|
|
@@ -2177,7 +2185,7 @@ follows the theme and never needs a hand-mixed colour.
|
|
|
2177
2185
|
- `children: React.ReactNode` (required) — Children to be rendered inside the affix
|
|
2178
2186
|
- `className: string` — Additional class names
|
|
2179
2187
|
- `style: React.CSSProperties` — Style attribute
|
|
2180
|
-
- **Anchor** — Smooth scroll links (aka Scrollspy)
|
|
2188
|
+
- **Anchor** — Smooth scroll links (aka Scrollspy, Table of Contents, TableOfContents)
|
|
2181
2189
|
- `items: AnchorLinkItem[]` = [] — Array of anchor link configurations
|
|
2182
2190
|
- `bounds: number` = 5 — Bounding distance (in pixels) for triggering active state
|
|
2183
2191
|
- `offset: number` = 0 — Offset (in pixels) from top when clicking to scroll
|
|
@@ -2397,7 +2405,9 @@ what a scanner would read.
|
|
|
2397
2405
|
- `maxDate: Date` — Latest selectable date
|
|
2398
2406
|
- `disabledDates: Date[]` — Dates that cannot be selected
|
|
2399
2407
|
- `isDateDisabled: (date: Date) => boolean` — Function returning whether a given date is disabled
|
|
2400
|
-
- `weekStartsOn: 0 | 1`
|
|
2408
|
+
- `weekStartsOn: 0 | 1` — First day of the week (0 = Sunday, 1 = Monday). In `Calendar`, it defaults
|
|
2409
|
+
to the locale's first day (`en-GB` and `de` start on Monday; a locale that
|
|
2410
|
+
starts on Saturday, or a browser without `Intl.Locale` week info, falls back to Sunday).
|
|
2401
2411
|
- `className: string` — Additional class names
|
|
2402
2412
|
- `disabled: boolean` = false — Whether the calendar is disabled
|
|
2403
2413
|
- `onChange: (date: Date) => void` — Callback when a date is selected (single mode)
|
|
@@ -2713,7 +2723,8 @@ renders inline, next to whatever follows it.
|
|
|
2713
2723
|
- `maxDate: Date` — 選択可能な最大日付。
|
|
2714
2724
|
- `disabledDates: Date[]` — 無効化する日付の配列。
|
|
2715
2725
|
- `isDateDisabled: (date: Date) => boolean` — 特定の日付を無効化する関数。
|
|
2716
|
-
- `weekStartsOn: 0 | 1` —
|
|
2726
|
+
- `weekStartsOn: 0 | 1` — First day of the week (0 = Sunday, 1 = Monday). Defaults to the locale's
|
|
2727
|
+
first day, as in `Calendar`.
|
|
2717
2728
|
- **Reaction** — Display emoji reaction buttons with toggleable state and counts
|
|
2718
2729
|
- `reactions: ReactionItem[]` (required) — List of reactions
|
|
2719
2730
|
- `onReact: (emoji: string, active: boolean) => void` — Callback when a reaction is added or removed
|
package/dist/llms.txt
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
## What this is
|
|
6
6
|
|
|
7
|
-
**wimui** v0.
|
|
7
|
+
**wimui** v0.74.2 — a React 19 component library: 230 documented components across 10 categories, with design tokens, dark mode, i18n (en/ja/pt-BR) and WAI-ARIA compliant a11y. Peer deps: react ^19, react-dom ^19 (plus optional peers for specific components — see package.json).
|
|
8
8
|
|
|
9
9
|
## Install & required setup
|
|
10
10
|
|
|
@@ -312,7 +312,7 @@ export function BillingOverview() {
|
|
|
312
312
|
### navigation — `import { … } from "wimui/navigation"`
|
|
313
313
|
|
|
314
314
|
- **Affix** — Sticky elements (aka Sticky)
|
|
315
|
-
- **Anchor** — Smooth scroll links (aka Scrollspy)
|
|
315
|
+
- **Anchor** — Smooth scroll links (aka Scrollspy, Table of Contents, TableOfContents)
|
|
316
316
|
- **BackTop** — Back to top button (aka Back to Top)
|
|
317
317
|
- **Breadcrumb** — Location trace (aka Path Bar, Path Control)
|
|
318
318
|
- **CommandPalette** — Cmd+K search overlay (aka Command Bar, Quick Open)
|