@kaizen/components 1.68.10 → 1.68.12

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.
Files changed (53) hide show
  1. package/dist/cjs/Tag/Tag.cjs +2 -33
  2. package/dist/cjs/Tag/Tag.module.scss.cjs +1 -8
  3. package/dist/cjs/Tag/subcomponents/LiveIcon/LiveIcon.cjs +56 -0
  4. package/dist/cjs/Tag/subcomponents/LiveIcon/LiveIcon.module.css.cjs +12 -0
  5. package/dist/cjs/Tile/TileGrid/TileGrid.cjs +19 -2
  6. package/dist/cjs/__future__/Tabs/constants.cjs +4 -0
  7. package/dist/cjs/__future__/Tabs/subcomponents/Tab/Tab.cjs +3 -1
  8. package/dist/cjs/__future__/Tabs/subcomponents/TabList/TabList.cjs +117 -3
  9. package/dist/cjs/__future__/Tabs/subcomponents/TabList/TabList.module.css.cjs +4 -1
  10. package/dist/cjs/__utilities__/isRTL/isRTL.cjs +11 -0
  11. package/dist/esm/Tag/Tag.mjs +2 -33
  12. package/dist/esm/Tag/Tag.module.scss.mjs +1 -8
  13. package/dist/esm/Tag/subcomponents/LiveIcon/LiveIcon.mjs +54 -0
  14. package/dist/esm/Tag/subcomponents/LiveIcon/LiveIcon.module.css.mjs +10 -0
  15. package/dist/esm/Tile/TileGrid/TileGrid.mjs +19 -2
  16. package/dist/esm/__future__/Tabs/constants.mjs +2 -0
  17. package/dist/esm/__future__/Tabs/subcomponents/Tab/Tab.mjs +3 -1
  18. package/dist/esm/__future__/Tabs/subcomponents/TabList/TabList.mjs +121 -5
  19. package/dist/esm/__future__/Tabs/subcomponents/TabList/TabList.module.css.mjs +4 -1
  20. package/dist/esm/__utilities__/isRTL/isRTL.mjs +9 -0
  21. package/dist/styles.css +155 -87
  22. package/dist/types/Tag/subcomponents/LiveIcon/LiveIcon.d.ts +4 -0
  23. package/dist/types/Tag/subcomponents/LiveIcon/index.d.ts +1 -0
  24. package/dist/types/Tag/subcomponents/index.d.ts +1 -0
  25. package/dist/types/Tile/TileGrid/TileGrid.d.ts +1 -1
  26. package/dist/types/__future__/Tabs/constants.d.ts +1 -0
  27. package/dist/types/__future__/Tabs/subcomponents/TabList/TabList.d.ts +1 -0
  28. package/dist/types/__utilities__/isRTL/index.d.ts +1 -0
  29. package/dist/types/__utilities__/isRTL/isRTL.d.ts +5 -0
  30. package/package.json +3 -3
  31. package/src/Tag/Tag.module.scss +0 -92
  32. package/src/Tag/Tag.tsx +2 -37
  33. package/src/Tag/subcomponents/LiveIcon/LiveIcon.module.css +91 -0
  34. package/src/Tag/subcomponents/LiveIcon/LiveIcon.tsx +48 -0
  35. package/src/Tag/subcomponents/LiveIcon/index.ts +1 -0
  36. package/src/Tag/subcomponents/index.ts +1 -0
  37. package/src/Tile/TileGrid/TileGrid.module.scss +1 -0
  38. package/src/Tile/TileGrid/TileGrid.tsx +32 -7
  39. package/src/Tile/TileGrid/_docs/TileGrid.stickersheet.stories.tsx +40 -0
  40. package/src/Tile/TileGrid/_docs/TileGrid.stories.tsx +78 -1
  41. package/src/Workflow/_docs/ProgressStepper.stickersheet.stories.tsx +59 -0
  42. package/src/Workflow/subcomponents/Footer/components/ProgressStepper/ProgressStepper.module.css +6 -0
  43. package/src/__future__/Tabs/_docs/Tabs.spec.stories.tsx +118 -0
  44. package/src/__future__/Tabs/_docs/Tabs.stickersheet.stories.tsx +84 -0
  45. package/src/__future__/Tabs/_docs/Tabs.stories.tsx +12 -1
  46. package/src/__future__/Tabs/constants.ts +1 -0
  47. package/src/__future__/Tabs/subcomponents/Tab/Tab.tsx +1 -1
  48. package/src/__future__/Tabs/subcomponents/TabList/TabList.module.css +53 -1
  49. package/src/__future__/Tabs/subcomponents/TabList/TabList.tsx +138 -10
  50. package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.stories.tsx +24 -64
  51. package/src/__utilities__/isRTL/index.ts +1 -0
  52. package/src/__utilities__/isRTL/isRTL.spec.tsx +38 -0
  53. package/src/__utilities__/isRTL/isRTL.ts +6 -0
