@caseparts-org/caseblocks 0.0.223 → 0.0.225

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
- ._input-container_1aovq_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._input_1aovq_1{height:32px;border-radius:var(--radius-radius-minimal, 2px);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_1aovq_1{font-size:var(--font-size-md)}}._input_1aovq_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn)}._label_1aovq_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_1aovq_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}
1
+ ._input-container_1p05n_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._input_1p05n_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_1p05n_1{font-size:var(--font-size-md)}}._input_1p05n_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn)}._input_1p05n_1:disabled{border:1px solid var(--border-border-primary, #dfdfdf);background:var(--surface-surface-secondary, #f6f6f6);color:var(--text-text-disabled, #b2b2b2);cursor:not-allowed}._input_1p05n_1:disabled:hover,._input_1p05n_1:disabled:focus{border:1px solid var(--border-border-primary, #dfdfdf);box-shadow:none}._label_1p05n_42{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_1p05n_56{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}._labelDisabled_1p05n_76{color:var(--text-text-disabled, #b2b2b2)}._input_1p05n_1:hover:not(:disabled){border:1px solid var(--border-border-primary-btn, #1380b1);transition:all .2s ease}
@@ -1 +1 @@
1
- ._select-container_bickp_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._select_bickp_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-minimal, 2px);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_bickp_1{font-size:var(--font-size-md)}}._select_bickp_1:hover{border:1px solid var(--border-border-primary-btn, #1380b1)}._select_bickp_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn, #1380b1)}._selectError_bickp_46{border-color:var(--text-text-error-warning, #d40000)}._label_bickp_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_bickp_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_bickp_84{width:100%;margin-top:4px;font-size:var(--font-size-xs, .75rem);color:var(--text-text-error-warning, #d40000)}
1
+ ._select-container_b1ssj_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._select_b1ssj_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_b1ssj_1{font-size:var(--font-size-md)}}._select_b1ssj_1:hover:not(:disabled){border:1px solid var(--border-border-primary-btn, #1380b1)}._select_b1ssj_1:focus:not(:disabled){border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn, #1380b1)}._select_b1ssj_1:disabled{border:1px solid var(--border-border-primary, #dfdfdf);background-color:var(--surface-surface-secondary, #f6f6f6);color:var(--text-text-disabled, #b2b2b2);cursor:not-allowed;background-image:linear-gradient(45deg,transparent 50%,var(--text-text-disabled, #b2b2b2) 50%),linear-gradient(135deg,var(--text-text-disabled, #b2b2b2) 50%,transparent 50%)}._select_b1ssj_1:disabled:hover,._select_b1ssj_1:disabled:focus{border:1px solid var(--border-border-primary, #dfdfdf);box-shadow:none}._selectError_b1ssj_62{border-color:var(--text-text-error-warning, #d40000)}._label_b1ssj_66{position:absolute;align-self:flex-start;left:8px;top:-8px;z-index:1;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_b1ssj_81{position:absolute;align-self:flex-start;box-sizing:border-box;max-width:calc(100% - 24px);z-index:1;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}._labelDisabled_b1ssj_102{color:var(--text-text-disabled, #b2b2b2)}._errorMessage_b1ssj_106{width:100%;margin-top:4px;font-size:var(--font-size-xs, .75rem);color:var(--text-text-error-warning, #d40000)}
@@ -1,34 +1,45 @@
1
- import { jsxs as _, jsx as i } from "react/jsx-runtime";
2
- import f, { useState as h } from "react";
3
- import { c as r } from "../../clsx-OuTLNxxd.js";
4
- import { getHideAtStyles as F } from "../HideAt.js";
5
- import '../../assets/Input.css';const b = "_input_1aovq_1", x = "_label_1aovq_29", q = "_labelPlaceholder_1aovq_43", o = {
6
- "input-container": "_input-container_1aovq_1",
7
- input: b,
8
- label: x,
9
- labelPlaceholder: q
10
- }, y = f.forwardRef(
11
- ({ label: e, placeholder: a, value: t, hideAt: d, className: u, ...l }, m) => {
12
- const [n, s] = h(!1), c = !!e && (n || !!t), p = !!a && !e && !n && !t;
13
- return /* @__PURE__ */ _("div", { className: r(o["input-container"], F(d)), children: [
14
- (e || p) && /* @__PURE__ */ i("label", { htmlFor: l.name, className: c ? o.label : o.labelPlaceholder, children: c ? e : a ?? e }),
15
- /* @__PURE__ */ i(
1
+ import { jsxs as m, jsx as d } from "react/jsx-runtime";
2
+ import f, { useState as F } from "react";
3
+ import { c as t } from "../../clsx-OuTLNxxd.js";
4
+ import { getHideAtStyles as h } from "../HideAt.js";
5
+ import '../../assets/Input.css';const x = "_input_1p05n_1", B = "_label_1p05n_42", D = "_labelPlaceholder_1p05n_56", y = "_labelDisabled_1p05n_76", l = {
6
+ "input-container": "_input-container_1p05n_1",
7
+ input: x,
8
+ label: B,
9
+ labelPlaceholder: D,
10
+ labelDisabled: y
11
+ }, N = f.forwardRef(
12
+ ({ label: e, placeholder: s, value: n, hideAt: r, className: p, ...a }, _) => {
13
+ const [o, i] = F(!1), b = !!a.disabled, c = !!e && (o || !!n), u = !!s && !e && !o && !n;
14
+ return /* @__PURE__ */ m("div", { className: t(l["input-container"], h(r)), children: [
15
+ (e || u) && /* @__PURE__ */ d(
16
+ "label",
17
+ {
18
+ htmlFor: a.name,
19
+ className: t(
20
+ c ? l.label : l.labelPlaceholder,
21
+ b ? l.labelDisabled : void 0
22
+ ),
23
+ children: c ? e : s ?? e
24
+ }
25
+ ),
26
+ /* @__PURE__ */ d(
16
27
  "input",
17
28
  {
18
- value: t,
19
- ref: m,
20
- id: l.name,
29
+ value: n,
30
+ ref: _,
31
+ id: a.name,
21
32
  type: "text",
22
- onFocus: () => s(!0),
23
- onBlur: () => s(!1),
24
- className: r(o.input, u),
25
- ...l
33
+ onFocus: () => i(!0),
34
+ onBlur: () => i(!1),
35
+ className: t(l.input, p),
36
+ ...a
26
37
  }
27
38
  )
28
39
  ] });
29
40
  }
30
41
  );
31
- y.displayName = "Input";
42
+ N.displayName = "Input";
32
43
  export {
33
- y as Input
44
+ N as Input
34
45
  };
@@ -1,64 +1,68 @@
1
- import { jsxs as u, jsx as a } from "react/jsx-runtime";
2
- import M, { useState as w } from "react";
3
- import { c as p } from "../../clsx-OuTLNxxd.js";
1
+ import { jsxs as f, jsx as o } from "react/jsx-runtime";
2
+ import p, { useState as w } from "react";
3
+ import { c as _ } from "../../clsx-OuTLNxxd.js";
4
4
  import { getHideAtStyles as y } from "../HideAt.js";
5
- import '../../assets/Select.css';const F = "_select_bickp_1", P = "_selectError_bickp_46", V = "_label_bickp_50", j = "_labelPlaceholder_bickp_64", L = "_errorMessage_bickp_84", s = {
6
- "select-container": "_select-container_bickp_1",
5
+ import '../../assets/Select.css';const F = "_select_b1ssj_1", V = "_selectError_b1ssj_62", L = "_label_b1ssj_66", P = "_labelPlaceholder_b1ssj_81", R = "_labelDisabled_b1ssj_102", A = "_errorMessage_b1ssj_106", l = {
6
+ "select-container": "_select-container_b1ssj_1",
7
7
  select: F,
8
- selectError: P,
9
- label: V,
10
- labelPlaceholder: j,
11
- errorMessage: L
12
- }, R = M.forwardRef(
8
+ selectError: V,
9
+ label: L,
10
+ labelPlaceholder: P,
11
+ labelDisabled: R,
12
+ errorMessage: A
13
+ }, B = p.forwardRef(
13
14
  ({
14
- label: l,
15
- placeholder: c,
16
- options: f,
15
+ label: s,
16
+ placeholder: a,
17
+ options: j,
17
18
  value: m,
18
- defaultValue: o,
19
+ defaultValue: r,
19
20
  hideAt: g,
20
- className: k,
21
- error: r,
22
- onFocus: i,
21
+ className: D,
22
+ error: i,
23
+ onFocus: d,
23
24
  onBlur: n,
24
- ...d
25
+ ...t
25
26
  }, S) => {
26
- const [N, b] = w(!1), t = m !== void 0, h = t ? String(m ?? "") : void 0, v = !t && o !== void 0 && o !== null ? String(o) : "", _ = !!l && (N || (t ? h !== "" : v !== "")), x = !!c && !_, E = l ? "" : c ?? "";
27
- return /* @__PURE__ */ u("div", { className: p(s["select-container"], y(g)), children: [
28
- (l || x) && /* @__PURE__ */ a(
27
+ const [N, v] = w(!1), x = !!t.disabled, c = m !== void 0, h = c ? String(m ?? "") : void 0, u = !c && r !== void 0 && r !== null ? String(r) : "", b = !!s && (N || (c ? h !== "" : u !== "")), E = !!a && !b, M = s ? "" : a ?? "";
28
+ return /* @__PURE__ */ f("div", { className: _(l["select-container"], y(g)), children: [
29
+ (s || E) && /* @__PURE__ */ o(
29
30
  "label",
30
31
  {
31
- htmlFor: d.name,
32
- className: _ ? s.label : s.labelPlaceholder,
33
- children: _ ? l : c ?? l
32
+ htmlFor: t.name,
33
+ className: _(
34
+ b ? l.label : l.labelPlaceholder,
35
+ x ? l.labelDisabled : void 0
36
+ ),
37
+ children: b ? s : a ?? s
34
38
  }
35
39
  ),
36
- /* @__PURE__ */ u(
40
+ /* @__PURE__ */ f(
37
41
  "select",
38
42
  {
39
- ...d,
43
+ ...t,
40
44
  ref: S,
41
- id: d.name,
45
+ id: t.name,
42
46
  value: h,
43
- defaultValue: t ? void 0 : v,
44
- className: p(s.select, r ? s.selectError : void 0, k),
47
+ defaultValue: c ? void 0 : u,
48
+ className: _(l.select, i ? l.selectError : void 0, D),
45
49
  onFocus: (e) => {
46
- b(!0), i == null || i(e);
50
+ v(!0), d == null || d(e);
47
51
  },
48
52
  onBlur: (e) => {
49
- b(!1), n == null || n(e);
53
+ v(!1), n == null || n(e);
50
54
  },
51
55
  children: [
52
- c ? /* @__PURE__ */ a("option", { value: "", disabled: !0, hidden: !!l, children: E }) : null,
53
- f.map((e) => /* @__PURE__ */ a("option", { value: e.value, children: e.label }, e.value))
56
+ a ? /* @__PURE__ */ o("option", { value: "", disabled: !0, hidden: !!s, children: M }) : null,
57
+ j.map((e) => /* @__PURE__ */ o("option", { value: e.value, children: e.label }, e.value))
54
58
  ]
55
59
  }
56
60
  ),
57
- r ? /* @__PURE__ */ a("div", { className: s.errorMessage, children: r }) : null
61
+ i ? /* @__PURE__ */ o("div", { className: l.errorMessage, children: i }) : null
58
62
  ] });
59
63
  }
60
64
  );
61
- R.displayName = "Select";
65
+ B.displayName = "Select";
62
66
  export {
63
- R as Select
67
+ B as Select
64
68
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.223",
4
+ "version": "0.0.225",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",