@prioticket/design-system-react 1.9.0-beta.4 → 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/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.
|
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
|
},
|