kiban-design-system 1.0.246-alpha.0 → 1.0.247-alpha.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/dist/components/DynamicForm/DynamicForm.d.ts +1 -1
- package/dist/components/DynamicForm/DynamicForm.props.d.ts +1 -0
- package/dist/components/DynamicForm/components/SectionForm/SectionForm.d.ts +1 -1
- package/dist/components/DynamicForm/components/SectionForm/SectionForm.props.d.ts +1 -0
- package/dist/index.css.map +1 -1
- package/dist/index.js +4 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -24589,17 +24589,17 @@ function Form({ ariaLabel, data, fields, fieldsSection, iconHelperText, onChange
|
|
|
24589
24589
|
return jsx(Fragment, { children: formMarkup }, void 0);
|
|
24590
24590
|
}
|
|
24591
24591
|
|
|
24592
|
-
const SectionForm = ({ ariaLabel, data, fields, fieldsSection, iconDeletable, iconHelperText, onChange, onDelete, tagRemoveIcon, isDeletable, extraPropsField, }) => {
|
|
24592
|
+
const SectionForm = ({ ariaLabel, data, fields, fieldsSection, iconDeletable, iconHelperText, onChange, onDelete, tagRemoveIcon, isDeletable, extraPropsField, columnsSize: columnsSizeProps = 3, }) => {
|
|
24593
24593
|
// eslint-disable-next-line
|
|
24594
24594
|
// @ts-ignore
|
|
24595
|
-
const wrapperMarkup = jsx(Grid.Item, { size:
|
|
24595
|
+
const wrapperMarkup = jsx(Grid.Item, { size: columnsSizeProps }, void 0);
|
|
24596
24596
|
const formMarkup = (jsx(Form, { ariaLabel: ariaLabel, data: data, fields: fields, fieldsSection: fieldsSection, iconHelperText: iconHelperText, onChange: onChange, fieldWrapperElement: wrapperMarkup, tagRemoveIcon: tagRemoveIcon, extraPropsField: extraPropsField }, void 0));
|
|
24597
24597
|
const gridMarkup = jsx(Grid, Object.assign({ isMultiline: true }, { children: formMarkup }), void 0);
|
|
24598
24598
|
return (jsx(DeletableSection, Object.assign({ ariaLabel: ariaLabel, onDelete: onDelete, iconDeletable: iconDeletable, isDeletable: isDeletable }, { children: gridMarkup }), void 0));
|
|
24599
24599
|
};
|
|
24600
24600
|
|
|
24601
24601
|
const COMPONENT_NAME$a = 'DynamicForm';
|
|
24602
|
-
const DynamicForm = ({ ariaLabel, dataFormArray = [], fields, fieldsSection, iconDeletable, iconHelperText, labelDivider, onChange, onAddForm, tagRemoveIcon, deletableFormArray, extraPropsFieldsArray, }) => {
|
|
24602
|
+
const DynamicForm = ({ ariaLabel, dataFormArray = [], fields, fieldsSection, iconDeletable, iconHelperText, labelDivider, onChange, onAddForm, tagRemoveIcon, deletableFormArray, extraPropsFieldsArray, columnsSize, }) => {
|
|
24603
24603
|
const { theme } = useTheme();
|
|
24604
24604
|
const handleChange = (contact, id) => {
|
|
24605
24605
|
if (onChange) {
|
|
@@ -24624,7 +24624,7 @@ const DynamicForm = ({ ariaLabel, dataFormArray = [], fields, fieldsSection, ico
|
|
|
24624
24624
|
const extraProps = extraPropsFieldsArray && index < extraPropsFieldsArray.length
|
|
24625
24625
|
? extraPropsFieldsArray[index]
|
|
24626
24626
|
: undefined;
|
|
24627
|
-
return (jsx(SectionForm, { ariaLabel: ariaLabel, data: form, fields: fields, fieldsSection: fieldsSection, iconDeletable: iconDeletable, iconHelperText: iconHelperText, onChange: (formData) => handleChange(formData, form.id || ''), onDelete: () => handleDelete(form.id || ''), tagRemoveIcon: tagRemoveIcon, isDeletable: isDeletable, extraPropsField: extraProps }, `DynamicForm-${form.id}-${index}}`));
|
|
24627
|
+
return (jsx(SectionForm, { ariaLabel: ariaLabel, data: form, fields: fields, fieldsSection: fieldsSection, iconDeletable: iconDeletable, iconHelperText: iconHelperText, onChange: (formData) => handleChange(formData, form.id || ''), onDelete: () => handleDelete(form.id || ''), tagRemoveIcon: tagRemoveIcon, isDeletable: isDeletable, extraPropsField: extraProps, columnsSize: columnsSize }, `DynamicForm-${form.id}-${index}}`));
|
|
24628
24628
|
};
|
|
24629
24629
|
const contactsMarkup = (jsx("div", Object.assign({ className: `${COMPONENT_NAME$a}__SectionFormWrapper` }, { children: dataFormArray.map(renderForm) }), void 0));
|
|
24630
24630
|
const dividerMarkup = labelDivider && jsx(Divider, { label: labelDivider }, void 0);
|