@webority/ui-react 0.80.3 → 0.80.4

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.
Files changed (29) hide show
  1. package/dist/types/components/AppAutocomplete.d.ts +32 -48
  2. package/dist/types/components/AppCalendar.d.ts +33 -46
  3. package/dist/types/components/AppChart.d.ts +69 -55
  4. package/dist/types/components/AppCheckbox.d.ts +8 -18
  5. package/dist/types/components/AppCountrySelect.d.ts +9 -12
  6. package/dist/types/components/AppDatePicker.d.ts +20 -34
  7. package/dist/types/components/AppDateRangePicker.d.ts +29 -38
  8. package/dist/types/components/AppEmptyState.d.ts +3 -2
  9. package/dist/types/components/AppFileViewer.d.ts +23 -55
  10. package/dist/types/components/AppInput.d.ts +33 -78
  11. package/dist/types/components/AppMentionInput.d.ts +39 -39
  12. package/dist/types/components/AppMultiSelect.d.ts +33 -50
  13. package/dist/types/components/AppNumberInput.d.ts +21 -42
  14. package/dist/types/components/AppOtpInput.d.ts +16 -46
  15. package/dist/types/components/AppPhoneNumberInput.d.ts +17 -1
  16. package/dist/types/components/AppRadio.d.ts +8 -18
  17. package/dist/types/components/AppRichText.d.ts +19 -41
  18. package/dist/types/components/AppSelect.d.ts +12 -12
  19. package/dist/types/components/AppSlider.d.ts +28 -36
  20. package/dist/types/components/AppSortableList.d.ts +16 -30
  21. package/dist/types/components/AppSwitch.d.ts +9 -21
  22. package/dist/types/components/AppTableEmptyState.d.ts +3 -2
  23. package/dist/types/components/AppTagInput.d.ts +20 -26
  24. package/dist/types/components/AppTextarea.d.ts +16 -24
  25. package/dist/types/components/AppTimePicker.d.ts +22 -34
  26. package/dist/types/components/AppTour.d.ts +40 -55
  27. package/dist/types/components/AppTreeView.d.ts +31 -42
  28. package/dist/types/components/AppWizard.d.ts +48 -46
  29. package/package.json +3 -3
