@webority/ui-react 0.7.3 → 0.7.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,7 +12,7 @@
12
12
  * @param {string} [props.bodyClassName]
13
13
  * @param {string} [props.headerClassName]
14
14
  * @param {boolean} [props.body=true]
15
- * @param {boolean} [props.lifted=false] Raised/hover treatment (.card-lifted).
15
+ * @param {boolean} [props.lifted=false] 1px hover translate (.card-lifted) — not a drop shadow.
16
16
  */
17
17
  export default function AppCard({ title, titleClassName, header, headerExtra, headerActions, children, className, bodyClassName, headerClassName, body, lifted, ...rest }: {
18
18
  title?: import('react').ReactNode;
@@ -1,10 +1,10 @@
1
1
  /**
2
- * Shared checkbox on the Bootstrap `.form-check` markup — the same structure the
3
- * Razor <app-checkbox> emits, so both surfaces render identically.
2
+ * Shared checkbox on Bootstrap `.form-check` markup (Razor <app-checkbox> matches).
3
+ * Theme restyles `.form-check-input` as the one selection glyph; table row-select
4
+ * uses the `.wui-check` alias of the same skin (TASK-06077).
4
5
  *
5
- * The label is bound to the input with id/htmlFor rather than react-bootstrap's
6
- * `label` prop: that rendered a <label> with no `for`, so clicking the text did
7
- * nothing and screen readers never announced the name.
6
+ * The label is bound with id/htmlFor rather than react-bootstrap's `label` prop:
7
+ * that rendered a <label> with no `for`, so clicking the text did nothing.
8
8
  *
9
9
  * @param {object} props
10
10
  * @param {import('react').ReactNode} [props.label]
@@ -21,8 +21,10 @@
21
21
  * @param {Set<string|number>} [props.selectedIds] Currently selected row keys.
22
22
  * @param {(id: string|number) => void} [props.onToggleRow]
23
23
  * @param {(checked: boolean) => void} [props.onToggleAll] Toggle all current rows.
24
+ * @param {(row: object) => import('react').ReactNode} [props.renderExpanded] When given, each row
25
+ * gets a leading expand toggle; the returned content renders in a full-width row beneath it.
24
26
  */
25
- export default function AppDataTable({ columns, rows, rowKey, sort, onSort, loading, skeletonRows, empty, emptyFiltered, sourceCount, rowActions, rowActionsLabel, pagination, ariaLabel, className, selectable, selectedIds, onToggleRow, onToggleAll, ...rest }: {
27
+ export default function AppDataTable({ columns, rows, rowKey, sort, onSort, loading, skeletonRows, empty, emptyFiltered, sourceCount, rowActions, rowActionsLabel, pagination, ariaLabel, className, selectable, selectedIds, onToggleRow, onToggleAll, renderExpanded, ...rest }: {
26
28
  columns: object[];
27
29
  rows: object[];
28
30
  rowKey?: (row: object, index: number) => string | number;
@@ -45,4 +47,5 @@ export default function AppDataTable({ columns, rows, rowKey, sort, onSort, load
45
47
  selectedIds?: Set<string | number>;
46
48
  onToggleRow?: (id: string | number) => void;
47
49
  onToggleAll?: (checked: boolean) => void;
50
+ renderExpanded?: (row: object) => import('react').ReactNode;
48
51
  }): import("react").JSX.Element;
@@ -1,4 +1,4 @@
1
- export default function AppDropdown({ icon, iconSize, toggleClassName, label, ariaLabel, align, items, menuClassName, linkComponent, children, ...rest }: {
1
+ export default function AppDropdown({ icon, iconSize, toggleClassName, label, ariaLabel, align, items, menuClassName, linkComponent, children, trigger, ...rest }: {
2
2
  [x: string]: any;
3
3
  align?: string;
4
4
  ariaLabel: any;
@@ -9,5 +9,6 @@ export default function AppDropdown({ icon, iconSize, toggleClassName, label, ar
9
9
  label: any;
10
10
  linkComponent: any;
11
11
  menuClassName?: string;
12
- toggleClassName?: string;
12
+ toggleClassName: any;
13
+ trigger: any;
13
14
  }): import("react").JSX.Element;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * The shared text field — wraps react-bootstrap Form.Group / Form.Label / Form.Control
3
- * (which inherit the brand `$input-*` styling) while keeping the `.field`/`.input` classes
4
- * so the look is unchanged, and folding in the control shells screens kept hand-rolling:
5
- * a unit suffix, a password reveal toggle, a leading icon, and a trailing action.
2
+ * The shared text field — wraps react-bootstrap Form.Group / Form.Label / Form.Control.
3
+ * Visual chrome is Bootstrap `.form-control` (theme `$input-*` + one post-CSS skin);
4
+ * `.input` is an alias on the same element for size/shell hooks (`.input-sm`,
5
+ * `.input-icon`, …), not a second look. Shells: unit, password reveal, leading icon,
6
+ * trailing action.
6
7
  *
7
8
  * Forwards `ref` to the underlying control, so react-hook-form's spread `{...register("name")}`
8
9
  * works unchanged, as does a controlled `value`/`onChange` pair.
@@ -35,6 +36,8 @@
35
36
  * @param {import('react').ReactNode} [props.suffix] A bordered box after the input (e.g. .00, .com).
36
37
  * @param {boolean} [props.floatingLabel=false] Label sits inside as a placeholder, then slides up
37
38
  * on focus/fill. Opt-in variant; standalone only (no icon/unit/prefix in the same field).
39
+ * @param {"bare"} [props.variant] Borderless variant — no border/background, inherits the
40
+ * container's chrome (inline-rename, ⌘K).
38
41
  * @param {import('react').Ref<HTMLInputElement>} [ref]
39
42
  */
40
43
  declare const AppInput: import("react").ForwardRefExoticComponent<import("react").RefAttributes<any>>;
@@ -6,20 +6,32 @@
6
6
  * @param {string} props.label What the number measures.
7
7
  * @param {import('react').ReactNode} props.value The number itself, already formatted.
8
8
  * @param {string|import('react').ReactNode} [props.icon] Icon name for the leading tile, or a custom node.
9
+ * @param {'primary'|'success'|'warning'|'danger'|'info'|'neutral'} [props.iconTone] Tints the icon chip.
9
10
  * @param {import('react').ReactNode} [props.delta] Change text, e.g. "12% vs last month".
10
- * @param {'up'|'down'|'flat'} [props.deltaDirection='flat'] Colours the delta and picks its arrow.
11
+ * @param {'up'|'down'|'flat'} [props.deltaDirection] Colours the delta and picks its arrow. Omitted →
12
+ * inferred from a leading "+"/"-" on `delta` (falls back to 'flat').
13
+ * @param {number[]} [props.sparkline] A trend series rendered as a small inline chart.
11
14
  * @param {'plain'|'filled'|'accent'} [props.variant='plain'] The tile surface: plain (today's
12
15
  * bordered card), filled (a subtle surface fill), accent (a brand-tinted fill).
16
+ * @param {'md'|'lg'} [props.size='md'] Tile scale: md (default), lg (a hero tile with an
17
+ * enlarged value — for the single headline stat above a dashboard).
13
18
  * @param {boolean} [props.inline=false] Put the icon beside the text instead of above it.
19
+ * @param {boolean} [props.attention=false] Marks the tile as needing action (warning-tinted).
20
+ * @param {string} [props.href] Renders the whole tile as a link to this URL.
14
21
  * @param {string} [props.className]
15
22
  */
16
- export default function AppKpiTile({ label, value, icon, delta, deltaDirection, variant, inline, className, ...rest }: {
23
+ export default function AppKpiTile({ label, value, icon, iconTone, delta, deltaDirection, sparkline, variant, size, inline, attention, href, className, ...rest }: {
17
24
  label: string;
18
25
  value: import('react').ReactNode;
19
26
  icon?: string | import('react').ReactNode;
27
+ iconTone?: 'primary' | 'success' | 'warning' | 'danger' | 'info' | 'neutral';
20
28
  delta?: import('react').ReactNode;
21
29
  deltaDirection?: 'up' | 'down' | 'flat';
30
+ sparkline?: number[];
22
31
  variant?: 'plain' | 'filled' | 'accent';
32
+ size?: 'md' | 'lg';
23
33
  inline?: boolean;
34
+ attention?: boolean;
35
+ href?: string;
24
36
  className?: string;
25
37
  }): import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ /**
2
+ * A positioned overlay anchored to a trigger — a click-opened floating panel (a notifications
3
+ * list, a filters panel, a rich mini-menu). Distinct from AppModal (centered + backdrop),
4
+ * AppDropdown (a flat action menu), and AppInfoTip (a hover "?" help popover). Wraps
5
+ * react-bootstrap's OverlayTrigger/Popover (Popper positioning); the Razor counterpart
6
+ * `<app-popover>` uses Bootstrap's own popover, so both surfaces stay in lockstep.
7
+ *
8
+ * @param {object} props
9
+ * @param {import('react').ReactElement} props.trigger The anchor element the panel opens from.
10
+ * Must be a single element that forwards a ref (a DOM element, or a react-bootstrap-based
11
+ * App* like AppButton/ActionIcon). It renders as written; clicking it toggles the panel.
12
+ * @param {import('react').ReactNode} props.children The panel body.
13
+ * @param {string} [props.title] Optional panel heading.
14
+ * @param {'top'|'bottom'|'start'|'end'|'auto'} [props.placement='bottom'] Where it opens; `auto`
15
+ * flips to stay in view.
16
+ * @param {'click'|'hover'|'focus'} [props.triggerType='click'] What opens it.
17
+ * @param {string} [props.className] Class on the popover panel.
18
+ */
19
+ export default function AppPopover({ trigger, children, title, placement, triggerType, className, ...rest }: {
20
+ trigger: import('react').ReactElement;
21
+ children: import('react').ReactNode;
22
+ title?: string;
23
+ placement?: 'top' | 'bottom' | 'start' | 'end' | 'auto';
24
+ triggerType?: 'click' | 'hover' | 'focus';
25
+ className?: string;
26
+ }): import("react").JSX.Element;
@@ -2,13 +2,13 @@
2
2
  * Empty ledger body for AppDataTable.
3
3
  *
4
4
  * @param {object} props
5
- * @param {string} props.icon
5
+ * @param {string|import('react').ReactNode} props.icon Icon name, or a custom node.
6
6
  * @param {import('react').ReactNode} props.title
7
7
  * @param {import('react').ReactNode} [props.text]
8
8
  * @param {import('react').ReactNode} [props.action]
9
9
  */
10
10
  export default function AppTableEmptyState({ icon, title, text, action, ...rest }: {
11
- icon: string;
11
+ icon: string | import('react').ReactNode;
12
12
  title: import('react').ReactNode;
13
13
  text?: import('react').ReactNode;
14
14
  action?: import('react').ReactNode;
@@ -20,8 +20,10 @@
20
20
  * @param {'prev-next'|'numbered'} [props.mode='prev-next'] prev-next (default) is the arrows-
21
21
  * only nav above. numbered inserts windowed page buttons — first/last plus an ellipsis over
22
22
  * any run of hidden pages — between the arrows.
23
+ * @param {boolean} [props.showPageSize=true] Show the "Rows per page" selector. Set false for a
24
+ * compact pager that pages but doesn't expose page size (e.g. a dense numbered table).
23
25
  */
24
- export default function AppTablePagination({ page, totalPages, pageSize, total, firstRow, lastRow, onPageChange, onPageSizeChange, pageSizes, mode, ...rest }: {
26
+ export default function AppTablePagination({ page, totalPages, pageSize, total, firstRow, lastRow, onPageChange, onPageSizeChange, pageSizes, mode, showPageSize, ...rest }: {
25
27
  page: number;
26
28
  totalPages: number;
27
29
  pageSize: number;
@@ -32,4 +34,5 @@ export default function AppTablePagination({ page, totalPages, pageSize, total,
32
34
  onPageSizeChange: (size: number) => void;
33
35
  pageSizes?: number[];
34
36
  mode?: 'prev-next' | 'numbered';
37
+ showPageSize?: boolean;
35
38
  }): import("react").JSX.Element;
@@ -32,6 +32,7 @@ export { default as AppMultiSelect } from './components/AppMultiSelect.jsx';
32
32
  export { default as AppOtpInput } from './components/AppOtpInput.jsx';
33
33
  export { default as AppPageHeader } from './components/AppPageHeader.jsx';
34
34
  export { default as AppPhoneNumberInput } from './components/AppPhoneNumberInput.jsx';
35
+ export { default as AppPopover } from './components/AppPopover.jsx';
35
36
  export { default as AppPricingCard } from './components/AppPricingCard.jsx';
36
37
  export { default as AppRadio } from './components/AppRadio.jsx';
37
38
  export { default as AppRepeater } from './components/AppRepeater.jsx';