@xfers/design-system 4.4.9-dev.0b5a2ef1f0 → 4.5.0

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.
@@ -61,13 +61,13 @@ menu, _a) {
61
61
  iconSrc: iconSrc,
62
62
  extraText: extraText,
63
63
  extraAction: extraAction,
64
- isAddItemBarVisible: isAddItemBarVisible
64
+ isAddItemBarVisible: isAddItemBarVisible,
65
65
  }),
66
66
  bottomContent));
67
67
  };
68
68
  var DynamicSelect = function (_a) {
69
69
  var _b = _a.className, className = _b === void 0 ? '' : _b, children = _a.children, _c = _a.disabled, disabled = _c === void 0 ? false : _c, mode = _a.mode, label = _a.label, _d = _a.iconSrc, iconSrc = _d === void 0 ? '' : _d, _e = _a.extraText, extraText = _e === void 0 ? '' : _e, _f = _a.extraAction, extraAction = _f === void 0 ? function () { } : _f, _g = _a.isAddItemBarVisible, isAddItemBarVisible = _g === void 0 ? true : _g, _h = _a.topContent, topContent = _h === void 0 ? null : _h, _j = _a.bottomContent, bottomContent = _j === void 0 ? null : _j, _k = _a.actionContent, actionContent = _k === void 0 ? null : _k, rest = __rest(_a, ["className", "children", "disabled", "mode", "label", "iconSrc", "extraText", "extraAction", "isAddItemBarVisible", "topContent", "bottomContent", "actionContent"]);
70
- return (react_1.default.createElement(Select_1.default, __assign({ className: className, type: "dropdown", disabled: disabled, mode: mode, label: label, dropdownRender: function (menu) {
70
+ return (react_1.default.createElement(Select_1.default, __assign({ className: className, disabled: disabled, mode: mode, label: label, dropdownRender: function (menu) {
71
71
  return ExtraElement(menu, {
72
72
  iconSrc: iconSrc,
73
73
  extraText: extraText,
@@ -75,7 +75,7 @@ var DynamicSelect = function (_a) {
75
75
  isAddItemBarVisible: isAddItemBarVisible,
76
76
  topContent: topContent,
77
77
  bottomContent: bottomContent,
78
- actionContent: actionContent
78
+ actionContent: actionContent,
79
79
  });
80
80
  } }, rest), children));
81
81
  };
@@ -1 +1 @@
1
- {"version":3,"file":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AA;AAEY,QAAA,SAAS,GAAG,IAAA,gBAAM,EAAC,eAAE,CAAC,mSAAA,gOAYlC,KAAA;AACD,kBAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"DynamicSelect.js","sourceRoot":"","sources":["../../../src/components/DynamicSelect/DynamicSelect.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyB;AACzB,0CAAoC;AACpC,gDAAqD;AACrD,wDAA8C;AAC9C,qCAA0C;AAiB1C,IAAM,UAAU,GAAG,UAAC,EAKJ;QAJd,eAAc,EAAd,OAAO,mBAAG,IAAI,KAAA,EACd,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAsB,EAAtB,WAAW,mBAAG,cAAO,CAAC,KAAA,EACtB,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAA;IAE1B,IAAI,CAAC,mBAAmB,EAAE,CAAC;QACzB,OAAO,IAAI,CAAA;IACb,CAAC;IACD,OAAO,CACL,8BAAC,iBAAS,IACR,WAAW,EAAE;YACX,WAAW,EAAE,CAAA;QACf,CAAC;QAEA,OAAO,CAAC,CAAC,CAAC,8BAAC,eAAO,IAAC,GAAG,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,8BAAC,aAAc,OAAG;QACxD,SAAS,CACA,CACb,CAAA;AACH,CAAC,CAAA;AAED,IAAM,YAAY,GAAG;AACnB,8DAA8D;AAC9D,IAAS,EACT,EASqB;;IARnB,2DAA2D;IAC3D,eAAc;IADd,2DAA2D;IAC3D,OAAO,mBAAG,IAAI,KAAA,EACd,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAsB,EAAtB,WAAW,mBAAG,cAAO,CAAC,KAAA,EACtB,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,EAC1B,UAAU,gBAAA,EAAE,yBAAyB;IACrC,aAAa,mBAAA,EAAE,4BAA4B;IAC3C,aAAa,mBAAA;IAGf,OAAO,CACL,8B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CAAC,GAAG,6FAAA,0BAEtB,IAAA,CAAA;AACY,QAAA,OAAO,GAAG,gBAAM,CAAC,GAAG,6FAAA,0BAEhC,KAAA;AAEY,QAAA,SAAS,GAAG,IAAA,gBAAM,EAAC,eAAE,CAAC,mSAAA,gOAYlC,KAAA;AACD,kBAAe,aAAa,CAAA"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OPTIONS_TEXT_SIZE = exports.PLACEHOLDER_TEXT_SIZE = void 0;
4
+ exports.PLACEHOLDER_TEXT_SIZE = {
5
+ sm: 'md',
6
+ lg: 'lg',
7
+ };
8
+ exports.OPTIONS_TEXT_SIZE = {
9
+ sm: 'md',
10
+ lg: 'lg',
11
+ };
12
+ //# sourceMappingURL=const.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"const.js","sourceRoot":"","sources":["../../../src/components/Select/const.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG;IACnC,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACA,CAAA;AAEG,QAAA,iBAAiB,GAAG;IAC/B,EAAE,EAAE,IAAI;IACR,EAAE,EAAE,IAAI;CACA,CAAA"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getCustomSelectTag = exports.renderHelperText = exports.renderOptions = exports.getPlaceholder = exports.renderLabel = exports.getSuffixIcon = void 0;
4
+ var react_1 = require("react");
5
+ var theme_1 = require("src/theme/theme");
6
+ var select_1 = require("antd/es/select");
7
+ var index_1 = require("src/components/Tooltip/index");
8
+ var Tag_1 = require("src/components/Tag");
9
+ var Typography_1 = require("src/constants/Typography/Typography");
10
+ var MaterialSymbols_1 = require("src/icons/MaterialSymbols");
11
+ var style_1 = require("./style");
12
+ var const_1 = require("./const");
13
+ var getSuffixIcon = function (secondaryText) { return (react_1.default.createElement(react_1.default.Fragment, null,
14
+ secondaryText && (react_1.default.createElement(Typography_1.Typography.Body, { color: theme_1.straitsXTheme.color.base.onNeutralSecondary, size: "sm" }, secondaryText)),
15
+ react_1.default.createElement(MaterialSymbols_1.MaterialSymbols, { icon: "keyboard_arrow_down" }))); };
16
+ exports.getSuffixIcon = getSuffixIcon;
17
+ var renderLabel = function (label, tooltip) {
18
+ return label ? (react_1.default.createElement(style_1.LabelContainer, null,
19
+ react_1.default.createElement(Typography_1.Typography.Body, { size: "md" }, label),
20
+ tooltip ? (react_1.default.createElement(index_1.default, { placement: "top", title: "I'm Tooltip Component", content: tooltip },
21
+ react_1.default.createElement("span", null,
22
+ react_1.default.createElement(MaterialSymbols_1.MaterialSymbols, { icon: "info", size: "xs" })))) : null)) : null;
23
+ };
24
+ exports.renderLabel = renderLabel;
25
+ var getPlaceholder = function (size, placeholder) {
26
+ return placeholder ? (react_1.default.createElement(Typography_1.Typography.Body, { size: const_1.PLACEHOLDER_TEXT_SIZE[size] }, placeholder)) : null;
27
+ };
28
+ exports.getPlaceholder = getPlaceholder;
29
+ var renderOptions = function (options, size) {
30
+ return options.map(function (_a) {
31
+ var value = _a.value, label = _a.label, Icon = _a.icon, disabled = _a.disabled;
32
+ return (react_1.default.createElement(select_1.default.Option, { key: value, value: value, disabled: disabled },
33
+ react_1.default.createElement(style_1.OptionContainer, null,
34
+ Icon && react_1.default.createElement(Icon, { style: { width: '16px', height: '16px' } }),
35
+ react_1.default.createElement(Typography_1.Typography.Body, { size: const_1.OPTIONS_TEXT_SIZE[size] }, label))));
36
+ });
37
+ };
38
+ exports.renderOptions = renderOptions;
39
+ var renderHelperText = function (helperText) {
40
+ return helperText ? (react_1.default.createElement(Typography_1.Typography.Body, { color: theme_1.straitsXTheme.color.base.onNeutralSecondary, size: "sm" }, helperText)) : null;
41
+ };
42
+ exports.renderHelperText = renderHelperText;
43
+ var getCustomSelectTag = function (mode, disabled, size) {
44
+ return mode === 'multiple'
45
+ ? function (_a) {
46
+ var label = _a.label, onClose = _a.onClose;
47
+ return (react_1.default.createElement(Tag_1.default, { type: disabled ? 'disabled' : 'positive', variant: "removable", size: size, onClick: disabled ? undefined : onClose }, label));
48
+ }
49
+ : undefined;
50
+ };
51
+ exports.getCustomSelectTag = getCustomSelectTag;
52
+ //# sourceMappingURL=helpers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../src/components/Select/helpers.tsx"],"names":[],"mappings":";;;AAAA,+BAAyB;AACzB,yCAA+C;AAC/C,yCAAsC;AACtC,sDAAkD;AAClD,0CAAoC;AACpC,kEAAgE;AAChE,6DAA2D;AAC3D,iCAAyD;AACzD,iCAAkE;AAE3D,IAAM,aAAa,GAAG,UAAC,aAAsB,IAAK,OAAA,CACvD;IACG,aAAa,IAAI,CAChB,8BAAC,uBAAU,CAAC,IAAI,IACd,KAAK,EAAE,qBAAa,CAAC,KAAK,CAAC,IAAI,CAAC,kBAAkB,EAClD,IAAI,EAAC,IAAI,IAER,aAAa,CACE,CACnB;IACD,8BAAC,iCAAe,IAAC,IAAI,EAAC,qBAAqB,GAAG,CAC7C,CACJ,EAZwD,CAYxD,CAAA;AAZY,QAAA,aAAa,iBAYzB;AAEM,IAAM,WAAW,GAAG,UAAC,KAAa,EAAE,OAA4B;IACrE,OAAA,KAAK,CAAC,CAAC,CAAC,CACN,8BAAC,sBAAc;QACb,8BAAC,uBAAU,CAAC,IAAI,IAAC,IAAI,EAAC,IAAI,IAAE,KAAK,CAAmB;QACnD,OAAO,CAAC,CAAC,CAAC,CACT,8BAAC,eAAO,IACN,SAAS,EAAC,KAAK,EACf,KAAK,EAAC,uBAAuB,EAC7B,OAAO,EAAE,OAAO;YAEhB;gBACE,8BAAC,iCAAe,IAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,GAAG,CACpC,CACC,CACX,CAAC,CAAC,CAAC,IAAI,CACO,CAClB,CAAC,CAAC,CAAC,IAAI;AAfR,CAeQ,CAAA;AAhBG,QAAA,WAAW,eAgBd;AAEH,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;QACjB,CAAC,CAAC,UAAC,EAAmE;gBAAjE,KAAK,WAAA,EAAE,OAAO,aAAA;YAAwD,OAAA,CACvE,8BAAC,aAAG,IACF,IAAI,EAAE,QAAQ,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,EACxC,OAAO,EAAC,WAAW,EACnB,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,IAEtC,KAAK,CACF,CACP;QATwE,CASxE;QACH,CAAC,CAAC,SAAS;AAXb,CAWa,CAAA;AAhBF,QAAA,kBAAkB,sBAgBhB"}
@@ -1,8 +1,4 @@
1
1
  "use strict";
2
- var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
- if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
- return cooked;
5
- };
6
2
  var __assign = (this && this.__assign) || function () {
7
3
  __assign = Object.assign || function(t) {
8
4
  for (var s, i = 1, n = arguments.length; i < n; i++) {
@@ -27,34 +23,21 @@ var __rest = (this && this.__rest) || function (s, e) {
27
23
  };
28
24
  Object.defineProperty(exports, "__esModule", { value: true });
29
25
  var react_1 = require("react");
30
- var emotion_1 = require("emotion");
31
26
  var select_1 = require("antd/es/select");
32
27
  require("antd/es/select/style/css");
33
- var tag_1 = require("antd/es/tag");
34
- require("antd/es/tag/style/css");
35
- var Typography_1 = require("src/components/Typography");
36
- var ThemeContext_1 = require("src/theme/ThemeContext");
37
- var ColorStyles_1 = require("src/shared/ColorStyles");
38
- var TypographyStyles_1 = require("src/shared/TypographyStyles");
28
+ var Typography_1 = require("src/constants/Typography/Typography");
29
+ var helpers_1 = require("./helpers");
39
30
  var style_1 = require("./style");
40
- (0, emotion_1.injectGlobal)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .ant-select-dropdown .ant-select-item-option {\n -webkit-font-smoothing: antialiased;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n padding-top: 10px;\n padding-bottom: 10px;\n }\n\n .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {\n font-weight: 500;\n }\n\n div.ant-select-dropdown {\n border-radius: 5px;\n max-height: 100vh;\n overflow-y: scroll;\n }\n"], ["\n .ant-select-dropdown .ant-select-item-option {\n -webkit-font-smoothing: antialiased;\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 400;\n padding-top: 10px;\n padding-bottom: 10px;\n }\n\n .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {\n font-weight: 500;\n }\n\n div.ant-select-dropdown {\n border-radius: 5px;\n max-height: 100vh;\n overflow-y: scroll;\n }\n"])), ColorStyles_1.MAIN_COLORS.PRIMARY_BLACK, TypographyStyles_1.MAIN_FONT, TypographyStyles_1.FONT_SIZE.P1);
41
31
  var Select = function (_a) {
42
- var _b = _a.className, className = _b === void 0 ? '' : _b, children = _a.children, _c = _a.disabled, disabled = _c === void 0 ? false : _c, type = _a.type, mode = _a.mode, label = _a.label, selectRef = _a.selectRef, rest = __rest(_a, ["className", "children", "disabled", "type", "mode", "label", "selectRef"]);
43
- var _d = (0, ThemeContext_1.useTheme)(), spacing = _d.spacing, brand = _d.brand;
44
- (0, emotion_1.injectGlobal)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {\n background-color: #F0FFF9 /* ", " */;\n\n .ant-select-item-option-state {\n color: #00D37E /* ", " */;\n\n &:hover {\n border-color: ", ";\n }\n \n &.ant-picker-focused {\n border-color: ", ";\n }\n \n .ant-picker-active-bar {\n background: ", ";\n }\n }\n }\n "], ["\n .ant-select-dropdown .ant-select-item-option-selected:not(.ant-select-item-option-disabled) {\n background-color: #F0FFF9 /* ", " */;\n\n .ant-select-item-option-state {\n color: #00D37E /* ", " */;\n\n &:hover {\n border-color: ", ";\n }\n \n &.ant-picker-focused {\n border-color: ", ";\n }\n \n .ant-picker-active-bar {\n background: ", ";\n }\n }\n }\n "])), brand.primary.background, brand.primary.illustration, brand.primary.default, brand.primary.default, brand.primary.default);
45
- var styleString = (0, style_1.default)({ mode: mode, disabled: disabled, type: type });
46
- return (react_1.default.createElement(react_1.default.Fragment, null,
47
- label && react_1.default.createElement(Typography_1.P1Bold, { style: { marginBottom: spacing.xs } }, label),
48
- react_1.default.createElement(select_1.default, __assign({ className: "".concat((0, emotion_1.css)(styleString), " ").concat(className), disabled: disabled, mode: mode, ref: selectRef }, rest), children)));
49
- };
50
- Select.Tag = function (_a) {
51
- var _b = _a.className, className = _b === void 0 ? '' : _b, props = __rest(_a, ["className"]);
52
- var primary = (0, ThemeContext_1.useTheme)().brand.primary;
53
- var tagStyle = "\n height: 28px;\n color: #FFFFFF;\n background: ".concat(primary.default, ";\n border-radius: 23px;\n border: 0;\n display: inline-flex;\n align-items: center;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 20px;\n padding-left: 10px;\n cursor: pointer;\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n padding-right: 10px;\n margin-right: 4px;\n\n &:hover {\n opacity: 1;\n }\n\n &.ant-tag .anticon-close {\n color: white;\n margin-left: 5px;\n margin-top: 0px;\n }\n ");
54
- return react_1.default.createElement(tag_1.default, __assign({ className: "".concat((0, emotion_1.css)(tagStyle), " ").concat(className) }, props));
32
+ var children = _a.children, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c, mode = _a.mode, label = _a.label, labelTooltip = _a.labelTooltip, selectRef = _a.selectRef, placeholder = _a.placeholder, _d = _a.error, error = _d === void 0 ? false : _d, secondaryText = _a.secondaryText, helperText = _a.helperText, options = _a.options, rest = __rest(_a, ["children", "disabled", "size", "mode", "label", "labelTooltip", "selectRef", "placeholder", "error", "secondaryText", "helperText", "options"]);
33
+ var internalRef = (0, react_1.useRef)(null);
34
+ var ref = selectRef || internalRef;
35
+ return (react_1.default.createElement(style_1.SelectContainer, null,
36
+ label && (0, helpers_1.renderLabel)(label, labelTooltip),
37
+ react_1.default.createElement(style_1.StyledAntSelect, __assign({ disabled: disabled, mode: mode, ref: ref, "$size": size, "$mode": mode }, rest, { error: error, dropdownRender: function (menu) { return (react_1.default.createElement(style_1.StyledDropdown, { "$size": size },
38
+ react_1.default.createElement(Typography_1.Typography.Body, { size: size === 'sm' ? 'md' : 'lg' }, menu))); }, dropdownStyle: style_1.dropdownStyle, suffixIcon: (0, helpers_1.getSuffixIcon)(secondaryText), placeholder: (0, helpers_1.getPlaceholder)(size, placeholder), showArrow: true, tagRender: (0, helpers_1.getCustomSelectTag)(mode, disabled, size), maxTagCount: 999 }), options ? (0, helpers_1.renderOptions)(options, size) : children),
39
+ (0, helpers_1.renderHelperText)(helperText)));
55
40
  };
56
- Select.OptGroup = select_1.default.OptGroup;
57
41
  Select.Option = select_1.default.Option;
58
42
  exports.default = Select;
59
- var templateObject_1, templateObject_2;
60
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Select/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAwC;AACxC,mCAA2C;AAC3C,yCAAuD;AACvD,oCAAiC;AAEjC,mCAAgC;AAChC,iCAA8B;AAE9B,wDAAkD;AAClD,uDAAiD;AACjD,sDAAoD;AACpD,gEAAkE;AAElE,iCAA2B;AAE3B,IAAA,sBAAY,giBAAA,2GAGC,EAAyB,sBACnB,EAAS,oBACX,EAAY,iUAe5B,KAjBY,yBAAW,CAAC,aAAa,EACnB,4BAAS,EACX,4BAAS,CAAC,EAAE,EAe5B;AAoBD,IAAM,MAAM,GAAG,UAAS,EAShB;IARN,IAAA,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,QAAQ,cAAA,EACR,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,IAA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Ac,aAAQ,IAAI;gBACzB,8BAAC,uBAAU,CAAC,IAAI,IAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAC/C,IAAI,CACW,CACH,CAClB,EANyB,CAMzB,EACD,aAAa,EAAE,qBAAa,EAC5B,UAAU,EAAE,IAAA,uBAAa,EAAC,aAAa,CAAC,EACxC,WAAW,EAAE,IAAA,wBAAc,EAAC,IAAI,EAAE,WAAW,CAAC,EAC9C,SAAS,QACT,SAAS,EAAE,IAAA,4BAAkB,EAAC,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,EACnD,WAAW,EAAE,GAAG,KAEf,OAAO,CAAC,CAAC,CAAC,IAAA,uBAAa,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,QAAQ,CAClC;QACjB,IAAA,0BAAgB,EAAC,UAAU,CAAC,CACb,CACnB,CAAA;AACH,CAAC,CAAA;AAED,MAAM,CAAC,MAAM,GAAG,gBAAS,CAAC,MAAM,CAAA;AAChC,kBAAe,MAAM,CAAA"}
@@ -1,74 +1,47 @@
1
1
  "use strict";
2
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
3
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
4
+ return cooked;
5
+ };
2
6
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = default_1;
4
- var ColorStyles_1 = require("src/shared/ColorStyles");
5
- var TypographyStyles_1 = require("src/shared/TypographyStyles");
6
- var fontStyles_1 = require("src/constants/fontStyles");
7
+ exports.dropdownStyle = exports.StyledDropdown = exports.StyledAntSelect = exports.SelectContainer = exports.OptionContainer = exports.LabelContainer = void 0;
8
+ var styled_1 = require("@emotion/styled");
9
+ var select_1 = require("antd/es/select");
7
10
  var theme_1 = require("src/theme/theme");
8
- function getBaseHeight(_a) {
9
- var mode = _a.mode, type = _a.type;
10
- if (mode === 'multiple') {
11
- return 'min-height: 36px;';
12
- }
13
- if (mode === undefined) {
14
- switch (type) {
15
- case 'dropdown':
16
- return "height: 44px;";
17
- case 'filter':
18
- return "height: 36px;";
11
+ exports.LabelContainer = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 4px;\n span {\n display: inline-flex;\n cursor: pointer;\n }\n"], ["\n display: flex;\n align-items: center;\n gap: 4px;\n span {\n display: inline-flex;\n cursor: pointer;\n }\n"])));
12
+ exports.OptionContainer = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 8px;\n"], ["\n display: flex;\n align-items: center;\n gap: 8px;\n"])));
13
+ exports.SelectContainer = styled_1.default.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 100px;\n width: 100%;\n"], ["\n display: flex;\n flex-direction: column;\n gap: 4px;\n min-width: 100px;\n width: 100%;\n"])));
14
+ var selectSelectorStyles = function (props) {
15
+ // For multiple select, calculate padding to fit tags within min-height
16
+ // Small: 36px min-height - 24px tag = 12px total padding (6px top + 6px bottom)
17
+ // Large: 48px min-height - 32px tag = 16px total padding (8px top + 8px bottom)
18
+ var getVerticalPadding = function () {
19
+ if (props.$mode === 'multiple') {
20
+ return props.$size === 'sm' ? '6px' : '8px';
19
21
  }
20
- }
21
- return '';
22
- }
23
- function getPlaceholderColor(_a) {
24
- var type = _a.type, disabled = _a.disabled;
25
- if (disabled) {
26
- return "\n color: ".concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\n ");
27
- }
28
- if (type === 'filter') {
29
- return "\n color: ".concat(ColorStyles_1.MAIN_COLORS.PRIMARY_BLACK, ";\n opacity: 1;\n ");
30
- }
31
- else if (type === 'dropdown') {
32
- return "\n color: ".concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\n opacity: 1;\n ");
33
- }
34
- return '';
35
- }
36
- function getSelectorPadding(_a) {
37
- var mode = _a.mode, type = _a.type;
38
- if (mode === 'multiple') {
39
- return '';
40
- }
41
- switch (type) {
42
- case 'dropdown':
43
- return "\n padding-top: 0px;\n padding-bottom: 0px;\n padding-left: 15px;\n padding-right: 30px;\n ";
44
- case 'filter':
45
- return "padding: 0 13px;";
46
- default:
47
- return '';
48
- }
49
- }
50
- function getBaseColor(_a) {
51
- var type = _a.type;
52
- switch (type) {
53
- case 'dropdown':
54
- return "color: ".concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, ";");
55
- case 'filter':
56
- return "color: ".concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";");
57
- default:
58
- return '';
59
- }
60
- }
61
- function default_1(_a) {
62
- var mode = _a.mode, disabled = _a.disabled, type = _a.type;
63
- var style = "\n width: 100%;\n ".concat(fontStyles_1.pStyle, "\n ").concat(getBaseColor({ type: type }), "\n cursor: pointer;\n\n &.ant-select-single:not(.ant-select-customize-input) .ant-select-selector, &.ant-select-multiple:not(.ant-select-customize-input) .ant-select-selector {\n ").concat(getBaseHeight({ mode: mode, type: type }), "\n\n\n border-radius: 5px;\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n ").concat(getSelectorPadding({ mode: mode, type: type }), "\n\n &:hover {\n ").concat(!disabled
64
- ? "border-color: ".concat(theme_1.straitsXTheme.brand.primary.default, ";")
65
- : '', "\n }\n\n &:active .ant-select-selection-placeholder {\n ").concat(type === 'filter'
66
- ? "\n color: ".concat(theme_1.straitsXTheme.brand.primary.default, ";\n ")
67
- : '', "\n }\n }\n\n &.ant-select-single.ant-select-focused:not(.ant-select-customize-input) .ant-select-selector, &.ant-select-multiple.ant-select-focused:not(.ant-select-customize-input) .ant-select-selector {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n -webkit-box-shadow: 0 0 0 2px ").concat(theme_1.straitsXTheme.brand.primary.background, ";\n box-shadow: 0 0 0 2px ").concat(theme_1.straitsXTheme.brand.primary.background, ";\n }\n\n &.ant-select-single .ant-select-selector .ant-select-selection-placeholder {\n display: flex;\n align-items: center;\n line-height: 34px;\n ").concat(getPlaceholderColor({ type: type, disabled: disabled }), "\n }\n\n &.ant-select-multiple .ant-select-selection-placeholder {\n display: flex;\n align-items: center;\n line-height: 34px;\n ").concat(getPlaceholderColor({ type: type, disabled: disabled }), "\n }\n\n &.ant-select-single:not(.ant-select-customize-input) .ant-select-selector .ant-select-selection-search-input {\n height: 100%;\n }\n\n & .ant-select-selection-search > input {\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, ";\n padding-bottom: 2px;\n }\n\n &.ant-select-single .ant-select-selector .ant-select-selection-item {\n display: flex;\n align-items: center;\n line-height: 34px;\n color: ").concat(ColorStyles_1.MAIN_COLORS.PRIMARY_BLACK, ";\n\n ").concat(type === 'filter' && !disabled
68
- ? "\n color: ".concat(ColorStyles_1.MAIN_COLORS.PRIMARY_BLACK, ";\n ")
69
- : '', "\n }\n\n &.ant-select-single.ant-select-show-arrow .ant-select-selection-item {\n padding-right: 15px;\n }\n\n &.ant-select-multiple .ant-select-selection-item {\n height: 28px;\n color: #FFFFFF;\n background: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n border-radius: 23px;\n border: 0;\n display: inline-flex;\n align-items: center;\n font-family: \"Hanken Grotesk\", Inter;\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 20px;\n padding-left: 10px;\n cursor: pointer;\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n }\n\n &.ant-select-multiple .ant-select-selection-item-remove {\n font-size: 10px;\n color: #FFFFFF;\n padding-right: 5px;\n margin-top: 2px;\n }\n\n &.ant-select-multiple .ant-select-selection-item-content {\n margin-right: 3px;\n }\n\n &.ant-select-multiple .zoom-leave {\n display: none;\n }\n\n &.ant-select-multiple .ant-select-selection-placeholder {\n left: 16px;\n ").concat(type === 'filter' && !disabled
70
- ? "\n color: ".concat(ColorStyles_1.MAIN_COLORS.PRIMARY_BLACK, ";\n opacity: 1;\n ")
71
- : '', "\n }\n\n & .ant-select-selection-placeholder {\n opacity: 1;\n }\n\n &.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, ";\n }\n\n &.ant-select-disabled.ant-select-single:not(.ant-select-customize-input) .ant-select-selector {\n background: #F6F7F9;\n }\n\n & .ant-select-arrow .anticon.anticon-search {\n transform: scale(1.3);\n margin-left: -10px;\n }\n\n &.ant-select-focused:not(.ant-select-disabled).ant-select:not(.ant-select-customize-input) .ant-select-selector {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n -webkit-box-shadow: 0 0 0 2px ").concat(theme_1.straitsXTheme.brand.primary.default, "33;\n box-shadow: 0 0 0 2px ").concat(theme_1.straitsXTheme.brand.primary.default, "33;\n }\n ");
72
- return style;
73
- }
22
+ return '12px';
23
+ };
24
+ var verticalPadding = getVerticalPadding();
25
+ return "\n .ant-select-selector {\n border-radius: ".concat(props.$size === 'sm' ? '8px' : '12px', " !important;\n position: relative !important;\n display: flex;\n align-items: ").concat(props.$mode === 'multiple' ? 'flex-start' : 'center', " !important;\n padding: ").concat(verticalPadding, " 16px !important;\n\n min-height: ").concat(props.$size === 'sm' ? '36px' : '48px', " !important;\n ").concat(props.$mode !== 'multiple' ? "height: ".concat(props.$size === 'sm' ? '36px' : '48px', " !important;") : 'height: auto !important;', "\n\n background: ").concat(props.disabled
26
+ ? theme_1.straitsXTheme.color.surface.disabledSurface
27
+ : theme_1.straitsXTheme.color.surface.neutral, " !important;\n\n border: 1px solid ").concat(props.error
28
+ ? theme_1.straitsXTheme.color.status.critical
29
+ : theme_1.straitsXTheme.color.base.line, " !important;\n }\n");
30
+ };
31
+ var selectHoverFocusStyles = function (props) { return "\n &:hover .ant-select-selector,\n &.ant-select-focused .ant-select-selector {\n ".concat(!props.disabled &&
32
+ "\n box-shadow: 0 0 0 1px ".concat(theme_1.straitsXTheme.color.base.onNeutral, "20 !important;\n border: 1px solid ").concat(props.error
33
+ ? theme_1.straitsXTheme.color.status.critical
34
+ : theme_1.straitsXTheme.color.base.primary2, " !important;\n "), "\n }\n"); };
35
+ var selectPlaceholderStyles = "\n .ant-select-selection-placeholder {\n height: 100% !important;\n display: flex;\n align-items: center;\n \n span {\n color: ".concat(theme_1.straitsXTheme.color.component.placeholderInput, " !important;\n }\n }\n");
36
+ var selectOverflowStyles = function (props) { return "\n .ant-select-selection-overflow {\n gap: 8px;\n ".concat(props.$mode === 'multiple' ? 'flex-wrap: wrap !important;' : '', "\n ").concat(props.$mode === 'multiple' ? 'align-content: center !important;' : '', "\n }\n"); };
37
+ var selectSelectedItemStyles = "\n .ant-select-selection-item {\n display: flex !important;\n align-items: center !important;\n color: ".concat(theme_1.straitsXTheme.color.base.onNeutral, " !important;\n }\n");
38
+ var selectArrowStyles = "\n .ant-select-arrow {\n display: flex !important;\n align-items: center !important;\n gap: 8px !important;\n width: auto !important;\n align-self: center !important;\n \n span {\n color: ".concat(theme_1.straitsXTheme.color.base.onNeutral, " !important;\n }\n }\n");
39
+ exports.StyledAntSelect = (0, styled_1.default)(select_1.default)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n"])), function (props) { return selectSelectorStyles(props); }, function (props) { return selectHoverFocusStyles(props); }, selectPlaceholderStyles, function (props) { return selectOverflowStyles(props); }, selectSelectedItemStyles, selectArrowStyles);
40
+ var dropdownBaseItemStyles = "\n .ant-select-item {\n color: ".concat(theme_1.straitsXTheme.color.base.onNeutral, " !important;\n padding: 12px !important;\n }\n");
41
+ var dropdownSelectedOptionStyles = "\n .ant-select-item-option-selected {\n background: #d7efe2 !important;\n position: relative !important;\n \n .anticon {\n display: none !important;\n }\n \n &::after {\n content: 'check' !important;\n font-family: 'Material Symbols Rounded' !important;\n color: ".concat(theme_1.straitsXTheme.color.status.positive, " !important;\n position: absolute !important;\n right: 12px !important;\n top: 50% !important;\n transform: translateY(-50%) !important;\n font-size: 16px !important;\n }\n }\n");
42
+ var dropdownInteractiveStyles = "\n .ant-select-item:hover {\n background: ".concat(theme_1.straitsXTheme.color.interactive.hoverSurface, " !important;\n }\n \n .ant-select-item:active {\n background: ").concat(theme_1.straitsXTheme.color.interactive.pressedSurface, " !important;\n }\n");
43
+ var dropdownDisabledOptionStyles = "\n .ant-select-item-option-disabled,\n .ant-select-item-option-disabled:hover {\n background: ".concat(theme_1.straitsXTheme.color.surface.disabledSurface, " !important;\n span { \n color: ").concat(theme_1.straitsXTheme.color.surface.disabledOnSurface, " !important;\n }\n }\n");
44
+ exports.StyledDropdown = styled_1.default.div(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n ", "\n ", "\n ", "\n ", "\n"], ["\n ", "\n ", "\n ", "\n ", "\n"])), dropdownBaseItemStyles, dropdownSelectedOptionStyles, dropdownInteractiveStyles, dropdownDisabledOptionStyles);
45
+ exports.dropdownStyle = { padding: 0, borderRadius: '12px' };
46
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
74
47
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../src/components/Select/style.ts"],"names":[],"mappings":";;AA+EA,4BA4JC;AA3OD,sDAAoE;AACpE,gEAAuD;AACvD,uDAAiD;AACjD,yCAA+C;AAG/C,SAAS,aAAa,CAAC,EAA4C;QAA1C,IAAI,UAAA,EAAE,IAAI,UAAA;IACjC,IAAI,IAAI,KAAK,UAAU,EAAE,CAAC;QACxB,OAAO,mBAAmB,CAAA;IAC5B,CAAC;IAED,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;QACvB,QAAQ,IAAI,EAAE,CAAC;YACb,KAAK,UAAU;gBACb,OAAO,eAAe,CAAA;YACxB,KAAK,QAAQ;gBACX,OAAO,eAAe,CAAA;QAC1B,CAAC;IACH,CAAC;IAED,OAAO,EAA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KANG,UAAC,KAAK,IAAK,OAAA,oBAAoB,CAAC,KAAK,CAAC,EAA3B,CAA2B,EACtC,UAAC,KAAK,IAAK,OAAA,sBAAsB,CAAC,KAAK,CAAC,EAA7B,CAA6B,EACxC,uBAAuB,EACvB,UAAC,KAAK,IAAK,OAAA,oBAAoB,CAAC,KAAK,CAAC,EAA3B,CAA2B,EACtC,wBAAwB,EACxB,iBAAiB,EACpB;AAED,IAAM,sBAAsB,GAAG,6CAElB,qBAAa,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,uDAG9C,CAAA;AAED,IAAM,4BAA4B,GAAG,yTAYtB,qBAAa,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ,kNAQjD,CAAA;AAED,IAAM,yBAAyB,GAAG,wDAEhB,qBAAa,CAAC,KAAK,CAAC,WAAW,CAAC,YAAY,iFAI5C,qBAAa,CAAC,KAAK,CAAC,WAAW,CAAC,cAAc,wBAE/D,CAAA;AAED,IAAM,4BAA4B,GAAG,6GAGnB,qBAAa,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,mDAEhD,qBAAa,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,+BAGzD,CAAA;AAEY,QAAA,cAAc,GAAG,gBAAM,CAAC,GAAG,uGAAwB,MAC5D,EAAsB,MACtB,EAA4B,MAC5B,EAAyB,MACzB,EAA4B,IAC/B,KAJG,sBAAsB,EACtB,4BAA4B,EAC5B,yBAAyB,EACzB,4BAA4B,EAC/B;AAEY,QAAA,aAAa,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,YAAY,EAAE,MAAM,EAAE,CAAA"}
@@ -9,7 +9,7 @@ var react_1 = require("react");
9
9
  var styled_1 = require("@emotion/styled");
10
10
  var MaterialSymbols_1 = require("src/icons/MaterialSymbols");
11
11
  var Typography_1 = require("src/constants/Typography/Typography");
12
- var src_1 = require("src");
12
+ var index_1 = require("src/components/Button/index");
13
13
  var const_1 = require("src/components/Tag/const");
14
14
  function getColorByProperty(type, variant, property) {
15
15
  switch (variant) {
@@ -28,13 +28,20 @@ function default_1(_a) {
28
28
  return (react_1.default.createElement(Base, { type: type, size: size, variant: variant, onClick: variant !== 'removable' ? onClick : undefined },
29
29
  showIcon && type !== 'disabled' && (react_1.default.createElement(MaterialSymbols_1.MaterialSymbols, { icon: const_1.ICON_MAP[type], size: const_1.ICON_SIZE_MAP[size], color: getColorByProperty(type, variant, 'icon') })),
30
30
  react_1.default.createElement(Typography_1.Typography.Body, { size: size, color: getColorByProperty(type, variant, 'text') }, children),
31
- variant === 'removable' && (react_1.default.createElement(CloseButton, { onClick: onClick, type: "tertiary", icon: react_1.default.createElement(MaterialSymbols_1.MaterialSymbols, { icon: "close", size: const_1.ICON_SIZE_MAP[size], color: getColorByProperty(type, variant, 'icon') }) }))));
31
+ variant === 'removable' && (react_1.default.createElement(CloseButton, { onMouseDown: function (e) {
32
+ e.preventDefault();
33
+ e.stopPropagation();
34
+ }, onClick: function (e) {
35
+ e.preventDefault();
36
+ e.stopPropagation();
37
+ onClick === null || onClick === void 0 ? void 0 : onClick();
38
+ }, type: "tertiary", icon: react_1.default.createElement(MaterialSymbols_1.MaterialSymbols, { icon: "close", size: const_1.ICON_SIZE_MAP[size], color: getColorByProperty(type, variant, 'icon') }) }))));
32
39
  }
33
40
  var getAdditionalStyles = function (_a) {
34
41
  var type = _a.type, _b = _a.variant, variant = _b === void 0 ? 'outlined' : _b, _c = _a.size, size = _c === void 0 ? 'sm' : _c, onClick = _a.onClick;
35
42
  return "\n border-radius: ".concat(variant === 'removable' ? '999px' : '4px', ";\n min-height: ").concat(size === 'sm' ? '24px' : '32px', ";\n background-color: ").concat(type && variant ? getColorByProperty(type, variant, 'base') : 'transparent', ";\n border: 1px solid ").concat(type && variant ? getColorByProperty(type, variant, 'border') : 'transparent', ";\n padding-inline: ").concat(variant === 'removable' ? '12px' : '8px', ";\n cursor: ").concat(onClick ? 'pointer' : 'default', ";\n\n");
36
43
  };
37
- var CloseButton = (0, styled_1.default)(src_1.Button)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n padding: 0 !important;\n width: auto !important;\n height: auto !important;\n }\n\n &&:hover {\n background: transparent !important;\n }\n\n &&:focus {\n background: transparent !important;\n }\n\n &&:active {\n background: transparent !important;\n }\n"], ["\n && {\n padding: 0 !important;\n width: auto !important;\n height: auto !important;\n }\n\n &&:hover {\n background: transparent !important;\n }\n\n &&:focus {\n background: transparent !important;\n }\n\n &&:active {\n background: transparent !important;\n }\n"])));
44
+ var CloseButton = (0, styled_1.default)(index_1.default)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n && {\n padding: 0 !important;\n width: auto !important;\n height: auto !important;\n }\n\n &&:hover {\n background: transparent !important;\n }\n\n &&:focus {\n background: transparent !important;\n }\n\n &&:active {\n background: transparent !important;\n }\n"], ["\n && {\n padding: 0 !important;\n width: auto !important;\n height: auto !important;\n }\n\n &&:hover {\n background: transparent !important;\n }\n\n &&:focus {\n background: transparent !important;\n }\n\n &&:active {\n background: transparent !important;\n }\n"])));
38
45
  var Base = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: fit-content;\n text-transform: capitalize;\n\n ", ";\n"], ["\n display: flex;\n flex-direction: row;\n gap: 4px;\n align-items: center;\n justify-content: center;\n width: fit-content;\n height: fit-content;\n text-transform: capitalize;\n\n ", ";\n"])), function (props) { return getAdditionalStyles(props); });
39
46
  var templateObject_1, templateObject_2;
40
47
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Tag/index.tsx"],"names":[],"mappings":";;;;;;AA+CA,4BA2CC;AA1FD,+BAAyB;AACzB,0CAAoC;AACpC,6DAA2D;AAC3D,kEAAgE;AAChE,2BAA4B;AAC5B,kDAMiC;AAmBjC,SAAS,kBAAkB,CACzB,IAAwD,EACxD,OAAmB,EACnB,QA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AW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,0BAChD,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,UAE1C;AARqB,CAQrB,CAAA;AAED,IAAM,WAAW,GAAG,IAAA,gBAAM,EAAC,eAAM,CAAC,sWAAA,mSAkBjC,IAAA,CAAA;AACD,IAAM,IAAI,GAAG,gBAAM,CAAC,GAAG,2QAAgB,iMAUnC,EAAqC,KACxC,KADG,UAAC,KAAK,IAAK,OAAA,mBAAmB,CAAC,KAAK,CAAC,EAA1B,CAA0B,CACxC,CAAA"}
@@ -0,0 +1,8 @@
1
+ export declare const PLACEHOLDER_TEXT_SIZE: {
2
+ readonly sm: "md";
3
+ readonly lg: "lg";
4
+ };
5
+ export declare const OPTIONS_TEXT_SIZE: {
6
+ readonly sm: "md";
7
+ readonly lg: "lg";
8
+ };
@@ -0,0 +1,17 @@
1
+ import React from 'react';
2
+ export declare const getSuffixIcon: (secondaryText?: string) => React.JSX.Element;
3
+ export declare const renderLabel: (label: string, tooltip?: React.ReactElement) => React.JSX.Element | null;
4
+ export declare const getPlaceholder: (size: "sm" | "lg", placeholder?: string) => React.JSX.Element | null;
5
+ export declare const renderOptions: (options: Array<{
6
+ value: string;
7
+ label: string;
8
+ disabled?: boolean;
9
+ icon?: React.ComponentType<{
10
+ style?: React.CSSProperties;
11
+ }>;
12
+ }>, size: "sm" | "lg") => React.JSX.Element[];
13
+ export declare const renderHelperText: (helperText?: string) => React.JSX.Element | null;
14
+ export declare const getCustomSelectTag: (mode: string | undefined, disabled: boolean, size: "sm" | "lg") => (({ label, onClose }: {
15
+ label: React.ReactNode;
16
+ onClose: () => void;
17
+ }) => React.JSX.Element) | undefined;
@@ -1,29 +1,31 @@
1
1
  import React, { RefObject } from 'react';
2
2
  import { SelectProps } from 'antd/es/select';
3
+ import type { BaseSelectRef } from 'rc-select';
4
+ import type { BaseOptionType, DefaultOptionType } from 'rc-select/lib/Select';
3
5
  import 'antd/es/select/style/css';
4
- import 'antd/es/tag/style/css';
5
6
  export type Props = {
6
7
  disabled?: boolean;
7
8
  children?: React.ReactNode;
8
- className?: string;
9
- type?: 'dropdown' | 'filter';
10
9
  placeholder?: string;
11
- style?: Record<string, unknown>;
12
- dropdownstyle?: Record<string, unknown>;
13
- open?: boolean;
14
- onClick?: (event: React.MouseEvent<HTMLElement>) => void;
15
- mode?: 'multiple' | 'tags';
10
+ mode?: 'multiple';
16
11
  label?: string;
17
- dropdownAlign?: object;
18
- selectRef?: RefObject<any>;
19
- } & Omit<SelectProps<any>, 'disabled' | 'mode' | 'className'>;
12
+ size?: 'sm' | 'lg';
13
+ error?: boolean;
14
+ labelTooltip?: React.ReactElement;
15
+ secondaryText?: string;
16
+ helperText?: string;
17
+ options?: Array<{
18
+ value: string;
19
+ label: string;
20
+ disabled?: boolean;
21
+ icon?: React.ComponentType<{
22
+ style?: React.CSSProperties;
23
+ }>;
24
+ }>;
25
+ selectRef?: RefObject<BaseSelectRef>;
26
+ } & Omit<SelectProps<unknown, DefaultOptionType | BaseOptionType>, 'disabled' | 'size'>;
20
27
  declare const Select: {
21
- ({ className, children, disabled, type, mode, label, selectRef, ...rest }: Props): React.JSX.Element;
22
- Tag({ className, ...props }: {
23
- [x: string]: any;
24
- className?: string | undefined;
25
- }): React.JSX.Element;
26
- OptGroup: import("rc-select/lib/OptGroup").OptionGroupFC;
28
+ ({ children, disabled, size, mode, label, labelTooltip, selectRef, placeholder, error, secondaryText, helperText, options, ...rest }: Props): React.JSX.Element;
27
29
  Option: import("rc-select/lib/Option").OptionFC;
28
30
  };
29
31
  export default Select;
@@ -1,2 +1,20 @@
1
- import { Props } from './index';
2
- export default function ({ mode, disabled, type }: Pick<Props, 'mode' | 'disabled' | 'type'>): string;
1
+ export declare const LabelContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
2
+ export declare const OptionContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
3
+ export declare const SelectContainer: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, Pick<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement>, keyof import("react").HTMLAttributes<HTMLDivElement>>, object>;
4
+ export declare const StyledAntSelect: import("@emotion/styled-base").StyledComponent<import("antd/es/select").SelectProps<unknown, import("rc-select/lib/Select").DefaultOptionType | import("rc-select/lib/Select").BaseOptionType> & {
5
+ children?: import("react").ReactNode;
6
+ } & {
7
+ ref?: import("react").Ref<import("rc-select/lib/BaseSelect").BaseSelectRef> | undefined;
8
+ }, {
9
+ $size: "sm" | "lg";
10
+ $mode?: "multiple";
11
+ disabled: boolean;
12
+ error: boolean;
13
+ }, object>;
14
+ export declare const StyledDropdown: import("@emotion/styled-base").StyledComponent<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
15
+ $size: "sm" | "lg";
16
+ }, object>;
17
+ export declare const dropdownStyle: {
18
+ padding: number;
19
+ borderRadius: string;
20
+ };