From 930b175e08f583b69d5d69a0a2dd10f567d8c113 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 10:46:35 +0200 Subject: [PATCH 01/17] fix(TextInput): input styling --- .changeset/curly-trainers-walk.md | 5 +++ .../fields/TextInput/TextInputBase.tsx | 33 +++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 .changeset/curly-trainers-walk.md diff --git a/.changeset/curly-trainers-walk.md b/.changeset/curly-trainers-walk.md new file mode 100644 index 000000000..f6844a834 --- /dev/null +++ b/.changeset/curly-trainers-walk.md @@ -0,0 +1,5 @@ +--- +"@cube-dev/ui-kit": patch +--- + +Fix minor issues with input styling. diff --git a/src/components/fields/TextInput/TextInputBase.tsx b/src/components/fields/TextInput/TextInputBase.tsx index 6e1941e07..55fc5d4d5 100644 --- a/src/components/fields/TextInput/TextInputBase.tsx +++ b/src/components/fields/TextInput/TextInputBase.tsx @@ -48,9 +48,14 @@ const ADD_STYLES = { export const INPUT_WRAPPER_STYLES: Styles = { display: 'grid', + flow: 'row', position: 'relative', - gridAreas: '"prefix input suffix"', - gridColumns: 'auto 1sf auto', + gridColumns: { + '': '1sf', + prefix: 'max-content 1sf', + suffix: '1sf max-content', + 'prefix & suffix': 'max-content 1sf max-content', + }, placeItems: 'stretch', fill: { '': '#white', @@ -83,15 +88,9 @@ export const INPUT_WRAPPER_STYLES: Styles = { transition: 'theme', backgroundClip: 'content-box', - Prefix: { - ...ADD_STYLES, - gridArea: 'prefix', - }, + Prefix: ADD_STYLES, - Suffix: { - ...ADD_STYLES, - gridArea: 'suffix', - }, + Suffix: ADD_STYLES, State: { display: 'flex', @@ -123,11 +122,6 @@ const STYLE_LIST = [...POSITION_STYLES, ...DIMENSION_STYLES]; const INPUT_STYLE_PROPS_LIST = [...BLOCK_STYLES, 'resize']; export const DEFAULT_INPUT_STYLES: Styles = { - display: 'grid', - placeItems: 'center stretch', - placeContent: 'center stretch', - gridRows: 'min(1lh)', - gridArea: 'input', width: 'initial 100% 100%', color: 'inherit', fill: '#clear', @@ -139,7 +133,12 @@ export const DEFAULT_INPUT_STYLES: Styles = { reset: 'input', preset: 't3', flexGrow: 1, - margin: 0, + margin: { + '': 0, + multiline: '(((@size-md - 1lh) / 2) - 1bw) 0', + 'multiline & [data-size="small"]': '(((@size-sm - 1lh) / 2) - 1bw) 0', + 'multiline & [data-size="large"]': '(((@size-lg - 1lh) / 2) - 1bw) 0', + }, resize: 'none', boxSizing: 'border-box', userSelect: 'auto', @@ -154,7 +153,7 @@ export const DEFAULT_INPUT_STYLES: Styles = { '[data-size="large"] & multiline': 'min (@size-lg - 2bw)', }, - '@vertical-padding': '(.5x - 1bw)', + '@vertical-padding': 0, '@left-padding': { '': '(1x - 1bw)', '[data-size="small"]': '(1x - 1bw)', From 6eda90aac4f984c523e883bfca50b77d64628963 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 11:32:00 +0200 Subject: [PATCH 02/17] fix(Select): extend input styles correctly --- src/components/fields/Select/Select.tsx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/components/fields/Select/Select.tsx b/src/components/fields/Select/Select.tsx index 03d45f2e1..07ac60443 100644 --- a/src/components/fields/Select/Select.tsx +++ b/src/components/fields/Select/Select.tsx @@ -92,6 +92,8 @@ const SelectWrapperElement = tasty({ Value: { ...DEFAULT_INPUT_STYLES, + display: 'grid', + placeItems: 'center stretch', preset: { '': 't3', '[data-type="primary"]': 't3m', From cbc2e34b73f26241ac5db2207ac97d80e4064da1 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 11:38:36 +0200 Subject: [PATCH 03/17] fix: input layout sequence --- src/components/fields/ComboBox/ComboBox.tsx | 2 +- src/components/fields/ListBox/ListBox.tsx | 6 ++++-- src/components/fields/TextInput/TextInputBase.tsx | 2 +- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/fields/ComboBox/ComboBox.tsx b/src/components/fields/ComboBox/ComboBox.tsx index 63cd732fe..0ee06729e 100644 --- a/src/components/fields/ComboBox/ComboBox.tsx +++ b/src/components/fields/ComboBox/ComboBox.tsx @@ -437,6 +437,7 @@ export const ComboBox = forwardRef(function ComboBox( }} data-size={size} > + {prefix ?
{prefix}
: null} ( {...modAttrs(mods)} data-size={size} /> - {prefix ?
{prefix}
: null}
{suffixPosition === 'before' ? suffix : null} {validationState || isLoading ? ( diff --git a/src/components/fields/ListBox/ListBox.tsx b/src/components/fields/ListBox/ListBox.tsx index 9b37c5419..2c326843a 100644 --- a/src/components/fields/ListBox/ListBox.tsx +++ b/src/components/fields/ListBox/ListBox.tsx @@ -26,6 +26,7 @@ import { CheckIcon } from '../../../icons'; import { useProviderProps } from '../../../provider'; import { BASE_STYLES, + BasePropsWithoutChildren, COLOR_STYLES, extractStyles, OUTER_STYLES, @@ -241,7 +242,8 @@ const SectionListElement = tasty({ export interface CubeListBoxProps extends Omit, 'onSelectionChange'>, CollectionBase, - FieldBaseProps { + FieldBaseProps, + BasePropsWithoutChildren { /** Custom styles for the list container */ listStyles?: Styles; /** Custom styles for options */ @@ -508,7 +510,7 @@ export const ListBox = forwardRef(function ListBox( 'aria-label': props['aria-label'] || label?.toString(), isDisabled, shouldUseVirtualFocus: shouldUseVirtualFocus ?? false, - shouldFocusWrap: true, + // shouldVirtualize: true, escapeKeyBehavior: onEscape ? 'none' : 'clearSelection', }, listState, diff --git a/src/components/fields/TextInput/TextInputBase.tsx b/src/components/fields/TextInput/TextInputBase.tsx index 55fc5d4d5..ceade0c0a 100644 --- a/src/components/fields/TextInput/TextInputBase.tsx +++ b/src/components/fields/TextInput/TextInputBase.tsx @@ -358,6 +358,7 @@ function _TextInputBase(props: CubeTextInputBaseProps, ref) { styles={wrapperStyles} {...wrapperProps} > + {prefix ?
{prefix}
: null} - {prefix ?
{prefix}
: null} {(validationState && !isLoading) || isLoading || suffix ? (
{suffixPosition === 'before' ? suffix : null} From 5d90e349aacb78d9d0a172d49576766940373eb9 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 11:39:25 +0200 Subject: [PATCH 04/17] fix: input layout sequence * 2 --- .../fields/FilterListBox/FilterListBox.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/fields/FilterListBox/FilterListBox.tsx b/src/components/fields/FilterListBox/FilterListBox.tsx index 6663bd640..58519c985 100644 --- a/src/components/fields/FilterListBox/FilterListBox.tsx +++ b/src/components/fields/FilterListBox/FilterListBox.tsx @@ -785,6 +785,13 @@ export const FilterListBox = forwardRef(function FilterListBox< const searchInput = ( + {isLoading && ( +
+
+ {isLoading ? : null} +
+
+ )} - {isLoading && ( -
-
- {isLoading ? : null} -
-
- )}
); From 16711445d8d98d80cd806b999ad80b5a805fe034 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 11:44:43 +0200 Subject: [PATCH 05/17] fix: input layout sequence * 3 --- src/components/fields/FilterListBox/FilterListBox.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/fields/FilterListBox/FilterListBox.tsx b/src/components/fields/FilterListBox/FilterListBox.tsx index 58519c985..35e0a7f9d 100644 --- a/src/components/fields/FilterListBox/FilterListBox.tsx +++ b/src/components/fields/FilterListBox/FilterListBox.tsx @@ -715,6 +715,7 @@ export const FilterListBox = forwardRef(function FilterListBox< focused: isFocused, loading: !!isLoading, searchable: true, + prefix: isLoading, ...externalMods, }), [ From d390a3a552f3bc954cff53f9982ab661a069dca7 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 11:52:36 +0200 Subject: [PATCH 06/17] fix: input layout sequence * 4 --- src/components/fields/TextInput/TextInputBase.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/fields/TextInput/TextInputBase.tsx b/src/components/fields/TextInput/TextInputBase.tsx index ceade0c0a..6dfc2716b 100644 --- a/src/components/fields/TextInput/TextInputBase.tsx +++ b/src/components/fields/TextInput/TextInputBase.tsx @@ -324,7 +324,7 @@ function _TextInputBase(props: CubeTextInputBaseProps, ref) { disabled: isDisabled, multiline: multiLine, prefix: !!prefix, - suffix: !!suffix, + suffix: (validationState && !isLoading) || isLoading || !!suffix, ...mods, }), [ From e72a2f18c1430b820fcb6086c1bd671c08690e70 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 12:00:20 +0200 Subject: [PATCH 07/17] chore: update stories --- .../fields/ListBox/ListBox.stories.tsx | 30 ++++++++++++++++--- .../NumberInput/NumberInput.stories.tsx | 4 +-- .../PasswordInput/PasswordInput.stories.tsx | 4 +-- .../SearchInput/SearchInput.stories.tsx | 4 +-- .../fields/Switch/Switch.stories.tsx | 4 +-- .../fields/TextArea/TextArea.stories.tsx | 4 +-- 6 files changed, 36 insertions(+), 14 deletions(-) diff --git a/src/components/fields/ListBox/ListBox.stories.tsx b/src/components/fields/ListBox/ListBox.stories.tsx index 236d5bdff..d5311829a 100644 --- a/src/components/fields/ListBox/ListBox.stories.tsx +++ b/src/components/fields/ListBox/ListBox.stories.tsx @@ -833,7 +833,7 @@ export const VirtualizedList: StoryFn> = (args) => { // Generate a large list of items with varying content to test virtualization // Mix items with and without descriptions to test dynamic sizing const items = Array.from({ length: 100 }, (_, i) => ({ - id: `item-${i}`, + key: `item-${i}`, name: `Item ${i + 1}${i % 7 === 0 ? ' - This is a longer item name to test dynamic sizing' : ''}`, description: i % 3 === 0 @@ -851,17 +851,18 @@ export const VirtualizedList: StoryFn> = (args) => { - {items.map((item) => ( - + {(item) => ( + {item.name} - ))} + )} @@ -1016,3 +1017,24 @@ EscapeKeyHandling.parameters = { }, }, }; + +export const WithItemsProp: Story = { + render: (args) => ( + + {(item) => {item.label}} + + ), + args: { + label: 'Select a fruit using items prop', + selectionMode: 'single', + defaultSelectedKey: 'apple', + }, + parameters: { + docs: { + description: { + story: + 'ListBox supports the `items` prop pattern where you provide an array of data objects and use a render function to create the items. This is useful when working with dynamic data or when you want to separate data from presentation.', + }, + }, + }, +}; diff --git a/src/components/fields/NumberInput/NumberInput.stories.tsx b/src/components/fields/NumberInput/NumberInput.stories.tsx index d2f5a1dae..3027ee81f 100644 --- a/src/components/fields/NumberInput/NumberInput.stories.tsx +++ b/src/components/fields/NumberInput/NumberInput.stories.tsx @@ -56,11 +56,11 @@ export default { description: 'Amount to increment or decrement the value', }, size: { - options: ['small', 'default', 'large'], + options: ['small', 'medium', 'large'], control: { type: 'radio' }, description: 'Input size', table: { - defaultValue: { summary: 'default' }, + defaultValue: { summary: 'medium' }, }, }, /* State */ diff --git a/src/components/fields/PasswordInput/PasswordInput.stories.tsx b/src/components/fields/PasswordInput/PasswordInput.stories.tsx index 506664073..c8e760ef7 100644 --- a/src/components/fields/PasswordInput/PasswordInput.stories.tsx +++ b/src/components/fields/PasswordInput/PasswordInput.stories.tsx @@ -43,11 +43,11 @@ export default { /* Presentation */ size: { - options: ['small', 'default', 'large'], + options: ['small', 'medium', 'large'], control: { type: 'radio' }, description: 'Input size', table: { - defaultValue: { summary: 'default' }, + defaultValue: { summary: 'medium' }, }, }, diff --git a/src/components/fields/SearchInput/SearchInput.stories.tsx b/src/components/fields/SearchInput/SearchInput.stories.tsx index 719702ff3..82b100345 100644 --- a/src/components/fields/SearchInput/SearchInput.stories.tsx +++ b/src/components/fields/SearchInput/SearchInput.stories.tsx @@ -43,11 +43,11 @@ export default { /* Presentation */ size: { - options: ['small', 'default', 'large'], + options: ['small', 'medium', 'large'], control: { type: 'radio' }, description: 'Input size', table: { - defaultValue: { summary: 'default' }, + defaultValue: { summary: 'medium' }, }, }, diff --git a/src/components/fields/Switch/Switch.stories.tsx b/src/components/fields/Switch/Switch.stories.tsx index ec676cee5..d65946e9a 100644 --- a/src/components/fields/Switch/Switch.stories.tsx +++ b/src/components/fields/Switch/Switch.stories.tsx @@ -82,11 +82,11 @@ export default { /* Presentation */ size: { - options: ['small', 'default'], + options: ['small', 'large'], control: { type: 'radio' }, description: 'Switch size', table: { - defaultValue: { summary: 'default' }, + defaultValue: { summary: 'large' }, }, }, diff --git a/src/components/fields/TextArea/TextArea.stories.tsx b/src/components/fields/TextArea/TextArea.stories.tsx index 0609f95b0..6c03a49cd 100644 --- a/src/components/fields/TextArea/TextArea.stories.tsx +++ b/src/components/fields/TextArea/TextArea.stories.tsx @@ -66,11 +66,11 @@ export default { /* Presentation */ size: { - options: ['small', 'default', 'large'], + options: ['small', 'medium', 'large'], control: { type: 'radio' }, description: 'Textarea size', table: { - defaultValue: { summary: 'default' }, + defaultValue: { summary: 'medium' }, }, }, From 9142c6f9e3d5f9c9ffb928f10d8b4566c21731f2 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 12:11:39 +0200 Subject: [PATCH 08/17] fix(TextInput): input styling --- .../fields/TextInput/TextInputBase.tsx | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/components/fields/TextInput/TextInputBase.tsx b/src/components/fields/TextInput/TextInputBase.tsx index 6dfc2716b..8fba29d52 100644 --- a/src/components/fields/TextInput/TextInputBase.tsx +++ b/src/components/fields/TextInput/TextInputBase.tsx @@ -87,6 +87,16 @@ export const INPUT_WRAPPER_STYLES: Styles = { boxSizing: 'border-box', transition: 'theme', backgroundClip: 'content-box', + height: { + '': '@size-md @size-md', + '[data-size="small"]': '@size-sm @size-sm', + '[data-size="medium"]': '@size-md @size-md', + '[data-size="large"]': '@size-lg @size-lg', + multiline: 'min @size-md', + '[data-size="small"] & multiline': 'min @size-sm', + '[data-size="medium"] & multiline': 'min @size-md', + '[data-size="large"] & multiline': 'min @size-lg', + }, Prefix: ADD_STYLES, @@ -122,6 +132,7 @@ const STYLE_LIST = [...POSITION_STYLES, ...DIMENSION_STYLES]; const INPUT_STYLE_PROPS_LIST = [...BLOCK_STYLES, 'resize']; export const DEFAULT_INPUT_STYLES: Styles = { + placeSelf: 'stretch', width: 'initial 100% 100%', color: 'inherit', fill: '#clear', @@ -142,16 +153,6 @@ export const DEFAULT_INPUT_STYLES: Styles = { resize: 'none', boxSizing: 'border-box', userSelect: 'auto', - height: { - '': '(@size-md - 2bw) (@size-md - 2bw)', - '[data-size="small"]': '(@size-sm - 2bw) (@size-sm - 2bw)', - '[data-size="medium"]': '(@size-md - 2bw) (@size-md - 2bw)', - '[data-size="large"]': '(@size-lg - 2bw) (@size-lg - 2bw)', - multiline: 'min (@size-md - 2bw)', - '[data-size="small"] & multiline': 'min (@size-sm - 2bw)', - '[data-size="medium"] & multiline': 'min (@size-md - 2bw)', - '[data-size="large"] & multiline': 'min (@size-lg - 2bw)', - }, '@vertical-padding': 0, '@left-padding': { From 916481bacdc8814b2ed8cd24c008a6a9ef671556 Mon Sep 17 00:00:00 2001 From: Andrey Yamanov Date: Mon, 28 Jul 2025 12:31:18 +0200 Subject: [PATCH 09/17] fix: input component styles --- .../fields/DatePicker/DateInputBase.tsx | 5 ++ .../fields/NumberInput/NumberInput.tsx | 4 +- .../fields/NumberInput/StepButton.tsx | 48 +++++++++---------- .../fields/TextInput/TextInputBase.tsx | 2 + src/icons/DirectionIcon.tsx | 4 +- 5 files changed, 36 insertions(+), 27 deletions(-) diff --git a/src/components/fields/DatePicker/DateInputBase.tsx b/src/components/fields/DatePicker/DateInputBase.tsx index 879130ec6..b7e5746b6 100644 --- a/src/components/fields/DatePicker/DateInputBase.tsx +++ b/src/components/fields/DatePicker/DateInputBase.tsx @@ -32,6 +32,11 @@ const DateInputElement = tasty({ role: 'presentation', styles: { ...DEFAULT_INPUT_STYLES, + height: { + '': '(@size-md - 2bw)', + '[data-size="small"]': '(@size-sm - 2bw)', + '[data-size="large"]': '(@size-lg - 2bw)', + }, display: 'flex', flow: 'row', placeItems: 'center start', diff --git a/src/components/fields/NumberInput/NumberInput.tsx b/src/components/fields/NumberInput/NumberInput.tsx index ee13f0902..bd45293d6 100644 --- a/src/components/fields/NumberInput/NumberInput.tsx +++ b/src/components/fields/NumberInput/NumberInput.tsx @@ -29,8 +29,8 @@ const StyledTextInputBase = tasty(TextInputBase, { const StepperContainer = tasty({ styles: { display: 'grid', - gridColumns: '1fr', - gridRows: 'minmax(1px, 1fr) minmax(1px, 1fr)', + gridColumns: '1sf', + gridRows: '1sf 1sf', flow: 'column', placeSelf: 'stretch', }, diff --git a/src/components/fields/NumberInput/StepButton.tsx b/src/components/fields/NumberInput/StepButton.tsx index 96bd12f32..0715e59d8 100644 --- a/src/components/fields/NumberInput/StepButton.tsx +++ b/src/components/fields/NumberInput/StepButton.tsx @@ -1,39 +1,39 @@ -import { CaretDownIcon, CaretUpIcon } from '../../../icons'; -import { Styles } from '../../../tasty'; +import { CaretDownIcon, CaretUpIcon, DirectionIcon } from '../../../icons'; +import { Styles, tasty } from '../../../tasty'; import { Button } from '../../actions'; -const STEP_BUTTON_STYLES: Styles = { - width: '4x', - radius: { - '': '0 (1r - 1bw) 0 0', - down: '0 0 (1r - 1bw) 0', - }, - fontSize: '12px', - lineHeight: '12px', - height: 'auto', - fill: { - '': '#dark.0', - hovered: '#dark.04', - pressed: '#purple.10', - '[disabled]': '#dark.0', - }, +const StepButtonElement = tasty(Button, { + preventDefault: true, + type: 'neutral', + styles: { + width: '2.5x', + height: 'auto', + radius: { + '': '0 (1r - 1bw) 0 0', + down: '0 0 (1r - 1bw) 0', + }, + fontSize: '12px', + lineHeight: '12px', + fill: { + '': '#dark.0', + hovered: '#dark.04', + pressed: '#purple.10', + '[disabled]': '#dark.0', + }, - '@icon-size': { - '': '14px', - '[data-size="small"]': '13px', + '@icon-size': '1fs', }, -}; +}); /** * Buttons for NumberField. */ export function StepButton(props) { return ( - @@ -129,6 +129,6 @@ Each component includes comprehensive documentation: ## Next Steps 1. **Explore Components** - Browse the sidebar to see all available components -2. **Learn Tasty** - Visit the [Tasty documentation](/docs/tasty-api--docs) to master the styling system +2. **Learn Tasty** - Visit the [Tasty documentation](/docs/tasty-documentation--docs) to master the styling system 3. **Build Forms** - Check out [Form documentation](/docs/forms-form--docs) for form development patterns 4. **Accessibility** - Review accessibility guidelines for inclusive design diff --git a/src/stories/Tasty.docs.mdx b/src/stories/Tasty.docs.mdx index 18c7271eb..d03510d20 100644 --- a/src/stories/Tasty.docs.mdx +++ b/src/stories/Tasty.docs.mdx @@ -125,9 +125,9 @@ const FlexibleBox = tasty({ }); // Usage - style properties become direct props - @@ -135,11 +135,11 @@ const FlexibleBox = tasty({ // Equivalent to using styles prop: - Content @@ -155,15 +155,15 @@ const FlexibleBox = tasty({ **Style Prop Priority:** ```jsx // Direct props override styles prop - // Both direct props and styles can be used together - ``` @@ -220,7 +220,7 @@ Configure breakpoints and use responsive arrays: // Use responsive arrays // Large screens (≥1200px): 4x -// Medium screens (640px-1199px): 2x +// Medium screens (640px-1199px): 2x // Small screens (<640px): 1x ``` @@ -258,7 +258,7 @@ flow: 'row dense', // grid-auto-flow: row dense Works across all layout types: ```jsx gap: '2x', // Standard gap -gap: '1x 2x', // Row gap, column gap +gap: '1x 2x', // Row gap, column gap gap: true, // Default: '1x' // Flex/Grid: Uses native CSS gap @@ -272,7 +272,7 @@ gap: true, // Default: '1x' Enhanced syntax with directional modifiers: ```jsx padding: '2x', // All sides -padding: '2x 1x', // Vertical, horizontal +padding: '2x 1x', // Vertical, horizontal padding: '2x top', // Top only padding: '1x left right', // Left and right padding: true, // Default: '1x' @@ -330,7 +330,7 @@ border: 'dashed #danger left right', // Left/right borders border: '#purple', // Color only (uses defaults for width/style) // Default values: -// - Width: '1bw' → 'var(--border-width)' +// - Width: '1bw' → 'var(--border-width)' // - Style: 'solid' // - Color: 'var(--border-color)' // Available styles: none, hidden, dotted, dashed, solid, double, groove, ridge, inset, outset @@ -366,7 +366,7 @@ preset: 'h2 strong', // Bold heading 2 // Available presets: // Headings: h1, h2, h3, h4, h5, h6 -// Text: t1, t2, t2m, t3, t3m, t4, t4m +// Text: t1, t2, t2m, t3, t3m, t4, t4m // Paragraphs: p1, p2, p3, p4 // Main text: m1, m2, m3 // Captions: c1, c2, tag @@ -376,7 +376,7 @@ preset: 'h2 strong', // Bold heading 2 Unified alignment control for flex and grid: ```jsx align: 'center', // align-items & align-content: center -justify: 'space-between', // justify-items & justify-content: space-between +justify: 'space-between', // justify-items & justify-content: space-between place: 'center', // place-items & place-content: center // Sets both *-items and *-content properties @@ -402,13 +402,13 @@ inset: true, // Default: 0 Semantic transition names: ```jsx transition: 'fill 0.2s', // Background transitions -transition: 'fade 0.15s ease-in', // Mask transitions +transition: 'fade 0.15s ease-in', // Mask transitions transition: 'theme 0.3s', // All theme properties transition: 'border 0.2s, radius 0.3s', // Multiple properties // Available semantic names: // - fade: mask -// - fill: background-color +// - fill: background-color // - border: border, box-shadow // - radius: border-radius // - theme: color, background-color, box-shadow, border, border-radius, outline @@ -538,7 +538,7 @@ Style inner elements using `data-element` attributes: const Card = tasty({ styles: { padding: '4x', - + // Sub-element styles Title: { // Styles data-element="Title" preset: 'h3', @@ -602,7 +602,7 @@ const Component = tasty({ // Define custom properties '@local-spacing': '2x', '@theme-color': 'rgb(255 128 0)', - + // Use custom properties padding: '@local-spacing', color: '@theme-color', @@ -732,7 +732,7 @@ styles: { ```jsx // ✅ Use native style prop for dynamic values - @@ -802,8 +802,8 @@ const Button = tasty({ - **Interactivity**: See [Modifiers & State Binding](#modifiers--state-binding) for hover, focus, and custom states - **Theming**: See [Variants & Theming](#variants--theming) for component variations - **Performance**: See [Performance Tips](#performance-tips-) for optimization techniques -- **Create Component Guide**: See [CreateComponent.docs.mdx](/docs/tasty-createcomponent--docs) for component creation patterns +- **Create Component Guide**: See [CreateComponent.docs.mdx](/docs/tasty-create-component--docs) for component creation patterns --- -> **Need Help?** This documentation covers the most important `tasty` features. For additional examples and component creation patterns, see the [Component Creation Guide](/docs/tasty-createcomponent--docs). +> **Need Help?** This documentation covers the most important `tasty` features. For additional examples and component creation patterns, see the [Component Creation Guide](/docs/tasty-create-component--docs).