Skip to content

feat: update to @ui5/[email protected] #5390

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jan 8, 2024
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
"@storybook/react": "7.6.7",
"@storybook/react-vite": "7.6.7",
"@storybook/theming": "7.6.7",
"@ui5/webcomponents": "1.20.1",
"@ui5/webcomponents-fiori": "1.20.1",
"@ui5/webcomponents-icons": "1.20.1",
"@ui5/webcomponents": "1.21.0",
"@ui5/webcomponents-fiori": "1.21.0",
"@ui5/webcomponents-icons": "1.21.0",
"react": "18.2.0",
"react-dom": "18.2.0",
"remark-gfm": "^3.0.1",
Expand All @@ -59,7 +59,7 @@
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@ui5/webcomponents-tools": "1.20.0",
"@ui5/webcomponents-tools": "1.21.0",
"@vitejs/plugin-react": "^4.2.0",
"chromatic": "^10.0.0",
"cssnano": "^6.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"peerDependencies": {
"@types/react": "*",
"@ui5/webcomponents-base": "~1.20.0",
"@ui5/webcomponents-base": "~1.21.0",
"react": "^16.14.0 || ^17.0.0 || ^18.0.0"
},
"peerDependenciesMeta": {
Expand Down
4 changes: 2 additions & 2 deletions packages/charts/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"recharts": "2.10.3"
},
"peerDependencies": {
"@ui5/webcomponents-react": "~1.23.0",
"@ui5/webcomponents-react-base": "~1.23.0",
"@ui5/webcomponents-react": "~1.24.0",
"@ui5/webcomponents-react-base": "~1.24.0",
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
"react-jss": "^10.10.0"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/cra-template-seed/template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"package": {
"dependencies": {
"@ui5/webcomponents": "~1.20.0",
"@ui5/webcomponents-fiori": "~1.20.0",
"@ui5/webcomponents-icons": "~1.20.0",
"@ui5/webcomponents": "~1.21.0",
"@ui5/webcomponents-fiori": "~1.21.0",
"@ui5/webcomponents-icons": "~1.21.0",
"@ui5/webcomponents-react": "latest",
"axios": "^0.27.2",
"formik": "^2.2.9",
Expand Down
6 changes: 3 additions & 3 deletions packages/cra-template/template.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"package": {
"dependencies": {
"@ui5/webcomponents": "~1.20.0",
"@ui5/webcomponents-fiori": "~1.20.0",
"@ui5/webcomponents-icons": "~1.20.0",
"@ui5/webcomponents": "~1.21.0",
"@ui5/webcomponents-fiori": "~1.21.0",
"@ui5/webcomponents-icons": "~1.21.0",
"@ui5/webcomponents-react": "latest",
"web-vitals": "^2.1.0"
},
Expand Down
8 changes: 4 additions & 4 deletions packages/main/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@
"peerDependencies": {
"@types/react": "*",
"@types/react-dom": "*",
"@ui5/webcomponents": "~1.20.0",
"@ui5/webcomponents-base": "~1.20.0",
"@ui5/webcomponents-fiori": "~1.20.0",
"@ui5/webcomponents-icons": "~1.20.0",
"@ui5/webcomponents": "~1.21.0",
"@ui5/webcomponents-base": "~1.21.0",
"@ui5/webcomponents-fiori": "~1.21.0",
"@ui5/webcomponents-icons": "~1.21.0",
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ You can disable the `CheckBox` by setting the `disabled` property to `true`, or
The `CheckBox` exposes the following CSS Shadow Parts:

- root - Used to style the outermost wrapper of the `CheckBox`
- label - Used to style the label of the `CheckBox`

## Keyboard Handling

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
}
],
"description": "Shows the ColorPalettePopover. <b>Note:</b> The method is deprecated and will be removed in future, use <code>showAt</code> instead.",
"deprecated": { "text": "The method is deprecated in favour of <code>showAt</code>." }
"deprecated": {
"text": "The method is deprecated in favour of <code>open</code> and <code>opener</code> properties."
}
},
{
"name": "showAt",
Expand All @@ -26,6 +28,9 @@
"description": "the element that the popover is shown at"
}
],
"description": "Shows the ColorPalettePopover."
"description": "Shows the ColorPalettePopover.",
"deprecated": {
"text": "The method is deprecated in favour of <code>open</code> and <code>opener</code> properties."
}
}
]
28 changes: 23 additions & 5 deletions packages/main/src/webComponents/ColorPalettePopover/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,14 @@ interface ColorPalettePopoverAttributes {
* Defines the default color of the component. **Note:** The default color should be a part of the ColorPalette colors
*/
defaultColor?: CSSProperties['color'];
/**
* Defines the open | closed state of the popover.
*/
open?: boolean;
/**
* Defines the ID of the element that the popover is shown at.
*/
opener?: string;
/**
* Defines whether the user can choose the default color from a button.
*/
Expand All @@ -25,26 +33,36 @@ interface ColorPalettePopoverAttributes {
showRecentColors?: boolean;
}

export interface ColorPalettePopoverDomRef extends ColorPalettePopoverAttributes, Ui5DomRef {
export interface ColorPalettePopoverDomRef extends Omit<ColorPalettePopoverAttributes, 'opener'>, Ui5DomRef {
/**
* Shows the ColorPalettePopover. **Note:** The method is deprecated and will be removed in future, use `showAt` instead.
*
* @deprecated The method is deprecated in favour of <code>showAt</code>.
* @deprecated The method is deprecated in favour of <code>open</code> and <code>opener</code> properties.
* @param {HTMLElement | EventTarget} opener - the element that the popover is shown at
*/
openPopover: (opener: HTMLElement | EventTarget) => void;
/**
* Shows the ColorPalettePopover.
*
* @deprecated The method is deprecated in favour of <code>open</code> and <code>opener</code> properties.
* @param {HTMLElement | EventTarget} opener - the element that the popover is shown at
*/
showAt: (opener: HTMLElement | EventTarget) => void;
/**
* Defines the ID or DOM Reference of the element that the popover is shown at.
*/
opener?: string | HTMLElement;
}

export interface ColorPalettePopoverPropTypes extends ColorPalettePopoverAttributes, CommonProps {
/**
* Defines the content of the component.
*/
children?: ReactNode | ReactNode[];
/**
* Fired when the `ColorPalettePopover` is closed due to user interaction.
*/
onClose?: (event: Ui5CustomEvent<ColorPalettePopoverDomRef>) => void;
/**
* Fired when the user selects a color.
*/
Expand All @@ -60,10 +78,10 @@ export interface ColorPalettePopoverPropTypes extends ColorPalettePopoverAttribu
*/
const ColorPalettePopover = withWebComponent<ColorPalettePopoverPropTypes, ColorPalettePopoverDomRef>(
'ui5-color-palette-popover',
['defaultColor'],
['showDefaultColor', 'showMoreColors', 'showRecentColors'],
['defaultColor', 'opener'],
['open', 'showDefaultColor', 'showMoreColors', 'showRecentColors'],
[],
['item-click'],
['close', 'item-click'],
() => import('@ui5/webcomponents/dist/ColorPalettePopover.js')
);

Expand Down
30 changes: 15 additions & 15 deletions packages/main/src/webComponents/Select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import '@ui5/webcomponents/dist/Select.js';
import type { SelectChangeEventDetail, SelectLiveChangeEventDetail } from '@ui5/webcomponents/dist/Select.js';
import type { ReactNode } from 'react';
import { ValueState } from '../../enums/index.js';
import type { CommonProps, Ui5CustomEvent, Ui5DomRef } from '../../interfaces/index.js';
import type { Ui5CustomEvent, CommonProps, Ui5DomRef } from '../../interfaces/index.js';
import { withWebComponent } from '../../internal/withWebComponent.js';
import type { UI5WCSlotsNode } from '../../types/index.js';

Expand All @@ -24,7 +24,7 @@ interface SelectAttributes {
*/
disabled?: boolean;
/**
* Defines the ID of the component's options menu, as an alternative to defining the selection's drop-down menu.
* Defines the ID of component's menu of options as alternative to define the select's dropdown.
*
* **Note:** Usage of `SelectMenu` is recommended.
*/
Expand All @@ -38,16 +38,15 @@ interface SelectAttributes {
*/
name?: string;
/**
* Defines whether the component is required.
* Defines whether the component is read-only.
*
* **Note:** A read-only component is not editable, but still provides visual feedback upon user interaction.
*/
required?: boolean;
readonly?: boolean;
/**
* Defines the value state of the component.
* Defines whether the component is required.
*/
valueState?: ValueState | keyof typeof ValueState;
}

export interface SelectDomRef extends Omit<SelectAttributes, 'menu'>, Ui5DomRef {
required?: boolean;
/**
* Defines the value of the component:
* \- when get - returns the value of the component, e.g. the `value` property of the selected option or its text content.
Expand All @@ -57,11 +56,12 @@ export interface SelectDomRef extends Omit<SelectAttributes, 'menu'>, Ui5DomRef
*/
value?: string;
/**
* Defines a reference (ID or DOM element) of the component's options menu, as an alternative to defining the selection's drop-down menu.
*
* **Note:** Usage of `SelectMenu` is recommended.
* Defines the value state of the component.
*/
menu?: string | HTMLElement;
valueState?: ValueState | keyof typeof ValueState;
}

export interface SelectDomRef extends SelectAttributes, Ui5DomRef {
/**
* Currently selected `Option` element.
*/
Expand Down Expand Up @@ -134,8 +134,8 @@ export interface SelectPropTypes extends SelectAttributes, Omit<CommonProps, 'on
*/
const Select = withWebComponent<SelectPropTypes, SelectDomRef>(
'ui5-select',
['accessibleName', 'accessibleNameRef', 'menu', 'name', 'valueState'],
['disabled', 'required'],
['accessibleName', 'accessibleNameRef', 'menu', 'name', 'value', 'valueState'],
['disabled', 'readonly', 'required'],
['label', 'valueStateMessage'],
['change', 'close', 'live-change', 'open'],
() => import('@ui5/webcomponents/dist/Select.js')
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
**Since:** 1.19.0

The code>SelectMenuOption component represents an option in the `SelectMenu`.
The `SelectMenuOption` component represents an option in the `SelectMenu`.

### Usage

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface SelectMenuOptionPropTypes extends SelectMenuOptionAttributes, C
}

/**
* The code>SelectMenuOption component represents an option in the `SelectMenu`.
* The `SelectMenuOption` component represents an option in the `SelectMenu`.
*
* __Note:__ This component is a web component developed by the UI5 Web Components’ team.
*
Expand Down
8 changes: 7 additions & 1 deletion packages/main/src/webComponents/SplitButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ interface SplitButtonAttributes {
* Defines the accessible ARIA name of the component.
*/
accessibleName?: string;
/**
* Defines whether the arrow button should have the active state styles or not.
*
* @since 1.24.0
*/
activeArrowButton?: boolean;
/**
* Defines the icon to be displayed in active state as graphical element within the component.
*/
Expand Down Expand Up @@ -60,7 +66,7 @@ export interface SplitButtonPropTypes extends SplitButtonAttributes, Omit<Common
const SplitButton = withWebComponent<SplitButtonPropTypes, SplitButtonDomRef>(
'ui5-split-button',
['accessibleName', 'activeIcon', 'design', 'icon'],
['disabled'],
['activeArrowButton', 'disabled'],
[],
['arrow-click', 'click'],
() => import('@ui5/webcomponents/dist/SplitButton.js')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Multiple sub tabs could be placed underneath one main tab. Nesting allows deeper
<ui5-link target="_blank" href="https://developer.mozilla.org/en-US/docs/Web/CSS/::part">CSS Shadow Parts</ui5-link> allow developers to style elements inside the Shadow DOM.
The `TabContainer` exposes the following CSS Shadow Parts:

- tabstrip - Used to style the tabstrip of the component
- content - Used to style the content of the component

## Keyboard Handling
Expand Down
27 changes: 12 additions & 15 deletions packages/main/src/webComponents/ToolbarButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,26 +52,23 @@ interface ToolbarButtonAttributes {
*/
tooltip?: string;
/**
* Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set,
* the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it.
* Available options are:
* Defines the width of the button.
*
* *`NeverOverflow`
* *`AlwaysOverflow`
* *`Default`
* **Note:** all CSS sizes are supported - 'percentage', 'px', 'rem', 'auto', etc.
*/
overflowPriority?: ToolbarItemOverflowBehavior | keyof typeof ToolbarItemOverflowBehavior;
width?: CSSProperties['width'] | CSSProperties['height'];
/**
* Defines if the toolbar overflow popup should close upon interaction with the item.
* It will close by default.
* Property used to define the access of the item to the overflow Popover. If "NeverOverflow" option is set, the item never goes in the Popover, if "AlwaysOverflow" - it never comes out of it. Available options are:
*
* * `NeverOverflow`
* * `AlwaysOverflow`
* * `Default`
*/
preventOverflowClosing?: boolean;
overflowPriority?: ToolbarItemOverflowBehavior | keyof typeof ToolbarItemOverflowBehavior;
/**
* Defines the width of the button.
*
* **Note:** all CSS sizes are supported - 'percentage', 'px', 'rem', 'auto', etc.
* Defines if the toolbar overflow popup should close upon intereaction with the item. It will close by default.
*/
width?: CSSProperties['width'] | CSSProperties['height'];
preventOverflowClosing?: boolean;
}

export interface ToolbarButtonDomRef extends ToolbarButtonAttributes, Ui5DomRef {
Expand Down Expand Up @@ -112,7 +109,7 @@ export interface ToolbarButtonPropTypes extends ToolbarButtonAttributes, Omit<Co
*/
const ToolbarButton = withWebComponent<ToolbarButtonPropTypes, ToolbarButtonDomRef>(
'ui5-toolbar-button',
['accessibleName', 'accessibleNameRef', 'design', 'icon', 'overflowPriority', 'text', 'tooltip', 'width'],
['accessibleName', 'accessibleNameRef', 'design', 'icon', 'text', 'tooltip', 'width', 'overflowPriority'],
['disabled', 'iconEnd', 'preventOverflowClosing'],
[],
['click'],
Expand Down
Loading