@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,153 +0,0 @@
|
|
|
1
|
-
// src/components/checkbox.tsx
|
|
2
|
-
import * as CheckoxPrimitive from "@radix-ui/react-checkbox";
|
|
3
|
-
import { cx as cx2 } from "@xjur-ui/util";
|
|
4
|
-
|
|
5
|
-
// src/components/icon.tsx
|
|
6
|
-
import { cx } from "@xjur-ui/util";
|
|
7
|
-
import { jsx } from "react/jsx-runtime";
|
|
8
|
-
function Icon({ className, filled = false, name, ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
"span",
|
|
11
|
-
{
|
|
12
|
-
...props,
|
|
13
|
-
className: cx(
|
|
14
|
-
"material-symbols-outlined",
|
|
15
|
-
"text-size-body-lg",
|
|
16
|
-
className
|
|
17
|
-
),
|
|
18
|
-
style: {
|
|
19
|
-
fontVariationSettings: `'FILL' ${filled ? 1 : 0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,
|
|
20
|
-
...props.style
|
|
21
|
-
},
|
|
22
|
-
children: name
|
|
23
|
-
}
|
|
24
|
-
);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
// src/components/typography.tsx
|
|
28
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
29
|
-
import { cva } from "@xjur-ui/util";
|
|
30
|
-
import { memo } from "react";
|
|
31
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
32
|
-
var typographyVariants = cva("", {
|
|
33
|
-
variants: {
|
|
34
|
-
variant: {
|
|
35
|
-
body: "",
|
|
36
|
-
label: "",
|
|
37
|
-
title: "",
|
|
38
|
-
headline: ""
|
|
39
|
-
},
|
|
40
|
-
size: {
|
|
41
|
-
"sm-2x": "",
|
|
42
|
-
"sm-1x": "",
|
|
43
|
-
sm: "",
|
|
44
|
-
md: "",
|
|
45
|
-
lg: ""
|
|
46
|
-
},
|
|
47
|
-
weight: {
|
|
48
|
-
thin: "font-thin",
|
|
49
|
-
extraLight: "font-extralight",
|
|
50
|
-
light: "font-light",
|
|
51
|
-
normal: "font-normal",
|
|
52
|
-
medium: "font-medium",
|
|
53
|
-
semibold: "font-semibold",
|
|
54
|
-
bold: "font-bold",
|
|
55
|
-
extraBold: "font-extrabold",
|
|
56
|
-
black: "font-black"
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
compoundVariants: [
|
|
60
|
-
{ variant: "body", size: "sm-1x", class: "text-size-body-sm-1x" },
|
|
61
|
-
{ variant: "body", size: "sm", class: "text-size-body-sm" },
|
|
62
|
-
{ variant: "body", size: "md", class: "text-size-body-md" },
|
|
63
|
-
{ variant: "body", size: "lg", class: "text-size-body-lg" },
|
|
64
|
-
{ variant: "label", size: "sm-2x", class: "text-size-label-sm-2x" },
|
|
65
|
-
{ variant: "label", size: "sm-1x", class: "text-size-label-sm-1x" },
|
|
66
|
-
{ variant: "label", size: "sm", class: "text-size-label-sm" },
|
|
67
|
-
{ variant: "label", size: "md", class: "text-size-label-md" },
|
|
68
|
-
{ variant: "label", size: "lg", class: "text-size-label-lg" },
|
|
69
|
-
{ variant: "title", size: "sm", class: "text-size-title-sm" },
|
|
70
|
-
{ variant: "title", size: "md", class: "text-size-title-md" },
|
|
71
|
-
{ variant: "title", size: "lg", class: "text-size-title-lg" },
|
|
72
|
-
{ variant: "headline", size: "sm", class: "text-size-headline-sm" },
|
|
73
|
-
{ variant: "headline", size: "md", class: "text-size-headline-md" },
|
|
74
|
-
{ variant: "headline", size: "lg", class: "text-size-headline-lg" }
|
|
75
|
-
],
|
|
76
|
-
defaultVariants: {
|
|
77
|
-
variant: "body",
|
|
78
|
-
size: "md",
|
|
79
|
-
weight: "normal"
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var Typography = memo(
|
|
83
|
-
({
|
|
84
|
-
variant,
|
|
85
|
-
size,
|
|
86
|
-
weight,
|
|
87
|
-
asChild,
|
|
88
|
-
className,
|
|
89
|
-
...props
|
|
90
|
-
}) => {
|
|
91
|
-
const Component = asChild ? Slot : "span";
|
|
92
|
-
return /* @__PURE__ */ jsx2(
|
|
93
|
-
Component,
|
|
94
|
-
{
|
|
95
|
-
className: typographyVariants({ variant, size, weight, className }),
|
|
96
|
-
...props
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
);
|
|
101
|
-
Typography.displayName = "Typography";
|
|
102
|
-
|
|
103
|
-
// src/components/checkbox.tsx
|
|
104
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
105
|
-
function Checkbox({
|
|
106
|
-
label,
|
|
107
|
-
name,
|
|
108
|
-
className,
|
|
109
|
-
disabled = false,
|
|
110
|
-
...props
|
|
111
|
-
}) {
|
|
112
|
-
const fieldId = `field-checkbox-${name}`;
|
|
113
|
-
return /* @__PURE__ */ jsxs("div", { className: "group gap-small flex items-center", children: [
|
|
114
|
-
/* @__PURE__ */ jsx3(
|
|
115
|
-
CheckoxPrimitive.Root,
|
|
116
|
-
{
|
|
117
|
-
disabled,
|
|
118
|
-
...props,
|
|
119
|
-
className: cx2(
|
|
120
|
-
// layout
|
|
121
|
-
"size-large-alt rounded-small-1x inline-flex items-center justify-center transition-[border-color,box-shadow,background-color] duration-200 outline-none",
|
|
122
|
-
// base
|
|
123
|
-
"border-border-layer-2 bg-layer-2-idle cursor-pointer border-2",
|
|
124
|
-
// hover/focus (desmarcado)
|
|
125
|
-
"hover:border-primary-idle focus:border-primary-idle focus:shadow-focus-primary",
|
|
126
|
-
// estado checked
|
|
127
|
-
"data-[state=checked]:bg-primary-active data-[state=checked]:border-primary-active",
|
|
128
|
-
// hover quando estiver checked (opcional)
|
|
129
|
-
"data-[state=checked]:hover:border-primary-idle",
|
|
130
|
-
// disabled
|
|
131
|
-
"disabled:hover:border-border-layer-2 disabled:cursor-not-allowed disabled:opacity-[38%]",
|
|
132
|
-
className
|
|
133
|
-
),
|
|
134
|
-
id: fieldId,
|
|
135
|
-
name,
|
|
136
|
-
children: /* @__PURE__ */ jsx3(CheckoxPrimitive.Indicator, { className: "flex items-center justify-center", children: /* @__PURE__ */ jsx3(Icon, { className: "text-neutral-label", name: "check" }) })
|
|
137
|
-
}
|
|
138
|
-
),
|
|
139
|
-
!!label && /* @__PURE__ */ jsx3(
|
|
140
|
-
Typography,
|
|
141
|
-
{
|
|
142
|
-
asChild: true,
|
|
143
|
-
className: "text-size-body-sm data-[disabled=true]:opacity-38",
|
|
144
|
-
"data-disabled": disabled,
|
|
145
|
-
weight: "medium",
|
|
146
|
-
children: /* @__PURE__ */ jsx3("label", { htmlFor: fieldId, children: label })
|
|
147
|
-
}
|
|
148
|
-
)
|
|
149
|
-
] });
|
|
150
|
-
}
|
|
151
|
-
export {
|
|
152
|
-
Checkbox
|
|
153
|
-
};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
import * as RadixPopover from '@radix-ui/react-popover';
|
|
4
|
-
import { TypographyProps } from './typography.js';
|
|
5
|
-
import 'class-variance-authority/types';
|
|
6
|
-
import '@xjur-ui/util';
|
|
7
|
-
|
|
8
|
-
declare function DatePickerRoot(props: ComponentProps<typeof RadixPopover.Root>): react_jsx_runtime.JSX.Element;
|
|
9
|
-
declare function DatePickerTrigger({ className, ...props }: ComponentProps<typeof RadixPopover.Trigger>): react_jsx_runtime.JSX.Element;
|
|
10
|
-
declare function DatePickerContent({ className, sideOffset, side, align, ...props }: ComponentProps<typeof RadixPopover.Content>): react_jsx_runtime.JSX.Element;
|
|
11
|
-
declare function DatePickerValue({ className, displayValue, value, ...props }: ComponentProps<'input'> & {
|
|
12
|
-
displayValue?: string;
|
|
13
|
-
}): react_jsx_runtime.JSX.Element;
|
|
14
|
-
declare function DatePickerLabel({ className, htmlFor, children, ...props }: TypographyProps & {
|
|
15
|
-
htmlFor?: string;
|
|
16
|
-
}): react_jsx_runtime.JSX.Element;
|
|
17
|
-
declare function DatePickerLeftSlot({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
18
|
-
declare function DatePickerRightSlot({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
19
|
-
|
|
20
|
-
export { DatePickerContent, DatePickerLabel, DatePickerLeftSlot, DatePickerRightSlot, DatePickerRoot, DatePickerTrigger, DatePickerValue };
|
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
// src/components/date-picker.tsx
|
|
2
|
-
import * as RadixPopover from "@radix-ui/react-popover";
|
|
3
|
-
import { cx } from "@xjur-ui/util";
|
|
4
|
-
|
|
5
|
-
// src/components/typography.tsx
|
|
6
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
7
|
-
import { cva } from "@xjur-ui/util";
|
|
8
|
-
import { memo } from "react";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var typographyVariants = cva("", {
|
|
11
|
-
variants: {
|
|
12
|
-
variant: {
|
|
13
|
-
body: "",
|
|
14
|
-
label: "",
|
|
15
|
-
title: "",
|
|
16
|
-
headline: ""
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
"sm-2x": "",
|
|
20
|
-
"sm-1x": "",
|
|
21
|
-
sm: "",
|
|
22
|
-
md: "",
|
|
23
|
-
lg: ""
|
|
24
|
-
},
|
|
25
|
-
weight: {
|
|
26
|
-
thin: "font-thin",
|
|
27
|
-
extraLight: "font-extralight",
|
|
28
|
-
light: "font-light",
|
|
29
|
-
normal: "font-normal",
|
|
30
|
-
medium: "font-medium",
|
|
31
|
-
semibold: "font-semibold",
|
|
32
|
-
bold: "font-bold",
|
|
33
|
-
extraBold: "font-extrabold",
|
|
34
|
-
black: "font-black"
|
|
35
|
-
}
|
|
36
|
-
},
|
|
37
|
-
compoundVariants: [
|
|
38
|
-
{ variant: "body", size: "sm-1x", class: "text-size-body-sm-1x" },
|
|
39
|
-
{ variant: "body", size: "sm", class: "text-size-body-sm" },
|
|
40
|
-
{ variant: "body", size: "md", class: "text-size-body-md" },
|
|
41
|
-
{ variant: "body", size: "lg", class: "text-size-body-lg" },
|
|
42
|
-
{ variant: "label", size: "sm-2x", class: "text-size-label-sm-2x" },
|
|
43
|
-
{ variant: "label", size: "sm-1x", class: "text-size-label-sm-1x" },
|
|
44
|
-
{ variant: "label", size: "sm", class: "text-size-label-sm" },
|
|
45
|
-
{ variant: "label", size: "md", class: "text-size-label-md" },
|
|
46
|
-
{ variant: "label", size: "lg", class: "text-size-label-lg" },
|
|
47
|
-
{ variant: "title", size: "sm", class: "text-size-title-sm" },
|
|
48
|
-
{ variant: "title", size: "md", class: "text-size-title-md" },
|
|
49
|
-
{ variant: "title", size: "lg", class: "text-size-title-lg" },
|
|
50
|
-
{ variant: "headline", size: "sm", class: "text-size-headline-sm" },
|
|
51
|
-
{ variant: "headline", size: "md", class: "text-size-headline-md" },
|
|
52
|
-
{ variant: "headline", size: "lg", class: "text-size-headline-lg" }
|
|
53
|
-
],
|
|
54
|
-
defaultVariants: {
|
|
55
|
-
variant: "body",
|
|
56
|
-
size: "md",
|
|
57
|
-
weight: "normal"
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
var Typography = memo(
|
|
61
|
-
({
|
|
62
|
-
variant,
|
|
63
|
-
size,
|
|
64
|
-
weight,
|
|
65
|
-
asChild,
|
|
66
|
-
className,
|
|
67
|
-
...props
|
|
68
|
-
}) => {
|
|
69
|
-
const Component = asChild ? Slot : "span";
|
|
70
|
-
return /* @__PURE__ */ jsx(
|
|
71
|
-
Component,
|
|
72
|
-
{
|
|
73
|
-
className: typographyVariants({ variant, size, weight, className }),
|
|
74
|
-
...props
|
|
75
|
-
}
|
|
76
|
-
);
|
|
77
|
-
}
|
|
78
|
-
);
|
|
79
|
-
Typography.displayName = "Typography";
|
|
80
|
-
|
|
81
|
-
// src/components/date-picker.tsx
|
|
82
|
-
import { Fragment, jsx as jsx2, jsxs } from "react/jsx-runtime";
|
|
83
|
-
function DatePickerRoot(props) {
|
|
84
|
-
return /* @__PURE__ */ jsx2(RadixPopover.Root, { ...props });
|
|
85
|
-
}
|
|
86
|
-
function DatePickerTrigger({
|
|
87
|
-
className,
|
|
88
|
-
...props
|
|
89
|
-
}) {
|
|
90
|
-
return /* @__PURE__ */ jsx2(
|
|
91
|
-
RadixPopover.Trigger,
|
|
92
|
-
{
|
|
93
|
-
className: cx(
|
|
94
|
-
className,
|
|
95
|
-
"group h-large-4x rounded-small-1x gap-small py-small_1x-alt px-small relative flex w-full cursor-pointer items-center",
|
|
96
|
-
"bg-layer-2-idle border-border-layer-2 hover:border-border-layer-3 border",
|
|
97
|
-
"data-[state=open]:border-primary-idle",
|
|
98
|
-
"has-[input:not(:placeholder-shown)]:text-primary-idle",
|
|
99
|
-
"has-[input:not(:placeholder-shown)]:border-primary-idle"
|
|
100
|
-
),
|
|
101
|
-
...props
|
|
102
|
-
}
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
function DatePickerContent({
|
|
106
|
-
className,
|
|
107
|
-
sideOffset = 5,
|
|
108
|
-
side = "bottom",
|
|
109
|
-
align = "start",
|
|
110
|
-
...props
|
|
111
|
-
}) {
|
|
112
|
-
return /* @__PURE__ */ jsx2(RadixPopover.Portal, { children: /* @__PURE__ */ jsx2(
|
|
113
|
-
RadixPopover.Content,
|
|
114
|
-
{
|
|
115
|
-
align,
|
|
116
|
-
className: cx(
|
|
117
|
-
className,
|
|
118
|
-
"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)]"
|
|
119
|
-
),
|
|
120
|
-
side,
|
|
121
|
-
sideOffset,
|
|
122
|
-
...props
|
|
123
|
-
}
|
|
124
|
-
) });
|
|
125
|
-
}
|
|
126
|
-
function DatePickerValue({
|
|
127
|
-
className,
|
|
128
|
-
displayValue = "",
|
|
129
|
-
value,
|
|
130
|
-
...props
|
|
131
|
-
}) {
|
|
132
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133
|
-
!!displayValue && /* @__PURE__ */ jsx2(Typography, { className: "text-neutral-dark group-has-[div[data-slot=date-picker-left-slot]]:pl-large-1x", children: displayValue }),
|
|
134
|
-
/* @__PURE__ */ jsx2(
|
|
135
|
-
"input",
|
|
136
|
-
{
|
|
137
|
-
...props,
|
|
138
|
-
"aria-readonly": true,
|
|
139
|
-
className: cx("pointer-events-none", className),
|
|
140
|
-
hidden: true,
|
|
141
|
-
placeholder: props.placeholder ?? " ",
|
|
142
|
-
readOnly: true,
|
|
143
|
-
value: value ?? ""
|
|
144
|
-
}
|
|
145
|
-
)
|
|
146
|
-
] });
|
|
147
|
-
}
|
|
148
|
-
function DatePickerLabel({
|
|
149
|
-
className,
|
|
150
|
-
htmlFor,
|
|
151
|
-
children,
|
|
152
|
-
...props
|
|
153
|
-
}) {
|
|
154
|
-
return /* @__PURE__ */ jsx2(
|
|
155
|
-
Typography,
|
|
156
|
-
{
|
|
157
|
-
asChild: true,
|
|
158
|
-
className: cx(
|
|
159
|
-
"inline-block max-w-full truncate text-left font-normal",
|
|
160
|
-
"left-small right-small pointer-events-none absolute top-1/2 -translate-y-1/2",
|
|
161
|
-
"ease transition-all duration-250",
|
|
162
|
-
// Content Open
|
|
163
|
-
"group-data-[state=open]:text-primary-idle",
|
|
164
|
-
"group-data-[state=open]:-top-[3px]",
|
|
165
|
-
"group-data-[state=open]:text-size-label-sm-1x",
|
|
166
|
-
"group-data-[state=open]:font-medium",
|
|
167
|
-
// Filled
|
|
168
|
-
"group-has-[input:not(:placeholder-shown)]:text-primary-idle",
|
|
169
|
-
"group-has-[input:not(:placeholder-shown)]:-top-[3px]",
|
|
170
|
-
"group-has-[input:not(:placeholder-shown)]:text-size-label-sm-1x",
|
|
171
|
-
"group-has-[input:not(:placeholder-shown)]:font-medium",
|
|
172
|
-
// If has left slot
|
|
173
|
-
"group-has-[div[data-slot=date-picker-left-slot]]:left-large-4x",
|
|
174
|
-
"group-has-[div[data-slot=date-picker-left-slot]]:group-data-[state=open]:left-small",
|
|
175
|
-
"group-has-[div[data-slot=date-picker-left-slot]]:group-has-[input:not(:placeholder-shown)]:left-small",
|
|
176
|
-
// If has right slot
|
|
177
|
-
"group-has-[div[data-slot=date-picker-right-slot]]:right-large-4x",
|
|
178
|
-
"group-has-[div[data-slot=date-picker-right-slot]]:group-data-[state=open]:right-small",
|
|
179
|
-
"group-has-[div[data-slot=date-picker-right-slot]]:group-has-[input:not(:placeholder-shown)]:right-small",
|
|
180
|
-
// Animate
|
|
181
|
-
"group-data-[state=open]:animate-in",
|
|
182
|
-
"group-data-[state=closed]:animate-out",
|
|
183
|
-
"group-has-[input:not(:placeholder-shown)]:animate-out",
|
|
184
|
-
className
|
|
185
|
-
),
|
|
186
|
-
weight: "medium",
|
|
187
|
-
...props,
|
|
188
|
-
children: /* @__PURE__ */ jsx2("label", { htmlFor, children: /* @__PURE__ */ jsx2("span", { className: "bg-layer-2-idle rounded-small-1x max-w-full", children }) })
|
|
189
|
-
}
|
|
190
|
-
);
|
|
191
|
-
}
|
|
192
|
-
function DatePickerLeftSlot({
|
|
193
|
-
className,
|
|
194
|
-
...props
|
|
195
|
-
}) {
|
|
196
|
-
return /* @__PURE__ */ jsx2(
|
|
197
|
-
"div",
|
|
198
|
-
{
|
|
199
|
-
...props,
|
|
200
|
-
className: cx(
|
|
201
|
-
className,
|
|
202
|
-
"left-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
|
|
203
|
-
),
|
|
204
|
-
"data-slot": "date-picker-left-slot"
|
|
205
|
-
}
|
|
206
|
-
);
|
|
207
|
-
}
|
|
208
|
-
function DatePickerRightSlot({
|
|
209
|
-
className,
|
|
210
|
-
...props
|
|
211
|
-
}) {
|
|
212
|
-
return /* @__PURE__ */ jsx2(
|
|
213
|
-
"div",
|
|
214
|
-
{
|
|
215
|
-
...props,
|
|
216
|
-
className: cx(
|
|
217
|
-
className,
|
|
218
|
-
"right-small absolute top-1/2 flex -translate-y-1/2 items-center justify-center"
|
|
219
|
-
),
|
|
220
|
-
"data-slot": "date-picker-right-slot"
|
|
221
|
-
}
|
|
222
|
-
);
|
|
223
|
-
}
|
|
224
|
-
export {
|
|
225
|
-
DatePickerContent,
|
|
226
|
-
DatePickerLabel,
|
|
227
|
-
DatePickerLeftSlot,
|
|
228
|
-
DatePickerRightSlot,
|
|
229
|
-
DatePickerRoot,
|
|
230
|
-
DatePickerTrigger,
|
|
231
|
-
DatePickerValue
|
|
232
|
-
};
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ComponentProps } from 'react';
|
|
3
|
-
import { MaskOptions } from '@react-input/mask';
|
|
4
|
-
export { MaskOptions } from '@react-input/mask';
|
|
5
|
-
import { InputNumberFormatProps } from '@react-input/number-format';
|
|
6
|
-
|
|
7
|
-
type InputMaskType = 'cpf' | 'cnpj' | 'telefone' | 'cep' | 'numero-processo' | 'custom' | 'data' | 'hora' | 'data-hora';
|
|
8
|
-
declare function inputMask(type: InputMaskType, options?: MaskOptions): MaskOptions;
|
|
9
|
-
|
|
10
|
-
type InputProps = {
|
|
11
|
-
variant?: 'outlined' | 'filled';
|
|
12
|
-
};
|
|
13
|
-
declare function InputRoot({ className, children, variant, ...props }: ComponentProps<'div'> & InputProps): react_jsx_runtime.JSX.Element;
|
|
14
|
-
declare function InputContent({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
15
|
-
declare function InputLabel({ htmlFor, className, children, ...props }: ComponentProps<'label'> & {
|
|
16
|
-
htmlFor: string;
|
|
17
|
-
}): react_jsx_runtime.JSX.Element;
|
|
18
|
-
declare function InputText({ className, maskOptions, maskType, ...props }: ComponentProps<'input'> & {
|
|
19
|
-
maskOptions?: MaskOptions;
|
|
20
|
-
maskType?: InputMaskType;
|
|
21
|
-
}): react_jsx_runtime.JSX.Element;
|
|
22
|
-
declare function InputNumber({ className, locales, ...props }: InputNumberFormatProps): react_jsx_runtime.JSX.Element;
|
|
23
|
-
declare function InputLeftSlot({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
24
|
-
declare function InputRightSlot({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
25
|
-
declare function InputMessage({ className, ...props }: ComponentProps<'p'>): react_jsx_runtime.JSX.Element;
|
|
26
|
-
declare function InputContainer({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
27
|
-
declare function InputAction({ className, side, ...props }: ComponentProps<'div'> & {
|
|
28
|
-
side: 'left' | 'right';
|
|
29
|
-
}): react_jsx_runtime.JSX.Element;
|
|
30
|
-
declare function InputActionButton({ className, ...props }: ComponentProps<'div'>): react_jsx_runtime.JSX.Element;
|
|
31
|
-
|
|
32
|
-
export { InputAction, InputActionButton, InputContainer, InputContent, InputLabel, InputLeftSlot, type InputMaskType, InputMessage, InputNumber, type InputProps, InputRightSlot, InputRoot, InputText, inputMask };
|