From cd3d07f4384b44e8c965d9bd5bccc1e80cdbb478 Mon Sep 17 00:00:00 2001 From: prsvic Date: Mon, 2 Dec 2024 15:18:59 +0400 Subject: [PATCH] chore/add spacing tokens (#45) * add spacing tokens * fix text area overflow * upd padding token; fix input height; fix caption margin --- packages/blinks/src/index.css | 25 +++++++++++++++++-- packages/blinks/src/ui/internal/Button.tsx | 2 +- .../src/ui/internal/inputs/ActionTextArea.tsx | 1 + .../ui/internal/inputs/BaseInputContainer.tsx | 3 ++- .../blinks/src/ui/layouts/BaseBlinkLayout.tsx | 22 ++++++++-------- packages/blinks/tailwind.config.js | 7 ++++++ 6 files changed, 45 insertions(+), 15 deletions(-) diff --git a/packages/blinks/src/index.css b/packages/blinks/src/index.css index e81e9db2..0258a19e 100644 --- a/packages/blinks/src/index.css +++ b/packages/blinks/src/index.css @@ -69,6 +69,12 @@ --blink-border-radius-rounded-input: 0.5rem; --blink-border-radius-rounded-input-standalone: 0.5rem; + --blink-spacing-padding: 1.25rem; + --blink-spacing-gap: 1rem; + --blink-spacing-btwn-buttons: 0.5rem; + --blink-spacing-btwn-inputs: 0.75rem; + --blink-spacing-input-height: 40px; + --blink-shadow-container: 0px 129.333px 103.467px 0px rgba(0, 0, 0, 0.07), 0px 54.032px 43.226px 0px rgba(0, 0, 0, 0.05), 0px 16.195px 12.956px 0px rgba(0, 0, 0, 0.04), 0px 8.601px 6.881px 0px rgba(0, 0, 0, 0.03), 0px 3.579px 2.863px 0px rgba(0, 0, 0, 0.02); } @@ -79,6 +85,13 @@ --blink-border-radius-rounded-button: 624.9375rem; --blink-border-radius-rounded-input: 1.25rem; --blink-border-radius-rounded-input-standalone: 1.75rem; + + --blink-spacing-padding: 1.25rem; + --blink-spacing-gap: 1rem; + --blink-spacing-btwn-buttons: 0.5rem; + --blink-spacing-btwn-inputs: 0.75rem; + --blink-spacing-input-height: 40px; + } .x-dark { @@ -177,5 +190,13 @@ --blink-shadow-container: 0px 2px 8px 0px rgba(62, 177, 255, 0.22), 0px 1px 48px 0px rgba(62, 177, 255, 0.24); } - .custom {} -} \ No newline at end of file + .custom { + + /* this will be removed in future versions */ + --blink-spacing-padding: 1.25rem; + --blink-spacing-gap: 1rem; + --blink-spacing-btwn-buttons: 0.5rem; + --blink-spacing-btwn-inputs: 0.75rem; + --blink-spacing-input-height: 40px; + } +} diff --git a/packages/blinks/src/ui/internal/Button.tsx b/packages/blinks/src/ui/internal/Button.tsx index d00c2b71..44309990 100644 --- a/packages/blinks/src/ui/internal/Button.tsx +++ b/packages/blinks/src/ui/internal/Button.tsx @@ -18,7 +18,7 @@ export const Button = ({ return (