@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,32 +1,18 @@
1
1
  import "@webority/ui-elements/elements/sortable";
2
- /**
3
- * A list whose items the person reorders: drag with a mouse or a finger (the list scrolls when
4
- * the pointer nears its edge), or with the keyboard (focus an item's handle, Space to lift,
5
- * arrow keys to move, Space to drop, Escape to cancel). Every move is announced to screen readers.
6
- * Thin wrapper over the shared `<wui-sortable>` element; the list is controlled, so `items`
7
- * is the truth and `onReorder` reports the new order.
8
- *
9
- * Lists that share a `group` accept each other's items by pointer drag. Each list then reports
10
- * its own new order, so the parent moves the item from one `items` array to the other.
11
- *
12
- * @param {object} props
13
- * @param {{ id: string, label: string, content?: import('react').ReactNode, disabled?: boolean }[]} props.items
14
- * `id` is what `onReorder` reports. `label` names the item to assistive tech (handle label and
15
- * announcements) and is the visible text unless `content` is given. A `disabled` item cannot
16
- * be picked up; other items can still move past it.
17
- * @param {(ids: string[], detail: object) => void} [props.onReorder] Called with this list's new
18
- * id order after a drop. `detail` is the element's event detail: `{ id, fromIndex, toIndex, from, to }`.
19
- * @param {string} props.ariaLabel Names the list for assistive tech; also used in announcements
20
- * when an item moves between lists.
21
- * @param {boolean} [props.handle=false] Drag only from the handle. Without it an item can also be
22
- * dragged from its body (links, buttons and inputs inside it keep working).
23
- * @param {string} [props.group] Name shared by lists that accept each other's items.
24
- * @param {string} [props.name] Form field name; posts the order as one hidden input per item.
25
- * @param {boolean} [props.disabled] No item can be picked up.
26
- * @param {'vertical'|'horizontal'} [props.orientation='vertical'] Direction the items run;
27
- * horizontal also covers a wrapping row.
28
- * @param {string} [props.className]
29
- * @param {import('react').Ref<HTMLElement>} [ref]
30
- */
31
- declare const AppSortableList: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppSortableList: import("react").ForwardRefExoticComponent<{
3
+ items: {
4
+ id: string;
5
+ label: string;
6
+ content?: import('react').ReactNode;
7
+ disabled?: boolean;
8
+ }[];
9
+ onReorder?: (ids: string[], detail: object) => void;
10
+ ariaLabel: string;
11
+ handle?: boolean;
12
+ group?: string;
13
+ name?: string;
14
+ disabled?: boolean;
15
+ orientation?: 'vertical' | 'horizontal';
16
+ className?: string;
17
+ } & import("react").RefAttributes<HTMLElement>>;
32
18
  export default AppSortableList;
@@ -1,22 +1,10 @@
1
- /**
2
- * Shared toggle switch — `.form-check .form-switch`, matching the Razor
3
- * <app-switch> exactly.
4
- *
5
- * `label` renders a real, associated <label>. It used to be passed as
6
- * `aria-label` only, so the switch had no visible text at all and the two
7
- * surfaces looked nothing alike.
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 {'round'|'pill'|'circle'} [props.shape] Track shape: `round` (default) is the sliding
16
- * pill with truly circular ends; `pill` is the same sliding pill with squircle ends;
17
- * `circle` is a compact round on/off button.
18
- * @param {string} [props.className]
19
- * @param {import('react').Ref<HTMLInputElement>} [ref]
20
- */
21
- declare const AppSwitch: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
1
+ declare const AppSwitch: import("react").ForwardRefExoticComponent<{
2
+ label?: import('react').ReactNode;
3
+ id?: string;
4
+ name?: string;
5
+ error?: string;
6
+ hint?: string;
7
+ shape?: 'round' | 'pill' | 'circle';
8
+ className?: string;
9
+ } & import("react").RefAttributes<HTMLInputElement>>;
22
10
  export default AppSwitch;
@@ -2,14 +2,15 @@
2
2
  * Empty ledger body for AppDataTable.
3
3
  *
