@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,228 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
7
|
+
import { css, jsx } from '@emotion/react';
|
|
8
|
+
import LegacySelectClearIcon from '@atlaskit/icon/glyph/select-clear';
|
|
9
|
+
import CrossIcon from '@atlaskit/icon/utility/cross';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
11
|
+
import { Inline, xcss } from '@atlaskit/primitives';
|
|
12
|
+
import { getStyleProps } from '../../utils';
|
|
13
|
+
export const multiValueCSS = ({
|
|
14
|
+
isDisabled,
|
|
15
|
+
isFocused
|
|
16
|
+
}) => {
|
|
17
|
+
let backgroundColor;
|
|
18
|
+
let color;
|
|
19
|
+
if (isDisabled) {
|
|
20
|
+
// Use the basic neutral background so it is slightly separate from the
|
|
21
|
+
// field's background
|
|
22
|
+
backgroundColor = "var(--ds-background-neutral, #091E420F)";
|
|
23
|
+
color = "var(--ds-text-disabled, #091E424F)";
|
|
24
|
+
} else if (isFocused) {
|
|
25
|
+
backgroundColor = "var(--ds-background-selected, #E9F2FF)";
|
|
26
|
+
color = "var(--ds-text-selected, hsl(0, 0%, 20%))";
|
|
27
|
+
} else {
|
|
28
|
+
backgroundColor = fg('platform-component-visual-refresh') ? "var(--ds-background-neutral-subtle-hovered, #091E420F)" : "var(--ds-background-neutral, #091E420F)";
|
|
29
|
+
color = "var(--ds-text, hsl(0, 0%, 20%))";
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
label: 'multiValue',
|
|
33
|
+
display: 'flex',
|
|
34
|
+
minWidth: 0,
|
|
35
|
+
// resolves flex/text-overflow bug
|
|
36
|
+
margin: "var(--ds-space-025, 2px)",
|
|
37
|
+
borderRadius: "var(--ds-border-radius-050, 2px)",
|
|
38
|
+
backgroundColor,
|
|
39
|
+
boxShadow: isFocused ? `0 0 0 2px ${"var(--ds-surface, transparent)"}, 0 0 0 4px ${"var(--ds-border-focused, transparent)"}` : 'none',
|
|
40
|
+
maxWidth: '100%',
|
|
41
|
+
'@media screen and (-ms-high-contrast: active)': {
|
|
42
|
+
border: isFocused ? '1px solid transparent' : 'none'
|
|
43
|
+
},
|
|
44
|
+
color,
|
|
45
|
+
...(fg('platform-component-visual-refresh') && {
|
|
46
|
+
borderRadius: "var(--ds-border-radius-100, 4px)",
|
|
47
|
+
// Hardcode this color for visual refresh as there is no token color yet
|
|
48
|
+
borderColor: '#B7B9BE',
|
|
49
|
+
borderWidth: "var(--ds-border-width, 1px)",
|
|
50
|
+
borderStyle: 'solid',
|
|
51
|
+
backgroundColor: "var(--ds-background-input, #FFFFFF)"
|
|
52
|
+
})
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
export const multiValueLabelCSS = ({
|
|
56
|
+
cropWithEllipsis,
|
|
57
|
+
isDisabled
|
|
58
|
+
}) => ({
|
|
59
|
+
overflow: 'hidden',
|
|
60
|
+
textOverflow: cropWithEllipsis || cropWithEllipsis === undefined ? 'ellipsis' : undefined,
|
|
61
|
+
whiteSpace: 'nowrap',
|
|
62
|
+
borderRadius: "var(--ds-border-radius-050, 2px)",
|
|
63
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
64
|
+
fontSize: '85%',
|
|
65
|
+
font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
66
|
+
padding: "var(--ds-space-025, 2px)",
|
|
67
|
+
color: isDisabled ? "var(--ds-text-disabled, #091E424F)" : 'inherit',
|
|
68
|
+
paddingLeft: "var(--ds-space-075, 6px)",
|
|
69
|
+
...(fg('platform-component-visual-refresh') && {
|
|
70
|
+
font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, \"Helvetica Neue\", sans-serif)",
|
|
71
|
+
paddingTop: 0,
|
|
72
|
+
paddingBottom: 0,
|
|
73
|
+
paddingLeft: "var(--ds-space-050, 4px)"
|
|
74
|
+
})
|
|
75
|
+
});
|
|
76
|
+
export const multiValueRemoveCSS = ({
|
|
77
|
+
isFocused
|
|
78
|
+
}) => ({
|
|
79
|
+
alignItems: 'center',
|
|
80
|
+
display: 'flex',
|
|
81
|
+
backgroundColor: isFocused ? "var(--ds-UNSAFE-transparent, transparent)" : undefined,
|
|
82
|
+
fill: isFocused ? "var(--ds-text-selected, #000)" : "var(--ds-text, #000)",
|
|
83
|
+
paddingLeft: "var(--ds-space-025, 2px)",
|
|
84
|
+
paddingRight: "var(--ds-space-025, 2px)",
|
|
85
|
+
borderRadius: '0px 2px 2px 0px',
|
|
86
|
+
// DSP-6470 we should style like Tag once we have the :has selector
|
|
87
|
+
':hover': {
|
|
88
|
+
backgroundColor: "var(--ds-background-danger-hovered, #FFD5D2)",
|
|
89
|
+
fill: "var(--ds-text-danger, #000)"
|
|
90
|
+
},
|
|
91
|
+
':active': {
|
|
92
|
+
backgroundColor: "var(--ds-background-danger-pressed, #FD9891)",
|
|
93
|
+
fill: "var(--ds-text-danger, #000)"
|
|
94
|
+
},
|
|
95
|
+
...(fg('platform-component-visual-refresh') && {
|
|
96
|
+
backgroundColor: "var(--ds-background-neutral-subtle, #00000000)",
|
|
97
|
+
border: 'none',
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
justifyContent: 'center',
|
|
100
|
+
alignSelf: 'center',
|
|
101
|
+
appearance: 'none',
|
|
102
|
+
borderRadius: "var(--ds-border-radius, 4px)",
|
|
103
|
+
color: "var(--ds-text, #172B4D)",
|
|
104
|
+
padding: "var(--ds-space-025, 2px)",
|
|
105
|
+
marginRight: "var(--ds-space-025, 2px)",
|
|
106
|
+
':focus-visible': {
|
|
107
|
+
outlineOffset: "var(--ds-space-negative-025, -2px)"
|
|
108
|
+
},
|
|
109
|
+
':hover': {
|
|
110
|
+
backgroundColor: "var(--ds-background-neutral-subtle-hovered, #091E420F)"
|
|
111
|
+
},
|
|
112
|
+
':active': {
|
|
113
|
+
backgroundColor: "var(--ds-background-neutral-subtle-pressed, #091E4224)"
|
|
114
|
+
}
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
118
|
+
const MultiValueGeneric = ({
|
|
119
|
+
children,
|
|
120
|
+
innerProps
|
|
121
|
+
}) => jsx("div", innerProps, children);
|
|
122
|
+
|
|
123
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
124
|
+
export const MultiValueContainer = MultiValueGeneric;
|
|
125
|
+
|
|
126
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
127
|
+
export const MultiValueLabel = MultiValueGeneric;
|
|
128
|
+
const disabledStyles = css({
|
|
129
|
+
display: 'none'
|
|
130
|
+
});
|
|
131
|
+
const enabledStyles = css({
|
|
132
|
+
display: 'inherit'
|
|
133
|
+
});
|
|
134
|
+
const iconWrapperStyles = xcss({
|
|
135
|
+
padding: 'space.025'
|
|
136
|
+
});
|
|
137
|
+
const renderIcon = () => {
|
|
138
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
139
|
+
if (fg('platform-component-visual-refresh')) {
|
|
140
|
+
return jsx(CrossIcon, {
|
|
141
|
+
label: "",
|
|
142
|
+
color: "currentColor"
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// eslint-disable-next-line @atlaskit/platform/ensure-feature-flag-prefix
|
|
147
|
+
if (fg('platform-visual-refresh-icons-legacy-facade')) {
|
|
148
|
+
return jsx(Inline, {
|
|
149
|
+
xcss: iconWrapperStyles
|
|
150
|
+
}, jsx(CrossIcon, {
|
|
151
|
+
label: "",
|
|
152
|
+
color: "currentColor"
|
|
153
|
+
}));
|
|
154
|
+
}
|
|
155
|
+
return (
|
|
156
|
+
// eslint-disable-next-line @atlaskit/design-system/no-legacy-icons
|
|
157
|
+
jsx(LegacySelectClearIcon, {
|
|
158
|
+
label: "",
|
|
159
|
+
primaryColor: "transparent",
|
|
160
|
+
size: "small",
|
|
161
|
+
secondaryColor: "inherit"
|
|
162
|
+
})
|
|
163
|
+
);
|
|
164
|
+
};
|
|
165
|
+
export function MultiValueRemove({
|
|
166
|
+
isDisabled,
|
|
167
|
+
innerProps
|
|
168
|
+
}) {
|
|
169
|
+
return (
|
|
170
|
+
// The Remove button is intentionally excluded from the tab order, please avoid assigning a non-negative tabIndex to it. Context: https://hello.atlassian.net/wiki/spaces/A11YKB/pages/3031993460/Clear+Options+on+an+Input+Field
|
|
171
|
+
jsx("div", innerProps, jsx("div", {
|
|
172
|
+
css: isDisabled ? disabledStyles : enabledStyles,
|
|
173
|
+
"data-testid": isDisabled ? 'hide-clear-icon' : 'show-clear-icon'
|
|
174
|
+
}, renderIcon()))
|
|
175
|
+
);
|
|
176
|
+
}
|
|
177
|
+
const MultiValue = props => {
|
|
178
|
+
const {
|
|
179
|
+
children,
|
|
180
|
+
components,
|
|
181
|
+
data,
|
|
182
|
+
innerProps,
|
|
183
|
+
isDisabled,
|
|
184
|
+
removeProps,
|
|
185
|
+
selectProps
|
|
186
|
+
} = props;
|
|
187
|
+
const {
|
|
188
|
+
Container,
|
|
189
|
+
Label,
|
|
190
|
+
Remove
|
|
191
|
+
} = components;
|
|
192
|
+
const ariaLabel = typeof children === 'string' ? children : data.label;
|
|
193
|
+
return jsx(Container, {
|
|
194
|
+
data: data,
|
|
195
|
+
innerProps: {
|
|
196
|
+
...getStyleProps(props, 'multiValue', {
|
|
197
|
+
'multi-value': true,
|
|
198
|
+
'multi-value--is-disabled': isDisabled
|
|
199
|
+
}),
|
|
200
|
+
...innerProps
|
|
201
|
+
},
|
|
202
|
+
selectProps: selectProps
|
|
203
|
+
}, jsx(Label, {
|
|
204
|
+
data: data,
|
|
205
|
+
innerProps: {
|
|
206
|
+
...getStyleProps(props, 'multiValueLabel', {
|
|
207
|
+
'multi-value__label': true
|
|
208
|
+
})
|
|
209
|
+
},
|
|
210
|
+
selectProps: selectProps
|
|
211
|
+
}, children), jsx(Remove, {
|
|
212
|
+
data: data,
|
|
213
|
+
innerProps: {
|
|
214
|
+
...getStyleProps(props, 'multiValueRemove', {
|
|
215
|
+
'multi-value__remove': true
|
|
216
|
+
}),
|
|
217
|
+
role: 'button',
|
|
218
|
+
tabIndex: -1,
|
|
219
|
+
'aria-label': `${ariaLabel || 'option'}, remove`,
|
|
220
|
+
...removeProps
|
|
221
|
+
},
|
|
222
|
+
isDisabled: isDisabled,
|
|
223
|
+
selectProps: selectProps
|
|
224
|
+
}));
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
228
|
+
export default MultiValue;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
|
+
import { getStyleProps } from '../../utils';
|
|
10
|
+
export const optionCSS = ({
|
|
11
|
+
isDisabled,
|
|
12
|
+
isFocused,
|
|
13
|
+
isSelected
|
|
14
|
+
}) => {
|
|
15
|
+
let color = "var(--ds-text, #172B4D)";
|
|
16
|
+
if (isDisabled) {
|
|
17
|
+
color = "var(--ds-text-disabled, #091E424F)";
|
|
18
|
+
} else if (isSelected) {
|
|
19
|
+
color = "var(--ds-text-selected, #0C66E4)";
|
|
20
|
+
}
|
|
21
|
+
let boxShadow;
|
|
22
|
+
let backgroundColor;
|
|
23
|
+
if (isDisabled) {
|
|
24
|
+
backgroundColor = undefined;
|
|
25
|
+
} else if (isSelected && isFocused) {
|
|
26
|
+
backgroundColor = "var(--ds-background-selected-hovered, #CCE0FF)";
|
|
27
|
+
} else if (isSelected) {
|
|
28
|
+
backgroundColor = "var(--ds-background-selected, #E9F2FF)";
|
|
29
|
+
} else if (isFocused) {
|
|
30
|
+
backgroundColor = "var(--ds-background-neutral-subtle-hovered, #091E420F)";
|
|
31
|
+
}
|
|
32
|
+
if (!isDisabled && (isFocused || isSelected)) {
|
|
33
|
+
boxShadow = `inset 2px 0px 0px ${"var(--ds-border-selected, #0C66E4)"}`;
|
|
34
|
+
}
|
|
35
|
+
const cursor = isDisabled ? 'not-allowed' : 'default';
|
|
36
|
+
return {
|
|
37
|
+
label: 'option',
|
|
38
|
+
display: 'block',
|
|
39
|
+
// eslint-disable-next-line @atlaskit/design-system/use-tokens-typography
|
|
40
|
+
fontSize: 'inherit',
|
|
41
|
+
width: '100%',
|
|
42
|
+
userSelect: 'none',
|
|
43
|
+
WebkitTapHighlightColor: 'rgba(0, 0, 0, 0)',
|
|
44
|
+
padding: `${"var(--ds-space-075, 6px)"} ${"var(--ds-space-150, 12px)"}`,
|
|
45
|
+
backgroundColor,
|
|
46
|
+
color,
|
|
47
|
+
cursor,
|
|
48
|
+
boxShadow,
|
|
49
|
+
':active': {
|
|
50
|
+
backgroundColor: !isDisabled ? isSelected ? "var(--ds-background-selected-pressed, #85B8FF)" : "var(--ds-background-neutral-subtle-pressed, #091E4224)" : undefined
|
|
51
|
+
},
|
|
52
|
+
'@media screen and (-ms-high-contrast: active)': {
|
|
53
|
+
borderLeft: !isDisabled && (isFocused || isSelected) ? '2px solid transparent' : ''
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
const Option = props => {
|
|
58
|
+
const {
|
|
59
|
+
children,
|
|
60
|
+
isDisabled,
|
|
61
|
+
isFocused,
|
|
62
|
+
isSelected,
|
|
63
|
+
innerRef,
|
|
64
|
+
innerProps
|
|
65
|
+
} = props;
|
|
66
|
+
return jsx("div", _extends({}, getStyleProps(props, 'option', {
|
|
67
|
+
option: true,
|
|
68
|
+
'option--is-disabled': isDisabled,
|
|
69
|
+
'option--is-focused': isFocused,
|
|
70
|
+
'option--is-selected': isSelected
|
|
71
|
+
}), {
|
|
72
|
+
ref: innerRef
|
|
73
|
+
}, innerProps, {
|
|
74
|
+
tabIndex: -1
|
|
75
|
+
}), children);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
79
|
+
export default Option;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
|
+
import { getStyleProps } from '../../utils';
|
|
10
|
+
export const placeholderCSS = ({
|
|
11
|
+
isDisabled
|
|
12
|
+
}) => ({
|
|
13
|
+
label: 'placeholder',
|
|
14
|
+
gridArea: '1 / 1 / 2 / 3',
|
|
15
|
+
margin: `0 ${"var(--ds-space-025, 2px)"}`,
|
|
16
|
+
color: isDisabled ? "var(--ds-text-disabled, #091E424F)" : "var(--ds-text-subtlest, #626F86)"
|
|
17
|
+
});
|
|
18
|
+
const Placeholder = props => {
|
|
19
|
+
const {
|
|
20
|
+
children,
|
|
21
|
+
innerProps
|
|
22
|
+
} = props;
|
|
23
|
+
return jsx("div", _extends({}, getStyleProps(props, 'placeholder', {
|
|
24
|
+
placeholder: true
|
|
25
|
+
}), innerProps), children);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
29
|
+
export default Placeholder;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
2
|
+
/**
|
|
3
|
+
* @jsxRuntime classic
|
|
4
|
+
* @jsx jsx
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled
|
|
8
|
+
import { jsx } from '@emotion/react';
|
|
9
|
+
import { getStyleProps } from '../../utils';
|
|
10
|
+
export const css = ({
|
|
11
|
+
isDisabled
|
|
12
|
+
}) => ({
|
|
13
|
+
label: 'singleValue',
|
|
14
|
+
gridArea: '1 / 1 / 2 / 3',
|
|
15
|
+
maxWidth: '100%',
|
|
16
|
+
overflow: 'hidden',
|
|
17
|
+
textOverflow: 'ellipsis',
|
|
18
|
+
whiteSpace: 'nowrap',
|
|
19
|
+
margin: `0 ${"var(--ds-space-025, 2px)"}`,
|
|
20
|
+
color: isDisabled ? "var(--ds-text-disabled, #091E424F)" : "var(--ds-text, #172B4D)"
|
|
21
|
+
});
|
|
22
|
+
const SingleValue = props => {
|
|
23
|
+
const {
|
|
24
|
+
children,
|
|
25
|
+
isDisabled,
|
|
26
|
+
innerProps
|
|
27
|
+
} = props;
|
|
28
|
+
return jsx("div", _extends({}, getStyleProps(props, 'singleValue', {
|
|
29
|
+
'single-value': true,
|
|
30
|
+
'single-value--is-disabled': isDisabled
|
|
31
|
+
}), innerProps), children);
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
35
|
+
export default SingleValue;
|
package/dist/es2019/utils.js
CHANGED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
._11c81ixg{font:var(--ds-font-body-large,normal 400 1pc/24px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._11c82smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
3
|
+
._16jlkb7n{flex-grow:1}
|
|
4
|
+
._18m915vq{overflow-y:hidden}
|
|
5
|
+
._19bv12x7{padding-left:var(--ds-space-075,6px)}
|
|
6
|
+
._1e0c11p5{display:grid}
|
|
7
|
+
._1e0c1txw{display:flex}
|
|
8
|
+
._1eim1xrj{direction:rtl}
|
|
9
|
+
._1n261g80{flex-wrap:wrap}
|
|
10
|
+
._1o9zidpf{flex-shrink:0}
|
|
11
|
+
._1o9zkb7n{flex-shrink:1}
|
|
12
|
+
._1reo15vq{overflow-x:hidden}
|
|
13
|
+
._1wpz1fhb{align-self:stretch}
|
|
14
|
+
._4cvr1h6o{align-items:center}
|
|
15
|
+
._80om13gf{cursor:not-allowed}
|
|
16
|
+
._8am5i4x0{-webkit-overflow-scrolling:touch}
|
|
17
|
+
._ca0qidpf{padding-top:0}
|
|
18
|
+
._ca0qv77o{padding-top:var(--ds-space-025,2px)}
|
|
19
|
+
._i0dlf1ug{flex-basis:0%}
|
|
20
|
+
._kqswh2mm{position:relative}
|
|
21
|
+
._lcxv1rj4{pointer-events:all}
|
|
22
|
+
._n3tdidpf{padding-bottom:0}
|
|
23
|
+
._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
|
|
24
|
+
._u5f312x7{padding-right:var(--ds-space-075,6px)}
|
|
25
|
+
._y4ti1b66{padding-inline-end:var(--ds-space-050,4px)}
|
|
26
|
+
@media (min-width:30rem){._1tn22smr{font:var(--ds-font-body,normal 400 14px/20px ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/* containers.tsx generated by @compiled/babel-plugin v0.36.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 '../../utils';
|
|
9
|
+
|
|
10
|
+
// ==============================
|
|
11
|
+
// Root Container
|
|
12
|
+
// ==============================
|
|
13
|
+
|
|
14
|
+
export var containerCSS = function containerCSS() {
|
|
15
|
+
return {};
|
|
16
|
+
};
|
|
17
|
+
var containerStyles = {
|
|
18
|
+
default: "_11c82smr _kqswh2mm _lcxv1rj4",
|
|
19
|
+
rtl: "_1eim1xrj",
|
|
20
|
+
disabled: "_80om13gf",
|
|
21
|
+
ff_safari_input_fix: "_11c81ixg _1tn22smr"
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
25
|
+
export var SelectContainer = function SelectContainer(props) {
|
|
26
|
+
var children = props.children,
|
|
27
|
+
innerProps = props.innerProps,
|
|
28
|
+
isDisabled = props.isDisabled,
|
|
29
|
+
isRtl = props.isRtl,
|
|
30
|
+
xcss = props.xcss;
|
|
31
|
+
var _getStyleProps = getStyleProps(props, 'container', {
|
|
32
|
+
'--is-disabled': isDisabled,
|
|
33
|
+
'--is-rtl': isRtl
|
|
34
|
+
}),
|
|
35
|
+
className = _getStyleProps.className,
|
|
36
|
+
css = _getStyleProps.css;
|
|
37
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
38
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
39
|
+
className: ax([containerStyles.default, isRtl && containerStyles.rtl, isDisabled && containerStyles.disabled, fg('platform_design_system_team_safari_input_fix') && containerStyles.ff_safari_input_fix, cx(className, xcss)])
|
|
40
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
41
|
+
,
|
|
42
|
+
style: css
|
|
43
|
+
}, innerProps), children);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
// ==============================
|
|
47
|
+
// Value Container
|
|
48
|
+
// ==============================
|
|
49
|
+
|
|
50
|
+
export var valueContainerCSS = function valueContainerCSS() {
|
|
51
|
+
return {};
|
|
52
|
+
};
|
|
53
|
+
var valueContainerStyles = {
|
|
54
|
+
default: "_16jlkb7n _1o9zkb7n _i0dlf1ug _1reo15vq _18m915vq _4cvr1h6o _1e0c11p5 _1n261g80 _8am5i4x0 _kqswh2mm _ca0qv77o _u5f312x7 _n3tdv77o _19bv12x7",
|
|
55
|
+
flex: "_1e0c1txw",
|
|
56
|
+
compact: "_ca0qidpf _u5f312x7 _n3tdidpf _19bv12x7"
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
60
|
+
export var ValueContainer = function ValueContainer(props) {
|
|
61
|
+
var children = props.children,
|
|
62
|
+
innerProps = props.innerProps,
|
|
63
|
+
isMulti = props.isMulti,
|
|
64
|
+
hasValue = props.hasValue,
|
|
65
|
+
isCompact = props.isCompact,
|
|
66
|
+
xcss = props.xcss,
|
|
67
|
+
controlShouldRenderValue = props.selectProps.controlShouldRenderValue;
|
|
68
|
+
var _getStyleProps2 = getStyleProps(props, 'valueContainer', {
|
|
69
|
+
'value-container': true,
|
|
70
|
+
'value-container--is-multi': isMulti,
|
|
71
|
+
'value-container--has-value': hasValue
|
|
72
|
+
}),
|
|
73
|
+
css = _getStyleProps2.css,
|
|
74
|
+
className = _getStyleProps2.className;
|
|
75
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
76
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
77
|
+
className: ax([valueContainerStyles.default, isMulti && hasValue && controlShouldRenderValue && valueContainerStyles.flex, isCompact && valueContainerStyles.compact, cx(className || 'value-container', xcss)])
|
|
78
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
79
|
+
,
|
|
80
|
+
style: css
|
|
81
|
+
}, innerProps), children);
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
// ==============================
|
|
85
|
+
// Indicator Container
|
|
86
|
+
// ==============================
|
|
87
|
+
|
|
88
|
+
export var indicatorsContainerCSS = function indicatorsContainerCSS() {
|
|
89
|
+
return {};
|
|
90
|
+
};
|
|
91
|
+
var indicatorContainerStyles = null;
|
|
92
|
+
|
|
93
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
94
|
+
export var IndicatorsContainer = function IndicatorsContainer(props) {
|
|
95
|
+
var children = props.children,
|
|
96
|
+
innerProps = props.innerProps,
|
|
97
|
+
xcss = props.xcss;
|
|
98
|
+
var _getStyleProps3 = getStyleProps(props, 'indicatorsContainer', {
|
|
99
|
+
indicators: true
|
|
100
|
+
}),
|
|
101
|
+
css = _getStyleProps3.css,
|
|
102
|
+
className = _getStyleProps3.className;
|
|
103
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
104
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
105
|
+
style: css
|
|
106
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
107
|
+
,
|
|
108
|
+
className: ax(["_1e0c1txw _4cvr1h6o _1o9zidpf _1wpz1fhb _y4ti1b66", cx(className, xcss)])
|
|
109
|
+
}, innerProps), children);
|
|
110
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
|
|
2
|
+
._2rkosqtm{border-radius:var(--ds-border-radius-100,3px)}
|
|
3
|
+
._v564r5cv{transition:background-color .2s ease-in-out,border-color .2s ease-in-out}
|
|
4
|
+
._189ee4h9{border-width:var(--ds-border-width,1px)}
|
|
5
|
+
._1dqonqa1{border-style:solid}
|
|
6
|
+
._1h6d1bqt{border-color:var(--ds-border-danger,#e2483d)}
|
|
7
|
+
._1h6d1elr{border-color:var(--ds-border-input,#8590a2)}
|
|
8
|
+
._1h6d1j28{border-color:transparent}
|
|
9
|
+
._1h6d1p6i{border-color:var(--ds-border-focused,#388bff)}
|
|
10
|
+
._1h6dsyzs{border-color:var(--ds-background-disabled,#091e4208)}._123byq51:hover::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.2)}
|
|
11
|
+
._12ji1r31{outline-color:currentColor}
|
|
12
|
+
._12y3idpf{outline-width:0}
|
|
13
|
+
._15peftgi::-webkit-scrollbar{height:8px}
|
|
14
|
+
._16qsizbr{box-shadow:inset 0 0 0 var(--ds-border-width,1px) var(--ds-border-danger,#e2483d)}
|
|
15
|
+
._16qsq049{box-shadow:inset 0 0 0 var(--ds-border-width,1px) var(--ds-border-focused,#388bff)}
|
|
16
|
+
._19bvidpf{padding-left:0}
|
|
17
|
+
._1bah1yb4{justify-content:space-between}
|
|
18
|
+
._1e0c1txw{display:flex}
|
|
19
|
+
._1ke8ftgi::-webkit-scrollbar{width:8px}
|
|
20
|
+
._1n261g80{flex-wrap:wrap}
|
|
21
|
+
._1qu2glyw{outline-style:none}
|
|
22
|
+
._1tke1ylp{min-height:40px}
|
|
23
|
+
._1tkezwfg{min-height:2pc}
|
|
24
|
+
._4cvr1h6o{align-items:center}
|
|
25
|
+
._80om73ad{cursor:default}
|
|
26
|
+
._bfhk1j28{background-color:transparent}
|
|
27
|
+
._bfhk1j9a{background-color:var(--ds-background-input,#fff)}
|
|
28
|
+
._bfhkr01l{background-color:var(--ds-background-input-pressed,#fff)}
|
|
29
|
+
._bfhksyzs{background-color:var(--ds-background-disabled,#091e4208)}
|
|
30
|
+
._bfhkvuon{background-color:var(--ds-surface,#fff)}
|
|
31
|
+
._ca0qidpf{padding-top:0}
|
|
32
|
+
._jaboglyw::-webkit-scrollbar-corner{display:none}
|
|
33
|
+
._jqf6y3o9{label:control}
|
|
34
|
+
._kqswh2mm{position:relative}
|
|
35
|
+
._lcxvglyw{pointer-events:none}
|
|
36
|
+
._n3tdidpf{padding-bottom:0}
|
|
37
|
+
._u5f3idpf{padding-right:0}
|
|
38
|
+
._1u6l1bml:focus-within{box-shadow:inset 0 0 0 var(--ds-border-width,1px) var(--ds-border-input,#8590a2)}
|
|
39
|
+
._1u6l3sij:focus-within{box-shadow:inset 0 0 0 var(--ds-border-width,1px) transparent}
|
|
40
|
+
._1u6lizbr:focus-within{box-shadow:inset 0 0 0 var(--ds-border-width,1px) var(--ds-border-danger,#e2483d)}
|
|
41
|
+
._1u6llkwx:focus-within{box-shadow:inset 0 0 0 var(--ds-border-width,1px) var(--ds-background-disabled,#091e4208)}
|
|
42
|
+
._1u6lq049:focus-within{box-shadow:inset 0 0 0 var(--ds-border-width,1px) var(--ds-border-focused,#388bff)}
|
|
43
|
+
._4cvx1bqt:hover{border-color:var(--ds-border-danger,#e2483d)}
|
|
44
|
+
._4cvx1elr:hover{border-color:var(--ds-border-input,#8590a2)}
|
|
45
|
+
._4cvx1j28:hover{border-color:transparent}
|
|
46
|
+
._4cvx1p6i:hover{border-color:var(--ds-border-focused,#388bff)}
|
|
47
|
+
._1ogl1caj::-webkit-scrollbar-thumb:hover{background-color:rgba(0,0,0,.4)}
|
|
48
|
+
._d0altlke:hover{cursor:pointer}
|
|
49
|
+
._irr31d5g:hover{background-color:var(--ds-background-input-hovered,#f7f8f9)}
|
|
50
|
+
._irr31j28:hover{background-color:transparent}
|
|
51
|
+
._irr3r01l:hover{background-color:var(--ds-background-input-pressed,#fff)}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* control.tsx generated by @compiled/babel-plugin v0.36.1 */
|
|
2
|
+
import _extends from "@babel/runtime/helpers/extends";
|
|
3
|
+
import "./control.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
/* eslint-disable @atlaskit/ui-styling-standard/no-unsafe-selectors */
|
|
7
|
+
|
|
8
|
+
import { cx } from '@compiled/react';
|
|
9
|
+
import { getStyleProps } from '../../utils';
|
|
10
|
+
var styles = {
|
|
11
|
+
default: "_12ji1r31 _1qu2glyw _12y3idpf _2rkosqtm _ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _v564r5cv _1h6d1elr _1dqonqa1 _189ee4h9 _jqf6y3o9 _4cvr1h6o _80om73ad _1e0c1txw _1n261g80 _1bah1yb4 _kqswh2mm _bfhk1j9a _1tke1ylp _15peftgi _1ke8ftgi _jaboglyw _1u6l1bml _4cvx1elr _123byq51 _d0altlke _irr31d5g _1ogl1caj",
|
|
12
|
+
compact: "_1tkezwfg",
|
|
13
|
+
invalid: "_1h6d1bqt _16qsizbr _1u6lizbr _4cvx1bqt",
|
|
14
|
+
focusedInvalid: "_16qsq049",
|
|
15
|
+
disabled: "_1h6dsyzs _lcxvglyw _bfhksyzs _1u6llkwx",
|
|
16
|
+
focused: "_1h6d1p6i _bfhkr01l _1u6lq049 _4cvx1p6i _irr3r01l",
|
|
17
|
+
subtle: "_1h6d1j28 _bfhk1j28 _1u6l3sij",
|
|
18
|
+
subtleFocused: "_bfhkvuon",
|
|
19
|
+
none: "_1h6d1j28 _bfhk1j28 _1u6l3sij _4cvx1j28 _irr31j28"
|
|
20
|
+
};
|
|
21
|
+
export var css = function css() {
|
|
22
|
+
return {};
|
|
23
|
+
};
|
|
24
|
+
var Control = function Control(props) {
|
|
25
|
+
var children = props.children,
|
|
26
|
+
appearance = props.appearance,
|
|
27
|
+
isCompact = props.isCompact,
|
|
28
|
+
isDisabled = props.isDisabled,
|
|
29
|
+
isFocused = props.isFocused,
|
|
30
|
+
isInvalid = props.isInvalid,
|
|
31
|
+
innerRef = props.innerRef,
|
|
32
|
+
innerProps = props.innerProps,
|
|
33
|
+
menuIsOpen = props.menuIsOpen,
|
|
34
|
+
xcss = props.xcss;
|
|
35
|
+
var _getStyleProps = getStyleProps(props, 'control', {
|
|
36
|
+
control: true,
|
|
37
|
+
'control--is-disabled': isDisabled,
|
|
38
|
+
'control--is-focused': isFocused,
|
|
39
|
+
'control--menu-is-open': menuIsOpen
|
|
40
|
+
}),
|
|
41
|
+
css = _getStyleProps.css,
|
|
42
|
+
className = _getStyleProps.className;
|
|
43
|
+
return /*#__PURE__*/React.createElement("div", _extends({
|
|
44
|
+
ref: innerRef
|
|
45
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop, @atlaskit/ui-styling-standard/local-cx-xcss, @compiled/local-cx-xcss
|
|
46
|
+
,
|
|
47
|
+
className: ax([styles.default, isDisabled && styles.disabled, isInvalid && styles.invalid, isCompact && styles.compact, appearance === 'subtle' && styles.subtle, appearance === 'subtle' && isFocused && styles.subtleFocused, isFocused && styles.focused, appearance === 'none' && styles.none, cx(className, xcss)])
|
|
48
|
+
// eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
|
|
49
|
+
,
|
|
50
|
+
style: css
|
|
51
|
+
}, innerProps, {
|
|
52
|
+
"aria-disabled": isDisabled || undefined
|
|
53
|
+
}), children);
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
57
|
+
export default Control;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
._11c81o8v{font:var(--ds-font-body-small,normal 400 11px/1pc ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Ubuntu,"Helvetica Neue",sans-serif)}
|
|
2
|
+
._1e0c1ule{display:block}
|
|
3
|
+
._1p1dglyw{text-transform:none}
|
|
4
|
+
._6rthpd1z{margin-block-end:.25em}
|
|
5
|
+
._80om73ad{cursor:default}
|
|
6
|
+
._bozgutpp{padding-inline-start:var(--ds-space-150,9pt)}
|
|
7
|
+
._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
|
|
8
|
+
._jqf6dpkn{label:group}
|
|
9
|
+
._k48pmoej{font-weight:var(--ds-font-weight-bold,700)}
|
|
10
|
+
._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
|
|
11
|
+
._syaz1gjq{color:var(--ds-text-subtle,#44546f)}
|
|
12
|
+
._y4tiutpp{padding-inline-end:var(--ds-space-150,9pt)}
|