@robuust-digital/vue-components 2.5.0-beta.4 → 2.6.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.
@@ -1,13 +1,13 @@
1
- import { _ as r, a as t, b as e, c as s, d as m, e as p, f as x, g as f, h as _, i } from "../_shared/Tabs.vue_vue_type_script_setup_true_lang-B0RIqYLz.js";
1
+ import { _ as r, a as t, b as e, c as s, d as m, e as p, f as x, g as f, h as _, i } from "../_shared/Tabs.vue_vue_type_script_setup_true_lang-ByxZ-FVI.js";
2
2
  import { _ as d } from "../_shared/ChevronDownIcon-BYWciGnh.js";
3
3
  import { _ as n } from "../_shared/ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
4
4
  import { _ as h } from "../_shared/FormInput.vue_vue_type_script_setup_true_lang-Bg7YPGyY.js";
5
5
  import { _ as g } from "../_shared/Combobox.vue_vue_type_script_setup_true_lang-BwTRzqr6.js";
6
- import { _ as B } from "../_shared/Drawer.vue_vue_type_script_setup_true_lang-CZMVooMV.js";
7
- import { _ as F } from "../_shared/Modal.vue_vue_type_script_setup_true_lang-CB0Gez7v.js";
6
+ import { _ as B } from "../_shared/Drawer.vue_vue_type_script_setup_true_lang-DjP68vua.js";
7
+ import { _ as F } from "../_shared/Modal.vue_vue_type_script_setup_true_lang-MN3D46CX.js";
8
8
  import { _ as A } from "../_shared/Dropdown.vue_vue_type_script_setup_true_lang-L_lQEUBC.js";
9
9
  import { _ as E } from "../_shared/Lightswitch.vue_vue_type_script_setup_true_lang-hiuDVfo5.js";
10
- import { _ as S } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-DaCv0Gii.js";
10
+ import { _ as S } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-t14vKtCW.js";
11
11
  import { _ as y } from "../_shared/Toast.vue_vue_type_script_setup_true_lang-DS6keeu7.js";
12
12
  import { _ as L } from "../_shared/Tooltip.vue_vue_type_script_setup_true_lang-B3MHy48T.js";
