Skip to content

Commit

Permalink
refactor: Badge variant outlinedoutline
Browse files Browse the repository at this point in the history
  • Loading branch information
te6-in committed Jan 16, 2025
1 parent 1aff2ed commit dfd4466
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 77 deletions.
5 changes: 5 additions & 0 deletions docs/components/example/badge-outline.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Badge } from "seed-design/ui/badge";

export default function BadgeOutline() {
return <Badge variant="outline">라벨</Badge>;
}
5 changes: 0 additions & 5 deletions docs/components/example/badge-outlined.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion docs/components/example/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"badge-large": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgeLarge() {\n return <Badge size=\"large\">라벨</Badge>;\n}",
"badge-medium": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgeMedium() {\n return <Badge size=\"medium\">라벨</Badge>;\n}",
"badge-neutral": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgeNeutral() {\n return <Badge tone=\"neutral\">라벨</Badge>;\n}",
"badge-outlined": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgeOutlined() {\n return <Badge variant=\"outlined\">라벨</Badge>;\n}",
"badge-outline": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgeOutline() {\n return <Badge variant=\"outline\">라벨</Badge>;\n}",
"badge-pill": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgeRectangle() {\n return <Badge shape=\"pill\">라벨</Badge>;\n}",
"badge-positive": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgePositive() {\n return <Badge tone=\"positive\">라벨</Badge>;\n}",
"badge-preview": "import { Badge } from \"seed-design/ui/badge\";\n\nexport default function BadgePreview() {\n return <Badge>라벨</Badge>;\n}",
Expand Down
2 changes: 1 addition & 1 deletion docs/content/docs/design/components/badge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ description: TBD
| 속성 || 기본값 |
| ------- | --------------------------------------------- | ------- |
| size | medium, large | medium |
| variant | weak, solid, outlined | weak |
| variant | weak, solid, outline | weak |
| tone | neutral, brand, informative, positive, danger | neutral |

## 링크
Expand Down
6 changes: 3 additions & 3 deletions docs/content/docs/react/components/badge.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ title: Badge

<ComponentExample name="badge-solid" />

### Outlined
### Outline

<ComponentExample name="badge-outlined" />
<ComponentExample name="badge-outline" />

### Neutral

Expand All @@ -56,4 +56,4 @@ title: Badge

### asChild

<ComponentExample name="badge-as-child" />
<ComponentExample name="badge-as-child" />
12 changes: 6 additions & 6 deletions docs/public/rootage/components/badge.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
}
}
},
"variant=outlined": {
"variant=outline": {
"enabled": {
"root": {
"borderWidth": "1px"
Expand Down Expand Up @@ -96,7 +96,7 @@
}
}
},
"tone=neutral, variant=outlined": {
"tone=neutral, variant=outline": {
"enabled": {
"root": {
"strokeColor": "$color.stroke.neutral"
Expand Down Expand Up @@ -126,7 +126,7 @@
}
}
},
"tone=brand, variant=outlined": {
"tone=brand, variant=outline": {
"enabled": {
"root": {
"strokeColor": "$color.stroke.brand"
Expand Down Expand Up @@ -156,7 +156,7 @@
}
}
},
"tone=informative, variant=outlined": {
"tone=informative, variant=outline": {
"enabled": {
"root": {
"strokeColor": "$color.stroke.informative"
Expand Down Expand Up @@ -186,7 +186,7 @@
}
}
},
"tone=positive, variant=outlined": {
"tone=positive, variant=outline": {
"enabled": {
"root": {
"strokeColor": "$color.stroke.positive"
Expand Down Expand Up @@ -216,7 +216,7 @@
}
}
},
"tone=danger, variant=outlined": {
"tone=danger, variant=outline": {
"enabled": {
"root": {
"strokeColor": "$color.stroke.danger"
Expand Down
12 changes: 6 additions & 6 deletions docs/public/rootage/parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -10477,7 +10477,7 @@
},
{
"key": {
"variant": "outlined"
"variant": "outline"
},
"state": [
{
Expand Down Expand Up @@ -10614,7 +10614,7 @@
{
"key": {
"tone": "neutral",
"variant": "outlined"
"variant": "outline"
},
"state": [
{
Expand Down Expand Up @@ -10755,7 +10755,7 @@
{
"key": {
"tone": "brand",
"variant": "outlined"
"variant": "outline"
},
"state": [
{
Expand Down Expand Up @@ -10896,7 +10896,7 @@
{
"key": {
"tone": "informative",
"variant": "outlined"
"variant": "outline"
},
"state": [
{
Expand Down Expand Up @@ -11037,7 +11037,7 @@
{
"key": {
"tone": "positive",
"variant": "outlined"
"variant": "outline"
},
"state": [
{
Expand Down Expand Up @@ -11178,7 +11178,7 @@
{
"key": {
"tone": "danger",
"variant": "outlined"
"variant": "outline"
},
"state": [
{
Expand Down
36 changes: 18 additions & 18 deletions packages/qvism-preset/src/recipes/badge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,13 @@ const badge = defineRecipe({
fontWeight: vars.variantSolid.enabled.label.fontWeight,
},
},
outlined: {
outline: {
root: {
borderStyle: "solid",
borderWidth: vars.variantOutlined.enabled.root.borderWidth,
borderWidth: vars.variantOutline.enabled.root.borderWidth,
},
label: {
fontWeight: vars.variantOutlined.enabled.label.fontWeight,
fontWeight: vars.variantOutline.enabled.label.fontWeight,
},
},
},
Expand Down Expand Up @@ -125,13 +125,13 @@ const badge = defineRecipe({
},
{
tone: "neutral",
variant: "outlined",
variant: "outline",
css: {
root: {
borderColor: vars.toneNeutralVariantOutlined.enabled.root.strokeColor,
borderColor: vars.toneNeutralVariantOutline.enabled.root.strokeColor,
},
label: {
color: vars.toneNeutralVariantOutlined.enabled.label.color,
color: vars.toneNeutralVariantOutline.enabled.label.color,
},
},
},
Expand Down Expand Up @@ -161,13 +161,13 @@ const badge = defineRecipe({
},
{
tone: "brand",
variant: "outlined",
variant: "outline",
css: {
root: {
borderColor: vars.toneBrandVariantOutlined.enabled.root.strokeColor,
borderColor: vars.toneBrandVariantOutline.enabled.root.strokeColor,
},
label: {
color: vars.toneBrandVariantOutlined.enabled.label.color,
color: vars.toneBrandVariantOutline.enabled.label.color,
},
},
},
Expand Down Expand Up @@ -197,13 +197,13 @@ const badge = defineRecipe({
},
{
tone: "informative",
variant: "outlined",
variant: "outline",
css: {
root: {
borderColor: vars.toneInformativeVariantOutlined.enabled.root.strokeColor,
borderColor: vars.toneInformativeVariantOutline.enabled.root.strokeColor,
},
label: {
color: vars.toneInformativeVariantOutlined.enabled.label.color,
color: vars.toneInformativeVariantOutline.enabled.label.color,
},
},
},
Expand Down Expand Up @@ -233,13 +233,13 @@ const badge = defineRecipe({
},
{
tone: "positive",
variant: "outlined",
variant: "outline",
css: {
root: {
borderColor: vars.tonePositiveVariantOutlined.enabled.root.strokeColor,
borderColor: vars.tonePositiveVariantOutline.enabled.root.strokeColor,
},
label: {
color: vars.tonePositiveVariantOutlined.enabled.label.color,
color: vars.tonePositiveVariantOutline.enabled.label.color,
},
},
},
Expand Down Expand Up @@ -269,13 +269,13 @@ const badge = defineRecipe({
},
{
tone: "danger",
variant: "outlined",
variant: "outline",
css: {
root: {
borderColor: vars.toneDangerVariantOutlined.enabled.root.strokeColor,
borderColor: vars.toneDangerVariantOutline.enabled.root.strokeColor,
},
label: {
color: vars.toneDangerVariantOutlined.enabled.label.color,
color: vars.toneDangerVariantOutline.enabled.label.color,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/recipe/lib/badge.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ declare interface BadgeVariant {
/**
* @default solid
*/
variant: "weak" | "solid" | "outlined";
variant: "weak" | "solid" | "outline";
/**
* @default neutral
*/
Expand Down
12 changes: 6 additions & 6 deletions packages/recipe/lib/badge.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const compoundVariants = [
},
{
"tone": "neutral",
"variant": "outlined"
"variant": "outline"
},
{
"tone": "brand",
Expand All @@ -51,7 +51,7 @@ const compoundVariants = [
},
{
"tone": "brand",
"variant": "outlined"
"variant": "outline"
},
{
"tone": "informative",
Expand All @@ -63,7 +63,7 @@ const compoundVariants = [
},
{
"tone": "informative",
"variant": "outlined"
"variant": "outline"
},
{
"tone": "positive",
Expand All @@ -75,7 +75,7 @@ const compoundVariants = [
},
{
"tone": "positive",
"variant": "outlined"
"variant": "outline"
},
{
"tone": "danger",
Expand All @@ -87,7 +87,7 @@ const compoundVariants = [
},
{
"tone": "danger",
"variant": "outlined"
"variant": "outline"
}
];

Expand All @@ -103,7 +103,7 @@ export const badgeVariantMap = {
"variant": [
"weak",
"solid",
"outlined"
"outline"
],
"tone": [
"neutral",
Expand Down
12 changes: 6 additions & 6 deletions packages/rootage/components/badge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ data:
enabled:
label:
fontWeight: $font-weight.bold
variant=outlined:
variant=outline:
enabled:
root:
borderWidth: 1px
Expand All @@ -60,7 +60,7 @@ data:
color: $color.bg.neutral-inverted
label:
color: $color.fg.neutral-inverted
tone=neutral, variant=outlined:
tone=neutral, variant=outline:
enabled:
root:
strokeColor: $color.stroke.neutral
Expand All @@ -78,7 +78,7 @@ data:
color: $color.bg.brand-solid
label:
color: $color.palette.static-white
tone=brand, variant=outlined:
tone=brand, variant=outline:
enabled:
root:
strokeColor: $color.stroke.brand
Expand All @@ -96,7 +96,7 @@ data:
color: $color.bg.informative-solid
label:
color: $color.palette.static-white
tone=informative, variant=outlined:
tone=informative, variant=outline:
enabled:
root:
strokeColor: $color.stroke.informative
Expand All @@ -114,7 +114,7 @@ data:
color: $color.bg.positive-solid
label:
color: $color.palette.static-white
tone=positive, variant=outlined:
tone=positive, variant=outline:
enabled:
root:
strokeColor: $color.stroke.positive
Expand All @@ -132,7 +132,7 @@ data:
color: $color.bg.danger-solid
label:
color: $color.palette.static-white
tone=danger, variant=outlined:
tone=danger, variant=outline:
enabled:
root:
strokeColor: $color.stroke.danger
Expand Down
Loading

0 comments on commit dfd4466

Please sign in to comment.