@astrake/lumora-ui 0.2.0 → 0.2.1
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/CHANGELOG.md +141 -137
- package/dist/LuCodeBlock.vue_vue_type_script_setup_true_lang-BjwcjuXF.js +1623 -0
- package/dist/LuEmbeddedStatusBar.vue_vue_type_script_setup_true_lang-CIksvebU.js +218 -0
- package/dist/LuOverlay.vue_vue_type_script_setup_true_lang-DZch4Vrw.js +226 -0
- package/dist/components/LuAlert.vue.d.ts +20 -0
- package/dist/components/LuAvatar.vue.d.ts +19 -0
- package/dist/components/LuBadge.vue.d.ts +16 -0
- package/dist/components/LuBreadcrumb.vue.d.ts +16 -0
- package/dist/components/LuButton.vue.d.ts +24 -0
- package/dist/components/LuCard.vue.d.ts +21 -0
- package/dist/components/LuCheckbox.vue.d.ts +27 -0
- package/dist/components/LuCodeBlock.vue.d.ts +29 -0
- package/dist/components/LuCollapsible.vue.d.ts +25 -0
- package/dist/components/LuDivider.vue.d.ts +8 -0
- package/dist/components/LuForm.types.d.ts +18 -0
- package/dist/components/LuForm.vue.d.ts +55 -0
- package/dist/components/LuIcon.vue.d.ts +18 -0
- package/dist/components/LuInput.vue.d.ts +26 -0
- package/dist/components/LuLink.vue.d.ts +23 -0
- package/dist/components/LuMenu.vue.d.ts +26 -0
- package/dist/components/LuMenuItem.vue.d.ts +20 -0
- package/dist/components/LuModal.vue.d.ts +32 -0
- package/dist/components/LuPageHeader.vue.d.ts +10 -0
- package/dist/components/LuPagination.vue.d.ts +18 -0
- package/dist/components/LuProgressBar.vue.d.ts +7 -0
- package/dist/components/LuRadio.vue.d.ts +18 -0
- package/dist/components/LuRadioGroup.types.d.ts +8 -0
- package/dist/components/LuRadioGroup.vue.d.ts +24 -0
- package/dist/components/LuSelect.vue.d.ts +18 -0
- package/dist/components/LuSkeleton.vue.d.ts +5 -0
- package/dist/components/LuSpinner.vue.d.ts +5 -0
- package/dist/components/LuSwitch.vue.d.ts +15 -0
- package/dist/components/LuTab.vue.d.ts +16 -0
- package/dist/components/LuTabList.vue.d.ts +15 -0
- package/dist/components/LuTabPanel.vue.d.ts +16 -0
- package/dist/components/LuTable.vue.d.ts +15 -0
- package/dist/components/LuTableBody.vue.d.ts +15 -0
- package/dist/components/LuTableCell.vue.d.ts +15 -0
- package/dist/components/LuTableHead.vue.d.ts +15 -0
- package/dist/components/LuTableHeadCell.vue.d.ts +15 -0
- package/dist/components/LuTableRow.vue.d.ts +15 -0
- package/dist/components/LuTabs.vue.d.ts +20 -0
- package/dist/components/LuTag.vue.d.ts +20 -0
- package/dist/components/LuText.vue.d.ts +16 -0
- package/dist/components/LuTextarea.vue.d.ts +14 -0
- package/dist/components/LuThemeSelect.vue.d.ts +2 -0
- package/dist/components/LuThemeSwitch.vue.d.ts +2 -0
- package/dist/components/LuToggleButton.vue.d.ts +16 -0
- package/dist/components/LuToggleGroup.vue.d.ts +20 -0
- package/dist/components/LuTooltip.vue.d.ts +19 -0
- package/dist/components/__tests__/LuForm.test.d.ts +1 -0
- package/dist/components/index.js +47 -0
- package/{src/composables/index.ts → dist/composables/index.d.ts} +0 -1
- package/dist/composables/index.js +30 -0
- package/dist/composables/useRail.d.ts +6 -0
- package/dist/composables/useSplit.d.ts +4 -0
- package/dist/composables/useTheme.d.ts +7 -0
- package/dist/context-0gENwESP.js +62 -0
- package/dist/context.d.ts +8 -0
- package/{src/index.ts → dist/index.d.ts} +0 -1
- package/dist/index.js +94 -0
- package/dist/layout/LuDock.vue.d.ts +9 -0
- package/dist/layout/LuDockItem.vue.d.ts +16 -0
- package/dist/layout/LuFill.vue.d.ts +21 -0
- package/dist/layout/LuFixed.vue.d.ts +21 -0
- package/dist/layout/LuGrid.vue.d.ts +26 -0
- package/dist/layout/LuOverlay.vue.d.ts +15 -0
- package/dist/layout/LuScroll.vue.d.ts +15 -0
- package/dist/layout/LuSplit.vue.d.ts +16 -0
- package/dist/layout/LuSplitPane.vue.d.ts +18 -0
- package/dist/layout/LuSplitResizer.vue.d.ts +5 -0
- package/dist/layout/LuStack.vue.d.ts +23 -0
- package/{src/layout/index.ts → dist/layout/index.d.ts} +1 -14
- package/dist/layout/index.js +14 -0
- package/dist/plugin.d.ts +6 -0
- package/dist/shell/desktop/LuDesktopRailBar.vue.d.ts +17 -0
- package/dist/shell/desktop/LuDesktopRailItem.vue.d.ts +18 -0
- package/dist/shell/desktop/LuDesktopShell.vue.d.ts +23 -0
- package/dist/shell/desktop/LuDesktopSidebar.vue.d.ts +21 -0
- package/dist/shell/desktop/LuDesktopStatusBar.vue.d.ts +15 -0
- package/dist/shell/desktop/LuDesktopTopBar.vue.d.ts +15 -0
- package/dist/shell/embedded/LuEmbeddedShell.vue.d.ts +19 -0
- package/dist/shell/embedded/LuEmbeddedStatusBar.vue.d.ts +17 -0
- package/dist/shell/embedded/LuEmbeddedTopBar.vue.d.ts +19 -0
- package/{src/shell/index.ts → dist/shell/index.d.ts} +0 -1
- package/dist/shell/index.js +15 -0
- package/dist/shell/mobile/LuMobileHeader.vue.d.ts +19 -0
- package/dist/shell/mobile/LuMobileNavBar.vue.d.ts +15 -0
- package/dist/shell/mobile/LuMobileShell.vue.d.ts +21 -0
- package/dist/skins/default.d.ts +2 -0
- package/{src/skins/default.ts → dist/skins/index.js} +119 -129
- package/dist/tailwind.d.ts +1 -0
- package/dist/tailwind.js +13 -0
- package/dist/types.d.ts +15 -0
- package/dist/useTheme-Cd4wVaLs.js +21 -0
- package/dist/utils.d.ts +21 -0
- package/package.json +94 -69
- package/src/lumora.css +16 -16
- package/src/components/LuAlert.vue +0 -33
- package/src/components/LuAvatar.vue +0 -22
- package/src/components/LuBadge.vue +0 -15
- package/src/components/LuBreadcrumb.vue +0 -63
- package/src/components/LuButton.vue +0 -58
- package/src/components/LuCard.vue +0 -27
- package/src/components/LuCheckbox.vue +0 -94
- package/src/components/LuCodeBlock.vue +0 -168
- package/src/components/LuCollapsible.vue +0 -34
- package/src/components/LuDivider.vue +0 -18
- package/src/components/LuForm.types.ts +0 -24
- package/src/components/LuForm.vue +0 -121
- package/src/components/LuIcon.vue +0 -39
- package/src/components/LuInput.vue +0 -82
- package/src/components/LuLink.vue +0 -47
- package/src/components/LuMenu.vue +0 -86
- package/src/components/LuMenuItem.vue +0 -37
- package/src/components/LuModal.vue +0 -115
- package/src/components/LuPageHeader.vue +0 -24
- package/src/components/LuPagination.vue +0 -118
- package/src/components/LuProgressBar.vue +0 -21
- package/src/components/LuRadio.vue +0 -55
- package/src/components/LuRadioGroup.types.ts +0 -10
- package/src/components/LuRadioGroup.vue +0 -66
- package/src/components/LuSelect.vue +0 -67
- package/src/components/LuSkeleton.vue +0 -15
- package/src/components/LuSpinner.vue +0 -36
- package/src/components/LuSwitch.vue +0 -76
- package/src/components/LuTab.vue +0 -26
- package/src/components/LuTabList.vue +0 -15
- package/src/components/LuTabPanel.vue +0 -19
- package/src/components/LuTable.vue +0 -15
- package/src/components/LuTableBody.vue +0 -15
- package/src/components/LuTableCell.vue +0 -15
- package/src/components/LuTableHead.vue +0 -15
- package/src/components/LuTableHeadCell.vue +0 -15
- package/src/components/LuTableRow.vue +0 -15
- package/src/components/LuTabs.vue +0 -30
- package/src/components/LuTag.vue +0 -35
- package/src/components/LuText.vue +0 -18
- package/src/components/LuTextarea.vue +0 -62
- package/src/components/LuThemeSelect.vue +0 -26
- package/src/components/LuThemeSwitch.vue +0 -22
- package/src/components/LuToggleButton.vue +0 -35
- package/src/components/LuToggleGroup.vue +0 -27
- package/src/components/LuTooltip.vue +0 -36
- package/src/components/__tests__/LuForm.test.ts +0 -206
- package/src/composables/useRail.ts +0 -24
- package/src/composables/useSplit.ts +0 -17
- package/src/composables/useTheme.ts +0 -36
- package/src/context.ts +0 -39
- package/src/layout/LuDock.vue +0 -56
- package/src/layout/LuDockItem.vue +0 -20
- package/src/layout/LuFill.vue +0 -27
- package/src/layout/LuFixed.vue +0 -27
- package/src/layout/LuGrid.vue +0 -45
- package/src/layout/LuOverlay.vue +0 -17
- package/src/layout/LuScroll.vue +0 -19
- package/src/layout/LuSplit.vue +0 -23
- package/src/layout/LuSplitPane.vue +0 -32
- package/src/layout/LuSplitResizer.vue +0 -19
- package/src/layout/LuStack.vue +0 -29
- package/src/plugin.ts +0 -28
- package/src/shell/desktop/LuDesktopRailBar.vue +0 -23
- package/src/shell/desktop/LuDesktopRailItem.vue +0 -23
- package/src/shell/desktop/LuDesktopShell.vue +0 -25
- package/src/shell/desktop/LuDesktopSidebar.vue +0 -36
- package/src/shell/desktop/LuDesktopStatusBar.vue +0 -15
- package/src/shell/desktop/LuDesktopTopBar.vue +0 -15
- package/src/shell/embedded/LuEmbeddedShell.vue +0 -20
- package/src/shell/embedded/LuEmbeddedStatusBar.vue +0 -16
- package/src/shell/embedded/LuEmbeddedTopBar.vue +0 -17
- package/src/shell/mobile/LuMobileHeader.vue +0 -17
- package/src/shell/mobile/LuMobileNavBar.vue +0 -15
- package/src/shell/mobile/LuMobileShell.vue +0 -21
- package/src/tailwind.ts +0 -25
- package/src/types.ts +0 -18
- package/src/utils.ts +0 -95
- package/tsconfig.json +0 -10
- /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
- /package/{src/skins/index.ts → dist/skins/index.d.ts} +0 -0
package/src/tailwind.ts
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module";
|
|
2
|
-
import path from "node:path";
|
|
3
|
-
|
|
4
|
-
// getLumoraSourceDir() — resolves the absolute path to @astrake/lumora-ui/src
|
|
5
|
-
//
|
|
6
|
-
// PRIMARY use: Tailwind CSS v4 via @tailwindcss/vite
|
|
7
|
-
// In your CSS entry file:
|
|
8
|
-
// @import "tailwindcss";
|
|
9
|
-
// @source "/absolute/path/from/getLumoraSourceDir()";
|
|
10
|
-
// Or use the @source directive with a relative path manually:
|
|
11
|
-
// @source "../../node_modules/@astrake/lumora-ui/src";
|
|
12
|
-
//
|
|
13
|
-
// NOTE: The framework ships lumora.css for all structural layout.
|
|
14
|
-
// You only need this helper if your skin strings use Tailwind utility classes.
|
|
15
|
-
|
|
16
|
-
export function getLumoraSourceDir(importerUrl?: string): string {
|
|
17
|
-
try {
|
|
18
|
-
const req = createRequire(importerUrl ?? import.meta.url);
|
|
19
|
-
const pkgRoot = path.dirname(req.resolve("@astrake/lumora-ui/package.json"));
|
|
20
|
-
return path.join(pkgRoot, "src");
|
|
21
|
-
} catch {
|
|
22
|
-
// Fallback: relative path from project root
|
|
23
|
-
return "./node_modules/@astrake/lumora-ui/src";
|
|
24
|
-
}
|
|
25
|
-
}
|
package/src/types.ts
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { Component, Ref, ComputedRef } from "vue";
|
|
2
|
-
|
|
3
|
-
export type SkinMap = {
|
|
4
|
-
[componentName: string]: {
|
|
5
|
-
default?: string;
|
|
6
|
-
[variant: string]: string | undefined;
|
|
7
|
-
};
|
|
8
|
-
};
|
|
9
|
-
|
|
10
|
-
export type IconResolver = (name: string, size?: number) => Component | null;
|
|
11
|
-
|
|
12
|
-
export interface LumoraUIConfig {
|
|
13
|
-
target?: "mobile" | "desktop" | "embedded";
|
|
14
|
-
skin?: SkinMap | Ref<SkinMap> | ComputedRef<SkinMap>;
|
|
15
|
-
locale?: string;
|
|
16
|
-
a11y?: boolean;
|
|
17
|
-
icons?: IconResolver;
|
|
18
|
-
}
|
package/src/utils.ts
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
import { clsx, type ClassValue } from "clsx";
|
|
2
|
-
import { twMerge } from "tailwind-merge";
|
|
3
|
-
import type { SkinMap } from "./types";
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* Merges Tailwind classes intelligently
|
|
7
|
-
*/
|
|
8
|
-
export function cn(...inputs: ClassValue[]) {
|
|
9
|
-
return twMerge(clsx(inputs));
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* Extends a base skin with a user skin, intelligently merging Tailwind classes
|
|
14
|
-
*/
|
|
15
|
-
export function extendSkin(baseSkin: SkinMap, userSkin: SkinMap): SkinMap {
|
|
16
|
-
const merged: SkinMap = { ...baseSkin };
|
|
17
|
-
|
|
18
|
-
for (const componentName in userSkin) {
|
|
19
|
-
if (!merged[componentName]) {
|
|
20
|
-
merged[componentName] = { ...userSkin[componentName] };
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const componentBase = merged[componentName];
|
|
25
|
-
const componentUser = userSkin[componentName];
|
|
26
|
-
|
|
27
|
-
const mergedComponent: any = { ...componentBase };
|
|
28
|
-
|
|
29
|
-
for (const variant in componentUser) {
|
|
30
|
-
if (componentBase[variant]) {
|
|
31
|
-
mergedComponent[variant] = cn(componentBase[variant], componentUser[variant]);
|
|
32
|
-
} else {
|
|
33
|
-
mergedComponent[variant] = componentUser[variant];
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
merged[componentName] = mergedComponent;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
return merged;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
/**
|
|
44
|
-
* Resolves standard layout props to Tailwind classes statically.
|
|
45
|
-
*/
|
|
46
|
-
export function resolveLayoutProps(props: {
|
|
47
|
-
gap?: string | number,
|
|
48
|
-
padding?: string | number,
|
|
49
|
-
align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline',
|
|
50
|
-
justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly',
|
|
51
|
-
width?: string,
|
|
52
|
-
height?: string
|
|
53
|
-
}): string {
|
|
54
|
-
const classes: string[] = [];
|
|
55
|
-
|
|
56
|
-
if (props.gap) classes.push(`gap-${props.gap}`);
|
|
57
|
-
if (props.padding) classes.push(`p-${props.padding}`);
|
|
58
|
-
|
|
59
|
-
if (props.align) {
|
|
60
|
-
const alignMap: Record<string, string> = {
|
|
61
|
-
'start': 'items-start',
|
|
62
|
-
'center': 'items-center',
|
|
63
|
-
'end': 'items-end',
|
|
64
|
-
'stretch': 'items-stretch',
|
|
65
|
-
'baseline': 'items-baseline'
|
|
66
|
-
};
|
|
67
|
-
if (alignMap[props.align]) classes.push(alignMap[props.align]);
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
if (props.justify) {
|
|
71
|
-
const justifyMap: Record<string, string> = {
|
|
72
|
-
'start': 'justify-start',
|
|
73
|
-
'center': 'justify-center',
|
|
74
|
-
'end': 'justify-end',
|
|
75
|
-
'between': 'justify-between',
|
|
76
|
-
'around': 'justify-around',
|
|
77
|
-
'evenly': 'justify-evenly'
|
|
78
|
-
};
|
|
79
|
-
if (justifyMap[props.justify]) classes.push(justifyMap[props.justify]);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
if (props.width) {
|
|
83
|
-
if (props.width === 'full') classes.push('w-full');
|
|
84
|
-
else if (props.width === 'screen') classes.push('w-screen');
|
|
85
|
-
else classes.push(`w-${props.width}`);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (props.height) {
|
|
89
|
-
if (props.height === 'full') classes.push('h-full');
|
|
90
|
-
else if (props.height === 'screen') classes.push('h-screen');
|
|
91
|
-
else classes.push(`h-${props.height}`);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return classes.join(' ');
|
|
95
|
-
}
|
package/tsconfig.json
DELETED
|
File without changes
|
|
File without changes
|