@janbox/storefront-ui 2.0.4 → 2.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib/accordion/accordion-group/accordion-group.d.ts +1 -1
- package/dist/lib/accordion/accordion-group/accordion-group.d.ts.map +1 -1
- package/dist/lib/accordion/accordion-group/accordion-group.js +3 -3
- package/dist/lib/count-up/count-up.d.ts +1 -1
- package/dist/lib/count-up/count-up.d.ts.map +1 -1
- package/dist/lib/count-up/count-up.js +25 -27
- package/dist/lib/floating/floating-content/floating-content.d.ts +1 -1
- package/dist/lib/floating/floating-content/floating-content.d.ts.map +1 -1
- package/dist/lib/floating/floating-content/floating-content.js +40 -35
- package/dist/lib/image/image.d.ts +1 -1
- package/dist/lib/image/image.d.ts.map +1 -1
- package/dist/lib/image/image.js +3 -3
- package/dist/lib/image/types.d.ts.map +1 -1
- package/dist/lib/input/input.d.ts +1 -1
- package/dist/lib/input/input.d.ts.map +1 -1
- package/dist/lib/input/input.js +3 -3
- package/dist/lib/menu/menu-item/menu-item.d.ts +2 -1
- package/dist/lib/menu/menu-item/menu-item.d.ts.map +1 -1
- package/dist/lib/menu/menu-item/menu-item.js +2 -3
- package/dist/lib/multiple-select/multiple-select.d.ts.map +1 -1
- package/dist/lib/multiple-select/multiple-select.js +1 -1
- package/dist/lib/nav-link/nav-link.d.ts +2 -3
- package/dist/lib/nav-link/nav-link.d.ts.map +1 -1
- package/dist/lib/nav-link/nav-link.js +30 -33
- package/dist/lib/nav-link/types.d.ts +2 -0
- package/dist/lib/nav-link/types.d.ts.map +1 -1
- package/dist/lib/radio-button/radio-button.d.ts +1 -1
- package/dist/lib/radio-button/radio-button.d.ts.map +1 -1
- package/dist/lib/radio-button/radio-button.js +2 -3
- package/dist/lib/select/select.d.ts.map +1 -1
- package/dist/lib/select/select.js +14 -2
- package/dist/lib/select/types.d.ts +1 -0
- package/dist/lib/select/types.d.ts.map +1 -1
- package/dist/lib/tabs/tab-content/tab-content.d.ts +2 -3
- package/dist/lib/tabs/tab-content/tab-content.d.ts.map +1 -1
- package/dist/lib/tabs/tab-content/tab-content.js +2 -4
- package/dist/lib/time-picker/time-picker.d.ts.map +1 -1
- package/dist/lib/time-picker/time-picker.js +1 -1
- package/dist/lib/unordered-list/list-item/list-item.d.ts +1 -1
- package/dist/lib/unordered-list/list-item/list-item.d.ts.map +1 -1
- package/dist/lib/unordered-list/list-item/list-item.js +2 -3
- package/dist/lib/unordered-list/unordered-list/unordered-list.d.ts +1 -1
- package/dist/lib/unordered-list/unordered-list/unordered-list.d.ts.map +1 -1
- package/dist/lib/unordered-list/unordered-list/unordered-list.js +2 -3
- package/dist/utils/index.d.ts +2 -2
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AccordionGroupProps } from './types';
|
|
2
|
-
export declare const AccordionGroup:
|
|
2
|
+
export declare const AccordionGroup: ({ ref, ..._props }: AccordionGroupProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=accordion-group.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"accordion-group.d.ts","sourceRoot":"","sources":["../../../../src/lib/accordion/accordion-group/accordion-group.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA4D,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAIxG,eAAO,MAAM,cAAc,
|
|
1
|
+
{"version":3,"file":"accordion-group.d.ts","sourceRoot":"","sources":["../../../../src/lib/accordion/accordion-group/accordion-group.tsx"],"names":[],"mappings":"AAMA,OAAO,EAA4D,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAIxG,eAAO,MAAM,cAAc,uBAAwB,mBAAmB,qDA2CrE,CAAC"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRef, useMemo } from "react";
|
|
3
3
|
import { useMergeRefs } from "@floating-ui/react";
|
|
4
4
|
import { getAccordionGroupProps, AccordionGroupContext } from "./helpers.js";
|
|
5
5
|
import { AccordionGroupDataAttributes } from "./types.js";
|
|
6
6
|
import { createSxInterpolation } from "../../../utils/stylesheet.js";
|
|
7
|
-
const AccordionGroup =
|
|
7
|
+
const AccordionGroup = ({ ref, ..._props }) => {
|
|
8
8
|
const {
|
|
9
9
|
children,
|
|
10
10
|
sx,
|
|
@@ -41,7 +41,7 @@ const AccordionGroup = forwardRef((_props, ref) => {
|
|
|
41
41
|
children
|
|
42
42
|
}
|
|
43
43
|
) });
|
|
44
|
-
}
|
|
44
|
+
};
|
|
45
45
|
export {
|
|
46
46
|
AccordionGroup
|
|
47
47
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CountUpProps } from './types';
|
|
2
|
-
export declare const CountUp:
|
|
2
|
+
export declare const CountUp: ({ from, to, duration, formatNumberOptions, ref, ...props }: CountUpProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=count-up.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"count-up.d.ts","sourceRoot":"","sources":["../../../src/lib/count-up/count-up.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,eAAO,MAAM,OAAO,
|
|
1
|
+
{"version":3,"file":"count-up.d.ts","sourceRoot":"","sources":["../../../src/lib/count-up/count-up.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,eAAO,MAAM,OAAO,+DAAwE,YAAY,qDAiCvG,CAAC"}
|
|
@@ -1,36 +1,34 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRef, useEffect } from "react";
|
|
3
3
|
import { useMergeRefs } from "@floating-ui/react";
|
|
4
4
|
import { useMotionValue, useInView, useTransform, animate, motion } from "motion/react";
|
|
5
5
|
import { useTranslation } from "react-i18next";
|
|
6
6
|
import { formatNumber } from "../../utils/index.js";
|
|
7
7
|
import { getDecimalDigits } from "../../utils/common.js";
|
|
8
|
-
const CountUp =
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
);
|
|
8
|
+
const CountUp = ({ from = 0, to, duration = 2, formatNumberOptions, ref, ...props }) => {
|
|
9
|
+
const rootRef = useRef(null);
|
|
10
|
+
const { i18n } = useTranslation();
|
|
11
|
+
const mergedRef = useMergeRefs([ref, rootRef]);
|
|
12
|
+
const maximumFractionDigits = Math.max(getDecimalDigits(from), getDecimalDigits(to));
|
|
13
|
+
const count = useMotionValue(from);
|
|
14
|
+
const isInView = useInView(rootRef, { once: true });
|
|
15
|
+
const rounded = useTransform(
|
|
16
|
+
count,
|
|
17
|
+
(latest) => formatNumber(latest, {
|
|
18
|
+
lng: i18n.language,
|
|
19
|
+
...formatNumberOptions,
|
|
20
|
+
maximumFractionDigits
|
|
21
|
+
})
|
|
22
|
+
);
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
if (!isInView) return;
|
|
25
|
+
const controls = animate(count, to, { duration });
|
|
26
|
+
return () => {
|
|
27
|
+
controls.stop();
|
|
28
|
+
};
|
|
29
|
+
}, [count, duration, isInView, to]);
|
|
30
|
+
return /* @__PURE__ */ jsx(motion.span, { ...props, ref: mergedRef, children: rounded });
|
|
31
|
+
};
|
|
34
32
|
export {
|
|
35
33
|
CountUp
|
|
36
34
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { FloatingContentProps } from './types';
|
|
2
|
-
export declare const FloatingContent:
|
|
2
|
+
export declare const FloatingContent: ({ style, floatingPortalProps, floatingFocusManagerProps, floatingOverlayProps, sx, ref, ...props }: FloatingContentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=floating-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"floating-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/floating/floating-content/floating-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"floating-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/floating/floating-content/floating-content.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAQ/C,eAAO,MAAM,eAAe,uGAQzB,oBAAoB,qDAsCtB,CAAC"}
|
|
@@ -1,45 +1,50 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { useMergeRefs, FloatingPortal, FloatingOverlay, FloatingFocusManager } from "@floating-ui/react";
|
|
4
3
|
import { AnimatePresence, motion } from "motion/react";
|
|
5
4
|
import { useFloatingContext } from "../floating/helpers.js";
|
|
6
5
|
import { FLOATING_Z_INDEX } from "../../../theme/index.js";
|
|
7
6
|
import { useIsHydrated } from "../../../hooks/use-is-hydrated/index.js";
|
|
8
7
|
import { createSxInterpolation } from "../../../utils/stylesheet.js";
|
|
9
|
-
const FloatingContent =
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
8
|
+
const FloatingContent = ({
|
|
9
|
+
style,
|
|
10
|
+
floatingPortalProps,
|
|
11
|
+
floatingFocusManagerProps,
|
|
12
|
+
floatingOverlayProps,
|
|
13
|
+
sx,
|
|
14
|
+
ref,
|
|
15
|
+
...props
|
|
16
|
+
}) => {
|
|
17
|
+
const { getFloatingProps, context } = useFloatingContext();
|
|
18
|
+
const mergedRefs = useMergeRefs([context.refs.setFloating, ref]);
|
|
19
|
+
const isHydrated = useIsHydrated();
|
|
20
|
+
return /* @__PURE__ */ jsx(AnimatePresence, { children: context.open && isHydrated && /* @__PURE__ */ jsx(FloatingPortal, { root: document.body, ...floatingPortalProps, children: /* @__PURE__ */ jsx(
|
|
21
|
+
FloatingOverlay,
|
|
22
|
+
{
|
|
23
|
+
...floatingOverlayProps,
|
|
24
|
+
style: {
|
|
25
|
+
display: (floatingOverlayProps == null ? void 0 : floatingOverlayProps.disabled) ?? true ? "contents" : void 0,
|
|
26
|
+
...floatingOverlayProps == null ? void 0 : floatingOverlayProps.style
|
|
27
|
+
},
|
|
28
|
+
children: /* @__PURE__ */ jsx(FloatingFocusManager, { disabled: true, context, ...floatingFocusManagerProps, children: /* @__PURE__ */ jsx(
|
|
29
|
+
motion.div,
|
|
30
|
+
{
|
|
31
|
+
initial: { opacity: 0 },
|
|
32
|
+
animate: { opacity: 1 },
|
|
33
|
+
exit: { opacity: 0 },
|
|
34
|
+
style: {
|
|
35
|
+
...context.elements.reference ? context.floatingStyles : {},
|
|
36
|
+
...style,
|
|
37
|
+
zIndex: FLOATING_Z_INDEX
|
|
38
|
+
},
|
|
39
|
+
css: createSxInterpolation(sx),
|
|
40
|
+
...getFloatingProps(props),
|
|
41
|
+
ref: mergedRefs,
|
|
42
|
+
children: props.children
|
|
43
|
+
}
|
|
44
|
+
) })
|
|
45
|
+
}
|
|
46
|
+
) }) });
|
|
47
|
+
};
|
|
43
48
|
export {
|
|
44
49
|
FloatingContent
|
|
45
50
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ImageProps } from './types';
|
|
2
|
-
export declare const Image:
|
|
2
|
+
export declare const Image: ({ ref, ..._props }: ImageProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=image.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/lib/image/image.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrC,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"image.d.ts","sourceRoot":"","sources":["../../../src/lib/image/image.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAKrC,eAAO,MAAM,KAAK,uBAAwB,UAAU,qDAwBnD,CAAC"}
|
package/dist/lib/image/image.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useMemo } from "react";
|
|
3
3
|
import { isString } from "lodash-es";
|
|
4
4
|
import { getImageProps } from "./helpers.js";
|
|
5
5
|
import IMAGE_PLACEHOLDER from "../../assets/svg/image-placeholder.svg.js";
|
|
6
6
|
import { createSxInterpolation } from "../../utils/stylesheet.js";
|
|
7
|
-
const Image =
|
|
7
|
+
const Image = ({ ref, ..._props }) => {
|
|
8
8
|
const { sx, fallback = true, src, ...rest } = getImageProps(_props);
|
|
9
9
|
const fallbackSrc = useMemo(() => {
|
|
10
10
|
if (isString(fallback)) return fallback;
|
|
@@ -24,7 +24,7 @@ const Image = forwardRef((_props, ref) => {
|
|
|
24
24
|
(_a = rest.onError) == null ? void 0 : _a.call(rest, e);
|
|
25
25
|
};
|
|
26
26
|
return /* @__PURE__ */ jsx("img", { src: src || fallbackSrc, alt: "", css, ...rest, ref, onError });
|
|
27
|
-
}
|
|
27
|
+
};
|
|
28
28
|
export {
|
|
29
29
|
Image
|
|
30
30
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/image/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEpD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,YAAY,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/image/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEpD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC7B,CAAC;AAEF,MAAM,MAAM,UAAU,GAAG,YAAY,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,EAAE,WAAW,CAAC,kBAAkB,CAAC,CAAC,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { InputProps } from './types';
|
|
2
|
-
export declare const Input:
|
|
2
|
+
export declare const Input: ({ ref, ..._props }: InputProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/lib/input/input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAwB,MAAM,SAAS,CAAC;AAa3D,eAAO,MAAM,KAAK,
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../src/lib/input/input.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,UAAU,EAAwB,MAAM,SAAS,CAAC;AAa3D,eAAO,MAAM,KAAK,uBAAwB,UAAU,qDA8LnD,CAAC"}
|
package/dist/lib/input/input.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
3
|
import { useMergeRefs } from "@floating-ui/react";
|
|
4
4
|
import { isString } from "lodash-es";
|
|
5
5
|
import { getInputProps } from "./helpers.js";
|
|
@@ -13,7 +13,7 @@ import { getTypographyVar } from "../../theme/typography.js";
|
|
|
13
13
|
import { FormHelperText } from "../form-helper-text/form-helper-text.js";
|
|
14
14
|
import { Primitive } from "../primitive/primitive.js";
|
|
15
15
|
import { Icon } from "../icon/icon.js";
|
|
16
|
-
const Input =
|
|
16
|
+
const Input = ({ ref, ..._props }) => {
|
|
17
17
|
var _a, _b, _c;
|
|
18
18
|
const {
|
|
19
19
|
type,
|
|
@@ -198,7 +198,7 @@ const Input = forwardRef((_props, ref) => {
|
|
|
198
198
|
),
|
|
199
199
|
/* @__PURE__ */ jsx(FormHelperText, { error, children: helperText })
|
|
200
200
|
] });
|
|
201
|
-
}
|
|
201
|
+
};
|
|
202
202
|
const createStyle = ({ size } = {}) => {
|
|
203
203
|
const { inputPaddingX, inputSize, textVariant } = getSizeVariantState(size);
|
|
204
204
|
return {
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { MenuItemProps } from './types';
|
|
2
|
+
export declare const MenuItem: ({ ref, ..._props }: MenuItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
3
|
//# sourceMappingURL=menu-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/lib/menu/menu-item/menu-item.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"menu-item.d.ts","sourceRoot":"","sources":["../../../../src/lib/menu/menu-item/menu-item.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAQxC,eAAO,MAAM,QAAQ,uBAAwB,aAAa,qDA2BzD,CAAC"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { getMenuItemProps } from "./helpers.js";
|
|
4
3
|
import { HTMLDatasetAttributes, Booleanish } from "../../../constants/index.js";
|
|
5
4
|
import { Button } from "../../button/button.js";
|
|
6
5
|
import { useFloatingContext } from "../../floating/floating/helpers.js";
|
|
7
|
-
const MenuItem =
|
|
6
|
+
const MenuItem = ({ ref, ..._props }) => {
|
|
8
7
|
const { children, ...props } = getMenuItemProps(_props);
|
|
9
8
|
const { context } = useFloatingContext();
|
|
10
9
|
const onClick = (e) => {
|
|
@@ -28,7 +27,7 @@ const MenuItem = forwardRef((_props, ref) => {
|
|
|
28
27
|
children
|
|
29
28
|
}
|
|
30
29
|
);
|
|
31
|
-
}
|
|
30
|
+
};
|
|
32
31
|
export {
|
|
33
32
|
MenuItem
|
|
34
33
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"multiple-select.d.ts","sourceRoot":"","sources":["../../../src/lib/multiple-select/multiple-select.tsx"],"names":[],"mappings":"AAQA,OAAO,EAA6B,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA0BzE,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,8BAA8B,mBAAmB,CAAC,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"multiple-select.d.ts","sourceRoot":"","sources":["../../../src/lib/multiple-select/multiple-select.tsx"],"names":[],"mappings":"AAQA,OAAO,EAA6B,mBAAmB,EAAE,MAAM,SAAS,CAAC;AA0BzE,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,MAAM,8BAA8B,mBAAmB,CAAC,CAAC,CAAC,qDAqYlG,CAAC"}
|
|
@@ -112,7 +112,7 @@ const MultipleSelect = ({ ref, ...props }) => {
|
|
|
112
112
|
setControllableValues(preset);
|
|
113
113
|
onChange == null ? void 0 : onChange(preset);
|
|
114
114
|
};
|
|
115
|
-
const responsiveSize = isNil(windowScreen.name) ? void 0 : getResponsiveProp(rest, "size", windowScreen.name)
|
|
115
|
+
const responsiveSize = isNil(windowScreen.name) ? void 0 : getResponsiveProp(rest, "size", windowScreen.name);
|
|
116
116
|
const rowMinHeight = getSizeVariantState(responsiveSize).inputSize ?? 0;
|
|
117
117
|
const displayOptions = useMemo(() => {
|
|
118
118
|
if (!inputValue) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} & import('react').RefAttributes<HTMLAnchorElement>>;
|
|
1
|
+
import { NavLinkProps } from './types';
|
|
2
|
+
export declare const NavLink: ({ children, style, className, to, ref, ...props }: NavLinkProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=nav-link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nav-link.d.ts","sourceRoot":"","sources":["../../../src/lib/nav-link/nav-link.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"nav-link.d.ts","sourceRoot":"","sources":["../../../src/lib/nav-link/nav-link.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAIvC,eAAO,MAAM,OAAO,sDAAuD,YAAY,qDA+CtF,CAAC"}
|
|
@@ -1,40 +1,37 @@
|
|
|
1
1
|
import { jsx, Fragment } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { isFunction, isNil } from "lodash-es";
|
|
4
3
|
import { NavLink as NavLink$1 } from "react-router";
|
|
5
4
|
import { Booleanish } from "../../constants/index.js";
|
|
6
|
-
const NavLink =
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
return /* @__PURE__ */ jsx(
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
);
|
|
5
|
+
const NavLink = ({ children, style, className, to, ref, ...props }) => {
|
|
6
|
+
const styleFn = (renderProps) => {
|
|
7
|
+
return isFunction(style) ? style({
|
|
8
|
+
...renderProps,
|
|
9
|
+
isActive: renderProps.isActive && !isNil(to)
|
|
10
|
+
}) : style;
|
|
11
|
+
};
|
|
12
|
+
const classNameFn = (renderProps) => {
|
|
13
|
+
return isFunction(className) ? className({
|
|
14
|
+
...renderProps,
|
|
15
|
+
isActive: renderProps.isActive && !isNil(to)
|
|
16
|
+
}) : className;
|
|
17
|
+
};
|
|
18
|
+
const onClick = (e) => {
|
|
19
|
+
var _a;
|
|
20
|
+
if (e.currentTarget.getAttribute("aria-disabled") === Booleanish.True) {
|
|
21
|
+
e.preventDefault();
|
|
22
|
+
}
|
|
23
|
+
if (isNil(to)) {
|
|
24
|
+
e.preventDefault();
|
|
25
|
+
}
|
|
26
|
+
(_a = props.onClick) == null ? void 0 : _a.call(props, e);
|
|
27
|
+
};
|
|
28
|
+
return /* @__PURE__ */ jsx(NavLink$1, { ...props, style: styleFn, className: classNameFn, to: to ?? "#", ref, onClick, children: (renderProps) => {
|
|
29
|
+
return /* @__PURE__ */ jsx(Fragment, { children: isFunction(children) ? children({
|
|
30
|
+
...renderProps,
|
|
31
|
+
isActive: renderProps.isActive && !isNil(to)
|
|
32
|
+
}) : children });
|
|
33
|
+
} });
|
|
34
|
+
};
|
|
38
35
|
export {
|
|
39
36
|
NavLink
|
|
40
37
|
};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { NavLinkProps as ReactRouterNavLinkProps } from 'react-router';
|
|
2
2
|
import { ShallowMerge } from '../../types';
|
|
3
|
+
import { Ref } from 'react';
|
|
3
4
|
export type NavLinkProps = ShallowMerge<ReactRouterNavLinkProps, {
|
|
4
5
|
to?: ReactRouterNavLinkProps['to'];
|
|
6
|
+
ref?: Ref<HTMLAnchorElement>;
|
|
5
7
|
}>;
|
|
6
8
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/nav-link/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/nav-link/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,IAAI,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACvC,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAE5B,MAAM,MAAM,YAAY,GAAG,YAAY,CACrC,uBAAuB,EACvB;IACE,EAAE,CAAC,EAAE,uBAAuB,CAAC,IAAI,CAAC,CAAC;IACnC,GAAG,CAAC,EAAE,GAAG,CAAC,iBAAiB,CAAC,CAAC;CAC9B,CACF,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { RadioButtonProps } from './types';
|
|
2
|
-
export declare const RadioButton:
|
|
2
|
+
export declare const RadioButton: ({ ref, ..._props }: RadioButtonProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=radio-button.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-button.d.ts","sourceRoot":"","sources":["../../../src/lib/radio-button/radio-button.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio-button.d.ts","sourceRoot":"","sources":["../../../src/lib/radio-button/radio-button.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAM3C,eAAO,MAAM,WAAW,uBAAwB,gBAAgB,qDAsB/D,CAAC"}
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { getRadioButtonProps } from "./helpers.js";
|
|
4
3
|
import classes from "./radio-button.module.scss.js";
|
|
5
4
|
import { cn } from "../../utils/stylesheet.js";
|
|
6
5
|
import { getColorShadesByVariant } from "../../utils/index.js";
|
|
7
6
|
import { Primitive } from "../primitive/primitive.js";
|
|
8
|
-
const RadioButton =
|
|
7
|
+
const RadioButton = ({ ref, ..._props }) => {
|
|
9
8
|
const { children, color = "primary", className, containerProps, ...props } = getRadioButtonProps(_props);
|
|
10
9
|
const { main } = getColorShadesByVariant(color);
|
|
11
10
|
return /* @__PURE__ */ jsxs(
|
|
@@ -27,7 +26,7 @@ const RadioButton = forwardRef((_props, ref) => {
|
|
|
27
26
|
]
|
|
28
27
|
}
|
|
29
28
|
);
|
|
30
|
-
}
|
|
29
|
+
};
|
|
31
30
|
export {
|
|
32
31
|
RadioButton
|
|
33
32
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/lib/select/select.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAkBzD,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,iBAAiB,sBAAsB,CAAC,SAAS,MAAM,8BAGrF,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,
|
|
1
|
+
{"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../../src/lib/select/select.tsx"],"names":[],"mappings":"AAQA,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAkBzD,eAAO,MAAM,MAAM,GAAI,CAAC,SAAS,iBAAiB,sBAAsB,CAAC,SAAS,MAAM,8BAGrF,WAAW,CAAC,CAAC,EAAE,CAAC,CAAC,qDAwVnB,CAAC"}
|
|
@@ -29,7 +29,7 @@ const Select = ({
|
|
|
29
29
|
placement = "bottom-start",
|
|
30
30
|
open,
|
|
31
31
|
onOpenChange,
|
|
32
|
-
searchable
|
|
32
|
+
searchable: _searchable,
|
|
33
33
|
value,
|
|
34
34
|
optionValue,
|
|
35
35
|
optionLabel,
|
|
@@ -45,11 +45,22 @@ const Select = ({
|
|
|
45
45
|
containerProps,
|
|
46
46
|
inputProps,
|
|
47
47
|
lazy = true,
|
|
48
|
+
displayRowCount = DEFAULT_DISPLAY_ROW_COUNT,
|
|
48
49
|
...rest
|
|
49
50
|
} = getSelectProps(props);
|
|
50
51
|
const searchInputRef = useRef(null);
|
|
51
52
|
const floatingRef = useRef(null);
|
|
52
53
|
const uniqueId = useId();
|
|
54
|
+
const normalizedDisplayRowCount = (() => {
|
|
55
|
+
if (displayRowCount === Number.POSITIVE_INFINITY) {
|
|
56
|
+
return Number.POSITIVE_INFINITY;
|
|
57
|
+
}
|
|
58
|
+
if (Number.isFinite(displayRowCount)) {
|
|
59
|
+
return Math.max(1, displayRowCount);
|
|
60
|
+
}
|
|
61
|
+
return DEFAULT_DISPLAY_ROW_COUNT;
|
|
62
|
+
})();
|
|
63
|
+
const searchable = _searchable ?? options.length > normalizedDisplayRowCount;
|
|
53
64
|
const [inputValue, setInputValue] = useControllableState({
|
|
54
65
|
defaultValue: (inputProps == null ? void 0 : inputProps.defaultValue) ?? "",
|
|
55
66
|
value: inputProps == null ? void 0 : inputProps.value
|
|
@@ -92,6 +103,7 @@ const Select = ({
|
|
|
92
103
|
);
|
|
93
104
|
const responsiveSize = isNil(windowScreen.name) ? void 0 : getResponsiveProp(rest, "size", windowScreen.name);
|
|
94
105
|
const rowMinHeight = getSizeVariantState(responsiveSize).inputSize ?? 0;
|
|
106
|
+
const listMaxHeight = Number.isFinite(normalizedDisplayRowCount) ? rowMinHeight * normalizedDisplayRowCount : void 0;
|
|
95
107
|
const displayOptions = useMemo(() => {
|
|
96
108
|
if (!inputValue) {
|
|
97
109
|
return options;
|
|
@@ -310,7 +322,7 @@ const Select = ({
|
|
|
310
322
|
overscan: lazy ? void 0 : options.length
|
|
311
323
|
},
|
|
312
324
|
style: {
|
|
313
|
-
maxHeight:
|
|
325
|
+
maxHeight: listMaxHeight,
|
|
314
326
|
...listProps == null ? void 0 : listProps.style
|
|
315
327
|
},
|
|
316
328
|
RowComponent
|
|
@@ -28,6 +28,7 @@ interface SelectExtendedProps<V extends SelectOptionValue, O extends object> ext
|
|
|
28
28
|
containerProps?: PrimitiveProps<JSX.IntrinsicElements['div']>;
|
|
29
29
|
inputProps?: InputProps;
|
|
30
30
|
lazy?: boolean;
|
|
31
|
+
displayRowCount?: number;
|
|
31
32
|
}
|
|
32
33
|
export type SelectProps<V extends SelectOptionValue = SelectOptionValue, O extends object = object> = ShallowMerge<InputMaskProps<JSX.IntrinsicElements['button']>, SelectExtendedProps<V, O>>;
|
|
33
34
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/select/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,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GAAG,iBAAiB,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,YAAY,CAChH,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC,EAC/C,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC,CAC1B,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
1
|
+
import { TabContentProps } from './types';
|
|
2
|
+
export declare const TabContent: ({ children, ...rest }: TabContentProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
4
3
|
//# sourceMappingURL=tab-content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tab-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/tabs/tab-content/tab-content.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"tab-content.d.ts","sourceRoot":"","sources":["../../../../src/lib/tabs/tab-content/tab-content.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM1C,eAAO,MAAM,UAAU,0BAA2B,eAAe,qDAehE,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { flattenChildren } from "../../../utils/index.js";
|
|
4
3
|
import { useTabsContext } from "../tabs/helpers.js";
|
|
5
|
-
const TabContent =
|
|
4
|
+
const TabContent = ({ children, ...rest }) => {
|
|
6
5
|
const { activeIndex } = useTabsContext();
|
|
7
6
|
const flattenedChildren = flattenChildren(children);
|
|
8
7
|
return /* @__PURE__ */ jsx(
|
|
@@ -12,11 +11,10 @@ const TabContent = forwardRef(({ children, ...rest }, ref) => {
|
|
|
12
11
|
display: "contents"
|
|
13
12
|
},
|
|
14
13
|
...rest,
|
|
15
|
-
ref,
|
|
16
14
|
children: flattenedChildren.find((_, index) => index === activeIndex)
|
|
17
15
|
}
|
|
18
16
|
);
|
|
19
|
-
}
|
|
17
|
+
};
|
|
20
18
|
export {
|
|
21
19
|
TabContent
|
|
22
20
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../../../src/lib/time-picker/time-picker.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAmB1C,eAAO,MAAM,UAAU,mJAepB,eAAe,
|
|
1
|
+
{"version":3,"file":"time-picker.d.ts","sourceRoot":"","sources":["../../../src/lib/time-picker/time-picker.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAmB1C,eAAO,MAAM,UAAU,mJAepB,eAAe,qDAyQjB,CAAC"}
|
|
@@ -34,7 +34,7 @@ const TimePicker = ({
|
|
|
34
34
|
}) => {
|
|
35
35
|
const floatingRef = useRef(null);
|
|
36
36
|
const windowScreen = useWindowScreen();
|
|
37
|
-
const responsiveSize = isNil(windowScreen.name) ? void 0 : getResponsiveProp(rest, "size", windowScreen.name)
|
|
37
|
+
const responsiveSize = isNil(windowScreen.name) ? void 0 : getResponsiveProp(rest, "size", windowScreen.name);
|
|
38
38
|
const rowMinHeight = getSizeVariantState(responsiveSize).inputSize ?? 0;
|
|
39
39
|
const [isOpen, setIsOpen] = useControllableState({
|
|
40
40
|
defaultValue: open ?? false,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { ListItemProps } from './types';
|
|
2
|
-
export declare const ListItem:
|
|
2
|
+
export declare const ListItem: ({ ref, ..._props }: ListItemProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=list-item.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"list-item.d.ts","sourceRoot":"","sources":["../../../../src/lib/unordered-list/list-item/list-item.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"list-item.d.ts","sourceRoot":"","sources":["../../../../src/lib/unordered-list/list-item/list-item.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAIxC,eAAO,MAAM,QAAQ,uBAAwB,aAAa,qDAqBzD,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { isNil } from "lodash-es";
|
|
4
3
|
import { getListItemProps } from "./helpers.js";
|
|
5
4
|
import { createSxInterpolation } from "../../../utils/stylesheet.js";
|
|
6
|
-
const ListItem =
|
|
5
|
+
const ListItem = ({ ref, ..._props }) => {
|
|
7
6
|
const { sx, children, dangerouslySetInnerHTML, ...rest } = getListItemProps(_props);
|
|
8
7
|
const css = [
|
|
9
8
|
{
|
|
@@ -22,7 +21,7 @@ const ListItem = forwardRef((_props, ref) => {
|
|
|
22
21
|
children: isNil(dangerouslySetInnerHTML) ? children : null
|
|
23
22
|
}
|
|
24
23
|
);
|
|
25
|
-
}
|
|
24
|
+
};
|
|
26
25
|
export {
|
|
27
26
|
ListItem
|
|
28
27
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { UnorderedListProps } from './types';
|
|
2
|
-
export declare const UnorderedList:
|
|
2
|
+
export declare const UnorderedList: ({ ref, ..._props }: UnorderedListProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=unordered-list.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unordered-list.d.ts","sourceRoot":"","sources":["../../../../src/lib/unordered-list/unordered-list/unordered-list.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"unordered-list.d.ts","sourceRoot":"","sources":["../../../../src/lib/unordered-list/unordered-list/unordered-list.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAI7C,eAAO,MAAM,aAAa,uBAAwB,kBAAkB,qDAenE,CAAC"}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import { forwardRef } from "react";
|
|
3
2
|
import { getUnorderedListProps } from "./helpers.js";
|
|
4
3
|
import { createSxInterpolation } from "../../../utils/stylesheet.js";
|
|
5
|
-
const UnorderedList =
|
|
4
|
+
const UnorderedList = ({ ref, ..._props }) => {
|
|
6
5
|
const { sx, ...rest } = getUnorderedListProps(_props);
|
|
7
6
|
return /* @__PURE__ */ jsx(
|
|
8
7
|
"ul",
|
|
@@ -17,7 +16,7 @@ const UnorderedList = forwardRef((_props, ref) => {
|
|
|
17
16
|
ref
|
|
18
17
|
}
|
|
19
18
|
);
|
|
20
|
-
}
|
|
19
|
+
};
|
|
21
20
|
export {
|
|
22
21
|
UnorderedList
|
|
23
22
|
};
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { Screen, TypographySizeVariant } from '../theme';
|
|
3
|
-
import { SizeVariant, ColorVariant } from '../types';
|
|
3
|
+
import { SizeVariant, ColorVariant, ToResponsiveProps } from '../types';
|
|
4
4
|
import { Get, Paths, SetRequired } from 'type-fest';
|
|
5
5
|
export * from './common';
|
|
6
6
|
export * from './query-params';
|
|
@@ -34,7 +34,7 @@ export type SizeVariantState = Partial<{
|
|
|
34
34
|
textVariant: TypographySizeVariant;
|
|
35
35
|
}>;
|
|
36
36
|
export declare const getSizeVariantState: (size?: SizeVariant) => SizeVariantState;
|
|
37
|
-
export declare const getResponsiveProp: <O extends object, P extends Paths<O>, R = Get<O, `${P}`>>(record:
|
|
37
|
+
export declare const getResponsiveProp: <O extends object, P extends Paths<O>, R = Get<O, `${P}`>>(record: ToResponsiveProps<O>, field: P, screen: Screen, options?: {
|
|
38
38
|
condition?: (value?: R) => boolean;
|
|
39
39
|
}) => R;
|
|
40
40
|
export type FormatNumberOptions = Intl.NumberFormatOptions & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,YAAY,EAAE,MAAM,OAAO,CAAC;AAI5F,OAAO,EAAe,MAAM,EAAqB,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyD,YAAY,EAAE,MAAM,OAAO,CAAC;AAI5F,OAAO,EAAe,MAAM,EAAqB,qBAAqB,EAAE,MAAM,UAAU,CAAC;AACzF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AACxE,OAAO,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAEpD,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAc/B,eAAO,MAAM,uBAAuB,aAAc,YAAY;;;;;;;;;;;;;;;;;;;;CAyF7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,MAAM,WAAW,KAAK,CAAC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,KAAK,CAAC,GAAG,MAAM,CAAC,CAAC,MAiB9G,CAAC;AAEF,eAAO,MAAM,eAAe,aAAc,KAAK,CAAC,SAAS,KAAG,YAAY,EAYvE,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,OAAO,CAAC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,qBAAqB,CAAC;CACpC,CAAC,CAAC;AAEH,eAAO,MAAM,mBAAmB,UAAW,WAAW,KAAG,gBAiCxD,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAAI,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC,2BAC/D,iBAAiB,CAAC,CAAC,CAAC,SACrB,CAAC,UACA,MAAM,YACJ;IACR,SAAS,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,OAAO,CAAC;CACpC,KACA,CAgBF,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,mBAAmB,GAAG;IAC3D,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,YAAY,UAAW,MAAM,uBAAuB,mBAAmB,WASnF,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,IAAI,CAAC,mBAAmB,EAAE,UAAU,CAAC,GAAG;IACnF,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,WAAW,UAAW,MAAM,uBAAuB,kBAAkB,WAWjF,CAAC;AAEF,MAAM,MAAM,qBAAqB,GAAG,IAAI,CAAC,qBAAqB,GAAG;IAC/D,GAAG,EAAE,MAAM,CAAC;CACb,CAAC;AAEF,eAAO,MAAM,cAAc,UAAW,IAAI,GAAG,MAAM,GAAG,MAAM,uBAAuB,qBAAqB,WAyBvG,CAAC"}
|
package/dist/utils/index.js
CHANGED
|
@@ -156,7 +156,7 @@ const getSizeVariantState = (size) => {
|
|
|
156
156
|
};
|
|
157
157
|
const getResponsiveProp = (record, field, screen, options) => {
|
|
158
158
|
const condition = (options == null ? void 0 : options.condition) ?? ((value) => !isUndefined(value));
|
|
159
|
-
const getByScreen = (bp) => get(record == null ? void 0 : record[bp], field);
|
|
159
|
+
const getByScreen = (bp) => bp === "xs" ? get(record, field) : get(record == null ? void 0 : record[bp], field);
|
|
160
160
|
const currentVal = getByScreen(screen);
|
|
161
161
|
if (condition(currentVal)) {
|
|
162
162
|
return currentVal;
|