@@ -1,79 +1,34 @@
1
- /**
2
- * The shared text field — wraps react-bootstrap Form.Group / Form.Label / Form.Control.
3
- * Visual chrome is Bootstrap `.form-control` (theme `$input-*` + one post-CSS skin);
4
- * `.input` is an alias on the same element for size/shell hooks (`.input-sm`,
5
- * `.input-icon`, …), not a second look. Shells: unit, password reveal, leading icon,
6
- * trailing action.
7
- *
8
- * Forwards `ref` to the underlying control, so react-hook-form's spread `{...register("name")}`
9
- * works unchanged, as does a controlled `value`/`onChange` pair.
10
- *
11
- * @param {object} props
12
- * @param {import('react').ReactNode} [props.label]
13
- * @param {boolean} [props.required=false]
14
- * @param {string} [props.error]
15
- * @param {string} [props.hint]
16
- * @param {import('react').ReactNode} [props.help] Content for the label info-tip (decoupled:
17
- * the caller supplies the node; a glossary-backed app wraps its lookup here).
18
- * @param {string} [props.helpLabel="More information"] aria-label for the info-tip button.
19
- * @param {string} [props.type="text"]
20
- * @param {"sm"|"md"|"lg"} [props.size="md"] Control size — sm/lg opt out of the shared height.
21
- * @param {string} [props.leftIcon] Icon name
22
- * @param {string} [props.rightIcon] Icon name
23
- * @param {() => void} [props.onRightIconClick]
24
- * @param {string} [props.rightIconLabel] Accessible name for the right-icon button. Defaults to
25
- * the icon name, which is a poor label but not an absent one.
26
- * @param {string} [props.unit]
27
- * @param {string} [props.id]
28
- * @param {string} [props.name]
29
- * @param {string} [props.className]
30
- * @param {string} [props.fieldClassName]
31
- * @param {boolean} [props.disabled=false]
32
- * @param {boolean} [props.clearable=false] Show an ✕ button while the field has a value.
33
- * @param {boolean} [props.showCount=false] Show a live `count / maxLength` under the field.
34
- * @param {number} [props.maxLength] Character cap; the count turns red as it is approached.
35
- * @param {import('react').ReactNode} [props.prefix] A bordered box before the input (e.g. ₹, https://).
36
- * @param {import('react').ReactNode} [props.suffix] A bordered box after the input (e.g. .00, .com).
37
- * @param {import('react').ReactNode} [props.action] A control rendered BESIDE the field, outside its
38
- * border — a labelled action button (verify, apply, send code), or a confirmation once the field
39
- * is resolved. The field flexes to fill the row; the action keeps its natural width. Exclusive
40
- * with the in-field shells (unit / password / affix / trailing icon); pairs with a leading icon.
41
- * @param {boolean|"above"} [props.floatingLabel=false] Label sits inside as a placeholder, then slides
42
- * up on focus/fill. `true` rests it on the top border; `"above"` rests it above the box at the
43
- * top-left, clear of the border. Opt-in variant; standalone only (no icon/unit/prefix in the same field).
44
- * @param {"bare"} [props.variant] Borderless variant — no border/background, inherits the
45
- * container's chrome (inline-rename, ⌘K).
46
- * @param {boolean|object} [props.passwordRequirements=false] Only honoured when `type="password"`.
47
- * Pass `true` for the default policy (≥10 chars, upper, lower, digit, special), or an object to
48
- * configure it — `{ minLength, uppercase, lowercase, digit, special, uniqueChars, customRules, title }`.
49
- * `customRules` is a list of `{ label, pattern }` for a product's own rules (such as no spaces): a rule
50
- * ticks when the regular expression `pattern` (a JavaScript RegExp source string) matches. Shows
51
- * a live "Password requirements" checklist on focus that ticks each rule green as the user types
52
- * (client-side, before any server validation). The rule set is the one shared with Razor via
53
- * `@webority/ui-elements`, so both surfaces validate identically.
54
- * @param {"auto"|"top"|"bottom"|"start"|"end"|"inline"} [props.requirementsPlacement="auto"] Which side
55
- * the requirements popover opens; `auto` flips to stay in view. `inline` has no popover: the checklist
56
- * sits under the input, always visible, in place of the hint.
57
- * @param {string} [props.mask] Format the value while it is typed. A named mask
58
- * (`phone-in`, `pan`, `gstin`, `aadhaar`, `ifsc`, `pin-code`, `date` as DD-MM-YYYY, `amount` with
59
- * Indian grouping) or a pattern, where `9` is a digit, `A` a letter, `*` a digit or letter and any
60
- * other character a literal (`"(999) 999-9999"`). Paste is cleaned and re-formatted, Backspace and
61
- * Delete step over literals, and the caret stays put; a keyboard that composes text (an Android IME) is
62
- * left alone until it commits, and a value set from code (react-hook-form `setValue` / `reset`) is
63
- * laid out too. The behaviour is the one `<app-input mask>` runs, from `@webority/ui-elements`. Use
64
- * it on a `text`, `tel`, `search`, `url` or `password` field; any other `type` warns, and an unknown
65
- * mask name warns. A controlled `value` (raw or formatted) is laid out under the mask. `onChange`
66
- * and `onBlur` get an event whose `target.value` is the POSTED value (the raw characters, or ISO
67
- * `yyyy-MM-dd` for `date`), so a controlled field and a zod rule see what the server will see;
68
- * `onInput` sees the field as displayed. react-hook-form's `register` reads the element itself, so
69
- * pair it with `setValueAs: (v) => postedMasked(mask, v)`. A named mask also marks the field invalid
70
- * with a curated message while it is incomplete or wrong, shown as the field's error once the field
71
- * has been left or a submit was tried (an `error` you pass wins).
72
- * @param {boolean} [props.postFormatted=false] With a `mask`, a native form submit posts the
73
- * formatted value instead of the raw one (the typed characters without the literals).
74
- * @param {(raw: string, formatted: string) => void} [props.onMaskChange] Called with the raw and the
75
- * formatted value whenever the raw value changes.
76
- * @param {import('react').Ref<HTMLInputElement>} [ref]
77
- */
78
- declare const AppInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
1
+ declare const AppInput: import("react").ForwardRefExoticComponent<{
2
+ label?: import('react').ReactNode;
3
+ required?: boolean;
4
+ error?: string;
5
+ hint?: string;
6
+ help?: import('react').ReactNode;
7
+ helpLabel?: string;
8
+ type?: string;
9
+ size?: "sm" | "md" | "lg";
10
+ leftIcon?: string;
11
+ rightIcon?: string;
12
+ onRightIconClick?: () => void;
13
+ rightIconLabel?: string;
14
+ unit?: string;
15
+ id?: string;
16
+ name?: string;
17
+ className?: string;
18
+ fieldClassName?: string;
19
+ disabled?: boolean;
20
+ clearable?: boolean;
21
+ showCount?: boolean;
22
+ maxLength?: number;
23
+ prefix?: import('react').ReactNode;
24
+ suffix?: import('react').ReactNode;
25
+ action?: import('react').ReactNode;
26
+ floatingLabel?: boolean | "above";
27
+ variant?: "bare";
28
+ passwordRequirements?: boolean | object;
29
+ requirementsPlacement?: "auto" | "top" | "bottom" | "start" | "end" | "inline";
30
+ mask?: string;
31
+ postFormatted?: boolean;
32
+ onMaskChange?: (raw: string, formatted: string) => void;
33
+ } & import("react").RefAttributes<HTMLInputElement>>;
79
34
  export default AppInput;
