@caseparts-org/caseblocks 0.0.223 → 0.0.224
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/assets/Input.css +1 -1
- package/dist/assets/Select.css +1 -1
- package/dist/atoms/Input/Input.js +14 -14
- package/dist/atoms/Select/Select.js +28 -28
- package/package.json +1 -1
package/dist/assets/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._input-
|
|
1
|
+
._input-container_t7pkh_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._input_t7pkh_1{height:32px;border-radius:var(--radius-radius-sm, .25rem);border:1px solid var(--border-border-primary, #dfdfdf);background:var(--surface-surface-primary);padding:0px var(--spacing-spacing-1xs, 12px);outline:none;font-size:var(--font-size-sm);width:100%}@media (max-width:767px){._input_t7pkh_1{font-size:var(--font-size-md)}}._input_t7pkh_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn)}._label_t7pkh_29{position:absolute;align-self:flex-start;left:8px;top:-8px;padding:0 8px;cursor:text;transition:all .2s ease-in;font-family:var(--font-family-label);font-size:var(--font-size-xxs);color:var(--text-text-quaternary);background-color:var(--surface-surface-primary)}._labelPlaceholder_t7pkh_43{position:absolute;align-self:flex-start;box-sizing:border-box;max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:italic;font-family:var(--font-family-label);font-size:var(--font-size-sm);background-color:transparent;color:var(--text-text-quaternary);left:12px;top:8px;padding:0 2px;pointer-events:none;transition:all .2s ease-in}input:hover{border:1px solid var(--border-border-primary-btn, #1380b1);transition:all .2s ease}
|
package/dist/assets/Select.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._select-
|
|
1
|
+
._select-container_1d1za_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._select_1d1za_1{height:32px;min-height:32px;width:100%;box-sizing:border-box;border:1px solid var(--border-border-primary, #dfdfdf);border-radius:var(--radius-radius-sm, .25rem);background:var(--surface-surface-primary);color:var(--text-text-primary, #272727);font-size:var(--font-size-sm, .875rem);padding:0 var(--spacing-spacing-2xl, 32px) 0 var(--spacing-spacing-1xs, 12px);outline:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:linear-gradient(45deg,transparent 50%,var(--border-border-primary-btn, #1380b1) 50%),linear-gradient(135deg,var(--border-border-primary-btn, #1380b1) 50%,transparent 50%);background-position:calc(100% - 16px) calc(50% - 3px),calc(100% - 11px) calc(50% - 3px);background-size:5px 5px,5px 5px;background-repeat:no-repeat}@media (max-width: 767px){._select_1d1za_1{font-size:var(--font-size-md)}}._select_1d1za_1:hover{border:1px solid var(--border-border-primary-btn, #1380b1)}._select_1d1za_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn, #1380b1)}._selectError_1d1za_46{border-color:var(--text-text-error-warning, #d40000)}._label_1d1za_50{position:absolute;align-self:flex-start;left:8px;top:-8px;padding:0 8px;cursor:text;transition:all .2s ease-in;font-family:var(--font-family-label);font-size:var(--font-size-xxs);color:var(--text-text-quaternary);background-color:var(--surface-surface-primary)}._labelPlaceholder_1d1za_64{position:absolute;align-self:flex-start;box-sizing:border-box;max-width:calc(100% - 24px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-style:italic;font-family:var(--font-family-label);font-size:var(--font-size-sm);background-color:transparent;color:var(--text-text-quaternary);left:12px;top:8px;padding:0 2px;pointer-events:none;transition:all .2s ease-in}._errorMessage_1d1za_84{width:100%;margin-top:4px;font-size:var(--font-size-xs, .75rem);color:var(--text-text-error-warning, #d40000)}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { jsxs as _, jsx as i } from "react/jsx-runtime";
|
|
2
|
-
import
|
|
2
|
+
import h, { useState as f } from "react";
|
|
3
3
|
import { c as r } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { getHideAtStyles as F } from "../HideAt.js";
|
|
5
|
-
import '../../assets/Input.css';const b = "
|
|
6
|
-
"input-container": "_input-
|
|
5
|
+
import '../../assets/Input.css';const b = "_input_t7pkh_1", x = "_label_t7pkh_29", k = "_labelPlaceholder_t7pkh_43", t = {
|
|
6
|
+
"input-container": "_input-container_t7pkh_1",
|
|
7
7
|
input: b,
|
|
8
8
|
label: x,
|
|
9
|
-
labelPlaceholder:
|
|
10
|
-
}, y =
|
|
11
|
-
({ label: e, placeholder:
|
|
12
|
-
const [
|
|
13
|
-
return /* @__PURE__ */ _("div", { className: r(
|
|
14
|
-
(e ||
|
|
9
|
+
labelPlaceholder: k
|
|
10
|
+
}, y = h.forwardRef(
|
|
11
|
+
({ label: e, placeholder: n, value: l, hideAt: p, className: d, ...o }, u) => {
|
|
12
|
+
const [a, s] = f(!1), c = !!e && (a || !!l), m = !!n && !e && !a && !l;
|
|
13
|
+
return /* @__PURE__ */ _("div", { className: r(t["input-container"], F(p)), children: [
|
|
14
|
+
(e || m) && /* @__PURE__ */ i("label", { htmlFor: o.name, className: c ? t.label : t.labelPlaceholder, children: c ? e : n ?? e }),
|
|
15
15
|
/* @__PURE__ */ i(
|
|
16
16
|
"input",
|
|
17
17
|
{
|
|
18
|
-
value:
|
|
19
|
-
ref:
|
|
20
|
-
id:
|
|
18
|
+
value: l,
|
|
19
|
+
ref: u,
|
|
20
|
+
id: o.name,
|
|
21
21
|
type: "text",
|
|
22
22
|
onFocus: () => s(!0),
|
|
23
23
|
onBlur: () => s(!1),
|
|
24
|
-
className: r(
|
|
25
|
-
...
|
|
24
|
+
className: r(t.input, d),
|
|
25
|
+
...o
|
|
26
26
|
}
|
|
27
27
|
)
|
|
28
28
|
] });
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsxs as
|
|
1
|
+
import { jsxs as f, jsx as c } from "react/jsx-runtime";
|
|
2
2
|
import M, { useState as w } from "react";
|
|
3
|
-
import { c as
|
|
3
|
+
import { c as b } from "../../clsx-OuTLNxxd.js";
|
|
4
4
|
import { getHideAtStyles as y } from "../HideAt.js";
|
|
5
|
-
import '../../assets/Select.css';const F = "
|
|
6
|
-
"select-container": "_select-
|
|
5
|
+
import '../../assets/Select.css';const F = "_select_1d1za_1", P = "_selectError_1d1za_46", V = "_label_1d1za_50", j = "_labelPlaceholder_1d1za_64", L = "_errorMessage_1d1za_84", s = {
|
|
6
|
+
"select-container": "_select-container_1d1za_1",
|
|
7
7
|
select: F,
|
|
8
8
|
selectError: P,
|
|
9
9
|
label: V,
|
|
@@ -12,49 +12,49 @@ import '../../assets/Select.css';const F = "_select_bickp_1", P = "_selectError_
|
|
|
12
12
|
}, R = M.forwardRef(
|
|
13
13
|
({
|
|
14
14
|
label: l,
|
|
15
|
-
placeholder:
|
|
16
|
-
options:
|
|
15
|
+
placeholder: a,
|
|
16
|
+
options: g,
|
|
17
17
|
value: m,
|
|
18
18
|
defaultValue: o,
|
|
19
|
-
hideAt:
|
|
20
|
-
className:
|
|
19
|
+
hideAt: z,
|
|
20
|
+
className: S,
|
|
21
21
|
error: r,
|
|
22
|
-
onFocus:
|
|
22
|
+
onFocus: d,
|
|
23
23
|
onBlur: n,
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
const [
|
|
27
|
-
return /* @__PURE__ */
|
|
28
|
-
(l || x) && /* @__PURE__ */
|
|
24
|
+
...i
|
|
25
|
+
}, N) => {
|
|
26
|
+
const [p, h] = w(!1), t = m !== void 0, v = t ? String(m ?? "") : void 0, u = !t && o !== void 0 && o !== null ? String(o) : "", _ = !!l && (p || (t ? v !== "" : u !== "")), x = !!a && !_, E = l ? "" : a ?? "";
|
|
27
|
+
return /* @__PURE__ */ f("div", { className: b(s["select-container"], y(z)), children: [
|
|
28
|
+
(l || x) && /* @__PURE__ */ c(
|
|
29
29
|
"label",
|
|
30
30
|
{
|
|
31
|
-
htmlFor:
|
|
31
|
+
htmlFor: i.name,
|
|
32
32
|
className: _ ? s.label : s.labelPlaceholder,
|
|
33
|
-
children: _ ? l :
|
|
33
|
+
children: _ ? l : a ?? l
|
|
34
34
|
}
|
|
35
35
|
),
|
|
36
|
-
/* @__PURE__ */
|
|
36
|
+
/* @__PURE__ */ f(
|
|
37
37
|
"select",
|
|
38
38
|
{
|
|
39
|
-
...
|
|
40
|
-
ref:
|
|
41
|
-
id:
|
|
42
|
-
value:
|
|
43
|
-
defaultValue: t ? void 0 :
|
|
44
|
-
className:
|
|
39
|
+
...i,
|
|
40
|
+
ref: N,
|
|
41
|
+
id: i.name,
|
|
42
|
+
value: v,
|
|
43
|
+
defaultValue: t ? void 0 : u,
|
|
44
|
+
className: b(s.select, r ? s.selectError : void 0, S),
|
|
45
45
|
onFocus: (e) => {
|
|
46
|
-
|
|
46
|
+
h(!0), d == null || d(e);
|
|
47
47
|
},
|
|
48
48
|
onBlur: (e) => {
|
|
49
|
-
|
|
49
|
+
h(!1), n == null || n(e);
|
|
50
50
|
},
|
|
51
51
|
children: [
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
a ? /* @__PURE__ */ c("option", { value: "", disabled: !0, hidden: !!l, children: E }) : null,
|
|
53
|
+
g.map((e) => /* @__PURE__ */ c("option", { value: e.value, children: e.label }, e.value))
|
|
54
54
|
]
|
|
55
55
|
}
|
|
56
56
|
),
|
|
57
|
-
r ? /* @__PURE__ */
|
|
57
|
+
r ? /* @__PURE__ */ c("div", { className: s.errorMessage, children: r }) : null
|
|
58
58
|
] });
|
|
59
59
|
}
|
|
60
60
|
);
|