Skip to content

Commit ce47c01

Browse files
committed
Merge remote-tracking branch 'origin' into feat-auto-disabled-mod
2 parents 293d8ca + 75a2203 commit ce47c01

35 files changed

+1427
-209
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ yarn-error.log
1616
coverage
1717
size-limit-report/stats.json
1818
docs-static
19-
19+
*.spec.md

CHANGELOG.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
# @cube-dev/ui-kit
22

3+
## 0.78.0
4+
5+
### Minor Changes
6+
7+
- [#793](https://github.com/cube-js/cube-ui-kit/pull/793) [`a64ee513`](https://github.com/cube-js/cube-ui-kit/commit/a64ee513381c56b470ebca720a6ad3f21bc5fd3f) Thanks [@tenphi](https://github.com/tenphi)! - The new navigation API that relies on external `useHref` and `useNavigation` hooks.
8+
9+
### Patch Changes
10+
11+
- [#793](https://github.com/cube-js/cube-ui-kit/pull/793) [`a64ee513`](https://github.com/cube-js/cube-ui-kit/commit/a64ee513381c56b470ebca720a6ad3f21bc5fd3f) Thanks [@tenphi](https://github.com/tenphi)! - Add support for full navigation argument type in `to` prop in actions including object `{ pathname, search, hash }` and numbers for history navigation. Use `<Link to={-1}>...` to move back in history.
12+
13+
## 0.77.4
14+
15+
### Patch Changes
16+
17+
- [#791](https://github.com/cube-js/cube-ui-kit/pull/791) [`1ca1deb4`](https://github.com/cube-js/cube-ui-kit/commit/1ca1deb4211ec6a67a5d81fbd7606a76c69faa31) Thanks [@tenphi](https://github.com/tenphi)! - Actualize the interface of Item component.
18+
19+
- [#791](https://github.com/cube-js/cube-ui-kit/pull/791) [`1ca1deb4`](https://github.com/cube-js/cube-ui-kit/commit/1ca1deb4211ec6a67a5d81fbd7606a76c69faa31) Thanks [@tenphi](https://github.com/tenphi)! - Make Panel placeSelf stretch by default.
20+
21+
- [#791](https://github.com/cube-js/cube-ui-kit/pull/791) [`1ca1deb4`](https://github.com/cube-js/cube-ui-kit/commit/1ca1deb4211ec6a67a5d81fbd7606a76c69faa31) Thanks [@tenphi](https://github.com/tenphi)! - Fix Item interface for FilterPicker.
22+
23+
- [#791](https://github.com/cube-js/cube-ui-kit/pull/791) [`1ca1deb4`](https://github.com/cube-js/cube-ui-kit/commit/1ca1deb4211ec6a67a5d81fbd7606a76c69faa31) Thanks [@tenphi](https://github.com/tenphi)! - Add onClear callback for FilterPicker, Select, ComboBox and SearchInput.
24+
25+
- [#791](https://github.com/cube-js/cube-ui-kit/pull/791) [`1ca1deb4`](https://github.com/cube-js/cube-ui-kit/commit/1ca1deb4211ec6a67a5d81fbd7606a76c69faa31) Thanks [@tenphi](https://github.com/tenphi)! - Fix popover of FilterPicker to corretly flip on opening.
26+
27+
## 0.77.3
28+
29+
### Patch Changes
30+
31+
- [#787](https://github.com/cube-js/cube-ui-kit/pull/787) [`78dc7da2`](https://github.com/cube-js/cube-ui-kit/commit/78dc7da2983d1acb1ed32ad48e482a62758c093c) Thanks [@tenphi](https://github.com/tenphi)! - Add ItemAction component with a temporary implementation.
32+
33+
- [#787](https://github.com/cube-js/cube-ui-kit/pull/787) [`78dc7da2`](https://github.com/cube-js/cube-ui-kit/commit/78dc7da2983d1acb1ed32ad48e482a62758c093c) Thanks [@tenphi](https://github.com/tenphi)! - Add a clear button to FilterPicker, Select and ComboBox components. Redesign the clear button in SearchInput component.
34+
35+
- [#789](https://github.com/cube-js/cube-ui-kit/pull/789) [`1251a11b`](https://github.com/cube-js/cube-ui-kit/commit/1251a11b7a406cf960ed1a89115c2f9dd4bd3717) Thanks [@tenphi](https://github.com/tenphi)! - Add DecimalDecreaseIcon.tsx and DecimalIncreaseIcon.tsx.
36+
37+
- [#790](https://github.com/cube-js/cube-ui-kit/pull/790) [`f4e502d1`](https://github.com/cube-js/cube-ui-kit/commit/f4e502d19eae89334c8f2487f7c0a4acb9c3fde6) Thanks [@tenphi](https://github.com/tenphi)! - Make toasts and notifications more visible with a colorful border.
38+
339
## 0.77.2
440

541
### Patch Changes

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cube-dev/ui-kit",
3-
"version": "0.77.2",
3+
"version": "0.78.0",
44
"type": "module",
55
"description": "UIKit for Cube Projects",
66
"repository": {
@@ -47,7 +47,8 @@
4747
"clear": "pnpm clear:dist && rimraf ./storybook-docs ./storybook-static ./node_modules/.cache",
4848
"clear:dist": "rimraf ./dist",
4949
"release": "pnpm build && changeset publish",
50-
"postinstall": "git config blame.ignoreRevsFile .git-blame-ignore-revs"
50+
"postinstall": "git config blame.ignoreRevsFile .git-blame-ignore-revs",
51+
"add-icons": "cd src/icons && node add-new-icon.js"
5152
},
5253
"publishConfig": {
5354
"directory": "dist"

src/components/Item.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,16 @@
1-
import { ReactElement, ReactNode } from 'react';
1+
import { ReactElement } from 'react';
22
import { Item, ItemProps } from 'react-stately';
33

4-
import { Styles } from '../tasty';
4+
import { CubeItemBaseProps } from './content/ItemBase/ItemBase';
55

6-
export interface CubeItemProps<T> extends ItemProps<T> {
7-
qa?: string;
8-
description?: ReactNode;
9-
descriptionPlacement?: 'inline' | 'block' | 'auto';
10-
icon?: ReactNode | 'checkbox';
11-
prefix?: ReactNode;
12-
suffix?: ReactNode;
13-
rightIcon?: ReactNode;
14-
styles?: Styles;
6+
export interface CubeItemProps<T>
7+
extends ItemProps<T>,
8+
Omit<CubeItemBaseProps, 'children'> {
159
onAction?: () => void;
1610
wrapper?: (item: ReactElement) => ReactElement;
1711
[key: string]: any;
1812
}
1913

20-
const _Item = Item as unknown as <T>(props: CubeItemProps<T>) => ReactElement;
14+
const _Item = Item as <T>(props: CubeItemProps<T>) => ReactElement;
2115

2216
export { _Item as Item };

src/components/Root.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { ModalProvider } from 'react-aria';
33
import { StyleSheetManager } from 'styled-components';
44

55
import { Provider } from '../provider';
6+
import { NavigationAdapter } from '../providers/navigation.types';
67
import { TrackingProps, TrackingProvider } from '../providers/TrackingProvider';
78
import {
89
BASE_STYLES,
@@ -43,7 +44,7 @@ export interface CubeRootProps extends BaseProps {
4344
fontDisplay?: 'auto' | 'block' | 'swap' | 'fallback' | 'optional';
4445
fonts?: boolean;
4546
publicUrl?: string;
46-
router?: any;
47+
navigation?: NavigationAdapter;
4748
font?: string;
4849
monospaceFont?: string;
4950
applyLegacyTokens?: boolean;
@@ -64,7 +65,7 @@ export function Root(allProps: CubeRootProps) {
6465
fontDisplay = 'swap',
6566
fonts,
6667
publicUrl,
67-
router,
68+
navigation,
6869
font,
6970
monospaceFont,
7071
applyLegacyTokens,
@@ -125,7 +126,7 @@ export function Root(allProps: CubeRootProps) {
125126
const styles = extractStyles(props, STYLES, DEFAULT_STYLES);
126127

127128
return (
128-
<Provider router={router} root={rootRef} breakpoints={breakpoints}>
129+
<Provider navigation={navigation} root={rootRef} breakpoints={breakpoints}>
129130
<TrackingProvider event={tracking?.event}>
130131
<StyleSheetManager>
131132
<RootElement

src/components/actions/Action/Action.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,12 @@ import {
88
CONTAINER_STYLES,
99
ContainerStyleProps,
1010
extractStyles,
11-
Styles,
1211
TagName,
1312
tasty,
1413
TEXT_STYLES,
1514
TextStyleProps,
1615
} from '../../../tasty';
17-
import { useAction } from '../use-action';
16+
import { NavigateArg, useAction } from '../use-action';
1817

1918
export interface CubeActionProps<
2019
T extends TagName = 'a' | 'button' | 'span' | 'div',
@@ -23,7 +22,7 @@ export interface CubeActionProps<
2322
ContainerStyleProps,
2423
TextStyleProps,
2524
Omit<AriaButtonProps, 'type'> {
26-
to?: string;
25+
to?: NavigateArg;
2726
label?: string;
2827
htmlType?: 'button' | 'submit' | 'reset' | undefined;
2928
download?: string;
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { FocusableRef } from '@react-types/shared';
2+
import { forwardRef } from 'react';
3+
4+
import { tasty } from '../../../tasty';
5+
import { Button, CubeButtonProps } from '../Button';
6+
7+
export interface CubeItemActionProps extends CubeButtonProps {
8+
// All props from Button are inherited
9+
}
10+
11+
export const ItemAction = tasty(Button, {
12+
type: 'neutral',
13+
styles: {
14+
height: '($size - 1x)',
15+
width: '($size - 1x)',
16+
margin: '0 (.5x - 1bw)',
17+
},
18+
});
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { ItemAction } from './ItemAction';
2+
export type { CubeItemActionProps } from './ItemAction';

0 commit comments

Comments
 (0)