@prioticket/design-system-react 1.9.0-beta.3 → 1.9.0-beta.5
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/README.md +17 -0
- package/dist/components/pd-list-item.d.ts +14 -3
- package/dist/components/pd-list-item.js +2 -0
- package/dist/components/pd-partner-mark.d.ts +4 -0
- package/dist/components/pd-partner-mark.js +9 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -90,6 +90,23 @@ Event payloads are typed where the component declares them (pd-table, pd-select,
|
|
|
90
90
|
|
|
91
91
|
The element types are exported alongside each wrapper (`PdTextFieldElement`, `PdTableElement`, …) for refs: `const ref = useRef<PdTableElement<Booking>>(null)`.
|
|
92
92
|
|
|
93
|
+
## Tooltips
|
|
94
|
+
|
|
95
|
+
`PdTooltip` accepts `for` (the id of its trigger) or `anchorElement`. The trigger must be focusable, or the tooltip opens for the mouse only; an icon-only `PdIconButton` with an `aria-label` is the usual trigger, and a `PdIcon` with `clickable` is focusable too.
|
|
96
|
+
|
|
97
|
+
```tsx
|
|
98
|
+
// An icon-only button as the trigger
|
|
99
|
+
<PdIconButton id="help" icon="help" aria-label="What does this do?" />
|
|
100
|
+
<PdTooltip for="help" type="multi-line">
|
|
101
|
+
Exports the current filter as CSV. Large exports are emailed when ready.
|
|
102
|
+
</PdTooltip>
|
|
103
|
+
|
|
104
|
+
// A bare icon next to a label. `clickable` makes it focusable so the tooltip also opens from
|
|
105
|
+
// the keyboard; `label` names the glyph. Without `clickable` it is hover-only.
|
|
106
|
+
<span>Commission rate <PdIcon id="rate-info" name="info" size="20px" clickable label="About commission rate" /></span>
|
|
107
|
+
<PdTooltip for="rate-info">Charged per booking, before tax.</PdTooltip>
|
|
108
|
+
```
|
|
109
|
+
|
|
93
110
|
## Component Reference
|
|
94
111
|
|
|
95
112
|
The React entry point (`@prioticket/design-system-react`) exports all Prioticket components. Refer to `COMPONENT-DOCUMENTATION.md` in the root of the design system repository for behavior, slots, and properties—they apply equally to the React wrappers.
|
|
@@ -1,9 +1,20 @@
|
|
|
1
1
|
import { type EventName } from '@lit/react';
|
|
2
2
|
import { PdListItem as PdListItemElementClass } from '@prioticket/design-system-web/components/pd-list';
|
|
3
|
-
import type { PdListItem as PdListItemElementType } from '@prioticket/design-system-web/components/pd-list';
|
|
3
|
+
import type { PdListItem as PdListItemElementType, PdListItemControl } from '@prioticket/design-system-web/components/pd-list';
|
|
4
4
|
export declare const PdListItem: import("@lit/react").ReactWebComponent<PdListItemElementClass, {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
onPdListItemLeadingAction: EventName<CustomEvent<{
|
|
6
|
+
icon: string;
|
|
7
|
+
}>>;
|
|
8
|
+
onPdListItemToggle: EventName<CustomEvent<{
|
|
9
|
+
expanded: boolean;
|
|
10
|
+
}>>;
|
|
11
|
+
onPdListItemControlChange: EventName<CustomEvent<{
|
|
12
|
+
control: PdListItemControl;
|
|
13
|
+
checked: boolean;
|
|
14
|
+
}>>;
|
|
15
|
+
onPdListItemTrailingAction: EventName<CustomEvent<{
|
|
16
|
+
icon: string;
|
|
17
|
+
}>>;
|
|
7
18
|
onListItemClick: EventName<CustomEvent>;
|
|
8
19
|
}>;
|
|
9
20
|
export type { PdListItemElementType as PdListItemElement };
|
|
@@ -7,6 +7,8 @@ export const PdListItem = createComponent({
|
|
|
7
7
|
tagName: 'pd-list-item',
|
|
8
8
|
elementClass: PdListItemElementClass,
|
|
9
9
|
events: {
|
|
10
|
+
onPdListItemLeadingAction: 'pd-list-item-leading-action',
|
|
11
|
+
onPdListItemToggle: 'pd-list-item-toggle',
|
|
10
12
|
onPdListItemControlChange: 'pd-list-item-control-change',
|
|
11
13
|
onPdListItemTrailingAction: 'pd-list-item-trailing-action',
|
|
12
14
|
onListItemClick: 'list-item-click'
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { PdPartnerMark as PdPartnerMarkElementClass } from '@prioticket/design-system-web/components/pd-partner-mark';
|
|
2
|
+
import type { PdPartnerMark as PdPartnerMarkElementType } from '@prioticket/design-system-web/components/pd-partner-mark';
|
|
3
|
+
export declare const PdPartnerMark: import("@lit/react").ReactWebComponent<PdPartnerMarkElementClass, {}>;
|
|
4
|
+
export type { PdPartnerMarkElementType as PdPartnerMarkElement };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { createComponent } from '@lit/react';
|
|
3
|
+
import { PdPartnerMark as PdPartnerMarkElementClass } from '@prioticket/design-system-web/components/pd-partner-mark';
|
|
4
|
+
export const PdPartnerMark = createComponent({
|
|
5
|
+
displayName: 'PdPartnerMark',
|
|
6
|
+
react: React,
|
|
7
|
+
tagName: 'pd-partner-mark',
|
|
8
|
+
elementClass: PdPartnerMarkElementClass
|
|
9
|
+
});
|
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,8 @@ export { PdNavigationRail } from './components/pd-navigation-rail.js';
|
|
|
98
98
|
export type { PdNavigationRailElement } from './components/pd-navigation-rail.js';
|
|
99
99
|
export { PdPagination } from './components/pd-pagination.js';
|
|
100
100
|
export type { PdPaginationElement } from './components/pd-pagination.js';
|
|
101
|
+
export { PdPartnerMark } from './components/pd-partner-mark.js';
|
|
102
|
+
export type { PdPartnerMarkElement } from './components/pd-partner-mark.js';
|
|
101
103
|
export { PdProgress } from './components/pd-progress.js';
|
|
102
104
|
export type { PdProgressElement } from './components/pd-progress.js';
|
|
103
105
|
export { PdRadio } from './components/pd-radio.js';
|
package/dist/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export { PdNavigationBar } from './components/pd-navigation-bar.js';
|
|
|
49
49
|
export { PdNavigationBarItem } from './components/pd-navigation-bar-item.js';
|
|
50
50
|
export { PdNavigationRail } from './components/pd-navigation-rail.js';
|
|
51
51
|
export { PdPagination } from './components/pd-pagination.js';
|
|
52
|
+
export { PdPartnerMark } from './components/pd-partner-mark.js';
|
|
52
53
|
export { PdProgress } from './components/pd-progress.js';
|
|
53
54
|
export { PdRadio } from './components/pd-radio.js';
|
|
54
55
|
export { PdRadioGroup } from './components/pd-radio-group.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prioticket/design-system-react",
|
|
3
|
-
"version": "1.9.0-beta.
|
|
3
|
+
"version": "1.9.0-beta.5",
|
|
4
4
|
"description": "React wrappers for the Prioticket Design System web components",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"clean": "rimraf dist"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
|
-
"@prioticket/design-system-web": "^1.9.0-beta.
|
|
34
|
+
"@prioticket/design-system-web": "^1.9.0-beta.5",
|
|
35
35
|
"react": ">=17",
|
|
36
36
|
"react-dom": ">=17"
|
|
37
37
|
},
|