@apify/ui-library 1.153.2-featureexposetestids-bd5e63.21 → 1.153.2

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/package.json CHANGED
@@ -1,24 +1,12 @@
1
1
  {
2
2
  "name": "@apify/ui-library",
3
- "version": "1.153.2-featureexposetestids-bd5e63.21+d086d94f166",
3
+ "version": "1.153.2",
4
4
  "description": "React UI library used by apify.com",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "sideEffects": false,
8
8
  "main": "dist/index.js",
9
9
  "types": "dist/index.d.ts",
10
- "exports": {
11
- ".": {
12
- "types": "./dist/index.d.ts",
13
- "default": "./dist/index.js"
14
- },
15
- "./test-ids": {
16
- "types": "./dist/test_ids.d.ts",
17
- "default": "./dist/test_ids.js"
18
- },
19
- "./style/*": "./style/*",
20
- "./package.json": "./package.json"
21
- },
22
10
  "publishConfig": {
23
11
  "registry": "https://registry.npmjs.org",
24
12
  "access": "public"
@@ -75,7 +63,7 @@
75
63
  "styled-components": "^6.1.19"
76
64
  },
77
65
  "devDependencies": {
78
- "@apify-packages/types": "^3.392.1",
66
+ "@apify-packages/types": "^3.393.0",
79
67
  "@storybook/react-vite": "^10.3.5",
80
68
  "@testing-library/react": "^16.3.2",
81
69
  "@types/hast": "^3.0.4",
@@ -95,5 +83,5 @@
95
83
  "src",
96
84
  "style"
97
85
  ],
98
- "gitHead": "d086d94f166a86fee89868e4c9df887fb49577fd"
86
+ "gitHead": "1139bba67611929694e7b130d5ff44b8f48d5746"
99
87
  }
@@ -26,6 +26,11 @@ export type SelectOption = {
26
26
  label: ReactNode;
27
27
  value: SelectOptionValue;
28
28
  description?: string;
29
+ /**
30
+ * When `true`, the option is greyed out and cannot be selected (react-select reads this natively via
31
+ * its default `isOptionDisabled`). Use it to keep unavailable options visible instead of hiding them.
32
+ */
33
+ isDisabled?: boolean;
29
34
  };
30
35
 
31
36
  // There is a prop collision in styled-components@6 and react-select. react-select uses `theme` prop but
@@ -87,8 +92,14 @@ const selectStyles: StylesConfig<SelectOption> = {
87
92
  }),
88
93
  option: (base, state) => ({
89
94
  ...base,
90
- color: state.isSelected ? theme.color.neutral.textOnPrimary : theme.color.neutral.text,
95
+ // Disabled options stay visible but greyed out and non-selectable ("disable, don't hide").
96
+ color: state.isDisabled
97
+ ? theme.color.neutral.textDisabled
98
+ : state.isSelected
99
+ ? theme.color.neutral.textOnPrimary
100
+ : theme.color.neutral.text,
91
101
  backgroundColor: state.isSelected ? theme.color.primary.action : theme.color.neutral.background,
102
+ cursor: state.isDisabled ? 'not-allowed' : 'default',
92
103
  '& > p': {
93
104
  color: state.isSelected ? theme.color.neutral.textOnPrimary : theme.color.neutral.textSubtle,
94
105
  a: {
@@ -101,7 +112,11 @@ const selectStyles: StylesConfig<SelectOption> = {
101
112
  },
102
113
 
103
114
  '&:hover': {
104
- backgroundColor: state.isSelected ? undefined : theme.color.neutral.hover,
115
+ backgroundColor: state.isDisabled
116
+ ? theme.color.neutral.background
117
+ : state.isSelected
118
+ ? undefined
119
+ : theme.color.neutral.hover,
105
120
  },
106
121
  }),
107
122
  noOptionsMessage: (base) => ({
@@ -1,2 +0,0 @@
1
- export { tableTestIds } from './components/table/table.test_ids.js';
2
- //# sourceMappingURL=test_ids.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test_ids.d.ts","sourceRoot":"","sources":["../../src/test_ids.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC"}
@@ -1,4 +0,0 @@
1
- // `./test-ids` subpath barrel. Playwright imports test IDs from here to avoid the
2
- // React/CSS-heavy root barrel (which breaks non-bundler loaders). Add future modules here.
3
- export { tableTestIds } from './components/table/table.test_ids.js';
4
- //# sourceMappingURL=test_ids.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test_ids.js","sourceRoot":"","sources":["../../src/test_ids.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,2FAA2F;AAC3F,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC"}
@@ -1,2 +0,0 @@
1
- export { tableTestIds } from './components/table/table.test_ids.js';
2
- //# sourceMappingURL=test_ids.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"test_ids.d.ts","sourceRoot":"","sources":["../src/test_ids.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,sCAAsC,CAAC"}
package/dist/test_ids.js DELETED
@@ -1,2 +0,0 @@
1
- import { tableTestIds } from "./components/table/table.test_ids.js";
2
- export { tableTestIds };
package/src/test_ids.ts DELETED
@@ -1,3 +0,0 @@
1
- // `./test-ids` subpath barrel. Playwright imports test IDs from here to avoid the
2
- // React/CSS-heavy root barrel (which breaks non-bundler loaders). Add future modules here.
3
- export { tableTestIds } from './components/table/table.test_ids.js';