@primer/react 38.0.0-rc.5 → 38.0.0-rc.7
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 +53 -0
- package/dist/ActionBar/ActionBar.d.ts +15 -1
- package/dist/ActionBar/ActionBar.d.ts.map +1 -1
- package/dist/ActionBar/ActionBar.js +381 -217
- package/dist/ActionBar/index.d.ts +1 -1
- package/dist/ActionList/Description.d.ts +4 -3
- package/dist/ActionList/Description.d.ts.map +1 -1
- package/dist/ActionList/Description.js +5 -5
- package/dist/ActionList/Divider.d.ts +5 -4
- package/dist/ActionList/Divider.d.ts.map +1 -1
- package/dist/ActionList/Divider.js +6 -7
- package/dist/ActionList/Group.d.ts +4 -5
- package/dist/ActionList/Group.d.ts.map +1 -1
- package/dist/ActionList/Group.js +9 -16
- package/dist/ActionList/Heading.d.ts +3 -2
- package/dist/ActionList/Heading.d.ts.map +1 -1
- package/dist/ActionList/Heading.js +1 -0
- package/dist/ActionList/Item.d.ts +5 -2
- package/dist/ActionList/Item.d.ts.map +1 -1
- package/dist/ActionList/Item.js +4 -8
- package/dist/ActionList/LinkItem.d.ts +1 -1
- package/dist/ActionList/LinkItem.d.ts.map +1 -1
- package/dist/ActionList/LinkItem.js +1 -2
- package/dist/ActionList/List.d.ts +1 -1
- package/dist/ActionList/List.d.ts.map +1 -1
- package/dist/ActionList/List.js +1 -3
- package/dist/ActionList/TrailingAction.d.ts +1 -0
- package/dist/ActionList/TrailingAction.d.ts.map +1 -1
- package/dist/ActionList/TrailingAction.js +3 -0
- package/dist/ActionList/Visuals.d.ts +4 -4
- package/dist/ActionList/Visuals.d.ts.map +1 -1
- package/dist/ActionList/Visuals.js +3 -3
- package/dist/ActionList/index.d.ts +12 -9
- package/dist/ActionList/index.d.ts.map +1 -1
- package/dist/ActionList/shared.d.ts +2 -3
- package/dist/ActionList/shared.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.d.ts +6 -5
- package/dist/ActionMenu/ActionMenu.d.ts.map +1 -1
- package/dist/ActionMenu/ActionMenu.js +11 -6
- package/dist/Autocomplete/Autocomplete.d.ts +6 -4
- package/dist/Autocomplete/Autocomplete.d.ts.map +1 -1
- package/dist/Autocomplete/Autocomplete.js +1 -0
- package/dist/Autocomplete/AutocompleteInput.js +1 -0
- package/dist/Autocomplete/AutocompleteMenu.d.ts +1 -0
- package/dist/Autocomplete/AutocompleteMenu.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteMenu.js +1 -0
- package/dist/Autocomplete/AutocompleteOverlay.d.ts +1 -0
- package/dist/Autocomplete/AutocompleteOverlay.d.ts.map +1 -1
- package/dist/Autocomplete/AutocompleteOverlay.js +1 -0
- package/dist/AvatarStack/AvatarStack.d.ts.map +1 -1
- package/dist/AvatarStack/AvatarStack.js +1 -3
- package/dist/BranchName/BranchName.d.ts +9 -10
- package/dist/BranchName/BranchName.d.ts.map +1 -1
- package/dist/BranchName/BranchName.js +1 -8
- package/dist/Button/Button.d.ts +1 -5
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +2 -85
- package/dist/Button/ButtonBase.d.ts.map +1 -1
- package/dist/Button/ButtonBase.js +8 -93
- package/dist/Button/IconButton.d.ts.map +1 -1
- package/dist/Button/IconButton.js +0 -16
- package/dist/Button/LinkButton.d.ts +1 -1
- package/dist/Button/LinkButton.d.ts.map +1 -1
- package/dist/Button/types.d.ts +1 -3
- package/dist/Button/types.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.d.ts +3 -1
- package/dist/Checkbox/Checkbox.d.ts.map +1 -1
- package/dist/Checkbox/Checkbox.js +1 -0
- package/dist/CheckboxGroup/CheckboxGroup.d.ts +8 -7
- package/dist/CheckboxGroup/CheckboxGroup.d.ts.map +1 -1
- package/dist/CheckboxGroup/CheckboxGroup.js +4 -2
- package/dist/ConfirmationDialog/ConfirmationDialog-87ccf595.css +2 -0
- package/dist/ConfirmationDialog/ConfirmationDialog-87ccf595.css.map +1 -0
- package/dist/ConfirmationDialog/ConfirmationDialog.d.ts.map +1 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.js +4 -1
- package/dist/ConfirmationDialog/ConfirmationDialog.module.css.js +1 -1
- package/dist/DataTable/Table.d.ts +3 -3
- package/dist/DataTable/Table.d.ts.map +1 -1
- package/dist/DataTable/Table.js +24 -19
- package/dist/FeatureFlags/DefaultFeatureFlags.d.ts.map +1 -1
- package/dist/FeatureFlags/DefaultFeatureFlags.js +2 -1
- package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css +2 -0
- package/dist/FilteredActionList/FilteredActionList-f6c2dc7a.css.map +1 -0
- package/dist/FilteredActionList/FilteredActionList.d.ts.map +1 -1
- package/dist/FilteredActionList/FilteredActionList.js +2 -7
- package/dist/FilteredActionList/FilteredActionList.module.css.js +2 -2
- package/dist/FilteredActionList/types.d.ts +5 -2
- package/dist/FilteredActionList/types.d.ts.map +1 -1
- package/dist/FormControl/FormControl.d.ts +8 -36
- package/dist/FormControl/FormControl.d.ts.map +1 -1
- package/dist/FormControl/FormControl.js +64 -66
- package/dist/FormControl/FormControlCaption.d.ts +6 -4
- package/dist/FormControl/FormControlCaption.d.ts.map +1 -1
- package/dist/FormControl/FormControlCaption.js +9 -13
- package/dist/FormControl/FormControlLabel.d.ts +3 -3
- package/dist/FormControl/FormControlLabel.d.ts.map +1 -1
- package/dist/FormControl/FormControlLabel.js +25 -31
- package/dist/FormControl/FormControlLeadingVisual-e217df71.css +2 -0
- package/dist/FormControl/FormControlLeadingVisual-e217df71.css.map +1 -0
- package/dist/FormControl/FormControlLeadingVisual.d.ts +2 -2
- package/dist/FormControl/FormControlLeadingVisual.d.ts.map +1 -1
- package/dist/FormControl/FormControlLeadingVisual.js +10 -17
- package/dist/FormControl/FormControlLeadingVisual.module.css.js +5 -0
- package/dist/FormControl/_FormControlContext.js +1 -1
- package/dist/FormControl/_FormControlValidation.d.ts +3 -3
- package/dist/FormControl/_FormControlValidation.d.ts.map +1 -1
- package/dist/FormControl/_FormControlValidation.js +7 -9
- package/dist/FormControl/index.d.ts +4 -0
- package/dist/FormControl/index.d.ts.map +1 -1
- package/dist/KeybindingHint/components/Chord-d4edcc89.css +2 -0
- package/dist/KeybindingHint/components/Chord-d4edcc89.css.map +1 -0
- package/dist/KeybindingHint/components/Chord.module.css.js +1 -1
- package/dist/LabelGroup/LabelGroup-7d19205a.css +2 -0
- package/dist/LabelGroup/LabelGroup-7d19205a.css.map +1 -0
- package/dist/LabelGroup/LabelGroup.d.ts.map +1 -1
- package/dist/LabelGroup/LabelGroup.js +14 -27
- package/dist/LabelGroup/LabelGroup.module.css.js +2 -2
- package/dist/NavList/NavList.d.ts +3 -3
- package/dist/NavList/NavList.d.ts.map +1 -1
- package/dist/NavList/NavList.js +2 -1
- package/dist/Octicon/Octicon.d.ts +7 -6
- package/dist/Octicon/Octicon.d.ts.map +1 -1
- package/dist/Octicon/Octicon.js +4 -23
- package/dist/Overlay/Overlay.d.ts.map +1 -1
- package/dist/Overlay/Overlay.js +63 -85
- package/dist/PageHeader/PageHeader.d.ts +3 -3
- package/dist/PageHeader/PageHeader.d.ts.map +1 -1
- package/dist/PageHeader/PageHeader.js +5 -2
- package/dist/PageLayout/{PageLayout-8a294e74.css → PageLayout-a276fa3b.css} +2 -2
- package/dist/PageLayout/PageLayout-a276fa3b.css.map +1 -0
- package/dist/PageLayout/PageLayout.d.ts +14 -58
- package/dist/PageLayout/PageLayout.d.ts.map +1 -1
- package/dist/PageLayout/PageLayout.js +216 -245
- package/dist/PageLayout/PageLayout.module.css.js +2 -2
- package/dist/Radio/Radio.d.ts +3 -1
- package/dist/Radio/Radio.d.ts.map +1 -1
- package/dist/Radio/Radio.js +1 -0
- package/dist/RadioGroup/RadioGroup.d.ts +6 -5
- package/dist/RadioGroup/RadioGroup.d.ts.map +1 -1
- package/dist/RadioGroup/RadioGroup.js +1 -0
- package/dist/SegmentedControl/SegmentedControl.d.ts +3 -2
- package/dist/SegmentedControl/SegmentedControl.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControl.js +11 -14
- package/dist/SegmentedControl/SegmentedControlButton.d.ts +2 -1
- package/dist/SegmentedControl/SegmentedControlButton.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlButton.js +1 -0
- package/dist/SegmentedControl/SegmentedControlIconButton.d.ts +2 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.d.ts.map +1 -1
- package/dist/SegmentedControl/SegmentedControlIconButton.js +1 -0
- package/dist/Select/Select.d.ts +1 -0
- package/dist/Select/Select.d.ts.map +1 -1
- package/dist/Select/Select.js +1 -0
- package/dist/SelectPanel/SelectPanel.d.ts +2 -1
- package/dist/SelectPanel/SelectPanel.d.ts.map +1 -1
- package/dist/SelectPanel/SelectPanel.js +1 -0
- package/dist/Skeleton/SkeletonBox.d.ts.map +1 -1
- package/dist/Skeleton/SkeletonBox.js +26 -20
- package/dist/SkeletonAvatar/SkeletonAvatar.d.ts.map +1 -1
- package/dist/SkeletonAvatar/SkeletonAvatar.js +53 -62
- package/dist/StateLabel/{StateLabel-aaa1d148.css → StateLabel-b586b0bc.css} +2 -2
- package/dist/StateLabel/StateLabel-b586b0bc.css.map +1 -0
- package/dist/StateLabel/StateLabel.d.ts.map +1 -1
- package/dist/StateLabel/StateLabel.js +28 -39
- package/dist/StateLabel/StateLabel.module.css.js +1 -1
- package/dist/SubNav/SubNav.d.ts +4 -1
- package/dist/SubNav/SubNav.d.ts.map +1 -1
- package/dist/SubNav/SubNav.js +3 -1
- package/dist/Text/Text.d.ts +16 -8
- package/dist/Text/Text.d.ts.map +1 -1
- package/dist/Text/Text.js +34 -31
- package/dist/TextInput/TextInput.d.ts +3 -2
- package/dist/TextInput/TextInput.d.ts.map +1 -1
- package/dist/TextInput/TextInput.js +2 -3
- package/dist/TextInput/index.d.ts +1 -0
- package/dist/TextInput/index.d.ts.map +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts +3 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.d.ts.map +1 -1
- package/dist/TextInputWithTokens/TextInputWithTokens.js +205 -211
- package/dist/Textarea/Textarea.d.ts +5 -4
- package/dist/Textarea/Textarea.d.ts.map +1 -1
- package/dist/Textarea/Textarea.js +40 -45
- package/dist/Tooltip/Tooltip-fffa9948.css +2 -0
- package/dist/Tooltip/Tooltip-fffa9948.css.map +1 -0
- package/dist/Tooltip/Tooltip.d.ts +6 -8
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +44 -118
- package/dist/Tooltip/Tooltip.module.css.js +5 -0
- package/dist/TooltipV2/Tooltip.d.ts +3 -16
- package/dist/TooltipV2/Tooltip.d.ts.map +1 -1
- package/dist/TooltipV2/Tooltip.js +1 -0
- package/dist/TreeView/TreeView.d.ts +4 -1
- package/dist/TreeView/TreeView.d.ts.map +1 -1
- package/dist/TreeView/TreeView.js +42 -9
- package/dist/Truncate/Truncate.d.ts +2 -2
- package/dist/Truncate/Truncate.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css +2 -0
- package/dist/UnderlineNav/UnderlineNav-4344d9b0.css.map +1 -0
- package/dist/UnderlineNav/UnderlineNav.d.ts +0 -1
- package/dist/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNav.js +45 -17
- package/dist/UnderlineNav/UnderlineNav.module.css.js +2 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts +0 -2
- package/dist/UnderlineNav/UnderlineNavContext.d.ts.map +1 -1
- package/dist/UnderlineNav/UnderlineNavContext.js +0 -1
- package/dist/UnderlineNav/styles.d.ts +1 -23
- package/dist/UnderlineNav/styles.d.ts.map +1 -1
- package/dist/UnderlineNav/styles.js +4 -59
- package/dist/constants.js +3 -3
- package/dist/deprecated/ActionList/Divider-7c6b656a.css +2 -0
- package/dist/deprecated/ActionList/Divider-7c6b656a.css.map +1 -0
- package/dist/deprecated/ActionList/Divider.d.ts +1 -2
- package/dist/deprecated/ActionList/Divider.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Divider.js +6 -12
- package/dist/deprecated/ActionList/Divider.module.css.js +5 -0
- package/dist/deprecated/ActionList/Group.d.ts +1 -2
- package/dist/deprecated/ActionList/Group.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Group.js +1 -8
- package/dist/deprecated/ActionList/Header-493b1d76.css +2 -0
- package/dist/deprecated/ActionList/Header-493b1d76.css.map +1 -0
- package/dist/deprecated/ActionList/Header.d.ts +2 -6
- package/dist/deprecated/ActionList/Header.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Header.js +46 -37
- package/dist/deprecated/ActionList/Header.module.css.js +5 -0
- package/dist/deprecated/ActionList/Item-cf87f98a.css +3 -0
- package/dist/deprecated/ActionList/Item-cf87f98a.css.map +1 -0
- package/dist/deprecated/ActionList/Item.d.ts +1 -5
- package/dist/deprecated/ActionList/Item.d.ts.map +1 -1
- package/dist/deprecated/ActionList/Item.js +182 -271
- package/dist/deprecated/ActionList/Item.module.css.js +5 -0
- package/dist/deprecated/ActionList/List-1ec9d6d9.css +2 -0
- package/dist/deprecated/ActionList/List-1ec9d6d9.css.map +1 -0
- package/dist/deprecated/ActionList/List.d.ts +1 -0
- package/dist/deprecated/ActionList/List.d.ts.map +1 -1
- package/dist/deprecated/ActionList/List.js +92 -82
- package/dist/deprecated/ActionList/List.module.css.js +5 -0
- package/dist/deprecated/UnderlineNav/UnderlineNav-0c1e0dff.css +2 -0
- package/dist/deprecated/UnderlineNav/UnderlineNav-0c1e0dff.css.map +1 -0
- package/dist/deprecated/UnderlineNav/UnderlineNav.d.ts +6 -8
- package/dist/deprecated/UnderlineNav/UnderlineNav.d.ts.map +1 -1
- package/dist/deprecated/UnderlineNav/UnderlineNav.js +90 -49
- package/dist/deprecated/UnderlineNav/UnderlineNav.module.css.js +5 -0
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts +11 -7
- package/dist/experimental/SelectPanel2/SelectPanel.d.ts.map +1 -1
- package/dist/experimental/SelectPanel2/SelectPanel.js +6 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts +6 -6
- package/dist/experimental/UnderlinePanels/UnderlinePanels.d.ts.map +1 -1
- package/dist/experimental/UnderlinePanels/UnderlinePanels.js +8 -4
- package/dist/hooks/useSlots.d.ts.map +1 -1
- package/dist/hooks/useSlots.js +3 -2
- package/dist/hooks/useSyncedState.js +1 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts +6 -7
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroup.js +7 -9
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.d.ts +4 -4
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupCaption.js +1 -0
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts +2 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupLabel.js +1 -0
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.d.ts +3 -3
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.d.ts.map +1 -1
- package/dist/internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupValidation.js +2 -3
- package/dist/internal/components/InputLabel.d.ts +2 -3
- package/dist/internal/components/InputLabel.d.ts.map +1 -1
- package/dist/internal/components/InputLabel.js +29 -36
- package/dist/internal/components/InputValidation.d.ts +1 -2
- package/dist/internal/components/InputValidation.d.ts.map +1 -1
- package/dist/internal/components/TextInputInnerAction.d.ts +16 -2
- package/dist/internal/components/TextInputInnerAction.d.ts.map +1 -1
- package/dist/internal/components/TextInputInnerAction.js +46 -60
- package/dist/internal/components/TextInputWrapper.d.ts +10 -32
- package/dist/internal/components/TextInputWrapper.d.ts.map +1 -1
- package/dist/internal/components/TextInputWrapper.js +87 -58
- package/dist/internal/components/UnstyledTextInput.d.ts +1 -2
- package/dist/internal/components/UnstyledTextInput.d.ts.map +1 -1
- package/dist/internal/components/UnstyledTextInput.js +1 -3
- package/dist/internal/components/ValidationAnimationContainer-04125429.css +2 -0
- package/dist/internal/components/ValidationAnimationContainer-04125429.css.map +1 -0
- package/dist/internal/components/ValidationAnimationContainer.d.ts.map +1 -1
- package/dist/internal/components/ValidationAnimationContainer.js +4 -9
- package/dist/internal/components/ValidationAnimationContainer.module.css.js +5 -0
- package/dist/utils/form-story-helpers.d.ts.map +1 -1
- package/dist/utils/is-slot.d.ts +6 -0
- package/dist/utils/is-slot.d.ts.map +1 -0
- package/dist/utils/is-slot.js +15 -0
- package/dist/utils/polymorphic.d.ts +2 -1
- package/dist/utils/polymorphic.d.ts.map +1 -1
- package/dist/utils/types/Slots.d.ts +7 -0
- package/dist/utils/types/Slots.d.ts.map +1 -0
- package/dist/utils/types/index.d.ts +1 -0
- package/dist/utils/types/index.d.ts.map +1 -1
- package/generated/components.json +21 -119
- package/package.json +2 -1
- package/dist/Button/styles.d.ts +0 -431
- package/dist/Button/styles.d.ts.map +0 -1
- package/dist/Button/styles.js +0 -5
- package/dist/ConfirmationDialog/ConfirmationDialog-de0401ff.css +0 -2
- package/dist/ConfirmationDialog/ConfirmationDialog-de0401ff.css.map +0 -1
- package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css +0 -2
- package/dist/FilteredActionList/FilteredActionList-e1eb1b75.css.map +0 -1
- package/dist/KeybindingHint/components/Chord-81099645.css +0 -2
- package/dist/KeybindingHint/components/Chord-81099645.css.map +0 -1
- package/dist/LabelGroup/LabelGroup-eda75c0f.css +0 -2
- package/dist/LabelGroup/LabelGroup-eda75c0f.css.map +0 -1
- package/dist/PageLayout/PageLayout-8a294e74.css.map +0 -1
- package/dist/StateLabel/StateLabel-aaa1d148.css.map +0 -1
- package/dist/UnderlineNav/UnderlineNav-78db938f.css +0 -2
- package/dist/UnderlineNav/UnderlineNav-78db938f.css.map +0 -1
- package/dist/internal/components/BoxWithFallback.d.ts +0 -6
- package/dist/internal/components/BoxWithFallback.d.ts.map +0 -1
- package/dist/internal/components/BoxWithFallback.js +0 -70
- package/dist/internal/utils/getGlobalFocusStyles.d.ts +0 -4
- package/dist/internal/utils/getGlobalFocusStyles.d.ts.map +0 -1
- package/dist/internal/utils/getGlobalFocusStyles.js +0 -7
- package/dist/internal/utils/sharedCheckboxAndRadioStyles.d.ts +0 -2
- package/dist/internal/utils/sharedCheckboxAndRadioStyles.d.ts.map +0 -1
- package/dist/utils/defaultSxProp.d.ts +0 -3
- package/dist/utils/defaultSxProp.d.ts.map +0 -1
- package/dist/utils/defaultSxProp.js +0 -3
- package/dist/utils/includeSystemProps.d.ts +0 -7
- package/dist/utils/includeSystemProps.d.ts.map +0 -1
- package/dist/utils/includeSystemProps.js +0 -14
|
@@ -12,7 +12,7 @@ import FormControlValidation from './_FormControlValidation.js';
|
|
|
12
12
|
import { FormControlContextProvider } from './_FormControlContext.js';
|
|
13
13
|
import { warning } from '../utils/warning.js';
|
|
14
14
|
import classes from './FormControl.module.css.js';
|
|
15
|
-
import {
|
|
15
|
+
import { isSlot } from '../utils/is-slot.js';
|
|
16
16
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
17
17
|
import CheckboxOrRadioGroupContext from '../internal/components/CheckboxOrRadioGroup/CheckboxOrRadioGroupContext.js';
|
|
18
18
|
import Autocomplete from '../Autocomplete/Autocomplete.js';
|
|
@@ -32,7 +32,6 @@ const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
32
32
|
layout: t1,
|
|
33
33
|
id: idProp,
|
|
34
34
|
required,
|
|
35
|
-
sx,
|
|
36
35
|
className,
|
|
37
36
|
style
|
|
38
37
|
} = t0;
|
|
@@ -57,10 +56,10 @@ const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
57
56
|
const validationMessageId = slots.validation ? `${id}-validationMessage` : undefined;
|
|
58
57
|
const captionId = slots.caption ? `${id}-caption` : undefined;
|
|
59
58
|
const validationStatus = (_slots$validation = slots.validation) === null || _slots$validation === void 0 ? void 0 : _slots$validation.props.variant;
|
|
60
|
-
const InputComponent = childrenWithoutSlots.find(child => expectedInputComponents.some(inputComponent => /*#__PURE__*/React.isValidElement(child) && child.type === inputComponent));
|
|
59
|
+
const InputComponent = childrenWithoutSlots.find(child => expectedInputComponents.some(inputComponent => /*#__PURE__*/React.isValidElement(child) && (child.type === inputComponent || isSlot(child, inputComponent))));
|
|
61
60
|
const inputProps = /*#__PURE__*/React.isValidElement(InputComponent) && InputComponent.props;
|
|
62
|
-
const isChoiceInput = /*#__PURE__*/React.isValidElement(InputComponent) && (InputComponent.type === Checkbox || InputComponent.type === Radio);
|
|
63
|
-
const isRadioInput = /*#__PURE__*/React.isValidElement(InputComponent) && InputComponent.type === Radio;
|
|
61
|
+
const isChoiceInput = /*#__PURE__*/React.isValidElement(InputComponent) && (InputComponent.type === Checkbox || InputComponent.type === Radio || isSlot(InputComponent, Checkbox) || isSlot(InputComponent, Radio));
|
|
62
|
+
const isRadioInput = /*#__PURE__*/React.isValidElement(InputComponent) && (InputComponent.type === Radio || isSlot(InputComponent, Radio));
|
|
64
63
|
if (InputComponent) {
|
|
65
64
|
process.env.NODE_ENV !== "production" ? warning(inputProps === null || inputProps === void 0 ? void 0 : inputProps.id, "instead of passing the 'id' prop directly to the input component, it should be passed to the parent component, <FormControl>") : void 0;
|
|
66
65
|
process.env.NODE_ENV !== "production" ? warning(inputProps === null || inputProps === void 0 ? void 0 : inputProps.disabled, "instead of passing the 'disabled' prop directly to the input component, it should be passed to the parent component, <FormControl>") : void 0;
|
|
@@ -76,103 +75,100 @@ const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
76
75
|
process.env.NODE_ENV !== "production" ? warning(!!slots.leadingVisual, "A leading visual is only rendered for a checkbox or radio form control. If you want to render a leading visual inside of your input, check if your input supports a leading visual.") : void 0;
|
|
77
76
|
}
|
|
78
77
|
const isLabelHidden = (_slots$label = slots.label) === null || _slots$label === void 0 ? void 0 : _slots$label.props.visuallyHidden;
|
|
79
|
-
const t3 =
|
|
80
|
-
const t4 = /*#__PURE__*/React.isValidElement(InputComponent) ? /*#__PURE__*/React.cloneElement(InputComponent, {
|
|
78
|
+
const t3 = /*#__PURE__*/React.isValidElement(InputComponent) ? /*#__PURE__*/React.cloneElement(InputComponent, {
|
|
81
79
|
id,
|
|
82
80
|
disabled,
|
|
83
81
|
required: required && !isRadioInput,
|
|
84
82
|
"aria-describedby": captionId
|
|
85
83
|
}) : null;
|
|
86
|
-
let
|
|
84
|
+
let t4;
|
|
87
85
|
if ($[1] !== childrenWithoutSlots) {
|
|
88
|
-
|
|
86
|
+
t4 = childrenWithoutSlots.filter(_temp2);
|
|
89
87
|
$[1] = childrenWithoutSlots;
|
|
90
|
-
$[2] =
|
|
88
|
+
$[2] = t4;
|
|
91
89
|
} else {
|
|
92
|
-
|
|
90
|
+
t4 = $[2];
|
|
93
91
|
}
|
|
94
|
-
let
|
|
95
|
-
if ($[3] !== t3
|
|
96
|
-
|
|
97
|
-
className:
|
|
98
|
-
children: [
|
|
92
|
+
let t5;
|
|
93
|
+
if ($[3] !== t3 || $[4] !== t4) {
|
|
94
|
+
t5 = /*#__PURE__*/jsxs("div", {
|
|
95
|
+
className: classes.ControlChoiceInputs,
|
|
96
|
+
children: [t3, t4]
|
|
99
97
|
});
|
|
100
|
-
$[3] = t3
|
|
98
|
+
$[3] = t3;
|
|
101
99
|
$[4] = t4;
|
|
102
100
|
$[5] = t5;
|
|
103
|
-
$[6] = t6;
|
|
104
101
|
} else {
|
|
105
|
-
|
|
102
|
+
t5 = $[5];
|
|
106
103
|
}
|
|
107
|
-
let
|
|
108
|
-
if ($[
|
|
109
|
-
|
|
104
|
+
let t6;
|
|
105
|
+
if ($[6] !== disabled || $[7] !== slots.caption || $[8] !== slots.leadingVisual) {
|
|
106
|
+
t6 = slots.leadingVisual ? /*#__PURE__*/jsx("div", {
|
|
110
107
|
className: classes.LeadingVisual,
|
|
111
108
|
"data-disabled": disabled ? "" : undefined,
|
|
112
109
|
"data-has-caption": slots.caption ? "" : undefined,
|
|
113
110
|
children: slots.leadingVisual
|
|
114
111
|
}) : null;
|
|
115
|
-
$[
|
|
116
|
-
$[
|
|
117
|
-
$[
|
|
118
|
-
$[
|
|
112
|
+
$[6] = disabled;
|
|
113
|
+
$[7] = slots.caption;
|
|
114
|
+
$[8] = slots.leadingVisual;
|
|
115
|
+
$[9] = t6;
|
|
119
116
|
} else {
|
|
120
|
-
|
|
117
|
+
t6 = $[9];
|
|
121
118
|
}
|
|
122
|
-
let
|
|
123
|
-
if ($[
|
|
124
|
-
|
|
119
|
+
let t7;
|
|
120
|
+
if ($[10] !== slots.caption || $[11] !== slots.label) {
|
|
121
|
+
t7 = /*#__PURE__*/jsxs("div", {
|
|
125
122
|
className: classes.LabelContainer,
|
|
126
123
|
children: [slots.label, slots.caption]
|
|
127
124
|
});
|
|
128
|
-
$[
|
|
129
|
-
$[
|
|
130
|
-
$[
|
|
125
|
+
$[10] = slots.caption;
|
|
126
|
+
$[11] = slots.label;
|
|
127
|
+
$[12] = t7;
|
|
131
128
|
} else {
|
|
132
|
-
|
|
129
|
+
t7 = $[12];
|
|
133
130
|
}
|
|
134
|
-
let
|
|
135
|
-
if ($[
|
|
136
|
-
|
|
137
|
-
children: [t6, t7
|
|
131
|
+
let t8;
|
|
132
|
+
if ($[13] !== t5 || $[14] !== t6 || $[15] !== t7) {
|
|
133
|
+
t8 = /*#__PURE__*/jsxs(Fragment, {
|
|
134
|
+
children: [t5, t6, t7]
|
|
138
135
|
});
|
|
136
|
+
$[13] = t5;
|
|
139
137
|
$[14] = t6;
|
|
140
138
|
$[15] = t7;
|
|
141
139
|
$[16] = t8;
|
|
142
|
-
$[17] = t9;
|
|
143
140
|
} else {
|
|
144
|
-
|
|
141
|
+
t8 = $[16];
|
|
145
142
|
}
|
|
146
|
-
const InputChildren =
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
143
|
+
const InputChildren = t8;
|
|
144
|
+
const T0 = FormControlContextProvider;
|
|
145
|
+
let t9;
|
|
146
|
+
if ($[17] !== captionId || $[18] !== disabled || $[19] !== id || $[20] !== required || $[21] !== validationMessageId) {
|
|
147
|
+
t9 = {
|
|
150
148
|
captionId,
|
|
151
149
|
disabled,
|
|
152
150
|
id,
|
|
153
151
|
required,
|
|
154
152
|
validationMessageId
|
|
155
153
|
};
|
|
156
|
-
$[
|
|
157
|
-
$[
|
|
158
|
-
$[
|
|
159
|
-
$[
|
|
160
|
-
$[
|
|
161
|
-
$[
|
|
154
|
+
$[17] = captionId;
|
|
155
|
+
$[18] = disabled;
|
|
156
|
+
$[19] = id;
|
|
157
|
+
$[20] = required;
|
|
158
|
+
$[21] = validationMessageId;
|
|
159
|
+
$[22] = t9;
|
|
162
160
|
} else {
|
|
163
|
-
|
|
161
|
+
t9 = $[22];
|
|
164
162
|
}
|
|
165
|
-
const
|
|
163
|
+
const t10 = isChoiceInput || layout === "horizontal" ? /*#__PURE__*/jsx("div", {
|
|
166
164
|
ref: ref,
|
|
167
165
|
"data-has-leading-visual": slots.leadingVisual ? "" : undefined,
|
|
168
|
-
sx: sx,
|
|
169
166
|
className: clsx(className, classes.ControlHorizontalLayout),
|
|
170
167
|
style: style,
|
|
171
168
|
children: InputChildren
|
|
172
|
-
}) : /*#__PURE__*/jsxs(
|
|
169
|
+
}) : /*#__PURE__*/jsxs("div", {
|
|
173
170
|
ref: ref,
|
|
174
171
|
"data-has-label": !isLabelHidden ? "" : undefined,
|
|
175
|
-
sx: sx,
|
|
176
172
|
className: clsx(className, classes.ControlVerticalLayout),
|
|
177
173
|
style: style,
|
|
178
174
|
children: [slots.label, /*#__PURE__*/React.isValidElement(InputComponent) && /*#__PURE__*/React.cloneElement(InputComponent, Object.assign({
|
|
@@ -181,26 +177,28 @@ const FormControl = /*#__PURE__*/React.forwardRef((t0, ref) => {
|
|
|
181
177
|
disabled,
|
|
182
178
|
validationStatus,
|
|
183
179
|
"aria-describedby": [validationMessageId, captionId].filter(Boolean).join(" ")
|
|
184
|
-
}, InputComponent.props)), childrenWithoutSlots.filter(child_2 => /*#__PURE__*/React.isValidElement(child_2) && !expectedInputComponents.some(inputComponent_1 => child_2.type === inputComponent_1)), slots.validation ? /*#__PURE__*/jsx(ValidationAnimationContainer, {
|
|
180
|
+
}, InputComponent.props)), childrenWithoutSlots.filter(child_2 => /*#__PURE__*/React.isValidElement(child_2) && !expectedInputComponents.some(inputComponent_1 => child_2.type === inputComponent_1 || isSlot(child_2, inputComponent_1))), slots.validation ? /*#__PURE__*/jsx(ValidationAnimationContainer, {
|
|
185
181
|
show: true,
|
|
186
182
|
children: slots.validation
|
|
187
183
|
}) : null, slots.caption]
|
|
188
184
|
});
|
|
189
|
-
let
|
|
190
|
-
if ($[24] !== t10 || $[25] !==
|
|
191
|
-
|
|
192
|
-
value:
|
|
193
|
-
children:
|
|
185
|
+
let t11;
|
|
186
|
+
if ($[23] !== T0 || $[24] !== t10 || $[25] !== t9) {
|
|
187
|
+
t11 = /*#__PURE__*/jsx(T0, {
|
|
188
|
+
value: t9,
|
|
189
|
+
children: t10
|
|
194
190
|
});
|
|
191
|
+
$[23] = T0;
|
|
195
192
|
$[24] = t10;
|
|
196
|
-
$[25] =
|
|
197
|
-
$[26] =
|
|
193
|
+
$[25] = t9;
|
|
194
|
+
$[26] = t11;
|
|
198
195
|
} else {
|
|
199
|
-
|
|
196
|
+
t11 = $[26];
|
|
200
197
|
}
|
|
201
|
-
return
|
|
198
|
+
return t11;
|
|
202
199
|
});
|
|
203
200
|
var FormControl$1 = Object.assign(FormControl, {
|
|
201
|
+
__SLOT__: Symbol('FormControl'),
|
|
204
202
|
Caption: FormControlCaption,
|
|
205
203
|
Label: FormControlLabel,
|
|
206
204
|
LeadingVisual: FormControlLeadingVisual,
|
|
@@ -211,7 +209,7 @@ function _temp(child_0) {
|
|
|
211
209
|
return /*#__PURE__*/React.isValidElement(child_0) && ((_child_0$props = child_0.props) === null || _child_0$props === void 0 ? void 0 : _child_0$props.required);
|
|
212
210
|
}
|
|
213
211
|
function _temp2(child_1) {
|
|
214
|
-
return /*#__PURE__*/React.isValidElement(child_1) && ![Checkbox, Radio].some(inputComponent_0 => child_1.type === inputComponent_0);
|
|
212
|
+
return /*#__PURE__*/React.isValidElement(child_1) && ![Checkbox, Radio].some(inputComponent_0 => child_1.type === inputComponent_0 || isSlot(child_1, inputComponent_0));
|
|
215
213
|
}
|
|
216
214
|
|
|
217
215
|
export { FormControl$1 as default };
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
|
|
3
|
-
type FormControlCaptionProps = React.PropsWithChildren<{
|
|
2
|
+
export type FormControlCaptionProps = React.PropsWithChildren<{
|
|
4
3
|
id?: string;
|
|
5
4
|
className?: string;
|
|
6
5
|
style?: React.CSSProperties;
|
|
7
|
-
}
|
|
8
|
-
declare function FormControlCaption({ id, children,
|
|
6
|
+
}>;
|
|
7
|
+
declare function FormControlCaption({ id, children, className, style }: FormControlCaptionProps): React.JSX.Element;
|
|
8
|
+
declare namespace FormControlCaption {
|
|
9
|
+
var __SLOT__: symbol;
|
|
10
|
+
}
|
|
9
11
|
export { FormControlCaption };
|
|
10
12
|
//# sourceMappingURL=FormControlCaption.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControlCaption.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlCaption.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FormControlCaption.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlCaption.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAK9B,MAAM,MAAM,uBAAuB,GAAG,KAAK,CAAC,iBAAiB,CAAC;IAC5D,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAC,CAAA;AAEF,iBAAS,kBAAkB,CAAC,EAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAC,EAAE,uBAAuB,qBAapF;kBAbQ,kBAAkB;;;AAiB3B,OAAO,EAAC,kBAAkB,EAAC,CAAA"}
|
|
@@ -2,16 +2,14 @@ import { c } from 'react-compiler-runtime';
|
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import classes from './FormControlCaption.module.css.js';
|
|
4
4
|
import { useFormControlContext } from './_FormControlContext.js';
|
|
5
|
-
import { BoxWithFallback } from '../internal/components/BoxWithFallback.js';
|
|
6
5
|
import { jsx } from 'react/jsx-runtime';
|
|
7
6
|
import Text from '../Text/Text.js';
|
|
8
7
|
|
|
9
8
|
function FormControlCaption(t0) {
|
|
10
|
-
const $ = c(
|
|
9
|
+
const $ = c(8);
|
|
11
10
|
const {
|
|
12
11
|
id,
|
|
13
12
|
children,
|
|
14
|
-
sx,
|
|
15
13
|
className,
|
|
16
14
|
style
|
|
17
15
|
} = t0;
|
|
@@ -30,27 +28,25 @@ function FormControlCaption(t0) {
|
|
|
30
28
|
}
|
|
31
29
|
const t3 = disabled ? "" : undefined;
|
|
32
30
|
let t4;
|
|
33
|
-
if ($[2] !== children || $[3] !== style || $[4] !==
|
|
34
|
-
t4 = /*#__PURE__*/jsx(
|
|
35
|
-
as: Text,
|
|
31
|
+
if ($[2] !== children || $[3] !== style || $[4] !== t1 || $[5] !== t2 || $[6] !== t3) {
|
|
32
|
+
t4 = /*#__PURE__*/jsx(Text, {
|
|
36
33
|
id: t1,
|
|
37
34
|
className: t2,
|
|
38
35
|
"data-control-disabled": t3,
|
|
39
|
-
sx: sx,
|
|
40
36
|
style: style,
|
|
41
37
|
children: children
|
|
42
38
|
});
|
|
43
39
|
$[2] = children;
|
|
44
40
|
$[3] = style;
|
|
45
|
-
$[4] =
|
|
46
|
-
$[5] =
|
|
47
|
-
$[6] =
|
|
48
|
-
$[7] =
|
|
49
|
-
$[8] = t4;
|
|
41
|
+
$[4] = t1;
|
|
42
|
+
$[5] = t2;
|
|
43
|
+
$[6] = t3;
|
|
44
|
+
$[7] = t4;
|
|
50
45
|
} else {
|
|
51
|
-
t4 = $[
|
|
46
|
+
t4 = $[7];
|
|
52
47
|
}
|
|
53
48
|
return t4;
|
|
54
49
|
}
|
|
50
|
+
FormControlCaption.__SLOT__ = Symbol('FormControl.Caption');
|
|
55
51
|
|
|
56
52
|
export { FormControlCaption };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { SxProp } from '../sx';
|
|
3
2
|
import { InputLabel } from '../internal/components/InputLabel';
|
|
3
|
+
import type { FCWithSlotMarker } from '../utils/types';
|
|
4
4
|
export type Props = {
|
|
5
5
|
/**
|
|
6
6
|
* Whether the label should be visually hidden
|
|
@@ -11,8 +11,8 @@ export type Props = {
|
|
|
11
11
|
id?: string;
|
|
12
12
|
className?: string;
|
|
13
13
|
style?: React.CSSProperties;
|
|
14
|
-
}
|
|
15
|
-
declare const FormControlLabel:
|
|
14
|
+
};
|
|
15
|
+
declare const FormControlLabel: FCWithSlotMarker<React.PropsWithChildren<{
|
|
16
16
|
htmlFor?: string;
|
|
17
17
|
} & React.ComponentProps<typeof InputLabel> & Props>>;
|
|
18
18
|
export default FormControlLabel;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControlLabel.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FormControlLabel.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlLabel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAC,UAAU,EAAC,MAAM,mCAAmC,CAAA;AAC5D,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,KAAK,GAAG;IAClB;;OAEG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;AAED,QAAA,MAAM,gBAAgB,EAAE,gBAAgB,CACtC,KAAK,CAAC,iBAAiB,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,GAAG,KAAK,CAAC,cAAc,CAAC,OAAO,UAAU,CAAC,GAAG,KAAK,CAAC,CAkC9F,CAAA;AAID,eAAe,gBAAgB,CAAA"}
|
|
@@ -4,7 +4,7 @@ import { InputLabel } from '../internal/components/InputLabel.js';
|
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
const FormControlLabel = t0 => {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(25);
|
|
8
8
|
let as;
|
|
9
9
|
let children;
|
|
10
10
|
let className;
|
|
@@ -12,7 +12,6 @@ const FormControlLabel = t0 => {
|
|
|
12
12
|
let id;
|
|
13
13
|
let props;
|
|
14
14
|
let requiredText;
|
|
15
|
-
let sx;
|
|
16
15
|
let t1;
|
|
17
16
|
let visuallyHidden;
|
|
18
17
|
if ($[0] !== t0) {
|
|
@@ -24,7 +23,6 @@ const FormControlLabel = t0 => {
|
|
|
24
23
|
visuallyHidden,
|
|
25
24
|
requiredIndicator: t1,
|
|
26
25
|
requiredText,
|
|
27
|
-
sx,
|
|
28
26
|
className,
|
|
29
27
|
...props
|
|
30
28
|
} = t0);
|
|
@@ -36,9 +34,8 @@ const FormControlLabel = t0 => {
|
|
|
36
34
|
$[5] = id;
|
|
37
35
|
$[6] = props;
|
|
38
36
|
$[7] = requiredText;
|
|
39
|
-
$[8] =
|
|
40
|
-
$[9] =
|
|
41
|
-
$[10] = visuallyHidden;
|
|
37
|
+
$[8] = t1;
|
|
38
|
+
$[9] = visuallyHidden;
|
|
42
39
|
} else {
|
|
43
40
|
as = $[1];
|
|
44
41
|
children = $[2];
|
|
@@ -47,9 +44,8 @@ const FormControlLabel = t0 => {
|
|
|
47
44
|
id = $[5];
|
|
48
45
|
props = $[6];
|
|
49
46
|
requiredText = $[7];
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
visuallyHidden = $[10];
|
|
47
|
+
t1 = $[8];
|
|
48
|
+
visuallyHidden = $[9];
|
|
53
49
|
}
|
|
54
50
|
const requiredIndicator = t1 === undefined ? true : t1;
|
|
55
51
|
const {
|
|
@@ -58,7 +54,7 @@ const FormControlLabel = t0 => {
|
|
|
58
54
|
required
|
|
59
55
|
} = useFormControlContext();
|
|
60
56
|
let t2;
|
|
61
|
-
if ($[
|
|
57
|
+
if ($[10] !== as || $[11] !== className || $[12] !== disabled || $[13] !== formControlId || $[14] !== htmlFor || $[15] !== id || $[16] !== props || $[17] !== required || $[18] !== requiredIndicator || $[19] !== requiredText || $[20] !== visuallyHidden) {
|
|
62
58
|
t2 = as === "legend" || as === "span" ? {
|
|
63
59
|
as,
|
|
64
60
|
id,
|
|
@@ -68,7 +64,6 @@ const FormControlLabel = t0 => {
|
|
|
68
64
|
requiredText,
|
|
69
65
|
requiredIndicator,
|
|
70
66
|
disabled,
|
|
71
|
-
sx,
|
|
72
67
|
...props
|
|
73
68
|
} : {
|
|
74
69
|
as,
|
|
@@ -80,39 +75,38 @@ const FormControlLabel = t0 => {
|
|
|
80
75
|
requiredText,
|
|
81
76
|
requiredIndicator,
|
|
82
77
|
disabled,
|
|
83
|
-
sx,
|
|
84
78
|
...props
|
|
85
79
|
};
|
|
86
|
-
$[
|
|
87
|
-
$[
|
|
88
|
-
$[
|
|
89
|
-
$[
|
|
90
|
-
$[
|
|
91
|
-
$[
|
|
92
|
-
$[
|
|
93
|
-
$[
|
|
94
|
-
$[
|
|
95
|
-
$[
|
|
96
|
-
$[
|
|
97
|
-
$[
|
|
98
|
-
$[23] = t2;
|
|
80
|
+
$[10] = as;
|
|
81
|
+
$[11] = className;
|
|
82
|
+
$[12] = disabled;
|
|
83
|
+
$[13] = formControlId;
|
|
84
|
+
$[14] = htmlFor;
|
|
85
|
+
$[15] = id;
|
|
86
|
+
$[16] = props;
|
|
87
|
+
$[17] = required;
|
|
88
|
+
$[18] = requiredIndicator;
|
|
89
|
+
$[19] = requiredText;
|
|
90
|
+
$[20] = visuallyHidden;
|
|
91
|
+
$[21] = t2;
|
|
99
92
|
} else {
|
|
100
|
-
t2 = $[
|
|
93
|
+
t2 = $[21];
|
|
101
94
|
}
|
|
102
95
|
const labelProps = t2;
|
|
103
96
|
let t3;
|
|
104
|
-
if ($[
|
|
97
|
+
if ($[22] !== children || $[23] !== labelProps) {
|
|
105
98
|
t3 = /*#__PURE__*/jsx(InputLabel, {
|
|
106
99
|
...labelProps,
|
|
107
100
|
children: children
|
|
108
101
|
});
|
|
109
|
-
$[
|
|
110
|
-
$[
|
|
111
|
-
$[
|
|
102
|
+
$[22] = children;
|
|
103
|
+
$[23] = labelProps;
|
|
104
|
+
$[24] = t3;
|
|
112
105
|
} else {
|
|
113
|
-
t3 = $[
|
|
106
|
+
t3 = $[24];
|
|
114
107
|
}
|
|
115
108
|
return t3;
|
|
116
109
|
};
|
|
110
|
+
FormControlLabel.__SLOT__ = Symbol('FormControl.Label');
|
|
117
111
|
|
|
118
112
|
export { FormControlLabel as default };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-FormControl-LeadingVisual-Gycks{--leadingVisual-size:16px;align-items:center;color:var(--fgColor-default,var(--color-fg-default));display:flex}.prc-FormControl-LeadingVisual-Gycks:where([data-control-disabled]){color:var(--control-fgColor-disabled,var(--color-primer-fg-disabled))}.prc-FormControl-LeadingVisual-Gycks>*{min-height:var(--leadingVisual-size);min-width:var(--leadingVisual-size);fill:currentColor}.prc-FormControl-LeadingVisual-Gycks:where([data-has-caption]){--leadingVisual-size:24px}
|
|
2
|
+
/*# sourceMappingURL=FormControlLeadingVisual-e217df71.css.map */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/FormControl/FormControlLeadingVisual.module.css"],"names":[],"mappings":"AAAA,qCACE,yBAA0B,CAI1B,kBAAmB,CAFnB,oDAA6B,CAC7B,YAgBF,CAbE,oEACE,qEACF,CAEA,uCAEE,oCAAqC,CADrC,mCAAoC,CAEpC,iBACF,CAEA,+DACE,yBACF","file":"FormControlLeadingVisual-e217df71.css","sourcesContent":[".LeadingVisual {\n --leadingVisual-size: 16px;\n\n color: var(--fgColor-default);\n display: flex;\n align-items: center;\n\n &:where([data-control-disabled]) {\n color: var(--control-fgColor-disabled);\n }\n\n & > * {\n min-width: var(--leadingVisual-size);\n min-height: var(--leadingVisual-size);\n fill: currentColor;\n }\n\n &:where([data-has-caption]) {\n --leadingVisual-size: 24px;\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type {
|
|
3
|
-
declare const FormControlLeadingVisual:
|
|
2
|
+
import type { FCWithSlotMarker } from '../utils/types';
|
|
3
|
+
declare const FormControlLeadingVisual: FCWithSlotMarker<React.PropsWithChildren<{
|
|
4
4
|
style?: React.CSSProperties;
|
|
5
5
|
}>>;
|
|
6
6
|
export default FormControlLeadingVisual;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormControlLeadingVisual.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlLeadingVisual.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"FormControlLeadingVisual.d.ts","sourceRoot":"","sources":["../../src/FormControl/FormControlLeadingVisual.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,QAAA,MAAM,wBAAwB,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAiB,CAAC;IAAC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAAC,CAAC,CAetG,CAAA;AAID,eAAe,wBAAwB,CAAA"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import { get } from '../constants.js';
|
|
3
2
|
import { useFormControlContext } from './_FormControlContext.js';
|
|
4
|
-
import
|
|
5
|
-
import sx from '../sx.js';
|
|
3
|
+
import classes from './FormControlLeadingVisual.module.css.js';
|
|
6
4
|
import { jsx } from 'react/jsx-runtime';
|
|
7
5
|
|
|
8
6
|
const FormControlLeadingVisual = t0 => {
|
|
9
|
-
const $ = c(
|
|
7
|
+
const $ = c(5);
|
|
10
8
|
const {
|
|
11
9
|
children,
|
|
12
|
-
sx,
|
|
13
10
|
style
|
|
14
11
|
} = t0;
|
|
15
12
|
const {
|
|
@@ -19,28 +16,24 @@ const FormControlLeadingVisual = t0 => {
|
|
|
19
16
|
const t1 = disabled ? "" : undefined;
|
|
20
17
|
const t2 = captionId ? "" : undefined;
|
|
21
18
|
let t3;
|
|
22
|
-
if ($[0] !== children || $[1] !== style || $[2] !==
|
|
23
|
-
t3 = /*#__PURE__*/jsx(
|
|
19
|
+
if ($[0] !== children || $[1] !== style || $[2] !== t1 || $[3] !== t2) {
|
|
20
|
+
t3 = /*#__PURE__*/jsx("div", {
|
|
21
|
+
className: classes.LeadingVisual,
|
|
24
22
|
"data-control-disabled": t1,
|
|
25
23
|
style: style,
|
|
26
24
|
"data-has-caption": t2,
|
|
27
|
-
sx: sx,
|
|
28
25
|
children: children
|
|
29
26
|
});
|
|
30
27
|
$[0] = children;
|
|
31
28
|
$[1] = style;
|
|
32
|
-
$[2] =
|
|
33
|
-
$[3] =
|
|
34
|
-
$[4] =
|
|
35
|
-
$[5] = t3;
|
|
29
|
+
$[2] = t1;
|
|
30
|
+
$[3] = t2;
|
|
31
|
+
$[4] = t3;
|
|
36
32
|
} else {
|
|
37
|
-
t3 = $[
|
|
33
|
+
t3 = $[4];
|
|
38
34
|
}
|
|
39
35
|
return t3;
|
|
40
36
|
};
|
|
41
|
-
|
|
42
|
-
displayName: "FormControlLeadingVisual__StyledLeadingVisual",
|
|
43
|
-
componentId: "sc-1c26i0t-0"
|
|
44
|
-
})(["--leadingVisual-size:", ";color:var(--fgColor-default);display:flex;align-items:center;&:where([data-control-disabled]){color:var(--control-fgColor-disabled);}& > *{min-width:var(--leadingVisual-size);min-height:var(--leadingVisual-size);fill:currentColor;}&:where([data-has-caption]){--leadingVisual-size:", ";}", ""], get('fontSizes.2'), get('fontSizes.4'), sx);
|
|
37
|
+
FormControlLeadingVisual.__SLOT__ = Symbol('FormControl.LeadingVisual');
|
|
45
38
|
|
|
46
39
|
export { FormControlLeadingVisual as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { c } from 'react-compiler-runtime';
|
|
2
|
-
import {
|
|
2
|
+
import { createContext, useContext } from 'react';
|
|
3
3
|
|
|
4
4
|
const FormControlContext = /*#__PURE__*/createContext(null);
|
|
5
5
|
const FormControlContextProvider = FormControlContext.Provider;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import type { SxProp } from '../sx';
|
|
3
2
|
import type { FormValidationStatus } from '../utils/types/FormValidationStatus';
|
|
3
|
+
import type { FCWithSlotMarker } from '../utils/types';
|
|
4
4
|
export type FormControlValidationProps = {
|
|
5
5
|
variant: FormValidationStatus;
|
|
6
6
|
id?: string;
|
|
7
7
|
className?: string;
|
|
8
8
|
style?: React.CSSProperties;
|
|
9
|
-
}
|
|
10
|
-
declare const FormControlValidation:
|
|
9
|
+
};
|
|
10
|
+
declare const FormControlValidation: FCWithSlotMarker<React.PropsWithChildren<FormControlValidationProps>>;
|
|
11
11
|
export default FormControlValidation;
|
|
12
12
|
//# sourceMappingURL=_FormControlValidation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_FormControlValidation.d.ts","sourceRoot":"","sources":["../../src/FormControl/_FormControlValidation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,
|
|
1
|
+
{"version":3,"file":"_FormControlValidation.d.ts","sourceRoot":"","sources":["../../src/FormControl/_FormControlValidation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,qCAAqC,CAAA;AAE7E,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,gBAAgB,CAAA;AAEpD,MAAM,MAAM,0BAA0B,GAAG;IACvC,OAAO,EAAE,oBAAoB,CAAA;IAC7B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAA;CAC5B,CAAA;AAED,QAAA,MAAM,qBAAqB,EAAE,gBAAgB,CAAC,KAAK,CAAC,iBAAiB,CAAC,0BAA0B,CAAC,CAkBhG,CAAA;AAID,eAAe,qBAAqB,CAAA"}
|
|
@@ -4,12 +4,11 @@ import { useFormControlContext } from './_FormControlContext.js';
|
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
6
6
|
const FormControlValidation = t0 => {
|
|
7
|
-
const $ = c(
|
|
7
|
+
const $ = c(6);
|
|
8
8
|
const {
|
|
9
9
|
children,
|
|
10
10
|
className,
|
|
11
11
|
variant,
|
|
12
|
-
sx,
|
|
13
12
|
id,
|
|
14
13
|
style
|
|
15
14
|
} = t0;
|
|
@@ -18,26 +17,25 @@ const FormControlValidation = t0 => {
|
|
|
18
17
|
} = useFormControlContext();
|
|
19
18
|
const t1 = id || validationMessageId || "";
|
|
20
19
|
let t2;
|
|
21
|
-
if ($[0] !== children || $[1] !== className || $[2] !== style || $[3] !==
|
|
20
|
+
if ($[0] !== children || $[1] !== className || $[2] !== style || $[3] !== t1 || $[4] !== variant) {
|
|
22
21
|
t2 = /*#__PURE__*/jsx(InputValidation, {
|
|
23
22
|
className: className,
|
|
24
23
|
validationStatus: variant,
|
|
25
24
|
id: t1,
|
|
26
|
-
sx: sx,
|
|
27
25
|
style: style,
|
|
28
26
|
children: children
|
|
29
27
|
});
|
|
30
28
|
$[0] = children;
|
|
31
29
|
$[1] = className;
|
|
32
30
|
$[2] = style;
|
|
33
|
-
$[3] =
|
|
34
|
-
$[4] =
|
|
35
|
-
$[5] =
|
|
36
|
-
$[6] = t2;
|
|
31
|
+
$[3] = t1;
|
|
32
|
+
$[4] = variant;
|
|
33
|
+
$[5] = t2;
|
|
37
34
|
} else {
|
|
38
|
-
t2 = $[
|
|
35
|
+
t2 = $[5];
|
|
39
36
|
}
|
|
40
37
|
return t2;
|
|
41
38
|
};
|
|
39
|
+
FormControlValidation.__SLOT__ = Symbol('FormControl.Validation');
|
|
42
40
|
|
|
43
41
|
export { FormControlValidation as default };
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
export { useFormControlForwardedProps } from './_FormControlContext';
|
|
2
2
|
export { default } from './FormControl';
|
|
3
|
+
export type { FormControlProps } from './FormControl';
|
|
4
|
+
export type { FormControlCaptionProps } from './FormControlCaption';
|
|
5
|
+
export type { Props as FormControlLabelProps } from './FormControlLabel';
|
|
6
|
+
export type { FormControlValidationProps } from './_FormControlValidation';
|
|
3
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FormControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,4BAA4B,EAAC,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FormControl/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,4BAA4B,EAAC,MAAM,uBAAuB,CAAA;AAClE,OAAO,EAAC,OAAO,EAAC,MAAM,eAAe,CAAA;AACrC,YAAY,EAAC,gBAAgB,EAAC,MAAM,eAAe,CAAA;AACnD,YAAY,EAAC,uBAAuB,EAAC,MAAM,sBAAsB,CAAA;AACjE,YAAY,EAAC,KAAK,IAAI,qBAAqB,EAAC,MAAM,oBAAoB,CAAA;AACtE,YAAY,EAAC,0BAA0B,EAAC,MAAM,0BAA0B,CAAA"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
.prc-components-Chord-vlqS5{border:var(--borderWidth-thin,.0625rem) solid;border-radius:var(--borderRadius-default,.375rem);box-shadow:none;display:inline-flex;font-size:var(--text-body-size-small,.75rem);font-weight:var(--base-text-weight-normal,400);gap:.5ch;justify-content:center;line-height:10px;overflow:hidden;padding:var(--base-size-4,.25rem);vertical-align:baseline}.prc-components-ChordNormal-6rvP6{background:var(--bgColor-transparent,transparent);border-color:var(--borderColor-default,var(--color-border-default));color:var(--fgColor-muted,var(--color-fg-muted))}.prc-components-ChordOnEmphasis-XDov-{background:var(--counter-bgColor-emphasis,#59636e)}.prc-components-ChordOnEmphasis-XDov-,.prc-components-ChordOnPrimary--7rmy{border-color:transparent;color:var(--fgColor-onEmphasis,var(--color-fg-on-emphasis))}.prc-components-ChordOnPrimary--7rmy{background:var(--button-primary-bgColor-active,var(--color-btn-primary-selected-bg))}.prc-components-ChordSmall-nDiio{border-radius:var(--borderRadius-small,.1875rem);font-size:11px;line-height:var(--base-size-8,.5rem);min-width:var(--base-size-16,1rem);padding:var(--base-size-2,.125rem)}.prc-components-ChordNormal-6rvP6:not(.prc-components-ChordSmall-nDiio){border-radius:var(--borderRadius-medium,.375rem);font-size:var(--text-body-size-small,.75rem);line-height:10px;min-width:var(--base-size-20,1.25rem);padding:var(--base-size-4,.25rem)}
|
|
2
|
+
/*# sourceMappingURL=Chord-d4edcc89.css.map */
|