@webority/ui-react 0.6.11 → 0.6.13
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/examples.mobile.json-BMXTGiGC-Dl_Tt3py.js +250 -0
- package/dist/libphonenumber-js-BcNT8oq0-DMpMlice.js +11439 -0
- package/dist/types/components/AppColorField.d.ts +4 -1
- package/dist/types/components/AppDatePicker.d.ts +5 -1
- package/dist/types/components/AppDateRangePicker.d.ts +53 -0
- package/dist/types/components/AppPhoneNumberInput.d.ts +1 -1
- package/dist/types/components/AppSegmented.d.ts +9 -4
- package/dist/types/index.d.ts +1 -0
- package/dist/ui-react.js +936 -351
- package/package.json +3 -3
|
@@ -19,9 +19,11 @@
|
|
|
19
19
|
* @param {string} [props.name]
|
|
20
20
|
* @param {string} [props.id]
|
|
21
21
|
* @param {boolean} [props.disabled=false]
|
|
22
|
+
* @param {"sm"|"md"|"lg"} [props.size="md"] Control size — sm/lg opt out of the shared height,
|
|
23
|
+
* resizing both the swatch and the hex box together.
|
|
22
24
|
* @param {string} [props.className]
|
|
23
25
|
*/
|
|
24
|
-
export default function AppColorField({ value, onChange, label, required, error, hint, name, id, disabled, className, ...rest }: {
|
|
26
|
+
export default function AppColorField({ value, onChange, label, required, error, hint, name, id, disabled, size, className, ...rest }: {
|
|
25
27
|
value: string;
|
|
26
28
|
onChange: (hex: string) => void;
|
|
27
29
|
label?: import('react').ReactNode;
|
|
@@ -31,5 +33,6 @@ export default function AppColorField({ value, onChange, label, required, error,
|
|
|
31
33
|
name?: string;
|
|
32
34
|
id?: string;
|
|
33
35
|
disabled?: boolean;
|
|
36
|
+
size?: "sm" | "md" | "lg";
|
|
34
37
|
className?: string;
|
|
35
38
|
}): import("react").JSX.Element;
|
|
@@ -21,11 +21,13 @@ import '@webority/ui-elements';
|
|
|
21
21
|
* @param {string} [props.max]
|
|
22
22
|
* @param {string} [props.placeholder="Enter Date"]
|
|
23
23
|
* @param {boolean} [props.disabled]
|
|
24
|
+
* @param {'sm'|'md'|'lg'} [props.size] Control height tier, matching AppInput.
|
|
25
|
+
* @param {0|1|2|3|4|5|6} [props.firstDay=0] First weekday of the calendar — 0 Sun (default), 1 Mon…
|
|
24
26
|
* @param {string} [props.id]
|
|
25
27
|
* @param {string} [props.ariaLabel]
|
|
26
28
|
* @param {string} [props.className]
|
|
27
29
|
*/
|
|
28
|
-
export default function AppDatePicker({ value, onChange, label, required, hint, error, name, min, max, placeholder, disabled, id, ariaLabel, className, ...rest }: {
|
|
30
|
+
export default function AppDatePicker({ value, onChange, label, required, hint, error, name, min, max, placeholder, disabled, size, firstDay, id, ariaLabel, className, ...rest }: {
|
|
29
31
|
value?: string;
|
|
30
32
|
onChange?: (value: string) => void;
|
|
31
33
|
label?: string;
|
|
@@ -37,6 +39,8 @@ export default function AppDatePicker({ value, onChange, label, required, hint,
|
|
|
37
39
|
max?: string;
|
|
38
40
|
placeholder?: string;
|
|
39
41
|
disabled?: boolean;
|
|
42
|
+
size?: 'sm' | 'md' | 'lg';
|
|
43
|
+
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
40
44
|
id?: string;
|
|
41
45
|
ariaLabel?: string;
|
|
42
46
|
className?: string;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import '@webority/ui-elements';
|
|
2
|
+
/**
|
|
3
|
+
* Thin React wrapper over the shared `<wui-date-range>` element — a start/end date range
|
|
4
|
+
* field with a two-month popover calendar (single implementation, so React and Razor render
|
|
5
|
+
* the same control). Wrapped in the standard `.field` shell — label / required mark / hint /
|
|
6
|
+
* error — the same as `<app-date-range-picker>` and every other field primitive.
|
|
7
|
+
*
|
|
8
|
+
* Controlled through two ISO strings; `onChange` fires with `{ start, end }` when the range
|
|
9
|
+
* completes or is cleared.
|
|
10
|
+
*
|
|
11
|
+
* @param {object} props
|
|
12
|
+
* @param {string} [props.start] Range start as an ISO date string (YYYY-MM-DD).
|
|
13
|
+
* @param {string} [props.end] Range end as an ISO date string (YYYY-MM-DD).
|
|
14
|
+
* @param {(range: { start: string, end: string }) => void} [props.onChange]
|
|
15
|
+
* @param {string} [props.label]
|
|
16
|
+
* @param {boolean} [props.required]
|
|
17
|
+
* @param {string} [props.hint]
|
|
18
|
+
* @param {string} [props.error]
|
|
19
|
+
* @param {string} [props.startName] Form field name the start date posts under.
|
|
20
|
+
* @param {string} [props.endName] Form field name the end date posts under.
|
|
21
|
+
* @param {string} [props.min]
|
|
22
|
+
* @param {string} [props.max]
|
|
23
|
+
* @param {string} [props.placeholder="Start – End"]
|
|
24
|
+
* @param {boolean} [props.disabled]
|
|
25
|
+
* @param {'sm'|'md'|'lg'} [props.size] Control height tier, matching AppInput.
|
|
26
|
+
* @param {0|1|2|3|4|5|6} [props.firstDay=0] First weekday of the calendar — 0 Sun (default), 1 Mon…
|
|
27
|
+
* @param {string} [props.id]
|
|
28
|
+
* @param {string} [props.ariaLabel]
|
|
29
|
+
* @param {string} [props.className]
|
|
30
|
+
*/
|
|
31
|
+
export default function AppDateRangePicker({ start, end, onChange, label, required, hint, error, startName, endName, min, max, placeholder, disabled, size, firstDay, id, ariaLabel, className, ...rest }: {
|
|
32
|
+
start?: string;
|
|
33
|
+
end?: string;
|
|
34
|
+
onChange?: (range: {
|
|
35
|
+
start: string;
|
|
36
|
+
end: string;
|
|
37
|
+
}) => void;
|
|
38
|
+
label?: string;
|
|
39
|
+
required?: boolean;
|
|
40
|
+
hint?: string;
|
|
41
|
+
error?: string;
|
|
42
|
+
startName?: string;
|
|
43
|
+
endName?: string;
|
|
44
|
+
min?: string;
|
|
45
|
+
max?: string;
|
|
46
|
+
placeholder?: string;
|
|
47
|
+
disabled?: boolean;
|
|
48
|
+
size?: 'sm' | 'md' | 'lg';
|
|
49
|
+
firstDay?: 0 | 1 | 2 | 3 | 4 | 5 | 6;
|
|
50
|
+
id?: string;
|
|
51
|
+
ariaLabel?: string;
|
|
52
|
+
className?: string;
|
|
53
|
+
}): import("react").JSX.Element;
|
|
@@ -12,24 +12,29 @@
|
|
|
12
12
|
* posts inside a plain form with no JavaScript.
|
|
13
13
|
*
|
|
14
14
|
* @param {object} props
|
|
15
|
-
* @param {{ value: string, label: string, icon?: string }[]} props.options
|
|
15
|
+
* @param {{ value: string, label: string, icon?: string, disabled?: boolean }[]} props.options
|
|
16
16
|
* @param {string} props.value The selected option's value.
|
|
17
17
|
* @param {(value: string) => void} props.onChange
|
|
18
18
|
* @param {string} props.label Accessible name for the group.
|
|
19
19
|
* @param {string} [props.name] Field name. Defaults to a generated one.
|
|
20
|
-
* @param {'sm'|'md'} [props.size='md']
|
|
20
|
+
* @param {'sm'|'md'|'lg'} [props.size='md']
|
|
21
|
+
* @param {boolean} [props.fullWidth=false] Segments share the row equally, filling the container.
|
|
22
|
+
* @param {boolean} [props.disabled=false] Disables the whole control.
|
|
21
23
|
* @param {string} [props.className]
|
|
22
24
|
*/
|
|
23
|
-
export default function AppSegmented({ options, value, onChange, label, name, size, className, ...rest }: {
|
|
25
|
+
export default function AppSegmented({ options, value, onChange, label, name, size, fullWidth, disabled, className, ...rest }: {
|
|
24
26
|
options: {
|
|
25
27
|
value: string;
|
|
26
28
|
label: string;
|
|
27
29
|
icon?: string;
|
|
30
|
+
disabled?: boolean;
|
|
28
31
|
}[];
|
|
29
32
|
value: string;
|
|
30
33
|
onChange: (value: string) => void;
|
|
31
34
|
label: string;
|
|
32
35
|
name?: string;
|
|
33
|
-
size?: 'sm' | 'md';
|
|
36
|
+
size?: 'sm' | 'md' | 'lg';
|
|
37
|
+
fullWidth?: boolean;
|
|
38
|
+
disabled?: boolean;
|
|
34
39
|
className?: string;
|
|
35
40
|
}): import("react").JSX.Element;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { default as AppCompareTable } from './components/AppCompareTable.jsx';
|
|
|
16
16
|
export { default as AppConfirmDialog } from './components/AppConfirmDialog.jsx';
|
|
17
17
|
export { default as AppDataTable } from './components/AppDataTable.jsx';
|
|
18
18
|
export { default as AppDatePicker } from './components/AppDatePicker.jsx';
|
|
19
|
+
export { default as AppDateRangePicker } from './components/AppDateRangePicker.jsx';
|
|
19
20
|
export { default as AppDropdown } from './components/AppDropdown.jsx';
|
|
20
21
|
export { default as AppEmptyState } from './components/AppEmptyState.jsx';
|
|
21
22
|
export { default as AppFileAttachment } from './components/AppFileAttachment.jsx';
|