@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,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type SwitchProps as
|
|
2
|
+
import { type SwitchProps as UIKitSwitchProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaBoolean } from '../../../core';
|
|
4
4
|
import './Switch.css';
|
|
5
|
-
export interface SwitchProps extends Omit<
|
|
5
|
+
export interface SwitchProps extends Omit<UIKitSwitchProps, 'checked' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'qa'> {
|
|
6
6
|
}
|
|
7
7
|
export declare const Switch: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaBoolean<any>, SwitchProps, {}>>;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Switch as
|
|
3
|
-
import {
|
|
4
|
-
import { block,
|
|
2
|
+
import { Switch as UIKitSwitch } from '@gravity-ui/uikit';
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
import { block, getBooleanValidationState } from '../../utils';
|
|
5
5
|
import './Switch.css';
|
|
6
6
|
const b = block('switch');
|
|
7
7
|
const Component = ({ controlProps, input, schema, meta, }) => {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
const { name, onBlur, onChange, onFocus, value } = input;
|
|
9
|
+
const onUpdate = React.useCallback((value) => {
|
|
10
|
+
onFocus();
|
|
11
|
+
onChange(value);
|
|
12
|
+
onBlur();
|
|
13
|
+
}, [onBlur, onChange, onFocus]);
|
|
14
|
+
return (React.createElement(ControlContainer, { stretch: "fit", className: b({ error: getBooleanValidationState(meta) }), justifyContent: "center" },
|
|
15
|
+
React.createElement(UIKitSwitch, Object.assign({ disabled: schema.readOnly }, controlProps, { checked: value !== null && value !== void 0 ? value : false, onFocus: onFocus, onBlur: onBlur, onUpdate: onUpdate, qa: name }))));
|
|
12
16
|
};
|
|
13
17
|
export const Switch = React.memo(Component);
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { type TextAreaProps as
|
|
2
|
+
import { type TextAreaProps as UIKitTextAreaProps } from '@gravity-ui/uikit';
|
|
3
3
|
import type { JsonSchemaString } from '../../../core';
|
|
4
|
-
|
|
4
|
+
import './TextArea.css';
|
|
5
|
+
export interface TextAreaProps extends Omit<UIKitTextAreaProps, 'value' | 'onFocus' | 'onBlur' | 'onChange' | 'onUpdate' | 'errorMessage' | 'validationState' | 'qa'> {
|
|
5
6
|
}
|
|
6
7
|
export declare const TextArea: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaString<any>, TextAreaProps, {}>>;
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { TextArea as
|
|
3
|
-
import {
|
|
2
|
+
import { TextArea as UIKitTextArea, } from '@gravity-ui/uikit';
|
|
3
|
+
import { ControlContainer } from '../../components';
|
|
4
|
+
import { block, getBooleanValidationState, getValidationState } from '../../utils';
|
|
5
|
+
import './TextArea.css';
|
|
6
|
+
const b = block('text-area');
|
|
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(UIKitTextArea, Object.assign({ maxRows: 20, minRows: 0, 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 }))));
|
|
7
11
|
};
|
|
8
12
|
export const TextArea = React.memo(Component);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import * as icons from '@gravity-ui/icons';
|
|
3
|
+
import { type IconProps, type LabelProps as UIKitLabelProps } from '@gravity-ui/uikit';
|
|
4
|
+
import type { JsonSchemaString } from '../../../core';
|
|
5
|
+
import './TextContent.css';
|
|
6
|
+
export interface TextContentProps extends Omit<UIKitLabelProps, 'theme'> {
|
|
7
|
+
iconName?: keyof typeof icons;
|
|
8
|
+
iconProps?: Partial<IconProps>;
|
|
9
|
+
}
|
|
10
|
+
export declare const TextContent: React.NamedExoticComponent<import("../../../core").ControlProps<JsonSchemaString<any>, TextContentProps, {}>>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import * as icons from '@gravity-ui/icons';
|
|
4
|
+
import { Icon, Label as UIKitLabel, } from '@gravity-ui/uikit';
|
|
5
|
+
import { ControlContainer } from '../../components';
|
|
6
|
+
import { block } from '../../utils';
|
|
7
|
+
import './TextContent.css';
|
|
8
|
+
const b = block('text-content');
|
|
9
|
+
const Component = ({ controlProps, input, schema }) => {
|
|
10
|
+
const { iconName, iconProps, title: titleProp } = controlProps, controlRestProps = __rest(controlProps, ["iconName", "iconProps", "title"]);
|
|
11
|
+
const icon = React.useMemo(() => iconName && icons[iconName] ? (React.createElement(Icon, Object.assign({ data: icons[iconName] }, iconProps))) : undefined, [iconName, iconProps]);
|
|
12
|
+
const content = React.useMemo(() => {
|
|
13
|
+
if (titleProp) {
|
|
14
|
+
if (typeof titleProp === 'string') {
|
|
15
|
+
return React.createElement("span", { dangerouslySetInnerHTML: { __html: titleProp } });
|
|
16
|
+
}
|
|
17
|
+
return titleProp;
|
|
18
|
+
}
|
|
19
|
+
if (schema.description) {
|
|
20
|
+
return React.createElement("span", { dangerouslySetInnerHTML: { __html: schema.description } });
|
|
21
|
+
}
|
|
22
|
+
return undefined;
|
|
23
|
+
}, [titleProp, schema.description]);
|
|
24
|
+
return (React.createElement(ControlContainer, { stretch: "fit" },
|
|
25
|
+
React.createElement(UIKitLabel, Object.assign({ size: "m", value: input.value, icon: icon }, controlRestProps, { className: b(null, controlRestProps.className), theme: "clear" }), content)));
|
|
26
|
+
};
|
|
27
|
+
export const TextContent = React.memo(Component);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextContent, type TextContentProps } from './TextContent';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { TextContent } from './TextContent';
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
+
export { Alert, type AlertProps } from './Alert';
|
|
1
2
|
export { ArrayBase, type ArrayBaseProps } from './ArrayBase';
|
|
3
|
+
export { ArrayTable, type ArrayTableProps } from './ArrayTable';
|
|
2
4
|
export { Checkbox, type CheckboxProps } from './Checkbox';
|
|
3
5
|
export { CheckboxGroup, type CheckboxGroupProps } from './CheckboxGroup';
|
|
4
6
|
export { ColorPicker, type ColorPickerProps } from './ColorPicker';
|
|
5
7
|
export { DateInput, type DateInputProps } from './DateInput';
|
|
8
|
+
export { FewOfNested, type FewOfNestedProps } from './FewOfNested';
|
|
9
|
+
export { FileInput, type FileInputProps } from './FileInput';
|
|
10
|
+
export { Label, type LabelProps } from './Label';
|
|
6
11
|
export { MultiSelect, type MultiSelectProps } from './MultiSelect';
|
|
7
12
|
export { NumberBase, type NumberBaseProps } from './NumberBase';
|
|
8
13
|
export { ObjectBase, type ObjectBaseProps } from './ObjectBase';
|
|
14
|
+
export { ObjectInline, type ObjectInlineProps } from './ObjectInline';
|
|
15
|
+
export { OneOfNested, type OneOfNestedProps } from './OneOfNested';
|
|
16
|
+
export { DotValue, type DotValueProps } from './DotValue';
|
|
9
17
|
export { Password, type PasswordProps } from './Password';
|
|
10
18
|
export { RadioGroup, type RadioGroupProps } from './RadioGroup';
|
|
11
19
|
export { RangeSlider, type RangeSliderProps } from './RangeSlider';
|
|
12
20
|
export { Select, type SelectProps } from './Select';
|
|
21
|
+
export { SegmentedRadioGroup, type SegmentedRadioGroupProps } from './SegmentedRadioGroup';
|
|
13
22
|
export { Slider, type SliderProps } from './Slider';
|
|
14
23
|
export { StringBase, type StringBaseProps } from './StringBase';
|
|
15
24
|
export { Switch, type SwitchProps } from './Switch';
|
|
16
25
|
export { TextArea, type TextAreaProps } from './TextArea';
|
|
26
|
+
export { TextContent, type TextContentProps } from './TextContent';
|
|
@@ -1,16 +1,26 @@
|
|
|
1
|
+
export { Alert } from './Alert';
|
|
1
2
|
export { ArrayBase } from './ArrayBase';
|
|
3
|
+
export { ArrayTable } from './ArrayTable';
|
|
2
4
|
export { Checkbox } from './Checkbox';
|
|
3
5
|
export { CheckboxGroup } from './CheckboxGroup';
|
|
4
6
|
export { ColorPicker } from './ColorPicker';
|
|
5
7
|
export { DateInput } from './DateInput';
|
|
8
|
+
export { FewOfNested } from './FewOfNested';
|
|
9
|
+
export { FileInput } from './FileInput';
|
|
10
|
+
export { Label } from './Label';
|
|
6
11
|
export { MultiSelect } from './MultiSelect';
|
|
7
12
|
export { NumberBase } from './NumberBase';
|
|
8
13
|
export { ObjectBase } from './ObjectBase';
|
|
14
|
+
export { ObjectInline } from './ObjectInline';
|
|
15
|
+
export { OneOfNested } from './OneOfNested';
|
|
16
|
+
export { DotValue } from './DotValue';
|
|
9
17
|
export { Password } from './Password';
|
|
10
18
|
export { RadioGroup } from './RadioGroup';
|
|
11
19
|
export { RangeSlider } from './RangeSlider';
|
|
12
20
|
export { Select } from './Select';
|
|
21
|
+
export { SegmentedRadioGroup } from './SegmentedRadioGroup';
|
|
13
22
|
export { Slider } from './Slider';
|
|
14
23
|
export { StringBase } from './StringBase';
|
|
15
24
|
export { Switch } from './Switch';
|
|
16
25
|
export { TextArea } from './TextArea';
|
|
26
|
+
export { TextContent } from './TextContent';
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { FormApi } from 'final-form';
|
|
2
2
|
import type { FieldMetaState } from 'react-final-form';
|
|
3
3
|
export declare const getValidationState: (meta: FieldMetaState<any>) => "invalid" | undefined;
|
|
4
|
+
export declare const getBooleanValidationState: (meta: FieldMetaState<any>) => boolean;
|
|
4
5
|
export declare const getArrayItemParentName: (name: string) => string;
|
|
5
6
|
export declare const getArrayItemIndex: (name: string) => string;
|
|
6
7
|
export declare const isArrayItem: (name: string) => boolean;
|
|
@@ -4,6 +4,9 @@ export const getValidationState = (meta) => {
|
|
|
4
4
|
}
|
|
5
5
|
return undefined;
|
|
6
6
|
};
|
|
7
|
+
export const getBooleanValidationState = (meta) => {
|
|
8
|
+
return getValidationState(meta) === 'invalid';
|
|
9
|
+
};
|
|
7
10
|
export const getArrayItemParentName = (name) => name.slice(0, name.lastIndexOf('['));
|
|
8
11
|
export const getArrayItemIndex = (name) => name.slice(name.lastIndexOf('[') + 1, -1);
|
|
9
12
|
export const isArrayItem = (name) => name.endsWith(']');
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { block } from './cn';
|
|
2
|
-
export { getArrayItemIndex, getArrayItemParentName, getValidationState, isArrayItem, isTupleItem, } from './common';
|
|
2
|
+
export { getArrayItemIndex, getArrayItemParentName, getBooleanValidationState, getValidationState, isArrayItem, isTupleItem, } from './common';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { block } from './cn';
|
|
2
|
-
export { getArrayItemIndex, getArrayItemParentName, getValidationState, isArrayItem, isTupleItem, } from './common';
|
|
2
|
+
export { getArrayItemIndex, getArrayItemParentName, getBooleanValidationState, getValidationState, isArrayItem, isTupleItem, } from './common';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.sr-accordeon {
|
|
2
|
+
margin-bottom: calc(var(--g-spacing-base) * 4);
|
|
3
|
+
}
|
|
4
|
+
.sr-accordeon:last-child {
|
|
5
|
+
margin-bottom: 0;
|
|
6
|
+
}
|
|
7
|
+
.sr-accordeon .g-disclosure__trigger {
|
|
8
|
+
padding-left: 6.5px;
|
|
9
|
+
}
|
|
10
|
+
.sr-accordeon_without-default-summary .g-disclosure__trigger {
|
|
11
|
+
padding-left: 0;
|
|
12
|
+
}
|
|
13
|
+
.sr-accordeon_without-default-summary .g-disclosure__trigger .g-arrow-toggle {
|
|
14
|
+
display: none;
|
|
15
|
+
}
|
|
16
|
+
.sr-accordeon__toggler {
|
|
17
|
+
padding-left: 6px;
|
|
18
|
+
}
|
|
19
|
+
.sr-accordeon__content {
|
|
20
|
+
margin-top: calc(var(--g-spacing-base) * 4);
|
|
21
|
+
}
|
|
22
|
+
.sr-accordeon__content_with-indent {
|
|
23
|
+
position: relative;
|
|
24
|
+
padding-left: calc(var(--g-spacing-base) * 7);
|
|
25
|
+
}
|
|
26
|
+
.sr-accordeon__content_with-indent:before {
|
|
27
|
+
content: "";
|
|
28
|
+
display: block;
|
|
29
|
+
width: 1px;
|
|
30
|
+
height: calc(100% + var(--g-spacing-base) * 2);
|
|
31
|
+
background-color: var(--g-color-line-generic);
|
|
32
|
+
position: absolute;
|
|
33
|
+
left: calc(var(--g-spacing-base) * 3 + 1.5px);
|
|
34
|
+
bottom: 0;
|
|
35
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type ButtonProps, type DisclosureProps, type TextProps } from '@gravity-ui/uikit';
|
|
3
|
+
import type { JsonSchema } from '../../../core';
|
|
4
|
+
import './Accordeon.css';
|
|
5
|
+
export interface AccordeonProps extends DisclosureProps {
|
|
6
|
+
titleProps?: TextProps;
|
|
7
|
+
togglerProps?: ButtonProps;
|
|
8
|
+
withDefaultSummary?: boolean;
|
|
9
|
+
withIndent?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const Accordeon: React.NamedExoticComponent<import("../../../core").WrapperProps<JsonSchema, AccordeonProps>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { ChevronDown, ChevronUp } from '@gravity-ui/icons';
|
|
4
|
+
import { Button, Disclosure, Flex, HelpMark, Icon, Text, } from '@gravity-ui/uikit';
|
|
5
|
+
import { ArrayRemoveButton, ControlError, HTMLContent, WrapperContainer } from '../../components';
|
|
6
|
+
import { block, getValidationState } from '../../utils';
|
|
7
|
+
import './Accordeon.css';
|
|
8
|
+
const b = block('accordeon');
|
|
9
|
+
const Component = ({ children, input, meta, schema, wrapperProps, }) => {
|
|
10
|
+
const { withIndent = false, withDefaultSummary = false, titleProps, togglerProps } = wrapperProps, restWrapperProps = __rest(wrapperProps, ["withIndent", "withDefaultSummary", "titleProps", "togglerProps"]);
|
|
11
|
+
const summary = React.useMemo(() => {
|
|
12
|
+
const stopPropagation = (event) => {
|
|
13
|
+
event.stopPropagation();
|
|
14
|
+
};
|
|
15
|
+
return (React.createElement(Flex, { alignItems: "center", gap: 2 },
|
|
16
|
+
withDefaultSummary ? (React.createElement(Text, Object.assign({}, titleProps), schema.title)) : (React.createElement(Disclosure.Summary, null, (props) => (React.createElement(Button, Object.assign({}, togglerProps, { className: b('toggler', togglerProps === null || togglerProps === void 0 ? void 0 : togglerProps.className) }),
|
|
17
|
+
React.createElement(Flex, { alignItems: "center", gap: 2, height: "100%" },
|
|
18
|
+
React.createElement(Icon, { data: props.expanded ? ChevronUp : ChevronDown }),
|
|
19
|
+
React.createElement(Text, Object.assign({}, titleProps), schema.title)))))),
|
|
20
|
+
schema.description ? (React.createElement(HelpMark, { onClick: stopPropagation },
|
|
21
|
+
React.createElement(HTMLContent, { html: schema.description }))) : null,
|
|
22
|
+
React.createElement(ArrayRemoveButton, { name: input.name, onClick: stopPropagation })));
|
|
23
|
+
}, [
|
|
24
|
+
input.name,
|
|
25
|
+
schema.title,
|
|
26
|
+
schema.description,
|
|
27
|
+
titleProps,
|
|
28
|
+
togglerProps,
|
|
29
|
+
withDefaultSummary,
|
|
30
|
+
]);
|
|
31
|
+
return (React.createElement(WrapperContainer, { className: b({ 'without-default-summary': !withDefaultSummary }) },
|
|
32
|
+
React.createElement(Disclosure, Object.assign({ summary: summary, defaultExpanded: true }, restWrapperProps),
|
|
33
|
+
React.createElement(Flex, { direction: "column", gap: 0.5, grow: 1 },
|
|
34
|
+
React.createElement("div", { className: b('content', { 'with-indent': withIndent }) }, children),
|
|
35
|
+
React.createElement(ControlError, { errorMessage: meta.error, validationState: getValidationState(meta) })))));
|
|
36
|
+
};
|
|
37
|
+
export const Accordeon = React.memo(Component);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordeon, type AccordeonProps } from './Accordeon';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordeon } from './Accordeon';
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
display: inline;
|
|
9
9
|
width: 180px;
|
|
10
10
|
min-height: 28px;
|
|
11
|
-
padding-top:
|
|
11
|
+
padding-top: 4.5px;
|
|
12
12
|
}
|
|
13
13
|
.sr-row__title {
|
|
14
14
|
min-height: 18px;
|
|
@@ -19,9 +19,6 @@
|
|
|
19
19
|
margin-left: calc(var(--g-spacing-base) * 1);
|
|
20
20
|
color: var(--g-color-text-danger);
|
|
21
21
|
}
|
|
22
|
-
.sr-
|
|
23
|
-
|
|
24
|
-
flex-direction: column;
|
|
25
|
-
flex-grow: 1;
|
|
26
|
-
gap: calc(var(--g-spacing-base) * 0.5);
|
|
22
|
+
.sr-row__help-mark {
|
|
23
|
+
margin-top: 1.5px;
|
|
27
24
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Flex, HelpMark, Text } from '@gravity-ui/uikit';
|
|
3
|
-
import { ArrayRemoveButton, HTMLContent } from '../../components';
|
|
4
|
-
import { block } from '../../utils';
|
|
3
|
+
import { ArrayRemoveButton, ControlError, HTMLContent, WrapperContainer } from '../../components';
|
|
4
|
+
import { block, getValidationState } from '../../utils';
|
|
5
5
|
import './Row.css';
|
|
6
6
|
const b = block('row');
|
|
7
|
-
const Component = ({ children, input, schema, wrapperProps }) => {
|
|
7
|
+
const Component = ({ children, input, meta, schema, wrapperProps, }) => {
|
|
8
8
|
const tooltip = React.useMemo(() => {
|
|
9
9
|
if (!schema.description || wrapperProps.descriptionType === 'bottom') {
|
|
10
10
|
return null;
|
|
11
11
|
}
|
|
12
|
-
return (React.createElement(HelpMark,
|
|
12
|
+
return (React.createElement(HelpMark, { className: b('help-mark') },
|
|
13
13
|
React.createElement(HTMLContent, { html: schema.description })));
|
|
14
14
|
}, [schema.description, wrapperProps.descriptionType]);
|
|
15
15
|
const bottomDescription = React.useMemo(() => {
|
|
@@ -18,14 +18,15 @@ const Component = ({ children, input, schema, wrapperProps }) => {
|
|
|
18
18
|
}
|
|
19
19
|
return React.createElement(HTMLContent, { html: schema.description, color: "secondary" });
|
|
20
20
|
}, [schema.description, wrapperProps.descriptionType]);
|
|
21
|
-
return (React.createElement(
|
|
21
|
+
return (React.createElement(WrapperContainer, { className: b(), direction: "row", alignItems: "flex-start", gap: 2 },
|
|
22
22
|
React.createElement("div", { className: b('left') },
|
|
23
23
|
React.createElement(Text, { className: b('title', { required: wrapperProps.required }), wordBreak: "break-word" }, schema.title),
|
|
24
24
|
tooltip),
|
|
25
|
-
React.createElement(
|
|
26
|
-
React.createElement(Flex, { gap: 2 },
|
|
25
|
+
React.createElement(Flex, { className: b('right'), direction: "column", gap: 0.5, grow: 1 },
|
|
26
|
+
React.createElement(Flex, { grow: 1, gap: 2 },
|
|
27
27
|
children,
|
|
28
28
|
React.createElement(ArrayRemoveButton, { name: input.name })),
|
|
29
|
-
bottomDescription
|
|
29
|
+
bottomDescription,
|
|
30
|
+
React.createElement(ControlError, { errorMessage: meta.error, validationState: getValidationState(meta) }))));
|
|
30
31
|
};
|
|
31
32
|
export const Row = React.memo(Component);
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
.sr-section {
|
|
2
|
+
margin-bottom: calc(var(--g-spacing-base) * 4);
|
|
3
|
+
}
|
|
4
|
+
.sr-section:last-child {
|
|
5
|
+
margin-bottom: 0;
|
|
6
|
+
}
|
|
7
|
+
.sr-section__header {
|
|
8
|
+
min-height: 28px;
|
|
9
|
+
}
|
|
10
|
+
.sr-section__content_with-indent {
|
|
11
|
+
position: relative;
|
|
12
|
+
padding-left: calc(var(--g-spacing-base) * 7);
|
|
13
|
+
}
|
|
14
|
+
.sr-section__content_with-indent:before {
|
|
15
|
+
content: "";
|
|
16
|
+
display: block;
|
|
17
|
+
width: 1px;
|
|
18
|
+
height: calc(100% + var(--g-spacing-base) * 2);
|
|
19
|
+
background-color: var(--g-color-line-generic);
|
|
20
|
+
position: absolute;
|
|
21
|
+
left: calc(var(--g-spacing-base) * 3 + 1.5px);
|
|
22
|
+
bottom: 0;
|
|
23
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type TextProps } from '@gravity-ui/uikit';
|
|
3
|
+
import type { JsonSchema } from '../../../core';
|
|
4
|
+
import './Section.css';
|
|
5
|
+
export interface SectionProps extends TextProps {
|
|
6
|
+
descriptionType?: 'tooltip' | 'bottom';
|
|
7
|
+
withIndent?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare const Section: React.NamedExoticComponent<import("../../../core").WrapperProps<JsonSchema, SectionProps>>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { __rest } from "tslib";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { Flex, HelpMark, Text } from '@gravity-ui/uikit';
|
|
4
|
+
import { ArrayRemoveButton, ControlError, HTMLContent, WrapperContainer } from '../../components';
|
|
5
|
+
import { block, getValidationState } from '../../utils';
|
|
6
|
+
import './Section.css';
|
|
7
|
+
const b = block('section');
|
|
8
|
+
const Component = ({ children, input, meta, schema, wrapperProps, }) => {
|
|
9
|
+
const { descriptionType = 'tooltip', withIndent = false } = wrapperProps, restWrapperProps = __rest(wrapperProps, ["descriptionType", "withIndent"]);
|
|
10
|
+
const tooltip = React.useMemo(() => {
|
|
11
|
+
if (!schema.description || descriptionType === 'bottom') {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
return (React.createElement(HelpMark, null,
|
|
15
|
+
React.createElement(HTMLContent, { html: schema.description })));
|
|
16
|
+
}, [schema.description, descriptionType]);
|
|
17
|
+
const bottomDescription = React.useMemo(() => {
|
|
18
|
+
if (!schema.description || descriptionType !== 'bottom') {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
return React.createElement(HTMLContent, { html: schema.description, color: "secondary" });
|
|
22
|
+
}, [schema.description, descriptionType]);
|
|
23
|
+
return (React.createElement(WrapperContainer, { className: b(), gap: 0.5 },
|
|
24
|
+
React.createElement(Flex, { direction: "column", gap: 4 },
|
|
25
|
+
React.createElement(Flex, { direction: "column", gap: 2 },
|
|
26
|
+
React.createElement(Flex, { className: b('header'), gap: 2, alignItems: "center" },
|
|
27
|
+
React.createElement(Text, Object.assign({ variant: "subheader-1" }, restWrapperProps), schema.title),
|
|
28
|
+
tooltip,
|
|
29
|
+
React.createElement(ArrayRemoveButton, { name: input.name })),
|
|
30
|
+
bottomDescription),
|
|
31
|
+
React.createElement("div", { className: b('content', { 'with-indent': withIndent }) }, children)),
|
|
32
|
+
React.createElement(ControlError, { errorMessage: meta.error, validationState: getValidationState(meta) })));
|
|
33
|
+
};
|
|
34
|
+
export const Section = React.memo(Component);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Section, type SectionProps } from './Section';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Section } from './Section';
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { Flex } from '@gravity-ui/uikit';
|
|
3
|
-
import { ArrayRemoveButton } from '../../components';
|
|
4
|
-
import { block } from '../../utils';
|
|
3
|
+
import { ArrayRemoveButton, ControlError, WrapperContainer } from '../../components';
|
|
4
|
+
import { block, getValidationState } from '../../utils';
|
|
5
5
|
import './Transparent.css';
|
|
6
6
|
const b = block('transparent');
|
|
7
|
-
const Component = ({ children, input }) => {
|
|
8
|
-
return (React.createElement(
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
const Component = ({ children, input, meta }) => {
|
|
8
|
+
return (React.createElement(WrapperContainer, { className: b(), gap: 0.5 },
|
|
9
|
+
React.createElement(Flex, { grow: 1, gap: 2 },
|
|
10
|
+
children,
|
|
11
|
+
React.createElement(ArrayRemoveButton, { name: input.name })),
|
|
12
|
+
React.createElement(ControlError, { errorMessage: meta.error, validationState: getValidationState(meta) })));
|
|
11
13
|
};
|
|
12
14
|
export const Transparent = React.memo(Component);
|
package/package.json
CHANGED
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Accordeon = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
// import {ArrayLayoutProps, ObjectLayoutProps, isArrayItem} from '../../../../core';
|
|
6
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
7
|
-
const components_1 = require("../../kit/components");
|
|
8
|
-
// import {useErrorChecker} from '../../../hooks';
|
|
9
|
-
// import {RemoveButton} from '../../kit/components/RemoveButton';
|
|
10
|
-
const SimpleVerticalAccordeon_1 = require("../../kit/components/SimpleVerticalAccordeon");
|
|
11
|
-
const Accordeon = ({ schema, input, meta, children, wrapperProps, }) => {
|
|
12
|
-
const [open, setOpen] = react_1.default.useState(Boolean(wrapperProps === null || wrapperProps === void 0 ? void 0 : wrapperProps.open));
|
|
13
|
-
// const onDrop = React.useCallback(() => {
|
|
14
|
-
// setOpen(false);
|
|
15
|
-
// input.onDrop();
|
|
16
|
-
// }, [input.onDrop, setOpen]);
|
|
17
|
-
// const removeButton = React.useMemo(() => {
|
|
18
|
-
// if (!isArrayItem(name) && (spec.required || !input.value)) {
|
|
19
|
-
// return null;
|
|
20
|
-
// }
|
|
21
|
-
// return <RemoveButton name={name} onDrop={onDrop} />;
|
|
22
|
-
// }, [spec.required, input.value, onDrop, name]);
|
|
23
|
-
// useErrorChecker({name, meta, open, setOpen});
|
|
24
|
-
return (react_1.default.createElement(SimpleVerticalAccordeon_1.SimpleVerticalAccordeon, { name: input.name, title: schema.title || '', note: schema.description || '', open: open, onOpenChange: setOpen,
|
|
25
|
-
// headerActionsTemplate={removeButton}
|
|
26
|
-
hideInsteadOfDestroy: true, withBranchView: true },
|
|
27
|
-
react_1.default.createElement(components_1.ErrorWrapper, { name: input.name, meta: meta,
|
|
28
|
-
// ff
|
|
29
|
-
withoutChildErrorStyles: true }, children)));
|
|
30
|
-
};
|
|
31
|
-
exports.Accordeon = Accordeon;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.AnyInput = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const react_1 = tslib_1.__importDefault(require("react"));
|
|
6
|
-
const uikit_1 = require("@gravity-ui/uikit");
|
|
7
|
-
const core_1 = require("../core");
|
|
8
|
-
const AnyInput = ({ input, schema }) => {
|
|
9
|
-
var _a;
|
|
10
|
-
const [state, setState] = react_1.default.useState(true);
|
|
11
|
-
// React.useEffect(() => {
|
|
12
|
-
// input.onChange(undefined);
|
|
13
|
-
// }, []);
|
|
14
|
-
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
15
|
-
react_1.default.createElement(core_1.Entity, { name: `${input.name}.bla`, schema: (_a = schema.oneOf) === null || _a === void 0 ? void 0 : _a[state ? 0 : 1] }),
|
|
16
|
-
react_1.default.createElement(uikit_1.Button, { onClick: () => {
|
|
17
|
-
input.onChange(undefined);
|
|
18
|
-
setState(!state);
|
|
19
|
-
} }, "Toggle")));
|
|
20
|
-
};
|
|
21
|
-
exports.AnyInput = AnyInput;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
.array-base_add-button-right {
|
|
2
|
-
display: flex;
|
|
3
|
-
align-items: flex-end;
|
|
4
|
-
}
|
|
5
|
-
.array-base_add-button-right .transparent {
|
|
6
|
-
align-items: flex-end;
|
|
7
|
-
}
|
|
8
|
-
.array-base__items-wrapper_add-button-down {
|
|
9
|
-
margin-bottom: 15px;
|
|
10
|
-
}
|
|
11
|
-
.array-base__items-wrapper_items-primitive {
|
|
12
|
-
min-width: 100%;
|
|
13
|
-
}
|
|
14
|
-
.array-base__items-wrapper_items-primitive:empty {
|
|
15
|
-
min-width: unset;
|
|
16
|
-
}
|
|
17
|
-
.array-base__item-prefix {
|
|
18
|
-
margin-top: -7px;
|
|
19
|
-
margin-bottom: 8px;
|
|
20
|
-
}
|
|
21
|
-
.array-base__add-button_right {
|
|
22
|
-
margin-left: 4px;
|
|
23
|
-
}
|