@boxcustodia/library 2.0.0-alpha.15 → 2.0.0-alpha.16
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/index.cjs.js +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.es.js +513 -511
- package/package.json +1 -1
- package/src/components/menu/menu.tsx +4 -4
- package/src/components/tag/tag.stories.tsx +8 -7
- package/src/components/tag/tag.tsx +4 -0
package/package.json
CHANGED
|
@@ -22,19 +22,19 @@ type MenuItemItem = {
|
|
|
22
22
|
type: "item";
|
|
23
23
|
label: React.ReactNode;
|
|
24
24
|
shortcut?: string;
|
|
25
|
-
} & Omit<React.ComponentProps<typeof MenuItem>, "children">;
|
|
25
|
+
} & Omit<React.ComponentProps<typeof MenuItem>, "children" | "label">;
|
|
26
26
|
|
|
27
27
|
type MenuItemCheckbox = {
|
|
28
28
|
type: "checkbox";
|
|
29
29
|
label: React.ReactNode;
|
|
30
30
|
shortcut?: string;
|
|
31
|
-
} & Omit<React.ComponentProps<typeof MenuCheckboxItem>, "children">;
|
|
31
|
+
} & Omit<React.ComponentProps<typeof MenuCheckboxItem>, "children" | "label">;
|
|
32
32
|
|
|
33
33
|
type MenuItemRadio = {
|
|
34
34
|
type: "radio";
|
|
35
35
|
label: React.ReactNode;
|
|
36
36
|
shortcut?: string;
|
|
37
|
-
} & Omit<React.ComponentProps<typeof MenuRadioItem>, "children">;
|
|
37
|
+
} & Omit<React.ComponentProps<typeof MenuRadioItem>, "children" | "label">;
|
|
38
38
|
|
|
39
39
|
type MenuItemRadioGroup = {
|
|
40
40
|
type: "radio-group";
|
|
@@ -62,7 +62,7 @@ type MenuItemSubmenu = {
|
|
|
62
62
|
type: "submenu";
|
|
63
63
|
label: React.ReactNode;
|
|
64
64
|
items: MenuItemType[];
|
|
65
|
-
} & Omit<React.ComponentProps<typeof MenuSubTrigger>, "children">;
|
|
65
|
+
} & Omit<React.ComponentProps<typeof MenuSubTrigger>, "children" | "label">;
|
|
66
66
|
|
|
67
67
|
export type MenuItemType =
|
|
68
68
|
| MenuItemItem
|
|
@@ -34,6 +34,8 @@ export const Variants: Story = {
|
|
|
34
34
|
<Tag>Default</Tag>
|
|
35
35
|
<Tag variant="secondary">Secondary</Tag>
|
|
36
36
|
<Tag variant="error">Error</Tag>
|
|
37
|
+
<Tag variant="success">Success</Tag>
|
|
38
|
+
<Tag variant="warning">Warning</Tag>
|
|
37
39
|
<Tag variant="outline">Outline</Tag>
|
|
38
40
|
<Tag variant="ghost">Ghost</Tag>
|
|
39
41
|
<Tag variant="link">Link</Tag>
|
|
@@ -182,16 +184,15 @@ export const Closable: Story = {
|
|
|
182
184
|
export const CustomColors: Story = {
|
|
183
185
|
render: () => (
|
|
184
186
|
<div className="flex flex-wrap items-center gap-2">
|
|
185
|
-
<Tag className="bg-green-50 text-green-700 dark:bg-green-800/40 dark:text-green-200">
|
|
186
|
-
<BadgeCheck />
|
|
187
|
-
Success
|
|
188
|
-
</Tag>
|
|
189
|
-
<Tag className="bg-amber-50 text-amber-700 dark:bg-amber-800/40 dark:text-amber-200">
|
|
190
|
-
Pending
|
|
191
|
-
</Tag>
|
|
192
187
|
<Tag className="bg-blue-50 text-blue-700 dark:bg-blue-800/40 dark:text-blue-200">
|
|
193
188
|
Info
|
|
194
189
|
</Tag>
|
|
190
|
+
<Tag className="bg-purple-50 text-purple-700 dark:bg-purple-800/40 dark:text-purple-200">
|
|
191
|
+
Beta
|
|
192
|
+
</Tag>
|
|
193
|
+
<Tag className="bg-fuchsia-50 text-fuchsia-700 dark:bg-fuchsia-800/40 dark:text-fuchsia-200">
|
|
194
|
+
New
|
|
195
|
+
</Tag>
|
|
195
196
|
</div>
|
|
196
197
|
),
|
|
197
198
|
};
|
|
@@ -13,6 +13,10 @@ const tagVariants = cva(
|
|
|
13
13
|
"bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
14
14
|
error:
|
|
15
15
|
"bg-error/10 text-error focus-visible:ring-error/20 dark:bg-error/20 dark:focus-visible:ring-error/40 [a]:hover:bg-error/20",
|
|
16
|
+
success:
|
|
17
|
+
"bg-success/10 text-success focus-visible:ring-success/20 dark:bg-success/20 dark:focus-visible:ring-success/40 [a]:hover:bg-success/20",
|
|
18
|
+
warning:
|
|
19
|
+
"bg-warning/10 text-warning focus-visible:ring-warning/20 dark:bg-warning/20 dark:focus-visible:ring-warning/40 [a]:hover:bg-warning/20",
|
|
16
20
|
outline:
|
|
17
21
|
"border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
18
22
|
ghost:
|