@caseparts-org/caseblocks 0.0.226 → 0.0.228
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/InputEndAdornmentButton.css +1 -0
- package/dist/assets/MainNav.css +1 -1
- package/dist/assets/StatusPage.css +1 -0
- package/dist/assets/SuggestionDropdown.css +1 -1
- package/dist/atoms/Input/Input.js +10 -1
- package/dist/atoms/InputEndAdornmentButton/InputEndAdornmentButton.d.ts +6 -0
- package/dist/atoms/InputEndAdornmentButton/InputEndAdornmentButton.js +17 -0
- package/dist/main-client.d.ts +2 -0
- package/dist/main-client.js +80 -78
- package/dist/main-server.d.ts +2 -2
- package/dist/main-server.js +39 -39
- package/dist/main.d.ts +2 -2
- package/dist/main.js +28 -28
- package/dist/not-found-DhBNR9yc.js +4 -0
- package/dist/organisms/MainNav/MainNav.d.ts +12 -1
- package/dist/organisms/MainNav/MainNav.js +218 -109
- package/dist/organisms/MainNav/MainNav.stories.d.ts +1 -0
- package/dist/organisms/MainNav/MainNav.stories.js +125 -64
- package/dist/organisms/NotFound/NotFound.js +26 -25
- package/dist/organisms/StatusPage/StatusPage.d.ts +28 -0
- package/dist/organisms/StatusPage/StatusPage.js +106 -0
- package/dist/organisms/StatusPage/StatusPage.stories.d.ts +7 -0
- package/dist/organisms/StatusPage/StatusPage.stories.js +81 -0
- package/dist/organisms/SuggestionDropdown/SuggestionDropdown.d.ts +13 -2
- package/dist/organisms/SuggestionDropdown/SuggestionDropdown.js +72 -38
- package/dist/organisms/SuggestionDropdown/SuggestionDropdown.stories.d.ts +1 -0
- package/dist/organisms/SuggestionDropdown/SuggestionDropdown.stories.js +24 -5
- package/package.json +1 -1
- package/dist/assets/SearchBox.css +0 -1
- package/dist/molecules/SearchBox/SearchBox.d.ts +0 -7
- package/dist/molecules/SearchBox/SearchBox.js +0 -36
- package/dist/molecules/SearchBox/SearchBox.stories.d.ts +0 -12
- package/dist/molecules/SearchBox/SearchBox.stories.js +0 -15
|
@@ -1,51 +1,85 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Text as
|
|
3
|
-
import { Link as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
import { jsxs as n, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { Text as i } from "../../atoms/Text/Text.js";
|
|
3
|
+
import { Link as c } from "../../atoms/Link/Link.js";
|
|
4
|
+
import { Icon as g } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
import { c as a } from "../../clsx-OuTLNxxd.js";
|
|
6
|
+
import { Image as u } from "../../atoms/Image/Image.js";
|
|
7
|
+
import '../../assets/SuggestionDropdown.css';const k = "_suggestionDropdown_zk1ld_1", z = "_leftColumn_zk1ld_31", f = "_rightColumn_zk1ld_55", S = "_categorySection_zk1ld_75", p = "_suggestions_zk1ld_81", L = "_categories_zk1ld_83", N = "_suggestionLink_zk1ld_119", y = "_categoryLink_zk1ld_121", v = "_itemList_zk1ld_135", x = "_item_zk1ld_135", D = "_itemInfo_zk1ld_193", w = "_recentSearches_zk1ld_203", C = "_recentSearchesHeader_zk1ld_217", T = "_recentSearchesList_zk1ld_225", q = "_recentSearch_zk1ld_203", H = "_recentSearchLink_zk1ld_255", b = "_clearRecentSearch_zk1ld_271", r = {
|
|
8
|
+
suggestionDropdown: k,
|
|
9
|
+
leftColumn: z,
|
|
10
|
+
rightColumn: f,
|
|
11
|
+
categorySection: S,
|
|
12
|
+
suggestions: p,
|
|
13
|
+
categories: L,
|
|
14
|
+
suggestionLink: N,
|
|
15
|
+
categoryLink: y,
|
|
16
|
+
itemList: v,
|
|
17
|
+
item: x,
|
|
18
|
+
itemInfo: D,
|
|
19
|
+
recentSearches: w,
|
|
20
|
+
recentSearchesHeader: C,
|
|
21
|
+
recentSearchesList: T,
|
|
22
|
+
recentSearch: q,
|
|
23
|
+
recentSearchLink: H,
|
|
24
|
+
clearRecentSearch: b
|
|
16
25
|
};
|
|
17
|
-
function
|
|
18
|
-
terms:
|
|
19
|
-
categories:
|
|
20
|
-
items:
|
|
21
|
-
|
|
26
|
+
function A({
|
|
27
|
+
terms: l,
|
|
28
|
+
categories: d,
|
|
29
|
+
items: h,
|
|
30
|
+
view: m = "suggestions",
|
|
31
|
+
recentSearches: _ = [],
|
|
32
|
+
onClearRecentSearch: t,
|
|
33
|
+
className: o
|
|
22
34
|
}) {
|
|
23
|
-
return
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
35
|
+
return m === "recent-searches" ? /* @__PURE__ */ n(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: a(r.suggestionDropdown, r.recentSearches, o),
|
|
39
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
40
|
+
children: [
|
|
41
|
+
/* @__PURE__ */ s("div", { className: r.recentSearchesHeader, children: /* @__PURE__ */ s(i, { size: "xxs", colorToken: "quaternary", children: "Recent Searches" }) }),
|
|
42
|
+
/* @__PURE__ */ s("ol", { className: r.recentSearchesList, children: _.map((e) => /* @__PURE__ */ n("li", { className: r.recentSearch, children: [
|
|
43
|
+
/* @__PURE__ */ s(c, { href: e.url, className: r.recentSearchLink, children: /* @__PURE__ */ s(i, { size: "sm", children: e.term }) }),
|
|
44
|
+
/* @__PURE__ */ s(
|
|
45
|
+
"button",
|
|
46
|
+
{
|
|
47
|
+
type: "button",
|
|
48
|
+
className: r.clearRecentSearch,
|
|
49
|
+
"aria-label": `Clear recent search: ${e.term}`,
|
|
50
|
+
onClick: () => t == null ? void 0 : t(e),
|
|
51
|
+
children: /* @__PURE__ */ s(g, { iconKey: "fa-regular fa-xmark", size: "sm" })
|
|
52
|
+
}
|
|
53
|
+
)
|
|
54
|
+
] }, e.url)) })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
) : /* @__PURE__ */ n("div", { className: a(r.suggestionDropdown, o), onMouseDown: (e) => e.preventDefault(), children: [
|
|
58
|
+
/* @__PURE__ */ n("div", { className: r.leftColumn, children: [
|
|
59
|
+
/* @__PURE__ */ s("div", { className: r.suggestionSection, children: /* @__PURE__ */ n("div", { className: r.suggestions, children: [
|
|
60
|
+
/* @__PURE__ */ s(i, { size: "xxs", colorToken: "quaternary", children: "Suggestions" }),
|
|
61
|
+
l.map(
|
|
62
|
+
(e) => /* @__PURE__ */ s(i, { size: "sm", children: /* @__PURE__ */ s(c, { href: e.url, className: r.suggestionLink, children: e.name }) }, e.url)
|
|
29
63
|
)
|
|
30
64
|
] }) }),
|
|
31
|
-
/* @__PURE__ */ s("div", { className:
|
|
32
|
-
/* @__PURE__ */ s(
|
|
33
|
-
|
|
34
|
-
(
|
|
65
|
+
/* @__PURE__ */ s("div", { className: r.categorySection, children: /* @__PURE__ */ n("div", { className: r.categories, children: [
|
|
66
|
+
/* @__PURE__ */ s(i, { size: "xxs", colorToken: "quaternary", children: "Categories" }),
|
|
67
|
+
d.map(
|
|
68
|
+
(e) => /* @__PURE__ */ s(i, { size: "sm", children: /* @__PURE__ */ s(c, { href: e.url, className: r.categoryLink, children: e.name }) }, e.name)
|
|
35
69
|
)
|
|
36
70
|
] }) })
|
|
37
71
|
] }),
|
|
38
|
-
/* @__PURE__ */ s("div", { className:
|
|
39
|
-
(
|
|
40
|
-
/* @__PURE__ */ s(
|
|
41
|
-
/* @__PURE__ */
|
|
42
|
-
/* @__PURE__ */ s(
|
|
43
|
-
/* @__PURE__ */ s(
|
|
72
|
+
/* @__PURE__ */ s("div", { className: r.rightColumn, children: /* @__PURE__ */ s("ol", { className: r.itemList, children: h.map(
|
|
73
|
+
(e) => /* @__PURE__ */ s("li", { className: r.item, children: /* @__PURE__ */ n(c, { href: e.url, children: [
|
|
74
|
+
/* @__PURE__ */ s(u, { src: e.image, alt: `${e.description} product image`, height: 72, width: 72 }),
|
|
75
|
+
/* @__PURE__ */ n("div", { className: r.itemInfo, children: [
|
|
76
|
+
/* @__PURE__ */ s(i, { size: "sm", children: e.description }),
|
|
77
|
+
/* @__PURE__ */ s(i, { size: "sm", colorToken: "quaternary", children: e.itemId })
|
|
44
78
|
] })
|
|
45
|
-
] }) },
|
|
79
|
+
] }) }, e.itemId)
|
|
46
80
|
) }) })
|
|
47
81
|
] });
|
|
48
82
|
}
|
|
49
83
|
export {
|
|
50
|
-
|
|
84
|
+
A as SuggestionDropdown
|
|
51
85
|
};
|
|
@@ -1,14 +1,19 @@
|
|
|
1
|
-
import { SuggestionDropdown as
|
|
1
|
+
import { SuggestionDropdown as t } from "./SuggestionDropdown.js";
|
|
2
2
|
const s = {
|
|
3
3
|
title: "Case Parts/Organisms/SuggestionDropdown",
|
|
4
|
-
component:
|
|
4
|
+
component: t,
|
|
5
5
|
parameters: {
|
|
6
6
|
layout: "centered"
|
|
7
7
|
},
|
|
8
8
|
tags: ["autodocs"]
|
|
9
|
-
},
|
|
9
|
+
}, a = {
|
|
10
10
|
args: {
|
|
11
|
-
terms: [
|
|
11
|
+
terms: [
|
|
12
|
+
{ name: "thermostat", url: "/search/thermostat" },
|
|
13
|
+
{ name: "sensor", url: "/search/sensor" },
|
|
14
|
+
{ name: "cover", url: "/search/cover" },
|
|
15
|
+
{ name: "wiring", url: "/search/wiring" }
|
|
16
|
+
],
|
|
12
17
|
categories: [
|
|
13
18
|
{ name: "Heating", url: "/categories/heating" },
|
|
14
19
|
{ name: "Accessories", url: "/categories/accessories" },
|
|
@@ -38,8 +43,22 @@ const s = {
|
|
|
38
43
|
}
|
|
39
44
|
]
|
|
40
45
|
}
|
|
46
|
+
}, o = {
|
|
47
|
+
args: {
|
|
48
|
+
view: "recent-searches",
|
|
49
|
+
terms: [],
|
|
50
|
+
categories: [],
|
|
51
|
+
items: [],
|
|
52
|
+
recentSearches: [
|
|
53
|
+
{ term: "door gasket", url: "/search/door-gasket" },
|
|
54
|
+
{ term: "walk-in cooler", url: "/search/walk-in-cooler" },
|
|
55
|
+
{ term: "thermostat", url: "/search/thermostat" }
|
|
56
|
+
],
|
|
57
|
+
onClearRecentSearch: (e) => alert(`Clear ${e.term}`)
|
|
58
|
+
}
|
|
41
59
|
};
|
|
42
60
|
export {
|
|
43
|
-
|
|
61
|
+
a as Default,
|
|
62
|
+
o as RecentSearches,
|
|
44
63
|
s as default
|
|
45
64
|
};
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
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,7 +0,0 @@
|
|
|
1
|
-
import { HideAtProps } from '../../atoms/HideAt';
|
|
2
|
-
/** A search box. */
|
|
3
|
-
export interface SearchBoxProps extends React.HTMLAttributes<HTMLDivElement>, HideAtProps {
|
|
4
|
-
onSearch: (_input: string) => void;
|
|
5
|
-
inputName?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare function SearchBox({ onSearch, inputName, hideAt, className, ...otherProps }: SearchBoxProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,36 +0,0 @@
|
|
|
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
|
|
9
|
-
};
|
|
10
|
-
function y({
|
|
11
|
-
onSearch: l,
|
|
12
|
-
inputName: o,
|
|
13
|
-
hideAt: f,
|
|
14
|
-
className: e,
|
|
15
|
-
...a
|
|
16
|
-
}) {
|
|
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
|
-
] });
|
|
33
|
-
}
|
|
34
|
-
export {
|
|
35
|
-
y as SearchBox
|
|
36
|
-
};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
-
import { SearchBox } from './SearchBox';
|
|
3
|
-
declare const meta: {
|
|
4
|
-
title: string;
|
|
5
|
-
component: typeof SearchBox;
|
|
6
|
-
parameters: {
|
|
7
|
-
layout: string;
|
|
8
|
-
};
|
|
9
|
-
};
|
|
10
|
-
export default meta;
|
|
11
|
-
type Story = StoryObj<typeof meta>;
|
|
12
|
-
export declare const Default: Story;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { SearchBox as a } from "./SearchBox.js";
|
|
2
|
-
const r = {
|
|
3
|
-
title: "Case Parts/Molecules/SearchBox",
|
|
4
|
-
component: a,
|
|
5
|
-
parameters: {
|
|
6
|
-
// Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
7
|
-
layout: "centered"
|
|
8
|
-
}
|
|
9
|
-
}, o = {
|
|
10
|
-
args: { onSearch: (e) => alert(`Search ${e}`) }
|
|
11
|
-
};
|
|
12
|
-
export {
|
|
13
|
-
o as Default,
|
|
14
|
-
r as default
|
|
15
|
-
};
|