Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d8e0c29
feat: data-input-type attribute for field components
tenphi Nov 17, 2025
71c0951
feat: data-input-type attribute for field components * 2
tenphi Nov 17, 2025
c800ae2
feat: add isButton prop to pickers
tenphi Nov 17, 2025
44319c1
chore: update storybook
tenphi Nov 17, 2025
192e602
feat: add isButton prop to pickers * 2
tenphi Nov 17, 2025
2f5e789
fix: qa props in pickers
tenphi Nov 17, 2025
df929ce
fix: qa props in pickers * 2
tenphi Nov 17, 2025
998653d
fix(Item): remove memoization for rendering element
tenphi Nov 17, 2025
65ad77e
fix: placeholder mod in pickers
tenphi Nov 17, 2025
4570f59
fix: minimum popover width for pickers
tenphi Nov 17, 2025
612e9c1
fix: descrease container padding
tenphi Nov 17, 2025
4b8b1ff
fix(Radio): qa prop
tenphi Nov 17, 2025
ad59d21
fix: remove placeholder wrapping
tenphi Nov 17, 2025
43d25a4
fix(FilterPicker): min overlay width
tenphi Nov 17, 2025
d28f908
fix: placeholders
tenphi Nov 18, 2025
874785f
fix: overlay size in pickers
tenphi Nov 18, 2025
bc665eb
feat: color token fallback
tenphi Nov 18, 2025
a6cc2dd
fix: legacy token declaration
tenphi Nov 18, 2025
53780e1
fix: legacy token declaration * 2
tenphi Nov 18, 2025
4c72283
fix: placeholders * 2
tenphi Nov 18, 2025
813e2e6
fix: placeholders * 3
tenphi Nov 18, 2025
c0e30c1
fix(FilterListBox): focus on selected item first
tenphi Nov 18, 2025
6986679
fix(FilterListBox): focus on selected item first * 2
tenphi Nov 18, 2025
46697cf
fix(TextInputBase): set default input type
tenphi Nov 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/color-token-fallback.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@cube-dev/ui-kit': minor
---

Added color token fallback syntax `(#color, #fallback)` for robust color hierarchies. Supports nested fallbacks like `(#primary, (#secondary, #default))`. Automatically generates RGB variants for the entire fallback chain, ensuring proper color variable resolution at runtime.

6 changes: 6 additions & 0 deletions .changeset/overlay-min-width-improvement.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@cube-dev/ui-kit': patch
---

Improved overlay width behavior for Picker and FilterPicker components to match their trigger button width, ensuring better visual consistency.

6 changes: 6 additions & 0 deletions .changeset/picker-is-button-prop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@cube-dev/ui-kit': minor
---

Add `isButton` prop support to `Picker`, `FilterPicker`, and `Select` components. The prop is now properly passed to their trigger components (`ItemButton` for Picker/FilterPicker, `Item` for Select), allowing control over button styling. Defaults to `false` to maintain existing behavior.

5 changes: 5 additions & 0 deletions .changeset/pink-rivers-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-dev/ui-kit": patch
---

Decrease containerPadding of all overlays 12px -> 8px.
6 changes: 6 additions & 0 deletions .changeset/remove-legacy-at-syntax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'@cube-dev/ui-kit': minor
---

Removed legacy `@` prefix support for custom properties. Use `$` prefix instead (e.g., `$custom-color` instead of `@custom-color`).

5 changes: 5 additions & 0 deletions .changeset/tidy-laws-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@cube-dev/ui-kit": minor
---

Specify `data-input-type` attribute for each field component and improve `qa` prop handling in various field components for consistency.
4 changes: 2 additions & 2 deletions .cursor/rules/storybook.mdc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ alwaysApply: false
### Stories Files (.stories.tsx)
- Import types: `import type { Meta, StoryObj } from '@storybook/react-vite';`
- Import `StoryFn` for custom template functions
- For interactive tests: `import { userEvent, within } from '@storybook/test';` (NOT from `@testing-library/react`)
- For interactive tests: `import { userEvent, within } from 'storybook/test';` (NOT from `@testing-library/react`)

