@sqrzro/admin 2.1.0-bz.1 → 2.1.0-bz.11

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 (117) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +8 -5
  3. package/dist/components/AppLayout/index.d.ts +4 -1
  4. package/dist/components/AppLayout/index.js +7 -4
  5. package/dist/components/AppNavigation/index.js +4 -3
  6. package/dist/components/Auth/index.d.ts +5 -0
  7. package/dist/components/Auth/index.js +12 -0
  8. package/dist/components/Badge/index.d.ts +8 -0
  9. package/dist/components/Badge/index.js +11 -0
  10. package/dist/components/Dashboard/index.js +1 -1
  11. package/dist/components/DateFilter/index.js +0 -1
  12. package/dist/components/FilterBar/index.d.ts +4 -3
  13. package/dist/components/FilterBar/index.js +12 -3
  14. package/dist/components/FilterBarItem/index.d.ts +2 -1
  15. package/dist/components/FilterBarItem/index.js +2 -2
  16. package/dist/components/GridList/index.d.ts +2 -2
  17. package/dist/components/GridList/index.js +1 -1
  18. package/dist/components/GridListItem/index.d.ts +1 -1
  19. package/dist/components/GridListItem/index.js +3 -2
  20. package/dist/components/InfoPanel/index.d.ts +8 -0
  21. package/dist/components/InfoPanel/index.js +10 -0
  22. package/dist/components/List/index.d.ts +12 -10
  23. package/dist/components/List/index.js +7 -5
  24. package/dist/components/ListActions/index.js +1 -1
  25. package/dist/components/ListItem/index.d.ts +9 -6
  26. package/dist/components/ListItem/index.js +8 -4
  27. package/dist/components/MeActions/index.js +3 -10
  28. package/dist/components/MePanel/index.d.ts +6 -1
  29. package/dist/components/MePanel/index.js +2 -5
  30. package/dist/components/Page/index.d.ts +1 -1
  31. package/dist/components/Page/index.js +2 -2
  32. package/dist/components/Panel/index.d.ts +1 -1
  33. package/dist/components/Panel/index.js +1 -1
  34. package/dist/components/RootLayout/index.d.ts +2 -1
  35. package/dist/components/RootLayout/index.js +12 -5
  36. package/dist/components/SettingsForm/index.d.ts +2 -0
  37. package/dist/components/SettingsForm/index.js +9 -0
  38. package/dist/components/SettingsPage/index.d.ts +2 -0
  39. package/dist/components/SettingsPage/index.js +7 -0
  40. package/dist/components/Table/index.d.ts +2 -2
  41. package/dist/components/TableClientComponent/index.d.ts +4 -4
  42. package/dist/components/TableClientComponent/index.js +17 -4
  43. package/dist/components/Tabs/index.js +20 -2
  44. package/dist/components/index.d.ts +12 -4
  45. package/dist/components/index.js +6 -2
  46. package/dist/services/ConfigService.d.ts +3 -1
  47. package/dist/services/ConfigService.js +5 -5
  48. package/dist/styles/config.js +94 -35
  49. package/dist/styles/postcss.d.ts +6 -0
  50. package/dist/styles/postcss.js +4 -0
  51. package/dist/styles/tailwind.d.ts +10 -0
  52. package/dist/styles/tailwind.js +72 -0
  53. package/package.json +37 -46
  54. package/postcss.js +3 -0
  55. package/tailwind.d.ts +1 -0
  56. package/tailwind.js +1 -0
  57. package/.babelrc.json +0 -16
  58. package/.eslintignore +0 -6
  59. package/.eslintrc +0 -5
  60. package/.sqrzrorc +0 -5
  61. package/.storybook/main.js +0 -11
  62. package/.storybook/preview-head.html +0 -3
  63. package/.storybook/preview.js +0 -1
  64. package/.turbo/turbo-build.log +0 -20
  65. package/.turbo/turbo-prettier.log +0 -43
  66. package/COMPONENTS.md +0 -45
  67. package/dist/components/LoginForm/index.d.ts +0 -6
  68. package/dist/components/LoginForm/index.js +0 -7
  69. package/dist/styles.css +0 -1723
  70. package/dist/utility/formatters.d.ts +0 -1
  71. package/dist/utility/formatters.js +0 -8
  72. package/next-env.d.ts +0 -5
  73. package/postcss.config.js +0 -3
  74. package/prettier.config.js +0 -1
  75. package/src/components/AppLayout/index.tsx +0 -32
  76. package/src/components/AppNavigation/index.tsx +0 -39
  77. package/src/components/BooleanFilter/index.tsx +0 -28
  78. package/src/components/Config/index.tsx +0 -17
  79. package/src/components/Dashboard/index.tsx +0 -15
  80. package/src/components/DateFilter/index.tsx +0 -49
  81. package/src/components/DropdownFilter/index.tsx +0 -19
  82. package/src/components/FilterBar/index.tsx +0 -35
  83. package/src/components/FilterBarItem/index.tsx +0 -126
  84. package/src/components/GridList/index.tsx +0 -11
  85. package/src/components/GridListItem/index.tsx +0 -31
  86. package/src/components/Icon/index.tsx +0 -33
  87. package/src/components/List/index.tsx +0 -70
  88. package/src/components/ListAction/index.tsx +0 -25
  89. package/src/components/ListActions/index.tsx +0 -43
  90. package/src/components/ListItem/index.tsx +0 -56
  91. package/src/components/LoginForm/index.tsx +0 -34
  92. package/src/components/MeActions/index.tsx +0 -21
  93. package/src/components/MePanel/index.tsx +0 -21
  94. package/src/components/Page/index.tsx +0 -60
  95. package/src/components/PageActions/index.tsx +0 -22
  96. package/src/components/Panel/Panel.spec.tsx +0 -10
  97. package/src/components/Panel/Panel.stories.tsx +0 -9
  98. package/src/components/Panel/index.tsx +0 -15
  99. package/src/components/RootLayout/index.tsx +0 -39
  100. package/src/components/Table/index.tsx +0 -34
  101. package/src/components/TableClientComponent/index.tsx +0 -112
  102. package/src/components/Tabs/index.tsx +0 -25
  103. package/src/components/index.ts +0 -68
  104. package/src/icons/ErrorIcon/index.tsx +0 -19
  105. package/src/icons/InfoIcon/index.tsx +0 -19
  106. package/src/icons/SuccessIcon/index.tsx +0 -19
  107. package/src/icons/WarningIcon/index.tsx +0 -19
  108. package/src/index.ts +0 -3
  109. package/src/interfaces.ts +0 -3
  110. package/src/react.d.ts +0 -12
  111. package/src/services/ConfigService.ts +0 -24
  112. package/src/styles/config.ts +0 -95
  113. package/src/styles/tailwind.css +0 -47
  114. package/src/utility/formatters.ts +0 -9
  115. package/tailwind.config.js +0 -16
  116. package/tsconfig.build.json +0 -4
  117. package/tsconfig.json +0 -18
