@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
@@ -1,120 +1,10 @@
|
|
1
1
|
'use client'
|
2
|
-
import "../../chunk-KTLWEUNW.js";
|
3
2
|
import {
|
4
|
-
|
5
|
-
|
6
|
-
|
3
|
+
SearchInput
|
4
|
+
} from "../../chunk-LIYUBUOP.js";
|
5
|
+
import "../../chunk-KTLWEUNW.js";
|
6
|
+
import "../../chunk-VDXTEASE.js";
|
7
7
|
import "../../chunk-RTMS5TJN.js";
|
8
|
-
|
9
|
-
// src/components/search-input/search-input.tsx
|
10
|
-
import React, { forwardRef } from "react";
|
11
|
-
import {
|
12
|
-
Group,
|
13
|
-
IconButton,
|
14
|
-
Input,
|
15
|
-
InputElement,
|
16
|
-
mergeRefs,
|
17
|
-
useControllableState
|
18
|
-
} from "@chakra-ui/react";
|
19
|
-
import { callAll } from "@saas-ui/core/utils";
|
20
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
21
|
-
var SearchInput = forwardRef(
|
22
|
-
(props, ref) => {
|
23
|
-
const {
|
24
|
-
placeholder = "Search",
|
25
|
-
value: valueProp,
|
26
|
-
defaultValue: defaultValueProp,
|
27
|
-
size,
|
28
|
-
variant,
|
29
|
-
width = "full",
|
30
|
-
icon = /* @__PURE__ */ jsx(SearchIcon, {}),
|
31
|
-
resetIcon,
|
32
|
-
endElement: endElementProp,
|
33
|
-
onChange: onChangeProp,
|
34
|
-
onReset: onResetProp,
|
35
|
-
onKeyDown: onKeyDownProp,
|
36
|
-
disabled,
|
37
|
-
...inputProps
|
38
|
-
} = props;
|
39
|
-
const inputRef = React.useRef(null);
|
40
|
-
const [value, setValue] = useControllableState({
|
41
|
-
value: valueProp,
|
42
|
-
defaultValue: defaultValueProp
|
43
|
-
});
|
44
|
-
const onChange = React.useCallback(
|
45
|
-
(e) => {
|
46
|
-
setValue(e.target.value);
|
47
|
-
},
|
48
|
-
[setValue]
|
49
|
-
);
|
50
|
-
const onKeyDown = React.useCallback(
|
51
|
-
(event) => {
|
52
|
-
if (event.key === "Escape") {
|
53
|
-
setValue("");
|
54
|
-
onReset();
|
55
|
-
}
|
56
|
-
},
|
57
|
-
[onResetProp, setValue]
|
58
|
-
);
|
59
|
-
const onReset = () => {
|
60
|
-
var _a;
|
61
|
-
setValue("");
|
62
|
-
onResetProp == null ? void 0 : onResetProp();
|
63
|
-
(_a = inputRef.current) == null ? void 0 : _a.focus();
|
64
|
-
};
|
65
|
-
const showReset = value && !props.disabled;
|
66
|
-
const endElement = showReset ? /* @__PURE__ */ jsx(SearchInputResetButton, { size, children: resetIcon }) : endElementProp;
|
67
|
-
return /* @__PURE__ */ jsxs(Group, { width, children: [
|
68
|
-
/* @__PURE__ */ jsx(
|
69
|
-
InputElement,
|
70
|
-
{
|
71
|
-
placement: "start",
|
72
|
-
px: "0",
|
73
|
-
aspectRatio: "9/10",
|
74
|
-
fontSize: size,
|
75
|
-
children: icon
|
76
|
-
}
|
77
|
-
),
|
78
|
-
/* @__PURE__ */ jsx(
|
79
|
-
Input,
|
80
|
-
{
|
81
|
-
type: "text",
|
82
|
-
placeholder,
|
83
|
-
variant,
|
84
|
-
size,
|
85
|
-
value,
|
86
|
-
disabled,
|
87
|
-
ref: mergeRefs(ref, inputRef),
|
88
|
-
onChange: callAll(onChange, onChangeProp),
|
89
|
-
onKeyDown: callAll(onKeyDown, onKeyDownProp),
|
90
|
-
ps: "calc(var(--input-height) - var(--input-height) / 10)",
|
91
|
-
pe: "calc(var(--input-height) - var(--input-height) / 10)",
|
92
|
-
...inputProps
|
93
|
-
}
|
94
|
-
),
|
95
|
-
/* @__PURE__ */ jsx(InputElement, { placement: "end", children: endElement })
|
96
|
-
] });
|
97
|
-
}
|
98
|
-
);
|
99
|
-
var SearchInputResetButton = forwardRef(
|
100
|
-
(props, ref) => {
|
101
|
-
const { children = /* @__PURE__ */ jsx(CloseIcon, {}), ...rest } = props;
|
102
|
-
return /* @__PURE__ */ jsx(
|
103
|
-
IconButton,
|
104
|
-
{
|
105
|
-
ref,
|
106
|
-
variant: "ghost",
|
107
|
-
"aria-label": "Reset search",
|
108
|
-
me: "-2",
|
109
|
-
aspectRatio: "square",
|
110
|
-
height: "calc(100% - {spacing.2})",
|
111
|
-
...rest,
|
112
|
-
children
|
113
|
-
}
|
114
|
-
);
|
115
|
-
}
|
116
|
-
);
|
117
|
-
SearchInput.displayName = "SearchInput";
|
118
8
|
export {
|
119
9
|
SearchInput
|
120
10
|
};
|
@@ -0,0 +1,60 @@
|
|
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/segmented-control/index.ts
|
22
|
+
var segmented_control_exports = {};
|
23
|
+
__export(segmented_control_exports, {
|
24
|
+
SegmentedControl: () => SegmentedControl
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(segmented_control_exports);
|
27
|
+
|
28
|
+
// src/components/segmented-control/segmented-control.tsx
|
29
|
+
var import_react = require("react");
|
30
|
+
var import_react2 = require("@chakra-ui/react");
|
31
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
32
|
+
function normalize(items) {
|
33
|
+
return items.map((item) => {
|
34
|
+
if (typeof item === "string") return { value: item, label: item };
|
35
|
+
return item;
|
36
|
+
});
|
37
|
+
}
|
38
|
+
var SegmentedControl = (0, import_react.forwardRef)(function SegmentedControl2(props, ref) {
|
39
|
+
const { items, ...rest } = props;
|
40
|
+
const data = (0, import_react.useMemo)(() => normalize(items), [items]);
|
41
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_react2.SegmentGroup.Root, { ref, ...rest, children: [
|
42
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.Indicator, {}),
|
43
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.For, { each: data, children: (item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
44
|
+
import_react2.SegmentGroup.Item,
|
45
|
+
{
|
46
|
+
value: item.value,
|
47
|
+
disabled: item.disabled,
|
48
|
+
children: [
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.ItemText, { children: item.label }),
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_react2.SegmentGroup.ItemHiddenInput, {})
|
51
|
+
]
|
52
|
+
},
|
53
|
+
item.value
|
54
|
+
) })
|
55
|
+
] });
|
56
|
+
});
|
57
|
+
// Annotate the CommonJS export names for ESM import in node:
|
58
|
+
0 && (module.exports = {
|
59
|
+
SegmentedControl
|
60
|
+
});
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { SegmentGroup } from '@chakra-ui/react';
|
3
|
+
|
4
|
+
interface Item {
|
5
|
+
value: string;
|
6
|
+
label: React.ReactNode;
|
7
|
+
disabled?: boolean;
|
8
|
+
}
|
9
|
+
interface SegmentedControlProps extends SegmentGroup.RootProps {
|
10
|
+
items: Array<string | Item>;
|
11
|
+
}
|
12
|
+
declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
|
13
|
+
|
14
|
+
export { SegmentedControl, type SegmentedControlProps };
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { SegmentGroup } from '@chakra-ui/react';
|
3
|
+
|
4
|
+
interface Item {
|
5
|
+
value: string;
|
6
|
+
label: React.ReactNode;
|
7
|
+
disabled?: boolean;
|
8
|
+
}
|
9
|
+
interface SegmentedControlProps extends SegmentGroup.RootProps {
|
10
|
+
items: Array<string | Item>;
|
11
|
+
}
|
12
|
+
declare const SegmentedControl: react.ForwardRefExoticComponent<SegmentedControlProps & react.RefAttributes<HTMLDivElement>>;
|
13
|
+
|
14
|
+
export { SegmentedControl, type SegmentedControlProps };
|
@@ -1,100 +1,10 @@
|
|
1
1
|
'use client'
|
2
2
|
import {
|
3
|
-
|
4
|
-
} from "../../chunk-
|
3
|
+
namespace_exports
|
4
|
+
} from "../../chunk-S3CQW7GD.js";
|
5
|
+
import "../../chunk-FZW2DYK3.js";
|
5
6
|
import "../../chunk-VDXTEASE.js";
|
6
|
-
import
|
7
|
-
__export
|
8
|
-
} from "../../chunk-RTMS5TJN.js";
|
9
|
-
|
10
|
-
// src/components/select/namespace.ts
|
11
|
-
var namespace_exports = {};
|
12
|
-
__export(namespace_exports, {
|
13
|
-
Content: () => SelectContent,
|
14
|
-
Item: () => SelectItem,
|
15
|
-
ItemGroup: () => SelectItemGroup,
|
16
|
-
ItemText: () => SelectItemText,
|
17
|
-
Label: () => SelectLabel,
|
18
|
-
Root: () => SelectRoot,
|
19
|
-
Trigger: () => SelectTrigger,
|
20
|
-
ValueText: () => SelectValueText
|
21
|
-
});
|
22
|
-
|
23
|
-
// src/components/select/select.tsx
|
24
|
-
import { forwardRef } from "react";
|
25
|
-
import { Portal, Select as SelectPrimitive } from "@chakra-ui/react";
|
26
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
27
|
-
var SelectTrigger = forwardRef(
|
28
|
-
function SelectTrigger2(props, ref) {
|
29
|
-
const { children, clearable, ...rest } = props;
|
30
|
-
return /* @__PURE__ */ jsxs(SelectPrimitive.Control, { ...rest, children: [
|
31
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Trigger, { ref, children }),
|
32
|
-
/* @__PURE__ */ jsxs(SelectPrimitive.IndicatorGroup, { children: [
|
33
|
-
clearable && /* @__PURE__ */ jsx(SelectClearTrigger, {}),
|
34
|
-
/* @__PURE__ */ jsx(SelectPrimitive.Indicator, {})
|
35
|
-
] })
|
36
|
-
] });
|
37
|
-
}
|
38
|
-
);
|
39
|
-
var SelectClearTrigger = forwardRef(function SelectClearTrigger2(props, ref) {
|
40
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.ClearTrigger, { asChild: true, ...props, ref, children: /* @__PURE__ */ jsx(
|
41
|
-
CloseButton,
|
42
|
-
{
|
43
|
-
size: "xs",
|
44
|
-
variant: "plain",
|
45
|
-
focusVisibleRing: "inside",
|
46
|
-
focusRingWidth: "2px",
|
47
|
-
pointerEvents: "auto"
|
48
|
-
}
|
49
|
-
) });
|
50
|
-
});
|
51
|
-
var SelectContent = forwardRef(
|
52
|
-
function SelectContent2(props, ref) {
|
53
|
-
const { portalled = true, portalRef, ...rest } = props;
|
54
|
-
return /* @__PURE__ */ jsx(Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ jsx(SelectPrimitive.Positioner, { children: /* @__PURE__ */ jsx(SelectPrimitive.Content, { ...rest, ref }) }) });
|
55
|
-
}
|
56
|
-
);
|
57
|
-
var SelectItem = forwardRef(
|
58
|
-
function SelectItem2(props, ref) {
|
59
|
-
const { item, children, ...rest } = props;
|
60
|
-
return /* @__PURE__ */ jsxs(SelectPrimitive.Item, { item, ...rest, ref, children: [
|
61
|
-
children,
|
62
|
-
/* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, {})
|
63
|
-
] }, item.value);
|
64
|
-
}
|
65
|
-
);
|
66
|
-
var SelectValueText = forwardRef(function SelectValueText2(props, ref) {
|
67
|
-
const { children, ...rest } = props;
|
68
|
-
return /* @__PURE__ */ jsx(SelectPrimitive.ValueText, { ...rest, ref, children: /* @__PURE__ */ jsx(SelectPrimitive.Context, { children: (select) => {
|
69
|
-
const items = select.selectedItems;
|
70
|
-
if (items.length === 0) return props.placeholder;
|
71
|
-
if (children) return children(items);
|
72
|
-
if (items.length === 1)
|
73
|
-
return select.collection.stringifyItem(items[0]);
|
74
|
-
return `${items.length} selected`;
|
75
|
-
} }) });
|
76
|
-
});
|
77
|
-
var SelectRoot = forwardRef(function SelectRoot2(props, ref) {
|
78
|
-
return /* @__PURE__ */ jsx(
|
79
|
-
SelectPrimitive.Root,
|
80
|
-
{
|
81
|
-
...props,
|
82
|
-
ref,
|
83
|
-
positioning: { sameWidth: true, ...props.positioning }
|
84
|
-
}
|
85
|
-
);
|
86
|
-
});
|
87
|
-
var SelectItemGroup = forwardRef(
|
88
|
-
function SelectItemGroup2(props, ref) {
|
89
|
-
const { children, label, ...rest } = props;
|
90
|
-
return /* @__PURE__ */ jsxs(SelectPrimitive.ItemGroup, { ...rest, ref, children: [
|
91
|
-
/* @__PURE__ */ jsx(SelectPrimitive.ItemGroupLabel, { children: label }),
|
92
|
-
children
|
93
|
-
] });
|
94
|
-
}
|
95
|
-
);
|
96
|
-
var SelectLabel = SelectPrimitive.Label;
|
97
|
-
var SelectItemText = SelectPrimitive.ItemText;
|
7
|
+
import "../../chunk-RTMS5TJN.js";
|
98
8
|
export {
|
99
9
|
namespace_exports as Select
|
100
10
|
};
|
@@ -19,18 +19,18 @@ var __copyProps = (to, from, except, desc) => {
|
|
19
19
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
20
20
|
|
21
21
|
// src/components/sidebar/index.ts
|
22
|
-
var
|
23
|
-
__export(
|
24
|
-
Sidebar: () =>
|
25
|
-
useSidebar: () =>
|
22
|
+
var sidebar_exports2 = {};
|
23
|
+
__export(sidebar_exports2, {
|
24
|
+
Sidebar: () => sidebar_exports,
|
25
|
+
useSidebar: () => import_sidebar2.useSidebar,
|
26
26
|
useSidebarItemStyles: () => useSidebarItemStyles,
|
27
27
|
useSidebarStyles: () => useSidebarStyles
|
28
28
|
});
|
29
|
-
module.exports = __toCommonJS(
|
29
|
+
module.exports = __toCommonJS(sidebar_exports2);
|
30
30
|
|
31
|
-
// src/components/sidebar/
|
32
|
-
var
|
33
|
-
__export(
|
31
|
+
// src/components/sidebar/sidebar.tsx
|
32
|
+
var sidebar_exports = {};
|
33
|
+
__export(sidebar_exports, {
|
34
34
|
Backdrop: () => SidebarBackdrop,
|
35
35
|
Body: () => SidebarBody,
|
36
36
|
FlyoutTrigger: () => SidebarFlyoutTrigger,
|
@@ -42,18 +42,17 @@ __export(namespace_exports, {
|
|
42
42
|
GroupTitle: () => SidebarGroupTitle,
|
43
43
|
Header: () => SidebarHeader,
|
44
44
|
NavButton: () => SidebarNavButton,
|
45
|
+
NavButtonEndElement: () => SidebarNavButtonEndElement,
|
45
46
|
NavItem: () => SidebarNavItem,
|
46
|
-
NavItemEndElement: () => SidebarNavItemEndElement,
|
47
47
|
Provider: () => SidebarProvider,
|
48
48
|
Root: () => SidebarRoot,
|
49
49
|
Track: () => SidebarTrack,
|
50
50
|
Trigger: () => SidebarTrigger
|
51
51
|
});
|
52
|
+
var import_sidebar = require("@saas-ui/core/sidebar");
|
52
53
|
|
53
|
-
// src/components/sidebar/sidebar.
|
54
|
+
// src/components/sidebar/sidebar.context.ts
|
54
55
|
var import_react = require("@chakra-ui/react");
|
55
|
-
var import_sidebar = require("@saas-ui/core/sidebar");
|
56
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
57
56
|
var {
|
58
57
|
withContext,
|
59
58
|
useRecipeResult,
|
@@ -61,8 +60,18 @@ var {
|
|
61
60
|
ClassNamesProvider,
|
62
61
|
useStyles: useSidebarStyles
|
63
62
|
} = (0, import_react.createSlotRecipeContext)({
|
64
|
-
key: "
|
63
|
+
key: "suiSidebar"
|
65
64
|
});
|
65
|
+
var {
|
66
|
+
withProvider: withItemProvider,
|
67
|
+
withContext: withItemContext,
|
68
|
+
useStyles: useSidebarItemStyles
|
69
|
+
} = (0, import_react.createSlotRecipeContext)({
|
70
|
+
key: "suiSidebarNavItem"
|
71
|
+
});
|
72
|
+
|
73
|
+
// src/components/sidebar/sidebar.tsx
|
74
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
66
75
|
var SidebarProvider = function SidebarProvider2(props) {
|
67
76
|
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_sidebar.Sidebar.Provider, { ...props, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(RecipeProvider, { ...props, children: props.children }) });
|
68
77
|
};
|
@@ -78,21 +87,35 @@ var SidebarRoot = withContext(
|
|
78
87
|
import_sidebar.Sidebar.Root,
|
79
88
|
"root"
|
80
89
|
);
|
81
|
-
var SidebarTrigger = withContext(
|
82
|
-
|
83
|
-
|
90
|
+
var SidebarTrigger = withContext(
|
91
|
+
import_sidebar.Sidebar.Trigger,
|
92
|
+
"trigger",
|
93
|
+
{
|
94
|
+
forwardAsChild: true
|
95
|
+
}
|
96
|
+
);
|
84
97
|
var SidebarFlyoutTrigger = withContext(import_sidebar.Sidebar.FlyoutTrigger, "flyoutTrigger", {
|
85
98
|
forwardAsChild: true
|
86
99
|
});
|
87
|
-
var SidebarBackdrop = withContext(
|
88
|
-
|
89
|
-
|
90
|
-
|
100
|
+
var SidebarBackdrop = withContext(
|
101
|
+
import_sidebar.Sidebar.Backdrop,
|
102
|
+
"backdrop",
|
103
|
+
{
|
104
|
+
forwardAsChild: true
|
105
|
+
}
|
106
|
+
);
|
107
|
+
var SidebarHeader = withContext(
|
108
|
+
import_sidebar.Sidebar.Header,
|
109
|
+
"header"
|
110
|
+
);
|
91
111
|
var SidebarBody = withContext(
|
92
112
|
import_sidebar.Sidebar.Body,
|
93
113
|
"body"
|
94
114
|
);
|
95
|
-
var SidebarFooter = withContext(
|
115
|
+
var SidebarFooter = withContext(
|
116
|
+
import_sidebar.Sidebar.Footer,
|
117
|
+
"footer"
|
118
|
+
);
|
96
119
|
var SidebarTrack = withContext(
|
97
120
|
import_sidebar.Sidebar.Track,
|
98
121
|
"track",
|
@@ -109,22 +132,31 @@ var SidebarGroup = withContext(
|
|
109
132
|
}
|
110
133
|
}
|
111
134
|
);
|
112
|
-
var SidebarGroupHeader = withContext(
|
135
|
+
var SidebarGroupHeader = withContext(
|
136
|
+
import_sidebar.Sidebar.GroupHeader,
|
137
|
+
"groupHeader"
|
138
|
+
);
|
113
139
|
var SidebarGroupTitle = withContext(import_sidebar.Sidebar.GroupTitle, "groupTitle");
|
114
140
|
var SidebarGroupEndElement = withContext(import_sidebar.Sidebar.GroupEndElement, "groupEndElement");
|
115
|
-
var SidebarGroupContent = withContext(
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
var SidebarNavItem = withItemProvider(import_sidebar.Sidebar.NavItem, "item");
|
141
|
+
var SidebarGroupContent = withContext(
|
142
|
+
import_sidebar.Sidebar.GroupContent,
|
143
|
+
"groupContent"
|
144
|
+
);
|
145
|
+
var SidebarNavItem = withItemProvider(
|
146
|
+
import_sidebar.Sidebar.NavItem,
|
147
|
+
"item"
|
148
|
+
);
|
124
149
|
var SidebarNavButton = withItemContext(import_sidebar.Sidebar.NavButton, "button", {
|
125
150
|
forwardAsChild: true
|
126
151
|
});
|
127
|
-
var
|
152
|
+
var SidebarNavButtonEndElement = withItemContext(import_sidebar.Sidebar.NavItemEndElement, "endElement", {
|
153
|
+
defaultProps: {
|
154
|
+
"data-slot": "endElement"
|
155
|
+
}
|
156
|
+
});
|
157
|
+
|
158
|
+
// src/components/sidebar/index.ts
|
159
|
+
var import_sidebar2 = require("@saas-ui/core/sidebar");
|
128
160
|
// Annotate the CommonJS export names for ESM import in node:
|
129
161
|
0 && (module.exports = {
|
130
162
|
Sidebar,
|