sonance-brand-mcp 1.2.5 → 1.3.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/assets/components/alert-dialog.stories.tsx +142 -0
- package/dist/assets/components/alert-dialog.tsx +142 -0
- package/dist/assets/components/aspect-ratio.stories.tsx +67 -0
- package/dist/assets/components/aspect-ratio.tsx +8 -0
- package/dist/assets/components/avatar.tsx +64 -20
- package/dist/assets/components/carousel.stories.tsx +158 -0
- package/dist/assets/components/carousel.tsx +262 -0
- package/dist/assets/components/chart.stories.tsx +376 -0
- package/dist/assets/components/chart.tsx +384 -0
- package/dist/assets/components/checkbox.tsx +12 -2
- package/dist/assets/components/code.tsx +22 -20
- package/dist/assets/components/collapsible.stories.tsx +128 -0
- package/dist/assets/components/collapsible.tsx +10 -0
- package/dist/assets/components/command.stories.tsx +183 -0
- package/dist/assets/components/command.tsx +170 -0
- package/dist/assets/components/context-menu.stories.tsx +159 -0
- package/dist/assets/components/context-menu.tsx +218 -0
- package/dist/assets/components/divider.tsx +38 -35
- package/dist/assets/components/dropdown-menu.tsx +217 -0
- package/dist/assets/components/hover-card.stories.tsx +113 -0
- package/dist/assets/components/hover-card.tsx +35 -0
- package/dist/assets/components/kbd.tsx +6 -6
- package/dist/assets/components/menubar.stories.tsx +208 -0
- package/dist/assets/components/menubar.tsx +251 -0
- package/dist/assets/components/navigation-menu.stories.tsx +237 -0
- package/dist/assets/components/navigation-menu.tsx +135 -0
- package/dist/assets/components/resizable.stories.tsx +197 -0
- package/dist/assets/components/resizable.tsx +47 -0
- package/dist/assets/components/scroll-area.stories.tsx +123 -0
- package/dist/assets/components/scroll-area.tsx +48 -0
- package/dist/assets/components/scroll-shadow.tsx +29 -7
- package/dist/assets/components/separator.tsx +32 -0
- package/dist/assets/components/sheet.tsx +141 -0
- package/dist/assets/components/sidebar.stories.tsx +351 -0
- package/dist/assets/components/sidebar.tsx +760 -0
- package/dist/assets/components/toggle-group.stories.tsx +153 -0
- package/dist/assets/components/toggle-group.tsx +61 -0
- package/dist/assets/components/toggle.stories.tsx +77 -0
- package/dist/assets/components/toggle.tsx +46 -0
- package/dist/assets/components/tooltip.tsx +23 -90
- package/dist/assets/globals.css +30 -0
- package/dist/assets/logos/40th-anniversary/Sonance_40_Logo_CMYK_BEAM_BLUE_40_AND_BEAM_DARK.png +0 -0
- package/dist/assets/logos/Sonance logo dark mode.png +0 -0
- package/dist/assets/logos/Sonance logo light mode.png +0 -0
- package/dist/assets/logos/blaze/BlazeBySonance_Logo_Lockup_2C_Light_RGB_05162025.png +0 -0
- package/dist/assets/logos/blaze/BlazeBySonance_Logo_Lockup_3C_Dark_RGB_05162025.png +0 -0
- package/dist/assets/logos/blaze/BlazeBySonance_Logo_Lockup_White_RGB_05162025.png +0 -0
- package/dist/assets/logos/iport/IPORT_Sonance_LockUp_2C_Dark_RGB.png +0 -0
- package/dist/assets/logos/iport/IPORT_Sonance_LockUp_2C_Light_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_Black_CMYK.png +0 -0
- package/dist/assets/logos/james/James_Logo_Black_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_LtGray_CMYK.png +0 -0
- package/dist/assets/logos/james/James_Logo_LtGray_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_Polished_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_Reverse_CMYK.png +0 -0
- package/dist/assets/logos/james/James_Logo_Reverse_RGB.png +0 -0
- package/dist/assets/logos/james/James_Logo_White_CMYK.png +0 -0
- package/dist/assets/logos/life-is-better/Sonance_LifeisBetter_Dark_RGB.png +0 -0
- package/dist/assets/logos/life-is-better/Sonance_LifeisBetter_Light_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_2C_Dark_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_2C_Light_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_2C_Reverse_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_Black_RGB.png +0 -0
- package/dist/assets/logos/my-sonance/My.Sonance_Logo_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_2C_Dark_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_2C_Light_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_2C_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_Black_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_Grayscale_RGB.png +0 -0
- package/dist/assets/logos/sonance/Sonance_Logo_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance-academy/SonanceAcademy_Logo_Dark_CMYK.png +0 -0
- package/dist/assets/logos/sonance-academy/SonanceAcademy_Logo_Light_CMYK.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_3C_Dark_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_3C_Light_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_3C_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_Black_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_Grayscale_RGB.png +0 -0
- package/dist/assets/logos/sonance-iport/Sonance_IPORT_LockUp_Reverse_RGB.png +0 -0
- package/dist/assets/logos/sonance-james/Sonance_James_Lockup_Dark.png +0 -0
- package/dist/assets/logos/sonance-james/Sonance_James_Lockup_Light.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_LockupStacked_Dark.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_LockupStacked_Light.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_Lockup_Dark.png +0 -0
- package/dist/assets/logos/sonance-james-iport/Sonance_James_IPORT_Lockup_Light.png +0 -0
- package/dist/assets/logos/trufig/TrufigLogo_Black.png +0 -0
- package/dist/assets/logos/trufig/TrufigLogo_Light.png +0 -0
- package/dist/assets/logos/trufig/TrufigWatermark_Black.png +0 -0
- package/dist/assets/logos/trufig/TrufigWatermark_Light.png +0 -0
- package/dist/index.js +278 -7
- package/package.json +1 -1
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Bold, Italic, Underline, AlignLeft, AlignCenter, AlignRight } from "lucide-react";
|
|
3
|
+
import { ToggleGroup, ToggleGroupItem } from "./toggle-group";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof ToggleGroup> = {
|
|
6
|
+
title: "Components/Forms/ToggleGroup",
|
|
7
|
+
component: ToggleGroup,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "centered",
|
|
10
|
+
},
|
|
11
|
+
tags: ["autodocs"],
|
|
12
|
+
argTypes: {
|
|
13
|
+
variant: {
|
|
14
|
+
control: "select",
|
|
15
|
+
options: ["default", "outline"],
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
control: "select",
|
|
19
|
+
options: ["default", "sm", "lg"],
|
|
20
|
+
},
|
|
21
|
+
type: {
|
|
22
|
+
control: "select",
|
|
23
|
+
options: ["single", "multiple"],
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export default meta;
|
|
29
|
+
type Story = StoryObj<typeof ToggleGroup>;
|
|
30
|
+
|
|
31
|
+
export const Single: Story = {
|
|
32
|
+
args: {
|
|
33
|
+
type: "single",
|
|
34
|
+
defaultValue: "center",
|
|
35
|
+
},
|
|
36
|
+
render: (args) => (
|
|
37
|
+
<ToggleGroup {...args}>
|
|
38
|
+
<ToggleGroupItem value="left" aria-label="Left aligned">
|
|
39
|
+
<AlignLeft className="h-4 w-4" />
|
|
40
|
+
</ToggleGroupItem>
|
|
41
|
+
<ToggleGroupItem value="center" aria-label="Center aligned">
|
|
42
|
+
<AlignCenter className="h-4 w-4" />
|
|
43
|
+
</ToggleGroupItem>
|
|
44
|
+
<ToggleGroupItem value="right" aria-label="Right aligned">
|
|
45
|
+
<AlignRight className="h-4 w-4" />
|
|
46
|
+
</ToggleGroupItem>
|
|
47
|
+
</ToggleGroup>
|
|
48
|
+
),
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export const Multiple: Story = {
|
|
52
|
+
args: {
|
|
53
|
+
type: "multiple",
|
|
54
|
+
defaultValue: ["bold"],
|
|
55
|
+
},
|
|
56
|
+
render: (args) => (
|
|
57
|
+
<ToggleGroup {...args}>
|
|
58
|
+
<ToggleGroupItem value="bold" aria-label="Toggle bold">
|
|
59
|
+
<Bold className="h-4 w-4" />
|
|
60
|
+
</ToggleGroupItem>
|
|
61
|
+
<ToggleGroupItem value="italic" aria-label="Toggle italic">
|
|
62
|
+
<Italic className="h-4 w-4" />
|
|
63
|
+
</ToggleGroupItem>
|
|
64
|
+
<ToggleGroupItem value="underline" aria-label="Toggle underline">
|
|
65
|
+
<Underline className="h-4 w-4" />
|
|
66
|
+
</ToggleGroupItem>
|
|
67
|
+
</ToggleGroup>
|
|
68
|
+
),
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export const Outline: Story = {
|
|
72
|
+
args: {
|
|
73
|
+
type: "single",
|
|
74
|
+
variant: "outline",
|
|
75
|
+
defaultValue: "center",
|
|
76
|
+
},
|
|
77
|
+
render: (args) => (
|
|
78
|
+
<ToggleGroup {...args}>
|
|
79
|
+
<ToggleGroupItem value="left" aria-label="Left aligned">
|
|
80
|
+
<AlignLeft className="h-4 w-4" />
|
|
81
|
+
</ToggleGroupItem>
|
|
82
|
+
<ToggleGroupItem value="center" aria-label="Center aligned">
|
|
83
|
+
<AlignCenter className="h-4 w-4" />
|
|
84
|
+
</ToggleGroupItem>
|
|
85
|
+
<ToggleGroupItem value="right" aria-label="Right aligned">
|
|
86
|
+
<AlignRight className="h-4 w-4" />
|
|
87
|
+
</ToggleGroupItem>
|
|
88
|
+
</ToggleGroup>
|
|
89
|
+
),
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const Small: Story = {
|
|
93
|
+
args: {
|
|
94
|
+
type: "multiple",
|
|
95
|
+
size: "sm",
|
|
96
|
+
},
|
|
97
|
+
render: (args) => (
|
|
98
|
+
<ToggleGroup {...args}>
|
|
99
|
+
<ToggleGroupItem value="bold" aria-label="Toggle bold">
|
|
100
|
+
<Bold className="h-4 w-4" />
|
|
101
|
+
</ToggleGroupItem>
|
|
102
|
+
<ToggleGroupItem value="italic" aria-label="Toggle italic">
|
|
103
|
+
<Italic className="h-4 w-4" />
|
|
104
|
+
</ToggleGroupItem>
|
|
105
|
+
<ToggleGroupItem value="underline" aria-label="Toggle underline">
|
|
106
|
+
<Underline className="h-4 w-4" />
|
|
107
|
+
</ToggleGroupItem>
|
|
108
|
+
</ToggleGroup>
|
|
109
|
+
),
|
|
110
|
+
};
|
|
111
|
+
|
|
112
|
+
export const Large: Story = {
|
|
113
|
+
args: {
|
|
114
|
+
type: "single",
|
|
115
|
+
size: "lg",
|
|
116
|
+
defaultValue: "left",
|
|
117
|
+
},
|
|
118
|
+
render: (args) => (
|
|
119
|
+
<ToggleGroup {...args}>
|
|
120
|
+
<ToggleGroupItem value="left" aria-label="Left aligned">
|
|
121
|
+
<AlignLeft className="h-4 w-4" />
|
|
122
|
+
</ToggleGroupItem>
|
|
123
|
+
<ToggleGroupItem value="center" aria-label="Center aligned">
|
|
124
|
+
<AlignCenter className="h-4 w-4" />
|
|
125
|
+
</ToggleGroupItem>
|
|
126
|
+
<ToggleGroupItem value="right" aria-label="Right aligned">
|
|
127
|
+
<AlignRight className="h-4 w-4" />
|
|
128
|
+
</ToggleGroupItem>
|
|
129
|
+
</ToggleGroup>
|
|
130
|
+
),
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
export const Disabled: Story = {
|
|
134
|
+
args: {
|
|
135
|
+
type: "single",
|
|
136
|
+
defaultValue: "center",
|
|
137
|
+
disabled: true,
|
|
138
|
+
},
|
|
139
|
+
render: (args) => (
|
|
140
|
+
<ToggleGroup {...args}>
|
|
141
|
+
<ToggleGroupItem value="left" aria-label="Left aligned">
|
|
142
|
+
<AlignLeft className="h-4 w-4" />
|
|
143
|
+
</ToggleGroupItem>
|
|
144
|
+
<ToggleGroupItem value="center" aria-label="Center aligned">
|
|
145
|
+
<AlignCenter className="h-4 w-4" />
|
|
146
|
+
</ToggleGroupItem>
|
|
147
|
+
<ToggleGroupItem value="right" aria-label="Right aligned">
|
|
148
|
+
<AlignRight className="h-4 w-4" />
|
|
149
|
+
</ToggleGroupItem>
|
|
150
|
+
</ToggleGroup>
|
|
151
|
+
),
|
|
152
|
+
};
|
|
153
|
+
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
|
|
5
|
+
import { type VariantProps } from "class-variance-authority";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
import { toggleVariants } from "@/components/ui/toggle";
|
|
8
|
+
|
|
9
|
+
const ToggleGroupContext = React.createContext<
|
|
10
|
+
VariantProps<typeof toggleVariants>
|
|
11
|
+
>({
|
|
12
|
+
size: "default",
|
|
13
|
+
variant: "default",
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
const ToggleGroup = React.forwardRef<
|
|
17
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Root>,
|
|
18
|
+
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> &
|
|
19
|
+
VariantProps<typeof toggleVariants>
|
|
20
|
+
>(({ className, variant, size, children, ...props }, ref) => (
|
|
21
|
+
<ToggleGroupPrimitive.Root
|
|
22
|
+
ref={ref}
|
|
23
|
+
className={cn("flex items-center justify-center gap-1", className)}
|
|
24
|
+
{...props}
|
|
25
|
+
>
|
|
26
|
+
<ToggleGroupContext.Provider value={{ variant, size }}>
|
|
27
|
+
{children}
|
|
28
|
+
</ToggleGroupContext.Provider>
|
|
29
|
+
</ToggleGroupPrimitive.Root>
|
|
30
|
+
));
|
|
31
|
+
|
|
32
|
+
ToggleGroup.displayName = ToggleGroupPrimitive.Root.displayName;
|
|
33
|
+
|
|
34
|
+
const ToggleGroupItem = React.forwardRef<
|
|
35
|
+
React.ElementRef<typeof ToggleGroupPrimitive.Item>,
|
|
36
|
+
React.ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item> &
|
|
37
|
+
VariantProps<typeof toggleVariants>
|
|
38
|
+
>(({ className, children, variant, size, ...props }, ref) => {
|
|
39
|
+
const context = React.useContext(ToggleGroupContext);
|
|
40
|
+
|
|
41
|
+
return (
|
|
42
|
+
<ToggleGroupPrimitive.Item
|
|
43
|
+
ref={ref}
|
|
44
|
+
className={cn(
|
|
45
|
+
toggleVariants({
|
|
46
|
+
variant: context.variant || variant,
|
|
47
|
+
size: context.size || size,
|
|
48
|
+
}),
|
|
49
|
+
className
|
|
50
|
+
)}
|
|
51
|
+
{...props}
|
|
52
|
+
>
|
|
53
|
+
{children}
|
|
54
|
+
</ToggleGroupPrimitive.Item>
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
ToggleGroupItem.displayName = ToggleGroupPrimitive.Item.displayName;
|
|
59
|
+
|
|
60
|
+
export { ToggleGroup, ToggleGroupItem };
|
|
61
|
+
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import { Bold, Italic, Underline } from "lucide-react";
|
|
3
|
+
import { Toggle } from "./toggle";
|
|
4
|
+
|
|
5
|
+
const meta: Meta<typeof Toggle> = {
|
|
6
|
+
title: "Components/Forms/Toggle",
|
|
7
|
+
component: Toggle,
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: "centered",
|
|
10
|
+
},
|
|
11
|
+
tags: ["autodocs"],
|
|
12
|
+
argTypes: {
|
|
13
|
+
variant: {
|
|
14
|
+
control: "select",
|
|
15
|
+
options: ["default", "outline"],
|
|
16
|
+
},
|
|
17
|
+
size: {
|
|
18
|
+
control: "select",
|
|
19
|
+
options: ["default", "sm", "lg"],
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof Toggle>;
|
|
26
|
+
|
|
27
|
+
export const Default: Story = {
|
|
28
|
+
args: {
|
|
29
|
+
"aria-label": "Toggle bold",
|
|
30
|
+
children: <Bold className="h-4 w-4" />,
|
|
31
|
+
},
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export const Outline: Story = {
|
|
35
|
+
args: {
|
|
36
|
+
variant: "outline",
|
|
37
|
+
"aria-label": "Toggle italic",
|
|
38
|
+
children: <Italic className="h-4 w-4" />,
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
|
|
42
|
+
export const WithText: Story = {
|
|
43
|
+
args: {
|
|
44
|
+
"aria-label": "Toggle italic",
|
|
45
|
+
children: (
|
|
46
|
+
<>
|
|
47
|
+
<Italic className="h-4 w-4" />
|
|
48
|
+
Italic
|
|
49
|
+
</>
|
|
50
|
+
),
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
export const Small: Story = {
|
|
55
|
+
args: {
|
|
56
|
+
size: "sm",
|
|
57
|
+
"aria-label": "Toggle bold",
|
|
58
|
+
children: <Bold className="h-4 w-4" />,
|
|
59
|
+
},
|
|
60
|
+
};
|
|
61
|
+
|
|
62
|
+
export const Large: Story = {
|
|
63
|
+
args: {
|
|
64
|
+
size: "lg",
|
|
65
|
+
"aria-label": "Toggle bold",
|
|
66
|
+
children: <Bold className="h-4 w-4" />,
|
|
67
|
+
},
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
export const Disabled: Story = {
|
|
71
|
+
args: {
|
|
72
|
+
"aria-label": "Toggle underline",
|
|
73
|
+
disabled: true,
|
|
74
|
+
children: <Underline className="h-4 w-4" />,
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import * as React from "react";
|
|
4
|
+
import * as TogglePrimitive from "@radix-ui/react-toggle";
|
|
5
|
+
import { cva, type VariantProps } from "class-variance-authority";
|
|
6
|
+
import { cn } from "@/lib/utils";
|
|
7
|
+
|
|
8
|
+
const toggleVariants = cva(
|
|
9
|
+
"inline-flex items-center justify-center gap-2 rounded-sm text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
variant: {
|
|
13
|
+
default:
|
|
14
|
+
"bg-transparent hover:bg-secondary-hover text-foreground-secondary data-[state=on]:bg-secondary-hover data-[state=on]:text-foreground",
|
|
15
|
+
outline:
|
|
16
|
+
"border border-border bg-transparent hover:bg-secondary-hover hover:text-foreground data-[state=on]:bg-primary data-[state=on]:text-primary-foreground",
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
default: "h-10 px-3 min-w-10",
|
|
20
|
+
sm: "h-8 px-2 min-w-8",
|
|
21
|
+
lg: "h-11 px-4 min-w-11",
|
|
22
|
+
},
|
|
23
|
+
},
|
|
24
|
+
defaultVariants: {
|
|
25
|
+
variant: "default",
|
|
26
|
+
size: "default",
|
|
27
|
+
},
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
const Toggle = React.forwardRef<
|
|
32
|
+
React.ElementRef<typeof TogglePrimitive.Root>,
|
|
33
|
+
React.ComponentPropsWithoutRef<typeof TogglePrimitive.Root> &
|
|
34
|
+
VariantProps<typeof toggleVariants>
|
|
35
|
+
>(({ className, variant, size, ...props }, ref) => (
|
|
36
|
+
<TogglePrimitive.Root
|
|
37
|
+
ref={ref}
|
|
38
|
+
className={cn(toggleVariants({ variant, size, className }))}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
));
|
|
42
|
+
|
|
43
|
+
Toggle.displayName = TogglePrimitive.Root.displayName;
|
|
44
|
+
|
|
45
|
+
export { Toggle, toggleVariants };
|
|
46
|
+
|
|
@@ -1,97 +1,30 @@
|
|
|
1
|
-
"use client"
|
|
1
|
+
"use client"
|
|
2
2
|
|
|
3
|
-
import
|
|
4
|
-
import
|
|
3
|
+
import * as React from "react"
|
|
4
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip"
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
import { cn } from "@/lib/utils"
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
content: React.ReactNode;
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
/** @deprecated Use `side` instead */
|
|
12
|
-
position?: TooltipPosition;
|
|
13
|
-
side?: TooltipPosition;
|
|
14
|
-
delay?: number;
|
|
15
|
-
className?: string;
|
|
16
|
-
}
|
|
8
|
+
const TooltipProvider = TooltipPrimitive.Provider
|
|
17
9
|
|
|
18
|
-
|
|
19
|
-
content,
|
|
20
|
-
children,
|
|
21
|
-
position,
|
|
22
|
-
side = "top",
|
|
23
|
-
delay = 200,
|
|
24
|
-
className,
|
|
25
|
-
}: TooltipProps) {
|
|
26
|
-
// Support both `position` (legacy) and `side` (preferred)
|
|
27
|
-
const resolvedPosition = position ?? side;
|
|
28
|
-
const [isVisible, setIsVisible] = useState(false);
|
|
29
|
-
const timeoutRef = useRef<NodeJS.Timeout | null>(null);
|
|
10
|
+
const Tooltip = TooltipPrimitive.Root
|
|
30
11
|
|
|
31
|
-
|
|
32
|
-
timeoutRef.current = setTimeout(() => {
|
|
33
|
-
setIsVisible(true);
|
|
34
|
-
}, delay);
|
|
35
|
-
};
|
|
12
|
+
const TooltipTrigger = TooltipPrimitive.Trigger
|
|
36
13
|
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
const positionClasses: Record<TooltipPosition, string> = {
|
|
53
|
-
top: "bottom-full left-1/2 -translate-x-1/2 mb-2",
|
|
54
|
-
bottom: "top-full left-1/2 -translate-x-1/2 mt-2",
|
|
55
|
-
left: "right-full top-1/2 -translate-y-1/2 mr-2",
|
|
56
|
-
right: "left-full top-1/2 -translate-y-1/2 ml-2",
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
const arrowClasses: Record<TooltipPosition, string> = {
|
|
60
|
-
top: "top-full left-1/2 -translate-x-1/2 border-t-sonance-charcoal border-x-transparent border-b-transparent",
|
|
61
|
-
bottom: "bottom-full left-1/2 -translate-x-1/2 border-b-sonance-charcoal border-x-transparent border-t-transparent",
|
|
62
|
-
left: "left-full top-1/2 -translate-y-1/2 border-l-sonance-charcoal border-y-transparent border-r-transparent",
|
|
63
|
-
right: "right-full top-1/2 -translate-y-1/2 border-r-sonance-charcoal border-y-transparent border-l-transparent",
|
|
64
|
-
};
|
|
65
|
-
|
|
66
|
-
return (
|
|
67
|
-
<div
|
|
68
|
-
className="relative inline-block"
|
|
69
|
-
onMouseEnter={showTooltip}
|
|
70
|
-
onMouseLeave={hideTooltip}
|
|
71
|
-
onFocus={showTooltip}
|
|
72
|
-
onBlur={hideTooltip}
|
|
73
|
-
>
|
|
74
|
-
{children}
|
|
75
|
-
{isVisible && (
|
|
76
|
-
<div
|
|
77
|
-
role="tooltip"
|
|
78
|
-
className={cn(
|
|
79
|
-
"absolute z-50 px-3 py-1.5 text-xs font-medium text-white bg-sonance-charcoal whitespace-nowrap",
|
|
80
|
-
"animate-in fade-in zoom-in-95 duration-150",
|
|
81
|
-
positionClasses[resolvedPosition],
|
|
82
|
-
className
|
|
83
|
-
)}
|
|
84
|
-
>
|
|
85
|
-
{content}
|
|
86
|
-
<span
|
|
87
|
-
className={cn(
|
|
88
|
-
"absolute border-4",
|
|
89
|
-
arrowClasses[resolvedPosition]
|
|
90
|
-
)}
|
|
91
|
-
/>
|
|
92
|
-
</div>
|
|
93
|
-
)}
|
|
94
|
-
</div>
|
|
95
|
-
);
|
|
96
|
-
}
|
|
14
|
+
const TooltipContent = React.forwardRef<
|
|
15
|
+
React.ElementRef<typeof TooltipPrimitive.Content>,
|
|
16
|
+
React.ComponentPropsWithoutRef<typeof TooltipPrimitive.Content>
|
|
17
|
+
>(({ className, sideOffset = 4, ...props }, ref) => (
|
|
18
|
+
<TooltipPrimitive.Content
|
|
19
|
+
ref={ref}
|
|
20
|
+
sideOffset={sideOffset}
|
|
21
|
+
className={cn(
|
|
22
|
+
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 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",
|
|
23
|
+
className
|
|
24
|
+
)}
|
|
25
|
+
{...props}
|
|
26
|
+
/>
|
|
27
|
+
))
|
|
28
|
+
TooltipContent.displayName = TooltipPrimitive.Content.displayName
|
|
97
29
|
|
|
30
|
+
export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider }
|
package/dist/assets/globals.css
CHANGED
|
@@ -121,6 +121,16 @@
|
|
|
121
121
|
--info: #1565C0;
|
|
122
122
|
--info-light: #e3f2fd;
|
|
123
123
|
|
|
124
|
+
/* Sidebar Colors - Shadcn UI */
|
|
125
|
+
--sidebar-background: #f8f9fa;
|
|
126
|
+
--sidebar-foreground: #333F48;
|
|
127
|
+
--sidebar-primary: #333F48;
|
|
128
|
+
--sidebar-primary-foreground: #FFFFFF;
|
|
129
|
+
--sidebar-accent: #f0f2f3;
|
|
130
|
+
--sidebar-accent-foreground: #333F48;
|
|
131
|
+
--sidebar-border: #D9D9D6;
|
|
132
|
+
--sidebar-ring: #00A3E1;
|
|
133
|
+
|
|
124
134
|
/* Typography Scale (clamp for responsiveness) */
|
|
125
135
|
--text-xs: clamp(0.625rem, 0.6rem + 0.125vw, 0.75rem);
|
|
126
136
|
--text-sm: clamp(0.75rem, 0.7rem + 0.25vw, 0.875rem);
|
|
@@ -231,6 +241,16 @@
|
|
|
231
241
|
--warning-light: rgba(255, 183, 77, 0.15);
|
|
232
242
|
--info: #42A5F5;
|
|
233
243
|
--info-light: rgba(66, 165, 245, 0.15);
|
|
244
|
+
|
|
245
|
+
/* Sidebar Colors - Dark Mode */
|
|
246
|
+
--sidebar-background: #1a1f24;
|
|
247
|
+
--sidebar-foreground: #FFFFFF;
|
|
248
|
+
--sidebar-primary: #FFFFFF;
|
|
249
|
+
--sidebar-primary-foreground: #333F48;
|
|
250
|
+
--sidebar-accent: #242a31;
|
|
251
|
+
--sidebar-accent-foreground: #FFFFFF;
|
|
252
|
+
--sidebar-border: #3a444c;
|
|
253
|
+
--sidebar-ring: #00A3E1;
|
|
234
254
|
}
|
|
235
255
|
|
|
236
256
|
/* System preference detection fallback */
|
|
@@ -320,6 +340,16 @@
|
|
|
320
340
|
--color-info: var(--info);
|
|
321
341
|
--color-info-light: var(--info-light);
|
|
322
342
|
|
|
343
|
+
/* Sidebar Colors */
|
|
344
|
+
--color-sidebar-background: var(--sidebar-background);
|
|
345
|
+
--color-sidebar-foreground: var(--sidebar-foreground);
|
|
346
|
+
--color-sidebar-primary: var(--sidebar-primary);
|
|
347
|
+
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
|
|
348
|
+
--color-sidebar-accent: var(--sidebar-accent);
|
|
349
|
+
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
|
|
350
|
+
--color-sidebar-border: var(--sidebar-border);
|
|
351
|
+
--color-sidebar-ring: var(--sidebar-ring);
|
|
352
|
+
|
|
323
353
|
/* Brand Colors */
|
|
324
354
|
--color-sonance-charcoal: var(--sonance-charcoal);
|
|
325
355
|
--color-sonance-blue: var(--sonance-blue);
|
package/dist/assets/logos/40th-anniversary/Sonance_40_Logo_CMYK_BEAM_BLUE_40_AND_BEAM_DARK.png
ADDED
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|