@_linked/primitives 1.0.5
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/.changeset/README.md +20 -0
- package/.changeset/config.json +14 -0
- package/.github/workflows/changeset-check.yml +44 -0
- package/.github/workflows/ci.yml +30 -0
- package/.github/workflows/publish.yml +42 -0
- package/CHANGELOG.md +7 -0
- package/lib/cjs/backend.d.ts +0 -0
- package/lib/cjs/components/Accordion.d.ts +13 -0
- package/lib/cjs/components/Accordion.module.css +101 -0
- package/lib/cjs/components/AlertDialog.d.ts +37 -0
- package/lib/cjs/components/AlertDialog.module.css +80 -0
- package/lib/cjs/components/AspectRatio.d.ts +7 -0
- package/lib/cjs/components/AspectRatio.module.css +28 -0
- package/lib/cjs/components/Avatar.d.ts +11 -0
- package/lib/cjs/components/Avatar.module.css +43 -0
- package/lib/cjs/components/Breadcrumb.d.ts +41 -0
- package/lib/cjs/components/Breadcrumb.module.css +78 -0
- package/lib/cjs/components/Button.d.ts +9 -0
- package/lib/cjs/components/Button.module.css +246 -0
- package/lib/cjs/components/Checkbox.d.ts +4 -0
- package/lib/cjs/components/Checkbox.module.css +43 -0
- package/lib/cjs/components/Collapsible.d.ts +11 -0
- package/lib/cjs/components/Command.d.ts +167 -0
- package/lib/cjs/components/Command.module.css +153 -0
- package/lib/cjs/components/ContextMenu.d.ts +51 -0
- package/lib/cjs/components/ContextMenu.module.css +238 -0
- package/lib/cjs/components/Dialog.d.ts +38 -0
- package/lib/cjs/components/Dialog.module.css +109 -0
- package/lib/cjs/components/Drawer.d.ts +40 -0
- package/lib/cjs/components/Drawer.module.css +87 -0
- package/lib/cjs/components/DropdownMenu.d.ts +52 -0
- package/lib/cjs/components/DropdownMenu.module.css +244 -0
- package/lib/cjs/components/Form.d.ts +23 -0
- package/lib/cjs/components/Form.module.css +75 -0
- package/lib/cjs/components/Heading.d.ts +7 -0
- package/lib/cjs/components/Heading.module.css +83 -0
- package/lib/cjs/components/HoverCard.d.ts +15 -0
- package/lib/cjs/components/HoverCard.module.css +75 -0
- package/lib/cjs/components/IconButton.d.ts +9 -0
- package/lib/cjs/components/IconButton.module.css +150 -0
- package/lib/cjs/components/Input.d.ts +6 -0
- package/lib/cjs/components/Input.module.css +61 -0
- package/lib/cjs/components/Label.d.ts +4 -0
- package/lib/cjs/components/Label.module.css +7 -0
- package/lib/cjs/components/Menubar.d.ts +65 -0
- package/lib/cjs/components/Menubar.module.css +128 -0
- package/lib/cjs/components/MultiSelect.d.ts +86 -0
- package/lib/cjs/components/MultiSelect.module.css +93 -0
- package/lib/cjs/components/NavigationMenu.d.ts +21 -0
- package/lib/cjs/components/NavigationMenu.module.css +248 -0
- package/lib/cjs/components/Popover.d.ts +17 -0
- package/lib/cjs/components/Popover.module.css +106 -0
- package/lib/cjs/components/Progress.d.ts +9 -0
- package/lib/cjs/components/Progress.module.css +23 -0
- package/lib/cjs/components/RadioGroup.d.ts +9 -0
- package/lib/cjs/components/RadioGroup.module.css +57 -0
- package/lib/cjs/components/ScrollArea.d.ts +9 -0
- package/lib/cjs/components/ScrollArea.module.css +55 -0
- package/lib/cjs/components/Select.d.ts +28 -0
- package/lib/cjs/components/Select.module.css +153 -0
- package/lib/cjs/components/Separator.d.ts +4 -0
- package/lib/cjs/components/Separator.module.css +13 -0
- package/lib/cjs/components/Slider.d.ts +13 -0
- package/lib/cjs/components/Slider.module.css +43 -0
- package/lib/cjs/components/Spinner.d.ts +4 -0
- package/lib/cjs/components/Spinner.module.css +21 -0
- package/lib/cjs/components/Switch.d.ts +4 -0
- package/lib/cjs/components/Switch.module.css +52 -0
- package/lib/cjs/components/Tabs.d.ts +13 -0
- package/lib/cjs/components/Tabs.module.css +64 -0
- package/lib/cjs/components/Text.d.ts +8 -0
- package/lib/cjs/components/Text.module.css +24 -0
- package/lib/cjs/components/Textarea.d.ts +5 -0
- package/lib/cjs/components/Textarea.module.css +34 -0
- package/lib/cjs/components/Toast.d.ts +21 -0
- package/lib/cjs/components/Toast.module.css +133 -0
- package/lib/cjs/components/Toaster.d.ts +2 -0
- package/lib/cjs/components/Toggle.d.ts +7 -0
- package/lib/cjs/components/Toggle.module.css +32 -0
- package/lib/cjs/components/ToggleGroup.d.ts +9 -0
- package/lib/cjs/components/ToggleGroup.module.css +61 -0
- package/lib/cjs/components/Toolbar.d.ts +17 -0
- package/lib/cjs/components/Toolbar.module.css +113 -0
- package/lib/cjs/components/Tooltip.d.ts +15 -0
- package/lib/cjs/components/Tooltip.module.css +78 -0
- package/lib/cjs/components/Typography.d.ts +8 -0
- package/lib/cjs/components/Typography.module.css +25 -0
- package/lib/cjs/components/VisuallyHidden.d.ts +4 -0
- package/lib/cjs/components/helpers/mixins.css +15 -0
- package/lib/cjs/data/primitives.json +10 -0
- package/lib/cjs/hooks/use-toast.d.ts +44 -0
- package/lib/cjs/index.d.ts +45 -0
- package/lib/cjs/ontologies/primitives.d.ts +6 -0
- package/lib/cjs/package.d.ts +3 -0
- package/lib/cjs/package.json +85 -0
- package/lib/cjs/theme.css +3 -0
- package/lib/cjs/types.d.ts +12 -0
- package/lib/esm/backend.d.ts +0 -0
- package/lib/esm/components/Accordion.d.ts +13 -0
- package/lib/esm/components/Accordion.module.css +101 -0
- package/lib/esm/components/AlertDialog.d.ts +37 -0
- package/lib/esm/components/AlertDialog.module.css +80 -0
- package/lib/esm/components/AspectRatio.d.ts +7 -0
- package/lib/esm/components/AspectRatio.module.css +28 -0
- package/lib/esm/components/Avatar.d.ts +11 -0
- package/lib/esm/components/Avatar.module.css +43 -0
- package/lib/esm/components/Breadcrumb.d.ts +41 -0
- package/lib/esm/components/Breadcrumb.module.css +78 -0
- package/lib/esm/components/Button.d.ts +9 -0
- package/lib/esm/components/Button.module.css +246 -0
- package/lib/esm/components/Checkbox.d.ts +4 -0
- package/lib/esm/components/Checkbox.module.css +43 -0
- package/lib/esm/components/Collapsible.d.ts +11 -0
- package/lib/esm/components/Command.d.ts +167 -0
- package/lib/esm/components/Command.module.css +153 -0
- package/lib/esm/components/ContextMenu.d.ts +51 -0
- package/lib/esm/components/ContextMenu.module.css +238 -0
- package/lib/esm/components/Dialog.d.ts +38 -0
- package/lib/esm/components/Dialog.module.css +109 -0
- package/lib/esm/components/Drawer.d.ts +40 -0
- package/lib/esm/components/Drawer.module.css +87 -0
- package/lib/esm/components/DropdownMenu.d.ts +52 -0
- package/lib/esm/components/DropdownMenu.module.css +244 -0
- package/lib/esm/components/Form.d.ts +23 -0
- package/lib/esm/components/Form.module.css +75 -0
- package/lib/esm/components/Heading.d.ts +7 -0
- package/lib/esm/components/Heading.module.css +83 -0
- package/lib/esm/components/HoverCard.d.ts +15 -0
- package/lib/esm/components/HoverCard.module.css +75 -0
- package/lib/esm/components/IconButton.d.ts +9 -0
- package/lib/esm/components/IconButton.module.css +150 -0
- package/lib/esm/components/Input.d.ts +6 -0
- package/lib/esm/components/Input.module.css +61 -0
- package/lib/esm/components/Label.d.ts +4 -0
- package/lib/esm/components/Label.module.css +7 -0
- package/lib/esm/components/Menubar.d.ts +65 -0
- package/lib/esm/components/Menubar.module.css +128 -0
- package/lib/esm/components/MultiSelect.d.ts +86 -0
- package/lib/esm/components/MultiSelect.module.css +93 -0
- package/lib/esm/components/NavigationMenu.d.ts +21 -0
- package/lib/esm/components/NavigationMenu.module.css +248 -0
- package/lib/esm/components/Popover.d.ts +17 -0
- package/lib/esm/components/Popover.module.css +106 -0
- package/lib/esm/components/Progress.d.ts +9 -0
- package/lib/esm/components/Progress.module.css +23 -0
- package/lib/esm/components/RadioGroup.d.ts +9 -0
- package/lib/esm/components/RadioGroup.module.css +57 -0
- package/lib/esm/components/ScrollArea.d.ts +9 -0
- package/lib/esm/components/ScrollArea.module.css +55 -0
- package/lib/esm/components/Select.d.ts +28 -0
- package/lib/esm/components/Select.module.css +153 -0
- package/lib/esm/components/Separator.d.ts +4 -0
- package/lib/esm/components/Separator.module.css +13 -0
- package/lib/esm/components/Slider.d.ts +13 -0
- package/lib/esm/components/Slider.module.css +43 -0
- package/lib/esm/components/Spinner.d.ts +4 -0
- package/lib/esm/components/Spinner.module.css +21 -0
- package/lib/esm/components/Switch.d.ts +4 -0
- package/lib/esm/components/Switch.module.css +52 -0
- package/lib/esm/components/Tabs.d.ts +13 -0
- package/lib/esm/components/Tabs.module.css +64 -0
- package/lib/esm/components/Text.d.ts +8 -0
- package/lib/esm/components/Text.module.css +24 -0
- package/lib/esm/components/Textarea.d.ts +5 -0
- package/lib/esm/components/Textarea.module.css +34 -0
- package/lib/esm/components/Toast.d.ts +21 -0
- package/lib/esm/components/Toast.module.css +133 -0
- package/lib/esm/components/Toaster.d.ts +2 -0
- package/lib/esm/components/Toggle.d.ts +7 -0
- package/lib/esm/components/Toggle.module.css +32 -0
- package/lib/esm/components/ToggleGroup.d.ts +9 -0
- package/lib/esm/components/ToggleGroup.module.css +61 -0
- package/lib/esm/components/Toolbar.d.ts +17 -0
- package/lib/esm/components/Toolbar.module.css +113 -0
- package/lib/esm/components/Tooltip.d.ts +15 -0
- package/lib/esm/components/Tooltip.module.css +78 -0
- package/lib/esm/components/Typography.d.ts +8 -0
- package/lib/esm/components/Typography.module.css +25 -0
- package/lib/esm/components/VisuallyHidden.d.ts +4 -0
- package/lib/esm/components/helpers/mixins.css +15 -0
- package/lib/esm/data/primitives.json +10 -0
- package/lib/esm/hooks/use-toast.d.ts +44 -0
- package/lib/esm/index.d.ts +45 -0
- package/lib/esm/ontologies/primitives.d.ts +6 -0
- package/lib/esm/package.d.ts +3 -0
- package/lib/esm/package.json +85 -0
- package/lib/esm/theme.css +3 -0
- package/lib/esm/types.d.ts +12 -0
- package/package.json +103 -0
- package/tsconfig-cjs.json +8 -0
- package/tsconfig-esm.json +9 -0
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
h1 {
|
|
2
|
+
&.Root {
|
|
3
|
+
font-size: var(--heading-1-font-size);
|
|
4
|
+
font-family: var(--heading-1-font-family);
|
|
5
|
+
font-weight: var(--heading-1-font-weight);
|
|
6
|
+
line-height: var(--heading-1-line-height);
|
|
7
|
+
letter-spacing: var(--heading-1-letter-spacing);
|
|
8
|
+
color: var(--heading-1-color);
|
|
9
|
+
font-style: var(--heading-1-font-style);
|
|
10
|
+
margin-top: var(--heading-1-margin-top);
|
|
11
|
+
margin-bottom: var(--heading-1-margin-bottom);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
h2 {
|
|
16
|
+
&.Root {
|
|
17
|
+
font-size: var(--heading-2-font-size);
|
|
18
|
+
font-family: var(--heading-2-font-family);
|
|
19
|
+
font-weight: var(--heading-2-font-weight);
|
|
20
|
+
line-height: var(--heading-2-line-height);
|
|
21
|
+
letter-spacing: var(--heading-2-letter-spacing);
|
|
22
|
+
color: var(--heading-2-color);
|
|
23
|
+
font-style: var(--heading-2-font-style);
|
|
24
|
+
margin-top: var(--heading-2-margin-top);
|
|
25
|
+
margin-bottom: var(--heading-2-margin-bottom);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
h3 {
|
|
30
|
+
&.Root {
|
|
31
|
+
font-size: var(--heading-3-font-size);
|
|
32
|
+
font-family: var(--heading-3-font-family);
|
|
33
|
+
font-weight: var(--heading-3-font-weight);
|
|
34
|
+
line-height: var(--heading-3-line-height);
|
|
35
|
+
letter-spacing: var(--heading-3-letter-spacing);
|
|
36
|
+
color: var(--heading-3-color);
|
|
37
|
+
font-style: var(--heading-3-font-style);
|
|
38
|
+
margin-top: var(--heading-3-margin-top);
|
|
39
|
+
margin-bottom: var(--heading-3-margin-bottom);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
h4 {
|
|
44
|
+
&.Root {
|
|
45
|
+
font-size: var(--heading-4-font-size);
|
|
46
|
+
font-family: var(--heading-4-font-family);
|
|
47
|
+
font-weight: var(--heading-4-font-weight);
|
|
48
|
+
line-height: var(--heading-4-line-height);
|
|
49
|
+
letter-spacing: var(--heading-4-letter-spacing);
|
|
50
|
+
color: var(--heading-4-color);
|
|
51
|
+
font-style: var(--heading-4-font-style);
|
|
52
|
+
margin-top: var(--heading-4-margin-top);
|
|
53
|
+
margin-bottom: var(--heading-4-margin-bottom);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
h5 {
|
|
58
|
+
&.Root {
|
|
59
|
+
font-size: var(--heading-5-font-size);
|
|
60
|
+
font-family: var(--heading-5-font-family);
|
|
61
|
+
font-weight: var(--heading-5-font-weight);
|
|
62
|
+
line-height: var(--heading-5-line-height);
|
|
63
|
+
letter-spacing: var(--heading-5-letter-spacing);
|
|
64
|
+
color: var(--heading-5-color);
|
|
65
|
+
font-style: var(--heading-5-font-style);
|
|
66
|
+
margin-top: var(--heading-5-margin-top);
|
|
67
|
+
margin-bottom: var(--heading-5-margin-bottom);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
h6 {
|
|
72
|
+
&.Root {
|
|
73
|
+
font-size: var(--heading-6-font-size);
|
|
74
|
+
font-family: var(--heading-6-font-family);
|
|
75
|
+
font-weight: var(--heading-6-font-weight);
|
|
76
|
+
line-height: var(--heading-6-line-height);
|
|
77
|
+
letter-spacing: var(--heading-6-letter-spacing);
|
|
78
|
+
color: var(--heading-6-color);
|
|
79
|
+
font-style: var(--heading-6-font-style);
|
|
80
|
+
margin-top: var(--heading-6-margin-top);
|
|
81
|
+
margin-bottom: var(--heading-6-margin-bottom);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as HoverCardPrimitive from '@radix-ui/react-hover-card';
|
|
3
|
+
declare const Root: React.FC<HoverCardPrimitive.HoverCardProps>;
|
|
4
|
+
declare const Trigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
|
+
declare const Portal: React.FC<HoverCardPrimitive.HoverCardPortalProps>;
|
|
6
|
+
declare const Arrow: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
7
|
+
declare const Content: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
export declare const HoverCard: {
|
|
9
|
+
Root: React.FC<HoverCardPrimitive.HoverCardProps>;
|
|
10
|
+
Trigger: React.ForwardRefExoticComponent<HoverCardPrimitive.HoverCardTriggerProps & React.RefAttributes<HTMLAnchorElement>>;
|
|
11
|
+
Portal: React.FC<HoverCardPrimitive.HoverCardPortalProps>;
|
|
12
|
+
Content: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Arrow: React.ForwardRefExoticComponent<Omit<HoverCardPrimitive.HoverCardArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
14
|
+
};
|
|
15
|
+
export { Root, Trigger, Portal, Content, Arrow };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Content {
|
|
5
|
+
font-family: inherit;
|
|
6
|
+
border-radius: var(--hovercard-radius, var(--popover-radius));
|
|
7
|
+
padding: var(--hovercard-padding, var(--popover-padding));
|
|
8
|
+
width: var(--hovercard-width, 20rem);
|
|
9
|
+
background-color: var(--hovercard-bg, var(--popover-bg));
|
|
10
|
+
box-shadow: var(--hovercard-shadow, var(--popover-shadow));
|
|
11
|
+
animation-duration: var(--transition-duration-normal);
|
|
12
|
+
animation-timing-function: var(--transition-easing);
|
|
13
|
+
will-change: transform, opacity;
|
|
14
|
+
|
|
15
|
+
&[data-side='top'] {
|
|
16
|
+
animation-name: slideDownAndFade;
|
|
17
|
+
}
|
|
18
|
+
&[data-side='right'] {
|
|
19
|
+
animation-name: slideLeftAndFade;
|
|
20
|
+
}
|
|
21
|
+
&[data-side='bottom'] {
|
|
22
|
+
animation-name: slideUpAndFade;
|
|
23
|
+
}
|
|
24
|
+
&[data-side='left'] {
|
|
25
|
+
animation-name: slideRightAndFade;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.Arrow {
|
|
30
|
+
fill: var(--hovercard-bg, var(--popover-bg));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
@keyframes slideUpAndFade {
|
|
34
|
+
0% {
|
|
35
|
+
opacity: 0;
|
|
36
|
+
transform: translateY(2px);
|
|
37
|
+
}
|
|
38
|
+
100% {
|
|
39
|
+
opacity: 1;
|
|
40
|
+
transform: translateY(0);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@keyframes slideRightAndFade {
|
|
45
|
+
0% {
|
|
46
|
+
opacity: 0;
|
|
47
|
+
transform: translateX(-2px);
|
|
48
|
+
}
|
|
49
|
+
100% {
|
|
50
|
+
opacity: 1;
|
|
51
|
+
transform: translateX(0);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
@keyframes slideDownAndFade {
|
|
56
|
+
0% {
|
|
57
|
+
opacity: 0;
|
|
58
|
+
transform: translateY(-2px);
|
|
59
|
+
}
|
|
60
|
+
100% {
|
|
61
|
+
opacity: 1;
|
|
62
|
+
transform: translateY(0);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
@keyframes slideLeftAndFade {
|
|
67
|
+
0% {
|
|
68
|
+
opacity: 0;
|
|
69
|
+
transform: translateX(2px);
|
|
70
|
+
}
|
|
71
|
+
100% {
|
|
72
|
+
opacity: 1;
|
|
73
|
+
transform: translateX(0);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface IconButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
asChild?: boolean;
|
|
4
|
+
variant?: 'solid' | 'outline' | 'ghost';
|
|
5
|
+
color?: 'primary' | 'secondary' | 'tertiary';
|
|
6
|
+
size?: 'small' | 'medium' | 'large' | 'default';
|
|
7
|
+
}
|
|
8
|
+
declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
|
+
export { IconButton };
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
--spacing: 0.25rem;
|
|
3
|
+
}
|
|
4
|
+
@import './helpers/mixins.css';
|
|
5
|
+
|
|
6
|
+
.Root {
|
|
7
|
+
display: inline-flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
white-space: nowrap;
|
|
11
|
+
border-radius: var(--iconbutton-radius, var(--control-radius));
|
|
12
|
+
font-size: var(--iconbutton-font-size, var(--typography-small-size));
|
|
13
|
+
font-weight: var(--iconbutton-font-weight, var(--font-medium));
|
|
14
|
+
font-family: var(--iconbutton-font-family, var(--typography-font-family));
|
|
15
|
+
outline: none;
|
|
16
|
+
transition: var(--transition-fast);
|
|
17
|
+
border: solid 1px transparent;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
gap: var(--iconbutton-gap, --spacing(2));
|
|
20
|
+
|
|
21
|
+
&:focus-visible {
|
|
22
|
+
@mixin focus;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/* color: 'primary' | 'secondary' | 'tertiary'*/
|
|
26
|
+
/* variant: 'solid' | 'outline' | 'ghost'*/
|
|
27
|
+
&.primary {
|
|
28
|
+
&.solid {
|
|
29
|
+
background: var(--button-primary-bg);
|
|
30
|
+
color: var(--button-primary-color);
|
|
31
|
+
border-color: var(--button-primary-bg);
|
|
32
|
+
|
|
33
|
+
&:hover {
|
|
34
|
+
background: var(--button-primary-bg-hover);
|
|
35
|
+
color: var(--button-primary-color-hover);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&.outline {
|
|
40
|
+
background: transparent;
|
|
41
|
+
color: var(--button-primary-bg);
|
|
42
|
+
border: 1px solid var(--button-primary-bg);
|
|
43
|
+
|
|
44
|
+
&:hover {
|
|
45
|
+
background: var(--button-primary-bg);
|
|
46
|
+
color: var(--button-primary-color);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&.ghost {
|
|
51
|
+
background: transparent;
|
|
52
|
+
color: var(--button-primary-bg);
|
|
53
|
+
|
|
54
|
+
&:hover {
|
|
55
|
+
background: var(--button-primary-bg);
|
|
56
|
+
color: var(--button-primary-color);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
&.secondary {
|
|
62
|
+
&.solid {
|
|
63
|
+
background: var(--button-secondary-bg);
|
|
64
|
+
color: var(--button-secondary-color);
|
|
65
|
+
border-color: var(--button-secondary-bg);
|
|
66
|
+
|
|
67
|
+
&:hover {
|
|
68
|
+
background: var(--button-secondary-bg-hover);
|
|
69
|
+
color: var(--button-secondary-color-hover);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
&.outline {
|
|
74
|
+
background: transparent;
|
|
75
|
+
color: var(--button-secondary-bg);
|
|
76
|
+
border: 1px solid var(--button-secondary-bg);
|
|
77
|
+
|
|
78
|
+
&:hover {
|
|
79
|
+
background: var(--button-secondary-bg);
|
|
80
|
+
color: var(--button-secondary-color);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&.ghost {
|
|
85
|
+
background: transparent;
|
|
86
|
+
color: var(--button-secondary-bg);
|
|
87
|
+
|
|
88
|
+
&:hover {
|
|
89
|
+
background: var(--button-secondary-bg);
|
|
90
|
+
color: var(--button-secondary-color);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
&.tertiary {
|
|
96
|
+
&.solid {
|
|
97
|
+
background: var(--button-tertiary-bg);
|
|
98
|
+
color: var(--button-tertiary-color);
|
|
99
|
+
border-color: var(--button-tertiary-bg);
|
|
100
|
+
|
|
101
|
+
&:hover {
|
|
102
|
+
background: var(--button-tertiary-bg-hover);
|
|
103
|
+
color: var(--button-tertiary-color-hover);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&.outline {
|
|
108
|
+
background: transparent;
|
|
109
|
+
color: var(--button-tertiary-bg);
|
|
110
|
+
border: 1px solid var(--button-tertiary-bg);
|
|
111
|
+
|
|
112
|
+
&:hover {
|
|
113
|
+
background: var(--button-tertiary-bg);
|
|
114
|
+
color: var(--button-tertiary-color);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&.ghost {
|
|
119
|
+
background: transparent;
|
|
120
|
+
color: var(--button-tertiary-bg);
|
|
121
|
+
|
|
122
|
+
&:hover {
|
|
123
|
+
background: var(--button-tertiary-bg);
|
|
124
|
+
color: var(--button-tertiary-color);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/* size: 'small' | 'medium' | 'large' || 'default'*/
|
|
130
|
+
&.small {
|
|
131
|
+
height: var(--iconbutton-size-sm, var(--control-height-sm));
|
|
132
|
+
width: var(--iconbutton-size-sm, var(--control-height-sm));
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
&.medium,
|
|
136
|
+
&.default {
|
|
137
|
+
height: var(--iconbutton-size-md, var(--control-height-md));
|
|
138
|
+
width: var(--iconbutton-size-md, var(--control-height-md));
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&.large {
|
|
142
|
+
height: var(--iconbutton-size-lg, var(--control-height-lg));
|
|
143
|
+
width: var(--iconbutton-size-lg, var(--control-height-lg));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
/* disabled*/
|
|
147
|
+
&.disabled {
|
|
148
|
+
@mixin disabled;
|
|
149
|
+
}
|
|
150
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
|
|
3
|
+
size?: 'small' | 'medium' | 'large';
|
|
4
|
+
}
|
|
5
|
+
declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
6
|
+
export { Input };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
|
|
3
|
+
.Root {
|
|
4
|
+
font-family: var(--input-font-family, var(--field-font-family));
|
|
5
|
+
display: flex;
|
|
6
|
+
color: var(--input-text, var(--field-text));
|
|
7
|
+
padding: 0px var(--input-padding-x, var(--field-padding-x));
|
|
8
|
+
border-radius: var(--input-radius, var(--field-radius));
|
|
9
|
+
font-size: var(--input-font-size, var(--field-font-size));
|
|
10
|
+
box-shadow: var(--input-shadow, var(--field-shadow));
|
|
11
|
+
font-weight: var(--input-font-weight, var(--field-font-weight));
|
|
12
|
+
line-height: var(--input-line-height, var(--field-line-height));
|
|
13
|
+
background-color: var(--input-bg, var(--field-bg));
|
|
14
|
+
transition: var(--transition-normal);
|
|
15
|
+
border: 1px solid var(--input-border, var(--field-border));
|
|
16
|
+
|
|
17
|
+
&::placeholder {
|
|
18
|
+
color: var(--input-text-placeholder, var(--field-text-placeholder));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&:hover {
|
|
22
|
+
background-color: var(--input-bg-hover, var(--field-bg-hover));
|
|
23
|
+
border-color: var(--input-border-hover, var(--field-border-hover));
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
&:focus-visible {
|
|
27
|
+
@mixin focus;
|
|
28
|
+
background-color: var(--input-bg-focus, var(--field-bg-focus));
|
|
29
|
+
border-color: var(--input-border-focus, var(--field-border-focus));
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:disabled {
|
|
33
|
+
@mixin disabled;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&[type='file'] {
|
|
37
|
+
appearance: none;
|
|
38
|
+
border: 0;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
&.small {
|
|
42
|
+
height: var(--input-height-sm, var(--field-height-sm));
|
|
43
|
+
font-size: var(
|
|
44
|
+
--input-font-size-sm,
|
|
45
|
+
var(--field-font-size-sm, var(--field-font-size))
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&.medium {
|
|
50
|
+
height: var(--input-height-md, var(--field-height-md));
|
|
51
|
+
font-size: var(--input-font-size, var(--field-font-size));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&.large {
|
|
55
|
+
height: var(--input-height-lg, var(--field-height-lg));
|
|
56
|
+
font-size: var(
|
|
57
|
+
--input-font-size-lg,
|
|
58
|
+
var(--field-font-size-lg, var(--field-font-size))
|
|
59
|
+
);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
3
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & React.RefAttributes<HTMLLabelElement>>;
|
|
4
|
+
export { Label };
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as MenubarPrimitive from '@radix-ui/react-menubar';
|
|
3
|
+
declare const Menu: {
|
|
4
|
+
(props: MenubarPrimitive.MenubarMenuProps & {
|
|
5
|
+
__scopeMenubar?: import("@radix-ui/react-context").Scope;
|
|
6
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
displayName: string;
|
|
8
|
+
};
|
|
9
|
+
declare const Group: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const Sub: React.FC<MenubarPrimitive.MenubarSubProps>;
|
|
11
|
+
declare const RadioGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const Trigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
declare const SubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
16
|
+
declare const Arrow: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
17
|
+
declare const SubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
18
|
+
inset?: boolean;
|
|
19
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const Content: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
declare const Item: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
22
|
+
inset?: boolean;
|
|
23
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const CheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const RadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
26
|
+
declare const Label: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
27
|
+
inset?: boolean;
|
|
28
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
declare const Shortcut: {
|
|
30
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
31
|
+
displayname: string;
|
|
32
|
+
};
|
|
33
|
+
export declare const Menubar: {
|
|
34
|
+
Root: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
35
|
+
Trigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
36
|
+
Content: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
37
|
+
Item: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
38
|
+
inset?: boolean;
|
|
39
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
40
|
+
CheckboxItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
41
|
+
RadioItem: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
42
|
+
Label: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
43
|
+
inset?: boolean;
|
|
44
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
45
|
+
Separator: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
SubTrigger: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
|
|
47
|
+
inset?: boolean;
|
|
48
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
|
49
|
+
SubContent: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
50
|
+
Arrow: React.ForwardRefExoticComponent<Omit<MenubarPrimitive.MenubarArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
51
|
+
Menu: {
|
|
52
|
+
(props: MenubarPrimitive.MenubarMenuProps & {
|
|
53
|
+
__scopeMenubar?: import("@radix-ui/react-context").Scope;
|
|
54
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
displayName: string;
|
|
56
|
+
};
|
|
57
|
+
Group: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
58
|
+
Sub: React.FC<MenubarPrimitive.MenubarSubProps>;
|
|
59
|
+
RadioGroup: React.ForwardRefExoticComponent<MenubarPrimitive.MenubarRadioGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
60
|
+
Shortcut: {
|
|
61
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): React.JSX.Element;
|
|
62
|
+
displayname: string;
|
|
63
|
+
};
|
|
64
|
+
};
|
|
65
|
+
export { Root, Trigger, Content, Item, CheckboxItem, RadioItem, Label, Separator, SubTrigger, SubContent, Arrow, Menu, Group, Sub, RadioGroup, Shortcut, };
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
@theme static {
|
|
2
|
+
--spacing: 0.25rem;
|
|
3
|
+
}
|
|
4
|
+
@import './helpers/mixins.css';
|
|
5
|
+
.Root {
|
|
6
|
+
display: flex;
|
|
7
|
+
background-color: var(--menubar-bg, var(--popover-bg));
|
|
8
|
+
padding: var(--menubar-padding, --spacing(1));
|
|
9
|
+
border-radius: var(--menubar-radius, var(--popover-radius));
|
|
10
|
+
box-shadow: var(--menubar-shadow, var(--popover-shadow));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.Trigger {
|
|
14
|
+
padding: var(--menubar-trigger-padding-y, --spacing(2))
|
|
15
|
+
var(--menubar-trigger-padding-x, --spacing(3));
|
|
16
|
+
outline: none;
|
|
17
|
+
user-select: none;
|
|
18
|
+
font-weight: var(
|
|
19
|
+
--menubar-trigger-font-weight,
|
|
20
|
+
var(--typography-font-weight)
|
|
21
|
+
);
|
|
22
|
+
line-height: var(
|
|
23
|
+
--menubar-trigger-line-height,
|
|
24
|
+
var(--typography-line-height-none)
|
|
25
|
+
);
|
|
26
|
+
border-radius: var(--menubar-trigger-radius, var(--popover-radius));
|
|
27
|
+
color: var(--menubar-text, var(--popover-text));
|
|
28
|
+
font-size: var(--menubar-trigger-font-size, var(--text-sm));
|
|
29
|
+
display: flex;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: space-between;
|
|
32
|
+
gap: var(--menubar-trigger-gap, --spacing(0.5));
|
|
33
|
+
height: var(
|
|
34
|
+
--menubar-trigger-height,
|
|
35
|
+
var(--menubar-item-height, --spacing(8))
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
&[data-highlighted],
|
|
39
|
+
&[data-state='open'] {
|
|
40
|
+
background-color: var(--menubar-bg-active, var(--bg-active));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.Content,
|
|
45
|
+
.SubContent {
|
|
46
|
+
min-width: var(--menubar-content-min-width, 14rem);
|
|
47
|
+
background-color: var(--menubar-content-bg, var(--popover-bg));
|
|
48
|
+
border-radius: var(--menubar-content-radius, var(--popover-radius));
|
|
49
|
+
padding: var(--menubar-content-padding, var(--menubar-padding, --spacing(1)));
|
|
50
|
+
box-shadow: var(--menubar-content-shadow, var(--popover-shadow));
|
|
51
|
+
animation-duration: var(--transition-duration-normal);
|
|
52
|
+
animation-timing-function: var(--transition-easing);
|
|
53
|
+
will-change: transform, opacity;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.Item,
|
|
57
|
+
.SubTrigger,
|
|
58
|
+
.CheckboxItem,
|
|
59
|
+
.RadioItem {
|
|
60
|
+
all: unset;
|
|
61
|
+
font-family: var(--typography-font-family);
|
|
62
|
+
font-size: var(--menubar-item-font-size, var(--text-sm));
|
|
63
|
+
line-height: var(
|
|
64
|
+
--menubar-item-line-height,
|
|
65
|
+
var(--typography-line-height-none)
|
|
66
|
+
);
|
|
67
|
+
color: var(--menubar-item-text, var(--popover-text));
|
|
68
|
+
border-radius: var(--menubar-item-radius, var(--popover-radius));
|
|
69
|
+
display: flex;
|
|
70
|
+
align-items: center;
|
|
71
|
+
height: var(--menubar-item-height, --spacing(8));
|
|
72
|
+
padding: 0 var(--menubar-item-padding-x, --spacing(2.5));
|
|
73
|
+
position: relative;
|
|
74
|
+
user-select: none;
|
|
75
|
+
|
|
76
|
+
&[data-highlighted] {
|
|
77
|
+
background-color: var(--menubar-item-bg-active, var(--bg-active));
|
|
78
|
+
color: var(--menubar-item-text-active, var(--popover-text));
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&[data-disabled] {
|
|
82
|
+
@mixin disabled;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&.Inset {
|
|
86
|
+
padding-left: var(--menubar-item-inset-padding, --spacing(6));
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.CheckboxItem,
|
|
91
|
+
.RadioItem {
|
|
92
|
+
padding-left: var(--menubar-item-inset-padding, --spacing(6));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.Item[data-state='open'],
|
|
96
|
+
.SubTrigger[data-state='open'] {
|
|
97
|
+
background-color: var(--menubar-item-bg-active, var(--bg-active));
|
|
98
|
+
color: var(--menubar-item-text-active, var(--popover-text));
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.ItemIndicator {
|
|
102
|
+
position: absolute;
|
|
103
|
+
left: 0;
|
|
104
|
+
width: var(--menubar-indicator-width, --spacing(5));
|
|
105
|
+
display: inline-flex;
|
|
106
|
+
align-items: center;
|
|
107
|
+
justify-content: center;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.Separator {
|
|
111
|
+
height: 1px;
|
|
112
|
+
background-color: var(--menubar-separator, var(--border-default));
|
|
113
|
+
margin: var(--menubar-separator-spacing, --spacing(1.5));
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.RightSlot {
|
|
117
|
+
margin-left: auto;
|
|
118
|
+
padding-left: var(--menubar-right-slot-padding, --spacing(5));
|
|
119
|
+
color: var(--menubar-right-slot-text, var(--popover-text));
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
.Label {
|
|
123
|
+
font-weight: var(--heading-font-weight);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.Arrow {
|
|
127
|
+
fill: currentColor;
|
|
128
|
+
}
|