feat(dashboard,medusa,ui): Manual gift cards + cleanup (#6380)

**Dashboard**
- Adds different views for managing manual/custom gift cards (not associated with a product gift card).
- Cleans up several table implementations to use new DataTable component.
- Minor cleanup of translation file.

**Medusa**
- Adds missing query params for list endpoints in the following admin domains: /customers, /customer-groups, /collections, and /gift-cards.

**UI**
- Adds new sizes for Badge component.

**Note for review**
Since this PR contains updates to the translation keys, it touches a lot of files. For the review the parts that are relevant are: the /gift-cards domain of admin, the table overview of collections, customers, and customer groups. And the changes to the list endpoints in the core.
This commit is contained in:
Kasper Fabricius Kristensen
2024-02-12 14:47:37 +01:00
committed by GitHub
parent bc2a63782b
commit d37ff8024d
138 changed files with 3230 additions and 1399 deletions

View File

@@ -66,6 +66,18 @@ export const Rounded: Story = {
},
}
export const XXSmall: Story = {
args: {
size: "2xsmall",
},
}
export const XSmall: Story = {
args: {
size: "xsmall",
},
}
export const Small: Story = {
args: {
size: "small",

View File

@@ -24,18 +24,72 @@ const badgeColorVariants = cva({
})
const badgeSizeVariants = cva({
base: "inline-flex items-center gap-x-0.5 border",
base: "inline-flex items-center gap-x-0.5 border box-border",
variants: {
size: {
small: "txt-compact-xsmall-plus px-1.5",
base: "txt-compact-small-plus px-2 py-0.5",
large: "txt-compact-medium-plus px-2.5 py-1",
"2xsmall": "txt-compact-xsmall-plus h-5",
xsmall: "txt-compact-xsmall-plus py-px h-6",
small: "txt-compact-xsmall-plus py-[3px] h-7",
base: "txt-compact-small-plus py-[5px] h-8",
large: "txt-compact-medium-plus py-[7px] h-10",
},
rounded: {
base: "rounded-md",
full: "rounded-full",
},
},
compoundVariants: [
{
size: "2xsmall",
rounded: "full",
className: "px-1.5",
},
{
size: "2xsmall",
rounded: "base",
className: "px-1",
},
{
size: "xsmall",
rounded: "full",
className: "px-2",
},
{
size: "xsmall",
rounded: "base",
className: "px-1.5",
},
{
size: "small",
rounded: "full",
className: "px-2.5",
},
{
size: "small",
rounded: "base",
className: "px-2",
},
{
size: "base",
rounded: "full",
className: "px-3",
},
{
size: "base",
rounded: "base",
className: "px-2.5",
},
{
size: "large",
rounded: "full",
className: "px-3.5",
},
{
size: "large",
rounded: "base",
className: "px-3",
},
],
defaultVariants: {
size: "base",
rounded: "base",

View File

@@ -108,6 +108,8 @@ const CurrencyInput = React.forwardRef<HTMLInputElement, CurrencyInputProps>(
role="presentation"
>
<Text
size="small"
leading="compact"
className={clx(
"text-ui-fg-muted pointer-events-none select-none uppercase",
{
@@ -136,6 +138,8 @@ const CurrencyInput = React.forwardRef<HTMLInputElement, CurrencyInputProps>(
role="presentation"
>
<Text
size="small"
leading="compact"
className={clx("text-ui-fg-muted pointer-events-none select-none", {
"text-ui-fg-disabled": disabled,
})}