@simsustech/quasar-components 0.11.26 → 0.12.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 (99) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/dist/LocaleSelect-BqkjbcKS.js +460 -0
  3. package/dist/QSubmitButton-Chc7dndx.js +101 -0
  4. package/dist/authentication.js +1935 -2031
  5. package/dist/form.js +1093 -1118
  6. package/dist/general.js +319 -361
  7. package/dist/md3.js +406 -395
  8. package/dist/nl-DIfqXZG_.js +354 -0
  9. package/dist/nl-DWmQiCdO.js +12 -0
  10. package/dist/nl-DbV07Lx7.js +106 -0
  11. package/dist/nl-ZpgX9FUw.js +4 -0
  12. package/dist/quasar-components.css +5 -4
  13. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  14. package/dist/types/{ui → src/ui}/authentication/LoginForm.vue.d.ts +5 -0
  15. package/dist/types/{ui/form/LocaleSelect.vue.d.ts → src/ui/form/CountrySelect.vue.d.ts} +8 -5
  16. package/dist/types/src/ui/form/LocaleSelect.vue.d.ts +28 -0
  17. package/dist/types/{ui → src/ui}/form/index.d.ts +2 -1
  18. package/dist/types/src/ui/form/lang/index.d.ts +817 -0
  19. package/dist/types/{ui → src/ui}/general/QLanguageSelect.vue.d.ts +4 -4
  20. package/dist/virtualModules.js +62 -2
  21. package/dist/vite-plugin.js +50 -101
  22. package/package.json +34 -34
  23. package/src/ui/authentication/LoginForm.vue +9 -4
  24. package/src/ui/form/CountrySelect.vue +83 -0
  25. package/src/ui/form/LocaleSelect.vue +27 -8
  26. package/src/ui/form/index.ts +9 -1
  27. package/src/ui/form/lang/en-US.ts +112 -356
  28. package/src/ui/form/lang/index.ts +173 -377
  29. package/src/ui/form/lang/nl.ts +108 -352
  30. package/src/ui/general/QLanguageSelect.vue +20 -16
  31. package/tsconfig.json +1 -0
  32. package/tsconfig.node.json +2 -1
  33. package/tsconfig.types.json +2 -1
  34. package/dist/LocaleSelect.vue_vue_type_script_setup_true_lang-DFwcmPnu.js +0 -584
  35. package/dist/QSubmitButton.vue_vue_type_script_setup_true_lang-D-I0Gws4.js +0 -109
  36. package/dist/nl-BJwNz421.js +0 -453
  37. package/dist/nl-CneFq5NZ.js +0 -112
  38. package/dist/nl-NLgZUAKl.js +0 -6
  39. package/dist/nl-X50pmfG-.js +0 -12
  40. package/dist/types/ui/form/lang/index.d.ts +0 -1353
  41. package/eslint.config.js +0 -29
  42. package/dist/types/{ui → src/ui}/authentication/AccountsTable.vue.d.ts +0 -0
  43. package/dist/types/{ui → src/ui}/authentication/ConsentList.vue.d.ts +0 -0
  44. package/dist/types/{ui → src/ui}/authentication/EmailChangeForm.vue.d.ts +0 -0
  45. package/dist/types/{ui → src/ui}/authentication/EmailChangeStepper.vue.d.ts +0 -0
  46. package/dist/types/{ui → src/ui}/authentication/LoginButton.vue.d.ts +0 -0
  47. package/dist/types/{ui → src/ui}/authentication/LogoutButton.vue.d.ts +0 -0
  48. package/dist/types/{ui → src/ui}/authentication/LogoutForm.vue.d.ts +0 -0
  49. package/dist/types/{ui → src/ui}/authentication/OtpInput.vue.d.ts +0 -0
  50. package/dist/types/{ui → src/ui}/authentication/PasswordChangeForm.vue.d.ts +0 -0
  51. package/dist/types/{ui → src/ui}/authentication/PasswordChangeStepper.vue.d.ts +0 -0
  52. package/dist/types/{ui → src/ui}/authentication/RegisterForm.vue.d.ts +0 -0
  53. package/dist/types/{ui → src/ui}/authentication/RequestOtpForm.vue.d.ts +0 -0
  54. package/dist/types/{ui → src/ui}/authentication/UserMenuButton.vue.d.ts +0 -0
  55. package/dist/types/{ui → src/ui}/authentication/VerificationSlider.vue.d.ts +0 -0
  56. package/dist/types/{ui → src/ui}/authentication/index.d.ts +0 -0
  57. package/dist/types/{ui → src/ui}/authentication/lang/en-US.d.ts +0 -0
  58. package/dist/types/{ui → src/ui}/authentication/lang/index.d.ts +0 -0
  59. package/dist/types/{ui → src/ui}/authentication/lang/nl.d.ts +0 -0
  60. package/dist/types/{ui → src/ui}/flags/index.d.ts +0 -0
  61. package/dist/types/{ui → src/ui}/flags/lang/en-US.d.ts +0 -0
  62. package/dist/types/{ui → src/ui}/flags/lang/index.d.ts +0 -0
  63. package/dist/types/{ui → src/ui}/flags/lang/nl.d.ts +0 -0
  64. package/dist/types/{ui → src/ui}/form/BooleanItem.vue.d.ts +0 -0
  65. package/dist/types/{ui → src/ui}/form/BooleanSelect.vue.d.ts +0 -0
  66. package/dist/types/{ui → src/ui}/form/CronScheduleInput.vue.d.ts +0 -0
  67. package/dist/types/{ui → src/ui}/form/CurrencySelect.vue.d.ts +0 -0
  68. package/dist/types/{ui → src/ui}/form/DateInput.vue.d.ts +1 -1
  69. package/dist/types/{ui → src/ui}/form/DatePicker.vue.d.ts +0 -0
  70. package/dist/types/{ui → src/ui}/form/EmailInput.vue.d.ts +0 -0
  71. package/dist/types/{ui → src/ui}/form/FilteredModelSelect.vue.d.ts +0 -0
  72. package/dist/types/{ui → src/ui}/form/FormInput.vue.d.ts +0 -0
  73. package/dist/types/{ui → src/ui}/form/FormItem.vue.d.ts +0 -0
  74. package/dist/types/{ui → src/ui}/form/GenderItem.vue.d.ts +0 -0
  75. package/dist/types/{ui → src/ui}/form/GenderSelect.vue.d.ts +0 -0
  76. package/dist/types/{ui → src/ui}/form/PostalCodeInput.vue.d.ts +0 -0
  77. package/dist/types/{ui → src/ui}/form/TelephoneNumberInput.vue.d.ts +0 -0
  78. package/dist/types/{ui → src/ui}/form/lang/en-US.d.ts +0 -0
  79. package/dist/types/{ui → src/ui}/form/lang/nl.d.ts +0 -0
  80. package/dist/types/{ui → src/ui}/general/QDrawerList.vue.d.ts +0 -0
  81. package/dist/types/{ui → src/ui}/general/QStyledCard.vue.d.ts +0 -0
  82. package/dist/types/{ui → src/ui}/general/QStyledLayout.vue.d.ts +0 -0
  83. package/dist/types/{ui → src/ui}/general/QSubmitButton.vue.d.ts +1 -1
  84. package/dist/types/{ui → src/ui}/general/ResourcePage.vue.d.ts +1 -1
  85. /package/dist/types/{ui → src/ui}/general/ResponsiveDialog.vue.d.ts +0 -0
  86. /package/dist/types/{ui → src/ui}/general/index.d.ts +0 -0
  87. /package/dist/types/{ui → src/ui}/general/lang/en-US.d.ts +0 -0
  88. /package/dist/types/{ui → src/ui}/general/lang/index.d.ts +0 -0
  89. /package/dist/types/{ui → src/ui}/general/lang/nl.d.ts +0 -0
  90. /package/dist/types/{ui → src/ui}/icons/index.d.ts +0 -0
  91. /package/dist/types/{ui → src/ui}/icons/labels.d.ts +0 -0
  92. /package/dist/types/{ui → src/ui}/md3/Md3Layout.vue.d.ts +0 -0
  93. /package/dist/types/{ui → src/ui}/md3/NavigationRailFabs.vue.d.ts +0 -0
  94. /package/dist/types/{ui → src/ui}/md3/index.d.ts +0 -0
  95. /package/dist/types/{ui → src/ui}/md3/lang/en-US.d.ts +0 -0
  96. /package/dist/types/{ui → src/ui}/md3/lang/index.d.ts +0 -0
  97. /package/dist/types/{ui → src/ui}/md3/lang/nl.d.ts +0 -0
  98. /package/dist/types/{virtualModules.d.ts → src/virtualModules.d.ts} +0 -0
  99. /package/dist/types/{vite-plugin.d.ts → src/vite-plugin.d.ts} +0 -0
