@indielayer/ui 1.7.5 → 1.8.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 (73) hide show
  1. package/README.md +0 -1
  2. package/docs/components/common/CodePreview.vue +1 -1
  3. package/docs/components/common/CopyButton.vue +1 -1
  4. package/docs/components/toolbar/ToolbarColorToggle.vue +4 -4
  5. package/docs/components/toolbar/ToolbarSearch.vue +1 -1
  6. package/docs/layouts/default.vue +2 -2
  7. package/docs/pages/colors.vue +1 -1
  8. package/docs/pages/component/alert/usage.vue +1 -1
  9. package/docs/pages/component/breadcrumbs/usage.vue +1 -1
  10. package/docs/pages/component/button/button-group.vue +1 -1
  11. package/docs/pages/component/button/variants.vue +1 -1
  12. package/docs/pages/component/drawer/usage.vue +1 -1
  13. package/docs/pages/component/form/usage.vue +2 -1
  14. package/docs/pages/component/formGroup/usage.vue +1 -1
  15. package/docs/pages/component/modal/composed.vue +12 -3
  16. package/docs/pages/component/modal/usage.vue +5 -12
  17. package/docs/pages/component/notifications/usage.vue +9 -9
  18. package/docs/pages/component/pagination/usage.vue +2 -1
  19. package/docs/pages/component/progress/variants.vue +8 -8
  20. package/docs/pages/component/radio/states.vue +6 -6
  21. package/docs/pages/component/radio/variants.vue +6 -6
  22. package/docs/pages/component/select/index.vue +5 -5
  23. package/docs/pages/component/select/{variants.vue → size.vue} +11 -15
  24. package/docs/pages/component/select/states.vue +11 -15
  25. package/docs/pages/component/select/usage.vue +19 -22
  26. package/docs/pages/component/spinner/variants.vue +1 -1
  27. package/docs/pages/component/table/usage.vue +1 -1
  28. package/docs/pages/component/tag/usage.vue +10 -18
  29. package/docs/pages/component/toggle/states.vue +6 -6
  30. package/docs/pages/component/toggle/variants.vue +6 -6
  31. package/docs/pages/icons.vue +36 -39
  32. package/docs/router/index.ts +1 -5
  33. package/lib/components/checkbox/Checkbox.vue.d.ts +4 -0
  34. package/lib/components/datepicker/Datepicker.vue.d.ts +4 -0
  35. package/lib/components/datepicker/Datepicker.vue.js +3 -3
  36. package/lib/components/drawer/Drawer.vue.js +1 -1
  37. package/lib/components/formGroup/FormGroup.vue.d.ts +4 -0
  38. package/lib/components/input/Input.vue.d.ts +7 -0
  39. package/lib/components/input/Input.vue.js +26 -24
  40. package/lib/components/menu/MenuItem.vue2.js +1 -1
  41. package/lib/components/modal/Modal.vue.js +74 -70
  42. package/lib/components/popover/Popover.vue.js +1 -1
  43. package/lib/components/radio/Radio.vue.d.ts +4 -0
  44. package/lib/components/scroll/Scroll.vue2.js +1 -1
  45. package/lib/components/select/Select.vue.d.ts +24 -1
  46. package/lib/components/select/Select.vue.js +302 -264
  47. package/lib/components/select/theme/Select.base.theme.js +3 -1
  48. package/lib/components/select/theme/Select.carbon.theme.js +3 -1
  49. package/lib/components/slider/Slider.vue.d.ts +4 -0
  50. package/lib/components/tab/Tab.vue.js +1 -1
  51. package/lib/components/tab/TabGroup.vue.js +2 -2
  52. package/lib/components/textarea/Textarea.vue.d.ts +4 -0
  53. package/lib/components/textarea/Textarea.vue.js +1 -1
  54. package/lib/components/toggle/Toggle.vue.d.ts +4 -0
  55. package/lib/components/tooltip/Tooltip.vue.js +1 -1
  56. package/lib/composables/useInputtable.d.ts +1 -0
  57. package/lib/composables/useInputtable.js +31 -30
  58. package/lib/index.umd.js +4 -4
  59. package/lib/node_modules/.pnpm/{@vueuse_core@10.2.0_vue@3.3.9 → @vueuse_core@10.2.0_vue@3.3.9_typescript@5.2.2_}/node_modules/@vueuse/core/index.js +2 -2
  60. package/lib/version.d.ts +1 -1
  61. package/lib/version.js +1 -1
  62. package/package.json +1 -1
  63. package/src/components/input/Input.vue +3 -1
  64. package/src/components/modal/Modal.vue +11 -2
  65. package/src/components/select/Select.vue +70 -25
  66. package/src/components/select/theme/Select.base.theme.ts +5 -1
  67. package/src/components/select/theme/Select.carbon.theme.ts +5 -1
  68. package/src/composables/useInputtable.ts +6 -3
  69. package/src/version.ts +1 -1
  70. /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@8.3.2_vue@3.3.9 → @vuepic_vue-datepicker@8.3.2_vue@3.3.9_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/main.css.js +0 -0
  71. /package/lib/node_modules/.pnpm/{@vuepic_vue-datepicker@8.3.2_vue@3.3.9 → @vuepic_vue-datepicker@8.3.2_vue@3.3.9_typescript@5.2.2_}/node_modules/@vuepic/vue-datepicker/dist/vue-datepicker.js +0 -0
  72. /package/lib/node_modules/.pnpm/{@vueuse_shared@10.2.0_vue@3.3.9 → @vueuse_shared@10.2.0_vue@3.3.9_typescript@5.2.2_}/node_modules/@vueuse/shared/index.js +0 -0
  73. /package/lib/node_modules/.pnpm/{floating-vue@5.2.2_vue@3.3.9 → floating-vue@5.2.2_@nuxt_kit@3.10.1_rollup@3.29.4__vue@3.3.9_typescript@5.2.2_}/node_modules/floating-vue/dist/floating-vue.js +0 -0
