@soroush.tech/design-system 2.0.0-rc.1 → 2.0.0-rc.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/README.md +30 -10
- package/dist/AppBar.d.cts +1 -3
- package/dist/AppBar.d.mts +1 -3
- package/dist/Avatar.cjs +1 -1
- package/dist/Avatar.d.cts +1 -3
- package/dist/Avatar.d.mts +1 -3
- package/dist/Avatar.mjs +1 -1
- package/dist/Backdrop.d.cts +1 -1
- package/dist/Backdrop.d.mts +1 -1
- package/dist/Breadcrumbs.cjs +132 -0
- package/dist/Breadcrumbs.d.cts +40 -0
- package/dist/Breadcrumbs.d.mts +40 -0
- package/dist/Breadcrumbs.mjs +131 -0
- package/dist/Button.cjs +1 -1
- package/dist/Button.d.cts +1 -1
- package/dist/Button.d.mts +1 -1
- package/dist/Button.mjs +1 -1
- package/dist/ButtonGroup.d.cts +1 -1
- package/dist/ButtonGroup.d.mts +1 -1
- package/dist/Card.cjs +3 -3
- package/dist/Card.d.cts +4 -3
- package/dist/Card.d.mts +4 -3
- package/dist/Card.mjs +3 -3
- package/dist/Checkbox.d.cts +1 -2
- package/dist/Checkbox.d.mts +1 -2
- package/dist/CircularProgress.d.cts +2 -3
- package/dist/CircularProgress.d.mts +2 -3
- package/dist/Drawer.d.cts +3 -2
- package/dist/Drawer.d.mts +3 -2
- package/dist/Flex.d.cts +1 -1
- package/dist/Flex.d.mts +1 -1
- package/dist/Form.d.cts +1 -1
- package/dist/Form.d.mts +1 -1
- package/dist/FormControl.cjs +10 -2
- package/dist/FormControl.d.cts +9 -2
- package/dist/FormControl.d.mts +9 -2
- package/dist/FormControl.mjs +10 -2
- package/dist/FormHelperText.d.cts +1 -1
- package/dist/FormHelperText.d.mts +1 -1
- package/dist/FormLabel.cjs +9 -1
- package/dist/FormLabel.d.cts +2 -2
- package/dist/FormLabel.d.mts +2 -2
- package/dist/FormLabel.mjs +10 -2
- package/dist/Grid.d.cts +1 -3
- package/dist/Grid.d.mts +1 -3
- package/dist/{Icon-CH3asUJu.mjs → Icon-BihOAP4u.mjs} +52 -2
- package/dist/{Icon-CI6q2Eyi.cjs → Icon-D-EWsBVg.cjs} +52 -2
- package/dist/Icon.cjs +1 -1
- package/dist/Icon.d.cts +1 -1
- package/dist/Icon.d.mts +1 -1
- package/dist/Icon.mjs +1 -1
- package/dist/Image.d.cts +1 -2
- package/dist/Image.d.mts +1 -2
- package/dist/InputRange.cjs +675 -0
- package/dist/InputRange.d.cts +79 -0
- package/dist/InputRange.d.mts +79 -0
- package/dist/InputRange.mjs +673 -0
- package/dist/LinearProgress.d.cts +2 -3
- package/dist/LinearProgress.d.mts +2 -3
- package/dist/Link.cjs +1 -1
- package/dist/Link.d.cts +1 -1
- package/dist/Link.d.mts +1 -1
- package/dist/Link.mjs +1 -1
- package/dist/Menu/ContextMenu.cjs +146 -0
- package/dist/Menu/ContextMenu.d.cts +52 -0
- package/dist/Menu/ContextMenu.d.mts +52 -0
- package/dist/Menu/ContextMenu.mjs +145 -0
- package/dist/Menu/Menu.cjs +3 -0
- package/dist/Menu/Menu.d.cts +2 -0
- package/dist/Menu/Menu.d.mts +2 -0
- package/dist/Menu/Menu.mjs +2 -0
- package/dist/Menu/MenuDivider.cjs +29 -0
- package/dist/Menu/MenuDivider.d.cts +12 -0
- package/dist/Menu/MenuDivider.d.mts +12 -0
- package/dist/Menu/MenuDivider.mjs +28 -0
- package/dist/Menu/MenuItems.cjs +29 -0
- package/dist/Menu/MenuItems.d.cts +2 -0
- package/dist/Menu/MenuItems.d.mts +2 -0
- package/dist/Menu/MenuItems.mjs +28 -0
- package/dist/Menu/MenuList.cjs +3 -0
- package/dist/Menu/MenuList.d.cts +38 -0
- package/dist/Menu/MenuList.d.mts +38 -0
- package/dist/Menu/MenuList.mjs +2 -0
- package/dist/Menu-Cgg-sX4W.cjs +173 -0
- package/dist/Menu-CrzHc_cn.mjs +168 -0
- package/dist/Menu.cjs +13 -0
- package/dist/Menu.d.cts +7 -0
- package/dist/Menu.d.mts +7 -0
- package/dist/Menu.mjs +6 -0
- package/dist/MenuItem-BTP7Ijwi.cjs +673 -0
- package/dist/MenuItem-DUn4IZKK.mjs +649 -0
- package/dist/MenuItem.cjs +2 -148
- package/dist/MenuItem.d.cts +2 -52
- package/dist/MenuItem.d.mts +2 -52
- package/dist/MenuItem.mjs +1 -147
- package/dist/MenuList-B7msJ1IG.mjs +187 -0
- package/dist/MenuList-D4imLXAa.cjs +223 -0
- package/dist/MenuListContext-DKUOhNyw.d.cts +21 -0
- package/dist/MenuListContext-x-7lH4CH.d.mts +21 -0
- package/dist/Modal.d.cts +1 -1
- package/dist/Modal.d.mts +1 -1
- package/dist/NativeSelect.cjs +9 -8
- package/dist/NativeSelect.d.cts +3 -4
- package/dist/NativeSelect.d.mts +3 -4
- package/dist/NativeSelect.mjs +9 -8
- package/dist/NumberField.cjs +476 -0
- package/dist/NumberField.d.cts +74 -0
- package/dist/NumberField.d.mts +74 -0
- package/dist/NumberField.mjs +474 -0
- package/dist/Pagination/PaginationItem.cjs +1 -1
- package/dist/Pagination/PaginationItem.d.cts +1 -1
- package/dist/Pagination/PaginationItem.d.mts +1 -1
- package/dist/Pagination/PaginationItem.mjs +1 -1
- package/dist/Pagination.d.cts +2 -2
- package/dist/Pagination.d.mts +2 -2
- package/dist/Paper.cjs +1 -1
- package/dist/Paper.d.cts +2 -1
- package/dist/Paper.d.mts +2 -1
- package/dist/Paper.mjs +1 -1
- package/dist/{Popover-TpwRSORC.cjs → Popover-CiZfgiKE.cjs} +5 -125
- package/dist/Popover-QjM5Z1CR.mjs +133 -0
- package/dist/Popover.cjs +1 -1
- package/dist/Popover.d.cts +6 -7
- package/dist/Popover.d.mts +6 -7
- package/dist/Popover.mjs +1 -1
- package/dist/Pressable.cjs +1 -1
- package/dist/Pressable.d.cts +1 -1
- package/dist/Pressable.d.mts +1 -1
- package/dist/Pressable.mjs +1 -1
- package/dist/Quote.d.cts +2 -3
- package/dist/Quote.d.mts +2 -3
- package/dist/Radio.d.cts +1 -2
- package/dist/Radio.d.mts +1 -2
- package/dist/Rating.cjs +373 -0
- package/dist/Rating.d.cts +57 -0
- package/dist/Rating.d.mts +57 -0
- package/dist/Rating.mjs +371 -0
- package/dist/Select.cjs +5 -4
- package/dist/Select.d.cts +3 -4
- package/dist/Select.d.mts +3 -4
- package/dist/Select.mjs +7 -6
- package/dist/Sidebar/Sidebar.d.cts +1 -1
- package/dist/Sidebar/Sidebar.d.mts +1 -1
- package/dist/Sidebar/SidebarItem.cjs +1 -1
- package/dist/Sidebar/SidebarItem.d.cts +3 -4
- package/dist/Sidebar/SidebarItem.d.mts +3 -4
- package/dist/Sidebar/SidebarItem.mjs +3 -3
- package/dist/Skeleton.d.cts +1 -2
- package/dist/Skeleton.d.mts +1 -2
- package/dist/Switch.cjs +23 -16
- package/dist/Switch.d.cts +2 -3
- package/dist/Switch.d.mts +2 -3
- package/dist/Switch.mjs +25 -18
- package/dist/Table/Table.d.cts +2 -3
- package/dist/Table/Table.d.mts +2 -3
- package/dist/Table/TableBody.d.cts +1 -2
- package/dist/Table/TableBody.d.mts +1 -2
- package/dist/Table/TableCell.d.cts +1 -1
- package/dist/Table/TableCell.d.mts +1 -1
- package/dist/Table/TableContainer.d.cts +1 -3
- package/dist/Table/TableContainer.d.mts +1 -3
- package/dist/Table/TableControl.d.cts +1 -1
- package/dist/Table/TableControl.d.mts +1 -1
- package/dist/Table/TableControl.mjs +2 -2
- package/dist/Table/TableFooter.d.cts +1 -2
- package/dist/Table/TableFooter.d.mts +1 -2
- package/dist/Table/TableHead.d.cts +1 -2
- package/dist/Table/TableHead.d.mts +1 -2
- package/dist/Table/TablePagination.d.cts +2 -2
- package/dist/Table/TablePagination.d.mts +2 -2
- package/dist/Table/TablePaginationActions.cjs +1 -1
- package/dist/Table/TablePaginationActions.d.cts +1 -1
- package/dist/Table/TablePaginationActions.d.mts +1 -1
- package/dist/Table/TablePaginationActions.mjs +1 -1
- package/dist/Table/TableRow.d.cts +1 -2
- package/dist/Table/TableRow.d.mts +1 -2
- package/dist/Table/TableSortLabel.cjs +1 -1
- package/dist/Table/TableSortLabel.d.cts +1 -1
- package/dist/Table/TableSortLabel.d.mts +1 -1
- package/dist/Table/TableSortLabel.mjs +1 -1
- package/dist/Table/hooks.d.cts +1 -1
- package/dist/Table/hooks.d.mts +1 -1
- package/dist/Table.d.cts +5 -5
- package/dist/Table.d.mts +5 -5
- package/dist/{TableContext-BeCxbtHH.d.cts → TableContext-DhuRf6Wy.d.mts} +1 -1
- package/dist/{TableContext-BiRiYkVZ.d.mts → TableContext-Duj1nVG7.d.cts} +1 -1
- package/dist/Tabs/Tab.cjs +306 -0
- package/dist/Tabs/Tab.d.cts +62 -0
- package/dist/Tabs/Tab.d.mts +62 -0
- package/dist/Tabs/Tab.mjs +305 -0
- package/dist/Tabs/TabContext.cjs +34 -0
- package/dist/Tabs/TabContext.d.cts +20 -0
- package/dist/Tabs/TabContext.d.mts +20 -0
- package/dist/Tabs/TabContext.mjs +33 -0
- package/dist/Tabs/TabList.cjs +31 -0
- package/dist/Tabs/TabList.d.cts +11 -0
- package/dist/Tabs/TabList.d.mts +11 -0
- package/dist/Tabs/TabList.mjs +30 -0
- package/dist/Tabs/TabPanel.cjs +40 -0
- package/dist/Tabs/TabPanel.d.cts +27 -0
- package/dist/Tabs/TabPanel.d.mts +27 -0
- package/dist/Tabs/TabPanel.mjs +38 -0
- package/dist/Tabs/TabScrollButton.cjs +93 -0
- package/dist/Tabs/TabScrollButton.d.cts +2 -0
- package/dist/Tabs/TabScrollButton.d.mts +2 -0
- package/dist/Tabs/TabScrollButton.mjs +91 -0
- package/dist/Tabs/Tabs.cjs +3 -0
- package/dist/Tabs/Tabs.d.cts +3 -0
- package/dist/Tabs/Tabs.d.mts +3 -0
- package/dist/Tabs/Tabs.mjs +2 -0
- package/dist/Tabs-BTNOJx5v.mjs +634 -0
- package/dist/Tabs-D4tWCq78.cjs +646 -0
- package/dist/Tabs.cjs +13 -0
- package/dist/Tabs.d.cts +8 -0
- package/dist/Tabs.d.mts +8 -0
- package/dist/Tabs.mjs +7 -0
- package/dist/TabsContext-B_XHbjcS.d.cts +6 -0
- package/dist/TabsContext-Dn2kqUwr.d.mts +6 -0
- package/dist/TabsValueContext-D40zGCpE.cjs +19 -0
- package/dist/TabsValueContext-DvL3inf7.mjs +8 -0
- package/dist/TextInput.cjs +4 -4
- package/dist/TextInput.d.cts +2 -3
- package/dist/TextInput.d.mts +2 -3
- package/dist/TextInput.mjs +4 -4
- package/dist/ToggleButton/ToggleButton.cjs +1 -1
- package/dist/ToggleButton/ToggleButton.d.cts +1 -1
- package/dist/ToggleButton/ToggleButton.d.mts +1 -1
- package/dist/ToggleButton/ToggleButton.mjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.cjs +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.cts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.d.mts +1 -1
- package/dist/ToggleButton/ToggleButtonGroup.mjs +1 -1
- package/dist/TransferList.cjs +356 -0
- package/dist/TransferList.d.cts +67 -0
- package/dist/TransferList.d.mts +67 -0
- package/dist/TransferList.mjs +354 -0
- package/dist/Typography.cjs +1 -1
- package/dist/Typography.d.cts +2 -2
- package/dist/Typography.d.mts +2 -2
- package/dist/Typography.mjs +1 -1
- package/dist/View.d.cts +1 -1
- package/dist/View.d.mts +1 -1
- package/dist/catalog.cjs +4568 -0
- package/dist/catalog.d.cts +90 -0
- package/dist/catalog.d.mts +90 -0
- package/dist/catalog.mjs +4567 -0
- package/dist/computePopoverPosition-BIprs_xo.mjs +123 -0
- package/dist/computePopoverPosition-DiyEOHnU.cjs +128 -0
- package/dist/dividerLine-BNljcGlv.cjs +66 -0
- package/dist/dividerLine-FahY-M6_.mjs +31 -0
- package/dist/engine.d.cts +1 -1
- package/dist/engine.d.mts +1 -1
- package/dist/index-B1RFybA_.d.mts +72 -0
- package/dist/index-B4TeaB7b.d.cts +72 -0
- package/dist/{index-BUoVTCqX.d.mts → index-BGbTuHP9.d.mts} +1 -2
- package/dist/{index-Celm-8iN.d.cts → index-BHKgEOZJ.d.cts} +2 -3
- package/dist/{index-Chg6pSrr.d.mts → index-BQWjh4rK.d.mts} +2 -3
- package/dist/{index-B78VkB0-.d.cts → index-BelFIizY.d.cts} +2 -3
- package/dist/index-BkzZxHVj.d.mts +35 -0
- package/dist/{index-DbEnSf2m.d.cts → index-BrgwkY6z.d.mts} +3 -4
- package/dist/{index-Wnv6jCR3.d.mts → index-Bx0-6yeX.d.mts} +1 -2
- package/dist/index-BxVTIMnB.d.cts +1 -0
- package/dist/{index-BfZuh9c2.d.mts → index-ByYxVl9O.d.mts} +2 -3
- package/dist/index-CE5JG1us.d.mts +34 -0
- package/dist/{index-BhibLnZ0.d.cts → index-CG_1uPrD.d.mts} +2 -3
- package/dist/{themes-RX2UX5gD.d.mts → index-CJhK7JND.d.mts} +265 -8
- package/dist/{index-BB-dLv5V.d.mts → index-CQfJZADG.d.cts} +3 -4
- package/dist/{index-CxUsrlg1.d.cts → index-CUz2h5xY.d.mts} +2 -3
- package/dist/{index-Bid71KeF.d.cts → index-CbFaWtjK.d.mts} +2 -2
- package/dist/{index-DdqdSOct.d.cts → index-ChXeKJCk.d.cts} +1 -2
- package/dist/index-CknoXDLQ.d.cts +35 -0
- package/dist/{index-BSqet8aO.d.cts → index-ClZyaZrR.d.mts} +2 -3
- package/dist/{index-DXvQ-JVZ.d.mts → index-DAwcmIjN.d.cts} +2 -3
- package/dist/index-DGnXJwLj.d.mts +72 -0
- package/dist/{themes-Kbk9h5cN.d.cts → index-DJ0f69wh.d.cts} +262 -5
- package/dist/index-DWjz5ZzG.d.cts +72 -0
- package/dist/{index-DNwF3DUX.d.cts → index-DYF8sRE-.d.cts} +2 -3
- package/dist/index-DaIIo5QU.d.mts +1 -0
- package/dist/{index-CrN4MSUF.d.cts → index-DchHf5cF.d.cts} +1 -1
- package/dist/{index-S-ClM6WM.d.mts → index-DtYjdBvO.d.cts} +2 -2
- package/dist/{index-Ctqajtac.d.cts → index-Dv_fk1_F.d.cts} +27 -3
- package/dist/{index-smqjMLAZ.d.mts → index-K5exjvnX.d.cts} +2 -3
- package/dist/index-KnXhlKMr.d.cts +34 -0
- package/dist/index-WHFhjfgy.d.cts +98 -0
- package/dist/{index-GpnmW6vu.d.mts → index-YKrfFC_I.d.cts} +2 -3
- package/dist/index-bpnLB_4K.d.mts +98 -0
- package/dist/{index-VOsBSWEu.d.mts → index-h4dYtVrp.d.mts} +1 -1
- package/dist/{index-DO9J-Fla.d.mts → index-ha1WjSZ5.d.mts} +27 -3
- package/dist/{index-Belxmt1X.d.cts → index-nqUA_6J_.d.cts} +1 -2
- package/dist/{index-nc4Sxiy9.d.mts → index-pTNq3iQn.d.mts} +2 -3
- package/dist/index.d.cts +1 -2
- package/dist/index.d.mts +1 -2
- package/dist/isRtl-BJDtm86G.mjs +7 -0
- package/dist/isRtl-DTkYHRPo.cjs +12 -0
- package/dist/precision-B1lhxnnO.mjs +25 -0
- package/dist/precision-B58cTPB2.cjs +48 -0
- package/dist/style.cjs +1 -1
- package/dist/style.d.cts +2 -2
- package/dist/style.d.mts +2 -2
- package/dist/style.mjs +1 -1
- package/dist/surfaceSystem-BGQBoXv_.cjs +38 -0
- package/dist/surfaceSystem-D8TbmKy3.mjs +21 -0
- package/dist/theme-BxXuXRgQ.cjs +137 -0
- package/dist/theme-Z9_QludW.mjs +102 -0
- package/dist/theme.cjs +25 -24
- package/dist/theme.d.cts +3 -3
- package/dist/theme.d.mts +3 -3
- package/dist/theme.mjs +2 -1
- package/dist/{theme-CDVxig_g.mjs → themes-L-dE7_ck.mjs} +10 -110
- package/dist/{theme-BXlAP3xf.cjs → themes-gd6tcmqS.cjs} +0 -136
- package/dist/useControlled-C666KpQ0.cjs +18 -0
- package/dist/useControlled-CBRLsO-H.mjs +13 -0
- package/dist/{useTablePagination-COTiNH_8.d.mts → useTablePagination-C-u3ru4N.d.cts} +1 -1
- package/dist/{useTablePagination-WFkaUZu8.d.cts → useTablePagination-D-39ZmQh.d.mts} +1 -1
- package/package.json +83 -2
- package/dist/Popover-DwnSLpp1.mjs +0 -253
- package/dist/index-B_dKjEDR.d.mts +0 -23
- package/dist/index-C1WqEDtQ.d.mts +0 -69
- package/dist/index-CA7HnbtH.d.cts +0 -21
- package/dist/index-CKZaErxJ.d.mts +0 -21
- package/dist/index-DBUwu65Z.d.cts +0 -69
- package/dist/index-DzQJSYIh.d.cts +0 -23
- package/dist/index-cuv3o-L7.d.mts +0 -34
- package/dist/index-nB94D7UM.d.cts +0 -34
|
@@ -0,0 +1,474 @@
|
|
|
1
|
+
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "./src-DLGYOJMh.mjs";
|
|
2
|
+
import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
|
|
3
|
+
import { clamp } from "./utils.mjs";
|
|
4
|
+
import { n as useDefaultProps, r as useTheme } from "./theme-Z9_QludW.mjs";
|
|
5
|
+
import { t as Icon } from "./Icon-BihOAP4u.mjs";
|
|
6
|
+
import { t as FormControlContext } from "./FormControlContext-CC2kToms.mjs";
|
|
7
|
+
import { useFormControl } from "./FormControl.mjs";
|
|
8
|
+
import { t as useControlled } from "./useControlled-CBRLsO-H.mjs";
|
|
9
|
+
import { i as snapToStep, n as getDecimalPrecision, t as addExact } from "./precision-B1lhxnnO.mjs";
|
|
10
|
+
import { t as inputVariantStyles } from "./inputVariantStyles-CcqpGfuP.mjs";
|
|
11
|
+
import { useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
12
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
13
|
+
//#region src/NumberField/hooks/useHoldRepeat.ts
|
|
14
|
+
/**
|
|
15
|
+
* Runs `action` at once on a press, then again and again while it is held - after a pause, so a
|
|
16
|
+
* tap is one step. `start` begins it, `stop` ends it, and it ends by itself when the component
|
|
17
|
+
* goes.
|
|
18
|
+
*/
|
|
19
|
+
function useHoldRepeat(action, { delay = 400, interval = 60 } = {}) {
|
|
20
|
+
const actionRef = useRef(action);
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
actionRef.current = action;
|
|
23
|
+
});
|
|
24
|
+
const timers = useRef({});
|
|
25
|
+
const stop = useCallback(() => {
|
|
26
|
+
window.clearTimeout(timers.current.pause);
|
|
27
|
+
window.clearInterval(timers.current.repeat);
|
|
28
|
+
timers.current = {};
|
|
29
|
+
}, []);
|
|
30
|
+
const start = useCallback(() => {
|
|
31
|
+
stop();
|
|
32
|
+
actionRef.current();
|
|
33
|
+
timers.current.pause = window.setTimeout(() => {
|
|
34
|
+
timers.current.repeat = window.setInterval(() => actionRef.current(), interval);
|
|
35
|
+
}, delay);
|
|
36
|
+
}, [
|
|
37
|
+
stop,
|
|
38
|
+
delay,
|
|
39
|
+
interval
|
|
40
|
+
]);
|
|
41
|
+
useEffect(() => stop, [stop]);
|
|
42
|
+
return {
|
|
43
|
+
start,
|
|
44
|
+
stop
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
//#region src/NumberField/utils/number.ts
|
|
49
|
+
/** What a number is shown as unless told otherwise: all its digits, ungrouped, so typing round-trips. */
|
|
50
|
+
const DEFAULT_FORMAT = {
|
|
51
|
+
useGrouping: false,
|
|
52
|
+
maximumFractionDigits: 20
|
|
53
|
+
};
|
|
54
|
+
/** The syntax a locale and format write a number in. */
|
|
55
|
+
function getNumberSyntax(locale, format) {
|
|
56
|
+
const probe = new Intl.NumberFormat(locale, {
|
|
57
|
+
useGrouping: false,
|
|
58
|
+
minimumFractionDigits: 1,
|
|
59
|
+
maximumFractionDigits: 1
|
|
60
|
+
});
|
|
61
|
+
const digitFormat = new Intl.NumberFormat(locale, { useGrouping: false });
|
|
62
|
+
return {
|
|
63
|
+
decimal: probe.formatToParts(1.1).find((part) => part.type === "decimal").value,
|
|
64
|
+
digits: Array.from({ length: 10 }, (_, digit) => digitFormat.format(digit)),
|
|
65
|
+
isPercent: format?.style === "percent"
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** The number as its locale and format write it. */
|
|
69
|
+
function formatNumber(value, locale, format) {
|
|
70
|
+
return new Intl.NumberFormat(locale, {
|
|
71
|
+
...DEFAULT_FORMAT,
|
|
72
|
+
...format
|
|
73
|
+
}).format(value);
|
|
74
|
+
}
|
|
75
|
+
const MINUS = new RegExp(`[${[
|
|
76
|
+
8722,
|
|
77
|
+
8210,
|
|
78
|
+
8211,
|
|
79
|
+
8212
|
|
80
|
+
].map((code) => String.fromCodePoint(code)).join("")}]`, "g");
|
|
81
|
+
/**
|
|
82
|
+
* The number a text stands for - `null` when it stands for none: its locale's digits and decimal
|
|
83
|
+
* mark, a leading minus, a percent's `%` (so `50%` is `0.5`). Group marks, spaces and symbols
|
|
84
|
+
* round it are ignored.
|
|
85
|
+
*/
|
|
86
|
+
function parseNumber(text, syntax) {
|
|
87
|
+
let normalized = text.replace(MINUS, "-");
|
|
88
|
+
syntax.digits.forEach((digit, index) => {
|
|
89
|
+
normalized = normalized.split(digit).join(String(index));
|
|
90
|
+
});
|
|
91
|
+
const isNegative = normalized.includes("-");
|
|
92
|
+
const [whole = "", ...fraction] = normalized.split(syntax.decimal);
|
|
93
|
+
const digits = (text) => text.replaceAll(/\D/g, "");
|
|
94
|
+
const wholeDigits = digits(whole);
|
|
95
|
+
const fractionDigits = fraction.map(digits).join("");
|
|
96
|
+
if (wholeDigits === "" && fractionDigits === "") return null;
|
|
97
|
+
const parsed = Number(`${wholeDigits || "0"}.${fractionDigits || "0"}`);
|
|
98
|
+
const signed = isNegative ? -parsed : parsed;
|
|
99
|
+
return syntax.isPercent ? Number((signed / 100).toFixed(getDecimalPrecision(parsed) + 2)) : signed;
|
|
100
|
+
}
|
|
101
|
+
//#endregion
|
|
102
|
+
//#region src/NumberField/hooks/useNumberField.ts
|
|
103
|
+
const clampTo = (value, min, max) => clamp(value, min ?? Number.NEGATIVE_INFINITY, max ?? Number.POSITIVE_INFINITY);
|
|
104
|
+
/**
|
|
105
|
+
* A number field's state: the number (controlled or not), the text the user is typing - which
|
|
106
|
+
* is theirs until it is committed on blur or Enter - and the steps by key and by button. A
|
|
107
|
+
* number typed is told at once; one outside the range is clamped when it is committed.
|
|
108
|
+
*/
|
|
109
|
+
function useNumberField({ value: valueProp, defaultValue, onChange, onChangeCommitted, min, max, step, smallStep, largeStep, format, locale, shouldSnapOnStep, isFrozen }) {
|
|
110
|
+
const [value, setValue] = useControlled({
|
|
111
|
+
controlled: valueProp,
|
|
112
|
+
default: defaultValue ?? null
|
|
113
|
+
});
|
|
114
|
+
const [draft, setDraft] = useState(null);
|
|
115
|
+
const syntax = useMemo(() => getNumberSyntax(locale, format), [locale, format]);
|
|
116
|
+
const text = draft ?? (value === null ? "" : formatNumber(value, locale, format));
|
|
117
|
+
const update = (next) => {
|
|
118
|
+
if (next === value) return;
|
|
119
|
+
setValue(next);
|
|
120
|
+
onChange?.(next);
|
|
121
|
+
};
|
|
122
|
+
const handleChange = (event) => {
|
|
123
|
+
const typed = event.currentTarget.value;
|
|
124
|
+
setDraft(typed);
|
|
125
|
+
if (typed.trim() === "") return update(null);
|
|
126
|
+
const parsed = parseNumber(typed, syntax);
|
|
127
|
+
if (parsed !== null) update(parsed);
|
|
128
|
+
};
|
|
129
|
+
const settle = () => {
|
|
130
|
+
if (draft === null) return value;
|
|
131
|
+
if (draft.trim() === "") return null;
|
|
132
|
+
const parsed = parseNumber(draft, syntax);
|
|
133
|
+
return parsed === null ? value : clampTo(parsed, min, max);
|
|
134
|
+
};
|
|
135
|
+
const commit = (next) => {
|
|
136
|
+
setDraft(null);
|
|
137
|
+
update(next);
|
|
138
|
+
onChangeCommitted?.(next);
|
|
139
|
+
};
|
|
140
|
+
const handleBlur = () => {
|
|
141
|
+
if (draft !== null) commit(settle());
|
|
142
|
+
};
|
|
143
|
+
const stepBy = (direction, size = step) => {
|
|
144
|
+
if (isFrozen) return;
|
|
145
|
+
const base = settle() ?? 0;
|
|
146
|
+
let next = addExact(base, direction * size);
|
|
147
|
+
if (shouldSnapOnStep) next = snapToStep(next, step, min ?? 0);
|
|
148
|
+
commit(clampTo(next, min, max));
|
|
149
|
+
};
|
|
150
|
+
const handleKeyDown = (event) => {
|
|
151
|
+
if (isFrozen) return;
|
|
152
|
+
const { key, altKey, shiftKey } = event;
|
|
153
|
+
if (key === "Enter") return commit(settle());
|
|
154
|
+
if (key === "ArrowUp" || key === "ArrowDown") {
|
|
155
|
+
event.preventDefault();
|
|
156
|
+
let size = step;
|
|
157
|
+
if (altKey) size = smallStep;
|
|
158
|
+
if (shiftKey) size = largeStep;
|
|
159
|
+
return stepBy(key === "ArrowUp" ? 1 : -1, size);
|
|
160
|
+
}
|
|
161
|
+
const edge = key === "Home" ? min : max;
|
|
162
|
+
if ((key === "Home" || key === "End") && edge !== void 0) {
|
|
163
|
+
event.preventDefault();
|
|
164
|
+
commit(edge);
|
|
165
|
+
}
|
|
166
|
+
};
|
|
167
|
+
return {
|
|
168
|
+
text,
|
|
169
|
+
value,
|
|
170
|
+
canIncrement: !isFrozen && (max === void 0 || (value ?? Number.NEGATIVE_INFINITY) < max),
|
|
171
|
+
canDecrement: !isFrozen && (min === void 0 || (value ?? Number.POSITIVE_INFINITY) > min),
|
|
172
|
+
handleChange,
|
|
173
|
+
handleBlur,
|
|
174
|
+
handleKeyDown,
|
|
175
|
+
stepBy
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
//#endregion
|
|
179
|
+
//#region src/NumberField/hooks/useWheelStep.ts
|
|
180
|
+
/**
|
|
181
|
+
* Steps a focused field by the mouse wheel - up for a wheel up. A native listener, since the
|
|
182
|
+
* page must not scroll as it turns, and a React one can't prevent that.
|
|
183
|
+
*/
|
|
184
|
+
function useWheelStep(ref, isEnabled, onStep) {
|
|
185
|
+
const stepRef = useRef(onStep);
|
|
186
|
+
useEffect(() => {
|
|
187
|
+
stepRef.current = onStep;
|
|
188
|
+
});
|
|
189
|
+
useEffect(() => {
|
|
190
|
+
const element = ref.current;
|
|
191
|
+
if (!isEnabled || !element) return void 0;
|
|
192
|
+
const handleWheel = (event) => {
|
|
193
|
+
if (element.ownerDocument.activeElement !== element) return;
|
|
194
|
+
event.preventDefault();
|
|
195
|
+
stepRef.current(event.deltaY < 0 ? 1 : -1);
|
|
196
|
+
};
|
|
197
|
+
element.addEventListener("wheel", handleWheel, { passive: false });
|
|
198
|
+
return () => element.removeEventListener("wheel", handleWheel);
|
|
199
|
+
}, [ref, isEnabled]);
|
|
200
|
+
}
|
|
201
|
+
//#endregion
|
|
202
|
+
//#region src/NumberField/NumberField.tsx
|
|
203
|
+
const widthStyles = (0, src_exports.system)({
|
|
204
|
+
width: true,
|
|
205
|
+
minWidth: true,
|
|
206
|
+
maxWidth: true
|
|
207
|
+
});
|
|
208
|
+
const frameStyle = ({ theme, color, textColor, isError, isDisabled, isFullWidth, isInField }) => {
|
|
209
|
+
const main = (0, src_exports.get)(theme, `palette.${color}.main`);
|
|
210
|
+
const border = isError ? (0, src_exports.get)(theme, "palette.error.main") : (0, src_exports.get)(theme, `palette.${color}.light`);
|
|
211
|
+
const focusBorder = isError ? (0, src_exports.get)(theme, "palette.error.main") : main;
|
|
212
|
+
return {
|
|
213
|
+
display: isFullWidth || isInField ? "flex" : "inline-flex",
|
|
214
|
+
...isFullWidth && { width: "100%" },
|
|
215
|
+
...isInField && !isFullWidth && { width: "fit-content" },
|
|
216
|
+
alignItems: "stretch",
|
|
217
|
+
transition: "border-color 0.15s ease",
|
|
218
|
+
backgroundColor: (0, src_exports.get)(theme, `background.${themeDefault(theme, "inputBg", "terminal")}`),
|
|
219
|
+
color: textColor ? (0, src_exports.get)(theme, `text.${textColor}`) : (0, src_exports.get)(theme, `palette.${color}.main`),
|
|
220
|
+
fontFamily: (0, src_exports.get)(theme, "fonts.body"),
|
|
221
|
+
lineHeight: (0, src_exports.get)(theme, "lineHeights.base"),
|
|
222
|
+
borderColor: border,
|
|
223
|
+
"&:focus-within": { borderColor: focusBorder },
|
|
224
|
+
"&:has(input:focus-visible)": {
|
|
225
|
+
outline: `2px solid ${main}`,
|
|
226
|
+
outlineOffset: "2px"
|
|
227
|
+
},
|
|
228
|
+
...isDisabled && {
|
|
229
|
+
opacity: .5,
|
|
230
|
+
cursor: "not-allowed",
|
|
231
|
+
pointerEvents: "none"
|
|
232
|
+
}
|
|
233
|
+
};
|
|
234
|
+
};
|
|
235
|
+
const NumberFieldRoot = styled("div", {
|
|
236
|
+
name: "NumberField",
|
|
237
|
+
label: "NumberField",
|
|
238
|
+
shouldForwardProp: createShouldForwardProp([
|
|
239
|
+
...props,
|
|
240
|
+
"color",
|
|
241
|
+
"textColor",
|
|
242
|
+
"variant",
|
|
243
|
+
"isError",
|
|
244
|
+
"isDisabled",
|
|
245
|
+
"isFullWidth",
|
|
246
|
+
"isInField"
|
|
247
|
+
]),
|
|
248
|
+
systemProps: [src_exports.space, widthStyles]
|
|
249
|
+
})(inputVariantStyles, frameStyle);
|
|
250
|
+
const NumberFieldInput = styled("input", {
|
|
251
|
+
name: "NumberField",
|
|
252
|
+
slot: "input",
|
|
253
|
+
label: "NumberFieldInput",
|
|
254
|
+
shouldForwardProp: createShouldForwardProp(["sizeToken", "isCentered"])
|
|
255
|
+
})(({ theme, sizeToken, isCentered }) => {
|
|
256
|
+
const s = theme.sizes[sizeToken];
|
|
257
|
+
return {
|
|
258
|
+
flex: 1,
|
|
259
|
+
minWidth: 0,
|
|
260
|
+
width: "100%",
|
|
261
|
+
border: "none",
|
|
262
|
+
outline: "none",
|
|
263
|
+
background: "transparent",
|
|
264
|
+
color: "inherit",
|
|
265
|
+
fontFamily: "inherit",
|
|
266
|
+
lineHeight: "inherit",
|
|
267
|
+
textAlign: isCentered ? "center" : "start",
|
|
268
|
+
paddingTop: theme.space[s.paddingTop],
|
|
269
|
+
paddingBottom: theme.space[s.paddingBottom],
|
|
270
|
+
paddingLeft: theme.space[s.paddingLeft],
|
|
271
|
+
paddingRight: theme.space[s.paddingRight],
|
|
272
|
+
fontSize: theme.fontSizes[s.fontSize],
|
|
273
|
+
"&::placeholder": {
|
|
274
|
+
color: "inherit",
|
|
275
|
+
opacity: .5
|
|
276
|
+
},
|
|
277
|
+
"&:disabled": { cursor: "not-allowed" }
|
|
278
|
+
};
|
|
279
|
+
});
|
|
280
|
+
const NumberFieldSpinButtons = styled("span", {
|
|
281
|
+
name: "NumberField",
|
|
282
|
+
slot: "spinButtons",
|
|
283
|
+
label: "NumberFieldSpinButtons"
|
|
284
|
+
})(({ theme }) => ({
|
|
285
|
+
display: "flex",
|
|
286
|
+
flexDirection: "column",
|
|
287
|
+
borderInlineStart: `${theme.borderWidths.thin} solid`,
|
|
288
|
+
borderColor: "inherit"
|
|
289
|
+
}));
|
|
290
|
+
const spinStyle = ({ theme, color, isSide }) => {
|
|
291
|
+
const main = (0, src_exports.get)(theme, `palette.${color}.main`);
|
|
292
|
+
return {
|
|
293
|
+
appearance: "none",
|
|
294
|
+
display: "grid",
|
|
295
|
+
placeItems: "center",
|
|
296
|
+
flex: isSide ? "0 0 auto" : 1,
|
|
297
|
+
minWidth: isSide ? theme.space[5] : theme.icon.lg,
|
|
298
|
+
padding: 0,
|
|
299
|
+
border: "none",
|
|
300
|
+
background: "transparent",
|
|
301
|
+
color: "inherit",
|
|
302
|
+
cursor: "pointer",
|
|
303
|
+
"&:hover:not(:disabled)": { backgroundColor: `${main}1F` },
|
|
304
|
+
"&:disabled": {
|
|
305
|
+
opacity: .4,
|
|
306
|
+
cursor: "default"
|
|
307
|
+
}
|
|
308
|
+
};
|
|
309
|
+
};
|
|
310
|
+
const spinProps = createShouldForwardProp(["color", "isSide"]);
|
|
311
|
+
const sideDivider = (edge) => {
|
|
312
|
+
return ({ theme, isSide }) => isSide ? {
|
|
313
|
+
[edge]: `${theme.borderWidths.thin} solid`,
|
|
314
|
+
borderColor: "inherit"
|
|
315
|
+
} : {};
|
|
316
|
+
};
|
|
317
|
+
const NumberFieldIncrement = styled("button", {
|
|
318
|
+
name: "NumberField",
|
|
319
|
+
slot: "increment",
|
|
320
|
+
label: "NumberFieldIncrement",
|
|
321
|
+
shouldForwardProp: spinProps
|
|
322
|
+
})(spinStyle, sideDivider("borderInlineStart"));
|
|
323
|
+
const NumberFieldDecrement = styled("button", {
|
|
324
|
+
name: "NumberField",
|
|
325
|
+
slot: "decrement",
|
|
326
|
+
label: "NumberFieldDecrement",
|
|
327
|
+
shouldForwardProp: spinProps
|
|
328
|
+
})(spinStyle, sideDivider("borderInlineEnd"));
|
|
329
|
+
const getSpinIcon = (direction, isSide) => {
|
|
330
|
+
if (isSide) return direction === 1 ? "add" : "remove";
|
|
331
|
+
return direction === 1 ? "expand_less" : "expand_more";
|
|
332
|
+
};
|
|
333
|
+
function SpinButton({ direction, label, isSide, isDisabled, color, onStep }) {
|
|
334
|
+
const hold = useHoldRepeat(() => onStep(direction));
|
|
335
|
+
const { stop } = hold;
|
|
336
|
+
useEffect(() => {
|
|
337
|
+
if (isDisabled) stop();
|
|
338
|
+
}, [isDisabled, stop]);
|
|
339
|
+
return /* @__PURE__ */ jsx(direction === 1 ? NumberFieldIncrement : NumberFieldDecrement, {
|
|
340
|
+
type: "button",
|
|
341
|
+
tabIndex: -1,
|
|
342
|
+
"aria-label": label,
|
|
343
|
+
disabled: isDisabled,
|
|
344
|
+
color,
|
|
345
|
+
isSide,
|
|
346
|
+
onMouseDown: (event) => event.preventDefault(),
|
|
347
|
+
onPointerDown: (event) => event.button === 0 && hold.start(),
|
|
348
|
+
onPointerUp: hold.stop,
|
|
349
|
+
onPointerLeave: hold.stop,
|
|
350
|
+
onPointerCancel: hold.stop,
|
|
351
|
+
onClick: (event) => event.detail === 0 && onStep(direction),
|
|
352
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
353
|
+
name: getSpinIcon(direction, isSide),
|
|
354
|
+
size: "sm",
|
|
355
|
+
color: "inherit"
|
|
356
|
+
})
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* @description A field for a number: a text input - so what is typed is the user's until it is
|
|
361
|
+
* settled - that reads and writes the number in its locale, clamps it to `min`/`max`, and steps
|
|
362
|
+
* by the arrow keys, Home/End, the wheel and buttons that repeat while held. A
|
|
363
|
+
* `role="spinbutton"`, so the number and its range are announced; a hidden input carries the raw
|
|
364
|
+
* number to a form. In a `FormControl` it takes the field's size, color, error, disabled and
|
|
365
|
+
* required state, and its `FormLabel` targets the field.
|
|
366
|
+
*/
|
|
367
|
+
function NumberField({ value, defaultValue, onChange, onChangeCommitted, min, max, step: stepProp, smallStep: smallStepProp, largeStep: largeStepProp, format, locale, shouldSnapOnStep: shouldSnapProp, shouldScrubOnWheel: shouldScrubProp, spinButtons: spinButtonsProp, incrementLabel: incrementLabelProp, decrementLabel: decrementLabelProp, variant: variantProp, size: sizeProp, color: colorProp, textColor: textColorProp, error: errorProp, disabled: disabledProp, readOnly = false, required: requiredProp, fullWidth: fullWidthProp, name, id: idProp, placeholder, autoFocus, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, "aria-describedby": ariaDescribedby, "data-testid": dataTestid, ...rest }) {
|
|
368
|
+
const theme = useTheme();
|
|
369
|
+
const dp = useDefaultProps("NumberField");
|
|
370
|
+
const isInField = useContext(FormControlContext) !== null;
|
|
371
|
+
const fc = useFormControl({
|
|
372
|
+
id: idProp,
|
|
373
|
+
error: errorProp,
|
|
374
|
+
disabled: disabledProp,
|
|
375
|
+
required: requiredProp,
|
|
376
|
+
size: sizeProp ?? dp.size,
|
|
377
|
+
fullWidth: fullWidthProp,
|
|
378
|
+
color: colorProp ?? dp.color,
|
|
379
|
+
textColor: textColorProp
|
|
380
|
+
});
|
|
381
|
+
const color = fc.color ?? themeDefault(theme, "color", "primary");
|
|
382
|
+
const textColor = fc.textColor;
|
|
383
|
+
const variant = variantProp ?? dp.variant ?? themeDefault(theme, "inputVariant", "default");
|
|
384
|
+
const spinButtons = spinButtonsProp ?? dp.spinButtons ?? "stacked";
|
|
385
|
+
const step = stepProp ?? dp.step ?? 1;
|
|
386
|
+
const isFrozen = fc.disabled || readOnly;
|
|
387
|
+
const field = useNumberField({
|
|
388
|
+
value,
|
|
389
|
+
defaultValue,
|
|
390
|
+
onChange,
|
|
391
|
+
onChangeCommitted,
|
|
392
|
+
min,
|
|
393
|
+
max,
|
|
394
|
+
step,
|
|
395
|
+
smallStep: smallStepProp ?? dp.smallStep ?? .1,
|
|
396
|
+
largeStep: largeStepProp ?? dp.largeStep ?? 10,
|
|
397
|
+
format,
|
|
398
|
+
locale,
|
|
399
|
+
shouldSnapOnStep: shouldSnapProp ?? dp.shouldSnapOnStep ?? false,
|
|
400
|
+
isFrozen
|
|
401
|
+
});
|
|
402
|
+
const inputRef = useRef(null);
|
|
403
|
+
useWheelStep(inputRef, shouldScrubProp ?? dp.shouldScrubOnWheel ?? false, field.stepBy);
|
|
404
|
+
const isSide = spinButtons === "sides";
|
|
405
|
+
const buttonProps = {
|
|
406
|
+
isSide,
|
|
407
|
+
color,
|
|
408
|
+
onStep: field.stepBy
|
|
409
|
+
};
|
|
410
|
+
const decrement = /* @__PURE__ */ jsx(SpinButton, {
|
|
411
|
+
direction: -1,
|
|
412
|
+
label: decrementLabelProp ?? dp.decrementLabel,
|
|
413
|
+
isDisabled: !field.canDecrement,
|
|
414
|
+
...buttonProps
|
|
415
|
+
});
|
|
416
|
+
const increment = /* @__PURE__ */ jsx(SpinButton, {
|
|
417
|
+
direction: 1,
|
|
418
|
+
label: incrementLabelProp ?? dp.incrementLabel,
|
|
419
|
+
isDisabled: !field.canIncrement,
|
|
420
|
+
...buttonProps
|
|
421
|
+
});
|
|
422
|
+
const inputMode = (min ?? -1) >= 0 && Number.isInteger(step) ? "numeric" : "decimal";
|
|
423
|
+
return /* @__PURE__ */ jsxs(NumberFieldRoot, {
|
|
424
|
+
color,
|
|
425
|
+
textColor,
|
|
426
|
+
variant,
|
|
427
|
+
isError: fc.error,
|
|
428
|
+
isDisabled: fc.disabled,
|
|
429
|
+
isFullWidth: fc.fullWidth,
|
|
430
|
+
isInField,
|
|
431
|
+
className,
|
|
432
|
+
"data-testid": dataTestid,
|
|
433
|
+
...rest,
|
|
434
|
+
children: [
|
|
435
|
+
isSide && decrement,
|
|
436
|
+
/* @__PURE__ */ jsx(NumberFieldInput, {
|
|
437
|
+
ref: inputRef,
|
|
438
|
+
type: "text",
|
|
439
|
+
role: "spinbutton",
|
|
440
|
+
inputMode,
|
|
441
|
+
autoComplete: "off",
|
|
442
|
+
id: fc.id,
|
|
443
|
+
value: field.text,
|
|
444
|
+
placeholder,
|
|
445
|
+
autoFocus,
|
|
446
|
+
disabled: fc.disabled,
|
|
447
|
+
readOnly,
|
|
448
|
+
required: fc.required,
|
|
449
|
+
sizeToken: fc.size,
|
|
450
|
+
isCentered: isSide,
|
|
451
|
+
"aria-valuenow": field.value ?? void 0,
|
|
452
|
+
"aria-valuemin": min,
|
|
453
|
+
"aria-valuemax": max,
|
|
454
|
+
"aria-label": ariaLabel,
|
|
455
|
+
"aria-labelledby": ariaLabelledby,
|
|
456
|
+
"aria-describedby": ariaDescribedby ?? fc["aria-describedby"],
|
|
457
|
+
"aria-invalid": fc.error || void 0,
|
|
458
|
+
onChange: field.handleChange,
|
|
459
|
+
onBlur: field.handleBlur,
|
|
460
|
+
onKeyDown: field.handleKeyDown
|
|
461
|
+
}),
|
|
462
|
+
name !== void 0 && /* @__PURE__ */ jsx("input", {
|
|
463
|
+
type: "hidden",
|
|
464
|
+
name,
|
|
465
|
+
value: field.value ?? "",
|
|
466
|
+
disabled: fc.disabled
|
|
467
|
+
}),
|
|
468
|
+
spinButtons === "stacked" && /* @__PURE__ */ jsxs(NumberFieldSpinButtons, { children: [increment, decrement] }),
|
|
469
|
+
isSide && increment
|
|
470
|
+
]
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
//#endregion
|
|
474
|
+
export { NumberField };
|
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_src = require("../src-DU81aGy9.cjs");
|
|
3
3
|
const require_themeDefault = require("../themeDefault-Cebi08Cv.cjs");
|
|
4
4
|
const require_utils = require("../utils.cjs");
|
|
5
|
-
const require_Icon = require("../Icon-
|
|
5
|
+
const require_Icon = require("../Icon-D-EWsBVg.cjs");
|
|
6
6
|
require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
let _soroush_tech_styled_system_should_forward_prop = require("@soroush.tech/styled-system/should-forward-prop");
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PaginationItemSize, i as PaginationItemShape, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, t as PaginationItem } from "../index-
|
|
1
|
+
import { a as PaginationItemSize, i as PaginationItemShape, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, t as PaginationItem } from "../index-ChXeKJCk.cjs";
|
|
2
2
|
export { PaginationItem, PaginationItemColor, PaginationItemProps, PaginationItemShape, PaginationItemSize, PaginationItemVariant };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as PaginationItemSize, i as PaginationItemShape, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, t as PaginationItem } from "../index-
|
|
1
|
+
import { a as PaginationItemSize, i as PaginationItemShape, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, t as PaginationItem } from "../index-BGbTuHP9.mjs";
|
|
2
2
|
export { PaginationItem, PaginationItemColor, PaginationItemProps, PaginationItemShape, PaginationItemSize, PaginationItemVariant };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as src_exports, i as props, o as styled, t as createShouldForwardProp } from "../src-DLGYOJMh.mjs";
|
|
2
2
|
import { t as themeDefault } from "../themeDefault-Z3KmyIbm.mjs";
|
|
3
3
|
import { alpha } from "../utils.mjs";
|
|
4
|
-
import { t as Icon } from "../Icon-
|
|
4
|
+
import { t as Icon } from "../Icon-BihOAP4u.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/Pagination/PaginationItem/PaginationItem.tsx
|
package/dist/Pagination.d.cts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as PaginationItemSize, c as UsePaginationItem, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, s as PaginationItemType, t as PaginationItem, u as usePagination } from "./index-
|
|
2
|
-
import { a as PaginationSize, i as PaginationShape, n as PaginationColor, o as PaginationVariant, r as PaginationProps, t as Pagination } from "./index-
|
|
1
|
+
import { a as PaginationItemSize, c as UsePaginationItem, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, s as PaginationItemType, t as PaginationItem, u as usePagination } from "./index-ChXeKJCk.cjs";
|
|
2
|
+
import { a as PaginationSize, i as PaginationShape, n as PaginationColor, o as PaginationVariant, r as PaginationProps, t as Pagination } from "./index-BHKgEOZJ.cjs";
|
|
3
3
|
export { Pagination, PaginationColor, PaginationItem, PaginationItemColor, PaginationItemProps, PaginationItemShape, PaginationItemSize, PaginationItemType, PaginationItemVariant, PaginationProps, PaginationShape, PaginationSize, PaginationVariant, UsePaginationItem, UsePaginationProps, usePagination };
|
package/dist/Pagination.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { a as PaginationItemSize, c as UsePaginationItem, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, s as PaginationItemType, t as PaginationItem, u as usePagination } from "./index-
|
|
2
|
-
import { a as PaginationSize, i as PaginationShape, n as PaginationColor, o as PaginationVariant, r as PaginationProps, t as Pagination } from "./index-
|
|
1
|
+
import { a as PaginationItemSize, c as UsePaginationItem, i as PaginationItemShape, l as UsePaginationProps, n as PaginationItemColor, o as PaginationItemVariant, r as PaginationItemProps, s as PaginationItemType, t as PaginationItem, u as usePagination } from "./index-BGbTuHP9.mjs";
|
|
2
|
+
import { a as PaginationSize, i as PaginationShape, n as PaginationColor, o as PaginationVariant, r as PaginationProps, t as Pagination } from "./index-BQWjh4rK.mjs";
|
|
3
3
|
export { Pagination, PaginationColor, PaginationItem, PaginationItemColor, PaginationItemProps, PaginationItemShape, PaginationItemSize, PaginationItemType, PaginationItemVariant, PaginationProps, PaginationShape, PaginationSize, PaginationVariant, UsePaginationItem, UsePaginationProps, usePagination };
|
package/dist/Paper.cjs
CHANGED
|
@@ -2,7 +2,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
|
2
2
|
const require_src = require("./src-DU81aGy9.cjs");
|
|
3
3
|
const require_Flex = require("./Flex.cjs");
|
|
4
4
|
const require_themeDefault = require("./themeDefault-Cebi08Cv.cjs");
|
|
5
|
-
const require_theme = require("./theme-
|
|
5
|
+
const require_theme = require("./theme-BxXuXRgQ.cjs");
|
|
6
6
|
require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
//#region src/Paper/Paper.tsx
|
package/dist/Paper.d.cts
CHANGED
package/dist/Paper.d.mts
CHANGED
package/dist/Paper.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as src_exports, o as styled, t as createShouldForwardProp } from "./src-DLGYOJMh.mjs";
|
|
2
2
|
import { Flex } from "./Flex.mjs";
|
|
3
3
|
import { t as themeDefault } from "./themeDefault-Z3KmyIbm.mjs";
|
|
4
|
-
import { r as useTheme } from "./theme-
|
|
4
|
+
import { r as useTheme } from "./theme-Z9_QludW.mjs";
|
|
5
5
|
import "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/Paper/Paper.tsx
|