@etus/design-system 2.0.1 → 2.0.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/lib/Accordion.css +1 -0
- package/lib/ActionCard.css +1 -0
- package/lib/Alert.css +1 -0
- package/lib/AutoComplete.css +1 -0
- package/lib/Badge.css +1 -0
- package/lib/Breadcrumb.css +1 -0
- package/lib/Button.css +1 -0
- package/lib/Calendar.css +1 -0
- package/lib/Carousel.css +1 -0
- package/lib/Checkbox.css +1 -0
- package/lib/Crop.css +1 -0
- package/lib/DatePicker.css +1 -0
- package/lib/Dropdown.css +1 -1
- package/lib/FileUpload.css +1 -0
- package/lib/Filter.css +1 -0
- package/lib/History.css +1 -0
- package/lib/IconCard.css +1 -0
- package/lib/Image.css +1 -0
- package/lib/MetricCard.css +1 -0
- package/lib/Navbar.css +1 -0
- package/lib/Pagination.css +1 -0
- package/lib/Profile.css +1 -0
- package/lib/ProgressBar.css +1 -0
- package/lib/Radio.css +1 -0
- package/lib/RichTextEditor.css +1 -0
- package/lib/RoundMenu.css +1 -0
- package/lib/Select.css +1 -0
- package/lib/Sidebar.css +1 -0
- package/lib/StatusBadge.css +1 -0
- package/lib/Stepper.css +1 -1
- package/lib/Switch.css +1 -0
- package/lib/Tab.css +1 -0
- package/lib/Table.css +1 -0
- package/lib/TagInput.css +1 -0
- package/lib/TagSelect.css +1 -0
- package/lib/Toggle.css +1 -0
- package/lib/Tree.css +1 -0
- package/lib/assets/Accordion-BFrTxcI9.css +1 -0
- package/lib/assets/Accordion-BLDionAq.js +1 -0
- package/lib/assets/Accordion-CgoVX19v.js +1 -0
- package/lib/assets/ActionCard-BWmyJT_9.js +1 -0
- package/lib/assets/ActionCard-BZb91dIW.css +1 -0
- package/lib/assets/ActionCard-Dnm8wc-V.js +1 -0
- package/lib/assets/Alert-D-09BScY.js +1 -0
- package/lib/assets/Alert-DduoTaDO.css +1 -0
- package/lib/assets/Alert-VaDDaJmV.js +1 -0
- package/lib/assets/AutoComplete-0HbU6b9V.js +1 -0
- package/lib/assets/AutoComplete-C0EjtIQ-.js +1 -0
- package/lib/assets/AutoComplete-DHFGDgEQ.css +1 -0
- package/lib/assets/Badge-GYjsY_3C.css +1 -0
- package/lib/assets/Badge-Te4ff3ej.js +1 -0
- package/lib/assets/Badge-xSUPZkRF.js +1 -0
- package/lib/assets/Breadcrumb-CUVLzPPD.js +1 -0
- package/lib/assets/Breadcrumb-DbGhoBPp.js +1 -0
- package/lib/assets/Breadcrumb-zzZevNgV.css +1 -0
- package/lib/assets/Button-1lnlGEU9.js +1 -0
- package/lib/assets/Button-CrBBrgy5.css +1 -0
- package/lib/assets/Button-PxUMi4c4.js +1 -0
- package/lib/assets/Calendar-CI3EoS57.js +1 -0
- package/lib/assets/Calendar-E1QPtZO1.js +1 -0
- package/lib/assets/Calendar-gS7wEU5v.css +1 -0
- package/lib/assets/Carousel-Cne2rOoP.js +1 -0
- package/lib/assets/Carousel-Dvr9ATv2.css +1 -0
- package/lib/assets/Carousel-iZhiqHr1.js +1 -0
- package/lib/assets/Checkbox-2PgbPjFv.js +1 -0
- package/lib/assets/Checkbox-Cj_gicnB.css +1 -0
- package/lib/assets/Checkbox-yFotY5Bn.js +1 -0
- package/lib/assets/ColorPicker-BsrGOt2x.js +1 -0
- package/lib/assets/ColorPicker-C8kkPONG.js +1 -0
- package/lib/assets/Confirm-D5SQRnzs.js +1 -0
- package/lib/assets/Confirm-D9ue91JY.js +1 -0
- package/lib/assets/Crop-COi25GCt.js +1 -0
- package/lib/assets/Crop-DXU8IEzK.js +1 -0
- package/lib/assets/Crop-WBOMB0XF.css +1 -0
- package/lib/assets/DatePicker-BqHgn0jP.js +1 -0
- package/lib/assets/DatePicker-Cv2SfuC2.css +1 -0
- package/lib/assets/DatePicker-DBb7Pq4-.js +1 -0
- package/lib/assets/DesignSystemProvider-DPbBh8_F.js +1 -0
- package/lib/assets/DesignSystemProvider-EOq0hjf5.js +1 -0
- package/lib/assets/Dialog-TzFU7H7M.js +1 -0
- package/lib/assets/Dialog-lFnC79hF.js +1 -0
- package/lib/assets/Drawer-BRhAt1cp.js +1 -0
- package/lib/assets/Drawer-BShyg2Md.js +1 -0
- package/lib/assets/Dropdown-BeObPypj.css +1 -0
- package/lib/assets/Dropdown-DOmq6yld.js +1 -0
- package/lib/assets/Dropdown-Di_QSp14.js +1 -0
- package/lib/assets/ExpandableContainer-BRU7oRQZ.js +1 -0
- package/lib/assets/ExpandableContainer-T1N4IU4P.js +1 -0
- package/lib/assets/FileUpload-BLhvkuKS.js +1 -0
- package/lib/assets/FileUpload-Bn2hN30U.css +1 -0
- package/lib/assets/FileUpload-Cc6WNrgH.js +1 -0
- package/lib/assets/Filter-BpZb369c.js +1 -0
- package/lib/assets/Filter-Deq8WR7s.css +1 -0
- package/lib/assets/Filter-QMWutHly.js +1 -0
- package/lib/assets/FloatCard-CpyZ6Sv2.js +1 -0
- package/lib/assets/FloatCard-hzT_yVsi.js +1 -0
- package/lib/assets/History-B8JQmONY.js +1 -0
- package/lib/assets/History-BBHRpFWw.js +1 -0
- package/lib/assets/History-DqZMdgvF.css +1 -0
- package/lib/assets/IconCard-BlV7E9dX.css +1 -0
- package/lib/assets/IconCard-CP-P2jyn.js +1 -0
- package/lib/assets/IconCard-DkDRKG8a.js +1 -0
- package/lib/assets/Image-CkMVrVxf.js +1 -0
- package/lib/assets/Image-CoinvfQ-.js +1 -0
- package/lib/assets/Image-DT7JkEC_.css +1 -0
- package/lib/assets/Input-C0RH5m66.js +1 -0
- package/lib/assets/Input-DZ17y4L_.js +1 -0
- package/lib/assets/Label-AiZCfFq1.js +1 -0
- package/lib/assets/Label-DhQPcDeH.js +1 -0
- package/lib/assets/MetricCard-BKni_xcO.js +1 -0
- package/lib/assets/MetricCard-Dkv9xWP4.css +1 -0
- package/lib/assets/MetricCard-Du95xvGv.js +1 -0
- package/lib/assets/Navbar-Ba75bp5L.css +1 -0
- package/lib/assets/Navbar-BaVZCyqJ.js +1 -0
- package/lib/assets/Navbar-DXhNGOsj.js +1 -0
- package/lib/assets/Option-B-lvFxi7.js +1 -0
- package/lib/assets/Option-C3L7jFYC.js +1 -0
- package/lib/assets/Overlay-D0w6z3ie.js +1 -0
- package/lib/assets/Overlay-D_ULC3j5.js +1 -0
- package/lib/assets/PINInput-Bh9Jd3rB.js +1 -0
- package/lib/assets/PINInput-DymwFX1G.js +1 -0
- package/lib/assets/Pagination-B5AR5_SP.js +1 -0
- package/lib/assets/Pagination-BeKkkgRb.css +1 -0
- package/lib/assets/Pagination-CbOpAka-.js +1 -0
- package/lib/assets/Profile-Bww3-jQ7.js +1 -0
- package/lib/assets/Profile-CV7wdM8h.css +1 -0
- package/lib/assets/Profile-Z0DOVCs2.js +1 -0
- package/lib/assets/ProgressBar-ClBOwZKj.css +1 -0
- package/lib/assets/ProgressBar-OifG1zbb.js +1 -0
- package/lib/assets/ProgressBar-_D7Nifw6.js +1 -0
- package/lib/assets/Radio-BmQ4hiBf.js +1 -0
- package/lib/assets/Radio-DFcsNAYE.css +1 -0
- package/lib/assets/Radio-HxZNKwDn.js +1 -0
- package/lib/assets/RichTextEditor-DR1hYKQF.js +1 -0
- package/lib/assets/RichTextEditor-L3swXum0.js +1 -0
- package/lib/assets/RichTextEditor-ZfE5A8C0.css +1 -0
- package/lib/assets/RoundMenu-BSoV9q6V.js +1 -0
- package/lib/assets/RoundMenu-CgxYetqt.js +1 -0
- package/lib/assets/RoundMenu-llkS0uLX.css +1 -0
- package/lib/assets/Select-B7JnRTcc.js +1 -0
- package/lib/assets/Select-Bqw3ZPOg.js +1 -0
- package/lib/assets/Select-Czly_-sH.css +1 -0
- package/lib/assets/SelectContainer-BRSv1LpP.js +1 -0
- package/lib/assets/SelectContainer-HFSZpyH5.js +1 -0
- package/lib/assets/SelectContent-CXvWzOVg.js +1 -0
- package/lib/assets/SelectContent-SGkP4IfD.js +1 -0
- package/lib/assets/Sidebar-Br7HMLj5.js +1 -0
- package/lib/assets/Sidebar-CBg_ZIzm.js +1 -0
- package/lib/assets/Sidebar-CJmPvQ0E.css +1 -0
- package/lib/assets/Slider-C1q6E2k3.js +1 -0
- package/lib/assets/Slider-CcOR39o6.js +1 -0
- package/lib/assets/StatusBadge-1hF5CQM2.js +1 -0
- package/lib/assets/StatusBadge-DxIUZ75l.css +1 -0
- package/lib/assets/StatusBadge-bK6dJmfs.js +1 -0
- package/lib/assets/Stepper-C6YCuF1p.js +1 -0
- package/lib/assets/Stepper-C8kEYcc4.js +1 -0
- package/lib/assets/Stepper-e-nPkc4n.css +1 -0
- package/lib/assets/Switch-BbmBI4t-.css +1 -0
- package/lib/assets/Switch-DfaIhPgH.js +1 -0
- package/lib/assets/Switch-MRgqLSwE.js +1 -0
- package/lib/assets/Tab-2xegrzwU.js +1 -0
- package/lib/assets/Tab-BWTafykp.css +1 -0
- package/lib/assets/Tab-r87Om7ti.js +1 -0
- package/lib/assets/Table-B8ifx_k_.js +1 -0
- package/lib/assets/Table-Bb_pB7xr.css +1 -0
- package/lib/assets/Table-BrRdo0rx.js +1 -0
- package/lib/assets/TagInput-B4odE2Wm.js +1 -0
- package/lib/assets/TagInput-CuDUKx0K.js +1 -0
- package/lib/assets/TagInput-D2zgaR5F.css +1 -0
- package/lib/assets/TagSelect-BFudFHoc.css +1 -0
- package/lib/assets/TagSelect-DQbDaMr-.js +1 -0
- package/lib/assets/TagSelect-DvtjzgB6.js +1 -0
- package/lib/assets/Textarea-BtSNZ8Gp.js +1 -0
- package/lib/assets/Textarea-CDPRSwRY.js +1 -0
- package/lib/assets/Toast-BP80UdpJ.js +1 -0
- package/lib/assets/Toast-CY1qe4HT.js +1 -0
- package/lib/assets/Toggle-BGajQcLP.js +1 -0
- package/lib/assets/Toggle-D51xo3o6.css +1 -0
- package/lib/assets/Toggle-ftaewjeK.js +1 -0
- package/lib/assets/Tooltip-DVq7Ij0P.js +1 -0
- package/lib/assets/Tooltip-chSVIpvZ.js +1 -0
- package/lib/assets/Tree-BU5IfND5.css +1 -0
- package/lib/assets/Tree-BWFRKUwY.js +1 -0
- package/lib/assets/Tree-BbVjt78W.js +1 -0
- package/lib/assets/index-B4fH-h2h.js +4 -0
- package/lib/assets/index-B86NDK_5.css +1 -0
- package/lib/assets/index-BmQ-r8Ut.css +1 -0
- package/lib/assets/index-C-RplXeX.js +4 -0
- package/lib/assets/index-DTN8b1mo.css +1 -0
- package/lib/assets/index-DVIEtHZd.css +1 -0
- package/lib/assets/index-ZXHbiWno.css +1 -0
- package/lib/assets/jsx-runtime-BubrbI3X.js +1 -0
- package/lib/assets/jsx-runtime-u17CrQMm.js +1 -0
- package/lib/components/Accordion/index.cjs.js +1 -1
- package/lib/components/Accordion/index.es.js +1 -1
- package/lib/components/ActionCard/index.cjs.js +1 -1
- package/lib/components/ActionCard/index.es.js +1 -1
- package/lib/components/Alert/index.cjs.js +1 -1
- package/lib/components/Alert/index.es.js +1 -1
- package/lib/components/AutoComplete/index.cjs.js +1 -1
- package/lib/components/AutoComplete/index.es.js +1 -1
- package/lib/components/Avatar/index.cjs.js +1 -1
- package/lib/components/Avatar/index.es.js +1 -1
- package/lib/components/Badge/index.cjs.js +1 -1
- package/lib/components/Badge/index.es.js +1 -1
- package/lib/components/Breadcrumb/index.cjs.js +1 -1
- package/lib/components/Breadcrumb/index.es.js +1 -1
- package/lib/components/Button/index.cjs.js +1 -1
- package/lib/components/Button/index.es.js +1 -1
- package/lib/components/Calendar/index.cjs.js +1 -1
- package/lib/components/Calendar/index.es.js +1 -1
- package/lib/components/Card/index.cjs.js +1 -1
- package/lib/components/Card/index.es.js +1 -1
- package/lib/components/Carousel/index.cjs.js +1 -1
- package/lib/components/Carousel/index.es.js +1 -1
- package/lib/components/Checkbox/index.cjs.js +1 -1
- package/lib/components/Checkbox/index.es.js +1 -1
- package/lib/components/ColorPicker/index.cjs.js +1 -1
- package/lib/components/ColorPicker/index.es.js +1 -1
- package/lib/components/Confirm/index.cjs.js +1 -1
- package/lib/components/Confirm/index.es.js +1 -1
- package/lib/components/Connector/index.cjs.js +1 -1
- package/lib/components/Connector/index.es.js +1 -1
- package/lib/components/Crop/index.cjs.js +1 -1
- package/lib/components/Crop/index.es.js +1 -1
- package/lib/components/DatePicker/index.cjs.js +1 -1
- package/lib/components/DatePicker/index.es.js +1 -1
- package/lib/components/Dialog/index.cjs.js +1 -1
- package/lib/components/Dialog/index.es.js +1 -1
- package/lib/components/Drawer/index.cjs.js +1 -1
- package/lib/components/Drawer/index.es.js +1 -1
- package/lib/components/Dropdown/index.cjs.js +1 -1
- package/lib/components/Dropdown/index.es.js +1 -1
- package/lib/components/FileUpload/index.cjs.js +1 -1
- package/lib/components/FileUpload/index.es.js +1 -1
- package/lib/components/Filter/index.cjs.js +1 -1
- package/lib/components/Filter/index.es.js +1 -1
- package/lib/components/FloatCard/index.cjs.js +1 -1
- package/lib/components/FloatCard/index.es.js +1 -1
- package/lib/components/History/index.cjs.js +1 -1
- package/lib/components/History/index.es.js +1 -1
- package/lib/components/Icon/index.cjs.js +1 -1
- package/lib/components/Icon/index.es.js +1 -1
- package/lib/components/IconCard/index.cjs.js +1 -1
- package/lib/components/IconCard/index.es.js +1 -1
- package/lib/components/Image/index.cjs.js +1 -1
- package/lib/components/Image/index.es.js +1 -1
- package/lib/components/Input/index.cjs.js +1 -1
- package/lib/components/Input/index.es.js +1 -1
- package/lib/components/MetricCard/index.cjs.js +1 -1
- package/lib/components/MetricCard/index.es.js +1 -1
- package/lib/components/Navbar/index.cjs.js +1 -1
- package/lib/components/Navbar/index.es.js +1 -1
- package/lib/components/PINInput/index.cjs.js +1 -1
- package/lib/components/PINInput/index.es.js +1 -1
- package/lib/components/Pagination/index.cjs.js +1 -1
- package/lib/components/Pagination/index.es.js +1 -1
- package/lib/components/Profile/index.cjs.js +1 -1
- package/lib/components/Profile/index.es.js +1 -1
- package/lib/components/ProgressBar/index.cjs.js +1 -1
- package/lib/components/ProgressBar/index.es.js +1 -1
- package/lib/components/Radio/index.cjs.js +1 -1
- package/lib/components/Radio/index.es.js +1 -1
- package/lib/components/RadioGroup/index.cjs.js +1 -1
- package/lib/components/RadioGroup/index.es.js +1 -1
- package/lib/components/RichTextEditor/index.cjs.js +1 -1
- package/lib/components/RichTextEditor/index.es.js +1 -1
- package/lib/components/RoundMenu/index.cjs.js +1 -1
- package/lib/components/RoundMenu/index.es.js +1 -1
- package/lib/components/Select/index.cjs.js +1 -1
- package/lib/components/Select/index.es.js +1 -1
- package/lib/components/Separator/index.cjs.js +1 -1
- package/lib/components/Separator/index.es.js +1 -1
- package/lib/components/Sidebar/index.cjs.js +1 -1
- package/lib/components/Sidebar/index.es.js +1 -1
- package/lib/components/Skeleton/index.cjs.js +1 -1
- package/lib/components/Skeleton/index.es.js +1 -1
- package/lib/components/Slider/index.cjs.js +1 -1
- package/lib/components/Slider/index.es.js +1 -1
- package/lib/components/Spinner/index.cjs.js +1 -1
- package/lib/components/Spinner/index.es.js +1 -1
- package/lib/components/StatusBadge/index.cjs.js +1 -1
- package/lib/components/StatusBadge/index.es.js +1 -1
- package/lib/components/Stepper/index.cjs.js +1 -1
- package/lib/components/Stepper/index.es.js +1 -1
- package/lib/components/Switch/index.cjs.js +1 -1
- package/lib/components/Switch/index.es.js +1 -1
- package/lib/components/Tab/index.cjs.js +1 -1
- package/lib/components/Tab/index.es.js +1 -1
- package/lib/components/Table/index.cjs.js +1 -1
- package/lib/components/Table/index.es.js +1 -1
- package/lib/components/TagInput/index.cjs.js +1 -1
- package/lib/components/TagInput/index.es.js +1 -1
- package/lib/components/TagSelect/index.cjs.js +1 -1
- package/lib/components/TagSelect/index.es.js +1 -1
- package/lib/components/Textarea/index.cjs.js +1 -1
- package/lib/components/Textarea/index.es.js +1 -1
- package/lib/components/Toast/index.cjs.js +1 -1
- package/lib/components/Toast/index.es.js +1 -1
- package/lib/components/Toggle/index.cjs.js +1 -1
- package/lib/components/Toggle/index.es.js +1 -1
- package/lib/components/ToggleGroup/index.cjs.js +1 -1
- package/lib/components/ToggleGroup/index.es.js +1 -1
- package/lib/components/Tooltip/index.cjs.js +1 -1
- package/lib/components/Tooltip/index.es.js +1 -1
- package/lib/components/Tree/index.cjs.js +1 -1
- package/lib/components/Tree/index.es.js +1 -1
- package/lib/design-system.cjs.js +1 -1
- package/lib/design-system.es.js +1 -1
- package/lib/design-system.umd.js +3 -3
- package/lib/hooks/useClickOutside.cjs.js +1 -1
- package/lib/hooks/useClickOutside.es.js +1 -1
- package/lib/hooks/useControllable.es.js +1 -1
- package/lib/hooks/useTransition.es.js +1 -1
- package/lib/index2.css +1 -1
- package/lib/index3.css +1 -1
- package/lib/index4.css +1 -0
- package/lib/index5.css +1 -0
- package/lib/index6.css +1 -0
- package/lib/index7.css +1 -0
- package/lib/index8.css +1 -0
- package/lib/providers/index.cjs.js +1 -0
- package/lib/providers/index.es.js +1 -0
- package/package.json +2 -2
- package/lib/assets/ColorPicker-BzlgPz70.js +0 -1
- package/lib/assets/ColorPicker-DRs5fhzn.js +0 -1
- package/lib/assets/Confirm-BE6kYeL-.js +0 -1
- package/lib/assets/Confirm-Dh3P9z1Y.js +0 -1
- package/lib/assets/Dropdown-CBRpgE72.css +0 -1
- package/lib/assets/FloatCard-BGxNbGZp.js +0 -1
- package/lib/assets/FloatCard-Ci8mP8y4.js +0 -1
- package/lib/assets/Input-BRokEqU3.js +0 -1
- package/lib/assets/Input-xnq3TVKa.js +0 -1
- package/lib/assets/Label-BTtohMHb.js +0 -1
- package/lib/assets/Label-bwrT7VIV.js +0 -1
- package/lib/assets/PINInput-deYOmkvM.js +0 -1
- package/lib/assets/PINInput-sc5bHYA7.js +0 -1
- package/lib/assets/RichTextEditor-BorOBshN.js +0 -1
- package/lib/assets/RichTextEditor-kBX-T9zz.js +0 -1
- package/lib/assets/Sidebar-0DxOZadF.js +0 -1
- package/lib/assets/Sidebar-CPpl8WM2.js +0 -1
- package/lib/assets/Slider-DManJgem.js +0 -1
- package/lib/assets/Slider-DPMaQG2C.js +0 -1
- package/lib/assets/Stepper-BKI03jce.css +0 -1
- package/lib/assets/Textarea-CFobhecb.js +0 -1
- package/lib/assets/Textarea-foQgQnsz.js +0 -1
- package/lib/assets/Toast-DIAVNK5L.js +0 -1
- package/lib/assets/Toast-w4v5o8DT.js +0 -1
- package/lib/assets/Tooltip-DbBhUsGz.js +0 -1
- package/lib/assets/Tooltip-Diruxnme.js +0 -1
- package/lib/assets/Tree-BbX0rS-d.js +0 -1
- package/lib/assets/Tree-DNsiZzdg.js +0 -1
- package/lib/assets/colors-C7f-Usn5.css +0 -1
- package/lib/assets/index-B_deyTVk.js +0 -1
- package/lib/assets/index-CX6wEu92.js +0 -1
- package/lib/colors.css +0 -1
- /package/lib/{Container.css → ExpandableContainer.css} +0 -0
- /package/lib/assets/{Container-BsNA9KWk.css → ExpandableContainer-BsNA9KWk.css} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-u17CrQMm.js";import{useRef as w,useEffect as y}from"react";import{c as r}from"./clsx-B-dksMZM.js";import{useControllable as x}from"../hooks/useControllable.es.js";import{Icon as o}from"../components/Icon/index.es.js";function A({value:i,defaultValue:h="",onChange:p,options:d,icon:m,expanded:a,defaultExpanded:j,onExpandedChange:g,searchable:N=!1,disabled:s=!1,isError:c=!1,secondary:v=!1,searchLabel:C,status:M,appendIcon:u,className:R}){const[f,S]=x({value:i,defaultValue:h,onChange:n=>p?.(n,{index:-1})}),[t,k]=x({value:a,defaultValue:j,onChange:n=>g?.(n,{source:"click"})}),l=w(null);return y(()=>{a&&!s&&l.current&&l.current.focus()},[a,s]),e.jsxs(e.Fragment,{children:[m&&e.jsx(o,{name:m,className:r("sc-icon",{expanded:t,disabled:s,error:c})}),e.jsxs("span",{className:r("flex items-center gap-xs truncate text-sm flex-1",R,{"text-neutral-foreground-low":!d}),children:[N&&!s&&e.jsxs("div",{className:r("flex items-center text-neutral-foreground-high w-full",{secondary:v,hidden:!t}),onClick:()=>k(!0),children:[e.jsx(o,{name:"search",className:r("sc-icon",{expanded:t,disabled:s,error:c})}),!f?.length&&e.jsx("div",{className:"relative pointer-events-none",children:e.jsx("span",{className:"search-placeholder",children:C||"Search"})}),e.jsx("input",{ref:l,type:"search",className:"search",disabled:s,value:f??"",onChange:n=>S(n.target.value)}),u&&e.jsx(o,{name:u,className:r("sc-icon",{expanded:t,disabled:s,error:c})})]}),M]})]})}export{A as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./jsx-runtime-u17CrQMm.js";import{createContext as U,useState as L,useRef as z,useEffect as A,useContext as F}from"react";import{useControllable as D}from"../hooks/useControllable.es.js";import{p as G,i as J}from"./index-C-RplXeX.js";const M="_sidebar_1bq5p_2",Q="_collapsed_1bq5p_2",X="_expanded_1bq5p_2",Y="_optionsList_1bq5p_2",Z="_optionsContainer_1bq5p_2",ee="_bottomOptions_1bq5p_2",ne="_option_1bq5p_2",te="_optionActive_1bq5p_2",se="_optionIcon_1bq5p_2",ie="_optionLabel_1bq5p_2",oe="_optionLink_1bq5p_2",ae="_disabled_1bq5p_2",le="_subPanel_1bq5p_2",re="_subPanelHidden_1bq5p_2",ce="_subPanelVisible_1bq5p_2",de="_subOption_1bq5p_2",ue="_subOptionActive_1bq5p_2",be="_subOptionIcon_1bq5p_2",pe="_subOptionLabel_1bq5p_2",he="_subOptionChevron_1bq5p_2",fe="_rotated_1bq5p_2",_e="_subOptionLink_1bq5p_2",t={sidebar:M,collapsed:Q,expanded:X,optionsList:Y,optionsContainer:Z,bottomOptions:ee,option:ne,optionActive:te,optionIcon:se,optionLabel:ie,optionLink:oe,disabled:ae,subPanel:le,subPanelHidden:re,subPanelVisible:ce,subOption:de,subOptionActive:ue,subOptionIcon:be,subOptionLabel:pe,subOptionChevron:he,rotated:fe,subOptionLink:_e};let j=null;try{j=require("react-router-dom").Link}catch{}const E=U({currentValue:void 0,onChange:()=>{}});function m(e){return J(e)?e.value:e}function q(e){return e?e.startsWith("/")?e:"/"+e:""}function W({option:e,depth:x,parentPath:C=""}){const[b,r]=L(!1),{currentValue:f,onChange:v}=F(E);let a=C;e.path&&(!a.endsWith("/")&&!e.path.startsWith("/")?a+="/":a.endsWith("/")&&e.path.startsWith("/")&&(a=a.slice(0,-1)),a+=e.path);const c=!!(e.options&&e.options.length);function d(l=e){return m(f)===m(l)||!!l.options&&l.options.some(_=>d(_))}const p=d();function u(l){e.disabled||(c?r(_=>!_):v(e))}function P(l){l.key==="Enter"&&u()}const g=[t.subOption,p?t.subOptionActive:"",b?t.subOptionExpanded:"",e.disabled?t.disabled:""].filter(Boolean).join(" "),k={paddingLeft:`${x*16+16}px`},O=s.jsxs("div",{className:g,style:k,tabIndex:0,onClick:u,onKeyUp:P,role:c?"button":void 0,children:[e.icon&&s.jsx("span",{className:`${t.subOptionIcon} material-symbols-rounded`,children:e.icon}),s.jsx("span",{className:t.subOptionLabel,children:e.label}),c&&s.jsx("span",{className:`${t.subOptionChevron} material-symbols-rounded${b?` ${t.rotated}`:""}`,children:"keyboard_arrow_down"})]});let h;return c?h=O:j&&e.path?h=s.jsx(j,{to:a,tabIndex:0,className:t.subOptionLink,onClick:()=>v(e),children:O}):e.path?h=s.jsx("a",{href:a,tabIndex:0,className:t.subOptionLink,children:O}):h=O,s.jsxs(s.Fragment,{children:[h,c&&b&&e.options?.map(l=>s.jsx(W,{option:l,depth:x+1,parentPath:a},l.value))]})}function me({option:e,sidebarExpanded:x,onRailClick:C,activeParentValue:b}){const r=!!(e.options&&e.options.length),f=m(e)===m(b),v=[t.option,f?t.optionActive:"",e.disabled?t.disabled:""].filter(Boolean).join(" ");function a(){e.disabled||C(e)}function c(p){p.key==="Enter"&&a()}const d=s.jsxs("div",{className:v,tabIndex:0,onClick:a,onKeyUp:c,role:r?"button":void 0,"aria-expanded":r?f:void 0,children:[s.jsx("span",{className:t.optionIcon,children:e.icon&&s.jsx("span",{className:"material-symbols-rounded",children:e.icon})}),x&&s.jsx("span",{className:t.optionLabel,children:e.label})]});return r?d:j&&e.path?s.jsx(j,{to:q(e.path),tabIndex:0,className:t.optionLink,children:d}):e.path?s.jsx("a",{href:q(e.path),tabIndex:0,className:t.optionLink,children:d}):d}function je({value:e,defaultValue:x,onChange:C,expanded:b=!1,options:r,getObject:f=!1,className:v}){const[a,c]=D({value:e,defaultValue:x,onChange:C}),[d,p]=L(!1),[u,P]=L(void 0),[g,k]=L("100vh"),O=z(null);A(()=>{function n(){const i=document.querySelector(".navbar")?.getBoundingClientRect()?.height;k(i?`calc(100vh - ${i}px)`:"100vh")}return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),A(()=>{const n=h(r);n&&_(n)},[]);function h(n,i=""){for(const o of n){const S=l(i,o.path);if(G(S))return o;const V=h(o.options||[],S);if(V)return V}}function l(n,i){if(!i)return n;let o=n;return!o.endsWith("/")&&!i.startsWith("/")?o+="/":o.endsWith("/")&&i.startsWith("/")&&(o=o.slice(0,-1)),o+i}function _(n){if(n.disabled)return;const i=f?n:m(n);c(i)}function N(n,i){return n.find(o=>m(o)===m(i)?!0:!!N(o.options||[],i))}const B=N(r,a),w=r.filter(n=>!n.bottom),y=r.filter(n=>n.bottom);function H(n){if(n.disabled)return;!!(n.options&&n.options.length)?u?.value===n.value?p(o=>!o):(P(n),p(!0)):(p(!1),_(n))}function R(n){const i=n.relatedTarget,o=n.currentTarget;(!i||!o.contains(i))&&p(!1)}const $=[t.sidebar,b?t.expanded:t.collapsed,v].filter(Boolean).join(" "),K=[t.subPanel,d?t.subPanelVisible:t.subPanelHidden].filter(Boolean).join(" "),T={currentValue:a,onChange:_,getObject:f};function I(n){return s.jsx(me,{option:n,sidebarExpanded:b,onRailClick:H,activeParentValue:B},n.value)}return s.jsx(E.Provider,{value:T,children:s.jsxs("div",{ref:O,className:$,style:{height:g},tabIndex:0,onBlur:R,children:[s.jsxs("div",{className:t.optionsList,children:[s.jsx("div",{className:t.optionsContainer,children:w.map(I)}),y.length>0&&s.jsx("div",{className:t.bottomOptions,children:y.map(I)})]}),s.jsx("div",{className:K,children:u&&u.options&&u.options.length>0&&u.options.map(n=>s.jsx(W,{option:n,depth:0,parentPath:q(u.path)},n.value))})]})})}export{je as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-BubrbI3X.js"),p=require("react"),U=require("../hooks/useControllable.cjs.js"),S=require("./index-B4fH-h2h.js"),z="_sidebar_1bq5p_2",F="_collapsed_1bq5p_2",D="_expanded_1bq5p_2",G="_optionsList_1bq5p_2",J="_optionsContainer_1bq5p_2",M="_bottomOptions_1bq5p_2",Q="_option_1bq5p_2",X="_optionActive_1bq5p_2",Y="_optionIcon_1bq5p_2",Z="_optionLabel_1bq5p_2",ee="_optionLink_1bq5p_2",te="_disabled_1bq5p_2",ne="_subPanel_1bq5p_2",se="_subPanelHidden_1bq5p_2",ie="_subPanelVisible_1bq5p_2",oe="_subOption_1bq5p_2",ae="_subOptionActive_1bq5p_2",re="_subOptionIcon_1bq5p_2",le="_subOptionLabel_1bq5p_2",ce="_subOptionChevron_1bq5p_2",ue="_rotated_1bq5p_2",de="_subOptionLink_1bq5p_2",n={sidebar:z,collapsed:F,expanded:D,optionsList:G,optionsContainer:J,bottomOptions:M,option:Q,optionActive:X,optionIcon:Y,optionLabel:Z,optionLink:ee,disabled:te,subPanel:ne,subPanelHidden:se,subPanelVisible:ie,subOption:oe,subOptionActive:ae,subOptionIcon:re,subOptionLabel:le,subOptionChevron:ce,rotated:ue,subOptionLink:de};let E=null;try{E=require("react-router-dom").Link}catch{}const V=p.createContext({currentValue:void 0,onChange:()=>{}});function m(e){return S.isObject(e)?e.value:e}function k(e){return e?e.startsWith("/")?e:"/"+e:""}function A({option:e,depth:j,parentPath:C=""}){const[b,l]=p.useState(!1),{currentValue:f,onChange:v}=p.useContext(V);let a=C;e.path&&(!a.endsWith("/")&&!e.path.startsWith("/")?a+="/":a.endsWith("/")&&e.path.startsWith("/")&&(a=a.slice(0,-1)),a+=e.path);const c=!!(e.options&&e.options.length);function u(r=e){return m(f)===m(r)||!!r.options&&r.options.some(_=>u(_))}const x=u();function d(r){e.disabled||(c?l(_=>!_):v(e))}function R(r){r.key==="Enter"&&d()}const q=[n.subOption,x?n.subOptionActive:"",b?n.subOptionExpanded:"",e.disabled?n.disabled:""].filter(Boolean).join(" "),L={paddingLeft:`${j*16+16}px`},O=s.jsxRuntimeExports.jsxs("div",{className:q,style:L,tabIndex:0,onClick:d,onKeyUp:R,role:c?"button":void 0,children:[e.icon&&s.jsxRuntimeExports.jsx("span",{className:`${n.subOptionIcon} material-symbols-rounded`,children:e.icon}),s.jsxRuntimeExports.jsx("span",{className:n.subOptionLabel,children:e.label}),c&&s.jsxRuntimeExports.jsx("span",{className:`${n.subOptionChevron} material-symbols-rounded${b?` ${n.rotated}`:""}`,children:"keyboard_arrow_down"})]});let h;return c?h=O:E&&e.path?h=s.jsxRuntimeExports.jsx(E,{to:a,tabIndex:0,className:n.subOptionLink,onClick:()=>v(e),children:O}):e.path?h=s.jsxRuntimeExports.jsx("a",{href:a,tabIndex:0,className:n.subOptionLink,children:O}):h=O,s.jsxRuntimeExports.jsxs(s.jsxRuntimeExports.Fragment,{children:[h,c&&b&&e.options?.map(r=>s.jsxRuntimeExports.jsx(A,{option:r,depth:j+1,parentPath:a},r.value))]})}function pe({option:e,sidebarExpanded:j,onRailClick:C,activeParentValue:b}){const l=!!(e.options&&e.options.length),f=m(e)===m(b),v=[n.option,f?n.optionActive:"",e.disabled?n.disabled:""].filter(Boolean).join(" ");function a(){e.disabled||C(e)}function c(x){x.key==="Enter"&&a()}const u=s.jsxRuntimeExports.jsxs("div",{className:v,tabIndex:0,onClick:a,onKeyUp:c,role:l?"button":void 0,"aria-expanded":l?f:void 0,children:[s.jsxRuntimeExports.jsx("span",{className:n.optionIcon,children:e.icon&&s.jsxRuntimeExports.jsx("span",{className:"material-symbols-rounded",children:e.icon})}),j&&s.jsxRuntimeExports.jsx("span",{className:n.optionLabel,children:e.label})]});return l?u:E&&e.path?s.jsxRuntimeExports.jsx(E,{to:k(e.path),tabIndex:0,className:n.optionLink,children:u}):e.path?s.jsxRuntimeExports.jsx("a",{href:k(e.path),tabIndex:0,className:n.optionLink,children:u}):u}function be({value:e,defaultValue:j,onChange:C,expanded:b=!1,options:l,getObject:f=!1,className:v}){const[a,c]=U.useControllable({value:e,defaultValue:j,onChange:C}),[u,x]=p.useState(!1),[d,R]=p.useState(void 0),[q,L]=p.useState("100vh"),O=p.useRef(null);p.useEffect(()=>{function t(){const i=document.querySelector(".navbar")?.getBoundingClientRect()?.height;L(i?`calc(100vh - ${i}px)`:"100vh")}return t(),window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[]),p.useEffect(()=>{const t=h(l);t&&_(t)},[]);function h(t,i=""){for(const o of t){const y=r(i,o.path);if(S.checkPath(y))return o;const I=h(o.options||[],y);if(I)return I}}function r(t,i){if(!i)return t;let o=t;return!o.endsWith("/")&&!i.startsWith("/")?o+="/":o.endsWith("/")&&i.startsWith("/")&&(o=o.slice(0,-1)),o+i}function _(t){if(t.disabled)return;const i=f?t:m(t);c(i)}function P(t,i){return t.find(o=>m(o)===m(i)?!0:!!P(o.options||[],i))}const W=P(l,a),B=l.filter(t=>!t.bottom),g=l.filter(t=>t.bottom);function w(t){if(t.disabled)return;!!(t.options&&t.options.length)?d?.value===t.value?x(o=>!o):(R(t),x(!0)):(x(!1),_(t))}function H(t){const i=t.relatedTarget,o=t.currentTarget;(!i||!o.contains(i))&&x(!1)}const $=[n.sidebar,b?n.expanded:n.collapsed,v].filter(Boolean).join(" "),K=[n.subPanel,u?n.subPanelVisible:n.subPanelHidden].filter(Boolean).join(" "),T={currentValue:a,onChange:_,getObject:f};function N(t){return s.jsxRuntimeExports.jsx(pe,{option:t,sidebarExpanded:b,onRailClick:w,activeParentValue:W},t.value)}return s.jsxRuntimeExports.jsx(V.Provider,{value:T,children:s.jsxRuntimeExports.jsxs("div",{ref:O,className:$,style:{height:q},tabIndex:0,onBlur:H,children:[s.jsxRuntimeExports.jsxs("div",{className:n.optionsList,children:[s.jsxRuntimeExports.jsx("div",{className:n.optionsContainer,children:B.map(N)}),g.length>0&&s.jsxRuntimeExports.jsx("div",{className:n.bottomOptions,children:g.map(N)})]}),s.jsxRuntimeExports.jsx("div",{className:K,children:d&&d.options&&d.options.length>0&&d.options.map(t=>s.jsxRuntimeExports.jsx(A,{option:t,depth:0,parentPath:k(d.path)},t.value))})]})})}exports.Sidebar=be;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-leading:initial;--tw-duration:initial}}}._sidebar_1bq5p_2{width:fit-content;display:flex;position:relative}._collapsed_1bq5p_2{width:calc(var(--spacing,.25rem)*16)}._expanded_1bq5p_2{width:fit-content;min-width:200px}._optionsList_1bq5p_2{justify-content:space-between;gap:var(--spacing-sm);border-right-style:var(--tw-border-style);border-right-width:var(--border-width-xxs);border-right-color:var(--neutral-border-default);background-color:var(--neutral-background-default);width:fit-content;height:100%;padding-inline:var(--spacing-xs);padding-block:var(--spacing-lg);flex-direction:column;display:flex}._optionsContainer_1bq5p_2{gap:var(--spacing-sm);flex-direction:column;display:flex}._bottomOptions_1bq5p_2{gap:var(--spacing-sm);flex-direction:column;margin-top:auto;display:flex}._option_1bq5p_2{cursor:pointer;align-items:center;gap:var(--spacing-xs);border-radius:var(--border-radius-base);padding:var(--spacing-sm);color:var(--neutral-interaction-default);-webkit-user-select:none;user-select:none;display:flex}._option_1bq5p_2:hover{background-color:var(--primary-surface-default);color:var(--primary-interaction-default);text-decoration-line:none}._optionActive_1bq5p_2{background-color:var(--primary-surface-default);color:var(--primary-interaction-selected)}._optionIcon_1bq5p_2{font-size:var(--font-size-xl);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75/1.25)));--tw-leading:var(--line-height-none);line-height:var(--line-height-none);justify-content:center;align-items:center;display:flex}._optionLabel_1bq5p_2{font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));white-space:nowrap;flex:1}._optionLink_1bq5p_2{color:inherit;text-decoration-line:none}._disabled_1bq5p_2{pointer-events:none;opacity:.5}._subPanel_1bq5p_2{top:calc(var(--spacing,.25rem)*0);gap:var(--spacing-sm);border-right-style:var(--tw-border-style);border-right-width:var(--border-width-xxs);border-right-color:var(--neutral-border-default);background-color:var(--neutral-background-default);min-width:max-content;height:100%;padding-inline:var(--spacing-xs);padding-block:var(--spacing-lg);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.3s;z-index:10;flex-direction:column;transition-duration:.3s;display:flex;position:absolute;left:100%;overflow:hidden}._subPanelHidden_1bq5p_2{opacity:0;pointer-events:none;transform:translate(-10px)}._subPanelVisible_1bq5p_2{opacity:1;transform:translate(0)}._subOption_1bq5p_2{cursor:pointer;align-items:center;gap:var(--spacing-xs);border-radius:var(--border-radius-base);padding-inline:var(--spacing-sm);padding-block:var(--spacing-sm);font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));color:var(--neutral-interaction-default);-webkit-user-select:none;user-select:none;display:flex}._subOption_1bq5p_2:hover{background-color:var(--primary-surface-default);color:var(--primary-interaction-default);text-decoration-line:none}._subOptionActive_1bq5p_2{background-color:var(--primary-surface-default);color:var(--primary-interaction-selected)}._subOptionIcon_1bq5p_2{font-size:var(--font-size-base);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-leading:var(--line-height-none);line-height:var(--line-height-none)}._subOptionLabel_1bq5p_2{flex:1}._subOptionChevron_1bq5p_2{font-size:var(--font-size-base);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));--tw-leading:var(--line-height-none);line-height:var(--line-height-none);transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;transition-duration:.2s}._rotated_1bq5p_2{rotate:180deg}._subOptionLink_1bq5p_2{color:inherit;text-decoration-line:none}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as b}from"./jsx-runtime-u17CrQMm.js";import Mt,{useState as X,useRef as C,useCallback as V,useEffect as k}from"react";import{c as q}from"./clsx-B-dksMZM.js";import{useControllable as wt}from"../hooks/useControllable.es.js";import{T as yt}from"./Tooltip-chSVIpvZ.js";import{f as bt}from"./index-C-RplXeX.js";const Ct="_slider_rw7q0_2",xt="_small_rw7q0_2",St="_medium_rw7q0_2",Bt="_large_rw7q0_2",kt="_vertical_rw7q0_2",qt="_disabled_rw7q0_2",At="_stepSlider_rw7q0_2",Rt="_neutralBg_rw7q0_2",Tt="_track_rw7q0_2",Vt="_fillBar_rw7q0_2",Et="_fillBarVertical_rw7q0_2",Nt="_haveFillColors_rw7q0_2",Ht="_cursor_rw7q0_2",Dt="_dragging_rw7q0_2",Lt="_stepsContainer_rw7q0_2",Pt="_step_rw7q0_2",Wt="_stepActive_rw7q0_2",jt="_stepNeutral_rw7q0_2",Yt="_stepMarker_rw7q0_2",Ft="_stepMarkerActive_rw7q0_2",Xt="_stepMarkerNeutral_rw7q0_2",o={slider:Ct,small:xt,medium:St,large:Bt,vertical:kt,disabled:qt,stepSlider:At,neutralBg:Rt,track:Tt,fillBar:Vt,fillBarVertical:Et,haveFillColors:Nt,cursor:Ht,dragging:Dt,stepsContainer:Lt,step:Pt,stepActive:Wt,stepNeutral:jt,stepMarker:Yt,stepMarkerActive:Ft,stepMarkerNeutral:Xt},It=Mt.forwardRef(function(rt,A){const{value:I,onChange:nt,size:z="medium",max:a=0,unit:ot="",color:w="",showTooltip:st=!1,disabled:x=!1,vertical:_=!1,fillColors:v,isRange:m=!1,steps:d,neutralBackground:E=!1,className:it}=rt,lt=I!==void 0,[y,U]=wt({value:I,defaultValue:m?[0,0]:0,onChange:nt}),[$,G]=X([!1,!1]),[at,ct]=X(!1),[S,W]=X(void 0),N=C(null),J=C(null),B=C([]),j=C([!1,!1]),H=C(y),K=C(()=>{}),Y=C(()=>{}),O=C(()=>{}),ut=V(t=>{N.current=t,typeof A=="function"?A(t):A&&(A.current=t)},[A]);k(()=>{ct(!0),H.current=y},[y]);function ft(){return!at||E||!w?"":bt(w)}function F(t){return t===void 0?[0,0]:Array.isArray(t)?[t[0],t[1]]:[t,t]}function h(t){return!a||a===0?Math.min(1,Math.max(0,t)):Math.min(1,Math.max(0,t/a))}function dt(t){return!a||a===0?t:t*a}function Q(t){return!d||!d.length?t:d.map(r=>a?r.value/a:r.value).reduce((r,s)=>Math.abs(s-t)<Math.abs(r-t)?s:r)}const D=V(()=>{const t=N.current,e=J.current;if(!t)return;const r=F(H.current),s=m?[h(r[0]),h(r[1])]:[h(r[0])],c=B.current;if(c.forEach((n,i)=>{if(!n)return;const g=s[i]??0;if(_){const f=t.clientHeight,u=Math.min(f,Math.max(0,f*g)),p=getComputedStyle(n).getPropertyValue("--border-width-xs"),l=parseFloat(p)/2||0;n.style.bottom=r[i]<(a*.99||.99)||d&&d.length?u-n.clientHeight/3-l+"px":u-n.clientHeight-l+"px",n.style.left="50%"}else{const f=t.clientWidth,u=Math.min(f,Math.max(0,f*g)),p=getComputedStyle(n).getPropertyValue("--border-width-xs"),l=parseFloat(p)/2||0;n.style.left=r[i]<(a*.99||.99)||d&&d.length?u-n.clientWidth/3-l+"px":u-n.clientWidth-l+"px",n.style.bottom="50%"}}),!!e)if(_){const n=t.clientHeight,i=c.map(l=>l?l.clientHeight/2:0),f=c.map(l=>l?l.offsetTop:0).map((l,T)=>n-l-i[T]),u=m?Math.min(...f):0,p=Math.max(0,Math.max(...f));e.style.bottom=u+"px",e.style.height=Math.abs(p-u)+"px",e.style.left="50%",e.style.width="100%"}else{const n=c.filter(Boolean);if(!n.length)return;const i=n.map(u=>u.offsetLeft+u.clientWidth/3),g=m?Math.min(...i):0,f=Math.max(...i);e.style.left=g+"px",e.style.width=Math.abs(f-g)+n[0].clientWidth/6+"px",e.style.bottom="50%",e.style.height="100%"}},[m,_,a,d]),R=V(t=>{const e=[!1,!1];e[t]=!0,j.current=e,G([...e])},[]),L=V((t,e)=>{const r=N.current;r&&j.current.forEach((s,c)=>{if(!s)return;const n=B.current[c];if(!n)return;let i;if(_){const p=r.getBoundingClientRect(),l=r.clientHeight-n.clientHeight,T=e-n.clientHeight/2-p.top,P=l,vt=Math.min(P,Math.max(0,P-T));i=Q(vt/(l||1))}else{const p=r.getBoundingClientRect(),l=r.clientWidth-n.clientWidth,T=t-n.clientWidth/2-p.left,P=Math.min(l,Math.max(0,T));i=Q(P/(l||1))}const g=dt(i),f=F(H.current);let u;if(m){const p=[...f];p[c]=g,u=p}else u=g;H.current=u,U(u),W(u),setTimeout(()=>D(),0)})},[m,_,a,d,U,D]),ht=V(()=>{j.current=[!1,!1],G([!1,!1]),lt||W(void 0)},[]);k(()=>{if(S===void 0)return;(Array.isArray(S)&&Array.isArray(y)?S[0]===y[0]&&S[1]===y[1]:S===y)&&W(void 0)},[y,S]),k(()=>{K.current=t=>L(t.clientX,t.clientY),Y.current=ht,O.current=t=>{t.touches[0]&&L(t.touches[0].clientX,t.touches[0].clientY)}}),k(()=>{const t=c=>K.current(c),e=()=>Y.current(),r=c=>O.current(c),s=()=>Y.current();return window.addEventListener("mousemove",t),window.addEventListener("mouseup",e),window.addEventListener("touchmove",r),window.addEventListener("touchend",s),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",e),window.removeEventListener("touchmove",r),window.removeEventListener("touchend",s)}},[]),k(()=>{const t=setTimeout(()=>D(),200);return()=>clearTimeout(t)},[]),k(()=>{const t=setTimeout(()=>D(),100);return()=>clearTimeout(t)},[y,z,_]);const gt=t=>{const e=ot||"%";return`${t.toFixed(1)}${e}`},mt=m?2:1,M=F(S??y),pt=t=>{const e=a?t.value/a:t.value,r={};return _?r.bottom=e*100+"%":r.left=e*100+"%",r},_t=t=>{const e=a?t.value/a:t.value;if(m){const r=Math.min(h(M[0]),h(M[1])),s=Math.max(h(M[0]),h(M[1]));return e>=r&&e<=s}return e>=0&&e<=h(M[0])},Z=(t,e)=>{if(!e||x)return{};if(v&&v.length){const r=a?t.value/a:t.value,s=m?Math.min(h(M[0]),h(M[1])):0,n=(m?Math.max(h(M[0]),h(M[1])):h(M[0]))-s;if(n<=0)return{};const i=(r-s)/n,g=Math.min(v.length-1,Math.max(0,Math.floor(i*v.length)));return{backgroundColor:v[g]}}return w?{backgroundColor:w}:{}},tt={};w&&!(v&&v.length)&&!x&&(tt.backgroundColor=w);const et=t=>{const e={};return w&&!x&&(e.borderColor=w),e};return b.jsxs("div",{ref:ut,className:q(o.slider,o[z],_?o.vertical:o.horizontal,x&&o.disabled,d&&d.length&&o.stepSlider,E&&o.neutralBg,it),style:{background:ft()},"aria-disabled":x,onMouseDown:t=>{if(x)return;const e=N.current;if(!e)return;let r=0;if(m&&B.current.length>1){let s=1/0;B.current.forEach((c,n)=>{if(c)if(_){const i=e.getBoundingClientRect(),g=e.clientHeight-c.offsetTop-c.clientHeight/2,f=Math.abs(e.clientHeight-(t.clientY-i.top)-g);f<s&&(s=f,r=n)}else{const i=Math.abs(c.offsetLeft-(t.clientX-e.getBoundingClientRect().left));i<s&&(s=i,r=n)}})}R(r),L(t.clientX,t.clientY)},onTouchStart:t=>{x||t.touches[0]&&L(t.touches[0].clientX,t.touches[0].clientY)},children:[b.jsx("div",{ref:J,className:q(o.fillBar,_&&o.fillBarVertical,v&&v.length&&o.haveFillColors),style:tt,children:v&&v.map((t,e)=>b.jsx("div",{style:{background:t,width:"100%",height:"100%"}},e))}),Array.from({length:mt}).map((t,e)=>st?b.jsx(yt,{labelValue:gt(M[e]),position:_?"right":"top",children:b.jsx("div",{ref:r=>{B.current[e]=r},className:q(o.cursor,$[e]&&o.dragging,w&&o.coloredCursor),style:et(),onMouseDown:r=>{r.stopPropagation(),R(e)},onTouchStart:r=>{r.stopPropagation(),R(e)}})},e):b.jsx("div",{ref:r=>{B.current[e]=r},className:q(o.cursor,$[e]&&o.dragging,w&&o.coloredCursor),style:et(),onMouseDown:r=>{r.stopPropagation(),R(e)},onTouchStart:r=>{r.stopPropagation(),R(e)}},e)),d&&d.map((t,e)=>{const r=_t(t);return b.jsx("div",{className:q(o.step,r&&o.stepActive,E&&o.stepNeutral),style:{...pt(t),...Z(t,r)},children:b.jsx("div",{className:q(o.stepMarker,r&&o.stepMarkerActive,E&&!r&&o.stepMarkerNeutral),style:Z(t,r)})},e)})]})});It.displayName="Slider";export{It as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const b=require("./jsx-runtime-BubrbI3X.js"),n=require("react"),k=require("./clsx-C11secjj.js"),_t=require("../hooks/useControllable.cjs.js"),vt=require("./Tooltip-DVq7Ij0P.js"),Mt=require("./index-B4fH-h2h.js"),wt="_slider_rw7q0_2",xt="_small_rw7q0_2",yt="_medium_rw7q0_2",bt="_large_rw7q0_2",Ct="_vertical_rw7q0_2",Rt="_disabled_rw7q0_2",St="_stepSlider_rw7q0_2",kt="_neutralBg_rw7q0_2",Et="_track_rw7q0_2",qt="_fillBar_rw7q0_2",Bt="_fillBarVertical_rw7q0_2",At="_haveFillColors_rw7q0_2",Tt="_cursor_rw7q0_2",Vt="_dragging_rw7q0_2",jt="_stepsContainer_rw7q0_2",Nt="_step_rw7q0_2",Ht="_stepActive_rw7q0_2",Dt="_stepNeutral_rw7q0_2",Lt="_stepMarker_rw7q0_2",Pt="_stepMarkerActive_rw7q0_2",Wt="_stepMarkerNeutral_rw7q0_2",o={slider:wt,small:xt,medium:yt,large:bt,vertical:Ct,disabled:Rt,stepSlider:St,neutralBg:kt,track:Et,fillBar:qt,fillBarVertical:Bt,haveFillColors:At,cursor:Tt,dragging:Vt,stepsContainer:jt,step:Nt,stepActive:Ht,stepNeutral:Dt,stepMarker:Lt,stepMarkerActive:Pt,stepMarkerNeutral:Wt},Z=n.forwardRef(function(tt,E){const{value:Y,onChange:et,size:F="medium",max:a=0,unit:rt="",color:x="",showTooltip:st=!1,disabled:C=!1,vertical:v=!1,fillColors:M,isRange:p=!1,steps:h,neutralBackground:A=!1,className:nt}=tt,ot=Y!==void 0,[y,X]=_t.useControllable({value:Y,defaultValue:p?[0,0]:0,onChange:et}),[I,z]=n.useState([!1,!1]),[lt,it]=n.useState(!1),[R,D]=n.useState(void 0),T=n.useRef(null),U=n.useRef(null),S=n.useRef([]),L=n.useRef([!1,!1]),V=n.useRef(y),$=n.useRef(()=>{}),P=n.useRef(()=>{}),G=n.useRef(()=>{}),ct=n.useCallback(t=>{T.current=t,typeof E=="function"?E(t):E&&(E.current=t)},[E]);n.useEffect(()=>{it(!0),V.current=y},[y]);function at(){return!lt||A||!x?"":Mt.blendColors(x)}function W(t){return t===void 0?[0,0]:Array.isArray(t)?[t[0],t[1]]:[t,t]}function g(t){return!a||a===0?Math.min(1,Math.max(0,t)):Math.min(1,Math.max(0,t/a))}function ut(t){return!a||a===0?t:t*a}function J(t){return!h||!h.length?t:h.map(r=>a?r.value/a:r.value).reduce((r,l)=>Math.abs(l-t)<Math.abs(r-t)?l:r)}const j=n.useCallback(()=>{const t=T.current,e=U.current;if(!t)return;const r=W(V.current),l=p?[g(r[0]),g(r[1])]:[g(r[0])],u=S.current;if(u.forEach((s,i)=>{if(!s)return;const m=l[i]??0;if(v){const d=t.clientHeight,f=Math.min(d,Math.max(0,d*m)),_=getComputedStyle(s).getPropertyValue("--border-width-xs"),c=parseFloat(_)/2||0;s.style.bottom=r[i]<(a*.99||.99)||h&&h.length?f-s.clientHeight/3-c+"px":f-s.clientHeight-c+"px",s.style.left="50%"}else{const d=t.clientWidth,f=Math.min(d,Math.max(0,d*m)),_=getComputedStyle(s).getPropertyValue("--border-width-xs"),c=parseFloat(_)/2||0;s.style.left=r[i]<(a*.99||.99)||h&&h.length?f-s.clientWidth/3-c+"px":f-s.clientWidth-c+"px",s.style.bottom="50%"}}),!!e)if(v){const s=t.clientHeight,i=u.map(c=>c?c.clientHeight/2:0),d=u.map(c=>c?c.offsetTop:0).map((c,B)=>s-c-i[B]),f=p?Math.min(...d):0,_=Math.max(0,Math.max(...d));e.style.bottom=f+"px",e.style.height=Math.abs(_-f)+"px",e.style.left="50%",e.style.width="100%"}else{const s=u.filter(Boolean);if(!s.length)return;const i=s.map(f=>f.offsetLeft+f.clientWidth/3),m=p?Math.min(...i):0,d=Math.max(...i);e.style.left=m+"px",e.style.width=Math.abs(d-m)+s[0].clientWidth/6+"px",e.style.bottom="50%",e.style.height="100%"}},[p,v,a,h]),q=n.useCallback(t=>{const e=[!1,!1];e[t]=!0,L.current=e,z([...e])},[]),N=n.useCallback((t,e)=>{const r=T.current;r&&L.current.forEach((l,u)=>{if(!l)return;const s=S.current[u];if(!s)return;let i;if(v){const _=r.getBoundingClientRect(),c=r.clientHeight-s.clientHeight,B=e-s.clientHeight/2-_.top,H=c,pt=Math.min(H,Math.max(0,H-B));i=J(pt/(c||1))}else{const _=r.getBoundingClientRect(),c=r.clientWidth-s.clientWidth,B=t-s.clientWidth/2-_.left,H=Math.min(c,Math.max(0,B));i=J(H/(c||1))}const m=ut(i),d=W(V.current);let f;if(p){const _=[...d];_[u]=m,f=_}else f=m;V.current=f,X(f),D(f),setTimeout(()=>j(),0)})},[p,v,a,h,X,j]),ft=n.useCallback(()=>{L.current=[!1,!1],z([!1,!1]),ot||D(void 0)},[]);n.useEffect(()=>{if(R===void 0)return;(Array.isArray(R)&&Array.isArray(y)?R[0]===y[0]&&R[1]===y[1]:R===y)&&D(void 0)},[y,R]),n.useEffect(()=>{$.current=t=>N(t.clientX,t.clientY),P.current=ft,G.current=t=>{t.touches[0]&&N(t.touches[0].clientX,t.touches[0].clientY)}}),n.useEffect(()=>{const t=u=>$.current(u),e=()=>P.current(),r=u=>G.current(u),l=()=>P.current();return window.addEventListener("mousemove",t),window.addEventListener("mouseup",e),window.addEventListener("touchmove",r),window.addEventListener("touchend",l),()=>{window.removeEventListener("mousemove",t),window.removeEventListener("mouseup",e),window.removeEventListener("touchmove",r),window.removeEventListener("touchend",l)}},[]),n.useEffect(()=>{const t=setTimeout(()=>j(),200);return()=>clearTimeout(t)},[]),n.useEffect(()=>{const t=setTimeout(()=>j(),100);return()=>clearTimeout(t)},[y,F,v]);const dt=t=>{const e=rt||"%";return`${t.toFixed(1)}${e}`},ht=p?2:1,w=W(R??y),gt=t=>{const e=a?t.value/a:t.value,r={};return v?r.bottom=e*100+"%":r.left=e*100+"%",r},mt=t=>{const e=a?t.value/a:t.value;if(p){const r=Math.min(g(w[0]),g(w[1])),l=Math.max(g(w[0]),g(w[1]));return e>=r&&e<=l}return e>=0&&e<=g(w[0])},K=(t,e)=>{if(!e||C)return{};if(M&&M.length){const r=a?t.value/a:t.value,l=p?Math.min(g(w[0]),g(w[1])):0,s=(p?Math.max(g(w[0]),g(w[1])):g(w[0]))-l;if(s<=0)return{};const i=(r-l)/s,m=Math.min(M.length-1,Math.max(0,Math.floor(i*M.length)));return{backgroundColor:M[m]}}return x?{backgroundColor:x}:{}},O={};x&&!(M&&M.length)&&!C&&(O.backgroundColor=x);const Q=t=>{const e={};return x&&!C&&(e.borderColor=x),e};return b.jsxRuntimeExports.jsxs("div",{ref:ct,className:k.clsx(o.slider,o[F],v?o.vertical:o.horizontal,C&&o.disabled,h&&h.length&&o.stepSlider,A&&o.neutralBg,nt),style:{background:at()},"aria-disabled":C,onMouseDown:t=>{if(C)return;const e=T.current;if(!e)return;let r=0;if(p&&S.current.length>1){let l=1/0;S.current.forEach((u,s)=>{if(u)if(v){const i=e.getBoundingClientRect(),m=e.clientHeight-u.offsetTop-u.clientHeight/2,d=Math.abs(e.clientHeight-(t.clientY-i.top)-m);d<l&&(l=d,r=s)}else{const i=Math.abs(u.offsetLeft-(t.clientX-e.getBoundingClientRect().left));i<l&&(l=i,r=s)}})}q(r),N(t.clientX,t.clientY)},onTouchStart:t=>{C||t.touches[0]&&N(t.touches[0].clientX,t.touches[0].clientY)},children:[b.jsxRuntimeExports.jsx("div",{ref:U,className:k.clsx(o.fillBar,v&&o.fillBarVertical,M&&M.length&&o.haveFillColors),style:O,children:M&&M.map((t,e)=>b.jsxRuntimeExports.jsx("div",{style:{background:t,width:"100%",height:"100%"}},e))}),Array.from({length:ht}).map((t,e)=>st?b.jsxRuntimeExports.jsx(vt.Tooltip,{labelValue:dt(w[e]),position:v?"right":"top",children:b.jsxRuntimeExports.jsx("div",{ref:r=>{S.current[e]=r},className:k.clsx(o.cursor,I[e]&&o.dragging,x&&o.coloredCursor),style:Q(),onMouseDown:r=>{r.stopPropagation(),q(e)},onTouchStart:r=>{r.stopPropagation(),q(e)}})},e):b.jsxRuntimeExports.jsx("div",{ref:r=>{S.current[e]=r},className:k.clsx(o.cursor,I[e]&&o.dragging,x&&o.coloredCursor),style:Q(),onMouseDown:r=>{r.stopPropagation(),q(e)},onTouchStart:r=>{r.stopPropagation(),q(e)}},e)),h&&h.map((t,e)=>{const r=mt(t);return b.jsxRuntimeExports.jsx("div",{className:k.clsx(o.step,r&&o.stepActive,A&&o.stepNeutral),style:{...gt(t),...K(t,r)},children:b.jsxRuntimeExports.jsx("div",{className:k.clsx(o.stepMarker,r&&o.stepMarkerActive,A&&!r&&o.stepMarkerNeutral),style:K(t,r)})},e)})]})});Z.displayName="Slider";exports.Slider=Z;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const m=require("./jsx-runtime-BubrbI3X.js"),x=require("./clsx-C11secjj.js"),g=require("./Badge-Te4ff3ej.js"),y="_statusBadge_xd68m_2",l="_primary_xd68m_2",f="_info_xd68m_2",B="_success_xd68m_2",h="_warning_xd68m_2",p="_danger_xd68m_2",j="_neutral_xd68m_2",q="_secondary_xd68m_2",v="_heavy_xd68m_2",s={statusBadge:y,primary:l,info:f,success:B,warning:h,danger:p,neutral:j,secondary:q,heavy:v};function w({labelValue:e="",color:n="primary",size:t="medium",type:a="default",loading:r=!1,closeable:c=!1,icon:_="",isAppendedIcon:d=!1,children:o,className:u,onClose:i}){return m.jsxRuntimeExports.jsx(g.Badge,{className:x.clsx(s.statusBadge,s[n],s[a],u),labelValue:e,type:a,size:t,loading:r,closeable:c,icon:_,isAppendedIcon:d,onClose:i,children:o||e})}exports.StatusBadge=w;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._statusBadge_xd68m_2._primary_xd68m_2{border-color:var(--primary-border-default);background-color:var(--primary-surface-highlight);color:var(--primary-foreground-high)}._statusBadge_xd68m_2._info_xd68m_2{border-color:var(--informative-border-default);background-color:var(--informative-surface-highlight);color:var(--informative-foreground-high)}._statusBadge_xd68m_2._success_xd68m_2{border-color:var(--success-border-default);background-color:var(--success-surface-highlight);color:var(--success-foreground-high)}._statusBadge_xd68m_2._warning_xd68m_2{border-color:var(--warning-border-default);background-color:var(--warning-surface-highlight);color:var(--warning-foreground-high)}._statusBadge_xd68m_2._danger_xd68m_2{border-color:var(--danger-border-default);background-color:var(--danger-surface-highlight);color:var(--danger-foreground-high)}._statusBadge_xd68m_2._neutral_xd68m_2{border-color:var(--neutral-border-default);background-color:var(--neutral-surface-highlight);color:var(--neutral-foreground-low)}._statusBadge_xd68m_2._secondary_xd68m_2{background-color:#0000}._statusBadge_xd68m_2._secondary_xd68m_2._primary_xd68m_2{color:var(--primary-foreground-low)}._statusBadge_xd68m_2._secondary_xd68m_2._info_xd68m_2{color:var(--informative-foreground-low)}._statusBadge_xd68m_2._secondary_xd68m_2._success_xd68m_2{color:var(--success-foreground-low)}._statusBadge_xd68m_2._secondary_xd68m_2._warning_xd68m_2{color:var(--warning-foreground-low)}._statusBadge_xd68m_2._secondary_xd68m_2._danger_xd68m_2{color:var(--danger-foreground-low)}._statusBadge_xd68m_2._secondary_xd68m_2._neutral_xd68m_2{color:var(--neutral-foreground-low)}._statusBadge_xd68m_2._heavy_xd68m_2 .colored{color:var(--color-white,#fff)}._statusBadge_xd68m_2._heavy_xd68m_2._primary_xd68m_2{border-color:var(--primary-interaction-default);background-color:var(--primary-interaction-default);color:var(--neutral-foreground-negative)}._statusBadge_xd68m_2._heavy_xd68m_2._info_xd68m_2{border-color:var(--informative-interaction-default);background-color:var(--informative-interaction-default);color:var(--neutral-foreground-negative)}._statusBadge_xd68m_2._heavy_xd68m_2._success_xd68m_2{border-color:var(--success-interaction-default);background-color:var(--success-interaction-default);color:var(--neutral-foreground-negative)}._statusBadge_xd68m_2._heavy_xd68m_2._warning_xd68m_2{border-color:var(--warning-interaction-default);background-color:var(--warning-interaction-default);color:var(--neutral-foreground-negative)}._statusBadge_xd68m_2._heavy_xd68m_2._danger_xd68m_2{border-color:var(--danger-interaction-default);background-color:var(--danger-interaction-default);color:var(--neutral-foreground-negative)}._statusBadge_xd68m_2._heavy_xd68m_2._neutral_xd68m_2{border-color:var(--neutral-interaction-default);background-color:var(--neutral-interaction-default);color:var(--neutral-foreground-negative)}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as u}from"./jsx-runtime-u17CrQMm.js";import{c as x}from"./clsx-B-dksMZM.js";import{B as g}from"./Badge-xSUPZkRF.js";const f="_statusBadge_xd68m_2",y="_primary_xd68m_2",l="_info_xd68m_2",p="_success_xd68m_2",B="_warning_xd68m_2",h="_danger_xd68m_2",j="_neutral_xd68m_2",v="_secondary_xd68m_2",w="_heavy_xd68m_2",s={statusBadge:f,primary:y,info:l,success:p,warning:B,danger:h,neutral:j,secondary:v,heavy:w};function R({labelValue:a="",color:t="primary",size:r="medium",type:n="default",loading:e=!1,closeable:_=!1,icon:o="",isAppendedIcon:c=!1,children:d,className:m,onClose:i}){return u.jsx(g,{className:x(s.statusBadge,s[t],s[n],m),labelValue:a,type:n,size:r,loading:e,closeable:_,icon:o,isAppendedIcon:c,onClose:i,children:d||a})}export{R as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const n=require("./jsx-runtime-BubrbI3X.js"),j=require("react"),u=require("./clsx-C11secjj.js"),w=require("../hooks/useControllable.cjs.js"),p=require("./index-B4fH-h2h.js"),V=require("../components/Icon/index.cjs.js"),y="_stepper_iqqeu_2",B="_stepContainer_iqqeu_2",L="_noClick_iqqeu_2",A="_step_iqqeu_2",D="_small_iqqeu_2",F="_large_iqqeu_2",G="_past_iqqeu_2",H="_active_iqqeu_2",J="_future_iqqeu_2",K="_label_iqqeu_2",P="_connector_iqqeu_2",s={stepper:y,stepContainer:B,noClick:L,step:A,small:D,large:F,past:G,active:H,future:J,label:K,connector:P};function Q({value:f,onChange:d,options:l,labelKey:g="label",valueKey:b="label",iconKey:C="icon",size:i="medium",getObject:S=!1,noClick:m=!1,allowSkip:v=!1,className:h}){const[c,R]=w.useControllable({value:f,defaultValue:void 0,onChange:d}),q=o(c),[a,x]=j.useState(()=>Math.max(0,q!=-1?q:0));j.useEffect(()=>{const e=o(f);e!=-1&&x(e)},[c]);function o(e){return l.findIndex(t=>r(t)==r(e))}function E(e){return p.isObject(e)?e[g]:e}function r(e){return p.isObject(e)?e[b]:e}function I(e){return p.isObject(e)?e[C]:"image"}function N(e){const t=c??0;return e===t?"active":e<t||e<=a?"past":"future"}function k(e){return e<a?"past":"future"}function M(e,t){if(!m){const _=o(c);if(!v&&t-_>1)return;x(O=>Math.max(O,t)),R(S?e:r(e))}}return n.jsxRuntimeExports.jsx("div",{className:u.clsx(s.stepper,h),children:l.map((e,t)=>{const _=N(t);return n.jsxRuntimeExports.jsxs("div",{className:u.clsx("flex items-center",l[t+1]?"w-full":"w-fit",i,s[i]),children:[n.jsxRuntimeExports.jsxs("div",{className:u.clsx(s.stepContainer,m&&s.noClick),onClick:()=>M(e,t),children:[n.jsxRuntimeExports.jsx("div",{className:u.clsx(s[i],s[_],s.step,r(c)==r(e)&&s.active,{[s.past]:t<a,[s.future]:t>a}),children:n.jsxRuntimeExports.jsx(V.Icon,{className:"stepper-icon",name:I(e)})}),n.jsxRuntimeExports.jsx("span",{className:s.label,children:E(e)})]}),l[t+1]&&n.jsxRuntimeExports.jsx("div",{className:u.clsx(s.connector,s[k(t)])})]},t)})})}exports.Stepper=Q;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./jsx-runtime-u17CrQMm.js";import{useState as V,useEffect as y}from"react";import{c as a}from"./clsx-B-dksMZM.js";import{useControllable as B}from"../hooks/useControllable.es.js";import{i as _}from"./index-C-RplXeX.js";import{Icon as L}from"../components/Icon/index.es.js";const O="_stepper_iqqeu_2",R="_stepContainer_iqqeu_2",A="_noClick_iqqeu_2",D="_step_iqqeu_2",F="_small_iqqeu_2",G="_large_iqqeu_2",H="_past_iqqeu_2",J="_active_iqqeu_2",K="_future_iqqeu_2",P="_label_iqqeu_2",Q="_connector_iqqeu_2",s={stepper:O,stepContainer:R,noClick:A,step:D,small:F,large:G,past:H,active:J,future:K,label:P,connector:Q};function $({value:m,onChange:d,options:l,labelKey:S="label",valueKey:C="label",iconKey:b="icon",size:i="medium",getObject:j=!1,noClick:p=!1,allowSkip:v=!1,className:h}){const[c,x]=B({value:m,defaultValue:void 0,onChange:d}),q=o(c),[u,g]=V(()=>Math.max(0,q!=-1?q:0));y(()=>{const e=o(m);e!=-1&&g(e)},[c]);function o(e){return l.findIndex(t=>n(t)==n(e))}function N(e){return _(e)?e[S]:e}function n(e){return _(e)?e[C]:e}function I(e){return _(e)?e[b]:"image"}function k(e){const t=c??0;return e===t?"active":e<t||e<=u?"past":"future"}function M(e){return e<u?"past":"future"}function w(e,t){if(!p){const f=o(c);if(!v&&t-f>1)return;g(E=>Math.max(E,t)),x(j?e:n(e))}}return r.jsx("div",{className:a(s.stepper,h),children:l.map((e,t)=>{const f=k(t);return r.jsxs("div",{className:a("flex items-center",l[t+1]?"w-full":"w-fit",i,s[i]),children:[r.jsxs("div",{className:a(s.stepContainer,p&&s.noClick),onClick:()=>w(e,t),children:[r.jsx("div",{className:a(s[i],s[f],s.step,n(c)==n(e)&&s.active,{[s.past]:t<u,[s.future]:t>u}),children:r.jsx(L,{className:"stepper-icon",name:I(e)})}),r.jsx("span",{className:s.label,children:N(e)})]}),l[t+1]&&r.jsx("div",{className:a(s.connector,s[M(t)])})]},t)})})}export{$ as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-font-weight:initial}}}._stepper_iqqeu_2{align-items:center;width:100%;display:flex}._stepContainer_iqqeu_2{cursor:pointer;flex-direction:column;align-items:center;display:flex;position:relative}._stepContainer_iqqeu_2._noClick_iqqeu_2{cursor:default}._step_iqqeu_2{z-index:1;border-radius:var(--border-radius-full);border-style:var(--tw-border-style);border-width:var(--border-width-xs);padding-inline:var(--spacing-base);padding-block:var(--spacing-sm);justify-content:center;align-items:center;display:flex;position:relative}._step_iqqeu_2._small_iqqeu_2{padding-inline:var(--spacing-sm);padding-block:var(--spacing-xs)}._step_iqqeu_2._large_iqqeu_2{padding-inline:var(--spacing-lg);padding-block:var(--spacing-base)}._step_iqqeu_2._past_iqqeu_2{border-color:var(--primary-interaction-default);background-color:var(--primary-interaction-default);color:var(--neutral-foreground-negative)}._step_iqqeu_2._active_iqqeu_2{border-color:var(--primary-border-default);color:var(--primary-interaction-default);background-color:#0000}._step_iqqeu_2._future_iqqeu_2{border-color:var(--neutral-border-default);background-color:var(--neutral-surface-default);color:var(--neutral-foreground-low)}._label_iqqeu_2{--tw-translate-y:var(--spacing-4xl);translate:var(--tw-translate-x)var(--tw-translate-y);text-align:center;font-size:var(--font-size-xs);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)));--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal);white-space:nowrap;position:absolute}._small_iqqeu_2 ._label_iqqeu_2{--tw-translate-y:var(--spacing-3xl);translate:var(--tw-translate-x)var(--tw-translate-y)}._large_iqqeu_2 ._label_iqqeu_2{--tw-translate-y:var(--spacing-5xl);translate:var(--tw-translate-x)var(--tw-translate-y)}._connector_iqqeu_2{top:var(--spacing-none);z-index:0;height:var(--spacing-xxs);flex:1;position:relative}._connector_iqqeu_2._past_iqqeu_2{background-color:var(--primary-interaction-default)}._connector_iqqeu_2._future_iqqeu_2{background:var(--neutral-border-default)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-font-weight{syntax:"*";inherits:false}.stepper-icon.icon{font-size:var(--font-size-lg);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75/1.125)))}.small .stepper-icon.icon{font-size:var(--font-size-base);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ))}.large .stepper-icon.icon{font-size:var(--font-size-xl);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75/1.25)))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration:initial;--tw-ease:initial}}}._switch_1pjii_2{cursor:pointer;align-items:center;gap:var(--spacing-xs);font-size:var(--font-size-base);line-height:var(--tw-leading,var(--text-base--line-height, 1.5 ));-webkit-user-select:none;user-select:none;display:inline-flex}._rhs_1pjii_2{flex-direction:row-reverse}._disabled_1pjii_2{pointer-events:none;opacity:.5}._track_1pjii_2{border-radius:var(--border-radius-full);background-color:var(--neutral-interaction-default);width:2em;height:1.16em;color:var(--color-white,#fff);transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));align-items:center;display:flex}._active_1pjii_2{background-color:var(--primary-interaction-default)}._thumb_1pjii_2{border-radius:var(--border-radius-full);width:.85em;height:.85em;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));background-color:currentColor;margin-left:.125em}._thumbActive_1pjii_2{margin-left:1em}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const s=require("./jsx-runtime-BubrbI3X.js"),r=require("./clsx-C11secjj.js"),b=require("../hooks/useControllable.cjs.js"),p="_rhs_1pjii_2",d="_disabled_1pjii_2",v="_track_1pjii_2",f="_active_1pjii_2",k="_thumb_1pjii_2",w="_thumbActive_1pjii_2",t={switch:"_switch_1pjii_2",rhs:p,disabled:d,track:v,active:f,thumb:k,thumbActive:w};function R({id:a,name:l,value:n,defaultValue:u,onChange:o,rhs:x=!1,disabled:i=!1,children:c,className:h}){const[e,_]=b.useControllable({value:n,defaultValue:u??!1,onChange:o});function m(){i||_(!e)}const j=()=>c?a||l?s.jsxRuntimeExports.jsx("label",{htmlFor:a||l,className:"text-xs cursor-[inherit]",children:c}):s.jsxRuntimeExports.jsx("span",{className:"text-xs",children:c}):null;return s.jsxRuntimeExports.jsxs("div",{role:"switch","aria-checked":!!e,"aria-disabled":i,className:r.clsx(t.switch,x&&t.rhs,i&&t.disabled,h),onClick:m,children:[s.jsxRuntimeExports.jsx("div",{className:r.clsx(t.track,e&&t.active),children:s.jsxRuntimeExports.jsx("div",{className:r.clsx(t.thumb,e&&t.thumbActive)})}),j()]})}exports.Switch=R;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./jsx-runtime-u17CrQMm.js";import{c as a}from"./clsx-B-dksMZM.js";import{useControllable as p}from"../hooks/useControllable.es.js";const x="_rhs_1pjii_2",d="_disabled_1pjii_2",f="_track_1pjii_2",v="_active_1pjii_2",k="_thumb_1pjii_2",w="_thumbActive_1pjii_2",t={switch:"_switch_1pjii_2",rhs:x,disabled:d,track:f,active:v,thumb:k,thumbActive:w};function V({id:r,name:l,value:n,defaultValue:o,onChange:u,rhs:h=!1,disabled:e=!1,children:c,className:_}){const[i,m]=p({value:n,defaultValue:o??!1,onChange:u});function b(){e||m(!i)}const j=()=>c?r||l?s.jsx("label",{htmlFor:r||l,className:"text-xs cursor-[inherit]",children:c}):s.jsx("span",{className:"text-xs",children:c}):null;return s.jsxs("div",{role:"switch","aria-checked":!!i,"aria-disabled":e,className:a(t.switch,h&&t.rhs,e&&t.disabled,_),onClick:b,children:[s.jsx("div",{className:a(t.track,i&&t.active),children:s.jsx("div",{className:a(t.thumb,i&&t.thumbActive)})}),j()]})}export{V as S};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BubrbI3X.js"),o=require("./clsx-C11secjj.js"),g=require("../hooks/useControllable.cjs.js"),a=require("../components/Icon/index.cjs.js"),R="_container_1g3ce_2",p="_notCard_1g3ce_2",E="_tabButton_1g3ce_2",h="_icon_1g3ce_2",C="_active_1g3ce_2",s={container:R,notCard:p,tabButton:E,icon:h,active:C};function v({value:r,defaultValue:i,onChange:l,options:x=[],labelKey:u="label",isIcon:m=!1,notCard:j=!1,children:_,className:d}){const[b,f]=g.useControllable({value:r,defaultValue:i??0,onChange:l});function c(t){return typeof t=="string"?t:t[u]}return e.jsxRuntimeExports.jsxs("div",{className:o.clsx(s.container,j&&s.notCard,d),children:[e.jsxRuntimeExports.jsx("div",{className:"flex font-bold text-sm gap-xs w-fit",children:x.map((t,n)=>e.jsxRuntimeExports.jsx("button",{className:o.clsx(s.tabButton,b===n&&s.active),onClick:()=>f(n),children:typeof t=="object"&&t.icon?e.jsxRuntimeExports.jsxs(e.jsxRuntimeExports.Fragment,{children:[e.jsxRuntimeExports.jsx(a.Icon,{name:t.icon,className:s.icon}),e.jsxRuntimeExports.jsx("span",{children:c(t)})]}):m&&typeof t=="string"?e.jsxRuntimeExports.jsx(a.Icon,{name:t,className:s.icon}):e.jsxRuntimeExports.jsx("span",{children:c(t)})},n))}),_]})}exports.Tab=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-leading:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}._container_1g3ce_2{border-radius:var(--border-radius-sm);padding:var(--spacing-xxs)}._container_1g3ce_2:not(._notCard_1g3ce_2){background-color:var(--neutral-surface-highlight)}._tabButton_1g3ce_2{cursor:pointer;align-items:center;gap:var(--spacing-xxs);border-radius:var(--border-radius-xs);border-style:var(--tw-border-style);border-width:var(--border-width-none);--tw-border-style:none;padding-inline:var(--spacing-xs);padding-block:var(--spacing-xs);font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold);color:var(--neutral-interaction-default);background-color:#0000;border-style:none;display:flex}._icon_1g3ce_2{font-size:var(--font-size-lg);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75/1.125)));--tw-leading:var(--line-height-lg);line-height:var(--line-height-lg)}._tabButton_1g3ce_2:hover{color:var(--primary-interaction-hover)}._tabButton_1g3ce_2._active_1g3ce_2{background-color:var(--neutral-surface-default);color:var(--neutral-foreground-high);--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-leading{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-u17CrQMm.js";import{c as a}from"./clsx-B-dksMZM.js";import{useControllable as g}from"../hooks/useControllable.es.js";import{Icon as o}from"../components/Icon/index.es.js";const h="_container_1g3ce_2",v="_notCard_1g3ce_2",C="_tabButton_1g3ce_2",p="_icon_1g3ce_2",N="_active_1g3ce_2",n={container:h,notCard:v,tabButton:C,icon:p,active:N};function w({value:r,defaultValue:l,onChange:i,options:m=[],labelKey:f="label",isIcon:_=!1,notCard:d=!1,children:u,className:x}){const[b,j]=g({value:r,defaultValue:l??0,onChange:i});function s(t){return typeof t=="string"?t:t[f]}return e.jsxs("div",{className:a(n.container,d&&n.notCard,x),children:[e.jsx("div",{className:"flex font-bold text-sm gap-xs w-fit",children:m.map((t,c)=>e.jsx("button",{className:a(n.tabButton,b===c&&n.active),onClick:()=>j(c),children:typeof t=="object"&&t.icon?e.jsxs(e.Fragment,{children:[e.jsx(o,{name:t.icon,className:n.icon}),e.jsx("span",{children:s(t)})]}):_&&typeof t=="string"?e.jsx(o,{name:t,className:n.icon}):e.jsx("span",{children:s(t)})},c))}),u]})}export{w as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./jsx-runtime-u17CrQMm.js";import B,{useState as S}from"react";import{c as f}from"./clsx-B-dksMZM.js";import{useControllable as Q}from"../hooks/useControllable.es.js";import{P as Te}from"./Pagination-B5AR5_SP.js";import{Skeleton as F}from"../components/Skeleton/index.es.js";import{C as U}from"./Checkbox-2PgbPjFv.js";import{Icon as Le}from"../components/Icon/index.es.js";import{S as Ie}from"./Select-B7JnRTcc.js";const Pe="_table_xchde_2",ke="_tableContent_xchde_2",Ae="_noShadow_xchde_2",Fe="_headerFixed_xchde_2",Re="_tableStyle_xchde_2",Be="_firstTh_xchde_2",De="_lastTh_xchde_2",Ee="_pointerNone_xchde_2",Ve="_hoverBg_xchde_2",He="_bgWhite_xchde_2",We="_sortable_xchde_2",$e="_thContent_xchde_2",Me="_thLabel_xchde_2",qe="_sortIcon_xchde_2",ze="_sortIconRotated_xchde_2",Ge="_sortIconActive_xchde_2",Je="_row_xchde_2",Qe="_cell_xchde_2",Ue="_rowHover_xchde_2",Xe="_skeletonCell_xchde_2",Ye="_footer_xchde_2",Ze="_footerLeft_xchde_2",Ke="_footerLabel_xchde_2",s={table:Pe,tableContent:ke,noShadow:Ae,headerFixed:Fe,tableStyle:Re,firstTh:Be,lastTh:De,pointerNone:Ee,hoverBg:Ve,bgWhite:He,sortable:We,thContent:$e,thLabel:Me,sortIcon:qe,sortIconRotated:ze,sortIconActive:Ge,row:Je,cell:Qe,rowHover:Ue,skeletonCell:Xe,footer:Ye,footerLeft:Ze,footerLabel:Ke};function Oe(a,d,h){return[...a].sort((g,m)=>{const n=g[d],r=m[d];if(typeof n=="string"&&typeof r=="string"){const x=n.toLowerCase(),i=r.toLowerCase();return h?x.localeCompare(i):i.localeCompare(x)}else{if(typeof n=="number"&&typeof r=="number")return h?n-r:r-n;if(n instanceof Date&&r instanceof Date)return h?n.getTime()-r.getTime():r.getTime()-n.getTime();{const x=String(n).toLowerCase(),i=String(r).toLowerCase();return h?x.localeCompare(i):i.localeCompare(x)}}})}function R(a,d){return B.Children.toArray(a).find(m=>B.isValidElement(m)&&m.type===d)||null}function X({children:a}){return e.jsx(e.Fragment,{children:a})}function Y({children:a}){return e.jsx(e.Fragment,{children:a})}function Z({children:a}){return e.jsx(e.Fragment,{children:a})}function D({columns:a,items:d,sortOptions:h,page:g,defaultPage:m,itemsPerPage:n,defaultItemsPerPage:r,numberOfItems:x,renderPaginationInBackEnd:i=!1,hideFooter:K=!1,isHeaderFixed:O=!1,enableSelection:C=!1,enableAggregation:u=!1,loading:w=!1,noShadow:ee=!1,hasHover:te=!1,onPageChange:se,onItemsPerPageChange:oe,onSortBy:le,onPageItems:E,onSelectAll:ae,onSelectRow:ne,renderAggregation:re,renderSelect:V,renderActions:v,renderChilds:H,renderEmptyState:ce,renderFooter:W,renderItemsPerPage:he,renderShowingPage:$,children:T,className:de}){const[ie,M]=Q({value:g,defaultValue:m??1,onChange:se}),[fe,xe]=Q({value:n,defaultValue:r??10,onChange:oe}),[b,_e]=S(h?.by||null),[L,me]=S(()=>{const t={};return a.forEach(o=>{t[o.value]=o.value===h?.by?!!h?.desc:!1}),t}),[pe,I]=S(new Set),[je,ue]=S(!1),p=ie??1,_=fe??10,P=b?Oe(d,b,L[b]??!1):d,k=i?x??0:P?.length??0,be=Math.ceil(k/_),N=i?P:P.slice((p-1)*_,p*_),q=p===1?1:(p-1)*_+1,z=(p-1)*_+N.length;let j=a.length;C&&j++,u&&j++;const A=R(T,X),G=R(T,Y),ge=R(T,Z),y=!!v||!!A;y&&j++;const Ce=[5,10,20,50,100],ve=t=>{if(!t.sortable)return;const o=t.value,l=b===o?!L[o]:!1;_e(o),me(c=>({...c,[o]:l})),le?.(o,l)},Ne=(t,o)=>{I(l=>{const c=new Set(l),J=c.has(t);return J?c.delete(t):c.add(t),ne?.(o,!J),c})},ye=t=>{const o=!!t;ue(o),I(o?new Set(N.map((l,c)=>c)):new Set),d?.forEach(l=>{l.selected=o}),ae?.(o)},Se=t=>{M(t),E?.(t,_)},we=t=>{xe(t||10),M(1),E?.(1,t)};return e.jsxs("div",{className:f(s.table,de),children:[e.jsx("div",{className:f(s.tableContent,ee&&s.noShadow,O&&s.headerFixed),children:e.jsxs("table",{className:s.tableStyle,children:[w?e.jsx("thead",{children:e.jsx("tr",{children:Array.from({length:j||3}).map((t,o)=>e.jsx("th",{className:s.skeletonCell,children:e.jsx(F,{})},o))})}):e.jsx("thead",{children:e.jsxs("tr",{children:[u&&e.jsx("th",{className:f(s.firstTh,s.pointerNone),style:{width:"2%"}}),C&&e.jsx("th",{className:f(!u&&s.firstTh,s.hoverBg),style:{width:"2%"},children:e.jsx(U,{value:je,onChange:ye})}),a.map((t,o)=>e.jsx("th",{style:{width:t.width??"fit-content"},className:f(s.sortable,o===0&&!C&&!u&&s.firstTh,!a[o+1]&&!y&&s.lastTh,!t.sortable&&s.pointerNone),onClick:()=>ve(t),children:e.jsxs("div",{className:s.thContent,style:{justifyContent:t.align??"flex-start"},children:[e.jsx("p",{className:s.thLabel,children:t.label}),t.sortable&&e.jsx("span",{className:f(s.sortIcon,L[t.value]&&s.sortIconRotated,t.value===b&&s.sortIconActive),children:e.jsx(Le,{name:"arrow_upward"})})]})},t.value)),y&&e.jsx("th",{style:{flex:1},className:f(s.pointerNone,s.bgWhite)})]})}),w||!N.length?e.jsx("tbody",{children:w?Array.from({length:10}).map((t,o)=>e.jsxs("tr",{children:[Array.from({length:j||3}).map((l,c)=>e.jsx("td",{className:s.skeletonCell,children:e.jsx(F,{})},c)),y&&e.jsx("td",{className:s.skeletonCell,children:e.jsx(F,{})})]},`skeleton-${o}`)):e.jsx("tr",{children:e.jsx("td",{colSpan:j,children:ce?.()||ge||null})})}):e.jsx("tbody",{children:N.map((t,o)=>e.jsxs(B.Fragment,{children:[e.jsxs("tr",{className:f(s.row,te&&s.rowHover),children:[u&&e.jsx("td",{className:s.cell,children:re?.(t,o)}),C&&e.jsx("td",{className:s.cell,children:V?V(t,o):e.jsx(U,{value:pe.has(o),onChange:()=>Ne(o,t)})}),a.map(l=>e.jsx("td",{className:s.cell,style:{textAlign:l.align==="center"?"center":l.align==="flex-end"?"right":"left"},children:l.render?l.render(t[l.value],t,o):t[l.value]},l.value)),v&&e.jsx("td",{className:s.cell,children:v(t,o)}),!v&&A&&e.jsx("td",{className:s.cell,children:A})]}),t.expanded&&H&&H(t,o)]},o))}),(W||G)&&e.jsx("tfoot",{children:W?.()||G})]})}),!K&&e.jsxs("footer",{className:s.footer,children:[e.jsxs("div",{className:s.footerLeft,children:[e.jsx("p",{className:s.footerLabel,children:he?.()||"Items per page"}),e.jsx(Ie,{value:_,options:Ce,onChange:t=>we(t)})]}),e.jsx(Te,{value:p,onChange:Se,length:be}),e.jsx("div",{children:e.jsx("p",{className:s.footerLabel,children:$?$(q,z,k):`Showing ${q}-${z} of ${k}`})})]})]})}D.Actions=X;D.Footer=Y;D.EmptyState=Z;export{D as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-divide-y-reverse:0;--tw-duration:initial;--tw-ease:initial}}}._table_xchde_2{width:100%;max-width:100%;display:block}._tableContent_xchde_2{border-radius:var(--border-radius-xl);border-style:var(--tw-border-style);border-width:var(--border-width-xxs);border-color:var(--neutral-border-default);background-color:var(--neutral-surface-default);--tw-shadow:0px 1px 2px 0px var(--tw-shadow-color,#0000000d);min-width:100%;max-width:100%;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);overflow-x:auto}._tableContent_xchde_2._noShadow_xchde_2{border-style:var(--tw-border-style);border-width:var(--border-width-none);--tw-border-style:none;--tw-shadow:0 0 #0000;box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);border-style:none}._tableContent_xchde_2._headerFixed_xchde_2{max-height:35em;overflow-y:auto}._tableContent_xchde_2._headerFixed_xchde_2 ._tableStyle_xchde_2 thead{top:calc(var(--spacing,.25rem)*0);background-color:var(--color-white,#fff);position:sticky}._tableStyle_xchde_2{border-radius:var(--border-radius-xl);background-color:var(--neutral-surface-default);width:100%}._tableStyle_xchde_2 thead{border-bottom-style:var(--tw-border-style);border-bottom-width:var(--border-width-xxs);border-bottom-color:var(--neutral-border-default)}._tableStyle_xchde_2 tbody{width:100%}:where(._tableStyle_xchde_2 tbody>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(var(--border-width-xxs)*var(--tw-divide-y-reverse));border-bottom-width:calc(var(--border-width-xxs)*calc(1 - var(--tw-divide-y-reverse)));border-color:var(--neutral-border-default)}._tableStyle_xchde_2 tr{border-radius:var(--border-radius-xl)}._tableStyle_xchde_2 th{padding-inline:var(--spacing-lg);padding-block:var(--spacing-base)}@media(hover:hover){._tableStyle_xchde_2 th:hover{background-color:var(--neutral-surface-highlight)}}._firstTh_xchde_2{border-start-start-radius:var(--border-radius-xl)}._lastTh_xchde_2{border-start-end-radius:var(--border-radius-xl)}._pointerNone_xchde_2{pointer-events:none}@media(hover:hover){._hoverBg_xchde_2:hover{background-color:var(--neutral-surface-default)}}._bgWhite_xchde_2{background-color:var(--color-white,#fff)}._sortable_xchde_2{cursor:pointer}._thContent_xchde_2{align-items:center;gap:var(--spacing-xs);width:100%;color:var(--neutral-interaction-default);display:flex}._thLabel_xchde_2{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}._sortIcon_xchde_2{opacity:0;width:fit-content;height:fit-content;transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.3s;--tw-ease:var(--ease-in-out,cubic-bezier(.4,0,.2,1));transition-duration:.3s;transition-timing-function:var(--ease-in-out,cubic-bezier(.4,0,.2,1));align-items:center;display:flex}._sortIcon_xchde_2 ._icon_xchde_2{font-size:var(--font-size-lg);line-height:var(--tw-leading,var(--text-lg--line-height,calc(1.75/1.125)))}._sortIconRotated_xchde_2{rotate:180deg}._sortIconActive_xchde_2{color:var(--primary-interaction-default);opacity:1}._tableStyle_xchde_2 th:hover ._sortIcon_xchde_2{opacity:1}._row_xchde_2{color:var(--neutral-foreground-low)}._row_xchde_2>*,._cell_xchde_2{padding-inline:var(--spacing-lg);padding-block:var(--spacing-sm)}._rowHover_xchde_2:hover{background-color:var(--primary-surface-default)}._skeletonCell_xchde_2{padding:var(--spacing-base)}._skeletonCell_xchde_2 ._skeleton_xchde_2{height:var(--spacing-sm);width:100%}._footer_xchde_2{margin-top:var(--spacing-base);color:var(--neutral-foreground-low);flex-wrap:wrap;justify-content:space-between;align-items:center;display:flex}._footerLeft_xchde_2{align-items:center;gap:var(--spacing-xs);display:flex}._footerLabel_xchde_2{font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)))}._emptyState_xchde_2{padding-block:var(--spacing-xl);color:var(--neutral-foreground-low);justify-content:center;align-items:center;display:flex}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e=require("./jsx-runtime-BubrbI3X.js"),d=require("react"),u=require("./clsx-C11secjj.js"),J=require("../hooks/useControllable.cjs.js"),Ne=require("./Pagination-CbOpAka-.js"),A=require("../components/Skeleton/index.cjs.js"),Q=require("./Checkbox-yFotY5Bn.js"),ye=require("../components/Icon/index.cjs.js"),we=require("./Select-Bqw3ZPOg.js"),Te="_table_xchde_2",Le="_tableContent_xchde_2",ke="_noShadow_xchde_2",Ie="_headerFixed_xchde_2",Pe="_tableStyle_xchde_2",Ae="_firstTh_xchde_2",qe="_lastTh_xchde_2",Fe="_pointerNone_xchde_2",Be="_hoverBg_xchde_2",De="_bgWhite_xchde_2",Ve="_sortable_xchde_2",He="_thContent_xchde_2",We="_thLabel_xchde_2",$e="_sortIcon_xchde_2",Me="_sortIconRotated_xchde_2",ze="_sortIconActive_xchde_2",Ge="_row_xchde_2",Je="_cell_xchde_2",Qe="_rowHover_xchde_2",Ue="_skeletonCell_xchde_2",Xe="_footer_xchde_2",Ye="_footerLeft_xchde_2",Ze="_footerLabel_xchde_2",s={table:Te,tableContent:Le,noShadow:ke,headerFixed:Ie,tableStyle:Pe,firstTh:Ae,lastTh:qe,pointerNone:Fe,hoverBg:Be,bgWhite:De,sortable:Ve,thContent:He,thLabel:We,sortIcon:$e,sortIconRotated:Me,sortIconActive:ze,row:Ge,cell:Je,rowHover:Qe,skeletonCell:Ue,footer:Xe,footerLeft:Ye,footerLabel:Ze};function Ke(r,i,x){return[...r].sort((b,p)=>{const l=b[i],a=p[i];if(typeof l=="string"&&typeof a=="string"){const m=l.toLowerCase(),h=a.toLowerCase();return x?m.localeCompare(h):h.localeCompare(m)}else{if(typeof l=="number"&&typeof a=="number")return x?l-a:a-l;if(l instanceof Date&&a instanceof Date)return x?l.getTime()-a.getTime():a.getTime()-l.getTime();{const m=String(l).toLowerCase(),h=String(a).toLowerCase();return x?m.localeCompare(h):h.localeCompare(m)}}})}function q(r,i){return d.Children.toArray(r).find(p=>d.isValidElement(p)&&p.type===i)||null}function U({children:r}){return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:r})}function X({children:r}){return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:r})}function Y({children:r}){return e.jsxRuntimeExports.jsx(e.jsxRuntimeExports.Fragment,{children:r})}function N({columns:r,items:i,sortOptions:x,page:b,defaultPage:p,itemsPerPage:l,defaultItemsPerPage:a,numberOfItems:m,renderPaginationInBackEnd:h=!1,hideFooter:Z=!1,isHeaderFixed:K=!1,enableSelection:C=!1,enableAggregation:R=!1,loading:y=!1,noShadow:O=!1,hasHover:ee=!1,onPageChange:te,onItemsPerPageChange:se,onSortBy:oe,onPageItems:F,onSelectAll:ne,onSelectRow:re,renderAggregation:le,renderSelect:B,renderActions:g,renderChilds:D,renderEmptyState:ae,renderFooter:V,renderItemsPerPage:ce,renderShowingPage:H,children:w,className:xe}){const[ie,W]=J.useControllable({value:b,defaultValue:p??1,onChange:te}),[he,ue]=J.useControllable({value:l,defaultValue:a??10,onChange:se}),[E,me]=d.useState(x?.by||null),[T,je]=d.useState(()=>{const t={};return r.forEach(o=>{t[o.value]=o.value===x?.by?!!x?.desc:!1}),t}),[de,L]=d.useState(new Set),[pe,_e]=d.useState(!1),_=ie??1,j=he??10,k=E?Ke(i,E,T[E]??!1):i,I=h?m??0:k?.length??0,fe=Math.ceil(I/j),S=h?k:k.slice((_-1)*j,_*j),$=_===1?1:(_-1)*j+1,M=(_-1)*j+S.length;let f=r.length;C&&f++,R&&f++;const P=q(w,U),z=q(w,X),Re=q(w,Y),v=!!g||!!P;v&&f++;const Ee=[5,10,20,50,100],be=t=>{if(!t.sortable)return;const o=t.value,n=E===o?!T[o]:!1;me(o),je(c=>({...c,[o]:n})),oe?.(o,n)},Ce=(t,o)=>{L(n=>{const c=new Set(n),G=c.has(t);return G?c.delete(t):c.add(t),re?.(o,!G),c})},ge=t=>{const o=!!t;_e(o),L(o?new Set(S.map((n,c)=>c)):new Set),i?.forEach(n=>{n.selected=o}),ne?.(o)},Se=t=>{W(t),F?.(t,j)},ve=t=>{ue(t||10),W(1),F?.(1,t)};return e.jsxRuntimeExports.jsxs("div",{className:u.clsx(s.table,xe),children:[e.jsxRuntimeExports.jsx("div",{className:u.clsx(s.tableContent,O&&s.noShadow,K&&s.headerFixed),children:e.jsxRuntimeExports.jsxs("table",{className:s.tableStyle,children:[y?e.jsxRuntimeExports.jsx("thead",{children:e.jsxRuntimeExports.jsx("tr",{children:Array.from({length:f||3}).map((t,o)=>e.jsxRuntimeExports.jsx("th",{className:s.skeletonCell,children:e.jsxRuntimeExports.jsx(A.Skeleton,{})},o))})}):e.jsxRuntimeExports.jsx("thead",{children:e.jsxRuntimeExports.jsxs("tr",{children:[R&&e.jsxRuntimeExports.jsx("th",{className:u.clsx(s.firstTh,s.pointerNone),style:{width:"2%"}}),C&&e.jsxRuntimeExports.jsx("th",{className:u.clsx(!R&&s.firstTh,s.hoverBg),style:{width:"2%"},children:e.jsxRuntimeExports.jsx(Q.Checkbox,{value:pe,onChange:ge})}),r.map((t,o)=>e.jsxRuntimeExports.jsx("th",{style:{width:t.width??"fit-content"},className:u.clsx(s.sortable,o===0&&!C&&!R&&s.firstTh,!r[o+1]&&!v&&s.lastTh,!t.sortable&&s.pointerNone),onClick:()=>be(t),children:e.jsxRuntimeExports.jsxs("div",{className:s.thContent,style:{justifyContent:t.align??"flex-start"},children:[e.jsxRuntimeExports.jsx("p",{className:s.thLabel,children:t.label}),t.sortable&&e.jsxRuntimeExports.jsx("span",{className:u.clsx(s.sortIcon,T[t.value]&&s.sortIconRotated,t.value===E&&s.sortIconActive),children:e.jsxRuntimeExports.jsx(ye.Icon,{name:"arrow_upward"})})]})},t.value)),v&&e.jsxRuntimeExports.jsx("th",{style:{flex:1},className:u.clsx(s.pointerNone,s.bgWhite)})]})}),y||!S.length?e.jsxRuntimeExports.jsx("tbody",{children:y?Array.from({length:10}).map((t,o)=>e.jsxRuntimeExports.jsxs("tr",{children:[Array.from({length:f||3}).map((n,c)=>e.jsxRuntimeExports.jsx("td",{className:s.skeletonCell,children:e.jsxRuntimeExports.jsx(A.Skeleton,{})},c)),v&&e.jsxRuntimeExports.jsx("td",{className:s.skeletonCell,children:e.jsxRuntimeExports.jsx(A.Skeleton,{})})]},`skeleton-${o}`)):e.jsxRuntimeExports.jsx("tr",{children:e.jsxRuntimeExports.jsx("td",{colSpan:f,children:ae?.()||Re||null})})}):e.jsxRuntimeExports.jsx("tbody",{children:S.map((t,o)=>e.jsxRuntimeExports.jsxs(d.Fragment,{children:[e.jsxRuntimeExports.jsxs("tr",{className:u.clsx(s.row,ee&&s.rowHover),children:[R&&e.jsxRuntimeExports.jsx("td",{className:s.cell,children:le?.(t,o)}),C&&e.jsxRuntimeExports.jsx("td",{className:s.cell,children:B?B(t,o):e.jsxRuntimeExports.jsx(Q.Checkbox,{value:de.has(o),onChange:()=>Ce(o,t)})}),r.map(n=>e.jsxRuntimeExports.jsx("td",{className:s.cell,style:{textAlign:n.align==="center"?"center":n.align==="flex-end"?"right":"left"},children:n.render?n.render(t[n.value],t,o):t[n.value]},n.value)),g&&e.jsxRuntimeExports.jsx("td",{className:s.cell,children:g(t,o)}),!g&&P&&e.jsxRuntimeExports.jsx("td",{className:s.cell,children:P})]}),t.expanded&&D&&D(t,o)]},o))}),(V||z)&&e.jsxRuntimeExports.jsx("tfoot",{children:V?.()||z})]})}),!Z&&e.jsxRuntimeExports.jsxs("footer",{className:s.footer,children:[e.jsxRuntimeExports.jsxs("div",{className:s.footerLeft,children:[e.jsxRuntimeExports.jsx("p",{className:s.footerLabel,children:ce?.()||"Items per page"}),e.jsxRuntimeExports.jsx(we.Select,{value:j,options:Ee,onChange:t=>ve(t)})]}),e.jsxRuntimeExports.jsx(Ne.Pagination,{value:_,onChange:Se,length:fe}),e.jsxRuntimeExports.jsx("div",{children:e.jsxRuntimeExports.jsx("p",{className:s.footerLabel,children:H?H($,M,I):`Showing ${$}-${M} of ${I}`})})]})]})}N.Actions=U;N.Footer=X;N.EmptyState=Y;exports.Table=N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./jsx-runtime-u17CrQMm.js";import{useState as m,useRef as U,useEffect as ae,Children as oe,isValidElement as le}from"react";import{c as V}from"./clsx-B-dksMZM.js";import{useControllable as ce}from"../hooks/useControllable.es.js";import{q as B,s as H}from"./index-C-RplXeX.js";import{L as ie}from"./Label-AiZCfFq1.js";import{T as K}from"./Tooltip-chSVIpvZ.js";import{S as ue}from"./StatusBadge-bK6dJmfs.js";const fe="_tagInput_10sgc_2",de="_labelRow_10sgc_2",me="_container_10sgc_2",pe="_focused_10sgc_2",ge="_error_10sgc_2",he="_shake_10sgc_2",xe="_disabled_10sgc_2",_e="_textarea_10sgc_2",Te="_errorMessage_10sgc_2",r={tagInput:fe,labelRow:de,container:me,focused:pe,error:ge,shake:he,disabled:xe,textarea:_e,errorMessage:Te},w={DUPLICATE:"Duplicated values are not allowed",INVALID_INPUT:"Please provide a valid input",MAX_VALUES:"Max number of values reached"};function X({children:a}){return t.jsx(t.Fragment,{children:a})}function q({children:a}){return t.jsx(t.Fragment,{children:a})}function G({children:a}){return t.jsx(t.Fragment,{children:a})}function k({value:a,defaultValue:O,onChange:z,labelValue:E,errorMessage:J,infoMessage:Q,disabled:p=!1,required:W=!1,allowDuplicate:y=!1,max:o,isError:A=!1,placeholder:Y="",mask:u,icon:f,appendIcon:D=!1,tooltipMinWidth:Z,children:$,className:ee}){const[i,g]=ce({value:a,defaultValue:O??[],onChange:z}),[c,h]=m(""),[x,M]=m(!1),[te,R]=m(""),[se,C]=m(!1),L=U(null),_=U(void 0);ae(()=>()=>clearTimeout(_.current),[]);function T(e){M(!0),R(e),clearTimeout(_.current),_.current=setTimeout(()=>{M(!1),R("")},2e3)}function P(e){const s=e.trim();if(B(s))return;if(u&&H(s,u)!==s){T(w.INVALID_INPUT);return}const n=i??[];if(!y&&n.includes(s)){T(w.DUPLICATE);return}if(o!==void 0&&n.length>=o){T(w.MAX_VALUES);return}g([...n,s]),h("")}function S(e){c===""&&g((i??[]).filter((s,n)=>n!==e))}function re(e){e.key==="Enter"&&!e.shiftKey?(e.preventDefault(),P(c)):e.key==="Tab"?(e.preventDefault(),c&&P(c)):e.key==="Backspace"&&c===""&&S((i??[]).length-1)}function ne(e){e.preventDefault();const n=e.clipboardData.getData("text").split(/[,\n]/).map(l=>l.trim()).filter(Boolean);if(n.length===0)return;const v=i??[],d=[];for(const l of n){if(B(l)||u&&H(l,u)!==l)continue;const F=[...v,...d];if(!(!y&&F.includes(l))){if(o!==void 0&&F.length>=o)break;d.push(l)}}d.length>0&&(g([...v,...d]),h(""))}let j=null,I=null,b=null;oe.forEach($,e=>{if(le(e)){const s=e.props;e.type===X?j=s.children:e.type===q?I=s.children:e.type===G&&(b=s.children)}});const N=i??[];return t.jsxs("div",{className:V(r.tagInput,ee),children:[E&&t.jsxs("div",{className:r.labelRow,children:[t.jsx(ie,{labelValue:E,infoMessage:Q,tooltipMinWidth:Z,required:W}),o!==void 0&&o>0&&t.jsxs("span",{className:"text-neutral-foreground-low font-bold text-xs",children:[N.length," / ",o]})]}),t.jsxs("div",{className:V(r.container,se&&!p&&r.focused,(A||x)&&r.error,p&&r.disabled,x&&r.shake),onClick:()=>L.current?.focus(),children:[j||f&&!D&&t.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:f}),N.map((e,s)=>t.jsxs(K,{className:"max-w-full",children:[t.jsx(K.Label,{children:t.jsx("div",{className:"max-w-[100%]",children:t.jsx("span",{className:"whitespace-normal break-all",children:String(e)})})}),t.jsx(ue,{labelValue:String(e),color:"neutral",closeable:!0,onClose:()=>S(s),className:"py-xxs"})]},s)),t.jsx("textarea",{ref:L,className:r.textarea,rows:1,value:c,onChange:e=>h(e.target.value),onKeyDown:re,onPaste:ne,onFocus:()=>C(!0),onBlur:()=>C(!1),placeholder:N.length===0?Y:"",disabled:p}),I||D&&f&&t.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:f})]}),b&&t.jsx("label",{className:"text-neutral-foreground-low text-sm",children:b}),(A||x)&&t.jsx("p",{className:r.errorMessage,children:te||J})]})}k.PrependIcon=X;k.AppendIcon=q;k.Hint=G;export{k as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BubrbI3X.js"),n=require("react"),F=require("./clsx-C11secjj.js"),ne=require("../hooks/useControllable.cjs.js"),p=require("./index-B4fH-h2h.js"),re=require("./Label-DhQPcDeH.js"),U=require("./Tooltip-DVq7Ij0P.js"),oe=require("./StatusBadge-1hF5CQM2.js"),ae="_tagInput_10sgc_2",le="_labelRow_10sgc_2",ie="_container_10sgc_2",ce="_focused_10sgc_2",ue="_error_10sgc_2",xe="_shake_10sgc_2",de="_disabled_10sgc_2",fe="_textarea_10sgc_2",pe="_errorMessage_10sgc_2",r={tagInput:ae,labelRow:le,container:ie,focused:ce,error:ue,shake:xe,disabled:de,textarea:fe,errorMessage:pe},v={DUPLICATE:"Duplicated values are not allowed",INVALID_INPUT:"Please provide a valid input",MAX_VALUES:"Max number of values reached"};function V({children:a}){return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:a})}function H({children:a}){return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:a})}function K({children:a}){return t.jsxRuntimeExports.jsx(t.jsxRuntimeExports.Fragment,{children:a})}function m({value:a,defaultValue:X,onChange:G,labelValue:w,errorMessage:O,infoMessage:z,disabled:g=!1,required:J=!1,allowDuplicate:y=!1,max:l,isError:A=!1,placeholder:Q="",mask:x,icon:d,appendIcon:S=!1,tooltipMinWidth:W,children:Y,className:Z}){const[u,h]=ne.useControllable({value:a,defaultValue:X??[],onChange:G}),[c,j]=n.useState(""),[E,M]=n.useState(!1),[$,C]=n.useState(""),[ee,D]=n.useState(!1),L=n.useRef(null),R=n.useRef(void 0);n.useEffect(()=>()=>clearTimeout(R.current),[]);function _(e){M(!0),C(e),clearTimeout(R.current),R.current=setTimeout(()=>{M(!1),C("")},2e3)}function P(e){const s=e.trim();if(p.isNilAndBlank(s))return;if(x&&p.applyMask(s,x)!==s){_(v.INVALID_INPUT);return}const o=u??[];if(!y&&o.includes(s)){_(v.DUPLICATE);return}if(l!==void 0&&o.length>=l){_(v.MAX_VALUES);return}h([...o,s]),j("")}function q(e){c===""&&h((u??[]).filter((s,o)=>o!==e))}function te(e){e.key==="Enter"&&!e.shiftKey?(e.preventDefault(),P(c)):e.key==="Tab"?(e.preventDefault(),c&&P(c)):e.key==="Backspace"&&c===""&&q((u??[]).length-1)}function se(e){e.preventDefault();const o=e.clipboardData.getData("text").split(/[,\n]/).map(i=>i.trim()).filter(Boolean);if(o.length===0)return;const k=u??[],f=[];for(const i of o){if(p.isNilAndBlank(i)||x&&p.applyMask(i,x)!==i)continue;const B=[...k,...f];if(!(!y&&B.includes(i))){if(l!==void 0&&B.length>=l)break;f.push(i)}}f.length>0&&(h([...k,...f]),j(""))}let T=null,b=null,I=null;n.Children.forEach(Y,e=>{if(n.isValidElement(e)){const s=e.props;e.type===V?T=s.children:e.type===H?b=s.children:e.type===K&&(I=s.children)}});const N=u??[];return t.jsxRuntimeExports.jsxs("div",{className:F.clsx(r.tagInput,Z),children:[w&&t.jsxRuntimeExports.jsxs("div",{className:r.labelRow,children:[t.jsxRuntimeExports.jsx(re.Label,{labelValue:w,infoMessage:z,tooltipMinWidth:W,required:J}),l!==void 0&&l>0&&t.jsxRuntimeExports.jsxs("span",{className:"text-neutral-foreground-low font-bold text-xs",children:[N.length," / ",l]})]}),t.jsxRuntimeExports.jsxs("div",{className:F.clsx(r.container,ee&&!g&&r.focused,(A||E)&&r.error,g&&r.disabled,E&&r.shake),onClick:()=>L.current?.focus(),children:[T||d&&!S&&t.jsxRuntimeExports.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:d}),N.map((e,s)=>t.jsxRuntimeExports.jsxs(U.Tooltip,{className:"max-w-full",children:[t.jsxRuntimeExports.jsx(U.Tooltip.Label,{children:t.jsxRuntimeExports.jsx("div",{className:"max-w-[100%]",children:t.jsxRuntimeExports.jsx("span",{className:"whitespace-normal break-all",children:String(e)})})}),t.jsxRuntimeExports.jsx(oe.StatusBadge,{labelValue:String(e),color:"neutral",closeable:!0,onClose:()=>q(s),className:"py-xxs"})]},s)),t.jsxRuntimeExports.jsx("textarea",{ref:L,className:r.textarea,rows:1,value:c,onChange:e=>j(e.target.value),onKeyDown:te,onPaste:se,onFocus:()=>D(!0),onBlur:()=>D(!1),placeholder:N.length===0?Q:"",disabled:g}),b||S&&d&&t.jsxRuntimeExports.jsx("span",{className:"material-symbols-rounded text-neutral-interaction-default",children:d})]}),I&&t.jsxRuntimeExports.jsx("label",{className:"text-neutral-foreground-low text-sm",children:I}),(A||E)&&t.jsxRuntimeExports.jsx("p",{className:r.errorMessage,children:$||O})]})}m.PrependIcon=V;m.AppendIcon=H;m.Hint=K;exports.TagInput=m;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-outline-style:solid}}}._tagInput_10sgc_2{flex-direction:column;display:flex}._labelRow_10sgc_2{margin-bottom:calc(var(--spacing,.25rem)*1);justify-content:space-between;align-items:center;display:flex}._container_10sgc_2{cursor:text;align-items:center;gap:calc(var(--spacing,.25rem)*1);border-radius:var(--border-radius-base);border-style:var(--tw-border-style);border-width:1px;border-color:var(--neutral-border-default);background-color:var(--neutral-surface-default);padding-inline:var(--spacing-sm);padding-block:var(--spacing-xs);transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));flex-wrap:wrap;display:flex}._focused_10sgc_2{border-color:var(--primary-interaction-default)}._error_10sgc_2{border-color:var(--danger-border-default);animation:.5s _shake_10sgc_2}._disabled_10sgc_2{pointer-events:none;border-color:var(--neutral-border-disabled);background-color:var(--neutral-surface-disabled)}._textarea_10sgc_2{resize:none;border-style:var(--tw-border-style);border-width:var(--border-width-none);--tw-border-style:none;min-width:60px;font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));color:var(--neutral-foreground-high);outline-style:var(--tw-outline-style);outline-width:var(--border-width-none);--tw-outline-style:none;background-color:#0000;border-style:none;outline-style:none;flex:1}._textarea_10sgc_2::placeholder{color:var(--neutral-foreground-low)}._errorMessage_10sgc_2{margin-top:calc(var(--spacing,.25rem)*1);text-align:start;font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));color:var(--danger-foreground-low)}._shake_10sgc_2{animation:.5s _shake_10sgc_2}@keyframes _shake_10sgc_2{0%,to{transform:translate(0)}10%,30%,50%,70%,90%{transform:translate(-5px)}20%,40%,60%,80%{transform:translate(5px)}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._tagContainer_1fr0s_2{gap:var(--spacing-xxs);flex-wrap:wrap;display:flex}._optionContainer_1fr0s_2{padding:var(--spacing-none)}._containerText_1fr0s_2{padding:var(--spacing-xs);font-size:var(--font-size-xs);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)));color:var(--neutral-foreground-low);justify-content:center;font-style:italic;display:flex}._deleteIcon_1fr0s_2{margin-left:var(--spacing-xxs);cursor:pointer;font-size:var(--font-size-xs);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)))}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const o=require("./jsx-runtime-BubrbI3X.js"),p=require("react"),g=require("./clsx-C11secjj.js"),I=require("../hooks/useControllable.cjs.js"),u=require("./index-B4fH-h2h.js"),ae=require("./SelectContainer-HFSZpyH5.js"),ce=require("./Option-B-lvFxi7.js"),ie=require("./StatusBadge-1hF5CQM2.js"),ue=require("../components/Icon/index.cjs.js"),xe="_tagContainer_1fr0s_2",de="_optionContainer_1fr0s_2",fe="_containerText_1fr0s_2",h={tagContainer:xe,optionContainer:de,containerText:fe};function me({value:B,defaultValue:H,onChange:M,options:b=[],labelKey:j="label",valueKey:x="value",getObject:_=!1,disabled:d=!1,labelValue:U="",searchable:k=!1,creatable:c=!1,isError:C=!1,errorMessage:W="",infoMessage:z="",required:F=!1,placeholder:G,icon:q,expanded:J,onExpandedChange:Q,absolute:X=!0,buttonLabel:Y,className:Z}){const[V,v]=I.useControllable({value:B,defaultValue:H??[],onChange:M}),[n,f]=p.useState(""),[D,P]=p.useState([]),[w,O]=I.useControllable({value:J,defaultValue:!1,onChange:Q}),A=w??!1,N=p.useRef(null),l=Array.isArray(V)?V:[];p.useEffect(()=>{w?N.current?.focus():N.current?.blur()},[w]);function i(e){return u.isObject(e)?e[j]:String(e??"")}function y(e){return u.isObject(e)?e[x]:e}function m(e,t){const r=u.isObject(t)?t[x]:t;return e.some(s=>(u.isObject(s)?s[x]:s)===r)}function L(e){if(d)return;const t=_?e:y(e),r=[...l],s=r.findIndex(a=>u.isObject(e)?i(a)===i(e):y(a)===y(e));s!==-1?r.splice(s,1):r.push(t),v(r)}function $(e){const t=[...l];t.splice(e,1),v(t)}function R(){if(!c||!n||C)return;const t=[...b,...D].find(S=>i(S).toLowerCase()===n.toLowerCase());if(t){m(l,t)||L(t),f("");return}if(m(l,n)){f("");return}const r={[j]:n,[x]:n};P(S=>[...S,r]);const s=_?r:n,a=[...l,s];v(a),f("")}const E=[...b,...D],T=n?E.filter(e=>i(e).toLowerCase().includes(n.toLowerCase())):E,K=c&&n&&!T.some(e=>i(e).toLowerCase()===n.toLowerCase()),ee=l.length>0?o.jsxRuntimeExports.jsx("div",{className:g.clsx(h.tagContainer),onClick:()=>setTimeout(()=>O(!1)),children:l.map((e,t)=>o.jsxRuntimeExports.jsx(ie.StatusBadge,{color:"neutral",className:"py-none max-w-full",closeable:!0,onClose:()=>$(t),children:u.isObject(e)?e[j]:e},t))}):void 0,te=o.jsxRuntimeExports.jsx("div",{className:"flex items-center gap-xs w-full",children:(k||c)&&o.jsxRuntimeExports.jsx("input",{ref:N,type:"text",value:n,onChange:e=>f(e.target.value),onKeyDown:e=>{e.key==="Enter"&&c&&R()},placeholder:G??"Search",disabled:d,className:g.clsx("text-neutral-interaction-default h-full w-full p-none m-none border-none shadow-none outline-none text-sm",{"text-danger-foreground-low":C,"bg-neutral-surface-disabled text-neutral-foreground-low":d}),style:{boxShadow:"none"},onClick:()=>setTimeout(()=>O(!0))})}),ne=!A&&l.length>0?ee:k||c?te:void 0;function se(e){const t=Array.from(e.currentTarget.querySelectorAll('[role="option"],[data-option]'));if(t.length===0)return;const r=document.activeElement,s=t.indexOf(r);e.key==="ArrowDown"?(e.preventDefault(),(s<t.length-1?t[s+1]:t[0])?.focus()):e.key==="ArrowUp"?(e.preventDefault(),(s>0?t[s-1]:t[t.length-1])?.focus()):e.key==="Home"?(e.preventDefault(),t[0]?.focus()):e.key==="End"?(e.preventDefault(),t[t.length-1]?.focus()):e.key==="Tab"&&c&&n&&(e.preventDefault(),R())}const oe=o.jsxRuntimeExports.jsx("div",{className:h.optionContainer,onKeyDown:se,children:T.length===0&&n?o.jsxRuntimeExports.jsx("div",{className:h.containerText,children:"No result found"}):E.length===0?o.jsxRuntimeExports.jsx("div",{className:h.containerText,children:"No tags created yet"}):T.map((e,t)=>o.jsxRuntimeExports.jsx(ce.Option,{selected:m(l,e),onClick:()=>L(e),className:g.clsx({"font-bold":m(l,e)},"p-xs"),children:i(e)},t))}),re=K?o.jsxRuntimeExports.jsx("div",{className:"flex justify-center w-full",children:o.jsxRuntimeExports.jsxs("button",{type:"button",className:"text-xs text-primary-interaction-default hover:underline px-xs py-xxs",onClick:R,children:['Add "',n,'"']})}):void 0,le=q?o.jsxRuntimeExports.jsx(ue.Icon,{name:q,className:"text-neutral-interaction-default"}):void 0;return o.jsxRuntimeExports.jsx(ae.SelectContainer,{value:A,onChange:e=>O(e),labelValue:Y??U,disabled:d,isError:C,errorMessage:W,infoMessage:z,required:F,absolute:X,maxHeight:"none",minWidth:"12em",leadingComplement:le,options:oe,actions:re,className:g.clsx("tag-select",Z),children:ne})}exports.TagSelect=me;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./jsx-runtime-u17CrQMm.js";import{useState as B,useRef as le,useEffect as ie}from"react";import{c as p}from"./clsx-B-dksMZM.js";import{useControllable as H}from"../hooks/useControllable.es.js";import{i as u}from"./index-C-RplXeX.js";import{S as ce}from"./SelectContainer-BRSv1LpP.js";import{O as ue}from"./Option-C3L7jFYC.js";import{S as fe}from"./StatusBadge-bK6dJmfs.js";import{Icon as de}from"../components/Icon/index.es.js";const me="_tagContainer_1fr0s_2",xe="_optionContainer_1fr0s_2",pe="_containerText_1fr0s_2",g={tagContainer:me,optionContainer:xe,containerText:pe};function Te({value:R,defaultValue:q,onChange:M,options:V=[],labelKey:h="label",valueKey:f="value",getObject:D=!1,disabled:d=!1,labelValue:U="",searchable:_=!1,creatable:i=!1,isError:C=!1,errorMessage:W="",infoMessage:z="",required:F=!1,placeholder:G,icon:A,expanded:J,onExpandedChange:Q,absolute:X=!0,buttonLabel:Y,className:Z}){const[L,v]=H({value:R,defaultValue:q??[],onChange:M}),[n,m]=B(""),[b,$]=B([]),[w,N]=H({value:J,defaultValue:!1,onChange:Q}),I=w??!1,y=le(null),a=Array.isArray(L)?L:[];ie(()=>{w?y.current?.focus():y.current?.blur()},[w]);function c(e){return u(e)?e[h]:String(e??"")}function O(e){return u(e)?e[f]:e}function x(e,t){const r=u(t)?t[f]:t;return e.some(o=>(u(o)?o[f]:o)===r)}function E(e){if(d)return;const t=D?e:O(e),r=[...a],o=r.findIndex(l=>u(e)?c(l)===c(e):O(l)===O(e));o!==-1?r.splice(o,1):r.push(t),v(r)}function P(e){const t=[...a];t.splice(e,1),v(t)}function j(){if(!i||!n||C)return;const t=[...V,...b].find(k=>c(k).toLowerCase()===n.toLowerCase());if(t){x(a,t)||E(t),m("");return}if(x(a,n)){m("");return}const r={[h]:n,[f]:n};$(k=>[...k,r]);const o=D?r:n,l=[...a,o];v(l),m("")}const T=[...V,...b],S=n?T.filter(e=>c(e).toLowerCase().includes(n.toLowerCase())):T,K=i&&n&&!S.some(e=>c(e).toLowerCase()===n.toLowerCase()),ee=a.length>0?s.jsx("div",{className:p(g.tagContainer),onClick:()=>setTimeout(()=>N(!1)),children:a.map((e,t)=>s.jsx(fe,{color:"neutral",className:"py-none max-w-full",closeable:!0,onClose:()=>P(t),children:u(e)?e[h]:e},t))}):void 0,te=s.jsx("div",{className:"flex items-center gap-xs w-full",children:(_||i)&&s.jsx("input",{ref:y,type:"text",value:n,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key==="Enter"&&i&&j()},placeholder:G??"Search",disabled:d,className:p("text-neutral-interaction-default h-full w-full p-none m-none border-none shadow-none outline-none text-sm",{"text-danger-foreground-low":C,"bg-neutral-surface-disabled text-neutral-foreground-low":d}),style:{boxShadow:"none"},onClick:()=>setTimeout(()=>N(!0))})}),ne=!I&&a.length>0?ee:_||i?te:void 0;function oe(e){const t=Array.from(e.currentTarget.querySelectorAll('[role="option"],[data-option]'));if(t.length===0)return;const r=document.activeElement,o=t.indexOf(r);e.key==="ArrowDown"?(e.preventDefault(),(o<t.length-1?t[o+1]:t[0])?.focus()):e.key==="ArrowUp"?(e.preventDefault(),(o>0?t[o-1]:t[t.length-1])?.focus()):e.key==="Home"?(e.preventDefault(),t[0]?.focus()):e.key==="End"?(e.preventDefault(),t[t.length-1]?.focus()):e.key==="Tab"&&i&&n&&(e.preventDefault(),j())}const se=s.jsx("div",{className:g.optionContainer,onKeyDown:oe,children:S.length===0&&n?s.jsx("div",{className:g.containerText,children:"No result found"}):T.length===0?s.jsx("div",{className:g.containerText,children:"No tags created yet"}):S.map((e,t)=>s.jsx(ue,{selected:x(a,e),onClick:()=>E(e),className:p({"font-bold":x(a,e)},"p-xs"),children:c(e)},t))}),re=K?s.jsx("div",{className:"flex justify-center w-full",children:s.jsxs("button",{type:"button",className:"text-xs text-primary-interaction-default hover:underline px-xs py-xxs",onClick:j,children:['Add "',n,'"']})}):void 0,ae=A?s.jsx(de,{name:A,className:"text-neutral-interaction-default"}):void 0;return s.jsx(ce,{value:I,onChange:e=>N(e),labelValue:Y??U,disabled:d,isError:C,errorMessage:W,infoMessage:z,required:F,absolute:X,maxHeight:"none",minWidth:"12em",leadingComplement:ae,options:se,actions:re,className:p("tag-select",Z),children:ne})}export{Te as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./jsx-runtime-u17CrQMm.js";import B,{useState as M}from"react";import{c as i}from"./clsx-B-dksMZM.js";import{useControllable as V}from"../hooks/useControllable.es.js";import{L as I}from"./Label-AiZCfFq1.js";const S="_textarea_187gm_2",k="_labelRow_187gm_2",q="_counter_187gm_2",z="_textareaContainer_187gm_2",D="_focused_187gm_2",E="_error_187gm_2",G="_disabled_187gm_2",H="_textareaContent_187gm_2",J="_errorMessage_187gm_2",e={textarea:S,labelRow:k,counter:q,textareaContainer:z,focused:D,error:E,disabled:G,textareaContent:H,errorMessage:J},X=B.forwardRef(function({value:_,onChange:m,labelValue:o,max:a,errorMessage:s,infoMessage:f,disabled:r=!1,isError:n=!1,required:x=!1,placeholder:g,textAlign:l,tooltipMinWidth:h,onFocus:C,onBlur:v,className:b},j){const[c,p]=V({value:_,defaultValue:"",onChange:m}),[R,u]=M(!1);function w(){u(!0),C?.()}function N(){u(!1),v?.()}function F(d){const y=a?d.target.value.slice(0,a):d.target.value;p(y)}const L=c?.length??0,T=o||a!==void 0;return t.jsxs("div",{className:i(e.textarea,b),children:[T&&t.jsxs("div",{className:e.labelRow,children:[t.jsx(I,{labelValue:o,infoMessage:f,tooltipMinWidth:h,required:x}),a!==void 0&&t.jsxs("span",{className:e.counter,children:[L,"/",a]})]}),t.jsx("div",{className:i(e.textareaContainer,R&&e.focused,n&&e.error,r&&e.disabled),children:t.jsx("textarea",{ref:j,className:e.textareaContent,value:c??"",onChange:F,onFocus:w,onBlur:N,placeholder:g,disabled:r,style:l?{textAlign:l}:void 0})}),(n||s)&&s&&t.jsx("small",{className:e.errorMessage,children:s})]})});export{X as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const t=require("./jsx-runtime-BubrbI3X.js"),x=require("react"),d=require("./clsx-C11secjj.js"),y=require("../hooks/useControllable.cjs.js"),B=require("./Label-DhQPcDeH.js"),M="_textarea_187gm_2",V="_labelRow_187gm_2",k="_counter_187gm_2",I="_textareaContainer_187gm_2",S="_focused_187gm_2",z="_error_187gm_2",D="_disabled_187gm_2",G="_textareaContent_187gm_2",H="_errorMessage_187gm_2",e={textarea:M,labelRow:V,counter:k,textareaContainer:I,focused:S,error:z,disabled:D,textareaContent:G,errorMessage:H},J=x.forwardRef(function({value:_,onChange:m,labelValue:n,max:s,errorMessage:a,infoMessage:f,disabled:o=!1,isError:r=!1,required:g=!1,placeholder:j,textAlign:c,tooltipMinWidth:R,onFocus:h,onBlur:C,className:b},v){const[l,p]=y.useControllable({value:_,defaultValue:"",onChange:m}),[w,u]=x.useState(!1);function E(){u(!0),h?.()}function N(){u(!1),C?.()}function q(i){const T=s?i.target.value.slice(0,s):i.target.value;p(T)}const F=l?.length??0,L=n||s!==void 0;return t.jsxRuntimeExports.jsxs("div",{className:d.clsx(e.textarea,b),children:[L&&t.jsxRuntimeExports.jsxs("div",{className:e.labelRow,children:[t.jsxRuntimeExports.jsx(B.Label,{labelValue:n,infoMessage:f,tooltipMinWidth:R,required:g}),s!==void 0&&t.jsxRuntimeExports.jsxs("span",{className:e.counter,children:[F,"/",s]})]}),t.jsxRuntimeExports.jsx("div",{className:d.clsx(e.textareaContainer,w&&e.focused,r&&e.error,o&&e.disabled),children:t.jsxRuntimeExports.jsx("textarea",{ref:v,className:e.textareaContent,value:l??"",onChange:q,onFocus:E,onBlur:N,placeholder:j,disabled:o,style:c?{textAlign:c}:void 0})}),(r||a)&&a&&t.jsxRuntimeExports.jsx("small",{className:e.errorMessage,children:a})]})});exports.Textarea=J;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const i=require("./jsx-runtime-BubrbI3X.js"),u=require("react"),h=require("react-dom"),d=require("./clsx-C11secjj.js"),E=require("./Alert-VaDDaJmV.js"),j=require("./Button-PxUMi4c4.js"),R=require("../hooks/useTransition.cjs.js");function T(e,r){switch(r.type){case"ADD":return[...e,r.toast];case"HIDE":return e.map(t=>t.id===r.id?{...t,visible:!1}:t);case"REMOVE":return e.filter(t=>t.id!==r.id)}}const x=u.createContext(null);function b({toast:e,onClose:r}){const{isMounted:t,isActive:o}=R.useTransition(e.visible,{duration:600}),a=e.right?"slide-right":"slide-left";return t?i.jsxRuntimeExports.jsx("div",{className:d.clsx("toast-wrapper",a,o&&"active"),children:i.jsxRuntimeExports.jsx(E.Alert,{title:e.title,message:e.message,type:e.type,iconPosition:"center",closable:!0,onClose:()=>r(e.id),actions:e.buttonLabel?i.jsxRuntimeExports.jsx(j.Button,{size:"small",variant:"secondary",color:e.type,className:"whitespace-nowrap",onClick:e.action,children:e.buttonLabel}):void 0,className:"toast"})}):null}const g=[{vertical:"top",horizontal:"left"},{vertical:"top",horizontal:"right"},{vertical:"bottom",horizontal:"left"},{vertical:"bottom",horizontal:"right"}];function y({toasts:e,onClose:r}){return i.jsxRuntimeExports.jsx(i.jsxRuntimeExports.Fragment,{children:g.map(t=>i.jsxRuntimeExports.jsx("div",{className:d.clsx("toast-container",t.vertical,t.horizontal),children:e.filter(o=>o[t.vertical]&&o[t.horizontal]).map(o=>i.jsxRuntimeExports.jsx(b,{toast:o,onClose:r},o.id))},`${t.vertical}-${t.horizontal}`))})}function C({children:e}){const[r,t]=u.useReducer(T,[]),[o,a]=u.useState(!1),c=u.useRef(new Map);u.useEffect(()=>(a(!0),()=>{c.current.forEach(s=>clearTimeout(s))}),[]);function l(s){const n=c.current.get(s);n!==void 0&&(clearTimeout(n),c.current.delete(s)),t({type:"HIDE",id:s}),setTimeout(()=>t({type:"REMOVE",id:s}),600)}function p(s){const n=s.id??crypto.randomUUID(),f={id:n,title:"",message:"",type:"danger",top:!1,bottom:!1,right:!1,left:!1,buttonLabel:"",action:void 0,...s,visible:!0,timeout:s.timeout};t({type:"ADD",toast:f});const m=s.timeout;if(m){const v=setTimeout(()=>l(n),m);c.current.set(n,v)}return{id:n,close:()=>l(n)}}return i.jsxRuntimeExports.jsxs(x.Provider,{value:{toast:p},children:[e,o&&h.createPortal(i.jsxRuntimeExports.jsx(y,{toasts:r,onClose:l}),document.body)]})}function z(){const e=u.useContext(x);if(!e)throw new Error("useToast must be used inside ToastProvider");return e}exports.ToastProvider=C;exports.useToast=z;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./jsx-runtime-u17CrQMm.js";import{createContext as h,useReducer as x,useState as T,useRef as b,useEffect as g,useContext as y}from"react";import{createPortal as E}from"react-dom";import{c as m}from"./clsx-B-dksMZM.js";import{A as j}from"./Alert-D-09BScY.js";import{B as C}from"./Button-1lnlGEU9.js";import{useTransition as z}from"../hooks/useTransition.es.js";function R(t,r){switch(r.type){case"ADD":return[...t,r.toast];case"HIDE":return t.map(e=>e.id===r.id?{...e,visible:!1}:e);case"REMOVE":return t.filter(e=>e.id!==r.id)}}const d=h(null);function w({toast:t,onClose:r}){const{isMounted:e,isActive:s}=z(t.visible,{duration:600}),l=t.right?"slide-right":"slide-left";return e?i.jsx("div",{className:m("toast-wrapper",l,s&&"active"),children:i.jsx(j,{title:t.title,message:t.message,type:t.type,iconPosition:"center",closable:!0,onClose:()=>r(t.id),actions:t.buttonLabel?i.jsx(C,{size:"small",variant:"secondary",color:t.type,className:"whitespace-nowrap",onClick:t.action,children:t.buttonLabel}):void 0,className:"toast"})}):null}const D=[{vertical:"top",horizontal:"left"},{vertical:"top",horizontal:"right"},{vertical:"bottom",horizontal:"left"},{vertical:"bottom",horizontal:"right"}];function A({toasts:t,onClose:r}){return i.jsx(i.Fragment,{children:D.map(e=>i.jsx("div",{className:m("toast-container",e.vertical,e.horizontal),children:t.filter(s=>s[e.vertical]&&s[e.horizontal]).map(s=>i.jsx(w,{toast:s,onClose:r},s.id))},`${e.vertical}-${e.horizontal}`))})}function H({children:t}){const[r,e]=x(R,[]),[s,l]=T(!1),a=b(new Map);g(()=>(l(!0),()=>{a.current.forEach(o=>clearTimeout(o))}),[]);function c(o){const n=a.current.get(o);n!==void 0&&(clearTimeout(n),a.current.delete(o)),e({type:"HIDE",id:o}),setTimeout(()=>e({type:"REMOVE",id:o}),600)}function f(o){const n=o.id??crypto.randomUUID(),p={id:n,title:"",message:"",type:"danger",top:!1,bottom:!1,right:!1,left:!1,buttonLabel:"",action:void 0,...o,visible:!0,timeout:o.timeout};e({type:"ADD",toast:p});const u=o.timeout;if(u){const v=setTimeout(()=>c(n),u);a.current.set(n,v)}return{id:n,close:()=>c(n)}}return i.jsxs(d.Provider,{value:{toast:f},children:[t,s&&E(i.jsx(A,{toasts:r,onClose:c}),document.body)]})}function S(){const t=y(d);if(!t)throw new Error("useToast must be used inside ToastProvider");return t}export{H as T,S as u};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as d}from"./jsx-runtime-u17CrQMm.js";import{createContext as E,useContext as N}from"react";import{c as V}from"./clsx-B-dksMZM.js";import{useControllable as z}from"../hooks/useControllable.es.js";import{i as C}from"./index-C-RplXeX.js";const O="_toggleGroup_1jngx_2",$="_vertical_1jngx_2",A="_secondary_1jngx_2",I="_secondaryVertical_1jngx_2",o={toggleGroup:O,vertical:$,default:"_default_1jngx_2",secondary:A,secondaryVertical:I},h=E(null);function M({value:i,defaultValue:u,onChange:f,vertical:l=!1,disabled:_=!1,type:t="default",options:n,labelKey:g="label",valueKey:m="value",getObject:v=!1,children:a,className:b}){const[x,r]=z({value:i,defaultValue:u,onChange:f});function y(e){return C(e)?e[g]:e}function s(e){return C(e)?e[m]:e}function j(e){return C(e)?e.disabled:!1}function k(e){let G=e;if(v&&n){const T=n.find(D=>s(D)===e);T!==void 0&&(G=T)}r(G)}const p={selected:x,disabled:_,type:t,select:k};return d.jsx(h.Provider,{value:p,children:d.jsx("div",{className:V(o.toggleGroup,l&&o.vertical,t==="default"&&o.default,t==="secondary"&&!l&&o.secondary,t==="secondary"&&l&&o.secondaryVertical,b),children:n?n.map(e=>d.jsx(w,{groupValue:s(e),disabled:j(e),children:y(e)},s(e))):a})})}const L="_toggle_1mzau_2",P="_secondary_1mzau_2",R="_active_1mzau_2",q="_disabled_1mzau_2",c={toggle:L,default:"_default_1mzau_2",secondary:P,active:R,disabled:q};function w({value:i,defaultValue:u,onChange:f,id:l,name:_,groupValue:t,disabled:n,type:g,children:m,className:v}){const a=N(h),[b,x]=z({value:a&&t!==void 0?void 0:i,defaultValue:a&&t!==void 0?void 0:u??!1,onChange:f}),r=a&&t!==void 0?a.selected===t:b??!1,y=a?.type??g??"default",s=!!(a?.disabled||n);function j(){s||(a&&t!==void 0?a.select(t):x(!0))}return d.jsx("button",{id:l,name:_||l,type:"button",role:"button","aria-pressed":r,"aria-disabled":s,disabled:s,tabIndex:0,className:V(c.toggle,y==="secondary"?c.secondary:c.default,r&&c.active,s&&c.disabled,v),onClick:j,children:m})}export{w as T,M as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid}}}._toggleGroup_1jngx_2{display:inline-flex}._vertical_1jngx_2{flex-direction:column}._default_1jngx_2>*{border-radius:var(--border-radius-none)}._default_1jngx_2:not(._vertical_1jngx_2)>*+*{border-left-style:var(--tw-border-style);border-left-width:0}._default_1jngx_2:not(._vertical_1jngx_2)>:first-child{border-top-left-radius:var(--border-radius-sm);border-bottom-left-radius:var(--border-radius-sm)}._default_1jngx_2:not(._vertical_1jngx_2)>:last-child{border-top-right-radius:var(--border-radius-sm);border-bottom-right-radius:var(--border-radius-sm)}._default_1jngx_2._vertical_1jngx_2>*+*{border-top-style:var(--tw-border-style);border-top-width:0}._default_1jngx_2._vertical_1jngx_2>:first-child{border-top-left-radius:var(--border-radius-sm);border-top-right-radius:var(--border-radius-sm)}._default_1jngx_2._vertical_1jngx_2>:last-child{border-bottom-right-radius:var(--border-radius-sm);border-bottom-left-radius:var(--border-radius-sm)}._secondary_1jngx_2{gap:var(--spacing-xs);flex-wrap:wrap}._secondaryVertical_1jngx_2{gap:var(--spacing-xs);flex-direction:column}@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-font-weight:initial;--tw-tracking:initial;--tw-duration:initial;--tw-ease:initial}}}._toggle_1mzau_2{cursor:pointer;border-style:var(--tw-border-style);font-size:var(--font-size-xs);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)));--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold);--tw-tracking:.07em;letter-spacing:.07em;text-transform:uppercase;transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;--tw-ease:var(--ease-out,cubic-bezier(0,0,.2,1));transition-duration:.15s;transition-timing-function:var(--ease-out,cubic-bezier(0,0,.2,1));-webkit-user-select:none;user-select:none;background-color:#0000;border-width:1px;border-color:currentColor;justify-content:center;align-items:center;display:inline-flex;position:relative}._default_1mzau_2{min-height:var(--spacing-3xl);min-width:128px;padding-inline:var(--spacing-base);padding-block:var(--spacing-xs)}._secondary_1mzau_2{border-radius:var(--border-radius-base);padding-inline:var(--spacing-2xl);padding-block:var(--spacing-base)}._active_1mzau_2{border-color:var(--primary-interaction-default);background-color:var(--primary-interaction-default);color:var(--neutral-foreground-negative)}._secondary_1mzau_2._active_1mzau_2{border-color:var(--primary-interaction-default);background-color:var(--primary-surface-highlight);color:var(--primary-interaction-default)}._disabled_1mzau_2{pointer-events:none;opacity:.5}._inGroup_1mzau_2{border-radius:var(--border-radius-none)}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const d=require("./jsx-runtime-BubrbI3X.js"),R=require("react"),V=require("./clsx-C11secjj.js"),h=require("../hooks/useControllable.cjs.js"),C=require("./index-B4fH-h2h.js"),D="_toggleGroup_1jngx_2",N="_vertical_1jngx_2",$="_secondary_1jngx_2",A="_secondaryVertical_1jngx_2",c={toggleGroup:D,vertical:N,default:"_default_1jngx_2",secondary:$,secondaryVertical:A},q=R.createContext(null);function I({value:u,defaultValue:i,onChange:g,vertical:n=!1,disabled:_=!1,type:t="default",options:a,labelKey:f="label",valueKey:x="value",getObject:b=!1,children:s,className:v}){const[j,r]=h.useControllable({value:u,defaultValue:i,onChange:g});function y(e){return C.isObject(e)?e[f]:e}function l(e){return C.isObject(e)?e[x]:e}function m(e){return C.isObject(e)?e.disabled:!1}function E(e){let G=e;if(b&&a){const T=a.find(k=>l(k)===e);T!==void 0&&(G=T)}r(G)}const O={selected:j,disabled:_,type:t,select:E};return d.jsxRuntimeExports.jsx(q.Provider,{value:O,children:d.jsxRuntimeExports.jsx("div",{className:V.clsx(c.toggleGroup,n&&c.vertical,t==="default"&&c.default,t==="secondary"&&!n&&c.secondary,t==="secondary"&&n&&c.secondaryVertical,v),children:a?a.map(e=>d.jsxRuntimeExports.jsx(z,{groupValue:l(e),disabled:m(e),children:y(e)},l(e))):s})})}const L="_toggle_1mzau_2",P="_secondary_1mzau_2",p="_active_1mzau_2",w="_disabled_1mzau_2",o={toggle:L,default:"_default_1mzau_2",secondary:P,active:p,disabled:w};function z({value:u,defaultValue:i,onChange:g,id:n,name:_,groupValue:t,disabled:a,type:f,children:x,className:b}){const s=R.useContext(q),[v,j]=h.useControllable({value:s&&t!==void 0?void 0:u,defaultValue:s&&t!==void 0?void 0:i??!1,onChange:g}),r=s&&t!==void 0?s.selected===t:v??!1,y=s?.type??f??"default",l=!!(s?.disabled||a);function m(){l||(s&&t!==void 0?s.select(t):j(!0))}return d.jsxRuntimeExports.jsx("button",{id:n,name:_||n,type:"button",role:"button","aria-pressed":r,"aria-disabled":l,disabled:l,tabIndex:0,className:V.clsx(o.toggle,y==="secondary"?o.secondary:o.default,r&&o.active,l&&o.disabled,b),onClick:m,children:x})}exports.Toggle=z;exports.ToggleGroup=I;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const r=require("./jsx-runtime-BubrbI3X.js"),i=require("react"),T=require("react-dom"),W=require("./clsx-C11secjj.js"),q=require("../hooks/useTransition.cjs.js"),$="_tooltip_ui48a_2",k="_active_ui48a_2",B="_tooltipTriangle_ui48a_2",H="_tooltipContent_ui48a_2",L="_right_ui48a_2",M="_left_ui48a_2",S="_top_ui48a_2",P="_bottom_ui48a_2",l={tooltip:$,active:k,tooltipTriangle:B,tooltipContent:H,right:L,left:M,top:S,bottom:P};function _({children:u}){return r.jsxRuntimeExports.jsx(r.jsxRuntimeExports.Fragment,{children:u})}function v({labelValue:u="",position:s="right",children:y,className:R,style:E}){let x=null;const m=[];i.Children.forEach(y,t=>{i.isValidElement(t)&&t.type===_?x=t.props.children:m.push(t)});const w=x||u,[C,p]=i.useState(!1),a=i.useRef(null),c=i.useRef(null),{isMounted:d,isActive:j}=q.useTransition(C,{duration:500}),f=i.useCallback((t,e)=>{if(s==="left"||s==="right"){const o=s==="left"?t.left-e.offsetWidth-4:t.right+4;e.style.left=`${Math.max(0,o)}px`,e.style.top=`${t.top+t.height/2-e.offsetHeight/2}px`}else{const o=s==="top"?t.top-e.offsetHeight:t.bottom;e.style.top=`${Math.max(0,o)}px`,e.style.left=`${t.left+t.width/2-e.offsetWidth/2}px`}},[s]);return i.useEffect(()=>{if(!d||!a.current||!c.current)return;const t=(a.current.firstElementChild||a.current).getBoundingClientRect();f(t,c.current);const e=c.current,h=window.innerWidth,o=e.getBoundingClientRect(),n=e.querySelector(`.${l.tooltipContent}`);if(n&&(n.style.maxWidth="none",n.style.wordBreak="normal",n.style.whiteSpace="normal",o.left+o.width>h)){const b=o.width-n.offsetWidth;n.style.maxWidth=`${h-o.left-4-b}px`,n.style.wordBreak="break-all",n.style.whiteSpace="wrap",f(t,e)}const g=()=>p(!1);return document.addEventListener("wheel",g),()=>document.removeEventListener("wheel",g)},[d,f]),r.jsxRuntimeExports.jsxs("div",{ref:a,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),className:R,style:E,children:[d&&T.createPortal(r.jsxRuntimeExports.jsxs("div",{ref:c,className:W.clsx(l.tooltip,l[s],j&&l.active),children:[r.jsxRuntimeExports.jsx("div",{className:l.tooltipTriangle}),r.jsxRuntimeExports.jsx("div",{className:l.tooltipContent,children:w})]}),document.body),m]})}v.Label=_;exports.Tooltip=v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./jsx-runtime-u17CrQMm.js";import{Children as W,isValidElement as j,useState as R,useRef as _,useCallback as $,useEffect as B}from"react";import{createPortal as H}from"react-dom";import{c as L}from"./clsx-B-dksMZM.js";import{useTransition as M}from"../hooks/useTransition.es.js";const S="_tooltip_ui48a_2",k="_active_ui48a_2",P="_tooltipTriangle_ui48a_2",N="_tooltipContent_ui48a_2",q="_right_ui48a_2",z="_left_ui48a_2",A="_top_ui48a_2",F="_bottom_ui48a_2",l={tooltip:S,active:k,tooltipTriangle:P,tooltipContent:N,right:q,left:z,top:A,bottom:F};function x({children:c}){return s.jsx(s.Fragment,{children:c})}function I({labelValue:c="",position:i="right",children:v,className:y,style:w}){let h=null;const m=[];W.forEach(v,t=>{j(t)&&t.type===x?h=t.props.children:m.push(t)});const C=h||c,[b,p]=R(!1),r=_(null),a=_(null),{isMounted:f,isActive:E}=M(b,{duration:500}),u=$((t,e)=>{if(i==="left"||i==="right"){const o=i==="left"?t.left-e.offsetWidth-4:t.right+4;e.style.left=`${Math.max(0,o)}px`,e.style.top=`${t.top+t.height/2-e.offsetHeight/2}px`}else{const o=i==="top"?t.top-e.offsetHeight:t.bottom;e.style.top=`${Math.max(0,o)}px`,e.style.left=`${t.left+t.width/2-e.offsetWidth/2}px`}},[i]);return B(()=>{if(!f||!r.current||!a.current)return;const t=(r.current.firstElementChild||r.current).getBoundingClientRect();u(t,a.current);const e=a.current,d=window.innerWidth,o=e.getBoundingClientRect(),n=e.querySelector(`.${l.tooltipContent}`);if(n&&(n.style.maxWidth="none",n.style.wordBreak="normal",n.style.whiteSpace="normal",o.left+o.width>d)){const T=o.width-n.offsetWidth;n.style.maxWidth=`${d-o.left-4-T}px`,n.style.wordBreak="break-all",n.style.whiteSpace="wrap",u(t,e)}const g=()=>p(!1);return document.addEventListener("wheel",g),()=>document.removeEventListener("wheel",g)},[f,u]),s.jsxs("div",{ref:r,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),className:y,style:w,children:[f&&H(s.jsxs("div",{ref:a,className:L(l.tooltip,l[i],E&&l.active),children:[s.jsx("div",{className:l.tooltipTriangle}),s.jsx("div",{className:l.tooltipContent,children:C})]}),document.body),m]})}I.Label=x;export{I as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-duration:initial}}}._tree_1wlbq_2,._treeOption_1wlbq_2{flex-direction:column;display:flex}._nodeRow_1wlbq_2{cursor:pointer;align-items:center;gap:var(--spacing-xxs);border-radius:var(--border-radius-sm);padding-inline:var(--spacing-xs);padding-block:var(--spacing-xxs);color:var(--neutral-interaction-default);display:flex}._nodeRow_1wlbq_2:not(._multiple_1wlbq_2){transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.15s;transition-duration:.15s}@media(hover:hover){._nodeRow_1wlbq_2:not(._multiple_1wlbq_2):hover{background-color:var(--primary-surface-hover);color:var(--primary-interaction-hover)}}._nodeIcon_1wlbq_2{font-size:var(--font-size-xl);line-height:var(--tw-leading,var(--text-xl--line-height,calc(1.75/1.25)))}._selected_1wlbq_2:not(._multiple_1wlbq_2){background-color:var(--primary-surface-default);color:var(--primary-foreground-low)}._disabled_1wlbq_2{pointer-events:none;opacity:.5}._expandIcon_1wlbq_2{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4,0,.2,1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));--tw-duration:.2s;transition-duration:.2s;transform:rotate(0)}._expandIconOpen_1wlbq_2{transform:rotate(90deg)}._nodeLabel_1wlbq_2{font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)));flex:1}@property --tw-duration{syntax:"*";inherits:false}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as p}from"./jsx-runtime-u17CrQMm.js";import{createContext as T,useState as k,useContext as M}from"react";import{c as _}from"./clsx-B-dksMZM.js";import{useControllable as P}from"../hooks/useControllable.es.js";import{C as J}from"./Checkbox-2PgbPjFv.js";import{Icon as m}from"../components/Icon/index.es.js";const V="_tree_1wlbq_2",y="_treeOption_1wlbq_2",B="_nodeRow_1wlbq_2",z="_multiple_1wlbq_2",D="_nodeIcon_1wlbq_2",F="_selected_1wlbq_2",G="_disabled_1wlbq_2",H="_expandIcon_1wlbq_2",Q="_expandIconOpen_1wlbq_2",U="_nodeLabel_1wlbq_2",u={tree:V,treeOption:y,nodeRow:B,multiple:z,nodeIcon:D,selected:F,disabled:G,expandIcon:H,expandIconOpen:Q,nodeLabel:U},I=T(null);function a(n,o){return typeof n=="object"&&n!==null?n[o]:n}function j(n,o,e){return o?.find(s=>{if(!s.options||!s.options.length)return!1;const i=s.options.find(c=>a(c,e)===a(n,e));return i||j(n,s.options,e)})}function S(n,o,e,s){const i=o.findIndex(c=>a(c,s)===a(n,s));i!==-1&&o.splice(i,1),e&&o.push(JSON.parse(JSON.stringify(n)))}function N(n,o,e,s,i){if(!o.options)return;const c=o.options.findIndex(l=>a(l,i)===a(n,i));let t=e.findIndex(l=>a(l,i)===a(o,i));if((!e.length||t===-1)&&s&&(t=e.length,e.push({...o,options:[]})),c===-1){const l=j(n,o.options,i);e[t]?.options&&l&&N(n,l,e[t].options,s,i);return}S(n,e[t].options,s,i),t!==-1&&e[t]?.options&&!e[t]?.options?.length&&!s&&e.splice(t,1)}function O(n,o,e,s,i){const c=[...e];if(i){const t=(()=>{for(const l of c)if(l.options&&l.options.find(x=>a(x,s)===a(n,s)))return l})();return t?N(n,t,c,o,s):S(n,c,o,s),c.filter(l=>l.options?.length)}else{const t=a(n,s),l=c.findIndex(r=>a(r,s)===t);return l!==-1?c.splice(l,1):n.options?.length||c.push(t),n.options?.length&&n.options.forEach(r=>{const x=O(r,o,c,s,i);c.length=0,x.forEach(b=>c.push(b))}),c}}function C(n,o){const e=[];for(const s of n)s.options?.length?e.push(...C(s.options,o)):e.push(s[o]);return e}function W(n,o,e,s){if(e.multiple){if(!Array.isArray(n))return!1;const i=t=>e.getObject&&typeof t=="object"&&t!==null?t[e.valueKey]===o:(typeof t=="object"&&t!==null?t[e.valueKey]:t)===o;if(n.some(i))return!0;if(s?.options?.length){const t=C(s.options,e.valueKey),l=b=>n.some(d=>e.getObject&&typeof d=="object"&&d!==null?d[e.valueKey]===b:(typeof d=="object"&&d!==null?d[e.valueKey]:d)===b),r=t.some(l);if(t.length>0&&t.every(l))return!0;if(r)return null}return!1}else return e.getObject&&typeof n=="object"&&n!==null?n[e.valueKey]===o:n===o}function q({option:n,depth:o=0}){const e=M(I),s=n[e.valueKey],i=n[e.labelKey],c=e.expandedNodes.has(s),t=!!(n.options&&n.options.length>0),l=W(e.selectedValue,s,e,n);return p.jsxs("div",{className:u.treeOption,style:{paddingLeft:o*16},children:[p.jsxs("div",{className:_(u.nodeRow,l===!0&&u.selected,e.multiple&&u.multiple,(e.disabled||n.disabled)&&u.disabled),onClick:()=>{!e.disabled&&!n.disabled&&e.onSelect(n,!l)},children:[t&&p.jsx(m,{name:"keyboard_arrow_right",className:_(u.expandIcon,c&&u.expandIconOpen),onClick:r=>{r.stopPropagation(),e.onToggleExpand(s)}}),e.multiple&&p.jsx(J,{value:l,onChange:()=>{},disabled:e.disabled||n.disabled,allowIndeterminate:!0}),n.icon&&p.jsx(m,{name:n.icon,className:u.nodeIcon}),p.jsx("span",{className:_(u.nodeLabel),children:i})]}),c&&t&&n.options.map(r=>p.jsx(q,{option:r,depth:o+1},r[e.valueKey]))]})}function v({value:n,defaultValue:o,onChange:e,options:s,labelKey:i="label",valueKey:c="value",getObject:t=!1,multiple:l=!1,disabled:r=!1,className:x}){const[b,d]=P({value:n,defaultValue:o??(l?[]:void 0),onChange:e}),[g,L]=k(new Set),E=f=>{L(w=>{const h=new Set(w);return h.has(f)?h.delete(f):h.add(f),h})},R=(f,w)=>{if(l){const h=O(f,w,b??[],c,t);d(h)}else{const h=t?f:f[c];d(h)}};return p.jsx(I.Provider,{value:{selectedValue:b,onSelect:R,expandedNodes:g,onToggleExpand:E,labelKey:i,valueKey:c,getObject:t,multiple:l,disabled:r},children:p.jsx("div",{className:_(u.tree,x),children:s.map(f=>p.jsx(q,{option:f},f[c]))})})}export{v as T};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const p=require("./jsx-runtime-BubrbI3X.js"),w=require("react"),_=require("./clsx-C11secjj.js"),T=require("../hooks/useControllable.cjs.js"),M=require("./Checkbox-yFotY5Bn.js"),m=require("../components/Icon/index.cjs.js"),P="_tree_1wlbq_2",J="_treeOption_1wlbq_2",V="_nodeRow_1wlbq_2",y="_multiple_1wlbq_2",B="_nodeIcon_1wlbq_2",z="_selected_1wlbq_2",D="_disabled_1wlbq_2",F="_expandIcon_1wlbq_2",G="_expandIconOpen_1wlbq_2",H="_nodeLabel_1wlbq_2",f={tree:P,treeOption:J,nodeRow:V,multiple:y,nodeIcon:B,selected:z,disabled:D,expandIcon:F,expandIconOpen:G,nodeLabel:H},I=w.createContext(null);function d(n,o){return typeof n=="object"&&n!==null?n[o]:n}function R(n,o,e){return o?.find(s=>{if(!s.options||!s.options.length)return!1;const i=s.options.find(c=>d(c,e)===d(n,e));return i||R(n,s.options,e)})}function S(n,o,e,s){const i=o.findIndex(c=>d(c,s)===d(n,s));i!==-1&&o.splice(i,1),e&&o.push(JSON.parse(JSON.stringify(n)))}function q(n,o,e,s,i){if(!o.options)return;const c=o.options.findIndex(l=>d(l,i)===d(n,i));let t=e.findIndex(l=>d(l,i)===d(o,i));if((!e.length||t===-1)&&s&&(t=e.length,e.push({...o,options:[]})),c===-1){const l=R(n,o.options,i);e[t]?.options&&l&&q(n,l,e[t].options,s,i);return}S(n,e[t].options,s,i),t!==-1&&e[t]?.options&&!e[t]?.options?.length&&!s&&e.splice(t,1)}function E(n,o,e,s,i){const c=[...e];if(i){const t=(()=>{for(const l of c)if(l.options&&l.options.find(b=>d(b,s)===d(n,s)))return l})();return t?q(n,t,c,o,s):S(n,c,o,s),c.filter(l=>l.options?.length)}else{const t=d(n,s),l=c.findIndex(r=>d(r,s)===t);return l!==-1?c.splice(l,1):n.options?.length||c.push(t),n.options?.length&&n.options.forEach(r=>{const b=E(r,o,c,s,i);c.length=0,b.forEach(h=>c.push(h))}),c}}function C(n,o){const e=[];for(const s of n)s.options?.length?e.push(...C(s.options,o)):e.push(s[o]);return e}function Q(n,o,e,s){if(e.multiple){if(!Array.isArray(n))return!1;const i=t=>e.getObject&&typeof t=="object"&&t!==null?t[e.valueKey]===o:(typeof t=="object"&&t!==null?t[e.valueKey]:t)===o;if(n.some(i))return!0;if(s?.options?.length){const t=C(s.options,e.valueKey),l=h=>n.some(a=>e.getObject&&typeof a=="object"&&a!==null?a[e.valueKey]===h:(typeof a=="object"&&a!==null?a[e.valueKey]:a)===h),r=t.some(l);if(t.length>0&&t.every(l))return!0;if(r)return null}return!1}else return e.getObject&&typeof n=="object"&&n!==null?n[e.valueKey]===o:n===o}function N({option:n,depth:o=0}){const e=w.useContext(I),s=n[e.valueKey],i=n[e.labelKey],c=e.expandedNodes.has(s),t=!!(n.options&&n.options.length>0),l=Q(e.selectedValue,s,e,n);return p.jsxRuntimeExports.jsxs("div",{className:f.treeOption,style:{paddingLeft:o*16},children:[p.jsxRuntimeExports.jsxs("div",{className:_.clsx(f.nodeRow,l===!0&&f.selected,e.multiple&&f.multiple,(e.disabled||n.disabled)&&f.disabled),onClick:()=>{!e.disabled&&!n.disabled&&e.onSelect(n,!l)},children:[t&&p.jsxRuntimeExports.jsx(m.Icon,{name:"keyboard_arrow_right",className:_.clsx(f.expandIcon,c&&f.expandIconOpen),onClick:r=>{r.stopPropagation(),e.onToggleExpand(s)}}),e.multiple&&p.jsxRuntimeExports.jsx(M.Checkbox,{value:l,onChange:()=>{},disabled:e.disabled||n.disabled,allowIndeterminate:!0}),n.icon&&p.jsxRuntimeExports.jsx(m.Icon,{name:n.icon,className:f.nodeIcon}),p.jsxRuntimeExports.jsx("span",{className:_.clsx(f.nodeLabel),children:i})]}),c&&t&&n.options.map(r=>p.jsxRuntimeExports.jsx(N,{option:r,depth:o+1},r[e.valueKey]))]})}function U({value:n,defaultValue:o,onChange:e,options:s,labelKey:i="label",valueKey:c="value",getObject:t=!1,multiple:l=!1,disabled:r=!1,className:b}){const[h,a]=T.useControllable({value:n,defaultValue:o??(l?[]:void 0),onChange:e}),[g,O]=w.useState(new Set),L=u=>{O(j=>{const x=new Set(j);return x.has(u)?x.delete(u):x.add(u),x})},k=(u,j)=>{if(l){const x=E(u,j,h??[],c,t);a(x)}else{const x=t?u:u[c];a(x)}};return p.jsxRuntimeExports.jsx(I.Provider,{value:{selectedValue:h,onSelect:k,expandedNodes:g,onToggleExpand:L,labelKey:i,valueKey:c,getObject:t,multiple:l,disabled:r},children:p.jsxRuntimeExports.jsx("div",{className:_.clsx(f.tree,b),children:s.map(u=>p.jsxRuntimeExports.jsx(N,{option:u},u[c]))})})}exports.Tree=U;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";function y(t){const n=parseInt(t.slice(1,3),16),e=parseInt(t.slice(3,5),16),s=parseInt(t.slice(5,7),16),r=parseInt(t.slice(7,9),16)/255;return{r:n,g:e,b:s,a:r}}function g(t,n,e,s){let r,a,o,i,d;t=t/60,e<=.5?a=e*(n+1):a=e+n-e*n,r=e*2-a;function c(l,h,f){return f<0&&(f+=6),f>=6&&(f-=6),f<1?(h-l)*f+l:f<3?h:f<4?(h-l)*(4-f)+l:l}return o=c(r,a,t+2)*255,i=c(r,a,t)*255,d=c(r,a,t-2)*255,{r:o,g:i,b:d,a:s}}function $(t,n,e,s){let r,a,o=[],i;for(a=g(t,1,.5,1),o[0]=a.r/255,o[1]=a.g/255,o[2]=a.b/255,i=n+e,i>1&&(n=Number((n/i).toFixed(2)),e=Number((e/i).toFixed(2))),r=0;r<3;r++)o[r]*=1-n-e,o[r]+=n,o[r]=Number(o[r]*255);return{r:o[0],g:o[1],b:o[2],a:s}}function M(t,n,e,s){t=(t%360+360)%360,n=Math.max(0,Math.min(n,100))/100,e=Math.max(0,Math.min(e,100))/100;const r=e*n,a=r*(1-Math.abs(t/60%2-1)),o=e-r;let i,d,c;return t>=0&&t<60?(i=r,d=a,c=0):t>=60&&t<120?(i=a,d=r,c=0):t>=120&&t<180?(i=0,d=r,c=a):t>=180&&t<240?(i=0,d=a,c=r):t>=240&&t<300?(i=a,d=0,c=r):(i=r,d=0,c=a),i=Math.round((i+o)*255),d=Math.round((d+o)*255),c=Math.round((c+o)*255),{r:i,g:d,b:c,a:s}}function x(t,n,e,s){const r=Math.round(s*255).toString(16).padStart(2,"0");return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}${r}`}function A(t,n,e,s){t/=255,n/=255,e/=255;const r=Math.max(t,n,e),a=Math.min(t,n,e),o=r-a;let i=0,d=0,c=(r+a)/2;if(o!==0){switch(d=c>.5?o/(2-r-a):o/(r+a),r){case t:i=(n-e)/o+(n<e?6:0);break;case n:i=(e-t)/o+2;break;case e:i=(t-n)/o+4;break}i*=60}return{h:i<0?i+360:i,s:`${(d*100).toFixed(0)}%`,l:`${(c*100).toFixed(0)}%`,a:s}}function D(t,n,e,s){const r=Math.max(t,n,e),a=Math.min(t,n,e);if(r===a)return{h:0,w:(100*a/255).toFixed(0)+"%",b:(100-100*r/255).toFixed(0)+"%",a:s};let o=0;switch(r){case t:o=(n-e)/(r-a)+0;break;case n:o=(e-t)/(r-a)+2;break;case e:o=(t-n)/(r-a)+4;break}return{h:(360*((o+6)%6/6)).toFixed(0),w:(100*a/255).toFixed(0)+"%",b:(100-100*r/255).toFixed(0)+"%",a:s}}function T(t,n,e,s){let r,a,o,i,d,c,l=0,h,f,p,m,u;return r=t/255,a=n/255,o=e/255,f=Math.max(r,a,o),p=f-Math.min(r,a,o),m=b=>(f-b)/6/p+1/2,u=b=>Math.round(b*100)/100,p==0?l=h=0:(h=p/f,i=m(r),d=m(a),c=m(o),r===f?l=c-d:a===f?l=1/3+i-c:o===f&&(l=2/3+d-i),l<0?l+=1:l>1&&(l-=1)),{h:Math.round(l*360),s:`${u(h*100).toFixed(0)}%`,v:`${u(f*100).toFixed(0)}%`,a:s}}function k(t){return t==null||t===""}function S(t){return typeof t=="object"&&t!==null}function w(t,n,e,s=!1){const r=t?.toISOString().substr(0,10),a=n?.toISOString().substr(0,10),o=e?.toISOString().substr(0,10);if(s)return a==o||r==o;const i=`
|
|
2
|
+
return (start < end && start < day && day < end) ||
|
|
3
|
+
(start > end && start > day && day > end)
|
|
4
|
+
`;return new Function("start","end","day",i)(r,a,o)}function F(t,n){let e=[];return n==="compare"?t?Array.isArray(t)&&!Array.isArray(t[0])?e=[[...t],[]]:e=[...t]:e=[[],[]]:t?Array.isArray(t)?Array.isArray(t)&&Array.isArray(t[0])?e=[...t[0]]:e=[...t]:e=[t]:e=[],e}function z(t){return t&&t.charAt(0).toUpperCase()+t.slice(1)}function R(t){const n=t.getFullYear(),e=t.getMonth(),s=new Date(n,e,1).getDay(),r=new Date(n,e+1,0).getDate(),a=[];let o=1;for(let i=0;i<6;i++){const d=[];for(let c=0;c<7;c++)if(i===0&&c<s||o>r)d.push("");else{const l=new Date(n,e,o);d.push(l),o++}a.push(d)}return a}function H(t="en-US"){const n=new Date("2021-01-03T23:15:30"),e=[];for(let s=0;s<12;s++){const r=n.toLocaleDateString(t,{month:"short"});e.push({label:r,value:s}),n.setMonth(n.getMonth()+1)}return e}function C(t,n,e,s={left:!0},r={},a={}){const o=t.clientX-n.clientWidth/2-e.getBoundingClientRect().left,i=e.clientWidth-(n.clientWidth-(typeof r.x=="number"?r.x:2)),d=Math.min(i,Math.max(a.x||0,s.left?o:i-o)),c=t.clientY-n.clientHeight/2-e.getBoundingClientRect().top,l=e.clientHeight-(n.clientHeight-(r.y||0)),h=Math.min(l,Math.max(a.y||0,s.top?c:l-c));return{x:d,y:h}}function I(t,n){switch(n){case"cpf":t=t.replace(/\D/g,""),t=t.slice(0,11),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d{1,2})$/,"$1-$2");break;case"cnpj":t=t.replace(/\D/g,""),t=t.slice(0,14),t=t.replace(/(\d{2})(\d)/,"$1.$2"),t=t.replace(/(\d{2})\.(\d{3})(\d)/,"$1.$2.$3"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3/$4"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})\/(\d{4})(\d)/,"$1.$2.$3/$4-$5");break;case"cep":t=t.replace(/\D/g,""),t=t.slice(0,8),t=t.replace(/(\d{5})(\d)/,"$1-$2");break}return t}function N(t){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t)}function P(t){return/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(t)}function V(t){return/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/.test(t)}function j(t,n=.3,e=[255,255,255]){const s=document.createElement("div");s.style.color=t,document.body.appendChild(s);const r=getComputedStyle(s).color;document.body.removeChild(s);const a=r.match(/\d+/g);if(!a)return"";const o=a.map(Number),i=Math.round(o[0]*n+e[0]*(1-n)),d=Math.round(o[1]*n+e[1]*(1-n)),c=Math.round(o[2]*n+e[2]*(1-n));return`rgb(${i}, ${d}, ${c})`}function O(t){const n=window.location.pathname.replace(/\/$/,"").split("/"),e=t.replace(/\/+$/,"").split("/");for(let s=0;s<e.length;s++)if(n[s]!==e[s])return!1;return n.length===e.length}exports.applyMask=I;exports.blendColors=j;exports.capitalizeFirstLetter=z;exports.checkDateType=F;exports.checkPath=O;exports.getArrayMonthDay=R;exports.getMonths=H;exports.getPosition=C;exports.hexaToRgba=y;exports.hslaToRgba=g;exports.hsvaToRgba=M;exports.hwbToRgba=$;exports.isNilAndBlank=k;exports.isObject=S;exports.isRange=w;exports.isValidDomain=P;exports.isValidEmail=N;exports.isValidUrl=V;exports.rgbaToHexa=x;exports.rgbaToHsla=A;exports.rgbaToHsva=T;exports.rgbaToHwb=D;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-content:""}}}._connector_1gync_2{display:inline-flex}._vert_1gync_2{flex-direction:column}._hor_1gync_2{align-items:flex-end}._connector_1gync_2:not(._vert_1gync_2){align-items:center}._connector_1gync_2:not(._vert_1gync_2)>:not(:last-child){margin-right:var(--spacing-base);position:relative}._connector_1gync_2:not(._vert_1gync_2)>:not(:last-child):after{top:50%;right:calc(var(--spacing-base)*-1);height:1px;width:var(--spacing-base);--tw-translate-y: -50% ;translate:var(--tw-translate-x)var(--tw-translate-y);background-color:var(--neutral-interaction-disabled);--tw-content:"";content:var(--tw-content);position:absolute}._connector_1gync_2:not(._vert_1gync_2)>*{z-index:10;position:relative}._connector_1gync_2._vert_1gync_2>:not(:last-child){margin-bottom:var(--spacing-base);position:relative}._connector_1gync_2._vert_1gync_2>:not(:last-child):after{bottom:calc(var(--spacing-base)*-1);height:var(--spacing-base);--tw-translate-x: -50% ;width:1px;translate:var(--tw-translate-x)var(--tw-translate-y);background-color:var(--neutral-interaction-disabled);--tw-content:"";content:var(--tw-content);position:absolute;left:50%}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-content{syntax:"*";inherits:false;initial-value:""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial}}}._avatar_qygx1_2{border-radius:var(--border-radius-full);background-color:var(--primary-surface-default);justify-content:center;align-items:center;width:fit-content;height:fit-content;display:flex;position:relative;overflow:hidden}._avatarImg_qygx1_2{inset:calc(var(--spacing,.25rem)*0);z-index:1;object-fit:cover;width:100%;height:100%;position:absolute}._avatarInitials_qygx1_2{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold);color:var(--primary-interaction-default)}._small_qygx1_2{padding:var(--spacing-xs)}._smallInitials_qygx1_2{font-size:var(--font-size-xxs)}._medium_qygx1_2{padding:var(--spacing-sm)}._mediumInitials_qygx1_2{font-size:var(--font-size-xs);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1/.75)))}._large_qygx1_2{padding:var(--spacing-base)}._largeInitials_qygx1_2{font-size:var(--font-size-sm);line-height:var(--tw-leading,var(--text-sm--line-height,calc(1.25/.875)))}@property --tw-font-weight{syntax:"*";inherits:false}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
function g(t){const n=parseInt(t.slice(1,3),16),e=parseInt(t.slice(3,5),16),i=parseInt(t.slice(5,7),16),r=parseInt(t.slice(7,9),16)/255;return{r:n,g:e,b:i,a:r}}function $(t,n,e,i){let r,o,s,a,d;t=t/60,e<=.5?o=e*(n+1):o=e+n-e*n,r=e*2-o;function c(f,p,l){return l<0&&(l+=6),l>=6&&(l-=6),l<1?(p-f)*l+f:l<3?p:l<4?(p-f)*(4-l)+f:f}return s=c(r,o,t+2)*255,a=c(r,o,t)*255,d=c(r,o,t-2)*255,{r:s,g:a,b:d,a:i}}function y(t,n,e,i){let r,o,s=[],a;for(o=$(t,1,.5,1),s[0]=o.r/255,s[1]=o.g/255,s[2]=o.b/255,a=n+e,a>1&&(n=Number((n/a).toFixed(2)),e=Number((e/a).toFixed(2))),r=0;r<3;r++)s[r]*=1-n-e,s[r]+=n,s[r]=Number(s[r]*255);return{r:s[0],g:s[1],b:s[2],a:i}}function M(t,n,e,i){t=(t%360+360)%360,n=Math.max(0,Math.min(n,100))/100,e=Math.max(0,Math.min(e,100))/100;const r=e*n,o=r*(1-Math.abs(t/60%2-1)),s=e-r;let a,d,c;return t>=0&&t<60?(a=r,d=o,c=0):t>=60&&t<120?(a=o,d=r,c=0):t>=120&&t<180?(a=0,d=r,c=o):t>=180&&t<240?(a=0,d=o,c=r):t>=240&&t<300?(a=o,d=0,c=r):(a=r,d=0,c=o),a=Math.round((a+s)*255),d=Math.round((d+s)*255),c=Math.round((c+s)*255),{r:a,g:d,b:c,a:i}}function x(t,n,e,i){const r=Math.round(i*255).toString(16).padStart(2,"0");return`#${t.toString(16).padStart(2,"0")}${n.toString(16).padStart(2,"0")}${e.toString(16).padStart(2,"0")}${r}`}function A(t,n,e,i){t/=255,n/=255,e/=255;const r=Math.max(t,n,e),o=Math.min(t,n,e),s=r-o;let a=0,d=0,c=(r+o)/2;if(s!==0){switch(d=c>.5?s/(2-r-o):s/(r+o),r){case t:a=(n-e)/s+(n<e?6:0);break;case n:a=(e-t)/s+2;break;case e:a=(t-n)/s+4;break}a*=60}return{h:a<0?a+360:a,s:`${(d*100).toFixed(0)}%`,l:`${(c*100).toFixed(0)}%`,a:i}}function S(t,n,e,i){const r=Math.max(t,n,e),o=Math.min(t,n,e);if(r===o)return{h:0,w:(100*o/255).toFixed(0)+"%",b:(100-100*r/255).toFixed(0)+"%",a:i};let s=0;switch(r){case t:s=(n-e)/(r-o)+0;break;case n:s=(e-t)/(r-o)+2;break;case e:s=(t-n)/(r-o)+4;break}return{h:(360*((s+6)%6/6)).toFixed(0),w:(100*o/255).toFixed(0)+"%",b:(100-100*r/255).toFixed(0)+"%",a:i}}function D(t,n,e,i){let r,o,s,a,d,c,f=0,p,l,u,m,h;return r=t/255,o=n/255,s=e/255,l=Math.max(r,o,s),u=l-Math.min(r,o,s),m=b=>(l-b)/6/u+1/2,h=b=>Math.round(b*100)/100,u==0?f=p=0:(p=u/l,a=m(r),d=m(o),c=m(s),r===l?f=c-d:o===l?f=1/3+a-c:s===l&&(f=2/3+d-a),f<0?f+=1:f>1&&(f-=1)),{h:Math.round(f*360),s:`${h(p*100).toFixed(0)}%`,v:`${h(l*100).toFixed(0)}%`,a:i}}function k(t){return t==null||t===""}function w(t){return typeof t=="object"&&t!==null}function F(t,n,e,i=!1){const r=t?.toISOString().substr(0,10),o=n?.toISOString().substr(0,10),s=e?.toISOString().substr(0,10);if(i)return o==s||r==s;const a=`
|
|
2
|
+
return (start < end && start < day && day < end) ||
|
|
3
|
+
(start > end && start > day && day > end)
|
|
4
|
+
`;return new Function("start","end","day",a)(r,o,s)}function z(t,n){let e=[];return n==="compare"?t?Array.isArray(t)&&!Array.isArray(t[0])?e=[[...t],[]]:e=[...t]:e=[[],[]]:t?Array.isArray(t)?Array.isArray(t)&&Array.isArray(t[0])?e=[...t[0]]:e=[...t]:e=[t]:e=[],e}function T(t){return t&&t.charAt(0).toUpperCase()+t.slice(1)}function C(t){const n=t.getFullYear(),e=t.getMonth(),i=new Date(n,e,1).getDay(),r=new Date(n,e+1,0).getDate(),o=[];let s=1;for(let a=0;a<6;a++){const d=[];for(let c=0;c<7;c++)if(a===0&&c<i||s>r)d.push("");else{const f=new Date(n,e,s);d.push(f),s++}o.push(d)}return o}function R(t="en-US"){const n=new Date("2021-01-03T23:15:30"),e=[];for(let i=0;i<12;i++){const r=n.toLocaleDateString(t,{month:"short"});e.push({label:r,value:i}),n.setMonth(n.getMonth()+1)}return e}function H(t,n,e,i={left:!0},r={},o={}){const s=t.clientX-n.clientWidth/2-e.getBoundingClientRect().left,a=e.clientWidth-(n.clientWidth-(typeof r.x=="number"?r.x:2)),d=Math.min(a,Math.max(o.x||0,i.left?s:a-s)),c=t.clientY-n.clientHeight/2-e.getBoundingClientRect().top,f=e.clientHeight-(n.clientHeight-(r.y||0)),p=Math.min(f,Math.max(o.y||0,i.top?c:f-c));return{x:d,y:p}}function I(t,n){switch(n){case"cpf":t=t.replace(/\D/g,""),t=t.slice(0,11),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d)/,"$1.$2"),t=t.replace(/(\d{3})(\d{1,2})$/,"$1-$2");break;case"cnpj":t=t.replace(/\D/g,""),t=t.slice(0,14),t=t.replace(/(\d{2})(\d)/,"$1.$2"),t=t.replace(/(\d{2})\.(\d{3})(\d)/,"$1.$2.$3"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})(\d)/,"$1.$2.$3/$4"),t=t.replace(/(\d{2})\.(\d{3})\.(\d{3})\/(\d{4})(\d)/,"$1.$2.$3/$4-$5");break;case"cep":t=t.replace(/\D/g,""),t=t.slice(0,8),t=t.replace(/(\d{5})(\d)/,"$1-$2");break}return t}function j(t){return/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/.test(t)}function N(t){return/(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\.)+[a-z0-9][a-z0-9-]{0,61}[a-z0-9]/.test(t)}function Y(t){return/[(http(s)?):\/\/(www\.)?a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/.test(t)}function Z(t,n=.3,e=[255,255,255]){const i=document.createElement("div");i.style.color=t,document.body.appendChild(i);const r=getComputedStyle(i).color;document.body.removeChild(i);const o=r.match(/\d+/g);if(!o)return"";const s=o.map(Number),a=Math.round(s[0]*n+e[0]*(1-n)),d=Math.round(s[1]*n+e[1]*(1-n)),c=Math.round(s[2]*n+e[2]*(1-n));return`rgb(${a}, ${d}, ${c})`}function O(t){const n=window.location.pathname.replace(/\/$/,"").split("/"),e=t.replace(/\/+$/,"").split("/");for(let i=0;i<e.length;i++)if(n[i]!==e[i])return!1;return n.length===e.length}export{C as a,R as b,z as c,T as d,F as e,Z as f,H as g,M as h,w as i,g as j,$ as k,y as l,x as m,A as n,S as o,O as p,k as q,D as r,I as s,j as t,N as u,Y as v};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%}}}._skeleton_1tqah_2{min-height:var(--spacing-xs);min-width:var(--spacing-xs);background-color:var(--neutral-surface-disabled);--tw-gradient-position:to right in oklab;background-image:linear-gradient(var(--tw-gradient-stops));--tw-gradient-from:transparent;--tw-gradient-via:var(--color-white,#fff);--tw-gradient-via-stops:var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-via)var(--tw-gradient-via-position),var(--tw-gradient-to)var(--tw-gradient-to-position);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position),var(--tw-gradient-from)var(--tw-gradient-from-position),var(--tw-gradient-to)var(--tw-gradient-to-position));--tw-gradient-to:transparent;background-size:200% 100%;animation:1.5s linear infinite _moveBar_1tqah_1}@keyframes _moveBar_1tqah_1{0%{background-position:-100% 0}to{background-position:100% 0}}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"<color>";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"<length-percentage>";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"<length-percentage>";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"<length-percentage>";inherits:false;initial-value:100%}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._spinner_e0zgt_2{width:1.5em;height:1.5em;animation:2s linear infinite _rotate_e0zgt_1;display:inline-block}._path_e0zgt_2{stroke:currentColor;stroke-linecap:round;animation:1.5s ease-in-out infinite _dash_e0zgt_1}@keyframes _rotate_e0zgt_1{to{transform:rotate(360deg)}}@keyframes _dash_e0zgt_1{0%{stroke-dasharray:1 150;stroke-dashoffset:0}50%{stroke-dasharray:90 150;stroke-dashoffset:-35px}to{stroke-dasharray:90 150;stroke-dashoffset:-124px}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-font-weight:initial;--tw-border-style:solid}}}._separator_dbh0y_2{align-items:center;gap:var(--spacing-xs);--tw-font-weight:var(--font-weight-bold);width:100%;font-weight:var(--font-weight-bold);color:var(--neutral-foreground-high);display:flex}._separatorLine_dbh0y_2{border-top-style:var(--tw-border-style);border-top-width:var(--border-width-xxs);border-color:var(--neutral-border-default);flex:1}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var n={exports:{}},e={};var o;function E(){if(o)return e;o=1;var R=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(v,r,t){var u=null;if(t!==void 0&&(u=""+t),r.key!==void 0&&(u=""+r.key),"key"in r){t={};for(var s in r)s!=="key"&&(t[s]=r[s])}else t=r;return r=t.ref,{$$typeof:R,type:v,key:u,ref:r!==void 0?r:null,props:t}}return e.Fragment=a,e.jsx=i,e.jsxs=i,e}var x;function d(){return x||(x=1,n.exports=E()),n.exports}var l=d();exports.jsxRuntimeExports=l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var s={exports:{}},e={};var o;function d(){if(o)return e;o=1;var R=Symbol.for("react.transitional.element"),a=Symbol.for("react.fragment");function i(v,r,t){var u=null;if(t!==void 0&&(u=""+t),r.key!==void 0&&(u=""+r.key),"key"in r){t={};for(var n in r)n!=="key"&&(t[n]=r[n])}else t=r;return r=t.ref,{$$typeof:R,type:v,key:u,ref:r!==void 0?r:null,props:t}}return e.Fragment=a,e.jsx=i,e.jsxs=i,e}var x;function l(){return x||(x=1,s.exports=d()),s.exports}var p=l();export{p as j};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../assets/Accordion-BLDionAq.js");require("../../assets/jsx-runtime-BubrbI3X.js");require("react");require("../../assets/clsx-C11secjj.js");require("../../hooks/useControllable.cjs.js");require("../Icon/index.cjs.js");exports.Accordion=e.Accordion;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"
|
|
1
|
+
import{A}from"../../assets/Accordion-CgoVX19v.js";import"../../assets/jsx-runtime-u17CrQMm.js";import"react";import"../../assets/clsx-B-dksMZM.js";import"../../hooks/useControllable.es.js";import"../Icon/index.es.js";export{A as Accordion};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../assets/ActionCard-BWmyJT_9.js");require("../../assets/jsx-runtime-BubrbI3X.js");require("react");require("../../assets/clsx-C11secjj.js");require("../Card/index.cjs.js");require("../Icon/index.cjs.js");exports.ActionCard=e.ActionCard;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"
|
|
1
|
+
import{A}from"../../assets/ActionCard-Dnm8wc-V.js";import"../../assets/jsx-runtime-u17CrQMm.js";import"react";import"../../assets/clsx-B-dksMZM.js";import"../Card/index.es.js";import"../Icon/index.es.js";export{A as ActionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../assets/Alert-VaDDaJmV.js");require("../../assets/jsx-runtime-BubrbI3X.js");require("react");require("../../assets/clsx-C11secjj.js");require("../Icon/index.cjs.js");exports.Alert=e.Alert;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"
|
|
1
|
+
import{A as e}from"../../assets/Alert-D-09BScY.js";import"../../assets/jsx-runtime-u17CrQMm.js";import"react";import"../../assets/clsx-B-dksMZM.js";import"../Icon/index.es.js";export{e as Alert};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../../assets/AutoComplete-C0EjtIQ-.js");require("../../assets/jsx-runtime-BubrbI3X.js");require("react");require("../../assets/clsx-C11secjj.js");require("../../hooks/useControllable.cjs.js");require("../../assets/SelectContainer-HFSZpyH5.js");require("../../assets/ExpandableContainer-BRU7oRQZ.js");require("../../assets/Label-DhQPcDeH.js");require("../../assets/Tooltip-DVq7Ij0P.js");require("react-dom");require("../../hooks/useTransition.cjs.js");require("../Icon/index.cjs.js");require("../../assets/FloatCard-CpyZ6Sv2.js");require("../Card/index.cjs.js");require("../../assets/Option-B-lvFxi7.js");require("../../assets/Input-C0RH5m66.js");require("../../assets/ColorPicker-C8kkPONG.js");require("../../assets/index-B4fH-h2h.js");exports.AutoComplete=e.AutoComplete;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"
|
|
1
|
+
import{A as h}from"../../assets/AutoComplete-0HbU6b9V.js";import"../../assets/jsx-runtime-u17CrQMm.js";import"react";import"../../assets/clsx-B-dksMZM.js";import"../../hooks/useControllable.es.js";import"../../assets/SelectContainer-BRSv1LpP.js";import"../../assets/ExpandableContainer-T1N4IU4P.js";import"../../assets/Label-AiZCfFq1.js";import"../../assets/Tooltip-chSVIpvZ.js";import"react-dom";import"../../hooks/useTransition.es.js";import"../Icon/index.es.js";import"../../assets/FloatCard-hzT_yVsi.js";import"../Card/index.es.js";import"../../assets/Option-C3L7jFYC.js";import"../../assets/Input-DZ17y4L_.js";import"../../assets/ColorPicker-BsrGOt2x.js";import"../../assets/index-C-RplXeX.js";export{h as AutoComplete};
|