@royaloperahouse/harmonic 0.11.0-k → 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 +17 -31
- 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 +17 -31
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/buttonTypes.d.ts +0 -2
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export declare const COLORS: {
|
|
|
8
8
|
readonly hover: "var(--button-secondary-hover-color)";
|
|
9
9
|
readonly pressed: "var(--button-secondary-pressed-color)";
|
|
10
10
|
};
|
|
11
|
-
export declare const getTextColor: ({ disabled, textColor
|
|
12
|
-
export declare const getBorderColor: ({ disabled, borderColor
|
|
13
|
-
export declare const getHoveredColor: ({ disabled, hoveredColor
|
|
14
|
-
export declare const getPressedColor: ({ disabled, pressedColor
|
|
11
|
+
export declare const getTextColor: ({ disabled, textColor }: SecondaryButtonProps) => string;
|
|
12
|
+
export declare const getBorderColor: ({ disabled, borderColor }: SecondaryButtonProps) => string;
|
|
13
|
+
export declare const getHoveredColor: ({ disabled, hoveredColor }: SecondaryButtonProps) => string;
|
|
14
|
+
export declare const getPressedColor: ({ disabled, pressedColor }: SecondaryButtonProps) => string;
|
|
@@ -2670,70 +2670,48 @@ var COLORS$1 = {
|
|
|
2670
2670
|
hover: 'var(--button-secondary-hover-color)',
|
|
2671
2671
|
pressed: 'var(--button-secondary-pressed-color)'
|
|
2672
2672
|
};
|
|
2673
|
-
var isObjectWithKey = function isObjectWithKey(object, key) {
|
|
2674
|
-
return typeof object === 'object' && object !== null && key in object;
|
|
2675
|
-
};
|
|
2676
|
-
var hasSecondaryButtonColor = function hasSecondaryButtonColor(theme) {
|
|
2677
|
-
return isObjectWithKey(theme, 'colors') && isObjectWithKey(theme.colors, 'secondaryButton') && typeof theme.colors.secondaryButton === 'string';
|
|
2678
|
-
};
|
|
2679
2673
|
var getTextColor$1 = function getTextColor(_ref) {
|
|
2680
2674
|
var disabled = _ref.disabled,
|
|
2681
|
-
textColor = _ref.textColor
|
|
2682
|
-
theme = _ref.theme;
|
|
2675
|
+
textColor = _ref.textColor;
|
|
2683
2676
|
if (disabled) {
|
|
2684
2677
|
return COLORS$1.darkGrey;
|
|
2685
2678
|
}
|
|
2686
2679
|
if (textColor) {
|
|
2687
2680
|
return "var(--color-" + textColor + ")";
|
|
2688
2681
|
}
|
|
2689
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2690
|
-
return theme.colors.secondaryButton;
|
|
2691
|
-
}
|
|
2692
2682
|
return COLORS$1["default"];
|
|
2693
2683
|
};
|
|
2694
2684
|
var getBorderColor = function getBorderColor(_ref2) {
|
|
2695
2685
|
var disabled = _ref2.disabled,
|
|
2696
|
-
borderColor = _ref2.borderColor
|
|
2697
|
-
theme = _ref2.theme;
|
|
2686
|
+
borderColor = _ref2.borderColor;
|
|
2698
2687
|
if (disabled) {
|
|
2699
2688
|
return COLORS$1.disabled;
|
|
2700
2689
|
}
|
|
2701
2690
|
if (borderColor) {
|
|
2702
2691
|
return "var(--color-" + borderColor + ")";
|
|
2703
2692
|
}
|
|
2704
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2705
|
-
return theme.colors.secondaryButton;
|
|
2706
|
-
}
|
|
2707
2693
|
return COLORS$1.border;
|
|
2708
2694
|
};
|
|
2709
2695
|
var getHoveredColor$1 = function getHoveredColor(_ref3) {
|
|
2710
2696
|
var disabled = _ref3.disabled,
|
|
2711
|
-
hoveredColor = _ref3.hoveredColor
|
|
2712
|
-
theme = _ref3.theme;
|
|
2697
|
+
hoveredColor = _ref3.hoveredColor;
|
|
2713
2698
|
if (disabled) {
|
|
2714
2699
|
return COLORS$1.disabled;
|
|
2715
2700
|
}
|
|
2716
2701
|
if (hoveredColor) {
|
|
2717
2702
|
return "var(--color-" + hoveredColor + ")";
|
|
2718
2703
|
}
|
|
2719
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2720
|
-
return theme.colors.secondaryButton;
|
|
2721
|
-
}
|
|
2722
2704
|
return COLORS$1.hover;
|
|
2723
2705
|
};
|
|
2724
2706
|
var getPressedColor$1 = function getPressedColor(_ref4) {
|
|
2725
2707
|
var disabled = _ref4.disabled,
|
|
2726
|
-
pressedColor = _ref4.pressedColor
|
|
2727
|
-
theme = _ref4.theme;
|
|
2708
|
+
pressedColor = _ref4.pressedColor;
|
|
2728
2709
|
if (disabled) {
|
|
2729
2710
|
return COLORS$1.disabled;
|
|
2730
2711
|
}
|
|
2731
2712
|
if (pressedColor) {
|
|
2732
2713
|
return "var(--color-" + pressedColor + ")";
|
|
2733
2714
|
}
|
|
2734
|
-
if (hasSecondaryButtonColor(theme)) {
|
|
2735
|
-
return theme.colors.secondaryButton;
|
|
2736
|
-
}
|
|
2737
2715
|
return COLORS$1.pressed;
|
|
2738
2716
|
};
|
|
2739
2717
|
|
|
@@ -6211,11 +6189,19 @@ var AnchorTabBar = function AnchorTabBar(_ref) {
|
|
|
6211
6189
|
}, 500);
|
|
6212
6190
|
}, []);
|
|
6213
6191
|
React.useEffect(function () {
|
|
6214
|
-
|
|
6215
|
-
var
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6192
|
+
if (typeof window === 'undefined') return undefined;
|
|
6193
|
+
var handleResize = function handleResize() {
|
|
6194
|
+
var _tabListRef$current, _tabListRef$current2;
|
|
6195
|
+
var tabsIsOverflowed = (((_tabListRef$current = tabListRef.current) == null ? void 0 : _tabListRef$current.scrollWidth) || 0) > (((_tabListRef$current2 = tabListRef.current) == null ? void 0 : _tabListRef$current2.clientWidth) || 0);
|
|
6196
|
+
setTabsOverflow(tabsIsOverflowed);
|
|
6197
|
+
setCanScrollToRight(tabsIsOverflowed);
|
|
6198
|
+
};
|
|
6199
|
+
window.addEventListener('resize', handleResize);
|
|
6200
|
+
handleResize(); // Initial check
|
|
6201
|
+
return function () {
|
|
6202
|
+
window.removeEventListener('resize', handleResize);
|
|
6203
|
+
};
|
|
6204
|
+
}, []);
|
|
6219
6205
|
React.useEffect(function () {
|
|
6220
6206
|
var scrollTriggerCheck = function scrollTriggerCheck() {
|
|
6221
6207
|
var elementGap = 100;
|