@bundle-stats/ui 4.9.2-beta.3 → 4.9.3-beta.0

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 (88) hide show
  1. package/lib/app/header/header.js +1 -1
  2. package/lib/app/header/header.js.map +1 -1
  3. package/lib/components/bundle-assets/bundle-assets.i18n.js +5 -0
  4. package/lib/components/bundle-assets/bundle-assets.i18n.js.map +1 -0
  5. package/lib/components/bundle-assets/bundle-assets.js +2 -1
  6. package/lib/components/bundle-assets/bundle-assets.js.map +1 -1
  7. package/lib/components/bundle-packages/bundle-packages.i18n.js +5 -0
  8. package/lib/components/bundle-packages/bundle-packages.i18n.js.map +1 -0
  9. package/lib/components/bundle-packages/bundle-packages.js +5 -2
  10. package/lib/components/bundle-packages/bundle-packages.js.map +1 -1
  11. package/lib/components/jobs-header/jobs-header.js +1 -1
  12. package/lib/components/jobs-header/jobs-header.js.map +1 -1
  13. package/lib/components/jobs-header/jobs-header.module.css +2 -1
  14. package/lib/components/run-info/run-info.js +3 -5
  15. package/lib/components/run-info/run-info.js.map +1 -1
  16. package/lib/components/run-info/run-info.module.css +12 -1
  17. package/lib/css/default.css +0 -67
  18. package/lib/css/variables.css +3 -0
  19. package/lib/query-state.js +2 -1
  20. package/lib/query-state.js.map +1 -1
  21. package/lib/ui/button/button.js +3 -3
  22. package/lib/ui/button/button.js.map +1 -1
  23. package/lib/ui/button/button.module.css +53 -0
  24. package/lib/ui/dropdown/dropdown.js +2 -1
  25. package/lib/ui/dropdown/dropdown.js.map +1 -1
  26. package/lib/ui/dropdown/dropdown.module.css +0 -20
  27. package/lib/ui/hover-card/hover-card.js +2 -2
  28. package/lib/ui/hover-card/hover-card.js.map +1 -1
  29. package/lib/ui/hover-card/hover-card.module.css +1 -0
  30. package/lib/ui/skeleton/skeleton.module.css +1 -0
  31. package/lib/ui/tooltip/tooltip.module.css +1 -0
  32. package/lib-esm/app/header/header.js +1 -1
  33. package/lib-esm/app/header/header.js.map +1 -1
  34. package/lib-esm/components/bundle-assets/bundle-assets.i18n.js +2 -0
  35. package/lib-esm/components/bundle-assets/bundle-assets.i18n.js.map +1 -0
  36. package/lib-esm/components/bundle-assets/bundle-assets.js +2 -1
  37. package/lib-esm/components/bundle-assets/bundle-assets.js.map +1 -1
  38. package/lib-esm/components/bundle-packages/bundle-packages.i18n.js +2 -0
  39. package/lib-esm/components/bundle-packages/bundle-packages.i18n.js.map +1 -0
  40. package/lib-esm/components/bundle-packages/bundle-packages.js +6 -3
  41. package/lib-esm/components/bundle-packages/bundle-packages.js.map +1 -1
  42. package/lib-esm/components/jobs-header/jobs-header.js +1 -1
  43. package/lib-esm/components/jobs-header/jobs-header.js.map +1 -1
  44. package/lib-esm/components/jobs-header/jobs-header.module.css +2 -1
  45. package/lib-esm/components/run-info/run-info.js +3 -5
  46. package/lib-esm/components/run-info/run-info.js.map +1 -1
  47. package/lib-esm/components/run-info/run-info.module.css +12 -1
  48. package/lib-esm/css/default.css +0 -67
  49. package/lib-esm/css/variables.css +3 -0
  50. package/lib-esm/query-state.js +2 -1
  51. package/lib-esm/query-state.js.map +1 -1
  52. package/lib-esm/ui/button/button.js +3 -3
  53. package/lib-esm/ui/button/button.js.map +1 -1
  54. package/lib-esm/ui/button/button.module.css +53 -0
  55. package/lib-esm/ui/dropdown/dropdown.js +2 -1
  56. package/lib-esm/ui/dropdown/dropdown.js.map +1 -1
  57. package/lib-esm/ui/dropdown/dropdown.module.css +0 -20
  58. package/lib-esm/ui/hover-card/hover-card.js +2 -2
  59. package/lib-esm/ui/hover-card/hover-card.js.map +1 -1
  60. package/lib-esm/ui/hover-card/hover-card.module.css +1 -0
  61. package/lib-esm/ui/skeleton/skeleton.module.css +1 -0
  62. package/lib-esm/ui/tooltip/tooltip.module.css +1 -0
  63. package/package.json +9 -9
  64. package/src/app/header/header.tsx +2 -1
  65. package/src/components/bundle-assets/bundle-assets.i18n.ts +1 -0
  66. package/src/components/bundle-assets/bundle-assets.jsx +2 -1
  67. package/src/components/bundle-packages/bundle-packages.i18n.ts +1 -0
  68. package/src/components/bundle-packages/bundle-packages.jsx +6 -3
  69. package/src/components/jobs-header/jobs-header.module.css +2 -1
  70. package/src/components/jobs-header/jobs-header.tsx +1 -1
  71. package/src/components/run-info/run-info.module.css +12 -1
  72. package/src/components/run-info/run-info.tsx +9 -12
  73. package/src/css/default.css +0 -67
  74. package/src/css/variables.css +3 -0
  75. package/src/query-state.tsx +3 -1
  76. package/src/ui/button/button.module.css +53 -0
  77. package/src/ui/button/button.stories.tsx +30 -0
  78. package/src/ui/button/button.tsx +13 -3
  79. package/src/ui/dropdown/dropdown.jsx +9 -1
  80. package/src/ui/dropdown/dropdown.module.css +0 -20
  81. package/src/ui/hover-card/hover-card.module.css +1 -0
  82. package/src/ui/hover-card/hover-card.tsx +1 -2
  83. package/src/ui/skeleton/skeleton.module.css +1 -0
  84. package/src/ui/tooltip/tooltip.module.css +1 -0
  85. package/types/components/bundle-assets/bundle-assets.i18n.d.ts +1 -0
  86. package/types/components/bundle-packages/bundle-packages.d.ts +4 -1
  87. package/types/components/bundle-packages/bundle-packages.i18n.d.ts +1 -0
  88. package/types/ui/button/button.d.ts +4 -3
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bundle-stats/ui",
3
- "version": "4.9.2-beta.3",
3
+ "version": "4.9.3-beta.0",
4
4
  "description": "UI components for BundleStats projects.",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib-esm/index.js",
