@caseparts-org/caseblocks 0.0.154 → 0.0.156

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.
@@ -0,0 +1,19 @@
1
+ import './assets/Cart.css';const t = "_cartIconButton_1dh0n_2", n = "_count_1dh0n_9", o = "_cartContainer_1dh0n_24", e = "_headerWrapper_1dh0n_35", _ = "_header_1dh0n_35", c = "_cartItems_1dh0n_53", a = "_topRow_1dh0n_78", r = "_itemInfo_1dh0n_84", s = "_purchaseInformation_1dh0n_89", h = "_itemManagement_1dh0n_96", m = "_removeItem_1dh0n_114", d = "_noItems_1dh0n_124", u = "_subtotal_1dh0n_131", I = "_checkoutButton_1dh0n_138", p = {
2
+ cartIconButton: t,
3
+ count: n,
4
+ cartContainer: o,
5
+ headerWrapper: e,
6
+ header: _,
7
+ cartItems: c,
8
+ topRow: a,
9
+ itemInfo: r,
10
+ purchaseInformation: s,
11
+ itemManagement: h,
12
+ removeItem: m,
13
+ noItems: d,
14
+ subtotal: u,
15
+ checkoutButton: I
16
+ };
17
+ export {
18
+ p as s
19
+ };
@@ -1 +1 @@
1
- ._cartIconButton_pkqoj_2{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_pkqoj_9{position:absolute;top:0;left:14px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_pkqoj_24{height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._header_pkqoj_35{display:flex;flex-direction:column;align-items:flex-start}._cartItems_pkqoj_40{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_pkqoj_40 ul{margin:0;padding:0}._cartItems_pkqoj_40 li{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing-0-5);align-items:center;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border-bottom:1px solid var(--color-neutrals-neutral-2)}._cartItems_pkqoj_40 li:first-of-type{border-top:1px solid var(--color-neutrals-neutral-2)}._topRow_pkqoj_65{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._itemInfo_pkqoj_71{display:flex;flex-direction:column;align-items:flex-start}._purchaseInformation_pkqoj_76{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._itemManagement_pkqoj_83{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._cartItems_pkqoj_40 li p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._cartItems_pkqoj_40 img{height:40px;width:40px;object-fit:contain}._removeItem_pkqoj_101{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_pkqoj_111{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_pkqoj_118{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_pkqoj_125{width:100%}
1
+ ._cartIconButton_1dh0n_2{position:relative;border:none;padding:0;margin:0;background-color:transparent}._count_1dh0n_9{position:absolute;top:0;left:14px;border-radius:50%;width:18px;height:18px;display:flex;flex-direction:row;align-items:center;justify-content:center;background-color:var(--color-brand-primary-primary-tangerine);color:var(--color-neutrals-neutral-1);font-weight:var(--font-weight-semibold)}._cartContainer_1dh0n_24{height:100vh;width:100%;min-width:320px;max-width:375px;box-sizing:border-box;display:grid;grid-template-rows:auto 1fr auto auto;gap:var(--spacing-1);padding:var(--spacing-1)}._headerWrapper_1dh0n_35{display:flex;flex-direction:row;align-items:flex-start;gap:var(--spacing-spacing-2xs)}._headerWrapper_1dh0n_35>button{padding:0;margin:0;background-color:transparent;border:none}._header_1dh0n_35{display:flex;flex-direction:column;align-items:flex-start;width:100%}._cartItems_1dh0n_53{height:100%;overflow-y:auto;overflow-x:hidden}._cartItems_1dh0n_53 ul{margin:0;padding:0}._cartItems_1dh0n_53 li{display:grid;grid-template-columns:auto 1fr;gap:var(--spacing-0-5);align-items:center;box-sizing:border-box;position:relative;list-style:none;margin:0;padding:var(--spacing-0-5);width:100%;border-bottom:1px solid var(--color-neutrals-neutral-2)}._cartItems_1dh0n_53 li:first-of-type{border-top:1px solid var(--color-neutrals-neutral-2)}._topRow_1dh0n_78{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between}._itemInfo_1dh0n_84{display:flex;flex-direction:column;align-items:flex-start}._purchaseInformation_1dh0n_89{display:flex;flex-direction:row;align-items:flex-start;justify-content:space-between;width:100%}._itemManagement_1dh0n_96{display:flex;flex-direction:column;align-items:flex-end;gap:var(--spacing-spacing-3xs)}._cartItems_1dh0n_53 li p{margin:0;padding:0;word-wrap:break-word;white-space:normal;overflow-wrap:break-word}._cartItems_1dh0n_53 img{height:40px;width:40px;object-fit:contain}._removeItem_1dh0n_114{border:none;background-color:transparent;padding:0;margin:0;cursor:pointer;width:min-content;height:min-content}._noItems_1dh0n_124{display:flex;flex-direction:row;align-items:center;justify-content:center;height:100%}._subtotal_1dh0n_131{display:flex;flex-direction:row;align-items:center;justify-content:space-between;padding:var(--spacing-0-5)}._checkoutButton_1dh0n_138{width:100%}
@@ -13,6 +13,7 @@ export interface HorizontalScrollProps extends PropsWithChildren, HideAtProps {
13
13
  headerClassName?: string;
14
14
  showIndicators?: boolean;
15
15
  hideHeader?: boolean;
16
+ wheelActivationDelay?: number;
16
17
  }
17
18
  export declare function HorizontalScroll({ className, childrenContainerClassName, childrenSpacing, showScrollbar, children, caption, scrollStep, leftButtonContent, rightButtonContent, headerContainerClassName, headerClassName, showIndicators, hideHeader, // new default
18
- hideAt }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
19
+ wheelActivationDelay, hideAt }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
@@ -1,152 +1,160 @@
1
- import { jsxs as d, jsx as l, Fragment as K } from "react/jsx-runtime";
2
- import { useRef as g, useState as h, useEffect as m } from "react";
3
- import { Icon as S } from "../Icon/Icon.js";
4
- import { Text as q } from "../Text/Text.js";
5
- import { c as i } from "../../clsx-OuTLNxxd.js";
6
- import { getHideAtStyles as G } from "../HideAt.js";
7
- import '../../assets/HorizontalScroll.css';const I = "_root_1565i_1", U = "_header_1565i_5", $ = "_caption_1565i_13", J = "_controls_1565i_21", Q = "_controlBtn_1565i_26", Z = "_container_1565i_45", tt = "_dragging_1565i_58", et = "_noOverflow_1565i_61", rt = "_viewport_1565i_74", nt = "_indicator_1565i_77", ot = "_left_1565i_87", lt = "_right_1565i_93", it = "_hidden_1565i_99", e = {
8
- root: I,
9
- header: U,
10
- caption: $,
11
- controls: J,
12
- controlBtn: Q,
13
- container: Z,
14
- dragging: tt,
15
- noOverflow: et,
1
+ import { jsxs as d, jsx as o, Fragment as U } from "react/jsx-runtime";
2
+ import { useRef as _, useState as m, useEffect as b } from "react";
3
+ import { Icon as W } from "../Icon/Icon.js";
4
+ import { Text as $ } from "../Text/Text.js";
5
+ import { c as l } from "../../clsx-OuTLNxxd.js";
6
+ import { getHideAtStyles as J } from "../HideAt.js";
7
+ import '../../assets/HorizontalScroll.css';const Q = "_root_1565i_1", Z = "_header_1565i_5", ee = "_caption_1565i_13", te = "_controls_1565i_21", re = "_controlBtn_1565i_26", ne = "_container_1565i_45", oe = "_dragging_1565i_58", ie = "_noOverflow_1565i_61", le = "_viewport_1565i_74", ce = "_indicator_1565i_77", se = "_left_1565i_87", ae = "_right_1565i_93", de = "_hidden_1565i_99", t = {
8
+ root: Q,
9
+ header: Z,
10
+ caption: ee,
11
+ controls: te,
12
+ controlBtn: re,
13
+ container: ne,
14
+ dragging: oe,
15
+ noOverflow: ie,
16
16
  "scrollVisibility--false": "_scrollVisibility--false_1565i_66",
17
- viewport: rt,
18
- indicator: nt,
19
- left: ot,
20
- right: lt,
21
- hidden: it
17
+ viewport: le,
18
+ indicator: ce,
19
+ left: se,
20
+ right: ae,
21
+ hidden: de
22
22
  };
23
- function _t({
24
- className: N,
25
- childrenContainerClassName: E,
26
- childrenSpacing: C,
27
- showScrollbar: D = !1,
28
- children: W,
29
- caption: f,
30
- scrollStep: p = 160,
31
- leftButtonContent: z,
32
- rightButtonContent: O,
33
- headerContainerClassName: B,
34
- headerClassName: M,
35
- showIndicators: A = !0,
36
- hideHeader: P = !1,
23
+ function be({
24
+ className: z,
25
+ childrenContainerClassName: A,
26
+ childrenSpacing: D,
27
+ showScrollbar: O = !1,
28
+ children: P,
29
+ caption: u,
30
+ scrollStep: L = 160,
31
+ leftButtonContent: B,
32
+ rightButtonContent: M,
33
+ headerContainerClassName: R,
34
+ headerClassName: X,
35
+ showIndicators: k = !0,
36
+ hideHeader: H = !1,
37
37
  // new default
38
- hideAt: R
38
+ wheelActivationDelay: x = 250,
39
+ hideAt: T
39
40
  }) {
40
- const n = g(null), [b, x] = h(!1), c = g({ x: 0, scroll: 0 }), u = g(!1), X = 5, [_, k] = h(!0), [v, H] = h(!1), [s, T] = h(!1), a = () => {
41
- const t = n.current;
42
- if (!t) return;
43
- const r = t.scrollWidth - t.clientWidth;
44
- T(t.scrollWidth > t.clientWidth + 1), k(t.scrollLeft <= 0), H(t.scrollLeft >= r - 1);
45
- }, V = (t) => {
46
- !n.current || !s || (x(!0), c.current.x = t.clientX, c.current.scroll = n.current.scrollLeft, u.current = !1);
47
- }, Y = (t) => {
48
- if (!b || !n.current) return;
49
- const r = t.clientX - c.current.x;
50
- n.current.scrollLeft = c.current.scroll - r, Math.abs(t.clientX - c.current.x) > X && (u.current = !0);
41
+ const n = _(null), [E, w] = m(!1), c = _({ x: 0, scroll: 0 }), f = _(!1), h = _(null), V = 5, [g, Y] = m(!0), [p, j] = m(!1), [s, F] = m(!1), a = () => {
42
+ const e = n.current;
43
+ if (!e) return;
44
+ const r = e.scrollWidth - e.clientWidth;
45
+ F(e.scrollWidth > e.clientWidth + 1), Y(e.scrollLeft <= 0), j(e.scrollLeft >= r - 1);
46
+ }, K = (e) => {
47
+ !n.current || !s || (w(!0), c.current.x = e.clientX, c.current.scroll = n.current.scrollLeft, f.current = !1);
48
+ }, q = (e) => {
49
+ if (!E || !n.current) return;
50
+ const r = e.clientX - c.current.x;
51
+ n.current.scrollLeft = c.current.scroll - r, Math.abs(e.clientX - c.current.x) > V && (f.current = !0);
51
52
  }, y = () => {
52
- n.current && x(!1);
53
- }, j = (t) => {
54
- u.current && (t.preventDefault(), t.stopPropagation(), u.current = !1);
55
- }, w = (t) => {
53
+ n.current && w(!1);
54
+ }, G = (e) => {
55
+ f.current && (e.preventDefault(), e.stopPropagation(), f.current = !1);
56
+ }, S = (e) => {
56
57
  const r = n.current;
57
58
  if (!r) return;
58
- const o = Math.max(0, Math.min(r.scrollLeft + t, r.scrollWidth - r.clientWidth));
59
- r.scrollTo({ left: o, behavior: "smooth" }), requestAnimationFrame(a);
59
+ const v = Math.max(0, Math.min(r.scrollLeft + e, r.scrollWidth - r.clientWidth));
60
+ r.scrollTo({ left: v, behavior: "smooth" }), requestAnimationFrame(a);
60
61
  };
61
- m(() => {
62
- const t = n.current;
63
- if (!t) return;
64
- const r = (o) => {
65
- if (!(t.scrollWidth > t.clientWidth)) return;
66
- const L = Math.abs(o.deltaY) >= Math.abs(o.deltaX) && o.deltaY !== 0 ? o.deltaY : o.deltaX;
67
- L !== 0 ? (o.preventDefault(), t.scrollLeft += L) : o.preventDefault();
62
+ b(() => {
63
+ const e = n.current;
64
+ if (!e) return;
65
+ const r = () => {
66
+ h.current = performance.now();
67
+ }, v = () => {
68
+ h.current = null;
69
+ }, N = (i) => {
70
+ if (!(e.scrollWidth > e.clientWidth) || (h.current == null ? 0 : performance.now() - h.current) < x)
71
+ return;
72
+ const C = Math.abs(i.deltaY) >= Math.abs(i.deltaX) && i.deltaY !== 0 ? i.deltaY : i.deltaX;
73
+ C !== 0 ? (i.preventDefault(), e.scrollLeft += C) : i.preventDefault();
68
74
  };
69
- return t.addEventListener("wheel", r, { passive: !1 }), () => t.removeEventListener("wheel", r);
70
- }, []), m(() => {
71
- const t = n.current;
72
- if (t)
73
- return a(), t.addEventListener("scroll", a), () => t.removeEventListener("scroll", a);
74
- }, []), m(() => {
75
- const t = n.current;
76
- if (!t || typeof ResizeObserver > "u") return;
75
+ return e.addEventListener("pointerenter", r), e.addEventListener("pointerleave", v), e.addEventListener("wheel", N, { passive: !1 }), () => {
76
+ e.removeEventListener("pointerenter", r), e.removeEventListener("pointerleave", v), e.removeEventListener("wheel", N);
77
+ };
78
+ }, [x]), b(() => {
79
+ const e = n.current;
80
+ if (e)
81
+ return a(), e.addEventListener("scroll", a), () => e.removeEventListener("scroll", a);
82
+ }, []), b(() => {
83
+ const e = n.current;
84
+ if (!e || typeof ResizeObserver > "u") return;
77
85
  const r = new ResizeObserver(() => a());
78
- return r.observe(t), () => r.disconnect();
86
+ return r.observe(e), () => r.disconnect();
79
87
  }, []);
80
- const F = () => f == null ? null : typeof f == "string" ? /* @__PURE__ */ l(q, { variant: "display", size: "2xl", className: i(M, e.caption), children: f }) : f;
81
- return /* @__PURE__ */ d("div", { className: i(e.root, N, G(R)), children: [
82
- !P && /* @__PURE__ */ d("div", { className: i(B, e.header), children: [
83
- F(),
84
- s && /* @__PURE__ */ d("div", { className: e.controls, children: [
85
- /* @__PURE__ */ l(
88
+ const I = () => u == null ? null : typeof u == "string" ? /* @__PURE__ */ o($, { variant: "display", size: "2xl", className: l(X, t.caption), children: u }) : u;
89
+ return /* @__PURE__ */ d("div", { className: l(t.root, z, J(T)), children: [
90
+ !H && /* @__PURE__ */ d("div", { className: l(R, t.header), children: [
91
+ I(),
92
+ s && /* @__PURE__ */ d("div", { className: t.controls, children: [
93
+ /* @__PURE__ */ o(
86
94
  "button",
87
95
  {
88
96
  type: "button",
89
- className: e.controlBtn,
90
- onClick: () => w(-p),
97
+ className: t.controlBtn,
98
+ onClick: () => S(-L),
91
99
  "aria-label": "Scroll left",
92
- disabled: _,
93
- "aria-disabled": _,
94
- children: z ?? /* @__PURE__ */ l(S, { iconKey: "fa-regular fa-chevron-left", size: "sm" })
100
+ disabled: g,
101
+ "aria-disabled": g,
102
+ children: B ?? /* @__PURE__ */ o(W, { iconKey: "fa-regular fa-chevron-left", size: "sm" })
95
103
  }
96
104
  ),
97
- /* @__PURE__ */ l(
105
+ /* @__PURE__ */ o(
98
106
  "button",
99
107
  {
100
108
  type: "button",
101
- className: e.controlBtn,
102
- onClick: () => w(p),
109
+ className: t.controlBtn,
110
+ onClick: () => S(L),
103
111
  "aria-label": "Scroll right",
104
- disabled: v,
105
- "aria-disabled": v,
106
- children: O ?? /* @__PURE__ */ l(S, { iconKey: "fa-regular fa-chevron-right", size: "sm" })
112
+ disabled: p,
113
+ "aria-disabled": p,
114
+ children: M ?? /* @__PURE__ */ o(W, { iconKey: "fa-regular fa-chevron-right", size: "sm" })
107
115
  }
108
116
  )
109
117
  ] })
110
118
  ] }),
111
- /* @__PURE__ */ d("div", { className: e.viewport, children: [
112
- /* @__PURE__ */ l(
119
+ /* @__PURE__ */ d("div", { className: t.viewport, children: [
120
+ /* @__PURE__ */ o(
113
121
  "div",
114
122
  {
115
123
  ref: n,
116
- style: { gap: C ?? "var(--spacing-spacing-3xs)" },
117
- className: i(
118
- e.container,
119
- e[`scrollVisibility--${D}`],
120
- b ? e.dragging : "",
121
- !s && e.noOverflow,
122
- E
124
+ style: { gap: D ?? "var(--spacing-spacing-3xs)" },
125
+ className: l(
126
+ t.container,
127
+ t[`scrollVisibility--${O}`],
128
+ E ? t.dragging : "",
129
+ !s && t.noOverflow,
130
+ A
123
131
  ),
124
- onPointerDown: V,
125
- onPointerMove: Y,
132
+ onPointerDown: K,
133
+ onPointerMove: q,
126
134
  onPointerLeave: y,
127
135
  onPointerUp: y,
128
- onClickCapture: j,
129
- children: W
136
+ onClickCapture: G,
137
+ children: P
130
138
  }
131
139
  ),
132
- A && /* @__PURE__ */ d(K, { children: [
133
- /* @__PURE__ */ l(
140
+ k && /* @__PURE__ */ d(U, { children: [
141
+ /* @__PURE__ */ o(
134
142
  "div",
135
143
  {
136
- className: i(
137
- e.indicator,
138
- e.left,
139
- (_ || !s) && e.hidden
144
+ className: l(
145
+ t.indicator,
146
+ t.left,
147
+ (g || !s) && t.hidden
140
148
  )
141
149
  }
142
150
  ),
143
- /* @__PURE__ */ l(
151
+ /* @__PURE__ */ o(
144
152
  "div",
145
153
  {
146
- className: i(
147
- e.indicator,
148
- e.right,
149
- (v || !s) && e.hidden
154
+ className: l(
155
+ t.indicator,
156
+ t.right,
157
+ (p || !s) && t.hidden
150
158
  )
151
159
  }
152
160
  )
@@ -155,5 +163,5 @@ function _t({
155
163
  ] });
156
164
  }
157
165
  export {
158
- _t as HorizontalScroll
166
+ be as HorizontalScroll
159
167
  };
@@ -9,6 +9,7 @@ interface DemoArgs {
9
9
  showIndicators: boolean;
10
10
  hideHeader: boolean;
11
11
  childrenSpacing: number;
12
+ wheelActivationDelay: number;
12
13
  }
13
14
  type StoryArgs = DemoArgs;
14
15
  declare const meta: Meta<StoryArgs>;
@@ -1,8 +1,8 @@
1
- import { jsxs as i, jsx as o } from "react/jsx-runtime";
2
- import { HorizontalScroll as r } from "./HorizontalScroll.js";
3
- const u = {
1
+ import { jsxs as r, jsx as o } from "react/jsx-runtime";
2
+ import { HorizontalScroll as i } from "./HorizontalScroll.js";
3
+ const g = {
4
4
  title: "Case Parts/Atoms/HorizontalScroll",
5
- component: r,
5
+ component: i,
6
6
  tags: ["autodocs"],
7
7
  parameters: {
8
8
  layout: "fullscreen",
@@ -14,6 +14,7 @@ A drag + wheel enabled horizontal scrolling container.
14
14
  Features:
15
15
  - Pointer drag (mouse / touch) horizontal scrolling.
16
16
  - Converts vertical mouse wheel motion to horizontal scrolling.
17
+ - Small hover delay before wheel is captured for horizontal scrolling.
17
18
  - Optional native scrollbar visibility via showScrollbar.
18
19
 
19
20
  Use for carousels, chip lists, card rails, horizontally overflowing panels.
@@ -57,6 +58,10 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
57
58
  childrenSpacing: {
58
59
  control: { type: "number", min: 0, max: 64, step: 2 },
59
60
  description: "Gap between direct children (flex gap)."
61
+ },
62
+ wheelActivationDelay: {
63
+ control: { type: "number", min: 0, max: 1e3, step: 25 },
64
+ description: "Delay (ms) before mouse wheel is captured for horizontal scroll after hover."
60
65
  }
61
66
  },
62
67
  args: {
@@ -70,19 +75,20 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
70
75
  // new default
71
76
  hideHeader: !1,
72
77
  // new default
73
- childrenSpacing: 12
78
+ childrenSpacing: 12,
74
79
  // new default
80
+ wheelActivationDelay: 250
75
81
  }
76
- }, n = /* @__PURE__ */ o("style", { children: `
82
+ }, t = /* @__PURE__ */ o("style", { children: `
77
83
  .horizontalDemoScroll {
78
84
  touch-action: none; /* ensure pointer events for horizontal drag */
79
85
  }
80
86
  .horizontalDemoScroll a {
81
87
  -webkit-user-drag: none; /* Safari/Chrome: prevent ghost dragging of link */
82
88
  }
83
- ` }), t = (e) => {
84
- const { itemCount: d, itemWidth: c, itemHeight: l, rounded: s, gradient: h } = e;
85
- return Array.from({ length: d }, (p, m) => {
89
+ ` }), n = (e) => {
90
+ const { itemCount: c, itemWidth: d, itemHeight: l, rounded: h, gradient: s } = e;
91
+ return Array.from({ length: c }, (p, m) => {
86
92
  const a = m + 1;
87
93
  return /* @__PURE__ */ o(
88
94
  "a",
@@ -91,10 +97,10 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
91
97
  draggable: !1,
92
98
  style: {
93
99
  flex: "0 0 auto",
94
- width: c,
100
+ width: d,
95
101
  height: l,
96
- borderRadius: s ? 8 : 0,
97
- background: h ? "linear-gradient(135deg,#4F46E5,#6366F1)" : "#4F46E5",
102
+ borderRadius: h ? 8 : 0,
103
+ background: s ? "linear-gradient(135deg,#4F46E5,#6366F1)" : "#4F46E5",
98
104
  color: "#fff",
99
105
  display: "flex",
100
106
  alignItems: "center",
@@ -109,63 +115,66 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
109
115
  a
110
116
  );
111
117
  });
112
- }, w = {
118
+ }, S = {
113
119
  name: "Playground",
114
- render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
115
- n,
120
+ render: (e) => /* @__PURE__ */ r("div", { style: { padding: 24 }, children: [
121
+ t,
116
122
  /* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "HorizontalScroll Playground" }),
117
123
  /* @__PURE__ */ o("p", { style: { margin: "0 0 16px", fontSize: 14, color: "#555" }, children: "Drag horizontally or use the mouse wheel. Tweak values in Controls." }),
118
124
  /* @__PURE__ */ o(
119
- r,
125
+ i,
120
126
  {
121
127
  className: "horizontalDemoScroll",
122
128
  showScrollbar: e.showScrollbar,
123
129
  showIndicators: e.showIndicators,
124
130
  hideHeader: e.hideHeader,
125
131
  childrenSpacing: e.childrenSpacing,
132
+ wheelActivationDelay: e.wheelActivationDelay,
126
133
  caption: `Playground (${e.itemCount} items)`,
127
- children: t(e)
134
+ children: n(e)
128
135
  }
129
136
  )
130
137
  ] })
131
- }, b = {
138
+ }, y = {
132
139
  args: { showScrollbar: !0 },
133
- render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
134
- n,
140
+ render: (e) => /* @__PURE__ */ r("div", { style: { padding: 24 }, children: [
141
+ t,
135
142
  /* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Scrollbar Visible" }),
136
143
  /* @__PURE__ */ o(
137
- r,
144
+ i,
138
145
  {
139
146
  className: "horizontalDemoScroll",
140
147
  showScrollbar: !0,
141
148
  showIndicators: e.showIndicators,
142
149
  hideHeader: e.hideHeader,
143
150
  childrenSpacing: e.childrenSpacing,
151
+ wheelActivationDelay: e.wheelActivationDelay,
144
152
  caption: "Scrollbar Visible",
145
- children: t(e)
153
+ children: n(e)
146
154
  }
147
155
  )
148
156
  ] })
149
- }, y = {
157
+ }, b = {
150
158
  args: {
151
159
  itemCount: 40,
152
160
  itemWidth: 90,
153
161
  itemHeight: 60,
154
162
  showScrollbar: !1
155
163
  },
156
- render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
157
- n,
164
+ render: (e) => /* @__PURE__ */ r("div", { style: { padding: 24 }, children: [
165
+ t,
158
166
  /* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Dense Small Items" }),
159
167
  /* @__PURE__ */ o(
160
- r,
168
+ i,
161
169
  {
162
170
  className: "horizontalDemoScroll",
163
171
  showScrollbar: e.showScrollbar,
164
172
  showIndicators: e.showIndicators,
165
173
  hideHeader: e.hideHeader,
166
174
  childrenSpacing: e.childrenSpacing,
175
+ wheelActivationDelay: e.wheelActivationDelay,
167
176
  caption: `Dense (${e.itemCount} items)`,
168
- children: t(e)
177
+ children: n(e)
169
178
  }
170
179
  )
171
180
  ] })
@@ -176,23 +185,24 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
176
185
  itemHeight: 160,
177
186
  gradient: !1
178
187
  },
179
- render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
180
- n,
188
+ render: (e) => /* @__PURE__ */ r("div", { style: { padding: 24 }, children: [
189
+ t,
181
190
  /* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Large Cards" }),
182
191
  /* @__PURE__ */ o(
183
- r,
192
+ i,
184
193
  {
185
194
  className: "horizontalDemoScroll",
186
195
  showScrollbar: e.showScrollbar,
187
196
  showIndicators: e.showIndicators,
188
197
  hideHeader: e.hideHeader,
189
198
  childrenSpacing: e.childrenSpacing,
199
+ wheelActivationDelay: e.wheelActivationDelay,
190
200
  caption: "Large Cards",
191
- children: t(e)
201
+ children: n(e)
192
202
  }
193
203
  )
194
204
  ] })
195
- }, H = {
205
+ }, v = {
196
206
  name: "Without Indicators",
197
207
  args: {
198
208
  showIndicators: !1,
@@ -201,23 +211,24 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
201
211
  itemHeight: 72,
202
212
  childrenSpacing: 12
203
213
  },
204
- render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
205
- n,
214
+ render: (e) => /* @__PURE__ */ r("div", { style: { padding: 24 }, children: [
215
+ t,
206
216
  /* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Indicators Disabled" }),
207
217
  /* @__PURE__ */ o(
208
- r,
218
+ i,
209
219
  {
210
220
  className: "horizontalDemoScroll",
211
221
  showScrollbar: e.showScrollbar,
212
222
  showIndicators: !1,
213
223
  hideHeader: e.hideHeader,
214
224
  childrenSpacing: e.childrenSpacing,
225
+ wheelActivationDelay: e.wheelActivationDelay,
215
226
  caption: "No Edge Indicators",
216
- children: t(e)
227
+ children: n(e)
217
228
  }
218
229
  )
219
230
  ] })
220
- }, x = {
231
+ }, H = {
221
232
  name: "Header Hidden",
222
233
  args: {
223
234
  hideHeader: !0,
@@ -226,29 +237,30 @@ Use for carousels, chip lists, card rails, horizontally overflowing panels.
226
237
  itemHeight: 70,
227
238
  showIndicators: !0
228
239
  },
229
- render: (e) => /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
230
- n,
240
+ render: (e) => /* @__PURE__ */ r("div", { style: { padding: 24 }, children: [
241
+ t,
231
242
  /* @__PURE__ */ o("h3", { style: { margin: "0 0 12px" }, children: "Header Hidden" }),
232
243
  /* @__PURE__ */ o(
233
- r,
244
+ i,
234
245
  {
235
246
  className: "horizontalDemoScroll",
236
247
  showScrollbar: e.showScrollbar,
237
248
  showIndicators: e.showIndicators,
238
249
  hideHeader: !0,
239
250
  childrenSpacing: e.childrenSpacing,
251
+ wheelActivationDelay: e.wheelActivationDelay,
240
252
  caption: "(Will not render since header hidden)",
241
- children: t(e)
253
+ children: n(e)
242
254
  }
243
255
  )
244
256
  ] })
245
257
  };
246
258
  export {
247
- y as DenseSmallItems,
248
- x as HeaderHidden,
259
+ b as DenseSmallItems,
260
+ H as HeaderHidden,
249
261
  f as LargeCards,
250
- w as Playground,
251
- b as WithScrollbar,
252
- H as WithoutIndicators,
253
- u as default
262
+ S as Playground,
263
+ y as WithScrollbar,
264
+ v as WithoutIndicators,
265
+ g as default
254
266
  };
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as d } from "react/jsx-runtime";
2
2
  import l from "react";
3
3
  import { Icon as g } from "../../atoms/Icon/Icon.js";
4
4
  import { Text as p } from "../../atoms/Text/Text.js";
5
- import { s as m } from "../../Cart.module-9txlotpz.js";
5
+ import { s as m } from "../../Cart.module-gkb4IOVS.js";
6
6
  const S = l.forwardRef(function({
7
7
  cart: i,
8
8
  open: t = !1,
@@ -1,86 +1,89 @@
1
- import { jsx as e, jsxs as t } from "react/jsx-runtime";
2
- import { SlideInPanel as g } from "../../atoms/SlideInPanel/SlideInPanel.js";
1
+ import { jsx as e, jsxs as a } from "react/jsx-runtime";
2
+ import { SlideInPanel as y } from "../../atoms/SlideInPanel/SlideInPanel.js";
3
3
  import { Text as n } from "../../atoms/Text/Text.js";
4
- import { Link as y } from "../../atoms/Link/Link.js";
5
- import { Button as I } from "../../atoms/Button/Button.js";
6
- import { Pricing as b } from "../Pricing/Pricing.js";
7
- import { QuantityInput as N } from "../QuantityInput/QuantityInput.js";
8
- import { Availability as z } from "../Availability/Availability.js";
9
- import { Icon as k } from "../../atoms/Icon/Icon.js";
10
- import { s as r } from "../../Cart.module-9txlotpz.js";
4
+ import { Link as I } from "../../atoms/Link/Link.js";
5
+ import { Button as b } from "../../atoms/Button/Button.js";
6
+ import { Pricing as N } from "../Pricing/Pricing.js";
7
+ import { QuantityInput as z } from "../QuantityInput/QuantityInput.js";
8
+ import { Availability as k } from "../Availability/Availability.js";
9
+ import { Icon as c } from "../../atoms/Icon/Icon.js";
10
+ import { s as r } from "../../Cart.module-gkb4IOVS.js";
11
11
  function H({
12
- open: m,
13
- onClose: o,
14
- cart: a,
15
- subtotal: l,
16
- itemPriceLabel: c,
17
- contactHref: d,
18
- contactLinkBehavior: h,
19
- onItemQtyChange: p,
20
- onItemDelete: u,
12
+ open: o,
13
+ onClose: l,
14
+ cart: t,
15
+ subtotal: m,
16
+ itemPriceLabel: d,
17
+ contactHref: h,
18
+ contactLinkBehavior: p,
19
+ onItemQtyChange: u,
20
+ onItemDelete: f,
21
21
  onCheckout: v
22
22
  }) {
23
23
  var s;
24
- return a = a || { items: [] }, /* @__PURE__ */ e(
25
- g,
24
+ return t = t || { items: [] }, /* @__PURE__ */ e(
25
+ y,
26
26
  {
27
27
  side: "right",
28
- open: m,
29
- onClose: o,
28
+ open: o,
29
+ onClose: l,
30
30
  ariaLabel: "Shopping Cart",
31
- children: /* @__PURE__ */ t("div", { id: "cart-panel", className: r.cartContainer, children: [
32
- /* @__PURE__ */ t("div", { className: r.header, children: [
33
- /* @__PURE__ */ e(n, { size: "2xl", children: "Cart" }),
34
- /* @__PURE__ */ t(n, { size: "xs", colorToken: "quaternary", children: [
35
- (s = a == null ? void 0 : a.items) == null ? void 0 : s.length,
36
- " items in your cart"
37
- ] })
31
+ children: /* @__PURE__ */ a("div", { id: "cart-panel", className: r.cartContainer, children: [
32
+ /* @__PURE__ */ a("div", { className: r.headerWrapper, children: [
33
+ /* @__PURE__ */ a("div", { className: r.header, children: [
34
+ /* @__PURE__ */ e(n, { size: "2xl", children: "Cart" }),
35
+ /* @__PURE__ */ a(n, { size: "xs", colorToken: "quaternary", children: [
36
+ (s = t == null ? void 0 : t.items) == null ? void 0 : s.length,
37
+ " items in your cart"
38
+ ] })
39
+ ] }),
40
+ /* @__PURE__ */ e("button", { onClick: l, children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-xmark", size: "md" }) })
38
41
  ] }),
39
- /* @__PURE__ */ e("div", { className: r.cartItems, children: a.items.length > 0 ? /* @__PURE__ */ e("ul", { children: a.items.map((i) => /* @__PURE__ */ t("li", { className: r.cartItem, children: [
42
+ /* @__PURE__ */ e("div", { className: r.cartItems, children: t.items.length > 0 ? /* @__PURE__ */ e("ul", { children: t.items.map((i) => /* @__PURE__ */ a("li", { className: r.cartItem, children: [
40
43
  /* @__PURE__ */ e("img", { src: i.imageUrl, alt: `${i.itemId} product image` }),
41
- /* @__PURE__ */ t("div", { children: [
42
- /* @__PURE__ */ t("div", { className: r.topRow, children: [
43
- /* @__PURE__ */ t("div", { className: r.itemInfo, children: [
44
- /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: /* @__PURE__ */ e(y, { href: i.itemHref || `/part/${i.itemId}`, children: i.description }) }),
45
- /* @__PURE__ */ t(n, { size: "sm", children: [
44
+ /* @__PURE__ */ a("div", { children: [
45
+ /* @__PURE__ */ a("div", { className: r.topRow, children: [
46
+ /* @__PURE__ */ a("div", { className: r.itemInfo, children: [
47
+ /* @__PURE__ */ e(n, { size: "sm", weight: "semibold", children: /* @__PURE__ */ e(I, { href: i.itemHref || `/part/${i.itemId}`, children: i.description }) }),
48
+ /* @__PURE__ */ a(n, { size: "sm", children: [
46
49
  /* @__PURE__ */ e(n, { colorToken: "quaternary", size: "xs", children: i.custom ? "Specs " : "Part # " }),
47
50
  i.itemId
48
51
  ] })
49
52
  ] }),
50
- /* @__PURE__ */ e("button", { onClick: () => u(i), className: r.removeItem, "aria-label": "Remove item", children: /* @__PURE__ */ e(k, { iconKey: "fa-regular fa-trash", size: "sm" }) })
53
+ /* @__PURE__ */ e("button", { onClick: () => f(i), className: r.removeItem, "aria-label": "Remove item", children: /* @__PURE__ */ e(c, { iconKey: "fa-regular fa-trash", size: "sm" }) })
51
54
  ] }),
52
- /* @__PURE__ */ t("div", { className: r.itemManagement, children: [
53
- /* @__PURE__ */ t("div", { className: r.purchaseInformation, children: [
55
+ /* @__PURE__ */ a("div", { className: r.itemManagement, children: [
56
+ /* @__PURE__ */ a("div", { className: r.purchaseInformation, children: [
54
57
  /* @__PURE__ */ e(
55
- z,
58
+ k,
56
59
  {
57
60
  availId: i.availabilityId || "",
58
61
  availDescription: i.availability || "",
59
- contactHref: d || "",
60
- contactLinkBehavior: h || "new-tab"
62
+ contactHref: h || "",
63
+ contactLinkBehavior: p || "new-tab"
61
64
  }
62
65
  ),
63
- /* @__PURE__ */ e(b, { pricingLabel: c || "List Price", price: i.price })
66
+ /* @__PURE__ */ e(N, { pricingLabel: d || "List Price", price: i.price })
64
67
  ] }),
65
68
  /* @__PURE__ */ e(
66
- N,
69
+ z,
67
70
  {
68
71
  quantity: i.quantity,
69
- onQuantityChange: (f) => p(i, f),
72
+ onQuantityChange: (g) => u(i, g),
70
73
  size: "sm"
71
74
  }
72
75
  )
73
76
  ] })
74
77
  ] })
75
78
  ] }, i.id)) }) : /* @__PURE__ */ e("div", { className: r.noItems, children: /* @__PURE__ */ e(n, { as: "p", size: "sm", children: "No items in your cart yet" }) }) }),
76
- l && /* @__PURE__ */ t("div", { className: r.subtotal, children: [
79
+ m && /* @__PURE__ */ a("div", { className: r.subtotal, children: [
77
80
  /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: "Subtotal" }),
78
- /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: l })
81
+ /* @__PURE__ */ e(n, { size: "md", weight: "semibold", children: m })
79
82
  ] }),
80
83
  /* @__PURE__ */ e(
81
- I,
84
+ b,
82
85
  {
83
- disabled: a.items.length === 0,
86
+ disabled: t.items.length === 0,
84
87
  onClick: v,
85
88
  variant: "cta-primary",
86
89
  size: "md",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.154",
4
+ "version": "0.0.156",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -1,18 +0,0 @@
1
- import './assets/Cart.css';const t = "_cartIconButton_pkqoj_2", o = "_count_pkqoj_9", n = "_cartContainer_pkqoj_24", e = "_header_pkqoj_35", _ = "_cartItems_pkqoj_40", c = "_topRow_pkqoj_65", a = "_itemInfo_pkqoj_71", s = "_purchaseInformation_pkqoj_76", r = "_itemManagement_pkqoj_83", m = "_removeItem_pkqoj_101", p = "_noItems_pkqoj_111", u = "_subtotal_pkqoj_118", I = "_checkoutButton_pkqoj_125", k = {
2
- cartIconButton: t,
3
- count: o,
4
- cartContainer: n,
5
- header: e,
6
- cartItems: _,
7
- topRow: c,
8
- itemInfo: a,
9
- purchaseInformation: s,
10
- itemManagement: r,
11
- removeItem: m,
12
- noItems: p,
13
- subtotal: u,
14
- checkoutButton: I
15
- };
16
- export {
17
- k as s
18
- };