@jackcrane/ui 0.1.19 → 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 +3 -1
- package/dist/jcui.cjs.js +154 -36
- package/dist/jcui.es.js +154 -36
- package/package.json +1 -1
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
export default function Card({ children, variant, chamfer, size, 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
|
+
collapsed: any;
|
|
8
|
+
onCollapseChange: any;
|
|
7
9
|
footerHeight?: number;
|
|
8
10
|
footer: any;
|
|
9
11
|
title: any;
|
package/dist/jcui.cjs.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var n=document.createElement("style");n.appendChild(document.createTextNode(`@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");@property --button-bg {
|
|
2
2
|
syntax: "<color>";
|
|
3
3
|
inherits: true;
|
|
4
4
|
initial-value: transparent;
|
|
@@ -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,70 +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
|
+
border-bottom: 0;
|
|
243
|
+
}
|
|
244
|
+
._card_1ywyn_1 ._titleContent_1ywyn_29 {
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
gap: 0.5rem;
|
|
248
|
+
}
|
|
249
|
+
._card_1ywyn_1 ._chevronButton_1ywyn_35 {
|
|
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 {
|
|
260
|
+
width: 0.5rem;
|
|
261
|
+
height: 0.5rem;
|
|
262
|
+
border-right: 2px solid currentColor;
|
|
263
|
+
border-bottom: 2px solid currentColor;
|
|
264
|
+
transition: transform 0.2s ease;
|
|
265
|
+
flex-shrink: 0;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
}
|
|
268
|
+
._card_1ywyn_1 ._chevronExpanded_1ywyn_56 {
|
|
269
|
+
transform: rotate(45deg);
|
|
270
|
+
}
|
|
271
|
+
._card_1ywyn_1 ._chevronCollapsed_1ywyn_60 {
|
|
272
|
+
transform: rotate(-45deg);
|
|
273
|
+
}
|
|
274
|
+
._card_1ywyn_1 ._content_1ywyn_64 {
|
|
275
|
+
display: grid;
|
|
276
|
+
grid-template-rows: 1fr;
|
|
277
|
+
transition:
|
|
278
|
+
grid-template-rows 0.2s ease,
|
|
279
|
+
opacity 0.2s ease;
|
|
280
|
+
}
|
|
281
|
+
._card_1ywyn_1 ._contentInner_1ywyn_72 {
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
min-height: 0;
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
}
|
|
287
|
+
._card_1ywyn_1 ._contentCollapsed_1ywyn_79 {
|
|
288
|
+
grid-template-rows: 0fr;
|
|
289
|
+
opacity: 0;
|
|
290
|
+
}
|
|
291
|
+
._card_1ywyn_1 ._body_1ywyn_84 {
|
|
242
292
|
padding: 0.5rem 1rem;
|
|
243
293
|
width: 100%;
|
|
244
294
|
}
|
|
245
|
-
.
|
|
295
|
+
._card_1ywyn_1 ._footer_1ywyn_89 {
|
|
246
296
|
border-top: var(--border-thickness) solid var(--border-color);
|
|
247
297
|
flex: 1;
|
|
248
298
|
background-color: var(--card-bg);
|
|
249
299
|
padding: 0.5rem 1rem;
|
|
250
300
|
}
|
|
251
|
-
.
|
|
252
|
-
.
|
|
301
|
+
._large_1ywyn_96 ._body_1ywyn_84,
|
|
302
|
+
._large_1ywyn_96 ._title_1ywyn_18 {
|
|
253
303
|
font-size: 1.25rem;
|
|
254
304
|
padding: 0.75rem 1.25rem;
|
|
255
305
|
}
|
|
256
|
-
.
|
|
257
|
-
.
|
|
306
|
+
._small_1ywyn_102 ._body_1ywyn_84,
|
|
307
|
+
._small_1ywyn_102 ._title_1ywyn_18 {
|
|
258
308
|
font-size: 0.75rem;
|
|
259
309
|
padding: 0.25rem 0.5rem;
|
|
260
310
|
}
|
|
261
311
|
/* Variants */
|
|
262
|
-
.
|
|
312
|
+
._primary_1ywyn_110 {
|
|
263
313
|
--card-bg: var(--primary-color-100);
|
|
264
314
|
--border-color: var(--primary-color-300);
|
|
265
315
|
--border-accent-color: var(--primary-color-600);
|
|
266
316
|
--card-color: var(--primary-color-800);
|
|
267
317
|
}
|
|
268
|
-
.
|
|
318
|
+
._success_1ywyn_117 {
|
|
269
319
|
--card-bg: var(--success-color-100);
|
|
270
320
|
--border-color: var(--success-color-300);
|
|
271
321
|
--border-accent-color: var(--success-color-600);
|
|
272
322
|
--card-color: var(--success-color-800);
|
|
273
323
|
}
|
|
274
|
-
.
|
|
324
|
+
._warning_1ywyn_124 {
|
|
275
325
|
--card-bg: var(--warning-color-100);
|
|
276
326
|
--border-color: var(--warning-color-300);
|
|
277
327
|
--border-accent-color: var(--warning-color-600);
|
|
278
328
|
--card-color: var(--warning-color-800);
|
|
279
329
|
}
|
|
280
|
-
.
|
|
330
|
+
._danger_1ywyn_131 {
|
|
281
331
|
--card-bg: var(--danger-color-100);
|
|
282
332
|
--border-color: var(--danger-color-300);
|
|
283
333
|
--border-accent-color: var(--danger-color-600);
|
|
284
334
|
--card-color: var(--danger-color-800);
|
|
285
335
|
}
|
|
286
|
-
.
|
|
336
|
+
._info_1ywyn_138 {
|
|
287
337
|
--card-bg: var(--info-color-100);
|
|
288
338
|
--border-color: var(--info-color-300);
|
|
289
339
|
--border-accent-color: var(--info-color-600);
|
|
290
340
|
--card-color: var(--info-color-800);
|
|
291
341
|
}
|
|
292
|
-
.
|
|
342
|
+
._secondary_1ywyn_145 {
|
|
293
343
|
--card-bg: var(--secondary-color-100);
|
|
294
344
|
--border-color: var(--secondary-color-300);
|
|
295
345
|
--border-accent-color: var(--secondary-color-600);
|
|
@@ -2100,7 +2150,7 @@ hr {
|
|
|
2100
2150
|
padding-left: 0.5rem;
|
|
2101
2151
|
padding-right: 0.5rem;
|
|
2102
2152
|
width: 100%;
|
|
2103
|
-
}`)),document.head.appendChild(
|
|
2153
|
+
}`)),document.head.appendChild(n)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2104
2154
|
"use strict";
|
|
2105
2155
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2106
2156
|
const React = require("react");
|
|
@@ -2615,23 +2665,41 @@ function requireClassnames() {
|
|
|
2615
2665
|
}
|
|
2616
2666
|
var classnamesExports = requireClassnames();
|
|
2617
2667
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2618
|
-
const card = "
|
|
2619
|
-
const pageBackground$3 = "
|
|
2620
|
-
const title$1 = "
|
|
2621
|
-
const
|
|
2622
|
-
const
|
|
2623
|
-
const
|
|
2624
|
-
const
|
|
2625
|
-
const
|
|
2626
|
-
const
|
|
2627
|
-
const
|
|
2628
|
-
const
|
|
2629
|
-
const
|
|
2630
|
-
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";
|
|
2631
2690
|
const styles$b = {
|
|
2632
2691
|
card,
|
|
2633
2692
|
pageBackground: pageBackground$3,
|
|
2634
2693
|
title: title$1,
|
|
2694
|
+
titleCollapsed,
|
|
2695
|
+
titleContent,
|
|
2696
|
+
chevronButton,
|
|
2697
|
+
chevron,
|
|
2698
|
+
chevronExpanded,
|
|
2699
|
+
chevronCollapsed,
|
|
2700
|
+
content: content$4,
|
|
2701
|
+
contentInner,
|
|
2702
|
+
contentCollapsed,
|
|
2635
2703
|
body: body$1,
|
|
2636
2704
|
footer: footer$1,
|
|
2637
2705
|
large: large$7,
|
|
@@ -2648,12 +2716,22 @@ function Card({
|
|
|
2648
2716
|
variant,
|
|
2649
2717
|
chamfer: chamfer2 = true,
|
|
2650
2718
|
size: size2,
|
|
2719
|
+
collapsed,
|
|
2720
|
+
onCollapseChange,
|
|
2651
2721
|
footerHeight = 0,
|
|
2652
2722
|
footer: footer2,
|
|
2653
2723
|
// I hardly know her
|
|
2654
2724
|
title: title2,
|
|
2655
2725
|
...props
|
|
2656
2726
|
}) {
|
|
2727
|
+
const isCollapsible = collapsed !== void 0;
|
|
2728
|
+
const isCollapsed2 = Boolean(collapsed);
|
|
2729
|
+
const handleCollapseToggle = () => {
|
|
2730
|
+
if (!isCollapsible) {
|
|
2731
|
+
return;
|
|
2732
|
+
}
|
|
2733
|
+
onCollapseChange?.(!isCollapsed2);
|
|
2734
|
+
};
|
|
2657
2735
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2658
2736
|
"div",
|
|
2659
2737
|
{
|
|
@@ -2667,14 +2745,54 @@ function Card({
|
|
|
2667
2745
|
),
|
|
2668
2746
|
...props,
|
|
2669
2747
|
children: [
|
|
2670
|
-
title2 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2671
|
-
|
|
2672
|
-
|
|
2748
|
+
(title2 || isCollapsible) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2749
|
+
"div",
|
|
2750
|
+
{
|
|
2751
|
+
className: classNames(
|
|
2752
|
+
styles$b.title,
|
|
2753
|
+
hatchStyles.hatch,
|
|
2754
|
+
isCollapsed2 && styles$b.titleCollapsed
|
|
2755
|
+
),
|
|
2756
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.titleContent, children: [
|
|
2757
|
+
title2,
|
|
2758
|
+
isCollapsible && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2759
|
+
"button",
|
|
2760
|
+
{
|
|
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
|
+
}
|
|
2775
|
+
)
|
|
2776
|
+
}
|
|
2777
|
+
)
|
|
2778
|
+
] })
|
|
2779
|
+
}
|
|
2780
|
+
),
|
|
2781
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2673
2782
|
"div",
|
|
2674
2783
|
{
|
|
2675
|
-
className: classNames(
|
|
2676
|
-
|
|
2677
|
-
|
|
2784
|
+
className: classNames(styles$b.content, isCollapsed2 && styles$b.contentCollapsed),
|
|
2785
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.contentInner, children: [
|
|
2786
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$b.body, children: children2 }),
|
|
2787
|
+
footerHeight > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2788
|
+
"div",
|
|
2789
|
+
{
|
|
2790
|
+
className: classNames(hatchStyles.hatch, styles$b.footer),
|
|
2791
|
+
style: { flexBasis: footerHeight },
|
|
2792
|
+
children: footer2
|
|
2793
|
+
}
|
|
2794
|
+
)
|
|
2795
|
+
] })
|
|
2678
2796
|
}
|
|
2679
2797
|
)
|
|
2680
2798
|
]
|
package/dist/jcui.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document!="undefined"){var
|
|
1
|
+
(function(){"use strict";try{if(typeof document!="undefined"){var n=document.createElement("style");n.appendChild(document.createTextNode(`@import url("https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap");@property --button-bg {
|
|
2
2
|
syntax: "<color>";
|
|
3
3
|
inherits: true;
|
|
4
4
|
initial-value: transparent;
|
|
@@ -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,70 +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
|
+
border-bottom: 0;
|
|
243
|
+
}
|
|
244
|
+
._card_1ywyn_1 ._titleContent_1ywyn_29 {
|
|
245
|
+
display: flex;
|
|
246
|
+
align-items: center;
|
|
247
|
+
gap: 0.5rem;
|
|
248
|
+
}
|
|
249
|
+
._card_1ywyn_1 ._chevronButton_1ywyn_35 {
|
|
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 {
|
|
260
|
+
width: 0.5rem;
|
|
261
|
+
height: 0.5rem;
|
|
262
|
+
border-right: 2px solid currentColor;
|
|
263
|
+
border-bottom: 2px solid currentColor;
|
|
264
|
+
transition: transform 0.2s ease;
|
|
265
|
+
flex-shrink: 0;
|
|
266
|
+
cursor: pointer;
|
|
267
|
+
}
|
|
268
|
+
._card_1ywyn_1 ._chevronExpanded_1ywyn_56 {
|
|
269
|
+
transform: rotate(45deg);
|
|
270
|
+
}
|
|
271
|
+
._card_1ywyn_1 ._chevronCollapsed_1ywyn_60 {
|
|
272
|
+
transform: rotate(-45deg);
|
|
273
|
+
}
|
|
274
|
+
._card_1ywyn_1 ._content_1ywyn_64 {
|
|
275
|
+
display: grid;
|
|
276
|
+
grid-template-rows: 1fr;
|
|
277
|
+
transition:
|
|
278
|
+
grid-template-rows 0.2s ease,
|
|
279
|
+
opacity 0.2s ease;
|
|
280
|
+
}
|
|
281
|
+
._card_1ywyn_1 ._contentInner_1ywyn_72 {
|
|
282
|
+
overflow: hidden;
|
|
283
|
+
min-height: 0;
|
|
284
|
+
display: flex;
|
|
285
|
+
flex-direction: column;
|
|
286
|
+
}
|
|
287
|
+
._card_1ywyn_1 ._contentCollapsed_1ywyn_79 {
|
|
288
|
+
grid-template-rows: 0fr;
|
|
289
|
+
opacity: 0;
|
|
290
|
+
}
|
|
291
|
+
._card_1ywyn_1 ._body_1ywyn_84 {
|
|
242
292
|
padding: 0.5rem 1rem;
|
|
243
293
|
width: 100%;
|
|
244
294
|
}
|
|
245
|
-
.
|
|
295
|
+
._card_1ywyn_1 ._footer_1ywyn_89 {
|
|
246
296
|
border-top: var(--border-thickness) solid var(--border-color);
|
|
247
297
|
flex: 1;
|
|
248
298
|
background-color: var(--card-bg);
|
|
249
299
|
padding: 0.5rem 1rem;
|
|
250
300
|
}
|
|
251
|
-
.
|
|
252
|
-
.
|
|
301
|
+
._large_1ywyn_96 ._body_1ywyn_84,
|
|
302
|
+
._large_1ywyn_96 ._title_1ywyn_18 {
|
|
253
303
|
font-size: 1.25rem;
|
|
254
304
|
padding: 0.75rem 1.25rem;
|
|
255
305
|
}
|
|
256
|
-
.
|
|
257
|
-
.
|
|
306
|
+
._small_1ywyn_102 ._body_1ywyn_84,
|
|
307
|
+
._small_1ywyn_102 ._title_1ywyn_18 {
|
|
258
308
|
font-size: 0.75rem;
|
|
259
309
|
padding: 0.25rem 0.5rem;
|
|
260
310
|
}
|
|
261
311
|
/* Variants */
|
|
262
|
-
.
|
|
312
|
+
._primary_1ywyn_110 {
|
|
263
313
|
--card-bg: var(--primary-color-100);
|
|
264
314
|
--border-color: var(--primary-color-300);
|
|
265
315
|
--border-accent-color: var(--primary-color-600);
|
|
266
316
|
--card-color: var(--primary-color-800);
|
|
267
317
|
}
|
|
268
|
-
.
|
|
318
|
+
._success_1ywyn_117 {
|
|
269
319
|
--card-bg: var(--success-color-100);
|
|
270
320
|
--border-color: var(--success-color-300);
|
|
271
321
|
--border-accent-color: var(--success-color-600);
|
|
272
322
|
--card-color: var(--success-color-800);
|
|
273
323
|
}
|
|
274
|
-
.
|
|
324
|
+
._warning_1ywyn_124 {
|
|
275
325
|
--card-bg: var(--warning-color-100);
|
|
276
326
|
--border-color: var(--warning-color-300);
|
|
277
327
|
--border-accent-color: var(--warning-color-600);
|
|
278
328
|
--card-color: var(--warning-color-800);
|
|
279
329
|
}
|
|
280
|
-
.
|
|
330
|
+
._danger_1ywyn_131 {
|
|
281
331
|
--card-bg: var(--danger-color-100);
|
|
282
332
|
--border-color: var(--danger-color-300);
|
|
283
333
|
--border-accent-color: var(--danger-color-600);
|
|
284
334
|
--card-color: var(--danger-color-800);
|
|
285
335
|
}
|
|
286
|
-
.
|
|
336
|
+
._info_1ywyn_138 {
|
|
287
337
|
--card-bg: var(--info-color-100);
|
|
288
338
|
--border-color: var(--info-color-300);
|
|
289
339
|
--border-accent-color: var(--info-color-600);
|
|
290
340
|
--card-color: var(--info-color-800);
|
|
291
341
|
}
|
|
292
|
-
.
|
|
342
|
+
._secondary_1ywyn_145 {
|
|
293
343
|
--card-bg: var(--secondary-color-100);
|
|
294
344
|
--border-color: var(--secondary-color-300);
|
|
295
345
|
--border-accent-color: var(--secondary-color-600);
|
|
@@ -2100,7 +2150,7 @@ hr {
|
|
|
2100
2150
|
padding-left: 0.5rem;
|
|
2101
2151
|
padding-right: 0.5rem;
|
|
2102
2152
|
width: 100%;
|
|
2103
|
-
}`)),document.head.appendChild(
|
|
2153
|
+
}`)),document.head.appendChild(n)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2104
2154
|
import * as React from "react";
|
|
2105
2155
|
import React__default, { useContext, createContext as createContext$1, useId as useId$1, forwardRef, useRef, useState, useMemo, useEffect, useLayoutEffect, useCallback, createElement } from "react";
|
|
2106
2156
|
import * as ReactDOM from "react-dom";
|
|
@@ -2597,23 +2647,41 @@ function requireClassnames() {
|
|
|
2597
2647
|
}
|
|
2598
2648
|
var classnamesExports = requireClassnames();
|
|
2599
2649
|
const classNames = /* @__PURE__ */ getDefaultExportFromCjs(classnamesExports);
|
|
2600
|
-
const card = "
|
|
2601
|
-
const pageBackground$3 = "
|
|
2602
|
-
const title$1 = "
|
|
2603
|
-
const
|
|
2604
|
-
const
|
|
2605
|
-
const
|
|
2606
|
-
const
|
|
2607
|
-
const
|
|
2608
|
-
const
|
|
2609
|
-
const
|
|
2610
|
-
const
|
|
2611
|
-
const
|
|
2612
|
-
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";
|
|
2613
2672
|
const styles$b = {
|
|
2614
2673
|
card,
|
|
2615
2674
|
pageBackground: pageBackground$3,
|
|
2616
2675
|
title: title$1,
|
|
2676
|
+
titleCollapsed,
|
|
2677
|
+
titleContent,
|
|
2678
|
+
chevronButton,
|
|
2679
|
+
chevron,
|
|
2680
|
+
chevronExpanded,
|
|
2681
|
+
chevronCollapsed,
|
|
2682
|
+
content: content$4,
|
|
2683
|
+
contentInner,
|
|
2684
|
+
contentCollapsed,
|
|
2617
2685
|
body: body$1,
|
|
2618
2686
|
footer: footer$1,
|
|
2619
2687
|
large: large$7,
|
|
@@ -2630,12 +2698,22 @@ function Card({
|
|
|
2630
2698
|
variant,
|
|
2631
2699
|
chamfer: chamfer2 = true,
|
|
2632
2700
|
size: size2,
|
|
2701
|
+
collapsed,
|
|
2702
|
+
onCollapseChange,
|
|
2633
2703
|
footerHeight = 0,
|
|
2634
2704
|
footer: footer2,
|
|
2635
2705
|
// I hardly know her
|
|
2636
2706
|
title: title2,
|
|
2637
2707
|
...props
|
|
2638
2708
|
}) {
|
|
2709
|
+
const isCollapsible = collapsed !== void 0;
|
|
2710
|
+
const isCollapsed2 = Boolean(collapsed);
|
|
2711
|
+
const handleCollapseToggle = () => {
|
|
2712
|
+
if (!isCollapsible) {
|
|
2713
|
+
return;
|
|
2714
|
+
}
|
|
2715
|
+
onCollapseChange?.(!isCollapsed2);
|
|
2716
|
+
};
|
|
2639
2717
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs(
|
|
2640
2718
|
"div",
|
|
2641
2719
|
{
|
|
@@ -2649,14 +2727,54 @@ function Card({
|
|
|
2649
2727
|
),
|
|
2650
2728
|
...props,
|
|
2651
2729
|
children: [
|
|
2652
|
-
title2 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2653
|
-
|
|
2654
|
-
|
|
2730
|
+
(title2 || isCollapsible) && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2731
|
+
"div",
|
|
2732
|
+
{
|
|
2733
|
+
className: classNames(
|
|
2734
|
+
styles$b.title,
|
|
2735
|
+
hatchStyles.hatch,
|
|
2736
|
+
isCollapsed2 && styles$b.titleCollapsed
|
|
2737
|
+
),
|
|
2738
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.titleContent, children: [
|
|
2739
|
+
title2,
|
|
2740
|
+
isCollapsible && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2741
|
+
"button",
|
|
2742
|
+
{
|
|
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
|
+
}
|
|
2757
|
+
)
|
|
2758
|
+
}
|
|
2759
|
+
)
|
|
2760
|
+
] })
|
|
2761
|
+
}
|
|
2762
|
+
),
|
|
2763
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2655
2764
|
"div",
|
|
2656
2765
|
{
|
|
2657
|
-
className: classNames(
|
|
2658
|
-
|
|
2659
|
-
|
|
2766
|
+
className: classNames(styles$b.content, isCollapsed2 && styles$b.contentCollapsed),
|
|
2767
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: styles$b.contentInner, children: [
|
|
2768
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: styles$b.body, children: children2 }),
|
|
2769
|
+
footerHeight > 0 && /* @__PURE__ */ jsxRuntimeExports.jsx(
|
|
2770
|
+
"div",
|
|
2771
|
+
{
|
|
2772
|
+
className: classNames(hatchStyles.hatch, styles$b.footer),
|
|
2773
|
+
style: { flexBasis: footerHeight },
|
|
2774
|
+
children: footer2
|
|
2775
|
+
}
|
|
2776
|
+
)
|
|
2777
|
+
] })
|
|
2660
2778
|
}
|
|
2661
2779
|
)
|
|
2662
2780
|
]
|