@@ -36,13 +36,13 @@
36
36
  },
37
37
  "homepage": "https://github.com/relative-ci/bundle-stats/blob/master/packages/ui#readme",
38
38
  "devDependencies": {
39
- "@babel/preset-env": "7.23.8",
39
+ "@babel/preset-env": "7.23.9",
40
40
  "@babel/preset-react": "7.23.3",
41
41
  "@babel/preset-typescript": "7.23.3",
42
- "@storybook/addon-essentials": "7.6.10",
43
- "@storybook/react": "7.6.10",
44
- "@storybook/react-webpack5": "7.6.10",
45
- "@types/react": "18.2.48",
42
+ "@storybook/addon-essentials": "7.6.13",
43
+ "@storybook/react": "7.6.13",
44
+ "@storybook/react-webpack5": "7.6.13",
45
+ "@types/react": "18.2.55",
46
46
  "@types/react-router-dom": "5.3.3",
47
47
  "babel-plugin-require-context-hook": "1.0.0",
48
48
  "classnames": "2.5.1",
@@ -59,7 +59,7 @@
59
59
  "react-dom": "18.2.0",
60
60
  "react-router-dom": "5.3.4",
61
61
  "rimraf": "5.0.5",
62
- "storybook": "7.6.10",
62
+ "storybook": "7.6.13",
63
63
  "typescript": "5.1.6",
64
64
  "typescript-plugin-css-modules": "5.0.2"
65
65
  },
