@kaizen/components 1.80.4 → 1.80.5

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.
@@ -132,7 +132,7 @@ var GenericTile = function (_a) {
132
132
  className: classnames__default.default(GenericTile_module.root, classNameOverride)
133
133
  }, restProps), React__default.default.createElement("div", {
134
134
  className: classnames__default.default(GenericTile_module.tile, isFlipped && GenericTile_module.isFlipped)
135
- }, React__default.default.createElement(React__default.default.Fragment, null, renderFront(), renderBack())));
135
+ }, isFlipped ? renderBack() : renderFront()));
136
136
  };
137
137
  GenericTile.displayName = 'GenericTile';
138
138
  exports.GenericTile = GenericTile;
@@ -124,7 +124,7 @@ const GenericTile = /*#__PURE__*/function () {
124
124
  className: classnames(styles.root, classNameOverride)
125
125
  }, restProps), /*#__PURE__*/React.createElement("div", {
126
126
  className: classnames(styles.tile, isFlipped && styles.isFlipped)
127
- }, /*#__PURE__*/React.createElement(React.Fragment, null, renderFront(), renderBack())));
127
+ }, isFlipped ? renderBack() : renderFront()));
128
128
  };
129
129
  GenericTile.displayName = 'GenericTile';
130
130
  return GenericTile;
package/dist/styles.css CHANGED
@@ -6,31 +6,6 @@
6
6
  }
7
7
  }
8
8
 
9
- @layer kz-components {
10
- .Popover-module_popover__BjY2S {
11
- position: absolute;
12
- height: auto;
13
- background-color: var(--color-white);
14
- border-radius: var(--spacing-8);
15
- padding: 0;
16
- box-shadow: var(--shadow-small-box-shadow);
17
- overflow: hidden auto;
18
- margin: 0;
19
- box-sizing: border-box;
20
-
21
- /* TODO: update width based on design */
22
- width: 200px;
23
-
24
- @supports (anchor-name: --anchor) {
25
- position-anchor: var(--position-anchor);
26
- margin-block: var(--spacing-4);
27
- position-area: var(--position-area) center;
28
- /* stylelint-disable-next-line declaration-property-value-no-unknown */
29
- width: anchor-size(width);
30
- }
31
- }
32
- }
33
-
34
9
  @layer kz-components {
35
10
  .ListItem-module_listItem__xGr6A {
36
11
  font-family: var(--typography-paragraph-body-font-family);
@@ -48,16 +23,6 @@
48
23
  }
49
24
  }
50
25
 
51
- @layer kz-components {
52
- .ListSection-module_listSectionHeader__bptHg {
53
- font-family: var(--typography-heading-5-font-family);
54
- font-weight: var(--typography-heading-5-font-weight);
55
- font-size: var(--typography-heading-5-font-size);
56
- line-height: var(--typography-heading-5-line-height);
57
- letter-spacing: var(--typography-heading-5-letter-spacing);
58
- }
59
- }
60
-
61
26
  @layer kz-components {
62
27
  .Trigger-module_button__giSqA {
63
28
  anchor-name: var(--anchor-name);
@@ -78,6 +43,41 @@
78
43
  }
79
44
  }
80
45
 
46
+ @layer kz-components {
47
+ .Popover-module_popover__BjY2S {
48
+ position: absolute;
49
+ height: auto;
50
+ background-color: var(--color-white);
51
+ border-radius: var(--spacing-8);
52
+ padding: 0;
53
+ box-shadow: var(--shadow-small-box-shadow);
54
+ overflow: hidden auto;
55
+ margin: 0;
56
+ box-sizing: border-box;
57
+
58
+ /* TODO: update width based on design */
59
+ width: 200px;
60
+
61
+ @supports (anchor-name: --anchor) {
62
+ position-anchor: var(--position-anchor);
63
+ margin-block: var(--spacing-4);
64
+ position-area: var(--position-area) center;
65
+ /* stylelint-disable-next-line declaration-property-value-no-unknown */
66
+ width: anchor-size(width);
67
+ }
68
+ }
69
+ }
70
+
71
+ @layer kz-components {
72
+ .ListSection-module_listSectionHeader__bptHg {
73
+ font-family: var(--typography-heading-5-font-family);
74
+ font-weight: var(--typography-heading-5-font-weight);
75
+ font-size: var(--typography-heading-5-font-size);
76
+ line-height: var(--typography-heading-5-line-height);
77
+ letter-spacing: var(--typography-heading-5-letter-spacing);
78
+ }
79
+ }
80
+
81
81
  @layer kz-components {
82
82
  /*
83
83
  * This is taken from the Material Symbols CDN
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaizen/components",
3
- "version": "1.80.4",
3
+ "version": "1.80.5",
4
4
  "description": "Kaizen component library",
5
5
  "author": "Geoffrey Chong <geoff.chong@cultureamp.com>",
6
6
  "homepage": "https://cultureamp.design",
@@ -20,12 +20,17 @@ type Story = StoryObj<typeof GenericTile>
20
20
  export const Flip: Story = {
21
21
  play: async ({ canvasElement, step }) => {
22
22
  const canvas = within(canvasElement)
23
+ const buttonWithInfoLabel = await canvas.findByRole('button', {
24
+ name: 'View more information: Title',
25
+ })
23
26
 
24
27
  await step('initial render complete', async () => {
28
+ expect(buttonWithInfoLabel).toBeInTheDocument()
29
+ })
30
+
31
+ await step('Can focus to button', async () => {
25
32
  await waitFor(() => {
26
- canvas.getByRole('button', {
27
- name: 'View more information: Title',
28
- })
33
+ buttonWithInfoLabel.click()
29
34
  })
30
35
  })
31
36
 
@@ -159,10 +159,7 @@ export const GenericTile = ({
159
159
  return (
160
160
  <div className={classnames(styles.root, classNameOverride)} {...restProps}>
161
161
  <div className={classnames(styles.tile, isFlipped && styles.isFlipped)}>
162
- <>
163
- {renderFront()}
164
- {renderBack()}
165
- </>
162
+ {isFlipped ? renderBack() : renderFront()}
166
163
  </div>
167
164
  </div>
168
165
  )