@atlaskit/react-select 2.2.0 → 2.3.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.
- package/CHANGELOG.md +23 -0
- package/dist/cjs/compiled/components/containers.compiled.css +26 -0
- package/dist/cjs/compiled/components/containers.js +119 -0
- package/dist/cjs/compiled/components/control.compiled.css +51 -0
- package/dist/cjs/compiled/components/control.js +66 -0
- package/dist/cjs/compiled/components/group.compiled.css +12 -0
- package/dist/cjs/compiled/components/group.js +81 -0
- package/dist/cjs/compiled/components/indicators.compiled.css +24 -0
- package/dist/cjs/compiled/components/indicators.js +157 -0
- package/dist/cjs/compiled/components/input.compiled.css +49 -0
- package/dist/cjs/compiled/components/input.js +69 -0
- package/dist/cjs/compiled/components/internal/a11y-text.compiled.css +15 -0
- package/dist/cjs/compiled/components/internal/a11y-text.js +23 -0
- package/dist/cjs/compiled/components/internal/dummy-input.compiled.css +17 -0
- package/dist/cjs/compiled/components/internal/dummy-input.js +30 -0
- package/dist/cjs/compiled/components/internal/required-input.compiled.css +8 -0
- package/dist/cjs/compiled/components/internal/required-input.js +34 -0
- package/dist/cjs/compiled/components/live-region.js +177 -0
- package/dist/cjs/compiled/components/menu.compiled.css +19 -0
- package/dist/cjs/compiled/components/menu.js +491 -0
- package/dist/cjs/compiled/components/multi-value.compiled.css +56 -0
- package/dist/cjs/compiled/components/multi-value.js +199 -0
- package/dist/cjs/compiled/components/option.compiled.css +22 -0
- package/dist/cjs/compiled/components/option.js +57 -0
- package/dist/cjs/compiled/components/placeholder.compiled.css +7 -0
- package/dist/cjs/compiled/components/placeholder.js +45 -0
- package/dist/cjs/compiled/components/single-value.compiled.css +13 -0
- package/dist/cjs/compiled/components/single-value.js +46 -0
- package/dist/cjs/components/containers.js +12 -72
- package/dist/cjs/components/control.js +11 -96
- package/dist/cjs/components/group.js +15 -53
- package/dist/cjs/components/indicators.js +15 -107
- package/dist/cjs/components/input.js +12 -81
- package/dist/cjs/components/internal/a11y-text.js +6 -25
- package/dist/cjs/components/internal/dummy-input.js +8 -36
- package/dist/cjs/components/internal/notify-open-layer-observer.js +1 -0
- package/dist/cjs/components/internal/required-input.js +7 -31
- package/dist/cjs/components/internal/scroll-manager.js +19 -17
- package/dist/cjs/components/live-region.js +6 -164
- package/dist/cjs/components/menu.js +26 -181
- package/dist/cjs/components/multi-value.js +21 -197
- package/dist/cjs/components/option.js +11 -68
- package/dist/cjs/components/placeholder.js +11 -20
- package/dist/cjs/components/single-value.js +11 -26
- package/dist/cjs/emotion/components/containers.js +113 -0
- package/dist/cjs/emotion/components/control.js +112 -0
- package/dist/cjs/emotion/components/group.js +72 -0
- package/dist/cjs/emotion/components/indicators.js +138 -0
- package/dist/cjs/emotion/components/input.js +94 -0
- package/dist/cjs/emotion/components/internal/a11y-text.js +37 -0
- package/dist/cjs/emotion/components/internal/dummy-input.js +45 -0
- package/dist/cjs/emotion/components/internal/required-input.js +45 -0
- package/dist/cjs/emotion/components/live-region.js +182 -0
- package/dist/cjs/emotion/components/menu.js +456 -0
- package/dist/cjs/emotion/components/multi-value.js +224 -0
- package/dist/cjs/emotion/components/option.js +84 -0
- package/dist/cjs/emotion/components/placeholder.js +36 -0
- package/dist/cjs/emotion/components/single-value.js +42 -0
- package/dist/cjs/utils.js +2 -1
- package/dist/es2019/compiled/components/containers.compiled.css +26 -0
- package/dist/es2019/compiled/components/containers.js +115 -0
- package/dist/es2019/compiled/components/control.compiled.css +51 -0
- package/dist/es2019/compiled/components/control.js +58 -0
- package/dist/es2019/compiled/components/group.compiled.css +12 -0
- package/dist/es2019/compiled/components/group.js +72 -0
- package/dist/es2019/compiled/components/indicators.compiled.css +24 -0
- package/dist/es2019/compiled/components/indicators.js +144 -0
- package/dist/es2019/compiled/components/input.compiled.css +49 -0
- package/dist/es2019/compiled/components/input.js +59 -0
- package/dist/es2019/compiled/components/internal/a11y-text.compiled.css +15 -0
- package/dist/es2019/compiled/components/internal/a11y-text.js +11 -0
- package/dist/es2019/compiled/components/internal/dummy-input.compiled.css +17 -0
- package/dist/es2019/compiled/components/internal/dummy-input.js +19 -0
- package/dist/es2019/compiled/components/internal/required-input.compiled.css +8 -0
- package/dist/es2019/compiled/components/internal/required-input.js +23 -0
- package/dist/es2019/compiled/components/live-region.js +171 -0
- package/dist/es2019/compiled/components/menu.compiled.css +19 -0
- package/dist/es2019/compiled/components/menu.js +478 -0
- package/dist/es2019/compiled/components/multi-value.compiled.css +56 -0
- package/dist/es2019/compiled/components/multi-value.js +190 -0
- package/dist/es2019/compiled/components/option.compiled.css +22 -0
- package/dist/es2019/compiled/components/option.js +48 -0
- package/dist/es2019/compiled/components/placeholder.compiled.css +7 -0
- package/dist/es2019/compiled/components/placeholder.js +36 -0
- package/dist/es2019/compiled/components/single-value.compiled.css +13 -0
- package/dist/es2019/compiled/components/single-value.js +37 -0
- package/dist/es2019/components/containers.js +10 -87
- package/dist/es2019/components/control.js +8 -103
- package/dist/es2019/components/group.js +9 -54
- package/dist/es2019/components/indicators.js +11 -113
- package/dist/es2019/components/input.js +7 -83
- package/dist/es2019/components/internal/a11y-text.js +6 -26
- package/dist/es2019/components/internal/dummy-input.js +7 -36
- package/dist/es2019/components/internal/notify-open-layer-observer.js +1 -0
- package/dist/es2019/components/internal/required-input.js +6 -32
- package/dist/es2019/components/internal/scroll-manager.js +16 -16
- package/dist/es2019/components/live-region.js +5 -168
- package/dist/es2019/components/menu.js +14 -192
- package/dist/es2019/components/multi-value.js +12 -216
- package/dist/es2019/components/option.js +7 -75
- package/dist/es2019/components/placeholder.js +7 -25
- package/dist/es2019/components/single-value.js +7 -31
- package/dist/es2019/emotion/components/containers.js +110 -0
- package/dist/es2019/emotion/components/control.js +108 -0
- package/dist/es2019/emotion/components/group.js +60 -0
- package/dist/es2019/emotion/components/indicators.js +129 -0
- package/dist/es2019/emotion/components/input.js +87 -0
- package/dist/es2019/emotion/components/internal/a11y-text.js +28 -0
- package/dist/es2019/emotion/components/internal/dummy-input.js +38 -0
- package/dist/es2019/emotion/components/internal/required-input.js +36 -0
- package/dist/es2019/emotion/components/live-region.js +180 -0
- package/dist/es2019/emotion/components/menu.js +452 -0
- package/dist/es2019/emotion/components/multi-value.js +228 -0
- package/dist/es2019/emotion/components/option.js +79 -0
- package/dist/es2019/emotion/components/placeholder.js +29 -0
- package/dist/es2019/emotion/components/single-value.js +35 -0
- package/dist/es2019/utils.js +1 -0
- package/dist/esm/compiled/components/containers.compiled.css +26 -0
- package/dist/esm/compiled/components/containers.js +110 -0
- package/dist/esm/compiled/components/control.compiled.css +51 -0
- package/dist/esm/compiled/components/control.js +57 -0
- package/dist/esm/compiled/components/group.compiled.css +12 -0
- package/dist/esm/compiled/components/group.js +71 -0
- package/dist/esm/compiled/components/indicators.compiled.css +24 -0
- package/dist/esm/compiled/components/indicators.js +148 -0
- package/dist/esm/compiled/components/input.compiled.css +49 -0
- package/dist/esm/compiled/components/input.js +59 -0
- package/dist/esm/compiled/components/internal/a11y-text.compiled.css +15 -0
- package/dist/esm/compiled/components/internal/a11y-text.js +13 -0
- package/dist/esm/compiled/components/internal/dummy-input.compiled.css +17 -0
- package/dist/esm/compiled/components/internal/dummy-input.js +20 -0
- package/dist/esm/compiled/components/internal/required-input.compiled.css +8 -0
- package/dist/esm/compiled/components/internal/required-input.js +24 -0
- package/dist/esm/compiled/components/live-region.js +168 -0
- package/dist/esm/compiled/components/menu.compiled.css +19 -0
- package/dist/esm/compiled/components/menu.js +485 -0
- package/dist/esm/compiled/components/multi-value.compiled.css +56 -0
- package/dist/esm/compiled/components/multi-value.js +187 -0
- package/dist/esm/compiled/components/option.compiled.css +22 -0
- package/dist/esm/compiled/components/option.js +47 -0
- package/dist/esm/compiled/components/placeholder.compiled.css +7 -0
- package/dist/esm/compiled/components/placeholder.js +35 -0
- package/dist/esm/compiled/components/single-value.compiled.css +13 -0
- package/dist/esm/compiled/components/single-value.js +36 -0
- package/dist/esm/components/containers.js +12 -73
- package/dist/esm/components/control.js +8 -97
- package/dist/esm/components/group.js +11 -54
- package/dist/esm/components/indicators.js +15 -109
- package/dist/esm/components/input.js +8 -83
- package/dist/esm/components/internal/a11y-text.js +6 -26
- package/dist/esm/components/internal/dummy-input.js +7 -37
- package/dist/esm/components/internal/notify-open-layer-observer.js +1 -0
- package/dist/esm/components/internal/required-input.js +7 -32
- package/dist/esm/components/internal/scroll-manager.js +16 -16
- package/dist/esm/components/live-region.js +5 -163
- package/dist/esm/components/menu.js +24 -182
- package/dist/esm/components/multi-value.js +17 -199
- package/dist/esm/components/option.js +8 -69
- package/dist/esm/components/placeholder.js +8 -21
- package/dist/esm/components/single-value.js +8 -27
- package/dist/esm/emotion/components/containers.js +106 -0
- package/dist/esm/emotion/components/control.js +104 -0
- package/dist/esm/emotion/components/group.js +66 -0
- package/dist/esm/emotion/components/indicators.js +133 -0
- package/dist/esm/emotion/components/input.js +90 -0
- package/dist/esm/emotion/components/internal/a11y-text.js +30 -0
- package/dist/esm/emotion/components/internal/dummy-input.js +39 -0
- package/dist/esm/emotion/components/internal/required-input.js +37 -0
- package/dist/esm/emotion/components/live-region.js +177 -0
- package/dist/esm/emotion/components/menu.js +456 -0
- package/dist/esm/emotion/components/multi-value.js +218 -0
- package/dist/esm/emotion/components/option.js +76 -0
- package/dist/esm/emotion/components/placeholder.js +28 -0
- package/dist/esm/emotion/components/single-value.js +34 -0
- package/dist/esm/utils.js +2 -1
- package/dist/types/compiled/components/containers.d.ts +53 -0
- package/dist/types/compiled/components/control.d.ts +41 -0
- package/dist/types/compiled/components/group.d.ts +54 -0
- package/dist/types/compiled/components/indicators.d.ts +72 -0
- package/dist/types/compiled/components/input.d.ts +36 -0
- package/dist/types/compiled/components/internal/a11y-text.d.ts +3 -0
- package/dist/types/compiled/components/internal/dummy-input.d.ts +8 -0
- package/dist/types/compiled/components/internal/required-input.d.ts +10 -0
- package/dist/types/compiled/components/live-region.d.ts +19 -0
- package/dist/types/compiled/components/menu.d.ts +115 -0
- package/dist/types/compiled/components/multi-value.d.ts +57 -0
- package/dist/types/compiled/components/option.d.ts +48 -0
- package/dist/types/compiled/components/placeholder.d.ts +21 -0
- package/dist/types/compiled/components/single-value.d.ts +27 -0
- package/dist/types/components/containers.d.ts +6 -11
- package/dist/types/components/control.d.ts +4 -9
- package/dist/types/components/group.d.ts +8 -10
- package/dist/types/components/index.d.ts +21 -21
- package/dist/types/components/indicators.d.ts +7 -12
- package/dist/types/components/input.d.ts +3 -8
- package/dist/types/components/internal/a11y-text.d.ts +2 -7
- package/dist/types/components/internal/dummy-input.d.ts +3 -8
- package/dist/types/components/internal/required-input.d.ts +0 -4
- package/dist/types/components/internal/scroll-manager.d.ts +2 -7
- package/dist/types/components/live-region.d.ts +2 -8
- package/dist/types/components/menu.d.ts +10 -15
- package/dist/types/components/multi-value.d.ts +19 -13
- package/dist/types/components/option.d.ts +3 -8
- package/dist/types/components/placeholder.d.ts +3 -8
- package/dist/types/components/single-value.d.ts +3 -8
- package/dist/types/emotion/components/containers.d.ts +54 -0
- package/dist/types/emotion/components/control.d.ts +42 -0
- package/dist/types/emotion/components/group.d.ts +52 -0
- package/dist/types/emotion/components/indicators.d.ts +73 -0
- package/dist/types/emotion/components/input.d.ts +37 -0
- package/dist/types/emotion/components/internal/a11y-text.d.ts +8 -0
- package/dist/types/emotion/components/internal/dummy-input.d.ts +9 -0
- package/dist/types/emotion/components/internal/required-input.d.ts +10 -0
- package/dist/types/emotion/components/live-region.d.ts +25 -0
- package/dist/types/emotion/components/menu.d.ts +116 -0
- package/dist/types/emotion/components/multi-value.d.ts +47 -0
- package/dist/types/emotion/components/option.d.ts +49 -0
- package/dist/types/emotion/components/placeholder.d.ts +22 -0
- package/dist/types/emotion/components/single-value.d.ts +28 -0
- package/dist/types/select.d.ts +21 -21
- package/dist/types/types.d.ts +3 -0
- package/dist/types-ts4.5/compiled/components/containers.d.ts +53 -0
- package/dist/types-ts4.5/compiled/components/control.d.ts +41 -0
- package/dist/types-ts4.5/compiled/components/group.d.ts +54 -0
- package/dist/types-ts4.5/compiled/components/indicators.d.ts +72 -0
- package/dist/types-ts4.5/compiled/components/input.d.ts +36 -0
- package/dist/types-ts4.5/compiled/components/internal/a11y-text.d.ts +3 -0
- package/dist/types-ts4.5/compiled/components/internal/dummy-input.d.ts +8 -0
- package/dist/types-ts4.5/compiled/components/internal/required-input.d.ts +10 -0
- package/dist/types-ts4.5/compiled/components/live-region.d.ts +19 -0
- package/dist/types-ts4.5/compiled/components/menu.d.ts +115 -0
- package/dist/types-ts4.5/compiled/components/multi-value.d.ts +57 -0
- package/dist/types-ts4.5/compiled/components/option.d.ts +48 -0
- package/dist/types-ts4.5/compiled/components/placeholder.d.ts +21 -0
- package/dist/types-ts4.5/compiled/components/single-value.d.ts +27 -0
- package/dist/types-ts4.5/components/containers.d.ts +6 -11
- package/dist/types-ts4.5/components/control.d.ts +4 -9
- package/dist/types-ts4.5/components/group.d.ts +8 -10
- package/dist/types-ts4.5/components/index.d.ts +21 -21
- package/dist/types-ts4.5/components/indicators.d.ts +7 -12
- package/dist/types-ts4.5/components/input.d.ts +3 -8
- package/dist/types-ts4.5/components/internal/a11y-text.d.ts +2 -7
- package/dist/types-ts4.5/components/internal/dummy-input.d.ts +3 -8
- package/dist/types-ts4.5/components/internal/required-input.d.ts +0 -4
- package/dist/types-ts4.5/components/internal/scroll-manager.d.ts +2 -7
- package/dist/types-ts4.5/components/live-region.d.ts +2 -8
- package/dist/types-ts4.5/components/menu.d.ts +10 -15
- package/dist/types-ts4.5/components/multi-value.d.ts +19 -13
- package/dist/types-ts4.5/components/option.d.ts +3 -8
- package/dist/types-ts4.5/components/placeholder.d.ts +3 -8
- package/dist/types-ts4.5/components/single-value.d.ts +3 -8
- package/dist/types-ts4.5/emotion/components/containers.d.ts +54 -0
- package/dist/types-ts4.5/emotion/components/control.d.ts +42 -0
- package/dist/types-ts4.5/emotion/components/group.d.ts +52 -0
- package/dist/types-ts4.5/emotion/components/indicators.d.ts +73 -0
- package/dist/types-ts4.5/emotion/components/input.d.ts +37 -0
- package/dist/types-ts4.5/emotion/components/internal/a11y-text.d.ts +8 -0
- package/dist/types-ts4.5/emotion/components/internal/dummy-input.d.ts +9 -0
- package/dist/types-ts4.5/emotion/components/internal/required-input.d.ts +10 -0
- package/dist/types-ts4.5/emotion/components/live-region.d.ts +25 -0
- package/dist/types-ts4.5/emotion/components/menu.d.ts +116 -0
- package/dist/types-ts4.5/emotion/components/multi-value.d.ts +47 -0
- package/dist/types-ts4.5/emotion/components/option.d.ts +49 -0
- package/dist/types-ts4.5/emotion/components/placeholder.d.ts +22 -0
- package/dist/types-ts4.5/emotion/components/single-value.d.ts +28 -0
- package/dist/types-ts4.5/select.d.ts +21 -21
- package/dist/types-ts4.5/types.d.ts +3 -0
- package/package.json +10 -2
|
@@ -0,0 +1,190 @@
|
|
|
1
|
+
/* multi-value.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./multi-value.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
8
|
+
import CrossIcon from '@atlaskit/icon/utility/cross';
|
|
9
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { Inline } from '@atlaskit/primitives/compiled';
|
|
11
|
+
import { getStyleProps } from '../../utils';
|
|
12
|
+
const multiValueStyles = {
|
|
13
|
+
root: "_2rkogqwt _1e0c1txw _1ul9ze3t _19pkv77o _2hwxv77o _otyrv77o _18u0v77o _bfhkm7j4 _p12f1osq _syazjpor _3yq3glyw",
|
|
14
|
+
disabled: "_syaz1lh4 _bfhkm7j4",
|
|
15
|
+
focused: "_syaz1wum _bfhkfg4m _16qs7ex6 _1aewe4h9 _6up51j28 _1xdnnqa1",
|
|
16
|
+
refresh: "_2rkoiti9 _1h6d14je _1dqonqa1 _189ee4h9 _bfhk1j9a"
|
|
17
|
+
};
|
|
18
|
+
export const multiValueCSS = () => ({});
|
|
19
|
+
export const multiValueLabelCSS = () => ({});
|
|
20
|
+
const multiValueLabelStyles = {
|
|
21
|
+
root: "_1reo15vq _18m915vq _2rkogqwt _11c8dcr7 _o5721q9c _ca0qv77o _u5f3v77o _n3tdv77o _19bv12x7 _syaz1kw7",
|
|
22
|
+
disabled: "_syaz1lh4",
|
|
23
|
+
ellipsis: "_1bto1l2s",
|
|
24
|
+
refresh: "_11c82smr _ca0qidpf _n3tdidpf _19bv1b66"
|
|
25
|
+
};
|
|
26
|
+
export const multiValueRemoveCSS = () => ({});
|
|
27
|
+
const multiValueRemoveStyles = {
|
|
28
|
+
focused: "_bfhkb1q9 _lswu1rrc",
|
|
29
|
+
root: "_2rkovtp2 _4cvr1h6o _1e0c1txw _lswu1dx5 _19bvv77o _u5f3v77o _irr31yvi _13br1jjn _1di61io2 _i5f81jjn",
|
|
30
|
+
refresh: "_19itglyw _2rkoglpi _bfhksm61 _4cvr1h6o _1bah1h6o _1wpz1h6o _r06hglyw _syaz1fxt _ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o _2hwxv77o _1ah312gs _irr3166n _1di61dty"
|
|
31
|
+
};
|
|
32
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
33
|
+
export const MultiValueContainer = ({
|
|
34
|
+
children,
|
|
35
|
+
innerProps,
|
|
36
|
+
isFocused,
|
|
37
|
+
isDisabled,
|
|
38
|
+
className,
|
|
39
|
+
xcss
|
|
40
|
+
}) => {
|
|
41
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
42
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
43
|
+
className: ax([multiValueStyles.root, isDisabled && multiValueStyles.disabled, isFocused && multiValueStyles.focused, fg('platform-component-visual-refresh') && multiValueStyles.refresh, cx(className, xcss)])
|
|
44
|
+
}), children);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
48
|
+
export const MultiValueLabel = ({
|
|
49
|
+
children,
|
|
50
|
+
innerProps,
|
|
51
|
+
isDisabled,
|
|
52
|
+
hasEllipsis,
|
|
53
|
+
className,
|
|
54
|
+
xcss
|
|
55
|
+
}) => {
|
|
56
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
57
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
58
|
+
className: ax([multiValueLabelStyles.root, isDisabled && multiValueLabelStyles.disabled, hasEllipsis && multiValueLabelStyles.ellipsis, fg('platform-component-visual-refresh') && multiValueLabelStyles.refresh, cx(className, xcss)])
|
|
59
|
+
}), children);
|
|
60
|
+
};
|
|
61
|
+
const disabledStyles = null;
|
|
62
|
+
const enabledStyles = null;
|
|
63
|
+
const iconWrapperStyles = {
|
|
64
|
+
root: "_ca0qv77o _u5f3v77o _n3tdv77o _19bvv77o"
|
|
65
|
+
};
|
|
66
|
+
const renderIcon = () => {
|
|
67
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
68
|
+
if (fg('platform-component-visual-refresh')) {
|
|
69
|
+
return /*#__PURE__*/React.createElement(CrossIcon, {
|
|
70
|
+
label: "",
|
|
71
|
+
color: "currentColor"
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
76
|
+
if (fg('platform-visual-refresh-icons-legacy-facade')) {
|
|
77
|
+
return /*#__PURE__*/React.createElement(Inline, {
|
|
78
|
+
xcss: iconWrapperStyles.root
|
|
79
|
+
}, /*#__PURE__*/React.createElement(CrossIcon, {
|
|
80
|
+
label: "",
|
|
81
|
+
color: "currentColor"
|
|
82
|
+
}));
|
|
83
|
+
}
|
|
84
|
+
return (
|
|
85
|
+
/*#__PURE__*/
|
|
86
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
87
|
+
React.createElement(LegacySelectClearIcon, {
|
|
88
|
+
label: "",
|
|
89
|
+
primaryColor: "transparent",
|
|
90
|
+
size: "small",
|
|
91
|
+
secondaryColor: "inherit"
|
|
92
|
+
})
|
|
93
|
+
);
|
|
94
|
+
};
|
|
95
|
+
export function MultiValueRemove({
|
|
96
|
+
isDisabled,
|
|
97
|
+
isFocused,
|
|
98
|
+
innerProps,
|
|
99
|
+
className,
|
|
100
|
+
xcss
|
|
101
|
+
}) {
|
|
102
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, innerProps, {
|
|
103
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
104
|
+
className: ax([multiValueRemoveStyles.root, isFocused && multiValueRemoveStyles.focused, fg('platform-component-visual-refresh') && multiValueRemoveStyles.refresh, cx(className, xcss)])
|
|
105
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
106
|
+
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon',
|
|
107
|
+
className: ax([isDisabled && "_1e0cglyw", !isDisabled && "_1e0c1kw7"])
|
|
108
|
+
}, renderIcon()));
|
|
109
|
+
}
|
|
110
|
+
const MultiValue = props => {
|
|
111
|
+
const {
|
|
112
|
+
children,
|
|
113
|
+
components,
|
|
114
|
+
data,
|
|
115
|
+
innerProps,
|
|
116
|
+
isDisabled,
|
|
117
|
+
isFocused,
|
|
118
|
+
removeProps,
|
|
119
|
+
selectProps,
|
|
120
|
+
cropWithEllipsis
|
|
121
|
+
} = props;
|
|
122
|
+
const {
|
|
123
|
+
Container,
|
|
124
|
+
Label,
|
|
125
|
+
Remove
|
|
126
|
+
} = components;
|
|
127
|
+
const ariaLabel = typeof children === 'string' ? children : data.label;
|
|
128
|
+
const {
|
|
129
|
+
css: containerCss,
|
|
130
|
+
className: containerClassName
|
|
131
|
+
} = getStyleProps(props, 'multiValue', {
|
|
132
|
+
'multi-value': true,
|
|
133
|
+
'multi-value--is-disabled': isDisabled
|
|
134
|
+
});
|
|
135
|
+
const {
|
|
136
|
+
css: labelCss,
|
|
137
|
+
className: labelClassName
|
|
138
|
+
} = getStyleProps(props, 'multiValueLabel', {
|
|
139
|
+
'multi-value__label': true
|
|
140
|
+
});
|
|
141
|
+
const {
|
|
142
|
+
css: removeCss,
|
|
143
|
+
className: removeClassName
|
|
144
|
+
} = getStyleProps(props, 'multiValueRemove', {
|
|
145
|
+
'multi-value__remove': true
|
|
146
|
+
});
|
|
147
|
+
return /*#__PURE__*/React.createElement(Container, {
|
|
148
|
+
data: data,
|
|
149
|
+
innerProps: {
|
|
150
|
+
style: containerCss,
|
|
151
|
+
className: containerClassName,
|
|
152
|
+
...innerProps
|
|
153
|
+
}
|
|
154
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
155
|
+
,
|
|
156
|
+
className: containerClassName,
|
|
157
|
+
isFocused: isFocused,
|
|
158
|
+
isDisabled: isDisabled,
|
|
159
|
+
selectProps: selectProps
|
|
160
|
+
}, /*#__PURE__*/React.createElement(Label, {
|
|
161
|
+
data: data,
|
|
162
|
+
innerProps: {
|
|
163
|
+
style: labelCss,
|
|
164
|
+
className: labelClassName
|
|
165
|
+
}
|
|
166
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
167
|
+
,
|
|
168
|
+
className: labelClassName,
|
|
169
|
+
hasEllipsis: cropWithEllipsis || cropWithEllipsis === undefined,
|
|
170
|
+
selectProps: selectProps
|
|
171
|
+
}, children), /*#__PURE__*/React.createElement(Remove, {
|
|
172
|
+
data: data,
|
|
173
|
+
innerProps: {
|
|
174
|
+
style: removeCss,
|
|
175
|
+
className: removeClassName,
|
|
176
|
+
role: 'button',
|
|
177
|
+
tabIndex: -1,
|
|
178
|
+
'aria-label': `${ariaLabel || 'option'}, remove`,
|
|
179
|
+
...removeProps
|
|
180
|
+
}
|
|
181
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
182
|
+
,
|
|
183
|
+
className: removeClassName,
|
|
184
|
+
isDisabled: isDisabled,
|
|
185
|
+
selectProps: selectProps
|
|
186
|
+
}));
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
190
|
+
export default MultiValue;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
._18zrutpp{padding-inline:var(--ds-space-150,9pt)}
|
|
3
|
+
._1rjc12x7{padding-block:var(--ds-space-075,6px)}._16qsglyw{box-shadow:none}
|
|
4
|
+
._16qsu4to{box-shadow:inset 2px 0 0 var(--ds-border-selected,#0c66e4)}
|
|
5
|
+
._18ql1j7p{-webkit-tap-highlight-color:rgba(0,0,0,0)}
|
|
6
|
+
._1bsb1osq{width:100%}
|
|
7
|
+
._1e0c1ule{display:block}
|
|
8
|
+
._1wyb1kw7{font-size:inherit}
|
|
9
|
+
._80om13gf{cursor:not-allowed}
|
|
10
|
+
._80om73ad{cursor:default}
|
|
11
|
+
._bfhk166n{background-color:var(--ds-background-neutral-subtle-hovered,#091e420f)}
|
|
12
|
+
._bfhk1j28{background-color:transparent}
|
|
13
|
+
._bfhkfg4m{background-color:var(--ds-background-selected,#e9f2ff)}
|
|
14
|
+
._bfhki1yw{background-color:var(--ds-background-selected-hovered,#cce0ff)}
|
|
15
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
16
|
+
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
17
|
+
._syazaqb7{color:var(--ds-text-selected,#0c66e4)}
|
|
18
|
+
._uiztglyw{-webkit-user-select:none;-ms-user-select:none;user-select:none}
|
|
19
|
+
._1di619ru:active{background-color:var(--ds-background-selected-pressed,#85b8ff)}
|
|
20
|
+
._1di61dty:active{background-color:var(--ds-background-neutral-subtle-pressed,#091e4224)}
|
|
21
|
+
._1di61j28:active{background-color:transparent}
|
|
22
|
+
@media screen and (-ms-high-contrast:active){._1pkn1vrj{border-left:2px solid transparent}._1pknglyw{border-left:none}}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* option.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./option.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import { getStyleProps } from '../../utils';
|
|
8
|
+
export const optionCSS = () => ({});
|
|
9
|
+
const optionStyles = {
|
|
10
|
+
root: "_1rjc12x7 _18zrutpp _syaz1fxt _80om73ad _1e0c1ule _1wyb1kw7 _1bsb1osq _uiztglyw _18ql1j7p _1di61dty",
|
|
11
|
+
disabled: "_syaz1lh4 _80om13gf _bfhk1j28 _16qsglyw _1di61j28 _1pknglyw",
|
|
12
|
+
focused: "_bfhk166n _16qsu4to _1pkn1vrj",
|
|
13
|
+
selected: "_syazaqb7 _bfhkfg4m _16qsu4to _1di619ru _1pkn1vrj",
|
|
14
|
+
focusedSelected: "_bfhki1yw"
|
|
15
|
+
};
|
|
16
|
+
const Option = props => {
|
|
17
|
+
const {
|
|
18
|
+
children,
|
|
19
|
+
isDisabled,
|
|
20
|
+
isFocused,
|
|
21
|
+
isSelected,
|
|
22
|
+
innerRef,
|
|
23
|
+
innerProps,
|
|
24
|
+
xcss
|
|
25
|
+
} = props;
|
|
26
|
+
const {
|
|
27
|
+
css,
|
|
28
|
+
className
|
|
29
|
+
} = getStyleProps(props, 'option', {
|
|
30
|
+
option: true,
|
|
31
|
+
'option--is-disabled': isDisabled,
|
|
32
|
+
'option--is-focused': isFocused,
|
|
33
|
+
'option--is-selected': isSelected
|
|
34
|
+
});
|
|
35
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
36
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
37
|
+
style: css
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
39
|
+
,
|
|
40
|
+
className: ax([optionStyles.root, isFocused && optionStyles.focused, isSelected && optionStyles.selected, isFocused && isSelected && optionStyles.focusedSelected, isDisabled && optionStyles.disabled, cx(className, xcss)]),
|
|
41
|
+
ref: innerRef
|
|
42
|
+
}, innerProps, {
|
|
43
|
+
tabIndex: -1
|
|
44
|
+
}), children);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
48
|
+
export default Option;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
|
|
2
|
+
._nd5l1sux{grid-area:1/1/2/3}._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
3
|
+
._19pkidpf{margin-top:0}
|
|
4
|
+
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
5
|
+
._otyridpf{margin-bottom:0}
|
|
6
|
+
._syaz131l{color:var(--ds-text-subtlest,#626f86)}
|
|
7
|
+
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* placeholder.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./placeholder.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import { getStyleProps } from '../../utils';
|
|
8
|
+
export const placeholderCSS = () => ({});
|
|
9
|
+
const placeholderStyles = {
|
|
10
|
+
root: "_nd5l1sux _19pkidpf _2hwxv77o _otyridpf _18u0v77o _syaz131l",
|
|
11
|
+
disabled: "_syaz1lh4"
|
|
12
|
+
};
|
|
13
|
+
const Placeholder = props => {
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
innerProps,
|
|
17
|
+
isDisabled,
|
|
18
|
+
xcss
|
|
19
|
+
} = props;
|
|
20
|
+
const {
|
|
21
|
+
css,
|
|
22
|
+
className
|
|
23
|
+
} = getStyleProps(props, 'placeholder', {
|
|
24
|
+
placeholder: true
|
|
25
|
+
});
|
|
26
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
27
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
28
|
+
style: css
|
|
29
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
30
|
+
,
|
|
31
|
+
className: ax([placeholderStyles.root, isDisabled && placeholderStyles.disabled, cx(className, xcss)])
|
|
32
|
+
}, innerProps), children);
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
36
|
+
export default Placeholder;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
|
|
2
|
+
._nd5l1sux{grid-area:1/1/2/3}._18m915vq{overflow-y:hidden}
|
|
3
|
+
._18u0v77o{margin-left:var(--ds-space-025,2px)}
|
|
4
|
+
._19pkidpf{margin-top:0}
|
|
5
|
+
._1bto1l2s{text-overflow:ellipsis}
|
|
6
|
+
._1reo15vq{overflow-x:hidden}
|
|
7
|
+
._2hwxv77o{margin-right:var(--ds-space-025,2px)}
|
|
8
|
+
._jqf6bf1n{label:singleValue}
|
|
9
|
+
._o5721q9c{white-space:nowrap}
|
|
10
|
+
._otyridpf{margin-bottom:0}
|
|
11
|
+
._p12f1osq{max-width:100%}
|
|
12
|
+
._syaz1fxt{color:var(--ds-text,#172b4d)}
|
|
13
|
+
._syaz1lh4{color:var(--ds-text-disabled,#091e424f)}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* single-value.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./single-value.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import { getStyleProps } from '../../utils';
|
|
8
|
+
export const css = () => ({});
|
|
9
|
+
const styles = {
|
|
10
|
+
root: "_nd5l1sux _1reo15vq _18m915vq _jqf6bf1n _p12f1osq _1bto1l2s _o5721q9c _19pkidpf _2hwxv77o _otyridpf _18u0v77o _syaz1fxt",
|
|
11
|
+
disalbed: "_syaz1lh4"
|
|
12
|
+
};
|
|
13
|
+
const SingleValue = props => {
|
|
14
|
+
const {
|
|
15
|
+
children,
|
|
16
|
+
isDisabled,
|
|
17
|
+
innerProps,
|
|
18
|
+
xcss
|
|
19
|
+
} = props;
|
|
20
|
+
const {
|
|
21
|
+
css,
|
|
22
|
+
className
|
|
23
|
+
} = getStyleProps(props, 'singleValue', {
|
|
24
|
+
'single-value': true,
|
|
25
|
+
'single-value--is-disabled': isDisabled
|
|
26
|
+
});
|
|
27
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
28
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
29
|
+
style: css
|
|
30
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
31
|
+
,
|
|
32
|
+
className: ax([styles.root, isDisabled && styles.disalbed, cx(className, xcss)])
|
|
33
|
+
}, innerProps), children);
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
37
|
+
export default SingleValue;
|
|
@@ -1,109 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
* @jsxRuntime classic
|
|
4
|
-
* @jsx jsx
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
import { jsx } from '@emotion/react';
|
|
1
|
+
/* eslint-disable @repo/internal/react/no-unsafe-spread-props */
|
|
2
|
+
import React from 'react';
|
|
8
3
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import { containerCSS as compiledCSS, IndicatorsContainer as CompiledIndicatorsContainer, indicatorsContainerCSS as compiledIndicatorsContainerCSS, SelectContainer as CompiledSelectContainer, ValueContainer as CompiledValueContainer, valueContainerCSS as compiledValueContainerCSS } from '../compiled/components/containers';
|
|
5
|
+
import { containerCSS as emotionCSS, IndicatorsContainer as EmotionIndicatorsContainer, indicatorsContainerCSS as emotionIndicatorsContainerCSS, SelectContainer as EmotionSelectContainer, ValueContainer as EmotionValueContainer, valueContainerCSS as emotionValueContainerCSS } from '../emotion/components/containers';
|
|
11
6
|
|
|
12
7
|
// ==============================
|
|
13
8
|
// Root Container
|
|
14
9
|
// ==============================
|
|
15
10
|
|
|
16
|
-
export const containerCSS = (
|
|
17
|
-
isDisabled,
|
|
18
|
-
isRtl
|
|
19
|
-
}) => ({
|
|
20
|
-
label: 'container',
|
|
21
|
-
direction: isRtl ? 'rtl' : undefined,
|
|
22
|
-
position: 'relative',
|
|
23
|
-
font: fg('platform_design_system_team_safari_input_fix') ? "var(--ds-font-body-large, normal 400 16px/24px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)" : "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
24
|
-
pointerEvents: 'all',
|
|
25
|
-
cursor: isDisabled ? 'not-allowed' : undefined,
|
|
26
|
-
[`${media.above.xs}`]: {
|
|
27
|
-
font: fg('platform_design_system_team_safari_input_fix') ? "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)" : undefined
|
|
28
|
-
}
|
|
29
|
-
});
|
|
11
|
+
export const containerCSS = props => fg('compiled-react-select') ? compiledCSS() : emotionCSS(props);
|
|
30
12
|
|
|
31
13
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
32
|
-
export const SelectContainer = props =>
|
|
33
|
-
const {
|
|
34
|
-
children,
|
|
35
|
-
innerProps,
|
|
36
|
-
isDisabled,
|
|
37
|
-
isRtl
|
|
38
|
-
} = props;
|
|
39
|
-
return jsx("div", _extends({}, getStyleProps(props, 'container', {
|
|
40
|
-
'--is-disabled': isDisabled,
|
|
41
|
-
'--is-rtl': isRtl
|
|
42
|
-
}), innerProps), children);
|
|
43
|
-
};
|
|
14
|
+
export const SelectContainer = props => fg('compiled-react-select') ? /*#__PURE__*/React.createElement(CompiledSelectContainer, props) : /*#__PURE__*/React.createElement(EmotionSelectContainer, props);
|
|
44
15
|
|
|
45
16
|
// ==============================
|
|
46
17
|
// Value Container
|
|
47
18
|
// ==============================
|
|
48
19
|
|
|
49
|
-
export const valueContainerCSS = (
|
|
50
|
-
isMulti,
|
|
51
|
-
hasValue,
|
|
52
|
-
isCompact,
|
|
53
|
-
selectProps: {
|
|
54
|
-
controlShouldRenderValue
|
|
55
|
-
}
|
|
56
|
-
}) => ({
|
|
57
|
-
alignItems: 'center',
|
|
58
|
-
display: isMulti && hasValue && controlShouldRenderValue ? 'flex' : 'grid',
|
|
59
|
-
flex: 1,
|
|
60
|
-
flexWrap: 'wrap',
|
|
61
|
-
WebkitOverflowScrolling: 'touch',
|
|
62
|
-
position: 'relative',
|
|
63
|
-
overflow: 'hidden',
|
|
64
|
-
padding: `${isCompact ? 0 : "var(--ds-space-025, 2px)"} ${"var(--ds-space-075, 6px)"}`
|
|
65
|
-
});
|
|
20
|
+
export const valueContainerCSS = props => fg('compiled-react-select') ? compiledValueContainerCSS() : emotionValueContainerCSS(props);
|
|
66
21
|
|
|
67
22
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
68
|
-
export const ValueContainer = props =>
|
|
69
|
-
const {
|
|
70
|
-
children,
|
|
71
|
-
innerProps,
|
|
72
|
-
isMulti,
|
|
73
|
-
hasValue
|
|
74
|
-
} = props;
|
|
75
|
-
const styles = getStyleProps(props, 'valueContainer', {
|
|
76
|
-
'value-container': true,
|
|
77
|
-
'value-container--is-multi': isMulti,
|
|
78
|
-
'value-container--has-value': hasValue
|
|
79
|
-
});
|
|
80
|
-
return jsx("div", _extends({
|
|
81
|
-
css: styles.css
|
|
82
|
-
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
|
|
83
|
-
,
|
|
84
|
-
className: styles.className || 'value-container'
|
|
85
|
-
}, innerProps), children);
|
|
86
|
-
};
|
|
23
|
+
export const ValueContainer = props => fg('compiled-react-select') ? /*#__PURE__*/React.createElement(CompiledValueContainer, props) : /*#__PURE__*/React.createElement(EmotionValueContainer, props);
|
|
87
24
|
|
|
88
25
|
// ==============================
|
|
89
26
|
// Indicator Container
|
|
90
27
|
// ==============================
|
|
91
28
|
|
|
92
|
-
export const indicatorsContainerCSS = () => (
|
|
93
|
-
alignItems: 'center',
|
|
94
|
-
alignSelf: 'stretch',
|
|
95
|
-
display: 'flex',
|
|
96
|
-
flexShrink: 0,
|
|
97
|
-
paddingRight: "var(--ds-space-050, 4px)"
|
|
98
|
-
});
|
|
29
|
+
export const indicatorsContainerCSS = () => fg('compiled-react-select') ? compiledIndicatorsContainerCSS() : emotionIndicatorsContainerCSS();
|
|
99
30
|
|
|
100
31
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
101
|
-
export const IndicatorsContainer = props =>
|
|
102
|
-
const {
|
|
103
|
-
children,
|
|
104
|
-
innerProps
|
|
105
|
-
} = props;
|
|
106
|
-
return jsx("div", _extends({}, getStyleProps(props, 'indicatorsContainer', {
|
|
107
|
-
indicators: true
|
|
108
|
-
}), innerProps), children);
|
|
109
|
-
};
|
|
32
|
+
export const IndicatorsContainer = props => fg('compiled-react-select') ? /*#__PURE__*/React.createElement(CompiledIndicatorsContainer, props) : /*#__PURE__*/React.createElement(EmotionIndicatorsContainer, props);
|
|
@@ -1,107 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import { getStyleProps } from '../utils';
|
|
9
|
-
export const css = ({
|
|
10
|
-
isDisabled,
|
|
11
|
-
isFocused,
|
|
12
|
-
isInvalid,
|
|
13
|
-
isCompact,
|
|
14
|
-
appearance
|
|
15
|
-
}) => {
|
|
16
|
-
let borderColor = isFocused ? "var(--ds-border-focused, #388BFF)" : "var(--ds-border-input, #8590A2)";
|
|
17
|
-
let backgroundColor = isFocused ? "var(--ds-background-input-pressed, #FFFFFF)" : "var(--ds-background-input, #FFFFFF)";
|
|
18
|
-
let backgroundColorHover = isFocused ? "var(--ds-background-input-pressed, #FFFFFF)" : "var(--ds-background-input-hovered, #F7F8F9)";
|
|
19
|
-
let borderColorHover = isFocused ? "var(--ds-border-focused, #388BFF)" : "var(--ds-border-input, #8590A2)";
|
|
20
|
-
if (isDisabled) {
|
|
21
|
-
backgroundColor = "var(--ds-background-disabled, #091E4208)";
|
|
22
|
-
borderColor = "var(--ds-background-disabled, #091E4208)";
|
|
23
|
-
}
|
|
24
|
-
if (isInvalid) {
|
|
25
|
-
borderColor = "var(--ds-border-danger, #E2483D)";
|
|
26
|
-
borderColorHover = "var(--ds-border-danger, #E2483D)";
|
|
27
|
-
}
|
|
28
|
-
const transitionDuration = '200ms';
|
|
29
|
-
if (appearance === 'subtle') {
|
|
30
|
-
borderColor = isFocused ? "var(--ds-border-focused, #388BFF)" : 'transparent';
|
|
31
|
-
backgroundColor = isFocused ? "var(--ds-surface, #FFFFFF)" : 'transparent';
|
|
32
|
-
backgroundColorHover = isFocused ? "var(--ds-background-input-pressed, #FFFFFF)" : "var(--ds-background-input-hovered, #F7F8F9)";
|
|
33
|
-
}
|
|
34
|
-
if (appearance === 'none') {
|
|
35
|
-
borderColor = 'transparent';
|
|
36
|
-
backgroundColor = 'transparent';
|
|
37
|
-
backgroundColorHover = 'transparent';
|
|
38
|
-
borderColorHover = 'transparent';
|
|
39
|
-
}
|
|
40
|
-
return {
|
|
41
|
-
label: 'control',
|
|
42
|
-
alignItems: 'center',
|
|
43
|
-
cursor: 'default',
|
|
44
|
-
display: 'flex',
|
|
45
|
-
flexWrap: 'wrap',
|
|
46
|
-
justifyContent: 'space-between',
|
|
47
|
-
outline: '0 !important',
|
|
48
|
-
position: 'relative',
|
|
49
|
-
// Turn pointer events off when disabled - this makes it so hover etc don't work.
|
|
50
|
-
pointerEvents: isDisabled ? 'none' : undefined,
|
|
51
|
-
backgroundColor,
|
|
52
|
-
borderColor,
|
|
53
|
-
borderStyle: 'solid',
|
|
54
|
-
borderRadius: "var(--ds-border-radius-100, 3px)",
|
|
55
|
-
borderWidth: "var(--ds-border-width, 1px)",
|
|
56
|
-
boxShadow: isInvalid ? `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${borderColor}` : 'none',
|
|
57
|
-
'&:focus-within': {
|
|
58
|
-
boxShadow: `inset 0 0 0 ${"var(--ds-border-width, 1px)"} ${borderColor}`
|
|
59
|
-
},
|
|
60
|
-
minHeight: isCompact ? 32 : 40,
|
|
61
|
-
padding: 0,
|
|
62
|
-
transition: `background-color ${transitionDuration} ease-in-out,
|
|
63
|
-
border-color ${transitionDuration} ease-in-out`,
|
|
64
|
-
'::-webkit-scrollbar': {
|
|
65
|
-
height: 8,
|
|
66
|
-
width: 8
|
|
67
|
-
},
|
|
68
|
-
'::-webkit-scrollbar-corner': {
|
|
69
|
-
display: 'none'
|
|
70
|
-
},
|
|
71
|
-
':hover': {
|
|
72
|
-
'::-webkit-scrollbar-thumb': {
|
|
73
|
-
// scrollbars occur only if the user passes in a custom component with overflow: scroll
|
|
74
|
-
backgroundColor: 'rgba(0,0,0,0.2)'
|
|
75
|
-
},
|
|
76
|
-
cursor: 'pointer',
|
|
77
|
-
backgroundColor: backgroundColorHover,
|
|
78
|
-
borderColor: borderColorHover
|
|
79
|
-
},
|
|
80
|
-
'::-webkit-scrollbar-thumb:hover': {
|
|
81
|
-
backgroundColor: 'rgba(0,0,0,0.4)'
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
};
|
|
85
|
-
const Control = props => {
|
|
86
|
-
const {
|
|
87
|
-
children,
|
|
88
|
-
isDisabled,
|
|
89
|
-
isFocused,
|
|
90
|
-
innerRef,
|
|
91
|
-
innerProps,
|
|
92
|
-
menuIsOpen
|
|
93
|
-
} = props;
|
|
94
|
-
return jsx("div", _extends({
|
|
95
|
-
ref: innerRef
|
|
96
|
-
}, getStyleProps(props, 'control', {
|
|
97
|
-
control: true,
|
|
98
|
-
'control--is-disabled': isDisabled,
|
|
99
|
-
'control--is-focused': isFocused,
|
|
100
|
-
'control--menu-is-open': menuIsOpen
|
|
101
|
-
}), innerProps, {
|
|
102
|
-
"aria-disabled": isDisabled || undefined
|
|
103
|
-
}), children);
|
|
1
|
+
/* eslint-disable @repo/internal/react/no-unsafe-spread-props */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import Compiled, { css as compiledCSS } from '../compiled/components/control';
|
|
5
|
+
import Emotion, { css as emotionCSS } from '../emotion/components/control';
|
|
6
|
+
export const css = props => {
|
|
7
|
+
return fg('compiled-react-select') ? compiledCSS() : emotionCSS(props);
|
|
104
8
|
};
|
|
9
|
+
const Control = props => fg('compiled-react-select') ? /*#__PURE__*/React.createElement(Compiled, props) : /*#__PURE__*/React.createElement(Emotion, props);
|
|
105
10
|
|
|
106
11
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
107
12
|
export default Control;
|
|
@@ -1,59 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export const groupCSS = ({}) => ({
|
|
10
|
-
paddingBottom: "var(--ds-space-100, 8px)",
|
|
11
|
-
paddingTop: "var(--ds-space-100, 8px)"
|
|
12
|
-
});
|
|
13
|
-
const Group = props => {
|
|
14
|
-
const {
|
|
15
|
-
children,
|
|
16
|
-
cx,
|
|
17
|
-
getStyles,
|
|
18
|
-
getClassNames,
|
|
19
|
-
Heading,
|
|
20
|
-
headingProps,
|
|
21
|
-
innerProps,
|
|
22
|
-
label,
|
|
23
|
-
selectProps
|
|
24
|
-
} = props;
|
|
25
|
-
return jsx("div", _extends({}, getStyleProps(props, 'group', {
|
|
26
|
-
group: true
|
|
27
|
-
}), innerProps), jsx(Heading, _extends({}, headingProps, {
|
|
28
|
-
selectProps: selectProps,
|
|
29
|
-
getStyles: getStyles,
|
|
30
|
-
getClassNames: getClassNames,
|
|
31
|
-
cx: cx
|
|
32
|
-
}), label), jsx("div", null, children));
|
|
33
|
-
};
|
|
34
|
-
export const groupHeadingCSS = ({}) => ({
|
|
35
|
-
label: 'group',
|
|
36
|
-
cursor: 'default',
|
|
37
|
-
display: 'block',
|
|
38
|
-
marginBottom: '0.25em',
|
|
39
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
40
|
-
paddingRight: "var(--ds-space-150, 12px)",
|
|
41
|
-
font: "var(--ds-font-body-small, normal 400 11px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
42
|
-
color: "var(--ds-text-subtle, #44546F)",
|
|
43
|
-
fontWeight: "var(--ds-font-weight-bold, 700)",
|
|
44
|
-
textTransform: 'none'
|
|
45
|
-
});
|
|
1
|
+
/* eslint-disable @repo/internal/react/no-unsafe-spread-props */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import Compiled, { groupCSS as compiledGroupCSS, GroupHeading as CompiledGroupHeading, groupHeadingCSS as compiledGroupHeadingCSS } from '../compiled/components/group';
|
|
5
|
+
import Emotion, { groupCSS as emotionGroupCSS, GroupHeading as EmotionGroupHeading, groupHeadingCSS as emotionGroupHeadingCSS } from '../emotion/components/group';
|
|
6
|
+
export const groupCSS = props => fg('compiled-react-select') ? compiledGroupCSS() : emotionGroupCSS(props);
|
|
7
|
+
const Group = props => fg('compiled-react-select') ? /*#__PURE__*/React.createElement(Compiled, props) : /*#__PURE__*/React.createElement(Emotion, props);
|
|
8
|
+
export const groupHeadingCSS = props => fg('compiled-react-select') ? compiledGroupHeadingCSS() : emotionGroupHeadingCSS(props);
|
|
46
9
|
|
|
47
10
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
48
|
-
export const GroupHeading = props =>
|
|
49
|
-
const {
|
|
50
|
-
data,
|
|
51
|
-
...innerProps
|
|
52
|
-
} = cleanCommonProps(props);
|
|
53
|
-
return jsx("div", _extends({}, getStyleProps(props, 'groupHeading', {
|
|
54
|
-
'group-heading': true
|
|
55
|
-
}), innerProps));
|
|
56
|
-
};
|
|
11
|
+
export const GroupHeading = props => fg('compiled-react-select') ? /*#__PURE__*/React.createElement(CompiledGroupHeading, props) : /*#__PURE__*/React.createElement(EmotionGroupHeading, props);
|
|
57
12
|
|
|
58
13
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
59
14
|
export default Group;
|