@caseparts-org/caseblocks 0.0.138 → 0.0.140

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,5 +1,6 @@
1
1
  import { PropsWithChildren, ReactNode } from 'react';
2
- export interface HorizontalScrollProps extends PropsWithChildren {
2
+ import { HideAtProps } from '../HideAt';
3
+ export interface HorizontalScrollProps extends PropsWithChildren, HideAtProps {
3
4
  className?: string;
4
5
  childrenContainerClassName?: string;
5
6
  childrenSpacing?: number | string;
@@ -13,4 +14,5 @@ export interface HorizontalScrollProps extends PropsWithChildren {
13
14
  showIndicators?: boolean;
14
15
  hideHeader?: boolean;
15
16
  }
16
- export declare function HorizontalScroll({ className, childrenContainerClassName, childrenSpacing, showScrollbar, children, caption, scrollStep, leftButtonContent, rightButtonContent, headerContainerClassName, headerClassName, showIndicators, hideHeader, }: HorizontalScrollProps): import("react/jsx-runtime").JSX.Element;
17
+ 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;
@@ -1,26 +1,27 @@
1
- import { jsxs as d, jsx as l, Fragment as F } from "react/jsx-runtime";
1
+ import { jsxs as d, jsx as l, Fragment as K } from "react/jsx-runtime";
2
2
  import { useRef as g, useState as h, useEffect as m } from "react";
3
- import { Icon as N } from "../Icon/Icon.js";
4
- import { Text as K } from "../Text/Text.js";
3
+ import { Icon as S } from "../Icon/Icon.js";
4
+ import { Text as q } from "../Text/Text.js";
5
5
  import { c as i } from "../../clsx-OuTLNxxd.js";
6
- import '../../assets/HorizontalScroll.css';const q = "_root_1565i_1", G = "_header_1565i_5", I = "_caption_1565i_13", U = "_controls_1565i_21", $ = "_controlBtn_1565i_26", J = "_container_1565i_45", Q = "_dragging_1565i_58", Z = "_noOverflow_1565i_61", tt = "_viewport_1565i_74", et = "_indicator_1565i_77", rt = "_left_1565i_87", nt = "_right_1565i_93", ot = "_hidden_1565i_99", e = {
7
- root: q,
8
- header: G,
9
- caption: I,
10
- controls: U,
11
- controlBtn: $,
12
- container: J,
13
- dragging: Q,
14
- noOverflow: Z,
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,
15
16
  "scrollVisibility--false": "_scrollVisibility--false_1565i_66",
16
- viewport: tt,
17
- indicator: et,
18
- left: rt,
19
- right: nt,
20
- hidden: ot
17
+ viewport: rt,
18
+ indicator: nt,
19
+ left: ot,
20
+ right: lt,
21
+ hidden: it
21
22
  };
22
- function ft({
23
- className: S,
23
+ function _t({
24
+ className: N,
24
25
  childrenContainerClassName: E,
25
26
  childrenSpacing: C,
26
27
  showScrollbar: D = !1,
@@ -31,24 +32,25 @@ function ft({
31
32
  rightButtonContent: O,
32
33
  headerContainerClassName: B,
33
34
  headerClassName: M,
34
- showIndicators: P = !0,
35
- hideHeader: R = !1
35
+ showIndicators: A = !0,
36
+ hideHeader: P = !1,
36
37
  // new default
38
+ hideAt: R
37
39
  }) {
38
- const n = g(null), [b, x] = h(!1), c = g({ x: 0, scroll: 0 }), u = g(!1), X = 5, [_, k] = h(!0), [v, A] = h(!1), [s, H] = h(!1), a = () => {
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 = () => {
39
41
  const t = n.current;
40
42
  if (!t) return;
41
43
  const r = t.scrollWidth - t.clientWidth;
42
- H(t.scrollWidth > t.clientWidth + 1), k(t.scrollLeft <= 0), A(t.scrollLeft >= r - 1);
43
- }, T = (t) => {
44
- !n.current || !s || (x(!0), c.current.x = t.clientX, c.current.scroll = n.current.scrollLeft, u.current = !1);
44
+ T(t.scrollWidth > t.clientWidth + 1), k(t.scrollLeft <= 0), H(t.scrollLeft >= r - 1);
45
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) => {
46
48
  if (!b || !n.current) return;
47
49
  const r = t.clientX - c.current.x;
48
50
  n.current.scrollLeft = c.current.scroll - r, Math.abs(t.clientX - c.current.x) > X && (u.current = !0);
49
51
  }, y = () => {
50
52
  n.current && x(!1);
51
- }, Y = (t) => {
53
+ }, j = (t) => {
52
54
  u.current && (t.preventDefault(), t.stopPropagation(), u.current = !1);
53
55
  }, w = (t) => {
54
56
  const r = n.current;
@@ -75,10 +77,10 @@ function ft({
75
77
  const r = new ResizeObserver(() => a());
76
78
  return r.observe(t), () => r.disconnect();
77
79
  }, []);
78
- const j = () => f == null ? null : typeof f == "string" ? /* @__PURE__ */ l(K, { variant: "display", size: "2xl", className: i(M, e.caption), children: f }) : f;
79
- return /* @__PURE__ */ d("div", { className: i(e.root, S), children: [
80
- !R && /* @__PURE__ */ d("div", { className: i(B, e.header), children: [
81
- j(),
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(),
82
84
  s && /* @__PURE__ */ d("div", { className: e.controls, children: [
83
85
  /* @__PURE__ */ l(
84
86
  "button",
@@ -89,7 +91,7 @@ function ft({
89
91
  "aria-label": "Scroll left",
90
92
  disabled: _,
91
93
  "aria-disabled": _,
92
- children: z ?? /* @__PURE__ */ l(N, { iconKey: "fa-regular fa-chevron-left", size: "sm" })
94
+ children: z ?? /* @__PURE__ */ l(S, { iconKey: "fa-regular fa-chevron-left", size: "sm" })
93
95
  }
94
96
  ),
95
97
  /* @__PURE__ */ l(
@@ -101,7 +103,7 @@ function ft({
101
103
  "aria-label": "Scroll right",
102
104
  disabled: v,
103
105
  "aria-disabled": v,
104
- children: O ?? /* @__PURE__ */ l(N, { iconKey: "fa-regular fa-chevron-right", size: "sm" })
106
+ children: O ?? /* @__PURE__ */ l(S, { iconKey: "fa-regular fa-chevron-right", size: "sm" })
105
107
  }
106
108
  )
107
109
  ] })
@@ -119,15 +121,15 @@ function ft({
119
121
  !s && e.noOverflow,
120
122
  E
121
123
  ),
122
- onPointerDown: T,
123
- onPointerMove: V,
124
+ onPointerDown: V,
125
+ onPointerMove: Y,
124
126
  onPointerLeave: y,
125
127
  onPointerUp: y,
126
- onClickCapture: Y,
128
+ onClickCapture: j,
127
129
  children: W
128
130
  }
129
131
  ),
130
- P && /* @__PURE__ */ d(F, { children: [
132
+ A && /* @__PURE__ */ d(K, { children: [
131
133
  /* @__PURE__ */ l(
132
134
  "div",
133
135
  {
@@ -153,5 +155,5 @@ function ft({
153
155
  ] });
154
156
  }
155
157
  export {
156
- ft as HorizontalScroll
158
+ _t as HorizontalScroll
157
159
  };
@@ -32,7 +32,6 @@ export { Modal } from './molecules/Modal/Modal';
32
32
  export type { ModalProps } from './molecules/Modal/Modal';
33
33
  export { ImageViewer } from './molecules/ImageViewer/ImageViewer';
34
34
  export type { ImageViewerProps } from './molecules/ImageViewer/ImageViewer';
35
- export { getHideAtStyles } from './atoms/HideAt';
36
35
  export { MainNav } from './organisms/MainNav/MainNav';
37
36
  export type { MainNavProps } from './organisms/MainNav/MainNav';
38
37
  export { ChipSelector } from './organisms/ChipSelector/ChipSelector';
@@ -12,33 +12,33 @@ import { linkClassName as A } from "./atoms/Link/linkClassName.js";
12
12
  import { configureLink as M, routerOverride as v } from "./atoms/Link/configureLink.js";
13
13
  import { LinkButton as h } from "./atoms/LinkButton/LinkButton.js";
14
14
  import { configureImage as y } from "./atoms/Image/configureImage.js";
15
- import { Logo as H } from "./molecules/Logo/Logo.js";
16
- import { SearchBox as V } from "./molecules/SearchBox/SearchBox.js";
17
- import { QuantityInput as z } from "./molecules/QuantityInput/QuantityInput.js";
18
- import { Pricing as O } from "./molecules/Pricing/Pricing.js";
19
- import { Availability as R } from "./molecules/Availability/Availability.js";
20
- import { Avatar as j } from "./molecules/Avatar/Avatar.js";
21
- import { BannerCard as D } from "./molecules/BannerCard/BannerCard.js";
22
- import { CardLink as J } from "./molecules/CardLink/CardLink.js";
23
- import { Breadcrumbs as U } from "./molecules/Breadcrumbs/Breadcrumbs.js";
24
- import { NotFound as X } from "./organisms/NotFound/NotFound.js";
25
- import { HorizontalScroll as _ } from "./atoms/HorizontalScroll/HorizontalScroll.js";
26
- import { SlideInPanel as oo } from "./atoms/SlideInPanel/SlideInPanel.js";
27
- import { Markdown as eo } from "./atoms/Markdown/Markdown.js";
28
- import { PreprocessedMarkdown as po } from "./atoms/Markdown/PreprocessedMarkdown.js";
29
- import { usePreprocessedMarkdown as fo } from "./atoms/Markdown/usePreprocessedMarkdown.js";
30
- import { Tooltip as ao } from "./atoms/Tooltip/Tooltip.js";
31
- import { Popover as io } from "./atoms/Popover/Popover.js";
32
- import { Account as uo } from "./molecules/Account/Account.js";
33
- import { Chip as so } from "./molecules/Chip/Chip.js";
34
- import { ToggleView as Co } from "./molecules/ToggleView/ToggleView.js";
35
- import { CartSlideInPanel as So } from "./molecules/Cart/CartSlideInPanel.js";
36
- import { StatefulButton as Po } from "./molecules/StatefulButton/StatefulButton.js";
37
- import { AnimatedCheckMark as Ao } from "./molecules/StatefulButton/AnimatedCheckmark.js";
38
- import { AddToCart as Mo } from "./molecules/AddToCart/AddToCart.js";
39
- import { Modal as Lo } from "./molecules/Modal/Modal.js";
40
- import { ImageViewer as To } from "./molecules/ImageViewer/ImageViewer.js";
41
- import { getHideAtStyles as Fo } from "./atoms/HideAt.js";
15
+ import { getHideAtStyles as H } from "./atoms/HideAt.js";
16
+ import { Logo as V } from "./molecules/Logo/Logo.js";
17
+ import { SearchBox as z } from "./molecules/SearchBox/SearchBox.js";
18
+ import { QuantityInput as O } from "./molecules/QuantityInput/QuantityInput.js";
19
+ import { Pricing as R } from "./molecules/Pricing/Pricing.js";
20
+ import { Availability as j } from "./molecules/Availability/Availability.js";
21
+ import { Avatar as D } from "./molecules/Avatar/Avatar.js";
22
+ import { BannerCard as J } from "./molecules/BannerCard/BannerCard.js";
23
+ import { CardLink as U } from "./molecules/CardLink/CardLink.js";
24
+ import { Breadcrumbs as X } from "./molecules/Breadcrumbs/Breadcrumbs.js";
25
+ import { NotFound as _ } from "./organisms/NotFound/NotFound.js";
26
+ import { HorizontalScroll as oo } from "./atoms/HorizontalScroll/HorizontalScroll.js";
27
+ import { SlideInPanel as eo } from "./atoms/SlideInPanel/SlideInPanel.js";
28
+ import { Markdown as po } from "./atoms/Markdown/Markdown.js";
29
+ import { PreprocessedMarkdown as fo } from "./atoms/Markdown/PreprocessedMarkdown.js";
30
+ import { usePreprocessedMarkdown as ao } from "./atoms/Markdown/usePreprocessedMarkdown.js";
31
+ import { Tooltip as io } from "./atoms/Tooltip/Tooltip.js";
32
+ import { Popover as uo } from "./atoms/Popover/Popover.js";
33
+ import { Account as so } from "./molecules/Account/Account.js";
34
+ import { Chip as Co } from "./molecules/Chip/Chip.js";
35
+ import { ToggleView as So } from "./molecules/ToggleView/ToggleView.js";
36
+ import { CartSlideInPanel as Po } from "./molecules/Cart/CartSlideInPanel.js";
37
+ import { StatefulButton as Ao } from "./molecules/StatefulButton/StatefulButton.js";
38
+ import { AnimatedCheckMark as Mo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
39
+ import { AddToCart as Lo } from "./molecules/AddToCart/AddToCart.js";
40
+ import { Modal as To } from "./molecules/Modal/Modal.js";
41
+ import { ImageViewer as Fo } from "./molecules/ImageViewer/ImageViewer.js";
42
42
  import { MainNav as No } from "./organisms/MainNav/MainNav.js";
43
43
  import { ChipSelector as bo } from "./organisms/ChipSelector/ChipSelector.js";
44
44
  import { Product as Go } from "./organisms/Product/Product.js";
@@ -46,53 +46,53 @@ import { Carousel as Qo } from "./organisms/Carousel/Carousel.js";
46
46
  import { Footer as Zo } from "./organisms/Footer/Footer.js";
47
47
  import { default as qo } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
48
48
  export {
49
- uo as Account,
50
- Mo as AddToCart,
51
- Ao as AnimatedCheckMark,
52
- R as Availability,
53
- j as Avatar,
54
- D as BannerCard,
55
- U as Breadcrumbs,
49
+ so as Account,
50
+ Lo as AddToCart,
51
+ Mo as AnimatedCheckMark,
52
+ j as Availability,
53
+ D as Avatar,
54
+ J as BannerCard,
55
+ X as Breadcrumbs,
56
56
  e as Button,
57
- J as CardLink,
57
+ U as CardLink,
58
58
  Qo as Carousel,
59
- So as CartSlideInPanel,
60
- so as Chip,
59
+ Po as CartSlideInPanel,
60
+ Co as Chip,
61
61
  bo as ChipSelector,
62
62
  f as Column,
63
63
  p as Flex,
64
64
  Zo as Footer,
65
65
  x as Grid,
66
66
  n as Head,
67
- _ as HorizontalScroll,
67
+ oo as HorizontalScroll,
68
68
  d as Icon,
69
- To as ImageViewer,
69
+ Fo as ImageViewer,
70
70
  S as Input,
71
71
  P as Link,
72
72
  h as LinkButton,
73
- H as Logo,
73
+ V as Logo,
74
74
  No as MainNav,
75
- eo as Markdown,
76
- Lo as Modal,
77
- X as NotFound,
78
- io as Popover,
79
- po as PreprocessedMarkdown,
80
- O as Pricing,
75
+ po as Markdown,
76
+ To as Modal,
77
+ _ as NotFound,
78
+ uo as Popover,
79
+ fo as PreprocessedMarkdown,
80
+ R as Pricing,
81
81
  Go as Product,
82
- z as QuantityInput,
82
+ O as QuantityInput,
83
83
  u as Root,
84
- V as SearchBox,
84
+ z as SearchBox,
85
85
  s as Separator,
86
- oo as SlideInPanel,
86
+ eo as SlideInPanel,
87
87
  qo as SpinZoomViewer,
88
- Po as StatefulButton,
88
+ Ao as StatefulButton,
89
89
  C as Text,
90
- Co as ToggleView,
91
- ao as Tooltip,
90
+ So as ToggleView,
91
+ io as Tooltip,
92
92
  y as configureImage,
93
93
  M as configureLink,
94
- Fo as getHideAtStyles,
94
+ H as getHideAtStyles,
95
95
  A as linkClassName,
96
96
  v as routerOverride,
97
- fo as usePreprocessedMarkdown
97
+ ao as usePreprocessedMarkdown
98
98
  };
@@ -22,6 +22,7 @@ export type { LinkButtonProps } from './atoms/LinkButton/LinkButton';
22
22
  export { configureImage } from './atoms/Image/configureImage';
23
23
  export type { ImageProps, ImageImplementation } from './atoms/Image/Image';
24
24
  export type { HideAtProps, HideAtProp, HideAtValue } from './atoms/HideAt';
25
+ export { getHideAtStyles } from './atoms/HideAt';
25
26
  export { Logo } from './molecules/Logo/Logo';
26
27
  export type { LogoProps } from './molecules/Logo/Logo';
27
28
  export { SearchBox } from './molecules/SearchBox/SearchBox';
@@ -3,50 +3,52 @@ import { Flex as m } from "./atoms/Flex/Flex.js";
3
3
  import { Column as x, Grid as f } from "./atoms/Grid/Grid.js";
4
4
  import { Head as a } from "./atoms/Root/Head.js";
5
5
  import { Icon as u } from "./atoms/Icon/Icon.js";
6
- import { Root as c } from "./atoms/Root/Root.js";
6
+ import { Root as l } from "./atoms/Root/Root.js";
7
7
  import { Separator as g } from "./atoms/Separator/Separator.js";
8
8
  import { Text as B } from "./atoms/Text/Text.js";
9
- import { Input as C } from "./atoms/Input/Input.js";
10
- import { Link as s } from "./atoms/Link/Link.js";
11
- import { linkClassName as b } from "./atoms/Link/linkClassName.js";
12
- import { configureLink as A, routerOverride as F } from "./atoms/Link/configureLink.js";
13
- import { LinkButton as S } from "./atoms/LinkButton/LinkButton.js";
14
- import { configureImage as G } from "./atoms/Image/configureImage.js";
15
- import { Logo as O } from "./molecules/Logo/Logo.js";
16
- import { SearchBox as Q } from "./molecules/SearchBox/SearchBox.js";
17
- import { QuantityInput as T } from "./molecules/QuantityInput/QuantityInput.js";
18
- import { Pricing as q } from "./molecules/Pricing/Pricing.js";
19
- import { Availability as z } from "./molecules/Availability/Availability.js";
20
- import { Avatar as E } from "./molecules/Avatar/Avatar.js";
21
- import { BannerCard as K } from "./molecules/BannerCard/BannerCard.js";
22
- import { CardLink as U } from "./molecules/CardLink/CardLink.js";
23
- import { Breadcrumbs as W } from "./molecules/Breadcrumbs/Breadcrumbs.js";
24
- import { NotFound as Y } from "./organisms/NotFound/NotFound.js";
9
+ import { Input as s } from "./atoms/Input/Input.js";
10
+ import { Link as I } from "./atoms/Link/Link.js";
11
+ import { linkClassName as y } from "./atoms/Link/linkClassName.js";
12
+ import { configureLink as S, routerOverride as b } from "./atoms/Link/configureLink.js";
13
+ import { LinkButton as H } from "./atoms/LinkButton/LinkButton.js";
14
+ import { configureImage as h } from "./atoms/Image/configureImage.js";
15
+ import { getHideAtStyles as O } from "./atoms/HideAt.js";
16
+ import { Logo as Q } from "./molecules/Logo/Logo.js";
17
+ import { SearchBox as T } from "./molecules/SearchBox/SearchBox.js";
18
+ import { QuantityInput as q } from "./molecules/QuantityInput/QuantityInput.js";
19
+ import { Pricing as z } from "./molecules/Pricing/Pricing.js";
20
+ import { Availability as E } from "./molecules/Availability/Availability.js";
21
+ import { Avatar as K } from "./molecules/Avatar/Avatar.js";
22
+ import { BannerCard as U } from "./molecules/BannerCard/BannerCard.js";
23
+ import { CardLink as W } from "./molecules/CardLink/CardLink.js";
24
+ import { Breadcrumbs as Y } from "./molecules/Breadcrumbs/Breadcrumbs.js";
25
+ import { NotFound as _ } from "./organisms/NotFound/NotFound.js";
25
26
  export {
26
- z as Availability,
27
- E as Avatar,
28
- K as BannerCard,
29
- W as Breadcrumbs,
27
+ E as Availability,
28
+ K as Avatar,
29
+ U as BannerCard,
30
+ Y as Breadcrumbs,
30
31
  t as Button,
31
- U as CardLink,
32
+ W as CardLink,
32
33
  x as Column,
33
34
  m as Flex,
34
35
  f as Grid,
35
36
  a as Head,
36
37
  u as Icon,
37
- C as Input,
38
- s as Link,
39
- S as LinkButton,
40
- O as Logo,
41
- Y as NotFound,
42
- q as Pricing,
43
- T as QuantityInput,
44
- c as Root,
45
- Q as SearchBox,
38
+ s as Input,
39
+ I as Link,
40
+ H as LinkButton,
41
+ Q as Logo,
42
+ _ as NotFound,
43
+ z as Pricing,
44
+ q as QuantityInput,
45
+ l as Root,
46
+ T as SearchBox,
46
47
  g as Separator,
47
48
  B as Text,
48
- G as configureImage,
49
- A as configureLink,
50
- b as linkClassName,
51
- F as routerOverride
49
+ h as configureImage,
50
+ S as configureLink,
51
+ O as getHideAtStyles,
52
+ y as linkClassName,
53
+ b as routerOverride
52
54
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.138",
4
+ "version": "0.0.140",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",