@indielayer/ui 1.13.2 → 1.14.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 (59) hide show
  1. package/docs/pages/component/accordion/index.vue +1 -1
  2. package/docs/pages/component/button/index.vue +1 -1
  3. package/docs/pages/component/checkbox/index.vue +1 -1
  4. package/docs/pages/component/container/index.vue +1 -1
  5. package/docs/pages/component/drawer/index.vue +1 -1
  6. package/docs/pages/component/form/index.vue +1 -1
  7. package/docs/pages/component/formGroup/index.vue +1 -1
  8. package/docs/pages/component/icon/index.vue +1 -1
  9. package/docs/pages/component/notifications/index.vue +1 -1
  10. package/docs/pages/component/pagination/index.vue +1 -1
  11. package/docs/pages/component/popover/index.vue +1 -1
  12. package/docs/pages/component/progress/index.vue +1 -1
  13. package/docs/pages/component/scroll/index.vue +1 -1
  14. package/docs/pages/component/skeleton/index.vue +1 -1
  15. package/docs/pages/component/slider/index.vue +1 -1
  16. package/docs/pages/component/spacer/index.vue +1 -1
  17. package/docs/pages/component/spinner/index.vue +1 -1
  18. package/docs/pages/component/table/index.vue +7 -0
  19. package/docs/pages/component/table/selectable.vue +68 -0
  20. package/docs/pages/component/table/usage.vue +1 -4
  21. package/docs/pages/component/table/virtual.vue +3 -0
  22. package/docs/pages/component/tag/index.vue +1 -1
  23. package/docs/pages/component/textarea/index.vue +1 -1
  24. package/docs/pages/component/toggle/index.vue +1 -1
  25. package/docs/pages/component/upload/index.vue +1 -1
  26. package/docs/search/components.json +1 -1
  27. package/lib/components/button/theme/Button.base.theme.js +21 -21
  28. package/lib/components/menu/MenuItem.vue.js +1 -1
  29. package/lib/components/menu/MenuItem.vue2.js +82 -84
  30. package/lib/components/radio/theme/Radio.base.theme.js +24 -24
  31. package/lib/components/select/Select.vue.js +121 -112
  32. package/lib/components/table/Table.vue.d.ts +62 -8
  33. package/lib/components/table/Table.vue.js +194 -139
  34. package/lib/components/table/TableHeader.vue.d.ts +5 -5
  35. package/lib/components/table/TableHeader.vue.js +37 -34
  36. package/lib/components/table/TableRow.vue.d.ts +4 -0
  37. package/lib/components/table/TableRow.vue.js +3 -2
  38. package/lib/components/table/theme/TableHeader.base.theme.js +9 -9
  39. package/lib/components/table/theme/TableHeader.carbon.theme.js +1 -1
  40. package/lib/components/table/theme/TableRow.base.theme.js +3 -3
  41. package/lib/composables/useFocusTrap.d.ts +9 -4
  42. package/lib/composables/useFocusTrap.js +42 -27
  43. package/lib/index.js +1 -1
  44. package/lib/index.umd.js +4 -4
  45. package/lib/version.d.ts +1 -1
  46. package/lib/version.js +1 -1
  47. package/package.json +1 -1
  48. package/src/components/button/theme/Button.base.theme.ts +1 -1
  49. package/src/components/menu/MenuItem.vue +1 -0
  50. package/src/components/radio/theme/Radio.base.theme.ts +1 -1
  51. package/src/components/select/Select.vue +20 -5
  52. package/src/components/table/Table.vue +113 -15
  53. package/src/components/table/TableHeader.vue +7 -5
  54. package/src/components/table/TableRow.vue +1 -0
  55. package/src/components/table/theme/TableHeader.base.theme.ts +4 -3
  56. package/src/components/table/theme/TableHeader.carbon.theme.ts +0 -1
  57. package/src/components/table/theme/TableRow.base.theme.ts +2 -2
  58. package/src/composables/useFocusTrap.ts +73 -42
  59. package/src/version.ts +1 -1
@@ -1,19 +1,20 @@
1
- import { defineComponent as R, ref as y, computed as b, onMounted as w, watch as x, resolveComponent as I, openBlock as l, createBlock as r, resolveDynamicComponent as O, mergeProps as P, unref as c, withCtx as j, withModifiers as D, createCommentVNode as s, createElementBlock as n, renderSlot as v, createTextVNode as f, toDisplayString as m, createElementVNode as F, Fragment as T } from "vue";
2
- import { useMutationObserver as V } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
- import { useColors as E } from "../../composables/useColors.js";
1
+ import { defineComponent as N, ref as y, computed as b, onMounted as R, watch as x, openBlock as l, createBlock as r, resolveDynamicComponent as w, mergeProps as I, unref as c, withCtx as O, withModifiers as P, createCommentVNode as s, createElementBlock as n, renderSlot as f, createTextVNode as v, toDisplayString as m, createElementVNode as j, Fragment as D } from "vue";
2
+ import { useMutationObserver as F } from "../../node_modules/.pnpm/@vueuse_core@11.1.0_vue@3.5.10_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
+ import { useColors as T } from "../../composables/useColors.js";
4
4
  import { useCommon as C } from "../../composables/useCommon.js";
