@webority/ui-react 0.7.0 → 0.7.2

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.
Files changed (32) hide show
  1. package/dist/types/components/AppAsyncBlock.d.ts +32 -0
  2. package/dist/types/components/AppAutocomplete.d.ts +12 -3
  3. package/dist/types/components/AppCheckbox.d.ts +2 -0
  4. package/dist/types/components/AppChip.d.ts +1 -1
  5. package/dist/types/components/AppConfirmDialog.d.ts +11 -1
  6. package/dist/types/components/AppDataTable.d.ts +2 -2
  7. package/dist/types/components/AppDropdown.d.ts +2 -1
  8. package/dist/types/components/AppEmptyState.d.ts +1 -1
  9. package/dist/types/components/AppFileAttachment.d.ts +19 -11
  10. package/dist/types/components/AppFilePicker.d.ts +23 -8
  11. package/dist/types/components/AppInfoTip.d.ts +2 -1
  12. package/dist/types/components/AppKpiTile.d.ts +4 -1
  13. package/dist/types/components/AppLogoPicker.d.ts +19 -22
  14. package/dist/types/components/AppModal.d.ts +20 -13
  15. package/dist/types/components/AppRadio.d.ts +2 -0
  16. package/dist/types/components/AppScrollbar.d.ts +22 -0
  17. package/dist/types/components/AppSegmented.d.ts +5 -1
  18. package/dist/types/components/AppSelect.d.ts +4 -1
  19. package/dist/types/components/AppShell.d.ts +43 -10
  20. package/dist/types/components/AppSidebarMenu.d.ts +2 -1
  21. package/dist/types/components/AppSpinner.d.ts +15 -3
  22. package/dist/types/components/AppSplash.d.ts +30 -6
  23. package/dist/types/components/AppSwitch.d.ts +2 -0
  24. package/dist/types/components/AppTablePagination.d.ts +5 -1
  25. package/dist/types/components/AppTabs.d.ts +6 -1
  26. package/dist/types/components/AppToastContainer.d.ts +13 -0
  27. package/dist/types/components/Icon.d.ts +15 -1
  28. package/dist/types/components/toastStore.d.ts +9 -0
  29. package/dist/types/index.d.ts +4 -1
  30. package/dist/types/lib/pageWindow.d.ts +10 -0
  31. package/dist/ui-react.js +1605 -1015
  32. package/package.json +4 -5
@@ -17,8 +17,11 @@
17
17
  * @param {(page: number) => void} props.onPageChange
18
18
  * @param {(size: number) => void} props.onPageSizeChange
19
19
  * @param {number[]} [props.pageSizes]
20
+ * @param {'prev-next'|'numbered'} [props.mode='prev-next'] prev-next (default) is the arrows-
21
+ * only nav above. numbered inserts windowed page buttons — first/last plus an ellipsis over
22
+ * any run of hidden pages — between the arrows.
20
23
  */
