@fiscozen/card 0.1.1 → 0.1.2

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/FzCard.vue +8 -2
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@fiscozen/card",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Design System Card component",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
7
7
  "keywords": [],
8
8
  "author": "Cristian Barraco",
9
9
  "dependencies": {
10
- "@fiscozen/icons": "^0.1.3",
11
- "@fiscozen/button": "^0.1.2"
10
+ "@fiscozen/icons": "^0.1.5",
11
+ "@fiscozen/button": "^0.1.4"
12
12
  },
13
13
  "peerDependencies": {
14
14
  "tailwindcss": "^3.4.1",
@@ -33,9 +33,9 @@
33
33
  "@awesome.me/kit-8137893ad3": "^1.0.65",
34
34
  "@fortawesome/fontawesome-svg-core": "^6.5.1",
35
35
  "@fortawesome/vue-fontawesome": "^3.0.6",
36
+ "@fiscozen/tsconfig": "^0.1.0",
36
37
  "@fiscozen/prettier-config": "^0.1.0",
37
- "@fiscozen/eslint-config": "^0.1.0",
38
- "@fiscozen/tsconfig": "^0.1.0"
38
+ "@fiscozen/eslint-config": "^0.1.0"
39
39
  },
40
40
  "license": "MIT",
41
41
  "scripts": {
package/src/FzCard.vue CHANGED
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <section :class="[sectionStaticClass, backgroundColor]">
3
- <header :class="[headerContainerComputedClass, borderColor]">
3
+ <header :class="[headerContainerComputedClass, borderColor]" @click="toggleOpen">
4
4
  <div :class="headerStaticClass">
5
5
  <div class="flex flex-row gap-12 items-center">
6
6
  <h2
@@ -15,7 +15,6 @@
15
15
  <FzIconButton
16
16
  v-if="collapsible"
17
17
  :iconName="isOpen ? 'chevron-up' : 'chevron-down'"
18
- @click="isOpen = !isOpen"
19
18
  variant="invisible"
20
19
  />
21
20
  </div>
@@ -102,6 +101,11 @@ const atLeastOneButton = computed(
102
101
  props.tertiaryAction !== undefined,
103
102
  );
104
103
 
104
+ function toggleOpen() {
105
+ if (props.collapsible)
106
+ isOpen.value = !isOpen.value;
107
+ }
108
+
105
109
  onMounted(() => {
106
110
  if (props.tertiaryAction && !props.secondaryAction && !props.primaryAction)
107
111
  console.warn(
@@ -112,4 +116,6 @@ onMounted(() => {
112
116
  "[Fiscozen Design System]: You should set primaryAction if you want to set secondaryAction",
113
117
  );
114
118
  });
119
+
120
+ defineExpose({ toggleOpen });
115
121
  </script>