@open-xamu-co/ui-components-vue 3.1.0-next.9 → 4.0.0-next.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 (116) hide show
  1. package/CHANGELOG.md +468 -0
  2. package/dist/components/action/Button.stories.d.ts +8 -14
  3. package/dist/components/action/Button.vue.d.ts +11 -11
  4. package/dist/components/action/ButtonLink.stories.d.ts +4 -10
  5. package/dist/components/action/ButtonLink.vue.d.ts +17 -19
  6. package/dist/components/action/ButtonToggle.stories.d.ts +6 -10
  7. package/dist/components/action/ButtonToggle.vue.d.ts +7 -11
  8. package/dist/components/action/Link.stories.d.ts +4 -10
  9. package/dist/components/action/Link.vue.d.ts +7 -11
  10. package/dist/components/base/Action.vue.d.ts +7 -11
  11. package/dist/components/base/Box.vue.d.ts +13 -11
  12. package/dist/components/base/BrowserOnly.vue.d.ts +9 -12
  13. package/dist/components/base/ErrorBoundary.vue.d.ts +17 -15
  14. package/dist/components/base/Img.vue.d.ts +16 -56
  15. package/dist/components/base/Input.vue.d.ts +13 -15
  16. package/dist/components/base/Select.vue.d.ts +2 -1
  17. package/dist/components/base/Wrapper.vue.d.ts +12 -15
  18. package/dist/components/box/Action.stories.d.ts +4 -11
  19. package/dist/components/box/Action.vue.d.ts +3 -2
  20. package/dist/components/box/Message.stories.d.ts +4 -10
  21. package/dist/components/box/Message.vue.d.ts +7 -11
  22. package/dist/components/collapse/Simple.stories.d.ts +4 -11
  23. package/dist/components/collapse/Simple.vue.d.ts +7 -11
  24. package/dist/components/dropdown/Simple.stories.d.ts +4 -8
  25. package/dist/components/dropdown/Simple.vue.d.ts +37 -41
  26. package/dist/components/form/Input.stories.d.ts +3 -2
  27. package/dist/components/form/Input.vue.d.ts +2 -1
  28. package/dist/components/form/InputCountriesAPI.vue.d.ts +11 -19
  29. package/dist/components/form/InputLoop.vue.d.ts +12 -7
  30. package/dist/components/form/InputNValues.vue.d.ts +13 -6
  31. package/dist/components/form/InputOptions.vue.d.ts +19 -23
  32. package/dist/components/form/Simple.stories.d.ts +9 -5
  33. package/dist/components/form/Simple.vue.d.ts +17 -11
  34. package/dist/components/form/Stages.stories.d.ts +8 -69
  35. package/dist/components/form/Stages.vue.d.ts +29 -28
  36. package/dist/components/icon/Fa.stories.d.ts +4 -10
  37. package/dist/components/icon/Fa.vue.d.ts +2 -1
  38. package/dist/components/icon/Simple.stories.d.ts +4 -8
  39. package/dist/components/icon/Simple.vue.d.ts +7 -11
  40. package/dist/components/input/Color.stories.d.ts +4 -8
  41. package/dist/components/input/Color.vue.d.ts +11 -2
  42. package/dist/components/input/File.stories.d.ts +4 -10
  43. package/dist/components/input/File.vue.d.ts +6 -1
  44. package/dist/components/input/Text.stories.d.ts +4 -11
  45. package/dist/components/input/Text.vue.d.ts +2 -1
  46. package/dist/components/input/Toggle.stories.d.ts +4 -10
  47. package/dist/components/input/Toggle.vue.d.ts +9 -13
  48. package/dist/components/loader/Content.stories.d.ts +4 -8
  49. package/dist/components/loader/Content.vue.d.ts +7 -11
  50. package/dist/components/loader/ContentFetch.stories.d.ts +5 -8
  51. package/dist/components/loader/ContentFetch.vue.d.ts +19 -11
  52. package/dist/components/loader/Simple.stories.d.ts +4 -8
  53. package/dist/components/loader/Simple.vue.d.ts +7 -11
  54. package/dist/components/modal/Simple.stories.d.ts +5 -8
  55. package/dist/components/modal/Simple.vue.d.ts +53 -53
  56. package/dist/components/pagination/Content.stories.d.ts +4 -7
  57. package/dist/components/pagination/Content.vue.d.ts +29 -12
  58. package/dist/components/pagination/ContentTable.stories.d.ts +6 -8
  59. package/dist/components/pagination/ContentTable.vue.d.ts +62 -25
  60. package/dist/components/pagination/Simple.stories.d.ts +5 -8
  61. package/dist/components/pagination/Simple.vue.d.ts +12 -7
  62. package/dist/components/select/Choice.stories.d.ts +6 -11
  63. package/dist/components/select/Choice.vue.d.ts +2 -1
  64. package/dist/components/select/Filter.stories.d.ts +5 -11
  65. package/dist/components/select/Filter.vue.d.ts +2 -1
  66. package/dist/components/select/Simple.stories.d.ts +4 -11
  67. package/dist/components/select/Simple.vue.d.ts +2 -1
  68. package/dist/components/slider/Simple.stories.d.ts +4 -8
  69. package/dist/components/slider/Simple.vue.d.ts +50 -0
  70. package/dist/components/table/Body.vue.d.ts +33 -21
  71. package/dist/components/table/HeadActions.vue.d.ts +31 -0
  72. package/dist/components/table/HeadContent.vue.d.ts +22 -0
  73. package/dist/components/table/Simple.stories.d.ts +9 -33
  74. package/dist/components/table/Simple.vue.d.ts +43 -28
  75. package/dist/components/value/Complex.stories.d.ts +4 -8
  76. package/dist/components/value/Complex.vue.d.ts +2 -1
  77. package/dist/components/value/List.stories.d.ts +4 -27
  78. package/dist/components/value/List.vue.d.ts +2 -12
  79. package/dist/components/value/Simple.stories.d.ts +5 -10
  80. package/dist/components/value/Simple.vue.d.ts +10 -5
  81. package/dist/composables/theme.d.ts +8 -1
  82. package/dist/composables/utils.d.ts +2 -1
  83. package/dist/index-Bbn-n1yC.js +7098 -0
  84. package/dist/index-CyI1yZlR.cjs +4 -0
  85. package/dist/index.cjs +1 -0
  86. package/dist/index.js +45 -1
  87. package/dist/plugin.cjs +1 -0
  88. package/dist/plugin.js +902 -1
  89. package/dist/theme-CChhGSbE.cjs +1 -0
  90. package/dist/theme-DWMJmaKP.js +83 -0
  91. package/dist/theme.cjs +1 -0
  92. package/dist/theme.js +7 -1
  93. package/dist/types/plugin.d.ts +9 -1
  94. package/dist/types/props.d.ts +60 -17
  95. package/dist/types/storybook.d.ts +10 -0
  96. package/package.json +40 -31
  97. package/dist/components/table/Head.vue.d.ts +0 -25
  98. package/dist/index-BtJc7cX1.js +0 -4
  99. package/dist/index-DTG4ktcY.mjs +0 -6753
  100. package/dist/index.mjs +0 -45
  101. package/dist/plugin.mjs +0 -874
  102. package/dist/screens/DropdownWithToggle.stories.d.ts +0 -11
  103. package/dist/screens/DropdownWithToggle.vue.d.ts +0 -2
  104. package/dist/screens/FormWithFetch.stories.d.ts +0 -11
  105. package/dist/screens/FormWithFetch.vue.d.ts +0 -2
  106. package/dist/screens/ModalWithFormStages.stories.d.ts +0 -11
  107. package/dist/screens/ModalWithFormStages.vue.d.ts +0 -2
  108. package/dist/screens/ModalWithToggle.stories.d.ts +0 -11
  109. package/dist/screens/ModalWithToggle.vue.d.ts +0 -2
  110. package/dist/screens/PaginationContentWithTable.stories.d.ts +0 -11
  111. package/dist/screens/PaginationContentWithTable.vue.d.ts +0 -8
  112. package/dist/screens/TableWithNestedTable.stories.d.ts +0 -11
  113. package/dist/screens/TableWithNestedTable.vue.d.ts +0 -8
  114. package/dist/theme-DSVG59vT.js +0 -1
  115. package/dist/theme-DVpUQx-w.mjs +0 -78
  116. package/dist/theme.mjs +0 -7
