@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,95 +0,0 @@
1
- 'use client';
2
-
3
- import clsx from 'clsx';
4
- import type { RegisteredClassNames } from '@sqrzro/components';
5
-
6
- const classNames: RegisteredClassNames = {
7
- button: (props) => ({
8
- root: {
9
- danger: 'bg-red-500 border-red-500 text-white',
10
- default: clsx(
11
- 'bg-white h-10 px-5 rounded-md text-md text-slate-600 border border-slate-300',
12
- props?.isFullWidth ? 'w-full' : null
13
- ),
14
- primary:
15
- 'bg-primary font-semibold text-white border-none shadow-[inset_rgba(255,255,255,0.1)_0_20px]',
16
- },
17
- }),
18
- calendar: () => ({
19
- root: 'text-sm text-slate-600 p-4 pb-3',
20
- head: 'text-xs text-center pb-2 text-slate-400',
21
- month: 'w-full table-fixed',
22
- day: {
23
- default: 'h-10 border border-gray-200',
24
- highlighted: 'bg-red-300',
25
- selected: 'bg-blue-400',
26
- },
27
- }),
28
- calendarNavigation: () => ({
29
- root: 'flex justify-between items-center mb-6',
30
- title: 'font-semibold text-base',
31
- control: 'h-6 w-6 bg-red-300',
32
- previous: '-order-1',
33
- }),
34
- emptyMessage: () => ({
35
- root: 'text-center text-slate-500 my-24',
36
- title: 'text-2xl font-semibold mb-2',
37
- }),
38
- dropdown: () => ({
39
- item: { default: 'text-gray-700 block px-3 py-2 text-sm', selected: 'bg-red-400' },
40
- }),
41
- fieldset: (props) => ({
42
- root: clsx(
43
- 'bg-white p-8 shadow rounded-md',
44
- props?.isEditable ? 'grid grid-cols-[30%_1fr]' : ''
45
- ),
46
- title: 'mb-8 text-xl font-semibold leading-none text-gray-700',
47
- }),
48
- formField: (props) => ({
49
- root: {
50
- default: props?.isEditable
51
- ? 'grid grid-cols-[25%_1fr] border-t border-slate-200 py-4'
52
- : 'mb-6',
53
- },
54
- label: clsx('font-semibold', props?.isEditable ? 'flex items-center' : 'block mb-2'),
55
- optional: 'pl-2 text-base text-grey-dark font-normal',
56
- error: 'flex gap-2 items-center mt-2 text-red-700 before:h-4 before:w-4 before:bg-[url(/images/icons/error.svg)] before:rounded-full',
57
- }),
58
- inputPanel: () => ({
59
- root: 'bg-white border border-slate-300 shadow-md',
60
- }),
61
- modal: () => ({
62
- root: {
63
- default:
64
- 'bg-white rounded-lg w-full max-w-2xl backdrop:bg-slate-800/60 backdrop:backdrop-blur-sm transition-opacity opacity-0 open:opacity-100 duration-200',
65
- },
66
- title: 'text-2xl font-semibold text-center p-4 border-b border-slate-200 text-slate-700',
67
- content: 'p-4',
68
- actions: 'flex justify-end p-4 border-t border-slate-200',
69
- }),
70
- staticTextInput: () => ({
71
- root: { default: 'bg-white border border-gray-300 h-10 px-3 rounded-sm text-md' },
72
- }),
73
- switch: () => ({
74
- root: {
75
- default: 'cursor-pointer w-10 h-6 bg-slate-300 rounded-full p-1 transition-colors my-2',
76
- checked: 'bg-green-500',
77
- },
78
- control: {
79
- default:
80
- 'w-4 h-4 bg-white rounded-full shadow-md transform translate-x-0 transition-transform',
81
- checked: 'translate-x-full',
82
- },
83
- }),
84
- textButton: () => ({
85
- root: { danger: 'text-red-600' },
86
- }),
87
- textInput: () => ({
88
- root: {
89
- default: 'border border-gray-300 h-10 px-3 rounded-sm text-md focus:border-primary',
90
- error: 'border-red-700',
91
- },
92
- }),
93
- };
94
-
95
- export default classNames;
@@ -1,47 +0,0 @@
1
- @tailwind base;
2
- @tailwind components;
3
- @tailwind utilities;
4
-
5
- @layer base {
6
- body {
7
- @apply font-body bg-slate-100 text-slate-800 text-sm;
8
- }
9
- }
10
-
11
- @layer utilities {
12
- @keyframes show {
13
- from {
14
- opacity: 0;
15
- transform: translateY(2rem);
16
- }
17
- to {
18
- opacity: 1;
19
- transform: translateY(0);
20
- }
21
- }
22
- .show {
23
- animation: show 0.1s ease-in-out;
24
- }
25
-
26
- @keyframes fade {
27
- from {
28
- opacity: 0;
29
- }
30
- to {
31
- opacity: 1;
32
- }
33
- }
34
- .fade {
35
- animation: fade 0.2s ease-in-out;
36
- }
37
-
38
- .showpanel:popover-open {
39
- @starting-style {
40
- opacity: 0;
41
- transform: scale(0.95);
42
- }
43
- opacity: 1;
44
- transform: scale(1);
45
- transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
46
- }
47
- }
@@ -1,9 +0,0 @@
1
- export function formatDate(value?: Date): string {
2
- if (!value) {
3
- return '';
4
- }
5
-
6
- return `${value.getDate().toString().padStart(2, '0')}/${(value.getMonth() + 1)
7
- .toString()
8
- .padStart(2, '0')}/${value.getFullYear()}`;
9
- }
@@ -1,16 +0,0 @@
1
- const { withSZ } = require('@sqrzro/tailwind-plugin');
2
-
3
- module.exports = withSZ({
4
- mode: 'jit',
5
- content: ['./src/**/*.tsx', './src/styles/config.ts'],
6
- theme: {
7
- extend: {
8
- colors: {
9
- primary: 'rgba(127, 86, 217, 1)',
10
- },
11
- fontFamily: {
12
- body: ['var(--font-body)', 'sans-serif'],
13
- },
14
- },
15
- },
16
- });
@@ -1,4 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "exclude": ["node_modules", "src/**/*.spec.tsx", "src/**/*.stories.tsx"]
4
- }
package/tsconfig.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "allowSyntheticDefaultImports": true,
4
- "declaration": true,
5
- "esModuleInterop": true,
6
- "importHelpers": true,
7
- "jsx": "react-jsx",
8
- "lib": ["dom", "esnext"],
9
- "moduleResolution": "node",
10
- "outDir": "dist",
11
- "resolveJsonModule": true,
12
- "skipLibCheck": true,
13
- "strictNullChecks": true,
14
- "target": "esnext"
15
- },
16
- "include": ["next-env.d.ts", "src/**/*"],
17
- "exclude": ["node_modules"]
18
- }