dawn-ui-react 1.0.0-alpha.15 → 1.0.0-alpha.17

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.
@@ -1,2 +1,2 @@
1
1
  import { NumberFieldTypesProps } from './number-field.types';
2
- export declare const NumberField: ({ label, size, className, ref, ...props }: NumberFieldTypesProps) => import("react/jsx-runtime").JSX.Element;
2
+ export declare const NumberField: ({ children, label, size, className, ref, ...props }: NumberFieldTypesProps) => import("react/jsx-runtime").JSX.Element;
@@ -27712,7 +27712,7 @@ var LH = ({ content: e, ...t }) => /* @__PURE__ */ X(IH, {
27712
27712
  })
27713
27713
  }) : /* @__PURE__ */ Z(ar, {
27714
27714
  variant: t,
27715
- className: "flex h-full! max-w-[500px] flex-wrap py-xs [&:has([data-chips]:empty)>[role=separator]]:hidden [&:has([data-chips]:not(:empty))]:rounded-xl [&:not(:has([data-chips]))>[role=separator]]:hidden",
27715
+ className: J("flex flex-wrap py-xs [&:has([data-chips]:empty)>[role=separator]]:hidden [&:has([data-chips]:not(:empty))]:rounded-xl [&:not(:has([data-chips]))>[role=separator]]:hidden", n),
27716
27716
  children: [
27717
27717
  r,
27718
27718
  /* @__PURE__ */ X(qU, { weight: "thinnest" }),
@@ -27725,7 +27725,6 @@ var LH = ({ content: e, ...t }) => /* @__PURE__ */ X(IH, {
27725
27725
  ...a
27726
27726
  }), /* @__PURE__ */ Z(GU, { children: [/* @__PURE__ */ X(Ws, {
27727
27727
  "aria-label": "Clear selection",
27728
- className: J(n),
27729
27728
  keepMounted: !0,
27730
27729
  render: (e) => /* @__PURE__ */ X(P, {
27731
27730
  onClick: e.onClick,
@@ -33335,19 +33334,19 @@ var M2 = ({ row: e, className: t, children: n, ref: r, ...i }) => /* @__PURE__ *
33335
33334
  ref: n,
33336
33335
  ...r,
33337
33336
  children: t
33338
- }), u4 = y("flex flex-col gap-3xs data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_[role=\"group\"]]:rounded-full [&_[role=\"group\"]]:bg-surface [&_[role=\"group\"]]:p-3xs [&_[role=\"group\"]]:shadow-2xs [&_[role=\"group\"]]:outline [&_[role=\"group\"]]:outline-transparent [&_[role=\"group\"]]:transition-all aria-invalid:[&_[role=\"group\"]]:bg-error-container aria-invalid:[&_[role=\"group\"]]:outline-error-border aria-invalid:[&_[role=\"group\"]]:focus-within:outline-error-border-strong aria-invalid:[&_[role=\"group\"]]:not-focus-within:hover:outline-error-border data-[disabled]:[&_[role=\"group\"]]:cursor-not-allowed data-[invalid]:[&_[role=\"group\"]]:bg-error-container data-[invalid]:[&_[role=\"group\"]]:outline-error-border data-[invalid]:[&_[role=\"group\"]]:focus-within:outline-error-border-strong data-[invalid]:[&_[role=\"group\"]]:not-focus-within:hover:outline-error-border aria-invalid:[&_input]:text-error-on-container aria-invalid:[&_input]:caret-error-border-strong data-[invalid]:[&_input]:text-error-on-container data-[invalid]:[&_input]:caret-error-border-strong", {
33337
+ }), u4 = y("flex flex-col gap-3xs data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50 [&_[role=\"group\"]]:rounded-full [&_[role=\"group\"]]:bg-surface [&_[role=\"group\"]]:shadow-2xs [&_[role=\"group\"]]:outline [&_[role=\"group\"]]:outline-transparent [&_[role=\"group\"]]:transition-all aria-invalid:[&_[role=\"group\"]]:bg-error-container aria-invalid:[&_[role=\"group\"]]:outline-error-border aria-invalid:[&_[role=\"group\"]]:focus-within:outline-error-border-strong aria-invalid:[&_[role=\"group\"]]:not-focus-within:hover:outline-error-border data-[disabled]:[&_[role=\"group\"]]:cursor-not-allowed data-[invalid]:[&_[role=\"group\"]]:bg-error-container data-[invalid]:[&_[role=\"group\"]]:outline-error-border data-[invalid]:[&_[role=\"group\"]]:focus-within:outline-error-border-strong data-[invalid]:[&_[role=\"group\"]]:not-focus-within:hover:outline-error-border aria-invalid:[&_input]:text-error-on-container aria-invalid:[&_input]:caret-error-border-strong data-[invalid]:[&_input]:text-error-on-container data-[invalid]:[&_input]:caret-error-border-strong", {
33339
33338
  variants: { size: {
33340
- small: "[&_input]:style-text-default-0",
33341
- medium: "[&_input]:style-text-default-1",
33342
- large: "[&_input]:style-text-default-2"
33339
+ small: "h-lg [&_input]:style-text-default--1",
33340
+ medium: "h-xl [&_input]:style-text-default-0",
33341
+ large: "h-2xl [&_input]:style-text-default-1"
33343
33342
  } },
33344
33343
  defaultVariants: { size: "medium" }
33345
- }), d4 = ({ label: e, size: t, className: n, ref: r, ...i }) => {
33346
- let a = sr.useId(), { min: o, max: s, value: c, defaultValue: l, onValueChange: u, "aria-invalid": d, ...f } = i, [p, m] = sr.useState(() => typeof l == "number" ? l : null), h = typeof c == "number" || c === null ? c : p, g = !!(d || typeof h == "number" && (typeof o == "number" && h < o || typeof s == "number" && h > s)), _ = (...e) => {
33344
+ }), d4 = ({ children: e, label: t, size: n, className: r, ref: i, ...a }) => {
33345
+ let o = sr.useId(), { min: s, max: c, value: l, defaultValue: u, onValueChange: d, "aria-invalid": f, ...p } = a, [m, h] = sr.useState(() => typeof u == "number" ? u : null), g = typeof l == "number" || l === null ? l : m, _ = !!(f || typeof g == "number" && (typeof s == "number" && g < s || typeof c == "number" && g > c)), v = (...e) => {
33347
33346
  let [t] = e;
33348
- typeof c != "number" && c !== null && m(t), u?.(...e);
33349
- }, v = () => {
33350
- switch (t) {
33347
+ typeof l != "number" && l !== null && h(t), d?.(...e);
33348
+ }, y = () => {
33349
+ switch (n) {
33351
33350
  case "small": return "iconSmall";
33352
33351
  case "medium": return "iconMedium";
33353
33352
  case "large": return "iconLarge";
@@ -33356,43 +33355,47 @@ var M2 = ({ row: e, className: t, children: n, ref: r, ...i }) => /* @__PURE__ *
33356
33355
  };
33357
33356
  return /* @__PURE__ */ Z(lp, {
33358
33357
  className: J(u4({
33359
- size: t,
33360
- className: n
33358
+ size: n,
33359
+ className: r
33361
33360
  })),
33362
- ref: r,
33363
- "aria-invalid": g,
33364
- "data-invalid": g ? "" : void 0,
33365
- defaultValue: l,
33366
- id: a,
33367
- max: s,
33368
- min: o,
33369
- onValueChange: _,
33370
- value: c,
33371
- ...f,
33361
+ ref: i,
33362
+ "aria-invalid": _,
33363
+ "data-invalid": _ ? "" : void 0,
33364
+ defaultValue: u,
33365
+ id: o,
33366
+ max: c,
33367
+ min: s,
33368
+ onValueChange: v,
33369
+ value: l,
33370
+ ...p,
33372
33371
  children: [/* @__PURE__ */ Z(Np, {
33373
33372
  className: "cursor-ew-resize",
33374
33373
  children: [/* @__PURE__ */ X("label", {
33375
33374
  className: "cursor-ew-resize style-text-default--1",
33376
- htmlFor: a,
33377
- children: e
33375
+ htmlFor: o,
33376
+ children: t
33378
33377
  }), /* @__PURE__ */ X(Pp, { children: /* @__PURE__ */ X(f4, {}) })]
33379
33378
  }), /* @__PURE__ */ Z(dp, {
33380
- className: "flex w-full items-center",
33379
+ className: "relative flex w-full items-center gap-3xs",
33381
33380
  children: [
33382
33381
  /* @__PURE__ */ X(Tp, { render: (e) => /* @__PURE__ */ X(P, {
33383
33382
  ...e,
33384
33383
  tone: "error",
33385
33384
  variant: "ghost",
33386
- size: v(),
33385
+ size: y(),
33387
33386
  className: "shrink-0",
33388
33387
  children: /* @__PURE__ */ X(Vy, { weight: "bold" })
33389
33388
  }) }),
33390
33389
  /* @__PURE__ */ X(Op, { className: "w-full text-center style-text-default-0 focus:outline-none" }),
33390
+ /* @__PURE__ */ X("div", {
33391
+ className: "absolute right-2xl style-text-default-0 text-on-surface-variant",
33392
+ children: e
33393
+ }),
33391
33394
  /* @__PURE__ */ X(wp, { render: (e) => /* @__PURE__ */ X(P, {
33392
33395
  ...e,
33393
33396
  tone: "success",
33394
33397
  variant: "ghost",
33395
- size: v(),
33398
+ size: y(),
33396
33399
  className: "shrink-0",
33397
33400
  children: /* @__PURE__ */ X(Hy, { weight: "bold" })
33398
33401
  }) })