@codecademy/gamut 72.2.3-alpha.f0a032.0 → 72.2.3-alpha.f43044.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/agent-tools/skills/gamut-forms/SKILL.md +0 -16
- package/dist/Alert/elements.d.ts +2 -2
- package/dist/Anchor/index.d.ts +19 -9
- package/dist/Anchor/index.js +9 -6
- package/dist/BarChart/BarRow/elements.d.ts +47 -45
- package/dist/BarChart/utils/hooks.d.ts +2 -2
- package/dist/BarChart/utils/hooks.js +3 -1
- package/dist/Box/GridBox.d.ts +1 -0
- package/dist/Box/GridBox.js +1 -1
- package/dist/Box/props.d.ts +1 -1
- package/dist/Breadcrumbs/index.d.ts +5 -5
- package/dist/Breadcrumbs/index.js +2 -2
- package/dist/Button/CTAButton.d.ts +2 -2
- package/dist/Button/FillButton.d.ts +4 -4
- package/dist/Button/IconButton.d.ts +4 -4
- package/dist/Button/IconButton.js +1 -0
- package/dist/Button/StrokeButton.d.ts +4 -4
- package/dist/Button/TextButton.d.ts +4 -4
- package/dist/Button/shared/InlineIconButton.d.ts +2 -2
- package/dist/Button/shared/styles.d.ts +3 -3
- package/dist/Button/shared/types.d.ts +1 -1
- package/dist/ButtonBase/ButtonBase.d.ts +9 -4
- package/dist/ButtonBase/ButtonBase.js +11 -4
- package/dist/Card/elements.d.ts +109 -103
- package/dist/Card/styles.d.ts +8 -8
- package/dist/Coachmark/index.d.ts +1 -1
- package/dist/ConnectedForm/ConnectedForm.d.ts +1 -1
- package/dist/ConnectedForm/ConnectedFormGroup.js +3 -2
- package/dist/ConnectedForm/utils.d.ts +1 -1
- package/dist/ConnectedForm/utils.js +1 -1
- package/dist/DatePicker/DatePickerInput/index.d.ts +1 -1
- package/dist/Disclosure/elements.d.ts +18 -12
- package/dist/FeatureShimmer/index.js +1 -1
- package/dist/Form/SelectDropdown/SelectDropdown.js +101 -49
- package/dist/Form/SelectDropdown/elements/constants.d.ts +8 -0
- package/dist/Form/SelectDropdown/elements/constants.js +9 -1
- package/dist/Form/SelectDropdown/elements/containers.d.ts +2 -6
- package/dist/Form/SelectDropdown/elements/containers.js +2 -18
- package/dist/Form/SelectDropdown/elements/controls.d.ts +15 -1
- package/dist/Form/SelectDropdown/elements/controls.js +91 -2
- package/dist/Form/SelectDropdown/elements/index.d.ts +1 -2
- package/dist/Form/SelectDropdown/elements/index.js +1 -2
- package/dist/Form/SelectDropdown/elements/multi-value.js +2 -2
- package/dist/Form/SelectDropdown/elements/options.d.ts +0 -1
- package/dist/Form/SelectDropdown/elements/options.js +2 -5
- package/dist/Form/SelectDropdown/{core/styles.js → styles.js} +12 -30
- package/dist/Form/SelectDropdown/types/component-props.d.ts +6 -54
- package/dist/Form/SelectDropdown/types/internal.d.ts +4 -4
- package/dist/Form/SelectDropdown/types/styles.d.ts +1 -5
- package/dist/Form/SelectDropdown/{core/utils.d.ts → utils.d.ts} +2 -12
- package/dist/Form/SelectDropdown/{core/utils.js → utils.js} +2 -24
- package/dist/Form/elements/Form.d.ts +15 -15
- package/dist/Form/elements/FormGroup.d.ts +1 -1
- package/dist/Form/styles/Checkbox-styles.d.ts +1 -1
- package/dist/Form/styles/index.d.ts +1 -1
- package/dist/Form/styles/index.js +1 -1
- package/dist/GridForm/GridFormButtons/index.d.ts +4 -4
- package/dist/List/ListProvider.d.ts +1 -1
- package/dist/List/elements.d.ts +44 -42
- package/dist/Menu/MenuItem.d.ts +2 -0
- package/dist/Menu/MenuItem.js +12 -6
- package/dist/Menu/elements.d.ts +3 -2
- package/dist/Menu/elements.js +7 -5
- package/dist/Modals/Dialog.js +6 -2
- package/dist/Modals/Modal.js +5 -2
- package/dist/Modals/elements.d.ts +1 -1
- package/dist/Pagination/AnimatedPaginationButtons.d.ts +31 -29
- package/dist/Pagination/EllipsisButton.d.ts +2 -2
- package/dist/Pagination/PaginationButton.d.ts +6 -6
- package/dist/Pagination/utils.d.ts +31 -29
- package/dist/Pagination/utils.js +14 -11
- package/dist/Popover/Popover.js +6 -6
- package/dist/Popover/types.d.ts +4 -3
- package/dist/PopoverContainer/PopoverContainer.js +9 -9
- package/dist/PopoverContainer/hooks.d.ts +16 -4
- package/dist/PopoverContainer/hooks.js +50 -27
- package/dist/PopoverContainer/types.d.ts +2 -1
- package/dist/Tabs/TabButton.d.ts +2 -2
- package/dist/Tabs/TabNavLink.d.ts +2 -2
- package/dist/Tag/elements.d.ts +14 -8
- package/dist/Tip/InfoTip/InfoTipButton.d.ts +4 -4
- package/dist/Tip/PreviewTip/elements.d.ts +12 -6
- package/dist/Tip/ToolTip/index.d.ts +5 -0
- package/dist/Tip/__tests__/helpers.d.ts +1 -1
- package/dist/Tip/shared/FloatingTip.js +17 -2
- package/dist/Tip/shared/InlineTip.js +23 -2
- package/dist/Tip/shared/elements.d.ts +1 -1
- package/dist/Tip/shared/elements.js +16 -7
- package/dist/Tip/shared/types.d.ts +2 -1
- package/dist/Tip/shared/utils.js +1 -1
- package/dist/utils/nullish.d.ts +10 -0
- package/dist/utils/nullish.js +11 -0
- package/dist/utils/react.js +4 -2
- package/package.json +10 -10
- package/agent-tools/skills/gamut-select-dropdown/SKILL.md +0 -236
- package/dist/Form/SelectDropdown/core/accessibility.d.ts +0 -3
- package/dist/Form/SelectDropdown/core/accessibility.js +0 -12
- package/dist/Form/SelectDropdown/core/constants.d.ts +0 -13
- package/dist/Form/SelectDropdown/core/constants.js +0 -14
- package/dist/Form/SelectDropdown/hooks/useSelectHandlers.d.ts +0 -22
- package/dist/Form/SelectDropdown/hooks/useSelectHandlers.js +0 -62
- package/dist/Form/SelectDropdown/hooks/useSelectOptions.d.ts +0 -14
- package/dist/Form/SelectDropdown/hooks/useSelectOptions.js +0 -39
- /package/dist/Form/SelectDropdown/{core/styles.d.ts → styles.d.ts} +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { css, states, variant } from '@codecademy/gamut-styles';
|
|
2
|
-
import { dismissSharedStyles, tagBaseStyles, tagLabelFontSize, tagLabelPadding } from '
|
|
3
|
-
import { formBaseComponentStyles, formBaseFieldStylesObject, formFieldDisabledStyles, formFieldPaddingStyles, InputSelectors } from '
|
|
2
|
+
import { dismissSharedStyles, tagBaseStyles, tagLabelFontSize, tagLabelPadding } from '../../Tag/styles';
|
|
3
|
+
import { formBaseComponentStyles, formBaseFieldStylesObject, formFieldDisabledStyles, formFieldPaddingStyles, InputSelectors } from '../styles';
|
|
4
4
|
const selectDropdownStyles = css({
|
|
5
5
|
...formBaseFieldStylesObject,
|
|
6
6
|
display: 'flex',
|
|
@@ -62,7 +62,7 @@ const textColor = css({
|
|
|
62
62
|
color: 'text'
|
|
63
63
|
});
|
|
64
64
|
const placeholderColor = css({
|
|
65
|
-
color: 'text-
|
|
65
|
+
color: 'text-disabled'
|
|
66
66
|
});
|
|
67
67
|
export const getMemoizedStyles = (theme, zIndex) => {
|
|
68
68
|
return {
|
|
@@ -137,8 +137,6 @@ export const getMemoizedStyles = (theme, zIndex) => {
|
|
|
137
137
|
error: state.selectProps.error,
|
|
138
138
|
theme
|
|
139
139
|
}),
|
|
140
|
-
// Drop react-select's default menu drop shadow; the border above defines the edge.
|
|
141
|
-
boxShadow: 'none',
|
|
142
140
|
...(dropdownWidth ? {
|
|
143
141
|
minWidth: dropdownWidth,
|
|
144
142
|
width: dropdownWidth
|
|
@@ -196,32 +194,16 @@ export const getMemoizedStyles = (theme, zIndex) => {
|
|
|
196
194
|
backgroundColor: theme.colors['secondary-hover']
|
|
197
195
|
}
|
|
198
196
|
}),
|
|
199
|
-
|
|
200
|
-
...
|
|
201
|
-
|
|
197
|
+
option: (provided, state) => ({
|
|
198
|
+
...getOptionBackground(state.isSelected, state.isFocused)({
|
|
199
|
+
theme
|
|
200
|
+
}),
|
|
201
|
+
alignItems: 'center',
|
|
202
|
+
color: state.isDisabled ? 'text-disabled' : 'default',
|
|
203
|
+
cursor: state.isDisabled ? 'not-allowed' : 'pointer',
|
|
204
|
+
display: 'flex',
|
|
205
|
+
padding: state.selectProps.size === 'small' ? '3px 14px' : '11px 14px'
|
|
202
206
|
}),
|
|
203
|
-
option: (provided, state) => {
|
|
204
|
-
const isNew = state.data?.__isNew__;
|
|
205
|
-
const isSmall = state.selectProps.size === 'small';
|
|
206
|
-
return {
|
|
207
|
-
...getOptionBackground(state.isSelected, state.isFocused)({
|
|
208
|
-
theme
|
|
209
|
-
}),
|
|
210
|
-
alignItems: 'center',
|
|
211
|
-
color: state.isDisabled ? theme.colors['text-disabled'] : isNew ? theme.colors.primary : theme.colors.text,
|
|
212
|
-
cursor: state.isDisabled ? 'not-allowed' : 'pointer',
|
|
213
|
-
display: 'flex',
|
|
214
|
-
padding: isSmall ? '3px 14px' : '11px 14px',
|
|
215
|
-
...(isNew && {
|
|
216
|
-
// Gradient creates the 1px divider line at the top edge of the option background
|
|
217
|
-
backgroundImage: `linear-gradient(${theme.colors['text-disabled']} 1px, transparent 1px)`,
|
|
218
|
-
backgroundPosition: '0 0',
|
|
219
|
-
backgroundRepeat: 'no-repeat',
|
|
220
|
-
backgroundSize: '100% 1px',
|
|
221
|
-
paddingTop: isSmall ? '11px' : '19px'
|
|
222
|
-
})
|
|
223
|
-
};
|
|
224
|
-
},
|
|
225
207
|
placeholder: provided => ({
|
|
226
208
|
...provided,
|
|
227
209
|
...placeholderColor({
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Ref, SelectHTMLAttributes } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { Props as NamedProps } from 'react-select';
|
|
3
3
|
import { SelectComponentProps } from '../../inputs/Select';
|
|
4
4
|
import { OptionStrict, SelectDropdownGroup, SelectDropdownOptions } from './options';
|
|
5
5
|
import { ReactSelectAdditionalProps, SelectDropdownSizes, SharedProps } from './styles';
|
|
@@ -28,7 +28,7 @@ export type SelectDropdownBaseProps = Omit<SelectComponentProps, 'onChange' | 'd
|
|
|
28
28
|
* Core props interface that defines the essential properties for SelectDropdown.
|
|
29
29
|
* This interface combines base props with react-select props and HTML select attributes.
|
|
30
30
|
*/
|
|
31
|
-
export interface SelectDropdownCoreProps extends SelectDropdownBaseProps, Omit<NamedProps<OptionStrict, boolean>, 'formatOptionLabel' | 'isDisabled' | 'value' | 'options' | 'components' | 'styles' | 'theme' | 'onChange' | 'multiple'
|
|
31
|
+
export interface SelectDropdownCoreProps extends SelectDropdownBaseProps, Omit<NamedProps<OptionStrict, boolean>, 'formatOptionLabel' | 'isDisabled' | 'value' | 'options' | 'components' | 'styles' | 'theme' | 'onChange' | 'multiple'>, Pick<SelectHTMLAttributes<HTMLSelectElement>, 'value' | 'disabled' | 'onClick'>, SharedProps {
|
|
32
32
|
/** Required name attribute for the select input */
|
|
33
33
|
name: string;
|
|
34
34
|
/** Placeholder text shown when no option is selected.
|
|
@@ -38,39 +38,6 @@ export interface SelectDropdownCoreProps extends SelectDropdownBaseProps, Omit<N
|
|
|
38
38
|
placeholder?: string;
|
|
39
39
|
/** Array of options or option groups to display in the dropdown */
|
|
40
40
|
options?: SelectDropdownOptions | SelectDropdownGroup[];
|
|
41
|
-
/**
|
|
42
|
-
* Allows users to create new options by typing a value not in the options list.
|
|
43
|
-
* When true, isSearchable is automatically set to true.
|
|
44
|
-
* Pair with onCreateOption to persist new options.
|
|
45
|
-
*/
|
|
46
|
-
isCreatable?: boolean;
|
|
47
|
-
/**
|
|
48
|
-
* Called when the user confirms a new option via the "Add" row.
|
|
49
|
-
* Convenience callback for persisting the new value to your `options` list.
|
|
50
|
-
* Selection updates are delivered through `onChange` with `action: 'create-option'`.
|
|
51
|
-
*/
|
|
52
|
-
onCreateOption?: (inputValue: string) => void;
|
|
53
|
-
/**
|
|
54
|
-
* Customises the label shown in the "Add" row.
|
|
55
|
-
* Defaults to: (inputValue) => `Add "${inputValue}"`.
|
|
56
|
-
*/
|
|
57
|
-
formatCreateLabel?: (inputValue: string) => React.ReactNode;
|
|
58
|
-
/**
|
|
59
|
-
* Controls when the "Add" row is visible.
|
|
60
|
-
* Receives the current input, selected values, and all options.
|
|
61
|
-
* Defaults to react-select's built-in logic (hidden when input matches an existing option label).
|
|
62
|
-
* Use cases: minimum-length gating, pattern validation, case-insensitive dedup, max-items cap.
|
|
63
|
-
*/
|
|
64
|
-
isValidNewOption?: (inputValue: string, value: OptionsType<OptionStrict>, options: OptionsType<OptionStrict>) => boolean;
|
|
65
|
-
/**
|
|
66
|
-
* Customizes the message shown inside the dropdown menu when no option matches
|
|
67
|
-
* the current input (react-select's "No options" state). Useful for surfacing
|
|
68
|
-
* validation/error text directly in the dropdown. Accepts a node, or a function
|
|
69
|
-
* receiving the current input value.
|
|
70
|
-
*/
|
|
71
|
-
validationMessage?: React.ReactNode | ((obj: {
|
|
72
|
-
inputValue: string;
|
|
73
|
-
}) => React.ReactNode);
|
|
74
41
|
}
|
|
75
42
|
/**
|
|
76
43
|
* Props for single-select mode.
|
|
@@ -92,23 +59,11 @@ export interface MultiSelectDropdownProps extends SelectDropdownCoreProps {
|
|
|
92
59
|
/** Callback fired when the selected values change */
|
|
93
60
|
onChange?: NamedProps<OptionStrict, true>['onChange'];
|
|
94
61
|
}
|
|
95
|
-
/**
|
|
96
|
-
* Enforces that isSearchable cannot be false when isCreatable is true.
|
|
97
|
-
* Creatable mode requires the search input so users can type new option values.
|
|
98
|
-
*/
|
|
99
|
-
type CreatableConstraint = {
|
|
100
|
-
isCreatable?: false | undefined;
|
|
101
|
-
isSearchable?: boolean;
|
|
102
|
-
} | {
|
|
103
|
-
isCreatable: true;
|
|
104
|
-
isSearchable?: true;
|
|
105
|
-
};
|
|
106
62
|
/**
|
|
107
63
|
* Union type for all SelectDropdown prop variants.
|
|
108
|
-
* Supports both single and multi-select modes through discriminated union
|
|
109
|
-
* intersected with CreatableConstraint to enforce isSearchable compatibility.
|
|
64
|
+
* Supports both single and multi-select modes through discriminated union.
|
|
110
65
|
*/
|
|
111
|
-
export type SelectDropdownProps =
|
|
66
|
+
export type SelectDropdownProps = SingleSelectDropdownProps | MultiSelectDropdownProps;
|
|
112
67
|
/**
|
|
113
68
|
* Base interface for onChange-related props.
|
|
114
69
|
* Used internally for type checking and prop validation.
|
|
@@ -121,12 +76,9 @@ export interface BaseOnChangeProps {
|
|
|
121
76
|
}
|
|
122
77
|
/**
|
|
123
78
|
* Props for the typed React Select component wrapper.
|
|
124
|
-
* Extends ReactSelectAdditionalProps with an optional ref
|
|
79
|
+
* Extends ReactSelectAdditionalProps with an optional ref.
|
|
125
80
|
*/
|
|
126
|
-
export interface TypedReactSelectProps extends ReactSelectAdditionalProps
|
|
81
|
+
export interface TypedReactSelectProps extends ReactSelectAdditionalProps {
|
|
127
82
|
/** Optional ref to the underlying react-select component */
|
|
128
83
|
selectRef?: Ref<any>;
|
|
129
|
-
/** When true, renders CreatableSelect instead of ReactSelect */
|
|
130
|
-
isCreatable?: boolean;
|
|
131
84
|
}
|
|
132
|
-
export {};
|
|
@@ -11,10 +11,10 @@ export type InternalSelectProps = {
|
|
|
11
11
|
selectProps: Pick<SharedProps, 'inputProps'> & SelectDropdownSizes;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
|
-
* Ref type for programmatic focus management.
|
|
14
|
+
* Ref type for programmatic focus management (internal refs from useRef).
|
|
15
15
|
* Used for managing focus on select input and remove all button.
|
|
16
16
|
*/
|
|
17
|
-
export type
|
|
17
|
+
export type ProgramaticFocusRef = React.RefObject<HTMLDivElement | null>;
|
|
18
18
|
/**
|
|
19
19
|
* Context value for SelectDropdown internal state management.
|
|
20
20
|
* Provides access to focus state and refs for keyboard navigation.
|
|
@@ -25,9 +25,9 @@ export interface SelectDropdownContextValueTypes {
|
|
|
25
25
|
/** Function to update the currently focused value */
|
|
26
26
|
setCurrentFocusedValue?: React.Dispatch<React.SetStateAction<unknown>>;
|
|
27
27
|
/** Ref to the select input for programmatic focus */
|
|
28
|
-
selectInputRef?:
|
|
28
|
+
selectInputRef?: ProgramaticFocusRef;
|
|
29
29
|
/** Ref to the remove all button for programmatic focus */
|
|
30
|
-
removeAllButtonRef?:
|
|
30
|
+
removeAllButtonRef?: ProgramaticFocusRef;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
33
|
* Props for sized indicator components (dropdown arrow, search icon, etc.).
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StyleProps } from '@codecademy/variance';
|
|
2
|
-
import { conditionalBorderStates } from '../
|
|
2
|
+
import { conditionalBorderStates } from '../styles';
|
|
3
3
|
import { InternalInputsProps } from './component-props';
|
|
4
4
|
/**
|
|
5
5
|
* Size variants for the SelectDropdown component.
|
|
@@ -69,9 +69,5 @@ export type ControlState = BaseSelectComponentProps & InteractionStates & {
|
|
|
69
69
|
export type OptionState = BaseSelectComponentProps & InteractionStates & {
|
|
70
70
|
/** Whether the option is selected */
|
|
71
71
|
isSelected: boolean;
|
|
72
|
-
/** Option data — includes __isNew__ for react-select/creatable's "Add" row */
|
|
73
|
-
data?: {
|
|
74
|
-
__isNew__?: boolean;
|
|
75
|
-
};
|
|
76
72
|
};
|
|
77
73
|
export {};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
import { SelectOptionBase } from '../../utils';
|
|
4
|
-
import { BaseOnChangeProps, ExtendedOption, MultiSelectDropdownProps, OptionStrict, SelectDropdownGroup, SelectDropdownOptions, SelectDropdownProps, SingleSelectDropdownProps } from '../types';
|
|
1
|
+
import { SelectOptionBase } from '../utils';
|
|
2
|
+
import { BaseOnChangeProps, ExtendedOption, MultiSelectDropdownProps, SelectDropdownGroup, SelectDropdownOptions, SelectDropdownProps, SingleSelectDropdownProps } from './types';
|
|
5
3
|
export declare const isMultipleSelectProps: (props: BaseOnChangeProps) => props is MultiSelectDropdownProps;
|
|
6
4
|
export declare const isSingleSelectProps: (props: BaseOnChangeProps) => props is SingleSelectDropdownProps;
|
|
7
|
-
/**
|
|
8
|
-
* Resolves the value for a newly created option from react-select action metadata
|
|
9
|
-
* or the onChange option payload. Returns undefined when no reliable value exists.
|
|
10
|
-
*/
|
|
11
|
-
export declare const getCreatedOptionValue: (optionEvent: OptionStrict | OptionsType<OptionStrict>, actionMeta: ActionMeta<OptionStrict>, multiple?: boolean) => string | undefined;
|
|
12
5
|
export declare const isOptionGroup: (obj: unknown) => obj is SelectDropdownGroup;
|
|
13
6
|
export declare const isOptionsGrouped: (options: SelectDropdownOptions) => options is SelectDropdownGroup[];
|
|
14
7
|
/**
|
|
@@ -30,7 +23,4 @@ export declare const filterValueFromOptions: (options: SelectOptionBase[] | Sele
|
|
|
30
23
|
* @param value - The value or values to remove
|
|
31
24
|
* @returns New array with the specified values removed
|
|
32
25
|
*/
|
|
33
|
-
export declare const resolveNoOptionsMessage: (validationMessage: SelectDropdownProps["validationMessage"]) => ((obj: {
|
|
34
|
-
inputValue: string;
|
|
35
|
-
}) => React.ReactNode) | undefined;
|
|
36
26
|
export declare const removeValueFromSelectedOptions: (selectedOptions: ExtendedOption[] | SelectOptionBase[], value: SelectDropdownProps["value"]) => SelectOptionBase[];
|
|
@@ -1,22 +1,7 @@
|
|
|
1
|
+
import { isDefined } from '../../utils/nullish';
|
|
1
2
|
export const isMultipleSelectProps = props => !!props.multiple;
|
|
2
3
|
export const isSingleSelectProps = props => !props.multiple;
|
|
3
|
-
|
|
4
|
-
* Resolves the value for a newly created option from react-select action metadata
|
|
5
|
-
* or the onChange option payload. Returns undefined when no reliable value exists.
|
|
6
|
-
*/
|
|
7
|
-
export const getCreatedOptionValue = (optionEvent, actionMeta, multiple) => {
|
|
8
|
-
const metaValue = actionMeta.option?.value;
|
|
9
|
-
if (metaValue) return metaValue;
|
|
10
|
-
if (!multiple) {
|
|
11
|
-
const {
|
|
12
|
-
value
|
|
13
|
-
} = optionEvent;
|
|
14
|
-
return value || undefined;
|
|
15
|
-
}
|
|
16
|
-
const newOption = optionEvent.find(option => option.__isNew__);
|
|
17
|
-
return newOption?.value || undefined;
|
|
18
|
-
};
|
|
19
|
-
export const isOptionGroup = obj => obj != null && typeof obj === 'object' && 'options' in obj && obj.options !== undefined;
|
|
4
|
+
export const isOptionGroup = obj => isDefined(obj) && typeof obj === 'object' && obj !== null && 'options' in obj && obj.options !== undefined;
|
|
20
5
|
export const isOptionsGrouped = options => Array.isArray(options) && options.some(option => isOptionGroup(option));
|
|
21
6
|
|
|
22
7
|
/**
|
|
@@ -44,13 +29,6 @@ export const filterValueFromOptions = (options, value, optionsAreGrouped) => {
|
|
|
44
29
|
* @param value - The value or values to remove
|
|
45
30
|
* @returns New array with the specified values removed
|
|
46
31
|
*/
|
|
47
|
-
export const resolveNoOptionsMessage = validationMessage => {
|
|
48
|
-
if (validationMessage === undefined) return undefined;
|
|
49
|
-
if (typeof validationMessage === 'function') {
|
|
50
|
-
return validationMessage;
|
|
51
|
-
}
|
|
52
|
-
return () => validationMessage;
|
|
53
|
-
};
|
|
54
32
|
export const removeValueFromSelectedOptions = (selectedOptions, value) => {
|
|
55
33
|
return selectedOptions.filter(option => {
|
|
56
34
|
if (Array.isArray(value)) {
|
|
@@ -28,9 +28,9 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
28
28
|
readonly resolveProperty: (useLogicalProperties: boolean) => import("@codecademy/variance/dist/types/properties").PropertyMode;
|
|
29
29
|
readonly transform: (value: string | number) => string | 0;
|
|
30
30
|
}>;
|
|
31
|
-
alignContent?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "
|
|
32
|
-
alignItems?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "
|
|
33
|
-
alignSelf?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "
|
|
31
|
+
alignContent?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "end" | "flex-end" | "flex-start" | "start" | "baseline" | "stretch" | "space-around" | "space-between" | "space-evenly" | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignContent | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.AlignContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignContent | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.AlignContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignContent | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignContent | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.AlignContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignContent | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.AlignContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignContent | undefined) | undefined> | undefined;
|
|
32
|
+
alignItems?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "anchor-center" | "baseline" | "stretch" | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignItems | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.AlignItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignItems | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.AlignItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignItems | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignItems | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.AlignItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignItems | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.AlignItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignItems | undefined) | undefined> | undefined;
|
|
33
|
+
alignSelf?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "anchor-center" | "auto" | "baseline" | "stretch" | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.AlignSelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.AlignSelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.AlignSelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.AlignSelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.AlignSelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.AlignSelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.AlignSelf | undefined) | undefined> | undefined;
|
|
34
34
|
bottom?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
35
35
|
readonly property: {
|
|
36
36
|
readonly physical: "bottom";
|
|
@@ -52,7 +52,7 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
52
52
|
display?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
53
53
|
readonly property: "display";
|
|
54
54
|
}>;
|
|
55
|
-
flexBasis?: 0 | "initial" | "inherit" | "content" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "-moz-fit-content" | "-moz-max-content" | "-moz-min-content" | "
|
|
55
|
+
flexBasis?: 0 | "initial" | "inherit" | "content" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | "-moz-fit-content" | "-moz-max-content" | "-moz-min-content" | "fit-content" | "max-content" | "min-content" | "-webkit-auto" | ((theme: import("@emotion/react").Theme) => import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.FlexBasis<import("@codecademy/variance/dist/types/properties").DefaultCSSPropertyValue> | undefined) | undefined> | undefined;
|
|
56
56
|
flexDirection?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
57
57
|
readonly property: "flexDirection";
|
|
58
58
|
}>;
|
|
@@ -70,10 +70,10 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
70
70
|
gridAutoRows?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
71
71
|
readonly property: "gridAutoRows";
|
|
72
72
|
}>;
|
|
73
|
-
gridColumnEnd?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | (number & {}) |
|
|
74
|
-
gridColumnStart?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | (number & {}) |
|
|
75
|
-
gridRowEnd?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | (number & {}) |
|
|
76
|
-
gridRowStart?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | (number & {}) |
|
|
73
|
+
gridColumnEnd?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | (number & {}) | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnEnd | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridColumnEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnEnd | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridColumnEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnEnd | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnEnd | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridColumnEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnEnd | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridColumnEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnEnd | undefined) | undefined> | undefined;
|
|
74
|
+
gridColumnStart?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | (number & {}) | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnStart | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridColumnStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnStart | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridColumnStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnStart | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnStart | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridColumnStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnStart | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridColumnStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumnStart | undefined) | undefined> | undefined;
|
|
75
|
+
gridRowEnd?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | (number & {}) | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowEnd | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridRowEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowEnd | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridRowEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowEnd | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowEnd | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridRowEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowEnd | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridRowEnd | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowEnd | undefined) | undefined> | undefined;
|
|
76
|
+
gridRowStart?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | (number & {}) | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowStart | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridRowStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowStart | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridRowStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowStart | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowStart | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridRowStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowStart | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridRowStart | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRowStart | undefined) | undefined> | undefined;
|
|
77
77
|
gridTemplateAreas?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
78
78
|
readonly property: "gridTemplateAreas";
|
|
79
79
|
}>;
|
|
@@ -83,9 +83,9 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
83
83
|
gridTemplateRows?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
84
84
|
readonly property: "gridTemplateRows";
|
|
85
85
|
}>;
|
|
86
|
-
justifyContent?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "left" | "right" | "-moz-initial" | "revert" | "revert-layer" | "unset" | "end" | "
|
|
87
|
-
justifyItems?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "left" | "right" | "-moz-initial" | "revert" | "revert-layer" | "unset" | "
|
|
88
|
-
justifySelf?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "left" | "right" | "-moz-initial" | "revert" | "revert-layer" | "unset" | "
|
|
86
|
+
justifyContent?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "left" | "right" | "-moz-initial" | "revert" | "revert-layer" | "unset" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | "space-around" | "space-between" | "space-evenly" | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyContent | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.JustifyContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyContent | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.JustifyContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyContent | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyContent | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.JustifyContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyContent | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.JustifyContent | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyContent | undefined) | undefined> | undefined;
|
|
87
|
+
justifyItems?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "left" | "right" | "-moz-initial" | "revert" | "revert-layer" | "unset" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "anchor-center" | "baseline" | "stretch" | "legacy" | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyItems | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.JustifyItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyItems | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.JustifyItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyItems | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyItems | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.JustifyItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyItems | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.JustifyItems | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifyItems | undefined) | undefined> | undefined;
|
|
88
|
+
justifySelf?: "center" | "initial" | "inherit" | "normal" | (string & {}) | "left" | "right" | "-moz-initial" | "revert" | "revert-layer" | "unset" | "end" | "flex-end" | "flex-start" | "self-end" | "self-start" | "start" | "anchor-center" | "auto" | "baseline" | "stretch" | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.JustifySelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.JustifySelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.JustifySelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.JustifySelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.JustifySelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.JustifySelf | ((theme: import("@emotion/react").Theme) => import("csstype").Property.JustifySelf | undefined) | undefined> | undefined;
|
|
89
89
|
left?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
90
90
|
readonly property: {
|
|
91
91
|
readonly physical: "left";
|
|
@@ -222,9 +222,9 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
222
222
|
readonly property: "gap";
|
|
223
223
|
readonly scale: "spacing";
|
|
224
224
|
}>;
|
|
225
|
-
gridArea?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | (number & {}) |
|
|
226
|
-
gridColumn?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | (number & {}) |
|
|
227
|
-
gridRow?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | (number & {}) |
|
|
225
|
+
gridArea?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | (number & {}) | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridArea | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridArea | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridArea | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridArea | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridArea | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridArea | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridArea | undefined) | undefined> | undefined;
|
|
226
|
+
gridColumn?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | (number & {}) | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumn | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridColumn | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumn | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridColumn | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumn | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumn | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridColumn | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumn | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridColumn | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridColumn | undefined) | undefined> | undefined;
|
|
227
|
+
gridRow?: "initial" | "inherit" | (string & {}) | "-moz-initial" | "revert" | "revert-layer" | "unset" | "auto" | (number & {}) | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRow | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridRow | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRow | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridRow | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRow | undefined) | undefined> | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRow | undefined) | import("@codecademy/variance").BreakpointMap<import("csstype").Property.GridRow | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRow | undefined) | undefined> | import("@codecademy/variance").BreakpointArray<import("csstype").Property.GridRow | ((theme: import("@emotion/react").Theme) => import("csstype").Property.GridRow | undefined) | undefined> | undefined;
|
|
228
228
|
inset?: import("@codecademy/variance/dist/types/config").Scale<{
|
|
229
229
|
readonly property: "inset";
|
|
230
230
|
readonly properties: {
|
|
@@ -526,7 +526,7 @@ declare const StyledForm: import("@emotion/styled").StyledComponent<{
|
|
|
526
526
|
}>;
|
|
527
527
|
} & {
|
|
528
528
|
theme?: import("@emotion/react").Theme;
|
|
529
|
-
}, Pick<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "name" | "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "
|
|
529
|
+
}, Pick<React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>, "name" | "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "target" | "autoComplete" | "method" | keyof React.ClassAttributes<HTMLFormElement> | "acceptCharset" | "action" | "encType" | "noValidate">, {}>;
|
|
530
530
|
export type FormProps = ComponentProps<typeof StyledForm>;
|
|
531
531
|
export declare const Form: React.FC<FormProps>;
|
|
532
532
|
export {};
|
|
@@ -15,7 +15,7 @@ declare const StyledFormGroupContainer: import("@emotion/styled").StyledComponen
|
|
|
15
15
|
as?: React.ElementType;
|
|
16
16
|
} & import("../../Box").BoxProps & Pick<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "slot" | "style" | "title" | "dir" | "children" | "className" | "aria-hidden" | "onAnimationStart" | "onDragStart" | "onDragEnd" | "onDrag" | keyof React.ClassAttributes<HTMLDivElement> | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "autoCapitalize" | "autoFocus" | "contentEditable" | "contextMenu" | "draggable" | "enterKeyHint" | "hidden" | "id" | "lang" | "nonce" | "spellCheck" | "tabIndex" | "translate" | "radioGroup" | "role" | "about" | "content" | "datatype" | "inlist" | "prefix" | "property" | "rel" | "resource" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "exportparts" | "part" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-description" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
|
17
17
|
theme?: import("@emotion/react").Theme;
|
|
18
|
-
} & import("@codecademy/variance/dist/types/config").VariantProps<"spacing", false | "
|
|
18
|
+
} & import("@codecademy/variance/dist/types/config").VariantProps<"spacing", false | "fit" | "tight" | "loose" | "padded"> & {
|
|
19
19
|
theme?: import("@emotion/react").Theme;
|
|
20
20
|
}, {}, {}>;
|
|
21
21
|
declare const FormGroupContainer: React.FC<ComponentProps<typeof StyledFormGroupContainer>>;
|
|
@@ -10,7 +10,7 @@ export declare const polyline: (props: import("@codecademy/variance").ThemeProps
|
|
|
10
10
|
export declare const checkboxTextStates: (props: Partial<Record<"disabled" | "multiline", boolean>> & {
|
|
11
11
|
theme?: import("@emotion/react").Theme;
|
|
12
12
|
}) => import("@codecademy/variance").CSSObject;
|
|
13
|
-
export declare const checkboxElementStates: (props: Partial<Record<"disabled" | "
|
|
13
|
+
export declare const checkboxElementStates: (props: Partial<Record<"disabled" | "multiline" | "active" | "hasBg" | "hideBorder", boolean>> & {
|
|
14
14
|
theme?: import("@emotion/react").Theme;
|
|
15
15
|
}) => import("@codecademy/variance").CSSObject;
|
|
16
16
|
export declare const checkboxInput: (props: import("@codecademy/variance").ThemeProps) => import("@codecademy/variance").CSSObject;
|