@webority/ui-react 0.7.5 → 0.7.7

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 (42) hide show
  1. package/dist/types/components/AppAutocomplete.d.ts +5 -28
  2. package/dist/types/components/AppAvatar.d.ts +24 -2
  3. package/dist/types/components/AppAvatarGroup.d.ts +8 -0
  4. package/dist/types/components/AppCard.d.ts +31 -5
  5. package/dist/types/components/AppCheckbox.d.ts +1 -1
  6. package/dist/types/components/AppCopyButton.d.ts +27 -0
  7. package/dist/types/components/AppDatePicker.d.ts +3 -18
  8. package/dist/types/components/AppDateRangePicker.d.ts +3 -23
  9. package/dist/types/components/AppDescriptions.d.ts +30 -0
  10. package/dist/types/components/AppDropdown.d.ts +53 -11
  11. package/dist/types/components/AppFormActions.d.ts +19 -0
  12. package/dist/types/components/AppFormRow.d.ts +17 -0
  13. package/dist/types/components/AppFormSection.d.ts +19 -0
  14. package/dist/types/components/AppKpiTile.d.ts +3 -1
  15. package/dist/types/components/AppModal.d.ts +4 -1
  16. package/dist/types/components/AppMultiSelect.d.ts +5 -21
  17. package/dist/types/components/AppNumberInput.d.ts +40 -0
  18. package/dist/types/components/AppPageHeader.d.ts +10 -1
  19. package/dist/types/components/AppPagination.d.ts +25 -0
  20. package/dist/types/components/AppPhoneNumberInput.d.ts +2 -13
  21. package/dist/types/components/AppRadio.d.ts +1 -1
  22. package/dist/types/components/AppResult.d.ts +27 -0
  23. package/dist/types/components/AppScrollbar.d.ts +1 -2
  24. package/dist/types/components/AppSearch.d.ts +5 -3
  25. package/dist/types/components/AppSelect.d.ts +2 -27
  26. package/dist/types/components/AppShell.d.ts +11 -6
  27. package/dist/types/components/AppSlider.d.ts +37 -0
  28. package/dist/types/components/AppStepper.d.ts +24 -7
  29. package/dist/types/components/AppSwitch.d.ts +1 -1
  30. package/dist/types/components/AppTagInput.d.ts +28 -0
  31. package/dist/types/components/AppTimePicker.d.ts +33 -0
  32. package/dist/types/components/AppToastContainer.d.ts +10 -6
  33. package/dist/types/components/AppTooltip.d.ts +21 -0
  34. package/dist/types/components/__tests__/restPassthrough.d.ts +9 -0
  35. package/dist/types/components/toast.d.ts +5 -2
  36. package/dist/types/components/toastStore.d.ts +4 -3
  37. package/dist/types/components/useWuiControl.d.ts +55 -0
  38. package/dist/types/index.d.ts +13 -0
  39. package/dist/types/lib/FileItemRow.d.ts +20 -0
  40. package/dist/types/lib/fileItem.d.ts +16 -0
  41. package/dist/ui-react.js +3020 -1454
  42. package/package.json +3 -3
@@ -3,7 +3,8 @@
3
3
  *
4
4
  * @param {object} props
5
5
  * @param {string} props.value
6
- * @param {(value: string) => void} props.onValueChange
6
+ * @param {(value: string) => void} [props.onChange] Primary callback name for the value change.
7
+ * @param {(value: string) => void} [props.onValueChange] Also called when value changes (legacy name).
7
8
  * @param {string} [props.placeholder='Search…']
8
9
  * @param {string} [props.ariaLabel]
9
10
  * @param {number} [props.iconSize=18]
@@ -12,10 +13,11 @@
12
13
  * @param {boolean} [props.disabled=false]
13
14
  * @param {string} [props.className]
14
15
  */