package/dist/md3.js CHANGED
@@ -1,412 +1,423 @@
1
- import { QBtn, QPageSticky, useQuasar, debounce, QLayout, QHeader, QToolbar, QDrawer, QFooter, QPageContainer } from "quasar";
2
- import { defineComponent, toRefs, inject, openBlock, createElementBlock, Fragment, unref, createBlock, normalizeClass, createCommentVNode, withCtx, watch, computed, toValue, ref, onMounted, resolveComponent, withDirectives, createElementVNode, createVNode, renderSlot, vShow } from "vue";
3
- const _hoisted_1$1 = { key: 0 };
4
- const _sfc_main$1 = /* @__PURE__ */ defineComponent({
5
- __name: "NavigationRailFabs",
6
- props: {
7
- type: {},
8
- showSticky: { type: Boolean },
9
- seekAttention: { type: Boolean },
10
- disable: { type: Boolean },
11
- busEmits: {},
12
- icons: {}
13
- },
14
- setup(__props) {
15
- const props = __props;
16
- const { type, icons } = toRefs(props);
17
- if (!type.value) type.value = "add";
18
- const bus = inject("bus");
19
- if (!bus)
20
- throw new Error(
21
- "Event bus not initialized (https://quasar.dev/quasar-utils/event-bus-util)"
22
- );
23
- const addIcon = icons.value?.add ?? "add";
24
- const editIcon = icons.value?.edit ?? "edit";
25
- return (_ctx, _cache) => {
26
- const _component_q_btn = QBtn;
27
- const _component_q_page_sticky = QPageSticky;
28
- return openBlock(), createElementBlock(Fragment, null, [
29
- !__props.showSticky ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
30
- __props.busEmits.add && unref(type) === "add" ? (openBlock(), createBlock(_component_q_btn, {
31
- key: 0,
32
- id: "fabAdd",
33
- class: normalizeClass({
34
- "gt-sm": true,
35
- animated: !!__props.seekAttention,
36
- "animated-tada": !!__props.seekAttention,
37
- "animated-infinite": !!__props.seekAttention
38
- }),
39
- fab: "",
40
- icon: unref(addIcon),
41
- disable: __props.disable,
42
- onClick: _cache[0] || (_cache[0] = ($event) => unref(bus).emit(__props.busEmits.add))
43
- }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true),
44
- __props.busEmits.edit && unref(type) === "edit" ? (openBlock(), createBlock(_component_q_btn, {
45
- key: 1,
46
- id: "fabEdit",
47
- class: normalizeClass({
48
- "gt-sm": true,
49
- animated: !!__props.seekAttention,
50
- "animated-tada": !!__props.seekAttention,
51
- "animated-infinite": !!__props.seekAttention
52
- }),
53
- fab: "",
54
- icon: unref(editIcon),
55
- disable: __props.disable,
56
- onClick: _cache[1] || (_cache[1] = ($event) => unref(bus).emit(__props.busEmits.edit))
57
- }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true)
58
- ])) : createCommentVNode("", true),
59
- __props.showSticky ? (openBlock(), createBlock(_component_q_page_sticky, {
60
- key: 1,
61
- position: "bottom-right",
62
- offset: [18, 18]
63
- }, {
64
- default: withCtx(() => [
65
- __props.busEmits.add && unref(type) === "add" ? (openBlock(), createBlock(_component_q_btn, {
66
- key: 0,
67
- class: normalizeClass({
68
- "lt-md": true,
69
- animated: !!__props.seekAttention,
70
- "animated-tada": !!__props.seekAttention,
71
- "animated-infinite": !!__props.seekAttention
72
- }),
73
- fab: "",
74
- icon: unref(addIcon),
75
- disable: __props.disable,
76
- onClick: _cache[2] || (_cache[2] = ($event) => unref(bus).emit(__props.busEmits.add))
77
- }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true),
78
- __props.busEmits.edit && unref(type) === "edit" ? (openBlock(), createBlock(_component_q_btn, {
79
- key: 1,
80
- class: normalizeClass({
81
- "lt-md": true,
82
- animated: !!__props.seekAttention,
83
- "animated-tada": !!__props.seekAttention,
84
- "animated-infinite": !!__props.seekAttention
85
- }),
86
- fab: "",
87
- icon: unref(editIcon),
88
- disable: __props.disable,
89
- onClick: _cache[3] || (_cache[3] = ($event) => unref(bus).emit(__props.busEmits.edit))
90
- }, null, 8, ["class", "icon", "disable"])) : createCommentVNode("", true)
91
- ]),
92
- _: 1
93
- })) : createCommentVNode("", true)
94
- ], 64);
95
- };
96
- }
1
+ import { t as __exportAll } from "./rolldown-runtime-D7D4PA-g.js";
2
+ import { QBtn, QDrawer, QFooter, QHeader, QLayout, QPageContainer, QPageSticky, QToolbar, debounce, useQuasar } from "quasar";
3
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createVNode, defineComponent, inject, normalizeClass, onMounted, openBlock, ref, renderSlot, resolveComponent, toRefs, toValue, unref, vShow, watch, withCtx, withDirectives } from "vue";
4
+ //#region src/ui/md3/NavigationRailFabs.vue?vue&type=script&setup=true&lang.ts
5
+ var _hoisted_1$1 = { key: 0 };
6
+ //#endregion
7
+ //#region src/ui/md3/NavigationRailFabs.vue
8
+ var NavigationRailFabs_default = /* @__PURE__ */ defineComponent({
9
+ __name: "NavigationRailFabs",
10
+ props: {
11
+ type: {},
12
+ showSticky: { type: Boolean },
13
+ seekAttention: { type: Boolean },
14
+ disable: { type: Boolean },
15
+ busEmits: {},
16
+ icons: {}
17
+ },
18
+ setup(__props) {
19
+ const { type, icons } = toRefs(__props);
20
+ if (!type.value) type.value = "add";
21
+ const bus = inject("bus");
22
+ if (!bus) throw new Error("Event bus not initialized (https://quasar.dev/quasar-utils/event-bus-util)");
23
+ const addIcon = icons.value?.add ?? "add";
24
+ const editIcon = icons.value?.edit ?? "edit";
25
+ return (_ctx, _cache) => {
26
+ const _component_q_btn = QBtn;
27
+ const _component_q_page_sticky = QPageSticky;
28
+ return openBlock(), createElementBlock(Fragment, null, [!__props.showSticky ? (openBlock(), createElementBlock("div", _hoisted_1$1, [__props.busEmits.add && unref(type) === "add" ? (openBlock(), createBlock(_component_q_btn, {
29
+ key: 0,
30
+ id: "fabAdd",
31
+ class: normalizeClass({
32
+ "gt-sm": true,
33
+ animated: !!__props.seekAttention,
34
+ "animated-tada": !!__props.seekAttention,
35
+ "animated-infinite": !!__props.seekAttention
36
+ }),
37
+ fab: "",
38
+ icon: unref(addIcon),
39
+ disable: __props.disable,
40
+ onClick: _cache[0] || (_cache[0] = ($event) => unref(bus).emit(__props.busEmits.add))
41
+ }, null, 8, [
42
+ "class",
43
+ "icon",
44
+ "disable"
45
+ ])) : createCommentVNode("", true), __props.busEmits.edit && unref(type) === "edit" ? (openBlock(), createBlock(_component_q_btn, {
46
+ key: 1,
47
+ id: "fabEdit",
48
+ class: normalizeClass({
49
+ "gt-sm": true,
50
+ animated: !!__props.seekAttention,
51
+ "animated-tada": !!__props.seekAttention,
52
+ "animated-infinite": !!__props.seekAttention
53
+ }),
54
+ fab: "",
55
+ icon: unref(editIcon),
56
+ disable: __props.disable,
57
+ onClick: _cache[1] || (_cache[1] = ($event) => unref(bus).emit(__props.busEmits.edit))
58
+ }, null, 8, [
59
+ "class",
60
+ "icon",
61
+ "disable"
62
+ ])) : createCommentVNode("", true)])) : createCommentVNode("", true), __props.showSticky ? (openBlock(), createBlock(_component_q_page_sticky, {
63
+ key: 1,
64
+ position: "bottom-right",
65
+ offset: [18, 18]
66
+ }, {
67
+ default: withCtx(() => [__props.busEmits.add && unref(type) === "add" ? (openBlock(), createBlock(_component_q_btn, {
68
+ key: 0,
69
+ class: normalizeClass({
70
+ "lt-md": true,
71
+ animated: !!__props.seekAttention,
72
+ "animated-tada": !!__props.seekAttention,
73
+ "animated-infinite": !!__props.seekAttention
74
+ }),
75
+ fab: "",
76
+ icon: unref(addIcon),
77
+ disable: __props.disable,
78
+ onClick: _cache[2] || (_cache[2] = ($event) => unref(bus).emit(__props.busEmits.add))
79
+ }, null, 8, [
80
+ "class",
81
+ "icon",
82
+ "disable"
83
+ ])) : createCommentVNode("", true), __props.busEmits.edit && unref(type) === "edit" ? (openBlock(), createBlock(_component_q_btn, {
84
+ key: 1,
85
+ class: normalizeClass({
86
+ "lt-md": true,
87
+ animated: !!__props.seekAttention,
88
+ "animated-tada": !!__props.seekAttention,
89
+ "animated-infinite": !!__props.seekAttention
90
+ }),
91
+ fab: "",
92
+ icon: unref(editIcon),
93
+ disable: __props.disable,
94
+ onClick: _cache[3] || (_cache[3] = ($event) => unref(bus).emit(__props.busEmits.edit))
95
+ }, null, 8, [
96
+ "class",
97
+ "icon",
98
+ "disable"
99
+ ])) : createCommentVNode("", true)]),
100
+ _: 1
101
+ })) : createCommentVNode("", true)], 64);
102
+ };
103
+ }
97
104
  });
98
- const isClient = typeof window !== "undefined" && typeof document !== "undefined";
105
+ //#endregion
106
+ //#region ../../node_modules/.pnpm/@vueuse+shared@14.3.0_vue@3.5.35_typescript@6.0.3_/node_modules/@vueuse/shared/dist/index.js
107
+ var isClient = typeof window !== "undefined" && typeof document !== "undefined";
99
108
  typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope;
100
- const toString = Object.prototype.toString;
101
- const isObject = (val) => toString.call(val) === "[object Object]";
102
- const noop = () => {
103
- };
109
+ var toString = Object.prototype.toString;
110
+ var isObject = (val) => toString.call(val) === "[object Object]";
111
+ var noop = () => {};
112
+ var isIOS = /* @__PURE__ */ getIsIOS();
113
+ function getIsIOS() {
114
+ var _window, _window2, _window3;
115
+ return isClient && !!((_window = window) === null || _window === void 0 || (_window = _window.navigator) === null || _window === void 0 ? void 0 : _window.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_window2 = window) === null || _window2 === void 0 || (_window2 = _window2.navigator) === null || _window2 === void 0 ? void 0 : _window2.maxTouchPoints) > 2 && /iPad|Macintosh/.test((_window3 = window) === null || _window3 === void 0 ? void 0 : _window3.navigator.userAgent));
116
+ }
104
117
  function toArray(value) {
105
- return Array.isArray(value) ? value : [value];
118
+ return Array.isArray(value) ? value : [value];
106
119
  }
