@bolio-ui/core 1.0.8 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ButtonDropdown/index.js +31 -31
- package/dist/Input/InputBlockLabel.d.ts +2 -1
- package/dist/Input/InputProps.d.ts +2 -0
- package/dist/Input/index.js +50 -34
- package/dist/Input/styles.d.ts +1 -1
- package/dist/Select/index.js +30 -23
- package/dist/Select/styles.d.ts +1 -1
- package/dist/Textarea/index.js +27 -13
- package/dist/index.js +111 -88
- package/esm/ButtonDropdown/ButtonDropdown.js +8 -8
- package/esm/ButtonDropdown/styles.js +23 -23
- package/esm/Input/Input.js +17 -16
- package/esm/Input/InputBlockLabel.d.ts +2 -1
- package/esm/Input/InputBlockLabel.js +6 -5
- package/esm/Input/InputProps.d.ts +2 -0
- package/esm/Input/styles.d.ts +1 -1
- package/esm/Input/styles.js +27 -13
- package/esm/Select/Select.js +10 -10
- package/esm/Select/styles.d.ts +1 -1
- package/esm/Select/styles.js +20 -13
- package/package.json +1 -1
|
@@ -527,56 +527,56 @@ var getColor = function getColor(palette, type) {
|
|
|
527
527
|
"default": {
|
|
528
528
|
color: palette.foreground,
|
|
529
529
|
bgColor: palette.accents_2,
|
|
530
|
-
borderColor: palette.
|
|
531
|
-
borderLeftColor: palette.
|
|
532
|
-
hoverBgColor: palette.
|
|
533
|
-
hoverBorder: palette.
|
|
530
|
+
borderColor: palette.accents_3,
|
|
531
|
+
borderLeftColor: palette.accents_3,
|
|
532
|
+
hoverBgColor: palette.accents_3,
|
|
533
|
+
hoverBorder: palette.accents_7
|
|
534
534
|
},
|
|
535
535
|
primary: {
|
|
536
536
|
color: palette.primaryDark,
|
|
537
|
-
bgColor: palette.
|
|
538
|
-
borderColor: palette.
|
|
539
|
-
borderLeftColor: palette.
|
|
537
|
+
bgColor: palette.primaryLight,
|
|
538
|
+
borderColor: palette.primary,
|
|
539
|
+
borderLeftColor: palette.primary,
|
|
540
540
|
hoverBgColor: palette.primaryLight,
|
|
541
541
|
hoverBorder: palette.primary
|
|
542
542
|
},
|
|
543
543
|
secondary: {
|
|
544
544
|
color: palette.secondaryDark,
|
|
545
|
-
bgColor: palette.
|
|
546
|
-
borderColor: palette.
|
|
547
|
-
borderLeftColor: palette.
|
|
545
|
+
bgColor: palette.secondaryLight,
|
|
546
|
+
borderColor: palette.secondary,
|
|
547
|
+
borderLeftColor: palette.secondary,
|
|
548
548
|
hoverBgColor: palette.secondaryLight,
|
|
549
549
|
hoverBorder: palette.secondary
|
|
550
550
|
},
|
|
551
551
|
success: {
|
|
552
552
|
color: palette.successDark,
|
|
553
|
-
bgColor: palette.
|
|
554
|
-
borderColor: palette.
|
|
555
|
-
borderLeftColor: palette.
|
|
553
|
+
bgColor: palette.successLight,
|
|
554
|
+
borderColor: palette.success,
|
|
555
|
+
borderLeftColor: palette.success,
|
|
556
556
|
hoverBgColor: palette.successLight,
|
|
557
557
|
hoverBorder: palette.success
|
|
558
558
|
},
|
|
559
559
|
warning: {
|
|
560
560
|
color: palette.warningDark,
|
|
561
|
-
bgColor: palette.
|
|
562
|
-
borderColor: palette.
|
|
563
|
-
borderLeftColor: palette.
|
|
561
|
+
bgColor: palette.warningLight,
|
|
562
|
+
borderColor: palette.warning,
|
|
563
|
+
borderLeftColor: palette.warning,
|
|
564
564
|
hoverBgColor: palette.warningLight,
|
|
565
565
|
hoverBorder: palette.warning
|
|
566
566
|
},
|
|
567
567
|
error: {
|
|
568
568
|
color: palette.errorDark,
|
|
569
|
-
bgColor: palette.
|
|
570
|
-
borderColor: palette.
|
|
571
|
-
borderLeftColor: palette.
|
|
569
|
+
bgColor: palette.errorLight,
|
|
570
|
+
borderColor: palette.error,
|
|
571
|
+
borderLeftColor: palette.error,
|
|
572
572
|
hoverBgColor: palette.errorLight,
|
|
573
573
|
hoverBorder: palette.error
|
|
574
574
|
},
|
|
575
575
|
info: {
|
|
576
576
|
color: palette.infoDark,
|
|
577
|
-
bgColor: palette.
|
|
578
|
-
borderColor: palette.
|
|
579
|
-
borderLeftColor: palette.
|
|
577
|
+
bgColor: palette.infoLight,
|
|
578
|
+
borderColor: palette.info,
|
|
579
|
+
borderLeftColor: palette.info,
|
|
580
580
|
hoverBgColor: palette.infoLight,
|
|
581
581
|
hoverBorder: palette.info
|
|
582
582
|
}
|
|
@@ -587,7 +587,7 @@ var getColor = function getColor(palette, type) {
|
|
|
587
587
|
borderColor: palette.accents_4,
|
|
588
588
|
borderLeftColor: palette.accents_4,
|
|
589
589
|
hoverBgColor: palette.accents_3,
|
|
590
|
-
hoverBorder: palette.
|
|
590
|
+
hoverBorder: palette.accents_4
|
|
591
591
|
});
|
|
592
592
|
return type ? colors[type] : colors["default"];
|
|
593
593
|
};
|
|
@@ -1086,31 +1086,31 @@ function ButtonDropdownComponent(_ref) {
|
|
|
1086
1086
|
ref: ref,
|
|
1087
1087
|
onClick: stopPropagation
|
|
1088
1088
|
}, props, {
|
|
1089
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1089
|
+
className: styledJsx_cjs.style.dynamic([["2141984301", [colors.borderColor, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), colors.hoverBorder, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + (props && props.className != null && props.className || useClasses$1('btn-dropdown', className) || "")
|
|
1090
1090
|
}), mainItemChildren, /*#__PURE__*/React__default["default"].createElement("details", {
|
|
1091
1091
|
open: visible,
|
|
1092
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1092
|
+
className: styledJsx_cjs.style.dynamic([["2141984301", [colors.borderColor, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), colors.hoverBorder, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]])
|
|
1093
1093
|
}, /*#__PURE__*/React__default["default"].createElement("summary", {
|
|
1094
1094
|
onClick: clickHandler,
|
|
1095
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1095
|
+
className: styledJsx_cjs.style.dynamic([["2141984301", [colors.borderColor, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), colors.hoverBorder, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]])
|
|
1096
1096
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1097
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1097
|
+
className: styledJsx_cjs.style.dynamic([["2141984301", [colors.borderColor, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), colors.hoverBorder, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + "dropdown-box"
|
|
1098
1098
|
}, icon ? /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1099
1099
|
style: {
|
|
1100
1100
|
color: disabled || loading ? theme.palette.error : colors.color,
|
|
1101
1101
|
height: SCALES.height(2.5),
|
|
1102
1102
|
width: SCALES.height(2.5)
|
|
1103
1103
|
},
|
|
1104
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1104
|
+
className: styledJsx_cjs.style.dynamic([["2141984301", [colors.borderColor, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), colors.hoverBorder, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + "dropdown-icon"
|
|
1105
1105
|
}, icon) : /*#__PURE__*/React__default["default"].createElement(ButtonDropdownIcon, {
|
|
1106
1106
|
color: disabled || loading ? theme.palette.accents_4 : colors.color,
|
|
1107
1107
|
height: SCALES.height(2.5)
|
|
1108
1108
|
}))), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1109
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1109
|
+
className: styledJsx_cjs.style.dynamic([["2141984301", [colors.borderColor, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), colors.hoverBorder, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]]]) + " " + "content"
|
|
1110
1110
|
}, itemChildrenWithoutMain)), /*#__PURE__*/React__default["default"].createElement(styledJsx_cjs.style, {
|
|
1111
|
-
id: "
|
|
1111
|
+
id: "2141984301",
|
|
1112
1112
|
dynamic: [colors.borderColor, theme.layout.radius, SCALES.height(2.5), auto ? 'min-content' : SCALES.width(10.5), SCALES.pt(0), paddingRight, SCALES.pb(0), paddingLeft, SCALES.font(0.875), colors.hoverBorder, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius, SCALES.height(2.5), colors.color, bgColor, SCALES.height(2.5), colors.borderLeftColor, disabled || loading ? 'not-allowed' : 'pointer', colors.hoverBorder, colors.hoverBgColor, theme.layout.radius, theme.expressiveness.shadowSmall, theme.layout.gapHalf, theme.palette.background, theme.layout.radius, theme.layout.radius, theme.layout.radius, theme.layout.radius]
|
|
1113
|
-
}, ".btn-dropdown.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;box-sizing:border-box;border
|
|
1113
|
+
}, ".btn-dropdown.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;position:relative;box-sizing:border-box;border-radius:".concat(theme.layout.radius, ";--bolio-ui-dropdown-height:").concat(SCALES.height(2.5), ";--bolio-ui-dropdown-min-width:").concat(auto ? 'min-content' : SCALES.width(10.5), ";--bolio-ui-dropdown-padding:").concat(SCALES.pt(0), " ").concat(paddingRight, " ").concat(SCALES.pb(0), " ").concat(paddingLeft, ";--bolio-ui-dropdown-font-size:").concat(SCALES.font(0.875), ";}.btn-dropdown.__jsx-style-dynamic-selector>button{border-top-left-radius:").concat(theme.layout.radius, ";border-bottom-left-radius:").concat(theme.layout.radius, ";}details.__jsx-style-dynamic-selector{border-top-right-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";overflow:hidden;}.dropdown-box.__jsx-style-dynamic-selector{height:").concat(SCALES.height(2.5), ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:auto;}summary.__jsx-style-dynamic-selector{box-sizing:border-box;-webkit-tap-highlight-color:transparent;list-style:none;outline:none;color:").concat(colors.color, ";background-color:").concat(bgColor, ";height:").concat(SCALES.height(2.5), ";cursor:").concat(disabled || loading ? 'not-allowed' : 'pointer', ";display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:auto;padding:0 1px;-webkit-transition:background 0.2s ease 0s,border-color 0.2s ease 0s;transition:background 0.2s ease 0s,border-color 0.2s ease 0s;}.content.__jsx-style-dynamic-selector{position:absolute;right:0;left:0;z-index:90;width:100%;border-radius:").concat(theme.layout.radius, ";box-shadow:").concat(theme.expressiveness.shadowSmall, ";-webkit-transform:translateY(").concat(theme.layout.gapHalf, ");-ms-transform:translateY(").concat(theme.layout.gapHalf, ");transform:translateY(").concat(theme.layout.gapHalf, ");background-color:").concat(theme.palette.background, ";}.content.__jsx-style-dynamic-selector>button:first-of-type{border-top-left-radius:").concat(theme.layout.radius, ";border-top-right-radius:").concat(theme.layout.radius, ";}.content.__jsx-style-dynamic-selector>button:last-of-type{border-bottom-left-radius:").concat(theme.layout.radius, ";border-bottom-right-radius:").concat(theme.layout.radius, ";}.dropdown-icon.__jsx-style-dynamic-selector{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-webkit-justify-content:center;-ms-flex-pack:center;justify-content:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-transform:scale(0.6);-ms-transform:scale(0.6);transform:scale(0.6);}"))));
|
|
1114
1114
|
}
|
|
1115
1115
|
|
|
1116
1116
|
ButtonDropdownComponent.displayName = 'BolioUIButtonDropdown';
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
export interface InputBlockLabelLabel {
|
|
3
3
|
children?: ReactNode;
|
|
4
|
+
error?: boolean;
|
|
4
5
|
}
|
|
5
|
-
declare function InputBlockLabelComponent({ children }: InputBlockLabelLabel): JSX.Element;
|
|
6
|
+
declare function InputBlockLabelComponent({ children, error }: InputBlockLabelLabel): JSX.Element;
|
|
6
7
|
declare namespace InputBlockLabelComponent {
|
|
7
8
|
var displayName: string;
|
|
8
9
|
}
|
package/dist/Input/index.js
CHANGED
|
@@ -516,14 +516,15 @@ var MemoInputLabel = /*#__PURE__*/React__default["default"].memo(InputLabel);
|
|
|
516
516
|
var InputLabel$1 = MemoInputLabel;
|
|
517
517
|
|
|
518
518
|
function InputBlockLabelComponent(_ref) {
|
|
519
|
-
var children = _ref.children
|
|
519
|
+
var children = _ref.children,
|
|
520
|
+
error = _ref.error;
|
|
520
521
|
var theme = useTheme();
|
|
521
522
|
return /*#__PURE__*/React__default["default"].createElement("label", {
|
|
522
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
523
|
+
className: styledJsx_cjs.style.dynamic([["3490168518", [error ? theme.palette.error : theme.palette.accents_6, error && '0.5em', error ? '0.875rem' : '1em']]])
|
|
523
524
|
}, children, /*#__PURE__*/React__default["default"].createElement(styledJsx_cjs.style, {
|
|
524
|
-
id: "
|
|
525
|
-
dynamic: [theme.palette.accents_6]
|
|
526
|
-
}, "label.__jsx-style-dynamic-selector{display:block;font-weight:normal;color:".concat(theme.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;font-size:1em;line-height:1.5;}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")));
|
|
525
|
+
id: "3490168518",
|
|
526
|
+
dynamic: [error ? theme.palette.error : theme.palette.accents_6, error && '0.5em', error ? '0.875rem' : '1em']
|
|
527
|
+
}, "label.__jsx-style-dynamic-selector{display:block;font-weight:normal;color:".concat(error ? theme.palette.error : theme.palette.accents_6, ";padding:0 0 0 1px;margin-bottom:0.5em;margin-bottom:").concat(error && '0.5em', ";font-size:").concat(error ? '0.875rem' : '1em', ";line-height:1.5;}label.__jsx-style-dynamic-selector>*:first-child{margin-top:0;}label.__jsx-style-dynamic-selector>*:last-child{margin-bottom:0;}")));
|
|
527
528
|
}
|
|
528
529
|
|
|
529
530
|
InputBlockLabelComponent.displayName = 'BolioUIInputBlockLabel';
|
|
@@ -630,7 +631,7 @@ function InputIconClear(_ref) {
|
|
|
630
631
|
var MemoInputIconClear = /*#__PURE__*/React__default["default"].memo(InputIconClear);
|
|
631
632
|
var InputClearIcon = MemoInputIconClear;
|
|
632
633
|
|
|
633
|
-
var getColors = function getColors(palette, status) {
|
|
634
|
+
var getColors = function getColors(palette, status, disabled, readOnly) {
|
|
634
635
|
var colors = {
|
|
635
636
|
"default": {
|
|
636
637
|
color: palette.foreground,
|
|
@@ -641,47 +642,61 @@ var getColors = function getColors(palette, status) {
|
|
|
641
642
|
},
|
|
642
643
|
primary: {
|
|
643
644
|
color: palette.primaryDark,
|
|
644
|
-
bgColor: palette.
|
|
645
|
-
borderColor: palette.
|
|
645
|
+
bgColor: palette.primaryLight,
|
|
646
|
+
borderColor: palette.primary,
|
|
646
647
|
hoverBgColor: palette.primaryLight,
|
|
647
648
|
hoverBorder: palette.primary
|
|
648
649
|
},
|
|
649
650
|
secondary: {
|
|
650
651
|
color: palette.secondaryDark,
|
|
651
|
-
bgColor: palette.
|
|
652
|
-
borderColor: palette.
|
|
652
|
+
bgColor: palette.secondaryLight,
|
|
653
|
+
borderColor: palette.secondary,
|
|
653
654
|
hoverBgColor: palette.secondaryLight,
|
|
654
655
|
hoverBorder: palette.secondary
|
|
655
656
|
},
|
|
656
657
|
success: {
|
|
657
658
|
color: palette.successDark,
|
|
658
|
-
bgColor: palette.
|
|
659
|
-
borderColor: palette.
|
|
659
|
+
bgColor: palette.successLight,
|
|
660
|
+
borderColor: palette.success,
|
|
660
661
|
hoverBgColor: palette.successLight,
|
|
661
662
|
hoverBorder: palette.success
|
|
662
663
|
},
|
|
663
664
|
warning: {
|
|
664
665
|
color: palette.warningDark,
|
|
665
|
-
bgColor: palette.
|
|
666
|
-
borderColor: palette.
|
|
666
|
+
bgColor: palette.warningLight,
|
|
667
|
+
borderColor: palette.warning,
|
|
667
668
|
hoverBgColor: palette.warningLight,
|
|
668
669
|
hoverBorder: palette.warning
|
|
669
670
|
},
|
|
670
671
|
error: {
|
|
671
672
|
color: palette.errorDark,
|
|
672
|
-
bgColor: palette.
|
|
673
|
-
borderColor: palette.
|
|
673
|
+
bgColor: palette.errorLight,
|
|
674
|
+
borderColor: palette.error,
|
|
674
675
|
hoverBgColor: palette.errorLight,
|
|
675
676
|
hoverBorder: palette.error
|
|
676
677
|
},
|
|
677
678
|
info: {
|
|
678
679
|
color: palette.infoDark,
|
|
679
|
-
bgColor: palette.
|
|
680
|
-
borderColor: palette.
|
|
680
|
+
bgColor: palette.infoLight,
|
|
681
|
+
borderColor: palette.info,
|
|
681
682
|
hoverBgColor: palette.infoLight,
|
|
682
683
|
hoverBorder: palette.info
|
|
683
684
|
}
|
|
684
685
|
};
|
|
686
|
+
if (disabled) return {
|
|
687
|
+
color: palette.accents_5,
|
|
688
|
+
bgColor: palette.accents_3,
|
|
689
|
+
borderColor: palette.accents_4,
|
|
690
|
+
hoverBgColor: palette.accents_3,
|
|
691
|
+
hoverBorder: palette.accents_4
|
|
692
|
+
};
|
|
693
|
+
if (readOnly) return {
|
|
694
|
+
color: palette.foreground,
|
|
695
|
+
bgColor: palette.accents_2,
|
|
696
|
+
borderColor: palette.accents_3,
|
|
697
|
+
hoverBgColor: palette.accents_2,
|
|
698
|
+
hoverBorder: palette.accents_6
|
|
699
|
+
};
|
|
685
700
|
if (!status) return colors["default"];
|
|
686
701
|
return colors[status];
|
|
687
702
|
};
|
|
@@ -906,7 +921,7 @@ var withScale$1 = withScale;
|
|
|
906
921
|
|
|
907
922
|
var useScale = useScale$1;
|
|
908
923
|
|
|
909
|
-
var _excluded$2 = ["label", "labelRight", "type", "htmlType", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "rounded", "backgroundColor", "borderColor", "hoverBorder"];
|
|
924
|
+
var _excluded$2 = ["label", "labelRight", "type", "htmlType", "icon", "iconRight", "iconClickable", "onIconClick", "initialValue", "onChange", "readOnly", "value", "onClearClick", "clearable", "className", "onBlur", "onFocus", "autoComplete", "placeholder", "children", "disabled", "rounded", "backgroundColor", "borderColor", "hoverBorder", "error", "errorMessage"];
|
|
910
925
|
|
|
911
926
|
var simulateChangeEvent = function simulateChangeEvent(el, event) {
|
|
912
927
|
return _objectSpread2(_objectSpread2({}, event), {}, {
|
|
@@ -941,6 +956,8 @@ var InputComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
941
956
|
backgroundColor = _ref.backgroundColor,
|
|
942
957
|
borderColor = _ref.borderColor,
|
|
943
958
|
hoverBorder = _ref.hoverBorder,
|
|
959
|
+
error = _ref.error,
|
|
960
|
+
errorMessage = _ref.errorMessage,
|
|
944
961
|
props = _objectWithoutProperties(_ref, _excluded$2);
|
|
945
962
|
|
|
946
963
|
var theme = useTheme();
|
|
@@ -971,13 +988,10 @@ var InputComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
971
988
|
}, [label, labelRight]);
|
|
972
989
|
var iconClasses = React.useMemo(function () {
|
|
973
990
|
return iconRight ? 'right-icon' : icon ? 'left-icon' : '';
|
|
974
|
-
}, [icon, iconRight]);
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
// } = useMemo(() => getColors(theme.palette, type), [theme.palette, type])
|
|
979
|
-
|
|
980
|
-
var colors = getColors(theme.palette, type);
|
|
991
|
+
}, [icon, iconRight]);
|
|
992
|
+
var colors = React.useMemo(function () {
|
|
993
|
+
return getColors(theme.palette, type, disabled);
|
|
994
|
+
}, [theme.palette, type, disabled]);
|
|
981
995
|
|
|
982
996
|
var changeHandler = function changeHandler(event) {
|
|
983
997
|
if (disabled || readOnly) return;
|
|
@@ -1032,11 +1046,11 @@ var InputComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1032
1046
|
var inputProps = _objectSpread2(_objectSpread2({}, props), controlledValue);
|
|
1033
1047
|
|
|
1034
1048
|
return /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1035
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1049
|
+
className: styledJsx_cjs.style.dynamic([["2075686027", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, 'initial'), rounded ? '25px' : theme.layout.radius, borderColor ? borderColor : colors.borderColor, backgroundColor ? backgroundColor : colors.bgColor, hoverBorder ? hoverBorder : colors.hoverBorder, backgroundColor ? backgroundColor : colors.hoverBgColor, colors.hoverBorder, SCALES.font(0.875), colors.color, theme.palette.accents_3, theme.palette.background, colors.color]]]) + " " + "with-label"
|
|
1036
1050
|
}, children && /*#__PURE__*/React__default["default"].createElement(InputBlockLabel$1, null, children), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1037
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1051
|
+
className: styledJsx_cjs.style.dynamic([["2075686027", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, 'initial'), rounded ? '25px' : theme.layout.radius, borderColor ? borderColor : colors.borderColor, backgroundColor ? backgroundColor : colors.bgColor, hoverBorder ? hoverBorder : colors.hoverBorder, backgroundColor ? backgroundColor : colors.hoverBgColor, colors.hoverBorder, SCALES.font(0.875), colors.color, theme.palette.accents_3, theme.palette.background, colors.color]]]) + " " + (useClasses$1('input-container', className) || "")
|
|
1038
1052
|
}, label && /*#__PURE__*/React__default["default"].createElement(InputLabel$1, null, label), /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1039
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1053
|
+
className: styledJsx_cjs.style.dynamic([["2075686027", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, 'initial'), rounded ? '25px' : theme.layout.radius, borderColor ? borderColor : colors.borderColor, backgroundColor ? backgroundColor : colors.bgColor, hoverBorder ? hoverBorder : colors.hoverBorder, backgroundColor ? backgroundColor : colors.hoverBgColor, colors.hoverBorder, SCALES.font(0.875), colors.color, theme.palette.accents_3, theme.palette.background, colors.color]]]) + " " + (useClasses$1('input-wrapper', {
|
|
1040
1054
|
hover: hover,
|
|
1041
1055
|
disabled: disabled
|
|
1042
1056
|
}, labelClasses) || "")
|
|
@@ -1053,7 +1067,7 @@ var InputComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1053
1067
|
onChange: changeHandler,
|
|
1054
1068
|
autoComplete: autoComplete
|
|
1055
1069
|
}, inputProps, {
|
|
1056
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1070
|
+
className: styledJsx_cjs.style.dynamic([["2075686027", [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, 'initial'), rounded ? '25px' : theme.layout.radius, borderColor ? borderColor : colors.borderColor, backgroundColor ? backgroundColor : colors.bgColor, hoverBorder ? hoverBorder : colors.hoverBorder, backgroundColor ? backgroundColor : colors.hoverBgColor, colors.hoverBorder, SCALES.font(0.875), colors.color, theme.palette.accents_3, theme.palette.background, colors.color]]]) + " " + (inputProps && inputProps.className != null && inputProps.className || useClasses$1({
|
|
1057
1071
|
disabled: disabled
|
|
1058
1072
|
}, iconClasses) || "")
|
|
1059
1073
|
})), clearable && /*#__PURE__*/React__default["default"].createElement(InputClearIcon, {
|
|
@@ -1064,10 +1078,12 @@ var InputComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1064
1078
|
icon: iconRight
|
|
1065
1079
|
}, iconProps))), labelRight && /*#__PURE__*/React__default["default"].createElement(InputLabel$1, {
|
|
1066
1080
|
isRight: true
|
|
1067
|
-
}, labelRight)), /*#__PURE__*/React__default["default"].createElement(
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1081
|
+
}, labelRight)), error && /*#__PURE__*/React__default["default"].createElement(InputBlockLabel$1, {
|
|
1082
|
+
error: error
|
|
1083
|
+
}, errorMessage), /*#__PURE__*/React__default["default"].createElement(styledJsx_cjs.style, {
|
|
1084
|
+
id: "2075686027",
|
|
1085
|
+
dynamic: [SCALES.height(2.25), SCALES.font(0.875), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0), SCALES.pb(0), SCALES.pl(0), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.width(1, 'initial'), rounded ? '25px' : theme.layout.radius, borderColor ? borderColor : colors.borderColor, backgroundColor ? backgroundColor : colors.bgColor, hoverBorder ? hoverBorder : colors.hoverBorder, backgroundColor ? backgroundColor : colors.hoverBgColor, colors.hoverBorder, SCALES.font(0.875), colors.color, theme.palette.accents_3, theme.palette.background, colors.color]
|
|
1086
|
+
}, ".with-label.__jsx-style-dynamic-selector{display:inline-block;box-sizing:border-box;-webkit-box-align:center;--input-height:".concat(SCALES.height(2.25), ";font-size:").concat(SCALES.font(0.875), ";width:").concat(SCALES.width(1, 'initial'), ";padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.input-container.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:").concat(SCALES.width(1, 'initial'), ";height:var(--input-height);}.input-wrapper.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;vertical-align:middle;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;height:100%;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border-radius:").concat(rounded ? '25px' : theme.layout.radius, ";border:1px solid ").concat(borderColor ? borderColor : colors.borderColor, ";-webkit-transition:border 0.2s ease 0s,color 0.2s ease 0s;transition:border 0.2s ease 0s,color 0.2s ease 0s;background:").concat(backgroundColor ? backgroundColor : colors.bgColor, ";}.input-wrapper.active.__jsx-style-dynamic-selector,.input-wrapper.__jsx-style-dynamic-selector:hover{border:1px solid ").concat(hoverBorder ? hoverBorder : colors.hoverBorder, ";background:").concat(backgroundColor ? backgroundColor : colors.hoverBgColor, ";}.input-wrapper.left-label.__jsx-style-dynamic-selector{border-top-left-radius:0;border-bottom-left-radius:0;}.input-wrapper.right-label.__jsx-style-dynamic-selector{border-top-right-radius:0;border-bottom-right-radius:0;}.input-wrapper.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}input.disabled.__jsx-style-dynamic-selector{cursor:not-allowed;}.input-wrapper.hover.__jsx-style-dynamic-selector{border-color:").concat(colors.hoverBorder, ";}input.__jsx-style-dynamic-selector{margin:0.25em 0.625em;padding:0 4px;box-shadow:none;font-size:").concat(SCALES.font(0.875), ";background-color:transparent;border:none;color:").concat(colors.color, ";outline:none;border-radius:0;width:100%;min-width:0;-webkit-appearance:none;}input.left-icon.__jsx-style-dynamic-selector{margin-left:0;}input.right-icon.__jsx-style-dynamic-selector{margin-right:0;}.__jsx-style-dynamic-selector::-webkit-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::placeholder,.__jsx-style-dynamic-selector::-moz-placeholder,.__jsx-style-dynamic-selector:-ms-input-placeholder,.__jsx-style-dynamic-selector::-webkit-input-placeholder{color:").concat(theme.palette.accents_3, ";}.__jsx-style-dynamic-selector::-ms-reveal{display:none !important;}input.__jsx-style-dynamic-selector:-webkit-autofill,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:hover,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:active,input.__jsx-style-dynamic-selector:-webkit-autofill.__jsx-style-dynamic-selector:focus{-webkit-box-shadow:0 0 0 30px ").concat(theme.palette.background, " inset !important;-webkit-text-fill-color:").concat(colors.color, " !important;}")));
|
|
1071
1087
|
});
|
|
1072
1088
|
InputComponent.defaultProps = defaultProps;
|
|
1073
1089
|
InputComponent.displayName = 'BolioUIInput';
|
package/dist/Input/styles.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export declare type InputColor = {
|
|
|
6
6
|
hoverBgColor: string;
|
|
7
7
|
hoverBorder: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const getColors: (palette: BolioUIThemesPalette, status?: "success" | "primary" | "secondary" | "error" | "warning" | "info" | "default" | undefined) => InputColor;
|
|
9
|
+
export declare const getColors: (palette: BolioUIThemesPalette, status?: "success" | "primary" | "secondary" | "error" | "warning" | "info" | "default" | undefined, disabled?: boolean | undefined, readOnly?: boolean | undefined) => InputColor;
|
package/dist/Select/index.js
CHANGED
|
@@ -1448,7 +1448,7 @@ function SelectMultipleValue(_ref) {
|
|
|
1448
1448
|
|
|
1449
1449
|
SelectMultipleValue.displayName = 'BolioUISelectMultipleValue';
|
|
1450
1450
|
|
|
1451
|
-
var getColors = function getColors(palette, status) {
|
|
1451
|
+
var getColors = function getColors(palette, status, disabled) {
|
|
1452
1452
|
var colors = {
|
|
1453
1453
|
"default": {
|
|
1454
1454
|
color: palette.foreground,
|
|
@@ -1459,47 +1459,54 @@ var getColors = function getColors(palette, status) {
|
|
|
1459
1459
|
},
|
|
1460
1460
|
primary: {
|
|
1461
1461
|
color: palette.primaryDark,
|
|
1462
|
-
bgColor: palette.
|
|
1463
|
-
borderColor: palette.
|
|
1462
|
+
bgColor: palette.primaryLight,
|
|
1463
|
+
borderColor: palette.primary,
|
|
1464
1464
|
hoverBgColor: palette.primaryLight,
|
|
1465
1465
|
hoverBorder: palette.primary
|
|
1466
1466
|
},
|
|
1467
1467
|
secondary: {
|
|
1468
1468
|
color: palette.secondaryDark,
|
|
1469
|
-
bgColor: palette.
|
|
1470
|
-
borderColor: palette.
|
|
1469
|
+
bgColor: palette.secondaryLight,
|
|
1470
|
+
borderColor: palette.secondary,
|
|
1471
1471
|
hoverBgColor: palette.secondaryLight,
|
|
1472
1472
|
hoverBorder: palette.secondary
|
|
1473
1473
|
},
|
|
1474
1474
|
success: {
|
|
1475
1475
|
color: palette.successDark,
|
|
1476
|
-
bgColor: palette.
|
|
1477
|
-
borderColor: palette.
|
|
1476
|
+
bgColor: palette.successLight,
|
|
1477
|
+
borderColor: palette.success,
|
|
1478
1478
|
hoverBgColor: palette.successLight,
|
|
1479
1479
|
hoverBorder: palette.success
|
|
1480
1480
|
},
|
|
1481
1481
|
warning: {
|
|
1482
1482
|
color: palette.warningDark,
|
|
1483
|
-
bgColor: palette.
|
|
1484
|
-
borderColor: palette.
|
|
1483
|
+
bgColor: palette.warningLight,
|
|
1484
|
+
borderColor: palette.warning,
|
|
1485
1485
|
hoverBgColor: palette.warningLight,
|
|
1486
1486
|
hoverBorder: palette.warning
|
|
1487
1487
|
},
|
|
1488
1488
|
error: {
|
|
1489
1489
|
color: palette.errorDark,
|
|
1490
|
-
bgColor: palette.
|
|
1491
|
-
borderColor: palette.
|
|
1490
|
+
bgColor: palette.errorLight,
|
|
1491
|
+
borderColor: palette.error,
|
|
1492
1492
|
hoverBgColor: palette.errorLight,
|
|
1493
1493
|
hoverBorder: palette.error
|
|
1494
1494
|
},
|
|
1495
1495
|
info: {
|
|
1496
1496
|
color: palette.infoDark,
|
|
1497
|
-
bgColor: palette.
|
|
1498
|
-
borderColor: palette.
|
|
1497
|
+
bgColor: palette.infoLight,
|
|
1498
|
+
borderColor: palette.info,
|
|
1499
1499
|
hoverBgColor: palette.infoLight,
|
|
1500
1500
|
hoverBorder: palette.info
|
|
1501
1501
|
}
|
|
1502
1502
|
};
|
|
1503
|
+
if (disabled) return {
|
|
1504
|
+
color: palette.accents_5,
|
|
1505
|
+
bgColor: palette.accents_3,
|
|
1506
|
+
borderColor: palette.accents_4,
|
|
1507
|
+
hoverBgColor: palette.accents_3,
|
|
1508
|
+
hoverBorder: palette.accents_4
|
|
1509
|
+
};
|
|
1503
1510
|
if (!status) return colors["default"];
|
|
1504
1511
|
return colors[status];
|
|
1505
1512
|
};
|
|
@@ -1625,8 +1632,8 @@ var SelectComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1625
1632
|
return value.length === 0;
|
|
1626
1633
|
}, [value]);
|
|
1627
1634
|
var colors = React.useMemo(function () {
|
|
1628
|
-
return getColors(theme.palette, type);
|
|
1629
|
-
}, [theme.palette, type]);
|
|
1635
|
+
return getColors(theme.palette, type, disabled);
|
|
1636
|
+
}, [theme.palette, type, disabled]);
|
|
1630
1637
|
|
|
1631
1638
|
var updateVisible = function updateVisible(next) {
|
|
1632
1639
|
onDropdownVisibleChange(next);
|
|
@@ -1734,7 +1741,7 @@ var SelectComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1734
1741
|
onClick: clickHandler,
|
|
1735
1742
|
onMouseDown: mouseDownHandler
|
|
1736
1743
|
}, props, {
|
|
1737
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1744
|
+
className: styledJsx_cjs.style.dynamic([["12953029", [disabled ? 'not-allowed' : 'pointer', colors.borderColor, theme.layout.radius, colors.bgColor, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), colors.hoverBorder, colors.hoverBgColor, colors.color, colors.color, colors.color, SCALES.font(0.775), theme.layout.gapQuarter, visible ? '180' : '0', colors.color]]]) + " " + (props && props.className != null && props.className || classes || "")
|
|
1738
1745
|
}), /*#__PURE__*/React__default["default"].createElement(SelectInput$1, {
|
|
1739
1746
|
ref: inputRef,
|
|
1740
1747
|
visible: visible,
|
|
@@ -1743,11 +1750,11 @@ var SelectComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1743
1750
|
return setSelectFocus(true);
|
|
1744
1751
|
}
|
|
1745
1752
|
}), isEmpty && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1746
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1753
|
+
className: styledJsx_cjs.style.dynamic([["12953029", [disabled ? 'not-allowed' : 'pointer', colors.borderColor, theme.layout.radius, colors.bgColor, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), colors.hoverBorder, colors.hoverBgColor, colors.color, colors.color, colors.color, SCALES.font(0.775), theme.layout.gapQuarter, visible ? '180' : '0', colors.color]]]) + " " + "value placeholder"
|
|
1747
1754
|
}, /*#__PURE__*/React__default["default"].createElement(Ellipsis$1, {
|
|
1748
1755
|
height: "var(--select-height)"
|
|
1749
1756
|
}, placeholder)), value && !multiple && /*#__PURE__*/React__default["default"].createElement("span", {
|
|
1750
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1757
|
+
className: styledJsx_cjs.style.dynamic([["12953029", [disabled ? 'not-allowed' : 'pointer', colors.borderColor, theme.layout.radius, colors.bgColor, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), colors.hoverBorder, colors.hoverBgColor, colors.color, colors.color, colors.color, SCALES.font(0.775), theme.layout.gapQuarter, visible ? '180' : '0', colors.color]]]) + " " + "value"
|
|
1751
1758
|
}, selectedChild), value && multiple && /*#__PURE__*/React__default["default"].createElement(Grid$1.Container, {
|
|
1752
1759
|
gap: 0.5
|
|
1753
1760
|
}, selectedChild), /*#__PURE__*/React__default["default"].createElement(SelectDropdown$1, {
|
|
@@ -1758,13 +1765,13 @@ var SelectComponent = /*#__PURE__*/React__default["default"].forwardRef(function
|
|
|
1758
1765
|
disableMatchWidth: disableMatchWidth,
|
|
1759
1766
|
getPopupContainer: getPopupContainer
|
|
1760
1767
|
}, children), !pure && /*#__PURE__*/React__default["default"].createElement("div", {
|
|
1761
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1768
|
+
className: styledJsx_cjs.style.dynamic([["12953029", [disabled ? 'not-allowed' : 'pointer', colors.borderColor, theme.layout.radius, colors.bgColor, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), colors.hoverBorder, colors.hoverBgColor, colors.color, colors.color, colors.color, SCALES.font(0.775), theme.layout.gapQuarter, visible ? '180' : '0', colors.color]]]) + " " + "icon"
|
|
1762
1769
|
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
|
|
1763
|
-
className: styledJsx_cjs.style.dynamic([["
|
|
1770
|
+
className: styledJsx_cjs.style.dynamic([["12953029", [disabled ? 'not-allowed' : 'pointer', colors.borderColor, theme.layout.radius, colors.bgColor, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), colors.hoverBorder, colors.hoverBgColor, colors.color, colors.color, colors.color, SCALES.font(0.775), theme.layout.gapQuarter, visible ? '180' : '0', colors.color]]])
|
|
1764
1771
|
})), /*#__PURE__*/React__default["default"].createElement(styledJsx_cjs.style, {
|
|
1765
|
-
id: "
|
|
1766
|
-
dynamic: [disabled ? 'not-allowed' : 'pointer', colors.borderColor, theme.layout.radius,
|
|
1767
|
-
}, ".select.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;position:relative;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";max-width:90vw;overflow:hidden;-webkit-transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;border:1px solid ").concat(colors.borderColor, ";border-radius:").concat(theme.layout.radius, ";background-color:").concat(
|
|
1772
|
+
id: "12953029",
|
|
1773
|
+
dynamic: [disabled ? 'not-allowed' : 'pointer', colors.borderColor, theme.layout.radius, colors.bgColor, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), colors.hoverBorder, colors.hoverBgColor, colors.color, colors.color, colors.color, SCALES.font(0.775), theme.layout.gapQuarter, visible ? '180' : '0', colors.color]
|
|
1774
|
+
}, ".select.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;position:relative;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";max-width:90vw;overflow:hidden;-webkit-transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;border:1px solid ").concat(colors.borderColor, ";border-radius:").concat(theme.layout.radius, ";background-color:").concat(colors.bgColor, ";--select-font-size:").concat(SCALES.font(0.875), ";--select-height:").concat(SCALES.height(2.25), ";min-width:11.5em;width:").concat(SCALES.width(1, 'initial'), ";height:var(--select-height);padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.667), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.multiple.__jsx-style-dynamic-selector{height:auto;min-height:var(--select-height);padding:").concat(SCALES.pt(0.334), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0.334), " ").concat(SCALES.pl(0.667), ";}.select.active.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover{border-color:").concat(colors.hoverBorder, ";background-color:").concat(colors.hoverBgColor, ";}.select.active.icon.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover .icon.__jsx-style-dynamic-selector{color:").concat(colors.color, ";}.value.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;padding:0;margin-right:1.25em;font-size:var(--select-font-size);color:").concat(colors.color, ";width:calc(100% - 1.25em);}.value.__jsx-style-dynamic-selector>div,.value.__jsx-style-dynamic-selector>div:hover{border-radius:0;background-color:transparent;padding:0;margin:0;color:inherit;}.placeholder.__jsx-style-dynamic-selector{color:").concat(colors.color, ";font-size:").concat(SCALES.font(0.775), ";}.icon.__jsx-style-dynamic-selector{position:absolute;right:").concat(theme.layout.gapQuarter, ";font-size:var(--select-font-size);top:50%;bottom:0;-webkit-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);-ms-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);pointer-events:none;-webkit-transition:-webkit-transform 200ms ease;-webkit-transition:transform 200ms ease;transition:transform 200ms ease;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(colors.color, ";}"))));
|
|
1768
1775
|
});
|
|
1769
1776
|
SelectComponent.defaultProps = defaultProps;
|
|
1770
1777
|
SelectComponent.displayName = 'BolioUISelect';
|
package/dist/Select/styles.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export declare type SelectColor = {
|
|
|
6
6
|
hoverBgColor: string;
|
|
7
7
|
hoverBorder: string;
|
|
8
8
|
};
|
|
9
|
-
export declare const getColors: (palette: BolioUIThemesPalette, status?: "success" | "primary" | "secondary" | "error" | "warning" | "info" | "default" | undefined) => SelectColor;
|
|
9
|
+
export declare const getColors: (palette: BolioUIThemesPalette, status?: "success" | "primary" | "secondary" | "error" | "warning" | "info" | "default" | undefined, disabled?: boolean | undefined) => SelectColor;
|