5
- import { useTheme as A } from "../../composables/useTheme.js";
5
+ import { useTheme as V } from "../../composables/useTheme.js";
6
6
  import $ from "../icon/Icon.vue.js";
7
- import L from "../spinner/Spinner.vue.js";
8
- const X = {
7
+ import E from "../spinner/Spinner.vue.js";
8
+ import X from "../checkbox/Checkbox.vue.js";
9
+ const A = {
9
10
  key: 1,
10
11
  class: "mr-2 shrink-0"
11
- }, q = {
12
+ }, L = {
12
13
  key: 3,
13
14
  class: "flex-1 truncate"
14
- }, G = { class: "ml-1 shrink-0" }, H = { key: 0 }, J = {
15
+ }, q = { class: "ml-1 shrink-0" }, G = { key: 0 }, H = {
15
16
  ...C.props(),
16
- ...E.props("secondary"),
17
+ ...T.props("secondary"),
17
18
  item: {
18
19
  type: Object,
19
20
  default: () => {
@@ -49,22 +50,22 @@ const X = {
49
50
  prefix: String,
50
51
  suffix: String,
51
52
  checkbox: Boolean
52
- }, K = {
53
+ }, J = {
53
54
  name: "XMenuItem",
54
55
  validators: {
55
56
  ...C.validators()
56
57
  }
57
- }, le = /* @__PURE__ */ R({
58
- ...K,
59
- props: J,
58
+ }, le = /* @__PURE__ */ N({
59
+ ...J,
60
+ props: H,
60
61
  emits: ["active", "click", "checkbox-click"],
61
62
  setup(B, { emit: S }) {
62
63
  const p = B, d = S, o = y(), a = y(!1), e = b(() => ({
63
64
  ...p,
64
65
  ...p.item
65
66
  })), k = b(() => e.value.to ? "router-link" : e.value.href ? "a" : "div");
66
- w(() => {
67
- o.value && (g(), k.value === "router-link" && V(o.value.$el, g, {
67
+ R(() => {
68
+ o.value && (g(), k.value === "router-link" && F(o.value.$el, g, {
68
69
  attributes: !0,
69
70
  attributeFilter: ["class"]
70
71
  }));
@@ -88,76 +89,73 @@ const X = {
88
89
  }), x(() => e.value.active, (t) => {
89
90
  a.value = !!t;
90
91
  });
91
- const { styles: z, classes: _, className: M } = A("MenuItem", {}, e, { isActive: a });
92
- return (t, i) => {
93
- const N = I("x-checkbox");
94
- return l(), r(O(k.value), P({
95
- ref_key: "elRef",
96
- ref: o
97
- }, {
98
- ...e.value.href ? { href: e.value.href } : {},
99
- ...e.value.attrs
100
- }, {
101
- to: e.value.to,
102
- target: e.value.target,
103
- color: e.value.color,
104
- style: c(z),
105
- class: [
106
- c(M),
107
- t.$style["menu-item"],
108
- [a.value && !t.checkbox ? t.$style["menu-item--active"] : ""],
109
- c(_).wrapper,
110
- {
111
- "flex items-center": t.$slots.prefix || t.$slots.suffix
112
- }
113
- ],
114
- title: e.value.label,
115
- alt: e.value.label,
116
- onClick: i[1] || (i[1] = (u) => h(u, "click"))
117
- }), {
118
- default: j(() => [
119
- t.checkbox ? (l(), r(N, {
92
+ const { styles: z, classes: _, className: M } = V("MenuItem", {}, e, { isActive: a });
93
+ return (t, i) => (l(), r(w(k.value), I({
94
+ ref_key: "elRef",
95
+ ref: o
96
+ }, {
97
+ ...e.value.href ? { href: e.value.href } : {},
98
+ ...e.value.attrs
99
+ }, {
100
+ to: e.value.to,
101
+ target: e.value.target,
102
+ color: e.value.color,
103
+ style: c(z),
104
+ class: [
105
+ c(M),
106
+ t.$style["menu-item"],
107
+ [a.value && !t.checkbox ? t.$style["menu-item--active"] : ""],
108
+ c(_).wrapper,
109
+ {
110
+ "flex items-center": t.$slots.prefix || t.$slots.suffix
111
+ }
112
+ ],
113
+ title: e.value.label,
114
+ alt: e.value.label,
115
+ onClick: i[1] || (i[1] = (u) => h(u, "click"))
116
+ }), {
117
+ default: O(() => [
118
+ t.checkbox ? (l(), r(X, {
119
+ key: 0,
120
+ "model-value": e.value.active,
121
+ "hide-footer": "",
122
+ "skip-form-registry": "",
123
+ onClick: i[0] || (i[0] = P((u) => h(u, "checkbox-click"), ["stop", "prevent"]))
124
+ }, null, 8, ["model-value"])) : s("", !0),
125
+ t.$slots.prefix || e.value.prefix ? (l(), n("span", A, [
126
+ f(t.$slots, "prefix", { item: e.value }, () => [
127
+ v(m(e.value.prefix), 1)
128
+ ], !0)
129
+ ])) : e.value.icon ? (l(), r($, {
130
+ key: 2,
131
+ size: e.value.size,
132
+ icon: e.value.icon,
133
+ class: "mr-2"
134
+ }, null, 8, ["size", "icon"])) : s("", !0),
135
+ t.minimal ? s("", !0) : (l(), n("span", L, [
136
+ f(t.$slots, "default", { item: e.value }, () => [
137
+ v(m(e.value.label), 1)
138
+ ], !0)
139
+ ])),
140
+ j("span", q, [
141
+ e.value.loading ? (l(), r(E, {
120
142
  key: 0,
121
- "model-value": e.value.active,
122
- "hide-footer": "",
123
- "skip-form-registry": "",
124
- onClick: i[0] || (i[0] = D((u) => h(u, "checkbox-click"), ["stop", "prevent"]))
125
- }, null, 8, ["model-value"])) : s("", !0),
126
- t.$slots.prefix || e.value.prefix ? (l(), n("span", X, [
127
- v(t.$slots, "prefix", { item: e.value }, () => [
128
- f(m(e.value.prefix), 1)
129
- ], !0)
130
- ])) : e.value.icon ? (l(), r($, {
131
- key: 2,
132
- size: e.value.size,
133
- icon: e.value.icon,
134
- class: "mr-2"
135
- }, null, 8, ["size", "icon"])) : s("", !0),
136
- t.minimal ? s("", !0) : (l(), n("span", q, [
137
- v(t.$slots, "default", { item: e.value }, () => [
138
- f(m(e.value.label), 1)
139
- ], !0)
140
- ])),
141
- F("span", G, [
142
- e.value.loading ? (l(), r(L, {
143
- key: 0,
144
- size: e.value.size
145
- }, null, 8, ["size"])) : (l(), n(T, { key: 1 }, [
146
- t.$slots.suffix || e.value.suffix ? (l(), n("span", H, [
147
- v(t.$slots, "suffix", { item: e.value }, () => [
148
- f(m(e.value.suffix), 1)
149
- ], !0)
150
- ])) : e.value.iconRight ? (l(), r($, {
151
- key: 1,
152
- size: e.value.size,
153
- icon: e.value.iconRight
154
- }, null, 8, ["size", "icon"])) : s("", !0)
155
- ], 64))
156
- ])
157
- ]),
158
- _: 3
159
- }, 16, ["to", "target", "color", "style", "class", "title", "alt"]);
160
- };
143
+ size: e.value.size
144
+ }, null, 8, ["size"])) : (l(), n(D, { key: 1 }, [
145
+ t.$slots.suffix || e.value.suffix ? (l(), n("span", G, [
146
+ f(t.$slots, "suffix", { item: e.value }, () => [
147
+ v(m(e.value.suffix), 1)
148
+ ], !0)
149
+ ])) : e.value.iconRight ? (l(), r($, {
150
+ key: 1,
151
+ size: e.value.size,
152
+ icon: e.value.iconRight
153
+ }, null, 8, ["size", "icon"])) : s("", !0)
154
+ ], 64))
155
+ ])
156
+ ]),
157
+ _: 3
158
+ }, 16, ["to", "target", "color", "style", "class", "title", "alt"]));
161
159
  }
162
160
  });
163
161
  export {
@@ -5,48 +5,48 @@ const a = {
5
5
  return e.isInsideForm && !e.isInsideFormGroup && t.push("mb-5"), t;
6
6
  },
7
7
  circle: ({ props: e }) => {
8
- const t = ["rounded-full flex justify-center items-center shrink-0 border outline-offset-2 outline-slate-300 dark:outline-slate-500 group-focus:outline-1 group-focus:outline"];
8
+ const t = ["rounded-full flex justify-center items-center shrink-0 border outline-offset-2 outline-slate-300 dark:outline-slate-500 group-focus-visible:outline-1 group-focus-visible:outline"];
9
9
  return e.size === "lg" ? t.push("h-5 w-5") : e.size === "xl" ? t.push("h-6 w-6") : t.push("h-4 w-4"), t;
10
10
  },
11
11
  circleIcon: ({ props: e, data: t }) => {
12
- const r = [];
13
- return t.selected || r.push("opacity-0"), e.size === "sm" || e.size === "xs" ? r.push("h-2") : e.size === "lg" ? r.push("h-2.5") : e.size === "xl" ? r.push("h-3") : r.push("h-2"), r;
12
+ const s = [];
13
+ return t.selected || s.push("opacity-0"), e.size === "sm" || e.size === "xs" ? s.push("h-2") : e.size === "lg" ? s.push("h-2.5") : e.size === "xl" ? s.push("h-3") : s.push("h-2"), s;
14
14
  },
15
15
  label: ({ props: e, data: t }) => {
16
- let r = "text-secondary-800 dark:text-secondary-200 pl-2";
17
- return r += t.isInsideFormGroup ? " font-normal" : " font-medium", e.size === "xs" ? r += " text-xs" : e.size === "sm" ? r += " text-sm" : e.size === "lg" ? r += " text-lg" : e.size === "xl" && (r += " text-xl"), r;
16
+ let s = "text-secondary-800 dark:text-secondary-200 pl-2";
17
+ return s += t.isInsideFormGroup ? " font-normal" : " font-medium", e.size === "xs" ? s += " text-xs" : e.size === "sm" ? s += " text-sm" : e.size === "lg" ? s += " text-lg" : e.size === "xl" && (s += " text-xl"), s;
18
18
  },
19
19
  content: ({ props: e }) => {
20
20
  let t = "pl-2";
21
21
  return e.size === "xs" ? t += " text-xs" : e.size === "sm" ? t += " text-sm" : e.size === "lg" ? t += " text-lg" : e.size === "xl" && (t += " text-xl"), t;
22
22
  }
23
23
  },
24
- styles: ({ props: e, colors: t, css: r, data: n }) => {
25
- const s = t.getPalette("gray"), l = t.getPalette(e.color), i = [];
26
- return e.loading ? r.variables({
24
+ styles: ({ props: e, colors: t, css: s, data: n }) => {
25
+ const r = t.getPalette("gray"), l = t.getPalette(e.color), i = [];
26
+ return e.loading ? s.variables({
27
27
  bg: "transparent",
28
28
  border: "transparent",
29
29
  dark: {
30
30
  bg: "transparent",
31
31
  border: "transparent"
32
32
  }
33
- }) : (e.disabled ? n.selected ? i.push(r.variables({
33
+ }) : (e.disabled ? n.selected ? i.push(s.variables({
34
34
  bg: "transparent",
35
- border: s[200],
36
- circle: s[200],
35
+ border: r[200],
36
+ circle: r[200],
37
37
  dark: {
38
38
  bg: "transparent",
39
- border: s[700],
40
- circle: s[700]
39
+ border: r[700],
40
+ circle: r[700]
41
41
  }
42
- })) : i.push(r.variables({
43
- bg: s[200],
44
- border: s[200],
42
+ })) : i.push(s.variables({
43
+ bg: r[200],
44
+ border: r[200],
45
45
  dark: {
46
- bg: s[700],
47
- border: s[700]
46
+ bg: r[700],
47
+ border: r[700]
48
48
  }
49
- })) : (n.selected ? i.push(r.variables({
49
+ })) : (n.selected ? i.push(s.variables({
50
50
  bg: "transparent",
51
51
  border: l[500],
52
52
  circle: l[500],
@@ -55,14 +55,14 @@ const a = {
55
55
  border: l[500],
56
56
  circle: l[500]
57
57
  }
58
- })) : i.push(r.variables({
58
+ })) : i.push(s.variables({
59
59
  bg: "#fff",
60
- border: e.glow ? l[300] : s[300],
60
+ border: e.glow ? l[300] : r[300],
61
61
  dark: {
62
- bg: s[900],
63
- border: e.glow ? l[300] : s[400]
62
+ bg: r[900],
63
+ border: e.glow ? l[300] : r[400]
64
64
  }
65
- })), e.glow && i.push(r.get("glow", t.getColorOpacity(l[500], 0.5)))), i);
65
+ })), e.glow && i.push(s.get("glow", t.getColorOpacity(l[500], 0.5)))), i);
66
66
  }
67
67
  }, o = a;
68
68
  export {