21
- export default function AppTablePagination({ page, totalPages, pageSize, total, firstRow, lastRow, onPageChange, onPageSizeChange, pageSizes, ...rest }: {
24
+ export default function AppTablePagination({ page, totalPages, pageSize, total, firstRow, lastRow, onPageChange, onPageSizeChange, pageSizes, mode, ...rest }: {
22
25
  page: number;
23
26
  totalPages: number;
24
27
  pageSize: number;
@@ -28,4 +31,5 @@ export default function AppTablePagination({ page, totalPages, pageSize, total,
28
31
  onPageChange: (page: number) => void;
29
32
  onPageSizeChange: (size: number) => void;
30
33
  pageSizes?: number[];
34
+ mode?: 'prev-next' | 'numbered';
31
35
  }): import("react").JSX.Element;
@@ -12,8 +12,11 @@
12
12
  * @param {"underline"|"pills"} [props.variant="underline"]
13
13
  * @param {string} [props.ariaLabel]
14
14
  * @param {string} [props.className]
15
+ * @param {import('react').CSSProperties} [props.style]
16
+ * @param {"success"|"warning"|"danger"|"info"} [props.tone] Tone tint for a tab's count
17
+ * pill — set per-tab as `tabs[].tone`, matching the vocabulary `.status-label` uses.
15
18
  */
16
- export default function AppTabs({ tabs, value, onChange, variant, ariaLabel, className, ...rest }: {
19
+ export default function AppTabs({ tabs, value, onChange, variant, ariaLabel, className, style, ...rest }: {
17
20
  tabs: {
18
21
  key: string;
19
22
  label: import('react').ReactNode;
@@ -28,4 +31,6 @@ export default function AppTabs({ tabs, value, onChange, variant, ariaLabel, cla
28
31
  variant?: "underline" | "pills";
29
32
  ariaLabel?: string;
30
33
  className?: string;
34
+ style?: import('react').CSSProperties;
35
+ tone?: "success" | "warning" | "danger" | "info";
31
36
  }): import("react").JSX.Element;
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Mounts once near the app root and renders whatever toast()/errorToast() raise. Everything —
3
+ * auto-dismiss, the ARIA live region, the slide/fade — comes from react-bootstrap's Toast, so
4
+ * there is no toast library and no bespoke stylesheet; the look is Bootstrap + the shared theme.
5
+ *
6
+ * @param {object} props
7
+ * @param {'top-start'|'top-center'|'top-end'|'middle-center'|'bottom-start'|'bottom-center'|'bottom-end'} [props.position='bottom-end']
8
+ * @param {number} [props.autoDismiss=5000] Milliseconds a toast stays before it fades itself out.
9
+ */
10
+ export default function AppToastContainer({ position, autoDismiss }: {
11
+ position?: 'top-start' | 'top-center' | 'top-end' | 'middle-center' | 'bottom-start' | 'bottom-center' | 'bottom-end';
12
+ autoDismiss?: number;
13
+ }): import("react").JSX.Element;
@@ -1,4 +1,18 @@
1
1
  export declare const iconNames: string[];
2
+ /**
3
+ * Register product-specific glyphs — call once at app init, before first render. Each value is a
4
+ * render function `({ size, color, className, style }) => ReactNode` that returns your own glyph
5
+ * (e.g. an iconsax Bulk component) applied to those props. A registered name wins over the
6
+ * built-in Bootstrap-Icon map; every unregistered name still resolves to Bootstrap Icons.
7
+ *
8
+ * @param {Record<string, (props: { size: number, color?: string, className?: string, style?: object }) => import('react').ReactNode>} map
9
+ */
10
+ export declare function registerIcons(map: Record<string, (props: {
11
+ size: number;
12
+ color?: string;
13
+ className?: string;
14
+ style?: object;
15
+ }) => import('react').ReactNode>): void;
2
16
  export default function Icon({ name, size, className, color, style, ...rest }: {
3
17
  [x: string]: any;
4
18
  className: any;
@@ -6,4 +20,4 @@ export default function Icon({ name, size, className, color, style, ...rest }: {
6
20
  name: any;
7
21
  size?: number;
8
22
  style: any;
9
- }): import("react").JSX.Element;
23
+ }): any;
@@ -0,0 +1,9 @@
1
+ /** Subscribe to the active-toast list. Calls back immediately, and returns an unsubscribe fn. */
2
+ export declare function subscribeToasts(listener: any): () => boolean;
3
+ /**
4
+ * Raise a toast. De-duped by `variant:message` while one is still on screen, so a burst of the
5
+ * same failure (many in-flight requests, a retry) shows once instead of stacking copies.
6
+ */
7
+ export declare function pushToast(message: any, variant: any): void;
8
+ /** Remove a toast — its auto-dismiss timer fired, or the user closed it. */
9
+ export declare function dismissToast(id: any): void;
@@ -1,6 +1,7 @@
1
1
  export { default as ActionIcon } from './components/ActionIcon.jsx';
2
2
  export { default as AppAccordion } from './components/AppAccordion.jsx';
3
3
  export { default as AppAlert } from './components/AppAlert.jsx';
4
+ export { default as AppAsyncBlock } from './components/AppAsyncBlock.jsx';
4
5
  export { default as AppAutocomplete } from './components/AppAutocomplete.jsx';
5
6
  export { default as AppAvatar } from './components/AppAvatar.jsx';
6
7
  export { default as AppBadge } from './components/AppBadge.jsx';
@@ -35,6 +36,7 @@ export { default as AppPricingCard } from './components/AppPricingCard.jsx';
35
36
  export { default as AppRadio } from './components/AppRadio.jsx';
36
37
  export { default as AppRepeater } from './components/AppRepeater.jsx';
37
38
  export { default as AppResourceCard } from './components/AppResourceCard.jsx';
39
+ export { default as AppScrollbar } from './components/AppScrollbar.jsx';
38
40
  export { default as AppSearch } from './components/AppSearch.jsx';
39
41
  export { default as AppSegmented } from './components/AppSegmented.jsx';
40
42
  export { default as AppSelect } from './components/AppSelect.jsx';
@@ -52,7 +54,8 @@ export { default as AppTablePagination } from './components/AppTablePagination.j
52
54
  export { default as AppTabs } from './components/AppTabs.jsx';
53
55
  export { default as AppTextarea } from './components/AppTextarea.jsx';
54
56
  export { default as AppTimeline } from './components/AppTimeline.jsx';
55
- export { default as Icon, iconNames } from './components/Icon.jsx';
57
+ export { default as AppToastContainer } from './components/AppToastContainer.jsx';
58
+ export { default as Icon, iconNames, registerIcons } from './components/Icon.jsx';
56
59
  export { MODAL_ICONS } from './components/ModalIcons.jsx';
57
60
  export { default as RequiredMark } from './components/RequiredMark.jsx';
58
61
  export { errorToast, toast } from './components/toast.js';
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @param {number} page current page, one-based.
3
+ * @param {number} totalPages
4
+ * @param {{ siblingCount?: number, boundaryCount?: number }} [opts]
5
+ * @returns {(number|'ellipsis-left'|'ellipsis-right')[]}
6
+ */
7
+ export declare function pageWindow(page: number, totalPages: number, { siblingCount, boundaryCount }?: {
8
+ siblingCount?: number;
9
+ boundaryCount?: number;
10
+ }): (number | 'ellipsis-left' | 'ellipsis-right')[];