@vlrc-fe/components 2.2.0 → 2.3.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.
Files changed (215) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/DataTable/DataTable.d.ts.map +1 -1
  3. package/dist/DataTable/components/DataTableTable.d.ts.map +1 -1
  4. package/dist/Form/Form.d.ts.map +1 -1
  5. package/dist/Form/FormDatePicker/FormDatePicker.d.ts.map +1 -1
  6. package/dist/Form/FormDatePicker/RangeDatePicker.d.ts.map +1 -1
  7. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts +4 -3
  8. package/dist/Form/FormDatePicker/SingleDatePicker.d.ts.map +1 -1
  9. package/dist/Form/FormDatePicker/TimeInput.d.ts +3 -4
  10. package/dist/Form/FormDatePicker/TimeInput.d.ts.map +1 -1
  11. package/dist/Form/FormDatePicker/TimePicker.d.ts +3 -3
  12. package/dist/Form/FormDatePicker/TimePicker.d.ts.map +1 -1
  13. package/dist/Form/FormDatePicker/types.d.ts +1 -0
  14. package/dist/Form/FormDatePicker/types.d.ts.map +1 -1
  15. package/dist/Form/FormDatePicker/useFormDatePicker.d.ts +2 -2
  16. package/dist/Form/FormDatePicker/useFormDatePicker.d.ts.map +1 -1
  17. package/dist/Form/FormNumberInput/FormNumberInput.d.ts.map +1 -1
  18. package/dist/Form/FormNumberInput/StepperControls.d.ts.map +1 -1
  19. package/dist/Form/FormNumberInput/useFormNumberInput.d.ts.map +1 -1
  20. package/dist/MultiSelect/MultiSelect.d.ts.map +1 -1
  21. package/dist/MultiSelect/renderers.d.ts +2 -2
  22. package/dist/MultiSelect/renderers.d.ts.map +1 -1
  23. package/dist/assets/stylex.css +450 -0
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.js +25 -25
  26. package/dist/index101.cjs +1 -1
  27. package/dist/index101.js +120 -91
  28. package/dist/index103.cjs +1 -1
  29. package/dist/index103.js +32 -15
  30. package/dist/index107.cjs +1 -1
  31. package/dist/index107.js +245 -132
  32. package/dist/index109.cjs +1 -1
  33. package/dist/index109.js +319 -138
  34. package/dist/index113.cjs +1 -1
  35. package/dist/index113.js +230 -95
  36. package/dist/index119.cjs +1 -1
  37. package/dist/index119.js +62 -35
  38. package/dist/index120.cjs +1 -1
  39. package/dist/index120.js +71 -32
  40. package/dist/index121.cjs +1 -1
  41. package/dist/index121.js +201 -79
  42. package/dist/index125.cjs +1 -1
  43. package/dist/index125.js +661 -288
  44. package/dist/index129.cjs +1 -1
  45. package/dist/index129.js +6 -5
  46. package/dist/index144.cjs +1 -1
  47. package/dist/index144.js +33 -22
  48. package/dist/index148.cjs +1 -1
  49. package/dist/index148.js +95 -92
  50. package/dist/index151.cjs +1 -1
  51. package/dist/index151.js +56 -56
  52. package/dist/index152.cjs +1 -1
  53. package/dist/index152.js +87 -3
  54. package/dist/index153.cjs +1 -1
  55. package/dist/index153.js +321 -85
  56. package/dist/index154.cjs +1 -1
  57. package/dist/index154.js +160 -287
  58. package/dist/index155.cjs +1 -1
  59. package/dist/index155.js +198 -162
  60. package/dist/index156.cjs +1 -1
  61. package/dist/index156.js +24 -125
  62. package/dist/index157.cjs +1 -1
  63. package/dist/index157.js +8 -25
  64. package/dist/index158.cjs +1 -1
  65. package/dist/index158.js +13 -5
  66. package/dist/index159.cjs +1 -1
  67. package/dist/index159.js +18 -13
  68. package/dist/index160.cjs +1 -1
  69. package/dist/index160.js +12 -16
  70. package/dist/index161.cjs +1 -1
  71. package/dist/index161.js +5 -17
  72. package/dist/index162.cjs +1 -1
  73. package/dist/index162.js +6 -5
  74. package/dist/index163.cjs +1 -1
  75. package/dist/index163.js +6 -5
  76. package/dist/index164.cjs +1 -1
  77. package/dist/index164.js +5 -6
  78. package/dist/index165.cjs +1 -1
  79. package/dist/index165.js +5 -5
  80. package/dist/index166.cjs +1 -1
  81. package/dist/index166.js +7 -5
  82. package/dist/index167.cjs +1 -1
  83. package/dist/index167.js +68 -8
  84. package/dist/index168.cjs +1 -1
  85. package/dist/index168.js +9 -67
  86. package/dist/index169.cjs +1 -1
  87. package/dist/index169.js +201 -10
  88. package/dist/index170.cjs +1 -1
  89. package/dist/index170.js +101 -179
  90. package/dist/index171.cjs +1 -1
  91. package/dist/index171.js +24 -116
  92. package/dist/index172.cjs +1 -1
  93. package/dist/index172.js +18 -30
  94. package/dist/index173.cjs +1 -1
  95. package/dist/index173.js +66 -17
  96. package/dist/index174.cjs +1 -1
  97. package/dist/index174.js +30 -67
  98. package/dist/index175.cjs +1 -1
  99. package/dist/index175.js +10 -31
  100. package/dist/index176.cjs +1 -1
  101. package/dist/index176.js +279 -10
  102. package/dist/index177.cjs +1 -1
  103. package/dist/index177.js +125 -248
  104. package/dist/index178.cjs +1 -1
  105. package/dist/index178.js +18 -155
  106. package/dist/index179.cjs +1 -1
  107. package/dist/index179.js +9 -19
  108. package/dist/index180.cjs +1 -1
  109. package/dist/index180.js +12 -8
  110. package/dist/index181.cjs +1 -1
  111. package/dist/index181.js +6 -12
  112. package/dist/index182.cjs +1 -1
  113. package/dist/index182.js +6 -6
  114. package/dist/index183.cjs +1 -1
  115. package/dist/index183.js +9 -6
  116. package/dist/index184.cjs +1 -1
  117. package/dist/index184.js +8 -9
  118. package/dist/index185.cjs +1 -1
  119. package/dist/index185.js +4 -8
  120. package/dist/index186.cjs +1 -1
  121. package/dist/index186.js +6 -4
  122. package/dist/index187.cjs +1 -1
  123. package/dist/index187.js +6 -6
  124. package/dist/index188.cjs +1 -1
  125. package/dist/index188.js +8 -6
  126. package/dist/index189.cjs +1 -1
  127. package/dist/index189.js +9 -8
  128. package/dist/index190.cjs +1 -1
  129. package/dist/index190.js +12 -8
  130. package/dist/index191.cjs +1 -1
  131. package/dist/index191.js +7 -11
  132. package/dist/index192.cjs +1 -1
  133. package/dist/index192.js +7 -7
  134. package/dist/index193.cjs +1 -1
  135. package/dist/index193.js +4 -9
  136. package/dist/index194.cjs +1 -1
  137. package/dist/index194.js +42 -5
  138. package/dist/index195.cjs +1 -1
  139. package/dist/index195.js +375 -29
  140. package/dist/index196.cjs +1 -1
  141. package/dist/index196.js +35 -386
  142. package/dist/index197.cjs +1 -1
  143. package/dist/index197.js +22 -37
  144. package/dist/index198.cjs +1 -1
  145. package/dist/index198.js +56 -20
  146. package/dist/index199.cjs +1 -1
  147. package/dist/index199.js +36 -54
  148. package/dist/index200.cjs +1 -1
  149. package/dist/index200.js +102 -54
  150. package/dist/index201.cjs +1 -1
  151. package/dist/index201.js +76 -54
  152. package/dist/index202.cjs +1 -1
  153. package/dist/index202.js +68 -66
  154. package/dist/index203.cjs +1 -1
  155. package/dist/index203.js +147 -63
  156. package/dist/index204.cjs +1 -1
  157. package/dist/index204.js +69 -91
  158. package/dist/index205.cjs +9 -1
  159. package/dist/index205.js +585 -62
  160. package/dist/index206.cjs +1 -9
  161. package/dist/index206.js +65 -586
  162. package/dist/index207.cjs +1 -1
  163. package/dist/index207.js +42 -41
  164. package/dist/index208.cjs +1 -1
  165. package/dist/index208.js +64 -46
  166. package/dist/index209.cjs +1 -1
  167. package/dist/index209.js +48 -64
  168. package/dist/index210.cjs +1 -1
  169. package/dist/index210.js +75 -47
  170. package/dist/index211.cjs +1 -1
  171. package/dist/index211.js +173 -69
  172. package/dist/index212.cjs +1 -1
  173. package/dist/index212.js +24 -180
  174. package/dist/index213.cjs +1 -1
  175. package/dist/index213.js +25 -24
  176. package/dist/index214.cjs +1 -1
  177. package/dist/index214.js +61 -24
  178. package/dist/index215.cjs +1 -1
  179. package/dist/index215.js +408 -49
  180. package/dist/index216.cjs +1 -1
  181. package/dist/index216.js +25 -422
  182. package/dist/index37.cjs +1 -1
  183. package/dist/index37.js +123 -65
  184. package/dist/index42.cjs +1 -1
  185. package/dist/index42.js +175 -88
  186. package/dist/index91.cjs +1 -1
  187. package/dist/index91.js +252 -124
  188. package/dist/ui/calendar.d.ts +5 -2
  189. package/dist/ui/calendar.d.ts.map +1 -1
  190. package/dist/ui/carousel.d.ts +19 -5
  191. package/dist/ui/carousel.d.ts.map +1 -1
  192. package/dist/ui/context-menu.d.ts +37 -12
  193. package/dist/ui/context-menu.d.ts.map +1 -1
  194. package/dist/ui/form.d.ts +15 -4
  195. package/dist/ui/form.d.ts.map +1 -1
  196. package/dist/ui/hover-card.d.ts +5 -1
  197. package/dist/ui/hover-card.d.ts.map +1 -1
  198. package/dist/ui/item.d.ts +43 -18
  199. package/dist/ui/item.d.ts.map +1 -1
  200. package/dist/ui/menubar.d.ts +45 -14
  201. package/dist/ui/menubar.d.ts.map +1 -1
  202. package/dist/ui/navigation-menu.d.ts +34 -10
  203. package/dist/ui/navigation-menu.d.ts.map +1 -1
  204. package/dist/ui/resizable.d.ts +9 -3
  205. package/dist/ui/resizable.d.ts.map +1 -1
  206. package/dist/ui/scroll-area.d.ts +9 -2
  207. package/dist/ui/scroll-area.d.ts.map +1 -1
  208. package/dist/ui/select.d.ts +19 -5
  209. package/dist/ui/select.d.ts.map +1 -1
  210. package/dist/ui/sidebar.d.ts +99 -37
  211. package/dist/ui/sidebar.d.ts.map +1 -1
  212. package/dist/ui/sonner.d.ts.map +1 -1
  213. package/package.json +1 -1
  214. package/dist/index217.cjs +0 -1
  215. package/dist/index217.js +0 -25
