triafly-ui-kit 1.0.17 → 1.0.19

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.
@@ -0,0 +1 @@
1
+ form .form-controls{margin:28px 0 0;display:flex;gap:12px}
@@ -1 +1 @@
1
- form .form-group{padding:12px;border-radius:8px;background-color:var(--color-bg-neutral-lightest-default)}form .form-group:not(:last-of-type){margin:0 0 12px}form .form-controls{margin:28px 0 0;display:flex;gap:12px}form .columns-2{display:grid;grid-template-columns:1fr 1fr;grid-gap:12px}
1
+ form .form-group{padding:12px;border-radius:8px;background-color:var(--color-bg-neutral-lightest-default)}form .form-group:not(:last-of-type){margin:0 0 12px}form .columns-2{display:grid;grid-template-columns:1fr 1fr;grid-gap:12px}
@@ -0,0 +1,5 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import '../../../../../assets/FormControls.css';const t = ({ children: o }) => /* @__PURE__ */ r("div", { className: "form-controls", children: o });
3
+ export {
4
+ t as FormControls
5
+ };
@@ -1,10 +1,11 @@
1
1
  import { jsx as a } from "react/jsx-runtime";
2
- import { useMemo as l } from "react";
3
- import { FormContext as f } from "../FormContext/FormContext.js";
4
- import { FormItem as i } from "../FormItem/FormItem.js";
5
- import { useForm as p } from "../useForm/useForm.js";
6
- import '../../../../assets/FormRoot.css';const v = ({ form: m, children: c, onFinish: o, disabled: t = !1 }) => {
7
- const n = p()[0], s = l(() => {
2
+ import { useMemo as f } from "react";
3
+ import { FormContext as i } from "../FormContext/FormContext.js";
4
+ import { FormItem as p } from "../FormItem/FormItem.js";
5
+ import { useForm as v } from "../useForm/useForm.js";
6
+ import { FormControls as F } from "../FormGroup/FormControls/FormControls.js";
7
+ import '../../../../assets/FormRoot.css';const c = ({ form: m, children: l, onFinish: o, disabled: t = !1 }) => {
8
+ const n = v()[0], s = f(() => {
8
9
  const r = m || n;
9
10
  return r.disabled = t, r;
10
11
  }, [m, n, t]), u = async (r) => {
@@ -17,9 +18,10 @@ import '../../../../assets/FormRoot.css';const v = ({ form: m, children: c, onFi
17
18
  console.error("Form submission error:", e);
18
19
  }
19
20
  };
20
- return /* @__PURE__ */ a(f.Provider, { value: s || null, children: /* @__PURE__ */ a("form", { onSubmit: u, children: c }) });
21
+ return /* @__PURE__ */ a(i.Provider, { value: s || null, children: /* @__PURE__ */ a("form", { onSubmit: u, children: l }) });
21
22
  };
22
- v.Item = i;
23
+ c.Item = p;
24
+ c.FormControls = F;
23
25
  export {
24
- v as Form
26
+ c as Form
25
27
  };
package/dist/main.d.ts CHANGED
@@ -190,8 +190,15 @@ export declare const Form: FormComponent;
190
190
 
191
191
  declare interface FormComponent extends React.FC<FormProps> {
192
192
  Item: typeof FormItem;
193
+ FormControls: typeof FormControls;
193
194
  }
194
195
 
196
+ declare const FormControls: default_2.FC<FormControlsProps>;
197
+
198
+ declare type FormControlsProps = {
199
+ children: default_2.ReactNode;
200
+ };
201
+
195
202
  declare interface FormInstance {
196
203
  /**
197
204
  * Сбрасывает все значения формы и ошибки
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "triafly-ui-kit",
3
- "version": "1.0.17",
3
+ "version": "1.0.19",
4
4
  "description": "UI Kit from Triafly",
5
5
  "main": "./dist/main.js",
6
6
  "module": "./dist/main.js",