@fibery/ui-kit 4.0.0 → 4.2.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 (86) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/esfint.config.mjs +0 -17
  3. package/package.json +7 -10
  4. package/scripts/generate-icons.mjs +45 -44
  5. package/src/actions-menu/actions-menu-item.tsx +1 -1
  6. package/src/actions-menu/context-actions-menu.tsx +1 -1
  7. package/src/animated-height-container.tsx +1 -1
  8. package/src/antd/ant-modal.tsx +21 -21
  9. package/src/antd/ant-upload.tsx +13 -13
  10. package/src/antd/auto-complete.tsx +10 -10
  11. package/src/antd/input-number.tsx +55 -45
  12. package/src/antd/styles.ts +30 -22
  13. package/src/antd/tabs.tsx +28 -28
  14. package/src/app-icon-with-fallback.tsx +3 -7
  15. package/src/app-icon-wrapper.tsx +1 -13
  16. package/src/breadcrumb.tsx +5 -1
  17. package/src/color-filter.ts +1 -1
  18. package/src/color-utils.test.ts +2 -2
  19. package/src/color-utils.ts +2 -2
  20. package/src/comment.tsx +2 -2
  21. package/src/copy-to-clipboard.ts +14 -3
  22. package/src/count-badge.tsx +3 -11
  23. package/src/date-picker/contexts.ts +6 -3
  24. package/src/date-picker/date-range-picker.tsx +1 -2
  25. package/src/date-picker/single-date-picker.tsx +1 -2
  26. package/src/day-select/iso-week-day-select.tsx +2 -2
  27. package/src/design-system/colors.ts +60 -40
  28. package/src/design-system/def.ts +1 -1
  29. package/src/dom-utils.ts +5 -12
  30. package/src/download-file.ts +36 -0
  31. package/src/dropdown-menu/index.tsx +0 -1
  32. package/src/emoji-picker/icon-emoji-picker.tsx +3 -3
  33. package/src/file-item/file-menu-items.tsx +29 -11
  34. package/src/file-item/file-preview-actions.tsx +52 -11
  35. package/src/file-item/share-file.ts +53 -0
  36. package/src/file-item.tsx +9 -9
  37. package/src/html-styles.ts +0 -1
  38. package/src/icons/ast/gauge.ts +12 -0
  39. package/src/icons/ast/index.tsx +449 -447
  40. package/src/icons/ast/people-edit.ts +12 -0
  41. package/src/icons/icon.tsx +14 -2
  42. package/src/icons/icons-integrity.test.ts +145 -0
  43. package/src/icons/react/gauge.tsx +18 -0
  44. package/src/icons/react/index.tsx +449 -447
  45. package/src/icons/react/people-edit.tsx +18 -0
  46. package/src/icons/svg/gauge.svg +5 -0
  47. package/src/icons/svg/people-edit.svg +4 -0
  48. package/src/images-gallery/images-gallery.tsx +2 -3
  49. package/src/images-gallery/slide-buttons.tsx +51 -20
  50. package/src/is-in-popup.ts +0 -3
  51. package/src/lists/actions-menu-row-surface.tsx +1 -1
  52. package/src/loading-sausage.tsx +3 -3
  53. package/src/media-query-utils.ts +1 -1
  54. package/src/mobile-keyboard-aware-popup.tsx +1 -1
  55. package/src/number-input/decimal.ts +6 -9
  56. package/src/number-input/number-input-inline-with-autosize.tsx +1 -1
  57. package/src/online-users.tsx +4 -5
  58. package/src/palettes/diff-colors.test.ts +1 -1
  59. package/src/palettes/inspect.defs.colors.neutral-arch.test.ts +98 -30
  60. package/src/palettes/inspect.defs.colors.neutral-user.test.ts +98 -30
  61. package/src/palettes/inspect.defs.colors.warm-arch.test.ts +98 -30
  62. package/src/palettes/inspect.defs.colors.warm-user.test.ts +98 -30
  63. package/src/palettes/show-colors.test.ts +2 -1
  64. package/src/palettes/testkit.ts +3 -1
  65. package/src/popover/index.tsx +24 -15
  66. package/src/popover/mobile-popover-context.tsx +1 -1
  67. package/src/popover/modifiers.tsx +1 -1
  68. package/src/popover/popup-modifiers-context.ts +1 -2
  69. package/src/rich-input-loader.tsx +1 -1
  70. package/src/select/components/menu-list-virtua.tsx +15 -16
  71. package/src/select/components/menu-list-virtualized.tsx +26 -29
  72. package/src/select/components/menu.tsx +3 -3
  73. package/src/select/components/option.tsx +0 -1
  74. package/src/select/index.tsx +2 -1
  75. package/src/select/reflection.ts +4 -5
  76. package/src/select/select-in-popover.tsx +1 -3
  77. package/src/select/select.tsx +5 -3
  78. package/src/select/styles.ts +1 -7
  79. package/src/select/util.ts +2 -2
  80. package/src/thematic.tsx +0 -1
  81. package/src/theme-provider.test.tsx +1 -1
  82. package/src/theming.generated.css +118 -58
  83. package/src/theming.generated.ts +135 -58
  84. package/src/type-badge.tsx +1 -2
  85. package/src/use-on-screen-keyboard-data.tsx +1 -1
  86. package/src/with-data.tsx +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @fibery/ui-kit
