@atlaskit/react-select 3.16.0 → 3.16.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.
Files changed (76) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/async.js +1 -6
  3. package/dist/cjs/compiled/components/indicators-container.compiled.css +5 -0
  4. package/dist/cjs/compiled/components/indicators-container.js +40 -0
  5. package/dist/cjs/compiled/components/select-container.compiled.css +6 -0
  6. package/dist/cjs/compiled/components/select-container.js +52 -0
  7. package/dist/cjs/compiled/components/value-container.compiled.css +20 -0
  8. package/dist/cjs/compiled/components/{containers.js → value-container.js} +7 -69
  9. package/dist/cjs/components/index.js +1 -0
  10. package/dist/cjs/components/multi-value.js +13 -2
  11. package/dist/cjs/creatable.js +1 -6
  12. package/dist/cjs/entry-points/async.js +4 -4
  13. package/dist/cjs/entry-points/creatable.js +4 -4
  14. package/dist/cjs/internal/select-get-styles-context.js +20 -0
  15. package/dist/cjs/internal/use-select-get-styles.js +18 -0
  16. package/dist/cjs/select.js +6 -3
  17. package/dist/cjs/theme.js +1 -7
  18. package/dist/es2019/async.js +0 -1
  19. package/dist/es2019/compiled/components/indicators-container.compiled.css +5 -0
  20. package/dist/es2019/compiled/components/indicators-container.js +35 -0
  21. package/dist/es2019/compiled/components/select-container.compiled.css +6 -0
  22. package/dist/es2019/compiled/components/select-container.js +47 -0
  23. package/dist/es2019/compiled/components/value-container.compiled.css +20 -0
  24. package/dist/es2019/compiled/components/{containers.js → value-container.js} +2 -70
  25. package/dist/es2019/components/index.js +1 -0
  26. package/dist/es2019/components/multi-value.js +13 -2
  27. package/dist/es2019/creatable.js +1 -1
  28. package/dist/es2019/entry-points/async.js +1 -1
  29. package/dist/es2019/entry-points/creatable.js +1 -1
  30. package/dist/es2019/internal/select-get-styles-context.js +14 -0
  31. package/dist/es2019/internal/use-select-get-styles.js +10 -0
  32. package/dist/es2019/select.js +6 -3
  33. package/dist/es2019/theme.js +0 -7
  34. package/dist/esm/async.js +0 -1
  35. package/dist/esm/compiled/components/indicators-container.compiled.css +5 -0
  36. package/dist/esm/compiled/components/indicators-container.js +32 -0
  37. package/dist/esm/compiled/components/select-container.compiled.css +6 -0
  38. package/dist/esm/compiled/components/select-container.js +44 -0
  39. package/dist/esm/compiled/components/value-container.compiled.css +20 -0
  40. package/dist/esm/compiled/components/value-container.js +50 -0
  41. package/dist/esm/components/index.js +1 -0
  42. package/dist/esm/components/multi-value.js +13 -2
  43. package/dist/esm/creatable.js +1 -1
  44. package/dist/esm/entry-points/async.js +1 -1
  45. package/dist/esm/entry-points/creatable.js +1 -1
  46. package/dist/esm/internal/select-get-styles-context.js +14 -0
  47. package/dist/esm/internal/use-select-get-styles.js +12 -0
  48. package/dist/esm/select.js +6 -3
  49. package/dist/esm/theme.js +0 -7
  50. package/dist/types/async.d.ts +1 -2
  51. package/dist/types/compiled/components/indicators-container.d.ts +18 -0
  52. package/dist/types/compiled/components/select-container.d.ts +22 -0
  53. package/dist/types/compiled/components/value-container.d.ts +22 -0
  54. package/dist/types/creatable.d.ts +1 -2
  55. package/dist/types/entry-points/async.d.ts +1 -1
  56. package/dist/types/entry-points/creatable.d.ts +1 -1
  57. package/dist/types/internal/select-get-styles-context.d.ts +12 -0
  58. package/dist/types/internal/use-select-get-styles.d.ts +1 -0
  59. package/dist/types/theme.d.ts +0 -2
  60. package/dist/types-ts4.5/async.d.ts +1 -2
  61. package/dist/types-ts4.5/compiled/components/indicators-container.d.ts +18 -0
  62. package/dist/types-ts4.5/compiled/components/select-container.d.ts +22 -0
  63. package/dist/types-ts4.5/compiled/components/value-container.d.ts +22 -0
  64. package/dist/types-ts4.5/creatable.d.ts +1 -2
  65. package/dist/types-ts4.5/entry-points/async.d.ts +1 -1
  66. package/dist/types-ts4.5/entry-points/creatable.d.ts +1 -1
  67. package/dist/types-ts4.5/internal/select-get-styles-context.d.ts +12 -0
  68. package/dist/types-ts4.5/internal/use-select-get-styles.d.ts +1 -0
  69. package/dist/types-ts4.5/theme.d.ts +0 -2
  70. package/package.json +7 -5
  71. package/dist/cjs/compiled/components/containers.compiled.css +0 -28
  72. package/dist/es2019/compiled/components/containers.compiled.css +0 -28
  73. package/dist/esm/compiled/components/containers.compiled.css +0 -28
  74. package/dist/esm/compiled/components/containers.js +0 -112
  75. package/dist/types/compiled/components/containers.d.ts +0 -50
  76. package/dist/types-ts4.5/compiled/components/containers.d.ts +0 -50
