Skip to content
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

feat: update @ui5/webcomponents to ~1.16.0 #4933

Merged
merged 9 commits into from
Aug 4, 2023
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 2 additions & 0 deletions .storybook/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,5 @@ export const MAPPED_THEMES = [
// { value: 'sap_belize_hcb', title: 'Belize High Contrast Black' },
// { value: 'sap_belize_hcw', title: 'Belize High Contrast White' }
];

export const excludePropsForAbstract = ['className', 'style'];
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.1.1",
"@storybook/react-vite": "7.1.1",
"@storybook/theming": "7.1.1",
"@ui5/webcomponents": "1.15.1",
"@ui5/webcomponents-fiori": "1.15.1",
"@ui5/webcomponents-icons": "1.15.1",
"@ui5/webcomponents": "1.16.0",
"@ui5/webcomponents-fiori": "1.16.0",
"@ui5/webcomponents-icons": "1.16.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.0.0",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@ui5/webcomponents-tools": "1.15.1",
"@ui5/webcomponents-tools": "1.16.0",
"@vitejs/plugin-react": "^4.0.0",
"chromatic": "^6.5.3",
"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.15.1",
"@ui5/webcomponents-base": "~1.16.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.7.2"
},
"peerDependencies": {
"@ui5/webcomponents-react": "~1.17.0",
"@ui5/webcomponents-react-base": "~1.17.0",
"@ui5/webcomponents-react": "~1.18.0",
"@ui5/webcomponents-react-base": "~1.18.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.15.1",
"@ui5/webcomponents-fiori": "~1.15.1",
"@ui5/webcomponents-icons": "~1.15.1",
"@ui5/webcomponents": "~1.16.0",
"@ui5/webcomponents-fiori": "~1.16.0",
"@ui5/webcomponents-icons": "~1.16.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.15.1",
"@ui5/webcomponents-fiori": "~1.15.1",
"@ui5/webcomponents-icons": "~1.15.1",
"@ui5/webcomponents": "~1.16.0",
"@ui5/webcomponents-fiori": "~1.16.0",
"@ui5/webcomponents-icons": "~1.16.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.15.1",
"@ui5/webcomponents-base": "~1.15.1",
"@ui5/webcomponents-fiori": "~1.15.1",
"@ui5/webcomponents-icons": "~1.15.1",
"@ui5/webcomponents": "~1.16.0",
"@ui5/webcomponents-base": "~1.16.0",
"@ui5/webcomponents-fiori": "~1.16.0",
"@ui5/webcomponents-icons": "~1.16.0",
"react": "^16.14.0 || ^17.0.0 || ^18.0.0",
"react-dom": "^16.14.0 || ^17.0.0 || ^18.0.0"
},
Expand Down
8 changes: 6 additions & 2 deletions packages/main/src/webComponents/Avatar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ interface AvatarAttributes {
* * `Placeholder`
*/
colorScheme?: AvatarColorScheme | keyof typeof AvatarColorScheme;
/**
* Defines whether the component is disabled. A disabled component can't be pressed or focused, and it is not in the tab chain.
*/
disabled?: boolean;
/**
* Defines the name of the UI5 Icon, that will be displayed.
* **Note:** If `image` slot is provided, the property will be ignored.
Expand All @@ -49,7 +53,7 @@ interface AvatarAttributes {
*/
initials?: string;
/**
* Defines if the avatar is interactive (focusable and pressable).
* Defines if the avatar is interactive (focusable and pressable). **Note:** This property won't have effect if the `disabled` property is set to `true`.
*/
interactive?: boolean;
/**
Expand Down Expand Up @@ -114,7 +118,7 @@ export interface AvatarPropTypes extends AvatarAttributes, CommonProps {
const Avatar = withWebComponent<AvatarPropTypes, AvatarDomRef>(
'ui5-avatar',
['accessibleName', 'colorScheme', 'icon', 'initials', 'shape', 'size'],
['interactive'],
['disabled', 'interactive'],
['badge'],
[],
() => import('@ui5/webcomponents/dist/Avatar.js')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { BreadcrumbsItem } from '../BreadcrumbsItem';
import BreadcrumbsItemDescription from '../BreadcrumbsItem/BreadcrumbsItemDescription.md?raw';
import * as ComponentStories from './Breadcrumbs.stories';
import Description from './BreadcrumbsDescription.md?raw';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand All @@ -27,6 +28,6 @@ import Description from './BreadcrumbsDescription.md?raw';
## BreadcrumbsItem

<Markdown>{BreadcrumbsItemDescription}</Markdown>
<ArgTypesWithNote hideHTMLPropsNote of={BreadcrumbsItem} />
<ArgTypesWithNote exclude={excludePropsForAbstract} hideHTMLPropsNote of={BreadcrumbsItem} />

<Footer />
3 changes: 2 additions & 1 deletion packages/main/src/webComponents/Calendar/Calendar.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ArgTypesWithNote, ControlsWithNote, DocsHeader, Footer } from '@sb/components';
import { excludePropsForAbstract } from '@sb/utils';
import SubcomponentsSection from '@sb/docs/SubcomponentsSection.md?raw';
import { Canvas, Markdown, Meta } from '@storybook/blocks';
import { CalendarDate } from '../CalendarDate';
Expand Down Expand Up @@ -26,7 +27,7 @@ import Description from './CalendarDescription.md?raw';

## CalendarDate

<ArgTypesWithNote of={CalendarDate} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={CalendarDate} />
<Markdown>{CalendarDateDescription}</Markdown>

<Footer />
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { ColorPaletteItem } from '../ColorPaletteItem';
import ColorPaletteItemDescription from '../ColorPaletteItem/ColorPaletteItemDescription.md?raw';
import * as ComponentStories from './ColorPalette.stories';
import ColorPaletteDescription from './ColorPaletteDescription.md?raw';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand All @@ -26,7 +27,7 @@ import ColorPaletteDescription from './ColorPaletteDescription.md?raw';

## ColorPaletteItem

<ArgsTableWithNote of={ColorPaletteItem} />
<ArgsTableWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={ColorPaletteItem} />
<Markdown>{ColorPaletteItemDescription}</Markdown>

<Footer />
5 changes: 3 additions & 2 deletions packages/main/src/webComponents/ComboBox/ComboBox.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { ComboBoxItem } from '../ComboBoxItem';
import ComboBoxItemDescription from '../ComboBoxItem/ComboBoxItemDescription.md?raw';
import * as ComponentStories from './ComboBox.stories';
import Description from './ComboBoxDescription.md?raw';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand Down Expand Up @@ -39,12 +40,12 @@ All available filter types controlled by the `filter` prop.

## ComboBoxItem

<ArgTypesWithNote hideHTMLPropsNote of={ComboBoxItem} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={ComboBoxItem} />
<Markdown>{ComboBoxItemDescription}</Markdown>

## ComboBoxGroupItem

<ArgTypesWithNote hideHTMLPropsNote of={ComboBoxGroupItem} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={ComboBoxGroupItem} />
<Markdown>{ComboBoxGroupItemDescription}</Markdown>

<Footer />
3 changes: 3 additions & 0 deletions packages/main/src/webComponents/Dialog/DialogDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,6 @@ The `Dialog` exposes the following CSS Shadow Parts:
- header - Used to style the header of the component
- content - Used to style the content of the component
- footer - Used to style the footer of the component

**Note:** When a `Bar` is used in the header or in the footer, you should remove the default dialog's paddings.
For more information see the sample "Bar in Header/Footer".
4 changes: 4 additions & 0 deletions packages/main/src/webComponents/Dialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ export interface DialogPropTypes extends DialogAttributes, Omit<CommonProps, 'dr
/**
* Defines the footer HTML Element.
*
* **Note:** When a `Bar` is used in the footer, you should remove the default dialog's paddings.
*
* __Note:__ This prop will be rendered as [slot](https://www.w3schools.com/tags/tag_slot.asp) (`slot="footer"`).
* Since you can't change the DOM order of slots when declaring them within a prop, it might prove beneficial to manually mount them as part of the component's children, especially when facing problems with the reading order of screen readers.
*
Expand All @@ -111,6 +113,8 @@ export interface DialogPropTypes extends DialogAttributes, Omit<CommonProps, 'dr
/**
* Defines the header HTML Element.
*
* **Note:** When a `Bar` is used in the header, you should remove the default dialog's paddings.
*
* **Note:** If `header` slot is provided, the labelling of the dialog is a responsibility of the application developer. `accessibleName` should be used.
*
* __Note:__ This prop will be rendered as [slot](https://www.w3schools.com/tags/tag_slot.asp) (`slot="header"`).
Expand Down
1 change: 1 addition & 0 deletions packages/main/src/webComponents/FileUploader/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export interface FileUploaderPropTypes extends FileUploaderAttributes, Omit<Comm
/**
* By default the component contains a single input field. With this slot you can pass any content that you wish to add. See the samples for more information.
* **Note:** If no content is provided in this slot, the component will only consist of an input field and will not be interactable using the keyboard.
* Also it is not recommended to use any non-interactable components, as it may lead to poor accessibility experience.
*/
children?: ReactNode | ReactNode[];
/**
Expand Down
5 changes: 3 additions & 2 deletions packages/main/src/webComponents/Input/Input.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import SuggestionItemDescription from '../SuggestionItem/SuggestionItemDescripti
import * as ComponentStories from './Input.stories';
import Description from './InputDescription.md?raw';
import InputDomRef from './InputDomRef.json';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand Down Expand Up @@ -46,12 +47,12 @@ and the `showSuggestions` prop is set to `true`.

## SuggestionItem

<ArgTypesWithNote hideHTMLPropsNote of={SuggestionItem} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={SuggestionItem} />
<Markdown>{SuggestionItemDescription}</Markdown>

## SuggestionGroupItem

<ArgTypesWithNote hideHTMLPropsNote of={SuggestionGroupItem} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={SuggestionGroupItem} />
<Markdown>{SuggestionGroupItemDescription}</Markdown>

<Footer />
3 changes: 2 additions & 1 deletion packages/main/src/webComponents/Menu/Menu.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { MenuItem } from '../MenuItem';
import SubcomponentsSection from '@sb/docs/SubcomponentsSection.md?raw';
import MenuItemDescription from '../MenuItem/MenuItemDescription.md?raw';
import MenuDomRef from './MenuDomRef.json';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand Down Expand Up @@ -116,4 +117,4 @@ const MenuComponent = () => {

<Markdown>{MenuItemDescription}</Markdown>

<ArgTypesWithNote of={MenuItem} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={MenuItem} />
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import MultiComboBoxItemDescription from '../MultiComboBoxItem/MultiComboBoxItem
import * as ComponentStories from './MultiComboBox.stories';
import Description from './MultiComboBoxDescription.md?raw';
import MultiComboBoxDomRef from './MultiComboBoxDomRef.json';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand Down Expand Up @@ -37,12 +38,12 @@ import MultiComboBoxDomRef from './MultiComboBoxDomRef.json';

## MultiComboBoxItem

<ArgsTableWithNote hideHTMLPropsNote of={MultiComboBoxItem} />
<ArgsTableWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={MultiComboBoxItem} />
<Markdown>{MultiComboBoxItemDescription}</Markdown>

## MultiComboBoxGroupItem

<ArgsTableWithNote hideHTMLPropsNote of={MultiComboBoxGroupItem} />
<ArgsTableWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={MultiComboBoxGroupItem} />
<Markdown>{MultiComboBoxGroupItemDescription}</Markdown>

<Footer />
5 changes: 3 additions & 2 deletions packages/main/src/webComponents/MultiInput/MultiInput.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { Token } from '../Token';
import TokenDescription from '../Token/TokenDescription.md?raw';
import * as ComponentStories from './MultiInput.stories';
import MultiInputDomRef from './MultiInputDomRef.json';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand All @@ -35,12 +36,12 @@ import MultiInputDomRef from './MultiInputDomRef.json';

## SuggestionItem

<ArgTypesWithNote hideHTMLPropsNote of={SuggestionItem} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={SuggestionItem} />
<Markdown>{SuggestionItemDescription}</Markdown>

## SuggestionGroupItem

<ArgTypesWithNote hideHTMLPropsNote of={SuggestionGroupItem} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={SuggestionGroupItem} />
<Markdown>{SuggestionGroupItemDescription}</Markdown>

<Footer />
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { NotificationAction } from '../NotificationAction';
import NotificationActionDescription from '../NotificationAction/NotificationActionDescription.md?raw';
import * as ComponentStories from './NotificationListGroupItem.stories';
import NotificationListGroupItemDescription from './NotificationListGroupItemDescription.md?raw';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand All @@ -24,7 +25,7 @@ import NotificationListGroupItemDescription from './NotificationListGroupItemDes

## NotificationAction

<ArgTypesWithNote hideHTMLPropsNote of={NotificationAction} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={NotificationAction} />
<Markdown>{NotificationActionDescription}</Markdown>

<Footer />
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { NotificationAction } from '../NotificationAction';
import NotificationActionDescription from '../NotificationAction/NotificationActionDescription.md?raw';
import * as ComponentStories from './NotificationListItem.stories';
import NotificationListItemDescription from './NotificationListItemDescription.md?raw';
import { excludePropsForAbstract } from '@sb/utils';

<Meta of={ComponentStories} />

Expand Down Expand Up @@ -33,7 +34,7 @@ import NotificationListItemDescription from './NotificationListItemDescription.m

## NotificationAction

<ArgTypesWithNote hideHTMLPropsNote of={NotificationAction} />
<ArgTypesWithNote hideHTMLPropsNote exclude={excludePropsForAbstract} of={NotificationAction} />
<Markdown>{NotificationActionDescription}</Markdown>

<Footer />
2 changes: 2 additions & 0 deletions packages/main/src/webComponents/Option/OptionDescription.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
**Abstract UI5 Web Component** - Find out more about abstract components [here](https://sap.github.io/ui5-webcomponents-react/?path=/docs/knowledge-base-faq--docs#what-are-abstract-ui5-web-components).

The `Option` component defines the content of an option in the `Select`
2 changes: 2 additions & 0 deletions packages/main/src/webComponents/Option/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export interface OptionPropTypes extends OptionAttributes, CommonProps {
/**
* The `Option` component defines the content of an option in the `Select`
*
* @abstract
*
* __Note:__ This component is a web component developed by the UI5 Web Components’ team.
*
* [UI5 Web Components Storybook](https://sap.github.io/ui5-webcomponents/playground/?path=/docs/main-Select)
Expand Down
7 changes: 7 additions & 0 deletions packages/main/src/webComponents/Page/PageDescription.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,10 @@ The content occupies the main part of the page. Only the content area is scrolla
### Footer

The footer is optional and occupies the fixed bottom part of the page. Alternatively, the footer can be floating above the bottom part of the content. This is enabled with the `floatingFooter` property. **Note:** `Page` occipues the whole available space of its parent. In order to achieve the intended design you have to make sure that there is enough space for the `Page` to be rendered. **Note:** In order for the `Page` to be displayed, the parent element should have fixed height.

## CSS Shadow Parts

<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 `Page` exposes the following CSS Shadow Parts:

- content - Used to style the content section of the component
6 changes: 5 additions & 1 deletion packages/main/src/webComponents/Panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ interface PanelAttributes {
* Indicates whether the transition between the expanded and the collapsed state of the component is animated. By default the animation is enabled.
*/
noAnimation?: boolean;
/**
* Indicates whether the Panel header is sticky or not. If stickyHeader is set to true, then whenever you scroll the content or the application, the header of the panel will be always visible and a solid color will be used for its design.
*/
stickyHeader?: boolean;
}

export interface PanelDomRef extends PanelAttributes, Ui5DomRef {}
Expand Down Expand Up @@ -77,7 +81,7 @@ export interface PanelPropTypes extends PanelAttributes, CommonProps {
const Panel = withWebComponent<PanelPropTypes, PanelDomRef>(
'ui5-panel',
['accessibleName', 'accessibleRole', 'headerLevel', 'headerText'],
['collapsed', 'fixed', 'noAnimation'],
['collapsed', 'fixed', 'noAnimation', 'stickyHeader'],
['header'],
['toggle'],
() => import('@ui5/webcomponents/dist/Panel.js')
Expand Down
Loading
Loading