@_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,153 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Trigger {
|
|
5
|
+
color: var(--select-trigger-text, var(--selector-trigger-text));
|
|
6
|
+
background-color: var(--select-trigger-bg, var(--selector-trigger-bg));
|
|
7
|
+
border: 1px solid var(--select-trigger-border, var(--selector-trigger-border));
|
|
8
|
+
border-radius: var(--select-trigger-radius, var(--selector-radius));
|
|
9
|
+
box-shadow: var(--select-trigger-shadow, var(--field-shadow));
|
|
10
|
+
display: inline-flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: space-between;
|
|
13
|
+
gap: var(--select-trigger-gap, var(--selector-trigger-gap, --spacing(2)));
|
|
14
|
+
padding: var(
|
|
15
|
+
--select-trigger-padding-y,
|
|
16
|
+
var(--selector-trigger-padding-y, --spacing(2))
|
|
17
|
+
)
|
|
18
|
+
var(--select-trigger-padding-x, var(--selector-trigger-padding-x));
|
|
19
|
+
font-family: var(--select-trigger-font-family, var(--field-font-family));
|
|
20
|
+
font-size: var(--select-trigger-font-size, var(--field-font-size));
|
|
21
|
+
font-weight: var(--select-trigger-font-weight, var(--field-font-weight));
|
|
22
|
+
line-height: var(--select-trigger-line-height, var(--field-line-height));
|
|
23
|
+
min-height: var(--select-trigger-height, var(--selector-trigger-height-md));
|
|
24
|
+
transition: var(--transition-normal);
|
|
25
|
+
|
|
26
|
+
&:hover {
|
|
27
|
+
background-color: var(--select-trigger-bg-hover, var(--field-bg-hover));
|
|
28
|
+
border-color: var(--select-trigger-border-hover, var(--field-border-hover));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:focus-visible {
|
|
32
|
+
@mixin focus;
|
|
33
|
+
background-color: var(--select-trigger-bg-focus, var(--field-bg-focus));
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:disabled {
|
|
37
|
+
@mixin disabled;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[data-placeholder] {
|
|
41
|
+
color: var(--select-trigger-placeholder, var(--field-text-placeholder));
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&.small {
|
|
45
|
+
min-height: var(
|
|
46
|
+
--select-trigger-height-sm,
|
|
47
|
+
var(--selector-trigger-height-sm)
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
&.medium,
|
|
52
|
+
&.default {
|
|
53
|
+
min-height: var(--select-trigger-height, var(--selector-trigger-height-md));
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&.large {
|
|
57
|
+
min-height: var(
|
|
58
|
+
--select-trigger-height-lg,
|
|
59
|
+
var(--selector-trigger-height-lg)
|
|
60
|
+
);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.Icon {
|
|
65
|
+
color: var(--select-trigger-text, var(--selector-trigger-text));
|
|
66
|
+
|
|
67
|
+
svg {
|
|
68
|
+
opacity: 0.8;
|
|
69
|
+
width: var(--select-trigger-icon-size, var(--selector-trigger-icon-size));
|
|
70
|
+
height: var(--select-trigger-icon-size, var(--selector-trigger-icon-size));
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.ScrollButton {
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
height: var(--select-scroll-button-height, var(--selector-trigger-height-md));
|
|
79
|
+
background-color: var(--select-scroll-button-bg, var(--selector-panel-bg));
|
|
80
|
+
color: var(--select-scroll-button-color, var(--selector-option-text));
|
|
81
|
+
cursor: default;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.Content {
|
|
85
|
+
position: relative;
|
|
86
|
+
z-index: var(--layer-popover);
|
|
87
|
+
max-height: var(--select-content-max-height, --spacing(96));
|
|
88
|
+
min-width: var(--select-content-min-width, --spacing(32));
|
|
89
|
+
overflow: hidden;
|
|
90
|
+
background-color: var(--select-panel-bg, var(--selector-panel-bg));
|
|
91
|
+
border: 1px solid var(--select-panel-border, var(--selector-panel-border));
|
|
92
|
+
border-radius: var(--select-panel-radius, var(--selector-radius));
|
|
93
|
+
box-shadow: var(--select-panel-shadow, var(--selector-panel-shadow));
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.PopperViewport {
|
|
97
|
+
height: var(--radix-select-trigger-height);
|
|
98
|
+
width: 100%;
|
|
99
|
+
min-width: var(--radix-select-trigger-width);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.Viewport {
|
|
103
|
+
padding: var(--select-viewport-padding, --spacing(2));
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
.Label {
|
|
107
|
+
padding: var(--select-label-padding, --spacing(2) var(--field-padding-x));
|
|
108
|
+
font-family: var(--select-label-font-family, var(--field-font-family));
|
|
109
|
+
font-size: var(--select-label-font-size, var(--typography-small-size));
|
|
110
|
+
font-weight: var(--select-label-font-weight, var(--typography-font-weight));
|
|
111
|
+
color: var(--select-label-color, var(--text-auxiliary));
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.Item {
|
|
115
|
+
position: relative;
|
|
116
|
+
display: flex;
|
|
117
|
+
align-items: center;
|
|
118
|
+
padding: var(--select-option-padding, --spacing(2) --spacing(4));
|
|
119
|
+
border-radius: var(--select-option-radius, var(--list-item-radius));
|
|
120
|
+
min-height: var(--select-option-height, var(--selector-trigger-height-md));
|
|
121
|
+
font-family: var(--select-option-font-family, var(--field-font-family));
|
|
122
|
+
font-size: var(--select-option-font-size, var(--field-font-size));
|
|
123
|
+
line-height: var(--select-option-line-height, var(--field-line-height));
|
|
124
|
+
color: var(--select-option-text, var(--selector-option-text));
|
|
125
|
+
cursor: pointer;
|
|
126
|
+
transition: var(--transition-fast);
|
|
127
|
+
|
|
128
|
+
&[data-disabled] {
|
|
129
|
+
@mixin disabled;
|
|
130
|
+
cursor: not-allowed;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
&[data-highlighted] {
|
|
134
|
+
outline: none;
|
|
135
|
+
background-color: var(--select-option-bg-active, var(--control-accent));
|
|
136
|
+
color: var(--select-option-text-active, var(--control-text-contrast));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
.ItemIndicator {
|
|
141
|
+
position: absolute;
|
|
142
|
+
left: 0;
|
|
143
|
+
display: none; /* Hide checkmark, using background color instead */
|
|
144
|
+
align-items: center;
|
|
145
|
+
justify-content: center;
|
|
146
|
+
width: var(--select-option-indicator-width, --spacing(6));
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.Separator {
|
|
150
|
+
height: var(--select-separator-thickness, 1px);
|
|
151
|
+
background-color: var(--select-separator-color, var(--separator-color));
|
|
152
|
+
margin: var(--select-separator-margin, --spacing(2));
|
|
153
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
3
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
export { Separator };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
.Root {
|
|
2
|
+
background-color: var(--separator-color, var(--separator-color));
|
|
3
|
+
|
|
4
|
+
&[data-orientation='horizontal'] {
|
|
5
|
+
height: var(--separator-thickness, 1px);
|
|
6
|
+
width: 100%;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
&[data-orientation='vertical'] {
|
|
10
|
+
height: 100%;
|
|
11
|
+
width: var(--separator-thickness, 1px);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
3
|
+
declare const Track: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderTrackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
4
|
+
declare const Range: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderRangeProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
5
|
+
declare const Thumb: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderThumbProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
6
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
7
|
+
export declare const Slider: {
|
|
8
|
+
Root: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
9
|
+
Track: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderTrackProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
10
|
+
Range: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderRangeProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
11
|
+
Thumb: React.ForwardRefExoticComponent<Omit<SliderPrimitive.SliderThumbProps & React.RefAttributes<HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
|
|
12
|
+
};
|
|
13
|
+
export { Root, Track, Range, Thumb };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
position: relative;
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
user-select: none;
|
|
9
|
+
touch-action: none;
|
|
10
|
+
width: var(--slider-width, var(--track-control-width));
|
|
11
|
+
height: var(--slider-height, var(--track-control-height));
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.Track {
|
|
15
|
+
background-color: var(--slider-track-bg, var(--track-control-track-bg));
|
|
16
|
+
position: relative;
|
|
17
|
+
flex-grow: 1;
|
|
18
|
+
border-radius: var(--slider-track-radius, var(--track-control-track-radius));
|
|
19
|
+
height: var(--slider-track-height, var(--track-control-track-height));
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.Range {
|
|
23
|
+
position: absolute;
|
|
24
|
+
background-color: var(
|
|
25
|
+
--slider-range-bg,
|
|
26
|
+
var(--track-control-track-bg-active)
|
|
27
|
+
);
|
|
28
|
+
border-radius: var(--slider-track-radius, var(--track-control-track-radius));
|
|
29
|
+
height: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.Thumb {
|
|
33
|
+
display: block;
|
|
34
|
+
width: var(--slider-thumb-size, var(--track-control-thumb-size));
|
|
35
|
+
height: var(--slider-thumb-size, var(--track-control-thumb-size));
|
|
36
|
+
background-color: var(--slider-thumb-bg, var(--track-control-thumb-bg));
|
|
37
|
+
box-shadow: var(--slider-thumb-shadow, var(--track-control-thumb-shadow));
|
|
38
|
+
border-radius: var(--slider-thumb-radius, 50%);
|
|
39
|
+
|
|
40
|
+
&:focus-visible {
|
|
41
|
+
@mixin focus;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.spinner {
|
|
5
|
+
border: var(--spinner-border-width, 4px) solid
|
|
6
|
+
var(--spinner-track-color, transparent);
|
|
7
|
+
border-top-color: var(--spinner-indicator-color, var(--meter-indicator-bg));
|
|
8
|
+
border-radius: 50%;
|
|
9
|
+
width: var(--spinner-size, --spacing(4));
|
|
10
|
+
height: var(--spinner-size, --spacing(4));
|
|
11
|
+
animation: spin var(--spinner-animation-duration, 1s) linear infinite;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@keyframes spin {
|
|
15
|
+
0% {
|
|
16
|
+
transform: rotate(0deg);
|
|
17
|
+
}
|
|
18
|
+
100% {
|
|
19
|
+
transform: rotate(360deg);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
3
|
+
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export { Switch };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
@import '../components/helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
width: var(--switch-track-width, --spacing(11));
|
|
6
|
+
height: var(--switch-track-height, --spacing(6));
|
|
7
|
+
background-color: var(--switch-track-bg, var(--color-gray-200));
|
|
8
|
+
border-radius: 9999px;
|
|
9
|
+
position: relative;
|
|
10
|
+
box-shadow: var(--switch-track-shadow, var(--shadow-sm));
|
|
11
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
12
|
+
cursor: pointer;
|
|
13
|
+
transition: var(--transition-normal);
|
|
14
|
+
|
|
15
|
+
&:focus-visible {
|
|
16
|
+
@mixin focus;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
&[data-state='checked'] {
|
|
20
|
+
background-color: var(--switch-track-bg-checked, var(--control-accent));
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.Thumb {
|
|
25
|
+
display: block;
|
|
26
|
+
width: var(--switch-thumb-size, --spacing(5));
|
|
27
|
+
height: var(--switch-thumb-size, --spacing(5));
|
|
28
|
+
background-color: var(--switch-thumb-bg, var(--color-white));
|
|
29
|
+
border-radius: 50%;
|
|
30
|
+
box-shadow: var(--switch-thumb-shadow, 0 2px 4px rgba(0, 0, 0, 0.2));
|
|
31
|
+
transition: transform var(--transition-normal);
|
|
32
|
+
transform: translateX(var(--switch-thumb-offset, --spacing(0.5)));
|
|
33
|
+
will-change: transform;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 0;
|
|
37
|
+
margin-top: calc(var(--switch-thumb-size, --spacing(5)) / -2);
|
|
38
|
+
|
|
39
|
+
&[data-state='checked'] {
|
|
40
|
+
transform: translateX(
|
|
41
|
+
calc(
|
|
42
|
+
var(--switch-track-width, --spacing(11)) -
|
|
43
|
+
var(--switch-thumb-size, --spacing(5)) -
|
|
44
|
+
var(--switch-thumb-offset, --spacing(0.5))
|
|
45
|
+
)
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&:disabled {
|
|
50
|
+
@mixin disabled;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
3
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const List: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
+
declare const Trigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
declare const Content: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export declare const Tabs: {
|
|
8
|
+
Root: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
List: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
10
|
+
Trigger: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
+
Content: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
12
|
+
};
|
|
13
|
+
export { Root, List, Trigger, Content };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
width: var(--tabs-container-width, 100%);
|
|
8
|
+
box-shadow: var(--tabs-container-shadow, var(--surface-shadow));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.List {
|
|
12
|
+
flex-shrink: 0;
|
|
13
|
+
display: flex;
|
|
14
|
+
border-bottom: 1px solid var(--tabs-border, var(--navigation-border));
|
|
15
|
+
gap: var(--tabs-trigger-gap, var(--navigation-gap));
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.Trigger {
|
|
19
|
+
font-family: inherit;
|
|
20
|
+
background-color: var(--tabs-trigger-bg, var(--bg-panel));
|
|
21
|
+
color: var(--tabs-trigger-text, var(--text-primary));
|
|
22
|
+
padding: 0 var(--tabs-trigger-padding-x, --spacing(4));
|
|
23
|
+
min-height: var(--tabs-trigger-height, var(--control-height-md));
|
|
24
|
+
flex: 1;
|
|
25
|
+
display: flex;
|
|
26
|
+
align-items: center;
|
|
27
|
+
justify-content: center;
|
|
28
|
+
font-size: var(--tabs-trigger-font-size, var(--typography-font-size));
|
|
29
|
+
line-height: 1;
|
|
30
|
+
user-select: none;
|
|
31
|
+
border-top-left-radius: var(--tabs-trigger-radius, var(--radius-tabs));
|
|
32
|
+
border-top-right-radius: var(--tabs-trigger-radius, var(--radius-tabs));
|
|
33
|
+
transition: var(--transition-normal);
|
|
34
|
+
|
|
35
|
+
&:hover {
|
|
36
|
+
color: var(--tabs-trigger-text-hover, var(--control-accent));
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&[data-state='active'] {
|
|
40
|
+
color: var(--tabs-trigger-text-active, var(--control-accent));
|
|
41
|
+
box-shadow: inset 0 -1px 0 0 currentColor;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:focus-visible {
|
|
45
|
+
position: relative;
|
|
46
|
+
@mixin focus;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.Content {
|
|
51
|
+
flex-grow: 1;
|
|
52
|
+
padding: var(--tabs-panel-padding, var(--surface-padding));
|
|
53
|
+
background-color: var(--tabs-panel-bg, var(--bg-panel));
|
|
54
|
+
border-bottom-left-radius: var(--tabs-panel-radius, var(--radius-tabs));
|
|
55
|
+
border-bottom-right-radius: var(--tabs-panel-radius, var(--radius-tabs));
|
|
56
|
+
outline: none;
|
|
57
|
+
box-shadow: var(--tabs-panel-shadow, var(--surface-shadow));
|
|
58
|
+
border: 1px solid var(--tabs-panel-border, var(--navigation-border));
|
|
59
|
+
border-top: 0;
|
|
60
|
+
|
|
61
|
+
&:focus-visible {
|
|
62
|
+
@mixin focus;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
interface TextProps extends React.HtmlHTMLAttributes<HTMLElement> {
|
|
3
|
+
as?: 'span' | 'label' | 'p' | 'div';
|
|
4
|
+
size?: 'small' | 'medium' | 'large' | 'default';
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
declare const Text: ({ as: Component, size, children, ...props }: TextProps) => React.JSX.Element;
|
|
8
|
+
export { Text };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
.Root {
|
|
2
|
+
font-family: var(--text-font-family, var(--typography-font-family));
|
|
3
|
+
font-weight: var(--text-font-weight, var(--typography-font-weight));
|
|
4
|
+
font-size: var(--text-font-size, var(--typography-font-size));
|
|
5
|
+
line-height: var(--text-line-height, var(--typography-line-height));
|
|
6
|
+
color: var(--text-color, var(--typography-color));
|
|
7
|
+
margin-bottom: var(--text-margin-bottom, 0);
|
|
8
|
+
|
|
9
|
+
&.default {
|
|
10
|
+
font-size: var(--text-font-size, var(--typography-font-size));
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&.small {
|
|
14
|
+
font-size: var(--text-font-size-small, var(--typography-small-size));
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.medium {
|
|
18
|
+
font-size: var(--text-font-size, var(--typography-font-size));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&.large {
|
|
22
|
+
font-size: var(--text-font-size-large, var(--typography-large-size));
|
|
23
|
+
}
|
|
24
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
@import '../components/helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
font-family: var(--textarea-font-family, var(--field-font-family));
|
|
6
|
+
display: flex;
|
|
7
|
+
color: var(--textarea-text, var(--field-text));
|
|
8
|
+
padding: var(--textarea-padding-y, var(--field-padding-y))
|
|
9
|
+
var(--textarea-padding-x, var(--field-padding-x));
|
|
10
|
+
min-height: var(--textarea-min-height, --spacing(20));
|
|
11
|
+
border-radius: var(--textarea-radius, var(--field-radius));
|
|
12
|
+
font-size: var(--textarea-font-size, var(--field-font-size));
|
|
13
|
+
box-shadow: var(--textarea-shadow, var(--field-shadow));
|
|
14
|
+
font-weight: var(--textarea-font-weight, var(--field-font-weight));
|
|
15
|
+
line-height: var(--textarea-line-height, var(--field-line-height));
|
|
16
|
+
background-color: var(--textarea-bg, var(--field-bg));
|
|
17
|
+
transition: var(--transition-normal);
|
|
18
|
+
border: 1px solid var(--textarea-border, var(--field-border));
|
|
19
|
+
width: 100%;
|
|
20
|
+
|
|
21
|
+
&::placeholder {
|
|
22
|
+
color: var(--textarea-placeholder, var(--field-text-placeholder));
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&:focus-visible {
|
|
26
|
+
@mixin focus;
|
|
27
|
+
border-color: var(--textarea-border-focus, var(--field-border-focus));
|
|
28
|
+
background-color: var(--textarea-bg-focus, var(--field-bg-focus));
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
&:disabled {
|
|
32
|
+
@mixin disabled;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as ToastPrimitives from '@radix-ui/react-toast';
|
|
3
|
+
declare const Provider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
4
|
+
declare const Viewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
5
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
6
|
+
declare const Action: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
declare const Title: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const Description: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
declare const Close: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
type ToastProps = React.ComponentPropsWithoutRef<typeof Root>;
|
|
11
|
+
type ToastActionElement = React.ReactElement<typeof Action>;
|
|
12
|
+
export declare const Toast: {
|
|
13
|
+
Provider: React.FC<ToastPrimitives.ToastProviderProps>;
|
|
14
|
+
Viewport: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastViewportProps & React.RefAttributes<HTMLOListElement>, "ref"> & React.RefAttributes<HTMLOListElement>>;
|
|
15
|
+
Root: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastProps & React.RefAttributes<HTMLLIElement>, "ref"> & React.RefAttributes<HTMLLIElement>>;
|
|
16
|
+
Action: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastActionProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
Title: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastTitleProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
18
|
+
Description: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastDescriptionProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
19
|
+
Close: React.ForwardRefExoticComponent<Omit<ToastPrimitives.ToastCloseProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
20
|
+
};
|
|
21
|
+
export { Provider, Viewport, Root, Action, Title, Description, Close, ToastProps, ToastActionElement, };
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
@import '../components/helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Viewport {
|
|
5
|
+
position: fixed;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
right: 0;
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
10
|
+
padding: var(--toast-viewport-padding, var(--notification-padding));
|
|
11
|
+
gap: var(--toast-viewport-gap, var(--notification-gap));
|
|
12
|
+
width: var(--toast-width, --spacing(96));
|
|
13
|
+
max-width: 100vw;
|
|
14
|
+
margin: 0;
|
|
15
|
+
list-style: none;
|
|
16
|
+
z-index: var(--toast-z-index, 2147483647);
|
|
17
|
+
outline: none;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.Root {
|
|
21
|
+
position: relative;
|
|
22
|
+
background-color: var(--toast-bg, var(--notification-bg));
|
|
23
|
+
border: 1px solid var(--toast-border, var(--notification-border));
|
|
24
|
+
border-radius: var(--toast-radius, var(--notification-radius));
|
|
25
|
+
box-shadow: var(--toast-shadow, var(--notification-shadow));
|
|
26
|
+
padding: var(--toast-padding, var(--notification-padding));
|
|
27
|
+
display: grid;
|
|
28
|
+
grid-template-areas: 'title action' 'description action';
|
|
29
|
+
grid-template-columns: auto max-content;
|
|
30
|
+
column-gap: var(--toast-gap, var(--notification-gap));
|
|
31
|
+
align-items: center;
|
|
32
|
+
color: var(--toast-text, var(--notification-text));
|
|
33
|
+
|
|
34
|
+
&:hover {
|
|
35
|
+
.Close {
|
|
36
|
+
opacity: 1;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&[data-state='open'] {
|
|
41
|
+
animation: slideIn var(--transition-duration-normal)
|
|
42
|
+
var(--transition-easing);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
&[data-state='closed'] {
|
|
46
|
+
animation: hide var(--transition-duration-normal) ease-in;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
&[data-swipe='move'] {
|
|
50
|
+
transform: translateX(var(--radix-toast-swipe-move-x));
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
&[data-swipe='cancel'] {
|
|
54
|
+
transform: translateX(0);
|
|
55
|
+
transition: transform var(--transition-duration-normal) ease-out;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&[data-swipe='end'] {
|
|
59
|
+
animation: swipeOut var(--transition-duration-normal) ease-out;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.Action {
|
|
64
|
+
grid-area: action;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.Close {
|
|
68
|
+
font-family: inherit;
|
|
69
|
+
border-radius: var(--notification-radius);
|
|
70
|
+
height: var(--toast-close-size, --spacing(6));
|
|
71
|
+
width: var(--toast-close-size, --spacing(6));
|
|
72
|
+
display: inline-flex;
|
|
73
|
+
align-items: center;
|
|
74
|
+
justify-content: center;
|
|
75
|
+
color: var(--toast-close-color, var(--typography-auxiliary-color));
|
|
76
|
+
position: absolute;
|
|
77
|
+
top: --spacing(2);
|
|
78
|
+
right: --spacing(2);
|
|
79
|
+
opacity: 0;
|
|
80
|
+
transition: var(--transition-normal);
|
|
81
|
+
|
|
82
|
+
&:focus-visible {
|
|
83
|
+
@mixin focus;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
svg {
|
|
87
|
+
height: var(--toast-close-icon-size, var(--icon-size-md));
|
|
88
|
+
width: var(--toast-close-icon-size, var(--icon-size-md));
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.Title {
|
|
93
|
+
grid-area: title;
|
|
94
|
+
margin-bottom: --spacing(2);
|
|
95
|
+
font-weight: var(--toast-title-weight, var(--heading-font-weight));
|
|
96
|
+
color: var(--toast-text, var(--notification-text));
|
|
97
|
+
font-size: var(--toast-title-size, var(--typography-font-size));
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.Description {
|
|
101
|
+
grid-area: description;
|
|
102
|
+
margin: 0;
|
|
103
|
+
color: var(--toast-description-color, var(--typography-color));
|
|
104
|
+
font-size: calc(var(--typography-font-size) - --spacing(1));
|
|
105
|
+
line-height: var(--typography-line-height);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes hide {
|
|
109
|
+
from {
|
|
110
|
+
opacity: 1;
|
|
111
|
+
}
|
|
112
|
+
to {
|
|
113
|
+
opacity: 0;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
@keyframes slideIn {
|
|
118
|
+
from {
|
|
119
|
+
transform: translateX(calc(100% + var(--toast-viewport-padding)));
|
|
120
|
+
}
|
|
121
|
+
to {
|
|
122
|
+
transform: translateX(0);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@keyframes swipeOut {
|
|
127
|
+
from {
|
|
128
|
+
transform: translateX(var(--radix-toast-swipe-end-x));
|
|
129
|
+
}
|
|
130
|
+
to {
|
|
131
|
+
transform: translateX(calc(100% + var(--toast-viewport-padding)));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
3
|
+
declare const Root: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
|
+
export declare const Toggle: {
|
|
5
|
+
Root: React.ForwardRefExoticComponent<Omit<TogglePrimitive.ToggleProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
};
|
|
7
|
+
export { Root };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
@import './helpers/mixins.css';
|
|
2
|
+
@import '@_linked/css/package.css';
|
|
3
|
+
|
|
4
|
+
.Root {
|
|
5
|
+
background-color: var(--toggle-bg, var(--control-bg));
|
|
6
|
+
color: var(--toggle-text, var(--control-text));
|
|
7
|
+
height: var(--toggle-size, var(--control-toggle-size));
|
|
8
|
+
min-width: var(--toggle-size, var(--control-toggle-size));
|
|
9
|
+
padding: var(--toggle-padding-y, --spacing(1))
|
|
10
|
+
var(--toggle-padding-x, --spacing(2));
|
|
11
|
+
border-radius: var(--toggle-radius, var(--control-radius));
|
|
12
|
+
display: flex;
|
|
13
|
+
font-size: var(--toggle-font-size, var(--typography-font-size));
|
|
14
|
+
line-height: var(--toggle-line-height, var(--typography-line-height-none));
|
|
15
|
+
align-items: center;
|
|
16
|
+
justify-content: center;
|
|
17
|
+
box-shadow: var(--toggle-shadow, var(--control-shadow));
|
|
18
|
+
transition: var(--transition-fast);
|
|
19
|
+
|
|
20
|
+
&:hover {
|
|
21
|
+
background-color: var(--toggle-bg-hover, var(--bg-active));
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&[data-state='on'] {
|
|
25
|
+
background-color: var(--toggle-bg-active, var(--control-accent));
|
|
26
|
+
color: var(--toggle-text-active, var(--control-text-contrast));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:focus-visible {
|
|
30
|
+
@mixin focus;
|
|
31
|
+
}
|
|
32
|
+
}
|