@ballistix.digital/react-components 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.esm.js +1493 -0
- package/dist/index.esm.js.map +1 -0
- package/dist/index.js +1504 -0
- package/dist/index.js.map +1 -0
- package/package.json +11 -4
|
@@ -0,0 +1,1493 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
|
+
import React, { useCallback, useMemo, Children, Fragment, useState, useEffect } from 'react';
|
|
3
|
+
import { Menu, Transition, Disclosure, Dialog } from '@headlessui/react';
|
|
4
|
+
import { ChevronDownIcon, EllipsisVerticalIcon, ChevronLeftIcon, ChevronRightIcon, ArrowLongLeftIcon, ArrowLongRightIcon } from '@heroicons/react/20/solid';
|
|
5
|
+
|
|
6
|
+
/******************************************************************************
|
|
7
|
+
Copyright (c) Microsoft Corporation.
|
|
8
|
+
|
|
9
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
+
purpose with or without fee is hereby granted.
|
|
11
|
+
|
|
12
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
13
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
14
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
15
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
16
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
17
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
18
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
19
|
+
***************************************************************************** */
|
|
20
|
+
|
|
21
|
+
var __assign = function() {
|
|
22
|
+
__assign = Object.assign || function __assign(t) {
|
|
23
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
24
|
+
s = arguments[i];
|
|
25
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
|
26
|
+
}
|
|
27
|
+
return t;
|
|
28
|
+
};
|
|
29
|
+
return __assign.apply(this, arguments);
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
var AvatarElement = function (props) {
|
|
33
|
+
var src = props.src, placeholder = props.placeholder, _a = props.alt, alt = _a === void 0 ? 'avatar' : _a, children = props.children, url = props.url, _b = props.size, size = _b === void 0 ? 'md' : _b, _c = props.figure, figure = _c === void 0 ? 'block' : _c, status = props.status, isDisabled = props.isDisabled, isLoading = props.isLoading, customStyles = props.styles;
|
|
34
|
+
var toClassName = useCallback(function () {
|
|
35
|
+
var values = [];
|
|
36
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
37
|
+
values[_i] = arguments[_i];
|
|
38
|
+
}
|
|
39
|
+
return values.filter(Boolean).join(' ');
|
|
40
|
+
}, []);
|
|
41
|
+
var style = useMemo(function () { return ({
|
|
42
|
+
empty: toClassName(styles$h.base.empty, size && styles$h[size].container, figure && styles$h[figure].container, isDisabled && styles$h.disabled.container, isLoading && styles$h.loading.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.empty),
|
|
43
|
+
placeholder: toClassName(styles$h.base.placeholder, size && styles$h[size].container, figure && styles$h[figure].container, isDisabled && styles$h.disabled.container, isLoading && styles$h.loading.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.placeholder),
|
|
44
|
+
container: toClassName(styles$h.base.container, size && styles$h[size].container, figure && styles$h[figure].container, isDisabled && styles$h.disabled.container, isLoading && styles$h.loading.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
45
|
+
indicator: toClassName(styles$h.indicator.container, size && styles$h.indicator[size], figure && styles$h.indicator[figure], isDisabled && styles$h.indicator.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.indicator),
|
|
46
|
+
}); }, [customStyles]);
|
|
47
|
+
if (!placeholder) {
|
|
48
|
+
return (jsx("span", __assign({ className: style.empty }, { children: jsx("svg", __assign({ className: "h-full w-full text-gray-300", fill: "currentColor", viewBox: "0 0 24 24" }, { children: jsx("path", { d: "M24 20.993V24H0v-2.996A14.977 14.977 0 0112.004 15c4.904 0 9.26 2.354 11.996 5.993zM16.002 8.999a4 4 0 11-8 0 4 4 0 018 0z" }) })) })));
|
|
49
|
+
}
|
|
50
|
+
if (!src) {
|
|
51
|
+
return (jsx("span", __assign({ className: style.placeholder }, { children: jsx("span", __assign({ className: "text-".concat(size, " font-medium leading-none text-white") }, { children: placeholder })) })));
|
|
52
|
+
}
|
|
53
|
+
return (jsx("a", __assign({ href: url }, { children: jsxs("div", __assign({ className: "flex items-center" }, { children: [jsxs("span", __assign({ className: "inline-block relative" }, { children: [jsx("img", { className: style.container, src: src, alt: alt }), status && jsx("span", { className: style.indicator })] })), children && jsx("div", __assign({ className: "ml-3" }, { children: children }))] })) })));
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
var base$5 = {
|
|
57
|
+
empty: 'inline-block overflow-hidden bg-gray-50',
|
|
58
|
+
placeholder: 'overflow-hidden inline-flex items-center justify-center bg-gray-500',
|
|
59
|
+
container: 'inline-block overflow-hidden',
|
|
60
|
+
};
|
|
61
|
+
var xs$1 = {
|
|
62
|
+
container: 'h-6 w-6',
|
|
63
|
+
};
|
|
64
|
+
var sm$2 = {
|
|
65
|
+
container: 'h-8 w-8',
|
|
66
|
+
};
|
|
67
|
+
var md$1 = {
|
|
68
|
+
container: 'h-10 w-10',
|
|
69
|
+
};
|
|
70
|
+
var lg$2 = {
|
|
71
|
+
container: 'h-12 w-12',
|
|
72
|
+
};
|
|
73
|
+
var xl$1 = {
|
|
74
|
+
container: 'h-14 w-14',
|
|
75
|
+
};
|
|
76
|
+
var block$2 = {
|
|
77
|
+
container: 'rounded-md',
|
|
78
|
+
};
|
|
79
|
+
var rounded$2 = {
|
|
80
|
+
container: 'rounded-full',
|
|
81
|
+
};
|
|
82
|
+
var disabled$2 = {
|
|
83
|
+
container: 'opacity-20 cursor-not-allowed',
|
|
84
|
+
};
|
|
85
|
+
var loading$2 = {
|
|
86
|
+
container: 'cursor-progress',
|
|
87
|
+
};
|
|
88
|
+
var indicator$1 = {
|
|
89
|
+
container: 'absolute top-0 right-0 block h-2.5 w-2.5 rounded-full ring-2 ring-white',
|
|
90
|
+
rounded: '',
|
|
91
|
+
block: 'transform -translate-y-1/2 translate-x-1/2',
|
|
92
|
+
xs: 'h-1.5 w-1.5',
|
|
93
|
+
sm: 'h-2 w-2',
|
|
94
|
+
md: 'h-2.5 w-2.5',
|
|
95
|
+
lg: 'h-3 w-3',
|
|
96
|
+
xl: 'h-3.5 w-3.5',
|
|
97
|
+
};
|
|
98
|
+
var online = {
|
|
99
|
+
container: 'bg-green-400',
|
|
100
|
+
};
|
|
101
|
+
var offline = {
|
|
102
|
+
container: 'bg-gray-300',
|
|
103
|
+
};
|
|
104
|
+
var blocked = {
|
|
105
|
+
container: 'bg-red-400',
|
|
106
|
+
};
|
|
107
|
+
var styles$h = {
|
|
108
|
+
base: base$5,
|
|
109
|
+
xs: xs$1,
|
|
110
|
+
sm: sm$2,
|
|
111
|
+
md: md$1,
|
|
112
|
+
lg: lg$2,
|
|
113
|
+
xl: xl$1,
|
|
114
|
+
block: block$2,
|
|
115
|
+
rounded: rounded$2,
|
|
116
|
+
disabled: disabled$2,
|
|
117
|
+
loading: loading$2,
|
|
118
|
+
indicator: indicator$1,
|
|
119
|
+
online: online,
|
|
120
|
+
offline: offline,
|
|
121
|
+
blocked: blocked,
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
var BadgeElement = function (props) {
|
|
125
|
+
var children = props.children, _a = props.color, color = _a === void 0 ? 'gray' : _a, _b = props.type, type = _b === void 0 ? 'normal' : _b, _c = props.size, size = _c === void 0 ? 'sm' : _c, _d = props.figure, figure = _d === void 0 ? 'block' : _d, isDisabled = props.isDisabled, isLoading = props.isLoading, onClose = props.onClose, customStyles = props.styles;
|
|
126
|
+
var toClassName = useCallback(function () {
|
|
127
|
+
var values = [];
|
|
128
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
129
|
+
values[_i] = arguments[_i];
|
|
130
|
+
}
|
|
131
|
+
return values.filter(Boolean).join(' ');
|
|
132
|
+
}, []);
|
|
133
|
+
var style = useMemo(function () { return ({
|
|
134
|
+
container: toClassName(type && styles$g[type].container, color && styles$g[color].container, size && styles$g[size].container, figure && styles$g[figure].container, isDisabled && styles$g.disabled.container, isLoading && styles$g.loading.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
135
|
+
indicator: toClassName(color && styles$g[color].indicator, size && styles$g[size].indicator, customStyles === null || customStyles === void 0 ? void 0 : customStyles.indicator),
|
|
136
|
+
button: toClassName('flex-shrink-0 ml-0.5 h-4 w-4 rounded-full inline-flex items-center justify-center focus:text-white focus:outline-none', color && styles$g[color].button, size && styles$g[size].button, customStyles === null || customStyles === void 0 ? void 0 : customStyles.button),
|
|
137
|
+
}); }, [customStyles]);
|
|
138
|
+
return (jsxs("span", __assign({ className: style.container }, { children: [type === 'indicator' && (jsx("svg", __assign({ className: style.indicator, fill: "currentColor", viewBox: "0 0 8 8" }, { children: jsx("circle", { cx: 4, cy: 4, r: 3 }) }))), children, type === 'close' && (jsxs("button", __assign({ type: "button", className: style.button, onClick: onClose }, { children: [jsx("span", __assign({ className: "sr-only" }, { children: "Remove large option" })), jsx("svg", __assign({ className: "h-2 w-2", stroke: "currentColor", fill: "none", viewBox: "0 0 8 8" }, { children: jsx("path", { strokeLinecap: "round", strokeWidth: "1.5", d: "M1 1l6 6m0-6L1 7" }) }))] })))] })));
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
var normal = {
|
|
142
|
+
container: 'inline-flex items-center px-2.5 py-0.5 font-medium',
|
|
143
|
+
};
|
|
144
|
+
var indicator = {
|
|
145
|
+
container: 'inline-flex items-center px-2.5 py-0.5 font-medium',
|
|
146
|
+
};
|
|
147
|
+
var close = {
|
|
148
|
+
container: 'inline-flex items-center pl-2.5 pr-1 py-0.5 font-medium',
|
|
149
|
+
};
|
|
150
|
+
var primary$1 = {
|
|
151
|
+
container: "shadow-sm text-white bg-indigo-600 hover:bg-indigo-700",
|
|
152
|
+
};
|
|
153
|
+
var secondary$1 = {
|
|
154
|
+
container: "shadow-none text-indigo-700 bg-indigo-100 hover:bg-indigo-200",
|
|
155
|
+
};
|
|
156
|
+
var outline$1 = {
|
|
157
|
+
container: "border-gray-300 text-gray-700 bg-white hover:bg-gray-50",
|
|
158
|
+
};
|
|
159
|
+
var sm$1 = {
|
|
160
|
+
container: 'text-xs',
|
|
161
|
+
indicator: 'mr-1.5 h-2 w-2 ',
|
|
162
|
+
button: '',
|
|
163
|
+
};
|
|
164
|
+
var lg$1 = {
|
|
165
|
+
container: 'text-sm',
|
|
166
|
+
indicator: '-ml-0.5 mr-1.5 h-2 w-2',
|
|
167
|
+
button: '',
|
|
168
|
+
};
|
|
169
|
+
var block$1 = {
|
|
170
|
+
container: 'rounded-md',
|
|
171
|
+
};
|
|
172
|
+
var rounded$1 = {
|
|
173
|
+
container: 'rounded-full',
|
|
174
|
+
};
|
|
175
|
+
var gray = {
|
|
176
|
+
container: 'bg-gray-100 text-gray-800',
|
|
177
|
+
indicator: 'text-gray-400',
|
|
178
|
+
button: 'text-gray-400 hover:bg-gray-200 hover:text-gray-500 focus:bg-gray-500',
|
|
179
|
+
};
|
|
180
|
+
var red = {
|
|
181
|
+
container: 'bg-red-100 text-red-800',
|
|
182
|
+
indicator: 'text-red-400',
|
|
183
|
+
button: 'text-red-400 hover:bg-red-200 hover:text-red-500 focus:bg-red-500',
|
|
184
|
+
};
|
|
185
|
+
var yellow = {
|
|
186
|
+
container: 'bg-yellow-100 text-yellow-800',
|
|
187
|
+
indicator: 'text-yellow-400',
|
|
188
|
+
button: 'text-yellow-400 hover:bg-yellow-200 hover:text-yellow-500 focus:bg-yellow-500',
|
|
189
|
+
};
|
|
190
|
+
var green = {
|
|
191
|
+
container: 'bg-green-100 text-green-800',
|
|
192
|
+
indicator: 'text-green-400',
|
|
193
|
+
button: 'text-green-400 hover:bg-green-200 hover:text-green-500 focus:bg-green-500',
|
|
194
|
+
};
|
|
195
|
+
var blue = {
|
|
196
|
+
container: 'bg-blue-100 text-blue-800',
|
|
197
|
+
indicator: 'text-blue-400',
|
|
198
|
+
button: 'text-blue-400 hover:bg-blue-200 hover:text-blue-500 focus:bg-blue-500',
|
|
199
|
+
};
|
|
200
|
+
var indigo = {
|
|
201
|
+
container: 'bg-indigo-100 text-indigo-800',
|
|
202
|
+
indicator: 'text-indigo-400',
|
|
203
|
+
button: 'text-indigo-400 hover:bg-indigo-200 hover:text-indigo-500 focus:outline-none focus:bg-indigo-500',
|
|
204
|
+
};
|
|
205
|
+
var purple = {
|
|
206
|
+
container: 'bg-purple-100 text-purple-800',
|
|
207
|
+
indicator: 'text-purple-400',
|
|
208
|
+
button: 'text-purple-400 hover:bg-purple-200 hover:text-purple-500 focus:bg-purple-500',
|
|
209
|
+
};
|
|
210
|
+
var pink = {
|
|
211
|
+
container: 'bg-pink-100 text-pink-800',
|
|
212
|
+
indicator: 'text-pink-400',
|
|
213
|
+
button: 'text-pink-400 hover:bg-pink-200 hover:text-pink-500 focus:bg-purple-500',
|
|
214
|
+
};
|
|
215
|
+
var disabled$1 = {
|
|
216
|
+
container: 'opacity-20 cursor-not-allowed',
|
|
217
|
+
};
|
|
218
|
+
var loading$1 = {
|
|
219
|
+
container: 'cursor-progress',
|
|
220
|
+
};
|
|
221
|
+
var styles$g = {
|
|
222
|
+
normal: normal,
|
|
223
|
+
indicator: indicator,
|
|
224
|
+
close: close,
|
|
225
|
+
primary: primary$1,
|
|
226
|
+
secondary: secondary$1,
|
|
227
|
+
outline: outline$1,
|
|
228
|
+
sm: sm$1,
|
|
229
|
+
lg: lg$1,
|
|
230
|
+
block: block$1,
|
|
231
|
+
rounded: rounded$1,
|
|
232
|
+
gray: gray,
|
|
233
|
+
red: red,
|
|
234
|
+
yellow: yellow,
|
|
235
|
+
green: green,
|
|
236
|
+
blue: blue,
|
|
237
|
+
indigo: indigo,
|
|
238
|
+
purple: purple,
|
|
239
|
+
pink: pink,
|
|
240
|
+
disabled: disabled$1,
|
|
241
|
+
loading: loading$1,
|
|
242
|
+
};
|
|
243
|
+
|
|
244
|
+
function styleInject(css, ref) {
|
|
245
|
+
if ( ref === void 0 ) ref = {};
|
|
246
|
+
var insertAt = ref.insertAt;
|
|
247
|
+
|
|
248
|
+
if (!css || typeof document === 'undefined') { return; }
|
|
249
|
+
|
|
250
|
+
var head = document.head || document.getElementsByTagName('head')[0];
|
|
251
|
+
var style = document.createElement('style');
|
|
252
|
+
style.type = 'text/css';
|
|
253
|
+
|
|
254
|
+
if (insertAt === 'top') {
|
|
255
|
+
if (head.firstChild) {
|
|
256
|
+
head.insertBefore(style, head.firstChild);
|
|
257
|
+
} else {
|
|
258
|
+
head.appendChild(style);
|
|
259
|
+
}
|
|
260
|
+
} else {
|
|
261
|
+
head.appendChild(style);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
if (style.styleSheet) {
|
|
265
|
+
style.styleSheet.cssText = css;
|
|
266
|
+
} else {
|
|
267
|
+
style.appendChild(document.createTextNode(css));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
var css_248z = "/*\n! tailwindcss v3.2.6 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n*/\n\nhtml {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */ /* 3 */\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font family by default.\n2. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-size: 1em; /* 2 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\n[type='button'],\n[type='reset'],\n[type='submit'] {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden] {\n display: none;\n}\n\n*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.sr-only {\n position: absolute;\n width: 1px;\n height: 1px;\n padding: 0;\n margin: -1px;\n overflow: hidden;\n clip: rect(0, 0, 0, 0);\n white-space: nowrap;\n border-width: 0;\n}\n.pointer-events-none {\n pointer-events: none;\n}\n.pointer-events-auto {\n pointer-events: auto;\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.sticky {\n position: sticky;\n}\n.inset-0 {\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n}\n.inset-y-0 {\n top: 0px;\n bottom: 0px;\n}\n.bottom-0 {\n bottom: 0px;\n}\n.left-0 {\n left: 0px;\n}\n.right-0 {\n right: 0px;\n}\n.top-0 {\n top: 0px;\n}\n.isolate {\n isolation: isolate;\n}\n.z-0 {\n z-index: 0;\n}\n.z-10 {\n z-index: 10;\n}\n.z-20 {\n z-index: 20;\n}\n.mx-auto {\n margin-left: auto;\n margin-right: auto;\n}\n.-mb-px {\n margin-bottom: -1px;\n}\n.-ml-0 {\n margin-left: -0px;\n}\n.-ml-0\\.5 {\n margin-left: -0.125rem;\n}\n.-ml-px {\n margin-left: -1px;\n}\n.-mr-1 {\n margin-right: -0.25rem;\n}\n.-mt-px {\n margin-top: -1px;\n}\n.mb-4 {\n margin-bottom: 1rem;\n}\n.ml-0 {\n margin-left: 0px;\n}\n.ml-0\\.5 {\n margin-left: 0.125rem;\n}\n.ml-2 {\n margin-left: 0.5rem;\n}\n.ml-3 {\n margin-left: 0.75rem;\n}\n.mr-1 {\n margin-right: 0.25rem;\n}\n.mr-1\\.5 {\n margin-right: 0.375rem;\n}\n.mr-3 {\n margin-right: 0.75rem;\n}\n.mr-4 {\n margin-right: 1rem;\n}\n.mt-1 {\n margin-top: 0.25rem;\n}\n.mt-2 {\n margin-top: 0.5rem;\n}\n.mt-5 {\n margin-top: 1.25rem;\n}\n.block {\n display: block;\n}\n.inline-block {\n display: inline-block;\n}\n.flex {\n display: flex;\n}\n.inline-flex {\n display: inline-flex;\n}\n.hidden {\n display: none;\n}\n.h-1 {\n height: 0.25rem;\n}\n.h-1\\.5 {\n height: 0.375rem;\n}\n.h-10 {\n height: 2.5rem;\n}\n.h-12 {\n height: 3rem;\n}\n.h-14 {\n height: 3.5rem;\n}\n.h-16 {\n height: 4rem;\n}\n.h-2 {\n height: 0.5rem;\n}\n.h-2\\.5 {\n height: 0.625rem;\n}\n.h-3 {\n height: 0.75rem;\n}\n.h-3\\.5 {\n height: 0.875rem;\n}\n.h-32 {\n height: 8rem;\n}\n.h-4 {\n height: 1rem;\n}\n.h-5 {\n height: 1.25rem;\n}\n.h-6 {\n height: 1.5rem;\n}\n.h-7 {\n height: 1.75rem;\n}\n.h-8 {\n height: 2rem;\n}\n.h-full {\n height: 100%;\n}\n.min-h-0 {\n min-height: 0px;\n}\n.min-h-full {\n min-height: 100%;\n}\n.w-0 {\n width: 0px;\n}\n.w-1 {\n width: 0.25rem;\n}\n.w-1\\.5 {\n width: 0.375rem;\n}\n.w-10 {\n width: 2.5rem;\n}\n.w-12 {\n width: 3rem;\n}\n.w-14 {\n width: 3.5rem;\n}\n.w-16 {\n width: 4rem;\n}\n.w-2 {\n width: 0.5rem;\n}\n.w-2\\.5 {\n width: 0.625rem;\n}\n.w-3 {\n width: 0.75rem;\n}\n.w-3\\.5 {\n width: 0.875rem;\n}\n.w-4 {\n width: 1rem;\n}\n.w-48 {\n width: 12rem;\n}\n.w-5 {\n width: 1.25rem;\n}\n.w-56 {\n width: 14rem;\n}\n.w-6 {\n width: 1.5rem;\n}\n.w-7 {\n width: 1.75rem;\n}\n.w-8 {\n width: 2rem;\n}\n.w-auto {\n width: auto;\n}\n.w-full {\n width: 100%;\n}\n.w-screen {\n width: 100vw;\n}\n.max-w-2xl {\n max-width: 42rem;\n}\n.max-w-4xl {\n max-width: 56rem;\n}\n.max-w-7xl {\n max-width: 80rem;\n}\n.max-w-full {\n max-width: 100%;\n}\n.max-w-lg {\n max-width: 32rem;\n}\n.max-w-md {\n max-width: 28rem;\n}\n.max-w-sm {\n max-width: 24rem;\n}\n.max-w-xs {\n max-width: 20rem;\n}\n.flex-1 {\n flex: 1 1 0%;\n}\n.flex-shrink-0 {\n flex-shrink: 0;\n}\n.origin-top-right {\n transform-origin: top right;\n}\n.-translate-y-1\\/2 {\n --tw-translate-y: -50%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-1\\/2 {\n --tw-translate-x: 50%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-x-full {\n --tw-translate-x: 100%;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-y-2 {\n --tw-translate-y: 0.5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.translate-y-4 {\n --tw-translate-y: 1rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.transform {\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n}\n.cursor-not-allowed {\n cursor: not-allowed;\n}\n.cursor-pointer {\n cursor: pointer;\n}\n.cursor-progress {\n cursor: progress;\n}\n.flex-row-reverse {\n flex-direction: row-reverse;\n}\n.flex-col {\n flex-direction: column;\n}\n.items-end {\n align-items: flex-end;\n}\n.items-center {\n align-items: center;\n}\n.justify-start {\n justify-content: flex-start;\n}\n.justify-end {\n justify-content: flex-end;\n}\n.justify-center {\n justify-content: center;\n}\n.justify-between {\n justify-content: space-between;\n}\n.-space-x-px > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(-1px * var(--tw-space-x-reverse));\n margin-left: calc(-1px * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(1rem * var(--tw-space-x-reverse));\n margin-left: calc(1rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-x-8 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(2rem * var(--tw-space-x-reverse));\n margin-left: calc(2rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.space-y-1 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));\n}\n.space-y-3 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));\n}\n.space-y-4 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-y-reverse: 0;\n margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));\n margin-bottom: calc(1rem * var(--tw-space-y-reverse));\n}\n.divide-y > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-y-reverse: 0;\n border-top-width: calc(1px * calc(1 - var(--tw-divide-y-reverse)));\n border-bottom-width: calc(1px * var(--tw-divide-y-reverse));\n}\n.divide-gray-100 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(243 244 246 / var(--tw-divide-opacity));\n}\n.divide-gray-200 > :not([hidden]) ~ :not([hidden]) {\n --tw-divide-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-divide-opacity));\n}\n.self-end {\n align-self: flex-end;\n}\n.self-center {\n align-self: center;\n}\n.overflow-hidden {\n overflow: hidden;\n}\n.overflow-y-auto {\n overflow-y: auto;\n}\n.whitespace-nowrap {\n white-space: nowrap;\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.rounded-lg {\n border-radius: 0.5rem;\n}\n.rounded-md {\n border-radius: 0.375rem;\n}\n.rounded-l-md {\n border-top-left-radius: 0.375rem;\n border-bottom-left-radius: 0.375rem;\n}\n.rounded-r-md {\n border-top-right-radius: 0.375rem;\n border-bottom-right-radius: 0.375rem;\n}\n.border {\n border-width: 1px;\n}\n.border-b {\n border-bottom-width: 1px;\n}\n.border-b-2 {\n border-bottom-width: 2px;\n}\n.border-r {\n border-right-width: 1px;\n}\n.border-t {\n border-top-width: 1px;\n}\n.border-t-2 {\n border-top-width: 2px;\n}\n.border-gray-200 {\n --tw-border-opacity: 1;\n border-color: rgb(229 231 235 / var(--tw-border-opacity));\n}\n.border-gray-300 {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.border-indigo-500 {\n --tw-border-opacity: 1;\n border-color: rgb(99 102 241 / var(--tw-border-opacity));\n}\n.border-transparent {\n border-color: transparent;\n}\n.bg-blue-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(219 234 254 / var(--tw-bg-opacity));\n}\n.bg-gray-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.bg-gray-300 {\n --tw-bg-opacity: 1;\n background-color: rgb(209 213 219 / var(--tw-bg-opacity));\n}\n.bg-gray-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.bg-gray-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(107 114 128 / var(--tw-bg-opacity));\n}\n.bg-gray-700 {\n --tw-bg-opacity: 1;\n background-color: rgb(55 65 81 / var(--tw-bg-opacity));\n}\n.bg-gray-800 {\n --tw-bg-opacity: 1;\n background-color: rgb(31 41 55 / var(--tw-bg-opacity));\n}\n.bg-gray-900 {\n --tw-bg-opacity: 1;\n background-color: rgb(17 24 39 / var(--tw-bg-opacity));\n}\n.bg-green-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 252 231 / var(--tw-bg-opacity));\n}\n.bg-green-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(74 222 128 / var(--tw-bg-opacity));\n}\n.bg-indigo-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(224 231 255 / var(--tw-bg-opacity));\n}\n.bg-indigo-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(238 242 255 / var(--tw-bg-opacity));\n}\n.bg-indigo-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(79 70 229 / var(--tw-bg-opacity));\n}\n.bg-pink-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(252 231 243 / var(--tw-bg-opacity));\n}\n.bg-purple-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(243 232 255 / var(--tw-bg-opacity));\n}\n.bg-purple-500 {\n --tw-bg-opacity: 1;\n background-color: rgb(168 85 247 / var(--tw-bg-opacity));\n}\n.bg-red-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 226 226 / var(--tw-bg-opacity));\n}\n.bg-red-400 {\n --tw-bg-opacity: 1;\n background-color: rgb(248 113 113 / var(--tw-bg-opacity));\n}\n.bg-red-50 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 242 242 / var(--tw-bg-opacity));\n}\n.bg-white {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.bg-yellow-100 {\n --tw-bg-opacity: 1;\n background-color: rgb(254 249 195 / var(--tw-bg-opacity));\n}\n.bg-opacity-75 {\n --tw-bg-opacity: 0.75;\n}\n.p-1 {\n padding: 0.25rem;\n}\n.p-2 {\n padding: 0.5rem;\n}\n.p-4 {\n padding: 1rem;\n}\n.px-1 {\n padding-left: 0.25rem;\n padding-right: 0.25rem;\n}\n.px-2 {\n padding-left: 0.5rem;\n padding-right: 0.5rem;\n}\n.px-2\\.5 {\n padding-left: 0.625rem;\n padding-right: 0.625rem;\n}\n.px-3 {\n padding-left: 0.75rem;\n padding-right: 0.75rem;\n}\n.px-3\\.5 {\n padding-left: 0.875rem;\n padding-right: 0.875rem;\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.px-5 {\n padding-left: 1.25rem;\n padding-right: 1.25rem;\n}\n.px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n}\n.py-0 {\n padding-top: 0px;\n padding-bottom: 0px;\n}\n.py-0\\.5 {\n padding-top: 0.125rem;\n padding-bottom: 0.125rem;\n}\n.py-1 {\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n}\n.py-1\\.5 {\n padding-top: 0.375rem;\n padding-bottom: 0.375rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.py-2\\.5 {\n padding-top: 0.625rem;\n padding-bottom: 0.625rem;\n}\n.py-3 {\n padding-top: 0.75rem;\n padding-bottom: 0.75rem;\n}\n.py-4 {\n padding-top: 1rem;\n padding-bottom: 1rem;\n}\n.py-5 {\n padding-top: 1.25rem;\n padding-bottom: 1.25rem;\n}\n.py-6 {\n padding-top: 1.5rem;\n padding-bottom: 1.5rem;\n}\n.pb-3 {\n padding-bottom: 0.75rem;\n}\n.pb-4 {\n padding-bottom: 1rem;\n}\n.pl-10 {\n padding-left: 2.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pl-2\\.5 {\n padding-left: 0.625rem;\n}\n.pl-3 {\n padding-left: 0.75rem;\n}\n.pr-1 {\n padding-right: 0.25rem;\n}\n.pr-2 {\n padding-right: 0.5rem;\n}\n.pr-3 {\n padding-right: 0.75rem;\n}\n.pt-16 {\n padding-top: 4rem;\n}\n.pt-2 {\n padding-top: 0.5rem;\n}\n.pt-4 {\n padding-top: 1rem;\n}\n.pt-5 {\n padding-top: 1.25rem;\n}\n.text-left {\n text-align: left;\n}\n.text-center {\n text-align: center;\n}\n.text-base {\n font-size: 1rem;\n line-height: 1.5rem;\n}\n.text-lg {\n font-size: 1.125rem;\n line-height: 1.75rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-xs {\n font-size: 0.75rem;\n line-height: 1rem;\n}\n.font-bold {\n font-weight: 700;\n}\n.font-medium {\n font-weight: 500;\n}\n.leading-5 {\n line-height: 1.25rem;\n}\n.leading-none {\n line-height: 1;\n}\n.text-blue-400 {\n --tw-text-opacity: 1;\n color: rgb(96 165 250 / var(--tw-text-opacity));\n}\n.text-blue-800 {\n --tw-text-opacity: 1;\n color: rgb(30 64 175 / var(--tw-text-opacity));\n}\n.text-gray-300 {\n --tw-text-opacity: 1;\n color: rgb(209 213 219 / var(--tw-text-opacity));\n}\n.text-gray-400 {\n --tw-text-opacity: 1;\n color: rgb(156 163 175 / var(--tw-text-opacity));\n}\n.text-gray-500 {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.text-gray-600 {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.text-gray-700 {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.text-gray-800 {\n --tw-text-opacity: 1;\n color: rgb(31 41 55 / var(--tw-text-opacity));\n}\n.text-gray-900 {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.text-green-400 {\n --tw-text-opacity: 1;\n color: rgb(74 222 128 / var(--tw-text-opacity));\n}\n.text-green-800 {\n --tw-text-opacity: 1;\n color: rgb(22 101 52 / var(--tw-text-opacity));\n}\n.text-indigo-400 {\n --tw-text-opacity: 1;\n color: rgb(129 140 248 / var(--tw-text-opacity));\n}\n.text-indigo-600 {\n --tw-text-opacity: 1;\n color: rgb(79 70 229 / var(--tw-text-opacity));\n}\n.text-indigo-700 {\n --tw-text-opacity: 1;\n color: rgb(67 56 202 / var(--tw-text-opacity));\n}\n.text-indigo-800 {\n --tw-text-opacity: 1;\n color: rgb(55 48 163 / var(--tw-text-opacity));\n}\n.text-pink-400 {\n --tw-text-opacity: 1;\n color: rgb(244 114 182 / var(--tw-text-opacity));\n}\n.text-pink-800 {\n --tw-text-opacity: 1;\n color: rgb(157 23 77 / var(--tw-text-opacity));\n}\n.text-purple-400 {\n --tw-text-opacity: 1;\n color: rgb(192 132 252 / var(--tw-text-opacity));\n}\n.text-purple-800 {\n --tw-text-opacity: 1;\n color: rgb(107 33 168 / var(--tw-text-opacity));\n}\n.text-red-400 {\n --tw-text-opacity: 1;\n color: rgb(248 113 113 / var(--tw-text-opacity));\n}\n.text-red-800 {\n --tw-text-opacity: 1;\n color: rgb(153 27 27 / var(--tw-text-opacity));\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.text-yellow-400 {\n --tw-text-opacity: 1;\n color: rgb(250 204 21 / var(--tw-text-opacity));\n}\n.text-yellow-800 {\n --tw-text-opacity: 1;\n color: rgb(133 77 14 / var(--tw-text-opacity));\n}\n.underline {\n text-decoration-line: underline;\n}\n.placeholder-gray-400::placeholder {\n --tw-placeholder-opacity: 1;\n color: rgb(156 163 175 / var(--tw-placeholder-opacity));\n}\n.opacity-0 {\n opacity: 0;\n}\n.opacity-100 {\n opacity: 1;\n}\n.opacity-20 {\n opacity: 0.2;\n}\n.shadow {\n --tw-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-lg {\n --tw-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-none {\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-sm {\n --tw-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);\n --tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.shadow-xl {\n --tw-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);\n --tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);\n box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);\n}\n.outline {\n outline-style: solid;\n}\n.ring-1 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.ring-2 {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.ring-black {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(0 0 0 / var(--tw-ring-opacity));\n}\n.ring-white {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity));\n}\n.ring-opacity-5 {\n --tw-ring-opacity: 0.05;\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.transition {\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, -webkit-backdrop-filter;\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter;\n transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity, box-shadow, transform, filter, backdrop-filter, -webkit-backdrop-filter;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-all {\n transition-property: all;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.transition-opacity {\n transition-property: opacity;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 150ms;\n}\n.duration-100 {\n transition-duration: 100ms;\n}\n.duration-200 {\n transition-duration: 200ms;\n}\n.duration-300 {\n transition-duration: 300ms;\n}\n.duration-500 {\n transition-duration: 500ms;\n}\n.duration-75 {\n transition-duration: 75ms;\n}\n.ease-in {\n transition-timing-function: cubic-bezier(0.4, 0, 1, 1);\n}\n.ease-in-out {\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n}\n.ease-out {\n transition-timing-function: cubic-bezier(0, 0, 0.2, 1);\n}\n.hover\\:border-gray-300:hover {\n --tw-border-opacity: 1;\n border-color: rgb(209 213 219 / var(--tw-border-opacity));\n}\n.hover\\:bg-blue-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(191 219 254 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-100:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(243 244 246 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-50:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(249 250 251 / var(--tw-bg-opacity));\n}\n.hover\\:bg-gray-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(55 65 81 / var(--tw-bg-opacity));\n}\n.hover\\:bg-green-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(187 247 208 / var(--tw-bg-opacity));\n}\n.hover\\:bg-indigo-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(199 210 254 / var(--tw-bg-opacity));\n}\n.hover\\:bg-indigo-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(67 56 202 / var(--tw-bg-opacity));\n}\n.hover\\:bg-pink-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(251 207 232 / var(--tw-bg-opacity));\n}\n.hover\\:bg-purple-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(233 213 255 / var(--tw-bg-opacity));\n}\n.hover\\:bg-red-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(254 202 202 / var(--tw-bg-opacity));\n}\n.hover\\:bg-yellow-200:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(254 240 138 / var(--tw-bg-opacity));\n}\n.hover\\:text-blue-500:hover {\n --tw-text-opacity: 1;\n color: rgb(59 130 246 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-500:hover {\n --tw-text-opacity: 1;\n color: rgb(107 114 128 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-600:hover {\n --tw-text-opacity: 1;\n color: rgb(75 85 99 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-700:hover {\n --tw-text-opacity: 1;\n color: rgb(55 65 81 / var(--tw-text-opacity));\n}\n.hover\\:text-gray-900:hover {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.hover\\:text-green-500:hover {\n --tw-text-opacity: 1;\n color: rgb(34 197 94 / var(--tw-text-opacity));\n}\n.hover\\:text-indigo-500:hover {\n --tw-text-opacity: 1;\n color: rgb(99 102 241 / var(--tw-text-opacity));\n}\n.hover\\:text-pink-500:hover {\n --tw-text-opacity: 1;\n color: rgb(236 72 153 / var(--tw-text-opacity));\n}\n.hover\\:text-purple-500:hover {\n --tw-text-opacity: 1;\n color: rgb(168 85 247 / var(--tw-text-opacity));\n}\n.hover\\:text-red-500:hover {\n --tw-text-opacity: 1;\n color: rgb(239 68 68 / var(--tw-text-opacity));\n}\n.hover\\:text-white:hover {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.hover\\:text-yellow-500:hover {\n --tw-text-opacity: 1;\n color: rgb(234 179 8 / var(--tw-text-opacity));\n}\n.focus\\:z-10:focus {\n z-index: 10;\n}\n.focus\\:z-20:focus {\n z-index: 20;\n}\n.focus\\:border-indigo-500:focus {\n --tw-border-opacity: 1;\n border-color: rgb(99 102 241 / var(--tw-border-opacity));\n}\n.focus\\:border-white:focus {\n --tw-border-opacity: 1;\n border-color: rgb(255 255 255 / var(--tw-border-opacity));\n}\n.focus\\:bg-blue-500:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(59 130 246 / var(--tw-bg-opacity));\n}\n.focus\\:bg-gray-500:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(107 114 128 / var(--tw-bg-opacity));\n}\n.focus\\:bg-green-500:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(34 197 94 / var(--tw-bg-opacity));\n}\n.focus\\:bg-indigo-500:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(99 102 241 / var(--tw-bg-opacity));\n}\n.focus\\:bg-purple-500:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(168 85 247 / var(--tw-bg-opacity));\n}\n.focus\\:bg-red-500:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(239 68 68 / var(--tw-bg-opacity));\n}\n.focus\\:bg-white:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(255 255 255 / var(--tw-bg-opacity));\n}\n.focus\\:bg-yellow-500:focus {\n --tw-bg-opacity: 1;\n background-color: rgb(234 179 8 / var(--tw-bg-opacity));\n}\n.focus\\:text-gray-900:focus {\n --tw-text-opacity: 1;\n color: rgb(17 24 39 / var(--tw-text-opacity));\n}\n.focus\\:text-white:focus {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity));\n}\n.focus\\:outline-none:focus {\n outline: 2px solid transparent;\n outline-offset: 2px;\n}\n.focus\\:ring-1:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ring-2:focus {\n --tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);\n --tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color);\n box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);\n}\n.focus\\:ring-inset:focus {\n --tw-ring-inset: inset;\n}\n.focus\\:ring-indigo-500:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(99 102 241 / var(--tw-ring-opacity));\n}\n.focus\\:ring-white:focus {\n --tw-ring-opacity: 1;\n --tw-ring-color: rgb(255 255 255 / var(--tw-ring-opacity));\n}\n.focus\\:ring-offset-2:focus {\n --tw-ring-offset-width: 2px;\n}\n.focus\\:ring-offset-gray-100:focus {\n --tw-ring-offset-color: #f3f4f6;\n}\n.focus\\:ring-offset-gray-800:focus {\n --tw-ring-offset-color: #1f2937;\n}\n@media (min-width: 640px) {\n\n .sm\\:static {\n position: static;\n }\n\n .sm\\:inset-auto {\n top: auto;\n right: auto;\n bottom: auto;\n left: auto;\n }\n\n .sm\\:mb-0 {\n margin-bottom: 0px;\n }\n\n .sm\\:mb-4 {\n margin-bottom: 1rem;\n }\n\n .sm\\:ml-6 {\n margin-left: 1.5rem;\n }\n\n .sm\\:mr-4 {\n margin-right: 1rem;\n }\n\n .sm\\:block {\n display: block;\n }\n\n .sm\\:flex {\n display: flex;\n }\n\n .sm\\:hidden {\n display: none;\n }\n\n .sm\\:w-1\\/6 {\n width: 16.666667%;\n }\n\n .sm\\:w-32 {\n width: 8rem;\n }\n\n .sm\\:w-full {\n width: 100%;\n }\n\n .sm\\:max-w-2xl {\n max-width: 42rem;\n }\n\n .sm\\:max-w-4xl {\n max-width: 56rem;\n }\n\n .sm\\:max-w-md {\n max-width: 28rem;\n }\n\n .sm\\:max-w-sm {\n max-width: 24rem;\n }\n\n .sm\\:max-w-xs {\n max-width: 20rem;\n }\n\n .sm\\:flex-1 {\n flex: 1 1 0%;\n }\n\n .sm\\:translate-x-0 {\n --tw-translate-x: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n }\n\n .sm\\:translate-x-2 {\n --tw-translate-x: 0.5rem;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n }\n\n .sm\\:translate-y-0 {\n --tw-translate-y: 0px;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n }\n\n .sm\\:scale-100 {\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n }\n\n .sm\\:scale-95 {\n --tw-scale-x: .95;\n --tw-scale-y: .95;\n transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));\n }\n\n .sm\\:items-start {\n align-items: flex-start;\n }\n\n .sm\\:items-end {\n align-items: flex-end;\n }\n\n .sm\\:items-center {\n align-items: center;\n }\n\n .sm\\:items-stretch {\n align-items: stretch;\n }\n\n .sm\\:justify-start {\n justify-content: flex-start;\n }\n\n .sm\\:justify-between {\n justify-content: space-between;\n }\n\n .sm\\:rounded-lg {\n border-radius: 0.5rem;\n }\n\n .sm\\:rounded-md {\n border-radius: 0.375rem;\n }\n\n .sm\\:p-0 {\n padding: 0px;\n }\n\n .sm\\:p-6 {\n padding: 1.5rem;\n }\n\n .sm\\:px-0 {\n padding-left: 0px;\n padding-right: 0px;\n }\n\n .sm\\:px-6 {\n padding-left: 1.5rem;\n padding-right: 1.5rem;\n }\n\n .sm\\:pr-0 {\n padding-right: 0px;\n }\n\n .sm\\:text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n }\n\n .sm\\:duration-700 {\n transition-duration: 700ms;\n }\n}\n@media (min-width: 768px) {\n\n .md\\:-mt-px {\n margin-top: -1px;\n }\n\n .md\\:mb-0 {\n margin-bottom: 0px;\n }\n\n .md\\:flex {\n display: flex;\n }\n}\n@media (min-width: 1024px) {\n\n .lg\\:ml-6 {\n margin-left: 1.5rem;\n }\n\n .lg\\:block {\n display: block;\n }\n\n .lg\\:hidden {\n display: none;\n }\n\n .lg\\:max-w-xs {\n max-width: 20rem;\n }\n\n .lg\\:justify-end {\n justify-content: flex-end;\n }\n\n .lg\\:px-8 {\n padding-left: 2rem;\n padding-right: 2rem;\n }\n}";
|
|
272
|
+
styleInject(css_248z);
|
|
273
|
+
|
|
274
|
+
var ButtonElement = function (props) {
|
|
275
|
+
var children = props.children, _a = props.type, type = _a === void 0 ? 'primary' : _a, _b = props.size, size = _b === void 0 ? 'md' : _b, _c = props.figure, figure = _c === void 0 ? 'block' : _c, _d = props.status, status = _d === void 0 ? 'idle' : _d, isDisabled = props.isDisabled, customStyles = props.styles, onClick = props.onClick;
|
|
276
|
+
var toClassName = useCallback(function () {
|
|
277
|
+
var values = [];
|
|
278
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
279
|
+
values[_i] = arguments[_i];
|
|
280
|
+
}
|
|
281
|
+
return values.filter(Boolean).join(' ');
|
|
282
|
+
}, []);
|
|
283
|
+
var style = useMemo(function () { return ({
|
|
284
|
+
container: toClassName(styles$f.base.container, type && styles$f[type].container, size && styles$f[size].container, figure && styles$f[figure].container, status && styles$f[status].container, isDisabled && styles$f.disabled.container, status === 'loading' && styles$f.loading.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
285
|
+
}); }, [customStyles]);
|
|
286
|
+
return (jsx("button", __assign({ type: "button", className: style.container, disabled: isDisabled || status !== 'idle', onClick: onClick }, { children: status === 'loading' ? '[Loading...]' : children })));
|
|
287
|
+
};
|
|
288
|
+
|
|
289
|
+
var base$4 = {
|
|
290
|
+
container: 'inline-flex items-center border border-transparent font-medium focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500',
|
|
291
|
+
};
|
|
292
|
+
var primary = {
|
|
293
|
+
container: "shadow-sm text-white bg-indigo-600 hover:bg-indigo-700",
|
|
294
|
+
};
|
|
295
|
+
var secondary = {
|
|
296
|
+
container: "shadow-none text-indigo-700 bg-indigo-100 hover:bg-indigo-200",
|
|
297
|
+
};
|
|
298
|
+
var outline = {
|
|
299
|
+
container: "border-gray-300 text-gray-700 bg-white hover:bg-gray-50",
|
|
300
|
+
};
|
|
301
|
+
var xs = {
|
|
302
|
+
container: 'px-3 py-1.5 text-xs',
|
|
303
|
+
};
|
|
304
|
+
var sm = {
|
|
305
|
+
container: 'px-3.5 py-2 text-sm',
|
|
306
|
+
};
|
|
307
|
+
var md = {
|
|
308
|
+
container: 'px-4 py-2.5 text-sm',
|
|
309
|
+
};
|
|
310
|
+
var lg = {
|
|
311
|
+
container: 'px-5 py-2.5 text-base',
|
|
312
|
+
};
|
|
313
|
+
var xl = {
|
|
314
|
+
container: 'px-6 py-3 text-base',
|
|
315
|
+
};
|
|
316
|
+
var block = {
|
|
317
|
+
container: 'rounded-md',
|
|
318
|
+
};
|
|
319
|
+
var rounded = {
|
|
320
|
+
container: 'rounded-full',
|
|
321
|
+
};
|
|
322
|
+
var idle = {
|
|
323
|
+
container: '',
|
|
324
|
+
};
|
|
325
|
+
var loading = {
|
|
326
|
+
container: 'cursor-progress',
|
|
327
|
+
};
|
|
328
|
+
var success = {
|
|
329
|
+
container: '',
|
|
330
|
+
};
|
|
331
|
+
var error = {
|
|
332
|
+
container: '',
|
|
333
|
+
};
|
|
334
|
+
var disabled = {
|
|
335
|
+
container: 'opacity-20 cursor-not-allowed',
|
|
336
|
+
};
|
|
337
|
+
var styles$f = {
|
|
338
|
+
base: base$4,
|
|
339
|
+
primary: primary,
|
|
340
|
+
secondary: secondary,
|
|
341
|
+
outline: outline,
|
|
342
|
+
xs: xs,
|
|
343
|
+
sm: sm,
|
|
344
|
+
md: md,
|
|
345
|
+
lg: lg,
|
|
346
|
+
xl: xl,
|
|
347
|
+
block: block,
|
|
348
|
+
rounded: rounded,
|
|
349
|
+
idle: idle,
|
|
350
|
+
loading: loading,
|
|
351
|
+
success: success,
|
|
352
|
+
error: error,
|
|
353
|
+
disabled: disabled,
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
var ButtonGroupElement = function (props) {
|
|
357
|
+
var children = props.children, customStyles = props.styles;
|
|
358
|
+
var toClassName = useCallback(function () {
|
|
359
|
+
var values = [];
|
|
360
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
361
|
+
values[_i] = arguments[_i];
|
|
362
|
+
}
|
|
363
|
+
return values.filter(Boolean).join(' ');
|
|
364
|
+
}, []);
|
|
365
|
+
var style = useMemo(function () { return ({
|
|
366
|
+
container: toClassName(styles$e.base.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
367
|
+
firstButton: toClassName(styles$e.base.firstButton, customStyles === null || customStyles === void 0 ? void 0 : customStyles.firstButton),
|
|
368
|
+
button: toClassName(styles$e.base.button, customStyles === null || customStyles === void 0 ? void 0 : customStyles.button),
|
|
369
|
+
lastButton: toClassName(styles$e.base.lastButton, customStyles === null || customStyles === void 0 ? void 0 : customStyles.lastButton),
|
|
370
|
+
}); }, [customStyles]);
|
|
371
|
+
return (jsx("span", __assign({ className: style.container }, { children: Children.map(children, function (child, index) {
|
|
372
|
+
var _a;
|
|
373
|
+
var className = style.button;
|
|
374
|
+
if (index === 0) {
|
|
375
|
+
className = style.firstButton;
|
|
376
|
+
}
|
|
377
|
+
if (index === children.length - 1) {
|
|
378
|
+
className = style.lastButton;
|
|
379
|
+
}
|
|
380
|
+
return (jsx("button", __assign({ className: className }, { children: child }), (_a = child.key) !== null && _a !== void 0 ? _a : index));
|
|
381
|
+
}) })));
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
var base$3 = {
|
|
385
|
+
container: 'relative z-0 inline-flex shadow-sm rounded-md',
|
|
386
|
+
firstButton: 'relative inline-flex items-center px-4 py-2 rounded-l-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500',
|
|
387
|
+
button: '-ml-px relative inline-flex items-center px-4 py-2 border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500',
|
|
388
|
+
lastButton: '-ml-px relative inline-flex items-center px-4 py-2 rounded-r-md border border-gray-300 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:z-10 focus:outline-none focus:ring-1 focus:ring-indigo-500 focus:border-indigo-500',
|
|
389
|
+
};
|
|
390
|
+
var styles$e = { base: base$3 };
|
|
391
|
+
|
|
392
|
+
var Container$3 = function (props) {
|
|
393
|
+
var children = props.children, label = props.label, _a = props.type, type = _a === void 0 ? 'button' : _a, customStyles = props.styles;
|
|
394
|
+
var toClassName = useCallback(function () {
|
|
395
|
+
var values = [];
|
|
396
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
397
|
+
values[_i] = arguments[_i];
|
|
398
|
+
}
|
|
399
|
+
return values.filter(Boolean).join(' ');
|
|
400
|
+
}, []);
|
|
401
|
+
var style = useMemo(function () { return ({
|
|
402
|
+
container: toClassName(styles$d.base.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
403
|
+
button: toClassName(styles$d.base.button, customStyles === null || customStyles === void 0 ? void 0 : customStyles.button),
|
|
404
|
+
compact: toClassName(styles$d.base.compact, customStyles === null || customStyles === void 0 ? void 0 : customStyles.compact),
|
|
405
|
+
dots: toClassName(styles$d.base.dots, customStyles === null || customStyles === void 0 ? void 0 : customStyles.dots),
|
|
406
|
+
items: toClassName(styles$d.base.items, customStyles === null || customStyles === void 0 ? void 0 : customStyles.items),
|
|
407
|
+
}); }, [customStyles]);
|
|
408
|
+
return (jsxs(Menu, __assign({ as: "div", className: style.container }, { children: [jsxs("div", { children: [type === 'button' && (jsxs(Menu.Button, __assign({ className: style.button }, { children: [label, jsx(ChevronDownIcon, { className: "-mr-1 ml-2 h-5 w-5", "aria-hidden": "true" })] }))), type === 'compact' && (jsxs(Menu.Button, __assign({ className: style.compact }, { children: [jsx("span", __assign({ className: "sr-only" }, { children: label })), jsx(EllipsisVerticalIcon, { className: style.dots, "aria-hidden": "true" })] })))] }), jsx(Transition, __assign({ as: Fragment, enter: "transition ease-out duration-100", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95" }, { children: jsx(Menu.Items, __assign({ className: style.items }, { children: children })) }))] })));
|
|
409
|
+
};
|
|
410
|
+
var Dropdown = {
|
|
411
|
+
Container: Container$3,
|
|
412
|
+
Item: Menu.Item,
|
|
413
|
+
};
|
|
414
|
+
|
|
415
|
+
var base$2 = {
|
|
416
|
+
container: 'relative inline-block text-left',
|
|
417
|
+
button: 'inline-flex justify-center w-full rounded-md border border-gray-300 shadow-sm px-4 py-2 bg-white text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500',
|
|
418
|
+
compact: 'bg-gray-100 rounded-full flex items-center text-gray-400 hover:text-gray-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-indigo-500',
|
|
419
|
+
dots: 'h-7 w-7 p-1',
|
|
420
|
+
items: 'origin-top-right absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 divide-y divide-gray-100 focus:outline-none',
|
|
421
|
+
};
|
|
422
|
+
var styles$d = {
|
|
423
|
+
base: base$2,
|
|
424
|
+
};
|
|
425
|
+
|
|
426
|
+
var Element = {
|
|
427
|
+
Button: ButtonElement,
|
|
428
|
+
Avatar: AvatarElement,
|
|
429
|
+
Badge: BadgeElement,
|
|
430
|
+
ButtonGroup: ButtonGroupElement,
|
|
431
|
+
Dropdown: Dropdown,
|
|
432
|
+
};
|
|
433
|
+
|
|
434
|
+
var ContainerLayout = function (props) {
|
|
435
|
+
var children = props.children, _a = props.type, type = _a === void 0 ? 'break' : _a, customStyles = props.styles;
|
|
436
|
+
var toClassName = useCallback(function () {
|
|
437
|
+
var values = [];
|
|
438
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
439
|
+
values[_i] = arguments[_i];
|
|
440
|
+
}
|
|
441
|
+
return values.filter(Boolean).join(' ');
|
|
442
|
+
}, []);
|
|
443
|
+
var style = useMemo(function () { return ({
|
|
444
|
+
break: {
|
|
445
|
+
container: toClassName(initialStyles.break.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
446
|
+
},
|
|
447
|
+
center: {
|
|
448
|
+
container: toClassName(initialStyles.center.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
449
|
+
content: toClassName(initialStyles.center.content, customStyles === null || customStyles === void 0 ? void 0 : customStyles.content),
|
|
450
|
+
},
|
|
451
|
+
fill: {
|
|
452
|
+
container: toClassName(initialStyles.fill.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
453
|
+
},
|
|
454
|
+
}); }, [customStyles]);
|
|
455
|
+
var $component = useMemo(function () {
|
|
456
|
+
var result;
|
|
457
|
+
switch (type) {
|
|
458
|
+
case 'break':
|
|
459
|
+
result = jsx("div", __assign({ className: style.break.container }, { children: children }));
|
|
460
|
+
break;
|
|
461
|
+
case 'center':
|
|
462
|
+
result = (jsx("div", __assign({ className: style.center.container }, { children: jsx("div", __assign({ className: style.center.content }, { children: children })) })));
|
|
463
|
+
break;
|
|
464
|
+
case 'fill':
|
|
465
|
+
result = jsx("div", __assign({ className: style.fill.container }, { children: children }));
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
return result;
|
|
469
|
+
}, [style]);
|
|
470
|
+
return $component;
|
|
471
|
+
};
|
|
472
|
+
|
|
473
|
+
var breakStyles = {
|
|
474
|
+
container: 'container mx-auto sm:px-6 lg:px-8',
|
|
475
|
+
};
|
|
476
|
+
var centerStyles = {
|
|
477
|
+
container: 'max-w-7xl mx-auto px-4 sm:px-6 lg:px-8',
|
|
478
|
+
content: 'max-w-4xl mx-auto',
|
|
479
|
+
};
|
|
480
|
+
var fillStyles = {
|
|
481
|
+
container: 'max-w-7xl mx-auto sm:px-6 lg:px-8',
|
|
482
|
+
};
|
|
483
|
+
var initialStyles = {
|
|
484
|
+
break: breakStyles,
|
|
485
|
+
center: centerStyles,
|
|
486
|
+
fill: fillStyles,
|
|
487
|
+
};
|
|
488
|
+
|
|
489
|
+
var DividerLayout = function (props) {
|
|
490
|
+
var children = props.children, _a = props.type, type = _a === void 0 ? 'left' : _a, customStyles = props.styles;
|
|
491
|
+
var toClassName = useCallback(function () {
|
|
492
|
+
var values = [];
|
|
493
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
494
|
+
values[_i] = arguments[_i];
|
|
495
|
+
}
|
|
496
|
+
return values.filter(Boolean).join(' ');
|
|
497
|
+
}, []);
|
|
498
|
+
var style = useMemo(function () { return ({
|
|
499
|
+
container: toClassName(styles$c.base.container, type && styles$c[type].container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
500
|
+
head: toClassName(styles$c.base.head, type && styles$c[type].head, customStyles === null || customStyles === void 0 ? void 0 : customStyles.head),
|
|
501
|
+
line: toClassName(styles$c.base.line, type && styles$c[type].line, customStyles === null || customStyles === void 0 ? void 0 : customStyles.line),
|
|
502
|
+
body: toClassName(styles$c.base.body, type && styles$c[type].body, customStyles === null || customStyles === void 0 ? void 0 : customStyles.body),
|
|
503
|
+
content: toClassName(styles$c.base.content, type && styles$c[type].content, customStyles === null || customStyles === void 0 ? void 0 : customStyles.content),
|
|
504
|
+
}); }, [customStyles]);
|
|
505
|
+
return (jsxs("div", __assign({ className: style.container }, { children: [jsx("div", __assign({ className: style.head, "aria-hidden": "true" }, { children: jsx("div", { className: style.line }) })), jsx("div", __assign({ className: style.body }, { children: jsx("div", __assign({ className: style.content }, { children: children })) }))] })));
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
var base$1 = {
|
|
509
|
+
container: 'relative',
|
|
510
|
+
head: 'absolute inset-0 flex items-center',
|
|
511
|
+
line: 'w-full border-t border-gray-300',
|
|
512
|
+
body: 'relative flex',
|
|
513
|
+
content: 'bg-white text-sm text-gray-500',
|
|
514
|
+
};
|
|
515
|
+
var left = {
|
|
516
|
+
container: '',
|
|
517
|
+
head: '',
|
|
518
|
+
line: '',
|
|
519
|
+
body: 'justify-start',
|
|
520
|
+
content: '',
|
|
521
|
+
};
|
|
522
|
+
var center$2 = {
|
|
523
|
+
container: '',
|
|
524
|
+
head: '',
|
|
525
|
+
line: '',
|
|
526
|
+
body: 'justify-center',
|
|
527
|
+
content: '',
|
|
528
|
+
};
|
|
529
|
+
var right = {
|
|
530
|
+
container: '',
|
|
531
|
+
head: '',
|
|
532
|
+
line: '',
|
|
533
|
+
body: 'justify-end',
|
|
534
|
+
content: '',
|
|
535
|
+
};
|
|
536
|
+
var styles$c = {
|
|
537
|
+
base: base$1,
|
|
538
|
+
left: left,
|
|
539
|
+
center: center$2,
|
|
540
|
+
right: right,
|
|
541
|
+
};
|
|
542
|
+
|
|
543
|
+
var ListContainerLayout = function (props) {
|
|
544
|
+
var _a;
|
|
545
|
+
var children = props.children, _b = props.type, type = _b === void 0 ? 'fill' : _b, customStyles = props.styles;
|
|
546
|
+
var isSticky = type.includes('-sticky');
|
|
547
|
+
var selector = isSticky ? (_a = type === null || type === void 0 ? void 0 : type.split('-')) === null || _a === void 0 ? void 0 : _a[0] : type;
|
|
548
|
+
var toClassName = useCallback(function () {
|
|
549
|
+
var values = [];
|
|
550
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
551
|
+
values[_i] = arguments[_i];
|
|
552
|
+
}
|
|
553
|
+
return values.filter(Boolean).join(' ');
|
|
554
|
+
}, []);
|
|
555
|
+
var style = useMemo(function () { return ({
|
|
556
|
+
container: toClassName(isSticky
|
|
557
|
+
? styles$b["".concat(selector, "_sticky")].container
|
|
558
|
+
: styles$b[selector].container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
559
|
+
list: toClassName(isSticky
|
|
560
|
+
? styles$b["".concat(selector, "_sticky")].list
|
|
561
|
+
: styles$b[selector].list, customStyles === null || customStyles === void 0 ? void 0 : customStyles.list),
|
|
562
|
+
item: toClassName(isSticky
|
|
563
|
+
? styles$b["".concat(selector, "_sticky")].item
|
|
564
|
+
: styles$b[selector].item, customStyles === null || customStyles === void 0 ? void 0 : customStyles.item),
|
|
565
|
+
}); }, [customStyles]);
|
|
566
|
+
return (jsx("div", __assign({ className: style.container }, { children: jsx("ul", __assign({ role: "list", className: style.list }, { children: Children.map(children, function (child, index) {
|
|
567
|
+
var _a;
|
|
568
|
+
return (jsx("li", __assign({ className: style.item }, { children: child }), (_a = child.key) !== null && _a !== void 0 ? _a : index));
|
|
569
|
+
}) })) })));
|
|
570
|
+
};
|
|
571
|
+
|
|
572
|
+
var fill = {
|
|
573
|
+
list: 'divide-y divide-gray-200',
|
|
574
|
+
item: 'py-4',
|
|
575
|
+
};
|
|
576
|
+
var fill_sticky = {
|
|
577
|
+
list: 'divide-y divide-gray-200',
|
|
578
|
+
item: 'px-4 py-4 sm:px-0',
|
|
579
|
+
};
|
|
580
|
+
var center$1 = {
|
|
581
|
+
container: 'bg-white shadow overflow-hidden rounded-md',
|
|
582
|
+
list: 'divide-y divide-gray-200',
|
|
583
|
+
item: 'px-6 py-4',
|
|
584
|
+
};
|
|
585
|
+
var center_sticky = {
|
|
586
|
+
container: 'bg-white shadow overflow-hidden sm:rounded-md',
|
|
587
|
+
list: 'divide-y divide-gray-200',
|
|
588
|
+
item: 'px-4 py-4 sm:px-6',
|
|
589
|
+
};
|
|
590
|
+
var card = {
|
|
591
|
+
list: 'space-y-3',
|
|
592
|
+
item: 'bg-white shadow overflow-hidden rounded-md px-6 py-4',
|
|
593
|
+
};
|
|
594
|
+
var card_sticky = {
|
|
595
|
+
list: 'space-y-3',
|
|
596
|
+
item: 'bg-white shadow overflow-hidden px-4 py-4 sm:px-6 sm:rounded-md',
|
|
597
|
+
};
|
|
598
|
+
var styles$b = {
|
|
599
|
+
fill: fill,
|
|
600
|
+
fill_sticky: fill_sticky,
|
|
601
|
+
center: center$1,
|
|
602
|
+
center_sticky: center_sticky,
|
|
603
|
+
card: card,
|
|
604
|
+
card_sticky: card_sticky,
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
var MediaObjectLayout = function (props) {
|
|
608
|
+
var _a;
|
|
609
|
+
var title = props.title, paragraph = props.paragraph, customFigure = props.figure, _b = props.type, type = _b === void 0 ? 'top' : _b, customStyles = props.styles;
|
|
610
|
+
var isReversed = type.includes('-reversed');
|
|
611
|
+
var selector = isReversed ? (_a = type === null || type === void 0 ? void 0 : type.split('-')) === null || _a === void 0 ? void 0 : _a[0] : type;
|
|
612
|
+
var toClassName = useCallback(function () {
|
|
613
|
+
var values = [];
|
|
614
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
615
|
+
values[_i] = arguments[_i];
|
|
616
|
+
}
|
|
617
|
+
return values.filter(Boolean).join(' ');
|
|
618
|
+
}, []);
|
|
619
|
+
var style = useMemo(function () { return ({
|
|
620
|
+
container: toClassName(styles$a[selector].container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container, isReversed && 'flex-row-reverse'),
|
|
621
|
+
figure: toClassName(styles$a[selector].figure, customStyles === null || customStyles === void 0 ? void 0 : customStyles.figure),
|
|
622
|
+
svg: toClassName(styles$a[selector].svg, customStyles === null || customStyles === void 0 ? void 0 : customStyles.svg),
|
|
623
|
+
title: toClassName(styles$a[selector].title, customStyles === null || customStyles === void 0 ? void 0 : customStyles.title),
|
|
624
|
+
paragraph: toClassName(styles$a[selector].paragraph, customStyles === null || customStyles === void 0 ? void 0 : customStyles.paragraph),
|
|
625
|
+
}); }, [customStyles]);
|
|
626
|
+
var $svg = useMemo(function () {
|
|
627
|
+
var result = (jsx("svg", __assign({ className: style.svg, preserveAspectRatio: "none", stroke: "currentColor", fill: "none", viewBox: "0 0 200 200", "aria-hidden": "true" }, { children: jsx("path", { vectorEffect: "non-scaling-stroke", strokeWidth: 1, d: "M0 0l200 200M0 200L200 0" }) })));
|
|
628
|
+
if (customFigure) {
|
|
629
|
+
result = React.cloneElement(customFigure, {
|
|
630
|
+
className: style.svg,
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
return result;
|
|
634
|
+
}, [style]);
|
|
635
|
+
return (jsxs("div", __assign({ className: style.container }, { children: [jsx("div", __assign({ className: style.figure }, { children: $svg })), jsxs("div", { children: [jsx("h4", __assign({ className: style.title }, { children: title })), jsx("p", __assign({ className: style.paragraph }, { children: paragraph }))] })] })));
|
|
636
|
+
};
|
|
637
|
+
|
|
638
|
+
var base = {
|
|
639
|
+
container: 'flex',
|
|
640
|
+
figure: 'mr-4 flex-shrink-0',
|
|
641
|
+
svg: 'h-16 w-16 border border-gray-300 bg-white text-gray-300',
|
|
642
|
+
title: 'text-lg font-bold',
|
|
643
|
+
paragraph: 'mt-1',
|
|
644
|
+
};
|
|
645
|
+
var top = {
|
|
646
|
+
container: "".concat(base.container),
|
|
647
|
+
figure: "".concat(base.figure),
|
|
648
|
+
svg: "".concat(base.svg),
|
|
649
|
+
title: "".concat(base.title),
|
|
650
|
+
paragraph: "".concat(base.paragraph),
|
|
651
|
+
};
|
|
652
|
+
var center = {
|
|
653
|
+
container: "".concat(base.container),
|
|
654
|
+
figure: "".concat(base.figure, " self-center"),
|
|
655
|
+
svg: "".concat(base.svg),
|
|
656
|
+
title: "".concat(base.title),
|
|
657
|
+
paragraph: "".concat(base.paragraph),
|
|
658
|
+
};
|
|
659
|
+
var bottom = {
|
|
660
|
+
container: "".concat(base.container),
|
|
661
|
+
figure: "".concat(base.figure, " self-end"),
|
|
662
|
+
svg: "".concat(base.svg),
|
|
663
|
+
title: "".concat(base.title),
|
|
664
|
+
paragraph: "".concat(base.paragraph),
|
|
665
|
+
};
|
|
666
|
+
var stretch = {
|
|
667
|
+
container: "".concat(base.container),
|
|
668
|
+
figure: "".concat(base.figure),
|
|
669
|
+
svg: "".concat(base.svg, " h-full"),
|
|
670
|
+
title: "".concat(base.title),
|
|
671
|
+
paragraph: "".concat(base.paragraph),
|
|
672
|
+
};
|
|
673
|
+
var responsive = {
|
|
674
|
+
container: 'sm:flex',
|
|
675
|
+
figure: "".concat(base.figure, " sm:mb-0 sm:mr-4"),
|
|
676
|
+
svg: "".concat(base.svg),
|
|
677
|
+
title: "".concat(base.title),
|
|
678
|
+
paragraph: "".concat(base.paragraph),
|
|
679
|
+
};
|
|
680
|
+
var wide = {
|
|
681
|
+
container: 'sm:flex',
|
|
682
|
+
figure: "".concat(base.figure, " mb-4 md:mb-0 sm:mr-4 sm:mb-4 "),
|
|
683
|
+
svg: "".concat(base.svg, " h-32 w-full sm:w-32"),
|
|
684
|
+
title: "".concat(base.title),
|
|
685
|
+
paragraph: "".concat(base.paragraph),
|
|
686
|
+
};
|
|
687
|
+
var styles$a = {
|
|
688
|
+
top: top,
|
|
689
|
+
center: center,
|
|
690
|
+
bottom: bottom,
|
|
691
|
+
stretch: stretch,
|
|
692
|
+
responsive: responsive,
|
|
693
|
+
wide: wide,
|
|
694
|
+
};
|
|
695
|
+
|
|
696
|
+
var LayoutPanel = function (props) {
|
|
697
|
+
var head = props.head, children = props.children, foot = props.foot, _a = props.type, type = _a === void 0 ? 'normal' : _a, customStyles = props.styles;
|
|
698
|
+
var typeStyle = useMemo(function () {
|
|
699
|
+
var result;
|
|
700
|
+
switch (type) {
|
|
701
|
+
case 'normal':
|
|
702
|
+
result = 'rounded-lg';
|
|
703
|
+
break;
|
|
704
|
+
case 'sticky':
|
|
705
|
+
result = 'sm:rounded-lg';
|
|
706
|
+
break;
|
|
707
|
+
}
|
|
708
|
+
return result;
|
|
709
|
+
}, []);
|
|
710
|
+
var toClassName = useCallback(function () {
|
|
711
|
+
var values = [];
|
|
712
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
713
|
+
values[_i] = arguments[_i];
|
|
714
|
+
}
|
|
715
|
+
return values.filter(Boolean).join(' ');
|
|
716
|
+
}, []);
|
|
717
|
+
var style = useMemo(function () { return ({
|
|
718
|
+
container: toClassName(styles$9.container, typeStyle, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
719
|
+
head: toClassName(styles$9.head, customStyles === null || customStyles === void 0 ? void 0 : customStyles.head),
|
|
720
|
+
body: toClassName(styles$9.body, customStyles === null || customStyles === void 0 ? void 0 : customStyles.body),
|
|
721
|
+
foot: toClassName(styles$9.foot, customStyles === null || customStyles === void 0 ? void 0 : customStyles.foot),
|
|
722
|
+
}); }, [customStyles]);
|
|
723
|
+
return (jsxs("div", __assign({ className: style.container }, { children: [head && jsx("div", __assign({ className: style.head }, { children: head })), children && jsx("div", __assign({ className: style.body }, { children: children })), foot && jsx("div", __assign({ className: style.foot }, { children: foot }))] })));
|
|
724
|
+
};
|
|
725
|
+
|
|
726
|
+
var styles$9 = {
|
|
727
|
+
container: 'bg-white overflow-hidden shadow',
|
|
728
|
+
head: 'px-4 py-5 sm:px-6',
|
|
729
|
+
body: 'px-4 py-5 sm:p-6',
|
|
730
|
+
foot: 'px-4 py-5 sm:px-6',
|
|
731
|
+
};
|
|
732
|
+
|
|
733
|
+
var Layout = {
|
|
734
|
+
Container: ContainerLayout,
|
|
735
|
+
Divider: DividerLayout,
|
|
736
|
+
ListContainer: ListContainerLayout,
|
|
737
|
+
MediaObject: MediaObjectLayout,
|
|
738
|
+
Panel: LayoutPanel,
|
|
739
|
+
};
|
|
740
|
+
|
|
741
|
+
var NavbarNavigationLogo = function () {
|
|
742
|
+
return (jsxs("div", __assign({ className: "flex flex-shrink-0 items-center" }, { children: [jsx("img", { className: "block h-8 w-auto lg:hidden", src: "https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500", alt: "Your Company" }), jsx("img", { className: "hidden h-8 w-auto lg:block", src: "https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=500", alt: "Your Company" })] })));
|
|
743
|
+
};
|
|
744
|
+
var NavbarNavigationRoutes = function () {
|
|
745
|
+
var toClassName = useCallback(function () {
|
|
746
|
+
var values = [];
|
|
747
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
748
|
+
values[_i] = arguments[_i];
|
|
749
|
+
}
|
|
750
|
+
return values.filter(Boolean).join(' ');
|
|
751
|
+
}, []);
|
|
752
|
+
var navigation = [
|
|
753
|
+
{ name: 'Dashboard', href: '#', current: true },
|
|
754
|
+
{ name: 'Team', href: '#', current: false },
|
|
755
|
+
{ name: 'Projects', href: '#', current: false },
|
|
756
|
+
{ name: 'Calendar', href: '#', current: false },
|
|
757
|
+
];
|
|
758
|
+
return (jsx("div", __assign({ className: "flex flex-1 items-center justify-center sm:items-stretch sm:justify-start" }, { children: jsx("div", __assign({ className: "hidden sm:ml-6 sm:block" }, { children: jsx("div", __assign({ className: "flex space-x-4" }, { children: navigation.map(function (item) { return (jsx("a", __assign({ href: item.href, className: toClassName(item.current
|
|
759
|
+
? 'bg-gray-900 text-white'
|
|
760
|
+
: 'text-gray-300 hover:bg-gray-700 hover:text-white', 'px-3 py-2 rounded-md text-sm font-medium'), "aria-current": item.current ? 'page' : undefined }, { children: item.name }), item.name)); }) })) })) })));
|
|
761
|
+
};
|
|
762
|
+
var NavbarNavigationAccount = function () {
|
|
763
|
+
var toClassName = useCallback(function () {
|
|
764
|
+
var values = [];
|
|
765
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
766
|
+
values[_i] = arguments[_i];
|
|
767
|
+
}
|
|
768
|
+
return values.filter(Boolean).join(' ');
|
|
769
|
+
}, []);
|
|
770
|
+
return (jsxs("div", __assign({ className: "absolute inset-y-0 right-0 flex items-center pr-2 sm:static sm:inset-auto sm:ml-6 sm:pr-0" }, { children: [jsx("button", __assign({ type: "button", className: "rounded-full bg-gray-800 p-1 text-gray-400 hover:text-white focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800" }, { children: jsx("span", __assign({ className: "sr-only" }, { children: "View notifications" })) })), jsxs(Menu, __assign({ as: "div", className: "relative ml-3" }, { children: [jsx("div", { children: jsxs(Menu.Button, __assign({ className: "flex rounded-full bg-gray-800 text-sm focus:outline-none focus:ring-2 focus:ring-white focus:ring-offset-2 focus:ring-offset-gray-800" }, { children: [jsx("span", __assign({ className: "sr-only" }, { children: "Open user menu" })), jsx("img", { className: "h-8 w-8 rounded-full", src: "https://images.unsplash.com/photo-1472099645785-5658abf4ff4e?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=facearea&facepad=2&w=256&h=256&q=80", alt: "" })] })) }), jsx(Transition, __assign({ as: Fragment, enter: "transition ease-out duration-100", enterFrom: "transform opacity-0 scale-95", enterTo: "transform opacity-100 scale-100", leave: "transition ease-in duration-75", leaveFrom: "transform opacity-100 scale-100", leaveTo: "transform opacity-0 scale-95" }, { children: jsxs(Menu.Items, __assign({ className: "absolute right-0 z-10 mt-2 w-48 origin-top-right rounded-md bg-white py-1 shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none" }, { children: [jsx(Menu.Item, { children: function (_a) {
|
|
771
|
+
var active = _a.active;
|
|
772
|
+
return (jsx("a", __assign({ href: "#", className: toClassName(active ? 'bg-gray-100' : '', 'block px-4 py-2 text-sm text-gray-700') }, { children: "Your Profile" })));
|
|
773
|
+
} }), jsx(Menu.Item, { children: function (_a) {
|
|
774
|
+
var active = _a.active;
|
|
775
|
+
return (jsx("a", __assign({ href: "#", className: toClassName(active ? 'bg-gray-100' : '', 'block px-4 py-2 text-sm text-gray-700') }, { children: "Settings" })));
|
|
776
|
+
} }), jsx(Menu.Item, { children: function (_a) {
|
|
777
|
+
var active = _a.active;
|
|
778
|
+
return (jsx("a", __assign({ href: "#", className: toClassName(active ? 'bg-gray-100' : '', 'block px-4 py-2 text-sm text-gray-700') }, { children: "Sign out" })));
|
|
779
|
+
} })] })) }))] }))] })));
|
|
780
|
+
};
|
|
781
|
+
var NavbarNavigationAction = function () {
|
|
782
|
+
return jsx("div", __assign({ className: styles$8.container }, { children: null }));
|
|
783
|
+
};
|
|
784
|
+
var NavbarNavigationSearch = function () {
|
|
785
|
+
return (jsx("div", __assign({ className: "flex flex-1 justify-center px-2 lg:ml-6 lg:justify-end" }, { children: jsxs("div", __assign({ className: "w-full max-w-lg lg:max-w-xs" }, { children: [jsx("label", __assign({ htmlFor: "search", className: "sr-only" }, { children: "Search" })), jsxs("div", __assign({ className: "relative" }, { children: [jsx("div", { className: "pointer-events-none absolute inset-y-0 left-0 flex items-center pl-3" }), jsx("input", { id: "search", name: "search", className: "block w-full rounded-md border border-transparent bg-gray-700 py-2 pl-10 pr-3 leading-5 text-gray-300 placeholder-gray-400 focus:border-white focus:bg-white focus:text-gray-900 focus:outline-none focus:ring-white sm:text-sm", placeholder: "Search", type: "search" })] }))] })) })));
|
|
786
|
+
};
|
|
787
|
+
var NavbarNavigationContainer = function (props) {
|
|
788
|
+
var children = props.children;
|
|
789
|
+
// const toClassName = useCallback(
|
|
790
|
+
// (...values: (boolean | string | undefined)[]) =>
|
|
791
|
+
// values.filter(Boolean).join(' '),
|
|
792
|
+
// [],
|
|
793
|
+
// );
|
|
794
|
+
return (jsx(Disclosure, __assign({ as: "nav", className: "bg-gray-800 fixed left-0 top-0 right-0 z-20" }, { children: function (_a) {
|
|
795
|
+
var open = _a.open;
|
|
796
|
+
return (jsxs(Fragment$1, { children: [jsx("div", __assign({ className: "mx-auto max-w-7xl px-2 sm:px-6 lg:px-8" }, { children: jsxs("div", __assign({ className: "relative flex h-16 items-center justify-between" }, { children: [jsx("div", __assign({ className: "absolute inset-y-0 left-0 flex items-center sm:hidden" }, { children: jsxs(Disclosure.Button, __assign({ className: "inline-flex items-center justify-center rounded-md p-2 text-gray-400 hover:bg-gray-700 hover:text-white focus:outline-none focus:ring-2 focus:ring-inset focus:ring-white" }, { children: [jsx("span", __assign({ className: "sr-only" }, { children: "Open main menu" })), open
|
|
797
|
+
? 'x'
|
|
798
|
+
: // <XMarkIcon className="block h-6 w-6" aria-hidden="true" />
|
|
799
|
+
'='
|
|
800
|
+
// <Bars3Icon className="block h-6 w-6" aria-hidden="true" />
|
|
801
|
+
] })) })), children] })) })), jsx(Disclosure.Panel, __assign({ className: "sm:hidden" }, { children: jsx("div", { className: "space-y-1 px-2 pt-2 pb-3" }) }))] }));
|
|
802
|
+
} })));
|
|
803
|
+
};
|
|
804
|
+
var NavbarNavigation = {
|
|
805
|
+
Container: NavbarNavigationContainer,
|
|
806
|
+
Logo: NavbarNavigationLogo,
|
|
807
|
+
Routes: NavbarNavigationRoutes,
|
|
808
|
+
Account: NavbarNavigationAccount,
|
|
809
|
+
Action: NavbarNavigationAction,
|
|
810
|
+
Search: NavbarNavigationSearch,
|
|
811
|
+
};
|
|
812
|
+
|
|
813
|
+
var styles$8 = {
|
|
814
|
+
container: '',
|
|
815
|
+
};
|
|
816
|
+
|
|
817
|
+
var CardPaginationNavigation = function (props) {
|
|
818
|
+
var _a = props.min, min = _a === void 0 ? 1 : _a, _b = props.max, max = _b === void 0 ? 20 : _b, customStyles = props.styles, children = props.children, onChange = props.onChange;
|
|
819
|
+
var _c = useState(2), current = _c[0], setCurrent = _c[1];
|
|
820
|
+
var toClassName = useCallback(function () {
|
|
821
|
+
var values = [];
|
|
822
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
823
|
+
values[_i] = arguments[_i];
|
|
824
|
+
}
|
|
825
|
+
return values.filter(Boolean).join(' ');
|
|
826
|
+
}, []);
|
|
827
|
+
var style = useMemo(function () {
|
|
828
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
829
|
+
return ({
|
|
830
|
+
container: toClassName(styles$7.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
831
|
+
mobile: {
|
|
832
|
+
container: toClassName(styles$7.mobile.container, (_a = customStyles === null || customStyles === void 0 ? void 0 : customStyles.mobile) === null || _a === void 0 ? void 0 : _a.container),
|
|
833
|
+
button: toClassName(styles$7.mobile.button, (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.mobile) === null || _b === void 0 ? void 0 : _b.button),
|
|
834
|
+
},
|
|
835
|
+
desktop: {
|
|
836
|
+
container: toClassName(styles$7.desktop.container, (_c = customStyles === null || customStyles === void 0 ? void 0 : customStyles.desktop) === null || _c === void 0 ? void 0 : _c.container),
|
|
837
|
+
leftButton: toClassName(styles$7.desktop.leftButton, (_d = customStyles === null || customStyles === void 0 ? void 0 : customStyles.desktop) === null || _d === void 0 ? void 0 : _d.leftButton),
|
|
838
|
+
rightButton: toClassName(styles$7.desktop.rightButton, (_e = customStyles === null || customStyles === void 0 ? void 0 : customStyles.desktop) === null || _e === void 0 ? void 0 : _e.rightButton),
|
|
839
|
+
navigation: toClassName(styles$7.desktop.navigation, (_f = customStyles === null || customStyles === void 0 ? void 0 : customStyles.desktop) === null || _f === void 0 ? void 0 : _f.navigation),
|
|
840
|
+
},
|
|
841
|
+
button: {
|
|
842
|
+
default: toClassName(styles$7.button.default, (_g = customStyles === null || customStyles === void 0 ? void 0 : customStyles.button) === null || _g === void 0 ? void 0 : _g.default),
|
|
843
|
+
active: toClassName(styles$7.button.active, (_h = customStyles === null || customStyles === void 0 ? void 0 : customStyles.button) === null || _h === void 0 ? void 0 : _h.active),
|
|
844
|
+
disabled: toClassName(styles$7.button.disabled, (_j = customStyles === null || customStyles === void 0 ? void 0 : customStyles.button) === null || _j === void 0 ? void 0 : _j.disabled),
|
|
845
|
+
},
|
|
846
|
+
divider: toClassName(styles$7.divider, customStyles === null || customStyles === void 0 ? void 0 : customStyles.divider),
|
|
847
|
+
label: toClassName(styles$7.label, customStyles === null || customStyles === void 0 ? void 0 : customStyles.label),
|
|
848
|
+
icon: toClassName(styles$7.icon, customStyles === null || customStyles === void 0 ? void 0 : customStyles.icon),
|
|
849
|
+
});
|
|
850
|
+
}, []);
|
|
851
|
+
var pageType = useMemo(function () {
|
|
852
|
+
var result = 'center';
|
|
853
|
+
if (current < min + 3) {
|
|
854
|
+
result = 'first';
|
|
855
|
+
}
|
|
856
|
+
if (current > max - 3) {
|
|
857
|
+
result = 'last';
|
|
858
|
+
}
|
|
859
|
+
return result;
|
|
860
|
+
}, [current, min, max]);
|
|
861
|
+
var component;
|
|
862
|
+
switch (pageType) {
|
|
863
|
+
case 'first':
|
|
864
|
+
component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: toClassName(style.button.default, current === min && style.button.active), onClick: function () { return setCurrent(min); } }, { children: min })), jsx("button", __assign({ className: toClassName(style.button.default, current === min + 1 && style.button.active), onClick: function () { return setCurrent(min + 1); } }, { children: min + 1 })), jsx("button", __assign({ className: toClassName(style.button.default, current === min + 2 && style.button.active), onClick: function () { return setCurrent(min + 2); } }, { children: min + 2 })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(max); } }, { children: max }))] }));
|
|
865
|
+
break;
|
|
866
|
+
case 'center':
|
|
867
|
+
component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(min); } }, { children: min })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(current - 1); } }, { children: current - 1 })), jsx("button", __assign({ className: toClassName(style.button.default, style.button.active), onClick: function () { return setCurrent(current); } }, { children: current })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(current + 1); } }, { children: current + 1 })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(max); } }, { children: max }))] }));
|
|
868
|
+
break;
|
|
869
|
+
case 'last':
|
|
870
|
+
component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(min); } }, { children: min })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: toClassName(style.button.default, current === max - 2 && style.button.active), onClick: function () { return setCurrent(max - 2); } }, { children: max - 2 })), jsx("button", __assign({ className: toClassName(style.button.default, current === max - 1 && style.button.active), onClick: function () { return setCurrent(max - 1); } }, { children: max - 1 })), jsx("button", __assign({ className: toClassName(style.button.default, current === max && style.button.active), onClick: function () { return setCurrent(max); } }, { children: max }))] }));
|
|
871
|
+
break;
|
|
872
|
+
}
|
|
873
|
+
useEffect(function () {
|
|
874
|
+
if (current) {
|
|
875
|
+
onChange && onChange(current);
|
|
876
|
+
}
|
|
877
|
+
}, [onChange, current]);
|
|
878
|
+
return (jsxs("div", __assign({ className: style.container }, { children: [jsxs("div", __assign({ className: "flex flex-1 justify-between sm:hidden" }, { children: [jsx("button", __assign({ className: toClassName(style.mobile.button, current === min && style.button.disabled), disabled: current === min, onClick: function () { return setCurrent(current - 1); } }, { children: "Previous" })), jsx("button", __assign({ className: toClassName(style.mobile.button, current === max && style.button.disabled), disabled: current === max, onClick: function () { return setCurrent(current + 1); } }, { children: "Next" }))] })), jsxs("div", __assign({ className: style.desktop.container }, { children: [jsx("div", { children: jsx("p", __assign({ className: "text-sm text-gray-700" }, { children: children({ min: min, max: max, current: current }) })) }), jsx("div", { children: jsxs("nav", __assign({ className: style.desktop.navigation, "aria-label": "Pagination" }, { children: [jsxs("button", __assign({ className: toClassName(style.desktop.leftButton, current === min && style.button.disabled), disabled: current === min, onClick: function () { return setCurrent(current - 1); } }, { children: [jsx("span", __assign({ className: style.label }, { children: "Previous" })), jsx(ChevronLeftIcon, { className: style.icon, "aria-hidden": "true" })] })), component, jsxs("button", __assign({ className: toClassName(style.desktop.rightButton, current === max && style.button.disabled), disabled: current === max, onClick: function () { return setCurrent(current + 1); } }, { children: [jsx("span", __assign({ className: style.label }, { children: "Next" })), jsx(ChevronRightIcon, { className: style.icon, "aria-hidden": "true" })] }))] })) })] }))] })));
|
|
879
|
+
};
|
|
880
|
+
|
|
881
|
+
var styles$7 = {
|
|
882
|
+
container: 'flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6',
|
|
883
|
+
mobile: {
|
|
884
|
+
container: '',
|
|
885
|
+
button: 'relative inline-flex items-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-50',
|
|
886
|
+
},
|
|
887
|
+
desktop: {
|
|
888
|
+
container: 'hidden sm:flex sm:flex-1 sm:items-center sm:justify-between',
|
|
889
|
+
leftButton: 'relative inline-flex items-center rounded-l-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20',
|
|
890
|
+
rightButton: 'relative inline-flex items-center rounded-r-md border border-gray-300 bg-white px-2 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50 focus:z-20',
|
|
891
|
+
navigation: 'isolate inline-flex -space-x-px rounded-md shadow-sm',
|
|
892
|
+
},
|
|
893
|
+
button: {
|
|
894
|
+
default: 'relative inline-flex items-center border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500 hover:bg-gray-50',
|
|
895
|
+
active: 'border-indigo-500 bg-indigo-50 text-indigo-600 z-20',
|
|
896
|
+
disabled: 'opacity-20 cursor-not-allowed',
|
|
897
|
+
},
|
|
898
|
+
divider: 'relative inline-flex items-center border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-500',
|
|
899
|
+
label: 'sr-only',
|
|
900
|
+
icon: 'w-5 h-5',
|
|
901
|
+
};
|
|
902
|
+
|
|
903
|
+
var PagePaginationNavigation = function (props) {
|
|
904
|
+
var _a = props.min, min = _a === void 0 ? 1 : _a, _b = props.max, max = _b === void 0 ? 20 : _b, customStyles = props.styles, onChange = props.onChange;
|
|
905
|
+
var _c = useState(2), current = _c[0], setCurrent = _c[1];
|
|
906
|
+
var toClassName = useCallback(function () {
|
|
907
|
+
var values = [];
|
|
908
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
909
|
+
values[_i] = arguments[_i];
|
|
910
|
+
}
|
|
911
|
+
return values.filter(Boolean).join(' ');
|
|
912
|
+
}, []);
|
|
913
|
+
var style = useMemo(function () {
|
|
914
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
915
|
+
return ({
|
|
916
|
+
container: toClassName(styles$6.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
917
|
+
left: {
|
|
918
|
+
container: toClassName(styles$6.left.container, (_a = customStyles === null || customStyles === void 0 ? void 0 : customStyles.left) === null || _a === void 0 ? void 0 : _a.container),
|
|
919
|
+
button: toClassName(styles$6.left.button, (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.left) === null || _b === void 0 ? void 0 : _b.button),
|
|
920
|
+
icon: toClassName(styles$6.left.icon, (_c = customStyles === null || customStyles === void 0 ? void 0 : customStyles.left) === null || _c === void 0 ? void 0 : _c.icon),
|
|
921
|
+
},
|
|
922
|
+
center: {
|
|
923
|
+
container: toClassName(styles$6.center.container, (_d = customStyles === null || customStyles === void 0 ? void 0 : customStyles.center) === null || _d === void 0 ? void 0 : _d.container),
|
|
924
|
+
},
|
|
925
|
+
right: {
|
|
926
|
+
container: toClassName(styles$6.right.container, (_e = customStyles === null || customStyles === void 0 ? void 0 : customStyles.right) === null || _e === void 0 ? void 0 : _e.container),
|
|
927
|
+
button: toClassName(styles$6.right.button, (_f = customStyles === null || customStyles === void 0 ? void 0 : customStyles.right) === null || _f === void 0 ? void 0 : _f.button),
|
|
928
|
+
icon: toClassName(styles$6.right.icon, (_g = customStyles === null || customStyles === void 0 ? void 0 : customStyles.right) === null || _g === void 0 ? void 0 : _g.icon),
|
|
929
|
+
},
|
|
930
|
+
button: {
|
|
931
|
+
default: toClassName(styles$6.button.default, (_h = customStyles === null || customStyles === void 0 ? void 0 : customStyles.button) === null || _h === void 0 ? void 0 : _h.default),
|
|
932
|
+
active: toClassName(styles$6.button.active, (_j = customStyles === null || customStyles === void 0 ? void 0 : customStyles.button) === null || _j === void 0 ? void 0 : _j.active),
|
|
933
|
+
disabled: toClassName(styles$6.button.disabled, (_k = customStyles === null || customStyles === void 0 ? void 0 : customStyles.button) === null || _k === void 0 ? void 0 : _k.disabled),
|
|
934
|
+
},
|
|
935
|
+
divider: toClassName(styles$6.divider, customStyles === null || customStyles === void 0 ? void 0 : customStyles.divider),
|
|
936
|
+
});
|
|
937
|
+
}, []);
|
|
938
|
+
var pageType = useMemo(function () {
|
|
939
|
+
var result = 'center';
|
|
940
|
+
if (current < min + 3) {
|
|
941
|
+
result = 'first';
|
|
942
|
+
}
|
|
943
|
+
if (current > max - 3) {
|
|
944
|
+
result = 'last';
|
|
945
|
+
}
|
|
946
|
+
return result;
|
|
947
|
+
}, [current, min, max]);
|
|
948
|
+
var component;
|
|
949
|
+
switch (pageType) {
|
|
950
|
+
case 'first':
|
|
951
|
+
component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: toClassName(style.button.default, current === min && style.button.active), onClick: function () { return setCurrent(min); } }, { children: min })), jsx("button", __assign({ className: toClassName(style.button.default, current === min + 1 && style.button.active), onClick: function () { return setCurrent(min + 1); } }, { children: min + 1 })), jsx("button", __assign({ className: toClassName(style.button.default, current === min + 2 && style.button.active), onClick: function () { return setCurrent(min + 2); } }, { children: min + 2 })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(max); } }, { children: max }))] }));
|
|
952
|
+
break;
|
|
953
|
+
case 'center':
|
|
954
|
+
component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(min); } }, { children: min })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(current - 1); } }, { children: current - 1 })), jsx("button", __assign({ className: toClassName(style.button.default, style.button.active), onClick: function () { return setCurrent(current); } }, { children: current })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(current + 1); } }, { children: current + 1 })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(max); } }, { children: max }))] }));
|
|
955
|
+
break;
|
|
956
|
+
case 'last':
|
|
957
|
+
component = (jsxs(Fragment$1, { children: [jsx("button", __assign({ className: style.button.default, onClick: function () { return setCurrent(min); } }, { children: min })), jsx("span", __assign({ className: style.divider }, { children: "..." })), jsx("button", __assign({ className: toClassName(style.button.default, current === max - 2 && style.button.active), onClick: function () { return setCurrent(max - 2); } }, { children: max - 2 })), jsx("button", __assign({ className: toClassName(style.button.default, current === max - 1 && style.button.active), onClick: function () { return setCurrent(max - 1); } }, { children: max - 1 })), jsx("button", __assign({ className: toClassName(style.button.default, current === max && style.button.active), onClick: function () { return setCurrent(max); } }, { children: max }))] }));
|
|
958
|
+
break;
|
|
959
|
+
}
|
|
960
|
+
useEffect(function () {
|
|
961
|
+
if (current) {
|
|
962
|
+
onChange && onChange(current);
|
|
963
|
+
}
|
|
964
|
+
}, [onChange, current]);
|
|
965
|
+
return (jsxs("nav", __assign({ className: style.container }, { children: [jsx("div", __assign({ className: style.left.container }, { children: jsxs("button", __assign({ className: toClassName(style.left.button, current === min && style.button.disabled), disabled: current === min, onClick: function () { return setCurrent(current - 1); } }, { children: [jsx(ArrowLongLeftIcon, { className: style.left.icon }), "Previous"] })) })), jsx("div", __assign({ className: style.center.container }, { children: component })), jsx("div", __assign({ className: style.right.container }, { children: jsxs("button", __assign({ className: toClassName(style.right.button, current === max && style.button.disabled), disabled: current === max, onClick: function () { return setCurrent(current + 1); } }, { children: ["Next", jsx(ArrowLongRightIcon, { className: style.right.icon })] })) }))] })));
|
|
966
|
+
};
|
|
967
|
+
|
|
968
|
+
var styles$6 = {
|
|
969
|
+
container: 'flex items-center justify-between border-t border-gray-200 px-4 sm:px-0',
|
|
970
|
+
left: {
|
|
971
|
+
container: '-mt-px flex w-0 flex-1',
|
|
972
|
+
button: 'inline-flex items-center border-t-2 border-transparent pt-4 pr-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700',
|
|
973
|
+
icon: 'mr-3 h-5 w-5 text-gray-400',
|
|
974
|
+
},
|
|
975
|
+
center: {
|
|
976
|
+
container: 'hidden md:-mt-px md:flex',
|
|
977
|
+
},
|
|
978
|
+
right: {
|
|
979
|
+
container: '-mt-px flex w-0 flex-1 justify-end',
|
|
980
|
+
button: 'inline-flex items-center border-t-2 border-transparent pt-4 pr-1 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700',
|
|
981
|
+
icon: 'ml-3 h-5 w-5 text-gray-400',
|
|
982
|
+
},
|
|
983
|
+
button: {
|
|
984
|
+
default: 'inline-flex items-center border-t-2 border-transparent px-4 pt-4 text-sm font-medium text-gray-500 hover:border-gray-300 hover:text-gray-700',
|
|
985
|
+
active: 'border-indigo-500 text-indigo-600',
|
|
986
|
+
disabled: 'opacity-20 cursor-not-allowed',
|
|
987
|
+
},
|
|
988
|
+
divider: 'inline-flex items-center border-t-2 border-transparent px-4 pt-4 text-sm font-medium text-gray-500',
|
|
989
|
+
};
|
|
990
|
+
|
|
991
|
+
var Pagination = {
|
|
992
|
+
Card: CardPaginationNavigation,
|
|
993
|
+
Page: PagePaginationNavigation,
|
|
994
|
+
};
|
|
995
|
+
|
|
996
|
+
var Container$2 = function (props) {
|
|
997
|
+
var children = props.children, customStyles = props.styles;
|
|
998
|
+
var _a = useState(''), active = _a[0], setActive = _a[1];
|
|
999
|
+
var toClassName = useCallback(function () {
|
|
1000
|
+
var values = [];
|
|
1001
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1002
|
+
values[_i] = arguments[_i];
|
|
1003
|
+
}
|
|
1004
|
+
return values.filter(Boolean).join(' ');
|
|
1005
|
+
}, []);
|
|
1006
|
+
var style = useMemo(function () { return ({
|
|
1007
|
+
root: toClassName(styles$5.root, customStyles === null || customStyles === void 0 ? void 0 : customStyles.root),
|
|
1008
|
+
panel: toClassName(styles$5.panel, customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel),
|
|
1009
|
+
container: toClassName(styles$5.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
1010
|
+
content: toClassName(styles$5.content, customStyles === null || customStyles === void 0 ? void 0 : customStyles.content),
|
|
1011
|
+
}); }, []);
|
|
1012
|
+
return (jsx("div", __assign({ className: style.root, style: { maxWidth: '22rem' } }, { children: jsxs("div", __assign({ className: style.panel }, { children: [jsx("div", __assign({ className: style.container }, { children: jsx("div", __assign({ className: style.content }, { children: jsx("img", { className: "h-8 w-auto", src: "https://tailwindui.com/img/logos/mark.svg?color=indigo&shade=600", alt: "Logo" }) })) })), children({ active: active, setActive: setActive })] })) })));
|
|
1013
|
+
};
|
|
1014
|
+
var List$2 = function (props) {
|
|
1015
|
+
var children = props.children, setActive = props.setActive, customStyles = props.styles;
|
|
1016
|
+
var toClassName = useCallback(function () {
|
|
1017
|
+
var values = [];
|
|
1018
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1019
|
+
values[_i] = arguments[_i];
|
|
1020
|
+
}
|
|
1021
|
+
return values.filter(Boolean).join(' ');
|
|
1022
|
+
}, []);
|
|
1023
|
+
useEffect(function () {
|
|
1024
|
+
var _a, _b;
|
|
1025
|
+
var tab = (_a = Children.map(children, function (child) { return child; })) === null || _a === void 0 ? void 0 : _a[0];
|
|
1026
|
+
var initialTab = (_b = Children.map(children, function (child) { return child; })) === null || _b === void 0 ? void 0 : _b.find(function (tab) { return tab.props.isInitial; });
|
|
1027
|
+
if (initialTab !== undefined) {
|
|
1028
|
+
tab = initialTab;
|
|
1029
|
+
}
|
|
1030
|
+
setActive && setActive(tab === null || tab === void 0 ? void 0 : tab.props.accessor);
|
|
1031
|
+
}, []);
|
|
1032
|
+
return (jsx("nav", __assign({ className: toClassName(styles$5.list, customStyles === null || customStyles === void 0 ? void 0 : customStyles.list) }, { children: children })));
|
|
1033
|
+
};
|
|
1034
|
+
var Item$2 = function (props) {
|
|
1035
|
+
var children = props.children, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick;
|
|
1036
|
+
var toClassName = useCallback(function () {
|
|
1037
|
+
var values = [];
|
|
1038
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1039
|
+
values[_i] = arguments[_i];
|
|
1040
|
+
}
|
|
1041
|
+
return values.filter(Boolean).join(' ');
|
|
1042
|
+
}, []);
|
|
1043
|
+
return (jsx("a", __assign({ href: href, className: toClassName(isCurrent
|
|
1044
|
+
? styles$5.item.active
|
|
1045
|
+
: styles$5.item.notActive, styles$5 === null || styles$5 === void 0 ? void 0 : styles$5.item.base), onClick: onClick }, { children: children })));
|
|
1046
|
+
};
|
|
1047
|
+
var Footer = function (props) {
|
|
1048
|
+
var children = props.children;
|
|
1049
|
+
return jsx("div", __assign({ className: "flex border-t border-gray-200 p-4" }, { children: children }));
|
|
1050
|
+
};
|
|
1051
|
+
var SidebarNavigation = {
|
|
1052
|
+
Container: Container$2,
|
|
1053
|
+
List: List$2,
|
|
1054
|
+
Item: Item$2,
|
|
1055
|
+
Footer: Footer,
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1058
|
+
var styles$5 = {
|
|
1059
|
+
root: 'z-10 fixed top-0 left-0 bottom-0 bg-red-50 sm:w-1/6',
|
|
1060
|
+
panel: 'flex min-h-0 flex-1 flex-col border-r border-gray-200 bg-white h-full pt-16',
|
|
1061
|
+
container: 'flex flex-col overflow-y-auto pt-5 pb-4',
|
|
1062
|
+
content: 'flex flex-shrink-0 items-center px-4',
|
|
1063
|
+
list: 'mt-5 flex-1 space-y-1 bg-white px-2 ',
|
|
1064
|
+
item: {
|
|
1065
|
+
base: 'group flex items-center px-2 py-2 text-sm font-medium rounded-md cursor-pointer',
|
|
1066
|
+
active: 'bg-gray-100 text-gray-900 hover:text-gray-900 hover:bg-gray-100',
|
|
1067
|
+
notActive: 'text-gray-600 hover:text-gray-900 hover:bg-gray-50',
|
|
1068
|
+
},
|
|
1069
|
+
};
|
|
1070
|
+
|
|
1071
|
+
var Container$1 = function (props) {
|
|
1072
|
+
var children = props.children, customStyles = props.styles;
|
|
1073
|
+
var _a = useState(''), active = _a[0], setActive = _a[1];
|
|
1074
|
+
return (jsx("div", __assign({ className: customStyles === null || customStyles === void 0 ? void 0 : customStyles.container }, { children: children({ active: active, setActive: setActive }) })));
|
|
1075
|
+
};
|
|
1076
|
+
var List$1 = function (props) {
|
|
1077
|
+
var children = props.children, active = props.active, setActive = props.setActive, customStyles = props.styles;
|
|
1078
|
+
var handleChangeSelect = useCallback(function (e) {
|
|
1079
|
+
var _a;
|
|
1080
|
+
var key = e.currentTarget.value;
|
|
1081
|
+
var tab = (_a = Children.map(children, function (child) { return child; })) === null || _a === void 0 ? void 0 : _a.find(function (child) { return child.props.accessor === key; });
|
|
1082
|
+
if (tab === null || tab === void 0 ? void 0 : tab.props.href) {
|
|
1083
|
+
window.location.href = tab.props.href;
|
|
1084
|
+
}
|
|
1085
|
+
else if (tab === null || tab === void 0 ? void 0 : tab.props.onClick) {
|
|
1086
|
+
setActive && setActive(tab === null || tab === void 0 ? void 0 : tab.props.accessor);
|
|
1087
|
+
}
|
|
1088
|
+
}, []);
|
|
1089
|
+
var toClassName = useCallback(function () {
|
|
1090
|
+
var values = [];
|
|
1091
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1092
|
+
values[_i] = arguments[_i];
|
|
1093
|
+
}
|
|
1094
|
+
return values.filter(Boolean).join(' ');
|
|
1095
|
+
}, []);
|
|
1096
|
+
useEffect(function () {
|
|
1097
|
+
var _a, _b;
|
|
1098
|
+
var tab = (_a = Children.map(children, function (child) { return child; })) === null || _a === void 0 ? void 0 : _a[0];
|
|
1099
|
+
var initialTab = (_b = Children.map(children, function (child) { return child; })) === null || _b === void 0 ? void 0 : _b.find(function (tab) { return tab.props.isInitial; });
|
|
1100
|
+
if (initialTab !== undefined) {
|
|
1101
|
+
tab = initialTab;
|
|
1102
|
+
}
|
|
1103
|
+
setActive && setActive(tab === null || tab === void 0 ? void 0 : tab.props.accessor);
|
|
1104
|
+
}, []);
|
|
1105
|
+
return (jsxs(Fragment$1, { children: [jsxs("div", __assign({ className: "sm:hidden" }, { children: [jsx("label", __assign({ htmlFor: "tabs", className: "sr-only" }, { children: "Select a tab" })), jsx("select", __assign({ id: "tabs", name: "tabs", value: active, className: toClassName(styles$4.select, customStyles === null || customStyles === void 0 ? void 0 : customStyles.select), onChange: handleChangeSelect }, { children: Children.map(children, function (child) {
|
|
1106
|
+
var _a;
|
|
1107
|
+
return (jsx("option", __assign({ value: child.props.accessor }, { children: child.props.children }), (_a = child === null || child === void 0 ? void 0 : child.props) === null || _a === void 0 ? void 0 : _a.accessor));
|
|
1108
|
+
}) }))] })), jsx("div", __assign({ className: "hidden sm:block" }, { children: jsx("nav", __assign({ className: toClassName(styles$4.navigation, customStyles === null || customStyles === void 0 ? void 0 : customStyles.navigation) }, { children: children })) }))] }));
|
|
1109
|
+
};
|
|
1110
|
+
var Item$1 = function (props) {
|
|
1111
|
+
var children = props.children, _a = props.type, type = _a === void 0 ? 'underline' : _a, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick;
|
|
1112
|
+
var toClassName = useCallback(function () {
|
|
1113
|
+
var values = [];
|
|
1114
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1115
|
+
values[_i] = arguments[_i];
|
|
1116
|
+
}
|
|
1117
|
+
return values.filter(Boolean).join(' ');
|
|
1118
|
+
}, []);
|
|
1119
|
+
return (jsx("a", __assign({ href: href, className: toClassName(isCurrent
|
|
1120
|
+
? styles$4.tab[type].active
|
|
1121
|
+
: styles$4.tab[type].notActive, styles$4.tab[type].base), onClick: onClick }, { children: children })));
|
|
1122
|
+
};
|
|
1123
|
+
var View$1 = function (props) {
|
|
1124
|
+
var children = props.children;
|
|
1125
|
+
return jsx(Fragment$1, { children: children });
|
|
1126
|
+
};
|
|
1127
|
+
var TabNavigation = {
|
|
1128
|
+
Container: Container$1,
|
|
1129
|
+
List: List$1,
|
|
1130
|
+
Item: Item$1,
|
|
1131
|
+
View: View$1,
|
|
1132
|
+
};
|
|
1133
|
+
|
|
1134
|
+
var styles$4 = {
|
|
1135
|
+
container: '',
|
|
1136
|
+
select: 'block w-full rounded-md border border-gray-300 py-2 px-3 text-base focus:border-indigo-500 focus:outline-none focus:ring-indigo-500 sm:text-sm',
|
|
1137
|
+
navigation: 'border-b border-gray-200 -mb-px flex space-x-8',
|
|
1138
|
+
tab: {
|
|
1139
|
+
underline: {
|
|
1140
|
+
base: 'whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm cursor-pointer',
|
|
1141
|
+
active: 'border-indigo-500 text-indigo-600',
|
|
1142
|
+
notActive: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300',
|
|
1143
|
+
},
|
|
1144
|
+
pills: {
|
|
1145
|
+
base: 'px-3 py-2 font-medium text-sm rounded-md cursor-pointer',
|
|
1146
|
+
active: 'bg-gray-100 text-gray-700',
|
|
1147
|
+
notActive: 'text-gray-500 hover:text-gray-700',
|
|
1148
|
+
},
|
|
1149
|
+
buttons: {
|
|
1150
|
+
base: 'whitespace-nowrap py-4 px-1 border-b-2 font-medium text-sm cursor-pointer',
|
|
1151
|
+
active: 'border-indigo-500 text-indigo-600',
|
|
1152
|
+
notActive: 'border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300',
|
|
1153
|
+
},
|
|
1154
|
+
},
|
|
1155
|
+
};
|
|
1156
|
+
|
|
1157
|
+
var Container = function (props) {
|
|
1158
|
+
var children = props.children, customStyles = props.styles;
|
|
1159
|
+
var _a = useState(''), active = _a[0], setActive = _a[1];
|
|
1160
|
+
return (jsx("div", __assign({ className: customStyles === null || customStyles === void 0 ? void 0 : customStyles.container }, { children: children({ active: active, setActive: setActive }) })));
|
|
1161
|
+
};
|
|
1162
|
+
var List = function (props) {
|
|
1163
|
+
var children = props.children, setActive = props.setActive, customStyles = props.styles;
|
|
1164
|
+
var toClassName = useCallback(function () {
|
|
1165
|
+
var values = [];
|
|
1166
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1167
|
+
values[_i] = arguments[_i];
|
|
1168
|
+
}
|
|
1169
|
+
return values.filter(Boolean).join(' ');
|
|
1170
|
+
}, []);
|
|
1171
|
+
useEffect(function () {
|
|
1172
|
+
var _a, _b;
|
|
1173
|
+
var tab = (_a = Children.map(children, function (child) { return child; })) === null || _a === void 0 ? void 0 : _a[0];
|
|
1174
|
+
var initialTab = (_b = Children.map(children, function (child) { return child; })) === null || _b === void 0 ? void 0 : _b.find(function (tab) { return tab.props.isInitial; });
|
|
1175
|
+
if (initialTab !== undefined) {
|
|
1176
|
+
tab = initialTab;
|
|
1177
|
+
}
|
|
1178
|
+
setActive && setActive(tab === null || tab === void 0 ? void 0 : tab.props.accessor);
|
|
1179
|
+
}, []);
|
|
1180
|
+
return (jsx("nav", __assign({ className: toClassName(styles$3.list, customStyles === null || customStyles === void 0 ? void 0 : customStyles.list) }, { children: children })));
|
|
1181
|
+
};
|
|
1182
|
+
var Item = function (props) {
|
|
1183
|
+
var children = props.children, href = props.href, isCurrent = props.isCurrent, onClick = props.onClick;
|
|
1184
|
+
var toClassName = useCallback(function () {
|
|
1185
|
+
var values = [];
|
|
1186
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1187
|
+
values[_i] = arguments[_i];
|
|
1188
|
+
}
|
|
1189
|
+
return values.filter(Boolean).join(' ');
|
|
1190
|
+
}, []);
|
|
1191
|
+
return (jsx("a", __assign({ href: href, className: toClassName(isCurrent
|
|
1192
|
+
? styles$3.item.active
|
|
1193
|
+
: styles$3.item.notActive, styles$3 === null || styles$3 === void 0 ? void 0 : styles$3.item.base), onClick: onClick }, { children: children })));
|
|
1194
|
+
};
|
|
1195
|
+
var View = function (props) {
|
|
1196
|
+
var children = props.children;
|
|
1197
|
+
return jsx(Fragment$1, { children: children });
|
|
1198
|
+
};
|
|
1199
|
+
var VerticalNavigation = {
|
|
1200
|
+
Container: Container,
|
|
1201
|
+
List: List,
|
|
1202
|
+
Item: Item,
|
|
1203
|
+
View: View,
|
|
1204
|
+
};
|
|
1205
|
+
|
|
1206
|
+
var styles$3 = {
|
|
1207
|
+
container: '',
|
|
1208
|
+
list: 'space-y-1',
|
|
1209
|
+
item: {
|
|
1210
|
+
base: 'flex items-center px-3 py-2 text-sm font-medium rounded-md cursor-pointer',
|
|
1211
|
+
active: 'bg-gray-100 text-gray-900',
|
|
1212
|
+
notActive: 'text-gray-600 hover:bg-gray-50 hover:text-gray-900',
|
|
1213
|
+
},
|
|
1214
|
+
};
|
|
1215
|
+
|
|
1216
|
+
var Navigation = {
|
|
1217
|
+
Navbar: NavbarNavigation,
|
|
1218
|
+
Pagination: Pagination,
|
|
1219
|
+
Sidebar: SidebarNavigation,
|
|
1220
|
+
Tab: TabNavigation,
|
|
1221
|
+
Vertical: VerticalNavigation,
|
|
1222
|
+
};
|
|
1223
|
+
|
|
1224
|
+
var ModalOverlay = function (props) {
|
|
1225
|
+
var children = props.children, trigger = props.trigger, _a = props.size, size = _a === void 0 ? 'md' : _a, customStyles = props.styles;
|
|
1226
|
+
var _b = useState(trigger ? false : true), isOpen = _b[0], setIsOpen = _b[1];
|
|
1227
|
+
var options = useMemo(function () { return ({
|
|
1228
|
+
onOpen: function () { return setIsOpen(true); },
|
|
1229
|
+
onClose: function () { return setIsOpen(false); },
|
|
1230
|
+
}); }, []);
|
|
1231
|
+
var toClassName = useCallback(function () {
|
|
1232
|
+
var values = [];
|
|
1233
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1234
|
+
values[_i] = arguments[_i];
|
|
1235
|
+
}
|
|
1236
|
+
return values.filter(Boolean).join(' ');
|
|
1237
|
+
}, []);
|
|
1238
|
+
var style = useMemo(function () {
|
|
1239
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3;
|
|
1240
|
+
return ({
|
|
1241
|
+
container: toClassName(styles$2.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
1242
|
+
background: {
|
|
1243
|
+
container: toClassName(styles$2.background.container, (_a = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _a === void 0 ? void 0 : _a.container),
|
|
1244
|
+
transition: {
|
|
1245
|
+
enter: toClassName(styles$2.background.transition.enter, (_c = (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _b === void 0 ? void 0 : _b.transition) === null || _c === void 0 ? void 0 : _c.enter),
|
|
1246
|
+
enterFrom: toClassName(styles$2.background.transition.enterFrom, (_e = (_d = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _d === void 0 ? void 0 : _d.transition) === null || _e === void 0 ? void 0 : _e.enterFrom),
|
|
1247
|
+
enterTo: toClassName(styles$2.background.transition.enterTo, (_g = (_f = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _f === void 0 ? void 0 : _f.transition) === null || _g === void 0 ? void 0 : _g.enterTo),
|
|
1248
|
+
leave: toClassName(styles$2.background.transition.leave, (_j = (_h = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _h === void 0 ? void 0 : _h.transition) === null || _j === void 0 ? void 0 : _j.leave),
|
|
1249
|
+
leaveFrom: toClassName(styles$2.background.transition.leaveFrom, (_l = (_k = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _k === void 0 ? void 0 : _k.transition) === null || _l === void 0 ? void 0 : _l.leaveFrom),
|
|
1250
|
+
leaveTo: toClassName(styles$2.background.transition.leaveTo, (_o = (_m = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _m === void 0 ? void 0 : _m.transition) === null || _o === void 0 ? void 0 : _o.leaveTo),
|
|
1251
|
+
},
|
|
1252
|
+
},
|
|
1253
|
+
layout: {
|
|
1254
|
+
container: toClassName(styles$2.layout.container, (_p = customStyles === null || customStyles === void 0 ? void 0 : customStyles.layout) === null || _p === void 0 ? void 0 : _p.container),
|
|
1255
|
+
content: toClassName(styles$2.layout.content, (_q = customStyles === null || customStyles === void 0 ? void 0 : customStyles.layout) === null || _q === void 0 ? void 0 : _q.content),
|
|
1256
|
+
},
|
|
1257
|
+
panel: {
|
|
1258
|
+
container: toClassName(styles$2.panel.container, size && styles$2[size], (_r = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _r === void 0 ? void 0 : _r.container),
|
|
1259
|
+
transition: {
|
|
1260
|
+
enter: toClassName(styles$2.panel.transition.enter, (_t = (_s = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _s === void 0 ? void 0 : _s.transition) === null || _t === void 0 ? void 0 : _t.enter),
|
|
1261
|
+
enterFrom: toClassName(styles$2.panel.transition.enterFrom, (_v = (_u = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _u === void 0 ? void 0 : _u.transition) === null || _v === void 0 ? void 0 : _v.enterFrom),
|
|
1262
|
+
enterTo: toClassName(styles$2.panel.transition.enterTo, (_x = (_w = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _w === void 0 ? void 0 : _w.transition) === null || _x === void 0 ? void 0 : _x.enterTo),
|
|
1263
|
+
leave: toClassName(styles$2.panel.transition.leave, (_z = (_y = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _y === void 0 ? void 0 : _y.transition) === null || _z === void 0 ? void 0 : _z.leave),
|
|
1264
|
+
leaveFrom: toClassName(styles$2.panel.transition.leaveFrom, (_1 = (_0 = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _0 === void 0 ? void 0 : _0.transition) === null || _1 === void 0 ? void 0 : _1.leaveFrom),
|
|
1265
|
+
leaveTo: toClassName(styles$2.panel.transition.leaveTo, (_3 = (_2 = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _2 === void 0 ? void 0 : _2.transition) === null || _3 === void 0 ? void 0 : _3.leaveTo),
|
|
1266
|
+
},
|
|
1267
|
+
},
|
|
1268
|
+
});
|
|
1269
|
+
}, []);
|
|
1270
|
+
return (jsxs(Fragment$1, { children: [jsx(Transition.Root, __assign({ show: isOpen, as: Fragment }, { children: jsxs(Dialog, __assign({ as: "div", className: style.container, onClose: setIsOpen }, { children: [jsx(Transition.Child, __assign({ as: Fragment, enter: style.background.transition.enter, enterFrom: style.background.transition.enterFrom, enterTo: style.background.transition.enterTo, leave: style.background.transition.leave, leaveFrom: style.background.transition.leaveFrom, leaveTo: style.background.transition.leaveTo }, { children: jsx("div", { className: style.background.container }) })), jsx("div", __assign({ className: style.layout.container }, { children: jsx("div", __assign({ className: style.layout.content }, { children: jsx(Transition.Child, __assign({ as: Fragment, enter: style.panel.transition.enter, enterFrom: style.panel.transition.enterFrom, enterTo: style.panel.transition.enterTo, leave: style.panel.transition.leave, leaveFrom: style.panel.transition.leaveFrom, leaveTo: style.panel.transition.leaveTo }, { children: jsx(Dialog.Panel, __assign({ className: style.panel.container }, { children: children(options) })) })) })) }))] })) })), trigger && trigger(options)] }));
|
|
1271
|
+
};
|
|
1272
|
+
|
|
1273
|
+
var styles$2 = {
|
|
1274
|
+
container: 'relative z-20',
|
|
1275
|
+
background: {
|
|
1276
|
+
container: 'fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity',
|
|
1277
|
+
transition: {
|
|
1278
|
+
enter: 'ease-out duration-300',
|
|
1279
|
+
enterFrom: 'opacity-0',
|
|
1280
|
+
enterTo: 'opacity-100',
|
|
1281
|
+
leave: 'ease-in duration-200',
|
|
1282
|
+
leaveFrom: 'opacity-100',
|
|
1283
|
+
leaveTo: 'opacity-0',
|
|
1284
|
+
},
|
|
1285
|
+
},
|
|
1286
|
+
layout: {
|
|
1287
|
+
container: 'fixed inset-0 z-10 overflow-y-auto',
|
|
1288
|
+
content: 'flex min-h-full items-end justify-center p-4 text-center sm:items-center sm:p-0',
|
|
1289
|
+
},
|
|
1290
|
+
panel: {
|
|
1291
|
+
container: 'relative transform overflow-hidden rounded-lg bg-white w-full shadow-xl transition-all sm:w-full text-left',
|
|
1292
|
+
transition: {
|
|
1293
|
+
enter: 'ease-out duration-300',
|
|
1294
|
+
enterFrom: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
|
|
1295
|
+
enterTo: 'opacity-100 translate-y-0 sm:scale-100',
|
|
1296
|
+
leave: 'ease-in duration-200',
|
|
1297
|
+
leaveFrom: 'opacity-100 translate-y-0 sm:scale-100',
|
|
1298
|
+
leaveTo: 'opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95',
|
|
1299
|
+
},
|
|
1300
|
+
},
|
|
1301
|
+
xs: 'sm:max-w-xs',
|
|
1302
|
+
sm: 'sm:max-w-sm',
|
|
1303
|
+
md: 'sm:max-w-md',
|
|
1304
|
+
lg: 'sm:max-w-2xl',
|
|
1305
|
+
xl: 'sm:max-w-4xl',
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1308
|
+
var NotificationOverlayContainer = function (_a) {
|
|
1309
|
+
var children = _a.children, customStyles = _a.styles;
|
|
1310
|
+
var toClassName = useCallback(function () {
|
|
1311
|
+
var values = [];
|
|
1312
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1313
|
+
values[_i] = arguments[_i];
|
|
1314
|
+
}
|
|
1315
|
+
return values.filter(Boolean).join(' ');
|
|
1316
|
+
}, []);
|
|
1317
|
+
var style = useMemo(function () {
|
|
1318
|
+
var _a, _b;
|
|
1319
|
+
return ({
|
|
1320
|
+
outer: toClassName(styles$1.container.outer, (_a = customStyles === null || customStyles === void 0 ? void 0 : customStyles.container) === null || _a === void 0 ? void 0 : _a.outer),
|
|
1321
|
+
inner: toClassName(styles$1.container.inner, (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.container) === null || _b === void 0 ? void 0 : _b.inner),
|
|
1322
|
+
});
|
|
1323
|
+
}, []);
|
|
1324
|
+
return (jsx("div", __assign({ "aria-live": "assertive", className: style.outer }, { children: jsx("div", __assign({ className: style.inner }, { children: children })) })));
|
|
1325
|
+
};
|
|
1326
|
+
var NotificationOverlayItem = function (props) {
|
|
1327
|
+
var children = props.children, trigger = props.trigger, _a = props.size, size = _a === void 0 ? 'md' : _a, customStyles = props.styles;
|
|
1328
|
+
var _b = useState(trigger ? false : true), isOpen = _b[0], setIsOpen = _b[1];
|
|
1329
|
+
var options = useMemo(function () { return ({
|
|
1330
|
+
onOpen: function () { return setIsOpen(true); },
|
|
1331
|
+
onClose: function () { return setIsOpen(false); },
|
|
1332
|
+
}); }, []);
|
|
1333
|
+
var toClassName = useCallback(function () {
|
|
1334
|
+
var values = [];
|
|
1335
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1336
|
+
values[_i] = arguments[_i];
|
|
1337
|
+
}
|
|
1338
|
+
return values.filter(Boolean).join(' ');
|
|
1339
|
+
}, []);
|
|
1340
|
+
var style = useMemo(function () {
|
|
1341
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2;
|
|
1342
|
+
return ({
|
|
1343
|
+
container: toClassName(styles$1.item.container, (_a = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _a === void 0 ? void 0 : _a.container),
|
|
1344
|
+
layout: {
|
|
1345
|
+
container: toClassName(styles$1.item.layout.container, (_c = (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _b === void 0 ? void 0 : _b.layout) === null || _c === void 0 ? void 0 : _c.container),
|
|
1346
|
+
content: toClassName(styles$1.item.layout.content, (_e = (_d = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _d === void 0 ? void 0 : _d.layout) === null || _e === void 0 ? void 0 : _e.content),
|
|
1347
|
+
inner: toClassName(styles$1.item.layout.inner, (_g = (_f = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _f === void 0 ? void 0 : _f.layout) === null || _g === void 0 ? void 0 : _g.inner),
|
|
1348
|
+
},
|
|
1349
|
+
panel: {
|
|
1350
|
+
container: toClassName(styles$1.item.panel.container, size && styles$1[size], (_j = (_h = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _h === void 0 ? void 0 : _h.panel) === null || _j === void 0 ? void 0 : _j.container),
|
|
1351
|
+
transition: {
|
|
1352
|
+
enter: toClassName(styles$1.item.panel.transition.enter, (_m = (_l = (_k = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _k === void 0 ? void 0 : _k.panel) === null || _l === void 0 ? void 0 : _l.transition) === null || _m === void 0 ? void 0 : _m.enter),
|
|
1353
|
+
enterFrom: toClassName(styles$1.item.panel.transition.enterFrom, (_q = (_p = (_o = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _o === void 0 ? void 0 : _o.panel) === null || _p === void 0 ? void 0 : _p.transition) === null || _q === void 0 ? void 0 : _q.enterFrom),
|
|
1354
|
+
enterTo: toClassName(styles$1.item.panel.transition.enterTo, (_t = (_s = (_r = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _r === void 0 ? void 0 : _r.panel) === null || _s === void 0 ? void 0 : _s.transition) === null || _t === void 0 ? void 0 : _t.enterTo),
|
|
1355
|
+
leave: toClassName(styles$1.item.panel.transition.leave, (_w = (_v = (_u = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _u === void 0 ? void 0 : _u.panel) === null || _v === void 0 ? void 0 : _v.transition) === null || _w === void 0 ? void 0 : _w.leave),
|
|
1356
|
+
leaveFrom: toClassName(styles$1.item.panel.transition.leaveFrom, (_z = (_y = (_x = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _x === void 0 ? void 0 : _x.panel) === null || _y === void 0 ? void 0 : _y.transition) === null || _z === void 0 ? void 0 : _z.leaveFrom),
|
|
1357
|
+
leaveTo: toClassName(styles$1.item.panel.transition.leaveTo, (_2 = (_1 = (_0 = customStyles === null || customStyles === void 0 ? void 0 : customStyles.item) === null || _0 === void 0 ? void 0 : _0.panel) === null || _1 === void 0 ? void 0 : _1.transition) === null || _2 === void 0 ? void 0 : _2.leaveTo),
|
|
1358
|
+
},
|
|
1359
|
+
},
|
|
1360
|
+
});
|
|
1361
|
+
}, []);
|
|
1362
|
+
return (jsxs(Fragment$1, { children: [jsx(Transition, __assign({ show: isOpen, as: Fragment, enter: style.panel.transition.enter, enterFrom: style.panel.transition.enterFrom, enterTo: style.panel.transition.enterTo, leave: style.panel.transition.leave, leaveFrom: style.panel.transition.leaveFrom, leaveTo: style.panel.transition.leaveTo }, { children: jsx("div", __assign({ className: style.panel.container }, { children: children(options) })) })), trigger && trigger(options)] }));
|
|
1363
|
+
};
|
|
1364
|
+
var Notification = {
|
|
1365
|
+
Container: NotificationOverlayContainer,
|
|
1366
|
+
Item: NotificationOverlayItem,
|
|
1367
|
+
};
|
|
1368
|
+
|
|
1369
|
+
var styles$1 = {
|
|
1370
|
+
container: {
|
|
1371
|
+
outer: 'pointer-events-none fixed inset-0 flex items-end px-4 py-6 sm:items-start sm:p-6 z-20',
|
|
1372
|
+
inner: 'flex w-full flex-col items-center space-y-4 sm:items-end',
|
|
1373
|
+
},
|
|
1374
|
+
item: {
|
|
1375
|
+
container: 'relative',
|
|
1376
|
+
layout: {
|
|
1377
|
+
container: 'fixed inset-0 overflow-hidden',
|
|
1378
|
+
content: 'absolute inset-0 overflow-hidden',
|
|
1379
|
+
inner: 'pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10',
|
|
1380
|
+
},
|
|
1381
|
+
panel: {
|
|
1382
|
+
container: 'pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg bg-white shadow-lg ring-1 ring-black ring-opacity-5',
|
|
1383
|
+
transition: {
|
|
1384
|
+
enter: 'transform ease-out duration-300 transition',
|
|
1385
|
+
enterFrom: 'translate-y-2 opacity-0 sm:translate-y-0 sm:translate-x-2',
|
|
1386
|
+
enterTo: 'translate-y-0 opacity-100 sm:translate-x-0',
|
|
1387
|
+
leave: 'transition ease-in duration-100',
|
|
1388
|
+
leaveFrom: 'opacity-100',
|
|
1389
|
+
leaveTo: 'opacity-0',
|
|
1390
|
+
},
|
|
1391
|
+
},
|
|
1392
|
+
},
|
|
1393
|
+
xs: 'max-w-xs',
|
|
1394
|
+
sm: 'max-w-sm',
|
|
1395
|
+
md: 'max-w-md',
|
|
1396
|
+
lg: 'max-w-2xl',
|
|
1397
|
+
xl: 'max-w-4xl',
|
|
1398
|
+
};
|
|
1399
|
+
|
|
1400
|
+
var SlideOverOverlay = function (props) {
|
|
1401
|
+
var children = props.children, trigger = props.trigger, _a = props.size, size = _a === void 0 ? 'md' : _a, customStyles = props.styles;
|
|
1402
|
+
var _b = useState(trigger ? false : true), isOpen = _b[0], setIsOpen = _b[1];
|
|
1403
|
+
var options = useMemo(function () { return ({
|
|
1404
|
+
onOpen: function () { return setIsOpen(true); },
|
|
1405
|
+
onClose: function () { return setIsOpen(false); },
|
|
1406
|
+
}); }, []);
|
|
1407
|
+
var toClassName = useCallback(function () {
|
|
1408
|
+
var values = [];
|
|
1409
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
1410
|
+
values[_i] = arguments[_i];
|
|
1411
|
+
}
|
|
1412
|
+
return values.filter(Boolean).join(' ');
|
|
1413
|
+
}, []);
|
|
1414
|
+
var style = useMemo(function () {
|
|
1415
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4;
|
|
1416
|
+
return ({
|
|
1417
|
+
container: toClassName(styles.container, customStyles === null || customStyles === void 0 ? void 0 : customStyles.container),
|
|
1418
|
+
background: {
|
|
1419
|
+
container: toClassName(styles.background.container, (_a = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _a === void 0 ? void 0 : _a.container),
|
|
1420
|
+
transition: {
|
|
1421
|
+
enter: toClassName(styles.background.transition.enter, (_c = (_b = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _b === void 0 ? void 0 : _b.transition) === null || _c === void 0 ? void 0 : _c.enter),
|
|
1422
|
+
enterFrom: toClassName(styles.background.transition.enterFrom, (_e = (_d = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _d === void 0 ? void 0 : _d.transition) === null || _e === void 0 ? void 0 : _e.enterFrom),
|
|
1423
|
+
enterTo: toClassName(styles.background.transition.enterTo, (_g = (_f = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _f === void 0 ? void 0 : _f.transition) === null || _g === void 0 ? void 0 : _g.enterTo),
|
|
1424
|
+
leave: toClassName(styles.background.transition.leave, (_j = (_h = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _h === void 0 ? void 0 : _h.transition) === null || _j === void 0 ? void 0 : _j.leave),
|
|
1425
|
+
leaveFrom: toClassName(styles.background.transition.leaveFrom, (_l = (_k = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _k === void 0 ? void 0 : _k.transition) === null || _l === void 0 ? void 0 : _l.leaveFrom),
|
|
1426
|
+
leaveTo: toClassName(styles.background.transition.leaveTo, (_o = (_m = customStyles === null || customStyles === void 0 ? void 0 : customStyles.background) === null || _m === void 0 ? void 0 : _m.transition) === null || _o === void 0 ? void 0 : _o.leaveTo),
|
|
1427
|
+
},
|
|
1428
|
+
},
|
|
1429
|
+
layout: {
|
|
1430
|
+
container: toClassName(styles.layout.container, (_p = customStyles === null || customStyles === void 0 ? void 0 : customStyles.layout) === null || _p === void 0 ? void 0 : _p.container),
|
|
1431
|
+
content: toClassName(styles.layout.content, (_q = customStyles === null || customStyles === void 0 ? void 0 : customStyles.layout) === null || _q === void 0 ? void 0 : _q.content),
|
|
1432
|
+
inner: toClassName(styles.layout.inner, (_r = customStyles === null || customStyles === void 0 ? void 0 : customStyles.layout) === null || _r === void 0 ? void 0 : _r.inner),
|
|
1433
|
+
},
|
|
1434
|
+
panel: {
|
|
1435
|
+
container: toClassName(styles.panel.container, size && styles[size], (_s = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _s === void 0 ? void 0 : _s.container),
|
|
1436
|
+
transition: {
|
|
1437
|
+
enter: toClassName(styles.panel.transition.enter, (_u = (_t = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _t === void 0 ? void 0 : _t.transition) === null || _u === void 0 ? void 0 : _u.enter),
|
|
1438
|
+
enterFrom: toClassName(styles.panel.transition.enterFrom, (_w = (_v = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _v === void 0 ? void 0 : _v.transition) === null || _w === void 0 ? void 0 : _w.enterFrom),
|
|
1439
|
+
enterTo: toClassName(styles.panel.transition.enterTo, (_y = (_x = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _x === void 0 ? void 0 : _x.transition) === null || _y === void 0 ? void 0 : _y.enterTo),
|
|
1440
|
+
leave: toClassName(styles.panel.transition.leave, (_0 = (_z = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _z === void 0 ? void 0 : _z.transition) === null || _0 === void 0 ? void 0 : _0.leave),
|
|
1441
|
+
leaveFrom: toClassName(styles.panel.transition.leaveFrom, (_2 = (_1 = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _1 === void 0 ? void 0 : _1.transition) === null || _2 === void 0 ? void 0 : _2.leaveFrom),
|
|
1442
|
+
leaveTo: toClassName(styles.panel.transition.leaveTo, (_4 = (_3 = customStyles === null || customStyles === void 0 ? void 0 : customStyles.panel) === null || _3 === void 0 ? void 0 : _3.transition) === null || _4 === void 0 ? void 0 : _4.leaveTo),
|
|
1443
|
+
},
|
|
1444
|
+
},
|
|
1445
|
+
});
|
|
1446
|
+
}, []);
|
|
1447
|
+
return (jsxs(Fragment$1, { children: [jsx(Transition.Root, __assign({ show: isOpen, as: Fragment }, { children: jsxs(Dialog, __assign({ as: "div", className: style.container, onClose: setIsOpen }, { children: [jsx(Transition.Child, __assign({ as: Fragment, enter: style.background.transition.enter, enterFrom: style.background.transition.enterFrom, enterTo: style.background.transition.enterTo, leave: style.background.transition.leave, leaveFrom: style.background.transition.leaveFrom, leaveTo: style.background.transition.leaveTo }, { children: jsx("div", { className: style.background.container }) })), jsx("div", __assign({ className: style.layout.container }, { children: jsx("div", __assign({ className: style.layout.content }, { children: jsx("div", __assign({ className: style.layout.inner }, { children: jsx(Transition.Child, __assign({ as: Fragment, enter: style.panel.transition.enter, enterFrom: style.panel.transition.enterFrom, enterTo: style.panel.transition.enterTo, leave: style.panel.transition.leave, leaveFrom: style.panel.transition.leaveFrom, leaveTo: style.panel.transition.leaveTo }, { children: jsx(Dialog.Panel, __assign({ className: style.panel.container }, { children: children(options) })) })) })) })) }))] })) })), trigger && trigger(options)] }));
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
var styles = {
|
|
1451
|
+
container: 'relative z-20',
|
|
1452
|
+
background: {
|
|
1453
|
+
container: 'fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity',
|
|
1454
|
+
transition: {
|
|
1455
|
+
enter: 'ease-in-out duration-500',
|
|
1456
|
+
enterFrom: 'opacity-0',
|
|
1457
|
+
enterTo: 'opacity-100',
|
|
1458
|
+
leave: 'ease-in-out duration-500',
|
|
1459
|
+
leaveFrom: 'opacity-100',
|
|
1460
|
+
leaveTo: 'opacity-0',
|
|
1461
|
+
},
|
|
1462
|
+
},
|
|
1463
|
+
layout: {
|
|
1464
|
+
container: 'fixed inset-0 overflow-hidden',
|
|
1465
|
+
content: 'absolute inset-0 overflow-hidden',
|
|
1466
|
+
inner: 'pointer-events-none fixed inset-y-0 right-0 flex max-w-full pl-10',
|
|
1467
|
+
},
|
|
1468
|
+
panel: {
|
|
1469
|
+
container: 'pointer-events-auto w-screen bg-white',
|
|
1470
|
+
transition: {
|
|
1471
|
+
enter: 'transform transition ease-in-out duration-500 sm:duration-700',
|
|
1472
|
+
enterFrom: 'translate-x-full',
|
|
1473
|
+
enterTo: 'translate-x-0',
|
|
1474
|
+
leave: 'transform transition ease-in-out duration-500 sm:duration-700',
|
|
1475
|
+
leaveFrom: 'translate-x-0',
|
|
1476
|
+
leaveTo: 'translate-x-full',
|
|
1477
|
+
},
|
|
1478
|
+
},
|
|
1479
|
+
xs: 'max-w-xs',
|
|
1480
|
+
sm: 'max-w-sm',
|
|
1481
|
+
md: 'max-w-md',
|
|
1482
|
+
lg: 'max-w-2xl',
|
|
1483
|
+
xl: 'max-w-4xl',
|
|
1484
|
+
};
|
|
1485
|
+
|
|
1486
|
+
var Overlay = {
|
|
1487
|
+
Modal: ModalOverlay,
|
|
1488
|
+
Notification: Notification,
|
|
1489
|
+
SlideOver: SlideOverOverlay,
|
|
1490
|
+
};
|
|
1491
|
+
|
|
1492
|
+
export { Element, Layout, Navigation, Overlay };
|
|
1493
|
+
//# sourceMappingURL=index.esm.js.map
|