@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
package/dist/components/sheet.js
CHANGED
|
@@ -1,251 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4
|
-
import { cx as cx3 } from "@xjur-ui/util";
|
|
5
|
-
|
|
6
|
-
// src/components/button.tsx
|
|
7
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
8
|
-
import { cva, cx } from "@xjur-ui/util";
|
|
9
|
-
import { jsx } from "react/jsx-runtime";
|
|
10
|
-
var buttonVariants = cva(
|
|
11
|
-
[
|
|
12
|
-
"outline-none inline-flex items-center justify-center rounded-circle gap-small cursor-pointer disabled:opacity-38 disabled:pointer-events-none transition-colors"
|
|
13
|
-
],
|
|
14
|
-
{
|
|
15
|
-
variants: {
|
|
16
|
-
size: {
|
|
17
|
-
md: "py-small_1x-alt px-medium text-size-body-md",
|
|
18
|
-
sm: "py-small-1x px-small text-size-label-sm",
|
|
19
|
-
icon_md: "p-small text-size-body-md h-large-4x w-large-4x",
|
|
20
|
-
icon_sm: "p-small-1x text-size-label-sm h-large-2x w-large-2x"
|
|
21
|
-
},
|
|
22
|
-
variant: {
|
|
23
|
-
primary: "",
|
|
24
|
-
secondary: "",
|
|
25
|
-
tertiary: "",
|
|
26
|
-
destructive: "",
|
|
27
|
-
outlined: "bg-layer-2-idle border border-border-layer-2 hover:bg-layer-2-hover active:bg-layer-2-pressed"
|
|
28
|
-
},
|
|
29
|
-
appearance: {
|
|
30
|
-
solid: "",
|
|
31
|
-
ghost: "bg-transparent"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
compoundVariants: [
|
|
35
|
-
{
|
|
36
|
-
variant: "primary",
|
|
37
|
-
appearance: "solid",
|
|
38
|
-
class: "bg-primary-idle text-neutral-label hover:bg-primary-hover active:bg-primary-pressed"
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
variant: "primary",
|
|
42
|
-
appearance: "ghost",
|
|
43
|
-
class: "text-primary-idle hover:bg-primary-alt-idle active:bg-primary-alt-pressed"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
variant: "secondary",
|
|
47
|
-
appearance: "solid",
|
|
48
|
-
class: "bg-layer-1-hover text-neutral-dark hover:bg-layer-1-pressed active:bg-layer-1-active"
|
|
49
|
-
},
|
|
50
|
-
{
|
|
51
|
-
variant: "secondary",
|
|
52
|
-
appearance: "ghost",
|
|
53
|
-
class: "hover:bg-layer-1-hover active:bg-layer-1-pressed"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
variant: "tertiary",
|
|
57
|
-
appearance: "solid",
|
|
58
|
-
class: "bg-layer-2-hover text-neutral-dark hover:bg-layer-2-pressed active:bg-layer-2-active"
|
|
59
|
-
},
|
|
60
|
-
{
|
|
61
|
-
variant: "tertiary",
|
|
62
|
-
appearance: "ghost",
|
|
63
|
-
class: "hover:bg-layer-2-hover active:bg-layer-2-pressed"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
variant: "destructive",
|
|
67
|
-
appearance: "solid",
|
|
68
|
-
class: "bg-danger-idle text-neutral-label hover:bg-danger-hover active:bg-danger-pressed"
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
variant: "destructive",
|
|
72
|
-
appearance: "ghost",
|
|
73
|
-
class: "text-danger-label-idle hover:bg-danger-alt-idle active:bg-danger-alt-pressed"
|
|
74
|
-
}
|
|
75
|
-
],
|
|
76
|
-
defaultVariants: {
|
|
77
|
-
size: "md",
|
|
78
|
-
variant: "primary",
|
|
79
|
-
appearance: "solid"
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
);
|
|
83
|
-
function Button({
|
|
84
|
-
asChild,
|
|
85
|
-
className,
|
|
86
|
-
variant = "primary",
|
|
87
|
-
size = "md",
|
|
88
|
-
appearance = "solid",
|
|
89
|
-
...props
|
|
90
|
-
}) {
|
|
91
|
-
const Component = asChild ? Slot : "button";
|
|
92
|
-
return /* @__PURE__ */ jsx(
|
|
93
|
-
Component,
|
|
94
|
-
{
|
|
95
|
-
className: cx(buttonVariants({ variant, appearance, size }), className),
|
|
96
|
-
...props
|
|
97
|
-
}
|
|
98
|
-
);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
// src/components/icon.tsx
|
|
102
|
-
import { cx as cx2 } from "@xjur-ui/util";
|
|
103
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
104
|
-
function Icon({ className, filled = false, name, ...props }) {
|
|
105
|
-
return /* @__PURE__ */ jsx2(
|
|
106
|
-
"span",
|
|
107
|
-
{
|
|
108
|
-
...props,
|
|
109
|
-
className: cx2(
|
|
110
|
-
"material-symbols-outlined",
|
|
111
|
-
"text-size-body-lg",
|
|
112
|
-
className
|
|
113
|
-
),
|
|
114
|
-
style: {
|
|
115
|
-
fontVariationSettings: `'FILL' ${filled ? 1 : 0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,
|
|
116
|
-
...props.style
|
|
117
|
-
},
|
|
118
|
-
children: name
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
// src/components/sheet.tsx
|
|
124
|
-
import { jsx as jsx3, jsxs } from "react/jsx-runtime";
|
|
125
|
-
function SheetRoot({
|
|
126
|
-
...props
|
|
127
|
-
}) {
|
|
128
|
-
return /* @__PURE__ */ jsx3(SheetPrimitive.Root, { "data-slot": "sheet", ...props });
|
|
129
|
-
}
|
|
130
|
-
function SheetTrigger({
|
|
131
|
-
...props
|
|
132
|
-
}) {
|
|
133
|
-
return /* @__PURE__ */ jsx3(SheetPrimitive.Trigger, { "data-slot": "sheet-trigger", ...props });
|
|
134
|
-
}
|
|
135
|
-
function SheetClose({
|
|
136
|
-
children = /* @__PURE__ */ jsx3(Button, { appearance: "ghost", size: "icon_md", variant: "tertiary", children: /* @__PURE__ */ jsx3(Icon, { className: "text-icon-neutral-3", name: "close" }) }),
|
|
137
|
-
...props
|
|
138
|
-
}) {
|
|
139
|
-
return /* @__PURE__ */ jsx3(SheetPrimitive.Close, { "data-slot": "sheet-close", ...props, children });
|
|
140
|
-
}
|
|
141
|
-
function SheetPortal({
|
|
142
|
-
...props
|
|
143
|
-
}) {
|
|
144
|
-
return /* @__PURE__ */ jsx3(SheetPrimitive.Portal, { "data-slot": "sheet-portal", ...props });
|
|
145
|
-
}
|
|
146
|
-
function SheetOverlay({
|
|
147
|
-
className,
|
|
148
|
-
...props
|
|
149
|
-
}) {
|
|
150
|
-
return /* @__PURE__ */ jsx3(
|
|
151
|
-
SheetPrimitive.Overlay,
|
|
152
|
-
{
|
|
153
|
-
className: cx3(
|
|
154
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
155
|
-
className
|
|
156
|
-
),
|
|
157
|
-
"data-slot": "sheet-overlay",
|
|
158
|
-
...props
|
|
159
|
-
}
|
|
160
|
-
);
|
|
161
|
-
}
|
|
162
|
-
function SheetContent({
|
|
163
|
-
className,
|
|
164
|
-
children,
|
|
165
|
-
side = "right",
|
|
166
|
-
overlay = false,
|
|
167
|
-
...props
|
|
168
|
-
}) {
|
|
169
|
-
return /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
170
|
-
overlay && /* @__PURE__ */ jsx3(SheetOverlay, {}),
|
|
171
|
-
/* @__PURE__ */ jsx3(
|
|
172
|
-
SheetPrimitive.Content,
|
|
173
|
-
{
|
|
174
|
-
className: cx3(
|
|
175
|
-
"border-border-layer-2 bg-layer-2-idle data-[state=open]:animate-in data-[state=closed]:animate-out shadow-elevation-2 fixed z-50 flex flex-col gap-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",
|
|
176
|
-
side === "right" && "data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",
|
|
177
|
-
side === "left" && "data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",
|
|
178
|
-
side === "top" && "data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",
|
|
179
|
-
side === "bottom" && "data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",
|
|
180
|
-
className
|
|
181
|
-
),
|
|
182
|
-
"data-slot": "sheet-content",
|
|
183
|
-
...props,
|
|
184
|
-
children
|
|
185
|
-
}
|
|
186
|
-
)
|
|
187
|
-
] });
|
|
188
|
-
}
|
|
189
|
-
function SheetBody({
|
|
190
|
-
className,
|
|
191
|
-
...props
|
|
192
|
-
}) {
|
|
193
|
-
return /* @__PURE__ */ jsx3("div", { className: cx3("px-large-2x", className), ...props });
|
|
194
|
-
}
|
|
195
|
-
function SheetHeader({
|
|
196
|
-
className,
|
|
197
|
-
...props
|
|
198
|
-
}) {
|
|
199
|
-
return /* @__PURE__ */ jsx3(
|
|
200
|
-
"div",
|
|
201
|
-
{
|
|
202
|
-
className: cx3(
|
|
203
|
-
"py-large px-large-2x border-b-border-layer-2 border-b",
|
|
204
|
-
className
|
|
205
|
-
),
|
|
206
|
-
"data-slot": "sheet-header",
|
|
207
|
-
...props
|
|
208
|
-
}
|
|
209
|
-
);
|
|
210
|
-
}
|
|
211
|
-
function SheetFooter({
|
|
212
|
-
className,
|
|
213
|
-
...props
|
|
214
|
-
}) {
|
|
215
|
-
return /* @__PURE__ */ jsx3(
|
|
216
|
-
"div",
|
|
217
|
-
{
|
|
218
|
-
className: cx3(
|
|
219
|
-
"py-large px-large-2x border-t-border-layer-2 mt-auto border-t",
|
|
220
|
-
className
|
|
221
|
-
),
|
|
222
|
-
"data-slot": "sheet-footer",
|
|
223
|
-
...props
|
|
224
|
-
}
|
|
225
|
-
);
|
|
226
|
-
}
|
|
227
|
-
function SheetTitle({
|
|
228
|
-
className,
|
|
229
|
-
...props
|
|
230
|
-
}) {
|
|
231
|
-
return /* @__PURE__ */ jsx3(
|
|
232
|
-
SheetPrimitive.Title,
|
|
233
|
-
{
|
|
234
|
-
className: cx3("text-size-title-lg font-medium", className),
|
|
235
|
-
"data-slot": "sheet-title",
|
|
236
|
-
...props
|
|
237
|
-
}
|
|
238
|
-
);
|
|
239
|
-
}
|
|
240
|
-
export {
|
|
241
|
-
SheetBody,
|
|
242
|
-
SheetClose,
|
|
243
|
-
SheetContent,
|
|
244
|
-
SheetFooter,
|
|
245
|
-
SheetHeader,
|
|
246
|
-
SheetOverlay,
|
|
247
|
-
SheetPortal,
|
|
248
|
-
SheetRoot,
|
|
249
|
-
SheetTitle,
|
|
250
|
-
SheetTrigger
|
|
251
|
-
};
|
|
1
|
+
import {b as b$1}from'../chunk-PKCW37CJ.js';import {b as b$2}from'../chunk-WV7QV2PU.js';import'react';import*as e from'@radix-ui/react-dialog';import {cx}from'@xjur-ui/util';import {jsx,jsxs}from'react/jsx-runtime';function v({...t}){return jsx(e.Root,{"data-slot":"sheet",...t})}function S({...t}){return jsx(e.Trigger,{"data-slot":"sheet-trigger",...t})}function x({children:t=jsx(b$1,{appearance:"ghost",size:"icon_md",variant:"tertiary",children:jsx(b$2,{className:"text-icon-neutral-3",name:"close"})}),...o}){return jsx(e.Close,{"data-slot":"sheet-close",...o,children:t})}function m({...t}){return jsx(e.Portal,{"data-slot":"sheet-portal",...t})}function p({className:t,...o}){return jsx(e.Overlay,{className:cx("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50",t),"data-slot":"sheet-overlay",...o})}function g({className:t,children:o,side:i="right",overlay:l=false,...d}){return jsxs(m,{children:[l&&jsx(p,{}),jsx(e.Content,{className:cx("border-border-layer-2 bg-layer-2-idle data-[state=open]:animate-in data-[state=closed]:animate-out shadow-elevation-2 fixed z-50 flex flex-col gap-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",i==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",i==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",i==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",i==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),"data-slot":"sheet-content",...d,children:o})]})}function b({className:t,...o}){return jsx("div",{className:cx("px-large-2x",t),...o})}function y({className:t,...o}){return jsx("div",{className:cx("py-large px-large-2x border-b-border-layer-2 border-b",t),"data-slot":"sheet-header",...o})}function C({className:t,...o}){return jsx("div",{className:cx("py-large px-large-2x border-t-border-layer-2 mt-auto border-t",t),"data-slot":"sheet-footer",...o})}function R({className:t,...o}){return jsx(e.Title,{className:cx("text-size-title-lg font-medium",t),"data-slot":"sheet-title",...o})}export{b as SheetBody,x as SheetClose,g as SheetContent,C as SheetFooter,y as SheetHeader,p as SheetOverlay,m as SheetPortal,v as SheetRoot,R as SheetTitle,S as SheetTrigger};//# sourceMappingURL=sheet.js.map
|
|
2
|
+
//# sourceMappingURL=sheet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/sheet.tsx"],"names":["SheetRoot","props","jsx","SheetTrigger","SheetClose","children","Button","Icon","SheetPortal","SheetOverlay","className","cx","SheetContent","side","overlay","jsxs","SheetBody","SheetHeader","SheetFooter","SheetTitle"],"mappings":"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","file":"sheet.js","sourcesContent":["import * as React from 'react'\nimport * as SheetPrimitive from '@radix-ui/react-dialog'\nimport { cx } from '@xjur-ui/util'\nimport { Button } from './form/button'\nimport { Icon } from './icon'\n\nexport function SheetRoot({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nexport function SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nexport function SheetClose({\n children = (\n <Button appearance=\"ghost\" size=\"icon_md\" variant=\"tertiary\">\n <Icon className=\"text-icon-neutral-3\" name=\"close\" />\n </Button>\n ),\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return (\n <SheetPrimitive.Close data-slot=\"sheet-close\" {...props}>\n {children}\n </SheetPrimitive.Close>\n )\n}\n\nexport function SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nexport function SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n className={cx(\n 'data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50',\n className\n )}\n data-slot=\"sheet-overlay\"\n {...props}\n />\n )\n}\n\nexport function SheetContent({\n className,\n children,\n side = 'right',\n overlay = false,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: 'top' | 'right' | 'bottom' | 'left'\n overlay?: boolean\n}) {\n return (\n <SheetPortal>\n {overlay && <SheetOverlay />}\n <SheetPrimitive.Content\n className={cx(\n 'border-border-layer-2 bg-layer-2-idle data-[state=open]:animate-in data-[state=closed]:animate-out shadow-elevation-2 fixed z-50 flex flex-col gap-4 transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500',\n side === 'right' &&\n 'data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm',\n side === 'left' &&\n 'data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm',\n side === 'top' &&\n 'data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b',\n side === 'bottom' &&\n 'data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t',\n className\n )}\n data-slot=\"sheet-content\"\n {...props}\n >\n {children}\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nexport function SheetBody({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return <div className={cx('px-large-2x', className)} {...props} />\n}\n\nexport function SheetHeader({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n className={cx(\n 'py-large px-large-2x border-b-border-layer-2 border-b',\n className\n )}\n data-slot=\"sheet-header\"\n {...props}\n />\n )\n}\n\nexport function SheetFooter({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n className={cx(\n 'py-large px-large-2x border-t-border-layer-2 mt-auto border-t',\n className\n )}\n data-slot=\"sheet-footer\"\n {...props}\n />\n )\n}\n\nexport function SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n className={cx('text-size-title-lg font-medium', className)}\n data-slot=\"sheet-title\"\n {...props}\n />\n )\n}\n"]}
|
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import { jsx } from "react/jsx-runtime";
|
|
4
|
-
function Skeleton({ className, ...props }) {
|
|
5
|
-
return /* @__PURE__ */ jsx(
|
|
6
|
-
"div",
|
|
7
|
-
{
|
|
8
|
-
className: cx("bg-layer-skeleton animate-pulse", className),
|
|
9
|
-
"data-slot": "skeleton",
|
|
10
|
-
...props
|
|
11
|
-
}
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
export {
|
|
15
|
-
Skeleton
|
|
16
|
-
};
|
|
1
|
+
import {cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function r({className:o,...e}){return jsx("div",{className:cx("bg-layer-skeleton animate-pulse",o),"data-slot":"skeleton",...e})}export{r as Skeleton};//# sourceMappingURL=skeleton.js.map
|
|
2
|
+
//# sourceMappingURL=skeleton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/skeleton.tsx"],"names":["Skeleton","className","props","jsx","cx"],"mappings":"mEAGO,SAASA,CAAAA,CAAS,CAAE,SAAA,CAAAC,CAAAA,CAAW,GAAGC,CAAM,CAAA,CAA0B,CACvE,OACEC,GAAAA,CAAC,KAAA,CAAA,CACC,SAAA,CAAWC,EAAAA,CAAG,iCAAA,CAAmCH,CAAS,CAAA,CAC1D,WAAA,CAAU,UAAA,CACT,GAAGC,CAAAA,CACN,CAEJ","file":"skeleton.js","sourcesContent":["import type { ComponentProps } from 'react'\nimport { cx } from '@xjur-ui/util'\n\nexport function Skeleton({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n className={cx('bg-layer-skeleton animate-pulse', className)}\n data-slot=\"skeleton\"\n {...props}\n />\n )\n}\n"]}
|
|
@@ -1,111 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// src/components/typography.tsx
|
|
5
|
-
import { Slot } from "@radix-ui/react-slot";
|
|
6
|
-
import { cva } from "@xjur-ui/util";
|
|
7
|
-
import { memo } from "react";
|
|
8
|
-
import { jsx } from "react/jsx-runtime";
|
|
9
|
-
var typographyVariants = cva("", {
|
|
10
|
-
variants: {
|
|
11
|
-
variant: {
|
|
12
|
-
body: "",
|
|
13
|
-
label: "",
|
|
14
|
-
title: "",
|
|
15
|
-
headline: ""
|
|
16
|
-
},
|
|
17
|
-
size: {
|
|
18
|
-
"sm-2x": "",
|
|
19
|
-
"sm-1x": "",
|
|
20
|
-
sm: "",
|
|
21
|
-
md: "",
|
|
22
|
-
lg: ""
|
|
23
|
-
},
|
|
24
|
-
weight: {
|
|
25
|
-
thin: "font-thin",
|
|
26
|
-
extraLight: "font-extralight",
|
|
27
|
-
light: "font-light",
|
|
28
|
-
normal: "font-normal",
|
|
29
|
-
medium: "font-medium",
|
|
30
|
-
semibold: "font-semibold",
|
|
31
|
-
bold: "font-bold",
|
|
32
|
-
extraBold: "font-extrabold",
|
|
33
|
-
black: "font-black"
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
compoundVariants: [
|
|
37
|
-
{ variant: "body", size: "sm-1x", class: "text-size-body-sm-1x" },
|
|
38
|
-
{ variant: "body", size: "sm", class: "text-size-body-sm" },
|
|
39
|
-
{ variant: "body", size: "md", class: "text-size-body-md" },
|
|
40
|
-
{ variant: "body", size: "lg", class: "text-size-body-lg" },
|
|
41
|
-
{ variant: "label", size: "sm-2x", class: "text-size-label-sm-2x" },
|
|
42
|
-
{ variant: "label", size: "sm-1x", class: "text-size-label-sm-1x" },
|
|
43
|
-
{ variant: "label", size: "sm", class: "text-size-label-sm" },
|
|
44
|
-
{ variant: "label", size: "md", class: "text-size-label-md" },
|
|
45
|
-
{ variant: "label", size: "lg", class: "text-size-label-lg" },
|
|
46
|
-
{ variant: "title", size: "sm", class: "text-size-title-sm" },
|
|
47
|
-
{ variant: "title", size: "md", class: "text-size-title-md" },
|
|
48
|
-
{ variant: "title", size: "lg", class: "text-size-title-lg" },
|
|
49
|
-
{ variant: "headline", size: "sm", class: "text-size-headline-sm" },
|
|
50
|
-
{ variant: "headline", size: "md", class: "text-size-headline-md" },
|
|
51
|
-
{ variant: "headline", size: "lg", class: "text-size-headline-lg" }
|
|
52
|
-
],
|
|
53
|
-
defaultVariants: {
|
|
54
|
-
variant: "body",
|
|
55
|
-
size: "md",
|
|
56
|
-
weight: "normal"
|
|
57
|
-
}
|
|
58
|
-
});
|
|
59
|
-
var Typography = memo(
|
|
60
|
-
({
|
|
61
|
-
variant,
|
|
62
|
-
size,
|
|
63
|
-
weight,
|
|
64
|
-
asChild,
|
|
65
|
-
className,
|
|
66
|
-
...props
|
|
67
|
-
}) => {
|
|
68
|
-
const Component = asChild ? Slot : "span";
|
|
69
|
-
return /* @__PURE__ */ jsx(
|
|
70
|
-
Component,
|
|
71
|
-
{
|
|
72
|
-
className: typographyVariants({ variant, size, weight, className }),
|
|
73
|
-
...props
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
Typography.displayName = "Typography";
|
|
79
|
-
|
|
80
|
-
// src/components/status.tsx
|
|
81
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
82
|
-
var statusVariants = cva2(
|
|
83
|
-
[
|
|
84
|
-
"inline-flex items-center justify-center px-small py-small-1x rounded-small-1x text-label-sm font-medium text-neutral-label h-large-2x"
|
|
85
|
-
],
|
|
86
|
-
{
|
|
87
|
-
variants: {
|
|
88
|
-
variant: {
|
|
89
|
-
success: "bg-success-idle",
|
|
90
|
-
warning: "bg-warning-idle",
|
|
91
|
-
danger: "bg-danger-idle",
|
|
92
|
-
neutral: "bg-alt-3"
|
|
93
|
-
}
|
|
94
|
-
},
|
|
95
|
-
defaultVariants: {
|
|
96
|
-
variant: "neutral"
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
);
|
|
100
|
-
function Status({
|
|
101
|
-
text = "Status",
|
|
102
|
-
variant = "neutral",
|
|
103
|
-
className,
|
|
104
|
-
...props
|
|
105
|
-
}) {
|
|
106
|
-
return /* @__PURE__ */ jsx2("div", { className: cx(statusVariants({ variant }), className), ...props, children: /* @__PURE__ */ jsx2(Typography, { size: "sm", variant: "label", weight: "medium", children: text }) });
|
|
107
|
-
}
|
|
108
|
-
export {
|
|
109
|
-
Status,
|
|
110
|
-
statusVariants
|
|
111
|
-
};
|
|
1
|
+
import {a}from'../chunk-EIG6CBTQ.js';import {cva,cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';var o=cva(["inline-flex items-center justify-center px-small py-small-1x rounded-small-1x text-label-sm font-medium text-neutral-label h-large-2x"],{variants:{variant:{success:"bg-success-idle",warning:"bg-warning-idle",danger:"bg-danger-idle",neutral:"bg-alt-3"}},defaultVariants:{variant:"neutral"}});function u({text:e="Status",variant:r="neutral",className:s,...n}){return jsx("div",{className:cx(o({variant:r}),s),...n,children:jsx(a,{size:"sm",variant:"label",weight:"medium",children:e})})}export{u as Status,o as statusVariants};//# sourceMappingURL=status.js.map
|
|
2
|
+
//# sourceMappingURL=status.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/status.tsx"],"names":["statusVariants","cva","Status","text","variant","className","props","jsx","cx","Typography"],"mappings":"4GAIO,IAAMA,CAAAA,CAAiBC,IAC5B,CACE,uIACF,CAAA,CACA,CACE,SAAU,CACR,OAAA,CAAS,CACP,OAAA,CAAS,kBACT,OAAA,CAAS,iBAAA,CACT,MAAA,CAAQ,gBAAA,CACR,QAAS,UACX,CACF,CAAA,CACA,eAAA,CAAiB,CACf,OAAA,CAAS,SACX,CACF,CACF,EAQO,SAASC,CAAAA,CAAO,CACrB,IAAA,CAAAC,CAAAA,CAAO,SACP,OAAA,CAAAC,CAAAA,CAAU,SAAA,CACV,SAAA,CAAAC,EACA,GAAGC,CACL,CAAA,CAAgB,CACd,OACEC,GAAAA,CAAC,KAAA,CAAA,CAAI,UAAWC,EAAAA,CAAGR,CAAAA,CAAe,CAAE,OAAA,CAAAI,CAAQ,CAAC,CAAA,CAAGC,CAAS,CAAA,CAAI,GAAGC,CAAAA,CAC9D,QAAA,CAAAC,IAACE,CAAAA,CAAA,CAAW,IAAA,CAAK,IAAA,CAAK,QAAQ,OAAA,CAAQ,MAAA,CAAO,SAC1C,QAAA,CAAAN,CAAAA,CACH,EACF,CAEJ","file":"status.js","sourcesContent":["import type { ComponentProps } from 'react'\nimport { cva, cx, type ClassVariantProps } from '@xjur-ui/util'\nimport { Typography } from './typography'\n\nexport const statusVariants = cva(\n [\n 'inline-flex items-center justify-center px-small py-small-1x rounded-small-1x text-label-sm font-medium text-neutral-label h-large-2x'\n ],\n {\n variants: {\n variant: {\n success: 'bg-success-idle',\n warning: 'bg-warning-idle',\n danger: 'bg-danger-idle',\n neutral: 'bg-alt-3'\n }\n },\n defaultVariants: {\n variant: 'neutral'\n }\n }\n)\n\nexport interface StatusProps\n extends ComponentProps<'div'>,\n ClassVariantProps<typeof statusVariants> {\n text?: string\n}\n\nexport function Status({\n text = 'Status',\n variant = 'neutral',\n className,\n ...props\n}: StatusProps) {\n return (\n <div className={cx(statusVariants({ variant }), className)} {...props}>\n <Typography size=\"sm\" variant=\"label\" weight=\"medium\">\n {text}\n </Typography>\n </div>\n )\n}\n"]}
|
package/dist/components/table.js
CHANGED
|
@@ -1,196 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
// src/components/icon.tsx
|
|
5
|
-
import { cx } from "@xjur-ui/util";
|
|
6
|
-
import { jsx } from "react/jsx-runtime";
|
|
7
|
-
function Icon({ className, filled = false, name, ...props }) {
|
|
8
|
-
return /* @__PURE__ */ jsx(
|
|
9
|
-
"span",
|
|
10
|
-
{
|
|
11
|
-
...props,
|
|
12
|
-
className: cx(
|
|
13
|
-
"material-symbols-outlined",
|
|
14
|
-
"text-size-body-lg",
|
|
15
|
-
className
|
|
16
|
-
),
|
|
17
|
-
style: {
|
|
18
|
-
fontVariationSettings: `'FILL' ${filled ? 1 : 0}, 'wght' 600, 'GRAD' 0, 'opsz' 20`,
|
|
19
|
-
...props.style
|
|
20
|
-
},
|
|
21
|
-
children: name
|
|
22
|
-
}
|
|
23
|
-
);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
// src/components/table.tsx
|
|
27
|
-
import { jsx as jsx2 } from "react/jsx-runtime";
|
|
28
|
-
function Table({ className, ...props }) {
|
|
29
|
-
return /* @__PURE__ */ jsx2(
|
|
30
|
-
"div",
|
|
31
|
-
{
|
|
32
|
-
className: "text-size-body-md scrollbar-thin relative w-full overflow-hidden transition-all hover:overflow-x-auto",
|
|
33
|
-
"data-slot": "table-container",
|
|
34
|
-
children: /* @__PURE__ */ jsx2(
|
|
35
|
-
"table",
|
|
36
|
-
{
|
|
37
|
-
className: cx2("w-full caption-bottom", className),
|
|
38
|
-
"data-slot": "table",
|
|
39
|
-
...props
|
|
40
|
-
}
|
|
41
|
-
)
|
|
42
|
-
}
|
|
43
|
-
);
|
|
44
|
-
}
|
|
45
|
-
function TableHeader({
|
|
46
|
-
className,
|
|
47
|
-
...props
|
|
48
|
-
}) {
|
|
49
|
-
return /* @__PURE__ */ jsx2(
|
|
50
|
-
"thead",
|
|
51
|
-
{
|
|
52
|
-
className: cx2(
|
|
53
|
-
"group/table-header [&_tr]:border-border-layer-2 hover:bg-layer-2-hover [&_tr]:border-b",
|
|
54
|
-
className
|
|
55
|
-
),
|
|
56
|
-
"data-slot": "table-header",
|
|
57
|
-
...props
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
function TableBody({
|
|
62
|
-
className,
|
|
63
|
-
...props
|
|
64
|
-
}) {
|
|
65
|
-
return /* @__PURE__ */ jsx2(
|
|
66
|
-
"tbody",
|
|
67
|
-
{
|
|
68
|
-
className: cx2(
|
|
69
|
-
"[&_tr]:border-border-layer-2 [&_tr]:border-b [&_tr:last-child]:border-0",
|
|
70
|
-
className
|
|
71
|
-
),
|
|
72
|
-
"data-slot": "table-body",
|
|
73
|
-
...props
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
function TableFooter({
|
|
78
|
-
className,
|
|
79
|
-
...props
|
|
80
|
-
}) {
|
|
81
|
-
return /* @__PURE__ */ jsx2(
|
|
82
|
-
"tfoot",
|
|
83
|
-
{
|
|
84
|
-
className: cx2(
|
|
85
|
-
"border-border-layer-2 border-t font-medium [&>tr]:last:border-b-0",
|
|
86
|
-
className
|
|
87
|
-
),
|
|
88
|
-
"data-slot": "table-footer",
|
|
89
|
-
...props
|
|
90
|
-
}
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
function TableRow({
|
|
94
|
-
className,
|
|
95
|
-
isSelected = false,
|
|
96
|
-
...props
|
|
97
|
-
}) {
|
|
98
|
-
return /* @__PURE__ */ jsx2(
|
|
99
|
-
"tr",
|
|
100
|
-
{
|
|
101
|
-
className: cx2(
|
|
102
|
-
"bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100",
|
|
103
|
-
"active:bg-layer-2-pressed",
|
|
104
|
-
"data-[selected=true]:bg-primary-alt-active",
|
|
105
|
-
className
|
|
106
|
-
),
|
|
107
|
-
"data-selected": isSelected,
|
|
108
|
-
"data-slot": "table-row",
|
|
109
|
-
...props
|
|
110
|
-
}
|
|
111
|
-
);
|
|
112
|
-
}
|
|
113
|
-
function TableHead({ className, ...props }) {
|
|
114
|
-
return /* @__PURE__ */ jsx2(
|
|
115
|
-
"th",
|
|
116
|
-
{
|
|
117
|
-
className: cx2(
|
|
118
|
-
"group/th text-neutral-placeholder text-size-label-sm h-large-4x py-small-1x px-small text-left align-middle font-medium whitespace-nowrap",
|
|
119
|
-
"pr-large-2x relative",
|
|
120
|
-
"animate-in fade-in duration-200 ease-in",
|
|
121
|
-
className
|
|
122
|
-
),
|
|
123
|
-
"data-slot": "table-head",
|
|
124
|
-
...props
|
|
125
|
-
}
|
|
126
|
-
);
|
|
127
|
-
}
|
|
128
|
-
function TableHeadContent({
|
|
129
|
-
className,
|
|
130
|
-
...props
|
|
131
|
-
}) {
|
|
132
|
-
return /* @__PURE__ */ jsx2(
|
|
133
|
-
"div",
|
|
134
|
-
{
|
|
135
|
-
className: cx2(
|
|
136
|
-
"gap-small pr-large-3x relative flex w-fit items-center",
|
|
137
|
-
className
|
|
138
|
-
),
|
|
139
|
-
...props
|
|
140
|
-
}
|
|
141
|
-
);
|
|
142
|
-
}
|
|
143
|
-
function TableSort({
|
|
144
|
-
className,
|
|
145
|
-
sortedDirection,
|
|
146
|
-
...props
|
|
147
|
-
}) {
|
|
148
|
-
return /* @__PURE__ */ jsx2(
|
|
149
|
-
"button",
|
|
150
|
-
{
|
|
151
|
-
className: cx2(
|
|
152
|
-
"size-large-1x rounded-small-1x",
|
|
153
|
-
"flex cursor-pointer items-center justify-center",
|
|
154
|
-
"hidden group-hover/th:flex",
|
|
155
|
-
"data-[sorted=true]:flex",
|
|
156
|
-
"transition-all duration-200 ease-out",
|
|
157
|
-
"data-[sorted=true]:bg-primary-alt-active data-[sorted=true]:text-primary-label-active",
|
|
158
|
-
"absolute top-1/2 right-0 -translate-y-1/2",
|
|
159
|
-
className
|
|
160
|
-
),
|
|
161
|
-
"data-sorted": sortedDirection !== void 0,
|
|
162
|
-
type: "button",
|
|
163
|
-
...props,
|
|
164
|
-
children: sortedDirection !== void 0 ? /* @__PURE__ */ jsx2(
|
|
165
|
-
Icon,
|
|
166
|
-
{
|
|
167
|
-
name: sortedDirection === "asc" ? "arrow_downward" : "arrow_upward"
|
|
168
|
-
}
|
|
169
|
-
) : /* @__PURE__ */ jsx2(Icon, { name: "swap_vert" })
|
|
170
|
-
}
|
|
171
|
-
);
|
|
172
|
-
}
|
|
173
|
-
function TableCell({ className, ...props }) {
|
|
174
|
-
return /* @__PURE__ */ jsx2(
|
|
175
|
-
"td",
|
|
176
|
-
{
|
|
177
|
-
className: cx2(
|
|
178
|
-
"px-small py-none h-large-8x text-left align-middle whitespace-nowrap",
|
|
179
|
-
className
|
|
180
|
-
),
|
|
181
|
-
"data-slot": "table-cell",
|
|
182
|
-
...props
|
|
183
|
-
}
|
|
184
|
-
);
|
|
185
|
-
}
|
|
186
|
-
export {
|
|
187
|
-
Table,
|
|
188
|
-
TableBody,
|
|
189
|
-
TableCell,
|
|
190
|
-
TableFooter,
|
|
191
|
-
TableHead,
|
|
192
|
-
TableHeadContent,
|
|
193
|
-
TableHeader,
|
|
194
|
-
TableRow,
|
|
195
|
-
TableSort
|
|
196
|
-
};
|
|
1
|
+
import {b as b$1}from'../chunk-WV7QV2PU.js';import {cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function s({className:t,...e}){return jsx("div",{className:"text-size-body-md scrollbar-thin relative w-full overflow-hidden transition-all hover:overflow-x-auto","data-slot":"table-container",children:jsx("table",{className:cx("w-full caption-bottom",t),"data-slot":"table",...e})})}function i({className:t,...e}){return jsx("thead",{className:cx("group/table-header [&_tr]:border-border-layer-2 hover:bg-layer-2-hover [&_tr]:border-b",t),"data-slot":"table-header",...e})}function b({className:t,...e}){return jsx("tbody",{className:cx("[&_tr]:border-border-layer-2 [&_tr]:border-b [&_tr:last-child]:border-0",t),"data-slot":"table-body",...e})}function p({className:t,...e}){return jsx("tfoot",{className:cx("border-border-layer-2 border-t font-medium [&>tr]:last:border-b-0",t),"data-slot":"table-footer",...e})}function c({className:t,isSelected:e=false,...o}){return jsx("tr",{className:cx("bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100","active:bg-layer-2-pressed","data-[selected=true]:bg-primary-alt-active",t),"data-selected":e,"data-slot":"table-row",...o})}function u({className:t,...e}){return jsx("th",{className:cx("group/th text-neutral-placeholder text-size-label-sm h-large-4x py-small-1x px-small text-left align-middle font-medium whitespace-nowrap","pr-large-2x relative","animate-in fade-in duration-200 ease-in",t),"data-slot":"table-head",...e})}function m({className:t,...e}){return jsx("div",{className:cx("gap-small pr-large-3x relative flex w-fit items-center",t),...e})}function f({className:t,sortedDirection:e,...o}){return jsx("button",{className:cx("size-large-1x rounded-small-1x","flex cursor-pointer items-center justify-center","hidden group-hover/th:flex","data-[sorted=true]:flex","transition-all duration-200 ease-out","data-[sorted=true]:bg-primary-alt-active data-[sorted=true]:text-primary-label-active","absolute top-1/2 right-0 -translate-y-1/2",t),"data-sorted":e!==void 0,type:"button",...o,children:e!==void 0?jsx(b$1,{name:e==="asc"?"arrow_downward":"arrow_upward"}):jsx(b$1,{name:"swap_vert"})})}function x({className:t,...e}){return jsx("td",{className:cx("px-small py-none h-large-8x text-left align-middle whitespace-nowrap",t),"data-slot":"table-cell",...e})}export{s as Table,b as TableBody,x as TableCell,p as TableFooter,u as TableHead,m as TableHeadContent,i as TableHeader,c as TableRow,f as TableSort};//# sourceMappingURL=table.js.map
|
|
2
|
+
//# sourceMappingURL=table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/table.tsx"],"names":["Table","className","props","jsx","cx","TableHeader","TableBody","TableFooter","TableRow","isSelected","TableHead","TableHeadContent","TableSort","sortedDirection","Icon","TableCell"],"mappings":"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","file":"table.js","sourcesContent":["import { cx } from '@xjur-ui/util'\nimport { Icon } from './icon'\n\nexport function Table({ className, ...props }: React.ComponentProps<'table'>) {\n return (\n <div\n className=\"text-size-body-md scrollbar-thin relative w-full overflow-hidden transition-all hover:overflow-x-auto\"\n data-slot=\"table-container\"\n >\n <table\n className={cx('w-full caption-bottom', className)}\n data-slot=\"table\"\n {...props}\n />\n </div>\n )\n}\n\nexport function TableHeader({\n className,\n ...props\n}: React.ComponentProps<'thead'>) {\n return (\n <thead\n className={cx(\n 'group/table-header [&_tr]:border-border-layer-2 hover:bg-layer-2-hover [&_tr]:border-b',\n className\n )}\n data-slot=\"table-header\"\n {...props}\n />\n )\n}\n\nexport function TableBody({\n className,\n ...props\n}: React.ComponentProps<'tbody'>) {\n return (\n <tbody\n className={cx(\n '[&_tr]:border-border-layer-2 [&_tr]:border-b [&_tr:last-child]:border-0',\n className\n )}\n data-slot=\"table-body\"\n {...props}\n />\n )\n}\n\nexport function TableFooter({\n className,\n ...props\n}: React.ComponentProps<'tfoot'>) {\n return (\n <tfoot\n className={cx(\n 'border-border-layer-2 border-t font-medium [&>tr]:last:border-b-0',\n className\n )}\n data-slot=\"table-footer\"\n {...props}\n />\n )\n}\n\nexport function TableRow({\n className,\n isSelected = false,\n ...props\n}: React.ComponentProps<'tr'> & { isSelected?: boolean }) {\n return (\n <tr\n className={cx(\n 'bg-layer-2-idle hover:bg-layer-2-hover ease border-b transition-colors duration-100',\n 'active:bg-layer-2-pressed',\n 'data-[selected=true]:bg-primary-alt-active',\n className\n )}\n data-selected={isSelected}\n data-slot=\"table-row\"\n {...props}\n />\n )\n}\n\nexport function TableHead({ className, ...props }: React.ComponentProps<'th'>) {\n return (\n <th\n className={cx(\n 'group/th text-neutral-placeholder text-size-label-sm h-large-4x py-small-1x px-small text-left align-middle font-medium whitespace-nowrap',\n 'pr-large-2x relative',\n 'animate-in fade-in duration-200 ease-in',\n className\n )}\n data-slot=\"table-head\"\n {...props}\n />\n )\n}\n\nexport function TableHeadContent({\n className,\n ...props\n}: React.ComponentProps<'div'>) {\n return (\n <div\n className={cx(\n 'gap-small pr-large-3x relative flex w-fit items-center',\n className\n )}\n {...props}\n />\n )\n}\n\nexport function TableSort({\n className,\n sortedDirection,\n ...props\n}: React.ComponentProps<'button'> & { sortedDirection?: 'asc' | 'desc' }) {\n return (\n <button\n className={cx(\n 'size-large-1x rounded-small-1x',\n 'flex cursor-pointer items-center justify-center',\n 'hidden group-hover/th:flex',\n 'data-[sorted=true]:flex',\n 'transition-all duration-200 ease-out',\n 'data-[sorted=true]:bg-primary-alt-active data-[sorted=true]:text-primary-label-active',\n 'absolute top-1/2 right-0 -translate-y-1/2',\n className\n )}\n data-sorted={sortedDirection !== undefined}\n type=\"button\"\n {...props}\n >\n {sortedDirection !== undefined ? (\n <Icon\n name={sortedDirection === 'asc' ? 'arrow_downward' : 'arrow_upward'}\n />\n ) : (\n <Icon name=\"swap_vert\" />\n )}\n </button>\n )\n}\n\nexport function TableCell({ className, ...props }: React.ComponentProps<'td'>) {\n return (\n <td\n className={cx(\n 'px-small py-none h-large-8x text-left align-middle whitespace-nowrap',\n className\n )}\n data-slot=\"table-cell\"\n {...props}\n />\n )\n}\n"]}
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as React from 'react';
|
|
2
3
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
4
|
|
|
4
|
-
declare function TabsRoot(
|
|
5
|
-
|
|
6
|
-
declare function
|
|
5
|
+
declare function TabsRoot(props: React.ComponentProps<typeof TabsPrimitive.Tabs>): react_jsx_runtime.JSX.Element;
|
|
6
|
+
type TabsListProps = React.ComponentProps<typeof TabsPrimitive.TabsList>;
|
|
7
|
+
declare function TabsList({ className, ...props }: TabsListProps): react_jsx_runtime.JSX.Element;
|
|
8
|
+
interface TabsTriggerProps extends React.ComponentProps<typeof TabsPrimitive.TabsTrigger> {
|
|
7
9
|
variant?: 'line' | 'button';
|
|
8
|
-
}
|
|
9
|
-
declare function
|
|
10
|
+
}
|
|
11
|
+
declare function TabsTrigger({ variant, className, ...props }: TabsTriggerProps): react_jsx_runtime.JSX.Element;
|
|
12
|
+
declare function TabsContent(props: React.ComponentProps<typeof TabsPrimitive.TabsContent>): react_jsx_runtime.JSX.Element;
|
|
10
13
|
|
|
11
|
-
export { TabsContent, TabsList, TabsRoot, TabsTrigger };
|
|
14
|
+
export { TabsContent, TabsList, type TabsListProps, TabsRoot, TabsTrigger, type TabsTriggerProps };
|