@caseparts-org/caseblocks 0.0.292 → 0.0.294
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/Text.module-C3jj0mnU.js +39 -0
- package/dist/assets/Modal.css +1 -1
- package/dist/assets/Text.css +1 -1
- package/dist/atoms/Button/buttonClassName.js +1 -1
- package/dist/atoms/Link/linkClassName.js +1 -1
- package/dist/atoms/Text/Text.js +1 -1
- package/dist/molecules/Avatar/Avatar.js +1 -1
- package/dist/molecules/Modal/Modal.d.ts +1 -0
- package/dist/molecules/Modal/Modal.js +70 -60
- package/dist/molecules/Modal/Modal.stories.d.ts +1 -0
- package/dist/molecules/Modal/Modal.stories.js +70 -37
- package/package.json +1 -1
- package/dist/Text.module-Dzhzk2fH.js +0 -39
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import './assets/Text.css';const t = {
|
|
2
|
+
"text-body": "_text-body_l6qzi_1",
|
|
3
|
+
"text-display": "_text-display_l6qzi_5",
|
|
4
|
+
"text-xxs": "_text-xxs_l6qzi_9",
|
|
5
|
+
"text-xs": "_text-xs_l6qzi_13",
|
|
6
|
+
"text-sm": "_text-sm_l6qzi_17",
|
|
7
|
+
"text-md": "_text-md_l6qzi_21",
|
|
8
|
+
"text-lg": "_text-lg_l6qzi_25",
|
|
9
|
+
"text-xl": "_text-xl_l6qzi_29",
|
|
10
|
+
"text-2xl": "_text-2xl_l6qzi_33",
|
|
11
|
+
"text-3xl": "_text-3xl_l6qzi_37",
|
|
12
|
+
"text-4xl": "_text-4xl_l6qzi_41",
|
|
13
|
+
"text-5xl": "_text-5xl_l6qzi_45",
|
|
14
|
+
"text-6xl": "_text-6xl_l6qzi_49",
|
|
15
|
+
"text-thin": "_text-thin_l6qzi_54",
|
|
16
|
+
"text-extra-light": "_text-extra-light_l6qzi_57",
|
|
17
|
+
"text-light": "_text-light_l6qzi_60",
|
|
18
|
+
"text-regular": "_text-regular_l6qzi_63",
|
|
19
|
+
"text-medium": "_text-medium_l6qzi_66",
|
|
20
|
+
"text-semibold": "_text-semibold_l6qzi_69",
|
|
21
|
+
"text-bold": "_text-bold_l6qzi_73",
|
|
22
|
+
"text-color-inherit": "_text-color-inherit_l6qzi_78",
|
|
23
|
+
"text-color-warning": "_text-color-warning_l6qzi_79",
|
|
24
|
+
"text-color-disabled": "_text-color-disabled_l6qzi_80",
|
|
25
|
+
"text-color-error-warning": "_text-color-error-warning_l6qzi_81",
|
|
26
|
+
"text-color-default-inverted": "_text-color-default-inverted_l6qzi_82",
|
|
27
|
+
"text-color-links": "_text-color-links_l6qzi_83",
|
|
28
|
+
"text-color-links-hover-press": "_text-color-links-hover-press_l6qzi_84",
|
|
29
|
+
"text-color-primary": "_text-color-primary_l6qzi_85",
|
|
30
|
+
"text-color-quaternary": "_text-color-quaternary_l6qzi_86",
|
|
31
|
+
"text-color-search-bar": "_text-color-search-bar_l6qzi_87",
|
|
32
|
+
"text-color-secondary": "_text-color-secondary_l6qzi_88",
|
|
33
|
+
"text-color-success": "_text-color-success_l6qzi_89",
|
|
34
|
+
"text-color-tertiary": "_text-color-tertiary_l6qzi_90",
|
|
35
|
+
"text-color-footer": "_text-color-footer_l6qzi_91"
|
|
36
|
+
};
|
|
37
|
+
export {
|
|
38
|
+
t
|
|
39
|
+
};
|
package/dist/assets/Modal.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.
|
|
1
|
+
._overlay_1fxsx_1{position:fixed;top:0;right:0;bottom:0;left:0;background-color:#00000080;display:flex;align-items:center;justify-content:center;z-index:2000}._container_1fxsx_11{position:relative;display:flex;flex-direction:column;overflow:hidden;background-color:var(--surface-surface-primary);color:var(--text-text-primary);border-radius:var(--border-radius-lg);box-shadow:0 4px 6px #0000001a;width:min(var(--modal-width, 800px),92vw);max-height:80vh}@media (max-width:767px){._container_1fxsx_11{border-radius:0;width:100%;box-shadow:none;height:100dvh;max-height:100dvh}}._toolbar_1fxsx_31{position:sticky;top:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;border-bottom:1px solid var(--border-border-secondary-btn);padding:var(--spacing-spacing-2xs) var(--spacing-spacing-default);gap:var(--spacing-spacing-2xs);z-index:1}@media (max-width:767px){._toolbar_1fxsx_31{padding:var(--spacing-spacing-2xs)}}._toolbarPlain_1fxsx_47{background-color:transparent;border-bottom:none}._headerGroup_1fxsx_52{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs);flex:1 1 0}._headerLeft_1fxsx_60{justify-content:flex-start}._headerRight_1fxsx_64{justify-content:flex-end}._closeButton_1fxsx_68{-webkit-appearance:none;-moz-appearance:none;appearance:none;border:none;background:transparent;border-radius:var(--radius-radius-md);cursor:pointer;display:flex;align-items:center;justify-content:center;padding:0;transition:background-color .2s ease-in}._closeButton_1fxsx_68:hover{background-color:var(--color-neutrals-neutral-2)}._closeButtonTopRight_1fxsx_87{position:absolute;top:var(--spacing-spacing-2xs);right:var(--spacing-spacing-2xs);z-index:2;padding:var(--spacing-spacing-2xs)}._content_1fxsx_95{overflow:auto;padding:var(--spacing-spacing-default)}@media (max-width:767px){._content_1fxsx_95{padding:var(--spacing-spacing-2xs)}}
|
package/dist/assets/Text.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
._text-
|
|
1
|
+
._text-body_l6qzi_1{font-family:var(--font-family-body),sans-serif;-webkit-font-smoothing:antialiased}._text-display_l6qzi_5{font-family:var(--font-family-display)}._text-xxs_l6qzi_9{font-size:var(--font-size-xxs);line-height:var(--line-height-xxs)}._text-xs_l6qzi_13{font-size:var(--font-size-xs);line-height:var(--line-height-xs)}._text-sm_l6qzi_17{font-size:var(--font-size-sm);line-height:var(--line-height-sm)}._text-md_l6qzi_21{font-size:var(--font-size-md);line-height:var(--line-height-md)}._text-lg_l6qzi_25{font-size:var(--font-size-lg);line-height:var(--line-height-lg)}._text-xl_l6qzi_29{font-size:var(--font-size-xl);line-height:var(--line-height-xl)}._text-2xl_l6qzi_33{font-size:var(--font-size-2xl);line-height:var(--line-height-2xl)}._text-3xl_l6qzi_37{font-size:var(--font-size-3xl);line-height:var(--line-height-3xl)}._text-4xl_l6qzi_41{font-size:var(--font-size-4xl);line-height:var(--line-height-4xl)}._text-5xl_l6qzi_45{font-size:var(--font-size-5xl);line-height:var(--line-height-5xl)}._text-6xl_l6qzi_49{font-size:var(--font-size-6xl);line-height:var(--line-height-6xl)}._text-thin_l6qzi_54{font-weight:var(--font-weight-thin)}._text-extra-light_l6qzi_57{font-weight:var(--font-weight-extra-light)}._text-light_l6qzi_60{font-weight:var(--font-weight-light)}._text-regular_l6qzi_63{font-weight:var(--font-weight-regular)}._text-medium_l6qzi_66{font-weight:var(--font-weight-medium)}._text-semibold_l6qzi_69{font-weight:var(--font-weight-semibold);letter-spacing:-.02em}._text-bold_l6qzi_73{font-weight:var(--font-weight-bold);letter-spacing:-.02em}._text-color-inherit_l6qzi_78{color:inherit}._text-color-warning_l6qzi_79{color:var(--text-text-caution)}._text-color-disabled_l6qzi_80{color:var(--text-text-disabled)}._text-color-error-warning_l6qzi_81{color:var(--text-text-error-warning)}._text-color-default-inverted_l6qzi_82{color:var(--text-text-invert)}._text-color-links_l6qzi_83{color:var(--text-text-links)}._text-color-links-hover-press_l6qzi_84{color:var(--text-text-links-hover-press)}._text-color-primary_l6qzi_85{color:var(--text-text-primary)}._text-color-quaternary_l6qzi_86{color:var(--text-text-quaternary)}._text-color-search-bar_l6qzi_87{color:var(--text-text-search-bar)}._text-color-secondary_l6qzi_88{color:var(--text-text-secondary)}._text-color-success_l6qzi_89{color:var(--text-text-success)}._text-color-tertiary_l6qzi_90{color:var(--text-text-tertiary)}._text-color-footer_l6qzi_91{color:var(--text-text-footer)}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as u } from "../../Text.module-
|
|
1
|
+
import { t as u } from "../../Text.module-C3jj0mnU.js";
|
|
2
2
|
import { c as b } from "../../clsx-OuTLNxxd.js";
|
|
3
3
|
import { getHideAtStyles as r } from "../HideAt.js";
|
|
4
4
|
import '../../assets/buttonClassName.css';const i = "_button_up3lt_1", t = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { c as n } from "../../clsx-OuTLNxxd.js";
|
|
2
2
|
import { getHideAtStyles as d } from "../HideAt.js";
|
|
3
|
-
import { t as i } from "../../Text.module-
|
|
3
|
+
import { t as i } from "../../Text.module-C3jj0mnU.js";
|
|
4
4
|
import '../../assets/linkClassName.css';const m = "_link_f9a12_1", c = "_disabled_f9a12_14", e = {
|
|
5
5
|
link: m,
|
|
6
6
|
disabled: c
|
package/dist/atoms/Text/Text.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { getHideAtStyles as c } from "../HideAt.js";
|
|
3
|
-
import { t } from "../../Text.module-
|
|
3
|
+
import { t } from "../../Text.module-C3jj0mnU.js";
|
|
4
4
|
import { c as l } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
function g({
|
|
6
6
|
as: o,
|
|
@@ -2,7 +2,7 @@ import { jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { Flex as n } from "../../atoms/Flex/Flex.js";
|
|
3
3
|
import { getHideAtStyles as m } from "../../atoms/HideAt.js";
|
|
4
4
|
import { c } from "../../clsx-OuTLNxxd.js";
|
|
5
|
-
import { t } from "../../Text.module-
|
|
5
|
+
import { t } from "../../Text.module-C3jj0mnU.js";
|
|
6
6
|
import '../../assets/Avatar.css';const l = "_avatar_nvnsd_1", f = {
|
|
7
7
|
avatar: l
|
|
8
8
|
};
|
|
@@ -24,6 +24,7 @@ export interface ModalHeaderProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
|
24
24
|
}
|
|
25
25
|
export interface ModalCloseButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
26
26
|
size?: ModalHeaderSize;
|
|
27
|
+
position?: "top-right";
|
|
27
28
|
}
|
|
28
29
|
export type ModalContentProps = React.HTMLAttributes<HTMLDivElement>;
|
|
29
30
|
export declare const Modal: ModalCompound;
|
|
@@ -1,99 +1,109 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
1
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
2
|
+
import x from "react";
|
|
3
3
|
import { r as p } from "../../index-BkF-BQ3Q.js";
|
|
4
|
-
import { c as
|
|
4
|
+
import { c as s } from "../../clsx-OuTLNxxd.js";
|
|
5
5
|
import { Text as g } from "../../atoms/Text/Text.js";
|
|
6
6
|
import { Icon as b } from "../../atoms/Icon/Icon.js";
|
|
7
|
-
import '../../assets/Modal.css';const y = "
|
|
7
|
+
import '../../assets/Modal.css';const y = "_overlay_1fxsx_1", T = "_container_1fxsx_11", v = "_toolbar_1fxsx_31", B = "_toolbarPlain_1fxsx_47", R = "_headerGroup_1fxsx_52", z = "_headerLeft_1fxsx_60", M = "_headerRight_1fxsx_64", N = "_closeButton_1fxsx_68", w = "_closeButtonTopRight_1fxsx_87", P = "_content_1fxsx_95", e = {
|
|
8
8
|
overlay: y,
|
|
9
9
|
container: T,
|
|
10
|
-
toolbar:
|
|
11
|
-
toolbarPlain:
|
|
12
|
-
headerGroup:
|
|
13
|
-
headerLeft:
|
|
14
|
-
headerRight:
|
|
15
|
-
closeButton:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
sm: "sm",
|
|
19
|
-
md: "md",
|
|
20
|
-
lg: "lg"
|
|
10
|
+
toolbar: v,
|
|
11
|
+
toolbarPlain: B,
|
|
12
|
+
headerGroup: R,
|
|
13
|
+
headerLeft: z,
|
|
14
|
+
headerRight: M,
|
|
15
|
+
closeButton: N,
|
|
16
|
+
closeButtonTopRight: w,
|
|
17
|
+
content: P
|
|
21
18
|
}, C = {
|
|
22
19
|
sm: "sm",
|
|
23
20
|
md: "md",
|
|
21
|
+
lg: "lg"
|
|
22
|
+
}, D = {
|
|
23
|
+
sm: "xs",
|
|
24
|
+
md: "sm",
|
|
24
25
|
lg: "md"
|
|
25
26
|
}, d = ({
|
|
26
|
-
isOpen:
|
|
27
|
-
onClose:
|
|
28
|
-
closeOnOverlayClick:
|
|
29
|
-
width:
|
|
30
|
-
className:
|
|
31
|
-
style:
|
|
32
|
-
children:
|
|
33
|
-
...
|
|
27
|
+
isOpen: o,
|
|
28
|
+
onClose: r,
|
|
29
|
+
closeOnOverlayClick: t = !0,
|
|
30
|
+
width: a,
|
|
31
|
+
className: l,
|
|
32
|
+
style: u,
|
|
33
|
+
children: f,
|
|
34
|
+
...m
|
|
34
35
|
}) => {
|
|
35
|
-
const
|
|
36
|
-
if (!
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
}, h = (
|
|
40
|
-
if (!
|
|
41
|
-
|
|
36
|
+
const i = x.useRef(!1);
|
|
37
|
+
if (!o || typeof document > "u") return null;
|
|
38
|
+
const _ = (c) => {
|
|
39
|
+
t && (i.current = c.target === c.currentTarget);
|
|
40
|
+
}, h = (c) => {
|
|
41
|
+
if (!t) {
|
|
42
|
+
i.current = !1;
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
|
-
|
|
45
|
+
i.current && c.target === c.currentTarget && r(), i.current = !1;
|
|
45
46
|
};
|
|
46
47
|
return p.createPortal(
|
|
47
|
-
/* @__PURE__ */
|
|
48
|
+
/* @__PURE__ */ n(
|
|
48
49
|
"div",
|
|
49
50
|
{
|
|
50
|
-
className:
|
|
51
|
-
onMouseDown:
|
|
51
|
+
className: s(e.overlay),
|
|
52
|
+
onMouseDown: _,
|
|
52
53
|
onMouseUp: h,
|
|
53
|
-
children: /* @__PURE__ */
|
|
54
|
+
children: /* @__PURE__ */ n(
|
|
54
55
|
"div",
|
|
55
56
|
{
|
|
56
|
-
className:
|
|
57
|
+
className: s(e.container, l),
|
|
57
58
|
role: "dialog",
|
|
58
59
|
"aria-modal": "true",
|
|
59
|
-
style: { ...
|
|
60
|
-
...
|
|
61
|
-
children:
|
|
60
|
+
style: { ...u, "--modal-width": a },
|
|
61
|
+
...m,
|
|
62
|
+
children: f
|
|
62
63
|
}
|
|
63
64
|
)
|
|
64
65
|
}
|
|
65
66
|
),
|
|
66
67
|
document.body
|
|
67
68
|
);
|
|
68
|
-
},
|
|
69
|
+
}, G = ({ variant: o = "standard", className: r, children: t, ...a }) => /* @__PURE__ */ n(
|
|
69
70
|
"div",
|
|
70
71
|
{
|
|
71
|
-
className:
|
|
72
|
-
...
|
|
73
|
-
children:
|
|
72
|
+
className: s(e.toolbar, o === "plain" && e.toolbarPlain, r),
|
|
73
|
+
...a,
|
|
74
|
+
children: t
|
|
74
75
|
}
|
|
75
|
-
),
|
|
76
|
-
align:
|
|
77
|
-
size:
|
|
78
|
-
variant:
|
|
79
|
-
className:
|
|
80
|
-
children:
|
|
81
|
-
...
|
|
76
|
+
), L = ({
|
|
77
|
+
align: o = "left",
|
|
78
|
+
size: r = "md",
|
|
79
|
+
variant: t = "body",
|
|
80
|
+
className: a,
|
|
81
|
+
children: l,
|
|
82
|
+
...u
|
|
82
83
|
}) => {
|
|
83
|
-
const
|
|
84
|
-
return /* @__PURE__ */
|
|
84
|
+
const f = typeof l == "string";
|
|
85
|
+
return /* @__PURE__ */ n(
|
|
85
86
|
"div",
|
|
86
87
|
{
|
|
87
|
-
className:
|
|
88
|
-
...
|
|
89
|
-
children:
|
|
88
|
+
className: s(e.headerGroup, o === "left" ? e.headerLeft : e.headerRight, a),
|
|
89
|
+
...u,
|
|
90
|
+
children: f ? /* @__PURE__ */ n(g, { as: "div", size: C[r], variant: t, weight: "semibold", children: l }) : l
|
|
90
91
|
}
|
|
91
92
|
);
|
|
92
|
-
},
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
93
|
+
}, S = ({ size: o = "md", position: r, className: t, ...a }) => /* @__PURE__ */ n(
|
|
94
|
+
"button",
|
|
95
|
+
{
|
|
96
|
+
type: "button",
|
|
97
|
+
className: s(e.closeButton, r === "top-right" && e.closeButtonTopRight, t),
|
|
98
|
+
"aria-label": "Close",
|
|
99
|
+
...a,
|
|
100
|
+
children: /* @__PURE__ */ n(b, { iconKey: "fa-regular fa-xmark", size: D[o] })
|
|
101
|
+
}
|
|
102
|
+
), I = ({ className: o, children: r, ...t }) => /* @__PURE__ */ n("div", { className: s(e.content, o), ...t, children: r });
|
|
103
|
+
d.Toolbar = G;
|
|
104
|
+
d.Header = L;
|
|
105
|
+
d.CloseButton = S;
|
|
106
|
+
d.Content = I;
|
|
97
107
|
export {
|
|
98
108
|
d as Modal
|
|
99
109
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
2
|
import { useState as r } from "react";
|
|
3
3
|
import { Modal as n } from "./Modal.js";
|
|
4
4
|
import { Text as o } from "../../atoms/Text/Text.js";
|
|
5
|
-
import { Button as
|
|
6
|
-
const
|
|
5
|
+
import { Button as t } from "../../atoms/Button/Button.js";
|
|
6
|
+
const O = {
|
|
7
7
|
title: "Case Parts/Molecules/Modal",
|
|
8
8
|
component: n,
|
|
9
9
|
// tags: ["autodocs"],
|
|
@@ -13,54 +13,86 @@ const v = {
|
|
|
13
13
|
},
|
|
14
14
|
args: { isOpen: !0, closeOnOverlayClick: !0 }
|
|
15
15
|
};
|
|
16
|
-
function
|
|
17
|
-
const [
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
-
/* @__PURE__ */ e(
|
|
20
|
-
/* @__PURE__ */
|
|
21
|
-
/* @__PURE__ */
|
|
16
|
+
function u() {
|
|
17
|
+
const [a, l] = r(!0);
|
|
18
|
+
return /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
19
|
+
/* @__PURE__ */ e(t, { variant: "primary", size: "md", onClick: () => l(!0), children: "Open Modal" }),
|
|
20
|
+
/* @__PURE__ */ i(n, { isOpen: a, onClose: () => l(!1), children: [
|
|
21
|
+
/* @__PURE__ */ i(n.Toolbar, { variant: "plain", children: [
|
|
22
22
|
/* @__PURE__ */ e(n.Header, { align: "left", size: "lg", variant: "display", children: "Plain Toolbar" }),
|
|
23
|
-
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { onClick: () =>
|
|
23
|
+
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { onClick: () => l(!1) }) })
|
|
24
24
|
] }),
|
|
25
25
|
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "This modal uses a toolbar without a background or bottom border." }) })
|
|
26
26
|
] })
|
|
27
27
|
] });
|
|
28
28
|
}
|
|
29
|
-
const
|
|
30
|
-
render: () => /* @__PURE__ */ e(
|
|
29
|
+
const H = {
|
|
30
|
+
render: () => /* @__PURE__ */ e(u, {})
|
|
31
31
|
};
|
|
32
|
-
function
|
|
33
|
-
const [
|
|
34
|
-
return /* @__PURE__ */
|
|
35
|
-
/* @__PURE__ */ e(
|
|
36
|
-
/* @__PURE__ */
|
|
37
|
-
/* @__PURE__ */
|
|
38
|
-
|
|
39
|
-
|
|
32
|
+
function g() {
|
|
33
|
+
const [a, l] = r(!0);
|
|
34
|
+
return /* @__PURE__ */ i("div", { style: { padding: 24 }, children: [
|
|
35
|
+
/* @__PURE__ */ e(t, { variant: "primary", size: "md", onClick: () => l(!0), children: "Open Modal" }),
|
|
36
|
+
/* @__PURE__ */ i(n, { isOpen: a, onClose: () => l(!1), "aria-label": "Headerless modal", children: [
|
|
37
|
+
/* @__PURE__ */ e(n.CloseButton, { position: "top-right", onClick: () => l(!1) }),
|
|
38
|
+
/* @__PURE__ */ e(n.Content, { style: { padding: 0 }, children: /* @__PURE__ */ i(
|
|
39
|
+
"div",
|
|
40
|
+
{
|
|
41
|
+
style: {
|
|
42
|
+
display: "grid",
|
|
43
|
+
gridTemplateColumns: "repeat(auto-fit, minmax(min(100%, 300px), 1fr))"
|
|
44
|
+
},
|
|
45
|
+
children: [
|
|
46
|
+
/* @__PURE__ */ i("section", { style: { padding: "3rem" }, children: [
|
|
47
|
+
/* @__PURE__ */ e(o, { as: "h2", size: "lg", weight: "semibold", children: "First section" }),
|
|
48
|
+
/* @__PURE__ */ e(o, { as: "p", size: "md", children: "Content can extend to the top of the modal without a toolbar." })
|
|
49
|
+
] }),
|
|
50
|
+
/* @__PURE__ */ i("section", { style: { padding: "3rem", background: "var(--surface-surface-secondary)" }, children: [
|
|
51
|
+
/* @__PURE__ */ e(o, { as: "h2", size: "lg", weight: "semibold", children: "Second section" }),
|
|
52
|
+
/* @__PURE__ */ e(o, { as: "p", size: "md", children: "The close button stays in the top-right corner while this content scrolls." }),
|
|
53
|
+
/* @__PURE__ */ e(o, { as: "p", size: "md", children: "Leave enough space around the button so it does not overlap your content." })
|
|
54
|
+
] })
|
|
55
|
+
]
|
|
56
|
+
}
|
|
57
|
+
) })
|
|
58
|
+
] })
|
|
59
|
+
] });
|
|
60
|
+
}
|
|
61
|
+
const k = {
|
|
62
|
+
render: () => /* @__PURE__ */ e(g, {})
|
|
63
|
+
};
|
|
64
|
+
function C() {
|
|
65
|
+
const [a, l] = r(!1), [h, s] = r(!1), [m, d] = r(!1), [p, c] = r(!1);
|
|
66
|
+
return /* @__PURE__ */ i("div", { style: { width: "200px", display: "grid", gap: 12 }, children: [
|
|
67
|
+
/* @__PURE__ */ e(t, { variant: "secondary", size: "sm", onClick: () => l(!0), children: "Small Header" }),
|
|
68
|
+
/* @__PURE__ */ i(n, { isOpen: a, onClose: () => l(!1), children: [
|
|
69
|
+
/* @__PURE__ */ i(n.Toolbar, { children: [
|
|
70
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "sm", children: "Small Header" }),
|
|
71
|
+
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "sm", onClick: () => l(!1) }) })
|
|
40
72
|
] }),
|
|
41
73
|
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "sm", children: "Small header modal content." }) })
|
|
42
74
|
] }),
|
|
43
|
-
/* @__PURE__ */ e(
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */ e(n.Header, { align: "left", size: "md",
|
|
75
|
+
/* @__PURE__ */ e(t, { variant: "primary", size: "md", onClick: () => s(!0), children: "Medium Header" }),
|
|
76
|
+
/* @__PURE__ */ i(n, { isOpen: h, onClose: () => s(!1), children: [
|
|
77
|
+
/* @__PURE__ */ i(n.Toolbar, { children: [
|
|
78
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "md", children: "Medium Header" }),
|
|
47
79
|
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => s(!1) }) })
|
|
48
80
|
] }),
|
|
49
81
|
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "md", children: "Medium header modal content." }) })
|
|
50
82
|
] }),
|
|
51
|
-
/* @__PURE__ */ e(
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
/* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */ e(n.Header, { align: "left", size: "lg",
|
|
83
|
+
/* @__PURE__ */ e(t, { variant: "cta-primary", size: "lg", onClick: () => d(!0), children: "Large Header" }),
|
|
84
|
+
/* @__PURE__ */ i(n, { isOpen: m, onClose: () => d(!1), children: [
|
|
85
|
+
/* @__PURE__ */ i(n.Toolbar, { children: [
|
|
86
|
+
/* @__PURE__ */ e(n.Header, { align: "left", size: "lg", children: "Large Header" }),
|
|
55
87
|
/* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => d(!1) }) })
|
|
56
88
|
] }),
|
|
57
89
|
/* @__PURE__ */ e(n.Content, { children: /* @__PURE__ */ e(o, { as: "p", size: "lg", children: "Large header modal content." }) })
|
|
58
90
|
] }),
|
|
59
|
-
/* @__PURE__ */ e(
|
|
60
|
-
/* @__PURE__ */
|
|
61
|
-
/* @__PURE__ */
|
|
91
|
+
/* @__PURE__ */ e(t, { variant: "tertiary", size: "md", onClick: () => c(!0), children: "Custom Toolbar" }),
|
|
92
|
+
/* @__PURE__ */ i(n, { isOpen: p, onClose: () => c(!1), children: [
|
|
93
|
+
/* @__PURE__ */ i(n.Toolbar, { children: [
|
|
62
94
|
/* @__PURE__ */ e(n.Header, { align: "left", size: "md", variant: "display", children: "Custom Toolbar" }),
|
|
63
|
-
/* @__PURE__ */
|
|
95
|
+
/* @__PURE__ */ i(n.Header, { align: "right", children: [
|
|
64
96
|
/* @__PURE__ */ e("button", { onClick: () => alert("Sent!"), children: "Send Email" }),
|
|
65
97
|
/* @__PURE__ */ e(n.CloseButton, { size: "md", onClick: () => c(!1) })
|
|
66
98
|
] })
|
|
@@ -69,11 +101,12 @@ function u() {
|
|
|
69
101
|
] })
|
|
70
102
|
] });
|
|
71
103
|
}
|
|
72
|
-
const
|
|
73
|
-
render: () => /* @__PURE__ */ e(
|
|
104
|
+
const T = {
|
|
105
|
+
render: () => /* @__PURE__ */ e(C, {})
|
|
74
106
|
};
|
|
75
107
|
export {
|
|
76
|
-
|
|
77
|
-
H as
|
|
78
|
-
|
|
108
|
+
k as Headerless,
|
|
109
|
+
H as PlainToolbar,
|
|
110
|
+
T as Sizes,
|
|
111
|
+
O as default
|
|
79
112
|
};
|
package/package.json
CHANGED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import './assets/Text.css';const t = {
|
|
2
|
-
"text-body": "_text-body_1x8xm_1",
|
|
3
|
-
"text-display": "_text-display_1x8xm_4",
|
|
4
|
-
"text-xxs": "_text-xxs_1x8xm_8",
|
|
5
|
-
"text-xs": "_text-xs_1x8xm_12",
|
|
6
|
-
"text-sm": "_text-sm_1x8xm_16",
|
|
7
|
-
"text-md": "_text-md_1x8xm_20",
|
|
8
|
-
"text-lg": "_text-lg_1x8xm_24",
|
|
9
|
-
"text-xl": "_text-xl_1x8xm_28",
|
|
10
|
-
"text-2xl": "_text-2xl_1x8xm_32",
|
|
11
|
-
"text-3xl": "_text-3xl_1x8xm_36",
|
|
12
|
-
"text-4xl": "_text-4xl_1x8xm_40",
|
|
13
|
-
"text-5xl": "_text-5xl_1x8xm_44",
|
|
14
|
-
"text-6xl": "_text-6xl_1x8xm_48",
|
|
15
|
-
"text-thin": "_text-thin_1x8xm_53",
|
|
16
|
-
"text-extra-light": "_text-extra-light_1x8xm_56",
|
|
17
|
-
"text-light": "_text-light_1x8xm_59",
|
|
18
|
-
"text-regular": "_text-regular_1x8xm_62",
|
|
19
|
-
"text-medium": "_text-medium_1x8xm_65",
|
|
20
|
-
"text-semibold": "_text-semibold_1x8xm_68",
|
|
21
|
-
"text-bold": "_text-bold_1x8xm_71",
|
|
22
|
-
"text-color-inherit": "_text-color-inherit_1x8xm_75",
|
|
23
|
-
"text-color-warning": "_text-color-warning_1x8xm_76",
|
|
24
|
-
"text-color-disabled": "_text-color-disabled_1x8xm_77",
|
|
25
|
-
"text-color-error-warning": "_text-color-error-warning_1x8xm_78",
|
|
26
|
-
"text-color-default-inverted": "_text-color-default-inverted_1x8xm_79",
|
|
27
|
-
"text-color-links": "_text-color-links_1x8xm_80",
|
|
28
|
-
"text-color-links-hover-press": "_text-color-links-hover-press_1x8xm_81",
|
|
29
|
-
"text-color-primary": "_text-color-primary_1x8xm_82",
|
|
30
|
-
"text-color-quaternary": "_text-color-quaternary_1x8xm_83",
|
|
31
|
-
"text-color-search-bar": "_text-color-search-bar_1x8xm_84",
|
|
32
|
-
"text-color-secondary": "_text-color-secondary_1x8xm_85",
|
|
33
|
-
"text-color-success": "_text-color-success_1x8xm_86",
|
|
34
|
-
"text-color-tertiary": "_text-color-tertiary_1x8xm_87",
|
|
35
|
-
"text-color-footer": "_text-color-footer_1x8xm_88"
|
|
36
|
-
};
|
|
37
|
-
export {
|
|
38
|
-
t
|
|
39
|
-
};
|