@code0-tech/pictor 0.18.0 → 0.18.1

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
- .command{display:flex;height:100%;width:100%;flex-direction:column;overflow:hidden;padding:.563rem;box-sizing:border-box}.command__dialog{padding:0}.command__list:focus{outline:none}.command__input.input:focus,.command .input.input:hover:focus,.command .input.input:active:focus,.command .input.input:focus:focus,.command .input.input:focus-within:focus,.command .input.input:not(:focus):focus{outline:none}.command__input.input,.command .input.input:hover,.command .input.input:active,.command .input.input:focus,.command .input.input:focus-within,.command .input.input:not(:focus){width:100%;border:none!important;outline:none!important;background:transparent;box-shadow:none!important;display:flex;height:2rem;color:#ffffffbf;font-size:.75rem;border-radius:.578rem}.command__input.input::placeholder,.command .input.input:hover::placeholder,.command .input.input:active::placeholder,.command .input.input:focus::placeholder,.command .input.input:focus-within::placeholder,.command .input.input:not(:focus)::placeholder{color:#ffffff40}.command__input.input .input__right,.command .input.input:hover .input__right,.command .input.input:active .input__right,.command .input.input:focus .input__right,.command .input.input:focus-within .input__right,.command .input.input:not(:focus) .input__right{padding-right:0}.command__empty{padding:1rem 0 1.777rem;text-align:center;font-size:.75rem;color:#ffffff80}.command__empty{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.command [cmdk-group-heading]{padding:.422rem .563rem}.command__group{overflow:hidden;text-transform:uppercase;font-size:.563rem;padding:.422rem 0 0;color:#ffffff80}.command__group{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.command__item{position:relative;display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;font-size:.75rem;outline:none;color:#ffffffbf;border-radius:.578rem;padding:.422rem .422rem .422rem .75rem;gap:.563rem;text-transform:none}.command__item[data-disabled=true]{pointer-events:none;color:#ffffff40}.command__item[data-selected=true]{background:#201e2c;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;width:100%}.command__item svg{pointer-events:none;width:1rem;height:1rem;flex-shrink:0}.command__separator{height:1px;margin:.422rem 0;background:#ffffff1a}.command__shortcut{margin-left:auto;font-size:.563rem;letter-spacing:.1rem;padding:0 .422rem;border-radius:.375rem!important;color:#ffffff80;background:#070514}
1
+ .command{display:flex;height:100%;width:100%;flex-direction:column;overflow:hidden;padding:.563rem;box-sizing:border-box}.command__dialog{padding:0}.command__list:focus{outline:none}.command__empty{padding:1rem 0 1.777rem;text-align:center;font-size:.75rem;color:#ffffff80}.command__empty{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.command [cmdk-group-heading]{padding:.422rem .563rem}.command__group{overflow:hidden;text-transform:uppercase;font-size:.563rem;padding:.422rem 0 0;color:#ffffff80}.command__group{font-family:Inter,sans-serif;font-weight:400;letter-spacing:-.5px}.command__item{position:relative;display:flex;cursor:pointer;-webkit-user-select:none;user-select:none;align-items:center;font-size:.75rem;outline:none;color:#ffffffbf;border-radius:.578rem;padding:.422rem .422rem .422rem .75rem;gap:.563rem;text-transform:none}.command__item[data-disabled=true]{pointer-events:none;color:#ffffff40}.command__item[data-selected=true]{background:#201e2c;box-shadow:inset 0 1px 1px #ffffff1a;border:none;color:#ffffffbf;position:relative;box-sizing:border-box;width:100%}.command__item svg{pointer-events:none;width:1rem;height:1rem;flex-shrink:0}.command__separator{height:1px;margin:.422rem 0;background:#ffffff1a}.command__shortcut{margin-left:auto;font-size:.563rem;letter-spacing:.1rem;padding:0 .422rem;border-radius:.375rem!important;color:#ffffff80;background:#070514}
@@ -1,13 +1,13 @@
1
- import { jsx as i, jsxs as s } from "react/jsx-runtime";
1
+ import { jsx as i, jsxs as u } from "react/jsx-runtime";
2
2
  import { c } from "../../_virtual/compiler-runtime.js";
3
3
  import { Command as a } from "cmdk";
4
4
  import "../../utils/contextStore.js";
5
5
  import "react";
6
6
  import { mergeComponentProps as r } from "../../utils/component.js";
7
7
  import "js-md5";
8
- import { DialogPortal as u, DialogContent as h, Dialog as g, DialogOverlay as C } from "../dialog/Dialog.js";
8
+ import { DialogPortal as h, DialogContent as g, Dialog as C, DialogOverlay as _ } from "../dialog/Dialog.js";
9
9
  import '../../assets/components/form/FileInput.style.css';import '../../assets/components/form/DateInput.style.css';import '../../assets/components/form/SelectInput.style.css';import '../../assets/components/flex/Flex.style.css';import '../../assets/components/form/Input.style.css';import '../../assets/components/command/Command.style.css';/* empty css */
10
- import { Badge as _ } from "../badge/Badge.js";
10
+ import { Badge as $ } from "../badge/Badge.js";
11
11
  import "@radix-ui/react-checkbox";
12
12
  import "@tabler/icons-react";
13
13
  /* empty css */
@@ -32,97 +32,104 @@ import "@radix-ui/react-radio-group";
32
32
  import "../form/SwitchInput.js";
33
33
  import "../form/TagInput.js";
34
34
  import "../form/TextAreaInput.js";
35
- import { TextInput as $ } from "../form/TextInput.js";
36
- const P = (e) => {
35
+ import { TextInput as P } from "../form/TextInput.js";
36
+ const y = (e) => {
37
37
  const t = c.c(4);
38
- let m;
39
- t[0] !== e ? (m = r("command", e), t[0] = e, t[1] = m) : m = t[1];
40
- const o = m;
41
38
  let n;
42
- return t[2] !== o ? (n = /* @__PURE__ */ i(a, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
43
- }, et = (e) => {
39
+ t[0] !== e ? (n = r("command", e), t[0] = e, t[1] = n) : n = t[1];
40
+ const m = n;
41
+ let o;
42
+ return t[2] !== m ? (o = /* @__PURE__ */ i(a, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
43
+ }, nt = (e) => {
44
44
  const t = c.c(11);
45
+ let n;
46
+ t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ i(_, {}), t[0] = n) : n = t[0];
45
47
  let m;
46
- t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = /* @__PURE__ */ i(C, {}), t[0] = m) : m = t[0];
48
+ t[1] !== e ? (m = /* @__PURE__ */ i(y, { ...e, h: "100%", children: e.children }), t[1] = e, t[2] = m) : m = t[2];
47
49
  let o;
48
- t[1] !== e ? (o = /* @__PURE__ */ i(P, { ...e, h: "100%", children: e.children }), t[1] = e, t[2] = o) : o = t[2];
49
- let n;
50
- t[3] !== e.contentProps || t[4] !== o ? (n = /* @__PURE__ */ s(u, { children: [
51
- m,
52
- /* @__PURE__ */ i(h, { className: "command__dialog", ...e.contentProps, children: o })
53
- ] }), t[3] = e.contentProps, t[4] = o, t[5] = n) : n = t[5];
50
+ t[3] !== e.contentProps || t[4] !== m ? (o = /* @__PURE__ */ u(h, { children: [
51
+ n,
52
+ /* @__PURE__ */ i(g, { className: "command__dialog", ...e.contentProps, children: m })
53
+ ] }), t[3] = e.contentProps, t[4] = m, t[5] = o) : o = t[5];
54
54
  let l;
55
- return t[6] !== e.dialogProps || t[7] !== e.onOpenChange || t[8] !== e.open || t[9] !== n ? (l = /* @__PURE__ */ i(g, { ...e.dialogProps, open: e.open, onOpenChange: e.onOpenChange, children: n }), t[6] = e.dialogProps, t[7] = e.onOpenChange, t[8] = e.open, t[9] = n, t[10] = l) : l = t[10], l;
56
- }, nt = (e) => {
55
+ return t[6] !== e.dialogProps || t[7] !== e.onOpenChange || t[8] !== e.open || t[9] !== o ? (l = /* @__PURE__ */ i(C, { ...e.dialogProps, open: e.open, onOpenChange: e.onOpenChange, children: o }), t[6] = e.dialogProps, t[7] = e.onOpenChange, t[8] = e.open, t[9] = o, t[10] = l) : l = t[10], l;
56
+ }, ot = (e) => {
57
57
  const t = c.c(4);
58
- let m;
59
- t[0] !== e ? (m = r("command__list", e), t[0] = e, t[1] = m) : m = t[1];
60
- const o = m;
61
58
  let n;
62
- return t[2] !== o ? (n = /* @__PURE__ */ i(a.List, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
59
+ t[0] !== e ? (n = r("command__list", e), t[0] = e, t[1] = n) : n = t[1];
60
+ const m = n;
61
+ let o;
62
+ return t[2] !== m ? (o = /* @__PURE__ */ i(a.List, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
63
63
  }, mt = (e) => {
64
- const t = c.c(10);
64
+ const t = c.c(11);
65
+ let n;
66
+ t[0] !== e.value ? (n = e.value?.toString(), t[0] = e.value, t[1] = n) : n = t[1];
65
67
  let m;
66
- t[0] !== e.value ? (m = e.value?.toString(), t[0] = e.value, t[1] = m) : m = t[1];
67
- let o;
68
- t[2] !== e ? (o = (d) => {
68
+ t[2] !== e ? (m = (s) => {
69
69
  if (e.onChange) {
70
70
  const f = {
71
71
  target: {
72
- value: d
72
+ value: s
73
73
  }
74
74
  };
75
75
  e.onChange(f);
76
76
  }
77
- }, t[2] = e, t[3] = o) : o = t[3];
78
- let n;
79
- t[4] !== e ? (n = /* @__PURE__ */ i($, { className: "command__input", ...e }), t[4] = e, t[5] = n) : n = t[5];
77
+ }, t[2] = e, t[3] = m) : m = t[3];
78
+ let o;
79
+ t[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = {
80
+ style: {
81
+ background: "transparent",
82
+ boxShadow: "none"
83
+ }
84
+ }, t[4] = o) : o = t[4];
80
85
  let l;
81
- return t[6] !== m || t[7] !== o || t[8] !== n ? (l = /* @__PURE__ */ i(a.Input, { value: m, onValueChange: o, asChild: !0, children: n }), t[6] = m, t[7] = o, t[8] = n, t[9] = l) : l = t[9], l;
82
- }, ot = (e) => {
83
- const t = c.c(4);
84
- let m;
85
- t[0] !== e ? (m = r("command__empty", e), t[0] = e, t[1] = m) : m = t[1];
86
- const o = m;
87
- let n;
88
- return t[2] !== o ? (n = /* @__PURE__ */ i(a.Empty, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
86
+ t[5] !== e ? (l = /* @__PURE__ */ i(P, { wrapperComponent: o, className: "command__input", ...e }), t[5] = e, t[6] = l) : l = t[6];
87
+ let d;
88
+ return t[7] !== n || t[8] !== m || t[9] !== l ? (d = /* @__PURE__ */ i(a.Input, { value: n, onValueChange: m, asChild: !0, children: l }), t[7] = n, t[8] = m, t[9] = l, t[10] = d) : d = t[10], d;
89
89
  }, it = (e) => {
90
90
  const t = c.c(4);
91
- let m;
92
- t[0] !== e ? (m = r("command__group", e), t[0] = e, t[1] = m) : m = t[1];
93
- const o = m;
94
91
  let n;
95
- return t[2] !== o ? (n = /* @__PURE__ */ i(a.Group, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
92
+ t[0] !== e ? (n = r("command__empty", e), t[0] = e, t[1] = n) : n = t[1];
93
+ const m = n;
94
+ let o;
95
+ return t[2] !== m ? (o = /* @__PURE__ */ i(a.Empty, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
96
96
  }, lt = (e) => {
97
97
  const t = c.c(4);
98
- let m;
99
- t[0] !== e ? (m = r("command__item", e), t[0] = e, t[1] = m) : m = t[1];
100
- const o = m;
101
98
  let n;
102
- return t[2] !== o ? (n = /* @__PURE__ */ i(a.Item, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
99
+ t[0] !== e ? (n = r("command__group", e), t[0] = e, t[1] = n) : n = t[1];
100
+ const m = n;
101
+ let o;
102
+ return t[2] !== m ? (o = /* @__PURE__ */ i(a.Group, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
103
103
  }, ct = (e) => {
104
104
  const t = c.c(4);
105
- let m;
106
- t[0] !== e ? (m = r("command__separator", e), t[0] = e, t[1] = m) : m = t[1];
107
- const o = m;
108
105
  let n;
109
- return t[2] !== o ? (n = /* @__PURE__ */ i(a.Separator, { ...o }), t[2] = o, t[3] = n) : n = t[3], n;
106
+ t[0] !== e ? (n = r("command__item", e), t[0] = e, t[1] = n) : n = t[1];
107
+ const m = n;
108
+ let o;
109
+ return t[2] !== m ? (o = /* @__PURE__ */ i(a.Item, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
110
110
  }, at = (e) => {
111
+ const t = c.c(4);
112
+ let n;
113
+ t[0] !== e ? (n = r("command__separator", e), t[0] = e, t[1] = n) : n = t[1];
114
+ const m = n;
115
+ let o;
116
+ return t[2] !== m ? (o = /* @__PURE__ */ i(a.Separator, { ...m }), t[2] = m, t[3] = o) : o = t[3], o;
117
+ }, rt = (e) => {
111
118
  const t = c.c(5);
112
- let m;
113
- t[0] !== e ? (m = r("command__shortcut", e), t[0] = e, t[1] = m) : m = t[1];
114
- const o = m;
115
119
  let n;
116
- return t[2] !== e.children || t[3] !== o ? (n = /* @__PURE__ */ i(_, { ...o, children: e.children }), t[2] = e.children, t[3] = o, t[4] = n) : n = t[4], n;
120
+ t[0] !== e ? (n = r("command__shortcut", e), t[0] = e, t[1] = n) : n = t[1];
121
+ const m = n;
122
+ let o;
123
+ return t[2] !== e.children || t[3] !== m ? (o = /* @__PURE__ */ i($, { ...m, children: e.children }), t[2] = e.children, t[3] = m, t[4] = o) : o = t[4], o;
117
124
  };
118
125
  export {
119
- P as Command,
120
- et as CommandDialog,
121
- ot as CommandEmpty,
122
- it as CommandGroup,
126
+ y as Command,
127
+ nt as CommandDialog,
128
+ it as CommandEmpty,
129
+ lt as CommandGroup,
123
130
  mt as CommandInput,
124
- lt as CommandItem,
125
- nt as CommandList,
126
- ct as CommandSeparator,
127
- at as CommandShortcut
131
+ ct as CommandItem,
132
+ ot as CommandList,
133
+ at as CommandSeparator,
134
+ rt as CommandShortcut
128
135
  };
@@ -1,66 +1,66 @@
1
- import { jsxs as E, jsx as a, Fragment as L } from "react/jsx-runtime";
1
+ import { jsxs as T, jsx as s, Fragment as L } from "react/jsx-runtime";
2
2
  import { c as N } from "../../_virtual/compiler-runtime.js";
3
3
  import "../../utils/contextStore.js";
4
- import g from "react";
4
+ import p from "react";
5
5
  import { mergeComponentProps as P } from "../../utils/component.js";
6
6
  import "js-md5";
7
7
  import { InputMessage as k } from "./InputMessage.js";
8
8
  import { InputLabel as C } from "./InputLabel.js";
9
9
  import { InputDescription as D } from "./InputDescription.js";
10
10
  import '../../assets/components/form/InputWrapper.style.css';/* empty css */
11
- const S = g.forwardRef((F, W) => {
11
+ const U = p.forwardRef((F, W) => {
12
12
  const e = N.c(22), {
13
- children: v,
14
- left: s,
15
- right: p,
13
+ children: a,
14
+ left: d,
15
+ right: c,
16
16
  leftType: $,
17
17
  rightType: x,
18
- title: d,
19
- description: c,
20
- formValidation: m,
21
- ...f
22
- } = F, b = $ === void 0 ? "icon" : $, _ = x === void 0 ? "action" : x;
23
- let u;
24
- e[0] !== m ? (u = m === void 0 ? {
18
+ title: m,
19
+ description: f,
20
+ formValidation: u,
21
+ ...h
22
+ } = F, b = $ === void 0 ? "icon" : $, I = x === void 0 ? "action" : x;
23
+ let g;
24
+ e[0] !== u ? (g = u === void 0 ? {
25
25
  valid: !0,
26
26
  notValidMessage: null,
27
27
  setValue: null
28
- } : m, e[0] = m, e[1] = u) : u = e[1];
29
- const t = u, R = g.useId(), I = f.id ?? R, M = `${I}-label`, T = d ? void 0 : f["aria-label"] ?? f.placeholder, j = {
30
- id: I,
31
- ...d ? {
32
- "aria-labelledby": M
28
+ } : u, e[0] = u, e[1] = g) : g = e[1];
29
+ const t = g, R = p.useId(), _ = (p.isValidElement(a) ? a.props.id : void 0) ?? h.id ?? R, E = `${_}-label`, M = m ? void 0 : h["aria-label"] ?? h.placeholder, j = {
30
+ id: _,
31
+ ...m ? {
32
+ "aria-labelledby": E
33
33
  } : {},
34
- ...T ? {
35
- "aria-label": T
34
+ ...M ? {
35
+ "aria-label": M
36
36
  } : {}
37
- }, V = d && /* @__PURE__ */ a(C, { htmlFor: I, id: M, children: d });
37
+ }, V = m && /* @__PURE__ */ s(C, { htmlFor: _, id: E, children: m });
38
38
  let i;
39
- e[2] !== c ? (i = c && /* @__PURE__ */ a(D, { children: c }), e[2] = c, e[3] = i) : i = e[3];
40
- const w = P(`input-wrapper ${t?.valid ? "" : "input-wrapper--not-valid"}`, f);
39
+ e[2] !== f ? (i = f && /* @__PURE__ */ s(D, { children: f }), e[2] = f, e[3] = i) : i = e[3];
40
+ const w = P(`input-wrapper ${t?.valid ? "" : "input-wrapper--not-valid"}`, h);
41
41
  let l;
42
- e[4] !== s || e[5] !== b ? (l = s && /* @__PURE__ */ a("div", { className: `input-wrapper__left input__left--${b}`, children: s }), e[4] = s, e[5] = b, e[6] = l) : l = e[6];
43
- const y = g.isValidElement(v) ? g.cloneElement(v, {
42
+ e[4] !== d || e[5] !== b ? (l = d && /* @__PURE__ */ s("div", { className: `input-wrapper__left input__left--${b}`, children: d }), e[4] = d, e[5] = b, e[6] = l) : l = e[6];
43
+ const y = p.isValidElement(a) ? p.cloneElement(a, {
44
44
  ...j
45
- }) : v;
45
+ }) : a;
46
46
  let r;
47
- e[7] !== p || e[8] !== _ ? (r = p && /* @__PURE__ */ a("div", { className: `input-wrapper__right input-wrapper__right--${_}`, children: p }), e[7] = p, e[8] = _, e[9] = r) : r = e[9];
47
+ e[7] !== c || e[8] !== I ? (r = c && /* @__PURE__ */ s("div", { className: `input-wrapper__right input-wrapper__right--${I}`, children: c }), e[7] = c, e[8] = I, e[9] = r) : r = e[9];
48
48
  let o;
49
- e[10] !== w || e[11] !== l || e[12] !== y || e[13] !== r ? (o = /* @__PURE__ */ E("div", { ...w, children: [
49
+ e[10] !== w || e[11] !== l || e[12] !== y || e[13] !== r ? (o = /* @__PURE__ */ T("div", { ...w, children: [
50
50
  l,
51
51
  y,
52
52
  r
53
53
  ] }), e[10] = w, e[11] = l, e[12] = y, e[13] = r, e[14] = o) : o = e[14];
54
54
  let n;
55
- e[15] !== t ? (n = !t?.valid && t?.notValidMessage && /* @__PURE__ */ a(k, { children: t.notValidMessage }), e[15] = t, e[16] = n) : n = e[16];
56
- let h;
57
- return e[17] !== o || e[18] !== n || e[19] !== V || e[20] !== i ? (h = /* @__PURE__ */ E(L, { children: [
55
+ e[15] !== t ? (n = !t?.valid && t?.notValidMessage && /* @__PURE__ */ s(k, { children: t.notValidMessage }), e[15] = t, e[16] = n) : n = e[16];
56
+ let v;
57
+ return e[17] !== o || e[18] !== n || e[19] !== V || e[20] !== i ? (v = /* @__PURE__ */ T(L, { children: [
58
58
  V,
59
59
  i,
60
60
  o,
61
61
  n
62
- ] }), e[17] = o, e[18] = n, e[19] = V, e[20] = i, e[21] = h) : h = e[21], h;
62
+ ] }), e[17] = o, e[18] = n, e[19] = V, e[20] = i, e[21] = v) : v = e[21], v;
63
63
  });
64
64
  export {
65
- S as InputWrapper
65
+ U as InputWrapper
66
66
  };
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { InputProps } from './Input';
3
- export interface TextInputProps extends Omit<InputProps<string | null>, "wrapperComponent" | "type"> {
3
+ export interface TextInputProps extends Omit<InputProps<string | null>, "type"> {
4
4
  clearable?: boolean;
5
5
  onClear?: (event: React.MouseEvent<HTMLButtonElement>) => void;
6
6
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code0-tech/pictor",
3
- "version": "0.18.0",
3
+ "version": "0.18.1",
4
4
  "type": "module",
5
5
  "description": "A simple template for a custom React component library",
6
6
  "scripts": {