2
2
 
3
+ ## 4.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - eef68ad: Sync dark theme color tokens correction
8
+
9
+ ## 4.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - fb2ba1d: Add `isRecord`, `noop`, `identity`, `truthy` to `_.ts` in `@fibery/helpers`; drop `lodash` from `@fibery/ui-kit` dependencies.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [fb2ba1d]
18
+ - @fibery/helpers@3.1.0
19
+ - @fibery/react@1.5.4
20
+
3
21
  ## 4.0.0
4
22
 
5
23
  ### Major Changes
package/esfint.config.mjs CHANGED
@@ -13,21 +13,4 @@ export default [
13
13
  "unicorn/filename-case": "off",
14
14
  },
15
15
  },
16
- {
17
- files: ["src/design-system/**/*"],
18
- rules: {
19
- "no-restricted-imports": [
20
- "error",
21
- {
22
- patterns: [
23
- {group: ["@fibery/ui-kit/*"]},
24
- {
25
- group: ["lodash", "lodash/*", "lodash-es", "lodash-es/*"],
26
- message: "lodash is not allowed in design-system",
27
- },
28
- ],
29
- },
30
- ],
31
- },
32
- },
33
16
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fibery/ui-kit",
3
- "version": "4.0.0",
3
+ "version": "4.2.0",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "dependencies": {
@@ -33,13 +33,12 @@
33
33
  "d3-shape": "1.3.7",
34
34
  "date-fns": "2.29.2",
35
35
  "invariant": "2.2.4",
36
- "lodash": "4.17.21",
37
36
  "lru-cache": "11.2.2",
38
37
  "md5": "2.2.1",
39
38
  "moment": "2.29.4",
39
+ "node-types-local": "npm:@types/node@^24",
40
40
  "photoswipe": "5.4.4",
41
41
  "popper-max-size-modifier": "0.2.0",
42
- "prop-types": "15.7.2",
43
42
  "rc-dialog": "9.0.4",
44
43
  "rc-input": "0.1.4",
45
44
  "rc-input-number": "8.5.0",
@@ -60,8 +59,8 @@
60
59
  "tabbable": "5.2.1",
61
60
  "virtua": "0.48.8",
62
61
  "@fibery/emoji-data": "2.7.3",
63
- "@fibery/helpers": "3.0.0",
64
- "@fibery/react": "1.5.3"
62
+ "@fibery/helpers": "3.1.0",
63
+ "@fibery/react": "1.5.4"
65
64
  },
