@modul/mbui 0.0.20 → 0.0.21-beta-test-8a4f2b68
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/Icon/icons/Share.js +2 -2
- package/dist/Icon/icons/Share.js.map +1 -1
- package/dist/Select/SelectAccount.d.ts +8 -0
- package/dist/Select/SelectAccount.js +50 -0
- package/dist/Select/SelectAccount.js.map +1 -0
- package/dist/Select/SelectAccountCard.js +5 -33
- package/dist/Select/SelectAccountCard.js.map +1 -1
- package/dist/Select/SelectAsync.js +12 -73
- package/dist/Select/SelectAsync.js.map +1 -1
- package/dist/Select/SelectBase.js +13 -73
- package/dist/Select/SelectBase.js.map +1 -1
- package/dist/Select/components/components.d.ts +15 -0
- package/dist/Select/components/components.js +80 -0
- package/dist/Select/components/components.js.map +1 -0
- package/dist/Select/components/index.d.ts +1 -0
- package/dist/Select/components/index.js +17 -0
- package/dist/Select/components/index.js.map +1 -0
- package/dist/Select/index.d.ts +1 -0
- package/dist/Select/index.js +3 -1
- package/dist/Select/index.js.map +1 -1
- package/dist/Switch/Switch.d.ts +2 -2
- package/dist/Switch/Switch.js +3 -3
- package/dist/Switch/Switch.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/Icon/icons/Share.tsx +4 -4
- package/src/Select/SelectAccount.tsx +101 -0
- package/src/Select/SelectAccountCard.tsx +1 -51
- package/src/Select/SelectAsync.tsx +1 -162
- package/src/Select/SelectBase.tsx +19 -168
- package/src/Select/components/components.tsx +186 -0
- package/src/Select/components/index.tsx +15 -0
- package/src/Select/index.ts +1 -0
- package/src/Switch/Switch.tsx +15 -21
- package/src/index.ts +4 -4
package/dist/Icon/icons/Share.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
4
|
const React = (0, tslib_1.__importStar)(require("react"));
|
|
5
5
|
const SvgIcon_1 = require("../SvgIcon");
|
|
6
|
-
const SvgShare = (props) => (React.createElement(SvgIcon_1.SvgIcon, { width:
|
|
7
|
-
React.createElement("path", { fill: "currentColor", d: "
|
|
6
|
+
const SvgShare = (props) => (React.createElement(SvgIcon_1.SvgIcon, { width: 24, height: 24, fill: "none", viewBox: "0 0 24 24", ...props },
|
|
7
|
+
React.createElement("path", { fill: "currentColor", d: "M19 23H5c-1.1 0-2-.9-2-2V10c0-1.1.9-2 2-2h3c.55 0 1 .45 1 1s-.45 1-1 1H5v11h14V10h-3c-.55 0-1-.45-1-1s.45-1 1-1h3c1.1 0 2 .9 2 2v11c0 1.1-.9 2-2 2ZM15.71 4.29l-3-3a.9959.9959 0 0 0-1.41 0l-3 3c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L11 4.41V15c0 .55.45 1 1 1s1-.45 1-1V4.41l1.29 1.29c.39.39 1.02.39 1.41 0 .4-.38.4-1.02.01-1.41Z" })));
|
|
8
8
|
exports.default = SvgShare;
|
|
9
9
|
//# sourceMappingURL=Share.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Share.js","sourceRoot":"","sources":["../../../src/Icon/icons/Share.tsx"],"names":[],"mappings":";;;AAAA,0DAA8B;AAE9B,wCAAoC;AACpC,MAAM,QAAQ,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CACpD,oBAAC,iBAAO,IACP,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,KACf,KAAK;IAET,8BACC,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,
|
|
1
|
+
{"version":3,"file":"Share.js","sourceRoot":"","sources":["../../../src/Icon/icons/Share.tsx"],"names":[],"mappings":";;;AAAA,0DAA8B;AAE9B,wCAAoC;AACpC,MAAM,QAAQ,GAAG,CAAC,KAA8B,EAAE,EAAE,CAAC,CACpD,oBAAC,iBAAO,IACP,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,EAAE,EACV,IAAI,EAAC,MAAM,EACX,OAAO,EAAC,WAAW,KACf,KAAK;IAET,8BACC,IAAI,EAAC,cAAc,EACnB,CAAC,EAAC,+UAA+U,GAChV,CACO,CACV,CAAA;AACD,kBAAe,QAAQ,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { GroupBase, Props } from 'react-select';
|
|
3
|
+
declare type SelectAccountProps<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>> = Props<Option, IsMulti, Group>;
|
|
4
|
+
declare function SelectAccount<Option, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: SelectAccountProps<Option, IsMulti, Group>): React.JSX.Element;
|
|
5
|
+
declare namespace SelectAccount {
|
|
6
|
+
var displayName: string;
|
|
7
|
+
}
|
|
8
|
+
export { SelectAccount };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SelectAccount = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
+
const Icon_1 = require("../../src/Icon");
|
|
7
|
+
const react_select_1 = (0, tslib_1.__importStar)(require("react-select"));
|
|
8
|
+
const utils_1 = require("../@/lib/utils");
|
|
9
|
+
const components_1 = require("./components");
|
|
10
|
+
const Option = ({ children, ...props }) => {
|
|
11
|
+
const { isSelected, isFocused, isDisabled,
|
|
12
|
+
// @ts-ignore
|
|
13
|
+
data: { label, account, balance, cur }, } = props;
|
|
14
|
+
return (React.createElement(react_select_1.components.Option, { className: (0, utils_1.cn)(components_1.optionClasses, 'items-start', { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled }), ...props },
|
|
15
|
+
React.createElement("span", { className: "flex basis-0 grow" },
|
|
16
|
+
React.createElement("span", null,
|
|
17
|
+
React.createElement("span", { className: "text-[16px`] leading-[1.375]" }, label),
|
|
18
|
+
React.createElement("br", null),
|
|
19
|
+
React.createElement("span", { className: "text-[12px] text-light" }, account)),
|
|
20
|
+
React.createElement("span", { className: "ml-auto shrink-0" }, cur)),
|
|
21
|
+
React.createElement("span", { className: "ml-[16px] shrink-0 size-[24px]" }, isSelected && (React.createElement(Icon_1.CheckSmall, { width: "24", height: "24", className: "text-primary" })))));
|
|
22
|
+
};
|
|
23
|
+
const SingleValue = ({ children, ...props }) => {
|
|
24
|
+
const {
|
|
25
|
+
// @ts-ignore
|
|
26
|
+
data: { account, cur }, } = props;
|
|
27
|
+
return (React.createElement(react_select_1.components.SingleValue, { className: "col-start-1 col-end-3 row-start-1 row-end-2", ...props },
|
|
28
|
+
account,
|
|
29
|
+
" (",
|
|
30
|
+
cur,
|
|
31
|
+
")"));
|
|
32
|
+
};
|
|
33
|
+
function SelectAccount(props) {
|
|
34
|
+
return (React.createElement(react_select_1.default, { components: {
|
|
35
|
+
Control: components_1.Control,
|
|
36
|
+
Option,
|
|
37
|
+
SingleValue,
|
|
38
|
+
DropdownIndicator: components_1.DropdownIndicator,
|
|
39
|
+
IndicatorSeparator: () => null,
|
|
40
|
+
Menu: components_1.Menu,
|
|
41
|
+
ValueContainer: components_1.ValueContainer,
|
|
42
|
+
Placeholder: components_1.Placeholder,
|
|
43
|
+
Input: components_1.Input,
|
|
44
|
+
LoadingIndicator: components_1.LoadingIndicator,
|
|
45
|
+
IndicatorsContainer: components_1.IndicatorsContainer,
|
|
46
|
+
}, styles: components_1.colourStyles, unstyled: true, ...props }));
|
|
47
|
+
}
|
|
48
|
+
exports.SelectAccount = SelectAccount;
|
|
49
|
+
SelectAccount.displayName = 'SelectAccount';
|
|
50
|
+
//# sourceMappingURL=SelectAccount.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SelectAccount.js","sourceRoot":"","sources":["../../src/Select/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A;AACF,CAAC,CAAA;AAQD,SAAS,aAAa,CACrB,KAAiD;IAEjD,OAAO,CACN,oBAAC,sBAAM,IACN,UAAU,EAAE;YACX,OAAO,EAAP,oBAAO;YACP,MAAM;YACN,WAAW;YACX,iBAAiB,EAAjB,8BAAiB;YACjB,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI;YAC9B,IAAI,EAAJ,iBAAI;YACJ,cAAc,EAAd,2BAAc;YACd,WAAW,EAAX,wBAAW;YACX,KAAK,EAAL,kBAAK;YACL,gBAAgB,EAAhB,6BAAgB;YAChB,mBAAmB,EAAnB,gCAAmB;SACnB,EACD,MAAM,EAAE,yBAAY,EACpB,QAAQ,EAAE,IAAI,KACV,KAAK,GACR,CACF,CAAA;AACF,CAAC;AAIQ,sCAAa;AAFtB,aAAa,CAAC,WAAW,GAAG,eAAe,CAAA"}
|
|
@@ -6,6 +6,7 @@ const React = (0, tslib_1.__importStar)(require("react"));
|
|
|
6
6
|
const Icon_1 = require("../../src/Icon");
|
|
7
7
|
const react_select_1 = (0, tslib_1.__importStar)(require("react-select"));
|
|
8
8
|
const utils_1 = require("../@/lib/utils");
|
|
9
|
+
const components_1 = require("./components");
|
|
9
10
|
const selectTriggerClasses = `
|
|
10
11
|
flex
|
|
11
12
|
items-center
|
|
@@ -22,38 +23,15 @@ const selectTriggerClasses = `
|
|
|
22
23
|
shadow-[0px_8px_18px_0px_rgba(73,113,208,0.38)]
|
|
23
24
|
cursor-pointer
|
|
24
25
|
`;
|
|
25
|
-
const colourStyles = {
|
|
26
|
-
control: () => ({}),
|
|
27
|
-
option: () => ({}),
|
|
28
|
-
input: () => ({}),
|
|
29
|
-
dropdownIndicator: () => ({}),
|
|
30
|
-
indicatorsContainer: () => ({}),
|
|
31
|
-
menu: () => ({}),
|
|
32
|
-
menuList: () => ({}),
|
|
33
|
-
singleValue: () => ({}),
|
|
34
|
-
valueContainer: () => ({}),
|
|
35
|
-
};
|
|
36
26
|
const Control = ({ children, ...props }) => {
|
|
37
27
|
const { isFocused } = props;
|
|
38
28
|
return (React.createElement(react_select_1.components.Control, { className: (0, utils_1.cn)(selectTriggerClasses, { 'outline outline-primary outline-offset-2 outline-2': isFocused }), ...props }, children));
|
|
39
29
|
};
|
|
40
|
-
const optionClasses = `
|
|
41
|
-
flex
|
|
42
|
-
items-center
|
|
43
|
-
py-[16px]
|
|
44
|
-
px-[12px]
|
|
45
|
-
w-full
|
|
46
|
-
first:rounded-t-md
|
|
47
|
-
last:rounded-b-md
|
|
48
|
-
cursor-default
|
|
49
|
-
select-none
|
|
50
|
-
outline-none
|
|
51
|
-
`;
|
|
52
30
|
const Option = ({ children, ...props }) => {
|
|
53
31
|
const { isSelected, isFocused, isDisabled,
|
|
54
32
|
// @ts-ignore
|
|
55
33
|
data: { label, account, balance, cur }, } = props;
|
|
56
|
-
return (React.createElement(react_select_1.components.Option, { className: (0, utils_1.cn)(optionClasses, { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled }), ...props },
|
|
34
|
+
return (React.createElement(react_select_1.components.Option, { className: (0, utils_1.cn)(components_1.optionClasses, { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled }), ...props },
|
|
57
35
|
React.createElement("span", { className: "flex basis-0 grow" },
|
|
58
36
|
React.createElement("span", null,
|
|
59
37
|
React.createElement("span", null, label),
|
|
@@ -69,9 +47,6 @@ const DropdownIndicator = ({ children, ...props }) => {
|
|
|
69
47
|
return (React.createElement(react_select_1.components.DropdownIndicator, { className: "shrink-0", ...props },
|
|
70
48
|
React.createElement(Icon_1.DropdownSmallOld, { className: "text-white", width: "16", height: "16" })));
|
|
71
49
|
};
|
|
72
|
-
const ValueContainer = ({ children, ...props }) => {
|
|
73
|
-
return (React.createElement(react_select_1.components.ValueContainer, { className: "flex-1 grid", ...props }, children));
|
|
74
|
-
};
|
|
75
50
|
const SingleValue = ({ children, ...props }) => {
|
|
76
51
|
// @ts-ignore
|
|
77
52
|
const { label, account, balance, cur } = props.data;
|
|
@@ -85,9 +60,6 @@ const SingleValue = ({ children, ...props }) => {
|
|
|
85
60
|
" ",
|
|
86
61
|
cur)));
|
|
87
62
|
};
|
|
88
|
-
const Menu = ({ children, ...props }) => {
|
|
89
|
-
return (React.createElement(react_select_1.components.Menu, { className: "z-[1] absolute inset-x-0 bg-page shadow-md mt-[8px] rounded-md", ...props }, children));
|
|
90
|
-
};
|
|
91
63
|
const SelectAccountCard = (props) => {
|
|
92
64
|
return (React.createElement(react_select_1.default, { isSearchable: false, components: {
|
|
93
65
|
Control,
|
|
@@ -95,9 +67,9 @@ const SelectAccountCard = (props) => {
|
|
|
95
67
|
SingleValue,
|
|
96
68
|
DropdownIndicator,
|
|
97
69
|
IndicatorSeparator: () => null,
|
|
98
|
-
Menu,
|
|
99
|
-
ValueContainer,
|
|
100
|
-
}, styles: colourStyles, unstyled: true, ...props }));
|
|
70
|
+
Menu: components_1.Menu,
|
|
71
|
+
ValueContainer: components_1.ValueContainer,
|
|
72
|
+
}, styles: components_1.colourStyles, unstyled: true, ...props }));
|
|
101
73
|
};
|
|
102
74
|
exports.SelectAccountCard = SelectAccountCard;
|
|
103
75
|
//# sourceMappingURL=SelectAccountCard.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectAccountCard.js","sourceRoot":"","sources":["../../src/Select/SelectAccountCard.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,yCAA6D;AAC7D,
|
|
1
|
+
{"version":3,"file":"SelectAccountCard.js","sourceRoot":"","sources":["../../src/Select/SelectAccountCard.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,yCAA6D;AAC7D,0EAQqB;AACrB,0CAAmC;AACnC,6CAAgF;AAEhF,MAAM,oBAAoB,GAAW;;;;;;;;;;;;;;;CAepC,CAAA;AACD,MAAM,OAAO,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAgB,EAAE,EAAE;IACxD,MAAM,EAAE,SAAS,EAAE,GAAG,K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AC,IAAI,EACV,MAAM,EAAC,IAAI,GACV,CAC4B,CAC/B,CAAA;AACF,CAAC,CAAA;AAED,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAoB,EAAE,EAAE;IAChE,aAAa;IACb,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC,IAAI,CAAA;IACnD,OAAO,CACN,oBAAC,yBAAU,CAAC,WAAW,IACtB,SAAS,EAAC,6CAA6C,KACnD,KAAK;QAET,8BAAM,SAAS,EAAC,qDAAqD;YACnE,KAAK;;YAAE,8BAAM,SAAS,EAAC,uCAAuC,IAAE,OAAO,CAAQ,CAC1E;QACP,8BAAM,SAAS,EAAC,wDAAwD;YACtE,OAAO;;YAAG,GAAG,CACR,CACiB,CACzB,CAAA;AACF,CAAC,CAAA;AAQD,MAAM,iBAAiB,GAAG,CAIxB,KAAqD,EAAE,EAAE;IAC1D,OAAO,CACN,oBAAC,sBAAM,IACN,YAAY,EAAE,KAAK,EACnB,UAAU,EAAE;YACX,OAAO;YACP,MAAM;YACN,WAAW;YACX,iBAAiB;YACjB,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI;YAC9B,IAAI,EAAJ,iBAAI;YACJ,cAAc,EAAd,2BAAc;SACd,EACD,MAAM,EAAE,yBAAY,EACpB,QAAQ,EAAE,IAAI,KACV,KAAK,GACR,CACF,CAAA;AACF,CAAC,CAAA;AAEQ,8CAAiB"}
|
|
@@ -3,82 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SelectAsync = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
-
const Icon_1 = require("../../src/Icon");
|
|
7
|
-
const react_select_1 = require("react-select");
|
|
8
6
|
const async_1 = (0, tslib_1.__importDefault)(require("react-select/async"));
|
|
9
|
-
const
|
|
10
|
-
const selectTriggerClasses = `
|
|
11
|
-
flex
|
|
12
|
-
items-center
|
|
13
|
-
py-[12px]
|
|
14
|
-
px-[16px]
|
|
15
|
-
h-[44px]
|
|
16
|
-
border-[1px]
|
|
17
|
-
border-input
|
|
18
|
-
rounded-sm
|
|
19
|
-
text-left
|
|
20
|
-
cursor-pointer
|
|
21
|
-
`;
|
|
22
|
-
const colourStyles = {
|
|
23
|
-
control: () => ({}),
|
|
24
|
-
option: () => ({}),
|
|
25
|
-
input: () => ({}),
|
|
26
|
-
dropdownIndicator: () => ({}),
|
|
27
|
-
indicatorsContainer: () => ({}),
|
|
28
|
-
menu: () => ({}),
|
|
29
|
-
menuList: () => ({}),
|
|
30
|
-
singleValue: () => ({}),
|
|
31
|
-
valueContainer: () => ({}),
|
|
32
|
-
};
|
|
33
|
-
const Input = ({ ...props }) => {
|
|
34
|
-
return React.createElement(react_select_1.components.Input, { className: 'col-start-1 col-end-3 row-start-1 row-end-2', ...props });
|
|
35
|
-
};
|
|
36
|
-
const Control = ({ children, ...props }) => {
|
|
37
|
-
const { isFocused } = props;
|
|
38
|
-
return (React.createElement(react_select_1.components.Control, { className: (0, utils_1.cn)(selectTriggerClasses, { 'outline outline-primary outline-offset-2 outline-2': isFocused }), ...props }, children));
|
|
39
|
-
};
|
|
40
|
-
const optionClasses = 'flex items-center first:rounded-t-sm last:rounded-b-sm px-[16px] py-[12px] w-full cursor-default select-none outline-none';
|
|
41
|
-
const Option = ({ children, ...props }) => {
|
|
42
|
-
const { isSelected, isFocused, isDisabled, } = props;
|
|
43
|
-
return (React.createElement(react_select_1.components.Option, { className: (0, utils_1.cn)(optionClasses, { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled }), ...props },
|
|
44
|
-
React.createElement("span", { className: "flex basis-0 grow" }, children),
|
|
45
|
-
React.createElement("span", { className: "ml-[16px] shrink-0 size-[24px]" }, isSelected && (React.createElement(Icon_1.CheckSmall, { width: "24", height: "24", className: "text-primary" })))));
|
|
46
|
-
};
|
|
47
|
-
const IndicatorsContainer = ({ children, ...props }) => {
|
|
48
|
-
return (React.createElement(react_select_1.components.IndicatorsContainer, { className: 'flex items-center gap-x-[8px] shrink-0', ...props }, children));
|
|
49
|
-
};
|
|
50
|
-
const LoadingIndicator = ({ ...props }) => {
|
|
51
|
-
return (React.createElement(react_select_1.components.LoadingIndicator, { className: 'text-light shrink-0', ...props }));
|
|
52
|
-
};
|
|
53
|
-
const DropdownIndicator = ({ children, ...props }) => {
|
|
54
|
-
return (React.createElement(react_select_1.components.DropdownIndicator, { className: "shrink-0", ...props },
|
|
55
|
-
React.createElement(Icon_1.DropdownSmallOld, { className: "text-light", width: "12", height: "12" })));
|
|
56
|
-
};
|
|
57
|
-
const ValueContainer = ({ children, ...props }) => {
|
|
58
|
-
return (React.createElement(react_select_1.components.ValueContainer, { className: "flex-1 grid", ...props }, children));
|
|
59
|
-
};
|
|
60
|
-
const SingleValue = ({ children, ...props }) => {
|
|
61
|
-
return (React.createElement(react_select_1.components.SingleValue, { className: "col-start-1 col-end-3 row-start-1 row-end-2", ...props }, children));
|
|
62
|
-
};
|
|
63
|
-
const Menu = ({ children, ...props }) => {
|
|
64
|
-
return (React.createElement(react_select_1.components.Menu, { className: "z-[1] absolute inset-x-0 bg-page shadow-sm mt-[8px] rounded-sm", ...props }, children));
|
|
65
|
-
};
|
|
66
|
-
const Placeholder = ({ children, ...props }) => {
|
|
67
|
-
return (React.createElement(react_select_1.components.Placeholder, { className: "col-start-1 col-end-3 row-start-1 row-end-2 text-[16px] text-light truncate", ...props }, children));
|
|
68
|
-
};
|
|
7
|
+
const components_1 = require("./components");
|
|
69
8
|
const SelectAsync = ({ ...props }) => (React.createElement(async_1.default, { components: {
|
|
70
|
-
Control,
|
|
71
|
-
Option,
|
|
72
|
-
SingleValue,
|
|
73
|
-
DropdownIndicator,
|
|
9
|
+
Control: components_1.Control,
|
|
10
|
+
Option: components_1.Option,
|
|
11
|
+
SingleValue: components_1.SingleValue,
|
|
12
|
+
DropdownIndicator: components_1.DropdownIndicator,
|
|
74
13
|
IndicatorSeparator: () => null,
|
|
75
|
-
Menu,
|
|
76
|
-
ValueContainer,
|
|
77
|
-
Placeholder,
|
|
78
|
-
Input,
|
|
79
|
-
LoadingIndicator,
|
|
80
|
-
IndicatorsContainer
|
|
81
|
-
}, styles: colourStyles, unstyled: true, ...props }));
|
|
14
|
+
Menu: components_1.Menu,
|
|
15
|
+
ValueContainer: components_1.ValueContainer,
|
|
16
|
+
Placeholder: components_1.Placeholder,
|
|
17
|
+
Input: components_1.Input,
|
|
18
|
+
LoadingIndicator: components_1.LoadingIndicator,
|
|
19
|
+
IndicatorsContainer: components_1.IndicatorsContainer
|
|
20
|
+
}, styles: components_1.colourStyles, unstyled: true, ...props }));
|
|
82
21
|
exports.SelectAsync = SelectAsync;
|
|
83
22
|
SelectAsync.displayName = 'SelectAsync';
|
|
84
23
|
//# sourceMappingURL=SelectAsync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectAsync.js","sourceRoot":"","sources":["../../src/Select/SelectAsync.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"SelectAsync.js","sourceRoot":"","sources":["../../src/Select/SelectAsync.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,4EAA4C;AAC5C,6CAA6K;AAE7K,MAAM,WAAW,GAAG,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE,CAAC,CACrC,oBAAC,eAAW,IACX,UAAU,EAAE;QACX,OAAO,EAAP,oBAAO;QACP,MAAM,EAAN,mBAAM;QACN,WAAW,EAAX,wBAAW;QACX,iBAAiB,EAAjB,8BAAiB;QACjB,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI;QAC9B,IAAI,EAAJ,iBAAI;QACJ,cAAc,EAAd,2BAAc;QACd,WAAW,EAAX,wBAAW;QACX,KAAK,EAAL,kBAAK;QACL,gBAAgB,EAAhB,6BAAgB;QAChB,mBAAmB,EAAnB,gCAAmB;KACnB,EACD,MAAM,EAAE,yBAAY,EACpB,QAAQ,EAAE,IAAI,KACV,KAAK,GACR,CACF,CAAA;AAIQ,kCAAW;AAFpB,WAAW,CAAC,WAAW,GAAG,aAAa,CAAA"}
|
|
@@ -3,82 +3,22 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SelectBase = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = (0, tslib_1.__importStar)(require("react"));
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const utils_1 = require("../@/lib/utils");
|
|
9
|
-
const selectTriggerClasses = `
|
|
10
|
-
flex
|
|
11
|
-
items-center
|
|
12
|
-
py-[12px]
|
|
13
|
-
px-[16px]
|
|
14
|
-
h-[44px]
|
|
15
|
-
text-left
|
|
16
|
-
border-[1px]
|
|
17
|
-
border-input
|
|
18
|
-
rounded-sm
|
|
19
|
-
cursor-pointer
|
|
20
|
-
`;
|
|
21
|
-
const colourStyles = {
|
|
22
|
-
control: () => ({}),
|
|
23
|
-
option: () => ({}),
|
|
24
|
-
input: () => ({}),
|
|
25
|
-
dropdownIndicator: () => ({}),
|
|
26
|
-
indicatorsContainer: () => ({}),
|
|
27
|
-
menu: () => ({}),
|
|
28
|
-
menuList: () => ({}),
|
|
29
|
-
singleValue: () => ({}),
|
|
30
|
-
valueContainer: () => ({}),
|
|
31
|
-
};
|
|
32
|
-
const Input = ({ ...props }) => {
|
|
33
|
-
return React.createElement(react_select_1.components.Input, { className: 'col-start-1 col-end-3 row-start-1 row-end-2', ...props });
|
|
34
|
-
};
|
|
35
|
-
const Control = ({ children, ...props }) => {
|
|
36
|
-
const { isFocused } = props;
|
|
37
|
-
return (React.createElement(react_select_1.components.Control, { className: (0, utils_1.cn)(selectTriggerClasses, { 'outline outline-primary outline-offset-2 outline-2': isFocused }), ...props }, children));
|
|
38
|
-
};
|
|
39
|
-
const optionClasses = 'flex items-center first:rounded-t-sm last:rounded-b-sm px-[16px] py-[12px] w-full cursor-default select-none outline-none';
|
|
40
|
-
const Option = ({ children, ...props }) => {
|
|
41
|
-
const { isSelected, isFocused, isDisabled, } = props;
|
|
42
|
-
return (React.createElement(react_select_1.components.Option, { className: (0, utils_1.cn)(optionClasses, { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled }), ...props },
|
|
43
|
-
React.createElement("span", { className: "flex basis-0 grow" }, children),
|
|
44
|
-
React.createElement("span", { className: "ml-[16px] shrink-0 size-[24px]" }, isSelected && (React.createElement(Icon_1.CheckSmall, { width: "24", height: "24", className: "text-primary" })))));
|
|
45
|
-
};
|
|
46
|
-
const IndicatorsContainer = ({ children, ...props }) => {
|
|
47
|
-
return (React.createElement(react_select_1.components.IndicatorsContainer, { className: 'flex items-center gap-x-[8px] shrink-0', ...props }, children));
|
|
48
|
-
};
|
|
49
|
-
const LoadingIndicator = ({ ...props }) => {
|
|
50
|
-
return (React.createElement(react_select_1.components.LoadingIndicator, { className: 'text-light shrink-0', ...props }));
|
|
51
|
-
};
|
|
52
|
-
const DropdownIndicator = ({ children, ...props }) => {
|
|
53
|
-
return (React.createElement(react_select_1.components.DropdownIndicator, { className: "shrink-0", ...props },
|
|
54
|
-
React.createElement(Icon_1.DropdownSmallOld, { className: "text-light", width: "12", height: "12" })));
|
|
55
|
-
};
|
|
56
|
-
const ValueContainer = ({ children, ...props }) => {
|
|
57
|
-
return (React.createElement(react_select_1.components.ValueContainer, { className: "flex-1 grid", ...props }, children));
|
|
58
|
-
};
|
|
59
|
-
const SingleValue = ({ children, ...props }) => {
|
|
60
|
-
return (React.createElement(react_select_1.components.SingleValue, { className: "col-start-1 col-end-3 row-start-1 row-end-2", ...props }, children));
|
|
61
|
-
};
|
|
62
|
-
const Menu = ({ children, ...props }) => {
|
|
63
|
-
return (React.createElement(react_select_1.components.Menu, { className: "z-[1] absolute inset-x-0 bg-page shadow-sm mt-[8px] rounded-sm", ...props }, children));
|
|
64
|
-
};
|
|
65
|
-
const Placeholder = ({ children, ...props }) => {
|
|
66
|
-
return (React.createElement(react_select_1.components.Placeholder, { className: "col-start-1 col-end-3 row-start-1 row-end-2 text-[16px] text-light truncate", ...props }, children));
|
|
67
|
-
};
|
|
6
|
+
const react_select_1 = (0, tslib_1.__importDefault)(require("react-select"));
|
|
7
|
+
const components_1 = require("./components");
|
|
68
8
|
function SelectBase(props) {
|
|
69
9
|
return (React.createElement(react_select_1.default, { components: {
|
|
70
|
-
Control,
|
|
71
|
-
Option,
|
|
72
|
-
SingleValue,
|
|
73
|
-
DropdownIndicator,
|
|
10
|
+
Control: components_1.Control,
|
|
11
|
+
Option: components_1.Option,
|
|
12
|
+
SingleValue: components_1.SingleValue,
|
|
13
|
+
DropdownIndicator: components_1.DropdownIndicator,
|
|
74
14
|
IndicatorSeparator: () => null,
|
|
75
|
-
Menu,
|
|
76
|
-
ValueContainer,
|
|
77
|
-
Placeholder,
|
|
78
|
-
Input,
|
|
79
|
-
LoadingIndicator,
|
|
80
|
-
IndicatorsContainer
|
|
81
|
-
}, styles: colourStyles, unstyled: true, ...props }));
|
|
15
|
+
Menu: components_1.Menu,
|
|
16
|
+
ValueContainer: components_1.ValueContainer,
|
|
17
|
+
Placeholder: components_1.Placeholder,
|
|
18
|
+
Input: components_1.Input,
|
|
19
|
+
LoadingIndicator: components_1.LoadingIndicator,
|
|
20
|
+
IndicatorsContainer: components_1.IndicatorsContainer,
|
|
21
|
+
}, styles: components_1.colourStyles, unstyled: true, ...props }));
|
|
82
22
|
}
|
|
83
23
|
exports.SelectBase = SelectBase;
|
|
84
24
|
SelectBase.displayName = 'SelectBase';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectBase.js","sourceRoot":"","sources":["../../src/Select/SelectBase.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAE9B,
|
|
1
|
+
{"version":3,"file":"SelectBase.js","sourceRoot":"","sources":["../../src/Select/SelectBase.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAE9B,6EAGqB;AACrB,6CAYqB;AAQrB,SAAS,UAAU,CAClB,KAA8C;IAE9C,OAAO,CACN,oBAAC,sBAAM,IACN,UAAU,EAAE;YACX,OAAO,EAAP,oBAAO;YACP,MAAM,EAAN,mBAAM;YACN,WAAW,EAAX,wBAAW;YACX,iBAAiB,EAAjB,8BAAiB;YACjB,kBAAkB,EAAE,GAAG,EAAE,CAAC,IAAI;YAC9B,IAAI,EAAJ,iBAAI;YACJ,cAAc,EAAd,2BAAc;YACd,WAAW,EAAX,wBAAW;YACX,KAAK,EAAL,kBAAK;YACL,gBAAgB,EAAhB,6BAAgB;YAChB,mBAAmB,EAAnB,gCAAmB;SACnB,EACD,MAAM,EAAE,yBAAY,EACpB,QAAQ,EAAE,IAAI,KACV,KAAK,GACR,CACF,CAAA;AACF,CAAC;AAIQ,gCAAU;AAFnB,UAAU,CAAC,WAAW,GAAG,YAAY,CAAA"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ControlProps, OptionProps, DropdownIndicatorProps, StylesConfig, SingleValueProps, MenuProps, PlaceholderProps, ValueContainerProps, InputProps, LoadingIndicatorProps, IndicatorsContainerProps } from 'react-select';
|
|
3
|
+
declare const Input: ({ ...props }: InputProps) => React.JSX.Element;
|
|
4
|
+
declare const Control: ({ children, ...props }: ControlProps) => React.JSX.Element;
|
|
5
|
+
declare const colourStyles: StylesConfig;
|
|
6
|
+
declare const optionClasses = "flex items-center first:rounded-t-sm last:rounded-b-sm px-[16px] py-[12px] w-full cursor-default select-none outline-none";
|
|
7
|
+
declare const Option: ({ children, ...props }: OptionProps) => React.JSX.Element;
|
|
8
|
+
declare const IndicatorsContainer: ({ children, ...props }: IndicatorsContainerProps) => React.JSX.Element;
|
|
9
|
+
declare const LoadingIndicator: ({ ...props }: LoadingIndicatorProps) => React.JSX.Element;
|
|
10
|
+
declare const DropdownIndicator: ({ children, ...props }: DropdownIndicatorProps) => React.JSX.Element;
|
|
11
|
+
declare const ValueContainer: ({ children, ...props }: ValueContainerProps) => React.JSX.Element;
|
|
12
|
+
declare const SingleValue: ({ children, ...props }: SingleValueProps) => React.JSX.Element;
|
|
13
|
+
declare const Menu: ({ children, ...props }: MenuProps) => React.JSX.Element;
|
|
14
|
+
declare const Placeholder: ({ children, ...props }: PlaceholderProps) => React.JSX.Element;
|
|
15
|
+
export { Input, Control, colourStyles, optionClasses, Option, IndicatorsContainer, LoadingIndicator, DropdownIndicator, ValueContainer, SingleValue, Menu, Placeholder, };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Placeholder = exports.Menu = exports.SingleValue = exports.ValueContainer = exports.DropdownIndicator = exports.LoadingIndicator = exports.IndicatorsContainer = exports.Option = exports.optionClasses = exports.colourStyles = exports.Control = exports.Input = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const react_1 = (0, tslib_1.__importDefault)(require("react"));
|
|
6
|
+
const react_select_1 = require("react-select");
|
|
7
|
+
const utils_1 = require("../../@/lib/utils");
|
|
8
|
+
const Icon_1 = require("../../Icon");
|
|
9
|
+
const Input = ({ ...props }) => {
|
|
10
|
+
return (react_1.default.createElement(react_select_1.components.Input, { className: "col-start-1 col-end-3 row-start-1 row-end-2", ...props }));
|
|
11
|
+
};
|
|
12
|
+
exports.Input = Input;
|
|
13
|
+
const selectTriggerClasses = `
|
|
14
|
+
flex
|
|
15
|
+
items-center
|
|
16
|
+
py-[12px]
|
|
17
|
+
px-[16px]
|
|
18
|
+
h-[44px]
|
|
19
|
+
text-left
|
|
20
|
+
border-[1px]
|
|
21
|
+
border-input
|
|
22
|
+
rounded-sm
|
|
23
|
+
cursor-pointer
|
|
24
|
+
`;
|
|
25
|
+
const Control = ({ children, ...props }) => {
|
|
26
|
+
const { isFocused } = props;
|
|
27
|
+
return (react_1.default.createElement(react_select_1.components.Control, { className: (0, utils_1.cn)(selectTriggerClasses, { 'outline outline-primary outline-offset-2 outline-2': isFocused }), ...props }, children));
|
|
28
|
+
};
|
|
29
|
+
exports.Control = Control;
|
|
30
|
+
const colourStyles = {
|
|
31
|
+
control: () => ({}),
|
|
32
|
+
option: () => ({}),
|
|
33
|
+
input: () => ({}),
|
|
34
|
+
dropdownIndicator: () => ({}),
|
|
35
|
+
indicatorsContainer: () => ({}),
|
|
36
|
+
menu: () => ({}),
|
|
37
|
+
menuList: () => ({}),
|
|
38
|
+
singleValue: () => ({}),
|
|
39
|
+
valueContainer: () => ({}),
|
|
40
|
+
};
|
|
41
|
+
exports.colourStyles = colourStyles;
|
|
42
|
+
const optionClasses = 'flex items-center first:rounded-t-sm last:rounded-b-sm px-[16px] py-[12px] w-full cursor-default select-none outline-none';
|
|
43
|
+
exports.optionClasses = optionClasses;
|
|
44
|
+
const Option = ({ children, ...props }) => {
|
|
45
|
+
const { isSelected, isFocused, isDisabled } = props;
|
|
46
|
+
return (react_1.default.createElement(react_select_1.components.Option, { className: (0, utils_1.cn)(optionClasses, 'items-start', { 'bg-light': isFocused }, { 'opacity-50 pointer-events-none': isDisabled }), ...props },
|
|
47
|
+
react_1.default.createElement("span", { className: "flex basis-0 grow" }, children),
|
|
48
|
+
react_1.default.createElement("span", { className: "ml-[16px] shrink-0 size-[24px]" }, isSelected && (react_1.default.createElement(Icon_1.CheckSmall, { width: "24", height: "24", className: "text-primary" })))));
|
|
49
|
+
};
|
|
50
|
+
exports.Option = Option;
|
|
51
|
+
const IndicatorsContainer = ({ children, ...props }) => {
|
|
52
|
+
return (react_1.default.createElement(react_select_1.components.IndicatorsContainer, { className: "flex items-center gap-x-[8px] shrink-0", ...props }, children));
|
|
53
|
+
};
|
|
54
|
+
exports.IndicatorsContainer = IndicatorsContainer;
|
|
55
|
+
const LoadingIndicator = ({ ...props }) => {
|
|
56
|
+
return (react_1.default.createElement(react_select_1.components.LoadingIndicator, { className: "text-light shrink-0", ...props }));
|
|
57
|
+
};
|
|
58
|
+
exports.LoadingIndicator = LoadingIndicator;
|
|
59
|
+
const DropdownIndicator = ({ children, ...props }) => {
|
|
60
|
+
return (react_1.default.createElement(react_select_1.components.DropdownIndicator, { className: "shrink-0", ...props },
|
|
61
|
+
react_1.default.createElement(Icon_1.DropdownSmallOld, { className: "text-light", width: "12", height: "12" })));
|
|
62
|
+
};
|
|
63
|
+
exports.DropdownIndicator = DropdownIndicator;
|
|
64
|
+
const ValueContainer = ({ children, ...props }) => {
|
|
65
|
+
return (react_1.default.createElement(react_select_1.components.ValueContainer, { className: "flex-1 grid", ...props }, children));
|
|
66
|
+
};
|
|
67
|
+
exports.ValueContainer = ValueContainer;
|
|
68
|
+
const SingleValue = ({ children, ...props }) => {
|
|
69
|
+
return (react_1.default.createElement(react_select_1.components.SingleValue, { className: "col-start-1 col-end-3 row-start-1 row-end-2", ...props }, children));
|
|
70
|
+
};
|
|
71
|
+
exports.SingleValue = SingleValue;
|
|
72
|
+
const Menu = ({ children, ...props }) => {
|
|
73
|
+
return (react_1.default.createElement(react_select_1.components.Menu, { className: "z-[1] absolute inset-x-0 bg-page shadow-sm mt-[8px] rounded-sm", ...props }, children));
|
|
74
|
+
};
|
|
75
|
+
exports.Menu = Menu;
|
|
76
|
+
const Placeholder = ({ children, ...props }) => {
|
|
77
|
+
return (react_1.default.createElement(react_select_1.components.Placeholder, { className: "col-start-1 col-end-3 row-start-1 row-end-2 text-[16px] text-light truncate", ...props }, children));
|
|
78
|
+
};
|
|
79
|
+
exports.Placeholder = Placeholder;
|
|
80
|
+
//# sourceMappingURL=components.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components.js","sourceRoot":"","sources":["../../../src/Select/components/components.tsx"],"names":[],"mappings":";;;;AAAA,+DAAyB;AACzB,+CAaqB;AACrB,6CAAsC;AACtC,qCAAyD;AAEzD,MAAM,KAAK,GAAG,CAAC,EAAE,GAAG,KAAK,EAAc,EAAE,EAAE;IAC1C,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AAiB;AApDlB,MAAM,cAAc,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAuB,EAAE,EAAE;IACtE,OAAO,CACN,8BAAC,yBAAU,CAAC,cAAc,IACzB,SAAS,EAAC,aAAa,KACnB,KAAK,IAER,QAAQ,CACkB,CAC5B,CAAA;AACF,CAAC,CAAA;AA4CA,wCAAc;AA1Cf,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAoB,EAAE,EAAE;IAChE,OAAO,CACN,8BAAC,yBAAU,CAAC,WAAW,IACtB,SAAS,EAAC,6CAA6C,KACnD,KAAK,IAER,QAAQ,CACe,CACzB,CAAA;AACF,CAAC,CAAA;AAkCA,kCAAW;AAhCZ,MAAM,IAAI,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAa,EAAE,EAAE;IAClD,OAAO,CACN,8BAAC,yBAAU,CAAC,IAAI,IACf,SAAS,EAAC,gEAAgE,KACtE,KAAK,IAER,QAAQ,CACQ,CAClB,CAAA;AACF,CAAC,CAAA;AAwBA,oBAAI;AAtBL,MAAM,WAAW,GAAG,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAoB,EAAE,EAAE;IAChE,OAAO,CACN,8BAAC,yBAAU,CAAC,WAAW,IACtB,SAAS,EAAC,6EAA6E,KACnF,KAAK,IAER,QAAQ,CACe,CACzB,CAAA;AACF,CAAC,CAAA;AAcA,kCAAW"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Input, Control, colourStyles, optionClasses, Option, IndicatorsContainer, LoadingIndicator, DropdownIndicator, ValueContainer, SingleValue, Menu, Placeholder, } from './components';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Placeholder = exports.Menu = exports.SingleValue = exports.ValueContainer = exports.DropdownIndicator = exports.LoadingIndicator = exports.IndicatorsContainer = exports.Option = exports.optionClasses = exports.colourStyles = exports.Control = exports.Input = void 0;
|
|
4
|
+
var components_1 = require("./components");
|
|
5
|
+
Object.defineProperty(exports, "Input", { enumerable: true, get: function () { return components_1.Input; } });
|
|
6
|
+
Object.defineProperty(exports, "Control", { enumerable: true, get: function () { return components_1.Control; } });
|
|
7
|
+
Object.defineProperty(exports, "colourStyles", { enumerable: true, get: function () { return components_1.colourStyles; } });
|
|
8
|
+
Object.defineProperty(exports, "optionClasses", { enumerable: true, get: function () { return components_1.optionClasses; } });
|
|
9
|
+
Object.defineProperty(exports, "Option", { enumerable: true, get: function () { return components_1.Option; } });
|
|
10
|
+
Object.defineProperty(exports, "IndicatorsContainer", { enumerable: true, get: function () { return components_1.IndicatorsContainer; } });
|
|
11
|
+
Object.defineProperty(exports, "LoadingIndicator", { enumerable: true, get: function () { return components_1.LoadingIndicator; } });
|
|
12
|
+
Object.defineProperty(exports, "DropdownIndicator", { enumerable: true, get: function () { return components_1.DropdownIndicator; } });
|
|
13
|
+
Object.defineProperty(exports, "ValueContainer", { enumerable: true, get: function () { return components_1.ValueContainer; } });
|
|
14
|
+
Object.defineProperty(exports, "SingleValue", { enumerable: true, get: function () { return components_1.SingleValue; } });
|
|
15
|
+
Object.defineProperty(exports, "Menu", { enumerable: true, get: function () { return components_1.Menu; } });
|
|
16
|
+
Object.defineProperty(exports, "Placeholder", { enumerable: true, get: function () { return components_1.Placeholder; } });
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/Select/components/index.tsx"],"names":[],"mappings":";;;AAAA,2CAcqB;AAbpB,mGAAA,KAAK,OAAA;AACL,qGAAA,OAAO,OAAA;AACP,0GAAA,YAAY,OAAA;AACZ,2GAAA,aAAa,OAAA;AACb,oGAAA,MAAM,OAAA;AACN,iHAAA,mBAAmB,OAAA;AACnB,8GAAA,gBAAgB,OAAA;AAChB,+GAAA,iBAAiB,OAAA;AACjB,4GAAA,cAAc,OAAA;AACd,yGAAA,WAAW,OAAA;AACX,kGAAA,IAAI,OAAA;AACJ,yGAAA,WAAW,OAAA"}
|
package/dist/Select/index.d.ts
CHANGED
package/dist/Select/index.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Select = exports.SelectBase = exports.SelectAsync = exports.SelectAccountCard = void 0;
|
|
3
|
+
exports.Select = exports.SelectBase = exports.SelectAsync = exports.SelectAccount = exports.SelectAccountCard = void 0;
|
|
4
4
|
var SelectAccountCard_1 = require("./SelectAccountCard");
|
|
5
5
|
Object.defineProperty(exports, "SelectAccountCard", { enumerable: true, get: function () { return SelectAccountCard_1.SelectAccountCard; } });
|
|
6
|
+
var SelectAccount_1 = require("./SelectAccount");
|
|
7
|
+
Object.defineProperty(exports, "SelectAccount", { enumerable: true, get: function () { return SelectAccount_1.SelectAccount; } });
|
|
6
8
|
var SelectAsync_1 = require("./SelectAsync");
|
|
7
9
|
Object.defineProperty(exports, "SelectAsync", { enumerable: true, get: function () { return SelectAsync_1.SelectAsync; } });
|
|
8
10
|
var SelectBase_1 = require("./SelectBase");
|
package/dist/Select/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Select/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Select/index.ts"],"names":[],"mappings":";;;AAAA,yDAAuD;AAA9C,sHAAA,iBAAiB,OAAA;AAC1B,iDAA+C;AAAtC,8GAAA,aAAa,OAAA;AACtB,6CAA2C;AAAlC,0GAAA,WAAW,OAAA;AACpB,2CAAyC;AAAhC,wGAAA,UAAU,OAAA;AACnB,mCAAiC;AAAxB,gGAAA,MAAM,OAAA"}
|
package/dist/Switch/Switch.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as React from
|
|
2
|
-
import * as SwitchPrimitives from
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
3
3
|
declare const Switch: React.ForwardRefExoticComponent<Omit<SwitchPrimitives.SwitchProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
|
|
4
4
|
export { Switch };
|
package/dist/Switch/Switch.js
CHANGED
|
@@ -8,8 +8,8 @@ const utils_1 = require("../@/lib/utils");
|
|
|
8
8
|
const rootClasses = `
|
|
9
9
|
inline-flex
|
|
10
10
|
items-center
|
|
11
|
-
w-[
|
|
12
|
-
h-[
|
|
11
|
+
w-[44px]
|
|
12
|
+
h-[24px]
|
|
13
13
|
bg-light
|
|
14
14
|
shadow-sm
|
|
15
15
|
rounded-full
|
|
@@ -22,6 +22,7 @@ const rootClasses = `
|
|
|
22
22
|
disabled:cursor-not-allowed peer shrink-0
|
|
23
23
|
disabled:opacity-50
|
|
24
24
|
transition-colors cursor-pointer
|
|
25
|
+
[&+input]:hidden
|
|
25
26
|
`;
|
|
26
27
|
const ThumbClasses = `
|
|
27
28
|
size-[18px]
|
|
@@ -38,7 +39,6 @@ const ThumbClasses = `
|
|
|
38
39
|
pointer-events-none
|
|
39
40
|
`;
|
|
40
41
|
const Switch = React.forwardRef(({ className, ...props }, ref) => (React.createElement(SwitchPrimitives.Root, { className: (0, utils_1.cn)(rootClasses, className), ...props, ref: ref },
|
|
41
|
-
React.createElement("span", { className: "" }),
|
|
42
42
|
React.createElement(SwitchPrimitives.Thumb, { className: ThumbClasses }))));
|
|
43
43
|
exports.Switch = Switch;
|
|
44
44
|
Switch.displayName = SwitchPrimitives.Root.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["../../src/Switch/Switch.tsx"],"names":[],"mappings":";;;;AAAA,0DAA8B;AAC9B,sFAA0D;AAC1D,0CAAmC;AAEnC,MAAM,WAAW,GAAG;;;;;;;;;;;;;;;;;;CAkBnB,CAAA;AACD,MAAM,YAAY,GAAG;;;;;;;;;;;;;CAapB,CAAA;AAED,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAG7B,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,GAAG,EAAE,EAAE,CAAC,CACnC,oBAAC,gBAAgB,CAAC,IAAI,IACrB,SAAS,EAAE,IAAA,UAAE,EAAC,WAAW,EAAE,SAAS,CAAC,KACjC,KAAK,EACT,GAAG,EAAE,GAAG;IAER,oBAAC,gBAAgB,CAAC,KAAK,IAAC,SAAS,EAAE,YAAY,GAAI,CAC5B,CACxB,CAAC,CAAA;AAIO,wBAAM;AAFf,MAAM,CAAC,WAAW,GAAG,gBAAgB,CAAC,IAAI,CAAC,WAAW,CAAA"}
|