@worknice/whiteboard 0.46.0 → 0.47.1

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,17 +1,30 @@
1
1
  import type { JSX, ReactNode } from "react";
2
2
  type Props = {
3
+ /** Main body; when `expander` is true, this region folds open and closed. */
3
4
  children: ReactNode;
4
5
  header?: ReactNode;
5
6
  description?: ReactNode;
6
7
  footer?: ReactNode;
7
8
  hasShadow?: boolean;
8
- actions?: ReactNode;
9
9
  } & ({
10
+ expander?: false;
11
+ defaultExpanded?: never;
12
+ /** Optional controls in the header row’s right column. Not allowed when `expander` is true. */
13
+ actions?: ReactNode;
14
+ } | {
15
+ /** When true, the whole header row is a disclosure control; `children` is the expandable body. You cannot pass `actions`. */
16
+ expander: true;
17
+ defaultExpanded?: boolean;
18
+ actions?: never;
19
+ }) & ({
20
+ /** Accessible name for the root element, exposed as `aria-label`. */
10
21
  ariaLabel?: string;
22
+ /** Root element. Defaults to `section`. */
11
23
  tagName?: Exclude<keyof JSX.IntrinsicElements, "form">;
12
24
  } | {
25
+ /** Required when using `tagName="form"` so the form has an accessible name. */
13
26
  ariaLabel: string;
14
27
  tagName: "form";
15
28
  });
16
- declare const Card: ({ ariaLabel, children, header, description, footer, hasShadow, tagName: Tag, actions, }: Props) => import("react/jsx-runtime").JSX.Element;
29
+ declare const Card: ({ children, header, description, footer, hasShadow, tagName: Tag, ariaLabel, expander, defaultExpanded, actions, }: Props) => import("react/jsx-runtime").JSX.Element;
17
30
  export default Card;
@@ -1,15 +1,51 @@
1
+ "use client";
1
2
  import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
3
  import * as __WEBPACK_EXTERNAL_MODULE_clsx__ from "clsx";
4
+ import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
3
5
  import * as __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__ from "./Card.module.js";
6
+ import * as __WEBPACK_EXTERNAL_MODULE__Icon_js_0d271bb6__ from "./Icon.js";
4
7
  import * as __WEBPACK_EXTERNAL_MODULE__VStack_js_02eb6792__ from "./VStack.js";
5
- const Card = ({ ariaLabel, children, header, description, footer, hasShadow = false, tagName: Tag = "section", actions })=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Tag, {
8
+ const Card = ({ children, header, description, footer, hasShadow = false, tagName: Tag = "section", ariaLabel, expander, defaultExpanded, actions })=>{
9
+ const [isExpanded, setIsExpanded] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(defaultExpanded);
10
+ const contentId = (0, __WEBPACK_EXTERNAL_MODULE_react__.useId)();
11
+ const expanderButtonId = `${contentId}-expander`;
12
+ const showHeader = expander || Boolean(header || actions);
13
+ const expanderNeedsIconLabel = expander && !header && !description;
14
+ return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(Tag, {
6
15
  "aria-label": ariaLabel,
7
- className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])([
8
- __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].container,
9
- hasShadow ? __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].containerShadow : ""
10
- ]),
16
+ className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].container, hasShadow ? __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].containerShadow : "", expander && (footer ? __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].containerExpanderWithFooter : __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].containerExpander)),
11
17
  children: [
12
- header || actions ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("header", {
18
+ showHeader ? expander ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("header", {
19
+ className: __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].headerExpanderShell,
20
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("button", {
21
+ "aria-controls": contentId,
22
+ "aria-expanded": isExpanded,
23
+ "aria-label": expanderNeedsIconLabel ? isExpanded ? "Collapse" : "Expand" : void 0,
24
+ className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].header, __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].headerExpanderTrigger, !isExpanded && __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].headerExpanderDividerHidden),
25
+ id: expanderButtonId,
26
+ type: "button",
27
+ onClick: ()=>setIsExpanded((open)=>!open),
28
+ children: [
29
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__VStack_js_02eb6792__["default"], {
30
+ spacing: "n2",
31
+ children: [
32
+ header,
33
+ description
34
+ ]
35
+ }),
36
+ /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
37
+ className: __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].expanderControlCell,
38
+ "aria-hidden": true,
39
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("span", {
40
+ className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].expanderIcon, isExpanded && __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].expanderIconOpen),
41
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Icon_js_0d271bb6__["default"], {
42
+ symbol: "ChevronDown"
43
+ })
44
+ })
45
+ })
46
+ ]
47
+ })
48
+ }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)("header", {
13
49
  className: __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].header,
14
50
  children: [
15
51
  /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsxs)(__WEBPACK_EXTERNAL_MODULE__VStack_js_02eb6792__["default"], {
@@ -24,7 +60,24 @@ const Card = ({ ariaLabel, children, header, description, footer, hasShadow = fa
24
60
  })
25
61
  ]
26
62
  }) : null,
