@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.
Files changed (179) hide show
  1. package/CHANGELOG.md +141 -137
  2. package/dist/LuCodeBlock.vue_vue_type_script_setup_true_lang-BjwcjuXF.js +1623 -0
  3. package/dist/LuEmbeddedStatusBar.vue_vue_type_script_setup_true_lang-CIksvebU.js +218 -0
  4. package/dist/LuOverlay.vue_vue_type_script_setup_true_lang-DZch4Vrw.js +226 -0
  5. package/dist/components/LuAlert.vue.d.ts +20 -0
  6. package/dist/components/LuAvatar.vue.d.ts +19 -0
  7. package/dist/components/LuBadge.vue.d.ts +16 -0
  8. package/dist/components/LuBreadcrumb.vue.d.ts +16 -0
  9. package/dist/components/LuButton.vue.d.ts +24 -0
  10. package/dist/components/LuCard.vue.d.ts +21 -0
  11. package/dist/components/LuCheckbox.vue.d.ts +27 -0
  12. package/dist/components/LuCodeBlock.vue.d.ts +29 -0
  13. package/dist/components/LuCollapsible.vue.d.ts +25 -0
  14. package/dist/components/LuDivider.vue.d.ts +8 -0
  15. package/dist/components/LuForm.types.d.ts +18 -0
  16. package/dist/components/LuForm.vue.d.ts +55 -0
  17. package/dist/components/LuIcon.vue.d.ts +18 -0
  18. package/dist/components/LuInput.vue.d.ts +26 -0
  19. package/dist/components/LuLink.vue.d.ts +23 -0
  20. package/dist/components/LuMenu.vue.d.ts +26 -0
  21. package/dist/components/LuMenuItem.vue.d.ts +20 -0
  22. package/dist/components/LuModal.vue.d.ts +32 -0
  23. package/dist/components/LuPageHeader.vue.d.ts +10 -0
  24. package/dist/components/LuPagination.vue.d.ts +18 -0
  25. package/dist/components/LuProgressBar.vue.d.ts +7 -0
  26. package/dist/components/LuRadio.vue.d.ts +18 -0
  27. package/dist/components/LuRadioGroup.types.d.ts +8 -0
  28. package/dist/components/LuRadioGroup.vue.d.ts +24 -0
  29. package/dist/components/LuSelect.vue.d.ts +18 -0
  30. package/dist/components/LuSkeleton.vue.d.ts +5 -0
  31. package/dist/components/LuSpinner.vue.d.ts +5 -0
  32. package/dist/components/LuSwitch.vue.d.ts +15 -0
  33. package/dist/components/LuTab.vue.d.ts +16 -0
  34. package/dist/components/LuTabList.vue.d.ts +15 -0
  35. package/dist/components/LuTabPanel.vue.d.ts +16 -0
  36. package/dist/components/LuTable.vue.d.ts +15 -0
  37. package/dist/components/LuTableBody.vue.d.ts +15 -0
  38. package/dist/components/LuTableCell.vue.d.ts +15 -0
  39. package/dist/components/LuTableHead.vue.d.ts +15 -0
  40. package/dist/components/LuTableHeadCell.vue.d.ts +15 -0
  41. package/dist/components/LuTableRow.vue.d.ts +15 -0
  42. package/dist/components/LuTabs.vue.d.ts +20 -0
  43. package/dist/components/LuTag.vue.d.ts +20 -0
  44. package/dist/components/LuText.vue.d.ts +16 -0
  45. package/dist/components/LuTextarea.vue.d.ts +14 -0
  46. package/dist/components/LuThemeSelect.vue.d.ts +2 -0
  47. package/dist/components/LuThemeSwitch.vue.d.ts +2 -0
  48. package/dist/components/LuToggleButton.vue.d.ts +16 -0
  49. package/dist/components/LuToggleGroup.vue.d.ts +20 -0
  50. package/dist/components/LuTooltip.vue.d.ts +19 -0
  51. package/dist/components/__tests__/LuForm.test.d.ts +1 -0
  52. package/dist/components/index.js +47 -0
  53. package/{src/composables/index.ts → dist/composables/index.d.ts} +0 -1
  54. package/dist/composables/index.js +30 -0
  55. package/dist/composables/useRail.d.ts +6 -0
  56. package/dist/composables/useSplit.d.ts +4 -0
  57. package/dist/composables/useTheme.d.ts +7 -0
  58. package/dist/context-0gENwESP.js +62 -0
  59. package/dist/context.d.ts +8 -0
  60. package/{src/index.ts → dist/index.d.ts} +0 -1
  61. package/dist/index.js +94 -0
  62. package/dist/layout/LuDock.vue.d.ts +9 -0
  63. package/dist/layout/LuDockItem.vue.d.ts +16 -0
  64. package/dist/layout/LuFill.vue.d.ts +21 -0
  65. package/dist/layout/LuFixed.vue.d.ts +21 -0
  66. package/dist/layout/LuGrid.vue.d.ts +26 -0
  67. package/dist/layout/LuOverlay.vue.d.ts +15 -0
  68. package/dist/layout/LuScroll.vue.d.ts +15 -0
  69. package/dist/layout/LuSplit.vue.d.ts +16 -0
  70. package/dist/layout/LuSplitPane.vue.d.ts +18 -0
  71. package/dist/layout/LuSplitResizer.vue.d.ts +5 -0
  72. package/dist/layout/LuStack.vue.d.ts +23 -0
  73. package/{src/layout/index.ts → dist/layout/index.d.ts} +1 -14
  74. package/dist/layout/index.js +14 -0
  75. package/dist/plugin.d.ts +6 -0
  76. package/dist/shell/desktop/LuDesktopRailBar.vue.d.ts +17 -0
  77. package/dist/shell/desktop/LuDesktopRailItem.vue.d.ts +18 -0
  78. package/dist/shell/desktop/LuDesktopShell.vue.d.ts +23 -0
  79. package/dist/shell/desktop/LuDesktopSidebar.vue.d.ts +21 -0
  80. package/dist/shell/desktop/LuDesktopStatusBar.vue.d.ts +15 -0
  81. package/dist/shell/desktop/LuDesktopTopBar.vue.d.ts +15 -0
  82. package/dist/shell/embedded/LuEmbeddedShell.vue.d.ts +19 -0
  83. package/dist/shell/embedded/LuEmbeddedStatusBar.vue.d.ts +17 -0
  84. package/dist/shell/embedded/LuEmbeddedTopBar.vue.d.ts +19 -0
  85. package/{src/shell/index.ts → dist/shell/index.d.ts} +0 -1
  86. package/dist/shell/index.js +15 -0
  87. package/dist/shell/mobile/LuMobileHeader.vue.d.ts +19 -0
  88. package/dist/shell/mobile/LuMobileNavBar.vue.d.ts +15 -0
  89. package/dist/shell/mobile/LuMobileShell.vue.d.ts +21 -0
  90. package/dist/skins/default.d.ts +2 -0
  91. package/{src/skins/default.ts → dist/skins/index.js} +119 -129
  92. package/dist/tailwind.d.ts +1 -0
  93. package/dist/tailwind.js +13 -0
  94. package/dist/types.d.ts +15 -0
  95. package/dist/useTheme-Cd4wVaLs.js +21 -0
  96. package/dist/utils.d.ts +21 -0
  97. package/package.json +94 -69
  98. package/src/lumora.css +16 -16
  99. package/src/components/LuAlert.vue +0 -33
  100. package/src/components/LuAvatar.vue +0 -22
  101. package/src/components/LuBadge.vue +0 -15
  102. package/src/components/LuBreadcrumb.vue +0 -63
  103. package/src/components/LuButton.vue +0 -58
  104. package/src/components/LuCard.vue +0 -27
  105. package/src/components/LuCheckbox.vue +0 -94
  106. package/src/components/LuCodeBlock.vue +0 -168
  107. package/src/components/LuCollapsible.vue +0 -34
  108. package/src/components/LuDivider.vue +0 -18
  109. package/src/components/LuForm.types.ts +0 -24
  110. package/src/components/LuForm.vue +0 -121
  111. package/src/components/LuIcon.vue +0 -39
  112. package/src/components/LuInput.vue +0 -82
  113. package/src/components/LuLink.vue +0 -47
  114. package/src/components/LuMenu.vue +0 -86
  115. package/src/components/LuMenuItem.vue +0 -37
  116. package/src/components/LuModal.vue +0 -115
  117. package/src/components/LuPageHeader.vue +0 -24
  118. package/src/components/LuPagination.vue +0 -118
  119. package/src/components/LuProgressBar.vue +0 -21
  120. package/src/components/LuRadio.vue +0 -55
  121. package/src/components/LuRadioGroup.types.ts +0 -10
  122. package/src/components/LuRadioGroup.vue +0 -66
  123. package/src/components/LuSelect.vue +0 -67
  124. package/src/components/LuSkeleton.vue +0 -15
  125. package/src/components/LuSpinner.vue +0 -36
  126. package/src/components/LuSwitch.vue +0 -76
  127. package/src/components/LuTab.vue +0 -26
  128. package/src/components/LuTabList.vue +0 -15
  129. package/src/components/LuTabPanel.vue +0 -19
  130. package/src/components/LuTable.vue +0 -15
  131. package/src/components/LuTableBody.vue +0 -15
  132. package/src/components/LuTableCell.vue +0 -15
  133. package/src/components/LuTableHead.vue +0 -15
  134. package/src/components/LuTableHeadCell.vue +0 -15
  135. package/src/components/LuTableRow.vue +0 -15
  136. package/src/components/LuTabs.vue +0 -30
  137. package/src/components/LuTag.vue +0 -35
  138. package/src/components/LuText.vue +0 -18
  139. package/src/components/LuTextarea.vue +0 -62
  140. package/src/components/LuThemeSelect.vue +0 -26
  141. package/src/components/LuThemeSwitch.vue +0 -22
  142. package/src/components/LuToggleButton.vue +0 -35
  143. package/src/components/LuToggleGroup.vue +0 -27
  144. package/src/components/LuTooltip.vue +0 -36
  145. package/src/components/__tests__/LuForm.test.ts +0 -206
  146. package/src/composables/useRail.ts +0 -24
  147. package/src/composables/useSplit.ts +0 -17
  148. package/src/composables/useTheme.ts +0 -36
  149. package/src/context.ts +0 -39
  150. package/src/layout/LuDock.vue +0 -56
  151. package/src/layout/LuDockItem.vue +0 -20
  152. package/src/layout/LuFill.vue +0 -27
  153. package/src/layout/LuFixed.vue +0 -27
  154. package/src/layout/LuGrid.vue +0 -45
  155. package/src/layout/LuOverlay.vue +0 -17
  156. package/src/layout/LuScroll.vue +0 -19
  157. package/src/layout/LuSplit.vue +0 -23
  158. package/src/layout/LuSplitPane.vue +0 -32
  159. package/src/layout/LuSplitResizer.vue +0 -19
  160. package/src/layout/LuStack.vue +0 -29
  161. package/src/plugin.ts +0 -28
  162. package/src/shell/desktop/LuDesktopRailBar.vue +0 -23
  163. package/src/shell/desktop/LuDesktopRailItem.vue +0 -23
  164. package/src/shell/desktop/LuDesktopShell.vue +0 -25
  165. package/src/shell/desktop/LuDesktopSidebar.vue +0 -36
  166. package/src/shell/desktop/LuDesktopStatusBar.vue +0 -15
  167. package/src/shell/desktop/LuDesktopTopBar.vue +0 -15
  168. package/src/shell/embedded/LuEmbeddedShell.vue +0 -20
  169. package/src/shell/embedded/LuEmbeddedStatusBar.vue +0 -16
  170. package/src/shell/embedded/LuEmbeddedTopBar.vue +0 -17
  171. package/src/shell/mobile/LuMobileHeader.vue +0 -17
  172. package/src/shell/mobile/LuMobileNavBar.vue +0 -15
  173. package/src/shell/mobile/LuMobileShell.vue +0 -21
  174. package/src/tailwind.ts +0 -25
  175. package/src/types.ts +0 -18
  176. package/src/utils.ts +0 -95
  177. package/tsconfig.json +0 -10
  178. /package/{src/components/index.ts → dist/components/index.d.ts} +0 -0
  179. /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
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.base.json",
3
- "compilerOptions": {
4
- "baseUrl": ".",
5
- "paths": {
6
- "@astrake/lumora-ui/*": ["./src/*"]
7
- }
8
- },
9
- "include": ["src/**/*.ts", "src/**/*.vue"]
10
- }
File without changes