@@ -1,7 +1,10 @@
1
1
  import { __rest, __assign } from 'tslib';
2
- import React from 'react';
2
+ import React, { useState, useRef, useId, useContext, useEffect } from 'react';
3
3
  import classnames from 'classnames';
4
- import { TabList as TabList$1 } from 'react-aria-components';
4
+ import { TabListStateContext, TabList as TabList$1 } from 'react-aria-components';
5
+ import { Icon } from '../../../Icon/Icon.mjs';
6
+ import { isRTL } from '../../../../__utilities__/isRTL/isRTL.mjs';
7
+ import { SCROLL_AMOUNT } from '../../constants.mjs';
5
8
  import styles from './TabList.module.css.mjs';
6
9
 
7
10
  /**
@@ -13,10 +16,123 @@ var TabList = function (props) {
13
16
  noPadding = _a === void 0 ? false : _a,
14
17
  children = props.children,
15
18
  className = props.className,
16
- restProps = __rest(props, ['aria-label', "noPadding", "children", "className"]);
17
- return /*#__PURE__*/React.createElement(TabList$1, __assign({
19
+ testId = props["data-testid"],
20
+ restProps = __rest(props, ['aria-label', "noPadding", "children", "className", 'data-testid']);
21
+ var _b = useState(false),
22
+ isDocumentReady = _b[0],
23
+ setIsDocumentReady = _b[1];
24
+ var _c = useState(false),
25
+ leftArrowEnabled = _c[0],
26
+ setLeftArrowEnabled = _c[1];
27
+ var _d = useState(false),
28
+ rightArrowEnabled = _d[0],
29
+ setRightArrowEnabled = _d[1];
30
+ var tabListRef = useRef(null);
31
+ var tabListId = useId();
32
+ var _e = useState(false),
33
+ isRTL$1 = _e[0],
34
+ setIsRTL = _e[1];
35
+ var _f = useState(),
36
+ containerElement = _f[0],
37
+ setContainerElement = _f[1];
38
+ var tabListContext = useContext(TabListStateContext);
39
+ var selectedKey = tabListContext === null || tabListContext === void 0 ? void 0 : tabListContext.selectedKey;
40
+ useEffect(function () {
41
+ if (!isDocumentReady) {
42
+ setIsDocumentReady(true);
43
+ return;
44
+ }
45
+ var container = document.getElementById(tabListId);
46
+ setContainerElement(container);
47
+ setIsRTL(container ? isRTL(container) : false);
48
+ }, [isDocumentReady, tabListId]);
49
+ useEffect(function () {
50
+ if (!isDocumentReady) {
51
+ return;
52
+ }
53
+ var tabs = containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelectorAll('[data-kz-tab]');
54
+ if (!tabs) {
55
+ return;
56
+ }
57
+ var firstTabObserver = new IntersectionObserver(function (entries) {
58
+ if (!entries[0].isIntersecting) {
59
+ setLeftArrowEnabled(true);
60
+ return;
61
+ }
62
+ setLeftArrowEnabled(false);
63
+ }, {
64
+ threshold: 0.75,
65
+ root: containerElement
66
+ });
67
+ firstTabObserver.observe(isRTL$1 ? tabs[tabs.length - 1] : tabs[0]);
68
+ var lastTabObserver = new IntersectionObserver(function (entries) {
69
+ if (!entries[0].isIntersecting) {
70
+ setRightArrowEnabled(true);
71
+ return;
72
+ }
73
+ setRightArrowEnabled(false);
74
+ }, {
75
+ threshold: 0.75,
76
+ root: containerElement
77
+ });
78
+ lastTabObserver.observe(isRTL$1 ? tabs[0] : tabs[tabs.length - 1]);
79
+ return function () {
80
+ firstTabObserver.disconnect();
81
+ lastTabObserver.disconnect();
82
+ };
83
+ }, [isDocumentReady, containerElement, isRTL$1]);
84
+ useEffect(function () {
85
+ var _a;
86
+ if (!isDocumentReady) {
87
+ return;
88
+ }
89
+ // Scroll selected tab into view
90
+ (_a = containerElement === null || containerElement === void 0 ? void 0 : containerElement.querySelector('[role="tab"][data-selected=true]')) === null || _a === void 0 ? void 0 : _a.scrollIntoView({
91
+ block: 'nearest',
92
+ inline: 'center'
93
+ });
94
+ }, [selectedKey, containerElement, isDocumentReady]);
95
+ var handleArrowPress = function (direction) {
96
+ if (tabListRef.current) {
97
+ var tabListScrollPos = tabListRef.current.scrollLeft;
98
+ var newSpot = direction === 'left' ? tabListScrollPos - SCROLL_AMOUNT : tabListScrollPos + SCROLL_AMOUNT;
99
+ tabListRef.current.scrollLeft = newSpot;
100
+ }
101
+ };
102
+ return /*#__PURE__*/React.createElement("div", {
103
+ className: styles.container,
104
+ id: tabListId
105
+ }, leftArrowEnabled && (
106
+ /*#__PURE__*/
107
+ // making a conscious decision to use <div onClick> over <button> here, because:
108
+ // - <button> would add pointless noise for a screen reader user
109
+ // - keyboard only user can toggle through tabs with left/right arrow keys already
110
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
111
+ React.createElement("div", {
112
+ onClick: function () {
113
+ return handleArrowPress('left');
114
+ },
115
+ className: styles.leftArrow,
116
+ "data-testid": testId ? "".concat(testId, "-kz-tablist-left-arrow") : undefined
117
+ }, /*#__PURE__*/React.createElement(Icon, {
118
+ name: "chevron_left",
119
+ isPresentational: true
120
+ }))), /*#__PURE__*/React.createElement(TabList$1, __assign({
18
121
  "aria-label": ariaLabel,
122
+ ref: tabListRef,
19
123
  className: classnames(styles.tabList, className, noPadding && styles.noPadding)
20
- }, restProps), children);
124
+ }, restProps), children), rightArrowEnabled && (
125
+ /*#__PURE__*/
126
+ // eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions
127
+ React.createElement("div", {
128
+ onClick: function () {
129
+ return handleArrowPress('right');
130
+ },
131
+ className: styles.rightArrow,
132
+ "data-testid": testId ? "".concat(testId, "-kz-tablist-right-arrow") : undefined
133
+ }, /*#__PURE__*/React.createElement(Icon, {
134
+ name: "chevron_right",
135
+ isPresentational: true
136
+ }))));
21
137
  };
