@arcadeai/design-system 7.9.2 → 7.9.3

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 +1 @@
1
- {"version":3,"file":"date-time-picker.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/date-time-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAS1D,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;AAE5E,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,aAAa,EACjB,EAAE,mBAAmB,+BAmErB;yBAxEe,cAAc"}
1
+ {"version":3,"file":"date-time-picker.d.ts","sourceRoot":"","sources":["../../../../lib/components/ui/molecules/date-time-picker.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAmB,MAAM,OAAO,CAAC;AAE7D,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAS1D,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,CAAC,EAAE,IAAI,CAAC;IACb,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,SAAS,KAAK,IAAI,CAAC;IAC5C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,QAAQ,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,MAAM,CAAC,CAAC;AAE5E,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,aAAa,EACjB,EAAE,mBAAmB,+BAuErB;yBA5Ee,cAAc"}
@@ -3,70 +3,70 @@ import { n as t, o as n, t as r } from "../../../popover-CpLkQtT5.js";
3
3
  import { r as i, t as a } from "../../../calendar-Ctzadwv-.js";
4
4
  import { t as o } from "../../../input-DZTqcpe-.js";
5
5
  import { Label as s } from "../atoms/label.js";
6
- import { useState as c } from "react";
7
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
8
- import { ChevronDownIcon as d } from "lucide-react";
6
+ import { useId as c, useState as l } from "react";
7
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
8
+ import { ChevronDownIcon as f } from "lucide-react";
9
9
  //#region lib/components/ui/molecules/date-time-picker.tsx
10
- function f({ value: f, onChange: p, className: m, ...h }) {
11
- let [g, _] = c(!1), v = f ? i(f, "HH:mm:ss") : "";
12
- return /* @__PURE__ */ l("div", {
13
- className: m,
14
- children: /* @__PURE__ */ u("div", {
10
+ function p({ value: p, onChange: m, className: h, ...g }) {
11
+ let [_, v] = l(!1), y = c(), b = c(), x = p ? i(p, "HH:mm:ss") : "";
12
+ return /* @__PURE__ */ u("div", {
13
+ className: h,
14
+ children: /* @__PURE__ */ d("div", {
15
15
  className: "flex gap-4",
16
- children: [/* @__PURE__ */ u("div", {
16
+ children: [/* @__PURE__ */ d("div", {
17
17
  className: "flex flex-col gap-3",
18
- children: [/* @__PURE__ */ u(s, {
18
+ children: [/* @__PURE__ */ d(s, {
19
19
  className: "px-1",
20
- htmlFor: "date-picker",
20
+ htmlFor: y,
21
21
  children: ["Date:", " "]
22
- }), /* @__PURE__ */ u(r, {
23
- onOpenChange: _,
24
- open: g,
25
- children: [/* @__PURE__ */ u(n, {
26
- render: /* @__PURE__ */ l(e, {
22
+ }), /* @__PURE__ */ d(r, {
23
+ onOpenChange: v,
24
+ open: _,
25
+ children: [/* @__PURE__ */ d(n, {
26
+ render: /* @__PURE__ */ u(e, {
27
27
  className: "w-32 justify-between font-normal",
28
- id: "date-picker",
28
+ id: y,
29
29
  size: "lg",
30
30
  variant: "outline"
31
31
  }),
32
- children: [/* @__PURE__ */ l("span", { children: f ? f.toLocaleDateString() : "Select date" }), /* @__PURE__ */ l(d, {})]
33
- }), /* @__PURE__ */ l(t, {
32
+ children: [/* @__PURE__ */ u("span", { children: p ? p.toLocaleDateString() : "Select date" }), /* @__PURE__ */ u(f, {})]
33
+ }), /* @__PURE__ */ u(t, {
34
34
  align: "start",
35
35
  className: "w-auto overflow-hidden p-0",
36
- children: /* @__PURE__ */ l(a, {
36
+ children: /* @__PURE__ */ u(a, {
37
37
  captionLayout: "dropdown",
38
38
  mode: "single",
39
39
  onSelect: (e) => {
40
- p?.(e), _(!1);
40
+ m?.(e), v(!1);
41
41
  },
42
- selected: f,
43
- ...h
42
+ selected: p,
43
+ ...g
44
44
  })
45
45
  })]
46
46
  })]
47
- }), /* @__PURE__ */ u("div", {
47
+ }), /* @__PURE__ */ d("div", {
48
48
  className: "flex flex-col gap-3",
49
- children: [/* @__PURE__ */ u(s, {
49
+ children: [/* @__PURE__ */ d(s, {
50
50
  className: "px-1",
51
- htmlFor: "time-picker",
51
+ htmlFor: b,
52
52
  children: ["Time:", " "]
53
- }), /* @__PURE__ */ l(o, {
53
+ }), /* @__PURE__ */ u(o, {
54
54
  className: "appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none",
55
- id: "time-picker",
55
+ id: b,
56
56
  onChange: (e) => {
57
57
  let t = e.target.value;
58
- if (!(t && f)) return;
59
- let [n, r, i] = t.split(":").map(Number), a = new Date(f);
60
- a.setHours(n, r, i || 0), p?.(a);
58
+ if (!(t && p)) return;
59
+ let [n, r, i] = t.split(":").map(Number), a = new Date(p);
60
+ a.setHours(n, r, i || 0), m?.(a);
61
61
  },
62
62
  step: "1",
63
63
  type: "time",
64
- value: v
64
+ value: x
65
65
  })]
66
66
  })]
67
67
  })
68
68
  });
69
69
  }
70
- f.displayName = "DateTimePicker";
70
+ p.displayName = "DateTimePicker";
71
71
  //#endregion
72
- export { f as DateTimePicker };
72
+ export { p as DateTimePicker };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arcadeai/design-system",
3
3
  "private": false,
4
- "version": "7.9.2",
4
+ "version": "7.9.3",
5
5
  "type": "module",
6
6
  "main": "./dist/main.js",
7
7
  "types": "./dist/main.d.ts",