@sqrzro/ui 4.0.0-alpha.13 → 4.0.0-alpha.15

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 (142) hide show
  1. package/dist/components/buttons/Button/index.d.ts +4 -4
  2. package/dist/components/buttons/Button/index.js +5 -14
  3. package/dist/components/collections/Collection/index.d.ts +4 -1
  4. package/dist/components/collections/Collection/index.js +2 -2
  5. package/dist/components/collections/DataTable/index.d.ts +2 -2
  6. package/dist/components/collections/DataTable/index.js +5 -4
  7. package/dist/components/collections/EmptyMessage/index.d.ts +1 -1
  8. package/dist/components/collections/EmptyMessage/index.js +3 -4
  9. package/dist/components/collections/List/index.d.ts +2 -1
  10. package/dist/components/collections/ListClientComponent/index.d.ts +6 -2
  11. package/dist/components/collections/ListClientComponent/index.js +4 -2
  12. package/dist/components/collections/ListItem/index.d.ts +1 -1
  13. package/dist/components/collections/ListItem/index.js +5 -5
  14. package/dist/components/collections/ListItemMeta/index.d.ts +6 -4
  15. package/dist/components/collections/ListItemMeta/index.js +12 -7
  16. package/dist/components/collections/ListItemSecondary/index.d.ts +1 -1
  17. package/dist/components/collections/ListItemSecondary/index.js +3 -4
  18. package/dist/components/collections/Pagination/index.d.ts +1 -1
  19. package/dist/components/collections/Pagination/index.js +5 -6
  20. package/dist/components/collections/PaginationLink/index.d.ts +9 -0
  21. package/dist/components/collections/PaginationLink/index.js +8 -0
  22. package/dist/components/collections/TableClientComponent/index.d.ts +1 -1
  23. package/dist/components/collections/TableClientComponent/index.js +4 -7
  24. package/dist/components/collections/TableRow/index.d.ts +12 -0
  25. package/dist/components/collections/TableRow/index.js +9 -0
  26. package/dist/components/collections/interfaces.d.ts +5 -12
  27. package/dist/components/collections/utility/is-data-table-array.d.ts +3 -0
  28. package/dist/components/collections/utility/is-data-table-array.js +5 -0
  29. package/dist/components/collections/utility/is-data-table-object.d.ts +3 -0
  30. package/dist/components/collections/utility/is-data-table-object.js +4 -0
  31. package/dist/components/errors/AppError/index.d.ts +19 -0
  32. package/dist/components/errors/AppError/index.js +8 -0
  33. package/dist/components/errors/AppForbiddenError/index.d.ts +7 -0
  34. package/dist/components/errors/AppForbiddenError/index.js +6 -0
  35. package/dist/components/errors/AppNotFoundError/index.d.ts +7 -0
  36. package/dist/components/errors/AppNotFoundError/index.js +6 -0
  37. package/dist/components/errors/AppServerError/index.d.ts +8 -0
  38. package/dist/components/errors/AppServerError/index.js +17 -0
  39. package/dist/components/index.d.ts +6 -0
  40. package/dist/components/index.js +3 -0
  41. package/dist/components/modals/ConfirmModal/index.js +1 -1
  42. package/dist/components/modals/Modal/index.d.ts +1 -1
  43. package/dist/components/modals/Modal/index.js +3 -3
  44. package/dist/components/modals/ModalActions/index.d.ts +1 -1
  45. package/dist/components/modals/ModalActions/index.js +3 -3
  46. package/dist/components/utility/ActionList/index.d.ts +1 -1
  47. package/dist/components/utility/ActionList/index.js +2 -2
  48. package/dist/components/utility/ClassNamesClientComponent/index.d.ts +6 -0
  49. package/dist/components/utility/ClassNamesClientComponent/index.js +7 -0
  50. package/dist/components/utility/Container/index.d.ts +1 -1
  51. package/dist/components/utility/Container/index.js +2 -2
  52. package/dist/components/utility/Link/index.d.ts +1 -1
  53. package/dist/components/utility/Link/index.js +3 -3
  54. package/dist/components/utility/Loader/index.d.ts +1 -1
  55. package/dist/components/utility/Loader/index.js +4 -4
  56. package/dist/components/utility/Popover/index.d.ts +1 -1
  57. package/dist/components/utility/Popover/index.js +4 -4
  58. package/dist/components/utility/RootLayout/index.d.ts +2 -2
  59. package/dist/components/utility/RootLayout/index.js +6 -5
  60. package/dist/components/utility/Toast/index.d.ts +1 -1
  61. package/dist/components/utility/Toast/index.js +2 -2
  62. package/dist/filters/components/FilterBarClientComponent/index.d.ts +1 -1
  63. package/dist/filters/components/FilterBarClientComponent/index.js +2 -2
  64. package/dist/filters/components/FilterControl/index.d.ts +1 -1
  65. package/dist/filters/components/FilterControl/index.js +7 -4
  66. package/dist/filters/components/FilterItem/index.d.ts +1 -1
  67. package/dist/filters/components/FilterItem/index.js +2 -2
  68. package/dist/filters/components/FilterPanel/index.d.ts +1 -1
  69. package/dist/filters/filters/Filter/index.d.ts +1 -1
  70. package/dist/filters/filters/Filter/index.js +3 -4
  71. package/dist/filters/filters/SearchFilter/index.js +1 -1
  72. package/dist/filters/index.d.ts +1 -0
  73. package/dist/filters/index.js +1 -0
  74. package/dist/forms/components/Autocomplete/index.d.ts +1 -1
  75. package/dist/forms/components/Dropdown/index.d.ts +1 -1
  76. package/dist/forms/components/Dropdown/index.js +7 -4
  77. package/dist/forms/components/DropdownItem/index.d.ts +9 -0
  78. package/dist/forms/components/DropdownItem/index.js +8 -0
  79. package/dist/forms/components/DropdownList/index.d.ts +1 -1
  80. package/dist/forms/components/DropdownList/index.js +5 -10
  81. package/dist/forms/components/EditableForm/index.d.ts +1 -1
  82. package/dist/forms/components/EditableForm/index.js +3 -4
  83. package/dist/forms/components/EditableFormField/index.d.ts +1 -1
  84. package/dist/forms/components/EditableFormField/index.js +2 -2
  85. package/dist/forms/components/Form/index.d.ts +1 -1
  86. package/dist/forms/components/Form/index.js +3 -3
  87. package/dist/forms/components/FormError/index.d.ts +1 -1
  88. package/dist/forms/components/FormError/index.js +3 -3
  89. package/dist/forms/components/FormField/index.d.ts +2 -2
  90. package/dist/forms/components/FormField/index.js +7 -6
  91. package/dist/forms/components/FormLabel/index.d.ts +1 -1
  92. package/dist/forms/components/FormLabel/index.js +3 -3
  93. package/dist/forms/components/ModalForm/index.js +1 -1
  94. package/dist/forms/components/NumberInput/index.d.ts +1 -1
  95. package/dist/forms/components/PasswordComplexity/index.d.ts +9 -0
  96. package/dist/forms/components/PasswordComplexity/index.js +10 -0
  97. package/dist/forms/components/PasswordInput/index.d.ts +1 -1
  98. package/dist/forms/components/PasswordInput/index.js +4 -5
  99. package/dist/forms/components/StaticTextInput/index.d.ts +1 -1
  100. package/dist/forms/components/StaticTextInput/index.js +4 -7
  101. package/dist/forms/components/Switch/index.d.ts +1 -1
  102. package/dist/forms/components/Switch/index.js +4 -4
  103. package/dist/forms/components/TextInput/index.d.ts +1 -1
  104. package/dist/forms/components/TextInput/index.js +4 -4
  105. package/dist/forms/hooks/useForm.js +1 -1
  106. package/dist/forms/index.d.ts +4 -2
  107. package/dist/forms/index.js +2 -1
  108. package/dist/navigation/components/AppNavigation/index.d.ts +1 -1
  109. package/dist/navigation/components/AppNavigation/index.js +2 -2
  110. package/dist/navigation/components/AppNavigationItem/index.d.ts +1 -1
  111. package/dist/navigation/components/AppNavigationItem/index.js +3 -4
  112. package/dist/navigation/components/Tabs/index.js +2 -2
  113. package/dist/navigation/hooks/useNavigation.js +5 -5
  114. package/dist/styles/classnames/apply-variants.d.ts +3 -0
  115. package/dist/styles/classnames/apply-variants.js +25 -0
  116. package/dist/styles/classnames/config.d.ts +67 -0
  117. package/dist/styles/classnames/index.d.ts +7 -0
  118. package/dist/styles/classnames/index.js +37 -0
  119. package/dist/styles/classnames/interfaces.d.ts +56 -0
  120. package/dist/styles/classnames/interfaces.js +1 -0
  121. package/dist/styles/classnames/utility/is-classname-object.d.ts +3 -0
  122. package/dist/styles/classnames/utility/is-classname-object.js +7 -0
  123. package/dist/styles/icons/config.d.ts +9 -0
  124. package/dist/styles/icons/config.js +1 -0
  125. package/dist/styles/icons/index.d.ts +4 -0
  126. package/dist/styles/icons/interfaces.d.ts +4 -0
  127. package/dist/styles/icons/interfaces.js +1 -0
  128. package/dist/styles/index.d.ts +2 -2
  129. package/dist/styles/index.js +1 -1
  130. package/dist/styles/styles.css +59 -0
  131. package/dist/utility/interfaces.d.ts +1 -2
  132. package/package.json +9 -4
  133. package/dist/components/utility/ClassNames/index.d.ts +0 -6
  134. package/dist/components/utility/ClassNames/index.js +0 -7
  135. package/dist/styles/config.d.ts +0 -66
  136. package/dist/styles/config.js +0 -43
  137. package/dist/styles/icons.d.ts +0 -15
  138. package/dist/styles/interfaces.d.ts +0 -41
  139. /package/dist/styles/{interfaces.js → classnames/config.js} +0 -0
  140. /package/dist/styles/{tw.d.ts → classnames/tw.d.ts} +0 -0
  141. /package/dist/styles/{tw.js → classnames/tw.js} +0 -0
  142. /package/dist/styles/{icons.js → icons/index.js} +0 -0
