@jameskabz/nextcraft-ui 0.6.4 → 0.6.6
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/index.cjs +3448 -103
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +746 -10
- package/dist/index.d.ts +746 -10
- package/dist/index.js +3388 -50
- package/dist/index.js.map +1 -1
- package/dist/styles.css +31 -0
- package/package.json +1 -26
- package/dist/craft/components.cjs +0 -123
- package/dist/craft/components.cjs.map +0 -1
- package/dist/craft/components.d.cts +0 -369
- package/dist/craft/components.d.ts +0 -369
- package/dist/craft/components.js +0 -67
- package/dist/craft/components.js.map +0 -1
- package/dist/craft/forms.cjs +0 -35
- package/dist/craft/forms.cjs.map +0 -1
- package/dist/craft/forms.d.cts +0 -101
- package/dist/craft/forms.d.ts +0 -101
- package/dist/craft/forms.js +0 -9
- package/dist/craft/forms.js.map +0 -1
- package/dist/craft/layout.cjs +0 -56
- package/dist/craft/layout.cjs.map +0 -1
- package/dist/craft/layout.d.cts +0 -170
- package/dist/craft/layout.d.ts +0 -170
- package/dist/craft/layout.js +0 -23
- package/dist/craft/layout.js.map +0 -1
- package/dist/craft/table.cjs +0 -38
- package/dist/craft/table.cjs.map +0 -1
- package/dist/craft/table.d.cts +0 -99
- package/dist/craft/table.d.ts +0 -99
- package/dist/craft/table.js +0 -11
- package/dist/craft/table.js.map +0 -1
- package/dist/craft/theme.cjs +0 -34
- package/dist/craft/theme.cjs.map +0 -1
- package/dist/craft/theme.d.cts +0 -10
- package/dist/craft/theme.d.ts +0 -10
- package/dist/craft/theme.js +0 -8
- package/dist/craft/theme.js.map +0 -1
- package/dist/theme-context-EVI9PfKv.d.cts +0 -22
- package/dist/theme-context-EVI9PfKv.d.ts +0 -22
package/dist/craft/forms.d.ts
DELETED
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
import { FieldValues, UseFormReturn, Path, RegisterOptions } from 'react-hook-form';
|
|
4
|
-
import { a as ThemeName } from '../theme-context-EVI9PfKv.js';
|
|
5
|
-
|
|
6
|
-
type CraftFormProps<TValues extends FieldValues> = {
|
|
7
|
-
form: UseFormReturn<TValues>;
|
|
8
|
-
onSubmit: (values: TValues) => void | Promise<void>;
|
|
9
|
-
open?: boolean;
|
|
10
|
-
defaultOpen?: boolean;
|
|
11
|
-
onOpenChange?: (open: boolean) => void;
|
|
12
|
-
trigger?: React.ReactNode;
|
|
13
|
-
title?: React.ReactNode;
|
|
14
|
-
description?: React.ReactNode;
|
|
15
|
-
submitLabel?: React.ReactNode;
|
|
16
|
-
cancelLabel?: React.ReactNode;
|
|
17
|
-
tone?: ThemeName;
|
|
18
|
-
className?: string;
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
footer?: React.ReactNode;
|
|
21
|
-
disableSubmitWhenInvalid?: boolean;
|
|
22
|
-
closeOnSubmit?: boolean;
|
|
23
|
-
formClassName?: string;
|
|
24
|
-
};
|
|
25
|
-
declare function CraftForm<TValues extends FieldValues>({ form, onSubmit, open, defaultOpen, onOpenChange, trigger, title, description, submitLabel, cancelLabel, tone, className, children, footer, disableSubmitWhenInvalid, closeOnSubmit, formClassName, }: CraftFormProps<TValues>): react_jsx_runtime.JSX.Element;
|
|
26
|
-
|
|
27
|
-
type CraftFormFieldOption = {
|
|
28
|
-
label: React.ReactNode;
|
|
29
|
-
value: string;
|
|
30
|
-
disabled?: boolean;
|
|
31
|
-
};
|
|
32
|
-
type CraftFormFieldType = "text" | "number" | "password" | "textarea" | "select" | "checkbox" | "slider" | "date" | "color" | "email" | "tel" | "url" | "time" | "datetime-local" | "month" | "week" | "file" | "multifile" | "radio" | "switch" | "range" | "search" | "hidden" | "multiselect" | "currency";
|
|
33
|
-
type CraftFormFieldProps<TValues extends FieldValues = FieldValues> = {
|
|
34
|
-
name: Path<TValues>;
|
|
35
|
-
label?: React.ReactNode;
|
|
36
|
-
description?: React.ReactNode;
|
|
37
|
-
type?: CraftFormFieldType;
|
|
38
|
-
options?: CraftFormFieldOption[];
|
|
39
|
-
placeholder?: string;
|
|
40
|
-
tone?: ThemeName;
|
|
41
|
-
className?: string;
|
|
42
|
-
inputClassName?: string;
|
|
43
|
-
labelClassName?: string;
|
|
44
|
-
descriptionClassName?: string;
|
|
45
|
-
rules?: RegisterOptions<TValues>;
|
|
46
|
-
disabled?: boolean;
|
|
47
|
-
fieldProps?: Record<string, unknown>;
|
|
48
|
-
};
|
|
49
|
-
declare function CraftFormField<TValues extends FieldValues = FieldValues>({ name, label, description, type, options, placeholder, tone, className, inputClassName, labelClassName, descriptionClassName, rules, disabled, fieldProps, }: CraftFormFieldProps<TValues>): react_jsx_runtime.JSX.Element;
|
|
50
|
-
|
|
51
|
-
type CraftFormBuilderField<TValues extends FieldValues> = {
|
|
52
|
-
name: Path<TValues>;
|
|
53
|
-
label?: React.ReactNode;
|
|
54
|
-
description?: React.ReactNode;
|
|
55
|
-
type: CraftFormFieldType;
|
|
56
|
-
placeholder?: string;
|
|
57
|
-
options?: CraftFormFieldOption[];
|
|
58
|
-
required?: boolean;
|
|
59
|
-
disabled?: boolean;
|
|
60
|
-
rules?: RegisterOptions<TValues>;
|
|
61
|
-
defaultValue?: unknown;
|
|
62
|
-
min?: number;
|
|
63
|
-
max?: number;
|
|
64
|
-
step?: number;
|
|
65
|
-
rows?: number;
|
|
66
|
-
accept?: string;
|
|
67
|
-
minFiles?: number;
|
|
68
|
-
maxFiles?: number;
|
|
69
|
-
helpText?: React.ReactNode;
|
|
70
|
-
fieldProps?: Record<string, unknown>;
|
|
71
|
-
validate?: (value: unknown, values: TValues) => string | boolean | undefined;
|
|
72
|
-
};
|
|
73
|
-
type CraftFormBuilderProps<TValues extends FieldValues> = {
|
|
74
|
-
title?: React.ReactNode;
|
|
75
|
-
description?: React.ReactNode;
|
|
76
|
-
fields: Array<CraftFormBuilderField<TValues>>;
|
|
77
|
-
initialData?: Partial<TValues> | null;
|
|
78
|
-
open?: boolean;
|
|
79
|
-
defaultOpen?: boolean;
|
|
80
|
-
onOpenChange?: (open: boolean) => void;
|
|
81
|
-
trigger?: React.ReactNode;
|
|
82
|
-
submitLabel?: React.ReactNode;
|
|
83
|
-
cancelLabel?: React.ReactNode;
|
|
84
|
-
resetLabel?: React.ReactNode;
|
|
85
|
-
showReset?: boolean;
|
|
86
|
-
showCancel?: boolean;
|
|
87
|
-
tone?: ThemeName;
|
|
88
|
-
className?: string;
|
|
89
|
-
formClassName?: string;
|
|
90
|
-
loading?: boolean;
|
|
91
|
-
disableSubmitWhenInvalid?: boolean;
|
|
92
|
-
closeOnSubmit?: boolean;
|
|
93
|
-
closeOnCancel?: boolean;
|
|
94
|
-
onSubmit: (values: TValues) => void | Promise<void>;
|
|
95
|
-
onReset?: () => void;
|
|
96
|
-
onCancel?: () => void;
|
|
97
|
-
customValidation?: (values: TValues) => Partial<Record<Path<TValues>, string>>;
|
|
98
|
-
};
|
|
99
|
-
declare function CraftFormBuilder<TValues extends FieldValues>({ title, description, fields, initialData, open, defaultOpen, onOpenChange, trigger, submitLabel, cancelLabel, resetLabel, showReset, showCancel, tone, className, formClassName, loading, disableSubmitWhenInvalid, closeOnSubmit, closeOnCancel, onSubmit, onReset, onCancel, customValidation, }: CraftFormBuilderProps<TValues>): react_jsx_runtime.JSX.Element;
|
|
100
|
-
|
|
101
|
-
export { CraftForm, CraftFormBuilder, type CraftFormBuilderField, type CraftFormBuilderProps, CraftFormField, type CraftFormFieldOption, type CraftFormFieldProps, type CraftFormFieldType, type CraftFormProps };
|
package/dist/craft/forms.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { CraftForm } from "@/components/craft-form";
|
|
2
|
-
import { CraftFormBuilder } from "@/components/craft-form-builder";
|
|
3
|
-
import { CraftFormField } from "@/components/craft-form-field";
|
|
4
|
-
export {
|
|
5
|
-
CraftForm,
|
|
6
|
-
CraftFormBuilder,
|
|
7
|
-
CraftFormField
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=forms.js.map
|
package/dist/craft/forms.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/craft/forms.ts"],"sourcesContent":["export { CraftForm } from \"@/components/craft-form\";\nexport type { CraftFormProps } from \"@/components/craft-form\";\n\nexport { CraftFormBuilder } from \"@/components/craft-form-builder\";\nexport type { CraftFormBuilderProps, CraftFormBuilderField } from \"@/components/craft-form-builder\";\n\nexport { CraftFormField } from \"@/components/craft-form-field\";\nexport type { CraftFormFieldProps, CraftFormFieldOption, CraftFormFieldType } from \"@/components/craft-form-field\";\n"],"mappings":"AAAA,SAAS,iBAAiB;AAG1B,SAAS,wBAAwB;AAGjC,SAAS,sBAAsB;","names":[]}
|
package/dist/craft/layout.cjs
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
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 __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var layout_exports = {};
|
|
20
|
-
__export(layout_exports, {
|
|
21
|
-
AppShell: () => import_app_shell.AppShell,
|
|
22
|
-
AppTemplate: () => import_app_template.AppTemplate,
|
|
23
|
-
AuthLayout: () => import_auth_layout.AuthLayout,
|
|
24
|
-
Breadcrumbs: () => import_breadcrumbs.Breadcrumbs,
|
|
25
|
-
Container: () => import_container.Container,
|
|
26
|
-
Grid: () => import_grid.Grid,
|
|
27
|
-
PageHeader: () => import_page_header.PageHeader,
|
|
28
|
-
Sidebar: () => import_sidebar.Sidebar,
|
|
29
|
-
TopNav: () => import_top_nav.TopNav,
|
|
30
|
-
layoutConfigSchema: () => import_layout_config.layoutConfigSchema
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(layout_exports);
|
|
33
|
-
var import_app_shell = require("@/components/layout/app-shell");
|
|
34
|
-
var import_app_template = require("@/components/layout/app-template");
|
|
35
|
-
var import_sidebar = require("@/components/layout/sidebar");
|
|
36
|
-
var import_top_nav = require("@/components/layout/top-nav");
|
|
37
|
-
var import_page_header = require("@/components/layout/page-header");
|
|
38
|
-
var import_breadcrumbs = require("@/components/layout/breadcrumbs");
|
|
39
|
-
var import_auth_layout = require("@/components/layout/auth-layout");
|
|
40
|
-
var import_container = require("@/components/layout/container");
|
|
41
|
-
var import_grid = require("@/components/layout/grid");
|
|
42
|
-
var import_layout_config = require("@/components/layout/layout-config");
|
|
43
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
44
|
-
0 && (module.exports = {
|
|
45
|
-
AppShell,
|
|
46
|
-
AppTemplate,
|
|
47
|
-
AuthLayout,
|
|
48
|
-
Breadcrumbs,
|
|
49
|
-
Container,
|
|
50
|
-
Grid,
|
|
51
|
-
PageHeader,
|
|
52
|
-
Sidebar,
|
|
53
|
-
TopNav,
|
|
54
|
-
layoutConfigSchema
|
|
55
|
-
});
|
|
56
|
-
//# sourceMappingURL=layout.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/craft/layout.ts"],"sourcesContent":["export { AppShell } from \"@/components/layout/app-shell\";\nexport type { AppShellProps } from \"@/components/layout/app-shell\";\n\nexport { AppTemplate } from \"@/components/layout/app-template\";\nexport type { AppTemplateProps } from \"@/components/layout/app-template\";\n\nexport { Sidebar } from \"@/components/layout/sidebar\";\nexport type { SidebarProps, SidebarItem } from \"@/components/layout/sidebar\";\n\nexport { TopNav } from \"@/components/layout/top-nav\";\nexport type { TopNavProps } from \"@/components/layout/top-nav\";\n\nexport { PageHeader } from \"@/components/layout/page-header\";\nexport type { PageHeaderProps } from \"@/components/layout/page-header\";\n\nexport { Breadcrumbs } from \"@/components/layout/breadcrumbs\";\nexport type { BreadcrumbsProps, BreadcrumbItem } from \"@/components/layout/breadcrumbs\";\n\nexport { AuthLayout } from \"@/components/layout/auth-layout\";\nexport type { AuthLayoutProps } from \"@/components/layout/auth-layout\";\n\nexport { Container } from \"@/components/layout/container\";\nexport type { ContainerProps } from \"@/components/layout/container\";\n\nexport { Grid } from \"@/components/layout/grid\";\nexport type { GridProps } from \"@/components/layout/grid\";\n\nexport type {\n LayoutConfig,\n LayoutSidebarItem,\n LayoutBreadcrumbItem,\n LayoutIconName,\n} from \"@/components/layout/layout-config\";\nexport { layoutConfigSchema } from \"@/components/layout/layout-config\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAyB;AAGzB,0BAA4B;AAG5B,qBAAwB;AAGxB,qBAAuB;AAGvB,yBAA2B;AAG3B,yBAA4B;AAG5B,yBAA2B;AAG3B,uBAA0B;AAG1B,kBAAqB;AASrB,2BAAmC;","names":[]}
|
package/dist/craft/layout.d.cts
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
type AppShellProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
5
|
-
sidebar?: React.ReactNode;
|
|
6
|
-
topNav?: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
declare function AppShell({ className, sidebar, topNav, children, ...props }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
9
|
-
|
|
10
|
-
type LayoutIconName = string;
|
|
11
|
-
type LayoutBreadcrumbItem = {
|
|
12
|
-
label: string;
|
|
13
|
-
href?: string;
|
|
14
|
-
};
|
|
15
|
-
type LayoutSidebarItem = {
|
|
16
|
-
label: string;
|
|
17
|
-
href?: string;
|
|
18
|
-
icon?: LayoutIconName;
|
|
19
|
-
active?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type LayoutConfig = {
|
|
22
|
-
sidebar?: {
|
|
23
|
-
title?: string;
|
|
24
|
-
items: LayoutSidebarItem[];
|
|
25
|
-
footerText?: string;
|
|
26
|
-
};
|
|
27
|
-
header?: {
|
|
28
|
-
title?: string;
|
|
29
|
-
breadcrumb?: LayoutBreadcrumbItem[];
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
declare const layoutConfigSchema: {
|
|
33
|
-
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
34
|
-
readonly title: "Nextcraft UI Layout Config";
|
|
35
|
-
readonly type: "object";
|
|
36
|
-
readonly additionalProperties: false;
|
|
37
|
-
readonly properties: {
|
|
38
|
-
readonly sidebar: {
|
|
39
|
-
readonly type: "object";
|
|
40
|
-
readonly additionalProperties: false;
|
|
41
|
-
readonly properties: {
|
|
42
|
-
readonly title: {
|
|
43
|
-
readonly type: "string";
|
|
44
|
-
};
|
|
45
|
-
readonly footerText: {
|
|
46
|
-
readonly type: "string";
|
|
47
|
-
};
|
|
48
|
-
readonly items: {
|
|
49
|
-
readonly type: "array";
|
|
50
|
-
readonly items: {
|
|
51
|
-
readonly type: "object";
|
|
52
|
-
readonly additionalProperties: false;
|
|
53
|
-
readonly properties: {
|
|
54
|
-
readonly label: {
|
|
55
|
-
readonly type: "string";
|
|
56
|
-
};
|
|
57
|
-
readonly href: {
|
|
58
|
-
readonly type: "string";
|
|
59
|
-
};
|
|
60
|
-
readonly icon: {
|
|
61
|
-
readonly type: "string";
|
|
62
|
-
};
|
|
63
|
-
readonly active: {
|
|
64
|
-
readonly type: "boolean";
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
readonly required: readonly ["label"];
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
readonly required: readonly ["items"];
|
|
72
|
-
};
|
|
73
|
-
readonly header: {
|
|
74
|
-
readonly type: "object";
|
|
75
|
-
readonly additionalProperties: false;
|
|
76
|
-
readonly properties: {
|
|
77
|
-
readonly title: {
|
|
78
|
-
readonly type: "string";
|
|
79
|
-
};
|
|
80
|
-
readonly breadcrumb: {
|
|
81
|
-
readonly type: "array";
|
|
82
|
-
readonly items: {
|
|
83
|
-
readonly type: "object";
|
|
84
|
-
readonly additionalProperties: false;
|
|
85
|
-
readonly properties: {
|
|
86
|
-
readonly label: {
|
|
87
|
-
readonly type: "string";
|
|
88
|
-
};
|
|
89
|
-
readonly href: {
|
|
90
|
-
readonly type: "string";
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
readonly required: readonly ["label"];
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
type AppTemplateProps = {
|
|
102
|
-
config: LayoutConfig;
|
|
103
|
-
headerActions?: React.ReactNode;
|
|
104
|
-
headerBreadcrumb?: React.ReactNode;
|
|
105
|
-
sidebarFooter?: React.ReactNode;
|
|
106
|
-
resolveIcon?: (name: string) => React.ReactNode;
|
|
107
|
-
icons?: Record<string, React.ReactNode>;
|
|
108
|
-
activePath?: string;
|
|
109
|
-
getActivePath?: () => string | undefined;
|
|
110
|
-
lucideFallback?: boolean;
|
|
111
|
-
children: React.ReactNode;
|
|
112
|
-
};
|
|
113
|
-
declare function AppTemplate({ config, headerActions, headerBreadcrumb, sidebarFooter, resolveIcon, icons, activePath, getActivePath, lucideFallback, children, }: AppTemplateProps): react_jsx_runtime.JSX.Element;
|
|
114
|
-
|
|
115
|
-
type SidebarItem = {
|
|
116
|
-
label: React.ReactNode;
|
|
117
|
-
href?: string;
|
|
118
|
-
icon?: React.ReactNode;
|
|
119
|
-
active?: boolean;
|
|
120
|
-
};
|
|
121
|
-
type SidebarProps = React.HTMLAttributes<HTMLElement> & {
|
|
122
|
-
title?: React.ReactNode;
|
|
123
|
-
items: SidebarItem[];
|
|
124
|
-
footer?: React.ReactNode;
|
|
125
|
-
};
|
|
126
|
-
declare function Sidebar({ className, title, items, footer, ...props }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
127
|
-
|
|
128
|
-
type TopNavProps = React.HTMLAttributes<HTMLElement> & {
|
|
129
|
-
title?: React.ReactNode;
|
|
130
|
-
actions?: React.ReactNode;
|
|
131
|
-
breadcrumb?: React.ReactNode;
|
|
132
|
-
};
|
|
133
|
-
declare function TopNav({ className, title, actions, breadcrumb, ...props }: TopNavProps): react_jsx_runtime.JSX.Element;
|
|
134
|
-
|
|
135
|
-
type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
136
|
-
title: React.ReactNode;
|
|
137
|
-
description?: React.ReactNode;
|
|
138
|
-
actions?: React.ReactNode;
|
|
139
|
-
};
|
|
140
|
-
declare function PageHeader({ className, title, description, actions, ...props }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
141
|
-
|
|
142
|
-
type BreadcrumbItem = {
|
|
143
|
-
label: React.ReactNode;
|
|
144
|
-
href?: string;
|
|
145
|
-
};
|
|
146
|
-
type BreadcrumbsProps = React.HTMLAttributes<HTMLElement> & {
|
|
147
|
-
items: BreadcrumbItem[];
|
|
148
|
-
};
|
|
149
|
-
declare function Breadcrumbs({ className, items, ...props }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
150
|
-
|
|
151
|
-
type AuthLayoutProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
152
|
-
title?: React.ReactNode;
|
|
153
|
-
description?: React.ReactNode;
|
|
154
|
-
footer?: React.ReactNode;
|
|
155
|
-
graphic?: React.ReactNode;
|
|
156
|
-
};
|
|
157
|
-
declare function AuthLayout({ className, title, description, footer, graphic, children, ...props }: AuthLayoutProps): react_jsx_runtime.JSX.Element;
|
|
158
|
-
|
|
159
|
-
type ContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
160
|
-
size?: "sm" | "md" | "lg" | "xl";
|
|
161
|
-
};
|
|
162
|
-
declare function Container({ className, size, ...props }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
163
|
-
|
|
164
|
-
type GridProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
165
|
-
columns?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
166
|
-
gap?: "sm" | "md" | "lg" | "xl";
|
|
167
|
-
};
|
|
168
|
-
declare function Grid({ className, columns, gap, ...props }: GridProps): react_jsx_runtime.JSX.Element;
|
|
169
|
-
|
|
170
|
-
export { AppShell, type AppShellProps, AppTemplate, type AppTemplateProps, AuthLayout, type AuthLayoutProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Container, type ContainerProps, Grid, type GridProps, type LayoutBreadcrumbItem, type LayoutConfig, type LayoutIconName, type LayoutSidebarItem, PageHeader, type PageHeaderProps, Sidebar, type SidebarItem, type SidebarProps, TopNav, type TopNavProps, layoutConfigSchema };
|
package/dist/craft/layout.d.ts
DELETED
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import * as React from 'react';
|
|
3
|
-
|
|
4
|
-
type AppShellProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
5
|
-
sidebar?: React.ReactNode;
|
|
6
|
-
topNav?: React.ReactNode;
|
|
7
|
-
};
|
|
8
|
-
declare function AppShell({ className, sidebar, topNav, children, ...props }: AppShellProps): react_jsx_runtime.JSX.Element;
|
|
9
|
-
|
|
10
|
-
type LayoutIconName = string;
|
|
11
|
-
type LayoutBreadcrumbItem = {
|
|
12
|
-
label: string;
|
|
13
|
-
href?: string;
|
|
14
|
-
};
|
|
15
|
-
type LayoutSidebarItem = {
|
|
16
|
-
label: string;
|
|
17
|
-
href?: string;
|
|
18
|
-
icon?: LayoutIconName;
|
|
19
|
-
active?: boolean;
|
|
20
|
-
};
|
|
21
|
-
type LayoutConfig = {
|
|
22
|
-
sidebar?: {
|
|
23
|
-
title?: string;
|
|
24
|
-
items: LayoutSidebarItem[];
|
|
25
|
-
footerText?: string;
|
|
26
|
-
};
|
|
27
|
-
header?: {
|
|
28
|
-
title?: string;
|
|
29
|
-
breadcrumb?: LayoutBreadcrumbItem[];
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
declare const layoutConfigSchema: {
|
|
33
|
-
readonly $schema: "https://json-schema.org/draft/2020-12/schema";
|
|
34
|
-
readonly title: "Nextcraft UI Layout Config";
|
|
35
|
-
readonly type: "object";
|
|
36
|
-
readonly additionalProperties: false;
|
|
37
|
-
readonly properties: {
|
|
38
|
-
readonly sidebar: {
|
|
39
|
-
readonly type: "object";
|
|
40
|
-
readonly additionalProperties: false;
|
|
41
|
-
readonly properties: {
|
|
42
|
-
readonly title: {
|
|
43
|
-
readonly type: "string";
|
|
44
|
-
};
|
|
45
|
-
readonly footerText: {
|
|
46
|
-
readonly type: "string";
|
|
47
|
-
};
|
|
48
|
-
readonly items: {
|
|
49
|
-
readonly type: "array";
|
|
50
|
-
readonly items: {
|
|
51
|
-
readonly type: "object";
|
|
52
|
-
readonly additionalProperties: false;
|
|
53
|
-
readonly properties: {
|
|
54
|
-
readonly label: {
|
|
55
|
-
readonly type: "string";
|
|
56
|
-
};
|
|
57
|
-
readonly href: {
|
|
58
|
-
readonly type: "string";
|
|
59
|
-
};
|
|
60
|
-
readonly icon: {
|
|
61
|
-
readonly type: "string";
|
|
62
|
-
};
|
|
63
|
-
readonly active: {
|
|
64
|
-
readonly type: "boolean";
|
|
65
|
-
};
|
|
66
|
-
};
|
|
67
|
-
readonly required: readonly ["label"];
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
};
|
|
71
|
-
readonly required: readonly ["items"];
|
|
72
|
-
};
|
|
73
|
-
readonly header: {
|
|
74
|
-
readonly type: "object";
|
|
75
|
-
readonly additionalProperties: false;
|
|
76
|
-
readonly properties: {
|
|
77
|
-
readonly title: {
|
|
78
|
-
readonly type: "string";
|
|
79
|
-
};
|
|
80
|
-
readonly breadcrumb: {
|
|
81
|
-
readonly type: "array";
|
|
82
|
-
readonly items: {
|
|
83
|
-
readonly type: "object";
|
|
84
|
-
readonly additionalProperties: false;
|
|
85
|
-
readonly properties: {
|
|
86
|
-
readonly label: {
|
|
87
|
-
readonly type: "string";
|
|
88
|
-
};
|
|
89
|
-
readonly href: {
|
|
90
|
-
readonly type: "string";
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
readonly required: readonly ["label"];
|
|
94
|
-
};
|
|
95
|
-
};
|
|
96
|
-
};
|
|
97
|
-
};
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
|
-
|
|
101
|
-
type AppTemplateProps = {
|
|
102
|
-
config: LayoutConfig;
|
|
103
|
-
headerActions?: React.ReactNode;
|
|
104
|
-
headerBreadcrumb?: React.ReactNode;
|
|
105
|
-
sidebarFooter?: React.ReactNode;
|
|
106
|
-
resolveIcon?: (name: string) => React.ReactNode;
|
|
107
|
-
icons?: Record<string, React.ReactNode>;
|
|
108
|
-
activePath?: string;
|
|
109
|
-
getActivePath?: () => string | undefined;
|
|
110
|
-
lucideFallback?: boolean;
|
|
111
|
-
children: React.ReactNode;
|
|
112
|
-
};
|
|
113
|
-
declare function AppTemplate({ config, headerActions, headerBreadcrumb, sidebarFooter, resolveIcon, icons, activePath, getActivePath, lucideFallback, children, }: AppTemplateProps): react_jsx_runtime.JSX.Element;
|
|
114
|
-
|
|
115
|
-
type SidebarItem = {
|
|
116
|
-
label: React.ReactNode;
|
|
117
|
-
href?: string;
|
|
118
|
-
icon?: React.ReactNode;
|
|
119
|
-
active?: boolean;
|
|
120
|
-
};
|
|
121
|
-
type SidebarProps = React.HTMLAttributes<HTMLElement> & {
|
|
122
|
-
title?: React.ReactNode;
|
|
123
|
-
items: SidebarItem[];
|
|
124
|
-
footer?: React.ReactNode;
|
|
125
|
-
};
|
|
126
|
-
declare function Sidebar({ className, title, items, footer, ...props }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
127
|
-
|
|
128
|
-
type TopNavProps = React.HTMLAttributes<HTMLElement> & {
|
|
129
|
-
title?: React.ReactNode;
|
|
130
|
-
actions?: React.ReactNode;
|
|
131
|
-
breadcrumb?: React.ReactNode;
|
|
132
|
-
};
|
|
133
|
-
declare function TopNav({ className, title, actions, breadcrumb, ...props }: TopNavProps): react_jsx_runtime.JSX.Element;
|
|
134
|
-
|
|
135
|
-
type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
136
|
-
title: React.ReactNode;
|
|
137
|
-
description?: React.ReactNode;
|
|
138
|
-
actions?: React.ReactNode;
|
|
139
|
-
};
|
|
140
|
-
declare function PageHeader({ className, title, description, actions, ...props }: PageHeaderProps): react_jsx_runtime.JSX.Element;
|
|
141
|
-
|
|
142
|
-
type BreadcrumbItem = {
|
|
143
|
-
label: React.ReactNode;
|
|
144
|
-
href?: string;
|
|
145
|
-
};
|
|
146
|
-
type BreadcrumbsProps = React.HTMLAttributes<HTMLElement> & {
|
|
147
|
-
items: BreadcrumbItem[];
|
|
148
|
-
};
|
|
149
|
-
declare function Breadcrumbs({ className, items, ...props }: BreadcrumbsProps): react_jsx_runtime.JSX.Element;
|
|
150
|
-
|
|
151
|
-
type AuthLayoutProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
152
|
-
title?: React.ReactNode;
|
|
153
|
-
description?: React.ReactNode;
|
|
154
|
-
footer?: React.ReactNode;
|
|
155
|
-
graphic?: React.ReactNode;
|
|
156
|
-
};
|
|
157
|
-
declare function AuthLayout({ className, title, description, footer, graphic, children, ...props }: AuthLayoutProps): react_jsx_runtime.JSX.Element;
|
|
158
|
-
|
|
159
|
-
type ContainerProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
160
|
-
size?: "sm" | "md" | "lg" | "xl";
|
|
161
|
-
};
|
|
162
|
-
declare function Container({ className, size, ...props }: ContainerProps): react_jsx_runtime.JSX.Element;
|
|
163
|
-
|
|
164
|
-
type GridProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
165
|
-
columns?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
166
|
-
gap?: "sm" | "md" | "lg" | "xl";
|
|
167
|
-
};
|
|
168
|
-
declare function Grid({ className, columns, gap, ...props }: GridProps): react_jsx_runtime.JSX.Element;
|
|
169
|
-
|
|
170
|
-
export { AppShell, type AppShellProps, AppTemplate, type AppTemplateProps, AuthLayout, type AuthLayoutProps, type BreadcrumbItem, Breadcrumbs, type BreadcrumbsProps, Container, type ContainerProps, Grid, type GridProps, type LayoutBreadcrumbItem, type LayoutConfig, type LayoutIconName, type LayoutSidebarItem, PageHeader, type PageHeaderProps, Sidebar, type SidebarItem, type SidebarProps, TopNav, type TopNavProps, layoutConfigSchema };
|
package/dist/craft/layout.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { AppShell } from "@/components/layout/app-shell";
|
|
2
|
-
import { AppTemplate } from "@/components/layout/app-template";
|
|
3
|
-
import { Sidebar } from "@/components/layout/sidebar";
|
|
4
|
-
import { TopNav } from "@/components/layout/top-nav";
|
|
5
|
-
import { PageHeader } from "@/components/layout/page-header";
|
|
6
|
-
import { Breadcrumbs } from "@/components/layout/breadcrumbs";
|
|
7
|
-
import { AuthLayout } from "@/components/layout/auth-layout";
|
|
8
|
-
import { Container } from "@/components/layout/container";
|
|
9
|
-
import { Grid } from "@/components/layout/grid";
|
|
10
|
-
import { layoutConfigSchema } from "@/components/layout/layout-config";
|
|
11
|
-
export {
|
|
12
|
-
AppShell,
|
|
13
|
-
AppTemplate,
|
|
14
|
-
AuthLayout,
|
|
15
|
-
Breadcrumbs,
|
|
16
|
-
Container,
|
|
17
|
-
Grid,
|
|
18
|
-
PageHeader,
|
|
19
|
-
Sidebar,
|
|
20
|
-
TopNav,
|
|
21
|
-
layoutConfigSchema
|
|
22
|
-
};
|
|
23
|
-
//# sourceMappingURL=layout.js.map
|
package/dist/craft/layout.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/craft/layout.ts"],"sourcesContent":["export { AppShell } from \"@/components/layout/app-shell\";\nexport type { AppShellProps } from \"@/components/layout/app-shell\";\n\nexport { AppTemplate } from \"@/components/layout/app-template\";\nexport type { AppTemplateProps } from \"@/components/layout/app-template\";\n\nexport { Sidebar } from \"@/components/layout/sidebar\";\nexport type { SidebarProps, SidebarItem } from \"@/components/layout/sidebar\";\n\nexport { TopNav } from \"@/components/layout/top-nav\";\nexport type { TopNavProps } from \"@/components/layout/top-nav\";\n\nexport { PageHeader } from \"@/components/layout/page-header\";\nexport type { PageHeaderProps } from \"@/components/layout/page-header\";\n\nexport { Breadcrumbs } from \"@/components/layout/breadcrumbs\";\nexport type { BreadcrumbsProps, BreadcrumbItem } from \"@/components/layout/breadcrumbs\";\n\nexport { AuthLayout } from \"@/components/layout/auth-layout\";\nexport type { AuthLayoutProps } from \"@/components/layout/auth-layout\";\n\nexport { Container } from \"@/components/layout/container\";\nexport type { ContainerProps } from \"@/components/layout/container\";\n\nexport { Grid } from \"@/components/layout/grid\";\nexport type { GridProps } from \"@/components/layout/grid\";\n\nexport type {\n LayoutConfig,\n LayoutSidebarItem,\n LayoutBreadcrumbItem,\n LayoutIconName,\n} from \"@/components/layout/layout-config\";\nexport { layoutConfigSchema } from \"@/components/layout/layout-config\";\n"],"mappings":"AAAA,SAAS,gBAAgB;AAGzB,SAAS,mBAAmB;AAG5B,SAAS,eAAe;AAGxB,SAAS,cAAc;AAGvB,SAAS,kBAAkB;AAG3B,SAAS,mBAAmB;AAG5B,SAAS,kBAAkB;AAG3B,SAAS,iBAAiB;AAG1B,SAAS,YAAY;AASrB,SAAS,0BAA0B;","names":[]}
|
package/dist/craft/table.cjs
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
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 __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var table_exports = {};
|
|
20
|
-
__export(table_exports, {
|
|
21
|
-
CraftDataTable: () => import_craft_data_table.CraftDataTable,
|
|
22
|
-
CraftFilterBar: () => import_craft_filter_bar.CraftFilterBar,
|
|
23
|
-
CraftPagination: () => import_craft_pagination.CraftPagination,
|
|
24
|
-
CraftTableToolbar: () => import_craft_table_toolbar.CraftTableToolbar
|
|
25
|
-
});
|
|
26
|
-
module.exports = __toCommonJS(table_exports);
|
|
27
|
-
var import_craft_data_table = require("@/components/craft-data-table");
|
|
28
|
-
var import_craft_pagination = require("@/components/craft-pagination");
|
|
29
|
-
var import_craft_filter_bar = require("@/components/craft-filter-bar");
|
|
30
|
-
var import_craft_table_toolbar = require("@/components/craft-table-toolbar");
|
|
31
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
32
|
-
0 && (module.exports = {
|
|
33
|
-
CraftDataTable,
|
|
34
|
-
CraftFilterBar,
|
|
35
|
-
CraftPagination,
|
|
36
|
-
CraftTableToolbar
|
|
37
|
-
});
|
|
38
|
-
//# sourceMappingURL=table.cjs.map
|
package/dist/craft/table.cjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/craft/table.ts"],"sourcesContent":["export { CraftDataTable } from \"@/components/craft-data-table\";\nexport type { CraftDataTableProps, CraftDataTableColumn, CraftDataTableSort } from \"@/components/craft-data-table\";\n\nexport { CraftPagination } from \"@/components/craft-pagination\";\nexport type { CraftPaginationProps } from \"@/components/craft-pagination\";\n\nexport { CraftFilterBar } from \"@/components/craft-filter-bar\";\nexport type { CraftFilterBarProps } from \"@/components/craft-filter-bar\";\n\nexport { CraftTableToolbar } from \"@/components/craft-table-toolbar\";\nexport type { CraftTableToolbarProps } from \"@/components/craft-table-toolbar\";\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,8BAA+B;AAG/B,8BAAgC;AAGhC,8BAA+B;AAG/B,iCAAkC;","names":[]}
|