@sunggang/ui-lib 0.4.2 → 0.4.4
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/BaseCkeditor.cjs.js +3 -0
- package/BaseCkeditor.esm.js +4 -1
- package/BigCalender.cjs.js +81 -28
- package/BigCalender.esm.js +82 -29
- package/CkEditor.cjs.js +3 -0
- package/CkEditor.esm.js +3 -0
- package/CustomSelect.cjs.js +124 -0
- package/CustomSelect.esm.js +122 -0
- package/Form.cjs.js +25 -138
- package/Form.esm.js +25 -138
- package/Modal.cjs.js +1 -2
- package/Modal.esm.js +1 -2
- package/_commonjsHelpers.esm.js +1 -1
- package/baseSwitch.cjs.js +40 -2407
- package/baseSwitch.esm.js +53 -2422
- package/index.cjs.css +0 -18
- package/index.cjs.js +92 -11
- package/index.cjs3.js +1039 -977
- package/index.esm.cjs.js +190 -132
- package/index.esm.css +0 -18
- package/index.esm.esm.js +190 -114
- package/index.esm.js +91 -12
- package/index.esm3.js +1039 -977
- package/package.json +2 -7
- package/src/index.d.ts +2 -0
- package/styled-components.esm.cjs.js +1 -1
- package/styled-components.esm.esm.js +1 -1
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';
|
|
@@ -34,8 +35,11 @@ import './_tslib.esm.js';
|
|
|
34
35
|
import './_commonjsHelpers.esm.js';
|
|
35
36
|
import './Modal.esm.js';
|
|
36
37
|
import '@radix-ui/react-select';
|
|
38
|
+
import 'flatpickr';
|
|
39
|
+
import 'flatpickr/dist/l10n/zh-tw.js';
|
|
40
|
+
import 'flatpickr/dist/flatpickr.min.css';
|
|
37
41
|
|
|
38
|
-
function _define_property$
|
|
42
|
+
function _define_property$7(obj, key, value) {
|
|
39
43
|
if (key in obj) {
|
|
40
44
|
Object.defineProperty(obj, key, {
|
|
41
45
|
value: value,
|
|
@@ -58,7 +62,7 @@ function _object_spread$6(target) {
|
|
|
58
62
|
}));
|
|
59
63
|
}
|
|
60
64
|
ownKeys.forEach(function(key) {
|
|
61
|
-
_define_property$
|
|
65
|
+
_define_property$7(target, key, source[key]);
|
|
62
66
|
});
|
|
63
67
|
}
|
|
64
68
|
return target;
|
|
@@ -289,7 +293,7 @@ var verifyTaxId = function(idStr) {
|
|
|
289
293
|
return isLegal;
|
|
290
294
|
};
|
|
291
295
|
|
|
292
|
-
function _define_property$
|
|
296
|
+
function _define_property$6(obj, key, value) {
|
|
293
297
|
if (key in obj) {
|
|
294
298
|
Object.defineProperty(obj, key, {
|
|
295
299
|
value: value,
|
|
@@ -330,7 +334,7 @@ function _object_spread$5(target) {
|
|
|
330
334
|
}));
|
|
331
335
|
}
|
|
332
336
|
ownKeys.forEach(function(key) {
|
|
333
|
-
_define_property$
|
|
337
|
+
_define_property$6(target, key, source[key]);
|
|
334
338
|
});
|
|
335
339
|
}
|
|
336
340
|
return target;
|
|
@@ -447,7 +451,7 @@ function Calendar(_param) {
|
|
|
447
451
|
}
|
|
448
452
|
Calendar.displayName = "Calendar";
|
|
449
453
|
|
|
450
|
-
function _define_property$
|
|
454
|
+
function _define_property$5(obj, key, value) {
|
|
451
455
|
if (key in obj) {
|
|
452
456
|
Object.defineProperty(obj, key, {
|
|
453
457
|
value: value,
|
|
@@ -470,7 +474,7 @@ function _object_spread$4(target) {
|
|
|
470
474
|
}));
|
|
471
475
|
}
|
|
472
476
|
ownKeys.forEach(function(key) {
|
|
473
|
-
_define_property$
|
|
477
|
+
_define_property$5(target, key, source[key]);
|
|
474
478
|
});
|
|
475
479
|
}
|
|
476
480
|
return target;
|
|
@@ -820,7 +824,7 @@ var ReactDateRange = function(param) {
|
|
|
820
824
|
});
|
|
821
825
|
};
|
|
822
826
|
|
|
823
|
-
function _define_property$
|
|
827
|
+
function _define_property$4(obj, key, value) {
|
|
824
828
|
if (key in obj) {
|
|
825
829
|
Object.defineProperty(obj, key, {
|
|
826
830
|
value: value,
|
|
@@ -843,7 +847,7 @@ function _object_spread$3(target) {
|
|
|
843
847
|
}));
|
|
844
848
|
}
|
|
845
849
|
ownKeys.forEach(function(key) {
|
|
846
|
-
_define_property$
|
|
850
|
+
_define_property$4(target, key, source[key]);
|
|
847
851
|
});
|
|
848
852
|
}
|
|
849
853
|
return target;
|
|
@@ -917,7 +921,7 @@ var Checkbox = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
917
921
|
});
|
|
918
922
|
Checkbox.displayName = CheckboxPrimitive.Root.displayName;
|
|
919
923
|
|
|
920
|
-
function _define_property$
|
|
924
|
+
function _define_property$3(obj, key, value) {
|
|
921
925
|
if (key in obj) {
|
|
922
926
|
Object.defineProperty(obj, key, {
|
|
923
927
|
value: value,
|
|
@@ -958,7 +962,7 @@ function _object_spread$2(target) {
|
|
|
958
962
|
}));
|
|
959
963
|
}
|
|
960
964
|
ownKeys.forEach(function(key) {
|
|
961
|
-
_define_property$
|
|
965
|
+
_define_property$3(target, key, source[key]);
|
|
962
966
|
});
|
|
963
967
|
}
|
|
964
968
|
return target;
|
|
@@ -1069,6 +1073,81 @@ var InputOTPSeparator = /*#__PURE__*/ React.forwardRef(function(_param, ref) {
|
|
|
1069
1073
|
}));
|
|
1070
1074
|
});
|
|
1071
1075
|
|
|
1076
|
+
function _define_property$2(obj, key, value) {
|
|
1077
|
+
if (key in obj) {
|
|
1078
|
+
Object.defineProperty(obj, key, {
|
|
1079
|
+
value: value,
|
|
1080
|
+
enumerable: true,
|
|
1081
|
+
configurable: true,
|
|
1082
|
+
writable: true
|
|
1083
|
+
});
|
|
1084
|
+
} else {
|
|
1085
|
+
obj[key] = value;
|
|
1086
|
+
}
|
|
1087
|
+
return obj;
|
|
1088
|
+
}
|
|
1089
|
+
var openClassNames = {
|
|
1090
|
+
right: "translate-x-0",
|
|
1091
|
+
left: "translate-x-0",
|
|
1092
|
+
top: "translate-y-0",
|
|
1093
|
+
bottom: "translate-y-0"
|
|
1094
|
+
};
|
|
1095
|
+
var closeClassNames = {
|
|
1096
|
+
right: "translate-x-full",
|
|
1097
|
+
left: "-translate-x-full",
|
|
1098
|
+
top: "-translate-y-full",
|
|
1099
|
+
bottom: "translate-y-full"
|
|
1100
|
+
};
|
|
1101
|
+
var classNames = {
|
|
1102
|
+
right: "inset-y-0 right-0",
|
|
1103
|
+
left: "inset-y-0 left-0",
|
|
1104
|
+
top: "inset-x-0 top-0",
|
|
1105
|
+
bottom: "inset-x-0 bottom-0"
|
|
1106
|
+
};
|
|
1107
|
+
var Drawer = function(param) {
|
|
1108
|
+
var isOpen = param.isOpen, setIsOpen = param.setIsOpen, _param_side = param.side, side = _param_side === void 0 ? "right" : _param_side, children = param.children;
|
|
1109
|
+
return /*#__PURE__*/ jsxs("div", {
|
|
1110
|
+
id: "dialog-".concat(side),
|
|
1111
|
+
className: "relative z-10",
|
|
1112
|
+
"aria-labelledby": "slide-over",
|
|
1113
|
+
role: "dialog",
|
|
1114
|
+
"aria-modal": "true",
|
|
1115
|
+
onClick: function() {
|
|
1116
|
+
return setIsOpen(!isOpen);
|
|
1117
|
+
},
|
|
1118
|
+
children: [
|
|
1119
|
+
/*#__PURE__*/ jsx("div", {
|
|
1120
|
+
className: clsx("fixed inset-0 bg-gray-900 bg-opacity-25 transition-all", {
|
|
1121
|
+
"opacity-100 duration-500 ease-in-out visible": isOpen
|
|
1122
|
+
}, {
|
|
1123
|
+
"opacity-0 duration-500 ease-in-out invisible": !isOpen
|
|
1124
|
+
})
|
|
1125
|
+
}),
|
|
1126
|
+
/*#__PURE__*/ jsx("div", {
|
|
1127
|
+
className: clsx({
|
|
1128
|
+
"fixed inset-0 overflow-hidden": isOpen
|
|
1129
|
+
}),
|
|
1130
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1131
|
+
className: "absolute inset-0 overflow-hidden",
|
|
1132
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1133
|
+
className: clsx("pointer-events-none fixed max-w-full", classNames[side]),
|
|
1134
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1135
|
+
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)),
|
|
1136
|
+
onClick: function(event) {
|
|
1137
|
+
event.stopPropagation();
|
|
1138
|
+
},
|
|
1139
|
+
children: /*#__PURE__*/ jsx("div", {
|
|
1140
|
+
className: clsx("flex flex-col h-full overflow-y-scroll bg-white shadow-xl"),
|
|
1141
|
+
children: children
|
|
1142
|
+
})
|
|
1143
|
+
})
|
|
1144
|
+
})
|
|
1145
|
+
})
|
|
1146
|
+
})
|
|
1147
|
+
]
|
|
1148
|
+
});
|
|
1149
|
+
};
|
|
1150
|
+
|
|
1072
1151
|
function Spin(props) {
|
|
1073
1152
|
var show = props.show, _props_overlayBackground = props.overlayBackground, overlayBackground = _props_overlayBackground === void 0 ? "bg-[#00000055]" : _props_overlayBackground;
|
|
1074
1153
|
return show ? /*#__PURE__*/ jsx("div", {
|
|
@@ -2032,4 +2111,4 @@ var InputOTPs = function(param) {
|
|
|
2032
2111
|
});
|
|
2033
2112
|
};
|
|
2034
2113
|
|
|
2035
|
-
export { Checkbox, DateRangePicker, DropDown, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputOTPs, ReactDateRange, Regex, SingleDatePicker, Spin, Switch, verifyId, verifyTaiwanIdIntermediateString, verifyTaxId };
|
|
2114
|
+
export { Checkbox, DateRangePicker, Drawer, DropDown, InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot, InputOTPs, ReactDateRange, Regex, SingleDatePicker, Spin, Switch, verifyId, verifyTaiwanIdIntermediateString, verifyTaxId };
|