@bagelink/vue 0.0.447 → 0.0.449
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/AccordionItem.vue.d.ts +8 -2
- package/dist/components/AccordionItem.vue.d.ts.map +1 -1
- package/dist/index.cjs +26 -13
- package/dist/index.mjs +26 -13
- package/dist/style.css +67 -7
- package/package.json +1 -1
- package/src/components/AccordionItem.vue +25 -11
- package/src/styles/appearance.css +38 -0
- package/src/styles/layout.css +17 -0
- package/src/styles/mobilLayout.css +13 -0
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
declare const _default: __VLS_WithTemplateSlots<import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
|
|
2
2
|
label?: string | undefined;
|
|
3
3
|
id?: string | undefined;
|
|
4
|
-
|
|
4
|
+
open?: boolean | undefined;
|
|
5
|
+
}>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
6
|
+
"update:open": (...args: any[]) => void;
|
|
7
|
+
}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
|
|
5
8
|
label?: string | undefined;
|
|
6
9
|
id?: string | undefined;
|
|
7
|
-
|
|
10
|
+
open?: boolean | undefined;
|
|
11
|
+
}>>> & {
|
|
12
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
13
|
+
}, {}, {}>, {
|
|
8
14
|
head?(_: {}): any;
|
|
9
15
|
default?(_: {}): any;
|
|
10
16
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/AccordionItem.vue"],"names":[],"mappings":"AA2BA
|
|
1
|
+
{"version":3,"file":"AccordionItem.vue.d.ts","sourceRoot":"","sources":["../../src/components/AccordionItem.vue"],"names":[],"mappings":"AA2BA;;;;;;;;;;;;;;;;;AA6NA,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -5576,25 +5576,38 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
5576
5576
|
__name: "AccordionItem",
|
|
5577
5577
|
props: {
|
|
5578
5578
|
label: {},
|
|
5579
|
-
id: {}
|
|
5579
|
+
id: {},
|
|
5580
|
+
open: { type: Boolean }
|
|
5580
5581
|
},
|
|
5581
|
-
|
|
5582
|
+
emits: ["update:open"],
|
|
5583
|
+
setup(__props, { emit: __emit }) {
|
|
5582
5584
|
const props2 = __props;
|
|
5583
|
-
|
|
5585
|
+
const emit2 = __emit;
|
|
5586
|
+
let openVal = vue.ref(false);
|
|
5587
|
+
let isOpen = vue.computed({
|
|
5588
|
+
get: () => openVal.value,
|
|
5589
|
+
set: (value) => {
|
|
5590
|
+
openVal.value = value;
|
|
5591
|
+
emit2("update:open", value);
|
|
5592
|
+
}
|
|
5593
|
+
});
|
|
5594
|
+
vue.onMounted(() => {
|
|
5595
|
+
if (props2.open)
|
|
5596
|
+
isOpen.value = true;
|
|
5597
|
+
});
|
|
5584
5598
|
const accordionState = vue.inject("accordionState");
|
|
5585
5599
|
const id = props2.id || Math.random().toString(36).substring(7);
|
|
5586
5600
|
vue.watch(
|
|
5587
5601
|
() => accordionState == null ? void 0 : accordionState.openItem,
|
|
5588
5602
|
(currentOpenId) => {
|
|
5589
|
-
if (currentOpenId !== id)
|
|
5590
|
-
|
|
5591
|
-
}
|
|
5603
|
+
if (currentOpenId !== id)
|
|
5604
|
+
isOpen.value = false;
|
|
5592
5605
|
},
|
|
5593
5606
|
{ immediate: true }
|
|
5594
5607
|
);
|
|
5595
5608
|
function toggle() {
|
|
5596
|
-
|
|
5597
|
-
if (
|
|
5609
|
+
isOpen.value = !isOpen.value;
|
|
5610
|
+
if (isOpen.value && (accordionState == null ? void 0 : accordionState.openItem))
|
|
5598
5611
|
accordionState.openItem = id;
|
|
5599
5612
|
else if ((accordionState == null ? void 0 : accordionState.openItem) === id)
|
|
5600
5613
|
accordionState.openItem = null;
|
|
@@ -5603,7 +5616,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
5603
5616
|
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C, [
|
|
5604
5617
|
vue.createElementVNode("button", {
|
|
5605
5618
|
onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
|
|
5606
|
-
"aria-expanded": vue.unref(
|
|
5619
|
+
"aria-expanded": vue.unref(isOpen) ? "true" : "false",
|
|
5607
5620
|
class: "accordion-head",
|
|
5608
5621
|
"aria-controls": `accordion-body-${vue.unref(id)}`
|
|
5609
5622
|
}, [
|
|
@@ -5611,18 +5624,18 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
5611
5624
|
vue.createElementVNode("span", _hoisted_3$l, vue.toDisplayString(_ctx.label), 1)
|
|
5612
5625
|
], true),
|
|
5613
5626
|
vue.createElementVNode("div", {
|
|
5614
|
-
class: vue.normalizeClass(["accordion-icon", { open: vue.unref(
|
|
5627
|
+
class: vue.normalizeClass(["accordion-icon", { open: vue.unref(isOpen) }])
|
|
5615
5628
|
}, [
|
|
5616
5629
|
vue.createVNode(vue.unref(_sfc_main$K), { icon: "expand_more" })
|
|
5617
5630
|
], 2)
|
|
5618
5631
|
], 8, _hoisted_2$v),
|
|
5619
5632
|
vue.createVNode(vue.Transition, { name: "expand" }, {
|
|
5620
5633
|
default: vue.withCtx(() => [
|
|
5621
|
-
vue.unref(
|
|
5634
|
+
vue.unref(isOpen) ? (vue.openBlock(), vue.createElementBlock("div", {
|
|
5622
5635
|
key: 0,
|
|
5623
5636
|
class: "accordion-body",
|
|
5624
5637
|
id: `accordion-body-${vue.unref(id)}`,
|
|
5625
|
-
"aria-hidden": vue.unref(
|
|
5638
|
+
"aria-hidden": vue.unref(isOpen) ? "false" : "true"
|
|
5626
5639
|
}, [
|
|
5627
5640
|
vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5628
5641
|
], 8, _hoisted_4$f)) : vue.createCommentVNode("", true)
|
|
@@ -5633,7 +5646,7 @@ const _sfc_main$F = /* @__PURE__ */ vue.defineComponent({
|
|
|
5633
5646
|
};
|
|
5634
5647
|
}
|
|
5635
5648
|
});
|
|
5636
|
-
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
5649
|
+
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-c1f34c59"]]);
|
|
5637
5650
|
const _sfc_main$E = {};
|
|
5638
5651
|
const _hoisted_1$B = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
|
|
5639
5652
|
const _hoisted_2$u = { class: "p-1" };
|
package/dist/index.mjs
CHANGED
|
@@ -5574,25 +5574,38 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
5574
5574
|
__name: "AccordionItem",
|
|
5575
5575
|
props: {
|
|
5576
5576
|
label: {},
|
|
5577
|
-
id: {}
|
|
5577
|
+
id: {},
|
|
5578
|
+
open: { type: Boolean }
|
|
5578
5579
|
},
|
|
5579
|
-
|
|
5580
|
+
emits: ["update:open"],
|
|
5581
|
+
setup(__props, { emit: __emit }) {
|
|
5580
5582
|
const props2 = __props;
|
|
5581
|
-
|
|
5583
|
+
const emit2 = __emit;
|
|
5584
|
+
let openVal = ref(false);
|
|
5585
|
+
let isOpen = computed({
|
|
5586
|
+
get: () => openVal.value,
|
|
5587
|
+
set: (value) => {
|
|
5588
|
+
openVal.value = value;
|
|
5589
|
+
emit2("update:open", value);
|
|
5590
|
+
}
|
|
5591
|
+
});
|
|
5592
|
+
onMounted(() => {
|
|
5593
|
+
if (props2.open)
|
|
5594
|
+
isOpen.value = true;
|
|
5595
|
+
});
|
|
5582
5596
|
const accordionState = inject("accordionState");
|
|
5583
5597
|
const id = props2.id || Math.random().toString(36).substring(7);
|
|
5584
5598
|
watch(
|
|
5585
5599
|
() => accordionState == null ? void 0 : accordionState.openItem,
|
|
5586
5600
|
(currentOpenId) => {
|
|
5587
|
-
if (currentOpenId !== id)
|
|
5588
|
-
|
|
5589
|
-
}
|
|
5601
|
+
if (currentOpenId !== id)
|
|
5602
|
+
isOpen.value = false;
|
|
5590
5603
|
},
|
|
5591
5604
|
{ immediate: true }
|
|
5592
5605
|
);
|
|
5593
5606
|
function toggle() {
|
|
5594
|
-
|
|
5595
|
-
if (
|
|
5607
|
+
isOpen.value = !isOpen.value;
|
|
5608
|
+
if (isOpen.value && (accordionState == null ? void 0 : accordionState.openItem))
|
|
5596
5609
|
accordionState.openItem = id;
|
|
5597
5610
|
else if ((accordionState == null ? void 0 : accordionState.openItem) === id)
|
|
5598
5611
|
accordionState.openItem = null;
|
|
@@ -5601,7 +5614,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
5601
5614
|
return openBlock(), createElementBlock("div", _hoisted_1$C, [
|
|
5602
5615
|
createElementVNode("button", {
|
|
5603
5616
|
onClick: _cache[0] || (_cache[0] = ($event) => toggle()),
|
|
5604
|
-
"aria-expanded": unref(
|
|
5617
|
+
"aria-expanded": unref(isOpen) ? "true" : "false",
|
|
5605
5618
|
class: "accordion-head",
|
|
5606
5619
|
"aria-controls": `accordion-body-${unref(id)}`
|
|
5607
5620
|
}, [
|
|
@@ -5609,18 +5622,18 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
5609
5622
|
createElementVNode("span", _hoisted_3$l, toDisplayString(_ctx.label), 1)
|
|
5610
5623
|
], true),
|
|
5611
5624
|
createElementVNode("div", {
|
|
5612
|
-
class: normalizeClass(["accordion-icon", { open: unref(
|
|
5625
|
+
class: normalizeClass(["accordion-icon", { open: unref(isOpen) }])
|
|
5613
5626
|
}, [
|
|
5614
5627
|
createVNode(unref(_sfc_main$K), { icon: "expand_more" })
|
|
5615
5628
|
], 2)
|
|
5616
5629
|
], 8, _hoisted_2$v),
|
|
5617
5630
|
createVNode(Transition, { name: "expand" }, {
|
|
5618
5631
|
default: withCtx(() => [
|
|
5619
|
-
unref(
|
|
5632
|
+
unref(isOpen) ? (openBlock(), createElementBlock("div", {
|
|
5620
5633
|
key: 0,
|
|
5621
5634
|
class: "accordion-body",
|
|
5622
5635
|
id: `accordion-body-${unref(id)}`,
|
|
5623
|
-
"aria-hidden": unref(
|
|
5636
|
+
"aria-hidden": unref(isOpen) ? "false" : "true"
|
|
5624
5637
|
}, [
|
|
5625
5638
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
5626
5639
|
], 8, _hoisted_4$f)) : createCommentVNode("", true)
|
|
@@ -5631,7 +5644,7 @@ const _sfc_main$F = /* @__PURE__ */ defineComponent({
|
|
|
5631
5644
|
};
|
|
5632
5645
|
}
|
|
5633
5646
|
});
|
|
5634
|
-
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-
|
|
5647
|
+
const AccordionItem = /* @__PURE__ */ _export_sfc(_sfc_main$F, [["__scopeId", "data-v-c1f34c59"]]);
|
|
5635
5648
|
const _sfc_main$E = {};
|
|
5636
5649
|
const _hoisted_1$B = { class: "list-wrap bgl_card thin grid overflow-hidden h-100 p-0" };
|
|
5637
5650
|
const _hoisted_2$u = { class: "p-1" };
|
package/dist/style.css
CHANGED
|
@@ -535,13 +535,13 @@ a[data-v-d09a83c5] {
|
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
-
.accordion-item[data-v-
|
|
538
|
+
.accordion-item[data-v-c1f34c59] {
|
|
539
539
|
border-bottom: 1px solid var(--border-color);
|
|
540
540
|
transition: all 0.2s;
|
|
541
541
|
cursor: pointer;
|
|
542
542
|
overflow: hidden;
|
|
543
543
|
}
|
|
544
|
-
.accordion-head[data-v-
|
|
544
|
+
.accordion-head[data-v-c1f34c59] {
|
|
545
545
|
height: var(--input-height);
|
|
546
546
|
background: transparent;
|
|
547
547
|
display: flex;
|
|
@@ -550,19 +550,19 @@ a[data-v-d09a83c5] {
|
|
|
550
550
|
justify-content: space-between;
|
|
551
551
|
border: none;
|
|
552
552
|
}
|
|
553
|
-
.accordion-icon[data-v-
|
|
553
|
+
.accordion-icon[data-v-c1f34c59] {
|
|
554
554
|
transition: all 0.2s ease;
|
|
555
555
|
}
|
|
556
|
-
.accordion-icon.open[data-v-
|
|
556
|
+
.accordion-icon.open[data-v-c1f34c59] {
|
|
557
557
|
transform: rotate(180deg);
|
|
558
558
|
}
|
|
559
|
-
.accordion-label[data-v-
|
|
559
|
+
.accordion-label[data-v-c1f34c59] {
|
|
560
560
|
font-weight: bold;
|
|
561
561
|
}
|
|
562
|
-
.accordion-head:hover .accordion-label[data-v-
|
|
562
|
+
.accordion-head:hover .accordion-label[data-v-c1f34c59] {
|
|
563
563
|
text-decoration: underline;
|
|
564
564
|
}
|
|
565
|
-
.accordion-body[data-v-
|
|
565
|
+
.accordion-body[data-v-c1f34c59] {
|
|
566
566
|
}
|
|
567
567
|
|
|
568
568
|
.expand-enter-active,
|
|
@@ -3193,6 +3193,9 @@ p {
|
|
|
3193
3193
|
.round {
|
|
3194
3194
|
border-radius: var(--btn-border-radius);
|
|
3195
3195
|
}
|
|
3196
|
+
.rounded {
|
|
3197
|
+
border-radius: calc(var(--btn-border-radius) / 2);
|
|
3198
|
+
}
|
|
3196
3199
|
.justify-items-center {
|
|
3197
3200
|
justify-items: center;
|
|
3198
3201
|
}
|
|
@@ -3262,6 +3265,16 @@ p {
|
|
|
3262
3265
|
top: 0px;
|
|
3263
3266
|
inset-inline-end: 0px;
|
|
3264
3267
|
}
|
|
3268
|
+
.position-bottom-start {
|
|
3269
|
+
position: absolute;
|
|
3270
|
+
bottom: 0px;
|
|
3271
|
+
inset-inline-start: 0px;
|
|
3272
|
+
}
|
|
3273
|
+
.position-bottom-end {
|
|
3274
|
+
position: absolute;
|
|
3275
|
+
bottom: 0px;
|
|
3276
|
+
inset-inline-end: 0px;
|
|
3277
|
+
}
|
|
3265
3278
|
.positioned-full {
|
|
3266
3279
|
top: 0;
|
|
3267
3280
|
bottom: 0;
|
|
@@ -4635,6 +4648,18 @@ p {
|
|
|
4635
4648
|
inset-inline-end: 0px;
|
|
4636
4649
|
}
|
|
4637
4650
|
|
|
4651
|
+
.m_position-bottom-start {
|
|
4652
|
+
position: absolute;
|
|
4653
|
+
bottom: 0px;
|
|
4654
|
+
inset-inline-start: 0px;
|
|
4655
|
+
}
|
|
4656
|
+
|
|
4657
|
+
.m_position-bottom-end {
|
|
4658
|
+
position: absolute;
|
|
4659
|
+
bottom: 0px;
|
|
4660
|
+
inset-inline-end: 0px;
|
|
4661
|
+
}
|
|
4662
|
+
|
|
4638
4663
|
.m_positioned-full {
|
|
4639
4664
|
top: 0;
|
|
4640
4665
|
bottom: 0;
|
|
@@ -4642,6 +4667,7 @@ p {
|
|
|
4642
4667
|
inset-inline-end: 0;
|
|
4643
4668
|
}
|
|
4644
4669
|
|
|
4670
|
+
|
|
4645
4671
|
.m_auto-flow-rows {
|
|
4646
4672
|
grid-auto-flow: row;
|
|
4647
4673
|
}
|
|
@@ -6952,6 +6978,9 @@ select {
|
|
|
6952
6978
|
min-width: 220px;
|
|
6953
6979
|
}
|
|
6954
6980
|
}
|
|
6981
|
+
.opacity-0 {
|
|
6982
|
+
opacity: 0;
|
|
6983
|
+
}
|
|
6955
6984
|
.opacity-1 {
|
|
6956
6985
|
opacity: 0.1;
|
|
6957
6986
|
}
|
|
@@ -7246,7 +7275,23 @@ select {
|
|
|
7246
7275
|
.color-input-green input {
|
|
7247
7276
|
color: var(--bgl-green) !important;
|
|
7248
7277
|
}
|
|
7278
|
+
.cover,
|
|
7279
|
+
.object-fit-cover {
|
|
7280
|
+
object-fit: cover;
|
|
7281
|
+
}
|
|
7282
|
+
.contain,
|
|
7283
|
+
.object-fit-contain {
|
|
7284
|
+
object-fit: contain;
|
|
7285
|
+
}
|
|
7286
|
+
.scale-down,
|
|
7287
|
+
.object-fit-scale-down {
|
|
7288
|
+
object-fit: scale-down;
|
|
7289
|
+
}
|
|
7249
7290
|
@media screen and (max-width: 910px) {
|
|
7291
|
+
.m_opacity-0 {
|
|
7292
|
+
opacity: 0;
|
|
7293
|
+
}
|
|
7294
|
+
|
|
7250
7295
|
.m_opacity-1 {
|
|
7251
7296
|
opacity: 0.1;
|
|
7252
7297
|
}
|
|
@@ -7635,6 +7680,21 @@ select {
|
|
|
7635
7680
|
.m_color-input-green input {
|
|
7636
7681
|
color: var(--bgl-green) !important;
|
|
7637
7682
|
}
|
|
7683
|
+
|
|
7684
|
+
.m_cover,
|
|
7685
|
+
.m_object-fit-cover {
|
|
7686
|
+
object-fit: cover;
|
|
7687
|
+
}
|
|
7688
|
+
|
|
7689
|
+
.m_contain,
|
|
7690
|
+
.m_object-fit-contain {
|
|
7691
|
+
object-fit: contain;
|
|
7692
|
+
}
|
|
7693
|
+
|
|
7694
|
+
.m_scale-down,
|
|
7695
|
+
.m_object-fit-scale-down {
|
|
7696
|
+
object-fit: scale-down;
|
|
7697
|
+
}
|
|
7638
7698
|
}
|
|
7639
7699
|
/* @import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Hebrew:wght@300;400;500;600;700&display=swap"); */
|
|
7640
7700
|
/*noinspection CssUnknownTarget*/
|
package/package.json
CHANGED
|
@@ -2,23 +2,23 @@
|
|
|
2
2
|
<div class="accordion-item">
|
|
3
3
|
<button
|
|
4
4
|
@click="toggle()"
|
|
5
|
-
:aria-expanded="
|
|
5
|
+
:aria-expanded="isOpen ? 'true' : 'false'"
|
|
6
6
|
class="accordion-head"
|
|
7
7
|
:aria-controls="`accordion-body-${id}`"
|
|
8
8
|
>
|
|
9
9
|
<slot name="head" >
|
|
10
10
|
<span class="accordion-label">{{ label }}</span>
|
|
11
11
|
</slot>
|
|
12
|
-
<div class="accordion-icon" :class="{ open }">
|
|
12
|
+
<div class="accordion-icon" :class="{ open: isOpen }">
|
|
13
13
|
<MaterialIcon icon="expand_more" />
|
|
14
14
|
</div>
|
|
15
15
|
</button>
|
|
16
16
|
<Transition name="expand">
|
|
17
17
|
<div
|
|
18
|
-
v-if="
|
|
18
|
+
v-if="isOpen"
|
|
19
19
|
class="accordion-body"
|
|
20
20
|
:id="`accordion-body-${id}`"
|
|
21
|
-
:aria-hidden="
|
|
21
|
+
:aria-hidden="isOpen ? 'false' : 'true'"
|
|
22
22
|
>
|
|
23
23
|
<slot />
|
|
24
24
|
</div>
|
|
@@ -28,13 +28,29 @@
|
|
|
28
28
|
|
|
29
29
|
<script lang="ts" setup>
|
|
30
30
|
import { MaterialIcon } from '@bagelink/vue';
|
|
31
|
-
import { watch, inject } from 'vue';
|
|
31
|
+
import { watch, inject, onMounted } from 'vue';
|
|
32
32
|
|
|
33
33
|
const props = defineProps<{
|
|
34
34
|
label?: string;
|
|
35
35
|
id?: string;
|
|
36
|
+
open?: boolean;
|
|
36
37
|
}>();
|
|
37
|
-
|
|
38
|
+
|
|
39
|
+
const emit = defineEmits(['update:open']);
|
|
40
|
+
|
|
41
|
+
let openVal = $ref(false);
|
|
42
|
+
|
|
43
|
+
let isOpen = $computed({
|
|
44
|
+
get: () => openVal,
|
|
45
|
+
set: (value: boolean) => {
|
|
46
|
+
openVal = value;
|
|
47
|
+
emit('update:open', value);
|
|
48
|
+
},
|
|
49
|
+
});
|
|
50
|
+
|
|
51
|
+
onMounted(() => {
|
|
52
|
+
if (props.open) isOpen = true;
|
|
53
|
+
});
|
|
38
54
|
|
|
39
55
|
const accordionState = inject('accordionState') as { openItem: string | null };
|
|
40
56
|
const id = props.id || Math.random().toString(36).substring(7);
|
|
@@ -42,16 +58,14 @@ const id = props.id || Math.random().toString(36).substring(7);
|
|
|
42
58
|
watch(
|
|
43
59
|
() => accordionState?.openItem,
|
|
44
60
|
(currentOpenId) => {
|
|
45
|
-
if (currentOpenId !== id)
|
|
46
|
-
open = false;
|
|
47
|
-
}
|
|
61
|
+
if (currentOpenId !== id) isOpen = false;
|
|
48
62
|
},
|
|
49
63
|
{ immediate: true },
|
|
50
64
|
);
|
|
51
65
|
|
|
52
66
|
function toggle() {
|
|
53
|
-
|
|
54
|
-
if (
|
|
67
|
+
isOpen = !isOpen;
|
|
68
|
+
if (isOpen && accordionState?.openItem) accordionState.openItem = id;
|
|
55
69
|
else if (accordionState?.openItem === id) accordionState.openItem = null;
|
|
56
70
|
}
|
|
57
71
|
</script>
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
.opacity-0 {
|
|
2
|
+
opacity: 0;
|
|
3
|
+
}
|
|
4
|
+
|
|
1
5
|
.opacity-1 {
|
|
2
6
|
opacity: 0.1;
|
|
3
7
|
}
|
|
@@ -390,9 +394,28 @@
|
|
|
390
394
|
color: var(--bgl-green) !important;
|
|
391
395
|
}
|
|
392
396
|
|
|
397
|
+
.cover,
|
|
398
|
+
.object-fit-cover {
|
|
399
|
+
object-fit: cover;
|
|
400
|
+
}
|
|
401
|
+
|
|
402
|
+
.contain,
|
|
403
|
+
.object-fit-contain {
|
|
404
|
+
object-fit: contain;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
.scale-down,
|
|
408
|
+
.object-fit-scale-down {
|
|
409
|
+
object-fit: scale-down;
|
|
410
|
+
}
|
|
411
|
+
|
|
393
412
|
|
|
394
413
|
|
|
395
414
|
@media screen and (max-width: 910px) {
|
|
415
|
+
.m_opacity-0 {
|
|
416
|
+
opacity: 0;
|
|
417
|
+
}
|
|
418
|
+
|
|
396
419
|
.m_opacity-1 {
|
|
397
420
|
opacity: 0.1;
|
|
398
421
|
}
|
|
@@ -781,4 +804,19 @@
|
|
|
781
804
|
.m_color-input-green input {
|
|
782
805
|
color: var(--bgl-green) !important;
|
|
783
806
|
}
|
|
807
|
+
|
|
808
|
+
.m_cover,
|
|
809
|
+
.m_object-fit-cover {
|
|
810
|
+
object-fit: cover;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
.m_contain,
|
|
814
|
+
.m_object-fit-contain {
|
|
815
|
+
object-fit: contain;
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
.m_scale-down,
|
|
819
|
+
.m_object-fit-scale-down {
|
|
820
|
+
object-fit: scale-down;
|
|
821
|
+
}
|
|
784
822
|
}
|
package/src/styles/layout.css
CHANGED
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
border-radius: var(--btn-border-radius);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
.rounded {
|
|
19
|
+
border-radius: calc(var(--btn-border-radius) / 2);
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
.justify-items-center {
|
|
19
23
|
justify-items: center;
|
|
20
24
|
}
|
|
@@ -105,6 +109,18 @@
|
|
|
105
109
|
inset-inline-end: 0px;
|
|
106
110
|
}
|
|
107
111
|
|
|
112
|
+
.position-bottom-start {
|
|
113
|
+
position: absolute;
|
|
114
|
+
bottom: 0px;
|
|
115
|
+
inset-inline-start: 0px;
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.position-bottom-end {
|
|
119
|
+
position: absolute;
|
|
120
|
+
bottom: 0px;
|
|
121
|
+
inset-inline-end: 0px;
|
|
122
|
+
}
|
|
123
|
+
|
|
108
124
|
.positioned-full {
|
|
109
125
|
top: 0;
|
|
110
126
|
bottom: 0;
|
|
@@ -1678,6 +1694,7 @@
|
|
|
1678
1694
|
direction: rtl;
|
|
1679
1695
|
}
|
|
1680
1696
|
|
|
1697
|
+
|
|
1681
1698
|
@media screen and (max-width: 910px) {
|
|
1682
1699
|
.grid-wrap-2 {
|
|
1683
1700
|
grid-template-columns: repeat(1, 1fr);
|
|
@@ -128,6 +128,18 @@
|
|
|
128
128
|
inset-inline-end: 0px;
|
|
129
129
|
}
|
|
130
130
|
|
|
131
|
+
.m_position-bottom-start {
|
|
132
|
+
position: absolute;
|
|
133
|
+
bottom: 0px;
|
|
134
|
+
inset-inline-start: 0px;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.m_position-bottom-end {
|
|
138
|
+
position: absolute;
|
|
139
|
+
bottom: 0px;
|
|
140
|
+
inset-inline-end: 0px;
|
|
141
|
+
}
|
|
142
|
+
|
|
131
143
|
.m_positioned-full {
|
|
132
144
|
top: 0;
|
|
133
145
|
bottom: 0;
|
|
@@ -135,6 +147,7 @@
|
|
|
135
147
|
inset-inline-end: 0;
|
|
136
148
|
}
|
|
137
149
|
|
|
150
|
+
|
|
138
151
|
.m_auto-flow-rows {
|
|
139
152
|
grid-auto-flow: row;
|
|
140
153
|
}
|