@xfers/design-system 4.5.0-dev.46c0ad3276 → 4.5.0-dev.9b4ee84bdd

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.
Files changed (48) hide show
  1. package/cjs/index.js +9 -9
  2. package/cjs/index.js.map +1 -1
  3. package/dist/components/DatePicker/index.js +16 -16
  4. package/dist/components/DatePicker/index.js.map +1 -1
  5. package/dist/components/DynamicSelect/DynamicSelect.js +3 -3
  6. package/dist/components/DynamicSelect/DynamicSelect.js.map +1 -1
  7. package/dist/components/Input/HelperText.js +17 -0
  8. package/dist/components/Input/HelperText.js.map +1 -0
  9. package/dist/components/Input/InputLabel.js +31 -0
  10. package/dist/components/Input/InputLabel.js.map +1 -0
  11. package/dist/components/Input/index.js +33 -53
  12. package/dist/components/Input/index.js.map +1 -1
  13. package/dist/components/Input/inputStyles.js +25 -0
  14. package/dist/components/Input/inputStyles.js.map +1 -0
  15. package/dist/components/InputWithButton/index.js +35 -0
  16. package/dist/components/InputWithButton/index.js.map +1 -0
  17. package/dist/components/RangePicker/index.js +7 -5
  18. package/dist/components/RangePicker/index.js.map +1 -1
  19. package/dist/components/Select/const.js +12 -0
  20. package/dist/components/Select/const.js.map +1 -0
  21. package/dist/components/Select/helpers.js +52 -0
  22. package/dist/components/Select/helpers.js.map +1 -0
  23. package/dist/components/Select/index.js +10 -27
  24. package/dist/components/Select/index.js.map +1 -1
  25. package/dist/components/Select/style.js +42 -69
  26. package/dist/components/Select/style.js.map +1 -1
  27. package/dist/components/Tag/index.js +10 -3
  28. package/dist/components/Tag/index.js.map +1 -1
  29. package/dist/index.js +4 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/types/components/DatePicker/index.d.ts +8 -1
  32. package/dist/types/components/Input/HelperText.d.ts +6 -0
  33. package/dist/types/components/Input/InputLabel.d.ts +10 -0
  34. package/dist/types/components/Input/index.d.ts +29 -15
  35. package/dist/types/components/Input/inputStyles.d.ts +14 -0
  36. package/dist/types/components/InputWithButton/index.d.ts +18 -0
  37. package/dist/types/components/RangePicker/index.d.ts +3 -1
  38. package/dist/types/components/Select/const.d.ts +8 -0
  39. package/dist/types/components/Select/helpers.d.ts +17 -0
  40. package/dist/types/components/Select/index.d.ts +19 -17
  41. package/dist/types/components/Select/style.d.ts +20 -2
  42. package/dist/types/index.d.ts +1 -0
  43. package/es/{MintSetupWallet-d8dd9538.js → MintSetupWallet-16164339.js} +2 -2
  44. package/es/{MintSetupWallet-d8dd9538.js.map → MintSetupWallet-16164339.js.map} +1 -1
  45. package/es/icons.js +1 -1
  46. package/es/index.js +9 -9
  47. package/es/index.js.map +1 -1
  48. package/package.json +1 -1
@@ -27,25 +27,25 @@ var react_1 = require("react");
27
27
  var emotion_1 = require("emotion");
28
28
  var date_picker_1 = require("antd/es/date-picker");
29
29
  require("antd/es/date-picker/style/css");
30
- var Typography_1 = require("src/components/Typography");
31
30
  var TypographyStyles_1 = require("src/shared/TypographyStyles");
32
- var ColorStyles_1 = require("src/shared/ColorStyles");
33
31
  var ThemeContext_1 = require("src/theme/ThemeContext");
34
- var theme_1 = require("src/theme/theme");
32
+ var inputStyles_1 = require("../Input/inputStyles");
33
+ var InputLabel_1 = require("../Input/InputLabel");
34
+ var HelperText_1 = require("../Input/HelperText");
35
+ var MaterialSymbols_1 = require("src/icons/MaterialSymbols/MaterialSymbols");
35
36
  function default_1(_a) {
36
- var _b = _a.disabled, disabled = _b === void 0 ? false : _b, label = _a.label, _c = _a.required, required = _c === void 0 ? false : _c, rest = __rest(_a, ["disabled", "label", "required"]);
37
- var _d = (0, ThemeContext_1.useTheme)(), error = _d.error, spacing = _d.spacing;
38
- var style = "\n -webkit-font-smoothing: antialiased;\n height: 44px;\n width: 100%;\n\n ".concat(disabled
37
+ var _b = _a.disabled, disabled = _b === void 0 ? false : _b, label = _a.label, _c = _a.required, required = _c === void 0 ? false : _c, _d = _a.optional, optional = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? 'large' : _e, _f = _a.error, error = _f === void 0 ? false : _f, helperText = _a.helperText, showInfoIcon = _a.showInfoIcon, onInfoClick = _a.onInfoClick, rest = __rest(_a, ["disabled", "label", "required", "optional", "size", "error", "helperText", "showInfoIcon", "onInfoClick"]);
38
+ var theme = (0, ThemeContext_1.useTheme)();
39
+ var _g = inputStyles_1.SIZE_CONFIG[size], height = _g.height, borderRadius = _g.borderRadius, padding = _g.padding;
40
+ var borderColor = error ? theme.color.status.critical : theme.color.base.line;
41
+ var style = "\n -webkit-font-smoothing: antialiased;\n height: ".concat(height, ";\n width: 100%;\n\n ").concat(disabled
39
42
  ? "\n pointer-events: none;\n "
40
- : '', "\n\n &.ant-picker {\n border-radius: 5px;\n border-color: #E8E8E8;\n transition: 0.3s all ease;\n\n &:hover {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, " !important;\n }\n\n &.ant-picker-focused {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, " !important;\n box-shadow: 0 0 0 2px ").concat(theme_1.straitsXTheme.brand.primary.background, " !important;\n }\n }\n\n &.ant-picker > .ant-picker-input {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n color: #121212;\n }\n\n & .ant-picker-input > input {\n font-size: 14px;\n color: #121212;\n }\n\n & .ant-picker-input > input::placeholder {\n font-size: 14px;\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\n }\n\n &.ant-picker.ant-picker-disabled {\n background: ").concat(ColorStyles_1.NEUTRAL_COLORS.G100, ";\n border: 1px solid ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n }\n\n & .ant-picker-input > input[disabled] {\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, ";\n }\n\n & .ant-picker-cell-in-view{\n &.ant-picker-cell-today .ant-picker-cell-inner{\n &:before {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n } \n }\n\n &ant-picker-cell-range-end .ant-picker-cell-inner,\n &ant-picker-cell-range-start .ant-picker-cell-inner,\n &ant-picker-cell-selected .ant-picker-cell-inner {\n background: ").concat(theme_1.straitsXTheme.brand.primary.background, ";\n }\n }\n ");
41
- var dropdownStyle = "\n .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner{\n background-color: ".concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n ");
42
- var Asterisk = function () {
43
- return react_1.default.createElement("span", { style: { color: error.text, marginLeft: 2 } }, "*");
44
- };
45
- return (react_1.default.createElement(react_1.default.Fragment, null,
46
- label && (react_1.default.createElement(Typography_1.P1Bold, { style: { display: 'flex', marginBottom: spacing.xs } },
47
- label,
48
- required && react_1.default.createElement(Asterisk, null))),
49
- react_1.default.createElement(date_picker_1.default, __assign({ className: "".concat((0, emotion_1.css)(style)), dropdownClassName: (0, emotion_1.css)(dropdownStyle), disabled: disabled }, rest))));
43
+ : '', "\n\n &.ant-picker {\n border-radius: ").concat(borderRadius, ";\n border-color: ").concat(borderColor, ";\n padding: ").concat(padding, ";\n transition: 0.3s all ease;\n\n &:hover {\n border-color: ").concat(theme.color.base.primary2, " !important;\n }\n\n &.ant-picker-focused {\n border-color: ").concat(theme.color.base.primary2, " !important;\n box-shadow: none !important;\n -webkit-box-shadow: none !important;\n }\n }\n\n &.ant-picker > .ant-picker-input {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n\n & .ant-picker-input > input {\n font-size: 14px;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n\n & .ant-picker-input > input::placeholder {\n font-size: 14px;\n color: ").concat(theme.color.component.placeholderInput, ";\n }\n\n &.ant-picker.ant-picker-disabled {\n background: ").concat(theme.color.surface.disabledSurface, ";\n border: 1px solid ").concat(theme.color.base.line, ";\n }\n\n & .ant-picker-input > input[disabled] {\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n }\n\n & .ant-picker-cell-in-view{\n &.ant-picker-cell-today .ant-picker-cell-inner{\n &:before {\n border-color: ").concat(theme.color.base.primary2, ";\n } \n }\n\n &ant-picker-cell-range-end .ant-picker-cell-inner,\n &ant-picker-cell-range-start .ant-picker-cell-inner,\n &ant-picker-cell-selected .ant-picker-cell-inner {\n background: ").concat(theme.color.base.primary2, ";\n }\n }\n ");
44
+ var dropdownStyle = "\n .ant-picker-cell-in-view.ant-picker-cell-selected .ant-picker-cell-inner{\n background-color: ".concat(theme.color.base.primary2, ";\n }\n ");
45
+ var calendarIcon = (react_1.default.createElement(MaterialSymbols_1.default, { icon: "date_range", size: "m", color: theme.color.base.onNeutral }));
46
+ return (react_1.default.createElement("div", null,
47
+ react_1.default.createElement(InputLabel_1.InputLabel, { label: label, required: required, optional: optional, showInfoIcon: showInfoIcon, onInfoClick: onInfoClick }),
48
+ react_1.default.createElement(date_picker_1.default, __assign({ className: "".concat((0, emotion_1.css)(style)), dropdownClassName: (0, emotion_1.css)(dropdownStyle), disabled: disabled, suffixIcon: calendarIcon }, rest)),
49
+ react_1.default.createElement(HelperText_1.HelperText, { text: helperText, error: error })));
50
50
  }