22
138
  export { TabList };
@@ -1,5 +1,8 @@
1
1
  var styles = {
2
+ "container": "TabList-module_container__Z8JCa",
2
3
  "tabList": "TabList-module_tabList__e1qAi",
3
- "noPadding": "TabList-module_noPadding__YM23K"
4
+ "noPadding": "TabList-module_noPadding__YM23K",
5
+ "leftArrow": "TabList-module_leftArrow__CPchY",
6
+ "rightArrow": "TabList-module_rightArrow__0xcW1"
4
7
  };
5
8
  export { styles as default };
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Finds the first ancestor with a `dir` property on it
3
+ * Returning true is that is `dir=rtl` and returning false in all other cases
4
+ */
5
+ var isRTL = function (element) {
6
+ var _a;
7
+ return !!((_a = element.closest('[dir]')) === null || _a === void 0 ? void 0 : _a.matches('[dir="rtl"]'));
8
+ };
9
+ export { isRTL };
package/dist/styles.css CHANGED
@@ -349,6 +349,9 @@
349
349
  align-items: center;
350
350
  }
351
351
 
352
+ .Focusable-module_focusableWrapper__NfuIi {
353
+ display: inline-flex;
354
+ }
352
355
  /** THIS IS AN AUTOGENERATED FILE **/
353
356
  /** THIS IS AN AUTOGENERATED FILE **/
354
357
  /** THIS IS AN AUTOGENERATED FILE **/
@@ -405,9 +408,6 @@
405
408
  opacity: 1;
406
409
  }
407
410
  }
