torch-glare 2.5.6 → 2.6.0
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 -3
- package/dist/bin/index.js +9 -24
- package/dist/bin/index.js.map +1 -1
- package/dist/src/commands/add.d.ts +2 -2
- package/dist/src/commands/add.d.ts.map +1 -1
- package/dist/src/commands/add.js +4 -70
- package/dist/src/commands/add.js.map +1 -1
- package/dist/src/commands/hook.d.ts +5 -4
- package/dist/src/commands/hook.d.ts.map +1 -1
- package/dist/src/commands/hook.js +7 -75
- package/dist/src/commands/hook.js.map +1 -1
- package/dist/src/commands/init.js +1 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/layout.d.ts +5 -4
- package/dist/src/commands/layout.d.ts.map +1 -1
- package/dist/src/commands/layout.js +7 -75
- package/dist/src/commands/layout.js.map +1 -1
- package/dist/src/commands/provider.d.ts +5 -4
- package/dist/src/commands/provider.d.ts.map +1 -1
- package/dist/src/commands/provider.js +7 -75
- package/dist/src/commands/provider.js.map +1 -1
- package/dist/src/commands/update.d.ts.map +1 -1
- package/dist/src/commands/update.js +78 -43
- package/dist/src/commands/update.js.map +1 -1
- package/dist/src/commands/utils.d.ts +5 -4
- package/dist/src/commands/utils.d.ts.map +1 -1
- package/dist/src/commands/utils.js +7 -80
- package/dist/src/commands/utils.js.map +1 -1
- package/dist/src/shared/addFromRegistry.d.ts +16 -0
- package/dist/src/shared/addFromRegistry.d.ts.map +1 -0
- package/dist/src/shared/addFromRegistry.js +88 -0
- package/dist/src/shared/addFromRegistry.js.map +1 -0
- package/dist/src/shared/getInstallCommand.d.ts.map +1 -1
- package/dist/src/shared/getInstallCommand.js +5 -0
- package/dist/src/shared/getInstallCommand.js.map +1 -1
- package/dist/src/shared/installDependencies.d.ts +0 -10
- package/dist/src/shared/installDependencies.d.ts.map +1 -1
- package/dist/src/shared/installDependencies.js +0 -17
- package/dist/src/shared/installDependencies.js.map +1 -1
- package/dist/src/shared/installFromPlan.d.ts +7 -5
- package/dist/src/shared/installFromPlan.d.ts.map +1 -1
- package/dist/src/shared/installFromPlan.js +103 -36
- package/dist/src/shared/installFromPlan.js.map +1 -1
- package/dist/src/shared/loadRegistry.d.ts +12 -3
- package/dist/src/shared/loadRegistry.d.ts.map +1 -1
- package/dist/src/shared/loadRegistry.js +19 -20
- package/dist/src/shared/loadRegistry.js.map +1 -1
- package/dist/src/shared/registryClient.d.ts +19 -0
- package/dist/src/shared/registryClient.d.ts.map +1 -0
- package/dist/src/shared/registryClient.js +128 -0
- package/dist/src/shared/registryClient.js.map +1 -0
- package/dist/src/shared/resolveEntry.d.ts +10 -7
- package/dist/src/shared/resolveEntry.d.ts.map +1 -1
- package/dist/src/shared/resolveEntry.js +18 -13
- package/dist/src/shared/resolveEntry.js.map +1 -1
- package/dist/src/shared/suggestOtherCommand.d.ts +7 -1
- package/dist/src/shared/suggestOtherCommand.d.ts.map +1 -1
- package/dist/src/shared/suggestOtherCommand.js +29 -23
- package/dist/src/shared/suggestOtherCommand.js.map +1 -1
- package/dist/src/types/main.d.ts +31 -2
- package/dist/src/types/main.d.ts.map +1 -1
- package/package.json +6 -11
- package/apps/lib/components/ActionButton.tsx +0 -93
- package/apps/lib/components/ActionsGroup.tsx +0 -27
- package/apps/lib/components/AlertDialog.tsx +0 -204
- package/apps/lib/components/Avatar.tsx +0 -46
- package/apps/lib/components/Badge.tsx +0 -250
- package/apps/lib/components/BadgeField.tsx +0 -403
- package/apps/lib/components/Breadcrumb.tsx +0 -280
- package/apps/lib/components/Button.tsx +0 -325
- package/apps/lib/components/ButtonGroup.tsx +0 -190
- package/apps/lib/components/Calendar.tsx +0 -115
- package/apps/lib/components/Card.tsx +0 -95
- package/apps/lib/components/Checkbox.tsx +0 -42
- package/apps/lib/components/ColorPicker.tsx +0 -441
- package/apps/lib/components/ConclusionHeader.tsx +0 -148
- package/apps/lib/components/ContextMenu.tsx +0 -571
- package/apps/lib/components/CountBadge.tsx +0 -52
- package/apps/lib/components/DataTable.tsx +0 -213
- package/apps/lib/components/DataViews/badge.ts +0 -49
- package/apps/lib/components/DataViews/cell.tsx +0 -324
- package/apps/lib/components/DataViews/context.ts +0 -144
- package/apps/lib/components/DataViews/data-views.tsx +0 -395
- package/apps/lib/components/DataViews/filters/children.tsx +0 -98
- package/apps/lib/components/DataViews/filters/custom.tsx +0 -34
- package/apps/lib/components/DataViews/filters/filters.tsx +0 -157
- package/apps/lib/components/DataViews/filters/index.ts +0 -4
- package/apps/lib/components/DataViews/filters/labelled.tsx +0 -20
- package/apps/lib/components/DataViews/filters/presets.tsx +0 -65
- package/apps/lib/components/DataViews/filters/sync.tsx +0 -35
- package/apps/lib/components/DataViews/filters/values.ts +0 -173
- package/apps/lib/components/DataViews/header.tsx +0 -220
- package/apps/lib/components/DataViews/hooks/index.ts +0 -5
- package/apps/lib/components/DataViews/hooks/useActiveRow.ts +0 -22
- package/apps/lib/components/DataViews/hooks/useControllable.ts +0 -52
- package/apps/lib/components/DataViews/index.ts +0 -88
- package/apps/lib/components/DataViews/panel/columns.tsx +0 -153
- package/apps/lib/components/DataViews/panel/controls.tsx +0 -106
- package/apps/lib/components/DataViews/panel/index.ts +0 -3
- package/apps/lib/components/DataViews/panel/panel.tsx +0 -164
- package/apps/lib/components/DataViews/panel/saved-views.tsx +0 -67
- package/apps/lib/components/DataViews/panel/section.tsx +0 -81
- package/apps/lib/components/DataViews/panel/sort.tsx +0 -42
- package/apps/lib/components/DataViews/panel/tab.tsx +0 -31
- package/apps/lib/components/DataViews/slots.ts +0 -72
- package/apps/lib/components/DataViews/states.tsx +0 -73
- package/apps/lib/components/DataViews/types.ts +0 -510
- package/apps/lib/components/DataViews/views/board-view.tsx +0 -381
- package/apps/lib/components/DataViews/views/card-rows.tsx +0 -36
- package/apps/lib/components/DataViews/views/inbox-view.tsx +0 -260
- package/apps/lib/components/DataViews/views/pane-views.tsx +0 -196
- package/apps/lib/components/DataViews/views/table-view.tsx +0 -493
- package/apps/lib/components/DataViews/views/tree-view.tsx +0 -367
- package/apps/lib/components/DatePicker.tsx +0 -232
- package/apps/lib/components/Dialog.tsx +0 -116
- package/apps/lib/components/Divider.tsx +0 -28
- package/apps/lib/components/Drawer.tsx +0 -451
- package/apps/lib/components/DropdownMenu.tsx +0 -554
- package/apps/lib/components/FieldHint.tsx +0 -69
- package/apps/lib/components/Form.tsx +0 -182
- package/apps/lib/components/FormBuilder/context.ts +0 -85
- package/apps/lib/components/FormBuilder/field-kind.ts +0 -28
- package/apps/lib/components/FormBuilder/fields/ChoiceFields.tsx +0 -60
- package/apps/lib/components/FormBuilder/fields/ColorField.tsx +0 -59
- package/apps/lib/components/FormBuilder/fields/CustomField.tsx +0 -11
- package/apps/lib/components/FormBuilder/fields/DateField.tsx +0 -32
- package/apps/lib/components/FormBuilder/fields/FieldArray.tsx +0 -74
- package/apps/lib/components/FormBuilder/fields/FieldShell.tsx +0 -168
- package/apps/lib/components/FormBuilder/fields/FileField.tsx +0 -39
- package/apps/lib/components/FormBuilder/fields/OptionListFields.tsx +0 -132
- package/apps/lib/components/FormBuilder/fields/OtpField.tsx +0 -31
- package/apps/lib/components/FormBuilder/fields/PhoneField.tsx +0 -109
- package/apps/lib/components/FormBuilder/fields/RichTextEditorField.tsx +0 -31
- package/apps/lib/components/FormBuilder/fields/SelectField.tsx +0 -114
- package/apps/lib/components/FormBuilder/fields/SignatureField.tsx +0 -157
- package/apps/lib/components/FormBuilder/fields/SliderField.tsx +0 -67
- package/apps/lib/components/FormBuilder/fields/SwitchBoxField.tsx +0 -41
- package/apps/lib/components/FormBuilder/fields/TableField.tsx +0 -336
- package/apps/lib/components/FormBuilder/fields/TextField.tsx +0 -213
- package/apps/lib/components/FormBuilder/fields/TreeSelectField.tsx +0 -43
- package/apps/lib/components/FormBuilder/fields/countries.ts +0 -303
- package/apps/lib/components/FormBuilder/fields/index.ts +0 -25
- package/apps/lib/components/FormBuilder/form-builder.tsx +0 -198
- package/apps/lib/components/FormBuilder/index.ts +0 -31
- package/apps/lib/components/FormBuilder/numberFormat.ts +0 -16
- package/apps/lib/components/FormBuilder/submit.tsx +0 -67
- package/apps/lib/components/FormBuilder/types.ts +0 -316
- package/apps/lib/components/FormRenderer/FormDrawer.tsx +0 -250
- package/apps/lib/components/FormRenderer/detail.tsx +0 -256
- package/apps/lib/components/FormRenderer/form-renderer.tsx +0 -358
- package/apps/lib/components/FormRenderer/header.tsx +0 -88
- package/apps/lib/components/FormRenderer/index.ts +0 -17
- package/apps/lib/components/FormRenderer/notch-action.tsx +0 -64
- package/apps/lib/components/FormRenderer/section.tsx +0 -39
- package/apps/lib/components/FormRenderer/stepper.tsx +0 -393
- package/apps/lib/components/FormRenderer/types.ts +0 -115
- package/apps/lib/components/FormSummary.tsx +0 -282
- package/apps/lib/components/HeaderBar.tsx +0 -117
- package/apps/lib/components/ImageAttachment.tsx +0 -209
- package/apps/lib/components/InnerLabelField.tsx +0 -154
- package/apps/lib/components/Input.tsx +0 -224
- package/apps/lib/components/InputField.tsx +0 -147
- package/apps/lib/components/InputOTP.tsx +0 -84
- package/apps/lib/components/Label.tsx +0 -129
- package/apps/lib/components/LabelField.tsx +0 -76
- package/apps/lib/components/LabeledCheckBox.tsx +0 -51
- package/apps/lib/components/LabeledRadio.tsx +0 -51
- package/apps/lib/components/LinkButton.tsx +0 -94
- package/apps/lib/components/LoginButton.tsx +0 -51
- package/apps/lib/components/PasswordLevel.tsx +0 -58
- package/apps/lib/components/Popover.tsx +0 -312
- package/apps/lib/components/ProfileMenu.tsx +0 -85
- package/apps/lib/components/Radio.tsx +0 -59
- package/apps/lib/components/RadioCard.tsx +0 -50
- package/apps/lib/components/ScrollArea.tsx +0 -54
- package/apps/lib/components/SearchField.tsx +0 -62
- package/apps/lib/components/SearchableSelect.tsx +0 -318
- package/apps/lib/components/SearchableTable.tsx +0 -344
- package/apps/lib/components/SearchableTree.tsx +0 -485
- package/apps/lib/components/SearchableTreeDialog.tsx +0 -502
- package/apps/lib/components/SectionBlock.tsx +0 -168
- package/apps/lib/components/Select.tsx +0 -347
- package/apps/lib/components/SimpleSelect.tsx +0 -225
- package/apps/lib/components/Skeleton.tsx +0 -12
- package/apps/lib/components/SlideDatePicker.tsx +0 -255
- package/apps/lib/components/SpinLoading.tsx +0 -174
- package/apps/lib/components/Stepper.tsx +0 -480
- package/apps/lib/components/Switch.tsx +0 -82
- package/apps/lib/components/TabFormItem.tsx +0 -153
- package/apps/lib/components/TabSwitch.tsx +0 -172
- package/apps/lib/components/Table.tsx +0 -597
- package/apps/lib/components/TextEditor/ChartBlockTool.ts +0 -676
- package/apps/lib/components/TextEditor/RichTextField.tsx +0 -46
- package/apps/lib/components/TextEditor/TableDnDWrapper.ts +0 -462
- package/apps/lib/components/TextEditor/TextEditor.tsx +0 -1164
- package/apps/lib/components/TextEditor/TextEditorToolbar.tsx +0 -429
- package/apps/lib/components/TextEditor/editor-tools/AlignmentTune.ts +0 -70
- package/apps/lib/components/TextEditor/editor-tools/ColorInlineTool.ts +0 -50
- package/apps/lib/components/TextEditor/editor-tools/StrikethroughInlineTool.ts +0 -48
- package/apps/lib/components/TextEditor/editor-tools/inlineFormat.ts +0 -98
- package/apps/lib/components/TextEditor/editorjs.d.ts +0 -60
- package/apps/lib/components/TextEditor/index.ts +0 -7
- package/apps/lib/components/TextEditor/markdownParser.ts +0 -346
- package/apps/lib/components/Textarea.tsx +0 -117
- package/apps/lib/components/Timeline.tsx +0 -263
- package/apps/lib/components/Toast.tsx +0 -87
- package/apps/lib/components/Toggle.tsx +0 -125
- package/apps/lib/components/ToggleButton.tsx +0 -140
- package/apps/lib/components/Tooltip.tsx +0 -116
- package/apps/lib/components/TransparentLabel.tsx +0 -71
- package/apps/lib/components/TreeDropDown.tsx +0 -115
- package/apps/lib/components/TreeFolder/TreeFolder.tsx +0 -380
- package/apps/lib/components/TreeFolder/TreeFolderBreadcrumb.tsx +0 -75
- package/apps/lib/components/TreeFolder/TreeFolderRow.tsx +0 -354
- package/apps/lib/components/TreeFolder/TreeFolderStyles.tsx +0 -60
- package/apps/lib/components/TreeFolder/icons.tsx +0 -60
- package/apps/lib/components/TreeFolder/index.ts +0 -24
- package/apps/lib/components/TreeFolder/treeFolderUtils.ts +0 -109
- package/apps/lib/components/TreeFolder/types.ts +0 -77
- package/apps/lib/components/TreeFolder/useTreeFolderDnD.ts +0 -118
- package/apps/lib/hooks/useActiveTreeItem.ts +0 -61
- package/apps/lib/hooks/useClickOutside.ts +0 -27
- package/apps/lib/hooks/useDragDrop.tsx +0 -365
- package/apps/lib/hooks/useHtmlDir.ts +0 -31
- package/apps/lib/hooks/useInfiniteScroll.ts +0 -108
- package/apps/lib/hooks/useIsMobile.ts +0 -21
- package/apps/lib/hooks/useResize.ts +0 -67
- package/apps/lib/hooks/useTagSelection.ts +0 -300
- package/apps/lib/layouts/CNLayout.tsx +0 -372
- package/apps/lib/layouts/DataViewCard.tsx +0 -62
- package/apps/lib/layouts/FieldSection.tsx +0 -91
- package/apps/lib/layouts/TreeSubLayout.tsx +0 -173
- package/apps/lib/providers/ThemeProvider.tsx +0 -84
- package/apps/lib/registry.json +0 -1217
- package/apps/lib/tsconfig.json +0 -9
- package/apps/lib/tsconfig.tsbuildinfo +0 -1
- package/apps/lib/utils/cn.ts +0 -6
- package/apps/lib/utils/color.ts +0 -175
- package/apps/lib/utils/dataViews/path.ts +0 -67
- package/apps/lib/utils/dataViews/query.ts +0 -73
- package/apps/lib/utils/dataViews/types.ts +0 -187
- package/apps/lib/utils/dateFormat.ts +0 -108
- package/apps/lib/utils/resize.ts +0 -31
- package/apps/lib/utils/scroller.ts +0 -26
- package/apps/lib/utils/types.ts +0 -16
- package/docs/BLOCKS.md +0 -129
- package/docs/CHANGELOG-1.1.16.md +0 -108
- package/docs/Cover.png +0 -0
- package/docs/README.md +0 -215
- package/docs/components/action-button.md +0 -638
- package/docs/components/actions-group.md +0 -708
- package/docs/components/alert-dialog.md +0 -920
- package/docs/components/avatar.md +0 -709
- package/docs/components/badge-field.md +0 -738
- package/docs/components/badge.md +0 -301
- package/docs/components/breadcrumb.md +0 -930
- package/docs/components/button-group.md +0 -650
- package/docs/components/button.md +0 -639
- package/docs/components/calendar.md +0 -555
- package/docs/components/card.md +0 -622
- package/docs/components/chart-block-tool.md +0 -129
- package/docs/components/checkbox.md +0 -699
- package/docs/components/cn-layout.md +0 -854
- package/docs/components/color-picker.md +0 -101
- package/docs/components/conclusion-header.md +0 -80
- package/docs/components/context-menu.md +0 -483
- package/docs/components/count-badge.md +0 -560
- package/docs/components/data-table.md +0 -854
- package/docs/components/data-views/backend-response.md +0 -324
- package/docs/components/data-views/examples/a11y-rtl.md +0 -250
- package/docs/components/data-views/examples/api-orders-route.md +0 -130
- package/docs/components/data-views/examples/fields.md +0 -362
- package/docs/components/data-views/examples/filters.md +0 -307
- package/docs/components/data-views/examples/inbox-routing.md +0 -218
- package/docs/components/data-views/examples/index.md +0 -29
- package/docs/components/data-views/examples/overview.md +0 -244
- package/docs/components/data-views/examples/panel.md +0 -212
- package/docs/components/data-views/examples/scale.md +0 -231
- package/docs/components/data-views/examples/server-side.md +0 -210
- package/docs/components/data-views/examples/state.md +0 -250
- package/docs/components/data-views/examples/tree-custom.md +0 -388
- package/docs/components/data-views/examples/view-registry.md +0 -313
- package/docs/components/data-views/examples/views.md +0 -534
- package/docs/components/data-views/guide.md +0 -405
- package/docs/components/data-views/index.md +0 -1521
- package/docs/components/data-views/migration.md +0 -81
- package/docs/components/date-picker.md +0 -857
- package/docs/components/dialog.md +0 -929
- package/docs/components/divider.md +0 -766
- package/docs/components/drawer.md +0 -654
- package/docs/components/dropdown-menu.md +0 -668
- package/docs/components/field-hint.md +0 -898
- package/docs/components/field-section.md +0 -781
- package/docs/components/form-builder.md +0 -284
- package/docs/components/form-renderer.md +0 -396
- package/docs/components/form-summary.md +0 -138
- package/docs/components/form.md +0 -785
- package/docs/components/header-bar.md +0 -188
- package/docs/components/image-attachment.md +0 -906
- package/docs/components/inner-label-field.md +0 -819
- package/docs/components/input-field.md +0 -623
- package/docs/components/input-otp.md +0 -756
- package/docs/components/input.md +0 -634
- package/docs/components/label-field.md +0 -770
- package/docs/components/label.md +0 -761
- package/docs/components/labeled-check-box.md +0 -642
- package/docs/components/labeled-radio.md +0 -796
- package/docs/components/link-button.md +0 -685
- package/docs/components/login-button.md +0 -872
- package/docs/components/password-level.md +0 -803
- package/docs/components/popover.md +0 -649
- package/docs/components/profile-menu.md +0 -656
- package/docs/components/radio-card.md +0 -801
- package/docs/components/radio.md +0 -735
- package/docs/components/scroll-area.md +0 -691
- package/docs/components/search-field.md +0 -702
- package/docs/components/searchable-select.md +0 -368
- package/docs/components/searchable-table.md +0 -438
- package/docs/components/searchable-tree-dialog.md +0 -190
- package/docs/components/searchable-tree.md +0 -200
- package/docs/components/section-block.md +0 -483
- package/docs/components/select.md +0 -709
- package/docs/components/simple-select.md +0 -741
- package/docs/components/skeleton.md +0 -706
- package/docs/components/slide-date-picker.md +0 -837
- package/docs/components/spin-loading.md +0 -696
- package/docs/components/stepper.md +0 -316
- package/docs/components/switch.md +0 -770
- package/docs/components/tab-form-item.md +0 -773
- package/docs/components/tab-switch.md +0 -170
- package/docs/components/table-dnd-wrapper.md +0 -107
- package/docs/components/table.md +0 -1088
- package/docs/components/text-editor.md +0 -735
- package/docs/components/textarea.md +0 -681
- package/docs/components/timeline.md +0 -254
- package/docs/components/toast.md +0 -773
- package/docs/components/toggle-button.md +0 -643
- package/docs/components/toggle.md +0 -882
- package/docs/components/tooltip.md +0 -513
- package/docs/components/transparent-label.md +0 -721
- package/docs/components/tree-drop-down.md +0 -740
- package/docs/components/tree-folder.md +0 -110
- package/docs/components/tree-sub-layout.md +0 -707
- package/docs/explanation/architecture.md +0 -54
- package/docs/explanation/design-system.md +0 -52
- package/docs/how-to/form-and-list-recipes.md +0 -386
- package/docs/how-to/forms-with-form-builder.md +0 -472
- package/docs/how-to/guides.md +0 -1027
- package/docs/migration/changelog.md +0 -60
- package/docs/migration/form-builder-2.5.2.md +0 -113
- package/docs/reference/cli.md +0 -112
- package/docs/reference/components.md +0 -572
- package/docs/reference/hooks.md +0 -1523
- package/docs/reference/providers.md +0 -866
- package/docs/reference/tailwind-plugins.md +0 -942
- package/docs/reference/theme.md +0 -85
- package/docs/reference/types.md +0 -1016
- package/docs/reference/utilities.md +0 -726
- package/docs/tutorials/building-first-form.md +0 -846
- package/docs/tutorials/component-composition.md +0 -882
- package/docs/tutorials/getting-started.md +0 -302
- package/docs/tutorials/theming-basics.md +0 -785
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
4
|
-
import { cn } from "../utils/cn";
|
|
5
|
-
import { cva, VariantProps } from "class-variance-authority";
|
|
6
|
-
import { ActionButton } from "./ActionButton";
|
|
7
|
-
import { MenuItemStyles } from "./DropdownMenu";
|
|
8
|
-
import { Themes } from "../utils/types";
|
|
9
|
-
|
|
10
|
-
const Select = SelectPrimitive.Root;
|
|
11
|
-
|
|
12
|
-
const SelectGroup = SelectPrimitive.Group;
|
|
13
|
-
|
|
14
|
-
const SelectValue = SelectPrimitive.Value;
|
|
15
|
-
|
|
16
|
-
const SelectTrigger = React.forwardRef<
|
|
17
|
-
React.ElementRef<typeof SelectPrimitive.Trigger>,
|
|
18
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> &
|
|
19
|
-
VariantProps<typeof PopoverTriggerStyles> & {
|
|
20
|
-
/** Marks the trigger invalid: any non-undefined value turns on the negative border. */
|
|
21
|
-
errors?: string;
|
|
22
|
-
icon?: string;
|
|
23
|
-
theme?: Themes;
|
|
24
|
-
}
|
|
25
|
-
>(
|
|
26
|
-
(
|
|
27
|
-
{
|
|
28
|
-
className,
|
|
29
|
-
children,
|
|
30
|
-
size = "M",
|
|
31
|
-
variant = "PresentationStyle",
|
|
32
|
-
errors,
|
|
33
|
-
theme,
|
|
34
|
-
icon,
|
|
35
|
-
onTable,
|
|
36
|
-
...props
|
|
37
|
-
},
|
|
38
|
-
ref,
|
|
39
|
-
) => {
|
|
40
|
-
return (
|
|
41
|
-
<SelectPrimitive.Trigger
|
|
42
|
-
data-theme={theme}
|
|
43
|
-
ref={ref}
|
|
44
|
-
className={cn(
|
|
45
|
-
PopoverTriggerStyles({
|
|
46
|
-
size,
|
|
47
|
-
variant,
|
|
48
|
-
error: errors !== undefined,
|
|
49
|
-
onTable,
|
|
50
|
-
}),
|
|
51
|
-
className,
|
|
52
|
-
)}
|
|
53
|
-
{...props}
|
|
54
|
-
>
|
|
55
|
-
<p
|
|
56
|
-
className={cn({
|
|
57
|
-
"[&_span]:text-[#A0A0A0]": !props.value,
|
|
58
|
-
})}
|
|
59
|
-
>
|
|
60
|
-
{children}
|
|
61
|
-
</p>
|
|
62
|
-
|
|
63
|
-
{/* The shared in-field action button. Its box tracks the trigger height the same way
|
|
64
|
-
InputField's does — a 30px field takes the 22px button, a 40px field the 32px one. */}
|
|
65
|
-
<ActionButton
|
|
66
|
-
as={"span"}
|
|
67
|
-
size={size === "XL" ? "M" : size === "S" ? "XS" : "S"}
|
|
68
|
-
className={cn([
|
|
69
|
-
"group-aria-expanded:bg-background-presentation-action-hover",
|
|
70
|
-
"group-aria-expanded:text-white",
|
|
71
|
-
])}
|
|
72
|
-
>
|
|
73
|
-
<i
|
|
74
|
-
className={cn(
|
|
75
|
-
"ri-arrow-down-s-line transition-all duration-100 ease-in-out group-aria-expanded:rotate-180",
|
|
76
|
-
{ "!text-[12px]": size === "S" },
|
|
77
|
-
{ "!text-[16px]": size === "M" },
|
|
78
|
-
{ "!text-[18px]": size === "L" },
|
|
79
|
-
{ "!text-[26px]": size === "XL" },
|
|
80
|
-
{ icon: icon },
|
|
81
|
-
)}
|
|
82
|
-
/>
|
|
83
|
-
</ActionButton>
|
|
84
|
-
</SelectPrimitive.Trigger>
|
|
85
|
-
);
|
|
86
|
-
},
|
|
87
|
-
);
|
|
88
|
-
SelectTrigger.displayName = "SelectTrigger";
|
|
89
|
-
|
|
90
|
-
const SelectScrollUpButton = React.forwardRef<
|
|
91
|
-
React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,
|
|
92
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>
|
|
93
|
-
>(({ className, ...props }, ref) => (
|
|
94
|
-
<SelectPrimitive.ScrollUpButton
|
|
95
|
-
ref={ref}
|
|
96
|
-
className={cn("flex cursor-default items-center justify-center py-1 ", className)}
|
|
97
|
-
{...props}
|
|
98
|
-
>
|
|
99
|
-
<i
|
|
100
|
-
className="h-4 w-4 ri-arrow-up-s-line"
|
|
101
|
-
color={"var(--content-presentation-action-light-primary)"}
|
|
102
|
-
/>
|
|
103
|
-
</SelectPrimitive.ScrollUpButton>
|
|
104
|
-
));
|
|
105
|
-
SelectScrollUpButton.displayName = "SelectScrollUpButton";
|
|
106
|
-
|
|
107
|
-
const SelectScrollDownButton = React.forwardRef<
|
|
108
|
-
React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,
|
|
109
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>
|
|
110
|
-
>(({ className, ...props }, ref) => (
|
|
111
|
-
<SelectPrimitive.ScrollDownButton
|
|
112
|
-
ref={ref}
|
|
113
|
-
className={cn("flex cursor-default items-center justify-center py-1", className)}
|
|
114
|
-
{...props}
|
|
115
|
-
>
|
|
116
|
-
<i
|
|
117
|
-
color={"var(--content-presentation-action-light-primary)"}
|
|
118
|
-
className="h-4 w-4 ri-arrow-down-s-line"
|
|
119
|
-
/>
|
|
120
|
-
</SelectPrimitive.ScrollDownButton>
|
|
121
|
-
));
|
|
122
|
-
SelectScrollDownButton.displayName = "SelectScrollDownButton";
|
|
123
|
-
|
|
124
|
-
const SelectContent = React.forwardRef<
|
|
125
|
-
React.ElementRef<typeof SelectPrimitive.Content>,
|
|
126
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content> &
|
|
127
|
-
VariantProps<typeof SelectContentStyles> & {
|
|
128
|
-
theme?: Themes;
|
|
129
|
-
}
|
|
130
|
-
>(
|
|
131
|
-
(
|
|
132
|
-
{ className, children, variant = "PresentationStyle", position = "popper", theme, ...props },
|
|
133
|
-
ref,
|
|
134
|
-
) => (
|
|
135
|
-
<SelectPrimitive.Portal>
|
|
136
|
-
<SelectPrimitive.Content
|
|
137
|
-
data-theme={theme}
|
|
138
|
-
ref={ref}
|
|
139
|
-
className={cn(SelectContentStyles({ variant }), className)}
|
|
140
|
-
position={position}
|
|
141
|
-
// Never taller than 368px, and never taller than the space Radix has on screen. Valid because
|
|
142
|
-
// `position` defaults to "popper", which is what publishes the variable.
|
|
143
|
-
style={{
|
|
144
|
-
maxHeight: "min(368px, var(--radix-select-content-available-height, 100vh))",
|
|
145
|
-
...props.style,
|
|
146
|
-
}}
|
|
147
|
-
{...props}
|
|
148
|
-
>
|
|
149
|
-
{/* Dedicated scroll viewport + boxed group, matching SearchableSelect's menu surface.
|
|
150
|
-
`flex-1 min-h-0` is what makes it scroll: without `min-h-0` a flex item refuses to shrink
|
|
151
|
-
below its content, so the list grew past the panel and `overflow-hidden` simply clipped
|
|
152
|
-
the rows off with no scrollbar. */}
|
|
153
|
-
<SelectPrimitive.Viewport className="flex-1 min-h-0 overflow-y-auto overflow-x-hidden rounded-[10px] scrollbar-hide">
|
|
154
|
-
<div className="flex flex-col gap-[1px] overflow-hidden rounded-[10px]">{children}</div>
|
|
155
|
-
</SelectPrimitive.Viewport>
|
|
156
|
-
</SelectPrimitive.Content>
|
|
157
|
-
</SelectPrimitive.Portal>
|
|
158
|
-
),
|
|
159
|
-
);
|
|
160
|
-
SelectContent.displayName = "SelectContent";
|
|
161
|
-
|
|
162
|
-
const SelectLabel = React.forwardRef<
|
|
163
|
-
React.ElementRef<typeof SelectPrimitive.Label>,
|
|
164
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>
|
|
165
|
-
>(({ className, ...props }, ref) => (
|
|
166
|
-
<SelectPrimitive.Label
|
|
167
|
-
ref={ref}
|
|
168
|
-
className={cn("px-2 py-1.5 text-sm font-semibold", className)}
|
|
169
|
-
{...props}
|
|
170
|
-
/>
|
|
171
|
-
));
|
|
172
|
-
SelectLabel.displayName = "SelectLabel";
|
|
173
|
-
|
|
174
|
-
const SelectItem = React.forwardRef<
|
|
175
|
-
React.ElementRef<typeof SelectPrimitive.Item>,
|
|
176
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item> & VariantProps<typeof MenuItemStyles>
|
|
177
|
-
>(({ className, children, size = "M", variant = "Default", active, ...props }, ref) => (
|
|
178
|
-
// Same structure as DropdownMenuItem / SearchableSelect: MenuItemStyles on the element
|
|
179
|
-
// + a single inner <div> the styles target via [&>div], and a check on the selected row.
|
|
180
|
-
<SelectPrimitive.Item
|
|
181
|
-
ref={ref}
|
|
182
|
-
className={cn(MenuItemStyles({ variant, active, size }), "shrink-0", className)}
|
|
183
|
-
{...props}
|
|
184
|
-
>
|
|
185
|
-
<div>
|
|
186
|
-
<SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
|
|
187
|
-
<SelectPrimitive.ItemIndicator className="ms-auto flex shrink-0">
|
|
188
|
-
<i className="ri-check-line text-[16px]" />
|
|
189
|
-
</SelectPrimitive.ItemIndicator>
|
|
190
|
-
</div>
|
|
191
|
-
</SelectPrimitive.Item>
|
|
192
|
-
));
|
|
193
|
-
|
|
194
|
-
SelectItem.displayName = "SelectItem";
|
|
195
|
-
|
|
196
|
-
const SelectSeparator = React.forwardRef<
|
|
197
|
-
React.ElementRef<typeof SelectPrimitive.Separator>,
|
|
198
|
-
React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>
|
|
199
|
-
>(({ className, ...props }, ref) => (
|
|
200
|
-
<SelectPrimitive.Separator
|
|
201
|
-
ref={ref}
|
|
202
|
-
className={cn("-mx-1 my-1 h-px bg-muted", className)}
|
|
203
|
-
{...props}
|
|
204
|
-
/>
|
|
205
|
-
));
|
|
206
|
-
SelectSeparator.displayName = "SelectSeparator";
|
|
207
|
-
|
|
208
|
-
export {
|
|
209
|
-
Select,
|
|
210
|
-
SelectGroup,
|
|
211
|
-
SelectValue,
|
|
212
|
-
SelectTrigger,
|
|
213
|
-
SelectContent,
|
|
214
|
-
SelectLabel,
|
|
215
|
-
SelectItem,
|
|
216
|
-
SelectSeparator,
|
|
217
|
-
SelectScrollUpButton,
|
|
218
|
-
SelectScrollDownButton,
|
|
219
|
-
};
|
|
220
|
-
|
|
221
|
-
// NOTE: radix select as DropDownButton
|
|
222
|
-
|
|
223
|
-
// Panel surface mirrors SearchableSelect's `menuContentStyles` (translucent, backdrop-blurred,
|
|
224
|
-
// borderless, rounded-14). `min-w`/`z-index` are kept for the Radix Select portal.
|
|
225
|
-
const SelectContentStyles = cva(
|
|
226
|
-
[
|
|
227
|
-
"p-1",
|
|
228
|
-
"rounded-[14px]",
|
|
229
|
-
// Match the dropdown to the trigger's width (Radix popper exposes it as a CSS var),
|
|
230
|
-
// but never narrower than 240px.
|
|
231
|
-
"w-[var(--radix-select-trigger-width)]",
|
|
232
|
-
"min-w-[240px]",
|
|
233
|
-
"border-0",
|
|
234
|
-
"outline-none",
|
|
235
|
-
"overflow-hidden",
|
|
236
|
-
"backdrop-blur-[21px]",
|
|
237
|
-
"flex flex-col gap-1",
|
|
238
|
-
"data-[state=open]:animate-in",
|
|
239
|
-
"data-[state=open]:fade-in-0",
|
|
240
|
-
"z-[1000]",
|
|
241
|
-
// Panel height is set inline below from `min(368px, available-height)`; the class is kept off
|
|
242
|
-
// deliberately so the inline value governs.
|
|
243
|
-
],
|
|
244
|
-
{
|
|
245
|
-
variants: {
|
|
246
|
-
variant: {
|
|
247
|
-
SystemStyle: [
|
|
248
|
-
"bg-background-system-body-primary",
|
|
249
|
-
"shadow-[0px_0px_18px_0px_rgba(0,0,0,0.75)]",
|
|
250
|
-
],
|
|
251
|
-
PresentationStyle: [
|
|
252
|
-
"bg-[rgba(61,64,69,0.72)]",
|
|
253
|
-
"shadow-[0_0_32px_2px_rgba(0,0,0,0.20),0_0_48px_2px_rgba(0,0,0,0.05)]",
|
|
254
|
-
],
|
|
255
|
-
},
|
|
256
|
-
defaultVariants: {
|
|
257
|
-
variant: "PresentationStyle",
|
|
258
|
-
},
|
|
259
|
-
},
|
|
260
|
-
},
|
|
261
|
-
);
|
|
262
|
-
|
|
263
|
-
const PopoverTriggerStyles = cva(
|
|
264
|
-
[
|
|
265
|
-
// No radius here — every `size` variant sets its own. `twMerge` does NOT dedupe the
|
|
266
|
-
// `rounded-radius-*` classes (they are custom scale keys, not values it recognises), so a
|
|
267
|
-
// radius on the base would survive alongside the variant's and let CSS source order pick the
|
|
268
|
-
// winner: `md` is generated before `lg`, so a base `lg` would silently beat size S's `md`.
|
|
269
|
-
"flex flex-row justify-between items-center outline-none",
|
|
270
|
-
"[&_span]:text-content-presentation-action-light-primary",
|
|
271
|
-
"typography-body-small-regular",
|
|
272
|
-
"[&_p]:px-[10px] [&_p]:whitespace-nowrap",
|
|
273
|
-
"group",
|
|
274
|
-
"w-fit",
|
|
275
|
-
"border",
|
|
276
|
-
"transition-all duration-200 ease-in-out",
|
|
277
|
-
"hover:shadow-[0px_1px_6px_0px_rgba(0,0,0,0.30)]",
|
|
278
|
-
"focus:shadow-[0px_1px_6px_0px_rgba(0,0,0,0.30)]",
|
|
279
|
-
],
|
|
280
|
-
{
|
|
281
|
-
variants: {
|
|
282
|
-
variant: {
|
|
283
|
-
PresentationStyle: [
|
|
284
|
-
"bg-background-presentation-form-field-primary",
|
|
285
|
-
"border-border-presentation-action-primary",
|
|
286
|
-
"hover:bg-background-presentation-form-field-hover",
|
|
287
|
-
"hover:border-border-presentation-action-hover",
|
|
288
|
-
"focus:bg-background-presentation-form-field-hover",
|
|
289
|
-
"focus:border-border-presentation-state-focus",
|
|
290
|
-
],
|
|
291
|
-
SystemStyle: [
|
|
292
|
-
"bg-black-alpha-20",
|
|
293
|
-
"text-white",
|
|
294
|
-
"border-[#2C2D2E]",
|
|
295
|
-
"hover:border-[#9748FF]",
|
|
296
|
-
"hover:bg-purple-alpha-10",
|
|
297
|
-
"focus:border-[#9748FF]",
|
|
298
|
-
"focus:bg-purple-alpha-10",
|
|
299
|
-
],
|
|
300
|
-
},
|
|
301
|
-
error: {
|
|
302
|
-
true: [
|
|
303
|
-
"border-border-presentation-state-negative",
|
|
304
|
-
"caret-border-presentation-state-negative",
|
|
305
|
-
"hover:border-border-presentation-state-negative",
|
|
306
|
-
"hover:caret-border-presentation-state-negative",
|
|
307
|
-
],
|
|
308
|
-
},
|
|
309
|
-
// Transparent border/background so the trigger blends into a table cell. The hover and
|
|
310
|
-
// focus shadows are deliberately left alone — a cell control lifts exactly like any
|
|
311
|
-
// other field.
|
|
312
|
-
onTable: {
|
|
313
|
-
true: ["border-transparent", "bg-transparent"],
|
|
314
|
-
},
|
|
315
|
-
// No `[&_span]:h-/w-` here: the chevron is an `ActionButton` and sizes itself from its own
|
|
316
|
-
// `size` prop. Those descendant rules used to force its box, and being descendant selectors
|
|
317
|
-
// they outranked the button's own classes — they also hit the SelectValue text span, which
|
|
318
|
-
// only escaped being squashed because an inline element ignores width/height.
|
|
319
|
-
size: {
|
|
320
|
-
// 24px tall — below the field scale's smallest step (30px), so it keeps its own
|
|
321
|
-
// `radius/md` rather than being rounded up to the 8px a real field would use.
|
|
322
|
-
// Heights are explicit because the trigger used to be sized by whichever chevron box the
|
|
323
|
-
// `[&_span]` rules imposed; now that the chevron sizes itself, the field must state its own.
|
|
324
|
-
//
|
|
325
|
-
// Every size states its padding so that `2×border + 2×padding + chevron` is exactly the
|
|
326
|
-
// trigger height — the chevron then sits an equal distance from all four edges instead of
|
|
327
|
-
// being flush to the border horizontally and centred vertically. Only XL had any padding
|
|
328
|
-
// before, which is why it was the only size that looked right.
|
|
329
|
-
//
|
|
330
|
-
// L and XL are the real field heights (30/40) and land on Figma's 4px. S and M have no
|
|
331
|
-
// Figma counterpart, so they take 3px — the most that still fits their chevron exactly.
|
|
332
|
-
S: ["h-[24px] p-[2px] rounded-radius-md [&_p]:typography-body-small-medium"],
|
|
333
|
-
// 28px and 30px — the field scale's S step (30px) is `radius/lg`.
|
|
334
|
-
M: ["h-[28px] p-[2px] rounded-radius-lg [&_p]:typography-body-medium-medium"],
|
|
335
|
-
L: ["h-[30px] p-[3px] rounded-radius-lg [&_p]:typography-body-large-medium"],
|
|
336
|
-
// 40px tall, so it is exactly InputField M and takes that size's `radius/xl` (12px).
|
|
337
|
-
// It sat at 8px before — the one place a 40px field in the system rounded like a 30px one.
|
|
338
|
-
XL: [
|
|
339
|
-
"h-[40px] p-[3px] rounded-radius-xl [&_p]:typography-body-large-regular [&_p]:px-[4px]",
|
|
340
|
-
],
|
|
341
|
-
},
|
|
342
|
-
},
|
|
343
|
-
defaultVariants: {
|
|
344
|
-
size: "M",
|
|
345
|
-
},
|
|
346
|
-
},
|
|
347
|
-
);
|
|
@@ -1,225 +0,0 @@
|
|
|
1
|
-
import { useClickOutside } from "../hooks/useClickOutside";
|
|
2
|
-
import { cn } from "../utils/cn";
|
|
3
|
-
import { cva } from "class-variance-authority";
|
|
4
|
-
import { HTMLAttributes, InputHTMLAttributes, ReactNode, useEffect, useRef, useState } from "react";
|
|
5
|
-
|
|
6
|
-
interface SimpleSelectDropDownProps {
|
|
7
|
-
className?: string;
|
|
8
|
-
children: ReactNode;
|
|
9
|
-
onClick?: () => void;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const SimpleSelectDropDown = ({ className, children, onClick }: SimpleSelectDropDownProps) => {
|
|
13
|
-
return (
|
|
14
|
-
<div
|
|
15
|
-
className={cn(
|
|
16
|
-
"absolute min-w-[100px] z-[20] top-[27px] start-0",
|
|
17
|
-
dropdownMenuStyles({ variant: "SystemStyle" }),
|
|
18
|
-
className,
|
|
19
|
-
)}
|
|
20
|
-
onClick={onClick}
|
|
21
|
-
>
|
|
22
|
-
{children}
|
|
23
|
-
</div>
|
|
24
|
-
);
|
|
25
|
-
};
|
|
26
|
-
|
|
27
|
-
interface SimpleSelectItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
28
|
-
selected?: boolean;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
const SimpleSelectItem = ({ selected, ...props }: SimpleSelectItemProps) => {
|
|
32
|
-
const ref = useRef<HTMLLIElement>(null);
|
|
33
|
-
|
|
34
|
-
// Scroll to the selected item when the dropdown is opened
|
|
35
|
-
useEffect(() => {
|
|
36
|
-
if (selected && ref.current) {
|
|
37
|
-
ref.current.scrollIntoView({ behavior: "auto", block: "center" });
|
|
38
|
-
}
|
|
39
|
-
}, [selected]);
|
|
40
|
-
|
|
41
|
-
return (
|
|
42
|
-
<li
|
|
43
|
-
{...props}
|
|
44
|
-
ref={ref}
|
|
45
|
-
className={cn(
|
|
46
|
-
" whitespace-nowrap z-[9999]",
|
|
47
|
-
MenuItemStyles({ variant: "SystemStyle", selected: selected, size: "S" }),
|
|
48
|
-
)}
|
|
49
|
-
>
|
|
50
|
-
{props.children}
|
|
51
|
-
</li>
|
|
52
|
-
);
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
interface SimpleSelectValueProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "onChange"> {
|
|
56
|
-
inputClassName?: string;
|
|
57
|
-
onChange?: (value: string) => void;
|
|
58
|
-
defaultOpen?: boolean;
|
|
59
|
-
className?: string;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
const SimpleSelectValue = ({
|
|
63
|
-
inputClassName,
|
|
64
|
-
children,
|
|
65
|
-
onChange,
|
|
66
|
-
defaultOpen = false,
|
|
67
|
-
className,
|
|
68
|
-
...props
|
|
69
|
-
}: SimpleSelectValueProps) => {
|
|
70
|
-
const [active, setActive] = useState(defaultOpen);
|
|
71
|
-
const sectionRef = useClickOutside<HTMLDivElement>(
|
|
72
|
-
() => setActive(false),
|
|
73
|
-
() => setActive(true),
|
|
74
|
-
);
|
|
75
|
-
|
|
76
|
-
const handleInputChange = (e: React.ChangeEvent<HTMLInputElement>) => {
|
|
77
|
-
if (onChange) {
|
|
78
|
-
onChange(e.target.value);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
|
|
82
|
-
return (
|
|
83
|
-
<div
|
|
84
|
-
ref={sectionRef}
|
|
85
|
-
className={cn([
|
|
86
|
-
"relative flex justify-between items-center",
|
|
87
|
-
"bg-black-alpha-20",
|
|
88
|
-
"text-white",
|
|
89
|
-
"border-[#2C2D2E]",
|
|
90
|
-
active ? "border-[#9748FF] bg-purple-alpha-10" : "",
|
|
91
|
-
"hover:border-[#9748FF]",
|
|
92
|
-
"hover:bg-purple-alpha-10",
|
|
93
|
-
"typography-body-small-regular leading-0",
|
|
94
|
-
"border",
|
|
95
|
-
"transition-all duration-200 ease-in-out",
|
|
96
|
-
"h-[26px]",
|
|
97
|
-
"w-fit",
|
|
98
|
-
"rounded-[6px]",
|
|
99
|
-
"outline-none",
|
|
100
|
-
"ps-[8px]",
|
|
101
|
-
className,
|
|
102
|
-
])}
|
|
103
|
-
>
|
|
104
|
-
<input
|
|
105
|
-
{...props}
|
|
106
|
-
onChange={handleInputChange}
|
|
107
|
-
className={cn(
|
|
108
|
-
[
|
|
109
|
-
"bg-transparent",
|
|
110
|
-
"text-content-system-global-primary",
|
|
111
|
-
"h-[24px]",
|
|
112
|
-
"border-none",
|
|
113
|
-
"outline-none",
|
|
114
|
-
"typography-body-small-regular leading-0",
|
|
115
|
-
],
|
|
116
|
-
inputClassName,
|
|
117
|
-
)}
|
|
118
|
-
/>
|
|
119
|
-
<button type="button" className="flex items-center">
|
|
120
|
-
<i
|
|
121
|
-
className={cn("ri-arrow-down-s-fill text-[12px] text-[#9748FF] px-1", {
|
|
122
|
-
"transform rotate-180": active,
|
|
123
|
-
})}
|
|
124
|
-
></i>
|
|
125
|
-
</button>
|
|
126
|
-
{children && active && (
|
|
127
|
-
<SimpleSelectDropDown onClick={() => setActive(false)}>{children}</SimpleSelectDropDown>
|
|
128
|
-
)}
|
|
129
|
-
</div>
|
|
130
|
-
);
|
|
131
|
-
};
|
|
132
|
-
|
|
133
|
-
export { SimpleSelectValue, SimpleSelectItem, SimpleSelectDropDown };
|
|
134
|
-
|
|
135
|
-
export const MenuItemStyles = cva(
|
|
136
|
-
[
|
|
137
|
-
"text-content-presentation-action-light-primary",
|
|
138
|
-
"outline-none",
|
|
139
|
-
"border",
|
|
140
|
-
"border-transparent",
|
|
141
|
-
"flex",
|
|
142
|
-
"gap-[8px]",
|
|
143
|
-
"items-center",
|
|
144
|
-
"justify-start",
|
|
145
|
-
"text-overflow",
|
|
146
|
-
"overflow-hidden",
|
|
147
|
-
"px-[12px]",
|
|
148
|
-
"rounded-[4px]",
|
|
149
|
-
"transition-all",
|
|
150
|
-
"ease-in-out",
|
|
151
|
-
"duration-300",
|
|
152
|
-
],
|
|
153
|
-
{
|
|
154
|
-
variants: {
|
|
155
|
-
variant: {
|
|
156
|
-
SystemStyle: [
|
|
157
|
-
"bg-background-system-body-primary",
|
|
158
|
-
"text-content-system-global-primary",
|
|
159
|
-
"hover:!bg-background-system-action-secondary-hover",
|
|
160
|
-
"hover:!text-content-system-action-primary-hover",
|
|
161
|
-
"hover:!border-border-system-action-primary-hover",
|
|
162
|
-
"focus:bg-background-system-action-primary-hover",
|
|
163
|
-
"focus:border-transparent",
|
|
164
|
-
"active:border-transparent",
|
|
165
|
-
"active:bg-background-system-action-primary-hover",
|
|
166
|
-
"disabled:bg-background-system-body-secondary",
|
|
167
|
-
"disabled:text-content-system-global-disabled",
|
|
168
|
-
],
|
|
169
|
-
},
|
|
170
|
-
size: {
|
|
171
|
-
S: ["typography-body-small-regular", "h-[24px]"],
|
|
172
|
-
M: ["typography-body-medium-regular", "h-[32px]"],
|
|
173
|
-
},
|
|
174
|
-
|
|
175
|
-
disabled: {
|
|
176
|
-
true: ["text-content-presentation-state-disabled", "bg-white-00"],
|
|
177
|
-
},
|
|
178
|
-
|
|
179
|
-
selected: {
|
|
180
|
-
true: [
|
|
181
|
-
"bg-background-presentation-action-selected",
|
|
182
|
-
"text-content-presentation-action-light-primary",
|
|
183
|
-
],
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
defaultVariants: {
|
|
187
|
-
variant: "Default",
|
|
188
|
-
size: "M",
|
|
189
|
-
active: false,
|
|
190
|
-
disabled: false,
|
|
191
|
-
},
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
);
|
|
195
|
-
|
|
196
|
-
export const dropdownMenuStyles = cva(
|
|
197
|
-
[
|
|
198
|
-
"p-1",
|
|
199
|
-
"rounded-[8px]",
|
|
200
|
-
"border",
|
|
201
|
-
"max-h-[200px]",
|
|
202
|
-
"outline-none",
|
|
203
|
-
"overflow-scroll",
|
|
204
|
-
"data-[state=open]:animate-in",
|
|
205
|
-
"data-[state=closed]:animate-out",
|
|
206
|
-
"data-[state=closed]:fade-out-0",
|
|
207
|
-
"data-[state=open]:fade-in-0",
|
|
208
|
-
"overflow-x-hidden",
|
|
209
|
-
"scrollbar-hide",
|
|
210
|
-
],
|
|
211
|
-
{
|
|
212
|
-
variants: {
|
|
213
|
-
variant: {
|
|
214
|
-
SystemStyle: [
|
|
215
|
-
"border-border-system-global-secondary",
|
|
216
|
-
"bg-background-system-body-primary",
|
|
217
|
-
"shadow-[0px_0px_18px_0px_rgba(0,0,0,0.75)]",
|
|
218
|
-
],
|
|
219
|
-
},
|
|
220
|
-
defaultVariants: {
|
|
221
|
-
variant: "SystemStyle",
|
|
222
|
-
},
|
|
223
|
-
},
|
|
224
|
-
},
|
|
225
|
-
);
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { cn } from "../utils/cn";
|
|
2
|
-
|
|
3
|
-
function Skeleton({ className, ...props }: React.HTMLAttributes<HTMLDivElement>) {
|
|
4
|
-
return (
|
|
5
|
-
<div
|
|
6
|
-
className={cn("animate-pulse rounded-md bg-border-presentation-global-primary", className)}
|
|
7
|
-
{...props}
|
|
8
|
-
/>
|
|
9
|
-
);
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export { Skeleton };
|