@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.
@@ -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
+ };
@@ -1 +1 @@
1
- ._overlay_1imlv_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_1imlv_11{display:flex;flex-direction:column;overflow:hidden;background-color:var(--surface-surface-primary);color:var(--text-text-primary);border-radius:var(--border-radius-sm);box-shadow:0 4px 6px #0000001a;width:min(var(--modal-width, 800px),92vw);max-height:80vh}@media (max-width:767px){._container_1imlv_11{border-radius:0;width:100%;box-shadow:none;height:100dvh;max-height:100dvh}}._toolbar_1imlv_30{position:sticky;top:0;display:flex;flex-direction:row;align-items:center;justify-content:space-between;background-color:var(--surface-surface-secondary);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_1imlv_30{padding:var(--spacing-spacing-2xs)}}._toolbarPlain_1imlv_47{background-color:transparent;border-bottom:none}._headerGroup_1imlv_52{display:flex;flex-direction:row;align-items:center;gap:var(--spacing-spacing-2xs);flex:1 1 0}._headerLeft_1imlv_60{justify-content:flex-start}._headerRight_1imlv_64{justify-content:flex-end}._closeButton_1imlv_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_1imlv_68:hover{background-color:var(--color-neutrals-neutral-2)}._content_1imlv_87{overflow:auto;padding:var(--spacing-spacing-default)}@media (max-width:767px){._content_1imlv_87{padding:var(--spacing-spacing-2xs)}}
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)}}
@@ -1 +1 @@
1
- ._text-body_1x8xm_1{font-family:var(--font-family-body),sans-serif}._text-display_1x8xm_4{font-family:var(--font-family-display)}._text-xxs_1x8xm_8{font-size:var(--font-size-xxs);line-height:var(--line-height-xxs)}._text-xs_1x8xm_12{font-size:var(--font-size-xs);line-height:var(--line-height-xs)}._text-sm_1x8xm_16{font-size:var(--font-size-sm);line-height:var(--line-height-sm)}._text-md_1x8xm_20{font-size:var(--font-size-md);line-height:var(--line-height-md)}._text-lg_1x8xm_24{font-size:var(--font-size-lg);line-height:var(--line-height-lg)}._text-xl_1x8xm_28{font-size:var(--font-size-xl);line-height:var(--line-height-xl)}._text-2xl_1x8xm_32{font-size:var(--font-size-2xl);line-height:var(--line-height-2xl)}._text-3xl_1x8xm_36{font-size:var(--font-size-3xl);line-height:var(--line-height-3xl)}._text-4xl_1x8xm_40{font-size:var(--font-size-4xl);line-height:var(--line-height-4xl)}._text-5xl_1x8xm_44{font-size:var(--font-size-5xl);line-height:var(--line-height-5xl)}._text-6xl_1x8xm_48{font-size:var(--font-size-6xl);line-height:var(--line-height-6xl)}._text-thin_1x8xm_53{font-weight:var(--font-weight-thin)}._text-extra-light_1x8xm_56{font-weight:var(--font-weight-extra-light)}._text-light_1x8xm_59{font-weight:var(--font-weight-light)}._text-regular_1x8xm_62{font-weight:var(--font-weight-regular)}._text-medium_1x8xm_65{font-weight:var(--font-weight-medium)}._text-semibold_1x8xm_68{font-weight:var(--font-weight-semibold)}._text-bold_1x8xm_71{font-weight:var(--font-weight-bold)}._text-color-inherit_1x8xm_75{color:inherit}._text-color-warning_1x8xm_76{color:var(--text-text-caution)}._text-color-disabled_1x8xm_77{color:var(--text-text-disabled)}._text-color-error-warning_1x8xm_78{color:var(--text-text-error-warning)}._text-color-default-inverted_1x8xm_79{color:var(--text-text-invert)}._text-color-links_1x8xm_80{color:var(--text-text-links)}._text-color-links-hover-press_1x8xm_81{color:var(--text-text-links-hover-press)}._text-color-primary_1x8xm_82{color:var(--text-text-primary)}._text-color-quaternary_1x8xm_83{color:var(--text-text-quaternary)}._text-color-search-bar_1x8xm_84{color:var(--text-text-search-bar)}._text-color-secondary_1x8xm_85{color:var(--text-text-secondary)}._text-color-success_1x8xm_86{color:var(--text-text-success)}._text-color-tertiary_1x8xm_87{color:var(--text-text-tertiary)}._text-color-footer_1x8xm_88{color:var(--text-text-footer)}
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-Dzhzk2fH.js";
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-Dzhzk2fH.js";
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
@@ -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-Dzhzk2fH.js";
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-Dzhzk2fH.js";
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 a } from "react/jsx-runtime";
2
- import v from "react";
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 n } from "../../clsx-OuTLNxxd.js";
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 = "_overlay_1imlv_1", T = "_container_1imlv_11", x = "_toolbar_1imlv_30", z = "_toolbarPlain_1imlv_47", B = "_headerGroup_1imlv_52", M = "_headerLeft_1imlv_60", N = "_headerRight_1imlv_64", R = "_closeButton_1imlv_68", w = "_content_1imlv_87", r = {
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: x,
11
- toolbarPlain: z,
12
- headerGroup: B,
13
- headerLeft: M,
14
- headerRight: N,
15
- closeButton: R,
16
- content: w
17
- }, P = {
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: t,
27
- onClose: o,
28
- closeOnOverlayClick: e = !0,
29
- width: l,
30
- className: s,
31
- style: m,
32
- children: u,
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 c = v.useRef(!1);
36
- if (!t || typeof document > "u") return null;
37
- const f = (i) => {
38
- e && (c.current = i.target === i.currentTarget);
39
- }, h = (i) => {
40
- if (!e) {
41
- c.current = !1;
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
- c.current && i.target === i.currentTarget && o(), c.current = !1;
45
+ i.current && c.target === c.currentTarget && r(), i.current = !1;
45
46
  };
46
47
  return p.createPortal(
47
- /* @__PURE__ */ a(
48
+ /* @__PURE__ */ n(
48
49
  "div",
49
50
  {
50
- className: n(r.overlay),
51
- onMouseDown: f,
51
+ className: s(e.overlay),
52
+ onMouseDown: _,
52
53
  onMouseUp: h,
53
- children: /* @__PURE__ */ a(
54
+ children: /* @__PURE__ */ n(
54
55
  "div",
55
56
  {
56
- className: n(r.container, s),
57
+ className: s(e.container, l),
57
58
  role: "dialog",
58
59
  "aria-modal": "true",
59
- style: { ...m, "--modal-width": l },
60
- ..._,
61
- children: u
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
- }, D = ({ variant: t = "standard", className: o, children: e, ...l }) => /* @__PURE__ */ a(
69
+ }, G = ({ variant: o = "standard", className: r, children: t, ...a }) => /* @__PURE__ */ n(
69
70
  "div",
70
71
  {
71
- className: n(r.toolbar, t === "plain" && r.toolbarPlain, o),
72
- ...l,
73
- children: e
72
+ className: s(e.toolbar, o === "plain" && e.toolbarPlain, r),
73
+ ...a,
74
+ children: t
74
75
  }
75
- ), G = ({
76
- align: t = "left",
77
- size: o = "md",
78
- variant: e = "display",
79
- className: l,
80
- children: s,
81
- ...m
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 u = typeof s == "string";
84
- return /* @__PURE__ */ a(
84
+ const f = typeof l == "string";
85
+ return /* @__PURE__ */ n(
85
86
  "div",
86
87
  {
87
- className: n(r.headerGroup, t === "left" ? r.headerLeft : r.headerRight, l),
88
- ...m,
89
- children: u ? /* @__PURE__ */ a(g, { as: "div", size: P[o], variant: e, weight: "medium", children: s }) : s
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
- }, L = ({ size: t = "md", className: o, ...e }) => /* @__PURE__ */ a("button", { type: "button", className: n(r.closeButton, o), "aria-label": "Close", ...e, children: /* @__PURE__ */ a(b, { iconKey: "fa-regular fa-xmark", size: C[t] }) }), S = ({ className: t, children: o, ...e }) => /* @__PURE__ */ a("div", { className: n(r.content, t), ...e, children: o });
93
- d.Toolbar = D;
94
- d.Header = G;
95
- d.CloseButton = L;
96
- d.Content = S;
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
  };
@@ -4,4 +4,5 @@ declare const meta: Meta<typeof Modal>;
4
4
  export default meta;
5
5
  type Story = StoryObj<typeof Modal>;
6
6
  export declare const PlainToolbar: Story;
7
+ export declare const Headerless: Story;
7
8
  export declare const Sizes: Story;
@@ -1,9 +1,9 @@
1
- import { jsx as e, jsxs as l } from "react/jsx-runtime";
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 a } from "../../atoms/Button/Button.js";
6
- const v = {
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 C() {
17
- const [t, i] = r(!0);
18
- return /* @__PURE__ */ l("div", { style: { padding: 24 }, children: [
19
- /* @__PURE__ */ e(a, { variant: "primary", size: "md", onClick: () => i(!0), children: "Open Modal" }),
20
- /* @__PURE__ */ l(n, { isOpen: t, onClose: () => i(!1), children: [
21
- /* @__PURE__ */ l(n.Toolbar, { variant: "plain", children: [
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: () => i(!1) }) })
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 O = {
30
- render: () => /* @__PURE__ */ e(C, {})
29
+ const H = {
30
+ render: () => /* @__PURE__ */ e(u, {})
31
31
  };
32
- function u() {
33
- const [t, i] = r(!1), [h, s] = r(!1), [m, d] = r(!1), [p, c] = r(!1);
34
- return /* @__PURE__ */ l("div", { style: { width: "200px", display: "grid", gap: 12 }, children: [
35
- /* @__PURE__ */ e(a, { variant: "secondary", size: "sm", onClick: () => i(!0), children: "Small Header" }),
36
- /* @__PURE__ */ l(n, { isOpen: t, onClose: () => i(!1), children: [
37
- /* @__PURE__ */ l(n.Toolbar, { children: [
38
- /* @__PURE__ */ e(n.Header, { align: "left", size: "sm", variant: "display", children: "Small Header" }),
39
- /* @__PURE__ */ e(n.Header, { align: "right", children: /* @__PURE__ */ e(n.CloseButton, { size: "sm", onClick: () => i(!1) }) })
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(a, { variant: "primary", size: "md", onClick: () => s(!0), children: "Medium Header" }),
44
- /* @__PURE__ */ l(n, { isOpen: h, onClose: () => s(!1), children: [
45
- /* @__PURE__ */ l(n.Toolbar, { children: [
46
- /* @__PURE__ */ e(n.Header, { align: "left", size: "md", variant: "display", children: "Medium Header" }),
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(a, { variant: "cta-primary", size: "lg", onClick: () => d(!0), children: "Large Header" }),
52
- /* @__PURE__ */ l(n, { isOpen: m, onClose: () => d(!1), children: [
53
- /* @__PURE__ */ l(n.Toolbar, { children: [
54
- /* @__PURE__ */ e(n.Header, { align: "left", size: "lg", variant: "display", children: "Large Header" }),
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(a, { variant: "tertiary", size: "md", onClick: () => c(!0), children: "Custom Toolbar" }),
60
- /* @__PURE__ */ l(n, { isOpen: p, onClose: () => c(!1), children: [
61
- /* @__PURE__ */ l(n.Toolbar, { children: [
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__ */ l(n.Header, { align: "right", children: [
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 H = {
73
- render: () => /* @__PURE__ */ e(u, {})
104
+ const T = {
105
+ render: () => /* @__PURE__ */ e(C, {})
74
106
  };
75
107
  export {
76
- O as PlainToolbar,
77
- H as Sizes,
78
- v as default
108
+ k as Headerless,
109
+ H as PlainToolbar,
110
+ T as Sizes,
111
+ O as default
79
112
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@caseparts-org/caseblocks",
3
3
  "private": false,
4
- "version": "0.0.292",
4
+ "version": "0.0.294",
5
5
  "type": "module",
6
6
  "module": "dist/main.js",
7
7
  "types": "dist/main.d.ts",
@@ -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
- };