@caseparts-org/caseblocks 0.0.210 → 0.0.212

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
- ._availability_9rzvh_1{font-style:italic}._tooltipContent_9rzvh_5{max-width:370px}._tooltipContent_9rzvh_5>ul{padding:0;margin:var(--spacing-spacing-2xs) 0}._tooltipContent_9rzvh_5 li{list-style:none}._available_9rzvh_18,._in-stock_9rzvh_18{color:var(--color-alerts-success)}._limited_9rzvh_21{color:var(--color-alerts-warning)}._discontinued_9rzvh_24{color:var(--color-alerts-error-warning)}
1
+ ._availability_kb59t_1{font-style:italic}._pointer_kb59t_5{cursor:pointer}._tooltip_kb59t_9{background-color:#fafafa}._tooltipContent_kb59t_13{max-width:370px}._tooltipContent_kb59t_13>ul{padding:0;margin:var(--spacing-spacing-2xs) 0}._tooltipContent_kb59t_13 li{list-style:none}._available_kb59t_26,._in-stock_kb59t_26{color:var(--color-alerts-success)}._limited_kb59t_29{color:var(--color-alerts-warning)}._discontinued_kb59t_32{color:var(--color-alerts-error-warning)}
@@ -0,0 +1 @@
1
+ ._pill_1dm0w_1{display:flex;justify-content:center;align-items:center;border-radius:28px;border:none}._pill-xs_1dm0w_17{padding:2px 10px}._pill-sm_1dm0w_25{padding:2px 12px}._pill-md_1dm0w_33{padding:4px 16px}._pill-color-neutral_1dm0w_41{background:var(--color-neutrals-neutral-1)}._pill-color-secondary_1dm0w_49{background:var(--color-brand-secondary-lt-teal-blue)}._pill-color-caution-tips_1dm0w_57{background:var(--color-brand-secondary-lt-yellow)}._pill-color-warning_1dm0w_65{background:var(--color-brand-secondary-lt-orange)}._pill-color-success_1dm0w_73{background:var(--color-brand-secondary-lt-green)}._pill-color-error-warning_1dm0w_81{background:var(--color-brand-secondary-lt-red)}
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { TextColorToken } from '../Text/Text';
3
+ export interface PillProps {
4
+ children: ReactNode;
5
+ colorToken?: "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
6
+ customColor?: string;
7
+ textColorToken?: TextColorToken;
8
+ size: "xs" | "sm" | "md";
9
+ className?: string;
10
+ }
11
+ export declare function Pill({ children, colorToken, textColorToken, customColor, size, className }: PillProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { jsx as i } from "react/jsx-runtime";
2
+ import { Text as s } from "../Text/Text.js";
3
+ import { c as m } from "../../clsx-OuTLNxxd.js";
4
+ import '../../assets/Pill.css';const d = "_pill_1dm0w_1", l = {
5
+ pill: d,
6
+ "pill-xs": "_pill-xs_1dm0w_17",
7
+ "pill-sm": "_pill-sm_1dm0w_25",
8
+ "pill-md": "_pill-md_1dm0w_33",
9
+ "pill-color-neutral": "_pill-color-neutral_1dm0w_41",
10
+ "pill-color-secondary": "_pill-color-secondary_1dm0w_49",
11
+ "pill-color-caution-tips": "_pill-color-caution-tips_1dm0w_57",
12
+ "pill-color-warning": "_pill-color-warning_1dm0w_65",
13
+ "pill-color-success": "_pill-color-success_1dm0w_73",
14
+ "pill-color-error-warning": "_pill-color-error-warning_1dm0w_81"
15
+ };
16
+ function w({ children: p, colorToken: _ = "neutral", textColorToken: c, customColor: o, size: r, className: n }) {
17
+ return /* @__PURE__ */ i(
18
+ "span",
19
+ {
20
+ className: m(
21
+ l.pill,
22
+ l[`pill-color-${_}`],
23
+ l[`pill-${r}`],
24
+ n
25
+ ),
26
+ style: o ? { background: o } : void 0,
27
+ children: /* @__PURE__ */ i(s, { size: r, colorToken: c, children: p })
28
+ }
29
+ );
30
+ }
31
+ export {
32
+ w as Pill
33
+ };
@@ -0,0 +1,17 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { Pill } from './Pill';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof Pill;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const AllProps: Story;
14
+ export declare const Variants: StoryObj<typeof Pill>;
15
+ export declare const Sizes: StoryObj<typeof Pill>;
16
+ export declare const TextColors: StoryObj<typeof Pill>;
17
+ export declare const CustomColor: StoryObj<typeof Pill>;
@@ -0,0 +1,60 @@
1
+ import { jsx as s, jsxs as o } from "react/jsx-runtime";
2
+ import { Pill as r } from "./Pill.js";
3
+ const a = {
4
+ title: "Case Parts/Atoms/Pill",
5
+ component: r,
6
+ parameters: {
7
+ layout: "centered"
8
+ },
9
+ tags: ["autodocs"]
10
+ }, d = {
11
+ args: {
12
+ children: "New",
13
+ colorToken: "success",
14
+ textColorToken: "default-inverted",
15
+ customColor: "#166534",
16
+ size: "md"
17
+ }
18
+ }, n = [
19
+ "neutral",
20
+ "secondary",
21
+ "caution-tips",
22
+ "warning",
23
+ "success",
24
+ "error-warning"
25
+ ], t = [
26
+ "inherit",
27
+ "default-inverted",
28
+ "secondary",
29
+ "success",
30
+ "warning",
31
+ "error-warning"
32
+ ], m = {
33
+ render: () => /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: n.map((e) => /* @__PURE__ */ s(r, { colorToken: e, size: "sm", children: e }, e)) })
34
+ }, l = ["xs", "sm", "md"], p = {
35
+ render: () => /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: l.map((e) => /* @__PURE__ */ o(r, { size: e, colorToken: "secondary", children: [
36
+ e.toUpperCase(),
37
+ " size"
38
+ ] }, e)) })
39
+ }, u = {
40
+ render: () => /* @__PURE__ */ s("div", { style: { display: "flex", flexDirection: "column", gap: "10px" }, children: t.map((e) => /* @__PURE__ */ s(
41
+ r,
42
+ {
43
+ size: "sm",
44
+ colorToken: "secondary",
45
+ textColorToken: e,
46
+ children: e
47
+ },
48
+ e
49
+ )) })
50
+ }, x = {
51
+ render: () => /* @__PURE__ */ s(r, { size: "sm", customColor: "#7c3aed", textColorToken: "default-inverted", children: "Custom purple" })
52
+ };
53
+ export {
54
+ d as AllProps,
55
+ x as CustomColor,
56
+ p as Sizes,
57
+ u as TextColors,
58
+ m as Variants,
59
+ a as default
60
+ };
@@ -3,6 +3,7 @@ import { JSX } from 'react';
3
3
  type ElementType = keyof Pick<JSX.IntrinsicElements, "span" | "p" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "div">;
