@webority/ui-react 0.164.0 → 0.165.0
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/LICENSE +1 -1
- package/dist/canvas-kit/kit.js +206 -206
- package/dist/canvas-kit/manifest.json +1086 -406
- package/dist/canvas-kit/release.json +6 -6
- package/dist/components/AppAsyncBlock.js +1 -1
- package/dist/components/AppColorField.js +1 -1
- package/dist/components/AppDataTable.js +1 -1
- package/dist/components/AppDatePicker.js +1 -1
- package/dist/components/AppDateRangePicker.js +1 -1
- package/dist/components/AppDescriptions.js +1 -1
- package/dist/components/AppDropZone.js +1 -1
- package/dist/components/AppDropdown.js +1 -1
- package/dist/components/AppEntryGrid.js +1 -0
- package/dist/components/AppFileAttachment.js +1 -1
- package/dist/components/AppFilePicker.js +1 -1
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppForm.js +1 -1
- package/dist/components/AppFormulaSteps.js +1 -0
- package/dist/components/AppImagePicker.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppMentionInput.js +1 -1
- package/dist/components/AppMetricStrip.js +1 -1
- package/dist/components/AppModal.js +1 -1
- package/dist/components/AppNumberInput.js +1 -1
- package/dist/components/AppOtpInput.js +1 -1
- package/dist/components/AppPhoneNumberInput.js +1 -1
- package/dist/components/AppPopover.js +1 -1
- package/dist/components/AppRadioGroup.js +1 -1
- package/dist/components/AppRating.js +1 -1
- package/dist/components/AppRichText.js +1 -1
- package/dist/components/AppRowActions.js +1 -0
- package/dist/components/AppScoreScale.js +1 -1
- package/dist/components/AppSectionFeatures.js +1 -1
- package/dist/components/AppSectionLogos.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppShell.js +1 -1
- package/dist/components/AppSlider.js +1 -1
- package/dist/components/AppTextarea.js +1 -1
- package/dist/components/AppTimePicker.js +1 -1
- package/dist/components/AppToast.js +1 -1
- package/dist/guidance.json +212 -137
- package/dist/hookForm/index.js +1 -0
- package/dist/lib/CheckField.js +1 -1
- package/dist/lib/formFields.js +1 -0
- package/dist/lib/unsavedText.js +1 -0
- package/dist/types/components/AppAsyncBlock.d.ts +3 -3
- package/dist/types/components/AppChart.d.ts +12 -4
- package/dist/types/components/AppDataTable.d.ts +29 -2
- package/dist/types/components/AppDateRangePicker.d.ts +4 -0
- package/dist/types/components/AppDescriptions.d.ts +6 -0
- package/dist/types/components/AppEntryGrid.d.ts +122 -0
- package/dist/types/components/AppFilterBar.d.ts +12 -1
- package/dist/types/components/AppForm.d.ts +18 -0
- package/dist/types/components/AppFormulaSteps.d.ts +64 -0
- package/dist/types/components/AppMetricStrip.d.ts +5 -0
- package/dist/types/components/AppModal.d.ts +5 -0
- package/dist/types/components/AppRowActions.d.ts +40 -0
- package/dist/types/components/AppSectionFeatures.d.ts +5 -1
- package/dist/types/components/AppSectionLogos.d.ts +1 -0
- package/dist/types/components/AppShell.d.ts +2 -0
- package/dist/types/components/AppSlider.d.ts +5 -0
- package/dist/types/components/AppToast.d.ts +5 -0
- package/dist/types/hookForm/index.d.ts +14 -0
- package/dist/types/index.d.ts +7 -5
- package/dist/types/lib/formFields.d.ts +12 -0
- package/dist/types/lib/unsavedText.d.ts +5 -0
- package/dist/ui-react.js +1 -1
- package/dist/web-core/dist/errors/extractApiError.js +2 -0
- package/dist/web-core/dist/errors/requestPlatform.js +1 -0
- package/package.json +20 -9
- package/dist/components/AppResizable.js +0 -1
- package/dist/components/AppResizableHandle.js +0 -1
- package/dist/components/AppResizablePanel.js +0 -1
- package/dist/components/AppRollingNumber.js +0 -1
- package/dist/components/AppRowSwitch.js +0 -1
- package/dist/types/components/AppResizable.d.ts +0 -37
- package/dist/types/components/AppResizableHandle.d.ts +0 -14
- package/dist/types/components/AppResizablePanel.d.ts +0 -14
- package/dist/types/components/AppRollingNumber.d.ts +0 -30
- package/dist/types/components/AppRowSwitch.d.ts +0 -18
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import e from"../lib/useElementEntry.js";import{splitMarkerProps as t}from"../lib/wuiMarker.js";import n from"./assertValidValue.js";import r from"./warnUnknownProps.js";import{MONEY_UNITS as i,formatValue as a}from"@webority/ui-elements/helpers";import{jsx as o,jsxs as s}from"react/jsx-runtime";var c=[`number`,`currency`,`percent`],l=()=>import(`@webority/ui-elements/elements/rolling-number`);function u(u){e(`wui-rolling-number`,l);let{marker:d,props:f}=t(`AppRollingNumber`,u),{value:p,format:m=`number`,unit:h,decimals:g,duration:_,className:v=``,...y}=f;r(`AppRollingNumber`,y),n(`AppRollingNumber`,`format`,m,c),n(`AppRollingNumber`,`unit`,h,i);let b=typeof p==`string`&&p.trim()!==``?Number(p):p,x=typeof b==`number`&&Number.isFinite(b),S=a(x?b:null,{style:m,unit:h,decimals:g});return/* @__PURE__ */ s(`wui-rolling-number`,{class:[`wui-rolling-number`,v].filter(Boolean).join(` `),value:x?String(b):void 0,format:m,unit:h,decimals:g===void 0?void 0:String(g),duration:_===void 0?void 0:String(_),...d,...y,children:[/* @__PURE__ */ o(`span`,{className:`wui-rolling-number-text`,children:S}),/* @__PURE__ */ o(`span`,{className:`wui-rolling-number-roll`,"aria-hidden":`true`})]})}export{u as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{splitMarkerProps as e}from"../lib/wuiMarker.js";import{useState as t}from"react";import{jsx as n}from"react/jsx-runtime";function r(r){let{marker:i,props:a}=e(`AppRowSwitch`,r),{checked:o,label:s,disabled:c=!1,onToggle:l}=a,[u,d]=t(!1),f=async()=>{d(!0);try{await l(!o)}finally{d(!1)}};return/* @__PURE__ */ n(`button`,{type:`button`,role:`switch`,"aria-checked":o?`true`:`false`,"aria-label":s,"aria-busy":u?`true`:void 0,...i,className:`wui-row-switch`,disabled:c||u,onClick:f,children:/* @__PURE__ */ n(`span`,{className:`wui-row-switch__track`,children:/* @__PURE__ */ n(`span`,{className:`wui-row-switch__thumb`})})})}export{r as default};
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { type Context, type CSSProperties, type JSX, type ReactNode } from "react";
|
|
2
|
-
type ResizableDirectionValue = "horizontal" | "vertical";
|
|
3
|
-
export declare const ResizableDirection: Context<ResizableDirectionValue>;
|
|
4
|
-
/**
|
|
5
|
-
* A group of panels the person resizes: drag a handle with a mouse, pen or finger, or focus it and
|
|
6
|
-
* press the arrow keys (5%, Shift 20%), Home and End (the panel before it to its minimum or maximum),
|
|
7
|
-
* or double click to restore the default sizes. Put an `AppResizableHandle` between each pair of
|
|
8
|
-
* `AppResizablePanel`s: a reading pane beside a list, an editor above its preview, two sides of a compare.
|
|
9
|
-
*
|
|
10
|
-
* Sizes are percentages of the room the panels share and always add up to 100; a panel without a
|
|
11
|
-
* `defaultSize` shares what the sized ones leave. With `storageKey` the layout is remembered per
|
|
12
|
-
* screen in the browser; a stored layout that no longer fits the panels is ignored. A vertical group
|
|
13
|
-
* stacks its panels and needs a height: set `--wui-resizable-height` through `style`, or give its
|
|
14
|
-
* parent one. Wraps `<wui-resizable>`, which Razor `<app-resizable>` renders too.
|
|
15
|
-
*/
|
|
16
|
-
export interface AppResizableProps {
|
|
17
|
-
/**
|
|
18
|
-
* Horizontal puts the panels side by side, vertical stacks them. A vertical group needs a height from its parent.
|
|
19
|
-
* @default "horizontal"
|
|
20
|
-
*/
|
|
21
|
-
direction?: ResizableDirectionValue | undefined;
|
|
22
|
-
/** Remember the sizes under this name, one per screen. */
|
|
23
|
-
storageKey?: string | undefined;
|
|
24
|
-
/** Called with every panel's size in percent after a drag, key press or reset that changed the layout, not while a drag is still moving. */
|
|
25
|
-
onChange?: ((sizes: number[]) => void) | undefined;
|
|
26
|
-
/** `AppResizablePanel`s with an `AppResizableHandle` between each pair. */
|
|
27
|
-
children?: ReactNode | undefined;
|
|
28
|
-
/**
|
|
29
|
-
* Extra classes on the group.
|
|
30
|
-
* @default ""
|
|
31
|
-
*/
|
|
32
|
-
className?: string | undefined;
|
|
33
|
-
/** Inline style on the group; a vertical group takes its height as --wui-resizable-height. */
|
|
34
|
-
style?: CSSProperties | undefined;
|
|
35
|
-
}
|
|
36
|
-
export default function AppResizable(props: AppResizableProps): JSX.Element;
|
|
37
|
-
export {};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { type ComponentPropsWithoutRef, type JSX } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* The draggable divider between two `AppResizablePanel`s. It is a keyboard-focusable separator
|
|
4
|
-
* (arrow keys, Home, End) that resizes the panel before it against the panel after it; its current
|
|
5
|
-
* size and limits are announced to assistive technology.
|
|
6
|
-
*/
|
|
7
|
-
export interface AppResizableHandleProps extends ComponentPropsWithoutRef<"div"> {
|
|
8
|
-
/**
|
|
9
|
-
* Its accessible name. Say what it resizes, such as "Resize the list".
|
|
10
|
-
* @default "Resize panels"
|
|
11
|
-
*/
|
|
12
|
-
label?: string | undefined;
|
|
13
|
-
}
|
|
14
|
-
export default function AppResizableHandle(props: AppResizableHandleProps): JSX.Element;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { ComponentPropsWithoutRef, JSX } from "react";
|
|
2
|
-
/**
|
|
3
|
-
* One panel of an `AppResizable` group. Its content scrolls inside it. Sizes are percentages of the
|
|
4
|
-
* room the panels share.
|
|
5
|
-
*/
|
|
6
|
-
export interface AppResizablePanelProps extends ComponentPropsWithoutRef<"div"> {
|
|
7
|
-
/** The starting size in percent. Panels without one share what the sized ones leave. */
|
|
8
|
-
defaultSize?: number | undefined;
|
|
9
|
-
/** The smallest the person can make it, in percent. 10 when not set. */
|
|
10
|
-
minSize?: number | undefined;
|
|
11
|
-
/** The largest the person can make it, in percent. 100 when not set. */
|
|
12
|
-
maxSize?: number | undefined;
|
|
13
|
-
}
|
|
14
|
-
export default function AppResizablePanel(props: AppResizablePanelProps): JSX.Element;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import type { HTMLAttributes, JSX } from "react";
|
|
2
|
-
export interface AppRollingNumberProps extends Omit<HTMLAttributes<HTMLElement>, "className"> {
|
|
3
|
-
/** The figure. Without a number it shows a hyphen. */
|
|
4
|
-
value?: number | string | undefined;
|
|
5
|
-
/**
|
|
6
|
-
* How the figure is written. `currency` is rupees (₹12,55,015); `percent` takes a ratio (0.125 is 12.5%).
|
|
7
|
-
* @default "number"
|
|
8
|
-
*/
|
|
9
|
-
format?: "number" | "currency" | "percent" | undefined;
|
|
10
|
-
/** What `value` counts, for `currency`. Rupees are used when it is left out. */
|
|
11
|
-
unit?: "rupees" | "paise" | undefined;
|
|
12
|
-
/** Fraction digits: fixed for `currency` (default 0), the most shown for `number` (default 2) and `percent` (default 1). */
|
|
13
|
-
decimals?: number | undefined;
|
|
14
|
-
/** How long the roll takes, in milliseconds. It is 600 when left out. */
|
|
15
|
-
duration?: number | undefined;
|
|
16
|
-
/**
|
|
17
|
-
* Extra classes on the figure.
|
|
18
|
-
* @default ""
|
|
19
|
-
*/
|
|
20
|
-
className?: string | undefined;
|
|
21
|
-
}
|
|
22
|
-
/**
|
|
23
|
-
* A figure that rolls its digits to the new value when it changes, instead of jumping: a total, a
|
|
24
|
-
* count, a cart amount. Indian digit grouping and the rupee sign come from the shared formatters,
|
|
25
|
-
* and the symbols stay still while the digits move. A screen reader reads the final value as plain
|
|
26
|
-
* text, once; the rolling digits are hidden from it. Under reduced motion the figure just changes.
|
|
27
|
-
* The first value never animates. Wraps `<wui-rolling-number>`, which Razor `<app-rolling-number>`
|
|
28
|
-
* renders too.
|
|
29
|
-
*/
|
|
30
|
-
export default function AppRollingNumber(props: AppRollingNumberProps): JSX.Element;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* On/off switch for a table row. The caller owns `checked` and posts the change
|
|
3
|
-
* itself: `onToggle(next)` returns a promise, and the switch stays disabled and
|
|
4
|
-
* busy until it settles. Razor counterpart: `<app-row-switch>`.
|
|
5
|
-
*/
|
|
6
|
-
export interface AppRowSwitchProps {
|
|
7
|
-
/** The on or off state the row shows. onToggle receives the next state; the caller owns this value. */
|
|
8
|
-
checked: boolean;
|
|
9
|
-
/** The accessible name of the switch, read out with its state. */
|
|
10
|
-
label: string;
|
|
11
|
-
/**
|
|
12
|
-
* Locks the switch and dims it.
|
|
13
|
-
* @default false
|
|
14
|
-
*/
|
|
15
|
-
disabled?: boolean | undefined;
|
|
16
|
-
onToggle: (next: boolean) => Promise<unknown>;
|
|
17
|
-
}
|
|
18
|
-
export default function AppRowSwitch(props: AppRowSwitchProps): import("react").JSX.Element;
|