13
13
  export {
package/dist/index.d.ts CHANGED
@@ -89,13 +89,13 @@ declare const __VLS_component_13: DefineComponent<DrawerProps, {}, {}, {}, {}, C
89
89
  "drawer:open": () => any;
90
90
  "drawer:opened": () => any;
91
91
  "drawer:close": () => any;
92
- "drawer:save": (event: Event) => any;
92
+ "drawer:save": (event?: Event | undefined) => any;
93
93
  "drawer:closed": () => any;
94
94
  }, string, PublicProps, Readonly<DrawerProps> & Readonly<{
95
95
  "onDrawer:open"?: (() => any) | undefined;
96
96
  "onDrawer:opened"?: (() => any) | undefined;
97
97
  "onDrawer:close"?: (() => any) | undefined;
98
- "onDrawer:save"?: ((event: Event) => any) | undefined;
98
+ "onDrawer:save"?: ((event?: Event | undefined) => any) | undefined;
99
99
  "onDrawer:closed"?: (() => any) | undefined;
100
100
  }>, {
101
101
  as: string;
@@ -399,6 +399,42 @@ declare function __VLS_template_12(): {
399
399
  declare function __VLS_template_13(): {
400
400
  attrs: Partial<{}>;
401
401
  slots: {
402
+ panel?(_: {
403
+ title: string;
404
+ loading: boolean;
405
+ isForm: boolean;
406
+ titleId: string;
407
+ descriptionId: string;
408
+ contentRef: HTMLElement | null;
409
+ dialogTitle: DefineComponent< {
410
+ as: {
411
+ type: (ObjectConstructor | StringConstructor)[];
412
+ default: string;
413
+ };
414
+ id: {
415
+ type: StringConstructor;
416
+ default: null;
417
+ };
418
+ }, () => VNode<RendererNode, RendererElement, {
419
+ [key: string]: any;
420
+ }> | VNode<RendererNode, RendererElement, {
421
+ [key: string]: any;
422
+ }>[] | null, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
423
+ as: {
424
+ type: (ObjectConstructor | StringConstructor)[];
425
+ default: string;
426
+ };
427
+ id: {
428
+ type: StringConstructor;
429
+ default: null;
430
+ };
431
+ }>>, {
432
+ id: string;
433
+ as: string | Record<string, any>;
434
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
435
+ emitClose: () => void;
436
+ emitSave: (event?: undefined) => void;
437
+ }): any;
402
438
  header?(_: {
403
439
  title: string;
404
440
  showClose: boolean;
@@ -455,8 +491,45 @@ declare function __VLS_template_13(): {
455
491
  declare function __VLS_template_14(): {
456
492
  attrs: Partial<{}>;
457
493
  slots: {
494
+ panel?(_: {
495
+ title: string;
496
+ loading: boolean;
497
+ isForm: boolean;
498
+ titleId: string;
499
+ descriptionId: string;
500
+ contentRef: HTMLElement | null;
501
+ dialogTitle: DefineComponent< {
502
+ as: {
503
+ type: (ObjectConstructor | StringConstructor)[];
504
+ default: string;
505
+ };
506
+ id: {
507
+ type: StringConstructor;
508
+ default: null;
509
+ };
510
+ }, () => VNode<RendererNode, RendererElement, {
511
+ [key: string]: any;
512
+ }> | VNode<RendererNode, RendererElement, {
513
+ [key: string]: any;
514
+ }>[] | null, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, Record<string, any>, string, VNodeProps & AllowedComponentProps & ComponentCustomProps, Readonly<ExtractPropTypes< {
515
+ as: {
516
+ type: (ObjectConstructor | StringConstructor)[];
517
+ default: string;
518
+ };
519
+ id: {
520
+ type: StringConstructor;
521
+ default: null;
522
+ };
523
+ }>>, {
524
+ id: string;
525
+ as: string | Record<string, any>;
526
+ }, {}, {}, {}, string, ComponentProvideOptions, true, {}, any>;
527
+ emitClose: () => void;
528
+ emitSave: (event?: undefined) => void;
529
+ }): any;
458
530
  header?(_: {
459
531
  title: string;
532
+ showClose: boolean;
460
533
  }): any;
461
534
  header?(_: {}): any;
462
535
  title?(_: {
@@ -741,6 +814,9 @@ declare function __VLS_template_6(): {
741
814
  } | null;
742
815
  header: DataTableHeader;
743
816
  }): any;
817
+ tbody?(_: {
818
+ items: DataTableItem[];
819
+ }): any;
744
820
  items?(_: {
745
821
  item: DataTableItem;
746
822
  index: number;
@@ -1,4 +1,4 @@
1
- import { _ as t } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-DaCv0Gii.js";
1
+ import { _ as t } from "../_shared/RichTextEditor.vue_vue_type_script_setup_true_lang-t14vKtCW.js";
2
2
  export {
3
3
  t as RichTextEditor,
4
4
  t as default
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robuust-digital/vue-components",
3
- "version": "2.5.0-beta.4",
3
+ "version": "2.6.0",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -1,185 +0,0 @@
1
- import { defineComponent as S, openBlock as c, createBlock as m, unref as t, withCtx as d, createVNode as s, withModifiers as L, createElementVNode as a, normalizeClass as w, createElementBlock as b, renderSlot as i, createTextVNode as T, toDisplayString as F, createCommentVNode as y } from "vue";
2
- import { TransitionRoot as N, Dialog as V, TransitionChild as k, DialogPanel as R, DialogTitle as p } from "@headlessui/vue";
3
- import { _ as C } from "./ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
4
- import { u as A } from "./Modal.vue_vue_type_script_setup_true_lang-CB0Gez7v.js";
5
- import { r as g } from "./XMarkIcon-CPr_Rd8y.js";
6
- const H = {
7
- class: "rvc-drawer-presentation",
8
- role: "presentation"
9
- }, I = { class: "rvc-drawer-container" }, z = { class: "rvc-drawer-inner" }, M = { class: "rvc-drawer-panel-inner" }, P = { class: "rvc-drawer-header-inner" }, j = { class: "rvc-drawer-close-wrapper" }, q = ["id"], G = {
10
- key: 2,
11
- class: "rvc-drawer-footer"
12
- }, W = /* @__PURE__ */ S({
13
- __name: "Drawer",
14
- props: {
15
- as: { default: "form" },
16
- id: {},
17
- title: {},
18
- showClose: { type: Boolean, default: !1 },
19
- scrolledDown: { type: Boolean, default: !1 },
20
- headerSticky: { type: Boolean, default: !1 },
21
- spinning: { type: Boolean, default: !1 },
22
- submitLabel: { default: "Save" },
23
- cancelLabel: { default: "Cancel" },
24
- panelClass: { default: "rvc-drawer-panel-max-width" },
25
- resetHeader: { type: Boolean, default: !1 },
26
- resetFooter: { type: Boolean, default: !1 }
27
- },
28
- emits: ["drawer:open", "drawer:opened", "drawer:close", "drawer:save", "drawer:closed"],
29
- setup(e, { emit: $ }) {
30
- const B = e, l = $, {
31
- contentRef: h,
32
- ready: v,
33
- isForm: D,
34
- titleId: f,
35
- descriptionId: u,
36
- initialFocusElement: E
37
- } = A(B);
38
- return (n, r) => (c(), m(t(N), { as: "template" }, {
39
- default: d(() => [
40
- s(t(V), {
41
- as: e.as,
42
- class: "rvc-drawer",
43
- static: "",
44
- "aria-modal": "true",
45
- role: "dialog",
46
- "initial-focus": t(E),
47
- "aria-labelledby": t(f),
48
- onClose: r[6] || (r[6] = (o) => l("drawer:close")),
49
- onSubmit: r[7] || (r[7] = L((o) => l("drawer:save", o), ["prevent"]))
50
- }, {
51
- default: d(() => [
52
- s(t(k), {
53
- as: "template",
54
- enter: "rvc-drawer-backdrop-transition-enter",
55
- "enter-from": "rvc-drawer-backdrop-transition-enter-from",
56
- "enter-to": "rvc-drawer-backdrop-transition-enter-to",
57
- leave: "rvc-drawer-backdrop-transition-leave",
58
- "leave-from": "rvc-drawer-backdrop-transition-leave-from",
59
- "leave-to": "rvc-drawer-backdrop-transition-leave-to",
60
- onBeforeEnter: r[0] || (r[0] = (o) => l("drawer:open")),
61
- onAfterEnter: r[1] || (r[1] = (o) => l("drawer:opened"))
62
- }, {
63
- default: d(() => [...r[8] || (r[8] = [
64
- a("div", {
65
- class: "rvc-drawer-backdrop",
66
- "aria-hidden": "true"
67
- }, null, -1)
68
- ])]),
69
- _: 1
70
- }),
71
- a("div", H, [
72
- a("div", I, [
73
- a("div", z, [
74
- s(t(k), {
75
- as: "template",
76
- enter: "rvc-drawer-transition-enter",
77
- "enter-from": "rvc-drawer-transition-enter-from",
78
- "enter-to": "rvc-drawer-transition-enter-to",
79
- leave: "rvc-drawer-transition-leave",
80
- "leave-from": "rvc-drawer-transition-leave-from",
81
- "leave-to": "rvc-drawer-transition-leave-to",
82
- onBeforeEnter: r[4] || (r[4] = (o) => v.value = !0),
83
- onAfterLeave: r[5] || (r[5] = (o) => (v.value = !1, l("drawer:closed")))
84
- }, {
85
- default: d(() => [
86
- s(t(R), {
87
- class: w(["rvc-drawer-panel", e.panelClass]),
88
- "aria-busy": e.spinning,
89
- "aria-describedby": t(u)
90
- }, {
91
- default: d(() => [
92
- a("div", M, [
93
- e.resetHeader ? i(n.$slots, "header", { key: 1 }) : (c(), b("header", {
94
- key: 0,
95
- class: w([{ "rvc-drawer-header-sticky": e.headerSticky }, "rvc-drawer-header"])
96
- }, [
97
- i(n.$slots, "header", {
98
- title: e.title,
99
- showClose: e.showClose
100
- }, () => [
101
- a("div", P, [
102
- i(n.$slots, "title", {
103
- id: t(f),
104
- dialogTitle: t(p),
105
- title: e.title
106
- }, () => [
107
- s(t(p), {
108
- id: t(f),
109
- class: "rvc-drawer-title"
110
- }, {
111
- default: d(() => [
112
- T(F(e.title), 1)
113
- ]),
114
- _: 1
115
- }, 8, ["id"])
116
- ]),
117
- e.showClose ? i(n.$slots, "close", {
118
- key: 0,
119
- icon: t(g),
120
- emitClose: () => l("drawer:close")
121
- }, () => [
122
- a("div", j, [
123
- a("button", {
124
- type: "button",
125
- class: "rvc-drawer-close",
126
- "aria-label": "Close panel",
127
- onClick: r[2] || (r[2] = (o) => l("drawer:close"))
128
- }, [
129
- s(t(g), { "aria-hidden": "true" })
130
- ])
131
- ])
132
- ]) : y("", !0)
133
- ])
134
- ])
135
- ], 2)),
136
- a("div", {
137
- class: w([{ "rvc-drawer-scroll-reverse": e.scrolledDown }, "rvc-drawer-scroll"])
138
- }, [
139
- a("div", {
140
- id: t(u),
141
- ref_key: "contentRef",
142
- ref: h,
143
- class: "rvc-drawer-content"
144
- }, [
145
- i(n.$slots, "default", { ready: t(v) })
146
- ], 8, q)
147
- ], 2),
148
- e.resetFooter ? i(n.$slots, "footer", { key: 3 }) : (c(), b("footer", G, [
149
- i(n.$slots, "footer", { loading: e.spinning }, () => [
150
- s(C, {
151
- type: "button",
152
- label: e.cancelLabel,
153
- color: "light",
154
- onClick: r[3] || (r[3] = (o) => l("drawer:close"))
155
- }, null, 8, ["label"]),
156
- t(D) ? (c(), m(C, {
157
- key: 0,
158
- type: "submit",
159
- label: e.submitLabel,
160
- spinning: e.spinning,
161
- disabled: e.spinning
162
- }, null, 8, ["label", "spinning", "disabled"])) : y("", !0)
163
- ])
164
- ]))
165
- ])
166
- ]),
167
- _: 3
168
- }, 8, ["class", "aria-busy", "aria-describedby"])
169
- ]),
170
- _: 3
171
- })
172
- ])
173
- ])
174
- ])
175
- ]),
176
- _: 3
177
- }, 8, ["as", "initial-focus", "aria-labelledby"])
178
- ]),
179
- _: 3
180
- }));
181
- }
182
- });
183
- export {
184
- W as _
185
- };
@@ -1,183 +0,0 @@
1
- import { ref as C, computed as f, defineComponent as D, openBlock as p, createBlock as L, unref as o, withCtx as d, createVNode as n, withModifiers as T, createElementVNode as r, normalizeClass as I, createElementBlock as $, renderSlot as s, createTextVNode as N, toDisplayString as R, createCommentVNode as S } from "vue";
2
- import { TransitionRoot as V, Dialog as h, TransitionChild as g, DialogPanel as x, DialogTitle as B } from "@headlessui/vue";
3
- import { _ as E } from "./ButtonBase.vue_vue_type_script_setup_true_lang-ZYVNEyNx.js";
4
- import { r as w } from "./XMarkIcon-CPr_Rd8y.js";
5
- function A(t) {
6
- const c = C(null), u = C(!1), l = f(() => t.as === "form"), b = f(() => `${t.id}-title`), m = f(() => `${t.id}-content`), v = f(() => c.value?.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'));
7
- return {
8
- contentRef: c,
9
- ready: u,
10
- isForm: l,
11
- titleId: b,
12
- descriptionId: m,
13
- initialFocusElement: v
14
- };
15
- }
16
- const H = {
17
- role: "presentation",
18
- class: "rvc-modal-presentation"
19
- }, M = { class: "rvc-modal-container" }, q = {
20
- key: 0,
21
- class: "rvc-modal-header"
22
- }, z = { class: "rvc-modal-header-inner" }, P = { class: "rvc-modal-close-wrapper" }, j = ["id"], G = {
23
- key: 2,
24
- class: "rvc-modal-footer"
25
- }, U = /* @__PURE__ */ D({
26
- __name: "Modal",
27
- props: {
28
- as: { default: "div" },
29
- id: {},
30
- title: {},
31
- showClose: { type: Boolean, default: !1 },
32
- spinning: { type: Boolean, default: !1 },
33
- submitLabel: { default: "Confirm" },
34
- cancelLabel: { default: "Cancel" },
35
- panelClass: { default: "rvc-modal-panel-max-width" },
36
- resetHeader: { type: Boolean, default: !1 },
37
- resetFooter: { type: Boolean, default: !1 }
38
- },
39
- emits: ["modal:open", "modal:opened", "modal:close", "modal:save", "modal:closed"],
40
- setup(t, { emit: c }) {
41
- const u = t, l = c, {
42
- contentRef: b,
43
- ready: m,
44
- isForm: v,
45
- titleId: y,
46
- descriptionId: k,
47
- initialFocusElement: F
48
- } = A(u);
49
- return (i, e) => (p(), L(o(V), { as: "template" }, {
50
- default: d(() => [
51
- n(o(h), {
52
- as: t.as,
53
- class: "rvc-modal",
54
- static: "",
55
- "aria-modal": "true",
56
- role: "dialog",
57
- "initial-focus": o(F),
58
- "aria-labelledby": o(y),
59
- onClose: e[7] || (e[7] = (a) => l("modal:close")),
60
- onSubmit: e[8] || (e[8] = T((a) => l("modal:save", a), ["prevent"]))
61
- }, {
62
- default: d(() => [
63
- n(o(g), {
64
- as: "template",
65
- enter: "rvc-modal-backdrop-transition-enter",
66
- "enter-from": "rvc-modal-backdrop-transition-enter-from",
67
- "enter-to": "rvc-modal-backdrop-transition-enter-to",
68
- leave: "rvc-modal-backdrop-transition-leave",
69
- "leave-from": "rvc-modal-backdrop-transition-leave-from",
70
- "leave-to": "rvc-modal-backdrop-transition-leave-to",
71
- onBeforeEnter: e[0] || (e[0] = (a) => l("modal:open")),
72
- onAfterEnter: e[1] || (e[1] = (a) => l("modal:opened"))
73
- }, {
74
- default: d(() => [...e[9] || (e[9] = [
75
- r("div", {
76
- "aria-hidden": "true",
77
- class: "rvc-modal-backdrop"
78
- }, null, -1)
79
- ])]),
80
- _: 1
81
- }),
82
- r("div", H, [
83
- r("div", M, [
84
- n(o(g), {
85
- as: "template",
86
- enter: "rvc-modal-transition-enter",
87
- "enter-from": "rvc-modal-transition-enter-from",
88
- "enter-to": "rvc-modal-transition-enter-to",
89
- leave: "rvc-modal-transition-leave",
90
- "leave-from": "rvc-modal-transition-leave-from",
91
- "leave-to": "rvc-modal-transition-leave-to",
92
- onBeforeEnter: e[5] || (e[5] = (a) => m.value = !0),
93
- onAfterLeave: e[6] || (e[6] = (a) => (m.value = !1, l("modal:closed")))
94
- }, {
95
- default: d(() => [
96
- n(o(x), {
97
- class: I(["rvc-modal-panel", t.panelClass]),
98
- "aria-busy": t.spinning,
99
- "aria-describedby": o(k)
100
- }, {
101
- default: d(() => [
102
- t.resetHeader ? s(i.$slots, "header", { key: 1 }) : (p(), $("header", q, [
103
- s(i.$slots, "header", { title: t.title }, () => [
104
- r("div", z, [
105
- s(i.$slots, "title", {
106
- id: o(y),
107
- dialogTitle: o(B),
108
- title: t.title
109
- }, () => [
110
- n(o(B), {
111
- id: o(y),
112
- class: "rvc-modal-title"
113
- }, {
114
- default: d(() => [
115
- N(R(t.title), 1)
116
- ]),
117
- _: 1
118
- }, 8, ["id"])
119
- ]),
120
- t.showClose ? s(i.$slots, "close", {
121
- key: 0,
122
- icon: o(w),
123
- emitClose: () => l("modal:close")
124
- }, () => [
125
- r("div", P, [
126
- r("button", {
127
- type: "button",
128
- class: "rvc-modal-close",
129
- "aria-label": "Close panel",
130
- onClick: e[2] || (e[2] = (a) => l("modal:close"))
131
- }, [
132
- n(o(w), { "aria-hidden": "true" })
133
- ])
134
- ])
135
- ]) : S("", !0)
136
- ])
137
- ])
138
- ])),
139
- r("div", {
140
- id: o(k),
141
- ref_key: "contentRef",
142
- ref: b,
143
- class: "rvc-modal-content"
144
- }, [
145
- s(i.$slots, "default", { ready: o(m) })
146
- ], 8, j),
147
- t.resetFooter ? s(i.$slots, "footer", { key: 3 }) : (p(), $("footer", G, [
148
- s(i.$slots, "footer", { loading: t.spinning }, () => [
149
- n(E, {
150
- type: o(v) ? "submit" : "button",
151
- label: t.submitLabel,
152
- spinning: t.spinning,
153
- disabled: t.spinning,
154
- onClick: e[3] || (e[3] = (a) => !o(v) && l("modal:save"))
155
- }, null, 8, ["type", "label", "spinning", "disabled"]),
156
- n(E, {
157
- type: "button",
158
- color: "light",
159
- label: t.cancelLabel,
160
- onClick: e[4] || (e[4] = (a) => l("modal:close"))
161
- }, null, 8, ["label"])
162
- ])
163
- ]))
164
- ]),
165
- _: 3
166
- }, 8, ["class", "aria-busy", "aria-describedby"])
167
- ]),
168
- _: 3
169
- })
170
- ])
171
- ])
172
- ]),
173
- _: 3
174
- }, 8, ["as", "initial-focus", "aria-labelledby"])
175
- ]),
176
- _: 3
177
- }));
178
- }
179
- });
180
- export {
181
- U as _,
182
- A as u
183
- };