Skip to content

Commit

Permalink
feat: button changes (#14)
Browse files Browse the repository at this point in the history
Merging alpha into main
  • Loading branch information
ochavarria2u authored May 12, 2024
1 parent 599ecbd commit 9708238
Show file tree
Hide file tree
Showing 15 changed files with 1,705 additions and 426 deletions.
2 changes: 1 addition & 1 deletion paragon/css/core/custom-media-breakpoints.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* IMPORTANT: This file is the result of assembling design tokens
* Do not edit directly
* Generated on Thu, 02 May 2024 05:05:20 GMT
* Generated on Sun, 12 May 2024 21:26:23 GMT
*/

18 changes: 10 additions & 8 deletions paragon/css/core/variables.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* IMPORTANT: This file is the result of assembling design tokens
* Do not edit directly
* Generated on Thu, 02 May 2024 05:05:20 GMT
* Generated on Sun, 12 May 2024 21:26:23 GMT
*/

:root {
Expand Down Expand Up @@ -65,25 +65,24 @@
--pgn-typography-display-weight-3: 700;
--pgn-typography-display-weight-2: 700;
--pgn-typography-display-weight-1: 700;
--pgn-typography-headings-font-weight: 700;
--pgn-typography-btn-font-weight: 500;
--pgn-typography-badge-font-weight: 400;
--pgn-typography-badge-font-size: 0.75rem;
--pgn-typography-headings-font-weight: 700;
--pgn-typography-btn-font-weight: 500;
--pgn-spacing-spacer-base: 1rem;
--pgn-spacing-spacer-0: 0;
--pgn-spacing-btn-focus-gap: 2px;
--pgn-size-popover-border-width: 0px;
--pgn-size-nav-pills-border-radius: 0;
--pgn-size-image-thumbnail-border-radius: 0;
--pgn-size-dropdown-border-width: 0;
--pgn-size-input-btn-border-width: 1px;
--pgn-size-form-input-radius-border-sm: 0;
--pgn-size-form-input-radius-border-lg: 0;
--pgn-size-form-input-radius-border-base: 0;
--pgn-size-dropdown-border-width: 0;
--pgn-size-btn-focus-border-radius: 0px;
--pgn-size-btn-border-radius-sm: 0px;
--pgn-size-btn-border-radius-lg: 0px;
--pgn-size-btn-border-radius-base: 0px;
--pgn-size-btn-border-radius-sm: 100px;
--pgn-size-btn-border-radius-lg: 100px;
--pgn-size-btn-border-radius-base: 100px;
--pgn-size-border-radius-sm: .375rem;
--pgn-size-border-radius-lg: .375rem;
--pgn-size-border-radius-base: .375rem;
Expand All @@ -104,9 +103,12 @@
--pgn-spacing-spacer-1: calc(1rem * .25);
--pgn-spacing-caret-vertical-align: calc(.3em * .67);
--pgn-spacing-caret-base: calc(.3em * 1);
--pgn-size-btn-focus-border-radius-sm: 100px;
--pgn-size-btn-focus-border-radius-base: calc(100px + calc(2px + 2px));
--pgn-spacing-grid-gutter-width: calc(1rem * 4);
--pgn-spacing-dropdown-padding-y-item: calc(1rem * .75);
--pgn-spacing-dropdown-padding-y-base: calc(1rem * .5);
--pgn-spacing-card-spacer-y: 1rem;
--pgn-spacing-card-spacer-x: calc(1rem * 1.5);
--pgn-size-btn-focus-border-radius-lg: calc(100px + calc(2px + 2px));
}
472 changes: 274 additions & 198 deletions paragon/css/themes/light/variables.css

Large diffs are not rendered by default.

14 changes: 10 additions & 4 deletions tokens/src/core/components/Button/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,20 @@
"btn": {
"border": {
"radius": {
"base": { "value": "0px" },
"lg": { "value": "0px" },
"sm": { "value": "0px" }
"base": { "value": "100px", "type": "dimension", "source": "$btn-border-radius" },
"lg": { "value": "100px", "type": "dimension", "source": "$btn-border-radius-lg" },
"sm": { "value": "100px", "type": "dimension", "source": "$btn-border-radius-sm" }
}
},
"focus": {
"border-radius": {
"value": "0px"
"base": {
"value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})",
"type": "dimension",
"source": "$btn-focus-border-radius"
},
"lg": { "value": "{size.btn.focus.border-radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-lg" },
"sm": { "value": "{size.btn.border.radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-sm" }
}
}
}
Expand Down
39 changes: 22 additions & 17 deletions tokens/src/themes/light/components/Button/brand.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,19 @@
]
},
"outline-brand": {
"value": "{color.primary.base}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-color"
}
},
"bg": {
"brand": {
"value": "{color.primary.base}",
"value": "{color.brand.600}",
"type": "color",
"source": "$btn-brand-bg"
},
"outline-brand": {
"value": "transparent",
"value": "{color.white}",
"type": "color",
"source": "$btn-brand-outline-bg"
}
Expand All @@ -37,7 +37,7 @@
"source": "$btn-brand-border-color"
},
"outline-brand": {
"value": "{color.primary.base}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-border-color"
}
Expand All @@ -55,9 +55,14 @@
]
},
"outline-brand": {
"value": "{color.theme.hover.brand}",
"value": "{color.brand.600}",
"type": "color",
"source": "$btn-brand-outline-hover-color"
"source": "$btn-brand-outline-hover-color",
"modify": [
{
"type": "color-yiq"
}
]
}
},
"bg": {
Expand All @@ -67,19 +72,19 @@
"source": "$btn-brand-hover-bg"
},
"outline-brand": {
"value": "{color.primary.100}",
"value": "{color.brand.600}",
"type": "color",
"source": "$btn-brand-outline-hover-bg"
}
},
"border": {
"brand": {
"value": "{color.theme.hover.brand}",
"value": "{color.btn.hover.bg.brand}",
"type": "color",
"source": "$btn-brand-hover-border-color"
},
"outline-brand": {
"value": "{color.primary.900}",
"value": "{color.btn.hover.bg.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-hover-border-color"
}
Expand Down Expand Up @@ -115,7 +120,7 @@
"source": "$btn-brand-active-bg"
},
"outline-brand": {
"value": "{color.theme.bg.brand}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-active-bg"
}
Expand All @@ -127,7 +132,7 @@
"source": "$btn-brand-active-border-color"
},
"outline-brand": {
"value": "{color.theme.active.brand}",
"value": "{color.btn.bg.brand}",
"type": "color",
"source": "$btn-brand-outline-active-border-color"
}
Expand Down Expand Up @@ -160,12 +165,12 @@
},
"outline": {
"brand": {
"value": "{color.theme.focus.brand}",
"value": "{color.btn.border.brand}",
"type": "color",
"source": "$btn-brand-focus-focus-outline-color"
},
"outline-brand": {
"value": "{color.theme.focus.brand}",
"value": "{color.btn.border.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-focus-outline-color"
}
Expand All @@ -177,7 +182,7 @@
"source": "$btn-brand-focus-bg"
},
"outline-brand": {
"value": "inherit",
"value": "{color.btn.bg.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-focus-bg"
}
Expand All @@ -203,7 +208,7 @@
"source": "$btn-brand-disabled-bg"
},
"outline-brand": {
"value": "inherit",
"value": "{color.btn.bg.outline-brand",
"type": "color",
"source": "$btn-brand-outline-disabled-bg"
}
Expand All @@ -215,12 +220,12 @@
"source": "$btn-brand-disabled-border-color"
},
"outline-brand": {
"value": "{color.btn.hover.text.outline-brand}",
"value": "{color.btn.border.outline-brand}",
"type": "color",
"source": "$btn-brand-outline-disabled-border-color"
}
}
}
}
}
}
}
25 changes: 8 additions & 17 deletions tokens/src/themes/light/components/Button/core.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,19 @@
"size": {
"btn": {
"border": {
"width": { "value": "{size.input.btn.border-width}", "type": "dimension", "source": "$btn-border-width" },
"radius": {
"base": { "value": "{size.border.radius.base}", "type": "dimension", "source": "$btn-border-radius" },
"lg": { "value": "{size.border.radius.lg}", "type": "dimension", "source": "$btn-border-radius-lg" },
"sm": { "value": "{size.border.radius.sm}", "type": "dimension", "source": "$btn-border-radius-sm" }
}
"width": { "value": "{size.input.btn.border-width}", "type": "dimension", "source": "$btn-border-width" }
},
"focus": {
"width": { "value": "2px", "type": "dimension", "source": "$btn-focus-width" },
"border-radius": {
"base": {
"value": "calc({size.btn.border.radius.base} + {spacing.btn.focus.border-gap})",
"type": "dimension",
"source": "$btn-focus-border-radius"
},
"lg": { "value": "{size.btn.focus.border-radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-lg" },
"sm": { "value": "{size.btn.border.radius.base}", "type": "dimension", "source": "$btn-focus-border-radius-sm" }
}
"width": { "value": "2px", "type": "dimension", "source": "$btn-focus-width" }
}
}
},
"transition": {
"btn": { "value": "none", "type": "transition", "source": "$btn-transition" }
},
"other": {
"btn": {
"disabled-opacity": { "value": ".3", "type": "ratio", "source": "$btn-disabled-opacity" }
}
}
}
}
Loading

0 comments on commit 9708238

Please sign in to comment.