@jameskabz/nextcraft-ui 0.6.3 → 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/{chunk-ZRV4Y374.js → components/craft-data-table.js} +30 -239
- 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/{chunk-FEFH5O5K.js → components/craft-icon.js} +31 -13
- 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/{chunk-7SKDTIEK.js → components/craft-input.js} +5 -10
- 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.cjs +64 -1779
- package/dist/craft/components.cjs.map +1 -1
- package/dist/craft/components.d.cts +36 -369
- package/dist/craft/components.d.ts +36 -369
- package/dist/craft/components.js +31 -42
- package/dist/craft/components.js.map +1 -1
- package/dist/craft/forms.cjs +6 -1347
- package/dist/craft/forms.cjs.map +1 -1
- package/dist/craft/forms.d.cts +7 -101
- package/dist/craft/forms.d.ts +7 -101
- package/dist/craft/forms.js +3 -8
- package/dist/craft/forms.js.map +1 -1
- package/dist/craft/layout.cjs +20 -374
- package/dist/craft/layout.cjs.map +1 -1
- package/dist/craft/layout.d.cts +12 -170
- package/dist/craft/layout.d.ts +12 -170
- package/dist/craft/layout.js +10 -14
- package/dist/craft/layout.js.map +1 -1
- package/dist/craft/table.cjs +8 -632
- package/dist/craft/table.cjs.map +1 -1
- package/dist/craft/table.d.cts +7 -99
- package/dist/craft/table.d.ts +7 -99
- package/dist/craft/table.js +4 -8
- package/dist/craft/table.js.map +1 -1
- package/dist/craft/theme.cjs +5 -137
- package/dist/craft/theme.cjs.map +1 -1
- package/dist/craft/theme.d.cts +3 -9
- package/dist/craft/theme.d.ts +3 -9
- package/dist/craft/theme.js +2 -6
- package/dist/craft/theme.js.map +1 -1
- package/dist/index.cjs +103 -3426
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -6
- package/dist/index.d.ts +50 -6
- package/dist/index.js +50 -70
- package/dist/index.js.map +1 -1
- 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/{chunk-VQ6T3HIX.js → utils/cn.js} +1 -3
- package/dist/utils/cn.js.map +1 -0
- package/package.json +6 -1
- package/dist/chunk-6F7FN2ZF.js +0 -671
- package/dist/chunk-6F7FN2ZF.js.map +0 -1
- package/dist/chunk-7Q4Z47HT.js +0 -657
- package/dist/chunk-7Q4Z47HT.js.map +0 -1
- package/dist/chunk-7SKDTIEK.js.map +0 -1
- package/dist/chunk-FEFH5O5K.js.map +0 -1
- package/dist/chunk-M2EKVXB6.js +0 -127
- package/dist/chunk-M2EKVXB6.js.map +0 -1
- package/dist/chunk-SBLIF6UU.js +0 -1029
- package/dist/chunk-SBLIF6UU.js.map +0 -1
- package/dist/chunk-VQ6T3HIX.js.map +0 -1
- package/dist/chunk-YVZL4GET.js +0 -328
- package/dist/chunk-YVZL4GET.js.map +0 -1
- package/dist/chunk-ZRV4Y374.js.map +0 -1
package/dist/craft/layout.cjs
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
2
|
var __defProp = Object.defineProperty;
|
|
4
3
|
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
4
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
5
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
6
|
var __export = (target, all) => {
|
|
9
7
|
for (var name in all)
|
|
@@ -17,383 +15,31 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
17
15
|
}
|
|
18
16
|
return to;
|
|
19
17
|
};
|
|
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
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
|
|
30
|
-
// src/craft/layout.ts
|
|
31
19
|
var layout_exports = {};
|
|
32
20
|
__export(layout_exports, {
|
|
33
|
-
AppShell: () => AppShell,
|
|
34
|
-
AppTemplate: () => AppTemplate,
|
|
35
|
-
AuthLayout: () => AuthLayout,
|
|
36
|
-
Breadcrumbs: () => Breadcrumbs,
|
|
37
|
-
Container: () => Container,
|
|
38
|
-
Grid: () => Grid,
|
|
39
|
-
PageHeader: () => PageHeader,
|
|
40
|
-
Sidebar: () => Sidebar,
|
|
41
|
-
TopNav: () => TopNav,
|
|
42
|
-
layoutConfigSchema: () => layoutConfigSchema
|
|
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
|
|
43
31
|
});
|
|
44
32
|
module.exports = __toCommonJS(layout_exports);
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
var
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
className: cn(
|
|
58
|
-
"grid min-h-screen grid-cols-1 gap-6 bg-background p-6 lg:grid-cols-[260px_1fr]",
|
|
59
|
-
className
|
|
60
|
-
),
|
|
61
|
-
...props,
|
|
62
|
-
children: [
|
|
63
|
-
sidebar && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "h-full lg:sticky lg:top-6 lg:self-start lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto", children: sidebar }),
|
|
64
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { className: "flex flex-col gap-6", children: [
|
|
65
|
-
topNav && /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { className: "lg:sticky lg:top-6 lg:z-20", children: topNav }),
|
|
66
|
-
/* @__PURE__ */ (0, import_jsx_runtime.jsx)("main", { className: "flex-1", children })
|
|
67
|
-
] })
|
|
68
|
-
]
|
|
69
|
-
}
|
|
70
|
-
);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// src/components/layout/app-template.tsx
|
|
74
|
-
var React2 = __toESM(require("react"), 1);
|
|
75
|
-
|
|
76
|
-
// src/components/craft-icon.tsx
|
|
77
|
-
var React = __toESM(require("react"), 1);
|
|
78
|
-
var import_dynamic = require("lucide-react/dynamic");
|
|
79
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
80
|
-
var CraftIconContext = React.createContext(null);
|
|
81
|
-
function CraftIcon({
|
|
82
|
-
name,
|
|
83
|
-
className,
|
|
84
|
-
"aria-label": ariaLabel,
|
|
85
|
-
icons,
|
|
86
|
-
useLucide = true
|
|
87
|
-
}) {
|
|
88
|
-
const contextRegistry = React.useContext(CraftIconContext);
|
|
89
|
-
const registry = icons != null ? icons : contextRegistry;
|
|
90
|
-
const icon = registry == null ? void 0 : registry[name];
|
|
91
|
-
if (!icon) {
|
|
92
|
-
if (!useLucide) return null;
|
|
93
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
|
|
94
|
-
import_dynamic.DynamicIcon,
|
|
95
|
-
{
|
|
96
|
-
name,
|
|
97
|
-
className,
|
|
98
|
-
"aria-hidden": ariaLabel ? void 0 : true,
|
|
99
|
-
"aria-label": ariaLabel
|
|
100
|
-
}
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
if (React.isValidElement(icon)) {
|
|
104
|
-
return React.cloneElement(icon, {
|
|
105
|
-
className: cn(icon.props.className, className),
|
|
106
|
-
"aria-hidden": ariaLabel ? void 0 : true,
|
|
107
|
-
"aria-label": ariaLabel
|
|
108
|
-
});
|
|
109
|
-
}
|
|
110
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { className, "aria-label": ariaLabel, children: icon });
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
// src/components/layout/breadcrumbs.tsx
|
|
114
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
115
|
-
function Breadcrumbs({ className, items, ...props }) {
|
|
116
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { className: cn("flex items-center text-sm text-[rgb(var(--nc-fg-muted))]", className), ...props, children: items.map((item, index) => {
|
|
117
|
-
const content = item.href ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("a", { href: item.href, className: "transition hover:text-[rgb(var(--nc-fg))]", children: item.label }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "text-[rgb(var(--nc-fg))]", children: item.label });
|
|
118
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "flex items-center", children: [
|
|
119
|
-
content,
|
|
120
|
-
index < items.length - 1 && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "mx-2 text-[rgb(var(--nc-fg-soft))]", children: "/" })
|
|
121
|
-
] }, `${item.label}-${index}`);
|
|
122
|
-
}) });
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
// src/components/layout/sidebar.tsx
|
|
126
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
127
|
-
function Sidebar({ className, title, items, footer, ...props }) {
|
|
128
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
129
|
-
"aside",
|
|
130
|
-
{
|
|
131
|
-
className: cn(
|
|
132
|
-
"flex h-full w-full flex-col gap-6 rounded-3xl border border-[rgb(var(--nc-border)/0.3)] bg-[rgb(var(--nc-surface)/0.08)] p-6 text-[rgb(var(--nc-fg))] backdrop-blur-xl",
|
|
133
|
-
className
|
|
134
|
-
),
|
|
135
|
-
...props,
|
|
136
|
-
children: [
|
|
137
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "text-lg font-semibold", children: title }),
|
|
138
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("nav", { className: "flex flex-col gap-2", children: items.map((item, index) => {
|
|
139
|
-
var _a;
|
|
140
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
141
|
-
"a",
|
|
142
|
-
{
|
|
143
|
-
href: (_a = item.href) != null ? _a : "#",
|
|
144
|
-
className: cn(
|
|
145
|
-
"flex items-center gap-3 rounded-2xl px-3 py-2 text-sm transition",
|
|
146
|
-
item.active ? "bg-[rgb(var(--nc-accent-1)/0.25)] text-[rgb(var(--nc-fg))]" : "text-[rgb(var(--nc-fg-muted))] hover:bg-[rgb(var(--nc-surface)/0.12)] hover:text-[rgb(var(--nc-fg))]"
|
|
147
|
-
),
|
|
148
|
-
children: [
|
|
149
|
-
item.icon,
|
|
150
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("span", { children: item.label })
|
|
151
|
-
]
|
|
152
|
-
},
|
|
153
|
-
`${item.label}-${index}`
|
|
154
|
-
);
|
|
155
|
-
}) }),
|
|
156
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "mt-auto pt-4", children: footer })
|
|
157
|
-
]
|
|
158
|
-
}
|
|
159
|
-
);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
// src/components/layout/top-nav.tsx
|
|
163
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
164
|
-
function TopNav({ className, title, actions, breadcrumb, ...props }) {
|
|
165
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
166
|
-
"header",
|
|
167
|
-
{
|
|
168
|
-
className: cn(
|
|
169
|
-
"flex flex-wrap items-center justify-between gap-4 rounded-3xl border border-[rgb(var(--nc-border)/0.3)] bg-[rgb(var(--nc-surface)/0.08)] px-6 py-4 text-[rgb(var(--nc-fg))] backdrop-blur-xl",
|
|
170
|
-
className
|
|
171
|
-
),
|
|
172
|
-
...props,
|
|
173
|
-
children: [
|
|
174
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "space-y-1", children: [
|
|
175
|
-
breadcrumb,
|
|
176
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "text-xl font-semibold", children: title })
|
|
177
|
-
] }),
|
|
178
|
-
actions && /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "flex flex-wrap gap-3", children: actions })
|
|
179
|
-
]
|
|
180
|
-
}
|
|
181
|
-
);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// src/components/layout/app-template.tsx
|
|
185
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
186
|
-
function AppTemplate({
|
|
187
|
-
config,
|
|
188
|
-
headerActions,
|
|
189
|
-
headerBreadcrumb,
|
|
190
|
-
sidebarFooter,
|
|
191
|
-
resolveIcon,
|
|
192
|
-
icons,
|
|
193
|
-
activePath,
|
|
194
|
-
getActivePath,
|
|
195
|
-
lucideFallback = true,
|
|
196
|
-
children
|
|
197
|
-
}) {
|
|
198
|
-
const sidebarConfig = config.sidebar;
|
|
199
|
-
const headerConfig = config.header;
|
|
200
|
-
const resolvedActivePath = activePath != null ? activePath : getActivePath == null ? void 0 : getActivePath();
|
|
201
|
-
const buildIcon = React2.useCallback(
|
|
202
|
-
(name) => {
|
|
203
|
-
if (!name) return void 0;
|
|
204
|
-
if (resolveIcon) return resolveIcon(name);
|
|
205
|
-
if (icons == null ? void 0 : icons[name]) return icons[name];
|
|
206
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CraftIcon, { name, useLucide: lucideFallback });
|
|
207
|
-
},
|
|
208
|
-
[icons, lucideFallback, resolveIcon]
|
|
209
|
-
);
|
|
210
|
-
const sidebarItems = sidebarConfig ? sidebarConfig.items.map((item) => {
|
|
211
|
-
var _a;
|
|
212
|
-
return {
|
|
213
|
-
label: item.label,
|
|
214
|
-
href: item.href,
|
|
215
|
-
active: (_a = item.active) != null ? _a : resolvedActivePath && item.href ? item.href === resolvedActivePath : false,
|
|
216
|
-
icon: buildIcon(item.icon)
|
|
217
|
-
};
|
|
218
|
-
}) : null;
|
|
219
|
-
const breadcrumbNode = headerBreadcrumb != null ? headerBreadcrumb : (headerConfig == null ? void 0 : headerConfig.breadcrumb) ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Breadcrumbs, { items: headerConfig.breadcrumb }) : null;
|
|
220
|
-
const sidebarFooterNode = sidebarFooter != null ? sidebarFooter : (sidebarConfig == null ? void 0 : sidebarConfig.footerText) ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "text-xs text-[rgb(var(--nc-fg-muted))]", children: sidebarConfig.footerText }) : null;
|
|
221
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
222
|
-
AppShell,
|
|
223
|
-
{
|
|
224
|
-
sidebar: sidebarConfig && sidebarItems ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
225
|
-
Sidebar,
|
|
226
|
-
{
|
|
227
|
-
title: sidebarConfig.title,
|
|
228
|
-
items: sidebarItems,
|
|
229
|
-
footer: sidebarFooterNode
|
|
230
|
-
}
|
|
231
|
-
) : void 0,
|
|
232
|
-
topNav: headerConfig ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
233
|
-
TopNav,
|
|
234
|
-
{
|
|
235
|
-
title: headerConfig.title,
|
|
236
|
-
breadcrumb: breadcrumbNode,
|
|
237
|
-
actions: headerActions
|
|
238
|
-
}
|
|
239
|
-
) : void 0,
|
|
240
|
-
children
|
|
241
|
-
}
|
|
242
|
-
);
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
// src/components/layout/page-header.tsx
|
|
246
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
247
|
-
function PageHeader({
|
|
248
|
-
className,
|
|
249
|
-
title,
|
|
250
|
-
description,
|
|
251
|
-
actions,
|
|
252
|
-
...props
|
|
253
|
-
}) {
|
|
254
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
255
|
-
"div",
|
|
256
|
-
{
|
|
257
|
-
className: cn("flex flex-wrap items-start justify-between gap-6", className),
|
|
258
|
-
...props,
|
|
259
|
-
children: [
|
|
260
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "space-y-2", children: [
|
|
261
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("h1", { className: "text-3xl font-bold text-[rgb(var(--nc-fg))]", children: title }),
|
|
262
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("p", { className: "text-[rgb(var(--nc-fg-muted))]", children: description })
|
|
263
|
-
] }),
|
|
264
|
-
actions && /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex flex-wrap gap-3", children: actions })
|
|
265
|
-
]
|
|
266
|
-
}
|
|
267
|
-
);
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
// src/components/layout/auth-layout.tsx
|
|
271
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
272
|
-
function AuthLayout({
|
|
273
|
-
className,
|
|
274
|
-
title,
|
|
275
|
-
description,
|
|
276
|
-
footer,
|
|
277
|
-
graphic,
|
|
278
|
-
children,
|
|
279
|
-
...props
|
|
280
|
-
}) {
|
|
281
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
282
|
-
"div",
|
|
283
|
-
{
|
|
284
|
-
className: cn(
|
|
285
|
-
"grid min-h-screen grid-cols-1 bg-background",
|
|
286
|
-
"lg:grid-cols-[1.1fr_0.9fr]",
|
|
287
|
-
className
|
|
288
|
-
),
|
|
289
|
-
...props,
|
|
290
|
-
children: [
|
|
291
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex flex-col justify-center px-6 py-16 sm:px-12", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "mx-auto w-full max-w-md space-y-6", children: [
|
|
292
|
-
(title || description) && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "space-y-2", children: [
|
|
293
|
-
title && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "text-3xl font-bold text-[rgb(var(--nc-fg))]", children: title }),
|
|
294
|
-
description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[rgb(var(--nc-fg-muted))]", children: description })
|
|
295
|
-
] }),
|
|
296
|
-
children,
|
|
297
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-sm text-[rgb(var(--nc-fg-muted))]", children: footer })
|
|
298
|
-
] }) }),
|
|
299
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "hidden items-center justify-center border-l border-[rgb(var(--nc-border)/0.3)] bg-[rgb(var(--nc-surface)/0.08)] p-12 text-[rgb(var(--nc-fg))] lg:flex", children: graphic != null ? graphic : /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "max-w-sm space-y-4 text-center", children: [
|
|
300
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h2", { className: "text-2xl font-semibold", children: "Crafted experiences" }),
|
|
301
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "text-[rgb(var(--nc-fg-muted))]", children: "Build authentication flows that feel premium and cohesive." })
|
|
302
|
-
] }) })
|
|
303
|
-
]
|
|
304
|
-
}
|
|
305
|
-
);
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// src/components/layout/container.tsx
|
|
309
|
-
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
310
|
-
var sizeClasses = {
|
|
311
|
-
sm: "max-w-3xl",
|
|
312
|
-
md: "max-w-5xl",
|
|
313
|
-
lg: "max-w-6xl",
|
|
314
|
-
xl: "max-w-7xl"
|
|
315
|
-
};
|
|
316
|
-
function Container({ className, size = "lg", ...props }) {
|
|
317
|
-
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
318
|
-
"div",
|
|
319
|
-
{
|
|
320
|
-
className: cn("mx-auto w-full px-4 sm:px-6 lg:px-8", sizeClasses[size], className),
|
|
321
|
-
...props
|
|
322
|
-
}
|
|
323
|
-
);
|
|
324
|
-
}
|
|
325
|
-
|
|
326
|
-
// src/components/layout/grid.tsx
|
|
327
|
-
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
328
|
-
var colClasses = {
|
|
329
|
-
1: "grid-cols-1",
|
|
330
|
-
2: "grid-cols-1 md:grid-cols-2",
|
|
331
|
-
3: "grid-cols-1 md:grid-cols-2 lg:grid-cols-3",
|
|
332
|
-
4: "grid-cols-1 md:grid-cols-2 lg:grid-cols-4",
|
|
333
|
-
5: "grid-cols-1 md:grid-cols-2 lg:grid-cols-5",
|
|
334
|
-
6: "grid-cols-1 md:grid-cols-3 lg:grid-cols-6"
|
|
335
|
-
};
|
|
336
|
-
var gapClasses = {
|
|
337
|
-
sm: "gap-4",
|
|
338
|
-
md: "gap-6",
|
|
339
|
-
lg: "gap-8",
|
|
340
|
-
xl: "gap-10"
|
|
341
|
-
};
|
|
342
|
-
function Grid({ className, columns = 3, gap = "md", ...props }) {
|
|
343
|
-
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("div", { className: cn("grid", colClasses[columns], gapClasses[gap], className), ...props });
|
|
344
|
-
}
|
|
345
|
-
|
|
346
|
-
// src/components/layout/layout-config.ts
|
|
347
|
-
var layoutConfigSchema = {
|
|
348
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
349
|
-
title: "Nextcraft UI Layout Config",
|
|
350
|
-
type: "object",
|
|
351
|
-
additionalProperties: false,
|
|
352
|
-
properties: {
|
|
353
|
-
sidebar: {
|
|
354
|
-
type: "object",
|
|
355
|
-
additionalProperties: false,
|
|
356
|
-
properties: {
|
|
357
|
-
title: { type: "string" },
|
|
358
|
-
footerText: { type: "string" },
|
|
359
|
-
items: {
|
|
360
|
-
type: "array",
|
|
361
|
-
items: {
|
|
362
|
-
type: "object",
|
|
363
|
-
additionalProperties: false,
|
|
364
|
-
properties: {
|
|
365
|
-
label: { type: "string" },
|
|
366
|
-
href: { type: "string" },
|
|
367
|
-
icon: { type: "string" },
|
|
368
|
-
active: { type: "boolean" }
|
|
369
|
-
},
|
|
370
|
-
required: ["label"]
|
|
371
|
-
}
|
|
372
|
-
}
|
|
373
|
-
},
|
|
374
|
-
required: ["items"]
|
|
375
|
-
},
|
|
376
|
-
header: {
|
|
377
|
-
type: "object",
|
|
378
|
-
additionalProperties: false,
|
|
379
|
-
properties: {
|
|
380
|
-
title: { type: "string" },
|
|
381
|
-
breadcrumb: {
|
|
382
|
-
type: "array",
|
|
383
|
-
items: {
|
|
384
|
-
type: "object",
|
|
385
|
-
additionalProperties: false,
|
|
386
|
-
properties: {
|
|
387
|
-
label: { type: "string" },
|
|
388
|
-
href: { type: "string" }
|
|
389
|
-
},
|
|
390
|
-
required: ["label"]
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
}
|
|
394
|
-
}
|
|
395
|
-
}
|
|
396
|
-
};
|
|
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");
|
|
397
43
|
// Annotate the CommonJS export names for ESM import in node:
|
|
398
44
|
0 && (module.exports = {
|
|
399
45
|
AppShell,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/craft/layout.ts","../../src/utils/cn.ts","../../src/components/layout/app-shell.tsx","../../src/components/layout/app-template.tsx","../../src/components/craft-icon.tsx","../../src/components/layout/breadcrumbs.tsx","../../src/components/layout/sidebar.tsx","../../src/components/layout/top-nav.tsx","../../src/components/layout/page-header.tsx","../../src/components/layout/auth-layout.tsx","../../src/components/layout/container.tsx","../../src/components/layout/grid.tsx","../../src/components/layout/layout-config.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","export function cn(...values: Array<string | false | null | undefined>): string {\n return values.filter(Boolean).join(\" \");\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type AppShellProps = React.HTMLAttributes<HTMLDivElement> & {\n sidebar?: React.ReactNode;\n topNav?: React.ReactNode;\n};\n\nexport function AppShell({ className, sidebar, topNav, children, ...props }: AppShellProps) {\n return (\n <div\n className={cn(\n \"grid min-h-screen grid-cols-1 gap-6 bg-background p-6 lg:grid-cols-[260px_1fr]\",\n className\n )}\n {...props}\n >\n {sidebar && (\n <div className=\"h-full lg:sticky lg:top-6 lg:self-start lg:max-h-[calc(100vh-3rem)] lg:overflow-y-auto\">\n {sidebar}\n </div>\n )}\n <div className=\"flex flex-col gap-6\">\n {topNav && <div className=\"lg:sticky lg:top-6 lg:z-20\">{topNav}</div>}\n <main className=\"flex-1\">{children}</main>\n </div>\n </div>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\n\nimport { AppShell } from \"./app-shell\";\nimport { CraftIcon } from \"@/components/craft-icon\";\nimport { Breadcrumbs } from \"./breadcrumbs\";\nimport { Sidebar, type SidebarItem } from \"./sidebar\";\nimport { TopNav } from \"./top-nav\";\nimport type { LayoutConfig, LayoutSidebarItem } from \"./layout-config\";\n\nexport type AppTemplateProps = {\n config: LayoutConfig;\n headerActions?: React.ReactNode;\n headerBreadcrumb?: React.ReactNode;\n sidebarFooter?: React.ReactNode;\n resolveIcon?: (name: string) => React.ReactNode;\n icons?: Record<string, React.ReactNode>;\n activePath?: string;\n getActivePath?: () => string | undefined;\n lucideFallback?: boolean;\n children: React.ReactNode;\n};\n\nexport function AppTemplate({\n config,\n headerActions,\n headerBreadcrumb,\n sidebarFooter,\n resolveIcon,\n icons,\n activePath,\n getActivePath,\n lucideFallback = true,\n children,\n}: AppTemplateProps) {\n const sidebarConfig = config.sidebar;\n const headerConfig = config.header;\n\n const resolvedActivePath = activePath ?? getActivePath?.();\n\n const buildIcon = React.useCallback(\n (name?: string) => {\n if (!name) return undefined;\n if (resolveIcon) return resolveIcon(name);\n if (icons?.[name]) return icons[name];\n return <CraftIcon name={name} useLucide={lucideFallback} />;\n },\n [icons, lucideFallback, resolveIcon]\n );\n\n const sidebarItems: SidebarItem[] | null = sidebarConfig\n ? sidebarConfig.items.map((item: LayoutSidebarItem) => ({\n label: item.label,\n href: item.href,\n active:\n item.active ??\n (resolvedActivePath && item.href\n ? item.href === resolvedActivePath\n : false),\n icon: buildIcon(item.icon),\n }))\n : null;\n\n const breadcrumbNode =\n headerBreadcrumb ??\n (headerConfig?.breadcrumb ? (\n <Breadcrumbs items={headerConfig.breadcrumb} />\n ) : null);\n\n const sidebarFooterNode =\n sidebarFooter ??\n (sidebarConfig?.footerText ? (\n <div className=\"text-xs text-[rgb(var(--nc-fg-muted))]\">\n {sidebarConfig.footerText}\n </div>\n ) : null);\n\n return (\n <AppShell\n sidebar={\n sidebarConfig && sidebarItems ? (\n <Sidebar\n title={sidebarConfig.title}\n items={sidebarItems}\n footer={sidebarFooterNode}\n />\n ) : undefined\n }\n topNav={\n headerConfig ? (\n <TopNav\n title={headerConfig.title}\n breadcrumb={breadcrumbNode}\n actions={headerActions}\n />\n ) : undefined\n }\n >\n {children}\n </AppShell>\n );\n}\n","\"use client\";\n\nimport * as React from \"react\";\nimport { DynamicIcon } from \"lucide-react/dynamic\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type CraftIconRegistry = Record<string, React.ReactNode>;\n\nconst CraftIconContext = React.createContext<CraftIconRegistry | null>(null);\n\nexport type CraftIconProviderProps = {\n icons: CraftIconRegistry;\n children: React.ReactNode;\n};\n\nexport function CraftIconProvider({ icons, children }: CraftIconProviderProps) {\n return <CraftIconContext.Provider value={icons}>{children}</CraftIconContext.Provider>;\n}\n\nexport type CraftIconProps = {\n name: string;\n className?: string;\n \"aria-label\"?: string;\n icons?: CraftIconRegistry;\n useLucide?: boolean;\n};\n\nexport function CraftIcon({\n name,\n className,\n \"aria-label\": ariaLabel,\n icons,\n useLucide = true,\n}: CraftIconProps) {\n const contextRegistry = React.useContext(CraftIconContext);\n const registry = icons ?? contextRegistry;\n const icon = registry?.[name];\n\n if (!icon) {\n if (!useLucide) return null;\n return (\n <DynamicIcon\n name={name as unknown as React.ComponentProps<typeof DynamicIcon>[\"name\"]}\n className={className}\n aria-hidden={ariaLabel ? undefined : true}\n aria-label={ariaLabel}\n />\n );\n }\n\n type IconElementProps = {\n className?: string;\n \"aria-hidden\"?: boolean;\n \"aria-label\"?: string;\n };\n\n if (React.isValidElement<IconElementProps>(icon)) {\n return React.cloneElement(icon, {\n className: cn(icon.props.className, className),\n \"aria-hidden\": ariaLabel ? undefined : true,\n \"aria-label\": ariaLabel,\n });\n }\n\n return (\n <span className={className} aria-label={ariaLabel}>\n {icon}\n </span>\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type BreadcrumbItem = {\n label: React.ReactNode;\n href?: string;\n};\n\nexport type BreadcrumbsProps = React.HTMLAttributes<HTMLElement> & {\n items: BreadcrumbItem[];\n};\n\nexport function Breadcrumbs({ className, items, ...props }: BreadcrumbsProps) {\n return (\n <nav className={cn(\"flex items-center text-sm text-[rgb(var(--nc-fg-muted))]\", className)} {...props}>\n {items.map((item, index) => {\n const content = item.href ? (\n <a href={item.href} className=\"transition hover:text-[rgb(var(--nc-fg))]\">\n {item.label}\n </a>\n ) : (\n <span className=\"text-[rgb(var(--nc-fg))]\">{item.label}</span>\n );\n\n return (\n <span key={`${item.label}-${index}`} className=\"flex items-center\">\n {content}\n {index < items.length - 1 && (\n <span className=\"mx-2 text-[rgb(var(--nc-fg-soft))]\">/</span>\n )}\n </span>\n );\n })}\n </nav>\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type SidebarItem = {\n label: React.ReactNode;\n href?: string;\n icon?: React.ReactNode;\n active?: boolean;\n};\n\nexport type SidebarProps = React.HTMLAttributes<HTMLElement> & {\n title?: React.ReactNode;\n items: SidebarItem[];\n footer?: React.ReactNode;\n};\n\nexport function Sidebar({ className, title, items, footer, ...props }: SidebarProps) {\n return (\n <aside\n className={cn(\n \"flex h-full w-full flex-col gap-6 rounded-3xl border border-[rgb(var(--nc-border)/0.3)] bg-[rgb(var(--nc-surface)/0.08)] p-6 text-[rgb(var(--nc-fg))] backdrop-blur-xl\",\n className\n )}\n {...props}\n >\n {title && <div className=\"text-lg font-semibold\">{title}</div>}\n <nav className=\"flex flex-col gap-2\">\n {items.map((item, index) => (\n <a\n key={`${item.label}-${index}`}\n href={item.href ?? \"#\"}\n className={cn(\n \"flex items-center gap-3 rounded-2xl px-3 py-2 text-sm transition\",\n item.active\n ? \"bg-[rgb(var(--nc-accent-1)/0.25)] text-[rgb(var(--nc-fg))]\"\n : \"text-[rgb(var(--nc-fg-muted))] hover:bg-[rgb(var(--nc-surface)/0.12)] hover:text-[rgb(var(--nc-fg))]\"\n )}\n >\n {item.icon}\n <span>{item.label}</span>\n </a>\n ))}\n </nav>\n {footer && <div className=\"mt-auto pt-4\">{footer}</div>}\n </aside>\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type TopNavProps = React.HTMLAttributes<HTMLElement> & {\n title?: React.ReactNode;\n actions?: React.ReactNode;\n breadcrumb?: React.ReactNode;\n};\n\nexport function TopNav({ className, title, actions, breadcrumb, ...props }: TopNavProps) {\n return (\n <header\n className={cn(\n \"flex flex-wrap items-center justify-between gap-4 rounded-3xl border border-[rgb(var(--nc-border)/0.3)] bg-[rgb(var(--nc-surface)/0.08)] px-6 py-4 text-[rgb(var(--nc-fg))] backdrop-blur-xl\",\n className\n )}\n {...props}\n >\n <div className=\"space-y-1\">\n {breadcrumb}\n {title && <div className=\"text-xl font-semibold\">{title}</div>}\n </div>\n {actions && <div className=\"flex flex-wrap gap-3\">{actions}</div>}\n </header>\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type PageHeaderProps = React.HTMLAttributes<HTMLDivElement> & {\n title: React.ReactNode;\n description?: React.ReactNode;\n actions?: React.ReactNode;\n};\n\nexport function PageHeader({\n className,\n title,\n description,\n actions,\n ...props\n}: PageHeaderProps) {\n return (\n <div\n className={cn(\"flex flex-wrap items-start justify-between gap-6\", className)}\n {...props}\n >\n <div className=\"space-y-2\">\n <h1 className=\"text-3xl font-bold text-[rgb(var(--nc-fg))]\">{title}</h1>\n {description && <p className=\"text-[rgb(var(--nc-fg-muted))]\">{description}</p>}\n </div>\n {actions && <div className=\"flex flex-wrap gap-3\">{actions}</div>}\n </div>\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type AuthLayoutProps = React.HTMLAttributes<HTMLDivElement> & {\n title?: React.ReactNode;\n description?: React.ReactNode;\n footer?: React.ReactNode;\n graphic?: React.ReactNode;\n};\n\nexport function AuthLayout({\n className,\n title,\n description,\n footer,\n graphic,\n children,\n ...props\n}: AuthLayoutProps) {\n return (\n <div\n className={cn(\n \"grid min-h-screen grid-cols-1 bg-background\",\n \"lg:grid-cols-[1.1fr_0.9fr]\",\n className\n )}\n {...props}\n >\n <div className=\"flex flex-col justify-center px-6 py-16 sm:px-12\">\n <div className=\"mx-auto w-full max-w-md space-y-6\">\n {(title || description) && (\n <div className=\"space-y-2\">\n {title && <h1 className=\"text-3xl font-bold text-[rgb(var(--nc-fg))]\">{title}</h1>}\n {description && <p className=\"text-[rgb(var(--nc-fg-muted))]\">{description}</p>}\n </div>\n )}\n {children}\n {footer && <div className=\"text-sm text-[rgb(var(--nc-fg-muted))]\">{footer}</div>}\n </div>\n </div>\n <div className=\"hidden items-center justify-center border-l border-[rgb(var(--nc-border)/0.3)] bg-[rgb(var(--nc-surface)/0.08)] p-12 text-[rgb(var(--nc-fg))] lg:flex\">\n {graphic ?? (\n <div className=\"max-w-sm space-y-4 text-center\">\n <h2 className=\"text-2xl font-semibold\">Crafted experiences</h2>\n <p className=\"text-[rgb(var(--nc-fg-muted))]\">\n Build authentication flows that feel premium and cohesive.\n </p>\n </div>\n )}\n </div>\n </div>\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type ContainerProps = React.HTMLAttributes<HTMLDivElement> & {\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nconst sizeClasses: Record<NonNullable<ContainerProps[\"size\"]>, string> = {\n sm: \"max-w-3xl\",\n md: \"max-w-5xl\",\n lg: \"max-w-6xl\",\n xl: \"max-w-7xl\",\n};\n\nexport function Container({ className, size = \"lg\", ...props }: ContainerProps) {\n return (\n <div\n className={cn(\"mx-auto w-full px-4 sm:px-6 lg:px-8\", sizeClasses[size], className)}\n {...props}\n />\n );\n}\n","import * as React from \"react\";\n\nimport { cn } from \"@/utils/cn\";\n\nexport type GridProps = React.HTMLAttributes<HTMLDivElement> & {\n columns?: 1 | 2 | 3 | 4 | 5 | 6;\n gap?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n};\n\nconst colClasses: Record<NonNullable<GridProps[\"columns\"]>, string> = {\n 1: \"grid-cols-1\",\n 2: \"grid-cols-1 md:grid-cols-2\",\n 3: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-3\",\n 4: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-4\",\n 5: \"grid-cols-1 md:grid-cols-2 lg:grid-cols-5\",\n 6: \"grid-cols-1 md:grid-cols-3 lg:grid-cols-6\",\n};\n\nconst gapClasses: Record<NonNullable<GridProps[\"gap\"]>, string> = {\n sm: \"gap-4\",\n md: \"gap-6\",\n lg: \"gap-8\",\n xl: \"gap-10\",\n};\n\nexport function Grid({ className, columns = 3, gap = \"md\", ...props }: GridProps) {\n return (\n <div className={cn(\"grid\", colClasses[columns], gapClasses[gap], className)} {...props} />\n );\n}\n","export type LayoutIconName = string;\n\nexport type LayoutBreadcrumbItem = {\n label: string;\n href?: string;\n};\n\nexport type LayoutSidebarItem = {\n label: string;\n href?: string;\n icon?: LayoutIconName;\n active?: boolean;\n};\n\nexport type LayoutConfig = {\n sidebar?: {\n title?: string;\n items: LayoutSidebarItem[];\n footerText?: string;\n };\n header?: {\n title?: string;\n breadcrumb?: LayoutBreadcrumbItem[];\n };\n};\n\nexport const layoutConfigSchema = {\n $schema: \"https://json-schema.org/draft/2020-12/schema\",\n title: \"Nextcraft UI Layout Config\",\n type: \"object\",\n additionalProperties: false,\n properties: {\n sidebar: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n title: { type: \"string\" },\n footerText: { type: \"string\" },\n items: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n label: { type: \"string\" },\n href: { type: \"string\" },\n icon: { type: \"string\" },\n active: { type: \"boolean\" },\n },\n required: [\"label\"],\n },\n },\n },\n required: [\"items\"],\n },\n header: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n title: { type: \"string\" },\n breadcrumb: {\n type: \"array\",\n items: {\n type: \"object\",\n additionalProperties: false,\n properties: {\n label: { type: \"string\" },\n href: { type: \"string\" },\n },\n required: [\"label\"],\n },\n },\n },\n },\n },\n} as const;\n"],"mappings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AAA,EACP,MAAM;AAAA,EACN,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,SAAS;AAAA,MACP,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,YAAY;AAAA,QACV,OAAO,EAAE,MAAM,SAAS;AAAA,QACxB,YAAY,EAAE,MAAM,SAAS;AAAA,QAC7B,OAAO;AAAA,UACL,MAAM;AAAA,UACN,OAAO;AAAA,YACL,MAAM;AAAA,YACN,sBAAsB;AAAA,YACtB,YAAY;AAAA,cACV,OAAO,EAAE,MAAM,SAAS;AAAA,cACxB,MAAM,EAAE,MAAM,SAAS;AAAA,cACvB,MAAM,EAAE,MAAM,SAAS;AAAA,cACvB,QAAQ,EAAE,MAAM,UAAU;AAAA,YAC5B;AAAA,YACA,UAAU,CAAC,OAAO;AAAA,UACpB;AAAA,QACF;AAAA,MACF;AAAA,MACA,UAAU,CAAC,OAAO;AAAA,IACpB;AAAA,IACA,QAAQ;AAAA,MACN,MAAM;AAAA,MACN,sBAAsB;AAAA,MACtB,YAAY;AAAA,QACV,OAAO,EAAE,MAAM,SAAS;AAAA,QACxB,YAAY;AAAA,UACV,MAAM;AAAA,UACN,OAAO;AAAA,YACL,MAAM;AAAA,YACN,sBAAsB;AAAA,YACtB,YAAY;AAAA,cACV,OAAO,EAAE,MAAM,SAAS;AAAA,cACxB,MAAM,EAAE,MAAM,SAAS;AAAA,YACzB;AAAA,YACA,UAAU,CAAC,OAAO;AAAA,UACpB;AAAA,QACF;AAAA,MACF;AAAA,IACF;AAAA,EACF;AACF;","names":["React","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
|
|
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
CHANGED
|
@@ -1,170 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
};
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
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 };
|
|
1
|
+
export { AppShell, AppShellProps } from '../components/layout/app-shell.cjs';
|
|
2
|
+
export { AppTemplate, AppTemplateProps } from '../components/layout/app-template.cjs';
|
|
3
|
+
export { Sidebar, SidebarItem, SidebarProps } from '../components/layout/sidebar.cjs';
|
|
4
|
+
export { TopNav, TopNavProps } from '../components/layout/top-nav.cjs';
|
|
5
|
+
export { PageHeader, PageHeaderProps } from '../components/layout/page-header.cjs';
|
|
6
|
+
export { BreadcrumbItem, Breadcrumbs, BreadcrumbsProps } from '../components/layout/breadcrumbs.cjs';
|
|
7
|
+
export { AuthLayout, AuthLayoutProps } from '../components/layout/auth-layout.cjs';
|
|
8
|
+
export { Container, ContainerProps } from '../components/layout/container.cjs';
|
|
9
|
+
export { Grid, GridProps } from '../components/layout/grid.cjs';
|
|
10
|
+
export { LayoutBreadcrumbItem, LayoutConfig, LayoutIconName, LayoutSidebarItem, layoutConfigSchema } from '../components/layout/layout-config.cjs';
|
|
11
|
+
import 'react/jsx-runtime';
|
|
12
|
+
import 'react';
|