@atlaskit/react-select 3.16.0 → 3.16.1

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 (57) hide show
  1. package/CHANGELOG.md +6 -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/creatable.js +1 -6
  10. package/dist/cjs/entry-points/async.js +4 -4
  11. package/dist/cjs/entry-points/creatable.js +4 -4
  12. package/dist/cjs/theme.js +1 -7
  13. package/dist/es2019/async.js +0 -1
  14. package/dist/es2019/compiled/components/indicators-container.compiled.css +5 -0
  15. package/dist/es2019/compiled/components/indicators-container.js +35 -0
  16. package/dist/es2019/compiled/components/select-container.compiled.css +6 -0
  17. package/dist/es2019/compiled/components/select-container.js +47 -0
  18. package/dist/es2019/compiled/components/value-container.compiled.css +20 -0
  19. package/dist/es2019/compiled/components/{containers.js → value-container.js} +2 -70
  20. package/dist/es2019/creatable.js +1 -1
  21. package/dist/es2019/entry-points/async.js +1 -1
  22. package/dist/es2019/entry-points/creatable.js +1 -1
  23. package/dist/es2019/theme.js +0 -7
  24. package/dist/esm/async.js +0 -1
  25. package/dist/esm/compiled/components/indicators-container.compiled.css +5 -0
  26. package/dist/esm/compiled/components/indicators-container.js +32 -0
  27. package/dist/esm/compiled/components/select-container.compiled.css +6 -0
  28. package/dist/esm/compiled/components/select-container.js +44 -0
  29. package/dist/esm/compiled/components/value-container.compiled.css +20 -0
  30. package/dist/esm/compiled/components/value-container.js +50 -0
  31. package/dist/esm/creatable.js +1 -1
  32. package/dist/esm/entry-points/async.js +1 -1
  33. package/dist/esm/entry-points/creatable.js +1 -1
  34. package/dist/esm/theme.js +0 -7
  35. package/dist/types/async.d.ts +1 -2
  36. package/dist/types/compiled/components/indicators-container.d.ts +18 -0
  37. package/dist/types/compiled/components/select-container.d.ts +22 -0
  38. package/dist/types/compiled/components/value-container.d.ts +22 -0
  39. package/dist/types/creatable.d.ts +1 -2
  40. package/dist/types/entry-points/async.d.ts +1 -1
  41. package/dist/types/entry-points/creatable.d.ts +1 -1
  42. package/dist/types/theme.d.ts +0 -2
  43. package/dist/types-ts4.5/async.d.ts +1 -2
  44. package/dist/types-ts4.5/compiled/components/indicators-container.d.ts +18 -0
  45. package/dist/types-ts4.5/compiled/components/select-container.d.ts +22 -0
  46. package/dist/types-ts4.5/compiled/components/value-container.d.ts +22 -0
  47. package/dist/types-ts4.5/creatable.d.ts +1 -2
  48. package/dist/types-ts4.5/entry-points/async.d.ts +1 -1
  49. package/dist/types-ts4.5/entry-points/creatable.d.ts +1 -1
  50. package/dist/types-ts4.5/theme.d.ts +0 -2
  51. package/package.json +3 -3
  52. package/dist/cjs/compiled/components/containers.compiled.css +0 -28
  53. package/dist/es2019/compiled/components/containers.compiled.css +0 -28
  54. package/dist/esm/compiled/components/containers.compiled.css +0 -28
  55. package/dist/esm/compiled/components/containers.js +0 -112
  56. package/dist/types/compiled/components/containers.d.ts +0 -50
  57. package/dist/types-ts4.5/compiled/components/containers.d.ts +0 -50
@@ -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;