@saas-ui/react 3.0.0-alpha.1 → 3.0.0-alpha.10
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +73 -0
- package/dist/chunk-2EUACKRH.js +26 -0
- package/dist/chunk-3MO37LYW.js +326 -0
- package/dist/chunk-4TR3AOMG.js +33 -0
- package/dist/chunk-6LOMIKR5.js +69 -0
- package/dist/chunk-6ZNR6N2K.js +45 -0
- package/dist/chunk-7VSTNV2B.js +53 -0
- package/dist/chunk-BCNPBZZK.js +45 -0
- package/dist/chunk-CB52LBJK.js +71 -0
- package/dist/chunk-CD2JUFI2.js +231 -0
- package/dist/chunk-FJFNGSPL.js +23 -0
- package/dist/chunk-GGAKUS66.js +141 -0
- package/dist/chunk-H6TFEHY4.js +63 -0
- package/dist/chunk-HELHPHIQ.js +35 -0
- package/dist/chunk-I2RXEKTB.js +38 -0
- package/dist/chunk-JGHXJ3PI.js +102 -0
- package/dist/chunk-L356FPLY.js +20 -0
- package/dist/chunk-LIYUBUOP.js +119 -0
- package/dist/chunk-M7FOBCOV.js +184 -0
- package/dist/chunk-NSD5HRIP.js +46 -0
- package/dist/chunk-Q6SNJJO2.js +63 -0
- package/dist/chunk-QSNSWCTM.js +32 -0
- package/dist/chunk-S3CQW7GD.js +100 -0
- package/dist/chunk-SA3OGTOO.js +23 -0
- package/dist/chunk-SKXSBAOS.js +35 -0
- package/dist/{components/breadcrumbs/index.js → chunk-TT4C5VXB.js} +6 -7
- package/dist/chunk-TZBAM4AD.js +20 -0
- package/dist/chunk-UCQ3LZIE.js +43 -0
- package/dist/chunk-ULAJ3JEO.js +32 -0
- package/dist/chunk-WYLMBMAH.js +22 -0
- package/dist/components/app-shell/index.cjs +1 -1
- package/dist/components/app-shell/index.d.cts +1 -1
- package/dist/components/app-shell/index.d.ts +1 -1
- package/dist/components/app-shell/index.js +3 -40
- package/dist/components/avatar/index.cjs +69 -0
- package/dist/components/avatar/index.d.cts +18 -0
- package/dist/components/avatar/index.d.ts +18 -0
- package/dist/components/avatar/index.js +10 -0
- package/dist/components/{breadcrumbs → breadcrumb}/index.cjs +8 -10
- package/dist/components/{breadcrumbs → breadcrumb}/index.d.cts +3 -4
- package/dist/components/{breadcrumbs → breadcrumb}/index.d.ts +3 -4
- package/dist/components/breadcrumb/index.js +8 -0
- package/dist/components/button/index.js +3 -40
- package/dist/components/checkbox/index.js +3 -15
- package/dist/components/command/index.cjs +1 -1
- package/dist/components/command/index.js +3 -28
- package/dist/components/dialog/index.cjs +19 -58
- package/dist/components/dialog/index.js +4 -67
- package/dist/components/drawer/index.cjs +23 -64
- package/dist/components/drawer/index.d.cts +2 -2
- package/dist/components/drawer/index.d.ts +2 -2
- package/dist/components/drawer/index.js +4 -59
- package/dist/components/empty-state/index.cjs +48 -0
- package/dist/components/empty-state/index.d.cts +11 -0
- package/dist/components/empty-state/index.d.ts +11 -0
- package/dist/components/empty-state/index.js +8 -0
- package/dist/components/grid-list/index.cjs +68 -0
- package/dist/components/grid-list/index.d.cts +22 -0
- package/dist/components/grid-list/index.d.ts +22 -0
- package/dist/components/grid-list/index.js +8 -0
- package/dist/components/icon-badge/index.cjs +1 -1
- package/dist/components/icon-badge/index.d.cts +1 -1
- package/dist/components/icon-badge/index.d.ts +1 -1
- package/dist/components/icon-badge/index.js +3 -33
- package/dist/components/link/index.js +3 -14
- package/dist/components/loading-overlay/index.cjs +42 -1879
- package/dist/components/loading-overlay/index.d.cts +19 -6
- package/dist/components/loading-overlay/index.d.ts +19 -6
- package/dist/components/loading-overlay/index.js +7 -1874
- package/dist/components/menu/index.cjs +249 -0
- package/dist/components/menu/index.d.cts +39 -0
- package/dist/components/menu/index.d.ts +39 -0
- package/dist/components/menu/index.js +11 -0
- package/dist/components/navbar/index.cjs +61 -15
- package/dist/components/navbar/index.d.cts +12 -9
- package/dist/components/navbar/index.d.ts +12 -9
- package/dist/components/navbar/index.js +5 -38
- package/dist/components/number-input/index.js +3 -26
- package/dist/components/password-input/index.js +3 -225
- package/dist/components/persona/index.cjs +52 -15
- package/dist/components/persona/index.d.cts +22 -2
- package/dist/components/persona/index.d.ts +22 -2
- package/dist/components/persona/index.js +7 -144
- package/dist/components/pin-input/index.js +3 -21
- package/dist/components/radio/index.js +4 -16
- package/dist/components/search-input/index.js +4 -114
- package/dist/components/segmented-control/index.cjs +60 -0
- package/dist/components/segmented-control/index.d.cts +14 -0
- package/dist/components/segmented-control/index.d.ts +14 -0
- package/dist/components/segmented-control/index.js +8 -0
- package/dist/components/select/index.js +4 -94
- package/dist/components/sidebar/index.cjs +64 -32
- package/dist/components/sidebar/index.d.cts +24 -23
- package/dist/components/sidebar/index.d.ts +24 -23
- package/dist/components/sidebar/index.js +7 -101
- package/dist/components/steps/index.cjs +7 -9
- package/dist/components/steps/index.d.cts +2 -2
- package/dist/components/steps/index.d.ts +2 -2
- package/dist/components/steps/index.js +6 -67
- package/dist/components/switch/index.js +3 -18
- package/dist/components/toaster/index.cjs +54 -0
- package/dist/components/toaster/index.d.cts +10 -0
- package/dist/components/toaster/index.d.ts +10 -0
- package/dist/components/toaster/index.js +10 -0
- package/dist/components/tooltip/index.cjs +57 -0
- package/dist/components/tooltip/index.d.cts +14 -0
- package/dist/components/tooltip/index.d.ts +14 -0
- package/dist/components/tooltip/index.js +8 -0
- package/dist/index.cjs +2357 -220
- package/dist/index.d.cts +38 -2
- package/dist/index.d.ts +38 -2
- package/dist/index.js +515 -276
- package/dist/theme/tokens/colors.cjs +349 -0
- package/dist/theme/tokens/colors.d.cts +856 -0
- package/dist/theme/tokens/colors.d.ts +856 -0
- package/dist/theme/tokens/colors.js +8 -0
- package/package.json +12 -7
- package/dist/chunk-VBIVLREP.js +0 -45
- package/src/components/app-shell/app-shell.recipe.ts +0 -52
- package/src/components/app-shell/app-shell.stories.tsx +0 -51
- package/src/components/app-shell/app-shell.tsx +0 -94
- package/src/components/app-shell/index.ts +0 -3
- package/src/components/breadcrumbs/breadcrumb.stories.tsx +0 -17
- package/src/components/breadcrumbs/breadcrumb.tsx +0 -36
- package/src/components/breadcrumbs/index.ts +0 -1
- package/src/components/breadcrumbs/namespace.ts +0 -8
- package/src/components/button/button.recipe.ts +0 -182
- package/src/components/button/button.stories.tsx +0 -99
- package/src/components/button/button.tsx +0 -55
- package/src/components/button/index.ts +0 -2
- package/src/components/checkbox/checkbox.tsx +0 -26
- package/src/components/checkbox/index.ts +0 -2
- package/src/components/close-button/close-button.stories.tsx +0 -12
- package/src/components/close-button/close-button.tsx +0 -18
- package/src/components/close-button/index.ts +0 -2
- package/src/components/command/command.recipe.ts +0 -17
- package/src/components/command/command.stories.tsx +0 -47
- package/src/components/command/command.tsx +0 -50
- package/src/components/command/index.ts +0 -1
- package/src/components/dialog/dialog.tsx +0 -67
- package/src/components/dialog/index.ts +0 -1
- package/src/components/dialog/namespace.ts +0 -18
- package/src/components/drawer/drawer.tsx +0 -57
- package/src/components/drawer/index.ts +0 -3
- package/src/components/drawer/namespace.ts +0 -19
- package/src/components/grid-list/grid-list.recipe.ts +0 -113
- package/src/components/icon-badge/icon-badge.recipe.ts +0 -57
- package/src/components/icon-badge/icon-badge.stories.tsx +0 -38
- package/src/components/icon-badge/icon-badge.tsx +0 -59
- package/src/components/icon-badge/index.ts +0 -2
- package/src/components/icons/create-icon.tsx +0 -41
- package/src/components/icons/icons.tsx +0 -119
- package/src/components/icons/index.ts +0 -1
- package/src/components/input-group/index.ts +0 -1
- package/src/components/input-group/input-group.tsx +0 -46
- package/src/components/link/index.ts +0 -2
- package/src/components/link/link.stories.tsx +0 -17
- package/src/components/link/link.test.tsx +0 -33
- package/src/components/link/link.tsx +0 -27
- package/src/components/loading-overlay/index.ts +0 -1
- package/src/components/loading-overlay/loading-overlay.recipe.ts +0 -61
- package/src/components/loading-overlay/loading-overlay.stories.tsx +0 -68
- package/src/components/loading-overlay/loading-overlay.tsx +0 -54
- package/src/components/loading-overlay/namespace.ts +0 -7
- package/src/components/navbar/index.ts +0 -1
- package/src/components/navbar/namespace.ts +0 -9
- package/src/components/navbar/navbar.recipe.ts +0 -109
- package/src/components/navbar/navbar.stories.tsx +0 -435
- package/src/components/navbar/navbar.test.tsx +0 -49
- package/src/components/navbar/navbar.tsx +0 -39
- package/src/components/number-input/index.ts +0 -2
- package/src/components/number-input/number-input.tsx +0 -41
- package/src/components/password-input/index.ts +0 -2
- package/src/components/password-input/password-input.tsx +0 -93
- package/src/components/persona/index.ts +0 -2
- package/src/components/persona/namespace.ts +0 -18
- package/src/components/persona/persona-primitive.tsx +0 -220
- package/src/components/persona/persona.recipe.ts +0 -94
- package/src/components/persona/persona.stories.tsx +0 -101
- package/src/components/persona/persona.tsx +0 -142
- package/src/components/pin-input/index.ts +0 -2
- package/src/components/pin-input/pin-input.tsx +0 -36
- package/src/components/radio/index.ts +0 -2
- package/src/components/radio/radio.tsx +0 -27
- package/src/components/search-input/index.ts +0 -2
- package/src/components/search-input/search-input.stories.tsx +0 -63
- package/src/components/search-input/search-input.tsx +0 -134
- package/src/components/select/index.ts +0 -1
- package/src/components/select/namespace.ts +0 -18
- package/src/components/select/select.tsx +0 -135
- package/src/components/sidebar/index.ts +0 -7
- package/src/components/sidebar/namespace.ts +0 -27
- package/src/components/sidebar/sidebar-item.recipe.ts +0 -65
- package/src/components/sidebar/sidebar.recipe.ts +0 -237
- package/src/components/sidebar/sidebar.stories.tsx +0 -903
- package/src/components/sidebar/sidebar.tsx +0 -208
- package/src/components/spinner/index.ts +0 -2
- package/src/components/spinner/spinner.stories.tsx +0 -19
- package/src/components/spinner/spinner.tsx +0 -21
- package/src/components/steps/index.ts +0 -1
- package/src/components/steps/namespace.ts +0 -16
- package/src/components/steps/steps.tsx +0 -82
- package/src/components/switch/index.ts +0 -3
- package/src/components/switch/switch.tsx +0 -39
- package/src/compositions/accordion.tsx +0 -47
- package/src/compositions/action-bar.tsx +0 -40
- package/src/compositions/alert.tsx +0 -51
- package/src/compositions/avatar.tsx +0 -74
- package/src/compositions/blockquote.tsx +0 -31
- package/src/compositions/checkbox-card.tsx +0 -57
- package/src/compositions/checkbox.tsx +0 -25
- package/src/compositions/clipboard.tsx +0 -107
- package/src/compositions/color-mode.tsx +0 -65
- package/src/compositions/data-list.tsx +0 -37
- package/src/compositions/empty-state.tsx +0 -34
- package/src/compositions/field.tsx +0 -33
- package/src/compositions/file-button.tsx +0 -166
- package/src/compositions/hover-card.tsx +0 -35
- package/src/compositions/link-button.tsx +0 -12
- package/src/compositions/menu.tsx +0 -108
- package/src/compositions/native-select.tsx +0 -57
- package/src/compositions/pagination.tsx +0 -207
- package/src/compositions/popover.tsx +0 -58
- package/src/compositions/progress-circle.tsx +0 -37
- package/src/compositions/progress.tsx +0 -40
- package/src/compositions/prose.tsx +0 -264
- package/src/compositions/provider.tsx +0 -12
- package/src/compositions/radio-card.tsx +0 -57
- package/src/compositions/radio.tsx +0 -24
- package/src/compositions/rating.tsx +0 -27
- package/src/compositions/segmented-control.tsx +0 -47
- package/src/compositions/skeleton.tsx +0 -44
- package/src/compositions/slider.tsx +0 -53
- package/src/compositions/stat.tsx +0 -75
- package/src/compositions/status.tsx +0 -29
- package/src/compositions/stepper-input.tsx +0 -49
- package/src/compositions/tag.tsx +0 -39
- package/src/compositions/timeline.tsx +0 -17
- package/src/compositions/toaster.tsx +0 -43
- package/src/compositions/toggle-tip.tsx +0 -62
- package/src/compositions/tooltip.tsx +0 -46
- package/src/index.ts +0 -7
- package/src/preset.ts +0 -9
- package/src/provider/index.ts +0 -4
- package/src/provider/sui-provider.tsx +0 -34
- package/src/provider/use-link.test.tsx +0 -60
- package/src/provider/use-link.tsx +0 -13
- package/src/styled-system/create-recipe-context.tsx +0 -91
- package/src/styled-system/create-slot-recipe-context.tsx +0 -188
- package/src/styled-system/empty.ts +0 -7
- package/src/styled-system/factory.types.ts +0 -11
- package/src/theme/animation-styles.ts +0 -53
- package/src/theme/breakpoints.ts +0 -11
- package/src/theme/conditions.ts +0 -26
- package/src/theme/fluid-font-sizes.ts +0 -65
- package/src/theme/global-css.ts +0 -94
- package/src/theme/index.ts +0 -72
- package/src/theme/layer-styles.ts +0 -116
- package/src/theme/recipes/chakra/accordion.ts +0 -145
- package/src/theme/recipes/chakra/action-bar.ts +0 -62
- package/src/theme/recipes/chakra/alert.ts +0 -157
- package/src/theme/recipes/chakra/avatar.ts +0 -141
- package/src/theme/recipes/chakra/badge.ts +0 -67
- package/src/theme/recipes/chakra/blockquote.ts +0 -83
- package/src/theme/recipes/chakra/breadcrumb.ts +0 -94
- package/src/theme/recipes/chakra/card.ts +0 -99
- package/src/theme/recipes/chakra/checkbox-card.ts +0 -212
- package/src/theme/recipes/chakra/checkbox.ts +0 -70
- package/src/theme/recipes/chakra/checkmark.ts +0 -83
- package/src/theme/recipes/chakra/code.ts +0 -17
- package/src/theme/recipes/chakra/collapsible.ts +0 -20
- package/src/theme/recipes/chakra/container.ts +0 -26
- package/src/theme/recipes/chakra/data-list.ts +0 -80
- package/src/theme/recipes/chakra/dialog.ts +0 -225
- package/src/theme/recipes/chakra/drawer.ts +0 -201
- package/src/theme/recipes/chakra/editable.ts +0 -88
- package/src/theme/recipes/chakra/empty-state.ts +0 -88
- package/src/theme/recipes/chakra/field.ts +0 -68
- package/src/theme/recipes/chakra/fieldset.ts +0 -62
- package/src/theme/recipes/chakra/file-upload.ts +0 -96
- package/src/theme/recipes/chakra/heading.ts +0 -27
- package/src/theme/recipes/chakra/hover-card.ts +0 -68
- package/src/theme/recipes/chakra/icon.ts +0 -30
- package/src/theme/recipes/chakra/input-addon.ts +0 -40
- package/src/theme/recipes/chakra/input.ts +0 -96
- package/src/theme/recipes/chakra/kbd.ts +0 -60
- package/src/theme/recipes/chakra/link.ts +0 -37
- package/src/theme/recipes/chakra/list.ts +0 -67
- package/src/theme/recipes/chakra/mark.ts +0 -27
- package/src/theme/recipes/chakra/menu.ts +0 -124
- package/src/theme/recipes/chakra/native-select.ts +0 -140
- package/src/theme/recipes/chakra/number-input.ts +0 -115
- package/src/theme/recipes/chakra/pin-input.ts +0 -27
- package/src/theme/recipes/chakra/popover.ts +0 -86
- package/src/theme/recipes/chakra/progress-circle.ts +0 -94
- package/src/theme/recipes/chakra/progress.ts +0 -127
- package/src/theme/recipes/chakra/radio-card.ts +0 -220
- package/src/theme/recipes/chakra/radio-group.ts +0 -72
- package/src/theme/recipes/chakra/radiomark.ts +0 -107
- package/src/theme/recipes/chakra/rating-group.ts +0 -94
- package/src/theme/recipes/chakra/segment-group.ts +0 -117
- package/src/theme/recipes/chakra/select.ts +0 -282
- package/src/theme/recipes/chakra/separator.ts +0 -51
- package/src/theme/recipes/chakra/skeleton.ts +0 -53
- package/src/theme/recipes/chakra/skip-nav-link.ts +0 -34
- package/src/theme/recipes/chakra/slider.ts +0 -178
- package/src/theme/recipes/chakra/spinner.ts +0 -32
- package/src/theme/recipes/chakra/stat.ts +0 -79
- package/src/theme/recipes/chakra/status.ts +0 -48
- package/src/theme/recipes/chakra/steps.ts +0 -218
- package/src/theme/recipes/chakra/switch.ts +0 -167
- package/src/theme/recipes/chakra/table.ts +0 -172
- package/src/theme/recipes/chakra/tabs.ts +0 -280
- package/src/theme/recipes/chakra/tag.ts +0 -131
- package/src/theme/recipes/chakra/textarea.ts +0 -88
- package/src/theme/recipes/chakra/timeline.ts +0 -138
- package/src/theme/recipes/chakra/toast.ts +0 -96
- package/src/theme/recipes/chakra/tooltip.ts +0 -40
- package/src/theme/recipes.ts +0 -46
- package/src/theme/semantic-tokens/colors.ts +0 -403
- package/src/theme/semantic-tokens/radii.ts +0 -7
- package/src/theme/semantic-tokens/shadows.ts +0 -52
- package/src/theme/slot-recipes.ts +0 -104
- package/src/theme/text-styles.ts +0 -39
- package/src/theme/tokens/animations.ts +0 -8
- package/src/theme/tokens/aspect-ratios.ts +0 -10
- package/src/theme/tokens/blurs.ts +0 -12
- package/src/theme/tokens/borders.ts +0 -9
- package/src/theme/tokens/colors.ts +0 -177
- package/src/theme/tokens/cursor.ts +0 -12
- package/src/theme/tokens/durations.ts +0 -11
- package/src/theme/tokens/easings.ts +0 -10
- package/src/theme/tokens/font-sizes.ts +0 -20
- package/src/theme/tokens/font-weights.ts +0 -13
- package/src/theme/tokens/fonts.ts +0 -15
- package/src/theme/tokens/keyframes.ts +0 -173
- package/src/theme/tokens/letter-spacing.ts +0 -9
- package/src/theme/tokens/line-heights.ts +0 -19
- package/src/theme/tokens/radius.ts +0 -18
- package/src/theme/tokens/sizes.ts +0 -71
- package/src/theme/tokens/spacing.ts +0 -38
- package/src/theme/tokens/z-indices.ts +0 -34
- package/src/theme/utils.ts +0 -46
- /package/dist/{chunk-KHRLZUV4.js → chunk-O2WVT2BP.js} +0 -0
@@ -0,0 +1,35 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/segmented-control/segmented-control.tsx
|
4
|
+
import { forwardRef, useMemo } from "react";
|
5
|
+
import { For, SegmentGroup } from "@chakra-ui/react";
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
7
|
+
function normalize(items) {
|
8
|
+
return items.map((item) => {
|
9
|
+
if (typeof item === "string") return { value: item, label: item };
|
10
|
+
return item;
|
11
|
+
});
|
12
|
+
}
|
13
|
+
var SegmentedControl = forwardRef(function SegmentedControl2(props, ref) {
|
14
|
+
const { items, ...rest } = props;
|
15
|
+
const data = useMemo(() => normalize(items), [items]);
|
16
|
+
return /* @__PURE__ */ jsxs(SegmentGroup.Root, { ref, ...rest, children: [
|
17
|
+
/* @__PURE__ */ jsx(SegmentGroup.Indicator, {}),
|
18
|
+
/* @__PURE__ */ jsx(For, { each: data, children: (item) => /* @__PURE__ */ jsxs(
|
19
|
+
SegmentGroup.Item,
|
20
|
+
{
|
21
|
+
value: item.value,
|
22
|
+
disabled: item.disabled,
|
23
|
+
children: [
|
24
|
+
/* @__PURE__ */ jsx(SegmentGroup.ItemText, { children: item.label }),
|
25
|
+
/* @__PURE__ */ jsx(SegmentGroup.ItemHiddenInput, {})
|
26
|
+
]
|
27
|
+
},
|
28
|
+
item.value
|
29
|
+
) })
|
30
|
+
] });
|
31
|
+
});
|
32
|
+
|
33
|
+
export {
|
34
|
+
SegmentedControl
|
35
|
+
};
|
@@ -1,18 +1,16 @@
|
|
1
1
|
'use client'
|
2
2
|
import {
|
3
3
|
__export
|
4
|
-
} from "
|
4
|
+
} from "./chunk-RTMS5TJN.js";
|
5
5
|
|
6
|
-
// src/components/
|
7
|
-
var
|
8
|
-
__export(
|
6
|
+
// src/components/breadcrumb/breadcrumb.tsx
|
7
|
+
var breadcrumb_exports = {};
|
8
|
+
__export(breadcrumb_exports, {
|
9
9
|
CurrentLink: () => BreadcrumbCurrentLink,
|
10
10
|
Ellipsis: () => BreadcrumbEllipsis,
|
11
11
|
Link: () => BreadcrumbLink,
|
12
12
|
Root: () => BreadcrumbRoot
|
13
13
|
});
|
14
|
-
|
15
|
-
// src/components/breadcrumbs/breadcrumb.tsx
|
16
14
|
import { Children, Fragment, forwardRef, isValidElement } from "react";
|
17
15
|
import { Breadcrumb } from "@chakra-ui/react";
|
18
16
|
import { jsx, jsxs } from "react/jsx-runtime";
|
@@ -32,6 +30,7 @@ var BreadcrumbRoot = forwardRef(
|
|
32
30
|
var BreadcrumbLink = Breadcrumb.Link;
|
33
31
|
var BreadcrumbCurrentLink = Breadcrumb.CurrentLink;
|
34
32
|
var BreadcrumbEllipsis = Breadcrumb.Ellipsis;
|
33
|
+
|
35
34
|
export {
|
36
|
-
|
35
|
+
breadcrumb_exports
|
37
36
|
};
|
@@ -0,0 +1,20 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
useLink
|
4
|
+
} from "./chunk-O2WVT2BP.js";
|
5
|
+
|
6
|
+
// src/components/link/link.tsx
|
7
|
+
import React from "react";
|
8
|
+
import { Link as ChakraLink } from "@chakra-ui/react";
|
9
|
+
import { jsx } from "react/jsx-runtime";
|
10
|
+
var Link = React.forwardRef(
|
11
|
+
(props, ref) => {
|
12
|
+
const LinkComponent = useLink();
|
13
|
+
return /* @__PURE__ */ jsx(ChakraLink, { asChild: true, children: /* @__PURE__ */ jsx(LinkComponent, { ref, ...props }) });
|
14
|
+
}
|
15
|
+
);
|
16
|
+
Link.displayName = "Link";
|
17
|
+
|
18
|
+
export {
|
19
|
+
Link
|
20
|
+
};
|
@@ -0,0 +1,43 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/avatar/avatar.tsx
|
4
|
+
import { forwardRef } from "react";
|
5
|
+
import { Avatar as ChakraAvatar, Group } from "@chakra-ui/react";
|
6
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
7
|
+
var Avatar = forwardRef(
|
8
|
+
function Avatar2(props, ref) {
|
9
|
+
const { name, src, srcSet, loading, icon, fallback, children, ...rest } = props;
|
10
|
+
return /* @__PURE__ */ jsxs(ChakraAvatar.Root, { ref, ...rest, children: [
|
11
|
+
/* @__PURE__ */ jsx(AvatarFallback, { name, icon, children: fallback }),
|
12
|
+
/* @__PURE__ */ jsx(ChakraAvatar.Image, { src, srcSet, loading }),
|
13
|
+
children
|
14
|
+
] });
|
15
|
+
}
|
16
|
+
);
|
17
|
+
var AvatarFallback = forwardRef(
|
18
|
+
function AvatarFallback2(props, ref) {
|
19
|
+
const { name, icon, children, ...rest } = props;
|
20
|
+
return /* @__PURE__ */ jsxs(ChakraAvatar.Fallback, { ref, ...rest, children: [
|
21
|
+
children,
|
22
|
+
name != null && children == null && /* @__PURE__ */ jsx(Fragment, { children: getInitials(name) }),
|
23
|
+
name == null && children == null && /* @__PURE__ */ jsx(ChakraAvatar.Icon, { asChild: !!icon, children: icon })
|
24
|
+
] });
|
25
|
+
}
|
26
|
+
);
|
27
|
+
function getInitials(name) {
|
28
|
+
const names = name.trim().split(" ");
|
29
|
+
const firstName = names[0] != null ? names[0] : "";
|
30
|
+
const lastName = names.length > 1 ? names[names.length - 1] : "";
|
31
|
+
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0);
|
32
|
+
}
|
33
|
+
var AvatarGroup = forwardRef(
|
34
|
+
function AvatarGroup2(props, ref) {
|
35
|
+
const { size, variant, borderless, ...rest } = props;
|
36
|
+
return /* @__PURE__ */ jsx(ChakraAvatar.PropsProvider, { value: { size, variant, borderless }, children: /* @__PURE__ */ jsx(Group, { gap: "0", spaceX: "-3", ref, ...rest }) });
|
37
|
+
}
|
38
|
+
);
|
39
|
+
|
40
|
+
export {
|
41
|
+
Avatar,
|
42
|
+
AvatarGroup
|
43
|
+
};
|
@@ -0,0 +1,32 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
InputGroup
|
4
|
+
} from "./chunk-PKI6YH2V.js";
|
5
|
+
|
6
|
+
// src/components/number-input/number-input.tsx
|
7
|
+
import { forwardRef } from "react";
|
8
|
+
import { NumberInput as ChakraNumberInput } from "@chakra-ui/react";
|
9
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
10
|
+
var NumberInput = forwardRef(
|
11
|
+
function NumberInput2(props, ref) {
|
12
|
+
const {
|
13
|
+
hideControls,
|
14
|
+
startElement,
|
15
|
+
endElement,
|
16
|
+
inputProps,
|
17
|
+
rootRef,
|
18
|
+
...rest
|
19
|
+
} = props;
|
20
|
+
return /* @__PURE__ */ jsxs(ChakraNumberInput.Root, { ref: rootRef, ...rest, children: [
|
21
|
+
/* @__PURE__ */ jsx(InputGroup, { startElement, endElement, children: /* @__PURE__ */ jsx(ChakraNumberInput.Input, { ref, ...inputProps }) }),
|
22
|
+
!hideControls && !endElement ? /* @__PURE__ */ jsxs(ChakraNumberInput.Control, { children: [
|
23
|
+
/* @__PURE__ */ jsx(ChakraNumberInput.IncrementTrigger, {}),
|
24
|
+
/* @__PURE__ */ jsx(ChakraNumberInput.DecrementTrigger, {})
|
25
|
+
] }) : null
|
26
|
+
] });
|
27
|
+
}
|
28
|
+
);
|
29
|
+
|
30
|
+
export {
|
31
|
+
NumberInput
|
32
|
+
};
|
@@ -0,0 +1,22 @@
|
|
1
|
+
'use client'
|
2
|
+
|
3
|
+
// src/components/radio/radio.tsx
|
4
|
+
import { forwardRef } from "react";
|
5
|
+
import { RadioGroup as ChakraRadioGroup } from "@chakra-ui/react";
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
7
|
+
var Radio = forwardRef(
|
8
|
+
function Radio2(props, ref) {
|
9
|
+
const { children, inputProps, rootRef, ...rest } = props;
|
10
|
+
return /* @__PURE__ */ jsxs(ChakraRadioGroup.Item, { ref: rootRef, ...rest, children: [
|
11
|
+
/* @__PURE__ */ jsx(ChakraRadioGroup.ItemHiddenInput, { ref, ...inputProps }),
|
12
|
+
/* @__PURE__ */ jsx(ChakraRadioGroup.ItemIndicator, {}),
|
13
|
+
children && /* @__PURE__ */ jsx(ChakraRadioGroup.ItemText, { children })
|
14
|
+
] });
|
15
|
+
}
|
16
|
+
);
|
17
|
+
var RadioGroup = ChakraRadioGroup.Root;
|
18
|
+
|
19
|
+
export {
|
20
|
+
Radio,
|
21
|
+
RadioGroup
|
22
|
+
};
|
@@ -23,7 +23,7 @@ interface AppShellProps extends HTMLChakraProps<'div'> {
|
|
23
23
|
*/
|
24
24
|
children: React.ReactNode;
|
25
25
|
}
|
26
|
-
interface AppShellRootProps extends AppShellProps, SlotRecipeProps<'
|
26
|
+
interface AppShellRootProps extends Omit<AppShellProps, 'position'>, SlotRecipeProps<'suiAppShell'> {
|
27
27
|
}
|
28
28
|
declare const AppShell: react.ForwardRefExoticComponent<AppShellRootProps & react.RefAttributes<HTMLDivElement>>;
|
29
29
|
|
@@ -23,7 +23,7 @@ interface AppShellProps extends HTMLChakraProps<'div'> {
|
|
23
23
|
*/
|
24
24
|
children: React.ReactNode;
|
25
25
|
}
|
26
|
-
interface AppShellRootProps extends AppShellProps, SlotRecipeProps<'
|
26
|
+
interface AppShellRootProps extends Omit<AppShellProps, 'position'>, SlotRecipeProps<'suiAppShell'> {
|
27
27
|
}
|
28
28
|
declare const AppShell: react.ForwardRefExoticComponent<AppShellRootProps & react.RefAttributes<HTMLDivElement>>;
|
29
29
|
|
@@ -1,45 +1,8 @@
|
|
1
1
|
'use client'
|
2
|
-
import "../../chunk-RTMS5TJN.js";
|
3
|
-
|
4
|
-
// src/components/app-shell/app-shell.tsx
|
5
|
-
import { forwardRef } from "react";
|
6
2
|
import {
|
7
|
-
|
8
|
-
} from "
|
9
|
-
import
|
10
|
-
var {
|
11
|
-
withProvider,
|
12
|
-
withContext,
|
13
|
-
useStyles: useAppShellStyles
|
14
|
-
} = createSlotRecipeContext({
|
15
|
-
key: "appShell"
|
16
|
-
});
|
17
|
-
var AppShellRoot = withProvider(
|
18
|
-
"div",
|
19
|
-
"root",
|
20
|
-
{ forwardAsChild: true }
|
21
|
-
);
|
22
|
-
var AppShellContent = withContext("div", "content", { forwardAsChild: true });
|
23
|
-
var AppShellMain = withContext(
|
24
|
-
"div",
|
25
|
-
"main",
|
26
|
-
{ forwardAsChild: true }
|
27
|
-
);
|
28
|
-
var AppShell = forwardRef(
|
29
|
-
(props, ref) => {
|
30
|
-
const { header, sidebar, aside, footer, children, ...rootProps } = props;
|
31
|
-
return /* @__PURE__ */ jsxs(AppShellRoot, { ref, ...rootProps, children: [
|
32
|
-
header,
|
33
|
-
/* @__PURE__ */ jsxs(AppShellContent, { children: [
|
34
|
-
sidebar,
|
35
|
-
/* @__PURE__ */ jsx(AppShellMain, { children }),
|
36
|
-
aside
|
37
|
-
] }),
|
38
|
-
footer
|
39
|
-
] });
|
40
|
-
}
|
41
|
-
);
|
42
|
-
AppShell.displayName = "AppShell";
|
3
|
+
AppShell
|
4
|
+
} from "../../chunk-6ZNR6N2K.js";
|
5
|
+
import "../../chunk-RTMS5TJN.js";
|
43
6
|
export {
|
44
7
|
AppShell
|
45
8
|
};
|
@@ -0,0 +1,69 @@
|
|
1
|
+
'use client'
|
2
|
+
"use strict";
|
3
|
+
var __defProp = Object.defineProperty;
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
|
+
|
21
|
+
// src/components/avatar/index.ts
|
22
|
+
var avatar_exports = {};
|
23
|
+
__export(avatar_exports, {
|
24
|
+
Avatar: () => Avatar,
|
25
|
+
AvatarGroup: () => AvatarGroup
|
26
|
+
});
|
27
|
+
module.exports = __toCommonJS(avatar_exports);
|
28
|
+
|
29
|
+
// src/components/avatar/avatar.tsx
|
30
|
+
var import_react = require("react");
|
31
|
+
var import_react2 = require("@chakra-ui/react");
|
32
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
33
|
+
var Avatar = (0, import_react.forwardRef)(
|
34
|
+
function Avatar2(props, ref) {
|
35
|
+
const { name, src, srcSet, loading, icon, fallback, children, ...rest } = props;
|
36
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react2.Avatar.Root, { ref, ...rest, children: [
|
37
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(AvatarFallback, { name, icon, children: fallback }),
|
38
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Avatar.Image, { src, srcSet, loading }),
|
39
|
+
children
|
40
|
+
] });
|
41
|
+
}
|
42
|
+
);
|
43
|
+
var AvatarFallback = (0, import_react.forwardRef)(
|
44
|
+
function AvatarFallback2(props, ref) {
|
45
|
+
const { name, icon, children, ...rest } = props;
|
46
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react2.Avatar.Fallback, { ref, ...rest, children: [
|
47
|
+
children,
|
48
|
+
name != null && children == null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: getInitials(name) }),
|
49
|
+
name == null && children == null && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Avatar.Icon, { asChild: !!icon, children: icon })
|
50
|
+
] });
|
51
|
+
}
|
52
|
+
);
|
53
|
+
function getInitials(name) {
|
54
|
+
const names = name.trim().split(" ");
|
55
|
+
const firstName = names[0] != null ? names[0] : "";
|
56
|
+
const lastName = names.length > 1 ? names[names.length - 1] : "";
|
57
|
+
return firstName && lastName ? `${firstName.charAt(0)}${lastName.charAt(0)}` : firstName.charAt(0);
|
58
|
+
}
|
59
|
+
var AvatarGroup = (0, import_react.forwardRef)(
|
60
|
+
function AvatarGroup2(props, ref) {
|
61
|
+
const { size, variant, borderless, ...rest } = props;
|
62
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Avatar.PropsProvider, { value: { size, variant, borderless }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.Group, { gap: "0", spaceX: "-3", ref, ...rest }) });
|
63
|
+
}
|
64
|
+
);
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
66
|
+
0 && (module.exports = {
|
67
|
+
Avatar,
|
68
|
+
AvatarGroup
|
69
|
+
});
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { Avatar as Avatar$1, GroupProps, SlotRecipeProps } from '@chakra-ui/react';
|
3
|
+
|
4
|
+
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement>;
|
5
|
+
interface AvatarProps extends Avatar$1.RootProps {
|
6
|
+
name?: string;
|
7
|
+
src?: string;
|
8
|
+
srcSet?: string;
|
9
|
+
loading?: ImageProps['loading'];
|
10
|
+
icon?: React.ReactElement;
|
11
|
+
fallback?: React.ReactNode;
|
12
|
+
}
|
13
|
+
declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLDivElement>>;
|
14
|
+
interface AvatarGroupProps extends GroupProps, SlotRecipeProps<'avatar'> {
|
15
|
+
}
|
16
|
+
declare const AvatarGroup: react.ForwardRefExoticComponent<AvatarGroupProps & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
|
18
|
+
export { Avatar, AvatarGroup, type AvatarProps };
|
@@ -0,0 +1,18 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { Avatar as Avatar$1, GroupProps, SlotRecipeProps } from '@chakra-ui/react';
|
3
|
+
|
4
|
+
type ImageProps = React.ImgHTMLAttributes<HTMLImageElement>;
|
5
|
+
interface AvatarProps extends Avatar$1.RootProps {
|
6
|
+
name?: string;
|
7
|
+
src?: string;
|
8
|
+
srcSet?: string;
|
9
|
+
loading?: ImageProps['loading'];
|
10
|
+
icon?: React.ReactElement;
|
11
|
+
fallback?: React.ReactNode;
|
12
|
+
}
|
13
|
+
declare const Avatar: react.ForwardRefExoticComponent<AvatarProps & react.RefAttributes<HTMLDivElement>>;
|
14
|
+
interface AvatarGroupProps extends GroupProps, SlotRecipeProps<'avatar'> {
|
15
|
+
}
|
16
|
+
declare const AvatarGroup: react.ForwardRefExoticComponent<AvatarGroupProps & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
|
18
|
+
export { Avatar, AvatarGroup, type AvatarProps };
|
@@ -18,23 +18,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
18
18
|
};
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
20
|
|
21
|
-
// src/components/
|
22
|
-
var
|
23
|
-
__export(
|
24
|
-
Breadcrumb: () =>
|
21
|
+
// src/components/breadcrumb/index.ts
|
22
|
+
var breadcrumb_exports2 = {};
|
23
|
+
__export(breadcrumb_exports2, {
|
24
|
+
Breadcrumb: () => breadcrumb_exports
|
25
25
|
});
|
26
|
-
module.exports = __toCommonJS(
|
26
|
+
module.exports = __toCommonJS(breadcrumb_exports2);
|
27
27
|
|
28
|
-
// src/components/
|
29
|
-
var
|
30
|
-
__export(
|
28
|
+
// src/components/breadcrumb/breadcrumb.tsx
|
29
|
+
var breadcrumb_exports = {};
|
30
|
+
__export(breadcrumb_exports, {
|
31
31
|
CurrentLink: () => BreadcrumbCurrentLink,
|
32
32
|
Ellipsis: () => BreadcrumbEllipsis,
|
33
33
|
Link: () => BreadcrumbLink,
|
34
34
|
Root: () => BreadcrumbRoot
|
35
35
|
});
|
36
|
-
|
37
|
-
// src/components/breadcrumbs/breadcrumb.tsx
|
38
36
|
var import_react = require("react");
|
39
37
|
var import_react2 = require("@chakra-ui/react");
|
40
38
|
var import_jsx_runtime = require("react/jsx-runtime");
|
@@ -10,9 +10,8 @@ declare const BreadcrumbLink: react.ForwardRefExoticComponent<Breadcrumb.LinkPro
|
|
10
10
|
declare const BreadcrumbCurrentLink: react.ForwardRefExoticComponent<Breadcrumb.CurrentLinkProps & react.RefAttributes<HTMLElement>>;
|
11
11
|
declare const BreadcrumbEllipsis: react.ForwardRefExoticComponent<Breadcrumb.EllipsisProps & react.RefAttributes<HTMLElement>>;
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
export { type namespace_BreadcrumbRootProps as BreadcrumbRootProps, BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root };
|
13
|
+
declare namespace breadcrumb {
|
14
|
+
export { BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root, type BreadcrumbRootProps as RootProps };
|
16
15
|
}
|
17
16
|
|
18
|
-
export {
|
17
|
+
export { breadcrumb as Breadcrumb };
|
@@ -10,9 +10,8 @@ declare const BreadcrumbLink: react.ForwardRefExoticComponent<Breadcrumb.LinkPro
|
|
10
10
|
declare const BreadcrumbCurrentLink: react.ForwardRefExoticComponent<Breadcrumb.CurrentLinkProps & react.RefAttributes<HTMLElement>>;
|
11
11
|
declare const BreadcrumbEllipsis: react.ForwardRefExoticComponent<Breadcrumb.EllipsisProps & react.RefAttributes<HTMLElement>>;
|
12
12
|
|
13
|
-
|
14
|
-
|
15
|
-
export { type namespace_BreadcrumbRootProps as BreadcrumbRootProps, BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root };
|
13
|
+
declare namespace breadcrumb {
|
14
|
+
export { BreadcrumbCurrentLink as CurrentLink, BreadcrumbEllipsis as Ellipsis, BreadcrumbLink as Link, BreadcrumbRoot as Root, type BreadcrumbRootProps as RootProps };
|
16
15
|
}
|
17
16
|
|
18
|
-
export {
|
17
|
+
export { breadcrumb as Breadcrumb };
|
@@ -1,45 +1,8 @@
|
|
1
1
|
'use client'
|
2
|
-
import "../../chunk-RTMS5TJN.js";
|
3
|
-
|
4
|
-
// src/components/button/button.tsx
|
5
|
-
import { forwardRef } from "react";
|
6
2
|
import {
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
Spinner
|
11
|
-
} from "@chakra-ui/react";
|
12
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
13
|
-
var Button = forwardRef(
|
14
|
-
function Button2(props, ref) {
|
15
|
-
const {
|
16
|
-
loading,
|
17
|
-
disabled,
|
18
|
-
loadingText,
|
19
|
-
children,
|
20
|
-
variant = "glass",
|
21
|
-
colorPalette = variant === "glass" ? "accent" : "gray",
|
22
|
-
...rest
|
23
|
-
} = props;
|
24
|
-
return /* @__PURE__ */ jsx(
|
25
|
-
ButtonPrimitive,
|
26
|
-
{
|
27
|
-
colorPalette,
|
28
|
-
disabled: loading || disabled,
|
29
|
-
variant,
|
30
|
-
ref,
|
31
|
-
...rest,
|
32
|
-
children: loading && !loadingText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
33
|
-
/* @__PURE__ */ jsx(AbsoluteCenter, { display: "inline-flex", children: /* @__PURE__ */ jsx(Spinner, { size: "inherit", color: "inherit" }) }),
|
34
|
-
/* @__PURE__ */ jsx(Span, { opacity: 0, children })
|
35
|
-
] }) : loading && loadingText ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
36
|
-
/* @__PURE__ */ jsx(Spinner, { size: "inherit", color: "inherit" }),
|
37
|
-
loadingText
|
38
|
-
] }) : children
|
39
|
-
}
|
40
|
-
);
|
41
|
-
}
|
42
|
-
);
|
3
|
+
Button
|
4
|
+
} from "../../chunk-BCNPBZZK.js";
|
5
|
+
import "../../chunk-RTMS5TJN.js";
|
43
6
|
export {
|
44
7
|
Button
|
45
8
|
};
|
@@ -1,20 +1,8 @@
|
|
1
1
|
'use client'
|
2
|
+
import {
|
3
|
+
Checkbox
|
4
|
+
} from "../../chunk-L356FPLY.js";
|
2
5
|
import "../../chunk-RTMS5TJN.js";
|
3
|
-
|
4
|
-
// src/components/checkbox/checkbox.tsx
|
5
|
-
import { forwardRef } from "react";
|
6
|
-
import { Checkbox as ChakraCheckbox } from "@chakra-ui/react";
|
7
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
8
|
-
var Checkbox = forwardRef(
|
9
|
-
function Checkbox2(props, ref) {
|
10
|
-
const { icon, children, inputProps, rootRef, ...rest } = props;
|
11
|
-
return /* @__PURE__ */ jsxs(ChakraCheckbox.Root, { ref: rootRef, ...rest, children: [
|
12
|
-
/* @__PURE__ */ jsx(ChakraCheckbox.HiddenInput, { ref, ...inputProps }),
|
13
|
-
/* @__PURE__ */ jsx(ChakraCheckbox.Control, { children: icon || /* @__PURE__ */ jsx(ChakraCheckbox.Indicator, {}) }),
|
14
|
-
children != null && /* @__PURE__ */ jsx(ChakraCheckbox.Label, { children })
|
15
|
-
] });
|
16
|
-
}
|
17
|
-
);
|
18
6
|
export {
|
19
7
|
Checkbox
|
20
8
|
};
|
@@ -30,7 +30,7 @@ var import_react = require("@chakra-ui/react");
|
|
30
30
|
var import_react2 = require("@chakra-ui/react");
|
31
31
|
var import_jsx_runtime = require("react/jsx-runtime");
|
32
32
|
var { withContext } = (0, import_react2.createRecipeContext)({
|
33
|
-
key: "
|
33
|
+
key: "suiCommand"
|
34
34
|
});
|
35
35
|
var Key = ({ children }) => {
|
36
36
|
if (typeof children !== "string") {
|
@@ -1,33 +1,8 @@
|
|
1
1
|
'use client'
|
2
|
-
import "../../chunk-RTMS5TJN.js";
|
3
|
-
|
4
|
-
// src/components/command/command.tsx
|
5
|
-
import { Kbd } from "@chakra-ui/react";
|
6
2
|
import {
|
7
|
-
|
8
|
-
} from "
|
9
|
-
import
|
10
|
-
var { withContext } = createRecipeContext({
|
11
|
-
key: "command"
|
12
|
-
});
|
13
|
-
var Key = ({ children }) => {
|
14
|
-
if (typeof children !== "string") {
|
15
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
16
|
-
}
|
17
|
-
if (["then", "or", "+"].includes(children)) {
|
18
|
-
return /* @__PURE__ */ jsx("span", { children });
|
19
|
-
}
|
20
|
-
return /* @__PURE__ */ jsx(Kbd, { children });
|
21
|
-
};
|
22
|
-
var Command = (props) => {
|
23
|
-
const { children, ...rest } = props;
|
24
|
-
if (typeof children !== "string") {
|
25
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
26
|
-
}
|
27
|
-
const keys = children.split(/\s|\+/);
|
28
|
-
return /* @__PURE__ */ jsx(CommandRoot, { ...rest, children: keys.map((key) => /* @__PURE__ */ jsx(Key, { children: key }, key)) });
|
29
|
-
};
|
30
|
-
var CommandRoot = withContext("span");
|
3
|
+
Command
|
4
|
+
} from "../../chunk-4TR3AOMG.js";
|
5
|
+
import "../../chunk-RTMS5TJN.js";
|
31
6
|
export {
|
32
7
|
Command
|
33
8
|
};
|