@itguy614/clean-ui 1.0.1 → 1.2.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.
Files changed (87) hide show
  1. package/dist/clean-ui.css +1 -1
  2. package/dist/components/CuiBanner.vue.d.ts.map +1 -1
  3. package/dist/components/CuiBanner.vue.js +9 -8
  4. package/dist/components/CuiButton.vue.d.ts.map +1 -1
  5. package/dist/components/CuiButton.vue.js +1 -1
  6. package/dist/components/CuiButton.vue2.js +37 -36
  7. package/dist/components/CuiContainer.vue.d.ts +1 -1
  8. package/dist/components/CuiContainer.vue.d.ts.map +1 -1
  9. package/dist/components/CuiDataGridTable.vue.d.ts.map +1 -1
  10. package/dist/components/CuiFlex.vue.d.ts +1 -1
  11. package/dist/components/CuiFlex.vue.d.ts.map +1 -1
  12. package/dist/components/CuiIcon.vue.d.ts +14 -2
  13. package/dist/components/CuiIcon.vue.d.ts.map +1 -1
  14. package/dist/components/CuiIcon.vue.js +1 -1
  15. package/dist/components/CuiIcon.vue2.js +51 -30
  16. package/dist/components/CuiInputStepper.vue.d.ts +1 -1
  17. package/dist/components/CuiInputStepper.vue.d.ts.map +1 -1
  18. package/dist/components/CuiMaskedInput.vue.d.ts.map +1 -1
  19. package/dist/components/CuiModal.vue2.js +1 -1
  20. package/dist/components/CuiRadioGroup.vue2.js +1 -1
  21. package/dist/components/CuiRating.vue.d.ts +1 -1
  22. package/dist/components/CuiRating.vue.d.ts.map +1 -1
  23. package/dist/components/CuiSlideover.vue.js +1 -1
  24. package/dist/components/CuiTab.vue.d.ts.map +1 -1
  25. package/dist/components/CuiTab.vue.js +1 -1
  26. package/dist/components/CuiTab.vue2.js +41 -36
  27. package/dist/components/CuiTable.vue.d.ts +3 -3
  28. package/dist/components/CuiTable.vue.d.ts.map +1 -1
  29. package/dist/components/CuiTable.vue.js +58 -53
  30. package/dist/components/CuiTableCell.vue.d.ts +2 -1
  31. package/dist/components/CuiTableCell.vue.d.ts.map +1 -1
  32. package/dist/components/CuiTableCell.vue.js +4 -4
  33. package/dist/components/CuiTabs.vue.d.ts +2 -2
  34. package/dist/components/CuiTabs.vue.d.ts.map +1 -1
  35. package/dist/components/CuiTabs.vue.js +2 -2
  36. package/dist/components/CuiTabs.vue2.js +127 -89
  37. package/dist/components/CuiTreeNode.vue.d.ts +1 -0
  38. package/dist/components/CuiTreeNode.vue.d.ts.map +1 -1
  39. package/dist/components/CuiTreeNode.vue.js +28 -27
  40. package/dist/components/CuiTreeView.vue.d.ts.map +1 -1
  41. package/dist/components/CuiTreeView.vue.js +22 -22
  42. package/dist/components/tabs-context.d.ts +7 -1
  43. package/dist/components/tabs-context.d.ts.map +1 -1
  44. package/dist/composables/useColorScheme.d.ts +19 -0
  45. package/dist/composables/useColorScheme.d.ts.map +1 -0
  46. package/dist/composables/useColorScheme.js +38 -0
  47. package/dist/composables/useDataGridViews.d.ts.map +1 -1
  48. package/dist/composables/useDataGridViews.js +37 -35
  49. package/dist/composables/useDensity.d.ts.map +1 -1
  50. package/dist/composables/useDensity.js +19 -19
  51. package/dist/composables/useOverlay.d.ts.map +1 -1
  52. package/dist/composables/useOverlay.js +44 -36
  53. package/dist/composables/useTheme.d.ts.map +1 -1
  54. package/dist/composables/useTheme.js +17 -25
  55. package/dist/duplicate-guard.d.ts +17 -0
  56. package/dist/duplicate-guard.d.ts.map +1 -0
  57. package/dist/duplicate-guard.js +16 -0
  58. package/dist/icons/builtin.d.ts +67 -0
  59. package/dist/icons/builtin.d.ts.map +1 -0
  60. package/dist/icons/builtin.js +67 -0
  61. package/dist/icons/lazy.d.ts +8 -0
  62. package/dist/icons/lazy.d.ts.map +1 -0
  63. package/dist/icons/lazy.js +21 -0
  64. package/dist/icons/registry.d.ts +29 -0
  65. package/dist/icons/registry.d.ts.map +1 -0
  66. package/dist/icons/registry.js +30 -0
  67. package/dist/index.d.ts +6 -1
  68. package/dist/index.d.ts.map +1 -1
  69. package/dist/index.js +161 -149
  70. package/dist/messages.d.ts +21 -1
  71. package/dist/messages.d.ts.map +1 -1
  72. package/dist/messages.js +10 -9
  73. package/dist/utils/devWarn.d.ts +1 -0
  74. package/dist/utils/devWarn.d.ts.map +1 -1
  75. package/dist/utils/devWarn.js +1 -0
  76. package/dist/utils/scrollLock.d.ts +22 -0
  77. package/dist/utils/scrollLock.d.ts.map +1 -0
  78. package/dist/utils/scrollLock.js +42 -0
  79. package/dist/utils/storage.d.ts +18 -0
  80. package/dist/utils/storage.d.ts.map +1 -0
  81. package/dist/utils/storage.js +27 -0
  82. package/dist/version.d.ts +7 -0
  83. package/dist/version.d.ts.map +1 -0
  84. package/dist/version.js +4 -0
  85. package/package.json +21 -6
  86. package/dist/test-setup.d.ts +0 -2
  87. package/dist/test-setup.d.ts.map +0 -1