15
- export default function AppSearch({ value, onValueChange, placeholder, ariaLabel, iconSize, size, loading, disabled, className, // extra classes on the wrapper
16
+ export default function AppSearch({ value, onChange, onValueChange, placeholder, ariaLabel, iconSize, size, loading, disabled, className, // extra classes on the wrapper
16
17
  ...rest }: {
17
18
  value: string;
18
- onValueChange: (value: string) => void;
19
+ onChange?: (value: string) => void;
20
+ onValueChange?: (value: string) => void;
19
21
  placeholder?: string;
20
22
  ariaLabel?: string;
21
23
  iconSize?: number;
@@ -1,28 +1,3 @@
1
1
  import '@webority/ui-elements';
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, 'aria-label': ariaLabel, 'aria-labelledby': ariaLabelledBy, 'aria-describedby': ariaDescribedBy, ...rest }: {
3
- [x: string]: any;
4
- "aria-describedby": any;
5
- "aria-label": any;
6
- "aria-labelledby": any;
7
- className?: string;
8
- clearable?: boolean;
9
- disabled: any;
10
- error: any;
11
- fieldClassName?: string;
12
- floatingLabel?: boolean;
13
- help: any;
14
- helpLabel?: string;
15
- hint: any;
16
- icon: any;
17
- id: any;
18
- label: any;
19
- name: any;
20
- onChange: any;
21
- options?: any[];
22
- placeholder?: string;
23
- required?: boolean;
24
- searchPlaceholder?: string;
25
- searchable?: boolean;
26
- size: any;
27
- value: any;
28
- }): import("react").JSX.Element;
2
+ declare const AppSelect: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
3
+ export default AppSelect;
@@ -2,9 +2,10 @@ export type NavItemShape = {
2
2
  key?: string;
3
3
  label: string;
4
4
  /**
5
- * Bootstrap Icons name for the row's leading glyph.
5
+ * Bootstrap Icons name — or a node, so a
6
+ * product with its own content-icon set (iconsax behind a product `Icon` seam) can use it.
6
7
  */
7
- icon?: string;
8
+ icon?: string | import('react').ReactNode;
8
9
  href: string;
9
10
  /**
10
11
  * A count or short status at the row's end.
@@ -17,7 +18,7 @@ export type NavItemShape = {
17
18
  /**
18
19
  * A right-aligned secondary glyph (lock, external arrow, new dot).
19
20
  */
20
- trailingIcon?: string;
21
+ trailingIcon?: string | import('react').ReactNode;
21
22
  /**
22
23
  * The current page — takes the brand tint + aria-current.
23
24
  */
@@ -31,11 +32,12 @@ export type NavItemShape = {
31
32
  * @typedef {object} NavItemShape
32
33
  * @property {string} [key]
33
34
  * @property {string} label
34
- * @property {string} [icon] Bootstrap Icons name for the row's leading glyph.
35
+ * @property {string|import('react').ReactNode} [icon] Bootstrap Icons name — or a node, so a
36
+ * product with its own content-icon set (iconsax behind a product `Icon` seam) can use it.
35
37
  * @property {string} href
36
38
  * @property {import('react').ReactNode} [badge] A count or short status at the row's end.
37
39
  * @property {'danger'|'success'|'warning'} [badgeTone] Tints the badge for an alert count.
38
- * @property {string} [trailingIcon] A right-aligned secondary glyph (lock, external arrow, new dot).
40
+ * @property {string|import('react').ReactNode} [trailingIcon] A right-aligned secondary glyph (lock, external arrow, new dot).
39
41
  * @property {boolean} [active] The current page — takes the brand tint + aria-current.
40
42
  * @property {NavItemShape[]} [children] Sub-items — the row becomes an expandable parent.
41
43
  */
@@ -55,6 +57,8 @@ export type NavItemShape = {
55
57
  * @param {{ label?: string, items: NavItemShape[] }[]} props.groups Nav groups, in order.
56
58
  * Groups after the first are separated by a rule.
57
59
  * @param {import('react').ReactNode} [props.brand] The logo row at the top of the sidebar.
60
+ * @param {import('react').ReactNode} [props.sidebarStart] Between the brand row and the nav —
61
+ * a workspace/tenant switcher, an environment badge. Hidden on the collapsed rail.
58
62
  * @param {import('react').ReactNode} [props.sidebarFooter] Pinned below the scrolling nav.
59
63
  * @param {import('react').ReactNode} [props.topbarStart] Leading topbar slot — page title, crumbs.
60
64
  * @param {import('react').ReactNode} [props.topbarEnd] Trailing topbar slot — search, account menu.
@@ -66,12 +70,13 @@ export type NavItemShape = {
66
70
  * @param {string} [props.navLabel='Main navigation']
67
71
  * @param {string} [props.className]
68
72
  */
69
- export default function AppShell({ groups, brand, sidebarFooter, topbarStart, topbarEnd, footer, children, collapsed, onCollapsedChange, noSidebar, navLabel, linkComponent: Link, className, ...rest }: {
73
+ export default function AppShell({ groups, brand, sidebarStart, sidebarFooter, topbarStart, topbarEnd, footer, children, collapsed, onCollapsedChange, noSidebar, navLabel, linkComponent: Link, className, ...rest }: {
70
74
  groups: {
71
75
  label?: string;
72
76
  items: NavItemShape[];
73
77
  }[];
74
78
  brand?: import('react').ReactNode;
79
+ sidebarStart?: import('react').ReactNode;
75
80
  sidebarFooter?: import('react').ReactNode;
76
81
  topbarStart?: import('react').ReactNode;
77
82
  topbarEnd?: import('react').ReactNode;
@@ -0,0 +1,37 @@
1
+ import '@webority/ui-elements';
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]
34
+ * @param {import('react').Ref<HTMLElement>} [ref]
35
+ */
36
+ declare const AppSlider: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
37
+ export default AppSlider;
@@ -7,28 +7,45 @@
7
7
  * `variant="journey"` wide — a large dot beside a "STEP 2" index and a title.
8
8
  * For a page masthead above the whole flow.
9
9
  *
10
- * A completed step shows a tick, not its number: the number says "which", the tick
11
- * says "done", and a finished step only needs the latter.
10
+ * Either variant can run `orientation="vertical"` to stack the steps down a side
11
+ * rail — for a narrow column, a drawer, or a settings wizard.
12
12
  *
13
- * A step with `href` becomes a link back to that stage — only give one to a step
14
- * the user may actually revisit.
13
+ * A completed step shows a tick, not its number; a failed step shows an alert; a
14
+ * step may carry its own `icon` in place of the number. The number says "which",
15
+ * these glyphs say "what happened", and once something has happened the glyph is
16
+ * the more useful of the two.
17
+ *
18
+ * A step with `href` becomes a link back to that stage; passing `onStepClick`
19
+ * instead makes every step a button that reports its index — for a wizard whose
20
+ * navigation is driven in JS rather than by routing. Use one or the other.
15
21
  *
16
22
  * @param {object} props
17
- * @param {{ key?: string, label: string, status?: 'done'|'active'|'pending', href?: string }[]} props.steps
23
+ * @param {{ key?: string, label: string, description?: string, status?: 'done'|'active'|'pending'|'error', href?: string, icon?: string }[]} props.steps
18
24
  * @param {'steps'|'journey'} [props.variant='steps']
25
+ * @param {'horizontal'|'vertical'} [props.orientation='horizontal']
26
+ * @param {number} [props.activeStep] When set, statuses are DERIVED from the index —
27
+ * steps before it are `done`, the one at it is `active`, the rest `pending`. A step's
28
+ * own explicit `status` still wins, so a failed step can be marked `error`.
29
+ * @param {(step: object, index: number) => void} [props.onStepClick] Makes each step a
30
+ * button that reports the step it stands for. React-only (no Razor counterpart).
19
31
  * @param {string} [props.label='Progress'] Accessible name for the list.
20
32
  * @param {import('react').ElementType} [props.linkComponent] Router link for a revisitable
21
33
  * step; it receives `to` instead of `href`.
22
34
  * @param {string} [props.className]
23
35
  */
24
- export default function AppStepper({ steps, variant, label, linkComponent: Link, className, ...rest }: {
36
+ export default function AppStepper({ steps, variant, orientation, activeStep, onStepClick, label, linkComponent: Link, className, ...rest }: {
25
37
  steps: {
26
38
  key?: string;
27
39
  label: string;
28
- status?: 'done' | 'active' | 'pending';
40
+ description?: string;
41
+ status?: 'done' | 'active' | 'pending' | 'error';
29
42
  href?: string;
43
+ icon?: string;
30
44
  }[];
31
45
  variant?: 'steps' | 'journey';
46
+ orientation?: 'horizontal' | 'vertical';
47
+ activeStep?: number;
48
+ onStepClick?: (step: object, index: number) => void;
32
49
  label?: string;
33
50
  linkComponent?: import('react').ElementType;
34
51
  className?: string;
@@ -13,7 +13,7 @@
13
13
  * @param {string} [props.error] Error message, rendered below the control. Replaces the hint.
14
14
  * @param {string} [props.hint] Helper text below the control. Hidden while an error is shown.
15
15
  * @param {string} [props.className]
16
- * @param {import('react').Ref} [ref]
16
+ * @param {import('react').Ref<HTMLInputElement>} [ref]
17
17
  */
18
18
  declare const AppSwitch: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
19
19
  export default AppSwitch;
@@ -0,0 +1,28 @@
1
+ import '@webority/ui-elements';
2
+ /**
3
+ * Free-text token entry field (emails, tags, keywords) over the shared `<wui-taginput>`
4
+ * custom element. Type text and press Enter/comma to add a chip; Backspace removes the last.
5
+ *
6
+ * @param {object} props
7
+ * @param {string[]} [props.values] Current tag values.
8
+ * @param {(values: string[]) => void} [props.onChange]
9
+ * @param {string} [props.placeholder] Placeholder for the input field.
10
+ * @param {string} [props.name]
11
+ * @param {import('react').ReactNode} [props.label]
12
+ * @param {string} [props.error]
13
+ * @param {string} [props.hint]
14
+ * @param {boolean} [props.required]
15
+ * @param {'sm'|'lg'} [props.size] Control size around the default.
16
+ * @param {number} [props.maxTags] Maximum number of tags allowed.
17
+ * @param {boolean} [props.allowDuplicates=false] Allow case-sensitive duplicate values.
18
+ * @param {boolean} [props.disabled]
19
+ * @param {string} [props.id]
20
+ * @param {string} [props.ariaLabel] Accessible name for the input.
21
+ * @param {string} [props.className] Class to apply to the control element.
22
+ * @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
23
+ * @param {import('react').ReactNode} [props.help] Help content shown in an info tip beside the label.
24
+ * @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
25
+ * @param {import('react').Ref<HTMLElement>} [ref]
26
+ */
27
+ declare const AppTagInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
28
+ export default AppTagInput;
@@ -0,0 +1,33 @@
1
+ import '@webority/ui-elements';
2
+ /**
3
+ * Thin React wrapper over the shared `<wui-timepicker>` element (single
4
+ * implementation, so React and Razor render the same control).
5
+ *
6
+ * Wraps it in the standard `.field` shell — label / required mark / hint /
7
+ * error — the same as `AppDatePicker` and every other field primitive.
8
+ * Without that a caller had to hand-roll the label, which is exactly the
9
+ * per-screen divergence this library exists to prevent. The shell is omitted
10
+ * entirely when there is nothing to render around the control.
11
+ *
12
+ * @param {object} props
13
+ * @param {string} [props.value] Time string in "HH:mm" format (24-hour, wire format)
14
+ * @param {(value: 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.name]
20
+ * @param {string} [props.min] Time in "HH:mm" format
21
+ * @param {string} [props.max] Time in "HH:mm" format
22
+ * @param {number} [props.step=30] Step granularity in minutes
23
+ * @param {'12'|'24'} [props.format='24'] Display format — 12 or 24 hour (wire stays 24h)
24
+ * @param {string} [props.placeholder="Select time"]
25
+ * @param {boolean} [props.disabled]
26
+ * @param {'sm'|'md'|'lg'} [props.size] Control height tier, matching AppInput
27
+ * @param {string} [props.id]
28
+ * @param {string} [props.ariaLabel]
29
+ * @param {string} [props.className]
30
+ * @param {import('react').Ref<HTMLElement>} [ref]
31
+ */
32
+ declare const AppTimePicker: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
33
+ export default AppTimePicker;
@@ -1,13 +1,17 @@
1
1
  /**
2
- * Mounts once near the app root and renders whatever toast()/errorToast() raise. Everything —
3
- * auto-dismiss, the ARIA live region, the slide/fade — comes from react-bootstrap's Toast, so
4
- * there is no toast library and no bespoke stylesheet; the look is Bootstrap + the shared theme.
2
+ * Mounts once near the app root and renders whatever toast()/errorToast() raise. The
3
+ * auto-dismiss timer itself lives in toastStore (so a toast still expires with no container
4
+ * mounted); react-bootstrap's Toast reproduces the same delay for its own slide/fade exit,
5
+ * and there is no bespoke stylesheet — the look is Bootstrap + the shared theme.
6
+ *
7
+ * Supports new toast options:
8
+ * - title: optional bold first line
9
+ * - duration: auto-dismiss delay in ms, set via toast()/errorToast() (0 = sticky/persistent)
10
+ * - action: { label, onClick } renders an action button
5
11
  *
6
12
  * @param {object} props
7
13
  * @param {'top-start'|'top-center'|'top-end'|'middle-center'|'bottom-start'|'bottom-center'|'bottom-end'} [props.position='bottom-end']
8
- * @param {number} [props.autoDismiss=5000] Milliseconds a toast stays before it fades itself out.
9
14
  */
10
- export default function AppToastContainer({ position, autoDismiss }: {
15
+ export default function AppToastContainer({ position }: {
11
16
  position?: 'top-start' | 'top-center' | 'top-end' | 'middle-center' | 'bottom-start' | 'bottom-center' | 'bottom-end';
12
- autoDismiss?: number;
13
17
  }): import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ /**
2
+ * A plain tooltip on any element (hover or focus to reveal). Distinct from AppInfoTip (a help
3
+ * "?" icon beside a label) and AppPopover (a click-opened panel). Wraps react-bootstrap's
4
+ * OverlayTrigger/Tooltip (Popper positioning); the Razor counterpart `<app-tooltip>` uses
5
+ * Bootstrap's own tooltip, so both surfaces stay in lockstep.
6
+ *
7
+ * @param {object} props
8
+ * @param {import('react').ReactNode} props.content The tooltip text or node (required).
9
+ * @param {import('react').ReactElement} props.children A single trigger element that forwards
10
+ * a ref (a DOM element, or a react-bootstrap-based App* like AppButton/ActionIcon). It
11
+ * renders as written; hovering or focusing it reveals the tooltip.
12
+ * @param {'top'|'bottom'|'start'|'end'} [props.placement='top'] Where the tooltip appears;
13
+ * prefers the given direction, flips if needed to stay in view.
14
+ * @param {string} [props.className] Class on the tooltip element.
15
+ */
16
+ export default function AppTooltip({ content, children, placement, className, ...rest }: {
17
+ content: import('react').ReactNode;
18
+ children: import('react').ReactElement;
19
+ placement?: 'top' | 'bottom' | 'start' | 'end';
20
+ className?: string;
21
+ }): import("react").JSX.Element;
@@ -0,0 +1,9 @@
1
+ /** Shared rest-prop probe for Wave 2 field/control passthrough tests. */
2
+ export declare const REST_PROBE: {
3
+ id: string;
4
+ 'data-testid': string;
5
+ 'data-foo': string;
6
+ 'aria-roledescription': string;
7
+ };
8
+ /** Assert standard REST_PROBE attributes landed on the control root. */
9
+ export declare function expectProbe(el: any): void;
@@ -1,3 +1,6 @@
1
- export declare function toast(msg: any, variant?: string): void;
1
+ export declare function toast(message: any, variantOrOptions?: string): void;
2
+ export declare namespace toast {
3
+ var promise: (promise: Promise<any>, messages: object, opts?: object) => Promise<any>;
4
+ }
2
5
  /** Error toast — red. De-duped by message so the same backend error shows once, not stacked. */
3
- export declare function errorToast(msg: any): void;
6
+ export declare function errorToast(message: any, opts?: {}): void;
@@ -1,9 +1,10 @@
1
1
  /** Subscribe to the active-toast list. Calls back immediately, and returns an unsubscribe fn. */
2
2
  export declare function subscribeToasts(listener: any): () => boolean;
3
3
  /**
4
- * Raise a toast. De-duped by `variant:message` while one is still on screen, so a burst of the
5
- * same failure (many in-flight requests, a retry) shows once instead of stacking copies.
4
+ * Raise a toast. De-duped by `variant:message` while one is still on screen, or by explicit `id`.
5
+ * When `opts.id` is provided, a toast with that id replaces any existing one (refresh/update).
6
+ * `duration` of 0 is sticky (no timer); any other duration schedules its own expiry here.
6
7
  */
7
- export declare function pushToast(message: any, variant: any): void;
8
+ export declare function pushToast(message: any, variant: any, opts?: {}): void;
8
9
  /** Remove a toast — its auto-dismiss timer fired, or the user closed it. */
9
10
  export declare function dismissToast(id: any): void;
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Shared plumbing for thin React wrappers over form-associated `<wui-*>` elements.
3
+ *
4
+ * Collapses the copy-pasted triple every hard-interactive wrapper used to own:
5
+ * 1. merge a forwarded ref with an internal ref
6
+ * 2. sync a controlled `value` prop onto the element
7
+ * 3. listen for the element's `change` event and call `onChange`
8
+ *
9
+ * Callers that need extra effects (options arrays, remote loaders, dual-thumb ranges)
10
+ * keep those beside this hook — only the common path lives here.
11
+ *
12
+ * @param {object} opts
13
+ * @param {import('react').Ref<HTMLElement>} [opts.ref] Forwarded ref from `forwardRef`.
14
+ * @param {unknown} [opts.value] Controlled value; when defined, written to `el.value`.
15
+ * @param {(value: unknown) => void} [opts.onChange] Called with the control value only
16
+ * (one argument — matches every existing App* wrapper and its unit tests).
17
+ * @param {(el: HTMLElement) => unknown} [opts.readValue] How to read the element on change
18
+ * (default: `el => el.value`). Dual-thumb / multi-select wrappers pass a custom reader.
19
+ * @param {(el: HTMLElement, value: unknown) => void} [opts.writeValue] How to write the
20
+ * controlled value (default: `el.value = value ?? ''`).
21
+ * @param {unknown[]} [opts.syncDeps] Extra deps that should re-run the write effect
22
+ * (rarely needed — prefer baking state into `value`).
23
+ * @returns {{ setRef: (el: HTMLElement | null) => void, innerRef: import('react').MutableRefObject<HTMLElement | null> }}
24
+ */
25
+ export default function useWuiControl({ ref, value, onChange, readValue, writeValue, syncDeps, }?: {
26
+ ref?: import('react').Ref<HTMLElement>;
27
+ value?: unknown;
28
+ onChange?: (value: unknown) => void;
29
+ readValue?: (el: HTMLElement) => unknown;
30
+ writeValue?: (el: HTMLElement, value: unknown) => void;
31
+ syncDeps?: unknown[];
32
+ }): {
33
+ setRef: (el: HTMLElement | null) => void;
34
+ innerRef: import('react').MutableRefObject<HTMLElement | null>;
35
+ };
36
+ /**
37
+ * Shallow value+label equality for two `{ value, label }` option arrays.
38
+ *
39
+ * The select/multiselect/autocomplete wrappers re-map their `options` prop into a fresh
40
+ * array every render (even when the caller's underlying data hasn't changed), and assigning
41
+ * that fresh array onto the element's `options` property makes the element re-render its
42
+ * menu — closing an open dropdown or discarding in-progress search text on any unrelated
43
+ * parent re-render. Comparing before assigning keeps the element's own array identity (and
44
+ * its open menu) whenever the option set is actually unchanged.
45
+ *
46
+ * @param {{value: unknown, label: string}[]} [next]
47
+ * @param {{value: unknown, label: string}[]} [cur]
48
+ */
49
+ export declare function optionsEqual(next?: {
50
+ value: unknown;
51
+ label: string;
52
+ }[], cur?: {
53
+ value: unknown;
54
+ label: string;
55
+ }[]): boolean;
@@ -4,6 +4,7 @@ export { default as AppAlert } from './components/AppAlert.jsx';
4
4
  export { default as AppAsyncBlock } from './components/AppAsyncBlock.jsx';
5
5
  export { default as AppAutocomplete } from './components/AppAutocomplete.jsx';
6
6
  export { default as AppAvatar } from './components/AppAvatar.jsx';
7
+ export { default as AppAvatarGroup } from './components/AppAvatarGroup.jsx';
7
8
  export { default as AppBadge } from './components/AppBadge.jsx';
8
9
  export { default as AppBanner } from './components/AppBanner.jsx';
9
10
  export { default as AppBreadcrumbs } from './components/AppBreadcrumbs.jsx';
@@ -17,13 +18,18 @@ export { default as AppChoiceChip } from './components/AppChoiceChip.jsx';
17
18
  export { default as AppColorField } from './components/AppColorField.jsx';
18
19
  export { default as AppCompareTable } from './components/AppCompareTable.jsx';
19
20
  export { default as AppConfirmDialog } from './components/AppConfirmDialog.jsx';
21
+ export { default as AppCopyButton } from './components/AppCopyButton.jsx';
20
22
  export { default as AppDataTable } from './components/AppDataTable.jsx';
21
23
  export { default as AppDatePicker } from './components/AppDatePicker.jsx';
22
24
  export { default as AppDateRangePicker } from './components/AppDateRangePicker.jsx';
25
+ export { default as AppDescriptions } from './components/AppDescriptions.jsx';
23
26
  export { default as AppDropdown } from './components/AppDropdown.jsx';
24
27
  export { default as AppEmptyState } from './components/AppEmptyState.jsx';
25
28
  export { default as AppFileAttachment } from './components/AppFileAttachment.jsx';
26
29
  export { default as AppFilePicker } from './components/AppFilePicker.jsx';
30
+ export { default as AppFormActions } from './components/AppFormActions.jsx';
31
+ export { default as AppFormRow } from './components/AppFormRow.jsx';
32
+ export { default as AppFormSection } from './components/AppFormSection.jsx';
27
33
  export { default as AppInfoList } from './components/AppInfoList.jsx';
28
34
  export { default as AppInfoTip } from './components/AppInfoTip.jsx';
29
35
  export { default as AppInput } from './components/AppInput.jsx';
@@ -32,8 +38,10 @@ export { default as AppLogoPicker } from './components/AppLogoPicker.jsx';
32
38
  export { default as AppMeter } from './components/AppMeter.jsx';
33
39
  export { default as AppModal } from './components/AppModal.jsx';
34
40
  export { default as AppMultiSelect } from './components/AppMultiSelect.jsx';
41
+ export { default as AppNumberInput } from './components/AppNumberInput.jsx';
35
42
  export { default as AppOtpInput } from './components/AppOtpInput.jsx';
36
43
  export { default as AppPageHeader } from './components/AppPageHeader.jsx';
44
+ export { default as AppPagination } from './components/AppPagination.jsx';
37
45
  export { default as AppPhoneNumberInput } from './components/AppPhoneNumberInput.jsx';
38
46
  export { default as AppPopover } from './components/AppPopover.jsx';
39
47
  export { default as AppPricingCard } from './components/AppPricingCard.jsx';
@@ -41,6 +49,7 @@ export { default as AppProgress } from './components/AppProgress.jsx';
41
49
  export { default as AppRadio } from './components/AppRadio.jsx';
42
50
  export { default as AppRepeater } from './components/AppRepeater.jsx';
43
51
  export { default as AppResourceCard } from './components/AppResourceCard.jsx';
52
+ export { default as AppResult } from './components/AppResult.jsx';
44
53
  export { default as AppScrollbar } from './components/AppScrollbar.jsx';
45
54
  export { default as AppSearch } from './components/AppSearch.jsx';
46
55
  export { default as AppSegmented } from './components/AppSegmented.jsx';
@@ -49,6 +58,7 @@ export { default as AppSelectMini } from './components/AppSelectMini.jsx';
49
58
  export { default as AppShell } from './components/AppShell.jsx';
50
59
  export { default as AppSidebarMenu } from './components/AppSidebarMenu.jsx';
51
60
  export { AppSkeletonRows, default as AppSkeleton } from './components/AppSkeleton.jsx';
61
+ export { default as AppSlider } from './components/AppSlider.jsx';
52
62
  export { default as AppSpinner } from './components/AppSpinner.jsx';
53
63
  export { default as AppSplash } from './components/AppSplash.jsx';
54
64
  export { default as AppStatusBadge } from './components/AppStatusBadge.jsx';
@@ -57,9 +67,12 @@ export { default as AppSwitch } from './components/AppSwitch.jsx';
57
67
  export { default as AppTableEmptyState } from './components/AppTableEmptyState.jsx';
58
68
  export { default as AppTablePagination } from './components/AppTablePagination.jsx';
59
69
  export { default as AppTabs } from './components/AppTabs.jsx';
70
+ export { default as AppTagInput } from './components/AppTagInput.jsx';
60
71
  export { default as AppTextarea } from './components/AppTextarea.jsx';
61
72
  export { default as AppTimeline } from './components/AppTimeline.jsx';
73
+ export { default as AppTimePicker } from './components/AppTimePicker.jsx';
62
74
  export { default as AppToastContainer } from './components/AppToastContainer.jsx';
75
+ export { default as AppTooltip } from './components/AppTooltip.jsx';
63
76
  export { default as Icon, iconNames, registerIcons } from './components/Icon.jsx';
64
77
  export { MODAL_ICONS } from './components/ModalIcons.jsx';
65
78
  export { default as RequiredMark } from './components/RequiredMark.jsx';
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Compact picked-file row — image thumbnail or file-type icon + name/size + inline remove.
3
+ * Internal: shared by AppFileAttachment and AppFilePicker so the two fields cannot drift.
4
+ *
5
+ * @param {object} props
6
+ * @param {File|{ url?: string, name?: string }} props.item
7
+ * @param {boolean} props.isImage Whether to show a thumbnail (the caller owns the accept rules).
8
+ * @param {() => void} props.onRemove
9
+ * @param {string} [props.noun="attachment"] Fallback word in the remove button's label when the
10
+ * item has no name.
11
+ */
12
+ export default function FileItemRow({ item, isImage, onRemove, noun }: {
13
+ item: File | {
14
+ url?: string;
15
+ name?: string;
16
+ };
17
+ isImage: boolean;
18
+ onRemove: () => void;
19
+ noun?: string;
20
+ }): import("react").JSX.Element;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Shared file-item helpers for the two file fields (AppFileAttachment, AppFilePicker). Both
3
+ * render the same compact picked-file row over the same value shape — a freshly-picked `File`
4
+ * or an existing `{ url, name }` — so the key, name, size and blob-URL rules live once.
5
+ */
6
+ /** Stable-ish key for an item: name+size for a File, url/name for an existing value. */
7
+ export declare function keyOf(item: any): any;
8
+ export declare function nameOf(item: any): any;
9
+ /** `123 KB` for a freshly-picked File; null for an existing attachment (size unknown). */
10
+ export declare function sizeLabelOf(item: any): string;
11
+ /**
12
+ * A freshly-picked File has no URL of its own; mint one (for images) and revoke it on
13
+ * change/unmount. An existing attachment already carries `url`. Non-images get no URL — the
14
+ * caller renders a file-type icon instead.
15
+ */
16
+ export declare function useItemUrl(item: any, isImage: any): any;