408
- .Focusable-module_focusableWrapper__NfuIi {
409
- display: inline-flex;
410
- }
411
411
  /** THIS IS AN AUTOGENERATED FILE **/
412
412
  /** THIS IS AN AUTOGENERATED FILE **/
413
413
  .OverlayArrow-module_overlayArrow__hoDyK {
@@ -5657,15 +5657,67 @@ input[type=range].InputRange-module_ratingScaleRange__gI-rs::-ms-thumb:not(:disa
5657
5657
  }
5658
5658
  }
5659
5659
 
5660
+ .TabList-module_container__Z8JCa {
5661
+ position: relative;
5662
+ }
5663
+
5660
5664
  .TabList-module_tabList__e1qAi {
5661
5665
  border-bottom: 1px solid rgba(var(--color-gray-600-rgb), 0.1);
5662
- padding: var(--spacing-xs) var(--spacing-md) 0;
5666
+ padding: var(--spacing-6) 0 0;
5667
+ width: 100%;
5668
+ height: 100%;
5669
+ overflow-x: scroll;
5670
+ white-space: nowrap;
5671
+ scrollbar-width: none;
5672
+ scroll-behavior: smooth;
5663
5673
  }
5664
5674
 
5665
5675
  .TabList-module_noPadding__YM23K {
5666
5676
  padding: 0;
5667
5677
  }
5668
5678
 