@@ -5,7 +5,9 @@ const t = {
5
5
  const r = ["w-full border border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out rounded-md shadow-sm"];
6
6
  return !s.errorInternal && !e.disabled && r.push("hover:border-secondary-400 dark:hover:border-secondary-500"), e.size === "xs" ? r.push("px-2 py-1 text-xs") : e.size === "sm" ? r.push("px-2 py-1.5 text-sm") : e.size === "lg" ? r.push("px-4 py-3 text-lg") : e.size === "xl" ? r.push("px-5 py-4 text-xl") : r.push("px-3 py-2"), e.disabled ? r.push("bg-secondary-100 dark:bg-secondary-700 text-secondary-400 dark:text-secondary-600 cursor-not-allowed") : r.push("bg-white dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200"), s.errorInternal ? r.push("border-error-500 dark:border-error-400 group-focus:outline-error-500") : e.disabled || r.push("group-focus:outline-[color:var(--x-select-border)]"), r;
7
7
  },
8
- content: "p-1 max-h-72 overflow-y-auto",
8
+ content: "p-1",
9
+ search: "p-1 mb-0.5",
10
+ contentBody: "overflow-y-auto max-h-64",
9
11
  iconWrapper: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2",
10
12
  icon: ({ props: e }) => {
11
13
  const s = [""];
@@ -5,7 +5,9 @@ const o = {
5
5
  const r = ["w-full border-b text-sm px-4 border-secondary-300 dark:border-secondary-700 pr-8 outline-transparent outline outline-2 outline-offset-[-1px] transition-all duration-150 ease-in-out"];
6
6
  return !s.errorInternal && !e.disabled && r.push("hover:border-secondary-400 dark:hover:border-secondary-500"), e.size === "xs" || e.size === "sm" ? r.push("py-1.5") : e.size === "lg" || e.size === "xl" ? r.push("py-3.5") : r.push("py-2.5"), e.disabled ? r.push("bg-secondary-100 dark:bg-secondary-900 text-secondary-300 cursor-not-allowed") : e.readonly ? r.push("bg-white dark:bg-secondary-900 text-secondary-700") : r.push("bg-secondary-50 dark:bg-secondary-800 text-secondary-700 dark:text-secondary-200"), s.errorInternal ? r.push("border-error-500 dark:border-error-400 group-focus:outline-error-500") : e.disabled || r.push("group-focus:outline-[color:var(--x-select-border)]"), r;
7
7
  },
8
- content: "py-1 max-h-72 overflow-y-auto",
8
+ content: "p-1",
9
+ search: "p-1 mb-0.5",
10
+ contentBody: "overflow-y-auto max-h-64",
9
11
  iconWrapper: "pointer-events-none absolute inset-y-0 right-0 flex items-center px-2",
10
12
  icon: ({ props: e }) => {
11
13
  const s = ["h-5 w-5"];
@@ -34,6 +34,7 @@ declare const sliderProps: {
34
34
  readonly default: () => never[];
35
35
  };
36
36
  tooltip: StringConstructor;
37
+ skipFormRegistry: BooleanConstructor;
37
38
  disabled: BooleanConstructor;
38
39
  loading: BooleanConstructor;
39
40
  loadingLabel: StringConstructor;
@@ -84,6 +85,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
84
85
  readonly default: () => never[];
85
86
  };
86
87
  tooltip: StringConstructor;
88
+ skipFormRegistry: BooleanConstructor;
87
89
  disabled: BooleanConstructor;
88
90
  loading: BooleanConstructor;
89
91
  loadingLabel: StringConstructor;
@@ -135,6 +137,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
135
137
  readonly default: () => never[];
136
138
  };
