laif-ds 0.2.74 → 0.2.76
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/CHANGELOG.md +446 -0
- package/dist/agent-docs/adoption-report.json +615 -0
- package/dist/agent-docs/components/Accordion.md +46 -16
- package/dist/agent-docs/components/Alert.md +90 -95
- package/dist/agent-docs/components/AlertDialog.md +132 -126
- package/dist/agent-docs/components/AppEditor.md +90 -90
- package/dist/agent-docs/components/AppRadioGroup.md +18 -18
- package/dist/agent-docs/components/AppSidebar.md +129 -122
- package/dist/agent-docs/components/AppStepper.md +81 -77
- package/dist/agent-docs/components/AspectRatio.md +70 -62
- package/dist/agent-docs/components/AudioVisualizer.md +5 -5
- package/dist/agent-docs/components/Avatar.md +112 -113
- package/dist/agent-docs/components/Badge.md +123 -118
- package/dist/agent-docs/components/Breadcrumb.md +8 -1
- package/dist/agent-docs/components/Button.md +131 -129
- package/dist/agent-docs/components/Card.md +172 -147
- package/dist/agent-docs/components/Carousel.md +148 -129
- package/dist/agent-docs/components/Chat.md +121 -109
- package/dist/agent-docs/components/ChatMessage.md +72 -61
- package/dist/agent-docs/components/Checkbox.md +150 -135
- package/dist/agent-docs/components/CircularProgress.md +53 -49
- package/dist/agent-docs/components/CodeHighlighter.md +4 -4
- package/dist/agent-docs/components/Collapsible.md +114 -95
- package/dist/agent-docs/components/Command.md +141 -142
- package/dist/agent-docs/components/Confirmer.md +182 -175
- package/dist/agent-docs/components/ContextMenu.md +196 -191
- package/dist/agent-docs/components/DataCrossTable.md +114 -94
- package/dist/agent-docs/components/DataTable.md +32 -24
- package/dist/agent-docs/components/Dialog.md +130 -125
- package/dist/agent-docs/components/Drawer.md +141 -127
- package/dist/agent-docs/components/FilePreviewer.md +138 -139
- package/dist/agent-docs/components/FileUploader.md +149 -129
- package/dist/agent-docs/components/Form.md +3 -1
- package/dist/agent-docs/components/FormComposer.md +163 -137
- package/dist/agent-docs/components/GanttChart.md +125 -122
- package/dist/agent-docs/components/HoverCard.md +1 -1
- package/dist/agent-docs/components/Icon.md +98 -99
- package/dist/agent-docs/components/Input.md +173 -138
- package/dist/agent-docs/components/InputOtp.md +6 -1
- package/dist/agent-docs/components/InputSelector.md +94 -97
- package/dist/agent-docs/components/InterruptPrompt.md +4 -4
- package/dist/agent-docs/components/MarkdownRenderer.md +5 -2
- package/dist/agent-docs/components/Menubar.md +60 -57
- package/dist/agent-docs/components/MessageInput.md +134 -131
- package/dist/agent-docs/components/MessageList.md +110 -96
- package/dist/agent-docs/components/MultipleSelector.md +147 -146
- package/dist/agent-docs/components/NavigationMenu.md +6 -2
- package/dist/agent-docs/components/Popover.md +112 -103
- package/dist/agent-docs/components/PromptSuggestions.md +5 -5
- package/dist/agent-docs/components/RadioGroup.md +97 -90
- package/dist/agent-docs/components/Resizable.md +4 -1
- package/dist/agent-docs/components/ResizePrompt.md +12 -13
- package/dist/agent-docs/components/ScrollArea.md +6 -2
- package/dist/agent-docs/components/SecurePdfViewer.md +10 -6
- package/dist/agent-docs/components/Select.md +131 -132
- package/dist/agent-docs/components/Sheet.md +8 -1
- package/dist/agent-docs/components/ShikiHighlighter.md +5 -5
- package/dist/agent-docs/components/Sidebar.md +94 -85
- package/dist/agent-docs/components/Slider.md +62 -58
- package/dist/agent-docs/components/Sonner.md +1 -0
- package/dist/agent-docs/components/Spinner.md +14 -14
- package/dist/agent-docs/components/Stepper.md +93 -67
- package/dist/agent-docs/components/Switch.md +41 -42
- package/dist/agent-docs/components/TableSkeleton.md +8 -8
- package/dist/agent-docs/components/Tabs.md +106 -86
- package/dist/agent-docs/components/TextArea.md +51 -52
- package/dist/agent-docs/components/ThemeSwitcher.md +72 -69
- package/dist/agent-docs/components/Toaster.md +1 -0
- package/dist/agent-docs/components/Tooltip.md +102 -91
- package/dist/agent-docs/components/Typo.md +68 -65
- package/dist/agent-docs/components/WeeklyCalendar.md +63 -64
- package/dist/agent-docs/components-list.md +1 -0
- package/dist/agent-docs/manifest.json +5981 -0
- package/dist/agent-docs/truncated-cell.md +342 -0
- package/dist/components/editor/editor-hooks/use-update-toolbar.js +6 -6
- package/dist/components/editor/plugins/actions/counter-character-plugin.js +6 -6
- package/dist/components/editor/plugins/toolbar/font-format-toolbar-plugin.js +18 -18
- package/dist/components/editor/plugins/toolbar/history-toolbar-plugin.js +10 -10
- package/dist/components/editor/plugins/toolbar/toolbar-plugin.js +9 -9
- package/dist/components/ui/app-checkbox.js +1 -1
- package/dist/components/ui/app-dialog.js +70 -64
- package/dist/components/ui/app-editor.js +51 -51
- package/dist/components/ui/app-form.js +81 -81
- package/dist/components/ui/app-multiple-select-dropdown.js +36 -36
- package/dist/components/ui/app-select.js +109 -104
- package/dist/components/ui/app-sidebar.js +41 -41
- package/dist/components/ui/app-stepper.js +1 -1
- package/dist/components/ui/app-time-picker.js +18 -18
- package/dist/components/ui/app-tooltip.js +1 -1
- package/dist/components/ui/async-select.js +5 -5
- package/dist/components/ui/audio-visualizer.js +61 -58
- package/dist/components/ui/card.js +1 -1
- package/dist/components/ui/carousel.js +2 -2
- package/dist/components/ui/chart.js +1 -1
- package/dist/components/ui/chat-message.js +8 -8
- package/dist/components/ui/chat.js +86 -88
- package/dist/components/ui/command.js +2 -2
- package/dist/components/ui/copy-button.js +4 -4
- package/dist/components/ui/date-picker.js +20 -20
- package/dist/components/ui/file-preview/index.js +13 -13
- package/dist/components/ui/file-previewer.js +12 -11
- package/dist/components/ui/file-uploader.js +86 -78
- package/dist/components/ui/form.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Bars/Bars.js +56 -56
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarItem/BarItem.js +12 -12
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsItems/BarItems.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/BarsRow.js +4 -4
- package/dist/components/ui/gantt/components/Chart/Bars/BarsRow/RepeteadBars/RepeteadBars.js +2 -2
- package/dist/components/ui/gantt/components/Chart/Chart.js +23 -23
- package/dist/components/ui/gantt/components/Chart/Scale/Scale.js +1 -1
- package/dist/components/ui/gantt/components/Chart/Tree/Tree.js +34 -34
- package/dist/components/ui/gantt/components/Controls/Controls.js +5 -5
- package/dist/components/ui/gantt/components/Gantt/Gantt.js +4 -4
- package/dist/components/ui/gantt/hooks/useGanttCalculate.js +25 -18
- package/dist/components/ui/input-selector.js +1 -1
- package/dist/components/ui/input.js +23 -23
- package/dist/components/ui/kanban.js +8 -9
- package/dist/components/ui/markdown-renderer.js +41 -35
- package/dist/components/ui/message-input.js +45 -44
- package/dist/components/ui/multiple-selector.js +91 -82
- package/dist/components/ui/secure-pdf-viewer.js +19 -7
- package/dist/components/ui/sidebar.js +1 -1
- package/dist/components/ui/slider.js +1 -1
- package/dist/components/ui/spinner.js +4 -4
- package/dist/components/ui/stepper.js +157 -138
- package/dist/components/ui/tables/data-cross-table/data-cross-table-buttons.js +29 -29
- package/dist/components/ui/tables/data-cross-table/data-cross-table.js +258 -246
- package/dist/components/ui/tables/data-table/components/data-table-advanced-filter.js +4 -1
- package/dist/components/ui/tables/data-table/components/data-table-body.js +211 -367
- package/dist/components/ui/tables/data-table/components/data-table-filter-inputs.js +114 -112
- package/dist/components/ui/tables/data-table/components/data-table-filters.js +116 -96
- package/dist/components/ui/tables/data-table/components/data-table-header.js +211 -0
- package/dist/components/ui/tables/data-table/components/data-table-searchbar.js +8 -8
- package/dist/components/ui/tables/data-table/components/data-table-skeleton-rows.js +33 -0
- package/dist/components/ui/tables/data-table/data-table.js +258 -250
- package/dist/components/ui/tables/data-table/data-table.service.js +112 -97
- package/dist/components/ui/tables/data-table/data-table.utils.js +25 -15
- package/dist/components/ui/textarea.js +2 -2
- package/dist/components/ui/theme-switcher.js +1 -1
- package/dist/components/ui/toggle-group.js +2 -2
- package/dist/components/ui/truncated-cell.js +100 -0
- package/dist/components/ui/weekly-calendar/appointment-card.js +16 -16
- package/dist/components/ui/weekly-calendar/calendar-context.js +6 -6
- package/dist/components/ui/weekly-calendar/calendar-header.js +12 -12
- package/dist/components/ui/weekly-calendar/day-column.js +16 -16
- package/dist/components/ui/weekly-calendar/time-column.js +4 -4
- package/dist/components/ui/weekly-calendar/weekly-calendar.js +4 -4
- package/dist/hooks/use-audio-recording.js +1 -1
- package/dist/hooks/use-auto-scroll.js +18 -18
- package/dist/hooks/use-autosize-textarea.js +12 -13
- package/dist/index.d.ts +100 -45
- package/dist/index.js +362 -360
- package/dist/lib/utils.js +6 -6
- package/dist/styles.v3.css +1 -1
- package/package.json +14 -4
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
7
|
-
const
|
|
2
|
+
import { jsx as l } from "react/jsx-runtime";
|
|
3
|
+
import { cva as S } from "../../node_modules/class-variance-authority/dist/index.js";
|
|
4
|
+
import * as d from "react";
|
|
5
|
+
import { useCallback as A, createContext as P, useContext as E } from "react";
|
|
6
|
+
import { cn as u } from "../../lib/utils.js";
|
|
7
|
+
const L = P(
|
|
8
8
|
void 0
|
|
9
|
-
),
|
|
9
|
+
), j = P(
|
|
10
10
|
void 0
|
|
11
|
-
),
|
|
11
|
+
), O = S("w-full max-w-6xl", {
|
|
12
12
|
variants: {
|
|
13
13
|
orientation: {
|
|
14
14
|
horizontal: "flex flex-row items-center",
|
|
@@ -18,7 +18,7 @@ const E = T(
|
|
|
18
18
|
defaultVariants: {
|
|
19
19
|
orientation: "horizontal"
|
|
20
20
|
}
|
|
21
|
-
}),
|
|
21
|
+
}), F = S("group/step relative", {
|
|
22
22
|
variants: {
|
|
23
23
|
orientation: {
|
|
24
24
|
horizontal: "flex flex-row items-center justify-center not-last:flex-1",
|
|
@@ -28,7 +28,7 @@ const E = T(
|
|
|
28
28
|
defaultVariants: {
|
|
29
29
|
orientation: "horizontal"
|
|
30
30
|
}
|
|
31
|
-
}),
|
|
31
|
+
}), K = S(
|
|
32
32
|
"focus-visible:ring-ring/50 focus-visible:border-d-ring inline-flex cursor-pointer items-center gap-3 rounded-full outline-none focus-visible:z-10 focus-visible:ring-[3px] disabled:pointer-events-none disabled:opacity-60",
|
|
33
33
|
{
|
|
34
34
|
variants: {
|
|
@@ -42,7 +42,7 @@ const E = T(
|
|
|
42
42
|
size: "default"
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
|
-
),
|
|
45
|
+
), $ = S(
|
|
46
46
|
"border-secondary bg-secondary text-bodyPrimary data-[state=active]:bg-d-primary data-[state=completed]:bg-d-primary data-[state=active]:text-bodyPrimary data-[state=completed]:text-onAccent relative flex shrink-0 items-center justify-center overflow-hidden rounded-full",
|
|
47
47
|
{
|
|
48
48
|
variants: {
|
|
@@ -56,7 +56,7 @@ const E = T(
|
|
|
56
56
|
size: "default"
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
),
|
|
59
|
+
), H = S("bg-secondary m-0.5 rounded-full", {
|
|
60
60
|
variants: {
|
|
61
61
|
orientation: {
|
|
62
62
|
horizontal: "h-0.5 flex-1",
|
|
@@ -66,7 +66,7 @@ const E = T(
|
|
|
66
66
|
defaultVariants: {
|
|
67
67
|
orientation: "horizontal"
|
|
68
68
|
}
|
|
69
|
-
}),
|
|
69
|
+
}), U = S("text-sm leading-none font-medium", {
|
|
70
70
|
variants: {
|
|
71
71
|
size: {
|
|
72
72
|
sm: "text-xs",
|
|
@@ -77,7 +77,7 @@ const E = T(
|
|
|
77
77
|
defaultVariants: {
|
|
78
78
|
size: "default"
|
|
79
79
|
}
|
|
80
|
-
}),
|
|
80
|
+
}), q = S("inline-flex", {
|
|
81
81
|
variants: {
|
|
82
82
|
orientation: {
|
|
83
83
|
horizontal: "w-full flex-row",
|
|
@@ -88,215 +88,234 @@ const E = T(
|
|
|
88
88
|
orientation: "horizontal"
|
|
89
89
|
}
|
|
90
90
|
});
|
|
91
|
-
function
|
|
92
|
-
const t =
|
|
91
|
+
function b() {
|
|
92
|
+
const t = E(L);
|
|
93
93
|
if (!t) throw new Error("useStepper must be used within a Stepper");
|
|
94
94
|
return t;
|
|
95
95
|
}
|
|
96
|
-
function
|
|
97
|
-
const t =
|
|
96
|
+
function C() {
|
|
97
|
+
const t = E(j);
|
|
98
98
|
if (!t) throw new Error("useStepItem must be used within a StepperItem");
|
|
99
99
|
return t;
|
|
100
100
|
}
|
|
101
|
-
function
|
|
101
|
+
function Q({
|
|
102
102
|
defaultValue: t = 1,
|
|
103
103
|
value: a,
|
|
104
104
|
onValueChange: n,
|
|
105
105
|
orientation: e = "horizontal",
|
|
106
|
-
className:
|
|
107
|
-
children:
|
|
108
|
-
indicators:
|
|
106
|
+
className: o,
|
|
107
|
+
children: s,
|
|
108
|
+
indicators: v = {},
|
|
109
109
|
...y
|
|
110
110
|
}) {
|
|
111
|
-
const [
|
|
111
|
+
const [g, h] = d.useState(t), [i, x] = d.useState(
|
|
112
112
|
[]
|
|
113
|
-
), z =
|
|
114
|
-
(
|
|
115
|
-
|
|
113
|
+
), z = d.useCallback(
|
|
114
|
+
(r) => {
|
|
115
|
+
x((p) => r && !p.includes(r) ? [...p, r] : !r && p.includes(r) ? p.filter((w) => w !== r) : p);
|
|
116
116
|
},
|
|
117
117
|
[]
|
|
118
|
-
), N =
|
|
119
|
-
(
|
|
120
|
-
a === void 0 &&
|
|
118
|
+
), N = d.useCallback(
|
|
119
|
+
(r) => {
|
|
120
|
+
a === void 0 && h(r), n?.(r);
|
|
121
121
|
},
|
|
122
122
|
[a, n]
|
|
123
|
-
), V = a ??
|
|
124
|
-
|
|
125
|
-
|
|
123
|
+
), V = a ?? g, c = A(
|
|
124
|
+
(r) => {
|
|
125
|
+
i[r] && i[r].focus();
|
|
126
|
+
},
|
|
127
|
+
[i]
|
|
128
|
+
), I = A(
|
|
129
|
+
(r) => c((r + 1) % i.length),
|
|
130
|
+
[c, i.length]
|
|
131
|
+
), f = A(
|
|
132
|
+
(r) => c(
|
|
133
|
+
(r - 1 + i.length) % i.length
|
|
134
|
+
),
|
|
135
|
+
[c, i.length]
|
|
136
|
+
), D = A(() => c(0), [c]), k = A(
|
|
137
|
+
() => c(i.length - 1),
|
|
138
|
+
[c, i.length]
|
|
139
|
+
), T = d.useMemo(
|
|
126
140
|
() => ({
|
|
127
141
|
activeStep: V,
|
|
128
142
|
setActiveStep: N,
|
|
129
|
-
stepsCount:
|
|
130
|
-
(
|
|
143
|
+
stepsCount: d.Children.toArray(s).filter(
|
|
144
|
+
(r) => d.isValidElement(r) && r.type.displayName === "StepperItem"
|
|
131
145
|
).length,
|
|
132
146
|
orientation: e,
|
|
133
147
|
registerTrigger: z,
|
|
134
|
-
focusNext:
|
|
135
|
-
focusPrev:
|
|
136
|
-
focusFirst:
|
|
148
|
+
focusNext: I,
|
|
149
|
+
focusPrev: f,
|
|
150
|
+
focusFirst: D,
|
|
137
151
|
focusLast: k,
|
|
138
|
-
triggerNodes:
|
|
139
|
-
indicators:
|
|
152
|
+
triggerNodes: i,
|
|
153
|
+
indicators: v
|
|
140
154
|
}),
|
|
141
155
|
[
|
|
142
156
|
V,
|
|
143
157
|
N,
|
|
144
|
-
|
|
158
|
+
s,
|
|
145
159
|
e,
|
|
146
160
|
z,
|
|
147
|
-
|
|
161
|
+
I,
|
|
162
|
+
f,
|
|
163
|
+
D,
|
|
164
|
+
k,
|
|
165
|
+
i,
|
|
166
|
+
v
|
|
148
167
|
]
|
|
149
168
|
);
|
|
150
|
-
return /* @__PURE__ */
|
|
169
|
+
return /* @__PURE__ */ l(L.Provider, { value: T, children: /* @__PURE__ */ l(
|
|
151
170
|
"div",
|
|
152
171
|
{
|
|
153
172
|
role: "tablist",
|
|
154
173
|
"aria-orientation": e,
|
|
155
174
|
"data-slot": "stepper",
|
|
156
|
-
className:
|
|
175
|
+
className: u(O({ orientation: e }), o),
|
|
157
176
|
"data-orientation": e,
|
|
158
177
|
...y,
|
|
159
|
-
children:
|
|
178
|
+
children: s
|
|
160
179
|
}
|
|
161
180
|
) });
|
|
162
181
|
}
|
|
163
|
-
function
|
|
182
|
+
function W({
|
|
164
183
|
step: t,
|
|
165
184
|
completed: a = !1,
|
|
166
185
|
disabled: n = !1,
|
|
167
186
|
loading: e = !1,
|
|
168
|
-
orientation:
|
|
169
|
-
className:
|
|
170
|
-
children:
|
|
187
|
+
orientation: o,
|
|
188
|
+
className: s,
|
|
189
|
+
children: v,
|
|
171
190
|
...y
|
|
172
191
|
}) {
|
|
173
|
-
const { activeStep:
|
|
174
|
-
return /* @__PURE__ */
|
|
175
|
-
|
|
192
|
+
const { activeStep: g, orientation: h } = b(), i = a || t < g ? "completed" : g === t ? "active" : "inactive", x = e && t === g;
|
|
193
|
+
return /* @__PURE__ */ l(
|
|
194
|
+
j.Provider,
|
|
176
195
|
{
|
|
177
|
-
value: { step: t, state:
|
|
178
|
-
children: /* @__PURE__ */
|
|
196
|
+
value: { step: t, state: i, isDisabled: n, isLoading: x },
|
|
197
|
+
children: /* @__PURE__ */ l(
|
|
179
198
|
"div",
|
|
180
199
|
{
|
|
181
200
|
"data-slot": "stepper-item",
|
|
182
|
-
className:
|
|
183
|
-
|
|
184
|
-
orientation:
|
|
201
|
+
className: u(
|
|
202
|
+
F({
|
|
203
|
+
orientation: o || h
|
|
185
204
|
}),
|
|
186
|
-
|
|
205
|
+
s
|
|
187
206
|
),
|
|
188
|
-
"data-state":
|
|
189
|
-
...
|
|
207
|
+
"data-state": i,
|
|
208
|
+
...x ? { "data-loading": !0 } : {},
|
|
190
209
|
...y,
|
|
191
|
-
children:
|
|
210
|
+
children: v
|
|
192
211
|
}
|
|
193
212
|
)
|
|
194
213
|
}
|
|
195
214
|
);
|
|
196
215
|
}
|
|
197
|
-
function
|
|
216
|
+
function X({
|
|
198
217
|
asChild: t = !1,
|
|
199
218
|
size: a,
|
|
200
219
|
className: n,
|
|
201
220
|
children: e,
|
|
202
|
-
tabIndex:
|
|
203
|
-
...
|
|
221
|
+
tabIndex: o,
|
|
222
|
+
...s
|
|
204
223
|
}) {
|
|
205
|
-
const { state:
|
|
206
|
-
setActiveStep:
|
|
207
|
-
activeStep:
|
|
208
|
-
registerTrigger:
|
|
224
|
+
const { state: v, isLoading: y } = C(), g = b(), {
|
|
225
|
+
setActiveStep: h,
|
|
226
|
+
activeStep: i,
|
|
227
|
+
registerTrigger: x,
|
|
209
228
|
triggerNodes: z,
|
|
210
229
|
focusNext: N,
|
|
211
230
|
focusPrev: V,
|
|
212
|
-
focusFirst:
|
|
213
|
-
focusLast:
|
|
214
|
-
} =
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
}, [
|
|
218
|
-
const w =
|
|
219
|
-
() => z.findIndex((
|
|
220
|
-
[z
|
|
221
|
-
),
|
|
222
|
-
switch (
|
|
231
|
+
focusFirst: c,
|
|
232
|
+
focusLast: I
|
|
233
|
+
} = g, { step: f, isDisabled: D } = C(), k = i === f, T = `stepper-tab-${f}`, r = `stepper-panel-${f}`, p = d.useRef(null);
|
|
234
|
+
d.useEffect(() => {
|
|
235
|
+
p.current && x(p.current);
|
|
236
|
+
}, [x]);
|
|
237
|
+
const w = d.useMemo(
|
|
238
|
+
() => z.findIndex((m) => m === p.current),
|
|
239
|
+
[z]
|
|
240
|
+
), R = (m) => {
|
|
241
|
+
switch (m.key) {
|
|
223
242
|
case "ArrowRight":
|
|
224
243
|
case "ArrowDown":
|
|
225
|
-
|
|
244
|
+
m.preventDefault(), w !== -1 && N && N(w);
|
|
226
245
|
break;
|
|
227
246
|
case "ArrowLeft":
|
|
228
247
|
case "ArrowUp":
|
|
229
|
-
|
|
248
|
+
m.preventDefault(), w !== -1 && V && V(w);
|
|
230
249
|
break;
|
|
231
250
|
case "Home":
|
|
232
|
-
|
|
251
|
+
m.preventDefault(), c && c();
|
|
233
252
|
break;
|
|
234
253
|
case "End":
|
|
235
|
-
|
|
254
|
+
m.preventDefault(), I && I();
|
|
236
255
|
break;
|
|
237
256
|
case "Enter":
|
|
238
257
|
case " ":
|
|
239
|
-
|
|
258
|
+
m.preventDefault(), h(f);
|
|
240
259
|
break;
|
|
241
260
|
}
|
|
242
261
|
};
|
|
243
|
-
return t ? /* @__PURE__ */
|
|
262
|
+
return t ? /* @__PURE__ */ l(
|
|
244
263
|
"span",
|
|
245
264
|
{
|
|
246
265
|
"data-slot": "stepper-trigger",
|
|
247
|
-
"data-state":
|
|
266
|
+
"data-state": v,
|
|
248
267
|
className: n,
|
|
249
268
|
children: e
|
|
250
269
|
}
|
|
251
|
-
) : /* @__PURE__ */
|
|
270
|
+
) : /* @__PURE__ */ l(
|
|
252
271
|
"button",
|
|
253
272
|
{
|
|
254
|
-
ref:
|
|
273
|
+
ref: p,
|
|
255
274
|
role: "tab",
|
|
256
|
-
id:
|
|
275
|
+
id: T,
|
|
257
276
|
"aria-selected": k,
|
|
258
|
-
"aria-controls":
|
|
259
|
-
tabIndex: typeof
|
|
277
|
+
"aria-controls": r,
|
|
278
|
+
tabIndex: typeof o == "number" ? o : k ? 0 : -1,
|
|
260
279
|
"data-slot": "stepper-trigger",
|
|
261
|
-
"data-state":
|
|
280
|
+
"data-state": v,
|
|
262
281
|
"data-loading": y,
|
|
263
|
-
className:
|
|
264
|
-
onClick: () =>
|
|
265
|
-
onKeyDown:
|
|
266
|
-
disabled:
|
|
267
|
-
...
|
|
282
|
+
className: u(K({ size: a }), n),
|
|
283
|
+
onClick: () => h(f),
|
|
284
|
+
onKeyDown: R,
|
|
285
|
+
disabled: D,
|
|
286
|
+
...s,
|
|
268
287
|
children: e
|
|
269
288
|
}
|
|
270
289
|
);
|
|
271
290
|
}
|
|
272
|
-
function
|
|
291
|
+
function Y({
|
|
273
292
|
children: t,
|
|
274
293
|
size: a,
|
|
275
294
|
className: n
|
|
276
295
|
}) {
|
|
277
|
-
const { state: e, isLoading:
|
|
278
|
-
return /* @__PURE__ */
|
|
296
|
+
const { state: e, isLoading: o } = C(), { indicators: s } = b();
|
|
297
|
+
return /* @__PURE__ */ l(
|
|
279
298
|
"div",
|
|
280
299
|
{
|
|
281
300
|
"data-slot": "stepper-indicator",
|
|
282
301
|
"data-state": e,
|
|
283
|
-
className:
|
|
284
|
-
children: /* @__PURE__ */
|
|
302
|
+
className: u($({ size: a }), n),
|
|
303
|
+
children: /* @__PURE__ */ l("div", { className: "absolute", children: s && (o && s.loading || e === "completed" && s.completed || e === "active" && s.active || e === "inactive" && s.inactive) ? o && s.loading || e === "completed" && s.completed || e === "active" && s.active || e === "inactive" && s.inactive : t })
|
|
285
304
|
}
|
|
286
305
|
);
|
|
287
306
|
}
|
|
288
|
-
function
|
|
307
|
+
function Z({
|
|
289
308
|
orientation: t,
|
|
290
309
|
className: a
|
|
291
310
|
}) {
|
|
292
|
-
const { state: n } =
|
|
293
|
-
return /* @__PURE__ */
|
|
311
|
+
const { state: n } = C(), { orientation: e } = b();
|
|
312
|
+
return /* @__PURE__ */ l(
|
|
294
313
|
"div",
|
|
295
314
|
{
|
|
296
315
|
"data-slot": "stepper-separator",
|
|
297
316
|
"data-state": n,
|
|
298
|
-
className:
|
|
299
|
-
|
|
317
|
+
className: u(
|
|
318
|
+
H({
|
|
300
319
|
orientation: t || e
|
|
301
320
|
}),
|
|
302
321
|
a
|
|
@@ -304,37 +323,37 @@ function Y({
|
|
|
304
323
|
}
|
|
305
324
|
);
|
|
306
325
|
}
|
|
307
|
-
function
|
|
326
|
+
function _({
|
|
308
327
|
children: t,
|
|
309
328
|
size: a,
|
|
310
329
|
className: n
|
|
311
330
|
}) {
|
|
312
|
-
const { state: e } =
|
|
313
|
-
return /* @__PURE__ */
|
|
331
|
+
const { state: e } = C();
|
|
332
|
+
return /* @__PURE__ */ l(
|
|
314
333
|
"h3",
|
|
315
334
|
{
|
|
316
335
|
"data-slot": "stepper-title",
|
|
317
336
|
"data-state": e,
|
|
318
|
-
className:
|
|
337
|
+
className: u(U({ size: a }), n),
|
|
319
338
|
children: t
|
|
320
339
|
}
|
|
321
340
|
);
|
|
322
341
|
}
|
|
323
|
-
function
|
|
342
|
+
function tt({
|
|
324
343
|
children: t,
|
|
325
344
|
orientation: a,
|
|
326
345
|
className: n
|
|
327
346
|
}) {
|
|
328
|
-
const { activeStep: e, orientation:
|
|
329
|
-
return /* @__PURE__ */
|
|
347
|
+
const { activeStep: e, orientation: o } = b();
|
|
348
|
+
return /* @__PURE__ */ l(
|
|
330
349
|
"nav",
|
|
331
350
|
{
|
|
332
351
|
"data-slot": "stepper-nav",
|
|
333
352
|
"data-state": e,
|
|
334
|
-
"data-orientation": a ||
|
|
335
|
-
className:
|
|
336
|
-
|
|
337
|
-
orientation: a ||
|
|
353
|
+
"data-orientation": a || o,
|
|
354
|
+
className: u(
|
|
355
|
+
q({
|
|
356
|
+
orientation: a || o
|
|
338
357
|
}),
|
|
339
358
|
n
|
|
340
359
|
),
|
|
@@ -342,46 +361,46 @@ function _({
|
|
|
342
361
|
}
|
|
343
362
|
);
|
|
344
363
|
}
|
|
345
|
-
function
|
|
346
|
-
const { activeStep: n } =
|
|
347
|
-
return /* @__PURE__ */
|
|
364
|
+
function et({ children: t, className: a }) {
|
|
365
|
+
const { activeStep: n } = b();
|
|
366
|
+
return /* @__PURE__ */ l(
|
|
348
367
|
"div",
|
|
349
368
|
{
|
|
350
369
|
"data-slot": "stepper-panel",
|
|
351
370
|
"data-state": n,
|
|
352
|
-
className:
|
|
371
|
+
className: u("w-full", a),
|
|
353
372
|
children: t
|
|
354
373
|
}
|
|
355
374
|
);
|
|
356
375
|
}
|
|
357
|
-
function
|
|
376
|
+
function at({
|
|
358
377
|
value: t,
|
|
359
378
|
forceMount: a,
|
|
360
379
|
children: n,
|
|
361
380
|
className: e
|
|
362
381
|
}) {
|
|
363
|
-
const { activeStep:
|
|
364
|
-
return !a && !
|
|
382
|
+
const { activeStep: o } = b(), s = t === o;
|
|
383
|
+
return !a && !s ? null : /* @__PURE__ */ l(
|
|
365
384
|
"div",
|
|
366
385
|
{
|
|
367
386
|
"data-slot": "stepper-content",
|
|
368
|
-
"data-state":
|
|
369
|
-
className:
|
|
370
|
-
hidden: !
|
|
387
|
+
"data-state": o,
|
|
388
|
+
className: u("w-full", e, !s && a && "hidden"),
|
|
389
|
+
hidden: !s && a,
|
|
371
390
|
children: n
|
|
372
391
|
}
|
|
373
392
|
);
|
|
374
393
|
}
|
|
375
394
|
export {
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
395
|
+
Q as Stepper,
|
|
396
|
+
at as StepperContent,
|
|
397
|
+
Y as StepperIndicator,
|
|
398
|
+
W as StepperItem,
|
|
399
|
+
tt as StepperNav,
|
|
400
|
+
et as StepperPanel,
|
|
401
|
+
Z as StepperSeparator,
|
|
402
|
+
_ as StepperTitle,
|
|
403
|
+
X as StepperTrigger,
|
|
404
|
+
C as useStepItem,
|
|
405
|
+
b as useStepper
|
|
387
406
|
};
|
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsxs as
|
|
3
|
-
import { useDataCrossTable as
|
|
4
|
-
import { Button as
|
|
5
|
-
import { Icon as
|
|
6
|
-
const
|
|
2
|
+
import { jsxs as r, jsx as b } from "react/jsx-runtime";
|
|
3
|
+
import { useDataCrossTable as $ } from "./data-cross-table-context.js";
|
|
4
|
+
import { Button as c } from "../../button.js";
|
|
5
|
+
import { Icon as g } from "../../icon.js";
|
|
6
|
+
const B = ({ className: x = "" }) => {
|
|
7
7
|
const {
|
|
8
|
-
editedCells:
|
|
9
|
-
setEditedCells:
|
|
8
|
+
editedCells: f,
|
|
9
|
+
setEditedCells: m,
|
|
10
10
|
toDefaultCells: n,
|
|
11
11
|
setToDefaultCells: d,
|
|
12
12
|
editMode: p,
|
|
13
|
-
setEditMode:
|
|
13
|
+
setEditMode: u,
|
|
14
14
|
onConfirmedCells: o,
|
|
15
15
|
editConfirmLabel: D,
|
|
16
16
|
editCancelLabel: j,
|
|
17
17
|
editRestoreDefaultLabel: k,
|
|
18
|
-
showDefaultActionButton:
|
|
19
|
-
} =
|
|
18
|
+
showDefaultActionButton: C
|
|
19
|
+
} = $();
|
|
20
20
|
if (!p) return null;
|
|
21
|
-
const l = Object.keys(
|
|
21
|
+
const l = Object.keys(f).length, s = Object.keys(n).length, i = l > 0 || s > 0, L = () => {
|
|
22
22
|
if (o) {
|
|
23
23
|
const a = Object.entries(n).map(
|
|
24
|
-
([
|
|
24
|
+
([, { value: I, cell: e }]) => ({
|
|
25
25
|
fromId: e.fromId,
|
|
26
26
|
toId: e.toId,
|
|
27
27
|
id: e.id,
|
|
28
|
-
value:
|
|
28
|
+
value: I
|
|
29
29
|
})
|
|
30
30
|
);
|
|
31
31
|
o({
|
|
@@ -36,15 +36,15 @@ const R = ({ className: x = "" }) => {
|
|
|
36
36
|
d({});
|
|
37
37
|
}, N = () => {
|
|
38
38
|
if (o && i) {
|
|
39
|
-
const a = Object.entries(
|
|
40
|
-
([
|
|
39
|
+
const a = Object.entries(f).map(
|
|
40
|
+
([, { value: e, cell: t }]) => ({
|
|
41
41
|
fromId: t.fromId,
|
|
42
42
|
toId: t.toId,
|
|
43
43
|
id: t.id,
|
|
44
44
|
value: e
|
|
45
45
|
})
|
|
46
|
-
),
|
|
47
|
-
([
|
|
46
|
+
), h = Object.entries(n).map(
|
|
47
|
+
([, { value: e, cell: t }]) => ({
|
|
48
48
|
fromId: t.fromId,
|
|
49
49
|
toId: t.toId,
|
|
50
50
|
id: t.id,
|
|
@@ -53,16 +53,16 @@ const R = ({ className: x = "" }) => {
|
|
|
53
53
|
);
|
|
54
54
|
o({
|
|
55
55
|
editedCells: a,
|
|
56
|
-
toDefaultCells:
|
|
56
|
+
toDefaultCells: h
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
|
-
|
|
59
|
+
m({}), d({}), u(!1);
|
|
60
60
|
}, O = () => {
|
|
61
|
-
|
|
61
|
+
m({}), d({}), u(!1);
|
|
62
62
|
};
|
|
63
|
-
return /* @__PURE__ */
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
return /* @__PURE__ */ r("div", { className: `flex items-center space-x-2 ${x}`, children: [
|
|
64
|
+
C && /* @__PURE__ */ r(
|
|
65
|
+
c,
|
|
66
66
|
{
|
|
67
67
|
variant: "outline",
|
|
68
68
|
size: "sm",
|
|
@@ -78,7 +78,7 @@ const R = ({ className: x = "" }) => {
|
|
|
78
78
|
}
|
|
79
79
|
),
|
|
80
80
|
/* @__PURE__ */ b(
|
|
81
|
-
|
|
81
|
+
c,
|
|
82
82
|
{
|
|
83
83
|
variant: "outline",
|
|
84
84
|
size: "sm",
|
|
@@ -88,23 +88,23 @@ const R = ({ className: x = "" }) => {
|
|
|
88
88
|
children: j
|
|
89
89
|
}
|
|
90
90
|
),
|
|
91
|
-
/* @__PURE__ */
|
|
92
|
-
|
|
91
|
+
/* @__PURE__ */ r(
|
|
92
|
+
c,
|
|
93
93
|
{
|
|
94
94
|
size: "sm",
|
|
95
95
|
onClick: N,
|
|
96
96
|
disabled: !i,
|
|
97
97
|
className: "text-xs",
|
|
98
98
|
children: [
|
|
99
|
-
/* @__PURE__ */ b(
|
|
99
|
+
/* @__PURE__ */ b(g, { name: "Check", className: "mr-1 h-3 w-3" }),
|
|
100
100
|
D,
|
|
101
101
|
" ",
|
|
102
|
-
|
|
102
|
+
C ? i && `(${l + s})` : l > 0 && `(${l})`
|
|
103
103
|
]
|
|
104
104
|
}
|
|
105
105
|
)
|
|
106
106
|
] });
|
|
107
107
|
};
|
|
108
108
|
export {
|
|
109
|
-
|
|
109
|
+
B as DataCrossTableButtonsGroup
|
|
110
110
|
};
|