@sito/ui 0.0.45 → 0.0.47

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/ui.js CHANGED
@@ -24944,15 +24944,16 @@ const rU = _u(function(u, c) {
24944
24944
  );
24945
24945
  }), dk = rU, aU = _u(function(u, c) {
24946
24946
  const {
24947
- orientation: d = "column",
24948
- color: m = "inherit",
24949
- leftComponent: S,
24950
- rightComponent: E,
24951
- label: y,
24952
- type: T = "text",
24953
- ...x
24954
- } = u, O = oR(() => {
24955
- switch (T) {
24947
+ helperText: d = "",
24948
+ orientation: m = "column",
24949
+ color: S = "inherit",
24950
+ leftComponent: E,
24951
+ rightComponent: y,
24952
+ label: T,
24953
+ type: x = "text",
24954
+ ...O
24955
+ } = u, _ = oR(() => {
24956
+ switch (x) {
24956
24957
  case "date":
24957
24958
  case "datetime-local":
24958
24959
  case "email":
@@ -24962,57 +24963,67 @@ const rU = _u(function(u, c) {
24962
24963
  case "tel":
24963
24964
  case "time":
24964
24965
  case "url":
24965
- return T;
24966
+ return x;
24966
24967
  default:
24967
24968
  return "text";
24968
24969
  }
24969
- }, [T]);
24970
- return /* @__PURE__ */ yl("div", { className: `input-control ${d} ${m}`, children: [
24971
- /* @__PURE__ */ ht("label", { htmlFor: u.id, children: y }),
24972
- S || E ? /* @__PURE__ */ yl("div", { className: "sub", children: [
24973
- S && S !== null ? /* @__PURE__ */ ht("div", { children: S }) : null,
24970
+ }, [x]);
24971
+ return /* @__PURE__ */ yl("div", { className: `input-control ${m} ${S}`, children: [
24972
+ /* @__PURE__ */ ht("label", { htmlFor: u.id, children: T }),
24973
+ E || y ? /* @__PURE__ */ yl("div", { className: "sub", children: [
24974
+ E && E !== null ? /* @__PURE__ */ ht("div", { children: E }) : null,
24974
24975
  /* @__PURE__ */ ht(
24975
24976
  "input",
24976
24977
  {
24977
- ...x,
24978
- type: O,
24978
+ ...O,
24979
+ type: _,
24979
24980
  ref: c,
24980
- className: `${S ? "!pl-0" : ""} ${E ? "!pr-0" : ""} ${x.className ?? ""}`
24981
+ className: `${E ? "!pl-0" : ""} ${y ? "!pr-0" : ""} ${O.className ?? ""}`
24981
24982
  }
24982
24983
  ),
24983
- E && E !== null ? /* @__PURE__ */ ht("div", { children: E }) : null
24984
- ] }) : /* @__PURE__ */ ht("input", { ...x, ref: c })
24984
+ y && y !== null ? /* @__PURE__ */ ht("div", { children: y }) : null
24985
+ ] }) : /* @__PURE__ */ ht("input", { ...O, ref: c }),
24986
+ d && d.length ? /* @__PURE__ */ ht("p", { children: d }) : null
24985
24987
  ] });
24986
24988
  }), PU = aU, iU = _u(function(u, c) {
24987
24989
  const {
24988
- orientation: d = "column",
24989
- color: m = "inherit",
24990
- leftComponent: S,
24991
- rightComponent: E,
24992
- label: y,
24993
- ...T
24990
+ helperText: d = "",
24991
+ orientation: m = "column",
24992
+ color: S = "inherit",
24993
+ leftComponent: E,
24994
+ rightComponent: y,
24995
+ label: T,
24996
+ ...x
24994
24997
  } = u;
24995
- return /* @__PURE__ */ yl("div", { className: `input-control ${d} ${m}`, children: [
24996
- /* @__PURE__ */ ht("label", { htmlFor: u.id, children: y }),
24997
- S || E ? /* @__PURE__ */ yl("div", { className: "sub", children: [
24998
- S && S !== null ? /* @__PURE__ */ ht("div", { children: S }) : null,
24998
+ return /* @__PURE__ */ yl("div", { className: `input-control ${m} ${S}`, children: [
24999
+ /* @__PURE__ */ ht("label", { htmlFor: u.id, children: T }),
25000
+ E || y ? /* @__PURE__ */ yl("div", { className: "sub", children: [
25001
+ E && E !== null ? /* @__PURE__ */ ht("div", { children: E }) : null,
24999
25002
  /* @__PURE__ */ ht(
25000
25003
  "select",
25001
25004
  {
25002
- ...T,
25005
+ ...x,
25003
25006
  ref: c,
25004
- className: `${S ? "!pl-0" : ""} ${E ? "!pr-0" : ""} ${T.className ?? ""}`,
25005
- children: T.children
25007
+ className: `${E ? "!pl-0" : ""} ${y ? "!pr-0" : ""} ${x.className ?? ""}`,
25008
+ children: x.children
25006
25009
  }
25007
25010
  ),
25008
- E && E !== null ? /* @__PURE__ */ ht("div", { children: E }) : null
25009
- ] }) : /* @__PURE__ */ ht("select", { ...T, ref: c, children: T.children })
25011
+ y && y !== null ? /* @__PURE__ */ ht("div", { children: y }) : null
25012
+ ] }) : /* @__PURE__ */ ht("select", { ...x, ref: c, children: x.children }),
25013
+ d && d.length ? /* @__PURE__ */ ht("p", { children: d }) : null
25010
25014
  ] });
25011
25015
  }), jU = iU, oU = _u(function(u, c) {
25012
- const { orientation: d = "column", color: m = "inherit", label: S, ...E } = u;
25013
- return /* @__PURE__ */ yl("div", { className: `input-control ${d} ${m}`, children: [
25014
- /* @__PURE__ */ ht("label", { htmlFor: u.id, children: S }),
25015
- /* @__PURE__ */ ht("textarea", { ...E, ref: c })
25016
+ const {
25017
+ helperText: d = "",
25018
+ orientation: m = "column",
25019
+ color: S = "inherit",
25020
+ label: E,
25021
+ ...y
25022
+ } = u;
25023
+ return /* @__PURE__ */ yl("div", { className: `input-control ${m} ${S}`, children: [
25024
+ /* @__PURE__ */ ht("label", { htmlFor: u.id, children: E }),
25025
+ /* @__PURE__ */ ht("textarea", { ...y, ref: c }),
25026
+ d && d.length ? /* @__PURE__ */ ht("p", { children: d }) : null
25016
25027
  ] });
25017
25028
  }), FU = oU, lU = _u(function(u, c) {
25018
25029
  const {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sito/ui",
3
3
  "private": false,
4
- "version": "0.0.45",
4
+ "version": "0.0.47",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist/"