@webority/ui-react 0.53.0 → 0.54.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/dist/components/AppActionIcon.js +1 -1
- package/dist/components/AppAvatar.js +1 -1
- package/dist/components/AppButton.js +1 -1
- package/dist/components/AppButtonGroup.js +1 -0
- package/dist/components/AppCarousel.js +1 -0
- package/dist/components/AppChipGroup.js +1 -0
- package/dist/components/AppCodeBlock.js +1 -0
- package/dist/components/AppCommandPalette.js +1 -1
- package/dist/components/AppCommentThread.js +1 -0
- package/dist/components/AppDataTable.js +1 -1
- package/dist/components/AppDateRangePicker.js +1 -1
- package/dist/components/AppDrawer.js +1 -0
- package/dist/components/AppDropdown.js +1 -1
- package/dist/components/AppEmptyState.js +1 -1
- package/dist/components/AppFilterBar.js +1 -1
- package/dist/components/AppHoverCard.js +1 -0
- package/dist/components/AppInlineEdit.js +1 -0
- package/dist/components/AppInputGroup.js +1 -0
- package/dist/components/AppKbd.js +1 -0
- package/dist/components/AppLightbox.js +1 -0
- package/dist/components/AppMentionInput.js +1 -0
- package/dist/components/AppMenubar.js +1 -0
- package/dist/components/AppNavigationMenu.js +1 -0
- package/dist/components/AppNotificationCenter.js +1 -0
- package/dist/components/AppOnboardingChecklist.js +1 -0
- package/dist/components/AppRating.js +1 -0
- package/dist/components/AppRecordPager.js +1 -0
- package/dist/components/AppRelativeTime.js +1 -0
- package/dist/components/AppResizable.js +1 -0
- package/dist/components/AppResizableHandle.js +1 -0
- package/dist/components/AppResizablePanel.js +1 -0
- package/dist/components/AppRollingNumber.js +1 -0
- package/dist/components/AppSectionCallToAction.js +1 -0
- package/dist/components/AppSectionFaq.js +1 -0
- package/dist/components/AppSectionFeatures.js +1 -0
- package/dist/components/AppSectionHero.js +1 -0
- package/dist/components/AppSectionLogos.js +1 -0
- package/dist/components/AppSectionPricing.js +1 -0
- package/dist/components/AppSectionTestimonials.js +1 -0
- package/dist/components/AppShortcutLegend.js +1 -0
- package/dist/components/AppShowMore.js +1 -0
- package/dist/components/AppSplitButton.js +1 -0
- package/dist/components/AppSplitView.js +1 -0
- package/dist/components/AppTableEmptyState.js +1 -1
- package/dist/components/AppTableToolbar.js +1 -1
- package/dist/components/AppTabs.js +1 -1
- package/dist/components/AppTooltip.js +1 -1
- package/dist/components/AppTruncate.js +1 -0
- package/dist/components/AppWhatsNew.js +1 -0
- package/dist/components/withTooltip.js +1 -1
- package/dist/lib/emptyIllustration.js +1 -0
- package/dist/lib/sectionShell.js +1 -0
- package/dist/lib/shortcutChip.js +1 -0
- package/dist/lib/useListShortcuts.js +1 -0
- package/dist/types/components/AppActionIcon.d.ts +4 -1
- package/dist/types/components/AppButton.d.ts +2 -1
- package/dist/types/components/AppButtonGroup.d.ts +23 -0
- package/dist/types/components/AppCarousel.d.ts +52 -0
- package/dist/types/components/AppChipGroup.d.ts +22 -0
- package/dist/types/components/AppCodeBlock.d.ts +28 -0
- package/dist/types/components/AppCommandPalette.d.ts +44 -2
- package/dist/types/components/AppCommentThread.d.ts +115 -0
- package/dist/types/components/AppDataTable.d.ts +44 -1
- package/dist/types/components/AppDateRangePicker.d.ts +5 -0
- package/dist/types/components/AppDrawer.d.ts +46 -0
- package/dist/types/components/AppDropdown.d.ts +4 -1
- package/dist/types/components/AppEmptyState.d.ts +4 -1
- package/dist/types/components/AppFilterBar.d.ts +9 -1
- package/dist/types/components/AppHoverCard.d.ts +35 -0
- package/dist/types/components/AppInlineEdit.d.ts +57 -0
- package/dist/types/components/AppInputGroup.d.ts +29 -0
- package/dist/types/components/AppKbd.d.ts +15 -0
- package/dist/types/components/AppLightbox.d.ts +40 -0
- package/dist/types/components/AppMentionInput.d.ts +41 -0
- package/dist/types/components/AppMenubar.d.ts +45 -0
- package/dist/types/components/AppNavigationMenu.d.ts +41 -0
- package/dist/types/components/AppNotificationCenter.d.ts +81 -0
- package/dist/types/components/AppOnboardingChecklist.d.ts +48 -0
- package/dist/types/components/AppRating.d.ts +48 -0
- package/dist/types/components/AppRecordPager.d.ts +38 -0
- package/dist/types/components/AppRelativeTime.d.ts +18 -0
- package/dist/types/components/AppResizable.d.ts +30 -0
- package/dist/types/components/AppResizableHandle.d.ts +13 -0
- package/dist/types/components/AppResizablePanel.d.ts +20 -0
- package/dist/types/components/AppRollingNumber.d.ts +27 -0
- package/dist/types/components/AppSectionCallToAction.d.ts +24 -0
- package/dist/types/components/AppSectionFaq.d.ts +28 -0
- package/dist/types/components/AppSectionFeatures.d.ts +37 -0
- package/dist/types/components/AppSectionHero.d.ts +32 -0
- package/dist/types/components/AppSectionLogos.d.ts +36 -0
- package/dist/types/components/AppSectionPricing.d.ts +28 -0
- package/dist/types/components/AppSectionTestimonials.d.ts +34 -0
- package/dist/types/components/AppShortcutLegend.d.ts +34 -0
- package/dist/types/components/AppShowMore.d.ts +29 -0
- package/dist/types/components/AppSplitButton.d.ts +53 -0
- package/dist/types/components/AppSplitView.d.ts +85 -0
- package/dist/types/components/AppTableEmptyState.d.ts +4 -1
- package/dist/types/components/AppTableToolbar.d.ts +13 -1
- package/dist/types/components/AppTabs.d.ts +12 -6
- package/dist/types/components/AppTooltip.d.ts +4 -1
- package/dist/types/components/AppTruncate.d.ts +21 -0
- package/dist/types/components/AppWhatsNew.d.ts +44 -0
- package/dist/types/components/withTooltip.d.ts +1 -1
- package/dist/types/index.d.ts +37 -0
- package/dist/types/lib/emptyIllustration.d.ts +22 -0
- package/dist/types/lib/sectionShell.d.ts +43 -0
- package/dist/types/lib/shortcutChip.d.ts +11 -0
- package/dist/types/lib/useListShortcuts.d.ts +24 -0
- package/dist/ui-react.js +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A field with add-ons attached to it: text before or after the value ("₹", "https://", ".com", "kg")
|
|
3
|
+
* or a button or select beside it (Copy, Apply, a unit picker). The add-ons share the field's outline
|
|
4
|
+
* and height. Put one label-less field inside (`AppInput`, `AppSelect`) and give the group the
|
|
5
|
+
* `label`, tied to the field by `htmlFor` (the field's `id`). For a unit that is only text inside the
|
|
6
|
+
* field use `AppInput`'s `unit`, `prefix` or `suffix`; this is for add-ons that are their own control
|
|
7
|
+
* or that must sit outside the field. Razor counterpart: `<app-input-group>`, whose rich add-ons are
|
|
8
|
+
* the `<app-input-group-leading>` and `<app-input-group-trailing>` children.
|
|
9
|
+
*
|
|
10
|
+
* @param {object} props
|
|
11
|
+
* @param {import('react').ReactNode} props.children The field.
|
|
12
|
+
* @param {import('react').ReactNode} [props.leading] Before the field: text, or a node such as an `AppButton`.
|
|
13
|
+
* @param {import('react').ReactNode} [props.trailing] After the field.
|
|
14
|
+
* @param {string} [props.label] The group's label, above it.
|
|
15
|
+
* @param {string} [props.htmlFor] The `id` of the field the label names.
|
|
16
|
+
* @param {boolean} [props.required=false] Marks the label required.
|
|
17
|
+
* @param {'sm'|'md'|'lg'} [props.size='md'] Height of text add-ons; set the same size on the field and on button add-ons.
|
|
18
|
+
* @param {string} [props.className]
|
|
19
|
+
*/
|
|
20
|
+
export default function AppInputGroup({ children, leading, trailing, label, htmlFor, required, size, className, ...rest }: {
|
|
21
|
+
children: import('react').ReactNode;
|
|
22
|
+
leading?: import('react').ReactNode;
|
|
23
|
+
trailing?: import('react').ReactNode;
|
|
24
|
+
label?: string;
|
|
25
|
+
htmlFor?: string;
|
|
26
|
+
required?: boolean;
|
|
27
|
+
size?: 'sm' | 'md' | 'lg';
|
|
28
|
+
className?: string;
|
|
29
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A key label: the `.wui-kbd` chip a shortcut is drawn with, for prose, help text and hand-built
|
|
3
|
+
* hints ("Press Esc to close"). Written the way the `shortcut` prop on `AppButton`, `AppTooltip`
|
|
4
|
+
* and `AppDropdown` items writes a key: one character in upper case, `esc` as Esc, `slash` as /,
|
|
5
|
+
* anything longer ("Ctrl K") as written. Unlike those chips it is part of the text, so assistive
|
|
6
|
+
* tech reads it; to bind a key, put `shortcut` on the control instead.
|
|
7
|
+
*
|
|
8
|
+
* @param {object} props
|
|
9
|
+
* @param {string|number} props.children The key: "K", "Enter", "Ctrl K".
|
|
10
|
+
* @param {string} [props.className]
|
|
11
|
+
*/
|
|
12
|
+
export default function AppKbd({ children, className, ...rest }: {
|
|
13
|
+
children: string | number;
|
|
14
|
+
className?: string;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/lightbox";
|
|
2
|
+
/**
|
|
3
|
+
* A gallery of thumbnails that open full screen: click one and the image fills the screen with
|
|
4
|
+
* zoom, previous and next, a caption and an optional download. Use it for photo galleries and
|
|
5
|
+
* image attachments that would otherwise open in a new tab.
|
|
6
|
+
*
|
|
7
|
+
* Keys: Left and Right change image (wrapping), + and - zoom, 0 resets the zoom, Escape closes and
|
|
8
|
+
* puts focus back on the thumbnail of the image last shown. On a touch screen, swipe sideways to
|
|
9
|
+
* change image, pinch or double tap to zoom, drag to pan, and tap beside the image to close.
|
|
10
|
+
* A click with Ctrl, Cmd or Shift still opens the image's own link. The behaviour is the shared
|
|
11
|
+
* `<wui-lightbox>` element, which Razor `<app-lightbox>` renders too.
|
|
12
|
+
*
|
|
13
|
+
* @param {object} props
|
|
14
|
+
* @param {{ src: string, thumb?: string, alt?: string, caption?: string, name?: string, key?: string }[]} props.items
|
|
15
|
+
* The images. `src` is the full image, `thumb` the thumbnail (default: `src`), `alt` its text
|
|
16
|
+
* alternative (default: the caption), `caption` the line under it in the full-screen view and
|
|
17
|
+
* `name` the file name a download saves under (default: the last part of `src`).
|
|
18
|
+
* @param {boolean} [props.download=false] Shows a download action. A browser ignores `name` for an
|
|
19
|
+
* image on another origin.
|
|
20
|
+
* @param {string} [props.label="Image viewer"] The full-screen dialog's name for screen readers.
|
|
21
|
+
* @param {(index: number) => void} [props.onChange] Called with the position (from 0) of the
|
|
22
|
+
* image shown, when the view opens and each time it changes.
|
|
23
|
+
* @param {() => void} [props.onClose] Called when the full-screen view closes.
|
|
24
|
+
* @param {string} [props.className]
|
|
25
|
+
*/
|
|
26
|
+
export default function AppLightbox({ items, download, label, onChange, onClose, className, ...rest }: {
|
|
27
|
+
items: {
|
|
28
|
+
src: string;
|
|
29
|
+
thumb?: string;
|
|
30
|
+
alt?: string;
|
|
31
|
+
caption?: string;
|
|
32
|
+
name?: string;
|
|
33
|
+
key?: string;
|
|
34
|
+
}[];
|
|
35
|
+
download?: boolean;
|
|
36
|
+
label?: string;
|
|
37
|
+
onChange?: (index: number) => void;
|
|
38
|
+
onClose?: () => void;
|
|
39
|
+
className?: string;
|
|
40
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/mention-input";
|
|
2
|
+
/**
|
|
3
|
+
* A text box where "@" opens a list of people to mention. Up and Down choose, Enter or Tab
|
|
4
|
+
* mention, Escape closes the list; the person reads "@Asha Rao" in the text. Typing inside a
|
|
5
|
+
* mention turns it back into plain text, and Backspace just after one removes it whole.
|
|
6
|
+
*
|
|
7
|
+
* The value is plain text with each mention stored as `@[Asha Rao](u-12)`: never HTML, so it can
|
|
8
|
+
* be saved and shown anywhere without escaping worries. Show a saved value with `AppCommentThread`,
|
|
9
|
+
* or read it with `parseMentionValue` and `mentionedIds` from `@webority/ui-elements/elements/mention-input`
|
|
10
|
+
* (the server's twin is `MentionText` in Webority.Ui.Razor).
|
|
11
|
+
*
|
|
12
|
+
* Wraps the shared `<wui-mention-input>` element; Razor `<app-mention-input>` renders the same box.
|
|
13
|
+
*
|
|
14
|
+
* @param {object} props
|
|
15
|
+
* @param {string} [props.value] The stored value (`Thanks @[Asha Rao](u-12)`).
|
|
16
|
+
* @param {(value: string, meta: { mentions: { id: string, label: string }[] }) => void} [props.onChange]
|
|
17
|
+
* Called on every edit with the stored value and the people it mentions, each once.
|
|
18
|
+
* @param {{ value: string, label: string, description?: string, src?: string }[]} [props.people]
|
|
19
|
+
* The people to offer. `value` is the person's public id (letters, digits, `_ . : -`).
|
|
20
|
+
* @param {(query: string, opts?: { signal?: AbortSignal }) => Promise<{ value: string, label: string, description?: string, src?: string }[]>} [props.loadPeople]
|
|
21
|
+
* Look people up as the person types after "@" (instead of `people`).
|
|
22
|
+
* @param {number} [props.minChars=1] How many letters after "@" before `loadPeople` runs.
|
|
23
|
+
* @param {number} [props.debounce=250] Milliseconds to wait for typing to pause before `loadPeople` runs.
|
|
24
|
+
* @param {() => void} [props.onSubmit] Ctrl or Cmd+Enter in the box (send a comment).
|
|
25
|
+
* @param {number} [props.rows=3] Visible lines.
|
|
26
|
+
* @param {string} [props.placeholder]
|
|
27
|
+
* @param {boolean} [props.disabled=false]
|
|
28
|
+
* @param {string} [props.name] Posts the stored value under this name in a form.
|
|
29
|
+
* @param {string} [props.id] The element's id; the text box is `{id}-text`, the label's target.
|
|
30
|
+
* @param {import('react').ReactNode} [props.label] Shown above the box; a string also names it.
|
|
31
|
+
* @param {string} [props.error]
|
|
32
|
+
* @param {string} [props.hint]
|
|
33
|
+
* @param {boolean} [props.required=false]
|
|
34
|
+
* @param {import('react').ReactNode} [props.help] Help content in an info tip beside the label.
|
|
35
|
+
* @param {string} [props.helpLabel="More information"] Accessible name for that info tip.
|
|
36
|
+
* @param {string} [props.className] Extra classes on the element.
|
|
37
|
+
* @param {string} [props.fieldClassName] Extra classes on the field wrapper.
|
|
38
|
+
* @param {import('react').Ref<HTMLElement>} [ref] The `<wui-mention-input>` element.
|
|
39
|
+
*/
|
|
40
|
+
declare const AppMentionInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
|
|
41
|
+
export default AppMentionInput;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/menubar";
|
|
2
|
+
/**
|
|
3
|
+
* An application menubar (File, Edit, View) whose menus open on click and on the arrow keys. The
|
|
4
|
+
* bar is one tab stop: Left and Right move across the menus, Down and Up open one, Right opens a
|
|
5
|
+
* submenu, Escape closes a level and Tab leaves; a letter jumps to the next row starting with it.
|
|
6
|
+
* Once a menu is open, pointing at another menu opens it instead. A row can carry a `shortcut`
|
|
7
|
+
* hint, drawn as a key chip at its end; like `AppDropdown` it only shows and announces the key, the
|
|
8
|
+
* page binds it. The behaviour is the shared `<wui-menubar>` element, the same one the Razor
|
|
9
|
+
* `<app-menubar>` uses. For a site's top navigation with dropdown panels use `AppNavigationMenu`.
|
|
10
|
+
*
|
|
11
|
+
* NOTE: the exported component must stay the FIRST destructured function in this file —
|
|
12
|
+
* the parity check reads the first signature it finds as the component's public props.
|
|
13
|
+
*
|
|
14
|
+
* @param {object} props
|
|
15
|
+
* @param {{ key: string, label: string, disabled?: boolean, items: { key: string, label?: string, icon?: string|import('react').ReactNode, to?: string, onClick?: () => void, shortcut?: string, danger?: boolean, disabled?: boolean, divider?: true, items?: object[] }[] }[]} props.menus
|
|
16
|
+
* The menus, left to right. A row is an action (`onClick`) or a link (`to`); `items` makes it a
|
|
17
|
+
* submenu opener (`onClick` and `to` are then ignored); `divider: true` is a separator and needs
|
|
18
|
+
* only a unique `key`. `icon` is a glyph name or a node. A `disabled` row is listed but skipped by
|
|
19
|
+
* the arrow keys and cannot be chosen.
|
|
20
|
+
* @param {string} [props.ariaLabel='Application menu'] Accessible name of the bar.
|
|
21
|
+
* @param {import('react').ElementType} [props.linkComponent] Component for `to` rows (e.g. Link).
|
|
22
|
+
* @param {string} [props.className]
|
|
23
|
+
*/
|
|
24
|
+
export default function AppMenubar({ menus, ariaLabel, linkComponent, className, ...rest }: {
|
|
25
|
+
menus: {
|
|
26
|
+
key: string;
|
|
27
|
+
label: string;
|
|
28
|
+
disabled?: boolean;
|
|
29
|
+
items: {
|
|
30
|
+
key: string;
|
|
31
|
+
label?: string;
|
|
32
|
+
icon?: string | import('react').ReactNode;
|
|
33
|
+
to?: string;
|
|
34
|
+
onClick?: () => void;
|
|
35
|
+
shortcut?: string;
|
|
36
|
+
danger?: boolean;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
divider?: true;
|
|
39
|
+
items?: object[];
|
|
40
|
+
}[];
|
|
41
|
+
}[];
|
|
42
|
+
ariaLabel?: string;
|
|
43
|
+
linkComponent?: import('react').ElementType;
|
|
44
|
+
className?: string;
|
|
45
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/navigation-menu";
|
|
2
|
+
/**
|
|
3
|
+
* A site's top navigation with dropdown panels. An entry is a link (`to`) or a button that opens a
|
|
4
|
+
* panel of `links`, each with an optional description. A panel opens on a click, Enter, Space or
|
|
5
|
+
* Down on its button, never on hover alone; Tab walks the links in page order, Left and Right move
|
|
6
|
+
* along the entries, Escape closes the panel and returns focus to its button, and so does choosing
|
|
7
|
+
* a link or clicking out. One panel is open at a time, and one that would leave the screen aligns
|
|
8
|
+
* to the end of its entry. Below `md` the entries stack and a panel opens in the page flow. The
|
|
9
|
+
* behaviour is the shared `<wui-navigation-menu>` element, the same one the Razor
|
|
10
|
+
* `<app-navigation-menu>` uses. For an application menubar (File, Edit) use `AppMenubar`.
|
|
11
|
+
*
|
|
12
|
+
* NOTE: the exported component must stay the FIRST destructured function in this file —
|
|
13
|
+
* the parity check reads the first signature it finds as the component's public props.
|
|
14
|
+
*
|
|
15
|
+
* @param {object} props
|
|
16
|
+
* @param {{ key: string, label: string, to?: string, current?: boolean, links?: { key: string, label: string, to: string, description?: string, icon?: string|import('react').ReactNode, current?: boolean }[] }[]} props.items
|
|
17
|
+
* The entries, left to right. An entry with `links` is a button that opens them; without, it is a
|
|
18
|
+
* link to `to`. `current` marks the page the visitor is on (`aria-current="page"`).
|
|
19
|
+
* @param {string} [props.ariaLabel='Main'] Accessible name of the navigation landmark.
|
|
20
|
+
* @param {import('react').ElementType} [props.linkComponent] Component for `to` links (e.g. Link).
|
|
21
|
+
* @param {string} [props.className]
|
|
22
|
+
*/
|
|
23
|
+
export default function AppNavigationMenu({ items, ariaLabel, linkComponent, className, ...rest }: {
|
|
24
|
+
items: {
|
|
25
|
+
key: string;
|
|
26
|
+
label: string;
|
|
27
|
+
to?: string;
|
|
28
|
+
current?: boolean;
|
|
29
|
+
links?: {
|
|
30
|
+
key: string;
|
|
31
|
+
label: string;
|
|
32
|
+
to: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
icon?: string | import('react').ReactNode;
|
|
35
|
+
current?: boolean;
|
|
36
|
+
}[];
|
|
37
|
+
}[];
|
|
38
|
+
ariaLabel?: string;
|
|
39
|
+
linkComponent?: import('react').ElementType;
|
|
40
|
+
className?: string;
|
|
41
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/notification-center";
|
|
2
|
+
export type NotificationItem = {
|
|
3
|
+
/**
|
|
4
|
+
* Stable id; names the item to `onItemClick` and to the server.
|
|
5
|
+
*/
|
|
6
|
+
id: string;
|
|
7
|
+
/**
|
|
8
|
+
* The one line that says what happened.
|
|
9
|
+
*/
|
|
10
|
+
title: string;
|
|
11
|
+
/**
|
|
12
|
+
* A second, quieter line.
|
|
13
|
+
*/
|
|
14
|
+
text?: string;
|
|
15
|
+
/**
|
|
16
|
+
* The record the item opens. Without it the item is a button.
|
|
17
|
+
*/
|
|
18
|
+
href?: string;
|
|
19
|
+
/**
|
|
20
|
+
* When it happened: an ISO date-time with its zone ("2026-10-11T14:05:00+05:30")
|
|
21
|
+
* or a "YYYY-MM-DD" day. It sets the day group and the time shown, in India Standard Time.
|
|
22
|
+
*/
|
|
23
|
+
at: string;
|
|
24
|
+
/**
|
|
25
|
+
* Already read: no dot, regular weight.
|
|
26
|
+
*/
|
|
27
|
+
read?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* A library icon name, drawn before the text.
|
|
30
|
+
*/
|
|
31
|
+
icon?: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* @typedef {object} NotificationItem
|
|
35
|
+
* @property {string} id Stable id; names the item to `onItemClick` and to the server.
|
|
36
|
+
* @property {string} title The one line that says what happened.
|
|
37
|
+
* @property {string} [text] A second, quieter line.
|
|
38
|
+
* @property {string} [href] The record the item opens. Without it the item is a button.
|
|
39
|
+
* @property {string} at When it happened: an ISO date-time with its zone ("2026-10-11T14:05:00+05:30")
|
|
40
|
+
* or a "YYYY-MM-DD" day. It sets the day group and the time shown, in India Standard Time.
|
|
41
|
+
* @property {boolean} [read] Already read: no dot, regular weight.
|
|
42
|
+
* @property {string} [icon] A library icon name, drawn before the text.
|
|
43
|
+
*/
|
|
44
|
+
/**
|
|
45
|
+
* A bell with an unread count that opens a panel of notifications grouped by day (Today, Yesterday,
|
|
46
|
+
* then 04-Oct-2026), each with an unread dot, a link to its record and a "Mark all read" action.
|
|
47
|
+
* For a portal's own notifications; the topbar bell of `AppShell` (`notifications`) is the same idea
|
|
48
|
+
* fed from a server fragment. Pass `items` newest first.
|
|
49
|
+
*
|
|
50
|
+
* Read state is yours: mark items read in `onItemClick` and `onMarkAllRead`, then pass the new
|
|
51
|
+
* `items`. The panel opens and closes on its own: the bell, Escape (focus returns to the bell), a
|
|
52
|
+
* press or focus outside, and the arrow keys, Home and End between items, through
|
|
53
|
+
* `<wui-notification-center>`, which Razor `<app-notification-center>` renders too.
|
|
54
|
+
*
|
|
55
|
+
* @param {object} props
|
|
56
|
+
* @param {NotificationItem[]} props.items Newest first.
|
|
57
|
+
* @param {number} [props.unread] The badge count when it is larger than the items listed (the latest
|
|
58
|
+
* twenty of 120). Defaults to the number of unread items.
|
|
59
|
+
* @param {string} [props.label="Notifications"] The bell's name and the panel heading.
|
|
60
|
+
* @param {string} [props.emptyText="You are all caught up."] Shown when there are no items.
|
|
61
|
+
* @param {string} [props.viewAllHref] A "View all" link under the list. Absent: no link.
|
|
62
|
+
* @param {boolean} [props.defaultOpen=false] Start with the panel open; the element owns it after that.
|
|
63
|
+
* @param {string|number|Date} [props.now] The clock for Today and Yesterday; the current time by default.
|
|
64
|
+
* @param {() => void} [props.onMarkAllRead] Called by "Mark all read". Absent: no button.
|
|
65
|
+
* @param {(item: NotificationItem, event: import('react').MouseEvent) => void} [props.onItemClick] Called when an item is chosen, before its link is followed.
|
|
66
|
+
* @param {(open: boolean) => void} [props.onOpenChange] Called when the panel opens or closes.
|
|
67
|
+
* @param {string} [props.className]
|
|
68
|
+
*/
|
|
69
|
+
export default function AppNotificationCenter({ items, unread, label, emptyText, viewAllHref, defaultOpen, now, onMarkAllRead, onItemClick, onOpenChange, className, ...rest }: {
|
|
70
|
+
items: NotificationItem[];
|
|
71
|
+
unread?: number;
|
|
72
|
+
label?: string;
|
|
73
|
+
emptyText?: string;
|
|
74
|
+
viewAllHref?: string;
|
|
75
|
+
defaultOpen?: boolean;
|
|
76
|
+
now?: string | number | Date;
|
|
77
|
+
onMarkAllRead?: () => void;
|
|
78
|
+
onItemClick?: (item: NotificationItem, event: import('react').MouseEvent) => void;
|
|
79
|
+
onOpenChange?: (open: boolean) => void;
|
|
80
|
+
className?: string;
|
|
81
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/onboarding-checklist";
|
|
2
|
+
/**
|
|
3
|
+
* A first-run setup checklist: a short list of steps with the progress so far, each step linking to
|
|
4
|
+
* where it is done. A step is `done`, `current` (the one to do next), `skipped` or `todo`; with none
|
|
5
|
+
* marked current, the first step to do is. The head shows "2 of 4 done" and a bar of one segment per
|
|
6
|
+
* step. The heading collapses the steps, the close icon dismisses the whole checklist to a single
|
|
7
|
+
* "Show setup checklist" button, and a checklist whose every step is done or skipped starts collapsed.
|
|
8
|
+
*
|
|
9
|
+
* It keeps its own collapsed and dismissed state after the first render (`defaultCollapsed`,
|
|
10
|
+
* `defaultDismissed`); `onDismiss`, `onRestore` and `onCollapsedChange` report changes. With
|
|
11
|
+
* `storageKey` a dismissal is remembered in the browser. Wraps `<wui-onboarding-checklist>`, which
|
|
12
|
+
* Razor `<app-onboarding-checklist>` renders too.
|
|
13
|
+
*
|
|
14
|
+
* @param {object} props
|
|
15
|
+
* @param {{ key?: string, label: string, description?: string, href?: string, status?: 'done'|'current'|'skipped'|'todo' }[]} props.steps
|
|
16
|
+
* The steps in order. `href` makes the label a link to where the step is done; `status` defaults to `todo`.
|
|
17
|
+
* @param {string} [props.title="Get started"] The heading, and the name of the progress bar.
|
|
18
|
+
* @param {boolean} [props.defaultCollapsed] Whether the steps start collapsed. Defaults to whether every step is done or skipped.
|
|
19
|
+
* @param {boolean} [props.defaultDismissed=false] Whether the checklist starts dismissed, showing only the restore button.
|
|
20
|
+
* @param {string} [props.storageKey] Remembers a dismissal across visits under this key (one per checklist). Unset, it lasts the page.
|
|
21
|
+
* @param {string} [props.dismissLabel="Dismiss checklist"] The name and tooltip of the close icon.
|
|
22
|
+
* @param {string} [props.restoreLabel="Show setup checklist"] The text of the button that brings a dismissed checklist back.
|
|
23
|
+
* @param {() => void} [props.onDismiss] Called when the checklist is dismissed.
|
|
24
|
+
* @param {() => void} [props.onRestore] Called when a dismissed checklist is brought back.
|
|
25
|
+
* @param {(collapsed: boolean) => void} [props.onCollapsedChange] Called when the heading collapses or expands the steps.
|
|
26
|
+
* @param {import('react').ElementType} [props.linkComponent] Router link for a step with an `href`; it receives `to` instead of `href`.
|
|
27
|
+
* @param {string} [props.className]
|
|
28
|
+
*/
|
|
29
|
+
export default function AppOnboardingChecklist({ steps, title, defaultCollapsed, defaultDismissed, storageKey, dismissLabel, restoreLabel, onDismiss, onRestore, onCollapsedChange, linkComponent: Link, className, ...rest }: {
|
|
30
|
+
steps: {
|
|
31
|
+
key?: string;
|
|
32
|
+
label: string;
|
|
33
|
+
description?: string;
|
|
34
|
+
href?: string;
|
|
35
|
+
status?: 'done' | 'current' | 'skipped' | 'todo';
|
|
36
|
+
}[];
|
|
37
|
+
title?: string;
|
|
38
|
+
defaultCollapsed?: boolean;
|
|
39
|
+
defaultDismissed?: boolean;
|
|
40
|
+
storageKey?: string;
|
|
41
|
+
dismissLabel?: string;
|
|
42
|
+
restoreLabel?: string;
|
|
43
|
+
onDismiss?: () => void;
|
|
44
|
+
onRestore?: () => void;
|
|
45
|
+
onCollapsedChange?: (collapsed: boolean) => void;
|
|
46
|
+
linkComponent?: import('react').ElementType;
|
|
47
|
+
className?: string;
|
|
48
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/rating";
|
|
2
|
+
/**
|
|
3
|
+
* A star rating: an input that takes a whole number from 1 to `max` (arrow keys move and choose,
|
|
4
|
+
* it posts with its form), or with `readOnly` a display for a list or a card. The display names
|
|
5
|
+
* its value to a screen reader ("4.5 out of 5") and, with `half`, draws half stars. Wraps
|
|
6
|
+
* `<wui-rating>`, which Razor `<app-rating>` renders too.
|
|
7
|
+
*
|
|
8
|
+
* As an input it is a labelled radiogroup laid out like any other field. Leave `value` out to
|
|
9
|
+
* let it hold its own value (`defaultValue` seeds it).
|
|
10
|
+
*
|
|
11
|
+
* @param {object} props
|
|
12
|
+
* @param {number} [props.value] The rating (controlled as an input). A display may hold a fraction such as 4.3; an input rounds to a whole star.
|
|
13
|
+
* @param {number} [props.defaultValue] Initial rating of an uncontrolled input.
|
|
14
|
+
* @param {(value: number) => void} [props.onChange] Called with the chosen rating (input only).
|
|
15
|
+
* @param {number} [props.max=5] How many stars.
|
|
16
|
+
* @param {boolean} [props.readOnly=false] A display, not an input.
|
|
17
|
+
* @param {boolean} [props.half=false] Display only: draw the value to the nearest half star.
|
|
18
|
+
* @param {boolean} [props.showValue=false] Display only: print the number beside the stars.
|
|
19
|
+
* @param {"sm"|"md"|"lg"} [props.size="md"]
|
|
20
|
+
* @param {import('react').ReactNode} [props.label] Input: the visible group label and its name. Display: prefix of the spoken text ("Quality: 4.5 out of 5"); a string.
|
|
21
|
+
* @param {string} [props.name] Input only: the form field name. Defaults to a generated one.
|
|
22
|
+
* @param {boolean} [props.required=false] Input only.
|
|
23
|
+
* @param {boolean} [props.disabled=false] Input only.
|
|
24
|
+
* @param {string} [props.error] Input only: message below the stars. Replaces the hint.
|
|
25
|
+
* @param {string} [props.hint] Input only: helper text below the stars.
|
|
26
|
+
* @param {string} [props.id]
|
|
27
|
+
* @param {string} [props.className] Class on the stars (the control).
|
|
28
|
+
* @param {string} [props.fieldClassName] Input only: class on the `.field` wrapper.
|
|
29
|
+
*/
|
|
30
|
+
export default function AppRating({ value, defaultValue, onChange, max, readOnly, half, showValue, size, label, name, required, disabled, error, hint, id, className, fieldClassName, ...rest }: {
|
|
31
|
+
value?: number;
|
|
32
|
+
defaultValue?: number;
|
|
33
|
+
onChange?: (value: number) => void;
|
|
34
|
+
max?: number;
|
|
35
|
+
readOnly?: boolean;
|
|
36
|
+
half?: boolean;
|
|
37
|
+
showValue?: boolean;
|
|
38
|
+
size?: "sm" | "md" | "lg";
|
|
39
|
+
label?: import('react').ReactNode;
|
|
40
|
+
name?: string;
|
|
41
|
+
required?: boolean;
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
error?: string;
|
|
44
|
+
hint?: string;
|
|
45
|
+
id?: string;
|
|
46
|
+
className?: string;
|
|
47
|
+
fieldClassName?: string;
|
|
48
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/record-pager";
|
|
2
|
+
/**
|
|
3
|
+
* Moves between the records of a list without going back to it: "12 of 47" and previous and next
|
|
4
|
+
* action icons, for a detail page's header (`AppPageHeader` `actions`) or a reading pane's header
|
|
5
|
+
* (`AppSplitView` draws one for its open item). Distinct from `AppPagination` and
|
|
6
|
+
* `AppTablePagination`, which move between pages of a list.
|
|
7
|
+
*
|
|
8
|
+
* Each direction is a link (`prevHref`, `nextHref`), a handler (`onPrev`, `onNext`) or both (the
|
|
9
|
+
* handler runs on the link's click and may prevent it). A direction with neither, or at either end,
|
|
10
|
+
* is disabled. With `keys`, J presses next and K previous, ignored in fields and when the page has
|
|
11
|
+
* single-key shortcuts off; leave it off where a list already owns J and K (a split view). Wraps
|
|
12
|
+
* `<wui-record-pager>`, which Razor `<app-record-pager>` renders too.
|
|
13
|
+
*
|
|
14
|
+
* @param {object} props
|
|
15
|
+
* @param {number} [props.index] The position of this record, from 1. Without it (nothing open) the
|
|
16
|
+
* label is empty and both icons are disabled.
|
|
17
|
+
* @param {number} [props.total] How many records the list holds.
|
|
18
|
+
* @param {string} [props.prevHref] The previous record's URL.
|
|
19
|
+
* @param {(event: import('react').MouseEvent) => void} [props.onPrev] Called on previous.
|
|
20
|
+
* @param {string} [props.nextHref] The next record's URL.
|
|
21
|
+
* @param {(event: import('react').MouseEvent) => void} [props.onNext] Called on next.
|
|
22
|
+
* @param {string} [props.prevLabel="Previous"] The previous icon's name and tooltip ("Previous invoice").
|
|
23
|
+
* @param {string} [props.nextLabel="Next"] The next icon's name and tooltip ("Next invoice").
|
|
24
|
+
* @param {boolean} [props.keys=false] J and K press next and previous.
|
|
25
|
+
* @param {string} [props.className]
|
|
26
|
+
*/
|
|
27
|
+
export default function AppRecordPager({ index, total, prevHref, onPrev, nextHref, onNext, prevLabel, nextLabel, keys, className, ...rest }: {
|
|
28
|
+
index?: number;
|
|
29
|
+
total?: number;
|
|
30
|
+
prevHref?: string;
|
|
31
|
+
onPrev?: (event: import('react').MouseEvent) => void;
|
|
32
|
+
nextHref?: string;
|
|
33
|
+
onNext?: (event: import('react').MouseEvent) => void;
|
|
34
|
+
prevLabel?: string;
|
|
35
|
+
nextLabel?: string;
|
|
36
|
+
keys?: boolean;
|
|
37
|
+
className?: string;
|
|
38
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A moment in plain words ("5 minutes ago", "in 2 hours") that keeps itself current, with the
|
|
3
|
+
* exact IST time on hover ("04-Oct-2026 14:05 IST"). A week or more away it reads as the date
|
|
4
|
+
* (04-Oct-2026). Renders a `<time>`, so the machine-readable value stays in the page. Wraps
|
|
5
|
+
* `<wui-relative-time>`, which Razor `<app-relative-time>` renders too.
|
|
6
|
+
*
|
|
7
|
+
* @param {object} props
|
|
8
|
+
* @param {string|number|Date} props.value The moment: an ISO string sent with its zone ("Z" or an
|
|
9
|
+
* offset), epoch milliseconds, or a Date. A bare "2026-10-04" is midnight IST. A missing or
|
|
10
|
+
* unreadable value shows "-" and no tooltip.
|
|
11
|
+
* @param {'auto'|'top'|'bottom'|'start'|'end'} [props.tooltipPlacement='auto'] Preferred side of the exact-time tooltip.
|
|
12
|
+
* @param {string} [props.className]
|
|
13
|
+
*/
|
|
14
|
+
export default function AppRelativeTime({ value, tooltipPlacement, className, ...rest }: {
|
|
15
|
+
value: string | number | Date;
|
|
16
|
+
tooltipPlacement?: 'auto' | 'top' | 'bottom' | 'start' | 'end';
|
|
17
|
+
className?: string;
|
|
18
|
+
}): any;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/resizable";
|
|
2
|
+
export declare const ResizableDirection: import("react").Context<string>;
|
|
3
|
+
/**
|
|
4
|
+
* A group of panels the person resizes: drag a handle with a mouse, pen or finger, or focus it and
|
|
5
|
+
* press the arrow keys (5%, Shift 20%), Home and End (the panel before it to its minimum or maximum),
|
|
6
|
+
* or double click to restore the default sizes. Put an `AppResizableHandle` between each pair of
|
|
7
|
+
* `AppResizablePanel`s: a reading pane beside a list, an editor above its preview, two sides of a compare.
|
|
8
|
+
*
|
|
9
|
+
* Sizes are percentages of the room the panels share and always add up to 100; a panel without a
|
|
10
|
+
* `defaultSize` shares what the sized ones leave. With `storageKey` the layout is remembered per
|
|
11
|
+
* screen in the browser; a stored layout that no longer fits the panels is ignored. A vertical group
|
|
12
|
+
* stacks its panels and needs a height: set `--wui-resizable-height` through `style`, or give its
|
|
13
|
+
* parent one. Wraps `<wui-resizable>`, which Razor `<app-resizable>` renders too.
|
|
14
|
+
*
|
|
15
|
+
* @param {object} props
|
|
16
|
+
* @param {'horizontal'|'vertical'} [props.direction='horizontal'] `horizontal` puts the panels side by
|
|
17
|
+
* side, `vertical` stacks them.
|
|
18
|
+
* @param {string} [props.storageKey] Remember the sizes under this name (one per screen).
|
|
19
|
+
* @param {(sizes: number[]) => void} [props.onChange] Called with every panel's size in percent after a
|
|
20
|
+
* drag, key press or reset that changed the layout, not while a drag is still moving.
|
|
21
|
+
* @param {import('react').ReactNode} [props.children] `AppResizablePanel`s with an `AppResizableHandle` between each pair.
|
|
22
|
+
* @param {string} [props.className]
|
|
23
|
+
*/
|
|
24
|
+
export default function AppResizable({ direction, storageKey, onChange, children, className, ...rest }: {
|
|
25
|
+
direction?: 'horizontal' | 'vertical';
|
|
26
|
+
storageKey?: string;
|
|
27
|
+
onChange?: (sizes: number[]) => void;
|
|
28
|
+
children?: import('react').ReactNode;
|
|
29
|
+
className?: string;
|
|
30
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The draggable divider between two `AppResizablePanel`s. It is a keyboard-focusable separator
|
|
3
|
+
* (arrow keys, Home, End) that resizes the panel before it against the panel after it; its current
|
|
4
|
+
* size and limits are announced to assistive technology.
|
|
5
|
+
*
|
|
6
|
+
* @param {object} props
|
|
7
|
+
* @param {string} [props.label='Resize panels'] Its accessible name; say what it resizes ("Resize the list").
|
|
8
|
+
* @param {string} [props.className]
|
|
9
|
+
*/
|
|
10
|
+
export default function AppResizableHandle({ label, className, ...rest }: {
|
|
11
|
+
label?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One panel of an `AppResizable` group. Its content scrolls inside it. Sizes are percentages of the
|
|
3
|
+
* room the panels share.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props
|
|
6
|
+
* @param {number} [props.defaultSize] The starting size in percent. Panels without one share what the sized ones leave.
|
|
7
|
+
* @param {number} [props.minSize=10] The smallest the person can make it, in percent.
|
|
8
|
+
* @param {number} [props.maxSize=100] The largest the person can make it, in percent.
|
|
9
|
+
* @param {import('react').ReactNode} [props.children]
|
|
10
|
+
* @param {string} [props.className]
|
|
11
|
+
* @param {import('react').CSSProperties} [props.style]
|
|
12
|
+
*/
|
|
13
|
+
export default function AppResizablePanel({ defaultSize, minSize, maxSize, children, className, style, ...rest }: {
|
|
14
|
+
defaultSize?: number;
|
|
15
|
+
minSize?: number;
|
|
16
|
+
maxSize?: number;
|
|
17
|
+
children?: import('react').ReactNode;
|
|
18
|
+
className?: string;
|
|
19
|
+
style?: import('react').CSSProperties;
|
|
20
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import "@webority/ui-elements/elements/rolling-number";
|
|
2
|
+
/**
|
|
3
|
+
* A figure that rolls its digits to the new value when it changes, instead of jumping: a total, a
|
|
4
|
+
* count, a cart amount. Indian digit grouping and the rupee sign come from the shared formatters,
|
|
5
|
+
* and the symbols stay still while the digits move. A screen reader reads the final value as plain
|
|
6
|
+
* text, once; the rolling digits are hidden from it. Under reduced motion the figure just changes.
|
|
7
|
+
* The first value never animates. Wraps `<wui-rolling-number>`, which Razor `<app-rolling-number>`
|
|
8
|
+
* renders too.
|
|
9
|
+
*
|
|
10
|
+
* @param {object} props
|
|
11
|
+
* @param {number} [props.value] The figure. Without a number it shows a hyphen.
|
|
12
|
+
* @param {'number'|'currency'|'percent'} [props.format="number"] `currency` is rupees (₹12,55,015);
|
|
13
|
+
* `percent` takes a ratio (0.125 is 12.5%).
|
|
14
|
+
* @param {'rupees'|'paise'} [props.unit="rupees"] What `value` counts, for `currency`.
|
|
15
|
+
* @param {number} [props.decimals] Fraction digits: fixed for `currency` (default 0), the most shown
|
|
16
|
+
* for `number` (default 2) and `percent` (default 1).
|
|
17
|
+
* @param {number} [props.duration=600] How long the roll takes, in milliseconds.
|
|
18
|
+
* @param {string} [props.className]
|
|
19
|
+
*/
|
|
20
|
+
export default function AppRollingNumber({ value, format, unit, decimals, duration, className, ...rest }: {
|
|
21
|
+
value?: number;
|
|
22
|
+
format?: 'number' | 'currency' | 'percent';
|
|
23
|
+
unit?: 'rupees' | 'paise';
|
|
24
|
+
decimals?: number;
|
|
25
|
+
duration?: number;
|
|
26
|
+
className?: string;
|
|
27
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The closing band of a public page: a heading, a sentence and the buttons on a soft brand
|
|
3
|
+
* panel. Renders the same markup as the Razor `<app-section-call-to-action>`.
|
|
4
|
+
*
|
|
5
|
+
* @param {object} props
|
|
6
|
+
* @param {import('react').ReactNode} props.title The section's heading.
|
|
7
|
+
* @param {import('react').ReactNode} [props.actions] The buttons, usually a primary `AppButton` and an outline one.
|
|
8
|
+
* @param {"h1"|"h2"|"h3"|"h4"|"h5"|"h6"} [props.as="h2"] The heading element.
|
|
9
|
+
* @param {import('react').ReactNode} [props.eyebrow] A short label above the heading.
|
|
10
|
+
* @param {import('react').ReactNode} [props.subtitle] A sentence under the heading.
|
|
11
|
+
* @param {"start"|"center"} [props.align="center"] Where the copy and buttons sit in the panel.
|
|
12
|
+
* @param {"default"|"muted"} [props.variant="default"] The section's background around the panel.
|
|
13
|
+
* @param {string} [props.className]
|
|
14
|
+
*/
|
|
15
|
+
export default function AppSectionCallToAction({ title, actions, as, eyebrow, subtitle, align, variant, className, ...rest }: {
|
|
16
|
+
title: import('react').ReactNode;
|
|
17
|
+
actions?: import('react').ReactNode;
|
|
18
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
19
|
+
eyebrow?: import('react').ReactNode;
|
|
20
|
+
subtitle?: import('react').ReactNode;
|
|
21
|
+
align?: "start" | "center";
|
|
22
|
+
variant?: "default" | "muted";
|
|
23
|
+
className?: string;
|
|
24
|
+
}): import("react").JSX.Element;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The questions section of a public page: a heading block over an `AppAccordion` (`children`) in
|
|
3
|
+
* a reading-width column. Renders the same markup as the Razor `<app-section-faq>`.
|
|
4
|
+
*
|
|
5
|
+
* The answers stay in the page while closed, so they are read by search engines. The section
|
|
6
|
+
* writes no structured data: the page builds its FAQPage from the same list it passes to the
|
|
7
|
+
* accordion, so the markup and the visible text cannot differ.
|
|
8
|
+
*
|
|
9
|
+
* @param {object} props
|
|
10
|
+
* @param {import('react').ReactNode} props.title The section's heading.
|
|
11
|
+
* @param {"h1"|"h2"|"h3"|"h4"|"h5"|"h6"} [props.as="h2"] The heading element.
|
|
12
|
+
* @param {import('react').ReactNode} [props.eyebrow] A short label above the heading.
|
|
13
|
+
* @param {import('react').ReactNode} [props.subtitle] A sentence under the heading ("Still stuck? Write to us.").
|
|
14
|
+
* @param {"start"|"center"} [props.align="center"] Where the heading block sits.
|
|
15
|
+
* @param {"default"|"muted"} [props.variant="default"] The section's background.
|
|
16
|
+
* @param {import('react').ReactNode} [props.children] The `AppAccordion` of questions.
|
|
17
|
+
* @param {string} [props.className]
|
|
18
|
+
*/
|
|
19
|
+
export default function AppSectionFaq({ title, as, eyebrow, subtitle, align, variant, children, className, ...rest }: {
|
|
20
|
+
title: import('react').ReactNode;
|
|
21
|
+
as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
22
|
+
eyebrow?: import('react').ReactNode;
|
|
23
|
+
subtitle?: import('react').ReactNode;
|
|
24
|
+
align?: "start" | "center";
|
|
25
|
+
variant?: "default" | "muted";
|
|
26
|
+
children?: import('react').ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}): import("react").JSX.Element;
|