120
+ /**
121
+ * Shorthand for watching value with {immediate: true}
122
+ *
123
+ * @see https://vueuse.org/watchImmediate
124
+ */
107
125
  function watchImmediate(source, cb, options) {
108
- return watch(source, cb, {
109
- ...options,
110
- immediate: true
111
- });
126
+ return watch(source, cb, {
127
+ ...options,
128
+ immediate: true
129
+ });
112
130
  }
113
- const defaultWindow = isClient ? window : void 0;
131
+ //#endregion
132
+ //#region ../../node_modules/.pnpm/@vueuse+core@14.3.0_vue@3.5.35_typescript@6.0.3_/node_modules/@vueuse/core/dist/index.js
133
+ var defaultWindow = isClient ? window : void 0;
134
+ isClient && window.document;
135
+ isClient && window.navigator;
136
+ isClient && window.location;
137
+ /**
138
+ * Get the dom element of a ref of element or Vue component instance
139
+ *
140
+ * @param elRef
141
+ */
114
142
  function unrefElement(elRef) {
115
- var _$el;
116
- const plain = toValue(elRef);
117
- return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
143
+ var _$el;
144
+ const plain = toValue(elRef);
145
+ return (_$el = plain === null || plain === void 0 ? void 0 : plain.$el) !== null && _$el !== void 0 ? _$el : plain;
118
146
  }