66
65
  "devDependencies": {
67
66
  "@babel/core": "7.28.5",
@@ -74,20 +73,18 @@
74
73
  "@types/culori": "4.0.1",
75
74
  "@types/history": "4.7.11",
76
75
  "@types/invariant": "2.2.34",
77
- "@types/lodash": "4.14.172",
78
- "@types/prop-types": "15.7.5",
79
76
  "@types/react": "18.3.12",
80
77
  "@types/react-color": "2.13.5",
81
78
  "@types/react-dom": "18.3.1",
82
- "@typescript/native-preview": "beta",
79
+ "@typescript/native-preview": "7.0.0-dev.20260604.1",
83
80
  "csstype": "3.0.8",
84
81
  "fs-extra": "10.0.0",
85
- "glob": "7.1.7",
82
+ "glob": "13.0.6",
86
83
  "react": "18.3.1",
87
84
  "react-dom": "18.3.1",
88
85
  "svg-parser": "2.0.4",
89
86
  "svgo": "2.8.0",
90
- "typescript": "6.0.1-rc",
87
+ "typescript": "6.0.3",
91
88
  "unist-util-reduce": "0.2.2",
92
89
  "@fibery/babel-preset": "7.4.2"
93
90
  },
@@ -1,15 +1,29 @@
1
1
  import {readFile} from "fs/promises";
2
- import path from "path";
3
- import {fileURLToPath} from "url";
4
- import {promisify} from "util";
2
+ import path from "node:path";
3
+ import {fileURLToPath} from "node:url";
5
4
 
6
5
  import fs from "fs-extra";
7
- import glob from "glob";
8
- import _ from "lodash";
6
+ import {glob} from "glob";
9
7
  import {parse} from "svg-parser";
10
8
  import svgo from "svgo";
11
9
  import {recursiveReduce} from "unist-util-reduce";
12
10
 