@@ -1,3 +1,3 @@
1
- export { useCreatable } from '../creatable';
1
+ export { default as useCreatable } from '../use-creatable';
2
2
  export type { CreatableProps } from '../creatable';
3
3
  export { default } from '../creatable';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Internal context used to pass the original Select instance's getStyles function
3
+ * down to components like MultiValue, without polluting the public CommonProps API.
4
+ *
5
+ * This allows MultiValue to detect whether getStyles has been overridden on a
6
+ * component instance (e.g. via a custom component wrapper passing a different
7
+ * getStyles prop), by comparing props.getStyles against the original.
8
+ *
9
+ * @internal — not part of the public API
10
+ */
11
+ import { type Context } from 'react';
12
+ export declare const SelectGetStylesContext: Context<Function | undefined>;
@@ -0,0 +1 @@
1
+ export declare const useSelectGetStyles: () => Function | undefined;
@@ -1,8 +1,6 @@
1
- import type { Theme } from './types';
2
1
  export declare const spacing: {
3
2
  baseUnit: number;
4
3
  controlHeight: number;
5
4
  menuGutter: number;
6
5
  };
7
- export declare const defaultTheme: Theme;
8
6
  export { colors } from './colors';
@@ -1,9 +1,8 @@
1
1
  import { type ReactElement, type RefAttributes } from 'react';
2
2
  import Select from './select';
3
3
  import type { GroupBase } from './types';
4
- import useAsync, { type AsyncProps } from './use-async';
4
+ import { type AsyncProps } from './use-async';
5
5
  export type { AsyncProps };
6
6
  type AsyncSelect = <Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: AsyncProps<Option, IsMulti, Group> & RefAttributes<Select<Option, IsMulti, Group>>) => ReactElement;
7
7
  declare const AsyncSelect: AsyncSelect;
8
- export { useAsync };
9
8
  export default AsyncSelect;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ import { type CommonPropsAndClassName, type GroupBase } from '../../types';
7
+ export interface IndicatorsContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
8
+ isDisabled: boolean;
9
+ /**
10
+ * The children to be rendered.
11
+ */
12
+ children: ReactNode;
13
+ /**
14
+ * Props to be passed to the indicators container element.
15
+ */
16
+ innerProps?: {};
17
+ }
18
+ export declare const IndicatorsContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorsContainerProps<Option, IsMulti, Group>) => JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ import { type CommonPropsAndClassName, type GroupBase } from '../../types';
7
+ export interface ContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
8
+ /**
9
+ * Whether the select is disabled.
10
+ */
11
+ isDisabled: boolean;
12
+ isFocused: boolean;
13
+ /**
14
+ * The children to be rendered.
15
+ */
16
+ children: ReactNode;
17
+ /**
18
+ * Inner props to be passed down to the container.
19
+ */
20
+ innerProps: {};
21
+ }
22
+ export declare const SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => JSX.Element;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { type ReactNode } from 'react';
6
+ import { type CommonPropsAndClassName, type GroupBase } from '../../types';
7
+ export interface ValueContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
8
+ /**
9
+ * Props to be passed to the value container element.
10
+ */
11
+ innerProps?: {};
12
+ /**
13
+ * The children to be rendered.
14
+ */
15
+ children: ReactNode;
16
+ isDisabled: boolean;
17
+ /**
18
+ * Whether the select is compact.
19
+ */
20
+ isCompact?: boolean;
21
+ }
22
+ export declare const ValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => JSX.Element;
@@ -1,10 +1,9 @@
1
1
  import { type ReactElement, type RefAttributes } from 'react';
