@astrake/lumora-ui 0.2.2 → 0.7.3

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 (94) hide show
  1. package/CHANGELOG.md +113 -21
  2. package/README.md +29 -31
  3. package/dist/LuAccordion.vue_vue_type_script_setup_true_lang-CwG5Ml8t.js +5032 -0
  4. package/dist/__mocks__/empty.d.ts +4 -0
  5. package/dist/components/LuAccordion.vue.d.ts +23 -0
  6. package/dist/components/LuBarChart.vue.d.ts +22 -0
  7. package/dist/components/LuBottomSheet.vue.d.ts +27 -0
  8. package/dist/components/LuCalendar.vue.d.ts +34 -0
  9. package/dist/components/LuCheckbox.vue.d.ts +17 -3
  10. package/dist/components/LuChip.vue.d.ts +35 -0
  11. package/dist/components/LuChipGroup.vue.d.ts +23 -0
  12. package/dist/components/LuCollapsible.vue.d.ts +5 -2
  13. package/dist/components/LuCommandPalette.vue.d.ts +25 -0
  14. package/dist/components/LuDataGrid.types.d.ts +39 -0
  15. package/dist/components/LuDataGrid.vue.d.ts +84 -0
  16. package/dist/components/LuDateRangePicker.vue.d.ts +29 -0
  17. package/dist/components/LuDoughnutChart.vue.d.ts +17 -0
  18. package/dist/components/LuDrawer.vue.d.ts +33 -0
  19. package/dist/components/LuFileUpload.vue.d.ts +38 -0
  20. package/dist/components/LuFormField.vue.d.ts +21 -0
  21. package/dist/components/LuFormWizard.types.d.ts +7 -0
  22. package/dist/components/LuFormWizard.vue.d.ts +33 -0
  23. package/dist/components/LuGaugeChart.vue.d.ts +16 -0
  24. package/dist/components/LuKanban.types.d.ts +24 -0
  25. package/dist/components/LuKanban.vue.d.ts +30 -0
  26. package/dist/components/LuLineChart.vue.d.ts +19 -0
  27. package/dist/components/LuList.vue.d.ts +18 -0
  28. package/dist/components/LuListDivider.vue.d.ts +5 -0
  29. package/dist/components/LuListItem.vue.d.ts +32 -0
  30. package/dist/components/LuListSubheader.vue.d.ts +16 -0
  31. package/dist/components/LuMediaGallery.vue.d.ts +25 -0
  32. package/dist/components/LuMenu.vue.d.ts +2 -2
  33. package/dist/components/LuPlanner.types.d.ts +14 -0
  34. package/dist/components/LuPlanner.vue.d.ts +23 -0
  35. package/dist/components/LuPopover.vue.d.ts +24 -0
  36. package/dist/components/LuRadioGroup.types.d.ts +1 -0
  37. package/dist/components/LuRichTextEditor.vue.d.ts +27 -0
  38. package/dist/components/LuSelect.vue.d.ts +35 -2
  39. package/dist/components/{LuPageHeader.vue.d.ts → LuSparkline.vue.d.ts} +9 -5
  40. package/dist/components/LuSwitch.vue.d.ts +19 -5
  41. package/dist/components/LuTimeline.vue.d.ts +17 -0
  42. package/dist/components/LuTimelineItem.vue.d.ts +24 -0
  43. package/dist/components/LuToast.vue.d.ts +5 -0
  44. package/dist/components/LuTree.types.d.ts +9 -0
  45. package/dist/components/LuTree.vue.d.ts +25 -0
  46. package/dist/components/LuTreeNode.vue.d.ts +37 -0
  47. package/dist/components/__tests__/LuAccordion.test.d.ts +1 -0
  48. package/dist/components/__tests__/LuBarChart.test.d.ts +1 -0
  49. package/dist/components/__tests__/LuBottomSheet.test.d.ts +1 -0
  50. package/dist/components/__tests__/LuCalendar.test.d.ts +1 -0
  51. package/dist/components/__tests__/LuCheckbox.test.d.ts +1 -0
  52. package/dist/components/__tests__/LuChip.test.d.ts +1 -0
  53. package/dist/components/__tests__/LuCommandPalette.test.d.ts +1 -0
  54. package/dist/components/__tests__/LuDataGrid.test.d.ts +1 -0
  55. package/dist/components/__tests__/LuDateRangePicker.test.d.ts +1 -0
  56. package/dist/components/__tests__/LuDoughnutChart.test.d.ts +1 -0
  57. package/dist/components/__tests__/LuDrawer.test.d.ts +1 -0
  58. package/dist/components/__tests__/LuFileUpload.test.d.ts +1 -0
  59. package/dist/components/__tests__/LuFormWizard.test.d.ts +1 -0
  60. package/dist/components/__tests__/LuGaugeChart.test.d.ts +1 -0
  61. package/dist/components/__tests__/LuKanban.test.d.ts +1 -0
  62. package/dist/components/__tests__/LuLineChart.test.d.ts +1 -0
  63. package/dist/components/__tests__/LuList.test.d.ts +1 -0
  64. package/dist/components/__tests__/LuMediaGallery.test.d.ts +1 -0
  65. package/dist/components/__tests__/LuPlanner.test.d.ts +1 -0
  66. package/dist/components/__tests__/LuPopover.test.d.ts +1 -0
  67. package/dist/components/__tests__/LuRadio.test.d.ts +1 -0
  68. package/dist/components/__tests__/LuRichTextEditor.test.d.ts +1 -0
  69. package/dist/components/__tests__/LuSelect.test.d.ts +1 -0
  70. package/dist/components/__tests__/LuSparkline.test.d.ts +1 -0
  71. package/dist/components/__tests__/LuSwitch.test.d.ts +1 -0
  72. package/dist/components/__tests__/LuTimeline.test.d.ts +1 -0
  73. package/dist/components/__tests__/LuToast.test.d.ts +1 -0
  74. package/dist/components/__tests__/LuTree.test.d.ts +1 -0
  75. package/dist/components/index.d.ts +42 -3
  76. package/dist/components/index.js +73 -44
  77. package/dist/composables/index.d.ts +2 -0
  78. package/dist/composables/index.js +36 -17
  79. package/dist/composables/lazyVChart.d.ts +10 -0
  80. package/dist/composables/useChartTheme.d.ts +65 -0
  81. package/dist/composables/useDataGrid.d.ts +52 -0
  82. package/dist/composables/useFloating.d.ts +12 -0
  83. package/dist/composables/useLuToast.d.ts +14 -0
  84. package/dist/index.d.ts +5 -0
  85. package/dist/index.js +210 -146
  86. package/dist/skins/index.js +824 -20
  87. package/dist/useLuToast-D5d7Wrcr.js +1029 -0
  88. package/package.json +16 -3
  89. package/scripts/postinstall.mjs +35 -0
  90. package/src/lumora.css +216 -5
  91. package/dist/LuCodeBlock.vue_vue_type_script_setup_true_lang-BdXflBkJ.js +0 -1672
  92. package/dist/components/LuThemeSelect.vue.d.ts +0 -2
  93. package/dist/components/LuThemeSwitch.vue.d.ts +0 -2
  94. package/dist/useShiki-DPOJfneq.js +0 -30
