@gravity-ui/dynamic-forms 5.19.1 → 5.20.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/build/cjs/lib/unstable/core/Entity/index.d.ts +1 -0
- package/build/cjs/lib/unstable/core/Entity/index.js +3 -1
- package/build/cjs/lib/unstable/core/index.d.ts +2 -2
- package/build/cjs/lib/unstable/core/index.js +3 -1
- package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.js +12 -5
- package/build/cjs/lib/unstable/kit/components/ControlContainer/ControlContainer.css +20 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/ControlContainer.d.ts +7 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/ControlContainer.js +14 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/components/ControlContainer/index.js +5 -0
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.css +2 -32
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.d.ts +0 -2
- package/build/cjs/lib/unstable/kit/components/ControlError/ControlError.js +5 -5
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/WrapperContainer.css +8 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/WrapperContainer.d.ts +6 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/WrapperContainer.js +13 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/components/WrapperContainer/index.js +5 -0
- package/build/cjs/lib/unstable/kit/components/index.d.ts +2 -0
- package/build/cjs/lib/unstable/kit/components/index.js +5 -1
- package/build/cjs/lib/unstable/kit/constants/config.d.ts +43 -0
- package/build/cjs/lib/unstable/kit/constants/config.js +45 -6
- package/build/cjs/lib/unstable/kit/controls/Alert/Alert.d.ts +9 -0
- package/build/cjs/lib/unstable/kit/controls/Alert/Alert.js +27 -0
- package/build/cjs/lib/unstable/kit/controls/Alert/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/Alert/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayBase/ArrayBase.js +20 -17
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/ArrayTable.css +39 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/ArrayTable.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/ArrayTable.js +88 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/ArrayTable/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.css +7 -1
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/Checkbox/Checkbox.js +8 -4
- package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.css +8 -2
- package/build/cjs/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.js +11 -6
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.css +6 -0
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/ColorPicker/ColorPicker.js +7 -6
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.css +2 -2
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/DateInput/DateInput.js +14 -13
- package/build/cjs/lib/unstable/kit/controls/DotValue/DotValue.d.ts +5 -0
- package/build/cjs/lib/unstable/kit/controls/DotValue/DotValue.js +30 -0
- package/build/cjs/lib/unstable/kit/controls/DotValue/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/DotValue/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/FewOfNested.css +14 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/FewOfNested.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/FewOfNested.js +63 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/FewOfNested/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/FileInput.d.ts +7 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/FileInput.js +53 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/FileInput/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Label/Label.d.ts +9 -0
- package/build/cjs/lib/unstable/kit/controls/Label/Label.js +28 -0
- package/build/cjs/lib/unstable/kit/controls/Label/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/Label/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/MultiSelect/MultiSelect.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/MultiSelect/MultiSelect.js +5 -2
- package/build/cjs/lib/unstable/kit/controls/NumberBase/NumberBase.css +3 -0
- package/build/{esm/lib/unstable/kit/controls/NumberBase/Number.d.ts → cjs/lib/unstable/kit/controls/NumberBase/NumberBase.d.ts} +1 -1
- package/build/cjs/lib/unstable/kit/controls/NumberBase/NumberBase.js +16 -0
- package/build/cjs/lib/unstable/kit/controls/NumberBase/index.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/controls/NumberBase/index.js +2 -2
- package/build/cjs/lib/unstable/kit/controls/ObjectBase/ObjectBase.d.ts +0 -1
- package/build/cjs/lib/unstable/kit/controls/ObjectBase/ObjectBase.js +6 -24
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/ObjectInline.css +8 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/ObjectInline.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/ObjectInline.js +25 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/ObjectInline/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/OneOfNested.css +14 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/OneOfNested.d.ts +12 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/OneOfNested.js +64 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/OneOfNested/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Password/Password.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/Password/Password.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/controls/Password/Password.js +6 -2
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.css +12 -2
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/RadioGroup/RadioGroup.js +4 -4
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.js +11 -9
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.css +6 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.js +29 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/SegmentedRadioGroup/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/Select/Select.d.ts +3 -3
- package/build/cjs/lib/unstable/kit/controls/Select/Select.js +6 -3
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.js +7 -5
- package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/controls/StringBase/StringBase.js +4 -1
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.css +8 -2
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/Switch/Switch.js +8 -4
- package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.css +3 -0
- package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.d.ts +2 -2
- package/build/cjs/lib/unstable/kit/controls/TextArea/TextArea.js +4 -1
- package/build/cjs/lib/unstable/kit/controls/TextContent/TextContent.css +10 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/TextContent.d.ts +9 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/TextContent.js +29 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/controls/TextContent/index.js +5 -0
- package/build/cjs/lib/unstable/kit/controls/index.d.ts +10 -0
- package/build/cjs/lib/unstable/kit/controls/index.js +21 -1
- package/build/cjs/lib/unstable/kit/utils/common.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/utils/common.js +5 -1
- package/build/cjs/lib/unstable/kit/utils/index.d.ts +1 -1
- package/build/cjs/lib/unstable/kit/utils/index.js +2 -1
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/Accordeon.css +35 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/Accordeon.d.ts +10 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/Accordeon.js +39 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/wrappers/Accordeon/index.js +5 -0
- package/build/cjs/lib/unstable/kit/wrappers/Row/Row.css +3 -6
- package/build/cjs/lib/unstable/kit/wrappers/Row/Row.js +7 -6
- package/build/cjs/lib/unstable/kit/wrappers/Section/Section.css +23 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/Section.d.ts +8 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/Section.js +36 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/index.d.ts +1 -0
- package/build/cjs/lib/unstable/kit/wrappers/Section/index.js +5 -0
- package/build/cjs/lib/unstable/kit/wrappers/Transparent/Transparent.js +6 -4
- package/build/cjs/lib/unstable/kit/wrappers/index.d.ts +2 -0
- package/build/cjs/lib/unstable/kit/wrappers/index.js +5 -1
- package/build/esm/lib/unstable/core/Entity/index.d.ts +1 -0
- package/build/esm/lib/unstable/core/Entity/index.js +1 -0
- package/build/esm/lib/unstable/core/index.d.ts +2 -2
- package/build/esm/lib/unstable/core/index.js +2 -2
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/ArrayRemoveButton/ArrayRemoveButton.js +12 -5
- package/build/esm/lib/unstable/kit/components/ControlContainer/ControlContainer.css +20 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/ControlContainer.d.ts +8 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/ControlContainer.js +12 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/ControlContainer/index.js +1 -0
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.css +2 -32
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.d.ts +0 -2
- package/build/esm/lib/unstable/kit/components/ControlError/ControlError.js +6 -6
- package/build/esm/lib/unstable/kit/components/WrapperContainer/WrapperContainer.css +8 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/WrapperContainer.d.ts +7 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/WrapperContainer.js +11 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/components/WrapperContainer/index.js +1 -0
- package/build/esm/lib/unstable/kit/components/index.d.ts +2 -0
- package/build/esm/lib/unstable/kit/components/index.js +2 -0
- package/build/esm/lib/unstable/kit/constants/config.d.ts +43 -0
- package/build/esm/lib/unstable/kit/constants/config.js +47 -8
- package/build/esm/lib/unstable/kit/controls/Alert/Alert.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/Alert/Alert.js +24 -0
- package/build/esm/lib/unstable/kit/controls/Alert/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Alert/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/ArrayBase/ArrayBase.js +21 -18
- package/build/esm/lib/unstable/kit/controls/ArrayTable/ArrayTable.css +39 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/ArrayTable.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/ArrayTable.js +85 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/ArrayTable/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.css +7 -1
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/Checkbox/Checkbox.js +11 -7
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.css +8 -2
- package/build/esm/lib/unstable/kit/controls/CheckboxGroup/CheckboxGroup.js +13 -8
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.css +6 -0
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.d.ts +3 -2
- package/build/esm/lib/unstable/kit/controls/ColorPicker/ColorPicker.js +11 -9
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.css +2 -2
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/DateInput/DateInput.js +16 -15
- package/build/esm/lib/unstable/kit/controls/DotValue/DotValue.d.ts +5 -0
- package/build/esm/lib/unstable/kit/controls/DotValue/DotValue.js +26 -0
- package/build/esm/lib/unstable/kit/controls/DotValue/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/DotValue/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/FewOfNested.css +14 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/FewOfNested.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/FewOfNested.js +60 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/FewOfNested/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/FileInput.d.ts +7 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/FileInput.js +50 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/FileInput/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Label/Label.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/Label/Label.js +25 -0
- package/build/esm/lib/unstable/kit/controls/Label/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/Label/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/MultiSelect/MultiSelect.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/MultiSelect/MultiSelect.js +6 -3
- package/build/esm/lib/unstable/kit/controls/NumberBase/NumberBase.css +3 -0
- package/build/{cjs/lib/unstable/kit/controls/NumberBase/Number.d.ts → esm/lib/unstable/kit/controls/NumberBase/NumberBase.d.ts} +2 -1
- package/build/esm/lib/unstable/kit/controls/NumberBase/NumberBase.js +13 -0
- package/build/esm/lib/unstable/kit/controls/NumberBase/index.d.ts +1 -1
- package/build/esm/lib/unstable/kit/controls/NumberBase/index.js +1 -1
- package/build/esm/lib/unstable/kit/controls/ObjectBase/ObjectBase.d.ts +0 -1
- package/build/esm/lib/unstable/kit/controls/ObjectBase/ObjectBase.js +7 -25
- package/build/esm/lib/unstable/kit/controls/ObjectInline/ObjectInline.css +8 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/ObjectInline.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/ObjectInline.js +22 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/ObjectInline/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/OneOfNested.css +14 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/OneOfNested.d.ts +13 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/OneOfNested.js +61 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/OneOfNested/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Password/Password.css +3 -0
- package/build/esm/lib/unstable/kit/controls/Password/Password.d.ts +2 -1
- package/build/esm/lib/unstable/kit/controls/Password/Password.js +8 -3
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.css +12 -2
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/RadioGroup/RadioGroup.js +7 -7
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.d.ts +2 -3
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.js +13 -12
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.css +6 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.d.ts +9 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/SegmentedRadioGroup.js +27 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/SegmentedRadioGroup/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/Select/Select.d.ts +3 -3
- package/build/esm/lib/unstable/kit/controls/Select/Select.js +7 -4
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.d.ts +2 -3
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.js +9 -8
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.css +3 -0
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.d.ts +2 -1
- package/build/esm/lib/unstable/kit/controls/StringBase/StringBase.js +6 -2
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.css +8 -2
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.d.ts +2 -2
- package/build/esm/lib/unstable/kit/controls/Switch/Switch.js +11 -7
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.css +3 -0
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.d.ts +3 -2
- package/build/esm/lib/unstable/kit/controls/TextArea/TextArea.js +7 -3
- package/build/esm/lib/unstable/kit/controls/TextContent/TextContent.css +10 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/TextContent.d.ts +10 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/TextContent.js +27 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/controls/TextContent/index.js +1 -0
- package/build/esm/lib/unstable/kit/controls/index.d.ts +10 -0
- package/build/esm/lib/unstable/kit/controls/index.js +10 -0
- package/build/esm/lib/unstable/kit/utils/common.d.ts +1 -0
- package/build/esm/lib/unstable/kit/utils/common.js +3 -0
- package/build/esm/lib/unstable/kit/utils/index.d.ts +1 -1
- package/build/esm/lib/unstable/kit/utils/index.js +1 -1
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/Accordeon.css +35 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/Accordeon.d.ts +11 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/Accordeon.js +37 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Accordeon/index.js +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Row/Row.css +3 -6
- package/build/esm/lib/unstable/kit/wrappers/Row/Row.js +9 -8
- package/build/esm/lib/unstable/kit/wrappers/Section/Section.css +23 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/Section.d.ts +9 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/Section.js +34 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/index.d.ts +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Section/index.js +1 -0
- package/build/esm/lib/unstable/kit/wrappers/Transparent/Transparent.js +8 -6
- package/build/esm/lib/unstable/kit/wrappers/index.d.ts +2 -0
- package/build/esm/lib/unstable/kit/wrappers/index.js +2 -0
- package/package.json +1 -1
- package/build/cjs/lib/unstable/kit/Accordeon.d.ts +0 -3
- package/build/cjs/lib/unstable/kit/Accordeon.js +0 -31
- package/build/cjs/lib/unstable/kit/Any.d.ts +0 -2
- package/build/cjs/lib/unstable/kit/Any.js +0 -21
- package/build/cjs/lib/unstable/kit/ArrayBase.css +0 -23
- package/build/cjs/lib/unstable/kit/ArrayBase.d.ts +0 -2
- package/build/cjs/lib/unstable/kit/ArrayBase.js +0 -101
- package/build/cjs/lib/unstable/kit/MultiSelect.css +0 -6
- package/build/cjs/lib/unstable/kit/MultiSelect.d.ts +0 -6
- package/build/cjs/lib/unstable/kit/MultiSelect.js +0 -66
- package/build/cjs/lib/unstable/kit/ObjectBase.css +0 -10
- package/build/cjs/lib/unstable/kit/ObjectBase.d.ts +0 -7
- package/build/cjs/lib/unstable/kit/ObjectBase.js +0 -71
- package/build/cjs/lib/unstable/kit/Row.css +0 -73
- package/build/cjs/lib/unstable/kit/Row.d.ts +0 -10
- package/build/cjs/lib/unstable/kit/Row.js +0 -50
- package/build/cjs/lib/unstable/kit/Text.d.ts +0 -6
- package/build/cjs/lib/unstable/kit/Text.js +0 -259
- package/build/cjs/lib/unstable/kit/config.d.ts +0 -95
- package/build/cjs/lib/unstable/kit/config.js +0 -68
- package/build/cjs/lib/unstable/kit/controls/NumberBase/Number.js +0 -12
- package/build/cjs/lib/unstable/kit/controls/RangeSlider/RangeSlider.css +0 -3
- package/build/cjs/lib/unstable/kit/controls/Slider/Slider.css +0 -3
- package/build/esm/lib/unstable/kit/Accordeon.d.ts +0 -3
- package/build/esm/lib/unstable/kit/Accordeon.js +0 -26
- package/build/esm/lib/unstable/kit/Any.d.ts +0 -2
- package/build/esm/lib/unstable/kit/Any.js +0 -16
- package/build/esm/lib/unstable/kit/ArrayBase.css +0 -23
- package/build/esm/lib/unstable/kit/ArrayBase.d.ts +0 -3
- package/build/esm/lib/unstable/kit/ArrayBase.js +0 -97
- package/build/esm/lib/unstable/kit/MultiSelect.css +0 -6
- package/build/esm/lib/unstable/kit/MultiSelect.d.ts +0 -7
- package/build/esm/lib/unstable/kit/MultiSelect.js +0 -62
- package/build/esm/lib/unstable/kit/ObjectBase.css +0 -10
- package/build/esm/lib/unstable/kit/ObjectBase.d.ts +0 -8
- package/build/esm/lib/unstable/kit/ObjectBase.js +0 -66
- package/build/esm/lib/unstable/kit/Row.css +0 -73
- package/build/esm/lib/unstable/kit/Row.d.ts +0 -11
- package/build/esm/lib/unstable/kit/Row.js +0 -47
- package/build/esm/lib/unstable/kit/Text.d.ts +0 -6
- package/build/esm/lib/unstable/kit/Text.js +0 -255
- package/build/esm/lib/unstable/kit/config.d.ts +0 -95
- package/build/esm/lib/unstable/kit/config.js +0 -65
- package/build/esm/lib/unstable/kit/controls/NumberBase/Number.js +0 -8
- package/build/esm/lib/unstable/kit/controls/RangeSlider/RangeSlider.css +0 -3
- package/build/esm/lib/unstable/kit/controls/Slider/Slider.css +0 -3
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Flex, Select as
|
|
3
|
+
import { Flex, Text, Select as UIKitSelect, } from '@gravity-ui/uikit';
|
|
4
4
|
import isString from 'lodash/isString';
|
|
5
|
+
import { ControlContainer } from '../../components';
|
|
5
6
|
import { getValidationState } from '../../utils';
|
|
6
7
|
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
7
8
|
var _a, _b;
|
|
9
|
+
const { name, onBlur, onChange, onFocus, value: inputValue } = input;
|
|
8
10
|
const { enumDescriptions, optionsMeta } = controlProps, restControlProps = __rest(controlProps, ["enumDescriptions", "optionsMeta"]);
|
|
9
|
-
const value = React.useMemo(() => (Array.isArray(
|
|
11
|
+
const value = React.useMemo(() => (Array.isArray(inputValue) && inputValue.every(isString) ? inputValue : undefined), [inputValue]);
|
|
10
12
|
const enumValues = schema.items && 'enum' in schema.items ? schema.items.enum : undefined;
|
|
11
13
|
const options = React.useMemo(() => {
|
|
12
14
|
if (enumValues) {
|
|
@@ -27,6 +29,7 @@ const Component = ({ controlProps, input, meta, schema, }) => {
|
|
|
27
29
|
}, [enumDescriptions, enumValues, optionsMeta]);
|
|
28
30
|
const renderOption = React.useCallback((option) => (React.createElement(React.Fragment, { key: option.value }, option.content || option.text || option.value)), []);
|
|
29
31
|
const getOptionHeight = React.useCallback((option) => { var _a; return (((_a = option.data) === null || _a === void 0 ? void 0 : _a.optionMeta) ? 44 : 28); }, []);
|
|
30
|
-
return (React.createElement(
|
|
32
|
+
return (React.createElement(ControlContainer, { stretch: "max" },
|
|
33
|
+
React.createElement(UIKitSelect, Object.assign({ width: "max", options: options, filterable: ((enumValues === null || enumValues === void 0 ? void 0 : enumValues.length) || 0) > 9, renderOption: renderOption, getOptionHeight: getOptionHeight, placeholder: `${(_b = (_a = schema.examples) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b[0]}`, disabled: schema.readOnly }, restControlProps, { value: value, onFocus: onFocus, onBlur: onBlur, onUpdate: onChange, errorMessage: undefined, validationState: getValidationState(meta), multiple: true, qa: name }))));
|
|
31
34
|
};
|
|
32
35
|
export const MultiSelect = React.memo(Component);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type NumberInputProps } from '@gravity-ui/uikit';
|
|
3
3
|
import { type JsonSchemaNumber } from '../../../core';
|
|
4
|
-
|
|
4
|
+
import './NumberBase.css';
|
|
5
|
+
export interface NumberBaseProps extends Omit<NumberInputProps, 'value' | 'defaultValue' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
5
6
|
}
|
|
6
7
|
export declare const NumberBase: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaNumber<any>, NumberBaseProps, {}>>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { NumberInput } from '@gravity-ui/uikit';
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
import { block, getBooleanValidationState, getValidationState } from '../../utils';
|
|
5
|
+
import './NumberBase.css';
|
|
6
|
+
const b = block('number-base');
|
|
7
|
+
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const { name, onBlur, onChange, onFocus, value } = input;
|
|
10
|
+
return (React.createElement(ControlContainer, { stretch: "max", className: b({ error: getBooleanValidationState(meta) }) },
|
|
11
|
+
React.createElement(NumberInput, Object.assign({ allowDecimal: true, hasClear: true, placeholder: `${((_a = schema.examples) === null || _a === void 0 ? void 0 : _a[0]) || ''}`, disabled: schema.readOnly }, controlProps, { value: value, defaultValue: schema.default, onBlur: onBlur, onFocus: onFocus, onUpdate: onChange, errorMessage: undefined, validationState: getValidationState(meta), qa: name }))));
|
|
12
|
+
};
|
|
13
|
+
export const NumberBase = React.memo(Component);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { NumberBase, type NumberBaseProps } from './
|
|
1
|
+
export { NumberBase, type NumberBaseProps } from './NumberBase';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { NumberBase } from './
|
|
1
|
+
export { NumberBase } from './NumberBase';
|
|
@@ -1,29 +1,11 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Plus } from '@gravity-ui/icons';
|
|
3
|
-
import { Button, Flex, Icon } from '@gravity-ui/uikit';
|
|
4
2
|
import { Entity } from '../../../core';
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return (React.createElement(
|
|
11
|
-
|
|
12
|
-
controlProps.addButtonText || null));
|
|
13
|
-
}, [
|
|
14
|
-
controlProps.addButtonText,
|
|
15
|
-
controlProps.disabled,
|
|
16
|
-
input.onChange,
|
|
17
|
-
schema.default,
|
|
18
|
-
schema.readOnly,
|
|
19
|
-
]);
|
|
20
|
-
return (React.createElement(ControlError, { errorMessage: meta.error, validationState: getValidationState(meta) },
|
|
21
|
-
React.createElement(Flex, { direction: "column", gap: 2 },
|
|
22
|
-
React.createElement(Flex, { direction: "column" },
|
|
23
|
-
(controlProps.order || Object.keys(schema.properties || {})).map((property) => {
|
|
24
|
-
var _a;
|
|
25
|
-
return (React.createElement(Entity, { name: `${input.name ? input.name + '.' : ''}${property}`, schema: (_a = schema.properties) === null || _a === void 0 ? void 0 : _a[property], key: property }));
|
|
26
|
-
}),
|
|
27
|
-
input.value ? null : addButton))));
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
const Component = ({ controlProps, input, schema, }) => {
|
|
5
|
+
const { name } = input;
|
|
6
|
+
return (React.createElement(ControlContainer, { stretch: "by-child" }, (controlProps.order || Object.keys(schema.properties || {})).map((property) => {
|
|
7
|
+
var _a;
|
|
8
|
+
return (React.createElement(Entity, { name: `${name ? name + '.' : ''}${property}`, schema: (_a = schema.properties) === null || _a === void 0 ? void 0 : _a[property], key: property }));
|
|
9
|
+
})));
|
|
28
10
|
};
|
|
29
11
|
export const ObjectBase = React.memo(Component);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type JsonSchemaObject } from '../../../core';
|
|
3
|
+
import './ObjectInline.css';
|
|
4
|
+
export interface ObjectInlineProps {
|
|
5
|
+
delimiter?: string | Record<string, string>;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
order?: string[];
|
|
8
|
+
}
|
|
9
|
+
export declare const ObjectInline: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaObject<any>, ObjectInlineProps, {}>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Flex, Text } from '@gravity-ui/uikit';
|
|
3
|
+
import isObject from 'lodash/isObject';
|
|
4
|
+
import isString from 'lodash/isString';
|
|
5
|
+
import { Entity } from '../../../core';
|
|
6
|
+
import { ControlContainer } from '../../components';
|
|
7
|
+
import { block } from '../../utils';
|
|
8
|
+
import './ObjectInline.css';
|
|
9
|
+
const b = block('object-inline');
|
|
10
|
+
const Component = ({ controlProps, input, schema }) => {
|
|
11
|
+
const { delimiter, order } = controlProps;
|
|
12
|
+
const { name } = input;
|
|
13
|
+
return (React.createElement(ControlContainer, { stretch: "max", className: b() },
|
|
14
|
+
React.createElement(Flex, { className: b('items'), direction: "row", alignItems: "flex-start", gap: 2 }, (order || Object.keys(schema.properties || {})).map((property, index, array) => {
|
|
15
|
+
var _a;
|
|
16
|
+
return (React.createElement(React.Fragment, { key: property },
|
|
17
|
+
React.createElement(Entity, { name: `${name ? name + '.' : ''}${property}`, schema: (_a = schema.properties) === null || _a === void 0 ? void 0 : _a[property] }),
|
|
18
|
+
isString(delimiter) && index + 1 !== array.length ? (React.createElement(Text, { className: b('delimiter') }, delimiter)) : null,
|
|
19
|
+
isObject(delimiter) && delimiter[property] ? (React.createElement(Text, { className: b('delimiter') }, delimiter[property])) : null));
|
|
20
|
+
}))));
|
|
21
|
+
};
|
|
22
|
+
export const ObjectInline = React.memo(Component);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ObjectInline, type ObjectInlineProps } from './ObjectInline';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { ObjectInline } from './ObjectInline';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
.sr-one-of-nested__content_with-indent {
|
|
2
|
+
position: relative;
|
|
3
|
+
padding-left: calc(var(--g-spacing-base) * 7);
|
|
4
|
+
}
|
|
5
|
+
.sr-one-of-nested__content_with-indent:before {
|
|
6
|
+
content: "";
|
|
7
|
+
display: block;
|
|
8
|
+
width: 1px;
|
|
9
|
+
height: calc(100% + var(--g-spacing-base) * 2);
|
|
10
|
+
background-color: var(--g-color-line-generic);
|
|
11
|
+
position: absolute;
|
|
12
|
+
left: calc(var(--g-spacing-base) * 3 + 1.5px);
|
|
13
|
+
bottom: 0;
|
|
14
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type JsonSchema, type JsonSchemaObject } from '../../../core';
|
|
3
|
+
import './OneOfNested.css';
|
|
4
|
+
export interface OneOfNestedProps {
|
|
5
|
+
toggler: JsonSchema;
|
|
6
|
+
booleanToKey?: {
|
|
7
|
+
true: string;
|
|
8
|
+
false: string;
|
|
9
|
+
};
|
|
10
|
+
withIndent?: boolean;
|
|
11
|
+
togglerArrayRemoveButton?: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare const OneOfNested: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaObject<any>, OneOfNestedProps, {}>>;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Entity, EntityType, SchemaRendererMode, getRenderKit, useEntitiesState, } from '../../../core';
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
import { block } from '../../utils';
|
|
5
|
+
import './OneOfNested.css';
|
|
6
|
+
const b = block('one-of-nested');
|
|
7
|
+
const Component = ({ controlProps, input, meta, schema, Wrapper, wrapperProps, }) => {
|
|
8
|
+
var _a;
|
|
9
|
+
const { name, value } = input;
|
|
10
|
+
const { booleanToKey, togglerArrayRemoveButton = false, toggler: togglerSchema = {}, withIndent = false, } = controlProps;
|
|
11
|
+
const { config } = useEntitiesState(name);
|
|
12
|
+
const [togglerValue, setTogglerValue] = React.useState(Object.keys(value || schema.properties || {})[0] || '');
|
|
13
|
+
const toggler = React.useMemo(() => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
let result = null;
|
|
16
|
+
const formKit = getRenderKit({ config, schema: togglerSchema })[SchemaRendererMode.Form];
|
|
17
|
+
const togglerInput = Object.assign(Object.assign({}, input), { name: togglerArrayRemoveButton ? name : `${name}._____toggler`, value: (_b = (((_a = togglerSchema.entityParameters) === null || _a === void 0 ? void 0 : _a.type) === EntityType.Boolean &&
|
|
18
|
+
booleanToKey &&
|
|
19
|
+
booleanToKey.true === togglerValue)) !== null && _b !== void 0 ? _b : togglerValue, onChange: (value) => {
|
|
20
|
+
const nextValue = `${value}`;
|
|
21
|
+
setTogglerValue((booleanToKey === null || booleanToKey === void 0 ? void 0 : booleanToKey[nextValue]) || nextValue);
|
|
22
|
+
} });
|
|
23
|
+
const togglerMeta = Object.assign(Object.assign({}, meta), { error: undefined });
|
|
24
|
+
if (formKit.Component) {
|
|
25
|
+
if (formKit.independent) {
|
|
26
|
+
result = (React.createElement(formKit.Component, { input: togglerInput, meta: togglerMeta, schema: togglerSchema, controlProps: formKit.props, Wrapper: formKit.Wrapper, wrapperProps: formKit.wrapperProps }));
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
result = (React.createElement(formKit.Component, { input: togglerInput, meta: togglerMeta, schema: togglerSchema, controlProps: formKit.props }));
|
|
30
|
+
if (formKit.Wrapper) {
|
|
31
|
+
result = (React.createElement(formKit.Wrapper, { input: togglerInput, meta: togglerMeta, schema: togglerSchema, wrapperProps: formKit.wrapperProps }, result));
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}, [
|
|
37
|
+
booleanToKey,
|
|
38
|
+
config,
|
|
39
|
+
name,
|
|
40
|
+
input,
|
|
41
|
+
meta,
|
|
42
|
+
togglerArrayRemoveButton,
|
|
43
|
+
togglerSchema,
|
|
44
|
+
togglerValue,
|
|
45
|
+
]);
|
|
46
|
+
const wrapperInput = React.useMemo(() => {
|
|
47
|
+
if (!togglerArrayRemoveButton) {
|
|
48
|
+
return input;
|
|
49
|
+
}
|
|
50
|
+
return Object.assign(Object.assign({}, input), { name: `${name}._____wrapper` });
|
|
51
|
+
}, [name, input, togglerArrayRemoveButton]);
|
|
52
|
+
let content = (React.createElement(ControlContainer, { stretch: "by-child" },
|
|
53
|
+
toggler,
|
|
54
|
+
React.createElement("div", { className: b('content', { 'with-indent': withIndent }) },
|
|
55
|
+
React.createElement(Entity, { name: `${name}.${togglerValue}`, schema: (_a = schema.properties) === null || _a === void 0 ? void 0 : _a[togglerValue] }))));
|
|
56
|
+
if (Wrapper) {
|
|
57
|
+
content = (React.createElement(Wrapper, { input: wrapperInput, meta: meta, schema: schema, wrapperProps: wrapperProps || {} }, content));
|
|
58
|
+
}
|
|
59
|
+
return content;
|
|
60
|
+
};
|
|
61
|
+
export const OneOfNested = React.memo(Component);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OneOfNested, type OneOfNestedProps } from './OneOfNested';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { OneOfNested } from './OneOfNested';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type PasswordInputProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaString } from '../../../core';
|
|
4
|
-
|
|
4
|
+
import './Password.css';
|
|
5
|
+
export interface PasswordProps extends Omit<PasswordInputProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
5
6
|
}
|
|
6
7
|
export declare const Password: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaString<any>, PasswordProps, {}>>;
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { PasswordInput } from '@gravity-ui/uikit';
|
|
3
|
-
import {
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
import { block, getBooleanValidationState, getValidationState } from '../../utils';
|
|
5
|
+
import './Password.css';
|
|
6
|
+
const b = block('password');
|
|
4
7
|
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
5
|
-
var _a
|
|
6
|
-
|
|
8
|
+
var _a;
|
|
9
|
+
const { name, onBlur, onChange, onFocus, value } = input;
|
|
10
|
+
return (React.createElement(ControlContainer, { stretch: "max", className: b({ error: getBooleanValidationState(meta) }) },
|
|
11
|
+
React.createElement(PasswordInput, Object.assign({ autoComplete: "new-password", placeholder: (_a = schema.examples) === null || _a === void 0 ? void 0 : _a[0], disabled: schema.readOnly, hasClear: true }, controlProps, { value: value !== null && value !== void 0 ? value : '', onFocus: onFocus, onBlur: onBlur, onUpdate: onChange, errorMessage: undefined, validationState: getValidationState(meta), qa: name }))));
|
|
7
12
|
};
|
|
8
13
|
export const Password = React.memo(Component);
|
|
@@ -1,3 +1,13 @@
|
|
|
1
|
-
.sr-radio-
|
|
2
|
-
|
|
1
|
+
.sr-radio-group_direction_horizontal {
|
|
2
|
+
min-height: 28px;
|
|
3
|
+
padding-top: 1px;
|
|
4
|
+
}
|
|
5
|
+
.sr-radio-group_direction_vertical {
|
|
6
|
+
padding-top: 7px;
|
|
7
|
+
}
|
|
8
|
+
.sr-radio-group_error .g-radio-group .g-radio_checked .g-radio__indicator:hover::before {
|
|
9
|
+
border: 1px solid var(--g-color-text-danger);
|
|
10
|
+
}
|
|
11
|
+
.sr-radio-group_error .g-radio-group .g-radio_checked .g-radio__indicator::before {
|
|
12
|
+
border: 1px solid var(--g-color-text-danger);
|
|
3
13
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type RadioGroupProps as
|
|
2
|
+
import { type RadioGroupProps as UIKitRadioGroupProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaString } from '../../../core';
|
|
4
4
|
import './RadioGroup.css';
|
|
5
|
-
export interface RadioGroupProps extends Omit<
|
|
5
|
+
export interface RadioGroupProps extends Omit<UIKitRadioGroupProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'qa'> {
|
|
6
6
|
enumDescriptions?: Record<string, string>;
|
|
7
7
|
optionsDisabled?: Record<string, boolean>;
|
|
8
8
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { block,
|
|
3
|
+
import { RadioGroup as UIKitRadioGroup, } from '@gravity-ui/uikit';
|
|
4
|
+
import { ControlContainer } from '../../components';
|
|
5
|
+
import { block, getBooleanValidationState } from '../../utils';
|
|
6
6
|
import './RadioGroup.css';
|
|
7
7
|
const b = block('radio-group');
|
|
8
8
|
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
9
|
-
const {
|
|
9
|
+
const { name, onBlur, onChange, onFocus, value } = input;
|
|
10
|
+
const { enumDescriptions, optionsDisabled, direction = 'horizontal' } = controlProps, restControlProps = __rest(controlProps, ["enumDescriptions", "optionsDisabled", "direction"]);
|
|
10
11
|
const options = React.useMemo(() => {
|
|
11
12
|
var _a;
|
|
12
13
|
return (_a = schema.enum) === null || _a === void 0 ? void 0 : _a.map((value) => ({
|
|
@@ -15,8 +16,7 @@ const Component = ({ controlProps, input, meta, schema, }) => {
|
|
|
15
16
|
disabled: optionsDisabled === null || optionsDisabled === void 0 ? void 0 : optionsDisabled[value],
|
|
16
17
|
}));
|
|
17
18
|
}, [enumDescriptions, optionsDisabled, schema.enum]);
|
|
18
|
-
return (React.createElement(
|
|
19
|
-
React.createElement(
|
|
20
|
-
React.createElement(RadioGroupBase, Object.assign({ options: options, disabled: schema.readOnly }, restControlProps, { value: input.value, onFocus: input.onFocus, onBlur: input.onBlur, onUpdate: input.onChange, qa: input.name })))));
|
|
19
|
+
return (React.createElement(ControlContainer, { stretch: "fit", className: b({ error: getBooleanValidationState(meta), direction }), justifyContent: "center" },
|
|
20
|
+
React.createElement(UIKitRadioGroup, Object.assign({ options: options, disabled: schema.readOnly }, restControlProps, { value: value, onFocus: onFocus, onBlur: onBlur, onUpdate: onChange, direction: direction, qa: name }))));
|
|
21
21
|
};
|
|
22
22
|
export const RadioGroup = React.memo(Component);
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SliderProps as
|
|
2
|
+
import { type SliderProps as UIKitSliderProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaObject } from '../../../core';
|
|
4
|
-
|
|
5
|
-
export interface RangeSliderProps extends Omit<SliderBaseProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'qa'> {
|
|
4
|
+
export interface RangeSliderProps extends Omit<UIKitSliderProps, 'defaultValue' | 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
6
5
|
propertyKeys?: [string, string];
|
|
7
6
|
}
|
|
8
7
|
export declare const RangeSlider: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaObject<any>, RangeSliderProps, {}>>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Slider as
|
|
4
|
-
import {
|
|
5
|
-
import '
|
|
6
|
-
const b = block('range-slider');
|
|
3
|
+
import { Slider as UIKitSlider } from '@gravity-ui/uikit';
|
|
4
|
+
import { ControlContainer } from '../../components';
|
|
5
|
+
import { getValidationState } from '../../utils';
|
|
7
6
|
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
8
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
7
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
8
|
+
const { name, onBlur, onChange, onFocus, value: inputValue } = input;
|
|
9
9
|
const { propertyKeys } = controlProps, restControlProps = __rest(controlProps, ["propertyKeys"]);
|
|
10
10
|
const [fromKey, toKey] = propertyKeys || ['from', 'to'];
|
|
11
11
|
const min = ((_a = schema.properties) === null || _a === void 0 ? void 0 : _a[fromKey]) && 'minimum' in schema.properties[fromKey]
|
|
@@ -14,18 +14,19 @@ const Component = ({ controlProps, input, meta, schema, }) => {
|
|
|
14
14
|
const max = ((_d = schema.properties) === null || _d === void 0 ? void 0 : _d[toKey]) && 'maximum' in schema.properties[toKey]
|
|
15
15
|
? (_f = (_e = schema.properties) === null || _e === void 0 ? void 0 : _e[toKey]) === null || _f === void 0 ? void 0 : _f.maximum
|
|
16
16
|
: undefined;
|
|
17
|
-
const value = isNaN(Number(
|
|
17
|
+
const value = isNaN(Number(inputValue === null || inputValue === void 0 ? void 0 : inputValue[fromKey])) || isNaN(Number(inputValue === null || inputValue === void 0 ? void 0 : inputValue[toKey]))
|
|
18
18
|
? undefined
|
|
19
|
-
: [Number(
|
|
20
|
-
const defaultValue = isNaN(Number((
|
|
19
|
+
: [Number(inputValue === null || inputValue === void 0 ? void 0 : inputValue[fromKey]), Number(inputValue === null || inputValue === void 0 ? void 0 : inputValue[toKey])];
|
|
20
|
+
const defaultValue = isNaN(Number((_g = schema.default) === null || _g === void 0 ? void 0 : _g[fromKey])) || isNaN(Number((_h = schema.default) === null || _h === void 0 ? void 0 : _h[toKey]))
|
|
21
21
|
? undefined
|
|
22
|
-
: [Number((
|
|
22
|
+
: [Number((_j = schema.default) === null || _j === void 0 ? void 0 : _j[fromKey]), Number((_k = schema.default) === null || _k === void 0 ? void 0 : _k[toKey])];
|
|
23
23
|
const onUpdate = React.useCallback((next) => {
|
|
24
24
|
if (!Array.isArray(next)) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
}, [fromKey, toKey,
|
|
29
|
-
return (React.createElement(
|
|
27
|
+
onChange({ [fromKey]: next[0], [toKey]: next[1] });
|
|
28
|
+
}, [fromKey, toKey, onChange]);
|
|
29
|
+
return (React.createElement(ControlContainer, { stretch: "max" },
|
|
30
|
+
React.createElement(UIKitSlider, Object.assign({ min: min, max: max, step: 1, marks: 2, disabled: schema.readOnly, tooltipDisplay: "on" }, restControlProps, { defaultValue: defaultValue, value: value, onFocus: onFocus, onBlur: onBlur, onUpdate: onUpdate, errorMessage: undefined, validationState: getValidationState(meta), qa: name }))));
|
|
30
31
|
};
|
|
31
32
|
export const RangeSlider = React.memo(Component);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
.sr-segmented-radio-group_error .g-segmented-radio-group .g-segmented-radio-group__option_checked:hover::after {
|
|
2
|
+
border: 1px solid var(--g-color-text-danger);
|
|
3
|
+
}
|
|
4
|
+
.sr-segmented-radio-group_error .g-segmented-radio-group .g-segmented-radio-group__option_checked::after {
|
|
5
|
+
border: 1px solid var(--g-color-text-danger);
|
|
6
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type SegmentedRadioGroupProps as UIKitSegmentedRadioGroupProps } from '@gravity-ui/uikit';
|
|
3
|
+
import type { JsonSchemaString } from '../../../core';
|
|
4
|
+
import './SegmentedRadioGroup.css';
|
|
5
|
+
export interface SegmentedRadioGroupProps extends Omit<UIKitSegmentedRadioGroupProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'qa'> {
|
|
6
|
+
enumDescriptions?: Record<string, string>;
|
|
7
|
+
optionsDisabled?: Record<string, boolean>;
|
|
8
|
+
}
|
|
9
|
+
export declare const SegmentedRadioGroup: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaString<any>, SegmentedRadioGroupProps, {}>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SegmentedRadioGroup as UIKitSegmentedRadioGroup, } from '@gravity-ui/uikit';
|
|
4
|
+
import { ControlContainer } from '../../components';
|
|
5
|
+
import { block, getBooleanValidationState } from '../../utils';
|
|
6
|
+
import './SegmentedRadioGroup.css';
|
|
7
|
+
const b = block('segmented-radio-group');
|
|
8
|
+
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
9
|
+
const { name, onBlur, onChange, onFocus, value } = input;
|
|
10
|
+
const { enumDescriptions, optionsDisabled } = controlProps, restControlProps = __rest(controlProps, ["enumDescriptions", "optionsDisabled"]);
|
|
11
|
+
const options = React.useMemo(() => {
|
|
12
|
+
var _a;
|
|
13
|
+
return (_a = schema.enum) === null || _a === void 0 ? void 0 : _a.map((value) => ({
|
|
14
|
+
value,
|
|
15
|
+
content: (enumDescriptions === null || enumDescriptions === void 0 ? void 0 : enumDescriptions[value]) || value,
|
|
16
|
+
disabled: optionsDisabled === null || optionsDisabled === void 0 ? void 0 : optionsDisabled[value],
|
|
17
|
+
}));
|
|
18
|
+
}, [enumDescriptions, optionsDisabled, schema.enum]);
|
|
19
|
+
const onUpdate = React.useCallback((value) => {
|
|
20
|
+
onFocus();
|
|
21
|
+
onChange(value);
|
|
22
|
+
onBlur();
|
|
23
|
+
}, [onBlur, onChange, onFocus]);
|
|
24
|
+
return (React.createElement(ControlContainer, { stretch: "max", className: b({ error: getBooleanValidationState(meta) }) },
|
|
25
|
+
React.createElement(UIKitSegmentedRadioGroup, Object.assign({ width: "max", disabled: schema.readOnly, options: options }, restControlProps, { value: value, onFocus: onFocus, onBlur: onBlur, onUpdate: onUpdate, qa: name }))));
|
|
26
|
+
};
|
|
27
|
+
export const SegmentedRadioGroup = React.memo(Component);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SegmentedRadioGroup, type SegmentedRadioGroupProps } from './SegmentedRadioGroup';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { SegmentedRadioGroup } from './SegmentedRadioGroup';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SelectProps as
|
|
2
|
+
import { type SelectProps as UIKitSelectProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaString } from '../../../core';
|
|
4
|
-
export interface SelectProps extends Omit<
|
|
4
|
+
export interface SelectProps extends Omit<UIKitSelectProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'multiple' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
5
5
|
enumDescriptions?: Record<string, string>;
|
|
6
6
|
optionsMeta?: Record<string, string>;
|
|
7
|
-
options?:
|
|
7
|
+
options?: UIKitSelectProps['options'];
|
|
8
8
|
}
|
|
9
9
|
export declare const Select: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaString<any>, SelectProps, {}>>;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { __rest } from "tslib";
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { Flex, Select as
|
|
3
|
+
import { Flex, Text, Select as UIKitSelect, } from '@gravity-ui/uikit';
|
|
4
4
|
import isString from 'lodash/isString';
|
|
5
|
+
import { ControlContainer } from '../../components';
|
|
5
6
|
import { getValidationState } from '../../utils';
|
|
6
7
|
const Component = ({ controlProps, input, meta, schema }) => {
|
|
7
8
|
var _a, _b;
|
|
9
|
+
const { name, onBlur, onChange, onFocus, value: inputValue } = input;
|
|
8
10
|
const { enumDescriptions, optionsMeta } = controlProps, restControlProps = __rest(controlProps, ["enumDescriptions", "optionsMeta"]);
|
|
9
|
-
const value = React.useMemo(() => (isString(
|
|
10
|
-
const onUpdate = React.useCallback((v) =>
|
|
11
|
+
const value = React.useMemo(() => (isString(inputValue) ? [inputValue] : undefined), [inputValue]);
|
|
12
|
+
const onUpdate = React.useCallback((v) => onChange(v[0]), [onChange]);
|
|
11
13
|
const options = React.useMemo(() => {
|
|
12
14
|
var _a;
|
|
13
15
|
return (_a = schema.enum) === null || _a === void 0 ? void 0 : _a.map((value) => {
|
|
@@ -24,6 +26,7 @@ const Component = ({ controlProps, input, meta, schema }) => {
|
|
|
24
26
|
}, [enumDescriptions, optionsMeta, schema.enum]);
|
|
25
27
|
const renderOption = React.useCallback((option) => (React.createElement(React.Fragment, { key: option.value }, option.content || option.text || option.value)), []);
|
|
26
28
|
const getOptionHeight = React.useCallback((option) => { var _a; return (((_a = option.data) === null || _a === void 0 ? void 0 : _a.optionMeta) ? 44 : 28); }, []);
|
|
27
|
-
return (React.createElement(
|
|
29
|
+
return (React.createElement(ControlContainer, { stretch: "max" },
|
|
30
|
+
React.createElement(UIKitSelect, Object.assign({ width: "max", options: options, filterable: (((_a = schema.enum) === null || _a === void 0 ? void 0 : _a.length) || 0) > 9, renderOption: renderOption, getOptionHeight: getOptionHeight, placeholder: (_b = schema.examples) === null || _b === void 0 ? void 0 : _b[0], disabled: schema.readOnly }, restControlProps, { value: value, onFocus: onFocus, onBlur: onBlur, onUpdate: onUpdate, errorMessage: undefined, validationState: getValidationState(meta), qa: name }))));
|
|
28
31
|
};
|
|
29
32
|
export const Select = React.memo(Component);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SliderProps as
|
|
2
|
+
import { type SliderProps as UIKitSliderProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaNumber } from '../../../core';
|
|
4
|
-
|
|
5
|
-
export interface SliderProps extends Omit<SliderBaseProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
4
|
+
export interface SliderProps extends Omit<UIKitSliderProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
6
5
|
}
|
|
7
6
|
export declare const Slider: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaNumber<any>, SliderProps, {}>>;
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Slider as
|
|
3
|
-
import {
|
|
4
|
-
import '
|
|
5
|
-
const b = block('slider');
|
|
2
|
+
import { Slider as UIKitSlider } from '@gravity-ui/uikit';
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
import { getValidationState } from '../../utils';
|
|
6
5
|
const Component = ({ controlProps, input, meta, schema }) => {
|
|
7
|
-
const
|
|
6
|
+
const { name, onBlur, onChange, onFocus, value: inputValue } = input;
|
|
7
|
+
const value = isNaN(Number(inputValue)) ? undefined : Number(inputValue);
|
|
8
8
|
const onUpdate = React.useCallback((next) => {
|
|
9
9
|
if (Array.isArray(next)) {
|
|
10
10
|
return;
|
|
11
11
|
}
|
|
12
|
-
|
|
13
|
-
}, [
|
|
14
|
-
return (React.createElement(
|
|
12
|
+
onChange(next);
|
|
13
|
+
}, [onChange]);
|
|
14
|
+
return (React.createElement(ControlContainer, { stretch: "max" },
|
|
15
|
+
React.createElement(UIKitSlider, Object.assign({ min: schema.minimum, max: schema.maximum, step: 1, marks: 2, disabled: schema.readOnly, tooltipDisplay: "on" }, controlProps, { value: value, onFocus: onFocus, onBlur: onBlur, onUpdate: onUpdate, errorMessage: undefined, validationState: getValidationState(meta), qa: name }))));
|
|
15
16
|
};
|
|
16
17
|
export const Slider = React.memo(Component);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type TextInputProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaString } from '../../../core';
|
|
4
|
-
|
|
4
|
+
import './StringBase.css';
|
|
5
|
+
export interface StringBaseProps extends Omit<TextInputProps, 'type' | 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
5
6
|
}
|
|
6
7
|
export declare const StringBase: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaString<any>, StringBaseProps, {}>>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { TextInput } from '@gravity-ui/uikit';
|
|
3
|
-
import {
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
import { block, getBooleanValidationState, getValidationState } from '../../utils';
|
|
5
|
+
import './StringBase.css';
|
|
6
|
+
const b = block('string-base');
|
|
4
7
|
const Component = ({ controlProps, input, meta, schema, }) => {
|
|
5
8
|
var _a, _b;
|
|
6
|
-
return (React.createElement(
|
|
9
|
+
return (React.createElement(ControlContainer, { stretch: "max", className: b({ error: getBooleanValidationState(meta) }) },
|
|
10
|
+
React.createElement(TextInput, Object.assign({ placeholder: (_a = schema.examples) === null || _a === void 0 ? void 0 : _a[0], disabled: schema.readOnly, hasClear: true }, controlProps, { value: (_b = input.value) !== null && _b !== void 0 ? _b : '', onFocus: input.onFocus, onBlur: input.onBlur, onUpdate: input.onChange, errorMessage: undefined, validationState: getValidationState(meta), qa: input.name, type: "text" }))));
|
|
7
11
|
};
|
|
8
12
|
export const StringBase = React.memo(Component);
|
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
.sr-switch {
|
|
2
2
|
min-height: 28px;
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
}
|
|
4
|
+
.sr-switch_error .g-switch .g-switch__indicator:hover::before {
|
|
5
|
+
border: 1px solid var(--g-color-text-danger);
|
|
6
|
+
box-sizing: border-box;
|
|
7
|
+
}
|
|
8
|
+
.sr-switch_error .g-switch .g-switch__indicator::before {
|
|
9
|
+
border: 1px solid var(--g-color-text-danger);
|
|
10
|
+
box-sizing: border-box;
|
|
5
11
|
}
|