@caseparts-org/caseblocks 0.0.213 → 0.0.215
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.
- package/dist/assets/Accordion.css +1 -0
- package/dist/assets/Input.css +1 -1
- package/dist/atoms/Input/Input.d.ts +2 -1
- package/dist/atoms/Input/Input.js +31 -23
- package/dist/atoms/Input/Input.stories.d.ts +1 -0
- package/dist/atoms/Input/Input.stories.js +150 -13
- package/dist/main-client.d.ts +2 -0
- package/dist/main-client.js +76 -72
- package/dist/main-server.d.ts +2 -0
- package/dist/main-server.js +29 -27
- package/dist/molecules/Accordion/Accordion.d.ts +27 -0
- package/dist/molecules/Accordion/Accordion.js +49 -0
- package/dist/molecules/Accordion/Accordion.stories.d.ts +27 -0
- package/dist/molecules/Accordion/Accordion.stories.js +72 -0
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
._accordion_1f0ed_1{width:100%;border:none}._accordionItem_1f0ed_11{display:flex;flex-direction:column;border-bottom:1px solid var(--color-neutrals-neutral-2)}._accordionItem_1f0ed_11:last-child{border:none}._accordionTrigger_1f0ed_31{display:flex;flex-direction:row;justify-content:space-between;width:100%;padding:12px;text-align:left;cursor:pointer;font-family:var(--font-family-heading);font-size:var(--font-size-xl);font-weight:var(--font-weight-bold);border:none;background-color:var(--color-brand-primary-white)}._accordionTrigger_1f0ed_31>._chevron_1f0ed_61{color:var(--color-brand-primary-primary-teal-blue);transition:transform .3s ease}._accordionTrigger_1f0ed_31>._chevronExpanded_1f0ed_71{transform:rotate(180deg)}._accordionContent_1f0ed_79{font-family:var(--font-family-body);font-weight:var(--font-weight-regular);background-color:var(--color-brand-primary-white);max-height:0;padding:0 12px;overflow:hidden;transition:max-height .3s ease,padding .3s}._expanded_1f0ed_99{max-height:1000px;padding:0 12px 12px}
|
package/dist/assets/Input.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._input-
|
|
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}
|
|
@@ -1,6 +1,7 @@
|
|
|
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
|
+
placeholder?: string;
|
|
5
6
|
}
|
|
6
7
|
export declare const Input: React.ForwardRefExoticComponent<InputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,26 +1,34 @@
|
|
|
1
|
-
import { jsxs as p, jsx as
|
|
2
|
-
import
|
|
3
|
-
import { c
|
|
4
|
-
import { getHideAtStyles as
|
|
5
|
-
import '../../assets/Input.css';const
|
|
6
|
-
"input-container": "_input-
|
|
7
|
-
input:
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
import { jsxs as p, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import _, { useState as f } from "react";
|
|
3
|
+
import { c } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { getHideAtStyles as b } from "../HideAt.js";
|
|
5
|
+
import '../../assets/Input.css';const F = "_input_11f48_1", h = "_label_11f48_29", x = "_labelPlaceholder_11f48_43", e = {
|
|
6
|
+
"input-container": "_input-container_11f48_1",
|
|
7
|
+
input: F,
|
|
8
|
+
label: h,
|
|
9
|
+
labelPlaceholder: x
|
|
10
|
+
}, y = _.forwardRef(
|
|
11
|
+
({ label: t, placeholder: i, value: a, hideAt: r, className: u, ...l }, d) => {
|
|
12
|
+
const [m, n] = f(!1), o = m || !!a;
|
|
13
|
+
return /* @__PURE__ */ p("div", { className: c(e["input-container"], b(r)), children: [
|
|
14
|
+
/* @__PURE__ */ s("label", { htmlFor: l.name, className: o ? e.label : e.labelPlaceholder, children: o ? t : i ?? t }),
|
|
15
|
+
/* @__PURE__ */ s(
|
|
16
|
+
"input",
|
|
17
|
+
{
|
|
18
|
+
value: a,
|
|
19
|
+
ref: d,
|
|
20
|
+
id: l.name,
|
|
21
|
+
type: "text",
|
|
22
|
+
onFocus: () => n(!0),
|
|
23
|
+
onBlur: () => n(!1),
|
|
24
|
+
className: c(e.input, u),
|
|
25
|
+
...l
|
|
26
|
+
}
|
|
27
|
+
)
|
|
28
|
+
] });
|
|
29
|
+
}
|
|
22
30
|
);
|
|
23
|
-
|
|
31
|
+
y.displayName = "Input";
|
|
24
32
|
export {
|
|
25
|
-
|
|
33
|
+
y as Input
|
|
26
34
|
};
|
|
@@ -1,27 +1,164 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
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:
|
|
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
|
-
},
|
|
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
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
139
|
+
value: ""
|
|
140
|
+
},
|
|
141
|
+
render: (e) => /* @__PURE__ */ a(d, { ...e })
|
|
142
|
+
}, b = {
|
|
17
143
|
args: {
|
|
18
144
|
label: "Label",
|
|
19
|
-
|
|
20
|
-
|
|
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
|
-
|
|
25
|
-
|
|
26
|
-
|
|
160
|
+
y as ContactAutocompleteForm,
|
|
161
|
+
f as Default,
|
|
162
|
+
b as WithHideAt,
|
|
163
|
+
h as default
|
|
27
164
|
};
|
package/dist/main-client.d.ts
CHANGED
|
@@ -8,6 +8,8 @@ export type { DropdownButtonProps, DropdownButtonOption, DropdownButtonStyles }
|
|
|
8
8
|
export { Tooltip } from './atoms/Tooltip/Tooltip';
|
|
9
9
|
export { Popover } from './atoms/Popover/Popover';
|
|
10
10
|
export type { PopoverProps } from './atoms/Popover/Popover';
|
|
11
|
+
export { Accordion } from './molecules/Accordion/Accordion';
|
|
12
|
+
export type { AccordionProps } from './molecules/Accordion/Accordion';
|
|
11
13
|
export { Account } from './molecules/Account/Account';
|
|
12
14
|
export type { AccountProps } from './molecules/Account/Account';
|
|
13
15
|
export { Chip } from './molecules/Chip/Chip';
|
package/dist/main-client.js
CHANGED
|
@@ -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
|
|
8
|
-
import { Text as
|
|
7
|
+
import { Separator as g } from "./atoms/Separator/Separator.js";
|
|
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
|
|
11
|
-
import { Link as
|
|
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,93 @@ 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 {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
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 Ao } from "./atoms/Popover/Popover.js";
|
|
36
|
+
import { Accordion as Bo } from "./molecules/Accordion/Accordion.js";
|
|
37
|
+
import { Account as ko } from "./molecules/Account/Account.js";
|
|
38
|
+
import { Chip as ho } from "./molecules/Chip/Chip.js";
|
|
39
|
+
import { ToggleView as wo } from "./molecules/ToggleView/ToggleView.js";
|
|
40
|
+
import { CartPart as bo } from "./molecules/Cart/CartPart.js";
|
|
41
|
+
import { AddToCartPart as Fo } from "./molecules/AddToCartPart/AddToCartPart.js";
|
|
42
|
+
import { CartSlideInPanel as Mo } from "./molecules/Cart/CartSlideInPanel.js";
|
|
43
|
+
import { StatefulButton as Vo } from "./molecules/StatefulButton/StatefulButton.js";
|
|
44
|
+
import { AnimatedCheckMark as zo } from "./molecules/StatefulButton/AnimatedCheckmark.js";
|
|
45
|
+
import { AddToCart as Go } from "./molecules/AddToCart/AddToCart.js";
|
|
46
|
+
import { Modal as Qo } from "./molecules/Modal/Modal.js";
|
|
47
|
+
import { ImageViewer as Zo } from "./molecules/ImageViewer/ImageViewer.js";
|
|
48
|
+
import { T as qo } from "./Table-BX4PtCNE.js";
|
|
49
|
+
import { Error as Ko } from "./molecules/Error/Error.js";
|
|
50
|
+
import { MainNav as Wo } from "./organisms/MainNav/MainNav.js";
|
|
51
|
+
import { ChipSelector as Yo } from "./organisms/ChipSelector/ChipSelector.js";
|
|
52
|
+
import { Product as $o } from "./organisms/Product/Product.js";
|
|
53
|
+
import { Carousel as rr } from "./organisms/Carousel/Carousel.js";
|
|
54
|
+
import { Footer as tr } from "./organisms/Footer/Footer.js";
|
|
55
|
+
import { default as pr } from "./organisms/SpinZoomViewer/SpinZoomViewer.js";
|
|
54
56
|
export {
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
U as
|
|
62
|
-
X as
|
|
63
|
-
|
|
57
|
+
Bo as Accordion,
|
|
58
|
+
ko as Account,
|
|
59
|
+
Go as AddToCart,
|
|
60
|
+
Fo as AddToCartPart,
|
|
61
|
+
fo as Admonition,
|
|
62
|
+
zo as AnimatedCheckMark,
|
|
63
|
+
U as Availability,
|
|
64
|
+
X as Avatar,
|
|
65
|
+
_ as BannerCard,
|
|
66
|
+
eo as Breadcrumbs,
|
|
64
67
|
e as Button,
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
68
|
+
oo as CardLink,
|
|
69
|
+
rr as Carousel,
|
|
70
|
+
bo as CartPart,
|
|
71
|
+
Mo as CartSlideInPanel,
|
|
72
|
+
ho as Chip,
|
|
73
|
+
Yo as ChipSelector,
|
|
71
74
|
f as Column,
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
+
mo as Disclaimer,
|
|
76
|
+
go as DropdownButton,
|
|
77
|
+
Ko as Error,
|
|
75
78
|
m as Flex,
|
|
76
|
-
|
|
79
|
+
tr as Footer,
|
|
77
80
|
x as Grid,
|
|
78
81
|
i as Head,
|
|
79
|
-
|
|
82
|
+
no as HorizontalScroll,
|
|
80
83
|
l as Icon,
|
|
81
|
-
|
|
84
|
+
Zo as ImageViewer,
|
|
82
85
|
A as Input,
|
|
83
|
-
|
|
86
|
+
k as Link,
|
|
84
87
|
y as LinkButton,
|
|
85
88
|
E as Logo,
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
+
Wo as MainNav,
|
|
90
|
+
Qo as Modal,
|
|
91
|
+
ao as NotFound,
|
|
89
92
|
H as Pill,
|
|
90
|
-
|
|
93
|
+
Ao as Popover,
|
|
91
94
|
j as Pricing,
|
|
92
|
-
|
|
95
|
+
$o as Product,
|
|
96
|
+
J as ProgressBar,
|
|
93
97
|
R as QuantityInput,
|
|
94
98
|
u as Root,
|
|
95
99
|
O as SearchBox,
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
100
|
+
g as Separator,
|
|
101
|
+
uo as SlideInPanel,
|
|
102
|
+
pr as SpinZoomViewer,
|
|
103
|
+
Vo as StatefulButton,
|
|
104
|
+
qo as Table,
|
|
105
|
+
s as Text,
|
|
106
|
+
B as ToggleSwitch,
|
|
107
|
+
wo as ToggleView,
|
|
108
|
+
so as Tooltip,
|
|
105
109
|
N as configureImage,
|
|
106
110
|
w as configureLink,
|
|
107
111
|
D as getHideAtStyles,
|
package/dist/main-server.d.ts
CHANGED
|
@@ -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';
|
package/dist/main-server.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { Button as
|
|
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
|
|
8
|
-
import { Text as
|
|
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
|
|
14
|
-
import { LinkButton as
|
|
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 {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
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
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
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
|
-
|
|
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
|
-
|
|
47
|
+
H as LinkButton,
|
|
47
48
|
R as Logo,
|
|
48
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
+
c as Separator,
|
|
57
|
+
B as Text,
|
|
56
58
|
C as ToggleSwitch,
|
|
57
59
|
D as configureImage,
|
|
58
|
-
|
|
60
|
+
b as configureLink,
|
|
59
61
|
O as getHideAtStyles,
|
|
60
62
|
y as linkClassName,
|
|
61
|
-
|
|
63
|
+
h as routerOverride
|
|
62
64
|
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface AccordionProps {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
defaultExpanded?: string;
|
|
5
|
+
expandedBehavior: "single" | "multi";
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
export declare function Accordion({ children, defaultExpanded, expandedBehavior, className }: AccordionProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export interface AccordionItemProps {
|
|
10
|
+
id: string;
|
|
11
|
+
children: React.ReactNode;
|
|
12
|
+
expanded?: boolean;
|
|
13
|
+
toggleItem?: (_id: string) => void;
|
|
14
|
+
}
|
|
15
|
+
export declare const AccordionItem: ({ id, children, expanded, toggleItem }: AccordionItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export interface AccordionTriggerProps {
|
|
17
|
+
id?: string;
|
|
18
|
+
children: React.ReactNode;
|
|
19
|
+
expanded?: boolean;
|
|
20
|
+
toggleItem?: (_id: string) => void;
|
|
21
|
+
}
|
|
22
|
+
export declare const AccordionTrigger: React.FC<AccordionTriggerProps>;
|
|
23
|
+
export interface AccordionContentProps {
|
|
24
|
+
children: React.ReactNode;
|
|
25
|
+
expanded?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export declare function AccordionContent({ children, expanded }: AccordionContentProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as m, jsxs as v } from "react/jsx-runtime";
|
|
2
|
+
import c, { useState as g } from "react";
|
|
3
|
+
import { c as x } from "../../clsx-OuTLNxxd.js";
|
|
4
|
+
import { Icon as E } from "../../atoms/Icon/Icon.js";
|
|
5
|
+
import '../../assets/Accordion.css';const C = "_accordion_1f0ed_1", A = "_accordionItem_1f0ed_11", T = "_accordionTrigger_1f0ed_31", h = "_chevron_1f0ed_61", I = "_chevronExpanded_1f0ed_71", V = "_accordionContent_1f0ed_79", y = "_expanded_1f0ed_99", i = {
|
|
6
|
+
accordion: C,
|
|
7
|
+
accordionItem: A,
|
|
8
|
+
accordionTrigger: T,
|
|
9
|
+
chevron: h,
|
|
10
|
+
chevronExpanded: I,
|
|
11
|
+
accordionContent: V,
|
|
12
|
+
expanded: y
|
|
13
|
+
};
|
|
14
|
+
function R({ children: o, defaultExpanded: r, expandedBehavior: s, className: t }) {
|
|
15
|
+
const [e, _] = g(r ? [r] : []);
|
|
16
|
+
function l(n) {
|
|
17
|
+
_(function(d) {
|
|
18
|
+
const p = d.find((a) => a === n), f = s === "single" ? [] : [...d.filter((a) => a !== n)];
|
|
19
|
+
return p || f.push(n), f;
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
return /* @__PURE__ */ m("div", { className: x(i.accordion, t), children: c.Children.map(o, (n) => {
|
|
23
|
+
const d = c.isValidElement(n), p = n.type === N;
|
|
24
|
+
if (d && p) {
|
|
25
|
+
const f = n.props.id;
|
|
26
|
+
let a = !1;
|
|
27
|
+
for (let u = 0; u < e.length; u++)
|
|
28
|
+
e[u] === f && (a = !0);
|
|
29
|
+
return c.cloneElement(n, { expanded: a, toggleItem: l });
|
|
30
|
+
}
|
|
31
|
+
return n;
|
|
32
|
+
}) });
|
|
33
|
+
}
|
|
34
|
+
const N = ({ id: o, children: r, expanded: s, toggleItem: t }) => /* @__PURE__ */ m("div", { className: i.accordionItem, id: o, children: c.Children.map(r, (e) => {
|
|
35
|
+
const _ = c.isValidElement(e), l = c.isValidElement(e), n = e.type === j, d = e.type === w;
|
|
36
|
+
return n && _ ? c.cloneElement(e, { id: o, toggleItem: t, expanded: s }) : d && l ? c.cloneElement(e, { expanded: s }) : e;
|
|
37
|
+
}) }), j = ({ id: o, children: r, expanded: s, toggleItem: t }) => /* @__PURE__ */ v("button", { className: i.accordionTrigger, onClick: () => t == null ? void 0 : t(o ?? ""), children: [
|
|
38
|
+
/* @__PURE__ */ m("div", { children: r }),
|
|
39
|
+
/* @__PURE__ */ m(E, { className: x(i.chevron, s && i.chevronExpanded), iconKey: "fa-regular fa-chevron-down", size: "sm" })
|
|
40
|
+
] });
|
|
41
|
+
function w({ children: o, expanded: r }) {
|
|
42
|
+
return /* @__PURE__ */ m("div", { className: x(i.accordionContent, r && i.expanded), children: o });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
R as Accordion,
|
|
46
|
+
w as AccordionContent,
|
|
47
|
+
N as AccordionItem,
|
|
48
|
+
j as AccordionTrigger
|
|
49
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Accordion } from './Accordion';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof Accordion;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
argTypes: {
|
|
11
|
+
expandedBehavior: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "inline-radio";
|
|
14
|
+
};
|
|
15
|
+
options: string[];
|
|
16
|
+
};
|
|
17
|
+
defaultExpanded: {
|
|
18
|
+
control: {
|
|
19
|
+
type: "text";
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
export default meta;
|
|
25
|
+
type Story = StoryObj<typeof meta>;
|
|
26
|
+
export declare const Default: Story;
|
|
27
|
+
export declare const LargeContent: Story;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import { Accordion as c, AccordionItem as n, AccordionTrigger as t, AccordionContent as o } from "./Accordion.js";
|
|
3
|
+
const s = {
|
|
4
|
+
title: "Case Parts/Molecules/Accordion",
|
|
5
|
+
component: c,
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: "centered"
|
|
8
|
+
},
|
|
9
|
+
tags: ["autodocs"],
|
|
10
|
+
argTypes: {
|
|
11
|
+
expandedBehavior: {
|
|
12
|
+
control: {
|
|
13
|
+
type: "inline-radio"
|
|
14
|
+
},
|
|
15
|
+
options: ["single", "multi"]
|
|
16
|
+
},
|
|
17
|
+
defaultExpanded: {
|
|
18
|
+
control: {
|
|
19
|
+
type: "text"
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}, h = {
|
|
24
|
+
args: { children: null, expandedBehavior: "multi", defaultExpanded: "accordion-item-1" },
|
|
25
|
+
render: ({ expandedBehavior: r, defaultExpanded: a }) => /* @__PURE__ */ e("div", { children: /* @__PURE__ */ i(c, { expandedBehavior: r, defaultExpanded: a, children: [
|
|
26
|
+
/* @__PURE__ */ i(n, { id: "accordion-item-1", children: [
|
|
27
|
+
/* @__PURE__ */ e(t, { children: "Section one" }),
|
|
28
|
+
/* @__PURE__ */ e(o, { children: "This is the first accordion panel with some example content." })
|
|
29
|
+
] }),
|
|
30
|
+
/* @__PURE__ */ i(n, { id: "accordion-item-2", children: [
|
|
31
|
+
/* @__PURE__ */ e(t, { children: "Section two" }),
|
|
32
|
+
/* @__PURE__ */ e(o, { children: "This panel is collapsed by default in the preview." })
|
|
33
|
+
] }),
|
|
34
|
+
/* @__PURE__ */ i(n, { id: "accordion-item-3", children: [
|
|
35
|
+
/* @__PURE__ */ e(t, { children: "Section three" }),
|
|
36
|
+
/* @__PURE__ */ e(o, { children: "Additional content helps show how a stacked accordion can look." })
|
|
37
|
+
] })
|
|
38
|
+
] }) })
|
|
39
|
+
}, u = {
|
|
40
|
+
args: { children: null, expandedBehavior: "single", defaultExpanded: "accordion-item-1" },
|
|
41
|
+
render: ({ expandedBehavior: r, defaultExpanded: a }) => /* @__PURE__ */ e("div", { children: /* @__PURE__ */ i(c, { expandedBehavior: r, defaultExpanded: a, children: [
|
|
42
|
+
/* @__PURE__ */ i(n, { id: "accordion-item-1", children: [
|
|
43
|
+
/* @__PURE__ */ e(t, { children: "Section one" }),
|
|
44
|
+
/* @__PURE__ */ i(o, { children: [
|
|
45
|
+
/* @__PURE__ */ e("p", { children: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla facilisi. Praesent nec ipsum vel orci bibendum venenatis. Integer sodales eros sit amet magna vulputate, vitae viverra sapien pharetra." }),
|
|
46
|
+
/* @__PURE__ */ e("p", { children: "Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia curae; Duis non sem vitae metus posuere sagittis. Curabitur fringilla euismod nulla, vitae molestie massa." }),
|
|
47
|
+
/* @__PURE__ */ e("p", { children: "Aenean suscipit elit non ante blandit, sit amet cursus nisi ultrices. Quisque auctor eros eget risus semper, a molestie magna convallis." })
|
|
48
|
+
] })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ i(n, { id: "accordion-item-2", children: [
|
|
51
|
+
/* @__PURE__ */ e(t, { children: "Section two" }),
|
|
52
|
+
/* @__PURE__ */ i(o, { children: [
|
|
53
|
+
/* @__PURE__ */ e("p", { children: "This panel contains long-form content for testing overflow, spacing, and readability. It should show how the accordion behaves when there is a lot of text inside a single panel." }),
|
|
54
|
+
/* @__PURE__ */ i("ul", { children: [
|
|
55
|
+
/* @__PURE__ */ e("li", { children: "Point one with supporting detail" }),
|
|
56
|
+
/* @__PURE__ */ e("li", { children: "Point two with more supporting detail" }),
|
|
57
|
+
/* @__PURE__ */ e("li", { children: "Point three to demonstrate list rendering" })
|
|
58
|
+
] }),
|
|
59
|
+
/* @__PURE__ */ e("p", { children: "Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium." })
|
|
60
|
+
] })
|
|
61
|
+
] }),
|
|
62
|
+
/* @__PURE__ */ i(n, { id: "accordion-item-3", children: [
|
|
63
|
+
/* @__PURE__ */ e(t, { children: "Section three" }),
|
|
64
|
+
/* @__PURE__ */ e(o, { children: /* @__PURE__ */ e("p", { children: "Additional content helps show how a stacked accordion can look with larger content blocks. This is useful for validating layout and expansion behavior." }) })
|
|
65
|
+
] })
|
|
66
|
+
] }) })
|
|
67
|
+
};
|
|
68
|
+
export {
|
|
69
|
+
h as Default,
|
|
70
|
+
u as LargeContent,
|
|
71
|
+
s as default
|
|
72
|
+
};
|