feat(core-flows, dashboard, medusa, types): optional shipping profile (#11434)

* feat: create product flow changes

* feat: allow unsetting SP on product update

* feat: update prepare line item helper

* test: add testcase

* wip: fix tests

* fix: update module tests

* fix: cart module test
This commit is contained in:
Frane Polić
2025-02-17 19:08:59 +01:00
committed by GitHub
parent 3b7856e8f5
commit ee848bf0f4
19 changed files with 191 additions and 112 deletions

View File

@@ -57,6 +57,7 @@ interface ComboboxProps<T extends Value = Value>
isFetchingNextPage?: boolean
onCreateOption?: (value: string) => void
noResultsPlaceholder?: ReactNode
allowClear?: boolean
}
const ComboboxImpl = <T extends Value = string>(
@@ -72,6 +73,7 @@ const ComboboxImpl = <T extends Value = string>(
isFetchingNextPage,
onCreateOption,
noResultsPlaceholder,
allowClear,
...inputProps
}: ComboboxProps<T>,
ref: ForwardedRef<HTMLInputElement>
@@ -303,6 +305,18 @@ const ComboboxImpl = <T extends Value = string>(
{...inputProps}
/>
</div>
{allowClear && controlledValue && (
<button
type="button"
onClick={(e) => {
e.preventDefault()
handleValueChange(undefined)
}}
className="bg-ui-bg-base hover:bg-ui-bg-base-hover txt-compact-small-plus text-ui-fg-subtle focus-within:border-ui-fg-interactive transition-fg absolute right-[28px] top-0.5 z-[1] flex h-[28px] items-center rounded-[4px] border px-1.5 py-[2px] outline-none"
>
<XMarkMini className="text-ui-fg-muted" />
</button>
)}
<PrimitiveComboboxDisclosure
render={(props) => {
return (