@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/context.ts DELETED
@@ -1,39 +0,0 @@
1
- import { inject, isRef, type InjectionKey, type Component } from "vue";
2
- import type { LumoraUIConfig, SkinMap } from "./types";
3
- import { extendSkin, cn } from "./utils";
4
- import { defaultSkin } from "./skins/default";
5
-
6
- export const LumoraUIConfigKey: InjectionKey<LumoraUIConfig> = Symbol("LumoraUIConfig");
7
-
8
- export function useLumoraConfig() {
9
- const config = inject(LumoraUIConfigKey, {});
10
-
11
- const resolveSkin = (componentName: string, variant?: string): string => {
12
- // Unwrap the user's skin map if it's a ref
13
- const userSkinMap = isRef(config.skin) ? config.skin.value : (config.skin || {});
14
-
15
- // The base structural skin merged with any consumer overrides
16
- const skinMap = extendSkin(defaultSkin, userSkinMap);
17
-
18
- const componentSkin = skinMap[componentName];
19
- if (!componentSkin) return "";
20
-
21
- const classes: string[] = [];
22
- if (componentSkin.default) {
23
- classes.push(componentSkin.default);
24
- }
25
- if (variant && componentSkin[variant]) {
26
- classes.push(componentSkin[variant] as string);
27
- }
28
-
29
- // Use cn() so that variant classes intelligently override default classes
30
- return cn(classes);
31
- };
32
-
33
- const resolveIcon = (name: string, size?: number): Component | null => {
34
- if (!config.icons) return null;
35
- return config.icons(name, size);
36
- };
37
-
38
- return { config, resolveSkin, resolveIcon };
39
- }
@@ -1,56 +0,0 @@
1
- <script lang="ts">
2
- import { h, defineComponent, computed, Fragment, VNode, Comment } from "vue";
3
- import { useLumoraConfig } from "../context";
4
-
5
- export default defineComponent({
6
- name: "LuDock",
7
- props: {
8
- variant: String,
9
- },
10
- setup(props, { slots, attrs }) {
11
- const { resolveSkin } = useLumoraConfig();
12
- const resolvedSkin = computed(() => resolveSkin("LuDock", props.variant));
13
-
14
- function flattenChildren(children: any[]): VNode[] {
15
- let result: VNode[] = [];
16
- for (const child of children) {
17
- if (Array.isArray(child)) {
18
- result.push(...flattenChildren(child));
19
- } else if (child.type === Fragment) {
20
- result.push(...flattenChildren(child.children as any[]));
21
- } else if (child && child.type && child.type !== Comment) {
22
- result.push(child);
23
- }
24
- }
25
- return result;
26
- }
27
-
28
- return () => {
29
- const defaultSlot = slots.default ? slots.default() : [];
30
- const children = flattenChildren(defaultSlot);
31
-
32
- if (children.length === 0) {
33
- return h("div", { ...attrs, class: resolvedSkin.value });
34
- }
35
-
36
- let currentContainer = h("div", { class: "flex flex-col flex-1 min-h-0 min-w-0 overflow-hidden" }, [children[children.length - 1]]);
37
-
38
- for (let i = children.length - 2; i >= 0; i--) {
39
- const item = children[i];
40
- const edge = item.props?.dock || "left";
41
-
42
- const isVertical = edge === "top" || edge === "bottom";
43
- const flexDirection = isVertical ? "flex-col" : "flex-row";
44
-
45
- const nodes = (edge === "top" || edge === "left")
46
- ? [item, currentContainer]
47
- : [currentContainer, item];
48
-
49
- currentContainer = h("div", { class: `flex ${flexDirection} flex-1 min-h-0 min-w-0 overflow-hidden` }, nodes);
50
- }
51
-
52
- return h("div", { ...attrs, class: resolvedSkin.value }, [currentContainer]);
53
- };
54
- }
55
- });
56
- </script>
@@ -1,20 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../context";
10
-
11
- const props = defineProps<{
12
- dock?: "top" | "bottom" | "left" | "right" | "fill";
13
- variant?: string;
14
- }>();
15
-
16
- const { resolveSkin } = useLumoraConfig();
17
- const resolvedSkin = computed(() => [
18
- resolveSkin("LuDockItem", props.dock ?? props.variant)
19
- ]);
20
- </script>
@@ -1,27 +0,0 @@
1
- <template>
2
- <component :is="as" v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </component>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../context";
10
- import { resolveLayoutProps, cn } from "../utils";
11
-
12
- const props = withDefaults(defineProps<{
13
- variant?: string;
14
- as?: string;
15
- width?: string;
16
- height?: string;
17
- padding?: string | number;
18
- }>(), {
19
- as: 'div'
20
- });
21
-
22
- const { resolveSkin } = useLumoraConfig();
23
- const resolvedSkin = computed(() => cn(
24
- resolveSkin("LuFill", props.variant),
25
- resolveLayoutProps(props)
26
- ));
27
- </script>
@@ -1,27 +0,0 @@
1
- <template>
2
- <component :is="as" v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </component>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../context";
10
- import { resolveLayoutProps, cn } from "../utils";
11
-
12
- const props = withDefaults(defineProps<{
13
- variant?: string;
14
- as?: string;
15
- width?: string;
16
- height?: string;
17
- padding?: string | number;
18
- }>(), {
19
- as: 'div'
20
- });
21
-
22
- const { resolveSkin } = useLumoraConfig();
23
- const resolvedSkin = computed(() => cn(
24
- resolveSkin("LuFixed", props.variant),
25
- resolveLayoutProps(props)
26
- ));
27
- </script>
@@ -1,45 +0,0 @@
1
- <template>
2
- <component :is="as" v-bind="$attrs" :class="resolvedSkin" :style="gridStyle">
3
- <slot />
4
- </component>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../context";
10
- import { resolveLayoutProps, cn } from "../utils";
11
-
12
- const props = withDefaults(defineProps<{
13
- cols?: number;
14
- smCols?: number;
15
- mdCols?: number;
16
- lgCols?: number;
17
- variant?: string;
18
- as?: string;
19
- gap?: string | number;
20
- padding?: string | number;
21
- align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
22
- justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
23
- }>(), {
24
- as: 'div'
25
- });
26
-
27
- const colsClass = computed(() => {
28
- const map: Record<number, string> = {1:'grid-cols-1',2:'grid-cols-2',3:'grid-cols-3',4:'grid-cols-4',5:'grid-cols-5',6:'grid-cols-6',12:'grid-cols-12'};
29
- const sm = props.smCols && map[props.smCols] ? `sm:${map[props.smCols]}` : '';
30
- const md = props.mdCols && map[props.mdCols] ? `md:${map[props.mdCols]}` : '';
31
- const lg = props.lgCols && map[props.lgCols] ? `lg:${map[props.lgCols]}` : '';
32
- return [sm, md, lg].filter(Boolean).join(' ');
33
- });
34
-
35
- const { resolveSkin } = useLumoraConfig();
36
- const resolvedSkin = computed(() => cn(
37
- resolveSkin("LuGrid", props.variant),
38
- resolveLayoutProps(props),
39
- colsClass.value
40
- ));
41
-
42
- const gridStyle = computed(() =>
43
- props.cols ? { gridTemplateColumns: `repeat(${props.cols}, minmax(0, 1fr))` } : {}
44
- );
45
- </script>
@@ -1,17 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../context";
10
-
11
- const props = defineProps<{
12
- variant?: string;
13
- }>();
14
-
15
- const { resolveSkin } = useLumoraConfig();
16
- const resolvedSkin = computed(() => resolveSkin("LuOverlay", props.variant));
17
- </script>
@@ -1,19 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../context";
10
-
11
- const props = defineProps<{
12
- variant?: string;
13
- }>();
14
-
15
- const { resolveSkin } = useLumoraConfig();
16
- const resolvedSkin = computed(() => [
17
- resolveSkin("LuScroll", props.variant)
18
- ]);
19
- </script>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin" ref="splitRef">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed, provide, ref, readonly } from "vue";
9
- import { useLumoraConfig } from "../context";
10
-
11
- const props = defineProps<{
12
- direction?: "horizontal" | "vertical";
13
- variant?: string;
14
- }>();
15
-
16
- const direction = computed(() => props.direction ?? "horizontal");
17
- provide("lu-split-direction", readonly(direction));
18
-
19
- const splitRef = ref<HTMLElement | null>(null);
20
-
21
- const { resolveSkin } = useLumoraConfig();
22
- const resolvedSkin = computed(() => resolveSkin("LuSplit", props.direction ?? props.variant));
23
- </script>
@@ -1,32 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin" :style="style">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed, inject, ref, unref, type Ref } from "vue";
9
- import { useLumoraConfig } from "../context";
10
-
11
- const props = defineProps<{
12
- minSize?: number;
13
- maxSize?: number;
14
- defaultSize?: number;
15
- variant?: string;
16
- }>();
17
-
18
- const direction = inject<Ref<"horizontal" | "vertical"> | "horizontal">("lu-split-direction", "horizontal");
19
- const size = ref(props.defaultSize);
20
-
21
- const style = computed(() => {
22
- if (size.value === undefined) return { flex: "1 1 0%" };
23
- const dim = `${size.value}px`;
24
- return unref(direction) === "horizontal"
25
- ? { width: dim, flex: `0 0 ${dim}` }
26
- : { height: dim, flex: `0 0 ${dim}` };
27
- });
28
-
29
-
30
- const { resolveSkin } = useLumoraConfig();
31
- const resolvedSkin = computed(() => resolveSkin("LuSplitPane", props.variant));
32
- </script>
@@ -1,19 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin"></div>
3
- </template>
4
-
5
- <script setup lang="ts">
6
- import { computed, inject, unref, type Ref } from "vue";
7
- import { useLumoraConfig } from "../context";
8
-
9
- const props = defineProps<{
10
- variant?: string;
11
- }>();
12
-
13
- const direction = inject<Ref<"horizontal" | "vertical"> | "horizontal">("lu-split-direction", "horizontal");
14
-
15
- const { resolveSkin } = useLumoraConfig();
16
- const resolvedSkin = computed(() => [
17
- resolveSkin("LuSplitResizer", unref(direction) === "horizontal" ? "horizontal" : "vertical")
18
- ]);
19
- </script>
@@ -1,29 +0,0 @@
1
- <template>
2
- <component :is="as" v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </component>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../context";
10
- import { resolveLayoutProps, cn } from "../utils";
11
-
12
- const props = withDefaults(defineProps<{
13
- direction?: "vertical" | "horizontal";
14
- variant?: string;
15
- as?: string;
16
- gap?: string | number;
17
- padding?: string | number;
18
- align?: 'start' | 'center' | 'end' | 'stretch' | 'baseline';
19
- justify?: 'start' | 'center' | 'end' | 'between' | 'around' | 'evenly';
20
- }>(), {
21
- as: 'div'
22
- });
23
-
24
- const { resolveSkin } = useLumoraConfig();
25
- const resolvedSkin = computed(() => cn(
26
- resolveSkin("LuStack", props.direction ?? props.variant),
27
- resolveLayoutProps(props)
28
- ));
29
- </script>
package/src/plugin.ts DELETED
@@ -1,28 +0,0 @@
1
- import type { App, Plugin } from "vue";
2
- import { shallowReactive } from "vue";
3
- import { LumoraUIConfigKey } from "./context";
4
- import type { LumoraUIConfig } from "./types";
5
-
6
- export interface LumoraUIPluginOptions extends LumoraUIConfig {
7
- global?: boolean;
8
- }
9
-
10
- export function createLumoraUI(options: LumoraUIPluginOptions = {}): Plugin {
11
- return {
12
- install(app: App) {
13
- const config = shallowReactive<LumoraUIConfig>({
14
- target: options.target ?? "desktop",
15
- skin: options.skin,
16
- locale: options.locale ?? "en-US",
17
- a11y: options.a11y ?? true,
18
- icons: options.icons,
19
- });
20
-
21
- app.provide(LumoraUIConfigKey, config);
22
-
23
- if (options.global) {
24
- // TODO: globally register all components if requested
25
- }
26
- },
27
- };
28
- }
@@ -1,23 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="[resolvedSkin, isExpanded ? expandedSkin : '']" @mouseenter="onHover(true)" @mouseleave="onHover(false)">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed, inject, ref } from "vue";
9
- import { useLumoraConfig } from "../../context";
10
-
11
- const props = defineProps<{ variant?: string; expanded?: boolean; expandOnHover?: boolean }>();
12
-
13
- const hovered = ref(false);
14
- const isExpanded = computed(() => props.expanded || (props.expandOnHover && hovered.value));
15
-
16
- const onHover = (val: boolean) => {
17
- hovered.value = val;
18
- };
19
-
20
- const { resolveSkin } = useLumoraConfig();
21
- const resolvedSkin = computed(() => resolveSkin("LuDesktopRailBar", props.variant));
22
- const expandedSkin = computed(() => resolveSkin("LuDesktopRailBar", "expanded"));
23
- </script>
@@ -1,23 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="[resolvedSkin, active ? activeSkin : '']">
3
- <div :class="iconSkin">
4
- <slot name="icon" />
5
- </div>
6
- <div v-if="$slots.default" :class="labelSkin">
7
- <slot />
8
- </div>
9
- </div>
10
- </template>
11
-
12
- <script setup lang="ts">
13
- import { computed } from "vue";
14
- import { useLumoraConfig } from "../../context";
15
-
16
- const props = defineProps<{ variant?: string; active?: boolean }>();
17
-
18
- const { resolveSkin } = useLumoraConfig();
19
- const resolvedSkin = computed(() => resolveSkin("LuDesktopRailItem", props.variant));
20
- const activeSkin = computed(() => resolveSkin("LuDesktopRailItem", "active"));
21
- const iconSkin = computed(() => resolveSkin("LuDesktopRailItemIcon", props.variant));
22
- const labelSkin = computed(() => resolveSkin("LuDesktopRailItemLabel", props.variant));
23
- </script>
@@ -1,25 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot name="topbar" />
4
- <div :class="contentWrapperSkin">
5
- <slot name="rail" />
6
- <slot name="sidebar" />
7
- <div :class="mainContentSkin">
8
- <slot name="content" />
9
- </div>
10
- </div>
11
- <slot name="statusbar" />
12
- </div>
13
- </template>
14
-
15
- <script setup lang="ts">
16
- import { computed } from "vue";
17
- import { useLumoraConfig } from "../../context";
18
-
19
- const props = defineProps<{ variant?: string }>();
20
-
21
- const { resolveSkin } = useLumoraConfig();
22
- const resolvedSkin = computed(() => resolveSkin("LuDesktopShell", props.variant));
23
- const contentWrapperSkin = computed(() => resolveSkin("LuDesktopShellContentWrapper"));
24
- const mainContentSkin = computed(() => resolveSkin("LuDesktopShellMainContent"));
25
- </script>
@@ -1,36 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <!-- Named slot layout: sticky header + scrollable content + sticky footer -->
4
- <template v-if="hasHeader || hasContent || hasFooter">
5
- <div v-if="hasHeader" :class="headerSkin">
6
- <slot name="header" />
7
- </div>
8
- <div :class="contentSkin">
9
- <slot name="content" />
10
- </div>
11
- <div v-if="hasFooter" :class="footerSkin">
12
- <slot name="footer" />
13
- </div>
14
- </template>
15
- <!-- Fallback: legacy default slot (no layout enforcement) -->
16
- <slot v-else />
17
- </div>
18
- </template>
19
-
20
- <script setup lang="ts">
21
- import { computed, useSlots } from "vue";
22
- import { useLumoraConfig } from "../../context";
23
-
24
- const props = defineProps<{ variant?: string }>();
25
-
26
- const slots = useSlots();
27
- const hasHeader = computed(() => !!slots.header);
28
- const hasContent = computed(() => !!slots.content);
29
- const hasFooter = computed(() => !!slots.footer);
30
-
31
- const { resolveSkin } = useLumoraConfig();
32
- const resolvedSkin = computed(() => resolveSkin("LuDesktopSidebar", props.variant));
33
- const headerSkin = computed(() => resolveSkin("LuDesktopSidebarHeader", props.variant));
34
- const contentSkin = computed(() => resolveSkin("LuDesktopSidebarContent", props.variant));
35
- const footerSkin = computed(() => resolveSkin("LuDesktopSidebarFooter", props.variant));
36
- </script>
@@ -1,15 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../../context";
10
-
11
- const props = defineProps<{ variant?: string }>();
12
-
13
- const { resolveSkin } = useLumoraConfig();
14
- const resolvedSkin = computed(() => resolveSkin("LuDesktopStatusBar", props.variant));
15
- </script>
@@ -1,15 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../../context";
10
-
11
- const props = defineProps<{ variant?: string }>();
12
-
13
- const { resolveSkin } = useLumoraConfig();
14
- const resolvedSkin = computed(() => resolveSkin("LuDesktopTopBar", props.variant));
15
- </script>
@@ -1,20 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot name="topbar" />
4
- <div :class="contentSkin">
5
- <slot name="content" />
6
- </div>
7
- <slot name="bottombar" />
8
- </div>
9
- </template>
10
-
11
- <script setup lang="ts">
12
- import { computed } from "vue";
13
- import { useLumoraConfig } from "../../context";
14
-
15
- const props = defineProps<{ variant?: string }>();
16
-
17
- const { resolveSkin } = useLumoraConfig();
18
- const resolvedSkin = computed(() => resolveSkin("LuEmbeddedShell", props.variant));
19
- const contentSkin = computed(() => resolveSkin("LuEmbeddedShellContent", props.variant));
20
- </script>
@@ -1,16 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot name="left" />
4
- <slot name="right" />
5
- </div>
6
- </template>
7
-
8
- <script setup lang="ts">
9
- import { computed } from "vue";
10
- import { useLumoraConfig } from "../../context";
11
-
12
- const props = defineProps<{ variant?: string }>();
13
-
14
- const { resolveSkin } = useLumoraConfig();
15
- const resolvedSkin = computed(() => resolveSkin("LuEmbeddedStatusBar", props.variant));
16
- </script>
@@ -1,17 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot name="left" />
4
- <slot />
5
- <slot name="right" />
6
- </div>
7
- </template>
8
-
9
- <script setup lang="ts">
10
- import { computed } from "vue";
11
- import { useLumoraConfig } from "../../context";
12
-
13
- const props = defineProps<{ variant?: string }>();
14
-
15
- const { resolveSkin } = useLumoraConfig();
16
- const resolvedSkin = computed(() => resolveSkin("LuEmbeddedTopBar", props.variant));
17
- </script>
@@ -1,17 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot name="left" />
4
- <slot />
5
- <slot name="right" />
6
- </div>
7
- </template>
8
-
9
- <script setup lang="ts">
10
- import { computed } from "vue";
11
- import { useLumoraConfig } from "../../context";
12
-
13
- const props = defineProps<{ variant?: string }>();
14
-
15
- const { resolveSkin } = useLumoraConfig();
16
- const resolvedSkin = computed(() => resolveSkin("LuMobileHeader", props.variant));
17
- </script>
@@ -1,15 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot />
4
- </div>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { computed } from "vue";
9
- import { useLumoraConfig } from "../../context";
10
-
11
- const props = defineProps<{ variant?: string }>();
12
-
13
- const { resolveSkin } = useLumoraConfig();
14
- const resolvedSkin = computed(() => resolveSkin("LuMobileNavBar", props.variant));
15
- </script>
@@ -1,21 +0,0 @@
1
- <template>
2
- <div v-bind="$attrs" :class="resolvedSkin">
3
- <slot name="header" />
4
- <div :class="contentSkin">
5
- <slot name="content" />
6
- </div>
7
- <slot name="navbar" />
8
- <slot name="drawer" />
9
- </div>
10
- </template>
11
-
12
- <script setup lang="ts">
13
- import { computed } from "vue";
14
- import { useLumoraConfig } from "../../context";
15
-
16
- const props = defineProps<{ variant?: string }>();
17
-
18
- const { resolveSkin } = useLumoraConfig();
19
- const resolvedSkin = computed(() => resolveSkin("LuMobileShell", props.variant));
20
- const contentSkin = computed(() => resolveSkin("LuMobileShellContent"));
21
- </script>