@expcat/tigercat-react 2.0.0-preview.2 → 2.0.0-preview.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/dist/{chunk-2YDLAZTK.mjs → chunk-3O2WHF3U.mjs} +5 -2
- package/dist/{chunk-MZPKFMQC.mjs → chunk-44BPUG24.mjs} +13 -7
- package/dist/{chunk-7TVZTASQ.mjs → chunk-44CQTGAN.mjs} +22 -3
- package/dist/{chunk-7PP6RECM.mjs → chunk-532RNNPH.mjs} +3 -3
- package/dist/{chunk-533KLM7P.mjs → chunk-5IHOOP5A.mjs} +2 -2
- package/dist/{chunk-CR4QBH46.mjs → chunk-5RVLBNLI.mjs} +1 -1
- package/dist/{chunk-UPQGB5NQ.mjs → chunk-6SEPT4C5.mjs} +22 -11
- package/dist/{chunk-GCOA4AO6.mjs → chunk-773LH7BK.mjs} +1 -1
- package/dist/{chunk-MZCGQED3.mjs → chunk-7EXOY7GD.mjs} +1 -1
- package/dist/{chunk-AF3N4GJJ.mjs → chunk-7KCQMXJA.mjs} +1 -1
- package/dist/{chunk-SNE3E22Q.mjs → chunk-A6JNS35U.mjs} +5 -2
- package/dist/{chunk-FWIYDMJA.mjs → chunk-AGTXDHQJ.mjs} +1 -1
- package/dist/{chunk-WTIEJCRV.mjs → chunk-AJJJ6HWC.mjs} +1 -1
- package/dist/{chunk-SHJNDDYK.mjs → chunk-ASLRAZZN.mjs} +54 -29
- package/dist/{chunk-WLFLQB4R.mjs → chunk-BEJZPJIK.mjs} +1 -1
- package/dist/{chunk-JNZHZVPW.mjs → chunk-CN3QXWK3.mjs} +1 -1
- package/dist/{chunk-OTRPN5ZG.mjs → chunk-CT36XD5I.mjs} +1 -1
- package/dist/{chunk-LJWQ7T57.mjs → chunk-CVYA3MI2.mjs} +10 -6
- package/dist/{chunk-6REMGSLS.mjs → chunk-D4LASFVY.mjs} +1 -1
- package/dist/{chunk-XHNR3A7A.mjs → chunk-DJ4PSDQS.mjs} +5 -2
- package/dist/{chunk-Z2NZ2XC5.mjs → chunk-EKESN747.mjs} +1 -1
- package/dist/{chunk-7S4TP4MZ.mjs → chunk-EW5EO7VE.mjs} +1 -1
- package/dist/{chunk-ZG2W4HS5.mjs → chunk-F2ITBDUS.mjs} +2 -1
- package/dist/chunk-F6T3OLTQ.mjs +12 -0
- package/dist/{chunk-NRWH5IWZ.mjs → chunk-F6WV53BS.mjs} +11 -4
- package/dist/{chunk-D524E52A.mjs → chunk-FDKWHP2K.mjs} +22 -6
- package/dist/{chunk-4R5YXNU4.mjs → chunk-FPQMJFFM.mjs} +20 -3
- package/dist/{chunk-2UFTDDPW.mjs → chunk-HXD7KMRP.mjs} +1 -1
- package/dist/{chunk-HDCC4FBL.mjs → chunk-I5TELDUV.mjs} +2 -1
- package/dist/{chunk-GQPKHMHA.mjs → chunk-IBSOUQGB.mjs} +1 -1
- package/dist/{chunk-YN4FMZX5.mjs → chunk-IPJLQSAF.mjs} +4 -4
- package/dist/{chunk-VBGJQPPI.mjs → chunk-IZYFETUS.mjs} +3 -3
- package/dist/{chunk-YTFQBXH4.mjs → chunk-JTFNGXOC.mjs} +1 -1
- package/dist/{chunk-TJDZFN2Z.mjs → chunk-K7MYQISG.mjs} +1 -1
- package/dist/{chunk-GFLKO46C.mjs → chunk-KFPQ6DIH.mjs} +1 -1
- package/dist/{chunk-I3SE5HMH.mjs → chunk-KMP5CVNK.mjs} +1 -1
- package/dist/{chunk-32PAZTVF.mjs → chunk-KVARQQAG.mjs} +64 -19
- package/dist/{chunk-B3O6MAC3.mjs → chunk-L55UK45A.mjs} +6 -4
- package/dist/{chunk-3HPDLIX3.mjs → chunk-LADKKOJT.mjs} +4 -2
- package/dist/{chunk-2PZICT2T.mjs → chunk-LZKBDQE4.mjs} +1 -1
- package/dist/{chunk-K6JLLCY7.mjs → chunk-MGQWVJHX.mjs} +2 -2
- package/dist/{chunk-H4MPPCTB.mjs → chunk-MOWK7CND.mjs} +1 -1
- package/dist/{chunk-RCUL6RZU.mjs → chunk-MXXAJSRS.mjs} +28 -8
- package/dist/{chunk-KWVA2DN3.mjs → chunk-O5RAMCBV.mjs} +1 -1
- package/dist/{chunk-ZRZB3C5J.mjs → chunk-OIGEBCAS.mjs} +1 -1
- package/dist/{chunk-4ZZ7YRTB.mjs → chunk-OO562MFD.mjs} +1 -1
- package/dist/{chunk-7RI5W465.mjs → chunk-OQLP452R.mjs} +1 -1
- package/dist/{chunk-BPQEM6AF.mjs → chunk-OTBXERJD.mjs} +1 -1
- package/dist/{chunk-YLVXXP7E.mjs → chunk-PAN256RW.mjs} +2 -2
- package/dist/{chunk-LAKPYMBZ.mjs → chunk-PAS347EX.mjs} +1 -1
- package/dist/{chunk-V23KR23W.mjs → chunk-PGD5RPKF.mjs} +20 -3
- package/dist/{chunk-SHDQJ5BJ.mjs → chunk-PU3JY6RE.mjs} +1 -1
- package/dist/{chunk-R67HTROL.mjs → chunk-PXRZ6CKY.mjs} +3 -3
- package/dist/{chunk-2GSXSLGC.mjs → chunk-PYDWF4ED.mjs} +7 -7
- package/dist/{chunk-Z6BDNV3S.mjs → chunk-QB5472NM.mjs} +1 -1
- package/dist/{chunk-BSXPB2V6.mjs → chunk-QGZ32NFQ.mjs} +1 -1
- package/dist/{chunk-MMWF2OPA.mjs → chunk-SHCBCM2W.mjs} +6 -3
- package/dist/{chunk-WKTIDYPD.mjs → chunk-SZBYEGKU.mjs} +1 -1
- package/dist/{chunk-QWOE4FGJ.mjs → chunk-TDFLUDRM.mjs} +78 -22
- package/dist/{chunk-4F3UTDFE.mjs → chunk-TFMEHUVZ.mjs} +1 -1
- package/dist/chunk-TGXBCKOU.mjs +35 -0
- package/dist/{chunk-3OBUJIJI.mjs → chunk-TO2URY7X.mjs} +3 -3
- package/dist/{chunk-VKIGZWRK.mjs → chunk-TORX7SG4.mjs} +1 -1
- package/dist/{chunk-LOM6NNQK.mjs → chunk-U7RLVY67.mjs} +1 -1
- package/dist/{chunk-XSAKD4MX.mjs → chunk-UHK2ISKR.mjs} +19 -9
- package/dist/{chunk-4SU6D2E7.mjs → chunk-UYQBXVFE.mjs} +1 -1
- package/dist/{chunk-5SX2M3LU.mjs → chunk-VA6PZWOH.mjs} +1 -1
- package/dist/{chunk-T6HNFCOW.mjs → chunk-VD55SSP7.mjs} +1 -1
- package/dist/{chunk-NJHZQBA7.mjs → chunk-W7BC4I2Y.mjs} +1 -1
- package/dist/{chunk-MOLUSXVC.mjs → chunk-XIVU7TWX.mjs} +4 -4
- package/dist/{chunk-QAIBQHIO.mjs → chunk-YSIXURBW.mjs} +16 -1
- package/dist/{chunk-J4HCTYJG.mjs → chunk-Z3CRHC5F.mjs} +21 -2
- package/dist/{chunk-YCEH4N3Z.mjs → chunk-Z47SG5L5.mjs} +3 -3
- package/dist/{chunk-AMEH5EHB.mjs → chunk-ZEP7I6WB.mjs} +2 -2
- package/dist/{chunk-ZFGSZW7S.mjs → chunk-ZMRTETN2.mjs} +1 -1
- package/dist/components/ActivityFeed.d.mts +5 -5
- package/dist/components/ActivityFeed.mjs +8 -7
- package/dist/components/Affix.d.mts +4 -4
- package/dist/components/Alert.d.mts +7 -7
- package/dist/components/Anchor.d.mts +9 -9
- package/dist/components/AreaChart.d.mts +2 -2
- package/dist/components/AreaChart.mjs +2 -2
- package/dist/components/AutoComplete.d.mts +3 -3
- package/dist/components/AutoComplete.mjs +3 -2
- package/dist/components/Avatar.d.mts +4 -4
- package/dist/components/Avatar.mjs +4 -2
- package/dist/components/AvatarGroup.d.mts +10 -6
- package/dist/components/AvatarGroup.mjs +3 -1
- package/dist/components/BackTop.d.mts +5 -5
- package/dist/components/Badge.d.mts +4 -4
- package/dist/components/Badge.mjs +3 -2
- package/dist/components/BarChart.d.mts +2 -2
- package/dist/components/BarChart.mjs +2 -2
- package/dist/components/Breadcrumb.d.mts +10 -10
- package/dist/components/Button.d.mts +5 -5
- package/dist/components/ButtonGroup.d.mts +4 -4
- package/dist/components/Calendar.d.mts +2 -2
- package/dist/components/Calendar.mjs +3 -2
- package/dist/components/Card.d.mts +7 -7
- package/dist/components/Carousel.d.mts +9 -5
- package/dist/components/Carousel.mjs +3 -1
- package/dist/components/Cascader.d.mts +3 -3
- package/dist/components/Cascader.mjs +3 -2
- package/dist/components/ChartAxis.d.mts +3 -3
- package/dist/components/ChartCanvas.d.mts +3 -3
- package/dist/components/ChartGrid.d.mts +3 -3
- package/dist/components/ChartLegend.d.mts +3 -2
- package/dist/components/ChartLegend.mjs +1 -1
- package/dist/components/ChartSeries.d.mts +4 -4
- package/dist/components/ChartTooltip.d.mts +2 -2
- package/dist/components/ChatWindow.d.mts +4 -4
- package/dist/components/ChatWindow.mjs +8 -6
- package/dist/components/Checkbox.d.mts +5 -5
- package/dist/components/CheckboxGroup.d.mts +4 -4
- package/dist/components/Code.d.mts +3 -3
- package/dist/components/CodeEditor.d.mts +4 -4
- package/dist/components/Col.d.mts +3 -3
- package/dist/components/Collapse.d.mts +4 -4
- package/dist/components/CollapsePanel.d.mts +6 -6
- package/dist/components/ColorPicker.d.mts +2 -2
- package/dist/components/ColorPicker.mjs +1 -1
- package/dist/components/ColorSwatch.d.mts +2 -2
- package/dist/components/CommentThread.d.mts +3 -3
- package/dist/components/CommentThread.mjs +6 -5
- package/dist/components/ConfigProvider.d.mts +3 -3
- package/dist/components/ConfigProvider.mjs +2 -1
- package/dist/components/Container.d.mts +4 -4
- package/dist/components/Content.d.mts +4 -4
- package/dist/components/Countdown.d.mts +3 -3
- package/dist/components/CronEditor.d.mts +7 -3
- package/dist/components/CronEditor.mjs +3 -1
- package/dist/components/CropUpload.d.mts +3 -3
- package/dist/components/CropUpload.mjs +5 -4
- package/dist/components/DataTableWithToolbar.d.mts +6 -6
- package/dist/components/DataTableWithToolbar.mjs +8 -6
- package/dist/components/DatePicker.d.mts +3 -3
- package/dist/components/DatePicker.mjs +3 -2
- package/dist/components/Descriptions.d.mts +7 -7
- package/dist/components/Divider.d.mts +3 -3
- package/dist/components/DonutChart.d.mts +2 -2
- package/dist/components/DonutChart.mjs +3 -3
- package/dist/components/Drawer.d.mts +7 -7
- package/dist/components/Drawer.mjs +3 -2
- package/dist/components/Dropdown.d.mts +15 -15
- package/dist/components/Empty.d.mts +6 -6
- package/dist/components/Empty.mjs +3 -2
- package/dist/components/FileManager.d.mts +3 -3
- package/dist/components/FileManager.mjs +3 -2
- package/dist/components/FloatButton.d.mts +9 -9
- package/dist/components/Footer.d.mts +4 -4
- package/dist/components/Form.d.mts +3 -3
- package/dist/components/Form.mjs +3 -2
- package/dist/components/FormItem.d.mts +3 -3
- package/dist/components/FormItem.mjs +5 -3
- package/dist/components/FormItemContext.d.mts +12 -0
- package/dist/components/FormItemContext.mjs +8 -0
- package/dist/components/FormWizard.d.mts +5 -5
- package/dist/components/FormWizard.mjs +3 -2
- package/dist/components/FunnelChart.d.mts +2 -2
- package/dist/components/FunnelChart.mjs +2 -2
- package/dist/components/Gantt.d.mts +2 -2
- package/dist/components/GaugeChart.d.mts +2 -2
- package/dist/components/Header.d.mts +4 -4
- package/dist/components/HeatmapChart.d.mts +2 -2
- package/dist/components/Icon.d.mts +4 -4
- package/dist/components/Icon.mjs +1 -1
- package/dist/components/Image.d.mts +5 -5
- package/dist/components/Image.mjs +5 -4
- package/dist/components/ImageAnnotation.d.mts +3 -3
- package/dist/components/ImageAnnotation.mjs +3 -2
- package/dist/components/ImageCropper.d.mts +3 -3
- package/dist/components/ImageCropper.mjs +3 -2
- package/dist/components/ImageGroup.d.mts +4 -4
- package/dist/components/ImageGroup.mjs +4 -3
- package/dist/components/ImagePreview.d.mts +2 -2
- package/dist/components/ImagePreview.mjs +3 -2
- package/dist/components/ImageViewer.d.mts +2 -2
- package/dist/components/ImageViewer.mjs +3 -2
- package/dist/components/InfiniteScroll.d.mts +5 -5
- package/dist/components/InfiniteScroll.mjs +3 -2
- package/dist/components/Input.d.mts +9 -9
- package/dist/components/Input.mjs +2 -1
- package/dist/components/InputGroup.d.mts +6 -6
- package/dist/components/InputNumber.d.mts +4 -4
- package/dist/components/InputNumber.mjs +1 -1
- package/dist/components/Kanban.d.mts +5 -5
- package/dist/components/Kanban.mjs +4 -3
- package/dist/components/Layout.d.mts +4 -4
- package/dist/components/LineChart.d.mts +2 -2
- package/dist/components/LineChart.mjs +2 -2
- package/dist/components/Link.d.mts +5 -5
- package/dist/components/List.d.mts +6 -6
- package/dist/components/List.mjs +3 -2
- package/dist/components/Loading.d.mts +3 -3
- package/dist/components/Loading.mjs +3 -2
- package/dist/components/MarkdownEditor.d.mts +8 -4
- package/dist/components/MarkdownEditor.mjs +3 -1
- package/dist/components/Mentions.d.mts +2 -2
- package/dist/components/Menu.d.mts +9 -9
- package/dist/components/Message.mjs +14 -1
- package/dist/components/MessageContainer.d.mts +2 -2
- package/dist/components/MessageContainer.mjs +1 -1
- package/dist/components/MessageRoot.mjs +1 -1
- package/dist/components/Modal.d.mts +6 -6
- package/dist/components/Modal.mjs +3 -2
- package/dist/components/Notification.mjs +14 -1
- package/dist/components/NotificationCenter.d.mts +3 -3
- package/dist/components/NotificationCenter.mjs +6 -5
- package/dist/components/NotificationContainer.d.mts +2 -2
- package/dist/components/NotificationContainer.mjs +1 -1
- package/dist/components/NotificationRoot.mjs +1 -1
- package/dist/components/NumberKeyboard.d.mts +3 -3
- package/dist/components/NumberKeyboard.mjs +3 -2
- package/dist/components/OrgChart.d.mts +2 -2
- package/dist/components/Pagination.d.mts +4 -4
- package/dist/components/Pagination.mjs +3 -2
- package/dist/components/PieChart.d.mts +2 -2
- package/dist/components/PieChart.mjs +2 -2
- package/dist/components/Popconfirm.d.mts +8 -8
- package/dist/components/Popover.d.mts +8 -8
- package/dist/components/PrintLayout.d.mts +8 -8
- package/dist/components/PrintLayout.mjs +1 -1
- package/dist/components/Progress.d.mts +3 -3
- package/dist/components/QRCode.d.mts +2 -2
- package/dist/components/QRCode.mjs +3 -2
- package/dist/components/RadarChart.d.mts +2 -2
- package/dist/components/RadarChart.mjs +2 -2
- package/dist/components/Radio.d.mts +4 -4
- package/dist/components/RadioGroup.d.mts +5 -5
- package/dist/components/Rate.d.mts +7 -3
- package/dist/components/Rate.mjs +3 -1
- package/dist/components/Resizable.d.mts +4 -4
- package/dist/components/Result.d.mts +6 -6
- package/dist/components/RichTextEditor.d.mts +8 -4
- package/dist/components/RichTextEditor.mjs +3 -1
- package/dist/components/Row.d.mts +4 -4
- package/dist/components/ScatterChart.d.mts +5 -3
- package/dist/components/ScatterChart.mjs +4 -2
- package/dist/components/ScrollSpy.d.mts +5 -5
- package/dist/components/Segmented.d.mts +2 -2
- package/dist/components/Select.d.mts +3 -3
- package/dist/components/Select.mjs +3 -2
- package/dist/components/Sidebar.d.mts +4 -4
- package/dist/components/Signature.d.mts +3 -3
- package/dist/components/Signature.mjs +3 -2
- package/dist/components/Skeleton.d.mts +3 -3
- package/dist/components/Slider.d.mts +3 -3
- package/dist/components/Space.d.mts +5 -5
- package/dist/components/Splitter.d.mts +4 -4
- package/dist/components/Spotlight.d.mts +3 -3
- package/dist/components/Spotlight.mjs +3 -2
- package/dist/components/Statistic.d.mts +2 -2
- package/dist/components/Stepper.d.mts +2 -2
- package/dist/components/Stepper.mjs +1 -1
- package/dist/components/Steps.d.mts +7 -7
- package/dist/components/SunburstChart.d.mts +2 -2
- package/dist/components/SunburstChart.mjs +2 -2
- package/dist/components/Switch.d.mts +3 -3
- package/dist/components/Table.d.mts +2 -2
- package/dist/components/Table.mjs +5 -4
- package/dist/components/Tabs.d.mts +15 -10
- package/dist/components/Tabs.mjs +3 -1
- package/dist/components/Tag.d.mts +5 -5
- package/dist/components/Tag.mjs +3 -2
- package/dist/components/TaskBoard.d.mts +8 -8
- package/dist/components/TaskBoard.mjs +3 -2
- package/dist/components/Text.d.mts +4 -4
- package/dist/components/Textarea.d.mts +7 -7
- package/dist/components/TimePicker.d.mts +3 -3
- package/dist/components/TimePicker.mjs +3 -2
- package/dist/components/Timeline.d.mts +7 -7
- package/dist/components/Timeline.mjs +3 -2
- package/dist/components/Tooltip.d.mts +6 -6
- package/dist/components/Tour.d.mts +2 -2
- package/dist/components/Tour.mjs +3 -2
- package/dist/components/Transfer.d.mts +6 -4
- package/dist/components/Transfer.mjs +3 -2
- package/dist/components/Tree.d.mts +4 -4
- package/dist/components/Tree.mjs +3 -2
- package/dist/components/TreeMapChart.d.mts +2 -2
- package/dist/components/TreeMapChart.mjs +2 -2
- package/dist/components/TreeSelect.d.mts +3 -3
- package/dist/components/TreeSelect.mjs +3 -2
- package/dist/components/Upload.d.mts +3 -3
- package/dist/components/Upload.mjs +3 -2
- package/dist/components/VirtualList.d.mts +3 -3
- package/dist/components/VirtualTable.d.mts +3 -3
- package/dist/components/VirtualTable.mjs +3 -2
- package/dist/components/Watermark.d.mts +4 -4
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +92 -0
- package/package.json +2 -2
- /package/dist/{chunk-BPFKTAF2.mjs → chunk-L5KAXWQI.mjs} +0 -0
- /package/dist/{chunk-FNBTGIDG.mjs → chunk-Y3SGFGN6.mjs} +0 -0
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useFormItemControlContext
|
|
3
|
+
} from "./chunk-F6T3OLTQ.mjs";
|
|
1
4
|
import {
|
|
2
5
|
useInputGroupContext
|
|
3
6
|
} from "./chunk-34VGG7AK.mjs";
|
|
@@ -24,9 +27,9 @@ import { jsx, jsxs } from "react/jsx-runtime";
|
|
|
24
27
|
var Input = ({
|
|
25
28
|
size,
|
|
26
29
|
type = "text",
|
|
27
|
-
status
|
|
28
|
-
errorMessage,
|
|
29
|
-
_shakeTrigger,
|
|
30
|
+
status: statusProp,
|
|
31
|
+
errorMessage: errorMessageProp,
|
|
32
|
+
_shakeTrigger: shakeTriggerProp,
|
|
30
33
|
prefix,
|
|
31
34
|
suffix,
|
|
32
35
|
value,
|
|
@@ -55,7 +58,11 @@ var Input = ({
|
|
|
55
58
|
}) => {
|
|
56
59
|
injectShakeStyle();
|
|
57
60
|
const inputGroup = useInputGroupContext();
|
|
61
|
+
const formItemControl = useFormItemControlContext();
|
|
58
62
|
const effectiveSize = size ?? inputGroup?.size ?? "md";
|
|
63
|
+
const status = statusProp ?? formItemControl?.status ?? "default";
|
|
64
|
+
const errorMessage = errorMessageProp ?? formItemControl?.errorMessage;
|
|
65
|
+
const shakeTrigger = shakeTriggerProp ?? formItemControl?.shakeTrigger;
|
|
59
66
|
const wrapperRef = useRef(null);
|
|
60
67
|
const inputRef = useRef(null);
|
|
61
68
|
const reactId = useId();
|
|
@@ -69,7 +76,7 @@ var Input = ({
|
|
|
69
76
|
void el.offsetWidth;
|
|
70
77
|
el.classList.add(SHAKE_CLASS);
|
|
71
78
|
}
|
|
72
|
-
}, [status,
|
|
79
|
+
}, [status, shakeTrigger]);
|
|
73
80
|
const handleAnimationEnd = useCallback(() => {
|
|
74
81
|
wrapperRef.current?.classList.remove(SHAKE_CLASS);
|
|
75
82
|
}, []);
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
useControlledState
|
|
3
3
|
} from "./chunk-MEFARVQI.mjs";
|
|
4
|
+
import {
|
|
5
|
+
useTigerConfig
|
|
6
|
+
} from "./chunk-YSIXURBW.mjs";
|
|
4
7
|
|
|
5
8
|
// src/components/Carousel.tsx
|
|
6
9
|
import React, {
|
|
@@ -31,7 +34,9 @@ import {
|
|
|
31
34
|
resolveCarouselSwipeDirection,
|
|
32
35
|
createCarouselAutoplayController,
|
|
33
36
|
carouselPrevArrowPath,
|
|
34
|
-
carouselNextArrowPath
|
|
37
|
+
carouselNextArrowPath,
|
|
38
|
+
mergeTigerLocale,
|
|
39
|
+
getCarouselLabels
|
|
35
40
|
} from "@expcat/tigercat-core";
|
|
36
41
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
37
42
|
var Carousel = forwardRef(
|
|
@@ -50,11 +55,14 @@ var Carousel = forwardRef(
|
|
|
50
55
|
pauseOnFocus = true,
|
|
51
56
|
className,
|
|
52
57
|
style,
|
|
58
|
+
locale,
|
|
59
|
+
labels: labelsOverride,
|
|
53
60
|
onCurrentIndexChange,
|
|
54
61
|
onChange,
|
|
55
62
|
onBeforeChange,
|
|
56
63
|
children
|
|
57
64
|
}, ref) => {
|
|
65
|
+
const config = useTigerConfig();
|
|
58
66
|
const slides = useMemo(() => {
|
|
59
67
|
return React.Children.toArray(children).filter((child) => React.isValidElement(child));
|
|
60
68
|
}, [children]);
|
|
@@ -72,6 +80,14 @@ var Carousel = forwardRef(
|
|
|
72
80
|
const containerRef = useRef(null);
|
|
73
81
|
const touchStartRef = useRef(null);
|
|
74
82
|
const touchCurrentRef = useRef(null);
|
|
83
|
+
const mergedLocale = useMemo(
|
|
84
|
+
() => mergeTigerLocale(config.locale, locale),
|
|
85
|
+
[config.locale, locale]
|
|
86
|
+
);
|
|
87
|
+
const labels = useMemo(
|
|
88
|
+
() => getCarouselLabels(mergedLocale, labelsOverride),
|
|
89
|
+
[mergedLocale, labelsOverride]
|
|
90
|
+
);
|
|
75
91
|
const onChangeRef = useRef(onChange);
|
|
76
92
|
const onBeforeChangeRef = useRef(onBeforeChange);
|
|
77
93
|
onChangeRef.current = onChange;
|
|
@@ -250,7 +266,7 @@ var Carousel = forwardRef(
|
|
|
250
266
|
className: getCarouselArrowClasses(type, disabled),
|
|
251
267
|
onClick,
|
|
252
268
|
disabled,
|
|
253
|
-
"aria-label": type === "prev" ?
|
|
269
|
+
"aria-label": type === "prev" ? labels.previousSlideAriaLabel : labels.nextSlideAriaLabel,
|
|
254
270
|
children: /* @__PURE__ */ jsx(
|
|
255
271
|
"svg",
|
|
256
272
|
{
|
|
@@ -276,13 +292,13 @@ var Carousel = forwardRef(
|
|
|
276
292
|
};
|
|
277
293
|
const renderDots = () => {
|
|
278
294
|
if (!dots || slideCount <= 1) return null;
|
|
279
|
-
return /* @__PURE__ */ jsx("div", { className: dotsClasses, role: "tablist", "aria-label":
|
|
295
|
+
return /* @__PURE__ */ jsx("div", { className: dotsClasses, role: "tablist", "aria-label": labels.navigationAriaLabel, children: slides.map((_, index) => /* @__PURE__ */ jsx(
|
|
280
296
|
"button",
|
|
281
297
|
{
|
|
282
298
|
type: "button",
|
|
283
299
|
className: getCarouselDotClasses(index === currentIndex),
|
|
284
300
|
onClick: () => goTo(index),
|
|
285
|
-
"aria-label":
|
|
301
|
+
"aria-label": labels.goToSlideAriaLabel.replace("{index}", String(index + 1)),
|
|
286
302
|
"aria-current": index === currentIndex ? "true" : "false"
|
|
287
303
|
},
|
|
288
304
|
index
|
|
@@ -296,7 +312,7 @@ var Carousel = forwardRef(
|
|
|
296
312
|
style: effect === "fade" ? slideStyle : void 0,
|
|
297
313
|
role: "group",
|
|
298
314
|
"aria-roledescription": "slide",
|
|
299
|
-
"aria-label":
|
|
315
|
+
"aria-label": labels.slideAriaLabel.replace("{index}", String(index + 1)).replace("{total}", String(slideCount)),
|
|
300
316
|
"aria-hidden": index !== currentIndex,
|
|
301
317
|
children: slide
|
|
302
318
|
},
|
|
@@ -315,7 +331,7 @@ var Carousel = forwardRef(
|
|
|
315
331
|
style,
|
|
316
332
|
role: "region",
|
|
317
333
|
"aria-roledescription": "carousel",
|
|
318
|
-
"aria-label":
|
|
334
|
+
"aria-label": labels.ariaLabel,
|
|
319
335
|
onMouseEnter: handleMouseEnter,
|
|
320
336
|
onMouseLeave: handleMouseLeave,
|
|
321
337
|
onFocus: handleFocus,
|
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useTigerConfig
|
|
3
|
+
} from "./chunk-YSIXURBW.mjs";
|
|
4
|
+
|
|
1
5
|
// src/components/AvatarGroup.tsx
|
|
2
6
|
import React, { createContext, useMemo } from "react";
|
|
3
7
|
import {
|
|
4
8
|
getAvatarGroupClasses,
|
|
5
9
|
getAvatarGroupItemClasses,
|
|
10
|
+
getAvatarGroupLabels,
|
|
6
11
|
getAvatarGroupOverflowClasses,
|
|
7
12
|
getAvatarGroupOverflowLabel,
|
|
8
13
|
getAvatarGroupOverflowText,
|
|
9
|
-
getVisibleGroupItems
|
|
14
|
+
getVisibleGroupItems,
|
|
15
|
+
mergeTigerLocale
|
|
10
16
|
} from "@expcat/tigercat-core";
|
|
11
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
18
|
var AvatarGroupContext = createContext(null);
|
|
@@ -14,9 +20,20 @@ var AvatarGroup = ({
|
|
|
14
20
|
max,
|
|
15
21
|
size,
|
|
16
22
|
className,
|
|
23
|
+
locale,
|
|
24
|
+
labels: labelsOverride,
|
|
17
25
|
children,
|
|
18
26
|
...props
|
|
19
27
|
}) => {
|
|
28
|
+
const config = useTigerConfig();
|
|
29
|
+
const mergedLocale = useMemo(
|
|
30
|
+
() => mergeTigerLocale(config.locale, locale),
|
|
31
|
+
[config.locale, locale]
|
|
32
|
+
);
|
|
33
|
+
const labels = useMemo(
|
|
34
|
+
() => getAvatarGroupLabels(mergedLocale, labelsOverride),
|
|
35
|
+
[mergedLocale, labelsOverride]
|
|
36
|
+
);
|
|
20
37
|
const contextValue = useMemo(
|
|
21
38
|
() => ({ size, itemClass: getAvatarGroupItemClasses() }),
|
|
22
39
|
[size]
|
|
@@ -28,7 +45,7 @@ var AvatarGroup = ({
|
|
|
28
45
|
{
|
|
29
46
|
className: getAvatarGroupClasses(className),
|
|
30
47
|
role: "group",
|
|
31
|
-
"aria-label":
|
|
48
|
+
"aria-label": labels.ariaLabel,
|
|
32
49
|
...props,
|
|
33
50
|
children: [
|
|
34
51
|
visibleItems,
|
|
@@ -36,7 +53,7 @@ var AvatarGroup = ({
|
|
|
36
53
|
"span",
|
|
37
54
|
{
|
|
38
55
|
className: getAvatarGroupOverflowClasses(size ?? "md"),
|
|
39
|
-
"aria-label": getAvatarGroupOverflowLabel(overflowCount),
|
|
56
|
+
"aria-label": getAvatarGroupOverflowLabel(overflowCount, labels.overflowAriaLabel),
|
|
40
57
|
children: getAvatarGroupOverflowText(overflowCount)
|
|
41
58
|
}
|
|
42
59
|
)
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
import { jsx } from "react/jsx-runtime";
|
|
18
18
|
var Icon = ({
|
|
19
19
|
name,
|
|
20
|
+
icon,
|
|
20
21
|
size = "md",
|
|
21
22
|
color = "currentColor",
|
|
22
23
|
className,
|
|
@@ -28,7 +29,7 @@ var Icon = ({
|
|
|
28
29
|
const iconStyle = { ...style, color };
|
|
29
30
|
const isDecorative = props["aria-label"] == null && props["aria-labelledby"] == null && props.role == null;
|
|
30
31
|
const hasChildren = React.Children.count(children) > 0;
|
|
31
|
-
const definition = !hasChildren
|
|
32
|
+
const definition = !hasChildren ? icon ?? (name ? getIconDefinition(name) : void 0) : void 0;
|
|
32
33
|
const builtInSvg = definition ? /* @__PURE__ */ jsx(
|
|
33
34
|
"svg",
|
|
34
35
|
{
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Table
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-Z47SG5L5.mjs";
|
|
4
4
|
import {
|
|
5
5
|
Select
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PAN256RW.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Popover
|
|
9
9
|
} from "./chunk-QWUDJC6K.mjs";
|
|
10
10
|
import {
|
|
11
11
|
Input
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-F6WV53BS.mjs";
|
|
13
13
|
import {
|
|
14
14
|
Checkbox
|
|
15
15
|
} from "./chunk-EPWAROC2.mjs";
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
} from "./chunk-5TE7KLE5.mjs";
|
|
19
19
|
import {
|
|
20
20
|
useTigerConfig
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-YSIXURBW.mjs";
|
|
22
22
|
|
|
23
23
|
// src/components/DataTableWithToolbar.tsx
|
|
24
24
|
import { useEffect, useMemo, useRef, useState } from "react";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Modal
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-K7MYQISG.mjs";
|
|
4
4
|
import {
|
|
5
5
|
ImageCropper
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-VD55SSP7.mjs";
|
|
7
7
|
import {
|
|
8
8
|
Button
|
|
9
9
|
} from "./chunk-5TE7KLE5.mjs";
|
|
10
10
|
import {
|
|
11
11
|
useTigerConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-YSIXURBW.mjs";
|
|
13
13
|
|
|
14
14
|
// src/components/CropUpload.tsx
|
|
15
15
|
import { useState, useRef, useCallback, useMemo } from "react";
|
|
@@ -10,7 +10,8 @@ import {
|
|
|
10
10
|
rgbToHex,
|
|
11
11
|
rgbToHsv,
|
|
12
12
|
hsvToRgb,
|
|
13
|
-
|
|
13
|
+
formatColorString,
|
|
14
|
+
parseColorInput,
|
|
14
15
|
classNames
|
|
15
16
|
} from "@expcat/tigercat-core";
|
|
16
17
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
@@ -18,26 +19,39 @@ var ColorPicker = ({
|
|
|
18
19
|
value = "#2563eb",
|
|
19
20
|
disabled = false,
|
|
20
21
|
size = "md",
|
|
21
|
-
showAlpha
|
|
22
|
-
format
|
|
22
|
+
showAlpha = false,
|
|
23
|
+
format = "hex",
|
|
23
24
|
presets,
|
|
24
25
|
className,
|
|
25
26
|
onChange
|
|
26
27
|
}) => {
|
|
27
28
|
const [isOpen, setIsOpen] = useState(false);
|
|
28
|
-
const [
|
|
29
|
+
const [alpha, setAlpha] = useState(1);
|
|
29
30
|
const containerRef = useRef(null);
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
const rgb = useMemo(() => hexToRgb(value), [value]);
|
|
32
|
+
const hsv = useMemo(() => rgbToHsv(rgb.r, rgb.g, rgb.b), [rgb]);
|
|
33
|
+
const displayValue = useMemo(
|
|
34
|
+
() => formatColorString(rgb.r, rgb.g, rgb.b, format, showAlpha ? alpha : void 0),
|
|
35
|
+
[rgb, format, showAlpha, alpha]
|
|
36
|
+
);
|
|
37
|
+
const swatchColor = showAlpha ? `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${alpha})` : value;
|
|
38
|
+
const [inputValue, setInputValue] = useState(displayValue);
|
|
34
39
|
useEffect(() => {
|
|
35
|
-
setInputValue(
|
|
36
|
-
}, [
|
|
40
|
+
setInputValue(displayValue);
|
|
41
|
+
}, [displayValue]);
|
|
37
42
|
function togglePanel() {
|
|
38
43
|
if (disabled) return;
|
|
39
44
|
setIsOpen((v) => !v);
|
|
40
45
|
}
|
|
46
|
+
function handleTriggerKeyDown(e) {
|
|
47
|
+
if (disabled) return;
|
|
48
|
+
if (e.key === "Enter" || e.key === " " || e.key === "Spacebar") {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
setIsOpen((v) => !v);
|
|
51
|
+
} else if (e.key === "Escape" && isOpen) {
|
|
52
|
+
setIsOpen(false);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
41
55
|
function handleHueChange(e) {
|
|
42
56
|
const hue = Number(e.target.value);
|
|
43
57
|
const { r, g, b } = hsvToRgb(hue, hsv.s, hsv.v);
|
|
@@ -47,14 +61,23 @@ var ColorPicker = ({
|
|
|
47
61
|
function handleInputChange(e) {
|
|
48
62
|
const val = e.target.value;
|
|
49
63
|
setInputValue(val);
|
|
50
|
-
|
|
51
|
-
|
|
64
|
+
const hex = parseColorInput(val);
|
|
65
|
+
if (hex) {
|
|
52
66
|
onChange?.(hex);
|
|
53
67
|
}
|
|
54
68
|
}
|
|
69
|
+
function handleAlphaChange(e) {
|
|
70
|
+
setAlpha(Number(e.target.value) / 100);
|
|
71
|
+
}
|
|
55
72
|
function handlePresetClick(color) {
|
|
56
73
|
onChange?.(color);
|
|
57
74
|
}
|
|
75
|
+
function handlePresetKeyDown(e, color) {
|
|
76
|
+
if (e.key === "Enter" || e.key === " " || e.key === "Spacebar") {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
handlePresetClick(color);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
58
81
|
useEffect(() => {
|
|
59
82
|
if (!isOpen) return;
|
|
60
83
|
function handleClickOutside(e) {
|
|
@@ -70,11 +93,15 @@ var ColorPicker = ({
|
|
|
70
93
|
"div",
|
|
71
94
|
{
|
|
72
95
|
className: getColorPickerTriggerClasses(size, disabled),
|
|
73
|
-
style: { backgroundColor:
|
|
96
|
+
style: { backgroundColor: swatchColor },
|
|
74
97
|
role: "button",
|
|
75
98
|
"aria-label": "Pick color",
|
|
76
|
-
|
|
77
|
-
|
|
99
|
+
"aria-haspopup": "dialog",
|
|
100
|
+
"aria-expanded": isOpen,
|
|
101
|
+
"aria-disabled": disabled || void 0,
|
|
102
|
+
tabIndex: disabled ? -1 : 0,
|
|
103
|
+
onClick: togglePanel,
|
|
104
|
+
onKeyDown: handleTriggerKeyDown
|
|
78
105
|
}
|
|
79
106
|
),
|
|
80
107
|
isOpen && /* @__PURE__ */ jsxs("div", { className: colorPickerPanelClasses, children: [
|
|
@@ -93,8 +120,23 @@ var ColorPicker = ({
|
|
|
93
120
|
}
|
|
94
121
|
)
|
|
95
122
|
] }),
|
|
123
|
+
showAlpha && /* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
124
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs text-[var(--tiger-text-muted,#6b7280)] mb-1", children: "Alpha" }),
|
|
125
|
+
/* @__PURE__ */ jsx(
|
|
126
|
+
"input",
|
|
127
|
+
{
|
|
128
|
+
type: "range",
|
|
129
|
+
min: 0,
|
|
130
|
+
max: 100,
|
|
131
|
+
value: Math.round(alpha * 100),
|
|
132
|
+
className: "w-full h-2 rounded-full cursor-pointer accent-[var(--tiger-primary,#2563eb)]",
|
|
133
|
+
"aria-label": "Alpha",
|
|
134
|
+
onChange: handleAlphaChange
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
] }),
|
|
96
138
|
/* @__PURE__ */ jsxs("div", { className: "mb-2", children: [
|
|
97
|
-
/* @__PURE__ */ jsx("label", { className: "block text-xs text-[var(--tiger-text-muted,#6b7280)] mb-1", children:
|
|
139
|
+
/* @__PURE__ */ jsx("label", { className: "block text-xs text-[var(--tiger-text-muted,#6b7280)] mb-1 uppercase", children: format }),
|
|
98
140
|
/* @__PURE__ */ jsx(
|
|
99
141
|
"input",
|
|
100
142
|
{
|
|
@@ -111,19 +153,22 @@ var ColorPicker = ({
|
|
|
111
153
|
"div",
|
|
112
154
|
{
|
|
113
155
|
className: "w-8 h-8 rounded border border-[var(--tiger-border,#d1d5db)]",
|
|
114
|
-
style: { backgroundColor:
|
|
156
|
+
style: { backgroundColor: swatchColor },
|
|
115
157
|
"aria-label": "Color preview"
|
|
116
158
|
}
|
|
117
159
|
),
|
|
118
|
-
/* @__PURE__ */ jsx("span", { className: "text-xs font-mono text-[var(--tiger-text,#111827)]", children:
|
|
160
|
+
/* @__PURE__ */ jsx("span", { className: "text-xs font-mono text-[var(--tiger-text,#111827)]", children: displayValue })
|
|
119
161
|
] }),
|
|
120
162
|
presets && presets.length > 0 && /* @__PURE__ */ jsx("div", { className: "flex flex-wrap gap-1", children: presets.map((color) => /* @__PURE__ */ jsx(
|
|
121
163
|
"div",
|
|
122
164
|
{
|
|
123
165
|
className: colorPickerPresetClasses,
|
|
124
166
|
style: { backgroundColor: color },
|
|
167
|
+
role: "button",
|
|
168
|
+
tabIndex: 0,
|
|
125
169
|
"aria-label": `Select ${color}`,
|
|
126
|
-
onClick: () => handlePresetClick(color)
|
|
170
|
+
onClick: () => handlePresetClick(color),
|
|
171
|
+
onKeyDown: (e) => handlePresetKeyDown(e, color)
|
|
127
172
|
},
|
|
128
173
|
color
|
|
129
174
|
)) })
|
|
@@ -51,6 +51,8 @@ var InputNumber = ({
|
|
|
51
51
|
formatter,
|
|
52
52
|
parser,
|
|
53
53
|
autoFocus = false,
|
|
54
|
+
incrementAriaLabel = "Increase",
|
|
55
|
+
decrementAriaLabel = "Decrease",
|
|
54
56
|
onChange,
|
|
55
57
|
onFocus,
|
|
56
58
|
onBlur,
|
|
@@ -185,7 +187,7 @@ var InputNumber = ({
|
|
|
185
187
|
{
|
|
186
188
|
type: "button",
|
|
187
189
|
tabIndex: -1,
|
|
188
|
-
"aria-label":
|
|
190
|
+
"aria-label": decrementAriaLabel,
|
|
189
191
|
className: getInputNumberSideButtonClasses("left", disabled || atMin),
|
|
190
192
|
disabled: disabled || atMin,
|
|
191
193
|
onPointerDown: startStepRepeat("down"),
|
|
@@ -235,7 +237,7 @@ var InputNumber = ({
|
|
|
235
237
|
{
|
|
236
238
|
type: "button",
|
|
237
239
|
tabIndex: -1,
|
|
238
|
-
"aria-label":
|
|
240
|
+
"aria-label": incrementAriaLabel,
|
|
239
241
|
className: getInputNumberSideButtonClasses("right", disabled || atMax),
|
|
240
242
|
disabled: disabled || atMax,
|
|
241
243
|
onPointerDown: startStepRepeat("up"),
|
|
@@ -263,7 +265,7 @@ var InputNumber = ({
|
|
|
263
265
|
{
|
|
264
266
|
type: "button",
|
|
265
267
|
tabIndex: -1,
|
|
266
|
-
"aria-label":
|
|
268
|
+
"aria-label": incrementAriaLabel,
|
|
267
269
|
className: getInputNumberStepButtonClasses("up", disabled || atMax),
|
|
268
270
|
disabled: disabled || atMax,
|
|
269
271
|
onPointerDown: startStepRepeat("up"),
|
|
@@ -288,7 +290,7 @@ var InputNumber = ({
|
|
|
288
290
|
{
|
|
289
291
|
type: "button",
|
|
290
292
|
tabIndex: -1,
|
|
291
|
-
"aria-label":
|
|
293
|
+
"aria-label": decrementAriaLabel,
|
|
292
294
|
className: getInputNumberStepButtonClasses("down", disabled || atMin),
|
|
293
295
|
disabled: disabled || atMin,
|
|
294
296
|
onPointerDown: startStepRepeat("down"),
|
|
@@ -21,6 +21,8 @@ var Stepper = ({
|
|
|
21
21
|
size = "md",
|
|
22
22
|
precision,
|
|
23
23
|
className,
|
|
24
|
+
incrementAriaLabel = "Increase",
|
|
25
|
+
decrementAriaLabel = "Decrease",
|
|
24
26
|
onChange
|
|
25
27
|
}) => {
|
|
26
28
|
const repeatControllerRef = useRef(createRafRepeatActionController());
|
|
@@ -73,7 +75,7 @@ var Stepper = ({
|
|
|
73
75
|
type: "button",
|
|
74
76
|
className: getStepperButtonClasses(size, disabled || atMin, "left"),
|
|
75
77
|
disabled: disabled || atMin,
|
|
76
|
-
"aria-label":
|
|
78
|
+
"aria-label": decrementAriaLabel,
|
|
77
79
|
onPointerDown: startStepRepeat("down"),
|
|
78
80
|
onPointerUp: stopStepRepeat,
|
|
79
81
|
onPointerLeave: stopStepRepeat,
|
|
@@ -102,7 +104,7 @@ var Stepper = ({
|
|
|
102
104
|
type: "button",
|
|
103
105
|
className: getStepperButtonClasses(size, disabled || atMax, "right"),
|
|
104
106
|
disabled: disabled || atMax,
|
|
105
|
-
"aria-label":
|
|
107
|
+
"aria-label": incrementAriaLabel,
|
|
106
108
|
onPointerDown: startStepRepeat("up"),
|
|
107
109
|
onPointerUp: stopStepRepeat,
|
|
108
110
|
onPointerLeave: stopStepRepeat,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-MEFARVQI.mjs";
|
|
4
4
|
import {
|
|
5
5
|
useTigerConfig
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-YSIXURBW.mjs";
|
|
7
7
|
|
|
8
8
|
// src/components/TimePicker.tsx
|
|
9
9
|
import {
|
|
@@ -348,7 +348,7 @@ function useTimePickerState(allProps) {
|
|
|
348
348
|
}, 0);
|
|
349
349
|
return () => window.clearTimeout(focusTimer);
|
|
350
350
|
}, [isOpen, activePart]);
|
|
351
|
-
const inputClasses = getTimePickerInputClasses(size, disabled || readonly);
|
|
351
|
+
const inputClasses = getTimePickerInputClasses(size, disabled || readonly, showClearButton);
|
|
352
352
|
const iconButtonClasses = getTimePickerIconButtonClasses(size);
|
|
353
353
|
return {
|
|
354
354
|
panelRef,
|