@xjur-ui/react 1.0.6 → 2.0.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.
- package/.turbo/turbo-build.log +97 -45
- package/CHANGELOG.md +44 -0
- package/README.md +146 -0
- package/dist/chunk-CBFC4QME.js +2 -0
- package/dist/chunk-CBFC4QME.js.map +1 -0
- package/dist/chunk-EIG6CBTQ.js +2 -0
- package/dist/chunk-EIG6CBTQ.js.map +1 -0
- package/dist/chunk-FASEHVMD.js +2 -0
- package/dist/chunk-FASEHVMD.js.map +1 -0
- package/dist/chunk-KIFR5VIE.js +2 -0
- package/dist/chunk-KIFR5VIE.js.map +1 -0
- package/dist/chunk-KS6WGBHQ.js +2 -0
- package/dist/chunk-KS6WGBHQ.js.map +1 -0
- package/dist/chunk-NELCN6E2.js +2 -0
- package/dist/chunk-NELCN6E2.js.map +1 -0
- package/dist/chunk-NPTLORW5.js +2 -0
- package/dist/chunk-NPTLORW5.js.map +1 -0
- package/dist/chunk-RWMV7APX.js +2 -0
- package/dist/chunk-RWMV7APX.js.map +1 -0
- package/dist/chunk-SHHXKVVR.js +2 -0
- package/dist/chunk-SHHXKVVR.js.map +1 -0
- package/dist/chunk-TB6KI6CL.js +2 -0
- package/dist/chunk-TB6KI6CL.js.map +1 -0
- package/dist/components/avatar-group.js +2 -179
- package/dist/components/avatar-group.js.map +1 -0
- package/dist/components/avatar.js +2 -59
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.js +2 -111
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.js +2 -98
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.js +2 -751
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/checkbox.js +2 -153
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/chip.d.ts +3 -1
- package/dist/components/chip.js +2 -256
- package/dist/components/chip.js.map +1 -0
- package/dist/components/collapsible.js +2 -41
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/date-picker.d.ts +8 -3
- package/dist/components/date-picker.js +2 -232
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/divider.js +2 -29
- package/dist/components/divider.js.map +1 -0
- package/dist/components/dropdown-menu.js +2 -295
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/icon.js +2 -177
- package/dist/components/icon.js.map +1 -0
- package/dist/components/input.d.ts +9 -4
- package/dist/components/input.js +2 -315
- package/dist/components/input.js.map +1 -0
- package/dist/components/list.js +2 -179
- package/dist/components/list.js.map +1 -0
- package/dist/components/logo.js +2 -324
- package/dist/components/logo.js.map +1 -0
- package/dist/components/otp-input.js +2 -47
- package/dist/components/otp-input.js.map +1 -0
- package/dist/components/radio.js +2 -156
- package/dist/components/radio.js.map +1 -0
- package/dist/components/rich-editor.d.ts +2 -1
- package/dist/components/rich-editor.js +2 -723
- package/dist/components/rich-editor.js.map +1 -0
- package/dist/components/search-input.js +2 -274
- package/dist/components/search-input.js.map +1 -0
- package/dist/components/select.d.ts +6 -3
- package/dist/components/select.js +2 -550
- package/dist/components/select.js.map +1 -0
- package/dist/components/sheet.js +2 -251
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.js +2 -16
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/status.js +2 -111
- package/dist/components/status.js.map +1 -0
- package/dist/components/switch.js +2 -36
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.js +2 -196
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +9 -6
- package/dist/components/tabs.js +2 -54
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/tag.d.ts +3 -1
- package/dist/components/tag.js +2 -189
- package/dist/components/tag.js.map +1 -0
- package/dist/components/tooltip.js +2 -58
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/typography.js +2 -78
- package/dist/components/typography.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.css +2 -2322
- package/dist/index.css.map +1 -0
- package/dist/logo-PQRZORCS.js +3 -0
- package/dist/logo-PQRZORCS.js.map +1 -0
- package/package.json +41 -8
- package/src/components/calendar.tsx +7 -6
- package/src/components/chip.tsx +11 -3
- package/src/components/date-picker.tsx +125 -22
- package/src/components/icon.tsx +1 -1
- package/src/components/input.tsx +124 -60
- package/src/components/logo.tsx +25 -20
- package/src/components/rich-editor.tsx +4 -3
- package/src/components/select.tsx +104 -26
- package/src/components/tabs.tsx +56 -37
- package/src/components/tag.tsx +11 -3
- package/src/index.css +2 -2
- package/src/resources/logo/index.tsx +33 -0
- package/tsup.config.ts +23 -5
- package/dist/components/test.d.ts +0 -5
- package/dist/components/test.js +0 -8
- package/dist/index.js +0 -0
- package/src/components/test.tsx +0 -3
- package/src/index.ts +0 -1
- package/src/resources/logo/index.ts +0 -3
|
@@ -1,751 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// ../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
5
|
-
function buildFormatLongFn(args) {
|
|
6
|
-
return (options = {}) => {
|
|
7
|
-
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
8
|
-
const format = args.formats[width] || args.formats[args.defaultWidth];
|
|
9
|
-
return format;
|
|
10
|
-
};
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
// ../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
14
|
-
function buildLocalizeFn(args) {
|
|
15
|
-
return (value, options) => {
|
|
16
|
-
const context = options?.context ? String(options.context) : "standalone";
|
|
17
|
-
let valuesArray;
|
|
18
|
-
if (context === "formatting" && args.formattingValues) {
|
|
19
|
-
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
20
|
-
const width = options?.width ? String(options.width) : defaultWidth;
|
|
21
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
22
|
-
} else {
|
|
23
|
-
const defaultWidth = args.defaultWidth;
|
|
24
|
-
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
25
|
-
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
26
|
-
}
|
|
27
|
-
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
28
|
-
return valuesArray[index];
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
// ../../node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
33
|
-
function buildMatchFn(args) {
|
|
34
|
-
return (string, options = {}) => {
|
|
35
|
-
const width = options.width;
|
|
36
|
-
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
37
|
-
const matchResult = string.match(matchPattern);
|
|
38
|
-
if (!matchResult) {
|
|
39
|
-
return null;
|
|
40
|
-
}
|
|
41
|
-
const matchedString = matchResult[0];
|
|
42
|
-
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
43
|
-
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
44
|
-
// [TODO] -- I challenge you to fix the type
|
|
45
|
-
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
46
|
-
);
|
|
47
|
-
let value;
|
|
48
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
49
|
-
value = options.valueCallback ? (
|
|
50
|
-
// [TODO] -- I challenge you to fix the type
|
|
51
|
-
options.valueCallback(value)
|
|
52
|
-
) : value;
|
|
53
|
-
const rest = string.slice(matchedString.length);
|
|
54
|
-
return { value, rest };
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
function findKey(object, predicate) {
|
|
58
|
-
for (const key in object) {
|
|
59
|
-
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
60
|
-
return key;
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
return void 0;
|
|
64
|
-
}
|
|
65
|
-
function findIndex(array, predicate) {
|
|
66
|
-
for (let key = 0; key < array.length; key++) {
|
|
67
|
-
if (predicate(array[key])) {
|
|
68
|
-
return key;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return void 0;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// ../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
75
|
-
function buildMatchPatternFn(args) {
|
|
76
|
-
return (string, options = {}) => {
|
|
77
|
-
const matchResult = string.match(args.matchPattern);
|
|
78
|
-
if (!matchResult) return null;
|
|
79
|
-
const matchedString = matchResult[0];
|
|
80
|
-
const parseResult = string.match(args.parsePattern);
|
|
81
|
-
if (!parseResult) return null;
|
|
82
|
-
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
83
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
84
|
-
const rest = string.slice(matchedString.length);
|
|
85
|
-
return { value, rest };
|
|
86
|
-
};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
// ../../node_modules/date-fns/locale/pt-BR/_lib/formatDistance.js
|
|
90
|
-
var formatDistanceLocale = {
|
|
91
|
-
lessThanXSeconds: {
|
|
92
|
-
one: "menos de um segundo",
|
|
93
|
-
other: "menos de {{count}} segundos"
|
|
94
|
-
},
|
|
95
|
-
xSeconds: {
|
|
96
|
-
one: "1 segundo",
|
|
97
|
-
other: "{{count}} segundos"
|
|
98
|
-
},
|
|
99
|
-
halfAMinute: "meio minuto",
|
|
100
|
-
lessThanXMinutes: {
|
|
101
|
-
one: "menos de um minuto",
|
|
102
|
-
other: "menos de {{count}} minutos"
|
|
103
|
-
},
|
|
104
|
-
xMinutes: {
|
|
105
|
-
one: "1 minuto",
|
|
106
|
-
other: "{{count}} minutos"
|
|
107
|
-
},
|
|
108
|
-
aboutXHours: {
|
|
109
|
-
one: "cerca de 1 hora",
|
|
110
|
-
other: "cerca de {{count}} horas"
|
|
111
|
-
},
|
|
112
|
-
xHours: {
|
|
113
|
-
one: "1 hora",
|
|
114
|
-
other: "{{count}} horas"
|
|
115
|
-
},
|
|
116
|
-
xDays: {
|
|
117
|
-
one: "1 dia",
|
|
118
|
-
other: "{{count}} dias"
|
|
119
|
-
},
|
|
120
|
-
aboutXWeeks: {
|
|
121
|
-
one: "cerca de 1 semana",
|
|
122
|
-
other: "cerca de {{count}} semanas"
|
|
123
|
-
},
|
|
124
|
-
xWeeks: {
|
|
125
|
-
one: "1 semana",
|
|
126
|
-
other: "{{count}} semanas"
|
|
127
|
-
},
|
|
128
|
-
aboutXMonths: {
|
|
129
|
-
one: "cerca de 1 m\xEAs",
|
|
130
|
-
other: "cerca de {{count}} meses"
|
|
131
|
-
},
|
|
132
|
-
xMonths: {
|
|
133
|
-
one: "1 m\xEAs",
|
|
134
|
-
other: "{{count}} meses"
|
|
135
|
-
},
|
|
136
|
-
aboutXYears: {
|
|
137
|
-
one: "cerca de 1 ano",
|
|
138
|
-
other: "cerca de {{count}} anos"
|
|
139
|
-
},
|
|
140
|
-
xYears: {
|
|
141
|
-
one: "1 ano",
|
|
142
|
-
other: "{{count}} anos"
|
|
143
|
-
},
|
|
144
|
-
overXYears: {
|
|
145
|
-
one: "mais de 1 ano",
|
|
146
|
-
other: "mais de {{count}} anos"
|
|
147
|
-
},
|
|
148
|
-
almostXYears: {
|
|
149
|
-
one: "quase 1 ano",
|
|
150
|
-
other: "quase {{count}} anos"
|
|
151
|
-
}
|
|
152
|
-
};
|
|
153
|
-
var formatDistance = (token, count, options) => {
|
|
154
|
-
let result;
|
|
155
|
-
const tokenValue = formatDistanceLocale[token];
|
|
156
|
-
if (typeof tokenValue === "string") {
|
|
157
|
-
result = tokenValue;
|
|
158
|
-
} else if (count === 1) {
|
|
159
|
-
result = tokenValue.one;
|
|
160
|
-
} else {
|
|
161
|
-
result = tokenValue.other.replace("{{count}}", String(count));
|
|
162
|
-
}
|
|
163
|
-
if (options?.addSuffix) {
|
|
164
|
-
if (options.comparison && options.comparison > 0) {
|
|
165
|
-
return "em " + result;
|
|
166
|
-
} else {
|
|
167
|
-
return "h\xE1 " + result;
|
|
168
|
-
}
|
|
169
|
-
}
|
|
170
|
-
return result;
|
|
171
|
-
};
|
|
172
|
-
|
|
173
|
-
// ../../node_modules/date-fns/locale/pt-BR/_lib/formatLong.js
|
|
174
|
-
var dateFormats = {
|
|
175
|
-
full: "EEEE, d 'de' MMMM 'de' y",
|
|
176
|
-
long: "d 'de' MMMM 'de' y",
|
|
177
|
-
medium: "d MMM y",
|
|
178
|
-
short: "dd/MM/yyyy"
|
|
179
|
-
};
|
|
180
|
-
var timeFormats = {
|
|
181
|
-
full: "HH:mm:ss zzzz",
|
|
182
|
-
long: "HH:mm:ss z",
|
|
183
|
-
medium: "HH:mm:ss",
|
|
184
|
-
short: "HH:mm"
|
|
185
|
-
};
|
|
186
|
-
var dateTimeFormats = {
|
|
187
|
-
full: "{{date}} '\xE0s' {{time}}",
|
|
188
|
-
long: "{{date}} '\xE0s' {{time}}",
|
|
189
|
-
medium: "{{date}}, {{time}}",
|
|
190
|
-
short: "{{date}}, {{time}}"
|
|
191
|
-
};
|
|
192
|
-
var formatLong = {
|
|
193
|
-
date: buildFormatLongFn({
|
|
194
|
-
formats: dateFormats,
|
|
195
|
-
defaultWidth: "full"
|
|
196
|
-
}),
|
|
197
|
-
time: buildFormatLongFn({
|
|
198
|
-
formats: timeFormats,
|
|
199
|
-
defaultWidth: "full"
|
|
200
|
-
}),
|
|
201
|
-
dateTime: buildFormatLongFn({
|
|
202
|
-
formats: dateTimeFormats,
|
|
203
|
-
defaultWidth: "full"
|
|
204
|
-
})
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
// ../../node_modules/date-fns/locale/pt-BR/_lib/formatRelative.js
|
|
208
|
-
var formatRelativeLocale = {
|
|
209
|
-
lastWeek: (date) => {
|
|
210
|
-
const weekday = date.getDay();
|
|
211
|
-
const last = weekday === 0 || weekday === 6 ? "\xFAltimo" : "\xFAltima";
|
|
212
|
-
return "'" + last + "' eeee '\xE0s' p";
|
|
213
|
-
},
|
|
214
|
-
yesterday: "'ontem \xE0s' p",
|
|
215
|
-
today: "'hoje \xE0s' p",
|
|
216
|
-
tomorrow: "'amanh\xE3 \xE0s' p",
|
|
217
|
-
nextWeek: "eeee '\xE0s' p",
|
|
218
|
-
other: "P"
|
|
219
|
-
};
|
|
220
|
-
var formatRelative = (token, date, _baseDate, _options) => {
|
|
221
|
-
const format = formatRelativeLocale[token];
|
|
222
|
-
if (typeof format === "function") {
|
|
223
|
-
return format(date);
|
|
224
|
-
}
|
|
225
|
-
return format;
|
|
226
|
-
};
|
|
227
|
-
|
|
228
|
-
// ../../node_modules/date-fns/locale/pt-BR/_lib/localize.js
|
|
229
|
-
var eraValues = {
|
|
230
|
-
narrow: ["AC", "DC"],
|
|
231
|
-
abbreviated: ["AC", "DC"],
|
|
232
|
-
wide: ["antes de cristo", "depois de cristo"]
|
|
233
|
-
};
|
|
234
|
-
var quarterValues = {
|
|
235
|
-
narrow: ["1", "2", "3", "4"],
|
|
236
|
-
abbreviated: ["T1", "T2", "T3", "T4"],
|
|
237
|
-
wide: ["1\xBA trimestre", "2\xBA trimestre", "3\xBA trimestre", "4\xBA trimestre"]
|
|
238
|
-
};
|
|
239
|
-
var monthValues = {
|
|
240
|
-
narrow: ["j", "f", "m", "a", "m", "j", "j", "a", "s", "o", "n", "d"],
|
|
241
|
-
abbreviated: [
|
|
242
|
-
"jan",
|
|
243
|
-
"fev",
|
|
244
|
-
"mar",
|
|
245
|
-
"abr",
|
|
246
|
-
"mai",
|
|
247
|
-
"jun",
|
|
248
|
-
"jul",
|
|
249
|
-
"ago",
|
|
250
|
-
"set",
|
|
251
|
-
"out",
|
|
252
|
-
"nov",
|
|
253
|
-
"dez"
|
|
254
|
-
],
|
|
255
|
-
wide: [
|
|
256
|
-
"janeiro",
|
|
257
|
-
"fevereiro",
|
|
258
|
-
"mar\xE7o",
|
|
259
|
-
"abril",
|
|
260
|
-
"maio",
|
|
261
|
-
"junho",
|
|
262
|
-
"julho",
|
|
263
|
-
"agosto",
|
|
264
|
-
"setembro",
|
|
265
|
-
"outubro",
|
|
266
|
-
"novembro",
|
|
267
|
-
"dezembro"
|
|
268
|
-
]
|
|
269
|
-
};
|
|
270
|
-
var dayValues = {
|
|
271
|
-
narrow: ["D", "S", "T", "Q", "Q", "S", "S"],
|
|
272
|
-
short: ["dom", "seg", "ter", "qua", "qui", "sex", "sab"],
|
|
273
|
-
abbreviated: [
|
|
274
|
-
"domingo",
|
|
275
|
-
"segunda",
|
|
276
|
-
"ter\xE7a",
|
|
277
|
-
"quarta",
|
|
278
|
-
"quinta",
|
|
279
|
-
"sexta",
|
|
280
|
-
"s\xE1bado"
|
|
281
|
-
],
|
|
282
|
-
wide: [
|
|
283
|
-
"domingo",
|
|
284
|
-
"segunda-feira",
|
|
285
|
-
"ter\xE7a-feira",
|
|
286
|
-
"quarta-feira",
|
|
287
|
-
"quinta-feira",
|
|
288
|
-
"sexta-feira",
|
|
289
|
-
"s\xE1bado"
|
|
290
|
-
]
|
|
291
|
-
};
|
|
292
|
-
var dayPeriodValues = {
|
|
293
|
-
narrow: {
|
|
294
|
-
am: "a",
|
|
295
|
-
pm: "p",
|
|
296
|
-
midnight: "mn",
|
|
297
|
-
noon: "md",
|
|
298
|
-
morning: "manh\xE3",
|
|
299
|
-
afternoon: "tarde",
|
|
300
|
-
evening: "tarde",
|
|
301
|
-
night: "noite"
|
|
302
|
-
},
|
|
303
|
-
abbreviated: {
|
|
304
|
-
am: "AM",
|
|
305
|
-
pm: "PM",
|
|
306
|
-
midnight: "meia-noite",
|
|
307
|
-
noon: "meio-dia",
|
|
308
|
-
morning: "manh\xE3",
|
|
309
|
-
afternoon: "tarde",
|
|
310
|
-
evening: "tarde",
|
|
311
|
-
night: "noite"
|
|
312
|
-
},
|
|
313
|
-
wide: {
|
|
314
|
-
am: "a.m.",
|
|
315
|
-
pm: "p.m.",
|
|
316
|
-
midnight: "meia-noite",
|
|
317
|
-
noon: "meio-dia",
|
|
318
|
-
morning: "manh\xE3",
|
|
319
|
-
afternoon: "tarde",
|
|
320
|
-
evening: "tarde",
|
|
321
|
-
night: "noite"
|
|
322
|
-
}
|
|
323
|
-
};
|
|
324
|
-
var formattingDayPeriodValues = {
|
|
325
|
-
narrow: {
|
|
326
|
-
am: "a",
|
|
327
|
-
pm: "p",
|
|
328
|
-
midnight: "mn",
|
|
329
|
-
noon: "md",
|
|
330
|
-
morning: "da manh\xE3",
|
|
331
|
-
afternoon: "da tarde",
|
|
332
|
-
evening: "da tarde",
|
|
333
|
-
night: "da noite"
|
|
334
|
-
},
|
|
335
|
-
abbreviated: {
|
|
336
|
-
am: "AM",
|
|
337
|
-
pm: "PM",
|
|
338
|
-
midnight: "meia-noite",
|
|
339
|
-
noon: "meio-dia",
|
|
340
|
-
morning: "da manh\xE3",
|
|
341
|
-
afternoon: "da tarde",
|
|
342
|
-
evening: "da tarde",
|
|
343
|
-
night: "da noite"
|
|
344
|
-
},
|
|
345
|
-
wide: {
|
|
346
|
-
am: "a.m.",
|
|
347
|
-
pm: "p.m.",
|
|
348
|
-
midnight: "meia-noite",
|
|
349
|
-
noon: "meio-dia",
|
|
350
|
-
morning: "da manh\xE3",
|
|
351
|
-
afternoon: "da tarde",
|
|
352
|
-
evening: "da tarde",
|
|
353
|
-
night: "da noite"
|
|
354
|
-
}
|
|
355
|
-
};
|
|
356
|
-
var ordinalNumber = (dirtyNumber, options) => {
|
|
357
|
-
const number = Number(dirtyNumber);
|
|
358
|
-
if (options?.unit === "week") {
|
|
359
|
-
return number + "\xAA";
|
|
360
|
-
}
|
|
361
|
-
return number + "\xBA";
|
|
362
|
-
};
|
|
363
|
-
var localize = {
|
|
364
|
-
ordinalNumber,
|
|
365
|
-
era: buildLocalizeFn({
|
|
366
|
-
values: eraValues,
|
|
367
|
-
defaultWidth: "wide"
|
|
368
|
-
}),
|
|
369
|
-
quarter: buildLocalizeFn({
|
|
370
|
-
values: quarterValues,
|
|
371
|
-
defaultWidth: "wide",
|
|
372
|
-
argumentCallback: (quarter) => quarter - 1
|
|
373
|
-
}),
|
|
374
|
-
month: buildLocalizeFn({
|
|
375
|
-
values: monthValues,
|
|
376
|
-
defaultWidth: "wide"
|
|
377
|
-
}),
|
|
378
|
-
day: buildLocalizeFn({
|
|
379
|
-
values: dayValues,
|
|
380
|
-
defaultWidth: "wide"
|
|
381
|
-
}),
|
|
382
|
-
dayPeriod: buildLocalizeFn({
|
|
383
|
-
values: dayPeriodValues,
|
|
384
|
-
defaultWidth: "wide",
|
|
385
|
-
formattingValues: formattingDayPeriodValues,
|
|
386
|
-
defaultFormattingWidth: "wide"
|
|
387
|
-
})
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
// ../../node_modules/date-fns/locale/pt-BR/_lib/match.js
|
|
391
|
-
var matchOrdinalNumberPattern = /^(\d+)[ºªo]?/i;
|
|
392
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
393
|
-
var matchEraPatterns = {
|
|
394
|
-
narrow: /^(ac|dc|a|d)/i,
|
|
395
|
-
abbreviated: /^(a\.?\s?c\.?|d\.?\s?c\.?)/i,
|
|
396
|
-
wide: /^(antes de cristo|depois de cristo)/i
|
|
397
|
-
};
|
|
398
|
-
var parseEraPatterns = {
|
|
399
|
-
any: [/^ac/i, /^dc/i],
|
|
400
|
-
wide: [/^antes de cristo/i, /^depois de cristo/i]
|
|
401
|
-
};
|
|
402
|
-
var matchQuarterPatterns = {
|
|
403
|
-
narrow: /^[1234]/i,
|
|
404
|
-
abbreviated: /^T[1234]/i,
|
|
405
|
-
wide: /^[1234](º)? trimestre/i
|
|
406
|
-
};
|
|
407
|
-
var parseQuarterPatterns = {
|
|
408
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
409
|
-
};
|
|
410
|
-
var matchMonthPatterns = {
|
|
411
|
-
narrow: /^[jfmajsond]/i,
|
|
412
|
-
abbreviated: /^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,
|
|
413
|
-
wide: /^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i
|
|
414
|
-
};
|
|
415
|
-
var parseMonthPatterns = {
|
|
416
|
-
narrow: [
|
|
417
|
-
/^j/i,
|
|
418
|
-
/^f/i,
|
|
419
|
-
/^m/i,
|
|
420
|
-
/^a/i,
|
|
421
|
-
/^m/i,
|
|
422
|
-
/^j/i,
|
|
423
|
-
/^j/i,
|
|
424
|
-
/^a/i,
|
|
425
|
-
/^s/i,
|
|
426
|
-
/^o/i,
|
|
427
|
-
/^n/i,
|
|
428
|
-
/^d/i
|
|
429
|
-
],
|
|
430
|
-
any: [
|
|
431
|
-
/^ja/i,
|
|
432
|
-
/^fev/i,
|
|
433
|
-
/^mar/i,
|
|
434
|
-
/^abr/i,
|
|
435
|
-
/^mai/i,
|
|
436
|
-
/^jun/i,
|
|
437
|
-
/^jul/i,
|
|
438
|
-
/^ago/i,
|
|
439
|
-
/^set/i,
|
|
440
|
-
/^out/i,
|
|
441
|
-
/^nov/i,
|
|
442
|
-
/^dez/i
|
|
443
|
-
]
|
|
444
|
-
};
|
|
445
|
-
var matchDayPatterns = {
|
|
446
|
-
narrow: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
447
|
-
short: /^(dom|[23456]ª?|s[aá]b)/i,
|
|
448
|
-
abbreviated: /^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,
|
|
449
|
-
wide: /^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i
|
|
450
|
-
};
|
|
451
|
-
var parseDayPatterns = {
|
|
452
|
-
short: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
453
|
-
narrow: [/^d/i, /^2/i, /^3/i, /^4/i, /^5/i, /^6/i, /^s[aá]/i],
|
|
454
|
-
any: [/^d/i, /^seg/i, /^t/i, /^qua/i, /^qui/i, /^sex/i, /^s[aá]b/i]
|
|
455
|
-
};
|
|
456
|
-
var matchDayPeriodPatterns = {
|
|
457
|
-
narrow: /^(a|p|mn|md|(da) (manhã|tarde|noite))/i,
|
|
458
|
-
any: /^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i
|
|
459
|
-
};
|
|
460
|
-
var parseDayPeriodPatterns = {
|
|
461
|
-
any: {
|
|
462
|
-
am: /^a/i,
|
|
463
|
-
pm: /^p/i,
|
|
464
|
-
midnight: /^mn|^meia[-\s]noite/i,
|
|
465
|
-
noon: /^md|^meio[-\s]dia/i,
|
|
466
|
-
morning: /manhã/i,
|
|
467
|
-
afternoon: /tarde/i,
|
|
468
|
-
evening: /tarde/i,
|
|
469
|
-
night: /noite/i
|
|
470
|
-
}
|
|
471
|
-
};
|
|
472
|
-
var match = {
|
|
473
|
-
ordinalNumber: buildMatchPatternFn({
|
|
474
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
475
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
476
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
477
|
-
}),
|
|
478
|
-
era: buildMatchFn({
|
|
479
|
-
matchPatterns: matchEraPatterns,
|
|
480
|
-
defaultMatchWidth: "wide",
|
|
481
|
-
parsePatterns: parseEraPatterns,
|
|
482
|
-
defaultParseWidth: "any"
|
|
483
|
-
}),
|
|
484
|
-
quarter: buildMatchFn({
|
|
485
|
-
matchPatterns: matchQuarterPatterns,
|
|
486
|
-
defaultMatchWidth: "wide",
|
|
487
|
-
parsePatterns: parseQuarterPatterns,
|
|
488
|
-
defaultParseWidth: "any",
|
|
489
|
-
valueCallback: (index) => index + 1
|
|
490
|
-
}),
|
|
491
|
-
month: buildMatchFn({
|
|
492
|
-
matchPatterns: matchMonthPatterns,
|
|
493
|
-
defaultMatchWidth: "wide",
|
|
494
|
-
parsePatterns: parseMonthPatterns,
|
|
495
|
-
defaultParseWidth: "any"
|
|
496
|
-
}),
|
|
497
|
-
day: buildMatchFn({
|
|
498
|
-
matchPatterns: matchDayPatterns,
|
|
499
|
-
defaultMatchWidth: "wide",
|
|
500
|
-
parsePatterns: parseDayPatterns,
|
|
501
|
-
defaultParseWidth: "any"
|
|
502
|
-
}),
|
|
503
|
-
dayPeriod: buildMatchFn({
|
|
504
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
505
|
-
defaultMatchWidth: "any",
|
|
506
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
507
|
-
defaultParseWidth: "any"
|
|
508
|
-
})
|
|
509
|
-
};
|
|
510
|
-
|
|
511
|
-
// ../../node_modules/date-fns/locale/pt-BR.js
|
|
512
|
-
var ptBR = {
|
|
513
|
-
code: "pt-BR",
|
|
514
|
-
formatDistance,
|
|
515
|
-
formatLong,
|
|
516
|
-
formatRelative,
|
|
517
|
-
localize,
|
|
518
|
-
match,
|
|
519
|
-
options: {
|
|
520
|
-
weekStartsOn: 0,
|
|
521
|
-
firstWeekContainsDate: 1
|
|
522
|
-
}
|
|
523
|
-
};
|
|
524
|
-
|
|
525
|
-
// src/components/calendar.tsx
|
|
526
|
-
import { cx as cx3 } from "@xjur-ui/util";
|
|
527
|
-
import {
|
|
528
|
-
DayPicker,
|
|
529
|
-
getDefaultClassNames
|
|
530
|
-
} from "react-day-picker";
|
|
531
|
-
|
|
532
|
-
// src/components/icon.tsx
|
|
533
|
-
import { cx } from "@xjur-ui/util";
|
|
534
|
-
import { jsx } from "react/jsx-runtime";
|
|
535
|
-
function Icon({ className, filled = false, name, ...props }) {
|
|
536
|
-
return /* @__PURE__ */ jsx(
|
|
537
|
-
"span",
|
|
538
|
-
{
|
|
539
|
-
...props,
|
|
540
|
-
className: cx(
|
|
541
|
-
"material-symbols-outlined",
|
|
542
|
-
"text-size-body-lg",
|
|
543
|
-
className
|
|
544
|
-
),
|
|
545
|
-
style: {
|
|
546
|
-
fontVariationSettings: `'FILL' ${filled ? 1 : 0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,
|
|
547
|
-
...props.style
|
|
548
|
-
},
|
|
549
|
-
children: name
|
|
550
|
-
}
|
|
551
|
-
);
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
// src/components/button.tsx
|
|
555
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
556
|
-
import { cva, cx as cx2 } from "@xjur-ui/util";
|
|
557
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
558
|
-
var buttonVariants = cva(
|
|
559
|
-
[
|
|
560
|
-
"outline-none inline-flex items-center justify-center rounded-circle gap-small cursor-pointer disabled:opacity-38 disabled:pointer-events-none transition-colors"
|
|
561
|
-
],
|
|
562
|
-
{
|
|
563
|
-
variants: {
|
|
564
|
-
size: {
|
|
565
|
-
md: "py-small_1x-alt px-medium text-size-body-md",
|
|
566
|
-
sm: "py-small-1x px-small text-size-label-sm",
|
|
567
|
-
icon_md: "p-small text-size-body-md h-large-4x w-large-4x",
|
|
568
|
-
icon_sm: "p-small-1x text-size-label-sm h-large-2x w-large-2x"
|
|
569
|
-
},
|
|
570
|
-
variant: {
|
|
571
|
-
primary: "",
|
|
572
|
-
secondary: "",
|
|
573
|
-
tertiary: "",
|
|
574
|
-
destructive: "",
|
|
575
|
-
outlined: "bg-layer-2-idle border border-border-layer-2 hover:bg-layer-2-hover active:bg-layer-2-pressed"
|
|
576
|
-
},
|
|
577
|
-
appearance: {
|
|
578
|
-
solid: "",
|
|
579
|
-
ghost: "bg-transparent"
|
|
580
|
-
}
|
|
581
|
-
},
|
|
582
|
-
compoundVariants: [
|
|
583
|
-
{
|
|
584
|
-
variant: "primary",
|
|
585
|
-
appearance: "solid",
|
|
586
|
-
class: "bg-primary-idle text-neutral-label hover:bg-primary-hover active:bg-primary-pressed"
|
|
587
|
-
},
|
|
588
|
-
{
|
|
589
|
-
variant: "primary",
|
|
590
|
-
appearance: "ghost",
|
|
591
|
-
class: "text-primary-idle hover:bg-primary-alt-idle active:bg-primary-alt-pressed"
|
|
592
|
-
},
|
|
593
|
-
{
|
|
594
|
-
variant: "secondary",
|
|
595
|
-
appearance: "solid",
|
|
596
|
-
class: "bg-layer-1-hover text-neutral-dark hover:bg-layer-1-pressed active:bg-layer-1-active"
|
|
597
|
-
},
|
|
598
|
-
{
|
|
599
|
-
variant: "secondary",
|
|
600
|
-
appearance: "ghost",
|
|
601
|
-
class: "hover:bg-layer-1-hover active:bg-layer-1-pressed"
|
|
602
|
-
},
|
|
603
|
-
{
|
|
604
|
-
variant: "tertiary",
|
|
605
|
-
appearance: "solid",
|
|
606
|
-
class: "bg-layer-2-hover text-neutral-dark hover:bg-layer-2-pressed active:bg-layer-2-active"
|
|
607
|
-
},
|
|
608
|
-
{
|
|
609
|
-
variant: "tertiary",
|
|
610
|
-
appearance: "ghost",
|
|
611
|
-
class: "hover:bg-layer-2-hover active:bg-layer-2-pressed"
|
|
612
|
-
},
|
|
613
|
-
{
|
|
614
|
-
variant: "destructive",
|
|
615
|
-
appearance: "solid",
|
|
616
|
-
class: "bg-danger-idle text-neutral-label hover:bg-danger-hover active:bg-danger-pressed"
|
|
617
|
-
},
|
|
618
|
-
{
|
|
619
|
-
variant: "destructive",
|
|
620
|
-
appearance: "ghost",
|
|
621
|
-
class: "text-danger-label-idle hover:bg-danger-alt-idle active:bg-danger-alt-pressed"
|
|
622
|
-
}
|
|
623
|
-
],
|
|
624
|
-
defaultVariants: {
|
|
625
|
-
size: "md",
|
|
626
|
-
variant: "primary",
|
|
627
|
-
appearance: "solid"
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
);
|
|
631
|
-
function Button({
|
|
632
|
-
asChild,
|
|
633
|
-
className,
|
|
634
|
-
variant = "primary",
|
|
635
|
-
size = "md",
|
|
636
|
-
appearance = "solid",
|
|
637
|
-
...props
|
|
638
|
-
}) {
|
|
639
|
-
const Component = asChild ? Slot : "button";
|
|
640
|
-
return /* @__PURE__ */ jsx2(
|
|
641
|
-
Component,
|
|
642
|
-
{
|
|
643
|
-
className: cx2(buttonVariants({ variant, appearance, size }), className),
|
|
644
|
-
...props
|
|
645
|
-
}
|
|
646
|
-
);
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
// src/components/calendar.tsx
|
|
650
|
-
import {} from "react-day-picker";
|
|
651
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
652
|
-
function capitalize(str) {
|
|
653
|
-
return str.charAt(0).toUpperCase() + str.slice(1);
|
|
654
|
-
}
|
|
655
|
-
function Calendar({
|
|
656
|
-
showOutsideDays = true,
|
|
657
|
-
locale = ptBR,
|
|
658
|
-
navLayout = "around",
|
|
659
|
-
handleClear,
|
|
660
|
-
handleToday,
|
|
661
|
-
...props
|
|
662
|
-
}) {
|
|
663
|
-
const defaultClassNames = getDefaultClassNames();
|
|
664
|
-
const classNames = {
|
|
665
|
-
root: cx3(
|
|
666
|
-
"bg-layer-2-idle shadow-elevation-2 rounded-[6px] p-small w-fit border border-border-layer-2 text-size-body-md text-neutral-dark font-inter",
|
|
667
|
-
defaultClassNames.root
|
|
668
|
-
),
|
|
669
|
-
day: cx3("rounded-circle hover:bg-layer-2-hover"),
|
|
670
|
-
caption_label: cx3(
|
|
671
|
-
"text-size-label-md text-neutral-dark font-medium",
|
|
672
|
-
defaultClassNames.caption_label
|
|
673
|
-
),
|
|
674
|
-
outside: cx3("text-neutral-placeholder", defaultClassNames.outside),
|
|
675
|
-
selected: cx3(
|
|
676
|
-
"text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:bg-primary-alt-active"
|
|
677
|
-
),
|
|
678
|
-
disabled: cx3("opacity-60", defaultClassNames.disabled),
|
|
679
|
-
today: cx3(
|
|
680
|
-
"!text-primary-label-active font-medium",
|
|
681
|
-
defaultClassNames.today
|
|
682
|
-
),
|
|
683
|
-
range_start: cx3(
|
|
684
|
-
"text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:bg-primary-alt-active"
|
|
685
|
-
),
|
|
686
|
-
range_end: cx3(
|
|
687
|
-
"text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:bg-primary-alt-active"
|
|
688
|
-
),
|
|
689
|
-
range_middle: cx3("!bg-layer-2-hover !text-primary-label-active")
|
|
690
|
-
};
|
|
691
|
-
return /* @__PURE__ */ jsx3(
|
|
692
|
-
DayPicker,
|
|
693
|
-
{
|
|
694
|
-
classNames: { ...classNames, ...props.classNames },
|
|
695
|
-
components: {
|
|
696
|
-
Chevron: ({ orientation }) => {
|
|
697
|
-
const icon = orientation === "left" ? "chevron_left" : "chevron_right";
|
|
698
|
-
return /* @__PURE__ */ jsx3(
|
|
699
|
-
Icon,
|
|
700
|
-
{
|
|
701
|
-
className: "size-large text-icon-neutral-3",
|
|
702
|
-
name: icon
|
|
703
|
-
}
|
|
704
|
-
);
|
|
705
|
-
},
|
|
706
|
-
...props.components
|
|
707
|
-
},
|
|
708
|
-
footer: (handleClear || handleToday) && /* @__PURE__ */ jsxs("div", { className: "py-small border-border-layer-2 mt-small flex h-full w-full items-center justify-between border-t", children: [
|
|
709
|
-
handleToday && /* @__PURE__ */ jsx3(
|
|
710
|
-
Button,
|
|
711
|
-
{
|
|
712
|
-
appearance: "ghost",
|
|
713
|
-
variant: "secondary",
|
|
714
|
-
onClick: handleToday,
|
|
715
|
-
children: "Hoje"
|
|
716
|
-
}
|
|
717
|
-
),
|
|
718
|
-
handleClear && /* @__PURE__ */ jsx3(
|
|
719
|
-
Button,
|
|
720
|
-
{
|
|
721
|
-
appearance: "ghost",
|
|
722
|
-
variant: "secondary",
|
|
723
|
-
onClick: handleClear,
|
|
724
|
-
children: "Limpar"
|
|
725
|
-
}
|
|
726
|
-
)
|
|
727
|
-
] }),
|
|
728
|
-
formatters: {
|
|
729
|
-
formatWeekdayName: (date) => {
|
|
730
|
-
const weekday = date.toLocaleDateString("pt-BR", { weekday: "short" });
|
|
731
|
-
return weekday.charAt(0).toUpperCase() + weekday.slice(1).replace(".", "");
|
|
732
|
-
},
|
|
733
|
-
formatCaption(month) {
|
|
734
|
-
const monthName = month.toLocaleDateString("pt-BR", {
|
|
735
|
-
month: "long"
|
|
736
|
-
});
|
|
737
|
-
return `${capitalize(monthName)} ${month.getFullYear()}`;
|
|
738
|
-
},
|
|
739
|
-
...props.formatters
|
|
740
|
-
},
|
|
741
|
-
locale,
|
|
742
|
-
mode: props.mode ?? "single",
|
|
743
|
-
navLayout,
|
|
744
|
-
showOutsideDays,
|
|
745
|
-
...props
|
|
746
|
-
}
|
|
747
|
-
);
|
|
748
|
-
}
|
|
749
|
-
export {
|
|
750
|
-
Calendar
|
|
751
|
-
};
|
|
1
|
+
import {b}from'../chunk-FASEHVMD.js';import {b as b$1}from'../chunk-SHHXKVVR.js';import'react-day-picker/style.css';import {cx}from'@xjur-ui/util';import {getDefaultClassNames,DayPicker}from'react-day-picker';import {jsx,jsxs}from'react/jsx-runtime';function h(e){return (a={})=>{let t=a.width?String(a.width):e.defaultWidth;return e.formats[t]||e.formats[e.defaultWidth]}}function c(e){return (a,t)=>{let r=t?.context?String(t.context):"standalone",n;if(r==="formatting"&&e.formattingValues){let o=e.defaultFormattingWidth||e.defaultWidth,d=t?.width?String(t.width):o;n=e.formattingValues[d]||e.formattingValues[o];}else {let o=e.defaultWidth,d=t?.width?String(t.width):e.defaultWidth;n=e.values[d]||e.values[o];}let i=e.argumentCallback?e.argumentCallback(a):a;return n[i]}}function u(e){return (a,t={})=>{let r=t.width,n=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],i=a.match(n);if(!i)return null;let o=i[0],d=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(d)?j(d,p=>p.test(o)):C(d,p=>p.test(o)),s;s=e.valueCallback?e.valueCallback(l):l,s=t.valueCallback?t.valueCallback(s):s;let M=a.slice(o.length);return {value:s,rest:M}}}function C(e,a){for(let t in e)if(Object.prototype.hasOwnProperty.call(e,t)&&a(e[t]))return t}function j(e,a){for(let t=0;t<e.length;t++)if(a(e[t]))return t}function v(e){return (a,t={})=>{let r=a.match(e.matchPattern);if(!r)return null;let n=r[0],i=a.match(e.parsePattern);if(!i)return null;let o=e.valueCallback?e.valueCallback(i[0]):i[0];o=t.valueCallback?t.valueCallback(o):o;let d=a.slice(n.length);return {value:o,rest:d}}}var D={lessThanXSeconds:{one:"menos de um segundo",other:"menos de {{count}} segundos"},xSeconds:{one:"1 segundo",other:"{{count}} segundos"},halfAMinute:"meio minuto",lessThanXMinutes:{one:"menos de um minuto",other:"menos de {{count}} minutos"},xMinutes:{one:"1 minuto",other:"{{count}} minutos"},aboutXHours:{one:"cerca de 1 hora",other:"cerca de {{count}} horas"},xHours:{one:"1 hora",other:"{{count}} horas"},xDays:{one:"1 dia",other:"{{count}} dias"},aboutXWeeks:{one:"cerca de 1 semana",other:"cerca de {{count}} semanas"},xWeeks:{one:"1 semana",other:"{{count}} semanas"},aboutXMonths:{one:"cerca de 1 m\xEAs",other:"cerca de {{count}} meses"},xMonths:{one:"1 m\xEAs",other:"{{count}} meses"},aboutXYears:{one:"cerca de 1 ano",other:"cerca de {{count}} anos"},xYears:{one:"1 ano",other:"{{count}} anos"},overXYears:{one:"mais de 1 ano",other:"mais de {{count}} anos"},almostXYears:{one:"quase 1 ano",other:"quase {{count}} anos"}},g=(e,a,t)=>{let r,n=D[e];return typeof n=="string"?r=n:a===1?r=n.one:r=n.other.replace("{{count}}",String(a)),t?.addSuffix?t.comparison&&t.comparison>0?"em "+r:"h\xE1 "+r:r};var z={full:"EEEE, d 'de' MMMM 'de' y",long:"d 'de' MMMM 'de' y",medium:"d MMM y",short:"dd/MM/yyyy"},q={full:"HH:mm:ss zzzz",long:"HH:mm:ss z",medium:"HH:mm:ss",short:"HH:mm"},F={full:"{{date}} '\xE0s' {{time}}",long:"{{date}} '\xE0s' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},P={date:h({formats:z,defaultWidth:"full"}),time:h({formats:q,defaultWidth:"full"}),dateTime:h({formats:F,defaultWidth:"full"})};var N={lastWeek:e=>{let a=e.getDay();return "'"+(a===0||a===6?"\xFAltimo":"\xFAltima")+"' eeee '\xE0s' p"},yesterday:"'ontem \xE0s' p",today:"'hoje \xE0s' p",tomorrow:"'amanh\xE3 \xE0s' p",nextWeek:"eeee '\xE0s' p",other:"P"},w=(e,a,t,r)=>{let n=N[e];return typeof n=="function"?n(a):n};var S={narrow:["AC","DC"],abbreviated:["AC","DC"],wide:["antes de cristo","depois de cristo"]},L={narrow:["1","2","3","4"],abbreviated:["T1","T2","T3","T4"],wide:["1\xBA trimestre","2\xBA trimestre","3\xBA trimestre","4\xBA trimestre"]},R={narrow:["j","f","m","a","m","j","j","a","s","o","n","d"],abbreviated:["jan","fev","mar","abr","mai","jun","jul","ago","set","out","nov","dez"],wide:["janeiro","fevereiro","mar\xE7o","abril","maio","junho","julho","agosto","setembro","outubro","novembro","dezembro"]},H={narrow:["D","S","T","Q","Q","S","S"],short:["dom","seg","ter","qua","qui","sex","sab"],abbreviated:["domingo","segunda","ter\xE7a","quarta","quinta","sexta","s\xE1bado"],wide:["domingo","segunda-feira","ter\xE7a-feira","quarta-feira","quinta-feira","sexta-feira","s\xE1bado"]},T={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"manh\xE3",afternoon:"tarde",evening:"tarde",night:"noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"manh\xE3",afternoon:"tarde",evening:"tarde",night:"noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"manh\xE3",afternoon:"tarde",evening:"tarde",night:"noite"}},V={narrow:{am:"a",pm:"p",midnight:"mn",noon:"md",morning:"da manh\xE3",afternoon:"da tarde",evening:"da tarde",night:"da noite"},abbreviated:{am:"AM",pm:"PM",midnight:"meia-noite",noon:"meio-dia",morning:"da manh\xE3",afternoon:"da tarde",evening:"da tarde",night:"da noite"},wide:{am:"a.m.",pm:"p.m.",midnight:"meia-noite",noon:"meio-dia",morning:"da manh\xE3",afternoon:"da tarde",evening:"da tarde",night:"da noite"}},A=(e,a)=>{let t=Number(e);return a?.unit==="week"?t+"\xAA":t+"\xBA"},x={ordinalNumber:A,era:c({values:S,defaultWidth:"wide"}),quarter:c({values:L,defaultWidth:"wide",argumentCallback:e=>e-1}),month:c({values:R,defaultWidth:"wide"}),day:c({values:H,defaultWidth:"wide"}),dayPeriod:c({values:T,defaultWidth:"wide",formattingValues:V,defaultFormattingWidth:"wide"})};var _=/^(\d+)[ºªo]?/i,B=/\d+/i,X={narrow:/^(ac|dc|a|d)/i,abbreviated:/^(a\.?\s?c\.?|d\.?\s?c\.?)/i,wide:/^(antes de cristo|depois de cristo)/i},E={any:[/^ac/i,/^dc/i],wide:[/^antes de cristo/i,/^depois de cristo/i]},O={narrow:/^[1234]/i,abbreviated:/^T[1234]/i,wide:/^[1234](º)? trimestre/i},I={any:[/1/i,/2/i,/3/i,/4/i]},Y={narrow:/^[jfmajsond]/i,abbreviated:/^(jan|fev|mar|abr|mai|jun|jul|ago|set|out|nov|dez)/i,wide:/^(janeiro|fevereiro|março|abril|maio|junho|julho|agosto|setembro|outubro|novembro|dezembro)/i},Q={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^fev/i,/^mar/i,/^abr/i,/^mai/i,/^jun/i,/^jul/i,/^ago/i,/^set/i,/^out/i,/^nov/i,/^dez/i]},U={narrow:/^(dom|[23456]ª?|s[aá]b)/i,short:/^(dom|[23456]ª?|s[aá]b)/i,abbreviated:/^(dom|seg|ter|qua|qui|sex|s[aá]b)/i,wide:/^(domingo|(segunda|ter[cç]a|quarta|quinta|sexta)([- ]feira)?|s[aá]bado)/i},$={short:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],narrow:[/^d/i,/^2/i,/^3/i,/^4/i,/^5/i,/^6/i,/^s[aá]/i],any:[/^d/i,/^seg/i,/^t/i,/^qua/i,/^qui/i,/^sex/i,/^s[aá]b/i]},K={narrow:/^(a|p|mn|md|(da) (manhã|tarde|noite))/i,any:/^([ap]\.?\s?m\.?|meia[-\s]noite|meio[-\s]dia|(da) (manhã|tarde|noite))/i},G={any:{am:/^a/i,pm:/^p/i,midnight:/^mn|^meia[-\s]noite/i,noon:/^md|^meio[-\s]dia/i,morning:/manhã/i,afternoon:/tarde/i,evening:/tarde/i,night:/noite/i}},k={ordinalNumber:v({matchPattern:_,parsePattern:B,valueCallback:e=>parseInt(e,10)}),era:u({matchPatterns:X,defaultMatchWidth:"wide",parsePatterns:E,defaultParseWidth:"any"}),quarter:u({matchPatterns:O,defaultMatchWidth:"wide",parsePatterns:I,defaultParseWidth:"any",valueCallback:e=>e+1}),month:u({matchPatterns:Y,defaultMatchWidth:"wide",parsePatterns:Q,defaultParseWidth:"any"}),day:u({matchPatterns:U,defaultMatchWidth:"wide",parsePatterns:$,defaultParseWidth:"any"}),dayPeriod:u({matchPatterns:K,defaultMatchWidth:"any",parsePatterns:G,defaultParseWidth:"any"})};var W={code:"pt-BR",formatDistance:g,formatLong:P,formatRelative:w,localize:x,match:k,options:{weekStartsOn:0,firstWeekContainsDate:1}};function ee(e){return e.charAt(0).toUpperCase()+e.slice(1)}function je({showOutsideDays:e=true,locale:a=W,navLayout:t="around",handleClear:r,handleToday:n,...i}){let o=getDefaultClassNames(),d={root:cx("bg-layer-2-idle shadow-elevation-2 rounded-[6px] p-small w-fit border border-border-layer-2 text-size-body-md text-neutral-dark font-inter",o.root),day:cx("rounded-circle hover:bg-layer-2-hover"),caption_label:cx("text-size-label-md text-neutral-dark font-medium",o.caption_label),outside:cx("text-neutral-placeholder",o.outside),selected:cx("text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active"),disabled:cx("opacity-60",o.disabled),today:cx("text-neutral-dark font-medium bg-layer-2-active hover:!bg-layer-2-active"),range_start:cx("rounded-r-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active"),range_end:cx("rounded-l-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active"),range_middle:cx("!bg-primary-alt-active !text-primary-label-active rounded-none hover:!bg-primary-alt-active")};return jsx(DayPicker,{classNames:{...d,...i.classNames},components:{Chevron:({orientation:l})=>jsx(b$1,{className:"size-large text-icon-neutral-3",name:l==="left"?"chevron_left":"chevron_right"}),...i.components},footer:(r||n)&&jsxs("div",{className:"py-small border-border-layer-2 mt-small flex h-full w-full items-center justify-between border-t",children:[n&&jsx(b,{appearance:"ghost",variant:"secondary",onClick:n,children:"Hoje"}),r&&jsx(b,{appearance:"ghost",variant:"secondary",onClick:r,children:"Limpar"})]}),formatters:{formatWeekdayName:l=>{let s=l.toLocaleDateString("pt-BR",{weekday:"short"});return s.charAt(0).toUpperCase()+s.slice(1).replace(".","")},formatCaption(l){let s=l.toLocaleDateString("pt-BR",{month:"long"});return `${ee(s)} ${l.getFullYear()}`},...i.formatters},locale:a,mode:i.mode??"single",navLayout:t,showOutsideDays:e,...i})}export{je as Calendar};//# sourceMappingURL=calendar.js.map
|
|
2
|
+
//# sourceMappingURL=calendar.js.map
|