@admin-layout/tailwind-ui 12.0.16-alpha.91 → 12.2.1-alpha.0
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.
- package/lib/components/Button/Button.d.ts +1 -1
- package/lib/components/Button/Button.d.ts.map +1 -1
- package/lib/components/Button/Button.js +6 -7
- package/lib/components/Button/Button.js.map +1 -1
- package/lib/components/DatePicker/DatePicker.js +139 -157
- package/lib/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts +2 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ApplicationErrorHandler.js +2 -2
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts +2 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/ErrorBoundary.js +28 -35
- package/lib/components/ErrorHandlers/ErrorBoundary.js.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts +2 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.d.ts.map +1 -1
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js +15 -20
- package/lib/components/ErrorHandlers/LayoutErrorBoundary.js.map +1 -1
- package/lib/components/ErrorPages/403.d.ts +2 -1
- package/lib/components/ErrorPages/403.d.ts.map +1 -1
- package/lib/components/ErrorPages/403.js +18 -26
- package/lib/components/ErrorPages/403.js.map +1 -1
- package/lib/components/ErrorPages/404.d.ts +2 -1
- package/lib/components/ErrorPages/404.d.ts.map +1 -1
- package/lib/components/ErrorPages/404.js +18 -26
- package/lib/components/ErrorPages/404.js.map +1 -1
- package/lib/components/ErrorPages/500.d.ts +2 -1
- package/lib/components/ErrorPages/500.d.ts.map +1 -1
- package/lib/components/ErrorPages/500.js +18 -26
- package/lib/components/ErrorPages/500.js.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts +2 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.d.ts.map +1 -1
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js +19 -24
- package/lib/components/LanguageMenuDropdown/LanguageMenuDropdown.js.map +1 -1
- package/lib/components/OTP/OTPInput.js +30 -32
- package/lib/components/OTP/OTPInput.js.map +1 -1
- package/lib/components/OTP/OTPVerification.js +55 -75
- package/lib/components/OTP/OTPVerification.js.map +1 -1
- package/lib/components/OTP/SingleInput.js +2 -2
- package/lib/components/OTP/SingleInput.js.map +1 -1
- package/lib/components/PageContainer/PageContainer.js +22 -29
- package/lib/components/PageContainer/PageContainer.js.map +1 -1
- package/lib/components/PageLoading/index.js +7 -8
- package/lib/components/PageLoading/index.js.map +1 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts +2 -1
- package/lib/components/RJSFPreview/PreviewAsyncDropdown.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.d.ts +2 -1
- package/lib/components/ReactTable/Table.d.ts.map +1 -1
- package/lib/components/ReactTable/Table.js +71 -92
- package/lib/components/ReactTable/Table.js.map +1 -1
- package/lib/components/ReactTable/TableFilters.d.ts +3 -2
- package/lib/components/ReactTable/TableFilters.d.ts.map +1 -1
- package/lib/components/ReactTable/TableFilters.js +34 -40
- package/lib/components/ReactTable/TableFilters.js.map +1 -1
- package/lib/components/Search/SearchInput.d.ts +2 -1
- package/lib/components/Search/SearchInput.d.ts.map +1 -1
- package/lib/components/Search/SearchInput.js +13 -14
- package/lib/components/Search/SearchInput.js.map +1 -1
- package/lib/components/Select/Select.d.ts +6 -6
- package/lib/components/Select/Select.d.ts.map +1 -1
- package/lib/components/Select/Select.js +45 -60
- package/lib/components/Select/Select.js.map +1 -1
- package/lib/components/Spin/index.js +11 -14
- package/lib/components/Spin/index.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeProvider.js +4 -5
- package/lib/components/ThemeProvider/ThemeProvider.js.map +1 -1
- package/lib/components/ThemeProvider/ThemeToggle.js +24 -27
- package/lib/components/ThemeProvider/ThemeToggle.js.map +1 -1
- package/lib/hooks/useToast.d.ts +1 -1
- package/lib/hooks/useToast.d.ts.map +1 -1
- package/lib/hooks/useToast.js +37 -46
- package/lib/hooks/useToast.js.map +1 -1
- package/lib/shardui/accordion.js +16 -20
- package/lib/shardui/accordion.js.map +1 -1
- package/lib/shardui/alert-dialog.d.ts +2 -2
- package/lib/shardui/alert-dialog.js +13 -15
- package/lib/shardui/alert-dialog.js.map +1 -1
- package/lib/shardui/alert.d.ts +1 -1
- package/lib/shardui/alert.d.ts.map +1 -1
- package/lib/shardui/alert.js +4 -4
- package/lib/shardui/alert.js.map +1 -1
- package/lib/shardui/avatar.js +4 -4
- package/lib/shardui/avatar.js.map +1 -1
- package/lib/shardui/badge.d.ts +2 -2
- package/lib/shardui/badge.d.ts.map +1 -1
- package/lib/shardui/badge.js +2 -2
- package/lib/shardui/badge.js.map +1 -1
- package/lib/shardui/breadcrumb.d.ts +2 -2
- package/lib/shardui/breadcrumb.js +16 -19
- package/lib/shardui/breadcrumb.js.map +1 -1
- package/lib/shardui/button.d.ts +1 -1
- package/lib/shardui/button.d.ts.map +1 -1
- package/lib/shardui/button.js +2 -2
- package/lib/shardui/button.js.map +1 -1
- package/lib/shardui/calendar.d.ts +1 -1
- package/lib/shardui/calendar.d.ts.map +1 -1
- package/lib/shardui/calendar.js +4 -4
- package/lib/shardui/card.js +7 -7
- package/lib/shardui/card.js.map +1 -1
- package/lib/shardui/carousel.js +33 -40
- package/lib/shardui/carousel.js.map +1 -1
- package/lib/shardui/chart.d.ts +1 -1
- package/lib/shardui/chart.d.ts.map +1 -1
- package/lib/shardui/chart.js +66 -81
- package/lib/shardui/chart.js.map +1 -1
- package/lib/shardui/checkbox.js +8 -10
- package/lib/shardui/checkbox.js.map +1 -1
- package/lib/shardui/command.d.ts +2 -2
- package/lib/shardui/command.d.ts.map +1 -1
- package/lib/shardui/command.js +24 -28
- package/lib/shardui/command.js.map +1 -1
- package/lib/shardui/context-menu.d.ts +1 -1
- package/lib/shardui/context-menu.js +30 -41
- package/lib/shardui/context-menu.js.map +1 -1
- package/lib/shardui/dialog.d.ts +2 -2
- package/lib/shardui/dialog.js +17 -22
- package/lib/shardui/dialog.js.map +1 -1
- package/lib/shardui/drawer.d.ts +3 -3
- package/lib/shardui/drawer.js +14 -17
- package/lib/shardui/drawer.js.map +1 -1
- package/lib/shardui/dropdown-menu.d.ts +1 -1
- package/lib/shardui/dropdown-menu.js +31 -42
- package/lib/shardui/dropdown-menu.js.map +1 -1
- package/lib/shardui/form.d.ts +1 -1
- package/lib/shardui/form.d.ts.map +1 -1
- package/lib/shardui/form.js +19 -22
- package/lib/shardui/form.js.map +1 -1
- package/lib/shardui/hover-card.js +2 -2
- package/lib/shardui/hover-card.js.map +1 -1
- package/lib/shardui/input-otp.js +13 -16
- package/lib/shardui/input-otp.js.map +1 -1
- package/lib/shardui/input.js +2 -2
- package/lib/shardui/input.js.map +1 -1
- package/lib/shardui/label.d.ts +1 -1
- package/lib/shardui/label.d.ts.map +1 -1
- package/lib/shardui/label.js +2 -2
- package/lib/shardui/label.js.map +1 -1
- package/lib/shardui/menubar.d.ts +1 -1
- package/lib/shardui/menubar.js +35 -46
- package/lib/shardui/menubar.js.map +1 -1
- package/lib/shardui/navigation-menu.d.ts +1 -1
- package/lib/shardui/navigation-menu.d.ts.map +1 -1
- package/lib/shardui/navigation-menu.js +24 -28
- package/lib/shardui/navigation-menu.js.map +1 -1
- package/lib/shardui/pagination.d.ts +5 -5
- package/lib/shardui/pagination.js +22 -30
- package/lib/shardui/pagination.js.map +1 -1
- package/lib/shardui/popover.js +8 -10
- package/lib/shardui/popover.js.map +1 -1
- package/lib/shardui/progress.js +9 -10
- package/lib/shardui/progress.js.map +1 -1
- package/lib/shardui/radio-group.js +9 -11
- package/lib/shardui/radio-group.js.map +1 -1
- package/lib/shardui/resizable.d.ts +5 -4
- package/lib/shardui/resizable.d.ts.map +1 -1
- package/lib/shardui/resizable.js +9 -11
- package/lib/shardui/resizable.js.map +1 -1
- package/lib/shardui/scroll-area.js +11 -14
- package/lib/shardui/scroll-area.js.map +1 -1
- package/lib/shardui/select.js +35 -49
- package/lib/shardui/select.js.map +1 -1
- package/lib/shardui/separator.js +2 -2
- package/lib/shardui/separator.js.map +1 -1
- package/lib/shardui/sheet.d.ts +3 -3
- package/lib/shardui/sheet.d.ts.map +1 -1
- package/lib/shardui/sheet.js +19 -24
- package/lib/shardui/sheet.js.map +1 -1
- package/lib/shardui/sidebar.d.ts +1 -1
- package/lib/shardui/sidebar.d.ts.map +1 -1
- package/lib/shardui/sidebar.js +88 -104
- package/lib/shardui/sidebar.js.map +1 -1
- package/lib/shardui/skeleton.d.ts +2 -1
- package/lib/shardui/skeleton.d.ts.map +1 -1
- package/lib/shardui/skeleton.js +2 -2
- package/lib/shardui/skeleton.js.map +1 -1
- package/lib/shardui/slider.js +10 -12
- package/lib/shardui/slider.js.map +1 -1
- package/lib/shardui/sonner.d.ts +2 -1
- package/lib/shardui/sonner.d.ts.map +1 -1
- package/lib/shardui/sonner.js +2 -2
- package/lib/shardui/sonner.js.map +1 -1
- package/lib/shardui/switch.js +6 -7
- package/lib/shardui/switch.js.map +1 -1
- package/lib/shardui/table.js +15 -16
- package/lib/shardui/table.js.map +1 -1
- package/lib/shardui/tabs.js +4 -4
- package/lib/shardui/tabs.js.map +1 -1
- package/lib/shardui/textarea.js +2 -2
- package/lib/shardui/textarea.js.map +1 -1
- package/lib/shardui/toast.d.ts +1 -1
- package/lib/shardui/toast.d.ts.map +1 -1
- package/lib/shardui/toast.js +11 -12
- package/lib/shardui/toast.js.map +1 -1
- package/lib/shardui/toaster.d.ts +2 -1
- package/lib/shardui/toaster.d.ts.map +1 -1
- package/lib/shardui/toaster.js +14 -21
- package/lib/shardui/toaster.js.map +1 -1
- package/lib/shardui/toggle-group.d.ts +2 -2
- package/lib/shardui/toggle-group.d.ts.map +1 -1
- package/lib/shardui/toggle-group.js +12 -15
- package/lib/shardui/toggle-group.js.map +1 -1
- package/lib/shardui/toggle.d.ts +2 -2
- package/lib/shardui/toggle.d.ts.map +1 -1
- package/lib/shardui/toggle.js +2 -2
- package/lib/shardui/toggle.js.map +1 -1
- package/lib/shardui/tooltip.js +2 -2
- package/lib/shardui/tooltip.js.map +1 -1
- package/package.json +3 -3
|
@@ -8,6 +8,6 @@ export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElemen
|
|
|
8
8
|
fullWidth?: boolean;
|
|
9
9
|
children: React.ReactNode;
|
|
10
10
|
}
|
|
11
|
-
declare const Button: ({ variant, size, isLoading, fullWidth, className, children, disabled, ...props }: ButtonProps) =>
|
|
11
|
+
declare const Button: ({ variant, size, isLoading, fullWidth, className, children, disabled, ...props }: ButtonProps) => React.JSX.Element;
|
|
12
12
|
export { Button as TailwindUiButton };
|
|
13
13
|
//# sourceMappingURL=Button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AACrF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,QAAA,MAAM,MAAM,GAAI,kFASb,WAAW,
|
|
1
|
+
{"version":3,"file":"Button.d.ts","sourceRoot":"","sources":["../../../src/components/Button/Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,MAAM,aAAa,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,SAAS,GAAG,OAAO,CAAC;AACrF,MAAM,MAAM,UAAU,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtD,MAAM,WAAW,WAAY,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;IAC9E,OAAO,CAAC,EAAE,aAAa,CAAC;IACxB,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC7B;AAED,QAAA,MAAM,MAAM,GAAI,kFASb,WAAW,sBA6Cb,CAAC;AAEF,OAAO,EAAE,MAAM,IAAI,gBAAgB,EAAE,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from'react';import {Loader2}from'lucide-react';const Button = ({
|
|
2
2
|
variant = 'primary',
|
|
3
3
|
size = 'medium',
|
|
4
4
|
isLoading = false,
|
|
@@ -39,12 +39,11 @@ import {jsxs,jsx}from'react/jsx-runtime';import {Loader2}from'lucide-react';cons
|
|
|
39
39
|
const sizeClasses = getSizeClasses();
|
|
40
40
|
const widthClass = fullWidth ? 'w-full' : '';
|
|
41
41
|
const disabledClass = isLoading || disabled ? 'opacity-50 cursor-not-allowed' : 'cursor-pointer interactive-hover';
|
|
42
|
-
return
|
|
42
|
+
return React__default.createElement("button", {
|
|
43
43
|
className: `${baseClasses} ${variantClasses} ${sizeClasses} ${widthClass} ${disabledClass} ${className}`,
|
|
44
44
|
disabled: isLoading || disabled,
|
|
45
|
-
...props
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
});
|
|
45
|
+
...props
|
|
46
|
+
}, isLoading && React__default.createElement(Loader2, {
|
|
47
|
+
className: "w-4 h-4 mr-2 animate-spin"
|
|
48
|
+
}), children);
|
|
50
49
|
};export{Button as TailwindUiButton};//# sourceMappingURL=Button.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/Button/Button.tsx"],"sourcesContent":[null],"names":[],"mappings":"qEAIA,MAAM,MAAM;AAEZ,EAAA,OAAM,GAAA;MACF,GAAA,QAAU;WACH,GAAA,KAAA;WACP,GAAU,KAAE;WACZ,GAAU,EAAE;AACZ,EAAA,QAAA;AACH,EAAA,QAAA;AAED,EAAA,GAAA;AAwDA,CAAA,KAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default,{useRef,useEffect}from'react';import {useActor}from'@xstate/react';import {datePickerMachine}from'./machine.js';import {getDaysInMonth,getYearsRange,months}from'./utils.js';const DatePicker = ({
|
|
2
2
|
value,
|
|
3
3
|
onChange,
|
|
4
4
|
placeholder = 'Select date',
|
|
@@ -53,166 +53,148 @@ import {jsxs,jsx}from'react/jsx-runtime';import {useRef,useEffect}from'react';im
|
|
|
53
53
|
// Group dates into rows (5 rows of 7 days each - may have empty cells)
|
|
54
54
|
const numberOfRows = Math.ceil(daysInMonth / 7);
|
|
55
55
|
const years = getYearsRange(currentDate.getFullYear());
|
|
56
|
-
return
|
|
56
|
+
return React__default.createElement("div", {
|
|
57
57
|
ref: containerRef,
|
|
58
|
-
className: `relative ${className}
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
if (dateIndex >= dates.length) {
|
|
188
|
-
return jsx("div", {
|
|
189
|
-
className: "flex-1 h-6 border-r border-gray-100 last:border-r-0"
|
|
190
|
-
}, `empty-${rowIndex}-${colIndex}`);
|
|
191
|
-
}
|
|
192
|
-
const date = dates[dateIndex];
|
|
193
|
-
const isToday = date.getDate() === currentDate.getDate() && date.getMonth() === currentDate.getMonth() && date.getFullYear() === currentDate.getFullYear();
|
|
194
|
-
const isSelected = selectedDate && date.getDate() === selectedDate.getDate() && date.getMonth() === selectedDate.getMonth() && date.getFullYear() === selectedDate.getFullYear();
|
|
195
|
-
return jsx("div", {
|
|
196
|
-
className: `
|
|
58
|
+
className: `relative ${className}`
|
|
59
|
+
}, React__default.createElement("div", {
|
|
60
|
+
className: "relative"
|
|
61
|
+
}, React__default.createElement("input", {
|
|
62
|
+
type: "text",
|
|
63
|
+
className: "w-full px-2 py-1 h-7 border border-gray-300 hover:border-blue-400 focus:border-blue-400 \n rounded text-xs transition-colors duration-200 ease-in-out shadow-sm \n focus:outline-none focus:ring-0",
|
|
64
|
+
placeholder: placeholder,
|
|
65
|
+
value: inputValue,
|
|
66
|
+
onChange: e => send({
|
|
67
|
+
type: 'INPUT_CHANGE',
|
|
68
|
+
value: e.target.value
|
|
69
|
+
}),
|
|
70
|
+
onClick: () => send({
|
|
71
|
+
type: 'TOGGLE_CALENDAR'
|
|
72
|
+
}),
|
|
73
|
+
readOnly: true
|
|
74
|
+
}), React__default.createElement("div", {
|
|
75
|
+
className: "absolute inset-y-0 right-0 flex items-center px-2 cursor-pointer text-gray-400",
|
|
76
|
+
onClick: () => send({
|
|
77
|
+
type: 'TOGGLE_CALENDAR'
|
|
78
|
+
})
|
|
79
|
+
}, React__default.createElement("svg", {
|
|
80
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
81
|
+
className: "h-3 w-3",
|
|
82
|
+
fill: "none",
|
|
83
|
+
viewBox: "0 0 24 24",
|
|
84
|
+
stroke: "currentColor"
|
|
85
|
+
}, React__default.createElement("path", {
|
|
86
|
+
strokeLinecap: "round",
|
|
87
|
+
strokeLinejoin: "round",
|
|
88
|
+
strokeWidth: 2,
|
|
89
|
+
d: "M8 7V3m8 4V3m-9 8h10M5 21h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v12a2 2 0 002 2z"
|
|
90
|
+
})))), isOpen && React__default.createElement("div", {
|
|
91
|
+
className: "absolute z-50 mt-1 w-72 bg-white rounded shadow-md border border-gray-200"
|
|
92
|
+
}, React__default.createElement("div", {
|
|
93
|
+
className: "px-1 py-1 border-b border-gray-200"
|
|
94
|
+
}, React__default.createElement("div", {
|
|
95
|
+
className: "flex justify-between items-center"
|
|
96
|
+
}, React__default.createElement("button", {
|
|
97
|
+
className: "p-0.5 hover:bg-gray-100 text-gray-600 rounded flex items-center justify-center w-5 h-5",
|
|
98
|
+
onClick: () => send({
|
|
99
|
+
type: 'PREV_MONTH'
|
|
100
|
+
})
|
|
101
|
+
}, React__default.createElement("svg", {
|
|
102
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
103
|
+
className: "h-3 w-3",
|
|
104
|
+
fill: "none",
|
|
105
|
+
viewBox: "0 0 24 24",
|
|
106
|
+
stroke: "currentColor"
|
|
107
|
+
}, React__default.createElement("path", {
|
|
108
|
+
strokeLinecap: "round",
|
|
109
|
+
strokeLinejoin: "round",
|
|
110
|
+
strokeWidth: 2.5,
|
|
111
|
+
d: "M15 19l-7-7 7-7"
|
|
112
|
+
}))), React__default.createElement("div", {
|
|
113
|
+
className: "flex items-center space-x-1 text-xs"
|
|
114
|
+
}, React__default.createElement("select", {
|
|
115
|
+
className: "appearance-none bg-transparent cursor-pointer py-0 px-1 pr-6 w-20 rounded hover:bg-gray-100 text-gray-800 border-0 focus:outline-none focus:ring-0 text-xs",
|
|
116
|
+
value: currentMonth.getMonth(),
|
|
117
|
+
onChange: e => send({
|
|
118
|
+
type: 'SELECT_MONTH',
|
|
119
|
+
month: parseInt(e.target.value)
|
|
120
|
+
}),
|
|
121
|
+
style: {
|
|
122
|
+
backgroundPosition: 'right 4px center'
|
|
123
|
+
}
|
|
124
|
+
}, months.map((month, index) => React__default.createElement("option", {
|
|
125
|
+
key: month,
|
|
126
|
+
value: index
|
|
127
|
+
}, month))), React__default.createElement("select", {
|
|
128
|
+
className: "appearance-none bg-transparent cursor-pointer py-0 px-1 pr-6 w-14 rounded hover:bg-gray-100 text-gray-800 border-0 focus:outline-none focus:ring-0 text-xs",
|
|
129
|
+
value: currentMonth.getFullYear(),
|
|
130
|
+
onChange: e => send({
|
|
131
|
+
type: 'SELECT_YEAR',
|
|
132
|
+
year: parseInt(e.target.value)
|
|
133
|
+
}),
|
|
134
|
+
style: {
|
|
135
|
+
backgroundPosition: 'right 4px center'
|
|
136
|
+
}
|
|
137
|
+
}, years.map(year => React__default.createElement("option", {
|
|
138
|
+
key: year,
|
|
139
|
+
value: year
|
|
140
|
+
}, year)))), React__default.createElement("button", {
|
|
141
|
+
className: "p-0.5 hover:bg-gray-100 text-gray-600 rounded flex items-center justify-center w-5 h-5",
|
|
142
|
+
onClick: () => send({
|
|
143
|
+
type: 'NEXT_MONTH'
|
|
144
|
+
})
|
|
145
|
+
}, React__default.createElement("svg", {
|
|
146
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
147
|
+
className: "h-3 w-3",
|
|
148
|
+
fill: "none",
|
|
149
|
+
viewBox: "0 0 24 24",
|
|
150
|
+
stroke: "currentColor"
|
|
151
|
+
}, React__default.createElement("path", {
|
|
152
|
+
strokeLinecap: "round",
|
|
153
|
+
strokeLinejoin: "round",
|
|
154
|
+
strokeWidth: 2.5,
|
|
155
|
+
d: "M9 5l7 7-7 7"
|
|
156
|
+
}))))), React__default.createElement("div", {
|
|
157
|
+
className: "border-b border-gray-200"
|
|
158
|
+
}, React__default.createElement("div", {
|
|
159
|
+
className: "flex border-b border-gray-100 bg-gray-50"
|
|
160
|
+
}, ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'].map((day, index) => React__default.createElement("div", {
|
|
161
|
+
key: day,
|
|
162
|
+
className: `flex-1 px-1 py-1 text-xs text-center font-medium text-gray-700 ${index < 6 ? 'border-r border-gray-100' : ''}`
|
|
163
|
+
}, day))), React__default.createElement("div", {
|
|
164
|
+
className: "p-0"
|
|
165
|
+
}, Array.from({
|
|
166
|
+
length: numberOfRows
|
|
167
|
+
}).map((_, rowIndex) => React__default.createElement("div", {
|
|
168
|
+
key: `row-${rowIndex}`,
|
|
169
|
+
className: "flex border-b border-gray-100 last:border-b-0"
|
|
170
|
+
}, Array.from({
|
|
171
|
+
length: 7
|
|
172
|
+
}).map((_, colIndex) => {
|
|
173
|
+
const dateIndex = rowIndex * 7 + colIndex;
|
|
174
|
+
// Return empty cell if out of range
|
|
175
|
+
if (dateIndex >= dates.length) {
|
|
176
|
+
return React__default.createElement("div", {
|
|
177
|
+
key: `empty-${rowIndex}-${colIndex}`,
|
|
178
|
+
className: "flex-1 h-6 border-r border-gray-100 last:border-r-0"
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
const date = dates[dateIndex];
|
|
182
|
+
const isToday = date.getDate() === currentDate.getDate() && date.getMonth() === currentDate.getMonth() && date.getFullYear() === currentDate.getFullYear();
|
|
183
|
+
const isSelected = selectedDate && date.getDate() === selectedDate.getDate() && date.getMonth() === selectedDate.getMonth() && date.getFullYear() === selectedDate.getFullYear();
|
|
184
|
+
return React__default.createElement("div", {
|
|
185
|
+
key: `date-${date.getDate()}`,
|
|
186
|
+
className: `
|
|
197
187
|
flex-1 h-6 flex items-center justify-center text-xs cursor-pointer transition-colors
|
|
198
188
|
border-r border-gray-100 last:border-r-0
|
|
199
189
|
${isToday && !isSelected ? 'font-bold text-blue-600' : ''}
|
|
200
190
|
${isSelected ? 'bg-blue-50 text-blue-700 font-medium' : 'hover:bg-gray-50'}
|
|
201
191
|
`,
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
children: jsx("button", {
|
|
211
|
-
className: "px-2 py-0.5 text-xs text-blue-600 hover:bg-blue-50 transition-colors",
|
|
212
|
-
onClick: () => handleDateSelect(new Date()),
|
|
213
|
-
children: "Today"
|
|
214
|
-
})
|
|
215
|
-
})]
|
|
216
|
-
})]
|
|
217
|
-
});
|
|
192
|
+
onClick: () => handleDateSelect(date)
|
|
193
|
+
}, date.getDate());
|
|
194
|
+
}))))), React__default.createElement("div", {
|
|
195
|
+
className: "py-1 px-1 flex justify-end"
|
|
196
|
+
}, React__default.createElement("button", {
|
|
197
|
+
className: "px-2 py-0.5 text-xs text-blue-600 hover:bg-blue-50 transition-colors",
|
|
198
|
+
onClick: () => handleDateSelect(new Date())
|
|
199
|
+
}, "Today"))));
|
|
218
200
|
};export{DatePicker,DatePicker as default};//# sourceMappingURL=DatePicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DatePicker.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const ApplicationErrorHandler: (props: any) => React.JSX.Element;
|
|
2
3
|
//# sourceMappingURL=ApplicationErrorHandler.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ApplicationErrorHandler.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ApplicationErrorHandler.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ApplicationErrorHandler.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ApplicationErrorHandler.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAkB/B,eAAO,MAAM,uBAAuB,GAAI,UAAK,sBAG5C,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ApplicationErrorHandlerCommon}from'@admin-layout/client';import*as React from'react';import {logger}from'@cdm-logger/client';import'../ThemeProvider/ThemeProvider.js';import {toast}from'sonner';const FallbackComponent = ({
|
|
2
2
|
error
|
|
3
3
|
}) => {
|
|
4
4
|
React.useLayoutEffect(() => {
|
|
@@ -14,7 +14,7 @@ import {jsx}from'react/jsx-runtime';import {ApplicationErrorHandlerCommon}from'@
|
|
|
14
14
|
};
|
|
15
15
|
const ApplicationErrorHandler = props => {
|
|
16
16
|
const CommonHandler = ApplicationErrorHandlerCommon(FallbackComponent);
|
|
17
|
-
return
|
|
17
|
+
return React.createElement(CommonHandler, {
|
|
18
18
|
...props
|
|
19
19
|
});
|
|
20
20
|
};export{ApplicationErrorHandler};//# sourceMappingURL=ApplicationErrorHandler.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ErrorBoundary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/ErrorBoundary.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAwC/B,eAAO,MAAM,aAAa,GAAI,UAAK,sBAElC,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import {ErrorBoundaryCommon}from'@admin-layout/client';import*as React from'react';import {useNavigate}from'@remix-run/react';import {logger}from'@cdm-logger/client';import {icons}from'../../icons/index.js';const Fallback = props => {
|
|
2
2
|
const {
|
|
3
3
|
error
|
|
4
4
|
} = props;
|
|
@@ -9,40 +9,33 @@ import {jsx,jsxs}from'react/jsx-runtime';import {ErrorBoundaryCommon}from'@admin
|
|
|
9
9
|
React.useEffect(() => {
|
|
10
10
|
logger.trace(error);
|
|
11
11
|
}, [error]);
|
|
12
|
-
return
|
|
13
|
-
className: "flex items-start p-4 rounded-md bg-red-50 border border-red-200"
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*/
|
|
37
|
-
window.location.reload();
|
|
38
|
-
},
|
|
39
|
-
children: "Home"
|
|
40
|
-
})]
|
|
41
|
-
});
|
|
12
|
+
return React.createElement("div", {
|
|
13
|
+
className: "flex items-start p-4 rounded-md bg-red-50 border border-red-200"
|
|
14
|
+
}, React.createElement("div", {
|
|
15
|
+
className: "flex-shrink-0 mr-3 text-red-400"
|
|
16
|
+
}, React.createElement(ExclamationCircleIcon, {
|
|
17
|
+
className: "h-5 w-5"
|
|
18
|
+
})), React.createElement("div", {
|
|
19
|
+
className: "flex-1"
|
|
20
|
+
}, React.createElement("h3", {
|
|
21
|
+
className: "text-lg font-medium text-red-800"
|
|
22
|
+
}, "Error!"), React.createElement("div", {
|
|
23
|
+
className: "mt-2 text-sm text-red-700"
|
|
24
|
+
}, error?.message)), React.createElement("button", {
|
|
25
|
+
className: "ml-4 px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 transition-colors",
|
|
26
|
+
onClick: () => {
|
|
27
|
+
navigate('/');
|
|
28
|
+
/**
|
|
29
|
+
* Have to reload the window because the above dispatch will only change the router
|
|
30
|
+
* but won't refresh due to which we have to call the reload on location
|
|
31
|
+
* Reference: https://stackoverflow.com/questions/63060387/how-do-i-redirect-within-an-errorboundary
|
|
32
|
+
*/
|
|
33
|
+
window.location.reload();
|
|
34
|
+
}
|
|
35
|
+
}, "Home"));
|
|
42
36
|
};
|
|
43
37
|
const ErrorBoundary = props => {
|
|
44
|
-
return
|
|
45
|
-
fallbackComponent: Fallback
|
|
46
|
-
|
|
47
|
-
});
|
|
38
|
+
return React.createElement(ErrorBoundaryCommon, {
|
|
39
|
+
fallbackComponent: Fallback
|
|
40
|
+
}, props?.children);
|
|
48
41
|
};export{ErrorBoundary};//# sourceMappingURL=ErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/LayoutErrorBoundary.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutErrorBoundary.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorHandlers/LayoutErrorBoundary.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAoB1B,eAAO,MAAM,mBAAmB,GAAI,UAAK,sBAOxC,CAAC"}
|
|
@@ -1,34 +1,29 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React__default from'react';import {ErrorBoundaryCommon}from'@admin-layout/client';import {icons}from'../../icons/index.js';const Fallback = props => {
|
|
2
2
|
const {
|
|
3
3
|
error
|
|
4
4
|
} = props;
|
|
5
5
|
const {
|
|
6
6
|
TimesIcon
|
|
7
7
|
} = icons;
|
|
8
|
-
return
|
|
9
|
-
className: "flex flex-col items-center justify-center p-8 text-center"
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
className: "text-gray-600",
|
|
20
|
-
children: error?.message || 'Unable to identify the cause of this error. Please try again later!'
|
|
21
|
-
})]
|
|
22
|
-
});
|
|
8
|
+
return React__default.createElement("div", {
|
|
9
|
+
className: "flex flex-col items-center justify-center p-8 text-center"
|
|
10
|
+
}, React__default.createElement("div", {
|
|
11
|
+
className: "mb-4 flex h-16 w-16 items-center justify-center rounded-full bg-red-100"
|
|
12
|
+
}, React__default.createElement(TimesIcon, {
|
|
13
|
+
className: "h-8 w-8 text-red-500"
|
|
14
|
+
})), React__default.createElement("h2", {
|
|
15
|
+
className: "mb-2 text-2xl font-bold text-gray-800"
|
|
16
|
+
}, "Something Went Wrong!"), React__default.createElement("p", {
|
|
17
|
+
className: "text-gray-600"
|
|
18
|
+
}, error?.message || 'Unable to identify the cause of this error. Please try again later!'));
|
|
23
19
|
};
|
|
24
20
|
const LayoutErrorBoundary = props => {
|
|
25
21
|
const {
|
|
26
22
|
children,
|
|
27
23
|
pathname
|
|
28
24
|
} = props;
|
|
29
|
-
return
|
|
25
|
+
return React__default.createElement(ErrorBoundaryCommon, {
|
|
30
26
|
fallbackComponent: Fallback,
|
|
31
|
-
pathname: pathname
|
|
32
|
-
|
|
33
|
-
});
|
|
27
|
+
pathname: pathname
|
|
28
|
+
}, children);
|
|
34
29
|
};export{LayoutErrorBoundary};//# sourceMappingURL=LayoutErrorBoundary.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"LayoutErrorBoundary.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"403.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/403.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"403.d.ts","sourceRoot":"","sources":["../../../src/components/ErrorPages/403.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,eAAO,MAAM,QAAQ,yBAuBpB,CAAC"}
|
|
@@ -1,29 +1,21 @@
|
|
|
1
|
-
import
|
|
1
|
+
import*as React from'react';import {useNavigate}from'@remix-run/react';import assets from'@admin-layout/assets';const Error403 = () => {
|
|
2
2
|
const navigate = useNavigate();
|
|
3
3
|
const goBack = () => navigate(-1);
|
|
4
|
-
return
|
|
5
|
-
className: "flex justify-center items-center"
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
children: jsx("button", {
|
|
22
|
-
className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
|
|
23
|
-
onClick: goBack,
|
|
24
|
-
children: "Go Home"
|
|
25
|
-
})
|
|
26
|
-
})]
|
|
27
|
-
})
|
|
28
|
-
});
|
|
4
|
+
return React.createElement("div", {
|
|
5
|
+
className: "flex justify-center items-center"
|
|
6
|
+
}, React.createElement("div", null, React.createElement("div", {
|
|
7
|
+
className: "text-center"
|
|
8
|
+
}, React.createElement("h5", {
|
|
9
|
+
className: "text-2xl font-bold"
|
|
10
|
+
}, "Error: 403 Forbidden")), React.createElement("div", {
|
|
11
|
+
className: "mt-10"
|
|
12
|
+
}, React.createElement("img", {
|
|
13
|
+
src: assets['error-403-540x432.png'],
|
|
14
|
+
alt: "403 Error"
|
|
15
|
+
})), React.createElement("div", {
|
|
16
|
+
className: "flex justify-center"
|
|
17
|
+
}, React.createElement("button", {
|
|
18
|
+
className: "mt-8 mb-8 w-64 h-20 bg-yellow-400 rounded-full text-white hover:bg-yellow-500 transition-colors",
|
|
19
|
+
onClick: goBack
|
|
20
|
+
}, "Go Home"))));
|
|
29
21
|
};export{Error403};//# sourceMappingURL=403.js.map
|