@saas-ui/react 3.0.0-alpha.16 → 3.0.0-alpha.18
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +19 -0
- package/dist/{chunk-LIYUBUOP.js → chunk-46ISJZBS.js} +1 -1
- package/dist/{chunk-VDXTEASE.js → chunk-4TPVIHNO.js} +10 -1
- package/dist/{chunk-CB52LBJK.js → chunk-72LEGXHY.js} +1 -1
- package/dist/{chunk-FZW2DYK3.js → chunk-BKYGKH3L.js} +1 -1
- package/dist/{chunk-S3CQW7GD.js → chunk-BU7QENBQ.js} +1 -1
- package/dist/{chunk-KK77TYNL.js → chunk-C7B3ELC4.js} +1 -1
- package/dist/chunk-MLJN6IOJ.js +96 -0
- package/dist/{chunk-44ZA3TYW.js → chunk-VZG7EJ64.js} +1 -1
- package/dist/{chunk-H6TFEHY4.js → chunk-WS5XGFSL.js} +1 -1
- package/dist/components/close-button/index.cjs +8 -0
- package/dist/components/close-button/index.js +2 -2
- package/dist/components/dialog/index.cjs +8 -0
- package/dist/components/dialog/index.js +3 -3
- package/dist/components/drawer/index.cjs +8 -0
- package/dist/components/drawer/index.js +3 -3
- package/dist/components/grid-list/index.d.cts +4 -4
- package/dist/components/grid-list/index.d.ts +4 -4
- package/dist/components/icons/index.cjs +10 -0
- package/dist/components/icons/index.d.cts +2 -1
- package/dist/components/icons/index.d.ts +2 -1
- package/dist/components/icons/index.js +3 -1
- package/dist/components/menu/index.cjs +8 -0
- package/dist/components/menu/index.js +2 -2
- package/dist/components/pagination/index.cjs +215 -0
- package/dist/components/pagination/index.d.cts +41 -0
- package/dist/components/pagination/index.d.ts +41 -0
- package/dist/components/pagination/index.js +9 -0
- package/dist/components/search-input/index.cjs +8 -0
- package/dist/components/search-input/index.js +2 -2
- package/dist/components/select/index.cjs +8 -0
- package/dist/components/select/index.js +3 -3
- package/dist/components/steps/index.cjs +8 -0
- package/dist/components/steps/index.js +2 -2
- package/dist/index.cjs +331 -231
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +96 -78
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
@@ -49,6 +49,7 @@ __export(src_exports, {
|
|
49
49
|
Menu: () => menu_exports,
|
50
50
|
Navbar: () => navbar_exports,
|
51
51
|
NumberInput: () => NumberInput,
|
52
|
+
Pagination: () => pagination_exports,
|
52
53
|
PasswordInput: () => PasswordInput,
|
53
54
|
Persona: () => Persona,
|
54
55
|
PersonaAvatar: () => PersonaAvatar2,
|
@@ -66,7 +67,7 @@ __export(src_exports, {
|
|
66
67
|
Switch: () => Switch,
|
67
68
|
Toaster: () => Toaster,
|
68
69
|
Tooltip: () => Tooltip,
|
69
|
-
createSystem: () =>
|
70
|
+
createSystem: () => import_react163.createSystem,
|
70
71
|
defaultConfig: () => defaultConfig,
|
71
72
|
defaultPresenceOptions: () => defaultPresenceOptions,
|
72
73
|
defaultSystem: () => defaultSystem,
|
@@ -2269,7 +2270,7 @@ var appShellSlotRecipe = (0, import_react28.defineSlotRecipe)({
|
|
2269
2270
|
position: {
|
2270
2271
|
static: {
|
2271
2272
|
root: {
|
2272
|
-
height: "
|
2273
|
+
height: "100dvh"
|
2273
2274
|
}
|
2274
2275
|
},
|
2275
2276
|
fullscreen: {
|
@@ -2280,18 +2281,12 @@ var appShellSlotRecipe = (0, import_react28.defineSlotRecipe)({
|
|
2280
2281
|
}
|
2281
2282
|
},
|
2282
2283
|
variant: {
|
2283
|
-
plain: {}
|
2284
|
-
raised: {
|
2285
|
-
main: {
|
2286
|
-
boxShadow: "xs",
|
2287
|
-
zIndex: "layer-1"
|
2288
|
-
}
|
2289
|
-
}
|
2284
|
+
plain: {}
|
2290
2285
|
}
|
2291
2286
|
},
|
2292
2287
|
defaultVariants: {
|
2293
2288
|
position: "static",
|
2294
|
-
variant: "
|
2289
|
+
variant: "plain"
|
2295
2290
|
}
|
2296
2291
|
});
|
2297
2292
|
|
@@ -2302,7 +2297,6 @@ var gridListSlotRecipe = (0, import_react29.defineSlotRecipe)({
|
|
2302
2297
|
slots: ["root", "item", "header", "cell"],
|
2303
2298
|
base: {
|
2304
2299
|
root: {
|
2305
|
-
py: 2,
|
2306
2300
|
position: "relative"
|
2307
2301
|
},
|
2308
2302
|
item: {
|
@@ -2311,35 +2305,14 @@ var gridListSlotRecipe = (0, import_react29.defineSlotRecipe)({
|
|
2311
2305
|
alignItems: "center",
|
2312
2306
|
justifyContent: "space-between",
|
2313
2307
|
flex: 1,
|
2314
|
-
cursor: "pointer",
|
2315
2308
|
userSelect: "none",
|
2316
|
-
transitionProperty: "common",
|
2317
|
-
transitionDuration: "normal",
|
2318
2309
|
borderRadius: "inherit",
|
2319
2310
|
outline: "none",
|
2320
|
-
_hover: {
|
2321
|
-
bg: "blackAlpha.50",
|
2322
|
-
_dark: {
|
2323
|
-
bg: "whiteAlpha.50"
|
2324
|
-
}
|
2325
|
-
},
|
2326
2311
|
_focusVisible: {
|
2327
2312
|
boxShadow: "outline"
|
2328
2313
|
},
|
2329
|
-
_focus: {
|
2330
|
-
bg: "blackAlpha.50",
|
2331
|
-
_dark: {
|
2332
|
-
bg: "whiteAlpha.50"
|
2333
|
-
}
|
2334
|
-
},
|
2335
|
-
_active: {
|
2336
|
-
bg: "blackAlpha.100",
|
2337
|
-
_dark: {
|
2338
|
-
bg: "whiteAlpha.100"
|
2339
|
-
}
|
2340
|
-
},
|
2341
2314
|
_disabled: {
|
2342
|
-
cursor: "
|
2315
|
+
cursor: "disabled",
|
2343
2316
|
opacity: 0.5,
|
2344
2317
|
_hover: {
|
2345
2318
|
bg: "transparent",
|
@@ -2361,50 +2334,92 @@ var gridListSlotRecipe = (0, import_react29.defineSlotRecipe)({
|
|
2361
2334
|
position: "sticky",
|
2362
2335
|
fontSize: "md",
|
2363
2336
|
fontWeight: "semibold",
|
2364
|
-
color: "muted"
|
2337
|
+
color: "fg.muted"
|
2365
2338
|
},
|
2366
2339
|
cell: {
|
2367
|
-
display: "flex",
|
2368
2340
|
flexShrink: 0
|
2369
2341
|
}
|
2370
2342
|
},
|
2371
2343
|
variants: {
|
2344
|
+
interactive: {
|
2345
|
+
true: {
|
2346
|
+
item: {
|
2347
|
+
cursor: "button",
|
2348
|
+
transitionProperty: "bg",
|
2349
|
+
transitionDuration: "fast",
|
2350
|
+
_hover: {
|
2351
|
+
bg: "bg.subtle"
|
2352
|
+
},
|
2353
|
+
_active: {
|
2354
|
+
bg: "bg.subtle"
|
2355
|
+
}
|
2356
|
+
}
|
2357
|
+
}
|
2358
|
+
},
|
2359
|
+
variant: {
|
2360
|
+
simple: {},
|
2361
|
+
rounded: {
|
2362
|
+
item: {
|
2363
|
+
borderRadius: "md",
|
2364
|
+
mb: 0.5
|
2365
|
+
}
|
2366
|
+
}
|
2367
|
+
},
|
2372
2368
|
size: {
|
2373
2369
|
sm: {
|
2374
2370
|
root: {
|
2375
|
-
|
2371
|
+
textStyle: "sm",
|
2372
|
+
py: 0.5
|
2376
2373
|
},
|
2377
2374
|
item: {
|
2378
2375
|
py: 1,
|
2379
|
-
px:
|
2376
|
+
px: 2,
|
2377
|
+
gap: 1
|
2380
2378
|
},
|
2381
2379
|
header: {
|
2382
2380
|
py: 1,
|
2383
|
-
px:
|
2384
|
-
},
|
2385
|
-
cell: {
|
2386
|
-
px: 1
|
2381
|
+
px: 2
|
2387
2382
|
}
|
2388
2383
|
},
|
2389
2384
|
md: {
|
2390
2385
|
root: {
|
2391
|
-
|
2386
|
+
textStyle: "md",
|
2387
|
+
py: 1
|
2392
2388
|
},
|
2393
2389
|
item: {
|
2394
2390
|
py: 2,
|
2395
|
-
px:
|
2391
|
+
px: 3,
|
2392
|
+
gap: 2
|
2396
2393
|
},
|
2397
2394
|
header: {
|
2398
2395
|
py: 2,
|
2399
|
-
px:
|
2400
|
-
},
|
2401
|
-
cell: {
|
2402
|
-
px: 2
|
2396
|
+
px: 3
|
2403
2397
|
}
|
2404
2398
|
}
|
2405
2399
|
}
|
2406
2400
|
},
|
2401
|
+
compoundVariants: [
|
2402
|
+
{
|
2403
|
+
variant: "rounded",
|
2404
|
+
size: "sm",
|
2405
|
+
css: {
|
2406
|
+
root: {
|
2407
|
+
p: 1
|
2408
|
+
}
|
2409
|
+
}
|
2410
|
+
},
|
2411
|
+
{
|
2412
|
+
variant: "rounded",
|
2413
|
+
size: "md",
|
2414
|
+
css: {
|
2415
|
+
root: {
|
2416
|
+
p: 2
|
2417
|
+
}
|
2418
|
+
}
|
2419
|
+
}
|
2420
|
+
],
|
2407
2421
|
defaultVariants: {
|
2422
|
+
variant: "simple",
|
2408
2423
|
size: "md"
|
2409
2424
|
}
|
2410
2425
|
});
|
@@ -2487,7 +2502,7 @@ var navbarSlotRecipe = (0, import_react31.defineSlotRecipe)({
|
|
2487
2502
|
top: 0,
|
2488
2503
|
insetX: 0,
|
2489
2504
|
transitionProperty: "common",
|
2490
|
-
transitionDuration: "
|
2505
|
+
transitionDuration: "moderate",
|
2491
2506
|
transitionTimingFunction: "ease-in-out",
|
2492
2507
|
_hidden: {
|
2493
2508
|
transform: "translateY(-100%)"
|
@@ -2523,7 +2538,7 @@ var navbarSlotRecipe = (0, import_react31.defineSlotRecipe)({
|
|
2523
2538
|
boxSizing: "border-box",
|
2524
2539
|
borderRadius: "md",
|
2525
2540
|
transitionProperty: "common",
|
2526
|
-
transitionDuration: "
|
2541
|
+
transitionDuration: "moderate",
|
2527
2542
|
lineHeight: 1,
|
2528
2543
|
_focusVisible: {
|
2529
2544
|
outline: "none",
|
@@ -4569,7 +4584,7 @@ var editableSlotRecipe = (0, import_react48.defineSlotRecipe)({
|
|
4569
4584
|
display: "inline-flex",
|
4570
4585
|
alignItems: "center",
|
4571
4586
|
transitionProperty: "common",
|
4572
|
-
transitionDuration: "
|
4587
|
+
transitionDuration: "moderate",
|
4573
4588
|
cursor: "text",
|
4574
4589
|
_hover: {
|
4575
4590
|
bg: "bg.muted"
|
@@ -4584,7 +4599,7 @@ var editableSlotRecipe = (0, import_react48.defineSlotRecipe)({
|
|
4584
4599
|
py: "1",
|
4585
4600
|
px: "1",
|
4586
4601
|
transitionProperty: "common",
|
4587
|
-
transitionDuration: "
|
4602
|
+
transitionDuration: "moderate",
|
4588
4603
|
width: "full",
|
4589
4604
|
focusVisibleRing: "inside",
|
4590
4605
|
focusRingWidth: "2px",
|
@@ -8939,7 +8954,7 @@ var defaultConfig = (0, import_react97.mergeConfigs)(import_react97.defaultBaseC
|
|
8939
8954
|
var defaultSystem = (0, import_react97.createSystem)(defaultConfig);
|
8940
8955
|
|
8941
8956
|
// src/index.ts
|
8942
|
-
var
|
8957
|
+
var import_react163 = require("@chakra-ui/react");
|
8943
8958
|
|
8944
8959
|
// src/provider/sui-provider.tsx
|
8945
8960
|
var React = __toESM(require("react"), 1);
|
@@ -9223,6 +9238,14 @@ var CheckIcon = createIcon({
|
|
9223
9238
|
displayName: "CheckIcon",
|
9224
9239
|
path: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("polyline", { points: "20 6 9 17 4 12" }) })
|
9225
9240
|
});
|
9241
|
+
var EllipsisIcon = createIcon({
|
9242
|
+
displayName: "EllipsisIcon",
|
9243
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("g", { children: [
|
9244
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "12", cy: "12", r: "1" }),
|
9245
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "19", cy: "12", r: "1" }),
|
9246
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("circle", { cx: "5", cy: "12", r: "1" })
|
9247
|
+
] })
|
9248
|
+
});
|
9226
9249
|
|
9227
9250
|
// src/components/close-button/close-button.tsx
|
9228
9251
|
var import_jsx_runtime8 = require("react/jsx-runtime");
|
@@ -9706,15 +9729,91 @@ var MenuItemText = import_react136.Menu.ItemText;
|
|
9706
9729
|
var MenuItemCommand = import_react136.Menu.ItemCommand;
|
9707
9730
|
var MenuTrigger = import_react136.Menu.Trigger;
|
9708
9731
|
|
9732
|
+
// src/components/pagination/pagination.tsx
|
9733
|
+
var pagination_exports = {};
|
9734
|
+
__export(pagination_exports, {
|
9735
|
+
Context: () => Context,
|
9736
|
+
Ellipsis: () => Ellipsis,
|
9737
|
+
Item: () => Item,
|
9738
|
+
Items: () => Items,
|
9739
|
+
NextButton: () => NextButton,
|
9740
|
+
NextTrigger: () => NextTrigger,
|
9741
|
+
PageText: () => PageText,
|
9742
|
+
PrevButton: () => PrevButton,
|
9743
|
+
PrevTrigger: () => PrevTrigger,
|
9744
|
+
Root: () => Root
|
9745
|
+
});
|
9746
|
+
var import_react137 = require("react");
|
9747
|
+
var import_react138 = require("@chakra-ui/react");
|
9748
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
9749
|
+
var [RootPropsProvider, useRootProps] = (0, import_react138.createContext)({
|
9750
|
+
name: "RootPropsProvider"
|
9751
|
+
});
|
9752
|
+
var variantMap = {
|
9753
|
+
outline: { default: "ghost", ellipsis: "plain", current: "outline" },
|
9754
|
+
solid: { default: "outline", ellipsis: "outline", current: "solid" },
|
9755
|
+
subtle: { default: "ghost", ellipsis: "plain", current: "subtle" }
|
9756
|
+
};
|
9757
|
+
var Root = (0, import_react137.forwardRef)(
|
9758
|
+
function PaginationRoot(props, ref) {
|
9759
|
+
const { size = "sm", variant = "outline", ...rest } = props;
|
9760
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(RootPropsProvider, { value: { size, variantMap: variantMap[variant] }, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Pagination.Root, { ref, type: "button", ...rest }) });
|
9761
|
+
}
|
9762
|
+
);
|
9763
|
+
var Ellipsis = (0, import_react137.forwardRef)(function PaginationEllipsis(props, ref) {
|
9764
|
+
var _a7;
|
9765
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
9766
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Pagination.Ellipsis, { ref, ...props, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Button, { as: "span", variant: variantMap2.ellipsis, size, children: (_a7 = props.children) != null ? _a7 : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(EllipsisIcon, {}) }) });
|
9767
|
+
});
|
9768
|
+
var Item = (0, import_react137.forwardRef)(
|
9769
|
+
function PaginationItem(props, ref) {
|
9770
|
+
const { page } = (0, import_react138.usePaginationContext)();
|
9771
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
9772
|
+
const current = page === props.value;
|
9773
|
+
const variant = current ? variantMap2.current : variantMap2.default;
|
9774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Pagination.Item, { ref, ...props, asChild: true, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Button, { variant, size, children: props.value }) });
|
9775
|
+
}
|
9776
|
+
);
|
9777
|
+
var PrevButton = (0, import_react137.forwardRef)(function PaginationPrevTrigger(props, ref) {
|
9778
|
+
var _a7;
|
9779
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
9780
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Pagination.PrevTrigger, { ref, asChild: true, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.IconButton, { variant: variantMap2.default, size, children: (_a7 = props.children) != null ? _a7 : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChevronLeftIcon, {}) }) });
|
9781
|
+
});
|
9782
|
+
var NextButton = (0, import_react137.forwardRef)(function PaginationNextTrigger(props, ref) {
|
9783
|
+
var _a7;
|
9784
|
+
const { size, variantMap: variantMap2 } = useRootProps();
|
9785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Pagination.NextTrigger, { ref, asChild: true, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.IconButton, { variant: variantMap2.default, size, children: (_a7 = props.children) != null ? _a7 : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(ChevronRightIcon, {}) }) });
|
9786
|
+
});
|
9787
|
+
var Items = (props) => {
|
9788
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Pagination.Context, { children: ({ pages }) => pages.map((page, index) => {
|
9789
|
+
return page.type === "ellipsis" ? /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Ellipsis, { index, ...props }, index) : /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Item, { type: "page", value: page.value, ...props }, index);
|
9790
|
+
}) });
|
9791
|
+
};
|
9792
|
+
var PageText = (0, import_react137.forwardRef)(
|
9793
|
+
function PaginationPageText(props, ref) {
|
9794
|
+
const { format = "compact", ...rest } = props;
|
9795
|
+
const { page, pages, pageRange, count } = (0, import_react138.usePaginationContext)();
|
9796
|
+
const content = (0, import_react137.useMemo)(() => {
|
9797
|
+
if (format === "short") return `${page} / ${pages.length}`;
|
9798
|
+
if (format === "compact") return `${page} of ${pages.length}`;
|
9799
|
+
return `${pageRange.start + 1} - ${pageRange.end} of ${count}`;
|
9800
|
+
}, [format, page, pages.length, pageRange, count]);
|
9801
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react138.Text, { fontWeight: "medium", ref, ...rest, children: content });
|
9802
|
+
}
|
9803
|
+
);
|
9804
|
+
var PrevTrigger = import_react138.Pagination.PrevTrigger;
|
9805
|
+
var NextTrigger = import_react138.Pagination.NextTrigger;
|
9806
|
+
var Context = import_react138.Pagination.Context;
|
9807
|
+
|
9709
9808
|
// src/components/password-input/password-input.tsx
|
9710
|
-
var
|
9711
|
-
var
|
9809
|
+
var import_react141 = require("react");
|
9810
|
+
var import_react142 = require("@chakra-ui/react");
|
9712
9811
|
|
9713
9812
|
// ../../node_modules/react-icons/lib/iconBase.mjs
|
9714
|
-
var
|
9813
|
+
var import_react140 = __toESM(require("react"), 1);
|
9715
9814
|
|
9716
9815
|
// ../../node_modules/react-icons/lib/iconContext.mjs
|
9717
|
-
var
|
9816
|
+
var import_react139 = __toESM(require("react"), 1);
|
9718
9817
|
var DefaultContext = {
|
9719
9818
|
color: void 0,
|
9720
9819
|
size: void 0,
|
@@ -9722,7 +9821,7 @@ var DefaultContext = {
|
|
9722
9821
|
style: void 0,
|
9723
9822
|
attr: void 0
|
9724
9823
|
};
|
9725
|
-
var IconContext =
|
9824
|
+
var IconContext = import_react139.default.createContext && /* @__PURE__ */ import_react139.default.createContext(DefaultContext);
|
9726
9825
|
|
9727
9826
|
// ../../node_modules/react-icons/lib/iconBase.mjs
|
9728
9827
|
var _excluded = ["attr", "size", "title"];
|
@@ -9811,12 +9910,12 @@ function _toPrimitive(t, r) {
|
|
9811
9910
|
return ("string" === r ? String : Number)(t);
|
9812
9911
|
}
|
9813
9912
|
function Tree2Element(tree) {
|
9814
|
-
return tree && tree.map((node, i) => /* @__PURE__ */
|
9913
|
+
return tree && tree.map((node, i) => /* @__PURE__ */ import_react140.default.createElement(node.tag, _objectSpread({
|
9815
9914
|
key: i
|
9816
9915
|
}, node.attr), Tree2Element(node.child)));
|
9817
9916
|
}
|
9818
9917
|
function GenIcon(data) {
|
9819
|
-
return (props) => /* @__PURE__ */
|
9918
|
+
return (props) => /* @__PURE__ */ import_react140.default.createElement(IconBase, _extends({
|
9820
9919
|
attr: _objectSpread({}, data.attr)
|
9821
9920
|
}, props), Tree2Element(data.child));
|
9822
9921
|
}
|
@@ -9831,7 +9930,7 @@ function IconBase(props) {
|
|
9831
9930
|
var className;
|
9832
9931
|
if (conf.className) className = conf.className;
|
9833
9932
|
if (props.className) className = (className ? className + " " : "") + props.className;
|
9834
|
-
return /* @__PURE__ */
|
9933
|
+
return /* @__PURE__ */ import_react140.default.createElement("svg", _extends({
|
9835
9934
|
stroke: "currentColor",
|
9836
9935
|
fill: "currentColor",
|
9837
9936
|
strokeWidth: "0"
|
@@ -9843,9 +9942,9 @@ function IconBase(props) {
|
|
9843
9942
|
height: computedSize,
|
9844
9943
|
width: computedSize,
|
9845
9944
|
xmlns: "http://www.w3.org/2000/svg"
|
9846
|
-
}), title && /* @__PURE__ */
|
9945
|
+
}), title && /* @__PURE__ */ import_react140.default.createElement("title", null, title), props.children);
|
9847
9946
|
};
|
9848
|
-
return IconContext !== void 0 ? /* @__PURE__ */
|
9947
|
+
return IconContext !== void 0 ? /* @__PURE__ */ import_react140.default.createElement(IconContext.Consumer, null, (conf) => elem(conf)) : elem(DefaultContext);
|
9849
9948
|
}
|
9850
9949
|
|
9851
9950
|
// ../../node_modules/react-icons/lu/index.mjs
|
@@ -9857,28 +9956,28 @@ function LuEye(props) {
|
|
9857
9956
|
}
|
9858
9957
|
|
9859
9958
|
// src/components/password-input/password-input.tsx
|
9860
|
-
var
|
9861
|
-
var PasswordInput = (0,
|
9959
|
+
var import_jsx_runtime22 = require("react/jsx-runtime");
|
9960
|
+
var PasswordInput = (0, import_react141.forwardRef)(
|
9862
9961
|
function PasswordInput2(props, ref) {
|
9863
9962
|
const {
|
9864
9963
|
rootProps,
|
9865
9964
|
defaultVisible,
|
9866
9965
|
visible: visibleProp,
|
9867
9966
|
onVisibleChange,
|
9868
|
-
visibilityIcon = { on: /* @__PURE__ */ (0,
|
9967
|
+
visibilityIcon = { on: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(LuEye, {}), off: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(LuEyeOff, {}) },
|
9869
9968
|
...rest
|
9870
9969
|
} = props;
|
9871
|
-
const [visible, setVisible] = (0,
|
9970
|
+
const [visible, setVisible] = (0, import_react142.useControllableState)({
|
9872
9971
|
value: visibleProp,
|
9873
9972
|
defaultValue: defaultVisible || false,
|
9874
9973
|
onChange: onVisibleChange
|
9875
9974
|
});
|
9876
|
-
const inputRef = (0,
|
9877
|
-
return /* @__PURE__ */ (0,
|
9975
|
+
const inputRef = (0, import_react141.useRef)(null);
|
9976
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
9878
9977
|
InputGroup,
|
9879
9978
|
{
|
9880
9979
|
width: "full",
|
9881
|
-
endElement: /* @__PURE__ */ (0,
|
9980
|
+
endElement: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
9882
9981
|
VisibilityTrigger,
|
9883
9982
|
{
|
9884
9983
|
disabled: rest.disabled,
|
@@ -9892,11 +9991,11 @@ var PasswordInput = (0, import_react139.forwardRef)(
|
|
9892
9991
|
}
|
9893
9992
|
),
|
9894
9993
|
...rootProps,
|
9895
|
-
children: /* @__PURE__ */ (0,
|
9896
|
-
|
9994
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
9995
|
+
import_react142.Input,
|
9897
9996
|
{
|
9898
9997
|
...rest,
|
9899
|
-
ref: (0,
|
9998
|
+
ref: (0, import_react142.mergeRefs)(ref, inputRef),
|
9900
9999
|
type: visible ? "text" : "password"
|
9901
10000
|
}
|
9902
10001
|
)
|
@@ -9904,10 +10003,10 @@ var PasswordInput = (0, import_react139.forwardRef)(
|
|
9904
10003
|
);
|
9905
10004
|
}
|
9906
10005
|
);
|
9907
|
-
var VisibilityTrigger = (0,
|
10006
|
+
var VisibilityTrigger = (0, import_react141.forwardRef)(
|
9908
10007
|
function VisibilityTrigger2(props, ref) {
|
9909
|
-
return /* @__PURE__ */ (0,
|
9910
|
-
|
10008
|
+
return /* @__PURE__ */ (0, import_jsx_runtime22.jsx)(
|
10009
|
+
import_react142.IconButton,
|
9911
10010
|
{
|
9912
10011
|
tabIndex: -1,
|
9913
10012
|
ref,
|
@@ -9928,27 +10027,27 @@ var VisibilityTrigger = (0, import_react139.forwardRef)(
|
|
9928
10027
|
var React7 = __toESM(require("react"), 1);
|
9929
10028
|
|
9930
10029
|
// src/components/persona/persona-primitive.tsx
|
9931
|
-
var
|
9932
|
-
var
|
10030
|
+
var import_react144 = require("react");
|
10031
|
+
var import_react145 = require("@chakra-ui/react");
|
9933
10032
|
var import_utils8 = require("@saas-ui/core/utils");
|
9934
10033
|
|
9935
10034
|
// src/components/persona/persona.context.ts
|
9936
|
-
var
|
10035
|
+
var import_react143 = require("@chakra-ui/react");
|
9937
10036
|
var {
|
9938
10037
|
useStyles: usePersonaStyles,
|
9939
10038
|
withProvider: withProvider5,
|
9940
10039
|
withContext: withContext6
|
9941
|
-
} = (0,
|
10040
|
+
} = (0, import_react143.createSlotRecipeContext)({
|
9942
10041
|
key: "suiPersona"
|
9943
10042
|
});
|
9944
10043
|
|
9945
10044
|
// src/components/persona/persona-primitive.tsx
|
9946
|
-
var
|
10045
|
+
var import_jsx_runtime23 = require("react/jsx-runtime");
|
9947
10046
|
var PersonaRoot = withProvider5(
|
9948
|
-
(0,
|
10047
|
+
(0, import_react144.forwardRef)((props, ref) => {
|
9949
10048
|
const { outOfOffice, presence, ...rest } = props;
|
9950
|
-
return /* @__PURE__ */ (0,
|
9951
|
-
|
10049
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
10050
|
+
import_react145.chakra.div,
|
9952
10051
|
{
|
9953
10052
|
ref,
|
9954
10053
|
...rest,
|
@@ -9965,7 +10064,7 @@ var PersonaRoot = withProvider5(
|
|
9965
10064
|
}),
|
9966
10065
|
"root"
|
9967
10066
|
);
|
9968
|
-
var PersonaAvatar = (0,
|
10067
|
+
var PersonaAvatar = (0, import_react144.forwardRef)(
|
9969
10068
|
(props, ref) => {
|
9970
10069
|
const {
|
9971
10070
|
name,
|
@@ -9978,10 +10077,10 @@ var PersonaAvatar = (0, import_react142.forwardRef)(
|
|
9978
10077
|
children,
|
9979
10078
|
...rest
|
9980
10079
|
} = props;
|
9981
|
-
return /* @__PURE__ */ (0,
|
9982
|
-
/* @__PURE__ */ (0,
|
9983
|
-
/* @__PURE__ */ (0,
|
9984
|
-
|
10080
|
+
return /* @__PURE__ */ (0, import_jsx_runtime23.jsxs)(import_react145.Avatar.Root, { ref, ...rest, children: [
|
10081
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(import_react145.Avatar.Fallback, { children: getInitials2(name) }),
|
10082
|
+
/* @__PURE__ */ (0, import_jsx_runtime23.jsx)(
|
10083
|
+
import_react145.Avatar.Image,
|
9985
10084
|
{
|
9986
10085
|
src,
|
9987
10086
|
srcSet,
|
@@ -10013,7 +10112,7 @@ var PersonaTertiaryLabel = withContext6(
|
|
10013
10112
|
);
|
10014
10113
|
|
10015
10114
|
// src/components/persona/persona.tsx
|
10016
|
-
var
|
10115
|
+
var import_jsx_runtime24 = require("react/jsx-runtime");
|
10017
10116
|
var Persona = React7.forwardRef(
|
10018
10117
|
(props, ref) => {
|
10019
10118
|
const {
|
@@ -10036,7 +10135,7 @@ var Persona = React7.forwardRef(
|
|
10036
10135
|
srcSet,
|
10037
10136
|
...rest
|
10038
10137
|
} = props;
|
10039
|
-
return /* @__PURE__ */ (0,
|
10138
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(
|
10040
10139
|
PersonaRoot,
|
10041
10140
|
{
|
10042
10141
|
ref,
|
@@ -10045,7 +10144,7 @@ var Persona = React7.forwardRef(
|
|
10045
10144
|
size,
|
10046
10145
|
...rest,
|
10047
10146
|
children: [
|
10048
|
-
/* @__PURE__ */ (0,
|
10147
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(
|
10049
10148
|
PersonaAvatar,
|
10050
10149
|
{
|
10051
10150
|
name,
|
@@ -10056,13 +10155,13 @@ var Persona = React7.forwardRef(
|
|
10056
10155
|
onError,
|
10057
10156
|
src,
|
10058
10157
|
srcSet,
|
10059
|
-
children: presence ? /* @__PURE__ */ (0,
|
10158
|
+
children: presence ? /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PersonaPresenceBadge, { children: presenceIcon }) : null
|
10060
10159
|
}
|
10061
10160
|
),
|
10062
|
-
!hideDetails && /* @__PURE__ */ (0,
|
10063
|
-
/* @__PURE__ */ (0,
|
10064
|
-
secondaryLabel && /* @__PURE__ */ (0,
|
10065
|
-
tertiaryLabel && /* @__PURE__ */ (0,
|
10161
|
+
!hideDetails && /* @__PURE__ */ (0, import_jsx_runtime24.jsxs)(PersonaDetails, { children: [
|
10162
|
+
/* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PersonaLabel, { children: label || name }),
|
10163
|
+
secondaryLabel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PersonaSecondaryLabel, { children: secondaryLabel }),
|
10164
|
+
tertiaryLabel && /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(PersonaTertiaryLabel, { children: tertiaryLabel }),
|
10066
10165
|
children
|
10067
10166
|
] })
|
10068
10167
|
]
|
@@ -10072,7 +10171,7 @@ var Persona = React7.forwardRef(
|
|
10072
10171
|
);
|
10073
10172
|
Persona.displayName = "Persona";
|
10074
10173
|
var PersonaAvatar2 = React7.forwardRef(function PersonaAvatar3(props, ref) {
|
10075
|
-
return /* @__PURE__ */ (0,
|
10174
|
+
return /* @__PURE__ */ (0, import_jsx_runtime24.jsx)(Persona, { ref, ...props, hideDetails: true });
|
10076
10175
|
});
|
10077
10176
|
|
10078
10177
|
// src/components/persona/presence.ts
|
@@ -10100,10 +10199,10 @@ var defaultPresenceOptions = {
|
|
10100
10199
|
};
|
10101
10200
|
|
10102
10201
|
// src/components/pin-input/pin-input.tsx
|
10103
|
-
var
|
10104
|
-
var
|
10105
|
-
var
|
10106
|
-
var PinInput = (0,
|
10202
|
+
var import_react146 = require("react");
|
10203
|
+
var import_react147 = require("@chakra-ui/react");
|
10204
|
+
var import_jsx_runtime25 = require("react/jsx-runtime");
|
10205
|
+
var PinInput = (0, import_react146.forwardRef)(
|
10107
10206
|
function PinInput2(props, ref) {
|
10108
10207
|
const {
|
10109
10208
|
pinLength = 4,
|
@@ -10113,35 +10212,35 @@ var PinInput = (0, import_react144.forwardRef)(
|
|
10113
10212
|
gap = attached ? 0 : 2,
|
10114
10213
|
...rest
|
10115
10214
|
} = props;
|
10116
|
-
return /* @__PURE__ */ (0,
|
10117
|
-
/* @__PURE__ */ (0,
|
10118
|
-
/* @__PURE__ */ (0,
|
10215
|
+
return /* @__PURE__ */ (0, import_jsx_runtime25.jsxs)(import_react147.PinInput.Root, { ref: rootRef, ...rest, children: [
|
10216
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react147.PinInput.HiddenInput, { ref, ...inputProps }),
|
10217
|
+
/* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react147.PinInput.Control, { children: /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react147.Group, { attached, gap, children: Array.from({ length: pinLength }).map((_, index) => /* @__PURE__ */ (0, import_jsx_runtime25.jsx)(import_react147.PinInput.Input, { index }, index)) }) })
|
10119
10218
|
] });
|
10120
10219
|
}
|
10121
10220
|
);
|
10122
10221
|
|
10123
10222
|
// src/components/radio/radio.tsx
|
10124
|
-
var
|
10125
|
-
var
|
10126
|
-
var
|
10127
|
-
var Radio = (0,
|
10223
|
+
var import_react148 = require("react");
|
10224
|
+
var import_react149 = require("@chakra-ui/react");
|
10225
|
+
var import_jsx_runtime26 = require("react/jsx-runtime");
|
10226
|
+
var Radio = (0, import_react148.forwardRef)(
|
10128
10227
|
function Radio2(props, ref) {
|
10129
10228
|
const { children, inputProps, rootRef, ...rest } = props;
|
10130
|
-
return /* @__PURE__ */ (0,
|
10131
|
-
/* @__PURE__ */ (0,
|
10132
|
-
/* @__PURE__ */ (0,
|
10133
|
-
children && /* @__PURE__ */ (0,
|
10229
|
+
return /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_react149.RadioGroup.Item, { ref: rootRef, ...rest, children: [
|
10230
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react149.RadioGroup.ItemHiddenInput, { ref, ...inputProps }),
|
10231
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react149.RadioGroup.ItemIndicator, {}),
|
10232
|
+
children && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_react149.RadioGroup.ItemText, { children })
|
10134
10233
|
] });
|
10135
10234
|
}
|
10136
10235
|
);
|
10137
|
-
var RadioGroup =
|
10236
|
+
var RadioGroup = import_react149.RadioGroup.Root;
|
10138
10237
|
|
10139
10238
|
// src/components/search-input/search-input.tsx
|
10140
|
-
var
|
10141
|
-
var
|
10239
|
+
var import_react150 = __toESM(require("react"), 1);
|
10240
|
+
var import_react151 = require("@chakra-ui/react");
|
10142
10241
|
var import_utils9 = require("@saas-ui/core/utils");
|
10143
|
-
var
|
10144
|
-
var SearchInput = (0,
|
10242
|
+
var import_jsx_runtime27 = require("react/jsx-runtime");
|
10243
|
+
var SearchInput = (0, import_react150.forwardRef)(
|
10145
10244
|
(props, ref) => {
|
10146
10245
|
const {
|
10147
10246
|
placeholder = "Search",
|
@@ -10150,7 +10249,7 @@ var SearchInput = (0, import_react148.forwardRef)(
|
|
10150
10249
|
size,
|
10151
10250
|
variant,
|
10152
10251
|
width = "full",
|
10153
|
-
icon = /* @__PURE__ */ (0,
|
10252
|
+
icon = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SearchIcon, {}),
|
10154
10253
|
resetIcon,
|
10155
10254
|
endElement: endElementProp,
|
10156
10255
|
onChange: onChangeProp,
|
@@ -10159,18 +10258,18 @@ var SearchInput = (0, import_react148.forwardRef)(
|
|
10159
10258
|
disabled,
|
10160
10259
|
...inputProps
|
10161
10260
|
} = props;
|
10162
|
-
const inputRef =
|
10163
|
-
const [value, setValue] = (0,
|
10261
|
+
const inputRef = import_react150.default.useRef(null);
|
10262
|
+
const [value, setValue] = (0, import_react151.useControllableState)({
|
10164
10263
|
value: valueProp,
|
10165
10264
|
defaultValue: defaultValueProp
|
10166
10265
|
});
|
10167
|
-
const onChange =
|
10266
|
+
const onChange = import_react150.default.useCallback(
|
10168
10267
|
(e) => {
|
10169
10268
|
setValue(e.target.value);
|
10170
10269
|
},
|
10171
10270
|
[setValue]
|
10172
10271
|
);
|
10173
|
-
const onKeyDown =
|
10272
|
+
const onKeyDown = import_react150.default.useCallback(
|
10174
10273
|
(event) => {
|
10175
10274
|
if (event.key === "Escape") {
|
10176
10275
|
setValue("");
|
@@ -10186,10 +10285,10 @@ var SearchInput = (0, import_react148.forwardRef)(
|
|
10186
10285
|
(_a7 = inputRef.current) == null ? void 0 : _a7.focus();
|
10187
10286
|
};
|
10188
10287
|
const showReset = value && !props.disabled;
|
10189
|
-
const endElement = showReset ? /* @__PURE__ */ (0,
|
10190
|
-
return /* @__PURE__ */ (0,
|
10191
|
-
/* @__PURE__ */ (0,
|
10192
|
-
|
10288
|
+
const endElement = showReset ? /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(SearchInputResetButton, { size, children: resetIcon }) : endElementProp;
|
10289
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsxs)(import_react151.Group, { width, children: [
|
10290
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
10291
|
+
import_react151.InputElement,
|
10193
10292
|
{
|
10194
10293
|
placement: "start",
|
10195
10294
|
px: "0",
|
@@ -10198,8 +10297,8 @@ var SearchInput = (0, import_react148.forwardRef)(
|
|
10198
10297
|
children: icon
|
10199
10298
|
}
|
10200
10299
|
),
|
10201
|
-
/* @__PURE__ */ (0,
|
10202
|
-
|
10300
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
10301
|
+
import_react151.Input,
|
10203
10302
|
{
|
10204
10303
|
type: "text",
|
10205
10304
|
placeholder,
|
@@ -10207,7 +10306,7 @@ var SearchInput = (0, import_react148.forwardRef)(
|
|
10207
10306
|
size,
|
10208
10307
|
value,
|
10209
10308
|
disabled,
|
10210
|
-
ref: (0,
|
10309
|
+
ref: (0, import_react151.mergeRefs)(ref, inputRef),
|
10211
10310
|
onChange: (0, import_utils9.callAll)(onChange, onChangeProp),
|
10212
10311
|
onKeyDown: (0, import_utils9.callAll)(onKeyDown, onKeyDownProp),
|
10213
10312
|
ps: "calc(var(--input-height) - var(--input-height) / 10)",
|
@@ -10215,15 +10314,15 @@ var SearchInput = (0, import_react148.forwardRef)(
|
|
10215
10314
|
...inputProps
|
10216
10315
|
}
|
10217
10316
|
),
|
10218
|
-
/* @__PURE__ */ (0,
|
10317
|
+
/* @__PURE__ */ (0, import_jsx_runtime27.jsx)(import_react151.InputElement, { placement: "end", children: endElement })
|
10219
10318
|
] });
|
10220
10319
|
}
|
10221
10320
|
);
|
10222
|
-
var SearchInputResetButton = (0,
|
10321
|
+
var SearchInputResetButton = (0, import_react150.forwardRef)(
|
10223
10322
|
(props, ref) => {
|
10224
|
-
const { children = /* @__PURE__ */ (0,
|
10225
|
-
return /* @__PURE__ */ (0,
|
10226
|
-
|
10323
|
+
const { children = /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(CloseIcon, {}), ...rest } = props;
|
10324
|
+
return /* @__PURE__ */ (0, import_jsx_runtime27.jsx)(
|
10325
|
+
import_react151.IconButton,
|
10227
10326
|
{
|
10228
10327
|
ref,
|
10229
10328
|
variant: "ghost",
|
@@ -10253,23 +10352,23 @@ __export(namespace_exports3, {
|
|
10253
10352
|
});
|
10254
10353
|
|
10255
10354
|
// src/components/select/select.tsx
|
10256
|
-
var
|
10257
|
-
var
|
10258
|
-
var
|
10259
|
-
var SelectTrigger = (0,
|
10355
|
+
var import_react152 = require("react");
|
10356
|
+
var import_react153 = require("@chakra-ui/react");
|
10357
|
+
var import_jsx_runtime28 = require("react/jsx-runtime");
|
10358
|
+
var SelectTrigger = (0, import_react152.forwardRef)(
|
10260
10359
|
function SelectTrigger2(props, ref) {
|
10261
10360
|
const { children, clearable, ...rest } = props;
|
10262
|
-
return /* @__PURE__ */ (0,
|
10263
|
-
/* @__PURE__ */ (0,
|
10264
|
-
/* @__PURE__ */ (0,
|
10265
|
-
clearable && /* @__PURE__ */ (0,
|
10266
|
-
/* @__PURE__ */ (0,
|
10361
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react153.Select.Control, { ...rest, children: [
|
10362
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.Trigger, { ref, children }),
|
10363
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react153.Select.IndicatorGroup, { children: [
|
10364
|
+
clearable && /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(SelectClearTrigger, {}),
|
10365
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.Indicator, {})
|
10267
10366
|
] })
|
10268
10367
|
] });
|
10269
10368
|
}
|
10270
10369
|
);
|
10271
|
-
var SelectClearTrigger = (0,
|
10272
|
-
return /* @__PURE__ */ (0,
|
10370
|
+
var SelectClearTrigger = (0, import_react152.forwardRef)(function SelectClearTrigger2(props, ref) {
|
10371
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
10273
10372
|
CloseButton,
|
10274
10373
|
{
|
10275
10374
|
size: "xs",
|
@@ -10280,24 +10379,24 @@ var SelectClearTrigger = (0, import_react150.forwardRef)(function SelectClearTri
|
|
10280
10379
|
}
|
10281
10380
|
) });
|
10282
10381
|
});
|
10283
|
-
var SelectContent = (0,
|
10382
|
+
var SelectContent = (0, import_react152.forwardRef)(
|
10284
10383
|
function SelectContent2(props, ref) {
|
10285
10384
|
const { portalled = true, portalRef, ...rest } = props;
|
10286
|
-
return /* @__PURE__ */ (0,
|
10385
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.Content, { ...rest, ref }) }) });
|
10287
10386
|
}
|
10288
10387
|
);
|
10289
|
-
var SelectItem = (0,
|
10388
|
+
var SelectItem = (0, import_react152.forwardRef)(
|
10290
10389
|
function SelectItem2(props, ref) {
|
10291
10390
|
const { item, children, ...rest } = props;
|
10292
|
-
return /* @__PURE__ */ (0,
|
10391
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react153.Select.Item, { item, ...rest, ref, children: [
|
10293
10392
|
children,
|
10294
|
-
/* @__PURE__ */ (0,
|
10393
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.ItemIndicator, {})
|
10295
10394
|
] }, item.value);
|
10296
10395
|
}
|
10297
10396
|
);
|
10298
|
-
var SelectValueText = (0,
|
10397
|
+
var SelectValueText = (0, import_react152.forwardRef)(function SelectValueText2(props, ref) {
|
10299
10398
|
const { children, ...rest } = props;
|
10300
|
-
return /* @__PURE__ */ (0,
|
10399
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.ValueText, { ...rest, ref, children: /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.Context, { children: (select) => {
|
10301
10400
|
const items = select.selectedItems;
|
10302
10401
|
if (items.length === 0) return props.placeholder;
|
10303
10402
|
if (children) return children(items);
|
@@ -10306,9 +10405,9 @@ var SelectValueText = (0, import_react150.forwardRef)(function SelectValueText2(
|
|
10306
10405
|
return `${items.length} selected`;
|
10307
10406
|
} }) });
|
10308
10407
|
});
|
10309
|
-
var SelectRoot = (0,
|
10310
|
-
return /* @__PURE__ */ (0,
|
10311
|
-
|
10408
|
+
var SelectRoot = (0, import_react152.forwardRef)(function SelectRoot2(props, ref) {
|
10409
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsx)(
|
10410
|
+
import_react153.Select.Root,
|
10312
10411
|
{
|
10313
10412
|
...props,
|
10314
10413
|
ref,
|
@@ -10316,41 +10415,41 @@ var SelectRoot = (0, import_react150.forwardRef)(function SelectRoot2(props, ref
|
|
10316
10415
|
}
|
10317
10416
|
);
|
10318
10417
|
});
|
10319
|
-
var SelectItemGroup = (0,
|
10418
|
+
var SelectItemGroup = (0, import_react152.forwardRef)(
|
10320
10419
|
function SelectItemGroup2(props, ref) {
|
10321
10420
|
const { children, label, ...rest } = props;
|
10322
|
-
return /* @__PURE__ */ (0,
|
10323
|
-
/* @__PURE__ */ (0,
|
10421
|
+
return /* @__PURE__ */ (0, import_jsx_runtime28.jsxs)(import_react153.Select.ItemGroup, { ...rest, ref, children: [
|
10422
|
+
/* @__PURE__ */ (0, import_jsx_runtime28.jsx)(import_react153.Select.ItemGroupLabel, { children: label }),
|
10324
10423
|
children
|
10325
10424
|
] });
|
10326
10425
|
}
|
10327
10426
|
);
|
10328
|
-
var SelectLabel =
|
10329
|
-
var SelectItemText =
|
10427
|
+
var SelectLabel = import_react153.Select.Label;
|
10428
|
+
var SelectItemText = import_react153.Select.ItemText;
|
10330
10429
|
|
10331
10430
|
// src/components/segmented-control/segmented-control.tsx
|
10332
|
-
var
|
10333
|
-
var
|
10334
|
-
var
|
10431
|
+
var import_react154 = require("react");
|
10432
|
+
var import_react155 = require("@chakra-ui/react");
|
10433
|
+
var import_jsx_runtime29 = require("react/jsx-runtime");
|
10335
10434
|
function normalize(items) {
|
10336
10435
|
return items.map((item) => {
|
10337
10436
|
if (typeof item === "string") return { value: item, label: item };
|
10338
10437
|
return item;
|
10339
10438
|
});
|
10340
10439
|
}
|
10341
|
-
var SegmentedControl = (0,
|
10440
|
+
var SegmentedControl = (0, import_react154.forwardRef)(function SegmentedControl2(props, ref) {
|
10342
10441
|
const { items, ...rest } = props;
|
10343
|
-
const data = (0,
|
10344
|
-
return /* @__PURE__ */ (0,
|
10345
|
-
/* @__PURE__ */ (0,
|
10346
|
-
/* @__PURE__ */ (0,
|
10347
|
-
|
10442
|
+
const data = (0, import_react154.useMemo)(() => normalize(items), [items]);
|
10443
|
+
return /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(import_react155.SegmentGroup.Root, { ref, ...rest, children: [
|
10444
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.SegmentGroup.Indicator, {}),
|
10445
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.For, { each: data, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime29.jsxs)(
|
10446
|
+
import_react155.SegmentGroup.Item,
|
10348
10447
|
{
|
10349
10448
|
value: item.value,
|
10350
10449
|
disabled: item.disabled,
|
10351
10450
|
children: [
|
10352
|
-
/* @__PURE__ */ (0,
|
10353
|
-
/* @__PURE__ */ (0,
|
10451
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.SegmentGroup.ItemText, { children: item.label }),
|
10452
|
+
/* @__PURE__ */ (0, import_jsx_runtime29.jsx)(import_react155.SegmentGroup.ItemHiddenInput, {})
|
10354
10453
|
]
|
10355
10454
|
},
|
10356
10455
|
item.value
|
@@ -10382,28 +10481,28 @@ __export(sidebar_exports, {
|
|
10382
10481
|
var import_sidebar = require("@saas-ui/core/sidebar");
|
10383
10482
|
|
10384
10483
|
// src/components/sidebar/sidebar.context.ts
|
10385
|
-
var
|
10484
|
+
var import_react156 = require("@chakra-ui/react");
|
10386
10485
|
var {
|
10387
10486
|
withContext: withContext7,
|
10388
10487
|
useRecipeResult,
|
10389
10488
|
StylesProvider,
|
10390
10489
|
ClassNamesProvider,
|
10391
10490
|
useStyles: useSidebarStyles
|
10392
|
-
} = (0,
|
10491
|
+
} = (0, import_react156.createSlotRecipeContext)({
|
10393
10492
|
key: "suiSidebar"
|
10394
10493
|
});
|
10395
10494
|
var {
|
10396
10495
|
withProvider: withItemProvider,
|
10397
10496
|
withContext: withItemContext,
|
10398
10497
|
useStyles: useSidebarItemStyles
|
10399
|
-
} = (0,
|
10498
|
+
} = (0, import_react156.createSlotRecipeContext)({
|
10400
10499
|
key: "suiSidebarNavItem"
|
10401
10500
|
});
|
10402
10501
|
|
10403
10502
|
// src/components/sidebar/sidebar.tsx
|
10404
|
-
var
|
10503
|
+
var import_jsx_runtime30 = require("react/jsx-runtime");
|
10405
10504
|
var SidebarProvider = function SidebarProvider2(props) {
|
10406
|
-
return /* @__PURE__ */ (0,
|
10505
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(import_sidebar.Sidebar.Provider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(RecipeProvider, { ...props, children: props.children }) });
|
10407
10506
|
};
|
10408
10507
|
function RecipeProvider(props) {
|
10409
10508
|
const { mode } = (0, import_sidebar.useSidebar)();
|
@@ -10411,7 +10510,7 @@ function RecipeProvider(props) {
|
|
10411
10510
|
...props,
|
10412
10511
|
mode
|
10413
10512
|
});
|
10414
|
-
return /* @__PURE__ */ (0,
|
10513
|
+
return /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(StylesProvider, { value: styles, children: /* @__PURE__ */ (0, import_jsx_runtime30.jsx)(ClassNamesProvider, { value: classNames, children: props.children }) });
|
10415
10514
|
}
|
10416
10515
|
var SidebarRoot = withContext7(
|
10417
10516
|
import_sidebar.Sidebar.Root,
|
@@ -10499,99 +10598,99 @@ __export(steps_exports, {
|
|
10499
10598
|
NextTrigger: () => StepsNextTrigger,
|
10500
10599
|
PrevTrigger: () => StepsPrevTrigger,
|
10501
10600
|
Root: () => StepsRoot,
|
10502
|
-
useContext: () =>
|
10601
|
+
useContext: () => import_react157.useStepsContext
|
10503
10602
|
});
|
10504
|
-
var
|
10505
|
-
var
|
10603
|
+
var import_react157 = require("@chakra-ui/react");
|
10604
|
+
var import_jsx_runtime31 = require("react/jsx-runtime");
|
10506
10605
|
var StepsItem = (props) => {
|
10507
10606
|
const { title, description, completedIcon, icon, ...rest } = props;
|
10508
|
-
return /* @__PURE__ */ (0,
|
10509
|
-
/* @__PURE__ */ (0,
|
10510
|
-
/* @__PURE__ */ (0,
|
10511
|
-
|
10607
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react157.Steps.Item, { ...rest, children: [
|
10608
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react157.Steps.Trigger, { children: [
|
10609
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(
|
10610
|
+
import_react157.Steps.Status,
|
10512
10611
|
{
|
10513
|
-
complete: completedIcon || /* @__PURE__ */ (0,
|
10514
|
-
incomplete: icon || /* @__PURE__ */ (0,
|
10612
|
+
complete: completedIcon || /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(CheckIcon, {}),
|
10613
|
+
incomplete: icon || /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Number, {})
|
10515
10614
|
}
|
10516
10615
|
) }),
|
10517
|
-
/* @__PURE__ */ (0,
|
10616
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(StepInfo, { title, description })
|
10518
10617
|
] }),
|
10519
|
-
/* @__PURE__ */ (0,
|
10618
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Separator, {})
|
10520
10619
|
] });
|
10521
10620
|
};
|
10522
10621
|
var StepInfo = (props) => {
|
10523
10622
|
const { title, description } = props;
|
10524
10623
|
if (title && description) {
|
10525
|
-
return /* @__PURE__ */ (0,
|
10526
|
-
/* @__PURE__ */ (0,
|
10527
|
-
/* @__PURE__ */ (0,
|
10624
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_react157.Box, { children: [
|
10625
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Title, { children: title }),
|
10626
|
+
/* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Description, { children: description })
|
10528
10627
|
] });
|
10529
10628
|
}
|
10530
|
-
return /* @__PURE__ */ (0,
|
10531
|
-
title && /* @__PURE__ */ (0,
|
10532
|
-
description && /* @__PURE__ */ (0,
|
10629
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsxs)(import_jsx_runtime31.Fragment, { children: [
|
10630
|
+
title && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Title, { children: title }),
|
10631
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Description, { children: description })
|
10533
10632
|
] });
|
10534
10633
|
};
|
10535
10634
|
var StepsIndicator = (props) => {
|
10536
|
-
const { icon = /* @__PURE__ */ (0,
|
10537
|
-
return /* @__PURE__ */ (0,
|
10635
|
+
const { icon = /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Number, {}), completedIcon } = props;
|
10636
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Indicator, { children: /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.Status, { complete: completedIcon, incomplete: icon }) });
|
10538
10637
|
};
|
10539
|
-
var StepsList =
|
10540
|
-
var StepsRoot =
|
10541
|
-
var StepsContent =
|
10542
|
-
var StepsCompletedContent =
|
10638
|
+
var StepsList = import_react157.Steps.List;
|
10639
|
+
var StepsRoot = import_react157.Steps.Root;
|
10640
|
+
var StepsContent = import_react157.Steps.Content;
|
10641
|
+
var StepsCompletedContent = import_react157.Steps.CompletedContent;
|
10543
10642
|
var StepsNextTrigger = (props) => {
|
10544
|
-
return /* @__PURE__ */ (0,
|
10643
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.NextTrigger, { ...props });
|
10545
10644
|
};
|
10546
10645
|
var StepsPrevTrigger = (props) => {
|
10547
|
-
return /* @__PURE__ */ (0,
|
10646
|
+
return /* @__PURE__ */ (0, import_jsx_runtime31.jsx)(import_react157.Steps.PrevTrigger, { ...props });
|
10548
10647
|
};
|
10549
10648
|
|
10550
10649
|
// src/components/switch/switch.tsx
|
10551
|
-
var
|
10552
|
-
var
|
10553
|
-
var
|
10554
|
-
var Switch = (0,
|
10650
|
+
var import_react158 = require("@chakra-ui/react");
|
10651
|
+
var import_react159 = require("react");
|
10652
|
+
var import_jsx_runtime32 = require("react/jsx-runtime");
|
10653
|
+
var Switch = (0, import_react159.forwardRef)(
|
10555
10654
|
function Switch2(props, ref) {
|
10556
10655
|
const { inputProps, children, rootRef, trackLabel, thumbLabel, ...rest } = props;
|
10557
|
-
return /* @__PURE__ */ (0,
|
10558
|
-
/* @__PURE__ */ (0,
|
10559
|
-
/* @__PURE__ */ (0,
|
10560
|
-
/* @__PURE__ */ (0,
|
10561
|
-
trackLabel && /* @__PURE__ */ (0,
|
10656
|
+
return /* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react158.Switch.Root, { ref: rootRef, ...rest, children: [
|
10657
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react158.Switch.HiddenInput, { ref, ...inputProps }),
|
10658
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsxs)(import_react158.Switch.Control, { children: [
|
10659
|
+
/* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react158.Switch.Thumb, { children: thumbLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react158.Switch.ThumbIndicator, { fallback: thumbLabel == null ? void 0 : thumbLabel.off, children: thumbLabel == null ? void 0 : thumbLabel.on }) }),
|
10660
|
+
trackLabel && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react158.Switch.Indicator, { fallback: trackLabel.off, children: trackLabel.on })
|
10562
10661
|
] }),
|
10563
|
-
children != null && /* @__PURE__ */ (0,
|
10662
|
+
children != null && /* @__PURE__ */ (0, import_jsx_runtime32.jsx)(import_react158.Switch.Label, { children })
|
10564
10663
|
] });
|
10565
10664
|
}
|
10566
10665
|
);
|
10567
10666
|
|
10568
10667
|
// src/components/toaster/toaster.tsx
|
10569
|
-
var
|
10570
|
-
var
|
10571
|
-
var toast = (0,
|
10668
|
+
var import_react160 = require("@chakra-ui/react");
|
10669
|
+
var import_jsx_runtime33 = require("react/jsx-runtime");
|
10670
|
+
var toast = (0, import_react160.createToaster)({
|
10572
10671
|
placement: "bottom-end",
|
10573
10672
|
pauseOnPageIdle: true
|
10574
10673
|
});
|
10575
10674
|
var Toaster = () => {
|
10576
|
-
return /* @__PURE__ */ (0,
|
10675
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Toaster, { toaster: toast, insetInline: { mdDown: "4" }, children: (toast2) => {
|
10577
10676
|
var _a7;
|
10578
|
-
return /* @__PURE__ */ (0,
|
10579
|
-
toast2.type === "loading" ? /* @__PURE__ */ (0,
|
10580
|
-
/* @__PURE__ */ (0,
|
10581
|
-
toast2.title && /* @__PURE__ */ (0,
|
10582
|
-
toast2.description && /* @__PURE__ */ (0,
|
10677
|
+
return /* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react160.Toast.Root, { width: { md: "sm" }, children: [
|
10678
|
+
toast2.type === "loading" ? /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Spinner, { size: "sm", color: "colorPalette.solid" }) : /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Toast.Indicator, {}),
|
10679
|
+
/* @__PURE__ */ (0, import_jsx_runtime33.jsxs)(import_react160.Stack, { gap: "1", flex: "1", maxWidth: "100%", children: [
|
10680
|
+
toast2.title && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Toast.Title, { children: toast2.title }),
|
10681
|
+
toast2.description && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Toast.Description, { children: toast2.description })
|
10583
10682
|
] }),
|
10584
|
-
toast2.action && /* @__PURE__ */ (0,
|
10585
|
-
((_a7 = toast2.meta) == null ? void 0 : _a7.closable) && /* @__PURE__ */ (0,
|
10683
|
+
toast2.action && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Toast.ActionTrigger, { children: toast2.action.label }),
|
10684
|
+
((_a7 = toast2.meta) == null ? void 0 : _a7.closable) && /* @__PURE__ */ (0, import_jsx_runtime33.jsx)(import_react160.Toast.CloseTrigger, {})
|
10586
10685
|
] });
|
10587
10686
|
} }) });
|
10588
10687
|
};
|
10589
10688
|
|
10590
10689
|
// src/components/tooltip/tooltip.tsx
|
10591
|
-
var
|
10592
|
-
var
|
10593
|
-
var
|
10594
|
-
var Tooltip = (0,
|
10690
|
+
var import_react161 = require("react");
|
10691
|
+
var import_react162 = require("@chakra-ui/react");
|
10692
|
+
var import_jsx_runtime34 = require("react/jsx-runtime");
|
10693
|
+
var Tooltip = (0, import_react161.forwardRef)(
|
10595
10694
|
function Tooltip2(props, ref) {
|
10596
10695
|
const {
|
10597
10696
|
showArrow,
|
@@ -10604,10 +10703,10 @@ var Tooltip = (0, import_react159.forwardRef)(
|
|
10604
10703
|
...rest
|
10605
10704
|
} = props;
|
10606
10705
|
if (disabled) return children;
|
10607
|
-
return /* @__PURE__ */ (0,
|
10608
|
-
/* @__PURE__ */ (0,
|
10609
|
-
/* @__PURE__ */ (0,
|
10610
|
-
showArrow && /* @__PURE__ */ (0,
|
10706
|
+
return /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react162.Tooltip.Root, { ...rest, children: [
|
10707
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react162.Tooltip.Trigger, { asChild: true, children }),
|
10708
|
+
/* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react162.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react162.Tooltip.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsxs)(import_react162.Tooltip.Content, { ref, ...contentProps, children: [
|
10709
|
+
showArrow && /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react162.Tooltip.Arrow, { children: /* @__PURE__ */ (0, import_jsx_runtime34.jsx)(import_react162.Tooltip.ArrowTip, {}) }),
|
10611
10710
|
content
|
10612
10711
|
] }) }) })
|
10613
10712
|
] });
|
@@ -10634,6 +10733,7 @@ var Tooltip = (0, import_react159.forwardRef)(
|
|
10634
10733
|
Menu,
|
10635
10734
|
Navbar,
|
10636
10735
|
NumberInput,
|
10736
|
+
Pagination,
|
10637
10737
|
PasswordInput,
|
10638
10738
|
Persona,
|
10639
10739
|
PersonaAvatar,
|