@@ -1,47 +1,76 @@
1
- import { _ as s, a as L, b as e, c as o, d as l, e as t, f as r, g as T, h as b, i, j as n, k as d, l as g, m as c, n as p, o as B, p as m, q as C, r as h, s as S, t as k, u as x, v as P, w, x as H, y as I, z as M, A as v, B as A, C as G, D as R, E as f, F as y, G as D, H as F, I as j, J as q, K as z, L as E, M as J, N as K, O as N, P as O, Q } from "../LuCodeBlock.vue_vue_type_script_setup_true_lang-BdXflBkJ.js";
1
+ import { _ as s, a as L, b as e, c as r, d as o, e as t, f as i, g as l, h as n, i as d, j as T, j as b, k as C, l as h, m, n as p, o as c, p as g, q as B, r as k, s as P, t as S, u as D, v as G, w as x, x as F, y as I, z as R, A as v, B as M, C as w, D as A, E as f, F as y, G as H, H as j, I as z, J as E, K, L as N, M as U, N as W, O as q, P as J, Q as O, R as Q, S as V, T as X, U as Y, V as Z, W as _, X as $, Y as aa, Z as ua, $ as sa, a0 as La, a1 as ea, a2 as ra, a3 as oa, a4 as ta, a5 as ia, a6 as la, a7 as na, a8 as da, a9 as Ta, aa as ba, ab as Ca, ac as ha, ad as ma, ae as pa, af as ca, ag as ga, ah as Ba } from "../LuAccordion.vue_vue_type_script_setup_true_lang-CwG5Ml8t.js";
2
2
  export {
3
- s as LuAlert,
4
- L as LuAvatar,
5
- e as LuBadge,
6
- o as LuBreadcrumb,
3
+ s as LuAccordion,
4
+ L as LuAlert,
5
+ e as LuAvatar,
6
+ r as LuBadge,
7
+ o as LuBarChart,
8
+ t as LuBottomSheet,
9
+ i as LuBreadcrumb,
7
10
  l as LuButton,
8
- t as LuCard,
9
- r as LuCheckbox,
10
- T as LuCodeBlock,
11
- b as LuCollapsible,
12
- i as LuDivider,
13
- n as LuForm,
14
- d as LuIcon,
15
- g as LuInput,
16
- c as LuLink,
17
- p as LuMenu,
18
- B as LuMenuItem,
19
- m as LuModal,
20
- C as LuPageHeader,
21
- h as LuPagination,
22
- S as LuProgressBar,
23
- k as LuRadio,
24
- x as LuRadioGroup,
25
- P as LuSelect,
26
- w as LuSkeleton,
27
- H as LuSpinner,
28
- I as LuSwitch,
29
- M as LuTab,
30
- v as LuTabList,
31
- A as LuTabPanel,
32
- G as LuTable,
33
- R as LuTableBody,
34
- f as LuTableCell,
35
- y as LuTableHead,
36
- D as LuTableHeadCell,
37
- F as LuTableRow,
38
- j as LuTabs,
39
- q as LuTag,
40
- z as LuText,
41
- E as LuTextarea,
42
- J as LuThemeSelect,
43
- K as LuThemeSwitch,
44
- N as LuToggleButton,
45
- O as LuToggleGroup,
46
- Q as LuTooltip
11
+ n as LuCalendar,
12
+ d as LuCard,
13
+ T as LuCheck,
14
+ b as LuCheckbox,
15
+ C as LuChip,
16
+ h as LuChipGroup,
17
+ m as LuCodeBlock,
18
+ p as LuCollapsible,
19
+ c as LuCommandPalette,
20
+ g as LuDataGrid,
21
+ B as LuDateRangePicker,
22
+ k as LuDivider,
23
+ P as LuDoughnutChart,
24
+ S as LuDrawer,
25
+ D as LuFileUpload,
26
+ G as LuForm,
27
+ x as LuFormField,
28
+ F as LuFormWizard,
29
+ I as LuGaugeChart,
30
+ R as LuIcon,
31
+ v as LuInput,
32
+ M as LuKanban,
33
+ w as LuLineChart,
34
+ A as LuLink,
35
+ f as LuList,
36
+ y as LuListDivider,
37
+ H as LuListItem,
38
+ j as LuListSubheader,
39
+ z as LuMediaGallery,
40
+ E as LuMenu,
41
+ K as LuMenuItem,
42
+ N as LuModal,
43
+ U as LuPagination,
44
+ W as LuPlanner,
45
+ q as LuPopover,
46
+ J as LuProgressBar,
47
+ O as LuRadio,
48
+ Q as LuRadioGroup,
49
+ V as LuRichTextEditor,
50
+ X as LuSelect,
51
+ Y as LuSkeleton,
52
+ Z as LuSparkline,
53
+ _ as LuSpinner,
54
+ $ as LuSwitch,
55
+ aa as LuTab,
56
+ ua as LuTabList,
57
+ sa as LuTabPanel,
58
+ La as LuTable,
59
+ ea as LuTableBody,
60
+ ra as LuTableCell,
61
+ oa as LuTableHead,
62
+ ta as LuTableHeadCell,
63
+ ia as LuTableRow,
64
+ la as LuTabs,
65
+ na as LuTag,
66
+ da as LuText,
67
+ Ta as LuTextarea,
68
+ ba as LuTimeline,
69
+ Ca as LuTimelineItem,
70
+ ha as LuToast,
71
+ ma as LuToggleButton,
72
+ pa as LuToggleGroup,
73
+ ca as LuTooltip,
74
+ ga as LuTree,
75
+ Ba as LuTreeNode
47
76
  };