11
+ const __filename = fileURLToPath(import.meta.url);
12
+ const __dirname = path.dirname(__filename);
13
+
14
+ const WORD_RE = /[A-Z]+(?![a-z])|[A-Z]?[a-z]+|\d+/g;
15
+ const words = (s) => String(s).match(WORD_RE) ?? [];
16
+ const cap = (w) => w[0].toUpperCase() + w.slice(1).toLowerCase();
17
+ const pascalCase = (s) => words(s).map(cap).join("");
18
+ const camelCase = (s) =>
19
+ words(s)
20
+ .map((w, i) => (i ? cap(w) : w.toLowerCase()))
21
+ .join("");
22
+ const kebabCase = (s) =>
23
+ words(s)
24
+ .map((w) => w.toLowerCase())
25
+ .join("-");
26
+
13
27
  const svgoConfig = (prefix) => ({
14
28
  plugins: [
15
29
  {
@@ -24,55 +38,55 @@ const svgoConfig = (prefix) => ({
24
38
  ],
25
39
  });
26
40
 
27
- const __filename = fileURLToPath(import.meta.url);
28
- const __dirname = path.dirname(__filename);
29
-
30
- const preludeTemplate = `/**
41
+ const preludeTemplate = ({source, generator}) => `/**
31
42
  * This file was automatically generated. Do not edit manually.
32
- * <% if (source) { %>
33
- * @see import("<%= source %>")<% } %>
34
- * @see import("<%= generator %>")
43
+ * ${
44
+ source
45
+ ? `
46
+ * @see import("${source}")`
47
+ : ""
48
+ }
49
+ * @see import("${generator}")
35
50
  */
36
51
  `;
37
52
 
38
- const render = _.template(
39
- `${preludeTemplate}
53
+ const render = ({source, generator, svgIdentifier, svgIdentifierPath}) =>
54
+ `${preludeTemplate({source, generator})}
40
55
  import {forwardRef} from "react";
41
- import <%= svgIdentifier %>Svg from "../ast/<%= svgIdentifierPath %>";
56
+ import ${svgIdentifier}Svg from "../ast/${svgIdentifierPath}";
42
57
  import {Icon} from "../icon";
43
58
  import type {IconBaseProps} from "../types";
44
59
 
45
- const <%= svgIdentifier %> = forwardRef<SVGSVGElement, IconBaseProps>(function <%= svgIdentifier %>(
60
+ const ${svgIdentifier} = forwardRef<SVGSVGElement, IconBaseProps>(function ${svgIdentifier}(
46
61
  props: IconBaseProps,
47
62
  ref: React.Ref<SVGSVGElement>
48
- ) {return <Icon {...props} className={props.className} ref={ref} icon={<%= svgIdentifier %>Svg} />});
63
+ ) {return <Icon {...props} className={props.className} ref={ref} icon={${svgIdentifier}Svg} />});
49
64
 
50
- export default <%= svgIdentifier %>;
51
- `.trim()
52
- );
65
+ export default ${svgIdentifier};
66
+ `.trim();
53
67
 
54
- const defTemplate = _.template(`${preludeTemplate}
68
+ const defTemplate = ({source, generator, identifier, content}) => `${preludeTemplate({source, generator})}
55
69
  import type {IconDefinition} from "../types";
56
70
 
57
- const <%= identifier %>: IconDefinition = <%= content %>;
71
+ const ${identifier}: IconDefinition = ${content};
58
72
 
59
- export default <%= identifier %>;
60
- `);
73
+ export default ${identifier};
74
+ `;
61
75
 
62
76
  const iconsDir = path.join(__dirname, "../src/icons");
63
77
  const iconsSvgPathDir = path.join(iconsDir, "./svg");
64
78
  const iconsReactPathDir = path.join(iconsDir, "./react");
65
79
  const iconsAstPathDir = path.join(iconsDir, "./ast");
66
80
  const pattern = "**/*.svg";
67
- const icons = await promisify(glob)(pattern, {cwd: iconsSvgPathDir});
81
+ const icons = await glob(pattern, {cwd: iconsSvgPathDir});
68
82
 
69
83
  await fs.remove(iconsReactPathDir);
70
84
  await fs.remove(iconsAstPathDir);
71
85
 
72
86
  const generator = path.relative(iconsReactPathDir, __filename);
73
- let barrelExportContent = _.template(preludeTemplate)({source: null, generator: generator}) + "\n";
87
+ let barrelExportContent = preludeTemplate({source: null, generator: generator}) + "\n";
74
88
  for (const icon of icons) {
75
- const name = _.upperFirst(_.camelCase(icon.replace("/", "-").replace(".svg", "")));
89
+ const name = pascalCase(icon.replace("/", "-").replace(".svg", ""));
76
90
  const resultFileName = icon.replaceAll("/", "-").replace(".svg", "");
77
91
  const iconPath = path.join(iconsSvgPathDir, icon);
78
92
  const source = path.relative(iconsReactPathDir, iconPath);
@@ -97,17 +111,17 @@ for (const icon of icons) {
97
111
  value.split(";").forEach((styleItem) => {
98
112
  const [styleKey, styleValue] = styleItem.split(":").map((s) => s.trim());
99
113
  if (styleKey && styleValue) {
100
- style[_.camelCase(styleKey)] = styleValue;
114
+ style[camelCase(styleKey)] = styleValue;
101
115
  }
102
116
  });
103
- return [_.camelCase(key), style];
117
+ return [camelCase(key), style];
104
118
  }
105
- return [_.camelCase(key), value];
119
+ return [camelCase(key), value];
106
120
  })
107
121
  ),
108
122
  };
109
123
  }),
110
- name: _.kebabCase(name),
124
+ name: kebabCase(name),
111
125
  }),
112
126
  })
113
127
  );
@@ -126,16 +140,3 @@ for (const icon of icons) {
126
140
  }
127
141
  await fs.outputFile(path.join(iconsReactPathDir, `./index.tsx`), barrelExportContent);
128
142
  await fs.outputFile(path.join(iconsAstPathDir, `./index.tsx`), barrelExportContent);
129
-
130
- // import {getSvg, iconNames} from "../Icon";
131
- //
132
- // it.skip("generate", async () => {
133
- // console.log(iconNames);
134
- // for (const iconName of iconNames) {
135
- // await fs.outputFile(
136
- // path.join(__dirname, "./icons", iconName.replace(":icon", "svg") + ".svg"),
137
- // `<?xml version="1.0" standalone="no"?>\n` + getSvg({name: iconName})
138
- // );
139
- // }
140
- // expect(true).toEqual(true);
141
- // });
@@ -1,7 +1,7 @@
1
+ import {noop} from "@fibery/helpers/src/_";
1
2
  import {stopPropagation} from "@fibery/react/src/stop-propagation";
2
3
  import {useCallbackRef} from "@fibery/react/src/use-callback-ref";
3
4
  import {css, cx} from "@linaria/core";
4
- import noop from "lodash/noop";
5
5
  import type {FunctionComponent, ReactNode} from "react";
6
6
  import {memo, useId} from "react";
7
7
 
@@ -1,6 +1,6 @@
1
+ import {noop} from "@fibery/helpers/src/_";
1
2
  import {preventDefault} from "@fibery/react/src/prevent-default";
2
3
  import {useControllableState} from "@fibery/react/src/use-controllable-state";
3
- import noop from "lodash/noop";
4
4
  import {useState} from "react";
5
5
 
6
6
  import * as ContextMenu from "../context-menu";
@@ -1,6 +1,6 @@
1
+ import {noop} from "@fibery/helpers/src/_";
1
2
  import {useComposedRefs} from "@fibery/react/src/use-composed-refs";
2
3
  import {useSize} from "@fibery/react/src/use-size";
3
- import noop from "lodash/noop";
4
4
  import type {ComponentProps} from "react";
5
5
  import React, {forwardRef, useEffect, useRef, useState} from "react";
6
6
 
@@ -10,7 +10,7 @@ import {ThemeProvider} from "../theme-provider";
10
10
  const defaultCloseIcon = <CloseIcon />;
11
11
 
12
12
  const modalCss = css`
13
- & .ant-modal-mask {
13
+ :where(&) .ant-modal-mask {
14
14
  position: fixed;
15
15
  inset: 0;
16
16
  z-index: 1000;
@@ -18,7 +18,7 @@ const modalCss = css`
18
18
  background-color: ${themeVars.modalBg};
19
19
  }
20
20
 
21
- & .ant-modal-wrap {
21
+ :where(&) .ant-modal-wrap {
22
22
  position: fixed;
23
23
  inset: 0;
24
24
  z-index: 1000;
@@ -27,7 +27,7 @@ const modalCss = css`
27
27
  -webkit-overflow-scrolling: touch;
28
28
  }
29
29
 
30
- & .ant-modal {
30
+ :where(&) .ant-modal {
31
31
  position: relative;
32
32
  top: 100px;
33
33
  margin: 0 auto;
@@ -35,11 +35,11 @@ const modalCss = css`
35
35
  pointer-events: none;
36
36
  }
37
37
 
38
- & .ant-modal-centered {
38
+ :where(&) .ant-modal-centered {
39
39
  text-align: center;
40
40
  }
41
41
 
42
- & .ant-modal-centered::before {
42
+ :where(&) .ant-modal-centered::before {
43
43
  display: inline-block;
44
44
  width: 0;
45
45
  height: 100%;
@@ -47,7 +47,7 @@ const modalCss = css`
47
47
  content: "";
48
48
  }
49
49
 
50
- & .ant-modal-centered .ant-modal {
50
+ :where(&) .ant-modal-centered .ant-modal {
51
51
  top: 0;
52
52
  display: inline-block;
53
53
  padding-bottom: 0;
@@ -55,7 +55,7 @@ const modalCss = css`
55
55
  vertical-align: middle;
56
56
  }
57
57
 
58
- & .ant-modal-content {
58
+ :where(&) .ant-modal-content {
59
59
  position: relative;
60
60
  box-shadow: ${themeVars.shadowPopup};
61
61
  margin-left: ${space.s6}px;
@@ -65,11 +65,11 @@ const modalCss = css`
65
65
  pointer-events: auto;
66
66
  }
67
67
 
68
- & .ant-modal-body {
68
+ :where(&) .ant-modal-body {
69
69
  padding: ${space.s20}px;
70
70
  }
71
71
 
72
- & .ant-modal-close {
72
+ :where(&) .ant-modal-close {
73
73
  position: absolute;
74
74
  top: 0;
75
75
  right: 0;
@@ -87,34 +87,34 @@ const modalCss = css`
87
87
  cursor: pointer;
88
88
  }
89
89
 
90
- & .ant-fade-enter,
91
- & .ant-fade-appear {
90
+ :where(&) .ant-fade-enter,
91
+ :where(&) .ant-fade-appear {
92
92
  opacity: 0;
93
93
  }
94
94
 
95
- & .ant-fade-enter-active,
96
- & .ant-fade-appear-active {
95
+ :where(&) .ant-fade-enter-active,
96
+ :where(&) .ant-fade-appear-active {
97
97
  opacity: 1;
98
98
  transition: opacity ${transitions.normal};
99
99
  }
100
100
 
101
- & .ant-fade-leave {
101
+ :where(&) .ant-fade-leave {
102
102
  opacity: 1;
103
103
  }
104
104
 
105
- & .ant-fade-leave-active {
105
+ :where(&) .ant-fade-leave-active {
106
106
  opacity: 0;
107
107
  transition: opacity ${transitions.normal};
108
108
  }
109
109
 
110
- & .ant-zoom-enter,
111
- & .ant-zoom-appear {
110
+ :where(&) .ant-zoom-enter,
111
+ :where(&) .ant-zoom-appear {
112
112
  opacity: 0;
113
113
  transform: scale(0.96);
114
114
  }
115
115
 
116
- & .ant-zoom-enter-active,
117
- & .ant-zoom-appear-active {
116
+ :where(&) .ant-zoom-enter-active,
117
+ :where(&) .ant-zoom-appear-active {
118
118
  opacity: 1;
119
119
  transform: scale(1);
120
120
  transition:
@@ -122,12 +122,12 @@ const modalCss = css`
122
122
  transform ${transitions.normal};
123
123
  }
124
124
 
125
- & .ant-zoom-leave {
125
+ :where(&) .ant-zoom-leave {
126
126
  opacity: 1;
127
127
  transform: scale(1);
128
128
  }
129
129
 
130
- & .ant-zoom-leave-active {
130
+ :where(&) .ant-zoom-leave-active {
131
131
  opacity: 0;
132
132
  transform: scale(0.96);
133
133
  transition:
@@ -64,7 +64,7 @@ export const antUploadStyle = css`
64
64
  alignItems: "stretch",
65
65
  alignContent: "stretch",
66
66
  },
67
- "& .ant-upload": {
67
+ ":where(&) .ant-upload": {
68
68
  boxSizing: "border-box",
69
69
  margin: 0,
70
70
  padding: 0,
@@ -73,30 +73,30 @@ export const antUploadStyle = css`
73
73
  listStyle: "none",
74
74
  outline: "none",
75
75
  },
76
- "& .ant-upload p": {
76
+ ":where(&) .ant-upload p": {
77
77
  margin: 0,
78
78
  },
79
- "& .ant-upload-btn": {
79
+ ":where(&) .ant-upload-btn": {
80
80
  display: "block",
81
81
  width: "100%",
82
82
  outline: "none",
83
83
  },
84
- "& .ant-upload input[type='file']": {
84
+ ":where(&) .ant-upload input[type='file']": {
85
85
  cursor: "pointer",
86
86
  },
87
- "& .ant-upload.ant-upload-disabled": {
87
+ ":where(&) .ant-upload.ant-upload-disabled": {
88
88
  color: themeVars.disabledTextColor,
89
89
  cursor: "not-allowed",
90
90
  },
91
- "& .ant-upload.ant-upload-disabled input[type='file']": {
91
+ ":where(&) .ant-upload.ant-upload-disabled input[type='file']": {
92
92
  cursor: "not-allowed",
93
93
  },
94
- "& .ant-upload-select": {
94
+ ":where(&) .ant-upload-select": {
95
95
  display: "inline-flex",
96
96
  alignItems: "stretch",
97
97
  maxWidth: "100%",
98
98
  },
99
- "& .ant-upload-select > .ant-upload": {
99
+ ":where(&) .ant-upload-select > .ant-upload": {
100
100
  display: "inline-flex",
101
101
  alignItems: "center",
102
102
  outline: "none",
@@ -139,23 +139,23 @@ export const antUploadStyle = css`
139
139
  transition: "none",
140
140
  },
141
141
  },
142
- "& .ant-upload.ant-upload-drag .ant-upload-btn": {
142
+ ":where(&) .ant-upload.ant-upload-drag .ant-upload-btn": {
143
143
  display: "table",
144
144
  height: "100%",
145
145
  },
146
- "& .ant-upload.ant-upload-drag .ant-upload-drag-container": {
146
+ ":where(&) .ant-upload.ant-upload-drag .ant-upload-drag-container": {
147
147
  display: "table-cell",
148
148
  verticalAlign: "middle",
149
149
  },
150
- "& .ant-upload-picture-card-wrapper": {
150
+ ":where(&) .ant-upload-picture-card-wrapper": {
151
151
  display: "inline-block",
152
152
  width: "100%",
153
153
  },
154
- "& .ant-upload-picture-card-wrapper::before": {
154
+ ":where(&) .ant-upload-picture-card-wrapper::before": {
155
155
  display: "table",
156
156
  content: "''",
157
157
  },
158
- "& .ant-upload-picture-card-wrapper::after": {
158
+ ":where(&) .ant-upload-picture-card-wrapper::after": {
159
159
  display: "table",
160
160
  clear: "both",
161
161
  content: "''",
@@ -13,14 +13,14 @@ import {wrapWithPopupContainer} from "./utils";
13
13
  const autoCompleteStyles = css`
14
14
  ${{
15
15
  position: "relative",
16
- "& .ant-select": {
16
+ ":where(&) .ant-select": {
17
17
  ...textStyles.regular,
18
18
  boxSizing: "border-box",
19
19
  display: "inline-block",
20
20
  width: "100%",
21
21
  cursor: "text",
22
22
  },
23
- "& .ant-select-selector": {
23
+ ":where(&) .ant-select-selector": {
24
24
  boxSizing: "border-box",
25
25
  display: "flex",
26
26
  alignItems: "center",
@@ -29,7 +29,7 @@ const autoCompleteStyles = css`
29
29
  position: "relative",
30
30
  backgroundColor: themeVars.transparent,
31
31
  },
32
- "& .ant-select-selection-search": {
32
+ ":where(&) .ant-select-selection-search": {
33
33
  flex: 1,
34
34
  minWidth: 0,
35
35
  },
@@ -45,7 +45,7 @@ const autoCompleteStyles = css`
45
45
  appearance: "none",
46
46
  ...textStyles.regular,
47
47
  },
48
- "& .ant-select-dropdown": {
48
+ ":where(&) .ant-select-dropdown": {
49
49
  boxSizing: "border-box",
50
50
  position: "absolute",
51
51
  zIndex: 1050,
@@ -55,16 +55,16 @@ const autoCompleteStyles = css`
55
55
  paddingTop: space.s8,
56
56
  paddingBottom: space.s8,
57
57
  },
58
- "& .ant-select-dropdown-hidden": {
58
+ ":where(&) .ant-select-dropdown-hidden": {
59
59
  display: "none",
60
60
  },
61
- "& .ant-select-item-empty": {
61
+ ":where(&) .ant-select-item-empty": {
62
62
  minHeight: 32,
63
63
  padding: "5px 12px",
64
64
  lineHeight: "22px",
65
65
  color: themeVars.colorTextListItemGeneralDisabled,
66
66
  },
67
- "& .ant-select-item": {
67
+ ":where(&) .ant-select-item": {
68
68
  ...textStyles.regular,
69
69
  color: themeVars.textColor,
70
70
  minHeight: 32,
@@ -75,16 +75,16 @@ const autoCompleteStyles = css`
75
75
  cursor: "pointer",
76
76
  transition: `background-color ${transitions.slow}`,
77
77
  },
78
- "& .ant-select-item-option-content": {
78
+ ":where(&) .ant-select-item-option-content": {
79
79
  flex: 1,
80
80
  overflow: "hidden",
81
81
  textOverflow: "ellipsis",
82
82
  whiteSpace: "nowrap",
83
83
  },
84
- "& .ant-select-item-option-state": {
84
+ ":where(&) .ant-select-item-option-state": {
85
85
  display: "none",
86
86
  },
87
- "& .ant-select-item-option": {
87
+ ":where(&) .ant-select-item-option": {
88
88
  display: "flex",
89
89
  alignItems: "center",
90
90
  "&:hover": {