@sunggang/ui-lib 0.1.48 → 0.1.49
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/index.esm.js +13 -65
- package/package.json +1 -1
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx,
|
|
1
|
+
import { jsx, jsxs, Fragment as Fragment$1 } from 'react/jsx-runtime';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import React__default, {
|
|
3
|
+
import React__default, { useMemo, useRef, useReducer, useEffect, useCallback, forwardRef, useImperativeHandle, Fragment, useState } from 'react';
|
|
4
4
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
@@ -9,7 +9,7 @@ import { Calendar as Calendar$1 } from 'lucide-react';
|
|
|
9
9
|
import { Slot } from '@radix-ui/react-slot';
|
|
10
10
|
import { cva } from 'class-variance-authority';
|
|
11
11
|
import { DayPicker } from 'react-day-picker';
|
|
12
|
-
import
|
|
12
|
+
import zhTW from 'date-fns/locale/zh-TW';
|
|
13
13
|
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
14
14
|
import { Calendar as Calendar$2, DateRange } from 'react-date-range';
|
|
15
15
|
import * as locales from 'react-date-range/dist/locale';
|
|
@@ -64146,67 +64146,15 @@ function _ts_values(o) {
|
|
|
64146
64146
|
|
|
64147
64147
|
var Editor = /*@__PURE__*/getDefaultExportFromCjs(ckeditor.exports);
|
|
64148
64148
|
|
|
64149
|
-
function _array_like_to_array$4(arr, len) {
|
|
64150
|
-
if (len == null || len > arr.length) len = arr.length;
|
|
64151
|
-
for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
|
|
64152
|
-
return arr2;
|
|
64153
|
-
}
|
|
64154
|
-
function _array_with_holes$4(arr) {
|
|
64155
|
-
if (Array.isArray(arr)) return arr;
|
|
64156
|
-
}
|
|
64157
|
-
function _iterable_to_array_limit$4(arr, i) {
|
|
64158
|
-
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
64159
|
-
if (_i == null) return;
|
|
64160
|
-
var _arr = [];
|
|
64161
|
-
var _n = true;
|
|
64162
|
-
var _d = false;
|
|
64163
|
-
var _s, _e;
|
|
64164
|
-
try {
|
|
64165
|
-
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
64166
|
-
_arr.push(_s.value);
|
|
64167
|
-
if (i && _arr.length === i) break;
|
|
64168
|
-
}
|
|
64169
|
-
} catch (err) {
|
|
64170
|
-
_d = true;
|
|
64171
|
-
_e = err;
|
|
64172
|
-
} finally{
|
|
64173
|
-
try {
|
|
64174
|
-
if (!_n && _i["return"] != null) _i["return"]();
|
|
64175
|
-
} finally{
|
|
64176
|
-
if (_d) throw _e;
|
|
64177
|
-
}
|
|
64178
|
-
}
|
|
64179
|
-
return _arr;
|
|
64180
|
-
}
|
|
64181
|
-
function _non_iterable_rest$4() {
|
|
64182
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
64183
|
-
}
|
|
64184
|
-
function _sliced_to_array$4(arr, i) {
|
|
64185
|
-
return _array_with_holes$4(arr) || _iterable_to_array_limit$4(arr, i) || _unsupported_iterable_to_array$4(arr, i) || _non_iterable_rest$4();
|
|
64186
|
-
}
|
|
64187
|
-
function _unsupported_iterable_to_array$4(o, minLen) {
|
|
64188
|
-
if (!o) return;
|
|
64189
|
-
if (typeof o === "string") return _array_like_to_array$4(o, minLen);
|
|
64190
|
-
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
64191
|
-
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
64192
|
-
if (n === "Map" || n === "Set") return Array.from(n);
|
|
64193
|
-
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array$4(o, minLen);
|
|
64194
|
-
}
|
|
64195
64149
|
var CkEditor = function(param) {
|
|
64196
64150
|
var content = param.content, setContent = param.setContent;
|
|
64197
|
-
|
|
64198
|
-
|
|
64199
|
-
|
|
64200
|
-
|
|
64201
|
-
|
|
64202
|
-
|
|
64203
|
-
|
|
64204
|
-
data: content,
|
|
64205
|
-
onChange: function(_, editor) {
|
|
64206
|
-
var data = editor.getData();
|
|
64207
|
-
setContent(data);
|
|
64208
|
-
}
|
|
64209
|
-
}) : null
|
|
64151
|
+
return /*#__PURE__*/ jsx(dist.exports.CKEditor, {
|
|
64152
|
+
editor: Editor,
|
|
64153
|
+
data: content,
|
|
64154
|
+
onChange: function(_, editor) {
|
|
64155
|
+
var data = editor.getData();
|
|
64156
|
+
setContent(data);
|
|
64157
|
+
}
|
|
64210
64158
|
});
|
|
64211
64159
|
};
|
|
64212
64160
|
|
|
@@ -66631,7 +66579,7 @@ function _objectWithoutPropertiesLoose(source, excluded) {
|
|
|
66631
66579
|
}, [
|
|
66632
66580
|
open
|
|
66633
66581
|
]); // TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element
|
|
66634
|
-
return /*#__PURE__*/ React__default.createElement(Fragment
|
|
66582
|
+
return /*#__PURE__*/ React__default.createElement(Fragment, null, children(_objectSpread(_objectSpread({}, props), {}, {
|
|
66635
66583
|
open: open
|
|
66636
66584
|
})));
|
|
66637
66585
|
});
|
|
@@ -69714,7 +69662,7 @@ var ModalContent = function(param) {
|
|
|
69714
69662
|
className: "w-24 h-10 px-2 text-white bg-gray-600 rounded",
|
|
69715
69663
|
onClick: setModal,
|
|
69716
69664
|
children: "確定"
|
|
69717
|
-
}) : /*#__PURE__*/ jsxs(Fragment, {
|
|
69665
|
+
}) : /*#__PURE__*/ jsxs(Fragment$1, {
|
|
69718
69666
|
children: [
|
|
69719
69667
|
/*#__PURE__*/ jsx("button", {
|
|
69720
69668
|
type: "button",
|
|
@@ -70495,7 +70443,7 @@ function DateRangePicker(param) {
|
|
|
70495
70443
|
/*#__PURE__*/ jsx(Calendar$1, {
|
|
70496
70444
|
className: "mr-2 h-4 w-4"
|
|
70497
70445
|
}),
|
|
70498
|
-
(dates === null || dates === void 0 ? void 0 : dates.from) ? dates.to ? /*#__PURE__*/ jsxs(Fragment, {
|
|
70446
|
+
(dates === null || dates === void 0 ? void 0 : dates.from) ? dates.to ? /*#__PURE__*/ jsxs(Fragment$1, {
|
|
70499
70447
|
children: [
|
|
70500
70448
|
format(dates.from, "yyyy-MM-dd"),
|
|
70501
70449
|
" -",
|