pika-ux 1.0.0-beta.0
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/LICENSE +9 -0
- package/dist/icon-generator/generate-icon-ts-indices.js +78 -0
- package/dist/shadcn-postinstall/index.js +114 -0
- package/package.json +102 -0
- package/readme.md +50 -0
- package/scripts/setup.js +100 -0
- package/src/App.svelte +51 -0
- package/src/app.css +349 -0
- package/src/icons/ci/index.d.ts +5009 -0
- package/src/icons/lucide/index.d.ts +11274 -0
- package/src/index.ts +23 -0
- package/src/lib/docsite/Navigation.svelte +77 -0
- package/src/lib/docsite/pages/Colors.svelte +35 -0
- package/src/lib/docsite/pages/Components.svelte +50 -0
- package/src/lib/docsite/pages/GettingStarted.svelte +21 -0
- package/src/lib/docsite/pages/Icons.svelte +22 -0
- package/src/lib/docsite/pages/components/Button.svelte +40 -0
- package/src/main.ts +9 -0
- package/src/pika/chip/chip.svelte +95 -0
- package/src/pika/chip/index.ts +1 -0
- package/src/pika/combobox/combobox-types.ts +5 -0
- package/src/pika/combobox/combobox.svelte +221 -0
- package/src/pika/combobox/index.ts +2 -0
- package/src/pika/confirm-dialog/confirm-dialog.svelte +48 -0
- package/src/pika/confirm-dialog/index.ts +1 -0
- package/src/pika/copy-button/copy-button.svelte +134 -0
- package/src/pika/copy-button/index.ts +1 -0
- package/src/pika/create-copy-link-button/create-copy-link-button.svelte +133 -0
- package/src/pika/create-copy-link-button/index.ts +1 -0
- package/src/pika/date-picker/date-picker.svelte +33 -0
- package/src/pika/date-picker/index.ts +1 -0
- package/src/pika/date-range-picker/date-range-picker.svelte +48 -0
- package/src/pika/date-range-picker/index.ts +1 -0
- package/src/pika/date-time-picker/date-time-picker.svelte +336 -0
- package/src/pika/date-time-picker/index.ts +1 -0
- package/src/pika/expandable-container/expandable-container.svelte +155 -0
- package/src/pika/expandable-container/index.ts +1 -0
- package/src/pika/index.ts +29 -0
- package/src/pika/list/index.ts +2 -0
- package/src/pika/list/list-types.ts +5 -0
- package/src/pika/list/list.svelte +349 -0
- package/src/pika/markdown-editor/github.scss +87 -0
- package/src/pika/markdown-editor/index.ts +1 -0
- package/src/pika/markdown-editor/markdown-editor.svelte +44 -0
- package/src/pika/permanent-toast/index.ts +1 -0
- package/src/pika/permanent-toast/permanent-toast.svelte +47 -0
- package/src/pika/pika-alert/index.ts +1 -0
- package/src/pika/pika-alert/pika-alert.svelte +53 -0
- package/src/pika/pika-badge/index.ts +1 -0
- package/src/pika/pika-badge/pika-badge.svelte +61 -0
- package/src/pika/pika-table/index.ts +7 -0
- package/src/pika/pika-table/pika-table-cell.svelte +9 -0
- package/src/pika/pika-table/pika-table-checkbox.svelte +8 -0
- package/src/pika/pika-table/pika-table-column-header.svelte +88 -0
- package/src/pika/pika-table/pika-table-faceted-filter.svelte +109 -0
- package/src/pika/pika-table/pika-table-pagination.svelte +95 -0
- package/src/pika/pika-table/pika-table-row-actions.svelte +58 -0
- package/src/pika/pika-table/pika-table-toolbar.svelte +88 -0
- package/src/pika/pika-table/pika-table-view-options.svelte +35 -0
- package/src/pika/pika-table/pika-table.svelte +295 -0
- package/src/pika/pika-table/types.ts +106 -0
- package/src/pika/pika-tabs/index.ts +18 -0
- package/src/pika/pika-tabs/tabs-content.svelte +16 -0
- package/src/pika/pika-tabs/tabs-list.svelte +12 -0
- package/src/pika/pika-tabs/tabs-trigger.svelte +23 -0
- package/src/pika/popup-help/index.ts +1 -0
- package/src/pika/popup-help/popup-help.svelte +33 -0
- package/src/pika/simple-dropdown/index.ts +2 -0
- package/src/pika/simple-dropdown/simple-dropdown-types.ts +5 -0
- package/src/pika/simple-dropdown/simple-dropdown.svelte +288 -0
- package/src/pika/slideout/constants.ts +5 -0
- package/src/pika/slideout/context.svelte.ts +110 -0
- package/src/pika/slideout/index.ts +19 -0
- package/src/pika/slideout/slideout-content.svelte +36 -0
- package/src/pika/slideout/slideout-panel.svelte +126 -0
- package/src/pika/slideout/slideout-provider.svelte +49 -0
- package/src/pika/slideout/slideout-rail.svelte.die +69 -0
- package/src/pika/slideout/slideout.svelte +33 -0
- package/src/pika/slideout/slideout.svelte.old +113 -0
- package/src/pika/text-wave-shimmer/index.ts +1 -0
- package/src/pika/text-wave-shimmer/text-wave-shimmer.svelte +43 -0
- package/src/pika/tooltip-plus/index.ts +1 -0
- package/src/pika/tooltip-plus/tooltip-plus.svelte +42 -0
- package/src/shadcn/.DS_Store +0 -0
- package/src/shadcn/alert/alert-description.svelte +11 -0
- package/src/shadcn/alert/alert-title.svelte +24 -0
- package/src/shadcn/alert/alert.svelte +39 -0
- package/src/shadcn/alert/index.ts +14 -0
- package/src/shadcn/avatar/avatar-fallback.svelte +13 -0
- package/src/shadcn/avatar/avatar-image.svelte +13 -0
- package/src/shadcn/avatar/avatar.svelte +19 -0
- package/src/shadcn/avatar/index.ts +13 -0
- package/src/shadcn/badge/badge.svelte +48 -0
- package/src/shadcn/badge/index.ts +2 -0
- package/src/shadcn/breadcrumb/breadcrumb-ellipsis.svelte +12 -0
- package/src/shadcn/breadcrumb/breadcrumb-item.svelte +20 -0
- package/src/shadcn/breadcrumb/breadcrumb-link.svelte +31 -0
- package/src/shadcn/breadcrumb/breadcrumb-list.svelte +20 -0
- package/src/shadcn/breadcrumb/breadcrumb-page.svelte +23 -0
- package/src/shadcn/breadcrumb/breadcrumb-separator.svelte +15 -0
- package/src/shadcn/breadcrumb/breadcrumb.svelte +15 -0
- package/src/shadcn/breadcrumb/index.ts +25 -0
- package/src/shadcn/button/button.svelte +81 -0
- package/src/shadcn/button/index.ts +17 -0
- package/src/shadcn/calendar/calendar-caption.svelte +76 -0
- package/src/shadcn/calendar/calendar-cell.svelte +19 -0
- package/src/shadcn/calendar/calendar-day.svelte +31 -0
- package/src/shadcn/calendar/calendar-grid-body.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid-head.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid-row.svelte +12 -0
- package/src/shadcn/calendar/calendar-grid.svelte +16 -0
- package/src/shadcn/calendar/calendar-head-cell.svelte +16 -0
- package/src/shadcn/calendar/calendar-header.svelte +16 -0
- package/src/shadcn/calendar/calendar-heading.svelte +12 -0
- package/src/shadcn/calendar/calendar-month-select.svelte +25 -0
- package/src/shadcn/calendar/calendar-month.svelte +15 -0
- package/src/shadcn/calendar/calendar-months.svelte +20 -0
- package/src/shadcn/calendar/calendar-nav.svelte +19 -0
- package/src/shadcn/calendar/calendar-next-button.svelte +19 -0
- package/src/shadcn/calendar/calendar-prev-button.svelte +19 -0
- package/src/shadcn/calendar/calendar-year-select.svelte +25 -0
- package/src/shadcn/calendar/calendar.svelte +61 -0
- package/src/shadcn/calendar/index.ts +30 -0
- package/src/shadcn/card/card-content.svelte +16 -0
- package/src/shadcn/card/card-description.svelte +16 -0
- package/src/shadcn/card/card-footer.svelte +16 -0
- package/src/shadcn/card/card-header.svelte +16 -0
- package/src/shadcn/card/card-title.svelte +25 -0
- package/src/shadcn/card/card.svelte +20 -0
- package/src/shadcn/card/index.ts +22 -0
- package/src/shadcn/carousel/carousel-content.svelte +39 -0
- package/src/shadcn/carousel/carousel-item.svelte +26 -0
- package/src/shadcn/carousel/carousel-next.svelte +30 -0
- package/src/shadcn/carousel/carousel-previous.svelte +30 -0
- package/src/shadcn/carousel/carousel.svelte +88 -0
- package/src/shadcn/carousel/context.ts +51 -0
- package/src/shadcn/carousel/index.ts +19 -0
- package/src/shadcn/checkbox/checkbox.svelte +36 -0
- package/src/shadcn/checkbox/index.ts +6 -0
- package/src/shadcn/collapsible/collapsible-content.svelte +7 -0
- package/src/shadcn/collapsible/collapsible-trigger.svelte +7 -0
- package/src/shadcn/collapsible/collapsible.svelte +11 -0
- package/src/shadcn/collapsible/index.ts +13 -0
- package/src/shadcn/command/command-dialog.svelte +40 -0
- package/src/shadcn/command/command-empty.svelte +13 -0
- package/src/shadcn/command/command-group.svelte +30 -0
- package/src/shadcn/command/command-input.svelte +21 -0
- package/src/shadcn/command/command-item.svelte +16 -0
- package/src/shadcn/command/command-link-item.svelte +16 -0
- package/src/shadcn/command/command-list.svelte +13 -0
- package/src/shadcn/command/command-separator.svelte +13 -0
- package/src/shadcn/command/command-shortcut.svelte +20 -0
- package/src/shadcn/command/command.svelte +19 -0
- package/src/shadcn/command/index.ts +40 -0
- package/src/shadcn/data-table/data-table.svelte.ts +141 -0
- package/src/shadcn/data-table/flex-render.svelte +36 -0
- package/src/shadcn/data-table/index.ts +3 -0
- package/src/shadcn/data-table/render-helpers.ts +111 -0
- package/src/shadcn/dialog/dialog-close.svelte +7 -0
- package/src/shadcn/dialog/dialog-content.svelte +43 -0
- package/src/shadcn/dialog/dialog-description.svelte +13 -0
- package/src/shadcn/dialog/dialog-footer.svelte +20 -0
- package/src/shadcn/dialog/dialog-header.svelte +20 -0
- package/src/shadcn/dialog/dialog-overlay.svelte +16 -0
- package/src/shadcn/dialog/dialog-title.svelte +13 -0
- package/src/shadcn/dialog/dialog-trigger.svelte +7 -0
- package/src/shadcn/dialog/index.ts +37 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-checkbox-item.svelte +41 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-content.svelte +27 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group-heading.svelte +22 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-group.svelte +7 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-item.svelte +27 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-label.svelte +24 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-group.svelte +16 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-radio-item.svelte +26 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-separator.svelte +13 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-shortcut.svelte +20 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-content.svelte +16 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-sub-trigger.svelte +29 -0
- package/src/shadcn/dropdown-menu/dropdown-menu-trigger.svelte +7 -0
- package/src/shadcn/dropdown-menu/index.ts +49 -0
- package/src/shadcn/index.ts +40 -0
- package/src/shadcn/input/index.ts +7 -0
- package/src/shadcn/input/input.svelte +51 -0
- package/src/shadcn/is-mobile.svelte.ts +9 -0
- package/src/shadcn/label/index.ts +7 -0
- package/src/shadcn/label/label.svelte +16 -0
- package/src/shadcn/popover/index.ts +17 -0
- package/src/shadcn/popover/popover-content.svelte +29 -0
- package/src/shadcn/popover/popover-trigger.svelte +8 -0
- package/src/shadcn/radio-group/index.ts +10 -0
- package/src/shadcn/radio-group/radio-group-item.svelte +25 -0
- package/src/shadcn/radio-group/radio-group.svelte +19 -0
- package/src/shadcn/range-calendar/index.ts +30 -0
- package/src/shadcn/range-calendar/range-calendar-cell.svelte +19 -0
- package/src/shadcn/range-calendar/range-calendar-day.svelte +35 -0
- package/src/shadcn/range-calendar/range-calendar-grid-body.svelte +12 -0
- package/src/shadcn/range-calendar/range-calendar-grid-head.svelte +12 -0
- package/src/shadcn/range-calendar/range-calendar-grid-row.svelte +12 -0
- package/src/shadcn/range-calendar/range-calendar-grid.svelte +16 -0
- package/src/shadcn/range-calendar/range-calendar-head-cell.svelte +16 -0
- package/src/shadcn/range-calendar/range-calendar-header.svelte +16 -0
- package/src/shadcn/range-calendar/range-calendar-heading.svelte +16 -0
- package/src/shadcn/range-calendar/range-calendar-months.svelte +20 -0
- package/src/shadcn/range-calendar/range-calendar-next-button.svelte +18 -0
- package/src/shadcn/range-calendar/range-calendar-prev-button.svelte +18 -0
- package/src/shadcn/range-calendar/range-calendar.svelte +57 -0
- package/src/shadcn/resizable/index.ts +13 -0
- package/src/shadcn/resizable/resizable-handle.svelte +30 -0
- package/src/shadcn/resizable/resizable-pane-group.svelte +22 -0
- package/src/shadcn/scroll-area/index.ts +10 -0
- package/src/shadcn/scroll-area/scroll-area-scrollbar.svelte +28 -0
- package/src/shadcn/scroll-area/scroll-area.svelte +35 -0
- package/src/shadcn/select/index.ts +37 -0
- package/src/shadcn/select/select-content.svelte +38 -0
- package/src/shadcn/select/select-group-heading.svelte +21 -0
- package/src/shadcn/select/select-group.svelte +7 -0
- package/src/shadcn/select/select-item.svelte +31 -0
- package/src/shadcn/select/select-label.svelte +20 -0
- package/src/shadcn/select/select-scroll-down-button.svelte +11 -0
- package/src/shadcn/select/select-scroll-up-button.svelte +11 -0
- package/src/shadcn/select/select-separator.svelte +14 -0
- package/src/shadcn/select/select-trigger.svelte +30 -0
- package/src/shadcn/separator/index.ts +7 -0
- package/src/shadcn/separator/separator.svelte +16 -0
- package/src/shadcn/sheet/index.ts +36 -0
- package/src/shadcn/sheet/sheet-close.svelte +7 -0
- package/src/shadcn/sheet/sheet-content.svelte +66 -0
- package/src/shadcn/sheet/sheet-description.svelte +13 -0
- package/src/shadcn/sheet/sheet-footer.svelte +15 -0
- package/src/shadcn/sheet/sheet-header.svelte +15 -0
- package/src/shadcn/sheet/sheet-overlay.svelte +16 -0
- package/src/shadcn/sheet/sheet-title.svelte +13 -0
- package/src/shadcn/sheet/sheet-trigger.svelte +7 -0
- package/src/shadcn/sidebar/constants.ts +6 -0
- package/src/shadcn/sidebar/context.svelte.ts +80 -0
- package/src/shadcn/sidebar/index.ts +75 -0
- package/src/shadcn/sidebar/sidebar-content.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-footer.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-group-action.svelte +36 -0
- package/src/shadcn/sidebar/sidebar-group-content.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-group-label.svelte +34 -0
- package/src/shadcn/sidebar/sidebar-group.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-header.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-input.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-inset.svelte +24 -0
- package/src/shadcn/sidebar/sidebar-menu-action.svelte +43 -0
- package/src/shadcn/sidebar/sidebar-menu-badge.svelte +29 -0
- package/src/shadcn/sidebar/sidebar-menu-button.svelte +101 -0
- package/src/shadcn/sidebar/sidebar-menu-item.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-menu-skeleton.svelte +36 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-button.svelte +43 -0
- package/src/shadcn/sidebar/sidebar-menu-sub-item.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-menu-sub.svelte +25 -0
- package/src/shadcn/sidebar/sidebar-menu.svelte +21 -0
- package/src/shadcn/sidebar/sidebar-provider.svelte +46 -0
- package/src/shadcn/sidebar/sidebar-rail.svelte +36 -0
- package/src/shadcn/sidebar/sidebar-separator.svelte +15 -0
- package/src/shadcn/sidebar/sidebar-trigger.svelte +35 -0
- package/src/shadcn/sidebar/sidebar.svelte +94 -0
- package/src/shadcn/skeleton/index.ts +7 -0
- package/src/shadcn/skeleton/skeleton.svelte +17 -0
- package/src/shadcn/slider/index.ts +7 -0
- package/src/shadcn/slider/slider.svelte +44 -0
- package/src/shadcn/sonner/index.ts +1 -0
- package/src/shadcn/sonner/sonner.svelte +13 -0
- package/src/shadcn/switch/index.ts +7 -0
- package/src/shadcn/switch/switch.svelte +27 -0
- package/src/shadcn/table/index.ts +28 -0
- package/src/shadcn/table/table-body.svelte +15 -0
- package/src/shadcn/table/table-caption.svelte +20 -0
- package/src/shadcn/table/table-cell.svelte +20 -0
- package/src/shadcn/table/table-footer.svelte +20 -0
- package/src/shadcn/table/table-head.svelte +23 -0
- package/src/shadcn/table/table-header.svelte +15 -0
- package/src/shadcn/table/table-row.svelte +23 -0
- package/src/shadcn/table/table.svelte +17 -0
- package/src/shadcn/tabs/index.ts +18 -0
- package/src/shadcn/tabs/tabs-content.svelte +21 -0
- package/src/shadcn/tabs/tabs-list.svelte +19 -0
- package/src/shadcn/tabs/tabs-trigger.svelte +21 -0
- package/src/shadcn/textarea/index.ts +7 -0
- package/src/shadcn/textarea/textarea.svelte +22 -0
- package/src/shadcn/toggle/index.ts +13 -0
- package/src/shadcn/toggle/toggle.svelte +51 -0
- package/src/shadcn/toggle-group/index.ts +10 -0
- package/src/shadcn/toggle-group/toggle-group-item.svelte +30 -0
- package/src/shadcn/toggle-group/toggle-group.svelte +41 -0
- package/src/shadcn/tooltip/index.ts +21 -0
- package/src/shadcn/tooltip/tooltip-content.svelte +47 -0
- package/src/shadcn/tooltip/tooltip-trigger.svelte +7 -0
- package/src/shadcn/utils.ts +14 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Rithum Holdings, Inc., together with its affiliates
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, mkdirSync, writeFileSync, readdirSync, readFileSync } from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
|
|
6
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = path.dirname(__filename);
|
|
8
|
+
var iconsDirPath = path.resolve(__dirname, "../../src/icons");
|
|
9
|
+
if (!existsSync(iconsDirPath)) {
|
|
10
|
+
mkdirSync(iconsDirPath, { recursive: true });
|
|
11
|
+
}
|
|
12
|
+
function getIconNamesFromCollection(collectionName) {
|
|
13
|
+
try {
|
|
14
|
+
const collectionPath = path.resolve(__dirname, `../../node_modules/@iconify-json/${collectionName}/icons.json`);
|
|
15
|
+
if (!existsSync(collectionPath)) {
|
|
16
|
+
console.log(`Collection ${collectionName} not found at ${collectionPath}`);
|
|
17
|
+
return [];
|
|
18
|
+
}
|
|
19
|
+
const collectionData = JSON.parse(readFileSync(collectionPath, "utf8"));
|
|
20
|
+
return Object.keys(collectionData.icons || {});
|
|
21
|
+
} catch (error) {
|
|
22
|
+
console.error(`Error reading collection ${collectionName}:`, error);
|
|
23
|
+
return [];
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
function getInstalledCollections() {
|
|
27
|
+
const nodeModulesPath = path.resolve(__dirname, "../../node_modules/@iconify-json");
|
|
28
|
+
if (!existsSync(nodeModulesPath)) {
|
|
29
|
+
console.log("No @iconify-json packages found");
|
|
30
|
+
return [];
|
|
31
|
+
}
|
|
32
|
+
return readdirSync(nodeModulesPath).filter((item) => !item.startsWith("."));
|
|
33
|
+
}
|
|
34
|
+
function generateCollectionDeclarationContent(collection, iconNames) {
|
|
35
|
+
const declarations = iconNames.map(
|
|
36
|
+
(iconName) => `declare module '$icons/${collection}/${iconName}' {
|
|
37
|
+
import type { Component } from 'svelte';
|
|
38
|
+
import type { SvelteHTMLElements } from 'svelte/elements';
|
|
39
|
+
const component: Component<SvelteHTMLElements['svg']>;
|
|
40
|
+
export default component;
|
|
41
|
+
}`
|
|
42
|
+
);
|
|
43
|
+
return `// ${collection} icons - Type declarations only
|
|
44
|
+
// Auto-generated by tools/icon-generator/generate-icon-ts-indices.ts
|
|
45
|
+
// These declarations provide IDE autocomplete without runtime imports
|
|
46
|
+
// Exported by pika-ux for consumer projects
|
|
47
|
+
|
|
48
|
+
${declarations.join("\n\n")}
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
function main() {
|
|
52
|
+
const collections = getInstalledCollections();
|
|
53
|
+
if (collections.length === 0) {
|
|
54
|
+
console.log("No Iconify collections found. Please install some with:");
|
|
55
|
+
console.log("pnpm install @iconify-json/lucide @iconify-json/ci");
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
console.log(`Found ${collections.length} Iconify collections: ${collections.join(", ")}`);
|
|
59
|
+
const collectionsWithIcons = [];
|
|
60
|
+
collections.forEach((collection) => {
|
|
61
|
+
const iconNames = getIconNamesFromCollection(collection);
|
|
62
|
+
console.log(`Found ${iconNames.length} icons in ${collection}`);
|
|
63
|
+
if (iconNames.length > 0) {
|
|
64
|
+
collectionsWithIcons.push(collection);
|
|
65
|
+
const collectionDirPath = path.resolve(iconsDirPath, collection);
|
|
66
|
+
if (!existsSync(collectionDirPath)) {
|
|
67
|
+
mkdirSync(collectionDirPath, { recursive: true });
|
|
68
|
+
}
|
|
69
|
+
const collectionFilePath = path.resolve(collectionDirPath, "index.d.ts");
|
|
70
|
+
const content = generateCollectionDeclarationContent(collection, iconNames);
|
|
71
|
+
writeFileSync(collectionFilePath, content);
|
|
72
|
+
console.log(`Created ${collectionFilePath}`);
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
console.log(`Icon declaration files generation complete! Generated types for ${collectionsWithIcons.length} collections.`);
|
|
76
|
+
console.log("These types will be exported by pika-ux and consumed by other projects.");
|
|
77
|
+
}
|
|
78
|
+
main();
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { existsSync, readdirSync, statSync, readFileSync, writeFileSync } from 'fs';
|
|
3
|
+
import path from 'path';
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
|
|
6
|
+
var __filename = fileURLToPath(import.meta.url);
|
|
7
|
+
var __dirname = path.dirname(__filename);
|
|
8
|
+
var shadcnDirPath = path.resolve(__dirname, "../../src/shadcn");
|
|
9
|
+
function calculateRelativePath(fromFile, toPath) {
|
|
10
|
+
const fromDir = path.dirname(fromFile);
|
|
11
|
+
const fromDepth = fromDir.replace(shadcnDirPath, "").split("/").length - 1;
|
|
12
|
+
const cleanToPath = toPath.startsWith("shadcn/") ? toPath.replace("shadcn/", "") : toPath;
|
|
13
|
+
const upLevels = fromDepth > 0 ? "../".repeat(fromDepth) : "./";
|
|
14
|
+
return upLevels + cleanToPath;
|
|
15
|
+
}
|
|
16
|
+
function getAllShadcnFiles(dir = shadcnDirPath) {
|
|
17
|
+
const files = [];
|
|
18
|
+
if (!existsSync(dir)) {
|
|
19
|
+
console.log(`Directory ${dir} does not exist`);
|
|
20
|
+
return files;
|
|
21
|
+
}
|
|
22
|
+
const entries = readdirSync(dir);
|
|
23
|
+
for (const entry of entries) {
|
|
24
|
+
const fullPath = path.join(dir, entry);
|
|
25
|
+
const stat = statSync(fullPath);
|
|
26
|
+
if (stat.isDirectory()) {
|
|
27
|
+
files.push(...getAllShadcnFiles(fullPath));
|
|
28
|
+
} else if (stat.isFile() && (entry.endsWith(".svelte") || entry.endsWith(".ts"))) {
|
|
29
|
+
files.push(fullPath);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
return files;
|
|
33
|
+
}
|
|
34
|
+
function normalizeImports(content, filePath) {
|
|
35
|
+
const importPattern = /import\s+(?:(?:\{[^}]*\}|\*\s+as\s+\w+|\w+)(?:\s*,\s*(?:\{[^}]*\}|\*\s+as\s+\w+|\w+))*\s+from\s+['"])([^'"]+)(['"])/g;
|
|
36
|
+
let updatedContent = content;
|
|
37
|
+
let match;
|
|
38
|
+
while ((match = importPattern.exec(content)) !== null) {
|
|
39
|
+
const [fullMatch, importPath, quote] = match;
|
|
40
|
+
if (importPath.startsWith("$ui/shadcn/is-mobile.svelte.js")) {
|
|
41
|
+
const newImport = fullMatch.replace(importPath, "../is-mobile.svelte.js");
|
|
42
|
+
updatedContent = updatedContent.replace(fullMatch, newImport);
|
|
43
|
+
console.log(` ${path.basename(filePath)}: ${importPath} \u2192 ../is-mobile.svelte.js`);
|
|
44
|
+
} else if (importPath.startsWith("$ui/shadcn/")) {
|
|
45
|
+
const componentPath = importPath.replace("$ui/shadcn/", "");
|
|
46
|
+
const relativePath = calculateRelativePath(filePath, componentPath);
|
|
47
|
+
const newImport = fullMatch.replace(importPath, relativePath);
|
|
48
|
+
updatedContent = updatedContent.replace(fullMatch, newImport);
|
|
49
|
+
console.log(` ${path.basename(filePath)}: ${importPath} \u2192 ${relativePath}`);
|
|
50
|
+
} else if (importPath.startsWith("$ui/")) {
|
|
51
|
+
const targetPath = importPath.replace("$ui/", "../");
|
|
52
|
+
const newImport = fullMatch.replace(importPath, targetPath);
|
|
53
|
+
updatedContent = updatedContent.replace(fullMatch, newImport);
|
|
54
|
+
console.log(` ${path.basename(filePath)}: ${importPath} \u2192 ${targetPath}`);
|
|
55
|
+
} else if (importPath.startsWith("$lib/")) {
|
|
56
|
+
const targetPath = importPath.replace("$lib/", "../lib/");
|
|
57
|
+
const newImport = fullMatch.replace(importPath, targetPath);
|
|
58
|
+
updatedContent = updatedContent.replace(fullMatch, newImport);
|
|
59
|
+
console.log(` ${path.basename(filePath)}: ${importPath} \u2192 ${targetPath}`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return updatedContent;
|
|
63
|
+
}
|
|
64
|
+
function processFile(filePath) {
|
|
65
|
+
try {
|
|
66
|
+
const originalContent = readFileSync(filePath, "utf8");
|
|
67
|
+
const normalizedContent = normalizeImports(originalContent, filePath);
|
|
68
|
+
if (originalContent !== normalizedContent) {
|
|
69
|
+
writeFileSync(filePath, normalizedContent);
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
return false;
|
|
73
|
+
} catch (error) {
|
|
74
|
+
console.error(`Error processing ${filePath}:`, error);
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
function main() {
|
|
79
|
+
console.log("\u{1F527} shadcn-svelte Post-Install Normalizer");
|
|
80
|
+
console.log("Converting alias-based imports to relative imports...\n");
|
|
81
|
+
const files = getAllShadcnFiles();
|
|
82
|
+
if (files.length === 0) {
|
|
83
|
+
console.log("No .svelte or .ts files found in src/shadcn/");
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
console.log(`Found ${files.length} files to process:`);
|
|
87
|
+
let processedCount = 0;
|
|
88
|
+
let changedCount = 0;
|
|
89
|
+
for (const file of files) {
|
|
90
|
+
console.log(`
|
|
91
|
+
Processing: ${path.relative(shadcnDirPath, file)}`);
|
|
92
|
+
const wasChanged = processFile(file);
|
|
93
|
+
processedCount++;
|
|
94
|
+
if (wasChanged) {
|
|
95
|
+
changedCount++;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
console.log(`
|
|
99
|
+
Processing complete!`);
|
|
100
|
+
console.log(`Files processed: ${processedCount}`);
|
|
101
|
+
console.log(`Files modified: ${changedCount}`);
|
|
102
|
+
if (changedCount > 0) {
|
|
103
|
+
console.log("\n All shadcn components now use relative imports!");
|
|
104
|
+
console.log("They will work correctly in all three scenarios:");
|
|
105
|
+
console.log(" 1. pika-ux project itself");
|
|
106
|
+
console.log(" 2. Monorepo projects (workspace:*)");
|
|
107
|
+
console.log(" 3. External npm projects");
|
|
108
|
+
} else {
|
|
109
|
+
console.log("\n All files were already using relative imports.");
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (import.meta.url === `file://${process.argv[1]}`) {
|
|
113
|
+
main();
|
|
114
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "pika-ux",
|
|
3
|
+
"version": "1.0.0-beta.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./src/index.ts",
|
|
7
|
+
"./pika/*/": "./src/pika/*/",
|
|
8
|
+
"./shadcn/*/": "./src/shadcn/*/",
|
|
9
|
+
"./icons/*": "./src/icons/*",
|
|
10
|
+
"./app.css": "./src/app.css",
|
|
11
|
+
"./tools/icon-generator": "./dist/icon-generator/generate-icon-ts-indices.js",
|
|
12
|
+
"./tools/shadcn-postinstall": "./dist/shadcn-postinstall/index.js"
|
|
13
|
+
},
|
|
14
|
+
"bin": {
|
|
15
|
+
"pika-ux-setup": "./scripts/setup.js",
|
|
16
|
+
"pika-ux-icons": "./dist/icon-generator/generate-icon-ts-indices.js",
|
|
17
|
+
"pika-ux-normalize": "./dist/shadcn-postinstall/index.js"
|
|
18
|
+
},
|
|
19
|
+
"files": [
|
|
20
|
+
"src/**",
|
|
21
|
+
"dist/**",
|
|
22
|
+
"scripts/**"
|
|
23
|
+
],
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@lucide/svelte": "^0.482.0",
|
|
26
|
+
"@sveltejs/vite-plugin-svelte": "^6.2.0",
|
|
27
|
+
"@tailwindcss/typography": "^0.5.16",
|
|
28
|
+
"@tailwindcss/vite": "^4.1.13",
|
|
29
|
+
"@tsconfig/svelte": "^5.0.5",
|
|
30
|
+
"@types/indefinite": "^2.3.4",
|
|
31
|
+
"@types/node": "^22.15.17",
|
|
32
|
+
"eslint": "^9.26.0",
|
|
33
|
+
"tailwind-variants": "^3.1.1",
|
|
34
|
+
"tailwindcss": "^4.1.11",
|
|
35
|
+
"tsup": "^8.4.0",
|
|
36
|
+
"tsx": "^4.19.4",
|
|
37
|
+
"tw-animate-css": "^1.4.0",
|
|
38
|
+
"typescript": "^5.9.2",
|
|
39
|
+
"vite": "^7.1.7",
|
|
40
|
+
"@pika/typescript-config": "0.0.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependencies": {
|
|
43
|
+
"svelte": "^5.0.0"
|
|
44
|
+
},
|
|
45
|
+
"dependencies": {
|
|
46
|
+
"@cartamd/plugin-code": "^4.2.0",
|
|
47
|
+
"@iconify-json/ci": "^1.2.2",
|
|
48
|
+
"@iconify-json/lucide": "^1.2.44",
|
|
49
|
+
"@internationalized/date": "^3.8.1",
|
|
50
|
+
"@tanstack/table-core": "^8.21.3",
|
|
51
|
+
"bits-ui": "^2.9.1",
|
|
52
|
+
"carta-md": "^4.11.1",
|
|
53
|
+
"clsx": "^2.1.1",
|
|
54
|
+
"date-fns": "^4.1.0",
|
|
55
|
+
"date-fns-tz": "^3.2.0",
|
|
56
|
+
"indefinite": "^2.5.1",
|
|
57
|
+
"mode-watcher": "^1.0.7",
|
|
58
|
+
"paneforge": "^1.0.2",
|
|
59
|
+
"plur": "^5.1.0",
|
|
60
|
+
"svelte-sonner": "^1.0.5",
|
|
61
|
+
"tailwind-merge": "^3.3.1",
|
|
62
|
+
"unplugin-icons": "^22.3.0"
|
|
63
|
+
},
|
|
64
|
+
"keywords": [
|
|
65
|
+
"pika",
|
|
66
|
+
"ui",
|
|
67
|
+
"components",
|
|
68
|
+
"svelte",
|
|
69
|
+
"shadcn",
|
|
70
|
+
"design-system"
|
|
71
|
+
],
|
|
72
|
+
"repository": {
|
|
73
|
+
"type": "git",
|
|
74
|
+
"url": "https://github.com/rithum/pika.git",
|
|
75
|
+
"directory": "packages/pika-ux"
|
|
76
|
+
},
|
|
77
|
+
"bugs": {
|
|
78
|
+
"url": "https://github.com/rithum/pika/issues"
|
|
79
|
+
},
|
|
80
|
+
"homepage": "https://github.com/rithum/pika#readme",
|
|
81
|
+
"publishConfig": {
|
|
82
|
+
"access": "public",
|
|
83
|
+
"registry": "https://registry.npmjs.org/"
|
|
84
|
+
},
|
|
85
|
+
"scripts": {
|
|
86
|
+
"dev": "vite",
|
|
87
|
+
"build": "pnpm run icons:generate && tsup",
|
|
88
|
+
"setup": "node scripts/setup.js",
|
|
89
|
+
"icons:generate": "tsx tools/icon-generator/generate-icon-ts-indices.ts",
|
|
90
|
+
"shadcn:normalize": "tsx tools/shadcn-postinstall/index.ts",
|
|
91
|
+
"lint": "eslint src/",
|
|
92
|
+
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist",
|
|
93
|
+
"check-types": "tsc --noEmit",
|
|
94
|
+
"version:patch": "pnpm version patch --git-tag-version=true",
|
|
95
|
+
"version:minor": "pnpm version minor --git-tag-version=true",
|
|
96
|
+
"version:major": "pnpm version major --git-tag-version=true",
|
|
97
|
+
"release:patch": "pnpm run build && pnpm run version:patch && pnpm publish && git push && git push --tags",
|
|
98
|
+
"release:minor": "pnpm run build && pnpm run version:minor && pnpm publish && git push && git push --tags",
|
|
99
|
+
"release:major": "pnpm run build && pnpm run version:major && pnpm publish && git push && git push --tags",
|
|
100
|
+
"release:dry": "pnpm run build && pnpm publish --dry-run"
|
|
101
|
+
}
|
|
102
|
+
}
|
package/readme.md
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# pika-ux
|
|
2
|
+
|
|
3
|
+
UI Components library for the Pika project. This package contains both custom Pika components and shadcn/ui components adapted for Svelte.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install pika-ux
|
|
9
|
+
# or
|
|
10
|
+
pnpm install pika-ux
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
### Importing Components
|
|
16
|
+
|
|
17
|
+
You can import components from either the `pika` or `shadcn` collections:
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
// Pika custom components
|
|
21
|
+
import { Chip } from 'pika-ux/pika/chip';
|
|
22
|
+
import { PikaAlert } from 'pika-ux/pika/pika-alert';
|
|
23
|
+
|
|
24
|
+
// shadcn/ui components
|
|
25
|
+
import { Button } from 'pika-ux/shadcn/button';
|
|
26
|
+
import { Card } from 'pika-ux/shadcn/card';
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Component Collections
|
|
30
|
+
|
|
31
|
+
### Pika Components
|
|
32
|
+
|
|
33
|
+
Custom UI components designed specifically for the Pika framework.
|
|
34
|
+
|
|
35
|
+
### shadcn Components
|
|
36
|
+
|
|
37
|
+
Svelte implementations of popular shadcn/ui components.
|
|
38
|
+
|
|
39
|
+
## Development
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Install dependencies
|
|
43
|
+
pnpm install
|
|
44
|
+
|
|
45
|
+
# Build the library
|
|
46
|
+
pnpm run build
|
|
47
|
+
|
|
48
|
+
# Watch for changes during development
|
|
49
|
+
pnpm run dev
|
|
50
|
+
```
|
package/scripts/setup.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import fs from 'fs';
|
|
4
|
+
import path from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = path.dirname(__filename);
|
|
9
|
+
|
|
10
|
+
// Default components.json configuration
|
|
11
|
+
const defaultComponentsConfig = {
|
|
12
|
+
$schema: 'https://shadcn-svelte.com/schema.json',
|
|
13
|
+
tailwind: {
|
|
14
|
+
css: 'src/app.css',
|
|
15
|
+
baseColor: 'slate'
|
|
16
|
+
},
|
|
17
|
+
aliases: {
|
|
18
|
+
components: '$lib/components',
|
|
19
|
+
utils: '$lib/utils',
|
|
20
|
+
ui: '$lib/components/ui',
|
|
21
|
+
hooks: '$lib/hooks',
|
|
22
|
+
lib: '$lib'
|
|
23
|
+
},
|
|
24
|
+
typescript: true,
|
|
25
|
+
registry: 'https://tw3.shadcn-svelte.com/registry/new-york'
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Default alias configuration for svelte.config.js
|
|
29
|
+
const svelteAliases = {
|
|
30
|
+
$ui: 'node_modules/pika-ux/src'
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
function findProjectRoot() {
|
|
34
|
+
let currentDir = process.cwd();
|
|
35
|
+
|
|
36
|
+
while (currentDir !== path.parse(currentDir).root) {
|
|
37
|
+
if (fs.existsSync(path.join(currentDir, 'package.json'))) {
|
|
38
|
+
return currentDir;
|
|
39
|
+
}
|
|
40
|
+
currentDir = path.dirname(currentDir);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
throw new Error('Could not find project root (no package.json found)');
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function setupComponentsJson(projectRoot) {
|
|
47
|
+
const componentsJsonPath = path.join(projectRoot, 'components.json');
|
|
48
|
+
|
|
49
|
+
if (!fs.existsSync(componentsJsonPath)) {
|
|
50
|
+
console.log('Creating components.json...');
|
|
51
|
+
fs.writeFileSync(componentsJsonPath, JSON.stringify(defaultComponentsConfig, null, 4));
|
|
52
|
+
console.log('ā
Created components.json');
|
|
53
|
+
} else {
|
|
54
|
+
console.log('ā
components.json already exists');
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function updateSvelteConfig(projectRoot) {
|
|
59
|
+
const svelteConfigPath = path.join(projectRoot, 'svelte.config.js');
|
|
60
|
+
|
|
61
|
+
if (fs.existsSync(svelteConfigPath)) {
|
|
62
|
+
console.log('Found svelte.config.js - please add these aliases manually:');
|
|
63
|
+
console.log(JSON.stringify(svelteAliases, null, 2));
|
|
64
|
+
console.log('Add them to your kit.alias configuration');
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
function updateViteConfig(projectRoot) {
|
|
69
|
+
const viteConfigPath = path.join(projectRoot, 'vite.config.js');
|
|
70
|
+
const viteConfigTsPath = path.join(projectRoot, 'vite.config.ts');
|
|
71
|
+
|
|
72
|
+
if (fs.existsSync(viteConfigPath) || fs.existsSync(viteConfigTsPath)) {
|
|
73
|
+
console.log('Found vite config - please add these aliases manually:');
|
|
74
|
+
console.log(JSON.stringify(svelteAliases, null, 2));
|
|
75
|
+
console.log('Add them to your resolve.alias configuration');
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
function main() {
|
|
80
|
+
try {
|
|
81
|
+
console.log('š§ Setting up pika-ux...');
|
|
82
|
+
|
|
83
|
+
const projectRoot = findProjectRoot();
|
|
84
|
+
console.log(`Project root: ${projectRoot}`);
|
|
85
|
+
|
|
86
|
+
setupComponentsJson(projectRoot);
|
|
87
|
+
updateSvelteConfig(projectRoot);
|
|
88
|
+
updateViteConfig(projectRoot);
|
|
89
|
+
|
|
90
|
+
console.log('\nā
Setup complete!');
|
|
91
|
+
console.log('\nNext steps:');
|
|
92
|
+
console.log('1. Update your svelte.config.js or vite.config.js with the suggested aliases');
|
|
93
|
+
console.log('2. Import components: import { Button } from "pika-ux/shadcn/button"');
|
|
94
|
+
} catch (error) {
|
|
95
|
+
console.error('ā Setup failed:', error.message);
|
|
96
|
+
process.exit(1);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
main();
|
package/src/App.svelte
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import './app.css';
|
|
3
|
+
import Navigation from './lib/docsite/Navigation.svelte';
|
|
4
|
+
|
|
5
|
+
// Page components
|
|
6
|
+
import GettingStarted from './lib/docsite/pages/GettingStarted.svelte';
|
|
7
|
+
import Icons from './lib/docsite/pages/Icons.svelte';
|
|
8
|
+
import Colors from './lib/docsite/pages/Colors.svelte';
|
|
9
|
+
import Components from './lib/docsite/pages/Components.svelte';
|
|
10
|
+
import Button from './lib/docsite/pages/components/Button.svelte';
|
|
11
|
+
|
|
12
|
+
// Simple routing state
|
|
13
|
+
let currentPage = $state('getting-started');
|
|
14
|
+
|
|
15
|
+
function handleNavigate(page: string) {
|
|
16
|
+
currentPage = page;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Component mapping
|
|
20
|
+
const pageComponents = {
|
|
21
|
+
'getting-started': GettingStarted,
|
|
22
|
+
icons: Icons,
|
|
23
|
+
colors: Colors,
|
|
24
|
+
components: Components,
|
|
25
|
+
'components/button': Button
|
|
26
|
+
} as const;
|
|
27
|
+
|
|
28
|
+
// Derived component based on current page
|
|
29
|
+
const CurrentComponent = $derived(pageComponents[currentPage as keyof typeof pageComponents] || GettingStarted);
|
|
30
|
+
</script>
|
|
31
|
+
|
|
32
|
+
<div class="flex h-screen bg-background">
|
|
33
|
+
<!-- Navigation Sidebar -->
|
|
34
|
+
<div class="w-64 flex-shrink-0">
|
|
35
|
+
<!-- @ts-expect-error SimpleNavigation props working correctly -->
|
|
36
|
+
<Navigation {currentPage} onNavigate={handleNavigate} />
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<!-- Main Content Area -->
|
|
40
|
+
<main class="flex-1 overflow-auto">
|
|
41
|
+
<CurrentComponent />
|
|
42
|
+
</main>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<style>
|
|
46
|
+
:global(html, body) {
|
|
47
|
+
height: 100%;
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
}
|
|
51
|
+
</style>
|