@jameskabz/nextcraft-ui 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/craft-alert.cjs +69 -0
- package/dist/components/craft-alert.cjs.map +1 -0
- package/dist/components/craft-alert.d.cts +16 -0
- package/dist/components/craft-alert.d.ts +16 -0
- package/dist/components/craft-alert.js +45 -0
- package/dist/components/craft-alert.js.map +1 -0
- package/dist/components/craft-badge.cjs +54 -0
- package/dist/components/craft-badge.cjs.map +1 -0
- package/dist/components/craft-badge.d.cts +12 -0
- package/dist/components/craft-badge.d.ts +12 -0
- package/dist/components/craft-badge.js +30 -0
- package/dist/components/craft-badge.js.map +1 -0
- package/dist/components/craft-button.cjs +66 -0
- package/dist/components/craft-button.cjs.map +1 -0
- package/dist/components/craft-button.d.cts +15 -0
- package/dist/components/craft-button.d.ts +15 -0
- package/dist/components/craft-button.js +42 -0
- package/dist/components/craft-button.js.map +1 -0
- package/dist/components/craft-card.cjs +63 -0
- package/dist/components/craft-card.cjs.map +1 -0
- package/dist/components/craft-card.d.cts +13 -0
- package/dist/components/craft-card.d.ts +13 -0
- package/dist/components/craft-card.js +39 -0
- package/dist/components/craft-card.js.map +1 -0
- package/dist/components/craft-checkbox.cjs +103 -0
- package/dist/components/craft-checkbox.cjs.map +1 -0
- package/dist/components/craft-checkbox.d.cts +16 -0
- package/dist/components/craft-checkbox.d.ts +16 -0
- package/dist/components/craft-checkbox.js +69 -0
- package/dist/components/craft-checkbox.js.map +1 -0
- package/dist/components/craft-command-palette.cjs +134 -0
- package/dist/components/craft-command-palette.cjs.map +1 -0
- package/dist/components/craft-command-palette.d.cts +28 -0
- package/dist/components/craft-command-palette.d.ts +28 -0
- package/dist/components/craft-command-palette.js +100 -0
- package/dist/components/craft-command-palette.js.map +1 -0
- package/dist/components/craft-confirm-dialog.cjs +114 -0
- package/dist/components/craft-confirm-dialog.cjs.map +1 -0
- package/dist/components/craft-confirm-dialog.d.cts +21 -0
- package/dist/components/craft-confirm-dialog.d.ts +21 -0
- package/dist/components/craft-confirm-dialog.js +80 -0
- package/dist/components/craft-confirm-dialog.js.map +1 -0
- package/dist/components/craft-create-edit-drawer.cjs +112 -0
- package/dist/components/craft-create-edit-drawer.cjs.map +1 -0
- package/dist/components/craft-create-edit-drawer.d.cts +28 -0
- package/dist/components/craft-create-edit-drawer.d.ts +28 -0
- package/dist/components/craft-create-edit-drawer.js +78 -0
- package/dist/components/craft-create-edit-drawer.js.map +1 -0
- package/dist/components/craft-currency-input.cjs +68 -0
- package/dist/components/craft-currency-input.cjs.map +1 -0
- package/dist/components/craft-currency-input.d.cts +14 -0
- package/dist/components/craft-currency-input.d.ts +14 -0
- package/dist/components/craft-currency-input.js +34 -0
- package/dist/components/craft-currency-input.js.map +1 -0
- package/dist/components/craft-data-table.cjs +407 -0
- package/dist/components/craft-data-table.cjs.map +1 -0
- package/dist/components/craft-data-table.d.cts +58 -0
- package/dist/components/craft-data-table.d.ts +58 -0
- package/dist/components/craft-data-table.js +373 -0
- package/dist/components/craft-data-table.js.map +1 -0
- package/dist/components/craft-date-picker.cjs +226 -0
- package/dist/components/craft-date-picker.cjs.map +1 -0
- package/dist/components/craft-date-picker.d.cts +17 -0
- package/dist/components/craft-date-picker.d.ts +17 -0
- package/dist/components/craft-date-picker.js +192 -0
- package/dist/components/craft-date-picker.js.map +1 -0
- package/dist/components/craft-drawer.cjs +126 -0
- package/dist/components/craft-drawer.cjs.map +1 -0
- package/dist/components/craft-drawer.d.cts +19 -0
- package/dist/components/craft-drawer.d.ts +19 -0
- package/dist/components/craft-drawer.js +92 -0
- package/dist/components/craft-drawer.js.map +1 -0
- package/dist/components/craft-dropdown-menu.cjs +127 -0
- package/dist/components/craft-dropdown-menu.cjs.map +1 -0
- package/dist/components/craft-dropdown-menu.d.cts +28 -0
- package/dist/components/craft-dropdown-menu.d.ts +28 -0
- package/dist/components/craft-dropdown-menu.js +93 -0
- package/dist/components/craft-dropdown-menu.js.map +1 -0
- package/dist/components/craft-empty-state.cjs +58 -0
- package/dist/components/craft-empty-state.cjs.map +1 -0
- package/dist/components/craft-empty-state.d.cts +14 -0
- package/dist/components/craft-empty-state.d.ts +14 -0
- package/dist/components/craft-empty-state.js +34 -0
- package/dist/components/craft-empty-state.js.map +1 -0
- package/dist/components/craft-error-state.cjs +60 -0
- package/dist/components/craft-error-state.cjs.map +1 -0
- package/dist/components/craft-error-state.d.cts +15 -0
- package/dist/components/craft-error-state.d.ts +15 -0
- package/dist/components/craft-error-state.js +36 -0
- package/dist/components/craft-error-state.js.map +1 -0
- package/dist/components/craft-filter-bar.cjs +76 -0
- package/dist/components/craft-filter-bar.cjs.map +1 -0
- package/dist/components/craft-filter-bar.d.cts +18 -0
- package/dist/components/craft-filter-bar.d.ts +18 -0
- package/dist/components/craft-filter-bar.js +52 -0
- package/dist/components/craft-filter-bar.js.map +1 -0
- package/dist/components/craft-form-builder.cjs +330 -0
- package/dist/components/craft-form-builder.cjs.map +1 -0
- package/dist/components/craft-form-builder.d.cts +57 -0
- package/dist/components/craft-form-builder.d.ts +57 -0
- package/dist/components/craft-form-builder.js +301 -0
- package/dist/components/craft-form-builder.js.map +1 -0
- package/dist/components/craft-form-field.cjs +301 -0
- package/dist/components/craft-form-field.cjs.map +1 -0
- package/dist/components/craft-form-field.d.cts +30 -0
- package/dist/components/craft-form-field.d.ts +30 -0
- package/dist/components/craft-form-field.js +280 -0
- package/dist/components/craft-form-field.js.map +1 -0
- package/dist/components/craft-form.cjs +114 -0
- package/dist/components/craft-form.cjs.map +1 -0
- package/dist/components/craft-form.d.cts +27 -0
- package/dist/components/craft-form.d.ts +27 -0
- package/dist/components/craft-form.js +80 -0
- package/dist/components/craft-form.js.map +1 -0
- package/dist/components/craft-icon.cjs +102 -0
- package/dist/components/craft-icon.cjs.map +1 -0
- package/dist/components/craft-icon.d.cts +19 -0
- package/dist/components/craft-icon.d.ts +19 -0
- package/dist/components/craft-icon.js +67 -0
- package/dist/components/craft-icon.js.map +1 -0
- package/dist/components/craft-input.cjs +78 -0
- package/dist/components/craft-input.cjs.map +1 -0
- package/dist/components/craft-input.d.cts +19 -0
- package/dist/components/craft-input.d.ts +19 -0
- package/dist/components/craft-input.js +44 -0
- package/dist/components/craft-input.js.map +1 -0
- package/dist/components/craft-link.cjs +70 -0
- package/dist/components/craft-link.cjs.map +1 -0
- package/dist/components/craft-link.d.cts +14 -0
- package/dist/components/craft-link.d.ts +14 -0
- package/dist/components/craft-link.js +36 -0
- package/dist/components/craft-link.js.map +1 -0
- package/dist/components/craft-loading-state.cjs +64 -0
- package/dist/components/craft-loading-state.cjs.map +1 -0
- package/dist/components/craft-loading-state.d.cts +13 -0
- package/dist/components/craft-loading-state.d.ts +13 -0
- package/dist/components/craft-loading-state.js +40 -0
- package/dist/components/craft-loading-state.js.map +1 -0
- package/dist/components/craft-modal.cjs +174 -0
- package/dist/components/craft-modal.cjs.map +1 -0
- package/dist/components/craft-modal.d.cts +19 -0
- package/dist/components/craft-modal.d.ts +19 -0
- package/dist/components/craft-modal.js +140 -0
- package/dist/components/craft-modal.js.map +1 -0
- package/dist/components/craft-number-input.cjs +63 -0
- package/dist/components/craft-number-input.cjs.map +1 -0
- package/dist/components/craft-number-input.d.cts +12 -0
- package/dist/components/craft-number-input.d.ts +12 -0
- package/dist/components/craft-number-input.js +29 -0
- package/dist/components/craft-number-input.js.map +1 -0
- package/dist/components/craft-pagination.cjs +130 -0
- package/dist/components/craft-pagination.cjs.map +1 -0
- package/dist/components/craft-pagination.d.cts +19 -0
- package/dist/components/craft-pagination.d.ts +19 -0
- package/dist/components/craft-pagination.js +106 -0
- package/dist/components/craft-pagination.js.map +1 -0
- package/dist/components/craft-popover.cjs +123 -0
- package/dist/components/craft-popover.cjs.map +1 -0
- package/dist/components/craft-popover.d.cts +20 -0
- package/dist/components/craft-popover.d.ts +20 -0
- package/dist/components/craft-popover.js +89 -0
- package/dist/components/craft-popover.js.map +1 -0
- package/dist/components/craft-select.cjs +84 -0
- package/dist/components/craft-select.cjs.map +1 -0
- package/dist/components/craft-select.d.cts +12 -0
- package/dist/components/craft-select.d.ts +12 -0
- package/dist/components/craft-select.js +50 -0
- package/dist/components/craft-select.js.map +1 -0
- package/dist/components/craft-skeleton.cjs +45 -0
- package/dist/components/craft-skeleton.cjs.map +1 -0
- package/dist/components/craft-skeleton.d.cts +10 -0
- package/dist/components/craft-skeleton.d.ts +10 -0
- package/dist/components/craft-skeleton.js +21 -0
- package/dist/components/craft-skeleton.js.map +1 -0
- package/dist/components/craft-stat-card.cjs +67 -0
- package/dist/components/craft-stat-card.cjs.map +1 -0
- package/dist/components/craft-stat-card.d.cts +17 -0
- package/dist/components/craft-stat-card.d.ts +17 -0
- package/dist/components/craft-stat-card.js +43 -0
- package/dist/components/craft-stat-card.js.map +1 -0
- package/dist/components/craft-submit-button.cjs +71 -0
- package/dist/components/craft-submit-button.cjs.map +1 -0
- package/dist/components/craft-submit-button.d.cts +13 -0
- package/dist/components/craft-submit-button.d.ts +13 -0
- package/dist/components/craft-submit-button.js +47 -0
- package/dist/components/craft-submit-button.js.map +1 -0
- package/dist/components/craft-switch.cjs +82 -0
- package/dist/components/craft-switch.cjs.map +1 -0
- package/dist/components/craft-switch.d.cts +14 -0
- package/dist/components/craft-switch.d.ts +14 -0
- package/dist/components/craft-switch.js +48 -0
- package/dist/components/craft-switch.js.map +1 -0
- package/dist/components/craft-table-toolbar.cjs +79 -0
- package/dist/components/craft-table-toolbar.cjs.map +1 -0
- package/dist/components/craft-table-toolbar.d.cts +19 -0
- package/dist/components/craft-table-toolbar.d.ts +19 -0
- package/dist/components/craft-table-toolbar.js +55 -0
- package/dist/components/craft-table-toolbar.js.map +1 -0
- package/dist/components/craft-tabs.cjs +105 -0
- package/dist/components/craft-tabs.cjs.map +1 -0
- package/dist/components/craft-tabs.d.cts +19 -0
- package/dist/components/craft-tabs.d.ts +19 -0
- package/dist/components/craft-tabs.js +71 -0
- package/dist/components/craft-tabs.js.map +1 -0
- package/dist/components/craft-textarea.cjs +69 -0
- package/dist/components/craft-textarea.cjs.map +1 -0
- package/dist/components/craft-textarea.d.cts +12 -0
- package/dist/components/craft-textarea.d.ts +12 -0
- package/dist/components/craft-textarea.js +35 -0
- package/dist/components/craft-textarea.js.map +1 -0
- package/dist/components/craft-toast.cjs +98 -0
- package/dist/components/craft-toast.cjs.map +1 -0
- package/dist/components/craft-toast.d.cts +24 -0
- package/dist/components/craft-toast.d.ts +24 -0
- package/dist/components/craft-toast.js +63 -0
- package/dist/components/craft-toast.js.map +1 -0
- package/dist/components/craft-tooltip.cjs +75 -0
- package/dist/components/craft-tooltip.cjs.map +1 -0
- package/dist/components/craft-tooltip.d.cts +13 -0
- package/dist/components/craft-tooltip.d.ts +13 -0
- package/dist/components/craft-tooltip.js +41 -0
- package/dist/components/craft-tooltip.js.map +1 -0
- package/dist/components/glass-card.cjs +64 -0
- package/dist/components/glass-card.cjs.map +1 -0
- package/dist/components/glass-card.d.cts +12 -0
- package/dist/components/glass-card.d.ts +12 -0
- package/dist/components/glass-card.js +40 -0
- package/dist/components/glass-card.js.map +1 -0
- package/dist/components/layout/app-shell.cjs +49 -0
- package/dist/components/layout/app-shell.cjs.map +1 -0
- package/dist/components/layout/app-shell.d.cts +10 -0
- package/dist/components/layout/app-shell.d.ts +10 -0
- package/dist/components/layout/app-shell.js +25 -0
- package/dist/components/layout/app-shell.js.map +1 -0
- package/dist/components/layout/app-template.cjs +104 -0
- package/dist/components/layout/app-template.cjs.map +1 -0
- package/dist/components/layout/app-template.d.cts +19 -0
- package/dist/components/layout/app-template.d.ts +19 -0
- package/dist/components/layout/app-template.js +70 -0
- package/dist/components/layout/app-template.js.map +1 -0
- package/dist/components/layout/auth-layout.cjs +65 -0
- package/dist/components/layout/auth-layout.cjs.map +1 -0
- package/dist/components/layout/auth-layout.d.cts +12 -0
- package/dist/components/layout/auth-layout.d.ts +12 -0
- package/dist/components/layout/auth-layout.js +41 -0
- package/dist/components/layout/auth-layout.js.map +1 -0
- package/dist/components/layout/breadcrumbs.cjs +39 -0
- package/dist/components/layout/breadcrumbs.cjs.map +1 -0
- package/dist/components/layout/breadcrumbs.d.cts +13 -0
- package/dist/components/layout/breadcrumbs.d.ts +13 -0
- package/dist/components/layout/breadcrumbs.js +15 -0
- package/dist/components/layout/breadcrumbs.js.map +1 -0
- package/dist/components/layout/container.cjs +45 -0
- package/dist/components/layout/container.cjs.map +1 -0
- package/dist/components/layout/container.d.cts +9 -0
- package/dist/components/layout/container.d.ts +9 -0
- package/dist/components/layout/container.js +21 -0
- package/dist/components/layout/container.js.map +1 -0
- package/dist/components/layout/grid.cjs +47 -0
- package/dist/components/layout/grid.cjs.map +1 -0
- package/dist/components/layout/grid.d.cts +10 -0
- package/dist/components/layout/grid.d.ts +10 -0
- package/dist/components/layout/grid.js +23 -0
- package/dist/components/layout/grid.js.map +1 -0
- package/dist/components/layout/layout-config.cjs +78 -0
- package/dist/components/layout/layout-config.cjs.map +1 -0
- package/dist/components/layout/layout-config.d.cts +92 -0
- package/dist/components/layout/layout-config.d.ts +92 -0
- package/dist/components/layout/layout-config.js +54 -0
- package/dist/components/layout/layout-config.js.map +1 -0
- package/dist/components/layout/page-header.cjs +52 -0
- package/dist/components/layout/page-header.cjs.map +1 -0
- package/dist/components/layout/page-header.d.cts +11 -0
- package/dist/components/layout/page-header.d.ts +11 -0
- package/dist/components/layout/page-header.js +28 -0
- package/dist/components/layout/page-header.js.map +1 -0
- package/dist/components/layout/sidebar.cjs +64 -0
- package/dist/components/layout/sidebar.cjs.map +1 -0
- package/dist/components/layout/sidebar.d.cts +17 -0
- package/dist/components/layout/sidebar.d.ts +17 -0
- package/dist/components/layout/sidebar.js +40 -0
- package/dist/components/layout/sidebar.js.map +1 -0
- package/dist/components/layout/top-nav.cjs +49 -0
- package/dist/components/layout/top-nav.cjs.map +1 -0
- package/dist/components/layout/top-nav.d.cts +11 -0
- package/dist/components/layout/top-nav.d.ts +11 -0
- package/dist/components/layout/top-nav.js +25 -0
- package/dist/components/layout/top-nav.js.map +1 -0
- package/dist/components/theme-switcher.cjs +72 -0
- package/dist/components/theme-switcher.cjs.map +1 -0
- package/dist/components/theme-switcher.d.cts +9 -0
- package/dist/components/theme-switcher.d.ts +9 -0
- package/dist/components/theme-switcher.js +48 -0
- package/dist/components/theme-switcher.js.map +1 -0
- package/dist/index.cjs +103 -3448
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +54 -746
- package/dist/index.d.ts +54 -746
- package/dist/index.js +50 -3388
- package/dist/index.js.map +1 -1
- package/dist/theme/theme-context.cjs +115 -0
- package/dist/theme/theme-context.cjs.map +1 -0
- package/dist/theme/theme-context.d.cts +23 -0
- package/dist/theme/theme-context.d.ts +23 -0
- package/dist/theme/theme-context.js +79 -0
- package/dist/theme/theme-context.js.map +1 -0
- package/dist/utils/cn.cjs +31 -0
- package/dist/utils/cn.cjs.map +1 -0
- package/dist/utils/cn.d.cts +3 -0
- package/dist/utils/cn.d.ts +3 -0
- package/dist/utils/cn.js +7 -0
- package/dist/utils/cn.js.map +1 -0
- package/package.json +3 -2
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
var craft_checkbox_exports = {};
|
|
30
|
+
__export(craft_checkbox_exports, {
|
|
31
|
+
CraftCheckbox: () => CraftCheckbox
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(craft_checkbox_exports);
|
|
34
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
35
|
+
var React = __toESM(require("react"), 1);
|
|
36
|
+
var import_cn = require("../utils/cn");
|
|
37
|
+
const CraftCheckbox = React.forwardRef(
|
|
38
|
+
({ className, tone, label, description, ...props }, ref) => {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
40
|
+
"label",
|
|
41
|
+
{
|
|
42
|
+
className: (0, import_cn.cn)(
|
|
43
|
+
"flex items-start gap-3 text-sm text-[rgb(var(--nc-fg))]",
|
|
44
|
+
props.disabled ? "opacity-60" : "cursor-pointer",
|
|
45
|
+
className
|
|
46
|
+
),
|
|
47
|
+
"data-nc-theme": tone,
|
|
48
|
+
children: [
|
|
49
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "relative mt-0.5", children: [
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
"input",
|
|
52
|
+
{
|
|
53
|
+
ref,
|
|
54
|
+
type: "checkbox",
|
|
55
|
+
className: "peer sr-only",
|
|
56
|
+
...props
|
|
57
|
+
}
|
|
58
|
+
),
|
|
59
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
60
|
+
"span",
|
|
61
|
+
{
|
|
62
|
+
className: (0, import_cn.cn)(
|
|
63
|
+
"flex h-5 w-5 items-center justify-center rounded-md border-2",
|
|
64
|
+
"border-[rgb(var(--nc-border)/0.45)] bg-[rgb(var(--nc-surface)/0.08)]",
|
|
65
|
+
"transition-all duration-200",
|
|
66
|
+
"peer-checked:border-[rgb(var(--nc-accent-1))] peer-checked:bg-[rgb(var(--nc-accent-1)/0.25)]",
|
|
67
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-[rgb(var(--nc-accent-1)/0.5)]"
|
|
68
|
+
),
|
|
69
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
70
|
+
"svg",
|
|
71
|
+
{
|
|
72
|
+
className: "h-3 w-3 text-[rgb(var(--nc-fg))] opacity-0 transition-opacity peer-checked:opacity-100",
|
|
73
|
+
viewBox: "0 0 20 20",
|
|
74
|
+
fill: "currentColor",
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
77
|
+
"path",
|
|
78
|
+
{
|
|
79
|
+
fillRule: "evenodd",
|
|
80
|
+
d: "M16.704 5.29a1 1 0 010 1.415l-7.2 7.2a1 1 0 01-1.415 0l-3.2-3.2a1 1 0 111.415-1.415l2.492 2.493 6.493-6.493a1 1 0 011.415 0z",
|
|
81
|
+
clipRule: "evenodd"
|
|
82
|
+
}
|
|
83
|
+
)
|
|
84
|
+
}
|
|
85
|
+
)
|
|
86
|
+
}
|
|
87
|
+
)
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { className: "space-y-1", children: [
|
|
90
|
+
label && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block font-medium text-[rgb(var(--nc-fg))]", children: label }),
|
|
91
|
+
description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-xs text-[rgb(var(--nc-fg-muted))]", children: description })
|
|
92
|
+
] })
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
);
|
|
98
|
+
CraftCheckbox.displayName = "CraftCheckbox";
|
|
99
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
100
|
+
0 && (module.exports = {
|
|
101
|
+
CraftCheckbox
|
|
102
|
+
});
|
|
103
|
+
//# sourceMappingURL=craft-checkbox.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-checkbox.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftCheckboxProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"type\"\n> & {\n tone?: ThemeName;\n label?: React.ReactNode;\n description?: React.ReactNode;\n};\n\nexport const CraftCheckbox = React.forwardRef<HTMLInputElement, CraftCheckboxProps>(\n ({ className, tone, label, description, ...props }, ref) => {\n return (\n <label\n className={cn(\n \"flex items-start gap-3 text-sm text-[rgb(var(--nc-fg))]\",\n props.disabled ? \"opacity-60\" : \"cursor-pointer\",\n className\n )}\n data-nc-theme={tone}\n >\n <span className=\"relative mt-0.5\">\n <input\n ref={ref}\n type=\"checkbox\"\n className=\"peer sr-only\"\n {...props}\n />\n <span\n className={cn(\n \"flex h-5 w-5 items-center justify-center rounded-md border-2\",\n \"border-[rgb(var(--nc-border)/0.45)] bg-[rgb(var(--nc-surface)/0.08)]\",\n \"transition-all duration-200\",\n \"peer-checked:border-[rgb(var(--nc-accent-1))] peer-checked:bg-[rgb(var(--nc-accent-1)/0.25)]\",\n \"peer-focus-visible:ring-2 peer-focus-visible:ring-[rgb(var(--nc-accent-1)/0.5)]\"\n )}\n >\n <svg\n className=\"h-3 w-3 text-[rgb(var(--nc-fg))] opacity-0 transition-opacity peer-checked:opacity-100\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.704 5.29a1 1 0 010 1.415l-7.2 7.2a1 1 0 01-1.415 0l-3.2-3.2a1 1 0 111.415-1.415l2.492 2.493 6.493-6.493a1 1 0 011.415 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n </span>\n <span className=\"space-y-1\">\n {label && <span className=\"block font-medium text-[rgb(var(--nc-fg))]\">{label}</span>}\n {description && (\n <span className=\"block text-xs text-[rgb(var(--nc-fg-muted))]\">{description}</span>\n )}\n </span>\n </label>\n );\n }\n);\n\nCraftCheckbox.displayName = \"CraftCheckbox\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAyBQ;AAzBR,YAAuB;AAEvB,gBAAmB;AAYZ,MAAM,gBAAgB,MAAM;AAAA,EACjC,CAAC,EAAE,WAAW,MAAM,OAAO,aAAa,GAAG,MAAM,GAAG,QAAQ;AAC1D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,UACT;AAAA,UACA,MAAM,WAAW,eAAe;AAAA,UAChC;AAAA,QACF;AAAA,QACA,iBAAe;AAAA,QAEf;AAAA,uDAAC,UAAK,WAAU,mBACd;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,MAAK;AAAA,gBACL,WAAU;AAAA,gBACT,GAAG;AAAA;AAAA,YACN;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,eAAW;AAAA,kBACT;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,gBACF;AAAA,gBAEA;AAAA,kBAAC;AAAA;AAAA,oBACC,WAAU;AAAA,oBACV,SAAQ;AAAA,oBACR,MAAK;AAAA,oBACL,eAAY;AAAA,oBAEZ;AAAA,sBAAC;AAAA;AAAA,wBACC,UAAS;AAAA,wBACT,GAAE;AAAA,wBACF,UAAS;AAAA;AAAA,oBACX;AAAA;AAAA,gBACF;AAAA;AAAA,YACF;AAAA,aACF;AAAA,UACA,6CAAC,UAAK,WAAU,aACb;AAAA,qBAAS,4CAAC,UAAK,WAAU,8CAA8C,iBAAM;AAAA,YAC7E,eACC,4CAAC,UAAK,WAAU,gDAAgD,uBAAY;AAAA,aAEhF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;","names":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ThemeName } from '../theme/theme-context.cjs';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
type CraftCheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
6
|
+
tone?: ThemeName;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const CraftCheckbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
11
|
+
tone?: ThemeName;
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
|
|
16
|
+
export { CraftCheckbox, type CraftCheckboxProps };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ThemeName } from '../theme/theme-context.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
type CraftCheckboxProps = Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
6
|
+
tone?: ThemeName;
|
|
7
|
+
label?: React.ReactNode;
|
|
8
|
+
description?: React.ReactNode;
|
|
9
|
+
};
|
|
10
|
+
declare const CraftCheckbox: React.ForwardRefExoticComponent<Omit<React.InputHTMLAttributes<HTMLInputElement>, "type"> & {
|
|
11
|
+
tone?: ThemeName;
|
|
12
|
+
label?: React.ReactNode;
|
|
13
|
+
description?: React.ReactNode;
|
|
14
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
15
|
+
|
|
16
|
+
export { CraftCheckbox, type CraftCheckboxProps };
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "../utils/cn";
|
|
4
|
+
const CraftCheckbox = React.forwardRef(
|
|
5
|
+
({ className, tone, label, description, ...props }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsxs(
|
|
7
|
+
"label",
|
|
8
|
+
{
|
|
9
|
+
className: cn(
|
|
10
|
+
"flex items-start gap-3 text-sm text-[rgb(var(--nc-fg))]",
|
|
11
|
+
props.disabled ? "opacity-60" : "cursor-pointer",
|
|
12
|
+
className
|
|
13
|
+
),
|
|
14
|
+
"data-nc-theme": tone,
|
|
15
|
+
children: [
|
|
16
|
+
/* @__PURE__ */ jsxs("span", { className: "relative mt-0.5", children: [
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
"input",
|
|
19
|
+
{
|
|
20
|
+
ref,
|
|
21
|
+
type: "checkbox",
|
|
22
|
+
className: "peer sr-only",
|
|
23
|
+
...props
|
|
24
|
+
}
|
|
25
|
+
),
|
|
26
|
+
/* @__PURE__ */ jsx(
|
|
27
|
+
"span",
|
|
28
|
+
{
|
|
29
|
+
className: cn(
|
|
30
|
+
"flex h-5 w-5 items-center justify-center rounded-md border-2",
|
|
31
|
+
"border-[rgb(var(--nc-border)/0.45)] bg-[rgb(var(--nc-surface)/0.08)]",
|
|
32
|
+
"transition-all duration-200",
|
|
33
|
+
"peer-checked:border-[rgb(var(--nc-accent-1))] peer-checked:bg-[rgb(var(--nc-accent-1)/0.25)]",
|
|
34
|
+
"peer-focus-visible:ring-2 peer-focus-visible:ring-[rgb(var(--nc-accent-1)/0.5)]"
|
|
35
|
+
),
|
|
36
|
+
children: /* @__PURE__ */ jsx(
|
|
37
|
+
"svg",
|
|
38
|
+
{
|
|
39
|
+
className: "h-3 w-3 text-[rgb(var(--nc-fg))] opacity-0 transition-opacity peer-checked:opacity-100",
|
|
40
|
+
viewBox: "0 0 20 20",
|
|
41
|
+
fill: "currentColor",
|
|
42
|
+
"aria-hidden": "true",
|
|
43
|
+
children: /* @__PURE__ */ jsx(
|
|
44
|
+
"path",
|
|
45
|
+
{
|
|
46
|
+
fillRule: "evenodd",
|
|
47
|
+
d: "M16.704 5.29a1 1 0 010 1.415l-7.2 7.2a1 1 0 01-1.415 0l-3.2-3.2a1 1 0 111.415-1.415l2.492 2.493 6.493-6.493a1 1 0 011.415 0z",
|
|
48
|
+
clipRule: "evenodd"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
}
|
|
54
|
+
)
|
|
55
|
+
] }),
|
|
56
|
+
/* @__PURE__ */ jsxs("span", { className: "space-y-1", children: [
|
|
57
|
+
label && /* @__PURE__ */ jsx("span", { className: "block font-medium text-[rgb(var(--nc-fg))]", children: label }),
|
|
58
|
+
description && /* @__PURE__ */ jsx("span", { className: "block text-xs text-[rgb(var(--nc-fg-muted))]", children: description })
|
|
59
|
+
] })
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
);
|
|
63
|
+
}
|
|
64
|
+
);
|
|
65
|
+
CraftCheckbox.displayName = "CraftCheckbox";
|
|
66
|
+
export {
|
|
67
|
+
CraftCheckbox
|
|
68
|
+
};
|
|
69
|
+
//# sourceMappingURL=craft-checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-checkbox.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftCheckboxProps = Omit<\n React.InputHTMLAttributes<HTMLInputElement>,\n \"type\"\n> & {\n tone?: ThemeName;\n label?: React.ReactNode;\n description?: React.ReactNode;\n};\n\nexport const CraftCheckbox = React.forwardRef<HTMLInputElement, CraftCheckboxProps>(\n ({ className, tone, label, description, ...props }, ref) => {\n return (\n <label\n className={cn(\n \"flex items-start gap-3 text-sm text-[rgb(var(--nc-fg))]\",\n props.disabled ? \"opacity-60\" : \"cursor-pointer\",\n className\n )}\n data-nc-theme={tone}\n >\n <span className=\"relative mt-0.5\">\n <input\n ref={ref}\n type=\"checkbox\"\n className=\"peer sr-only\"\n {...props}\n />\n <span\n className={cn(\n \"flex h-5 w-5 items-center justify-center rounded-md border-2\",\n \"border-[rgb(var(--nc-border)/0.45)] bg-[rgb(var(--nc-surface)/0.08)]\",\n \"transition-all duration-200\",\n \"peer-checked:border-[rgb(var(--nc-accent-1))] peer-checked:bg-[rgb(var(--nc-accent-1)/0.25)]\",\n \"peer-focus-visible:ring-2 peer-focus-visible:ring-[rgb(var(--nc-accent-1)/0.5)]\"\n )}\n >\n <svg\n className=\"h-3 w-3 text-[rgb(var(--nc-fg))] opacity-0 transition-opacity peer-checked:opacity-100\"\n viewBox=\"0 0 20 20\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path\n fillRule=\"evenodd\"\n d=\"M16.704 5.29a1 1 0 010 1.415l-7.2 7.2a1 1 0 01-1.415 0l-3.2-3.2a1 1 0 111.415-1.415l2.492 2.493 6.493-6.493a1 1 0 011.415 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n </span>\n </span>\n <span className=\"space-y-1\">\n {label && <span className=\"block font-medium text-[rgb(var(--nc-fg))]\">{label}</span>}\n {description && (\n <span className=\"block text-xs text-[rgb(var(--nc-fg-muted))]\">{description}</span>\n )}\n </span>\n </label>\n );\n }\n);\n\nCraftCheckbox.displayName = \"CraftCheckbox\";\n"],"mappings":"AAyBQ,SACE,KADF;AAzBR,YAAY,WAAW;AAEvB,SAAS,UAAU;AAYZ,MAAM,gBAAgB,MAAM;AAAA,EACjC,CAAC,EAAE,WAAW,MAAM,OAAO,aAAa,GAAG,MAAM,GAAG,QAAQ;AAC1D,WACE;AAAA,MAAC;AAAA;AAAA,QACC,WAAW;AAAA,UACT;AAAA,UACA,MAAM,WAAW,eAAe;AAAA,UAChC;AAAA,QACF;AAAA,QACA,iBAAe;AAAA,QAEf;AAAA,+BAAC,UAAK,WAAU,mBACd;AAAA;AAAA,cAAC;AAAA;AAAA,gBACC;AAAA,gBACA,MAAK;AAAA,gBACL,WAAU;AAAA,gBACT,GAAG;AAAA;AAAA,YACN;AAAA,YACA;AAAA,cAAC;AAAA;AAAA,gBACC,WAAW;AAAA,kBACT;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,kBACA;AAAA,gBACF;AAAA,gBAEA;AAAA,kBAAC;AAAA;AAAA,oBACC,WAAU;AAAA,oBACV,SAAQ;AAAA,oBACR,MAAK;AAAA,oBACL,eAAY;AAAA,oBAEZ;AAAA,sBAAC;AAAA;AAAA,wBACC,UAAS;AAAA,wBACT,GAAE;AAAA,wBACF,UAAS;AAAA;AAAA,oBACX;AAAA;AAAA,gBACF;AAAA;AAAA,YACF;AAAA,aACF;AAAA,UACA,qBAAC,UAAK,WAAU,aACb;AAAA,qBAAS,oBAAC,UAAK,WAAU,8CAA8C,iBAAM;AAAA,YAC7E,eACC,oBAAC,UAAK,WAAU,gDAAgD,uBAAY;AAAA,aAEhF;AAAA;AAAA;AAAA,IACF;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;","names":[]}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
"use client";
|
|
3
|
+
var __create = Object.create;
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
7
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
9
|
+
var __export = (target, all) => {
|
|
10
|
+
for (var name in all)
|
|
11
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
12
|
+
};
|
|
13
|
+
var __copyProps = (to, from, except, desc) => {
|
|
14
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
15
|
+
for (let key of __getOwnPropNames(from))
|
|
16
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
17
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
18
|
+
}
|
|
19
|
+
return to;
|
|
20
|
+
};
|
|
21
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
22
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
23
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
24
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
25
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
26
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
27
|
+
mod
|
|
28
|
+
));
|
|
29
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
30
|
+
var craft_command_palette_exports = {};
|
|
31
|
+
__export(craft_command_palette_exports, {
|
|
32
|
+
CraftCommandPalette: () => CraftCommandPalette
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(craft_command_palette_exports);
|
|
35
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
36
|
+
var React = __toESM(require("react"), 1);
|
|
37
|
+
var import_cn = require("../utils/cn");
|
|
38
|
+
var import_craft_input = require("../components/craft-input");
|
|
39
|
+
var import_craft_modal = require("../components/craft-modal");
|
|
40
|
+
function CraftCommandPalette({
|
|
41
|
+
items,
|
|
42
|
+
open,
|
|
43
|
+
defaultOpen = false,
|
|
44
|
+
onOpenChange,
|
|
45
|
+
trigger,
|
|
46
|
+
title = "Command Palette",
|
|
47
|
+
placeholder = "Search commands...",
|
|
48
|
+
emptyText = "No results found.",
|
|
49
|
+
tone,
|
|
50
|
+
className
|
|
51
|
+
}) {
|
|
52
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);
|
|
53
|
+
const isControlled = typeof open === "boolean";
|
|
54
|
+
const isOpen = isControlled ? open : uncontrolledOpen;
|
|
55
|
+
const [query, setQuery] = React.useState("");
|
|
56
|
+
const setOpen = React.useCallback(
|
|
57
|
+
(next) => {
|
|
58
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
59
|
+
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
60
|
+
},
|
|
61
|
+
[isControlled, onOpenChange]
|
|
62
|
+
);
|
|
63
|
+
const filtered = React.useMemo(() => {
|
|
64
|
+
const q = query.trim().toLowerCase();
|
|
65
|
+
if (!q) return items;
|
|
66
|
+
return items.filter((item) => {
|
|
67
|
+
var _a, _b;
|
|
68
|
+
const haystack = [
|
|
69
|
+
item.label,
|
|
70
|
+
(_a = item.description) != null ? _a : "",
|
|
71
|
+
...(_b = item.keywords) != null ? _b : []
|
|
72
|
+
].join(" ").toLowerCase();
|
|
73
|
+
return haystack.includes(q);
|
|
74
|
+
});
|
|
75
|
+
}, [items, query]);
|
|
76
|
+
React.useEffect(() => {
|
|
77
|
+
if (!isOpen) setQuery("");
|
|
78
|
+
}, [isOpen]);
|
|
79
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
80
|
+
import_craft_modal.CraftModal,
|
|
81
|
+
{
|
|
82
|
+
open: isOpen,
|
|
83
|
+
onOpenChange: setOpen,
|
|
84
|
+
trigger,
|
|
85
|
+
title,
|
|
86
|
+
tone,
|
|
87
|
+
className: (0, import_cn.cn)("max-w-xl", className),
|
|
88
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-4", children: [
|
|
89
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
90
|
+
import_craft_input.CraftInput,
|
|
91
|
+
{
|
|
92
|
+
type: "search",
|
|
93
|
+
placeholder,
|
|
94
|
+
value: query,
|
|
95
|
+
onChange: (event) => setQuery(event.target.value)
|
|
96
|
+
}
|
|
97
|
+
),
|
|
98
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "space-y-2", children: [
|
|
99
|
+
filtered.length === 0 && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.12)] p-4 text-sm text-[rgb(var(--nc-fg-muted))]", children: emptyText }),
|
|
100
|
+
filtered.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
101
|
+
"button",
|
|
102
|
+
{
|
|
103
|
+
type: "button",
|
|
104
|
+
disabled: item.disabled,
|
|
105
|
+
onClick: () => {
|
|
106
|
+
var _a;
|
|
107
|
+
if (item.disabled) return;
|
|
108
|
+
(_a = item.onSelect) == null ? void 0 : _a.call(item);
|
|
109
|
+
setOpen(false);
|
|
110
|
+
},
|
|
111
|
+
className: (0, import_cn.cn)(
|
|
112
|
+
"flex w-full items-start gap-3 rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.08)] px-4 py-3 text-left transition",
|
|
113
|
+
item.disabled ? "cursor-not-allowed opacity-60" : "hover:bg-[rgb(var(--nc-surface)/0.16)]"
|
|
114
|
+
),
|
|
115
|
+
children: [
|
|
116
|
+
item.icon && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "mt-1", children: item.icon }),
|
|
117
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("span", { children: [
|
|
118
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-sm font-semibold", children: item.label }),
|
|
119
|
+
item.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("span", { className: "block text-xs text-[rgb(var(--nc-fg-muted))]", children: item.description })
|
|
120
|
+
] })
|
|
121
|
+
]
|
|
122
|
+
},
|
|
123
|
+
item.id
|
|
124
|
+
))
|
|
125
|
+
] })
|
|
126
|
+
] })
|
|
127
|
+
}
|
|
128
|
+
);
|
|
129
|
+
}
|
|
130
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
131
|
+
0 && (module.exports = {
|
|
132
|
+
CraftCommandPalette
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=craft-command-palette.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-command-palette.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\nimport { CraftInput } from \"@/components/craft-input\";\nimport { CraftModal } from \"@/components/craft-modal\";\n\nexport type CraftCommandItem = {\n id: string;\n label: string;\n description?: string;\n keywords?: string[];\n icon?: React.ReactNode;\n onSelect?: () => void;\n disabled?: boolean;\n};\n\nexport type CraftCommandPaletteProps = {\n items: CraftCommandItem[];\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n trigger?: React.ReactNode;\n title?: React.ReactNode;\n placeholder?: string;\n emptyText?: React.ReactNode;\n tone?: ThemeName;\n className?: string;\n};\n\nexport function CraftCommandPalette({\n items,\n open,\n defaultOpen = false,\n onOpenChange,\n trigger,\n title = \"Command Palette\",\n placeholder = \"Search commands...\",\n emptyText = \"No results found.\",\n tone,\n className,\n}: CraftCommandPaletteProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const isControlled = typeof open === \"boolean\";\n const isOpen = isControlled ? open : uncontrolledOpen;\n const [query, setQuery] = React.useState(\"\");\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const filtered = React.useMemo(() => {\n const q = query.trim().toLowerCase();\n if (!q) return items;\n return items.filter((item) => {\n const haystack = [\n item.label,\n item.description ?? \"\",\n ...(item.keywords ?? []),\n ]\n .join(\" \")\n .toLowerCase();\n return haystack.includes(q);\n });\n }, [items, query]);\n\n React.useEffect(() => {\n if (!isOpen) setQuery(\"\");\n }, [isOpen]);\n\n return (\n <CraftModal\n open={isOpen}\n onOpenChange={setOpen}\n trigger={trigger}\n title={title}\n tone={tone}\n className={cn(\"max-w-xl\", className)}\n >\n <div className=\"space-y-4\">\n <CraftInput\n type=\"search\"\n placeholder={placeholder}\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n />\n <div className=\"space-y-2\">\n {filtered.length === 0 && (\n <div className=\"rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.12)] p-4 text-sm text-[rgb(var(--nc-fg-muted))]\">\n {emptyText}\n </div>\n )}\n {filtered.map((item) => (\n <button\n key={item.id}\n type=\"button\"\n disabled={item.disabled}\n onClick={() => {\n if (item.disabled) return;\n item.onSelect?.();\n setOpen(false);\n }}\n className={cn(\n \"flex w-full items-start gap-3 rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.08)] px-4 py-3 text-left transition\",\n item.disabled\n ? \"cursor-not-allowed opacity-60\"\n : \"hover:bg-[rgb(var(--nc-surface)/0.16)]\"\n )}\n >\n {item.icon && <span className=\"mt-1\">{item.icon}</span>}\n <span>\n <span className=\"block text-sm font-semibold\">{item.label}</span>\n {item.description && (\n <span className=\"block text-xs text-[rgb(var(--nc-fg-muted))]\">\n {item.description}\n </span>\n )}\n </span>\n </button>\n ))}\n </div>\n </div>\n </CraftModal>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAsFQ;AApFR,YAAuB;AAEvB,gBAAmB;AAEnB,yBAA2B;AAC3B,yBAA2B;AAyBpB,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,YAAY;AAAA,EACZ;AAAA,EACA;AACF,GAA6B;AAC3B,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,MAAM,SAAS,WAAW;AAC1E,QAAM,eAAe,OAAO,SAAS;AACrC,QAAM,SAAS,eAAe,OAAO;AACrC,QAAM,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,EAAE;AAE3C,QAAM,UAAU,MAAM;AAAA,IACpB,CAAC,SAAkB;AACjB,UAAI,CAAC,aAAc,qBAAoB,IAAI;AAC3C,mDAAe;AAAA,IACjB;AAAA,IACA,CAAC,cAAc,YAAY;AAAA,EAC7B;AAEA,QAAM,WAAW,MAAM,QAAQ,MAAM;AACnC,UAAM,IAAI,MAAM,KAAK,EAAE,YAAY;AACnC,QAAI,CAAC,EAAG,QAAO;AACf,WAAO,MAAM,OAAO,CAAC,SAAS;AA5DlC;AA6DM,YAAM,WAAW;AAAA,QACf,KAAK;AAAA,SACL,UAAK,gBAAL,YAAoB;AAAA,QACpB,IAAI,UAAK,aAAL,YAAiB,CAAC;AAAA,MACxB,EACG,KAAK,GAAG,EACR,YAAY;AACf,aAAO,SAAS,SAAS,CAAC;AAAA,IAC5B,CAAC;AAAA,EACH,GAAG,CAAC,OAAO,KAAK,CAAC;AAEjB,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,OAAQ,UAAS,EAAE;AAAA,EAC1B,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA,eAAW,cAAG,YAAY,SAAS;AAAA,MAEnC,uDAAC,SAAI,WAAU,aACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL;AAAA,YACA,OAAO;AAAA,YACP,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,KAAK;AAAA;AAAA,QAClD;AAAA,QACA,6CAAC,SAAI,WAAU,aACZ;AAAA,mBAAS,WAAW,KACnB,4CAAC,SAAI,WAAU,sIACZ,qBACH;AAAA,UAED,SAAS,IAAI,CAAC,SACb;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,UAAU,KAAK;AAAA,cACf,SAAS,MAAM;AAvG7B;AAwGgB,oBAAI,KAAK,SAAU;AACnB,2BAAK,aAAL;AACA,wBAAQ,KAAK;AAAA,cACf;AAAA,cACA,eAAW;AAAA,gBACT;AAAA,gBACA,KAAK,WACD,kCACA;AAAA,cACN;AAAA,cAEC;AAAA,qBAAK,QAAQ,4CAAC,UAAK,WAAU,QAAQ,eAAK,MAAK;AAAA,gBAChD,6CAAC,UACC;AAAA,8DAAC,UAAK,WAAU,+BAA+B,eAAK,OAAM;AAAA,kBACzD,KAAK,eACJ,4CAAC,UAAK,WAAU,gDACb,eAAK,aACR;AAAA,mBAEJ;AAAA;AAAA;AAAA,YAvBK,KAAK;AAAA,UAwBZ,CACD;AAAA,WACH;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ThemeName } from '../theme/theme-context.cjs';
|
|
4
|
+
|
|
5
|
+
type CraftCommandItem = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
keywords?: string[];
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
onSelect?: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type CraftCommandPaletteProps = {
|
|
15
|
+
items: CraftCommandItem[];
|
|
16
|
+
open?: boolean;
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
onOpenChange?: (open: boolean) => void;
|
|
19
|
+
trigger?: React.ReactNode;
|
|
20
|
+
title?: React.ReactNode;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
emptyText?: React.ReactNode;
|
|
23
|
+
tone?: ThemeName;
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
declare function CraftCommandPalette({ items, open, defaultOpen, onOpenChange, trigger, title, placeholder, emptyText, tone, className, }: CraftCommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { type CraftCommandItem, CraftCommandPalette, type CraftCommandPaletteProps };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { ThemeName } from '../theme/theme-context.js';
|
|
4
|
+
|
|
5
|
+
type CraftCommandItem = {
|
|
6
|
+
id: string;
|
|
7
|
+
label: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
keywords?: string[];
|
|
10
|
+
icon?: React.ReactNode;
|
|
11
|
+
onSelect?: () => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type CraftCommandPaletteProps = {
|
|
15
|
+
items: CraftCommandItem[];
|
|
16
|
+
open?: boolean;
|
|
17
|
+
defaultOpen?: boolean;
|
|
18
|
+
onOpenChange?: (open: boolean) => void;
|
|
19
|
+
trigger?: React.ReactNode;
|
|
20
|
+
title?: React.ReactNode;
|
|
21
|
+
placeholder?: string;
|
|
22
|
+
emptyText?: React.ReactNode;
|
|
23
|
+
tone?: ThemeName;
|
|
24
|
+
className?: string;
|
|
25
|
+
};
|
|
26
|
+
declare function CraftCommandPalette({ items, open, defaultOpen, onOpenChange, trigger, title, placeholder, emptyText, tone, className, }: CraftCommandPaletteProps): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { type CraftCommandItem, CraftCommandPalette, type CraftCommandPaletteProps };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "../utils/cn";
|
|
5
|
+
import { CraftInput } from "../components/craft-input";
|
|
6
|
+
import { CraftModal } from "../components/craft-modal";
|
|
7
|
+
function CraftCommandPalette({
|
|
8
|
+
items,
|
|
9
|
+
open,
|
|
10
|
+
defaultOpen = false,
|
|
11
|
+
onOpenChange,
|
|
12
|
+
trigger,
|
|
13
|
+
title = "Command Palette",
|
|
14
|
+
placeholder = "Search commands...",
|
|
15
|
+
emptyText = "No results found.",
|
|
16
|
+
tone,
|
|
17
|
+
className
|
|
18
|
+
}) {
|
|
19
|
+
const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);
|
|
20
|
+
const isControlled = typeof open === "boolean";
|
|
21
|
+
const isOpen = isControlled ? open : uncontrolledOpen;
|
|
22
|
+
const [query, setQuery] = React.useState("");
|
|
23
|
+
const setOpen = React.useCallback(
|
|
24
|
+
(next) => {
|
|
25
|
+
if (!isControlled) setUncontrolledOpen(next);
|
|
26
|
+
onOpenChange == null ? void 0 : onOpenChange(next);
|
|
27
|
+
},
|
|
28
|
+
[isControlled, onOpenChange]
|
|
29
|
+
);
|
|
30
|
+
const filtered = React.useMemo(() => {
|
|
31
|
+
const q = query.trim().toLowerCase();
|
|
32
|
+
if (!q) return items;
|
|
33
|
+
return items.filter((item) => {
|
|
34
|
+
var _a, _b;
|
|
35
|
+
const haystack = [
|
|
36
|
+
item.label,
|
|
37
|
+
(_a = item.description) != null ? _a : "",
|
|
38
|
+
...(_b = item.keywords) != null ? _b : []
|
|
39
|
+
].join(" ").toLowerCase();
|
|
40
|
+
return haystack.includes(q);
|
|
41
|
+
});
|
|
42
|
+
}, [items, query]);
|
|
43
|
+
React.useEffect(() => {
|
|
44
|
+
if (!isOpen) setQuery("");
|
|
45
|
+
}, [isOpen]);
|
|
46
|
+
return /* @__PURE__ */ jsx(
|
|
47
|
+
CraftModal,
|
|
48
|
+
{
|
|
49
|
+
open: isOpen,
|
|
50
|
+
onOpenChange: setOpen,
|
|
51
|
+
trigger,
|
|
52
|
+
title,
|
|
53
|
+
tone,
|
|
54
|
+
className: cn("max-w-xl", className),
|
|
55
|
+
children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
56
|
+
/* @__PURE__ */ jsx(
|
|
57
|
+
CraftInput,
|
|
58
|
+
{
|
|
59
|
+
type: "search",
|
|
60
|
+
placeholder,
|
|
61
|
+
value: query,
|
|
62
|
+
onChange: (event) => setQuery(event.target.value)
|
|
63
|
+
}
|
|
64
|
+
),
|
|
65
|
+
/* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
66
|
+
filtered.length === 0 && /* @__PURE__ */ jsx("div", { className: "rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.12)] p-4 text-sm text-[rgb(var(--nc-fg-muted))]", children: emptyText }),
|
|
67
|
+
filtered.map((item) => /* @__PURE__ */ jsxs(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
type: "button",
|
|
71
|
+
disabled: item.disabled,
|
|
72
|
+
onClick: () => {
|
|
73
|
+
var _a;
|
|
74
|
+
if (item.disabled) return;
|
|
75
|
+
(_a = item.onSelect) == null ? void 0 : _a.call(item);
|
|
76
|
+
setOpen(false);
|
|
77
|
+
},
|
|
78
|
+
className: cn(
|
|
79
|
+
"flex w-full items-start gap-3 rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.08)] px-4 py-3 text-left transition",
|
|
80
|
+
item.disabled ? "cursor-not-allowed opacity-60" : "hover:bg-[rgb(var(--nc-surface)/0.16)]"
|
|
81
|
+
),
|
|
82
|
+
children: [
|
|
83
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mt-1", children: item.icon }),
|
|
84
|
+
/* @__PURE__ */ jsxs("span", { children: [
|
|
85
|
+
/* @__PURE__ */ jsx("span", { className: "block text-sm font-semibold", children: item.label }),
|
|
86
|
+
item.description && /* @__PURE__ */ jsx("span", { className: "block text-xs text-[rgb(var(--nc-fg-muted))]", children: item.description })
|
|
87
|
+
] })
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
item.id
|
|
91
|
+
))
|
|
92
|
+
] })
|
|
93
|
+
] })
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
export {
|
|
98
|
+
CraftCommandPalette
|
|
99
|
+
};
|
|
100
|
+
//# sourceMappingURL=craft-command-palette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-command-palette.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\nimport { CraftInput } from \"@/components/craft-input\";\nimport { CraftModal } from \"@/components/craft-modal\";\n\nexport type CraftCommandItem = {\n id: string;\n label: string;\n description?: string;\n keywords?: string[];\n icon?: React.ReactNode;\n onSelect?: () => void;\n disabled?: boolean;\n};\n\nexport type CraftCommandPaletteProps = {\n items: CraftCommandItem[];\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange?: (open: boolean) => void;\n trigger?: React.ReactNode;\n title?: React.ReactNode;\n placeholder?: string;\n emptyText?: React.ReactNode;\n tone?: ThemeName;\n className?: string;\n};\n\nexport function CraftCommandPalette({\n items,\n open,\n defaultOpen = false,\n onOpenChange,\n trigger,\n title = \"Command Palette\",\n placeholder = \"Search commands...\",\n emptyText = \"No results found.\",\n tone,\n className,\n}: CraftCommandPaletteProps) {\n const [uncontrolledOpen, setUncontrolledOpen] = React.useState(defaultOpen);\n const isControlled = typeof open === \"boolean\";\n const isOpen = isControlled ? open : uncontrolledOpen;\n const [query, setQuery] = React.useState(\"\");\n\n const setOpen = React.useCallback(\n (next: boolean) => {\n if (!isControlled) setUncontrolledOpen(next);\n onOpenChange?.(next);\n },\n [isControlled, onOpenChange]\n );\n\n const filtered = React.useMemo(() => {\n const q = query.trim().toLowerCase();\n if (!q) return items;\n return items.filter((item) => {\n const haystack = [\n item.label,\n item.description ?? \"\",\n ...(item.keywords ?? []),\n ]\n .join(\" \")\n .toLowerCase();\n return haystack.includes(q);\n });\n }, [items, query]);\n\n React.useEffect(() => {\n if (!isOpen) setQuery(\"\");\n }, [isOpen]);\n\n return (\n <CraftModal\n open={isOpen}\n onOpenChange={setOpen}\n trigger={trigger}\n title={title}\n tone={tone}\n className={cn(\"max-w-xl\", className)}\n >\n <div className=\"space-y-4\">\n <CraftInput\n type=\"search\"\n placeholder={placeholder}\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n />\n <div className=\"space-y-2\">\n {filtered.length === 0 && (\n <div className=\"rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.12)] p-4 text-sm text-[rgb(var(--nc-fg-muted))]\">\n {emptyText}\n </div>\n )}\n {filtered.map((item) => (\n <button\n key={item.id}\n type=\"button\"\n disabled={item.disabled}\n onClick={() => {\n if (item.disabled) return;\n item.onSelect?.();\n setOpen(false);\n }}\n className={cn(\n \"flex w-full items-start gap-3 rounded-2xl border border-[rgb(var(--nc-border)/0.35)] bg-[rgb(var(--nc-surface)/0.08)] px-4 py-3 text-left transition\",\n item.disabled\n ? \"cursor-not-allowed opacity-60\"\n : \"hover:bg-[rgb(var(--nc-surface)/0.16)]\"\n )}\n >\n {item.icon && <span className=\"mt-1\">{item.icon}</span>}\n <span>\n <span className=\"block text-sm font-semibold\">{item.label}</span>\n {item.description && (\n <span className=\"block text-xs text-[rgb(var(--nc-fg-muted))]\">\n {item.description}\n </span>\n )}\n </span>\n </button>\n ))}\n </div>\n </div>\n </CraftModal>\n );\n}\n"],"mappings":";AAsFQ,cA8BM,YA9BN;AApFR,YAAY,WAAW;AAEvB,SAAS,UAAU;AAEnB,SAAS,kBAAkB;AAC3B,SAAS,kBAAkB;AAyBpB,SAAS,oBAAoB;AAAA,EAClC;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd;AAAA,EACA;AAAA,EACA,QAAQ;AAAA,EACR,cAAc;AAAA,EACd,YAAY;AAAA,EACZ;AAAA,EACA;AACF,GAA6B;AAC3B,QAAM,CAAC,kBAAkB,mBAAmB,IAAI,MAAM,SAAS,WAAW;AAC1E,QAAM,eAAe,OAAO,SAAS;AACrC,QAAM,SAAS,eAAe,OAAO;AACrC,QAAM,CAAC,OAAO,QAAQ,IAAI,MAAM,SAAS,EAAE;AAE3C,QAAM,UAAU,MAAM;AAAA,IACpB,CAAC,SAAkB;AACjB,UAAI,CAAC,aAAc,qBAAoB,IAAI;AAC3C,mDAAe;AAAA,IACjB;AAAA,IACA,CAAC,cAAc,YAAY;AAAA,EAC7B;AAEA,QAAM,WAAW,MAAM,QAAQ,MAAM;AACnC,UAAM,IAAI,MAAM,KAAK,EAAE,YAAY;AACnC,QAAI,CAAC,EAAG,QAAO;AACf,WAAO,MAAM,OAAO,CAAC,SAAS;AA5DlC;AA6DM,YAAM,WAAW;AAAA,QACf,KAAK;AAAA,SACL,UAAK,gBAAL,YAAoB;AAAA,QACpB,IAAI,UAAK,aAAL,YAAiB,CAAC;AAAA,MACxB,EACG,KAAK,GAAG,EACR,YAAY;AACf,aAAO,SAAS,SAAS,CAAC;AAAA,IAC5B,CAAC;AAAA,EACH,GAAG,CAAC,OAAO,KAAK,CAAC;AAEjB,QAAM,UAAU,MAAM;AACpB,QAAI,CAAC,OAAQ,UAAS,EAAE;AAAA,EAC1B,GAAG,CAAC,MAAM,CAAC;AAEX,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,cAAc;AAAA,MACd;AAAA,MACA;AAAA,MACA;AAAA,MACA,WAAW,GAAG,YAAY,SAAS;AAAA,MAEnC,+BAAC,SAAI,WAAU,aACb;AAAA;AAAA,UAAC;AAAA;AAAA,YACC,MAAK;AAAA,YACL;AAAA,YACA,OAAO;AAAA,YACP,UAAU,CAAC,UAAU,SAAS,MAAM,OAAO,KAAK;AAAA;AAAA,QAClD;AAAA,QACA,qBAAC,SAAI,WAAU,aACZ;AAAA,mBAAS,WAAW,KACnB,oBAAC,SAAI,WAAU,sIACZ,qBACH;AAAA,UAED,SAAS,IAAI,CAAC,SACb;AAAA,YAAC;AAAA;AAAA,cAEC,MAAK;AAAA,cACL,UAAU,KAAK;AAAA,cACf,SAAS,MAAM;AAvG7B;AAwGgB,oBAAI,KAAK,SAAU;AACnB,2BAAK,aAAL;AACA,wBAAQ,KAAK;AAAA,cACf;AAAA,cACA,WAAW;AAAA,gBACT;AAAA,gBACA,KAAK,WACD,kCACA;AAAA,cACN;AAAA,cAEC;AAAA,qBAAK,QAAQ,oBAAC,UAAK,WAAU,QAAQ,eAAK,MAAK;AAAA,gBAChD,qBAAC,UACC;AAAA,sCAAC,UAAK,WAAU,+BAA+B,eAAK,OAAM;AAAA,kBACzD,KAAK,eACJ,oBAAC,UAAK,WAAU,gDACb,eAAK,aACR;AAAA,mBAEJ;AAAA;AAAA;AAAA,YAvBK,KAAK;AAAA,UAwBZ,CACD;AAAA,WACH;AAAA,SACF;AAAA;AAAA,EACF;AAEJ;","names":[]}
|