@quidgest/ui 0.14.12 → 0.14.14

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 (210) hide show
  1. package/dist/manifest/components.json +3 -0
  2. package/dist/ui.css +1726 -211
  3. package/dist/ui.esm.js +11110 -1888
  4. package/dist/ui.js +21 -21
  5. package/dist/ui.min.css +1 -1
  6. package/dist/ui.min.js +1212 -255
  7. package/dist/ui.scss +278 -85
  8. package/esm/components/QBadge/QBadge.d.ts +2 -1
  9. package/esm/components/QBadge/QBadge.d.ts.map +1 -1
  10. package/esm/components/QBadge/QBadge.vue.js +75 -66
  11. package/esm/components/QBadge/index.d.ts +3 -0
  12. package/esm/components/QBadge/index.d.ts.map +1 -1
  13. package/esm/components/QBadge/types.d.ts +7 -0
  14. package/esm/components/QBadge/types.d.ts.map +1 -1
  15. package/esm/components/QBadge/types.js +5 -2
  16. package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts +22 -0
  17. package/esm/components/QBadgeIndicator/QBadgeIndicator.d.ts.map +1 -0
  18. package/esm/components/QBadgeIndicator/QBadgeIndicator.vue.js +43 -0
  19. package/esm/components/QBadgeIndicator/QBadgeIndicator.vue2.js +4 -0
  20. package/esm/components/QBadgeIndicator/index.d.ts +28 -0
  21. package/esm/components/QBadgeIndicator/index.d.ts.map +1 -0
  22. package/esm/components/QBadgeIndicator/index.js +6 -0
  23. package/esm/components/QBadgeIndicator/types.d.ts +19 -0
  24. package/esm/components/QBadgeIndicator/types.d.ts.map +1 -0
  25. package/esm/components/QCombobox/QCombobox.d.ts +32 -4
  26. package/esm/components/QCombobox/QCombobox.d.ts.map +1 -1
  27. package/esm/components/QCombobox/index.d.ts +56 -7
  28. package/esm/components/QCombobox/index.d.ts.map +1 -1
  29. package/esm/components/QDateTimePicker/QDateTimePicker.d.ts +36 -0
  30. package/esm/components/QDateTimePicker/QDateTimePicker.d.ts.map +1 -0
  31. package/esm/components/QDateTimePicker/QDateTimePicker.vue.js +168 -0
  32. package/esm/components/QDateTimePicker/QDateTimePicker.vue2.js +4 -0
  33. package/esm/components/QDateTimePicker/index.d.ts +54 -0
  34. package/esm/components/QDateTimePicker/index.d.ts.map +1 -0
  35. package/esm/components/QDateTimePicker/index.js +6 -0
  36. package/esm/components/QDateTimePicker/types.d.ts +93 -0
  37. package/esm/components/QDateTimePicker/types.d.ts.map +1 -0
  38. package/esm/components/QDateTimePicker/types.js +15 -0
  39. package/esm/components/QFileUpload/QFileUpload.d.ts +37 -0
  40. package/esm/components/QFileUpload/QFileUpload.d.ts.map +1 -0
  41. package/esm/components/QFileUpload/QFileUpload.vue.js +238 -0
  42. package/esm/components/QFileUpload/QFileUpload.vue2.js +4 -0
  43. package/esm/components/QFileUpload/index.d.ts +52 -0
  44. package/esm/components/QFileUpload/index.d.ts.map +1 -0
  45. package/esm/components/QFileUpload/index.js +6 -0
  46. package/esm/components/QFileUpload/types.d.ts +69 -0
  47. package/esm/components/QFileUpload/types.d.ts.map +1 -0
  48. package/esm/components/QFileUpload/types.js +28 -0
  49. package/esm/components/QOverlay/QOverlay.d.ts.map +1 -1
  50. package/esm/components/QOverlay/QOverlay.vue.js +64 -64
  51. package/esm/components/QTextField/QTextField.d.ts +3 -0
  52. package/esm/components/QTextField/QTextField.d.ts.map +1 -1
  53. package/esm/components/QTextField/QTextField.vue.js +51 -39
  54. package/esm/components/QTextField/index.d.ts +7 -0
  55. package/esm/components/QTextField/index.d.ts.map +1 -1
  56. package/esm/components/QTextField/types.d.ts +11 -0
  57. package/esm/components/QTextField/types.d.ts.map +1 -1
  58. package/esm/components/QTooltip/QTooltip.d.ts.map +1 -1
  59. package/esm/components/QTooltip/QTooltip.vue.js +50 -29
  60. package/esm/components/index.d.ts +3 -0
  61. package/esm/components/index.d.ts.map +1 -1
  62. package/esm/components/index.js +62 -56
  63. package/esm/composables/maska.d.ts +28 -0
  64. package/esm/composables/maska.d.ts.map +1 -0
  65. package/esm/composables/maska.js +26 -0
  66. package/esm/composables/useDropZone/index.d.ts +38 -0
  67. package/esm/composables/useDropZone/index.d.ts.map +1 -0
  68. package/esm/composables/useDropZone/index.js +62 -0
  69. package/esm/index.d.ts +3 -0
  70. package/esm/utils/color.js +57 -27
  71. package/esm/utils/date/date.d.ts +9 -0
  72. package/esm/utils/date/date.d.ts.map +1 -0
  73. package/esm/utils/date/date.js +91 -0
  74. package/esm/utils/date/index.d.ts +4 -0
  75. package/esm/utils/date/index.d.ts.map +1 -0
  76. package/esm/utils/date/tokens.d.ts +49 -0
  77. package/esm/utils/date/tokens.d.ts.map +1 -0
  78. package/esm/utils/date/tokens.js +243 -0
  79. package/esm/utils/download.d.ts +7 -0
  80. package/esm/utils/download.d.ts.map +1 -0
  81. package/esm/utils/download.js +16 -0
  82. package/esm/utils/string.d.ts.map +1 -1
  83. package/esm/utils/string.js +5 -2
  84. package/esm/utils/time.d.ts +36 -0
  85. package/esm/utils/time.d.ts.map +1 -0
  86. package/esm/utils/time.js +14 -0
  87. package/esm/vendors/@vuepic/vue-datepicker/dist/vue-datepicker.js +5148 -0
  88. package/esm/vendors/date-fns/_lib/addLeadingZeros.js +7 -0
  89. package/esm/vendors/date-fns/_lib/defaultOptions.js +7 -0
  90. package/esm/vendors/date-fns/_lib/format/formatters.js +583 -0
  91. package/esm/vendors/date-fns/_lib/format/lightFormatters.js +59 -0
  92. package/esm/vendors/date-fns/_lib/format/longFormatters.js +52 -0
  93. package/esm/vendors/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +18 -0
  94. package/esm/vendors/date-fns/_lib/normalizeDates.js +11 -0
  95. package/esm/vendors/date-fns/_lib/normalizeInterval.js +8 -0
  96. package/esm/vendors/date-fns/_lib/protectedTokens.js +20 -0
  97. package/esm/vendors/date-fns/add.js +20 -0
  98. package/esm/vendors/date-fns/addDays.js +10 -0
  99. package/esm/vendors/date-fns/addHours.js +9 -0
  100. package/esm/vendors/date-fns/addMilliseconds.js +9 -0
  101. package/esm/vendors/date-fns/addMonths.js +20 -0
  102. package/esm/vendors/date-fns/addQuarters.js +8 -0
  103. package/esm/vendors/date-fns/addYears.js +8 -0
  104. package/esm/vendors/date-fns/compareAsc.js +9 -0
  105. package/esm/vendors/date-fns/constants.js +9 -0
  106. package/esm/vendors/date-fns/constructFrom.js +8 -0
  107. package/esm/vendors/date-fns/differenceInCalendarDays.js +16 -0
  108. package/esm/vendors/date-fns/differenceInCalendarYears.js +13 -0
  109. package/esm/vendors/date-fns/differenceInYears.js +17 -0
  110. package/esm/vendors/date-fns/eachDayOfInterval.js +17 -0
  111. package/esm/vendors/date-fns/eachQuarterOfInterval.js +18 -0
  112. package/esm/vendors/date-fns/endOfQuarter.js +9 -0
  113. package/esm/vendors/date-fns/endOfWeek.js +11 -0
  114. package/esm/vendors/date-fns/endOfYear.js +9 -0
  115. package/esm/vendors/date-fns/format.js +59 -0
  116. package/esm/vendors/date-fns/getDay.js +8 -0
  117. package/esm/vendors/date-fns/getDayOfYear.js +11 -0
  118. package/esm/vendors/date-fns/getDaysInMonth.js +10 -0
  119. package/esm/vendors/date-fns/getDefaultOptions.js +8 -0
  120. package/esm/vendors/date-fns/getHours.js +8 -0
  121. package/esm/vendors/date-fns/getISODay.js +9 -0
  122. package/esm/vendors/date-fns/getISOWeek.js +12 -0
  123. package/esm/vendors/date-fns/getISOWeekYear.js +15 -0
  124. package/esm/vendors/date-fns/getMinutes.js +8 -0
  125. package/esm/vendors/date-fns/getMonth.js +8 -0
  126. package/esm/vendors/date-fns/getQuarter.js +9 -0
  127. package/esm/vendors/date-fns/getSeconds.js +8 -0
  128. package/esm/vendors/date-fns/getWeek.js +12 -0
  129. package/esm/vendors/date-fns/getWeekYear.js +17 -0
  130. package/esm/vendors/date-fns/getYear.js +8 -0
  131. package/esm/vendors/date-fns/isAfter.js +8 -0
  132. package/esm/vendors/date-fns/isBefore.js +8 -0
  133. package/esm/vendors/date-fns/isDate.js +7 -0
  134. package/esm/vendors/date-fns/isEqual.js +8 -0
  135. package/esm/vendors/date-fns/isSameQuarter.js +14 -0
  136. package/esm/vendors/date-fns/isValid.js +9 -0
  137. package/esm/vendors/date-fns/locale/_lib/buildFormatLongFn.js +9 -0
  138. package/esm/vendors/date-fns/locale/_lib/buildLocalizeFn.js +18 -0
  139. package/esm/vendors/date-fns/locale/_lib/buildMatchFn.js +31 -0
  140. package/esm/vendors/date-fns/locale/_lib/buildMatchPatternFn.js +15 -0
  141. package/esm/vendors/date-fns/locale/en-US/_lib/formatDistance.js +70 -0
  142. package/esm/vendors/date-fns/locale/en-US/_lib/formatLong.js +33 -0
  143. package/esm/vendors/date-fns/locale/en-US/_lib/formatRelative.js +11 -0
  144. package/esm/vendors/date-fns/locale/en-US/_lib/localize.js +155 -0
  145. package/esm/vendors/date-fns/locale/en-US/_lib/match.js +110 -0
  146. package/esm/vendors/date-fns/locale/en-US.js +21 -0
  147. package/esm/vendors/date-fns/parse/_lib/Parser.js +22 -0
  148. package/esm/vendors/date-fns/parse/_lib/Setter.js +41 -0
  149. package/esm/vendors/date-fns/parse/_lib/constants.js +49 -0
  150. package/esm/vendors/date-fns/parse/_lib/parsers/AMPMMidnightParser.js +49 -0
  151. package/esm/vendors/date-fns/parse/_lib/parsers/AMPMParser.js +49 -0
  152. package/esm/vendors/date-fns/parse/_lib/parsers/DateParser.js +61 -0
  153. package/esm/vendors/date-fns/parse/_lib/parsers/DayOfYearParser.js +51 -0
  154. package/esm/vendors/date-fns/parse/_lib/parsers/DayParser.js +49 -0
  155. package/esm/vendors/date-fns/parse/_lib/parsers/DayPeriodParser.js +49 -0
  156. package/esm/vendors/date-fns/parse/_lib/parsers/EraParser.js +33 -0
  157. package/esm/vendors/date-fns/parse/_lib/parsers/ExtendedYearParser.js +21 -0
  158. package/esm/vendors/date-fns/parse/_lib/parsers/FractionOfSecondParser.js +22 -0
  159. package/esm/vendors/date-fns/parse/_lib/parsers/Hour0To11Parser.js +32 -0
  160. package/esm/vendors/date-fns/parse/_lib/parsers/Hour0to23Parser.js +32 -0
  161. package/esm/vendors/date-fns/parse/_lib/parsers/Hour1To24Parser.js +33 -0
  162. package/esm/vendors/date-fns/parse/_lib/parsers/Hour1to12Parser.js +33 -0
  163. package/esm/vendors/date-fns/parse/_lib/parsers/ISODayParser.js +105 -0
  164. package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneParser.js +48 -0
  165. package/esm/vendors/date-fns/parse/_lib/parsers/ISOTimezoneWithZParser.js +48 -0
  166. package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekParser.js +49 -0
  167. package/esm/vendors/date-fns/parse/_lib/parsers/ISOWeekYearParser.js +40 -0
  168. package/esm/vendors/date-fns/parse/_lib/parsers/LocalDayParser.js +80 -0
  169. package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekParser.js +48 -0
  170. package/esm/vendors/date-fns/parse/_lib/parsers/LocalWeekYearParser.js +69 -0
  171. package/esm/vendors/date-fns/parse/_lib/parsers/MinuteParser.js +32 -0
  172. package/esm/vendors/date-fns/parse/_lib/parsers/MonthParser.js +77 -0
  173. package/esm/vendors/date-fns/parse/_lib/parsers/QuarterParser.js +75 -0
  174. package/esm/vendors/date-fns/parse/_lib/parsers/SecondParser.js +32 -0
  175. package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneLocalDayParser.js +80 -0
  176. package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneMonthParser.js +77 -0
  177. package/esm/vendors/date-fns/parse/_lib/parsers/StandAloneQuarterParser.js +75 -0
  178. package/esm/vendors/date-fns/parse/_lib/parsers/TimestampMillisecondsParser.js +22 -0
  179. package/esm/vendors/date-fns/parse/_lib/parsers/TimestampSecondsParser.js +22 -0
  180. package/esm/vendors/date-fns/parse/_lib/parsers/YearParser.js +49 -0
  181. package/esm/vendors/date-fns/parse/_lib/parsers.js +67 -0
  182. package/esm/vendors/date-fns/parse/_lib/utils.js +103 -0
  183. package/esm/vendors/date-fns/parse.js +89 -0
  184. package/esm/vendors/date-fns/set.js +11 -0
  185. package/esm/vendors/date-fns/setDay.js +12 -0
  186. package/esm/vendors/date-fns/setHours.js +9 -0
  187. package/esm/vendors/date-fns/setISODay.js +11 -0
  188. package/esm/vendors/date-fns/setISOWeek.js +10 -0
  189. package/esm/vendors/date-fns/setMilliseconds.js +9 -0
  190. package/esm/vendors/date-fns/setMinutes.js +9 -0
  191. package/esm/vendors/date-fns/setMonth.js +13 -0
  192. package/esm/vendors/date-fns/setSeconds.js +9 -0
  193. package/esm/vendors/date-fns/setWeek.js +10 -0
  194. package/esm/vendors/date-fns/setYear.js +10 -0
  195. package/esm/vendors/date-fns/startOfDay.js +9 -0
  196. package/esm/vendors/date-fns/startOfISOWeek.js +8 -0
  197. package/esm/vendors/date-fns/startOfISOWeekYear.js +11 -0
  198. package/esm/vendors/date-fns/startOfMonth.js +9 -0
  199. package/esm/vendors/date-fns/startOfQuarter.js +9 -0
  200. package/esm/vendors/date-fns/startOfWeek.js +11 -0
  201. package/esm/vendors/date-fns/startOfWeekYear.js +13 -0
  202. package/esm/vendors/date-fns/startOfYear.js +9 -0
  203. package/esm/vendors/date-fns/sub.js +19 -0
  204. package/esm/vendors/date-fns/subDays.js +8 -0
  205. package/esm/vendors/date-fns/subMonths.js +8 -0
  206. package/esm/vendors/date-fns/subYears.js +8 -0
  207. package/esm/vendors/date-fns/toDate.js +8 -0
  208. package/esm/vendors/date-fns/transpose.js +18 -0
  209. package/esm/vendors/maska/dist/maska.js +179 -0
  210. package/package.json +5 -1