119
147
  function useEventListener(...args) {
120
- const register = (el, event, listener, options) => {
121
- el.addEventListener(event, listener, options);
122
- return () => el.removeEventListener(event, listener, options);
123
- };
124
- const firstParamTargets = computed(() => {
125
- const test = toArray(toValue(args[0])).filter((e) => e != null);
126
- return test.every((e) => typeof e !== "string") ? test : void 0;
127
- });
128
- return watchImmediate(() => {
129
- var _firstParamTargets$va, _firstParamTargets$va2;
130
- return [
131
- (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
132
- toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
133
- toArray(unref(firstParamTargets.value ? args[2] : args[1])),
134
- toValue(firstParamTargets.value ? args[3] : args[2])
135
- ];
136
- }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
137
- if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
138
- const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
139
- const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
140
- onCleanup(() => {
141
- cleanups.forEach((fn) => fn());
142
- });
143
- }, { flush: "post" });
148
+ const register = (el, event, listener, options) => {
149
+ el.addEventListener(event, listener, options);
150
+ return () => el.removeEventListener(event, listener, options);
151
+ };
152
+ const firstParamTargets = computed(() => {
153
+ const test = toArray(toValue(args[0])).filter((e) => e != null);
154
+ return test.every((e) => typeof e !== "string") ? test : void 0;
155
+ });
156
+ return watchImmediate(() => {
157
+ var _firstParamTargets$va, _firstParamTargets$va2;
158
+ return [
159
+ (_firstParamTargets$va = (_firstParamTargets$va2 = firstParamTargets.value) === null || _firstParamTargets$va2 === void 0 ? void 0 : _firstParamTargets$va2.map((e) => unrefElement(e))) !== null && _firstParamTargets$va !== void 0 ? _firstParamTargets$va : [defaultWindow].filter((e) => e != null),
160
+ toArray(toValue(firstParamTargets.value ? args[1] : args[0])),
161
+ toArray(unref(firstParamTargets.value ? args[2] : args[1])),
162
+ toValue(firstParamTargets.value ? args[3] : args[2])
163
+ ];
164
+ }, ([raw_targets, raw_events, raw_listeners, raw_options], _, onCleanup) => {
165
+ if (!(raw_targets === null || raw_targets === void 0 ? void 0 : raw_targets.length) || !(raw_events === null || raw_events === void 0 ? void 0 : raw_events.length) || !(raw_listeners === null || raw_listeners === void 0 ? void 0 : raw_listeners.length)) return;
166
+ const optionsClone = isObject(raw_options) ? { ...raw_options } : raw_options;
167
+ const cleanups = raw_targets.flatMap((el) => raw_events.flatMap((event) => raw_listeners.map((listener) => register(el, event, listener, optionsClone))));
168
+ onCleanup(() => {
169
+ cleanups.forEach((fn) => fn());
170
+ });
171
+ }, { flush: "post" });
144
172
  }
