@pingux/astro 2.239.0-alpha.0 → 2.241.0-alpha.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/lib/cjs/components/Input/Input.styles.js +1 -1
- package/lib/cjs/components/LinkSelectField/LinkSelectField.d.ts +4 -0
- package/lib/cjs/components/LinkSelectField/LinkSelectField.js +3 -86
- package/lib/cjs/components/LinkSelectField/index.d.ts +1 -0
- package/lib/cjs/components/ListBox/Option.js +21 -7
- package/lib/cjs/components/MultivaluesField/BadgeLabelTooltip.js +1 -0
- package/lib/cjs/components/MultivaluesField/CondensedMultivaluesField.js +6 -4
- package/lib/cjs/components/MultivaluesField/DefaultMultivaluesField.js +5 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.d.ts +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/colors.js +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.d.ts +13 -3
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/badges.js +20 -10
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/forms.js +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/input.js +1 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/text.js +1 -1
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.d.ts +3 -0
- package/lib/cjs/styles/themeOverrides/nextGenDarkMode/variants/variants.js +3 -0
- package/lib/cjs/styles/themes/next-gen/forms.js +1 -1
- package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +30 -28
- package/lib/cjs/styles/themes/next-gen/variants/badges.d.ts +26 -27
- package/lib/cjs/styles/themes/next-gen/variants/badges.js +24 -8
- package/lib/cjs/styles/themes/next-gen/variants/input.js +4 -3
- package/lib/cjs/styles/themes/next-gen/variants/text.js +1 -1
- package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +4 -1
- package/lib/cjs/styles/themes/next-gen/variants/variants.js +4 -1
- package/lib/cjs/types/index.d.ts +1 -0
- package/lib/cjs/types/index.js +11 -0
- package/lib/cjs/types/linkSelectField.d.ts +111 -0
- package/lib/cjs/types/linkSelectField.js +5 -0
- package/lib/components/Input/Input.styles.js +1 -1
- package/lib/components/LinkSelectField/LinkSelectField.js +5 -88
- package/lib/components/ListBox/Option.js +21 -7
- package/lib/components/MultivaluesField/BadgeLabelTooltip.js +1 -0
- package/lib/components/MultivaluesField/CondensedMultivaluesField.js +6 -4
- package/lib/components/MultivaluesField/DefaultMultivaluesField.js +5 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/colors.js +1 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/badges.js +20 -10
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/forms.js +1 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/input.js +1 -0
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/text.js +1 -1
- package/lib/styles/themeOverrides/nextGenDarkMode/variants/variants.js +3 -0
- package/lib/styles/themes/next-gen/forms.js +1 -1
- package/lib/styles/themes/next-gen/variants/badges.js +24 -8
- package/lib/styles/themes/next-gen/variants/input.js +4 -3
- package/lib/styles/themes/next-gen/variants/text.js +1 -1
- package/lib/styles/themes/next-gen/variants/variants.js +4 -1
- package/lib/types/index.js +1 -0
- package/lib/types/linkSelectField.js +1 -0
- package/package.json +1 -1
|
@@ -154,8 +154,9 @@ input.multivaluesWrapper = {
|
|
|
154
154
|
borderWidth: 1,
|
|
155
155
|
flexDirection: 'row !important',
|
|
156
156
|
flexWrap: 'wrap',
|
|
157
|
+
rowGap: 'xs',
|
|
157
158
|
pt: 6,
|
|
158
|
-
pr:
|
|
159
|
+
pr: 12,
|
|
159
160
|
pb: 5,
|
|
160
161
|
pl: 12,
|
|
161
162
|
borderRadius: _onyxTokens.astroTokens.radius.input,
|
|
@@ -166,7 +167,7 @@ input.multivaluesWrapper = {
|
|
|
166
167
|
flex: 1,
|
|
167
168
|
height: 27,
|
|
168
169
|
lineHeight: '100%',
|
|
169
|
-
p:
|
|
170
|
+
p: 0,
|
|
170
171
|
'&.is-focused': {
|
|
171
172
|
boxShadow: 'none',
|
|
172
173
|
outline: 'none'
|
|
@@ -176,7 +177,7 @@ input.multivaluesWrapper = {
|
|
|
176
177
|
...defaultFocus
|
|
177
178
|
},
|
|
178
179
|
'&.is-error': {
|
|
179
|
-
borderColor:
|
|
180
|
+
borderColor: _onyxTokens.astroTokens.color.red.base
|
|
180
181
|
},
|
|
181
182
|
'&.is-read-only': {
|
|
182
183
|
alignItems: 'center',
|
|
@@ -903,12 +903,15 @@ declare const _default: {
|
|
|
903
903
|
};
|
|
904
904
|
option: {
|
|
905
905
|
py: string;
|
|
906
|
-
pl:
|
|
906
|
+
pl: number;
|
|
907
907
|
pr: number;
|
|
908
908
|
justifyContent: string;
|
|
909
909
|
borderRadius: number;
|
|
910
910
|
lineHeight: string;
|
|
911
911
|
color: string;
|
|
912
|
+
'&.is-disabled': {
|
|
913
|
+
color: string;
|
|
914
|
+
};
|
|
912
915
|
'&.is-focused': {
|
|
913
916
|
color: string;
|
|
914
917
|
bg: string;
|
|
@@ -177,12 +177,15 @@ const listBox = {
|
|
|
177
177
|
},
|
|
178
178
|
option: {
|
|
179
179
|
py: 'md-s',
|
|
180
|
-
pl:
|
|
180
|
+
pl: _onyxTokens.astroTokens.spacing.md,
|
|
181
181
|
pr: _onyxTokens.astroTokens.spacing.md,
|
|
182
182
|
justifyContent: 'space-between',
|
|
183
183
|
borderRadius: _onyxTokens.astroTokens.radius.md,
|
|
184
184
|
lineHeight: 'body',
|
|
185
185
|
color: _onyxTokens.astroTokens.color.common.menu.item.text,
|
|
186
|
+
'&.is-disabled': {
|
|
187
|
+
color: _onyxTokens.astroTokens.color.gray[700]
|
|
188
|
+
},
|
|
186
189
|
'&.is-focused': {
|
|
187
190
|
color: _onyxTokens.astroTokens.color.common.menu.item.hover.text,
|
|
188
191
|
bg: 'gray-100',
|
package/lib/cjs/types/index.d.ts
CHANGED
package/lib/cjs/types/index.js
CHANGED
|
@@ -509,6 +509,17 @@ Object.keys(_link).forEach(function (key) {
|
|
|
509
509
|
}
|
|
510
510
|
});
|
|
511
511
|
});
|
|
512
|
+
var _linkSelectField = require("./linkSelectField");
|
|
513
|
+
Object.keys(_linkSelectField).forEach(function (key) {
|
|
514
|
+
if (key === "default" || key === "__esModule") return;
|
|
515
|
+
if (key in exports && exports[key] === _linkSelectField[key]) return;
|
|
516
|
+
Object.defineProperty(exports, key, {
|
|
517
|
+
enumerable: true,
|
|
518
|
+
get: function () {
|
|
519
|
+
return _linkSelectField[key];
|
|
520
|
+
}
|
|
521
|
+
});
|
|
522
|
+
});
|
|
512
523
|
var _listBox = require("./listBox");
|
|
513
524
|
Object.keys(_listBox).forEach(function (key) {
|
|
514
525
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
import { UseSelectFieldProps } from '../hooks/useSelectField/useSelectField';
|
|
2
|
+
import { IconProps } from './icon';
|
|
3
|
+
import { Status } from './item';
|
|
4
|
+
export interface LinkSelectFieldProps extends Omit<UseSelectFieldProps<object>, 'align' | 'helperText' | 'label'> {
|
|
5
|
+
/** Alignment of the popover menu relative to the trigger. */
|
|
6
|
+
align?: 'start' | 'end' | 'middle';
|
|
7
|
+
/** Where the popover menu opens relative to its trigger. */
|
|
8
|
+
direction?: 'top' | 'right' | 'bottom' | 'left';
|
|
9
|
+
/** The initial selected key in the collection (uncontrolled). */
|
|
10
|
+
defaultSelectedKey?: string;
|
|
11
|
+
/** Array of keys to disable within the options list. */
|
|
12
|
+
disabledKeys?: Iterable<string>;
|
|
13
|
+
/** Whether the collection allows empty selection. */
|
|
14
|
+
hasNoEmptySelection?: boolean;
|
|
15
|
+
/** Whether the field has a status indicator. */
|
|
16
|
+
hasNoStatusIndicator?: boolean;
|
|
17
|
+
/** Text rendered below the input. */
|
|
18
|
+
helperText?: React.ReactNode;
|
|
19
|
+
/** Props object that is spread directly into the helphint element. */
|
|
20
|
+
helpHintProps?: Record<string, unknown>;
|
|
21
|
+
/** If present this prop will cause a help hint to render in the label of the field. */
|
|
22
|
+
hintText?: string;
|
|
23
|
+
/** The label for the select element. */
|
|
24
|
+
label?: React.ReactNode;
|
|
25
|
+
/** Sets the default open state of the menu. */
|
|
26
|
+
isDefaultOpen?: boolean;
|
|
27
|
+
/** Whether the input is disabled. */
|
|
28
|
+
isDisabled?: boolean;
|
|
29
|
+
/** Whether the items are currently loading. */
|
|
30
|
+
isLoading?: boolean;
|
|
31
|
+
/** @ignore Whether the menu should automatically flip direction when space is limited. */
|
|
32
|
+
isNotFlippable?: boolean;
|
|
33
|
+
/** Sets the open state of the menu. */
|
|
34
|
+
isOpen?: boolean;
|
|
35
|
+
/** @ignore Whether the input can be selected but not changed by the user. */
|
|
36
|
+
isReadOnly?: boolean;
|
|
37
|
+
/** Whether user input is required on the input before form submission. */
|
|
38
|
+
isRequired?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* *For performance reasons, use this prop instead of Array.map when iteratively rendering Items*.
|
|
41
|
+
* For use with [dynamic collections](https://react-spectrum.adobe.com/react-stately/collections.html#dynamic-collections).
|
|
42
|
+
*/
|
|
43
|
+
items?: Iterable<object>;
|
|
44
|
+
/** The name for the select element, used when submitting a form. */
|
|
45
|
+
name?: string;
|
|
46
|
+
/** Temporary text that occupies the text input when it is empty. */
|
|
47
|
+
placeholder?: string;
|
|
48
|
+
/** The currently selected key in the collection (controlled). */
|
|
49
|
+
selectedKey?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Handler that is called when more items should be loaded, e.g. while scrolling near the bottom.
|
|
52
|
+
*
|
|
53
|
+
* () => any
|
|
54
|
+
*/
|
|
55
|
+
onLoadMore?: () => unknown;
|
|
56
|
+
/**
|
|
57
|
+
* Method that is called when the open state of the menu changes.
|
|
58
|
+
*
|
|
59
|
+
* (isOpen: boolean) => void
|
|
60
|
+
*/
|
|
61
|
+
onOpenChange?: (isOpen: boolean) => void;
|
|
62
|
+
/**
|
|
63
|
+
* Handler that is called when the selection changes.
|
|
64
|
+
*
|
|
65
|
+
* (key: Key) => any
|
|
66
|
+
*/
|
|
67
|
+
onSelectionChange?: (key: React.Key | null) => void;
|
|
68
|
+
/** Display an inline loader inside the select trigger while loading. */
|
|
69
|
+
hasInlineLoader?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* Props object that is spread directly into the Icon inside the default trigger button.
|
|
72
|
+
* Supports all IconProps (icon, title, size, color, sx, etc.).
|
|
73
|
+
* The sx prop is merged with the rotation style.
|
|
74
|
+
*/
|
|
75
|
+
iconProps?: IconProps;
|
|
76
|
+
/** Width of the popover menu. Accepts any valid CSS unit. */
|
|
77
|
+
popoverWidth?: string | number;
|
|
78
|
+
/**
|
|
79
|
+
* A ReactNode that replaces the default Button trigger entirely.
|
|
80
|
+
* When provided, the local Button element is not rendered.
|
|
81
|
+
*/
|
|
82
|
+
trigger?: React.ReactNode;
|
|
83
|
+
/** Props object that is spread directly into the default trigger button. */
|
|
84
|
+
triggerProps?: Record<string, unknown>;
|
|
85
|
+
/** Determines any status related styling. */
|
|
86
|
+
status?: Status;
|
|
87
|
+
/** Props object spread into the outer-most container. Wrapper and label will be children. */
|
|
88
|
+
containerProps?: Record<string, unknown>;
|
|
89
|
+
/** Props object that is spread directly into the input element. Will be a child
|
|
90
|
+
* of the Wrapper. */
|
|
91
|
+
controlProps?: Record<string, unknown>;
|
|
92
|
+
/** Props object spread to the field control wrapper, i.e. the immediate parent
|
|
93
|
+
* element for the control, sibling of the label, and child of the field container. */
|
|
94
|
+
controlWrapperProps?: Record<string, unknown>;
|
|
95
|
+
/** Props object spread to the field label, i.e. the visible text which labels the control. */
|
|
96
|
+
labelProps?: Record<string, unknown>;
|
|
97
|
+
/** Identifies the element (or elements) whose contents or presence
|
|
98
|
+
* are controlled by the current element. */
|
|
99
|
+
'aria-controls'?: string;
|
|
100
|
+
/** Identifies the element (or elements) that describes the object. */
|
|
101
|
+
'aria-describedby'?: string;
|
|
102
|
+
/** Identifies the element (or elements) that provide a detailed, extended description
|
|
103
|
+
* for the object. */
|
|
104
|
+
'aria-details'?: string;
|
|
105
|
+
/** Identifies the element that provides an error message for the object. */
|
|
106
|
+
'aria-errormessage'?: string;
|
|
107
|
+
/** Defines a string value that labels the current element. */
|
|
108
|
+
'aria-label'?: string;
|
|
109
|
+
/** Identifies the element (or elements) that labels the current element. */
|
|
110
|
+
'aria-labelledby'?: string;
|
|
111
|
+
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
3
|
import { VisuallyHidden } from 'react-aria';
|
|
4
|
-
import PropTypes from 'prop-types';
|
|
5
4
|
import { v4 as uuid } from 'uuid';
|
|
6
5
|
import { Box, Button, Icon, Loader, Text } from '../..';
|
|
7
6
|
import { useGetTheme, usePropWarning, useSelectField } from '../../hooks';
|
|
8
7
|
import { getPendoID } from '../../utils/devUtils/constants/pendoID';
|
|
9
8
|
import statuses from '../../utils/devUtils/constants/statuses';
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import { statusDefaultProp, statusPropTypes } from '../../utils/docUtils/statusProp';
|
|
9
|
+
import { getAriaAttributeProps } from '../../utils/docUtils/ariaAttributes';
|
|
10
|
+
import { statusDefaultProp } from '../../utils/docUtils/statusProp';
|
|
13
11
|
import SelectFieldBase from '../SelectFieldBase';
|
|
14
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
15
13
|
const displayName = 'LinkSelectField';
|
|
@@ -67,7 +65,7 @@ const LinkSelectField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
67
65
|
variant: "selectLink",
|
|
68
66
|
tabIndex: isDisabled ? -1 : 0
|
|
69
67
|
}, getPendoID(displayName), triggerProps, raTriggerProps, ariaProps, {
|
|
70
|
-
"aria-describedby": helperText
|
|
68
|
+
"aria-describedby": helperText ? helperTextId : undefined
|
|
71
69
|
}), ___EmotionJSX(Text, {
|
|
72
70
|
variant: "linkSelectFieldLabel",
|
|
73
71
|
className: "link-select-field-placeholder"
|
|
@@ -96,92 +94,11 @@ const LinkSelectField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
96
94
|
id: helperTextId
|
|
97
95
|
}, helperText));
|
|
98
96
|
return ___EmotionJSX(SelectFieldBase, _extends({}, props, selectFieldProps, {
|
|
97
|
+
label: props.label,
|
|
98
|
+
helperText: props.helperText,
|
|
99
99
|
trigger: triggerProp || triggerNode
|
|
100
100
|
}));
|
|
101
101
|
});
|
|
102
|
-
LinkSelectField.propTypes = {
|
|
103
|
-
/** Alignment of the popover menu relative to the trigger. */
|
|
104
|
-
align: PropTypes.oneOf(['start', 'end', 'middle']),
|
|
105
|
-
/** Where the popover menu opens relative to its trigger. */
|
|
106
|
-
direction: PropTypes.oneOf(['top', 'right', 'bottom', 'left']),
|
|
107
|
-
/** The initial selected key in the collection (uncontrolled). */
|
|
108
|
-
defaultSelectedKey: PropTypes.string,
|
|
109
|
-
/** Array of keys to disable within the options list. */
|
|
110
|
-
disabledKeys: PropTypes.arrayOf(PropTypes.string),
|
|
111
|
-
/** Whether the collection allows empty selection. */
|
|
112
|
-
hasNoEmptySelection: PropTypes.bool,
|
|
113
|
-
/** Whether the field has a status indicator. */
|
|
114
|
-
hasNoStatusIndicator: PropTypes.bool,
|
|
115
|
-
/** Text rendered below the input. */
|
|
116
|
-
helperText: PropTypes.node,
|
|
117
|
-
/** Props object that is spread directly into the helphint element. */
|
|
118
|
-
helpHintProps: PropTypes.shape({}),
|
|
119
|
-
/** If present this prop will cause a help hint to render in the label of the field. */
|
|
120
|
-
hintText: PropTypes.string,
|
|
121
|
-
/** Sets the default open state of the menu. */
|
|
122
|
-
isDefaultOpen: PropTypes.bool,
|
|
123
|
-
/** Whether the input is disabled. */
|
|
124
|
-
isDisabled: PropTypes.bool,
|
|
125
|
-
/** Whether the items are currently loading. */
|
|
126
|
-
isLoading: PropTypes.bool,
|
|
127
|
-
/** @ignore Whether the menu should automatically flip direction when space is limited. */
|
|
128
|
-
isNotFlippable: PropTypes.bool,
|
|
129
|
-
/** Sets the open state of the menu. */
|
|
130
|
-
isOpen: PropTypes.bool,
|
|
131
|
-
/** @ignore Whether the input can be selected but not changed by the user. */
|
|
132
|
-
isReadOnly: PropTypes.bool,
|
|
133
|
-
/** Whether user input is required on the input before form submission. */
|
|
134
|
-
isRequired: PropTypes.bool,
|
|
135
|
-
/**
|
|
136
|
-
* *For performance reasons, use this prop instead of Array.map when iteratively rendering Items*.
|
|
137
|
-
* For use with [dynamic collections](https://react-spectrum.adobe.com/react-stately/collections.html#dynamic-collections).
|
|
138
|
-
*/
|
|
139
|
-
items: PropTypes.arrayOf(PropTypes.shape({})),
|
|
140
|
-
/** The label for the select element. */
|
|
141
|
-
label: PropTypes.node,
|
|
142
|
-
/** The name for the select element, used when submitting a form. */
|
|
143
|
-
name: PropTypes.string,
|
|
144
|
-
/** Temporary text that occupies the text input when it is empty. */
|
|
145
|
-
placeholder: PropTypes.string,
|
|
146
|
-
/** The currently selected key in the collection (controlled). */
|
|
147
|
-
selectedKey: PropTypes.string,
|
|
148
|
-
/**
|
|
149
|
-
* Handler that is called when more items should be loaded, e.g. while scrolling near the bottom.
|
|
150
|
-
*
|
|
151
|
-
* () => any
|
|
152
|
-
*/
|
|
153
|
-
onLoadMore: PropTypes.func,
|
|
154
|
-
/**
|
|
155
|
-
* Method that is called when the open state of the menu changes.
|
|
156
|
-
*
|
|
157
|
-
* (isOpen: boolean) => void
|
|
158
|
-
*/
|
|
159
|
-
onOpenChange: PropTypes.func,
|
|
160
|
-
/**
|
|
161
|
-
* Handler that is called when the selection changes.
|
|
162
|
-
*
|
|
163
|
-
* (key: Key) => any
|
|
164
|
-
*/
|
|
165
|
-
onSelectionChange: PropTypes.func,
|
|
166
|
-
/** Display an inline loader inside the select trigger while loading. */
|
|
167
|
-
hasInlineLoader: PropTypes.bool,
|
|
168
|
-
/**
|
|
169
|
-
* Props object that is spread directly into the Icon inside the default trigger button.
|
|
170
|
-
* Supports all IconProps (icon, title, size, color, sx, etc.).
|
|
171
|
-
* The sx prop is merged with the rotation style.
|
|
172
|
-
*/
|
|
173
|
-
iconProps: PropTypes.shape({}),
|
|
174
|
-
/** Width of the popover menu. Accepts any valid CSS unit. */
|
|
175
|
-
popoverWidth: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
176
|
-
/**
|
|
177
|
-
* A ReactNode that replaces the default Button trigger entirely.
|
|
178
|
-
* When provided, the local Button element is not rendered.
|
|
179
|
-
*/
|
|
180
|
-
trigger: PropTypes.node,
|
|
181
|
-
...statusPropTypes,
|
|
182
|
-
...inputFieldAttributesBasePropTypes,
|
|
183
|
-
...ariaAttributesBasePropTypes
|
|
184
|
-
};
|
|
185
102
|
LinkSelectField.defaultProps = {
|
|
186
103
|
placeholder: 'Select',
|
|
187
104
|
align: 'start',
|
|
@@ -6,6 +6,7 @@ import { useOption } from '@react-aria/listbox';
|
|
|
6
6
|
import { useMultivaluesContext } from '../../context/MultivaluesContext';
|
|
7
7
|
import { useGetTheme, useStatusClasses } from '../../hooks';
|
|
8
8
|
import Box from '../Box';
|
|
9
|
+
import { OnyxDefaultCheckboxIcon } from '../Checkbox/CheckboxIcons';
|
|
9
10
|
import Icon from '../Icon';
|
|
10
11
|
import { ListBoxContext } from './ListBoxContext';
|
|
11
12
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
@@ -117,17 +118,30 @@ const Option = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
117
118
|
onPointerOver: setFocusOnHover
|
|
118
119
|
}, theseOptionProps, others, {
|
|
119
120
|
"aria-label": ariaLabel
|
|
120
|
-
}), isCondensed ? ___EmotionJSX(
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
121
|
+
}), isCondensed && (isOnyx ? ___EmotionJSX(OnyxDefaultCheckboxIcon, {
|
|
122
|
+
isChecked: isSelected,
|
|
123
|
+
sx: {
|
|
124
|
+
mr: 'sm',
|
|
125
|
+
color: isSelected ? 'primary' : 'gray-500',
|
|
126
|
+
'&.is-disabled': {
|
|
127
|
+
color: 'gray-400'
|
|
128
|
+
},
|
|
129
|
+
'&.is-focused, &.is-focus-visible': {
|
|
130
|
+
outline: '2px solid',
|
|
131
|
+
outlineColor: 'focus'
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}) : ___EmotionJSX(Icon, {
|
|
125
135
|
icon: isSelected ? CheckedIcon : UncheckedIcon,
|
|
126
136
|
color: "active",
|
|
127
|
-
mr: "
|
|
137
|
+
mr: "sm",
|
|
128
138
|
className: classNames,
|
|
129
139
|
variant: "listBox.checkboxIcon"
|
|
130
|
-
})
|
|
140
|
+
})), isCondensed && ___EmotionJSX(Box, {
|
|
141
|
+
isRow: true,
|
|
142
|
+
alignItems: "center",
|
|
143
|
+
flex: "1"
|
|
144
|
+
}, rendered), !isCondensed && ___EmotionJSX(React.Fragment, null, isSelected && !isOnyx && shouldShowSelectedOption && ___EmotionJSX(Icon, {
|
|
131
145
|
icon: CircleSmallIcon,
|
|
132
146
|
title: {
|
|
133
147
|
name: 'Circle Small Icon'
|
|
@@ -240,10 +240,12 @@ const CondensedMultivaluesField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
240
240
|
onPress: handleSelection,
|
|
241
241
|
ref: buttonRef,
|
|
242
242
|
variant: "listBoxLink",
|
|
243
|
-
mt: "sm",
|
|
244
|
-
ml: "14px",
|
|
245
243
|
sx: {
|
|
246
|
-
fontWeight: '400'
|
|
244
|
+
fontWeight: '400',
|
|
245
|
+
width: '100%',
|
|
246
|
+
justifyContent: 'flex-start',
|
|
247
|
+
pl: 'lg',
|
|
248
|
+
pr: 'md'
|
|
247
249
|
}
|
|
248
250
|
}, selectionState), ___EmotionJSX(DismissButton, {
|
|
249
251
|
onDismiss: close
|
|
@@ -329,7 +331,7 @@ const CondensedMultivaluesField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
329
331
|
}, ___EmotionJSX(Icon, _extends({
|
|
330
332
|
icon: isOpen ? MenuUp : MenuDown
|
|
331
333
|
}, isOnyx && {
|
|
332
|
-
size: '
|
|
334
|
+
size: 'md'
|
|
333
335
|
}, {
|
|
334
336
|
title: {
|
|
335
337
|
name: ''
|
|
@@ -439,7 +439,11 @@ const DefaultMultivaluesField = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
439
439
|
isRow: true,
|
|
440
440
|
sx: {
|
|
441
441
|
p: 0,
|
|
442
|
-
flexWrap: 'wrap'
|
|
442
|
+
flexWrap: 'wrap',
|
|
443
|
+
...(isOnyx && {
|
|
444
|
+
columnGap: 'xs',
|
|
445
|
+
rowGap: 'xs'
|
|
446
|
+
})
|
|
443
447
|
}
|
|
444
448
|
}, selectedItems), isOnyx ? onyxReadOnlyInputEntry : readOnlyInputEntry, selectionManager.selectedKeys.size > 0 && visuallyHidden)
|
|
445
449
|
},
|
|
@@ -104,32 +104,42 @@ const countNeutral = {
|
|
|
104
104
|
}
|
|
105
105
|
};
|
|
106
106
|
const readOnlyBadge = {
|
|
107
|
-
color: astroTokensDark.color.gray[
|
|
108
|
-
backgroundColor: '
|
|
107
|
+
color: astroTokensDark.color.gray[600],
|
|
108
|
+
backgroundColor: 'white !important',
|
|
109
109
|
borderColor: 'border.attachment',
|
|
110
110
|
'& span': {
|
|
111
|
-
|
|
111
|
+
fontWeight: 0,
|
|
112
|
+
color: astroTokensDark.color.gray[600],
|
|
113
|
+
fontSize: astroTokensDark.default['font-size'].small,
|
|
114
|
+
lineHeight: '18px'
|
|
112
115
|
}
|
|
113
116
|
};
|
|
114
117
|
const readOnlyFieldBadge = {
|
|
115
|
-
|
|
116
|
-
backgroundColor: '#23282E !important',
|
|
117
|
-
borderColor: 'border.attachment',
|
|
118
|
+
...readOnlyBadge,
|
|
118
119
|
'& span': {
|
|
119
|
-
|
|
120
|
+
fontWeight: 0,
|
|
121
|
+
color: astroTokensDark.color.gray[600]
|
|
120
122
|
}
|
|
121
123
|
};
|
|
124
|
+
|
|
125
|
+
// Onyx dark selected-tag spec: neutral surface, not the light-theme blue (UXE-8463 QA)
|
|
122
126
|
const selectedItemBadge = {
|
|
123
|
-
backgroundColor: '#
|
|
127
|
+
backgroundColor: '#2C323A !important',
|
|
124
128
|
'& span': {
|
|
125
|
-
color: astroTokensDark.color.gray[
|
|
129
|
+
color: astroTokensDark.color.gray[200]
|
|
130
|
+
},
|
|
131
|
+
'& svg': {
|
|
132
|
+
color: astroTokensDark.color.gray[200],
|
|
133
|
+
path: {
|
|
134
|
+
fill: astroTokensDark.color.gray[200]
|
|
135
|
+
}
|
|
126
136
|
}
|
|
127
137
|
};
|
|
128
138
|
const itemBadgeWithSlot = {
|
|
129
139
|
...selectedItemBadge,
|
|
130
140
|
'& svg': {
|
|
131
141
|
path: {
|
|
132
|
-
fill: astroTokensDark.color.gray[
|
|
142
|
+
fill: astroTokensDark.color.gray[200]
|
|
133
143
|
}
|
|
134
144
|
}
|
|
135
145
|
};
|
|
@@ -20,6 +20,9 @@ const listBox = {
|
|
|
20
20
|
},
|
|
21
21
|
option: {
|
|
22
22
|
color: astroTokensDark.color.common.menu.item.text,
|
|
23
|
+
'&.is-disabled': {
|
|
24
|
+
color: astroTokensDark.color.gray[400]
|
|
25
|
+
},
|
|
23
26
|
'&.is-focused': {
|
|
24
27
|
color: astroTokensDark.color.common.menu.item.hover.text,
|
|
25
28
|
bg: '#2C323A'
|
|
@@ -100,10 +100,24 @@ const info = {
|
|
|
100
100
|
const selectedItemBadge = {
|
|
101
101
|
...baseBadge,
|
|
102
102
|
backgroundColor: '#eaf2fd !important',
|
|
103
|
-
|
|
103
|
+
pt: 'xs',
|
|
104
|
+
pb: 'xs',
|
|
105
|
+
m: 0,
|
|
106
|
+
mr: 0,
|
|
107
|
+
my: 0,
|
|
108
|
+
pr: 'sm',
|
|
109
|
+
pl: 'sm',
|
|
110
|
+
maxWidth: 'none',
|
|
104
111
|
'& span': {
|
|
105
112
|
...badgeFont,
|
|
106
|
-
|
|
113
|
+
fontWeight: 0,
|
|
114
|
+
color: 'text.primary',
|
|
115
|
+
fontSize: astroTokens.default['font-size'].small,
|
|
116
|
+
lineHeight: '18px',
|
|
117
|
+
mr: 0
|
|
118
|
+
},
|
|
119
|
+
'& button': {
|
|
120
|
+
ml: 'sm'
|
|
107
121
|
}
|
|
108
122
|
};
|
|
109
123
|
const readOnlyBadge = {
|
|
@@ -112,17 +126,19 @@ const readOnlyBadge = {
|
|
|
112
126
|
borderColor: 'border.hairline',
|
|
113
127
|
backgroundColor: '#FFFFFF !important',
|
|
114
128
|
'& span': {
|
|
115
|
-
|
|
116
|
-
color:
|
|
117
|
-
|
|
129
|
+
fontWeight: 0,
|
|
130
|
+
color: astroTokens.color.gray[600],
|
|
131
|
+
fontSize: astroTokens.default['font-size'].small,
|
|
132
|
+
lineHeight: '18px'
|
|
118
133
|
}
|
|
119
134
|
};
|
|
120
135
|
const readOnlyFieldBadge = {
|
|
121
136
|
...readOnlyBadge,
|
|
122
137
|
'& span': {
|
|
123
|
-
|
|
124
|
-
color:
|
|
125
|
-
|
|
138
|
+
fontWeight: 0,
|
|
139
|
+
color: astroTokens.color.gray[600],
|
|
140
|
+
fontSize: astroTokens.default['font-size'].small,
|
|
141
|
+
lineHeight: '18px'
|
|
126
142
|
}
|
|
127
143
|
};
|
|
128
144
|
const itemBadgeWithSlot = {
|
|
@@ -148,8 +148,9 @@ input.multivaluesWrapper = {
|
|
|
148
148
|
borderWidth: 1,
|
|
149
149
|
flexDirection: 'row !important',
|
|
150
150
|
flexWrap: 'wrap',
|
|
151
|
+
rowGap: 'xs',
|
|
151
152
|
pt: 6,
|
|
152
|
-
pr:
|
|
153
|
+
pr: 12,
|
|
153
154
|
pb: 5,
|
|
154
155
|
pl: 12,
|
|
155
156
|
borderRadius: astroTokens.radius.input,
|
|
@@ -160,7 +161,7 @@ input.multivaluesWrapper = {
|
|
|
160
161
|
flex: 1,
|
|
161
162
|
height: 27,
|
|
162
163
|
lineHeight: '100%',
|
|
163
|
-
p:
|
|
164
|
+
p: 0,
|
|
164
165
|
'&.is-focused': {
|
|
165
166
|
boxShadow: 'none',
|
|
166
167
|
outline: 'none'
|
|
@@ -170,7 +171,7 @@ input.multivaluesWrapper = {
|
|
|
170
171
|
...defaultFocus
|
|
171
172
|
},
|
|
172
173
|
'&.is-error': {
|
|
173
|
-
borderColor:
|
|
174
|
+
borderColor: astroTokens.color.red.base
|
|
174
175
|
},
|
|
175
176
|
'&.is-read-only': {
|
|
176
177
|
alignItems: 'center',
|