@itcase/forms 1.1.34 → 1.1.36
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.
|
@@ -12,11 +12,11 @@
|
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
.form-field {
|
|
15
|
-
&
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
&
|
|
15
|
+
&_radio {
|
|
16
|
+
&.form-field_size {
|
|
17
|
+
@each $size in xxl, xl, l, m, s, xs, xxs {
|
|
18
|
+
&_$(size) {
|
|
19
|
+
& .form-radio {
|
|
20
20
|
gap: var(--form-filed-radio-size-$(size)-gap);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -26,4 +26,5 @@
|
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
:root {
|
|
29
|
+
--form-filed-radio-size-m-gap: 12px;
|
|
29
30
|
}
|
package/dist/itcase-forms.cjs.js
CHANGED
|
@@ -442,7 +442,7 @@ function FieldWrapper(props) {
|
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
const defaultDropzoneProps = {
|
|
445
|
-
fill: '
|
|
445
|
+
fill: 'surfaceSecondary',
|
|
446
446
|
borderColor: 'surfaceBorderTertiary',
|
|
447
447
|
borderColorHover: 'surfaceBorderQuaternary',
|
|
448
448
|
hintTitle: 'Перетащите изображение или выберите файл с компьютера',
|
|
@@ -646,11 +646,12 @@ const FileInputDropzone = /*#__PURE__*/React__default.default.memo(function File
|
|
|
646
646
|
thumbNameTextWrap
|
|
647
647
|
} = propsGenerator;
|
|
648
648
|
return /*#__PURE__*/React__default.default.createElement(React__default.default.Fragment, null, /*#__PURE__*/React__default.default.createElement("div", getRootProps({
|
|
649
|
-
className: `form-dropzone__dropzone dropzone
|
|
649
|
+
// className: `form-dropzone__dropzone dropzone ${className} form-dropzone__dropzone_size_${size} ${shapeClass}`,
|
|
650
|
+
className: `form-dropzone__dropzone dropzone`
|
|
650
651
|
}), /*#__PURE__*/React__default.default.createElement("input", Object.assign({}, getInputProps(), {
|
|
651
652
|
name: inputName
|
|
652
653
|
})), /*#__PURE__*/React__default.default.createElement("div", {
|
|
653
|
-
className: clsx__default.default('form-dropzone__dropzone-wrapper', thumbColumn && `form-dropzone__dropzone-wrapper_column_${thumbColumn}`, fillClass
|
|
654
|
+
className: clsx__default.default('form-dropzone__dropzone-wrapper', thumbColumn && `form-dropzone__dropzone-wrapper_column_${thumbColumn}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderTypeClass && `border_type_${borderTypeClass}`, shapeClass && `shape_${shapeClass}`)
|
|
654
655
|
}, filesList.map((file, index) => /*#__PURE__*/React__default.default.createElement("aside", {
|
|
655
656
|
className: clsx__default.default('form-dropzone__thumb', fillClass, thumbDirectionClass, thumbBorderWidthClass, thumbBorderColorClass, thumbBorderColorHoverClass, thumbBorderTypeClass),
|
|
656
657
|
key: file.id || `${file.name}_${index}`
|
|
@@ -680,10 +681,7 @@ const FileInputDropzone = /*#__PURE__*/React__default.default.memo(function File
|
|
|
680
681
|
className: "form-dropzone__thumb-loader"
|
|
681
682
|
}, /*#__PURE__*/React__default.default.createElement(Loader.Loader, {
|
|
682
683
|
width: "fill",
|
|
683
|
-
height: "fill"
|
|
684
|
-
fill: "surfacePrimary",
|
|
685
|
-
itemFill: "surfaceItemAccent",
|
|
686
|
-
set: "simple"
|
|
684
|
+
height: "fill"
|
|
687
685
|
})), /*#__PURE__*/React__default.default.createElement("div", {
|
|
688
686
|
className: clsx__default.default('form-dropzone__thumb-remove')
|
|
689
687
|
}, /*#__PURE__*/React__default.default.createElement(Button.Button, {
|
|
@@ -844,9 +842,9 @@ const FileInput = /*#__PURE__*/React__default.default.memo(function FileInput(pr
|
|
|
844
842
|
hintTitleTextWeight,
|
|
845
843
|
hintTitleTextWrap,
|
|
846
844
|
removeThumbAppearance,
|
|
845
|
+
removeThumbShape,
|
|
847
846
|
removeThumbText,
|
|
848
847
|
removeThumbTextWeight,
|
|
849
|
-
removeThumbShape,
|
|
850
848
|
shape,
|
|
851
849
|
thumbBorderColor,
|
|
852
850
|
thumbBorderColorHover,
|
|
@@ -938,9 +936,9 @@ const FileInput = /*#__PURE__*/React__default.default.memo(function FileInput(pr
|
|
|
938
936
|
inputValue: input.value,
|
|
939
937
|
metaTouched: meta.touched,
|
|
940
938
|
removeThumbAppearance: removeThumbAppearance,
|
|
939
|
+
removeThumbShape: removeThumbShape,
|
|
941
940
|
removeThumbText: removeThumbText,
|
|
942
941
|
removeThumbTextWeight: removeThumbTextWeight,
|
|
943
|
-
removeThumbShape: removeThumbShape,
|
|
944
942
|
shape: shape,
|
|
945
943
|
showFilename: showFilename,
|
|
946
944
|
thumbBorderColor: thumbBorderColor,
|
|
@@ -996,6 +994,11 @@ const FormBlockGroup = /*#__PURE__*/React__default.default.memo(function Group(p
|
|
|
996
994
|
isHidden,
|
|
997
995
|
children
|
|
998
996
|
} = props;
|
|
997
|
+
|
|
998
|
+
// @ts-expect-error
|
|
999
|
+
const {
|
|
1000
|
+
styles: styles
|
|
1001
|
+
} = useStyles.useStyles(props);
|
|
999
1002
|
return /*#__PURE__*/React__default.default.createElement(reactFinalForm.Field, {
|
|
1000
1003
|
name: name
|
|
1001
1004
|
}, function Render({
|
|
@@ -1024,7 +1027,8 @@ const FormBlockGroup = /*#__PURE__*/React__default.default.memo(function Group(p
|
|
|
1024
1027
|
});
|
|
1025
1028
|
return /*#__PURE__*/React__default.default.createElement("div", {
|
|
1026
1029
|
className: clsx__default.default('form__group', className, isHidden && 'form__group_hidden', column && `form__group_column_${column}`),
|
|
1027
|
-
"data-tour": dataTour
|
|
1030
|
+
"data-tour": dataTour,
|
|
1031
|
+
style: styles
|
|
1028
1032
|
}, /*#__PURE__*/React__default.default.createElement("div", {
|
|
1029
1033
|
className: "form__group-wrapper"
|
|
1030
1034
|
}, before, title && /*#__PURE__*/React__default.default.createElement("div", {
|
|
@@ -2372,7 +2376,7 @@ const RadioGroup = /*#__PURE__*/React__default.default.memo(function RadioGroup(
|
|
|
2372
2376
|
validationStateKey: isErrorState ? errorKey : 'success'
|
|
2373
2377
|
});
|
|
2374
2378
|
return /*#__PURE__*/React__default.default.createElement(FieldWrapper, Object.assign({
|
|
2375
|
-
className: clsx__default.default('form-field_radio', 'form__item_radio
|
|
2379
|
+
className: clsx__default.default('form-field_radio', 'form__item_radio', classNameGroupItem),
|
|
2376
2380
|
errorKey: errorKey,
|
|
2377
2381
|
errorMessage: errorMessage,
|
|
2378
2382
|
isErrorState: isErrorState,
|
package/dist/itcase-forms.esm.js
CHANGED
|
@@ -431,7 +431,7 @@ function FieldWrapper(props) {
|
|
|
431
431
|
}
|
|
432
432
|
|
|
433
433
|
const defaultDropzoneProps = {
|
|
434
|
-
fill: '
|
|
434
|
+
fill: 'surfaceSecondary',
|
|
435
435
|
borderColor: 'surfaceBorderTertiary',
|
|
436
436
|
borderColorHover: 'surfaceBorderQuaternary',
|
|
437
437
|
hintTitle: 'Перетащите изображение или выберите файл с компьютера',
|
|
@@ -635,11 +635,12 @@ const FileInputDropzone = /*#__PURE__*/React.memo(function FileInputDropzone(pro
|
|
|
635
635
|
thumbNameTextWrap
|
|
636
636
|
} = propsGenerator;
|
|
637
637
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", getRootProps({
|
|
638
|
-
className: `form-dropzone__dropzone dropzone
|
|
638
|
+
// className: `form-dropzone__dropzone dropzone ${className} form-dropzone__dropzone_size_${size} ${shapeClass}`,
|
|
639
|
+
className: `form-dropzone__dropzone dropzone`
|
|
639
640
|
}), /*#__PURE__*/React.createElement("input", Object.assign({}, getInputProps(), {
|
|
640
641
|
name: inputName
|
|
641
642
|
})), /*#__PURE__*/React.createElement("div", {
|
|
642
|
-
className: clsx('form-dropzone__dropzone-wrapper', thumbColumn && `form-dropzone__dropzone-wrapper_column_${thumbColumn}`, fillClass
|
|
643
|
+
className: clsx('form-dropzone__dropzone-wrapper', thumbColumn && `form-dropzone__dropzone-wrapper_column_${thumbColumn}`, fillClass && `fill_${fillClass}`, fillHoverClass && `fill_hover_${fillHoverClass}`, borderWidthClass && `border-width_${borderWidthClass}`, borderColorClass && `border-color_${borderColorClass}`, borderColorHoverClass && `border-color_hover_${borderColorHoverClass}`, borderTypeClass && `border_type_${borderTypeClass}`, shapeClass && `shape_${shapeClass}`)
|
|
643
644
|
}, filesList.map((file, index) => /*#__PURE__*/React.createElement("aside", {
|
|
644
645
|
className: clsx('form-dropzone__thumb', fillClass, thumbDirectionClass, thumbBorderWidthClass, thumbBorderColorClass, thumbBorderColorHoverClass, thumbBorderTypeClass),
|
|
645
646
|
key: file.id || `${file.name}_${index}`
|
|
@@ -669,10 +670,7 @@ const FileInputDropzone = /*#__PURE__*/React.memo(function FileInputDropzone(pro
|
|
|
669
670
|
className: "form-dropzone__thumb-loader"
|
|
670
671
|
}, /*#__PURE__*/React.createElement(Loader, {
|
|
671
672
|
width: "fill",
|
|
672
|
-
height: "fill"
|
|
673
|
-
fill: "surfacePrimary",
|
|
674
|
-
itemFill: "surfaceItemAccent",
|
|
675
|
-
set: "simple"
|
|
673
|
+
height: "fill"
|
|
676
674
|
})), /*#__PURE__*/React.createElement("div", {
|
|
677
675
|
className: clsx('form-dropzone__thumb-remove')
|
|
678
676
|
}, /*#__PURE__*/React.createElement(Button, {
|
|
@@ -833,9 +831,9 @@ const FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
|
|
|
833
831
|
hintTitleTextWeight,
|
|
834
832
|
hintTitleTextWrap,
|
|
835
833
|
removeThumbAppearance,
|
|
834
|
+
removeThumbShape,
|
|
836
835
|
removeThumbText,
|
|
837
836
|
removeThumbTextWeight,
|
|
838
|
-
removeThumbShape,
|
|
839
837
|
shape,
|
|
840
838
|
thumbBorderColor,
|
|
841
839
|
thumbBorderColorHover,
|
|
@@ -927,9 +925,9 @@ const FileInput = /*#__PURE__*/React.memo(function FileInput(props) {
|
|
|
927
925
|
inputValue: input.value,
|
|
928
926
|
metaTouched: meta.touched,
|
|
929
927
|
removeThumbAppearance: removeThumbAppearance,
|
|
928
|
+
removeThumbShape: removeThumbShape,
|
|
930
929
|
removeThumbText: removeThumbText,
|
|
931
930
|
removeThumbTextWeight: removeThumbTextWeight,
|
|
932
|
-
removeThumbShape: removeThumbShape,
|
|
933
931
|
shape: shape,
|
|
934
932
|
showFilename: showFilename,
|
|
935
933
|
thumbBorderColor: thumbBorderColor,
|
|
@@ -985,6 +983,11 @@ const FormBlockGroup = /*#__PURE__*/React.memo(function Group(props) {
|
|
|
985
983
|
isHidden,
|
|
986
984
|
children
|
|
987
985
|
} = props;
|
|
986
|
+
|
|
987
|
+
// @ts-expect-error
|
|
988
|
+
const {
|
|
989
|
+
styles: styles
|
|
990
|
+
} = useStyles(props);
|
|
988
991
|
return /*#__PURE__*/React.createElement(Field, {
|
|
989
992
|
name: name
|
|
990
993
|
}, function Render({
|
|
@@ -1013,7 +1016,8 @@ const FormBlockGroup = /*#__PURE__*/React.memo(function Group(props) {
|
|
|
1013
1016
|
});
|
|
1014
1017
|
return /*#__PURE__*/React.createElement("div", {
|
|
1015
1018
|
className: clsx('form__group', className, isHidden && 'form__group_hidden', column && `form__group_column_${column}`),
|
|
1016
|
-
"data-tour": dataTour
|
|
1019
|
+
"data-tour": dataTour,
|
|
1020
|
+
style: styles
|
|
1017
1021
|
}, /*#__PURE__*/React.createElement("div", {
|
|
1018
1022
|
className: "form__group-wrapper"
|
|
1019
1023
|
}, before, title && /*#__PURE__*/React.createElement("div", {
|
|
@@ -2361,7 +2365,7 @@ const RadioGroup = /*#__PURE__*/React.memo(function RadioGroup(props) {
|
|
|
2361
2365
|
validationStateKey: isErrorState ? errorKey : 'success'
|
|
2362
2366
|
});
|
|
2363
2367
|
return /*#__PURE__*/React.createElement(FieldWrapper, Object.assign({
|
|
2364
|
-
className: clsx('form-field_radio', 'form__item_radio
|
|
2368
|
+
className: clsx('form-field_radio', 'form__item_radio', classNameGroupItem),
|
|
2365
2369
|
errorKey: errorKey,
|
|
2366
2370
|
errorMessage: errorMessage,
|
|
2367
2371
|
isErrorState: isErrorState,
|