173
+ var _iOSWorkaround = false;
145
174
  function onClickOutside(target, handler, options = {}) {
146
- const { window: window$1 = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;
147
- if (!window$1) return controls ? {
148
- stop: noop,
149
- cancel: noop,
150
- trigger: noop
151
- } : noop;
152
- let shouldListen = true;
153
- const shouldIgnore = (event) => {
154
- return toValue(ignore).some((target$1) => {
155
- if (typeof target$1 === "string") return Array.from(window$1.document.querySelectorAll(target$1)).some((el) => el === event.target || event.composedPath().includes(el));
156
- else {
157
- const el = unrefElement(target$1);
158
- return el && (event.target === el || event.composedPath().includes(el));
159
- }
160
- });
161
- };
162
- function hasMultipleRoots(target$1) {
163
- const vm = toValue(target$1);
164
- return vm && vm.$.subTree.shapeFlag === 16;
165
- }
166
- function checkMultipleRoots(target$1, event) {
167
- const vm = toValue(target$1);
168
- const children = vm.$.subTree && vm.$.subTree.children;
169
- if (children == null || !Array.isArray(children)) return false;
170
- return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
171
- }
172
- const listener = (event) => {
173
- const el = unrefElement(target);
174
- if (event.target == null) return;
175
- if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
176
- if (!el || el === event.target || event.composedPath().includes(el)) return;
177
- if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event);
178
- if (!shouldListen) {
179
- shouldListen = true;
180
- return;
181
- }
182
- handler(event);
183
- };
184
- let isProcessingClick = false;
185
- const cleanup = [
186
- useEventListener(window$1, "click", (event) => {
187
- if (!isProcessingClick) {
188
- isProcessingClick = true;
189
- setTimeout(() => {
190
- isProcessingClick = false;
191
- }, 0);
192
- listener(event);
193
- }
194
- }, {
195
- passive: true,
196
- capture
197
- }),
198
- useEventListener(window$1, "pointerdown", (e) => {
199
- const el = unrefElement(target);
200
- shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
201
- }, { passive: true }),
202
- detectIframe && useEventListener(window$1, "blur", (event) => {
203
- setTimeout(() => {
204
- var _window$document$acti;
205
- const el = unrefElement(target);
206
- if (((_window$document$acti = window$1.document.activeElement) === null || _window$document$acti === void 0 ? void 0 : _window$document$acti.tagName) === "IFRAME" && !(el === null || el === void 0 ? void 0 : el.contains(window$1.document.activeElement))) handler(event);
207
- }, 0);
208
- }, { passive: true })
209
- ].filter(Boolean);
210
- const stop = () => cleanup.forEach((fn) => fn());
211
- if (controls) return {
212
- stop,
213
- cancel: () => {
214
- shouldListen = false;
215
- },
216
- trigger: (event) => {
217
- shouldListen = true;
218
- listener(event);
219
- shouldListen = false;
220
- }
221
- };
222
- return stop;
175
+ const { window = defaultWindow, ignore = [], capture = true, detectIframe = false, controls = false } = options;
176
+ if (!window) return controls ? {
177
+ stop: noop,
178
+ cancel: noop,
179
+ trigger: noop
180
+ } : noop;
181
+ if (isIOS && !_iOSWorkaround) {
182
+ _iOSWorkaround = true;
183
+ const listenerOptions = { passive: true };
184
+ Array.from(window.document.body.children).forEach((el) => el.addEventListener("click", noop, listenerOptions));
185
+ window.document.documentElement.addEventListener("click", noop, listenerOptions);
186
+ }
187
+ let shouldListen = true;
188
+ const shouldIgnore = (event) => {
189
+ return toValue(ignore).some((target) => {
190
+ if (typeof target === "string") return Array.from(window.document.querySelectorAll(target)).some((el) => el === event.target || event.composedPath().includes(el));
191
+ else {
192
+ const el = unrefElement(target);
193
+ return el && (event.target === el || event.composedPath().includes(el));
194
+ }
195
+ });
196
+ };
197
+ /**
198
+ * Determines if the given target has multiple root elements.
199
+ * Referenced from: https://github.com/vuejs/test-utils/blob/ccb460be55f9f6be05ab708500a41ec8adf6f4bc/src/vue-wrapper.ts#L21
200
+ */
201
+ function hasMultipleRoots(target) {
202
+ const vm = toValue(target);
203
+ return vm && vm.$.subTree.shapeFlag === 16;
204
+ }
205
+ function checkMultipleRoots(target, event) {
206
+ const vm = toValue(target);
207
+ const children = vm.$.subTree && vm.$.subTree.children;
208
+ if (children == null || !Array.isArray(children)) return false;
209
+ return children.some((child) => child.el === event.target || event.composedPath().includes(child.el));
210
+ }
211
+ const listener = (event) => {
212
+ const el = unrefElement(target);
213
+ if (event.target == null) return;
214
+ if (!(el instanceof Element) && hasMultipleRoots(target) && checkMultipleRoots(target, event)) return;
215
+ if (!el || el === event.target || event.composedPath().includes(el)) return;
216
+ if ("detail" in event && event.detail === 0) shouldListen = !shouldIgnore(event);
217
+ if (!shouldListen) {
218
+ shouldListen = true;
219
+ return;
220
+ }
221
+ handler(event);
222
+ };
223
+ let isProcessingClick = false;
224
+ const cleanup = [
225
+ useEventListener(window, "click", (event) => {
226
+ if (!isProcessingClick) {
227
+ isProcessingClick = true;
228
+ setTimeout(() => {
229
+ isProcessingClick = false;
230
+ }, 0);
231
+ listener(event);
232
+ }
233
+ }, {
234
+ passive: true,
235
+ capture
236
+ }),
237
+ useEventListener(window, "pointerdown", (e) => {
238
+ const el = unrefElement(target);
239
+ shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));
240
+ }, { passive: true }),
241
+ detectIframe && useEventListener(window, "blur", (event) => {
242
+ setTimeout(() => {
243
+ const el = unrefElement(target);
244
+ let activeEl = window.document.activeElement;
245
+ while (activeEl === null || activeEl === void 0 ? void 0 : activeEl.shadowRoot) activeEl = activeEl.shadowRoot.activeElement;
246
+ if ((activeEl === null || activeEl === void 0 ? void 0 : activeEl.tagName) === "IFRAME" && !(el === null || el === void 0 ? void 0 : el.contains(window.document.activeElement))) handler(event);
247
+ }, 0);
248
+ }, { passive: true })
249
+ ].filter(Boolean);
250
+ const stop = () => cleanup.forEach((fn) => fn());
251
+ if (controls) return {
252
+ stop,
253
+ cancel: () => {
254
+ shouldListen = false;
255
+ },
256
+ trigger: (event) => {
257
+ shouldListen = true;
258
+ listener(event);
259
+ shouldListen = false;
260
+ }
261
+ };
262
+ return stop;
223
263
  }
