@expcat/tigercat-react 1.3.4 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-3SV6J7I5.mjs → chunk-2L7QEOFD.mjs} +34 -25
- package/dist/{chunk-FNJDBFKM.mjs → chunk-2LYV6NBJ.mjs} +6 -1
- package/dist/{chunk-EEWHWEYO.js → chunk-2RBHQBSG.js} +2 -2
- package/dist/{chunk-Y5RQN5BO.mjs → chunk-376X7SDZ.mjs} +2 -2
- package/dist/{chunk-UXUYCWQC.js → chunk-3EDASNTG.js} +5 -5
- package/dist/{chunk-NPTXXUXF.mjs → chunk-3RBRWBUG.mjs} +9 -7
- package/dist/{chunk-PUZDW7NR.js → chunk-4AMSYFYC.js} +134 -20
- package/dist/{chunk-IG75YSX3.mjs → chunk-4MONGWU5.mjs} +4 -6
- package/dist/{chunk-3CJFNG54.mjs → chunk-56CTXEJS.mjs} +1 -1
- package/dist/{chunk-TMON4MPO.js → chunk-5ALMTE35.js} +9 -7
- package/dist/{chunk-MSHCPJIJ.mjs → chunk-6BOSSZM3.mjs} +8 -9
- package/dist/{chunk-SIY6FDKJ.js → chunk-7CHTTM6D.js} +339 -314
- package/dist/{chunk-RF2BA2N6.js → chunk-7PXALKLM.js} +4 -4
- package/dist/{chunk-DLKUDB2R.js → chunk-AF2AEZKM.js} +15 -3
- package/dist/{chunk-FB34UWF7.mjs → chunk-AVLIUHOS.mjs} +101 -40
- package/dist/{chunk-TSJYAEFZ.js → chunk-B63GEB2Y.js} +358 -305
- package/dist/{chunk-6I6X255M.js → chunk-BA6TJQZL.js} +12 -12
- package/dist/{chunk-LMTUM3J3.js → chunk-BEM7XG2L.js} +2 -4
- package/dist/{chunk-MB6U72CI.js → chunk-BEZO5IE4.js} +2 -2
- package/dist/{chunk-5OHVTGHS.mjs → chunk-BN4ZKCAI.mjs} +368 -315
- package/dist/{chunk-UHFHOTNI.js → chunk-BRA3PO53.js} +6 -7
- package/dist/{chunk-M7HBWFQO.js → chunk-BROIZ266.js} +11 -1
- package/dist/{chunk-SDZOVRVR.mjs → chunk-CAQPYJFA.mjs} +350 -325
- package/dist/{chunk-BFAZZUD6.js → chunk-CC5GFX6F.js} +5 -22
- package/dist/{chunk-LQT6ZGME.mjs → chunk-CME2IFUT.mjs} +15 -3
- package/dist/{chunk-KQ5I7PRM.js → chunk-CNNEUJR2.js} +28 -14
- package/dist/{chunk-EF5ZTNHX.js → chunk-D5MQBUP2.js} +16 -4
- package/dist/{chunk-RQXY2MGX.mjs → chunk-D7UR526A.mjs} +231 -184
- package/dist/{chunk-CBYJXDW4.js → chunk-DBMC6FPU.js} +16 -4
- package/dist/{chunk-WQ4FOHOU.mjs → chunk-DEIVWO2D.mjs} +3 -5
- package/dist/{chunk-7QZ4XT2P.mjs → chunk-DVEK5SO6.mjs} +3 -8
- package/dist/{chunk-TC6JLEGZ.js → chunk-EJKOUI26.js} +24 -7
- package/dist/{chunk-4GITZKAH.mjs → chunk-EPJ6W4VI.mjs} +14 -2
- package/dist/{chunk-KYP7U6FK.js → chunk-FZHBVHQ6.js} +34 -25
- package/dist/{chunk-WVVXZKNI.js → chunk-GDPU5MYA.js} +3 -8
- package/dist/{chunk-2GQCFTD7.mjs → chunk-H4MPPCTB.mjs} +23 -4
- package/dist/{chunk-YOAYDEWW.mjs → chunk-HHMYERHY.mjs} +3 -20
- package/dist/{chunk-LRPPXU74.mjs → chunk-I7FEGKX2.mjs} +19 -5
- package/dist/{chunk-F6IXIH6B.mjs → chunk-IZGXDHPB.mjs} +24 -5
- package/dist/{chunk-GQFVVAEF.js → chunk-J6OZWT3P.js} +5 -5
- package/dist/{chunk-IGAMV6ML.mjs → chunk-KDXKF6B2.mjs} +1 -1
- package/dist/{chunk-A42OLED6.mjs → chunk-KED5S2WG.mjs} +13 -2
- package/dist/{chunk-BJQIYELW.mjs → chunk-KGMVRIYC.mjs} +5 -5
- package/dist/{chunk-6GYT3EZD.mjs → chunk-KXT2TP6A.mjs} +3 -4
- package/dist/{chunk-BBLVRLXT.js → chunk-KYNWNTGO.js} +230 -146
- package/dist/{chunk-M73NMNZX.js → chunk-L24PPXLV.js} +17 -5
- package/dist/chunk-L3WPA2RP.js +25 -0
- package/dist/{chunk-V4JIZN3E.mjs → chunk-L6KSO66F.mjs} +4 -12
- package/dist/{chunk-4LX5UGPQ.js → chunk-LJRCEB7F.js} +168 -121
- package/dist/{chunk-F7H4ALKN.js → chunk-LZG24TDB.js} +8 -9
- package/dist/{chunk-ZYJTHGQW.js → chunk-M3FVPPMM.js} +9 -13
- package/dist/{chunk-GN3TSQWW.mjs → chunk-M6YXUNOU.mjs} +2 -2
- package/dist/{chunk-I373B74W.js → chunk-MC26ORSN.js} +102 -41
- package/dist/{chunk-5HFHHFQS.mjs → chunk-MTIGGMHG.mjs} +17 -5
- package/dist/{chunk-DKT2EYVM.mjs → chunk-MV2JQ6XQ.mjs} +3 -6
- package/dist/{chunk-HR5GBE3P.js → chunk-NDGA3N6H.js} +19 -7
- package/dist/{chunk-PU7KEYLP.mjs → chunk-NEZ445D4.mjs} +9 -9
- package/dist/{chunk-4U5HSR2H.js → chunk-NVI2P7VH.js} +3 -4
- package/dist/{chunk-NVEIVIAW.mjs → chunk-OFRKYQOZ.mjs} +133 -19
- package/dist/{chunk-AW5M3EL4.js → chunk-OS6M3IZF.js} +62 -12
- package/dist/{chunk-3ZNZLGQO.mjs → chunk-OXQOKKTP.mjs} +6 -7
- package/dist/{chunk-NMEVQPOD.js → chunk-PHAJXRGE.js} +2 -4
- package/dist/{chunk-WG3YS2QV.js → chunk-PT5T5F4H.js} +13 -2
- package/dist/{chunk-WNLUUD5N.mjs → chunk-QIL24WZD.mjs} +8 -12
- package/dist/{chunk-ZFMMAYSX.js → chunk-QLATA4UB.js} +4 -6
- package/dist/{chunk-2TZ3SBMU.mjs → chunk-RVLV63SI.mjs} +16 -11
- package/dist/{chunk-3QPCQH62.mjs → chunk-RYNLPRUM.mjs} +1 -1
- package/dist/{chunk-6GIJ7NFV.mjs → chunk-SDZKL3IB.mjs} +3 -5
- package/dist/{chunk-G5USITWF.js → chunk-SH4BZYXO.js} +27 -8
- package/dist/{chunk-L5AMVEQL.mjs → chunk-SLEXEH7R.mjs} +60 -10
- package/dist/{chunk-JLRRXRZO.js → chunk-SQONS5PH.js} +4 -7
- package/dist/chunk-SQTOVSDU.mjs +692 -0
- package/dist/{chunk-ITRYKHQJ.js → chunk-TEYL5X56.js} +19 -14
- package/dist/{chunk-KGSDDVRC.mjs → chunk-TNTOSFGN.mjs} +4 -4
- package/dist/{chunk-CY5GRTAX.js → chunk-UAM3RQY4.js} +24 -5
- package/dist/{chunk-XRNKHQTL.js → chunk-UEAXYZSE.js} +3 -2
- package/dist/{chunk-7ISEWLA3.js → chunk-UKQMF3JV.js} +21 -6
- package/dist/{chunk-ITVLIR7T.mjs → chunk-ULWT6W6M.mjs} +13 -20
- package/dist/{chunk-M5GSLKUX.mjs → chunk-VAIWWELW.mjs} +15 -3
- package/dist/{chunk-4SO4LANY.js → chunk-VC26SAXB.js} +340 -274
- package/dist/{chunk-SKMZTW3K.js → chunk-WCTNQYXO.js} +16 -23
- package/dist/{chunk-KXNWY2Q7.mjs → chunk-WFWEMXO7.mjs} +241 -157
- package/dist/chunk-WHYHLUXG.mjs +25 -0
- package/dist/{chunk-ONTRGV5T.js → chunk-WZUADPYB.js} +6 -14
- package/dist/{chunk-N4PP3ENO.js → chunk-XTQUPDRI.js} +2 -2
- package/dist/{chunk-XATXFVKR.mjs → chunk-Y7K27DVV.mjs} +4 -3
- package/dist/{chunk-WI4N5DD3.mjs → chunk-YH57D4AV.mjs} +16 -4
- package/dist/{chunk-3MRP3XYI.js → chunk-YRVAF2ID.js} +7 -2
- package/dist/{chunk-5XE5VBDS.mjs → chunk-YSGM22AH.mjs} +11 -1
- package/dist/{chunk-6TR7JB6C.js → chunk-ZDNQGS4O.js} +4 -4
- package/dist/{chunk-CHBUNQIJ.mjs → chunk-ZQSMJS2Q.mjs} +23 -6
- package/dist/{chunk-QQFLRNI3.mjs → chunk-ZRZB3C5J.mjs} +18 -3
- package/dist/components/ActivityFeed.js +4 -3
- package/dist/components/ActivityFeed.mjs +3 -2
- package/dist/components/Cascader.d.mts +3 -1
- package/dist/components/Cascader.d.ts +3 -1
- package/dist/components/Cascader.js +3 -2
- package/dist/components/Cascader.mjs +2 -1
- package/dist/components/ChatWindow.js +5 -5
- package/dist/components/ChatWindow.mjs +4 -4
- package/dist/components/Checkbox.js +4 -4
- package/dist/components/Checkbox.mjs +3 -3
- package/dist/components/CheckboxGroup.js +3 -3
- package/dist/components/CheckboxGroup.mjs +2 -2
- package/dist/components/CommentThread.js +4 -4
- package/dist/components/CommentThread.mjs +3 -3
- package/dist/components/CropUpload.js +4 -4
- package/dist/components/CropUpload.mjs +3 -3
- package/dist/components/DataTableWithToolbar.d.mts +2 -2
- package/dist/components/DataTableWithToolbar.d.ts +2 -2
- package/dist/components/DataTableWithToolbar.js +11 -11
- package/dist/components/DataTableWithToolbar.mjs +10 -10
- package/dist/components/DatePicker.d.mts +1 -0
- package/dist/components/DatePicker.d.ts +1 -0
- package/dist/components/DatePicker.js +3 -2
- package/dist/components/DatePicker.mjs +2 -1
- package/dist/components/Drawer.js +3 -3
- package/dist/components/Drawer.mjs +2 -2
- package/dist/components/FileManager.d.mts +2 -1
- package/dist/components/FileManager.d.ts +2 -1
- package/dist/components/FileManager.js +3 -2
- package/dist/components/FileManager.mjs +2 -1
- package/dist/components/Form.js +3 -2
- package/dist/components/Form.mjs +2 -1
- package/dist/components/FormItem.js +4 -3
- package/dist/components/FormItem.mjs +3 -2
- package/dist/components/FormWizard.js +4 -4
- package/dist/components/FormWizard.mjs +3 -3
- package/dist/components/Image.js +4 -4
- package/dist/components/Image.mjs +3 -3
- package/dist/components/ImageGroup.js +3 -3
- package/dist/components/ImageGroup.mjs +2 -2
- package/dist/components/ImagePreview.js +2 -2
- package/dist/components/ImagePreview.mjs +1 -1
- package/dist/components/ImageViewer.d.mts +1 -1
- package/dist/components/ImageViewer.d.ts +1 -1
- package/dist/components/ImageViewer.js +2 -2
- package/dist/components/ImageViewer.mjs +1 -1
- package/dist/components/InfiniteScroll.d.mts +2 -0
- package/dist/components/InfiniteScroll.d.ts +2 -0
- package/dist/components/InfiniteScroll.js +3 -2
- package/dist/components/InfiniteScroll.mjs +2 -1
- package/dist/components/Input.js +3 -2
- package/dist/components/Input.mjs +2 -1
- package/dist/components/InputNumber.js +3 -2
- package/dist/components/InputNumber.mjs +2 -1
- package/dist/components/List.d.mts +6 -2
- package/dist/components/List.d.ts +6 -2
- package/dist/components/List.js +3 -2
- package/dist/components/List.mjs +2 -1
- package/dist/components/Loading.js +3 -2
- package/dist/components/Loading.mjs +2 -1
- package/dist/components/MarkdownEditor.js +3 -3
- package/dist/components/MarkdownEditor.mjs +2 -2
- package/dist/components/Mentions.js +2 -2
- package/dist/components/Mentions.mjs +1 -1
- package/dist/components/Menu.d.mts +8 -80
- package/dist/components/Menu.d.ts +8 -80
- package/dist/components/Menu.js +2 -2
- package/dist/components/Menu.mjs +1 -1
- package/dist/components/MenuItem.d.mts +6 -2
- package/dist/components/MenuItem.d.ts +6 -2
- package/dist/components/MenuItem.js +2 -2
- package/dist/components/MenuItem.mjs +1 -1
- package/dist/components/MenuItemGroup.d.mts +6 -2
- package/dist/components/MenuItemGroup.d.ts +6 -2
- package/dist/components/MenuItemGroup.js +2 -2
- package/dist/components/MenuItemGroup.mjs +1 -1
- package/dist/components/Message.js +2 -2
- package/dist/components/Message.mjs +1 -1
- package/dist/components/Modal.js +3 -3
- package/dist/components/Modal.mjs +2 -2
- package/dist/components/Notification.js +2 -2
- package/dist/components/Notification.mjs +1 -1
- package/dist/components/NotificationCenter.js +5 -4
- package/dist/components/NotificationCenter.mjs +4 -3
- package/dist/components/NumberKeyboard.js +3 -2
- package/dist/components/NumberKeyboard.mjs +2 -1
- package/dist/components/Radio.js +4 -4
- package/dist/components/Radio.mjs +3 -3
- package/dist/components/RadioGroup.js +3 -3
- package/dist/components/RadioGroup.mjs +2 -2
- package/dist/components/RichTextEditor.js +3 -3
- package/dist/components/RichTextEditor.mjs +2 -2
- package/dist/components/Select.d.mts +3 -1
- package/dist/components/Select.d.ts +3 -1
- package/dist/components/Select.js +3 -2
- package/dist/components/Select.mjs +2 -1
- package/dist/components/Signature.d.mts +1 -0
- package/dist/components/Signature.d.ts +1 -0
- package/dist/components/Signature.js +3 -2
- package/dist/components/Signature.mjs +2 -1
- package/dist/components/Spotlight.js +4 -2
- package/dist/components/Spotlight.mjs +3 -1
- package/dist/components/Steps.js +2 -2
- package/dist/components/Steps.mjs +1 -1
- package/dist/components/StepsItem.js +2 -2
- package/dist/components/StepsItem.mjs +1 -1
- package/dist/components/SubMenu.d.mts +6 -2
- package/dist/components/SubMenu.d.ts +6 -2
- package/dist/components/SubMenu.js +2 -2
- package/dist/components/SubMenu.mjs +1 -1
- package/dist/components/Table.d.mts +2 -2
- package/dist/components/Table.d.ts +2 -2
- package/dist/components/Table.js +9 -9
- package/dist/components/Table.mjs +8 -8
- package/dist/components/Textarea.js +3 -3
- package/dist/components/Textarea.mjs +2 -2
- package/dist/components/TimePicker.d.mts +1 -0
- package/dist/components/TimePicker.d.ts +1 -0
- package/dist/components/TimePicker.js +4 -2
- package/dist/components/TimePicker.mjs +3 -1
- package/dist/components/Tour.js +3 -2
- package/dist/components/Tour.mjs +2 -1
- package/dist/components/Transfer.d.mts +3 -1
- package/dist/components/Transfer.d.ts +3 -1
- package/dist/components/Transfer.js +3 -2
- package/dist/components/Transfer.mjs +2 -1
- package/dist/components/Tree.d.mts +3 -1
- package/dist/components/Tree.d.ts +3 -1
- package/dist/components/Tree.js +3 -2
- package/dist/components/Tree.mjs +2 -1
- package/dist/components/TreeSelect.d.mts +3 -1
- package/dist/components/TreeSelect.d.ts +3 -1
- package/dist/components/TreeSelect.js +3 -2
- package/dist/components/TreeSelect.mjs +2 -1
- package/dist/components/Upload.js +3 -2
- package/dist/components/Upload.mjs +2 -1
- package/dist/components/VirtualTable.d.mts +3 -2
- package/dist/components/VirtualTable.d.ts +3 -2
- package/dist/components/VirtualTable.js +3 -2
- package/dist/components/VirtualTable.mjs +2 -1
- package/dist/index.d.mts +33 -7
- package/dist/index.d.ts +33 -7
- package/dist/index.js +54 -54
- package/dist/index.mjs +53 -53
- package/dist/{types-CHmCMNEM.d.mts → types-0oVwMXtR.d.mts} +1 -1
- package/dist/{types-CHmCMNEM.d.ts → types-0oVwMXtR.d.ts} +1 -1
- package/dist/types-DaC4a0Ny.d.mts +80 -0
- package/dist/types-DaC4a0Ny.d.ts +80 -0
- package/package.json +2 -2
- package/dist/chunk-UKGQ7256.js +0 -12
- package/dist/chunk-UQMPEMY7.mjs +0 -12
- package/dist/chunk-VNVGSPBI.mjs +0 -626
- package/dist/{chunk-OZD75CLT.js → chunk-ANBNSUSR.js} +3 -3
- package/dist/{chunk-I2AUOICV.mjs → chunk-M3MOSUZO.mjs} +3 -3
- package/dist/{chunk-UMZ3PMUJ.js → chunk-SXHCMZ6U.js} +2 -2
- package/dist/{chunk-BWDQZSAB.mjs → chunk-WTSG7QXK.mjs} +3 -3
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
|
+
|
|
3
|
+
var _chunkTDODFBBOjs = require('./chunk-TDODFBBO.js');
|
|
4
|
+
|
|
5
|
+
// src/components/NumberKeyboard.tsx
|
|
2
6
|
var _react = require('react');
|
|
3
7
|
|
|
4
8
|
|
|
@@ -10,6 +14,8 @@ var _react = require('react');
|
|
|
10
14
|
|
|
11
15
|
|
|
12
16
|
|
|
17
|
+
|
|
18
|
+
|
|
13
19
|
var _tigercatcore = require('@expcat/tigercat-core');
|
|
14
20
|
var _jsxruntime = require('react/jsx-runtime');
|
|
15
21
|
var NumberKeyboard = ({
|
|
@@ -21,10 +27,11 @@ var NumberKeyboard = ({
|
|
|
21
27
|
decimalSeparator = ".",
|
|
22
28
|
disabled = false,
|
|
23
29
|
readonly = false,
|
|
24
|
-
confirmText
|
|
30
|
+
confirmText,
|
|
25
31
|
deleteText = "Delete",
|
|
26
32
|
ariaLabel = "Number keyboard",
|
|
27
33
|
showConfirm = true,
|
|
34
|
+
locale,
|
|
28
35
|
className,
|
|
29
36
|
style,
|
|
30
37
|
onChange,
|
|
@@ -33,17 +40,29 @@ var NumberKeyboard = ({
|
|
|
33
40
|
onConfirm,
|
|
34
41
|
...rest
|
|
35
42
|
}) => {
|
|
43
|
+
const config = _chunkTDODFBBOjs.useTigerConfig.call(void 0, );
|
|
44
|
+
const mergedLocale = _react.useMemo.call(void 0,
|
|
45
|
+
() => _tigercatcore.mergeTigerLocale.call(void 0, config.locale, locale),
|
|
46
|
+
[config.locale, locale]
|
|
47
|
+
);
|
|
48
|
+
const confirmLabel = _tigercatcore.resolveLocaleText.call(void 0, "Done", confirmText, _optionalChain([mergedLocale, 'optionalAccess', _ => _.common, 'optionalAccess', _2 => _2.okText]));
|
|
36
49
|
const isControlled = value !== void 0;
|
|
37
50
|
const [innerValue, setInnerValue] = _react.useState.call(void 0, () => _tigercatcore.normalizeNumberKeyboardValue.call(void 0, defaultValue));
|
|
38
51
|
const currentValue = isControlled ? _tigercatcore.normalizeNumberKeyboardValue.call(void 0, value) : innerValue;
|
|
39
52
|
const isDisabled = disabled || readonly;
|
|
40
53
|
const keys = _react.useMemo.call(void 0,
|
|
41
|
-
() => _tigercatcore.getNumberKeyboardKeys.call(void 0, {
|
|
42
|
-
|
|
54
|
+
() => _tigercatcore.getNumberKeyboardKeys.call(void 0, {
|
|
55
|
+
mode,
|
|
56
|
+
decimalSeparator,
|
|
57
|
+
deleteText,
|
|
58
|
+
confirmText: confirmLabel,
|
|
59
|
+
showConfirm
|
|
60
|
+
}),
|
|
61
|
+
[confirmLabel, decimalSeparator, deleteText, mode, showConfirm]
|
|
43
62
|
);
|
|
44
63
|
function emitChange(nextValue, payload) {
|
|
45
64
|
if (!isControlled) setInnerValue(nextValue);
|
|
46
|
-
_optionalChain([onChange, 'optionalCall',
|
|
65
|
+
_optionalChain([onChange, 'optionalCall', _3 => _3(nextValue, payload)]);
|
|
47
66
|
}
|
|
48
67
|
function handleKeyClick(key) {
|
|
49
68
|
if (isDisabled || key.type === "empty") return;
|
|
@@ -60,12 +79,12 @@ var NumberKeyboard = ({
|
|
|
60
79
|
action,
|
|
61
80
|
mode
|
|
62
81
|
};
|
|
63
|
-
_optionalChain([onKeyPress, 'optionalCall',
|
|
82
|
+
_optionalChain([onKeyPress, 'optionalCall', _4 => _4(key, payload)]);
|
|
64
83
|
if (action === "confirm") {
|
|
65
|
-
_optionalChain([onConfirm, 'optionalCall',
|
|
84
|
+
_optionalChain([onConfirm, 'optionalCall', _5 => _5(currentValue, { ...payload, value: currentValue })]);
|
|
66
85
|
return;
|
|
67
86
|
}
|
|
68
|
-
if (action === "delete") _optionalChain([onDelete, 'optionalCall',
|
|
87
|
+
if (action === "delete") _optionalChain([onDelete, 'optionalCall', _6 => _6(nextValue, payload)]);
|
|
69
88
|
if (nextValue !== currentValue) emitChange(nextValue, payload);
|
|
70
89
|
}
|
|
71
90
|
return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-ELRZ2ZHM.mjs";
|
|
5
5
|
import {
|
|
6
6
|
List
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-KED5S2WG.mjs";
|
|
8
8
|
import {
|
|
9
9
|
Button
|
|
10
10
|
} from "./chunk-5TE7KLE5.mjs";
|
|
11
11
|
import {
|
|
12
12
|
Loading
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-2LYV6NBJ.mjs";
|
|
14
14
|
import {
|
|
15
15
|
Text
|
|
16
16
|
} from "./chunk-HLS4CHWX.mjs";
|
|
@@ -208,15 +208,30 @@ var NotificationCenter = ({
|
|
|
208
208
|
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
209
209
|
/* @__PURE__ */ jsxs("div", { className: "flex items-baseline justify-between gap-2", children: [
|
|
210
210
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1.5", children: [
|
|
211
|
-
/* @__PURE__ */ jsx(
|
|
211
|
+
/* @__PURE__ */ jsx(
|
|
212
|
+
Text,
|
|
213
|
+
{
|
|
214
|
+
tag: "span",
|
|
215
|
+
size: "sm",
|
|
216
|
+
weight: isRead ? "normal" : "semibold",
|
|
217
|
+
className: isRead ? "text-gray-600 dark:text-gray-400" : "text-gray-900 dark:text-gray-100",
|
|
218
|
+
children: item.title
|
|
219
|
+
}
|
|
220
|
+
),
|
|
212
221
|
!isRead && /* @__PURE__ */ jsx("span", { className: "w-1.5 h-1.5 rounded-full bg-blue-500 dark:bg-blue-400 shrink-0 shadow-sm shadow-blue-500/40 animate-pulse" })
|
|
213
222
|
] }),
|
|
214
223
|
timeText ? /* @__PURE__ */ jsx("span", { className: "text-[11px] text-gray-400 dark:text-gray-500 font-medium whitespace-nowrap flex-shrink-0 self-center", children: timeText }) : null
|
|
215
224
|
] }),
|
|
216
|
-
item.description ? /* @__PURE__ */ jsx(
|
|
217
|
-
"
|
|
218
|
-
|
|
219
|
-
|
|
225
|
+
item.description ? /* @__PURE__ */ jsx(
|
|
226
|
+
"div",
|
|
227
|
+
{
|
|
228
|
+
className: classNames(
|
|
229
|
+
"mt-1 text-xs leading-relaxed line-clamp-2",
|
|
230
|
+
isRead ? "text-gray-500 dark:text-gray-400" : "text-gray-600 dark:text-gray-300"
|
|
231
|
+
),
|
|
232
|
+
children: item.description
|
|
233
|
+
}
|
|
234
|
+
) : null
|
|
220
235
|
] }),
|
|
221
236
|
/* @__PURE__ */ jsx(
|
|
222
237
|
Button,
|
|
@@ -245,8 +260,34 @@ var NotificationCenter = ({
|
|
|
245
260
|
const renderList = (listItems) => {
|
|
246
261
|
if (listItems.length === 0) {
|
|
247
262
|
return /* @__PURE__ */ jsxs("div", { className: "flex flex-col items-center justify-center py-14 px-4 text-center", children: [
|
|
248
|
-
/* @__PURE__ */ jsx("div", { className: "p-3.5 bg-gray-50 dark:bg-gray-900 rounded-full mb-3 shadow-inner", children: /* @__PURE__ */ jsx(
|
|
249
|
-
|
|
263
|
+
/* @__PURE__ */ jsx("div", { className: "p-3.5 bg-gray-50 dark:bg-gray-900 rounded-full mb-3 shadow-inner", children: /* @__PURE__ */ jsx(
|
|
264
|
+
"svg",
|
|
265
|
+
{
|
|
266
|
+
className: "w-8 h-8 text-gray-400 dark:text-gray-600 animate-pulse",
|
|
267
|
+
fill: "none",
|
|
268
|
+
viewBox: "0 0 24 24",
|
|
269
|
+
stroke: "currentColor",
|
|
270
|
+
strokeWidth: "1.5",
|
|
271
|
+
children: /* @__PURE__ */ jsx(
|
|
272
|
+
"path",
|
|
273
|
+
{
|
|
274
|
+
strokeLinecap: "round",
|
|
275
|
+
strokeLinejoin: "round",
|
|
276
|
+
d: "M14.857 17.082a23.848 23.848 0 0 0 5.454-1.31A8.967 8.967 0 0 1 18 9.75V9A6 6 0 0 0 6 9v.75a8.967 8.967 0 0 1-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 0 1-5.714 0m5.714 0a3 3 0 1 1-5.714 0"
|
|
277
|
+
}
|
|
278
|
+
)
|
|
279
|
+
}
|
|
280
|
+
) }),
|
|
281
|
+
/* @__PURE__ */ jsx(
|
|
282
|
+
Text,
|
|
283
|
+
{
|
|
284
|
+
tag: "div",
|
|
285
|
+
size: "sm",
|
|
286
|
+
color: "muted",
|
|
287
|
+
className: "font-semibold text-gray-400 dark:text-gray-500",
|
|
288
|
+
children: emptyText
|
|
289
|
+
}
|
|
290
|
+
)
|
|
250
291
|
] });
|
|
251
292
|
}
|
|
252
293
|
return /* @__PURE__ */ jsx(
|
|
@@ -279,7 +320,16 @@ var NotificationCenter = ({
|
|
|
279
320
|
header: /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-3", children: [
|
|
280
321
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
281
322
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2.5", children: [
|
|
282
|
-
/* @__PURE__ */ jsx(
|
|
323
|
+
/* @__PURE__ */ jsx(
|
|
324
|
+
Text,
|
|
325
|
+
{
|
|
326
|
+
tag: "div",
|
|
327
|
+
size: "base",
|
|
328
|
+
weight: "bold",
|
|
329
|
+
className: "text-gray-900 dark:text-gray-100",
|
|
330
|
+
children: title
|
|
331
|
+
}
|
|
332
|
+
),
|
|
283
333
|
totalUnread > 0 ? /* @__PURE__ */ jsx("span", { className: "inline-flex items-center justify-center min-w-[20px] h-5 px-1.5 text-[11px] font-bold rounded-full bg-gradient-to-r from-blue-500 to-indigo-600 text-white shadow-sm shadow-blue-500/20 animate-pulse", children: totalUnread }) : null
|
|
284
334
|
] }),
|
|
285
335
|
/* @__PURE__ */ jsx(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkL3WPA2RPjs = require('./chunk-L3WPA2RP.js');
|
|
4
4
|
|
|
5
5
|
// src/components/CheckboxGroup.tsx
|
|
6
6
|
var _react = require('react');
|
|
@@ -19,7 +19,7 @@ var CheckboxGroup = ({
|
|
|
19
19
|
className,
|
|
20
20
|
...props
|
|
21
21
|
}) => {
|
|
22
|
-
const [value,
|
|
22
|
+
const [value, setValue] = _chunkL3WPA2RPjs.useControlledState.call(void 0, controlledValue, defaultValue, onChange);
|
|
23
23
|
const updateValue = (val, checked) => {
|
|
24
24
|
if (disabled) return;
|
|
25
25
|
const currentValue = [...value];
|
|
@@ -29,10 +29,7 @@ var CheckboxGroup = ({
|
|
|
29
29
|
} else if (!checked && index !== -1) {
|
|
30
30
|
currentValue.splice(index, 1);
|
|
31
31
|
}
|
|
32
|
-
|
|
33
|
-
setInternalValue(currentValue);
|
|
34
|
-
}
|
|
35
|
-
_optionalChain([onChange, 'optionalCall', _ => _(currentValue)]);
|
|
32
|
+
setValue(currentValue);
|
|
36
33
|
};
|
|
37
34
|
const context = {
|
|
38
35
|
value,
|