@porsche-design-system/components-react 3.0.0-alpha.2 → 3.0.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +302 -0
- package/esm/lib/components/accordion.wrapper.js +2 -1
- package/esm/lib/components/banner.wrapper.js +3 -3
- package/esm/lib/components/carousel.wrapper.js +4 -3
- package/esm/lib/components/divider.wrapper.js +3 -3
- package/esm/lib/components/link-social.wrapper.js +1 -1
- package/esm/lib/components/link-tile.wrapper.js +1 -1
- package/esm/lib/components/modal.wrapper.js +4 -3
- package/esm/lib/components/pagination.wrapper.js +4 -3
- package/esm/lib/components/scroller.wrapper.js +3 -3
- package/esm/lib/components/segmented-control.wrapper.js +2 -1
- package/esm/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/esm/lib/components/switch.wrapper.js +2 -1
- package/esm/lib/components/table.wrapper.js +2 -1
- package/esm/lib/components/tabs-bar.wrapper.js +4 -3
- package/esm/lib/components/tabs.wrapper.js +4 -3
- package/esm/lib/components/text-field-wrapper.wrapper.js +3 -3
- package/esm/lib/components/text-list.wrapper.js +3 -3
- package/esm/lib/components/textarea-wrapper.wrapper.js +3 -3
- package/lib/components/accordion.wrapper.d.ts +12 -4
- package/lib/components/accordion.wrapper.js +2 -1
- package/lib/components/banner.wrapper.d.ts +18 -2
- package/lib/components/banner.wrapper.js +3 -3
- package/lib/components/button-group.wrapper.d.ts +2 -2
- package/lib/components/button-pure.wrapper.d.ts +15 -15
- package/lib/components/button.wrapper.d.ts +5 -5
- package/lib/components/carousel.wrapper.d.ts +22 -6
- package/lib/components/carousel.wrapper.js +4 -3
- package/lib/components/checkbox-wrapper.wrapper.d.ts +5 -5
- package/lib/components/content-wrapper.wrapper.d.ts +2 -2
- package/lib/components/display.wrapper.d.ts +2 -2
- package/lib/components/divider.wrapper.d.ts +13 -5
- package/lib/components/divider.wrapper.js +3 -3
- package/lib/components/fieldset-wrapper.wrapper.d.ts +5 -5
- package/lib/components/flex-item.wrapper.d.ts +2 -2
- package/lib/components/flex.wrapper.d.ts +2 -2
- package/lib/components/grid-item.wrapper.d.ts +2 -2
- package/lib/components/grid.wrapper.d.ts +2 -2
- package/lib/components/heading.wrapper.d.ts +2 -2
- package/lib/components/headline.wrapper.d.ts +2 -2
- package/lib/components/icon.wrapper.d.ts +2 -2
- package/lib/components/inline-notification.wrapper.d.ts +5 -5
- package/lib/components/link-pure.wrapper.d.ts +15 -15
- package/lib/components/link-social.wrapper.d.ts +8 -8
- package/lib/components/link-social.wrapper.js +1 -1
- package/lib/components/link-tile.wrapper.d.ts +7 -7
- package/lib/components/link-tile.wrapper.js +1 -1
- package/lib/components/link.wrapper.d.ts +5 -5
- package/lib/components/marque.wrapper.d.ts +5 -5
- package/lib/components/modal.wrapper.d.ts +22 -6
- package/lib/components/modal.wrapper.js +4 -3
- package/lib/components/model-signature.wrapper.d.ts +2 -2
- package/lib/components/pagination.wrapper.d.ts +31 -15
- package/lib/components/pagination.wrapper.js +4 -3
- package/lib/components/popover.wrapper.d.ts +5 -5
- package/lib/components/radio-button-wrapper.wrapper.d.ts +5 -5
- package/lib/components/scroller.wrapper.d.ts +27 -11
- package/lib/components/scroller.wrapper.js +3 -3
- package/lib/components/segmented-control-item.wrapper.d.ts +5 -5
- package/lib/components/segmented-control.wrapper.d.ts +12 -4
- package/lib/components/segmented-control.wrapper.js +2 -1
- package/lib/components/select-wrapper.wrapper.d.ts +7 -7
- package/lib/components/spinner.wrapper.d.ts +2 -2
- package/lib/components/stepper-horizontal-item.wrapper.d.ts +5 -5
- package/lib/components/stepper-horizontal.wrapper.d.ts +13 -5
- package/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/lib/components/switch.wrapper.d.ts +13 -5
- package/lib/components/switch.wrapper.js +2 -1
- package/lib/components/table-body.wrapper.d.ts +2 -2
- package/lib/components/table-cell.wrapper.d.ts +2 -2
- package/lib/components/table-head-cell.wrapper.d.ts +2 -2
- package/lib/components/table-head-row.wrapper.d.ts +2 -2
- package/lib/components/table-head.wrapper.d.ts +2 -2
- package/lib/components/table-row.wrapper.d.ts +2 -2
- package/lib/components/table.wrapper.d.ts +13 -5
- package/lib/components/table.wrapper.js +2 -1
- package/lib/components/tabs-bar.wrapper.d.ts +27 -11
- package/lib/components/tabs-bar.wrapper.js +4 -3
- package/lib/components/tabs-item.wrapper.d.ts +2 -2
- package/lib/components/tabs.wrapper.d.ts +27 -11
- package/lib/components/tabs.wrapper.js +4 -3
- package/lib/components/tag-dismissible.wrapper.d.ts +2 -2
- package/lib/components/tag.wrapper.d.ts +5 -5
- package/lib/components/text-field-wrapper.wrapper.d.ts +17 -9
- package/lib/components/text-field-wrapper.wrapper.js +3 -3
- package/lib/components/text-list-item.wrapper.d.ts +2 -2
- package/lib/components/text-list.wrapper.d.ts +19 -11
- package/lib/components/text-list.wrapper.js +3 -3
- package/lib/components/text.wrapper.d.ts +2 -2
- package/lib/components/textarea-wrapper.wrapper.d.ts +15 -7
- package/lib/components/textarea-wrapper.wrapper.js +3 -3
- package/lib/components/toast.wrapper.d.ts +2 -2
- package/lib/types.d.ts +95 -30
- package/package.json +2 -2
- package/ssr/components/dist/styles/esm/styles-entry.js +362 -2323
- package/ssr/components/dist/utils/esm/utils-entry.js +151 -2046
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +5 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +2 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +8 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.js +6 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +9 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +7 -12
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/marque.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +6 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +14 -4
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +6 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +5 -2
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +4 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +9 -1
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +13 -7
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list.js +3 -3
- package/ssr/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +14 -2
- package/ssr/esm/components/dist/styles/esm/styles-entry.js +362 -2323
- package/ssr/esm/components/dist/utils/esm/utils-entry.js +150 -2047
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/accordion.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/banner.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/carousel.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/divider.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-social.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/link-tile.wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/modal.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/pagination.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/scroller.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/segmented-control.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/stepper-horizontal.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/switch.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/table.wrapper.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs-bar.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/tabs.wrapper.js +5 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-field-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/text-list.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/components/textarea-wrapper.wrapper.js +4 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/banner.js +2 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button-pure.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/button.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/carousel.js +8 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/display.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/divider.js +6 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/heading.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/headline.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/icon.js +9 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-social.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/link-tile.js +8 -13
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/marque.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/modal.js +6 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/pagination.js +14 -4
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/scroller.js +6 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/select-wrapper.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/stepper-horizontal-item.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs-bar.js +5 -2
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tabs.js +1 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag-dismissible.js +4 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/tag.js +9 -1
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-field-wrapper.js +14 -8
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text-list.js +3 -3
- package/ssr/esm/components-react/projects/react-ssr-wrapper/src/lib/dsr-components/text.js +14 -2
- package/ssr/lib/components/accordion.wrapper.d.ts +12 -4
- package/ssr/lib/components/banner.wrapper.d.ts +18 -2
- package/ssr/lib/components/button-group.wrapper.d.ts +2 -2
- package/ssr/lib/components/button-pure.wrapper.d.ts +15 -15
- package/ssr/lib/components/button.wrapper.d.ts +5 -5
- package/ssr/lib/components/carousel.wrapper.d.ts +22 -6
- package/ssr/lib/components/checkbox-wrapper.wrapper.d.ts +5 -5
- package/ssr/lib/components/content-wrapper.wrapper.d.ts +2 -2
- package/ssr/lib/components/display.wrapper.d.ts +2 -2
- package/ssr/lib/components/divider.wrapper.d.ts +13 -5
- package/ssr/lib/components/fieldset-wrapper.wrapper.d.ts +5 -5
- package/ssr/lib/components/flex-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/flex.wrapper.d.ts +2 -2
- package/ssr/lib/components/grid-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/grid.wrapper.d.ts +2 -2
- package/ssr/lib/components/heading.wrapper.d.ts +2 -2
- package/ssr/lib/components/headline.wrapper.d.ts +2 -2
- package/ssr/lib/components/icon.wrapper.d.ts +2 -2
- package/ssr/lib/components/inline-notification.wrapper.d.ts +5 -5
- package/ssr/lib/components/link-pure.wrapper.d.ts +15 -15
- package/ssr/lib/components/link-social.wrapper.d.ts +8 -8
- package/ssr/lib/components/link-tile.wrapper.d.ts +7 -7
- package/ssr/lib/components/link.wrapper.d.ts +5 -5
- package/ssr/lib/components/marque.wrapper.d.ts +5 -5
- package/ssr/lib/components/modal.wrapper.d.ts +22 -6
- package/ssr/lib/components/model-signature.wrapper.d.ts +2 -2
- package/ssr/lib/components/pagination.wrapper.d.ts +31 -15
- package/ssr/lib/components/popover.wrapper.d.ts +5 -5
- package/ssr/lib/components/radio-button-wrapper.wrapper.d.ts +5 -5
- package/ssr/lib/components/scroller.wrapper.d.ts +27 -11
- package/ssr/lib/components/segmented-control-item.wrapper.d.ts +5 -5
- package/ssr/lib/components/segmented-control.wrapper.d.ts +12 -4
- package/ssr/lib/components/select-wrapper.wrapper.d.ts +7 -7
- package/ssr/lib/components/spinner.wrapper.d.ts +2 -2
- package/ssr/lib/components/stepper-horizontal-item.wrapper.d.ts +5 -5
- package/ssr/lib/components/stepper-horizontal.wrapper.d.ts +13 -5
- package/ssr/lib/components/switch.wrapper.d.ts +13 -5
- package/ssr/lib/components/table-body.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-cell.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head-cell.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head-row.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-head.wrapper.d.ts +2 -2
- package/ssr/lib/components/table-row.wrapper.d.ts +2 -2
- package/ssr/lib/components/table.wrapper.d.ts +13 -5
- package/ssr/lib/components/tabs-bar.wrapper.d.ts +27 -11
- package/ssr/lib/components/tabs-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/tabs.wrapper.d.ts +27 -11
- package/ssr/lib/components/tag-dismissible.wrapper.d.ts +2 -2
- package/ssr/lib/components/tag.wrapper.d.ts +5 -5
- package/ssr/lib/components/text-field-wrapper.wrapper.d.ts +17 -9
- package/ssr/lib/components/text-list-item.wrapper.d.ts +2 -2
- package/ssr/lib/components/text-list.wrapper.d.ts +19 -11
- package/ssr/lib/components/text.wrapper.d.ts +2 -2
- package/ssr/lib/components/textarea-wrapper.wrapper.d.ts +15 -7
- package/ssr/lib/components/toast.wrapper.d.ts +2 -2
- package/ssr/lib/dsr-components/carousel.d.ts +1 -1
- package/ssr/lib/dsr-components/link-social.d.ts +1 -1
- package/ssr/lib/dsr-components/modal.d.ts +2 -1
- package/ssr/lib/dsr-components/text-field-wrapper.d.ts +2 -0
- package/ssr/lib/types.d.ts +95 -30
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { SelectedAriaAttributes, IconAriaAttribute, IconColor, IconName, IconSize, Theme } from '../types';
|
|
3
|
-
export type PIconProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
3
|
+
export type PIconProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
@@ -31,7 +31,7 @@ export type PIconProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
31
31
|
*/
|
|
32
32
|
theme?: Theme;
|
|
33
33
|
};
|
|
34
|
-
export declare const PIcon: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
34
|
+
export declare const PIcon: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
35
35
|
/**
|
|
36
36
|
* Add ARIA attributes.
|
|
37
37
|
*/
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
export type PInlineNotificationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { InlineNotificationActionIcon, InlineNotificationState, Theme } from '../types';
|
|
3
|
+
export type PInlineNotificationProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Action icon of the inline-notification.
|
|
6
6
|
*/
|
|
7
|
-
actionIcon?:
|
|
7
|
+
actionIcon?: InlineNotificationActionIcon;
|
|
8
8
|
/**
|
|
9
9
|
* Action label of the inline-notification.
|
|
10
10
|
*/
|
|
@@ -42,11 +42,11 @@ export type PInlineNotificationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
42
42
|
*/
|
|
43
43
|
theme?: Theme;
|
|
44
44
|
};
|
|
45
|
-
export declare const PInlineNotification: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
45
|
+
export declare const PInlineNotification: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
46
46
|
/**
|
|
47
47
|
* Action icon of the inline-notification.
|
|
48
48
|
*/
|
|
49
|
-
actionIcon?:
|
|
49
|
+
actionIcon?: InlineNotificationActionIcon;
|
|
50
50
|
/**
|
|
51
51
|
* Action label of the inline-notification.
|
|
52
52
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { BreakpointCustomizable,
|
|
3
|
-
export type PLinkPureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { BreakpointCustomizable, LinkPureAlignLabel, SelectedAriaAttributes, LinkPureAriaAttribute, LinkPureIcon, LinkPureSize, LinkPureTarget, Theme, LinkPureWeight } from '../types';
|
|
3
|
+
export type PLinkPureProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Display link in active state.
|
|
6
6
|
*/
|
|
@@ -8,11 +8,11 @@ export type PLinkPureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
8
8
|
/**
|
|
9
9
|
* Aligns the label.
|
|
10
10
|
*/
|
|
11
|
-
alignLabel?: BreakpointCustomizable<
|
|
11
|
+
alignLabel?: BreakpointCustomizable<LinkPureAlignLabel>;
|
|
12
12
|
/**
|
|
13
13
|
* Add ARIA attributes.
|
|
14
14
|
*/
|
|
15
|
-
aria?: SelectedAriaAttributes<
|
|
15
|
+
aria?: SelectedAriaAttributes<LinkPureAriaAttribute>;
|
|
16
16
|
/**
|
|
17
17
|
* Special download attribute to open native browser download dialog if target url points to a downloadable file.
|
|
18
18
|
*/
|
|
@@ -28,7 +28,7 @@ export type PLinkPureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
28
28
|
/**
|
|
29
29
|
* The icon shown. By choosing 'none', no icon is displayed
|
|
30
30
|
*/
|
|
31
|
-
icon?:
|
|
31
|
+
icon?: LinkPureIcon;
|
|
32
32
|
/**
|
|
33
33
|
* A URL path to a custom icon.
|
|
34
34
|
*/
|
|
@@ -40,7 +40,7 @@ export type PLinkPureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
40
40
|
/**
|
|
41
41
|
* Size of the link.
|
|
42
42
|
*/
|
|
43
|
-
size?: BreakpointCustomizable<
|
|
43
|
+
size?: BreakpointCustomizable<LinkPureSize>;
|
|
44
44
|
/**
|
|
45
45
|
* Stretches the area between icon and label to max available space.
|
|
46
46
|
*/
|
|
@@ -48,7 +48,7 @@ export type PLinkPureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
48
48
|
/**
|
|
49
49
|
* Target attribute where the link should be opened.
|
|
50
50
|
*/
|
|
51
|
-
target?:
|
|
51
|
+
target?: LinkPureTarget;
|
|
52
52
|
/**
|
|
53
53
|
* Adapts the button color depending on the theme.
|
|
54
54
|
*/
|
|
@@ -61,9 +61,9 @@ export type PLinkPureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
61
61
|
* The weight of the text (only has effect with visible label).
|
|
62
62
|
* @deprecated since v3.0.0, will be removed with next major release
|
|
63
63
|
*/
|
|
64
|
-
weight?:
|
|
64
|
+
weight?: LinkPureWeight;
|
|
65
65
|
};
|
|
66
|
-
export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
66
|
+
export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
67
67
|
/**
|
|
68
68
|
* Display link in active state.
|
|
69
69
|
*/
|
|
@@ -71,11 +71,11 @@ export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
71
71
|
/**
|
|
72
72
|
* Aligns the label.
|
|
73
73
|
*/
|
|
74
|
-
alignLabel?: BreakpointCustomizable<
|
|
74
|
+
alignLabel?: BreakpointCustomizable<LinkPureAlignLabel>;
|
|
75
75
|
/**
|
|
76
76
|
* Add ARIA attributes.
|
|
77
77
|
*/
|
|
78
|
-
aria?: SelectedAriaAttributes<
|
|
78
|
+
aria?: SelectedAriaAttributes<LinkPureAriaAttribute>;
|
|
79
79
|
/**
|
|
80
80
|
* Special download attribute to open native browser download dialog if target url points to a downloadable file.
|
|
81
81
|
*/
|
|
@@ -91,7 +91,7 @@ export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
91
91
|
/**
|
|
92
92
|
* The icon shown. By choosing 'none', no icon is displayed
|
|
93
93
|
*/
|
|
94
|
-
icon?:
|
|
94
|
+
icon?: LinkPureIcon;
|
|
95
95
|
/**
|
|
96
96
|
* A URL path to a custom icon.
|
|
97
97
|
*/
|
|
@@ -103,7 +103,7 @@ export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
103
103
|
/**
|
|
104
104
|
* Size of the link.
|
|
105
105
|
*/
|
|
106
|
-
size?: BreakpointCustomizable<
|
|
106
|
+
size?: BreakpointCustomizable<LinkPureSize>;
|
|
107
107
|
/**
|
|
108
108
|
* Stretches the area between icon and label to max available space.
|
|
109
109
|
*/
|
|
@@ -111,7 +111,7 @@ export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
111
111
|
/**
|
|
112
112
|
* Target attribute where the link should be opened.
|
|
113
113
|
*/
|
|
114
|
-
target?:
|
|
114
|
+
target?: LinkPureTarget;
|
|
115
115
|
/**
|
|
116
116
|
* Adapts the button color depending on the theme.
|
|
117
117
|
*/
|
|
@@ -124,7 +124,7 @@ export declare const PLinkPure: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
124
124
|
* The weight of the text (only has effect with visible label).
|
|
125
125
|
* @deprecated since v3.0.0, will be removed with next major release
|
|
126
126
|
*/
|
|
127
|
-
weight?:
|
|
127
|
+
weight?: LinkPureWeight;
|
|
128
128
|
} & {
|
|
129
129
|
children?: import("react").ReactNode;
|
|
130
130
|
} & import("react").RefAttributes<HTMLElement>>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { BreakpointCustomizable,
|
|
3
|
-
export type PLinkSocialProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { BreakpointCustomizable, LinkSocialIcon, LinkSocialTarget, Theme } from '../types';
|
|
3
|
+
export type PLinkSocialProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Show or hide label.
|
|
6
6
|
*/
|
|
@@ -12,7 +12,7 @@ export type PLinkSocialProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
12
12
|
/**
|
|
13
13
|
* The icon shown.
|
|
14
14
|
*/
|
|
15
|
-
icon?:
|
|
15
|
+
icon?: LinkSocialIcon;
|
|
16
16
|
/**
|
|
17
17
|
* A URL path to a custom icon.
|
|
18
18
|
*/
|
|
@@ -24,14 +24,14 @@ export type PLinkSocialProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
24
24
|
/**
|
|
25
25
|
* Target attribute where the link should be opened.
|
|
26
26
|
*/
|
|
27
|
-
target?:
|
|
27
|
+
target?: LinkSocialTarget;
|
|
28
28
|
/**
|
|
29
29
|
* Adapts the link color when used on dark background.
|
|
30
30
|
*/
|
|
31
31
|
theme?: Theme;
|
|
32
32
|
};
|
|
33
|
-
/** @deprecated since v3.0.0, will be removed with next major release. Use `p-link` with corresponding social instead. */
|
|
34
|
-
export declare const PLinkSocial: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
33
|
+
/** @deprecated since v3.0.0, will be removed with next major release. Use `p-link` with corresponding social icon instead. */
|
|
34
|
+
export declare const PLinkSocial: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
35
35
|
/**
|
|
36
36
|
* Show or hide label.
|
|
37
37
|
*/
|
|
@@ -43,7 +43,7 @@ export declare const PLinkSocial: import("react").ForwardRefExoticComponent<Omit
|
|
|
43
43
|
/**
|
|
44
44
|
* The icon shown.
|
|
45
45
|
*/
|
|
46
|
-
icon?:
|
|
46
|
+
icon?: LinkSocialIcon;
|
|
47
47
|
/**
|
|
48
48
|
* A URL path to a custom icon.
|
|
49
49
|
*/
|
|
@@ -55,7 +55,7 @@ export declare const PLinkSocial: import("react").ForwardRefExoticComponent<Omit
|
|
|
55
55
|
/**
|
|
56
56
|
* Target attribute where the link should be opened.
|
|
57
57
|
*/
|
|
58
|
-
target?:
|
|
58
|
+
target?: LinkSocialTarget;
|
|
59
59
|
/**
|
|
60
60
|
* Adapts the link color when used on dark background.
|
|
61
61
|
*/
|
|
@@ -5,7 +5,7 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
/** @deprecated since v3.0.0, will be removed with next major release. Use `p-link` with corresponding social instead. */
|
|
8
|
+
/** @deprecated since v3.0.0, will be removed with next major release. Use `p-link` with corresponding social icon instead. */
|
|
9
9
|
const PLinkSocial = react.forwardRef(({ hideLabel = false, href, icon, iconSource, rel, target = '_self', theme = 'light', className, ...rest }, ref) => {
|
|
10
10
|
const elementRef = react.useRef();
|
|
11
11
|
const WebComponentTag = hooks.usePrefix('p-link-social');
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { LinkTileAlign, SelectedAriaAttributes,
|
|
3
|
-
export type PLinkTileProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { LinkTileAlign, SelectedAriaAttributes, LinkTileAriaAttribute, BreakpointCustomizable, LinkTileAspectRatio, LinkTileSize, LinkTileTarget, LinkTileWeight } from '../types';
|
|
3
|
+
export type PLinkTileProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Alignment of link and description.
|
|
6
6
|
*/
|
|
@@ -8,7 +8,7 @@ export type PLinkTileProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
8
8
|
/**
|
|
9
9
|
* Add ARIA attributes.
|
|
10
10
|
*/
|
|
11
|
-
aria?: SelectedAriaAttributes<
|
|
11
|
+
aria?: SelectedAriaAttributes<LinkTileAriaAttribute>;
|
|
12
12
|
/**
|
|
13
13
|
* Aspect ratio of the link-tile.
|
|
14
14
|
*/
|
|
@@ -48,13 +48,13 @@ export type PLinkTileProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
48
48
|
/**
|
|
49
49
|
* Target attribute where the link should be opened.
|
|
50
50
|
*/
|
|
51
|
-
target?:
|
|
51
|
+
target?: LinkTileTarget;
|
|
52
52
|
/**
|
|
53
53
|
* Font weight of the description.
|
|
54
54
|
*/
|
|
55
55
|
weight?: BreakpointCustomizable<LinkTileWeight>;
|
|
56
56
|
};
|
|
57
|
-
export declare const PLinkTile: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
57
|
+
export declare const PLinkTile: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
58
58
|
/**
|
|
59
59
|
* Alignment of link and description.
|
|
60
60
|
*/
|
|
@@ -62,7 +62,7 @@ export declare const PLinkTile: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
62
62
|
/**
|
|
63
63
|
* Add ARIA attributes.
|
|
64
64
|
*/
|
|
65
|
-
aria?: SelectedAriaAttributes<
|
|
65
|
+
aria?: SelectedAriaAttributes<LinkTileAriaAttribute>;
|
|
66
66
|
/**
|
|
67
67
|
* Aspect ratio of the link-tile.
|
|
68
68
|
*/
|
|
@@ -102,7 +102,7 @@ export declare const PLinkTile: import("react").ForwardRefExoticComponent<Omit<H
|
|
|
102
102
|
/**
|
|
103
103
|
* Target attribute where the link should be opened.
|
|
104
104
|
*/
|
|
105
|
-
target?:
|
|
105
|
+
target?: LinkTileTarget;
|
|
106
106
|
/**
|
|
107
107
|
* Font weight of the description.
|
|
108
108
|
*/
|
|
@@ -5,7 +5,7 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
const PLinkTile = react.forwardRef(({ align = 'bottom', aria, aspectRatio = '4:3', compact = false, description, download, gradient = true, href, label, rel, size = 'default', target = '_self', weight = '
|
|
8
|
+
const PLinkTile = react.forwardRef(({ align = 'bottom', aria, aspectRatio = '4:3', compact = false, description, download, gradient = true, href, label, rel, size = 'default', target = '_self', weight = 'semi-bold', className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = react.useRef();
|
|
10
10
|
const WebComponentTag = hooks.usePrefix('p-link-tile');
|
|
11
11
|
const propsToSync = [align, aria, aspectRatio, compact, description, download, gradient, href, label, rel, size, target, weight];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { SelectedAriaAttributes, LinkAriaAttribute, BreakpointCustomizable,
|
|
3
|
-
export type PLinkProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { SelectedAriaAttributes, LinkAriaAttribute, BreakpointCustomizable, LinkIcon, LinkTarget, Theme, LinkVariant } from '../types';
|
|
3
|
+
export type PLinkProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
@@ -20,7 +20,7 @@ export type PLinkProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
20
20
|
/**
|
|
21
21
|
* The icon shown. By choosing 'none', no icon is displayed.
|
|
22
22
|
*/
|
|
23
|
-
icon?:
|
|
23
|
+
icon?: LinkIcon;
|
|
24
24
|
/**
|
|
25
25
|
* A URL path to a custom icon.
|
|
26
26
|
*/
|
|
@@ -42,7 +42,7 @@ export type PLinkProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
42
42
|
*/
|
|
43
43
|
variant?: LinkVariant;
|
|
44
44
|
};
|
|
45
|
-
export declare const PLink: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
45
|
+
export declare const PLink: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
46
46
|
/**
|
|
47
47
|
* Add ARIA attributes.
|
|
48
48
|
*/
|
|
@@ -62,7 +62,7 @@ export declare const PLink: import("react").ForwardRefExoticComponent<Omit<HTMLA
|
|
|
62
62
|
/**
|
|
63
63
|
* The icon shown. By choosing 'none', no icon is displayed.
|
|
64
64
|
*/
|
|
65
|
-
icon?:
|
|
65
|
+
icon?: LinkIcon;
|
|
66
66
|
/**
|
|
67
67
|
* A URL path to a custom icon.
|
|
68
68
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { SelectedAriaAttributes, MarqueAriaAttribute, MarqueSize,
|
|
3
|
-
export type PMarqueProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { SelectedAriaAttributes, MarqueAriaAttribute, MarqueSize, MarqueTarget } from '../types';
|
|
3
|
+
export type PMarqueProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
@@ -16,13 +16,13 @@ export type PMarqueProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
16
16
|
/**
|
|
17
17
|
* Target attribute where the link should be opened.
|
|
18
18
|
*/
|
|
19
|
-
target?:
|
|
19
|
+
target?: MarqueTarget;
|
|
20
20
|
/**
|
|
21
21
|
* Show/hide trademark sign.
|
|
22
22
|
*/
|
|
23
23
|
trademark?: boolean;
|
|
24
24
|
};
|
|
25
|
-
export declare const PMarque: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
25
|
+
export declare const PMarque: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
26
26
|
/**
|
|
27
27
|
* Add ARIA attributes.
|
|
28
28
|
*/
|
|
@@ -38,7 +38,7 @@ export declare const PMarque: import("react").ForwardRefExoticComponent<Omit<HTM
|
|
|
38
38
|
/**
|
|
39
39
|
* Target attribute where the link should be opened.
|
|
40
40
|
*/
|
|
41
|
-
target?:
|
|
41
|
+
target?: MarqueTarget;
|
|
42
42
|
/**
|
|
43
43
|
* Show/hide trademark sign.
|
|
44
44
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { SelectedAriaAttributes, ModalAriaAttribute, BreakpointCustomizable } from '../types';
|
|
3
|
-
export type PModalProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
3
|
+
export type PModalProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
@@ -10,9 +10,13 @@ export type PModalProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
10
10
|
*/
|
|
11
11
|
disableBackdropClick?: boolean;
|
|
12
12
|
/**
|
|
13
|
-
* If true, the modal will not have a
|
|
13
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `dismissButton` instead. If true, the modal will not have a dismiss button.
|
|
14
14
|
*/
|
|
15
15
|
disableCloseButton?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* If false, the modal will not have a dismiss button.
|
|
18
|
+
*/
|
|
19
|
+
dismissButton?: boolean;
|
|
16
20
|
/**
|
|
17
21
|
* If true the modal uses max viewport height and width. Should only be used for mobile.
|
|
18
22
|
*/
|
|
@@ -22,15 +26,19 @@ export type PModalProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
22
26
|
*/
|
|
23
27
|
heading?: string;
|
|
24
28
|
/**
|
|
25
|
-
* Emitted when the component requests to be
|
|
29
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `dismiss` event instead. Emitted when the component requests to be dismissed.
|
|
26
30
|
*/
|
|
27
31
|
onClose?: (event: CustomEvent<void>) => void;
|
|
32
|
+
/**
|
|
33
|
+
* Emitted when the component requests to be dismissed.
|
|
34
|
+
*/
|
|
35
|
+
onDismiss?: (event: CustomEvent<void>) => void;
|
|
28
36
|
/**
|
|
29
37
|
* If true, the modal is open.
|
|
30
38
|
*/
|
|
31
39
|
open: boolean;
|
|
32
40
|
};
|
|
33
|
-
export declare const PModal: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
41
|
+
export declare const PModal: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
34
42
|
/**
|
|
35
43
|
* Add ARIA attributes.
|
|
36
44
|
*/
|
|
@@ -40,9 +48,13 @@ export declare const PModal: import("react").ForwardRefExoticComponent<Omit<HTML
|
|
|
40
48
|
*/
|
|
41
49
|
disableBackdropClick?: boolean;
|
|
42
50
|
/**
|
|
43
|
-
* If true, the modal will not have a
|
|
51
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `dismissButton` instead. If true, the modal will not have a dismiss button.
|
|
44
52
|
*/
|
|
45
53
|
disableCloseButton?: boolean;
|
|
54
|
+
/**
|
|
55
|
+
* If false, the modal will not have a dismiss button.
|
|
56
|
+
*/
|
|
57
|
+
dismissButton?: boolean;
|
|
46
58
|
/**
|
|
47
59
|
* If true the modal uses max viewport height and width. Should only be used for mobile.
|
|
48
60
|
*/
|
|
@@ -52,9 +64,13 @@ export declare const PModal: import("react").ForwardRefExoticComponent<Omit<HTML
|
|
|
52
64
|
*/
|
|
53
65
|
heading?: string;
|
|
54
66
|
/**
|
|
55
|
-
* Emitted when the component requests to be
|
|
67
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `dismiss` event instead. Emitted when the component requests to be dismissed.
|
|
56
68
|
*/
|
|
57
69
|
onClose?: (event: CustomEvent<void>) => void;
|
|
70
|
+
/**
|
|
71
|
+
* Emitted when the component requests to be dismissed.
|
|
72
|
+
*/
|
|
73
|
+
onDismiss?: (event: CustomEvent<void>) => void;
|
|
58
74
|
/**
|
|
59
75
|
* If true, the modal is open.
|
|
60
76
|
*/
|
|
@@ -5,14 +5,15 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
const PModal = react.forwardRef(({ aria, disableBackdropClick = false, disableCloseButton =
|
|
8
|
+
const PModal = react.forwardRef(({ aria, disableBackdropClick = false, disableCloseButton, dismissButton = true, fullscreen = false, heading, onClose, onDismiss, open = false, className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = react.useRef();
|
|
10
10
|
hooks.useEventCallback(elementRef, 'close', onClose);
|
|
11
|
+
hooks.useEventCallback(elementRef, 'dismiss', onDismiss);
|
|
11
12
|
const WebComponentTag = hooks.usePrefix('p-modal');
|
|
12
|
-
const propsToSync = [aria, disableBackdropClick, disableCloseButton, fullscreen, heading, open];
|
|
13
|
+
const propsToSync = [aria, disableBackdropClick, disableCloseButton, dismissButton, fullscreen, heading, open];
|
|
13
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
14
15
|
const { current } = elementRef;
|
|
15
|
-
['aria', 'disableBackdropClick', 'disableCloseButton', 'fullscreen', 'heading', 'open'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['aria', 'disableBackdropClick', 'disableCloseButton', 'dismissButton', 'fullscreen', 'heading', 'open'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
17
|
}, propsToSync);
|
|
17
18
|
const props = {
|
|
18
19
|
...rest,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import type { ModelSignatureColor, ModelSignatureModel, ModelSignatureSize, Theme } from '../types';
|
|
3
|
-
export type PModelSignatureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
3
|
+
export type PModelSignatureProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Adapts the color of the component.
|
|
6
6
|
*/
|
|
@@ -18,7 +18,7 @@ export type PModelSignatureProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
18
18
|
*/
|
|
19
19
|
theme?: Theme;
|
|
20
20
|
};
|
|
21
|
-
export declare const PModelSignature: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
21
|
+
export declare const PModelSignature: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
22
22
|
/**
|
|
23
23
|
* Adapts the color of the component.
|
|
24
24
|
*/
|
|
@@ -1,26 +1,30 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { BreakpointCustomizable,
|
|
3
|
-
export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { PaginationInternationalization, BreakpointCustomizable, PaginationMaxNumberOfPageLinks, PaginationChangeEvent, Theme } from '../types';
|
|
3
|
+
export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Index of the currently active page.
|
|
6
6
|
*/
|
|
7
7
|
activePage: number;
|
|
8
8
|
/**
|
|
9
|
-
* Aria label what the pagination is used for.
|
|
9
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.root` instead. Aria label what the pagination is used for.
|
|
10
10
|
*/
|
|
11
11
|
allyLabel?: string;
|
|
12
12
|
/**
|
|
13
|
-
* Aria label for next page icon.
|
|
13
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.next` instead. Aria label for next page icon.
|
|
14
14
|
*/
|
|
15
15
|
allyLabelNext?: string;
|
|
16
16
|
/**
|
|
17
|
-
* Aria label for page navigation.
|
|
17
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.page` instead. Aria label for page navigation.
|
|
18
18
|
*/
|
|
19
19
|
allyLabelPage?: string;
|
|
20
20
|
/**
|
|
21
|
-
* Aria label for previous page icon.
|
|
21
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.prev` instead. Aria label for previous page icon.
|
|
22
22
|
*/
|
|
23
23
|
allyLabelPrev?: string;
|
|
24
|
+
/**
|
|
25
|
+
* Override the default wordings that are used for aria-labels on the next/prev and page buttons.
|
|
26
|
+
*/
|
|
27
|
+
intl?: PaginationInternationalization;
|
|
24
28
|
/**
|
|
25
29
|
* The total count of items which should be shown per page.
|
|
26
30
|
*/
|
|
@@ -28,11 +32,15 @@ export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
28
32
|
/**
|
|
29
33
|
* The maximum number of page links rendered
|
|
30
34
|
*/
|
|
31
|
-
maxNumberOfPageLinks?: BreakpointCustomizable<
|
|
35
|
+
maxNumberOfPageLinks?: BreakpointCustomizable<PaginationMaxNumberOfPageLinks>;
|
|
32
36
|
/**
|
|
33
37
|
* Emitted when the page changes.
|
|
34
38
|
*/
|
|
35
|
-
|
|
39
|
+
onChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when the page changes.
|
|
42
|
+
*/
|
|
43
|
+
onPageChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
|
|
36
44
|
/**
|
|
37
45
|
* Adapts the color when used on dark background.
|
|
38
46
|
*/
|
|
@@ -42,27 +50,31 @@ export type PPaginationProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
42
50
|
*/
|
|
43
51
|
totalItemsCount: number;
|
|
44
52
|
};
|
|
45
|
-
export declare const PPagination: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
53
|
+
export declare const PPagination: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
46
54
|
/**
|
|
47
55
|
* Index of the currently active page.
|
|
48
56
|
*/
|
|
49
57
|
activePage: number;
|
|
50
58
|
/**
|
|
51
|
-
* Aria label what the pagination is used for.
|
|
59
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.root` instead. Aria label what the pagination is used for.
|
|
52
60
|
*/
|
|
53
61
|
allyLabel?: string;
|
|
54
62
|
/**
|
|
55
|
-
* Aria label for next page icon.
|
|
63
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.next` instead. Aria label for next page icon.
|
|
56
64
|
*/
|
|
57
65
|
allyLabelNext?: string;
|
|
58
66
|
/**
|
|
59
|
-
* Aria label for page navigation.
|
|
67
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.page` instead. Aria label for page navigation.
|
|
60
68
|
*/
|
|
61
69
|
allyLabelPage?: string;
|
|
62
70
|
/**
|
|
63
|
-
* Aria label for previous page icon.
|
|
71
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `intl.prev` instead. Aria label for previous page icon.
|
|
64
72
|
*/
|
|
65
73
|
allyLabelPrev?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Override the default wordings that are used for aria-labels on the next/prev and page buttons.
|
|
76
|
+
*/
|
|
77
|
+
intl?: PaginationInternationalization;
|
|
66
78
|
/**
|
|
67
79
|
* The total count of items which should be shown per page.
|
|
68
80
|
*/
|
|
@@ -70,11 +82,15 @@ export declare const PPagination: import("react").ForwardRefExoticComponent<Omit
|
|
|
70
82
|
/**
|
|
71
83
|
* The maximum number of page links rendered
|
|
72
84
|
*/
|
|
73
|
-
maxNumberOfPageLinks?: BreakpointCustomizable<
|
|
85
|
+
maxNumberOfPageLinks?: BreakpointCustomizable<PaginationMaxNumberOfPageLinks>;
|
|
74
86
|
/**
|
|
75
87
|
* Emitted when the page changes.
|
|
76
88
|
*/
|
|
77
|
-
|
|
89
|
+
onChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
|
|
90
|
+
/**
|
|
91
|
+
* @deprecated since v3.0.0, will be removed with next major release, use `change` event instead. Emitted when the page changes.
|
|
92
|
+
*/
|
|
93
|
+
onPageChange?: (event: CustomEvent<PaginationChangeEvent>) => void;
|
|
78
94
|
/**
|
|
79
95
|
* Adapts the color when used on dark background.
|
|
80
96
|
*/
|
|
@@ -5,14 +5,15 @@ var react = require('react');
|
|
|
5
5
|
var hooks = require('../../hooks.js');
|
|
6
6
|
var utils = require('../../utils.js');
|
|
7
7
|
|
|
8
|
-
const PPagination = react.forwardRef(({ activePage = 1, allyLabel = 'Pagination',
|
|
8
|
+
const PPagination = react.forwardRef(({ activePage = 1, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl = { root: 'Pagination', prev: 'Previous page', next: 'Next page', page: 'Page', }, itemsPerPage = 1, maxNumberOfPageLinks = { base: 5, xs: 7, }, onChange, onPageChange, theme = 'light', totalItemsCount = 1, className, ...rest }, ref) => {
|
|
9
9
|
const elementRef = react.useRef();
|
|
10
|
+
hooks.useEventCallback(elementRef, 'change', onChange);
|
|
10
11
|
hooks.useEventCallback(elementRef, 'pageChange', onPageChange);
|
|
11
12
|
const WebComponentTag = hooks.usePrefix('p-pagination');
|
|
12
|
-
const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, itemsPerPage, maxNumberOfPageLinks, theme, totalItemsCount];
|
|
13
|
+
const propsToSync = [activePage, allyLabel, allyLabelNext, allyLabelPage, allyLabelPrev, intl, itemsPerPage, maxNumberOfPageLinks, theme, totalItemsCount];
|
|
13
14
|
hooks.useBrowserLayoutEffect(() => {
|
|
14
15
|
const { current } = elementRef;
|
|
15
|
-
['activePage', 'allyLabel', 'allyLabelNext', 'allyLabelPage', 'allyLabelPrev', 'itemsPerPage', 'maxNumberOfPageLinks', 'theme', 'totalItemsCount'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
|
+
['activePage', 'allyLabel', 'allyLabelNext', 'allyLabelPage', 'allyLabelPrev', 'intl', 'itemsPerPage', 'maxNumberOfPageLinks', 'theme', 'totalItemsCount'].forEach((propName, i) => (current[propName] = propsToSync[i]));
|
|
16
17
|
}, propsToSync);
|
|
17
18
|
const props = {
|
|
18
19
|
...rest,
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
|
-
import type { SelectedAriaAttributes, PopoverDirection, Theme } from '../types';
|
|
3
|
-
export type PPopoverProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
2
|
+
import type { SelectedAriaAttributes, PopoverAriaAttribute, PopoverDirection, Theme } from '../types';
|
|
3
|
+
export type PPopoverProps = Omit<HTMLAttributes<{}>, 'color' | 'onChange'> & {
|
|
4
4
|
/**
|
|
5
5
|
* Add ARIA attributes.
|
|
6
6
|
*/
|
|
7
|
-
aria?: SelectedAriaAttributes<
|
|
7
|
+
aria?: SelectedAriaAttributes<PopoverAriaAttribute>;
|
|
8
8
|
/**
|
|
9
9
|
* Descriptive text to show additional information when popover is open
|
|
10
10
|
*/
|
|
@@ -18,11 +18,11 @@ export type PPopoverProps = Omit<HTMLAttributes<{}>, 'color'> & {
|
|
|
18
18
|
*/
|
|
19
19
|
theme?: Theme;
|
|
20
20
|
};
|
|
21
|
-
export declare const PPopover: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color"> & {
|
|
21
|
+
export declare const PPopover: import("react").ForwardRefExoticComponent<Omit<HTMLAttributes<{}>, "color" | "onChange"> & {
|
|
22
22
|
/**
|
|
23
23
|
* Add ARIA attributes.
|
|
24
24
|
*/
|
|
25
|
-
aria?: SelectedAriaAttributes<
|
|
25
|
+
aria?: SelectedAriaAttributes<PopoverAriaAttribute>;
|
|
26
26
|
/**
|
|
27
27
|
* Descriptive text to show additional information when popover is open
|
|
28
28
|
*/
|