@@ -1,41 +1,41 @@
1
1
  import "@webority/ui-elements/elements/mention-input";
2
- /**
3
- * A text box where "@" opens a list of people to mention. Up and Down choose, Enter or Tab
4
- * mention, Escape closes the list; the person reads "@Asha Rao" in the text. Typing inside a
5
- * mention turns it back into plain text, and Backspace just after one removes it whole.
6
- *
7
- * The value is plain text with each mention stored as `@[Asha Rao](u-12)`: never HTML, so it can
8
- * be saved and shown anywhere without escaping worries. Show a saved value with `AppCommentThread`,
9
- * or read it with `parseMentionValue` and `mentionedIds` from `@webority/ui-elements/elements/mention-input`
10
- * (the server's twin is `MentionText` in Webority.Ui.Razor).
11
- *
12
- * Wraps the shared `<wui-mention-input>` element; Razor `<app-mention-input>` renders the same box.
13
- *
14
- * @param {object} props
15
- * @param {string} [props.value] The stored value (`Thanks @[Asha Rao](u-12)`).
16
- * @param {(value: string, meta: { mentions: { id: string, label: string }[] }) => void} [props.onChange]
17
- * Called on every edit with the stored value and the people it mentions, each once.
18
- * @param {{ value: string, label: string, description?: string, src?: string }[]} [props.people]
19
- * The people to offer. `value` is the person's public id (letters, digits, `_ . : -`).
20
- * @param {(query: string, opts?: { signal?: AbortSignal }) => Promise<{ value: string, label: string, description?: string, src?: string }[]>} [props.loadPeople]
21
- * Look people up as the person types after "@" (instead of `people`).
22
- * @param {number} [props.minChars=1] How many letters after "@" before `loadPeople` runs.
23
- * @param {number} [props.debounce=250] Milliseconds to wait for typing to pause before `loadPeople` runs.
24
- * @param {() => void} [props.onSubmit] Ctrl or Cmd+Enter in the box (send a comment).
25
- * @param {number} [props.rows=3] Visible lines.
26
- * @param {string} [props.placeholder]
27
- * @param {boolean} [props.disabled=false]
28
- * @param {string} [props.name] Posts the stored value under this name in a form.
29
- * @param {string} [props.id] The element's id; the text box is `{id}-text`, the label's target.
30
- * @param {import('react').ReactNode} [props.label] Shown above the box; a string also names it.
31
- * @param {string} [props.error]
32
- * @param {string} [props.hint]
33
- * @param {boolean} [props.required=false]
34
- * @param {import('react').ReactNode} [props.help] Help content in an info tip beside the label.
35
- * @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
36
- * @param {string} [props.className] Extra classes on the element.
37
- * @param {string} [props.fieldClassName] Extra classes on the field wrapper.
38
- * @param {import('react').Ref<HTMLElement>} [ref] The `<wui-mention-input>` element.
39
- */
40
- declare const AppMentionInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppMentionInput: import("react").ForwardRefExoticComponent<{
3
+ value?: string;
4
+ onChange?: (value: string, meta: {
5
+ mentions: {
6
+ id: string;
7
+ label: string;
8
+ }[];
9
+ }) => void;
10
+ people?: {
11
+ value: string;
12
+ label: string;
13
+ description?: string;
14
+ src?: string;
15
+ }[];
16
+ loadPeople?: (query: string, opts?: {
17
+ signal?: AbortSignal;
18
+ }) => Promise<{
19
+ value: string;
20
+ label: string;
21
+ description?: string;
22
+ src?: string;
23
+ }[]>;
24
+ minChars?: number;
25
+ debounce?: number;
26
+ onSubmit?: () => void;
27
+ rows?: number;
28
+ placeholder?: string;
29
+ disabled?: boolean;
30
+ name?: string;
31
+ id?: string;
32
+ label?: import('react').ReactNode;
33
+ error?: string;
34
+ hint?: string;
35
+ required?: boolean;
36
+ help?: import('react').ReactNode;
37
+ helpLabel?: string;
38
+ className?: string;
39
+ fieldClassName?: string;
40
+ } & import("react").RefAttributes<HTMLElement>>;
41
41
  export default AppMentionInput;
