@royaloperahouse/harmonic 1.0.5-d → 1.0.5-e
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/CHANGELOG.md +6 -0
- package/dist/components/molecules/CustomStrategyTabsFilter/CustomStrategyTabsFilter.d.ts +32 -39
- package/dist/components/organisms/Carousels/Carousel/Carousel.d.ts +1 -3
- package/dist/components/organisms/Carousels/HighlightsCarousel/HighlightsCarousel.d.ts +1 -3
- package/dist/harmonic.cjs.development.js +31 -38
- 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 +31 -38
- package/dist/harmonic.esm.js.map +1 -1
- package/dist/types/carousel.d.ts +2 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
## [1.0.5-e]
|
|
2
|
+
- PrimaryButton hover only for device detected hover functionality
|
|
3
|
+
|
|
4
|
+
|
|
1
5
|
## [1.0.5-c]
|
|
2
6
|
- Harmonic :
|
|
3
7
|
- Added new CustomStrategy filter
|
|
@@ -8,6 +12,8 @@
|
|
|
8
12
|
- CastFilter: prevent duplicate screen reader announcements for actor images and ensure tapping an actor image ring toggles selection.
|
|
9
13
|
|
|
10
14
|
## [Proposed: 1.0.4]
|
|
15
|
+
|
|
16
|
+
## [1.0.4]
|
|
11
17
|
- Castfilter: fix NDVA issues
|
|
12
18
|
|
|
13
19
|
## [1.0.3]
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from 'react';
|
|
2
2
|
import { TCustomStrategyTabsFilterProps } from '../../../types';
|
|
3
3
|
/**
|
|
4
4
|
* A horizontally scrollable tabs filter component used to display
|
|
@@ -20,7 +20,10 @@ import { TCustomStrategyTabsFilterProps } from '../../../types';
|
|
|
20
20
|
* Optional CSS class name applied to the root scroll container.
|
|
21
21
|
*
|
|
22
22
|
* @param {<T>(item: TCustomStrategyTabsFilterProps['items'][number]) => T} onClick
|
|
23
|
-
*
|
|
23
|
+
* Called when a tab is clicked. Receives the full clicked item (including
|
|
24
|
+
* `allowedSelectedWith`). The parent is responsible for computing the next
|
|
25
|
+
* `items` array and passing it back down with updated `isSelected` values.
|
|
26
|
+
* as long as no return statement `type` is inferred automatically as void
|
|
24
27
|
*
|
|
25
28
|
* @param [customViewConfig]
|
|
26
29
|
* Optional visual configuration used to customize:
|
|
@@ -36,42 +39,32 @@ import { TCustomStrategyTabsFilterProps } from '../../../types';
|
|
|
36
39
|
*
|
|
37
40
|
* @example
|
|
38
41
|
* ```tsx
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
* select: 'primary',
|
|
66
|
-
* unselect: 'base-white',
|
|
67
|
-
* },
|
|
68
|
-
* textColor: {
|
|
69
|
-
* select: 'base-white',
|
|
70
|
-
* unselect: 'base-black',
|
|
71
|
-
* },
|
|
72
|
-
* }}
|
|
73
|
-
* />
|
|
74
|
-
* ```
|
|
42
|
+
* * @example Controlled selection with custom rules
|
|
43
|
+
* * The component does not manage selection itself. The parent owns `items` (including
|
|
44
|
+
* * `isSelected`) and updates that state in `onClick`. Use `allowedSelectedWith` on each
|
|
45
|
+
* * item to describe which other tab IDs may stay selected when that tab is chosen.
|
|
46
|
+
* *
|
|
47
|
+
* * ```tsx
|
|
48
|
+
* * const [items, setItems] = useState<TCustomStrategyTabsFilterItem[]>([
|
|
49
|
+
* * { id: 'all', text: 'All events', isSelected: true, allowedSelectedWith: [] },
|
|
50
|
+
* * { id: 'opera', text: 'Opera', isSelected: false, allowedSelectedWith: ['ballet'] },
|
|
51
|
+
* * { id: 'ballet', text: 'Ballet', isSelected: false, allowedSelectedWith: ['opera'] },
|
|
52
|
+
* * ]);
|
|
53
|
+
* *
|
|
54
|
+
* * const handleClick = (clickedItem: TCustomStrategyTabsFilterItem) => {
|
|
55
|
+
* * setItems((current) =>
|
|
56
|
+
* * current.map((item) => {
|
|
57
|
+
* * if (item.id === clickedItem.id) {
|
|
58
|
+
* * return { ...item, isSelected: !item.isSelected };
|
|
59
|
+
* * }
|
|
60
|
+
* *
|
|
61
|
+
* * const mayStaySelected = clickedItem.allowedSelectedWith?.includes(item.id);
|
|
62
|
+
* * return { ...item, isSelected: mayStaySelected ? !item.isSelected : false };
|
|
63
|
+
* * })
|
|
64
|
+
* * );
|
|
65
|
+
* * };
|
|
66
|
+
* *
|
|
67
|
+
* * return <CustomStrategyTabsFilter items={items} onClick={handleClick} />;
|
|
75
68
|
*/
|
|
76
|
-
declare const CustomStrategyTabsFilter:
|
|
69
|
+
declare const CustomStrategyTabsFilter: ({ items, className, onClick, customViewConfig, }: TCustomStrategyTabsFilterProps) => React.JSX.Element;
|
|
77
70
|
export default CustomStrategyTabsFilter;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { ICarouselProps } from '../../../../types/carousel';
|
|
3
|
-
declare const Carousel: FunctionComponent<ICarouselProps
|
|
4
|
-
titleFontFamily: 'Victor' | 'Grey' | undefined;
|
|
5
|
-
}>>;
|
|
3
|
+
declare const Carousel: FunctionComponent<ICarouselProps>;
|
|
6
4
|
export default Carousel;
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
2
|
import { IHighlightsCarouselProps } from '../../../../types/carousel';
|
|
3
|
-
declare const HighlightsCarousel: FunctionComponent<IHighlightsCarouselProps
|
|
4
|
-
titleFontFamily: 'Victor' | 'Grey' | undefined;
|
|
5
|
-
}>>;
|
|
3
|
+
declare const HighlightsCarousel: FunctionComponent<IHighlightsCarouselProps>;
|
|
6
4
|
export default HighlightsCarousel;
|
|
@@ -3072,7 +3072,7 @@ var getPressedColor = function getPressedColor(_ref4) {
|
|
|
3072
3072
|
};
|
|
3073
3073
|
|
|
3074
3074
|
var _templateObject$6, _templateObject2$3;
|
|
3075
|
-
var PrimaryButtonWrapper = /*#__PURE__*/styled__default(Button)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n pointer-events: ", ";\n\n path {\n fill: ", ";\n }\n\n :hover:not(:active) {\n
|
|
3075
|
+
var PrimaryButtonWrapper = /*#__PURE__*/styled__default(Button)(_templateObject$6 || (_templateObject$6 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n color: ", ";\n background-color: ", ";\n border-color: ", ";\n pointer-events: ", ";\n\n path {\n fill: ", ";\n }\n\n @media (hover: hover) and (pointer: fine) {\n :hover:not(:active) {\n background-color: ", ";\n border-color: ", ";\n\n path {\n fill: ", ";\n }\n }\n }\n\n :active {\n background-color: ", ";\n border-color: ", ";\n\n path {\n fill: ", ";\n }\n }\n"])), getTextColor$1, getBackgroundColor$1, getBackgroundColor$1, getPointerEvents, getTextColor$1, getHoveredColor, getHoveredColor, getTextColor$1, getPressedColor, getPressedColor, getTextColor$1);
|
|
3076
3076
|
var AriaDescription = /*#__PURE__*/styled__default.span(_templateObject2$3 || (_templateObject2$3 = /*#__PURE__*/_taggedTemplateLiteralLoose(["\n position: absolute;\n left: -9999px;\n width: 1px;\n height: 1px;\n overflow: hidden;\n"])));
|
|
3077
3077
|
|
|
3078
3078
|
var _excluded$4 = ["children", "disabled", "className"];
|
|
@@ -7384,7 +7384,10 @@ var _excluded$j = ["text", "id", "isSelected"];
|
|
|
7384
7384
|
* Optional CSS class name applied to the root scroll container.
|
|
7385
7385
|
*
|
|
7386
7386
|
* @param {<T>(item: TCustomStrategyTabsFilterProps['items'][number]) => T} onClick
|
|
7387
|
-
*
|
|
7387
|
+
* Called when a tab is clicked. Receives the full clicked item (including
|
|
7388
|
+
* `allowedSelectedWith`). The parent is responsible for computing the next
|
|
7389
|
+
* `items` array and passing it back down with updated `isSelected` values.
|
|
7390
|
+
* as long as no return statement `type` is inferred automatically as void
|
|
7388
7391
|
*
|
|
7389
7392
|
* @param [customViewConfig]
|
|
7390
7393
|
* Optional visual configuration used to customize:
|
|
@@ -7400,42 +7403,32 @@ var _excluded$j = ["text", "id", "isSelected"];
|
|
|
7400
7403
|
*
|
|
7401
7404
|
* @example
|
|
7402
7405
|
* ```tsx
|
|
7403
|
-
*
|
|
7404
|
-
*
|
|
7405
|
-
*
|
|
7406
|
-
*
|
|
7407
|
-
*
|
|
7408
|
-
*
|
|
7409
|
-
*
|
|
7410
|
-
*
|
|
7411
|
-
*
|
|
7412
|
-
*
|
|
7413
|
-
*
|
|
7414
|
-
*
|
|
7415
|
-
*
|
|
7416
|
-
*
|
|
7417
|
-
*
|
|
7418
|
-
*
|
|
7419
|
-
*
|
|
7420
|
-
*
|
|
7421
|
-
*
|
|
7422
|
-
*
|
|
7423
|
-
*
|
|
7424
|
-
*
|
|
7425
|
-
*
|
|
7426
|
-
*
|
|
7427
|
-
*
|
|
7428
|
-
*
|
|
7429
|
-
* select: 'primary',
|
|
7430
|
-
* unselect: 'base-white',
|
|
7431
|
-
* },
|
|
7432
|
-
* textColor: {
|
|
7433
|
-
* select: 'base-white',
|
|
7434
|
-
* unselect: 'base-black',
|
|
7435
|
-
* },
|
|
7436
|
-
* }}
|
|
7437
|
-
* />
|
|
7438
|
-
* ```
|
|
7406
|
+
* * @example Controlled selection with custom rules
|
|
7407
|
+
* * The component does not manage selection itself. The parent owns `items` (including
|
|
7408
|
+
* * `isSelected`) and updates that state in `onClick`. Use `allowedSelectedWith` on each
|
|
7409
|
+
* * item to describe which other tab IDs may stay selected when that tab is chosen.
|
|
7410
|
+
* *
|
|
7411
|
+
* * ```tsx
|
|
7412
|
+
* * const [items, setItems] = useState<TCustomStrategyTabsFilterItem[]>([
|
|
7413
|
+
* * { id: 'all', text: 'All events', isSelected: true, allowedSelectedWith: [] },
|
|
7414
|
+
* * { id: 'opera', text: 'Opera', isSelected: false, allowedSelectedWith: ['ballet'] },
|
|
7415
|
+
* * { id: 'ballet', text: 'Ballet', isSelected: false, allowedSelectedWith: ['opera'] },
|
|
7416
|
+
* * ]);
|
|
7417
|
+
* *
|
|
7418
|
+
* * const handleClick = (clickedItem: TCustomStrategyTabsFilterItem) => {
|
|
7419
|
+
* * setItems((current) =>
|
|
7420
|
+
* * current.map((item) => {
|
|
7421
|
+
* * if (item.id === clickedItem.id) {
|
|
7422
|
+
* * return { ...item, isSelected: !item.isSelected };
|
|
7423
|
+
* * }
|
|
7424
|
+
* *
|
|
7425
|
+
* * const mayStaySelected = clickedItem.allowedSelectedWith?.includes(item.id);
|
|
7426
|
+
* * return { ...item, isSelected: mayStaySelected ? !item.isSelected : false };
|
|
7427
|
+
* * })
|
|
7428
|
+
* * );
|
|
7429
|
+
* * };
|
|
7430
|
+
* *
|
|
7431
|
+
* * return <CustomStrategyTabsFilter items={items} onClick={handleClick} />;
|
|
7439
7432
|
*/
|
|
7440
7433
|
var CustomStrategyTabsFilter = function CustomStrategyTabsFilter(_ref) {
|
|
7441
7434
|
var _customViewConfig$bac, _customViewConfig$bac2, _customViewConfig$tex, _customViewConfig$tex2;
|