@caseparts-org/caseblocks 0.0.224 → 0.0.226

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_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}
1
+ ._input-container_wjc1i_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._input_wjc1i_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_wjc1i_1{font-size:var(--font-size-md)}}._search_wjc1i_24{border-radius:40px}._hasEndAdornment_wjc1i_28{padding-right:40px}._endAdornment_wjc1i_32{position:absolute;right:8px;top:50%;display:flex;transform:translateY(-50%)}._input_wjc1i_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn)}._input_wjc1i_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_wjc1i_1:disabled:hover,._input_wjc1i_1:disabled:focus{border:1px solid var(--border-border-primary, #dfdfdf);box-shadow:none}._label_wjc1i_58{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_wjc1i_72{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_wjc1i_92{color:var(--text-text-disabled, #b2b2b2)}._input_wjc1i_1:hover:not(:disabled){border:1px solid var(--border-border-primary-btn, #1380b1);transition:all .2s ease}
@@ -1 +1 @@
1
- ._button_11jol_1{box-sizing:border-box;cursor:pointer;width:var(--spacing-2-5);height:var(--spacing-2-5);padding:var(--spacing-0-5);border-width:0;border-radius:0px var(--spacing-0-125) var(--spacing-0-125) 0px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:inherit;color:var(--icons-icon-search)}._text_11jol_16{flex:1;position:relative;border:none;border-radius:40px;outline:none;font-family:var(--font-family-body);font-size:var(--font-size-sm);line-height:var(--line-height-sm);background:var(--surface-surface-searchBar, #f6f6f6);padding:0px var(--spacing-0-5) 0px var(--spacing-0-5)}._text_11jol_16::placeholder{font-style:italic;font-weight:var(--font-weight-light);color:var(--text-text-search-bar)}._input_11jol_33{flex:1;padding:0px 0px 0px var(--spacing-0-5);box-sizing:border-box}._inputSearch_11jol_38{flex:1;border-radius:var(--spacing-0-125)}._searchfield_11jol_42{flex:1;height:var(--spacing-2-5);border-radius:var(--spacing-2-5);overflow:hidden;background-color:var(--surface-surface-search-bar)}._searchBox_11jol_49{flex:1;width:100%;min-width:250px;height:var(--spacing-2-5);position:relative;border-radius:var(--spacing-2-5);overflow:hidden;text-align:left;background-color:var(--surface-surface-search-bar)}
1
+ ._inputContainer_ptqd0_1{position:relative;width:100%}._button_ptqd0_10{background-color:transparent;border:none;padding:0;margin:0;position:absolute;right:8px;top:4px}
@@ -1 +1 @@
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
+ ._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)}
@@ -0,0 +1 @@
1
+ ._suggestionDropdown_1y1jy_1{display:flex;flex-direction:row;width:100%;border:1px solid;border-color:var(--color-neutrals-neutral-2);border-radius:var(--border-radius-sm);box-shadow:0 8px 24px #0f172a14;overflow:hidden}@media (max-width: 767px){._suggestionDropdown_1y1jy_1{flex-direction:column}}._leftColumn_1y1jy_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background:var(--color-brand-primary-primary-pale-gray);min-width:150px}@media (max-width: 767px){._leftColumn_1y1jy_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._rightColumn_1y1jy_55{display:flex;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-white);min-width:250px}._categorySection_1y1jy_75{border-top:1px solid var(--border-border-primary)}._suggestions_1y1jy_81,._categories_1y1jy_83{display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);padding:var(--spacing-spacing-default)}._itemList_1y1jy_97{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_1y1jy_97{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%}._item_1y1jy_97 img{height:60px;width:60px}._item_1y1jy_97 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_1y1jy_155{display:grid;gap:var(--spacing-spacing-4xs)}
@@ -3,5 +3,7 @@ import { HideAtProps } from '../HideAt';
3
3
  export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "placeholder">, HideAtProps {
4
4
  label: string | null;
5
5
  placeholder?: string;
6
+ variant?: "default" | "search";
7
+ endAdornment?: React.ReactNode;
6
8
  }
7
9
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,34 +1,49 @@
1
- import { jsxs as _, jsx as i } from "react/jsx-runtime";
2
- import h, { useState as f } 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_t7pkh_1", x = "_label_t7pkh_29", k = "_labelPlaceholder_t7pkh_43", t = {
6
- "input-container": "_input-container_t7pkh_1",
7
- input: b,
8
- label: x,
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
- /* @__PURE__ */ i(
1
+ import { jsxs as w, jsx as t } from "react/jsx-runtime";
2
+ import f, { useState as j } from "react";
3
+ import { c as o } from "../../clsx-OuTLNxxd.js";
4
+ import { getHideAtStyles as A } from "../HideAt.js";
5
+ import '../../assets/Input.css';const F = "_input_wjc1i_1", x = "_search_wjc1i_24", B = "_hasEndAdornment_wjc1i_28", D = "_endAdornment_wjc1i_32", N = "_label_wjc1i_58", y = "_labelPlaceholder_wjc1i_72", E = "_labelDisabled_wjc1i_92", e = {
6
+ "input-container": "_input-container_wjc1i_1",
7
+ input: F,
8
+ search: x,
9
+ hasEndAdornment: B,
10
+ endAdornment: D,
11
+ label: N,
12
+ labelPlaceholder: y,
13
+ labelDisabled: E
14
+ }, I = f.forwardRef(
15
+ ({ label: n, placeholder: c, value: a, hideAt: _, className: m, variant: u = "default", endAdornment: s, ...l }, b) => {
16
+ const [i, d] = j(!1), h = !!l.disabled, r = !!n && (i || !!a), p = !!c && !n && !i && !a;
17
+ return /* @__PURE__ */ w("div", { className: o(e["input-container"], A(_)), children: [
18
+ (n || p) && /* @__PURE__ */ t(
19
+ "label",
20
+ {
21
+ htmlFor: l.name,
22
+ className: o(
23
+ r ? e.label : e.labelPlaceholder,
24
+ h ? e.labelDisabled : void 0
25
+ ),
26
+ children: r ? n : c ?? n
27
+ }
28
+ ),
29
+ /* @__PURE__ */ t(
16
30
  "input",
17
31
  {
18
- value: l,
19
- ref: u,
20
- id: o.name,
32
+ value: a,
33
+ ref: b,
34
+ id: l.name,
21
35
  type: "text",
22
- onFocus: () => s(!0),
23
- onBlur: () => s(!1),
24
- className: r(t.input, d),
25
- ...o
36
+ onFocus: () => d(!0),
37
+ onBlur: () => d(!1),
38
+ className: o(e.input, e[u], s && e.hasEndAdornment, m),
39
+ ...l
26
40
  }
27
- )
41
+ ),
42
+ s && /* @__PURE__ */ t("span", { className: e.endAdornment, children: s })
28
43
  ] });
29
44
  }
30
45
  );
31
- y.displayName = "Input";
46
+ I.displayName = "Input";
32
47
  export {
33
- y as Input
48
+ I as Input
34
49
  };
@@ -1,64 +1,68 @@
1
- import { jsxs as f, jsx as c } from "react/jsx-runtime";
2
- import M, { useState as w } from "react";
3
- import { c as b } 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_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",
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
+ label: s,
15
16
  placeholder: a,
16
- options: g,
17
+ options: j,
17
18
  value: m,
18
- defaultValue: o,
19
- hideAt: z,
20
- className: S,
21
- error: r,
19
+ defaultValue: r,
20
+ hideAt: g,
21
+ className: D,
22
+ error: i,
22
23
  onFocus: d,
23
24
  onBlur: n,
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(
25
+ ...t
26
+ }, S) => {
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: i.name,
32
- className: _ ? s.label : s.labelPlaceholder,
33
- children: _ ? l : a ?? 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
40
  /* @__PURE__ */ f(
37
41
  "select",
38
42
  {
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),
43
+ ...t,
44
+ ref: S,
45
+ id: t.name,
46
+ value: h,
47
+ defaultValue: c ? void 0 : u,
48
+ className: _(l.select, i ? l.selectError : void 0, D),
45
49
  onFocus: (e) => {
46
- h(!0), d == null || d(e);
50
+ v(!0), d == null || d(e);
47
51
  },
48
52
  onBlur: (e) => {
49
- h(!1), n == null || n(e);
53
+ v(!1), n == null || n(e);
50
54
  },
51
55
  children: [
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))
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__ */ c("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
  };
@@ -1,65 +1,36 @@
1
- import { jsx as e, jsxs as m } from "react/jsx-runtime";
2
- import { c as h } from "../../clsx-OuTLNxxd.js";
3
- import { Flex as c } from "../../atoms/Flex/Flex.js";
4
- import { getHideAtStyles as u } from "../../atoms/HideAt.js";
5
- import { Icon as f } from "../../atoms/Icon/Icon.js";
6
- import '../../assets/SearchBox.css';const p = "_button_11jol_1", x = "_text_11jol_16", _ = "_input_11jol_33", d = "_inputSearch_11jol_38", g = "_searchfield_11jol_42", b = "_searchBox_11jol_49", t = {
7
- button: p,
8
- text: x,
9
- input: _,
10
- inputSearch: d,
11
- searchfield: g,
12
- searchBox: b
1
+ import { jsxs as r, jsx as t } from "react/jsx-runtime";
2
+ import { Icon as i } from "../../atoms/Icon/Icon.js";
3
+ import { Input as s } from "../../atoms/Input/Input.js";
4
+ import { c as p } from "../../clsx-OuTLNxxd.js";
5
+ import '../../assets/SearchBox.css';const c = "_inputContainer_ptqd0_1", u = "_input_ptqd0_1", m = "_button_ptqd0_10", n = {
6
+ inputContainer: c,
7
+ input: u,
8
+ button: m
13
9
  };
14
- function N({
15
- onSearch: o,
16
- inputName: n,
17
- hideAt: s,
18
- className: a,
19
- ...i
10
+ function y({
11
+ onSearch: l,
12
+ inputName: o,
13
+ hideAt: f,
14
+ className: e,
15
+ ...a
20
16
  }) {
21
- return /* @__PURE__ */ e(
22
- c,
23
- {
24
- flexDirection: "row",
25
- alignItems: "center",
26
- className: h(t.searchBox, u(s), a),
27
- ...i,
28
- children: /* @__PURE__ */ e(
29
- c,
30
- {
31
- flexDirection: "row",
32
- alignItems: "center",
33
- className: t.searchfield,
34
- children: /* @__PURE__ */ e("div", { className: t.inputSearch, children: /* @__PURE__ */ e("form", { onSubmit: (r) => {
35
- r.preventDefault();
36
- const l = (new FormData(r.currentTarget).get(n ?? "search") || "").trim();
37
- o(l), r.currentTarget.reset();
38
- }, children: /* @__PURE__ */ m(
39
- c,
40
- {
41
- className: t.input,
42
- flexDirection: "row",
43
- alignItems: "center",
44
- children: [
45
- /* @__PURE__ */ e("button", { className: t.button, type: "submit", children: /* @__PURE__ */ e(f, { iconKey: "fa-regular fa-magnifying-glass", size: "md" }) }),
46
- /* @__PURE__ */ e(
47
- "input",
48
- {
49
- type: "text",
50
- className: t.text,
51
- placeholder: "Search by keyword(s) or Part #....",
52
- name: n ?? "search"
53
- }
54
- )
55
- ]
56
- }
57
- ) }) })
58
- }
59
- )
60
- }
61
- );
17
+ return /* @__PURE__ */ r("div", { className: n.inputContainer, children: [
18
+ /* @__PURE__ */ t(
19
+ s,
20
+ {
21
+ type: "text",
22
+ className: p(n.input, e),
23
+ autoComplete: "off",
24
+ label: "Search",
25
+ placeholder: "Search by keyword(s) or Part #....",
26
+ name: o ?? "search",
27
+ "aria-autocomplete": "list",
28
+ ...a
29
+ }
30
+ ),
31
+ /* @__PURE__ */ t("button", { className: n.button, type: "submit", children: /* @__PURE__ */ t(i, { iconKey: "fa-regular fa-magnifying-glass", size: "sm" }) })
32
+ ] });
62
33
  }
63
34
  export {
64
- N as SearchBox
35
+ y as SearchBox
65
36
  };
@@ -0,0 +1,18 @@
1
+ export type SuggestedCategory = {
2
+ name: string;
3
+ url: string;
4
+ };
5
+ export type SuggestedItem = {
6
+ itemKey: number;
7
+ itemId: string;
8
+ description: string;
9
+ image: string;
10
+ url: string;
11
+ };
12
+ export interface SuggestionDropdownProps {
13
+ terms: string[];
14
+ categories: SuggestedCategory[];
15
+ items: SuggestedItem[];
16
+ className?: string;
17
+ }
18
+ export declare function SuggestionDropdown({ terms: suggestions, categories, items: recommendedItems, className }: SuggestionDropdownProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,51 @@
1
+ import { jsxs as o, jsx as s } from "react/jsx-runtime";
2
+ import { Text as t } from "../../atoms/Text/Text.js";
3
+ import { Link as n } from "../../atoms/Link/Link.js";
4
+ import { c as m } from "../../clsx-OuTLNxxd.js";
5
+ import { Image as g } from "../../atoms/Image/Image.js";
6
+ import '../../assets/SuggestionDropdown.css';const d = "_suggestionDropdown_1y1jy_1", h = "_leftColumn_1y1jy_31", u = "_rightColumn_1y1jy_55", _ = "_categorySection_1y1jy_75", y = "_suggestions_1y1jy_81", p = "_categories_1y1jy_83", f = "_itemList_1y1jy_97", j = "_item_1y1jy_97", N = "_itemInfo_1y1jy_155", e = {
7
+ suggestionDropdown: d,
8
+ leftColumn: h,
9
+ rightColumn: u,
10
+ categorySection: _,
11
+ suggestions: y,
12
+ categories: p,
13
+ itemList: f,
14
+ item: j,
15
+ itemInfo: N
16
+ };
17
+ function z({
18
+ terms: r,
19
+ categories: c,
20
+ items: l,
21
+ className: a
22
+ }) {
23
+ return /* @__PURE__ */ o("div", { className: m(e.suggestionDropdown, a), children: [
24
+ /* @__PURE__ */ o("div", { className: e.leftColumn, children: [
25
+ /* @__PURE__ */ s("div", { className: e.suggestionSection, children: /* @__PURE__ */ o("div", { className: e.suggestions, children: [
26
+ /* @__PURE__ */ s(t, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
27
+ r.map(
28
+ (i) => /* @__PURE__ */ s(t, { size: "sm", children: i }, i)
29
+ )
30
+ ] }) }),
31
+ /* @__PURE__ */ s("div", { className: e.categorySection, children: /* @__PURE__ */ o("div", { className: e.categories, children: [
32
+ /* @__PURE__ */ s(t, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
33
+ c.map(
34
+ (i) => /* @__PURE__ */ s(t, { size: "sm", children: /* @__PURE__ */ s(n, { href: i.url, children: i.name }, i.url) }, i.name)
35
+ )
36
+ ] }) })
37
+ ] }),
38
+ /* @__PURE__ */ s("div", { className: e.rightColumn, children: /* @__PURE__ */ s("ol", { className: e.itemList, children: l.map(
39
+ (i) => /* @__PURE__ */ s("li", { className: e.item, children: /* @__PURE__ */ o(n, { href: i.url, children: [
40
+ /* @__PURE__ */ s(g, { src: i.image, alt: `${i.description} product image`, height: 72, width: 72 }),
41
+ /* @__PURE__ */ o("div", { className: e.itemInfo, children: [
42
+ /* @__PURE__ */ s(t, { size: "sm", children: i.description }),
43
+ /* @__PURE__ */ s(t, { size: "sm", colorToken: "quaternary", children: i.itemId })
44
+ ] })
45
+ ] }) }, i.itemId)
46
+ ) }) })
47
+ ] });
48
+ }
49
+ export {
50
+ z as SuggestionDropdown
51
+ };
@@ -0,0 +1,13 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { SuggestionDropdown } from './SuggestionDropdown';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof SuggestionDropdown;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const Default: Story;
@@ -0,0 +1,45 @@
1
+ import { SuggestionDropdown as e } from "./SuggestionDropdown.js";
2
+ const s = {
3
+ title: "Case Parts/Organisms/SuggestionDropdown",
4
+ component: e,
5
+ parameters: {
6
+ layout: "centered"
7
+ },
8
+ tags: ["autodocs"]
9
+ }, r = {
10
+ args: {
11
+ terms: ["thermostat", "sensor", "cover", "wiring"],
12
+ categories: [
13
+ { name: "Heating", url: "/categories/heating" },
14
+ { name: "Accessories", url: "/categories/accessories" },
15
+ { name: "Controls", url: "/categories/controls" }
16
+ ],
17
+ items: [
18
+ {
19
+ itemKey: 1,
20
+ itemId: "P-1001",
21
+ description: "Smart Thermostat",
22
+ image: "https://placehold.co/120x80/png?text=Thermostat",
23
+ url: "/parts/p-1001"
24
+ },
25
+ {
26
+ itemKey: 2,
27
+ itemId: "P-1002",
28
+ description: "Wire Harness",
29
+ image: "https://placehold.co/120x80/png?text=Harness",
30
+ url: "/parts/p-1002"
31
+ },
32
+ {
33
+ itemKey: 3,
34
+ itemId: "P-1003",
35
+ description: "Replacement Cover",
36
+ image: "https://placehold.co/120x80/png?text=Cover",
37
+ url: "/parts/p-1003"
38
+ }
39
+ ]
40
+ }
41
+ };
42
+ export {
43
+ r as Default,
44
+ s as default
45
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.224",
4
+ "version": "0.0.226",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",