@@ -1,52 +1,35 @@
1
1
  import "@webority/ui-elements/elements/multiselect";
2
- /**
3
- * Multi-value select over the shared `<wui-multiselect>` element. The control shows each
4
- * chosen value as a removable `.chip`; the dropdown is a searchable checklist.
5
- *
6
- * Options may be rich rows: `description` is a secondary line under the label (also matched
7
- * by the search), `avatar` an image URL and `initials` the face shown without (or under) it,
8
- * and `disabled` keeps a row visible but unselectable with `disabledHint` beside it
9
- * (e.g. "Already added").
10
- *
11
- * `allowCustom` turns the control into free entry: an inline text input after the chips
12
- * filters the list, and Enter / comma / blur / a pasted list commit whatever was typed as its
13
- * own chip (value = label = the text). Typed text is checked against `customPattern` then
14
- * `validateCustom`; a refusal keeps the text and shows the message under the control. Chips are
15
- * de-duplicated ignoring case. The in-menu search box is not shown in this mode.
16
- *
17
- * @param {object} props
18
- * @param {string[]} [props.values] Selected option values.
19
- * @param {(values: string[]) => void} [props.onChange]
20
- * @param {Array<{ value: string, label: import('react').ReactNode, description?: string, avatar?: string, initials?: string, disabled?: boolean, disabledHint?: string }>} [props.options]
21
- * The choices. A label may be a node (`<>CO<sub>2</sub></>`): it renders as static markup in the
22
- * menu and on the chosen chip, and search, typeahead and the accessible names (the option and the
23
- * chip's remove button) use its text.
24
- * @param {string} [props.placeholder]
25
- * @param {string} [props.searchPlaceholder] Placeholder for the in-menu search box.
26
- * @param {boolean} [props.searchable=true] Ignored under `allowCustom`, whose inline input is the search.
27
- * @param {boolean} [props.allowCustom=false] Accept typed entries that are not options.
28
- * @param {(value: string) => boolean | string} [props.validateCustom] Checks a typed entry:
29
- * `true` accepts, a string refuses with that message, anything else refuses with
30
- * `customInvalidMessage`. Runs after `customPattern`.
31
- * @param {string} [props.customPattern] Regular expression a typed entry must match in full
32
- * (anchored like the HTML `pattern` attribute).
33
- * @param {string} [props.customInvalidMessage] Message for a refused typed entry
34
- * (default "Enter a valid value.").
35
- * @param {boolean} [props.disabled]
36
- * @param {string} [props.icon] Leading glyph inside the control (a library icon name).
37
- * @param {'sm'|'lg'} [props.size] Control size around the default.
38
- * @param {boolean} [props.collapseChips=false] Keep the chosen chips on one row and fold the
39
- * overflow into a "+N" counter, rather than letting the control grow.
40
- * @param {string} [props.name]
41
- * @param {string} [props.id] DOM id for the control and the label's `for` target.
42
- * @param {import('react').ReactNode} [props.label]
43
- * @param {string} [props.error]
44
- * @param {string} [props.hint]
45
- * @param {boolean} [props.required]
46
- * @param {import('react').ReactNode} [props.help] Help content shown in an info tip beside the label.
47
- * @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
48
- * @param {string} [props.fieldClassName]
49
- * @param {import('react').Ref<HTMLElement>} [ref]
50
- */
51
- declare const AppMultiSelect: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppMultiSelect: import("react").ForwardRefExoticComponent<{
3
+ values?: string[];
4
+ onChange?: (values: string[]) => void;
5
+ options?: Array<{
6
+ value: string;
7
+ label: import('react').ReactNode;
8
+ description?: string;
9
+ avatar?: string;
10
+ initials?: string;
11
+ disabled?: boolean;
12
+ disabledHint?: string;
13
+ }>;
14
+ placeholder?: string;
15
+ searchPlaceholder?: string;
16
+ searchable?: boolean;
17
+ allowCustom?: boolean;
18
+ validateCustom?: (value: string) => boolean | string;
19
+ customPattern?: string;
20
+ customInvalidMessage?: string;
21
+ disabled?: boolean;
22
+ icon?: string;
23
+ size?: 'sm' | 'lg';
24
+ collapseChips?: boolean;
25
+ name?: string;
26
+ id?: string;
27
+ label?: import('react').ReactNode;
28
+ error?: string;
29
+ hint?: string;
30
+ required?: boolean;
31
+ help?: import('react').ReactNode;
32
+ helpLabel?: string;
33
+ fieldClassName?: string;
34
+ } & import("react").RefAttributes<HTMLElement>>;
52
35
  export default AppMultiSelect;
