@_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,86 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Command as CommandPrimitive } from 'cmdk';
|
|
3
|
+
type MultiSelectorProps = {
|
|
4
|
+
values: string[];
|
|
5
|
+
onValuesChange: (value: string[]) => void;
|
|
6
|
+
loop?: boolean;
|
|
7
|
+
} & React.ComponentPropsWithoutRef<typeof CommandPrimitive>;
|
|
8
|
+
declare const Root: {
|
|
9
|
+
({ values: value, onValuesChange: onValueChange, loop, className, children, dir, ...props }: MultiSelectorProps): React.JSX.Element;
|
|
10
|
+
displayName: string;
|
|
11
|
+
};
|
|
12
|
+
declare const Trigger: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const Input: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
14
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
15
|
+
} & {
|
|
16
|
+
asChild?: boolean;
|
|
17
|
+
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
18
|
+
value?: string;
|
|
19
|
+
onValueChange?: (search: string) => void;
|
|
20
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
21
|
+
declare const Content: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
22
|
+
declare const List: React.ForwardRefExoticComponent<Omit<{
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
25
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
26
|
+
} & {
|
|
27
|
+
asChild?: boolean;
|
|
28
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
29
|
+
label?: string;
|
|
30
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
31
|
+
declare const Item: React.ForwardRefExoticComponent<{
|
|
32
|
+
value: string;
|
|
33
|
+
} & Omit<{
|
|
34
|
+
children?: React.ReactNode;
|
|
35
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
36
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
37
|
+
} & {
|
|
38
|
+
asChild?: boolean;
|
|
39
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
40
|
+
disabled?: boolean;
|
|
41
|
+
onSelect?: (value: string) => void;
|
|
42
|
+
value?: string;
|
|
43
|
+
keywords?: string[];
|
|
44
|
+
forceMount?: boolean;
|
|
45
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
|
+
export declare const MultiSelect: {
|
|
47
|
+
Root: {
|
|
48
|
+
({ values: value, onValuesChange: onValueChange, loop, className, children, dir, ...props }: MultiSelectorProps): React.JSX.Element;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
Trigger: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
52
|
+
Input: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
53
|
+
ref?: React.Ref<HTMLInputElement>;
|
|
54
|
+
} & {
|
|
55
|
+
asChild?: boolean;
|
|
56
|
+
}, "asChild" | "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "type" | "value" | "onChange"> & {
|
|
57
|
+
value?: string;
|
|
58
|
+
onValueChange?: (search: string) => void;
|
|
59
|
+
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
60
|
+
Content: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
61
|
+
List: React.ForwardRefExoticComponent<Omit<{
|
|
62
|
+
children?: React.ReactNode;
|
|
63
|
+
} & Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
64
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
65
|
+
} & {
|
|
66
|
+
asChild?: boolean;
|
|
67
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
68
|
+
label?: string;
|
|
69
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
70
|
+
Item: React.ForwardRefExoticComponent<{
|
|
71
|
+
value: string;
|
|
72
|
+
} & Omit<{
|
|
73
|
+
children?: React.ReactNode;
|
|
74
|
+
} & Omit<Pick<Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "key" | keyof React.HTMLAttributes<HTMLDivElement>> & {
|
|
75
|
+
ref?: React.Ref<HTMLDivElement>;
|
|
76
|
+
} & {
|
|
77
|
+
asChild?: boolean;
|
|
78
|
+
}, "asChild" | "key" | keyof React.HTMLAttributes<HTMLDivElement>>, "disabled" | "value" | "onSelect"> & {
|
|
79
|
+
disabled?: boolean;
|
|
80
|
+
onSelect?: (value: string) => void;
|
|
81
|
+
value?: string;
|
|
82
|
+
keywords?: string[];
|
|
83
|
+
forceMount?: boolean;
|
|
84
|
+
} & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
|
+
};
|
|
86
|
+
export { Root, Trigger, Input, Content, List, Item };
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-wrap: wrap;
|
|
7
|
+
gap: var(--multiselect-gap, --spacing(1));
|
|
8
|
+
padding: var(--multiselect-padding, --spacing(2));
|
|
9
|
+
border-color: var(--multiselect-border, var(--selector-border));
|
|
10
|
+
border-radius: var(--multiselect-radius, var(--selector-radius));
|
|
11
|
+
|
|
12
|
+
.button {
|
|
13
|
+
display: flex;
|
|
14
|
+
align-items: center;
|
|
15
|
+
gap: var(--multiselect-button-gap, --spacing(1));
|
|
16
|
+
height: var(--multiselect-button-height, 35px);
|
|
17
|
+
background-color: var(--multiselect-selected-bg, var(--control-accent));
|
|
18
|
+
color: var(--multiselect-selected-text, var(--control-text-contrast));
|
|
19
|
+
border-radius: var(--multiselect-selected-radius, var(--selector-radius));
|
|
20
|
+
padding: var(--multiselect-selected-padding-y, --spacing(1))
|
|
21
|
+
var(--multiselect-selected-padding-x, --spacing(2));
|
|
22
|
+
font-size: var(
|
|
23
|
+
--multiselect-selected-font-size,
|
|
24
|
+
var(--typography-small-size)
|
|
25
|
+
);
|
|
26
|
+
border: 1px solid var(--multiselect-selected-border, var(--control-accent));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.Command {
|
|
31
|
+
display: flex;
|
|
32
|
+
overflow: visible;
|
|
33
|
+
background-color: transparent;
|
|
34
|
+
flex-direction: column;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.isActive {
|
|
38
|
+
caret-color: transparent;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.Content {
|
|
42
|
+
position: relative;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.input {
|
|
46
|
+
margin-left: var(--multiselect-input-margin-left, --spacing(2));
|
|
47
|
+
padding: var(--multiselect-input-padding-y, --spacing(1))
|
|
48
|
+
var(--multiselect-input-padding-x, --spacing(2));
|
|
49
|
+
outline: none;
|
|
50
|
+
flex: 1 1 0%;
|
|
51
|
+
border: 0 solid transparent;
|
|
52
|
+
min-height: var(--multiselect-input-min-height, var(--field-height-sm));
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.list {
|
|
56
|
+
display: flex;
|
|
57
|
+
flex-direction: column;
|
|
58
|
+
gap: var(--multiselect-list-gap, --spacing(1));
|
|
59
|
+
border-radius: var(--multiselect-list-radius, var(--selector-radius));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.Item {
|
|
63
|
+
border-radius: var(--multiselect-item-radius, var(--selector-radius));
|
|
64
|
+
transition: var(--transition-fast);
|
|
65
|
+
display: flex;
|
|
66
|
+
justify-content: space-between;
|
|
67
|
+
|
|
68
|
+
&:hover {
|
|
69
|
+
cursor: pointer;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.isIncluded {
|
|
74
|
+
opacity: 0.5;
|
|
75
|
+
cursor: default;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.isDisabled {
|
|
79
|
+
opacity: 0.5;
|
|
80
|
+
cursor: not-allowed;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.option {
|
|
84
|
+
font-size: var(--multiselect-option-font-size, var(--typography-small-size));
|
|
85
|
+
line-height: var(
|
|
86
|
+
--multiselect-option-line-height,
|
|
87
|
+
var(--typography-line-height-none)
|
|
88
|
+
);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.emptyResult {
|
|
92
|
+
color: var(--text-auxiliary);
|
|
93
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as NavigationMenuPrimitive from '@radix-ui/react-navigation-menu';
|
|
3
|
+
declare const List: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
4
|
+
declare const Link: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
5
|
+
declare const Item: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
declare const Trigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const Content: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const Viewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const Indicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
11
|
+
export declare const NavigationMenu: {
|
|
12
|
+
Root: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuProps & React.RefAttributes<HTMLElement>, "ref"> & React.RefAttributes<HTMLElement>>;
|
|
13
|
+
Trigger: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
14
|
+
Content: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
15
|
+
List: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuListProps & React.RefAttributes<HTMLUListElement>, "ref"> & React.RefAttributes<HTMLUListElement>>;
|
|
16
|
+
Item: React.ForwardRefExoticComponent<NavigationMenuPrimitive.NavigationMenuItemProps & React.RefAttributes<HTMLLIElement>>;
|
|
17
|
+
Link: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuLinkProps & React.RefAttributes<HTMLAnchorElement>, "ref"> & React.RefAttributes<HTMLAnchorElement>>;
|
|
18
|
+
Indicator: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Viewport: React.ForwardRefExoticComponent<Omit<NavigationMenuPrimitive.NavigationMenuViewportProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
20
|
+
};
|
|
21
|
+
export { Root, Trigger, Content, List, Item, Link, Indicator, Viewport };
|
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
width: 100vw;
|
|
9
|
+
z-index: 1;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.List {
|
|
13
|
+
display: flex;
|
|
14
|
+
justify-content: center;
|
|
15
|
+
background-color: var(--navigation-bg, var(--popover-bg));
|
|
16
|
+
padding: var(--navigation-padding, --spacing(2));
|
|
17
|
+
border-radius: var(--navigation-radius, var(--popover-radius));
|
|
18
|
+
list-style: none;
|
|
19
|
+
box-shadow: var(--navigation-shadow, var(--popover-shadow));
|
|
20
|
+
margin: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.Trigger,
|
|
24
|
+
.Link {
|
|
25
|
+
padding: var(--navigationmenu-item-padding-y, --spacing(3))
|
|
26
|
+
var(--navigationmenu-item-padding-x, --spacing(4));
|
|
27
|
+
outline: none;
|
|
28
|
+
user-select: none;
|
|
29
|
+
font-weight: var(
|
|
30
|
+
--navigationmenu-item-font-weight,
|
|
31
|
+
var(--typography-font-weight)
|
|
32
|
+
);
|
|
33
|
+
line-height: var(
|
|
34
|
+
--navigationmenu-item-line-height,
|
|
35
|
+
var(--typography-line-height-none)
|
|
36
|
+
);
|
|
37
|
+
border-radius: var(--navigation-item-radius, var(--popover-radius));
|
|
38
|
+
font-size: var(--navigationmenu-item-font-size, var(--typography-font-size));
|
|
39
|
+
color: var(--navigation-text, var(--popover-text));
|
|
40
|
+
transition: var(--transition-normal);
|
|
41
|
+
|
|
42
|
+
&:focus-visible {
|
|
43
|
+
@mixin focus;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
&:hover {
|
|
47
|
+
background-color: var(--navigation-bg-hover, var(--bg-active));
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.Trigger {
|
|
52
|
+
display: flex;
|
|
53
|
+
align-items: center;
|
|
54
|
+
justify-content: space-between;
|
|
55
|
+
gap: var(--navigationmenu-trigger-gap, --spacing(1));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.Link {
|
|
59
|
+
display: block;
|
|
60
|
+
text-decoration: none;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.Content {
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 0;
|
|
66
|
+
left: 0;
|
|
67
|
+
width: 100%;
|
|
68
|
+
animation-duration: var(--transition-duration-normal);
|
|
69
|
+
animation-timing-function: ease;
|
|
70
|
+
|
|
71
|
+
&[data-motion='from-start'] {
|
|
72
|
+
animation-name: enterFromLeft;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
&[data-motion='from-end'] {
|
|
76
|
+
animation-name: enterFromRight;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
&[data-motion='to-start'] {
|
|
80
|
+
animation-name: exitToLeft;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
&[data-motion='to-end'] {
|
|
84
|
+
animation-name: exitToRight;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
@media only screen and (min-width: 600px) {
|
|
88
|
+
width: auto;
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ViewportPosition {
|
|
93
|
+
position: absolute;
|
|
94
|
+
display: flex;
|
|
95
|
+
justify-content: center;
|
|
96
|
+
width: 100%;
|
|
97
|
+
top: 100%;
|
|
98
|
+
left: 0;
|
|
99
|
+
perspective: 2000px;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.Viewport {
|
|
103
|
+
position: relative;
|
|
104
|
+
transform-origin: top center;
|
|
105
|
+
margin-top: var(--navigationmenu-viewport-margin-top, --spacing(2));
|
|
106
|
+
width: 100%;
|
|
107
|
+
background-color: var(--navigation-viewport-bg, var(--popover-bg));
|
|
108
|
+
border-radius: var(--navigation-viewport-radius, var(--popover-radius));
|
|
109
|
+
overflow: hidden;
|
|
110
|
+
box-shadow: var(--navigation-viewport-shadow, var(--popover-shadow));
|
|
111
|
+
height: var(--radix-navigation-menu-viewport-height);
|
|
112
|
+
transition: width, height, var(--transition-duration-normal) ease;
|
|
113
|
+
|
|
114
|
+
&[data-state='open'] {
|
|
115
|
+
animation: scaleIn var(--transition-duration-normal) ease;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&[data-state='closed'] {
|
|
119
|
+
animation: scaleOut var(--transition-duration-normal) ease;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
@media only screen and (min-width: 600px) {
|
|
123
|
+
width: var(--radix-navigation-menu-viewport-width);
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.Indicator {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: flex-end;
|
|
130
|
+
justify-content: center;
|
|
131
|
+
height: var(--navigationmenu-indicator-height, --spacing(2));
|
|
132
|
+
top: 100%;
|
|
133
|
+
overflow: hidden;
|
|
134
|
+
z-index: 1;
|
|
135
|
+
transition: width, transform var(--transition-duration-normal) ease;
|
|
136
|
+
|
|
137
|
+
&[data-state='visible'] {
|
|
138
|
+
animation: fadeIn var(--transition-duration-normal) ease;
|
|
139
|
+
}
|
|
140
|
+
&[data-state='hidden'] {
|
|
141
|
+
animation: fadeOut var(--transition-duration-normal) ease;
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.CaretDown {
|
|
146
|
+
position: relative;
|
|
147
|
+
color: var(--navigation-text, var(--popover-text));
|
|
148
|
+
top: 1px;
|
|
149
|
+
transition: transform var(--transition-duration-normal) ease;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
[data-state='open'] > .CaretDown {
|
|
153
|
+
transform: rotate(180deg);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
.Arrow {
|
|
157
|
+
position: relative;
|
|
158
|
+
top: 70%;
|
|
159
|
+
background-color: var(--navigation-arrow-bg, var(--popover-bg));
|
|
160
|
+
width: var(--navigationmenu-arrow-size, --spacing(2));
|
|
161
|
+
height: var(--navigationmenu-arrow-size, --spacing(2));
|
|
162
|
+
transform: rotate(45deg);
|
|
163
|
+
border-top-left-radius: 2px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
@keyframes enterFromRight {
|
|
167
|
+
from {
|
|
168
|
+
opacity: 0;
|
|
169
|
+
transform: translateX(200px);
|
|
170
|
+
}
|
|
171
|
+
to {
|
|
172
|
+
opacity: 1;
|
|
173
|
+
transform: translateX(0);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
@keyframes enterFromLeft {
|
|
178
|
+
from {
|
|
179
|
+
opacity: 0;
|
|
180
|
+
transform: translateX(-200px);
|
|
181
|
+
}
|
|
182
|
+
to {
|
|
183
|
+
opacity: 1;
|
|
184
|
+
transform: translateX(0);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
@keyframes exitToRight {
|
|
189
|
+
from {
|
|
190
|
+
opacity: 1;
|
|
191
|
+
transform: translateX(0);
|
|
192
|
+
}
|
|
193
|
+
to {
|
|
194
|
+
opacity: 0;
|
|
195
|
+
transform: translateX(200px);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
@keyframes exitToLeft {
|
|
200
|
+
from {
|
|
201
|
+
opacity: 1;
|
|
202
|
+
transform: translateX(0);
|
|
203
|
+
}
|
|
204
|
+
to {
|
|
205
|
+
opacity: 0;
|
|
206
|
+
transform: translateX(-200px);
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
@keyframes scaleIn {
|
|
211
|
+
from {
|
|
212
|
+
opacity: 0;
|
|
213
|
+
transform: rotateX(-30deg) scale(0.9);
|
|
214
|
+
}
|
|
215
|
+
to {
|
|
216
|
+
opacity: 1;
|
|
217
|
+
transform: rotateX(0deg) scale(1);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
@keyframes scaleOut {
|
|
222
|
+
from {
|
|
223
|
+
opacity: 1;
|
|
224
|
+
transform: rotateX(0deg) scale(1);
|
|
225
|
+
}
|
|
226
|
+
to {
|
|
227
|
+
opacity: 0;
|
|
228
|
+
transform: rotateX(-10deg) scale(0.95);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@keyframes fadeIn {
|
|
233
|
+
from {
|
|
234
|
+
opacity: 0;
|
|
235
|
+
}
|
|
236
|
+
to {
|
|
237
|
+
opacity: 1;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
@keyframes fadeOut {
|
|
242
|
+
from {
|
|
243
|
+
opacity: 1;
|
|
244
|
+
}
|
|
245
|
+
to {
|
|
246
|
+
opacity: 0;
|
|
247
|
+
}
|
|
248
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
3
|
+
declare const Root: React.FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
declare const Trigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
declare const Anchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
+
declare const Arrow: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
7
|
+
declare const Close: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
declare const Content: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export declare const Popover: {
|
|
10
|
+
Root: React.FC<PopoverPrimitive.PopoverProps>;
|
|
11
|
+
Trigger: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & React.RefAttributes<HTMLButtonElement>>;
|
|
12
|
+
Anchor: React.ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
|
+
Content: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
Arrow: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverArrowProps & React.RefAttributes<SVGSVGElement>, "ref"> & React.RefAttributes<SVGSVGElement>>;
|
|
15
|
+
Close: React.ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
16
|
+
};
|
|
17
|
+
export { Root, Trigger, Anchor, Content, Arrow, Close };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Content {
|
|
5
|
+
border-radius: var(--popover-radius);
|
|
6
|
+
padding: var(--popover-padding);
|
|
7
|
+
width: var(--popover-width, 16rem);
|
|
8
|
+
background: var(--popover-bg);
|
|
9
|
+
box-shadow: var(--popover-shadow);
|
|
10
|
+
animation-duration: var(--transition-duration-normal);
|
|
11
|
+
animation-timing-function: var(--transition-easing);
|
|
12
|
+
will-change: transform, opacity;
|
|
13
|
+
z-index: var(--layer-popover);
|
|
14
|
+
|
|
15
|
+
&[data-state='open'][data-side='top'] {
|
|
16
|
+
animation-name: slideDownAndFade;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&[data-state='open'][data-side='right'] {
|
|
20
|
+
animation-name: slideLeftAndFade;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
&[data-state='open'][data-side='bottom'] {
|
|
24
|
+
animation-name: slideUpAndFade;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&[data-state='open'][data-side='left'] {
|
|
28
|
+
animation-name: slideRightAndFade;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.Arrow {
|
|
33
|
+
fill: var(--popover-bg);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.Close {
|
|
37
|
+
font-family: inherit;
|
|
38
|
+
border-radius: var(--popover-radius);
|
|
39
|
+
height: --spacing(6);
|
|
40
|
+
width: --spacing(6);
|
|
41
|
+
display: inline-flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
justify-content: center;
|
|
44
|
+
color: var(--popover-close-color, var(--typography-color));
|
|
45
|
+
position: absolute;
|
|
46
|
+
top: --spacing(2);
|
|
47
|
+
right: --spacing(2);
|
|
48
|
+
transition: var(--transition-normal);
|
|
49
|
+
|
|
50
|
+
&:hover {
|
|
51
|
+
background-color: var(--popover-close-bg-hover, var(--bg-hover));
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&:focus-visible {
|
|
55
|
+
@mixin focus;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
svg {
|
|
59
|
+
height: --spacing(5);
|
|
60
|
+
width: --spacing(5);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@keyframes slideUpAndFade {
|
|
65
|
+
from {
|
|
66
|
+
opacity: 0;
|
|
67
|
+
transform: translateY(2px);
|
|
68
|
+
}
|
|
69
|
+
to {
|
|
70
|
+
opacity: 1;
|
|
71
|
+
transform: translateY(0);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@keyframes slideRightAndFade {
|
|
76
|
+
from {
|
|
77
|
+
opacity: 0;
|
|
78
|
+
transform: translateX(-2px);
|
|
79
|
+
}
|
|
80
|
+
to {
|
|
81
|
+
opacity: 1;
|
|
82
|
+
transform: translateX(0);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
@keyframes slideDownAndFade {
|
|
87
|
+
from {
|
|
88
|
+
opacity: 0;
|
|
89
|
+
transform: translateY(-2px);
|
|
90
|
+
}
|
|
91
|
+
to {
|
|
92
|
+
opacity: 1;
|
|
93
|
+
transform: translateY(0);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
@keyframes slideLeftAndFade {
|
|
98
|
+
from {
|
|
99
|
+
opacity: 0;
|
|
100
|
+
transform: translateX(2px);
|
|
101
|
+
}
|
|
102
|
+
to {
|
|
103
|
+
opacity: 1;
|
|
104
|
+
transform: translateX(0);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ProgressPrimitive from '@radix-ui/react-progress';
|
|
3
|
+
declare const Indicator: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const Progress: {
|
|
6
|
+
Root: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Indicator: React.ForwardRefExoticComponent<Omit<ProgressPrimitive.ProgressIndicatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
};
|
|
9
|
+
export { Root, Indicator };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
@import '@_linked/css/package.css';
|
|
2
|
+
|
|
3
|
+
.Root {
|
|
4
|
+
position: relative;
|
|
5
|
+
overflow: hidden;
|
|
6
|
+
background-color: var(--progress-track-bg, var(--meter-track-bg));
|
|
7
|
+
border-radius: var(--progress-radius, var(--meter-radius));
|
|
8
|
+
width: var(--progress-width, 100%);
|
|
9
|
+
height: var(--progress-height, --spacing(2));
|
|
10
|
+
|
|
11
|
+
/* Fix overflow clipping in Safari */
|
|
12
|
+
/* https://gist.github.com/domske/b66047671c780a238b51c51ffde8d3a0 */
|
|
13
|
+
transform: translateZ(0);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.Indicator {
|
|
17
|
+
background-color: var(--progress-indicator-bg, var(--meter-indicator-bg));
|
|
18
|
+
width: 100%;
|
|
19
|
+
height: 100%;
|
|
20
|
+
transition: transform
|
|
21
|
+
var(--progress-animation-duration, var(--transition-duration-normal))
|
|
22
|
+
cubic-bezier(0.65, 0, 0.35, 1);
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
3
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const Item: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export declare const RadioGroup: {
|
|
6
|
+
Root: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Item: React.ForwardRefExoticComponent<Omit<RadioGroupPrimitive.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
8
|
+
};
|
|
9
|
+
export { Root, Item };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
@import '../components/helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
gap: var(--radiogroup-gap, var(--choice-gap));
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.Item {
|
|
11
|
+
background-color: var(--radiogroup-bg, var(--choice-bg));
|
|
12
|
+
width: var(--radiogroup-size, var(--choice-size));
|
|
13
|
+
height: var(--radiogroup-size, var(--choice-size));
|
|
14
|
+
border-radius: var(--radiogroup-radius, 50%);
|
|
15
|
+
border: 2px solid var(--radiogroup-border, var(--choice-border));
|
|
16
|
+
box-shadow: var(--radiogroup-shadow, var(--choice-shadow));
|
|
17
|
+
cursor: pointer;
|
|
18
|
+
transition: var(--transition-fast);
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
background-color: var(--radiogroup-bg-hover, var(--choice-bg-hover));
|
|
22
|
+
border-color: var(--radiogroup-border-hover, var(--choice-border-hover));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:focus-visible {
|
|
26
|
+
@mixin focus;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&[data-state='checked'] {
|
|
30
|
+
background-color: var(--radiogroup-bg-checked, var(--choice-bg));
|
|
31
|
+
border-color: var(--radiogroup-border-checked, var(--control-accent));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.Indicator {
|
|
36
|
+
display: flex;
|
|
37
|
+
align-items: center;
|
|
38
|
+
justify-content: center;
|
|
39
|
+
width: 100%;
|
|
40
|
+
height: 100%;
|
|
41
|
+
position: relative;
|
|
42
|
+
|
|
43
|
+
&:after {
|
|
44
|
+
content: '';
|
|
45
|
+
display: block;
|
|
46
|
+
width: var(--radiogroup-indicator-size, --spacing(2));
|
|
47
|
+
height: var(--radiogroup-indicator-size, --spacing(2));
|
|
48
|
+
border-radius: 50%;
|
|
49
|
+
background-color: var(--radiogroup-indicator-bg, var(--control-accent));
|
|
50
|
+
opacity: 0;
|
|
51
|
+
transition: var(--transition-fast);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[data-state='checked']:after {
|
|
55
|
+
opacity: 1;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
3
|
+
declare const Scrollbar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
export declare const ScrollArea: {
|
|
6
|
+
Root: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
Scrollbar: React.ForwardRefExoticComponent<Omit<ScrollAreaPrimitive.ScrollAreaScrollbarProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
};
|
|
9
|
+
export { Root, Scrollbar };
|