@@ -0,0 +1 @@
1
+ "use strict";const n=require("vue"),A=require("@open-xamu-co/ui-common-helpers"),i=require("@open-xamu-co/ui-common-enums");function h(e){const{countriesUrl:r="https://countries.xamu.com.co/api/v1",...s}=n.inject("xamu")||{};return e({...s,countriesUrl:r})}function g(e){function r(u){return u.map(a=>{if(typeof a!="string")return!1;const l=a.split(":",2),o=l[1]?.toLowerCase?.()==="asc"?"asc":"desc";return[l[0],o]}).filter(a=>!!a)}const s=e;return Array.isArray(s)?r(s):typeof s=="string"?r([s]):[]}async function w(e){const r=await e;return Array.isArray(r)?r:[r]}function m(e){if(Array.isArray(e))return[e[0],e[1]||i.eColors.LIGHT];if(typeof e=="object"&&e!==null){const r=Object.entries(e).filter(([s,u])=>u);return m([r[0][0]])}return m([e])}function b(e,r){return h(s=>{const{getModifierClasses:u,getPropData:a}=A.useUtils(s),l=n.computed(()=>{const[t,c]=m(e.theme??i.eColors.SECONDARY),f=[t,c||i.eColors.LIGHT];return e.invertTheme||f.reverse(),f}),o=n.computed(()=>[l.value[1],l.value[0]]),d=n.computed(()=>[i.eColors.DANGER,o.value[1]===i.eColors.DARK?i.eColors.DARK:i.eColors.LIGHT]),v=n.computed(()=>{let t;if(typeof e.shadow=="boolean")t=e.shadow;else{if(!e.shadow?.length)return[];t=e.shadow.some(c=>o.value[0]===c)}return t?u([{shadow:t}],{prefix:""}):[]}),C=n.computed(()=>{if(!e.theme)return[];const t=r?o.value:[o.value[0]];return u([t.join("-")],{modifier:"tm",divider:"-"})}),y=n.computed(()=>{if(!e.theme)return[];const t=r?d.value:[d.value[0]];return u([t.join("-")],{modifier:"tm",divider:"-"})}),T=n.computed(()=>{const t=e.tooltip&&a(e.tooltip),c=o.value[1]!==i.eColors.LIGHT;return t?{"aria-label":e.ariaLabel??t,"data-tooltip":t,"data-tooltip-position":e.tooltipPosition,"data-tooltip-text":e.tooltipAsText??!0,"data-tooltip-bg":o.value[0],"data-tooltip-color":c?o.value[1]:void 0}:{"aria-label":e.ariaLabel}});return{invertedThemeValues:l,themeValues:o,dangerThemeValues:d,themeClasses:C,dangerThemeClasses:y,shadowClasses:v,tooltipAttributes:T}})}exports.useHelpers=h;exports.useOrderBy=g;exports.useResolveNodeFn=w;exports.useTheme=b;
@@ -0,0 +1,83 @@
1
+ import { inject as T, computed as s } from "vue";
2
+ import { useUtils as g } from "@open-xamu-co/ui-common-helpers";
3
+ import { eColors as i } from "@open-xamu-co/ui-common-enums";
4
+ function w(e) {
5
+ const { countriesUrl: r = "https://countries.xamu.com.co/api/v1", ...n } = T("xamu") || {};
6
+ return e({ ...n, countriesUrl: r });
7
+ }
8
+ function L(e) {
9
+ function r(a) {
10
+ return a.map((u) => {
11
+ if (typeof u != "string") return !1;
12
+ const l = u.split(":", 2), o = l[1]?.toLowerCase?.() === "asc" ? "asc" : "desc";
13
+ return [l[0], o];
14
+ }).filter((u) => !!u);
15
+ }
16
+ const n = e;
17
+ return Array.isArray(n) ? r(n) : typeof n == "string" ? r([n]) : [];
18
+ }
19
+ async function G(e) {
20
+ const r = await e;
21
+ return Array.isArray(r) ? r : [r];
22
+ }
23
+ function d(e) {
24
+ if (Array.isArray(e))
25
+ return [e[0], e[1] || i.LIGHT];
26
+ if (typeof e == "object" && e !== null) {
27
+ const r = Object.entries(e).filter(([n, a]) => a);
28
+ return d([r[0][0]]);
29
+ }
30
+ return d([e]);
31
+ }
32
+ function j(e, r) {
33
+ return w((n) => {
34
+ const { getModifierClasses: a, getPropData: u } = g(n), l = s(() => {
35
+ const [t, c] = d(e.theme ?? i.SECONDARY), m = [t, c || i.LIGHT];
36
+ return e.invertTheme || m.reverse(), m;
37
+ }), o = s(() => [l.value[1], l.value[0]]), f = s(() => [
38
+ i.DANGER,
39
+ o.value[1] === i.DARK ? i.DARK : i.LIGHT
40
+ ]), h = s(() => {
41
+ let t;
42
+ if (typeof e.shadow == "boolean") t = e.shadow;
43
+ else {
44
+ if (!e.shadow?.length) return [];
45
+ t = e.shadow.some((c) => o.value[0] === c);
46
+ }
47
+ return t ? a([{ shadow: t }], { prefix: "" }) : [];
48
+ }), v = s(() => {
49
+ if (!e.theme) return [];
50
+ const t = r ? o.value : [o.value[0]];
51
+ return a([t.join("-")], { modifier: "tm", divider: "-" });
52
+ }), y = s(() => {
53
+ if (!e.theme) return [];
54
+ const t = r ? f.value : [f.value[0]];
55
+ return a([t.join("-")], { modifier: "tm", divider: "-" });
56
+ }), A = s(() => {
57
+ const t = e.tooltip && u(e.tooltip), c = o.value[1] !== i.LIGHT;
58
+ return t ? {
59
+ "aria-label": e.ariaLabel ?? t,
60
+ "data-tooltip": t,
61
+ "data-tooltip-position": e.tooltipPosition,
62
+ "data-tooltip-text": e.tooltipAsText ?? !0,
63
+ "data-tooltip-bg": o.value[0],
64
+ "data-tooltip-color": c ? o.value[1] : void 0
65
+ } : { "aria-label": e.ariaLabel };
66
+ });
67
+ return {
68
+ invertedThemeValues: l,
69
+ themeValues: o,
70
+ dangerThemeValues: f,
71
+ themeClasses: v,
72
+ dangerThemeClasses: y,
73
+ shadowClasses: h,
74
+ tooltipAttributes: A
75
+ };
76
+ });
77
+ }
78
+ export {
79
+ j as a,
80
+ L as b,
81
+ G as c,
82
+ w as u
83
+ };
package/dist/theme.cjs ADDED
@@ -0,0 +1 @@
1
+ "use strict";require("vue");require("@open-xamu-co/ui-common-helpers");require("@open-xamu-co/ui-common-enums");const e=require("./theme-CChhGSbE.cjs");module.exports=e.useTheme;
package/dist/theme.js CHANGED
@@ -1 +1,7 @@
1
- "use strict";require("vue");require("@open-xamu-co/ui-common-helpers");require("@open-xamu-co/ui-common-enums");const e=require("./theme-DSVG59vT.js");module.exports=e.useTheme;
1
+ import "vue";
2
+ import "@open-xamu-co/ui-common-helpers";
3
+ import "@open-xamu-co/ui-common-enums";
4
+ import { a } from "./theme-DWMJmaKP.js";
5
+ export {
6
+ a as default
7
+ };
@@ -3,7 +3,15 @@ import type { iPluginOptions } from "@open-xamu-co/ui-common-types";
3
3
  import type { useAsyncDataFn } from "../composables/async";
