dawn-ui-react 1.0.0-alpha.2 → 1.0.0-alpha.4

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.
Files changed (46) hide show
  1. package/dist/{Input-DXDwtOqf.js → Input-OKlHdkuM.js} +4 -4
  2. package/dist/{clamp-CYKyjuJR.js → clamp-DmGg4LPI.js} +50 -50
  3. package/dist/components/badge/badge.d.ts +1 -1
  4. package/dist/components/badge/badge.types.d.ts +1 -0
  5. package/dist/components/drawer/drawer-close.d.ts +2 -0
  6. package/dist/components/drawer/drawer-content.d.ts +2 -0
  7. package/dist/components/drawer/drawer-description.d.ts +2 -0
  8. package/dist/components/drawer/drawer-header.d.ts +2 -0
  9. package/dist/components/drawer/drawer-popup.d.ts +2 -0
  10. package/dist/components/drawer/drawer-provider.d.ts +2 -0
  11. package/dist/components/drawer/drawer-title.d.ts +2 -0
  12. package/dist/components/drawer/drawer-trigger.d.ts +2 -0
  13. package/dist/components/drawer/drawer.d.ts +2 -0
  14. package/dist/components/drawer/drawer.types.d.ts +10 -0
  15. package/dist/components/drawer/index.d.ts +10 -0
  16. package/dist/components/index.d.ts +1 -0
  17. package/dist/components/input-otp/index.d.ts +2 -1
  18. package/dist/components/input-otp/input-otp-separator.d.ts +2 -0
  19. package/dist/components/input-otp/input-otp-slot.d.ts +1 -1
  20. package/dist/components/input-otp/input-otp.types.d.ts +4 -3
  21. package/dist/components/layer-tree/index.d.ts +4 -1
  22. package/dist/components/layer-tree/layer-tree-body.d.ts +1 -1
  23. package/dist/components/layer-tree/layer-tree-footer.d.ts +2 -0
  24. package/dist/components/layer-tree/layer-tree-node-toggle.d.ts +1 -1
  25. package/dist/components/layer-tree/layer-tree-node.d.ts +1 -1
  26. package/dist/components/layer-tree/layer-tree-row.d.ts +1 -1
  27. package/dist/components/layer-tree/layer-tree-sort.d.ts +4 -0
  28. package/dist/components/layer-tree/layer-tree-utils.d.ts +83 -0
  29. package/dist/components/layer-tree/layer-tree.d.ts +9 -4
  30. package/dist/components/layer-tree/layer-tree.types.d.ts +11 -4
  31. package/dist/dawn-ui-react.js +12667 -7026
  32. package/dist/dawn-ui-react.umd.cjs +71 -24
  33. package/dist/field-errors--n7vO1Q7.js +21 -0
  34. package/dist/{field-input-Doplzz0V.js → field-input-DTMDvBjs.js} +3 -3
  35. package/dist/{field-input-group-CzX_hAjq.js → field-input-group-DJu_VEsX.js} +2 -2
  36. package/dist/{field-input-group-input-micw-J2Y.js → field-input-group-input-ChT-sn5W.js} +2 -2
  37. package/dist/{field-label-C2atREm0.js → field-label-CwhT-9uR.js} +1 -1
  38. package/dist/{field-select--mY7GbNz.js → field-select-CgVfjmOj.js} +427 -429
  39. package/dist/{field-slider-D54-Z8Ds.js → field-slider-DwZvJqd0.js} +303 -303
  40. package/dist/{form-context-DqrRdk0d.js → form-context-Cl2FGxOa.js} +37 -34
  41. package/dist/{input-group-DgFUfXr7.js → input-group-BGe0Ag-A.js} +1 -1
  42. package/dist/{input-group-input-DNZQ6g-3.js → input-group-input-DELPW-48.js} +1 -1
  43. package/dist/{input.types-D8b-1Bcm.js → input.types-BgnT0r4F.js} +1 -1
  44. package/dist/{useLabelableId-BaWKrZ8_.js → useLabelableId-BxNdsOlB.js} +51 -51
  45. package/package.json +23 -21
  46. package/dist/field-errors-DVQtEKG3.js +0 -19
@@ -0,0 +1,21 @@
1
+ import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
+ import { i as t } from "./form-context-Cl2FGxOa.js";
3
+ import { t as n } from "./cn-CXogf8HW.js";
4
+ import { jsx as r, jsxs as i } from "react/jsx-runtime";
5
+ //#region src/components/field/field-errors.tsx
6
+ var a = /* @__PURE__ */ e({ FieldErrors: () => o }), o = ({ className: e, children: a, ref: o, ...s }) => {
7
+ let c = t();
8
+ if (c.state.meta.errors.length === 0 && !a) return null;
9
+ let l = c.state.meta.errors.map((e) => typeof e == "string" ? e : e && typeof e == "object" && "message" in e && typeof e.message == "string" ? e.message : null).filter((e) => e !== null);
10
+ return l.length === 0 && !a ? null : /* @__PURE__ */ i("ul", {
11
+ className: n("space-y-3xs", e),
12
+ ref: o,
13
+ ...s,
14
+ children: [l.map((e) => /* @__PURE__ */ r("li", {
15
+ className: "flex items-center gap-2xs style-text-strong--1 text-error-default",
16
+ children: e
17
+ }, e)), a]
18
+ });
19
+ };
20
+ //#endregion
21
+ export { a as n, o as t };
@@ -1,8 +1,8 @@
1
1
  import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
- import { i as t } from "./form-context-DqrRdk0d.js";
2
+ import { i as t } from "./form-context-Cl2FGxOa.js";
3
3
  import { t as n } from "./cn-CXogf8HW.js";
4
- import { t as r } from "./Input-DXDwtOqf.js";
5
- import { t as i } from "./input.types-D8b-1Bcm.js";
4
+ import { t as r } from "./Input-OKlHdkuM.js";
5
+ import { t as i } from "./input.types-BgnT0r4F.js";
6
6
  import { useRef as a, useState as o } from "react";
7
7
  import { jsx as s, jsxs as c } from "react/jsx-runtime";
8
8
  //#region src/components/input/input.tsx
@@ -1,6 +1,6 @@
1
- import { i as e } from "./form-context-DqrRdk0d.js";
1
+ import { i as e } from "./form-context-Cl2FGxOa.js";
2
2
  import { t } from "./cn-CXogf8HW.js";
3
- import { t as n } from "./input-group-DgFUfXr7.js";
3
+ import { t as n } from "./input-group-BGe0Ag-A.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/components/field/field-input-group.tsx
6
6
  var i = ({ className: i, children: a, ref: o, ...s }) => {
@@ -1,6 +1,6 @@
1
- import { i as e } from "./form-context-DqrRdk0d.js";
1
+ import { i as e } from "./form-context-Cl2FGxOa.js";
2
2
  import { t } from "./cn-CXogf8HW.js";
3
- import { t as n } from "./input-group-input-DNZQ6g-3.js";
3
+ import { t as n } from "./input-group-input-DELPW-48.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/components/field/field-input-group-input.tsx
6
6
  var i = ({ className: i, ref: a, ...o }) => {
@@ -1,5 +1,5 @@
1
1
  import { t as e } from "./rolldown-runtime-CAFD8bLK.js";
2
- import { i as t } from "./form-context-DqrRdk0d.js";
2
+ import { i as t } from "./form-context-Cl2FGxOa.js";
3
3
  import { t as n } from "./cn-CXogf8HW.js";
4
4
  import { jsx as r } from "react/jsx-runtime";
5
5
  //#region src/components/field/field-label.tsx