@@ -2,3 +2,5 @@ export { useRail } from "./useRail";
2
2
  export { useSplit } from "./useSplit";
3
3
  export { useTheme, type ThemeMode, type ResolvedTheme } from "./useTheme";
4
4
  export { getHighlighter } from "./useShiki";
5
+ export { useFloating } from "./useFloating";
6
+ export { useLuToast, type ToastItem } from "./useLuToast";
@@ -1,31 +1,50 @@
1
- import { ref as t, readonly as r } from "vue";
2
- import { g as c, u as p } from "../useShiki-DPOJfneq.js";
3
- function u(n = !1) {
4
- const e = t(n);
5
- function i() {
1
+ import { ref as s, readonly as u, computed as l } from "vue";
2
+ import { g as h, u as y, a as x } from "../useLuToast-D5d7Wrcr.js";
3
+ function f(t = !1) {
4
+ const e = s(t);
5
+ function o() {
6
6
  e.value = !e.value;
7
7
  }
8
- function o() {
8
+ function r() {
9
9
  e.value = !0;
10
10
  }
11
- function a() {
11
+ function i() {
12
12
  e.value = !1;
13
13
  }
14
14
  return {
15
- isExpanded: r(e),
16
- toggle: i,
17
- expand: o,
18
- collapse: a
15
+ isExpanded: u(e),
16
+ toggle: o,
17
+ expand: r,
18
+ collapse: i
19
19
  };
20
20
  }
21
- function l(n, e = "horizontal", i) {
21
+ function g(t, e = "horizontal", o) {
22
+ return {
23
+ isDragging: s(!1)
24
+ };
25
+ }
26
+ const n = s("system"), a = s(!1);
27
+ if (typeof window < "u") {
28
+ const t = window.matchMedia("(prefers-color-scheme: dark)");
29
+ a.value = t.matches, t.addEventListener("change", (e) => {
30
+ a.value = e.matches;
31
+ });
32
+ }
33
+ const c = l(() => n.value === "system" ? a.value ? "dark" : "light" : n.value);
34
+ function m() {
22
35
  return {
23
- isDragging: t(!1)
36
+ mode: n,
37
+ resolved: c,
38
+ setMode: (e) => {
39
+ n.value = e;
40
+ }
24
41
  };
25
42
  }
26
43
  export {
27
- c as getHighlighter,
28
- u as useRail,
29
- l as useSplit,
30
- p as useTheme
44
+ h as getHighlighter,
45
+ y as useFloating,
46
+ x as useLuToast,
47
+ f as useRail,
48
+ g as useSplit,
49
+ m as useTheme
31
50
  };
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Lazily loads the VChart component from vue-echarts (peer dep).
3
+ * Prints a helpful install message if the peer dep is absent.
4
+ *
5
+ * We cast through `unknown` to avoid vue-tsc failing when vue-echarts
6
+ * is not installed as a direct dependency of this library.
7
+ */
8
+ export declare function lazyVChart(componentName: string): object | {
9
+ template: string;
10
+ };
@@ -0,0 +1,65 @@
1
+ import { type Ref } from "vue";
2
+ /**
3
+ * Maps semantic colour tokens to resolved CSS colour values.
4
+ * Reads `--lu-pipeline-*` custom properties from the document root so the
5
+ * theme is always skin-aware and dark-mode-reactive.
6
+ */
7
+ export declare function useChartTheme(isDark?: Ref<boolean>): {
8
+ resolveColor: (token: string) => string;
9
+ echartsTheme: import("vue").ComputedRef<{
10
+ backgroundColor: string;
11
+ textStyle: {
12
+ color: string;
13
+ fontFamily: string;
14
+ fontSize: number;
15
+ };
16
+ title: {
17
+ textStyle: {
18
+ color: string;
19
+ };
20
+ };
21
+ legend: {
22
+ textStyle: {
23
+ color: string;
24
+ };
25
+ };
26
+ tooltip: {
27
+ backgroundColor: string;
28
+ borderColor: string;
29
+ textStyle: {
30
+ color: string;
31
+ };
32
+ extraCssText: string;
33
+ };
34
+ categoryAxis: {
35
+ axisLine: {
36
+ lineStyle: {
37
+ color: string;
38
+ };
39
+ };
40
+ axisLabel: {
41
+ color: string;
42
+ };
43
+ splitLine: {
44
+ lineStyle: {
45
+ color: string;
46
+ };
47
+ };
48
+ };
49
+ valueAxis: {
50
+ axisLine: {
51
+ lineStyle: {
52
+ color: string;
53
+ };
54
+ };
55
+ axisLabel: {
56
+ color: string;
57
+ };
58
+ splitLine: {
59
+ lineStyle: {
60
+ color: string;
61
+ };
62
+ };
63
+ };
64
+ }>;
65
+ };
@@ -0,0 +1,52 @@
1
+ import { type Ref } from "vue";
2
+ import type { ColumnDef, Row, DataGridSortState, DataGridFilterState } from "../components/LuDataGrid.types";
3
+ export interface UseDataGridOptions {
4
+ columns: Ref<ColumnDef[]>;
5
+ data: Ref<Row[]>;
6
+ groupBy?: Ref<string | undefined>;
7
+ selectable?: Ref<boolean>;
8
+ idKey?: Ref<string>;
9
+ localSort?: Ref<boolean>;
10
+ localSearch?: Ref<boolean>;
11
+ }
12
+ export declare function useDataGrid(opts: UseDataGridOptions): {
13
+ visibleColumns: import("vue").ComputedRef<ColumnDef[]>;
14
+ hiddenColumns: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
15
+ columnOrder: Ref<string[], string[]>;
16
+ toggleColumn: (key: string) => void;
17
+ resetColumnOrder: () => void;
18
+ sortState: Ref<{
19
+ key: string;
20
+ direction: "asc" | "desc";
21
+ } | null, DataGridSortState | {
22
+ key: string;
23
+ direction: "asc" | "desc";
24
+ } | null>;
25
+ toggleSort: (key: string) => {
26
+ key: string;
27
+ direction: "asc" | "desc";
28
+ } | null;
29
+ searchQuery: Ref<string, string>;
30
+ columnFilters: Ref<DataGridFilterState, DataGridFilterState>;
31
+ setColumnFilter: (key: string, value: string | number | [number, number] | undefined) => void;
32
+ clearFilters: () => void;
33
+ filteredData: import("vue").ComputedRef<Row[]>;
34
+ selectedIds: Ref<Set<string> & Omit<Set<string>, keyof Set<any>>, Set<string> | (Set<string> & Omit<Set<string>, keyof Set<any>>)>;
35
+ isSelected: (row: Row) => boolean;
36
+ toggleRow: (row: Row) => string[];
37
+ selectAll: () => string[];
38
+ selectAllData: () => string[];
39
+ clearSelection: () => string[];
40
+ allSelected: import("vue").ComputedRef<boolean>;
41
+ someSelected: import("vue").ComputedRef<boolean>;
42
+ selectionCount: import("vue").ComputedRef<number>;
43
+ groupedRows: import("vue").ComputedRef<({
44
+ type: "group";
45
+ key: string;
46
+ label: string;
47
+ } | {
48
+ type: "row";
49
+ row: Row;
50
+ })[]>;
51
+ hasColumnFilters: import("vue").ComputedRef<boolean>;
52
+ };
@@ -0,0 +1,12 @@
1
+ import { type Ref } from 'vue';
2
+ import { type Placement } from '@floating-ui/dom';
3
+ export interface UseFloatingOptions {
4
+ placement?: Placement;
5
+ offset?: number;
6
+ }
7
+ export declare function useFloating(reference: Ref<HTMLElement | null | undefined>, floating: Ref<HTMLElement | null | undefined>, options?: UseFloatingOptions): {
8
+ x: Ref<number, number>;
9
+ y: Ref<number, number>;
10
+ placement: Ref<Placement, Placement>;
11
+ update: () => void;
12
+ };
@@ -0,0 +1,14 @@
1
+ export interface ToastItem {
2
+ id: string;
3
+ title: string;
4
+ description?: string;
5
+ variant?: 'success' | 'error' | 'warning' | 'info' | string;
6
+ duration?: number;
7
+ }
8
+ export declare const activeToasts: import("vue").ShallowReactive<ToastItem[]>;
9
+ export declare function useLuToast(): {
10
+ toasts: import("vue").ShallowReactive<ToastItem[]>;
11
+ toast: (options: Omit<ToastItem, "id">) => string;
12
+ dismiss: (id: string) => void;
13
+ dismissAll: () => void;
14
+ };
package/dist/index.d.ts CHANGED
@@ -5,3 +5,8 @@ export * from "./layout/index";
5
5
  export * from "./shell/index";
6
6
  export * from "./components/index";
7
7
  export * from "./skins/index";
8
+ export { useDataGrid } from "./composables/useDataGrid";
9
+ export { useChartTheme } from "./composables/useChartTheme";
10
+ export type { UseDataGridOptions } from "./composables/useDataGrid";
11
+ export { useFloating } from "./composables/useFloating";
12
+ export { useLuToast, type ToastItem } from "./composables/useLuToast";