@caseparts-org/caseblocks 0.0.106 → 0.0.108

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
- ._main_1l043_1{box-shadow:#bbb3 0 8px 24px;padding:var(--spacing-0-5) 0;z-index:1;position:relative}._column_1l043_8{box-sizing:border-box;padding:0 var(--spacing-1)}._topNav_1l043_13{padding-bottom:var(--spacing-0-5);gap:var(--spacing-1-5)}@media (max-width: 1281px){._topNav_1l043_13{gap:var(--spacing-1);padding-bottom:0}}._logo_1l043_21{cursor:pointer}._operations_1l043_24{gap:var(--spacing-1-5);width:100%}@media (max-width: 1281px){._operations_1l043_24{gap:var(--spacing-1)}}._search_1l043_31{flex:1}._siteLink_1l043_34{color:var(--color-brand-primary-primary-black);cursor:default}._accountArea_1l043_38{width:145px}@media (max-width: 1281px){._accountArea_1l043_38{width:min-content}}._cart_1l043_44{border:none;padding:0;margin:0;background-color:transparent}._category_1l043_50{list-style:none}._category_1l043_50 a{color:var(--text-text-primary);font-weight:var(--font-weight-semibold);text-decoration:none;display:flex;flex-direction:row;align-items:center}@media (max-width: 1281px){._category_1l043_50 a{justify-content:space-between;width:100%}}._category_1l043_50 a:hover{color:var(--color-brand-primary-primary-teal-blue);text-decoration:none}._category_1l043_50 a path{fill:var(--color-brand-primary-primary-teal-blue)}._menuList_1l043_72{list-style:none;padding:0;margin:0;height:min-content;border:1px solid var(--border-border-secondary-btn, #dfdfdf)}._menuList_1l043_72>li{width:100%;padding:var(--spacing-0-5) var(--spacing-1);border-bottom:1px solid var(--border-border-secondary-btn, #dfdfdf);box-sizing:border-box}._menuList_1l043_72>li:last-of-type{border-bottom:none}
1
+ ._main_19pdr_1{box-shadow:#bbb3 0 8px 24px;padding:var(--spacing-0-5) 0;z-index:1;position:relative}._column_19pdr_8{box-sizing:border-box;padding:0 var(--spacing-1)}._topNav_19pdr_13{padding-bottom:var(--spacing-0-5);gap:var(--spacing-1-5)}@media (max-width: 1281px){._topNav_19pdr_13{gap:var(--spacing-1);padding-bottom:0}}._logo_19pdr_21{cursor:pointer}._operations_19pdr_24{gap:var(--spacing-1-5);width:100%}@media (max-width: 1281px){._operations_19pdr_24{gap:var(--spacing-1)}}._search_19pdr_31{flex:1}._siteLink_19pdr_34{color:var(--color-brand-primary-primary-black);cursor:default;border:none;background-color:transparent;padding:0;margin:0;font-family:var(--font-family-display);font-size:var(--font-size-md)}._siteLink_19pdr_34:hover{text-decoration:underline}._accountArea_19pdr_48{width:145px}@media (max-width: 1281px){._accountArea_19pdr_48{width:min-content}}._cart_19pdr_54{border:none;padding:0;margin:0;background-color:transparent}._category_19pdr_60{list-style:none}._category_19pdr_60 a{color:var(--text-text-primary);font-weight:var(--font-weight-semibold);text-decoration:none;display:flex;flex-direction:row;align-items:center}@media (max-width: 1281px){._category_19pdr_60 a{justify-content:space-between;width:100%}}._category_19pdr_60 a:hover{color:var(--color-brand-primary-primary-teal-blue);text-decoration:none}._category_19pdr_60 a path{fill:var(--color-brand-primary-primary-teal-blue)}._menuList_19pdr_82{list-style:none;padding:0;margin:0;height:min-content;border:1px solid var(--border-border-secondary-btn, #dfdfdf)}._menuList_19pdr_82>li{width:100%;padding:var(--spacing-0-5) var(--spacing-1);border-bottom:1px solid var(--border-border-secondary-btn, #dfdfdf);box-sizing:border-box}._menuList_19pdr_82>li:last-of-type{border-bottom:none}
@@ -1 +1 @@
1
- ._button_1mhe3_1{--inset-shadow-color: var(--surface-surface-primary-btn);--inset-shadow-style: 0 0 0, inset 0 0 0 var(--spacing-0-125) var(--inset-shadow-color);transition-property:background-color,border-width,box-shadow,color;transition-duration:.1s;transition-timing-function:ease-in;padding:var(--spacing-1);border:none;cursor:pointer;text-decoration:none;text-align:center;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--spacing-spacing-3xs)}._button_1mhe3_1:hover{box-shadow:var(--color-neutrals-neutral-2) var(--spacing-0-125) var(--spacing-0-25) var(--spacing-0-5)}._button_1mhe3_1:active{box-shadow:none}._button_1mhe3_1:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert);transition:none;cursor:default}._button_1mhe3_1:disabled:hover{box-shadow:none}._button-primary_1mhe3_44{background-color:var(--surface-surface-primary-btn);color:var(--surface-surface-primary)}._button-primary_1mhe3_44:active{background-color:var(--color-brand-secondary-dark-teal-blue)}._button-primary_1mhe3_44:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-secondary_1mhe3_58{background-color:var(--surface-surface-secondary-btn);border:1px solid var(--border-border-secondary-btn);color:var(--text-text-links)}._button-secondary_1mhe3_58:active{--inset-shadow-color: var(--surface-surface-secondary);box-shadow:var(--inset-shadow-style)}._button-secondary_1mhe3_58:disabled{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-secondary_1mhe3_58:disabled:hover{box-shadow:var(--inset-shadow-style)}._button-secondary-transparent_1mhe3_80{background-color:transparent;border:1px solid var(--color-neutrals-neutral-1);color:var(--color-neutrals-neutral-1)}._button-secondary-transparent_1mhe3_80:disabled{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);border:1px solid var(--border-border-primary)}._button-secondary-transparent_1mhe3_80:disabled:hover{color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-disabled-btn-focus);box-shadow:none}._button-secondary-transparent_1mhe3_80:hover{background-color:var(--color-neutrals-neutral-1);border:1px solid var(--border-border-primary);color:#000;box-shadow:none}._button-cta-primary_1mhe3_105{background-color:var(--surface-surface-call-to-action-btn);color:var(--surface-surface-primary)}._button-cta-primary_1mhe3_105:active{background-color:var(--surface-surface-call-to-action-btn-focus)}._button-cta-primary_1mhe3_105:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-tertiary_1mhe3_119{background-color:var(--surface-surface-tertiary-btn);color:var(--surface-surface-tertiary-btn-focus)}._button-tertiary_1mhe3_119:active{color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-tertiary_1mhe3_119:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-destructive_1mhe3_137{background-color:var(--surface-surface-error-warning-btn);color:var(--surface-surface-primary)}._button-destructive_1mhe3_137:active{color:var(--surface-surface-error-warning-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--border-border-error-warning);box-shadow:var(--inset-shadow-style)}._button-destructive_1mhe3_137:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-size-xxs_1mhe3_155{border-radius:var(--border-radius-xs);padding:var(--spacing-spacing-4xs) var(--spacing-spacing-4xs)}._button-size-xs_1mhe3_159{border-radius:var(--border-radius-xs);padding:calc(var(--spacing-spacing-4xs) - 1px) var(--spacing-spacing-2xs)}._button-size-sm_1mhe3_163{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-3xs) - 1px) var(--spacing-0-75)}._button-size-md_1mhe3_167,._button-size-lg_1mhe3_171{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-2xs) - 1px) var(--spacing-spacing-default)}._button-size-xl_1mhe3_175{border-radius:var(--border-radius-sm);padding:var(--spacing-0-75) var(--spacing-spacing-default)}._button-primary_1mhe3_44._button-disabled_1mhe3_180{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-secondary_1mhe3_58._button-disabled_1mhe3_180{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-secondary_1mhe3_58._button-disabled_1mhe3_180:hover{box-shadow:var(--inset-shadow-style)}._button-secondary-transparent_1mhe3_80._button-disabled_1mhe3_180{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style);border:1px solid var(--border-border-primary)}._button-secondary-transparent_1mhe3_80._button-disabled_1mhe3_180:hover{box-shadow:var(--inset-shadow-style);color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-disabled-btn-focus)}._button-cta-primary_1mhe3_105._button-disabled_1mhe3_180,._button-tertiary_1mhe3_119._button-disabled_1mhe3_180,._button-destructive_1mhe3_137._button-disabled_1mhe3_180{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}
1
+ ._button_15vt6_1{--inset-shadow-color: var(--surface-surface-primary-btn);--inset-shadow-style: 0 0 0, inset 0 0 0 var(--spacing-0-125) var(--inset-shadow-color);transition-property:background-color,border-width,box-shadow,color;transition-duration:.1s;transition-timing-function:ease-in;padding:var(--spacing-1);border:none;cursor:pointer;text-decoration:none;text-align:center;display:flex;flex-direction:row;align-items:center;justify-content:center;gap:var(--spacing-spacing-3xs)}._button_15vt6_1:hover{box-shadow:var(--color-neutrals-neutral-2) var(--spacing-0-125) var(--spacing-0-25) var(--spacing-0-5)}._button_15vt6_1:active{box-shadow:none}._button_15vt6_1:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert);transition:none;cursor:default}._button_15vt6_1:disabled:hover{box-shadow:none}._button-primary_15vt6_44{background-color:var(--surface-surface-primary-btn);color:var(--surface-surface-primary)}._button-primary_15vt6_44:active{background-color:var(--color-brand-secondary-dark-teal-blue)}._button-primary_15vt6_44:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-secondary_15vt6_58{background-color:var(--surface-surface-secondary-btn);border:1px solid var(--border-border-secondary-btn);color:var(--text-text-links)}._button-secondary_15vt6_58:active{--inset-shadow-color: var(--surface-surface-secondary);box-shadow:var(--inset-shadow-style)}._button-secondary_15vt6_58:disabled{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);box-shadow:none}._button-secondary_15vt6_58:disabled:hover{box-shadow:var(--inset-shadow-style)}._button-secondary-transparent_15vt6_79{background-color:transparent;border:1px solid var(--color-neutrals-neutral-1);color:var(--color-neutrals-neutral-1)}._button-secondary-transparent_15vt6_79:disabled{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);border:1px solid var(--border-border-primary)}._button-secondary-transparent_15vt6_79:disabled:hover{color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-disabled-btn-focus);box-shadow:none}._button-secondary-transparent_15vt6_79:hover{background-color:var(--color-neutrals-neutral-1);border:1px solid var(--border-border-primary);color:#000;box-shadow:none}._button-cta-primary_15vt6_104{background-color:var(--surface-surface-call-to-action-btn);color:var(--surface-surface-primary)}._button-cta-primary_15vt6_104:active{background-color:var(--surface-surface-call-to-action-btn-focus)}._button-cta-primary_15vt6_104:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-tertiary_15vt6_118{background-color:var(--surface-surface-tertiary-btn);color:var(--surface-surface-tertiary-btn-focus)}._button-tertiary_15vt6_118:active{color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-tertiary_15vt6_118:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-destructive_15vt6_136{background-color:var(--surface-surface-error-warning-btn);color:var(--surface-surface-primary)}._button-destructive_15vt6_136:active{color:var(--surface-surface-error-warning-btn);background-color:var(--surface-surface-tertiary-btn-focus);--inset-shadow-color: var(--border-border-error-warning);box-shadow:var(--inset-shadow-style)}._button-destructive_15vt6_136:active:disabled{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-size-xxs_15vt6_154{border-radius:var(--border-radius-xs);padding:var(--spacing-spacing-4xs) var(--spacing-spacing-4xs)}._button-size-xs_15vt6_158{border-radius:var(--border-radius-xs);padding:calc(var(--spacing-spacing-4xs) - 1px) var(--spacing-spacing-2xs)}._button-size-sm_15vt6_162{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-3xs) - 1px) var(--spacing-0-75)}._button-size-md_15vt6_166,._button-size-lg_15vt6_170{border-radius:var(--border-radius-sm);padding:calc(var(--spacing-spacing-2xs) - 1px) var(--spacing-spacing-default)}._button-size-xl_15vt6_174{border-radius:var(--border-radius-sm);padding:var(--spacing-0-75) var(--spacing-spacing-default)}._button-primary_15vt6_44._button-disabled_15vt6_179{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}._button-secondary_15vt6_58._button-disabled_15vt6_179{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style)}._button-secondary_15vt6_58._button-disabled_15vt6_179:hover{box-shadow:var(--inset-shadow-style)}._button-secondary-transparent_15vt6_79._button-disabled_15vt6_179{background-color:var(--surface-surface-disabled-btn-focus);color:var(--surface-surface-disabled-btn);--inset-shadow-color: var(--surface-surface-disabled-btn);box-shadow:var(--inset-shadow-style);border:1px solid var(--border-border-primary)}._button-secondary-transparent_15vt6_79._button-disabled_15vt6_179:hover{box-shadow:var(--inset-shadow-style);color:var(--surface-surface-disabled-btn);background-color:var(--surface-surface-disabled-btn-focus)}._button-cta-primary_15vt6_104._button-disabled_15vt6_179,._button-tertiary_15vt6_118._button-disabled_15vt6_179,._button-destructive_15vt6_136._button-disabled_15vt6_179{background-color:var(--surface-surface-disabled-btn);color:var(--text-text-invert)}
@@ -1,41 +1,41 @@
1
- import { t as e } from "../../Text.module-Dzhzk2fH.js";
1
+ import { t as o } from "../../Text.module-Dzhzk2fH.js";
2
2
  import { c as u } from "../../clsx-OuTLNxxd.js";
3
3
  import { getHideAtStyles as r } from "../HideAt.js";
4
- import '../../assets/buttonClassName.css';const m = "_button_1mhe3_1", t = {
5
- button: m,
6
- "button-primary": "_button-primary_1mhe3_44",
7
- "button-secondary": "_button-secondary_1mhe3_58",
8
- "button-secondary-transparent": "_button-secondary-transparent_1mhe3_80",
9
- "button-cta-primary": "_button-cta-primary_1mhe3_105",
10
- "button-tertiary": "_button-tertiary_1mhe3_119",
11
- "button-destructive": "_button-destructive_1mhe3_137",
12
- "button-size-xxs": "_button-size-xxs_1mhe3_155",
13
- "button-size-xs": "_button-size-xs_1mhe3_159",
14
- "button-size-sm": "_button-size-sm_1mhe3_163",
15
- "button-size-md": "_button-size-md_1mhe3_167",
16
- "button-size-lg": "_button-size-lg_1mhe3_171",
17
- "button-size-xl": "_button-size-xl_1mhe3_175",
18
- "button-disabled": "_button-disabled_1mhe3_180"
4
+ import '../../assets/buttonClassName.css';const i = "_button_15vt6_1", t = {
5
+ button: i,
6
+ "button-primary": "_button-primary_15vt6_44",
7
+ "button-secondary": "_button-secondary_15vt6_58",
8
+ "button-secondary-transparent": "_button-secondary-transparent_15vt6_79",
9
+ "button-cta-primary": "_button-cta-primary_15vt6_104",
10
+ "button-tertiary": "_button-tertiary_15vt6_118",
11
+ "button-destructive": "_button-destructive_15vt6_136",
12
+ "button-size-xxs": "_button-size-xxs_15vt6_154",
13
+ "button-size-xs": "_button-size-xs_15vt6_158",
14
+ "button-size-sm": "_button-size-sm_15vt6_162",
15
+ "button-size-md": "_button-size-md_15vt6_166",
16
+ "button-size-lg": "_button-size-lg_15vt6_170",
17
+ "button-size-xl": "_button-size-xl_15vt6_174",
18
+ "button-disabled": "_button-disabled_15vt6_179"
19
19
  };
20
- function h({
21
- size: o,
22
- variant: n,
23
- hideAt: s,
24
- className: _,
20
+ function v({
21
+ size: n,
22
+ variant: s,
23
+ hideAt: _,
24
+ className: e,
25
25
  disabled: b
26
26
  }) {
27
27
  return u(
28
28
  t.button,
29
- t[`button-${n}`],
30
- t[`button-size-${o}`],
31
- e.text,
32
- e[`text-${o}`],
33
- e["text-semibold"],
34
- r(s),
29
+ t[`button-${s}`],
30
+ t[`button-size-${n}`],
31
+ o.text,
32
+ o[`text-${n}`],
33
+ o["text-semibold"],
34
+ r(_),
35
35
  b && t["button-disabled"],
36
- _
36
+ e
37
37
  );
38
38
  }
39
39
  export {
40
- h as buttonClassNames
40
+ v as buttonClassNames
41
41
  };
@@ -1,121 +1,127 @@
1
- import { jsxs as N, Fragment as W, jsx as O } from "react/jsx-runtime";
2
- import * as i from "react";
1
+ import { jsxs as W, Fragment as X, jsx as O } from "react/jsx-runtime";
2
+ import * as r from "react";
3
3
  import { c as S } from "../../clsx-OuTLNxxd.js";
4
- import { r as X } from "../../index-B4KbmMH3.js";
5
- import '../../assets/Tooltip.css';const Y = "_tooltip_17o7a_1", A = "_content_17o7a_11", j = {
6
- tooltip: Y,
7
- content: A
4
+ import { r as Y } from "../../index-B4KbmMH3.js";
5
+ import '../../assets/Tooltip.css';const A = "_tooltip_17o7a_1", D = "_content_17o7a_11", j = {
6
+ tooltip: A,
7
+ content: D
8
8
  };
9
- function D(f) {
10
- return f ? f.includes(" ") ? f : `${f} center` : "top center";
9
+ function $(a) {
10
+ return a ? a.includes(" ") ? a : `${a} center` : "top center";
11
11
  }
12
- function I(f) {
13
- const v = D(f).toLowerCase(), [s, n] = v.split(" ");
12
+ function q(a) {
13
+ const v = $(a).toLowerCase(), [s, n] = v.split(" ");
14
14
  return { side: ["top", "right", "bottom", "left"].includes(s) ? s : "top", align: n === "left" || n === "top" ? "start" : n === "right" || n === "bottom" ? "end" : "center" };
15
15
  }
16
- function $(f, v, s, n, h = 0) {
17
- const o = f.getBoundingClientRect(), a = v.getBoundingClientRect(), m = window.pageXOffset || document.documentElement.scrollLeft || 0, d = window.pageYOffset || document.documentElement.scrollTop || 0;
16
+ function G(a, v, s, n, h = 0) {
17
+ const o = a.getBoundingClientRect(), d = v.getBoundingClientRect(), m = window.pageXOffset || document.documentElement.scrollLeft || 0, p = window.pageYOffset || document.documentElement.scrollTop || 0;
18
18
  let l = 0, c = 0;
19
- s === "top" ? l = d + o.top - a.height - h : s === "bottom" ? l = d + o.bottom + h : s === "left" ? c = m + o.left - a.width - h : s === "right" && (c = m + o.right + h), s === "top" || s === "bottom" ? n === "start" ? c = m + o.left : n === "end" ? c = m + o.right - a.width : c = m + o.left + o.width / 2 - a.width / 2 : n === "start" ? l = d + o.top : n === "end" ? l = d + o.bottom - a.height : l = d + o.top + o.height / 2 - a.height / 2;
19
+ s === "top" ? l = p + o.top - d.height - h : s === "bottom" ? l = p + o.bottom + h : s === "left" ? c = m + o.left - d.width - h : s === "right" && (c = m + o.right + h), s === "top" || s === "bottom" ? n === "start" ? c = m + o.left : n === "end" ? c = m + o.right - d.width : c = m + o.left + o.width / 2 - d.width / 2 : n === "start" ? l = p + o.top : n === "end" ? l = p + o.bottom - d.height : l = p + o.top + o.height / 2 - d.height / 2;
20
20
  const R = window.innerWidth, t = window.innerHeight;
21
- return l = Math.max(d + 4, Math.min(d + t - a.height - 4, l)), c = Math.max(m + 4, Math.min(m + R - a.width - 4, c)), { top: l, left: c };
21
+ return l = Math.max(p + 4, Math.min(p + t - d.height - 4, l)), c = Math.max(m + 4, Math.min(m + R - d.width - 4, c)), { top: l, left: c };
22
22
  }
23
- const K = ({
24
- tooltipClassName: f,
23
+ const U = ({
24
+ tooltipClassName: a,
25
25
  contentClassName: v,
26
26
  children: s,
27
27
  trigger: n,
28
28
  position: h,
29
29
  disabled: o,
30
- openDelay: a = 150,
30
+ openDelay: d = 150,
31
31
  closeDelay: m = 100,
32
- leaveGraceMs: d = 0,
32
+ leaveGraceMs: p = 0,
33
33
  tooltipOffset: l = 4
34
34
  }) => {
35
- const { side: c, align: R } = I(h), [t, P] = i.useState(!1), [w, C] = i.useState(null), b = i.useRef(null), T = i.useRef(null), x = i.useRef(null), L = i.useRef(null), y = i.useRef(null), E = i.useRef(!1), p = (e) => {
35
+ const { side: c, align: R } = q(h), [t, P] = r.useState(!1), [w, z] = r.useState(null), b = r.useRef(null), C = r.useRef(null), g = r.useRef(null), L = r.useRef(null), y = r.useRef(null), E = r.useRef(!1), B = r.useId(), u = (e) => {
36
36
  e.current && (window.clearTimeout(e.current), e.current = null);
37
- }, B = () => {
38
- p(x), p(L), p(y);
37
+ }, k = () => {
38
+ u(g), u(L), u(y);
39
39
  };
40
- i.useEffect(() => () => B(), []);
41
- const k = () => {
42
- o || t || (p(x), x.current = window.setTimeout(() => P(!0), a));
40
+ r.useEffect(() => () => k(), []);
41
+ const F = () => {
42
+ o || t || (u(g), g.current = window.setTimeout(() => P(!0), d));
43
+ }, H = () => {
44
+ const e = b.current;
45
+ if (e && e.matches(":hover") || E.current) {
46
+ T();
47
+ return;
48
+ }
49
+ P(!1);
50
+ }, T = () => {
51
+ t && (u(L), L.current = window.setTimeout(H, m));
43
52
  }, _ = () => {
44
- t && (p(L), L.current = window.setTimeout(() => {
45
- const e = b.current;
46
- e && e.matches(":hover") || E.current || P(!1);
47
- }, m));
48
- }, z = () => {
49
53
  if (t) {
50
- if (p(y), d <= 0) {
51
- _();
54
+ if (u(y), p <= 0) {
55
+ T();
52
56
  return;
53
57
  }
54
58
  y.current = window.setTimeout(() => {
55
- E.current || _();
56
- }, d);
59
+ E.current || T();
60
+ }, p);
57
61
  }
58
- }, g = (e, r) => (u) => {
59
- e == null || e(u), r == null || r(u);
60
- }, H = i.cloneElement(n, {
62
+ }, x = (e, i) => (f) => {
63
+ e == null || e(f), i == null || i(f);
64
+ }, N = r.cloneElement(n, {
61
65
  ref: (e) => {
62
- const { ref: r } = n;
63
- typeof r == "function" ? r(e) : r && (r.current = e), b.current = e;
66
+ const { ref: i } = n;
67
+ typeof i == "function" ? i(e) : i && (i.current = e), b.current = e;
64
68
  },
65
- onPointerEnter: g(n.props.onPointerEnter, () => {
66
- p(L), p(y), t || k();
69
+ onPointerEnter: x(n.props.onPointerEnter, () => {
70
+ u(L), u(y), t || F();
71
+ }),
72
+ onPointerLeave: x(n.props.onPointerLeave, () => {
73
+ u(g), _();
67
74
  }),
68
- onPointerLeave: g(n.props.onPointerLeave, z),
69
- onFocus: g(n.props.onFocus, k),
70
- onBlur: g(n.props.onBlur, _),
71
- "aria-describedby": t ? "tooltip-popup" : void 0,
75
+ onFocus: x(n.props.onFocus, F),
76
+ onBlur: x(n.props.onBlur, T),
77
+ "aria-describedby": t ? B : void 0,
72
78
  style: { ...n.props.style || {}, outline: "none" }
73
79
  });
74
- return i.useEffect(() => {
75
- o && t && (B(), P(!1));
76
- }, [o]), i.useEffect(() => {
80
+ return r.useEffect(() => {
81
+ o && t && (k(), P(!1));
82
+ }, [o]), r.useEffect(() => {
77
83
  if (!t) return;
78
- const e = (r) => {
79
- r.key === "Escape" && P(!1);
84
+ const e = (i) => {
85
+ i.key === "Escape" && P(!1);
80
86
  };
81
87
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
82
- }, [t]), i.useLayoutEffect(() => {
88
+ }, [t]), r.useLayoutEffect(() => {
83
89
  if (!t) {
84
- C(null);
90
+ z(null);
85
91
  return;
86
92
  }
87
- const e = b.current, r = T.current;
88
- if (!e || !r) return;
89
- const u = () => {
90
- C($(e, r, c, R, l));
93
+ const e = b.current, i = C.current;
94
+ if (!e || !i) return;
95
+ const f = () => {
96
+ z(G(e, i, c, R, l));
91
97
  };
92
- return u(), window.addEventListener("resize", u), window.addEventListener("scroll", u, !0), () => {
93
- window.removeEventListener("resize", u), window.removeEventListener("scroll", u, !0);
98
+ return f(), window.addEventListener("resize", f), window.addEventListener("scroll", f, !0), () => {
99
+ window.removeEventListener("resize", f), window.removeEventListener("scroll", f, !0);
94
100
  };
95
- }, [t, c, R, s, l]), i.useEffect(() => {
101
+ }, [t, c, R, s, l]), r.useEffect(() => {
96
102
  if (!t) return;
97
- const e = (r) => {
98
- const u = b.current, F = T.current;
99
- if (!u || !F) return;
100
- const M = r.target;
101
- !u.contains(M) && !F.contains(M) && (E.current = !1, z());
103
+ const e = (i) => {
104
+ const f = b.current, I = C.current;
105
+ if (!f || !I) return;
106
+ const M = i.target;
107
+ !f.contains(M) && !I.contains(M) && (E.current = !1, _());
102
108
  };
103
109
  return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
104
- }, [t]), i.useEffect(() => {
110
+ }, [t]), r.useEffect(() => {
105
111
  t || (E.current = !1);
106
- }, [t]), /* @__PURE__ */ N(W, { children: [
107
- H,
108
- t && typeof document < "u" && X.createPortal(
112
+ }, [t]), /* @__PURE__ */ W(X, { children: [
113
+ N,
114
+ t && typeof document < "u" && Y.createPortal(
109
115
  /* @__PURE__ */ O(
110
116
  "div",
111
117
  {
112
- id: "tooltip-popup",
113
- ref: T,
118
+ id: B,
119
+ ref: C,
114
120
  role: "tooltip",
115
121
  "aria-hidden": !t,
116
122
  "data-side": c,
117
123
  "data-align": R,
118
- className: S(j.tooltip, f),
124
+ className: S(j.tooltip, a),
119
125
  style: {
120
126
  position: "absolute",
121
127
  top: (w == null ? void 0 : w.top) ?? 0,
@@ -124,10 +130,10 @@ const K = ({
124
130
  zIndex: 10
125
131
  },
126
132
  onPointerEnter: () => {
127
- E.current = !0, p(L), p(y);
133
+ E.current = !0, u(L), u(y);
128
134
  },
129
135
  onPointerLeave: () => {
130
- E.current = !1, z();
136
+ E.current = !1, _();
131
137
  },
132
138
  children: /* @__PURE__ */ O("div", { className: S(j.content, v), children: s })
133
139
  }
@@ -137,5 +143,5 @@ const K = ({
137
143
  ] });
138
144
  };
139
145
  export {
140
- K as Tooltip
146
+ U as Tooltip
141
147
  };
@@ -6,7 +6,6 @@ export interface MainNavProps extends CartPropsBase, React.HTMLAttributes<HTMLDi
6
6
  categories?: CategoryWithChildren[];
7
7
  homeRoute: string;
8
8
  faqRoute: string;
9
- byModelSerialRoute: string;
10
9
  customPartsRoute: string;
11
10
  aboutUsRoute: string;
12
11
  accountRoute: string;
@@ -14,6 +13,7 @@ export interface MainNavProps extends CartPropsBase, React.HTMLAttributes<HTMLDi
14
13
  cart: ShoppingCart;
15
14
  onLoginClick: () => void;
16
15
  onSearch: (_input: string) => void;
16
+ onClickModelSerial: () => void;
17
17
  }
18
18
  export type MainNavHandle = ShoppingCartHandle;
19
19
  export declare const MainNav: React.ForwardRefExoticComponent<MainNavProps & React.RefAttributes<ShoppingCartHandle>>;
@@ -1,49 +1,49 @@
1
1
  import { jsx as e, jsxs as o } from "react/jsx-runtime";
2
- import b from "react";
3
- import { Text as _ } from "../../atoms/Text/Text.js";
2
+ import D from "react";
3
+ import { Text as N } from "../../atoms/Text/Text.js";
4
4
  import { Link as l } from "../../atoms/Link/Link.js";
5
- import { Icon as j } from "../../atoms/Icon/Icon.js";
5
+ import { Icon as M } from "../../atoms/Icon/Icon.js";
6
6
  import { Flex as t } from "../../atoms/Flex/Flex.js";
7
- import { Grid as D, Column as M } from "../../atoms/Grid/Grid.js";
8
- import { Logo as z } from "../../molecules/Logo/Logo.js";
9
- import { SearchBox as p } from "../../molecules/SearchBox/SearchBox.js";
10
- import { HamburgerMenu as I } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
11
- import { ShoppingCart as U } from "../../molecules/Cart/Cart.js";
12
- import { Account as F } from "../../molecules/Account/Account.js";
13
- import { CategoryNav as S } from "../../molecules/CategoryNav/CategoryNav.js";
14
- import { c as B } from "../../clsx-OuTLNxxd.js";
15
- import '../../assets/MainNav.css';const G = "_main_1l043_1", H = "_column_1l043_8", K = "_topNav_1l043_13", P = "_logo_1l043_21", Q = "_operations_1l043_24", T = "_search_1l043_31", W = "_siteLink_1l043_34", q = "_accountArea_1l043_38", E = "_category_1l043_50", J = "_menuList_1l043_72", r = {
7
+ import { Grid as z, Column as I } from "../../atoms/Grid/Grid.js";
8
+ import { Logo as S } from "../../molecules/Logo/Logo.js";
9
+ import { SearchBox as _ } from "../../molecules/SearchBox/SearchBox.js";
10
+ import { HamburgerMenu as U } from "../../molecules/HamburgerMenu/HamburgerMenu.js";
11
+ import { ShoppingCart as F } from "../../molecules/Cart/Cart.js";
12
+ import { Account as H } from "../../molecules/Account/Account.js";
13
+ import { CategoryNav as B } from "../../molecules/CategoryNav/CategoryNav.js";
14
+ import { c as s } from "../../clsx-OuTLNxxd.js";
15
+ import { getHideAtStyles as u } from "../../atoms/HideAt.js";
16
+ import '../../assets/MainNav.css';const G = "_main_19pdr_1", K = "_column_19pdr_8", P = "_topNav_19pdr_13", Q = "_logo_19pdr_21", T = "_operations_19pdr_24", W = "_search_19pdr_31", q = "_siteLink_19pdr_34", E = "_accountArea_19pdr_48", J = "_category_19pdr_60", O = "_menuList_19pdr_82", r = {
16
17
  main: G,
17
- column: H,
18
- topNav: K,
19
- logo: P,
20
- operations: Q,
21
- search: T,
22
- siteLink: W,
23
- accountArea: q,
24
- category: E,
25
- menuList: J
26
- }, ae = b.forwardRef(function({
18
+ column: K,
19
+ topNav: P,
20
+ logo: Q,
21
+ operations: T,
22
+ search: W,
23
+ siteLink: q,
24
+ accountArea: E,
25
+ category: J,
26
+ menuList: O
27
+ }, le = D.forwardRef(function({
27
28
  account: c,
28
29
  categories: n,
29
- byModelSerialRoute: m,
30
- homeRoute: u,
31
- faqRoute: N,
32
- customPartsRoute: h,
33
- aboutUsRoute: g,
34
- accountRoute: v,
35
- contactRoute: d,
36
- cart: A,
37
- onLoginClick: x,
38
- onSearch: f,
39
- open: L,
40
- // NEW: consume external panel control props from CartPropsBase
41
- onCartClick: C,
42
- // NEW: callback from consumer
30
+ homeRoute: g,
31
+ faqRoute: v,
32
+ customPartsRoute: d,
33
+ aboutUsRoute: A,
34
+ accountRoute: L,
35
+ contactRoute: h,
36
+ cart: x,
37
+ open: C,
38
+ // consume external panel control props from CartPropsBase
43
39
  className: k,
40
+ onLoginClick: y,
41
+ onSearch: p,
42
+ onClickModelSerial: f,
43
+ onCartClick: b,
44
44
  ...w
45
- }, y) {
46
- return /* @__PURE__ */ e(D, { ...w, gridWrapperClassName: B(r.main, k), children: /* @__PURE__ */ o(M, { span: 12, className: r.column, children: [
45
+ }, j) {
46
+ return /* @__PURE__ */ e(z, { ...w, gridWrapperClassName: s(r.main, k), children: /* @__PURE__ */ o(I, { span: 12, className: r.column, children: [
47
47
  /* @__PURE__ */ o(
48
48
  t,
49
49
  {
@@ -52,7 +52,7 @@ import '../../assets/MainNav.css';const G = "_main_1l043_1", H = "_column_1l043_
52
52
  justifyContent: "space-between",
53
53
  className: r.topNav,
54
54
  children: [
55
- /* @__PURE__ */ e("div", { className: r.logo, children: /* @__PURE__ */ e(l, { href: u, children: /* @__PURE__ */ e(z, {}) }) }),
55
+ /* @__PURE__ */ e("div", { className: r.logo, children: /* @__PURE__ */ e(l, { href: g, children: /* @__PURE__ */ e(S, {}) }) }),
56
56
  /* @__PURE__ */ o(
57
57
  t,
58
58
  {
@@ -61,38 +61,38 @@ import '../../assets/MainNav.css';const G = "_main_1l043_1", H = "_column_1l043_
61
61
  justifyContent: "flex-end",
62
62
  className: r.operations,
63
63
  children: [
64
- /* @__PURE__ */ e(t, { flexDirection: "row", hideAt: ["sm"], className: r.search, children: /* @__PURE__ */ e(p, { onSearch: f, inputName: "cpc-search" }) }),
65
- /* @__PURE__ */ e(i, { href: m, hideAt: ["sm", "md"], children: "Model/Serial" }),
66
- /* @__PURE__ */ e(i, { href: h, hideAt: ["sm", "md"], children: "Custom Parts" }),
67
- /* @__PURE__ */ e(i, { href: d, hideAt: ["sm", "md"], children: "Contact Us" }),
64
+ /* @__PURE__ */ e(t, { flexDirection: "row", hideAt: ["sm"], className: r.search, children: /* @__PURE__ */ e(_, { onSearch: p, inputName: "cpc-search" }) }),
65
+ /* @__PURE__ */ e("button", { onClick: f, className: s(r.siteLink, u(["sm", "md"])), children: "Model/Serial" }),
66
+ /* @__PURE__ */ e(i, { href: d, hideAt: ["sm", "md"], children: "Custom Parts" }),
67
+ /* @__PURE__ */ e(i, { href: h, hideAt: ["sm", "md"], children: "Contact Us" }),
68
68
  /* @__PURE__ */ e("div", { className: r.accountArea, children: /* @__PURE__ */ e(
69
- F,
69
+ H,
70
70
  {
71
71
  account: c,
72
- accountRoute: v,
73
- onLoginClick: x,
72
+ accountRoute: L,
73
+ onLoginClick: y,
74
74
  className: r.avatar
75
75
  }
76
76
  ) }),
77
77
  /* @__PURE__ */ e(
78
- U,
78
+ F,
79
79
  {
80
- ref: y,
81
- cart: A,
82
- open: L,
83
- onCartClick: C
80
+ ref: j,
81
+ cart: x,
82
+ open: C,
83
+ onCartClick: b
84
84
  }
85
85
  ),
86
- /* @__PURE__ */ e(I, { hideAt: ["lg"], children: /* @__PURE__ */ o("ul", { className: r.menuList, children: [
87
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: m, children: "Make/Serial" }) }),
88
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: h, children: "Custom Parts" }) }),
89
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: d, children: "Contact Us" }) }),
90
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: N, children: "FAQ" }) }),
91
- /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: g, children: "About Us" }) }),
86
+ /* @__PURE__ */ e(U, { hideAt: ["lg"], children: /* @__PURE__ */ o("ul", { className: r.menuList, children: [
87
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e("button", { onClick: f, className: s(r.siteLink, u(["lg"])), children: "Model/Serial" }) }),
88
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: d, children: "Custom Parts" }) }),
89
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: h, children: "Contact Us" }) }),
90
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: v, children: "FAQ" }) }),
91
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ e(i, { href: A, children: "About Us" }) }),
92
92
  n && n.map((a) => /* @__PURE__ */ e("li", { className: r.category, children: /* @__PURE__ */ o(l, { href: a.route, children: [
93
- /* @__PURE__ */ e(_, { size: "sm", weight: "semibold", children: a.label }),
93
+ /* @__PURE__ */ e(N, { size: "sm", weight: "semibold", children: a.label }),
94
94
  /* @__PURE__ */ e(
95
- j,
95
+ M,
96
96
  {
97
97
  iconKey: "fa-solid fa-chevron-right",
98
98
  title: "Navigate",
@@ -107,17 +107,17 @@ import '../../assets/MainNav.css';const G = "_main_1l043_1", H = "_column_1l043_
107
107
  ]
108
108
  }
109
109
  ),
110
- /* @__PURE__ */ e(t, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(p, { onSearch: f, inputName: "cpc-search", className: r.search }) }),
111
- /* @__PURE__ */ e(S, { categories: n })
110
+ /* @__PURE__ */ e(t, { flexDirection: "row", hideAt: ["md", "lg"], children: /* @__PURE__ */ e(_, { onSearch: p, inputName: "cpc-search", className: r.search }) }),
111
+ /* @__PURE__ */ e(B, { categories: n })
112
112
  ] }) });
113
113
  });
114
114
  function i({
115
- href: s,
115
+ href: m,
116
116
  children: c,
117
117
  ...n
118
118
  }) {
119
- return /* @__PURE__ */ e(l, { href: s, className: r.siteLink, ...n, children: /* @__PURE__ */ e(_, { size: "md", variant: "display", children: c }) });
119
+ return /* @__PURE__ */ e(l, { href: m, className: r.siteLink, ...n, children: /* @__PURE__ */ e(N, { size: "md", variant: "display", children: c }) });
120
120
  }
121
121
  export {
122
- ae as MainNav
122
+ le as MainNav
123
123
  };
@@ -119,7 +119,7 @@ const I = {
119
119
  { id: 12, itemId: "1092-02", description: "Kason Door Closer - Offset", price: "$99.99", quantity: 1, imageUrl: a, availability: "In Stock", availabilityId: "available" }
120
120
  ]
121
121
  };
122
- function y(e) {
122
+ function v(e) {
123
123
  return `$${e.items.reduce(
124
124
  (t, i) => t + (parseFloat(i.price.replace(/[^0-9.]/g, "")) || 0) * i.quantity,
125
125
  0
@@ -142,7 +142,7 @@ const n = (e) => {
142
142
  open: l,
143
143
  onClose: () => t(!1),
144
144
  cart: e.cart,
145
- subtotal: y(e.cart),
145
+ subtotal: v(e.cart),
146
146
  itemPriceLabel: "List Price",
147
147
  contactHref: e.contactRoute,
148
148
  contactLinkBehavior: "new-tab",
@@ -159,7 +159,9 @@ const n = (e) => {
159
159
  homeRoute: "/",
160
160
  customPartsRoute: "/custom",
161
161
  accountRoute: "/account",
162
- byModelSerialRoute: "/model",
162
+ onClickModelSerial: () => {
163
+ alert("Model/Serial");
164
+ },
163
165
  faqRoute: "/faq",
164
166
  aboutUsRoute: "/about",
165
167
  contactRoute: "/contact",
@@ -182,7 +184,9 @@ const n = (e) => {
182
184
  homeRoute: "/",
183
185
  customPartsRoute: "/custom",
184
186
  accountRoute: "/account",
185
- byModelSerialRoute: "/model",
187
+ onClickModelSerial: () => {
188
+ alert("Model/Serial");
189
+ },
186
190
  faqRoute: "/faq",
187
191
  aboutUsRoute: "/about",
188
192
  contactRoute: "/contact",
@@ -197,13 +201,15 @@ const n = (e) => {
197
201
  categories: o
198
202
  },
199
203
  render: n
200
- }, f = {
204
+ }, k = {
201
205
  args: {
202
206
  cart: r,
203
207
  homeRoute: "/",
204
208
  customPartsRoute: "/custom",
205
209
  accountRoute: "/account",
206
- byModelSerialRoute: "/model",
210
+ onClickModelSerial: () => {
211
+ alert("Model/Serial");
212
+ },
207
213
  faqRoute: "/faq",
208
214
  aboutUsRoute: "/about",
209
215
  contactRoute: "/contact",
@@ -221,7 +227,7 @@ const n = (e) => {
221
227
  };
222
228
  export {
223
229
  S as Authenticated,
224
- f as Unauthenticated,
230
+ k as Unauthenticated,
225
231
  C as WithCartItems,
226
232
  I as default
227
233
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.106",
4
+ "version": "0.0.108",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",