@@ -1,43 +1,22 @@
1
- /**
2
- * Numeric field with ±/step stepper buttons, min/max clamping, and precision rounding.
3
- * Mirrors the AppInput field-shell pattern (label/error/hint/required/aria wiring) exactly.
4
- *
5
- * Forwards `ref` to the underlying input. `onChange` is called with a **number** (or `''`),
6
- * not a DOM event — react-hook-form's plain `{...register('x')}` spread expects an event and
7
- * will not work here. Wire it with `<Controller name="x" render={({ field }) => (
8
- * <AppNumberInput value={field.value} onChange={field.onChange} />
9
- * )} />` instead.
10
- *
11
- * Behavior:
12
- * - Displays as a text input (inputmode decimal when precision > 0, numeric otherwise)
13
- * - Stepper buttons (−/+) increment/decrement by step, clamped to min/max
14
- * - Typing free text: emits parsed number on change; '' on blur if unparsable or empty
15
- * - Keyboard ArrowUp/ArrowDown increment/decrement (respects step and bounds)
16
- * - Rounding to the specified precision
17
- * - Buttons disabled at min/max or when the control is disabled
18
- *
19
- * @param {object} props
20
- * @param {number|''} [props.value]
21
- * @param {(next: number|'') => void} [props.onChange]
22
- * @param {import('react').ReactNode} [props.label]
23
- * @param {boolean} [props.required=false]
24
- * @param {string} [props.error]
25
- * @param {string} [props.hint]
26
- * @param {import('react').ReactNode} [props.help] Content for the label info-tip (decoupled:
27
- * the caller supplies the node; a glossary-backed app wraps its lookup here). Mirrors AppInput.
28
- * @param {string} [props.helpLabel="More information"] aria-label for the info-tip button.
29
- * @param {number} [props.min] Minimum value (inclusive)
30
- * @param {number} [props.max] Maximum value (inclusive)
31
- * @param {number} [props.step=1] Increment by this amount
32
- * @param {number} [props.precision=0] Number of decimal places to round to
33
- * @param {string} [props.unit] Unit suffix displayed inside the field (e.g. "kg", "°C")
34
- * @param {string} [props.size="md"] Control size — sm/md/lg
35
- * @param {string} [props.id]
36
- * @param {string} [props.name]
37
- * @param {string} [props.className]
38
- * @param {string} [props.fieldClassName]
39
- * @param {boolean} [props.disabled=false]
40
- * @param {import('react').Ref<HTMLInputElement>} [ref]
41
- */
42
- declare const AppNumberInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
1
+ declare const AppNumberInput: import("react").ForwardRefExoticComponent<{
2
+ value?: number | '';
3
+ onChange?: (next: number | '') => void;
4
+ label?: import('react').ReactNode;
5
+ required?: boolean;
6
+ error?: string;
7
+ hint?: string;
8
+ help?: import('react').ReactNode;
9
+ helpLabel?: string;
10
+ min?: number;
11
+ max?: number;
12
+ step?: number;
13
+ precision?: number;
14
+ unit?: string;
15
+ size?: string;
16
+ id?: string;
17
+ name?: string;
18
+ className?: string;
19
+ fieldClassName?: string;
20
+ disabled?: boolean;
21
+ } & import("react").RefAttributes<HTMLInputElement>>;
43
22
  export default AppNumberInput;
