@cognite/aura 0.1.7 → 0.2.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/DESIGN.md +34 -92
- package/README.md +3 -3
- package/dist/colors.css +441 -214
- package/dist/components/index.d.ts +15 -1
- package/dist/components/index.js +345 -275
- package/dist/components/ui/core/accordion/accordion.js +22 -22
- package/dist/components/ui/core/alert/alert.d.ts +1 -1
- package/dist/components/ui/core/avatar/avatar.js +10 -10
- package/dist/components/ui/core/badge/badge.d.ts +2 -2
- package/dist/components/ui/core/badge/badge.js +13 -13
- package/dist/components/ui/core/banner/banner.d.ts +4 -4
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +11 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +190 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +2 -0
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +9 -0
- package/dist/components/ui/core/button/button.d.ts +1 -1
- package/dist/components/ui/core/card/card.d.ts +7 -4
- package/dist/components/ui/core/card/card.js +131 -87
- package/dist/components/ui/core/card/card.metadata.js +1 -1
- package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -0
- package/dist/components/ui/core/checkbox/checkbox.js +129 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.d.ts +2 -0
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +8 -0
- package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
- package/dist/components/ui/core/command/command.d.ts +2 -2
- package/dist/components/ui/core/count/count.d.ts +8 -0
- package/dist/components/ui/core/count/count.js +32 -0
- package/dist/components/ui/core/inline-citation/inline-citation.js +8 -8
- package/dist/components/ui/core/input-group/input-group.d.ts +1 -1
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -0
- package/dist/components/ui/core/kbd/kbd.js +36 -0
- package/dist/components/ui/core/kbd/kbd.metadata.d.ts +2 -0
- package/dist/components/ui/core/kbd/kbd.metadata.js +9 -0
- package/dist/components/ui/core/loader/loader.d.ts +9 -1
- package/dist/components/ui/core/loader/loader.js +106 -107
- package/dist/components/ui/core/loader/loader.metadata.js +2 -2
- package/dist/components/ui/core/popover/popover.d.ts +1 -1
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +1 -1
- package/dist/components/ui/core/radio-group/radio-group.d.ts +16 -0
- package/dist/components/ui/core/radio-group/radio-group.js +110 -0
- package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +2 -0
- package/dist/components/ui/core/radio-group/radio-group.metadata.js +9 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +16 -0
- package/dist/components/ui/core/segmented-control/segmented-control.js +169 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +3 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +48 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +2 -0
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +9 -0
- package/dist/components/ui/core/tabs/tabs.d.ts +23 -0
- package/dist/components/ui/core/tabs/tabs.js +222 -0
- package/dist/components/ui/core/tabs/tabs.utils.d.ts +2 -0
- package/dist/components/ui/core/tabs/tabs.utils.js +9 -0
- package/dist/components/ui/core/topbar/topbar.d.ts +30 -0
- package/dist/components/ui/core/topbar/topbar.js +190 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +314 -255
- package/dist/lib/utils.d.ts +11 -0
- package/dist/lib/utils.js +40 -29
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +66 -7
- package/package.json +5 -5
|
@@ -1,119 +1,118 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
1
|
+
import { jsx as a, jsxs as l } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as h } from "react";
|
|
3
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
4
|
+
const n = ({
|
|
5
|
+
size: e = 16,
|
|
6
|
+
className: r,
|
|
7
|
+
strokeClassName: t
|
|
8
|
+
}) => /* @__PURE__ */ l(
|
|
5
9
|
"svg",
|
|
6
10
|
{
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
focusable: "false",
|
|
13
|
+
className: s("overflow-visible", t, r),
|
|
14
|
+
height: e,
|
|
15
|
+
viewBox: "0 0 167 216",
|
|
16
|
+
width: e,
|
|
17
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
12
18
|
children: [
|
|
13
|
-
/* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
"
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
{
|
|
46
|
-
d: "M12.7023 14.472L10.3511 11.236",
|
|
47
|
-
opacity: "0.4",
|
|
48
|
-
stroke: "currentColor",
|
|
49
|
-
strokeWidth: "1.5"
|
|
50
|
-
}
|
|
51
|
-
),
|
|
52
|
-
/* @__PURE__ */ t(
|
|
53
|
-
"path",
|
|
54
|
-
{
|
|
55
|
-
d: "M3.29773 14.472L5.64887 11.236",
|
|
56
|
-
opacity: "0.6",
|
|
57
|
-
stroke: "currentColor",
|
|
58
|
-
strokeWidth: "1.5"
|
|
59
|
-
}
|
|
60
|
-
),
|
|
61
|
-
/* @__PURE__ */ t(
|
|
62
|
-
"path",
|
|
63
|
-
{
|
|
64
|
-
d: "M15.6085 5.52783L11.8043 6.7639",
|
|
65
|
-
opacity: "0.2",
|
|
66
|
-
stroke: "currentColor",
|
|
67
|
-
strokeWidth: "1.5"
|
|
68
|
-
}
|
|
69
|
-
),
|
|
70
|
-
/* @__PURE__ */ t(
|
|
71
|
-
"path",
|
|
72
|
-
{
|
|
73
|
-
d: "M0.391602 10.472L4.19583 9.23598",
|
|
74
|
-
opacity: "0.7",
|
|
75
|
-
stroke: "currentColor",
|
|
76
|
-
strokeWidth: "1.5"
|
|
77
|
-
}
|
|
78
|
-
),
|
|
79
|
-
/* @__PURE__ */ t(
|
|
80
|
-
"path",
|
|
81
|
-
{
|
|
82
|
-
d: "M15.6085 10.4722L11.8043 9.2361",
|
|
83
|
-
opacity: "0.3",
|
|
84
|
-
stroke: "currentColor",
|
|
85
|
-
strokeWidth: "1.5"
|
|
86
|
-
}
|
|
87
|
-
),
|
|
88
|
-
/* @__PURE__ */ t(
|
|
89
|
-
"path",
|
|
90
|
-
{
|
|
91
|
-
d: "M0.391602 5.52783L4.19583 6.7639",
|
|
92
|
-
opacity: "0.8",
|
|
93
|
-
stroke: "currentColor",
|
|
94
|
-
strokeWidth: "1.5"
|
|
95
|
-
}
|
|
96
|
-
)
|
|
97
|
-
] }),
|
|
98
|
-
/* @__PURE__ */ t("defs", { children: /* @__PURE__ */ t("clipPath", { id: "clip0_2393_1490", children: /* @__PURE__ */ t("rect", { fill: "white", height: "16", width: "16" }) }) })
|
|
19
|
+
/* @__PURE__ */ a(
|
|
20
|
+
"rect",
|
|
21
|
+
{
|
|
22
|
+
className: "aura-loader-rect aura-loader-rect-1",
|
|
23
|
+
"data-slot": "loader-rect",
|
|
24
|
+
x: "10",
|
|
25
|
+
y: "10",
|
|
26
|
+
width: "98",
|
|
27
|
+
height: "196",
|
|
28
|
+
rx: "49",
|
|
29
|
+
fill: "transparent",
|
|
30
|
+
stroke: "currentColor",
|
|
31
|
+
strokeWidth: "20",
|
|
32
|
+
strokeLinecap: "round"
|
|
33
|
+
}
|
|
34
|
+
),
|
|
35
|
+
/* @__PURE__ */ a(
|
|
36
|
+
"rect",
|
|
37
|
+
{
|
|
38
|
+
className: "aura-loader-rect aura-loader-rect-2",
|
|
39
|
+
"data-slot": "loader-rect",
|
|
40
|
+
x: "59",
|
|
41
|
+
y: "10",
|
|
42
|
+
width: "98",
|
|
43
|
+
height: "196",
|
|
44
|
+
rx: "49",
|
|
45
|
+
fill: "transparent",
|
|
46
|
+
stroke: "currentColor",
|
|
47
|
+
strokeWidth: "20",
|
|
48
|
+
strokeLinecap: "round"
|
|
49
|
+
}
|
|
50
|
+
)
|
|
99
51
|
]
|
|
100
52
|
}
|
|
101
|
-
),
|
|
102
|
-
|
|
53
|
+
), x = (e) => e.variant === "page", g = h((e, r) => {
|
|
54
|
+
const t = e.className, i = e.role ?? "status", o = e["aria-label"] ?? "Loading";
|
|
55
|
+
if (!x(e)) {
|
|
56
|
+
const {
|
|
57
|
+
size: u = 16,
|
|
58
|
+
variant: b,
|
|
59
|
+
className: k,
|
|
60
|
+
role: L,
|
|
61
|
+
"aria-label": y,
|
|
62
|
+
...f
|
|
63
|
+
} = e;
|
|
64
|
+
return /* @__PURE__ */ a(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
ref: r,
|
|
68
|
+
"data-slot": "loader",
|
|
69
|
+
role: i,
|
|
70
|
+
"aria-label": o,
|
|
71
|
+
className: s("inline-flex items-center justify-center", t),
|
|
72
|
+
...f,
|
|
73
|
+
children: /* @__PURE__ */ a(n, { size: u, strokeClassName: "text-current" })
|
|
74
|
+
}
|
|
75
|
+
);
|
|
76
|
+
}
|
|
77
|
+
const {
|
|
78
|
+
variant: N,
|
|
79
|
+
className: v,
|
|
80
|
+
role: w,
|
|
81
|
+
"aria-label": p,
|
|
82
|
+
header: d,
|
|
83
|
+
description: c,
|
|
84
|
+
...m
|
|
85
|
+
} = e;
|
|
86
|
+
return /* @__PURE__ */ l(
|
|
103
87
|
"div",
|
|
104
88
|
{
|
|
105
|
-
ref:
|
|
89
|
+
ref: r,
|
|
106
90
|
"data-slot": "loader",
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
91
|
+
role: i,
|
|
92
|
+
"aria-label": o,
|
|
93
|
+
className: s(
|
|
94
|
+
"text-foreground flex h-[11.5rem] w-80 flex-col items-center justify-center gap-2",
|
|
95
|
+
t
|
|
110
96
|
),
|
|
111
|
-
...
|
|
112
|
-
children:
|
|
97
|
+
...m,
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ a(
|
|
100
|
+
n,
|
|
101
|
+
{
|
|
102
|
+
size: 112,
|
|
103
|
+
className: "size-28",
|
|
104
|
+
strokeClassName: "text-current"
|
|
105
|
+
}
|
|
106
|
+
),
|
|
107
|
+
/* @__PURE__ */ l("div", { className: "flex w-full flex-col items-center justify-center gap-1 text-center", children: [
|
|
108
|
+
/* @__PURE__ */ a("p", { className: "text-lg font-medium leading-6 tracking-tightest text-foreground", children: d }),
|
|
109
|
+
c && /* @__PURE__ */ a("p", { className: "w-full text-sm leading-[18px] tracking-tight text-secondary-foreground", children: c })
|
|
110
|
+
] })
|
|
111
|
+
]
|
|
113
112
|
}
|
|
114
|
-
)
|
|
115
|
-
);
|
|
116
|
-
|
|
113
|
+
);
|
|
114
|
+
});
|
|
115
|
+
g.displayName = "Loader";
|
|
117
116
|
export {
|
|
118
|
-
|
|
117
|
+
g as Loader
|
|
119
118
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
const e = {
|
|
2
2
|
name: "Loader",
|
|
3
3
|
status: "in-progress-code-review",
|
|
4
|
-
description: "A
|
|
5
|
-
llmUsage: "Use `<Loader
|
|
4
|
+
description: "A four-line loading indicator with inline and page variants.",
|
|
5
|
+
llmUsage: "Use `<Loader />` for inline loading, or set `variant='page'` for page-level loading copy. Use `size` for inline bars and `className` to style the loader color; page variant copy is configured with `header` and optional `description`."
|
|
6
6
|
};
|
|
7
7
|
export {
|
|
8
8
|
e as LoaderMetadata
|
|
@@ -11,7 +11,7 @@ declare const PopoverDescription: import('react').ForwardRefExoticComponent<Omit
|
|
|
11
11
|
declare const PopoverSlot: import('react').ForwardRefExoticComponent<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
12
12
|
declare const PopoverClose: import('react').ForwardRefExoticComponent<Omit<Omit<import('@base-ui/react').ButtonProps & import('class-variance-authority').VariantProps<(props?: ({
|
|
13
13
|
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
14
|
-
size?: "
|
|
14
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
15
15
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
16
16
|
declare const PopoverContent: import('react').ForwardRefExoticComponent<Omit<import('@base-ui/react').PopoverPopupProps & Pick<import('@base-ui/react').PopoverPositionerProps, "align" | "alignOffset" | "side" | "sideOffset">, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
17
17
|
export { Popover, PopoverClose, PopoverContent, PopoverDescription, PopoverHeader, PopoverHeaderContent, PopoverSlot, PopoverTitle, PopoverTrigger, };
|
|
@@ -45,7 +45,7 @@ declare const PromptInputTools: import('react').ForwardRefExoticComponent<Prompt
|
|
|
45
45
|
type PromptInputButtonProps = ComponentProps<typeof InputGroupButton>;
|
|
46
46
|
declare const PromptInputButton: import('react').ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import('@base-ui/react').ButtonProps & import('class-variance-authority').VariantProps<(props?: ({
|
|
47
47
|
variant?: "default" | "secondary" | "outline" | "ghost" | "destructive" | null | undefined;
|
|
48
|
-
size?: "
|
|
48
|
+
size?: "default" | "sm" | "lg" | "icon" | "icon-sm" | "icon-lg" | null | undefined;
|
|
49
49
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "size"> & import('class-variance-authority').VariantProps<(props?: ({
|
|
50
50
|
size?: "sm" | "icon-sm" | "xs" | "icon-xs" | null | undefined;
|
|
51
51
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string>, "ref"> & import('react').RefAttributes<HTMLElement>, "ref"> & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
import { Radio as RadioPrimitive } from '@base-ui/react/radio';
|
|
3
|
+
import { RadioGroup as RadioGroupPrimitive } from '@base-ui/react/radio-group';
|
|
4
|
+
import { VariantProps } from 'class-variance-authority';
|
|
5
|
+
type Orientation = 'horizontal' | 'vertical';
|
|
6
|
+
type RadioGroupProps = RadioGroupPrimitive.Props & {
|
|
7
|
+
orientation?: Orientation;
|
|
8
|
+
};
|
|
9
|
+
declare const RadioGroup: import('react').ForwardRefExoticComponent<Omit<RadioGroupProps, "ref"> & import('react').RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const RadioGroupItem: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLLabelElement> & VariantProps<(props?: ({
|
|
11
|
+
variant?: "default" | "card" | null | undefined;
|
|
12
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & import('react').RefAttributes<HTMLLabelElement>>;
|
|
13
|
+
declare const RadioGroupItemControl: import('react').ForwardRefExoticComponent<Omit<RadioPrimitive.Root.Props<any>, "ref"> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
14
|
+
declare const RadioGroupItemLabel: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
15
|
+
declare const RadioGroupItemDescription: import('react').ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & import('react').RefAttributes<HTMLSpanElement>>;
|
|
16
|
+
export { RadioGroup, RadioGroupItem, RadioGroupItemControl, RadioGroupItemDescription, RadioGroupItemLabel, };
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { Radio as s } from "@base-ui/react/radio";
|
|
4
|
+
import { RadioGroup as n } from "@base-ui/react/radio-group";
|
|
5
|
+
import { cva as u } from "class-variance-authority";
|
|
6
|
+
import { cn as d, selectionItemBase as b, selectionItemCard as l, selectionItemDefault as c, focusState as p, selectionItemLabel as f, selectionItemDescription as g } from "../../../../lib/utils.js";
|
|
7
|
+
const m = t(({ className: r, orientation: e = "vertical", ...o }, i) => /* @__PURE__ */ a(
|
|
8
|
+
n,
|
|
9
|
+
{
|
|
10
|
+
ref: i,
|
|
11
|
+
"data-slot": "radio-group",
|
|
12
|
+
"data-orientation": e,
|
|
13
|
+
"aria-orientation": e,
|
|
14
|
+
className: d(
|
|
15
|
+
e === "horizontal" ? "flex items-center gap-2" : "grid has-[[data-variant=card]]:gap-2",
|
|
16
|
+
r
|
|
17
|
+
),
|
|
18
|
+
...o
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
m.displayName = "RadioGroup";
|
|
22
|
+
const h = u(
|
|
23
|
+
d("group/radio-group-item", b),
|
|
24
|
+
{
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
default: c,
|
|
28
|
+
card: l
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default"
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
), v = t(
|
|
36
|
+
({ className: r, variant: e, ...o }, i) => /* @__PURE__ */ a(
|
|
37
|
+
"label",
|
|
38
|
+
{
|
|
39
|
+
ref: i,
|
|
40
|
+
"data-slot": "radio-group-item",
|
|
41
|
+
"data-variant": e ?? "default",
|
|
42
|
+
className: d(h({ variant: e }), r),
|
|
43
|
+
...o
|
|
44
|
+
}
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
v.displayName = "RadioGroupItem";
|
|
48
|
+
const I = t(({ className: r, ...e }, o) => /* @__PURE__ */ a(
|
|
49
|
+
s.Root,
|
|
50
|
+
{
|
|
51
|
+
ref: o,
|
|
52
|
+
"data-slot": "radio-group-item-control",
|
|
53
|
+
className: d(
|
|
54
|
+
"group relative flex size-4 shrink-0 items-center justify-center rounded-full bg-transparent outline-none before:pointer-events-none before:absolute before:inset-0 before:z-0 before:box-border before:rounded-full before:border-[1.5px] before:border-muted-foreground before:bg-transparent before:transition-[background-color,border-color,box-shadow] before:content-['']",
|
|
55
|
+
"data-[checked]:before:border-border-active",
|
|
56
|
+
"hover:before:border-secondary-foreground group-hover/radio-group-item:before:border-secondary-foreground",
|
|
57
|
+
"data-[checked]:hover:before:border-border-active data-[checked]:hover:before:bg-accent-background",
|
|
58
|
+
"data-[checked]:group-hover/radio-group-item:before:border-border-active data-[checked]:group-hover/radio-group-item:before:bg-accent-background",
|
|
59
|
+
"data-[disabled]:before:border-disabled-foreground data-[disabled]:before:bg-disabled-background data-[disabled]:hover:before:border-disabled-foreground data-[disabled]:group-hover/radio-group-item:before:border-disabled-foreground data-[disabled]:group-hover/radio-group-item:before:bg-disabled-background",
|
|
60
|
+
p,
|
|
61
|
+
r
|
|
62
|
+
),
|
|
63
|
+
...e,
|
|
64
|
+
children: /* @__PURE__ */ a(
|
|
65
|
+
s.Indicator,
|
|
66
|
+
{
|
|
67
|
+
"data-slot": "radio-group-item-indicator",
|
|
68
|
+
className: "relative z-10 flex items-center justify-center size-full",
|
|
69
|
+
children: /* @__PURE__ */ a("span", { className: "size-2.5 rounded-full bg-active-background group-hover:bg-active-background-hover group-data-[disabled]:bg-disabled-foreground" })
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
}
|
|
73
|
+
));
|
|
74
|
+
I.displayName = "RadioGroupItemControl";
|
|
75
|
+
const R = t(({ className: r, ...e }, o) => /* @__PURE__ */ a(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
ref: o,
|
|
79
|
+
"data-slot": "radio-group-item-label",
|
|
80
|
+
className: d(
|
|
81
|
+
f,
|
|
82
|
+
"group-has-[[data-checked]]/radio-group-item:text-foreground",
|
|
83
|
+
"group-has-[[data-disabled]]/radio-group-item:text-disabled-foreground",
|
|
84
|
+
r
|
|
85
|
+
),
|
|
86
|
+
...e
|
|
87
|
+
}
|
|
88
|
+
));
|
|
89
|
+
R.displayName = "RadioGroupItemLabel";
|
|
90
|
+
const k = t(({ className: r, ...e }, o) => /* @__PURE__ */ a(
|
|
91
|
+
"span",
|
|
92
|
+
{
|
|
93
|
+
ref: o,
|
|
94
|
+
"data-slot": "radio-group-item-description",
|
|
95
|
+
className: d(
|
|
96
|
+
g,
|
|
97
|
+
"group-has-[[data-disabled]]/radio-group-item:text-disabled-foreground",
|
|
98
|
+
r
|
|
99
|
+
),
|
|
100
|
+
...e
|
|
101
|
+
}
|
|
102
|
+
));
|
|
103
|
+
k.displayName = "RadioGroupItemDescription";
|
|
104
|
+
export {
|
|
105
|
+
m as RadioGroup,
|
|
106
|
+
v as RadioGroupItem,
|
|
107
|
+
I as RadioGroupItemControl,
|
|
108
|
+
k as RadioGroupItemDescription,
|
|
109
|
+
R as RadioGroupItemLabel
|
|
110
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const e = {
|
|
2
|
+
name: "RadioGroup",
|
|
3
|
+
status: "in-progress-code-review",
|
|
4
|
+
description: "A composable radio group with optional label and description slots, including a card-style item variant.",
|
|
5
|
+
llmUsage: 'Use `<RadioGroup>` with `<RadioGroupItem>` wrapping `<RadioGroupItemControl value="..." />`, plus optional `<RadioGroupItemLabel>` and `<RadioGroupItemDescription>`. Always pass an accessible name on `<RadioGroupItemControl>` via `aria-label` (or `aria-labelledby` pointing to the label\'s id) — the wrapping `<label>` element names the underlying hidden form input, but does not name the visible `role="radio"` element that screen readers focus on. `<RadioGroupItemDescription>` is a visual slot at this primitive layer; if you need it announced by screen readers, give it an `id` and pass `aria-describedby` to `<RadioGroupItemControl>`. Use `variant="card"` on `<RadioGroupItem>` for card-style options. Pass `name`, `value`/`defaultValue`, `onValueChange`, `disabled`, `required`, and `orientation` on `<RadioGroup>` for form integration and layout.'
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
e as RadioGroupMetadata
|
|
9
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
declare function SegmentedControl({ className, ...props }: TabsPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare const segmentedControlListVariants: (props?: ({
|
|
5
|
+
size?: "default" | "small" | null | undefined;
|
|
6
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
7
|
+
type SegmentedControlListProps = TabsPrimitive.List.Props & VariantProps<typeof segmentedControlListVariants>;
|
|
8
|
+
declare function SegmentedControlList({ className, size, children, ...props }: SegmentedControlListProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare const segmentedControlButtonVariants: (props?: ({
|
|
10
|
+
size?: "default" | "small" | null | undefined;
|
|
11
|
+
tabContent?: "icon-label" | "label-only" | "icon-only" | null | undefined;
|
|
12
|
+
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
13
|
+
type SegmentedControlButtonProps = TabsPrimitive.Tab.Props & VariantProps<typeof segmentedControlButtonVariants>;
|
|
14
|
+
declare function SegmentedControlButton({ className, size, tabContent, ...props }: SegmentedControlButtonProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare function SegmentedControlContent({ className, ...props }: TabsPrimitive.Panel.Props): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export { SegmentedControl, SegmentedControlButton, SegmentedControlContent, SegmentedControlList, segmentedControlButtonVariants, segmentedControlListVariants, };
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as m, useContext as f } from "react";
|
|
3
|
+
import { Tabs as a } from "@base-ui/react/tabs";
|
|
4
|
+
import { cva as l } from "class-variance-authority";
|
|
5
|
+
import { cn as i } from "../../../../lib/utils.js";
|
|
6
|
+
function N({ className: t, ...e }) {
|
|
7
|
+
return /* @__PURE__ */ n(
|
|
8
|
+
a.Root,
|
|
9
|
+
{
|
|
10
|
+
"data-slot": "segmented-control",
|
|
11
|
+
className: i("flex flex-col gap-2", t),
|
|
12
|
+
...e
|
|
13
|
+
}
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
const g = l(
|
|
17
|
+
"bg-muted-background text-muted-foreground relative isolate inline-flex w-fit items-center justify-center gap-2 p-0.5",
|
|
18
|
+
{
|
|
19
|
+
variants: {
|
|
20
|
+
size: {
|
|
21
|
+
default: "h-9 rounded-lg",
|
|
22
|
+
small: "h-7 rounded-md"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
defaultVariants: {
|
|
26
|
+
size: "default"
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
), d = m(void 0);
|
|
30
|
+
function S({
|
|
31
|
+
className: t,
|
|
32
|
+
size: e,
|
|
33
|
+
children: o,
|
|
34
|
+
...r
|
|
35
|
+
}) {
|
|
36
|
+
const s = e ?? "default";
|
|
37
|
+
return /* @__PURE__ */ n(
|
|
38
|
+
a.List,
|
|
39
|
+
{
|
|
40
|
+
"data-slot": "segmented-control-list",
|
|
41
|
+
className: i(g({ size: e }), t),
|
|
42
|
+
...r,
|
|
43
|
+
children: /* @__PURE__ */ u(d.Provider, { value: s, children: [
|
|
44
|
+
/* @__PURE__ */ n(p, { size: s }),
|
|
45
|
+
o
|
|
46
|
+
] })
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
const b = l(
|
|
51
|
+
"bg-background pointer-events-none absolute top-(--active-tab-top) left-(--active-tab-left) -z-0 h-(--active-tab-height) w-(--active-tab-width) motion-safe:transition-[top,left,width,height] motion-safe:duration-200 motion-safe:ease-out data-[activation-direction=none]:transition-none",
|
|
52
|
+
{
|
|
53
|
+
variants: {
|
|
54
|
+
size: {
|
|
55
|
+
default: "rounded-md",
|
|
56
|
+
small: "rounded-sm"
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
defaultVariants: {
|
|
60
|
+
size: "default"
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
);
|
|
64
|
+
function p({
|
|
65
|
+
className: t,
|
|
66
|
+
size: e,
|
|
67
|
+
...o
|
|
68
|
+
}) {
|
|
69
|
+
return /* @__PURE__ */ n(
|
|
70
|
+
a.Indicator,
|
|
71
|
+
{
|
|
72
|
+
"data-slot": "segmented-control-indicator",
|
|
73
|
+
className: i(b({ size: e }), t),
|
|
74
|
+
...o
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
const v = l(
|
|
79
|
+
"text-sm leading-4.5 tracking-normal font-medium relative z-10 inline-flex flex-1 items-center justify-center whitespace-nowrap text-muted-foreground dark:text-muted-foreground border border-transparent transition-[color,box-shadow] duration-200 ease-out focus-visible:border-ring focus-visible:ring focus-visible:ring-ring-shadow focus-visible:outline-1 focus-visible:outline-ring [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4 data-disabled:pointer-events-none data-disabled:opacity-50 hover:text-foreground data-active:text-foreground data-active:hover:text-foreground",
|
|
80
|
+
{
|
|
81
|
+
variants: {
|
|
82
|
+
size: {
|
|
83
|
+
default: "rounded-md",
|
|
84
|
+
small: "rounded-sm"
|
|
85
|
+
},
|
|
86
|
+
tabContent: {
|
|
87
|
+
"icon-label": "",
|
|
88
|
+
"label-only": "",
|
|
89
|
+
"icon-only": "px-0"
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
compoundVariants: [
|
|
93
|
+
{
|
|
94
|
+
size: "default",
|
|
95
|
+
tabContent: "icon-label",
|
|
96
|
+
className: "h-8 gap-2 px-2 py-0"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
size: "default",
|
|
100
|
+
tabContent: "label-only",
|
|
101
|
+
className: "h-8 gap-0 px-2 py-0"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
size: "default",
|
|
105
|
+
tabContent: "icon-only",
|
|
106
|
+
className: "size-8 gap-0 py-0"
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
size: "small",
|
|
110
|
+
tabContent: "icon-label",
|
|
111
|
+
className: "h-6 gap-2 px-2 py-0"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
size: "small",
|
|
115
|
+
tabContent: "label-only",
|
|
116
|
+
className: "h-6 gap-0 px-2 py-0"
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
size: "small",
|
|
120
|
+
tabContent: "icon-only",
|
|
121
|
+
className: "size-6 gap-0 py-0"
|
|
122
|
+
}
|
|
123
|
+
],
|
|
124
|
+
defaultVariants: {
|
|
125
|
+
size: "default",
|
|
126
|
+
tabContent: "icon-label"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
);
|
|
130
|
+
function w({
|
|
131
|
+
className: t,
|
|
132
|
+
size: e,
|
|
133
|
+
tabContent: o,
|
|
134
|
+
...r
|
|
135
|
+
}) {
|
|
136
|
+
const s = f(d), c = e ?? s;
|
|
137
|
+
return /* @__PURE__ */ n(
|
|
138
|
+
a.Tab,
|
|
139
|
+
{
|
|
140
|
+
"data-slot": "segmented-control-trigger",
|
|
141
|
+
className: i(
|
|
142
|
+
v({ size: c, tabContent: o }),
|
|
143
|
+
t
|
|
144
|
+
),
|
|
145
|
+
...r
|
|
146
|
+
}
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
function V({
|
|
150
|
+
className: t,
|
|
151
|
+
...e
|
|
152
|
+
}) {
|
|
153
|
+
return /* @__PURE__ */ n(
|
|
154
|
+
a.Panel,
|
|
155
|
+
{
|
|
156
|
+
"data-slot": "segmented-control-content",
|
|
157
|
+
className: i("flex-1 outline-none", t),
|
|
158
|
+
...e
|
|
159
|
+
}
|
|
160
|
+
);
|
|
161
|
+
}
|
|
162
|
+
export {
|
|
163
|
+
N as SegmentedControl,
|
|
164
|
+
w as SegmentedControlButton,
|
|
165
|
+
V as SegmentedControlContent,
|
|
166
|
+
S as SegmentedControlList,
|
|
167
|
+
v as segmentedControlButtonVariants,
|
|
168
|
+
g as segmentedControlListVariants
|
|
169
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { IconLoader2 as o, IconAlertOctagonFilled as s, IconAlertTriangleFilled as a, IconInfoCircleFilled as i, IconCircleCheckFilled as l, IconX as d } from "@tabler/icons-react";
|
|
3
|
+
import { Toaster as c } from "sonner";
|
|
4
|
+
import { toast as k } from "sonner";
|
|
5
|
+
import { cn as r } from "../../../../lib/utils.js";
|
|
6
|
+
const g = {
|
|
7
|
+
"--normal-bg": "var(--raised-background)",
|
|
8
|
+
"--normal-text": "var(--foreground-fixed-light)",
|
|
9
|
+
"--normal-border": "transparent",
|
|
10
|
+
"--border-radius": "var(--radius-lg)"
|
|
11
|
+
}, p = ({ ...n }) => {
|
|
12
|
+
const t = "flex h-5 min-w-5 items-center justify-center rounded-md px-1";
|
|
13
|
+
return /* @__PURE__ */ e(
|
|
14
|
+
c,
|
|
15
|
+
{
|
|
16
|
+
"data-slot": "sonner-toast",
|
|
17
|
+
theme: "system",
|
|
18
|
+
className: "toaster group",
|
|
19
|
+
icons: {
|
|
20
|
+
close: /* @__PURE__ */ e(d, { className: "size-4 text-foreground-fixed-light" }),
|
|
21
|
+
success: /* @__PURE__ */ e("span", { className: r(t, "bg-success-background"), children: /* @__PURE__ */ e(l, { className: "size-3 text-success-foreground-on-success" }) }),
|
|
22
|
+
info: /* @__PURE__ */ e("span", { className: r(t, "bg-info-background"), children: /* @__PURE__ */ e(i, { className: "size-3 text-info-foreground-on-info" }) }),
|
|
23
|
+
warning: /* @__PURE__ */ e("span", { className: r(t, "bg-warning-background"), children: /* @__PURE__ */ e(a, { className: "size-3 text-warning-foreground-on-warning" }) }),
|
|
24
|
+
error: /* @__PURE__ */ e("span", { className: r(t, "bg-destructive-background"), children: /* @__PURE__ */ e(s, { className: "size-3 text-destructive-foreground-on-critical" }) }),
|
|
25
|
+
loading: /* @__PURE__ */ e(o, { className: "size-4 animate-spin" })
|
|
26
|
+
},
|
|
27
|
+
style: g,
|
|
28
|
+
toastOptions: {
|
|
29
|
+
unstyled: !0,
|
|
30
|
+
classNames: {
|
|
31
|
+
toast: "flex w-[384px] min-h-11 items-center gap-2 rounded-lg bg-raised-background p-3 shadow-md has-[[data-description]]:[&_[data-icon]]:hidden",
|
|
32
|
+
icon: "order-1 m-0 shrink-0 flex items-start",
|
|
33
|
+
content: "order-2 flex flex-1 basis-0 flex-col items-start gap-0.5",
|
|
34
|
+
title: "w-full self-stretch text-sm font-medium leading-[18px] tracking-normal text-foreground-fixed-light",
|
|
35
|
+
description: "w-full self-stretch text-sm font-normal leading-[18px] tracking-tight text-muted-foreground-fixed-light",
|
|
36
|
+
actionButton: "order-3 ml-auto inline-flex h-7 items-center justify-center gap-1.5 rounded-md bg-transparent px-2 text-sm font-medium leading-[18px] tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer",
|
|
37
|
+
cancelButton: "order-3 ml-auto inline-flex h-7 items-center justify-center gap-1.5 rounded-md bg-transparent px-2 text-sm font-medium leading-[18px] tracking-normal text-foreground-fixed-light transition-all hover:cursor-pointer",
|
|
38
|
+
closeButton: "order-4 inline-flex size-7 items-center justify-center rounded-md text-foreground-fixed-light transition-all hover:cursor-pointer hover:text-foreground-fixed-light hover:!bg-transparent"
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
...n
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
export {
|
|
46
|
+
p as Toaster,
|
|
47
|
+
k as toast
|
|
48
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const t = {
|
|
2
|
+
name: "SonnerToast",
|
|
3
|
+
status: "draft",
|
|
4
|
+
description: "A Sonner-based toast primitive with fully custom Aura/Figma slot styling (unstyled mode), status badges for all semantic variants, and right-aligned action/cancel/close controls.",
|
|
5
|
+
llmUsage: "Mount `<Toaster />` once near app root, then call `toast(...)`, `toast.success(...)`, `toast.error(...)`, `toast.warning(...)`, or `toast.info(...)`. Use toast options for `description`, `action`, and `cancel`; use Toaster props (for example `position` and `closeButton`) to control placement and close-button visibility."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
t as SonnerToastMetadata
|
|
9
|
+
};
|