@cashub/ui 0.26.0 → 0.26.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/select/Select.js +38 -28
- package/select/subComponent/SelectedSingle.js +1 -1
- package/tooltip/Tooltip.js +2 -2
package/package.json
CHANGED
package/select/Select.js
CHANGED
|
@@ -235,8 +235,10 @@ const Select = _ref => {
|
|
|
235
235
|
}, value.id);
|
|
236
236
|
});
|
|
237
237
|
}
|
|
238
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
239
|
-
children: selectedOptions[0].
|
|
238
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_SelectedSingle.default, {
|
|
239
|
+
children: [selectedOptions[0].icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
|
240
|
+
src: selectedOptions[0].icon
|
|
241
|
+
}), selectedOptions[0].text]
|
|
240
242
|
});
|
|
241
243
|
}
|
|
242
244
|
return placeholder;
|
|
@@ -273,16 +275,8 @@ const Select = _ref => {
|
|
|
273
275
|
focus: focusedOption && focusedOption.id === option.id.toString(),
|
|
274
276
|
selected: option.selected,
|
|
275
277
|
"aria-selected": option.selected,
|
|
276
|
-
children: [option.icon && /*#__PURE__*/(0, _jsxRuntime.
|
|
277
|
-
|
|
278
|
-
size: "medium",
|
|
279
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_image.ImageFluid, {
|
|
280
|
-
crossOrigin: "anonymous",
|
|
281
|
-
src: option.icon,
|
|
282
|
-
alt: "",
|
|
283
|
-
roundedS: true
|
|
284
|
-
})
|
|
285
|
-
}), "\xA0"]
|
|
278
|
+
children: [option.icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(Icon, {
|
|
279
|
+
src: option.icon
|
|
286
280
|
}), option.text]
|
|
287
281
|
}, option.id);
|
|
288
282
|
});
|
|
@@ -560,45 +554,61 @@ const Select = _ref => {
|
|
|
560
554
|
})]
|
|
561
555
|
});
|
|
562
556
|
};
|
|
563
|
-
const
|
|
557
|
+
const Icon = _ref2 => {
|
|
564
558
|
let {
|
|
565
|
-
|
|
559
|
+
src
|
|
566
560
|
} = _ref2;
|
|
561
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
562
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_figure.IconFigure, {
|
|
563
|
+
size: "medium",
|
|
564
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_image.ImageFluid, {
|
|
565
|
+
crossOrigin: "anonymous",
|
|
566
|
+
src: src,
|
|
567
|
+
alt: "",
|
|
568
|
+
roundedS: true
|
|
569
|
+
})
|
|
570
|
+
}), "\xA0"]
|
|
571
|
+
});
|
|
572
|
+
};
|
|
573
|
+
const 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(--font-on-background);\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"])), _ref3 => {
|
|
574
|
+
let {
|
|
575
|
+
disabled
|
|
576
|
+
} = _ref3;
|
|
567
577
|
return !disabled && "\n border-color: var(--color-primary);\n outline: none;\n ";
|
|
568
|
-
},
|
|
578
|
+
}, _ref4 => {
|
|
569
579
|
let {
|
|
570
580
|
$display
|
|
571
|
-
} =
|
|
581
|
+
} = _ref4;
|
|
572
582
|
return $display && "\n border-color: var(--color-primary);\n outline: none;\n ";
|
|
573
|
-
},
|
|
583
|
+
}, _ref5 => {
|
|
574
584
|
let {
|
|
575
585
|
disabled
|
|
576
|
-
} =
|
|
586
|
+
} = _ref5;
|
|
577
587
|
return disabled && 'cursor: not-allowed;opacity: 0.5;';
|
|
578
|
-
},
|
|
588
|
+
}, _ref6 => {
|
|
579
589
|
let {
|
|
580
590
|
placeholder
|
|
581
|
-
} =
|
|
591
|
+
} = _ref6;
|
|
582
592
|
return placeholder && 'color: var(--font-on-mute);';
|
|
583
|
-
},
|
|
593
|
+
}, _ref7 => {
|
|
584
594
|
let {
|
|
585
595
|
fullWidth
|
|
586
|
-
} =
|
|
596
|
+
} = _ref7;
|
|
587
597
|
return fullWidth ? 'width: 100%' : 'max-width: 320px';
|
|
588
|
-
},
|
|
598
|
+
}, _ref8 => {
|
|
589
599
|
let {
|
|
590
600
|
large
|
|
591
|
-
} =
|
|
601
|
+
} = _ref8;
|
|
592
602
|
return large && "\n height: 40px;\n padding: 12px calc(var(--spacing-s) * 2 + 8px) 12px var(--spacing-s);\n ";
|
|
593
|
-
},
|
|
603
|
+
}, _ref9 => {
|
|
594
604
|
let {
|
|
595
605
|
$fill
|
|
596
|
-
} =
|
|
606
|
+
} = _ref9;
|
|
597
607
|
return $fill && "\n background: var(--color-background2);\n border-color: transparent;\n ";
|
|
598
|
-
},
|
|
608
|
+
}, _ref10 => {
|
|
599
609
|
let {
|
|
600
610
|
fillReverse
|
|
601
|
-
} =
|
|
611
|
+
} = _ref10;
|
|
602
612
|
return fillReverse && "\n background: var(--color-background1);\n border-color: transparent;\n ";
|
|
603
613
|
});
|
|
604
614
|
Combobox.displayName = 'Combobox';
|
|
@@ -8,6 +8,6 @@ var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
|
8
8
|
var _templateObject;
|
|
9
9
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
10
10
|
function _taggedTemplateLiteral(e, t) { return t || (t = e.slice(0)), Object.freeze(Object.defineProperties(e, { raw: { value: Object.freeze(t) } })); }
|
|
11
|
-
const SelectedSingle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n color: var(--font-on-background);\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
11
|
+
const SelectedSingle = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n display: flex;\n align-items: center;\n color: var(--font-on-background);\n overflow: hidden;\n text-overflow: ellipsis;\n"])));
|
|
12
12
|
SelectedSingle.displayName = 'SelectedSingle';
|
|
13
13
|
var _default = exports.default = SelectedSingle;
|
package/tooltip/Tooltip.js
CHANGED
|
@@ -91,11 +91,11 @@ const Tooltip = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
|
|
|
91
91
|
})
|
|
92
92
|
});
|
|
93
93
|
});
|
|
94
|
-
const TooltipTooltip = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: pre-line;\n
|
|
94
|
+
const TooltipTooltip = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n white-space: pre-line;\n display: ", ";\n border: 1px solid var(--border-color);\n color: var(--font-on-background);\n background: var(--color-background2);\n box-shadow: var(--box-shadow);\n border-radius: calc(var(--border-radius) / 2);\n padding: var(--spacing-xs);\n z-index: 80;\n text-align: left;\n font-size: var(--font-body1);\n font-weight: var(--font-normal);\n line-height: 1.5;\n word-break: break-word;\n max-width: 50vw;\n"])), _ref2 => {
|
|
95
95
|
let {
|
|
96
96
|
$display
|
|
97
97
|
} = _ref2;
|
|
98
|
-
return $display ? '
|
|
98
|
+
return $display ? 'block' : 'none';
|
|
99
99
|
});
|
|
100
100
|
const TooltipArrow = _styledComponents.default.div(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n display: ", ";\n top: -0.5rem;\n left: 0;\n width: 1rem;\n height: 1rem;\n\n &::before {\n position: absolute;\n display: block;\n content: '';\n border-color: transparent;\n border-style: solid;\n top: 0;\n border-width: 0 0.5rem 0.5rem 0.5rem;\n border-bottom-color: var(--border-color);\n }\n"])), _ref3 => {
|
|
101
101
|
let {
|