@@ -1,48 +1,18 @@
1
1
  import "@webority/ui-elements/elements/otp";
2
- /**
3
- * Code entry — MFA, email/phone verification, backup codes. Thin React wrapper over the
4
- * shared `<wui-otp>` element, in the standard `.field` shell.
5
- *
6
- * It is ONE input with the segment boxes drawn underneath, not N inputs. That is what makes
7
- * OS autofill work (iOS/Android hand an SMS code to the focused field, whole — six inputs
8
- * get all six digits in box one or just the first, depending on version) and what makes a
9
- * screen reader announce one labelled field instead of six unlabelled boxes. Paste is not a
10
- * special case for the same reason.
11
- *
12
- * Scope is the INPUT, not the screen: resend timers, "didn't get a code" copy, masked
13
- * destination text, lockout after N attempts and where to go on success are all product
14
- * decisions and stay in the product.
15
- *
16
- * @param {object} props
17
- * @param {string} [props.value]
18
- * @param {(value: string) => void} [props.onChange]
19
- * @param {(value: string) => void} [props.onComplete] Fires once, when the last character
20
- * lands — so a form can submit itself without polling the value.
21
- *
22
- * It receives the CODE, not a DOM event. With react-hook-form that matters:
23
- * `onComplete={handleSubmit(onSubmit)}` hands a string to a handler that expects an event
24
- * and calls `preventDefault` on it. RHF v7 guards against it so the short form happens to
25
- * work — by accident, and not something to rely on. Wrap it instead:
26
- *
27
- * ```jsx
28
- * <AppOtpInput onComplete={() => handleSubmit(onSubmit)()} />
29
- * ```
30
- *
31
- * The component is also CONTROLLED, so with RHF it wants `<Controller>` rather than
32
- * `register`.
33
- * @param {number} [props.length=6] Characters in the code. TOTP is 6; backup codes are often 8.
34
- * @param {"numeric"|"alphanumeric"} [props.mode="numeric"] Drives the on-screen keyboard and
35
- * what the field will accept.
36
- * @param {string} [props.label]
37
- * @param {boolean} [props.required=false]
38
- * @param {string} [props.hint]
39
- * @param {string} [props.error]
40
- * @param {boolean} [props.disabled=false]
41
- * @param {string} [props.name]
42
- * @param {string} [props.id]
43
- * @param {string} [props.className] Class to apply to the control element.
44
- * @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
45
- * @param {import('react').Ref<HTMLElement>} [ref]
46
- */
47
- declare const AppOtpInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppOtpInput: import("react").ForwardRefExoticComponent<{
3
+ value?: string;
4
+ onChange?: (value: string) => void;
5
+ onComplete?: (value: string) => void;
6
+ length?: number;
7
+ mode?: "numeric" | "alphanumeric";
8
+ label?: string;
9
+ required?: boolean;
10
+ hint?: string;
11
+ error?: string;
12
+ disabled?: boolean;
13
+ name?: string;
14
+ id?: string;
15
+ className?: string;
16
+ fieldClassName?: string;
17
+ } & import("react").RefAttributes<HTMLElement>>;
48
18
  export default AppOtpInput;
@@ -1,3 +1,19 @@
1
1
  import "@webority/ui-elements/elements/phone";
2
- declare const AppPhoneNumberInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppPhoneNumberInput: import("react").ForwardRefExoticComponent<{
3
+ value?: string;
4
+ onChange?: (value: string) => void;
5
+ country?: string;
6
+ disabled?: boolean;
7
+ name?: string;
8
+ id?: string;
9
+ label?: import('react').ReactNode;
10
+ placeholder?: string;
11
+ required?: boolean;
12
+ hint?: string;
13
+ error?: string;
14
+ showFlag?: boolean;
15
+ showDialCode?: boolean;
16
+ size?: "sm" | "md" | "lg";
17
+ fieldClassName?: string;
18
+ } & import("react").RefAttributes<any>>;
3
19
  export default AppPhoneNumberInput;