137
139
  tooltip: StringConstructor;
140
+ skipFormRegistry: BooleanConstructor;
138
141
  disabled: BooleanConstructor;
139
142
  loading: BooleanConstructor;
140
143
  loadingLabel: StringConstructor;
@@ -159,6 +162,7 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<{
159
162
  validateOnInput: boolean;
160
163
  hideFooter: boolean;
161
164
  rules: unknown[];
165
+ skipFormRegistry: boolean;
162
166
  max: string | number;
163
167
  min: string | number;
164
168
  step: string | number;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as R, computed as s, ref as d, inject as j, reactive as D, onMounted as E, openBlock as c, createBlock as m, resolveDynamicComponent as L, normalizeStyle as V, unref as o, normalizeClass as v, withCtx as M, renderSlot as g, createElementVNode as z, createCommentVNode as p, toDisplayString as O, Teleport as P, createElementBlock as X } from "vue";
2
- import { useMutationObserver as F } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
2
+ import { useMutationObserver as F } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
3
  import { injectTabGroupKey as G } from "../../composables/keys.js";
4
4
  import { useCommon as T } from "../../composables/useCommon.js";
5
5
  import { useTheme as I } from "../../composables/useTheme.js";
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as B, ref as r, watchEffect as z, reactive as E, computed as o, provide as V, watch as G, onMounted as N, openBlock as $, createElementBlock as q, createElementVNode as f, normalizeClass as v, unref as n, normalizeStyle as F, createVNode as L, withCtx as M, renderSlot as O, withDirectives as W, vShow as X, nextTick as j } from "vue";
2
- import { useMutationObserver as D, useResizeObserver as K } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
2
+ import { useMutationObserver as D, useResizeObserver as K } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
3
  import { injectTabGroupKey as P } from "../../composables/keys.js";
4
4
  import { useCommon as b } from "../../composables/useCommon.js";
5
5
  import { useColors as A } from "../../composables/useColors.js";
6
6
  import { useTheme as H } from "../../composables/useTheme.js";
7
7
  import I from "../scroll/Scroll.vue.js";
