@xjur-ui/react 1.0.6 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.turbo/turbo-build.log +97 -45
- package/CHANGELOG.md +44 -0
- package/README.md +146 -0
- package/dist/chunk-CBFC4QME.js +2 -0
- package/dist/chunk-CBFC4QME.js.map +1 -0
- package/dist/chunk-EIG6CBTQ.js +2 -0
- package/dist/chunk-EIG6CBTQ.js.map +1 -0
- package/dist/chunk-FASEHVMD.js +2 -0
- package/dist/chunk-FASEHVMD.js.map +1 -0
- package/dist/chunk-KIFR5VIE.js +2 -0
- package/dist/chunk-KIFR5VIE.js.map +1 -0
- package/dist/chunk-KS6WGBHQ.js +2 -0
- package/dist/chunk-KS6WGBHQ.js.map +1 -0
- package/dist/chunk-NELCN6E2.js +2 -0
- package/dist/chunk-NELCN6E2.js.map +1 -0
- package/dist/chunk-NPTLORW5.js +2 -0
- package/dist/chunk-NPTLORW5.js.map +1 -0
- package/dist/chunk-RWMV7APX.js +2 -0
- package/dist/chunk-RWMV7APX.js.map +1 -0
- package/dist/chunk-SHHXKVVR.js +2 -0
- package/dist/chunk-SHHXKVVR.js.map +1 -0
- package/dist/chunk-TB6KI6CL.js +2 -0
- package/dist/chunk-TB6KI6CL.js.map +1 -0
- package/dist/components/avatar-group.js +2 -179
- package/dist/components/avatar-group.js.map +1 -0
- package/dist/components/avatar.js +2 -59
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.js +2 -111
- package/dist/components/badge.js.map +1 -0
- package/dist/components/button.js +2 -98
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.js +2 -751
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/checkbox.js +2 -153
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/chip.d.ts +3 -1
- package/dist/components/chip.js +2 -256
- package/dist/components/chip.js.map +1 -0
- package/dist/components/collapsible.js +2 -41
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/date-picker.d.ts +8 -3
- package/dist/components/date-picker.js +2 -232
- package/dist/components/date-picker.js.map +1 -0
- package/dist/components/divider.js +2 -29
- package/dist/components/divider.js.map +1 -0
- package/dist/components/dropdown-menu.js +2 -295
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/icon.js +2 -177
- package/dist/components/icon.js.map +1 -0
- package/dist/components/input.d.ts +9 -4
- package/dist/components/input.js +2 -315
- package/dist/components/input.js.map +1 -0
- package/dist/components/list.js +2 -179
- package/dist/components/list.js.map +1 -0
- package/dist/components/logo.js +2 -324
- package/dist/components/logo.js.map +1 -0
- package/dist/components/otp-input.js +2 -47
- package/dist/components/otp-input.js.map +1 -0
- package/dist/components/radio.js +2 -156
- package/dist/components/radio.js.map +1 -0
- package/dist/components/rich-editor.d.ts +2 -1
- package/dist/components/rich-editor.js +2 -723
- package/dist/components/rich-editor.js.map +1 -0
- package/dist/components/search-input.js +2 -274
- package/dist/components/search-input.js.map +1 -0
- package/dist/components/select.d.ts +6 -3
- package/dist/components/select.js +2 -550
- package/dist/components/select.js.map +1 -0
- package/dist/components/sheet.js +2 -251
- package/dist/components/sheet.js.map +1 -0
- package/dist/components/skeleton.js +2 -16
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/status.js +2 -111
- package/dist/components/status.js.map +1 -0
- package/dist/components/switch.js +2 -36
- package/dist/components/switch.js.map +1 -0
- package/dist/components/table.js +2 -196
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +9 -6
- package/dist/components/tabs.js +2 -54
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/tag.d.ts +3 -1
- package/dist/components/tag.js +2 -189
- package/dist/components/tag.js.map +1 -0
- package/dist/components/tooltip.js +2 -58
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/typography.js +2 -78
- package/dist/components/typography.js.map +1 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/index.js +2 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/index.css +2 -2322
- package/dist/index.css.map +1 -0
- package/dist/logo-PQRZORCS.js +3 -0
- package/dist/logo-PQRZORCS.js.map +1 -0
- package/package.json +41 -8
- package/src/components/calendar.tsx +7 -6
- package/src/components/chip.tsx +11 -3
- package/src/components/date-picker.tsx +125 -22
- package/src/components/icon.tsx +1 -1
- package/src/components/input.tsx +124 -60
- package/src/components/logo.tsx +25 -20
- package/src/components/rich-editor.tsx +4 -3
- package/src/components/select.tsx +104 -26
- package/src/components/tabs.tsx +56 -37
- package/src/components/tag.tsx +11 -3
- package/src/index.css +2 -2
- package/src/resources/logo/index.tsx +33 -0
- package/tsup.config.ts +23 -5
- package/dist/components/test.d.ts +0 -5
- package/dist/components/test.js +0 -8
- package/dist/index.js +0 -0
- package/src/components/test.tsx +0 -3
- package/src/index.ts +0 -1
- package/src/resources/logo/index.ts +0 -3
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-FASEHVMD.js';import {b as b$2}from'../chunk-SHHXKVVR.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 bg-black/50",t),"data-slot":"sheet-overlay",...o})}function b({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 g({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{g as SheetBody,x as SheetClose,b 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 './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 bg-black/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"]}
|
|
@@ -1,36 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import * as SwitchPrimitive from "@radix-ui/react-switch";
|
|
4
|
-
import { cx } from "@xjur-ui/util";
|
|
5
|
-
import { jsx } from "react/jsx-runtime";
|
|
6
|
-
function Switch({
|
|
7
|
-
className,
|
|
8
|
-
...props
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ jsx(
|
|
11
|
-
SwitchPrimitive.Root,
|
|
12
|
-
{
|
|
13
|
-
className: cx(
|
|
14
|
-
"w-large-3x h-large rounded-circle inline-flex shrink-0 items-center border border-transparent",
|
|
15
|
-
"peer data-[state=checked]:bg-primary-idle data-[state=unchecked]:bg-alt-4",
|
|
16
|
-
"focus-visible:border-ring focus-visible:ring-ring/50 transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50",
|
|
17
|
-
"hover:shadow-focus-primary p-[2px]",
|
|
18
|
-
className
|
|
19
|
-
),
|
|
20
|
-
"data-slot": "switch",
|
|
21
|
-
...props,
|
|
22
|
-
children: /* @__PURE__ */ jsx(
|
|
23
|
-
SwitchPrimitive.Thumb,
|
|
24
|
-
{
|
|
25
|
-
className: cx(
|
|
26
|
-
"bg-layer-2-idle size-medium pointer-events-none rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"
|
|
27
|
-
),
|
|
28
|
-
"data-slot": "switch-thumb"
|
|
29
|
-
}
|
|
30
|
-
)
|
|
31
|
-
}
|
|
32
|
-
);
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
Switch
|
|
36
|
-
};
|
|
1
|
+
import'react';import*as t from'@radix-ui/react-switch';import {cx}from'@xjur-ui/util';import {jsx}from'react/jsx-runtime';function s({className:r,...a}){return jsx(t.Root,{className:cx("w-large-3x h-large rounded-circle inline-flex shrink-0 items-center border border-transparent","peer data-[state=checked]:bg-primary-idle data-[state=unchecked]:bg-alt-4","focus-visible:border-ring focus-visible:ring-ring/50 transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50","hover:shadow-focus-primary p-[2px]",r),"data-slot":"switch",...a,children:jsx(t.Thumb,{className:cx("bg-layer-2-idle size-medium pointer-events-none rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0"),"data-slot":"switch-thumb"})})}export{s as Switch};//# sourceMappingURL=switch.js.map
|
|
2
|
+
//# sourceMappingURL=switch.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/components/switch.tsx"],"names":["Switch","className","props","jsx","cx"],"mappings":"0HAIA,SAASA,CAAAA,CAAO,CACd,SAAA,CAAAC,CAAAA,CACA,GAAGC,CACL,CAAA,CAAsD,CACpD,OACEC,GAAAA,CAAiB,CAAA,CAAA,IAAA,CAAhB,CACC,SAAA,CAAWC,EAAAA,CACT,gGACA,2EAAA,CACA,kIAAA,CACA,qCACAH,CACF,CAAA,CACA,WAAA,CAAU,QAAA,CACT,GAAGC,CAAAA,CAEJ,SAAAC,GAAAA,CAAiB,CAAA,CAAA,KAAA,CAAhB,CACC,SAAA,CAAWC,EAAAA,CACT,iLACF,CAAA,CACA,WAAA,CAAU,cAAA,CACZ,CAAA,CACF,CAEJ","file":"switch.js","sourcesContent":["import * as React from 'react'\nimport * as SwitchPrimitive from '@radix-ui/react-switch'\nimport { cx } from '@xjur-ui/util'\n\nfunction Switch({\n className,\n ...props\n}: React.ComponentProps<typeof SwitchPrimitive.Root>) {\n return (\n <SwitchPrimitive.Root\n className={cx(\n 'w-large-3x h-large rounded-circle inline-flex shrink-0 items-center border border-transparent',\n 'peer data-[state=checked]:bg-primary-idle data-[state=unchecked]:bg-alt-4',\n 'focus-visible:border-ring focus-visible:ring-ring/50 transition-all outline-none disabled:cursor-not-allowed disabled:opacity-50',\n 'hover:shadow-focus-primary p-[2px]',\n className\n )}\n data-slot=\"switch\"\n {...props}\n >\n <SwitchPrimitive.Thumb\n className={cx(\n 'bg-layer-2-idle size-medium pointer-events-none rounded-full ring-0 transition-transform data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0'\n )}\n data-slot=\"switch-thumb\"\n />\n </SwitchPrimitive.Root>\n )\n}\n\nexport { Switch }\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-SHHXKVVR.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
|