5679
+ .TabList-module_leftArrow__CPchY,
5680
+ .TabList-module_rightArrow__0xcW1 {
5681
+ --icon-size: 24;
5682
+
5683
+ display: flex;
5684
+ align-items: center;
5685
+ justify-content: center;
5686
+ position: absolute;
5687
+ z-index: 10000;
5688
+ background: var(--color-white);
5689
+ inset-block: 0 1px;
5690
+ width: 48px;
5691
+ cursor: default;
5692
+ user-select: none;
5693
+ }
5694
+
5695
+ /*
5696
+ * Note: we're purposefully using directional properties instead of start/end for positioning and styling related to the carousel arrows
5697
+ */
5698
+ .TabList-module_leftArrow__CPchY {
5699
+ left: 0;
5700
+ }
5701
+
5702
+ .TabList-module_leftArrow__CPchY,
5703
+ .TabList-module_leftArrow__CPchY:hover {
5704
+ border-right: 1px solid rgba(var(--color-gray-600-rgb), 0.1);
5705
+ }
5706
+
5707
+ .TabList-module_rightArrow__0xcW1 {
5708
+ right: 0;
5709
+ }
5710
+
5711
+ .TabList-module_rightArrow__0xcW1,
5712
+ .TabList-module_rightArrow__0xcW1:hover {
5713
+ border-left: 1px solid rgba(var(--color-gray-600-rgb), 0.1);
5714
+ }
5715
+
5716
+ .TabList-module_leftArrow__CPchY:hover,
5717
+ .TabList-module_rightArrow__0xcW1:hover {
5718
+ background: var(--color-gray-200);
5719
+ }
5720
+
5669
5721
  .TabPanel-module_tabPanel__ae5Rx {
5670
5722
  border: 2px solid transparent;
5671
5723
 
@@ -8649,6 +8701,98 @@ input[type=range].InputRange-module_ratingScaleRange__gI-rs::-ms-thumb:not(:disa
8649
8701
  display: block;
8650
8702
  margin-bottom: var(--spacing-xs, 0.375rem);
8651
8703
  }
8704
+ .LiveIcon-module_liveIcon__v6FG- {
8705
+ display: inline-block;
8706
+ position: relative;
8707
+ width: 20px;
8708
+ height: 20px;
8709
+ margin-inline-start: 0.25rem;
8710
+ color: var(--color-green-500);
8711
+ }
8712
+
8713
+ .LiveIcon-module_liveIcon_base__Kagqm {
8714
+ opacity: 0.3;
8715
+ display: block;
8716
+ }
8717
+
8718
+ .LiveIcon-module_liveIcon_1__ye1Qk,
8719
+ .LiveIcon-module_liveIcon_2__p6f55,
8720
+ .LiveIcon-module_liveIcon_3__JmRFR {
8721
+ display: block;
8722
+ position: absolute;
8723
+ top: 0;
8724
+ left: 0;
8725
+ width: 100%;
8726
+ height: 100%;
8727
+ aspect-ratio: 1;
8728
+ overflow: hidden;
8729
+ }
8730
+
8731
+ .LiveIcon-module_liveIcon_1__ye1Qk {
8732
+ clip-path: circle(16%);
8733
+ }
8734
+
8735
+ .LiveIcon-module_liveIcon_2__p6f55,
8736
+ .LiveIcon-module_liveIcon_3__JmRFR {
8737
+ animation-duration: 3s;
8738
+ animation-iteration-count: 3;
8739
+ animation-delay: 1s;
8740
+ }
8741
+
8742
+ .LiveIcon-module_liveIcon_2__p6f55 {
8743
+ clip-path: circle(32%);
8744
+ animation-name: LiveIcon-module_pulse-inner__EGliV;
8745
+ }
8746
+
8747
+ .LiveIcon-module_liveIcon_3__JmRFR {
8748
+ clip-path: circle(50%);
8749
+ animation-name: LiveIcon-module_pulse-outer__bxHMh;
8750
+ }
8751
+
8752
+ @keyframes LiveIcon-module_pulse-inner__EGliV {
8753
+ 0% {
8754
+ opacity: 0;
8755
+ }
8756
+
8757
+ 25% {
8758
+ opacity: 0;
8759
+ }
8760
+
8761
+ 50% {
8762
+ opacity: 1;
8763
+ }
8764
+
8765
+ 75% {
8766
+ opacity: 1;
8767
+ }
8768
+
8769
+ 100% {
8770
+ opacity: 1;
8771
+ }
8772
+ }
8773
+
8774
+ @keyframes LiveIcon-module_pulse-outer__bxHMh {
8775
+ 0% {
8776
+ opacity: 0;
8777
+ }
8778
+
8779
+ 25% {
8780
+ opacity: 0;
8781
+ }
8782
+
8783
+ 50% {
8784
+ opacity: 0;
8785
+ }
8786
+
8787
+ 75% {
8788
+ opacity: 1;
8789
+ }
8790
+
8791
+ 100% {
8792
+ opacity: 1;
8793
+ }
8794
+ }
8795
+
8652
8796
  /** THIS IS AN AUTOGENERATED FILE **/
8653
8797
  /** THIS IS AN AUTOGENERATED FILE **/
8654
8798
  /** THIS IS AN AUTOGENERATED FILE **/
@@ -8844,89 +8988,6 @@ input[type=range].InputRange-module_ratingScaleRange__gI-rs::-ms-thumb:not(:disa
8844
8988
  background-color: var(--color-blue-100, #e6f6ff);
8845
8989
  color: var(--color-purple-800, #2f2438);
8846
8990
  }
8847
-
8848
- .Tag-module_liveIcon__URtak {
8849
- display: inline-block;
8850
- position: relative;
8851
- width: 20px;
8852
- height: 20px;
8853
- margin-inline-start: 0.25rem;
8854
- color: var(--color-green-500, #3f9a86);
8855
- }
8856
-
8857
- .Tag-module_liveIcon_base__Nk5um {
8858
- opacity: 30%;
8859
- display: block;
8860
- }
8861
-
8862
- .Tag-module_liveIcon_1__STFJY,
8863
- .Tag-module_liveIcon_2__rko-D,
8864
- .Tag-module_liveIcon_3__fL71y {
8865
- display: block;
8866
- position: absolute;
8867
- top: 0;
8868
- left: 0;
8869
- width: 100%;
8870
- height: 100%;
8871
- aspect-ratio: 1;
8872
- overflow: hidden;
8873
- }
8874
-
8875
- .Tag-module_liveIcon_1__STFJY {
8876
- clip-path: circle(16%);
8877
- }
8878
-
8879
- .Tag-module_liveIcon_2__rko-D,
8880
- .Tag-module_liveIcon_3__fL71y {
8881
- animation-duration: 3s;
8882
- animation-iteration-count: 3;
8883
- animation-delay: 1s;
8884
- }
8885
-
8886
- .Tag-module_liveIcon_2__rko-D {
8887
- clip-path: circle(32%);
8888
- animation-name: Tag-module_pulse-inner__0-JFL;
8889
- }
8890
-
8891
- .Tag-module_liveIcon_3__fL71y {
8892
- clip-path: circle(50%);
8893
- animation-name: Tag-module_pulse-outer__f9Oox;
8894
- }
8895
-
8896
- @keyframes Tag-module_pulse-inner__0-JFL {
8897
- 0% {
8898
- opacity: 0%;
8899
- }
8900
- 25% {
8901
- opacity: 0%;
8902
- }
8903
- 50% {
8904
- opacity: 100%;
8905
- }
8906
- 75% {
8907
- opacity: 100%;
8908
- }
8909
- 100% {
8910
- opacity: 100%;
8911
- }
8912
- }
8913
- @keyframes Tag-module_pulse-outer__f9Oox {
8914
- 0% {
8915
- opacity: 0%;
8916
- }
8917
- 25% {
8918
- opacity: 0%;
8919
- }
8920
- 50% {
8921
- opacity: 0%;
8922
- }
8923
- 75% {
8924
- opacity: 100%;
8925
- }
8926
- 100% {
8927
- opacity: 100%;
8928
- }
8929
- }
8930
8991
  /** THIS IS AN AUTOGENERATED FILE **/
8931
8992
  /** THIS IS AN AUTOGENERATED FILE **/
8932
8993
  /** THIS IS AN AUTOGENERATED FILE **/
@@ -10105,6 +10166,7 @@ input[type=range].InputRange-module_ratingScaleRange__gI-rs::-ms-thumb:not(:disa
10105
10166
  }
10106
10167
  /** THIS IS AN AUTOGENERATED FILE **/
10107
10168
  .TileGrid-module_grid__1WCNc {
10169
+ list-style-type: none;
10108
10170
  display: grid;
10109
10171
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
10110
10172
  grid-gap: var(--spacing-md, 1.5rem);
@@ -11690,6 +11752,12 @@ input[type=range].InputRange-module_ratingScaleRange__gI-rs::-ms-thumb:not(:disa
11690
11752
  /* sets fron the bottom to the centre of the dot */
11691
11753
  top: calc(100% - calc(var(--progress-stepper-indicator-size) / 2));
11692
11754
  transform: translateX(-50%);
11755
+
11756
+ :dir(rtl) & {
11757
+ left: unset;
11758
+ right: 100%;
11759
+ transform: translateX(50%);
11760
+ }
11693
11761
  }
11694
11762
 
11695
11763
  .ProgressStepper-module_stepperDescription__KplV3 {
@@ -0,0 +1,4 @@
1
+ export declare const LiveIcon: {
2
+ (): JSX.Element;
3
+ displayName: string;
4
+ };
@@ -0,0 +1 @@
1
+ export * from './LiveIcon';
@@ -0,0 +1 @@
1
+ export * from './LiveIcon';
@@ -4,7 +4,7 @@ import { InformationTileProps } from '../InformationTile';
4
4
  import { MultiActionTileProps } from '../MultiActionTile';
5
5
  type TileProps = InformationTileProps | MultiActionTileProps;
6
6
  export type TileElement = ReactElement<TileProps>;
7
- export interface TileGridProps extends OverrideClassName<HTMLAttributes<HTMLDivElement>> {
7
+ export interface TileGridProps extends OverrideClassName<HTMLAttributes<HTMLUListElement>> {
8
8
  children: TileElement[] | TileElement;
9
9
  }
10
10
  /**
@@ -0,0 +1 @@
1
+ export declare const SCROLL_AMOUNT = 120;
@@ -10,6 +10,7 @@ export type TabListProps = {
10
10
  */
11
11
  'noPadding'?: boolean;
12
12
  'children': ReactNode;
13
+ 'data-testid'?: string;
13
14
  } & RACTabListProps<HTMLElement>;
14
15
  /**
15
16
  * Wrapper for the tabs themselves
@@ -0,0 +1 @@
1
+ export * from './isRTL';
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Finds the first ancestor with a `dir` property on it
3
+ * Returning true is that is `dir=rtl` and returning false in all other cases
4
+ */
5
+ export declare const isRTL: (element: Element) => boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "1.68.10",
3
+ "version": "1.68.12",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -117,8 +117,8 @@
117
117
  "svgo": "^3.3.2",
118
118
  "tslib": "^2.8.1",
119
119
  "tsx": "^4.19.2",
120
- "@kaizen/design-tokens": "10.8.6",
121
- "@kaizen/package-bundler": "2.0.3"
120
+ "@kaizen/package-bundler": "2.0.3",
121
+ "@kaizen/design-tokens": "10.8.6"
122
122
  },
123
123
  "devDependenciesComments": {
124
124
  "sass": "Prevent deprecation warnings introduced in 1.80 as we plan to move away from sass",
@@ -211,95 +211,3 @@ $small: $spacing-md;
211
211
  background-color: $color-blue-100;
212
212
  color: $color-purple-800;
213
213
  }
214
-
215
- .liveIcon {
216
- display: inline-block;
217
- position: relative;
218
- width: 20px;
219
- height: 20px;
220
- margin-inline-start: 0.25rem;
221
- color: $color-green-500;
222
- }
223
-
224
- .liveIcon_base {
225
- opacity: 30%;
226
- display: block;
227
- }
228
-
229
- .liveIcon_1,
230
- .liveIcon_2,
231
- .liveIcon_3 {
232
- display: block;
233
- position: absolute;
234
- top: 0;
235
- left: 0;
236
- width: 100%;
237
- height: 100%;
238
- aspect-ratio: 1;
239
- overflow: hidden;
240
- }
241
-
242
- .liveIcon_1 {
243
- clip-path: circle(16%);
244
- }
245
-
246
- .liveIcon_2,
247
- .liveIcon_3 {
248
- animation-duration: 3s;
249
- animation-iteration-count: 3;
250
- animation-delay: 1s;
251
- }
252
-
253
- .liveIcon_2 {
254
- clip-path: circle(32%);
255
- animation-name: pulse-inner;
256
- }
257
-
258
- .liveIcon_3 {
259
- clip-path: circle(50%);
260
- animation-name: pulse-outer;
261
- }
262
-
263
- @keyframes pulse-inner {
264
- 0% {
265
- opacity: 0%;
266
- }
267
-
268
- 25% {
269
- opacity: 0%;
270
- }
271
-
272
- 50% {
273
- opacity: 100%;
274
- }
275
-
276
- 75% {
277
- opacity: 100%;
278
- }
279
-
280
- 100% {
281
- opacity: 100%;
282
- }
283
- }
284
-
285
- @keyframes pulse-outer {
286
- 0% {
287
- opacity: 0%;
288
- }
289
-
290
- 25% {
291
- opacity: 0%;
292
- }
293
-
294
- 50% {
295
- opacity: 0%;
296
- }
297
-
298
- 75% {
299
- opacity: 100%;
300
- }
301
-
302
- 100% {
303
- opacity: 100%;
304
- }
305
- }
package/src/Tag/Tag.tsx CHANGED
@@ -1,8 +1,8 @@
1
1
  import React from 'react'
2
2
  import classnames from 'classnames'
3
3
  import { Avatar, AvatarProps } from '~components/Avatar'
4
- import { LiveIcon } from '~components/Icon'
5
4
  import { Icon } from '~components/__future__/Icon'
5
+ import { LiveIcon } from './subcomponents/LiveIcon/LiveIcon'
6
6
  import { TagVariants } from './types'
7
7
  import styles from './Tag.module.scss'
8
8
 
@@ -130,42 +130,7 @@ export const Tag = (props: TagProps): JSX.Element => {
130
130
  </button>
131
131
  </>
132
132
  )}
133
- {variant === 'statusLive' && (
134
- <span className={styles.liveIcon}>
135
- <LiveIcon
136
- role="presentation"
137
- classNameOverride={styles.liveIcon_base}
138
- width="16"
139
- height="16"
140
- viewBox="0 0 16 16"
141
- fill="none"
142
- />
143
- <LiveIcon
144
- role="presentation"
145
- classNameOverride={styles.liveIcon_1}
146
- width="16"
147
- height="16"
148
- viewBox="0 0 16 16"
149
- fill="none"
150
- />
151
- <LiveIcon
152
- role="presentation"
153
- classNameOverride={styles.liveIcon_2}
154
- width="16"
155
- height="16"
156
- viewBox="0 0 16 16"
157
- fill="none"
158
- />
159
- <LiveIcon
160
- role="presentation"
161
- classNameOverride={styles.liveIcon_3}
162
- width="16"
163
- height="16"
164
- viewBox="0 0 16 16"
165
- fill="none"
166
- />
167
- </span>
168
- )}
133
+ {variant === 'statusLive' && <LiveIcon />}
169
134
  </>
170
135
  </div>
171
136
  </div>