@xjur-ui/react 1.0.6 → 2.1.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 +279 -68
- package/CHANGELOG.md +114 -0
- package/README.md +146 -0
- package/dist/chunk-2CM3SFOY.js +2 -0
- package/dist/chunk-2CM3SFOY.js.map +1 -0
- package/dist/chunk-2CTBH6VI.js +2 -0
- package/dist/chunk-2CTBH6VI.js.map +1 -0
- package/dist/chunk-4BGTC333.js +2 -0
- package/dist/chunk-4BGTC333.js.map +1 -0
- package/dist/chunk-5WLIDYZH.js +2 -0
- package/dist/chunk-5WLIDYZH.js.map +1 -0
- package/dist/chunk-6AD6O6II.js +2 -0
- package/dist/chunk-6AD6O6II.js.map +1 -0
- package/dist/chunk-AA6V5YEC.js +2 -0
- package/dist/chunk-AA6V5YEC.js.map +1 -0
- package/dist/chunk-BK6FP63A.js +2 -0
- package/dist/chunk-BK6FP63A.js.map +1 -0
- package/dist/chunk-BZDGWC5O.js +2 -0
- package/dist/chunk-BZDGWC5O.js.map +1 -0
- package/dist/chunk-CBFC4QME.js +2 -0
- package/dist/chunk-CBFC4QME.js.map +1 -0
- package/dist/chunk-CI3ZXWEX.js +2 -0
- package/dist/chunk-CI3ZXWEX.js.map +1 -0
- package/dist/chunk-DFXHNK5D.js +2 -0
- package/dist/chunk-DFXHNK5D.js.map +1 -0
- package/dist/chunk-EIG6CBTQ.js +2 -0
- package/dist/chunk-EIG6CBTQ.js.map +1 -0
- package/dist/chunk-EXC2XOL6.js +2 -0
- package/dist/chunk-EXC2XOL6.js.map +1 -0
- package/dist/chunk-F4DYKYWJ.js +2 -0
- package/dist/chunk-F4DYKYWJ.js.map +1 -0
- package/dist/chunk-F5ZLEQGN.js +2 -0
- package/dist/chunk-F5ZLEQGN.js.map +1 -0
- package/dist/chunk-IKL6PSXU.js +2 -0
- package/dist/chunk-IKL6PSXU.js.map +1 -0
- package/dist/chunk-IRHU7PDO.js +2 -0
- package/dist/chunk-IRHU7PDO.js.map +1 -0
- package/dist/chunk-J4X5RQTR.js +2 -0
- package/dist/chunk-J4X5RQTR.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-L4ET6GIZ.js +2 -0
- package/dist/chunk-L4ET6GIZ.js.map +1 -0
- package/dist/chunk-MZSV4LNY.js +2 -0
- package/dist/chunk-MZSV4LNY.js.map +1 -0
- package/dist/chunk-NELCN6E2.js +2 -0
- package/dist/chunk-NELCN6E2.js.map +1 -0
- package/dist/chunk-OS53BV63.js +3 -0
- package/dist/chunk-OS53BV63.js.map +1 -0
- package/dist/chunk-PKCW37CJ.js +2 -0
- package/dist/chunk-PKCW37CJ.js.map +1 -0
- package/dist/chunk-RWMV7APX.js +2 -0
- package/dist/chunk-RWMV7APX.js.map +1 -0
- package/dist/chunk-SLAAEXWI.js +2 -0
- package/dist/chunk-SLAAEXWI.js.map +1 -0
- package/dist/chunk-SXGSWVMZ.js +2 -0
- package/dist/chunk-SXGSWVMZ.js.map +1 -0
- package/dist/chunk-TB6KI6CL.js +2 -0
- package/dist/chunk-TB6KI6CL.js.map +1 -0
- package/dist/chunk-TSVURBUY.js +2 -0
- package/dist/chunk-TSVURBUY.js.map +1 -0
- package/dist/chunk-UXIVZWLB.js +2 -0
- package/dist/chunk-UXIVZWLB.js.map +1 -0
- package/dist/chunk-WEBAXQID.js +2 -0
- package/dist/chunk-WEBAXQID.js.map +1 -0
- package/dist/chunk-WV7QV2PU.js +2 -0
- package/dist/chunk-WV7QV2PU.js.map +1 -0
- package/dist/chunk-Z47R2CIM.js +2 -0
- package/dist/chunk-Z47R2CIM.js.map +1 -0
- package/dist/chunk-ZVVPUP7V.js +2 -0
- package/dist/chunk-ZVVPUP7V.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/breadcrumb.d.ts +20 -0
- package/dist/components/breadcrumb.js +2 -0
- package/dist/components/breadcrumb.js.map +1 -0
- package/dist/components/chip.d.ts +5 -2
- 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/dialog.d.ts +51 -0
- package/dist/components/dialog.js +2 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/divider.js +2 -29
- package/dist/components/divider.js.map +1 -0
- package/dist/components/drag-and-drop/drag-handle.d.ts +15 -0
- package/dist/components/drag-and-drop/drag-handle.js +2 -0
- package/dist/components/drag-and-drop/drag-handle.js.map +1 -0
- package/dist/components/drag-and-drop/drag-list-item.d.ts +14 -0
- package/dist/components/drag-and-drop/drag-list-item.js +2 -0
- package/dist/components/drag-and-drop/drag-list-item.js.map +1 -0
- package/dist/components/drag-and-drop/drag-list.d.ts +14 -0
- package/dist/components/drag-and-drop/drag-list.js +2 -0
- package/dist/components/drag-and-drop/drag-list.js.map +1 -0
- package/dist/components/drag-and-drop/drag-root.d.ts +6 -0
- package/dist/components/drag-and-drop/drag-root.js +2 -0
- package/dist/components/drag-and-drop/drag-root.js.map +1 -0
- package/dist/components/drag-and-drop/index.d.ts +10 -0
- package/dist/components/drag-and-drop/index.js +2 -0
- package/dist/components/drag-and-drop/index.js.map +1 -0
- package/dist/components/drag-and-drop/types/drag-item.d.ts +9 -0
- package/dist/components/drag-and-drop/types/drag-item.js +2 -0
- package/dist/components/drag-and-drop/types/drag-item.js.map +1 -0
- package/dist/components/dropdown-menu.js +2 -295
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/form/button.js +2 -0
- package/dist/components/form/button.js.map +1 -0
- package/dist/components/form/calendar.js +2 -0
- package/dist/components/form/calendar.js.map +1 -0
- package/dist/components/form/checkbox.js +2 -0
- package/dist/components/form/checkbox.js.map +1 -0
- package/dist/components/form/context/field.context.d.ts +15 -0
- package/dist/components/form/context/field.context.js +2 -0
- package/dist/components/form/context/field.context.js.map +1 -0
- package/dist/components/form/date-picker.d.ts +84 -0
- package/dist/components/form/date-picker.js +2 -0
- package/dist/components/form/date-picker.js.map +1 -0
- package/dist/components/form/floating-label.d.ts +6 -0
- package/dist/components/form/floating-label.js +2 -0
- package/dist/components/form/floating-label.js.map +1 -0
- package/dist/components/form/input.d.ts +95 -0
- package/dist/components/form/input.js +2 -0
- package/dist/components/form/input.js.map +1 -0
- package/dist/components/form/otp-input.js +2 -0
- package/dist/components/form/otp-input.js.map +1 -0
- package/dist/components/form/radio.js +2 -0
- package/dist/components/form/radio.js.map +1 -0
- package/dist/components/{rich-editor.d.ts → form/rich-editor.d.ts} +2 -1
- package/dist/components/form/rich-editor.js +2 -0
- package/dist/components/form/rich-editor.js.map +1 -0
- package/dist/components/form/search-input.js +2 -0
- package/dist/components/form/search-input.js.map +1 -0
- package/dist/components/form/select.d.ts +94 -0
- package/dist/components/form/select.js +2 -0
- package/dist/components/form/select.js.map +1 -0
- package/dist/components/form/switch.js +2 -0
- package/dist/components/form/switch.js.map +1 -0
- package/dist/components/full-calendar/calendar-add-event.d.ts +9 -0
- package/dist/components/full-calendar/calendar-add-event.js +2 -0
- package/dist/components/full-calendar/calendar-add-event.js.map +1 -0
- package/dist/components/full-calendar/calendar-body.d.ts +6 -0
- package/dist/components/full-calendar/calendar-body.js +2 -0
- package/dist/components/full-calendar/calendar-body.js.map +1 -0
- package/dist/components/full-calendar/calendar-cell.d.ts +11 -0
- package/dist/components/full-calendar/calendar-cell.js +2 -0
- package/dist/components/full-calendar/calendar-cell.js.map +1 -0
- package/dist/components/full-calendar/calendar-day-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-day-view.js +2 -0
- package/dist/components/full-calendar/calendar-day-view.js.map +1 -0
- package/dist/components/full-calendar/calendar-event.d.ts +18 -0
- package/dist/components/full-calendar/calendar-event.js +2 -0
- package/dist/components/full-calendar/calendar-event.js.map +1 -0
- package/dist/components/full-calendar/calendar-header.d.ts +6 -0
- package/dist/components/full-calendar/calendar-header.js +2 -0
- package/dist/components/full-calendar/calendar-header.js.map +1 -0
- package/dist/components/full-calendar/calendar-month-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-month-view.js +2 -0
- package/dist/components/full-calendar/calendar-month-view.js.map +1 -0
- package/dist/components/full-calendar/calendar-more-events-dropdown.d.ts +9 -0
- package/dist/components/full-calendar/calendar-more-events-dropdown.js +2 -0
- package/dist/components/full-calendar/calendar-more-events-dropdown.js.map +1 -0
- package/dist/components/full-calendar/calendar-navigator.d.ts +5 -0
- package/dist/components/full-calendar/calendar-navigator.js +2 -0
- package/dist/components/full-calendar/calendar-navigator.js.map +1 -0
- package/dist/components/full-calendar/calendar-root.d.ts +30 -0
- package/dist/components/full-calendar/calendar-root.js +2 -0
- package/dist/components/full-calendar/calendar-root.js.map +1 -0
- package/dist/components/full-calendar/calendar-today-button.d.ts +9 -0
- package/dist/components/full-calendar/calendar-today-button.js +2 -0
- package/dist/components/full-calendar/calendar-today-button.js.map +1 -0
- package/dist/components/full-calendar/calendar-toggle-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-toggle-view.js +2 -0
- package/dist/components/full-calendar/calendar-toggle-view.js.map +1 -0
- package/dist/components/full-calendar/calendar-view-renderer.d.ts +5 -0
- package/dist/components/full-calendar/calendar-view-renderer.js +2 -0
- package/dist/components/full-calendar/calendar-view-renderer.js.map +1 -0
- package/dist/components/full-calendar/calendar-week-day.d.ts +10 -0
- package/dist/components/full-calendar/calendar-week-day.js +2 -0
- package/dist/components/full-calendar/calendar-week-day.js.map +1 -0
- package/dist/components/full-calendar/calendar-week-view.d.ts +5 -0
- package/dist/components/full-calendar/calendar-week-view.js +2 -0
- package/dist/components/full-calendar/calendar-week-view.js.map +1 -0
- package/dist/components/full-calendar/helpers/calendar.d.ts +25 -0
- package/dist/components/full-calendar/helpers/calendar.js +2 -0
- package/dist/components/full-calendar/helpers/calendar.js.map +1 -0
- package/dist/components/full-calendar/index.d.ts +18 -0
- package/dist/components/full-calendar/index.js +2 -0
- package/dist/components/full-calendar/index.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-cell.d.ts +6 -0
- package/dist/components/full-calendar/types/calendar-cell.js +2 -0
- package/dist/components/full-calendar/types/calendar-cell.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-event.d.ts +8 -0
- package/dist/components/full-calendar/types/calendar-event.js +2 -0
- package/dist/components/full-calendar/types/calendar-event.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-view.d.ts +3 -0
- package/dist/components/full-calendar/types/calendar-view.js +2 -0
- package/dist/components/full-calendar/types/calendar-view.js.map +1 -0
- package/dist/components/full-calendar/types/calendar-week-hour.d.ts +6 -0
- package/dist/components/full-calendar/types/calendar-week-hour.js +2 -0
- package/dist/components/full-calendar/types/calendar-week-hour.js.map +1 -0
- package/dist/components/horizontal-scroll.d.ts +11 -0
- package/dist/components/horizontal-scroll.js +2 -0
- package/dist/components/horizontal-scroll.js.map +1 -0
- package/dist/components/icon.d.ts +3 -4
- package/dist/components/icon.js +2 -177
- package/dist/components/icon.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/selection-bar.d.ts +57 -0
- package/dist/components/selection-bar.js +2 -0
- package/dist/components/selection-bar.js.map +1 -0
- package/dist/components/sheet.d.ts +8 -8
- 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/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 +5 -2
- 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/components/upload.d.ts +74 -0
- package/dist/components/upload.js +2 -0
- package/dist/components/upload.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/icons-CmDuL0gZ.d.ts +4 -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 +60 -18
- package/src/components/breadcrumb.tsx +119 -0
- package/src/components/chip.tsx +11 -3
- package/src/components/dialog.tsx +242 -0
- package/src/components/drag-and-drop/drag-handle.tsx +46 -0
- package/src/components/drag-and-drop/drag-list-item.tsx +91 -0
- package/src/components/drag-and-drop/drag-list.tsx +47 -0
- package/src/components/drag-and-drop/drag-root.tsx +30 -0
- package/src/components/drag-and-drop/index.ts +39 -0
- package/src/components/drag-and-drop/types/drag-item.ts +7 -0
- package/src/components/{calendar.tsx → form/calendar.tsx} +9 -8
- package/src/components/{checkbox.tsx → form/checkbox.tsx} +2 -2
- package/src/components/form/context/field.context.ts +27 -0
- package/src/components/form/date-picker.tsx +199 -0
- package/src/components/form/floating-label.tsx +60 -0
- package/src/components/form/input.tsx +235 -0
- package/src/components/{radio.tsx → form/radio.tsx} +1 -1
- package/src/components/{rich-editor.tsx → form/rich-editor.tsx} +10 -9
- package/src/components/{search-input.tsx → form/search-input.tsx} +2 -2
- package/src/components/form/select.tsx +274 -0
- package/src/components/full-calendar/calendar-add-event.tsx +15 -0
- package/src/components/full-calendar/calendar-body.tsx +12 -0
- package/src/components/full-calendar/calendar-cell.tsx +120 -0
- package/src/components/full-calendar/calendar-day-view.tsx +76 -0
- package/src/components/full-calendar/calendar-event.tsx +178 -0
- package/src/components/full-calendar/calendar-header.tsx +14 -0
- package/src/components/full-calendar/calendar-month-view.tsx +69 -0
- package/src/components/full-calendar/calendar-more-events-dropdown.tsx +39 -0
- package/src/components/full-calendar/calendar-navigator.tsx +86 -0
- package/src/components/full-calendar/calendar-root.tsx +165 -0
- package/src/components/full-calendar/calendar-today-button.tsx +21 -0
- package/src/components/full-calendar/calendar-toggle-view.tsx +61 -0
- package/src/components/full-calendar/calendar-view-renderer.tsx +19 -0
- package/src/components/full-calendar/calendar-week-day.tsx +49 -0
- package/src/components/full-calendar/calendar-week-view.tsx +88 -0
- package/src/components/full-calendar/helpers/calendar.ts +158 -0
- package/src/components/full-calendar/index.ts +16 -0
- package/src/components/full-calendar/types/calendar-cell.ts +4 -0
- package/src/components/full-calendar/types/calendar-event.ts +7 -0
- package/src/components/full-calendar/types/calendar-view.ts +1 -0
- package/src/components/full-calendar/types/calendar-week-hour.ts +4 -0
- package/src/components/horizontal-scroll.tsx +159 -0
- package/src/components/icon.tsx +1 -1
- package/src/components/logo.tsx +25 -20
- package/src/components/selection-bar.tsx +273 -0
- package/src/components/sheet.tsx +2 -2
- package/src/components/tabs.tsx +56 -37
- package/src/components/tag.tsx +11 -3
- package/src/components/upload.tsx +647 -0
- package/src/index.css +2 -2
- package/src/resources/icons.ts +4 -1
- package/src/resources/logo/index.tsx +33 -0
- package/tsup.config.ts +23 -5
- package/dist/components/button.js +0 -98
- package/dist/components/calendar.js +0 -751
- package/dist/components/checkbox.js +0 -153
- package/dist/components/date-picker.d.ts +0 -20
- package/dist/components/date-picker.js +0 -232
- package/dist/components/input.d.ts +0 -32
- package/dist/components/input.js +0 -315
- package/dist/components/otp-input.js +0 -47
- package/dist/components/radio.js +0 -156
- package/dist/components/rich-editor.js +0 -723
- package/dist/components/search-input.js +0 -274
- package/dist/components/select.d.ts +0 -33
- package/dist/components/select.js +0 -550
- package/dist/components/switch.js +0 -36
- package/dist/components/test.d.ts +0 -5
- package/dist/components/test.js +0 -8
- package/dist/index.js +0 -0
- package/src/components/date-picker.tsx +0 -160
- package/src/components/input.tsx +0 -256
- package/src/components/select.tsx +0 -240
- package/src/components/test.tsx +0 -3
- package/src/index.ts +0 -1
- package/src/resources/logo/index.ts +0 -3
- /package/dist/components/{button.d.ts → form/button.d.ts} +0 -0
- /package/dist/components/{calendar.d.ts → form/calendar.d.ts} +0 -0
- /package/dist/components/{checkbox.d.ts → form/checkbox.d.ts} +0 -0
- /package/dist/components/{otp-input.d.ts → form/otp-input.d.ts} +0 -0
- /package/dist/components/{radio.d.ts → form/radio.d.ts} +0 -0
- /package/dist/components/{search-input.d.ts → form/search-input.d.ts} +0 -0
- /package/dist/components/{switch.d.ts → form/switch.d.ts} +0 -0
- /package/src/components/{button.tsx → form/button.tsx} +0 -0
- /package/src/components/{otp-input.tsx → form/otp-input.tsx} +0 -0
- /package/src/components/{switch.tsx → form/switch.tsx} +0 -0
|
@@ -1,751 +0,0 @@
|
|
|
1
|
-
// src/components/calendar.tsx
|
|
2
|
-
import "react-day-picker/style.css";
|
|
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
|
-
};
|