27
- /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
63
+ expander ? /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
64
+ "aria-hidden": !isExpanded,
65
+ className: __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].expandableShell,
66
+ id: contentId,
67
+ inert: !isExpanded,
68
+ role: "region",
69
+ "aria-label": "Card details",
70
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
71
+ className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].expandableTrack, isExpanded && __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].expandableTrackExpanded),
72
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
73
+ className: __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].expandableInner,
74
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
75
+ className: (0, __WEBPACK_EXTERNAL_MODULE_clsx__["default"])(__WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].content, __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].contentExpander),
76
+ children: children
77
+ })
78
+ })
79
+ })
80
+ }) : /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
28
81
  className: __WEBPACK_EXTERNAL_MODULE__Card_module_js_75ab42d8__["default"].content,
29
82
  children: children
30
83
  }),
@@ -34,5 +87,6 @@ const Card = ({ ariaLabel, children, header, description, footer, hasShadow = fa
34
87
  }) : null
35
88
  ]
36
89
  });
90
+ };
37
91
  const Card_rslib_entry_ = Card;
38
92
  export { Card_rslib_entry_ as default };
@@ -1,8 +1,21 @@
1
1
  import "./Card_module.css";
2
2
  const Card_module_rslib_entry_ = {
3
3
  container: "container-nK60hV",
4
+ containerExpander: "containerExpander-EZSwGW",
5
+ containerExpanderWithFooter: "containerExpanderWithFooter-P32jrR",
4
6
  header: "header-jj9FGo",
7
+ headerExpanderDividerHidden: "headerExpanderDividerHidden-L3oAZ3",
8
+ headerExpanderShell: "headerExpanderShell-qkgDge",
9
+ headerExpanderTrigger: "headerExpanderTrigger-jD8veQ",
10
+ expanderControlCell: "expanderControlCell-CPZkT9",
5
11
  content: "content-vpnjlq",
12
+ expandableShell: "expandableShell-RxgAVx",
13
+ expandableTrack: "expandableTrack-kqIJy_",
14
+ expandableTrackExpanded: "expandableTrackExpanded-wO7SVT",
15
+ expandableInner: "expandableInner-mhxOdz",
16
+ expanderIcon: "expanderIcon-sNZWda",
17
+ expanderIconOpen: "expanderIconOpen-OSIda0",
18
+ contentExpander: "contentExpander-cNoAvd",
6
19
  footer: "footer-sVxS5P",
7
20
  containerShadow: "containerShadow-LiuIvB"
8
21
  };