2
2
  import Select from './select';
3
3
  import type { GroupBase } from './types';
4
- import useCreatable, { type CreatableAdditionalProps } from './use-creatable';
4
+ import { type CreatableAdditionalProps } from './use-creatable';
5
5
  import { type StateManagerProps } from './use-state-manager';
6
6
  export type CreatableProps<Option, IsMulti extends boolean, Group extends GroupBase<Option>> = StateManagerProps<Option, IsMulti, Group> & CreatableAdditionalProps<Option, Group>;
7
7
  type CreatableSelect = <Option = unknown, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>(props: CreatableProps<Option, IsMulti, Group> & RefAttributes<Select<Option, IsMulti, Group>>) => ReactElement;
8
8
  declare const CreatableSelect: CreatableSelect;
9
- export { useCreatable };
10
9
  export default CreatableSelect;
@@ -1,3 +1,3 @@
1
- export { useAsync } from '../async';
1
+ export { default as useAsync } from '../use-async';
2
2
  export type { AsyncProps } from '../async';
3
3
  export { default } from '../async';
@@ -1,3 +1,3 @@
1
- export { useCreatable } from '../creatable';
1
+ export { default as useCreatable } from '../use-creatable';
2
2
  export type { CreatableProps } from '../creatable';
3
3
  export { default } from '../creatable';
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Internal context used to pass the original Select instance's getStyles function
3
+ * down to components like MultiValue, without polluting the public CommonProps API.
4
+ *
5
+ * This allows MultiValue to detect whether getStyles has been overridden on a
6
+ * component instance (e.g. via a custom component wrapper passing a different
7
+ * getStyles prop), by comparing props.getStyles against the original.
8
+ *
9
+ * @internal — not part of the public API
10
+ */
11
+ import { type Context } from 'react';
12
+ export declare const SelectGetStylesContext: Context<Function | undefined>;
@@ -0,0 +1 @@
1
+ export declare const useSelectGetStyles: () => Function | undefined;
@@ -1,8 +1,6 @@
1
- import type { Theme } from './types';
2
1
  export declare const spacing: {
3
2
  baseUnit: number;
4
3
  controlHeight: number;
5
4
  menuGutter: number;
6
5
  };
7
- export declare const defaultTheme: Theme;
8
6
  export { colors } from './colors';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/react-select",
3
- "version": "3.16.0",
3
+ "version": "3.16.2",
4
4
  "description": "A forked version of react-select to only be used in atlaskit/select",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -21,12 +21,12 @@
21
21
  "atlaskit:src": "src/index.tsx",
22
22
  "dependencies": {
23
23
  "@atlaskit/ds-lib": "^7.0.0",
24
- "@atlaskit/icon": "^34.3.0",
24
+ "@atlaskit/icon": "^35.3.0",
25
25
  "@atlaskit/layering": "^3.7.0",
26
26
  "@atlaskit/platform-feature-flags": "^1.1.0",
27
27
  "@atlaskit/primitives": "^19.0.0",
28
28
  "@atlaskit/spinner": "^19.1.0",
29
- "@atlaskit/tag": "^14.13.0",
29
+ "@atlaskit/tag": "^14.14.0",
30
30
  "@atlaskit/tokens": "^13.0.0",
31
31
  "@babel/runtime": "^7.0.0",
32
32
  "@compiled/react": "^0.20.0",
@@ -42,10 +42,12 @@
42
42
  "@af/accessibility-testing": "workspace:^",
43
43
  "@atlaskit/checkbox": "^17.3.0",
44
44
  "@atlaskit/form": "^15.5.0",
45
- "@atlassian/feature-flags-test-utils": "^1.0.0",
45
+ "@atlassian/feature-flags-test-utils": "^1.1.0",
46
46
  "@testing-library/react": "^16.3.0",
47
47
  "@testing-library/user-event": "^14.4.3",
48
- "jest-in-case": "^1.0.2"
48
+ "jest-in-case": "^1.0.2",
49
+ "react": "^18.2.0",
50
+ "react-dom": "^18.2.0"
49
51
  },
