@carlonicora/nextjs-jsonapi 1.134.0 → 1.135.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/dist/{BlockNoteEditor-3IHMNBZ2.mjs → BlockNoteEditor-FAPCNKXZ.mjs} +2 -2
- package/dist/{BlockNoteEditor-2WOKHBLM.js → BlockNoteEditor-PYRHKBF3.js} +9 -9
- package/dist/{BlockNoteEditor-2WOKHBLM.js.map → BlockNoteEditor-PYRHKBF3.js.map} +1 -1
- package/dist/billing/index.js +310 -310
- package/dist/billing/index.js.map +1 -1
- package/dist/billing/index.mjs +2 -2
- package/dist/billing/index.mjs.map +1 -1
- package/dist/{chunk-LBXHYRZH.js → chunk-DNWYHP4V.js} +283 -193
- package/dist/chunk-DNWYHP4V.js.map +1 -0
- package/dist/{chunk-DV5YYI3G.mjs → chunk-EF2HVXOV.mjs} +1698 -1608
- package/dist/chunk-EF2HVXOV.mjs.map +1 -0
- package/dist/client/index.js +2 -2
- package/dist/client/index.mjs +1 -1
- package/dist/components/index.d.mts +12 -1
- package/dist/components/index.d.ts +12 -1
- package/dist/components/index.js +4 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -1
- package/dist/contexts/index.d.mts +44 -2
- package/dist/contexts/index.d.ts +44 -2
- package/dist/contexts/index.js +6 -2
- package/dist/contexts/index.js.map +1 -1
- package/dist/contexts/index.mjs +5 -1
- package/dist/features/help/index.js +31 -31
- package/dist/features/help/index.mjs +1 -1
- package/package.json +1 -1
- package/src/components/containers/RoundPageContainer.tsx +15 -5
- package/src/components/navigations/MobileNavigationBar.tsx +99 -0
- package/src/components/navigations/__tests__/MobileNavigationBar.spec.tsx +131 -0
- package/src/components/navigations/index.ts +1 -0
- package/src/contexts/MobileNavigationContext.tsx +66 -0
- package/src/contexts/index.ts +1 -0
- package/src/features/assistant/components/parts/AssistantEmptyState.tsx +1 -1
- package/src/features/billing/stripe-customer/components/forms/PaymentMethodForm.tsx +1 -1
- package/src/shadcnui/ui/__tests__/cursor-controls.test.tsx +109 -0
- package/src/shadcnui/ui/__tests__/cursor-menu-items.test.tsx +89 -0
- package/src/shadcnui/ui/button.tsx +1 -1
- package/src/shadcnui/ui/checkbox.tsx +1 -1
- package/src/shadcnui/ui/combobox.tsx +1 -1
- package/src/shadcnui/ui/command.tsx +1 -1
- package/src/shadcnui/ui/context-menu.tsx +4 -4
- package/src/shadcnui/ui/dropdown-menu.tsx +4 -4
- package/src/shadcnui/ui/label.tsx +1 -1
- package/src/shadcnui/ui/radio-group.tsx +1 -1
- package/src/shadcnui/ui/select.tsx +3 -3
- package/src/shadcnui/ui/slider.tsx +3 -2
- package/src/shadcnui/ui/switch.tsx +1 -1
- package/dist/chunk-DV5YYI3G.mjs.map +0 -1
- package/dist/chunk-LBXHYRZH.js.map +0 -1
- /package/dist/{BlockNoteEditor-3IHMNBZ2.mjs.map → BlockNoteEditor-FAPCNKXZ.mjs.map} +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
// packages/nextjs-jsonapi/src/shadcnui/ui/__tests__/cursor-controls.test.tsx
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { render, screen } from "@testing-library/react";
|
|
4
|
+
|
|
5
|
+
import { Button } from "../button";
|
|
6
|
+
import { Checkbox } from "../checkbox";
|
|
7
|
+
import { Label } from "../label";
|
|
8
|
+
import { RadioGroup, RadioGroupItem } from "../radio-group";
|
|
9
|
+
import { Slider } from "../slider";
|
|
10
|
+
import { Switch } from "../switch";
|
|
11
|
+
|
|
12
|
+
describe("cursor affordance — controls that do not render a <button>", () => {
|
|
13
|
+
it("Button carries cursor-pointer in its own class string, so it survives render={<div/>}", () => {
|
|
14
|
+
// 13 call sites use <Button render={<div/>} nativeButton={false} />, which
|
|
15
|
+
// renders a div. A `button {cursor:pointer}` CSS rule cannot reach those,
|
|
16
|
+
// so the affordance has to live in buttonVariants itself.
|
|
17
|
+
render(<Button>Save</Button>);
|
|
18
|
+
expect(screen.getByRole("button")).toHaveClass("cursor-pointer");
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
it("Checkbox renders a span (not a button) and carries cursor-pointer", () => {
|
|
22
|
+
render(<Checkbox />);
|
|
23
|
+
const checkbox = screen.getByRole("checkbox");
|
|
24
|
+
expect(checkbox.tagName).toBe("SPAN");
|
|
25
|
+
expect(checkbox).toHaveClass("cursor-pointer");
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
it("Checkbox uses data-disabled: for its disabled variants, not disabled:", () => {
|
|
29
|
+
// :disabled cannot match a <span>, so `disabled:cursor-not-allowed` and
|
|
30
|
+
// `disabled:opacity-50` were dead classes — disabled checkboxes did not dim.
|
|
31
|
+
render(<Checkbox />);
|
|
32
|
+
const checkbox = screen.getByRole("checkbox");
|
|
33
|
+
expect(checkbox).toHaveClass("data-disabled:cursor-not-allowed");
|
|
34
|
+
expect(checkbox).toHaveClass("data-disabled:opacity-50");
|
|
35
|
+
expect(checkbox.className).not.toMatch(/(^|\s)disabled:/);
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("Switch renders a span (not a button) and carries cursor-pointer", () => {
|
|
39
|
+
render(<Switch />);
|
|
40
|
+
const toggle = screen.getByRole("switch");
|
|
41
|
+
expect(toggle.tagName).toBe("SPAN");
|
|
42
|
+
expect(toggle).toHaveClass("cursor-pointer");
|
|
43
|
+
expect(toggle).toHaveClass("data-disabled:cursor-not-allowed");
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it("RadioGroupItem renders a span (not a button) and carries cursor-pointer", () => {
|
|
47
|
+
render(
|
|
48
|
+
<RadioGroup>
|
|
49
|
+
<RadioGroupItem value="one" />
|
|
50
|
+
</RadioGroup>,
|
|
51
|
+
);
|
|
52
|
+
const radio = screen.getByRole("radio");
|
|
53
|
+
expect(radio.tagName).toBe("SPAN");
|
|
54
|
+
expect(radio).toHaveClass("cursor-pointer");
|
|
55
|
+
expect(radio).toHaveClass("data-disabled:cursor-not-allowed");
|
|
56
|
+
expect(radio.className).not.toMatch(/(^|\s)disabled:/);
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
it("Slider Control is click-to-set, so it carries cursor-pointer", () => {
|
|
60
|
+
const { container } = render(<Slider defaultValue={[50]} />);
|
|
61
|
+
const control = container.querySelector('[data-slot="slider-control"]');
|
|
62
|
+
expect(control).not.toBeNull();
|
|
63
|
+
expect(control).toHaveClass("cursor-pointer");
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
it("Slider Thumb carries grab cursors", () => {
|
|
67
|
+
const { container } = render(<Slider defaultValue={[50]} />);
|
|
68
|
+
const thumb = container.querySelector('[data-slot="slider-thumb"]');
|
|
69
|
+
expect(thumb).not.toBeNull();
|
|
70
|
+
expect(thumb).toHaveClass("cursor-grab");
|
|
71
|
+
expect(thumb).toHaveClass("active:cursor-grabbing");
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
it("Button uses data-disabled: for its disabled cursor/pointer-events variants", () => {
|
|
75
|
+
// A disabled <Button render={<div/>} nativeButton={false}> is a div, so
|
|
76
|
+
// `disabled:pointer-events-none` never matched it — the div stayed
|
|
77
|
+
// hoverable and pointer-cursored while visually disabled. `data-disabled:`
|
|
78
|
+
// is set by Base UI's state-attribute mapping regardless of render mode.
|
|
79
|
+
render(<Button disabled>Save</Button>);
|
|
80
|
+
const button = screen.getByRole("button");
|
|
81
|
+
expect(button).toHaveClass("data-disabled:cursor-not-allowed");
|
|
82
|
+
expect(button).toHaveClass("data-disabled:pointer-events-none");
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
it("disabled Checkbox renders with the data-disabled attribute present", () => {
|
|
86
|
+
// Proves the selector `data-disabled:` (not `disabled:`) is the one that
|
|
87
|
+
// can actually match — the Checkbox is a <span>, which never satisfies
|
|
88
|
+
// the `:disabled` CSS pseudo-class.
|
|
89
|
+
render(<Checkbox disabled />);
|
|
90
|
+
const checkbox = screen.getByRole("checkbox");
|
|
91
|
+
expect(checkbox.tagName).toBe("SPAN");
|
|
92
|
+
expect(checkbox).toHaveAttribute("data-disabled");
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
it("Slider Thumb carries data-disabled:cursor-not-allowed and no bare disabled: variant", () => {
|
|
96
|
+
const { container } = render(<Slider defaultValue={[50]} disabled />);
|
|
97
|
+
const thumb = container.querySelector('[data-slot="slider-thumb"]');
|
|
98
|
+
expect(thumb).not.toBeNull();
|
|
99
|
+
expect(thumb).toHaveClass("data-disabled:cursor-not-allowed");
|
|
100
|
+
expect(thumb?.className).not.toMatch(/(^|\s)disabled:/);
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
it("Label carries peer-data-disabled:cursor-not-allowed and no bare peer-disabled: variant", () => {
|
|
104
|
+
render(<Label>Accept terms</Label>);
|
|
105
|
+
const label = screen.getByText("Accept terms");
|
|
106
|
+
expect(label).toHaveClass("peer-data-disabled:cursor-not-allowed");
|
|
107
|
+
expect(label.className).not.toMatch(/(^|\s)peer-disabled:/);
|
|
108
|
+
});
|
|
109
|
+
});
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
// packages/nextjs-jsonapi/src/shadcnui/ui/__tests__/cursor-menu-items.test.tsx
|
|
2
|
+
import { describe, expect, it } from "vitest";
|
|
3
|
+
import { render, screen } from "@testing-library/react";
|
|
4
|
+
|
|
5
|
+
import { Command, CommandItem, CommandList } from "../command";
|
|
6
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from "../dropdown-menu";
|
|
7
|
+
import { Select, SelectContent, SelectItem, SelectTrigger } from "../select";
|
|
8
|
+
|
|
9
|
+
describe("cursor affordance — menu and listbox items", () => {
|
|
10
|
+
it("DropdownMenuItem is a pointer, not cursor-default", () => {
|
|
11
|
+
render(
|
|
12
|
+
<DropdownMenu defaultOpen>
|
|
13
|
+
<DropdownMenuTrigger>Open</DropdownMenuTrigger>
|
|
14
|
+
<DropdownMenuContent>
|
|
15
|
+
<DropdownMenuItem>Edit</DropdownMenuItem>
|
|
16
|
+
</DropdownMenuContent>
|
|
17
|
+
</DropdownMenu>,
|
|
18
|
+
);
|
|
19
|
+
const item = screen.getByRole("menuitem");
|
|
20
|
+
expect(item).toHaveClass("cursor-pointer");
|
|
21
|
+
expect(item).not.toHaveClass("cursor-default");
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
it("SelectItem is a pointer, not cursor-default", () => {
|
|
25
|
+
render(
|
|
26
|
+
<Select defaultOpen>
|
|
27
|
+
<SelectTrigger>Pick</SelectTrigger>
|
|
28
|
+
<SelectContent>
|
|
29
|
+
<SelectItem value="a">Alpha</SelectItem>
|
|
30
|
+
</SelectContent>
|
|
31
|
+
</Select>,
|
|
32
|
+
);
|
|
33
|
+
const option = screen.getByRole("option");
|
|
34
|
+
expect(option).toHaveClass("cursor-pointer");
|
|
35
|
+
expect(option).not.toHaveClass("cursor-default");
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
it("CommandItem is a pointer, not cursor-default", () => {
|
|
39
|
+
render(
|
|
40
|
+
<Command>
|
|
41
|
+
<CommandList>
|
|
42
|
+
<CommandItem value="alpha">Alpha</CommandItem>
|
|
43
|
+
</CommandList>
|
|
44
|
+
</Command>,
|
|
45
|
+
);
|
|
46
|
+
const item = screen.getByRole("option");
|
|
47
|
+
expect(item).toHaveClass("cursor-pointer");
|
|
48
|
+
expect(item).not.toHaveClass("cursor-default");
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
it("no shadcnui primitive still ships a bare cursor-default class", async () => {
|
|
52
|
+
// Guards the sites a render test cannot cheaply reach (context-menu's
|
|
53
|
+
// right-click trigger, select's scroll arrows, submenu triggers,
|
|
54
|
+
// checkbox/radio items) and stops the class returning via a shadcn resync.
|
|
55
|
+
//
|
|
56
|
+
// Reads the ui/ directory instead of a hardcoded file list so new
|
|
57
|
+
// primitives are covered automatically. Only flags a BARE `cursor-default`
|
|
58
|
+
// token — a variant-prefixed one like `data-disabled:cursor-default` (or a
|
|
59
|
+
// future `disabled:cursor-default`) is a legitimate, intentional class
|
|
60
|
+
// (see slider.tsx's Control) and must NOT be flagged.
|
|
61
|
+
const fs = await import("node:fs/promises");
|
|
62
|
+
const path = await import("node:path");
|
|
63
|
+
const dir = path.resolve(__dirname, "..");
|
|
64
|
+
const entries = await fs.readdir(dir, { withFileTypes: true });
|
|
65
|
+
const files = entries.filter((entry) => entry.isFile() && entry.name.endsWith(".tsx")).map((entry) => entry.name);
|
|
66
|
+
|
|
67
|
+
expect(files.length).toBeGreaterThan(0);
|
|
68
|
+
|
|
69
|
+
// Matches a bare `cursor-default` token: the character immediately before
|
|
70
|
+
// it must NOT be `:` or `-` (which would mean it's part of a variant
|
|
71
|
+
// prefix like `data-disabled:cursor-default`). Start-of-string,
|
|
72
|
+
// whitespace, and quote characters preceding it all count as bare.
|
|
73
|
+
const bareCursorDefault = /(?<![:-])cursor-default/;
|
|
74
|
+
|
|
75
|
+
for (const file of files) {
|
|
76
|
+
const source = await fs.readFile(path.join(dir, file), "utf8");
|
|
77
|
+
expect(source, `${file} must not contain a bare cursor-default class`).not.toMatch(bareCursorDefault);
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
it("bare-cursor-default regex catches an unprefixed token and ignores a variant-prefixed one", () => {
|
|
82
|
+
const bareCursorDefault = /(?<![:-])cursor-default/;
|
|
83
|
+
|
|
84
|
+
expect("flex cursor-default items-center").toMatch(bareCursorDefault);
|
|
85
|
+
expect('"cursor-default"').toMatch(bareCursorDefault);
|
|
86
|
+
expect("data-disabled:cursor-default").not.toMatch(bareCursorDefault);
|
|
87
|
+
expect("disabled:cursor-default").not.toMatch(bareCursorDefault);
|
|
88
|
+
});
|
|
89
|
+
});
|
|
@@ -4,7 +4,7 @@ import { cva, type VariantProps } from "class-variance-authority";
|
|
|
4
4
|
import { cn } from "@/lib/utils";
|
|
5
5
|
|
|
6
6
|
const buttonVariants = cva(
|
|
7
|
-
"focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",
|
|
7
|
+
"focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-md border border-transparent bg-clip-padding text-xs/relaxed font-medium focus-visible:ring-[2px] aria-invalid:ring-[2px] [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 data-disabled:cursor-not-allowed data-disabled:pointer-events-none [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none cursor-pointer",
|
|
8
8
|
{
|
|
9
9
|
variants: {
|
|
10
10
|
variant: {
|
|
@@ -10,7 +10,7 @@ function Checkbox({ className, ...props }: CheckboxPrimitive.Root.Props) {
|
|
|
10
10
|
<CheckboxPrimitive.Root
|
|
11
11
|
data-slot="checkbox"
|
|
12
12
|
className={cn(
|
|
13
|
-
"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
13
|
+
"border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-shadow group-has-disabled/field:opacity-50 focus-visible:ring-[2px] aria-invalid:ring-[2px] peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
14
14
|
className,
|
|
15
15
|
)}
|
|
16
16
|
{...props}
|
|
@@ -124,7 +124,7 @@ function ComboboxItem({ className, children, ...props }: ComboboxPrimitive.Item.
|
|
|
124
124
|
<ComboboxPrimitive.Item
|
|
125
125
|
data-slot="combobox-item"
|
|
126
126
|
className={cn(
|
|
127
|
-
"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 relative flex w-full cursor-
|
|
127
|
+
"data-highlighted:bg-accent data-highlighted:text-accent-foreground not-data-[variant=destructive]:data-highlighted:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 relative flex w-full cursor-pointer items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
128
128
|
className,
|
|
129
129
|
)}
|
|
130
130
|
{...props}
|
|
@@ -116,7 +116,7 @@ function CommandItem({ className, children, ...props }: React.ComponentProps<typ
|
|
|
116
116
|
<CommandPrimitive.Item
|
|
117
117
|
data-slot="command-item"
|
|
118
118
|
className={cn(
|
|
119
|
-
"data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex min-h-7 cursor-
|
|
119
|
+
"data-[selected=true]:bg-muted data-[selected=true]:text-foreground data-[selected=true]:*:[svg]:text-foreground relative flex min-h-7 cursor-pointer items-center gap-2 rounded-md px-2.5 py-1.5 text-xs/relaxed outline-hidden select-none [&_svg:not([class*='size-'])]:size-3.5 [[data-slot=dialog-content]_&]:rounded-md group/command-item data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
120
120
|
className,
|
|
121
121
|
)}
|
|
122
122
|
{...props}
|
|
@@ -93,7 +93,7 @@ function ContextMenuItem({
|
|
|
93
93
|
data-inset={inset}
|
|
94
94
|
data-variant={variant}
|
|
95
95
|
className={cn(
|
|
96
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-
|
|
96
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/context-menu-item relative flex cursor-pointer items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
97
97
|
className,
|
|
98
98
|
)}
|
|
99
99
|
{...props}
|
|
@@ -118,7 +118,7 @@ function ContextMenuSubTrigger({
|
|
|
118
118
|
data-slot="context-menu-sub-trigger"
|
|
119
119
|
data-inset={inset}
|
|
120
120
|
className={cn(
|
|
121
|
-
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 flex cursor-
|
|
121
|
+
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 flex cursor-pointer items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
122
122
|
className,
|
|
123
123
|
)}
|
|
124
124
|
{...props}
|
|
@@ -138,7 +138,7 @@ function ContextMenuCheckboxItem({ className, children, checked, ...props }: Con
|
|
|
138
138
|
<ContextMenuPrimitive.CheckboxItem
|
|
139
139
|
data-slot="context-menu-checkbox-item"
|
|
140
140
|
className={cn(
|
|
141
|
-
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-
|
|
141
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-pointer items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
142
142
|
className,
|
|
143
143
|
)}
|
|
144
144
|
checked={checked}
|
|
@@ -163,7 +163,7 @@ function ContextMenuRadioItem({ className, children, ...props }: ContextMenuPrim
|
|
|
163
163
|
<ContextMenuPrimitive.RadioItem
|
|
164
164
|
data-slot="context-menu-radio-item"
|
|
165
165
|
className={cn(
|
|
166
|
-
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-
|
|
166
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-pointer items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
167
167
|
className,
|
|
168
168
|
)}
|
|
169
169
|
{...props}
|
|
@@ -84,7 +84,7 @@ function DropdownMenuItem({
|
|
|
84
84
|
data-inset={inset}
|
|
85
85
|
data-variant={variant}
|
|
86
86
|
className={cn(
|
|
87
|
-
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/dropdown-menu-item relative flex cursor-
|
|
87
|
+
"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 group/dropdown-menu-item relative flex cursor-pointer items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
88
88
|
className,
|
|
89
89
|
)}
|
|
90
90
|
{...props}
|
|
@@ -109,7 +109,7 @@ function DropdownMenuSubTrigger({
|
|
|
109
109
|
data-slot="dropdown-menu-sub-trigger"
|
|
110
110
|
data-inset={inset}
|
|
111
111
|
className={cn(
|
|
112
|
-
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 flex cursor-
|
|
112
|
+
"focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs [&_svg:not([class*='size-'])]:size-3.5 flex cursor-pointer items-center outline-hidden select-none data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
113
113
|
className,
|
|
114
114
|
)}
|
|
115
115
|
{...props}
|
|
@@ -149,7 +149,7 @@ function DropdownMenuCheckboxItem({ className, children, checked, ...props }: Me
|
|
|
149
149
|
<MenuPrimitive.CheckboxItem
|
|
150
150
|
data-slot="dropdown-menu-checkbox-item"
|
|
151
151
|
className={cn(
|
|
152
|
-
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-
|
|
152
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-pointer items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
153
153
|
className,
|
|
154
154
|
)}
|
|
155
155
|
checked={checked}
|
|
@@ -177,7 +177,7 @@ function DropdownMenuRadioItem({ className, children, ...props }: MenuPrimitive.
|
|
|
177
177
|
<MenuPrimitive.RadioItem
|
|
178
178
|
data-slot="dropdown-menu-radio-item"
|
|
179
179
|
className={cn(
|
|
180
|
-
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-
|
|
180
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground min-h-7 gap-2 rounded-md py-1.5 pr-8 pl-2 text-xs [&_svg:not([class*='size-'])]:size-3.5 relative flex cursor-pointer items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
181
181
|
className,
|
|
182
182
|
)}
|
|
183
183
|
{...props}
|
|
@@ -9,7 +9,7 @@ function Label({ className, ...props }: React.ComponentProps<"label">) {
|
|
|
9
9
|
<label
|
|
10
10
|
data-slot="label"
|
|
11
11
|
className={cn(
|
|
12
|
-
"gap-2 text-xs/relaxed leading-none font-medium group-data-[disabled=true]:opacity-50 peer-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-disabled:cursor-not-allowed",
|
|
12
|
+
"gap-2 text-xs/relaxed leading-none font-medium group-data-[disabled=true]:opacity-50 peer-data-disabled:opacity-50 flex items-center select-none group-data-[disabled=true]:pointer-events-none peer-data-disabled:cursor-not-allowed",
|
|
13
13
|
className,
|
|
14
14
|
)}
|
|
15
15
|
{...props}
|
|
@@ -15,7 +15,7 @@ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
|
15
15
|
<RadioPrimitive.Root
|
|
16
16
|
data-slot="radio-group-item"
|
|
17
17
|
className={cn(
|
|
18
|
-
"border-input text-primary dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-checked:bg-primary data-checked:border-primary flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
18
|
+
"border-input text-primary dark:bg-input/30 focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 data-checked:bg-primary data-checked:border-primary flex size-4 rounded-full transition-none focus-visible:ring-[2px] aria-invalid:ring-[2px] group/radio-group-item peer relative aspect-square shrink-0 border outline-none after:absolute after:-inset-x-3 after:-inset-y-2 cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
19
19
|
className,
|
|
20
20
|
)}
|
|
21
21
|
{...props}
|
|
@@ -97,7 +97,7 @@ function SelectItem({ className, children, ...props }: SelectPrimitive.Item.Prop
|
|
|
97
97
|
<SelectPrimitive.Item
|
|
98
98
|
data-slot="select-item"
|
|
99
99
|
className={cn(
|
|
100
|
-
"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-
|
|
100
|
+
"focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground min-h-7 gap-2 rounded-md px-2 py-1 text-xs/relaxed [&_svg:not([class*='size-'])]:size-3.5 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-pointer items-center outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
101
101
|
className,
|
|
102
102
|
)}
|
|
103
103
|
{...props}
|
|
@@ -129,7 +129,7 @@ function SelectScrollUpButton({ className, ...props }: React.ComponentProps<type
|
|
|
129
129
|
<SelectPrimitive.ScrollUpArrow
|
|
130
130
|
data-slot="select-scroll-up-button"
|
|
131
131
|
className={cn(
|
|
132
|
-
"bg-popover z-10 flex cursor-
|
|
132
|
+
"bg-popover z-10 flex cursor-pointer items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 top-0 w-full",
|
|
133
133
|
className,
|
|
134
134
|
)}
|
|
135
135
|
{...props}
|
|
@@ -144,7 +144,7 @@ function SelectScrollDownButton({ className, ...props }: React.ComponentProps<ty
|
|
|
144
144
|
<SelectPrimitive.ScrollDownArrow
|
|
145
145
|
data-slot="select-scroll-down-button"
|
|
146
146
|
className={cn(
|
|
147
|
-
"bg-popover z-10 flex cursor-
|
|
147
|
+
"bg-popover z-10 flex cursor-pointer items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-3.5 bottom-0 w-full",
|
|
148
148
|
className,
|
|
149
149
|
)}
|
|
150
150
|
{...props}
|
|
@@ -23,8 +23,9 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
|
|
|
23
23
|
{...props}
|
|
24
24
|
>
|
|
25
25
|
<SliderPrimitive.Control
|
|
26
|
+
data-slot="slider-control"
|
|
26
27
|
className={cn(
|
|
27
|
-
"data-vertical:min-h-40 relative flex w-full touch-none items-center select-none data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col",
|
|
28
|
+
"data-vertical:min-h-40 relative flex w-full touch-none items-center select-none cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50 data-vertical:h-full data-vertical:w-auto data-vertical:flex-col",
|
|
28
29
|
className,
|
|
29
30
|
)}
|
|
30
31
|
>
|
|
@@ -41,7 +42,7 @@ function Slider({ className, defaultValue, value, min = 0, max = 100, ...props }
|
|
|
41
42
|
<SliderPrimitive.Thumb
|
|
42
43
|
data-slot="slider-thumb"
|
|
43
44
|
key={index}
|
|
44
|
-
className="border-primary ring-ring/30 size-4 rounded-md border bg-white shadow-sm transition-colors hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden block shrink-0 select-none disabled:pointer-events-none disabled:opacity-50"
|
|
45
|
+
className="border-primary ring-ring/30 size-4 rounded-md border bg-white shadow-sm transition-colors hover:ring-4 focus-visible:ring-4 focus-visible:outline-hidden block shrink-0 select-none cursor-grab active:cursor-grabbing data-disabled:cursor-not-allowed data-disabled:pointer-events-none data-disabled:opacity-50"
|
|
45
46
|
/>
|
|
46
47
|
))}
|
|
47
48
|
</SliderPrimitive.Control>
|
|
@@ -17,7 +17,7 @@ function Switch({
|
|
|
17
17
|
data-slot="switch"
|
|
18
18
|
data-size={size}
|
|
19
19
|
className={cn(
|
|
20
|
-
"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-[16.6px] data-[size=default]:w-[28px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
20
|
+
"data-checked:bg-primary data-unchecked:bg-input focus-visible:border-ring focus-visible:ring-ring/30 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 dark:data-unchecked:bg-input/80 shrink-0 rounded-full border border-transparent focus-visible:ring-[2px] aria-invalid:ring-[2px] data-[size=default]:h-[16.6px] data-[size=default]:w-[28px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] peer group/switch relative inline-flex items-center transition-all outline-none after:absolute after:-inset-x-3 after:-inset-y-2 cursor-pointer data-disabled:cursor-not-allowed data-disabled:opacity-50",
|
|
21
21
|
className,
|
|
22
22
|
)}
|
|
23
23
|
{...props}
|