@janbox/storefront-ui 2.0.5 → 2.0.7
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/badge/badge.d.ts +2 -4
- package/dist/lib/badge/badge.d.ts.map +1 -1
- package/dist/lib/badge/badge.js +3 -4
- package/dist/lib/badge/types.d.ts +4 -4
- package/dist/lib/badge/types.d.ts.map +1 -1
- 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/dialog/dialog-close/dialog-close.d.ts +1 -1
- package/dist/lib/dialog/dialog-close/dialog-close.d.ts.map +1 -1
- package/dist/lib/drawer/drawer-close/drawer-close.d.ts +1 -1
- package/dist/lib/drawer/drawer-close/drawer-close.d.ts.map +1 -1
- package/dist/lib/floating/floating/floating.d.ts +2 -53
- package/dist/lib/floating/floating/floating.d.ts.map +1 -1
- package/dist/lib/floating/floating/floating.js +85 -86
- package/dist/lib/floating/floating/types.d.ts +1 -0
- package/dist/lib/floating/floating/types.d.ts.map +1 -1
- package/dist/lib/floating/floating-close/floating-close.d.ts +1 -1
- package/dist/lib/floating/floating-close/floating-close.d.ts.map +1 -1
- package/dist/lib/floating/floating-close/floating-close.js +20 -22
- package/dist/lib/floating/floating-close/types.d.ts.map +1 -1
- 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/icon-button/icon-button.d.ts +1 -1
- package/dist/lib/icon-button/icon-button.d.ts.map +1 -1
- package/dist/lib/icon-button/icon-button.js +4 -4
- 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/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/pagination/pagination.d.ts +1 -1
- package/dist/lib/pagination/pagination.d.ts.map +1 -1
- package/dist/lib/pagination/pagination.js +3 -3
- package/dist/lib/popover/popover-close/popover-close.d.ts +1 -1
- package/dist/lib/popover/popover-close/popover-close.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/tabs/tab-content/types.d.ts +3 -1
- package/dist/lib/tabs/tab-content/types.d.ts.map +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/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useRef } from "react";
|
|
3
3
|
import { useMergeRefs } from "@floating-ui/react";
|
|
4
4
|
import { getIconButtonProps } from "./helpers.js";
|
|
5
5
|
import { useRippleEffect } from "../../hooks/use-ripple-effect/index.js";
|
|
@@ -11,8 +11,8 @@ import { getColorShadesByVariant, getSizeVariantState } from "../../utils/index.
|
|
|
11
11
|
import { animateSpinStyle } from "../../constants/emotion.js";
|
|
12
12
|
import { ensureBoolean } from "../../utils/common.js";
|
|
13
13
|
import { Icon } from "../icon/icon.js";
|
|
14
|
-
const IconButton =
|
|
15
|
-
const { size, color, variant,
|
|
14
|
+
const IconButton = ({ children, ref, ..._props }) => {
|
|
15
|
+
const { size, color, variant, icon, isLoading, sx, sm, md, lg, ...rest } = getIconButtonProps(_props);
|
|
16
16
|
const {
|
|
17
17
|
dark,
|
|
18
18
|
light,
|
|
@@ -131,7 +131,7 @@ const IconButton = forwardRef((_props, ref) => {
|
|
|
131
131
|
}
|
|
132
132
|
)
|
|
133
133
|
] });
|
|
134
|
-
}
|
|
134
|
+
};
|
|
135
135
|
const createStyle = ({ size } = {}) => {
|
|
136
136
|
const { inputSize } = getSizeVariantState(size);
|
|
137
137
|
return [
|
|
@@ -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,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 { PaginationProps } from './types';
|
|
2
|
-
export declare const Pagination:
|
|
2
|
+
export declare const Pagination: ({ ref, ..._props }: PaginationProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
3
3
|
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/lib/pagination/pagination.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAY1C,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/lib/pagination/pagination.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAY1C,eAAO,MAAM,UAAU,uBAAwB,eAAe,qDAgL7D,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { Fragment } from "react";
|
|
3
3
|
import { getPaginationProps, getPageRange } from "./helpers.js";
|
|
4
4
|
import ArrowLeftIcon from "../../assets/svg/arrow-left.svg.js";
|
|
5
5
|
import ArrowForwardIcon from "../../assets/svg/arrow-forward.svg.js";
|
|
@@ -11,7 +11,7 @@ import { getSizeVariantState } from "../../utils/index.js";
|
|
|
11
11
|
import { Text } from "../text/text.js";
|
|
12
12
|
import { IconButton } from "../icon-button/icon-button.js";
|
|
13
13
|
import { Icon } from "../icon/icon.js";
|
|
14
|
-
const Pagination =
|
|
14
|
+
const Pagination = ({ ref, ..._props }) => {
|
|
15
15
|
var _a, _b, _c, _d;
|
|
16
16
|
const {
|
|
17
17
|
page = 1,
|
|
@@ -141,7 +141,7 @@ const Pagination = forwardRef((_props, ref) => {
|
|
|
141
141
|
showNextPageButton && /* @__PURE__ */ jsx(PaginationButton, { "aria-disabled": page >= count, color: (_c = states == null ? void 0 : states.normal) == null ? void 0 : _c.color, onClick: handleNextClick, children: /* @__PURE__ */ jsx(PaginationIcon, { source: ArrowRightIcon }) }),
|
|
142
142
|
showLastPageButton && /* @__PURE__ */ jsx(PaginationButton, { "aria-disabled": page >= count, color: (_d = states == null ? void 0 : states.normal) == null ? void 0 : _d.color, onClick: handleLastClick, children: /* @__PURE__ */ jsx(PaginationIcon, { source: ArrowForwardIcon }) })
|
|
143
143
|
] });
|
|
144
|
-
}
|
|
144
|
+
};
|
|
145
145
|
export {
|
|
146
146
|
Pagination
|
|
147
147
|
};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const PopoverClose:
|
|
1
|
+
export declare const PopoverClose: ({ event, reason, className, ref, ...props }: import('../../floating').FloatingCloseProps) => import("@emotion/react/jsx-runtime").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=popover-close.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popover-close.d.ts","sourceRoot":"","sources":["../../../../src/lib/popover/popover-close/popover-close.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"popover-close.d.ts","sourceRoot":"","sources":["../../../../src/lib/popover/popover-close/popover-close.tsx"],"names":[],"mappings":"AAEA,eAAO,MAAM,YAAY,gJAAgB,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,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAEnE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAE/E,OAAO,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAE9C,MAAM,MAAM,qBAAqB,GAAG,wBAAwB,CAAC;AAE7D,MAAM,MAAM,iBAAiB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1D,UAAU,mBAAmB,CAC3B,CAAC,SAAS,iBAAiB,EAC3B,CAAC,SAAS,MAAM,CAChB,SAAQ,iBAAiB,CAAC,qBAAqB,C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F,YAAY,CAAC,EAAE,CAAC,CAAC;IACjB,KAAK,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC;IACjB,OAAO,EAAE,CAAC,EAAE,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,KAAK,IAAI,CAAC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,cAAc,CAAC,cAAc,CAAC,CAAC;IAC3C,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,KAAK,KAAK,CAAC,SAAS,CAAC;IAClD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,cAAc,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,CAAC,CAAC;IAC9D,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,MAAM,WAAW,CAAC,CAAC,SAAS,iBAAiB,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":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/tabs/tab-content/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC"}
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/lib/tabs/tab-content/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,eAAe,GAAG,iBAAiB,CAAC;IAC9C,GAAG,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;CACjC,CAAC,CAAC"}
|
|
@@ -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
|
};
|