package/dist/index195.js CHANGED
@@ -1,42 +1,388 @@
1
- import { addLeadingZeros as e } from "./index194.js";
2
- // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/lightFormatters.js
3
- var t = {
4
- y(t, n) {
5
- let r = t.getFullYear(), i = r > 0 ? r : 1 - r;
6
- return e(n === "yy" ? i % 100 : i, n.length);
1
+ import e from "./index180.js";
2
+ import t from "./index188.js";
3
+ import n from "./index189.js";
4
+ import r from "./index190.js";
5
+ import i from "./index192.js";
6
+ import { addLeadingZeros as a } from "./index193.js";
7
+ import { lightFormatters as o } from "./index194.js";
8
+ // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/format/formatters.js
9
+ var s = {
10
+ am: "am",
11
+ pm: "pm",
12
+ midnight: "midnight",
13
+ noon: "noon",
14
+ morning: "morning",
15
+ afternoon: "afternoon",
16
+ evening: "evening",
17
+ night: "night"
18
+ }, c = {
19
+ G: function(e, t, n) {
20
+ let r = +(e.getFullYear() > 0);
21
+ switch (t) {
22
+ case "G":
23
+ case "GG":
24
+ case "GGG": return n.era(r, { width: "abbreviated" });
25
+ case "GGGGG": return n.era(r, { width: "narrow" });
26
+ default: return n.era(r, { width: "wide" });
27
+ }
28
+ },
29
+ y: function(e, t, n) {
30
+ if (t === "yo") {
31
+ let t = e.getFullYear(), r = t > 0 ? t : 1 - t;
32
+ return n.ordinalNumber(r, { unit: "year" });
33
+ }
34
+ return o.y(e, t);
35
+ },
36
+ Y: function(e, t, n, i) {
37
+ let o = r(e, i), s = o > 0 ? o : 1 - o;
38
+ if (t === "YY") {
39
+ let e = s % 100;
40
+ return a(e, 2);
41
+ }
42
+ return t === "Yo" ? n.ordinalNumber(s, { unit: "year" }) : a(s, t.length);
43
+ },
44
+ R: function(t, n) {
45
+ let r = e(t);
46
+ return a(r, n.length);
47
+ },
48
+ u: function(e, t) {
49
+ let n = e.getFullYear();
50
+ return a(n, t.length);
51
+ },
52
+ Q: function(e, t, n) {
53
+ let r = Math.ceil((e.getMonth() + 1) / 3);
54
+ switch (t) {
55
+ case "Q": return String(r);
56
+ case "QQ": return a(r, 2);
57
+ case "Qo": return n.ordinalNumber(r, { unit: "quarter" });
58
+ case "QQQ": return n.quarter(r, {
59
+ width: "abbreviated",
60
+ context: "formatting"
61
+ });
62
+ case "QQQQQ": return n.quarter(r, {
63
+ width: "narrow",
64
+ context: "formatting"
65
+ });
66
+ default: return n.quarter(r, {
67
+ width: "wide",
68
+ context: "formatting"
69
+ });
70
+ }
71
+ },
72
+ q: function(e, t, n) {
73
+ let r = Math.ceil((e.getMonth() + 1) / 3);
74
+ switch (t) {
75
+ case "q": return String(r);
76
+ case "qq": return a(r, 2);
77
+ case "qo": return n.ordinalNumber(r, { unit: "quarter" });
78
+ case "qqq": return n.quarter(r, {
79
+ width: "abbreviated",
80
+ context: "standalone"
81
+ });
82
+ case "qqqqq": return n.quarter(r, {
83
+ width: "narrow",
84
+ context: "standalone"
85
+ });
86
+ default: return n.quarter(r, {
87
+ width: "wide",
88
+ context: "standalone"
89
+ });
90
+ }
7
91
  },
8
- M(t, n) {
9
- let r = t.getMonth();
10
- return n === "M" ? String(r + 1) : e(r + 1, 2);
92
+ M: function(e, t, n) {
93
+ let r = e.getMonth();
94
+ switch (t) {
95
+ case "M":
96
+ case "MM": return o.M(e, t);
97
+ case "Mo": return n.ordinalNumber(r + 1, { unit: "month" });
98
+ case "MMM": return n.month(r, {
99
+ width: "abbreviated",
100
+ context: "formatting"
101
+ });
102
+ case "MMMMM": return n.month(r, {
103
+ width: "narrow",
104
+ context: "formatting"
105
+ });
106
+ default: return n.month(r, {
107
+ width: "wide",
108
+ context: "formatting"
109
+ });
110
+ }
111
+ },
112
+ L: function(e, t, n) {
113
+ let r = e.getMonth();
114
+ switch (t) {
115
+ case "L": return String(r + 1);
116
+ case "LL": return a(r + 1, 2);
117
+ case "Lo": return n.ordinalNumber(r + 1, { unit: "month" });
118
+ case "LLL": return n.month(r, {
119
+ width: "abbreviated",
120
+ context: "standalone"
121
+ });
122
+ case "LLLLL": return n.month(r, {
123
+ width: "narrow",
124
+ context: "standalone"
125
+ });
126
+ default: return n.month(r, {
127
+ width: "wide",
128
+ context: "standalone"
129
+ });
130
+ }
131
+ },
132
+ w: function(e, t, n, r) {
133
+ let o = i(e, r);
134
+ return t === "wo" ? n.ordinalNumber(o, { unit: "week" }) : a(o, t.length);
135
+ },
136
+ I: function(e, t, r) {
137
+ let i = n(e);
138
+ return t === "Io" ? r.ordinalNumber(i, { unit: "week" }) : a(i, t.length);
11
139
  },
12
- d(t, n) {
13
- return e(t.getDate(), n.length);
140
+ d: function(e, t, n) {
141
+ return t === "do" ? n.ordinalNumber(e.getDate(), { unit: "date" }) : o.d(e, t);
142
+ },
143
+ D: function(e, n, r) {
144
+ let i = t(e);
145
+ return n === "Do" ? r.ordinalNumber(i, { unit: "dayOfYear" }) : a(i, n.length);
146
+ },
147
+ E: function(e, t, n) {
148
+ let r = e.getDay();
149
+ switch (t) {
150
+ case "E":
151
+ case "EE":
152
+ case "EEE": return n.day(r, {
153
+ width: "abbreviated",
154
+ context: "formatting"
155
+ });
156
+ case "EEEEE": return n.day(r, {
157
+ width: "narrow",
158
+ context: "formatting"
159
+ });
160
+ case "EEEEEE": return n.day(r, {
161
+ width: "short",
162
+ context: "formatting"
163
+ });
164
+ default: return n.day(r, {
165
+ width: "wide",
166
+ context: "formatting"
167
+ });
168
+ }
169
+ },
170
+ e: function(e, t, n, r) {
171
+ let i = e.getDay(), o = (i - r.weekStartsOn + 8) % 7 || 7;
172
+ switch (t) {
173
+ case "e": return String(o);
174
+ case "ee": return a(o, 2);
175
+ case "eo": return n.ordinalNumber(o, { unit: "day" });
176
+ case "eee": return n.day(i, {
177
+ width: "abbreviated",
178
+ context: "formatting"
179
+ });
180
+ case "eeeee": return n.day(i, {
181
+ width: "narrow",
182
+ context: "formatting"
183
+ });
184
+ case "eeeeee": return n.day(i, {
185
+ width: "short",
186
+ context: "formatting"
187
+ });
188
+ default: return n.day(i, {
189
+ width: "wide",
190
+ context: "formatting"
191
+ });
192
+ }
14
193
  },
15
- a(e, t) {
16
- let n = e.getHours() / 12 >= 1 ? "pm" : "am";
194
+ c: function(e, t, n, r) {
195
+ let i = e.getDay(), o = (i - r.weekStartsOn + 8) % 7 || 7;
196
+ switch (t) {
197
+ case "c": return String(o);
198
+ case "cc": return a(o, t.length);
199
+ case "co": return n.ordinalNumber(o, { unit: "day" });
200
+ case "ccc": return n.day(i, {
201
+ width: "abbreviated",
202
+ context: "standalone"
203
+ });
204
+ case "ccccc": return n.day(i, {
205
+ width: "narrow",
206
+ context: "standalone"
207
+ });
208
+ case "cccccc": return n.day(i, {
209
+ width: "short",
210
+ context: "standalone"
211
+ });
212
+ default: return n.day(i, {
213
+ width: "wide",
214
+ context: "standalone"
215
+ });
216
+ }
217
+ },
218
+ i: function(e, t, n) {
219
+ let r = e.getDay(), i = r === 0 ? 7 : r;
220
+ switch (t) {
221
+ case "i": return String(i);
222
+ case "ii": return a(i, t.length);
223
+ case "io": return n.ordinalNumber(i, { unit: "day" });
224
+ case "iii": return n.day(r, {
225
+ width: "abbreviated",
226
+ context: "formatting"
227
+ });
228
+ case "iiiii": return n.day(r, {
229
+ width: "narrow",
230
+ context: "formatting"
231
+ });
232
+ case "iiiiii": return n.day(r, {
233
+ width: "short",
234
+ context: "formatting"
235
+ });
236
+ default: return n.day(r, {
237
+ width: "wide",
238
+ context: "formatting"
239
+ });
240
+ }
241
+ },
242
+ a: function(e, t, n) {
243
+ let r = e.getHours() / 12 >= 1 ? "pm" : "am";
17
244
  switch (t) {
18
245
  case "a":
19
- case "aa": return n.toUpperCase();
20
- case "aaa": return n;
21
- case "aaaaa": return n[0];
22
- default: return n === "am" ? "a.m." : "p.m.";
246
+ case "aa": return n.dayPeriod(r, {
247
+ width: "abbreviated",
248
+ context: "formatting"
249
+ });
250
+ case "aaa": return n.dayPeriod(r, {
251
+ width: "abbreviated",
252
+ context: "formatting"
253
+ }).toLowerCase();
254
+ case "aaaaa": return n.dayPeriod(r, {
255
+ width: "narrow",
256
+ context: "formatting"
257
+ });
258
+ default: return n.dayPeriod(r, {
259
+ width: "wide",
260
+ context: "formatting"
261
+ });
262
+ }
263
+ },
264
+ b: function(e, t, n) {
265
+ let r = e.getHours(), i;
266
+ switch (i = r === 12 ? s.noon : r === 0 ? s.midnight : r / 12 >= 1 ? "pm" : "am", t) {
267
+ case "b":
268
+ case "bb": return n.dayPeriod(i, {
269
+ width: "abbreviated",
270
+ context: "formatting"
271
+ });
272
+ case "bbb": return n.dayPeriod(i, {
273
+ width: "abbreviated",
274
+ context: "formatting"
275
+ }).toLowerCase();
276
+ case "bbbbb": return n.dayPeriod(i, {
277
+ width: "narrow",
278
+ context: "formatting"
279
+ });
280
+ default: return n.dayPeriod(i, {
281
+ width: "wide",
282
+ context: "formatting"
283
+ });
284
+ }
285
+ },
286
+ B: function(e, t, n) {
287
+ let r = e.getHours(), i;
288
+ switch (i = r >= 17 ? s.evening : r >= 12 ? s.afternoon : r >= 4 ? s.morning : s.night, t) {
289
+ case "B":
290
+ case "BB":
291
+ case "BBB": return n.dayPeriod(i, {
292
+ width: "abbreviated",
293
+ context: "formatting"
294
+ });
295
+ case "BBBBB": return n.dayPeriod(i, {
296
+ width: "narrow",
297
+ context: "formatting"
298
+ });
299
+ default: return n.dayPeriod(i, {
300
+ width: "wide",
301
+ context: "formatting"
302
+ });
23
303
  }
24
304
  },
25
- h(t, n) {
26
- return e(t.getHours() % 12 || 12, n.length);
305
+ h: function(e, t, n) {
306
+ if (t === "ho") {
307
+ let t = e.getHours() % 12;
308
+ return t === 0 && (t = 12), n.ordinalNumber(t, { unit: "hour" });
309
+ }
310
+ return o.h(e, t);
311
+ },
312
+ H: function(e, t, n) {
313
+ return t === "Ho" ? n.ordinalNumber(e.getHours(), { unit: "hour" }) : o.H(e, t);
314
+ },
315
+ K: function(e, t, n) {
316
+ let r = e.getHours() % 12;
317
+ return t === "Ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
318
+ },
319
+ k: function(e, t, n) {
320
+ let r = e.getHours();
321
+ return r === 0 && (r = 24), t === "ko" ? n.ordinalNumber(r, { unit: "hour" }) : a(r, t.length);
27
322
  },
28
- H(t, n) {
29
- return e(t.getHours(), n.length);
323
+ m: function(e, t, n) {
324
+ return t === "mo" ? n.ordinalNumber(e.getMinutes(), { unit: "minute" }) : o.m(e, t);
30
325
  },
31
- m(t, n) {
32
- return e(t.getMinutes(), n.length);
326
+ s: function(e, t, n) {
327
+ return t === "so" ? n.ordinalNumber(e.getSeconds(), { unit: "second" }) : o.s(e, t);
328
+ },
329
+ S: function(e, t) {
330
+ return o.S(e, t);
331
+ },
332
+ X: function(e, t, n) {
333
+ let r = e.getTimezoneOffset();
334
+ if (r === 0) return "Z";
335
+ switch (t) {
336
+ case "X": return u(r);
337
+ case "XXXX":
338
+ case "XX": return d(r);
339
+ default: return d(r, ":");
340
+ }
341
+ },
342
+ x: function(e, t, n) {
343
+ let r = e.getTimezoneOffset();
344
+ switch (t) {
345
+ case "x": return u(r);
346
+ case "xxxx":
347
+ case "xx": return d(r);
348
+ default: return d(r, ":");
349
+ }
350
+ },
351
+ O: function(e, t, n) {
352
+ let r = e.getTimezoneOffset();
353
+ switch (t) {
354
+ case "O":
355
+ case "OO":
356
+ case "OOO": return "GMT" + l(r, ":");
357
+ default: return "GMT" + d(r, ":");
358
+ }
359
+ },
360
+ z: function(e, t, n) {
361
+ let r = e.getTimezoneOffset();
362
+ switch (t) {
363
+ case "z":
364
+ case "zz":
365
+ case "zzz": return "GMT" + l(r, ":");
366
+ default: return "GMT" + d(r, ":");
367
+ }
33
368
  },
34
- s(t, n) {
35
- return e(t.getSeconds(), n.length);
369
+ t: function(e, t, n) {
370
+ let r = Math.trunc(e / 1e3);
371
+ return a(r, t.length);
36
372
  },
37
- S(t, n) {
38
- let r = n.length, i = t.getMilliseconds(), a = Math.trunc(i * 10 ** (r - 3));
39
- return e(a, n.length);
373
+ T: function(e, t, n) {
374
+ return a(+e, t.length);
40
375
  }
41
376
  };
42
- export { t as lightFormatters };
377
+ function l(e, t = "") {
378
+ let n = e > 0 ? "-" : "+", r = Math.abs(e), i = Math.trunc(r / 60), o = r % 60;
379
+ return o === 0 ? n + String(i) : n + String(i) + t + a(o, 2);
380
+ }
381
+ function u(e, t) {
382
+ return e % 60 == 0 ? (e > 0 ? "-" : "+") + a(Math.abs(e) / 60, 2) : d(e, t);
383
+ }
384
+ function d(e, t = "") {
385
+ let n = e > 0 ? "-" : "+", r = Math.abs(e), i = a(Math.trunc(r / 60), 2), o = a(r % 60, 2);
386
+ return n + i + t + o;
387
+ }
388
+ export { c as formatters };
package/dist/index196.cjs CHANGED
@@ -1 +1 @@
1
- const e=require("./index181.cjs"),t=require("./index189.cjs"),n=require("./index190.cjs"),r=require("./index191.cjs"),i=require("./index193.cjs"),a=require("./index194.cjs"),o=require("./index195.cjs");var s={am:`am`,pm:`pm`,midnight:`midnight`,noon:`noon`,morning:`morning`,afternoon:`afternoon`,evening:`evening`,night:`night`},c={G:function(e,t,n){let r=+(e.getFullYear()>0);switch(t){case`G`:case`GG`:case`GGG`:return n.era(r,{width:`abbreviated`});case`GGGGG`:return n.era(r,{width:`narrow`});default:return n.era(r,{width:`wide`})}},y:function(e,t,n){if(t===`yo`){let t=e.getFullYear(),r=t>0?t:1-t;return n.ordinalNumber(r,{unit:`year`})}return o.lightFormatters.y(e,t)},Y:function(e,t,n,i){let o=r.default(e,i),s=o>0?o:1-o;if(t===`YY`){let e=s%100;return a.addLeadingZeros(e,2)}return t===`Yo`?n.ordinalNumber(s,{unit:`year`}):a.addLeadingZeros(s,t.length)},R:function(t,n){let r=e.default(t);return a.addLeadingZeros(r,n.length)},u:function(e,t){let n=e.getFullYear();return a.addLeadingZeros(n,t.length)},Q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`Q`:return String(r);case`QQ`:return a.addLeadingZeros(r,2);case`Qo`:return n.ordinalNumber(r,{unit:`quarter`});case`QQQ`:return n.quarter(r,{width:`abbreviated`,context:`formatting`});case`QQQQQ`:return n.quarter(r,{width:`narrow`,context:`formatting`});default:return n.quarter(r,{width:`wide`,context:`formatting`})}},q:function(e,t,n){let r=Math.ceil((e.getMonth()+1)/3);switch(t){case`q`:return String(r);case`qq`:return a.addLeadingZeros(r,2);case`qo`:return n.ordinalNumber(r,{unit:`quarter`});case`qqq`:return n.quarter(r,{width:`abbreviated`,context:`standalone`});case`qqqqq`:return n.quarter(r,{width:`narrow`,context:`standalone`});default:return n.quarter(r,{width:`wide`,context:`standalone`})}},M:function(e,t,n){let r=e.getMonth();switch(t){case`M`:case`MM`:return o.lightFormatters.M(e,t);case`Mo`:return n.ordinalNumber(r+1,{unit:`month`});case`MMM`:return n.month(r,{width:`abbreviated`,context:`formatting`});case`MMMMM`:return n.month(r,{width:`narrow`,context:`formatting`});default:return n.month(r,{width:`wide`,context:`formatting`})}},L:function(e,t,n){let r=e.getMonth();switch(t){case`L`:return String(r+1);case`LL`:return a.addLeadingZeros(r+1,2);case`Lo`:return n.ordinalNumber(r+1,{unit:`month`});case`LLL`:return n.month(r,{width:`abbreviated`,context:`standalone`});case`LLLLL`:return n.month(r,{width:`narrow`,context:`standalone`});default:return n.month(r,{width:`wide`,context:`standalone`})}},w:function(e,t,n,r){let o=i.default(e,r);return t===`wo`?n.ordinalNumber(o,{unit:`week`}):a.addLeadingZeros(o,t.length)},I:function(e,t,r){let i=n.default(e);return t===`Io`?r.ordinalNumber(i,{unit:`week`}):a.addLeadingZeros(i,t.length)},d:function(e,t,n){return t===`do`?n.ordinalNumber(e.getDate(),{unit:`date`}):o.lightFormatters.d(e,t)},D:function(e,n,r){let i=t.default(e);return n===`Do`?r.ordinalNumber(i,{unit:`dayOfYear`}):a.addLeadingZeros(i,n.length)},E:function(e,t,n){let r=e.getDay();switch(t){case`E`:case`EE`:case`EEE`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`EEEEE`:return n.day(r,{width:`narrow`,context:`formatting`});case`EEEEEE`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},e:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case`e`:return String(o);case`ee`:return a.addLeadingZeros(o,2);case`eo`:return n.ordinalNumber(o,{unit:`day`});case`eee`:return n.day(i,{width:`abbreviated`,context:`formatting`});case`eeeee`:return n.day(i,{width:`narrow`,context:`formatting`});case`eeeeee`:return n.day(i,{width:`short`,context:`formatting`});default:return n.day(i,{width:`wide`,context:`formatting`})}},c:function(e,t,n,r){let i=e.getDay(),o=(i-r.weekStartsOn+8)%7||7;switch(t){case`c`:return String(o);case`cc`:return a.addLeadingZeros(o,t.length);case`co`:return n.ordinalNumber(o,{unit:`day`});case`ccc`:return n.day(i,{width:`abbreviated`,context:`standalone`});case`ccccc`:return n.day(i,{width:`narrow`,context:`standalone`});case`cccccc`:return n.day(i,{width:`short`,context:`standalone`});default:return n.day(i,{width:`wide`,context:`standalone`})}},i:function(e,t,n){let r=e.getDay(),i=r===0?7:r;switch(t){case`i`:return String(i);case`ii`:return a.addLeadingZeros(i,t.length);case`io`:return n.ordinalNumber(i,{unit:`day`});case`iii`:return n.day(r,{width:`abbreviated`,context:`formatting`});case`iiiii`:return n.day(r,{width:`narrow`,context:`formatting`});case`iiiiii`:return n.day(r,{width:`short`,context:`formatting`});default:return n.day(r,{width:`wide`,context:`formatting`})}},a:function(e,t,n){let r=e.getHours()/12>=1?`pm`:`am`;switch(t){case`a`:case`aa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`});case`aaa`:return n.dayPeriod(r,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`aaaaa`:return n.dayPeriod(r,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(r,{width:`wide`,context:`formatting`})}},b:function(e,t,n){let r=e.getHours(),i;switch(i=r===12?s.noon:r===0?s.midnight:r/12>=1?`pm`:`am`,t){case`b`:case`bb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`bbb`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`}).toLowerCase();case`bbbbb`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},B:function(e,t,n){let r=e.getHours(),i;switch(i=r>=17?s.evening:r>=12?s.afternoon:r>=4?s.morning:s.night,t){case`B`:case`BB`:case`BBB`:return n.dayPeriod(i,{width:`abbreviated`,context:`formatting`});case`BBBBB`:return n.dayPeriod(i,{width:`narrow`,context:`formatting`});default:return n.dayPeriod(i,{width:`wide`,context:`formatting`})}},h:function(e,t,n){if(t===`ho`){let t=e.getHours()%12;return t===0&&(t=12),n.ordinalNumber(t,{unit:`hour`})}return o.lightFormatters.h(e,t)},H:function(e,t,n){return t===`Ho`?n.ordinalNumber(e.getHours(),{unit:`hour`}):o.lightFormatters.H(e,t)},K:function(e,t,n){let r=e.getHours()%12;return t===`Ko`?n.ordinalNumber(r,{unit:`hour`}):a.addLeadingZeros(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t===`ko`?n.ordinalNumber(r,{unit:`hour`}):a.addLeadingZeros(r,t.length)},m:function(e,t,n){return t===`mo`?n.ordinalNumber(e.getMinutes(),{unit:`minute`}):o.lightFormatters.m(e,t)},s:function(e,t,n){return t===`so`?n.ordinalNumber(e.getSeconds(),{unit:`second`}):o.lightFormatters.s(e,t)},S:function(e,t){return o.lightFormatters.S(e,t)},X:function(e,t,n){let r=e.getTimezoneOffset();if(r===0)return`Z`;switch(t){case`X`:return u(r);case`XXXX`:case`XX`:return d(r);default:return d(r,`:`)}},x:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`x`:return u(r);case`xxxx`:case`xx`:return d(r);default:return d(r,`:`)}},O:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`O`:case`OO`:case`OOO`:return`GMT`+l(r,`:`);default:return`GMT`+d(r,`:`)}},z:function(e,t,n){let r=e.getTimezoneOffset();switch(t){case`z`:case`zz`:case`zzz`:return`GMT`+l(r,`:`);default:return`GMT`+d(r,`:`)}},t:function(e,t,n){let r=Math.trunc(e/1e3);return a.addLeadingZeros(r,t.length)},T:function(e,t,n){return a.addLeadingZeros(+e,t.length)}};function l(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=Math.trunc(r/60),o=r%60;return o===0?n+String(i):n+String(i)+t+a.addLeadingZeros(o,2)}function u(e,t){return e%60==0?(e>0?`-`:`+`)+a.addLeadingZeros(Math.abs(e)/60,2):d(e,t)}function d(e,t=``){let n=e>0?`-`:`+`,r=Math.abs(e),i=a.addLeadingZeros(Math.trunc(r/60),2),o=a.addLeadingZeros(r%60,2);return n+i+t+o}exports.formatters=c;
1
+ var e=(e,t)=>{switch(e){case`P`:return t.date({width:`short`});case`PP`:return t.date({width:`medium`});case`PPP`:return t.date({width:`long`});default:return t.date({width:`full`})}},t=(e,t)=>{switch(e){case`p`:return t.time({width:`short`});case`pp`:return t.time({width:`medium`});case`ppp`:return t.time({width:`long`});default:return t.time({width:`full`})}},n={p:t,P:(n,r)=>{let i=n.match(/(P+)(p+)?/)||[],a=i[1],o=i[2];if(!o)return e(n,r);let s;switch(a){case`P`:s=r.dateTime({width:`short`});break;case`PP`:s=r.dateTime({width:`medium`});break;case`PPP`:s=r.dateTime({width:`long`});break;default:s=r.dateTime({width:`full`})}return s.replace(`{{date}}`,e(a,r)).replace(`{{time}}`,t(o,r))}};exports.longFormatters=n;