@pk-design/react-tailwind 1.8.0 → 1.9.0
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/dist/cjs/components/Banner/Banner.js +1 -1
- package/dist/cjs/components/Banner/Banner.js.map +1 -1
- package/dist/cjs/components/Button/Button.js +88 -60
- package/dist/cjs/components/Button/Button.js.map +1 -1
- package/dist/cjs/components/DataTable/DataTable.js +1 -1
- package/dist/cjs/components/DataTable/DataTable.js.map +1 -1
- package/dist/cjs/components/RadioGroup/RadioGroup.js +5 -3
- package/dist/cjs/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/cjs/components/SelectBox/SelectBox.js +25 -4
- package/dist/cjs/components/SelectBox/SelectBox.js.map +1 -1
- package/dist/cjs/components/Toast/Toast.js +1 -1
- package/dist/cjs/components/Toast/Toast.js.map +1 -1
- package/dist/es/components/Banner/Banner.js +1 -1
- package/dist/es/components/Banner/Banner.js.map +1 -1
- package/dist/es/components/Button/Button.js +89 -61
- package/dist/es/components/Button/Button.js.map +1 -1
- package/dist/es/components/DataTable/DataTable.js +1 -1
- package/dist/es/components/DataTable/DataTable.js.map +1 -1
- package/dist/es/components/RadioGroup/RadioGroup.js +5 -3
- package/dist/es/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/es/components/SelectBox/SelectBox.js +26 -5
- package/dist/es/components/SelectBox/SelectBox.js.map +1 -1
- package/dist/es/components/Toast/Toast.js +1 -1
- package/dist/es/components/Toast/Toast.js.map +1 -1
- package/dist/react-tailwind.cjs.js +121 -70
- package/dist/react-tailwind.cjs.js.map +1 -1
- package/dist/react-tailwind.es.js +122 -71
- package/dist/react-tailwind.es.js.map +1 -1
- package/dist/types/components/Button/Button.types.d.ts +12 -6
- package/dist/types/components/DataTable/DataTable.types.d.ts +2 -2
- package/dist/types/components/SelectBox/SelectBox.types.d.ts +18 -1
- package/package.json +1 -1
|
@@ -85,23 +85,27 @@ export interface ButtonBaseProps {
|
|
|
85
85
|
*/
|
|
86
86
|
loadingText?: string;
|
|
87
87
|
/**
|
|
88
|
-
* Applies
|
|
88
|
+
* Applies a fully rounded border radius, producing a pill-shaped button
|
|
89
|
+
* (or a circle when combined with `iconOnly`).
|
|
89
90
|
* @default false
|
|
90
91
|
*/
|
|
91
92
|
rounded?: boolean;
|
|
92
93
|
/**
|
|
93
|
-
* Indicates that the button only contains an icon.
|
|
94
|
+
* Indicates that the button only contains an icon. Requires `aria-label`
|
|
95
|
+
* or `aria-labelledby` so the button has an accessible name.
|
|
94
96
|
* @default false
|
|
95
97
|
*/
|
|
96
98
|
iconOnly?: boolean;
|
|
97
99
|
/**
|
|
98
|
-
*
|
|
100
|
+
* Removes the focus ring shown on keyboard focus. Only use this when the
|
|
101
|
+
* button gets another visible focus indicator, e.g. via `className`.
|
|
99
102
|
* @default false
|
|
100
103
|
*/
|
|
101
104
|
noOutlineOnFocus?: boolean;
|
|
102
105
|
/**
|
|
103
|
-
*
|
|
104
|
-
*
|
|
106
|
+
* Turns the button into a toggle: when set to `true` or `false`,
|
|
107
|
+
* `aria-pressed` reflects it and `true` shows a ring. Leave unset for a
|
|
108
|
+
* regular (non-toggle) button.
|
|
105
109
|
*/
|
|
106
110
|
active?: boolean;
|
|
107
111
|
/**
|
|
@@ -113,7 +117,9 @@ export interface ButtonBaseProps {
|
|
|
113
117
|
*/
|
|
114
118
|
type?: 'button' | 'submit' | 'reset';
|
|
115
119
|
/**
|
|
116
|
-
*
|
|
120
|
+
* Disables the button. Rendered as the native `disabled` attribute on
|
|
121
|
+
* `<button>`, or as `aria-disabled` (with `tabIndex={-1}` and clicks
|
|
122
|
+
* blocked) for any other element passed via `as`.
|
|
117
123
|
*/
|
|
118
124
|
disabled?: boolean;
|
|
119
125
|
}
|
|
@@ -177,9 +177,9 @@ export interface DataTableProps<T = any> {
|
|
|
177
177
|
rowHoverActionMode?: 'overlay' | 'inline';
|
|
178
178
|
/** Extra CSS classes applied to the row hover action container element */
|
|
179
179
|
rowHoverActionClass?: string;
|
|
180
|
-
/** Extra CSS classes applied to the
|
|
180
|
+
/** Extra CSS classes applied directly to the internal Pagination component */
|
|
181
181
|
paginationClass?: string;
|
|
182
|
-
/** Extra CSS classes applied to the pagination container wrapper
|
|
182
|
+
/** Extra CSS classes applied to the outer pagination container wrapper div */
|
|
183
183
|
paginationContainerClass?: string;
|
|
184
184
|
/** Additional props passed directly to internal Pagination component */
|
|
185
185
|
paginationProps?: Record<string, any>;
|
|
@@ -22,11 +22,21 @@ export interface SelectBoxProps<T extends BaseOption | string = BaseOption> {
|
|
|
22
22
|
/** List of option groups to display in the dropdown (alternative to options) */
|
|
23
23
|
groups?: OptionGroup<T>[];
|
|
24
24
|
/**
|
|
25
|
-
* Currently selected option(s).
|
|
25
|
+
* Currently selected option(s). Passing this makes the SelectBox controlled:
|
|
26
|
+
* it shows exactly this value, so update it from `onChange`.
|
|
26
27
|
* - For single select: a single T or null
|
|
27
28
|
* - For multi-select: T[]
|
|
29
|
+
*
|
|
30
|
+
* Leave it undefined to let the SelectBox manage its own selection
|
|
31
|
+
* (optionally seeded with `defaultSelected`).
|
|
28
32
|
*/
|
|
29
33
|
selected?: T | T[] | null;
|
|
34
|
+
/**
|
|
35
|
+
* Initial selection when the SelectBox is uncontrolled (`selected` not passed).
|
|
36
|
+
* Only read on mount; later changes are ignored. `onChange` still fires on
|
|
37
|
+
* every change.
|
|
38
|
+
*/
|
|
39
|
+
defaultSelected?: T | T[] | null;
|
|
30
40
|
/** Size scale of the SelectBox component (`"sm"` | `"md"` | `"lg"`). Defaults to `"md"`. */
|
|
31
41
|
size?: SelectBoxSize;
|
|
32
42
|
/** Name of the field inside option objects to use as the label (defaults to "label") */
|
|
@@ -59,6 +69,13 @@ export interface SelectBoxProps<T extends BaseOption | string = BaseOption> {
|
|
|
59
69
|
placeholder?: string;
|
|
60
70
|
/** CSS classes applied to the dropdown options container */
|
|
61
71
|
dropdownContainerClass?: string;
|
|
72
|
+
/**
|
|
73
|
+
* Minimum width of the dropdown panel. By default the panel matches the
|
|
74
|
+
* input width; set this so it can grow wider than a narrow input. Numbers
|
|
75
|
+
* are treated as pixels, strings accept any CSS length (e.g. `"16rem"`).
|
|
76
|
+
* The panel stays left-aligned with the input.
|
|
77
|
+
*/
|
|
78
|
+
dropdownMinWidth?: number | string;
|
|
62
79
|
/**
|
|
63
80
|
* Whether the open dropdown traps focus and makes the rest of the page inert.
|
|
64
81
|
* @default false
|