@webority/ui-react 0.6.10 → 0.6.12

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.
@@ -17,6 +17,7 @@ import '@webority/ui-elements';
17
17
  * @param {number} [props.minChars] Min chars before a remote search fires (default 1 in remote mode).
18
18
  * @param {number} [props.debounce] Debounce ms for remote search (default 250).
19
19
  * @param {boolean} [props.disabled]
20
+ * @param {'sm'|'lg'} [props.size] Control size around the default.
20
21
  * @param {string} [props.name]
21
22
  * @param {import('react').ReactNode} [props.label]
22
23
  * @param {string} [props.error]
@@ -24,7 +25,7 @@ import '@webority/ui-elements';
24
25
  * @param {boolean} [props.required]
25
26
  * @param {string} [props.fieldClassName]
26
27
  */
27
- export default function AppAutocomplete({ value, onChange, options, loadOptions, placeholder, minChars, debounce, disabled, name, label, error, hint, required, fieldClassName, ...rest }: {
28
+ export default function AppAutocomplete({ value, onChange, options, loadOptions, placeholder, minChars, debounce, disabled, size, name, label, error, hint, required, fieldClassName, ...rest }: {
28
29
  value?: string;
29
30
  onChange?: (value: string) => void;
30
31
  options?: {
@@ -39,6 +40,7 @@ export default function AppAutocomplete({ value, onChange, options, loadOptions,
39
40
  minChars?: number;
40
41
  debounce?: number;
41
42
  disabled?: boolean;
43
+ size?: 'sm' | 'lg';
42
44
  name?: string;
43
45
  label?: import('react').ReactNode;
44
46
  error?: string;
@@ -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;
@@ -11,6 +11,10 @@ import '@webority/ui-elements';
11
11
  * @param {string} [props.searchPlaceholder] Placeholder for the in-menu search box.
12
12
  * @param {boolean} [props.searchable=true]
13
13
  * @param {boolean} [props.disabled]
14
+ * @param {string} [props.icon] Leading glyph inside the control (a Bootstrap Icons name).
15
+ * @param {'sm'|'lg'} [props.size] Control size around the default.
16
+ * @param {boolean} [props.collapseChips=false] Keep the chosen chips on one row and fold the
17
+ * overflow into a "+N" counter, rather than letting the control grow.
14
18
  * @param {string} [props.name]
15
19
  * @param {import('react').ReactNode} [props.label]
16
20
  * @param {string} [props.error]
@@ -18,7 +22,7 @@ import '@webority/ui-elements';
18
22
  * @param {boolean} [props.required]
19
23
  * @param {string} [props.fieldClassName]
20
24
  */
21
- export default function AppMultiSelect({ values, onChange, options, placeholder, searchPlaceholder, searchable, disabled, name, label, error, hint, required, fieldClassName, ...rest }: {
25
+ export default function AppMultiSelect({ values, onChange, options, placeholder, searchPlaceholder, searchable, disabled, icon, size, collapseChips, name, label, error, hint, required, fieldClassName, ...rest }: {
22
26
  values?: string[];
23
27
  onChange?: (values: string[]) => void;
24
28
  options?: {
@@ -29,6 +33,9 @@ export default function AppMultiSelect({ values, onChange, options, placeholder,
29
33
  searchPlaceholder?: string;
30
34
  searchable?: boolean;
31
35
  disabled?: boolean;
36
+ icon?: string;
37
+ size?: 'sm' | 'lg';
38
+ collapseChips?: boolean;
32
39
  name?: string;
33
40
  label?: import('react').ReactNode;
34
41
  error?: string;
@@ -4,17 +4,23 @@
4
4
  * @param {object} props
5
5
  * @param {string} props.value
6
6
  * @param {(value: string) => void} props.onValueChange
7
- * @param {string} [props.placeholder]
7
+ * @param {string} [props.placeholder='Search…']
8
8
  * @param {string} [props.ariaLabel]
9
9
  * @param {number} [props.iconSize=18]
10
+ * @param {'sm'|'lg'} [props.size] Control size around the default.
11
+ * @param {boolean} [props.loading=false] Swap the leading glyph for a spinner while a search is in flight.
12
+ * @param {boolean} [props.disabled=false]
10
13
  * @param {string} [props.className]
11
14
  */
12
- export default function AppSearch({ value, onValueChange, placeholder, ariaLabel, iconSize, className, // extra classes on the wrapper
15
+ export default function AppSearch({ value, onValueChange, placeholder, ariaLabel, iconSize, size, loading, disabled, className, // extra classes on the wrapper
13
16
  ...rest }: {
14
17
  value: string;
15
18
  onValueChange: (value: string) => void;
16
19
  placeholder?: string;
17
20
  ariaLabel?: string;
18
21
  iconSize?: number;
22
+ size?: 'sm' | 'lg';
23
+ loading?: boolean;
24
+ disabled?: boolean;
19
25
  className?: string;
20
26
  }): 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;
@@ -1,5 +1,5 @@
1
1
  import '@webority/ui-elements';
2
- export default function AppSelect({ value, onChange, options, placeholder, searchPlaceholder, searchable, clearable, size, floatingLabel, disabled, label, required, error, hint, help, helpLabel, id, name, className, fieldClassName, ...rest }: {
2
+ export default function AppSelect({ value, onChange, options, placeholder, searchPlaceholder, searchable, clearable, size, icon, floatingLabel, disabled, label, required, error, hint, help, helpLabel, id, name, className, fieldClassName, ...rest }: {
3
3
  [x: string]: any;
4
4
  className?: string;
5
5
  clearable?: boolean;
@@ -10,6 +10,7 @@ export default function AppSelect({ value, onChange, options, placeholder, searc
10
10
  help: any;
11
11
  helpLabel?: string;
12
12
  hint: any;
13
+ icon: any;
13
14
  id: any;
14
15
  label: any;
15
16
  name: any;
@@ -1,13 +1,16 @@
1
1
  import '@webority/ui-elements';
2
- export default function AppSelectMini({ value, onChange, options, placeholder, name, ariaLabel, id, disabled, className, ...rest }: {
2
+ export default function AppSelectMini({ value, onChange, options, placeholder, name, ariaLabel, id, disabled, size, icon, prefix, className, ...rest }: {
3
3
  [x: string]: any;
4
4
  ariaLabel: any;
5
5
  className: any;
6
6
  disabled: any;
7
+ icon: any;
7
8
  id: any;
8
9
  name: any;
9
10
  onChange: any;
10
11
  options?: any[];
11
12
  placeholder?: string;
13
+ prefix: any;
14
+ size: any;
12
15
  value: any;
13
16
  }): import("react").JSX.Element;
@@ -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';