@@ -1,7 +1,7 @@
1
- import type { ClassNameProps, StylableButtonClassName } from '../../../styles/interfaces';
2
- import { ButtonVariant } from '../../../utility/interfaces';
1
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
2
+ import { StyleVariant } from '../../../utility/interfaces';
3
3
  export interface ButtonClassNames {
4
- root: StylableButtonClassName;
4
+ root: string;
5
5
  icon: string;
6
6
  }
7
7
  export interface ButtonProps extends ClassNameProps<ButtonClassNames> {
@@ -40,7 +40,7 @@ export interface ButtonProps extends ClassNameProps<ButtonClassNames> {
40
40
  /** Used in situations where a button value needs to be submitted with a form */
41
41
  readonly value?: string;
42
42
  /** A set of predefined variants that can be passed to the classNames config to customize the button's appearance */
43
- readonly variant?: ButtonVariant;
43
+ readonly variant?: StyleVariant[] | StyleVariant;
44
44
  }
45
45
  /**
46
46
  * Either a `Link` component or a `button` element, depending on whether a `href` prop is specified.
@@ -3,14 +3,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useRef } from 'react';
4
4
  import Link from '../../../components/utility/Link';
5
5
  import Loader from '../../../components/utility/Loader';
6
- import { getClassNames } from '../../../styles/config';
7
- import tw from '../../../styles/tw';
8
- function getVariantClassName(className, variant) {
9
- if (!className || !variant) {
10
- return null;
11
- }
12
- return className[variant] || null;
13
- }
6
+ import { getClassNames } from '../../../styles/classnames';
7
+ import applyVariants from '../../../styles/classnames/apply-variants';
8
+ import tw from '../../../styles/classnames/tw';
14
9
  /**
15
10
  * Either a `Link` component or a `button` element, depending on whether a `href` prop is specified.
16
11
  *
@@ -32,12 +27,8 @@ function getVariantClassName(className, variant) {
32
27
  */
33
28
  function Button({ children, classNames, classNameProps, form, hasAssistiveLabel, href, icon, id, isDisabled, isFullWidth, isLoading, isNewWindow, isText, name, onClick, popoverTarget, scroll, style, type, value, variant, }) {
34
29
  const ref = useRef(null);
35
- const componentClassNames = classNames ||
36
- getClassNames(isText ? 'textButton' : 'button')?.({
37
- ...(classNameProps || {}),
38
- hasAssistiveLabel,
39
- });
40
- const className = tw('flex cursor-pointer items-center justify-center whitespace-nowrap', isDisabled || isLoading ? 'pointer-events-none opacity-30' : null, isFullWidth ? 'w-full' : null, componentClassNames?.root?.default, getVariantClassName(componentClassNames?.root, variant));
30
+ const componentClassNames = getClassNames(isText ? 'textButton' : 'button', { props: { ...classNameProps, ...applyVariants(variant) } }, classNames);
31
+ const className = tw('flex cursor-pointer items-center justify-center whitespace-nowrap', isDisabled || isLoading ? 'pointer-events-none opacity-30' : null, isFullWidth ? 'w-full' : null, componentClassNames?.root);
41
32
  /*
42
33
  * Link uses classNames, whereas button uses className. This is because Link can also be used
43
34
  * headless in other applications, and so should have consistency.
@@ -8,10 +8,13 @@ export interface CollectionComponentProps<Item, Transformed, Filters = null> {
8
8
  readonly filterMap?: FilterMap<Filters>;
9
9
  readonly fn?: (config: ListFunctionConfig<Filters>) => Promise<Item[]> | Promise<Paginated<Item>>;
10
10
  readonly pageProps?: NextPageProps;
11
+ readonly renderFilters?: (props: {
12
+ map: FilterMap<Filters>;
13
+ }) => React.ReactElement;
11
14
  readonly transformer: (item: Item) => Transformed;
12
15
  }
13
16
  export interface CollectionProps<Item, Transformed, Filters = null> extends CollectionComponentProps<Item, Transformed, Filters> {
14
17
  readonly render: (data: Transformed[]) => React.ReactElement;
15
18
  }
16
- declare function Collection<Item extends object, Transformed, Filters>({ filterMap, ...props }: CollectionProps<Item, Transformed, Filters>): React.ReactElement;
19
+ declare function Collection<Item extends object, Transformed, Filters>({ filterMap, renderFilters, ...props }: CollectionProps<Item, Transformed, Filters>): React.ReactElement;
17
20
  export default Collection;
@@ -39,7 +39,7 @@ async function CollectionComponent({ data, emptyMessageProps, filterMap, fn, pag
39
39
  }
40
40
  return (_jsxs(Fragment, { children: [render(dynamicData), isPaginated(response) ? (_jsx(Pagination, { ...response.meta, nextLabel: "Next \u2192", previousLabel: "\u2190 Previous" })) : null] }));
41
41
  }
42
- function Collection({ filterMap, ...props }) {
43
- return (_jsxs(Fragment, { children: [filterMap ? _jsx(FilterBar, { map: filterMap }) : null, _jsx(Suspense, { fallback: _jsx("div", { className: "flex justify-center p-16", children: _jsx(Loader, {}) }), children: _jsx(CollectionComponent, { ...props, filterMap: filterMap }) })] }));
42
+ function Collection({ filterMap, renderFilters = FilterBar, ...props }) {
43
+ return (_jsxs(Fragment, { children: [filterMap ? renderFilters({ map: filterMap }) : null, _jsx(Suspense, { fallback: _jsx("div", { className: "flex justify-center p-16", children: _jsx(Loader, {}) }), children: _jsx(CollectionComponent, { ...props, filterMap: filterMap }) })] }));
44
44
  }
45
45
  export default Collection;
@@ -1,4 +1,4 @@
1
- import type { ClassNameProps } from '../../../styles/interfaces';
1
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
2
2
  import type { DataTableObject } from '../interfaces';
3
3
  export interface DataTableClassNames {
4
4
  root: string;
@@ -8,7 +8,7 @@ export interface DataTableClassNames {
8
8
  value: string;
9
9
  }
10
10
  export interface DataTableProps extends ClassNameProps<DataTableClassNames> {
11
- readonly data: DataTableObject[];
11
+ readonly data: (DataTableObject | null)[];
12
12
  }
13
13
  declare function DataTable({ classNameProps, classNames, data }: DataTableProps): React.ReactElement;
14
14
  export default DataTable;
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { getClassNames } from '../../../styles/config';
3
- import tw from '../../../styles/tw';
2
+ import { filterNull } from '@sqrzro/utility';
3
+ import { getClassNames } from '../../../styles/classnames';
4
+ import tw from '../../../styles/classnames/tw';
4
5
  function DataTable({ classNameProps, classNames, data }) {
5
- const componentClassNames = classNames || getClassNames('dataTable')?.(classNameProps);
6
- return (_jsx("table", { className: tw('w-full', componentClassNames?.root), children: _jsx("tbody", { children: data.map(({ label, value }, index) => (_jsxs("tr", { className: componentClassNames?.row, children: [_jsx("th", { className: tw(componentClassNames?.cell, componentClassNames?.label), children: label }), _jsx("td", { className: tw(componentClassNames?.cell, componentClassNames?.value), children: value })] }, index))) }) }));
6
+ const componentClassNames = getClassNames('dataTable', { props: classNameProps }, classNames);
7
+ return (_jsx("table", { className: tw('w-full', componentClassNames?.root), children: _jsx("tbody", { children: filterNull(data).map(({ label, value }, index) => (_jsxs("tr", { className: componentClassNames?.row, children: [_jsx("th", { className: tw(componentClassNames?.cell, componentClassNames?.label), children: label }), _jsx("td", { className: tw(componentClassNames?.cell, componentClassNames?.value), children: value })] }, index))) }) }));
7
8
  }
8
9
  export default DataTable;
@@ -1,4 +1,4 @@
1
- import type { ClassNameProps, StylableClassName } from '../../../styles/interfaces';
1
+ import type { ClassNameProps, StylableClassName } from '../../../styles/classnames/interfaces';
2
2
  import { StyleVariant } from '../../../utility/interfaces';
3
3
  import type { EmptyMessageActionProps } from '../EmptyMessageAction';
4
4
  export interface EmptyMessageClassNames {
@@ -1,7 +1,6 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { getClassNames } from '../../../styles/config';
4
- import tw from '../../../styles/tw';
3
+ import { getClassNames } from '../../../styles/classnames';
5
4
  import EmptyMessageAction from '../EmptyMessageAction';
6
5
  export const DEFAULT_TITLE = 'No results found';
7
6
  export const DEFAULT_CHILDREN = 'If you think this is an error, please contact the site administrator.';
@@ -11,7 +10,7 @@ export const DEFAULT_CHILDREN = 'If you think this is an error, please contact t
11
10
  * component to be used for any situation where a standout message is required.
12
11
  */
13
12
  function EmptyMessage({ action, children = DEFAULT_CHILDREN, classNameProps, classNames, icon, title = DEFAULT_TITLE, variant, }) {
14
- const componentClassNames = classNames || getClassNames('emptyMessage')?.(classNameProps);
15
- return (_jsxs("section", { className: tw(componentClassNames?.root?.default, variant ? componentClassNames?.root?.[variant] : null), children: [icon ? (_jsx("div", { className: tw(componentClassNames?.icon?.default, variant ? componentClassNames?.icon?.[variant] : null), children: icon })) : null, _jsx("h2", { className: tw(componentClassNames?.title?.default, variant ? componentClassNames?.title?.[variant] : null), children: title }), _jsx("div", { className: tw(componentClassNames?.description), children: children }), action ? (_jsx("div", { className: tw(componentClassNames?.action), children: _jsx(EmptyMessageAction, { action: action }) })) : null] }));
13
+ const componentClassNames = getClassNames('emptyMessage', { props: classNameProps }, classNames);
14
+ return (_jsxs("section", { className: componentClassNames?.root, children: [icon ? _jsx("div", { className: componentClassNames?.icon, children: icon }) : null, _jsx("h2", { className: componentClassNames?.title, children: title }), _jsx("div", { className: componentClassNames?.description, children: children }), action ? (_jsx("div", { className: componentClassNames?.action, children: _jsx(EmptyMessageAction, { action: action }) })) : null] }));
16
15
  }
17
16
  export default EmptyMessage;
@@ -1,5 +1,6 @@
1
1
  import { CollectionComponentProps } from '../Collection';
2
2
  import type { ListItemObject } from '../interfaces';
3
+ export type { ListClassNames } from '../ListClientComponent';
3
4
  export type ListProps<Item, Filters = null, Data extends object | null = null> = CollectionComponentProps<Item, ListItemObject<Data>, Filters>;
4
- declare function List<Item extends object, Filters, Data extends object | null = null>(props: ListProps<Item, Filters, Data>): React.ReactElement;
5
+ declare function List<Item extends object, Filters = null, Data extends object | null = null>(props: ListProps<Item, Filters, Data>): React.ReactElement;
5
6
  export default List;
@@ -1,7 +1,11 @@
1
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
1
2
  import type { ListItemObject } from '../interfaces';
2
- export interface ListClientComponentProps<Data extends object | null = null> {
3
+ export interface ListClassNames {
4
+ root: string;
5
+ }
6
+ export interface ListClientComponentProps<Data extends object | null = null> extends ClassNameProps<ListClassNames> {
3
7
  data: ListItemObject<Data>[];
4
8
  renderItem?: (props: ListItemObject<Data>) => React.ReactElement;
5
9
  }
6
- declare function ListClientComponent<Data extends object | null = null>({ data, renderItem, }: Readonly<ListClientComponentProps<Data>>): React.ReactElement;
10
+ declare function ListClientComponent<Data extends object | null = null>({ classNameProps, classNames, data, renderItem, }: Readonly<ListClientComponentProps<Data>>): React.ReactElement;
7
11
  export default ListClientComponent;
@@ -1,9 +1,11 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Fragment } from 'react';
3
+ import { getClassNames } from '../../../styles/classnames';
3
4
  import ListItem from '../ListItem';
4
5
  function ListClientComponent({
5
6
  // actions,
6
- data, renderItem = ListItem, }) {
7
- return (_jsx("ul", { className: "", children: data.map((item) => (_jsx(Fragment, { children: renderItem({ /*actions,*/ ...item }) }, item.id))) }));
7
+ classNameProps, classNames, data, renderItem = ListItem, }) {
8
+ const componentClassNames = getClassNames('list', { props: classNameProps }, classNames);
9
+ return (_jsx("ul", { className: componentClassNames?.root, children: data.map((item) => (_jsx(Fragment, { children: renderItem({ /*actions,*/ ...item }) }, item.id))) }));
8
10
  }
9
11
  export default ListClientComponent;
@@ -1,4 +1,4 @@
1
- import type { ClassNameProps, StylableClassName } from '../../../styles/interfaces';
1
+ import type { ClassNameProps, StylableClassName } from '../../../styles/classnames/interfaces';
2
2
  import type { ListItemObject } from '../interfaces';
3
3
  export interface ListItemClassNames {
4
4
  description: string;
@@ -1,7 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  // import type { MenuAction } from '../../elements/MenuItem';
3
- import { getClassNames } from '../../../styles/config';
4
- import tw from '../../../styles/tw';
3
+ import { getClassNames } from '../../../styles/classnames';
4
+ import tw from '../../../styles/classnames/tw';
5
5
  import Link from '../../../components/utility/Link';
6
6
  import ListItemSecondary from '../ListItemSecondary';
7
7
  import ListItemMeta from '../ListItemMeta';
@@ -17,12 +17,12 @@ function getLayout(layout) {
17
17
  function ListItem({
18
18
  // actions,
19
19
  classNames, classNameProps, description, href, id, isLoading, meta, secondary, tertiary, title, variant, }) {
20
- const componentClassNames = classNames || getClassNames('listItem')?.(classNameProps);
20
+ const componentClassNames = getClassNames('listItem', { props: classNameProps }, classNames);
21
21
  const hasPrimary = Boolean(title || description || meta);
22
22
  const hasSecondary = Boolean(secondary);
23
23
  const hasTertiary = Boolean(tertiary);
24
- return (_jsx("li", { className: tw('@container relative grid', componentClassNames?.root?.default, variant ? componentClassNames?.root?.[variant] : null, isLoading ? 'pointer-events-none animate-pulse' : null
24
+ return (_jsx("li", { className: tw('@container relative grid', componentClassNames?.root, isLoading ? 'pointer-events-none animate-pulse' : null
25
25
  // typeof actions === 'function' ? 'grid-cols-[1fr_auto] gap-4' : 'grid-cols-1'
26
- ), children: _jsx("article", { className: "contents", children: _jsxs("div", { className: tw('grid gap-x-6 gap-y-4', getLayout([hasPrimary, hasSecondary, hasTertiary])), children: [_jsxs("div", { className: componentClassNames?.primary, children: [title ? (_jsx("h2", { className: tw(componentClassNames?.title?.default, variant ? componentClassNames?.title?.[variant] : null), children: href ? (_jsx(Link, { className: "hover:text-link", href: href, children: title })) : (title) })) : null, description ? (_jsx("div", { className: componentClassNames?.description, children: description })) : null, _jsx(ListItemMeta, { classNameProps: classNameProps, data: meta?.data, id: id })] }), tertiary ? (_jsx("div", { className: componentClassNames?.tertiary, children: tertiary })) : null, _jsx(ListItemSecondary, { classNameProps: classNameProps, classNames: classNames, data: secondary?.data, variant: variant })] }) }) }));
26
+ ), children: _jsx("article", { className: "contents", children: _jsxs("div", { className: tw('grid gap-x-6 gap-y-4', getLayout([hasPrimary, hasSecondary, hasTertiary])), children: [_jsxs("div", { className: componentClassNames?.primary, children: [title ? (_jsx("h2", { className: componentClassNames?.title, children: href ? (_jsx(Link, { className: "hover:text-link", href: href, children: title })) : (title) })) : null, description ? (_jsx("div", { className: componentClassNames?.description, children: description })) : null, _jsx(ListItemMeta, { classNameProps: classNameProps, data: meta })] }), tertiary ? (_jsx("div", { className: componentClassNames?.tertiary, children: tertiary })) : null, _jsx(ListItemSecondary, { classNameProps: classNameProps, classNames: classNames, data: secondary?.data, variant: variant })] }) }) }));
27
27
  }
28
28
  export default ListItem;
@@ -1,11 +1,13 @@
1
- import type { ClassNameProps } from '../../../styles/interfaces';
2
- import type { ListItemObject } from '../interfaces';
1
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
2
+ import type { DataTableObject } from '../interfaces';
3
3
  export interface ListItemMetaClassNames {
4
4
  root: string;
5
5
  row: string;
6
6
  title: string;
7
7
  value: string;
8
8
  }
9
- export type ListItemMetaProps = ClassNameProps<ListItemMetaClassNames> & ListItemObject['meta'];
10
- declare function ListItemMeta({ classNameProps, classNames, id, data, }: Readonly<ListItemMetaProps>): React.ReactElement | null;
9
+ export type ListItemMetaProps = ClassNameProps<ListItemMetaClassNames> & {
10
+ data?: React.ReactNode[] | (DataTableObject | null)[];
11
+ };
12
+ declare function ListItemMeta({ classNameProps, classNames, data, }: Readonly<ListItemMetaProps>): React.ReactElement | null;
11
13
  export default ListItemMeta;
@@ -1,8 +1,9 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { isValidElement } from 'react';
3
3
  import { filterNull } from '@sqrzro/utility';
4
- import { getClassNames } from '../../../styles/config';
5
- import tw from '../../../styles/tw';
4
+ import { getClassNames } from '../../../styles/classnames';
5
+ import DataTable from '../DataTable';
6
+ import isDataTableArray from '../utility/is-data-table-array';
6
7
  function getKey(item) {
7
8
  if (isValidElement(item)) {
8
9
  return item.key || '-';
@@ -12,11 +13,15 @@ function getKey(item) {
12
13
  }
13
14
  return String(item);
14
15
  }
15
- function ListItemMeta({ classNameProps, classNames, id, data, }) {
16
- const componentClassNames = classNames || getClassNames('listItemMeta')?.(classNameProps);
17
- if (!data) {
16
+ function ListItemMeta({ classNameProps, classNames, data, }) {
17
+ const componentClassNames = getClassNames('listItemMeta', { props: classNameProps }, classNames);
18
+ if (!data?.length) {
18
19
  return null;
19
20
  }
20
- return Array.isArray(data) ? (_jsx("ul", { className: tw(componentClassNames?.root), children: filterNull(data).map((item) => (_jsx("li", { className: "whitespace-nowrap", children: item }, getKey(item)))) })) : (_jsx("table", { className: "w-full", children: _jsx("tbody", { children: Object.entries(data).map(([key, value]) => (_jsxs("tr", { className: componentClassNames?.row, children: [_jsx("th", { className: componentClassNames?.title, children: key }), _jsx("td", { className: componentClassNames?.value, children: value || '-' })] }, key))) }) }));
21
+ const filteredData = filterNull(data);
22
+ if (isDataTableArray(filteredData)) {
23
+ return _jsx(DataTable, { data: filteredData });
24
+ }
25
+ return (_jsx("ul", { className: componentClassNames?.root, children: filteredData.map((item) => (_jsx("li", { className: "whitespace-nowrap", children: item }, getKey(item)))) }));
21
26
  }
22
27
  export default ListItemMeta;
@@ -1,4 +1,4 @@
1
- import type { ClassNameProps } from '../../../styles/interfaces';
1
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
2
2
  import type { ListItemClassNames } from '../ListItem';
3
3
  import type { ListItemObject } from '../interfaces';
4
4
  export type ListItemSecondaryProps = ClassNameProps<ListItemClassNames> & ListItemObject['secondary'];
@@ -1,16 +1,15 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { isValidElement } from 'react';
3
- import { getClassNames } from '../../../styles/config';
4
- import tw from '../../../styles/tw';
3
+ import { getClassNames } from '../../../styles/classnames';
5
4
  import ListItemMeta from '../ListItemMeta';
6
5
  function ListItemSecondary({ classNameProps, classNames, data, variant, }) {
7
- const componentClassNames = classNames || getClassNames('listItem')?.(classNameProps);
6
+ const componentClassNames = getClassNames('listItem', { props: classNameProps }, classNames);
8
7
  if (!data) {
9
8
  return null;
10
9
  }
11
10
  if (isValidElement(data)) {
12
11
  return _jsx("div", { className: componentClassNames?.secondary, children: data });
13
12
  }
14
- return (_jsxs("div", { className: componentClassNames?.secondary, children: [data.title ? (_jsx("p", { className: tw(componentClassNames?.title?.default, variant ? componentClassNames?.title?.[variant] : null), children: data.title })) : null, data.description ? (_jsx("div", { className: componentClassNames?.description, children: data.description })) : null, _jsx(ListItemMeta, { classNameProps: { ...classNameProps, isSecondary: true }, data: data.meta?.data, id: "secondary" })] }));
13
+ return (_jsxs("div", { className: componentClassNames?.secondary, children: [data.title ? _jsx("p", { className: componentClassNames?.title, children: data.title }) : null, data.description ? (_jsx("div", { className: componentClassNames?.description, children: data.description })) : null, _jsx(ListItemMeta, { classNameProps: { ...classNameProps, isSecondary: true }, data: data.meta })] }));
15
14
  }
16
15
  export default ListItemSecondary;
@@ -1,4 +1,4 @@
1
- import type { ClassNameProps, HighlightableClassName } from '../../../styles/interfaces';
1
+ import type { ClassNameProps, HighlightableClassName } from '../../../styles/classnames/interfaces';
2
2
  export interface PaginationClassNames {
3
3
  gap: string;
4
4
  item: string;
@@ -1,17 +1,16 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import usePagination from '../../../hooks/usePagination';
4
- import { getClassNames } from '../../../styles/config';
5
- import tw from '../../../styles/tw';
4
+ import { getClassNames } from '../../../styles/classnames';
5
+ import tw from '../../../styles/classnames/tw';
6
6
  import Link from '../../../components/utility/Link';
7
+ import PaginationLink from '../PaginationLink';
7
8
  function Pagination({ classNames, classNameProps, gapLabel = '•••', limit, nextLabel, page, previousLabel, total, }) {
8
- const componentClassNames = classNames || getClassNames('pagination')?.(classNameProps);
9
+ const componentClassNames = getClassNames('pagination', { props: classNameProps }, classNames);
9
10
  const { links, nextLink, pageCount, previousLink } = usePagination({ limit, page, total });
10
11
  if (pageCount <= 1) {
11
12
  return null;
12
13
  }
13
- return (_jsxs("nav", { className: tw(componentClassNames?.root), children: [previousLabel ? (_jsx(Link, { className: tw(componentClassNames?.navigation, page <= 1 ? 'pointer-events-none opacity-30' : null), href: previousLink, children: previousLabel })) : null, _jsx("ul", { className: tw(componentClassNames?.list), children: links.map((link, index) => (_jsx("li", { className: componentClassNames?.item, children: link ? (_jsx(Link, { className: tw(componentClassNames?.link?.default, link.label === page.toString()
14
- ? componentClassNames?.link?.highlighted
15
- : null), href: link.href, children: link.label })) : (_jsx("span", { className: tw(componentClassNames?.gap), children: gapLabel })) }, index))) }), nextLabel ? (_jsx(Link, { className: tw(componentClassNames?.navigation, page >= pageCount ? 'pointer-events-none opacity-30' : null), href: nextLink, children: nextLabel })) : null] }));
14
+ return (_jsxs("nav", { className: componentClassNames?.root, children: [previousLabel ? (_jsx(Link, { className: tw(componentClassNames?.navigation, page <= 1 ? 'pointer-events-none opacity-30' : null), href: previousLink, children: previousLabel })) : null, _jsx("ul", { className: componentClassNames?.list, children: links.map((link, index) => (_jsx("li", { className: componentClassNames?.item, children: link ? (_jsx(PaginationLink, { ...link, isCurrent: link.label === page.toString() })) : (_jsx("span", { className: componentClassNames?.gap, children: gapLabel })) }, index))) }), nextLabel ? (_jsx(Link, { className: tw(componentClassNames?.navigation, page >= pageCount ? 'pointer-events-none opacity-30' : null), href: nextLink, children: nextLabel })) : null] }));
16
15
  }
17
16
  export default Pagination;
@@ -0,0 +1,9 @@
1
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
2
+ import type { PaginationClassNames } from '../Pagination';
3
+ interface PaginationLinkProps extends ClassNameProps<PaginationClassNames> {
4
+ href: string;
5
+ isCurrent: boolean;
6
+ label: string;
7
+ }
8
+ declare function PaginationLink({ classNameProps, classNames, href, isCurrent, label, }: PaginationLinkProps): React.ReactElement;
9
+ export default PaginationLink;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Link from '../../../components/utility/Link';
3
+ import { getClassNames } from '../../../styles/classnames';
4
+ function PaginationLink({ classNameProps, classNames, href, isCurrent, label, }) {
5
+ const componentClassNames = getClassNames('pagination', { props: classNameProps, states: { isHighlighted: isCurrent } }, classNames);
6
+ return (_jsx(Link, { className: componentClassNames?.link, href: href, children: label }));
7
+ }
8
+ export default PaginationLink;
@@ -1,4 +1,4 @@
1
- import { ClassNameProps, SelectableClassName } from '../../../styles/interfaces';
1
+ import { ClassNameProps, SelectableClassName } from '../../../styles/classnames/interfaces';
2
2
  import type { TableColumnObject, TableItemObject } from '../interfaces';
3
3
  export interface TableClassNames {
4
4
  root: string;
@@ -2,15 +2,14 @@
2
2
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
3
3
  import { toggleArrayItem } from '@sqrzro/utility';
4
4
  import { useSearchParams } from 'next/navigation';
5
- import Switch from '../../../forms/components/Switch';
6
5
  import useSearchParamsHref from '../../../hooks/useSearchParamsHref';
7
- import { getClassNames } from '../../../styles/config';
8
- import tw from '../../../styles/tw';
6
+ import { getClassNames } from '../../../styles/classnames';
9
7
  import filterColumns from '../utility/filter-columns';
10
8
  import getSelectedFromSearchParams from '../utility/get-selected-from-search-params';
11
9
  import setSelectedToSearchParams from '../utility/set-selected-to-search-params';
10
+ import TableRow from '../TableRow';
12
11
  function TableClientComponent({ classNameProps, classNames, columns, data, isSelectable, }) {
13
- const componentClassNames = classNames || getClassNames('table')?.(classNameProps);
12
+ const componentClassNames = getClassNames('table', { props: classNameProps }, classNames);
14
13
  const { setSearchParamsHref } = useSearchParamsHref();
15
14
  const searchParams = useSearchParams();
16
15
  const filteredColumns = filterColumns(columns, isSelectable);
@@ -23,8 +22,6 @@ function TableClientComponent({ classNameProps, classNames, columns, data, isSel
23
22
  const value = selected.length === data.length ? [] : data.map((item) => item.id);
24
23
  setSearchParamsHref({ selected: setSelectedToSearchParams(value) });
25
24
  }
26
- return (_jsx("div", { className: componentClassNames?.root, children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsx("tr", { children: filteredColumns.map((column) => (_jsx("th", { children: column.type === 'selectable' ? (_jsxs("button", { name: column.id, onClick: handleSelectAll, children: ["Select All ", selected.includes(column.id) ? '✓' : ''] })) : (column.title) }, column.id))) }) }), _jsx("tbody", { children: data.map((item) => (_jsx("tr", { className: tw(componentClassNames?.row?.default, selected.includes(item.id)
27
- ? componentClassNames?.row?.selected
28
- : null), children: filteredColumns.map((column) => (_jsx("td", { className: tw(componentClassNames?.cell, column.type === 'selectable' ? 'w-1' : null), children: column.type === 'selectable' ? (_jsx(Switch, { name: item.id, onChange: handleSelect, value: selected.includes(item.id) })) : (item[column.id]) }, column.id))) }, item.id))) })] }) }));
25
+ return (_jsx("div", { className: componentClassNames?.root, children: _jsxs("table", { className: "w-full", children: [_jsx("thead", { children: _jsx("tr", { children: filteredColumns.map((column) => (_jsx("th", { children: column.type === 'selectable' ? (_jsxs("button", { name: column.id, onClick: handleSelectAll, children: ["Select All ", selected.includes(column.id) ? '✓' : ''] })) : (column.title) }, column.id))) }) }), _jsx("tbody", { children: data.map((item) => (_jsx(TableRow, { columns: filteredColumns, data: item, isSelected: selected.includes(item.id), onSelect: handleSelect }, item.id))) })] }) }));
29
26
  }
30
27
  export default TableClientComponent;
@@ -0,0 +1,12 @@
1
+ import type { InputEvent } from '../../../forms/interfaces';
2
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
3
+ import { TableClassNames } from '../TableClientComponent';
4
+ import type { TableColumnObject, TableItemObject } from '../interfaces';
5
+ interface TableRowProps extends ClassNameProps<TableClassNames> {
6
+ columns: TableColumnObject[];
7
+ data: TableItemObject;
8
+ isSelected: boolean;
9
+ onSelect: (event: InputEvent<boolean>) => void;
10
+ }
11
+ declare function TableRow({ classNameProps, classNames, columns, data, isSelected, onSelect, }: TableRowProps): React.ReactElement;
12
+ export default TableRow;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import Switch from '../../../forms/components/Switch';
3
+ import { getClassNames } from '../../../styles/classnames';
4
+ import tw from '../../../styles/classnames/tw';
5
+ function TableRow({ classNameProps, classNames, columns, data, isSelected, onSelect, }) {
6
+ const componentClassNames = getClassNames('table', { props: classNameProps, states: { isSelected } }, classNames);
7
+ return (_jsx("tr", { className: componentClassNames?.row, children: columns.map((column) => (_jsx("td", { className: tw(componentClassNames?.cell, column.type === 'selectable' ? 'w-1' : null), children: column.type === 'selectable' ? (_jsx(Switch, { name: data.id, onChange: onSelect, value: isSelected })) : (data[column.id]) }, column.id))) }));
8
+ }
9
+ export default TableRow;
@@ -8,26 +8,19 @@ export type ListFunctionConfig<Filters = null> = CollectionFunctionConfig<Filter
8
8
  export interface ListItemObject<Data extends object | null = null> {
9
9
  $data?: Data;
10
10
  actions?: Action[];
11
- description?: React.ReactNode | null;
11
+ description?: React.ReactNode;
12
12
  href?: string;
13
13
  id: string;
14
- isMinimal?: boolean;
15
14
  image?: string | null;
16
15
  imageHref?: string | null;
17
16
  isLoading?: boolean;
18
- meta?: {
19
- data?: React.ReactNode[] | Record<string, React.ReactNode>;
20
- id: string;
21
- };
17
+ meta?: React.ReactNode[] | (DataTableObject | null)[];
22
18
  permission?: string;
23
19
  secondary?: {
24
20
  data?: React.ReactElement | {
25
- description?: string;
26
- meta?: {
27
- data?: React.ReactNode[] | Record<string, React.ReactNode>;
28
- id: string;
29
- };
30
- title?: string;
21
+ description?: React.ReactNode;
22
+ meta?: React.ReactNode[] | (DataTableObject | null)[];
23
+ title?: React.ReactNode;
31
24
  } | null;
32
25
  variant?: StyleVariant | null;
33
26
  };
@@ -0,0 +1,3 @@
1
+ import type { DataTableObject } from '../interfaces';
2
+ declare function isDataTableArray(item: unknown): item is DataTableObject[];
3
+ export default isDataTableArray;
@@ -0,0 +1,5 @@
1
+ import isDataTableObject from './is-data-table-object';
2
+ function isDataTableArray(item) {
3
+ return Array.isArray(item) && item.every(isDataTableObject);
4
+ }
5
+ export default isDataTableArray;
@@ -0,0 +1,3 @@
1
+ import type { DataTableObject } from '../interfaces';
2
+ declare function isDataTableObject(item: unknown): item is DataTableObject;
3
+ export default isDataTableObject;
@@ -0,0 +1,4 @@
1
+ function isDataTableObject(item) {
2
+ return typeof item === 'object' && item !== null && 'label' in item && 'value' in item;
3
+ }
4
+ export default isDataTableObject;
@@ -0,0 +1,19 @@
1
+ import type { ClassNameProps } from '../../../styles/classnames/interfaces';
2
+ import type { Action } from '../../../utility/interfaces';
3
+ export interface AppErrorClassNames {
4
+ root: string;
5
+ panel: string;
6
+ title: string;
7
+ description: string;
8
+ action: string;
9
+ }
10
+ export interface AppErrorProps extends ClassNameProps<AppErrorClassNames> {
11
+ action?: Action;
12
+ description: React.ReactNode;
13
+ error: Error & {
14
+ digest?: string;
15
+ };
16
+ title: React.ReactNode;
17
+ }
18
+ declare function AppError({ action, classNameProps, classNames, description, error, title, }: Readonly<AppErrorProps>): React.ReactElement;
19
+ export default AppError;
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import ActionButton from '../../../components/buttons/ActionButton';
3
+ import { getClassNames } from '../../../styles/classnames';
4
+ function AppError({ action, classNameProps, classNames, description, error, title, }) {
5
+ const componentClassNames = getClassNames('appError', { props: classNameProps }, classNames);
6
+ return (_jsx("div", { className: componentClassNames?.root, children: _jsxs("section", { className: componentClassNames?.panel, children: [_jsx("h2", { className: componentClassNames?.title, children: title }), _jsxs("div", { className: componentClassNames?.description, children: [description, error?.digest ? _jsxs("small", { children: ["Error code: ", error.digest] }) : null] }), action ? (_jsx("footer", { className: componentClassNames?.action, children: _jsx(ActionButton, { ...action }) })) : null] }) }));
7
+ }
8
+ export default AppError;
@@ -0,0 +1,7 @@
1
+ import type { AppErrorProps } from '../AppError';
2
+ export interface AppForbiddenErrorProps extends Omit<AppErrorProps, 'action' | 'description' | 'title'> {
3
+ description?: React.ReactNode;
4
+ title?: React.ReactNode;
5
+ }
6
+ declare function AppForbiddenError({ description, title, ...props }: AppForbiddenErrorProps): React.ReactElement;
7
+ export default AppForbiddenError;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import AppError from '../AppError';
3
+ function AppForbiddenError({ description = 'You do not have permission to access this resource. If you think this is a mistake, please contact your site administrator.', title = 'Forbidden', ...props }) {
4
+ return (_jsx(AppError, { ...props, action: { href: '/', label: 'Go to Homepage' }, description: description, title: title }));
5
+ }
6
+ export default AppForbiddenError;
@@ -0,0 +1,7 @@
1
+ import type { AppErrorProps } from '../AppError';
2
+ export interface AppNotFoundErrorProps extends Omit<AppErrorProps, 'action' | 'description' | 'title'> {
3
+ description?: React.ReactNode;
4
+ title?: React.ReactNode;
5
+ }
6
+ declare function AppNotFoundError({ description, title, ...props }: AppNotFoundErrorProps): React.ReactElement;
7
+ export default AppNotFoundError;
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import AppError from '../AppError';
3
+ function AppNotFoundError({ description = 'The requested resource could not be found. This might be because it has been moved or deleted. If you think this is a mistake, please contact your site administrator.', title = 'Not Found', ...props }) {
4
+ return (_jsx(AppError, { ...props, action: { href: '/', label: 'Go to Homepage' }, description: description, title: title }));
5
+ }
6
+ export default AppNotFoundError;
@@ -0,0 +1,8 @@
1
+ import type { AppErrorProps } from '../AppError';
2
+ interface AppServerErrorProps extends Omit<AppErrorProps, 'action' | 'description' | 'title'> {
3
+ description?: React.ReactNode;
4
+ reset: () => void;
5
+ title?: React.ReactNode;
6
+ }
7
+ declare function AppServerError({ description, reset, title, ...props }: AppServerErrorProps): React.ReactElement;
8
+ export default AppServerError;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useState } from 'react';
4
+ import AppError from '../AppError';
5
+ const WAIT_TIME = 500;
6
+ function AppServerError({ description = 'The server encountered an error and could not complete your request. If the problem persists, please contact your site administrator.', reset, title = 'Something Went Wrong', ...props }) {
7
+ const [isResetting, setIsResetting] = useState(false);
8
+ function handleReset() {
9
+ setIsResetting(true);
10
+ setTimeout(() => {
11
+ reset();
12
+ setIsResetting(false);
13
+ }, WAIT_TIME);
14
+ }
15
+ return (_jsx(AppError, { ...props, action: { isDisabled: isResetting, onClick: handleReset, label: 'Try Again' }, description: description, title: title }));
16
+ }
17
+ export default AppServerError;
@@ -9,6 +9,12 @@ export type { ListProps } from './collections/List';
9
9
  export { default as List } from './collections/List';
10
10
  export type { TableProps } from './collections/Table';
11
11
  export { default as Table } from './collections/Table';
12
+ export type { AppErrorProps } from './errors/AppError';
13
+ export { default as AppError } from './errors/AppError';
14
+ export type { AppForbiddenErrorProps } from './errors/AppForbiddenError';
15
+ export { default as AppForbiddenError } from './errors/AppForbiddenError';
16
+ export type { AppNotFoundErrorProps } from './errors/AppNotFoundError';
17
+ export { default as AppNotFoundError } from './errors/AppNotFoundError';
12
18
  export type { ConfirmModalProps } from './modals/ConfirmModal';
13
19
  export { default as ConfirmModal } from './modals/ConfirmModal';
14
20
  export type { ModalProps } from './modals/Modal';
@@ -4,6 +4,9 @@ export { default as Button } from './buttons/Button';
4
4
  export { default as DataTable } from './collections/DataTable';
5
5
  export { default as List } from './collections/List';
6
6
  export { default as Table } from './collections/Table';
7
+ export { default as AppError } from './errors/AppError';
8
+ export { default as AppForbiddenError } from './errors/AppForbiddenError';
9
+ export { default as AppNotFoundError } from './errors/AppNotFoundError';
7
10
  export { default as ConfirmModal } from './modals/ConfirmModal';
8
11
  export { default as Modal } from './modals/Modal';
9
12
  export { default as ModalLauncher } from './modals/ModalLauncher';