@caseparts-org/caseblocks 0.0.242 → 0.0.244

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
- ._suggestionDropdown_1un69_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_1un69_1{flex-direction:column}}._leftColumn_1un69_31{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background-color:#fff;min-width:150px}@media (max-width: 767px){._leftColumn_1un69_31{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_1un69_55{flex:1}._suggestionSectionFullHeight_1un69_63{display:flex;flex:1}._rightColumn_1un69_73{display:flex;flex:1;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-primary-pale-gray);min-width:250px}._categorySection_1un69_95{border-top:1px solid var(--border-border-primary)}._suggestions_1un69_101,._categories_1un69_103{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_1un69_117{flex:1}._customPartLink_1un69_125{display:flex;align-items:center;gap:var(--spacing-spacing-4xs);box-sizing:border-box;width:100%;padding:var(--spacing-spacing-4xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestions_1un69_101>:first-child,._categories_1un69_103>:first-child{padding-top:var(--spacing-spacing-default);padding-right:var(--spacing-spacing-default);padding-left:var(--spacing-spacing-default);padding-bottom:var(--spacing-spacing-2xs)}._suggestions_1un69_101>:last-child,._categories_1un69_103>:last-child{padding-bottom:var(--spacing-spacing-2xs)}._suggestionLink_1un69_169,._categoryLink_1un69_171{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestionLink_1un69_169:hover,._categoryLink_1un69_171:hover,._customPartLink_1un69_125:hover{text-decoration:none;background-color:var(--color-alerts-light-teal-blue)}._activeOption_1un69_207{background:var(--color-alerts-light-teal-blue)}._itemList_1un69_215{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_1un69_215{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%;background-color:#fff;transition:background-color .3s ease-in}._item_1un69_215:hover{background-color:var(--color-alerts-light-teal-blue)}._item_1un69_215>a:hover{text-decoration:none}._activeItem_1un69_269{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_1un69_215 img{height:60px;width:60px}._item_1un69_215 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_1un69_303{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_1un69_313{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_1un69_327{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_1un69_335{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_1un69_313{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_1un69_365{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_1un69_381{display:flex;flex:0 0 auto;align-items:center;justify-content:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);border:0;background:transparent;color:var(--text-text-primary);cursor:pointer}
1
+ ._suggestionDropdown_11emu_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_11emu_1{flex-direction:column}}._leftColumn_11emu_29{display:flex;flex-direction:column;border-right:1px solid var(--border-border-primary);background-color:#fff;min-width:150px;max-width:220px}@media (max-width: 767px){._leftColumn_11emu_29{border-right:0;border-bottom:1px solid var(--border-border-primary)}}._leftColumnFullWidth_11emu_55{flex:1}._suggestionSectionFullHeight_11emu_63{display:flex;flex:1}._rightColumn_11emu_73{display:flex;flex:1;flex-direction:column;gap:var(--spacing-spacing-1xs);padding:var(--spacing-spacing-default);background:var(--color-brand-primary-primary-pale-gray);min-width:250px}._categorySection_11emu_93{border-top:1px solid var(--border-border-primary)}._suggestions_11emu_99,._categories_11emu_101{display:flex;flex-direction:column;gap:0;padding:0}._suggestionsFullHeight_11emu_115{flex:1}._customPartLink_11emu_123{display:flex;align-items:center;gap:var(--spacing-spacing-4xs);box-sizing:border-box;width:100%;padding:var(--spacing-spacing-4xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestions_11emu_99>:first-child,._categories_11emu_101>:first-child{padding-top:var(--spacing-spacing-default);padding-right:var(--spacing-spacing-default);padding-left:var(--spacing-spacing-default);padding-bottom:var(--spacing-spacing-2xs)}._suggestions_11emu_99>:last-child,._categories_11emu_101>:last-child{margin-bottom:var(--spacing-spacing-2xs)}._suggestionLink_11emu_167,._categoryLink_11emu_169{display:block;box-sizing:border-box;width:100%;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);transition:background-color .3s ease-in}._suggestionLink_11emu_167:hover,._categoryLink_11emu_169:hover,._customPartLink_11emu_123:hover{text-decoration:none;background-color:var(--color-alerts-light-teal-blue)}._activeOption_11emu_205{background:var(--color-alerts-light-teal-blue)}._itemList_11emu_213{margin:0;padding:0;display:flex;flex-direction:column;gap:var(--spacing-spacing-2xs);width:100%}._item_11emu_213{display:flex;flex-direction:column;border:1px solid var(--border-border-primary);padding:var(--spacing-spacing-2xs);width:100%;background-color:#fff;transition:background-color .3s ease-in}._item_11emu_213:hover{background-color:var(--color-alerts-light-teal-blue)}._item_11emu_213>a:hover{text-decoration:none}._activeItem_11emu_267{border-color:var(--text-text-links);box-shadow:inset 0 0 0 1px var(--text-text-links)}._item_11emu_213 img{height:60px;width:60px;object-fit:contain}._item_11emu_213 a{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._itemInfo_11emu_303{display:grid;gap:var(--spacing-spacing-4xs)}._recentSearches_11emu_313{display:flex;flex-direction:column;background:var(--color-brand-primary-white);min-width:250px}._recentSearchesHeader_11emu_327{padding:var(--spacing-spacing-default) var(--spacing-spacing-default) var(--spacing-spacing-2xs)}._recentSearchesList_11emu_335{display:flex;flex-direction:column;gap:0;margin:0;padding:0}._recentSearch_11emu_313{display:flex;align-items:center;justify-content:space-between;gap:var(--spacing-spacing-2xs)}._recentSearchLink_11emu_365{display:flex;flex:1;min-width:0;align-items:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default)}._clearRecentSearch_11emu_381{display:flex;flex:0 0 auto;align-items:center;justify-content:center;padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);border:0;background:transparent;color:var(--text-text-primary);cursor:pointer}
@@ -1,10 +1,10 @@
1
- import { jsxs as a, jsx as l } from "react/jsx-runtime";
1
+ import { jsxs as a, jsx as t } from "react/jsx-runtime";
2
2
  import { Text as h } from "../../atoms/Text/Text.js";
3
- import { Link as m } from "../../atoms/Link/Link.js";
3
+ import { Link as d } from "../../atoms/Link/Link.js";
4
4
  import { Icon as y } from "../../atoms/Icon/Icon.js";
5
5
  import { c as o } from "../../clsx-OuTLNxxd.js";
6
6
  import { Image as z } from "../../atoms/Image/Image.js";
7
- import '../../assets/SuggestionDropdown.css';const F = "_suggestionDropdown_1un69_1", H = "_leftColumn_1un69_31", $ = "_leftColumnFullWidth_1un69_55", D = "_suggestionSectionFullHeight_1un69_63", w = "_rightColumn_1un69_73", b = "_categorySection_1un69_95", T = "_suggestions_1un69_101", k = "_categories_1un69_103", q = "_suggestionsFullHeight_1un69_117", W = "_customPartLink_1un69_125", j = "_suggestionLink_1un69_169", K = "_categoryLink_1un69_171", M = "_activeOption_1un69_207", O = "_itemList_1un69_215", R = "_item_1un69_215", x = "_activeItem_1un69_269", A = "_itemInfo_1un69_303", B = "_recentSearches_1un69_313", E = "_recentSearchesHeader_1un69_327", G = "_recentSearchesList_1un69_335", J = "_recentSearch_1un69_313", Q = "_recentSearchLink_1un69_365", U = "_clearRecentSearch_1un69_381", n = {
7
+ import '../../assets/SuggestionDropdown.css';const F = "_suggestionDropdown_11emu_1", H = "_leftColumn_11emu_29", $ = "_leftColumnFullWidth_11emu_55", D = "_suggestionSectionFullHeight_11emu_63", w = "_rightColumn_11emu_73", b = "_categorySection_11emu_93", T = "_suggestions_11emu_99", k = "_categories_11emu_101", q = "_suggestionsFullHeight_11emu_115", W = "_customPartLink_11emu_123", j = "_suggestionLink_11emu_167", K = "_categoryLink_11emu_169", M = "_activeOption_11emu_205", O = "_itemList_11emu_213", R = "_item_11emu_213", x = "_activeItem_11emu_267", A = "_itemInfo_11emu_303", B = "_recentSearches_11emu_313", E = "_recentSearchesHeader_11emu_327", G = "_recentSearchesList_11emu_335", J = "_recentSearch_11emu_313", Q = "_recentSearchLink_11emu_365", U = "_clearRecentSearch_11emu_381", l = {
8
8
  suggestionDropdown: F,
9
9
  leftColumn: H,
10
10
  leftColumnFullWidth: $,
@@ -33,104 +33,104 @@ function I({
33
33
  terms: i,
34
34
  categories: r,
35
35
  items: g,
36
- customParts: _ = [],
36
+ customParts: m = [],
37
37
  view: v = "suggestions",
38
- recentSearches: d = [],
38
+ recentSearches: u = [],
39
39
  onClearRecentSearch: f,
40
- onSuggestionClick: t,
40
+ onSuggestionClick: n,
41
41
  activeOptionIndex: c = -1,
42
- optionIdPrefix: u,
42
+ optionIdPrefix: _,
43
43
  onKeyDown: p,
44
44
  className: N
45
45
  }) {
46
- return i.length === 0 && r.length === 0 && g.length === 0 && _.length === 0 && d.length === 0 ? null : v === "recent-searches" ? /* @__PURE__ */ a(
46
+ return i.length === 0 && r.length === 0 && g.length === 0 && m.length === 0 && u.length === 0 ? null : v === "recent-searches" ? /* @__PURE__ */ a(
47
47
  "div",
48
48
  {
49
- id: u,
49
+ id: _,
50
50
  role: "listbox",
51
- className: o(n.suggestionDropdown, n.recentSearches, N),
51
+ className: o(l.suggestionDropdown, l.recentSearches, N),
52
52
  onKeyDown: p,
53
53
  onMouseDown: (e) => e.preventDefault(),
54
54
  children: [
55
- /* @__PURE__ */ l("div", { className: n.recentSearchesHeader, children: /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
56
- /* @__PURE__ */ l("ol", { className: n.recentSearchesList, children: d.map((e) => /* @__PURE__ */ a("li", { className: n.recentSearch, children: [
57
- /* @__PURE__ */ l(
58
- m,
55
+ /* @__PURE__ */ t("div", { className: l.recentSearchesHeader, children: /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
56
+ /* @__PURE__ */ t("ol", { className: l.recentSearchesList, children: u.map((e) => /* @__PURE__ */ a("li", { className: l.recentSearch, children: [
57
+ /* @__PURE__ */ t(
58
+ d,
59
59
  {
60
60
  href: e.url,
61
- id: `${u}-${d.indexOf(e)}`,
61
+ id: `${_}-${u.indexOf(e)}`,
62
62
  role: "option",
63
- "aria-selected": c === d.indexOf(e),
64
- className: o(n.recentSearchLink, { [n.activeOption]: c === d.indexOf(e) }),
65
- onClick: () => t == null ? void 0 : t(e),
66
- children: /* @__PURE__ */ l(h, { size: "sm", children: e.term })
63
+ "aria-selected": c === u.indexOf(e),
64
+ className: o(l.recentSearchLink, { [l.activeOption]: c === u.indexOf(e) }),
65
+ onClick: () => n == null ? void 0 : n(e),
66
+ children: /* @__PURE__ */ t(h, { size: "sm", children: e.term })
67
67
  }
68
68
  ),
69
- /* @__PURE__ */ l(
69
+ /* @__PURE__ */ t(
70
70
  "button",
71
71
  {
72
72
  type: "button",
73
- className: n.clearRecentSearch,
73
+ className: l.clearRecentSearch,
74
74
  "aria-label": `Clear recent search: ${e.term}`,
75
75
  onClick: () => f == null ? void 0 : f(e),
76
- children: /* @__PURE__ */ l(y, { iconKey: "fa-regular fa-xmark", size: "sm" })
76
+ children: /* @__PURE__ */ t(y, { iconKey: "fa-regular fa-xmark", size: "sm" })
77
77
  }
78
78
  )
79
79
  ] }, e.url)) })
80
80
  ]
81
81
  }
82
- ) : /* @__PURE__ */ a("div", { id: u, role: "listbox", className: o(n.suggestionDropdown, N), onKeyDown: p, onMouseDown: (e) => e.preventDefault(), children: [
83
- (i.length > 0 || r.length > 0 || _.length > 0) && /* @__PURE__ */ a("div", { className: o(n.leftColumn, { [n.leftColumnFullWidth]: g.length === 0 }), children: [
84
- i.length > 0 && /* @__PURE__ */ l("div", { className: o(n.suggestionSection, { [n.suggestionSectionFullHeight]: r.length === 0 }), children: /* @__PURE__ */ a("div", { className: o(n.suggestions, { [n.suggestionsFullHeight]: r.length === 0 }), children: [
85
- /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
82
+ ) : /* @__PURE__ */ a("div", { id: _, role: "listbox", className: o(l.suggestionDropdown, N), onKeyDown: p, onMouseDown: (e) => e.preventDefault(), children: [
83
+ (i.length > 0 || r.length > 0 || m.length > 0) && /* @__PURE__ */ a("div", { className: o(l.leftColumn, { [l.leftColumnFullWidth]: g.length === 0 }), children: [
84
+ i.length > 0 && /* @__PURE__ */ t("div", { className: o(l.suggestionSection, { [l.suggestionSectionFullHeight]: r.length === 0 }), children: /* @__PURE__ */ a("div", { className: o(l.suggestions, { [l.suggestionsFullHeight]: r.length === 0 }), children: [
85
+ /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
86
86
  i.map(
87
- (e, s) => /* @__PURE__ */ l(h, { size: "sm", children: /* @__PURE__ */ l(
88
- m,
87
+ (e, s) => /* @__PURE__ */ t(h, { size: "sm", children: /* @__PURE__ */ t(
88
+ d,
89
89
  {
90
90
  href: e.url,
91
- id: `${u}-${s}`,
91
+ id: `${_}-${s}`,
92
92
  role: "option",
93
93
  "aria-selected": c === s,
94
- className: o(n.suggestionLink, { [n.activeOption]: c === s }),
95
- onClick: () => t == null ? void 0 : t(e),
94
+ className: o(l.suggestionLink, { [l.activeOption]: c === s }),
95
+ onClick: () => n == null ? void 0 : n(e),
96
96
  children: e.name
97
97
  }
98
98
  ) }, e.url)
99
99
  )
100
100
  ] }) }),
101
- r.length > 0 && /* @__PURE__ */ l("div", { className: n.categorySection, children: /* @__PURE__ */ a("div", { className: n.categories, children: [
102
- /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
101
+ r.length > 0 && /* @__PURE__ */ t("div", { className: l.categorySection, children: /* @__PURE__ */ a("div", { className: l.categories, children: [
102
+ /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
103
103
  r.map(
104
- (e, s) => /* @__PURE__ */ l(h, { size: "sm", children: /* @__PURE__ */ l(
105
- m,
104
+ (e, s) => /* @__PURE__ */ t(h, { size: "sm", children: /* @__PURE__ */ t(
105
+ d,
106
106
  {
107
107
  href: e.url,
108
- id: `${u}-${i.length + s}`,
108
+ id: `${_}-${i.length + s}`,
109
109
  role: "option",
110
110
  "aria-selected": c === i.length + s,
111
- className: o(n.categoryLink, { [n.activeOption]: c === i.length + s }),
112
- onClick: () => t == null ? void 0 : t(),
111
+ className: o(l.categoryLink, { [l.activeOption]: c === i.length + s }),
112
+ onClick: () => n == null ? void 0 : n(),
113
113
  children: e.name
114
114
  }
115
115
  ) }, e.categoryKey)
116
116
  )
117
117
  ] }) }),
118
- _.length > 0 && /* @__PURE__ */ l("div", { className: n.categorySection, children: /* @__PURE__ */ a("div", { className: n.categories, children: [
119
- /* @__PURE__ */ l(h, { size: "xxs", colorToken: "quaternary", children: "Custom Parts" }),
120
- _.map((e, s) => {
118
+ m.length > 0 && /* @__PURE__ */ t("div", { className: l.categorySection, children: /* @__PURE__ */ a("div", { className: l.categories, children: [
119
+ /* @__PURE__ */ t(h, { size: "xxs", colorToken: "quaternary", children: "Custom Parts" }),
120
+ m.map((e, s) => {
121
121
  const L = i.length + r.length + s;
122
122
  return /* @__PURE__ */ a(
123
- m,
123
+ d,
124
124
  {
125
125
  href: e.url,
126
- id: `${u}-${L}`,
126
+ id: `${_}-${L}`,
127
127
  role: "option",
128
128
  "aria-selected": c === L,
129
- className: o(n.customPartLink, { [n.activeOption]: c === L }),
130
- onClick: () => t == null ? void 0 : t(),
129
+ className: o(l.customPartLink, { [l.activeOption]: c === L }),
130
+ onClick: () => n == null ? void 0 : n(),
131
131
  children: [
132
- /* @__PURE__ */ l(y, { iconKey: e.icon, size: "sm" }),
133
- /* @__PURE__ */ l(h, { size: "sm", children: e.label })
132
+ /* @__PURE__ */ t(y, { iconKey: e.icon, size: "sm" }),
133
+ /* @__PURE__ */ t(h, { size: "sm", children: e.label })
134
134
  ]
135
135
  },
136
136
  e.id
@@ -138,20 +138,20 @@ function I({
138
138
  })
139
139
  ] }) })
140
140
  ] }),
141
- g.length > 0 && /* @__PURE__ */ l("div", { className: n.rightColumn, children: /* @__PURE__ */ l("ol", { className: n.itemList, children: g.map(
142
- (e, s) => /* @__PURE__ */ l("li", { className: o(n.item, { [n.activeItem]: c === i.length + r.length + _.length + s }), children: /* @__PURE__ */ a(
143
- m,
141
+ g.length > 0 && /* @__PURE__ */ t("div", { className: l.rightColumn, children: /* @__PURE__ */ t("ol", { className: l.itemList, children: g.map(
142
+ (e, s) => /* @__PURE__ */ t("li", { className: o(l.item, { [l.activeItem]: c === i.length + r.length + m.length + s }), children: /* @__PURE__ */ a(
143
+ d,
144
144
  {
145
145
  href: e.url,
146
- id: `${u}-${i.length + r.length + _.length + s}`,
146
+ id: `${_}-${i.length + r.length + m.length + s}`,
147
147
  role: "option",
148
- "aria-selected": c === i.length + r.length + _.length + s,
149
- onClick: () => t == null ? void 0 : t(),
148
+ "aria-selected": c === i.length + r.length + m.length + s,
149
+ onClick: () => n == null ? void 0 : n(),
150
150
  children: [
151
- /* @__PURE__ */ l(z, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
152
- /* @__PURE__ */ a("div", { className: n.itemInfo, children: [
153
- /* @__PURE__ */ l(h, { size: "sm", children: e.description }),
154
- /* @__PURE__ */ l(h, { size: "xs", colorToken: "quaternary", children: e.itemId })
151
+ /* @__PURE__ */ t(z, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
152
+ /* @__PURE__ */ a("div", { className: l.itemInfo, children: [
153
+ /* @__PURE__ */ t(h, { size: "sm", children: e.description }),
154
+ /* @__PURE__ */ t(h, { size: "xs", colorToken: "quaternary", children: e.itemId })
155
155
  ] })
156
156
  ]
157
157
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.242",
4
+ "version": "0.0.244",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",