@pyck/react 0.0.6 → 0.0.8
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/{checkmark-fJPHeX8N.js → checkmark-rF75Pk98.js} +16 -3
- package/dist/{close-button-r3blTfSH.js → close-button-DAgpEZYq.js} +38 -7
- package/dist/components/avatar/index.js +27 -14
- package/dist/components/button/index.js +1 -1
- package/dist/components/carousel/index.js +22 -7
- package/dist/components/checkbox/index.d.ts +1 -1
- package/dist/components/checkbox/index.js +59 -23
- package/dist/components/checkmark/index.js +1 -1
- package/dist/components/clipboard/index.js +3 -2
- package/dist/components/combobox/index.js +20 -7
- package/dist/components/data-list/index.d.ts +3 -2
- package/dist/components/data-list/index.js +8 -4
- package/dist/components/date-picker/index.js +17 -10
- package/dist/components/dialog/index.d.ts +1 -1
- package/dist/components/dialog/index.js +118 -88
- package/dist/components/display-date-value/index.d.ts +1 -1
- package/dist/components/display-date-value/index.js +2 -2
- package/dist/components/display-value/index.js +1 -1
- package/dist/components/drawer/index.d.ts +1 -1
- package/dist/components/drawer/index.js +6 -1
- package/dist/components/drilldown-menu/index.js +70 -20
- package/dist/components/field/index.js +30 -20
- package/dist/components/floating-panel/index.d.ts +1 -1
- package/dist/components/floating-panel/index.js +46 -9
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/index.js +40 -13
- package/dist/components/highlight/index.d.ts +1 -1
- package/dist/components/highlight/index.js +13 -2
- package/dist/components/icon/index.d.ts +1 -1
- package/dist/components/icon/index.js +1 -1
- package/dist/components/image/index.js +7 -1
- package/dist/components/input/index.d.ts +1 -1
- package/dist/components/input/index.js +22 -2
- package/dist/components/input-group/index.js +28 -5
- package/dist/components/json-form-builder/index.d.ts +1 -1
- package/dist/components/json-form-builder/index.js +166 -40
- package/dist/components/loader/index.js +35 -15
- package/dist/components/logo/index.js +58 -7
- package/dist/components/menu/index.d.ts +1 -1
- package/dist/components/menu/index.js +18 -6
- package/dist/components/number-input/index.d.ts +1 -1
- package/dist/components/number-input/index.js +27 -11
- package/dist/components/page-header/index.js +28 -6
- package/dist/components/pagination/index.d.ts +1 -1
- package/dist/components/pagination/index.js +20 -3
- package/dist/components/picker/index.js +56 -28
- package/dist/components/popover/index.d.ts +1 -1
- package/dist/components/popover/index.js +2 -1
- package/dist/components/progress/index.js +14 -19
- package/dist/components/progress-circle/index.js +23 -20
- package/dist/components/radio-group/index.js +17 -17
- package/dist/components/scroll-area/index.js +22 -16
- package/dist/components/segment-group/index.d.ts +1 -1
- package/dist/components/segment-group/index.js +7 -1
- package/dist/components/select/index.d.ts +1 -1
- package/dist/components/select/index.js +43 -10
- package/dist/components/show/index.js +1 -1
- package/dist/components/skeleton/index.js +13 -2
- package/dist/components/slider/index.d.ts +1 -0
- package/dist/components/slider/index.js +55 -33
- package/dist/components/spotlight/index.js +208 -31
- package/dist/components/steps/index.js +15 -7
- package/dist/components/switch/index.d.ts +1 -1
- package/dist/components/switch/index.js +65 -29
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/index.js +79 -15
- package/dist/components/tags-input/index.d.ts +1 -1
- package/dist/components/tags-input/index.js +9 -3
- package/dist/components/textarea/index.d.ts +1 -1
- package/dist/components/textarea/index.js +21 -2
- package/dist/components/toast/index.d.ts +1 -1
- package/dist/components/toast/index.js +32 -4
- package/dist/components/tooltip/index.d.ts +1 -1
- package/dist/components/tooltip/index.js +21 -16
- package/dist/components/tree-view/index.d.ts +1 -1
- package/dist/components/tree-view/index.js +25 -6
- package/dist/{display-date-value-BAU46P8s.js → display-date-value-Ca7v5jK7.js} +7 -2
- package/dist/{display-date-value-CdfgVuB7.d.ts → display-date-value-RbzRgYHt.d.ts} +1 -1
- package/dist/{display-value-Bz71ZqgM.js → display-value-DDIH9kvx.js} +29 -5
- package/dist/{featured-icon-CKDv0xfF.js → featured-icon-DBnAKGXC.js} +6 -2
- package/dist/{show-DAysVQAC.js → show-B7zG1Vci.js} +2 -1
- package/package.json +4 -3
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { t as __exportAll } from "../../chunk-BYypO7fO.js";
|
|
2
|
-
import { n as IconButton, r as Button } from "../../close-button-
|
|
2
|
+
import { n as IconButton, r as Button } from "../../close-button-DAgpEZYq.js";
|
|
3
3
|
import "../button/index.js";
|
|
4
4
|
import { DatePicker, DatePickerContext as Context } from "@ark-ui/react/date-picker";
|
|
5
5
|
import { createStyleContext } from "@pyck/styled-system/jsx";
|
|
6
6
|
import { datePicker } from "@pyck/styled-system/recipes";
|
|
7
7
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
8
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
9
|
|
|
9
10
|
//#region src/components/date-picker/date-picker.tsx
|
|
10
11
|
var date_picker_exports = /* @__PURE__ */ __exportAll({
|
|
@@ -46,17 +47,21 @@ const Label = withContext(DatePicker.Label, "label");
|
|
|
46
47
|
const MonthSelect = withContext(DatePicker.MonthSelect, "monthSelect");
|
|
47
48
|
const NextTrigger = withContext(DatePicker.NextTrigger, "nextTrigger", { defaultProps: {
|
|
48
49
|
asChild: true,
|
|
49
|
-
children:
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
51
|
+
size: "sm",
|
|
52
|
+
variant: "plain",
|
|
53
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
54
|
+
})
|
|
52
55
|
} });
|
|
53
56
|
const Positioner = withContext(DatePicker.Positioner, "positioner");
|
|
54
57
|
const PresetTrigger = withContext(DatePicker.PresetTrigger, "presetTrigger");
|
|
55
58
|
const PrevTrigger = withContext(DatePicker.PrevTrigger, "prevTrigger", { defaultProps: {
|
|
56
59
|
asChild: true,
|
|
57
|
-
children:
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
61
|
+
size: "sm",
|
|
62
|
+
variant: "plain",
|
|
63
|
+
children: /* @__PURE__ */ jsx(ChevronLeftIcon, {})
|
|
64
|
+
})
|
|
60
65
|
} });
|
|
61
66
|
const RangeText = withContext(DatePicker.RangeText, "rangeText");
|
|
62
67
|
const Table = withContext(DatePicker.Table, "table");
|
|
@@ -71,9 +76,11 @@ const View = withContext(DatePicker.View, "view");
|
|
|
71
76
|
const ViewControl = withContext(DatePicker.ViewControl, "viewControl");
|
|
72
77
|
const ViewTrigger = withContext(DatePicker.ViewTrigger, "viewTrigger", { defaultProps: {
|
|
73
78
|
asChild: true,
|
|
74
|
-
children:
|
|
75
|
-
|
|
76
|
-
|
|
79
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
80
|
+
variant: "plain",
|
|
81
|
+
size: "sm",
|
|
82
|
+
children: /* @__PURE__ */ jsx(RangeText, {})
|
|
83
|
+
})
|
|
77
84
|
} });
|
|
78
85
|
const YearSelect = withContext(DatePicker.YearSelect, "yearSelect");
|
|
79
86
|
|
|
@@ -3,10 +3,10 @@ import * as react from "react";
|
|
|
3
3
|
import { ComponentProps, ElementType, ReactNode } from "react";
|
|
4
4
|
import * as _pyck_styled_system_jsx0 from "@pyck/styled-system/jsx";
|
|
5
5
|
import * as _pyck_styled_system_recipes0 from "@pyck/styled-system/recipes";
|
|
6
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
6
7
|
import { DefaultValues, FieldValues } from "react-hook-form";
|
|
7
8
|
import { Dialog, DialogContext as Context } from "@ark-ui/react/dialog";
|
|
8
9
|
import * as _ark_ui_react0 from "@ark-ui/react";
|
|
9
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
10
10
|
|
|
11
11
|
//#region src/components/dialog/create-overlay.d.ts
|
|
12
12
|
interface CreateOverlayProps {
|
|
@@ -5,9 +5,10 @@ import { ark } from "@ark-ui/react/factory";
|
|
|
5
5
|
import { Stack, createStyleContext } from "@pyck/styled-system/jsx";
|
|
6
6
|
import { dialog } from "@pyck/styled-system/recipes";
|
|
7
7
|
import { CheckCircleIcon, FilePenLineIcon, Trash2Icon } from "lucide-react";
|
|
8
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
8
9
|
import { useForm } from "react-hook-form";
|
|
9
|
-
import { omit } from "@pyck/react/utils";
|
|
10
10
|
import { Show } from "@pyck/react/show";
|
|
11
|
+
import { omit } from "@pyck/react/utils";
|
|
11
12
|
import { Portal } from "@ark-ui/react/portal";
|
|
12
13
|
import { Button, CloseButton } from "@pyck/react/button";
|
|
13
14
|
import { FeaturedIcon } from "@pyck/react/icon";
|
|
@@ -127,7 +128,7 @@ function createOverlay(Component, options) {
|
|
|
127
128
|
} else t0 = $[1];
|
|
128
129
|
let t1;
|
|
129
130
|
if ($[2] !== t0) {
|
|
130
|
-
t1 =
|
|
131
|
+
t1 = /* @__PURE__ */ jsx(Fragment$1, { children: t0 });
|
|
131
132
|
$[2] = t0;
|
|
132
133
|
$[3] = t1;
|
|
133
134
|
} else t1 = $[3];
|
|
@@ -135,8 +136,7 @@ function createOverlay(Component, options) {
|
|
|
135
136
|
}
|
|
136
137
|
function _temp(props) {
|
|
137
138
|
const { _id, ...componentProps } = props;
|
|
138
|
-
|
|
139
|
-
return <Comp key={_id} {...componentProps} />;
|
|
139
|
+
return /* @__PURE__ */ jsx(Component, { ...componentProps }, _id);
|
|
140
140
|
}
|
|
141
141
|
return {
|
|
142
142
|
Viewport,
|
|
@@ -199,7 +199,11 @@ const ActionTrigger = forwardRef(function ActionTrigger(props, ref) {
|
|
|
199
199
|
} else t0 = $[1];
|
|
200
200
|
let t1;
|
|
201
201
|
if ($[2] !== props || $[3] !== ref || $[4] !== t0) {
|
|
202
|
-
t1 =
|
|
202
|
+
t1 = /* @__PURE__ */ jsx(ark.button, {
|
|
203
|
+
...props,
|
|
204
|
+
ref,
|
|
205
|
+
onClick: t0
|
|
206
|
+
});
|
|
203
207
|
$[2] = props;
|
|
204
208
|
$[3] = ref;
|
|
205
209
|
$[4] = t0;
|
|
@@ -212,98 +216,124 @@ const ActionTrigger = forwardRef(function ActionTrigger(props, ref) {
|
|
|
212
216
|
//#region src/components/dialog/confirm-dialog.tsx
|
|
213
217
|
const ConfirmDialog = createOverlay((props) => {
|
|
214
218
|
const { title, description, onConfirm, intent = "default", ...rest } = props;
|
|
215
|
-
return
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
219
|
+
return /* @__PURE__ */ jsx(Root, {
|
|
220
|
+
size: "sm",
|
|
221
|
+
...rest,
|
|
222
|
+
children: /* @__PURE__ */ jsxs(Portal, { children: [/* @__PURE__ */ jsx(Backdrop, {}), /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, {
|
|
223
|
+
backgroundImage: {
|
|
224
|
+
_light: "url(/public/images/pattern-light.svg)",
|
|
225
|
+
_dark: "url(/public/images/pattern-dark.svg)"
|
|
226
|
+
},
|
|
227
|
+
backgroundPosition: "center",
|
|
228
|
+
backgroundRepeat: "no-repeat",
|
|
229
|
+
backgroundPositionX: "-25",
|
|
230
|
+
backgroundPositionY: "-73",
|
|
231
|
+
children: [
|
|
232
|
+
/* @__PURE__ */ jsx(Header, {
|
|
233
|
+
pb: "0",
|
|
234
|
+
children: /* @__PURE__ */ jsxs(Stack, {
|
|
235
|
+
gap: "4",
|
|
236
|
+
children: [/* @__PURE__ */ jsx(Show, {
|
|
237
|
+
when: intent === "destructive",
|
|
238
|
+
fallback: /* @__PURE__ */ jsx(FeaturedIcon, {
|
|
239
|
+
variant: "embedded",
|
|
240
|
+
children: /* @__PURE__ */ jsx(CheckCircleIcon, {})
|
|
241
|
+
}),
|
|
242
|
+
children: /* @__PURE__ */ jsx(FeaturedIcon, {
|
|
243
|
+
variant: "embedded",
|
|
244
|
+
children: /* @__PURE__ */ jsx(Trash2Icon, {})
|
|
245
|
+
})
|
|
246
|
+
}), /* @__PURE__ */ jsxs(Stack, {
|
|
247
|
+
gap: "0.5",
|
|
248
|
+
children: [/* @__PURE__ */ jsx(Title, { children: title }), description && /* @__PURE__ */ jsx(Description, { children: description })]
|
|
249
|
+
})]
|
|
250
|
+
})
|
|
251
|
+
}),
|
|
252
|
+
/* @__PURE__ */ jsxs(Footer, { children: [/* @__PURE__ */ jsx(ActionTrigger, {
|
|
253
|
+
asChild: true,
|
|
254
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
255
|
+
variant: "outline",
|
|
256
|
+
flex: "1",
|
|
257
|
+
children: "Cancel"
|
|
258
|
+
})
|
|
259
|
+
}), /* @__PURE__ */ jsx(ActionTrigger, {
|
|
260
|
+
asChild: true,
|
|
261
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
262
|
+
onClick: onConfirm,
|
|
263
|
+
flex: "1",
|
|
264
|
+
colorPalette: intent === "destructive" ? "red" : "teal",
|
|
265
|
+
children: intent === "destructive" ? "Delete" : "Confirm"
|
|
266
|
+
})
|
|
267
|
+
})] }),
|
|
268
|
+
/* @__PURE__ */ jsx(CloseTrigger, {
|
|
269
|
+
asChild: true,
|
|
270
|
+
children: /* @__PURE__ */ jsx(CloseButton, {})
|
|
271
|
+
})
|
|
272
|
+
]
|
|
273
|
+
}) })] })
|
|
274
|
+
});
|
|
257
275
|
});
|
|
258
276
|
|
|
259
277
|
//#endregion
|
|
260
278
|
//#region src/components/dialog/form-dialog.tsx
|
|
261
279
|
const FormDialogBase = createOverlay((props) => {
|
|
262
|
-
const { content, defaultValues, description, onSubmit, schema, title, icon =
|
|
280
|
+
const { content, defaultValues, description, onSubmit, schema, title, icon = /* @__PURE__ */ jsx(FilePenLineIcon, {}), submitLabel = "Submit", ...rest } = props;
|
|
263
281
|
const form = useForm({
|
|
264
282
|
resolver: zodResolver(schema),
|
|
265
283
|
defaultValues
|
|
266
284
|
});
|
|
267
285
|
const id = useId();
|
|
268
|
-
return
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
286
|
+
return /* @__PURE__ */ jsx(Root, {
|
|
287
|
+
size: "sm",
|
|
288
|
+
...rest,
|
|
289
|
+
children: /* @__PURE__ */ jsxs(Portal, { children: [/* @__PURE__ */ jsx(Backdrop, {}), /* @__PURE__ */ jsx(Positioner, { children: /* @__PURE__ */ jsxs(Content, {
|
|
290
|
+
backgroundImage: {
|
|
291
|
+
_light: "url(/public/images/pattern-light.svg)",
|
|
292
|
+
_dark: "url(/public/images/pattern-dark.svg)"
|
|
293
|
+
},
|
|
294
|
+
backgroundPosition: "center",
|
|
295
|
+
backgroundRepeat: "no-repeat",
|
|
296
|
+
backgroundPositionX: "-25",
|
|
297
|
+
backgroundPositionY: "-73",
|
|
298
|
+
children: [
|
|
299
|
+
/* @__PURE__ */ jsx(Header, { children: /* @__PURE__ */ jsxs(Stack, {
|
|
300
|
+
gap: "4",
|
|
301
|
+
children: [/* @__PURE__ */ jsx(FeaturedIcon, {
|
|
302
|
+
variant: "embedded",
|
|
303
|
+
children: icon
|
|
304
|
+
}), /* @__PURE__ */ jsxs(Stack, {
|
|
305
|
+
gap: "0.5",
|
|
306
|
+
children: [/* @__PURE__ */ jsx(Title, { children: title }), description && /* @__PURE__ */ jsx(Description, { children: description })]
|
|
307
|
+
})]
|
|
308
|
+
}) }),
|
|
309
|
+
/* @__PURE__ */ jsx(Body, { children: /* @__PURE__ */ jsx(Form, {
|
|
310
|
+
id,
|
|
311
|
+
value: form,
|
|
312
|
+
onSubmit: form.handleSubmit(onSubmit),
|
|
313
|
+
children: content
|
|
314
|
+
}) }),
|
|
315
|
+
/* @__PURE__ */ jsxs(Footer, { children: [/* @__PURE__ */ jsx(ActionTrigger, {
|
|
316
|
+
asChild: true,
|
|
317
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
318
|
+
variant: "outline",
|
|
319
|
+
flex: "1",
|
|
320
|
+
children: "Cancel"
|
|
321
|
+
})
|
|
322
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
323
|
+
form: id,
|
|
324
|
+
type: "submit",
|
|
325
|
+
loading: form.formState.isSubmitting,
|
|
326
|
+
colorPalette: "teal",
|
|
327
|
+
flex: "1",
|
|
328
|
+
children: submitLabel
|
|
329
|
+
})] }),
|
|
330
|
+
/* @__PURE__ */ jsx(CloseTrigger, {
|
|
331
|
+
asChild: true,
|
|
332
|
+
children: /* @__PURE__ */ jsx(CloseButton, {})
|
|
333
|
+
})
|
|
334
|
+
]
|
|
335
|
+
}) })] })
|
|
336
|
+
});
|
|
307
337
|
});
|
|
308
338
|
const FormDialog = {
|
|
309
339
|
...FormDialogBase,
|
|
@@ -316,7 +346,7 @@ const OverlayManager = () => {
|
|
|
316
346
|
const $ = c(1);
|
|
317
347
|
let t0;
|
|
318
348
|
if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
|
|
319
|
-
t0 =
|
|
349
|
+
t0 = /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(FormDialog.Viewport, {}), /* @__PURE__ */ jsx(ConfirmDialog.Viewport, {})] });
|
|
320
350
|
$[0] = t0;
|
|
321
351
|
} else t0 = $[0];
|
|
322
352
|
return t0;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as DisplayDateValue, r as DisplayDateValueProps, t as DateFormatType } from "../../display-date-value-
|
|
1
|
+
import { n as DisplayDateValue, r as DisplayDateValueProps, t as DateFormatType } from "../../display-date-value-RbzRgYHt.js";
|
|
2
2
|
import { DateInput } from "@pyck/react/utils";
|
|
3
3
|
export { type DateFormatType, type DateInput, DisplayDateValue, type DisplayDateValueProps };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../display-value-
|
|
2
|
-
import { t as DisplayDateValue } from "../../display-date-value-
|
|
1
|
+
import "../../display-value-DDIH9kvx.js";
|
|
2
|
+
import { t as DisplayDateValue } from "../../display-date-value-Ca7v5jK7.js";
|
|
3
3
|
|
|
4
4
|
export { DisplayDateValue };
|
|
@@ -2,9 +2,9 @@ import * as react from "react";
|
|
|
2
2
|
import { ComponentProps } from "react";
|
|
3
3
|
import * as _pyck_styled_system_jsx0 from "@pyck/styled-system/jsx";
|
|
4
4
|
import * as _pyck_styled_system_recipes0 from "@pyck/styled-system/recipes";
|
|
5
|
+
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
5
6
|
import { Dialog, DialogContext as Context } from "@ark-ui/react/dialog";
|
|
6
7
|
import * as _ark_ui_react0 from "@ark-ui/react";
|
|
7
|
-
import * as react_jsx_runtime0 from "react/jsx-runtime";
|
|
8
8
|
|
|
9
9
|
//#region src/components/drawer/drawer.d.ts
|
|
10
10
|
declare namespace drawer_d_exports {
|
|
@@ -4,6 +4,7 @@ import { forwardRef } from "react";
|
|
|
4
4
|
import { ark } from "@ark-ui/react/factory";
|
|
5
5
|
import { createStyleContext } from "@pyck/styled-system/jsx";
|
|
6
6
|
import { drawer } from "@pyck/styled-system/recipes";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
8
|
import { Dialog, DialogContext as Context, useDialogContext } from "@ark-ui/react/dialog";
|
|
8
9
|
|
|
9
10
|
//#region src/components/drawer/drawer.tsx
|
|
@@ -53,7 +54,11 @@ const ActionTrigger = forwardRef(function ActionTrigger(props, ref) {
|
|
|
53
54
|
} else t0 = $[1];
|
|
54
55
|
let t1;
|
|
55
56
|
if ($[2] !== props || $[3] !== ref || $[4] !== t0) {
|
|
56
|
-
t1 =
|
|
57
|
+
t1 = /* @__PURE__ */ jsx(ark.button, {
|
|
58
|
+
...props,
|
|
59
|
+
ref,
|
|
60
|
+
onClick: t0
|
|
61
|
+
});
|
|
57
62
|
$[2] = props;
|
|
58
63
|
$[3] = ref;
|
|
59
64
|
$[4] = t0;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { n as Icon } from "../../featured-icon-CKDv0xfF.js";
|
|
1
|
+
import { n as Icon } from "../../featured-icon-DBnAKGXC.js";
|
|
3
2
|
import "../icon/index.js";
|
|
4
3
|
import { t as Span } from "../../span-DWZSA3mH.js";
|
|
5
4
|
import "../span/index.js";
|
|
@@ -9,18 +8,11 @@ import { ark } from "@ark-ui/react/factory";
|
|
|
9
8
|
import { Box, HStack, Stack, createStyleContext } from "@pyck/styled-system/jsx";
|
|
10
9
|
import { drilldownMenu } from "@pyck/styled-system/recipes";
|
|
11
10
|
import { ChevronLeftIcon, ChevronRightIcon } from "lucide-react";
|
|
11
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
12
|
import { Group } from "@pyck/react/group";
|
|
13
13
|
import { Show } from "@pyck/react/show";
|
|
14
14
|
|
|
15
15
|
//#region src/components/drilldown-menu/drilldown-menu.tsx
|
|
16
|
-
var drilldown_menu_exports = /* @__PURE__ */ __exportAll({
|
|
17
|
-
Content: () => Content,
|
|
18
|
-
Item: () => Item,
|
|
19
|
-
List: () => List,
|
|
20
|
-
Root: () => Root,
|
|
21
|
-
Trigger: () => Trigger,
|
|
22
|
-
Viewport: () => Viewport
|
|
23
|
-
});
|
|
24
16
|
const { withProvider, withContext } = createStyleContext(drilldownMenu);
|
|
25
17
|
const Root = withProvider(ark.div, "root");
|
|
26
18
|
const Viewport = withContext(ark.div, "viewport");
|
|
@@ -164,12 +156,17 @@ const DrilldownMenu = (t0) => {
|
|
|
164
156
|
const t6 = menu.canGoBack ? "1" : "0";
|
|
165
157
|
let t7;
|
|
166
158
|
if ($[11] === Symbol.for("react.memo_cache_sentinel")) {
|
|
167
|
-
t7 =
|
|
159
|
+
t7 = /* @__PURE__ */ jsx(ChevronLeftIcon, {});
|
|
168
160
|
$[11] = t7;
|
|
169
161
|
} else t7 = $[11];
|
|
170
162
|
let t8;
|
|
171
163
|
if ($[12] !== t6) {
|
|
172
|
-
t8 =
|
|
164
|
+
t8 = /* @__PURE__ */ jsx(Icon, {
|
|
165
|
+
size: "sm",
|
|
166
|
+
color: "fg.subtle",
|
|
167
|
+
opacity: t6,
|
|
168
|
+
children: t7
|
|
169
|
+
});
|
|
173
170
|
$[12] = t6;
|
|
174
171
|
$[13] = t8;
|
|
175
172
|
} else t8 = $[13];
|
|
@@ -183,25 +180,46 @@ const DrilldownMenu = (t0) => {
|
|
|
183
180
|
} else t9 = $[17];
|
|
184
181
|
let t10;
|
|
185
182
|
if ($[18] !== t9) {
|
|
186
|
-
t10 =
|
|
183
|
+
t10 = /* @__PURE__ */ jsx(Stack, {
|
|
184
|
+
gap: "0",
|
|
185
|
+
alignItems: "start",
|
|
186
|
+
justify: "center",
|
|
187
|
+
children: /* @__PURE__ */ jsx(Span, {
|
|
188
|
+
textStyle: "md",
|
|
189
|
+
fontWeight: "medium",
|
|
190
|
+
children: t9
|
|
191
|
+
})
|
|
192
|
+
});
|
|
187
193
|
$[18] = t9;
|
|
188
194
|
$[19] = t10;
|
|
189
195
|
} else t10 = $[19];
|
|
190
196
|
let t11;
|
|
191
197
|
if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
|
|
192
|
-
t11 =
|
|
198
|
+
t11 = /* @__PURE__ */ jsx(Box, {});
|
|
193
199
|
$[20] = t11;
|
|
194
200
|
} else t11 = $[20];
|
|
195
201
|
let t12;
|
|
196
202
|
if ($[21] !== t10 || $[22] !== t8) {
|
|
197
|
-
t12 =
|
|
203
|
+
t12 = /* @__PURE__ */ jsxs(HStack, {
|
|
204
|
+
justify: "space-between",
|
|
205
|
+
width: "full",
|
|
206
|
+
children: [
|
|
207
|
+
t8,
|
|
208
|
+
t10,
|
|
209
|
+
t11
|
|
210
|
+
]
|
|
211
|
+
});
|
|
198
212
|
$[21] = t10;
|
|
199
213
|
$[22] = t8;
|
|
200
214
|
$[23] = t12;
|
|
201
215
|
} else t12 = $[23];
|
|
202
216
|
let t13;
|
|
203
217
|
if ($[24] !== menu.prev || $[25] !== t12 || $[26] !== t5) {
|
|
204
|
-
t13 =
|
|
218
|
+
t13 = /* @__PURE__ */ jsx(Trigger, {
|
|
219
|
+
onClick: menu.prev,
|
|
220
|
+
disabled: t5,
|
|
221
|
+
children: t12
|
|
222
|
+
});
|
|
205
223
|
$[24] = menu.prev;
|
|
206
224
|
$[25] = t12;
|
|
207
225
|
$[26] = t5;
|
|
@@ -216,7 +234,28 @@ const DrilldownMenu = (t0) => {
|
|
|
216
234
|
} else t15 = $[29];
|
|
217
235
|
let t16;
|
|
218
236
|
if ($[30] !== collection || $[31] !== handleNodeClick || $[32] !== isLeafNode || $[33] !== menu.current || $[34] !== renderNode) {
|
|
219
|
-
t16 = menu.current?.map((node_2) =>
|
|
237
|
+
t16 = menu.current?.map((node_2) => /* @__PURE__ */ jsx(Item, { children: /* @__PURE__ */ jsx(Trigger, {
|
|
238
|
+
onClick: () => handleNodeClick(node_2),
|
|
239
|
+
children: /* @__PURE__ */ jsxs(HStack, {
|
|
240
|
+
justifyContent: "space-between",
|
|
241
|
+
width: "full",
|
|
242
|
+
children: [/* @__PURE__ */ jsx(Stack, {
|
|
243
|
+
gap: "0",
|
|
244
|
+
alignItems: "start",
|
|
245
|
+
children: /* @__PURE__ */ jsx(Span, {
|
|
246
|
+
fontWeight: "medium",
|
|
247
|
+
children: renderNode(node_2)
|
|
248
|
+
})
|
|
249
|
+
}), /* @__PURE__ */ jsx(Show, {
|
|
250
|
+
when: !isLeafNode(node_2),
|
|
251
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
252
|
+
size: "sm",
|
|
253
|
+
color: "fg.subtle",
|
|
254
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {})
|
|
255
|
+
})
|
|
256
|
+
})]
|
|
257
|
+
})
|
|
258
|
+
}) }, collection.getNodeValue(node_2)));
|
|
220
259
|
$[30] = collection;
|
|
221
260
|
$[31] = handleNodeClick;
|
|
222
261
|
$[32] = isLeafNode;
|
|
@@ -226,13 +265,24 @@ const DrilldownMenu = (t0) => {
|
|
|
226
265
|
} else t16 = $[35];
|
|
227
266
|
let t17;
|
|
228
267
|
if ($[36] !== t16) {
|
|
229
|
-
t17 =
|
|
268
|
+
t17 = /* @__PURE__ */ jsx(Group, {
|
|
269
|
+
attached: true,
|
|
270
|
+
orientation: "vertical",
|
|
271
|
+
width: "full",
|
|
272
|
+
asChild: true,
|
|
273
|
+
children: /* @__PURE__ */ jsx(List, { children: t16 })
|
|
274
|
+
});
|
|
230
275
|
$[36] = t16;
|
|
231
276
|
$[37] = t17;
|
|
232
277
|
} else t17 = $[37];
|
|
233
278
|
let t18;
|
|
234
279
|
if ($[38] !== menu.depth || $[39] !== menu.direction || $[40] !== t14 || $[41] !== t15 || $[42] !== t17) {
|
|
235
|
-
t18 =
|
|
280
|
+
t18 = /* @__PURE__ */ jsx(Viewport, { children: /* @__PURE__ */ jsx(Content, {
|
|
281
|
+
"data-animating": t14,
|
|
282
|
+
"data-direction": menu.direction,
|
|
283
|
+
onAnimationEnd: t15,
|
|
284
|
+
children: t17
|
|
285
|
+
}, menu.depth) });
|
|
236
286
|
$[38] = menu.depth;
|
|
237
287
|
$[39] = menu.direction;
|
|
238
288
|
$[40] = t14;
|
|
@@ -242,7 +292,7 @@ const DrilldownMenu = (t0) => {
|
|
|
242
292
|
} else t18 = $[43];
|
|
243
293
|
let t19;
|
|
244
294
|
if ($[44] !== t13 || $[45] !== t18) {
|
|
245
|
-
t19 =
|
|
295
|
+
t19 = /* @__PURE__ */ jsxs(Root, { children: [t13, t18] });
|
|
246
296
|
$[44] = t13;
|
|
247
297
|
$[45] = t18;
|
|
248
298
|
$[46] = t19;
|