@@ -72,10 +72,10 @@
72
72
  "react-router-dom": "^5.0.0"
73
73
  },
74
74
  "dependencies": {
75
- "@bundle-stats/utils": "4.9.2-beta.3",
75
+ "@bundle-stats/utils": "4.9.3-beta.0",
76
76
  "ariakit": "2.0.0-next.44",
77
77
  "modern-css-reset": "1.4.0",
78
78
  "use-query-params": "2.2.1"
79
79
  },
80
- "gitHead": "51838cea169e3c5cbb1c2d388756b0b9b66a059a"
80
+ "gitHead": "c1e671f4c5524f5d25433bb6594bb21087c73f88"
81
81
  }
@@ -22,8 +22,9 @@ export const Header = ({ className = '', jobs }: HeaderProps & React.ComponentPr
22
22
  href={config.gitHubUrl}
23
23
  target="_blank"
24
24
  rel="noopener noreferrer"
25
- className={css.toolsGitHub}
26
25
  title={I18N.GITHUB_LINK_TITLE}
26
+ aria-label={I18N.GITHUB_LINK_TITLE}
27
+ className={css.toolsGitHub}
27
28
  >
28
29
  <Icon glyph={Icon.ICONS.GITHUB} size="large" className={css.toolsGitHubIcon} />
29
30
  </a>
@@ -0,0 +1 @@
1
+ export const SEARCH_PLACEHOLDER = 'Search by asset path';
@@ -28,6 +28,7 @@ import { ComponentLink } from '../component-link';
28
28
  import { MetricsTable } from '../metrics-table';
29
29
  import { MetricsTableOptions } from '../metrics-table-options';
30
30
  import { MetricsTableTitle } from '../metrics-table-title';
31
+ import { SEARCH_PLACEHOLDER } from './bundle-assets.i18n';
31
32
  import css from './bundle-assets.module.css';
32
33
 
33
34
  const RUN_TITLE_CURRENT = 'Current';
@@ -237,7 +238,7 @@ export const BundleAssets = (props) => {
237
238
  <FlexStack space="xxsmall">
238
239
  <InputSearch
239
240
  className={css.toolbarSearch}
240
- placeholder="Search by name"
241
+ placeholder={SEARCH_PLACEHOLDER}
241
242
  defaultValue={search}
242
243
  onChange={updateSearch}
243
244
  />
@@ -0,0 +1 @@
1
+ export const SEARCH_PLACEHOLDER = 'Search by package name';
@@ -1,4 +1,4 @@
1
- import React, { useCallback, useMemo, useState } from 'react';
1
+ import React, { useCallback, useMemo } from 'react';
2
2
  import PropTypes from 'prop-types';
3
3
  import cx from 'classnames';
4
4
  import { COMPONENT, PACKAGE_FILTERS, PACKAGES_SEPARATOR, SECTIONS } from '@bundle-stats/utils';
@@ -16,6 +16,7 @@ import { MetricsTable } from '../metrics-table';
16
16
  import { MetricsTableOptions } from '../metrics-table-options';
17
17
  import { MetricsTableTitle } from '../metrics-table-title';
18
18
  import { PackageInfo } from '../package-info';
19
+ import { SEARCH_PLACEHOLDER } from './bundle-packages.i18n';
19
20
  import css from './bundle-packages.module.css';
20
21
 
21
22
  const getDropdownFilters = ({ compareMode, filters }) => ({
@@ -196,7 +197,7 @@ export const BundlePackages = (props) => {
196
197
  <FlexStack space="xxsmall">
197
198
  <InputSearch
198
199
  className={css.toolbarSearch}
199
- placeholder="Search by name"
200
+ placeholder={SEARCH_PLACEHOLDER}
200
201
  defaultValue={search}
201
202
  onChange={updateSearch}
202
203
  />
@@ -239,6 +240,7 @@ BundlePackages.defaultProps = {
239
240
  totalRowCount: 0,
240
241
  hasActiveFilters: false,
241
242
  customComponentLink: ComponentLink,
243
+ entryId: '',
242
244
  };
243
245
 
244
246
  BundlePackages.propTypes = {
@@ -277,7 +279,8 @@ BundlePackages.propTypes = {
277
279
  updateSearch: PropTypes.func.isRequired,
278
280
  allItems: PropTypes.arrayOf(PropTypes.shape({
279
281
  key: PropTypes.string,
280
- })),
282
+ })).isRequired,
281
283
  customComponentLink: PropTypes.elementType,
284
+ entryId: PropTypes.string,
282
285
  hideEntryInfo: PropTypes.func.isRequired,
283
286
  };
@@ -49,12 +49,13 @@
49
49
  }
50
50
 
51
51
  .itemMeta {
52
- font-size: var(--size-small);
53
52
  color: var(--color-text-light);
53
+ font-size: var(--size-small);
54
54
  }
55
55
 
56
56
  .itemMetaIcon {
57
57
  flex: 0 0 auto;
58
+ color: var(--color-text-ultra-light);
58
59
  }
59
60
 
60
61
  .itemMetaText {
@@ -29,7 +29,7 @@ export const Item = (props: ItemProps & React.ComponentProps<'div'>) => {
29
29
 
30
30
  return (
31
31
  <FlexStack space="xsmall" alignItems="center" className={rootClassName}>
32
- <FlexStack space="xxxsmall" as="h1" className={css.itemTitle}>
32
+ <FlexStack space="xxsmall" as="h1" className={css.itemTitle}>
33
33
  <span>{`#${job.internalBuildNumber}`}</span>
34
34
  {tag && <Tag className={css.itemTag}>{tag}</Tag>}
35
35
  </FlexStack>
@@ -31,8 +31,15 @@
31
31
  font-weight: bold;
32
32
  }
33
33
 
34
+ .deltaValue + .deltaValue::before {
35
+ margin-left: calc(var(--space-xxxsmall) / 2);
36
+ margin-right: calc(var(--space-xxxsmall) / 2);
37
+ content: '/';
38
+ color: var(--color-text-ultra-light);
39
+ }
40
+
34
41
  .baselineMetric {
35
- color: var(--color-text-light);
42
+ color: var(--color-text-ultra-light);
36
43
  font-size: var(--size-small);
37
44
  line-height: var(--line-height-heading);
38
45
  }
@@ -75,3 +82,7 @@
75
82
  .large .baselineMetric {
76
83
  font-size: var(--size-medium);
77
84
  }
85
+
86
+ .large .delta {
87
+ margin-left: var(--space-xxxsmall);
88
+ }
@@ -98,27 +98,24 @@ export const RunInfo = ({
98
98
  {!loading ? (
99
99
  <Stack className={css.info}>
100
100
  <Metric
101
- className={css.currentMetric}
102
101
  value={currentValueParams[0]}
103
102
  unit={currentValueParams[1]}
104
103
  inline
104
+ className={css.currentMetric}
105
105
  >
106
106
  {(delta || deltaPercentage) && (
107
- <FlexStack space="xxxsmall" alignItems="center">
107
+ <span className={css.delta}>
108
108
  {deltaPercentage && (
109
- <FlexStack space="xxxsmall" alignItems="center">
110
- <Delta
111
- className={css.delta}
112
- displayValue={deltaPercentage}
113
- deltaType={deltaType}
114
- />
115
- {' / '}
116
- </FlexStack>
109
+ <Delta
110
+ displayValue={deltaPercentage}
111
+ deltaType={deltaType}
112
+ className={css.deltaValue}
113
+ />
117
114
  )}
118
115
  {delta && (
119
- <Delta className={css.delta} displayValue={delta} deltaType={deltaType} />
116
+ <Delta displayValue={delta} deltaType={deltaType} className={css.deltaValue} />
120
117
  )}
121
- </FlexStack>
118
+ </span>
122
119
  )}
123
120
  </Metric>
124
121
  {showBaseline && <Metric className={css.baselineMetric} value={baseline} />}
@@ -53,7 +53,6 @@ code {
53
53
  font-family: var(--font-family-fixed);
54
54
  }
55
55
 
56
- /** Orbit updates */
57
56
  a {
58
57
  color: var(--color-primary);
59
58
  }
@@ -64,69 +63,3 @@ a:focus {
64
63
  color: var(--color-primary-dark);
65
64
  outline: none;
66
65
  }
67
-
68
- .ui-button--primary {
69
- background: var(--color-primary);
70
- }
71
-
72
- .ui-button--primary:active,
73
- .ui-button--primary:focus,
74
- .ui-button--primary:hover {
75
- background: var(--color-primary-dark);
76
- }
77
-
78
- .ui-button--secondary {
79
- background: var(--color-secondary);
80
- }
81
-
82
- .ui-button--secondary:active,
83
- .ui-button--secondary:focus,
84
- .ui-button--secondary:hover {
85
- background: var(--color-secondary-dark);
86
- }
87
-
88
- .ui-button--info {
89
- background: var(--color-info);
90
- }
91
-
92
- .ui-button--info:active,
93
- .ui-button--info:focus,
94
- .ui-button--info:hover {
95
- background: var(--color-info-dark);
96
- }
97
-
98
- .ui-button--success {
99
- background: var(--color-success);
100
- }
101
-
102
- .ui-button--success:active,
103
- .ui-button--success:focus,
104
- .ui-button--success:hover {
105
- background: var(--color-success-dark);
106
- }
107
-
108
-
109
- .ui-button--warning {
110
- background: var(--color-warning);
111
- }
112
-
113
- .ui-button--warning:active,
114
- .ui-button--warning:focus,
115
- .ui-button--warning:hover {
116
- background: var(--color-warning-dark);
117
- }
118
-
119
- .ui-button--danger {
120
- background: var(--color-danger);
121
- }
122
-
123
- .ui-button--danger:active,
124
- .ui-button--danger:focus,
125
- .ui-button--danger:hover {
126
- background: var(--color-danger-dark);
127
- }
128
-
129
- .__reakit-portal {
130
- z-index: var(--layer-xhigh);
131
- position: relative;
132
- }
@@ -160,6 +160,8 @@
160
160
 
161
161
  --color-background: #fff;
162
162
  --color-highlight: var(--color-gray-25);
163
+ --color-highlight-primary: var(--color-blue-25);
164
+ --color-highlight-secondary: var(--color-green-25);
163
165
  --color-highlight-success: var(--color-green-25);
164
166
  --color-highlight-info: var(--color-blue-25);
165
167
  --color-highlight-warning: var(--color-yellow-25);
@@ -185,6 +187,7 @@
185
187
  --layer: 100;
186
188
  --layer-high: 1000;
187
189
  --layer-xhigh: 10000;
190
+ --layer-xxhigh: 100000;
188
191
 
189
192
  --shadow-layer: 0 0 var(--space-xxxsmall) var(--color-shadow);
190
193
  --shadow-layer-high: 0 0 var(--space-xxsmall) var(--color-shadow);
@@ -20,7 +20,9 @@ export const useComponentQueryState = (componentName: string) => {
20
20
  const componentState = queryState[componentName];
21
21
 
22
22
  const setState = useCallback(
23
- (newState: Record<string, unknown>) => {
23
+ (updates: Record<string, unknown>) => {
24
+ const newState = { ...componentState, ...updates };
25
+
24
26
  // Deep check to prevent unnecessary state changes
25
27
  if (isEqual(componentState, newState)) {
26
28
  return;
@@ -250,14 +250,26 @@
250
250
  padding: var(--space-xxsmall);
251
251
  }
252
252
 
253
+ .outline--padding--small {
254
+ padding: calc(var(--space-xxsmall) - 1px);
255
+ }
256
+
253
257
  .padding--medium {
254
258
  padding: var(--space-xsmall);
255
259
  }
256
260
 
261
+ .outline--padding--medium {
262
+ padding: calc(var(--space-xsmall) - 1px);
263
+ }
264
+
257
265
  .padding--large {
258
266
  padding: var(--space-small);
259
267
  }
260
268
 
269
+ .outline--padding--large {
270
+ padding: calc(var(--space-small) - 1px);
271
+ }
272
+
261
273
  /**
262
274
  * Radius variation
263
275
  */
@@ -277,6 +289,47 @@
277
289
  border-radius: 50%;
278
290
  }
279
291
 
292
+ /**
293
+ * Active variation
294
+ */
295
+ .active {
296
+ text-decoration: underline;
297
+ }
298
+
299
+ .active-outline-default {
300
+ background: var(--color-highlight);
301
+ text-decoration: none;
302
+ }
303
+
304
+ .active-outline-primary {
305
+ background: var(--color-highlight-primary);
306
+ text-decoration: none;
307
+ }
308
+ .active-outline-secondary {
309
+ background: var(--color-highlight-secondary);
310
+ text-decoration: none;
311
+ }
312
+
313
+ .active-outline-info {
314
+ background: var(--color-highlight-info);
315
+ text-decoration: none;
316
+ }
317
+
318
+ .active-outline-success {
319
+ background: var(--color-highlight-success);
320
+ text-decoration: none;
321
+ }
322
+
323
+ .active-outline-warning {
324
+ background: var(--color-highlight-warning);
325
+ text-decoration: none;
326
+ }
327
+
328
+ .active-outline-danger {
329
+ background: var(--color-highlight-danger);
330
+ text-decoration: none;
331
+ }
332
+
280
333
  /**
281
334
  * Disabled state
282
335
  */
@@ -38,6 +38,14 @@ export const All = () => (
38
38
  </Button>
39
39
  ))}
40
40
  </FlexStack>
41
+ <h3>Active</h3>
42
+ <FlexStack space="small" alignItems="top">
43
+ {Object.values(Button.KIND).map((kind) => (
44
+ <Button kind={kind} key={kind} active>
45
+ Action {kind}
46
+ </Button>
47
+ ))}
48
+ </FlexStack>
41
49
  <h3>Disabled</h3>
42
50
  <FlexStack space="small" alignItems="top">
43
51
  {Object.values(Button.KIND).map((kind) => (
@@ -63,6 +71,17 @@ export const All = () => (
63
71
  ))}
64
72
  </FlexStack>
65
73
  ))}
74
+ <h3>Active</h3>
75
+ <FlexStack space="small" alignItems="top">
76
+ <Button outline active>
77
+ Action default
78
+ </Button>
79
+ {Object.values(Button.KIND).map((kind) => (
80
+ <Button outline kind={kind} key={kind} active>
81
+ Action {kind}
82
+ </Button>
83
+ ))}
84
+ </FlexStack>
66
85
  <h3>Disabled</h3>
67
86
  <FlexStack space="small" alignItems="top">
68
87
  <Button outline disabled>
@@ -91,6 +110,17 @@ export const All = () => (
91
110
  ))}
92
111
  </FlexStack>
93
112
  ))}
113
+ <h3>Active</h3>
114
+ <FlexStack space="small" alignItems="top">
115
+ <Button solid active>
116
+ Action default
117
+ </Button>
118
+ {Object.values(Button.KIND).map((kind) => (
119
+ <Button solid kind={kind} key={kind} active>
120
+ Action {kind}
121
+ </Button>
122
+ ))}
123
+ </FlexStack>
94
124
  <h3>Disabled</h3>
95
125
  <FlexStack space="small" alignItems="top">
96
126
  <Button solid disabled>
@@ -22,24 +22,30 @@ const KIND = {
22
22
  type Size = (typeof SIZE)[keyof typeof SIZE];
23
23
  type Kind = (typeof KIND)[keyof typeof KIND];
24
24
 
25
- interface ButtonProps {
25
+ interface ButtonProps<T extends React.ElementType> {
26
26
  outline?: boolean;
27
27
  solid?: boolean;
28
+ active?: boolean;
28
29
  kind?: Kind | 'default';
29
30
  size?: Size;
30
31
  radius?: Size | 'circle' | 'none';
31
32
  padding?: Size | 'none';
33
+ as?: T;
32
34
  }
33
35
 
34
- export const Button = (props: ButtonProps & React.ComponentProps<typeof ButtonBaseComponent>) => {
36
+ export const Button = <T extends React.ElementType = 'button'>(
37
+ props: ButtonProps<T> & Omit<React.ComponentPropsWithoutRef<T>, keyof ButtonProps<T>>,
38
+ ) => {
35
39
  const {
36
40
  className = '',
37
41
  outline = false,
38
42
  solid = false,
43
+ active = false,
39
44
  kind = 'default',
40
45
  size = 'medium',
41
46
  radius = '',
42
47
  padding = '',
48
+ as: Component = ButtonBaseComponent,
43
49
  ...restProps
44
50
  } = props;
45
51
 
@@ -59,13 +65,17 @@ export const Button = (props: ButtonProps & React.ComponentProps<typeof ButtonBa
59
65
  solid && css[`solid--${kind}`],
60
66
 
61
67
  resolvedPadding && css[`padding--${resolvedPadding}`],
68
+ resolvedPadding && outline && css[`outline--padding--${resolvedPadding}`],
62
69
  resolvedRadius && css[`radius--${resolvedRadius}`],
63
70
 
71
+ active && css.active,
72
+ active && outline && css[`active-outline-${kind}`],
73
+
64
74
  css[size],
65
75
  className,
66
76
  );
67
77
 
68
- return <ButtonBaseComponent {...restProps} className={rootClassName} />;
78
+ return <Component {...restProps} className={rootClassName} />;
69
79
  };
70
80
 
71
81
  Button.SIZE = SIZE;
@@ -4,6 +4,7 @@ import cx from 'classnames';
4
4
  import { Menu, MenuButton, MenuItem, useMenuState } from 'ariakit/menu';
5
5
 
6
6
  import { FlexStack } from '../../layout/flex-stack';
7
+ import { Button } from '../button';
7
8
  import { Icon } from '../icon';
8
9
  import css from './dropdown.module.css';
9
10
 
@@ -28,7 +29,14 @@ export const Dropdown = (props) => {
28
29
 
29
30
  return (
30
31
  <div className={rootClassName}>
31
- <MenuButton state={menuState} className={cx(css.button, buttonClassName)} tabIndex={null}>
32
+ <MenuButton
33
+ as={Button}
34
+ outline
35
+ size={Button.SIZE.SMALL}
36
+ state={menuState}
37
+ tabIndex={null}
38
+ className={cx(css.button, buttonClassName)}
39
+ >
32
40
  <FlexStack space="xxxsmall" alignItems="center" className={css.label}>
33
41
  {glyph && <Icon className={css.labelIcon} glyph={glyph} />}
34
42
  {label && <span className={css.labelText}>{label}</span>}
@@ -3,29 +3,9 @@
3
3
  }
4
4
 
5
5
  .button {
6
- background: none;
7
- border: none;
8
- padding: 0;
9
-
10
- border: 1px solid var(--color-outline);
11
- border-radius: var(--radius-small);
12
- padding: calc(var(--space-xxsmall) - 1px);
13
-
14
- appearance: none;
15
- background: none;
16
6
  font-size: var(--size-small);
17
7
  line-height: var(--space-small);
18
8
  white-space: nowrap;
19
- color: var(--color-text-light);
20
- }
21
-
22
- .button[aria-expanded=true],
23
- .button:hover,
24
- .button:focus,
25
- .button:active {
26
- outline: none;
27
- box-shadow: var(--outline-hover);
28
- color: var(--color-text);
29
9
  }
30
10
 
31
11
  .dropdown {
@@ -17,6 +17,7 @@
17
17
  }
18
18
 
19
19
  .hoverCard {
20
+ z-index: var(--layer-xxhigh);
20
21
  padding: var(--space-xsmall) var(--space-small);
21
22
  border-radius: var(--radius-medium);
22
23
  width: calc(100vw - 2 * var(--space-small));
@@ -31,7 +31,7 @@ export const HoverCard = (props: HoverCardProps) => {
31
31
  children,
32
32
  } = props;
33
33
 
34
- const state = useHovercardState({ gutter: 8, timeout: 800 });
34
+ const state = useHovercardState({ gutter: 8, timeout: 300 });
35
35
  const hovercardProps = useHovercard({ state, portal: true });
36
36
 
37
37
  // Fallback to span if no href
@@ -62,7 +62,6 @@ export const HoverCard = (props: HoverCardProps) => {
62
62
  {...hovercardProps}
63
63
  state={state}
64
64
  className={cx(css.hoverCard, hoverCardClassName)}
65
- style={{ zIndex: 10000 }}
66
65
  >
67
66
  <HovercardArrow size={24} />
68
67
  {typeof children === 'function' ? children({ close: state.hide }) : children}
@@ -3,6 +3,7 @@
3
3
  opacity: 0.05;
4
4
  pointer-events: none;
5
5
  min-width: 6em;
6
+ border-radius: var(--radius-medium);
6
7
  }
7
8
 
8
9
  /** empty char to keep the text height */
@@ -19,6 +19,7 @@
19
19
  filter: drop-shadow(var(--shadow-layer));
20
20
  will-change: filter;
21
21
  font-size: var(--size-xsmall);
22
+ z-index: var(--layer-xxhigh);
22
23
  }
23
24
 
24
25
  .arrow svg {
@@ -0,0 +1 @@
1
+ export declare const SEARCH_PLACEHOLDER = "Search by asset path";
@@ -5,6 +5,7 @@ export namespace BundlePackages {
5
5
  export let totalRowCount: number;
6
6
  export let hasActiveFilters: boolean;
7
7
  export { ComponentLink as customComponentLink };
8
+ export let entryId: string;
8
9
  }
9
10
  namespace propTypes {
10
11
  let className_1: PropTypes.Requireable<string>;
@@ -37,10 +38,12 @@ export namespace BundlePackages {
37
38
  export let updateSort: PropTypes.Validator<(...args: any[]) => any>;
38
39
  export let search: PropTypes.Validator<string>;
39
40
  export let updateSearch: PropTypes.Validator<(...args: any[]) => any>;
40
- export let allItems: PropTypes.Requireable<(PropTypes.InferProps<{
41
+ export let allItems: PropTypes.Validator<(PropTypes.InferProps<{
41
42
  key: PropTypes.Requireable<string>;
42
43
  }> | null | undefined)[]>;
43
44
  export let customComponentLink: PropTypes.Requireable<PropTypes.ReactComponentLike>;
45
+ let entryId_1: PropTypes.Requireable<string>;
46
+ export { entryId_1 as entryId };
44
47
  export let hideEntryInfo: PropTypes.Validator<(...args: any[]) => any>;
45
48
  }
46
49
  }
@@ -0,0 +1 @@
1
+ export declare const SEARCH_PLACEHOLDER = "Search by package name";
@@ -1,5 +1,4 @@
1
1
  import React from 'react';
2
- import { Button as ButtonBaseComponent } from 'ariakit/button';
3
2
  declare const SIZE: {
4
3
  readonly SMALL: "small";
5
4
  readonly MEDIUM: "medium";
@@ -15,16 +14,18 @@ declare const KIND: {
15
14
  };
16
15
  type Size = (typeof SIZE)[keyof typeof SIZE];
17
16
  type Kind = (typeof KIND)[keyof typeof KIND];
18
- interface ButtonProps {
17
+ interface ButtonProps<T extends React.ElementType> {
19
18
  outline?: boolean;
20
19
  solid?: boolean;
20
+ active?: boolean;
21
21
  kind?: Kind | 'default';
22
22
  size?: Size;
23
23
  radius?: Size | 'circle' | 'none';
24
24
  padding?: Size | 'none';
25
+ as?: T;
25
26
  }
26
27
  export declare const Button: {
27
- (props: ButtonProps & React.ComponentProps<typeof ButtonBaseComponent>): React.JSX.Element;
28
+ <T extends React.ElementType<any, keyof React.JSX.IntrinsicElements> = "button">(props: ButtonProps<T> & Omit<React.PropsWithoutRef<React.ComponentProps<T>>, keyof ButtonProps<T>>): React.JSX.Element;
28
29
  SIZE: {
29
30
  readonly SMALL: "small";
30
31
  readonly MEDIUM: "medium";