@saas-ui/react 2.11.2 → 3.0.0-alpha.1
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +13 -148
- package/dist/chunk-32JGENDB.js +19 -0
- package/dist/chunk-FZW2DYK3.js +19 -0
- package/dist/chunk-KHRLZUV4.js +35 -0
- package/dist/chunk-KTLWEUNW.js +1 -0
- package/dist/chunk-PKI6YH2V.js +31 -0
- package/dist/chunk-RTMS5TJN.js +10 -0
- package/dist/chunk-VBIVLREP.js +45 -0
- package/dist/chunk-VDXTEASE.js +117 -0
- package/dist/components/app-shell/index.cjs +68 -0
- package/dist/components/app-shell/index.d.cts +30 -0
- package/dist/components/app-shell/index.d.ts +30 -0
- package/dist/components/app-shell/index.js +45 -0
- package/dist/components/breadcrumbs/index.cjs +60 -0
- package/dist/components/breadcrumbs/index.d.cts +18 -0
- package/dist/components/breadcrumbs/index.d.ts +18 -0
- package/dist/components/breadcrumbs/index.js +37 -0
- package/dist/components/button/index.cjs +65 -0
- package/dist/components/button/index.d.cts +12 -0
- package/dist/components/button/index.d.ts +12 -0
- package/dist/components/button/index.js +45 -0
- package/dist/components/checkbox/index.cjs +45 -0
- package/dist/components/checkbox/index.d.cts +11 -0
- package/dist/components/checkbox/index.d.ts +11 -0
- package/dist/components/checkbox/index.js +20 -0
- package/dist/components/close-button/index.cjs +142 -0
- package/dist/components/close-button/index.d.cts +8 -0
- package/dist/components/close-button/index.d.ts +8 -0
- package/dist/components/close-button/index.js +9 -0
- package/dist/components/command/index.cjs +56 -0
- package/dist/components/command/index.d.cts +6 -0
- package/dist/components/command/index.d.ts +6 -0
- package/dist/components/command/index.js +33 -0
- package/dist/components/dialog/index.cjs +243 -0
- package/dist/components/dialog/index.d.cts +27 -0
- package/dist/components/dialog/index.d.ts +27 -0
- package/dist/components/dialog/index.js +73 -0
- package/dist/components/drawer/index.cjs +237 -0
- package/dist/components/drawer/index.d.cts +28 -0
- package/dist/components/drawer/index.d.ts +28 -0
- package/dist/components/drawer/index.js +65 -0
- package/dist/components/icon-badge/index.cjs +70 -0
- package/dist/components/icon-badge/index.d.cts +16 -0
- package/dist/components/icon-badge/index.d.ts +16 -0
- package/dist/components/icon-badge/index.js +38 -0
- package/dist/components/icons/index.cjs +155 -0
- package/dist/components/icons/index.d.cts +19 -0
- package/dist/components/icons/index.d.ts +19 -0
- package/dist/components/icons/index.js +35 -0
- package/dist/components/input-group/index.cjs +56 -0
- package/dist/components/input-group/index.d.cts +13 -0
- package/dist/components/input-group/index.d.ts +13 -0
- package/dist/components/input-group/index.js +8 -0
- package/dist/components/link/index.cjs +71 -0
- package/dist/components/link/index.d.cts +13 -0
- package/dist/components/link/index.d.ts +13 -0
- package/dist/components/link/index.js +20 -0
- package/dist/components/loading-overlay/index.cjs +1921 -0
- package/dist/components/loading-overlay/index.d.cts +13 -0
- package/dist/components/loading-overlay/index.d.ts +13 -0
- package/dist/components/loading-overlay/index.js +1878 -0
- package/dist/components/navbar/index.cjs +65 -0
- package/dist/components/navbar/index.d.cts +18 -0
- package/dist/components/navbar/index.d.ts +18 -0
- package/dist/components/navbar/index.js +42 -0
- package/dist/components/number-input/index.cjs +82 -0
- package/dist/components/number-input/index.d.cts +13 -0
- package/dist/components/number-input/index.d.ts +13 -0
- package/dist/components/number-input/index.js +32 -0
- package/dist/components/password-input/index.cjs +284 -0
- package/dist/components/password-input/index.d.cts +18 -0
- package/dist/components/password-input/index.d.ts +18 -0
- package/dist/components/password-input/index.js +231 -0
- package/dist/components/persona/index.cjs +181 -0
- package/dist/components/persona/index.d.cts +93 -0
- package/dist/components/persona/index.d.ts +93 -0
- package/dist/components/persona/index.js +149 -0
- package/dist/components/pin-input/index.cjs +51 -0
- package/dist/components/pin-input/index.d.cts +12 -0
- package/dist/components/pin-input/index.d.ts +12 -0
- package/dist/components/pin-input/index.js +26 -0
- package/dist/components/radio/index.cjs +48 -0
- package/dist/components/radio/index.d.cts +12 -0
- package/dist/components/radio/index.d.ts +12 -0
- package/dist/components/radio/index.js +22 -0
- package/dist/components/search-input/index.cjs +244 -0
- package/dist/components/search-input/index.d.cts +15 -0
- package/dist/components/search-input/index.d.ts +15 -0
- package/dist/components/search-input/index.js +120 -0
- package/dist/components/select/index.cjs +233 -0
- package/dist/components/select/index.d.cts +32 -0
- package/dist/components/select/index.d.ts +32 -0
- package/dist/components/select/index.js +100 -0
- package/dist/components/sidebar/index.cjs +134 -0
- package/dist/components/sidebar/index.d.cts +85 -0
- package/dist/components/sidebar/index.d.ts +85 -0
- package/dist/components/sidebar/index.js +108 -0
- package/dist/components/spinner/index.cjs +44 -0
- package/dist/components/spinner/index.d.cts +10 -0
- package/dist/components/spinner/index.d.ts +10 -0
- package/dist/components/spinner/index.js +8 -0
- package/dist/components/steps/index.cjs +191 -0
- package/dist/components/steps/index.d.cts +31 -0
- package/dist/components/steps/index.d.ts +31 -0
- package/dist/components/steps/index.js +71 -0
- package/dist/components/switch/index.cjs +48 -0
- package/dist/components/switch/index.d.cts +18 -0
- package/dist/components/switch/index.d.ts +18 -0
- package/dist/components/switch/index.js +23 -0
- package/dist/index.cjs +8460 -0
- package/dist/index.d.cts +26 -0
- package/dist/index.d.ts +25 -7
- package/dist/index.js +8395 -36
- package/package.json +26 -22
- package/src/components/app-shell/app-shell.recipe.ts +52 -0
- package/src/components/app-shell/app-shell.stories.tsx +51 -0
- package/src/components/app-shell/app-shell.tsx +94 -0
- package/src/components/app-shell/index.ts +3 -0
- package/src/components/breadcrumbs/breadcrumb.stories.tsx +17 -0
- package/src/components/breadcrumbs/breadcrumb.tsx +36 -0
- package/src/components/breadcrumbs/index.ts +1 -0
- package/src/components/breadcrumbs/namespace.ts +8 -0
- package/src/components/button/button.recipe.ts +182 -0
- package/src/components/button/button.stories.tsx +99 -0
- package/src/components/button/button.tsx +55 -0
- package/src/components/button/index.ts +2 -0
- package/src/components/checkbox/checkbox.tsx +26 -0
- package/src/components/checkbox/index.ts +2 -0
- package/src/components/close-button/close-button.stories.tsx +12 -0
- package/src/components/close-button/close-button.tsx +18 -0
- package/src/components/close-button/index.ts +2 -0
- package/src/components/command/command.recipe.ts +17 -0
- package/src/components/command/command.stories.tsx +47 -0
- package/src/components/command/command.tsx +50 -0
- package/src/components/command/index.ts +1 -0
- package/src/components/dialog/dialog.tsx +67 -0
- package/src/components/dialog/index.ts +1 -0
- package/src/components/dialog/namespace.ts +18 -0
- package/src/components/drawer/drawer.tsx +57 -0
- package/src/components/drawer/index.ts +3 -0
- package/src/components/drawer/namespace.ts +19 -0
- package/src/components/grid-list/grid-list.recipe.ts +113 -0
- package/src/components/icon-badge/icon-badge.recipe.ts +57 -0
- package/src/components/icon-badge/icon-badge.stories.tsx +38 -0
- package/src/components/icon-badge/icon-badge.tsx +59 -0
- package/src/components/icon-badge/index.ts +2 -0
- package/src/components/icons/create-icon.tsx +41 -0
- package/src/components/icons/icons.tsx +119 -0
- package/src/components/icons/index.ts +1 -0
- package/src/components/input-group/index.ts +1 -0
- package/src/components/input-group/input-group.tsx +46 -0
- package/src/components/link/index.ts +2 -0
- package/src/components/link/link.stories.tsx +17 -0
- package/src/components/link/link.test.tsx +33 -0
- package/src/components/link/link.tsx +27 -0
- package/src/components/loading-overlay/index.ts +1 -0
- package/src/components/loading-overlay/loading-overlay.recipe.ts +61 -0
- package/src/components/loading-overlay/loading-overlay.stories.tsx +68 -0
- package/src/components/loading-overlay/loading-overlay.tsx +54 -0
- package/src/components/loading-overlay/namespace.ts +7 -0
- package/src/components/navbar/index.ts +1 -0
- package/src/components/navbar/namespace.ts +9 -0
- package/src/components/navbar/navbar.recipe.ts +109 -0
- package/src/components/navbar/navbar.stories.tsx +435 -0
- package/src/components/navbar/navbar.test.tsx +49 -0
- package/src/components/navbar/navbar.tsx +39 -0
- package/src/components/number-input/index.ts +2 -0
- package/src/components/number-input/number-input.tsx +41 -0
- package/src/components/password-input/index.ts +2 -0
- package/src/components/password-input/password-input.tsx +93 -0
- package/src/components/persona/index.ts +2 -0
- package/src/components/persona/namespace.ts +18 -0
- package/src/components/persona/persona-primitive.tsx +220 -0
- package/src/components/persona/persona.recipe.ts +94 -0
- package/src/components/persona/persona.stories.tsx +101 -0
- package/src/components/persona/persona.tsx +142 -0
- package/src/components/pin-input/index.ts +2 -0
- package/src/components/pin-input/pin-input.tsx +36 -0
- package/src/components/radio/index.ts +2 -0
- package/src/components/radio/radio.tsx +27 -0
- package/src/components/search-input/index.ts +2 -0
- package/src/components/search-input/search-input.stories.tsx +63 -0
- package/src/components/search-input/search-input.tsx +134 -0
- package/src/components/select/index.ts +1 -0
- package/src/components/select/namespace.ts +18 -0
- package/src/components/select/select.tsx +135 -0
- package/src/components/sidebar/index.ts +7 -0
- package/src/components/sidebar/namespace.ts +27 -0
- package/src/components/sidebar/sidebar-item.recipe.ts +65 -0
- package/src/components/sidebar/sidebar.recipe.ts +237 -0
- package/src/components/sidebar/sidebar.stories.tsx +903 -0
- package/src/components/sidebar/sidebar.tsx +208 -0
- package/src/components/spinner/index.ts +2 -0
- package/src/components/spinner/spinner.stories.tsx +19 -0
- package/src/components/spinner/spinner.tsx +21 -0
- package/src/components/steps/index.ts +1 -0
- package/src/components/steps/namespace.ts +16 -0
- package/src/components/steps/steps.tsx +82 -0
- package/src/components/switch/index.ts +3 -0
- package/src/components/switch/switch.tsx +39 -0
- package/src/compositions/accordion.tsx +47 -0
- package/src/compositions/action-bar.tsx +40 -0
- package/src/compositions/alert.tsx +51 -0
- package/src/compositions/avatar.tsx +74 -0
- package/src/compositions/blockquote.tsx +31 -0
- package/src/compositions/checkbox-card.tsx +57 -0
- package/src/compositions/checkbox.tsx +25 -0
- package/src/compositions/clipboard.tsx +107 -0
- package/src/compositions/color-mode.tsx +65 -0
- package/src/compositions/data-list.tsx +37 -0
- package/src/compositions/empty-state.tsx +34 -0
- package/src/compositions/field.tsx +33 -0
- package/src/compositions/file-button.tsx +166 -0
- package/src/compositions/hover-card.tsx +35 -0
- package/src/compositions/link-button.tsx +12 -0
- package/src/compositions/menu.tsx +108 -0
- package/src/compositions/native-select.tsx +57 -0
- package/src/compositions/pagination.tsx +207 -0
- package/src/compositions/popover.tsx +58 -0
- package/src/compositions/progress-circle.tsx +37 -0
- package/src/compositions/progress.tsx +40 -0
- package/src/compositions/prose.tsx +264 -0
- package/src/compositions/provider.tsx +12 -0
- package/src/compositions/radio-card.tsx +57 -0
- package/src/compositions/radio.tsx +24 -0
- package/src/compositions/rating.tsx +27 -0
- package/src/compositions/segmented-control.tsx +47 -0
- package/src/compositions/skeleton.tsx +44 -0
- package/src/compositions/slider.tsx +53 -0
- package/src/compositions/stat.tsx +75 -0
- package/src/compositions/status.tsx +29 -0
- package/src/compositions/stepper-input.tsx +49 -0
- package/src/compositions/tag.tsx +39 -0
- package/src/compositions/timeline.tsx +17 -0
- package/src/compositions/toaster.tsx +43 -0
- package/src/compositions/toggle-tip.tsx +62 -0
- package/src/compositions/tooltip.tsx +46 -0
- package/src/index.ts +6 -7
- package/src/preset.ts +9 -0
- package/src/provider/index.ts +4 -0
- package/src/provider/sui-provider.tsx +34 -0
- package/src/provider/use-link.test.tsx +60 -0
- package/src/provider/use-link.tsx +13 -0
- package/src/styled-system/create-recipe-context.tsx +91 -0
- package/src/styled-system/create-slot-recipe-context.tsx +188 -0
- package/src/styled-system/empty.ts +7 -0
- package/src/styled-system/factory.types.ts +11 -0
- package/src/theme/animation-styles.ts +53 -0
- package/src/theme/breakpoints.ts +11 -0
- package/src/theme/conditions.ts +26 -0
- package/src/theme/fluid-font-sizes.ts +65 -0
- package/src/theme/global-css.ts +94 -0
- package/src/theme/index.ts +72 -0
- package/src/theme/layer-styles.ts +116 -0
- package/src/theme/recipes/chakra/accordion.ts +145 -0
- package/src/theme/recipes/chakra/action-bar.ts +62 -0
- package/src/theme/recipes/chakra/alert.ts +157 -0
- package/src/theme/recipes/chakra/avatar.ts +141 -0
- package/src/theme/recipes/chakra/badge.ts +67 -0
- package/src/theme/recipes/chakra/blockquote.ts +83 -0
- package/src/theme/recipes/chakra/breadcrumb.ts +94 -0
- package/src/theme/recipes/chakra/card.ts +99 -0
- package/src/theme/recipes/chakra/checkbox-card.ts +212 -0
- package/src/theme/recipes/chakra/checkbox.ts +70 -0
- package/src/theme/recipes/chakra/checkmark.ts +83 -0
- package/src/theme/recipes/chakra/code.ts +17 -0
- package/src/theme/recipes/chakra/collapsible.ts +20 -0
- package/src/theme/recipes/chakra/container.ts +26 -0
- package/src/theme/recipes/chakra/data-list.ts +80 -0
- package/src/theme/recipes/chakra/dialog.ts +225 -0
- package/src/theme/recipes/chakra/drawer.ts +201 -0
- package/src/theme/recipes/chakra/editable.ts +88 -0
- package/src/theme/recipes/chakra/empty-state.ts +88 -0
- package/src/theme/recipes/chakra/field.ts +68 -0
- package/src/theme/recipes/chakra/fieldset.ts +62 -0
- package/src/theme/recipes/chakra/file-upload.ts +96 -0
- package/src/theme/recipes/chakra/heading.ts +27 -0
- package/src/theme/recipes/chakra/hover-card.ts +68 -0
- package/src/theme/recipes/chakra/icon.ts +30 -0
- package/src/theme/recipes/chakra/input-addon.ts +40 -0
- package/src/theme/recipes/chakra/input.ts +96 -0
- package/src/theme/recipes/chakra/kbd.ts +60 -0
- package/src/theme/recipes/chakra/link.ts +37 -0
- package/src/theme/recipes/chakra/list.ts +67 -0
- package/src/theme/recipes/chakra/mark.ts +27 -0
- package/src/theme/recipes/chakra/menu.ts +124 -0
- package/src/theme/recipes/chakra/native-select.ts +140 -0
- package/src/theme/recipes/chakra/number-input.ts +115 -0
- package/src/theme/recipes/chakra/pin-input.ts +27 -0
- package/src/theme/recipes/chakra/popover.ts +86 -0
- package/src/theme/recipes/chakra/progress-circle.ts +94 -0
- package/src/theme/recipes/chakra/progress.ts +127 -0
- package/src/theme/recipes/chakra/radio-card.ts +220 -0
- package/src/theme/recipes/chakra/radio-group.ts +72 -0
- package/src/theme/recipes/chakra/radiomark.ts +107 -0
- package/src/theme/recipes/chakra/rating-group.ts +94 -0
- package/src/theme/recipes/chakra/segment-group.ts +117 -0
- package/src/theme/recipes/chakra/select.ts +282 -0
- package/src/theme/recipes/chakra/separator.ts +51 -0
- package/src/theme/recipes/chakra/skeleton.ts +53 -0
- package/src/theme/recipes/chakra/skip-nav-link.ts +34 -0
- package/src/theme/recipes/chakra/slider.ts +178 -0
- package/src/theme/recipes/chakra/spinner.ts +32 -0
- package/src/theme/recipes/chakra/stat.ts +79 -0
- package/src/theme/recipes/chakra/status.ts +48 -0
- package/src/theme/recipes/chakra/steps.ts +218 -0
- package/src/theme/recipes/chakra/switch.ts +167 -0
- package/src/theme/recipes/chakra/table.ts +172 -0
- package/src/theme/recipes/chakra/tabs.ts +280 -0
- package/src/theme/recipes/chakra/tag.ts +131 -0
- package/src/theme/recipes/chakra/textarea.ts +88 -0
- package/src/theme/recipes/chakra/timeline.ts +138 -0
- package/src/theme/recipes/chakra/toast.ts +96 -0
- package/src/theme/recipes/chakra/tooltip.ts +40 -0
- package/src/theme/recipes.ts +46 -0
- package/src/theme/semantic-tokens/colors.ts +403 -0
- package/src/theme/semantic-tokens/radii.ts +7 -0
- package/src/theme/semantic-tokens/shadows.ts +52 -0
- package/src/theme/slot-recipes.ts +104 -0
- package/src/theme/text-styles.ts +39 -0
- package/src/theme/tokens/animations.ts +8 -0
- package/src/theme/tokens/aspect-ratios.ts +10 -0
- package/src/theme/tokens/blurs.ts +12 -0
- package/src/theme/tokens/borders.ts +9 -0
- package/src/theme/tokens/colors.ts +177 -0
- package/src/theme/tokens/cursor.ts +12 -0
- package/src/theme/tokens/durations.ts +11 -0
- package/src/theme/tokens/easings.ts +10 -0
- package/src/theme/tokens/font-sizes.ts +20 -0
- package/src/theme/tokens/font-weights.ts +13 -0
- package/src/theme/tokens/fonts.ts +15 -0
- package/src/theme/tokens/keyframes.ts +173 -0
- package/src/theme/tokens/letter-spacing.ts +9 -0
- package/src/theme/tokens/line-heights.ts +19 -0
- package/src/theme/tokens/radius.ts +18 -0
- package/src/theme/tokens/sizes.ts +71 -0
- package/src/theme/tokens/spacing.ts +38 -0
- package/src/theme/tokens/z-indices.ts +34 -0
- package/src/theme/utils.ts +46 -0
- package/dist/index.d.mts +0 -8
- package/dist/index.js.map +0 -1
- package/dist/index.mjs +0 -11
- package/dist/index.mjs.map +0 -1
@@ -0,0 +1,243 @@
|
|
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/dialog/index.ts
|
22
|
+
var dialog_exports = {};
|
23
|
+
__export(dialog_exports, {
|
24
|
+
Dialog: () => namespace_exports
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(dialog_exports);
|
27
|
+
|
28
|
+
// src/components/dialog/namespace.ts
|
29
|
+
var namespace_exports = {};
|
30
|
+
__export(namespace_exports, {
|
31
|
+
ActionTrigger: () => DialogActionTrigger,
|
32
|
+
Backdrop: () => DialogBackdrop,
|
33
|
+
Body: () => DialogBody,
|
34
|
+
CloseTrigger: () => DialogCloseTrigger,
|
35
|
+
Content: () => DialogContent,
|
36
|
+
Context: () => DialogContext,
|
37
|
+
Description: () => DialogDescription,
|
38
|
+
Footer: () => DialogFooter,
|
39
|
+
Header: () => DialogHeader,
|
40
|
+
Root: () => DialogRoot,
|
41
|
+
Title: () => DialogTitle,
|
42
|
+
Trigger: () => DialogTrigger
|
43
|
+
});
|
44
|
+
|
45
|
+
// src/components/dialog/dialog.tsx
|
46
|
+
var import_react5 = require("react");
|
47
|
+
var import_react6 = require("@chakra-ui/react");
|
48
|
+
|
49
|
+
// src/components/close-button/close-button.tsx
|
50
|
+
var import_react2 = require("react");
|
51
|
+
var import_react3 = require("@chakra-ui/react");
|
52
|
+
|
53
|
+
// src/components/icons/create-icon.tsx
|
54
|
+
var import_react = require("@chakra-ui/react");
|
55
|
+
var createIcon = (props) => {
|
56
|
+
return (0, import_react.createIcon)({
|
57
|
+
viewBox: "0 0 24 24",
|
58
|
+
defaultProps: {
|
59
|
+
fill: "none",
|
60
|
+
stroke: "currentColor",
|
61
|
+
strokeWidth: "2",
|
62
|
+
strokeLinecap: "round",
|
63
|
+
strokeLinejoin: "round"
|
64
|
+
},
|
65
|
+
...props
|
66
|
+
});
|
67
|
+
};
|
68
|
+
|
69
|
+
// src/components/icons/icons.tsx
|
70
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
71
|
+
var ChevronUpIcon = createIcon({
|
72
|
+
displayName: "ChevronUpIcon",
|
73
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "18 15 12 9 6 15" })
|
74
|
+
});
|
75
|
+
var ChevronDownIcon = createIcon({
|
76
|
+
displayName: "ChevronDownIcon",
|
77
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
78
|
+
});
|
79
|
+
var ChevronLeftIcon = createIcon({
|
80
|
+
displayName: "ChevronLeftIcon",
|
81
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "15 18 9 12 15 6" })
|
82
|
+
});
|
83
|
+
var ChevronRightIcon = createIcon({
|
84
|
+
displayName: "ChevronRightIcon",
|
85
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "9 18 15 12 9 6" })
|
86
|
+
});
|
87
|
+
var HamburgerIcon = createIcon({
|
88
|
+
displayName: "ChevronDownIcon",
|
89
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { fill: "none", children: [
|
90
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
|
91
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
|
92
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
|
93
|
+
] })
|
94
|
+
});
|
95
|
+
var CloseIcon = createIcon({
|
96
|
+
displayName: "CloseIcon",
|
97
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
99
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
100
|
+
] })
|
101
|
+
});
|
102
|
+
var FilterIcon = createIcon({
|
103
|
+
displayName: "FilterIcon",
|
104
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })
|
105
|
+
});
|
106
|
+
var CalendarIcon = createIcon({
|
107
|
+
displayName: "CalendarIcon",
|
108
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
109
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
|
110
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
111
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
112
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
113
|
+
] })
|
114
|
+
});
|
115
|
+
var PlusIcon = createIcon({
|
116
|
+
displayName: "PlusIcon",
|
117
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
119
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
120
|
+
] })
|
121
|
+
});
|
122
|
+
var MinusIcon = createIcon({
|
123
|
+
displayName: "MinusIcon",
|
124
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) })
|
125
|
+
});
|
126
|
+
var ViewOffIcon = createIcon({
|
127
|
+
displayName: "ViewOffIcon",
|
128
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
129
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
|
130
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
131
|
+
] })
|
132
|
+
});
|
133
|
+
var ViewIcon = createIcon({
|
134
|
+
displayName: "ViewOffIcon",
|
135
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
136
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
137
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
138
|
+
] })
|
139
|
+
});
|
140
|
+
var SearchIcon = createIcon({
|
141
|
+
displayName: "SearchIcon",
|
142
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
143
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
|
144
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
145
|
+
] })
|
146
|
+
});
|
147
|
+
var CheckIcon = createIcon({
|
148
|
+
displayName: "CheckIcon",
|
149
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "20 6 9 17 4 12" }) })
|
150
|
+
});
|
151
|
+
|
152
|
+
// src/components/close-button/close-button.tsx
|
153
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
154
|
+
var CloseButton = (0, import_react2.forwardRef)(
|
155
|
+
function CloseButton2(props, ref) {
|
156
|
+
var _a;
|
157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react3.IconButton, { variant: "ghost", "aria-label": "Close", ref, ...props, children: (_a = props.children) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, {}) });
|
158
|
+
}
|
159
|
+
);
|
160
|
+
|
161
|
+
// ../../node_modules/@ark-ui/react/dist/utils/create-context.js
|
162
|
+
var import_react4 = require("react");
|
163
|
+
function getErrorMessage(hook, provider) {
|
164
|
+
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
165
|
+
}
|
166
|
+
function createContext(options = {}) {
|
167
|
+
const {
|
168
|
+
name,
|
169
|
+
strict = true,
|
170
|
+
hookName = "useContext",
|
171
|
+
providerName = "Provider",
|
172
|
+
errorMessage,
|
173
|
+
defaultValue
|
174
|
+
} = options;
|
175
|
+
const Context = (0, import_react4.createContext)(defaultValue);
|
176
|
+
Context.displayName = name;
|
177
|
+
function useContext$1() {
|
178
|
+
var _a;
|
179
|
+
const context = (0, import_react4.useContext)(Context);
|
180
|
+
if (!context && strict) {
|
181
|
+
const error = new Error(errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName));
|
182
|
+
error.name = "ContextError";
|
183
|
+
(_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext$1);
|
184
|
+
throw error;
|
185
|
+
}
|
186
|
+
return context;
|
187
|
+
}
|
188
|
+
return [Context.Provider, useContext$1, Context];
|
189
|
+
}
|
190
|
+
|
191
|
+
// ../../node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js
|
192
|
+
var [DialogProvider, useDialogContext] = createContext({
|
193
|
+
name: "DialogContext",
|
194
|
+
hookName: "useDialogContext",
|
195
|
+
providerName: "<DialogProvider />"
|
196
|
+
});
|
197
|
+
|
198
|
+
// ../../node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js
|
199
|
+
var DialogContext = (props) => props.children(useDialogContext());
|
200
|
+
|
201
|
+
// src/components/dialog/dialog.tsx
|
202
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
203
|
+
var DialogContent = (0, import_react5.forwardRef)(
|
204
|
+
function DialogContent2(props, ref) {
|
205
|
+
const {
|
206
|
+
children,
|
207
|
+
portalled = true,
|
208
|
+
portalRef,
|
209
|
+
backdrop = true,
|
210
|
+
...rest
|
211
|
+
} = props;
|
212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_react6.Portal, { disabled: !portalled, container: portalRef, children: [
|
213
|
+
backdrop && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Dialog.Backdrop, {}),
|
214
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Dialog.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Dialog.Content, { ref, ...rest, asChild: false, children }) })
|
215
|
+
] });
|
216
|
+
}
|
217
|
+
);
|
218
|
+
var DialogCloseTrigger = (0, import_react5.forwardRef)(function DialogCloseTrigger2(props, ref) {
|
219
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
220
|
+
import_react6.Dialog.CloseTrigger,
|
221
|
+
{
|
222
|
+
position: "absolute",
|
223
|
+
top: "2",
|
224
|
+
insetEnd: "2",
|
225
|
+
...props,
|
226
|
+
asChild: true,
|
227
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CloseButton, { size: "sm", ref, children: props.children })
|
228
|
+
}
|
229
|
+
);
|
230
|
+
});
|
231
|
+
var DialogRoot = import_react6.Dialog.Root;
|
232
|
+
var DialogFooter = import_react6.Dialog.Footer;
|
233
|
+
var DialogHeader = import_react6.Dialog.Header;
|
234
|
+
var DialogBody = import_react6.Dialog.Body;
|
235
|
+
var DialogBackdrop = import_react6.Dialog.Backdrop;
|
236
|
+
var DialogTitle = import_react6.Dialog.Title;
|
237
|
+
var DialogDescription = import_react6.Dialog.Description;
|
238
|
+
var DialogTrigger = import_react6.Dialog.Trigger;
|
239
|
+
var DialogActionTrigger = import_react6.Dialog.ActionTrigger;
|
240
|
+
// Annotate the CommonJS export names for ESM import in node:
|
241
|
+
0 && (module.exports = {
|
242
|
+
Dialog
|
243
|
+
});
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { Dialog } from '@chakra-ui/react';
|
3
|
+
import { DialogContext } from '@ark-ui/react/dialog';
|
4
|
+
|
5
|
+
interface DialogContentProps extends Dialog.ContentProps {
|
6
|
+
portalled?: boolean;
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
8
|
+
backdrop?: boolean;
|
9
|
+
}
|
10
|
+
declare const DialogContent: react.ForwardRefExoticComponent<DialogContentProps & react.RefAttributes<HTMLDivElement>>;
|
11
|
+
declare const DialogCloseTrigger: react.ForwardRefExoticComponent<Dialog.CloseTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
12
|
+
type DialogRootProps = Dialog.RootProps;
|
13
|
+
declare const DialogRoot: react.FC<Dialog.RootProps>;
|
14
|
+
declare const DialogFooter: react.ForwardRefExoticComponent<Dialog.FooterProps & react.RefAttributes<HTMLDivElement>>;
|
15
|
+
declare const DialogHeader: react.ForwardRefExoticComponent<Dialog.HeaderProps & react.RefAttributes<HTMLDivElement>>;
|
16
|
+
declare const DialogBody: react.ForwardRefExoticComponent<Dialog.BodyProps & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
declare const DialogBackdrop: react.ForwardRefExoticComponent<Dialog.BackdropProps & react.RefAttributes<HTMLDivElement>>;
|
18
|
+
declare const DialogTitle: react.ForwardRefExoticComponent<Dialog.TitleProps & react.RefAttributes<HTMLDivElement>>;
|
19
|
+
declare const DialogDescription: react.ForwardRefExoticComponent<Dialog.DescriptionProps & react.RefAttributes<HTMLDivElement>>;
|
20
|
+
declare const DialogTrigger: react.ForwardRefExoticComponent<Dialog.TriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
21
|
+
declare const DialogActionTrigger: react.ForwardRefExoticComponent<Dialog.ActionTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
22
|
+
|
23
|
+
declare namespace namespace {
|
24
|
+
export { DialogActionTrigger as ActionTrigger, DialogBackdrop as Backdrop, DialogBody as Body, DialogCloseTrigger as CloseTrigger, DialogContent as Content, type DialogContentProps as ContentProps, DialogContext as Context, DialogDescription as Description, DialogFooter as Footer, DialogHeader as Header, DialogRoot as Root, type DialogRootProps as RootProps, DialogTitle as Title, DialogTrigger as Trigger };
|
25
|
+
}
|
26
|
+
|
27
|
+
export { namespace as Dialog };
|
@@ -0,0 +1,27 @@
|
|
1
|
+
import * as react from 'react';
|
2
|
+
import { Dialog } from '@chakra-ui/react';
|
3
|
+
import { DialogContext } from '@ark-ui/react/dialog';
|
4
|
+
|
5
|
+
interface DialogContentProps extends Dialog.ContentProps {
|
6
|
+
portalled?: boolean;
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
8
|
+
backdrop?: boolean;
|
9
|
+
}
|
10
|
+
declare const DialogContent: react.ForwardRefExoticComponent<DialogContentProps & react.RefAttributes<HTMLDivElement>>;
|
11
|
+
declare const DialogCloseTrigger: react.ForwardRefExoticComponent<Dialog.CloseTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
12
|
+
type DialogRootProps = Dialog.RootProps;
|
13
|
+
declare const DialogRoot: react.FC<Dialog.RootProps>;
|
14
|
+
declare const DialogFooter: react.ForwardRefExoticComponent<Dialog.FooterProps & react.RefAttributes<HTMLDivElement>>;
|
15
|
+
declare const DialogHeader: react.ForwardRefExoticComponent<Dialog.HeaderProps & react.RefAttributes<HTMLDivElement>>;
|
16
|
+
declare const DialogBody: react.ForwardRefExoticComponent<Dialog.BodyProps & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
declare const DialogBackdrop: react.ForwardRefExoticComponent<Dialog.BackdropProps & react.RefAttributes<HTMLDivElement>>;
|
18
|
+
declare const DialogTitle: react.ForwardRefExoticComponent<Dialog.TitleProps & react.RefAttributes<HTMLDivElement>>;
|
19
|
+
declare const DialogDescription: react.ForwardRefExoticComponent<Dialog.DescriptionProps & react.RefAttributes<HTMLDivElement>>;
|
20
|
+
declare const DialogTrigger: react.ForwardRefExoticComponent<Dialog.TriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
21
|
+
declare const DialogActionTrigger: react.ForwardRefExoticComponent<Dialog.ActionTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
22
|
+
|
23
|
+
declare namespace namespace {
|
24
|
+
export { DialogActionTrigger as ActionTrigger, DialogBackdrop as Backdrop, DialogBody as Body, DialogCloseTrigger as CloseTrigger, DialogContent as Content, type DialogContentProps as ContentProps, DialogContext as Context, DialogDescription as Description, DialogFooter as Footer, DialogHeader as Header, DialogRoot as Root, type DialogRootProps as RootProps, DialogTitle as Title, DialogTrigger as Trigger };
|
25
|
+
}
|
26
|
+
|
27
|
+
export { namespace as Dialog };
|
@@ -0,0 +1,73 @@
|
|
1
|
+
'use client'
|
2
|
+
import {
|
3
|
+
DialogContext
|
4
|
+
} from "../../chunk-VBIVLREP.js";
|
5
|
+
import {
|
6
|
+
CloseButton
|
7
|
+
} from "../../chunk-FZW2DYK3.js";
|
8
|
+
import "../../chunk-VDXTEASE.js";
|
9
|
+
import {
|
10
|
+
__export
|
11
|
+
} from "../../chunk-RTMS5TJN.js";
|
12
|
+
|
13
|
+
// src/components/dialog/namespace.ts
|
14
|
+
var namespace_exports = {};
|
15
|
+
__export(namespace_exports, {
|
16
|
+
ActionTrigger: () => DialogActionTrigger,
|
17
|
+
Backdrop: () => DialogBackdrop,
|
18
|
+
Body: () => DialogBody,
|
19
|
+
CloseTrigger: () => DialogCloseTrigger,
|
20
|
+
Content: () => DialogContent,
|
21
|
+
Context: () => DialogContext,
|
22
|
+
Description: () => DialogDescription,
|
23
|
+
Footer: () => DialogFooter,
|
24
|
+
Header: () => DialogHeader,
|
25
|
+
Root: () => DialogRoot,
|
26
|
+
Title: () => DialogTitle,
|
27
|
+
Trigger: () => DialogTrigger
|
28
|
+
});
|
29
|
+
|
30
|
+
// src/components/dialog/dialog.tsx
|
31
|
+
import { forwardRef } from "react";
|
32
|
+
import { Dialog as ChakraDialog, Portal } from "@chakra-ui/react";
|
33
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
34
|
+
var DialogContent = forwardRef(
|
35
|
+
function DialogContent2(props, ref) {
|
36
|
+
const {
|
37
|
+
children,
|
38
|
+
portalled = true,
|
39
|
+
portalRef,
|
40
|
+
backdrop = true,
|
41
|
+
...rest
|
42
|
+
} = props;
|
43
|
+
return /* @__PURE__ */ jsxs(Portal, { disabled: !portalled, container: portalRef, children: [
|
44
|
+
backdrop && /* @__PURE__ */ jsx(ChakraDialog.Backdrop, {}),
|
45
|
+
/* @__PURE__ */ jsx(ChakraDialog.Positioner, { children: /* @__PURE__ */ jsx(ChakraDialog.Content, { ref, ...rest, asChild: false, children }) })
|
46
|
+
] });
|
47
|
+
}
|
48
|
+
);
|
49
|
+
var DialogCloseTrigger = forwardRef(function DialogCloseTrigger2(props, ref) {
|
50
|
+
return /* @__PURE__ */ jsx(
|
51
|
+
ChakraDialog.CloseTrigger,
|
52
|
+
{
|
53
|
+
position: "absolute",
|
54
|
+
top: "2",
|
55
|
+
insetEnd: "2",
|
56
|
+
...props,
|
57
|
+
asChild: true,
|
58
|
+
children: /* @__PURE__ */ jsx(CloseButton, { size: "sm", ref, children: props.children })
|
59
|
+
}
|
60
|
+
);
|
61
|
+
});
|
62
|
+
var DialogRoot = ChakraDialog.Root;
|
63
|
+
var DialogFooter = ChakraDialog.Footer;
|
64
|
+
var DialogHeader = ChakraDialog.Header;
|
65
|
+
var DialogBody = ChakraDialog.Body;
|
66
|
+
var DialogBackdrop = ChakraDialog.Backdrop;
|
67
|
+
var DialogTitle = ChakraDialog.Title;
|
68
|
+
var DialogDescription = ChakraDialog.Description;
|
69
|
+
var DialogTrigger = ChakraDialog.Trigger;
|
70
|
+
var DialogActionTrigger = ChakraDialog.ActionTrigger;
|
71
|
+
export {
|
72
|
+
namespace_exports as Dialog
|
73
|
+
};
|
@@ -0,0 +1,237 @@
|
|
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/drawer/index.ts
|
22
|
+
var drawer_exports = {};
|
23
|
+
__export(drawer_exports, {
|
24
|
+
Drawer: () => namespace_exports
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(drawer_exports);
|
27
|
+
|
28
|
+
// src/components/drawer/namespace.ts
|
29
|
+
var namespace_exports = {};
|
30
|
+
__export(namespace_exports, {
|
31
|
+
ActionTrigger: () => DrawerActionTrigger,
|
32
|
+
Backdrop: () => DrawerBackdrop,
|
33
|
+
Body: () => DrawerBody,
|
34
|
+
CloseTrigger: () => DrawerCloseTrigger,
|
35
|
+
Content: () => DrawerContent,
|
36
|
+
Context: () => DrawerContext,
|
37
|
+
Description: () => DrawerDescription,
|
38
|
+
Footer: () => DrawerFooter,
|
39
|
+
Header: () => DrawerHeader,
|
40
|
+
Root: () => DrawerRoot,
|
41
|
+
Title: () => DrawerTitle,
|
42
|
+
Trigger: () => DrawerTrigger
|
43
|
+
});
|
44
|
+
|
45
|
+
// src/components/drawer/drawer.tsx
|
46
|
+
var import_react5 = require("react");
|
47
|
+
|
48
|
+
// ../../node_modules/@ark-ui/react/dist/utils/create-context.js
|
49
|
+
var import_react = require("react");
|
50
|
+
function getErrorMessage(hook, provider) {
|
51
|
+
return `${hook} returned \`undefined\`. Seems you forgot to wrap component within ${provider}`;
|
52
|
+
}
|
53
|
+
function createContext(options = {}) {
|
54
|
+
const {
|
55
|
+
name,
|
56
|
+
strict = true,
|
57
|
+
hookName = "useContext",
|
58
|
+
providerName = "Provider",
|
59
|
+
errorMessage,
|
60
|
+
defaultValue
|
61
|
+
} = options;
|
62
|
+
const Context = (0, import_react.createContext)(defaultValue);
|
63
|
+
Context.displayName = name;
|
64
|
+
function useContext$1() {
|
65
|
+
var _a;
|
66
|
+
const context = (0, import_react.useContext)(Context);
|
67
|
+
if (!context && strict) {
|
68
|
+
const error = new Error(errorMessage != null ? errorMessage : getErrorMessage(hookName, providerName));
|
69
|
+
error.name = "ContextError";
|
70
|
+
(_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, error, useContext$1);
|
71
|
+
throw error;
|
72
|
+
}
|
73
|
+
return context;
|
74
|
+
}
|
75
|
+
return [Context.Provider, useContext$1, Context];
|
76
|
+
}
|
77
|
+
|
78
|
+
// ../../node_modules/@ark-ui/react/dist/components/dialog/use-dialog-context.js
|
79
|
+
var [DialogProvider, useDialogContext] = createContext({
|
80
|
+
name: "DialogContext",
|
81
|
+
hookName: "useDialogContext",
|
82
|
+
providerName: "<DialogProvider />"
|
83
|
+
});
|
84
|
+
|
85
|
+
// ../../node_modules/@ark-ui/react/dist/components/dialog/dialog-context.js
|
86
|
+
var DialogContext = (props) => props.children(useDialogContext());
|
87
|
+
|
88
|
+
// src/components/drawer/drawer.tsx
|
89
|
+
var import_react6 = require("@chakra-ui/react");
|
90
|
+
|
91
|
+
// src/components/close-button/close-button.tsx
|
92
|
+
var import_react3 = require("react");
|
93
|
+
var import_react4 = require("@chakra-ui/react");
|
94
|
+
|
95
|
+
// src/components/icons/create-icon.tsx
|
96
|
+
var import_react2 = require("@chakra-ui/react");
|
97
|
+
var createIcon = (props) => {
|
98
|
+
return (0, import_react2.createIcon)({
|
99
|
+
viewBox: "0 0 24 24",
|
100
|
+
defaultProps: {
|
101
|
+
fill: "none",
|
102
|
+
stroke: "currentColor",
|
103
|
+
strokeWidth: "2",
|
104
|
+
strokeLinecap: "round",
|
105
|
+
strokeLinejoin: "round"
|
106
|
+
},
|
107
|
+
...props
|
108
|
+
});
|
109
|
+
};
|
110
|
+
|
111
|
+
// src/components/icons/icons.tsx
|
112
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
113
|
+
var ChevronUpIcon = createIcon({
|
114
|
+
displayName: "ChevronUpIcon",
|
115
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "18 15 12 9 6 15" })
|
116
|
+
});
|
117
|
+
var ChevronDownIcon = createIcon({
|
118
|
+
displayName: "ChevronDownIcon",
|
119
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "6 9 12 15 18 9" })
|
120
|
+
});
|
121
|
+
var ChevronLeftIcon = createIcon({
|
122
|
+
displayName: "ChevronLeftIcon",
|
123
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "15 18 9 12 15 6" })
|
124
|
+
});
|
125
|
+
var ChevronRightIcon = createIcon({
|
126
|
+
displayName: "ChevronRightIcon",
|
127
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "9 18 15 12 9 6" })
|
128
|
+
});
|
129
|
+
var HamburgerIcon = createIcon({
|
130
|
+
displayName: "ChevronDownIcon",
|
131
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { fill: "none", children: [
|
132
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "12", x2: "21", y2: "12" }),
|
133
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "6", x2: "21", y2: "6" }),
|
134
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "18", x2: "21", y2: "18" })
|
135
|
+
] })
|
136
|
+
});
|
137
|
+
var CloseIcon = createIcon({
|
138
|
+
displayName: "CloseIcon",
|
139
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
140
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "18", y1: "6", x2: "6", y2: "18" }),
|
141
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "6", y1: "6", x2: "18", y2: "18" })
|
142
|
+
] })
|
143
|
+
});
|
144
|
+
var FilterIcon = createIcon({
|
145
|
+
displayName: "FilterIcon",
|
146
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3" })
|
147
|
+
});
|
148
|
+
var CalendarIcon = createIcon({
|
149
|
+
displayName: "CalendarIcon",
|
150
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
151
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("rect", { x: "3", y: "4", width: "18", height: "18", rx: "2", ry: "2" }),
|
152
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "16", y1: "2", x2: "16", y2: "6" }),
|
153
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "8", y1: "2", x2: "8", y2: "6" }),
|
154
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "3", y1: "10", x2: "21", y2: "10" })
|
155
|
+
] })
|
156
|
+
});
|
157
|
+
var PlusIcon = createIcon({
|
158
|
+
displayName: "PlusIcon",
|
159
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
160
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "12", y1: "5", x2: "12", y2: "19" }),
|
161
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" })
|
162
|
+
] })
|
163
|
+
});
|
164
|
+
var MinusIcon = createIcon({
|
165
|
+
displayName: "MinusIcon",
|
166
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "5", y1: "12", x2: "19", y2: "12" }) })
|
167
|
+
});
|
168
|
+
var ViewOffIcon = createIcon({
|
169
|
+
displayName: "ViewOffIcon",
|
170
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
171
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" }),
|
172
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "1", y1: "1", x2: "23", y2: "23" })
|
173
|
+
] })
|
174
|
+
});
|
175
|
+
var ViewIcon = createIcon({
|
176
|
+
displayName: "ViewOffIcon",
|
177
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
178
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("path", { d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" }),
|
179
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "12", cy: "12", r: "3" })
|
180
|
+
] })
|
181
|
+
});
|
182
|
+
var SearchIcon = createIcon({
|
183
|
+
displayName: "SearchIcon",
|
184
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("g", { children: [
|
185
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "11", cy: "11", r: "8" }),
|
186
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("line", { x1: "21", y1: "21", x2: "16.65", y2: "16.65" })
|
187
|
+
] })
|
188
|
+
});
|
189
|
+
var CheckIcon = createIcon({
|
190
|
+
displayName: "CheckIcon",
|
191
|
+
path: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("g", { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("polyline", { points: "20 6 9 17 4 12" }) })
|
192
|
+
});
|
193
|
+
|
194
|
+
// src/components/close-button/close-button.tsx
|
195
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
196
|
+
var CloseButton = (0, import_react3.forwardRef)(
|
197
|
+
function CloseButton2(props, ref) {
|
198
|
+
var _a;
|
199
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_react4.IconButton, { variant: "ghost", "aria-label": "Close", ref, ...props, children: (_a = props.children) != null ? _a : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CloseIcon, {}) });
|
200
|
+
}
|
201
|
+
);
|
202
|
+
|
203
|
+
// src/components/drawer/drawer.tsx
|
204
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
205
|
+
var DrawerContent = (0, import_react5.forwardRef)(
|
206
|
+
function DrawerContent2(props, ref) {
|
207
|
+
const { children, portalled = true, portalRef, offset, ...rest } = props;
|
208
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Portal, { disabled: !portalled, container: portalRef, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Drawer.Positioner, { padding: offset, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_react6.Drawer.Content, { ref, ...rest, asChild: false, children }) }) });
|
209
|
+
}
|
210
|
+
);
|
211
|
+
var DrawerCloseTrigger = (0, import_react5.forwardRef)(function DrawerCloseTrigger2(props, ref) {
|
212
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
213
|
+
import_react6.Drawer.CloseTrigger,
|
214
|
+
{
|
215
|
+
position: "absolute",
|
216
|
+
top: "2",
|
217
|
+
insetEnd: "2",
|
218
|
+
...props,
|
219
|
+
asChild: true,
|
220
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CloseButton, { size: "sm", ref })
|
221
|
+
}
|
222
|
+
);
|
223
|
+
});
|
224
|
+
var DrawerTrigger = import_react6.Drawer.Trigger;
|
225
|
+
var DrawerRoot = import_react6.Drawer.Root;
|
226
|
+
var DrawerFooter = import_react6.Drawer.Footer;
|
227
|
+
var DrawerHeader = import_react6.Drawer.Header;
|
228
|
+
var DrawerBody = import_react6.Drawer.Body;
|
229
|
+
var DrawerBackdrop = import_react6.Drawer.Backdrop;
|
230
|
+
var DrawerDescription = import_react6.Drawer.Description;
|
231
|
+
var DrawerTitle = import_react6.Drawer.Title;
|
232
|
+
var DrawerActionTrigger = import_react6.Drawer.ActionTrigger;
|
233
|
+
var DrawerContext = DialogContext;
|
234
|
+
// Annotate the CommonJS export names for ESM import in node:
|
235
|
+
0 && (module.exports = {
|
236
|
+
Drawer
|
237
|
+
});
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import * as _ark_ui_react_dialog from '@ark-ui/react/dialog';
|
2
|
+
import * as react from 'react';
|
3
|
+
import { Drawer } from '@chakra-ui/react';
|
4
|
+
|
5
|
+
interface DrawerContentProps extends Drawer.ContentProps {
|
6
|
+
portalled?: boolean;
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
8
|
+
offset?: Drawer.ContentProps['padding'];
|
9
|
+
}
|
10
|
+
declare const DrawerContent: react.ForwardRefExoticComponent<DrawerContentProps & react.RefAttributes<HTMLDivElement>>;
|
11
|
+
declare const DrawerCloseTrigger: react.ForwardRefExoticComponent<Drawer.CloseTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
12
|
+
declare const DrawerTrigger: react.ForwardRefExoticComponent<Drawer.TriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
13
|
+
declare const DrawerRoot: react.FC<Drawer.RootProps>;
|
14
|
+
declare const DrawerFooter: react.ForwardRefExoticComponent<Drawer.FooterProps & react.RefAttributes<HTMLDivElement>>;
|
15
|
+
declare const DrawerHeader: react.ForwardRefExoticComponent<Drawer.HeaderProps & react.RefAttributes<HTMLDivElement>>;
|
16
|
+
declare const DrawerBody: react.ForwardRefExoticComponent<Drawer.BodyProps & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
declare const DrawerBackdrop: react.ForwardRefExoticComponent<Drawer.BackdropProps & react.RefAttributes<HTMLDivElement>>;
|
18
|
+
declare const DrawerDescription: react.ForwardRefExoticComponent<Drawer.DescriptionProps & react.RefAttributes<HTMLDivElement>>;
|
19
|
+
declare const DrawerTitle: react.ForwardRefExoticComponent<Drawer.TitleProps & react.RefAttributes<HTMLDivElement>>;
|
20
|
+
declare const DrawerActionTrigger: react.ForwardRefExoticComponent<Drawer.ActionTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
21
|
+
declare const DrawerContext: (props: _ark_ui_react_dialog.DialogContextProps) => react.ReactNode;
|
22
|
+
type DrawerRootProps = Drawer.RootProps;
|
23
|
+
|
24
|
+
declare namespace namespace {
|
25
|
+
export { DrawerActionTrigger as ActionTrigger, DrawerBackdrop as Backdrop, DrawerBody as Body, DrawerCloseTrigger as CloseTrigger, DrawerContent as Content, type DrawerContentProps as ContentProps, DrawerContext as Context, DrawerDescription as Description, DrawerFooter as Footer, DrawerHeader as Header, DrawerRoot as Root, type DrawerRootProps as RootProps, DrawerTitle as Title, DrawerTrigger as Trigger };
|
26
|
+
}
|
27
|
+
|
28
|
+
export { namespace as Drawer };
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import * as _ark_ui_react_dialog from '@ark-ui/react/dialog';
|
2
|
+
import * as react from 'react';
|
3
|
+
import { Drawer } from '@chakra-ui/react';
|
4
|
+
|
5
|
+
interface DrawerContentProps extends Drawer.ContentProps {
|
6
|
+
portalled?: boolean;
|
7
|
+
portalRef?: React.RefObject<HTMLElement>;
|
8
|
+
offset?: Drawer.ContentProps['padding'];
|
9
|
+
}
|
10
|
+
declare const DrawerContent: react.ForwardRefExoticComponent<DrawerContentProps & react.RefAttributes<HTMLDivElement>>;
|
11
|
+
declare const DrawerCloseTrigger: react.ForwardRefExoticComponent<Drawer.CloseTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
12
|
+
declare const DrawerTrigger: react.ForwardRefExoticComponent<Drawer.TriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
13
|
+
declare const DrawerRoot: react.FC<Drawer.RootProps>;
|
14
|
+
declare const DrawerFooter: react.ForwardRefExoticComponent<Drawer.FooterProps & react.RefAttributes<HTMLDivElement>>;
|
15
|
+
declare const DrawerHeader: react.ForwardRefExoticComponent<Drawer.HeaderProps & react.RefAttributes<HTMLDivElement>>;
|
16
|
+
declare const DrawerBody: react.ForwardRefExoticComponent<Drawer.BodyProps & react.RefAttributes<HTMLDivElement>>;
|
17
|
+
declare const DrawerBackdrop: react.ForwardRefExoticComponent<Drawer.BackdropProps & react.RefAttributes<HTMLDivElement>>;
|
18
|
+
declare const DrawerDescription: react.ForwardRefExoticComponent<Drawer.DescriptionProps & react.RefAttributes<HTMLDivElement>>;
|
19
|
+
declare const DrawerTitle: react.ForwardRefExoticComponent<Drawer.TitleProps & react.RefAttributes<HTMLDivElement>>;
|
20
|
+
declare const DrawerActionTrigger: react.ForwardRefExoticComponent<Drawer.ActionTriggerProps & react.RefAttributes<HTMLButtonElement>>;
|
21
|
+
declare const DrawerContext: (props: _ark_ui_react_dialog.DialogContextProps) => react.ReactNode;
|
22
|
+
type DrawerRootProps = Drawer.RootProps;
|
23
|
+
|
24
|
+
declare namespace namespace {
|
25
|
+
export { DrawerActionTrigger as ActionTrigger, DrawerBackdrop as Backdrop, DrawerBody as Body, DrawerCloseTrigger as CloseTrigger, DrawerContent as Content, type DrawerContentProps as ContentProps, DrawerContext as Context, DrawerDescription as Description, DrawerFooter as Footer, DrawerHeader as Header, DrawerRoot as Root, type DrawerRootProps as RootProps, DrawerTitle as Title, DrawerTrigger as Trigger };
|
26
|
+
}
|
27
|
+
|
28
|
+
export { namespace as Drawer };
|