@invergent/ui-sdk 2.19.0 → 2.19.1
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/README.md +8 -0
- package/dist/button-group.cjs +80 -0
- package/dist/button-group.cjs.map +1 -0
- package/dist/button-group.d.cts +17 -0
- package/dist/button-group.d.ts +17 -0
- package/dist/button-group.js +75 -0
- package/dist/button-group.js.map +1 -0
- package/dist/chunk-NSK344BJ.js +80 -0
- package/dist/chunk-NSK344BJ.js.map +1 -0
- package/dist/chunk-PH733KDD.js +141 -0
- package/dist/chunk-PH733KDD.js.map +1 -0
- package/dist/chunk-QEBQ5NUN.cjs +148 -0
- package/dist/chunk-QEBQ5NUN.cjs.map +1 -0
- package/dist/chunk-UXSDDJXM.cjs +88 -0
- package/dist/chunk-UXSDDJXM.cjs.map +1 -0
- package/dist/command.cjs +177 -0
- package/dist/command.cjs.map +1 -0
- package/dist/command.d.cts +22 -0
- package/dist/command.d.ts +22 -0
- package/dist/command.js +167 -0
- package/dist/command.js.map +1 -0
- package/dist/field.cjs +1 -1
- package/dist/field.js +1 -1
- package/dist/hover-card.cjs +43 -0
- package/dist/hover-card.cjs.map +1 -0
- package/dist/hover-card.d.cts +9 -0
- package/dist/hover-card.d.ts +9 -0
- package/dist/hover-card.js +39 -0
- package/dist/hover-card.js.map +1 -0
- package/dist/input-group.cjs +30 -142
- package/dist/input-group.cjs.map +1 -1
- package/dist/input-group.js +5 -139
- package/dist/input-group.js.map +1 -1
- package/dist/item.cjs +196 -0
- package/dist/item.cjs.map +1 -0
- package/dist/item.d.cts +28 -0
- package/dist/item.d.ts +28 -0
- package/dist/item.js +185 -0
- package/dist/item.js.map +1 -0
- package/dist/popover.cjs +31 -82
- package/dist/popover.cjs.map +1 -1
- package/dist/popover.js +2 -78
- package/dist/popover.js.map +1 -1
- package/dist/progress-bar.cjs +22 -10
- package/dist/progress-bar.cjs.map +1 -1
- package/dist/progress-bar.d.cts +2 -1
- package/dist/progress-bar.d.ts +2 -1
- package/dist/progress-bar.js +22 -10
- package/dist/progress-bar.js.map +1 -1
- package/dist/rabbit-mark.cjs +30 -0
- package/dist/rabbit-mark.cjs.map +1 -0
- package/dist/rabbit-mark.d.cts +16 -0
- package/dist/rabbit-mark.d.ts +16 -0
- package/dist/rabbit-mark.js +26 -0
- package/dist/rabbit-mark.js.map +1 -0
- package/dist/responsive-panel.cjs +85 -0
- package/dist/responsive-panel.cjs.map +1 -0
- package/dist/responsive-panel.d.cts +33 -0
- package/dist/responsive-panel.d.ts +33 -0
- package/dist/responsive-panel.js +83 -0
- package/dist/responsive-panel.js.map +1 -0
- package/dist/timeline.cjs +171 -0
- package/dist/timeline.cjs.map +1 -0
- package/dist/timeline.d.cts +28 -0
- package/dist/timeline.d.ts +28 -0
- package/dist/timeline.js +162 -0
- package/dist/timeline.js.map +1 -0
- package/package.json +2 -1
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn } from './chunk-LZGII7SX.js';
|
|
2
|
+
import { HoverCard as HoverCard$1 } from 'radix-ui';
|
|
3
|
+
import { jsx } from 'react/jsx-runtime';
|
|
4
|
+
|
|
5
|
+
function HoverCard({
|
|
6
|
+
...props
|
|
7
|
+
}) {
|
|
8
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Root, { "data-slot": "hover-card", ...props });
|
|
9
|
+
}
|
|
10
|
+
function HoverCardTrigger({
|
|
11
|
+
...props
|
|
12
|
+
}) {
|
|
13
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Trigger, { "data-slot": "hover-card-trigger", ...props });
|
|
14
|
+
}
|
|
15
|
+
function HoverCardContent({
|
|
16
|
+
className,
|
|
17
|
+
align = "center",
|
|
18
|
+
sideOffset = 4,
|
|
19
|
+
...props
|
|
20
|
+
}) {
|
|
21
|
+
return /* @__PURE__ */ jsx(HoverCard$1.Portal, { "data-slot": "hover-card-portal", children: /* @__PURE__ */ jsx(
|
|
22
|
+
HoverCard$1.Content,
|
|
23
|
+
{
|
|
24
|
+
"data-slot": "hover-card-content",
|
|
25
|
+
align,
|
|
26
|
+
sideOffset,
|
|
27
|
+
className: cn(
|
|
28
|
+
// The surface of Work's popovers.
|
|
29
|
+
"z-50 w-72 origin-(--radix-hover-card-content-transform-origin) rounded-[12px] border border-foreground/10 bg-popover p-4 text-sm text-popover-foreground shadow-[0px_10px_24px_0px_rgba(0,0,0,0.12)] outline-hidden duration-100 dark:shadow-[0px_10px_24px_0px_rgba(0,0,0,0.5)] data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
30
|
+
className
|
|
31
|
+
),
|
|
32
|
+
...props
|
|
33
|
+
}
|
|
34
|
+
) });
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export { HoverCard, HoverCardContent, HoverCardTrigger };
|
|
38
|
+
//# sourceMappingURL=hover-card.js.map
|
|
39
|
+
//# sourceMappingURL=hover-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hover-card.tsx"],"names":["HoverCardPrimitive"],"mappings":";;;;AAKA,SAAS,SAAA,CAAU;AAAA,EACjB,GAAG;AACL,CAAA,EAAyD;AACvD,EAAA,2BAAQA,WAAA,CAAmB,IAAA,EAAnB,EAAwB,WAAA,EAAU,YAAA,EAAc,GAAG,KAAA,EAAO,CAAA;AACpE;AAEA,SAAS,gBAAA,CAAiB;AAAA,EACxB,GAAG;AACL,CAAA,EAA4D;AAC1D,EAAA,2BACGA,WAAA,CAAmB,OAAA,EAAnB,EAA2B,WAAA,EAAU,oBAAA,EAAsB,GAAG,KAAA,EAAO,CAAA;AAE1E;AAEA,SAAS,gBAAA,CAAiB;AAAA,EACxB,SAAA;AAAA,EACA,KAAA,GAAQ,QAAA;AAAA,EACR,UAAA,GAAa,CAAA;AAAA,EACb,GAAG;AACL,CAAA,EAA4D;AAC1D,EAAA,uBACE,GAAA,CAACA,WAAA,CAAmB,MAAA,EAAnB,EAA0B,aAAU,mBAAA,EACnC,QAAA,kBAAA,GAAA;AAAA,IAACA,WAAA,CAAmB,OAAA;AAAA,IAAnB;AAAA,MACC,WAAA,EAAU,oBAAA;AAAA,MACV,KAAA;AAAA,MACA,UAAA;AAAA,MACA,SAAA,EAAW,EAAA;AAAA;AAAA,QAET,mjBAAA;AAAA,QACA;AAAA,OACF;AAAA,MACC,GAAG;AAAA;AAAA,GACN,EACF,CAAA;AAEJ","file":"hover-card.js","sourcesContent":["import * as React from \"react\"\nimport { HoverCard as HoverCardPrimitive } from \"radix-ui\"\n\nimport { cn } from \"./lib/utils\"\n\nfunction HoverCard({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Root>) {\n return <HoverCardPrimitive.Root data-slot=\"hover-card\" {...props} />\n}\n\nfunction HoverCardTrigger({\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Trigger>) {\n return (\n <HoverCardPrimitive.Trigger data-slot=\"hover-card-trigger\" {...props} />\n )\n}\n\nfunction HoverCardContent({\n className,\n align = \"center\",\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof HoverCardPrimitive.Content>) {\n return (\n <HoverCardPrimitive.Portal data-slot=\"hover-card-portal\">\n <HoverCardPrimitive.Content\n data-slot=\"hover-card-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(\n // The surface of Work's popovers.\n \"z-50 w-72 origin-(--radix-hover-card-content-transform-origin) rounded-[12px] border border-foreground/10 bg-popover p-4 text-sm text-popover-foreground shadow-[0px_10px_24px_0px_rgba(0,0,0,0.12)] outline-hidden duration-100 dark:shadow-[0px_10px_24px_0px_rgba(0,0,0,0.5)] data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\",\n className\n )}\n {...props}\n />\n </HoverCardPrimitive.Portal>\n )\n}\n\nexport { HoverCard, HoverCardTrigger, HoverCardContent }\n"]}
|
package/dist/input-group.cjs
CHANGED
|
@@ -1,148 +1,36 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
+
var chunkQEBQ5NUN_cjs = require('./chunk-QEBQ5NUN.cjs');
|
|
4
|
+
require('./chunk-UOUXW63J.cjs');
|
|
5
|
+
require('./chunk-RVX6SN4U.cjs');
|
|
6
|
+
require('./chunk-VBICNC43.cjs');
|
|
7
|
+
require('./chunk-6YHDDRIM.cjs');
|
|
9
8
|
|
|
10
|
-
function InputGroup({ className, ...props }) {
|
|
11
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
12
|
-
"div",
|
|
13
|
-
{
|
|
14
|
-
"data-slot": "input-group",
|
|
15
|
-
role: "group",
|
|
16
|
-
className: chunk6YHDDRIM_cjs.cn(
|
|
17
|
-
"group/input-group relative flex h-10 w-full min-w-0 items-center rounded-[10px] border border-foreground/10 bg-foreground/[0.04] transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-foreground/20 has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
18
|
-
className
|
|
19
|
-
),
|
|
20
|
-
...props
|
|
21
|
-
}
|
|
22
|
-
);
|
|
23
|
-
}
|
|
24
|
-
var inputGroupAddonVariants = classVarianceAuthority.cva(
|
|
25
|
-
"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
26
|
-
{
|
|
27
|
-
variants: {
|
|
28
|
-
align: {
|
|
29
|
-
"inline-start": "order-first",
|
|
30
|
-
"inline-end": "order-last",
|
|
31
|
-
"block-start": "order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5",
|
|
32
|
-
"block-end": "order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
defaultVariants: {
|
|
36
|
-
align: "inline-start"
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
);
|
|
40
|
-
function InputGroupAddon({
|
|
41
|
-
className,
|
|
42
|
-
align = "inline-start",
|
|
43
|
-
...props
|
|
44
|
-
}) {
|
|
45
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
46
|
-
"div",
|
|
47
|
-
{
|
|
48
|
-
role: "group",
|
|
49
|
-
"data-slot": "input-group-addon",
|
|
50
|
-
"data-align": align,
|
|
51
|
-
className: chunk6YHDDRIM_cjs.cn(inputGroupAddonVariants({ align }), className),
|
|
52
|
-
onClick: (e) => {
|
|
53
|
-
if (e.target.closest("button")) {
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
57
|
-
},
|
|
58
|
-
...props
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
var inputGroupButtonVariants = classVarianceAuthority.cva(
|
|
63
|
-
"flex items-center gap-2 rounded-none text-sm shadow-none",
|
|
64
|
-
{
|
|
65
|
-
variants: {
|
|
66
|
-
size: {
|
|
67
|
-
xs: "h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5",
|
|
68
|
-
sm: "",
|
|
69
|
-
"icon-xs": "size-6 p-0 text-xs has-[>svg]:p-0",
|
|
70
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
defaultVariants: {
|
|
74
|
-
size: "xs"
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
function InputGroupButton({
|
|
79
|
-
className,
|
|
80
|
-
type = "button",
|
|
81
|
-
variant = "ghost",
|
|
82
|
-
size = "xs",
|
|
83
|
-
...props
|
|
84
|
-
}) {
|
|
85
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
86
|
-
chunkVBICNC43_cjs.Button,
|
|
87
|
-
{
|
|
88
|
-
type,
|
|
89
|
-
"data-size": size,
|
|
90
|
-
variant,
|
|
91
|
-
className: chunk6YHDDRIM_cjs.cn(inputGroupButtonVariants({ size }), className),
|
|
92
|
-
...props
|
|
93
|
-
}
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
function InputGroupText({ className, ...props }) {
|
|
97
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
98
|
-
"span",
|
|
99
|
-
{
|
|
100
|
-
className: chunk6YHDDRIM_cjs.cn(
|
|
101
|
-
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5",
|
|
102
|
-
className
|
|
103
|
-
),
|
|
104
|
-
...props
|
|
105
|
-
}
|
|
106
|
-
);
|
|
107
|
-
}
|
|
108
|
-
function InputGroupInput({
|
|
109
|
-
className,
|
|
110
|
-
...props
|
|
111
|
-
}) {
|
|
112
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
113
|
-
chunkRVX6SN4U_cjs.Input,
|
|
114
|
-
{
|
|
115
|
-
"data-slot": "input-group-control",
|
|
116
|
-
className: chunk6YHDDRIM_cjs.cn(
|
|
117
|
-
"flex-1 border-0 bg-transparent ring-0 group-has-[>[data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
118
|
-
className
|
|
119
|
-
),
|
|
120
|
-
...props
|
|
121
|
-
}
|
|
122
|
-
);
|
|
123
|
-
}
|
|
124
|
-
function InputGroupTextarea({
|
|
125
|
-
className,
|
|
126
|
-
...props
|
|
127
|
-
}) {
|
|
128
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
129
|
-
chunkUOUXW63J_cjs.Textarea,
|
|
130
|
-
{
|
|
131
|
-
"data-slot": "input-group-control",
|
|
132
|
-
className: chunk6YHDDRIM_cjs.cn(
|
|
133
|
-
"flex-1 resize-none border-0 bg-transparent py-2.5 ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
134
|
-
className
|
|
135
|
-
),
|
|
136
|
-
...props
|
|
137
|
-
}
|
|
138
|
-
);
|
|
139
|
-
}
|
|
140
9
|
|
|
141
|
-
|
|
142
|
-
exports
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
exports
|
|
10
|
+
|
|
11
|
+
Object.defineProperty(exports, "InputGroup", {
|
|
12
|
+
enumerable: true,
|
|
13
|
+
get: function () { return chunkQEBQ5NUN_cjs.InputGroup; }
|
|
14
|
+
});
|
|
15
|
+
Object.defineProperty(exports, "InputGroupAddon", {
|
|
16
|
+
enumerable: true,
|
|
17
|
+
get: function () { return chunkQEBQ5NUN_cjs.InputGroupAddon; }
|
|
18
|
+
});
|
|
19
|
+
Object.defineProperty(exports, "InputGroupButton", {
|
|
20
|
+
enumerable: true,
|
|
21
|
+
get: function () { return chunkQEBQ5NUN_cjs.InputGroupButton; }
|
|
22
|
+
});
|
|
23
|
+
Object.defineProperty(exports, "InputGroupInput", {
|
|
24
|
+
enumerable: true,
|
|
25
|
+
get: function () { return chunkQEBQ5NUN_cjs.InputGroupInput; }
|
|
26
|
+
});
|
|
27
|
+
Object.defineProperty(exports, "InputGroupText", {
|
|
28
|
+
enumerable: true,
|
|
29
|
+
get: function () { return chunkQEBQ5NUN_cjs.InputGroupText; }
|
|
30
|
+
});
|
|
31
|
+
Object.defineProperty(exports, "InputGroupTextarea", {
|
|
32
|
+
enumerable: true,
|
|
33
|
+
get: function () { return chunkQEBQ5NUN_cjs.InputGroupTextarea; }
|
|
34
|
+
});
|
|
147
35
|
//# sourceMappingURL=input-group.cjs.map
|
|
148
36
|
//# sourceMappingURL=input-group.cjs.map
|
package/dist/input-group.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input-group.cjs"}
|
package/dist/input-group.js
CHANGED
|
@@ -1,141 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import { jsx } from 'react/jsx-runtime';
|
|
7
|
-
|
|
8
|
-
function InputGroup({ className, ...props }) {
|
|
9
|
-
return /* @__PURE__ */ jsx(
|
|
10
|
-
"div",
|
|
11
|
-
{
|
|
12
|
-
"data-slot": "input-group",
|
|
13
|
-
role: "group",
|
|
14
|
-
className: cn(
|
|
15
|
-
"group/input-group relative flex h-10 w-full min-w-0 items-center rounded-[10px] border border-foreground/10 bg-foreground/[0.04] transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-[[data-slot=input-group-control]:focus-visible]:border-foreground/20 has-[[data-slot][aria-invalid=true]]:border-destructive has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:has-[[data-slot][aria-invalid=true]]:border-destructive/50 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3",
|
|
16
|
-
className
|
|
17
|
-
),
|
|
18
|
-
...props
|
|
19
|
-
}
|
|
20
|
-
);
|
|
21
|
-
}
|
|
22
|
-
var inputGroupAddonVariants = cva(
|
|
23
|
-
"flex h-auto cursor-text items-center justify-center gap-2 py-2 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 **:data-[slot=kbd]:rounded-none **:data-[slot=kbd]:bg-muted-foreground/10 **:data-[slot=kbd]:px-1.5 [&>svg:not([class*='size-'])]:size-3.5",
|
|
24
|
-
{
|
|
25
|
-
variants: {
|
|
26
|
-
align: {
|
|
27
|
-
"inline-start": "order-first",
|
|
28
|
-
"inline-end": "order-last",
|
|
29
|
-
"block-start": "order-first w-full justify-start pt-3 group-has-[>input]/input-group:pt-3.5 [.border-b]:pb-3.5",
|
|
30
|
-
"block-end": "order-last w-full justify-start pb-3 group-has-[>input]/input-group:pb-3.5 [.border-t]:pt-3.5"
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
defaultVariants: {
|
|
34
|
-
align: "inline-start"
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
function InputGroupAddon({
|
|
39
|
-
className,
|
|
40
|
-
align = "inline-start",
|
|
41
|
-
...props
|
|
42
|
-
}) {
|
|
43
|
-
return /* @__PURE__ */ jsx(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
role: "group",
|
|
47
|
-
"data-slot": "input-group-addon",
|
|
48
|
-
"data-align": align,
|
|
49
|
-
className: cn(inputGroupAddonVariants({ align }), className),
|
|
50
|
-
onClick: (e) => {
|
|
51
|
-
if (e.target.closest("button")) {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
e.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
55
|
-
},
|
|
56
|
-
...props
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
var inputGroupButtonVariants = cva(
|
|
61
|
-
"flex items-center gap-2 rounded-none text-sm shadow-none",
|
|
62
|
-
{
|
|
63
|
-
variants: {
|
|
64
|
-
size: {
|
|
65
|
-
xs: "h-6 gap-1 rounded-none px-1.5 text-xs [&>svg:not([class*='size-'])]:size-3.5",
|
|
66
|
-
sm: "",
|
|
67
|
-
"icon-xs": "size-6 p-0 text-xs has-[>svg]:p-0",
|
|
68
|
-
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
69
|
-
}
|
|
70
|
-
},
|
|
71
|
-
defaultVariants: {
|
|
72
|
-
size: "xs"
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
function InputGroupButton({
|
|
77
|
-
className,
|
|
78
|
-
type = "button",
|
|
79
|
-
variant = "ghost",
|
|
80
|
-
size = "xs",
|
|
81
|
-
...props
|
|
82
|
-
}) {
|
|
83
|
-
return /* @__PURE__ */ jsx(
|
|
84
|
-
Button,
|
|
85
|
-
{
|
|
86
|
-
type,
|
|
87
|
-
"data-size": size,
|
|
88
|
-
variant,
|
|
89
|
-
className: cn(inputGroupButtonVariants({ size }), className),
|
|
90
|
-
...props
|
|
91
|
-
}
|
|
92
|
-
);
|
|
93
|
-
}
|
|
94
|
-
function InputGroupText({ className, ...props }) {
|
|
95
|
-
return /* @__PURE__ */ jsx(
|
|
96
|
-
"span",
|
|
97
|
-
{
|
|
98
|
-
className: cn(
|
|
99
|
-
"flex items-center gap-2 text-sm text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-3.5",
|
|
100
|
-
className
|
|
101
|
-
),
|
|
102
|
-
...props
|
|
103
|
-
}
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
function InputGroupInput({
|
|
107
|
-
className,
|
|
108
|
-
...props
|
|
109
|
-
}) {
|
|
110
|
-
return /* @__PURE__ */ jsx(
|
|
111
|
-
Input,
|
|
112
|
-
{
|
|
113
|
-
"data-slot": "input-group-control",
|
|
114
|
-
className: cn(
|
|
115
|
-
"flex-1 border-0 bg-transparent ring-0 group-has-[>[data-align=inline-end]]/input-group:pr-2 group-has-[>[data-align=inline-start]]/input-group:pl-2 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
116
|
-
className
|
|
117
|
-
),
|
|
118
|
-
...props
|
|
119
|
-
}
|
|
120
|
-
);
|
|
121
|
-
}
|
|
122
|
-
function InputGroupTextarea({
|
|
123
|
-
className,
|
|
124
|
-
...props
|
|
125
|
-
}) {
|
|
126
|
-
return /* @__PURE__ */ jsx(
|
|
127
|
-
Textarea,
|
|
128
|
-
{
|
|
129
|
-
"data-slot": "input-group-control",
|
|
130
|
-
className: cn(
|
|
131
|
-
"flex-1 resize-none border-0 bg-transparent py-2.5 ring-0 focus-visible:ring-0 aria-invalid:ring-0 dark:bg-transparent",
|
|
132
|
-
className
|
|
133
|
-
),
|
|
134
|
-
...props
|
|
135
|
-
}
|
|
136
|
-
);
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
1
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea } from './chunk-PH733KDD.js';
|
|
2
|
+
import './chunk-5CRE35VX.js';
|
|
3
|
+
import './chunk-6JCVTRUK.js';
|
|
4
|
+
import './chunk-A44JJ6NH.js';
|
|
5
|
+
import './chunk-LZGII7SX.js';
|
|
140
6
|
//# sourceMappingURL=input-group.js.map
|
|
141
7
|
//# sourceMappingURL=input-group.js.map
|
package/dist/input-group.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"input-group.js"}
|
package/dist/item.cjs
ADDED
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var chunk6ARYCL4L_cjs = require('./chunk-6ARYCL4L.cjs');
|
|
4
|
+
var chunk6YHDDRIM_cjs = require('./chunk-6YHDDRIM.cjs');
|
|
5
|
+
var classVarianceAuthority = require('class-variance-authority');
|
|
6
|
+
var radixUi = require('radix-ui');
|
|
7
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
8
|
+
|
|
9
|
+
function ItemGroup({ className, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11
|
+
"div",
|
|
12
|
+
{
|
|
13
|
+
role: "list",
|
|
14
|
+
"data-slot": "item-group",
|
|
15
|
+
className: chunk6YHDDRIM_cjs.cn(
|
|
16
|
+
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
17
|
+
className
|
|
18
|
+
),
|
|
19
|
+
...props
|
|
20
|
+
}
|
|
21
|
+
);
|
|
22
|
+
}
|
|
23
|
+
function ItemSeparator({
|
|
24
|
+
className,
|
|
25
|
+
...props
|
|
26
|
+
}) {
|
|
27
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
28
|
+
chunk6ARYCL4L_cjs.Separator,
|
|
29
|
+
{
|
|
30
|
+
"data-slot": "item-separator",
|
|
31
|
+
orientation: "horizontal",
|
|
32
|
+
className: chunk6YHDDRIM_cjs.cn("my-2 bg-foreground/[0.06]", className),
|
|
33
|
+
...props
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
var itemVariants = classVarianceAuthority.cva(
|
|
38
|
+
"group/item flex w-full flex-wrap items-center rounded-[10px] border text-sm transition-colors duration-100 outline-none focus-visible:ring-2 focus-visible:ring-ring/40 [a]:transition-colors [a]:hover:bg-foreground/[0.04]",
|
|
39
|
+
{
|
|
40
|
+
variants: {
|
|
41
|
+
variant: {
|
|
42
|
+
default: "border-transparent",
|
|
43
|
+
outline: "border-foreground/10",
|
|
44
|
+
muted: "border-transparent bg-foreground/[0.04]"
|
|
45
|
+
},
|
|
46
|
+
size: {
|
|
47
|
+
default: "gap-3.5 px-4 py-3.5",
|
|
48
|
+
sm: "gap-3.5 px-3.5 py-3",
|
|
49
|
+
xs: "gap-2.5 px-3 py-2.5 in-data-[slot=dropdown-menu-content]:p-0"
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
defaultVariants: {
|
|
53
|
+
variant: "default",
|
|
54
|
+
size: "default"
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
function Item({
|
|
59
|
+
className,
|
|
60
|
+
variant = "default",
|
|
61
|
+
size = "default",
|
|
62
|
+
asChild = false,
|
|
63
|
+
...props
|
|
64
|
+
}) {
|
|
65
|
+
const Comp = asChild ? radixUi.Slot.Root : "div";
|
|
66
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
67
|
+
Comp,
|
|
68
|
+
{
|
|
69
|
+
"data-slot": "item",
|
|
70
|
+
"data-variant": variant,
|
|
71
|
+
"data-size": size,
|
|
72
|
+
className: chunk6YHDDRIM_cjs.cn(itemVariants({ variant, size, className })),
|
|
73
|
+
...props
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
var itemMediaVariants = classVarianceAuthority.cva(
|
|
78
|
+
"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none",
|
|
79
|
+
{
|
|
80
|
+
variants: {
|
|
81
|
+
variant: {
|
|
82
|
+
default: "bg-transparent",
|
|
83
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
84
|
+
// A thumbnail: the 9px tile of Work's option cards, square at the
|
|
85
|
+
// inline (xs) size where a corner would eat the picture.
|
|
86
|
+
image: "size-10 overflow-hidden rounded-[9px] group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 group-data-[size=xs]/item:rounded-none [&_img]:size-full [&_img]:object-cover"
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
defaultVariants: {
|
|
90
|
+
variant: "default"
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
function ItemMedia({
|
|
95
|
+
className,
|
|
96
|
+
variant = "default",
|
|
97
|
+
...props
|
|
98
|
+
}) {
|
|
99
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
"data-slot": "item-media",
|
|
103
|
+
"data-variant": variant,
|
|
104
|
+
className: chunk6YHDDRIM_cjs.cn(itemMediaVariants({ variant, className })),
|
|
105
|
+
...props
|
|
106
|
+
}
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
function ItemContent({ className, ...props }) {
|
|
110
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
111
|
+
"div",
|
|
112
|
+
{
|
|
113
|
+
"data-slot": "item-content",
|
|
114
|
+
className: chunk6YHDDRIM_cjs.cn(
|
|
115
|
+
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0.5 [&+[data-slot=item-content]]:flex-none",
|
|
116
|
+
className
|
|
117
|
+
),
|
|
118
|
+
...props
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
}
|
|
122
|
+
function ItemTitle({ className, ...props }) {
|
|
123
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
124
|
+
"div",
|
|
125
|
+
{
|
|
126
|
+
"data-slot": "item-title",
|
|
127
|
+
className: chunk6YHDDRIM_cjs.cn(
|
|
128
|
+
"line-clamp-1 flex w-fit items-center gap-2 text-[13px] leading-snug font-medium text-foreground",
|
|
129
|
+
className
|
|
130
|
+
),
|
|
131
|
+
...props
|
|
132
|
+
}
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
function ItemDescription({ className, ...props }) {
|
|
136
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
137
|
+
"p",
|
|
138
|
+
{
|
|
139
|
+
"data-slot": "item-description",
|
|
140
|
+
className: chunk6YHDDRIM_cjs.cn(
|
|
141
|
+
"line-clamp-2 text-left text-[12.5px] leading-relaxed font-normal text-muted-foreground [&>a]:text-amber-500 [&>a:hover]:text-amber-400",
|
|
142
|
+
className
|
|
143
|
+
),
|
|
144
|
+
...props
|
|
145
|
+
}
|
|
146
|
+
);
|
|
147
|
+
}
|
|
148
|
+
function ItemActions({ className, ...props }) {
|
|
149
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
150
|
+
"div",
|
|
151
|
+
{
|
|
152
|
+
"data-slot": "item-actions",
|
|
153
|
+
className: chunk6YHDDRIM_cjs.cn("flex items-center gap-2", className),
|
|
154
|
+
...props
|
|
155
|
+
}
|
|
156
|
+
);
|
|
157
|
+
}
|
|
158
|
+
function ItemHeader({ className, ...props }) {
|
|
159
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
160
|
+
"div",
|
|
161
|
+
{
|
|
162
|
+
"data-slot": "item-header",
|
|
163
|
+
className: chunk6YHDDRIM_cjs.cn(
|
|
164
|
+
"flex basis-full items-center justify-between gap-2",
|
|
165
|
+
className
|
|
166
|
+
),
|
|
167
|
+
...props
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
}
|
|
171
|
+
function ItemFooter({ className, ...props }) {
|
|
172
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
173
|
+
"div",
|
|
174
|
+
{
|
|
175
|
+
"data-slot": "item-footer",
|
|
176
|
+
className: chunk6YHDDRIM_cjs.cn(
|
|
177
|
+
"flex basis-full items-center justify-between gap-2",
|
|
178
|
+
className
|
|
179
|
+
),
|
|
180
|
+
...props
|
|
181
|
+
}
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
exports.Item = Item;
|
|
186
|
+
exports.ItemActions = ItemActions;
|
|
187
|
+
exports.ItemContent = ItemContent;
|
|
188
|
+
exports.ItemDescription = ItemDescription;
|
|
189
|
+
exports.ItemFooter = ItemFooter;
|
|
190
|
+
exports.ItemGroup = ItemGroup;
|
|
191
|
+
exports.ItemHeader = ItemHeader;
|
|
192
|
+
exports.ItemMedia = ItemMedia;
|
|
193
|
+
exports.ItemSeparator = ItemSeparator;
|
|
194
|
+
exports.ItemTitle = ItemTitle;
|
|
195
|
+
//# sourceMappingURL=item.cjs.map
|
|
196
|
+
//# sourceMappingURL=item.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/item.tsx"],"names":["jsx","cn","Separator","cva","Slot"],"mappings":"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","file":"item.cjs","sourcesContent":["import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\nimport { Slot } from \"radix-ui\"\n\nimport { cn } from \"./lib/utils\"\nimport { Separator } from \"./separator\"\n\n// A content row (media, title, description, actions) in the Work look:\n// rounded, a hairline border when outlined, sentence-case 13px titles over a\n// muted description. For a navigation row use `list-row` instead.\n\nfunction ItemGroup({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n role=\"list\"\n data-slot=\"item-group\"\n className={cn(\n \"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof Separator>) {\n return (\n <Separator\n data-slot=\"item-separator\"\n orientation=\"horizontal\"\n className={cn(\"my-2 bg-foreground/[0.06]\", className)}\n {...props}\n />\n )\n}\n\nconst itemVariants = cva(\n \"group/item flex w-full flex-wrap items-center rounded-[10px] border text-sm transition-colors duration-100 outline-none focus-visible:ring-2 focus-visible:ring-ring/40 [a]:transition-colors [a]:hover:bg-foreground/[0.04]\",\n {\n variants: {\n variant: {\n default: \"border-transparent\",\n outline: \"border-foreground/10\",\n muted: \"border-transparent bg-foreground/[0.04]\",\n },\n size: {\n default: \"gap-3.5 px-4 py-3.5\",\n sm: \"gap-3.5 px-3.5 py-3\",\n xs: \"gap-2.5 px-3 py-2.5 in-data-[slot=dropdown-menu-content]:p-0\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n }\n)\n\nfunction Item({\n className,\n variant = \"default\",\n size = \"default\",\n asChild = false,\n ...props\n}: React.ComponentProps<\"div\"> &\n VariantProps<typeof itemVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot.Root : \"div\"\n return (\n <Comp\n data-slot=\"item\"\n data-variant={variant}\n data-size={size}\n className={cn(itemVariants({ variant, size, className }))}\n {...props}\n />\n )\n}\n\nconst itemMediaVariants = cva(\n \"flex shrink-0 items-center justify-center gap-2 group-has-data-[slot=item-description]/item:translate-y-0.5 group-has-data-[slot=item-description]/item:self-start [&_svg]:pointer-events-none\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n icon: \"[&_svg:not([class*='size-'])]:size-4\",\n // A thumbnail: the 9px tile of Work's option cards, square at the\n // inline (xs) size where a corner would eat the picture.\n image:\n \"size-10 overflow-hidden rounded-[9px] group-data-[size=sm]/item:size-8 group-data-[size=xs]/item:size-6 group-data-[size=xs]/item:rounded-none [&_img]:size-full [&_img]:object-cover\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction ItemMedia({\n className,\n variant = \"default\",\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof itemMediaVariants>) {\n return (\n <div\n data-slot=\"item-media\"\n data-variant={variant}\n className={cn(itemMediaVariants({ variant, className }))}\n {...props}\n />\n )\n}\n\nfunction ItemContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-content\"\n className={cn(\n \"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0.5 [&+[data-slot=item-content]]:flex-none\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-title\"\n className={cn(\n \"line-clamp-1 flex w-fit items-center gap-2 text-[13px] leading-snug font-medium text-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemDescription({ className, ...props }: React.ComponentProps<\"p\">) {\n return (\n <p\n data-slot=\"item-description\"\n className={cn(\n \"line-clamp-2 text-left text-[12.5px] leading-relaxed font-normal text-muted-foreground [&>a]:text-amber-500 [&>a:hover]:text-amber-400\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemActions({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-actions\"\n className={cn(\"flex items-center gap-2\", className)}\n {...props}\n />\n )\n}\n\nfunction ItemHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-header\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction ItemFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"item-footer\"\n className={cn(\n \"flex basis-full items-center justify-between gap-2\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n Item,\n ItemMedia,\n ItemContent,\n ItemActions,\n ItemGroup,\n ItemSeparator,\n ItemTitle,\n ItemDescription,\n ItemHeader,\n ItemFooter,\n}\n"]}
|
package/dist/item.d.cts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import * as class_variance_authority_types from 'class-variance-authority/types';
|
|
2
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
import { Separator } from './separator.cjs';
|
|
6
|
+
import 'radix-ui';
|
|
7
|
+
|
|
8
|
+
declare function ItemGroup({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
9
|
+
declare function ItemSeparator({ className, ...props }: React.ComponentProps<typeof Separator>): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare const itemVariants: (props?: ({
|
|
11
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
12
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
13
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
14
|
+
declare function Item({ className, variant, size, asChild, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemVariants> & {
|
|
15
|
+
asChild?: boolean;
|
|
16
|
+
}): react_jsx_runtime.JSX.Element;
|
|
17
|
+
declare const itemMediaVariants: (props?: ({
|
|
18
|
+
variant?: "default" | "image" | "icon" | null | undefined;
|
|
19
|
+
} & class_variance_authority_types.ClassProp) | undefined) => string;
|
|
20
|
+
declare function ItemMedia({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof itemMediaVariants>): react_jsx_runtime.JSX.Element;
|
|
21
|
+
declare function ItemContent({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
22
|
+
declare function ItemTitle({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
23
|
+
declare function ItemDescription({ className, ...props }: React.ComponentProps<"p">): react_jsx_runtime.JSX.Element;
|
|
24
|
+
declare function ItemActions({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
25
|
+
declare function ItemHeader({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
26
|
+
declare function ItemFooter({ className, ...props }: React.ComponentProps<"div">): react_jsx_runtime.JSX.Element;
|
|
27
|
+
|
|
28
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|