@@ -0,0 +1,90 @@
1
+ import type { StoryObj } from "@storybook/nextjs-vite";
2
+ declare const meta: {
3
+ component: ({ children, header, description, footer, hasShadow, tagName: Tag, ariaLabel, expander, defaultExpanded, actions, }: {
4
+ children: import("react").ReactNode;
5
+ header?: import("react").ReactNode;
6
+ description?: import("react").ReactNode;
7
+ footer?: import("react").ReactNode;
8
+ hasShadow?: boolean;
9
+ } & (({
10
+ expander?: false;
11
+ defaultExpanded?: never;
12
+ actions?: import("react").ReactNode;
13
+ } | {
14
+ expander: true;
15
+ defaultExpanded?: boolean;
16
+ actions?: never;
17
+ }) & ({
18
+ ariaLabel?: string;
19
+ tagName?: Exclude<keyof import("react").JSX.IntrinsicElements, "form">;
20
+ } | {
21
+ ariaLabel: string;
22
+ tagName: "form";
23
+ }))) => import("react/jsx-runtime").JSX.Element;
24
+ subcomponents: {
25
+ CardContent: ({ children, spacing }: {
26
+ children: import("react").ReactNode;
27
+ spacing?: "n5" | "n4" | "n3" | "n2" | "n1" | "00" | "p1" | "p2" | "p3" | "p4" | "p5";
28
+ }) => import("react/jsx-runtime").JSX.Element;
29
+ };
30
+ args: {
31
+ children: import("react/jsx-runtime").JSX.Element;
32
+ hasShadow: false;
33
+ expander: false;
34
+ };
35
+ argTypes: {
36
+ children: {
37
+ control: false;
38
+ table: {
39
+ type: {
40
+ summary: string;
41
+ };
42
+ };
43
+ };
44
+ header: {
45
+ control: false;
46
+ };
47
+ description: {
48
+ control: false;
49
+ };
50
+ footer: {
51
+ control: false;
52
+ };
53
+ actions: {
54
+ control: false;
55
+ };
56
+ expander: {
57
+ description: string;
58
+ };
59
+ defaultExpanded: {
60
+ if: {
61
+ arg: string;
62
+ truthy: true;
63
+ };
64
+ description: string;
65
+ defaultValue: boolean;
66
+ };
67
+ };
68
+ parameters: {
69
+ layout: string;
70
+ };
71
+ };
72
+ export default meta;
73
+ type Story = StoryObj<typeof meta>;
74
+ export declare const FullFeatured: Story;
75
+ /** Content sits in the card’s main region with default `CardContent` padding. */
76
+ export declare const BodyOnly: Story;
77
+ /** Header uses the card header row; body is unchanged. */
78
+ export declare const WithHeader: Story;
79
+ export declare const WithHeaderAndDescription: Story;
80
+ export declare const WithHeaderAndActions: Story;
81
+ export declare const WithFooter: Story;
82
+ /** `hasShadow` adds the elevated shadow style. */
83
+ export declare const WithShadow: Story;
84
+ /** The full header row toggles expand/collapse; `actions` is not allowed. */
85
+ export declare const Expander: Story;
86
+ export declare const ExpanderWithFooter: Story;
87
+ export declare const ExpanderInitiallyOpen: Story;
88
+ /** When using `tagName="form"`, pass `ariaLabel` to make the form accessible. */
89
+ export declare const AsForm: Story;
90
+ export declare const WithoutCardContent: Story;
@@ -0,0 +1,185 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__controls_Button_js_f591ba2e__ from "../controls/Button.js";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__ from "./Card.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__ from "./CardContent.js";
5
+ import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__ from "./PlainText.js";
6
+ const meta = {
7
+ component: __WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__["default"],
8
+ subcomponents: {
9
+ CardContent: __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__["default"]
10
+ },
11
+ args: {
12
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__["default"], {
13
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
14
+ children: "Content wrapped in CardContent component."
15
+ })
16
+ }),
17
+ hasShadow: false,
18
+ expander: false
19
+ },
20
+ argTypes: {
21
+ children: {
22
+ control: false,
23
+ table: {
24
+ type: {
25
+ summary: "ReactNode"
26
+ }
27
+ }
28
+ },
29
+ header: {
30
+ control: false
31
+ },
32
+ description: {
33
+ control: false
34
+ },
35
+ footer: {
36
+ control: false
37
+ },
38
+ actions: {
39
+ control: false
40
+ },
41
+ expander: {
42
+ description: "When true, the full header row toggles expand/collapse (not only an icon); do not pass `actions`."
43
+ },
44
+ defaultExpanded: {
45
+ if: {
46
+ arg: "expander",
47
+ truthy: true
48
+ },
49
+ description: "Only applies when `expander` is true.",
50
+ defaultValue: false
51
+ }
52
+ },
53
+ parameters: {
54
+ layout: "padded"
55
+ }
56
+ };
57
+ const Card_stories_rslib_entry_ = meta;
58
+ const FullFeatured = {
59
+ args: {
60
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
61
+ font: "h5",
62
+ children: "Title"
63
+ }),
64
+ description: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
65
+ font: "small",
66
+ children: "Description"
67
+ }),
68
+ actions: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Button_js_f591ba2e__["default"], {
69
+ id: "card-story-full-action",
70
+ onClick: ()=>{},
71
+ type: "secondary",
72
+ children: "Action"
73
+ }),
74
+ footer: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
75
+ font: "small",
76
+ tone: "muted",
77
+ children: "Footer"
78
+ })
79
+ }
80
+ };
81
+ const BodyOnly = {
82
+ args: {}
83
+ };
84
+ const WithHeader = {
85
+ args: {
86
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
87
+ font: "h5",
88
+ children: "Title"
89
+ })
90
+ }
91
+ };
92
+ const WithHeaderAndDescription = {
93
+ args: {
94
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
95
+ font: "h5",
96
+ children: "Title"
97
+ }),
98
+ description: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
99
+ font: "small",
100
+ tone: "muted",
101
+ children: "Optional description under the title, still in the header band."
102
+ })
103
+ }
104
+ };
105
+ const WithHeaderAndActions = {
106
+ args: {
107
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
108
+ font: "h5",
109
+ children: "Title"
110
+ }),
111
+ actions: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__controls_Button_js_f591ba2e__["default"], {
112
+ id: "card-story-action",
113
+ onClick: ()=>{},
114
+ type: "secondary",
115
+ children: "Action"
116
+ })
117
+ }
118
+ };
119
+ const WithFooter = {
120
+ args: {
121
+ footer: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
122
+ font: "small",
123
+ children: "Footer slot"
124
+ })
125
+ }
126
+ };
127
+ const WithShadow = {
128
+ args: {
129
+ hasShadow: true,
130
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
131
+ font: "h5",
132
+ children: "Shadow"
133
+ })
134
+ }
135
+ };
136
+ const Expander = {
137
+ args: {
138
+ expander: true,
139
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
140
+ font: "h5",
141
+ children: "Expandable"
142
+ })
143
+ }
144
+ };
145
+ const ExpanderWithFooter = {
146
+ args: {
147
+ expander: true,
148
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
149
+ font: "h5",
150
+ children: "Expandable"
151
+ }),
152
+ footer: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
153
+ font: "small",
154
+ children: "Footer"
155
+ })
156
+ }
157
+ };
158
+ const ExpanderInitiallyOpen = {
159
+ args: {
160
+ expander: true,
161
+ defaultExpanded: true,
162
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
163
+ font: "h5",
164
+ children: "Starts expanded"
165
+ })
166
+ }
167
+ };
168
+ const AsForm = {
169
+ args: {
170
+ ariaLabel: "Example form",
171
+ tagName: "form",
172
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
173
+ font: "h5",
174
+ children: "Form card"
175
+ })
176
+ }
177
+ };
178
+ const WithoutCardContent = {
179
+ args: {
180
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
181
+ children: "Body only without CardContent: content sits in the card’s main region without `CardContent` padding."
182
+ })
183
+ }
184
+ };
185
+ export { AsForm, BodyOnly, Expander, ExpanderInitiallyOpen, ExpanderWithFooter, FullFeatured, WithFooter, WithHeader, WithHeaderAndActions, WithHeaderAndDescription, WithShadow, WithoutCardContent, Card_stories_rslib_entry_ as default };
@@ -0,0 +1,31 @@
1
+ import type { StoryObj } from "@storybook/nextjs-vite";
2
+ declare const meta: {
3
+ component: ({ children, spacing }: {
4
+ children: import("react").ReactNode;
5
+ spacing?: "n5" | "n4" | "n3" | "n2" | "n1" | "00" | "p1" | "p2" | "p3" | "p4" | "p5";
6
+ }) => import("react/jsx-runtime").JSX.Element;
7
+ args: {
8
+ children: null;
9
+ };
10
+ argTypes: {
11
+ children: {
12
+ control: false;
13
+ table: {
14
+ type: {
15
+ summary: string;
16
+ };
17
+ };
18
+ };
19
+ };
20
+ parameters: {
21
+ layout: string;
22
+ };
23
+ };
24
+ export default meta;
25
+ type Story = StoryObj<typeof meta>;
26
+ /** Default `spacing` matches design token `00` (card body padding). */
27
+ export declare const DefaultSpacing: Story;
28
+ export declare const SpacingN2: Story;
29
+ export declare const SpacingP2: Story;
30
+ /** Without a Card wrapper, should not be used this way */
31
+ export declare const Standalone: Story;
@@ -0,0 +1,78 @@
1
+ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/jsx-runtime";
2
+ import * as __WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__ from "./Card.js";
3
+ import * as __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__ from "./CardContent.js";
4
+ import * as __WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__ from "./PlainText.js";
5
+ const insideCardDecorator = [
6
+ (Story)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__Card_js_d67c086a__["default"], {
7
+ header: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
8
+ font: "h5",
9
+ children: "Card"
10
+ }),
11
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Story, {})
12
+ })
13
+ ];
14
+ const meta = {
15
+ component: __WEBPACK_EXTERNAL_MODULE__CardContent_js_20e3f6de__["default"],
16
+ args: {
17
+ children: null
18
+ },
19
+ argTypes: {
20
+ children: {
21
+ control: false,
22
+ table: {
23
+ type: {
24
+ summary: "ReactNode"
25
+ }
26
+ }
27
+ }
28
+ },
29
+ parameters: {
30
+ layout: "padded"
31
+ }
32
+ };
33
+ const CardContent_stories_rslib_entry_ = meta;
34
+ const DefaultSpacing = {
35
+ decorators: insideCardDecorator,
36
+ args: {
37
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
38
+ children: "Default CardContent spacing (00)."
39
+ })
40
+ }
41
+ };
42
+ const SpacingN2 = {
43
+ decorators: insideCardDecorator,
44
+ args: {
45
+ spacing: "n2",
46
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
47
+ children: "Tighter padding (n2)."
48
+ })
49
+ }
50
+ };
51
+ const SpacingP2 = {
52
+ decorators: insideCardDecorator,
53
+ args: {
54
+ spacing: "p2",
55
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
56
+ children: "Roomier padding (p2)."
57
+ })
58
+ }
59
+ };
60
+ const Standalone = {
61
+ decorators: [
62
+ (Story)=>/*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)("div", {
63
+ style: {
64
+ border: "var(--size-n5) dashed var(--color-grey-t08)",
65
+ borderRadius: "var(--size-n2)",
66
+ maxWidth: "28rem"
67
+ },
68
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(Story, {})
69
+ })
70
+ ],
71
+ args: {
72
+ spacing: "p2",
73
+ children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__PlainText_js_cd0b6798__["default"], {
74
+ children: "CardContent only, without a Card wrapper."
75
+ })
76
+ }
77
+ };
78
+ export { DefaultSpacing, SpacingN2, SpacingP2, Standalone, CardContent_stories_rslib_entry_ as default };
@@ -6,6 +6,15 @@
6
6
  grid-template-rows: minmax(0, auto) minmax(0, 1fr) minmax(0, auto);
7
7
  max-height: 100%;
8
8
  display: grid;
9
+ overflow: hidden;
10
+ }
11
+
12
+ .containerExpander-EZSwGW {
13
+ grid-template-rows: minmax(0, auto) minmax(0, auto);
14
+ }
15
+
16
+ .containerExpanderWithFooter-P32jrR {
17
+ grid-template-rows: minmax(0, auto) minmax(0, auto) minmax(0, auto);
9
18
  }
10
19
 
11
20
  .header-jj9FGo {
@@ -14,13 +23,96 @@
14
23
  gap: var(--size-00);
15
24
  grid-template-columns: 1fr auto;
16
25
  align-items: center;
26
+ transition: border-bottom-color .2s cubic-bezier(.4, 0, .2, 1);
17
27
  display: grid;
18
28
  }
19
29
 
30
+ .headerExpanderDividerHidden-L3oAZ3 {
31
+ border-bottom-color: #0000;
32
+ }
33
+
34
+ .headerExpanderShell-qkgDge {
35
+ border: none;
36
+ min-width: 0;
37
+ margin: 0;
38
+ padding: 0;
39
+ }
40
+
41
+ .headerExpanderTrigger-jD8veQ {
42
+ appearance: none;
43
+ width: 100%;
44
+ font: inherit;
45
+ color: inherit;
46
+ cursor: pointer;
47
+ text-align: start;
48
+ box-sizing: border-box;
49
+ border-top-left-radius: var(--size-n2);
50
+ border-top-right-radius: var(--size-n2);
51
+ background: none;
52
+ border-top: none;
53
+ border-left: none;
54
+ border-right: none;
55
+ margin: 0;
56
+ transition: border-bottom-color .2s cubic-bezier(.4, 0, .2, 1), background-color .15s;
57
+ }
58
+
59
+ @media (hover: hover) {
60
+ .headerExpanderTrigger-jD8veQ:hover {
61
+ background-color: var(--color-grey-t10);
62
+ }
63
+ }
64
+
65
+ .headerExpanderTrigger-jD8veQ:focus {
66
+ outline: none;
67
+ }
68
+
69
+ .headerExpanderTrigger-jD8veQ:focus-visible {
70
+ box-shadow: 0px 0px 0px 2px var(--color-white), 0px 0px 0px 4px var(--color-purple-000);
71
+ }
72
+
73
+ .header-jj9FGo > :first-child {
74
+ min-width: 0;
75
+ }
76
+
77
+ .expanderControlCell-CPZkT9 {
78
+ justify-content: flex-end;
79
+ align-items: center;
80
+ display: flex;
81
+ }
82
+
20
83
  .content-vpnjlq {
21
84
  overflow-y: auto;
22
85
  }
23
86
 
87
+ .expandableShell-RxgAVx {
88
+ min-height: 0;
89
+ overflow: hidden;
90
+ }
91
+
92
+ .expandableTrack-kqIJy_ {
93
+ grid-template-rows: 0fr;
94
+ transition: grid-template-rows .2s cubic-bezier(.4, 0, .2, 1);
95
+ display: grid;
96
+ }
97
+
98
+ .expandableTrackExpanded-wO7SVT {
99
+ grid-template-rows: 1fr;
100
+ }
101
+
102
+ .expandableInner-mhxOdz {
103
+ min-height: 0;
104
+ overflow: hidden;
105
+ }
106
+
107
+ .expanderIcon-sNZWda {
108
+ transition: transform .2s cubic-bezier(.4, 0, .2, 1);
109
+ display: flex;
110
+ }
111
+
112
+ .expanderIconOpen-OSIda0 {
113
+ transform: rotate(-180deg);
114
+ }
115
+
24
116
  .content-vpnjlq:first-child {
25
117
  border-radius: var(--size-n2) var(--size-n2) 0 0;
26
118
  }
@@ -33,6 +125,10 @@
33
125
  border-radius: var(--size-n2);
34
126
  }
35
127
 
128
+ .content-vpnjlq:only-child.contentExpander-cNoAvd {
129
+ border-radius: 0;
130
+ }
131
+
36
132
  .footer-sVxS5P {
37
133
  padding: var(--size-00);
38
134
  border-top: var(--size-n5) solid var(--color-grey-t08);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@worknice/whiteboard",
3
3
  "description": "",
4
- "version": "0.46.0",
4
+ "version": "0.47.1",
5
5
  "license": "MIT",
6
6
  "private": false,
7
7
  "files": [
@@ -39,7 +39,7 @@
39
39
  "react-markdown": "^10.1.0",
40
40
  "utf8": "^3.0.0",
41
41
  "zod": "^4.1.13",
42
- "@worknice/utils": "^0.29.0"
42
+ "@worknice/utils": "^0.30.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@anolilab/semantic-release-pnpm": "^3.2.2",