4
4
  export type TextSize = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | "3xl" | "4xl" | "5xl" | "6xl";
5
5
  export type TextWeight = "thin" | "extra-light" | "light" | "regular" | "medium" | "semibold" | "bold";
6
+ export type TextColorToken = 'inherit' | 'warning' | 'disabled' | 'error-warning' | 'default-inverted' | 'links' | 'links-hover-press' | 'primary' | 'quaternary' | 'search-bar' | 'secondary' | 'success' | 'tertiary' | 'footer';
6
7
  /** A text element. */
7
8
  export type TextProps<T extends ElementType = "span"> = HideAtProps & {
8
9
  /** The HTML element to render as */
@@ -13,7 +14,7 @@ export type TextProps<T extends ElementType = "span"> = HideAtProps & {
13
14
  variant?: "body" | "display";
14
15
  /** The weight of the text. */
15
16
  weight?: TextWeight;
16
- colorToken?: 'inherit' | 'warning' | 'disabled' | 'error-warning' | 'default-inverted' | 'links' | 'links-hover-press' | 'primary' | 'quaternary' | 'search-bar' | 'secondary' | 'success' | 'tertiary' | 'footer';
17
+ colorToken?: TextColorToken;
17
18
  } & Omit<React.ComponentPropsWithoutRef<T>, "size">;
18
19
  export declare function Text<T extends ElementType = "span">({ as, size, variant, weight, colorToken, children, hideAt, className, ...otherProps }: TextProps<T>): import("react/jsx-runtime").JSX.Element;
19
20
  export {};
@@ -7,102 +7,104 @@ import { Root as u } from "./atoms/Root/Root.js";
7
7
  import { Separator as C } from "./atoms/Separator/Separator.js";
8
8
  import { Text as S } from "./atoms/Text/Text.js";
9
9
  import { Input as A } from "./atoms/Input/Input.js";
10
- import { ToggleSwitch as k } from "./atoms/ToggleSwitch/ToggleSwitch.js";
11
- import { Link as I } from "./atoms/Link/Link.js";
10
+ import { ToggleSwitch as T } from "./atoms/ToggleSwitch/ToggleSwitch.js";
11
+ import { Link as B } from "./atoms/Link/Link.js";
12
12
  import { linkClassName as h } from "./atoms/Link/linkClassName.js";
13
13
  import { configureLink as w, routerOverride as L } from "./atoms/Link/configureLink.js";
14
14
  import { LinkButton as y } from "./atoms/LinkButton/LinkButton.js";
15
- import { configureImage as H } from "./atoms/Image/configureImage.js";
16
- import { getHideAtStyles as N } from "./atoms/HideAt.js";
17
- import { Logo as D } from "./molecules/Logo/Logo.js";
18
- import { SearchBox as E } from "./molecules/SearchBox/SearchBox.js";
19
- import { QuantityInput as O } from "./molecules/QuantityInput/QuantityInput.js";
20
- import { Pricing as R } from "./molecules/Pricing/Pricing.js";
21
- import { Availability as j } from "./molecules/Availability/Availability.js";
22
- import { Avatar as J } from "./molecules/Avatar/Avatar.js";
23
- import { BannerCard as U } from "./molecules/BannerCard/BannerCard.js";
24
- import { CardLink as X } from "./molecules/CardLink/CardLink.js";
25
- import { Breadcrumbs as _ } from "./molecules/Breadcrumbs/Breadcrumbs.js";
26
- import { Disclaimer as oo } from "./molecules/Disclaimer/Disclaimer.js";
27
- import { Admonition as eo } from "./molecules/Admonition/Admonition.js";
28
- import { NotFound as mo } from "./organisms/NotFound/NotFound.js";
29
- import { HorizontalScroll as fo } from "./atoms/HorizontalScroll/HorizontalScroll.js";
30
- import { SlideInPanel as ao } from "./atoms/SlideInPanel/SlideInPanel.js";
31
- import { DropdownButton as no } from "./atoms/DropdownButton/DropdownButton.js";
32
- import { Tooltip as uo } from "./atoms/Tooltip/Tooltip.js";
33
- import { Popover as Co } from "./atoms/Popover/Popover.js";
34
- import { Account as So } from "./molecules/Account/Account.js";
35
- import { Chip as Ao } from "./molecules/Chip/Chip.js";
36
- import { ToggleView as ko } from "./molecules/ToggleView/ToggleView.js";
37
- import { CartPart as Io } from "./molecules/Cart/CartPart.js";
38
- import { AddToCartPart as ho } from "./molecules/AddToCartPart/AddToCartPart.js";
39
- import { CartSlideInPanel as wo } from "./molecules/Cart/CartSlideInPanel.js";
40
- import { StatefulButton as bo } from "./molecules/StatefulButton/StatefulButton.js";
41
- import { AnimatedCheckMark as Fo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
42
- import { AddToCart as Mo } from "./molecules/AddToCart/AddToCart.js";
43
- import { Modal as Vo } from "./molecules/Modal/Modal.js";
44
- import { ImageViewer as zo } from "./molecules/ImageViewer/ImageViewer.js";
45
- import { T as Go } from "./Table-BX4PtCNE.js";
46
- import { Error as Qo } from "./molecules/Error/Error.js";
47
- import { MainNav as Zo } from "./organisms/MainNav/MainNav.js";
48
- import { ChipSelector as qo } from "./organisms/ChipSelector/ChipSelector.js";
49
- import { Product as Ko } from "./organisms/Product/Product.js";
50
- import { Carousel as Wo } from "./organisms/Carousel/Carousel.js";
51
- import { Footer as Yo } from "./organisms/Footer/Footer.js";
52
- import { default as $o } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
15
+ import { Pill as H } from "./atoms/Pill/Pill.js";
16
+ import { configureImage as N } from "./atoms/Image/configureImage.js";
17
+ import { getHideAtStyles as D } from "./atoms/HideAt.js";
18
+ import { Logo as E } from "./molecules/Logo/Logo.js";
19
+ import { SearchBox as O } from "./molecules/SearchBox/SearchBox.js";
20
+ import { QuantityInput as R } from "./molecules/QuantityInput/QuantityInput.js";
21
+ import { Pricing as j } from "./molecules/Pricing/Pricing.js";
22
+ import { Availability as J } from "./molecules/Availability/Availability.js";
23
+ import { Avatar as U } from "./molecules/Avatar/Avatar.js";
24
+ import { BannerCard as X } from "./molecules/BannerCard/BannerCard.js";
25
+ import { CardLink as _ } from "./molecules/CardLink/CardLink.js";
26
+ import { Breadcrumbs as oo } from "./molecules/Breadcrumbs/Breadcrumbs.js";
27
+ import { Disclaimer as eo } from "./molecules/Disclaimer/Disclaimer.js";
28
+ import { Admonition as mo } from "./molecules/Admonition/Admonition.js";
29
+ import { NotFound as fo } from "./organisms/NotFound/NotFound.js";
30
+ import { HorizontalScroll as ao } from "./atoms/HorizontalScroll/HorizontalScroll.js";
31
+ import { SlideInPanel as no } from "./atoms/SlideInPanel/SlideInPanel.js";
32
+ import { DropdownButton as uo } from "./atoms/DropdownButton/DropdownButton.js";
33
+ import { Tooltip as Co } from "./atoms/Tooltip/Tooltip.js";
34
+ import { Popover as So } from "./atoms/Popover/Popover.js";
35
+ import { Account as Ao } from "./molecules/Account/Account.js";
36
+ import { Chip as To } from "./molecules/Chip/Chip.js";
37
+ import { ToggleView as Bo } from "./molecules/ToggleView/ToggleView.js";
38
+ import { CartPart as ho } from "./molecules/Cart/CartPart.js";
39
+ import { AddToCartPart as wo } from "./molecules/AddToCartPart/AddToCartPart.js";
40
+ import { CartSlideInPanel as bo } from "./molecules/Cart/CartSlideInPanel.js";
41
+ import { StatefulButton as Fo } from "./molecules/StatefulButton/StatefulButton.js";
42
+ import { AnimatedCheckMark as Mo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
43
+ import { AddToCart as Vo } from "./molecules/AddToCart/AddToCart.js";
44
+ import { Modal as zo } from "./molecules/Modal/Modal.js";
45
+ import { ImageViewer as Go } from "./molecules/ImageViewer/ImageViewer.js";
46
+ import { T as Qo } from "./Table-BX4PtCNE.js";
47
+ import { Error as Zo } from "./molecules/Error/Error.js";
48
+ import { MainNav as qo } from "./organisms/MainNav/MainNav.js";
49
+ import { ChipSelector as Ko } from "./organisms/ChipSelector/ChipSelector.js";
50
+ import { Product as Wo } from "./organisms/Product/Product.js";
51
+ import { Carousel as Yo } from "./organisms/Carousel/Carousel.js";
52
+ import { Footer as $o } from "./organisms/Footer/Footer.js";
53
+ import { default as rr } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
53
54
  export {
54
- So as Account,
55
- Mo as AddToCart,
56
- ho as AddToCartPart,
57
- eo as Admonition,
58
- Fo as AnimatedCheckMark,
59
- j as Availability,
60
- J as Avatar,
61
- U as BannerCard,
62
- _ as Breadcrumbs,
55
+ Ao as Account,
56
+ Vo as AddToCart,
57
+ wo as AddToCartPart,
58
+ mo as Admonition,
59
+ Mo as AnimatedCheckMark,
60
+ J as Availability,
61
+ U as Avatar,
62
+ X as BannerCard,
63
+ oo as Breadcrumbs,
63
64
  e as Button,
64
- X as CardLink,
65
- Wo as Carousel,
66
- Io as CartPart,
67
- wo as CartSlideInPanel,
68
- Ao as Chip,
69
- qo as ChipSelector,
65
+ _ as CardLink,
66
+ Yo as Carousel,
67
+ ho as CartPart,
68
+ bo as CartSlideInPanel,
69
+ To as Chip,
70
+ Ko as ChipSelector,
70
71
  f as Column,
71
- oo as Disclaimer,
72
- no as DropdownButton,
73
- Qo as Error,
72
+ eo as Disclaimer,
73
+ uo as DropdownButton,
74
+ Zo as Error,
74
75
  m as Flex,
75
- Yo as Footer,
76
+ $o as Footer,
76
77
  x as Grid,
77
78
  i as Head,
78
- fo as HorizontalScroll,
79
+ ao as HorizontalScroll,
79
80
  l as Icon,
80
- zo as ImageViewer,
81
+ Go as ImageViewer,
81
82
  A as Input,
82
- I as Link,
83
+ B as Link,
83
84
  y as LinkButton,
84
- D as Logo,
85
- Zo as MainNav,
86
- Vo as Modal,
87
- mo as NotFound,
88
- Co as Popover,
89
- R as Pricing,
90
- Ko as Product,
91
- O as QuantityInput,
85
+ E as Logo,
86
+ qo as MainNav,
87
+ zo as Modal,
88
+ fo as NotFound,
89
+ H as Pill,
90
+ So as Popover,
91
+ j as Pricing,
92
+ Wo as Product,
93
+ R as QuantityInput,
92
94
  u as Root,
93
- E as SearchBox,
95
+ O as SearchBox,
94
96
  C as Separator,
95
- ao as SlideInPanel,
96
- $o as SpinZoomViewer,
97
- bo as StatefulButton,
98
- Go as Table,
97
+ no as SlideInPanel,
98
+ rr as SpinZoomViewer,
99
+ Fo as StatefulButton,
100
+ Qo as Table,
99
101
  S as Text,
100
- k as ToggleSwitch,
101
- ko as ToggleView,
102
- uo as Tooltip,
103
- H as configureImage,
102
+ T as ToggleSwitch,
103
+ Bo as ToggleView,
104
+ Co as Tooltip,
105
+ N as configureImage,
104
106
  w as configureLink,
105
- N as getHideAtStyles,
107
+ D as getHideAtStyles,
106
108
  h as linkClassName,
107
109
  L as routerOverride
108
110
  };
@@ -22,6 +22,8 @@ export { linkClassName } from './atoms/Link/linkClassName';
22
22
  export { configureLink, routerOverride } from './atoms/Link/configureLink';
23
23
  export { LinkButton } from './atoms/LinkButton/LinkButton';
24
24
  export type { LinkButtonProps } from './atoms/LinkButton/LinkButton';
25
+ export { Pill } from './atoms/Pill/Pill';
26
+ export type { PillProps } from './atoms/Pill/Pill';
25
27
  export { configureImage } from './atoms/Image/configureImage';
26
28
  export type { ImageProps, ImageImplementation } from './atoms/Image/Image';
27
29
  export type { HideAtProps, HideAtProp, HideAtValue } from './atoms/HideAt';
@@ -2,8 +2,8 @@ import { Button as t } from "./atoms/Button/Button.js";
2
2
  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 n } from "./atoms/Root/Head.js";
5
- import { Icon as u } from "./atoms/Icon/Icon.js";
6
- import { Root as l } from "./atoms/Root/Root.js";
5
+ import { Icon as l } from "./atoms/Icon/Icon.js";
6
+ import { Root as d } from "./atoms/Root/Root.js";
7
7
  import { Separator as g } from "./atoms/Separator/Separator.js";
8
8
  import { Text as s } from "./atoms/Text/Text.js";
9
9
  import { Input as L } from "./atoms/Input/Input.js";
@@ -12,49 +12,51 @@ import { Link as S } from "./atoms/Link/Link.js";
12
12
  import { linkClassName as y } from "./atoms/Link/linkClassName.js";
13
13
  import { configureLink as h, routerOverride as F } from "./atoms/Link/configureLink.js";
14
14
  import { LinkButton as N } from "./atoms/LinkButton/LinkButton.js";
15
- import { configureImage as w } from "./atoms/Image/configureImage.js";
16
- import { getHideAtStyles as G } from "./atoms/HideAt.js";
17
- import { Logo as P } from "./molecules/Logo/Logo.js";
18
- import { SearchBox as R } from "./molecules/SearchBox/SearchBox.js";
19
- import { QuantityInput as q } from "./molecules/QuantityInput/QuantityInput.js";
20
- import { Pricing as E } from "./molecules/Pricing/Pricing.js";
21
- import { Availability as K } from "./molecules/Availability/Availability.js";
22
- import { Avatar as U } from "./molecules/Avatar/Avatar.js";
23
- import { BannerCard as W } from "./molecules/BannerCard/BannerCard.js";
24
- import { CardLink as Y } from "./molecules/CardLink/CardLink.js";
25
- import { Breadcrumbs as _ } from "./molecules/Breadcrumbs/Breadcrumbs.js";
26
- import { Disclaimer as oo } from "./molecules/Disclaimer/Disclaimer.js";
27
- import { Admonition as to } from "./molecules/Admonition/Admonition.js";
28
- import { NotFound as mo } from "./organisms/NotFound/NotFound.js";
15
+ import { Pill as T } from "./atoms/Pill/Pill.js";
16
+ import { configureImage as D } from "./atoms/Image/configureImage.js";
17
+ import { getHideAtStyles as O } from "./atoms/HideAt.js";
18
+ import { Logo as R } from "./molecules/Logo/Logo.js";
19
+ import { SearchBox as q } from "./molecules/SearchBox/SearchBox.js";
20
+ import { QuantityInput as E } from "./molecules/QuantityInput/QuantityInput.js";
21
+ import { Pricing as K } from "./molecules/Pricing/Pricing.js";
22
+ import { Availability as U } from "./molecules/Availability/Availability.js";
23
+ import { Avatar as W } from "./molecules/Avatar/Avatar.js";
24
+ import { BannerCard as Y } from "./molecules/BannerCard/BannerCard.js";
25
+ import { CardLink as _ } from "./molecules/CardLink/CardLink.js";
26
+ import { Breadcrumbs as oo } from "./molecules/Breadcrumbs/Breadcrumbs.js";
27
+ import { Disclaimer as to } from "./molecules/Disclaimer/Disclaimer.js";
28
+ import { Admonition as mo } from "./molecules/Admonition/Admonition.js";
29
+ import { NotFound as xo } from "./organisms/NotFound/NotFound.js";
29
30
  export {
30
- to as Admonition,
31
- K as Availability,
32
- U as Avatar,
33
- W as BannerCard,
34
- _ as Breadcrumbs,
31
+ mo as Admonition,
32
+ U as Availability,
33
+ W as Avatar,
34
+ Y as BannerCard,
35
+ oo as Breadcrumbs,
35
36
  t as Button,
36
- Y as CardLink,
37
+ _ as CardLink,
37
38
  x as Column,
38
- oo as Disclaimer,
39
+ to as Disclaimer,
39
40
  m as Flex,
40
41
  f as Grid,
41
42
  n as Head,
42
- u as Icon,
43
+ l as Icon,
43
44
  L as Input,
44
45
  S as Link,
45
46
  N as LinkButton,
46
- P as Logo,
47
- mo as NotFound,
48
- E as Pricing,
49
- q as QuantityInput,
50
- l as Root,
51
- R as SearchBox,
47
+ R as Logo,
48
+ xo as NotFound,
49
+ T as Pill,
50
+ K as Pricing,
51
+ E as QuantityInput,
52
+ d as Root,
53
+ q as SearchBox,
52
54
  g as Separator,
53
55
  s as Text,
54
56
  C as ToggleSwitch,
55
- w as configureImage,
57
+ D as configureImage,
56
58
  h as configureLink,
57
- G as getHideAtStyles,
59
+ O as getHideAtStyles,
58
60
  y as linkClassName,
59
61
  F as routerOverride
60
62
  };
@@ -1,67 +1,70 @@
1
- import { jsx as l, jsxs as s, Fragment as p } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as o, Fragment as m } from "react/jsx-runtime";
2
2
  import { c as _ } from "../../clsx-OuTLNxxd.js";
3
- import { Text as t } from "../../atoms/Text/Text.js";
4
- import { Tooltip as f } from "../../atoms/Tooltip/Tooltip.js";
5
- import '../../assets/Availability.css';const b = "_availability_9rzvh_1", z = "_tooltipContent_9rzvh_5", g = "_available_9rzvh_18", w = "_limited_9rzvh_21", C = "_discontinued_9rzvh_24", c = {
6
- availability: b,
7
- tooltipContent: z,
8
- available: g,
9
- "in-stock": "_in-stock_9rzvh_18",
10
- limited: w,
11
- discontinued: C
3
+ import { Text as l } from "../../atoms/Text/Text.js";
4
+ import { Tooltip as b } from "../../atoms/Tooltip/Tooltip.js";
5
+ import '../../assets/Availability.css';const k = "_availability_kb59t_1", f = "_pointer_kb59t_5", C = "_tooltip_kb59t_9", g = "_tooltipContent_kb59t_13", w = "_available_kb59t_26", z = "_limited_kb59t_29", S = "_discontinued_kb59t_32", s = {
6
+ availability: k,
7
+ pointer: f,
8
+ tooltip: C,
9
+ tooltipContent: g,
10
+ available: w,
11
+ "in-stock": "_in-stock_kb59t_26",
12
+ limited: z,
13
+ discontinued: S
12
14
  };
13
- function T({
15
+ function L({
14
16
  availId: i,
15
- availDescription: e,
17
+ availDescription: t,
16
18
  availClassName: d,
17
- enableTooltip: r = !1,
19
+ enableTooltip: n = !1,
18
20
  inventory: a
19
21
  }) {
20
- const o = /* @__PURE__ */ l(t, { size: "xs", className: _(c.availability, c[i], d), children: e });
21
- return r && a && i !== "not-found" ? /* @__PURE__ */ l(
22
- f,
22
+ const c = n && a && i !== "not-found", r = /* @__PURE__ */ e(l, { size: "xs", className: _(s.availability, s[i], c ? s.pointer : null, d), children: t });
23
+ return c ? /* @__PURE__ */ e(
24
+ b,
23
25
  {
24
26
  closeDelay: 0,
25
27
  openDelay: 250,
26
28
  position: "top center",
27
- trigger: o,
28
- children: /* @__PURE__ */ l(k, { availabilityId: i, inventory: a })
29
+ trigger: r,
30
+ contentClassName: s.tooltip,
31
+ children: /* @__PURE__ */ e(A, { availabilityId: i, inventory: a })
29
32
  }
30
- ) : o;
33
+ ) : r;
31
34
  }
32
- function k({ availabilityId: i, inventory: e }) {
33
- var r, a, o, n, h, u;
34
- const d = (((r = e == null ? void 0 : e.MPK) == null ? void 0 : r.Unreserved) ?? 0) + (((a = e == null ? void 0 : e.SEA) == null ? void 0 : a.Unreserved) ?? 0) + (((o = e == null ? void 0 : e.STL) == null ? void 0 : o.Unreserved) ?? 0);
35
+ function A({ availabilityId: i, inventory: t }) {
36
+ var n, a, c, r, p, u;
37
+ const d = (((n = t == null ? void 0 : t.MPK) == null ? void 0 : n.Unreserved) ?? 0) + (((a = t == null ? void 0 : t.SEA) == null ? void 0 : a.Unreserved) ?? 0) + (((c = t == null ? void 0 : t.STL) == null ? void 0 : c.Unreserved) ?? 0);
35
38
  if (i === "in-stock" || i === "limited") {
36
- const m = i === "in-stock" ? "Additional quantity will be backordered. If you need more than we have at any one warehouse, a CSR will contact you with options." : "Once our stock is depleted, this item will no longer be available.";
37
- return /* @__PURE__ */ s("div", { className: c.tooltipContent, children: [
38
- /* @__PURE__ */ s(t, { size: "sm", children: [
39
+ const h = i === "in-stock" ? "Additional quantity will be backordered. If you need more than we have at any one warehouse, a CSR will contact you with options." : "Once our stock is depleted, this item will no longer be available.";
40
+ return /* @__PURE__ */ o("div", { className: s.tooltipContent, children: [
41
+ /* @__PURE__ */ o(l, { size: "sm", children: [
39
42
  "We currently have (",
40
43
  d,
41
44
  ") in stock across our three warehouses:"
42
45
  ] }),
43
- /* @__PURE__ */ s("ul", { children: [
44
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
46
+ /* @__PURE__ */ o("ul", { children: [
47
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
45
48
  "(",
46
- ((n = e == null ? void 0 : e.MPK) == null ? void 0 : n.Unreserved) ?? 0,
49
+ ((r = t == null ? void 0 : t.MPK) == null ? void 0 : r.Unreserved) ?? 0,
47
50
  ") Los Angeles"
48
51
  ] }) }),
49
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
52
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
50
53
  "(",
51
- ((h = e == null ? void 0 : e.STL) == null ? void 0 : h.Unreserved) ?? 0,
54
+ ((p = t == null ? void 0 : t.STL) == null ? void 0 : p.Unreserved) ?? 0,
52
55
  ") St. Louis"
53
56
  ] }) }),
54
- /* @__PURE__ */ l("li", { children: /* @__PURE__ */ s(t, { size: "sm", children: [
57
+ /* @__PURE__ */ e("li", { children: /* @__PURE__ */ o(l, { size: "sm", children: [
55
58
  "(",
56
- ((u = e == null ? void 0 : e.SEA) == null ? void 0 : u.Unreserved) ?? 0,
59
+ ((u = t == null ? void 0 : t.SEA) == null ? void 0 : u.Unreserved) ?? 0,
57
60
  ") Seattle"
58
61
  ] }) })
59
62
  ] }),
60
- /* @__PURE__ */ l(t, { size: "sm", children: m })
63
+ /* @__PURE__ */ e(l, { size: "sm", children: h })
61
64
  ] });
62
65
  }
63
- return i === "available" ? /* @__PURE__ */ l("div", { className: c.tooltipContent, children: /* @__PURE__ */ l(t, { size: "sm", children: "While this part is not currently in stock, we will arrange to get it to you asap, and your CSR will keep you advised of the lead time." }) }) : i === "discontinued" ? /* @__PURE__ */ l("div", { className: c.tooltipContent, children: /* @__PURE__ */ l(t, { size: "sm", children: "Unfortunately, this item is no longer available to purchase." }) }) : /* @__PURE__ */ l(p, {});
66
+ return i === "available" ? /* @__PURE__ */ e("div", { className: s.tooltipContent, children: /* @__PURE__ */ e(l, { size: "sm", children: "While this part is not currently in stock, we will arrange to get it to you asap, and your CSR will keep you advised of the lead time." }) }) : i === "discontinued" ? /* @__PURE__ */ e("div", { className: s.tooltipContent, children: /* @__PURE__ */ e(l, { size: "sm", children: "Unfortunately, this item is no longer available to purchase." }) }) : /* @__PURE__ */ e(m, {});
64
67
  }
65
68
  export {
66
- T as Availability
69
+ L as Availability
67
70
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.210",
4
+ "version": "0.0.212",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",