@@ -0,0 +1,93 @@
1
+ import { QFieldSize } from '../QField';
2
+ export type QDateTimePickerProps = {
3
+ /**
4
+ * The field unique identifier.
5
+ */
6
+ id?: string;
7
+ /**
8
+ * The label of the input.
9
+ */
10
+ label?: string;
11
+ /**
12
+ * The size category of the field.
13
+ */
14
+ size?: QFieldSize;
15
+ /**
16
+ * If set to true, the control is read-only.
17
+ */
18
+ readonly?: boolean;
19
+ /**
20
+ * If set to true, the control is disabled.
21
+ */
22
+ disabled?: boolean;
23
+ /**
24
+ * If set to true, an asterisk (*) is displayed
25
+ * to indicate that the field is required.
26
+ */
27
+ required?: boolean;
28
+ /**
29
+ * The format prop determines the display format of the date and time in the picker.
30
+ * It defines how the selected date and time will be shown to the user.
31
+ *
32
+ * The format follows a pattern similar to the Intl.DateTimeFormat or date-fns formatting conventions.
33
+ * Common examples include:
34
+ *
35
+ * - dd/MM/yyyy: Day, Month, Year (e.g., "06/02/2025")
36
+ * - MM/dd/yyyy: Month, Day, Year (e.g., "02/06/2025")
37
+ * - yyyy-MM-dd: ISO 8601 format (e.g., "2025-02-06")
38
+ * - hh:mm a: 12-hour format with AM/PM (e.g., "08:45 PM")
39
+ * - HH:mm:ss: 24-hour format with seconds (e.g., "20:45:30")
40
+ *
41
+ * @type {string}
42
+ * @default 'yyyy-MM-dd' (ISO format)
43
+ * @example 'dd/MM/yyyy'
44
+ * @example 'hh:mm a'
45
+ */
46
+ format?: string;
47
+ /**
48
+ * The minimum time allowed in HH:mm format.
49
+ */
50
+ minTime?: string;
51
+ /**
52
+ * The maximum time allowed in HH:mm format.
53
+ */
54
+ maxTime?: string;
55
+ /**
56
+ * The datepicker locale.
57
+ * Datepicker will use built in javascript locale formatter to extract month and weekday names.
58
+ * https://vue3datepicker.com/props/localization/#locale
59
+ */
60
+ locale?: string;
61
+ /**
62
+ * The placeholder text for the control.
63
+ */
64
+ placeholder?: string;
65
+ /**
66
+ * Whether to disable teleport.
67
+ */
68
+ inline?: boolean;
69
+ /**
70
+ * Custom set of classes to apply to the component.
71
+ */
72
+ class?: string | unknown[];
73
+ /**
74
+ * Custom icon configurations.
75
+ */
76
+ icons?: typeof DEFAULT_ICONS;
77
+ /**
78
+ * Custom text configurations.
79
+ */
80
+ texts?: typeof DEFAULT_TEXTS;
81
+ };
82
+ export declare const DEFAULT_ICONS: {
83
+ calendar: {
84
+ icon: string;
85
+ };
86
+ clock: {
87
+ icon: string;
88
+ };
89
+ };
90
+ export declare const DEFAULT_TEXTS: {
91
+ clearValue: string;
92
+ };
93
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QDateTimePicker/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAGrD,MAAM,MAAM,oBAAoB,GAAG;IAClC;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,UAAU,CAAA;IAEjB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAA;IAEhB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAA;IAEf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAA;IAEpB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAA;IAEhB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,aAAa;;;;;;;CAOM,CAAA;AAGhC,eAAO,MAAM,aAAa;;CAEQ,CAAA"}
@@ -0,0 +1,15 @@
1
+ import { DEFAULT_TEXTS as c } from "../__internal__/QClearButton/types.js";
2
+ const o = {
3
+ calendar: {
4
+ icon: "calendar"
5
+ },
6
+ clock: {
7
+ icon: "clock"
8
+ }
9
+ }, E = {
10
+ ...c
11
+ };
12
+ export {
13
+ o as DEFAULT_ICONS,
14
+ E as DEFAULT_TEXTS
15
+ };
@@ -0,0 +1,37 @@
1
+ import { DEFAULT_ICONS, DEFAULT_TEXTS, QFileUploadProps } from './types';
2
+ type __VLS_Props = QFileUploadProps;
3
+ type __VLS_PublicProps = {
4
+ modelValue?: File;
5
+ } & __VLS_Props;
6
+ declare function __VLS_template(): {
7
+ attrs: Partial<{}>;
8
+ slots: {
9
+ extras?(_: {}): any;
10
+ };
11
+ refs: {
12
+ dropZoneRef: HTMLDivElement;
13
+ fileInput: HTMLInputElement;
14
+ };
15
+ rootEl: any;
16
+ };
17
+ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
18
+ declare const __VLS_component: import('vue').DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
19
+ "update:modelValue": (value: File) => any;
20
+ }, string, import('vue').PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
21
+ "onUpdate:modelValue"?: ((value: File) => any) | undefined;
22
+ }>, {
23
+ size: "large" | "xlarge" | "xxlarge" | "block";
24
+ icons: typeof DEFAULT_ICONS;
25
+ texts: typeof DEFAULT_TEXTS;
26
+ }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
27
+ dropZoneRef: HTMLDivElement;
28
+ fileInput: HTMLInputElement;
29
+ }, any>;
30
+ declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
31
+ export default _default;
32
+ type __VLS_WithTemplateSlots<T, S> = T & {
33
+ new (): {
34
+ $slots: S;
35
+ };
36
+ };
37
+ //# sourceMappingURL=QFileUpload.vue.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QFileUpload.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QFileUpload/QFileUpload.vue"],"names":[],"mappings":"AAwFA;AAkOC,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAYtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAM/C,KAAK,WAAW,GAAG,gBAAgB,CAAC;AA2HrC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,IAAI,CAAC;CACjB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAoOT,OAAO,IAA6B;;wBAbrB,GAAG;;;;;;;EAkB/B;AAyBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
@@ -0,0 +1,238 @@
1
+ import { defineComponent as L, mergeModels as N, useModel as O, computed as d, ref as h, watch as T, createBlock as w, openBlock as n, unref as i, createSlots as Z, withCtx as _, createElementVNode as a, normalizeClass as Q, createElementBlock as c, mergeProps as F, createVNode as s, normalizeProps as m, guardReactiveProps as v, toDisplayString as y, createCommentVNode as j, createTextVNode as M, renderSlot as P } from "vue";
2
+ import { DEFAULT_TEXTS as $, DEFAULT_ICONS as H } from "./types.js";
3
+ import { QButton as b } from "../QButton/index.js";
4
+ import { QField as W } from "../QField/index.js";
5
+ import { QIcon as u } from "../QIcon/index.js";
6
+ import { useId as X } from "../../composables/uid.js";
7
+ import { useDropZone as G } from "../../composables/useDropZone/index.js";
8
+ import { downloadFile as J } from "../../utils/download.js";
9
+ const K = ["id", "accept", "required", "readonly", "disabled"], Y = {
10
+ key: 0,
11
+ class: "q-file-input__drop-area"
12
+ }, ee = {
13
+ key: 1,
14
+ class: "q-file-input__file-details"
15
+ }, le = { class: "q-file-input__attached-file" }, te = {
16
+ key: 0,
17
+ class: "q-file-input__preview q-file-input__image-preview"
18
+ }, ie = ["src", "alt"], oe = { class: "q-file-input__file-meta" }, ae = { class: "q-file-input__file-name" }, ne = { class: "q-file-input__file-type" }, se = {
19
+ key: 0,
20
+ class: "q-file-input__action-buttons"
21
+ }, re = {
22
+ key: 2,
23
+ class: "q-file-input__empty-container"
24
+ }, ye = /* @__PURE__ */ L({
25
+ inheritAttrs: !1,
26
+ __name: "QFileUpload",
27
+ props: /* @__PURE__ */ N({
28
+ id: {},
29
+ label: {},
30
+ size: { default: "large" },
31
+ readonly: { type: Boolean },
32
+ disabled: { type: Boolean },
33
+ required: { type: Boolean },
34
+ accept: {},
35
+ class: {},
36
+ icons: { default: () => H },
37
+ texts: { default: () => $ }
38
+ }, {
39
+ modelValue: {},
40
+ modelModifiers: {}
41
+ }),
42
+ emits: ["update:modelValue"],
43
+ setup(q) {
44
+ const e = q, t = O(q, "modelValue"), k = X(e.id), p = d(() => !e.readonly && !e.disabled), r = h(null);
45
+ T(t, (l) => {
46
+ r.value && URL.revokeObjectURL(r.value);
47
+ const o = l && l.type.startsWith("image/");
48
+ r.value = o ? URL.createObjectURL(l) : null;
49
+ });
50
+ const f = h(null);
51
+ function U() {
52
+ var l;
53
+ (l = f.value) == null || l.click();
54
+ }
55
+ function V(l) {
56
+ var C;
57
+ const o = l.target;
58
+ (C = o == null ? void 0 : o.files) != null && C[0] && (t.value = o.files[0]);
59
+ }
60
+ function B() {
61
+ t.value && J(t.value);
62
+ }
63
+ function D() {
64
+ t.value = void 0, f.value && (f.value.value = "");
65
+ }
66
+ function I(l) {
67
+ if (!p.value) return;
68
+ const o = l == null ? void 0 : l[0];
69
+ o && (t.value = o);
70
+ }
71
+ const g = h(null), x = d(() => Array.isArray(e.accept) ? e.accept : e.accept ? e.accept.split(",").map((l) => l.trim()) : []), R = d(() => {
72
+ var l;
73
+ return (l = x.value) == null ? void 0 : l.join(",");
74
+ }), S = d(() => p.value && !t.value), { isOverDropZone: z, isValid: A } = G(g, {
75
+ onDrop: I,
76
+ accept: x,
77
+ enabled: S
78
+ }), E = d(() => [
79
+ "q-field__control",
80
+ "q-file-input",
81
+ {
82
+ "q-file-input--highlighted": z.value && A.value
83
+ },
84
+ e.class
85
+ ]);
86
+ return (l, o) => (n(), w(i(W), {
87
+ for: i(k),
88
+ label: e.label,
89
+ size: e.size,
90
+ readonly: e.readonly,
91
+ disabled: e.disabled,
92
+ required: e.required
93
+ }, Z({
94
+ control: _(() => [
95
+ a(
96
+ "div",
97
+ {
98
+ ref_key: "dropZoneRef",
99
+ ref: g,
100
+ class: Q(E.value)
101
+ },
102
+ [
103
+ a("input", F({
104
+ ref_key: "fileInput",
105
+ ref: f,
106
+ id: i(k),
107
+ type: "file",
108
+ class: "q-file-input__file-input",
109
+ accept: R.value,
110
+ required: e.required,
111
+ readonly: e.readonly,
112
+ disabled: e.disabled,
113
+ onChange: V
114
+ }, l.$attrs), null, 16, K),
115
+ !t.value && p.value ? (n(), c("div", Y, [
116
+ s(
117
+ i(u),
118
+ m(v(e.icons.upload)),
119
+ null,
120
+ 16
121
+ /* FULL_PROPS */
122
+ ),
123
+ a(
124
+ "span",
125
+ null,
126
+ y(e.texts.dropHereOr),
127
+ 1
128
+ /* TEXT */
129
+ ),
130
+ s(i(b), {
131
+ label: e.texts.chooseFile,
132
+ onClick: U
133
+ }, null, 8, ["label"])
134
+ ])) : t.value ? (n(), c("div", ee, [
135
+ a("div", le, [
136
+ r.value ? (n(), c("div", te, [
137
+ a("img", {
138
+ src: r.value,
139
+ alt: e.texts.preview
140
+ }, null, 8, ie)
141
+ ])) : (n(), w(
142
+ i(u),
143
+ F({
144
+ key: 1,
145
+ class: "q-file-input__preview"
146
+ }, e.icons.file),
147
+ null,
148
+ 16
149
+ /* FULL_PROPS */
150
+ )),
151
+ a("div", oe, [
152
+ a(
153
+ "span",
154
+ ae,
155
+ y(t.value.name),
156
+ 1
157
+ /* TEXT */
158
+ ),
159
+ a(
160
+ "span",
161
+ ne,
162
+ y(t.value.type),
163
+ 1
164
+ /* TEXT */
165
+ )
166
+ ])
167
+ ]),
168
+ p.value ? (n(), c("div", se, [
169
+ s(i(b), {
170
+ onClick: B,
171
+ title: e.texts.download,
172
+ borderless: ""
173
+ }, {
174
+ default: _(() => [
175
+ s(
176
+ i(u),
177
+ m(v(e.icons.download)),
178
+ null,
179
+ 16
180
+ /* FULL_PROPS */
181
+ )
182
+ ]),
183
+ _: 1
184
+ /* STABLE */
185
+ }, 8, ["title"]),
186
+ s(i(b), {
187
+ onClick: D,
188
+ title: e.texts.remove,
189
+ borderless: ""
190
+ }, {
191
+ default: _(() => [
192
+ s(
193
+ i(u),
194
+ m(v(e.icons.remove)),
195
+ null,
196
+ 16
197
+ /* FULL_PROPS */
198
+ )
199
+ ]),
200
+ _: 1
201
+ /* STABLE */
202
+ }, 8, ["title"])
203
+ ])) : j("v-if", !0)
204
+ ])) : (n(), c("div", re, [
205
+ s(
206
+ i(u),
207
+ m(v(e.icons.empty)),
208
+ null,
209
+ 16
210
+ /* FULL_PROPS */
211
+ ),
212
+ M(
213
+ " " + y(e.texts.empty),
214
+ 1
215
+ /* TEXT */
216
+ )
217
+ ]))
218
+ ],
219
+ 2
220
+ /* CLASS */
221
+ )
222
+ ]),
223
+ _: 2
224
+ /* DYNAMIC */
225
+ }, [
226
+ l.$slots.extras ? {
227
+ name: "extras",
228
+ fn: _(() => [
229
+ P(l.$slots, "extras")
230
+ ]),
231
+ key: "0"
232
+ } : void 0
233
+ ]), 1032, ["for", "label", "size", "readonly", "disabled", "required"]));
234
+ }
235
+ });
236
+ export {
237
+ ye as default
238
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./QFileUpload.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,52 @@
1
+ import { QFileUploadProps } from './types';
2
+ declare const QFileUpload: {
3
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<{
4
+ modelValue?: File;
5
+ } & QFileUploadProps> & Readonly<{
6
+ "onUpdate:modelValue"?: ((value: File) => any) | undefined;
7
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
8
+ "update:modelValue": (value: File) => any;
9
+ }, import('vue').PublicProps, {
10
+ size: "large" | "xlarge" | "xxlarge" | "block";
11
+ icons: typeof import('./types').DEFAULT_ICONS;
12
+ texts: typeof import('./types').DEFAULT_TEXTS;
13
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
14
+ dropZoneRef: HTMLDivElement;
15
+ fileInput: HTMLInputElement;
16
+ }, any, import('vue').ComponentProvideOptions, {
17
+ P: {};
18
+ B: {};
19
+ D: {};
20
+ C: {};
21
+ M: {};
22
+ Defaults: {};
23
+ }, Readonly<{
24
+ modelValue?: File;
25
+ } & QFileUploadProps> & Readonly<{
26
+ "onUpdate:modelValue"?: ((value: File) => any) | undefined;
27
+ }>, {}, {}, {}, {}, {
28
+ size: "large" | "xlarge" | "xxlarge" | "block";
29
+ icons: typeof import('./types').DEFAULT_ICONS;
30
+ texts: typeof import('./types').DEFAULT_TEXTS;
31
+ }>;
32
+ __isFragment?: never;
33
+ __isTeleport?: never;
34
+ __isSuspense?: never;
35
+ } & import('vue').ComponentOptionsBase<Readonly<{
36
+ modelValue?: File;
37
+ } & QFileUploadProps> & Readonly<{
38
+ "onUpdate:modelValue"?: ((value: File) => any) | undefined;
39
+ }>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
40
+ "update:modelValue": (value: File) => any;
41
+ }, string, {
42
+ size: "large" | "xlarge" | "xxlarge" | "block";
43
+ icons: typeof import('./types').DEFAULT_ICONS;
44
+ texts: typeof import('./types').DEFAULT_TEXTS;
45
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
46
+ $slots: {
47
+ extras?(_: {}): any;
48
+ };
49
+ });
50
+ export { QFileUpload };
51
+ export type { QFileUploadProps };
52
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QFileUpload/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAA;AAK/C,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAAgC,CAAA;AAGjD,OAAO,EAAE,WAAW,EAAE,CAAA;AAGtB,YAAY,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,6 @@
1
+ import o from "./QFileUpload.vue.js";
2
+ import { setupPropsProxy as r } from "../../utils/setupPropsProxy.js";
3
+ const t = r(o);
4
+ export {
5
+ t as QFileUpload
6
+ };
@@ -0,0 +1,69 @@
1
+ export type QFileUploadProps = {
2
+ /**
3
+ * The field unique identifier.
4
+ */
5
+ id?: string;
6
+ /**
7
+ * The label of the input.
8
+ */
9
+ label?: string;
10
+ /**
11
+ * The size category of the field.
12
+ */
13
+ size?: 'large' | 'xlarge' | 'xxlarge' | 'block';
14
+ /**
15
+ * If set to true, the control is read-only.
16
+ */
17
+ readonly?: boolean;
18
+ /**
19
+ * If set to true, the control is disabled.
20
+ */
21
+ disabled?: boolean;
22
+ /**
23
+ * If set to true, an asterisk (*) is displayed
24
+ * to indicate that the field is required.
25
+ */
26
+ required?: boolean;
27
+ /**
28
+ * Specifies the accepted file types.
29
+ */
30
+ accept?: string | string[];
31
+ /**
32
+ * Custom set of classes to apply to the component.
33
+ */
34
+ class?: string | unknown[];
35
+ /**
36
+ * Custom icon configurations.
37
+ */
38
+ icons?: typeof DEFAULT_ICONS;
39
+ /**
40
+ * Custom text configurations.
41
+ */
42
+ texts?: typeof DEFAULT_TEXTS;
43
+ };
44
+ export declare const DEFAULT_ICONS: {
45
+ remove: {
46
+ icon: string;
47
+ };
48
+ download: {
49
+ icon: string;
50
+ };
51
+ upload: {
52
+ icon: string;
53
+ };
54
+ file: {
55
+ icon: string;
56
+ };
57
+ empty: {
58
+ icon: string;
59
+ };
60
+ };
61
+ export declare const DEFAULT_TEXTS: {
62
+ dropHereOr: string;
63
+ chooseFile: string;
64
+ preview: string;
65
+ download: string;
66
+ remove: string;
67
+ empty: string;
68
+ };
69
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/QFileUpload/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,gBAAgB,GAAG;IAC9B;;OAEG;IACH,EAAE,CAAC,EAAE,MAAM,CAAA;IAEX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAA;IAEd;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAA;IAE/C;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAA;IAElB;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAA;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,EAAE,CAAA;IAE1B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;IAE5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,aAAa,CAAA;CAC5B,CAAA;AAGD,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;CAgBM,CAAA;AAGhC,eAAO,MAAM,aAAa;;;;;;;CAOQ,CAAA"}
@@ -0,0 +1,28 @@
1
+ const e = {
2
+ remove: {
3
+ icon: "close"
4
+ },
5
+ download: {
6
+ icon: "download"
7
+ },
8
+ upload: {
9
+ icon: "upload"
10
+ },
11
+ file: {
12
+ icon: "file"
13
+ },
14
+ empty: {
15
+ icon: "diameter-variant"
16
+ }
17
+ }, o = {
18
+ dropHereOr: "Drop here or",
19
+ chooseFile: "Choose file",
20
+ preview: "Preview",
21
+ download: "Download attached file",
22
+ remove: "Remove attached file",
23
+ empty: "No document attached"
24
+ };
25
+ export {
26
+ e as DEFAULT_ICONS,
27
+ o as DEFAULT_TEXTS
28
+ };
@@ -1 +1 @@
1
- {"version":3,"file":"QOverlay.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/QOverlay.vue"],"names":[],"mappings":"AA2CA;AA0ZC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAmWlC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAgHT,OAAO,IAA6B;;yBAbpB,GAAG;;;;;;;EAkBhC;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
1
+ {"version":3,"file":"QOverlay.vue.d.ts","sourceRoot":"","sources":["../../../src/components/QOverlay/QOverlay.vue"],"names":[],"mappings":"AA4CA;AA2ZC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAA;AAM5C,KAAK,WAAW,GAAG,aAAa,CAAC;AAmWlC,KAAK,iBAAiB,GAAG;IACzB,UAAU,CAAC,EAAE,OAAO,CAAC;CACpB,GAAG,WAAW,CAAC;AAKhB,iBAAS,cAAc;WAgHT,OAAO,IAA6B;;yBAbpB,GAAG;;;;;;;EAkBhC;AAwBD,KAAK,oBAAoB,GAAG,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAC9D,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;OASnB,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAAnG,wBAAoG;AAapG,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IACxC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}