@consta/uikit 3.24.5 → 3.25.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/Attach/package.json +1 -1
- package/Attachment/package.json +1 -1
- package/Avatar/package.json +1 -1
- package/Badge/package.json +1 -1
- package/BasicSelectDeprecated/package.json +1 -1
- package/Breadcrumbs/package.json +1 -1
- package/BreadcrumbsCanary/package.json +1 -1
- package/Button/package.json +1 -1
- package/CHANGELOG.md +11 -20
- package/Calendar/package.json +1 -1
- package/Card/package.json +1 -1
- package/Checkbox/package.json +1 -1
- package/CheckboxGroup/package.json +1 -1
- package/CheckboxGroupCanary/package.json +1 -1
- package/ChoiceGroup/package.json +1 -1
- package/ChoiceGroupCanary/package.json +1 -1
- package/Collapse/package.json +1 -1
- package/CollapseGroup/package.json +1 -1
- package/Combobox/package.json +1 -1
- package/ComboboxDeprecated/package.json +1 -1
- package/ContextMenu/package.json +1 -1
- package/ContextMenuCanary/package.json +1 -1
- package/DatePickerCanary/package.json +1 -1
- package/DateTimeCanary/package.json +1 -1
- package/DragNDropField/package.json +1 -1
- package/EventInterceptor/package.json +1 -1
- package/FieldCaption/package.json +1 -1
- package/FieldGroup/es.js +1 -0
- package/FieldGroup/index.d.ts +1 -0
- package/FieldGroup/index.js +4 -0
- package/FieldGroup/package.json +9 -0
- package/FieldLabel/package.json +1 -1
- package/File/package.json +1 -1
- package/FileField/package.json +1 -1
- package/FileIcon/package.json +1 -1
- package/FileIconAvi/package.json +1 -1
- package/FileIconBmp/package.json +1 -1
- package/FileIconCsv/package.json +1 -1
- package/FileIconDoc/package.json +1 -1
- package/FileIconExe/package.json +1 -1
- package/FileIconGif/package.json +1 -1
- package/FileIconJpg/package.json +1 -1
- package/FileIconJson/package.json +1 -1
- package/FileIconLoading/package.json +1 -1
- package/FileIconMov/package.json +1 -1
- package/FileIconMp3/package.json +1 -1
- package/FileIconMp4/package.json +1 -1
- package/FileIconPdf/package.json +1 -1
- package/FileIconPng/package.json +1 -1
- package/FileIconPpt/package.json +1 -1
- package/FileIconRar/package.json +1 -1
- package/FileIconRtf/package.json +1 -1
- package/FileIconTiff/package.json +1 -1
- package/FileIconTxt/package.json +1 -1
- package/FileIconUndefined/package.json +1 -1
- package/FileIconWav/package.json +1 -1
- package/FileIconXls/package.json +1 -1
- package/FileIconZip/package.json +1 -1
- package/Grid/package.json +1 -1
- package/Header/package.json +1 -1
- package/Icon/package.json +1 -1
- package/IconAdd/package.json +1 -1
- package/IconAddToComparison/package.json +1 -1
- package/IconAlert/package.json +1 -1
- package/IconAlignBlocksLeft/package.json +1 -1
- package/IconAlignBlocksRight/package.json +1 -1
- package/IconAlignCenter/package.json +1 -1
- package/IconAlignJustify/package.json +1 -1
- package/IconAlignLeft/package.json +1 -1
- package/IconAlignRight/package.json +1 -1
- package/IconAllDone/package.json +1 -1
- package/IconArrowDown/package.json +1 -1
- package/IconArrowLeft/package.json +1 -1
- package/IconArrowRight/package.json +1 -1
- package/IconArrowUp/package.json +1 -1
- package/IconArtBrush/package.json +1 -1
- package/IconAttach/package.json +1 -1
- package/IconBackward/package.json +1 -1
- package/IconBag/package.json +1 -1
- package/IconBarrier/package.json +1 -1
- package/IconBento/package.json +1 -1
- package/IconBold/package.json +1 -1
- package/IconBook/package.json +1 -1
- package/IconBookmarkFilled/package.json +1 -1
- package/IconBookmarkStroked/package.json +1 -1
- package/IconCalculator/package.json +1 -1
- package/IconCalendar/package.json +1 -1
- package/IconCamera/package.json +1 -1
- package/IconCancel/package.json +1 -1
- package/IconCards/package.json +1 -1
- package/IconChat/package.json +1 -1
- package/IconCheck/package.json +1 -1
- package/IconClose/package.json +1 -1
- package/IconCollapse/package.json +1 -1
- package/IconColorFill/package.json +1 -1
- package/IconColorText/package.json +1 -1
- package/IconColumns/package.json +1 -1
- package/IconComment/package.json +1 -1
- package/IconConnection/package.json +1 -1
- package/IconCopy/package.json +1 -1
- package/IconCrown/package.json +1 -1
- package/IconCursorMouse/package.json +1 -1
- package/IconDataNull/package.json +1 -1
- package/IconDiamond/package.json +1 -1
- package/IconDinosaur/package.json +1 -1
- package/IconDisconnection/package.json +1 -1
- package/IconDocAdd/package.json +1 -1
- package/IconDocBlank/package.json +1 -1
- package/IconDocDelete/package.json +1 -1
- package/IconDocExport/package.json +1 -1
- package/IconDocFilled/package.json +1 -1
- package/IconDown/package.json +1 -1
- package/IconDownload/package.json +1 -1
- package/IconDrag/package.json +1 -1
- package/IconDraggable/package.json +1 -1
- package/IconDrillingRig/package.json +1 -1
- package/IconDrop/package.json +1 -1
- package/IconEdit/package.json +1 -1
- package/IconExit/package.json +1 -1
- package/IconExpand/package.json +1 -1
- package/IconEye/package.json +1 -1
- package/IconEyeClose/package.json +1 -1
- package/IconFacebook/package.json +1 -1
- package/IconFavorite/package.json +1 -1
- package/IconFilter/package.json +1 -1
- package/IconFitToDefault/package.json +1 -1
- package/IconFlagFilled/package.json +1 -1
- package/IconFlagStroked/package.json +1 -1
- package/IconFolders/package.json +1 -1
- package/IconForward/package.json +1 -1
- package/IconFunnel/package.json +1 -1
- package/IconGas/package.json +1 -1
- package/IconGeo/package.json +1 -1
- package/IconGrouping/package.json +1 -1
- package/IconHamburger/package.json +1 -1
- package/IconHand/package.json +1 -1
- package/IconHealth/package.json +1 -1
- package/IconHome/package.json +1 -1
- package/IconInComparison/package.json +1 -1
- package/IconInfo/package.json +1 -1
- package/IconInstagram/package.json +1 -1
- package/IconIntroduction/package.json +1 -1
- package/IconIpad/package.json +1 -1
- package/IconItalic/package.json +1 -1
- package/IconKebab/package.json +1 -1
- package/IconLaptop/package.json +1 -1
- package/IconLayers/package.json +1 -1
- package/IconLeaf/package.json +1 -1
- package/IconLightningBolt/package.json +1 -1
- package/IconLineAndBarChart/package.json +1 -1
- package/IconLink/package.json +1 -1
- package/IconList/package.json +1 -1
- package/IconListNumbered/package.json +1 -1
- package/IconLock/package.json +1 -1
- package/IconLogicalElement/package.json +1 -1
- package/IconMBU/package.json +1 -1
- package/IconMGRP/package.json +1 -1
- package/IconMLSP/package.json +1 -1
- package/IconMMP/package.json +1 -1
- package/IconMail/package.json +1 -1
- package/IconMap/package.json +1 -1
- package/IconMaxHeight/package.json +1 -1
- package/IconMaxWidth/package.json +1 -1
- package/IconMeatball/package.json +1 -1
- package/IconMic/package.json +1 -1
- package/IconMolecules/package.json +1 -1
- package/IconMoon/package.json +1 -1
- package/IconNodeEnd/package.json +1 -1
- package/IconNodeStart/package.json +1 -1
- package/IconNodeStep/package.json +1 -1
- package/IconNodes/package.json +1 -1
- package/IconOpenInNew/package.json +1 -1
- package/IconOperators/package.json +1 -1
- package/IconPanelBottom/package.json +1 -1
- package/IconPanelLeft/package.json +1 -1
- package/IconPanelRight/package.json +1 -1
- package/IconPanelTop/package.json +1 -1
- package/IconPaste/package.json +1 -1
- package/IconPause/package.json +1 -1
- package/IconPhone/package.json +1 -1
- package/IconPhoto/package.json +1 -1
- package/IconPicture/package.json +1 -1
- package/IconPlay/package.json +1 -1
- package/IconPressure/package.json +1 -1
- package/IconPriceLabel/package.json +1 -1
- package/IconProcessing/package.json +1 -1
- package/IconQuestion/package.json +1 -1
- package/IconQuote/package.json +1 -1
- package/IconRUO/package.json +1 -1
- package/IconRUS/package.json +1 -1
- package/IconRecord/package.json +1 -1
- package/IconRemove/package.json +1 -1
- package/IconRemoveFromComparison/package.json +1 -1
- package/IconReply/package.json +1 -1
- package/IconResize/package.json +1 -1
- package/IconRestart/package.json +1 -1
- package/IconRevert/package.json +1 -1
- package/IconRing/package.json +1 -1
- package/IconRouble/package.json +1 -1
- package/IconRuler/package.json +1 -1
- package/IconSave/package.json +1 -1
- package/IconScreen/package.json +1 -1
- package/IconSearch/package.json +1 -1
- package/IconSelect/package.json +1 -1
- package/IconSelectOpen/package.json +1 -1
- package/IconSendMessage/package.json +1 -1
- package/IconSettings/package.json +1 -1
- package/IconShape/package.json +1 -1
- package/IconShuffle/package.json +1 -1
- package/IconSmile/package.json +1 -1
- package/IconSortDown/package.json +1 -1
- package/IconSortDownCenter/package.json +1 -1
- package/IconSortUp/package.json +1 -1
- package/IconSortUpCenter/package.json +1 -1
- package/IconStop/package.json +1 -1
- package/IconStorage/package.json +1 -1
- package/IconStrikethrough/package.json +1 -1
- package/IconSun/package.json +1 -1
- package/IconTable/package.json +1 -1
- package/IconTable2/package.json +1 -1
- package/IconTarget/package.json +1 -1
- package/IconTeam/package.json +1 -1
- package/IconTechResponse/package.json +1 -1
- package/IconTest/package.json +1 -1
- package/IconThumbUp/package.json +1 -1
- package/IconTie/package.json +1 -1
- package/IconTop/package.json +1 -1
- package/IconTrash/package.json +1 -1
- package/IconType/package.json +1 -1
- package/IconUnderline/package.json +1 -1
- package/IconUnlock/package.json +1 -1
- package/IconUnsort/package.json +1 -1
- package/IconUnsortCenter/package.json +1 -1
- package/IconUpload/package.json +1 -1
- package/IconUser/package.json +1 -1
- package/IconVZD/package.json +1 -1
- package/IconVideo/package.json +1 -1
- package/IconVkontakte/package.json +1 -1
- package/IconWarning/package.json +1 -1
- package/IconWatch/package.json +1 -1
- package/IconWideScreen/package.json +1 -1
- package/IconWorld/package.json +1 -1
- package/IconWrench/package.json +1 -1
- package/IconYandexDzen/package.json +1 -1
- package/IconYoutube/package.json +1 -1
- package/Informer/package.json +1 -1
- package/LayoutCanary/package.json +1 -1
- package/Loader/package.json +1 -1
- package/MixCard/package.json +1 -1
- package/MixFocus/package.json +1 -1
- package/MixPopoverAnimate/package.json +1 -1
- package/MixPopoverArrow/package.json +1 -1
- package/MixSpace/package.json +1 -1
- package/MixVisuallyHidden/package.json +1 -1
- package/Modal/package.json +1 -1
- package/MultiComboboxDeprecated/package.json +1 -1
- package/Pagination/package.json +1 -1
- package/Popover/package.json +1 -1
- package/PortalWithTheme/package.json +1 -1
- package/ProgressSpin/package.json +1 -1
- package/ProgressStepBarCanary/package.json +1 -1
- package/Radio/package.json +1 -1
- package/RadioGroup/package.json +1 -1
- package/Responses/package.json +1 -1
- package/Responses403/package.json +1 -1
- package/Responses404/package.json +1 -1
- package/Responses500/package.json +1 -1
- package/Responses503/package.json +1 -1
- package/ResponsesConnectionError/package.json +1 -1
- package/ResponsesDeleted/package.json +1 -1
- package/ResponsesEmptyBox/package.json +1 -1
- package/ResponsesEmptyPockets/package.json +1 -1
- package/ResponsesExit/package.json +1 -1
- package/ResponsesImage/package.json +1 -1
- package/ResponsesImage403/package.json +1 -1
- package/ResponsesImage404/package.json +1 -1
- package/ResponsesImage500/package.json +1 -1
- package/ResponsesImage503/package.json +1 -1
- package/ResponsesImageConnectionError/package.json +1 -1
- package/ResponsesImageDeleted/package.json +1 -1
- package/ResponsesImageEmptyBox/package.json +1 -1
- package/ResponsesImageEmptyPockets/package.json +1 -1
- package/ResponsesImageNothingFound/package.json +1 -1
- package/ResponsesImageSuccess/package.json +1 -1
- package/ResponsesNothingFound/package.json +1 -1
- package/ResponsesSuccess/package.json +1 -1
- package/Select/package.json +1 -1
- package/Sidebar/package.json +1 -1
- package/Skeleton/package.json +1 -1
- package/SliderCanary/package.json +1 -1
- package/SnackBar/package.json +1 -1
- package/Steps/package.json +1 -1
- package/StepsCanary/package.json +1 -1
- package/Switch/package.json +1 -1
- package/SwitchGroup/package.json +1 -1
- package/SwitchGroupCanary/package.json +1 -1
- package/Table/package.json +1 -1
- package/Tabs/package.json +1 -1
- package/TabsCanary/package.json +1 -1
- package/Tag/package.json +1 -1
- package/TagBase/package.json +1 -1
- package/Text/package.json +1 -1
- package/TextField/package.json +1 -1
- package/Theme/package.json +1 -1
- package/ThemeToggler/package.json +1 -1
- package/Timer/package.json +1 -1
- package/Tooltip/package.json +1 -1
- package/User/package.json +1 -1
- package/UserSelect/package.json +1 -1
- package/UserSelectDeprecated/package.json +1 -1
- package/__internal__/cjs-src/components/Button/Button.d.ts +1 -1
- package/__internal__/cjs-src/components/Button/Button.js +17 -1
- package/__internal__/cjs-src/components/Combobox/Combobox.js +3 -4
- package/__internal__/cjs-src/components/Combobox/helpers.d.ts +2 -0
- package/__internal__/cjs-src/components/DatePickerCanary/helpers.js +3 -35
- package/__internal__/cjs-src/components/DateTimeCanary/DateTimeTypeTime/helpers.js +1 -1
- package/__internal__/cjs-src/components/FieldGroup/FieldGroup.css +5 -0
- package/__internal__/cjs-src/components/FieldGroup/FieldGroup.d.ts +10 -0
- package/__internal__/cjs-src/components/FieldGroup/FieldGroup.js +27 -0
- package/__internal__/cjs-src/components/FieldGroup/getForm.d.ts +2 -0
- package/__internal__/cjs-src/components/FieldGroup/getForm.js +29 -0
- package/__internal__/cjs-src/components/FieldGroup/types.d.ts +14 -0
- package/__internal__/cjs-src/components/FieldGroup/types.js +2 -0
- package/__internal__/cjs-src/components/Select/Select.js +3 -4
- package/__internal__/cjs-src/components/Select/helpers.d.ts +2 -0
- package/__internal__/cjs-src/components/SelectComponents/helpers.d.ts +0 -3
- package/__internal__/cjs-src/components/SelectComponents/helpers.js +1 -20
- package/__internal__/cjs-src/components/Sidebar/Sidebar.js +2 -2
- package/__internal__/cjs-src/components/UserSelect/UserSelect.js +3 -4
- package/__internal__/cjs-src/components/UserSelect/helpers.d.ts +2 -0
- package/__internal__/src/components/Button/Button.d.ts +1 -1
- package/__internal__/src/components/Button/Button.js +17 -1
- package/__internal__/src/components/Combobox/Combobox.js +4 -5
- package/__internal__/src/components/Combobox/helpers.d.ts +2 -0
- package/__internal__/src/components/DatePickerCanary/helpers.js +3 -35
- package/__internal__/src/components/DateTimeCanary/DateTimeTypeTime/helpers.js +1 -1
- package/__internal__/src/components/FieldGroup/FieldGroup.css +5 -0
- package/__internal__/src/components/FieldGroup/FieldGroup.d.ts +10 -0
- package/__internal__/src/components/FieldGroup/FieldGroup.js +24 -0
- package/__internal__/src/components/FieldGroup/getForm.d.ts +2 -0
- package/__internal__/src/components/FieldGroup/getForm.js +26 -0
- package/__internal__/src/components/FieldGroup/types.d.ts +14 -0
- package/__internal__/src/components/FieldGroup/types.js +0 -0
- package/__internal__/src/components/Select/Select.js +4 -5
- package/__internal__/src/components/Select/helpers.d.ts +2 -0
- package/__internal__/src/components/SelectComponents/helpers.d.ts +0 -3
- package/__internal__/src/components/SelectComponents/helpers.js +0 -18
- package/__internal__/src/components/Sidebar/Sidebar.js +2 -2
- package/__internal__/src/components/UserSelect/UserSelect.js +4 -5
- package/__internal__/src/components/UserSelect/helpers.d.ts +2 -0
- package/createIcon/package.json +1 -1
- package/createResponsesImage/package.json +1 -1
- package/package.json +2 -1
- package/useBreakpoints/package.json +1 -1
- package/useChoiceGroup/package.json +1 -1
- package/useChoiceGroupIndexed/package.json +1 -1
- package/useClickOutside/package.json +1 -1
- package/useComponentSize/package.json +1 -1
- package/useDebounce/package.json +1 -1
- package/useFlag/package.json +1 -1
- package/useForkRef/package.json +1 -1
- package/useGlobalKeys/package.json +1 -1
- package/useHideElementsInLine/package.json +1 -1
- package/useKeys/package.json +1 -1
- package/useMutableRef/package.json +1 -1
- package/useOverflow/package.json +1 -1
- package/usePrevious/package.json +1 -1
- package/useRefs/package.json +1 -1
- package/useResizeObserved/package.json +1 -1
- package/useScrollElements/package.json +1 -1
- package/useScrollPosition/package.json +1 -1
- package/useSelect/package.json +1 -1
- package/useSortSteps/package.json +1 -1
- package/useThemeVars/package.json +1 -1
- package/useTimer/package.json +1 -1
- package/withTooltip/package.json +1 -1
package/Select/package.json
CHANGED
package/Sidebar/package.json
CHANGED
package/Skeleton/package.json
CHANGED
package/SnackBar/package.json
CHANGED
package/Steps/package.json
CHANGED
package/StepsCanary/package.json
CHANGED
package/Switch/package.json
CHANGED
package/SwitchGroup/package.json
CHANGED
package/Table/package.json
CHANGED
package/Tabs/package.json
CHANGED
package/TabsCanary/package.json
CHANGED
package/Tag/package.json
CHANGED
package/TagBase/package.json
CHANGED
package/Text/package.json
CHANGED
package/TextField/package.json
CHANGED
package/Theme/package.json
CHANGED
package/Timer/package.json
CHANGED
package/Tooltip/package.json
CHANGED
package/User/package.json
CHANGED
package/UserSelect/package.json
CHANGED
|
@@ -12,7 +12,7 @@ export declare type ButtonPropWidth = typeof buttonPropWidth[number];
|
|
|
12
12
|
export declare const buttonPropWidthDefault: ButtonPropWidth;
|
|
13
13
|
export declare const buttonPropForm: readonly ["default", "brick", "round", "brickRound", "roundBrick", "brickDefault", "defaultBrick"];
|
|
14
14
|
export declare type ButtonPropForm = typeof buttonPropForm[number];
|
|
15
|
-
export declare const buttonPropFormDefault:
|
|
15
|
+
export declare const buttonPropFormDefault: "default";
|
|
16
16
|
export declare type Props = {
|
|
17
17
|
size?: ButtonPropSize;
|
|
18
18
|
view?: ButtonPropView;
|
|
@@ -26,6 +26,22 @@ exports.buttonPropForm = [
|
|
|
26
26
|
'brickDefault',
|
|
27
27
|
'defaultBrick',
|
|
28
28
|
];
|
|
29
|
+
var mapStableForm = {
|
|
30
|
+
"default": 'default',
|
|
31
|
+
defaultClear: 'defaultBrick',
|
|
32
|
+
defaultBrick: 'defaultBrick',
|
|
33
|
+
brick: 'brick',
|
|
34
|
+
brickDefault: 'brickDefault',
|
|
35
|
+
brickClear: 'brick',
|
|
36
|
+
brickRound: 'brickRound',
|
|
37
|
+
round: 'round',
|
|
38
|
+
roundClear: 'roundBrick',
|
|
39
|
+
roundBrick: 'roundBrick',
|
|
40
|
+
clearRound: 'brickRound',
|
|
41
|
+
clearDefault: 'brickDefault',
|
|
42
|
+
clearBrick: 'brick',
|
|
43
|
+
clearClear: 'brick'
|
|
44
|
+
};
|
|
29
45
|
exports.buttonPropFormDefault = exports.buttonPropForm[0];
|
|
30
46
|
exports.COMPONENT_NAME = 'Button';
|
|
31
47
|
exports.cnButton = bem_1.cn(exports.COMPONENT_NAME);
|
|
@@ -62,7 +78,7 @@ exports.Button = PropsWithAsAttributes_1.forwardRefWithAs(function (props, ref)
|
|
|
62
78
|
size: size,
|
|
63
79
|
view: view,
|
|
64
80
|
width: width,
|
|
65
|
-
form: form,
|
|
81
|
+
form: mapStableForm[form],
|
|
66
82
|
disabled: disabled,
|
|
67
83
|
loading: loading,
|
|
68
84
|
withIcon: withIcon,
|
|
@@ -24,8 +24,8 @@ function ComboboxRender(props, ref) {
|
|
|
24
24
|
var controlInnerRef = react_1.useRef(null);
|
|
25
25
|
var helperInputFakeElement = react_1.useRef(null);
|
|
26
26
|
var controlRef = react_1.useRef(null);
|
|
27
|
-
var _a = usePropsHandler_1.usePropsHandler(exports.COMPONENT_NAME, helpers_2.withDefaultGetters(props), controlRef), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, required = _a.required, _b = _a.dropdownRef, dropdownRef = _b === void 0 ? defaultDropdownRef : _b, _c = _a.form, form = _c === void 0 ? types_1.defaultPropForm : _c, _d = _a.view, view = _d === void 0 ? types_1.defaultPropView : _d, _e = _a.size, size = _e === void 0 ? types_1.defaultPropSize : _e, dropdownClassName = _a.dropdownClassName, name = _a.name, _f = _a.groups, groups = _f === void 0 ? [] : _f, getItemLabel = _a.getItemLabel, getItemKey = _a.getItemKey, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, renderValueProp = _a.renderValue, onCreate = _a.onCreate, inputRefProp = _a.inputRef, _g = _a.labelForNotFound, labelForNotFound = _g === void 0 ? helpers_1.defaultlabelForNotFound : _g, _h = _a.labelForCreate, labelForCreate = _h === void 0 ? helpers_1.defaultlabelForCreate : _h, _j = _a.labelForEmptyItems, labelForEmptyItems = _j === void 0 ? helpers_1.defaultLabelForEmptyItems : _j, onInputChange = _a.onInputChange, searchFunction = _a.searchFunction, isLoading = _a.isLoading, _k = _a.multiple, multiple = _k === void 0 ? false : _k, style = _a.style, otherProps = tslib_1.__rest(_a, ["placeholder", "onBlur", "onFocus", "items", "onChange", "value", "disabled", "ariaLabel", "id", "required", "dropdownRef", "form", "view", "size", "dropdownClassName", "name", "groups", "getItemLabel", "getItemKey", "getItemGroupKey", "getItemDisabled", "getGroupKey", "getGroupLabel", "renderItem", "renderValue", "onCreate", "inputRef", "labelForNotFound", "labelForCreate", "labelForEmptyItems", "onInputChange", "searchFunction", "isLoading", "multiple", "style"]);
|
|
28
|
-
var
|
|
27
|
+
var _a = usePropsHandler_1.usePropsHandler(exports.COMPONENT_NAME, helpers_2.withDefaultGetters(props), controlRef), placeholder = _a.placeholder, onBlur = _a.onBlur, onFocus = _a.onFocus, items = _a.items, onChange = _a.onChange, value = _a.value, disabled = _a.disabled, ariaLabel = _a.ariaLabel, id = _a.id, required = _a.required, _b = _a.dropdownRef, dropdownRef = _b === void 0 ? defaultDropdownRef : _b, _c = _a.form, form = _c === void 0 ? types_1.defaultPropForm : _c, _d = _a.view, view = _d === void 0 ? types_1.defaultPropView : _d, _e = _a.size, size = _e === void 0 ? types_1.defaultPropSize : _e, dropdownClassName = _a.dropdownClassName, name = _a.name, _f = _a.groups, groups = _f === void 0 ? [] : _f, getItemLabel = _a.getItemLabel, getItemKey = _a.getItemKey, getItemGroupKey = _a.getItemGroupKey, getItemDisabled = _a.getItemDisabled, getGroupKey = _a.getGroupKey, getGroupLabel = _a.getGroupLabel, renderItem = _a.renderItem, renderValueProp = _a.renderValue, onCreate = _a.onCreate, inputRefProp = _a.inputRef, _g = _a.labelForNotFound, labelForNotFound = _g === void 0 ? helpers_1.defaultlabelForNotFound : _g, _h = _a.labelForCreate, labelForCreate = _h === void 0 ? helpers_1.defaultlabelForCreate : _h, _j = _a.labelForEmptyItems, labelForEmptyItems = _j === void 0 ? helpers_1.defaultLabelForEmptyItems : _j, onInputChange = _a.onInputChange, searchFunction = _a.searchFunction, isLoading = _a.isLoading, _k = _a.multiple, multiple = _k === void 0 ? false : _k, style = _a.style, _l = _a.dropdownForm, dropdownForm = _l === void 0 ? 'default' : _l, otherProps = tslib_1.__rest(_a, ["placeholder", "onBlur", "onFocus", "items", "onChange", "value", "disabled", "ariaLabel", "id", "required", "dropdownRef", "form", "view", "size", "dropdownClassName", "name", "groups", "getItemLabel", "getItemKey", "getItemGroupKey", "getItemDisabled", "getGroupKey", "getGroupLabel", "renderItem", "renderValue", "onCreate", "inputRef", "labelForNotFound", "labelForCreate", "labelForEmptyItems", "onInputChange", "searchFunction", "isLoading", "multiple", "style", "dropdownForm"]);
|
|
28
|
+
var _m = useSelect_1.useSelect({
|
|
29
29
|
items: items,
|
|
30
30
|
groups: groups,
|
|
31
31
|
value: value,
|
|
@@ -43,8 +43,7 @@ function ComboboxRender(props, ref) {
|
|
|
43
43
|
onFocus: onFocus,
|
|
44
44
|
onCreate: onCreate,
|
|
45
45
|
searchFunction: searchFunction
|
|
46
|
-
}), getKeyProps =
|
|
47
|
-
var dropdownForm = helpers_1.getSelectDropdownForm(form);
|
|
46
|
+
}), getKeyProps = _m.getKeyProps, getOptionProps = _m.getOptionProps, isOpen = _m.isOpen, visibleItems = _m.visibleItems, isFocused = _m.isFocused, handleInputFocus = _m.handleInputFocus, handleInputBlur = _m.handleInputBlur, handleToggleDropdown = _m.handleToggleDropdown, inputRef = _m.inputRef, handleInputClick = _m.handleInputClick, handleInputChange = _m.handleInputChange, searchValue = _m.searchValue, clearValue = _m.clearValue, getHandleRemoveValue = _m.getHandleRemoveValue, notFound = _m.notFound, hasItems = _m.hasItems;
|
|
48
47
|
var renderItemDefault = function (props) {
|
|
49
48
|
var item = props.item, active = props.active, hovered = props.hovered, onClick = props.onClick, onMouseEnter = props.onMouseEnter;
|
|
50
49
|
return (react_1["default"].createElement(SelectItem_1.SelectItem, { label: getItemLabel(item), active: active, hovered: hovered, multiple: multiple, size: size, indent: dropdownForm === 'round' ? 'increased' : 'normal', onClick: onClick, onMouseEnter: onMouseEnter, disabled: getItemDisabled(item) }));
|
|
@@ -35,6 +35,7 @@ export declare type ComboboxProps<ITEM = DefaultItem, GROUP = DefaultGroup, MULT
|
|
|
35
35
|
onChange: PropOnChange<ITEM, MULTIPLE>;
|
|
36
36
|
disabled?: boolean;
|
|
37
37
|
form?: PropForm;
|
|
38
|
+
dropdownForm?: 'default' | 'brick' | 'round';
|
|
38
39
|
size?: Exclude<PropSize, 'xs'>;
|
|
39
40
|
view?: PropView;
|
|
40
41
|
placeholder?: string;
|
|
@@ -102,6 +103,7 @@ export declare function withDefaultGetters<ITEM = DefaultItem, GROUP = DefaultGr
|
|
|
102
103
|
onChange: PropOnChange<ITEM, MULTIPLE>;
|
|
103
104
|
disabled?: boolean | undefined;
|
|
104
105
|
form?: "default" | "round" | "brick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined;
|
|
106
|
+
dropdownForm?: "default" | "round" | "brick" | undefined;
|
|
105
107
|
size?: "s" | "m" | "l" | undefined;
|
|
106
108
|
view?: "default" | "clear" | undefined;
|
|
107
109
|
placeholder?: string | undefined;
|
|
@@ -4,7 +4,7 @@ exports.getDropdownZIndex = exports.getFieldName = exports.isTypeWithTime = expo
|
|
|
4
4
|
var tslib_1 = require("tslib");
|
|
5
5
|
var date_fns_1 = require("date-fns");
|
|
6
6
|
var array_1 = require("../../utils/array");
|
|
7
|
-
var
|
|
7
|
+
var FieldGroup_1 = require("../FieldGroup/FieldGroup");
|
|
8
8
|
exports.datePickerPropSeparatorDefault = '.';
|
|
9
9
|
exports.datePickerPropFormatTypeDate = "dd" + exports.datePickerPropSeparatorDefault + "MM" + exports.datePickerPropSeparatorDefault + "yyyy";
|
|
10
10
|
exports.datePickerPropPlaceholderTypeDate = "\u0414\u0414" + exports.datePickerPropSeparatorDefault + "\u041C\u041C" + exports.datePickerPropSeparatorDefault + "\u0413\u0413\u0413\u0413";
|
|
@@ -45,40 +45,8 @@ exports.getTimeEnum = function (length, multiplicity, startOfUnits, addUnits, ge
|
|
|
45
45
|
return getItemLabel(addUnits(startDate, number * multiplicity));
|
|
46
46
|
});
|
|
47
47
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
defaultClear: 'defaultClear',
|
|
51
|
-
defaultBrick: 'defaultClear',
|
|
52
|
-
brick: 'brickClear',
|
|
53
|
-
brickDefault: 'brickClear',
|
|
54
|
-
brickClear: 'brickClear',
|
|
55
|
-
brickRound: 'brickClear',
|
|
56
|
-
round: 'roundClear',
|
|
57
|
-
roundClear: 'roundClear',
|
|
58
|
-
roundBrick: 'roundClear',
|
|
59
|
-
clearRound: 'clearClear',
|
|
60
|
-
clearDefault: 'clearClear',
|
|
61
|
-
clearBrick: 'clearClear',
|
|
62
|
-
clearClear: 'clearClear'
|
|
63
|
-
};
|
|
64
|
-
var mapFormForEnd = {
|
|
65
|
-
"default": 'brickDefault',
|
|
66
|
-
defaultClear: 'brickClear',
|
|
67
|
-
defaultBrick: 'brick',
|
|
68
|
-
brick: 'brick',
|
|
69
|
-
brickDefault: 'brickDefault',
|
|
70
|
-
brickClear: 'brickClear',
|
|
71
|
-
brickRound: 'brickRound',
|
|
72
|
-
round: 'brickRound',
|
|
73
|
-
roundClear: 'brickClear',
|
|
74
|
-
roundBrick: 'brick',
|
|
75
|
-
clearRound: 'brickRound',
|
|
76
|
-
clearDefault: 'brickDefault',
|
|
77
|
-
clearBrick: 'brick',
|
|
78
|
-
clearClear: 'brickClear'
|
|
79
|
-
};
|
|
80
|
-
exports.getFormForStart = function (form) { return getByMap_1.getByMap(mapFormForStart, form); };
|
|
81
|
-
exports.getFormForEnd = function (form) { return getByMap_1.getByMap(mapFormForEnd, form); };
|
|
48
|
+
exports.getFormForStart = function (form) { return FieldGroup_1.getForm(form, 0, 2); };
|
|
49
|
+
exports.getFormForEnd = function (form) { return FieldGroup_1.getForm(form, 1, 2); };
|
|
82
50
|
var getPartDate = function (formatArray, stringArray, marker) {
|
|
83
51
|
var index = formatArray.indexOf(marker);
|
|
84
52
|
if (index >= 0 && stringArray[index] && stringArray[index].length === marker.length) {
|
|
@@ -14,7 +14,7 @@ exports.dateTimeTimePropLocaleDefault = {
|
|
|
14
14
|
};
|
|
15
15
|
var getItemData = function (length, multiplicity, startOfUnits, startOfUnit, endOfUnit, addUnits, getItemLabel, value, minDate, maxDate, onChangeRef) {
|
|
16
16
|
if (multiplicity === void 0) { multiplicity = 1; }
|
|
17
|
-
var numbers = array_1.range(multiplicity ? Math.
|
|
17
|
+
var numbers = array_1.range(multiplicity ? Math.ceil(length / multiplicity) : 0);
|
|
18
18
|
if (numbers.length === 0) {
|
|
19
19
|
return [];
|
|
20
20
|
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import './FieldGroup.css';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { FieldGroupPropChildren } from './types';
|
|
4
|
+
export declare const FieldGroup: React.ForwardRefExoticComponent<{
|
|
5
|
+
children: FieldGroupPropChildren;
|
|
6
|
+
form?: "default" | "round" | "brick" | "brickRound" | "roundBrick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined;
|
|
7
|
+
size?: "xs" | "s" | "m" | "l" | undefined;
|
|
8
|
+
} & Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "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-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" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "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" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & React.RefAttributes<HTMLDivElement>>;
|
|
9
|
+
export * from './types';
|
|
10
|
+
export * from './getForm';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.FieldGroup = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
require("./FieldGroup.css");
|
|
6
|
+
var react_1 = tslib_1.__importStar(require("react"));
|
|
7
|
+
var bem_1 = require("../../utils/bem");
|
|
8
|
+
var type_guards_1 = require("../../utils/type-guards");
|
|
9
|
+
var getForm_1 = require("./getForm");
|
|
10
|
+
var cnFieldGroup = bem_1.cn('FieldGroup');
|
|
11
|
+
var renderChildren = function (children, form, size) {
|
|
12
|
+
if (Array.isArray(children) && children.length) {
|
|
13
|
+
return children.map(function (el, index) {
|
|
14
|
+
if (type_guards_1.isNotNil(el)) {
|
|
15
|
+
return react_1.cloneElement(el, tslib_1.__assign(tslib_1.__assign({}, el.props), { form: getForm_1.getForm(form, index, children.length), size: size, key: el.key || index }));
|
|
16
|
+
}
|
|
17
|
+
return null;
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
return null;
|
|
21
|
+
};
|
|
22
|
+
exports.FieldGroup = react_1.forwardRef(function (props, ref) {
|
|
23
|
+
var children = props.children, className = props.className, size = props.size, form = props.form, otherProps = tslib_1.__rest(props, ["children", "className", "size", "form"]);
|
|
24
|
+
return (react_1["default"].createElement("div", tslib_1.__assign({}, otherProps, { className: cnFieldGroup(null, [className]), ref: ref }), renderChildren(children, form, size)));
|
|
25
|
+
});
|
|
26
|
+
tslib_1.__exportStar(require("./types"), exports);
|
|
27
|
+
tslib_1.__exportStar(require("./getForm"), exports);
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { FieldGroupPropForm } from './types';
|
|
2
|
+
export declare const getForm: (form: "default" | "round" | "brick" | "brickRound" | "roundBrick" | "brickDefault" | "defaultBrick" | "clearRound" | "roundClear" | "clearDefault" | "defaultClear" | "brickClear" | "clearBrick" | "clearClear" | undefined, index: number, length: number) => FieldGroupPropForm;
|