@sunggang/ui-lib 0.4.2 → 0.4.3
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/CustomSelect.cjs.js +124 -0
- package/CustomSelect.esm.js +122 -0
- package/Form.cjs.js +22 -138
- package/Form.esm.js +22 -138
- package/Modal.cjs.js +1 -2
- package/Modal.esm.js +1 -2
- package/index.cjs.css +0 -15
- package/index.cjs.js +89 -11
- package/index.esm.css +0 -15
- package/index.esm.js +88 -12
- package/package.json +1 -7
- package/src/index.d.ts +2 -0
- package/src/lib/Form/FlatpickrField/index.d.ts +0 -1
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var jsxRuntime = require('react/jsx-runtime');
|
|
4
|
+
var react = require('@iconify/react');
|
|
5
|
+
var React = require('react');
|
|
6
|
+
|
|
7
|
+
function _array_like_to_array(arr, len) {
|
|
8
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
9
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
10
|
+
return arr2;
|
|
11
|
+
}
|
|
12
|
+
function _array_with_holes(arr) {
|
|
13
|
+
if (Array.isArray(arr)) return arr;
|
|
14
|
+
}
|
|
15
|
+
function _iterable_to_array_limit(arr, i) {
|
|
16
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
17
|
+
if (_i == null) return;
|
|
18
|
+
var _arr = [];
|
|
19
|
+
var _n = true;
|
|
20
|
+
var _d = false;
|
|
21
|
+
var _s, _e;
|
|
22
|
+
try {
|
|
23
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
24
|
+
_arr.push(_s.value);
|
|
25
|
+
if (i && _arr.length === i) break;
|
|
26
|
+
}
|
|
27
|
+
} catch (err) {
|
|
28
|
+
_d = true;
|
|
29
|
+
_e = err;
|
|
30
|
+
} finally{
|
|
31
|
+
try {
|
|
32
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
33
|
+
} finally{
|
|
34
|
+
if (_d) throw _e;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return _arr;
|
|
38
|
+
}
|
|
39
|
+
function _non_iterable_rest() {
|
|
40
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
41
|
+
}
|
|
42
|
+
function _sliced_to_array(arr, i) {
|
|
43
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
44
|
+
}
|
|
45
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
46
|
+
if (!o) return;
|
|
47
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
48
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
49
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
50
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
51
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
52
|
+
}
|
|
53
|
+
var CustomSelect = function(param) {
|
|
54
|
+
var items = param.items, currentID = param.currentID, setCurrentID = param.setCurrentID, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_hasEmptyOption = param.hasEmptyOption, hasEmptyOption = _param_hasEmptyOption === void 0 ? true : _param_hasEmptyOption;
|
|
55
|
+
var _useState = _sliced_to_array(React.useState(false), 2), isDropdownOpen = _useState[0], setIsDropdownOpen = _useState[1];
|
|
56
|
+
var selectRef = React.useRef(null);
|
|
57
|
+
React.useEffect(function() {
|
|
58
|
+
var handleClickOutside = function(event) {
|
|
59
|
+
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
60
|
+
setIsDropdownOpen(false);
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
64
|
+
return function() {
|
|
65
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
66
|
+
};
|
|
67
|
+
}, []);
|
|
68
|
+
var getSelectedItemName = function() {
|
|
69
|
+
if (currentID === undefined || currentID === null) return "請選擇";
|
|
70
|
+
var selectedItem = items.find(function(item) {
|
|
71
|
+
return String(item.value) === String(currentID);
|
|
72
|
+
});
|
|
73
|
+
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) || "請選擇";
|
|
74
|
+
};
|
|
75
|
+
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
76
|
+
ref: selectRef,
|
|
77
|
+
className: "relative w-full border border-gray-300 rounded-lg ".concat(className),
|
|
78
|
+
children: [
|
|
79
|
+
/*#__PURE__*/ jsxRuntime.jsxs("button", {
|
|
80
|
+
type: "button",
|
|
81
|
+
className: "w-full h-10 px-4 flex items-center justify-between cursor-pointer rounded-lg",
|
|
82
|
+
onClick: function() {
|
|
83
|
+
return setIsDropdownOpen(function(prev) {
|
|
84
|
+
return !prev;
|
|
85
|
+
});
|
|
86
|
+
},
|
|
87
|
+
children: [
|
|
88
|
+
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
89
|
+
children: getSelectedItemName()
|
|
90
|
+
}),
|
|
91
|
+
/*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
|
|
92
|
+
width: 28,
|
|
93
|
+
icon: isDropdownOpen ? "iconamoon:arrow-down-2" : "iconamoon:arrow-right-2"
|
|
94
|
+
})
|
|
95
|
+
]
|
|
96
|
+
}),
|
|
97
|
+
isDropdownOpen && /*#__PURE__*/ jsxRuntime.jsxs("ul", {
|
|
98
|
+
className: "absolute z-10 mt-0 w-full bg-white border border-gray-300 rounded-lg shadow-lg",
|
|
99
|
+
children: [
|
|
100
|
+
hasEmptyOption && /*#__PURE__*/ jsxRuntime.jsx("li", {
|
|
101
|
+
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
102
|
+
onClick: function() {
|
|
103
|
+
setCurrentID(null);
|
|
104
|
+
setIsDropdownOpen(false);
|
|
105
|
+
},
|
|
106
|
+
children: "請選擇"
|
|
107
|
+
}),
|
|
108
|
+
items.map(function(item) {
|
|
109
|
+
return /*#__PURE__*/ jsxRuntime.jsx("li", {
|
|
110
|
+
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
111
|
+
onClick: function() {
|
|
112
|
+
setCurrentID(item.value);
|
|
113
|
+
setIsDropdownOpen(false);
|
|
114
|
+
},
|
|
115
|
+
children: item.name
|
|
116
|
+
}, item.value);
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
})
|
|
120
|
+
]
|
|
121
|
+
});
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
exports.CustomSelect = CustomSelect;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
+
import { Icon } from '@iconify/react';
|
|
3
|
+
import { useState, useRef, useEffect } from 'react';
|
|
4
|
+
|
|
5
|
+
function _array_like_to_array(arr, len) {
|
|
6
|
+
if (len == null || len > arr.length) len = arr.length;
|
|
7
|
+
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
8
|
+
return arr2;
|
|
9
|
+
}
|
|
10
|
+
function _array_with_holes(arr) {
|
|
11
|
+
if (Array.isArray(arr)) return arr;
|
|
12
|
+
}
|
|
13
|
+
function _iterable_to_array_limit(arr, i) {
|
|
14
|
+
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
15
|
+
if (_i == null) return;
|
|
16
|
+
var _arr = [];
|
|
17
|
+
var _n = true;
|
|
18
|
+
var _d = false;
|
|
19
|
+
var _s, _e;
|
|
20
|
+
try {
|
|
21
|
+
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
22
|
+
_arr.push(_s.value);
|
|
23
|
+
if (i && _arr.length === i) break;
|
|
24
|
+
}
|
|
25
|
+
} catch (err) {
|
|
26
|
+
_d = true;
|
|
27
|
+
_e = err;
|
|
28
|
+
} finally{
|
|
29
|
+
try {
|
|
30
|
+
if (!_n && _i["return"] != null) _i["return"]();
|
|
31
|
+
} finally{
|
|
32
|
+
if (_d) throw _e;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return _arr;
|
|
36
|
+
}
|
|
37
|
+
function _non_iterable_rest() {
|
|
38
|
+
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
39
|
+
}
|
|
40
|
+
function _sliced_to_array(arr, i) {
|
|
41
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
42
|
+
}
|
|
43
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
44
|
+
if (!o) return;
|
|
45
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
46
|
+
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
47
|
+
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
48
|
+
if (n === "Map" || n === "Set") return Array.from(n);
|
|
49
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
50
|
+
}
|
|
51
|
+
var CustomSelect = function(param) {
|
|
52
|
+
var items = param.items, currentID = param.currentID, setCurrentID = param.setCurrentID, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_hasEmptyOption = param.hasEmptyOption, hasEmptyOption = _param_hasEmptyOption === void 0 ? true : _param_hasEmptyOption;
|
|
53
|
+
var _useState = _sliced_to_array(useState(false), 2), isDropdownOpen = _useState[0], setIsDropdownOpen = _useState[1];
|
|
54
|
+
var selectRef = useRef(null);
|
|
55
|
+
useEffect(function() {
|
|
56
|
+
var handleClickOutside = function(event) {
|
|
57
|
+
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
58
|
+
setIsDropdownOpen(false);
|
|
59
|
+
}
|
|
60
|
+
};
|
|
61
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
62
|
+
return function() {
|
|
63
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
64
|
+
};
|
|
65
|
+
}, []);
|
|
66
|
+
var getSelectedItemName = function() {
|
|
67
|
+
if (currentID === undefined || currentID === null) return "請選擇";
|
|
68
|
+
var selectedItem = items.find(function(item) {
|
|
69
|
+
return String(item.value) === String(currentID);
|
|
70
|
+
});
|
|
71
|
+
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) || "請選擇";
|
|
72
|
+
};
|
|
73
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
74
|
+
ref: selectRef,
|
|
75
|
+
className: "relative w-full border border-gray-300 rounded-lg ".concat(className),
|
|
76
|
+
children: [
|
|
77
|
+
/*#__PURE__*/ jsxs("button", {
|
|
78
|
+
type: "button",
|
|
79
|
+
className: "w-full h-10 px-4 flex items-center justify-between cursor-pointer rounded-lg",
|
|
80
|
+
onClick: function() {
|
|
81
|
+
return setIsDropdownOpen(function(prev) {
|
|
82
|
+
return !prev;
|
|
83
|
+
});
|
|
84
|
+
},
|
|
85
|
+
children: [
|
|
86
|
+
/*#__PURE__*/ jsx("span", {
|
|
87
|
+
children: getSelectedItemName()
|
|
88
|
+
}),
|
|
89
|
+
/*#__PURE__*/ jsx(Icon, {
|
|
90
|
+
width: 28,
|
|
91
|
+
icon: isDropdownOpen ? "iconamoon:arrow-down-2" : "iconamoon:arrow-right-2"
|
|
92
|
+
})
|
|
93
|
+
]
|
|
94
|
+
}),
|
|
95
|
+
isDropdownOpen && /*#__PURE__*/ jsxs("ul", {
|
|
96
|
+
className: "absolute z-10 mt-0 w-full bg-white border border-gray-300 rounded-lg shadow-lg",
|
|
97
|
+
children: [
|
|
98
|
+
hasEmptyOption && /*#__PURE__*/ jsx("li", {
|
|
99
|
+
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
100
|
+
onClick: function() {
|
|
101
|
+
setCurrentID(null);
|
|
102
|
+
setIsDropdownOpen(false);
|
|
103
|
+
},
|
|
104
|
+
children: "請選擇"
|
|
105
|
+
}),
|
|
106
|
+
items.map(function(item) {
|
|
107
|
+
return /*#__PURE__*/ jsx("li", {
|
|
108
|
+
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
109
|
+
onClick: function() {
|
|
110
|
+
setCurrentID(item.value);
|
|
111
|
+
setIsDropdownOpen(false);
|
|
112
|
+
},
|
|
113
|
+
children: item.name
|
|
114
|
+
}, item.value);
|
|
115
|
+
})
|
|
116
|
+
]
|
|
117
|
+
})
|
|
118
|
+
]
|
|
119
|
+
});
|
|
120
|
+
};
|
|
121
|
+
|
|
122
|
+
export { CustomSelect as C };
|
package/Form.cjs.js
CHANGED
|
@@ -7,6 +7,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
7
7
|
var React = require('react');
|
|
8
8
|
var react = require('@iconify/react');
|
|
9
9
|
var Modal = require('./Modal.cjs.js');
|
|
10
|
+
var CustomSelect = require('./CustomSelect.cjs.js');
|
|
10
11
|
require('@radix-ui/react-switch');
|
|
11
12
|
require('./utils.cjs.js');
|
|
12
13
|
require('clsx');
|
|
@@ -24,15 +25,15 @@ require('./_commonjsHelpers.cjs.js');
|
|
|
24
25
|
require('@radix-ui/react-select');
|
|
25
26
|
require('@radix-ui/react-icons');
|
|
26
27
|
|
|
27
|
-
function _array_like_to_array$
|
|
28
|
+
function _array_like_to_array$1(arr, len) {
|
|
28
29
|
if (len == null || len > arr.length) len = arr.length;
|
|
29
30
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
30
31
|
return arr2;
|
|
31
32
|
}
|
|
32
|
-
function _array_with_holes$
|
|
33
|
+
function _array_with_holes$1(arr) {
|
|
33
34
|
if (Array.isArray(arr)) return arr;
|
|
34
35
|
}
|
|
35
|
-
function _iterable_to_array_limit$
|
|
36
|
+
function _iterable_to_array_limit$1(arr, i) {
|
|
36
37
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
37
38
|
if (_i == null) return;
|
|
38
39
|
var _arr = [];
|
|
@@ -56,23 +57,23 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
56
57
|
}
|
|
57
58
|
return _arr;
|
|
58
59
|
}
|
|
59
|
-
function _non_iterable_rest$
|
|
60
|
+
function _non_iterable_rest$1() {
|
|
60
61
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
61
62
|
}
|
|
62
|
-
function _sliced_to_array$
|
|
63
|
-
return _array_with_holes$
|
|
63
|
+
function _sliced_to_array$1(arr, i) {
|
|
64
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
|
|
64
65
|
}
|
|
65
|
-
function _unsupported_iterable_to_array$
|
|
66
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
66
67
|
if (!o) return;
|
|
67
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
68
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
68
69
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
69
70
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
70
71
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
71
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
72
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
72
73
|
}
|
|
73
74
|
var BaseTemplate = function(param) {
|
|
74
75
|
var file = param.file, imageUrl = param.imageUrl;
|
|
75
|
-
var _useState = _sliced_to_array$
|
|
76
|
+
var _useState = _sliced_to_array$1(React.useState(null), 2), tempImage = _useState[0], setTempImage = _useState[1];
|
|
76
77
|
React.useEffect(function() {
|
|
77
78
|
var fileReader;
|
|
78
79
|
var isCancel = false;
|
|
@@ -133,15 +134,15 @@ var BaseTemplate = function(param) {
|
|
|
133
134
|
});
|
|
134
135
|
};
|
|
135
136
|
|
|
136
|
-
function _array_like_to_array
|
|
137
|
+
function _array_like_to_array(arr, len) {
|
|
137
138
|
if (len == null || len > arr.length) len = arr.length;
|
|
138
139
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
139
140
|
return arr2;
|
|
140
141
|
}
|
|
141
|
-
function _array_with_holes
|
|
142
|
+
function _array_with_holes(arr) {
|
|
142
143
|
if (Array.isArray(arr)) return arr;
|
|
143
144
|
}
|
|
144
|
-
function _iterable_to_array_limit
|
|
145
|
+
function _iterable_to_array_limit(arr, i) {
|
|
145
146
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
146
147
|
if (_i == null) return;
|
|
147
148
|
var _arr = [];
|
|
@@ -165,25 +166,25 @@ function _iterable_to_array_limit$1(arr, i) {
|
|
|
165
166
|
}
|
|
166
167
|
return _arr;
|
|
167
168
|
}
|
|
168
|
-
function _non_iterable_rest
|
|
169
|
+
function _non_iterable_rest() {
|
|
169
170
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
170
171
|
}
|
|
171
|
-
function _sliced_to_array
|
|
172
|
-
return _array_with_holes
|
|
172
|
+
function _sliced_to_array(arr, i) {
|
|
173
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
173
174
|
}
|
|
174
|
-
function _unsupported_iterable_to_array
|
|
175
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
175
176
|
if (!o) return;
|
|
176
|
-
if (typeof o === "string") return _array_like_to_array
|
|
177
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
177
178
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
178
179
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
179
180
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
180
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array
|
|
181
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
181
182
|
}
|
|
182
183
|
var CustomUpload = function(param) {
|
|
183
184
|
var className = param.className, children = param.children, file = param.file, setFile = param.setFile, imageUrl = param.imageUrl, setImageUrl = param.setImageUrl;
|
|
184
185
|
var imageMimeType = /image\/(png|jpg|jpeg)/i;
|
|
185
186
|
var DEFAULT_IMAGE_SIZE_LIMIT_IN_BYTES = 5242880;
|
|
186
|
-
var _useState = _sliced_to_array
|
|
187
|
+
var _useState = _sliced_to_array(React.useState(null), 2), modal = _useState[0], setModal = _useState[1];
|
|
187
188
|
var hiddenFileInput = React.useRef(null);
|
|
188
189
|
var handleImageClick = function() {
|
|
189
190
|
var _hiddenFileInput_current;
|
|
@@ -274,123 +275,6 @@ var CustomUpload = function(param) {
|
|
|
274
275
|
});
|
|
275
276
|
};
|
|
276
277
|
|
|
277
|
-
function _array_like_to_array(arr, len) {
|
|
278
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
279
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
280
|
-
return arr2;
|
|
281
|
-
}
|
|
282
|
-
function _array_with_holes(arr) {
|
|
283
|
-
if (Array.isArray(arr)) return arr;
|
|
284
|
-
}
|
|
285
|
-
function _iterable_to_array_limit(arr, i) {
|
|
286
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
287
|
-
if (_i == null) return;
|
|
288
|
-
var _arr = [];
|
|
289
|
-
var _n = true;
|
|
290
|
-
var _d = false;
|
|
291
|
-
var _s, _e;
|
|
292
|
-
try {
|
|
293
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
294
|
-
_arr.push(_s.value);
|
|
295
|
-
if (i && _arr.length === i) break;
|
|
296
|
-
}
|
|
297
|
-
} catch (err) {
|
|
298
|
-
_d = true;
|
|
299
|
-
_e = err;
|
|
300
|
-
} finally{
|
|
301
|
-
try {
|
|
302
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
303
|
-
} finally{
|
|
304
|
-
if (_d) throw _e;
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
return _arr;
|
|
308
|
-
}
|
|
309
|
-
function _non_iterable_rest() {
|
|
310
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
311
|
-
}
|
|
312
|
-
function _sliced_to_array(arr, i) {
|
|
313
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
314
|
-
}
|
|
315
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
316
|
-
if (!o) return;
|
|
317
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
318
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
319
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
320
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
321
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
322
|
-
}
|
|
323
|
-
var CustomSelect = function(param) {
|
|
324
|
-
var items = param.items, currentID = param.currentID, setCurrentID = param.setCurrentID, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_hasEmptyOption = param.hasEmptyOption, hasEmptyOption = _param_hasEmptyOption === void 0 ? true : _param_hasEmptyOption;
|
|
325
|
-
var _useState = _sliced_to_array(React.useState(false), 2), isDropdownOpen = _useState[0], setIsDropdownOpen = _useState[1];
|
|
326
|
-
var selectRef = React.useRef(null);
|
|
327
|
-
React.useEffect(function() {
|
|
328
|
-
var handleClickOutside = function(event) {
|
|
329
|
-
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
330
|
-
setIsDropdownOpen(false);
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
334
|
-
return function() {
|
|
335
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
336
|
-
};
|
|
337
|
-
}, []);
|
|
338
|
-
var getSelectedItemName = function() {
|
|
339
|
-
if (currentID === undefined || currentID === null) return "請選擇";
|
|
340
|
-
var selectedItem = items.find(function(item) {
|
|
341
|
-
return String(item.value) === String(currentID);
|
|
342
|
-
});
|
|
343
|
-
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) || "請選擇";
|
|
344
|
-
};
|
|
345
|
-
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
346
|
-
ref: selectRef,
|
|
347
|
-
className: "relative w-full border border-gray-300 rounded-lg ".concat(className),
|
|
348
|
-
children: [
|
|
349
|
-
/*#__PURE__*/ jsxRuntime.jsxs("button", {
|
|
350
|
-
type: "button",
|
|
351
|
-
className: "w-full h-10 px-4 flex items-center justify-between cursor-pointer rounded-lg",
|
|
352
|
-
onClick: function() {
|
|
353
|
-
return setIsDropdownOpen(function(prev) {
|
|
354
|
-
return !prev;
|
|
355
|
-
});
|
|
356
|
-
},
|
|
357
|
-
children: [
|
|
358
|
-
/*#__PURE__*/ jsxRuntime.jsx("span", {
|
|
359
|
-
children: getSelectedItemName()
|
|
360
|
-
}),
|
|
361
|
-
/*#__PURE__*/ jsxRuntime.jsx(react.Icon, {
|
|
362
|
-
width: 28,
|
|
363
|
-
icon: isDropdownOpen ? "iconamoon:arrow-down-2" : "iconamoon:arrow-right-2"
|
|
364
|
-
})
|
|
365
|
-
]
|
|
366
|
-
}),
|
|
367
|
-
isDropdownOpen && /*#__PURE__*/ jsxRuntime.jsxs("ul", {
|
|
368
|
-
className: "absolute z-10 mt-0 w-full bg-white border border-gray-300 rounded-lg shadow-lg",
|
|
369
|
-
children: [
|
|
370
|
-
hasEmptyOption && /*#__PURE__*/ jsxRuntime.jsx("li", {
|
|
371
|
-
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
372
|
-
onClick: function() {
|
|
373
|
-
setCurrentID(null);
|
|
374
|
-
setIsDropdownOpen(false);
|
|
375
|
-
},
|
|
376
|
-
children: "請選擇"
|
|
377
|
-
}),
|
|
378
|
-
items.map(function(item) {
|
|
379
|
-
return /*#__PURE__*/ jsxRuntime.jsx("li", {
|
|
380
|
-
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
381
|
-
onClick: function() {
|
|
382
|
-
setCurrentID(item.value);
|
|
383
|
-
setIsDropdownOpen(false);
|
|
384
|
-
},
|
|
385
|
-
children: item.name
|
|
386
|
-
}, item.value);
|
|
387
|
-
})
|
|
388
|
-
]
|
|
389
|
-
})
|
|
390
|
-
]
|
|
391
|
-
});
|
|
392
|
-
};
|
|
393
|
-
|
|
394
278
|
exports.City = baseSwitch.City;
|
|
395
279
|
exports.CustomUploadField = baseSwitch.CustomUploadField;
|
|
396
280
|
exports.FieldLabel = baseSwitch.FieldLabel;
|
|
@@ -398,5 +282,5 @@ exports.Fields = baseSwitch.Fields;
|
|
|
398
282
|
exports.Form = baseSwitch.Form;
|
|
399
283
|
exports.Row = baseSwitch.Row;
|
|
400
284
|
exports.Textarea = baseSwitch.Textarea;
|
|
401
|
-
exports.CustomSelect = CustomSelect;
|
|
285
|
+
exports.CustomSelect = CustomSelect.CustomSelect;
|
|
402
286
|
exports.CustomUpload = CustomUpload;
|
package/Form.esm.js
CHANGED
|
@@ -3,6 +3,7 @@ import { jsx, jsxs } from 'react/jsx-runtime';
|
|
|
3
3
|
import { useState, useEffect, useRef } from 'react';
|
|
4
4
|
import { Icon } from '@iconify/react';
|
|
5
5
|
import { M as Modal, E as ErrorContent } from './Modal.esm.js';
|
|
6
|
+
export { C as CustomSelect } from './CustomSelect.esm.js';
|
|
6
7
|
import '@radix-ui/react-switch';
|
|
7
8
|
import './utils.esm.js';
|
|
8
9
|
import 'clsx';
|
|
@@ -20,15 +21,15 @@ import './_commonjsHelpers.esm.js';
|
|
|
20
21
|
import '@radix-ui/react-select';
|
|
21
22
|
import '@radix-ui/react-icons';
|
|
22
23
|
|
|
23
|
-
function _array_like_to_array$
|
|
24
|
+
function _array_like_to_array$1(arr, len) {
|
|
24
25
|
if (len == null || len > arr.length) len = arr.length;
|
|
25
26
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
26
27
|
return arr2;
|
|
27
28
|
}
|
|
28
|
-
function _array_with_holes$
|
|
29
|
+
function _array_with_holes$1(arr) {
|
|
29
30
|
if (Array.isArray(arr)) return arr;
|
|
30
31
|
}
|
|
31
|
-
function _iterable_to_array_limit$
|
|
32
|
+
function _iterable_to_array_limit$1(arr, i) {
|
|
32
33
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
33
34
|
if (_i == null) return;
|
|
34
35
|
var _arr = [];
|
|
@@ -52,23 +53,23 @@ function _iterable_to_array_limit$2(arr, i) {
|
|
|
52
53
|
}
|
|
53
54
|
return _arr;
|
|
54
55
|
}
|
|
55
|
-
function _non_iterable_rest$
|
|
56
|
+
function _non_iterable_rest$1() {
|
|
56
57
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
57
58
|
}
|
|
58
|
-
function _sliced_to_array$
|
|
59
|
-
return _array_with_holes$
|
|
59
|
+
function _sliced_to_array$1(arr, i) {
|
|
60
|
+
return _array_with_holes$1(arr) || _iterable_to_array_limit$1(arr, i) || _unsupported_iterable_to_array$1(arr, i) || _non_iterable_rest$1();
|
|
60
61
|
}
|
|
61
|
-
function _unsupported_iterable_to_array$
|
|
62
|
+
function _unsupported_iterable_to_array$1(o, minLen) {
|
|
62
63
|
if (!o) return;
|
|
63
|
-
if (typeof o === "string") return _array_like_to_array$
|
|
64
|
+
if (typeof o === "string") return _array_like_to_array$1(o, minLen);
|
|
64
65
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
65
66
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
66
67
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
67
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$
|
|
68
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$1(o, minLen);
|
|
68
69
|
}
|
|
69
70
|
var BaseTemplate = function(param) {
|
|
70
71
|
var file = param.file, imageUrl = param.imageUrl;
|
|
71
|
-
var _useState = _sliced_to_array$
|
|
72
|
+
var _useState = _sliced_to_array$1(useState(null), 2), tempImage = _useState[0], setTempImage = _useState[1];
|
|
72
73
|
useEffect(function() {
|
|
73
74
|
var fileReader;
|
|
74
75
|
var isCancel = false;
|
|
@@ -129,15 +130,15 @@ var BaseTemplate = function(param) {
|
|
|
129
130
|
});
|
|
130
131
|
};
|
|
131
132
|
|
|
132
|
-
function _array_like_to_array
|
|
133
|
+
function _array_like_to_array(arr, len) {
|
|
133
134
|
if (len == null || len > arr.length) len = arr.length;
|
|
134
135
|
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
135
136
|
return arr2;
|
|
136
137
|
}
|
|
137
|
-
function _array_with_holes
|
|
138
|
+
function _array_with_holes(arr) {
|
|
138
139
|
if (Array.isArray(arr)) return arr;
|
|
139
140
|
}
|
|
140
|
-
function _iterable_to_array_limit
|
|
141
|
+
function _iterable_to_array_limit(arr, i) {
|
|
141
142
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
142
143
|
if (_i == null) return;
|
|
143
144
|
var _arr = [];
|
|
@@ -161,25 +162,25 @@ function _iterable_to_array_limit$1(arr, i) {
|
|
|
161
162
|
}
|
|
162
163
|
return _arr;
|
|
163
164
|
}
|
|
164
|
-
function _non_iterable_rest
|
|
165
|
+
function _non_iterable_rest() {
|
|
165
166
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
166
167
|
}
|
|
167
|
-
function _sliced_to_array
|
|
168
|
-
return _array_with_holes
|
|
168
|
+
function _sliced_to_array(arr, i) {
|
|
169
|
+
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
169
170
|
}
|
|
170
|
-
function _unsupported_iterable_to_array
|
|
171
|
+
function _unsupported_iterable_to_array(o, minLen) {
|
|
171
172
|
if (!o) return;
|
|
172
|
-
if (typeof o === "string") return _array_like_to_array
|
|
173
|
+
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
173
174
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
174
175
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
175
176
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
176
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array
|
|
177
|
+
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
177
178
|
}
|
|
178
179
|
var CustomUpload = function(param) {
|
|
179
180
|
var className = param.className, children = param.children, file = param.file, setFile = param.setFile, imageUrl = param.imageUrl, setImageUrl = param.setImageUrl;
|
|
180
181
|
var imageMimeType = /image\/(png|jpg|jpeg)/i;
|
|
181
182
|
var DEFAULT_IMAGE_SIZE_LIMIT_IN_BYTES = 5242880;
|
|
182
|
-
var _useState = _sliced_to_array
|
|
183
|
+
var _useState = _sliced_to_array(useState(null), 2), modal = _useState[0], setModal = _useState[1];
|
|
183
184
|
var hiddenFileInput = useRef(null);
|
|
184
185
|
var handleImageClick = function() {
|
|
185
186
|
var _hiddenFileInput_current;
|
|
@@ -270,121 +271,4 @@ var CustomUpload = function(param) {
|
|
|
270
271
|
});
|
|
271
272
|
};
|
|
272
273
|
|
|
273
|
-
|
|
274
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
275
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
276
|
-
return arr2;
|
|
277
|
-
}
|
|
278
|
-
function _array_with_holes(arr) {
|
|
279
|
-
if (Array.isArray(arr)) return arr;
|
|
280
|
-
}
|
|
281
|
-
function _iterable_to_array_limit(arr, i) {
|
|
282
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
283
|
-
if (_i == null) return;
|
|
284
|
-
var _arr = [];
|
|
285
|
-
var _n = true;
|
|
286
|
-
var _d = false;
|
|
287
|
-
var _s, _e;
|
|
288
|
-
try {
|
|
289
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
290
|
-
_arr.push(_s.value);
|
|
291
|
-
if (i && _arr.length === i) break;
|
|
292
|
-
}
|
|
293
|
-
} catch (err) {
|
|
294
|
-
_d = true;
|
|
295
|
-
_e = err;
|
|
296
|
-
} finally{
|
|
297
|
-
try {
|
|
298
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
299
|
-
} finally{
|
|
300
|
-
if (_d) throw _e;
|
|
301
|
-
}
|
|
302
|
-
}
|
|
303
|
-
return _arr;
|
|
304
|
-
}
|
|
305
|
-
function _non_iterable_rest() {
|
|
306
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
307
|
-
}
|
|
308
|
-
function _sliced_to_array(arr, i) {
|
|
309
|
-
return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
|
|
310
|
-
}
|
|
311
|
-
function _unsupported_iterable_to_array(o, minLen) {
|
|
312
|
-
if (!o) return;
|
|
313
|
-
if (typeof o === "string") return _array_like_to_array(o, minLen);
|
|
314
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
315
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
316
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
317
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
|
|
318
|
-
}
|
|
319
|
-
var CustomSelect = function(param) {
|
|
320
|
-
var items = param.items, currentID = param.currentID, setCurrentID = param.setCurrentID, _param_className = param.className, className = _param_className === void 0 ? "" : _param_className, _param_hasEmptyOption = param.hasEmptyOption, hasEmptyOption = _param_hasEmptyOption === void 0 ? true : _param_hasEmptyOption;
|
|
321
|
-
var _useState = _sliced_to_array(useState(false), 2), isDropdownOpen = _useState[0], setIsDropdownOpen = _useState[1];
|
|
322
|
-
var selectRef = useRef(null);
|
|
323
|
-
useEffect(function() {
|
|
324
|
-
var handleClickOutside = function(event) {
|
|
325
|
-
if (selectRef.current && !selectRef.current.contains(event.target)) {
|
|
326
|
-
setIsDropdownOpen(false);
|
|
327
|
-
}
|
|
328
|
-
};
|
|
329
|
-
document.addEventListener("mousedown", handleClickOutside);
|
|
330
|
-
return function() {
|
|
331
|
-
document.removeEventListener("mousedown", handleClickOutside);
|
|
332
|
-
};
|
|
333
|
-
}, []);
|
|
334
|
-
var getSelectedItemName = function() {
|
|
335
|
-
if (currentID === undefined || currentID === null) return "請選擇";
|
|
336
|
-
var selectedItem = items.find(function(item) {
|
|
337
|
-
return String(item.value) === String(currentID);
|
|
338
|
-
});
|
|
339
|
-
return (selectedItem === null || selectedItem === void 0 ? void 0 : selectedItem.name) || "請選擇";
|
|
340
|
-
};
|
|
341
|
-
return /*#__PURE__*/ jsxs("div", {
|
|
342
|
-
ref: selectRef,
|
|
343
|
-
className: "relative w-full border border-gray-300 rounded-lg ".concat(className),
|
|
344
|
-
children: [
|
|
345
|
-
/*#__PURE__*/ jsxs("button", {
|
|
346
|
-
type: "button",
|
|
347
|
-
className: "w-full h-10 px-4 flex items-center justify-between cursor-pointer rounded-lg",
|
|
348
|
-
onClick: function() {
|
|
349
|
-
return setIsDropdownOpen(function(prev) {
|
|
350
|
-
return !prev;
|
|
351
|
-
});
|
|
352
|
-
},
|
|
353
|
-
children: [
|
|
354
|
-
/*#__PURE__*/ jsx("span", {
|
|
355
|
-
children: getSelectedItemName()
|
|
356
|
-
}),
|
|
357
|
-
/*#__PURE__*/ jsx(Icon, {
|
|
358
|
-
width: 28,
|
|
359
|
-
icon: isDropdownOpen ? "iconamoon:arrow-down-2" : "iconamoon:arrow-right-2"
|
|
360
|
-
})
|
|
361
|
-
]
|
|
362
|
-
}),
|
|
363
|
-
isDropdownOpen && /*#__PURE__*/ jsxs("ul", {
|
|
364
|
-
className: "absolute z-10 mt-0 w-full bg-white border border-gray-300 rounded-lg shadow-lg",
|
|
365
|
-
children: [
|
|
366
|
-
hasEmptyOption && /*#__PURE__*/ jsx("li", {
|
|
367
|
-
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
368
|
-
onClick: function() {
|
|
369
|
-
setCurrentID(null);
|
|
370
|
-
setIsDropdownOpen(false);
|
|
371
|
-
},
|
|
372
|
-
children: "請選擇"
|
|
373
|
-
}),
|
|
374
|
-
items.map(function(item) {
|
|
375
|
-
return /*#__PURE__*/ jsx("li", {
|
|
376
|
-
className: "px-4 py-2 cursor-pointer hover:bg-gray-100",
|
|
377
|
-
onClick: function() {
|
|
378
|
-
setCurrentID(item.value);
|
|
379
|
-
setIsDropdownOpen(false);
|
|
380
|
-
},
|
|
381
|
-
children: item.name
|
|
382
|
-
}, item.value);
|
|
383
|
-
})
|
|
384
|
-
]
|
|
385
|
-
})
|
|
386
|
-
]
|
|
387
|
-
});
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
export { CustomSelect, CustomUpload };
|
|
274
|
+
export { CustomUpload };
|
package/Modal.cjs.js
CHANGED
package/Modal.esm.js
CHANGED
package/index.cjs.css
CHANGED
|
@@ -3205,8 +3205,6 @@ video {
|
|
|
3205
3205
|
module: ui/template~TemplateBinding#callback;
|
|
3206
3206
|
}
|
|
3207
3207
|
|
|
3208
|
-
/* gary */
|
|
3209
|
-
|
|
3210
3208
|
.customSelect {
|
|
3211
3209
|
-webkit-appearance: none; /* 移除 Safari 內建樣式 */
|
|
3212
3210
|
-moz-appearance: none; /* 移除 Firefox 內建樣式 */
|
|
@@ -4219,19 +4217,6 @@ video {
|
|
|
4219
4217
|
border-bottom-width: 1px;
|
|
4220
4218
|
}
|
|
4221
4219
|
|
|
4222
|
-
.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
|
|
4223
|
-
/*rtl:begin:ignore*/left:0/*
|
|
4224
|
-
/*rtl:end:ignore*/}/*
|
|
4225
|
-
/*rtl:begin:ignore*/
|
|
4226
|
-
/*
|
|
4227
|
-
/*rtl:end:ignore*/
|
|
4228
|
-
.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{/*
|
|
4229
|
-
/*rtl:begin:ignore*/right:0/*
|
|
4230
|
-
/*rtl:end:ignore*/}/*
|
|
4231
|
-
/*rtl:begin:ignore*/
|
|
4232
|
-
/*
|
|
4233
|
-
/*rtl:end:ignore*/
|
|
4234
|
-
.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
|
|
4235
4220
|
.rdrCalendarWrapper {
|
|
4236
4221
|
box-sizing: border-box;
|
|
4237
4222
|
background: #ffffff;
|
package/index.cjs.js
CHANGED
|
@@ -21,9 +21,10 @@ var addDays = require('date-fns/addDays');
|
|
|
21
21
|
var CheckboxPrimitive = require('@radix-ui/react-checkbox');
|
|
22
22
|
var reactIcons = require('@radix-ui/react-icons');
|
|
23
23
|
var inputOtp = require('input-otp');
|
|
24
|
+
var clsx = require('clsx');
|
|
25
|
+
var CustomSelect = require('./CustomSelect.cjs.js');
|
|
24
26
|
require('@radix-ui/react-slot');
|
|
25
27
|
require('class-variance-authority');
|
|
26
|
-
require('clsx');
|
|
27
28
|
require('tailwind-merge');
|
|
28
29
|
require('next/dynamic');
|
|
29
30
|
require('./setPrototypeOf.cjs.js');
|
|
@@ -67,7 +68,7 @@ var locales__namespace = /*#__PURE__*/_interopNamespace(locales);
|
|
|
67
68
|
var addDays__default = /*#__PURE__*/_interopDefaultLegacy(addDays);
|
|
68
69
|
var CheckboxPrimitive__namespace = /*#__PURE__*/_interopNamespace(CheckboxPrimitive);
|
|
69
70
|
|
|
70
|
-
function _define_property$
|
|
71
|
+
function _define_property$7(obj, key, value) {
|
|
71
72
|
if (key in obj) {
|
|
72
73
|
Object.defineProperty(obj, key, {
|
|
73
74
|
value: value,
|
|
@@ -90,7 +91,7 @@ function _object_spread$6(target) {
|
|
|
90
91
|
}));
|
|
91
92
|
}
|
|
92
93
|
ownKeys.forEach(function(key) {
|
|
93
|
-
_define_property$
|
|
94
|
+
_define_property$7(target, key, source[key]);
|
|
94
95
|
});
|
|
95
96
|
}
|
|
96
97
|
return target;
|
|
@@ -321,7 +322,7 @@ var verifyTaxId = function(idStr) {
|
|
|
321
322
|
return isLegal;
|
|
322
323
|
};
|
|
323
324
|
|
|
324
|
-
function _define_property$
|
|
325
|
+
function _define_property$6(obj, key, value) {
|
|
325
326
|
if (key in obj) {
|
|
326
327
|
Object.defineProperty(obj, key, {
|
|
327
328
|
value: value,
|
|
@@ -362,7 +363,7 @@ function _object_spread$5(target) {
|
|
|
362
363
|
}));
|
|
363
364
|
}
|
|
364
365
|
ownKeys.forEach(function(key) {
|
|
365
|
-
_define_property$
|
|
366
|
+
_define_property$6(target, key, source[key]);
|
|
366
367
|
});
|
|
367
368
|
}
|
|
368
369
|
return target;
|
|
@@ -479,7 +480,7 @@ function Calendar(_param) {
|
|
|
479
480
|
}
|
|
480
481
|
Calendar.displayName = "Calendar";
|
|
481
482
|
|
|
482
|
-
function _define_property$
|
|
483
|
+
function _define_property$5(obj, key, value) {
|
|
483
484
|
if (key in obj) {
|
|
484
485
|
Object.defineProperty(obj, key, {
|
|
485
486
|
value: value,
|
|
@@ -502,7 +503,7 @@ function _object_spread$4(target) {
|
|
|
502
503
|
}));
|
|
503
504
|
}
|
|
504
505
|
ownKeys.forEach(function(key) {
|
|
505
|
-
_define_property$
|
|
506
|
+
_define_property$5(target, key, source[key]);
|
|
506
507
|
});
|
|
507
508
|
}
|
|
508
509
|
return target;
|
|
@@ -852,7 +853,7 @@ var ReactDateRange = function(param) {
|
|
|
852
853
|
});
|
|
853
854
|
};
|
|
854
855
|
|
|
855
|
-
function _define_property$
|
|
856
|
+
function _define_property$4(obj, key, value) {
|
|
856
857
|
if (key in obj) {
|
|
857
858
|
Object.defineProperty(obj, key, {
|
|
858
859
|
value: value,
|
|
@@ -875,7 +876,7 @@ function _object_spread$3(target) {
|
|
|
875
876
|
}));
|
|
876
877
|
}
|
|
877
878
|
ownKeys.forEach(function(key) {
|
|
878
|
-
_define_property$
|
|
879
|
+
_define_property$4(target, key, source[key]);
|
|
879
880
|
});
|
|
880
881
|
}
|
|
881
882
|
return target;
|
|
@@ -949,7 +950,7 @@ var Checkbox = /*#__PURE__*/ React__namespace.forwardRef(function(_param, ref) {
|
|
|
949
950
|
});
|
|
950
951
|
Checkbox.displayName = CheckboxPrimitive__namespace.Root.displayName;
|
|
951
952
|
|
|
952
|
-
function _define_property$
|
|
953
|
+
function _define_property$3(obj, key, value) {
|
|
953
954
|
if (key in obj) {
|
|
954
955
|
Object.defineProperty(obj, key, {
|
|
955
956
|
value: value,
|
|
@@ -990,7 +991,7 @@ function _object_spread$2(target) {
|
|
|
990
991
|
}));
|
|
991
992
|
}
|
|
992
993
|
ownKeys.forEach(function(key) {
|
|
993
|
-
_define_property$
|
|
994
|
+
_define_property$3(target, key, source[key]);
|
|
994
995
|
});
|
|
995
996
|
}
|
|
996
997
|
return target;
|
|
@@ -1101,6 +1102,81 @@ var InputOTPSeparator = /*#__PURE__*/ React__namespace.forwardRef(function(_para
|
|
|
1101
1102
|
}));
|
|
1102
1103
|
});
|
|
1103
1104
|
|
|
1105
|
+
function _define_property$2(obj, key, value) {
|
|
1106
|
+
if (key in obj) {
|
|
1107
|
+
Object.defineProperty(obj, key, {
|
|
1108
|
+
value: value,
|
|
1109
|
+
enumerable: true,
|
|
1110
|
+
configurable: true,
|
|
1111
|
+
writable: true
|
|
1112
|
+
});
|
|
1113
|
+
} else {
|
|
1114
|
+
obj[key] = value;
|
|
1115
|
+
}
|
|
1116
|
+
return obj;
|
|
1117
|
+
}
|
|
1118
|
+
var openClassNames = {
|
|
1119
|
+
right: "translate-x-0",
|
|
1120
|
+
left: "translate-x-0",
|
|
1121
|
+
top: "translate-y-0",
|
|
1122
|
+
bottom: "translate-y-0"
|
|
1123
|
+
};
|
|
1124
|
+
var closeClassNames = {
|
|
1125
|
+
right: "translate-x-full",
|
|
1126
|
+
left: "-translate-x-full",
|
|
1127
|
+
top: "-translate-y-full",
|
|
1128
|
+
bottom: "translate-y-full"
|
|
1129
|
+
};
|
|
1130
|
+
var classNames = {
|
|
1131
|
+
right: "inset-y-0 right-0",
|
|
1132
|
+
left: "inset-y-0 left-0",
|
|
1133
|
+
top: "inset-x-0 top-0",
|
|
1134
|
+
bottom: "inset-x-0 bottom-0"
|
|
1135
|
+
};
|
|
1136
|
+
var Drawer = function(param) {
|
|
1137
|
+
var isOpen = param.isOpen, setIsOpen = param.setIsOpen, _param_side = param.side, side = _param_side === void 0 ? "right" : _param_side, children = param.children;
|
|
1138
|
+
return /*#__PURE__*/ jsxRuntime.jsxs("div", {
|
|
1139
|
+
id: "dialog-".concat(side),
|
|
1140
|
+
className: "relative z-10",
|
|
1141
|
+
"aria-labelledby": "slide-over",
|
|
1142
|
+
role: "dialog",
|
|
1143
|
+
"aria-modal": "true",
|
|
1144
|
+
onClick: function() {
|
|
1145
|
+
return setIsOpen(!isOpen);
|
|
1146
|
+
},
|
|
1147
|
+
children: [
|
|
1148
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1149
|
+
className: clsx.clsx("fixed inset-0 bg-gray-900 bg-opacity-25 transition-all", {
|
|
1150
|
+
"opacity-100 duration-500 ease-in-out visible": isOpen
|
|
1151
|
+
}, {
|
|
1152
|
+
"opacity-0 duration-500 ease-in-out invisible": !isOpen
|
|
1153
|
+
})
|
|
1154
|
+
}),
|
|
1155
|
+
/*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1156
|
+
className: clsx.clsx({
|
|
1157
|
+
"fixed inset-0 overflow-hidden": isOpen
|
|
1158
|
+
}),
|
|
1159
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1160
|
+
className: "absolute inset-0 overflow-hidden",
|
|
1161
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1162
|
+
className: clsx.clsx("pointer-events-none fixed max-w-full", classNames[side]),
|
|
1163
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1164
|
+
className: clsx.clsx("pointer-events-auto relative w-full h-full transform transition ease-in-out duration-500", _define_property$2({}, closeClassNames[side], !isOpen), _define_property$2({}, openClassNames[side], isOpen)),
|
|
1165
|
+
onClick: function(event) {
|
|
1166
|
+
event.stopPropagation();
|
|
1167
|
+
},
|
|
1168
|
+
children: /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
1169
|
+
className: clsx.clsx("flex flex-col h-full overflow-y-scroll bg-white shadow-xl"),
|
|
1170
|
+
children: children
|
|
1171
|
+
})
|
|
1172
|
+
})
|
|
1173
|
+
})
|
|
1174
|
+
})
|
|
1175
|
+
})
|
|
1176
|
+
]
|
|
1177
|
+
});
|
|
1178
|
+
};
|
|
1179
|
+
|
|
1104
1180
|
function Spin(props) {
|
|
1105
1181
|
var show = props.show, _props_overlayBackground = props.overlayBackground, overlayBackground = _props_overlayBackground === void 0 ? "bg-[#00000055]" : _props_overlayBackground;
|
|
1106
1182
|
return show ? /*#__PURE__*/ jsxRuntime.jsx("div", {
|
|
@@ -2079,8 +2155,10 @@ exports.SelectSeparator = baseSwitch.SelectSeparator;
|
|
|
2079
2155
|
exports.SelectTrigger = baseSwitch.SelectTrigger;
|
|
2080
2156
|
exports.SelectValue = baseSwitch.SelectValue;
|
|
2081
2157
|
exports.validateMsg = baseSwitch.validateMsg;
|
|
2158
|
+
exports.CustomSelect = CustomSelect.CustomSelect;
|
|
2082
2159
|
exports.Checkbox = Checkbox;
|
|
2083
2160
|
exports.DateRangePicker = DateRangePicker;
|
|
2161
|
+
exports.Drawer = Drawer;
|
|
2084
2162
|
exports.DropDown = DropDown;
|
|
2085
2163
|
exports.InputOTP = InputOTP;
|
|
2086
2164
|
exports.InputOTPGroup = InputOTPGroup;
|
package/index.esm.css
CHANGED
|
@@ -3205,8 +3205,6 @@ video {
|
|
|
3205
3205
|
module: ui/template~TemplateBinding#callback;
|
|
3206
3206
|
}
|
|
3207
3207
|
|
|
3208
|
-
/* gary */
|
|
3209
|
-
|
|
3210
3208
|
.customSelect {
|
|
3211
3209
|
-webkit-appearance: none; /* 移除 Safari 內建樣式 */
|
|
3212
3210
|
-moz-appearance: none; /* 移除 Firefox 內建樣式 */
|
|
@@ -4219,19 +4217,6 @@ video {
|
|
|
4219
4217
|
border-bottom-width: 1px;
|
|
4220
4218
|
}
|
|
4221
4219
|
|
|
4222
|
-
.flatpickr-calendar{background:transparent;opacity:0;display:none;text-align:center;visibility:hidden;padding:0;-webkit-animation:none;animation:none;direction:ltr;border:0;font-size:14px;line-height:24px;border-radius:5px;position:absolute;width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-touch-action:manipulation;touch-action:manipulation;background:#fff;-webkit-box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08);box-shadow:1px 0 0 #e6e6e6,-1px 0 0 #e6e6e6,0 1px 0 #e6e6e6,0 -1px 0 #e6e6e6,0 3px 13px rgba(0,0,0,0.08)}.flatpickr-calendar.open,.flatpickr-calendar.inline{opacity:1;max-height:640px;visibility:visible}.flatpickr-calendar.open{display:inline-block;z-index:99999}.flatpickr-calendar.animate.open{-webkit-animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1);animation:fpFadeInDown 300ms cubic-bezier(.23,1,.32,1)}.flatpickr-calendar.inline{display:block;position:relative;top:2px}.flatpickr-calendar.static{position:absolute;top:calc(100% + 2px)}.flatpickr-calendar.static.open{z-index:999;display:block}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+1) .flatpickr-day.inRange:nth-child(7n+7){-webkit-box-shadow:none !important;box-shadow:none !important}.flatpickr-calendar.multiMonth .flatpickr-days .dayContainer:nth-child(n+2) .flatpickr-day.inRange:nth-child(7n+1){-webkit-box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-2px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-calendar .hasWeeks .dayContainer,.flatpickr-calendar .hasTime .dayContainer{border-bottom:0;border-bottom-right-radius:0;border-bottom-left-radius:0}.flatpickr-calendar .hasWeeks .dayContainer{border-left:0}.flatpickr-calendar.hasTime .flatpickr-time{height:40px;border-top:1px solid #e6e6e6}.flatpickr-calendar.noCalendar.hasTime .flatpickr-time{height:auto}.flatpickr-calendar:before,.flatpickr-calendar:after{position:absolute;display:block;pointer-events:none;border:solid transparent;content:'';height:0;width:0;left:22px}.flatpickr-calendar.rightMost:before,.flatpickr-calendar.arrowRight:before,.flatpickr-calendar.rightMost:after,.flatpickr-calendar.arrowRight:after{left:auto;right:22px}.flatpickr-calendar.arrowCenter:before,.flatpickr-calendar.arrowCenter:after{left:50%;right:50%}.flatpickr-calendar:before{border-width:5px;margin:0 -5px}.flatpickr-calendar:after{border-width:4px;margin:0 -4px}.flatpickr-calendar.arrowTop:before,.flatpickr-calendar.arrowTop:after{bottom:100%}.flatpickr-calendar.arrowTop:before{border-bottom-color:#e6e6e6}.flatpickr-calendar.arrowTop:after{border-bottom-color:#fff}.flatpickr-calendar.arrowBottom:before,.flatpickr-calendar.arrowBottom:after{top:100%}.flatpickr-calendar.arrowBottom:before{border-top-color:#e6e6e6}.flatpickr-calendar.arrowBottom:after{border-top-color:#fff}.flatpickr-calendar:focus{outline:0}.flatpickr-wrapper{position:relative;display:inline-block}.flatpickr-months{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-months .flatpickr-month{background:transparent;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9);height:34px;line-height:1;text-align:center;position:relative;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;overflow:hidden;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}.flatpickr-months .flatpickr-prev-month,.flatpickr-months .flatpickr-next-month{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;text-decoration:none;cursor:pointer;position:absolute;top:0;height:34px;padding:10px;z-index:3;color:rgba(0,0,0,0.9);fill:rgba(0,0,0,0.9)}.flatpickr-months .flatpickr-prev-month.flatpickr-disabled,.flatpickr-months .flatpickr-next-month.flatpickr-disabled{display:none}.flatpickr-months .flatpickr-prev-month i,.flatpickr-months .flatpickr-next-month i{position:relative}.flatpickr-months .flatpickr-prev-month.flatpickr-prev-month,.flatpickr-months .flatpickr-next-month.flatpickr-prev-month{/*
|
|
4223
|
-
/*rtl:begin:ignore*/left:0/*
|
|
4224
|
-
/*rtl:end:ignore*/}/*
|
|
4225
|
-
/*rtl:begin:ignore*/
|
|
4226
|
-
/*
|
|
4227
|
-
/*rtl:end:ignore*/
|
|
4228
|
-
.flatpickr-months .flatpickr-prev-month.flatpickr-next-month,.flatpickr-months .flatpickr-next-month.flatpickr-next-month{/*
|
|
4229
|
-
/*rtl:begin:ignore*/right:0/*
|
|
4230
|
-
/*rtl:end:ignore*/}/*
|
|
4231
|
-
/*rtl:begin:ignore*/
|
|
4232
|
-
/*
|
|
4233
|
-
/*rtl:end:ignore*/
|
|
4234
|
-
.flatpickr-months .flatpickr-prev-month:hover,.flatpickr-months .flatpickr-next-month:hover{color:#959ea9}.flatpickr-months .flatpickr-prev-month:hover svg,.flatpickr-months .flatpickr-next-month:hover svg{fill:#f64747}.flatpickr-months .flatpickr-prev-month svg,.flatpickr-months .flatpickr-next-month svg{width:14px;height:14px}.flatpickr-months .flatpickr-prev-month svg path,.flatpickr-months .flatpickr-next-month svg path{-webkit-transition:fill .1s;transition:fill .1s;fill:inherit}.numInputWrapper{position:relative;height:auto}.numInputWrapper input,.numInputWrapper span{display:inline-block}.numInputWrapper input{width:100%}.numInputWrapper input::-ms-clear{display:none}.numInputWrapper input::-webkit-outer-spin-button,.numInputWrapper input::-webkit-inner-spin-button{margin:0;-webkit-appearance:none}.numInputWrapper span{position:absolute;right:0;width:14px;padding:0 4px 0 2px;height:50%;line-height:50%;opacity:0;cursor:pointer;border:1px solid rgba(57,57,57,0.15);-webkit-box-sizing:border-box;box-sizing:border-box}.numInputWrapper span:hover{background:rgba(0,0,0,0.1)}.numInputWrapper span:active{background:rgba(0,0,0,0.2)}.numInputWrapper span:after{display:block;content:"";position:absolute}.numInputWrapper span.arrowUp{top:0;border-bottom:0}.numInputWrapper span.arrowUp:after{border-left:4px solid transparent;border-right:4px solid transparent;border-bottom:4px solid rgba(57,57,57,0.6);top:26%}.numInputWrapper span.arrowDown{top:50%}.numInputWrapper span.arrowDown:after{border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid rgba(57,57,57,0.6);top:40%}.numInputWrapper span svg{width:inherit;height:auto}.numInputWrapper span svg path{fill:rgba(0,0,0,0.5)}.numInputWrapper:hover{background:rgba(0,0,0,0.05)}.numInputWrapper:hover span{opacity:1}.flatpickr-current-month{font-size:135%;line-height:inherit;font-weight:300;color:inherit;position:absolute;width:75%;left:12.5%;padding:7.48px 0 0 0;line-height:1;height:34px;display:inline-block;text-align:center;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}.flatpickr-current-month span.cur-month{font-family:inherit;font-weight:700;color:inherit;display:inline-block;margin-left:.5ch;padding:0}.flatpickr-current-month span.cur-month:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .numInputWrapper{width:6ch;width:7ch\0;display:inline-block}.flatpickr-current-month .numInputWrapper span.arrowUp:after{border-bottom-color:rgba(0,0,0,0.9)}.flatpickr-current-month .numInputWrapper span.arrowDown:after{border-top-color:rgba(0,0,0,0.9)}.flatpickr-current-month input.cur-year{background:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;color:inherit;cursor:text;padding:0 0 0 .5ch;margin:0;display:inline-block;font-size:inherit;font-family:inherit;font-weight:300;line-height:inherit;height:auto;border:0;border-radius:0;vertical-align:initial;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-current-month input.cur-year:focus{outline:0}.flatpickr-current-month input.cur-year[disabled],.flatpickr-current-month input.cur-year[disabled]:hover{font-size:100%;color:rgba(0,0,0,0.5);background:transparent;pointer-events:none}.flatpickr-current-month .flatpickr-monthDropdown-months{appearance:menulist;background:transparent;border:none;border-radius:0;box-sizing:border-box;color:inherit;cursor:pointer;font-size:inherit;font-family:inherit;font-weight:300;height:auto;line-height:inherit;margin:-1px 0 0 0;outline:none;padding:0 0 0 .5ch;position:relative;vertical-align:initial;-webkit-box-sizing:border-box;-webkit-appearance:menulist;-moz-appearance:menulist;width:auto}.flatpickr-current-month .flatpickr-monthDropdown-months:focus,.flatpickr-current-month .flatpickr-monthDropdown-months:active{outline:none}.flatpickr-current-month .flatpickr-monthDropdown-months:hover{background:rgba(0,0,0,0.05)}.flatpickr-current-month .flatpickr-monthDropdown-months .flatpickr-monthDropdown-month{background-color:transparent;outline:none;padding:0}.flatpickr-weekdays{background:transparent;text-align:center;overflow:hidden;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:center;-webkit-align-items:center;-ms-flex-align:center;align-items:center;height:28px}.flatpickr-weekdays .flatpickr-weekdaycontainer{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1}span.flatpickr-weekday{cursor:default;font-size:90%;background:transparent;color:rgba(0,0,0,0.54);line-height:1;margin:0;text-align:center;display:block;-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;font-weight:bolder}.dayContainer,.flatpickr-weeks{padding:1px 0 0 0}.flatpickr-days{position:relative;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-align:start;-webkit-align-items:flex-start;-ms-flex-align:start;align-items:flex-start;width:307.875px}.flatpickr-days:focus{outline:0}.dayContainer{padding:0;outline:0;text-align:left;width:307.875px;min-width:307.875px;max-width:307.875px;-webkit-box-sizing:border-box;box-sizing:border-box;display:inline-block;display:-ms-flexbox;display:-webkit-box;display:-webkit-flex;display:flex;-webkit-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-wrap:wrap;-ms-flex-pack:justify;-webkit-justify-content:space-around;justify-content:space-around;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0);opacity:1}.dayContainer + .dayContainer{-webkit-box-shadow:-1px 0 0 #e6e6e6;box-shadow:-1px 0 0 #e6e6e6}.flatpickr-day{background:none;border:1px solid transparent;border-radius:150px;-webkit-box-sizing:border-box;box-sizing:border-box;color:#393939;cursor:pointer;font-weight:400;width:14.2857143%;-webkit-flex-basis:14.2857143%;-ms-flex-preferred-size:14.2857143%;flex-basis:14.2857143%;max-width:39px;height:39px;line-height:39px;margin:0;display:inline-block;position:relative;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;text-align:center}.flatpickr-day.inRange,.flatpickr-day.prevMonthDay.inRange,.flatpickr-day.nextMonthDay.inRange,.flatpickr-day.today.inRange,.flatpickr-day.prevMonthDay.today.inRange,.flatpickr-day.nextMonthDay.today.inRange,.flatpickr-day:hover,.flatpickr-day.prevMonthDay:hover,.flatpickr-day.nextMonthDay:hover,.flatpickr-day:focus,.flatpickr-day.prevMonthDay:focus,.flatpickr-day.nextMonthDay:focus{cursor:pointer;outline:0;background:#e6e6e6;border-color:#e6e6e6}.flatpickr-day.today{border-color:#959ea9}.flatpickr-day.today:hover,.flatpickr-day.today:focus{border-color:#959ea9;background:#959ea9;color:#fff}.flatpickr-day.selected,.flatpickr-day.startRange,.flatpickr-day.endRange,.flatpickr-day.selected.inRange,.flatpickr-day.startRange.inRange,.flatpickr-day.endRange.inRange,.flatpickr-day.selected:focus,.flatpickr-day.startRange:focus,.flatpickr-day.endRange:focus,.flatpickr-day.selected:hover,.flatpickr-day.startRange:hover,.flatpickr-day.endRange:hover,.flatpickr-day.selected.prevMonthDay,.flatpickr-day.startRange.prevMonthDay,.flatpickr-day.endRange.prevMonthDay,.flatpickr-day.selected.nextMonthDay,.flatpickr-day.startRange.nextMonthDay,.flatpickr-day.endRange.nextMonthDay{background:#569ff7;-webkit-box-shadow:none;box-shadow:none;color:#fff;border-color:#569ff7}.flatpickr-day.selected.startRange,.flatpickr-day.startRange.startRange,.flatpickr-day.endRange.startRange{border-radius:50px 0 0 50px}.flatpickr-day.selected.endRange,.flatpickr-day.startRange.endRange,.flatpickr-day.endRange.endRange{border-radius:0 50px 50px 0}.flatpickr-day.selected.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.startRange.startRange + .endRange:not(:nth-child(7n+1)),.flatpickr-day.endRange.startRange + .endRange:not(:nth-child(7n+1)){-webkit-box-shadow:-10px 0 0 #569ff7;box-shadow:-10px 0 0 #569ff7}.flatpickr-day.selected.startRange.endRange,.flatpickr-day.startRange.startRange.endRange,.flatpickr-day.endRange.startRange.endRange{border-radius:50px}.flatpickr-day.inRange{border-radius:0;-webkit-box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6;box-shadow:-5px 0 0 #e6e6e6,5px 0 0 #e6e6e6}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover,.flatpickr-day.prevMonthDay,.flatpickr-day.nextMonthDay,.flatpickr-day.notAllowed,.flatpickr-day.notAllowed.prevMonthDay,.flatpickr-day.notAllowed.nextMonthDay{color:rgba(57,57,57,0.3);background:transparent;border-color:transparent;cursor:default}.flatpickr-day.flatpickr-disabled,.flatpickr-day.flatpickr-disabled:hover{cursor:not-allowed;color:rgba(57,57,57,0.1)}.flatpickr-day.week.selected{border-radius:0;-webkit-box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7;box-shadow:-5px 0 0 #569ff7,5px 0 0 #569ff7}.flatpickr-day.hidden{visibility:hidden}.rangeMode .flatpickr-day{margin-top:1px}.flatpickr-weekwrapper{float:left}.flatpickr-weekwrapper .flatpickr-weeks{padding:0 12px;-webkit-box-shadow:1px 0 0 #e6e6e6;box-shadow:1px 0 0 #e6e6e6}.flatpickr-weekwrapper .flatpickr-weekday{float:none;width:100%;line-height:28px}.flatpickr-weekwrapper span.flatpickr-day,.flatpickr-weekwrapper span.flatpickr-day:hover{display:block;width:100%;max-width:none;color:rgba(57,57,57,0.3);background:transparent;cursor:default;border:none}.flatpickr-innerContainer{display:block;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden}.flatpickr-rContainer{display:inline-block;padding:0;-webkit-box-sizing:border-box;box-sizing:border-box}.flatpickr-time{text-align:center;outline:0;display:block;height:0;line-height:40px;max-height:40px;-webkit-box-sizing:border-box;box-sizing:border-box;overflow:hidden;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex}.flatpickr-time:after{content:"";display:table;clear:both}.flatpickr-time .numInputWrapper{-webkit-box-flex:1;-webkit-flex:1;-ms-flex:1;flex:1;width:40%;height:40px;float:left}.flatpickr-time .numInputWrapper span.arrowUp:after{border-bottom-color:#393939}.flatpickr-time .numInputWrapper span.arrowDown:after{border-top-color:#393939}.flatpickr-time.hasSeconds .numInputWrapper{width:26%}.flatpickr-time.time24hr .numInputWrapper{width:49%}.flatpickr-time input{background:transparent;-webkit-box-shadow:none;box-shadow:none;border:0;border-radius:0;text-align:center;margin:0;padding:0;height:inherit;line-height:inherit;color:#393939;font-size:14px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-appearance:textfield;-moz-appearance:textfield;appearance:textfield}.flatpickr-time input.flatpickr-hour{font-weight:bold}.flatpickr-time input.flatpickr-minute,.flatpickr-time input.flatpickr-second{font-weight:400}.flatpickr-time input:focus{outline:0;border:0}.flatpickr-time .flatpickr-time-separator,.flatpickr-time .flatpickr-am-pm{height:inherit;float:left;line-height:inherit;color:#393939;font-weight:bold;width:2%;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-align-self:center;-ms-flex-item-align:center;align-self:center}.flatpickr-time .flatpickr-am-pm{outline:0;width:18%;cursor:pointer;text-align:center;font-weight:400}.flatpickr-time input:hover,.flatpickr-time .flatpickr-am-pm:hover,.flatpickr-time input:focus,.flatpickr-time .flatpickr-am-pm:focus{background:#eee}.flatpickr-input[readonly]{cursor:pointer}@-webkit-keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}@keyframes fpFadeInDown{from{opacity:0;-webkit-transform:translate3d(0,-20px,0);transform:translate3d(0,-20px,0)}to{opacity:1;-webkit-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}}
|
|
4235
4220
|
.rdrCalendarWrapper {
|
|
4236
4221
|
box-sizing: border-box;
|
|
4237
4222
|
background: #ffffff;
|
package/index.esm.js
CHANGED
|
@@ -19,9 +19,10 @@ import addDays from 'date-fns/addDays';
|
|
|
19
19
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
20
20
|
import { CheckIcon } from '@radix-ui/react-icons';
|
|
21
21
|
import { OTPInput, OTPInputContext } from 'input-otp';
|
|
22
|
+
import { clsx } from 'clsx';
|
|
23
|
+
export { C as CustomSelect } from './CustomSelect.esm.js';
|
|
22
24
|
import '@radix-ui/react-slot';
|
|
23
25
|
import 'class-variance-authority';
|
|
24
|
-
import 'clsx';
|
|
25
26
|
import 'tailwind-merge';
|
|
26
27
|
import 'next/dynamic';
|
|
27
28
|
import './setPrototypeOf.esm.js';
|
|
@@ -35,7 +36,7 @@ import './_commonjsHelpers.esm.js';
|
|
|
35
36
|
import './Modal.esm.js';
|
|
36
37
|
import '@radix-ui/react-select';
|
|
37
38
|
|
|
38
|
-
function _define_property$
|
|
39
|
+
function _define_property$7(obj, key, value) {
|
|
39
40
|
if (key in obj) {
|
|
40
41
|
Object.defineProperty(obj, key, {
|
|
41
42
|
value: value,
|
|
@@ -58,7 +59,7 @@ function _object_spread$6(target) {
|
|
|
58
59
|
}));
|
|
59
60
|
}
|
|
60
61
|
ownKeys.forEach(function(key) {
|
|
61
|
-
_define_property$
|
|
62
|
+
_define_property$7(target, key, source[key]);
|
|
62
63
|
});
|
|
63
64
|
}
|
|
64
65
|
return target;
|
|
@@ -289,7 +290,7 @@ var verifyTaxId = function(idStr) {
|
|
|
289
290
|
return isLegal;
|
|
290
291
|
};
|
|
291
292
|
|
|
292
|
-
function _define_property$
|
|
293
|
+
function _define_property$6(obj, key, value) {
|
|
293
294
|
if (key in obj) {
|
|
294
295
|
Object.defineProperty(obj, key, {
|
|
295
296
|
value: value,
|
|
@@ -330,7 +331,7 @@ function _object_spread$5(target) {
|
|
|
330
331
|
}));
|
|
331
332
|
}
|
|
332
333
|
ownKeys.forEach(function(key) {
|
|
333
|
-
_define_property$
|
|
334
|
+
_define_property$6(target, key, source[key]);
|
|
334
335
|
});
|
|
335
336
|
}
|
|
336
337
|
return target;
|
|
@@ -447,7 +448,7 @@ function Calendar(_param) {
|
|
|
447
448
|
}
|
|
448
449
|
Calendar.displayName = "Calendar";
|
|
449
450
|
|
|
450
|
-
function _define_property$
|
|
451
|
+
function _define_property$5(obj, key, value) {
|
|
451
452
|
if (key in obj) {
|
|
452
453
|
Object.defineProperty(obj, key, {
|
|
453
454
|
value: value,
|
|
@@ -470,7 +471,7 @@ function _object_spread$4(target) {
|
|
|
470
471
|
}));
|
|
471
472
|
}
|
|
472
473
|
ownKeys.forEach(function(key) {
|
|
473
|
-
_define_property$
|
|
474
|
+
_define_property$5(target, key, source[key]);
|
|
474
475
|
});
|
|
475
476
|
}
|
|
476
477
|
return target;
|
|
@@ -820,7 +821,7 @@ var ReactDateRange = function(param) {
|
|
|
820
821
|
});
|
|
821
822
|
};
|
|
822
823
|
|
|
823
|
-
function _define_property$
|
|
824
|
+
function _define_property$4(obj, key, value) {
|
|
824
825
|
if (key in obj) {
|
|
825
826
|
Object.defineProperty(obj, key, {
|
|
826
827
|
value: value,
|
|
@@ -843,7 +844,7 @@ function _object_spread$3(target) {
|
|
|
843
844
|
}));
|
|
844
845
|
}
|
|
845
846
|
ownKeys.forEach(function(key) {
|
|
846
|
-
_define_property$
|
|
847
|
+
_define_property$4(target, key, source[key]);
|
|
847
848
|
});
|
|
848
849
|
}
|
|
849
850
|
return target;
|
|
@@ -917,7 +918,7 @@ var Checkbox = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
917
918
|
});
|
|
918
919
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
919
920
|
|
|
920
|
-
function _define_property$
|
|
921
|
+
function _define_property$3(obj, key, value) {
|
|
921
922
|
if (key in obj) {
|
|
922
923
|
Object.defineProperty(obj, key, {
|
|
923
924
|
value: value,
|
|
@@ -958,7 +959,7 @@ function _object_spread$2(target) {
|
|
|
958
959
|
}));
|
|
959
960
|
}
|
|
960
961
|
ownKeys.forEach(function(key) {
|
|
961
|
-
_define_property$
|
|
962
|
+
_define_property$3(target, key, source[key]);
|
|
962
963
|
});
|
|
963
964
|
}
|
|
964
965
|
return target;
|
|
@@ -1069,6 +1070,81 @@ var InputOTPSeparator = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
1069
1070
|
}));
|
|
1070
1071
|
});
|
|
1071
1072
|
|
|
1073
|
+
function _define_property$2(obj, key, value) {
|
|
1074
|
+
if (key in obj) {
|
|
1075
|
+
Object.defineProperty(obj, key, {
|
|
1076
|
+
value: value,
|
|
1077
|
+
enumerable: true,
|
|
1078
|
+
configurable: true,
|
|
1079
|
+
writable: true
|
|
1080
|
+
});
|
|
1081
|
+
} else {
|
|
1082
|
+
obj[key] = value;
|
|
1083
|
+
}
|
|
1084
|
+
return obj;
|
|
1085
|
+
}
|
|
1086
|
+
var openClassNames = {
|
|
1087
|
+
right: "translate-x-0",
|
|
1088
|
+
left: "translate-x-0",
|
|
1089
|
+
top: "translate-y-0",
|
|
1090
|
+
bottom: "translate-y-0"
|
|
1091
|
+
};
|
|
1092
|
+
var closeClassNames = {
|
|
1093
|
+
right: "translate-x-full",
|
|
1094
|
+
left: "-translate-x-full",
|
|
1095
|
+
top: "-translate-y-full",
|
|
1096
|
+
bottom: "translate-y-full"
|
|
1097
|
+
};
|
|
1098
|
+
var classNames = {
|
|
1099
|
+
right: "inset-y-0 right-0",
|
|
1100
|
+
left: "inset-y-0 left-0",
|
|
1101
|
+
top: "inset-x-0 top-0",
|
|
1102
|
+
bottom: "inset-x-0 bottom-0"
|
|
1103
|
+
};
|
|
1104
|
+
var Drawer = function(param) {
|
|
1105
|
+
var isOpen = param.isOpen, setIsOpen = param.setIsOpen, _param_side = param.side, side = _param_side === void 0 ? "right" : _param_side, children = param.children;
|
|
1106
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
1107
|
+
id: "dialog-".concat(side),
|
|
1108
|
+
className: "relative z-10",
|
|
1109
|
+
"aria-labelledby": "slide-over",
|
|
1110
|
+
role: "dialog",
|
|
1111
|
+
"aria-modal": "true",
|
|
1112
|
+
onClick: function() {
|
|
1113
|
+
return setIsOpen(!isOpen);
|
|
1114
|
+
},
|
|
1115
|
+
children: [
|
|
1116
|
+
/*#__PURE__*/ jsx("div", {
|
|
1117
|
+
className: clsx("fixed inset-0 bg-gray-900 bg-opacity-25 transition-all", {
|
|
1118
|
+
"opacity-100 duration-500 ease-in-out visible": isOpen
|
|
1119
|
+
}, {
|
|
1120
|
+
"opacity-0 duration-500 ease-in-out invisible": !isOpen
|
|
1121
|
+
})
|
|
1122
|
+
}),
|
|
1123
|
+
/*#__PURE__*/ jsx("div", {
|
|
1124
|
+
className: clsx({
|
|
1125
|
+
"fixed inset-0 overflow-hidden": isOpen
|
|
1126
|
+
}),
|
|
1127
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1128
|
+
className: "absolute inset-0 overflow-hidden",
|
|
1129
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1130
|
+
className: clsx("pointer-events-none fixed max-w-full", classNames[side]),
|
|
1131
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1132
|
+
className: clsx("pointer-events-auto relative w-full h-full transform transition ease-in-out duration-500", _define_property$2({}, closeClassNames[side], !isOpen), _define_property$2({}, openClassNames[side], isOpen)),
|
|
1133
|
+
onClick: function(event) {
|
|
1134
|
+
event.stopPropagation();
|
|
1135
|
+
},
|
|
1136
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1137
|
+
className: clsx("flex flex-col h-full overflow-y-scroll bg-white shadow-xl"),
|
|
1138
|
+
children: children
|
|
1139
|
+
})
|
|
1140
|
+
})
|
|
1141
|
+
})
|
|
1142
|
+
})
|
|
1143
|
+
})
|
|
1144
|
+
]
|
|
1145
|
+
});
|
|
1146
|
+
};
|
|
1147
|
+
|
|
1072
1148
|
function Spin(props) {
|
|
1073
1149
|
var show = props.show, _props_overlayBackground = props.overlayBackground, overlayBackground = _props_overlayBackground === void 0 ? "bg-[#00000055]" : _props_overlayBackground;
|
|
1074
1150
|
return show ? /*#__PURE__*/ jsx("div", {
|
|
@@ -2032,4 +2108,4 @@ var InputOTPs = function(param) {
|
|
|
2032
2108
|
});
|
|
2033
2109
|
};
|
|
2034
2110
|
|
|
2035
|
-
export { Checkbox, DateRangePicker, DropDown, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputOTPs, ReactDateRange, Regex, SingleDatePicker, Spin, Switch, verifyId, verifyTaiwanIdIntermediateString, verifyTaxId };
|
|
2111
|
+
export { Checkbox, DateRangePicker, Drawer, DropDown, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputOTPs, ReactDateRange, Regex, SingleDatePicker, Spin, Switch, verifyId, verifyTaiwanIdIntermediateString, verifyTaxId };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sunggang/ui-lib",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"main": "./index.cjs.js",
|
|
5
5
|
"module": "./index.esm.js",
|
|
6
6
|
"types": "./dist/src/index.d.ts",
|
|
@@ -50,14 +50,8 @@
|
|
|
50
50
|
"import": "./Tabs.cjs.mjs",
|
|
51
51
|
"default": "./Tabs.cjs.js"
|
|
52
52
|
},
|
|
53
|
-
"./style.css": "./dist/index.esm.css",
|
|
54
|
-
"./index.esm.css": "./dist/index.esm.css",
|
|
55
|
-
"./dist/style.css": "./dist/index.esm.css",
|
|
56
53
|
"./package.json": "./package.json"
|
|
57
54
|
},
|
|
58
|
-
"sideEffects": [
|
|
59
|
-
"./dist/index.esm.css"
|
|
60
|
-
],
|
|
61
55
|
"dependencies": {
|
|
62
56
|
"@emotion/react": "^11.14.0",
|
|
63
57
|
"@emotion/styled": "^11.14.0",
|
package/src/index.d.ts
CHANGED
|
@@ -10,6 +10,8 @@ export * from './components/ui/reactDateRange';
|
|
|
10
10
|
export * from './components/ui/checkbox';
|
|
11
11
|
export * from './components/ui/inputOtp';
|
|
12
12
|
export * from './lib/Function';
|
|
13
|
+
export * from './lib/Drawer/Base';
|
|
14
|
+
export * from './lib/Select/CustomSelect';
|
|
13
15
|
export * from './lib/Spin';
|
|
14
16
|
export * from './lib/Dropdown';
|
|
15
17
|
export * from './lib/InputOtp';
|