feat(dashboard): Product create from - details (#7121)

**What**
- First part of the product creation form.
- New components:
  - ChipInput - Allows users to input chips into a input field. Chips are created by hitting the `,` or `Enter / Return` keys. Deleting a chip is done by hitting `Backspace` when the cursor is next to chip, or clicking the `X` button in the chip. Used for inputting option values.
  - SortableList - A sortable drag-n-drop list that allows the user to re-arrange the order of items. Used for re-arranging the ranking of variants.
  - ChipGroup - New re-usable component that is used to render a group of values as Chips. This should be used for SplitView form items.
  - CategoryCombobox - (WIP) Nested Combobox component for selecting multiple categories a product should be associated with.
- New hooks:
  - useComboboxData - Hook for easily managing the state of comboboxes.
  - useDebouncedSearch - Hook for managing debounced search queries.
This commit is contained in:
Kasper Fabricius Kristensen
2024-05-03 12:37:36 +02:00
committed by GitHub
parent e42308557e
commit fdee748eed
84 changed files with 2837 additions and 1588 deletions

View File

@@ -0,0 +1,24 @@
import { Input, Text } from "@medusajs/ui"
import { ComponentProps, ElementRef, forwardRef } from "react"
export const HandleInput = forwardRef<
ElementRef<typeof Input>,
ComponentProps<typeof Input>
>((props, ref) => {
return (
<div className="relative">
<div className="absolute inset-y-0 left-0 z-10 flex w-8 items-center justify-center border-r">
<Text
className="text-ui-fg-muted"
size="small"
leading="compact"
weight="plus"
>
/
</Text>
</div>
<Input ref={ref} {...props} className="pl-10" />
</div>
)
})
HandleInput.displayName = "HandleInput"

View File

@@ -0,0 +1 @@
export * from "./handle-input"