@rebasepro/ui 0.17.3 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/dist/components/MultiSelect.d.ts +10 -0
- package/dist/index.es.js +2 -1
- package/dist/index.es.js.map +1 -1
- package/package.json +32 -23
- package/src/components/Alert.tsx +0 -118
- package/src/components/Autocomplete.tsx +0 -93
- package/src/components/Avatar.tsx +0 -73
- package/src/components/Badge.tsx +0 -44
- package/src/components/BooleanSwitch.tsx +0 -116
- package/src/components/BooleanSwitchWithLabel.tsx +0 -120
- package/src/components/Button.tsx +0 -110
- package/src/components/Card.tsx +0 -43
- package/src/components/CenteredView.tsx +0 -35
- package/src/components/Checkbox.tsx +0 -129
- package/src/components/Chip.tsx +0 -131
- package/src/components/CircularProgress.tsx +0 -53
- package/src/components/CircularProgressCenter.tsx +0 -27
- package/src/components/Collapse.tsx +0 -66
- package/src/components/ColorPicker.tsx +0 -140
- package/src/components/Container.tsx +0 -51
- package/src/components/DateTimeField.tsx +0 -363
- package/src/components/DebouncedTextField.tsx +0 -76
- package/src/components/Dialog.tsx +0 -159
- package/src/components/DialogActions.tsx +0 -29
- package/src/components/DialogContent.tsx +0 -27
- package/src/components/DialogTitle.tsx +0 -41
- package/src/components/ErrorBoundary.tsx +0 -236
- package/src/components/ExpandablePanel.tsx +0 -130
- package/src/components/FileUpload.tsx +0 -103
- package/src/components/FilterChip.tsx +0 -89
- package/src/components/IconButton.tsx +0 -101
- package/src/components/InfoLabel.tsx +0 -23
- package/src/components/InputLabel.tsx +0 -40
- package/src/components/Label.tsx +0 -32
- package/src/components/LoadingButton.tsx +0 -32
- package/src/components/Markdown.tsx +0 -55
- package/src/components/Menu.tsx +0 -114
- package/src/components/Menubar.tsx +0 -355
- package/src/components/MultiSelect.tsx +0 -433
- package/src/components/Paper.tsx +0 -23
- package/src/components/Popover.tsx +0 -162
- package/src/components/RadioGroup.tsx +0 -74
- package/src/components/ResizablePanels.tsx +0 -189
- package/src/components/SearchBar.tsx +0 -136
- package/src/components/Select.tsx +0 -326
- package/src/components/Separator.tsx +0 -28
- package/src/components/Sheet.tsx +0 -135
- package/src/components/Skeleton.tsx +0 -54
- package/src/components/Slider.tsx +0 -110
- package/src/components/Table.tsx +0 -178
- package/src/components/Tabs.tsx +0 -185
- package/src/components/TextField.tsx +0 -270
- package/src/components/TextareaAutosize.tsx +0 -368
- package/src/components/ToggleButtonGroup.tsx +0 -69
- package/src/components/Tooltip.tsx +0 -153
- package/src/components/Typography.tsx +0 -132
- package/src/components/VirtualTable/VirtualTable.performance.test.tsx +0 -90
- package/src/components/VirtualTable/VirtualTable.tsx +0 -700
- package/src/components/VirtualTable/VirtualTableCell.tsx +0 -59
- package/src/components/VirtualTable/VirtualTableHeader.tsx +0 -327
- package/src/components/VirtualTable/VirtualTableHeaderRow.tsx +0 -250
- package/src/components/VirtualTable/VirtualTableProps.tsx +0 -339
- package/src/components/VirtualTable/VirtualTableRow.tsx +0 -51
- package/src/components/VirtualTable/fields/VirtualTableDateField.tsx +0 -44
- package/src/components/VirtualTable/fields/VirtualTableInput.tsx +0 -89
- package/src/components/VirtualTable/fields/VirtualTableNumberInput.tsx +0 -71
- package/src/components/VirtualTable/fields/VirtualTableSelect.tsx +0 -107
- package/src/components/VirtualTable/fields/VirtualTableSwitch.tsx +0 -28
- package/src/components/VirtualTable/index.tsx +0 -10
- package/src/components/VirtualTable/selection/SelectionContext.tsx +0 -36
- package/src/components/VirtualTable/selection/SelectionStore.ts +0 -54
- package/src/components/VirtualTable/types.tsx +0 -47
- package/src/components/common/SelectInputLabel.tsx +0 -23
- package/src/components/index.tsx +0 -62
- package/src/hooks/PortalContainerContext.tsx +0 -50
- package/src/hooks/index.ts +0 -7
- package/src/hooks/useDebounceCallback.tsx +0 -21
- package/src/hooks/useDebounceValue.tsx +0 -20
- package/src/hooks/useDebouncedCallback.ts +0 -39
- package/src/hooks/useInjectStyles.tsx +0 -31
- package/src/hooks/useOutsideAlerter.tsx +0 -46
- package/src/icons/GitHubIcon.tsx +0 -21
- package/src/icons/HandleIcon.tsx +0 -23
- package/src/icons/Icon.tsx +0 -33
- package/src/icons/LucideIconByName.tsx +0 -117
- package/src/icons/cool_icon_keys.ts +0 -12
- package/src/icons/icon_keys.ts +0 -1936
- package/src/icons/index.ts +0 -179
- package/src/index.css +0 -169
- package/src/index.ts +0 -47
- package/src/scripts/fixIconSizes.cjs +0 -92
- package/src/scripts/fixIconSizesToConst.cjs +0 -106
- package/src/scripts/generateIconKeys.ts +0 -41
- package/src/scripts/generateIcons.ts +0 -4
- package/src/scripts/saveIconFiles.ts +0 -89
- package/src/styles.ts +0 -141
- package/src/theme.css +0 -168
- package/src/util/chip_colors.ts +0 -242
- package/src/util/cls.ts +0 -8
- package/src/util/debounce.ts +0 -28
- package/src/util/hash.ts +0 -11
- package/src/util/index.ts +0 -4
- package/src/util/key_to_icon_component.ts +0 -11
- package/src/util/lazy_chunk.ts +0 -101
- package/src/views/CardView.tsx +0 -281
- package/src/views/CollectionView/CollectionCardView.tsx +0 -265
- package/src/views/CollectionView/CollectionKanbanView.tsx +0 -246
- package/src/views/CollectionView/CollectionListView.tsx +0 -240
- package/src/views/CollectionView/CollectionTableView.tsx +0 -229
- package/src/views/CollectionView/CollectionView.tsx +0 -450
- package/src/views/CollectionView/CollectionViewToolbar.tsx +0 -242
- package/src/views/CollectionView/CollectionViewTypes.ts +0 -181
- package/src/views/CollectionView/DefaultCellRenderer.tsx +0 -404
- package/src/views/CollectionView/index.ts +0 -39
- package/src/views/CollectionView/resolveTitleProperty.ts +0 -52
- package/src/views/CollectionView/utils.ts +0 -14
- package/src/views/Kanban/Board.tsx +0 -384
- package/src/views/Kanban/BoardColumn.tsx +0 -138
- package/src/views/Kanban/BoardColumnTitle.tsx +0 -47
- package/src/views/Kanban/BoardSortableList.tsx +0 -182
- package/src/views/Kanban/board_types.ts +0 -80
- package/src/views/Kanban/index.tsx +0 -5
- package/src/views/Kanban/placement.ts +0 -62
- package/src/views/KanbanView.tsx +0 -32
- package/src/views/ListView.tsx +0 -296
- package/src/views/index.ts +0 -5
|
@@ -1,355 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import * as React from "react";
|
|
3
|
-
|
|
4
|
-
import * as MenubarPrimitive from "@radix-ui/react-menubar";
|
|
5
|
-
import { cls } from "../util";
|
|
6
|
-
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
7
|
-
import { iconSize } from "../icons/Icon";
|
|
8
|
-
import { usePortalContainer } from "../hooks/PortalContainerContext";
|
|
9
|
-
|
|
10
|
-
export function Menubar({
|
|
11
|
-
children,
|
|
12
|
-
onSelect,
|
|
13
|
-
value,
|
|
14
|
-
defaultValue,
|
|
15
|
-
onValueChange,
|
|
16
|
-
className
|
|
17
|
-
}: {
|
|
18
|
-
children: React.ReactNode,
|
|
19
|
-
onSelect?: (event: React.SyntheticEvent) => void,
|
|
20
|
-
/** Value of the open menu, controlled. Pair with `onValueChange`. */
|
|
21
|
-
value?: string,
|
|
22
|
-
/** Value of the menu open on mount, uncontrolled. */
|
|
23
|
-
defaultValue?: string,
|
|
24
|
-
onValueChange?: (value: string) => void,
|
|
25
|
-
className?: string
|
|
26
|
-
}) {
|
|
27
|
-
return (
|
|
28
|
-
<MenubarPrimitive.Root
|
|
29
|
-
onSelect={onSelect}
|
|
30
|
-
value={value}
|
|
31
|
-
defaultValue={defaultValue}
|
|
32
|
-
onValueChange={onValueChange}
|
|
33
|
-
className={cls("z-10 flex bg-white dark:bg-surface-900 p-[3px] rounded-lg shadow-sm", className)}>
|
|
34
|
-
{children}
|
|
35
|
-
</MenubarPrimitive.Root>
|
|
36
|
-
)
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function MenubarMenu({
|
|
40
|
-
children,
|
|
41
|
-
value
|
|
42
|
-
}: {
|
|
43
|
-
children: React.ReactNode,
|
|
44
|
-
/** Identifies this menu to the parent Menubar's `value`/`defaultValue`. */
|
|
45
|
-
value?: string
|
|
46
|
-
}) {
|
|
47
|
-
return (
|
|
48
|
-
<MenubarPrimitive.Menu value={value}>
|
|
49
|
-
{children}
|
|
50
|
-
</MenubarPrimitive.Menu>
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export function MenubarTrigger({
|
|
55
|
-
children,
|
|
56
|
-
onSelect,
|
|
57
|
-
className
|
|
58
|
-
}: {
|
|
59
|
-
children: React.ReactNode,
|
|
60
|
-
onSelect?: (event: React.SyntheticEvent) => void,
|
|
61
|
-
className?: string
|
|
62
|
-
}) {
|
|
63
|
-
return (
|
|
64
|
-
<MenubarPrimitive.Trigger
|
|
65
|
-
onSelect={onSelect}
|
|
66
|
-
className={cls("py-2 px-3 outline-none select-none font-medium leading-none rounded-md text-text-primary dark:text-text-primary-dark text-sm transition-colors duration-150 flex items-center justify-between gap-[2px] data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-900 data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-900 hover:bg-surface-accent-200 hover:bg-opacity-75 hover:bg-surface-accent-200/75 dark:hover:bg-surface-accent-800",
|
|
67
|
-
className)}>
|
|
68
|
-
{children}
|
|
69
|
-
</MenubarPrimitive.Trigger>
|
|
70
|
-
)
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function MenubarPortal({
|
|
74
|
-
children,
|
|
75
|
-
portalContainer
|
|
76
|
-
}: {
|
|
77
|
-
children: React.ReactNode;
|
|
78
|
-
portalContainer?: HTMLElement | null;
|
|
79
|
-
}) {
|
|
80
|
-
// Get the portal container from context
|
|
81
|
-
const contextContainer = usePortalContainer();
|
|
82
|
-
|
|
83
|
-
// Prioritize manual prop, fallback to context container
|
|
84
|
-
const finalContainer = (portalContainer ?? contextContainer ?? undefined) as HTMLElement | undefined;
|
|
85
|
-
|
|
86
|
-
return (
|
|
87
|
-
<MenubarPrimitive.Portal container={finalContainer}>
|
|
88
|
-
{children}
|
|
89
|
-
</MenubarPrimitive.Portal>
|
|
90
|
-
)
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
export function MenubarContent({
|
|
94
|
-
children,
|
|
95
|
-
className,
|
|
96
|
-
align,
|
|
97
|
-
sideOffset,
|
|
98
|
-
alignOffset,
|
|
99
|
-
onSelect,
|
|
100
|
-
...rest
|
|
101
|
-
}: {
|
|
102
|
-
children: React.ReactNode,
|
|
103
|
-
className?: string,
|
|
104
|
-
onSelect?: (event: React.SyntheticEvent) => void,
|
|
105
|
-
align?: "start" | "center" | "end",
|
|
106
|
-
sideOffset?: number,
|
|
107
|
-
alignOffset?: number
|
|
108
|
-
}) {
|
|
109
|
-
return (
|
|
110
|
-
<MenubarPrimitive.Content
|
|
111
|
-
onSelect={onSelect}
|
|
112
|
-
// `z-50`, the floating layer — see the note in `Menu`. This carried
|
|
113
|
-
// no z-index at all, so the wrapper Radix portals out to the body
|
|
114
|
-
// got `auto` and the menu opened underneath any dialog or panel it
|
|
115
|
-
// was hosted in.
|
|
116
|
-
className={cls("z-50 min-w-[220px] bg-white dark:bg-surface-900 rounded-md p-[6px] shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] [animation-duration:_400ms] [animation-timing-function:_cubic-bezier(0.16,_1,_0.3,_1)] will-change-[transform,opacity]", className)}
|
|
117
|
-
align={align ?? "start"}
|
|
118
|
-
sideOffset={sideOffset ?? 5}
|
|
119
|
-
alignOffset={alignOffset ?? -3}
|
|
120
|
-
{...rest}
|
|
121
|
-
>
|
|
122
|
-
{children}
|
|
123
|
-
</MenubarPrimitive.Content>
|
|
124
|
-
)
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
export function MenubarItem({
|
|
128
|
-
children,
|
|
129
|
-
leftPadding,
|
|
130
|
-
className,
|
|
131
|
-
disabled,
|
|
132
|
-
onSelect,
|
|
133
|
-
...rest
|
|
134
|
-
}: {
|
|
135
|
-
children: React.ReactNode,
|
|
136
|
-
onSelect?: (event: Event) => void;
|
|
137
|
-
leftPadding?: boolean,
|
|
138
|
-
className?: string,
|
|
139
|
-
disabled?: boolean
|
|
140
|
-
}) {
|
|
141
|
-
return (
|
|
142
|
-
<MenubarPrimitive.Item
|
|
143
|
-
onSelect={onSelect}
|
|
144
|
-
className={cls("group text-sm leading-none rounded-md flex items-center h-[32px] px-[10px] py-[2px] relative select-none transition-colors duration-150 outline-none data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-900 data-[state=open]:text-text-primary data-[state=open]:dark:text-text-primary-dark data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-900 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
|
145
|
-
leftPadding ? "pl-5" : "",
|
|
146
|
-
disabled ? "pointer-events-none text-text-secondary dark:text-text-secondary-dark" : "text-text-primary dark:text-text-primary-dark",
|
|
147
|
-
className)}
|
|
148
|
-
disabled={disabled}
|
|
149
|
-
{...rest}
|
|
150
|
-
>
|
|
151
|
-
{children}
|
|
152
|
-
</MenubarPrimitive.Item>
|
|
153
|
-
)
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
export function MenubarSeparator({
|
|
157
|
-
children,
|
|
158
|
-
className,
|
|
159
|
-
...rest
|
|
160
|
-
}: {
|
|
161
|
-
children?: React.ReactNode,
|
|
162
|
-
className?: string,
|
|
163
|
-
}) {
|
|
164
|
-
return (
|
|
165
|
-
<MenubarPrimitive.Separator
|
|
166
|
-
className={cls("h-[1px] bg-surface-accent-100 dark:bg-surface-900 m-[5px]", className)}
|
|
167
|
-
{...rest}
|
|
168
|
-
>
|
|
169
|
-
{children}
|
|
170
|
-
</MenubarPrimitive.Separator>
|
|
171
|
-
)
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export function MenubarSub({
|
|
175
|
-
children,
|
|
176
|
-
...rest
|
|
177
|
-
}: {
|
|
178
|
-
children?: React.ReactNode,
|
|
179
|
-
}) {
|
|
180
|
-
return (
|
|
181
|
-
<MenubarPrimitive.Sub
|
|
182
|
-
{...rest}
|
|
183
|
-
>
|
|
184
|
-
{children}
|
|
185
|
-
</MenubarPrimitive.Sub>
|
|
186
|
-
)
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export function MenubarSubTrigger({
|
|
190
|
-
children,
|
|
191
|
-
className,
|
|
192
|
-
onSelect,
|
|
193
|
-
...rest
|
|
194
|
-
}: {
|
|
195
|
-
children?: React.ReactNode,
|
|
196
|
-
onSelect?: (event: React.SyntheticEvent) => void,
|
|
197
|
-
className?: string,
|
|
198
|
-
}) {
|
|
199
|
-
return (
|
|
200
|
-
<MenubarPrimitive.SubTrigger
|
|
201
|
-
onSelect={onSelect}
|
|
202
|
-
className={cls("group text-sm leading-none text-text-primary dark:text-text-primary-dark rounded-md flex items-center h-[32px] px-[10px] py-[2px] relative select-none transition-colors duration-150 outline-none data-[state=open]:bg-surface-accent-100 data-[state=open]:dark:bg-surface-900 data-[state=open]:text-text-primary data-[state=open]:dark:text-text-primary-dark data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-900 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
|
203
|
-
className)}
|
|
204
|
-
{...rest}
|
|
205
|
-
>
|
|
206
|
-
{children}
|
|
207
|
-
</MenubarPrimitive.SubTrigger>
|
|
208
|
-
)
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
export function MenubarSubContent({
|
|
212
|
-
children,
|
|
213
|
-
alignOffset,
|
|
214
|
-
className,
|
|
215
|
-
onSelect,
|
|
216
|
-
...rest
|
|
217
|
-
}: {
|
|
218
|
-
children?: React.ReactNode,
|
|
219
|
-
onSelect?: (event: React.SyntheticEvent) => void,
|
|
220
|
-
alignOffset?: number,
|
|
221
|
-
className?: string,
|
|
222
|
-
}) {
|
|
223
|
-
return (
|
|
224
|
-
<MenubarPrimitive.SubContent
|
|
225
|
-
onSelect={onSelect}
|
|
226
|
-
alignOffset={alignOffset ?? -5}
|
|
227
|
-
className={cls("min-w-[220px] bg-white dark:bg-surface-900 rounded-md p-[6px] shadow-[0px_10px_38px_-10px_rgba(22,_23,_24,_0.35),_0px_10px_20px_-15px_rgba(22,_23,_24,_0.2)] [animation-duration:_400ms] [animation-timing-function:_cubic-bezier(0.16,_1,_0.3,_1)] will-change-[transform,opacity]",
|
|
228
|
-
className)}
|
|
229
|
-
{...rest}
|
|
230
|
-
>
|
|
231
|
-
{children}
|
|
232
|
-
</MenubarPrimitive.SubContent>
|
|
233
|
-
)
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
export function MenubarCheckboxItem({
|
|
237
|
-
children,
|
|
238
|
-
checked,
|
|
239
|
-
onCheckedChange,
|
|
240
|
-
className,
|
|
241
|
-
onSelect,
|
|
242
|
-
...rest
|
|
243
|
-
}: {
|
|
244
|
-
children?: React.ReactNode,
|
|
245
|
-
onSelect?: (event: Event) => void;
|
|
246
|
-
checked?: boolean,
|
|
247
|
-
onCheckedChange?: () => void,
|
|
248
|
-
className?: string,
|
|
249
|
-
}) {
|
|
250
|
-
return (
|
|
251
|
-
<MenubarPrimitive.CheckboxItem
|
|
252
|
-
onSelect={onSelect}
|
|
253
|
-
className={cls("text-sm leading-none text-text-primary dark:text-text-primary-dark rounded-md flex items-center h-[32px] px-[10px] py-[2px] relative select-none transition-colors duration-150 pl-5 outline-none data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-900 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
|
254
|
-
className)}
|
|
255
|
-
checked={checked}
|
|
256
|
-
onCheckedChange={onCheckedChange}
|
|
257
|
-
{...rest}
|
|
258
|
-
>
|
|
259
|
-
{children}
|
|
260
|
-
</MenubarPrimitive.CheckboxItem>
|
|
261
|
-
)
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
export function MenubarItemIndicator({
|
|
265
|
-
children,
|
|
266
|
-
className,
|
|
267
|
-
...rest
|
|
268
|
-
}: {
|
|
269
|
-
children?: React.ReactNode,
|
|
270
|
-
className?: string,
|
|
271
|
-
}) {
|
|
272
|
-
return (
|
|
273
|
-
<MenubarPrimitive.ItemIndicator
|
|
274
|
-
className={cls("absolute left-0 w-4 inline-flex items-center justify-center", className)}
|
|
275
|
-
{...rest}>
|
|
276
|
-
{children ?? <CheckIcon size={iconSize.smallest}/>}
|
|
277
|
-
</MenubarPrimitive.ItemIndicator>
|
|
278
|
-
)
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export function MenubarRadioGroup({
|
|
282
|
-
children,
|
|
283
|
-
className,
|
|
284
|
-
value,
|
|
285
|
-
onValueChange,
|
|
286
|
-
onSelect,
|
|
287
|
-
...rest
|
|
288
|
-
}: {
|
|
289
|
-
children?: React.ReactNode,
|
|
290
|
-
onSelect?: (event: React.SyntheticEvent) => void,
|
|
291
|
-
value?: string,
|
|
292
|
-
onValueChange?: (value: string) => void,
|
|
293
|
-
className?: string,
|
|
294
|
-
}) {
|
|
295
|
-
return (
|
|
296
|
-
<MenubarPrimitive.RadioGroup
|
|
297
|
-
className={cls(className)}
|
|
298
|
-
value={value}
|
|
299
|
-
onValueChange={onValueChange}
|
|
300
|
-
onSelect={onSelect}
|
|
301
|
-
{...rest}>
|
|
302
|
-
{children ?? <CheckIcon size={iconSize.small}/>}
|
|
303
|
-
</MenubarPrimitive.RadioGroup>
|
|
304
|
-
)
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
export function MenubarRadioItem({
|
|
308
|
-
children,
|
|
309
|
-
className,
|
|
310
|
-
value,
|
|
311
|
-
onSelect,
|
|
312
|
-
...rest
|
|
313
|
-
}: {
|
|
314
|
-
children?: React.ReactNode,
|
|
315
|
-
onSelect?: (event: Event) => void;
|
|
316
|
-
value: string,
|
|
317
|
-
className?: string,
|
|
318
|
-
}) {
|
|
319
|
-
return (
|
|
320
|
-
<MenubarPrimitive.RadioItem
|
|
321
|
-
onSelect={onSelect}
|
|
322
|
-
className={cls("text-sm leading-none text-text-primary dark:text-text-primary-dark rounded-md flex items-center h-[32px] px-[10px] py-[2px] relative select-none transition-colors duration-150 pl-5 outline-none data-[highlighted]:bg-surface-accent-100 data-[highlighted]:dark:bg-surface-900 data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark data-[disabled]:pointer-events-none",
|
|
323
|
-
className)}
|
|
324
|
-
value={value}
|
|
325
|
-
{...rest}>
|
|
326
|
-
{children ?? <CheckIcon size={iconSize.small}/>}
|
|
327
|
-
</MenubarPrimitive.RadioItem>
|
|
328
|
-
)
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
export function MenubarShortcut({
|
|
332
|
-
children,
|
|
333
|
-
className,
|
|
334
|
-
...rest
|
|
335
|
-
}: {
|
|
336
|
-
children?: React.ReactNode,
|
|
337
|
-
className?: string,
|
|
338
|
-
}) {
|
|
339
|
-
return (
|
|
340
|
-
<div
|
|
341
|
-
className={cls("ml-auto pl-5 group-data-[disabled]:text-text-disabled data-[disabled]:dark:text-text-disabled-dark",
|
|
342
|
-
className)}
|
|
343
|
-
{...rest}>
|
|
344
|
-
{children}
|
|
345
|
-
</div>
|
|
346
|
-
)
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
export function MenubarSubTriggerIndicator() {
|
|
350
|
-
return (
|
|
351
|
-
<div className="ml-auto pl-5 ">
|
|
352
|
-
<ChevronRightIcon size={iconSize.small}/>
|
|
353
|
-
</div>
|
|
354
|
-
)
|
|
355
|
-
}
|