@jackcrane/ui 0.1.20 → 0.1.21
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/components/Card/card.d.ts +2 -1
- package/dist/jcui.cjs.js +78 -49
- package/dist/jcui.es.js +78 -49
- package/package.json +1 -1
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export default function Card({ children, variant, chamfer, size, collapsed, footerHeight, footer, title, ...props }: {
|
|
1
|
+
export default function Card({ children, variant, chamfer, size, collapsed, onCollapseChange, footerHeight, footer, title, ...props }: {
|
|
2
2
|
[x: string]: any;
|
|
3
3
|
children: any;
|
|
4
4
|
variant: any;
|
|
5
5
|
chamfer?: boolean;
|
|
6
6
|
size: any;
|
|
7
7
|
collapsed: any;
|
|
8
|
+
onCollapseChange: any;
|
|
8
9
|
footerHeight?: number;
|
|
9
10
|
footer: any;
|
|
10
11
|
title: any;
|
package/dist/jcui.cjs.js
CHANGED
|
@@ -217,7 +217,7 @@ div.jcui_chamfer:not(.jcui_disabled):focus-within {
|
|
|
217
217
|
transform: rotate(360deg);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
.
|
|
220
|
+
._card_1ywyn_1 {
|
|
221
221
|
border-width: var(--border-thickness);
|
|
222
222
|
border-style: solid;
|
|
223
223
|
font-size: 1rem;
|
|
@@ -226,110 +226,120 @@ div.jcui_chamfer:not(.jcui_disabled):focus-within {
|
|
|
226
226
|
display: flex;
|
|
227
227
|
flex-direction: column;
|
|
228
228
|
}
|
|
229
|
-
.
|
|
229
|
+
._pageBackground_1ywyn_11 {
|
|
230
230
|
--card-bg: var(--body-bg);
|
|
231
231
|
--button-bg: var(--body-bg);
|
|
232
232
|
--card-color: var(--body-color);
|
|
233
233
|
background-color: var(--body-bg);
|
|
234
234
|
}
|
|
235
|
-
.
|
|
235
|
+
._card_1ywyn_1 ._title_1ywyn_18 {
|
|
236
236
|
font-size: 1.25rem;
|
|
237
237
|
padding: 0.5rem 1rem;
|
|
238
238
|
border-bottom: var(--border-thickness) solid var(--border-color);
|
|
239
239
|
background-color: var(--card-bg);
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
._card_1ywyn_1 ._titleCollapsed_1ywyn_25 {
|
|
242
242
|
border-bottom: 0;
|
|
243
243
|
}
|
|
244
|
-
.
|
|
244
|
+
._card_1ywyn_1 ._titleContent_1ywyn_29 {
|
|
245
245
|
display: flex;
|
|
246
246
|
align-items: center;
|
|
247
247
|
gap: 0.5rem;
|
|
248
248
|
}
|
|
249
|
-
.
|
|
249
|
+
._card_1ywyn_1 ._chevronButton_1ywyn_35 {
|
|
250
250
|
margin-left: auto;
|
|
251
|
+
border: 0;
|
|
252
|
+
background: transparent;
|
|
253
|
+
color: inherit;
|
|
254
|
+
padding: 0;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
}
|
|
259
|
+
._card_1ywyn_1 ._chevron_1ywyn_35 {
|
|
251
260
|
width: 0.5rem;
|
|
252
261
|
height: 0.5rem;
|
|
253
262
|
border-right: 2px solid currentColor;
|
|
254
263
|
border-bottom: 2px solid currentColor;
|
|
255
264
|
transition: transform 0.2s ease;
|
|
256
265
|
flex-shrink: 0;
|
|
266
|
+
cursor: pointer;
|
|
257
267
|
}
|
|
258
|
-
.
|
|
268
|
+
._card_1ywyn_1 ._chevronExpanded_1ywyn_56 {
|
|
259
269
|
transform: rotate(45deg);
|
|
260
270
|
}
|
|
261
|
-
.
|
|
271
|
+
._card_1ywyn_1 ._chevronCollapsed_1ywyn_60 {
|
|
262
272
|
transform: rotate(-45deg);
|
|
263
273
|
}
|
|
264
|
-
.
|
|
274
|
+
._card_1ywyn_1 ._content_1ywyn_64 {
|
|
265
275
|
display: grid;
|
|
266
276
|
grid-template-rows: 1fr;
|
|
267
277
|
transition:
|
|
268
278
|
grid-template-rows 0.2s ease,
|
|
269
279
|
opacity 0.2s ease;
|
|
270
280
|
}
|
|
271
|
-
.
|
|
281
|
+
._card_1ywyn_1 ._contentInner_1ywyn_72 {
|
|
272
282
|
overflow: hidden;
|
|
273
283
|
min-height: 0;
|
|
274
284
|
display: flex;
|
|
275
285
|
flex-direction: column;
|
|
276
286
|
}
|
|
277
|
-
.
|
|
287
|
+
._card_1ywyn_1 ._contentCollapsed_1ywyn_79 {
|
|
278
288
|
grid-template-rows: 0fr;
|
|
279
289
|
opacity: 0;
|
|
280
290
|
}
|
|
281
|
-
.
|
|
291
|
+
._card_1ywyn_1 ._body_1ywyn_84 {
|
|
282
292
|
padding: 0.5rem 1rem;
|
|
283
293
|
width: 100%;
|
|
284
294
|
}
|
|
285
|
-
.
|
|
295
|
+
._card_1ywyn_1 ._footer_1ywyn_89 {
|
|
286
296
|
border-top: var(--border-thickness) solid var(--border-color);
|
|
287
297
|
flex: 1;
|
|
288
298
|
background-color: var(--card-bg);
|
|
289
299
|
padding: 0.5rem 1rem;
|
|
290
300
|
}
|
|
291
|
-
.
|
|
292
|
-
.
|
|
301
|
+
._large_1ywyn_96 ._body_1ywyn_84,
|
|
302
|
+
._large_1ywyn_96 ._title_1ywyn_18 {
|
|
293
303
|
font-size: 1.25rem;
|
|
294
304
|
padding: 0.75rem 1.25rem;
|
|
295
305
|
}
|
|
296
|
-
.
|
|
297
|
-
.
|
|
306
|
+
._small_1ywyn_102 ._body_1ywyn_84,
|
|
307
|
+
._small_1ywyn_102 ._title_1ywyn_18 {
|
|
298
308
|
font-size: 0.75rem;
|
|
299
309
|
padding: 0.25rem 0.5rem;
|
|
300
310
|
}
|
|
301
311
|
/* Variants */
|
|
302
|
-
.
|
|
312
|
+
._primary_1ywyn_110 {
|
|
303
313
|
--card-bg: var(--primary-color-100);
|
|
304
314
|
--border-color: var(--primary-color-300);
|
|
305
315
|
--border-accent-color: var(--primary-color-600);
|
|
306
316
|
--card-color: var(--primary-color-800);
|
|
307
317
|
}
|
|
308
|
-
.
|
|
318
|
+
._success_1ywyn_117 {
|
|
309
319
|
--card-bg: var(--success-color-100);
|
|
310
320
|
--border-color: var(--success-color-300);
|
|
311
321
|
--border-accent-color: var(--success-color-600);
|
|
312
322
|
--card-color: var(--success-color-800);
|
|
313
323
|
}
|
|
314
|
-
.
|
|
324
|
+
._warning_1ywyn_124 {
|
|
315
325
|
--card-bg: var(--warning-color-100);
|
|
316
326
|
--border-color: var(--warning-color-300);
|
|
317
327
|
--border-accent-color: var(--warning-color-600);
|
|
318
328
|
--card-color: var(--warning-color-800);
|
|
319
329
|
}
|
|
320
|
-
.
|
|
330
|
+
._danger_1ywyn_131 {
|
|
321
331
|
--card-bg: var(--danger-color-100);
|
|
322
332
|
--border-color: var(--danger-color-300);
|
|
323
333
|
--border-accent-color: var(--danger-color-600);
|
|
324
334
|
--card-color: var(--danger-color-800);
|
|
325
335
|
}
|
|
326
|
-
.
|
|
336
|
+
._info_1ywyn_138 {
|
|
327
337
|
--card-bg: var(--info-color-100);
|
|
328
338
|
--border-color: var(--info-color-300);
|
|
329
339
|
--border-accent-color: var(--info-color-600);
|
|
330
340
|
--card-color: var(--info-color-800);
|
|
331
341
|
}
|
|
332
|
-
.
|
|
342
|
+
._secondary_1ywyn_145 {
|
|
333
343
|
--card-bg: var(--secondary-color-100);
|
|
334
344
|
--border-color: var(--secondary-color-300);
|
|
335
345
|
--border-accent-color: var(--secondary-color-600);
|
|
@@ -2655,33 +2665,35 @@ function requireClassnames() {
|
|
|
2655
2665
|
}
|
|
2656
2666
|
var classnamesExports = requireClassnames();
|
|
2657
2667
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2658
|
-
const card = "
|
|
2659
|
-
const pageBackground$3 = "
|
|
2660
|
-
const title$1 = "
|
|
2661
|
-
const titleCollapsed = "
|
|
2662
|
-
const titleContent = "
|
|
2663
|
-
const
|
|
2664
|
-
const
|
|
2665
|
-
const
|
|
2666
|
-
const
|
|
2667
|
-
const
|
|
2668
|
-
const
|
|
2669
|
-
const
|
|
2670
|
-
const
|
|
2671
|
-
const
|
|
2672
|
-
const
|
|
2673
|
-
const
|
|
2674
|
-
const
|
|
2675
|
-
const
|
|
2676
|
-
const
|
|
2677
|
-
const
|
|
2678
|
-
const
|
|
2668
|
+
const card = "_card_1ywyn_1";
|
|
2669
|
+
const pageBackground$3 = "_pageBackground_1ywyn_11";
|
|
2670
|
+
const title$1 = "_title_1ywyn_18";
|
|
2671
|
+
const titleCollapsed = "_titleCollapsed_1ywyn_25";
|
|
2672
|
+
const titleContent = "_titleContent_1ywyn_29";
|
|
2673
|
+
const chevronButton = "_chevronButton_1ywyn_35";
|
|
2674
|
+
const chevron = "_chevron_1ywyn_35";
|
|
2675
|
+
const chevronExpanded = "_chevronExpanded_1ywyn_56";
|
|
2676
|
+
const chevronCollapsed = "_chevronCollapsed_1ywyn_60";
|
|
2677
|
+
const content$4 = "_content_1ywyn_64";
|
|
2678
|
+
const contentInner = "_contentInner_1ywyn_72";
|
|
2679
|
+
const contentCollapsed = "_contentCollapsed_1ywyn_79";
|
|
2680
|
+
const body$1 = "_body_1ywyn_84";
|
|
2681
|
+
const footer$1 = "_footer_1ywyn_89";
|
|
2682
|
+
const large$7 = "_large_1ywyn_96";
|
|
2683
|
+
const small$7 = "_small_1ywyn_102";
|
|
2684
|
+
const primary$9 = "_primary_1ywyn_110";
|
|
2685
|
+
const success$9 = "_success_1ywyn_117";
|
|
2686
|
+
const warning$9 = "_warning_1ywyn_124";
|
|
2687
|
+
const danger$9 = "_danger_1ywyn_131";
|
|
2688
|
+
const info$9 = "_info_1ywyn_138";
|
|
2689
|
+
const secondary$9 = "_secondary_1ywyn_145";
|
|
2679
2690
|
const styles$b = {
|
|
2680
2691
|
card,
|
|
2681
2692
|
pageBackground: pageBackground$3,
|
|
2682
2693
|
title: title$1,
|
|
2683
2694
|
titleCollapsed,
|
|
2684
2695
|
titleContent,
|
|
2696
|
+
chevronButton,
|
|
2685
2697
|
chevron,
|
|
2686
2698
|
chevronExpanded,
|
|
2687
2699
|
chevronCollapsed,
|
|
@@ -2705,6 +2717,7 @@ function Card({
|
|
|
2705
2717
|
chamfer: chamfer2 = true,
|
|
2706
2718
|
size: size2,
|
|
2707
2719
|
collapsed,
|
|
2720
|
+
onCollapseChange,
|
|
2708
2721
|
footerHeight = 0,
|
|
2709
2722
|
footer: footer2,
|
|
2710
2723
|
// I hardly know her
|
|
@@ -2713,6 +2726,12 @@ function Card({
|
|
|
2713
2726
|
}) {
|
|
2714
2727
|
const isCollapsible = collapsed !== void 0;
|
|
2715
2728
|
const isCollapsed2 = Boolean(collapsed);
|
|
2729
|
+
const handleCollapseToggle = () => {
|
|
2730
|
+
if (!isCollapsible) {
|
|
2731
|
+
return;
|
|
2732
|
+
}
|
|
2733
|
+
onCollapseChange?.(!isCollapsed2);
|
|
2734
|
+
};
|
|
2716
2735
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2717
2736
|
"div",
|
|
2718
2737
|
{
|
|
@@ -2737,12 +2756,22 @@ function Card({
|
|
|
2737
2756
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.titleContent, children: [
|
|
2738
2757
|
title2,
|
|
2739
2758
|
isCollapsible && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2740
|
-
"
|
|
2759
|
+
"button",
|
|
2741
2760
|
{
|
|
2742
|
-
|
|
2743
|
-
className:
|
|
2744
|
-
|
|
2745
|
-
|
|
2761
|
+
type: "button",
|
|
2762
|
+
className: styles$b.chevronButton,
|
|
2763
|
+
onClick: handleCollapseToggle,
|
|
2764
|
+
"aria-label": isCollapsed2 ? "Expand card" : "Collapse card",
|
|
2765
|
+
"aria-expanded": !isCollapsed2,
|
|
2766
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2767
|
+
"span",
|
|
2768
|
+
{
|
|
2769
|
+
"aria-hidden": "true",
|
|
2770
|
+
className: classNames(
|
|
2771
|
+
styles$b.chevron,
|
|
2772
|
+
isCollapsed2 ? styles$b.chevronCollapsed : styles$b.chevronExpanded
|
|
2773
|
+
)
|
|
2774
|
+
}
|
|
2746
2775
|
)
|
|
2747
2776
|
}
|
|
2748
2777
|
)
|
package/dist/jcui.es.js
CHANGED
|
@@ -217,7 +217,7 @@ div.jcui_chamfer:not(.jcui_disabled):focus-within {
|
|
|
217
217
|
transform: rotate(360deg);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
.
|
|
220
|
+
._card_1ywyn_1 {
|
|
221
221
|
border-width: var(--border-thickness);
|
|
222
222
|
border-style: solid;
|
|
223
223
|
font-size: 1rem;
|
|
@@ -226,110 +226,120 @@ div.jcui_chamfer:not(.jcui_disabled):focus-within {
|
|
|
226
226
|
display: flex;
|
|
227
227
|
flex-direction: column;
|
|
228
228
|
}
|
|
229
|
-
.
|
|
229
|
+
._pageBackground_1ywyn_11 {
|
|
230
230
|
--card-bg: var(--body-bg);
|
|
231
231
|
--button-bg: var(--body-bg);
|
|
232
232
|
--card-color: var(--body-color);
|
|
233
233
|
background-color: var(--body-bg);
|
|
234
234
|
}
|
|
235
|
-
.
|
|
235
|
+
._card_1ywyn_1 ._title_1ywyn_18 {
|
|
236
236
|
font-size: 1.25rem;
|
|
237
237
|
padding: 0.5rem 1rem;
|
|
238
238
|
border-bottom: var(--border-thickness) solid var(--border-color);
|
|
239
239
|
background-color: var(--card-bg);
|
|
240
240
|
}
|
|
241
|
-
.
|
|
241
|
+
._card_1ywyn_1 ._titleCollapsed_1ywyn_25 {
|
|
242
242
|
border-bottom: 0;
|
|
243
243
|
}
|
|
244
|
-
.
|
|
244
|
+
._card_1ywyn_1 ._titleContent_1ywyn_29 {
|
|
245
245
|
display: flex;
|
|
246
246
|
align-items: center;
|
|
247
247
|
gap: 0.5rem;
|
|
248
248
|
}
|
|
249
|
-
.
|
|
249
|
+
._card_1ywyn_1 ._chevronButton_1ywyn_35 {
|
|
250
250
|
margin-left: auto;
|
|
251
|
+
border: 0;
|
|
252
|
+
background: transparent;
|
|
253
|
+
color: inherit;
|
|
254
|
+
padding: 0;
|
|
255
|
+
display: flex;
|
|
256
|
+
align-items: center;
|
|
257
|
+
cursor: pointer;
|
|
258
|
+
}
|
|
259
|
+
._card_1ywyn_1 ._chevron_1ywyn_35 {
|
|
251
260
|
width: 0.5rem;
|
|
252
261
|
height: 0.5rem;
|
|
253
262
|
border-right: 2px solid currentColor;
|
|
254
263
|
border-bottom: 2px solid currentColor;
|
|
255
264
|
transition: transform 0.2s ease;
|
|
256
265
|
flex-shrink: 0;
|
|
266
|
+
cursor: pointer;
|
|
257
267
|
}
|
|
258
|
-
.
|
|
268
|
+
._card_1ywyn_1 ._chevronExpanded_1ywyn_56 {
|
|
259
269
|
transform: rotate(45deg);
|
|
260
270
|
}
|
|
261
|
-
.
|
|
271
|
+
._card_1ywyn_1 ._chevronCollapsed_1ywyn_60 {
|
|
262
272
|
transform: rotate(-45deg);
|
|
263
273
|
}
|
|
264
|
-
.
|
|
274
|
+
._card_1ywyn_1 ._content_1ywyn_64 {
|
|
265
275
|
display: grid;
|
|
266
276
|
grid-template-rows: 1fr;
|
|
267
277
|
transition:
|
|
268
278
|
grid-template-rows 0.2s ease,
|
|
269
279
|
opacity 0.2s ease;
|
|
270
280
|
}
|
|
271
|
-
.
|
|
281
|
+
._card_1ywyn_1 ._contentInner_1ywyn_72 {
|
|
272
282
|
overflow: hidden;
|
|
273
283
|
min-height: 0;
|
|
274
284
|
display: flex;
|
|
275
285
|
flex-direction: column;
|
|
276
286
|
}
|
|
277
|
-
.
|
|
287
|
+
._card_1ywyn_1 ._contentCollapsed_1ywyn_79 {
|
|
278
288
|
grid-template-rows: 0fr;
|
|
279
289
|
opacity: 0;
|
|
280
290
|
}
|
|
281
|
-
.
|
|
291
|
+
._card_1ywyn_1 ._body_1ywyn_84 {
|
|
282
292
|
padding: 0.5rem 1rem;
|
|
283
293
|
width: 100%;
|
|
284
294
|
}
|
|
285
|
-
.
|
|
295
|
+
._card_1ywyn_1 ._footer_1ywyn_89 {
|
|
286
296
|
border-top: var(--border-thickness) solid var(--border-color);
|
|
287
297
|
flex: 1;
|
|
288
298
|
background-color: var(--card-bg);
|
|
289
299
|
padding: 0.5rem 1rem;
|
|
290
300
|
}
|
|
291
|
-
.
|
|
292
|
-
.
|
|
301
|
+
._large_1ywyn_96 ._body_1ywyn_84,
|
|
302
|
+
._large_1ywyn_96 ._title_1ywyn_18 {
|
|
293
303
|
font-size: 1.25rem;
|
|
294
304
|
padding: 0.75rem 1.25rem;
|
|
295
305
|
}
|
|
296
|
-
.
|
|
297
|
-
.
|
|
306
|
+
._small_1ywyn_102 ._body_1ywyn_84,
|
|
307
|
+
._small_1ywyn_102 ._title_1ywyn_18 {
|
|
298
308
|
font-size: 0.75rem;
|
|
299
309
|
padding: 0.25rem 0.5rem;
|
|
300
310
|
}
|
|
301
311
|
/* Variants */
|
|
302
|
-
.
|
|
312
|
+
._primary_1ywyn_110 {
|
|
303
313
|
--card-bg: var(--primary-color-100);
|
|
304
314
|
--border-color: var(--primary-color-300);
|
|
305
315
|
--border-accent-color: var(--primary-color-600);
|
|
306
316
|
--card-color: var(--primary-color-800);
|
|
307
317
|
}
|
|
308
|
-
.
|
|
318
|
+
._success_1ywyn_117 {
|
|
309
319
|
--card-bg: var(--success-color-100);
|
|
310
320
|
--border-color: var(--success-color-300);
|
|
311
321
|
--border-accent-color: var(--success-color-600);
|
|
312
322
|
--card-color: var(--success-color-800);
|
|
313
323
|
}
|
|
314
|
-
.
|
|
324
|
+
._warning_1ywyn_124 {
|
|
315
325
|
--card-bg: var(--warning-color-100);
|
|
316
326
|
--border-color: var(--warning-color-300);
|
|
317
327
|
--border-accent-color: var(--warning-color-600);
|
|
318
328
|
--card-color: var(--warning-color-800);
|
|
319
329
|
}
|
|
320
|
-
.
|
|
330
|
+
._danger_1ywyn_131 {
|
|
321
331
|
--card-bg: var(--danger-color-100);
|
|
322
332
|
--border-color: var(--danger-color-300);
|
|
323
333
|
--border-accent-color: var(--danger-color-600);
|
|
324
334
|
--card-color: var(--danger-color-800);
|
|
325
335
|
}
|
|
326
|
-
.
|
|
336
|
+
._info_1ywyn_138 {
|
|
327
337
|
--card-bg: var(--info-color-100);
|
|
328
338
|
--border-color: var(--info-color-300);
|
|
329
339
|
--border-accent-color: var(--info-color-600);
|
|
330
340
|
--card-color: var(--info-color-800);
|
|
331
341
|
}
|
|
332
|
-
.
|
|
342
|
+
._secondary_1ywyn_145 {
|
|
333
343
|
--card-bg: var(--secondary-color-100);
|
|
334
344
|
--border-color: var(--secondary-color-300);
|
|
335
345
|
--border-accent-color: var(--secondary-color-600);
|
|
@@ -2637,33 +2647,35 @@ function requireClassnames() {
|
|
|
2637
2647
|
}
|
|
2638
2648
|
var classnamesExports = requireClassnames();
|
|
2639
2649
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2640
|
-
const card = "
|
|
2641
|
-
const pageBackground$3 = "
|
|
2642
|
-
const title$1 = "
|
|
2643
|
-
const titleCollapsed = "
|
|
2644
|
-
const titleContent = "
|
|
2645
|
-
const
|
|
2646
|
-
const
|
|
2647
|
-
const
|
|
2648
|
-
const
|
|
2649
|
-
const
|
|
2650
|
-
const
|
|
2651
|
-
const
|
|
2652
|
-
const
|
|
2653
|
-
const
|
|
2654
|
-
const
|
|
2655
|
-
const
|
|
2656
|
-
const
|
|
2657
|
-
const
|
|
2658
|
-
const
|
|
2659
|
-
const
|
|
2660
|
-
const
|
|
2650
|
+
const card = "_card_1ywyn_1";
|
|
2651
|
+
const pageBackground$3 = "_pageBackground_1ywyn_11";
|
|
2652
|
+
const title$1 = "_title_1ywyn_18";
|
|
2653
|
+
const titleCollapsed = "_titleCollapsed_1ywyn_25";
|
|
2654
|
+
const titleContent = "_titleContent_1ywyn_29";
|
|
2655
|
+
const chevronButton = "_chevronButton_1ywyn_35";
|
|
2656
|
+
const chevron = "_chevron_1ywyn_35";
|
|
2657
|
+
const chevronExpanded = "_chevronExpanded_1ywyn_56";
|
|
2658
|
+
const chevronCollapsed = "_chevronCollapsed_1ywyn_60";
|
|
2659
|
+
const content$4 = "_content_1ywyn_64";
|
|
2660
|
+
const contentInner = "_contentInner_1ywyn_72";
|
|
2661
|
+
const contentCollapsed = "_contentCollapsed_1ywyn_79";
|
|
2662
|
+
const body$1 = "_body_1ywyn_84";
|
|
2663
|
+
const footer$1 = "_footer_1ywyn_89";
|
|
2664
|
+
const large$7 = "_large_1ywyn_96";
|
|
2665
|
+
const small$7 = "_small_1ywyn_102";
|
|
2666
|
+
const primary$9 = "_primary_1ywyn_110";
|
|
2667
|
+
const success$9 = "_success_1ywyn_117";
|
|
2668
|
+
const warning$9 = "_warning_1ywyn_124";
|
|
2669
|
+
const danger$9 = "_danger_1ywyn_131";
|
|
2670
|
+
const info$9 = "_info_1ywyn_138";
|
|
2671
|
+
const secondary$9 = "_secondary_1ywyn_145";
|
|
2661
2672
|
const styles$b = {
|
|
2662
2673
|
card,
|
|
2663
2674
|
pageBackground: pageBackground$3,
|
|
2664
2675
|
title: title$1,
|
|
2665
2676
|
titleCollapsed,
|
|
2666
2677
|
titleContent,
|
|
2678
|
+
chevronButton,
|
|
2667
2679
|
chevron,
|
|
2668
2680
|
chevronExpanded,
|
|
2669
2681
|
chevronCollapsed,
|
|
@@ -2687,6 +2699,7 @@ function Card({
|
|
|
2687
2699
|
chamfer: chamfer2 = true,
|
|
2688
2700
|
size: size2,
|
|
2689
2701
|
collapsed,
|
|
2702
|
+
onCollapseChange,
|
|
2690
2703
|
footerHeight = 0,
|
|
2691
2704
|
footer: footer2,
|
|
2692
2705
|
// I hardly know her
|
|
@@ -2695,6 +2708,12 @@ function Card({
|
|
|
2695
2708
|
}) {
|
|
2696
2709
|
const isCollapsible = collapsed !== void 0;
|
|
2697
2710
|
const isCollapsed2 = Boolean(collapsed);
|
|
2711
|
+
const handleCollapseToggle = () => {
|
|
2712
|
+
if (!isCollapsible) {
|
|
2713
|
+
return;
|
|
2714
|
+
}
|
|
2715
|
+
onCollapseChange?.(!isCollapsed2);
|
|
2716
|
+
};
|
|
2698
2717
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2699
2718
|
"div",
|
|
2700
2719
|
{
|
|
@@ -2719,12 +2738,22 @@ function Card({
|
|
|
2719
2738
|
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.titleContent, children: [
|
|
2720
2739
|
title2,
|
|
2721
2740
|
isCollapsible && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2722
|
-
"
|
|
2741
|
+
"button",
|
|
2723
2742
|
{
|
|
2724
|
-
|
|
2725
|
-
className:
|
|
2726
|
-
|
|
2727
|
-
|
|
2743
|
+
type: "button",
|
|
2744
|
+
className: styles$b.chevronButton,
|
|
2745
|
+
onClick: handleCollapseToggle,
|
|
2746
|
+
"aria-label": isCollapsed2 ? "Expand card" : "Collapse card",
|
|
2747
|
+
"aria-expanded": !isCollapsed2,
|
|
2748
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2749
|
+
"span",
|
|
2750
|
+
{
|
|
2751
|
+
"aria-hidden": "true",
|
|
2752
|
+
className: classNames(
|
|
2753
|
+
styles$b.chevron,
|
|
2754
|
+
isCollapsed2 ? styles$b.chevronCollapsed : styles$b.chevronExpanded
|
|
2755
|
+
)
|
|
2756
|
+
}
|
|
2728
2757
|
)
|
|
2729
2758
|
}
|
|
2730
2759
|
)
|