Skip to content

Commit 6f3b261

Browse files
authored
feat(ItemBase) add generic item component (#752)
1 parent a8cd79f commit 6f3b261

File tree

138 files changed

+5672
-1926
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

138 files changed

+5672
-1926
lines changed

.changeset/beige-cameras-lick.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Make menu props optional for open method in `useAnchoredMenu`.

.changeset/clean-carrots-flash.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Increase search input size for FilterListBox and CommandMenu.

.changeset/gentle-timers-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Add default menu props to `useAnchoredMenu`.

.changeset/happy-cycles-pretend.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Add `allValueProps`, `customValueProps` and `newCustomValueProps` to customize the additional options in ListBox, FilterListBox and FilterPicker.

.changeset/tricky-carpets-laugh.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": patch
3+
---
4+
5+
Sync opening state between FilterPicker instances and other triggers.

.changeset/violet-months-obey.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@cube-dev/ui-kit": minor
3+
---
4+
5+
Add itemBase and ItemButton components packed with lots of features. ItemBase is now used as a base for all Item components in Menu, CommandMenu, ListBox, FilterListBox, FilterPicker, Select, ComboBox.

.size-limit.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ module.exports = [
2020
}),
2121
);
2222
},
23-
limit: '284kB',
23+
limit: '285kB',
2424
},
2525
{
2626
name: 'Tree shaking (just a Button)',

.storybook/main.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// @ts-check
22
import remarkGfm from 'remark-gfm';
33

4-
/** @type {import('@storybook/core-common').StorybookConfig} */
54
const config = {
65
staticDirs: ['../public'],
76

@@ -23,8 +22,6 @@ const config = {
2322

2423
addons: [
2524
'@storybook/addon-links',
26-
'@storybook/addon-essentials',
27-
'@storybook/addon-interactions',
2825
{
2926
name: 'storybook-addon-turbo-build',
3027
options: {
@@ -44,9 +41,5 @@ const config = {
4441
},
4542
},
4643
],
47-
48-
docs: {
49-
autodocs: true,
50-
},
5144
};
5245
export default config;

.storybook/preview.jsx

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
1-
import { DocsContainer } from '@storybook/addon-docs';
2-
import { configure } from '@storybook/test';
31
import isChromatic from 'chromatic/isChromatic';
42
import { config } from 'react-transition-group';
3+
import { configure } from 'storybook/test';
54

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

@@ -37,13 +36,7 @@ export const parameters = {
3736
return aTitle.localeCompare(bTitle, undefined, { numeric: true });
3837
},
3938
},
40-
docs: {
41-
container: ({ children, context }) => (
42-
<DocsContainer context={context}>
43-
<Root fontDisplay="auto">{children}</Root>
44-
</DocsContainer>
45-
),
46-
},
39+
docs: {},
4740
backgrounds: {
4841
default: 'transparent',
4942
values: [
@@ -64,3 +57,4 @@ export const decorators = [
6457
</Root>
6558
),
6659
];
60+
export const tags = ['autodocs'];

package.json

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"fix": "npm-run-all -p eslint:fix prettier:fix",
4141
"storybook": "STORYBOOK_MODE=stories storybook dev -p 6060",
4242
"build-storybook": "STORYBOOK_MODE=stories storybook build",
43-
"build-docs": "STORYBOOK_MODE=docs storybook build --docs -o storybook-docs",
43+
"build-docs": "storybook build -o storybook-docs",
4444
"build-static-docs": "npm run build-docs && node scripts/snapshot-docs.js",
4545
"size": "size-limit",
4646
"prepare": "husky install",
@@ -115,16 +115,9 @@
115115
"@size-limit/webpack": "^8.2.4",
116116
"@size-limit/webpack-why": "^8.2.4",
117117
"@statoscope/cli": "^5.20.1",
118-
"@storybook/addon-actions": "^8.6.12",
119-
"@storybook/addon-docs": "^8.6.12",
120-
"@storybook/addon-essentials": "^8.6.12",
121-
"@storybook/addon-interactions": "^8.6.12",
122-
"@storybook/addon-links": "^8.6.12",
123-
"@storybook/addon-mdx-gfm": "^8.6.12",
124-
"@storybook/blocks": "^8.6.12",
125-
"@storybook/react": "^8.6.12",
126-
"@storybook/react-vite": "^8.6.12",
127-
"@storybook/test": "^8.6.12",
118+
"@storybook/addon-docs": "^9.1.2",
119+
"@storybook/addon-links": "^9.1.2",
120+
"@storybook/react-vite": "^9.1.2",
128121
"@swc/core": "^1.3.36",
129122
"@swc/jest": "^0.2.36",
130123
"@testing-library/dom": "^9.3.4",
@@ -153,7 +146,7 @@
153146
"eslint-plugin-jsx-a11y": "^6.10.2",
154147
"eslint-plugin-react": "^7.37.5",
155148
"eslint-plugin-react-hooks": "^5.2.0",
156-
"eslint-plugin-storybook": "^0.12.0",
149+
"eslint-plugin-storybook": "^9.1.2",
157150
"husky": "^6.0.0",
158151
"jest": "^29.7.0",
159152
"jest-environment-jsdom": "^29.7.0",
@@ -170,7 +163,7 @@
170163
"react-test-renderer": "^18.2.0",
171164
"rimraf": "^6.0.1",
172165
"size-limit": "^8.2.6",
173-
"storybook": "^8.6.12",
166+
"storybook": "^9.1.2",
174167
"storybook-addon-turbo-build": "^2.0.1",
175168
"styled-components": "^6.1.8",
176169
"swc-loader": "^0.2.6",

0 commit comments

Comments
 (0)