@@ -1,19 +1,9 @@
1
- /**
2
- * Shared radio on the Bootstrap `.form-check` markup — the same structure the
3
- * Razor <app-radio> emits, so both surfaces render identically.
4
- *
5
- * The label is bound to the input with id/htmlFor rather than react-bootstrap's
6
- * `label` prop: that rendered a <label> with no `for`, so clicking the text did
7
- * nothing and screen readers never announced the name.
8
- *
9
- * @param {object} props
10
- * @param {import('react').ReactNode} [props.label]
11
- * @param {string} [props.id]
12
- * @param {string} [props.name]
13
- * @param {string} [props.error] Error message, rendered below the control. Replaces the hint.
14
- * @param {string} [props.hint] Helper text below the control. Hidden while an error is shown.
15
- * @param {string} [props.className]
16
- * @param {import('react').Ref<HTMLInputElement>} [ref]
17
- */
18
- declare const AppRadio: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
1
+ declare const AppRadio: import("react").ForwardRefExoticComponent<{
2
+ label?: import('react').ReactNode;
3
+ id?: string;
4
+ name?: string;
5
+ error?: string;
6
+ hint?: string;
7
+ className?: string;
8
+ } & import("react").RefAttributes<HTMLInputElement>>;
19
9
  export default AppRadio;
@@ -1,42 +1,20 @@
1
- /**
2
- * A formatted-text field: a toolbar (bold, italic, inline code, link, headings, lists, quote, code
3
- * block, undo, redo) over an editable surface, with the usual keyboard shortcuts. The field is the
4
- * shared `<wui-rich-text>` element, the same one the Razor `<app-rich-text>` uses, with its editing
5
- * engine loaded the first time an editor mounts: a page without one never downloads it.
6
- *
7
- * The value is a string in `format`, HTML by default or Markdown. It is always written out from a
8
- * fixed set of allowed content (paragraphs, bold, italic, inline code, links, two heading levels,
9
- * lists, quotes, code blocks), so pasted or seeded markup outside that set never reaches the value:
10
- * a pasted script, style, class or table has nowhere to land. A link may point at http, https,
11
- * mailto or tel only. An empty editor is the empty string. Still sanitise on the server: the
12
- * browser is not a trust boundary.
13
- *
14
- * ```jsx
15
- * <AppRichText label="Notes" value={notes} onChange={setNotes} hint="Shown on the invoice." />
16
- * ```
17
- *
18
- * `onChange` fires on every edit with the new string. `format` is read when the editor mounts; the
19
- * wrapper remounts the editor when it changes, so the value you hold must be in the new format.
20
- *
21
- * @param {object} props
22
- * @param {string} [props.value] The content, in `format`.
23
- * @param {(value: string) => void} [props.onChange] Called with the new string on every edit.
24
- * @param {'html'|'markdown'} [props.format='html'] What `value` is.
25
- * @param {string} [props.placeholder] Shown while the editor is empty.
26
- * @param {string} [props.name] Posted under this name with a form.
27
- * @param {import('react').ReactNode} [props.label]
28
- * @param {string} [props.error]
29
- * @param {string} [props.hint]
30
- * @param {boolean} [props.required=false] Marks the field required; an empty editor is invalid.
31
- * @param {boolean} [props.disabled=false] Locks the editor and keeps it out of the form post.
32
- * @param {boolean} [props.readOnly=false] Locks the editor; the value still posts.
33
- * @param {string} [props.id]
34
- * @param {string} [props.ariaLabel] Accessible name for the editor; defaults to a string `label`.
35
- * @param {string} [props.className] Class on the `<wui-rich-text>` element.
36
- * @param {string} [props.fieldClassName] Class on the wrapper field div.
37
- * @param {import('react').ReactNode} [props.help] Help content shown in an info tip beside the label.
38
- * @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
39
- * @param {import('react').Ref<HTMLElement>} [ref] The `<wui-rich-text>` element.
40
- */
41
- declare const AppRichText: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
1
+ declare const AppRichText: import("react").ForwardRefExoticComponent<{
2
+ value?: string;
3
+ onChange?: (value: string) => void;
4
+ format?: 'html' | 'markdown';
5
+ placeholder?: string;
6
+ name?: string;
7
+ label?: import('react').ReactNode;
8
+ error?: string;
9
+ hint?: string;
10
+ required?: boolean;
11
+ disabled?: boolean;
12
+ readOnly?: boolean;
13
+ id?: string;
14
+ ariaLabel?: string;
15
+ className?: string;
16
+ fieldClassName?: string;
17
+ help?: import('react').ReactNode;
18
+ helpLabel?: string;
19
+ } & import("react").RefAttributes<HTMLElement>>;
42
20
  export default AppRichText;