51
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/DatePicker/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA0BA,4BA2GC;AArID,+BAAyB;AACzB,mCAA6B;AAC7B,mDAA4C;AAC5C,yCAAsC;AACtC,wDAAkD;AAClD,gEAAuD;AACvD,sDAAuD;AACvD,uDAAiD;AACjD,yCAA+C;AAkB/C,mBAAwB,EAKhB;IAJN,IAAA,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EAChB,KAAK,WAAA,EACL,gBAAgB,EAAhB,QAAQ,mBAAG,KAAK,KAAA,EACb,IAAI,cAJe,iCAKvB,CADQ;IAED,IAAA,KAAqB,IAAA,uBAAQ,GAAE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B,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,mFAIjC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,wCAC7B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,mFAIhC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,6JAM1B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,2OAO7B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,0BAG5C,CAAA;IAED,IAAM,aAAa,GAAG,mHAEE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,iBAEhD,CAAA;IAED,IAAM,YAAY,GAAG,CACnB,8BAAC,yBAAe,IACd,IAAI,EAAC,YAAY,EACjB,IAAI,EAAC,GAAG,EACR,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,GACjC,CACH,CAAA;IAED,OAAO,CACL;QACE,8BAAC,uBAAU,IACT,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,QAAQ,EAClB,QAAQ,EAAE,QAAQ,EAClB,YAAY,EAAE,YAAY,EAC1B,WAAW,EAAE,WAAW,GACxB;QACF,8BAAC,qBAAU,aACT,SAAS,EAAE,UAAG,IAAA,aAAG,EAAC,KAAK,CAAC,CAAE,EAC1B,iBAAiB,EAAE,IAAA,aAAG,EAAC,aAAa,CAAC,EACrC,QAAQ,EAAE,QAAQ,EAClB,UAAU,EAAE,YAAY,IACpB,IAAI,EACR;QACF,8BAAC,uBAAU,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI,CAC1C,CACP,CAAA;AACH,CAAC"}
@@ -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":"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,mBAA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d,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAsB,EAAtB,WAAW,mBAAG,cAAO,CAAC,KAAA,EACtB,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,EAC1B,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,qBAAoB,EAApB,aAAa,mBAAG,IAAI,KAAA,EACpB,qBAAoB,EAApB,aAAa,mBAAG,IAAI,KAAA,EACjB,IAAI,cAbc,oKActB,CADQ;IAEP,OAAO,CACL,8BAAC,gBAAM,aACL,SAAS,EAAE,SAAS,EACpB,IAAI,EAAC,UAAU,EACf,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,UAAA,IAAI;YAClB,OAAA,YAAY,CAAC,IAAI,EAAE;gBACjB,OAAO,SAAA;gBACP,SAAS,WAAA;gBACT,WAAW,aAAA;gBACX,mBAAmB,qBAAA;gBACnB,UAAU,YAAA;gBACV,aAAa,eAAA;gBACb,aAAa,eAAA;aACd,CAAC;QARF,CAQE,IAEA,IAAI,GAEP,QAAQ,CACF,CACV,CAAA;AACH,CAAC,CAAA;AAED,aAAa,CAAC,MAAM,GAAG,gBAAM,CAAC,MAAM,CAAA;AAEpC,IAAM,IAAI,GAAG,gBAAM,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"}
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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QAAQ,mBAAG,KAAK,KAAA,EAChB,IAAI,UAAA,EACJ,KAAK,WAAA,EACL,eAAY,EAAZ,OAAO,mBAAG,EAAE,KAAA,EACZ,iBAAc,EAAd,SAAS,mBAAG,EAAE,KAAA,EACd,mBAAsB,EAAtB,WAAW,mBAAG,cAAO,CAAC,KAAA,EACtB,2BAA0B,EAA1B,mBAAmB,mBAAG,IAAI,KAAA,EAC1B,kBAAiB,EAAjB,UAAU,mBAAG,IAAI,KAAA,EACjB,qBAAoB,EAApB,aAAa,mBAAG,IAAI,KAAA,EACpB,qBAAoB,EAApB,aAAa,mBAAG,IAAI,KAAA,EACjB,IAAI,cAbc,oKActB,CADQ;IAEP,OAAO,CACL,8BAAC,gBAAM,aACL,SAAS,EAAE,SAAS,EACpB,QAAQ,EAAE,QAAQ,EAClB,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,cAAc,EAAE,UAAC,IAAI;YACnB,OAAA,YAAY,CAAC,IAAI,EAAE;gBACjB,OAAO,SAAA;gBACP,SAAS,WAAA;gBACT,WAAW,aAAA;gBACX,mBAAmB,qBAAA;gBACnB,UAAU,YAAA;gBACV,aAAa,eAAA;gBACb,aAAa,eAAA;aACd,CAAC;QARF,CAQE,IAEA,IAAI,GAEP,QAAQ,CACF,CACV,CAAA;AACH,CAAC,CAAA;AAED,aAAa,CAAC,MAAM,GAAG,gBAAM,CAAC,MAAM,CAAA;AAEpC,IAAM,IAAI,GAAG,gBAAM,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,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.HelperText = HelperText;
4
+ var react_1 = require("react");
5
+ var Typography_1 = require("src/components/Typography");
6
+ var ThemeContext_1 = require("src/theme/ThemeContext");
7
+ function HelperText(_a) {
8
+ var text = _a.text, error = _a.error;
9
+ var theme = (0, ThemeContext_1.useTheme)();
10
+ if (!text)
11
+ return null;
12
+ var color = error
13
+ ? theme.color.status.critical
14
+ : theme.color.component.helperInput;
15
+ return (react_1.default.createElement(Typography_1.SmallP, { style: { color: color, marginTop: 4 } }, text));
16
+ }
17
+ //# sourceMappingURL=HelperText.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HelperText.js","sourceRoot":"","sources":["../../../src/components/Input/HelperText.tsx"],"names":[],"mappings":";;AASA,gCAcC;AAvBD,+BAAyB;AACzB,wDAAkD;AAClD,uDAAiD;AAOjD,SAAgB,UAAU,CAAC,EAAgC;QAA9B,IAAI,UAAA,EAAE,KAAK,WAAA;IACtC,IAAM,KAAK,GAAG,IAAA,uBAAQ,GAAE,CAAA;IAExB,IAAI,CAAC,IAAI;QAAE,OAAO,IAAI,CAAA;IAEtB,IAAM,KAAK,GAAG,KAAK;QACjB,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,QAAQ;QAC7B,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,CAAA;IAErC,OAAO,CACL,8BAAC,mBAAM,IAAC,KAAK,EAAE,EAAE,KAAK,OAAA,EAAE,SAAS,EAAE,CAAC,EAAE,IACnC,IAAI,CACE,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,31 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ exports.InputLabel = InputLabel;
8
+ var react_1 = require("react");
9
+ var styled_1 = require("@emotion/styled");
10
+ var ThemeContext_1 = require("src/theme/ThemeContext");
11
+ var icons_1 = require("src/icons");
12
+ var TypographyStyles_1 = require("src/shared/TypographyStyles");
13
+ var Tooltip_1 = require("src/components/Tooltip");
14
+ var LabelContainer = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n gap: 4px;\n margin-bottom: 4px;\n"], ["\n display: flex;\n align-items: center;\n gap: 4px;\n margin-bottom: 4px;\n"])));
15
+ var LabelText = styled_1.default.span(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n font-family: ", ";\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n"], ["\n font-family: ", ";\n font-size: 14px;\n font-weight: 400;\n line-height: normal;\n"])), TypographyStyles_1.MAIN_FONT);
16
+ function InputLabel(_a) {
17
+ var label = _a.label, required = _a.required, optional = _a.optional, showInfoIcon = _a.showInfoIcon, infoText = _a.infoText, onInfoClick = _a.onInfoClick;
18
+ var theme = (0, ThemeContext_1.useTheme)();
19
+ if (!label)
20
+ return null;
21
+ return (react_1.default.createElement(LabelContainer, null,
22
+ react_1.default.createElement(LabelText, { style: { color: theme.color.base.onNeutral } },
23
+ label,
24
+ required && (react_1.default.createElement("span", { style: { color: theme.error.text, marginLeft: 2 } }, "*"))),
25
+ optional && (react_1.default.createElement(LabelText, { style: { color: theme.color.base.onNeutralSecondary } }, "Optional")),
26
+ showInfoIcon && infoText && (react_1.default.createElement(Tooltip_1.default, { content: infoText, placement: "top" },
27
+ react_1.default.createElement(icons_1.Info, { style: { cursor: 'pointer', width: 16, height: 16 }, onClick: onInfoClick }))),
28
+ showInfoIcon && !infoText && (react_1.default.createElement(icons_1.Info, { style: { cursor: 'pointer', width: 16, height: 16 }, onClick: onInfoClick }))));
29
+ }
30
+ var templateObject_1, templateObject_2;
31
+ //# sourceMappingURL=InputLabel.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputLabel.js","sourceRoot":"","sources":["../../../src/components/Input/InputLabel.tsx"],"names":[],"mappings":";;;;;;AA8BA,gCAyCC;AAvED,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AE,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,EACnD,OAAO,EAAE,WAAW,GACpB,CACH,CACc,CAClB,CAAA;AACH,CAAC"}
@@ -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++) {
@@ -28,67 +24,51 @@ var __rest = (this && this.__rest) || function (s, e) {
28
24
  Object.defineProperty(exports, "__esModule", { value: true });
29
25
  var react_1 = require("react");
30
26
  var emotion_1 = require("emotion");
31
- var styled_1 = require("@emotion/styled");
32
27
  var input_1 = require("antd/es/input");
33
- var Typography_1 = require("src/components/Typography");
34
- var Link_1 = require("src/components/Link");
35
28
  var ThemeContext_1 = require("src/theme/ThemeContext");
36
- var icons_1 = require("src/icons");
29
+ var MaterialSymbols_1 = require("src/icons/MaterialSymbols/MaterialSymbols");
30
+ var inputStyles_1 = require("./inputStyles");
31
+ var HelperText_1 = require("./HelperText");
32
+ var InputLabel_1 = require("./InputLabel");
37
33
  require("antd/es/input/style/css");
38
- // deprecated constants
39
- var ColorStyles_1 = require("src/shared/ColorStyles");
40
- var theme_1 = require("src/theme/theme");
41
- var TypographyStyles_1 = require("src/shared/TypographyStyles");
42
- var style = "\n -webkit-font-smoothing: antialiased;\n\n & .ant-input, &.ant-input, &.ant-input-password {\n padding: 0;\n font-family: ".concat(TypographyStyles_1.MAIN_FONT, ";\n font-size: ").concat(TypographyStyles_1.FONT_SIZE.P1, ";\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, ";\n line-height: 17px;\n padding-left: 15px;\n padding-top: 12px;\n padding-bottom: 13px;\n\n &::placeholder {\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\n font-weight: 400;\n }\n }\n\n &.ant-input, &.ant-input-password {\n border-radius: 5px;\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n\n &:hover {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n\n &:focus {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n -webkit-box-shadow: 0 0 0 3px #F0FFF9;\n box-shadow: 0 0 0 3px #F0FFF9;\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, "\n }\n }\n\n & .ant-input, .ant-input-password {\n border-top-right-radius: 5px;\n border-bottom-right-radius: 5px;\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n\n &:hover {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n\n &:focus {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n -webkit-box-shadow: 0 0 0 3px #F0FFF9;\n box-shadow: 0 0 0 3px #F0FFF9;\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, "\n }\n }\n\n &.ant-input-disabled {\n background-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G100, ";\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n\n &:hover {\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n }\n }\n\n & .ant-input-group-addon:not(:last-child) {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, ";\n background-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G100, ";\n border-top-left-radius: 5px;\n border-bottom-left-radius: 5px;\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n border-right: 0;\n padding-left: 15px;\n padding-right: 15px;\n\n + .ant-input-disabled {\n background-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G100, ";\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\n\n &:hover {\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n }\n }\n }\n\n & .ant-input-group-addon:last-child {\n border-top-right-radius: 5px;\n border-bottom-right-radius: 5px;\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n }\n\n &.ant-input-search {\n padding: 0;\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-size: ").concat(TypographyStyles_1.FONT_SIZE.P1, ";\n line-height: 17px;\n padding-left: 15px;\n padding-top: 6px;\n padding-bottom: 6px;\n border-radius: 5px;\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\n width: 132px;\n\n &::placeholder {\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\n font-weight: 400;\n }\n\n &:hover {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n\n & > .ant-input-suffix {\n width: 18px;\n margin-right: 14px;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n }\n\n &.ant-input-affix-wrapper-focused {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n -webkit-box-shadow: 0 0 0 3px #F0FFF9;\n box-shadow: 0 0 0 3px #F0FFF9;\n }\n");
43
- var Asterisk = function () {
44
- var error = (0, ThemeContext_1.useTheme)().error;
45
- return react_1.default.createElement("span", { style: { color: error.text, marginLeft: 2 } }, "*");
46
- };
47
- var OptionalText = function () {
48
- return (react_1.default.createElement(Typography_1.SmallP, { style: { color: ColorStyles_1.NEUTRAL_COLORS.G500, marginLeft: 3 } }, "Optional"));
49
- };
50
- var Label = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: space-between;\n margin-bottom: 5px;\n"], ["\n display: flex;\n justify-content: space-between;\n margin-bottom: 5px;\n"])));
51
34
  var MainInput = function (_a) {
52
- var _b = _a.addonBefore, addonBefore = _b === void 0 ? '' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? '' : _e, label = _a.label, required = _a.required, _f = _a.optional, optional = _f === void 0 ? false : _f, rest = __rest(_a, ["addonBefore", "placeholder", "disabled", "className", "label", "required", "optional"]);
53
- return (react_1.default.createElement(react_1.default.Fragment, null,
54
- label && (react_1.default.createElement(Label, null,
55
- react_1.default.createElement(Typography_1.P1Bold, null,
56
- label,
57
- required && react_1.default.createElement(Asterisk, null)),
58
- optional && react_1.default.createElement(OptionalText, null))),
59
- react_1.default.createElement(input_1.default, __assign({ className: "".concat((0, emotion_1.css)(style), " ").concat(className), addonBefore: addonBefore, placeholder: placeholder, disabled: disabled }, rest))));
35
+ var addonBefore = _a.addonBefore, addonAfter = _a.addonAfter, _b = _a.placeholder, placeholder = _b === void 0 ? '' : _b, _c = _a.disabled, disabled = _c === void 0 ? false : _c, _d = _a.disabledAddon, disabledAddon = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? '' : _e, label = _a.label, required = _a.required, _f = _a.optional, optional = _f === void 0 ? false : _f, _g = _a.size, size = _g === void 0 ? 'large' : _g, helperText = _a.helperText, error = _a.error, showInfoIcon = _a.showInfoIcon, infoText = _a.infoText, onInfoClick = _a.onInfoClick, rest = __rest(_a, ["addonBefore", "addonAfter", "placeholder", "disabled", "disabledAddon", "className", "label", "required", "optional", "size", "helperText", "error", "showInfoIcon", "infoText", "onInfoClick"]);
36
+ var theme = (0, ThemeContext_1.useTheme)();
37
+ var style = (0, inputStyles_1.getBaseInputStyle)(theme, size, error, disabledAddon);
38
+ return (react_1.default.createElement("div", null,
39
+ react_1.default.createElement(InputLabel_1.InputLabel, { label: label, required: required, optional: optional, showInfoIcon: showInfoIcon, infoText: infoText, onInfoClick: onInfoClick }),
40
+ react_1.default.createElement(input_1.default, __assign({ className: "".concat((0, emotion_1.css)(style), " ").concat(className), addonBefore: addonBefore, addonAfter: addonAfter, placeholder: placeholder, disabled: disabled }, rest)),
41
+ react_1.default.createElement(HelperText_1.HelperText, { text: helperText, error: error })));
60
42
  };
61
43
  MainInput.Password = function (_a) {
62
- var _b = _a.addonBefore, addonBefore = _b === void 0 ? '' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? '' : _e, label = _a.label, required = _a.required, rest = __rest(_a, ["addonBefore", "placeholder", "disabled", "className", "label", "required"]);
63
- return (react_1.default.createElement(react_1.default.Fragment, null,
64
- label && (react_1.default.createElement(Label, null,
65
- react_1.default.createElement(Typography_1.P1Bold, null,
66
- label,
67
- required && react_1.default.createElement(Asterisk, null)))),
68
- react_1.default.createElement(input_1.default.Password, __assign({ className: "".concat((0, emotion_1.css)(style), " ").concat(className), addonBefore: addonBefore, placeholder: placeholder, disabled: disabled, visibilityToggle: false }, rest))));
44
+ var _b = _a.addonBefore, addonBefore = _b === void 0 ? '' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.disabled, disabled = _d === void 0 ? false : _d, _e = _a.className, className = _e === void 0 ? '' : _e, label = _a.label, required = _a.required, _f = _a.optional, optional = _f === void 0 ? false : _f, _g = _a.size, size = _g === void 0 ? 'large' : _g, helperText = _a.helperText, error = _a.error, showInfoIcon = _a.showInfoIcon, infoText = _a.infoText, onInfoClick = _a.onInfoClick, rest = __rest(_a, ["addonBefore", "placeholder", "disabled", "className", "label", "required", "optional", "size", "helperText", "error", "showInfoIcon", "infoText", "onInfoClick"]);
45
+ var theme = (0, ThemeContext_1.useTheme)();
46
+ var style = (0, inputStyles_1.getBaseInputStyle)(theme, size, error);
47
+ return (react_1.default.createElement("div", null,
48
+ react_1.default.createElement(InputLabel_1.InputLabel, { label: label, required: required, optional: optional, showInfoIcon: showInfoIcon, infoText: infoText, onInfoClick: onInfoClick }),
49
+ react_1.default.createElement(input_1.default.Password, __assign({ className: "".concat((0, emotion_1.css)(style), " ").concat(className), addonBefore: addonBefore, placeholder: placeholder, disabled: disabled, visibilityToggle: true }, rest)),
50
+ react_1.default.createElement(HelperText_1.HelperText, { text: helperText, error: error })));
69
51
  };
70
52
  MainInput.Search = function (_a) {
71
- var _b = _a.addonBefore, addonBefore = _b === void 0 ? '' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, onChange = _a.onChange, onSearch = _a.onSearch, rest = __rest(_a, ["addonBefore", "placeholder", "className", "onChange", "onSearch"]);
72
- var _e = (0, ThemeContext_1.useTheme)(), neutral = _e.neutral, text = _e.text, primary = _e.brand.primary;
73
- var searchStyle = "\n & .ant-input-group-addon:not(:last-child) {\n font-family: ".concat(TypographyStyles_1.MAIN_FONT, ";\n color: ").concat(text.default, ";\n background-color: ").concat(neutral.white, ";\n border-top-left-radius: 5px;\n border-bottom-left-radius: 5px;\n border: 1px solid ").concat(neutral.border, ";\n border-right: 0;\n padding: ").concat(typeof addonBefore === 'string' ? '0 15px' : '0', ";\n\n & .ant-select {\n margin: 0;\n \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 height: 38px;\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(primary.default, ";\n -webkit-box-shadow: 0 0 0 2px ").concat(primary.default, "33;\n box-shadow: 0 0 0 2px ").concat(primary.default, "33;\n }\n } \n }\n\n & .ant-input-affix-wrapper, &.ant-input-affix-wrapper {\n border-radius: 5px;\n border: 1px solid ").concat(neutral.border, ";\n padding: 8px 15px !important;\n\n &:hover {\n border-color: ").concat(primary.default, ";\n }\n }\n\n & .ant-input-affix-wrapper-focused, .ant-input-affix-wrapper:focus {\n border-color: ").concat(primary.default, ";\n -webkit-box-shadow: 0 0 0 2px ").concat(primary.default, "33;\n box-shadow: 0 0 0 2px ").concat(primary.default, "33;\n }\n ");
74
- return (react_1.default.createElement(input_1.default, __assign({ placeholder: placeholder, addonBefore: addonBefore, onChange: onChange, onKeyDown: onSearch, className: "".concat((0, emotion_1.css)(searchStyle)), suffix: react_1.default.createElement(Link_1.default, { style: {
75
- display: 'grid',
76
- justifyContent: 'center'
77
- }, onClick: onSearch },
78
- react_1.default.createElement(icons_1.Search, { style: { color: neutral.emphasis } })) }, rest)));
53
+ var _b = _a.addonBefore, addonBefore = _b === void 0 ? '' : _b, _c = _a.placeholder, placeholder = _c === void 0 ? '' : _c, _d = _a.className, className = _d === void 0 ? '' : _d, onChange = _a.onChange, onSearch = _a.onSearch, _e = _a.size, size = _e === void 0 ? 'large' : _e, helperText = _a.helperText, error = _a.error, rest = __rest(_a, ["addonBefore", "placeholder", "className", "onChange", "onSearch", "size", "helperText", "error"]);
54
+ var theme = (0, ThemeContext_1.useTheme)();
55
+ var searchStyle = (0, inputStyles_1.getBaseInputStyle)(theme, size, error) + "\n & .ant-input-group-addon:not(:last-child) {\n background-color: ".concat(theme.color.surface.neutral, ";\n padding: ").concat(typeof addonBefore === 'string' ? '0 15px' : '0', ";\n }\n &.ant-input-affix-wrapper .ant-input-prefix {\n margin-right: 8px;\n display: flex;\n align-items: center;\n }\n ");
56
+ return (react_1.default.createElement(react_1.default.Fragment, null,
57
+ react_1.default.createElement(input_1.default, __assign({ placeholder: placeholder, addonBefore: addonBefore, onChange: onChange, onKeyDown: onSearch, className: "".concat((0, emotion_1.css)(searchStyle), " ").concat(className), prefix: react_1.default.createElement("span", { onClick: onSearch, style: { display: 'flex', cursor: onSearch ? 'pointer' : 'default' } },
58
+ react_1.default.createElement(MaterialSymbols_1.default, { icon: "search", size: size === 'small' ? 'xs' : 'm', color: theme.color.base.onNeutral })) }, rest)),
59
+ react_1.default.createElement(HelperText_1.HelperText, { text: helperText, error: error })));
79
60
  };
80
61
  MainInput.TextArea = function (_a) {
81
- var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.required, required = _c === void 0 ? false : _c, _d = _a.optional, optional = _d === void 0 ? false : _d, rest = __rest(_a, ["className", "label", "required", "optional"]);
82
- var textAreaStyle = "\t \n &.ant-input {\t \n resize: none;\t\n border-radius: 5px;\t \n font-family: ".concat(TypographyStyles_1.MAIN_FONT, ";\t \n font-size: ").concat(TypographyStyles_1.FONT_SIZE.P1, ";\t \n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, ";\t \n line-height: 17px;\t\n padding-top: 12px;\t\n padding-left: 15px;\t\n padding-right: 15px;\t\n padding-bottom: 12px;\t\n border-color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G200, ";\t\n }\t\n &.ant-input::placeholder {\t\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\t\n font-weight: 400;\t\n }\t\n &.ant-input:hover {\t\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\t\n }\t\n &.ant-input:focus {\t\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\t\n -webkit-box-shadow: 0 0 0 3px #F0FFF9;\t\n box-shadow: 0 0 0 3px #F0FFF9;\t\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.BLACK, "\t\n }\t\n");
62
+ var _b = _a.className, className = _b === void 0 ? '' : _b, label = _a.label, _c = _a.required, required = _c === void 0 ? false : _c, _d = _a.optional, optional = _d === void 0 ? false : _d, _e = _a.size, size = _e === void 0 ? 'large' : _e, helperText = _a.helperText, error = _a.error, showInfoIcon = _a.showInfoIcon, infoText = _a.infoText, onInfoClick = _a.onInfoClick, rest = __rest(_a, ["className", "label", "required", "optional", "size", "helperText", "error", "showInfoIcon", "infoText", "onInfoClick"]);
63
+ var theme = (0, ThemeContext_1.useTheme)();
64
+ var borderColor = error ? theme.color.status.critical : theme.color.base.line;
65
+ var _f = inputStyles_1.SIZE_CONFIG[size], borderRadius = _f.borderRadius, padding = _f.padding;
66
+ var textAreaStyle = (0, inputStyles_1.getBaseInputStyle)(theme, size, error) + "\n &.ant-input {\n min-height: 72px;\n height: auto;\n resize: none;\n border-radius: ".concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n }\n }\n ");
83
67
  return (react_1.default.createElement(react_1.default.Fragment, null,
84
- label && (react_1.default.createElement(Label, null,
85
- react_1.default.createElement(Typography_1.P1Bold, null,
86
- label,
87
- required && react_1.default.createElement(Asterisk, null)),
88
- optional && react_1.default.createElement(OptionalText, null))),
89
- react_1.default.createElement(input_1.default.TextArea, __assign({ className: "".concat((0, emotion_1.css)(textAreaStyle), " ").concat(className) }, rest))));
68
+ react_1.default.createElement(InputLabel_1.InputLabel, { label: label, required: required, optional: optional, showInfoIcon: showInfoIcon, infoText: infoText, onInfoClick: onInfoClick }),
69
+ react_1.default.createElement(input_1.default.TextArea, __assign({ className: "".concat((0, emotion_1.css)(textAreaStyle), " ").concat(className) }, rest)),
70
+ react_1.default.createElement(HelperText_1.HelperText, { text: helperText, error: error })));
90
71
  };