50
52
  "platform-feature-flags": {
51
53
  "custom-interactive-elements-not-keyboard-focusable": {
@@ -1,28 +0,0 @@
1
- ._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
- ._zulp1b66{gap:var(--ds-space-050,4px)}
3
- ._16jlkb7n{flex-grow:1}
4
- ._18m915vq{overflow-y:hidden}
5
- ._1e0c11p5{display:grid}
6
- ._1e0c1txw{display:flex}
7
- ._1eim1xrj{direction:rtl}
8
- ._1n261g80{flex-wrap:wrap}
9
- ._1o9zidpf{flex-shrink:0}
10
- ._1o9zkb7n{flex-shrink:1}
11
- ._1q511b66{padding-block-start:var(--ds-space-050,4px)}
12
- ._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
13
- ._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
14
- ._1reo15vq{overflow-x:hidden}
15
- ._1wpz1fhb{align-self:stretch}
16
- ._4cvr1h6o{align-items:center}
17
- ._80om13gf{cursor:not-allowed}
18
- ._85i51b66{padding-block-end:var(--ds-space-050,4px)}
19
- ._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
20
- ._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
21
- ._8am5i4x0{-webkit-overflow-scrolling:touch}
22
- ._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
23
- ._i0dlf1ug{flex-basis:0%}
24
- ._kqswh2mm{position:relative}
25
- ._lcxv1rj4{pointer-events:all}
26
- ._y4ti12x7{padding-inline-end:var(--ds-space-075,6px)}
27
- ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
28
- @media (min-width:30rem){._1tn2fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}}
@@ -1,28 +0,0 @@
1
- ._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
- ._zulp1b66{gap:var(--ds-space-050,4px)}
3
- ._16jlkb7n{flex-grow:1}
4
- ._18m915vq{overflow-y:hidden}
5
- ._1e0c11p5{display:grid}
6
- ._1e0c1txw{display:flex}
7
- ._1eim1xrj{direction:rtl}
8
- ._1n261g80{flex-wrap:wrap}
9
- ._1o9zidpf{flex-shrink:0}
10
- ._1o9zkb7n{flex-shrink:1}
11
- ._1q511b66{padding-block-start:var(--ds-space-050,4px)}
12
- ._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
13
- ._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
14
- ._1reo15vq{overflow-x:hidden}
15
- ._1wpz1fhb{align-self:stretch}
16
- ._4cvr1h6o{align-items:center}
17
- ._80om13gf{cursor:not-allowed}
18
- ._85i51b66{padding-block-end:var(--ds-space-050,4px)}
19
- ._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
20
- ._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
21
- ._8am5i4x0{-webkit-overflow-scrolling:touch}
22
- ._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
23
- ._i0dlf1ug{flex-basis:0%}
24
- ._kqswh2mm{position:relative}
25
- ._lcxv1rj4{pointer-events:all}
26
- ._y4ti12x7{padding-inline-end:var(--ds-space-075,6px)}
27
- ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
28
- @media (min-width:30rem){._1tn2fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}}
@@ -1,28 +0,0 @@
1
- ._11c81d4k{font:var(--ds-font-body-large,normal 400 1pc/24px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
2
- ._zulp1b66{gap:var(--ds-space-050,4px)}
3
- ._16jlkb7n{flex-grow:1}
4
- ._18m915vq{overflow-y:hidden}
5
- ._1e0c11p5{display:grid}
6
- ._1e0c1txw{display:flex}
7
- ._1eim1xrj{direction:rtl}
8
- ._1n261g80{flex-wrap:wrap}
9
- ._1o9zidpf{flex-shrink:0}
10
- ._1o9zkb7n{flex-shrink:1}
11
- ._1q511b66{padding-block-start:var(--ds-space-050,4px)}
12
- ._1q51v77o{padding-block-start:var(--ds-space-025,2px)}
13
- ._1q51ze3t{padding-block-start:var(--ds-space-0,0)}
14
- ._1reo15vq{overflow-x:hidden}
15
- ._1wpz1fhb{align-self:stretch}
16
- ._4cvr1h6o{align-items:center}
17
- ._80om13gf{cursor:not-allowed}
18
- ._85i51b66{padding-block-end:var(--ds-space-050,4px)}
19
- ._85i5v77o{padding-block-end:var(--ds-space-025,2px)}
20
- ._85i5ze3t{padding-block-end:var(--ds-space-0,0)}
21
- ._8am5i4x0{-webkit-overflow-scrolling:touch}
22
- ._bozg12x7{padding-inline-start:var(--ds-space-075,6px)}
23
- ._i0dlf1ug{flex-basis:0%}
24
- ._kqswh2mm{position:relative}
25
- ._lcxv1rj4{pointer-events:all}
26
- ._y4ti12x7{padding-inline-end:var(--ds-space-075,6px)}
27
- ._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
28
- @media (min-width:30rem){._1tn2fhey{font:var(--ds-font-body,normal 400 14px/20px "Atlassian Sans",ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}}
@@ -1,112 +0,0 @@
1
- /* containers.tsx generated by @compiled/babel-plugin v0.39.1 */
2
- import _extends from "@babel/runtime/helpers/extends";
3
- import "./containers.compiled.css";
4
- import * as React from 'react';
5
- import { ax, ix } from "@compiled/react/runtime";
6
- import { cx } from '@compiled/react';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
- import { getStyleProps } from '../../get-style-props';
9
-
10
- // ==============================
11
- // Root Container
12
- // ==============================
13
-
14
- // iOS Safari automatically zooms into form inputs on focus when the font size is less than 16px.
15
- // To prevent this zoom behaviour on mobile devices, the select container uses font.body.large (16px) by default,
16
- // then switches to the smaller font.body on screens wider than 30rem (desktop).
17
- // @see: https://medium.com/@rares.popescu/2-ways-to-avoid-the-automatic-zoom-in-on-input-fields-8a71479e542e
18
-
19
- var containerStyles = {
20
- default: "_11c81d4k _kqswh2mm _lcxv1rj4 _1tn2fhey",
21
- rtl: "_1eim1xrj",
22
- disabled: "_80om13gf"
23
- };
24
-
25
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
26
- export var SelectContainer = function SelectContainer(props) {
27
- var children = props.children,
28
- innerProps = props.innerProps,
29
- isDisabled = props.isDisabled,
30
- isRtl = props.isRtl,
31
- xcss = props.xcss;
32
- var _getStyleProps = getStyleProps(props, 'container', {
33
- '--is-disabled': isDisabled,
34
- '--is-rtl': isRtl
35
- }),
36
- className = _getStyleProps.className,
37
- css = _getStyleProps.css;
38
- return /*#__PURE__*/React.createElement("div", _extends({
39
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
40
- className: ax([containerStyles.default, isRtl && containerStyles.rtl, isDisabled && containerStyles.disabled, cx(className, xcss, '-container')])
41
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
42
- ,
43
- style: css
44
- }, innerProps), children);
45
- };
46
-
47
- // ==============================
48
- // Value Container
49
- // ==============================
50
-
51
- var valueContainerStyles = {
52
- default: "_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _4cvr1h6o _1e0c11p5 _1n261g80 _8am5i4x0 _kqswh2mm _y4ti12x7 _bozg12x7",
53
- verticalPaddingStandard: "_1q51v77o _85i5v77o",
54
- verticalPaddingTagUpliftMulti: "_1q511b66 _85i51b66",
55
- verticalPaddingTagUpliftCompactMulti: "_1q51v77o _85i5v77o",
56
- verticalPaddingCompactNonUplift: "_1q51ze3t _85i5ze3t",
57
- flex: "_1e0c1txw",
58
- flexWithGap: "_zulp1b66 _1e0c1txw _1n261g80"
59
- };
60
-
61
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
62
- export var ValueContainer = function ValueContainer(props) {
63
- var children = props.children,
64
- innerProps = props.innerProps,
65
- isMulti = props.isMulti,
66
- hasValue = props.hasValue,
67
- isCompact = props.isCompact,
68
- xcss = props.xcss,
69
- controlShouldRenderValue = props.selectProps.controlShouldRenderValue;
70
- var _getStyleProps2 = getStyleProps(props, 'valueContainer', {
71
- 'value-container': true,
72
- 'value-container--is-multi': isMulti,
73
- 'value-container--has-value': hasValue
74
- }),
75
- css = _getStyleProps2.css,
76
- className = _getStyleProps2.className;
77
- var ffTagUplifts = fg('platform-dst-lozenge-tag-badge-visual-uplifts');
78
- var tagUpliftMultiVertical = ffTagUplifts && isMulti;
79
- var tagUpliftChipRow = ffTagUplifts && isMulti && hasValue && controlShouldRenderValue;
80
- return /*#__PURE__*/React.createElement("div", _extends({
81
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
82
- className: ax([valueContainerStyles.default, tagUpliftMultiVertical && isCompact && valueContainerStyles.verticalPaddingTagUpliftCompactMulti, tagUpliftMultiVertical && !isCompact && valueContainerStyles.verticalPaddingTagUpliftMulti, !tagUpliftMultiVertical && !isCompact && valueContainerStyles.verticalPaddingStandard, !tagUpliftMultiVertical && isCompact && valueContainerStyles.verticalPaddingCompactNonUplift, isMulti && hasValue && controlShouldRenderValue && valueContainerStyles.flex, tagUpliftChipRow && valueContainerStyles.flexWithGap, cx(className, xcss, '-ValueContainer')])
83
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
84
- ,
85
- style: css
86
- }, innerProps), children);
87
- };
88
-
89
- // ==============================
90
- // Indicator Container
91
- // ==============================
92
-
93
- var indicatorContainerStyles = null;
94
-
95
- // eslint-disable-next-line @repo/internal/react/require-jsdoc
96
- export var IndicatorsContainer = function IndicatorsContainer(props) {
97
- var children = props.children,
98
- innerProps = props.innerProps,
99
- xcss = props.xcss;
100
- var _getStyleProps3 = getStyleProps(props, 'indicatorsContainer', {
101
- indicators: true
102
- }),
103
- css = _getStyleProps3.css,
104
- className = _getStyleProps3.className;
105
- return /*#__PURE__*/React.createElement("div", _extends({
106
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
107
- style: css
108
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
109
- ,
110
- className: ax(["_1e0c1txw _4cvr1h6o _1o9zidpf _1wpz1fhb _y4ti1b66", cx(className, xcss, '-IndicatorsContainer')])
111
- }, innerProps), children);
112
- };
@@ -1,50 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { type CommonPropsAndClassName, type GroupBase } from '../../types';
7
- export interface ContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
8
- /**
9
- * Whether the select is disabled.
10
- */
11
- isDisabled: boolean;
12
- isFocused: boolean;
13
- /**
14
- * The children to be rendered.
15
- */
16
- children: ReactNode;
17
- /**
18
- * Inner props to be passed down to the container.
19
- */
20
- innerProps: {};
21
- }
22
- export declare const SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => JSX.Element;
23
- export interface ValueContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
24
- /**
25
- * Props to be passed to the value container element.
26
- */
27
- innerProps?: {};
28
- /**
29
- * The children to be rendered.
30
- */
31
- children: ReactNode;
32
- isDisabled: boolean;
33
- /**
34
- * Whether the select is compact.
35
- */
36
- isCompact?: boolean;
37
- }
38
- export declare const ValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => JSX.Element;
39
- export interface IndicatorsContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
40
- isDisabled: boolean;
41
- /**
42
- * The children to be rendered.
43
- */
44
- children: ReactNode;
45
- /**
46
- * Props to be passed to the indicators container element.
47
- */
48
- innerProps?: {};
49
- }
50
- export declare const IndicatorsContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorsContainerProps<Option, IsMulti, Group>) => JSX.Element;
@@ -1,50 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type ReactNode } from 'react';
6
- import { type CommonPropsAndClassName, type GroupBase } from '../../types';
7
- export interface ContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
8
- /**
9
- * Whether the select is disabled.
10
- */
11
- isDisabled: boolean;
12
- isFocused: boolean;
13
- /**
14
- * The children to be rendered.
15
- */
16
- children: ReactNode;
17
- /**
18
- * Inner props to be passed down to the container.
19
- */
20
- innerProps: {};
21
- }
22
- export declare const SelectContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ContainerProps<Option, IsMulti, Group>) => JSX.Element;
23
- export interface ValueContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
24
- /**
25
- * Props to be passed to the value container element.
26
- */
27
- innerProps?: {};
28
- /**
29
- * The children to be rendered.
30
- */
31
- children: ReactNode;
32
- isDisabled: boolean;
33
- /**
34
- * Whether the select is compact.
35
- */
36
- isCompact?: boolean;
37
- }
38
- export declare const ValueContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: ValueContainerProps<Option, IsMulti, Group>) => JSX.Element;
39
- export interface IndicatorsContainerProps<Option = unknown, IsMulti extends boolean = boolean, Group extends GroupBase<Option> = GroupBase<Option>> extends CommonPropsAndClassName<Option, IsMulti, Group> {
40
- isDisabled: boolean;
41
- /**
42
- * The children to be rendered.
43
- */
44
- children: ReactNode;
45
- /**
46
- * Props to be passed to the indicators container element.
47
- */
48
- innerProps?: {};
49
- }
50
- export declare const IndicatorsContainer: <Option, IsMulti extends boolean, Group extends GroupBase<Option>>(props: IndicatorsContainerProps<Option, IsMulti, Group>) => JSX.Element;