@fiscozen/card 0.1.2 → 0.1.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiscozen/card",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "Design System Card component",
5
5
  "main": "src/index.ts",
6
6
  "type": "module",
@@ -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
+ "@fiscozen/eslint-config": "^0.1.0",
37
37
  "@fiscozen/prettier-config": "^0.1.0",
38
- "@fiscozen/eslint-config": "^0.1.0"
38
+ "@fiscozen/tsconfig": "^0.1.0"
39
39
  },
40
40
  "license": "MIT",
41
41
  "scripts": {
package/src/FzCard.vue CHANGED
@@ -20,31 +20,29 @@
20
20
  </div>
21
21
  <slot name="header-content"></slot>
22
22
  </header>
23
- <template v-if="showContent">
24
- <article :class="['p-20', contentClass]">
25
- <slot></slot>
26
- </article>
27
- <footer v-if="atLeastOneButton" :class="[footerStaticClass, borderColor]">
28
- <FzIconButton
29
- v-if="tertiaryAction"
30
- @click="$emit('fztertiary:click')"
31
- :iconName="tertiaryAction.icon"
32
- variant="invisible"
33
- />
34
- <FzButton
35
- v-if="secondaryAction"
36
- @click="$emit('fzsecondary:click')"
37
- :label="secondaryAction.label"
38
- variant="secondary"
39
- />
40
- <FzButton
41
- v-if="primaryAction"
42
- @click="$emit('fzprimary:click')"
43
- :label="primaryAction.label"
44
- variant="primary"
45
- />
46
- </footer>
47
- </template>
23
+ <article v-if="isAlive" :class="['p-20', contentClass]" v-show="showContent">
24
+ <slot></slot>
25
+ </article>
26
+ <footer v-if="atLeastOneButton && isAlive" :class="[footerStaticClass, borderColor]" v-show="showContent">
27
+ <FzIconButton
28
+ v-if="tertiaryAction"
29
+ @click="$emit('fztertiary:click')"
30
+ :iconName="tertiaryAction.icon"
31
+ variant="invisible"
32
+ />
33
+ <FzButton
34
+ v-if="secondaryAction"
35
+ @click="$emit('fzsecondary:click')"
36
+ :label="secondaryAction.label"
37
+ variant="secondary"
38
+ />
39
+ <FzButton
40
+ v-if="primaryAction"
41
+ @click="$emit('fzprimary:click')"
42
+ :label="primaryAction.label"
43
+ variant="primary"
44
+ />
45
+ </footer>
48
46
  </section>
49
47
  </template>
50
48
 
@@ -64,8 +62,10 @@ const footerStaticClass =
64
62
  "h-64 border-t-1 border-solid p-16 flex justify-end gap-8 items-center";
65
63
 
66
64
  const showContent = computed(() => isOpen.value || !props.collapsible);
65
+ const isAlive = computed(() => props.alwaysAlive || showContent.value);
67
66
  const headerContainerComputedClass = computed(() => [
68
67
  showContent.value ? "border-b-1" : "border-b-0",
68
+ props.collapsible ? "cursor-pointer" : "",
69
69
  ]);
70
70
 
71
71
  const backgroundColor = computed(() => {
package/src/types.ts CHANGED
@@ -7,6 +7,7 @@ export type FzCardProps = {
7
7
  contentClass?: string;
8
8
  collapsible?: boolean;
9
9
  defaultExpanded?: boolean;
10
+ alwaysAlive?: boolean;
10
11
  };
11
12
 
12
13
  type FzCardButton = {