@cashub/ui 0.10.3 → 0.10.4

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 (2) hide show
  1. package/package.json +1 -1
  2. package/select/Select.js +13 -9
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cashub/ui",
3
- "version": "0.10.3",
3
+ "version": "0.10.4",
4
4
  "private": false,
5
5
  "author": "CASHUB Team",
6
6
  "description": "CASHUB UI components library",
package/select/Select.js CHANGED
@@ -267,7 +267,7 @@ var Select = function Select(_ref) {
267
267
  }
268
268
 
269
269
  return placeholder;
270
- }, [placeholder, handleOnDeselect, multiple, selectedOptions]);
270
+ }, [placeholder, handleOnDeselect, multiple, selectedOptions, disabled]);
271
271
  var optionItem = (0, _react.useMemo)(function () {
272
272
  if (optionList.length <= 0) return null;
273
273
  return optionList.map(function (option) {
@@ -578,6 +578,7 @@ var Select = function Select(_ref) {
578
578
  $fill: fill,
579
579
  fillReverse: fillReverse,
580
580
  onFocus: handleFocus,
581
+ placeholder: placeholder,
581
582
  children: [selectedItem, selectedOptions.length > 0 && !multiple && !disabled && allowClear && /*#__PURE__*/(0, _jsxRuntime.jsx)(CloseButton, {
582
583
  onClick: function onClick() {
583
584
  onSelect('');
@@ -614,7 +615,7 @@ var Select = function Select(_ref) {
614
615
  });
615
616
  };
616
617
 
617
- var Combobox = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n min-height: 36px;\n min-width: 160px;\n cursor: pointer;\n position: relative;\n background: transparent;\n color: var(--color-white);\n font-size: var(--font-body1);\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius-l);\n padding: 0 calc(var(--spacing-s) * 2 + 8px) 0 var(--spacing-s);\n\n &:focus {\n ", ";\n }\n\n ", "\n\n ", "\n\n ", ";\n\n ", "\n\n ", "\n\n ", "\n"])), function (_ref2) {
618
+ var Combobox = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n min-height: 36px;\n min-width: 160px;\n cursor: pointer;\n position: relative;\n background: transparent;\n color: var(--color-white);\n font-size: var(--font-body1);\n border: var(--border-width) solid var(--border-color);\n border-radius: var(--border-radius-l);\n padding: 0 calc(var(--spacing-s) * 2 + 8px) 0 var(--spacing-s);\n\n &:focus {\n ", ";\n }\n\n ", "\n\n ", "\n ", "\n \n ", ";\n\n ", "\n\n ", "\n\n ", "\n"])), function (_ref2) {
618
619
  var disabled = _ref2.disabled;
619
620
  return !disabled && "\n border-color: var(--color-primary);\n outline: none;\n ";
620
621
  }, function (_ref3) {
@@ -624,16 +625,19 @@ var Combobox = _styledComponents.default.div(_templateObject || (_templateObject
624
625
  var disabled = _ref4.disabled;
625
626
  return disabled && 'cursor: not-allowed;opacity: 0.5;';
626
627
  }, function (_ref5) {
627
- var fullWidth = _ref5.fullWidth;
628
- return fullWidth ? 'width: 100%' : 'max-width: 320px';
628
+ var placeholder = _ref5.placeholder;
629
+ return placeholder && 'color: var(--font-on-mute);';
629
630
  }, function (_ref6) {
630
- var large = _ref6.large;
631
- return large && "\n height: 40px;\n padding: 12px calc(var(--spacing-s) * 2 + 8px) 12px var(--spacing-s);\n ";
631
+ var fullWidth = _ref6.fullWidth;
632
+ return fullWidth ? 'width: 100%' : 'max-width: 320px';
632
633
  }, function (_ref7) {
633
- var $fill = _ref7.$fill;
634
- return $fill && "\n background: var(--color-background2);\n border-color: transparent;\n ";
634
+ var large = _ref7.large;
635
+ return large && "\n height: 40px;\n padding: 12px calc(var(--spacing-s) * 2 + 8px) 12px var(--spacing-s);\n ";
635
636
  }, function (_ref8) {
636
- var fillReverse = _ref8.fillReverse;
637
+ var $fill = _ref8.$fill;
638
+ return $fill && "\n background: var(--color-background2);\n border-color: transparent;\n ";
639
+ }, function (_ref9) {
640
+ var fillReverse = _ref9.fillReverse;
637
641
  return fillReverse && "\n background: var(--color-background1);\n border-color: transparent;\n ";
638
642
  });
639
643