91
72
  MainInput.Group = input_1.default.Group;
92
73
  exports.default = MainInput;
93
- var templateObject_1;
94
74
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Input/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAyB;AACzB,mCAA6B;AAC7B,0CAAoC;AACpC,uCAAiD;AACjD,wDAA0D;AAC1D,4CAAsC;AACtC,uDAAiD;AACjD,mCAAkC;AAClC,mCAAgC;AAEhC,uBAAuB;AACvB,sDAAuD;AACvD,yCAA+C;AAC/C,gEAAkE;AAElE,IAAM,KAAK,GAAG,6IAKK,4BAAS,+BACX,4BAAS,CAAC,EAAE,2BAChB,4BAAc,CAAC,KAAK,yJAOlB,4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W,GACxB;QACF,8BAAC,eAAK,CAAC,QAAQ,aACb,SAAS,EAAE,UAAG,IAAA,aAAG,EAAC,aAAa,CAAC,cAAI,SAAS,CAAE,IAC3C,IAAI,EACR;QACF,8BAAC,uBAAU,IAAC,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAI,CAC7C,CACJ,CAAA;AACH,CAAC,CAAA;AAED,SAAS,CAAC,KAAK,GAAG,eAAK,CAAC,KAAK,CAAA;AAE7B,kBAAe,SAAS,CAAA"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SIZE_CONFIG = void 0;
4
+ exports.getBaseInputStyle = getBaseInputStyle;
5
+ var TypographyStyles_1 = require("src/shared/TypographyStyles");
6
+ exports.SIZE_CONFIG = {
7
+ large: {
8
+ height: '48px',
9
+ borderRadius: '12px',
10
+ padding: '12px 16px',
11
+ },
12
+ small: {
13
+ height: '36px',
14
+ borderRadius: '8px',
15
+ padding: '8px 12px',
16
+ },
17
+ };
18
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
19
+ function getBaseInputStyle(theme, size, error, disabledAddon) {
20
+ if (size === void 0) { size = 'large'; }
21
+ var _a = exports.SIZE_CONFIG[size], height = _a.height, borderRadius = _a.borderRadius, padding = _a.padding;
22
+ var borderColor = error ? theme.color.status.critical : theme.color.base.line;
23
+ return "\n -webkit-font-smoothing: antialiased;\n\n /* Shared font/sizing for all .ant-input elements */\n & .ant-input, &.ant-input, &.ant-input-password {\n padding: ".concat(padding, ";\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-size: ").concat(TypographyStyles_1.FONT_SIZE.P1, ";\n color: ").concat(theme.color.base.onNeutral, ";\n line-height: 17px;\n height: ").concat(height, ";\n box-sizing: border-box;\n &::placeholder {\n color: ").concat(theme.color.component.placeholderInput, ";\n font-weight: 400;\n }\n }\n\n /* Case 1: Standalone input \u2014 class directly on .ant-input */\n &.ant-input, &.ant-input-password {\n border-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n\n /* Case 2: Input with addon \u2014 class on .ant-input-group-wrapper */\n /* addonBefore: input is after addon \u2014 flat left, rounded right */\n & .ant-input-group > .ant-input:last-child {\n border-radius: 0 ").concat(borderRadius, " ").concat(borderRadius, " 0 !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n /* addonAfter: input is before addon \u2014 rounded left, flat right */\n & .ant-input-group > .ant-input:first-child {\n border-radius: ").concat(borderRadius, " 0 0 ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &:focus {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n }\n\n /* Case 3: Input with prefix (e.g. Search without addon) \u2014 class on .ant-input-affix-wrapper */\n &.ant-input-affix-wrapper {\n border-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n & .ant-input {\n height: auto;\n padding: 0;\n border: none;\n border-radius: 0 !important;\n }\n }\n &.ant-input-affix-wrapper-focused {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n }\n\n /* Case 4: addon + prefix (Search with Select addon) \u2014 class on .ant-input-group-wrapper */\n & .ant-input-group > .ant-input-affix-wrapper {\n border-radius: 0 ").concat(borderRadius, " ").concat(borderRadius, " 0 !important;\n border-color: ").concat(borderColor, ";\n height: ").concat(height, ";\n padding: ").concat(padding, ";\n padding-left: 8px;\n &:hover { border-color: ").concat(theme.color.base.primary2, "; }\n &.ant-input-affix-wrapper-focused {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n }\n & .ant-input {\n height: auto;\n padding: 0;\n border: none;\n border-radius: 0 !important;\n box-shadow: none;\n &:hover, &:focus { border: none; box-shadow: none; }\n }\n }\n\n /* Disabled states */\n &.ant-input-disabled, & .ant-input-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n border-color: ").concat(theme.color.base.line, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n &:hover { border-color: ").concat(theme.color.base.line, "; }\n }\n &.ant-input-affix-wrapper-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n border-color: ").concat(theme.color.base.line, ";\n & .ant-input-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n }\n &:hover { border-color: ").concat(theme.color.base.line, "; }\n }\n\n /* Addon containers */\n & .ant-input-group-addon:not(:last-child) {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n color: ").concat(theme.color.base.onNeutral, ";\n background-color: ").concat(theme.color.surface.secondaryNeutral, ";\n border-top-left-radius: ").concat(borderRadius, " !important;\n border-bottom-left-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n border-right: 0;\n padding-left: 12px;\n padding-right: 8px;\n &:has(.ant-select) {\n padding: 0;\n .ant-select-focused .ant-select-selector {\n border-color: transparent !important;\n box-shadow: none !important;\n }\n .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n background: transparent !important;\n height: 100%;\n }\n }\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.neutral, ";\n padding-left: 12px;\n padding-right: 8px;\n }\n + .ant-input-disabled {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n border-color: ").concat(theme.color.base.line, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n &:hover { border-color: ").concat(theme.color.base.line, "; }\n }\n }\n & .ant-input-group-addon:last-child {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n color: ").concat(theme.color.base.onNeutral, ";\n background-color: ").concat(theme.color.surface.secondaryNeutral, ";\n border-top-right-radius: ").concat(borderRadius, " !important;\n border-bottom-right-radius: ").concat(borderRadius, " !important;\n border-color: ").concat(borderColor, ";\n border-left: 0;\n padding-left: 16px;\n padding-right: 16px;\n &:has(.ant-select) {\n padding: 0;\n .ant-select-focused .ant-select-selector {\n border-color: transparent !important;\n box-shadow: none !important;\n }\n .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n background: transparent !important;\n height: 100%;\n }\n }\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.neutral, ";\n padding-left: 8px;\n padding-right: 12px;\n }\n }\n ").concat(disabledAddon ? "\n & .ant-input-group-addon:last-child {\n background-color: ".concat(theme.color.surface.disabledSurface, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n pointer-events: none;\n cursor: not-allowed;\n border-color: ").concat(theme.color.base.line, ";\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n }\n }\n & .ant-input-group-addon:not(:last-child) {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n color: ").concat(theme.color.surface.disabledOnSurface, ";\n pointer-events: none;\n cursor: not-allowed;\n border-color: ").concat(theme.color.base.line, ";\n &:has([data-addon-custom]) {\n background-color: ").concat(theme.color.surface.disabledSurface, ";\n }\n }\n ") : '', "\n ");
24
+ }
25
+ //# sourceMappingURL=inputStyles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inputStyles.js","sourceRoot":"","sources":["../../../src/components/Input/inputStyles.ts"],"names":[],"mappings":";;;AAkBA,8CAgNC;AAlOD,gEAAkE;AAIrD,QAAA,WAAW,GAAG;IACzB,KAAK,EAAE;QACL,MAAM,EAAE,M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AAC,iBAAiB,gDACpB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,gGAIlC,4BAAS,6BACf,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,wCACf,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,gBAAgB,+CAC7B,YAAY,6DACT,YAAY,+CAC1B,WAAW,6iBAkBL,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,8FAKjD,aAAa,CAAC,CAAC,CAAC,+EAEI,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,6BAC9C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,6FAG9B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,8EAEf,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,yGAIrC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,6BAC9C,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,6FAG9B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,8EAEf,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,4BAG1D,CAAC,CAAC,CAAC,EAAE,SACP,CAAA;AACH,CAAC"}
@@ -0,0 +1,35 @@
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
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var react_1 = require("react");
8
+ var styled_1 = require("@emotion/styled");
9
+ var ThemeContext_1 = require("src/theme/ThemeContext");
10
+ var TypographyStyles_1 = require("src/shared/TypographyStyles");
11
+ var Container = styled_1.default.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n height: 48px;\n width: 100%;\n position: relative;\n"], ["\n display: flex;\n height: 48px;\n width: 100%;\n position: relative;\n"])));
12
+ var PrefixContainer = styled_1.default.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n padding: 0 16px;\n border: 1px solid ", ";\n border-right: none;\n border-radius: 12px 0 0 12px;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n white-space: nowrap;\n cursor: ", ";\n box-sizing: border-box;\n overflow: visible;\n\n & > * {\n pointer-events: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n padding: 0 16px;\n border: 1px solid ", ";\n border-right: none;\n border-radius: 12px 0 0 12px;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n white-space: nowrap;\n cursor: ", ";\n box-sizing: border-box;\n overflow: visible;\n\n & > * {\n pointer-events: ", ";\n }\n\n &:hover {\n background-color: ", ";\n }\n"])), function (p) { return p.borderColor; }, function (p) { return p.bgColor; }, function (p) { return p.textColor; }, TypographyStyles_1.MAIN_FONT, TypographyStyles_1.FONT_SIZE.P1, function (p) { return (p.isDisabled ? 'not-allowed' : 'default'); }, function (p) { return (p.isDisabled ? 'none' : 'auto'); }, function (p) { return (p.isDisabled ? p.bgColor : p.hoverBgColor); });
13
+ var StyledInput = styled_1.default.input(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex: 1;\n min-width: 0;\n height: 100%;\n padding: 12px 16px;\n border: 1px solid ", ";\n border-radius: ", ";\n font-family: ", ";\n font-size: ", ";\n color: ", ";\n background-color: ", ";\n outline: none;\n box-sizing: border-box;\n cursor: ", ";\n\n &::placeholder {\n color: ", ";\n font-weight: 400;\n }\n\n &:focus {\n border-color: ", ";\n }\n\n &:hover {\n border-color: ", ";\n }\n"], ["\n flex: 1;\n min-width: 0;\n height: 100%;\n padding: 12px 16px;\n border: 1px solid ", ";\n border-radius: ", ";\n font-family: ", ";\n font-size: ", ";\n color: ", ";\n background-color: ", ";\n outline: none;\n box-sizing: border-box;\n cursor: ", ";\n\n &::placeholder {\n color: ", ";\n font-weight: 400;\n }\n\n &:focus {\n border-color: ", ";\n }\n\n &:hover {\n border-color: ", ";\n }\n"])), function (p) { return p.borderColor; }, function (p) { return (p.hasPrefix ? '0' : '12px 0 0 12px'); }, TypographyStyles_1.MAIN_FONT, TypographyStyles_1.FONT_SIZE.P1, function (p) { return (p.isDisabled ? p.disabledTextColor : p.textColor); }, function (p) { return (p.isDisabled ? p.disabledBgColor : 'transparent'); }, function (p) { return (p.isDisabled ? 'not-allowed' : 'text'); }, function (p) { return p.placeholderColor; }, function (p) { return (p.isDisabled ? p.borderColor : p.focusBorderColor); }, function (p) { return (p.isDisabled ? p.borderColor : p.focusBorderColor); });
14
+ var StyledButton = styled_1.default.button(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 24px;\n border: none;\n border-radius: 0 12px 12px 0;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n white-space: nowrap;\n cursor: ", ";\n box-sizing: border-box;\n\n &:hover {\n opacity: ", ";\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 24px;\n border: none;\n border-radius: 0 12px 12px 0;\n background-color: ", ";\n color: ", ";\n font-family: ", ";\n font-size: ", ";\n font-weight: 700;\n white-space: nowrap;\n cursor: ", ";\n box-sizing: border-box;\n\n &:hover {\n opacity: ", ";\n }\n"])), function (p) { return (p.isDisabled ? p.disabledBgColor : p.bgColor); }, function (p) { return (p.isDisabled ? p.disabledTextColor : p.textColor); }, TypographyStyles_1.MAIN_FONT, TypographyStyles_1.FONT_SIZE.P1, function (p) { return (p.isDisabled ? 'not-allowed' : 'pointer'); }, function (p) { return (p.isDisabled ? 1 : 0.9); });
15
+ var InputWithButton = function (_a) {
16
+ var buttonText = _a.buttonText, onButtonClick = _a.onButtonClick, prefix = _a.prefix, placeholder = _a.placeholder, value = _a.value, defaultValue = _a.defaultValue, onChange = _a.onChange, _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.disabledInput, disabledInput = _c === void 0 ? false : _c, _d = _a.disabledPrefix, disabledPrefix = _d === void 0 ? false : _d, _e = _a.staticPrefix, staticPrefix = _e === void 0 ? false : _e, _f = _a.error, error = _f === void 0 ? false : _f, className = _a.className;
17
+ var theme = (0, ThemeContext_1.useTheme)();
18
+ var inputDisabled = disabled || disabledInput;
19
+ var prefixDisabled = disabled || disabledPrefix;
20
+ var borderColor = error
21
+ ? theme.color.status.critical
22
+ : theme.color.base.line;
23
+ var prefixBorderColor = theme.color.base.line;
24
+ return (react_1.default.createElement(Container, { className: className },
25
+ prefix && (react_1.default.createElement(PrefixContainer, { borderColor: prefixBorderColor, bgColor: prefixDisabled
26
+ ? theme.color.surface.disabledSurface
27
+ : staticPrefix
28
+ ? theme.color.surface.secondaryNeutral
29
+ : theme.color.surface.neutral, hoverBgColor: prefixDisabled ? theme.color.surface.disabledSurface : theme.color.interactive.hoverSurface, textColor: prefixDisabled ? theme.color.surface.disabledOnSurface : theme.color.base.onNeutral, isDisabled: prefixDisabled }, prefix)),
30
+ react_1.default.createElement(StyledInput, { type: "text", placeholder: placeholder, value: value, defaultValue: defaultValue, onChange: onChange, disabled: inputDisabled, borderColor: borderColor, focusBorderColor: theme.color.base.primary2, textColor: theme.color.base.onNeutral, placeholderColor: theme.color.component.placeholderInput, disabledBgColor: theme.color.surface.disabledSurface, disabledTextColor: theme.color.surface.disabledOnSurface, hasPrefix: !!prefix, isDisabled: inputDisabled }),
31
+ react_1.default.createElement(StyledButton, { type: "button", onClick: onButtonClick, disabled: disabled || error, bgColor: theme.color.base.primary, disabledBgColor: theme.color.surface.disabledSurface, textColor: theme.color.base.onNeutral, disabledTextColor: theme.color.surface.disabledOnSurface, isDisabled: disabled || error }, buttonText)));
32
+ };
33
+ exports.default = InputWithButton;
34
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceR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AC,iBAAiB,EACxD,SAAS,EAAE,CAAC,CAAC,MAAM,EACnB,UAAU,EAAE,aAAa,GACzB;QACF,8BAAC,YAAY,IACX,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,QAAQ,IAAI,KAAK,EAC3B,OAAO,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,EACjC,eAAe,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,eAAe,EACpD,SAAS,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,EACrC,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,iBAAiB,EACxD,UAAU,EAAE,QAAQ,IAAI,KAAK,IAE5B,UAAU,CACE,CACL,CACb,CAAA;AACH,CAAC,CAAA;AAED,kBAAe,eAAe,CAAA"}
@@ -28,12 +28,14 @@ var emotion_1 = require("emotion");
28
28
  var date_picker_1 = require("antd/es/date-picker");
29
29
  require("antd/es/date-picker/style/css");
30
30
  var TypographyStyles_1 = require("src/shared/TypographyStyles");
31
- var ColorStyles_1 = require("src/shared/ColorStyles");
32
- var theme_1 = require("src/theme/theme");
31
+ var ThemeContext_1 = require("src/theme/ThemeContext");
32
+ var inputStyles_1 = require("../Input/inputStyles");
33
33
  function default_1(_a) {
34
- var _b = _a.format, format = _b === void 0 ? 'DD/MM/YYYY' : _b, rest = __rest(_a, ["format"]);
35
- var style = "\n -webkit-font-smoothing: antialiased;\n height: 36px;\n\n &.ant-picker {\n border-radius: 5px;\n border-color: #E8E8E8;\n transition: 0.3s all ease;\n\n &:hover {\n border-color: ".concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n\n &.ant-picker-focused {\n border-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n box-shadow: 0 0 0 2px ").concat(theme_1.straitsXTheme.brand.primary.background, ";\n }\n\n .ant-picker-active-bar {\n background: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n }\n\n\n &.ant-picker > .ant-picker-input {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n color: #121212;\n }\n\n & .ant-picker-input > input {\n color: #121212;\n }\n\n & .ant-picker-input > input::placeholder {\n color: ").concat(ColorStyles_1.NEUTRAL_COLORS.G400, ";\n }\n ");
36
- var dropdownStyle = "\n .ant-picker-cell.ant-picker-cell-in-view.ant-picker-cell-range-end > .ant-picker-cell-inner {\n background-color: ".concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n\n .ant-picker-cell.ant-picker-cell-in-view.ant-picker-cell-range-start > .ant-picker-cell-inner {\n background-color: ").concat(theme_1.straitsXTheme.brand.primary.default, ";\n }\n\n .ant-picker-cell.ant-picker-cell-in-view {\n &.ant-picker-cell-in-range::before {\n background-color: #F0FFF9;\n }\n\n &.ant-picker-cell-range-end::before {\n background-color: #F0FFF9;\n }\n\n &.ant-picker-cell-range-start::before {\n background-color: #F0FFF9;\n }\n } \n ");
34
+ var _b = _a.format, format = _b === void 0 ? 'DD/MM/YYYY' : _b, _c = _a.size, size = _c === void 0 ? 'large' : _c, rest = __rest(_a, ["format", "size"]);
35
+ var theme = (0, ThemeContext_1.useTheme)();
36
+ var _d = inputStyles_1.SIZE_CONFIG[size], height = _d.height, borderRadius = _d.borderRadius, padding = _d.padding;
37
+ var style = "\n -webkit-font-smoothing: antialiased;\n height: ".concat(height, ";\n\n &.ant-picker {\n border-radius: ").concat(borderRadius, ";\n border-color: ").concat(theme.color.base.line, ";\n padding: ").concat(padding, ";\n transition: 0.3s all ease;\n\n &:hover {\n border-color: ").concat(theme.color.base.primary2, ";\n }\n\n &.ant-picker-focused {\n border-color: ").concat(theme.color.base.primary2, ";\n box-shadow: none;\n -webkit-box-shadow: none;\n }\n\n .ant-picker-active-bar {\n background: ").concat(theme.color.base.primary2, ";\n }\n }\n\n\n &.ant-picker > .ant-picker-input {\n font-family: ").concat(TypographyStyles_1.MAIN_FONT, ";\n font-style: normal;\n font-weight: normal;\n font-size: 14px;\n line-height: 22px;\n color: ").concat(theme.color.base.onNeutral, ";\n }\n\n & .ant-picker-input > input {\n color: ").concat(theme.color.base.onNeutral, ";\n }\n\n & .ant-picker-input > input::placeholder {\n color: ").concat(theme.color.component.placeholderInput, ";\n }\n ");
38
+ var dropdownStyle = "\n .ant-picker-cell.ant-picker-cell-in-view.ant-picker-cell-range-end > .ant-picker-cell-inner {\n background-color: ".concat(theme.color.base.primary2, ";\n }\n\n .ant-picker-cell.ant-picker-cell-in-view.ant-picker-cell-range-start > .ant-picker-cell-inner {\n background-color: ").concat(theme.color.base.primary2, ";\n }\n\n .ant-picker-cell.ant-picker-cell-in-view {\n &.ant-picker-cell-in-range::before {\n background-color: ").concat(theme.color.interactive.selected, ";\n }\n\n &.ant-picker-cell-range-end::before {\n background-color: ").concat(theme.color.interactive.selected, ";\n }\n\n &.ant-picker-cell-range-start::before {\n background-color: ").concat(theme.color.interactive.selected, ";\n }\n } \n ");
37
39
  return (react_1.default.createElement(date_picker_1.default.RangePicker, __assign({ className: "".concat((0, emotion_1.css)(style)), format: format, dropdownClassName: (0, emotion_1.css)(dropdownStyle) }, rest)));
38
40
  }
39
41
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/RangePicker/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAwBA,4BA2EC;AAnGD,+BAAyB;AACzB,mCAA6B;AAC7B,mDAA4C;AAC5C,yCAAsC;AACtC,gEAAuD;AACvD,sDAAuD;AACvD,yCAA+C;AAkB/C,mBAAwB,EAAyC;IAAvC,IAAA,cAAqB,EAArB,MAAM,mBAAG,YAAY,KAAA,EAAK,IAAI,cAAhC,UAAkC,CAAF;IACtD,IAAM,KAAK,GAAG,mOAUQ,qBAAa,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,+EAInC,qBAAa,CAAC,KAAK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C,QAAQ,+EAIzB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,6IAM3B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,+FAM1B,4BAAS,sIAKf,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,yEAI1B,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,sFAI1B,KAAK,CAAC,KAAK,CAAC,SAAS,CAAC,gBAAgB,iBAElD,CAAA;IAED,IAAM,aAAa,GAAG,uIAEE,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,sJAIzB,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,+IAKvB,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,kGAIhC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,oGAIhC,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,QAAQ,2BAGzD,CAAA;IAED,OAAO,CACL,8BAAC,qBAAU,CAAC,WAAW,aACrB,SAAS,EAAE,UAAG,IAAA,aAAG,EAAC,KAAK,CAAC,CAAE,EAC1B,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,IAAA,aAAG,EAAC,aAAa,CAAC,IACjC,IAAI,EACR,CACH,CAAA;AACH,CAAC"}
@@ -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