@caseparts-org/caseblocks 0.0.212 → 0.0.214

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
- ._input-container_8oisf_1{display:flex;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._input-container_8oisf_1>label{font-family:var(--font-family-label);font-size:var(--font-size-xs)}._input_8oisf_1{height:32px;border-radius:var(--radius-radius-minimal, 2px);border:1px solid var(--border-border-primary, #dfdfdf);background:var(--surface-surface-primary);padding:0px var(--spacing-spacing-1xs, 12px);outline:none;font-size:var(--font-size-sm);width:100%}@media (max-width:768px){._input_8oisf_1{font-size:var(--font-size-md)}}._input_8oisf_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn)}
1
+ ._input-container_11f48_1{display:flex;position:relative;flex-direction:column;align-items:flex-start;width:100%;box-sizing:border-box}._input_11f48_1{height:32px;border-radius:var(--radius-radius-minimal, 2px);border:1px solid var(--border-border-primary, #dfdfdf);background:var(--surface-surface-primary);padding:0px var(--spacing-spacing-1xs, 12px);outline:none;font-size:var(--font-size-sm);width:100%}@media (max-width:767px){._input_11f48_1{font-size:var(--font-size-md)}}._input_11f48_1:focus{border:1px solid var(--border-border-primary-btn, #1380b1);box-shadow:0 0 2px 1px var(--border-border-primary-btn)}._label_11f48_29{position:absolute;align-self:flex-start;left:8px;top:-8px;padding:0 8px;cursor:text;transition:all .2s ease-in;font-family:var(--font-family-label);font-size:var(--font-size-xxs);color:var(--text-text-quaternary);background-color:var(--surface-surface-primary)}._labelPlaceholder_11f48_43{position:absolute;align-self:flex-start;font-style:italic;font-family:var(--font-family-label);font-size:var(--font-size-sm);background-color:transparent;color:var(--text-text-quaternary);left:12px;top:8px;padding:0 2px;cursor:text;transition:all .2s ease-in}input:hover{border:1px solid var(--border-border-primary-btn, #1380b1);transition:all .2s ease}
@@ -0,0 +1 @@
1
+ ._progressBar-section_w0n30_1{width:500px;display:grid;gap:var(--spacing-spacing-2xs)}._progressBar-cell_w0n30_11{width:90px;display:flex;align-items:center;gap:var(--spacing-spacing-2xs)}._progressBar-cell_w0n30_11>._track_w0n30_25{height:8px}._progressBar-section_w0n30_1>._track_w0n30_25{height:24px}._track_w0n30_25{border:1px solid var(--border-border-primary);border-radius:28px;width:100%;display:flex;flex-direction:row;overflow:hidden;background-color:var(--color-neutrals-neutral-1)}._completed_w0n30_59{background-color:var(--color-alerts-success);height:100%}._inProgress_w0n30_69{background-color:var(--color-alerts-caution-tips);height:100%}._completed_w0n30_59,._completedFull_w0n30_81,._inProgress_w0n30_69{transition:width .8s ease}._labels_w0n30_91{display:flex;flex-direction:row;justify-content:flex-start;gap:var(--spacing-spacing-default)}._labelContainer_w0n30_105{display:flex;flex-direction:row;gap:4px}
@@ -1,6 +1,6 @@
1
1
  import { default as React } from 'react';
2
2
  import { HideAtProps } from '../HideAt';
3
- export interface InputProps extends React.InputHTMLAttributes<HTMLInputElement>, HideAtProps {
3
+ export interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "placeholder">, HideAtProps {
4
4
  label: string | null;
5
5
  }
6
6
  export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
@@ -1,26 +1,34 @@
1
- import { jsxs as p, jsx as i } from "react/jsx-runtime";
2
- import r from "react";
3
- import { c as m } from "../../clsx-OuTLNxxd.js";
4
- import { getHideAtStyles as c } from "../HideAt.js";
5
- import '../../assets/Input.css';const u = "_input_8oisf_1", e = {
6
- "input-container": "_input-container_8oisf_1",
7
- input: u
8
- }, l = r.forwardRef(
9
- ({ label: n, hideAt: s, className: a, ...t }, o) => /* @__PURE__ */ p("div", { className: e["input-container"], children: [
10
- n && /* @__PURE__ */ i("label", { htmlFor: t.name, children: n }),
11
- /* @__PURE__ */ i(
12
- "input",
13
- {
14
- ref: o,
15
- id: t.name,
16
- type: "text",
17
- className: m(e.input, c(s), a),
18
- ...t
19
- }
20
- )
21
- ] })
1
+ import { jsxs as d, jsx as n } from "react/jsx-runtime";
2
+ import m, { useState as p } from "react";
3
+ import { c as s } from "../../clsx-OuTLNxxd.js";
4
+ import { getHideAtStyles as _ } from "../HideAt.js";
5
+ import '../../assets/Input.css';const f = "_input_11f48_1", b = "_label_11f48_29", F = "_labelPlaceholder_11f48_43", e = {
6
+ "input-container": "_input-container_11f48_1",
7
+ input: f,
8
+ label: b,
9
+ labelPlaceholder: F
10
+ }, h = m.forwardRef(
11
+ ({ label: o, value: t, hideAt: c, className: i, ...l }, r) => {
12
+ const [u, a] = p(!1);
13
+ return /* @__PURE__ */ d("div", { className: s(e["input-container"], _(c)), children: [
14
+ /* @__PURE__ */ n("label", { htmlFor: l.name, className: u || t ? e.label : e.labelPlaceholder, children: o }),
15
+ /* @__PURE__ */ n(
16
+ "input",
17
+ {
18
+ value: t,
19
+ ref: r,
20
+ id: l.name,
21
+ type: "text",
22
+ onFocus: () => a(!0),
23
+ onBlur: () => a(!1),
24
+ className: s(e.input, i),
25
+ ...l
26
+ }
27
+ )
28
+ ] });
29
+ }
22
30
  );
23
- l.displayName = "Input";
31
+ h.displayName = "Input";
24
32
  export {
25
- l as Input
33
+ h as Input
26
34
  };
@@ -11,3 +11,4 @@ export default meta;
11
11
  type Story = StoryObj<typeof meta>;
12
12
  export declare const Default: Story;
13
13
  export declare const WithHideAt: Story;
14
+ export declare const ContactAutocompleteForm: Story;
@@ -1,27 +1,164 @@
1
- import { Input as e } from "./Input.js";
2
- const a = {
1
+ import { jsx as a, jsxs as p } from "react/jsx-runtime";
2
+ import { useState as u, useEffect as i } from "react";
3
+ import { Input as l } from "./Input.js";
4
+ const h = {
3
5
  title: "Case Parts/Atoms/Input",
4
- component: e,
6
+ component: l,
5
7
  parameters: {
6
8
  // Optional parameter to center the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
7
9
  layout: "centered"
8
10
  },
9
11
  // This component will have an automatically generated Autodocs entry: https://storybook.js.org/docs/writing-docs/autodocs
10
12
  tags: ["autodocs"]
11
- }, l = {
13
+ }, d = ({ value: e, onChange: o, ...t }) => {
14
+ const [m, s] = u(e ?? "");
15
+ i(() => {
16
+ s(e ?? "");
17
+ }, [e]);
18
+ function r(n) {
19
+ s(n.target.value), o == null || o(n);
20
+ }
21
+ return /* @__PURE__ */ a(l, { ...t, value: m, onChange: r });
22
+ }, C = () => {
23
+ const [e, o] = u({
24
+ firstName: "",
25
+ lastName: "",
26
+ email: "",
27
+ phone: "",
28
+ address1: "",
29
+ city: "",
30
+ state: "",
31
+ postalCode: ""
32
+ });
33
+ function t(m) {
34
+ const { name: s, value: r } = m.target;
35
+ o((n) => ({
36
+ ...n,
37
+ [s]: r
38
+ }));
39
+ }
40
+ return /* @__PURE__ */ p(
41
+ "form",
42
+ {
43
+ style: {
44
+ display: "grid",
45
+ gap: "1rem",
46
+ width: "min(40rem, 100%)",
47
+ gridTemplateColumns: "repeat(2, minmax(0, 1fr))"
48
+ },
49
+ children: [
50
+ /* @__PURE__ */ a(
51
+ l,
52
+ {
53
+ label: "First name",
54
+ name: "firstName",
55
+ autoComplete: "given-name",
56
+ value: e.firstName,
57
+ onChange: t
58
+ }
59
+ ),
60
+ /* @__PURE__ */ a(
61
+ l,
62
+ {
63
+ label: "Last name",
64
+ name: "lastName",
65
+ autoComplete: "family-name",
66
+ value: e.lastName,
67
+ onChange: t
68
+ }
69
+ ),
70
+ /* @__PURE__ */ a(
71
+ l,
72
+ {
73
+ label: "Email",
74
+ name: "email",
75
+ type: "email",
76
+ autoComplete: "email",
77
+ value: e.email,
78
+ onChange: t
79
+ }
80
+ ),
81
+ /* @__PURE__ */ a(
82
+ l,
83
+ {
84
+ label: "Phone",
85
+ name: "phone",
86
+ type: "tel",
87
+ autoComplete: "tel",
88
+ value: e.phone,
89
+ onChange: t
90
+ }
91
+ ),
92
+ /* @__PURE__ */ a(
93
+ l,
94
+ {
95
+ label: "Address",
96
+ name: "address1",
97
+ autoComplete: "street-address",
98
+ value: e.address1,
99
+ onChange: t,
100
+ style: { gridColumn: "1 / -1" }
101
+ }
102
+ ),
103
+ /* @__PURE__ */ a(
104
+ l,
105
+ {
106
+ label: "City",
107
+ name: "city",
108
+ autoComplete: "address-level2",
109
+ value: e.city,
110
+ onChange: t
111
+ }
112
+ ),
113
+ /* @__PURE__ */ a(
114
+ l,
115
+ {
116
+ label: "State",
117
+ name: "state",
118
+ autoComplete: "address-level1",
119
+ value: e.state,
120
+ onChange: t
121
+ }
122
+ ),
123
+ /* @__PURE__ */ a(
124
+ l,
125
+ {
126
+ label: "Postal code",
127
+ name: "postalCode",
128
+ autoComplete: "postal-code",
129
+ value: e.postalCode,
130
+ onChange: t
131
+ }
132
+ )
133
+ ]
134
+ }
135
+ );
136
+ }, f = {
12
137
  args: {
13
138
  label: "Label",
14
- placeholder: "Type here..."
15
- }
16
- }, o = {
139
+ value: ""
140
+ },
141
+ render: (e) => /* @__PURE__ */ a(d, { ...e })
142
+ }, b = {
17
143
  args: {
18
144
  label: "Label",
19
- placeholder: "Hidden at md",
20
- hideAt: "md"
21
- }
145
+ hideAt: ["md", "lg"],
146
+ value: ""
147
+ },
148
+ render: (e) => /* @__PURE__ */ a(d, { ...e })
149
+ }, y = {
150
+ args: {
151
+ label: "Label",
152
+ value: ""
153
+ },
154
+ parameters: {
155
+ layout: "padded"
156
+ },
157
+ render: () => /* @__PURE__ */ a(C, {})
22
158
  };
23
159
  export {
24
- l as Default,
25
- o as WithHideAt,
26
- a as default
160
+ y as ContactAutocompleteForm,
161
+ f as Default,
162
+ b as WithHideAt,
163
+ h as default
27
164
  };
@@ -1,6 +1,6 @@
1
- import { ReactNode } from 'react';
1
+ import { default as React, ReactNode } from 'react';
2
2
  import { TextColorToken } from '../Text/Text';
3
- export interface PillProps {
3
+ export interface PillProps extends React.HTMLAttributes<HTMLSpanElement> {
4
4
  children: ReactNode;
5
5
  colorToken?: "neutral" | "secondary" | "caution-tips" | "warning" | "success" | "error-warning";
6
6
  customColor?: string;
@@ -8,4 +8,4 @@ export interface PillProps {
8
8
  size: "xs" | "sm" | "md";
9
9
  className?: string;
10
10
  }
11
- export declare function Pill({ children, colorToken, textColorToken, customColor, size, className }: PillProps): import("react/jsx-runtime").JSX.Element;
11
+ export declare function Pill({ colorToken, textColorToken, customColor, size, className, children, ...otherProps }: PillProps): import("react/jsx-runtime").JSX.Element;
@@ -1,8 +1,8 @@
1
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,
2
+ import { Text as m } from "../Text/Text.js";
3
+ import { c as d } from "../../clsx-OuTLNxxd.js";
4
+ import '../../assets/Pill.css';const t = "_pill_1dm0w_1", l = {
5
+ pill: t,
6
6
  "pill-xs": "_pill-xs_1dm0w_17",
7
7
  "pill-sm": "_pill-sm_1dm0w_25",
8
8
  "pill-md": "_pill-md_1dm0w_33",
@@ -13,21 +13,30 @@ import '../../assets/Pill.css';const d = "_pill_1dm0w_1", l = {
13
13
  "pill-color-success": "_pill-color-success_1dm0w_73",
14
14
  "pill-color-error-warning": "_pill-color-error-warning_1dm0w_81"
15
15
  };
16
- function w({ children: p, colorToken: _ = "neutral", textColorToken: c, customColor: o, size: r, className: n }) {
16
+ function u({
17
+ colorToken: p = "neutral",
18
+ textColorToken: _,
19
+ customColor: o,
20
+ size: r,
21
+ className: c,
22
+ children: n,
23
+ ...s
24
+ }) {
17
25
  return /* @__PURE__ */ i(
18
26
  "span",
19
27
  {
20
- className: m(
28
+ className: d(
21
29
  l.pill,
22
- l[`pill-color-${_}`],
30
+ l[`pill-color-${p}`],
23
31
  l[`pill-${r}`],
24
- n
32
+ c
25
33
  ),
26
34
  style: o ? { background: o } : void 0,
27
- children: /* @__PURE__ */ i(s, { size: r, colorToken: c, children: p })
35
+ ...s,
36
+ children: /* @__PURE__ */ i(m, { size: r, colorToken: _, children: n })
28
37
  }
29
38
  );
30
39
  }
31
40
  export {
32
- w as Pill
41
+ u as Pill
33
42
  };
@@ -4,11 +4,11 @@ import { Column as f, Grid as x } from "./atoms/Grid/Grid.js";
4
4
  import { Head as i } from "./atoms/Root/Head.js";
5
5
  import { Icon as l } from "./atoms/Icon/Icon.js";
6
6
  import { Root as u } from "./atoms/Root/Root.js";
7
- import { Separator as C } from "./atoms/Separator/Separator.js";
8
- import { Text as S } from "./atoms/Text/Text.js";
9
- import { Input as A } from "./atoms/Input/Input.js";
10
- import { ToggleSwitch as T } from "./atoms/ToggleSwitch/ToggleSwitch.js";
11
- import { Link as B } from "./atoms/Link/Link.js";
7
+ import { Separator as g } from "./atoms/Separator/Separator.js";
8
+ import { Text as s } from "./atoms/Text/Text.js";
9
+ import { Input as P } from "./atoms/Input/Input.js";
10
+ import { ToggleSwitch as B } from "./atoms/ToggleSwitch/ToggleSwitch.js";
11
+ import { Link as k } 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";
@@ -19,89 +19,91 @@ import { Logo as E } from "./molecules/Logo/Logo.js";
19
19
  import { SearchBox as O } from "./molecules/SearchBox/SearchBox.js";
20
20
  import { QuantityInput as R } from "./molecules/QuantityInput/QuantityInput.js";
21
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";
22
+ import { ProgressBar as J } from "./molecules/ProgressBar/ProgressBar.js";
23
+ import { Availability as U } from "./molecules/Availability/Availability.js";
24
+ import { Avatar as X } from "./molecules/Avatar/Avatar.js";
25
+ import { BannerCard as _ } from "./molecules/BannerCard/BannerCard.js";
26
+ import { CardLink as oo } from "./molecules/CardLink/CardLink.js";
27
+ import { Breadcrumbs as eo } from "./molecules/Breadcrumbs/Breadcrumbs.js";
28
+ import { Disclaimer as mo } from "./molecules/Disclaimer/Disclaimer.js";
29
+ import { Admonition as fo } from "./molecules/Admonition/Admonition.js";
30
+ import { NotFound as ao } from "./organisms/NotFound/NotFound.js";
31
+ import { HorizontalScroll as no } from "./atoms/HorizontalScroll/HorizontalScroll.js";
32
+ import { SlideInPanel as uo } from "./atoms/SlideInPanel/SlideInPanel.js";
33
+ import { DropdownButton as go } from "./atoms/DropdownButton/DropdownButton.js";
34
+ import { Tooltip as so } from "./atoms/Tooltip/Tooltip.js";
35
+ import { Popover as Po } from "./atoms/Popover/Popover.js";
36
+ import { Account as Bo } from "./molecules/Account/Account.js";
37
+ import { Chip as ko } from "./molecules/Chip/Chip.js";
38
+ import { ToggleView as ho } from "./molecules/ToggleView/ToggleView.js";
39
+ import { CartPart as wo } from "./molecules/Cart/CartPart.js";
40
+ import { AddToCartPart as bo } from "./molecules/AddToCartPart/AddToCartPart.js";
41
+ import { CartSlideInPanel as Fo } from "./molecules/Cart/CartSlideInPanel.js";
42
+ import { StatefulButton as Mo } from "./molecules/StatefulButton/StatefulButton.js";
43
+ import { AnimatedCheckMark as Vo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
44
+ import { AddToCart as zo } from "./molecules/AddToCart/AddToCart.js";
45
+ import { Modal as Go } from "./molecules/Modal/Modal.js";
46
+ import { ImageViewer as Qo } from "./molecules/ImageViewer/ImageViewer.js";
47
+ import { T as Zo } from "./Table-BX4PtCNE.js";
48
+ import { Error as qo } from "./molecules/Error/Error.js";
49
+ import { MainNav as Ko } from "./organisms/MainNav/MainNav.js";
50
+ import { ChipSelector as Wo } from "./organisms/ChipSelector/ChipSelector.js";
51
+ import { Product as Yo } from "./organisms/Product/Product.js";
52
+ import { Carousel as $o } from "./organisms/Carousel/Carousel.js";
53
+ import { Footer as rr } from "./organisms/Footer/Footer.js";
54
+ import { default as tr } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
54
55
  export {
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,
56
+ Bo as Account,
57
+ zo as AddToCart,
58
+ bo as AddToCartPart,
59
+ fo as Admonition,
60
+ Vo as AnimatedCheckMark,
61
+ U as Availability,
62
+ X as Avatar,
63
+ _ as BannerCard,
64
+ eo as Breadcrumbs,
64
65
  e as Button,
65
- _ as CardLink,
66
- Yo as Carousel,
67
- ho as CartPart,
68
- bo as CartSlideInPanel,
69
- To as Chip,
70
- Ko as ChipSelector,
66
+ oo as CardLink,
67
+ $o as Carousel,
68
+ wo as CartPart,
69
+ Fo as CartSlideInPanel,
70
+ ko as Chip,
71
+ Wo as ChipSelector,
71
72
  f as Column,
72
- eo as Disclaimer,
73
- uo as DropdownButton,
74
- Zo as Error,
73
+ mo as Disclaimer,
74
+ go as DropdownButton,
75
+ qo as Error,
75
76
  m as Flex,
76
- $o as Footer,
77
+ rr as Footer,
77
78
  x as Grid,
78
79
  i as Head,
79
- ao as HorizontalScroll,
80
+ no as HorizontalScroll,
80
81
  l as Icon,
81
- Go as ImageViewer,
82
- A as Input,
83
- B as Link,
82
+ Qo as ImageViewer,
83
+ P as Input,
84
+ k as Link,
84
85
  y as LinkButton,
85
86
  E as Logo,
86
- qo as MainNav,
87
- zo as Modal,
88
- fo as NotFound,
87
+ Ko as MainNav,
88
+ Go as Modal,
89
+ ao as NotFound,
89
90
  H as Pill,
90
- So as Popover,
91
+ Po as Popover,
91
92
  j as Pricing,
92
- Wo as Product,
93
+ Yo as Product,
94
+ J as ProgressBar,
93
95
  R as QuantityInput,
94
96
  u as Root,
95
97
  O as SearchBox,
96
- C as Separator,
97
- no as SlideInPanel,
98
- rr as SpinZoomViewer,
99
- Fo as StatefulButton,
100
- Qo as Table,
101
- S as Text,
102
- T as ToggleSwitch,
103
- Bo as ToggleView,
104
- Co as Tooltip,
98
+ g as Separator,
99
+ uo as SlideInPanel,
100
+ tr as SpinZoomViewer,
101
+ Mo as StatefulButton,
102
+ Zo as Table,
103
+ s as Text,
104
+ B as ToggleSwitch,
105
+ ho as ToggleView,
106
+ so as Tooltip,
105
107
  N as configureImage,
106
108
  w as configureLink,
107
109
  D as getHideAtStyles,
@@ -36,6 +36,8 @@ export type { QuantityInputProps } from './molecules/QuantityInput/QuantityInput
36
36
  export { QuantityInput } from './molecules/QuantityInput/QuantityInput';
37
37
  export { Pricing } from './molecules/Pricing/Pricing';
38
38
  export type { PricingProps } from './molecules/Pricing/Pricing';
39
+ export { ProgressBar } from './molecules/ProgressBar/ProgressBar';
40
+ export type { ProgressBarProps } from './molecules/ProgressBar/ProgressBar';
39
41
  export { Availability } from './molecules/Availability/Availability';
40
42
  export type { AvailabilityProps } from './molecules/Availability/Availability';
41
43
  export { Avatar } from './molecules/Avatar/Avatar';
@@ -1,17 +1,17 @@
1
- import { Button as t } from "./atoms/Button/Button.js";
1
+ import { Button as e } 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
5
  import { Icon as l } from "./atoms/Icon/Icon.js";
6
6
  import { Root as d } from "./atoms/Root/Root.js";
7
- import { Separator as g } from "./atoms/Separator/Separator.js";
8
- import { Text as s } from "./atoms/Text/Text.js";
7
+ import { Separator as c } from "./atoms/Separator/Separator.js";
8
+ import { Text as B } from "./atoms/Text/Text.js";
9
9
  import { Input as L } from "./atoms/Input/Input.js";
10
10
  import { ToggleSwitch as C } from "./atoms/ToggleSwitch/ToggleSwitch.js";
11
11
  import { Link as S } from "./atoms/Link/Link.js";
12
12
  import { linkClassName as y } from "./atoms/Link/linkClassName.js";
13
- import { configureLink as h, routerOverride as F } from "./atoms/Link/configureLink.js";
14
- import { LinkButton as N } from "./atoms/LinkButton/LinkButton.js";
13
+ import { configureLink as b, routerOverride as h } from "./atoms/Link/configureLink.js";
14
+ import { LinkButton as H } from "./atoms/LinkButton/LinkButton.js";
15
15
  import { Pill as T } from "./atoms/Pill/Pill.js";
16
16
  import { configureImage as D } from "./atoms/Image/configureImage.js";
17
17
  import { getHideAtStyles as O } from "./atoms/HideAt.js";
@@ -19,44 +19,46 @@ import { Logo as R } from "./molecules/Logo/Logo.js";
19
19
  import { SearchBox as q } from "./molecules/SearchBox/SearchBox.js";
20
20
  import { QuantityInput as E } from "./molecules/QuantityInput/QuantityInput.js";
21
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";
22
+ import { ProgressBar as U } from "./molecules/ProgressBar/ProgressBar.js";
23
+ import { Availability as W } from "./molecules/Availability/Availability.js";
24
+ import { Avatar as Y } from "./molecules/Avatar/Avatar.js";
25
+ import { BannerCard as _ } from "./molecules/BannerCard/BannerCard.js";
26
+ import { CardLink as rr } from "./molecules/CardLink/CardLink.js";
27
+ import { Breadcrumbs as er } from "./molecules/Breadcrumbs/Breadcrumbs.js";
28
+ import { Disclaimer as mr } from "./molecules/Disclaimer/Disclaimer.js";
29
+ import { Admonition as xr } from "./molecules/Admonition/Admonition.js";
30
+ import { NotFound as ir } from "./organisms/NotFound/NotFound.js";
30
31
  export {
31
- mo as Admonition,
32
- U as Availability,
33
- W as Avatar,
34
- Y as BannerCard,
35
- oo as Breadcrumbs,
36
- t as Button,
37
- _ as CardLink,
32
+ xr as Admonition,
33
+ W as Availability,
34
+ Y as Avatar,
35
+ _ as BannerCard,
36
+ er as Breadcrumbs,
37
+ e as Button,
38
+ rr as CardLink,
38
39
  x as Column,
39
- to as Disclaimer,
40
+ mr as Disclaimer,
40
41
  m as Flex,
41
42
  f as Grid,
42
43
  n as Head,
43
44
  l as Icon,
44
45
  L as Input,
45
46
  S as Link,
46
- N as LinkButton,
47
+ H as LinkButton,
47
48
  R as Logo,
48
- xo as NotFound,
49
+ ir as NotFound,
49
50
  T as Pill,
50
51
  K as Pricing,
52
+ U as ProgressBar,
51
53
  E as QuantityInput,
52
54
  d as Root,
53
55
  q as SearchBox,
54
- g as Separator,
55
- s as Text,
56
+ c as Separator,
57
+ B as Text,
56
58
  C as ToggleSwitch,
57
59
  D as configureImage,
58
- h as configureLink,
60
+ b as configureLink,
59
61
  O as getHideAtStyles,
60
62
  y as linkClassName,
61
- F as routerOverride
63
+ h as routerOverride
62
64
  };
@@ -0,0 +1,13 @@
1
+ import { default as React } from 'react';
2
+ export interface ProgressBarProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ kind?: "percent" | "raw";
4
+ completedValue: number;
5
+ inProgressValue?: number;
6
+ totalValue?: number;
7
+ totalLabel?: string;
8
+ completedLabel?: string;
9
+ inProgressLabel?: string;
10
+ variant: "cell" | "section";
11
+ className?: string;
12
+ }
13
+ export declare function ProgressBar({ kind, completedValue, inProgressValue, totalValue, totalLabel, completedLabel, inProgressLabel, variant, className, ...otherProps }: ProgressBarProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,83 @@
1
+ import { jsxs as n, jsx as l } from "react/jsx-runtime";
2
+ import { Text as _ } from "../../atoms/Text/Text.js";
3
+ import { c as f } from "../../clsx-OuTLNxxd.js";
4
+ import '../../assets/ProgressBar.css';const g = "_track_w0n30_25", v = "_completed_w0n30_59", x = "_inProgress_w0n30_69", B = "_completedFull_w0n30_81", N = "_labels_w0n30_91", k = "_labelContainer_w0n30_105", r = {
5
+ "progressBar-section": "_progressBar-section_w0n30_1",
6
+ "progressBar-cell": "_progressBar-cell_w0n30_11",
7
+ track: g,
8
+ completed: v,
9
+ inProgress: x,
10
+ completedFull: B,
11
+ labels: N,
12
+ labelContainer: k
13
+ };
14
+ function z({
15
+ kind: o = "percent",
16
+ completedValue: s,
17
+ inProgressValue: e,
18
+ totalValue: i,
19
+ totalLabel: d,
20
+ completedLabel: p,
21
+ inProgressLabel: h,
22
+ variant: a,
23
+ className: b,
24
+ ...w
25
+ }) {
26
+ let c = 0, t = 0;
27
+ return o === "percent" && (c = s, t = e ?? 0), o === "raw" && i !== void 0 && (c = s / i * 100, e === void 0 && (e = 0), t = e / i * 100), c = Math.min(100, Math.max(0, c)), t = Math.min(100, Math.max(0, t)), /* @__PURE__ */ n(
28
+ "div",
29
+ {
30
+ className: f(
31
+ r.progressBar,
32
+ r[`progressBar-${a}`],
33
+ b
34
+ ),
35
+ ...w,
36
+ children: [
37
+ a === "section" && /* @__PURE__ */ n("div", { className: r.labels, children: [
38
+ /* @__PURE__ */ l(
39
+ m,
40
+ {
41
+ label: d,
42
+ value: i
43
+ }
44
+ ),
45
+ /* @__PURE__ */ l(
46
+ m,
47
+ {
48
+ label: p,
49
+ value: s
50
+ }
51
+ ),
52
+ /* @__PURE__ */ l(
53
+ m,
54
+ {
55
+ label: h,
56
+ value: e
57
+ }
58
+ )
59
+ ] }),
60
+ /* @__PURE__ */ n("div", { className: r.track, children: [
61
+ /* @__PURE__ */ l("div", { className: r.completed, style: { width: `${c}%` } }),
62
+ a === "section" && e !== void 0 && e !== 0 && s < 100 && /* @__PURE__ */ l("div", { className: r.inProgress, style: { width: `${t}%` } })
63
+ ] }),
64
+ a === "cell" && /* @__PURE__ */ n(_, { weight: "semibold", size: "xs", children: [
65
+ s,
66
+ "%"
67
+ ] })
68
+ ]
69
+ }
70
+ );
71
+ }
72
+ function m({ isVisible: o = !0, label: s, value: e }) {
73
+ return !o || !s || !e ? null : /* @__PURE__ */ n("div", { className: r.labelContainer, children: [
74
+ /* @__PURE__ */ n(_, { size: "sm", colorToken: "quaternary", children: [
75
+ s,
76
+ ":"
77
+ ] }),
78
+ /* @__PURE__ */ l(_, { weight: "semibold", size: "sm", children: e })
79
+ ] });
80
+ }
81
+ export {
82
+ z as ProgressBar
83
+ };
@@ -0,0 +1,19 @@
1
+ import { StoryObj } from '@storybook/react-vite';
2
+ import { ProgressBar } from './ProgressBar';
3
+ declare const meta: {
4
+ title: string;
5
+ component: typeof ProgressBar;
6
+ parameters: {
7
+ layout: string;
8
+ };
9
+ tags: string[];
10
+ };
11
+ export default meta;
12
+ type Story = StoryObj<typeof meta>;
13
+ export declare const CellVariant: Story;
14
+ export declare const SectionVariant: Story;
15
+ export declare const SectionAllLabelsUsed: Story;
16
+ export declare const CellZeroPercentProgress: Story;
17
+ export declare const CellHundredPercentProgress: Story;
18
+ export declare const SectionZeroPercentProgress: Story;
19
+ export declare const SectionHundredPercentProgress: Story;
@@ -0,0 +1,69 @@
1
+ import { ProgressBar as e } from "./ProgressBar.js";
2
+ const r = {
3
+ title: "Case Parts/Molecules/ProgressBar",
4
+ component: e,
5
+ parameters: {
6
+ layout: "centered"
7
+ },
8
+ tags: ["autodocs"]
9
+ }, a = {
10
+ args: {
11
+ variant: "cell",
12
+ kind: "percent",
13
+ completedValue: 75
14
+ }
15
+ }, o = {
16
+ args: {
17
+ variant: "section",
18
+ kind: "percent",
19
+ completedValue: 60,
20
+ completedLabel: "Completed"
21
+ }
22
+ }, l = {
23
+ args: {
24
+ variant: "section",
25
+ kind: "raw",
26
+ completedValue: 50,
27
+ inProgressValue: 30,
28
+ totalValue: 120,
29
+ totalLabel: "Total",
30
+ completedLabel: "Completed",
31
+ inProgressLabel: "In progress"
32
+ }
33
+ }, n = {
34
+ args: {
35
+ variant: "cell",
36
+ kind: "percent",
37
+ completedValue: 0
38
+ }
39
+ }, s = {
40
+ args: {
41
+ variant: "cell",
42
+ kind: "percent",
43
+ completedValue: 100
44
+ }
45
+ }, c = {
46
+ args: {
47
+ variant: "section",
48
+ kind: "percent",
49
+ completedValue: 0,
50
+ completedLabel: "Completed"
51
+ }
52
+ }, d = {
53
+ args: {
54
+ variant: "section",
55
+ kind: "percent",
56
+ completedValue: 100,
57
+ completedLabel: "Completed"
58
+ }
59
+ };
60
+ export {
61
+ s as CellHundredPercentProgress,
62
+ a as CellVariant,
63
+ n as CellZeroPercentProgress,
64
+ l as SectionAllLabelsUsed,
65
+ d as SectionHundredPercentProgress,
66
+ o as SectionVariant,
67
+ c as SectionZeroPercentProgress,
68
+ r as default
69
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.212",
4
+ "version": "0.0.214",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",