cisse-vue-ui 0.5.8 → 0.5.10

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.
@@ -1352,16 +1352,55 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1352
1352
  props: {
1353
1353
  title: {},
1354
1354
  description: {},
1355
- defaultExpanded: { type: Boolean, default: true }
1355
+ defaultExpanded: { type: Boolean, default: true },
1356
+ cardClass: { default: "rounded-lg overflow-hidden bg-white shadow-md dark:bg-slate-950" },
1357
+ headerClass: { default: "w-full text-left" },
1358
+ contentClass: { default: "" }
1356
1359
  },
1357
1360
  setup(__props) {
1358
1361
  const props = __props;
1362
+ const slots = useSlots();
1359
1363
  const isExpanded = ref(props.defaultExpanded);
1360
1364
  const toggle = () => {
1361
1365
  isExpanded.value = !isExpanded.value;
1362
1366
  };
1367
+ const hasCustomHeader = () => !!slots.header;
1363
1368
  return (_ctx, _cache) => {
1364
- return openBlock(), createBlock(_sfc_main$i, {
1369
+ return hasCustomHeader() ? (openBlock(), createElementBlock("div", {
1370
+ key: 0,
1371
+ class: normalizeClass(__props.cardClass)
1372
+ }, [
1373
+ createElementVNode("button", {
1374
+ type: "button",
1375
+ class: normalizeClass(__props.headerClass),
1376
+ onClick: toggle
1377
+ }, [
1378
+ renderSlot(_ctx.$slots, "header", {
1379
+ expanded: isExpanded.value,
1380
+ toggle
1381
+ })
1382
+ ], 2),
1383
+ createVNode(Transition, {
1384
+ "enter-active-class": "transition-all duration-200 ease-out",
1385
+ "enter-from-class": "opacity-0 max-h-0",
1386
+ "enter-to-class": "opacity-100 max-h-[2000px]",
1387
+ "leave-active-class": "transition-all duration-200 ease-in",
1388
+ "leave-from-class": "opacity-100 max-h-[2000px]",
1389
+ "leave-to-class": "opacity-0 max-h-0"
1390
+ }, {
1391
+ default: withCtx(() => [
1392
+ withDirectives(createElementVNode("div", {
1393
+ class: normalizeClass(["overflow-hidden", __props.contentClass])
1394
+ }, [
1395
+ renderSlot(_ctx.$slots, "default")
1396
+ ], 2), [
1397
+ [vShow, isExpanded.value]
1398
+ ])
1399
+ ]),
1400
+ _: 3
1401
+ })
1402
+ ], 2)) : (openBlock(), createBlock(_sfc_main$i, {
1403
+ key: 1,
1365
1404
  title: __props.title,
1366
1405
  description: __props.description
1367
1406
  }, {
@@ -1400,7 +1439,7 @@ const _sfc_main$7 = /* @__PURE__ */ defineComponent({
1400
1439
  })
1401
1440
  ]),
1402
1441
  _: 3
1403
- }, 8, ["title", "description"]);
1442
+ }, 8, ["title", "description"]));
1404
1443
  };
1405
1444
  }
1406
1445
  });
@@ -2034,4 +2073,4 @@ export {
2034
2073
  _sfc_main$1 as q,
2035
2074
  _sfc_main as r
2036
2075
  };
2037
- //# sourceMappingURL=Timeline.vue_vue_type_script_setup_true_lang-BDHQDmeC.js.map
2076
+ //# sourceMappingURL=Timeline.vue_vue_type_script_setup_true_lang-D5uv4FP6.js.map