@@ -1,14 +1,14 @@
1
1
  import "@webority/ui-elements/elements/select";
2
- /**
3
- * @param {object} props
4
- * @param {Array<{ value: string, label?: import('react').ReactNode, text?: string, icon?: string }>} [props.options]
5
- * The choices. A label may be a node (`<>LPZ 0<sub>B</sub></>`): it renders as static markup in
6
- * the list and the value, and search and the option's accessible name use its text.
7
- * @param {string} [props.className] Class to apply to the control element.
8
- * @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
9
- * @param {import('react').ReactNode} [props.prefix] A bordered box before the select (e.g. "+91", "Tag"),
10
- * the same shell as AppInput's prefix. Not combined with floatingLabel.
11
- * @param {import('react').ReactNode} [props.suffix] A bordered box after the select, as AppInput's suffix.
12
- */
13
- declare const AppSelect: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppSelect: import("react").ForwardRefExoticComponent<{
3
+ options?: Array<{
4
+ value: string;
5
+ label?: import('react').ReactNode;
6
+ text?: string;
7
+ icon?: string;
8
+ }>;
9
+ className?: string;
10
+ fieldClassName?: string;
11
+ prefix?: import('react').ReactNode;
12
+ suffix?: import('react').ReactNode;
13
+ } & import("react").RefAttributes<any>>;
14
14
  export default AppSelect;
@@ -1,38 +1,30 @@
1
1
  import "@webority/ui-elements/elements/slider";
2
- /**
3
- * Thin React wrapper over the shared `<wui-slider>` element (single or dual-thumb slider).
4
- *
5
- * Single-thumb mode (default): `value` + `onChange` with string value.
6
- * Dual-thumb mode (range): `start`/`end` + `onChange` callback receives `{ start, end }`.
7
- *
8
- * Wraps it in the standard `.field` shell — label / required mark / hint / error.
9
- * The shell is omitted entirely when there is nothing to render around the control.
10
- *
11
- * @param {object} props
12
- * @param {number} [props.value] Current value (single mode)
13
- * @param {number} [props.start] Range start (range mode)
14
- * @param {number} [props.end] Range end (range mode)
15
- * @param {boolean} [props.range] Enables dual-thumb range mode
16
- * @param {(value: number|{start, end}) => void} [props.onChange]
17
- * @param {number} [props.min=0]
18
- * @param {number} [props.max=100]
19
- * @param {number} [props.step=1]
20
- * @param {string} [props.label]
21
- * @param {boolean} [props.required]
22
- * @param {string} [props.hint]
23
- * @param {string} [props.error]
24
- * @param {string} [props.name] Form field name (single mode)
25
- * @param {string} [props.startName] Form field name for range start
26
- * @param {string} [props.endName] Form field name for range end
27
- * @param {boolean} [props.disabled]
28
- * @param {'sm'|'md'|'lg'} [props.size] Control size tier
29
- * @param {boolean} [props.showValue] Shows a label with current value(s)
30
- * @param {string} [props.unit] Suffix for the value label (e.g. '%')
31
- * @param {string} [props.id]
32
- * @param {string} [props.ariaLabel]
33
- * @param {string} [props.className] Class to apply to the control element.
34
- * @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
35
- * @param {import('react').Ref<HTMLElement>} [ref]
36
- */
37
- declare const AppSlider: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppSlider: import("react").ForwardRefExoticComponent<{
3
+ value?: number;
4
+ start?: number;
5
+ end?: number;
6
+ range?: boolean;
7
+ onChange?: (value: number | {
8
+ start: any;
9
+ end: any;
10
+ }) => void;
11
+ min?: number;
12
+ max?: number;
13
+ step?: number;
14
+ label?: string;
15
+ required?: boolean;
16
+ hint?: string;
17
+ error?: string;
18
+ name?: string;
19
+ startName?: string;
20
+ endName?: string;
21
+ disabled?: boolean;
22
+ size?: 'sm' | 'md' | 'lg';
23
+ showValue?: boolean;
24
+ unit?: string;
25
+ id?: string;
26
+ ariaLabel?: string;
27
+ className?: string;
28
+ fieldClassName?: string;
29
+ } & import("react").RefAttributes<HTMLElement>>;
38
30
  export default AppSlider;