4
4
  export type vComponent<P extends Record<string, any> = Record<string, any>> = VueComponent<P> | FunctionalComponent<P> | DefineComponent<P>;
5
5
  export interface iVuePluginOptions extends iPluginOptions<vComponent> {
6
- internals?: {
6
+ /**
7
+ * Override internal behavior
8
+ * Useful to setup nuxt modules
9
+ */
10
+ internals?: iPluginOptions<vComponent>["internals"] & {
11
+ /**
12
+ * Client only component
13
+ */
14
+ clientOnly?: vComponent;
7
15
  /**
8
16
  * Nuxt Async data
9
17
  */
@@ -1,4 +1,4 @@
1
- import type { iFormOption, tFormAutocomplete, tIndicative, tProp, tProps, tPropsModifier, tThemeModifier, tThemeTuple, tSizeModifier, iProperty, iNodeFn, tOrderBy, tPropertyOrderFn, tOrder } from "@open-xamu-co/ui-common-types";
1
+ import type { iFormOption, tFormAutocomplete, tIndicative, tProp, tProps, tPropsModifier, tThemeModifier, tThemeTuple, tSizeModifier, iProperty, iNodeFn, tOrderBy, tPropertyOrderFn, tOrder, iPageInfo, iPagination } from "@open-xamu-co/ui-common-types";
2
2
  import type { AllowedComponentProps, RendererElement } from "vue";
3
3
  import type { vComponent } from "./plugin";
4
4
  export interface iUseModifiersProps {
@@ -36,7 +36,7 @@ export interface iUseStateProps {
36
36
  * @state
37
37
  * @example no--overrides
38
38
  */
39
- noOverrides?: boolean;
39
+ noThemeOverride?: boolean;
40
40
  /**
41
41
  * Component states
42
42
  *
@@ -54,6 +54,7 @@ export interface iUseThemeProps {
54
54
  shadow?: boolean | tThemeModifier[];
55
55
  }
56
56
  export interface iUseThemeTooltipProps {
57
+ ariaLabel?: string;
57
58
  /**
58
59
  * Show given text as tooltip on hover.
59
60
  *
@@ -144,21 +145,30 @@ export interface iModalProps extends iUseThemeProps {
144
145
  * Are modal requirement meet?
145
146
  * This is intended to prevent the usage of certain modals
146
147
  *
147
- * Ex: user does not have enough permissions
148
+ * This should not depend on any internal state
149
+ *
150
+ * @example User does not have enough permissions
148
151
  */
149
152
  hide?: boolean;
153
+ /** Message to show when modal is hidden */
150
154
  hideMessage?: string;
155
+ /** Hides the footer */
151
156
  hideFooter?: boolean;
157
+ /** disables modal */
158
+ disabled?: boolean;
152
159
  /**
153
- * disables modal
160
+ * Target element to append the modal to
161
+ *
162
+ * Another modal could be the target so it appears nested
163
+ *
164
+ * @default body
154
165
  */
155
- disabled?: boolean;
166
+ target?: string | RendererElement;
156
167
  /**
157
168
  * Shows/hides the modal
158
169
  * @private
159
170
  */
160
171
  modelValue?: boolean;
161
- target?: string | RendererElement;
162
172
  }
163
173
  export interface iValueComplexProps extends iUseThemeProps {
164
174
  /**
@@ -200,7 +210,7 @@ export interface iTablePropertyMeta<Ti extends Record<string, any>> extends iPro
200
210
  value: string;
201
211
  canSort: boolean;
202
212
  }
203
- export interface iTableProps<Ti extends Record<string, any>> extends iUseThemeProps {
213
+ export interface iTableProps<Ti extends Record<string, any>, Tm extends Record<string, any> = Ti> extends iUseThemeProps {
204
214
  /**
205
215
  * Table nodes
206
216
  * an array of nodes
@@ -208,6 +218,12 @@ export interface iTableProps<Ti extends Record<string, any>> extends iUseThemePr
208
218
  * @old rows
209
219
  */
210
220
  nodes: Ti[];
221
+ /**
222
+ * Map nodes as required
223
+ * Also useful to omit nodes from the array
224
+ */
225
+ mapNodes?: (nodes: NoInfer<Ti>[]) => Tm[];
226
+ hydrateNodes?: (newNodes: NoInfer<Ti>[] | null, newErrors?: unknown) => void;
211
227
  /**
212
228
  * Table column names
213
229
  * an array of property names
@@ -273,14 +289,21 @@ export interface iTableProps<Ti extends Record<string, any>> extends iUseThemePr
273
289
  * @fallback property name
274
290
  */
275
291
  childrenName?: string;
276
- childrenCountKey?: keyof NoInfer<Ti>;
292
+ childrenCountKey?: keyof NoInfer<Ti> | keyof NoInfer<Tm>;
277
293
  modalProps?: iModalProps & AllowedComponentProps;
278
294
  /**
279
295
  * Prevent node functions from triggering refresh event (useful with firebase hydration)
280
296
  */
281
297
  omitRefresh?: boolean;
282
298
  size?: tSizeModifier;
283
- withRoute?: boolean;
299
+ /**
300
+ * Filter & order nodes through the router
301
+ */
302
+ withRoute?: boolean | iPagination;
303
+ /**
304
+ * Page info
305
+ */
306
+ pageInfo?: iPageInfo;
284
307
  /**
285
308
  * Show real node id or given component
286
309
  */
@@ -288,8 +311,30 @@ export interface iTableProps<Ti extends Record<string, any>> extends iUseThemePr
288
311
  index: number;
289
312
  node: NoInfer<Ti>;
290
313
  }>;
314
+ /**
315
+ * Make the table container opaque
316
+ */
317
+ opaque?: boolean;
291
318
  }
292
- export interface iTableChildProps<Ti extends Record<string, any>> extends iTableProps<Ti> {
319
+ export interface iNodeVisibility {
320
+ disableCreateNodeChildren?: boolean;
321
+ showNodeChildren?: boolean;
322
+ childrenCount: number;
323
+ }
324
+ export interface iMappedNode<Ti extends Record<string, any>, Tm extends Record<string, any> = Ti> {
325
+ node: Tm;
326
+ index: number;
327
+ visibility: iNodeVisibility;
328
+ hydrateNode: (newNode: Ti | null, _newErrors?: unknown) => void;
329
+ createNodeChildrenAndRefresh: iNodeFn<Ti>;
330
+ }
331
+ export interface iMappedNodes<Ti extends Record<string, any>, Tm extends Record<string, any> = Ti> {
332
+ nodes: iMappedNode<Ti, Tm>[];
333
+ length: number;
334
+ withChildren: boolean;
335
+ }
336
+ export interface iTableChildProps<Ti extends Record<string, any>, Tm extends Record<string, any> = Ti> extends iTableProps<Ti, Tm> {
337
+ mappedNodes: iMappedNodes<Ti, Tm>;
293
338
  /**
294
339
  * Table unique identifier
295
340
  *
@@ -314,11 +359,9 @@ export interface iTableChildProps<Ti extends Record<string, any>> extends iTable
314
359
  selectedNodesCount: number;
315
360
  openNodesCount: number;
316
361
  /**
317
- * Count childrens
318
- *
319
- * node['propertyWithChildren']
362
+ * Can show children
320
363
  */
321
- childrenCount(node: Ti): number;
364
+ canShowChildren(visibility: iNodeVisibility, mappedIndex: number): boolean;
322
365
  /**
323
366
  * Set pagination order
324
367
  *
@@ -339,21 +382,21 @@ export interface iTableChildProps<Ti extends Record<string, any>> extends iTable
339
382
  *
340
383
  * @single
341
384
  */
342
- updateNodeAndRefresh(node: Ti): Promise<void>;
385
+ updateNodeAndRefresh: iNodeFn<Ti>;
343
386
  /**
344
387
  * Clones given node
345
388
  * sometimes it could fail but still clone (api issue)
346
389
  *
347
390
  * @single
348
391
  */
349
- cloneNodeAndRefresh(node: Ti, toggleModal?: (m?: boolean) => any): Promise<void>;
392
+ cloneNodeAndRefresh: iNodeFn<Ti, [Ti, ((m?: boolean) => any) | undefined, HTMLElement?]>;
350
393
  /**
351
394
  * Deletes given node
352
395
  * sometimes it could fail but still delete (api issue)
353
396
  *
354
397
  * @single
355
398
  */
356
- deleteNodeAndRefresh(node: Ti, toggleModal?: (m?: boolean) => any, modalRef?: HTMLElement): Promise<void>;
399
+ deleteNodeAndRefresh: iNodeFn<Ti, [Ti, ((m?: boolean) => any) | undefined, HTMLElement?]>;
357
400
  /**
358
401
  * Deletes multiple selected nodes
359
402
  * sometimes it could fail but still delete (api issue)
@@ -0,0 +1,10 @@
1
+ import type { Meta } from "@storybook/vue3-vite";
2
+ import type { ComponentExposed } from "vue-component-type-helpers";
3
+ /**
4
+ * Meta for generic vue components
5
+ *
6
+ * @see https://github.com/storybookjs/storybook/issues/24238#issuecomment-2609580391
7
+ */
8
+ export type GenericMeta<C> = Omit<Meta<C>, "component"> & {
9
+ component: ComponentExposed<C>;
10
+ };
package/package.json CHANGED
@@ -1,13 +1,16 @@
1
1
  {
2
2
  "name": "@open-xamu-co/ui-components-vue",
3
- "version": "3.1.0-next.9",
3
+ "version": "4.0.0-next.1",
4
4
  "description": "Vue component system for the xamu project",
5
5
  "scripts": {
6
6
  "build:entries": "rimraf dist && vite build",
7
7
  "build:types": "vue-tsc --declaration --emitDeclarationOnly",
8
8
  "build": "yarn build:entries && yarn build:types",
9
9
  "dev": "storybook dev",
10
- "storybook:build": "storybook build"
10
+ "typecheck": "vue-tsc --build",
11
+ "test": "vitest run --coverage",
12
+ "storybook:build": "storybook build",
13
+ "storybook:test": "vitest run --project=storybook --coverage"
11
14
  },
12
15
  "repository": {
13
16
  "type": "git",
@@ -31,6 +34,7 @@
31
34
  "types": "dist/index.d.ts",
32
35
  "typings": "dist/index.d.ts",
33
36
  "module": "dist/index.mjs",
37
+ "type": "module",
34
38
  "files": [
35
39
  "CHANGELOG.md",
36
40
  "README.md",
@@ -39,53 +43,58 @@
39
43
  "exports": {
40
44
  ".": {
41
45
  "types": "./dist/index.d.ts",
42
- "import": "./dist/index.mjs",
43
- "require": "./dist/index.js",
44
- "default": "./dist/index.mjs"
46
+ "import": "./dist/index.js",
47
+ "require": "./dist/index.cjs",
48
+ "default": "./dist/index.js"
45
49
  },
46
50
  "./plugin": {
47
51
  "types": "./dist/plugin.d.ts",
48
- "import": "./dist/plugin.mjs",
49
- "require": "./dist/plugin.js",
50
- "default": "./dist/plugin.mjs"
52
+ "import": "./dist/plugin.js",
53
+ "require": "./dist/plugin.cjs",
54
+ "default": "./dist/plugin.js"
51
55
  },
52
56
  "./theme": {
53
57
  "types": "./dist/composables/theme.d.ts",
54
- "import": "./dist/theme.mjs",
55
- "require": "./dist/theme.js",
56
- "default": "./dist/theme.mjs"
58
+ "import": "./dist/theme.js",
59
+ "require": "./dist/theme.cjs",
60
+ "default": "./dist/theme.js"
57
61
  }
58
62
  },
59
63
  "dependencies": {
60
64
  "@fortawesome/fontawesome-common-types": "^6.4.0",
61
65
  "@open-xamu-co/ui-common-enums": "^3.1.0-next.1",
62
- "@open-xamu-co/ui-common-helpers": "^3.0.2-next.4",
66
+ "@open-xamu-co/ui-common-helpers": "^4.0.0-next.1",
63
67
  "lodash-es": "^4.17.21",
64
- "sweetalert2": "^11.11.1"
68
+ "sweetalert2": "^11.11.1",
69
+ "ts-md5": "^1.3.1",
70
+ "validator": "^13.11.0",
71
+ "vue-color": "^3.3.1"
65
72
  },
66
73
  "devDependencies": {
67
- "@chromatic-com/storybook": "1.4.0",
68
- "@open-xamu-co/ui-common-types": "^3.1.0-next.2",
69
- "@open-xamu-co/ui-styles": "^4.0.1-next.2",
70
- "@storybook/addon-essentials": "^8.1.1",
71
- "@storybook/addon-interactions": "^8.1.1",
72
- "@storybook/addon-links": "^8.1.1",
73
- "@storybook/blocks": "^8.1.1",
74
- "@storybook/test": "^8.1.1",
75
- "@storybook/vue3": "^8.1.1",
76
- "@storybook/vue3-vite": "^8.1.1",
74
+ "@open-xamu-co/ui-common-types": "^4.0.0-next.1",
75
+ "@open-xamu-co/ui-styles": "^5.0.0-next.1",
76
+ "@playwright/test": "^1.57.0",
77
+ "@storybook/addon-docs": "^10.1.9",
78
+ "@storybook/addon-links": "^10.1.9",
79
+ "@storybook/addon-onboarding": "^10.1.9",
80
+ "@storybook/addon-vitest": "^10.1.9",
81
+ "@storybook/vue3-vite": "^10.1.9",
82
+ "@types/jsdom": "^27.0.0",
77
83
  "@types/lodash-es": "^4.14.192",
78
84
  "@types/validator": "^13.11.1",
79
- "@vitejs/plugin-vue": "^5.2.0",
80
- "storybook": "^8.1.1",
81
- "ts-md5": "^1.3.1",
82
- "validator": "^13.11.0",
83
- "vue": "^3.5.17",
84
- "vue-router": "^4.5.1"
85
+ "@vitejs/plugin-vue": "^6.0.2",
86
+ "@vitest/browser-playwright": "^4.0.14",
87
+ "@vitest/coverage-v8": "^4.0.14",
88
+ "jsdom": "^27.2.0",
89
+ "msw": "^2.12.4",
90
+ "playwright": "^1.57.0",
91
+ "storybook": "^10.1.9",
92
+ "vue": "^3.5.25",
93
+ "vue-router": "^4.6.4"
85
94
  },
86
95
  "peerDependencies": {
87
- "vue": "^3.5.17",
88
- "vue-router": "^4.5.1"
96
+ "vue": "^3.5.25",
97
+ "vue-router": "^4.6.4"
89
98
  },
90
99
  "peerDependenciesMeta": {
91
100
  "vue-router": {
@@ -1,25 +0,0 @@
1
- import type { iTableChildProps } from "../../types/props";
2
- export interface iTableHeadProps<Ti extends Record<string, any>> extends iTableChildProps<Ti> {
3
- withDefaultSlot: boolean;
4
- }
5
- declare const _default: <T extends Record<string, any>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
- props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, never>, never> & Partial<{}> & iTableHeadProps<T>> & import("vue").PublicProps;
7
- expose(exposed: import("vue").ShallowUnwrapRef<{}>): void;
8
- attrs: any;
9
- slots: {
10
- headActions?(_: {
11
- nodes: T[];
12
- updateNodeAndRefresh: (node: T) => Promise<void>;
13
- cloneNodeAndRefresh: (node: T, toggleModal?: (m?: boolean) => any) => Promise<void>;
14
- deleteNodeAndRefresh: (node: T, toggleModal?: (m?: boolean) => any, modalRef?: HTMLElement) => Promise<void>;
15
- deleteNodesAndRefresh: (nodes?: T[] | undefined) => Promise<void>;
16
- }): any;
17
- };
18
- emit: {};
19
- }>) => import("vue").VNode & {
20
- __ctx?: Awaited<typeof __VLS_setup>;
21
- };
22
- export default _default;
23
- type __VLS_PrettifyLocal<T> = {
24
- [K in keyof T]: T[K];
25
- } & {};