224
- const _hoisted_1 = {
225
- id: "fabs",
226
- class: "q-mb-md min-h-56px"
264
+ Number.POSITIVE_INFINITY;
265
+ //#endregion
266
+ //#region src/ui/md3/Md3Layout.vue?vue&type=script&setup=true&lang.ts
267
+ var _hoisted_1 = {
268
+ id: "fabs",
269
+ class: "q-mb-md min-h-56px"
227
270
  };
228
- const _sfc_main = /* @__PURE__ */ defineComponent({
229
- __name: "Md3Layout",
230
- props: {
231
- ready: { type: Boolean, default: true }
232
- },
233
- setup(__props) {
234
- const $q = useQuasar();
235
- const drawerRef = ref();
236
- const leftDrawerOpen = ref(false);
237
- const miniState = ref(false);
238
- const drawerWidth = computed(() => {
239
- return $q.screen.lt.sm ? 300 : 360;
240
- });
241
- watch(
242
- () => $q.screen.height,
243
- () => {
244
- toggleLeftDrawer(false);
245
- if ($q.screen.gt.sm) {
246
- miniState.value = true;
247
- } else {
248
- miniState.value = false;
249
- }
250
- }
251
- );
252
- const toggleLeftDrawer = (val) => {
253
- leftDrawerOpen.value = val ?? $q.screen.gt.sm;
254
- if ($q.screen.gt.sm) {
255
- leftDrawerOpen.value = val ?? $q.screen.gt.sm;
256
- miniState.value = !miniState.value;
257
- } else {
258
- leftDrawerOpen.value = val ?? !leftDrawerOpen.value;
259
- miniState.value = false;
260
- }
261
- };
262
- const toggleMiniState = (val) => {
263
- if ($q.screen.gt.sm) {
264
- leftDrawerOpen.value = true;
265
- miniState.value = val ?? !miniState.value;
266
- }
267
- };
268
- const onDrawerHide = () => {
269
- if ($q.screen.gt.sm) {
270
- miniState.value = true;
271
- leftDrawerOpen.value = true;
272
- }
273
- };
274
- const debouncedToggleMiniState = debounce(toggleMiniState, 500);
275
- onClickOutside(drawerRef, () => toggleMiniState(true));
276
- onMounted(() => {
277
- if ($q.screen.gt.sm) {
278
- toggleMiniState(true);
279
- }
280
- });
281
- return (_ctx, _cache) => {
282
- const _component_q_btn = QBtn;
283
- const _component_q_toolbar = QToolbar;
284
- const _component_q_header = QHeader;
285
- const _component_q_footer = QFooter;
286
- const _component_router_view = resolveComponent("router-view");
287
- const _component_q_page_container = QPageContainer;
288
- const _component_q_layout = QLayout;
289
- return openBlock(), createBlock(_component_q_layout, { view: "lHh Lpr lFf" }, {
290
- default: withCtx(() => [
291
- withDirectives(createElementVNode("div", null, [
292
- createVNode(_component_q_header, null, {
293
- default: withCtx(() => [
294
- createVNode(_component_q_toolbar, null, {
295
- default: withCtx(() => [
296
- !miniState.value ? (openBlock(), createBlock(_component_q_btn, {
297
- key: 0,
298
- flat: "",
299
- dense: "",
300
- round: "",
301
- "aria-label": "Menu",
302
- icon: "i-mdi-menu",
303
- onClick: _cache[0] || (_cache[0] = ($event) => toggleLeftDrawer())
304
- })) : createCommentVNode("", true),
305
- renderSlot(_ctx.$slots, "header-toolbar")
306
- ]),
307
- _: 3
308
- })
309
- ]),
310
- _: 3
311
- }),
312
- createVNode(unref(QDrawer), {
313
- ref_key: "drawerRef",
314
- ref: drawerRef,
315
- "model-value": leftDrawerOpen.value,
316
- width: drawerWidth.value,
317
- "mini-width": 80,
318
- mini: miniState.value,
319
- "show-if-above": "",
320
- bordered: "",
321
- onHide: onDrawerHide,
322
- "onUpdate:modelValue": toggleLeftDrawer,
323
- onMouseleave: _cache[2] || (_cache[2] = ($event) => unref(debouncedToggleMiniState)(true))
324
- }, {
325
- mini: withCtx(() => [
326
- createElementVNode("div", {
327
- class: normalizeClass({
328
- column: true,
329
- "items-center": miniState.value,
330
- "pr-0": true
331
- })
332
- }, [
333
- createVNode(_component_q_btn, {
334
- flat: "",
335
- dense: "",
336
- round: "",
337
- "aria-label": "Menu",
338
- icon: "i-mdi-menu",
339
- class: "q-mb-md",
340
- onClick: _cache[1] || (_cache[1] = ($event) => toggleLeftDrawer())
341
- }),
342
- createElementVNode("div", _hoisted_1, [
343
- renderSlot(_ctx.$slots, "fabs", { showSticky: false })
344
- ]),
345
- renderSlot(_ctx.$slots, "drawer-mini-navigation")
346
- ], 2)
347
- ]),
348
- default: withCtx(() => [
349
- renderSlot(_ctx.$slots, "drawer")
350
- ]),
351
- _: 3
352
- }, 8, ["model-value", "width", "mini"]),
353
- createVNode(_component_q_footer, { class: "h-80px lt-md" }, {
354
- default: withCtx(() => [
355
- renderSlot(_ctx.$slots, "footer")
356
- ]),
357
- _: 3
358
- }),
359
- createVNode(_component_q_page_container, null, {
360
- default: withCtx(() => [
361
- createVNode(_component_router_view),
362
- renderSlot(_ctx.$slots, "fabs", { showSticky: true })
363
- ]),
364
- _: 3
365
- })
366
- ], 512), [
367
- [vShow, __props.ready]
368
- ])
369
- ]),
370
- _: 3
371
- });
372
- };
373
- }
271
+ //#endregion
272
+ //#region src/ui/md3/Md3Layout.vue
273
+ var Md3Layout_default = /* @__PURE__ */ defineComponent({
274
+ __name: "Md3Layout",
275
+ props: { ready: {
276
+ type: Boolean,
277
+ default: true
278
+ } },
279
+ setup(__props) {
280
+ const $q = useQuasar();
281
+ const drawerRef = ref();
282
+ const leftDrawerOpen = ref(false);
283
+ const miniState = ref(false);
284
+ const drawerWidth = computed(() => {
285
+ return $q.screen.lt.sm ? 300 : 360;
286
+ });
287
+ watch(() => $q.screen.height, () => {
288
+ toggleLeftDrawer(false);
289
+ if ($q.screen.gt.sm) miniState.value = true;
290
+ else miniState.value = false;
291
+ });
292
+ const toggleLeftDrawer = (val) => {
293
+ leftDrawerOpen.value = val ?? $q.screen.gt.sm;
294
+ if ($q.screen.gt.sm) {
295
+ leftDrawerOpen.value = val ?? $q.screen.gt.sm;
296
+ miniState.value = !miniState.value;
297
+ } else {
298
+ leftDrawerOpen.value = val ?? !leftDrawerOpen.value;
299
+ miniState.value = false;
300
+ }
301
+ };
302
+ const toggleMiniState = (val) => {
303
+ if ($q.screen.gt.sm) {
304
+ leftDrawerOpen.value = true;
305
+ miniState.value = val ?? !miniState.value;
306
+ }
307
+ };
308
+ const onDrawerHide = () => {
309
+ if ($q.screen.gt.sm) {
310
+ miniState.value = true;
311
+ leftDrawerOpen.value = true;
312
+ }
313
+ };
314
+ const debouncedToggleMiniState = debounce(toggleMiniState, 500);
315
+ onClickOutside(drawerRef, () => toggleMiniState(true));
316
+ onMounted(() => {
317
+ if ($q.screen.gt.sm) toggleMiniState(true);
318
+ });
319
+ return (_ctx, _cache) => {
320
+ const _component_q_btn = QBtn;
321
+ const _component_q_toolbar = QToolbar;
322
+ const _component_q_header = QHeader;
323
+ const _component_q_footer = QFooter;
324
+ const _component_router_view = resolveComponent("router-view");
325
+ const _component_q_page_container = QPageContainer;
326
+ const _component_q_layout = QLayout;
327
+ return openBlock(), createBlock(_component_q_layout, { view: "lHh Lpr lFf" }, {
328
+ default: withCtx(() => [withDirectives(createElementVNode("div", null, [
329
+ createVNode(_component_q_header, null, {
330
+ default: withCtx(() => [createVNode(_component_q_toolbar, null, {
331
+ default: withCtx(() => [!miniState.value ? (openBlock(), createBlock(_component_q_btn, {
332
+ key: 0,
333
+ flat: "",
334
+ dense: "",
335
+ round: "",
336
+ "aria-label": "Menu",
337
+ icon: "i-mdi-menu",
338
+ onClick: _cache[0] || (_cache[0] = ($event) => toggleLeftDrawer())
339
+ })) : createCommentVNode("", true), renderSlot(_ctx.$slots, "header-toolbar")]),
340
+ _: 3
341
+ })]),
342
+ _: 3
343
+ }),
344
+ createVNode(unref(QDrawer), {
345
+ ref_key: "drawerRef",
346
+ ref: drawerRef,
347
+ "model-value": leftDrawerOpen.value,
348
+ width: drawerWidth.value,
349
+ "mini-width": 80,
350
+ mini: miniState.value,
351
+ "show-if-above": "",
352
+ bordered: "",
353
+ onHide: onDrawerHide,
354
+ "onUpdate:modelValue": toggleLeftDrawer,
355
+ onMouseleave: _cache[2] || (_cache[2] = ($event) => unref(debouncedToggleMiniState)(true))
356
+ }, {
357
+ mini: withCtx(() => [createElementVNode("div", { class: normalizeClass({
358
+ column: true,
359
+ "items-center": miniState.value,
360
+ "pr-0": true
361
+ }) }, [
362
+ createVNode(_component_q_btn, {
363
+ flat: "",
364
+ dense: "",
365
+ round: "",
366
+ "aria-label": "Menu",
367
+ icon: "i-mdi-menu",
368
+ class: "q-mb-md",
369
+ onClick: _cache[1] || (_cache[1] = ($event) => toggleLeftDrawer())
370
+ }),
371
+ createElementVNode("div", _hoisted_1, [renderSlot(_ctx.$slots, "fabs", { showSticky: false })]),
372
+ renderSlot(_ctx.$slots, "drawer-mini-navigation")
373
+ ], 2)]),
374
+ default: withCtx(() => [renderSlot(_ctx.$slots, "drawer")]),
375
+ _: 3
376
+ }, 8, [
377
+ "model-value",
378
+ "width",
379
+ "mini"
380
+ ]),
381
+ createVNode(_component_q_footer, { class: "h-80px lt-md" }, {
382
+ default: withCtx(() => [renderSlot(_ctx.$slots, "footer")]),
383
+ _: 3
384
+ }),
385
+ createVNode(_component_q_page_container, null, {
386
+ default: withCtx(() => [createVNode(_component_router_view), renderSlot(_ctx.$slots, "fabs", { showSticky: true })]),
387
+ _: 3
388
+ })
389
+ ], 512), [[vShow, __props.ready]])]),
390
+ _: 3
391
+ });
392
+ };
393
+ }
374
394
  });
375
- const lang$1 = {
376
- isoName: "en-US"
377
- };
378
- const enUS = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
379
- __proto__: null,
380
- default: lang$1
381
- }, Symbol.toStringTag, { value: "Module" }));
382
- const lang = ref(lang$1);
383
- const locales = /* @__PURE__ */ Object.assign({
384
- "./en-US.ts": () => Promise.resolve().then(() => enUS),
385
- "./nl.ts": () => import("./nl-NLgZUAKl.js")
395
+ //#endregion
396
+ //#region src/ui/md3/lang/en-US.ts
397
+ var en_US_exports = /* @__PURE__ */ __exportAll({ default: () => lang$1 });
398
+ var lang$1 = { isoName: "en-US" };
399
+ //#endregion
400
+ //#region src/ui/md3/lang/index.ts
401
+ var lang = ref(lang$1);
402
+ var locales = /* @__PURE__ */ Object.assign({
403
+ "./en-US.ts": () => Promise.resolve().then(() => en_US_exports),
404
+ "./nl.ts": () => import("./nl-ZpgX9FUw.js")
386
405
  });
387
- const useLang = () => {
388
- return lang;
389
- };
390
- let loadingLanguage = false;
391
- const loadLang = async (isoName) => {
392
- if (!loadingLanguage) {
393
- loadingLanguage = true;
394
- try {
395
- const data = (await locales[`./${isoName}.ts`]()).default;
396
- if (data) {
397
- lang.value = data;
398
- }
399
- } catch (e) {
400
- throw new Error(
401
- `[quasar-components] Failed to load ${isoName} language file.`
402
- );
403
- }
404
- loadingLanguage = false;
405
- }
406
+ var useLang = () => {
407
+ return lang;
406
408
  };
407
- export {
408
- _sfc_main as Md3Layout,
409
- _sfc_main$1 as NavigationRailFabs,
410
- loadLang,
411
- useLang
409
+ var loadingLanguage = false;
410
+ var loadLang = async (isoName) => {
411
+ if (!loadingLanguage) {
412
+ loadingLanguage = true;
413
+ try {
414
+ const data = (await locales[`./${isoName}.ts`]()).default;
415
+ if (data) lang.value = data;
416
+ } catch (e) {
417
+ throw new Error(`[quasar-components] Failed to load ${isoName} language file.`);
418
+ }
419
+ loadingLanguage = false;
420
+ }
412
421
  };
422
+ //#endregion
423
+ export { Md3Layout_default as Md3Layout, NavigationRailFabs_default as NavigationRailFabs, loadLang, useLang };