@webority/ui-react 0.85.1 → 0.86.1
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/components/AppAccordion.js +1 -1
- package/dist/components/AppActionIcon.js +1 -1
- package/dist/components/AppConsentBanner.js +1 -1
- package/dist/components/AppDataTable.js +1 -1
- package/dist/components/AppDatePicker.js +1 -1
- package/dist/components/AppFileViewer.js +1 -1
- package/dist/components/AppFormRow.js +1 -1
- package/dist/components/AppInput.js +1 -1
- package/dist/components/AppKpiTile.js +1 -1
- package/dist/components/AppRollingNumber.js +1 -1
- package/dist/components/AppSectionFaq.js +1 -1
- package/dist/components/AppSegmented.js +1 -1
- package/dist/components/AppSelect.js +1 -1
- package/dist/components/AppSwitch.js +1 -1
- package/dist/components/AppTablePagination.js +1 -1
- package/dist/components/AppTimePicker.js +1 -1
- package/dist/components/AppWizard.js +1 -1
- package/dist/components/iconCatalogFull/bold/b.g.js +1 -1
- package/dist/components/iconCatalogFull/broken/b.g.js +1 -1
- package/dist/components/iconCatalogFull/bulk/b.g.js +1 -1
- package/dist/components/iconCatalogFull/linear/b.g.js +1 -1
- package/dist/components/iconCatalogFull/outline/b.g.js +1 -1
- package/dist/components/iconCatalogFull/twotone/b.g.js +1 -1
- package/dist/components/iconCatalogNames.g.js +1 -1
- package/dist/components/iconGlyphs.g.js +1 -1
- package/dist/components/iconVariants.g.js +1 -1
- package/dist/lib/sectionShell.js +1 -1
- package/dist/types/components/AppAccordion.d.ts +2 -0
- package/dist/types/components/AppActionIcon.d.ts +1 -1
- package/dist/types/components/AppAvatarGroup.d.ts +22 -1
- package/dist/types/components/AppConfirmDialog.d.ts +41 -1
- package/dist/types/components/AppConsentBanner.d.ts +2 -0
- package/dist/types/components/AppDataTable.d.ts +6 -3
- package/dist/types/components/AppFileViewer.d.ts +1 -0
- package/dist/types/components/AppFormRow.d.ts +6 -4
- package/dist/types/components/AppIcon.d.ts +1 -1
- package/dist/types/components/AppInfoTip.d.ts +21 -1
- package/dist/types/components/AppLink.d.ts +47 -1
- package/dist/types/components/AppLogoPicker.d.ts +59 -1
- package/dist/types/components/AppRequiredMark.d.ts +2 -1
- package/dist/types/components/AppResult.d.ts +2 -0
- package/dist/types/components/AppSectionFaq.d.ts +2 -0
- package/dist/types/components/AppSectionHero.d.ts +1 -1
- package/dist/types/components/AppSelectMini.d.ts +35 -1
- package/dist/types/components/AppSidebarMenu.d.ts +49 -1
- package/dist/types/components/AppTablePagination.d.ts +8 -6
- package/dist/types/components/AppTimePicker.d.ts +1 -1
- package/dist/types/components/iconCatalogFull/bold/b.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/broken/b.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/bulk/b.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/linear/b.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/outline/b.g.d.ts +1 -0
- package/dist/types/components/iconCatalogFull/twotone/b.g.d.ts +1 -0
- package/dist/types/components/iconGlyphs.g.d.ts +6 -0
- package/dist/types/components/iconVariants.g.d.ts +30 -0
- package/package.json +3 -3
package/dist/lib/sectionShell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";var n=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],r=[`start`,`center`],i=[`default`,`muted`];function a(e,t){return n.includes(e)?e:t}function o(e){return n[Math.min(n.indexOf(e)+1,5)]}function s({className:t,src:n,alt:r,width:i,height:a}){return e(`img`,{className:t,src:n,alt:r,width:i,height:a,loading:`lazy`,decoding:`async`})}function c({component:n,kind:r,title:i,as:a,eyebrow:o,subtitle:s,align:c,variant:l,actions:u,extraClass:d,className:f,rest:p,children:m}){if(i==null||i===``)throw Error(`${n} needs a title: every section opens with its heading.`);let h=a,g=p.id?`${p.id}-title`:void 0;return e(`section`,{className:[`wui-section`,`wui-section-${r}`,c===`center`?`wui-section-center`:``,l===`muted`?`wui-section-muted`:``,d,f].filter(Boolean).join(` `),"aria-labelledby":g,...p,children:t(`div`,{className:`wui-section-inner`,children:[t(`div`,{className:`wui-section-head`,children:[o!=null&&o!==``&&e(`
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";var n=[`h1`,`h2`,`h3`,`h4`,`h5`,`h6`],r=[`start`,`center`],i=[`default`,`muted`];function a(e,t){return n.includes(e)?e:t}function o(e){return n[Math.min(n.indexOf(e)+1,5)]}function s({className:t,src:n,alt:r,width:i,height:a}){return e(`img`,{className:t,src:n,alt:r,width:i,height:a,loading:`lazy`,decoding:`async`})}function c({component:n,kind:r,title:i,as:a,eyebrow:o,subtitle:s,align:c,variant:l,actions:u,extraClass:d,className:f,rest:p,children:m}){if(i==null||i===``)throw Error(`${n} needs a title: every section opens with its heading.`);let h=a,g=p.id?`${p.id}-title`:void 0;return e(`section`,{className:[`wui-section`,`wui-section-${r}`,c===`center`?`wui-section-center`:``,l===`muted`?`wui-section-muted`:``,d,f].filter(Boolean).join(` `),"aria-labelledby":g,...p,children:t(`div`,{className:`wui-section-inner`,children:[t(`div`,{className:`wui-section-head`,children:[o!=null&&o!==``&&e(`div`,{className:`wui-section-eyebrow`,children:o}),e(h,{className:`wui-section-title`,id:g,children:i}),s!=null&&s!==``&&e(`p`,{className:`wui-section-subtitle`,children:s}),u!=null&&u!==!1&&e(`div`,{className:`wui-section-actions`,children:u})]}),m]})})}export{r as SECTION_ALIGNS,n as SECTION_HEADINGS,i as SECTION_VARIANTS,s as SectionImage,c as default,o as itemHeading,a as sectionHeading};
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* @param {object} props
|
|
11
11
|
* @param {{ key?: string, title: import('react').ReactNode, content: import('react').ReactNode, open?: boolean }[]} props.items
|
|
12
12
|
* @param {boolean} [props.multiple=false] Allow more than one pane open at a time.
|
|
13
|
+
* @param {string[]} [props.openItems] The keys of the items that are open. When set, it replaces each item's own open flag, and it is read again whenever its content changes. With multiple false only the first key opens.
|
|
13
14
|
* @param {string} [props.id] Prefix for the generated pane ids. Set it when a pane
|
|
14
15
|
* needs a stable anchor to deep-link to; otherwise a unique one is generated.
|
|
15
16
|
* @param {string} [props.className]
|
|
@@ -22,6 +23,7 @@ export default function AppAccordion(props: {
|
|
|
22
23
|
open?: boolean;
|
|
23
24
|
}[];
|
|
24
25
|
multiple?: boolean;
|
|
26
|
+
openItems?: string[];
|
|
25
27
|
id?: string;
|
|
26
28
|
className?: string;
|
|
27
29
|
}): import("react").JSX.Element;
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* after the label. Sets aria-keyshortcuts; the page binds the key itself (useListShortcuts). Needs a `label`, which supplies the tooltip.
|
|
23
23
|
* @param {boolean} [props.danger] destructive tint
|
|
24
24
|
* @param {boolean} [props.disabled]
|
|
25
|
-
* @param {number} [props.size=20] glyph size in px;
|
|
25
|
+
* @param {number} [props.size=20] glyph size in px; a numeric string is read as a number. The disc (and its hover tint) scales with it, keeping a constant 8px ring
|
|
26
26
|
* @param {() => void} [props.onClick]
|
|
27
27
|
* @param {string} [props.className]
|
|
28
28
|
* @param {React.ElementType} [props.as] render as something else — a router `Link`, `"a"`. When a
|
|
@@ -1 +1,22 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A row of overlapping avatars: the people on a project, a team, the reviewers on a doc.
|
|
3
|
+
*
|
|
4
|
+
* Composition, not data: you render the `AppAvatar` children yourself, and the group only lays
|
|
5
|
+
* them out. Each avatar gets a surface-coloured ring so it reads against its neighbour. The look
|
|
6
|
+
* comes from `@webority/theme`, so React `<AppAvatarGroup>` and Razor `<app-avatar-group>` render
|
|
7
|
+
* identically.
|
|
8
|
+
*
|
|
9
|
+
* @param {object} props
|
|
10
|
+
* @param {import('react').ReactNode} props.children The `AppAvatar`s to overlap.
|
|
11
|
+
* @param {"xs"|"sm"|"md"|"lg"|"xl"|"2xl"|number|string} [props.size] Sizes the whole row at once. It sets `--avatar-size` on the group, which each avatar and the "+N" chip inherit; a child with its own size still wins.
|
|
12
|
+
* @param {"tight"|"normal"|"loose"} [props.spacing="normal"] How far the avatars overlap.
|
|
13
|
+
* @param {number|string} [props.overflow] The hidden count, shown as a "+N" chip after the avatars. Zero or unset shows no chip.
|
|
14
|
+
* @param {string} [props.className=""] Extra classes on the group.
|
|
15
|
+
*/
|
|
16
|
+
export default function AppAvatarGroup(props: {
|
|
17
|
+
children: import('react').ReactNode;
|
|
18
|
+
size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | number | string;
|
|
19
|
+
spacing?: "tight" | "normal" | "loose";
|
|
20
|
+
overflow?: number | string;
|
|
21
|
+
className?: string;
|
|
22
|
+
}): import("react").JSX.Element;
|
|
@@ -1 +1,41 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Destructive or confirm step built on AppModal.
|
|
3
|
+
*
|
|
4
|
+
* @param {object} props
|
|
5
|
+
* @param {boolean} props.open Shows the dialog while true.
|
|
6
|
+
* @param {string} props.title The dialog heading.
|
|
7
|
+
* @param {import('react').ReactNode} [props.message] The text that explains what the user is confirming.
|
|
8
|
+
* @param {string} [props.confirmLabel="Confirm"] The confirm button's text.
|
|
9
|
+
* @param {string} [props.cancelLabel="Cancel"] The cancel button's text.
|
|
10
|
+
* @param {boolean} [props.danger=false] Styles the confirm button as destructive; with no `tone` it also picks the delete icon.
|
|
11
|
+
* @param {"success"|"error"|"warning"|"info"|"delete"|"primary"} [props.tone] The status icon. Unset, it is `delete` when `danger` is set and `info` otherwise.
|
|
12
|
+
* @param {string} [props.image] URL of a custom illustration that replaces the tone artwork. Any source size is fine: the theme boxes it to the same footprint. It is decorative, rendered aria-hidden with an empty alt, so the title and message carry the meaning.
|
|
13
|
+
* @param {number} [props.iconSize] Width and height of the illustration in px, for the tone artwork and a custom `image` alike. Unset, it is 120px with a message and 84px without.
|
|
14
|
+
* @param {string} [props.confirmPhrase] Exact text the user must type before Confirm unlocks, e.g. a workspace name.
|
|
15
|
+
* @param {() => void} props.onConfirm Runs when Confirm is pressed.
|
|
16
|
+
* @param {() => void} [props.onClose] Runs when the dialog is dismissed through Cancel, the backdrop or Escape, unless `loading` blocks it.
|
|
17
|
+
* @param {boolean} [props.loading=false] Busy state: shows a spinner and disables Confirm, Cancel and the confirm-phrase field, and blocks dismissal while the async action is in flight.
|
|
18
|
+
* @param {boolean} [props.staticBackdrop=false] Passed to AppModal: when true, a backdrop click and Escape no longer close the dialog.
|
|
19
|
+
* @param {'center'|'top'} [props.placement='center'] Vertical placement of the card: centred, or pinned near the top.
|
|
20
|
+
* @param {'sm'|'md'|'lg'|'xl'|number} [props.size='md'] Card width: a preset, or an exact max-width in px for a custom size.
|
|
21
|
+
* @param {string} [props.className=""] Merged with the dialog's own `wui-confirm` class.
|
|
22
|
+
*/
|
|
23
|
+
export default function AppConfirmDialog(props: {
|
|
24
|
+
open: boolean;
|
|
25
|
+
title: string;
|
|
26
|
+
message?: import('react').ReactNode;
|
|
27
|
+
confirmLabel?: string;
|
|
28
|
+
cancelLabel?: string;
|
|
29
|
+
danger?: boolean;
|
|
30
|
+
tone?: "success" | "error" | "warning" | "info" | "delete" | "primary";
|
|
31
|
+
image?: string;
|
|
32
|
+
iconSize?: number;
|
|
33
|
+
confirmPhrase?: string;
|
|
34
|
+
onConfirm: () => void;
|
|
35
|
+
onClose?: () => void;
|
|
36
|
+
loading?: boolean;
|
|
37
|
+
staticBackdrop?: boolean;
|
|
38
|
+
placement?: 'center' | 'top';
|
|
39
|
+
size?: 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
40
|
+
className?: string;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
@@ -33,6 +33,7 @@ import "@webority/ui-elements/elements/consent-banner";
|
|
|
33
33
|
* @param {Array<"analytics"|"functional"|"marketing">} [props.categories=['analytics','functional','marketing']] The optional categories to show. Essential always shows. A category left out has no row, saves as off and is never granted by Accept all.
|
|
34
34
|
* @param {"bottom-left"|"bottom-right"|"bar"} [props.position='bottom-left'] The corner it pins to, or the full-width bar. bar is a slim full-width bar along the bottom at every width.
|
|
35
35
|
* @param {boolean} [props.standalone=false] Render sealed in a shadow root with bundled styles, for a page that does not load `@webority/theme`.
|
|
36
|
+
* @param {boolean} [props.preview=false] Draw the banner open without reading or saving consent, for a design surface that never ran initConsent. Nothing is stored.
|
|
36
37
|
* @param {string} [props.className] Extra classes on the element.
|
|
37
38
|
* @param {import('react').CSSProperties} [props.style] Inline style; lands on the element with `className`.
|
|
38
39
|
*/
|
|
@@ -47,6 +48,7 @@ export default function AppConsentBanner(props: {
|
|
|
47
48
|
categories?: Array<"analytics" | "functional" | "marketing">;
|
|
48
49
|
position?: "bottom-left" | "bottom-right" | "bar";
|
|
49
50
|
standalone?: boolean;
|
|
51
|
+
preview?: boolean;
|
|
50
52
|
className?: string;
|
|
51
53
|
style?: import('react').CSSProperties;
|
|
52
54
|
}): import("react").JSX.Element;
|
|
@@ -13,9 +13,10 @@
|
|
|
13
13
|
* @param {(key: string) => void} [props.onSort]
|
|
14
14
|
* @param {boolean} [props.loading=false]
|
|
15
15
|
* @param {number} [props.skeletonRows=5]
|
|
16
|
-
* @param {import('react').ReactNode} [props.empty]
|
|
17
|
-
* @param {import('react').ReactNode} [props.emptyFiltered]
|
|
18
|
-
* @param {number} [props.sourceCount]
|
|
16
|
+
* @param {import('react').ReactNode} [props.empty] Shown when there are no rows and the source is empty (`sourceCount` 0), or no `emptyFiltered` is given.
|
|
17
|
+
* @param {import('react').ReactNode} [props.emptyFiltered] Shown when there are no rows and `sourceCount` is unset or above 0.
|
|
18
|
+
* @param {number} [props.sourceCount] The number of rows before filtering. 0 means the source is empty and `empty` shows;
|
|
19
|
+
* unset means the table was filtered.
|
|
19
20
|
* @param {(row: object) => import('react').ReactNode} [props.rowActions]
|
|
20
21
|
* @param {string} [props.rowActionsLabel]
|
|
21
22
|
* @param {object} [props.pagination] The footer's state, usually straight from usePagination:
|
|
@@ -31,6 +32,7 @@
|
|
|
31
32
|
* @param {'comfortable'|'cozy'|'compact'} [props.density='comfortable'] Row height: 54 / 48 / 40px.
|
|
32
33
|
* compact is one line per row (the identity subline is hidden). An avatar with no size of its own
|
|
33
34
|
* follows the density (32 / 28 / 24px).
|
|
35
|
+
* @param {'auto'|'fixed'} [props.tableLayout='auto'] fixed holds every column to its width or minWidth and clips overflowing text; auto sizes columns to their content.
|
|
34
36
|
* @param {boolean} [props.striped=false] Alternate-row shading in place of divider lines.
|
|
35
37
|
* @param {boolean} [props.flush=false] No wrapper padding above the column header row.
|
|
36
38
|
* @param {boolean} [props.rowDrag=false] Rows drag onto page elements marked data-wui-drop-target; a ticked row drags the whole selection. Fires wui:row-drop ({ keys, target }) on the wrap. Razor: row-drag.
|
|
@@ -116,6 +118,7 @@ export default function AppDataTable(props: {
|
|
|
116
118
|
className?: string;
|
|
117
119
|
wrapperClassName?: string;
|
|
118
120
|
density?: 'comfortable' | 'cozy' | 'compact';
|
|
121
|
+
tableLayout?: 'auto' | 'fixed';
|
|
119
122
|
striped?: boolean;
|
|
120
123
|
flush?: boolean;
|
|
121
124
|
rowDrag?: boolean;
|
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Form row — a grid of input columns, responsive.
|
|
3
3
|
*
|
|
4
|
-
* Wraps form fields in a CSS grid with configurable columns (1
|
|
5
|
-
* Automatically collapses to 1 column below the md breakpoint. Uses theme gap
|
|
4
|
+
* Wraps form fields in a CSS grid with configurable columns (1 to 12).
|
|
5
|
+
* Automatically collapses to 1 column below the md breakpoint unless `collapse` is false. Uses theme gap
|
|
6
6
|
* tokens for consistent field spacing.
|
|
7
7
|
*
|
|
8
8
|
* @param {object} props
|
|
9
9
|
* @param {import('react').ReactNode} props.children Field components (AppInput, AppSelect, etc.).
|
|
10
|
-
* @param {1|2|3} [props.columns=2] Number of columns.
|
|
10
|
+
* @param {1|2|3|4|5|6|7|8|9|10|11|12} [props.columns=2] Number of columns, 1 to 12.
|
|
11
|
+
* @param {boolean} [props.collapse=true] Stack to one column below the md breakpoint; false keeps the set columns at every width.
|
|
11
12
|
* @param {string} [props.className]
|
|
12
13
|
*/
|
|
13
14
|
export default function AppFormRow(props: {
|
|
14
15
|
children: import('react').ReactNode;
|
|
15
|
-
columns?: 1 | 2 | 3;
|
|
16
|
+
columns?: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
17
|
+
collapse?: boolean;
|
|
16
18
|
className?: string;
|
|
17
19
|
}): import("react").JSX.Element;
|
|
@@ -34,7 +34,7 @@ export declare function registerIcons(map: Record<string, (props: {
|
|
|
34
34
|
* @param {'auto'|'top'|'bottom'|'start'|'end'} [props.tooltipPlacement='auto'] Preferred tooltip
|
|
35
35
|
* side; `auto` picks the side with the most room.
|
|
36
36
|
* @param {string} [props.className]
|
|
37
|
-
* @param {string} [props.color]
|
|
37
|
+
* @param {string} [props.color] The icon colour. Without it the icon takes --wui-icon-color when an ancestor sets that variable, else the inherited text colour.
|
|
38
38
|
* @param {object} [props.style]
|
|
39
39
|
*/
|
|
40
40
|
export default function AppIcon(props: {
|
|
@@ -1 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Generic info popover beside a field label, the same Bootstrap popover as the Razor `<app-info-tip>`.
|
|
3
|
+
*
|
|
4
|
+
* A small "?" trigger opens the popover on hover or focus. A glossary-backed tip wraps this and
|
|
5
|
+
* passes the looked-up entry as children, so the glossary never enters the shared library.
|
|
6
|
+
* Implemented as a thin wrapper over AppPopover with hover and focus triggers.
|
|
7
|
+
*
|
|
8
|
+
* @param {object} props
|
|
9
|
+
* @param {string} [props.label] The popover title, and the trigger's accessible name. Unset, the trigger is named "More information".
|
|
10
|
+
* @param {import('react').ReactNode} [props.children] The popover body. Supply a label, a body, or both: a body-less tip is a heading, a title-less tip is just the body. With neither, the tip renders nothing.
|
|
11
|
+
* @param {"auto"|"top"|"bottom"|"start"|"end"} [props.placement="auto"] Where the popover opens; `auto` flips it to stay in view.
|
|
12
|
+
* @param {"sm"|"md"|"lg"|"xl"} [props.width="md"] The widest the card grows before its text wraps: 220, 276, 360 or 480px. It is a maximum, so a short tip stays as narrow as its text.
|
|
13
|
+
* @param {string} [props.className=""] Extra classes on the wrapper.
|
|
14
|
+
*/
|
|
15
|
+
export default function AppInfoTip(props: {
|
|
16
|
+
label?: string;
|
|
17
|
+
children?: import('react').ReactNode;
|
|
18
|
+
placement?: "auto" | "top" | "bottom" | "start" | "end";
|
|
19
|
+
width?: "sm" | "md" | "lg" | "xl";
|
|
20
|
+
className?: string;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
@@ -1 +1,47 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A text link with a choice of hover animation and optional leading or trailing icons.
|
|
3
|
+
*
|
|
4
|
+
* Use it for inline prose links, footer links, "read more" affordances, and marketing
|
|
5
|
+
* call-to-action links: anywhere a plain `<a>` would go but the hover should read as
|
|
6
|
+
* intentional. It is NOT a button (`AppButton`) and not a nav item inside `AppShell`;
|
|
7
|
+
* it is the styled anchor. Router-agnostic: pass `linkComponent` (e.g. react-router's
|
|
8
|
+
* `Link`) for an in-app destination and it receives `to` instead of `href`.
|
|
9
|
+
*
|
|
10
|
+
* Every `animation` is disabled under `prefers-reduced-motion: reduce`, where the link
|
|
11
|
+
* degrades to a static underline.
|
|
12
|
+
*
|
|
13
|
+
* @param {object} props
|
|
14
|
+
* @param {import('react').ReactNode} [props.children] Link text. Wins over `label` when both are given.
|
|
15
|
+
* @param {import('react').ReactNode} [props.label] Link text as a prop, an alternative to `children` (mirrors the Razor `label` attribute).
|
|
16
|
+
* @param {string} [props.href] Destination, or `to` through `linkComponent`. Unset, the anchor has no href.
|
|
17
|
+
* @param {"underline"|"underline-center"|"static"|"slide"|"icon"|"highlight"|"bracket"|"fade"|"grow"|"glow"|"shine"|"none"} [props.animation="underline"]
|
|
18
|
+
* Hover treatment: `underline` (line slides in left to right), `underline-center` (line grows
|
|
19
|
+
* from the middle out), `static` (an always-visible single underline, no motion, the classic
|
|
20
|
+
* link look), `slide` (label and icons nudge right), `icon` (a trailing icon slides and fades in,
|
|
21
|
+
* defaulting to an arrow when no icon is given), `highlight` (a tinted background wipes across),
|
|
22
|
+
* `bracket` (`[ ]` brackets slide in around the label), `fade` (colour or opacity shift only),
|
|
23
|
+
* `grow` (letter-spacing opens up), `glow` (a soft accent glow), `shine` (a light shimmer
|
|
24
|
+
* sweeps across the label), `none` (a plain coloured link, no underline, no motion).
|
|
25
|
+
* @param {string|import('react').ReactNode} [props.leftIcon=null] Leading glyph: a semantic icon name or a node.
|
|
26
|
+
* @param {string|import('react').ReactNode} [props.rightIcon=null] Trailing glyph: a semantic icon name or a node.
|
|
27
|
+
* @param {"sm"|"md"|"lg"} [props.size="md"] Text and icon size.
|
|
28
|
+
* @param {"default"|"dark"} [props.surface="default"] Set "dark" when the link sits on a dark panel, such as a dark hero or footer; the text turns light.
|
|
29
|
+
* @param {boolean} [props.external=false] Open in a new tab (adds `target` and `rel`).
|
|
30
|
+
* @param {boolean} [props.disabled=false] Render as unavailable (no navigation, `aria-disabled`).
|
|
31
|
+
* @param {import('react').ElementType} [props.linkComponent] Router link component; it receives `to` instead of `href`. Keeps the library router-agnostic.
|
|
32
|
+
* @param {string} [props.className=""] Extra classes on the anchor.
|
|
33
|
+
*/
|
|
34
|
+
export default function AppLink(props: {
|
|
35
|
+
children?: import('react').ReactNode;
|
|
36
|
+
label?: import('react').ReactNode;
|
|
37
|
+
href?: string;
|
|
38
|
+
animation?: "underline" | "underline-center" | "static" | "slide" | "icon" | "highlight" | "bracket" | "fade" | "grow" | "glow" | "shine" | "none";
|
|
39
|
+
leftIcon?: string | import('react').ReactNode;
|
|
40
|
+
rightIcon?: string | import('react').ReactNode;
|
|
41
|
+
size?: "sm" | "md" | "lg";
|
|
42
|
+
surface?: "default" | "dark";
|
|
43
|
+
external?: boolean;
|
|
44
|
+
disabled?: boolean;
|
|
45
|
+
linkComponent?: import('react').ElementType;
|
|
46
|
+
className?: string;
|
|
47
|
+
}): import("react").JSX.Element;
|
|
@@ -1,2 +1,60 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/image-crop";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* Circular (or rounded or square) logo or avatar picker with an update overlay.
|
|
4
|
+
* Click or drag-and-drop a file onto the ring; a freshly picked file previews immediately
|
|
5
|
+
* (optimistic) while the caller uploads and reflects it back via `value`.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} props
|
|
8
|
+
* @param {string|null} [props.value] Current image URL, or null.
|
|
9
|
+
* @param {import('react').ReactNode} [props.fallback] Shown when there is no image, e.g. initials.
|
|
10
|
+
* @param {string} [props.name] Form field name, so an uncontrolled form can post the file.
|
|
11
|
+
* @param {(file: File) => void} props.onPick Receives a validated File, the cropped one when `crop` is set.
|
|
12
|
+
* @param {() => void} [props.onRemove] Called when the × clears the logo. A just-picked image always shows the ×; an existing `value` needs onRemove for its × to appear, because the parent owns it.
|
|
13
|
+
* @param {boolean} [props.loading=false] Spinner and blocked interaction while the pick uploads.
|
|
14
|
+
* @param {boolean} [props.disabled=false] Non-busy, non-interactive state.
|
|
15
|
+
* @param {string} [props.accept="image/png,image/jpeg,image/webp"] The file types the picker accepts.
|
|
16
|
+
* @param {number} [props.maxSizeMb=5] Largest accepted file in MB, the shared DEFAULT_MAX_SIZE_MB unless set. 0 means no size limit: nothing is rejected for its size.
|
|
17
|
+
* @param {number|'free'} [props.crop] Opt-in crop step before upload. After the person chooses a file, a dialog lets them drag and zoom a frame over it, and `onPick` receives the cropped File (same image type, kept under `maxSizeMb`). A number is the frame's width divided by its height (`1` for an avatar); `'free'` lets them resize the frame. SVG files skip the dialog, and `maxSizeMb` then applies to the cropped result, not the original.
|
|
18
|
+
* @param {string} [props.overlayIcon="image"] Icon name for the hover overlay.
|
|
19
|
+
* @param {string} [props.overlayLabel="Update photo"] Text of the hover overlay.
|
|
20
|
+
* @param {string} [props.ariaLabel="Upload photo"] Accessible name of the upload button.
|
|
21
|
+
* @param {string} [props.removeLabel="Remove photo"] Accessible name and tooltip of the × control (`Remove logo` on a logo picker).
|
|
22
|
+
* @param {string} [props.label] Optional field label above the ring.
|
|
23
|
+
* @param {string} [props.hint] Optional helper text: below the ring when stacked, in the side column when inline or profile.
|
|
24
|
+
* @param {string} [props.error] Caller-supplied inline error. It wins over an automatic rejection reason.
|
|
25
|
+
* @param {'stacked'|'inline'|'profile'} [props.layout='stacked'] Ring only with the hint below (stacked); a profile row with the ring on the left and a title, subtitle and hint column beside it (inline); or the same identity block stacked and centred beneath the ring (profile).
|
|
26
|
+
* @param {import('react').ReactNode} [props.title] Bold primary text with the ring (inline and profile only).
|
|
27
|
+
* @param {import('react').ReactNode} [props.subtitle] Muted secondary text with the ring (inline and profile only).
|
|
28
|
+
* @param {boolean} [props.required=false] Marks the field as required.
|
|
29
|
+
* @param {'initials'|'avatar'} [props.variant='initials'] Placeholder style: initials text, or a standard avatar (a muted disc and a person icon when there are no initials).
|
|
30
|
+
* @param {'sm'|'md'|'lg'|number} [props.size='md'] A preset, or an exact ring diameter in px. The whole control (ring, initials font, overlay and placeholder icon) scales from it.
|
|
31
|
+
* @param {'circle'|'rounded'|'square'} [props.shape='circle'] Ring shape.
|
|
32
|
+
* @param {string} [props.className=""] Extra class on the field wrapper.
|
|
33
|
+
*/
|
|
34
|
+
export default function AppLogoPicker(props: {
|
|
35
|
+
value?: string | null;
|
|
36
|
+
fallback?: import('react').ReactNode;
|
|
37
|
+
name?: string;
|
|
38
|
+
onPick: (file: File) => void;
|
|
39
|
+
onRemove?: () => void;
|
|
40
|
+
loading?: boolean;
|
|
41
|
+
disabled?: boolean;
|
|
42
|
+
accept?: string;
|
|
43
|
+
maxSizeMb?: number;
|
|
44
|
+
crop?: number | 'free';
|
|
45
|
+
overlayIcon?: string;
|
|
46
|
+
overlayLabel?: string;
|
|
47
|
+
ariaLabel?: string;
|
|
48
|
+
removeLabel?: string;
|
|
49
|
+
label?: string;
|
|
50
|
+
hint?: string;
|
|
51
|
+
error?: string;
|
|
52
|
+
layout?: 'stacked' | 'inline' | 'profile';
|
|
53
|
+
title?: import('react').ReactNode;
|
|
54
|
+
subtitle?: import('react').ReactNode;
|
|
55
|
+
required?: boolean;
|
|
56
|
+
variant?: 'initials' | 'avatar';
|
|
57
|
+
size?: 'sm' | 'md' | 'lg' | number;
|
|
58
|
+
shape?: 'circle' | 'rounded' | 'square';
|
|
59
|
+
className?: string;
|
|
60
|
+
}): import("react").JSX.Element;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
* Required-field asterisk shared by form primitives.
|
|
3
3
|
* Colour comes from `.required` (theme `--wui-danger`) — never inline hex.
|
|
4
4
|
*
|
|
5
|
+
* @param {{}} props Takes no props: the asterisk is fixed.
|
|
5
6
|
* @returns {import('react').JSX.Element}
|
|
6
7
|
*/
|
|
7
|
-
export default function AppRequiredMark(props:
|
|
8
|
+
export default function AppRequiredMark(props: {}): import('react').JSX.Element;
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
* (which is a card/section "nothing here yet") — this is a self-contained result panel
|
|
5
5
|
* with a prominent status, heading, supporting message, and usually one or two actions.
|
|
6
6
|
*
|
|
7
|
+
* The card lays its parts in a column, so a `gap` style on it spaces them.
|
|
8
|
+
*
|
|
7
9
|
* The `status` prop picks a default icon + tone. Numeric statuses (403, 404, 500) render the
|
|
8
10
|
* code as a large figure instead of an icon.
|
|
9
11
|
*
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* @param {"start"|"center"} [props.align="center"] Where the heading block sits.
|
|
15
15
|
* @param {"default"|"muted"} [props.variant="default"] The section's background.
|
|
16
16
|
* @param {import('react').ReactNode} [props.children] The `AppAccordion` of questions.
|
|
17
|
+
* @param {number[]} [props.openItems] The positions of the questions that start open, counted from 0. They are passed to the AppAccordion among the children.
|
|
17
18
|
* @param {string} [props.className]
|
|
18
19
|
*/
|
|
19
20
|
export default function AppSectionFaq(props: {
|
|
@@ -24,5 +25,6 @@ export default function AppSectionFaq(props: {
|
|
|
24
25
|
align?: "start" | "center";
|
|
25
26
|
variant?: "default" | "muted";
|
|
26
27
|
children?: import('react').ReactNode;
|
|
28
|
+
openItems?: number[];
|
|
27
29
|
className?: string;
|
|
28
30
|
}): import("react").JSX.Element;
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* @param {object} props
|
|
12
12
|
* @param {import('react').ReactNode} props.title The page's heading.
|
|
13
13
|
* @param {"h1"|"h2"|"h3"|"h4"|"h5"|"h6"} [props.as="h1"] The heading element. Keep one h1 per page.
|
|
14
|
-
* @param {import('react').ReactNode} [props.eyebrow] A short label above the heading.
|
|
14
|
+
* @param {import('react').ReactNode} [props.eyebrow] A short label above the heading: any node, including a styled container drawn as a pill.
|
|
15
15
|
* @param {import('react').ReactNode} [props.subtitle] One or two sentences under the heading.
|
|
16
16
|
* @param {"start"|"center"} [props.align="start"] Centred copy with the media under it.
|
|
17
17
|
* @param {"default"|"muted"} [props.variant="default"] The section's background.
|
|
@@ -1,2 +1,36 @@
|
|
|
1
1
|
import "@webority/ui-elements/elements/select";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* A compact select for toolbars and filters, drawn by the shared `<wui-select>` element in compact mode.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props
|
|
6
|
+
* @param {string} [props.value] The selected option's value. Unset, the control is cleared.
|
|
7
|
+
* @param {(value: string) => void} [props.onChange] Called with the new value when the user picks an option.
|
|
8
|
+
* @param {Array<{ value: string, label?: import('react').ReactNode, icon?: string }>} [props.options] The options. A node label renders as markup, and `icon` is a semantic icon name drawn before the label. Omitted, the select has no options.
|
|
9
|
+
* @param {string} [props.placeholder="Select..."] Text shown while no value is selected.
|
|
10
|
+
* @param {string} [props.name] Form field name of the select.
|
|
11
|
+
* @param {string} [props.ariaLabel] Accessible name of the select.
|
|
12
|
+
* @param {string} [props.id] Element id of the select.
|
|
13
|
+
* @param {boolean} [props.disabled] Disables the select so its value cannot change.
|
|
14
|
+
* @param {"sm"|"lg"} [props.size] Compact size around the default 32px picker.
|
|
15
|
+
* @param {string} [props.icon] A leading library icon, e.g. `funnel` or `sort-down`.
|
|
16
|
+
* @param {string} [props.prefix] Static text before the value, e.g. `Sort:`.
|
|
17
|
+
* @param {string} [props.className] Extra classes on the select, so a caller can position or space it.
|
|
18
|
+
*/
|
|
19
|
+
export default function AppSelectMini(props: {
|
|
20
|
+
value?: string;
|
|
21
|
+
onChange?: (value: string) => void;
|
|
22
|
+
options?: Array<{
|
|
23
|
+
value: string;
|
|
24
|
+
label?: import('react').ReactNode;
|
|
25
|
+
icon?: string;
|
|
26
|
+
}>;
|
|
27
|
+
placeholder?: string;
|
|
28
|
+
name?: string;
|
|
29
|
+
ariaLabel?: string;
|
|
30
|
+
id?: string;
|
|
31
|
+
disabled?: boolean;
|
|
32
|
+
size?: "sm" | "lg";
|
|
33
|
+
icon?: string;
|
|
34
|
+
prefix?: string;
|
|
35
|
+
className?: string;
|
|
36
|
+
}): import("react").JSX.Element;
|
|
@@ -1 +1,49 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* A slide-in sidebar or drawer panel on react-bootstrap `<Offcanvas>`.
|
|
3
|
+
*
|
|
4
|
+
* Offcanvas supplies the backdrop, slide animation, background scroll lock, Escape to close,
|
|
5
|
+
* focus trap and ARIA dialog wiring. Opens from either side, or from the top or bottom. Themed
|
|
6
|
+
* via the app tokens so it renders correctly in dark mode.
|
|
7
|
+
*
|
|
8
|
+
* @param {object} props
|
|
9
|
+
* @param {boolean} props.show Whether the panel is open. The caller owns this state.
|
|
10
|
+
* @param {() => void} props.onHide Closes the panel: the header close button, the backdrop and Escape.
|
|
11
|
+
* @param {"left"|"right"|"start"|"end"|"top"|"bottom"} [props.side="right"] The edge it opens from. `left` and `start` open from the start edge, `right` and `end` from the end edge.
|
|
12
|
+
* @param {import('react').ReactNode} props.children The panel body.
|
|
13
|
+
* @param {import('react').ReactNode} [props.title] Title of the default header bar. A text title also names the dialog, unless `ariaLabel` is set.
|
|
14
|
+
* @param {string} [props.titleIcon] Library icon beside the title in the default header bar.
|
|
15
|
+
* @param {import('react').ReactNode} [props.header] A custom header that replaces the default header bar entirely.
|
|
16
|
+
* @param {import('react').ReactNode} [props.footer] A sticky footer for action buttons.
|
|
17
|
+
* @param {string} [props.width] Panel width for a left or right panel, e.g. "480px". Unset, it is 420px. On a phone (below 576px) a left or right panel opens at the full screen width whatever this says; `maxWidth` still caps it there.
|
|
18
|
+
* @param {string} [props.maxWidth] Caps the panel width, e.g. "600px". Unset, the theme caps it at 92vw, so a fixed `width` still fits on a small viewport.
|
|
19
|
+
* @param {boolean|"static"} [props.backdrop=true] The dimming backdrop: `true` shows it and a click outside closes the panel; `false` removes it; `"static"` shows it and a click outside does not close.
|
|
20
|
+
* @param {boolean} [props.scroll=false] Allows the page behind the panel to scroll.
|
|
21
|
+
* @param {boolean} [props.keyboard=true] Escape closes the panel.
|
|
22
|
+
* @param {boolean} [props.closeButton=true] Shows the header close button.
|
|
23
|
+
* @param {string} [props.closeLabel="Close"] The close button's accessible name, for other languages.
|
|
24
|
+
* @param {string} [props.responsive] Breakpoint, e.g. `lg`, below which the panel acts as an offcanvas and at or above which it renders inline.
|
|
25
|
+
* @param {string} [props.className=""] Extra classes on the panel.
|
|
26
|
+
* @param {string} [props.bodyClassName=""] Classes on the scrollable body region.
|
|
27
|
+
* @param {string} [props.ariaLabel] Accessible name of the dialog. Unset, a text `title` names it.
|
|
28
|
+
*/
|
|
29
|
+
export default function AppSidebarMenu(props: {
|
|
30
|
+
show: boolean;
|
|
31
|
+
onHide: () => void;
|
|
32
|
+
side?: "left" | "right" | "start" | "end" | "top" | "bottom";
|
|
33
|
+
children: import('react').ReactNode;
|
|
34
|
+
title?: import('react').ReactNode;
|
|
35
|
+
titleIcon?: string;
|
|
36
|
+
header?: import('react').ReactNode;
|
|
37
|
+
footer?: import('react').ReactNode;
|
|
38
|
+
width?: string;
|
|
39
|
+
maxWidth?: string;
|
|
40
|
+
backdrop?: boolean | "static";
|
|
41
|
+
scroll?: boolean;
|
|
42
|
+
keyboard?: boolean;
|
|
43
|
+
closeButton?: boolean;
|
|
44
|
+
closeLabel?: string;
|
|
45
|
+
responsive?: string;
|
|
46
|
+
className?: string;
|
|
47
|
+
bodyClassName?: string;
|
|
48
|
+
ariaLabel?: string;
|
|
49
|
+
}): import("react").JSX.Element;
|
|
@@ -9,10 +9,11 @@
|
|
|
9
9
|
*
|
|
10
10
|
* @param {object} props
|
|
11
11
|
* @param {number} props.page 1-based.
|
|
12
|
-
* @param {number} props.totalPages
|
|
12
|
+
* @param {number} [props.totalPages] Page count. Wins over `total` when given.
|
|
13
|
+
* @param {number} [props.total] Total rows across all pages. Used when totalPages is not given: pages = ceil(total / pageSize).
|
|
13
14
|
* @param {number} props.pageSize
|
|
14
|
-
* @param {(page: number) => void} props.onPageChange
|
|
15
|
-
* @param {(size: number) => void} props.onPageSizeChange
|
|
15
|
+
* @param {(page: number) => void} [props.onPageChange]
|
|
16
|
+
* @param {(size: number) => void} [props.onPageSizeChange]
|
|
16
17
|
* @param {number[]} [props.pageSizes]
|
|
17
18
|
* @param {'numbered'|'prev-next'} [props.mode='numbered'] numbered (default) puts windowed page
|
|
18
19
|
* buttons (first/last plus an ellipsis over any run of hidden pages) between the arrows.
|
|
@@ -23,10 +24,11 @@
|
|
|
23
24
|
*/
|
|
24
25
|
export default function AppTablePagination(props: {
|
|
25
26
|
page: number;
|
|
26
|
-
totalPages
|
|
27
|
+
totalPages?: number;
|
|
28
|
+
total?: number;
|
|
27
29
|
pageSize: number;
|
|
28
|
-
onPageChange
|
|
29
|
-
onPageSizeChange
|
|
30
|
+
onPageChange?: (page: number) => void;
|
|
31
|
+
onPageSizeChange?: (size: number) => void;
|
|
30
32
|
pageSizes?: number[];
|
|
31
33
|
mode?: 'numbered' | 'prev-next';
|
|
32
34
|
showPageSize?: boolean;
|
|
@@ -12,7 +12,7 @@ declare const AppTimePicker: import("react").ForwardRefExoticComponent<{
|
|
|
12
12
|
min?: string;
|
|
13
13
|
max?: string;
|
|
14
14
|
step?: number;
|
|
15
|
-
format?: '12' | '24';
|
|
15
|
+
format?: '12' | '24' | 12 | 24;
|
|
16
16
|
placeholder?: string;
|
|
17
17
|
disabled?: boolean;
|
|
18
18
|
size?: 'sm' | 'md' | 'lg';
|
|
@@ -15,6 +15,7 @@ export declare const GLYPHS: {
|
|
|
15
15
|
"arrow-up": string;
|
|
16
16
|
"arrow-up-right": string;
|
|
17
17
|
"badge-check": string;
|
|
18
|
+
ban: string;
|
|
18
19
|
bell: string;
|
|
19
20
|
book: string;
|
|
20
21
|
"box-seam": string;
|
|
@@ -106,6 +107,7 @@ export declare const GLYPHS: {
|
|
|
106
107
|
image: string;
|
|
107
108
|
inbox: string;
|
|
108
109
|
info: string;
|
|
110
|
+
"info-circle": string;
|
|
109
111
|
instagram: string;
|
|
110
112
|
kanban: string;
|
|
111
113
|
key: string;
|
|
@@ -113,6 +115,7 @@ export declare const GLYPHS: {
|
|
|
113
115
|
"layout-dashboard": string;
|
|
114
116
|
"layout-grid": string;
|
|
115
117
|
lightbulb: string;
|
|
118
|
+
linkedin: string;
|
|
116
119
|
list: string;
|
|
117
120
|
lock: string;
|
|
118
121
|
"lock-1": string;
|
|
@@ -127,6 +130,7 @@ export declare const GLYPHS: {
|
|
|
127
130
|
"message-square": string;
|
|
128
131
|
"message-text": string;
|
|
129
132
|
minus: string;
|
|
133
|
+
"minus-circle": string;
|
|
130
134
|
mobile: string;
|
|
131
135
|
monitor: string;
|
|
132
136
|
moon: string;
|
|
@@ -163,10 +167,12 @@ export declare const GLYPHS: {
|
|
|
163
167
|
"share-2": string;
|
|
164
168
|
shield: string;
|
|
165
169
|
"shield-check": string;
|
|
170
|
+
"shield-cross": string;
|
|
166
171
|
"shield-lock": string;
|
|
167
172
|
"shield-plus": string;
|
|
168
173
|
"shield-tick": string;
|
|
169
174
|
shop: string;
|
|
175
|
+
snowflake: string;
|
|
170
176
|
sort: string;
|
|
171
177
|
sparkles: string;
|
|
172
178
|
star: string;
|