8
- import { useThrottleFn as J } from "../../node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.3.9/node_modules/@vueuse/shared/index.js";
8
+ import { useThrottleFn as J } from "../../node_modules/.pnpm/@vueuse_shared@10.2.0_vue@3.3.9_typescript@5.2.2_/node_modules/@vueuse/shared/index.js";
9
9
  const Q = {
10
10
  ...b.validators(),
11
11
  variant: ["line", "block"],
@@ -39,6 +39,7 @@ declare const textareaProps: {
39
39
  readonly default: () => never[];
40
40
  };
41
41
  tooltip: StringConstructor;
42
+ skipFormRegistry: BooleanConstructor;
42
43
  disabled: BooleanConstructor;
43
44
  loading: BooleanConstructor;
44
45
  loadingLabel: StringConstructor;
@@ -98,6 +99,7 @@ declare const _default: import("vue").DefineComponent<{
98
99
  readonly default: () => never[];
99
100
  };
100
101
  tooltip: StringConstructor;
102
+ skipFormRegistry: BooleanConstructor;
101
103
  disabled: BooleanConstructor;
102
104
  loading: BooleanConstructor;
103
105
  loadingLabel: StringConstructor;
@@ -155,6 +157,7 @@ declare const _default: import("vue").DefineComponent<{
155
157
  readonly default: () => never[];
156
158
  };
157
159
  tooltip: StringConstructor;
160
+ skipFormRegistry: BooleanConstructor;
158
161
  disabled: BooleanConstructor;
159
162
  loading: BooleanConstructor;
160
163
  loadingLabel: StringConstructor;
@@ -181,6 +184,7 @@ declare const _default: import("vue").DefineComponent<{
181
184
  validateOnInput: boolean;
182
185
  hideFooter: boolean;
183
186
  rules: unknown[];
187
+ skipFormRegistry: boolean;
184
188
  dir: string;
185
189
  rows: string | number;
186
190
  adjustToText: boolean;
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as q, useAttrs as K, computed as R, ref as A, watch as F, openBlock as u, createBlock as p, normalizeStyle as H, unref as r, normalizeClass as L, withCtx as O, createElementVNode as $, mergeProps as D, toHandlers as W, withKeys as X, createCommentVNode as G } from "vue";
2
- import { useResizeObserver as J, useEventListener as M } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9/node_modules/@vueuse/core/index.js";
2
+ import { useResizeObserver as J, useEventListener as M } from "../../node_modules/.pnpm/@vueuse_core@10.2.0_vue@3.3.9_typescript@5.2.2_/node_modules/@vueuse/core/index.js";
3
3
  import { useCSS as Q } from "../../composables/useCSS.js";
4
4
  import { useTheme as U } from "../../composables/useTheme.js";
5
5
  import { useCommon as f } from "../../composables/useCommon.js";
@@ -23,6 +23,7 @@ declare const toggleProps: {
23
23
  readonly default: () => never[];
24
24
  };
25
25
  tooltip: StringConstructor;
26
+ skipFormRegistry: BooleanConstructor;
26
27
  disabled: BooleanConstructor;
27
28
  loading: BooleanConstructor;
28
29
  loadingLabel: StringConstructor;
@@ -67,6 +68,7 @@ declare const _default: import("vue").DefineComponent<{
67
68
  readonly default: () => never[];
68
69
  };
69
70
  tooltip: StringConstructor;
71
+ skipFormRegistry: BooleanConstructor;
70
72
  disabled: BooleanConstructor;
71
73
  loading: BooleanConstructor;
72
74
  loadingLabel: StringConstructor;
@@ -112,6 +114,7 @@ declare const _default: import("vue").DefineComponent<{
112
114
  readonly default: () => never[];
113
115
  };
114
116
  tooltip: StringConstructor;
117
+ skipFormRegistry: BooleanConstructor;
115
118
  disabled: BooleanConstructor;
116
119
  loading: BooleanConstructor;
117
120
  loadingLabel: StringConstructor;
@@ -143,5 +146,6 @@ declare const _default: import("vue").DefineComponent<{
143
146
  validateOnInput: boolean;
144
147
  hideFooter: boolean;
145
148
  rules: unknown[];
149
+ skipFormRegistry: boolean;
146
150
  }, {}>;
147
151
  export default _default;
@@ -2,7 +2,7 @@ import { defineComponent as r, openBlock as a, createBlock as s, withCtx as e, c
2
2
  import c from "../popover/Popover.vue.js";
3
3
  import "../popover/Popover.vue3.js";
4
4
  import p from "../popover/PopoverContainer.vue.js";
5
- import "../../node_modules/.pnpm/floating-vue@5.2.2_vue@3.3.9/node_modules/floating-vue/dist/floating-vue.js";
5
+ import "../../node_modules/.pnpm/floating-vue@5.2.2_@nuxt_kit@3.10.1_rollup@3.29.4__vue@3.3.9_typescript@5.2.2_/node_modules/floating-vue/dist/floating-vue.js";
6
6
  const i = { class: "dark" }, m = {
7
7
  placement: {
8
8
  type: String,
@@ -50,5 +50,6 @@ export declare const useInputtable: {
50
50
  readonly default: () => never[];
51
51
  };
52
52
  readonly tooltip: StringConstructor;
53
+ readonly skipFormRegistry: BooleanConstructor;
53
54
  };
54
55
  };
@@ -1,13 +1,13 @@
1
- import { ref as a, watch as h, inject as G, computed as j, onMounted as A, onUnmounted as O } from "vue";
2
- import { injectFormGroupKey as K, injectFormKey as M } from "./keys.js";
3
- const y = (r, { focus: I, emit: n, withListeners: b = !0 }) => {
4
- const s = a(!0), o = a(r.error), v = a(r.hideFooter), V = r.name ? r.name : (Math.random() + 1).toString(36).substring(7), i = a(V);
5
- h(() => r.error, (e) => {
1
+ import { ref as a, watch as y, inject as h, computed as j, onMounted as k, onUnmounted as A } from "vue";
2
+ import { injectFormGroupKey as R, injectFormKey as O } from "./keys.js";
3
+ const G = (r, { focus: I, emit: n, withListeners: b = !0 }) => {
4
+ const s = a(!0), o = a(r.error), F = a(r.hideFooter), V = r.name ? r.name : (Math.random() + 1).toString(36).substring(7), i = a(V);
5
+ y(() => r.error, (e) => {
6
6
  o.value = e;
7
- }), h(() => r.name, (e) => {
7
+ }), y(() => r.name, (e) => {
8
8
  e && (i.value = e);
9
9
  });
10
- const t = G(K, {
10
+ const t = h(R, {
11
11
  registerInputGroup: () => {
12
12
  },
13
13
  unregisterInputGroup: () => {
@@ -17,8 +17,8 @@ const y = (r, { focus: I, emit: n, withListeners: b = !0 }) => {
17
17
  isInsideFormGroup: !1,
18
18
  value: void 0
19
19
  });
20
- t.isInsideFormGroup && (v.value = !0);
21
- const c = G(M, {
20
+ t.isInsideFormGroup && (F.value = !0);
21
+ const m = h(O, {
22
22
  registerInput: () => {
23
23
  },
24
24
  unregisterInput: () => {
@@ -26,21 +26,21 @@ const y = (r, { focus: I, emit: n, withListeners: b = !0 }) => {
26
26
  isInsideForm: !1
27
27
  }), S = () => {
28
28
  o.value = "", s.value = !0, n("update:modelValue", "");
29
- }, F = (e) => {
29
+ }, v = (e) => {
30
30
  o.value = e;
31
- }, m = (e) => {
31
+ }, c = (e) => {
32
32
  e = e || r.modelValue, s.value = !1;
33
- for (let p = 0; p < r.rules.length; p++) {
34
- const u = r.rules[p];
33
+ for (let g = 0; g < r.rules.length; g++) {
34
+ const u = r.rules[g];
35
35
  let l = !0;
36
36
  if (typeof u == "function")
37
37
  l = u(e);
38
38
  else if (Array.isArray(u) && u.length === 2) {
39
- const { 0: d, 1: g } = u;
40
- l = d(e, g);
39
+ const { 0: d, 1: p } = u;
40
+ l = d(e, p);
41
41
  } else {
42
- const d = u.fn, { options: g } = u;
43
- l = d(e, g);
42
+ const d = u.fn, { options: p } = u;
43
+ l = d(e, p);
44
44
  }
45
45
  if (l !== !0)
46
46
  return o.value = l, !1;
@@ -54,7 +54,7 @@ const y = (r, { focus: I, emit: n, withListeners: b = !0 }) => {
54
54
  f.value = !1, n("blur", e);
55
55
  },
56
56
  input: (e) => {
57
- r.validateOnInput && !s.value && m(e.target.value), n("update:modelValue", e.target.value), n("input", e);
57
+ r.validateOnInput && !s.value && c(e.target.value), n("update:modelValue", e.target.value), n("input", e);
58
58
  },
59
59
  change: (e) => n("change", e)
60
60
  })) : {
@@ -67,26 +67,26 @@ const y = (r, { focus: I, emit: n, withListeners: b = !0 }) => {
67
67
  change: () => {
68
68
  }
69
69
  };
70
- return A(() => {
71
- t.isInsideFormGroup ? t.registerInputGroup(i.value, I) : c.registerInput(i.value, I, m, F);
72
- }), O(() => {
73
- t.isInsideFormGroup ? t.unregisterInputGroup(i.value) : c.unregisterInput(i.value);
70
+ return k(() => {
71
+ t.isInsideFormGroup ? t.registerInputGroup(i.value, I) : r.skipFormRegistry || m.registerInput(i.value, I, c, v);
72
+ }), A(() => {
73
+ t.isInsideFormGroup ? t.unregisterInputGroup(i.value) : r.skipFormRegistry || m.unregisterInput(i.value);
74
74
  }), {
75
75
  isFirstValidation: s,
76
76
  errorInternal: o,
77
- hideFooterInternal: v,
77
+ hideFooterInternal: F,
78
78
  isFocused: f,
79
- isInsideForm: c.isInsideForm,
79
+ isInsideForm: r.skipFormRegistry ? !1 : m.isInsideForm,
80
80
  isInsideFormGroup: t.isInsideFormGroup,
81
81
  inputListeners: B,
82
82
  formGroup: t,
83
83
  reset: S,
84
- validate: m,
85
- setError: F
84
+ validate: c,
85
+ setError: v
86
86
  };
87
87
  };
88
- y.emits = (r = !0) => r ? ["update:modelValue", "blur", "focus", "input", "change"] : ["update:modelValue"];
89
- y.props = () => ({
88
+ G.emits = (r = !0) => r ? ["update:modelValue", "blur", "focus", "input", "change"] : ["update:modelValue"];
89
+ G.props = () => ({
90
90
  modelValue: {
91
91
  type: [String, Number, Boolean, Object, Array],
92
92
  default: void 0
@@ -107,8 +107,9 @@ y.props = () => ({
107
107
  type: Array,
108
108
  default: () => []
109
109
  },
110
- tooltip: String
110
+ tooltip: String,
111
+ skipFormRegistry: Boolean
111
112
  });
112
113
  export {
113
- y as useInputtable
114
+ G as useInputtable
114
115
  };