@webority/ui-react 0.7.8 → 0.7.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/types/components/AppAlert.d.ts +6 -2
- package/dist/types/components/AppPopover.d.ts +8 -4
- package/dist/types/components/AppSwitch.d.ts +2 -0
- package/dist/types/components/AppWizard.d.ts +35 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/lib/CheckField.d.ts +6 -0
- package/dist/types/lib/emptyValue.d.ts +13 -0
- package/dist/ui-react.js +1920 -1705
- package/package.json +3 -3
|
@@ -5,15 +5,19 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @param {object} props
|
|
7
7
|
* @param {"info"|"success"|"warning"|"danger"} [props.variant="info"]
|
|
8
|
-
* @param {import('react').ReactNode} props.children
|
|
8
|
+
* @param {import('react').ReactNode} props.children The alert body.
|
|
9
|
+
* @param {import('react').ReactNode} [props.title] A bold heading line above the body (`.alert-heading`).
|
|
10
|
+
* @param {string|import('react').ReactNode} [props.icon] A leading glyph — a Bootstrap Icons name or a node.
|
|
9
11
|
* @param {string} [props.className]
|
|
10
12
|
* @param {() => void} [props.onClose] Called when dismissed
|
|
11
13
|
* @param {boolean} [props.dismissible] Show the close button (defaults to true when onClose is set)
|
|
12
14
|
* @param {"alert"|"status"} [props.role="alert"] Use "status" for non-assertive notices
|
|
13
15
|
*/
|
|
14
|
-
export default function AppAlert({ variant, children, className, onClose, dismissible, role, ...rest }: {
|
|
16
|
+
export default function AppAlert({ variant, children, title, icon, className, onClose, dismissible, role, ...rest }: {
|
|
15
17
|
variant?: "info" | "success" | "warning" | "danger";
|
|
16
18
|
children: import('react').ReactNode;
|
|
19
|
+
title?: import('react').ReactNode;
|
|
20
|
+
icon?: string | import('react').ReactNode;
|
|
17
21
|
className?: string;
|
|
18
22
|
onClose?: () => void;
|
|
19
23
|
dismissible?: boolean;
|
|
@@ -8,19 +8,23 @@
|
|
|
8
8
|
* @param {object} props
|
|
9
9
|
* @param {import('react').ReactElement} props.trigger The anchor element the panel opens from.
|
|
10
10
|
* Must be a single element that forwards a ref (a DOM element, or a react-bootstrap-based
|
|
11
|
-
* App* like AppButton/ActionIcon). It renders as written; clicking
|
|
11
|
+
* App* like AppButton/ActionIcon). It renders as written; clicking (or hovering/focusing) it
|
|
12
|
+
* toggles the panel.
|
|
12
13
|
* @param {import('react').ReactNode} props.children The panel body.
|
|
13
14
|
* @param {string} [props.title] Optional panel heading.
|
|
14
15
|
* @param {'top'|'bottom'|'start'|'end'|'auto'} [props.placement='bottom'] Where it opens; `auto`
|
|
15
16
|
* flips to stay in view.
|
|
16
|
-
* @param {'click'|'hover'|'focus'} [props.triggerType='click'] What
|
|
17
|
+
* @param {'click'|'hover'|'focus'|('click'|'hover'|'focus')[]} [props.triggerType='click'] What
|
|
18
|
+
* opens it; pass an array for multiple (e.g. ['hover', 'focus']).
|
|
19
|
+
* @param {(show: boolean) => void} [props.onToggle] Callback fired when the panel opens/closes.
|
|
17
20
|
* @param {string} [props.className] Class on the popover panel.
|
|
18
21
|
*/
|
|
19
|
-
export default function AppPopover({ trigger, children, title, placement, triggerType, className, ...rest }: {
|
|
22
|
+
export default function AppPopover({ trigger, children, title, placement, triggerType, onToggle, className, ...rest }: {
|
|
20
23
|
trigger: import('react').ReactElement;
|
|
21
24
|
children: import('react').ReactNode;
|
|
22
25
|
title?: string;
|
|
23
26
|
placement?: 'top' | 'bottom' | 'start' | 'end' | 'auto';
|
|
24
|
-
triggerType?: 'click' | 'hover' | 'focus';
|
|
27
|
+
triggerType?: 'click' | 'hover' | 'focus' | ('click' | 'hover' | 'focus')[];
|
|
28
|
+
onToggle?: (show: boolean) => void;
|
|
25
29
|
className?: string;
|
|
26
30
|
}): import("react").JSX.Element;
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
* @param {string} [props.name]
|
|
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
|
+
* @param {'pill'|'circle'} [props.shape] Track shape — `pill` (default) is the sliding
|
|
16
|
+
* pill; `circle` is a compact round on/off button.
|
|
15
17
|
* @param {string} [props.className]
|
|
16
18
|
* @param {import('react').Ref<HTMLInputElement>} [ref]
|
|
17
19
|
*/
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import '@webority/ui-elements';
|
|
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 — return `false` (or a rejecting promise)
|
|
9
|
+
* to block Next, e.g. until a form validates. An `optional` step shows the Skip button.
|
|
10
|
+
*
|
|
11
|
+
* @param {object} props
|
|
12
|
+
* @param {{ key?: string, label: string, description?: string, optional?: boolean, icon?: string, status?: 'done'|'active'|'pending'|'error' }[]} props.steps
|
|
13
|
+
* @param {import('react').ReactNode} props.children One panel per step, in step order.
|
|
14
|
+
* @param {number} [props.active] Controlled current-step index (with `onStepChange`).
|
|
15
|
+
* @param {number} [props.defaultActive=0] Initial step when uncontrolled.
|
|
16
|
+
* @param {(index: number, detail: { previous: number, reason: 'next'|'back'|'skip'|'step'|'set' }) => void} [props.onStepChange]
|
|
17
|
+
* @param {(detail: { index: number }) => void} [props.onFinish] Fired when Finish is pressed on the last step.
|
|
18
|
+
* @param {(index: number) => void} [props.onSkip] Fired when an optional step is skipped.
|
|
19
|
+
* @param {(index: number) => boolean | Promise<boolean>} [props.beforeNext] Validation gate run before advancing on Next — return false (or a rejecting promise) to block; the blocked step turns red.
|
|
20
|
+
* @param {(index: number) => void} [props.onInvalid] Fired when advancing is blocked by beforeNext (the step is marked invalid).
|
|
21
|
+
* @param {'steps'|'journey'|'icons'} [props.variant='steps'] Stepper header style — compact circles, the wide journey bar, or large connected icon badges with a "STEP n" eyebrow.
|
|
22
|
+
* @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.
|
|
23
|
+
* @param {'horizontal'|'vertical'} [props.orientation='horizontal']
|
|
24
|
+
* @param {boolean} [props.nonLinear=false] Allow jumping to any step, not only completed ones.
|
|
25
|
+
* @param {boolean} [props.hideStepper=false] Hide the progress header.
|
|
26
|
+
* @param {boolean} [props.disabled=false] Disable all navigation.
|
|
27
|
+
* @param {string} [props.label='Progress'] Accessible name for the stepper.
|
|
28
|
+
* @param {string} [props.backLabel='Back']
|
|
29
|
+
* @param {string} [props.nextLabel='Next']
|
|
30
|
+
* @param {string} [props.skipLabel='Skip']
|
|
31
|
+
* @param {string} [props.finishLabel='Finish']
|
|
32
|
+
* @param {string} [props.className]
|
|
33
|
+
*/
|
|
34
|
+
declare const AppWizard: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
35
|
+
export default AppWizard;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -73,6 +73,7 @@ export { default as AppTimeline } from './components/AppTimeline.jsx';
|
|
|
73
73
|
export { default as AppTimePicker } from './components/AppTimePicker.jsx';
|
|
74
74
|
export { default as AppToast, default as AppToastContainer } from './components/AppToast.jsx';
|
|
75
75
|
export { default as AppTooltip } from './components/AppTooltip.jsx';
|
|
76
|
+
export { default as AppWizard } from './components/AppWizard.jsx';
|
|
76
77
|
export { default as AppWorkspaceSwitcher } from './components/AppWorkspaceSwitcher.jsx';
|
|
77
78
|
export { default as Icon, iconNames, registerIcons } from './components/Icon.jsx';
|
|
78
79
|
export { MODAL_ICONS } from './components/ModalIcons.jsx';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Check if a value is considered empty (null, undefined, or empty string).
|
|
3
|
+
* @param {*} value
|
|
4
|
+
* @returns {boolean}
|
|
5
|
+
*/
|
|
6
|
+
export declare function isEmpty(value: any): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Get the display value for a potentially empty field.
|
|
9
|
+
* Returns an em-dash for empty values, otherwise returns the value as-is.
|
|
10
|
+
* @param {*} value
|
|
11
|
+
* @returns {string|*}
|
|
12
|
+
*/
|
|
13
|
+
export declare function emptyValue(value: any): string | any;
|