@invergent/ui-sdk 2.19.0 → 2.19.2
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 +11 -2
- package/dist/badge.d.cts +1 -1
- package/dist/badge.d.ts +1 -1
- 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/button.d.cts +1 -1
- package/dist/button.d.ts +1 -1
- package/dist/chip.cjs +3 -3
- package/dist/chip.cjs.map +1 -1
- package/dist/chip.d.cts +2 -4
- package/dist/chip.d.ts +2 -4
- package/dist/chip.js +3 -3
- package/dist/chip.js.map +1 -1
- package/dist/{chunk-IVMZANP7.cjs → chunk-ILCP5QXL.cjs} +6 -3
- package/dist/chunk-ILCP5QXL.cjs.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/{chunk-CPAFEXKR.js → chunk-WO2SXSNH.js} +6 -3
- package/dist/chunk-WO2SXSNH.js.map +1 -0
- package/dist/collapsible-header.cjs +14 -3
- package/dist/collapsible-header.cjs.map +1 -1
- package/dist/collapsible-header.d.cts +4 -1
- package/dist/collapsible-header.d.ts +4 -1
- package/dist/collapsible-header.js +14 -3
- package/dist/collapsible-header.js.map +1 -1
- 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/confirm-dialog.cjs +5 -3
- package/dist/confirm-dialog.cjs.map +1 -1
- package/dist/confirm-dialog.d.cts +4 -1
- package/dist/confirm-dialog.d.ts +4 -1
- package/dist/confirm-dialog.js +5 -3
- package/dist/confirm-dialog.js.map +1 -1
- 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/tab-strip.cjs +74 -0
- package/dist/tab-strip.cjs.map +1 -0
- package/dist/tab-strip.d.cts +22 -0
- package/dist/tab-strip.d.ts +22 -0
- package/dist/tab-strip.js +71 -0
- package/dist/tab-strip.js.map +1 -0
- package/dist/tabs.d.cts +1 -1
- package/dist/tabs.d.ts +1 -1
- 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/dist/toggle-group.cjs +4 -2
- package/dist/toggle-group.cjs.map +1 -1
- package/dist/toggle-group.js +3 -1
- package/dist/toggle-group.js.map +1 -1
- package/dist/toggle.cjs +4 -4
- package/dist/toggle.d.cts +1 -1
- package/dist/toggle.d.ts +1 -1
- package/dist/toggle.js +1 -1
- package/package.json +2 -1
- package/dist/chunk-CPAFEXKR.js.map +0 -1
- package/dist/chunk-IVMZANP7.cjs.map +0 -1
package/dist/item.d.ts
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.js';
|
|
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?: "image" | "default" | "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 };
|
package/dist/item.js
ADDED
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Separator } from './chunk-CTIEUG5L.js';
|
|
2
|
+
import { cn } from './chunk-LZGII7SX.js';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { Slot } from 'radix-ui';
|
|
5
|
+
import { jsx } from 'react/jsx-runtime';
|
|
6
|
+
|
|
7
|
+
function ItemGroup({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(
|
|
9
|
+
"div",
|
|
10
|
+
{
|
|
11
|
+
role: "list",
|
|
12
|
+
"data-slot": "item-group",
|
|
13
|
+
className: cn(
|
|
14
|
+
"group/item-group flex w-full flex-col gap-4 has-data-[size=sm]:gap-2.5 has-data-[size=xs]:gap-2",
|
|
15
|
+
className
|
|
16
|
+
),
|
|
17
|
+
...props
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
function ItemSeparator({
|
|
22
|
+
className,
|
|
23
|
+
...props
|
|
24
|
+
}) {
|
|
25
|
+
return /* @__PURE__ */ jsx(
|
|
26
|
+
Separator,
|
|
27
|
+
{
|
|
28
|
+
"data-slot": "item-separator",
|
|
29
|
+
orientation: "horizontal",
|
|
30
|
+
className: cn("my-2 bg-foreground/[0.06]", className),
|
|
31
|
+
...props
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
var itemVariants = cva(
|
|
36
|
+
"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]",
|
|
37
|
+
{
|
|
38
|
+
variants: {
|
|
39
|
+
variant: {
|
|
40
|
+
default: "border-transparent",
|
|
41
|
+
outline: "border-foreground/10",
|
|
42
|
+
muted: "border-transparent bg-foreground/[0.04]"
|
|
43
|
+
},
|
|
44
|
+
size: {
|
|
45
|
+
default: "gap-3.5 px-4 py-3.5",
|
|
46
|
+
sm: "gap-3.5 px-3.5 py-3",
|
|
47
|
+
xs: "gap-2.5 px-3 py-2.5 in-data-[slot=dropdown-menu-content]:p-0"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
defaultVariants: {
|
|
51
|
+
variant: "default",
|
|
52
|
+
size: "default"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
);
|
|
56
|
+
function Item({
|
|
57
|
+
className,
|
|
58
|
+
variant = "default",
|
|
59
|
+
size = "default",
|
|
60
|
+
asChild = false,
|
|
61
|
+
...props
|
|
62
|
+
}) {
|
|
63
|
+
const Comp = asChild ? Slot.Root : "div";
|
|
64
|
+
return /* @__PURE__ */ jsx(
|
|
65
|
+
Comp,
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "item",
|
|
68
|
+
"data-variant": variant,
|
|
69
|
+
"data-size": size,
|
|
70
|
+
className: cn(itemVariants({ variant, size, className })),
|
|
71
|
+
...props
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
var itemMediaVariants = cva(
|
|
76
|
+
"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",
|
|
77
|
+
{
|
|
78
|
+
variants: {
|
|
79
|
+
variant: {
|
|
80
|
+
default: "bg-transparent",
|
|
81
|
+
icon: "[&_svg:not([class*='size-'])]:size-4",
|
|
82
|
+
// A thumbnail: the 9px tile of Work's option cards, square at the
|
|
83
|
+
// inline (xs) size where a corner would eat the picture.
|
|
84
|
+
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"
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
defaultVariants: {
|
|
88
|
+
variant: "default"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
);
|
|
92
|
+
function ItemMedia({
|
|
93
|
+
className,
|
|
94
|
+
variant = "default",
|
|
95
|
+
...props
|
|
96
|
+
}) {
|
|
97
|
+
return /* @__PURE__ */ jsx(
|
|
98
|
+
"div",
|
|
99
|
+
{
|
|
100
|
+
"data-slot": "item-media",
|
|
101
|
+
"data-variant": variant,
|
|
102
|
+
className: cn(itemMediaVariants({ variant, className })),
|
|
103
|
+
...props
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
}
|
|
107
|
+
function ItemContent({ className, ...props }) {
|
|
108
|
+
return /* @__PURE__ */ jsx(
|
|
109
|
+
"div",
|
|
110
|
+
{
|
|
111
|
+
"data-slot": "item-content",
|
|
112
|
+
className: cn(
|
|
113
|
+
"flex flex-1 flex-col gap-1 group-data-[size=xs]/item:gap-0.5 [&+[data-slot=item-content]]:flex-none",
|
|
114
|
+
className
|
|
115
|
+
),
|
|
116
|
+
...props
|
|
117
|
+
}
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
function ItemTitle({ className, ...props }) {
|
|
121
|
+
return /* @__PURE__ */ jsx(
|
|
122
|
+
"div",
|
|
123
|
+
{
|
|
124
|
+
"data-slot": "item-title",
|
|
125
|
+
className: cn(
|
|
126
|
+
"line-clamp-1 flex w-fit items-center gap-2 text-[13px] leading-snug font-medium text-foreground",
|
|
127
|
+
className
|
|
128
|
+
),
|
|
129
|
+
...props
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
function ItemDescription({ className, ...props }) {
|
|
134
|
+
return /* @__PURE__ */ jsx(
|
|
135
|
+
"p",
|
|
136
|
+
{
|
|
137
|
+
"data-slot": "item-description",
|
|
138
|
+
className: cn(
|
|
139
|
+
"line-clamp-2 text-left text-[12.5px] leading-relaxed font-normal text-muted-foreground [&>a]:text-amber-500 [&>a:hover]:text-amber-400",
|
|
140
|
+
className
|
|
141
|
+
),
|
|
142
|
+
...props
|
|
143
|
+
}
|
|
144
|
+
);
|
|
145
|
+
}
|
|
146
|
+
function ItemActions({ className, ...props }) {
|
|
147
|
+
return /* @__PURE__ */ jsx(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
"data-slot": "item-actions",
|
|
151
|
+
className: cn("flex items-center gap-2", className),
|
|
152
|
+
...props
|
|
153
|
+
}
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
function ItemHeader({ className, ...props }) {
|
|
157
|
+
return /* @__PURE__ */ jsx(
|
|
158
|
+
"div",
|
|
159
|
+
{
|
|
160
|
+
"data-slot": "item-header",
|
|
161
|
+
className: cn(
|
|
162
|
+
"flex basis-full items-center justify-between gap-2",
|
|
163
|
+
className
|
|
164
|
+
),
|
|
165
|
+
...props
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
function ItemFooter({ className, ...props }) {
|
|
170
|
+
return /* @__PURE__ */ jsx(
|
|
171
|
+
"div",
|
|
172
|
+
{
|
|
173
|
+
"data-slot": "item-footer",
|
|
174
|
+
className: cn(
|
|
175
|
+
"flex basis-full items-center justify-between gap-2",
|
|
176
|
+
className
|
|
177
|
+
),
|
|
178
|
+
...props
|
|
179
|
+
}
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
184
|
+
//# sourceMappingURL=item.js.map
|
|
185
|
+
//# sourceMappingURL=item.js.map
|
package/dist/item.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/item.tsx"],"names":[],"mappings":"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","file":"item.js","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/popover.cjs
CHANGED
|
@@ -1,88 +1,37 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
var jsxRuntime = require('react/jsx-runtime');
|
|
3
|
+
var chunkUXSDDJXM_cjs = require('./chunk-UXSDDJXM.cjs');
|
|
4
|
+
require('./chunk-6YHDDRIM.cjs');
|
|
6
5
|
|
|
7
|
-
function Popover({
|
|
8
|
-
...props
|
|
9
|
-
}) {
|
|
10
|
-
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Root, { "data-slot": "popover", ...props });
|
|
11
|
-
}
|
|
12
|
-
function PopoverTrigger({
|
|
13
|
-
...props
|
|
14
|
-
}) {
|
|
15
|
-
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
16
|
-
}
|
|
17
|
-
function PopoverContent({
|
|
18
|
-
className,
|
|
19
|
-
align = "center",
|
|
20
|
-
sideOffset = 4,
|
|
21
|
-
...props
|
|
22
|
-
}) {
|
|
23
|
-
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24
|
-
radixUi.Popover.Content,
|
|
25
|
-
{
|
|
26
|
-
"data-slot": "popover-content",
|
|
27
|
-
align,
|
|
28
|
-
sideOffset,
|
|
29
|
-
className: chunk6YHDDRIM_cjs.cn(
|
|
30
|
-
// The surface of Work's menus, at panel padding.
|
|
31
|
-
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 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",
|
|
32
|
-
className
|
|
33
|
-
),
|
|
34
|
-
...props
|
|
35
|
-
}
|
|
36
|
-
) });
|
|
37
|
-
}
|
|
38
|
-
function PopoverAnchor({
|
|
39
|
-
...props
|
|
40
|
-
}) {
|
|
41
|
-
return /* @__PURE__ */ jsxRuntime.jsx(radixUi.Popover.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
42
|
-
}
|
|
43
|
-
function PopoverHeader({ className, ...props }) {
|
|
44
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
-
"div",
|
|
46
|
-
{
|
|
47
|
-
"data-slot": "popover-header",
|
|
48
|
-
className: chunk6YHDDRIM_cjs.cn("flex flex-col gap-1 text-sm", className),
|
|
49
|
-
...props
|
|
50
|
-
}
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
function PopoverTitle({ className, ...props }) {
|
|
54
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
55
|
-
"div",
|
|
56
|
-
{
|
|
57
|
-
"data-slot": "popover-title",
|
|
58
|
-
className: chunk6YHDDRIM_cjs.cn("text-[13px] font-semibold text-foreground", className),
|
|
59
|
-
...props
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
function PopoverDescription({
|
|
64
|
-
className,
|
|
65
|
-
...props
|
|
66
|
-
}) {
|
|
67
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
68
|
-
"p",
|
|
69
|
-
{
|
|
70
|
-
"data-slot": "popover-description",
|
|
71
|
-
className: chunk6YHDDRIM_cjs.cn(
|
|
72
|
-
"text-[12.5px] leading-relaxed text-muted-foreground",
|
|
73
|
-
className
|
|
74
|
-
),
|
|
75
|
-
...props
|
|
76
|
-
}
|
|
77
|
-
);
|
|
78
|
-
}
|
|
79
6
|
|
|
80
|
-
|
|
81
|
-
exports
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
exports
|
|
86
|
-
|
|
7
|
+
|
|
8
|
+
Object.defineProperty(exports, "Popover", {
|
|
9
|
+
enumerable: true,
|
|
10
|
+
get: function () { return chunkUXSDDJXM_cjs.Popover; }
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PopoverAnchor", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () { return chunkUXSDDJXM_cjs.PopoverAnchor; }
|
|
15
|
+
});
|
|
16
|
+
Object.defineProperty(exports, "PopoverContent", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
get: function () { return chunkUXSDDJXM_cjs.PopoverContent; }
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "PopoverDescription", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function () { return chunkUXSDDJXM_cjs.PopoverDescription; }
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "PopoverHeader", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () { return chunkUXSDDJXM_cjs.PopoverHeader; }
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(exports, "PopoverTitle", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
get: function () { return chunkUXSDDJXM_cjs.PopoverTitle; }
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "PopoverTrigger", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function () { return chunkUXSDDJXM_cjs.PopoverTrigger; }
|
|
35
|
+
});
|
|
87
36
|
//# sourceMappingURL=popover.cjs.map
|
|
88
37
|
//# sourceMappingURL=popover.cjs.map
|
package/dist/popover.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"popover.cjs"}
|
package/dist/popover.js
CHANGED
|
@@ -1,80 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
3
|
-
import { jsx } from 'react/jsx-runtime';
|
|
4
|
-
|
|
5
|
-
function Popover({
|
|
6
|
-
...props
|
|
7
|
-
}) {
|
|
8
|
-
return /* @__PURE__ */ jsx(Popover$1.Root, { "data-slot": "popover", ...props });
|
|
9
|
-
}
|
|
10
|
-
function PopoverTrigger({
|
|
11
|
-
...props
|
|
12
|
-
}) {
|
|
13
|
-
return /* @__PURE__ */ jsx(Popover$1.Trigger, { "data-slot": "popover-trigger", ...props });
|
|
14
|
-
}
|
|
15
|
-
function PopoverContent({
|
|
16
|
-
className,
|
|
17
|
-
align = "center",
|
|
18
|
-
sideOffset = 4,
|
|
19
|
-
...props
|
|
20
|
-
}) {
|
|
21
|
-
return /* @__PURE__ */ jsx(Popover$1.Portal, { children: /* @__PURE__ */ jsx(
|
|
22
|
-
Popover$1.Content,
|
|
23
|
-
{
|
|
24
|
-
"data-slot": "popover-content",
|
|
25
|
-
align,
|
|
26
|
-
sideOffset,
|
|
27
|
-
className: cn(
|
|
28
|
-
// The surface of Work's menus, at panel padding.
|
|
29
|
-
"z-50 flex w-72 origin-(--radix-popover-content-transform-origin) flex-col gap-4 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
|
-
function PopoverAnchor({
|
|
37
|
-
...props
|
|
38
|
-
}) {
|
|
39
|
-
return /* @__PURE__ */ jsx(Popover$1.Anchor, { "data-slot": "popover-anchor", ...props });
|
|
40
|
-
}
|
|
41
|
-
function PopoverHeader({ className, ...props }) {
|
|
42
|
-
return /* @__PURE__ */ jsx(
|
|
43
|
-
"div",
|
|
44
|
-
{
|
|
45
|
-
"data-slot": "popover-header",
|
|
46
|
-
className: cn("flex flex-col gap-1 text-sm", className),
|
|
47
|
-
...props
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
function PopoverTitle({ className, ...props }) {
|
|
52
|
-
return /* @__PURE__ */ jsx(
|
|
53
|
-
"div",
|
|
54
|
-
{
|
|
55
|
-
"data-slot": "popover-title",
|
|
56
|
-
className: cn("text-[13px] font-semibold text-foreground", className),
|
|
57
|
-
...props
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
}
|
|
61
|
-
function PopoverDescription({
|
|
62
|
-
className,
|
|
63
|
-
...props
|
|
64
|
-
}) {
|
|
65
|
-
return /* @__PURE__ */ jsx(
|
|
66
|
-
"p",
|
|
67
|
-
{
|
|
68
|
-
"data-slot": "popover-description",
|
|
69
|
-
className: cn(
|
|
70
|
-
"text-[12.5px] leading-relaxed text-muted-foreground",
|
|
71
|
-
className
|
|
72
|
-
),
|
|
73
|
-
...props
|
|
74
|
-
}
|
|
75
|
-
);
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger };
|
|
1
|
+
export { Popover, PopoverAnchor, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from './chunk-NSK344BJ.js';
|
|
2
|
+
import './chunk-LZGII7SX.js';
|
|
79
3
|
//# sourceMappingURL=popover.js.map
|
|
80
4
|
//# sourceMappingURL=popover.js.map
|
package/dist/popover.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"popover.js"}
|
package/dist/progress-bar.cjs
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
var chunk6YHDDRIM_cjs = require('./chunk-6YHDDRIM.cjs');
|
|
3
4
|
var jsxRuntime = require('react/jsx-runtime');
|
|
4
5
|
|
|
5
|
-
// src/progress-bar.tsx
|
|
6
6
|
function ProgressBar({
|
|
7
7
|
value,
|
|
8
8
|
max = 100,
|
|
9
9
|
color = "var(--primary)",
|
|
10
|
-
animated = false
|
|
10
|
+
animated = false,
|
|
11
|
+
className
|
|
11
12
|
}) {
|
|
12
13
|
const pct = Math.min(value / max * 100, 100);
|
|
13
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
14
15
|
"div",
|
|
15
16
|
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
17
|
+
role: "progressbar",
|
|
18
|
+
"aria-valuemin": 0,
|
|
19
|
+
"aria-valuemax": max,
|
|
20
|
+
"aria-valuenow": Math.min(value, max),
|
|
21
|
+
"data-slot": "progress-bar",
|
|
22
|
+
className: chunk6YHDDRIM_cjs.cn("h-1 bg-line rounded-sm overflow-hidden", className),
|
|
23
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: "h-full rounded-sm transition-[width] duration-500 ease-out",
|
|
27
|
+
style: {
|
|
28
|
+
width: `${pct}%`,
|
|
29
|
+
backgroundColor: color,
|
|
30
|
+
animation: animated ? "progress-bar 1s ease" : void 0
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
)
|
|
22
34
|
}
|
|
23
|
-
)
|
|
35
|
+
);
|
|
24
36
|
}
|
|
25
37
|
|
|
26
38
|
exports.ProgressBar = ProgressBar;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/progress-bar.tsx"],"names":["jsx"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"sources":["../src/progress-bar.tsx"],"names":["jsx","cn"],"mappings":";;;;;AAaO,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA;AAAA,EACA,GAAA,GAAM,GAAA;AAAA,EACN,KAAA,GAAQ,gBAAA;AAAA,EACR,QAAA,GAAW,KAAA;AAAA,EACX;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,MAAM,IAAA,CAAK,GAAA,CAAK,KAAA,GAAQ,GAAA,GAAO,KAAK,GAAG,CAAA;AAE7C,EAAA,uBACEA,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,aAAA;AAAA,MACL,eAAA,EAAe,CAAA;AAAA,MACf,eAAA,EAAe,GAAA;AAAA,MACf,eAAA,EAAe,IAAA,CAAK,GAAA,CAAI,KAAA,EAAO,GAAG,CAAA;AAAA,MAClC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAWC,oBAAA,CAAG,wCAAA,EAA0C,SAAS,CAAA;AAAA,MAEjE,QAAA,kBAAAD,cAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAU,4DAAA;AAAA,UACV,KAAA,EAAO;AAAA,YACL,KAAA,EAAO,GAAG,GAAG,CAAA,CAAA,CAAA;AAAA,YACb,eAAA,EAAiB,KAAA;AAAA,YACjB,SAAA,EAAW,WAAW,sBAAA,GAAyB;AAAA;AACjD;AAAA;AACF;AAAA,GACF;AAEJ","file":"progress-bar.cjs","sourcesContent":["// Copyright (c) 2026, Invergent SA, developed by Flavius Burca\n// SPDX-License-Identifier: AGPL-3.0-only\n//\nimport { cn } from \"./lib/utils\";\n\ninterface ProgressBarProps {\n value: number;\n max?: number;\n color?: string;\n animated?: boolean;\n className?: string;\n}\n\nexport function ProgressBar({\n value,\n max = 100,\n color = \"var(--primary)\",\n animated = false,\n className,\n}: ProgressBarProps) {\n const pct = Math.min((value / max) * 100, 100);\n\n return (\n <div\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={Math.min(value, max)}\n data-slot=\"progress-bar\"\n className={cn(\"h-1 bg-line rounded-sm overflow-hidden\", className)}\n >\n <div\n className=\"h-full rounded-sm transition-[width] duration-500 ease-out\"\n style={{\n width: `${pct}%`,\n backgroundColor: color,\n animation: animated ? \"progress-bar 1s ease\" : undefined,\n }}\n />\n </div>\n );\n}\n"]}
|
package/dist/progress-bar.d.cts
CHANGED
|
@@ -5,7 +5,8 @@ interface ProgressBarProps {
|
|
|
5
5
|
max?: number;
|
|
6
6
|
color?: string;
|
|
7
7
|
animated?: boolean;
|
|
8
|
+
className?: string;
|
|
8
9
|
}
|
|
9
|
-
declare function ProgressBar({ value, max, color, animated, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function ProgressBar({ value, max, color, animated, className, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
export { ProgressBar };
|
package/dist/progress-bar.d.ts
CHANGED
|
@@ -5,7 +5,8 @@ interface ProgressBarProps {
|
|
|
5
5
|
max?: number;
|
|
6
6
|
color?: string;
|
|
7
7
|
animated?: boolean;
|
|
8
|
+
className?: string;
|
|
8
9
|
}
|
|
9
|
-
declare function ProgressBar({ value, max, color, animated, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
10
|
+
declare function ProgressBar({ value, max, color, animated, className, }: ProgressBarProps): react_jsx_runtime.JSX.Element;
|
|
10
11
|
|
|
11
12
|
export { ProgressBar };
|
package/dist/progress-bar.js
CHANGED
|
@@ -1,24 +1,36 @@
|
|
|
1
|
+
import { cn } from './chunk-LZGII7SX.js';
|
|
1
2
|
import { jsx } from 'react/jsx-runtime';
|
|
2
3
|
|
|
3
|
-
// src/progress-bar.tsx
|
|
4
4
|
function ProgressBar({
|
|
5
5
|
value,
|
|
6
6
|
max = 100,
|
|
7
7
|
color = "var(--primary)",
|
|
8
|
-
animated = false
|
|
8
|
+
animated = false,
|
|
9
|
+
className
|
|
9
10
|
}) {
|
|
10
11
|
const pct = Math.min(value / max * 100, 100);
|
|
11
|
-
return /* @__PURE__ */ jsx(
|
|
12
|
+
return /* @__PURE__ */ jsx(
|
|
12
13
|
"div",
|
|
13
14
|
{
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
role: "progressbar",
|
|
16
|
+
"aria-valuemin": 0,
|
|
17
|
+
"aria-valuemax": max,
|
|
18
|
+
"aria-valuenow": Math.min(value, max),
|
|
19
|
+
"data-slot": "progress-bar",
|
|
20
|
+
className: cn("h-1 bg-line rounded-sm overflow-hidden", className),
|
|
21
|
+
children: /* @__PURE__ */ jsx(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
className: "h-full rounded-sm transition-[width] duration-500 ease-out",
|
|
25
|
+
style: {
|
|
26
|
+
width: `${pct}%`,
|
|
27
|
+
backgroundColor: color,
|
|
28
|
+
animation: animated ? "progress-bar 1s ease" : void 0
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
)
|
|
20
32
|
}
|
|
21
|
-
)
|
|
33
|
+
);
|
|
22
34
|
}
|
|
23
35
|
|
|
24
36
|
export { ProgressBar };
|
package/dist/progress-bar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/progress-bar.tsx"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"sources":["../src/progress-bar.tsx"],"names":[],"mappings":";;;AAaO,SAAS,WAAA,CAAY;AAAA,EAC1B,KAAA;AAAA,EACA,GAAA,GAAM,GAAA;AAAA,EACN,KAAA,GAAQ,gBAAA;AAAA,EACR,QAAA,GAAW,KAAA;AAAA,EACX;AACF,CAAA,EAAqB;AACnB,EAAA,MAAM,MAAM,IAAA,CAAK,GAAA,CAAK,KAAA,GAAQ,GAAA,GAAO,KAAK,GAAG,CAAA;AAE7C,EAAA,uBACE,GAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,IAAA,EAAK,aAAA;AAAA,MACL,eAAA,EAAe,CAAA;AAAA,MACf,eAAA,EAAe,GAAA;AAAA,MACf,eAAA,EAAe,IAAA,CAAK,GAAA,CAAI,KAAA,EAAO,GAAG,CAAA;AAAA,MAClC,WAAA,EAAU,cAAA;AAAA,MACV,SAAA,EAAW,EAAA,CAAG,wCAAA,EAA0C,SAAS,CAAA;AAAA,MAEjE,QAAA,kBAAA,GAAA;AAAA,QAAC,KAAA;AAAA,QAAA;AAAA,UACC,SAAA,EAAU,4DAAA;AAAA,UACV,KAAA,EAAO;AAAA,YACL,KAAA,EAAO,GAAG,GAAG,CAAA,CAAA,CAAA;AAAA,YACb,eAAA,EAAiB,KAAA;AAAA,YACjB,SAAA,EAAW,WAAW,sBAAA,GAAyB;AAAA;AACjD;AAAA;AACF;AAAA,GACF;AAEJ","file":"progress-bar.js","sourcesContent":["// Copyright (c) 2026, Invergent SA, developed by Flavius Burca\n// SPDX-License-Identifier: AGPL-3.0-only\n//\nimport { cn } from \"./lib/utils\";\n\ninterface ProgressBarProps {\n value: number;\n max?: number;\n color?: string;\n animated?: boolean;\n className?: string;\n}\n\nexport function ProgressBar({\n value,\n max = 100,\n color = \"var(--primary)\",\n animated = false,\n className,\n}: ProgressBarProps) {\n const pct = Math.min((value / max) * 100, 100);\n\n return (\n <div\n role=\"progressbar\"\n aria-valuemin={0}\n aria-valuemax={max}\n aria-valuenow={Math.min(value, max)}\n data-slot=\"progress-bar\"\n className={cn(\"h-1 bg-line rounded-sm overflow-hidden\", className)}\n >\n <div\n className=\"h-full rounded-sm transition-[width] duration-500 ease-out\"\n style={{\n width: `${pct}%`,\n backgroundColor: color,\n animation: animated ? \"progress-bar 1s ease\" : undefined,\n }}\n />\n </div>\n );\n}\n"]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
|
|
5
|
+
// src/rabbit-mark.tsx
|
|
6
|
+
var RABBIT_MARK_PATH = "M49.71,46.83c0,.23.02.45.07.67,2.1.49,4.16,1.07,6.18,1.74.58-.64.94-1.48.94-2.42,0-1.98-1.61-3.59-3.59-3.59s-3.59,1.61-3.59,3.59M33.95,78.3c3.1-5.1,6.72-8.89,11.64-12.21.61-.42,1.24-.8,1.88-1.17.44-.25.61-.66.58-1.05,0-.53-.49-.91-.93-1.12-1.34-.62-2.72-1.5-4.06-2.54-1.57-1.22-3.01-2.59-4.36-4.06-.95-1.04-2.02-2.38-3-3.81-.81-1.18-.63-2.77.43-3.73,1.1-1,2.26-1.92,3.48-2.76.36-.25.72-.49,1.1-.73,2.43-1.55,5.05-2.79,7.79-3.7,3.23-1.07,6.62-1.66,10.03-1.74.59-.35,1.19-.69,1.8-1.01,1.66-.88,3.38-1.62,5.17-2.21,1.58-.54,3.2-.95,4.85-1.24,3.28-.59,6.64-.7,9.95-.32,1.23.14,2.45.34,3.68.62,2.87.64,5.59,1.62,8.09,2.9.54.27.71.95.36,1.45-1.58,2.22-3.46,4.25-5.5,6.05-3.01,2.65-6.51,4.75-10.26,6.17-2.32.88-4.75,1.53-7.22,1.91-.62.1-.78.9-.24,1.22,0,0,.01,0,.02.01,6.97,4.05,13.1,9.22,18.36,15.32.72.83,1.42,1.68,2.1,2.53,3.36,4.22,6.23,8.82,8.56,13.68,1.8,3.73,3.27,7.63,4.39,11.62.73,2.6,1.34,5.24,1.76,7.91.11.76-.87,1.16-1.3.53-1.15-1.69-2.31-3.35-3.61-4.93-1.2-1.46-2.46-2.86-3.75-4.24-5.44-5.8-11.84-10.7-18.84-14.48-7.32-3.94-15.09-6.38-23.44-6.53-2.23-.04-4.46.08-6.68.3-4.05.43-8.02,1.28-11.93,2.4-.03,0-.05.01-.08.02,0,0-.01,0-.02,0-.07.02-.14.03-.21.03-.53,0-.91-.6-.61-1.09M50.95,12.97c-1.31,1.16-2.2,2.71-2.9,4.29-1.66,3.74-2.85,7.74-3.52,11.77-.32,1.92-.56,3.87-1.28,5.69-.17.44-.37.87-.6,1.28-1.18,2.1-3.37,3.19-5.6,3.86-4.96,1.47-10.14,1.97-15.25,2.65-2.37.31-8.03,1.12-7.34,4.69.46,2.36,2.26,4.16,4.08,5.6,2.66,2.11,5.44,4.09,8.33,5.88,1.87,1.15,3.85,2.11,5.6,3.44,1.74,1.33,3.15,3.05,3.58,5.25.22,1.16-.18,2.35-1,3.2-1.57,1.63-3,3.41-4.25,5.29-1.32,2.1-2.38,4.35-3.25,6.65-.59,1.44.97,2.98,2.41,2.37.53-.21,1.07-.41,1.61-.61,2.26-.82,4.68.73,4.93,3.12.17,1.61.38,3.17.63,4.57.46,2.57,3.14,3.63,5.32,1.41,2.84-2.88,4.66-6.31,7.84-8.86,2.53-2.03,6.26-4.17,9.71-3.59,3.17.56,6.27,1.52,9.23,2.85,5.32,2.32,10.36,5.29,14.95,8.86,9.17,7.1,16.56,16.51,21.27,27.1.93,2.07,4.03,1.44,4.1-.83.55-17.71-5.72-35.46-17.11-49.01-2.87-3.42-6.07-6.65-9.59-9.44-.88-.8-1.54-1.7-1.38-2.93.38-2.97,2-4.32,4.04-5.85,2.51-1.89,5.02-3.85,7.16-6.21.03-.03.06-.06.09-.1,1.24-1.37,2.38-2.83,3.4-4.37,1.2-1.81.6-4.26-1.3-5.31,0,0-.96-.52-1.45-.76-2.72-1.34-5.61-2.36-8.6-3.03-2.76-.62-5.58-.93-8.38-.93-2.38,0-4.76.22-7.09.67-1.96.37-3.97-.31-5.25-1.84-.28-.34-.54-.69-.79-1.04-.58-.84-1.09-1.71-1.63-2.58-1.29-2.06-1.87-3.63-2.89-5.84-1.06-2.29-1.85-4.73-3.26-6.86-.73-1.11-1.53-1.54-2.32-1.54s-1.54.41-2.24,1.02";
|
|
7
|
+
var RABBIT_MARK_BOX = {
|
|
8
|
+
x: 14.4021,
|
|
9
|
+
y: 11.93,
|
|
10
|
+
w: 95.1813,
|
|
11
|
+
h: 109.058
|
|
12
|
+
};
|
|
13
|
+
function RabbitMark({ className }) {
|
|
14
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
15
|
+
"svg",
|
|
16
|
+
{
|
|
17
|
+
className,
|
|
18
|
+
viewBox: "14.4021 11.93 95.1813 109.058",
|
|
19
|
+
fill: "currentColor",
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: RABBIT_MARK_PATH })
|
|
22
|
+
}
|
|
23
|
+
);
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
exports.RABBIT_MARK_BOX = RABBIT_MARK_BOX;
|
|
27
|
+
exports.RABBIT_MARK_PATH = RABBIT_MARK_PATH;
|
|
28
|
+
exports.RabbitMark = RabbitMark;
|
|
29
|
+
//# sourceMappingURL=rabbit-mark.cjs.map
|
|
30
|
+
//# sourceMappingURL=rabbit-mark.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/rabbit-mark.tsx"],"names":["jsx"],"mappings":";;;;;AAeO,IAAM,gBAAA,GACX;AAGK,IAAM,eAAA,GAAkB;AAAA,EAC7B,CAAA,EAAG,OAAA;AAAA,EACH,CAAA,EAAG,KAAA;AAAA,EACH,CAAA,EAAG,OAAA;AAAA,EACH,CAAA,EAAG;AACL;AAEO,SAAS,UAAA,CAAW,EAAE,SAAA,EAAU,EAA2B;AAChE,EAAA,uBACEA,cAAA;AAAA,IAAC,KAAA;AAAA,IAAA;AAAA,MACC,SAAA;AAAA,MACA,OAAA,EAAQ,+BAAA;AAAA,MACR,IAAA,EAAK,cAAA;AAAA,MACL,aAAA,EAAY,MAAA;AAAA,MAEZ,QAAA,kBAAAA,cAAA,CAAC,MAAA,EAAA,EAAK,CAAA,EAAG,gBAAA,EAAkB;AAAA;AAAA,GAC7B;AAEJ","file":"rabbit-mark.cjs","sourcesContent":["// Copyright (c) 2026, Invergent SA, developed by Flavius Burca\n// SPDX-License-Identifier: AGPL-3.0-only\n//\n// The Surogate rabbit, as one path.\n//\n// Lifted from the brand favicon and stripped to the silhouette: the\n// circle, the amber ground and the registered mark all belong to the\n// full lockup, not to a 16px glyph. The viewBox is the path's own\n// bounding box, so the mark fills whatever box it is given the way a\n// lucide icon does, and `currentColor` lets it inherit like one too.\n//\n// The path is exported on its own because the whiteboard also paints\n// it onto a canvas, where there is no DOM to render an `<svg>` into.\n\n/** The rabbit silhouette, in the coordinate space of {@link RABBIT_MARK_BOX}. */\nexport const RABBIT_MARK_PATH =\n \"M49.71,46.83c0,.23.02.45.07.67,2.1.49,4.16,1.07,6.18,1.74.58-.64.94-1.48.94-2.42,0-1.98-1.61-3.59-3.59-3.59s-3.59,1.61-3.59,3.59M33.95,78.3c3.1-5.1,6.72-8.89,11.64-12.21.61-.42,1.24-.8,1.88-1.17.44-.25.61-.66.58-1.05,0-.53-.49-.91-.93-1.12-1.34-.62-2.72-1.5-4.06-2.54-1.57-1.22-3.01-2.59-4.36-4.06-.95-1.04-2.02-2.38-3-3.81-.81-1.18-.63-2.77.43-3.73,1.1-1,2.26-1.92,3.48-2.76.36-.25.72-.49,1.1-.73,2.43-1.55,5.05-2.79,7.79-3.7,3.23-1.07,6.62-1.66,10.03-1.74.59-.35,1.19-.69,1.8-1.01,1.66-.88,3.38-1.62,5.17-2.21,1.58-.54,3.2-.95,4.85-1.24,3.28-.59,6.64-.7,9.95-.32,1.23.14,2.45.34,3.68.62,2.87.64,5.59,1.62,8.09,2.9.54.27.71.95.36,1.45-1.58,2.22-3.46,4.25-5.5,6.05-3.01,2.65-6.51,4.75-10.26,6.17-2.32.88-4.75,1.53-7.22,1.91-.62.1-.78.9-.24,1.22,0,0,.01,0,.02.01,6.97,4.05,13.1,9.22,18.36,15.32.72.83,1.42,1.68,2.1,2.53,3.36,4.22,6.23,8.82,8.56,13.68,1.8,3.73,3.27,7.63,4.39,11.62.73,2.6,1.34,5.24,1.76,7.91.11.76-.87,1.16-1.3.53-1.15-1.69-2.31-3.35-3.61-4.93-1.2-1.46-2.46-2.86-3.75-4.24-5.44-5.8-11.84-10.7-18.84-14.48-7.32-3.94-15.09-6.38-23.44-6.53-2.23-.04-4.46.08-6.68.3-4.05.43-8.02,1.28-11.93,2.4-.03,0-.05.01-.08.02,0,0-.01,0-.02,0-.07.02-.14.03-.21.03-.53,0-.91-.6-.61-1.09M50.95,12.97c-1.31,1.16-2.2,2.71-2.9,4.29-1.66,3.74-2.85,7.74-3.52,11.77-.32,1.92-.56,3.87-1.28,5.69-.17.44-.37.87-.6,1.28-1.18,2.1-3.37,3.19-5.6,3.86-4.96,1.47-10.14,1.97-15.25,2.65-2.37.31-8.03,1.12-7.34,4.69.46,2.36,2.26,4.16,4.08,5.6,2.66,2.11,5.44,4.09,8.33,5.88,1.87,1.15,3.85,2.11,5.6,3.44,1.74,1.33,3.15,3.05,3.58,5.25.22,1.16-.18,2.35-1,3.2-1.57,1.63-3,3.41-4.25,5.29-1.32,2.1-2.38,4.35-3.25,6.65-.59,1.44.97,2.98,2.41,2.37.53-.21,1.07-.41,1.61-.61,2.26-.82,4.68.73,4.93,3.12.17,1.61.38,3.17.63,4.57.46,2.57,3.14,3.63,5.32,1.41,2.84-2.88,4.66-6.31,7.84-8.86,2.53-2.03,6.26-4.17,9.71-3.59,3.17.56,6.27,1.52,9.23,2.85,5.32,2.32,10.36,5.29,14.95,8.86,9.17,7.1,16.56,16.51,21.27,27.1.93,2.07,4.03,1.44,4.1-.83.55-17.71-5.72-35.46-17.11-49.01-2.87-3.42-6.07-6.65-9.59-9.44-.88-.8-1.54-1.7-1.38-2.93.38-2.97,2-4.32,4.04-5.85,2.51-1.89,5.02-3.85,7.16-6.21.03-.03.06-.06.09-.1,1.24-1.37,2.38-2.83,3.4-4.37,1.2-1.81.6-4.26-1.3-5.31,0,0-.96-.52-1.45-.76-2.72-1.34-5.61-2.36-8.6-3.03-2.76-.62-5.58-.93-8.38-.93-2.38,0-4.76.22-7.09.67-1.96.37-3.97-.31-5.25-1.84-.28-.34-.54-.69-.79-1.04-.58-.84-1.09-1.71-1.63-2.58-1.29-2.06-1.87-3.63-2.89-5.84-1.06-2.29-1.85-4.73-3.26-6.86-.73-1.11-1.53-1.54-2.32-1.54s-1.54.41-2.24,1.02\";\n\n/** The path's bounding box: what to scale against when painting it. */\nexport const RABBIT_MARK_BOX = {\n x: 14.4021,\n y: 11.93,\n w: 95.1813,\n h: 109.058,\n} as const;\n\nexport function RabbitMark({ className }: { className?: string }) {\n return (\n <svg\n className={className}\n viewBox=\"14.4021 11.93 95.1813 109.058\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n >\n <path d={RABBIT_MARK_PATH} />\n </svg>\n );\n}\n"]}
|