Skip to content

Commit

Permalink
feat: create o3-form tokens for all brands (#1854)
Browse files Browse the repository at this point in the history
* chore: duplicated whitelabel form tokens into the core brand

* chore: added tokens for core

* chore: all brand styles for inputs besides professional

* chore: added final touches (professional tokens)

* chore: refactor order of o3-forms and add missing colours inside sw brand

* feat: generate tokens for all brands for o3-form

* feat: generate tokens for o3-form for different brands

* feat: enable all brands for website

---------

Co-authored-by: Deyan Dragov <[email protected]>
Co-authored-by: Akaki Mikaia <[email protected]>
  • Loading branch information
3 people authored Oct 28, 2024
1 parent 0f3f9da commit 21b811f
Show file tree
Hide file tree
Showing 75 changed files with 2,203 additions and 1,004 deletions.
9 changes: 8 additions & 1 deletion apps/dictionary/tokens/$metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@
"core/components/o3-button",
"core/components/o3-tooltip",
"core/components/o3-editorial-typography",
"core/components/o3-form",
"core/components/o3-form/use-case",
"core/professional/base/color",
"core/professional/use-case/color",
"core/professional/use-case/typography",
"core/professional/components/o3-form",
"core/professional/components/o3-form/use-case",
"core/professional/components/o3-button",
"core/professional/components/o3-tooltip",
"sustainable-views/base/spacing",
Expand All @@ -24,6 +28,8 @@
"sustainable-views/components/o3-editorial-typography",
"sustainable-views/components/o3-button",
"sustainable-views/components/o3-tooltip",
"sustainable-views/components/o3-form",
"sustainable-views/components/o3-form/use-case",
"internal/base/color",
"internal/base/typography",
"internal/base/spacing",
Expand All @@ -32,6 +38,8 @@
"internal/use-case/typography",
"internal/components/o3-button",
"internal/components/o3-tooltip",
"internal/components/o3-form",
"internal/components/o3-form/use-case",
"whitelabel/base/spacing",
"whitelabel/base/color",
"whitelabel/base/border-radius",
Expand All @@ -44,7 +52,6 @@
"whitelabel/components/o3-form",
"whitelabel/components/o3-form/use-case",
"whitelabel/components/o3-editorial-typography",
"whitelabel/whitelabel",
"utility-tokens",
"icons/icons"
]
Expand Down
19 changes: 14 additions & 5 deletions apps/dictionary/tokens/$themes.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"core/use-case/color": "enabled",
"core/use-case/typography": "enabled",
"core/use-case/focus": "enabled",
"core/components/o3-editorial-typography": "source"
"core/components/o3-editorial-typography": "source",
"core/components/o3-form/use-case": "source",
"core/components/o3-form": "source"
},
"$figmaStyleReferences": {
"color-usecase.background.button.primary.active": "S:ef8234289a222e339b586d8ea3466f08d0d010f5,",
Expand Down Expand Up @@ -222,7 +224,9 @@
"core/professional/components/o3-tooltip": "source",
"core/use-case/typography": "enabled",
"core/use-case/focus": "enabled",
"core/components/o3-editorial-typography": "source"
"core/components/o3-editorial-typography": "source",
"core/professional/components/o3-form/use-case": "source",
"core/professional/components/o3-form": "source"
},
"$figmaStyleReferences": {
"color-usecase.background.button.primary.active": "S:55d4b73d90c40ff305a097a15d86f53de276da57,",
Expand Down Expand Up @@ -424,7 +428,9 @@
"internal/components/o3-tooltip": "source",
"internal/use-case/color": "enabled",
"internal/use-case/typography": "enabled",
"internal/use-case/focus": "enabled"
"internal/use-case/focus": "enabled",
"internal/components/o3-form": "source",
"internal/components/o3-form/use-case": "source"
},
"$figmaCollectionId": "VariableCollectionId:6510:3502",
"$figmaModeId": "6510:2",
Expand Down Expand Up @@ -522,7 +528,7 @@
"whitelabel/use-case/focus": "enabled",
"whitelabel/components/o3-editorial-typography": "source",
"whitelabel/components/o3-form": "source",
"whitelabel/components/o3-form/use-case": "enabled"
"whitelabel/components/o3-form/use-case": "source"
},
"$figmaCollectionId": "VariableCollectionId:4842:355",
"$figmaModeId": "4842:3",
Expand Down Expand Up @@ -648,7 +654,10 @@
"sustainable-views/use-case/color": "enabled",
"sustainable-views/components/o3-editorial-typography": "source",
"sustainable-views/use-case/typography": "enabled",
"sustainable-views/use-case/focus": "enabled"
"sustainable-views/use-case/focus": "enabled",
"whitelabel/components/o3-form/use-case": "source",
"sustainable-views/components/o3-form": "source",
"sustainable-views/components/o3-form/use-case": "source"
},
"$figmaCollectionId": "VariableCollectionId:6169:227",
"$figmaModeId": "6169:4",
Expand Down
36 changes: 36 additions & 0 deletions apps/dictionary/tokens/core/components/o3-form.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"o3": {
"form": {
"input": {
"border": {
"@": {
"value": {
"color": "{o3.color.palette.black-30}",
"width": "2px",
"style": "solid"
},
"type": "border"
},
"error": {
"value": {
"color": "{o3.color.use-case.error}",
"width": "2px",
"style": "solid"
},
"type": "border"
}
},
"border-radius": {
"value": "6px",
"type": "borderRadius"
}
},
"error-summary": {
"background-color": {
"value": "rgba(204,0,0,0.14)",
"type": "color"
}
}
}
}
}
60 changes: 60 additions & 0 deletions apps/dictionary/tokens/core/components/o3-form/use-case.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"o3": {
"form": {
"color": {
"use-case": {
"background": {
"@": {
"value": "{o3.color.palette.white}",
"type": "color"
},
"disabled": {
"value": "{o3.color.palette.black-10}",
"type": "color"
},
"error": {
"value": "rgba(204, 0, 0, 0.06)",
"type": "color"
}
},
"border": {
"@": {
"value": "{o3.color.palette.black-50}",
"type": "color"
},
"hover": {
"value": "{o3.color.use-case.button.hover}",
"type": "color"
},
"active": {
"value": "{o3.color.use-case.button.pressed}",
"type": "color"
},
"disabled": {
"value": "{o3.color.palette.black-10}",
"type": "color"
}
},
"selected": {
"@": {
"value": "{o3.color.use-case.button.default}",
"type": "color"
},
"hover": {
"value": "{o3.color.use-case.button.hover}",
"type": "color"
},
"active": {
"value": "{o3.color.use-case.button.pressed}",
"type": "color"
},
"disabled": {
"value": "{o3.color.use-case.button.disabled}",
"type": "color"
}
}
}
}
}
}
}
36 changes: 36 additions & 0 deletions apps/dictionary/tokens/core/professional/components/o3-form.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"o3": {
"form": {
"input": {
"border": {
"@": {
"value": {
"color": "{o3.color.palette.black-30}",
"width": "2px",
"style": "solid"
},
"type": "border"
},
"error": {
"value": {
"color": "{o3.color.use-case.error}",
"width": "2px",
"style": "solid"
},
"type": "border"
}
},
"border-radius": {
"value": "6px",
"type": "borderRadius"
}
},
"error-summary": {
"background-color": {
"value": "rgba(204,0,0,0.14)",
"type": "color"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"o3": {
"form": {
"color": {
"use-case": {
"background": {
"@": {
"value": "{o3.color.palette.white}",
"type": "color"
},
"disabled": {
"value": "{o3.color.palette.black-10}",
"type": "color"
},
"error": {
"value": "rgba(204, 0, 0, 0.06)",
"type": "color"
}
},
"border": {
"@": {
"value": "{o3.color.palette.black-50}",
"type": "color"
},
"hover": {
"value": "{o3.color.use-case.button.hover}",
"type": "color"
},
"active": {
"value": "{o3.color.use-case.button.pressed}",
"type": "color"
},
"disabled": {
"value": "{o3.color.palette.black-10}",
"type": "color"
}
},
"selected": {
"@": {
"value": "{o3.color.use-case.button.default}",
"type": "color"
},
"hover": {
"value": "{o3.color.use-case.button.hover}",
"type": "color"
},
"active": {
"value": "{o3.color.use-case.button.pressed}",
"type": "color"
},
"disabled": {
"value": "{o3.color.use-case.button.disabled}",
"type": "color"
}
}
}
}
}
}
}
26 changes: 26 additions & 0 deletions apps/dictionary/tokens/core/professional/use-case/color.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,32 @@
"type": "color"
}
}
},
"button": {
"foreground": {
"value": "{o3.color.palette.white}",
"type": "color"
},
"foreground-disabled": {
"value": "#FFF7EF",
"type": "color"
},
"default": {
"value": "{o3.color.palette.slate}",
"type": "color"
},
"hover": {
"value": "#515257",
"type": "color"
},
"pressed": {
"value": "#7D7A7A",
"type": "color"
},
"disabled": {
"value": "#D4C9C1",
"type": "color"
}
}
}
}
Expand Down
Loading

0 comments on commit 21b811f

Please sign in to comment.