@@ -1,11 +1,10 @@
1
- import { defineComponent as z, computed as l, provide as C, ref as E, withDirectives as f, openBlock as r, createElementBlock as i, createElementVNode as p, unref as a, normalizeStyle as s, normalizeClass as y, renderSlot as h, createCommentVNode as b, vShow as v } from "vue";
2
- import { TableContextKey as D } from "./table-context.js";
3
- import { clampSize as T } from "../utils/sizing.js";
4
- import { useScrollShadows as $, scrollShadowRightStyle as L, scrollShadowBottomStyle as N } from "../composables/useScrollShadows.js";
5
- const P = {
6
- key: 0,
7
- style: { position: "relative" }
8
- }, V = ["aria-rowcount"], I = ["aria-rowcount"], Z = /* @__PURE__ */ z({
1
+ import { defineComponent as _, computed as i, provide as E, ref as m, onMounted as T, onBeforeUnmount as L, watch as O, withDirectives as D, openBlock as v, createElementBlock as h, createElementVNode as y, unref as l, normalizeStyle as u, normalizeClass as M, renderSlot as q, createCommentVNode as w, vShow as N } from "vue";
2
+ import { TableContextKey as P } from "./table-context.js";
3
+ import { clampSize as U } from "../utils/sizing.js";
4
+ import { useScrollShadows as V, scrollShadowRightStyle as X, scrollShadowBottomStyle as $ } from "../composables/useScrollShadows.js";
5
+ import { useMessages as A } from "../composables/useMessages.js";
6
+ import { warnOnce as F } from "../utils/devWarn.js";
7
+ const I = { style: { position: "relative" } }, K = ["role", "tabindex", "aria-label"], Z = ["aria-rowcount"], te = /* @__PURE__ */ _({
9
8
  __name: "CuiTable",
10
9
  props: {
11
10
  striped: { type: Boolean, default: !1 },
@@ -19,15 +18,15 @@ const P = {
19
18
  hidden: { type: Boolean, default: !1 },
20
19
  size: { default: "md" }
21
20
  },
22
- setup(o, { expose: S }) {
23
- const e = o, w = ["sm", "md", "lg"], n = l(() => T(e.size, w));
24
- C(D, {
25
- size: n,
26
- stickyHeader: l(() => e.stickyHeader)
21
+ setup(f, { expose: S }) {
22
+ const e = f, g = ["sm", "md", "lg"], p = i(() => U(e.size, g));
23
+ E(P, {
24
+ size: p,
25
+ stickyHeader: i(() => e.stickyHeader)
27
26
  });
28
- const d = l(() => [
27
+ const x = i(() => [
29
28
  "cui-table",
30
- `cui-table--${n.value}`,
29
+ `cui-table--${p.value}`,
31
30
  {
32
31
  "cui-table--striped": e.striped,
33
32
  "cui-table--hoverable": e.hoverable,
@@ -35,56 +34,62 @@ const P = {
35
34
  "cui-table--sticky-header": e.stickyHeader,
36
35
  "cui-table--fixed": e.fixedLayout
37
36
  }
38
- ]), g = l(() => {
39
- if (!e.maxHeight && !e.minWidth) return;
40
- const t = { overflow: "auto", position: "relative" };
41
- return e.maxHeight && (t.maxHeight = e.maxHeight), t;
42
- }), k = l(() => ({
37
+ ]), k = i(() => ({
43
38
  borderCollapse: "separate",
44
39
  borderSpacing: "0",
45
40
  minWidth: e.minWidth || void 0
46
- })), { canScrollRight: x, canScrollDown: H, onScroll: c, onMount: B } = $(), u = E(null);
47
- function R(t) {
48
- u.value = t, B(t);
41
+ })), { canScrollRight: H, canScrollDown: B, onScroll: b, update: z } = V(), r = m(null), n = m(null), c = m(!1), s = i(() => !!e.maxHeight || c.value), W = i(() => {
42
+ const t = { position: "relative" };
43
+ return e.maxHeight ? (t.overflow = "auto", t.maxHeight = e.maxHeight) : c.value && (t.overflowX = "auto"), t;
44
+ });
45
+ function d() {
46
+ const t = r.value, a = n.value;
47
+ !t || !a || (c.value = Math.max(a.scrollWidth, a.offsetWidth) - t.clientWidth > 1, z(t), c.value && e.stickyHeader && !e.maxHeight && F(
48
+ "[clean-ui] CuiTable: stickyHeader with a horizontally overflowing table needs maxHeight. The scroll container required to contain the overflow also becomes the sticky header's scrollport, so the header can't stick to the viewport."
49
+ ));
49
50
  }
50
- return S({ scrollWrapper: u }), (t, m) => o.maxHeight || o.minWidth ? f((r(), i("div", P, [
51
- p("div", {
52
- ref: R,
51
+ let o;
52
+ T(() => {
53
+ requestAnimationFrame(d), typeof ResizeObserver < "u" && (o = new ResizeObserver(d), r.value && o.observe(r.value), n.value && o.observe(n.value));
54
+ }), L(() => {
55
+ o == null || o.disconnect(), o = void 0;
56
+ }), O(() => [e.minWidth, e.maxHeight, e.fixedLayout], d, { flush: "post" });
57
+ const C = A();
58
+ return S({ scrollWrapper: r, measure: d }), (t, a) => D((v(), h("div", I, [
59
+ y("div", {
60
+ ref_key: "scrollWrapper",
61
+ ref: r,
53
62
  class: "cui-table-wrapper",
54
- style: s(g.value),
55
- onScroll: m[0] || (m[0] = //@ts-ignore
56
- (...W) => a(c) && a(c)(...W))
63
+ style: u(W.value),
64
+ role: s.value ? "region" : void 0,
65
+ tabindex: s.value ? 0 : void 0,
66
+ "aria-label": s.value ? l(C).table.scrollRegionLabel : void 0,
67
+ onScroll: a[0] || (a[0] = //@ts-ignore
68
+ (...R) => l(b) && l(b)(...R))
57
69
  }, [
58
- p("table", {
59
- class: y(d.value),
60
- style: s(k.value),
61
- "aria-rowcount": o.ariaRowcount
70
+ y("table", {
71
+ ref_key: "tableEl",
72
+ ref: n,
73
+ class: M(x.value),
74
+ style: u(k.value),
75
+ "aria-rowcount": f.ariaRowcount
62
76
  }, [
63
- h(t.$slots, "default")
64
- ], 14, V)
65
- ], 36),
66
- a(x) ? (r(), i("div", {
77
+ q(t.$slots, "default")
78
+ ], 14, Z)
79
+ ], 44, K),
80
+ s.value && l(H) ? (v(), h("div", {
67
81
  key: 0,
68
- style: s(a(L))
69
- }, null, 4)) : b("", !0),
70
- a(H) ? (r(), i("div", {
82
+ style: u(l(X))
83
+ }, null, 4)) : w("", !0),
84
+ s.value && l(B) ? (v(), h("div", {
71
85
  key: 1,
72
- style: s(a(N))
73
- }, null, 4)) : b("", !0)
86
+ style: u(l($))
87
+ }, null, 4)) : w("", !0)
74
88
  ], 512)), [
75
- [v, !o.hidden]
76
- ]) : f((r(), i("table", {
77
- key: 1,
78
- class: y(d.value),
79
- style: { "border-collapse": "separate", "border-spacing": "0" },
80
- "aria-rowcount": o.ariaRowcount
81
- }, [
82
- h(t.$slots, "default")
83
- ], 10, I)), [
84
- [v, !o.hidden]
89
+ [N, !f.hidden]
85
90
  ]);
86
91
  }
87
92
  });
88
93
  export {
89
- Z as default
94
+ te as default
90
95
  };
@@ -19,8 +19,9 @@ type __VLS_Slots = {} & {
19
19
  default?: (props: typeof __VLS_6) => any;
20
20
  };
21
21
  declare const __VLS_component: import("vue").DefineComponent<CuiTableCellProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CuiTableCellProps> & Readonly<{}>, {
22
- nowrap: boolean;
22
+ header: boolean;
23
23
  hidden: boolean;
24
+ nowrap: boolean;
24
25
  align: TableCellAlign;
25
26
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
26
27
  declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
@@ -1 +1 @@
1
- {"version":3,"file":"CuiTableCell.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTableCell.vue"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,MAAM,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEzD,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,4CAA4C;IAC5C,MAAM,CAAC,E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EAAE,OAAO,CAAC;CAClB;AAoED,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAuB/C,QAAA,MAAM,eAAe;YAxGV,OAAO;;YAUP,OAAO;WARR,cAAc;6EA6GtB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,9 +1,9 @@
1
- import { defineComponent as s, inject as c, computed as n, withDirectives as d, openBlock as p, createBlock as f, resolveDynamicComponent as u, normalizeStyle as h, withCtx as w, renderSlot as m, vShow as v } from "vue";
1
+ import { defineComponent as s, inject as d, computed as n, withDirectives as c, openBlock as p, createBlock as f, resolveDynamicComponent as u, normalizeStyle as h, withCtx as w, renderSlot as m, vShow as v } from "vue";
2
2
  import { TableSectionContextKey as y } from "./table-context.js";
3
3
  const B = /* @__PURE__ */ s({
4
4
  __name: "CuiTableCell",
5
5
  props: {
6
- header: { type: Boolean },
6
+ header: { type: Boolean, default: void 0 },
7
7
  align: { default: "left" },
8
8
  width: {},
9
9
  colspan: {},
@@ -12,11 +12,11 @@ const B = /* @__PURE__ */ s({
12
12
  hidden: { type: Boolean, default: !1 }
13
13
  },
14
14
  setup(o) {
15
- const e = o, a = c(y, void 0), l = n(() => e.header !== void 0 ? e.header : (a == null ? void 0 : a.isHead) ?? !1), i = n(() => l.value ? "th" : "td"), r = n(() => {
15
+ const e = o, a = d(y, void 0), l = n(() => e.header !== void 0 ? e.header : (a == null ? void 0 : a.isHead) ?? !1), i = n(() => l.value ? "th" : "td"), r = n(() => {
16
16
  const t = {};
17
17
  return e.align !== "left" && (t.textAlign = e.align), e.width && (t.width = e.width), e.nowrap && (t.whiteSpace = "nowrap"), t;
18
18
  });
19
- return (t, C) => d((p(), f(u(i.value), {
19
+ return (t, C) => c((p(), f(u(i.value), {
20
20
  style: h(r.value),
21
21
  colspan: o.colspan,
22
22
  rowspan: o.rowspan,
@@ -12,9 +12,9 @@ export interface CuiTabsProps extends HideableProps, ColorableProps {
12
12
  /** Panel transition animation */
13
13
  transition?: TabTransition;
14
14
  }
15
- declare var __VLS_4: {};
15
+ declare var __VLS_8: {};
16
16
  type __VLS_Slots = {} & {
17
- default?: (props: typeof __VLS_4) => any;
17
+ default?: (props: typeof __VLS_8) => any;
18
18
  };
19
19
  declare const __VLS_component: import("vue").DefineComponent<CuiTabsProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
20
20
  "update:modelValue": (value: string) => any;
@@ -1 +1 @@
1
- {"version":3,"file":"CuiTabs.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTabs.vue"],"names":[],"mappings":"AAkWA,OAAO,EAGL,KAAK,UAAU,EACf,KAAK,cAAc,EACnB,KAAK,aAAa,EACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAGrE,MAAM,WAAW,YAAa,SAAQ,aAAa,EAAE,cAAc;IACjE,uBAAuB;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,oBAAoB;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,yBAAyB;IACzB,WAAW,CAAC,EAAE,cAAc,CAAC;IAC7B,sCAAsC;IACtC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,iCAAiC;IACjC,UAAU,CAAC,EAAE,aAAa,CAAC;CAC5B;AAoQD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,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CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import o from "./CuiTabs.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-2356dd2a"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-ed16f53a"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as $, ref as p, watch as A, provide as D, toRef as s, computed as T, withDirectives as z, openBlock as v, createElementBlock as f, normalizeClass as _, createElementVNode as h, Fragment as S, renderList as B, normalizeStyle as K, toDisplayString as N, withModifiers as E, unref as H, createVNode as L, createCommentVNode as M, renderSlot as R, vShow as q, nextTick as F } from "vue";
2
- import U from "./CuiIcon.vue.js";
3
- import { TabsContextKey as j } from "./tabs-context.js";
4
- import { useMessages as G } from "../composables/useMessages.js";
5
- const J = ["aria-orientation"], O = ["data-cui-tab-value", "aria-selected", "aria-disabled", "tabindex", "onClick"], P = { class: "cui-tabs__tab-content" }, Q = ["aria-label", "onClick"], W = { class: "cui-tabs__panels" }, te = /* @__PURE__ */ $({
1
+ import { defineComponent as H, ref as b, watch as _, provide as K, toRef as m, onMounted as M, nextTick as S, onBeforeUnmount as N, computed as L, withDirectives as O, openBlock as v, createElementBlock as h, normalizeClass as T, createElementVNode as k, Fragment as $, renderList as U, normalizeStyle as W, createBlock as q, resolveDynamicComponent as F, createTextVNode as j, toDisplayString as G, withModifiers as J, unref as P, createVNode as Q, createCommentVNode as X, renderSlot as Y, vShow as Z } from "vue";
2
+ import ee from "./CuiIcon.vue.js";
3
+ import { TabsContextKey as te } from "./tabs-context.js";
4
+ import { useMessages as ae } from "../composables/useMessages.js";
5
+ const oe = { class: "cui-tabs__bar-outer" }, le = ["aria-orientation", "data-overflow"], ne = ["data-cui-tab-value", "aria-selected", "aria-disabled", "tabindex", "onClick"], ie = { class: "cui-tabs__tab-content" }, re = ["aria-label", "onClick"], ue = { class: "cui-tabs__panels" }, fe = /* @__PURE__ */ H({
6
6
  __name: "CuiTabs",
7
7
  props: {
8
8
  modelValue: {},
@@ -14,111 +14,149 @@ const J = ["aria-orientation"], O = ["data-cui-tab-value", "aria-selected", "ari
14
14
  color: { default: "primary" }
15
15
  },
16
16
  emits: ["update:modelValue", "close"],
17
- setup(o, { emit: x }) {
18
- const n = o, b = x, l = p(n.modelValue ?? ""), c = p(""), i = p([]);
19
- A(
17
+ setup(r, { emit: A }) {
18
+ const n = r, x = A, o = b(n.modelValue ?? ""), p = b(""), l = b([]), f = b(null);
19
+ _(
20
20
  () => n.modelValue,
21
21
  (e) => {
22
- e !== void 0 && e !== l.value && (c.value = l.value, l.value = e);
22
+ e !== void 0 && e !== o.value && (p.value = o.value, o.value = e);
23
23
  }
24
24
  );
25
- function k(e) {
26
- i.value.find((a) => a.value === e.value) || i.value.push(e), !l.value && !e.disabled && (l.value = e.value, b("update:modelValue", e.value));
25
+ function D(e) {
26
+ const a = l.value.findIndex((t) => t.value === e.value);
27
+ a >= 0 ? l.value[a] = e : l.value.push(e), !o.value && !e.disabled && (o.value = e.value, x("update:modelValue", e.value));
27
28
  }
28
- function g(e) {
29
- i.value = i.value.filter((a) => a.value !== e);
29
+ function B(e) {
30
+ l.value = l.value.filter((a) => a.value !== e);
30
31
  }
31
- function m(e) {
32
- const a = i.value.find((t) => t.value === e);
33
- a != null && a.disabled || (c.value = l.value, l.value = e, b("update:modelValue", e));
32
+ function w(e) {
33
+ const a = l.value.find((t) => t.value === e);
34
+ a != null && a.disabled || (p.value = o.value, o.value = e, x("update:modelValue", e));
34
35
  }
35
- function y(e) {
36
- b("close", e);
36
+ function V(e) {
37
+ x("close", e);
37
38
  }
38
- D(j, {
39
- activeTab: l,
40
- variant: s(n, "variant"),
41
- orientation: s(n, "orientation"),
42
- color: s(n, "color"),
43
- keepAlive: s(n, "keepAlive"),
44
- transition: s(n, "transition"),
45
- previousTab: c,
46
- register: k,
47
- unregister: g,
48
- activate: m,
49
- close: y
39
+ K(te, {
40
+ activeTab: o,
41
+ variant: m(n, "variant"),
42
+ orientation: m(n, "orientation"),
43
+ color: m(n, "color"),
44
+ keepAlive: m(n, "keepAlive"),
45
+ transition: m(n, "transition"),
46
+ previousTab: p,
47
+ register: D,
48
+ unregister: B,
49
+ activate: w,
50
+ close: V
50
51
  });
51
- function w(e) {
52
- const a = i.value.filter((r) => !r.disabled), t = a.findIndex((r) => r.value === l.value);
52
+ function E(e) {
53
+ const a = l.value.filter((d) => !d.disabled), t = a.findIndex((d) => d.value === o.value);
53
54
  if (t < 0) return;
54
- const d = n.orientation === "horizontal", I = d ? "ArrowRight" : "ArrowDown", V = d ? "ArrowLeft" : "ArrowUp";
55
- let u = -1;
56
- e.key === I ? (e.preventDefault(), u = t < a.length - 1 ? t + 1 : 0) : e.key === V ? (e.preventDefault(), u = t > 0 ? t - 1 : a.length - 1) : e.key === "Home" ? (e.preventDefault(), u = 0) : e.key === "End" && (e.preventDefault(), u = a.length - 1), u >= 0 && (m(a[u].value), F(() => {
57
- const r = document.querySelector(
58
- `[data-cui-tab-value="${a[u].value}"]`
59
- );
60
- r == null || r.focus();
55
+ const u = n.orientation === "horizontal", y = u ? "ArrowRight" : "ArrowDown", I = u ? "ArrowLeft" : "ArrowUp";
56
+ let i = -1;
57
+ e.key === y ? (e.preventDefault(), i = t < a.length - 1 ? t + 1 : 0) : e.key === I ? (e.preventDefault(), i = t > 0 ? t - 1 : a.length - 1) : e.key === "Home" ? (e.preventDefault(), i = 0) : e.key === "End" && (e.preventDefault(), i = a.length - 1), i >= 0 && (w(a[i].value), S(() => {
58
+ var d;
59
+ (d = C(a[i].value)) == null || d.focus();
61
60
  }));
62
61
  }
63
- T(() => {
64
- const e = i.value.findIndex((t) => t.value === c.value);
65
- return i.value.findIndex((t) => t.value === l.value) >= e ? "left" : "right";
62
+ function C(e) {
63
+ var a;
64
+ return ((a = f.value) == null ? void 0 : a.querySelector(`[data-cui-tab-value="${e}"]`)) ?? null;
65
+ }
66
+ const g = b("none");
67
+ function s() {
68
+ const e = f.value;
69
+ if (!e) return;
70
+ const a = n.orientation === "horizontal", t = a ? e.clientWidth : e.clientHeight, u = a ? e.scrollWidth : e.scrollHeight, y = Math.abs(a ? e.scrollLeft : e.scrollTop);
71
+ if (u - t <= 1) {
72
+ g.value = "none";
73
+ return;
74
+ }
75
+ const I = y <= 1, i = y >= u - t - 1;
76
+ g.value = I ? "end" : i ? "start" : "both";
77
+ }
78
+ function z() {
79
+ var e, a;
80
+ (a = (e = C(o.value)) == null ? void 0 : e.scrollIntoView) == null || a.call(e, { inline: "nearest", block: "nearest" });
81
+ }
82
+ let c;
83
+ M(() => {
84
+ S(() => {
85
+ z(), s();
86
+ }), typeof ResizeObserver < "u" && f.value && (c = new ResizeObserver(s), c.observe(f.value));
87
+ }), N(() => {
88
+ c == null || c.disconnect(), c = void 0;
89
+ }), _(o, () => {
90
+ z(), s();
91
+ }, { flush: "post" }), _(() => l.value.length, s, { flush: "post" }), _(() => n.orientation, s, { flush: "post" }), L(() => {
92
+ const e = l.value.findIndex((t) => t.value === p.value);
93
+ return l.value.findIndex((t) => t.value === o.value) >= e ? "left" : "right";
66
94
  });
67
- const C = G();
68
- return (e, a) => z((v(), f("div", {
69
- class: _(["cui-tabs", [
70
- `cui-tabs--${o.variant}`,
71
- `cui-tabs--${o.orientation}`
95
+ const R = ae();
96
+ return (e, a) => O((v(), h("div", {
97
+ class: T(["cui-tabs", [
98
+ `cui-tabs--${r.variant}`,
99
+ `cui-tabs--${r.orientation}`
72
100
  ]])
73
101
  }, [
74
- h("div", {
75
- class: "cui-tabs__bar",
76
- role: "tablist",
77
- "aria-orientation": o.orientation,
78
- onKeydown: w
79
- }, [
80
- (v(!0), f(S, null, B(i.value, (t) => (v(), f("button", {
81
- key: t.value,
82
- "data-cui-tab-value": t.value,
83
- class: _(["cui-tabs__tab", {
84
- "cui-tabs__tab--active": l.value === t.value,
85
- "cui-tabs__tab--disabled": t.disabled
86
- }]),
87
- style: K({
88
- "--_tab-color": `var(--cui-${o.color})`,
89
- "--_tab-hover": `var(--cui-${o.color}-hover)`,
90
- "--_tab-bg": `var(--cui-${o.color}-bg)`
91
- }),
92
- role: "tab",
93
- "aria-selected": l.value === t.value,
94
- "aria-disabled": t.disabled || void 0,
95
- tabindex: l.value === t.value ? 0 : -1,
96
- onClick: (d) => m(t.value)
102
+ k("div", oe, [
103
+ k("div", {
104
+ ref_key: "barRef",
105
+ ref: f,
106
+ class: "cui-tabs__bar",
107
+ role: "tablist",
108
+ "aria-orientation": r.orientation,
109
+ "data-overflow": g.value,
110
+ onKeydown: E,
111
+ onScroll: s
97
112
  }, [
98
- h("span", P, N(t.label), 1),
99
- t.closeable ? (v(), f("button", {
100
- key: 0,
101
- type: "button",
102
- class: "cui-tabs__tab-close",
103
- "aria-label": H(C).tabs.closeTab,
104
- tabindex: "-1",
105
- onClick: E((d) => y(t.value), ["stop"])
113
+ (v(!0), h($, null, U(l.value, (t) => (v(), h("button", {
114
+ key: t.value,
115
+ "data-cui-tab-value": t.value,
116
+ class: T(["cui-tabs__tab", {
117
+ "cui-tabs__tab--active": o.value === t.value,
118
+ "cui-tabs__tab--disabled": t.disabled
119
+ }]),
120
+ style: W({
121
+ "--_tab-color": `var(--cui-${r.color})`,
122
+ "--_tab-hover": `var(--cui-${r.color}-hover)`,
123
+ "--_tab-bg": `var(--cui-${r.color}-bg)`
124
+ }),
125
+ role: "tab",
126
+ "aria-selected": o.value === t.value,
127
+ "aria-disabled": t.disabled || void 0,
128
+ tabindex: o.value === t.value ? 0 : -1,
129
+ onClick: (u) => w(t.value)
106
130
  }, [
107
- L(U, {
108
- name: "x",
109
- size: "0.75rem"
110
- })
111
- ], 8, Q)) : M("", !0)
112
- ], 14, O))), 128))
113
- ], 40, J),
114
- h("div", W, [
115
- R(e.$slots, "default", {}, void 0, !0)
131
+ k("span", ie, [
132
+ t.labelSlot ? (v(), q(F(t.labelSlot), { key: 0 })) : (v(), h($, { key: 1 }, [
133
+ j(G(t.label), 1)
134
+ ], 64))
135
+ ]),
136
+ t.closeable ? (v(), h("button", {
137
+ key: 0,
138
+ type: "button",
139
+ class: "cui-tabs__tab-close",
140
+ "aria-label": P(R).tabs.closeTab,
141
+ tabindex: "-1",
142
+ onClick: J((u) => V(t.value), ["stop"])
143
+ }, [
144
+ Q(ee, {
145
+ name: "x",
146
+ size: "0.75rem"
147
+ })
148
+ ], 8, re)) : X("", !0)
149
+ ], 14, ne))), 128))
150
+ ], 40, le)
151
+ ]),
152
+ k("div", ue, [
153
+ Y(e.$slots, "default", {}, void 0, !0)
116
154
  ])
117
155
  ], 2)), [
118
- [q, !o.hidden]
156
+ [Z, !r.hidden]
119
157
  ]);
120
158
  }
121
159
  });
122
160
  export {
123
- te as default
161
+ fe as default
124
162
  };
@@ -11,6 +11,7 @@ type __VLS_Props = {
11
11
  cfg: {
12
12
  fontSize: string;
13
13
  iconSize: string;
14
+ hitSize: string;
14
15
  indent: string;
15
16
  padY: string;
16
17
  padX: string;
@@ -1 +1 @@
1
- {"version":3,"file":"CuiTreeNode.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiTreeNode.vue"],"names":[],"mappings":"AA6NA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,QAAQ,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAC/B,WAAW,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC;IAClC,UAAU,EAAE,OAAO,CAAC;IACpB,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,OAAO,CAAC;IAClB,GAAG,EAAE;QAA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CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;CAC1G,CAAC;AAiQF,QAAA,IAAI,OAAO;;;;;CAAU,EAAE,QAAQ,KAAY,CAAE;AAC7C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GACzC;IAAE,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAiC7C,QAAA,MAAM,eAAe;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -1,6 +1,6 @@
1
- import { defineComponent as I, computed as y, ref as b, watch as E, nextTick as H, resolveComponent as R, openBlock as n, createElementBlock as o, normalizeStyle as l, createCommentVNode as c, createElementVNode as k, createBlock as $, renderSlot as S, createTextVNode as Y, toDisplayString as V, Fragment as F, renderList as P, withCtx as W, mergeProps as X } from "vue";
2
- import C from "./CuiIcon.vue.js";
3
- const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, w = "var(--cui-border-strong, var(--cui-border))", O = /* @__PURE__ */ I({
1
+ import { defineComponent as I, computed as y, ref as b, watch as E, nextTick as H, resolveComponent as R, openBlock as n, createElementBlock as o, normalizeStyle as l, createCommentVNode as c, createElementVNode as $, createBlock as k, renderSlot as w, createTextVNode as Y, toDisplayString as V, Fragment as F, renderList as P, withCtx as W, mergeProps as X } from "vue";
2
+ import z from "./CuiIcon.vue.js";
3
+ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, S = "var(--cui-border-strong, var(--cui-border))", O = /* @__PURE__ */ I({
4
4
  __name: "CuiTreeNode",
5
5
  props: {
6
6
  node: {},
@@ -14,14 +14,14 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
14
14
  cfg: {}
15
15
  },
16
16
  emits: ["toggle-expand", "select-node"],
17
- setup(e, { emit: z }) {
18
- const t = e, r = z, s = y(() => t.node.children && t.node.children.length > 0), u = y(() => t.expanded.has(t.node.id)), v = y(() => t.selectedSet.has(t.node.id)), f = b(null), i = b(void 0), h = b(u.value);
19
- E(u, (d) => {
17
+ setup(e, { emit: C }) {
18
+ const t = e, r = C, s = y(() => t.node.children && t.node.children.length > 0), u = y(() => t.expanded.has(t.node.id)), v = y(() => t.selectedSet.has(t.node.id)), f = b(null), i = b(void 0), h = b(u.value);
19
+ E(u, (a) => {
20
20
  if (!t.animated) {
21
- h.value = d;
21
+ h.value = a;
22
22
  return;
23
23
  }
24
- d ? (h.value = !0, i.value = "0px", H(() => {
24
+ a ? (h.value = !0, i.value = "0px", H(() => {
25
25
  f.value && (i.value = f.value.scrollHeight + "px", setTimeout(() => {
26
26
  i.value = void 0;
27
27
  }, 250));
@@ -31,14 +31,14 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
31
31
  }, 250);
32
32
  }));
33
33
  });
34
- function L(d) {
35
- d.stopPropagation(), r("toggle-expand", t.node);
34
+ function L(a) {
35
+ a.stopPropagation(), r("toggle-expand", t.node);
36
36
  }
37
37
  function T() {
38
38
  s.value && !t.selectable ? r("toggle-expand", t.node) : r("select-node", t.node);
39
39
  }
40
40
  const m = y(() => t.cfg.padX);
41
- return (d, a) => {
41
+ return (a, d) => {
42
42
  const B = R("CuiTreeNode", !0);
43
43
  return n(), o("div", {
44
44
  role: "treeitem",
@@ -53,7 +53,7 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
53
53
  top: "0",
54
54
  bottom: "0",
55
55
  width: "0",
56
- borderLeft: `1px solid ${w}`,
56
+ borderLeft: `1px solid ${S}`,
57
57
  zIndex: "0"
58
58
  })
59
59
  }, null, 4)) : c("", !0),
@@ -65,7 +65,7 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
65
65
  top: "0",
66
66
  height: `calc(${e.cfg.padY} + 0.625em)`,
67
67
  width: "0",
68
- borderLeft: `1px solid ${w}`,
68
+ borderLeft: `1px solid ${S}`,
69
69
  zIndex: "0"
70
70
  })
71
71
  }, null, 4)) : c("", !0),
@@ -77,11 +77,11 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
77
77
  top: `calc(${e.cfg.padY} + 0.625em)`,
78
78
  width: `calc(${e.cfg.indent} * 0.5)`,
79
79
  height: "0",
80
- borderTop: `1px solid ${w}`,
80
+ borderTop: `1px solid ${S}`,
81
81
  zIndex: "0"
82
82
  })
83
83
  }, null, 4)) : c("", !0),
84
- k("div", {
84
+ $("div", {
85
85
  style: l({
86
86
  display: "flex",
87
87
  alignItems: "center",
@@ -103,10 +103,11 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
103
103
  }),
104
104
  onClick: T
105
105
  }, [
106
- k("div", {
106
+ $("div", {
107
107
  style: l({
108
- width: e.cfg.iconSize,
109
- height: e.cfg.iconSize,
108
+ width: e.cfg.hitSize,
109
+ height: e.cfg.hitSize,
110
+ marginLeft: `calc((${e.cfg.iconSize} - ${e.cfg.hitSize}) / 2)`,
110
111
  display: "flex",
111
112
  alignItems: "center",
112
113
  justifyContent: "center",
@@ -114,23 +115,23 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
114
115
  transition: "transform 0.15s ease",
115
116
  transform: u.value ? "rotate(90deg)" : "rotate(0deg)"
116
117
  }),
117
- onClick: a[0] || (a[0] = (x) => s.value && L(x))
118
+ onClick: d[0] || (d[0] = (x) => s.value && L(x))
118
119
  }, [
119
- s.value ? (n(), $(C, {
120
+ s.value ? (n(), k(z, {
120
121
  key: 0,
121
122
  name: "caret-right",
122
123
  size: e.cfg.iconSize,
123
124
  style: { color: "var(--cui-text-tertiary)" }
124
125
  }, null, 8, ["size"])) : c("", !0)
125
126
  ], 4),
126
- e.node.icon ? (n(), $(C, {
127
+ e.node.icon ? (n(), k(z, {
127
128
  key: 0,
128
129
  name: e.node.icon,
129
130
  size: e.cfg.iconSize,
130
131
  style: l({ flexShrink: "0", color: v.value ? "var(--cui-primary)" : "var(--cui-text-secondary)" })
131
132
  }, null, 8, ["name", "size", "style"])) : c("", !0),
132
- k("div", q, [
133
- S(d.$slots, "node", {
133
+ $("div", q, [
134
+ w(a.$slots, "node", {
134
135
  node: e.node,
135
136
  selected: v.value,
136
137
  expanded: u.value,
@@ -151,7 +152,7 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
151
152
  transition: e.animated ? "max-height 0.25s ease" : void 0
152
153
  })
153
154
  }, [
154
- (n(!0), o(F, null, P(e.node.children, (x, N) => (n(), $(B, {
155
+ (n(!0), o(F, null, P(e.node.children, (x, N) => (n(), k(B, {
155
156
  key: String(x.id),
156
157
  node: x,
157
158
  depth: e.depth + 1,
@@ -162,11 +163,11 @@ const j = ["aria-expanded"], q = { style: { flex: "1", minWidth: "0", overflow:
162
163
  "show-lines": e.showLines,
163
164
  animated: e.animated,
164
165
  cfg: e.cfg,
165
- onToggleExpand: a[1] || (a[1] = (g) => r("toggle-expand", g)),
166
- onSelectNode: a[2] || (a[2] = (g) => r("select-node", g))
166
+ onToggleExpand: d[1] || (d[1] = (g) => r("toggle-expand", g)),
167
+ onSelectNode: d[2] || (d[2] = (g) => r("select-node", g))
167
168
  }, {
168
169
  node: W((g) => [
169
- S(d.$slots, "node", X({ ref_for: !0 }, g))
170
+ w(a.$slots, "node", X({ ref_for: !0 }, g))
170
171
  ]),
171
172
  _: 3
172
173
  }, 8, ["node", "depth", "is-last", "expanded", "selected-set", "selectable", "show-lines", "animated", "cfg"]))), 128))