@royaloperahouse/harmonic 0.11.0-l → 0.11.0-m
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/components/atoms/Buttons/Secondary/utils.d.ts +4 -4
- package/dist/harmonic.cjs.development.js +4 -26
- package/dist/harmonic.cjs.development.js.map +1 -1
- package/dist/harmonic.cjs.production.min.js +1 -1
- package/dist/harmonic.cjs.production.min.js.map +1 -1
- package/dist/harmonic.esm.js +4 -26
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/buttonTypes.d.ts +0 -2
- package/package.json +1 -1
package/dist/harmonic.esm.js
CHANGED
|
@@ -2693,70 +2693,48 @@ var COLORS$1 = {
|
|
|
2693
2693
|
hover: 'var(--button-secondary-hover-color)',
|
|
2694
2694
|
pressed: 'var(--button-secondary-pressed-color)'
|
|
2695
2695
|
};
|
|
2696
|
-
var isObjectWithKey = function isObjectWithKey(object, key) {
|
|
2697
|
-
return typeof object === 'object' && object !== null && key in object;
|
|
2698
|
-
};
|
|
2699
|
-
var hasSecondaryButtonColor = function hasSecondaryButtonColor(theme) {
|
|
2700
|
-
return isObjectWithKey(theme, 'colors') && isObjectWithKey(theme.colors, 'secondaryButton') && typeof theme.colors.secondaryButton === 'string';
|
|
2701
|
-
};
|
|
2702
2696
|
var getTextColor$1 = function getTextColor(_ref) {
|
|
2703
2697
|
var disabled = _ref.disabled,
|
|
2704
|
-
textColor = _ref.textColor
|
|
2705
|
-
theme = _ref.theme;
|
|
2698
|
+
textColor = _ref.textColor;
|
|
2706
2699
|
if (disabled) {
|
|
2707
2700
|
return COLORS$1.darkGrey;
|
|
2708
2701
|
}
|
|
2709
2702
|
if (textColor) {
|
|
2710
2703
|
return "var(--color-" + textColor + ")";
|
|
2711
2704
|
}
|
|
2712
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2713
|
-
return theme.colors.secondaryButton;
|
|
2714
|
-
}
|
|
2715
2705
|
return COLORS$1["default"];
|
|
2716
2706
|
};
|
|
2717
2707
|
var getBorderColor = function getBorderColor(_ref2) {
|
|
2718
2708
|
var disabled = _ref2.disabled,
|
|
2719
|
-
borderColor = _ref2.borderColor
|
|
2720
|
-
theme = _ref2.theme;
|
|
2709
|
+
borderColor = _ref2.borderColor;
|
|
2721
2710
|
if (disabled) {
|
|
2722
2711
|
return COLORS$1.disabled;
|
|
2723
2712
|
}
|
|
2724
2713
|
if (borderColor) {
|
|
2725
2714
|
return "var(--color-" + borderColor + ")";
|
|
2726
2715
|
}
|
|
2727
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2728
|
-
return theme.colors.secondaryButton;
|
|
2729
|
-
}
|
|
2730
2716
|
return COLORS$1.border;
|
|
2731
2717
|
};
|
|
2732
2718
|
var getHoveredColor$1 = function getHoveredColor(_ref3) {
|
|
2733
2719
|
var disabled = _ref3.disabled,
|
|
2734
|
-
hoveredColor = _ref3.hoveredColor
|
|
2735
|
-
theme = _ref3.theme;
|
|
2720
|
+
hoveredColor = _ref3.hoveredColor;
|
|
2736
2721
|
if (disabled) {
|
|
2737
2722
|
return COLORS$1.disabled;
|
|
2738
2723
|
}
|
|
2739
2724
|
if (hoveredColor) {
|
|
2740
2725
|
return "var(--color-" + hoveredColor + ")";
|
|
2741
2726
|
}
|
|
2742
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2743
|
-
return theme.colors.secondaryButton;
|
|
2744
|
-
}
|
|
2745
2727
|
return COLORS$1.hover;
|
|
2746
2728
|
};
|
|
2747
2729
|
var getPressedColor$1 = function getPressedColor(_ref4) {
|
|
2748
2730
|
var disabled = _ref4.disabled,
|
|
2749
|
-
pressedColor = _ref4.pressedColor
|
|
2750
|
-
theme = _ref4.theme;
|
|
2731
|
+
pressedColor = _ref4.pressedColor;
|
|
2751
2732
|
if (disabled) {
|
|
2752
2733
|
return COLORS$1.disabled;
|
|
2753
2734
|
}
|
|
2754
2735
|
if (pressedColor) {
|
|
2755
2736
|
return "var(--color-" + pressedColor + ")";
|
|
2756
2737
|
}
|
|
2757
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2758
|
-
return theme.colors.secondaryButton;
|
|
2759
|
-
}
|
|
2760
2738
|
return COLORS$1.pressed;
|
|
2761
2739
|
};
|
|
2762
2740
|
|