4
4
  * @param {object} props
5
- * @param {string|import('react').ReactNode} props.icon Icon name, or a custom node.
5
+ * @param {string|import('react').ReactNode} [props.icon] Icon name, or a custom node. Needed unless
6
+ * `illustration` is set, which replaces the icon.
6
7
  * @param {string|import('react').ReactNode} [props.illustration] A named drawing ("no-results" | "no-data" | "empty-inbox" | "no-notifications" | "no-files" | "no-access" | "offline" | "error"), or your own decorative SVG node drawn unboxed at up to 120 px. Replaces the icon bubble when set.
7
8
  * @param {import('react').ReactNode} props.title
8
9
  * @param {import('react').ReactNode} [props.text]
9
10
  * @param {import('react').ReactNode} [props.action]
10
11
  */
11
12
  export default function AppTableEmptyState({ icon, illustration, title, text, action, ...rest }: {
12
- icon: string | import('react').ReactNode;
13
+ icon?: string | import('react').ReactNode;
13
14
  illustration?: string | import('react').ReactNode;
14
15
  title: import('react').ReactNode;
15
16
  text?: import('react').ReactNode;
@@ -1,28 +1,22 @@
1
1
  import "@webority/ui-elements/elements/taginput";
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>>;
2
+ declare const AppTagInput: import("react").ForwardRefExoticComponent<{
3
+ values?: string[];
4
+ onChange?: (values: string[]) => void;
5
+ placeholder?: string;
6
+ name?: string;
7
+ label?: import('react').ReactNode;
8
+ error?: string;
9
+ hint?: string;
10
+ required?: boolean;
11
+ size?: 'sm' | 'lg';
12
+ maxTags?: number;
13
+ allowDuplicates?: boolean;
14
+ disabled?: boolean;
15
+ id?: string;
16
+ ariaLabel?: string;
17
+ className?: string;
18
+ fieldClassName?: string;
19
+ help?: import('react').ReactNode;
20
+ helpLabel?: string;
21
+ } & import("react").RefAttributes<HTMLElement>>;
28
22
  export default AppTagInput;
@@ -1,25 +1,17 @@
1
- /**
2
- * The shared multi-line field — the textarea counterpart to AppInput. Wraps react-bootstrap
3
- * Form.Group / Form.Label / Form.Control (as="textarea"), keeping the `.field`/`.label`/
4
- * `.textarea` classes so the look is unchanged. Forwards `ref` for react-hook-form and
5
- * controlled use alike.
6
- *
7
- * @param {object} props
8
- * @param {import('react').ReactNode} [props.label]
9
- * @param {boolean} [props.required=false]
10
- * @param {string} [props.error]
11
- * @param {string} [props.hint]
12
- * @param {import('react').ReactNode} [props.help] Info-tip content node (decoupled from any glossary).
13
- * @param {string} [props.helpLabel="More information"] aria-label for the info-tip button.
14
- * @param {string} [props.id]
15
- * @param {string} [props.name]
16
- * @param {number} [props.rows=4]
17
- * @param {boolean} [props.autoGrow=false] Grow the height to fit the content as the user types.
18
- * @param {boolean} [props.showCount=false] Show a live `count / maxLength` under the field.
19
- * @param {number} [props.maxLength] Character cap; the count turns red as it is approached.
20
- * @param {string} [props.className]
21
- * @param {string} [props.fieldClassName]
22
- * @param {import('react').Ref<HTMLTextAreaElement>} [ref]
23
- */
24
- declare const AppTextarea: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
1
+ declare const AppTextarea: 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
+ id?: string;
9
+ name?: string;
10
+ rows?: number;
11
+ autoGrow?: boolean;
12
+ showCount?: boolean;
13
+ maxLength?: number;
14
+ className?: string;
15
+ fieldClassName?: string;
16
+ } & import("react").RefAttributes<HTMLTextAreaElement>>;
25
17
  export default AppTextarea;
@@ -1,36 +1,24 @@
1
1
  import "@webority/ui-elements/elements/timepicker";
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 {import('react').ReactNode} [props.help] Content for the label info-tip.
20
- * @param {string} [props.helpLabel="More information"] aria-label for the info-tip button.
21
- * @param {string} [props.name]
22
- * @param {string} [props.min] Time in "HH:mm" format
23
- * @param {string} [props.max] Time in "HH:mm" format
24
- * @param {number} [props.step=30] Step granularity in minutes
25
- * @param {'12'|'24'} [props.format='24'] Display format — 12 or 24 hour (wire stays 24h)
26
- * @param {string} [props.placeholder="Select time"]
27
- * @param {boolean} [props.disabled]
28
- * @param {'sm'|'md'|'lg'} [props.size] Control height tier, matching AppInput
29
- * @param {string} [props.id]
30
- * @param {string} [props.ariaLabel]
31
- * @param {string} [props.className] Class to apply to the control element.
32
- * @param {string} [props.fieldClassName] Class to apply to the wrapper field div.
33
- * @param {import('react').Ref<HTMLElement>} [ref]
34
- */
35
- declare const AppTimePicker: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppTimePicker: import("react").ForwardRefExoticComponent<{
3
+ value?: string;
4
+ onChange?: (value: string) => void;
5
+ label?: string;
6
+ required?: boolean;
7
+ hint?: string;
8
+ error?: string;
9
+ help?: import('react').ReactNode;
10
+ helpLabel?: string;
11
+ name?: string;
12
+ min?: string;
13
+ max?: string;
14
+ step?: number;
15
+ format?: '12' | '24';
16
+ placeholder?: string;
17
+ disabled?: boolean;
18
+ size?: 'sm' | 'md' | 'lg';
19
+ id?: string;
20
+ ariaLabel?: string;
21
+ className?: string;
22
+ fieldClassName?: string;
23
+ } & import("react").RefAttributes<HTMLElement>>;
36
24
  export default AppTimePicker;
@@ -1,57 +1,42 @@
1
1
  import "@webority/ui-elements/elements/tour";
2
- /**
3
- * A step-by-step product tour over the shared `<wui-tour>` element: the page is dimmed except
4
- * around the step's target, and a card holds the step text with Back, Next and Skip. Steps are
5
- * data, anchored to elements by CSS selector. A step whose target is missing or hidden is
6
- * dropped.
7
- *
8
- * Accessibility: focus moves into the card on open, stays there while the tour runs, and returns
9
- * to where it was on close; each step is announced; Escape skips the tour; the arrow keys move
10
- * between steps, except while focus is in a field. On a phone the card sits on the side of the
11
- * target with room and never covers it. After the last step a closing dialog says the tour is
12
- * done (`endDialog={false}` leaves it out); Escape there closes the tour as `finished`.
13
- *
14
- * Set `open` to run the tour and set it back to false from `onClose`. Pass a `seenStore` to
15
- * remember that a person has seen it: it is asked before showing and written when the tour
16
- * finishes or is skipped, with that outcome. `createLocalSeenStore()` (from
17
- * `@webority/ui-elements`) keeps that in the browser; a product that keeps it on its server
18
- * passes its own `{ isSeen, markSeen }`.
19
- *
20
- * The element also raises bubbling events a product can listen for on the ref:
21
- * `wui-tour:start` { total }, `wui-tour:step` { step, index, position, total } and
22
- * `wui-tour:close` { reason, index, position, total, via }, where `via` is `button` or `escape`
23
- * on a skip.
24
- *
25
- * @param {object} props
26
- * @param {boolean} props.open Runs the tour. Set it back to false from `onClose`.
27
- * @param {(reason: 'finished'|'skipped'|'alreadySeen'|'noTargets', details: { index: number|null, position: number|null, total: number|null }) => void} props.onClose
28
- * Called when the tour ends. `finished`: the person stepped past the last step; `skipped`: Skip
29
- * or Escape (both marked seen); `alreadySeen`: the store says it was seen, so nothing showed;
30
- * `noTargets`: no step had a visible target, so nothing showed (not marked seen). `details`
31
- * names the step the tour ended on: its `index` in `steps`, and its `position` (from 1) out of
32
- * `total`, counting only the steps that showed; all null for `alreadySeen` and `noTargets`.
33
- * @param {string} props.tourId Names the tour in the seen store.
34
- * @param {{ target: string, title?: string, description: string, media?: string, mediaAlt?: string, mediaPoster?: string, mediaType?: 'image'|'video', advanceOn?: 'click', actionLabel?: string }[]} props.steps
35
- * `target` is a CSS selector. `media` is the URL of an image or short loop shown above the
36
- * title, `mediaAlt` its text alternative, `mediaPoster` the still a loop shows under reduced
37
- * motion. `advanceOn: 'click'` moves the tour on when the person clicks the target, and the
38
- * card says what to click; `actionLabel` names the control in that sentence, in place of the
39
- * target's accessible name, which it falls back to.
40
- * @param {{ isSeen: (tourId: string) => Promise<boolean>, markSeen: (tourId: string, outcome: 'finished'|'skipped') => Promise<void> }} [props.seenStore]
41
- * Read through a ref, so an inline object does not restart a running tour.
42
- * @param {(step: object, index: number) => void | Promise<void>} [props.onBeforeStep] Runs before each step's target is looked up, awaited. Use it to open a menu or switch a tab so the target is visible.
43
- * @param {{ back?: string, next?: string, skip?: string, done?: string, progress?: string, advance?: string, mediaPause?: string, mediaPlay?: string, endTitle?: string, endMessage?: string, endButton?: string }} [props.labels]
44
- * Button text, defaults Back, Next, Skip, Done. `done` is the last step's button only with
45
- * `endDialog={false}`; while the closing dialog is on, the last step reads `next`, because the
46
- * dialog follows. `progress` is the step count template, default "Step {current} of {total}".
47
- * `advance` is a click-to-advance step's sentence, default "Click {actionName} to continue.",
48
- * where `{actionName}` is the step's `actionLabel` or else its target's accessible name.
49
- * `mediaPause` and `mediaPlay` name a step loop's pause button while it plays and while it is
50
- * paused, defaults "Pause animation" and "Play animation".
51
- * `endTitle`, `endMessage` and `endButton` are the closing dialog's text, defaults "You're all
52
- * set", a short friendly line, and "Done".
53
- * @param {boolean} [props.endDialog=true] Show the closing dialog after the last step.
54
- * @param {string} [props.className]
55
- */
56
- declare const AppTour: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppTour: import("react").ForwardRefExoticComponent<{
3
+ open: boolean;
4
+ onClose: (reason: 'finished' | 'skipped' | 'alreadySeen' | 'noTargets', details: {
5
+ index: number | null;
6
+ position: number | null;
7
+ total: number | null;
8
+ }) => void;
9
+ tourId: string;
10
+ steps: {
11
+ target: string;
12
+ title?: string;
13
+ description: string;
14
+ media?: string;
15
+ mediaAlt?: string;
16
+ mediaPoster?: string;
17
+ mediaType?: 'image' | 'video';
18
+ advanceOn?: 'click';
19
+ actionLabel?: string;
20
+ }[];
21
+ seenStore?: {
22
+ isSeen: (tourId: string) => Promise<boolean>;
23
+ markSeen: (tourId: string, outcome: 'finished' | 'skipped') => Promise<void>;
24
+ };
25
+ onBeforeStep?: (step: object, index: number) => void | Promise<void>;
26
+ labels?: {
27
+ back?: string;
28
+ next?: string;
29
+ skip?: string;
30
+ done?: string;
31
+ progress?: string;
32
+ advance?: string;
33
+ mediaPause?: string;
34
+ mediaPlay?: string;
35
+ endTitle?: string;
36
+ endMessage?: string;
37
+ endButton?: string;
38
+ };
39
+ endDialog?: boolean;
40
+ className?: string;
41
+ } & import("react").RefAttributes<any>>;
57
42
  export default AppTour;
@@ -1,44 +1,33 @@
1
1
  import "@webority/ui-elements/elements/tree";
2
- /**
3
- * Thin React wrapper over the shared `<wui-tree>` element: a hierarchy in the WAI-ARIA tree
4
- * pattern (arrow keys, Home/End, typeahead, Enter), with icons and badges, lazy children and an
5
- * optional single or checkbox selection. The Razor `<app-tree-view>` renders the same element.
6
- *
7
- * `nodes` is `{ id, label, icon?, badge?, badgeTone?, children?, hasChildren?, expanded?,
8
- * checked?, disabled? }[]`. `icon` is a library icon name and `badgeTone` an AppBadge tone. Ids are
9
- * strings, unique across the whole tree. `children: []` is a leaf; `hasChildren: true` with no
10
- * `children` is a node whose children are fetched the first time it opens, through `loadChildren`
11
- * (or `loadUrl`). Labels are plain text. The tree keeps what the user opened and what it
12
- * fetched when `nodes` is replaced with the same ids.
13
- *
14
- * Selection: `single` marks one row selected; `multiple` shows a tri-state checkbox per node (a
15
- * parent is checked, unchecked or mixed from its children, and checking it checks every loaded
16
- * child). `checked` is controlled by the ids it lists, parents included.
17
- *
18
- * @param {object} props
19
- * @param {{ id: string, label: string, icon?: string, badge?: string,
20
- * badgeTone?: 'neutral'|'primary'|'success'|'warning'|'danger'|'info', children?: object[],
21
- * hasChildren?: boolean, expanded?: boolean, checked?: boolean, disabled?: boolean }[]} props.nodes
22
- * @param {'none'|'single'|'multiple'} [props.selection='none']
23
- * @param {string|null} [props.selected] Selected id (single mode, controlled: the tree shows this id
24
- * whatever the user clicks until you change it; `null` selects nothing, and dropping the prop clears it).
25
- * @param {(id: string, node: object) => void} [props.onSelect] A row was activated: clicked, or
26
- * Enter / Space on it. `node` is the object you passed in.
27
- * @param {string[]} [props.checked] Checked ids (multiple mode, controlled).
28
- * @param {(ids: string[], detail: { id: string, checked: boolean }) => void} [props.onCheck] A
29
- * check was toggled; `ids` is every checked id.
30
- * @param {(node: object) => Promise<object[]>} [props.loadChildren] Fetches a lazy node's children.
31
- * @param {string} [props.loadUrl] Children endpoint used when `loadChildren` is not set: a GET with
32
- * `parentId=<id>` added, answering a JSON array of nodes.
33
- * @param {(id: string, message: string) => void} [props.onLoadError] Children could not be loaded.
34
- * @param {string} [props.name] Form field name: `multiple` posts one value per checked id, `single`
35
- * the selected id.
36
- * @param {string} [props.loadingText='Loading'] Announced while children load.
37
- * @param {string} [props.errorText='Could not load. Try again.'] Announced when they fail.
38
- * @param {string} [props.ariaLabel] Accessible name of the tree.
39
- * @param {string} [props.id]
40
- * @param {string} [props.className]
41
- * @param {import('react').Ref<HTMLElement>} [ref]
42
- */
43
- declare const AppTreeView: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppTreeView: import("react").ForwardRefExoticComponent<{
3
+ nodes: {
4
+ id: string;
5
+ label: string;
6
+ icon?: string;
7
+ badge?: string;
8
+ badgeTone?: 'neutral' | 'primary' | 'success' | 'warning' | 'danger' | 'info';
9
+ children?: object[];
10
+ hasChildren?: boolean;
11
+ expanded?: boolean;
12
+ checked?: boolean;
13
+ disabled?: boolean;
14
+ }[];
15
+ selection?: 'none' | 'single' | 'multiple';
16
+ selected?: string | null;
17
+ onSelect?: (id: string, node: object) => void;
18
+ checked?: string[];
19
+ onCheck?: (ids: string[], detail: {
20
+ id: string;
21
+ checked: boolean;
22
+ }) => void;
23
+ loadChildren?: (node: object) => Promise<object[]>;
24
+ loadUrl?: string;
25
+ onLoadError?: (id: string, message: string) => void;
26
+ name?: string;
27
+ loadingText?: string;
28
+ errorText?: string;
29
+ ariaLabel?: string;
30
+ id?: string;
31
+ className?: string;
32
+ } & import("react").RefAttributes<HTMLElement>>;
44
33
  export default AppTreeView;
@@ -1,48 +1,50 @@
1
1
  import "@webority/ui-elements/elements/wizard";
2
- /**
3
- * A multi-step flow over the shared `<wui-wizard>` element — a stepper progress
4
- * header, one visible step panel at a time, and a sticky Back / Skip / Next / Finish
5
- * footer. Give it `steps` metadata and one panel per step as children (in order).
6
- *
7
- * Uncontrolled by default (it owns the current step); pass `active` + `onStepChange`
8
- * to drive it. `beforeNext` gates advancing and finishing: return `false` (or a rejecting
9
- * promise) to block Next, or Finish on the last step, e.g. until a form validates. An
10
- * `optional` step shows the Skip button.
11
- *
12
- * @param {object} props
13
- * @param {{ key?: string, label: string, description?: string, optional?: boolean, icon?: string, status?: 'done'|'active'|'pending'|'error' }[]} props.steps
14
- * @param {import('react').ReactNode} props.children One panel per step, in step order.
15
- * @param {number} [props.active] Controlled current-step index (with `onStepChange`).
16
- * @param {number} [props.defaultActive=0] Initial step when uncontrolled.
17
- * @param {(index: number, detail: { previous: number, reason: 'next'|'back'|'skip'|'step'|'set' }) => void} [props.onStepChange]
18
- * @param {(detail: { index: number }) => void} [props.onFinish] Fired when Finish is pressed on the last step.
19
- * @param {(index: number) => void} [props.onSkip] Fired when an optional step is skipped.
20
- * @param {(index: number) => boolean | Promise<boolean>} [props.beforeNext] Validation gate run before advancing on Next and before Finish on the last step. Return false (or a rejecting promise) to block; the blocked step turns red.
21
- * @param {(index: number) => void} [props.onInvalid] Fired when advancing is blocked by beforeNext (the step is marked invalid).
22
- * @param {'steps'|'journey'|'icons'|'tiles'} [props.variant='steps'] Stepper header style — compact circles, the wide journey bar, large connected icon badges with a "STEP n" eyebrow, or a row of tiles (icon square, label and a Done / Current / To do line).
23
- * @param {'primary'|'success'|'warning'|'danger'|'info'} [props.tone] Recolour the whole stepper accent (active fill, done rail, ring, done tint) to a semantic ramp. Unset keeps the variant's default (primary for steps/journey, success/green for icons). For any other colour, override the `--wui-step-accent` / `--wui-step-soft` CSS variables via `style` or a `className` instead.
24
- * @param {'primary'|'success'|'warning'|'danger'|'info'} [props.doneTone] Recolour completed steps only (their badge, "STEP n" eyebrow and the filled line after them) to a semantic ramp; the current step keeps the `tone` accent. Unset, completed steps follow `tone`. For any other colour, override the `--wui-step-done-accent` / `--wui-step-done-soft` CSS variables via `style` or a `className` instead.
25
- * @param {'horizontal'|'vertical'} [props.orientation='horizontal']
26
- * @param {'center'|'start'} [props.align='center'] Where each step's badge, label and description sit in its column on a horizontal stepper: centred, or at the start with the line running from badge to badge. Applies to the steps and icons variants; journey, tiles and vertical steps are start-aligned already.
27
- * @param {'linear'|'outline'|'bold'|'bulk'|'broken'|'twotone'} [props.iconVariant='linear'] The iconsax style of
28
- * every header glyph: the done tick, the error alert, the skipped dash and each step's own `icon`.
29
- * @param {'sm'|'md'|'lg'} [props.size='md'] Scales the stepper header: the badge, its number, the labels and the glyphs.
30
- * @param {number} [props.iconSize] Every header glyph's width and height in px. Unset, it follows `size` (14, 16 or 20).
31
- * @param {boolean} [props.skippable=false] Show a Skip button on every step (bar the last), without needing per-step `optional`. A per-step `optional` still works on its own.
32
- * @param {boolean} [props.nonLinear=false] Allow jumping to any step, not only completed ones.
33
- * @param {boolean} [props.hideStepper=false] Hide the progress header.
34
- * @param {boolean} [props.hideConnectors=false] Drop the line joining the steps, on every variant and orientation. Lines show by default.
35
- * @param {boolean} [props.disabled=false] Disable all navigation.
36
- * @param {string} [props.label='Progress'] Accessible name for the stepper.
37
- * @param {string} [props.backLabel='Back']
38
- * @param {string} [props.nextLabel='Next']
39
- * @param {string} [props.skipLabel='Skip']
40
- * @param {string} [props.finishLabel='Finish']
41
- * @param {boolean} [props.topBar=false] Show a 56px bar above the stepper with `barTitle`, "Step N of M" and a close button.
42
- * @param {string} [props.barTitle] The title at the start of the top bar.
43
- * @param {string} [props.closeLabel='Close'] Accessible name of the top bar's close button.
44
- * @param {(detail: { index: number }) => void} [props.onClose] Fired when the top bar's close button is pressed. The wizard does not close itself.
45
- * @param {string} [props.className]
46
- */
47
- declare const AppWizard: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
2
+ declare const AppWizard: import("react").ForwardRefExoticComponent<{
3
+ steps: {
4
+ key?: string;
5
+ label: string;
6
+ description?: string;
7
+ optional?: boolean;
8
+ icon?: string;
9
+ status?: 'done' | 'active' | 'pending' | 'error';
10
+ }[];
11
+ children: import('react').ReactNode;
12
+ active?: number;
13
+ defaultActive?: number;
14
+ onStepChange?: (index: number, detail: {
15
+ previous: number;
16
+ reason: 'next' | 'back' | 'skip' | 'step' | 'set';
17
+ }) => void;
18
+ onFinish?: (detail: {
19
+ index: number;
20
+ }) => void;
21
+ onSkip?: (index: number) => void;
22
+ beforeNext?: (index: number) => boolean | Promise<boolean>;
23
+ onInvalid?: (index: number) => void;
24
+ variant?: 'steps' | 'journey' | 'icons' | 'tiles';
25
+ tone?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
26
+ doneTone?: 'primary' | 'success' | 'warning' | 'danger' | 'info';
27
+ orientation?: 'horizontal' | 'vertical';
28
+ align?: 'center' | 'start';
29
+ iconVariant?: 'linear' | 'outline' | 'bold' | 'bulk' | 'broken' | 'twotone';
30
+ size?: 'sm' | 'md' | 'lg';
31
+ iconSize?: number;
32
+ skippable?: boolean;
33
+ nonLinear?: boolean;
34
+ hideStepper?: boolean;
35
+ hideConnectors?: boolean;
36
+ disabled?: boolean;
37
+ label?: string;
38
+ backLabel?: string;
39
+ nextLabel?: string;
40
+ skipLabel?: string;
41
+ finishLabel?: string;
42
+ topBar?: boolean;
43
+ barTitle?: string;
44
+ closeLabel?: string;
45
+ onClose?: (detail: {
46
+ index: number;
47
+ }) => void;
48
+ className?: string;
49
+ } & import("react").RefAttributes<any>>;
48
50
  export default AppWizard;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webority/ui-react",
3
- "version": "0.80.3",
3
+ "version": "0.80.4",
4
4
  "description": "Webority shared React component library — App* primitives on react-bootstrap + the @webority/theme design system.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "type": "module",
@@ -27,8 +27,8 @@
27
27
  },
28
28
  "sideEffects": false,
29
29
  "dependencies": {
30
- "@webority/theme": "0.80.3",
31
- "@webority/ui-elements": "0.80.3"
30
+ "@webority/theme": "0.80.4",
31
+ "@webority/ui-elements": "0.80.4"
32
32
  },
33
33
  "peerDependencies": {
34
34
  "@webority/analytics": "^0.25.0",