@jameskabz/nextcraft-ui 0.6.4 → 0.6.5
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/forms/types.cjs +17 -0
- package/dist/components/forms/types.cjs.map +1 -0
- package/dist/components/forms/types.d.cts +7 -0
- package/dist/components/forms/types.d.ts +7 -0
- package/dist/components/forms/types.js +1 -0
- package/dist/components/forms/types.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/layout/types.cjs +29 -0
- package/dist/components/layout/types.cjs.map +1 -0
- package/dist/components/layout/types.d.cts +12 -0
- package/dist/components/layout/types.d.ts +12 -0
- package/dist/components/layout/types.js +5 -0
- package/dist/components/layout/types.js.map +1 -0
- package/dist/components/table/types.cjs +17 -0
- package/dist/components/table/types.cjs.map +1 -0
- package/dist/components/table/types.d.cts +7 -0
- package/dist/components/table/types.d.ts +7 -0
- package/dist/components/table/types.js +1 -0
- package/dist/components/table/types.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/craft/components.d.cts +36 -369
- package/dist/craft/components.d.ts +36 -369
- package/dist/craft/forms.d.cts +7 -101
- package/dist/craft/forms.d.ts +7 -101
- package/dist/craft/layout.d.cts +12 -170
- package/dist/craft/layout.d.ts +12 -170
- package/dist/craft/table.d.cts +7 -99
- package/dist/craft/table.d.ts +7 -99
- package/dist/craft/theme.d.cts +3 -9
- package/dist/craft/theme.d.ts +3 -9
- package/dist/index.d.cts +50 -6
- package/dist/index.d.ts +50 -6
- package/dist/styles.css +31 -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 +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
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_textarea_exports = {};
|
|
30
|
+
__export(craft_textarea_exports, {
|
|
31
|
+
CraftTextarea: () => CraftTextarea
|
|
32
|
+
});
|
|
33
|
+
module.exports = __toCommonJS(craft_textarea_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 CraftTextarea = React.forwardRef(
|
|
38
|
+
({ className, tone, rows = 4, ...props }, ref) => {
|
|
39
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "relative w-full", "data-nc-theme": tone, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
40
|
+
"textarea",
|
|
41
|
+
{
|
|
42
|
+
ref,
|
|
43
|
+
rows,
|
|
44
|
+
className: (0, import_cn.cn)(
|
|
45
|
+
"w-full rounded-2xl border-2 bg-[rgb(var(--nc-surface)/0.08)] text-[rgb(var(--nc-fg))] backdrop-blur-xl",
|
|
46
|
+
"shadow-[inset_0_2px_8px_rgba(0,0,0,0.3)]",
|
|
47
|
+
"focus:outline-none focus:ring-4",
|
|
48
|
+
"transition-all duration-300",
|
|
49
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
50
|
+
"border-[rgb(var(--nc-border)/0.35)]",
|
|
51
|
+
"focus:border-[rgb(var(--nc-accent-1)/0.8)] focus:ring-[rgb(var(--nc-accent-1)/0.3)]",
|
|
52
|
+
"placeholder:text-[rgb(var(--nc-fg-soft))]",
|
|
53
|
+
"px-5 py-3 text-base",
|
|
54
|
+
className
|
|
55
|
+
),
|
|
56
|
+
style: {
|
|
57
|
+
"--glow-color": "rgb(var(--nc-accent-1) / 0.5)"
|
|
58
|
+
},
|
|
59
|
+
...props
|
|
60
|
+
}
|
|
61
|
+
) });
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
CraftTextarea.displayName = "CraftTextarea";
|
|
65
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
66
|
+
0 && (module.exports = {
|
|
67
|
+
CraftTextarea
|
|
68
|
+
});
|
|
69
|
+
//# sourceMappingURL=craft-textarea.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-textarea.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftTextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {\n tone?: ThemeName;\n};\n\nexport const CraftTextarea = React.forwardRef<HTMLTextAreaElement, CraftTextareaProps>(\n ({ className, tone, rows = 4, ...props }, ref) => {\n return (\n <div className=\"relative w-full\" data-nc-theme={tone}>\n <textarea\n ref={ref}\n rows={rows}\n className={cn(\n \"w-full rounded-2xl border-2 bg-[rgb(var(--nc-surface)/0.08)] text-[rgb(var(--nc-fg))] backdrop-blur-xl\",\n \"shadow-[inset_0_2px_8px_rgba(0,0,0,0.3)]\",\n \"focus:outline-none focus:ring-4\",\n \"transition-all duration-300\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n \"border-[rgb(var(--nc-border)/0.35)]\",\n \"focus:border-[rgb(var(--nc-accent-1)/0.8)] focus:ring-[rgb(var(--nc-accent-1)/0.3)]\",\n \"placeholder:text-[rgb(var(--nc-fg-soft))]\",\n \"px-5 py-3 text-base\",\n className\n )}\n style={{\n \"--glow-color\": \"rgb(var(--nc-accent-1) / 0.5)\",\n } as React.CSSProperties}\n {...props}\n />\n </div>\n );\n }\n);\n\nCraftTextarea.displayName = \"CraftTextarea\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAaQ;AAbR,YAAuB;AAEvB,gBAAmB;AAOZ,MAAM,gBAAgB,MAAM;AAAA,EACjC,CAAC,EAAE,WAAW,MAAM,OAAO,GAAG,GAAG,MAAM,GAAG,QAAQ;AAChD,WACE,4CAAC,SAAI,WAAU,mBAAkB,iBAAe,MAC9C;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,eAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,UACL,gBAAgB;AAAA,QAClB;AAAA,QACC,GAAG;AAAA;AAAA,IACN,GACF;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { a as ThemeName } from '../theme-context-EVI9PfKv.cjs';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
type CraftTextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
6
|
+
tone?: ThemeName;
|
|
7
|
+
};
|
|
8
|
+
declare const CraftTextarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
9
|
+
tone?: ThemeName;
|
|
10
|
+
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
11
|
+
|
|
12
|
+
export { CraftTextarea, type CraftTextareaProps };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { a as ThemeName } from '../theme-context-EVI9PfKv.js';
|
|
3
|
+
import 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
type CraftTextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
6
|
+
tone?: ThemeName;
|
|
7
|
+
};
|
|
8
|
+
declare const CraftTextarea: React.ForwardRefExoticComponent<React.TextareaHTMLAttributes<HTMLTextAreaElement> & {
|
|
9
|
+
tone?: ThemeName;
|
|
10
|
+
} & React.RefAttributes<HTMLTextAreaElement>>;
|
|
11
|
+
|
|
12
|
+
export { CraftTextarea, type CraftTextareaProps };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { cn } from "@/utils/cn";
|
|
4
|
+
const CraftTextarea = React.forwardRef(
|
|
5
|
+
({ className, tone, rows = 4, ...props }, ref) => {
|
|
6
|
+
return /* @__PURE__ */ jsx("div", { className: "relative w-full", "data-nc-theme": tone, children: /* @__PURE__ */ jsx(
|
|
7
|
+
"textarea",
|
|
8
|
+
{
|
|
9
|
+
ref,
|
|
10
|
+
rows,
|
|
11
|
+
className: cn(
|
|
12
|
+
"w-full rounded-2xl border-2 bg-[rgb(var(--nc-surface)/0.08)] text-[rgb(var(--nc-fg))] backdrop-blur-xl",
|
|
13
|
+
"shadow-[inset_0_2px_8px_rgba(0,0,0,0.3)]",
|
|
14
|
+
"focus:outline-none focus:ring-4",
|
|
15
|
+
"transition-all duration-300",
|
|
16
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
17
|
+
"border-[rgb(var(--nc-border)/0.35)]",
|
|
18
|
+
"focus:border-[rgb(var(--nc-accent-1)/0.8)] focus:ring-[rgb(var(--nc-accent-1)/0.3)]",
|
|
19
|
+
"placeholder:text-[rgb(var(--nc-fg-soft))]",
|
|
20
|
+
"px-5 py-3 text-base",
|
|
21
|
+
className
|
|
22
|
+
),
|
|
23
|
+
style: {
|
|
24
|
+
"--glow-color": "rgb(var(--nc-accent-1) / 0.5)"
|
|
25
|
+
},
|
|
26
|
+
...props
|
|
27
|
+
}
|
|
28
|
+
) });
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
CraftTextarea.displayName = "CraftTextarea";
|
|
32
|
+
export {
|
|
33
|
+
CraftTextarea
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=craft-textarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-textarea.tsx"],"sourcesContent":["import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftTextareaProps = React.TextareaHTMLAttributes<HTMLTextAreaElement> & {\n tone?: ThemeName;\n};\n\nexport const CraftTextarea = React.forwardRef<HTMLTextAreaElement, CraftTextareaProps>(\n ({ className, tone, rows = 4, ...props }, ref) => {\n return (\n <div className=\"relative w-full\" data-nc-theme={tone}>\n <textarea\n ref={ref}\n rows={rows}\n className={cn(\n \"w-full rounded-2xl border-2 bg-[rgb(var(--nc-surface)/0.08)] text-[rgb(var(--nc-fg))] backdrop-blur-xl\",\n \"shadow-[inset_0_2px_8px_rgba(0,0,0,0.3)]\",\n \"focus:outline-none focus:ring-4\",\n \"transition-all duration-300\",\n \"disabled:opacity-50 disabled:cursor-not-allowed\",\n \"border-[rgb(var(--nc-border)/0.35)]\",\n \"focus:border-[rgb(var(--nc-accent-1)/0.8)] focus:ring-[rgb(var(--nc-accent-1)/0.3)]\",\n \"placeholder:text-[rgb(var(--nc-fg-soft))]\",\n \"px-5 py-3 text-base\",\n className\n )}\n style={{\n \"--glow-color\": \"rgb(var(--nc-accent-1) / 0.5)\",\n } as React.CSSProperties}\n {...props}\n />\n </div>\n );\n }\n);\n\nCraftTextarea.displayName = \"CraftTextarea\";\n"],"mappings":"AAaQ;AAbR,YAAY,WAAW;AAEvB,SAAS,UAAU;AAOZ,MAAM,gBAAgB,MAAM;AAAA,EACjC,CAAC,EAAE,WAAW,MAAM,OAAO,GAAG,GAAG,MAAM,GAAG,QAAQ;AAChD,WACE,oBAAC,SAAI,WAAU,mBAAkB,iBAAe,MAC9C;AAAA,MAAC;AAAA;AAAA,QACC;AAAA,QACA;AAAA,QACA,WAAW;AAAA,UACT;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,UACA;AAAA,QACF;AAAA,QACA,OAAO;AAAA,UACL,gBAAgB;AAAA,QAClB;AAAA,QACC,GAAG;AAAA;AAAA,IACN,GACF;AAAA,EAEJ;AACF;AAEA,cAAc,cAAc;","names":[]}
|
|
@@ -0,0 +1,98 @@
|
|
|
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_toast_exports = {};
|
|
31
|
+
__export(craft_toast_exports, {
|
|
32
|
+
CraftToastHost: () => CraftToastHost,
|
|
33
|
+
useCraftToast: () => useCraftToast
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(craft_toast_exports);
|
|
36
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
37
|
+
var React = __toESM(require("react"), 1);
|
|
38
|
+
var import_cn = require("@/utils/cn");
|
|
39
|
+
const variantClasses = {
|
|
40
|
+
info: "border-[color:rgb(var(--nc-accent-1)/0.4)]",
|
|
41
|
+
success: "border-emerald-400/40",
|
|
42
|
+
warning: "border-amber-400/40",
|
|
43
|
+
error: "border-rose-400/40"
|
|
44
|
+
};
|
|
45
|
+
function useCraftToast() {
|
|
46
|
+
const [toasts, setToasts] = React.useState([]);
|
|
47
|
+
const push = React.useCallback((toast) => {
|
|
48
|
+
const id = `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
49
|
+
setToasts((prev) => [...prev, { ...toast, id }]);
|
|
50
|
+
return id;
|
|
51
|
+
}, []);
|
|
52
|
+
const remove = React.useCallback((id) => {
|
|
53
|
+
setToasts((prev) => prev.filter((toast) => toast.id !== id));
|
|
54
|
+
}, []);
|
|
55
|
+
return { toasts, push, remove };
|
|
56
|
+
}
|
|
57
|
+
function CraftToastHost({ toasts, onDismiss, tone }) {
|
|
58
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
59
|
+
"div",
|
|
60
|
+
{
|
|
61
|
+
className: "fixed right-6 top-6 z-50 flex w-full max-w-sm flex-col gap-3",
|
|
62
|
+
"data-nc-theme": tone,
|
|
63
|
+
children: toasts.map((toast) => {
|
|
64
|
+
var _a;
|
|
65
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
className: (0, import_cn.cn)(
|
|
69
|
+
"rounded-2xl border bg-[rgb(var(--nc-surface)/0.12)] p-4 text-[rgb(var(--nc-fg))] shadow-[0_15px_35px_rgba(0,0,0,0.35)] backdrop-blur-xl",
|
|
70
|
+
variantClasses[(_a = toast.variant) != null ? _a : "info"]
|
|
71
|
+
),
|
|
72
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex items-start justify-between gap-4", children: [
|
|
73
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
|
|
74
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-sm font-semibold", children: toast.title }),
|
|
75
|
+
toast.description && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("p", { className: "text-xs text-[rgb(var(--nc-fg-muted))]", children: toast.description })
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
78
|
+
"button",
|
|
79
|
+
{
|
|
80
|
+
className: "text-[rgb(var(--nc-fg-soft))] hover:text-[rgb(var(--nc-fg))]",
|
|
81
|
+
onClick: () => onDismiss(toast.id),
|
|
82
|
+
children: "\u2715"
|
|
83
|
+
}
|
|
84
|
+
)
|
|
85
|
+
] })
|
|
86
|
+
},
|
|
87
|
+
toast.id
|
|
88
|
+
);
|
|
89
|
+
})
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
94
|
+
0 && (module.exports = {
|
|
95
|
+
CraftToastHost,
|
|
96
|
+
useCraftToast
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=craft-toast.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-toast.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftToastVariant = \"info\" | \"success\" | \"warning\" | \"error\";\n\nexport type CraftToast = {\n id: string;\n title: string;\n description?: string;\n variant?: CraftToastVariant;\n};\n\nconst variantClasses: Record<CraftToastVariant, string> = {\n info: \"border-[color:rgb(var(--nc-accent-1)/0.4)]\",\n success: \"border-emerald-400/40\",\n warning: \"border-amber-400/40\",\n error: \"border-rose-400/40\",\n};\n\nexport function useCraftToast() {\n const [toasts, setToasts] = React.useState<CraftToast[]>([]);\n\n const push = React.useCallback((toast: Omit<CraftToast, \"id\">) => {\n const id = `${Date.now()}-${Math.random().toString(16).slice(2)}`;\n setToasts((prev) => [...prev, { ...toast, id }]);\n return id;\n }, []);\n\n const remove = React.useCallback((id: string) => {\n setToasts((prev) => prev.filter((toast) => toast.id !== id));\n }, []);\n\n return { toasts, push, remove };\n}\n\nexport type CraftToastHostProps = {\n toasts: CraftToast[];\n onDismiss: (id: string) => void;\n tone?: ThemeName;\n};\n\nexport function CraftToastHost({ toasts, onDismiss, tone }: CraftToastHostProps) {\n return (\n <div\n className=\"fixed right-6 top-6 z-50 flex w-full max-w-sm flex-col gap-3\"\n data-nc-theme={tone}\n >\n {toasts.map((toast) => (\n <div\n key={toast.id}\n className={cn(\n \"rounded-2xl border bg-[rgb(var(--nc-surface)/0.12)] p-4 text-[rgb(var(--nc-fg))] shadow-[0_15px_35px_rgba(0,0,0,0.35)] backdrop-blur-xl\",\n variantClasses[toast.variant ?? \"info\"]\n )}\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div>\n <p className=\"text-sm font-semibold\">{toast.title}</p>\n {toast.description && (\n <p className=\"text-xs text-[rgb(var(--nc-fg-muted))]\">{toast.description}</p>\n )}\n </div>\n <button\n className=\"text-[rgb(var(--nc-fg-soft))] hover:text-[rgb(var(--nc-fg))]\"\n onClick={() => onDismiss(toast.id)}\n >\n ✕\n </button>\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AA4DY;AA1DZ,YAAuB;AAEvB,gBAAmB;AAYnB,MAAM,iBAAoD;AAAA,EACxD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT;AAEO,SAAS,gBAAgB;AAC9B,QAAM,CAAC,QAAQ,SAAS,IAAI,MAAM,SAAuB,CAAC,CAAC;AAE3D,QAAM,OAAO,MAAM,YAAY,CAAC,UAAkC;AAChE,UAAM,KAAK,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAC/D,cAAU,CAAC,SAAS,CAAC,GAAG,MAAM,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC;AAC/C,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AAEL,QAAM,SAAS,MAAM,YAAY,CAAC,OAAe;AAC/C,cAAU,CAAC,SAAS,KAAK,OAAO,CAAC,UAAU,MAAM,OAAO,EAAE,CAAC;AAAA,EAC7D,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,QAAQ,MAAM,OAAO;AAChC;AAQO,SAAS,eAAe,EAAE,QAAQ,WAAW,KAAK,GAAwB;AAC/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,iBAAe;AAAA,MAEd,iBAAO,IAAI,CAAC,UAAO;AAnD1B;AAoDQ;AAAA,UAAC;AAAA;AAAA,YAEC,eAAW;AAAA,cACT;AAAA,cACA,gBAAe,WAAM,YAAN,YAAiB,MAAM;AAAA,YACxC;AAAA,YAEA,uDAAC,SAAI,WAAU,0CACb;AAAA,2DAAC,SACC;AAAA,4DAAC,OAAE,WAAU,yBAAyB,gBAAM,OAAM;AAAA,gBACjD,MAAM,eACL,4CAAC,OAAE,WAAU,0CAA0C,gBAAM,aAAY;AAAA,iBAE7E;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,SAAS,MAAM,UAAU,MAAM,EAAE;AAAA,kBAClC;AAAA;AAAA,cAED;AAAA,eACF;AAAA;AAAA,UAnBK,MAAM;AAAA,QAoBb;AAAA,OACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { a as ThemeName } from '../theme-context-EVI9PfKv.cjs';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
type CraftToastVariant = "info" | "success" | "warning" | "error";
|
|
6
|
+
type CraftToast = {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
variant?: CraftToastVariant;
|
|
11
|
+
};
|
|
12
|
+
declare function useCraftToast(): {
|
|
13
|
+
toasts: CraftToast[];
|
|
14
|
+
push: (toast: Omit<CraftToast, "id">) => string;
|
|
15
|
+
remove: (id: string) => void;
|
|
16
|
+
};
|
|
17
|
+
type CraftToastHostProps = {
|
|
18
|
+
toasts: CraftToast[];
|
|
19
|
+
onDismiss: (id: string) => void;
|
|
20
|
+
tone?: ThemeName;
|
|
21
|
+
};
|
|
22
|
+
declare function CraftToastHost({ toasts, onDismiss, tone }: CraftToastHostProps): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { type CraftToast, CraftToastHost, type CraftToastHostProps, type CraftToastVariant, useCraftToast };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { a as ThemeName } from '../theme-context-EVI9PfKv.js';
|
|
3
|
+
import 'react';
|
|
4
|
+
|
|
5
|
+
type CraftToastVariant = "info" | "success" | "warning" | "error";
|
|
6
|
+
type CraftToast = {
|
|
7
|
+
id: string;
|
|
8
|
+
title: string;
|
|
9
|
+
description?: string;
|
|
10
|
+
variant?: CraftToastVariant;
|
|
11
|
+
};
|
|
12
|
+
declare function useCraftToast(): {
|
|
13
|
+
toasts: CraftToast[];
|
|
14
|
+
push: (toast: Omit<CraftToast, "id">) => string;
|
|
15
|
+
remove: (id: string) => void;
|
|
16
|
+
};
|
|
17
|
+
type CraftToastHostProps = {
|
|
18
|
+
toasts: CraftToast[];
|
|
19
|
+
onDismiss: (id: string) => void;
|
|
20
|
+
tone?: ThemeName;
|
|
21
|
+
};
|
|
22
|
+
declare function CraftToastHost({ toasts, onDismiss, tone }: CraftToastHostProps): react_jsx_runtime.JSX.Element;
|
|
23
|
+
|
|
24
|
+
export { type CraftToast, CraftToastHost, type CraftToastHostProps, type CraftToastVariant, useCraftToast };
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "@/utils/cn";
|
|
5
|
+
const variantClasses = {
|
|
6
|
+
info: "border-[color:rgb(var(--nc-accent-1)/0.4)]",
|
|
7
|
+
success: "border-emerald-400/40",
|
|
8
|
+
warning: "border-amber-400/40",
|
|
9
|
+
error: "border-rose-400/40"
|
|
10
|
+
};
|
|
11
|
+
function useCraftToast() {
|
|
12
|
+
const [toasts, setToasts] = React.useState([]);
|
|
13
|
+
const push = React.useCallback((toast) => {
|
|
14
|
+
const id = `${Date.now()}-${Math.random().toString(16).slice(2)}`;
|
|
15
|
+
setToasts((prev) => [...prev, { ...toast, id }]);
|
|
16
|
+
return id;
|
|
17
|
+
}, []);
|
|
18
|
+
const remove = React.useCallback((id) => {
|
|
19
|
+
setToasts((prev) => prev.filter((toast) => toast.id !== id));
|
|
20
|
+
}, []);
|
|
21
|
+
return { toasts, push, remove };
|
|
22
|
+
}
|
|
23
|
+
function CraftToastHost({ toasts, onDismiss, tone }) {
|
|
24
|
+
return /* @__PURE__ */ jsx(
|
|
25
|
+
"div",
|
|
26
|
+
{
|
|
27
|
+
className: "fixed right-6 top-6 z-50 flex w-full max-w-sm flex-col gap-3",
|
|
28
|
+
"data-nc-theme": tone,
|
|
29
|
+
children: toasts.map((toast) => {
|
|
30
|
+
var _a;
|
|
31
|
+
return /* @__PURE__ */ jsx(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
className: cn(
|
|
35
|
+
"rounded-2xl border bg-[rgb(var(--nc-surface)/0.12)] p-4 text-[rgb(var(--nc-fg))] shadow-[0_15px_35px_rgba(0,0,0,0.35)] backdrop-blur-xl",
|
|
36
|
+
variantClasses[(_a = toast.variant) != null ? _a : "info"]
|
|
37
|
+
),
|
|
38
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex items-start justify-between gap-4", children: [
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
40
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold", children: toast.title }),
|
|
41
|
+
toast.description && /* @__PURE__ */ jsx("p", { className: "text-xs text-[rgb(var(--nc-fg-muted))]", children: toast.description })
|
|
42
|
+
] }),
|
|
43
|
+
/* @__PURE__ */ jsx(
|
|
44
|
+
"button",
|
|
45
|
+
{
|
|
46
|
+
className: "text-[rgb(var(--nc-fg-soft))] hover:text-[rgb(var(--nc-fg))]",
|
|
47
|
+
onClick: () => onDismiss(toast.id),
|
|
48
|
+
children: "\u2715"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] })
|
|
52
|
+
},
|
|
53
|
+
toast.id
|
|
54
|
+
);
|
|
55
|
+
})
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
export {
|
|
60
|
+
CraftToastHost,
|
|
61
|
+
useCraftToast
|
|
62
|
+
};
|
|
63
|
+
//# sourceMappingURL=craft-toast.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-toast.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftToastVariant = \"info\" | \"success\" | \"warning\" | \"error\";\n\nexport type CraftToast = {\n id: string;\n title: string;\n description?: string;\n variant?: CraftToastVariant;\n};\n\nconst variantClasses: Record<CraftToastVariant, string> = {\n info: \"border-[color:rgb(var(--nc-accent-1)/0.4)]\",\n success: \"border-emerald-400/40\",\n warning: \"border-amber-400/40\",\n error: \"border-rose-400/40\",\n};\n\nexport function useCraftToast() {\n const [toasts, setToasts] = React.useState<CraftToast[]>([]);\n\n const push = React.useCallback((toast: Omit<CraftToast, \"id\">) => {\n const id = `${Date.now()}-${Math.random().toString(16).slice(2)}`;\n setToasts((prev) => [...prev, { ...toast, id }]);\n return id;\n }, []);\n\n const remove = React.useCallback((id: string) => {\n setToasts((prev) => prev.filter((toast) => toast.id !== id));\n }, []);\n\n return { toasts, push, remove };\n}\n\nexport type CraftToastHostProps = {\n toasts: CraftToast[];\n onDismiss: (id: string) => void;\n tone?: ThemeName;\n};\n\nexport function CraftToastHost({ toasts, onDismiss, tone }: CraftToastHostProps) {\n return (\n <div\n className=\"fixed right-6 top-6 z-50 flex w-full max-w-sm flex-col gap-3\"\n data-nc-theme={tone}\n >\n {toasts.map((toast) => (\n <div\n key={toast.id}\n className={cn(\n \"rounded-2xl border bg-[rgb(var(--nc-surface)/0.12)] p-4 text-[rgb(var(--nc-fg))] shadow-[0_15px_35px_rgba(0,0,0,0.35)] backdrop-blur-xl\",\n variantClasses[toast.variant ?? \"info\"]\n )}\n >\n <div className=\"flex items-start justify-between gap-4\">\n <div>\n <p className=\"text-sm font-semibold\">{toast.title}</p>\n {toast.description && (\n <p className=\"text-xs text-[rgb(var(--nc-fg-muted))]\">{toast.description}</p>\n )}\n </div>\n <button\n className=\"text-[rgb(var(--nc-fg-soft))] hover:text-[rgb(var(--nc-fg))]\"\n onClick={() => onDismiss(toast.id)}\n >\n ✕\n </button>\n </div>\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";AA4DY,SACE,KADF;AA1DZ,YAAY,WAAW;AAEvB,SAAS,UAAU;AAYnB,MAAM,iBAAoD;AAAA,EACxD,MAAM;AAAA,EACN,SAAS;AAAA,EACT,SAAS;AAAA,EACT,OAAO;AACT;AAEO,SAAS,gBAAgB;AAC9B,QAAM,CAAC,QAAQ,SAAS,IAAI,MAAM,SAAuB,CAAC,CAAC;AAE3D,QAAM,OAAO,MAAM,YAAY,CAAC,UAAkC;AAChE,UAAM,KAAK,GAAG,KAAK,IAAI,CAAC,IAAI,KAAK,OAAO,EAAE,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAC/D,cAAU,CAAC,SAAS,CAAC,GAAG,MAAM,EAAE,GAAG,OAAO,GAAG,CAAC,CAAC;AAC/C,WAAO;AAAA,EACT,GAAG,CAAC,CAAC;AAEL,QAAM,SAAS,MAAM,YAAY,CAAC,OAAe;AAC/C,cAAU,CAAC,SAAS,KAAK,OAAO,CAAC,UAAU,MAAM,OAAO,EAAE,CAAC;AAAA,EAC7D,GAAG,CAAC,CAAC;AAEL,SAAO,EAAE,QAAQ,MAAM,OAAO;AAChC;AAQO,SAAS,eAAe,EAAE,QAAQ,WAAW,KAAK,GAAwB;AAC/E,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,iBAAe;AAAA,MAEd,iBAAO,IAAI,CAAC,UAAO;AAnD1B;AAoDQ;AAAA,UAAC;AAAA;AAAA,YAEC,WAAW;AAAA,cACT;AAAA,cACA,gBAAe,WAAM,YAAN,YAAiB,MAAM;AAAA,YACxC;AAAA,YAEA,+BAAC,SAAI,WAAU,0CACb;AAAA,mCAAC,SACC;AAAA,oCAAC,OAAE,WAAU,yBAAyB,gBAAM,OAAM;AAAA,gBACjD,MAAM,eACL,oBAAC,OAAE,WAAU,0CAA0C,gBAAM,aAAY;AAAA,iBAE7E;AAAA,cACA;AAAA,gBAAC;AAAA;AAAA,kBACC,WAAU;AAAA,kBACV,SAAS,MAAM,UAAU,MAAM,EAAE;AAAA,kBAClC;AAAA;AAAA,cAED;AAAA,eACF;AAAA;AAAA,UAnBK,MAAM;AAAA,QAoBb;AAAA,OACD;AAAA;AAAA,EACH;AAEJ;","names":[]}
|
|
@@ -0,0 +1,75 @@
|
|
|
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_tooltip_exports = {};
|
|
31
|
+
__export(craft_tooltip_exports, {
|
|
32
|
+
CraftTooltip: () => CraftTooltip
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(craft_tooltip_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
|
+
function CraftTooltip({ content, tone, children, side = "top" }) {
|
|
39
|
+
const [open, setOpen] = React.useState(false);
|
|
40
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
|
|
41
|
+
"span",
|
|
42
|
+
{
|
|
43
|
+
className: "relative inline-flex",
|
|
44
|
+
onMouseEnter: () => setOpen(true),
|
|
45
|
+
onMouseLeave: () => setOpen(false),
|
|
46
|
+
onFocus: () => setOpen(true),
|
|
47
|
+
onBlur: () => setOpen(false),
|
|
48
|
+
children: [
|
|
49
|
+
children,
|
|
50
|
+
/* @__PURE__ */ (0, import_jsx_runtime.jsx)(
|
|
51
|
+
"span",
|
|
52
|
+
{
|
|
53
|
+
className: (0, import_cn.cn)(
|
|
54
|
+
"pointer-events-none absolute z-20 whitespace-nowrap rounded-lg border border-white/10 bg-black/80 px-3 py-2 text-xs text-white shadow-lg transition-all",
|
|
55
|
+
"backdrop-blur-xl",
|
|
56
|
+
open ? "opacity-100 translate-y-0" : "opacity-0 translate-y-1",
|
|
57
|
+
side === "top" && "bottom-full left-1/2 -translate-x-1/2 -translate-y-2",
|
|
58
|
+
side === "bottom" && "top-full left-1/2 -translate-x-1/2 translate-y-2",
|
|
59
|
+
side === "left" && "right-full top-1/2 -translate-y-1/2 -translate-x-2",
|
|
60
|
+
side === "right" && "left-full top-1/2 -translate-y-1/2 translate-x-2"
|
|
61
|
+
),
|
|
62
|
+
"data-nc-theme": tone,
|
|
63
|
+
role: "tooltip",
|
|
64
|
+
children: content
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
72
|
+
0 && (module.exports = {
|
|
73
|
+
CraftTooltip
|
|
74
|
+
});
|
|
75
|
+
//# sourceMappingURL=craft-tooltip.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftTooltipProps = {\n content: React.ReactNode;\n tone?: ThemeName;\n children: React.ReactElement;\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n};\n\nexport function CraftTooltip({ content, tone, children, side = \"top\" }: CraftTooltipProps) {\n const [open, setOpen] = React.useState(false);\n\n return (\n <span\n className=\"relative inline-flex\"\n onMouseEnter={() => setOpen(true)}\n onMouseLeave={() => setOpen(false)}\n onFocus={() => setOpen(true)}\n onBlur={() => setOpen(false)}\n >\n {children}\n <span\n className={cn(\n \"pointer-events-none absolute z-20 whitespace-nowrap rounded-lg border border-white/10 bg-black/80 px-3 py-2 text-xs text-white shadow-lg transition-all\",\n \"backdrop-blur-xl\",\n open ? \"opacity-100 translate-y-0\" : \"opacity-0 translate-y-1\",\n side === \"top\" && \"bottom-full left-1/2 -translate-x-1/2 -translate-y-2\",\n side === \"bottom\" && \"top-full left-1/2 -translate-x-1/2 translate-y-2\",\n side === \"left\" && \"right-full top-1/2 -translate-y-1/2 -translate-x-2\",\n side === \"right\" && \"left-full top-1/2 -translate-y-1/2 translate-x-2\"\n )}\n data-nc-theme={tone}\n role=\"tooltip\"\n >\n {content}\n </span>\n </span>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkBI;AAhBJ,YAAuB;AAEvB,gBAAmB;AAUZ,SAAS,aAAa,EAAE,SAAS,MAAM,UAAU,OAAO,MAAM,GAAsB;AACzF,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,KAAK;AAE5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,cAAc,MAAM,QAAQ,IAAI;AAAA,MAChC,cAAc,MAAM,QAAQ,KAAK;AAAA,MACjC,SAAS,MAAM,QAAQ,IAAI;AAAA,MAC3B,QAAQ,MAAM,QAAQ,KAAK;AAAA,MAE1B;AAAA;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YACC,eAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,OAAO,8BAA8B;AAAA,cACrC,SAAS,SAAS;AAAA,cAClB,SAAS,YAAY;AAAA,cACrB,SAAS,UAAU;AAAA,cACnB,SAAS,WAAW;AAAA,YACtB;AAAA,YACA,iBAAe;AAAA,YACf,MAAK;AAAA,YAEJ;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { a as ThemeName } from '../theme-context-EVI9PfKv.cjs';
|
|
4
|
+
|
|
5
|
+
type CraftTooltipProps = {
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
tone?: ThemeName;
|
|
8
|
+
children: React.ReactElement;
|
|
9
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
10
|
+
};
|
|
11
|
+
declare function CraftTooltip({ content, tone, children, side }: CraftTooltipProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { CraftTooltip, type CraftTooltipProps };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { a as ThemeName } from '../theme-context-EVI9PfKv.js';
|
|
4
|
+
|
|
5
|
+
type CraftTooltipProps = {
|
|
6
|
+
content: React.ReactNode;
|
|
7
|
+
tone?: ThemeName;
|
|
8
|
+
children: React.ReactElement;
|
|
9
|
+
side?: "top" | "bottom" | "left" | "right";
|
|
10
|
+
};
|
|
11
|
+
declare function CraftTooltip({ content, tone, children, side }: CraftTooltipProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
|
|
13
|
+
export { CraftTooltip, type CraftTooltipProps };
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import { cn } from "@/utils/cn";
|
|
5
|
+
function CraftTooltip({ content, tone, children, side = "top" }) {
|
|
6
|
+
const [open, setOpen] = React.useState(false);
|
|
7
|
+
return /* @__PURE__ */ jsxs(
|
|
8
|
+
"span",
|
|
9
|
+
{
|
|
10
|
+
className: "relative inline-flex",
|
|
11
|
+
onMouseEnter: () => setOpen(true),
|
|
12
|
+
onMouseLeave: () => setOpen(false),
|
|
13
|
+
onFocus: () => setOpen(true),
|
|
14
|
+
onBlur: () => setOpen(false),
|
|
15
|
+
children: [
|
|
16
|
+
children,
|
|
17
|
+
/* @__PURE__ */ jsx(
|
|
18
|
+
"span",
|
|
19
|
+
{
|
|
20
|
+
className: cn(
|
|
21
|
+
"pointer-events-none absolute z-20 whitespace-nowrap rounded-lg border border-white/10 bg-black/80 px-3 py-2 text-xs text-white shadow-lg transition-all",
|
|
22
|
+
"backdrop-blur-xl",
|
|
23
|
+
open ? "opacity-100 translate-y-0" : "opacity-0 translate-y-1",
|
|
24
|
+
side === "top" && "bottom-full left-1/2 -translate-x-1/2 -translate-y-2",
|
|
25
|
+
side === "bottom" && "top-full left-1/2 -translate-x-1/2 translate-y-2",
|
|
26
|
+
side === "left" && "right-full top-1/2 -translate-y-1/2 -translate-x-2",
|
|
27
|
+
side === "right" && "left-full top-1/2 -translate-y-1/2 translate-x-2"
|
|
28
|
+
),
|
|
29
|
+
"data-nc-theme": tone,
|
|
30
|
+
role: "tooltip",
|
|
31
|
+
children: content
|
|
32
|
+
}
|
|
33
|
+
)
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
export {
|
|
39
|
+
CraftTooltip
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=craft-tooltip.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/craft-tooltip.tsx"],"sourcesContent":["\"use client\";\n\nimport * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\nimport type { ThemeName } from \"@/theme/theme-context\";\n\nexport type CraftTooltipProps = {\n content: React.ReactNode;\n tone?: ThemeName;\n children: React.ReactElement;\n side?: \"top\" | \"bottom\" | \"left\" | \"right\";\n};\n\nexport function CraftTooltip({ content, tone, children, side = \"top\" }: CraftTooltipProps) {\n const [open, setOpen] = React.useState(false);\n\n return (\n <span\n className=\"relative inline-flex\"\n onMouseEnter={() => setOpen(true)}\n onMouseLeave={() => setOpen(false)}\n onFocus={() => setOpen(true)}\n onBlur={() => setOpen(false)}\n >\n {children}\n <span\n className={cn(\n \"pointer-events-none absolute z-20 whitespace-nowrap rounded-lg border border-white/10 bg-black/80 px-3 py-2 text-xs text-white shadow-lg transition-all\",\n \"backdrop-blur-xl\",\n open ? \"opacity-100 translate-y-0\" : \"opacity-0 translate-y-1\",\n side === \"top\" && \"bottom-full left-1/2 -translate-x-1/2 -translate-y-2\",\n side === \"bottom\" && \"top-full left-1/2 -translate-x-1/2 translate-y-2\",\n side === \"left\" && \"right-full top-1/2 -translate-y-1/2 -translate-x-2\",\n side === \"right\" && \"left-full top-1/2 -translate-y-1/2 translate-x-2\"\n )}\n data-nc-theme={tone}\n role=\"tooltip\"\n >\n {content}\n </span>\n </span>\n );\n}\n"],"mappings":";AAkBI,SAQE,KARF;AAhBJ,YAAY,WAAW;AAEvB,SAAS,UAAU;AAUZ,SAAS,aAAa,EAAE,SAAS,MAAM,UAAU,OAAO,MAAM,GAAsB;AACzF,QAAM,CAAC,MAAM,OAAO,IAAI,MAAM,SAAS,KAAK;AAE5C,SACE;AAAA,IAAC;AAAA;AAAA,MACC,WAAU;AAAA,MACV,cAAc,MAAM,QAAQ,IAAI;AAAA,MAChC,cAAc,MAAM,QAAQ,KAAK;AAAA,MACjC,SAAS,MAAM,QAAQ,IAAI;AAAA,MAC3B,QAAQ,MAAM,QAAQ,KAAK;AAAA,MAE1B;AAAA;AAAA,QACD;AAAA,UAAC;AAAA;AAAA,YACC,WAAW;AAAA,cACT;AAAA,cACA;AAAA,cACA,OAAO,8BAA8B;AAAA,cACrC,SAAS,SAAS;AAAA,cAClB,SAAS,YAAY;AAAA,cACrB,SAAS,UAAU;AAAA,cACnB,SAAS,WAAW;AAAA,YACtB;AAAA,YACA,iBAAe;AAAA,YACf,MAAK;AAAA,YAEJ;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EACF;AAEJ;","names":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __copyProps = (to, from, except, desc) => {
|
|
7
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
8
|
+
for (let key of __getOwnPropNames(from))
|
|
9
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
10
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
11
|
+
}
|
|
12
|
+
return to;
|
|
13
|
+
};
|
|
14
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
15
|
+
var types_exports = {};
|
|
16
|
+
module.exports = __toCommonJS(types_exports);
|
|
17
|
+
//# sourceMappingURL=types.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/forms/types.ts"],"sourcesContent":["export type { CraftFormProps } from \"@/components/craft-form\";\nexport type {\n CraftFormBuilderProps,\n CraftFormBuilderField,\n} from \"@/components/craft-form-builder\";\nexport type {\n CraftFormFieldProps,\n CraftFormFieldOption,\n CraftFormFieldType,\n} from \"@/components/craft-form-field\";\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CraftFormProps } from '../craft-form.cjs';
|
|
2
|
+
export { CraftFormBuilderField, CraftFormBuilderProps } from '../craft-form-builder.cjs';
|
|
3
|
+
export { CraftFormFieldOption, CraftFormFieldProps, CraftFormFieldType } from '../craft-form-field.cjs';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'react-hook-form';
|
|
7
|
+
import '../../theme-context-EVI9PfKv.cjs';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CraftFormProps } from '../craft-form.js';
|
|
2
|
+
export { CraftFormBuilderField, CraftFormBuilderProps } from '../craft-form-builder.js';
|
|
3
|
+
export { CraftFormFieldOption, CraftFormFieldProps, CraftFormFieldType } from '../craft-form-field.js';
|
|
4
|
+
import 'react/jsx-runtime';
|
|
5
|
+
import 'react';
|
|
6
|
+
import 'react-hook-form';
|
|
7
|
+
import '../../theme-context-EVI9PfKv.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|