@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,295 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
4
|
-
import { cx as cx3 } from "@xjur-ui/util";
|
|
5
|
-
|
|
6
|
-
// src/components/list.tsx
|
|
7
|
-
import { Slot as Slot2 } from "@radix-ui/react-slot";
|
|
8
|
-
import { cx, cva as cva2 } from "@xjur-ui/util";
|
|
9
|
-
|
|
10
|
-
// src/components/typography.tsx
|
|
11
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
12
|
-
import { cva } from "@xjur-ui/util";
|
|
13
|
-
import { memo } from "react";
|
|
14
|
-
import { jsx } from "react/jsx-runtime";
|
|
15
|
-
var typographyVariants = cva("", {
|
|
16
|
-
variants: {
|
|
17
|
-
variant: {
|
|
18
|
-
body: "",
|
|
19
|
-
label: "",
|
|
20
|
-
title: "",
|
|
21
|
-
headline: ""
|
|
22
|
-
},
|
|
23
|
-
size: {
|
|
24
|
-
"sm-2x": "",
|
|
25
|
-
"sm-1x": "",
|
|
26
|
-
sm: "",
|
|
27
|
-
md: "",
|
|
28
|
-
lg: ""
|
|
29
|
-
},
|
|
30
|
-
weight: {
|
|
31
|
-
thin: "font-thin",
|
|
32
|
-
extraLight: "font-extralight",
|
|
33
|
-
light: "font-light",
|
|
34
|
-
normal: "font-normal",
|
|
35
|
-
medium: "font-medium",
|
|
36
|
-
semibold: "font-semibold",
|
|
37
|
-
bold: "font-bold",
|
|
38
|
-
extraBold: "font-extrabold",
|
|
39
|
-
black: "font-black"
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
compoundVariants: [
|
|
43
|
-
{ variant: "body", size: "sm-1x", class: "text-size-body-sm-1x" },
|
|
44
|
-
{ variant: "body", size: "sm", class: "text-size-body-sm" },
|
|
45
|
-
{ variant: "body", size: "md", class: "text-size-body-md" },
|
|
46
|
-
{ variant: "body", size: "lg", class: "text-size-body-lg" },
|
|
47
|
-
{ variant: "label", size: "sm-2x", class: "text-size-label-sm-2x" },
|
|
48
|
-
{ variant: "label", size: "sm-1x", class: "text-size-label-sm-1x" },
|
|
49
|
-
{ variant: "label", size: "sm", class: "text-size-label-sm" },
|
|
50
|
-
{ variant: "label", size: "md", class: "text-size-label-md" },
|
|
51
|
-
{ variant: "label", size: "lg", class: "text-size-label-lg" },
|
|
52
|
-
{ variant: "title", size: "sm", class: "text-size-title-sm" },
|
|
53
|
-
{ variant: "title", size: "md", class: "text-size-title-md" },
|
|
54
|
-
{ variant: "title", size: "lg", class: "text-size-title-lg" },
|
|
55
|
-
{ variant: "headline", size: "sm", class: "text-size-headline-sm" },
|
|
56
|
-
{ variant: "headline", size: "md", class: "text-size-headline-md" },
|
|
57
|
-
{ variant: "headline", size: "lg", class: "text-size-headline-lg" }
|
|
58
|
-
],
|
|
59
|
-
defaultVariants: {
|
|
60
|
-
variant: "body",
|
|
61
|
-
size: "md",
|
|
62
|
-
weight: "normal"
|
|
63
|
-
}
|
|
64
|
-
});
|
|
65
|
-
var Typography = memo(
|
|
66
|
-
({
|
|
67
|
-
variant,
|
|
68
|
-
size,
|
|
69
|
-
weight,
|
|
70
|
-
asChild,
|
|
71
|
-
className,
|
|
72
|
-
...props
|
|
73
|
-
}) => {
|
|
74
|
-
const Component = asChild ? Slot : "span";
|
|
75
|
-
return /* @__PURE__ */ jsx(
|
|
76
|
-
Component,
|
|
77
|
-
{
|
|
78
|
-
className: typographyVariants({ variant, size, weight, className }),
|
|
79
|
-
...props
|
|
80
|
-
}
|
|
81
|
-
);
|
|
82
|
-
}
|
|
83
|
-
);
|
|
84
|
-
Typography.displayName = "Typography";
|
|
85
|
-
|
|
86
|
-
// src/components/list.tsx
|
|
87
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
88
|
-
function ListRoot({
|
|
89
|
-
className,
|
|
90
|
-
asChild,
|
|
91
|
-
...props
|
|
92
|
-
}) {
|
|
93
|
-
const Comp = asChild ? Slot2 : "div";
|
|
94
|
-
return /* @__PURE__ */ jsx2(
|
|
95
|
-
Comp,
|
|
96
|
-
{
|
|
97
|
-
...props,
|
|
98
|
-
className: cx(
|
|
99
|
-
className,
|
|
100
|
-
"rounded-small scrollbar-hide bg-layer-2-idle border-border-layer-2 shadow-elevation-3 z-10 max-h-[400px] list-none overflow-y-auto border"
|
|
101
|
-
)
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
function ListHeader({
|
|
106
|
-
className,
|
|
107
|
-
asChild,
|
|
108
|
-
...props
|
|
109
|
-
}) {
|
|
110
|
-
const Comp = asChild ? Slot2 : "div";
|
|
111
|
-
return /* @__PURE__ */ jsx2(Comp, { ...props, className: cx(className, "px-small pt-small-1x") });
|
|
112
|
-
}
|
|
113
|
-
function ListHeaderTitle({
|
|
114
|
-
variant = "label",
|
|
115
|
-
size = "sm",
|
|
116
|
-
weight = "medium",
|
|
117
|
-
className,
|
|
118
|
-
...props
|
|
119
|
-
}) {
|
|
120
|
-
return /* @__PURE__ */ jsx2(
|
|
121
|
-
Typography,
|
|
122
|
-
{
|
|
123
|
-
className: cx(className, "text-neutral-placeholder"),
|
|
124
|
-
size,
|
|
125
|
-
variant,
|
|
126
|
-
weight,
|
|
127
|
-
...props
|
|
128
|
-
}
|
|
129
|
-
);
|
|
130
|
-
}
|
|
131
|
-
function ListContent({
|
|
132
|
-
className,
|
|
133
|
-
asChild,
|
|
134
|
-
...props
|
|
135
|
-
}) {
|
|
136
|
-
const Comp = asChild ? Slot2 : "ul";
|
|
137
|
-
return /* @__PURE__ */ jsx2(
|
|
138
|
-
Comp,
|
|
139
|
-
{
|
|
140
|
-
...props,
|
|
141
|
-
className: cx("gap-small-1x p-small flex flex-col", className)
|
|
142
|
-
}
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
var variants = cva2(
|
|
146
|
-
[
|
|
147
|
-
"py-medium px-small flex items-center gap-small rounded-small-1x",
|
|
148
|
-
"bg-layer-2-idle text-neutral-dark",
|
|
149
|
-
"hover:bg-layer-2-hover transition-colors duration-100 ease-out",
|
|
150
|
-
"active:bg-layer-2-pressed"
|
|
151
|
-
],
|
|
152
|
-
{
|
|
153
|
-
variants: {
|
|
154
|
-
size: {
|
|
155
|
-
md: "h-large-4x",
|
|
156
|
-
lg: "h-large-7x"
|
|
157
|
-
},
|
|
158
|
-
isActive: {
|
|
159
|
-
true: "bg-primary-alt-active text-primary-label-active hover:bg-primary-alt-hover active:bg-primary-alt-pressed"
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
defaultVariants: {
|
|
163
|
-
size: "md",
|
|
164
|
-
isActive: false
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
);
|
|
168
|
-
function ListItem({
|
|
169
|
-
className,
|
|
170
|
-
size,
|
|
171
|
-
isActive,
|
|
172
|
-
asChild,
|
|
173
|
-
...props
|
|
174
|
-
}) {
|
|
175
|
-
const Comp = asChild ? Slot2 : "li";
|
|
176
|
-
return /* @__PURE__ */ jsx2(Comp, { ...props, className: cx(variants({ size, isActive }), className) });
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
// src/components/divider.tsx
|
|
180
|
-
import "react";
|
|
181
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
182
|
-
import { cx as cx2 } from "@xjur-ui/util";
|
|
183
|
-
import { jsx as jsx3 } from "react/jsx-runtime";
|
|
184
|
-
function Divider({
|
|
185
|
-
className,
|
|
186
|
-
orientation = "horizontal",
|
|
187
|
-
decorative = true,
|
|
188
|
-
...props
|
|
189
|
-
}) {
|
|
190
|
-
return /* @__PURE__ */ jsx3(
|
|
191
|
-
SeparatorPrimitive.Root,
|
|
192
|
-
{
|
|
193
|
-
className: cx2(
|
|
194
|
-
"bg-border-layer-2 shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full",
|
|
195
|
-
"data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
196
|
-
className
|
|
197
|
-
),
|
|
198
|
-
"data-slot": "separator",
|
|
199
|
-
decorative,
|
|
200
|
-
orientation,
|
|
201
|
-
...props
|
|
202
|
-
}
|
|
203
|
-
);
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
// src/components/dropdown-menu.tsx
|
|
207
|
-
import { jsx as jsx4 } from "react/jsx-runtime";
|
|
208
|
-
function DropdownMenuRoot({
|
|
209
|
-
...props
|
|
210
|
-
}) {
|
|
211
|
-
return /* @__PURE__ */ jsx4(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
212
|
-
}
|
|
213
|
-
function DropdownMenuPortal({
|
|
214
|
-
...props
|
|
215
|
-
}) {
|
|
216
|
-
return /* @__PURE__ */ jsx4(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
217
|
-
}
|
|
218
|
-
function DropdownMenuTrigger({
|
|
219
|
-
...props
|
|
220
|
-
}) {
|
|
221
|
-
return /* @__PURE__ */ jsx4(
|
|
222
|
-
DropdownMenuPrimitive.Trigger,
|
|
223
|
-
{
|
|
224
|
-
"data-slot": "dropdown-menu-trigger",
|
|
225
|
-
...props
|
|
226
|
-
}
|
|
227
|
-
);
|
|
228
|
-
}
|
|
229
|
-
function DropdownMenuContent({
|
|
230
|
-
className,
|
|
231
|
-
sideOffset = 4,
|
|
232
|
-
align = "start",
|
|
233
|
-
side = "bottom",
|
|
234
|
-
children,
|
|
235
|
-
...props
|
|
236
|
-
}) {
|
|
237
|
-
return /* @__PURE__ */ jsx4(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx4(
|
|
238
|
-
DropdownMenuPrimitive.Content,
|
|
239
|
-
{
|
|
240
|
-
align,
|
|
241
|
-
className: cx3(
|
|
242
|
-
"group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-trigger-width)] min-w-[var(--radix-popover-trigger-width)]",
|
|
243
|
-
className
|
|
244
|
-
),
|
|
245
|
-
"data-slot": "dropdown-menu-content",
|
|
246
|
-
side,
|
|
247
|
-
sideOffset,
|
|
248
|
-
...props,
|
|
249
|
-
children: /* @__PURE__ */ jsx4(ListRoot, { children })
|
|
250
|
-
}
|
|
251
|
-
) });
|
|
252
|
-
}
|
|
253
|
-
function DropdownMenuList({
|
|
254
|
-
...props
|
|
255
|
-
}) {
|
|
256
|
-
return /* @__PURE__ */ jsx4(ListContent, { ...props });
|
|
257
|
-
}
|
|
258
|
-
function DropdownMenuHeader({
|
|
259
|
-
...props
|
|
260
|
-
}) {
|
|
261
|
-
return /* @__PURE__ */ jsx4(ListHeader, { ...props });
|
|
262
|
-
}
|
|
263
|
-
function DropdownMenuHeaderTitle({
|
|
264
|
-
...props
|
|
265
|
-
}) {
|
|
266
|
-
return /* @__PURE__ */ jsx4(ListHeaderTitle, { ...props });
|
|
267
|
-
}
|
|
268
|
-
function DropdownMenuItem({
|
|
269
|
-
className,
|
|
270
|
-
...props
|
|
271
|
-
}) {
|
|
272
|
-
return /* @__PURE__ */ jsx4(ListItem, { className: cx3(className, "cursor-pointer"), ...props });
|
|
273
|
-
}
|
|
274
|
-
function DropdownMenuItemText({
|
|
275
|
-
...props
|
|
276
|
-
}) {
|
|
277
|
-
return /* @__PURE__ */ jsx4(Typography, { ...props });
|
|
278
|
-
}
|
|
279
|
-
function DropdownMenuItemDivider({
|
|
280
|
-
...props
|
|
281
|
-
}) {
|
|
282
|
-
return /* @__PURE__ */ jsx4(Divider, { ...props });
|
|
283
|
-
}
|
|
284
|
-
export {
|
|
285
|
-
DropdownMenuContent,
|
|
286
|
-
DropdownMenuHeader,
|
|
287
|
-
DropdownMenuHeaderTitle,
|
|
288
|
-
DropdownMenuItem,
|
|
289
|
-
DropdownMenuItemDivider,
|
|
290
|
-
DropdownMenuItemText,
|
|
291
|
-
DropdownMenuList,
|
|
292
|
-
DropdownMenuPortal,
|
|
293
|
-
DropdownMenuRoot,
|
|
294
|
-
DropdownMenuTrigger
|
|
295
|
-
};
|
|
1
|
+
export{d as DropdownMenuContent,f as DropdownMenuHeader,g as DropdownMenuHeaderTitle,h as DropdownMenuItem,j as DropdownMenuItemDivider,i as DropdownMenuItemText,e as DropdownMenuList,b as DropdownMenuPortal,a as DropdownMenuRoot,c as DropdownMenuTrigger}from'../chunk-RWMV7APX.js';import'../chunk-CBFC4QME.js';import'../chunk-KIFR5VIE.js';import'../chunk-EIG6CBTQ.js';//# sourceMappingURL=dropdown-menu.js.map
|
|
2
|
+
//# sourceMappingURL=dropdown-menu.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"dropdown-menu.js"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"button.js"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {e}from'../../chunk-SLAAEXWI.js';import {b}from'../../chunk-PKCW37CJ.js';import {b as b$1}from'../../chunk-WV7QV2PU.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 f(o){return o.charAt(0).toUpperCase()+o.slice(1)}function P({showOutsideDays:o=true,locale:p=e,navLayout:y="around",handleClear:n,handleToday:m,...a}){let i=getDefaultClassNames(),u={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",i.root),day:cx("rounded-circle hover:bg-layer-2-hover"),caption_label:cx("text-size-label-md text-neutral-dark font-medium",i.caption_label),outside:cx("text-neutral-placeholder",i.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",i.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:{...u,...a.classNames},components:{Chevron:({orientation:t})=>jsx(b$1,{className:"size-large text-icon-neutral-3",name:t==="left"?"chevron_left":"chevron_right"}),...a.components},footer:(n||m)&&jsxs("div",{className:"py-small border-border-layer-2 mt-small flex h-full w-full items-center justify-between border-t",children:[m&&jsx(b,{appearance:"ghost",variant:"secondary",onClick:m,children:"Hoje"}),n&&jsx(b,{appearance:"ghost",variant:"secondary",onClick:n,children:"Limpar"})]}),formatters:{formatWeekdayName:t=>{let r=t.toLocaleDateString("pt-BR",{weekday:"short"});return r.charAt(0).toUpperCase()+r.slice(1).replace(".","")},formatCaption(t){let r=t.toLocaleDateString("pt-BR",{month:"long"});return `${f(r)} ${t.getFullYear()}`},...a.formatters},locale:p,mode:a.mode??"single",navLayout:y,showOutsideDays:o,...a})}export{P as Calendar};//# sourceMappingURL=calendar.js.map
|
|
2
|
+
//# sourceMappingURL=calendar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form/calendar.tsx"],"names":["capitalize","str","Calendar","showOutsideDays","locale","ptBR","navLayout","handleClear","handleToday","props","defaultClassNames","getDefaultClassNames","classNames","cx","jsx","DayPicker","orientation","Icon","jsxs","Button","date","weekday","month","monthName"],"mappings":"wSAYA,SAASA,CAAAA,CAAWC,CAAAA,CAAa,CAC/B,OAAOA,CAAAA,CAAI,MAAA,CAAO,CAAC,CAAA,CAAE,WAAA,EAAY,CAAIA,CAAAA,CAAI,KAAA,CAAM,CAAC,CAClD,CASO,SAASC,CAAAA,CAAS,CACvB,eAAA,CAAAC,CAAAA,CAAkB,IAAA,CAClB,MAAA,CAAAC,CAAAA,CAASC,CAAAA,CACT,SAAA,CAAAC,CAAAA,CAAY,QAAA,CACZ,WAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAkB,CAChB,IAAMC,CAAAA,CAAoBC,oBAAAA,EAAqB,CAEzCC,CAAAA,CAAkC,CACtC,IAAA,CAAMC,GACJ,4IAAA,CACAH,CAAAA,CAAkB,IACpB,CAAA,CACA,GAAA,CAAKG,EAAAA,CAAG,wCAAwC,CAAA,CAChD,aAAA,CAAeA,EAAAA,CACb,kDAAA,CACAH,CAAAA,CAAkB,aACpB,CAAA,CACA,OAAA,CAASG,EAAAA,CAAG,0BAAA,CAA4BH,CAAAA,CAAkB,OAAO,CAAA,CACjE,QAAA,CAAUG,EAAAA,CACR,4GACF,CAAA,CACA,QAAA,CAAUA,EAAAA,CAAG,YAAA,CAAcH,CAAAA,CAAkB,QAAQ,CAAA,CACrD,KAAA,CAAOG,EAAAA,CACL,0EACF,CAAA,CACA,WAAA,CAAaA,EAAAA,CACX,2HACF,CAAA,CACA,SAAA,CAAWA,EAAAA,CACT,2HACF,CAAA,CACA,YAAA,CAAcA,EAAAA,CACZ,6FACF,CACF,C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AClD,KAAA,CAAO,MACT,CAAC,CAAA,CACD,OAAO,CAAA,EAAGtB,CAAAA,CAAWuB,CAAS,CAAC,CAAA,CAAA,EAAID,CAAAA,CAAM,WAAA,EAAa,CAAA,CACxD,CAAA,CACA,GAAGb,CAAAA,CAAM,UACX,CAAA,CACA,MAAA,CAAQL,CAAAA,CACR,IAAA,CAAMK,CAAAA,CAAM,IAAA,EAAQ,QAAA,CACpB,SAAA,CAAWH,CAAAA,CACX,eAAA,CAAiBH,CAAAA,CAChB,GAAGM,CAAAA,CACN,CAEJ","file":"calendar.js","sourcesContent":["import 'react-day-picker/style.css'\nimport { ptBR } from 'date-fns/locale'\nimport { cx } from '@xjur-ui/util'\nimport {\n type DayPickerProps,\n type ClassNames,\n DayPicker,\n getDefaultClassNames\n} from 'react-day-picker'\nimport { Icon, type IconType } from '../icon'\nimport { Button } from '../form/button'\n\nfunction capitalize(str: string) {\n return str.charAt(0).toUpperCase() + str.slice(1)\n}\n\nexport { type DateRange } from 'react-day-picker'\n\nexport type CalendarProps = DayPickerProps & {\n handleClear?: () => void\n handleToday?: () => void\n}\n\nexport function Calendar({\n showOutsideDays = true,\n locale = ptBR,\n navLayout = 'around',\n handleClear,\n handleToday,\n ...props\n}: CalendarProps) {\n const defaultClassNames = getDefaultClassNames()\n\n const classNames: Partial<ClassNames> = {\n root: cx(\n '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',\n defaultClassNames.root\n ),\n day: cx('rounded-circle hover:bg-layer-2-hover'),\n caption_label: cx(\n 'text-size-label-md text-neutral-dark font-medium',\n defaultClassNames.caption_label\n ),\n outside: cx('text-neutral-placeholder', defaultClassNames.outside),\n selected: cx(\n 'text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active'\n ),\n disabled: cx('opacity-60', defaultClassNames.disabled),\n today: cx(\n 'text-neutral-dark font-medium bg-layer-2-active hover:!bg-layer-2-active'\n ),\n range_start: cx(\n 'rounded-r-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active'\n ),\n range_end: cx(\n 'rounded-l-none text-size-body-md bg-primary-alt-active text-primary-label-active font-medium hover:!bg-primary-alt-active'\n ),\n range_middle: cx(\n '!bg-primary-alt-active !text-primary-label-active rounded-none hover:!bg-primary-alt-active'\n )\n }\n\n return (\n <DayPicker\n classNames={{ ...classNames, ...props.classNames }}\n components={{\n Chevron: ({ orientation }) => {\n const icon = orientation === 'left' ? 'chevron_left' : 'chevron_right'\n return (\n <Icon\n className=\"size-large text-icon-neutral-3\"\n name={icon as IconType}\n />\n )\n },\n ...props.components\n }}\n footer={\n (handleClear || handleToday) && (\n <div className=\"py-small border-border-layer-2 mt-small flex h-full w-full items-center justify-between border-t\">\n {handleToday && (\n <Button\n appearance=\"ghost\"\n variant=\"secondary\"\n onClick={handleToday}\n >\n Hoje\n </Button>\n )}\n {handleClear && (\n <Button\n appearance=\"ghost\"\n variant=\"secondary\"\n onClick={handleClear}\n >\n Limpar\n </Button>\n )}\n </div>\n )\n }\n formatters={{\n formatWeekdayName: date => {\n const weekday = date.toLocaleDateString('pt-BR', { weekday: 'short' })\n return (\n weekday.charAt(0).toUpperCase() + weekday.slice(1).replace('.', '')\n )\n },\n formatCaption(month) {\n const monthName = month.toLocaleDateString('pt-BR', {\n month: 'long'\n })\n return `${capitalize(monthName)} ${month.getFullYear()}`\n },\n ...props.formatters\n }}\n locale={locale}\n mode={props.mode ?? 'single'}\n navLayout={navLayout}\n showOutsideDays={showOutsideDays}\n {...props}\n />\n )\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {b}from'../../chunk-WV7QV2PU.js';import {a}from'../../chunk-EIG6CBTQ.js';import*as r from'@radix-ui/react-checkbox';import {cx}from'@xjur-ui/util';import {jsxs,jsx}from'react/jsx-runtime';function y({label:o,name:i,className:l,disabled:a$1=false,...s}){let t=`field-checkbox-${i}`;return jsxs("div",{className:"group gap-small flex items-center",children:[jsx(r.Root,{disabled:a$1,...s,className:cx("size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",l),id:t,name:i,children:jsx(r.Indicator,{className:"flex items-center justify-center",children:jsx(b,{className:"text-neutral-label",name:"check"})})}),!!o&&jsx(a,{asChild:true,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":a$1,weight:"medium",children:jsx("label",{htmlFor:t,children:o})})]})}export{y as Checkbox};//# sourceMappingURL=checkbox.js.map
|
|
2
|
+
//# sourceMappingURL=checkbox.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form/checkbox.tsx"],"names":["Checkbox","label","name","className","disabled","props","fieldId","jsxs","jsx","cx","Icon","Typography"],"mappings":"mMAKO,SAASA,CAAAA,CAAS,CACvB,KAAA,CAAAC,CAAAA,CACA,KAAAC,CAAAA,CACA,SAAA,CAAAC,CAAAA,CACA,QAAA,CAAAC,GAAAA,CAAW,KAAA,CACX,GAAGC,CACL,CAAA,CAEG,CACD,IAAMC,CAAAA,CAAU,kBAAkBJ,CAAI,CAAA,CAAA,CAEtC,OACEK,IAAAA,CAAC,KAAA,CAAA,CAAI,SAAA,CAAU,oCACb,QAAA,CAAA,CAAAC,GAAAA,CAAkB,OAAjB,CACC,QAAA,CAAUJ,IACT,GAAGC,CAAAA,CACJ,SAAA,CAAWI,EAAAA,CAET,yJAAA,CAEA,+DAAA,CAEA,iFAEA,mFAAA,CAEA,gDAAA,CAEA,0FACAN,CACF,CAAA,CACA,GAAIG,CAAAA,CACJ,IAAA,CAAMJ,CAAAA,CAEN,QAAA,CAAAM,GAAAA,CAAkB,CAAA,CAAA,SAAA,CAAjB,CAA2B,SAAA,CAAU,kCAAA,CACpC,SAAAA,GAAAA,CAACE,CAAAA,CAAA,CAAK,SAAA,CAAU,oBAAA,CAAqB,IAAA,CAAK,OAAA,CAAQ,CAAA,CACpD,CAAA,CACF,EAEC,CAAC,CAACT,GACDO,GAAAA,CAACG,CAAAA,CAAA,CACC,OAAA,CAAS,IAAA,CACT,SAAA,CAAU,mDAAA,CACV,eAAA,CAAeP,GAAAA,CACf,OAAO,QAAA,CAEP,QAAA,CAAAI,IAAC,OAAA,CAAA,CAAM,OAAA,CAASF,EAAU,QAAA,CAAAL,CAAAA,CAAM,CAAA,CAClC,CAAA,CAAA,CAEJ,CAEJ","file":"checkbox.js","sourcesContent":["import * as CheckoxPrimitive from '@radix-ui/react-checkbox'\nimport { cx } from '@xjur-ui/util'\nimport { Icon } from '../icon'\nimport { Typography } from '../typography'\n\nexport function Checkbox({\n label,\n name,\n className,\n disabled = false,\n ...props\n}: CheckoxPrimitive.CheckboxProps & {\n label?: string\n}) {\n const fieldId = `field-checkbox-${name}`\n\n return (\n <div className=\"group gap-small flex items-center\">\n <CheckoxPrimitive.Root\n disabled={disabled}\n {...props}\n className={cx(\n // layout\n 'size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none',\n // base\n 'border-border-layer-2 bg-layer-2-idle cursor-pointer border-2',\n // hover/focus (desmarcado)\n 'hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary',\n // estado checked\n 'data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active',\n // hover quando estiver checked (opcional)\n 'data-[state=checked]:hover:border-primary-idle',\n // disabled\n 'disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]',\n className\n )}\n id={fieldId}\n name={name}\n >\n <CheckoxPrimitive.Indicator className=\"flex items-center justify-center\">\n <Icon className=\"text-neutral-label\" name=\"check\" />\n </CheckoxPrimitive.Indicator>\n </CheckoxPrimitive.Root>\n\n {!!label && (\n <Typography\n asChild={true}\n className=\"text-size-body-sm data-[disabled=true]:opacity-38\"\n data-disabled={disabled}\n weight=\"medium\"\n >\n <label htmlFor={fieldId}>{label}</label>\n </Typography>\n )}\n </div>\n )\n}\n"]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { MaskOptions } from '@react-input/mask';
|
|
3
|
+
|
|
4
|
+
type InputMaskType = 'cpf' | 'cnpj' | 'telefone' | 'cep' | 'numero-processo' | 'custom' | 'data' | 'hora' | 'data-hora';
|
|
5
|
+
|
|
6
|
+
interface FieldContextValue {
|
|
7
|
+
state?: 'normal' | 'error' | 'disabled';
|
|
8
|
+
variant?: 'normal' | 'filter';
|
|
9
|
+
customMask?: MaskOptions;
|
|
10
|
+
mask?: InputMaskType;
|
|
11
|
+
}
|
|
12
|
+
declare const FieldContext: React.Context<FieldContextValue>;
|
|
13
|
+
declare function useFieldContext(): FieldContextValue;
|
|
14
|
+
|
|
15
|
+
export { FieldContext, type FieldContextValue, useFieldContext };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"field.context.js"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
import * as RadixPopover from '@radix-ui/react-popover';
|
|
5
|
+
import { I as IconType } from '../../icons-CmDuL0gZ.js';
|
|
6
|
+
import { FieldContextValue } from './context/field.context.js';
|
|
7
|
+
import { FloatingLabel } from './floating-label.js';
|
|
8
|
+
import '@react-input/mask';
|
|
9
|
+
|
|
10
|
+
declare const datePicker: tailwind_variants.TVReturnType<{
|
|
11
|
+
state: {
|
|
12
|
+
normal: {
|
|
13
|
+
trigger: string;
|
|
14
|
+
};
|
|
15
|
+
error: {
|
|
16
|
+
trigger: string;
|
|
17
|
+
caption: string;
|
|
18
|
+
};
|
|
19
|
+
disabled: {
|
|
20
|
+
trigger: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
wrapper: string;
|
|
25
|
+
trigger: string[];
|
|
26
|
+
content: string[];
|
|
27
|
+
icon: string;
|
|
28
|
+
slotText: string;
|
|
29
|
+
caption: string;
|
|
30
|
+
}, undefined, {
|
|
31
|
+
state: {
|
|
32
|
+
normal: {
|
|
33
|
+
trigger: string;
|
|
34
|
+
};
|
|
35
|
+
error: {
|
|
36
|
+
trigger: string;
|
|
37
|
+
caption: string;
|
|
38
|
+
};
|
|
39
|
+
disabled: {
|
|
40
|
+
trigger: string;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
}, {
|
|
44
|
+
wrapper: string;
|
|
45
|
+
trigger: string[];
|
|
46
|
+
content: string[];
|
|
47
|
+
icon: string;
|
|
48
|
+
slotText: string;
|
|
49
|
+
caption: string;
|
|
50
|
+
}, tailwind_variants.TVReturnType<{
|
|
51
|
+
state: {
|
|
52
|
+
normal: {
|
|
53
|
+
trigger: string;
|
|
54
|
+
};
|
|
55
|
+
error: {
|
|
56
|
+
trigger: string;
|
|
57
|
+
caption: string;
|
|
58
|
+
};
|
|
59
|
+
disabled: {
|
|
60
|
+
trigger: string;
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
}, {
|
|
64
|
+
wrapper: string;
|
|
65
|
+
trigger: string[];
|
|
66
|
+
content: string[];
|
|
67
|
+
icon: string;
|
|
68
|
+
slotText: string;
|
|
69
|
+
caption: string;
|
|
70
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
71
|
+
declare function DatePickerRoot({ className, state, defaultOpen, variant, modal, open, onOpenChange: handleOpenChange, ...props }: ComponentProps<'div'> & FieldContextValue & ComponentProps<typeof RadixPopover.Root>): react_jsx_runtime.JSX.Element;
|
|
72
|
+
declare function DatePickerTrigger({ className, ...props }: ComponentProps<typeof RadixPopover.Trigger>): react_jsx_runtime.JSX.Element;
|
|
73
|
+
declare function DatePickerLabel(props: ComponentProps<typeof FloatingLabel>): react_jsx_runtime.JSX.Element;
|
|
74
|
+
declare function DatePickerIcon({ className, name, ...props }: ComponentProps<'div'> & {
|
|
75
|
+
name: IconType;
|
|
76
|
+
}): react_jsx_runtime.JSX.Element;
|
|
77
|
+
declare function DatePickerSlot({ className, ...props }: ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
78
|
+
declare function DatePickerValue({ className, displayValue, value, ...props }: ComponentProps<'input'> & {
|
|
79
|
+
displayValue?: string;
|
|
80
|
+
}): react_jsx_runtime.JSX.Element;
|
|
81
|
+
declare function DatePickerContent({ className, sideOffset, side, align, ...props }: ComponentProps<typeof RadixPopover.Content>): react_jsx_runtime.JSX.Element;
|
|
82
|
+
declare function DatePickerCaption({ className, ...props }: ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
83
|
+
|
|
84
|
+
export { DatePickerCaption, DatePickerContent, DatePickerIcon, DatePickerLabel, DatePickerRoot, DatePickerSlot, DatePickerTrigger, DatePickerValue, datePicker };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a as a$1}from'../../chunk-TSVURBUY.js';import {a,b}from'../../chunk-IRHU7PDO.js';import {b as b$1}from'../../chunk-WV7QV2PU.js';import {a as a$2}from'../../chunk-EIG6CBTQ.js';import {tv,twMerge,twJoin}from'@xjur-ui/util';import {useMemo}from'react';import*as i from'@radix-ui/react-popover';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var P=tv({slots:{wrapper:"group flex w-full flex-col gap-small-2x",trigger:["h-large-4x w-full cursor-pointer relative","flex items-center gap-small rounded-small-1x","py-small_1x-alt px-small","bg-layer-2-hover border border-transparent","group-has-[div[data-slot=input-action-slot]]:rounded-r-none","transition-all duration-200"],content:["group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] min-w-[var(--radix-popover-trigger-width)]"],icon:"size-large text-icon-neutral-3 flex items-center justify-center",slotText:"size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder",caption:"!text-size-body-sm font-normal"},variants:{state:{normal:{trigger:"hover:border-border-layer-1 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle"},error:{trigger:"border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle",caption:"text-danger-label-idle"},disabled:{trigger:"pointer-events-none border-transparent bg-layer-2-idle"}}}}),{wrapper:y,trigger:h,icon:C,caption:R,slotText:k,content:w}=P();function M({className:e,state:r="normal",defaultOpen:o,variant:a$1="normal",modal:n,open:l,onOpenChange:u,...x}){return jsx(i.Root,{defaultOpen:o,modal:n,open:l,onOpenChange:u,children:jsx(a.Provider,{value:{state:r,variant:a$1},children:jsx("div",{className:y({className:e,state:r}),...x})})})}function V({className:e,...r}){let{state:o,variant:a}=b(),n=tv({base:["group bg-layer-2-idle relative"],variants:{state:{normal:["border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle"],error:["border-danger-idle hover:border-danger-idle"],disabled:["border border-border-layer-2 opacity-60"]}}}),l=twMerge(h({state:o,className:e}),a==="filter"&&n({state:o,className:e}));return jsx(i.Trigger,{className:l,disabled:o==="disabled",...r})}function j(e){return jsx(a$1,{...e})}function J({className:e,name:r,...o}){let{state:a}=b();return jsx("div",{className:C({className:e,state:a}),...o,children:jsx(b$1,{name:r})})}function S({className:e,...r}){let{state:o}=b();return jsx("span",{className:k({className:e,state:o}),...r})}function _({className:e,displayValue:r="",value:o,...a}){let{variant:n}=b(),l=useMemo(()=>n==="filter"?r:r||a.placeholder,[r,a.placeholder,n]);return jsxs(Fragment,{children:[jsx(a$2,{className:"text-neutral-dark group-has-[div[data-slot=date-picker-left-slot]]:pl-large-1x",children:l}),jsx("input",{...a,"aria-readonly":true,className:twJoin("pointer-events-none",e),hidden:true,placeholder:" ",readOnly:true,value:o??""})]})}function q({className:e,sideOffset:r=5,side:o="bottom",align:a="start",...n}){let{state:l}=b();return jsx(i.Portal,{children:jsx(i.Content,{align:a,className:w({className:e,state:l}),side:o,sideOffset:r,...n})})}function A({className:e,...r}){let{state:o}=b();return jsx("p",{className:R({className:e,state:o}),...r})}export{A as DatePickerCaption,q as DatePickerContent,J as DatePickerIcon,j as DatePickerLabel,M as DatePickerRoot,S as DatePickerSlot,V as DatePickerTrigger,_ as DatePickerValue,P as datePicker};//# sourceMappingURL=date-picker.js.map
|
|
2
|
+
//# sourceMappingURL=date-picker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form/date-picker.tsx"],"names":["datePicker","tv","wrapper","trigger","icon","caption","slotText","content","DatePickerRoot","className","state","defaultOpen","variant","modal","open","handleOpenChange","props","jsx","FieldContext","DatePickerTrigger","useFieldContext","filterTrigger","mergedClassName","twMerge","DatePickerLabel","FloatingLabel","DatePickerIcon","name","Icon","DatePickerSlot","DatePickerValue","displayValue","value","valueOrPlaceholder","useMemo","jsxs","Fragment","Typography","twJoin","DatePickerContent","sideOffset","side","align","DatePickerCaption"],"mappings":"6VAYO,IAAMA,CAAAA,CAAaC,EAAAA,CAAG,CAC3B,KAAA,CAAO,CACL,QAAS,yCAAA,CACT,OAAA,CAAS,CACP,2CAAA,CACA,8CAAA,CACA,0BAAA,CACA,4CAAA,CACA,6DAAA,CACA,6BACF,CAAA,CACA,OAAA,CAAS,CACP,kKACF,CAAA,CACA,KAAM,iEAAA,CACN,QAAA,CACE,0FAAA,CACF,OAAA,CAAS,gCACX,CAAA,CACA,QAAA,CAAU,CACR,KAAA,CAAO,CACL,MAAA,CAAQ,CACN,OAAA,CACE,+GACJ,EACA,KAAA,CAAO,CACL,OAAA,CACE,6HAAA,CACF,OAAA,CAAS,wBACX,CAAA,CACA,QAAA,CAAU,CACR,OAAA,CAAS,wDACX,CACF,CACF,CACF,CAAC,CAAA,CAEK,CAAE,OAAA,CAAAC,CAAAA,CAAS,OAAA,C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AAOyB,CAAAA,CACP,SAAA,CAAWnC,CAAAA,CAAQ,CAAE,SAAA,CAAAE,CAAAA,CAAW,MAAAC,CAAM,CAAC,CAAA,CACvC,IAAA,CAAM+B,CAAAA,CACN,UAAA,CAAYD,CAAAA,CACX,GAAGxB,CAAAA,CACN,CAAA,CACF,CAEJ,CAEO,SAAS2B,CAAAA,CAAkB,CAChC,SAAA,CAAAlC,CAAAA,CACA,GAAGO,CACL,CAAA,CAAwB,CACtB,GAAM,CAAE,KAAA,CAAAN,CAAM,CAAA,CAAIU,CAAAA,EAAgB,CAClC,OAAOH,IAAC,GAAA,CAAA,CAAE,SAAA,CAAWZ,CAAAA,CAAQ,CAAE,SAAA,CAAAI,CAAAA,CAAW,KAAA,CAAAC,CAAM,CAAC,CAAA,CAAI,GAAGM,CAAAA,CAAO,CACjE","file":"date-picker.js","sourcesContent":["import { tv, twJoin, twMerge } from '@xjur-ui/util'\nimport { useMemo, type ComponentProps } from 'react'\nimport * as RadixPopover from '@radix-ui/react-popover'\nimport { Icon, type IconType } from '../icon'\nimport { Typography } from '../typography'\nimport {\n FieldContext,\n useFieldContext,\n type FieldContextValue\n} from './context/field.context'\nimport { FloatingLabel } from './floating-label'\n\nexport const datePicker = tv({\n slots: {\n wrapper: 'group flex w-full flex-col gap-small-2x',\n trigger: [\n 'h-large-4x w-full cursor-pointer relative',\n 'flex items-center gap-small rounded-small-1x',\n 'py-small_1x-alt px-small',\n 'bg-layer-2-hover border border-transparent',\n 'group-has-[div[data-slot=input-action-slot]]:rounded-r-none',\n 'transition-all duration-200'\n ],\n content: [\n 'group z-10 max-h-[var(--radix-popover-content-available-height)] max-w-[var(--radix-popover-content-available-width)] min-w-[var(--radix-popover-trigger-width)]'\n ],\n icon: 'size-large text-icon-neutral-3 flex items-center justify-center',\n slotText:\n 'size-large flex items-center justify-center !text-size-label-md text-neutral-placeholder',\n caption: '!text-size-body-sm font-normal'\n },\n variants: {\n state: {\n normal: {\n trigger:\n 'hover:border-border-layer-1 data-[state=open]:border-primary-idle data-[state=open]:hover:border-primary-idle'\n },\n error: {\n trigger:\n 'border-danger-idle hover:border-danger-idle data-[state=open]:border-danger-idle data-[state=open]:hover:border-danger-idle',\n caption: 'text-danger-label-idle'\n },\n disabled: {\n trigger: 'pointer-events-none border-transparent bg-layer-2-idle'\n }\n }\n }\n})\n\nconst { wrapper, trigger, icon, caption, slotText, content } = datePicker()\n\nexport function DatePickerRoot({\n className,\n state = 'normal',\n defaultOpen,\n variant = 'normal',\n modal,\n open,\n onOpenChange: handleOpenChange,\n ...props\n}: ComponentProps<'div'> &\n FieldContextValue &\n ComponentProps<typeof RadixPopover.Root>) {\n return (\n <RadixPopover.Root\n defaultOpen={defaultOpen}\n modal={modal}\n open={open}\n onOpenChange={handleOpenChange}\n >\n <FieldContext.Provider value={{ state, variant }}>\n <div className={wrapper({ className, state })} {...props} />\n </FieldContext.Provider>\n </RadixPopover.Root>\n )\n}\n\nexport function DatePickerTrigger({\n className,\n ...props\n}: ComponentProps<typeof RadixPopover.Trigger>) {\n const { state, variant } = useFieldContext()\n\n const filterTrigger = tv({\n base: ['group bg-layer-2-idle relative'],\n variants: {\n state: {\n normal: [\n 'border-border-layer-2 hover:border-border-layer-3 has-[input:not(:placeholder-shown)]:border-primary-idle'\n ],\n error: ['border-danger-idle hover:border-danger-idle'],\n disabled: ['border border-border-layer-2 opacity-60']\n }\n }\n })\n\n const mergedClassName = twMerge(\n trigger({ state, className }),\n variant === 'filter' && filterTrigger({ state, className })\n )\n\n return (\n <RadixPopover.Trigger\n className={mergedClassName}\n disabled={state === 'disabled'}\n {...props}\n />\n )\n}\n\nexport function DatePickerLabel(props: ComponentProps<typeof FloatingLabel>) {\n return <FloatingLabel {...props} />\n}\n\nexport function DatePickerIcon({\n className,\n name,\n ...props\n}: ComponentProps<'div'> & {\n name: IconType\n}) {\n const { state } = useFieldContext()\n\n return (\n <div className={icon({ className, state })} {...props}>\n <Icon name={name} />\n </div>\n )\n}\n\nexport function DatePickerSlot({\n className,\n ...props\n}: ComponentProps<'span'>) {\n const { state } = useFieldContext()\n return <span className={slotText({ className, state })} {...props} />\n}\n\nexport function DatePickerValue({\n className,\n displayValue = '',\n value,\n ...props\n}: ComponentProps<'input'> & { displayValue?: string }) {\n const { variant } = useFieldContext()\n\n const valueOrPlaceholder = useMemo(() => {\n if (variant === 'filter') return displayValue\n return displayValue || props.placeholder\n }, [displayValue, props.placeholder, variant])\n\n return (\n <>\n <Typography className=\"text-neutral-dark group-has-[div[data-slot=date-picker-left-slot]]:pl-large-1x\">\n {valueOrPlaceholder}\n </Typography>\n\n <input\n {...props}\n aria-readonly={true}\n className={twJoin('pointer-events-none', className)}\n hidden={true}\n placeholder={' '}\n readOnly={true}\n value={value ?? ''}\n />\n </>\n )\n}\n\nexport function DatePickerContent({\n className,\n sideOffset = 5,\n side = 'bottom',\n align = 'start',\n ...props\n}: ComponentProps<typeof RadixPopover.Content>) {\n const { state } = useFieldContext()\n\n return (\n <RadixPopover.Portal>\n <RadixPopover.Content\n align={align}\n className={content({ className, state })}\n side={side}\n sideOffset={sideOffset}\n {...props}\n />\n </RadixPopover.Portal>\n )\n}\n\nexport function DatePickerCaption({\n className,\n ...props\n}: ComponentProps<'p'>) {\n const { state } = useFieldContext()\n return <p className={caption({ className, state })} {...props} />\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"floating-label.js"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
3
|
+
import { ComponentProps } from 'react';
|
|
4
|
+
import { InputNumberFormatProps } from '@react-input/number-format';
|
|
5
|
+
import { I as IconType } from '../../icons-CmDuL0gZ.js';
|
|
6
|
+
import { FieldContextValue } from './context/field.context.js';
|
|
7
|
+
import { FloatingLabel } from './floating-label.js';
|
|
8
|
+
import '@react-input/mask';
|
|
9
|
+
|
|
10
|
+
declare const input: tailwind_variants.TVReturnType<{
|
|
11
|
+
state: {
|
|
12
|
+
normal: {
|
|
13
|
+
trigger: string;
|
|
14
|
+
};
|
|
15
|
+
error: {
|
|
16
|
+
trigger: string;
|
|
17
|
+
caption: string;
|
|
18
|
+
};
|
|
19
|
+
disabled: {
|
|
20
|
+
trigger: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
}, {
|
|
24
|
+
wrapper: string;
|
|
25
|
+
trigger: string[];
|
|
26
|
+
content: string;
|
|
27
|
+
value: string;
|
|
28
|
+
icon: string;
|
|
29
|
+
slotText: string;
|
|
30
|
+
caption: string;
|
|
31
|
+
action: string;
|
|
32
|
+
}, undefined, {
|
|
33
|
+
state: {
|
|
34
|
+
normal: {
|
|
35
|
+
trigger: string;
|
|
36
|
+
};
|
|
37
|
+
error: {
|
|
38
|
+
trigger: string;
|
|
39
|
+
caption: string;
|
|
40
|
+
};
|
|
41
|
+
disabled: {
|
|
42
|
+
trigger: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
}, {
|
|
46
|
+
wrapper: string;
|
|
47
|
+
trigger: string[];
|
|
48
|
+
content: string;
|
|
49
|
+
value: string;
|
|
50
|
+
icon: string;
|
|
51
|
+
slotText: string;
|
|
52
|
+
caption: string;
|
|
53
|
+
action: string;
|
|
54
|
+
}, tailwind_variants.TVReturnType<{
|
|
55
|
+
state: {
|
|
56
|
+
normal: {
|
|
57
|
+
trigger: string;
|
|
58
|
+
};
|
|
59
|
+
error: {
|
|
60
|
+
trigger: string;
|
|
61
|
+
caption: string;
|
|
62
|
+
};
|
|
63
|
+
disabled: {
|
|
64
|
+
trigger: string;
|
|
65
|
+
};
|
|
66
|
+
};
|
|
67
|
+
}, {
|
|
68
|
+
wrapper: string;
|
|
69
|
+
trigger: string[];
|
|
70
|
+
content: string;
|
|
71
|
+
value: string;
|
|
72
|
+
icon: string;
|
|
73
|
+
slotText: string;
|
|
74
|
+
caption: string;
|
|
75
|
+
action: string;
|
|
76
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
77
|
+
declare function InputRoot({ className, state, customMask, variant, mask, ...props }: ComponentProps<'div'> & FieldContextValue): react_jsx_runtime.JSX.Element;
|
|
78
|
+
declare function InputContent({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
79
|
+
declare function InputLabel(props: ComponentProps<typeof FloatingLabel>): react_jsx_runtime.JSX.Element;
|
|
80
|
+
declare function InputTrigger({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
81
|
+
declare function InputMask({ className, placeholder, ...props }: ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
82
|
+
declare function InputText({ className, placeholder, ...props }: ComponentProps<'input'>): react_jsx_runtime.JSX.Element;
|
|
83
|
+
declare function InputNumber({ className, locales, placeholder, ...props }: InputNumberFormatProps): react_jsx_runtime.JSX.Element;
|
|
84
|
+
declare function InputIcon({ className, name, ...props }: ComponentProps<'div'> & {
|
|
85
|
+
name: IconType;
|
|
86
|
+
}): react_jsx_runtime.JSX.Element;
|
|
87
|
+
declare function InputSlot({ className, ...props }: ComponentProps<'span'>): react_jsx_runtime.JSX.Element;
|
|
88
|
+
declare function InputCaption({ className, ...props }: ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
89
|
+
declare function InputAction({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
90
|
+
declare function InputNumericStepper({ handleIncrement, handleDecrement }: {
|
|
91
|
+
handleIncrement: () => void;
|
|
92
|
+
handleDecrement: () => void;
|
|
93
|
+
}): react_jsx_runtime.JSX.Element;
|
|
94
|
+
|
|
95
|
+
export { InputAction, InputCaption, InputContent, InputIcon, InputLabel, InputMask, InputNumber, InputNumericStepper, InputRoot, InputSlot, InputText, InputTrigger, input };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export{l as InputAction,k as InputCaption,c as InputContent,i as InputIcon,d as InputLabel,f as InputMask,h as InputNumber,m as InputNumericStepper,b as InputRoot,j as InputSlot,g as InputText,e as InputTrigger,a as input}from'../../chunk-2CM3SFOY.js';import'../../chunk-TSVURBUY.js';import'../../chunk-IRHU7PDO.js';import'../../chunk-CBFC4QME.js';import'../../chunk-WV7QV2PU.js';//# sourceMappingURL=input.js.map
|
|
2
|
+
//# sourceMappingURL=input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input.js"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from'@radix-ui/react-one-time-password-field';import {cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function n({children:r,className:o,...i}){return jsx(e.Root,{className:cx(o,"group gap-small flex items-center"),...i,children:r})}function t({className:r,...o}){return jsx(e.Input,{className:cx(r,"text-neutral-dark h-large-6x bg-layer-2-hover rounded-small-1x w-full text-center outline-0","focus-within:border-primary-idle focus-within:border"),...o})}function l({...r}){return jsx(e.HiddenInput,{...r})}var P={Root:n,Input:t,HiddenInput:l};export{P as OTPInput};//# sourceMappingURL=otp-input.js.map
|
|
2
|
+
//# sourceMappingURL=otp-input.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form/otp-input.tsx"],"names":["Root","children","className","props","jsx","cx","Input","HiddenInput","OTPInput"],"mappings":"6HAGA,SAASA,EAAK,CACZ,QAAA,CAAAC,EACA,SAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAA+C,CAC7C,OACEC,IAAkB,CAAA,CAAA,IAAA,CAAjB,CACC,SAAA,CAAWC,EAAAA,CAAGH,EAAW,mCAAmC,CAAA,CAC3D,GAAGC,CAAAA,CAEH,SAAAF,CAAAA,CACH,CAEJ,CAEA,SAASK,CAAAA,CAAM,CACb,SAAA,CAAAJ,CAAAA,CACA,GAAGC,CACL,EAAoD,CAClD,OACEC,GAAAA,CAAkB,CAAA,CAAA,KAAA,CAAjB,CACC,SAAA,CAAWC,EAAAA,CACTH,CAAAA,CACA,6FAAA,CACA,sDACF,CAAA,CACC,GAAGC,EACN,CAEJ,CAEA,SAASI,CAAAA,CAAY,CACnB,GAAGJ,CACL,EAA0D,CACxD,OAAOC,IAAkB,CAAA,CAAA,WAAA,CAAjB,CAA8B,GAAGD,CAAAA,CAAO,CAClD,CAEO,IAAMK,EAAW,CACtB,IAAA,CAAAR,EACA,KAAA,CAAAM,CAAAA,CACA,YAAAC,CACF","file":"otp-input.js","sourcesContent":["import * as OTPPasswordField from '@radix-ui/react-one-time-password-field'\nimport { cx } from '@xjur-ui/util'\n\nfunction Root({\n children,\n className,\n ...props\n}: OTPPasswordField.OneTimePasswordFieldProps) {\n return (\n <OTPPasswordField.Root\n className={cx(className, 'group gap-small flex items-center')}\n {...props}\n >\n {children}\n </OTPPasswordField.Root>\n )\n}\n\nfunction Input({\n className,\n ...props\n}: OTPPasswordField.OneTimePasswordFieldInputProps) {\n return (\n <OTPPasswordField.Input\n className={cx(\n className,\n 'text-neutral-dark h-large-6x bg-layer-2-hover rounded-small-1x w-full text-center outline-0',\n 'focus-within:border-primary-idle focus-within:border'\n )}\n {...props}\n />\n )\n}\n\nfunction HiddenInput({\n ...props\n}: OTPPasswordField.OneTimePasswordFieldHiddenInputProps) {\n return <OTPPasswordField.HiddenInput {...props} />\n}\n\nexport const OTPInput = {\n Root,\n Input,\n HiddenInput\n}\n"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {a}from'../../chunk-EIG6CBTQ.js';import'react';import*as r from'@radix-ui/react-radio-group';import {cx}from'@xjur-ui/util';import {jsx,jsxs}from'react/jsx-runtime';function u({className:i,orientation:o="vertical",...a}){return jsx(r.Root,{className:cx("gap-small flex data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col",i),"data-orientation":o,"data-slot":"radio-group",...a})}function b({className:i,id:o,label:a$1,disabled:t=false,...s}){return jsxs("div",{className:"gap-small flex items-center",children:[jsx(r.Item,{className:cx("size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none","border-border-layer-2 bg-layer-2-idle cursor-pointer border-2","hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary","data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active","data-[state=checked]:hover:border-primary-idle","disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",i),"data-slot":"radio-group-item",disabled:t,id:o,...s,children:jsx(r.Indicator,{className:"relative flex items-center justify-center","data-slot":"radio-group-indicator"})}),!!a$1&&jsx(a,{asChild:true,className:"text-size-body-sm data-[disabled=true]:opacity-38","data-disabled":t,weight:"medium",children:jsx("label",{htmlFor:o,children:a$1})})]})}export{u as RadioGroup,b as RadioItem};//# sourceMappingURL=radio.js.map
|
|
2
|
+
//# sourceMappingURL=radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/form/radio.tsx"],"names":["RadioGroup","className","orientation","props","jsx","cx","RadioItem","id","label","disabled","jsxs","Typography"],"mappings":"4KAKO,SAASA,CAAAA,CAAW,CACzB,SAAA,CAAAC,CAAAA,CACA,WAAA,CAAAC,CAAAA,CAAc,UAAA,CACd,GAAGC,CACL,CAAA,CAA0D,CACxD,OACEC,GAAAA,CAAqB,CAAA,CAAA,IAAA,CAApB,CACC,SAAA,CAAWC,EAAAA,CACT,4FAAA,CACAJ,CACF,CAAA,CACA,kBAAA,CAAkBC,CAAAA,CAClB,WAAA,CAAU,aAAA,CACT,GAAGC,CAAAA,CACN,CAEJ,CAEO,SAASG,CAAAA,CAAU,CACxB,SAAA,CAAAL,CAAAA,CACA,EAAA,CAAAM,CAAAA,CACA,KAAA,CAAAC,GAAAA,CACA,QAAA,CAAAC,CAAAA,CAAW,KAAA,CACX,GAAGN,CACL,CAAA,CAEG,CACD,OACEO,KAAC,KAAA,CAAA,CAAI,SAAA,CAAU,6BAAA,CACb,QAAA,CAAA,CAAAN,GAAAA,CAAqB,CAAA,CAAA,IAAA,CAApB,CACC,SAAA,CAAWC,EAAAA,CAET,uJAAA,CAEA,+DAAA,CAEA,gFAAA,CAEA,mFAAA,CAEA,gDAAA,CAEA,0FACAJ,CACF,CAAA,CACA,WAAA,CAAU,kBAAA,CACV,QAAA,CAAUQ,CAAAA,CACV,EAAA,CAAIF,CAAAA,CACH,GAAGJ,CAAAA,CAEJ,QAAA,CAAAC,GAAAA,CAAqB,CAAA,CAAA,SAAA,CAApB,CACC,UAAU,2CAAA,CACV,WAAA,CAAU,uBAAA,CACZ,CAAA,CACF,CAAA,CAEC,CAAC,CAACI,GAAAA,EACDJ,GAAAA,CAACO,CAAAA,CAAA,CACC,OAAA,CAAS,IAAA,CACT,SAAA,CAAU,mDAAA,CACV,eAAA,CAAeF,CAAAA,CACf,MAAA,CAAO,QAAA,CAEP,QAAA,CAAAL,GAAAA,CAAC,OAAA,CAAA,CAAM,OAAA,CAASG,CAAAA,CAAK,QAAA,CAAAC,GAAAA,CAAM,CAAA,CAC7B,CAAA,CAAA,CAEJ,CAEJ","file":"radio.js","sourcesContent":["import * as React from 'react'\nimport * as RadioGroupPrimitive from '@radix-ui/react-radio-group'\nimport { cx } from '@xjur-ui/util'\nimport { Typography } from '../typography'\n\nexport function RadioGroup({\n className,\n orientation = 'vertical',\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Root>) {\n return (\n <RadioGroupPrimitive.Root\n className={cx(\n 'gap-small flex data-[orientation=horizontal]:flex-row data-[orientation=vertical]:flex-col',\n className\n )}\n data-orientation={orientation}\n data-slot=\"radio-group\"\n {...props}\n />\n )\n}\n\nexport function RadioItem({\n className,\n id,\n label,\n disabled = false,\n ...props\n}: React.ComponentProps<typeof RadioGroupPrimitive.Item> & {\n label?: string\n}) {\n return (\n <div className=\"gap-small flex items-center\">\n <RadioGroupPrimitive.Item\n className={cx(\n // layout\n 'size-large-alt rounded-circle inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none',\n // base\n 'border-border-layer-2 bg-layer-2-idle cursor-pointer border-2',\n // hover/focus (desmarcado)\n 'hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary',\n // estado checked\n 'data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active',\n // hover quando estiver checked (opcional)\n 'data-[state=checked]:hover:border-primary-idle',\n // disabled\n 'disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]',\n className\n )}\n data-slot=\"radio-group-item\"\n disabled={disabled}\n id={id}\n {...props}\n >\n <RadioGroupPrimitive.Indicator\n className=\"relative flex items-center justify-center\"\n data-slot=\"radio-group-indicator\"\n />\n </RadioGroupPrimitive.Item>\n\n {!!label && (\n <Typography\n asChild={true}\n className=\"text-size-body-sm data-[disabled=true]:opacity-38\"\n data-disabled={disabled}\n weight=\"medium\"\n >\n <label htmlFor={id}>{label}</label>\n </Typography>\n )}\n </div>\n )\n}\n"]}
|