@@ -1,34 +0,0 @@
1
- 'use client';
2
-
3
- import { Form, FormField, FormSubmit, PasswordInput, TextInput } from '@sqrzro/components';
4
- import type { UseFormReturn } from '@sqrzro/hooks';
5
- import type { UserObject } from '@sqrzro/server';
6
-
7
- export type LoginFormProps = UseFormReturn<UserObject>;
8
-
9
- function LoginForm({ fieldProps, formProps }: Readonly<LoginFormProps>): React.ReactElement {
10
- return (
11
- <div className="flex h-screen flex-col items-center justify-center bg-slate-800 pb-[10vh]">
12
- <div className="mx-auto mb-8 h-12 w-12 rounded-full border-4 border-primary" />
13
- <div className="w-full max-w-sm rounded-lg bg-white p-8 shadow-lg">
14
- <h1 className="mb-8 text-center text-xl font-semibold">Sign in to continue</h1>
15
- <Form {...formProps}>
16
- <FormField label="Email" {...fieldProps('email')} render={TextInput} />
17
- <FormField
18
- label="Password"
19
- {...fieldProps('password')}
20
- render={PasswordInput}
21
- />
22
- <div className="mt-8 text-center">
23
- <a className="mb-6 block text-primary" href="/#">
24
- Forgot Password?
25
- </a>
26
- <FormSubmit isFullWidth>Sign In</FormSubmit>
27
- </div>
28
- </Form>
29
- </div>
30
- </div>
31
- );
32
- }
33
-
34
- export default LoginForm;
@@ -1,21 +0,0 @@
1
- 'use client';
2
-
3
- import { removeSession } from '@sqrzro/server';
4
- import { useRouter } from 'next/navigation';
5
-
6
- function MeActions(): React.ReactElement {
7
- const router = useRouter();
8
-
9
- async function handleLogout(): Promise<void> {
10
- await removeSession();
11
- router.refresh();
12
- }
13
-
14
- return (
15
- <button className="text-xs text-gray-300" onClick={handleLogout} type="button">
16
- Log Out
17
- </button>
18
- );
19
- }
20
-
21
- export default MeActions;
@@ -1,21 +0,0 @@
1
- 'use server';
2
-
3
- import { getIdFromSession } from '@sqrzro/server';
4
-
5
- import MeActions from '../MeActions';
6
-
7
- async function MePanel(): Promise<React.ReactElement> {
8
- const id = await getIdFromSession();
9
-
10
- return (
11
- <div className="ml-auto flex items-center gap-3">
12
- <div className="flex flex-col items-end text-white">
13
- <strong>{id}</strong>
14
- <MeActions />
15
- </div>
16
- <div className="h-9 w-9 rounded-full border-4 border-gray-500" />
17
- </div>
18
- );
19
- }
20
-
21
- export default MePanel;
@@ -1,60 +0,0 @@
1
- import { Fragment } from 'react';
2
- import { Button, Container } from '@sqrzro/components';
3
- import type { LinkableAction } from '@sqrzro/interfaces';
4
-
5
- import Tabs from '../Tabs';
6
-
7
- export interface PageProps {
8
- actions?: LinkableAction[];
9
- basePath?: string;
10
- children: React.ReactNode;
11
- isFullWidth?: boolean;
12
- tabs?: LinkableAction[];
13
- title: string;
14
- }
15
-
16
- function Page({
17
- actions,
18
- basePath,
19
- children,
20
- isFullWidth,
21
- tabs,
22
- title,
23
- }: Readonly<PageProps>): React.ReactElement {
24
- return (
25
- <Fragment>
26
- <header className="bg-gray-800 pb-32 text-white">
27
- <Container isFullWidth={isFullWidth}>
28
- <div className="flex items-center justify-between py-10">
29
- <h1 className="min-h-10 text-3xl font-semibold">{title}</h1>
30
- <div id="page-actions" />
31
- {/* {actions ? (
32
- <div className="sticky top-0">
33
- {actions.map(({ href, label, onClick }) => (
34
- <Button
35
- key={href}
36
- href={href}
37
- onClick={onClick}
38
- variant="primary"
39
- >
40
- {label}
41
- </Button>
42
- ))}
43
- </div>
44
- ) : null} */}
45
- </div>
46
- {tabs ? (
47
- <div className="-mt-4 mb-8">
48
- <Tabs basePath={basePath} data={tabs} />
49
- </div>
50
- ) : null}
51
- </Container>
52
- </header>
53
- <Container isFullWidth={isFullWidth}>
54
- <div className="-mt-32 flex flex-col gap-8">{children}</div>
55
- </Container>
56
- </Fragment>
57
- );
58
- }
59
-
60
- export default Page;
@@ -1,22 +0,0 @@
1
- 'use client';
2
-
3
- import { useEffect, useRef, useState } from 'react';
4
- import { createPortal } from 'react-dom';
5
-
6
- export interface PageActionsProps {
7
- children: React.ReactNode;
8
- }
9
-
10
- function PageActions({ children }: Readonly<PageActionsProps>): React.ReactElement | null {
11
- const ref = useRef<HTMLElement | null>(null);
12
- const [mounted, setMounted] = useState(false);
13
-
14
- useEffect(() => {
15
- ref.current = document.getElementById('page-actions');
16
- setMounted(true);
17
- }, []);
18
-
19
- return mounted && ref.current ? createPortal(children, ref.current) : null;
20
- }
21
-
22
- export default PageActions;
@@ -1,10 +0,0 @@
1
- import { render, screen } from '@testing-library/react';
2
-
3
- import Panel from './index';
4
-
5
- describe('Panel', () => {
6
- it('should render', () => {
7
- render(<Panel />);
8
- expect(screen.queryByText('Panel')).toBeInTheDocument();
9
- });
10
- });
@@ -1,9 +0,0 @@
1
- import Panel from './index';
2
-
3
- export default { title: 'Components/Panel', component: Panel };
4
-
5
- export const Default = (): React.ReactElement => <Panel>Example Panel</Panel>;
6
-
7
- export const WithTitle = (): React.ReactElement => (
8
- <Panel title="Example Title">Example Panel</Panel>
9
- );
@@ -1,15 +0,0 @@
1
- interface PanelProps {
2
- children: React.ReactNode;
3
- title?: string;
4
- }
5
-
6
- function Panel({ children, title }: Readonly<PanelProps>): React.ReactElement {
7
- return (
8
- <article>
9
- {title ? <h3>{title}</h3> : null}
10
- {children}
11
- </article>
12
- );
13
- }
14
-
15
- export default Panel;
@@ -1,39 +0,0 @@
1
- import { Suspense } from 'react';
2
-
3
- import { ClassNames, Toaster, registerClassNames } from '@sqrzro/components';
4
-
5
- import { setConfig } from '../../services/ConfigService';
6
- import type { Config as ConfigObject } from '../../services/ConfigService';
7
-
8
- import classNames from '../../styles/config';
9
-
10
- import Config from '../Config';
11
-
12
- export interface RootLayoutProps {
13
- children: React.ReactNode;
14
- config?: ConfigObject;
15
- }
16
-
17
- function RootLayout({ children, config }: Readonly<RootLayoutProps>): React.ReactElement {
18
- registerClassNames(classNames);
19
-
20
- if (config) {
21
- setConfig(config);
22
- }
23
-
24
- return (
25
- <html lang="en">
26
- <head />
27
- <body>
28
- <Config data={config} />
29
- <ClassNames data={classNames} />
30
- {children}
31
- <Suspense fallback={null}>
32
- <Toaster />
33
- </Suspense>
34
- </body>
35
- </html>
36
- );
37
- }
38
-
39
- export default RootLayout;
@@ -1,34 +0,0 @@
1
- import type { ErrorablePromise } from '@sqrzro/server';
2
-
3
- import TableClientComponent from '../TableClientComponent';
4
- import type { TableClientComponentProps, TableItemObject } from '../TableClientComponent';
5
-
6
- function defaultTransformer<T>(item: T): TableItemObject {
7
- return {
8
- id: (item as unknown as TableItemObject).id,
9
- ...item,
10
- };
11
- }
12
-
13
- export interface TableProps<T> extends Omit<TableClientComponentProps, 'data'> {
14
- fn: (filters?: Record<string, string>) => ErrorablePromise<T[]>;
15
- searchParams?: Record<string, string>;
16
- }
17
-
18
- async function Table<T>({
19
- columns,
20
- fn,
21
- searchParams,
22
- }: Readonly<TableProps<T>>): Promise<React.ReactElement> {
23
- const [response, error] = await fn(searchParams);
24
-
25
- if (error) {
26
- return <div>Error</div>;
27
- }
28
-
29
- const data = response.map(defaultTransformer);
30
-
31
- return <TableClientComponent columns={columns} data={data} />;
32
- }
33
-
34
- export default Table;
@@ -1,112 +0,0 @@
1
- 'use client';
2
-
3
- import { useState } from 'react';
4
-
5
- import clsx from 'clsx';
6
- import { Link } from '@sqrzro/components';
7
- import { usePathname, useSearchParams } from 'next/navigation';
8
-
9
- export interface TableItemObject {
10
- [key: string]: string;
11
- id: string;
12
- }
13
-
14
- interface TableColumnObject {
15
- key: string;
16
- title: string;
17
- type?: 'string';
18
- }
19
-
20
- export interface TableClientComponentProps {
21
- columns: TableColumnObject[];
22
- data: TableItemObject[];
23
- }
24
-
25
- function toggleArrayItem<T>(array: T[], item: T): T[] {
26
- if (array.includes(item)) {
27
- return array.filter((itm) => itm !== item);
28
- }
29
- return [...array, item];
30
- }
31
-
32
- function createFilterLink(
33
- pathname: string,
34
- searchParams: URLSearchParams,
35
- filters: Record<string, string>
36
- ): string {
37
- const updatedSearchParams = new URLSearchParams({
38
- ...Object.fromEntries(searchParams),
39
- ...filters,
40
- });
41
-
42
- return `${pathname}?${updatedSearchParams.toString()}`;
43
- }
44
-
45
- function getDir(currentDir: string | null, isSortActive?: boolean): string {
46
- if (isSortActive) {
47
- return currentDir === 'asc' ? 'desc' : 'asc';
48
- }
49
- return 'asc';
50
- }
51
-
52
- function createSortLink(pathname: string, searchParams: URLSearchParams, sort: string): string {
53
- const dir = getDir(searchParams.get('dir'), searchParams.get('sort') === sort);
54
- return createFilterLink(pathname, searchParams, { sort, dir });
55
- }
56
-
57
- function getSortIconProps(searchParams: URLSearchParams, sort: string): { dir: string | null } {
58
- if (searchParams.get('sort') === sort) {
59
- return { dir: searchParams.get('dir') };
60
- }
61
- return { dir: null };
62
- }
63
-
64
- function TableClientComponent({
65
- columns,
66
- data,
67
- }: Readonly<TableClientComponentProps>): React.ReactElement {
68
- const pathname = usePathname();
69
- const searchParams = useSearchParams();
70
-
71
- const [selected, setSelected] = useState<string[]>([]);
72
-
73
- return (
74
- <div className="bg-white shadow-sm">
75
- <table className="w-full">
76
- <thead>
77
- <tr>
78
- {columns.map((column) => (
79
- <th key={column.key} className="p-4 text-left">
80
- <Link href={createSortLink(pathname, searchParams, column.key)}>
81
- {column.title}{' '}
82
- {/*getSortIconProps(searchParams, column.key).dir*/}
83
- </Link>
84
- </th>
85
- ))}
86
- </tr>
87
- </thead>
88
- <tbody>
89
- {data.map((item) => (
90
- <tr key={item.id} className="odd:bg-slate-100">
91
- {columns.map((column) => (
92
- <td
93
- key={column.key}
94
- className={clsx(
95
- 'border-x border-transparent p-4',
96
- getSortIconProps(searchParams, column.key).dir
97
- ? 'border-sky-300 bg-sky-300/10'
98
- : ''
99
- )}
100
- >
101
- {item[column.key]}
102
- </td>
103
- ))}
104
- </tr>
105
- ))}
106
- </tbody>
107
- </table>
108
- </div>
109
- );
110
- }
111
-
112
- export default TableClientComponent;
@@ -1,25 +0,0 @@
1
- import { Link } from '@sqrzro/components';
2
- import type { LinkableAction } from '@sqrzro/interfaces';
3
-
4
- interface TabBarProps {
5
- basePath?: string;
6
- data: LinkableAction[];
7
- }
8
-
9
- function Tabs({ basePath = '', data }: Readonly<TabBarProps>): React.ReactElement {
10
- return (
11
- <nav className="border-y border-gray-700">
12
- <ul className="flex gap-4 font-semibold">
13
- {data.map(({ href, label }) => (
14
- <li key={href}>
15
- <Link className="block py-2 text-white" href={`${basePath}${href || ''}`}>
16
- {label}
17
- </Link>
18
- </li>
19
- ))}
20
- </ul>
21
- </nav>
22
- );
23
- }
24
-
25
- export default Tabs;
@@ -1,68 +0,0 @@
1
- // Exported from @sqrzro/components
2
-
3
- export {
4
- Button,
5
- CalendarInput,
6
- ConnectedDropdown,
7
- DateFormField,
8
- DateInput,
9
- Dropdown,
10
- EditableDateFormField,
11
- EditableDropdownFormField,
12
- EditableForm,
13
- EditableFormField,
14
- EditableMultiFormField,
15
- EditableNumberFormField,
16
- EditableSwitchFormField,
17
- EditableTextFormField,
18
- Fieldset,
19
- Form,
20
- FormField,
21
- FormSubmit,
22
- ImageInput,
23
- ImageFormField,
24
- Link,
25
- ModalForm,
26
- NumberInput,
27
- Switch,
28
- TextFormField,
29
- TextInput,
30
- Toaster,
31
- } from '@sqrzro/components';
32
-
33
- // Exported from @sqrzro/admin
34
-
35
- export type { AppLayoutProps } from './AppLayout';
36
- export { default as AppLayout } from './AppLayout';
37
-
38
- export type { DashboardProps } from './Dashboard';
39
- export { default as Dashboard } from './Dashboard';
40
-
41
- export type { FilterBarProps } from './FilterBar';
42
- export { default as FilterBar } from './FilterBar';
43
-
44
- export type { GridListProps } from './GridList';
45
- export { default as GridList } from './GridList';
46
-
47
- export type { ListComponentProps, ListProps } from './List';
48
- export { default as List } from './List';
49
-
50
- export type { ListObject } from './ListItem';
51
-
52
- export type { ListActionsProps } from './ListActions';
53
- export { default as ListActions } from './ListActions';
54
-
55
- export type { LoginFormProps } from './LoginForm';
56
- export { default as LoginForm } from './LoginForm';
57
-
58
- export type { PageProps } from './Page';
59
- export { default as Page } from './Page';
60
-
61
- export type { PageActionsProps } from './PageActions';
62
- export { default as PageActions } from './PageActions';
63
-
64
- export type { RootLayoutProps } from './RootLayout';
65
- export { default as RootLayout } from './RootLayout';
66
-
67
- export type { TableProps } from './Table';
68
- export { default as Table } from './Table';
@@ -1,19 +0,0 @@
1
- function ErrorIcon(): React.ReactElement {
2
- return (
3
- <svg
4
- aria-hidden="true"
5
- className="h-5 w-5 text-red-400"
6
- fill="currentColor"
7
- viewBox="0 0 20 20"
8
- xmlns="http://www.w3.org/2000/svg"
9
- >
10
- <path
11
- clipRule="evenodd"
12
- d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"
13
- fillRule="evenodd"
14
- />
15
- </svg>
16
- );
17
- }
18
-
19
- export default ErrorIcon;
@@ -1,19 +0,0 @@
1
- function InfoIcon(): React.ReactElement {
2
- return (
3
- <svg
4
- aria-hidden="true"
5
- className="h-5 w-5 text-blue-400"
6
- fill="currentColor"
7
- viewBox="0 0 20 20"
8
- xmlns="http://www.w3.org/2000/svg"
9
- >
10
- <path
11
- clipRule="evenodd"
12
- d="M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z"
13
- fillRule="evenodd"
14
- />
15
- </svg>
16
- );
17
- }
18
-
19
- export default InfoIcon;
@@ -1,19 +0,0 @@
1
- function SuccessIcon(): React.ReactElement {
2
- return (
3
- <svg
4
- aria-hidden="true"
5
- className="h-5 w-5 text-green-400"
6
- fill="currentColor"
7
- viewBox="0 0 20 20"
8
- xmlns="http://www.w3.org/2000/svg"
9
- >
10
- <path
11
- clipRule="evenodd"
12
- d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"
13
- fillRule="evenodd"
14
- />
15
- </svg>
16
- );
17
- }
18
-
19
- export default SuccessIcon;
@@ -1,19 +0,0 @@
1
- function WarningIcon(): React.ReactElement {
2
- return (
3
- <svg
4
- aria-hidden="true"
5
- className="h-5 w-5 text-yellow-400"
6
- fill="currentColor"
7
- viewBox="0 0 20 20"
8
- xmlns="http://www.w3.org/2000/svg"
9
- >
10
- <path
11
- clipRule="evenodd"
12
- d="M8.485 2.495c.673-1.167 2.357-1.167 3.03 0l6.28 10.875c.673 1.167-.17 2.625-1.516 2.625H3.72c-1.347 0-2.189-1.458-1.515-2.625L8.485 2.495zM10 5a.75.75 0 01.75.75v3.5a.75.75 0 01-1.5 0v-3.5A.75.75 0 0110 5zm0 9a1 1 0 100-2 1 1 0 000 2z"
13
- fillRule="evenodd"
14
- />
15
- </svg>
16
- );
17
- }
18
-
19
- export default WarningIcon;
package/src/index.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from './components';
2
- export * from './interfaces';
3
- export * from './services/ConfigService';
package/src/interfaces.ts DELETED
@@ -1,3 +0,0 @@
1
- import type { InputProps, SimpleObject } from '@sqrzro/interfaces';
2
-
3
- export type FilterComponentProps = InputProps<string> & { data?: SimpleObject[] };
package/src/react.d.ts DELETED
@@ -1,12 +0,0 @@
1
- import * as React from 'react'; // eslint-disable-line @typescript-eslint/no-unused-vars
2
-
3
- declare module 'react' {
4
- // This is a temporary fix until React supports the Popover API properly.
5
- interface HTMLAttributes<T> extends AriaAttributes, DOMAttributes<T> {
6
- anchor?: string;
7
- popover?: string;
8
- }
9
- interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
10
- popovertarget?: string;
11
- }
12
- }
@@ -1,24 +0,0 @@
1
- export interface Config {
2
- app: {
3
- name: string;
4
- url: string;
5
- };
6
- navigation: Record<string, string>;
7
- }
8
-
9
- let cachedConfig: Config = {
10
- app: {
11
- name: 'Square Zero',
12
- url: 'http://localhost:8080',
13
- },
14
- navigation: {},
15
- };
16
-
17
- export function setConfig(config: Config): Config {
18
- cachedConfig = config;
19
- return cachedConfig;
20
- }
21
-
22
- export function getConfig(): Config {
23
- return cachedConfig;
24
- }