### Documentation Files (.docs.mdx)
- `import { Meta, Canvas, Story, Controls } from '@storybook/addon-docs/blocks';`
Expand Down Expand Up @@ -103,7 +103,7 @@ export const Interactive: StoryObj = {
};
```

**Important:** Always import `userEvent` and `within` from `'@storybook/test'` in story files. This ensures they respect Storybook's configuration (e.g., `testIdAttribute: 'data-qa'` set in `.storybook/preview.jsx`). Do NOT use `@testing-library/react` imports in stories.
**Important:** Always import `userEvent` and `within` from `'storybook/test'` in story files. This ensures they respect Storybook's configuration (e.g., `testIdAttribute: 'data-qa'` set in `.storybook/preview.jsx`). Do NOT use `@testing-library/react` imports in stories.

## MDX Documentation Structure

Expand Down
2 changes: 1 addition & 1 deletion .size-limit.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = [
}),
);
},
limit: '320kB',
limit: '310kB',
},
{
name: 'Tree shaking (just a Button)',
Expand Down
2 changes: 1 addition & 1 deletion .storybook/preview.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { configure } from '@storybook/test';
import isChromatic from 'chromatic/isChromatic';
import { config } from 'react-transition-group';
import { configure } from 'storybook/test';

import { Root } from '../src';

Expand Down
11 changes: 5 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
"@react-stately/utils": "^3.10.8",
"@react-types/shared": "^3.31.0",
"@sparticuz/chromium": "^137.0.1",
"@storybook/test": "^8.6.14",
"@tabler/icons-react": "^3.31.0",
"@tanstack/react-virtual": "^3.13.12",
"@trivago/prettier-plugin-sort-imports": "^5.2.2",
Expand Down Expand Up @@ -117,9 +116,9 @@
"@size-limit/webpack": "^8.2.4",
"@size-limit/webpack-why": "^8.2.4",
"@statoscope/cli": "^5.20.1",
"@storybook/addon-docs": "^10.0.0",
"@storybook/addon-links": "^10.0.0",
"@storybook/react-vite": "^10.0.0",
"@storybook/addon-docs": "^10.0.8",
"@storybook/addon-links": "^10.0.8",
"@storybook/react-vite": "^10.0.8",
"@swc/core": "^1.3.36",
"@swc/jest": "^0.2.36",
"@testing-library/dom": "^10.4.1",
Expand Down Expand Up @@ -148,7 +147,7 @@
"eslint-plugin-jsx-a11y": "^6.10.2",
"eslint-plugin-react": "^7.37.5",
"eslint-plugin-react-hooks": "^5.2.0",
"eslint-plugin-storybook": "^10.0.0",
"eslint-plugin-storybook": "^10.0.8",
"husky": "^6.0.0",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
Expand All @@ -165,7 +164,7 @@
"react-test-renderer": "^19.1.1",
"rimraf": "^6.0.1",
"size-limit": "^8.2.6",
"storybook": "^10.0.0",
"storybook": "^10.0.8",
"storybook-addon-turbo-build": "^2.0.1",
"styled-components": "^6.1.19",
"swc-loader": "^0.2.6",
Expand Down
249 changes: 59 additions & 190 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions src/components/CollectionItem.docs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ const items = [{

## Properties

Extends all [Item component](/components/Item) props:
Extends all [Item component](/docs/content-item--docs) props:

- `children` - Item content
- `icon` / `rightIcon` - Icons
Expand Down Expand Up @@ -296,8 +296,8 @@ const items: User[] = [

## Related Components

- [Item](/components/Item) - Base item component
- [ListBox](/components/ListBox) - List with selection
- [Select](/components/Select) - Dropdown selector
- [ComboBox](/components/ComboBox) - Searchable input
- [Menu](/components/Menu) - Action menu
- [Item](/docs/content-item--docs) - Base item component
- [ListBox](/docs/forms-listbox--docs) - List with selection
- [Select](/docs/forms-select--docs) - Dropdown selector
- [ComboBox](/docs/forms-combobox--docs) - Searchable input
- [Menu](/docs/actions-menu--docs) - Action menu
8 changes: 1 addition & 7 deletions src/components/actions/CommandMenu/CommandMenu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
import {
expect,
findByRole,
userEvent,
waitFor,
within,
} from '@storybook/test';
import {
IconArrowBack,
IconArrowForward,
Expand All @@ -18,6 +11,7 @@ import {
IconSelect,
} from '@tabler/icons-react';
import React, { useState } from 'react';
import { expect, findByRole, userEvent, waitFor, within } from 'storybook/test';

import { EditIcon, TrashIcon } from '../../../icons';
import { tasty } from '../../../tasty';
Expand Down
2 changes: 1 addition & 1 deletion src/components/actions/ItemAction/ItemAction.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { userEvent, within } from '@storybook/test';
import {
IconCopy,
IconEdit,
Expand All @@ -8,6 +7,7 @@ import {
IconStar,
IconTrash,
} from '@tabler/icons-react';
import { userEvent, within } from 'storybook/test';

import { Item } from '../../content/Item';
import { Space } from '../../layout/Space';
Expand Down
2 changes: 1 addition & 1 deletion src/components/actions/ItemButton/ItemButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { userEvent, within } from '@storybook/test';
import {
IconEdit,
IconExternalLink,
IconFile,
IconTrash,
} from '@tabler/icons-react';
import { userEvent, within } from 'storybook/test';

import { timeout } from '../../../utils/promise';
import { ItemAction } from '../ItemAction';
Expand Down
8 changes: 1 addition & 7 deletions src/components/actions/Menu/Menu.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,6 @@
// @ts-nocheck
// NOTE: Type checking is disabled in this Storybook file to prevent
// noisy errors from complex generic typings that do not affect runtime behaviour.
import {
expect,
findByRole,
userEvent,
waitFor,
within,
} from '@storybook/test';
import {
IconBook,
IconBulb,
Expand All @@ -17,6 +10,7 @@ import {
IconReload,
} from '@tabler/icons-react';
import { useState } from 'react';
import { expect, findByRole, userEvent, waitFor, within } from 'storybook/test';

import {
CheckIcon,
Expand Down
2 changes: 1 addition & 1 deletion src/components/content/Item/Item.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { expect, userEvent, waitFor, within } from '@storybook/test';
import {
IconCoin,
IconEdit,
Expand All @@ -7,6 +6,7 @@ import {
IconUser,
} from '@tabler/icons-react';
import { useState } from 'react';
import { expect, userEvent, waitFor, within } from 'storybook/test';

import { DirectionIcon } from '../../../icons';
import { baseProps } from '../../../stories/lists/baseProps';
Expand Down
Loading
Loading