@fiscozen/card 1.0.2 → 2.0.0
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/CHANGELOG.md +25 -0
- package/README.md +99 -0
- package/dist/card.js +71 -57
- package/dist/card.umd.cjs +1 -1
- package/dist/src/types.d.ts +3 -1
- package/package.json +9 -9
- package/src/FzCard.vue +34 -19
- package/src/__tests__/FzCard.spec.ts +13 -4
- package/src/__tests__/__snapshots__/FzCard.spec.ts.snap +23 -13
- package/src/types.ts +5 -3
- package/tsconfig.tsbuildinfo +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @fiscozen/card
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [a26bc2c]
|
|
8
|
+
- Updated dependencies [a26bc2c]
|
|
9
|
+
- Updated dependencies [2d4fc5e]
|
|
10
|
+
- @fiscozen/style@0.3.0
|
|
11
|
+
- @fiscozen/icons@0.2.0
|
|
12
|
+
- @fiscozen/button@2.0.0
|
|
13
|
+
- @fiscozen/composables@1.0.2
|
|
14
|
+
- @fiscozen/container@0.4.2
|
|
15
|
+
|
|
16
|
+
## 1.1.0
|
|
17
|
+
|
|
18
|
+
### Minor Changes
|
|
19
|
+
|
|
20
|
+
- 2cc511a: Add yellow and red color variants
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- 1a2df8c: Move @fiscozen/icons from dependencies to peerDependencies. Consumers now need to install @fiscozen/icons explicitly. This decouples icon updates from component version bumps.
|
|
25
|
+
- Updated dependencies [1a2df8c]
|
|
26
|
+
- @fiscozen/button@1.0.2
|
|
27
|
+
|
|
3
28
|
## 1.0.2
|
|
4
29
|
|
|
5
30
|
### Minor Changes
|
package/README.md
CHANGED
|
@@ -1 +1,100 @@
|
|
|
1
1
|
# @fiscozen/card
|
|
2
|
+
|
|
3
|
+
> For usage documentation, see [Storybook Documentation](https://storybook-url/Documentation/Panel/FzCard)
|
|
4
|
+
|
|
5
|
+
## Development
|
|
6
|
+
|
|
7
|
+
### Architecture
|
|
8
|
+
|
|
9
|
+
The `FzCard` component is a layout container that groups related content and actions. It provides a consistent structure: optional header (title + slots), main content area, and optional footer (default action buttons or custom slot). It supports multiple background color variants, collapsible content with configurable default state, and optional info icon. All action buttons and the info icon use the same `environment` prop for visual context (backoffice vs frontoffice).
|
|
10
|
+
|
|
11
|
+
**Key state:**
|
|
12
|
+
- `isOpen`: Ref controlling expanded/collapsed state when `collapsible` is true; initial value from `defaultExpanded ?? false`
|
|
13
|
+
- `normalizedColor`: Computed mapping deprecated color values (e.g. `aliceblue` → `blue`) for internal styling
|
|
14
|
+
- `showContent`: Computed — true when not collapsible or when expanded
|
|
15
|
+
- `isAlive`: Computed — true when `alwaysAlive` or `showContent`; drives whether article/footer are in DOM (v-if)
|
|
16
|
+
- `existHeader`: Computed — true when title or header/header-content slots are provided
|
|
17
|
+
- `atLeastOneButton`: Computed — true when any of primary/secondary/tertiary action is set
|
|
18
|
+
|
|
19
|
+
**Color and styling flow:**
|
|
20
|
+
- `normalizedColor` feeds `backgroundColor` and `borderColor` computed properties
|
|
21
|
+
- Background/border use Tailwind classes: design tokens for default/blue/orange/purple/grey; semantic tokens for yellow (`--semantic-warning-50`) and red (`--semantic-error-50`)
|
|
22
|
+
- Text color is always `text-core-black` for all variants
|
|
23
|
+
|
|
24
|
+
### Code Organization
|
|
25
|
+
|
|
26
|
+
- `src/FzCard.vue`: Single-file component; all logic and template in one place
|
|
27
|
+
- `src/types.ts`: `FzCardProps`, `FzCardColor`, `FzCardEnvironment`, `FzCardEvents`, `FzCardSlots`, and internal action types
|
|
28
|
+
- `src/index.ts`: Exports component and types
|
|
29
|
+
|
|
30
|
+
No subcomponents or `utils`/`common` modules; color mapping and layout logic live in the main component.
|
|
31
|
+
|
|
32
|
+
### Key Concepts
|
|
33
|
+
|
|
34
|
+
#### Color Variants and Normalization
|
|
35
|
+
|
|
36
|
+
The `color` prop accepts: `default`, `blue`, `orange`, `purple`, `grey`, `yellow`, `red`, and deprecated `aliceblue`. All styling uses `normalizedColor` so that:
|
|
37
|
+
- `aliceblue` is mapped to `blue` (same visual result)
|
|
38
|
+
- A `watch` with `immediate: true` logs a deprecation warning when `color === 'aliceblue'`
|
|
39
|
+
|
|
40
|
+
Background and border classes are resolved in two computed properties (`backgroundColor`, `borderColor`) with a `switch (normalizedColor.value)` over the normalized value. Adding a new color requires adding a case in both computeds and extending `FzCardColor` in `types.ts`.
|
|
41
|
+
|
|
42
|
+
#### Collapsible and Content Visibility
|
|
43
|
+
|
|
44
|
+
- When `collapsible` is false: content and footer are always visible; `isAlive` and `showContent` are true
|
|
45
|
+
- When `collapsible` is true: header click toggles `isOpen`; `showContent` follows `isOpen`; article uses `v-show="showContent"` so it can be hidden without destroy
|
|
46
|
+
- `isAlive`: When true, article and footer are rendered (v-if). When false (collapsible and collapsed and not `alwaysAlive`), article is not in DOM. So: `alwaysAlive` keeps content in DOM when collapsed; otherwise collapsed state removes article (and footer when no actions/slot)
|
|
47
|
+
|
|
48
|
+
Footer is shown only when `(slots.footer || atLeastOneButton) && isAlive` and `v-show="showContent"`, so it hides with content when collapsed unless overridden by slot usage.
|
|
49
|
+
|
|
50
|
+
#### Action Buttons and Warnings
|
|
51
|
+
|
|
52
|
+
Primary, secondary, and tertiary actions are rendered in the default footer slot via `FzContainer` + `FzButton` / `FzIconButton`. Order in template: tertiary (icon), secondary, primary. On mount, the component warns if:
|
|
53
|
+
- `tertiaryAction` is set without both `primaryAction` and `secondaryAction`
|
|
54
|
+
- `secondaryAction` is set without `primaryAction`
|
|
55
|
+
|
|
56
|
+
These are guidance only; rendering still proceeds.
|
|
57
|
+
|
|
58
|
+
#### Responsive Footer
|
|
59
|
+
|
|
60
|
+
`useMediaQuery` from `@fiscozen/composables` and `breakpoints` from `@fiscozen/style` drive `smOrSmaller`. When true, footer has `w-full` on the container and `flex-grow` on secondary/primary buttons; footer layout uses `justify-end` when not `smOrSmaller`.
|
|
61
|
+
|
|
62
|
+
### Internal Logic
|
|
63
|
+
|
|
64
|
+
#### Color Class Mapping
|
|
65
|
+
|
|
66
|
+
- `backgroundColor`: `default` → `bg-core-white`; `blue` → `bg-background-alice-blue`; `orange` → `bg-background-seashell`; `purple` → `bg-background-pale-purple`; `grey` → `bg-background-white-smoke`; `yellow` → `bg-semantic-warning-50`; `red` → `bg-semantic-error-50`
|
|
67
|
+
- `borderColor`: same keys → `border-grey-100` (default), `border-background-alice-blue`, `border-background-seashell`, `border-background-pale-purple`, `border-background-white-smoke`, `border-semantic-warning-50`, `border-semantic-error-50`
|
|
68
|
+
|
|
69
|
+
All other colors (e.g. future tokens) require adding a case in both computeds and ensuring the Tailwind/semantic token exists in the design system.
|
|
70
|
+
|
|
71
|
+
#### Footer Visibility
|
|
72
|
+
|
|
73
|
+
Footer is rendered (v-if) when there is something to show and content is “alive”:
|
|
74
|
+
- Condition: `(slots.footer || atLeastOneButton) && isAlive`
|
|
75
|
+
- Visibility: `v-show="showContent"` so it hides when collapsible and collapsed
|
|
76
|
+
- When only actions exist, default footer slot renders `FzContainer` with tertiary (FzIconButton), secondary (FzButton), primary (FzButton). Custom footer replaces this entirely via `#footer`.
|
|
77
|
+
|
|
78
|
+
#### defineExpose
|
|
79
|
+
|
|
80
|
+
Only `toggleOpen` is exposed; used for programmatic expand/collapse when `collapsible` is true.
|
|
81
|
+
|
|
82
|
+
### Design Decisions
|
|
83
|
+
|
|
84
|
+
#### Why Normalize Color Instead of Removing aliceblue?
|
|
85
|
+
|
|
86
|
+
Keeping `aliceblue` in the type and normalizing to `blue` preserves backward compatibility. Consumers can migrate at their own pace while receiving a single deprecation warning. Removing it would be a breaking change.
|
|
87
|
+
|
|
88
|
+
#### Why v-if for Article/Footer and v-show for Visibility?
|
|
89
|
+
|
|
90
|
+
`v-if="isAlive"` controls whether the content block exists at all (e.g. when collapsed and not `alwaysAlive`). `v-show="showContent"` only hides the block visually when collapsible and collapsed but still “alive”. This allows optional DOM removal for performance while supporting `alwaysAlive` for stateful content that must stay mounted.
|
|
91
|
+
|
|
92
|
+
#### Why Action Warnings on Mount?
|
|
93
|
+
|
|
94
|
+
Tertiary/secondary without primary are allowed by the type system but are considered poor UX. The onMounted warnings guide consumers toward recommended usage without breaking existing code.
|
|
95
|
+
|
|
96
|
+
### Known Limitations
|
|
97
|
+
|
|
98
|
+
- **No built-in loading/error state**: Card does not provide loading or error UI; consumers can use slots or contentClass
|
|
99
|
+
- **Action order fixed**: Tertiary, secondary, primary order is not configurable via prop
|
|
100
|
+
- **Single expand state**: No accordion/group behavior; each card manages its own `isOpen`
|
package/dist/card.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as E, computed as
|
|
1
|
+
import { defineComponent as E, computed as r, createBlock as d, openBlock as n, resolveDynamicComponent as T, normalizeClass as s, withCtx as F, renderSlot as g, ref as B, onMounted as R, onUnmounted as Q, useSlots as Y, watch as q, createElementBlock as b, createCommentVNode as p, withDirectives as N, createElementVNode as w, toDisplayString as G, unref as i, withModifiers as P, vShow as $, createVNode as U } from "vue";
|
|
2
2
|
import { FzIconButton as k, FzButton as H } from "@fiscozen/button";
|
|
3
3
|
const J = /* @__PURE__ */ E({
|
|
4
4
|
__name: "FzContainer",
|
|
@@ -11,26 +11,26 @@ const J = /* @__PURE__ */ E({
|
|
|
11
11
|
layout: {}
|
|
12
12
|
},
|
|
13
13
|
setup(e) {
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
16
|
-
const o =
|
|
14
|
+
const a = e, l = r(() => a.alignItems ?? (a.horizontal ? "center" : "stretch"));
|
|
15
|
+
if (!a.horizontal && "layout" in a) {
|
|
16
|
+
const o = a.layout;
|
|
17
17
|
o && o !== "default" && console.error(
|
|
18
|
-
`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${
|
|
18
|
+
`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${a.horizontal}, layout: "${o}".`
|
|
19
19
|
);
|
|
20
20
|
}
|
|
21
|
-
const t =
|
|
22
|
-
const o =
|
|
23
|
-
|
|
24
|
-
`gap-${o}-${
|
|
25
|
-
`align-items-${
|
|
21
|
+
const t = r(() => {
|
|
22
|
+
const o = a.main ? "main-content" : "section-content", y = [
|
|
23
|
+
a.horizontal ? "fz-container--horizontal" : "fz-container--vertical",
|
|
24
|
+
`gap-${o}-${a.gap}`,
|
|
25
|
+
`align-items-${l.value}`
|
|
26
26
|
];
|
|
27
|
-
if (
|
|
28
|
-
const v = ("layout" in
|
|
27
|
+
if (a.horizontal) {
|
|
28
|
+
const v = ("layout" in a ? a.layout : void 0) || "default";
|
|
29
29
|
y.push(`layout-${v}`);
|
|
30
30
|
}
|
|
31
31
|
return y;
|
|
32
32
|
});
|
|
33
|
-
return (o, c) => (
|
|
33
|
+
return (o, c) => (n(), d(T(a.tag), {
|
|
34
34
|
class: s(["fz-container", t.value])
|
|
35
35
|
}, {
|
|
36
36
|
default: F(() => [
|
|
@@ -39,23 +39,23 @@ const J = /* @__PURE__ */ E({
|
|
|
39
39
|
_: 3
|
|
40
40
|
}, 8, ["class"]));
|
|
41
41
|
}
|
|
42
|
-
}), K = (e,
|
|
43
|
-
const
|
|
44
|
-
for (const [t, o] of
|
|
45
|
-
|
|
46
|
-
return
|
|
42
|
+
}), K = (e, a) => {
|
|
43
|
+
const l = e.__vccOpts || e;
|
|
44
|
+
for (const [t, o] of a)
|
|
45
|
+
l[t] = o;
|
|
46
|
+
return l;
|
|
47
47
|
}, X = /* @__PURE__ */ K(J, [["__scopeId", "data-v-8c40daeb"]]);
|
|
48
48
|
new DOMRect(0, 0, window.innerWidth, window.innerHeight);
|
|
49
49
|
function Z(e) {
|
|
50
|
-
const
|
|
50
|
+
const a = window.matchMedia(e), l = B(a.matches);
|
|
51
51
|
function t(o) {
|
|
52
|
-
|
|
52
|
+
l.value = o.matches;
|
|
53
53
|
}
|
|
54
54
|
return R(() => {
|
|
55
|
-
|
|
55
|
+
a.addEventListener("change", t);
|
|
56
56
|
}), Q(() => {
|
|
57
|
-
|
|
58
|
-
}),
|
|
57
|
+
a.removeEventListener("change", t);
|
|
58
|
+
}), r(() => l.value);
|
|
59
59
|
}
|
|
60
60
|
const _ = {
|
|
61
61
|
blue: {
|
|
@@ -902,36 +902,36 @@ const _ = {
|
|
|
902
902
|
"core"
|
|
903
903
|
], oe = {
|
|
904
904
|
safeColorNames: ee
|
|
905
|
-
},
|
|
905
|
+
}, ae = [
|
|
906
906
|
"error",
|
|
907
907
|
"warning",
|
|
908
908
|
"success",
|
|
909
909
|
"info"
|
|
910
|
-
],
|
|
911
|
-
semanticColorNames:
|
|
912
|
-
}, te = oe.safeColorNames,
|
|
910
|
+
], le = {
|
|
911
|
+
semanticColorNames: ae
|
|
912
|
+
}, te = oe.safeColorNames, re = le.semanticColorNames, x = {};
|
|
913
913
|
te.forEach((e) => {
|
|
914
|
-
const
|
|
915
|
-
|
|
914
|
+
const a = z.global[e];
|
|
915
|
+
a && Object.keys(a).forEach((l) => {
|
|
916
916
|
var o;
|
|
917
|
-
const t = (o = l
|
|
918
|
-
t && (x[e] || (x[e] = {}), x[e][
|
|
917
|
+
const t = (o = a[l]) == null ? void 0 : o.value;
|
|
918
|
+
t && (x[e] || (x[e] = {}), x[e][l] = t);
|
|
919
919
|
});
|
|
920
920
|
});
|
|
921
921
|
const O = z.global.semantic;
|
|
922
|
-
O &&
|
|
923
|
-
const
|
|
924
|
-
|
|
922
|
+
O && re.forEach((e) => {
|
|
923
|
+
const a = O[e];
|
|
924
|
+
a && typeof a == "object" && Object.keys(a).forEach((l) => {
|
|
925
925
|
var o;
|
|
926
|
-
const t = (o = l
|
|
926
|
+
const t = (o = a[l]) == null ? void 0 : o.value;
|
|
927
927
|
if (t) {
|
|
928
928
|
const c = `semantic-${e}`;
|
|
929
|
-
x[c] || (x[c] = {}), x[c][
|
|
929
|
+
x[c] || (x[c] = {}), x[c][l] = t;
|
|
930
930
|
}
|
|
931
931
|
});
|
|
932
932
|
});
|
|
933
|
-
const
|
|
934
|
-
(e, [
|
|
933
|
+
const ne = Object.entries(z.global.breakpoint).reduce(
|
|
934
|
+
(e, [a, l]) => (e[a] = l.value, e),
|
|
935
935
|
{}
|
|
936
936
|
), ce = ["title"], ie = { class: "flex flex-row gap-8 items-start" }, se = "border-1 border-solid rounded flex flex-col", pe = "border-solid pt-16 px-16 flex flex-row justify-between", ue = "border-solid pt-0 px-16 pb-16 flex gap-12 items-center", fe = /* @__PURE__ */ E({
|
|
937
937
|
__name: "FzCard",
|
|
@@ -949,8 +949,8 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
949
949
|
environment: { default: "frontoffice" }
|
|
950
950
|
},
|
|
951
951
|
emits: ["fzprimary:click", "fzsecondary:click", "fztertiary:click", "fzcard:click-info"],
|
|
952
|
-
setup(e, { expose:
|
|
953
|
-
const t = Z(`(max-width: ${
|
|
952
|
+
setup(e, { expose: a, emit: l }) {
|
|
953
|
+
const t = Z(`(max-width: ${ne.sm})`), o = e, c = l, y = Y(), v = B(o.defaultExpanded ?? !1);
|
|
954
954
|
q(
|
|
955
955
|
() => o.color === "aliceblue",
|
|
956
956
|
(f) => {
|
|
@@ -960,11 +960,11 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
960
960
|
},
|
|
961
961
|
{ immediate: !0 }
|
|
962
962
|
);
|
|
963
|
-
const C =
|
|
963
|
+
const C = r(() => o.color === "aliceblue" ? "blue" : o.color), m = r(() => v.value || !o.collapsible), S = r(() => o.alwaysAlive || m.value), I = r(
|
|
964
964
|
() => o.title || y.header || y["header-content"]
|
|
965
|
-
), W =
|
|
965
|
+
), W = r(() => [
|
|
966
966
|
o.collapsible ? "cursor-pointer" : ""
|
|
967
|
-
]), j =
|
|
967
|
+
]), j = r(() => o.environment === "backoffice" ? "py-2" : "py-8"), M = r(() => {
|
|
968
968
|
switch (C.value) {
|
|
969
969
|
case "blue":
|
|
970
970
|
return "bg-background-alice-blue";
|
|
@@ -974,10 +974,14 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
974
974
|
return "bg-background-pale-purple";
|
|
975
975
|
case "grey":
|
|
976
976
|
return "bg-background-white-smoke";
|
|
977
|
+
case "yellow":
|
|
978
|
+
return "bg-semantic-warning-50";
|
|
979
|
+
case "red":
|
|
980
|
+
return "bg-semantic-error-50";
|
|
977
981
|
default:
|
|
978
982
|
return "bg-core-white";
|
|
979
983
|
}
|
|
980
|
-
}), D =
|
|
984
|
+
}), D = r(() => "text-core-black"), L = r(() => {
|
|
981
985
|
switch (C.value) {
|
|
982
986
|
case "blue":
|
|
983
987
|
return "border-background-alice-blue";
|
|
@@ -987,10 +991,14 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
987
991
|
return "border-background-pale-purple";
|
|
988
992
|
case "grey":
|
|
989
993
|
return "border-background-white-smoke";
|
|
994
|
+
case "yellow":
|
|
995
|
+
return "border-semantic-warning-50";
|
|
996
|
+
case "red":
|
|
997
|
+
return "border-semantic-error-50";
|
|
990
998
|
default:
|
|
991
999
|
return "border-grey-100";
|
|
992
1000
|
}
|
|
993
|
-
}), V =
|
|
1001
|
+
}), V = r(
|
|
994
1002
|
() => o.primaryAction !== void 0 || o.secondaryAction !== void 0 || o.tertiaryAction !== void 0
|
|
995
1003
|
);
|
|
996
1004
|
function A() {
|
|
@@ -1002,15 +1010,21 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1002
1010
|
) : o.secondaryAction && !o.primaryAction && console.warn(
|
|
1003
1011
|
"[Fiscozen Design System]: You should set primaryAction if you want to set secondaryAction"
|
|
1004
1012
|
);
|
|
1005
|
-
}),
|
|
1013
|
+
}), a({
|
|
1006
1014
|
/**
|
|
1007
1015
|
* Method to toggle the card open/closed state
|
|
1008
1016
|
*/
|
|
1009
1017
|
toggleOpen: A
|
|
1010
|
-
}), (f, u) => (
|
|
1011
|
-
class: s([
|
|
1018
|
+
}), (f, u) => (n(), b("section", {
|
|
1019
|
+
class: s([
|
|
1020
|
+
se,
|
|
1021
|
+
M.value,
|
|
1022
|
+
D.value,
|
|
1023
|
+
L.value,
|
|
1024
|
+
{ "pb-16": !m.value }
|
|
1025
|
+
])
|
|
1012
1026
|
}, [
|
|
1013
|
-
I.value ? (
|
|
1027
|
+
I.value ? (n(), b("header", {
|
|
1014
1028
|
key: 0,
|
|
1015
1029
|
class: s([W.value]),
|
|
1016
1030
|
onClick: A
|
|
@@ -1021,7 +1035,7 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1021
1035
|
w("div", {
|
|
1022
1036
|
class: s(["flex flex-row gap-12 items-start", j.value])
|
|
1023
1037
|
}, [
|
|
1024
|
-
e.title ? (
|
|
1038
|
+
e.title ? (n(), b("h2", {
|
|
1025
1039
|
key: 0,
|
|
1026
1040
|
class: "text-core-black font-medium text-xl m-0 p-0 break-words overflow-wrap-anywhere min-w-0 flex-shrink",
|
|
1027
1041
|
title: e.title
|
|
@@ -1029,14 +1043,14 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1029
1043
|
g(f.$slots, "header")
|
|
1030
1044
|
], 2),
|
|
1031
1045
|
w("div", ie, [
|
|
1032
|
-
e.hasInfoIcon ? (
|
|
1046
|
+
e.hasInfoIcon ? (n(), d(i(k), {
|
|
1033
1047
|
key: 0,
|
|
1034
1048
|
iconName: "circle-question",
|
|
1035
1049
|
variant: "invisible",
|
|
1036
1050
|
environment: e.environment,
|
|
1037
1051
|
onClick: u[0] || (u[0] = P((h) => c("fzcard:click-info"), ["stop"]))
|
|
1038
1052
|
}, null, 8, ["environment"])) : p("", !0),
|
|
1039
|
-
e.collapsible ? (
|
|
1053
|
+
e.collapsible ? (n(), d(i(k), {
|
|
1040
1054
|
key: 1,
|
|
1041
1055
|
iconName: v.value ? "chevron-up" : "chevron-down",
|
|
1042
1056
|
variant: "invisible",
|
|
@@ -1046,7 +1060,7 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1046
1060
|
]),
|
|
1047
1061
|
g(f.$slots, "header-content")
|
|
1048
1062
|
], 2)) : p("", !0),
|
|
1049
|
-
S.value ? N((
|
|
1063
|
+
S.value ? N((n(), b("article", {
|
|
1050
1064
|
key: 1,
|
|
1051
1065
|
class: s(["p-16", e.contentClass])
|
|
1052
1066
|
}, [
|
|
@@ -1054,7 +1068,7 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1054
1068
|
], 2)), [
|
|
1055
1069
|
[$, m.value]
|
|
1056
1070
|
]) : p("", !0),
|
|
1057
|
-
(y.footer || V.value) && S.value ? N((
|
|
1071
|
+
(y.footer || V.value) && S.value ? N((n(), b("footer", {
|
|
1058
1072
|
key: 2,
|
|
1059
1073
|
class: s([ue, { "justify-end": !i(t) }])
|
|
1060
1074
|
}, [
|
|
@@ -1065,7 +1079,7 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1065
1079
|
class: s({ "w-full": i(t) })
|
|
1066
1080
|
}, {
|
|
1067
1081
|
default: F(() => [
|
|
1068
|
-
e.tertiaryAction ? (
|
|
1082
|
+
e.tertiaryAction ? (n(), d(i(k), {
|
|
1069
1083
|
key: 0,
|
|
1070
1084
|
onClick: u[1] || (u[1] = (h) => c("fztertiary:click")),
|
|
1071
1085
|
iconName: e.tertiaryAction.icon,
|
|
@@ -1073,7 +1087,7 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1073
1087
|
environment: e.environment,
|
|
1074
1088
|
disabled: e.tertiaryAction.disabled
|
|
1075
1089
|
}, null, 8, ["iconName", "environment", "disabled"])) : p("", !0),
|
|
1076
|
-
e.secondaryAction ? (
|
|
1090
|
+
e.secondaryAction ? (n(), d(i(H), {
|
|
1077
1091
|
key: 1,
|
|
1078
1092
|
class: s({ "flex-grow": i(t) }),
|
|
1079
1093
|
onClick: u[2] || (u[2] = (h) => c("fzsecondary:click")),
|
|
@@ -1082,7 +1096,7 @@ const re = Object.entries(z.global.breakpoint).reduce(
|
|
|
1082
1096
|
environment: e.environment,
|
|
1083
1097
|
disabled: e.secondaryAction.disabled
|
|
1084
1098
|
}, null, 8, ["class", "label", "environment", "disabled"])) : p("", !0),
|
|
1085
|
-
e.primaryAction ? (
|
|
1099
|
+
e.primaryAction ? (n(), d(i(H), {
|
|
1086
1100
|
key: 2,
|
|
1087
1101
|
class: s({ "flex-grow": i(t) }),
|
|
1088
1102
|
onClick: u[3] || (u[3] = (h) => c("fzprimary:click")),
|
package/dist/card.umd.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@fiscozen/button")):typeof define=="function"&&define.amd?define(["exports","vue","@fiscozen/button"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c.FzCard={},c.Vue,c.button))})(this,function(c,e,d){"use strict";const k=((o,l)=>{const a=o.__vccOpts||o;for(const[n,t]of l)a[n]=t;return a})(e.defineComponent({__name:"FzContainer",props:{main:{type:Boolean,default:!1},gap:{default:"base"},tag:{default:"div"},alignItems:{default:void 0},horizontal:{type:Boolean,default:!1},layout:{}},setup(o){const l=o,a=e.computed(()=>l.alignItems??(l.horizontal?"center":"stretch"));if(!l.horizontal&&"layout"in l){const t=l.layout;t&&t!=="default"&&console.error(`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${l.horizontal}, layout: "${t}".`)}const n=e.computed(()=>{const t=l.main?"main-content":"section-content",p=[l.horizontal?"fz-container--horizontal":"fz-container--vertical",`gap-${t}-${l.gap}`,`align-items-${a.value}`];if(l.horizontal){const u=("layout"in l?l.layout:void 0)||"default";p.push(`layout-${u}`)}return p});return(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.tag),{class:e.normalizeClass(["fz-container",n.value])},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-8c40daeb"]]);new DOMRect(0,0,window.innerWidth,window.innerHeight);function w(o){const l=window.matchMedia(o),a=e.ref(l.matches);function n(t){a.value=t.matches}return e.onMounted(()=>{l.addEventListener("change",n)}),e.onUnmounted(()=>{l.removeEventListener("change",n)}),e.computed(()=>a.value)}const v={global:{blue:{50:{value:"#eff1ff",type:"color"},100:{value:"#dee2ff",type:"color"},200:{value:"#bdc5ff",type:"color"},300:{value:"#9ca8ff",type:"color"},400:{value:"#7b8bff",type:"color"},500:{value:"#5a6eff",type:"color"},600:{value:"#4858cc",type:"color"},700:{value:"#364299",type:"color"},800:{value:"#242c66",type:"color"},900:{value:"#1b214c",type:"color"}},purple:{50:{value:"#f8f4ff",type:"color"},100:{value:"#f0e9ff",type:"color"},200:{value:"#e1d3ff",type:"color"},300:{value:"#d2bdff",type:"color"},400:{value:"#c3a7ff",type:"color"},500:{value:"#b491ff",type:"color"},600:{value:"#9074cc",type:"color"},700:{value:"#6c5799",type:"color"},800:{value:"#483a66",type:"color"},900:{value:"#241d33",type:"color"}},orange:{50:{value:"#fff2ef",type:"color"},100:{value:"#ffe4de",type:"color"},200:{value:"#ffc9bd",type:"color"},300:{value:"#ffae9c",type:"color"},400:{value:"#ff937b",type:"color"},500:{value:"#ff785a",type:"color"},600:{value:"#cc6048",type:"color"},700:{value:"#994836",type:"color"},800:{value:"#663024",type:"color"},900:{value:"#331812",type:"color"}},pink:{50:{value:"#fff5f5",type:"color"},100:{value:"#ffe0e0",type:"color"},200:{value:"#ffcbcb",type:"color"},300:{value:"#ffc0c0",type:"color"},400:{value:"#ffabab",type:"color"},500:{value:"#ff9696",type:"color"},600:{value:"#cc7878",type:"color"},700:{value:"#995a5a",type:"color"},800:{value:"#663c3c",type:"color"},900:{value:"#331e1e",type:"color"}},yellow:{50:{value:"#fffbf4",type:"color"},100:{value:"#fff3de",type:"color"},200:{value:"#ffebc8",type:"color"},300:{value:"#ffe7bd",type:"color"},400:{value:"#ffdfa7",type:"color"},500:{value:"#ffd791",type:"color"},600:{value:"#ccac74",type:"color"},700:{value:"#998157",type:"color"},800:{value:"#806c49",type:"color"},900:{value:"#4c402b",type:"color"}},semantic:{error:{50:{value:"#fef3f3",type:"color"},100:{value:"#f8baba",type:"color"},200:{value:"#f04242",type:"color"},300:{value:"#aa2f2f",type:"color"}},warning:{50:{value:"#fff8f3",type:"color"},100:{value:"#ffdabd",type:"color"},200:{value:"#ffae4f",type:"color"},300:{value:"#b47b38",type:"color"}},success:{50:{value:"#f2f8f6",type:"color"},100:{value:"#b5d8ce",type:"color"},200:{value:"#0fa88c",type:"color"},300:{value:"#0b7763",type:"color"}},info:{50:{value:"#f3f7ff",type:"color"},100:{value:"#b4c8e1",type:"color"},200:{value:"#4e9fff",type:"color"},300:{value:"#3770b4",type:"color"}}},background:{"white-smoke":{value:"#f7f6f3",type:"color"},seashell:{value:"#f8ece7",type:"color"},"pale-purple":{value:"#f2e6ff",type:"color"},"alice-blue":{value:"#ecf2fc",type:"color"}},grey:{100:{value:"#e9edf0",type:"color"},200:{value:"#d1dde6",type:"color"},300:{value:"#9da9b2",type:"color"},400:{value:"#6e777e",type:"color"},500:{value:"#596167",type:"color"}},core:{white:{value:"#ffffff",type:"color"},black:{value:"#2c282f",type:"color"}},"font-sans":{"sharp-grotesk":{value:'"Sharp Grotesk", sans-serif',type:"fontFamilies"},inter:{value:'"Inter", sans-serif',type:"fontFamilies"}},font:{light:{value:"300",type:"fontWeights"},normal:{value:"400",type:"fontWeights"},medium:{value:"500",type:"fontWeights"}},spacing:{0:{value:"0px",type:"spacing"},1:{value:"1px",type:"spacing"},2:{value:"2px",type:"spacing"},4:{value:"4px",type:"spacing"},6:{value:"6px",type:"spacing"},8:{value:"8px",type:"spacing"},10:{value:"10px",type:"spacing"},12:{value:"12px",type:"spacing"},14:{value:"14px",type:"spacing"},16:{value:"16px",type:"spacing"},20:{value:"20px",type:"spacing"},24:{value:"24px",type:"spacing"},28:{value:"28px",type:"spacing"},32:{value:"32px",type:"spacing"},36:{value:"36px",type:"spacing"},40:{value:"40px",type:"spacing"},44:{value:"44px",type:"spacing"},48:{value:"48px",type:"spacing"},56:{value:"56px",type:"spacing"},64:{value:"64px",type:"spacing"},80:{value:"80px",type:"spacing"},96:{value:"96px",type:"spacing"},112:{value:"112px",type:"spacing"},128:{value:"128px",type:"spacing"},144:{value:"144px",type:"spacing"},160:{value:"160px",type:"spacing"},176:{value:"176px",type:"spacing"},192:{value:"192px",type:"spacing"},208:{value:"208px",type:"spacing"},224:{value:"224px",type:"spacing"},240:{value:"240px",type:"spacing"},256:{value:"256px",type:"spacing"},288:{value:"288px",type:"spacing"},320:{value:"320px",type:"spacing"},384:{value:"384px",type:"spacing"}},border:{0:{value:"0px",type:"borderWidth"},1:{value:"1px",type:"borderWidth"},2:{value:"2px",type:"borderWidth"},4:{value:"4px",type:"borderWidth"},8:{value:"8px",type:"borderWidth"}},rounded:{none:{value:"0px",type:"borderRadius"},sm:{value:"2px",type:"borderRadius"},base:{value:"4px",type:"borderRadius"},md:{value:"6px",type:"borderRadius"},lg:{value:"8px",type:"borderRadius"},xl:{value:"12px",type:"borderRadius"},"2xl":{value:"16px",type:"borderRadius"},"3xl":{value:"24px",type:"borderRadius"},full:{value:"9999px",type:"borderRadius"}},breakpoint:{xs:{value:"376px",type:"sizing"},sm:{value:"640px",type:"sizing"},md:{value:"768px",type:"sizing"},lg:{value:"1024px",type:"sizing"},xl:{value:"1280px",type:"sizing"},"2xl":{value:"1440px",type:"sizing"},"3xl":{value:"1536px",type:"sizing"}},shadow:{none:{value:{color:"#000000",type:"dropShadow",x:"0",y:"0",blur:"0",spread:"0"},type:"boxShadow"},sm:{value:{color:"#0000000d",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},type:"boxShadow"},base:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},{color:"#0000001a",type:"dropShadow",x:"0",y:"1",blur:"3",spread:"0"}],type:"boxShadow"},md:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"2",blur:"4",spread:"-1"},{color:"#0000001a",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-1"}],type:"boxShadow"},lg:{value:[{color:"#0000000d",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-2"},{color:"#0000001a",type:"dropShadow",x:"0",y:"10",blur:"15",spread:"-3"}],type:"boxShadow"},xl:{value:[{color:"#0000000a",type:"dropShadow",x:"0",y:"10",blur:"10",spread:"-5"},{color:"#0000001a",type:"dropShadow",x:"0",y:"20",blur:"25",spread:"-5"}],type:"boxShadow"},"2xl":{value:{color:"#00000040",type:"dropShadow",x:"0",y:"25",blur:"50",spread:"-12"},type:"boxShadow"},inner:{value:{color:"#0000000f",type:"innerShadow",x:"0",y:"2",blur:"4",spread:"0"},type:"boxShadow"}},underline:{value:"underline",type:"textDecoration"},text:{xs:{value:"12px",type:"fontSizes"},sm:{value:"14px",type:"fontSizes"},base:{value:"16px",type:"fontSizes"},lg:{value:"18px",type:"fontSizes"},xl:{value:"20px",type:"fontSizes"},"2xl":{value:"24px",type:"fontSizes"},"3xl":{value:"30px",type:"fontSizes"},"4xl":{value:"36px",type:"fontSizes"},"5xl":{value:"48px",type:"fontSizes"},"6xl":{value:"60px",type:"fontSizes"},"7xl":{value:"72px",type:"fontSizes"},"8xl":{value:"96px",type:"fontSizes"},"9xl":{value:"128px",type:"fontSizes"}},leading:{xs:{value:"16px",type:"lineHeights"},sm:{value:"18px",type:"lineHeights"},base:{value:"20px",type:"lineHeights"},lg:{value:"24px",type:"lineHeights"},xl:{value:"28px",type:"lineHeights"},"2xl":{value:"32px",type:"lineHeights"},"3xl":{value:"36px",type:"lineHeights"},"4xl":{value:"40px",type:"lineHeights"},"5xl":{value:"48px",type:"lineHeights"},"6xl":{value:"60px",type:"lineHeights"},"7xl":{value:"72px",type:"lineHeights"},"8xl":{value:"96px",type:"lineHeights"},"9xl":{value:"128px",type:"lineHeights"}}}},C={safeColorNames:["blue","purple","orange","pink","yellow","grey","core"]},z={semanticColorNames:["error","warning","success","info"]},S=C.safeColorNames,B=z.semanticColorNames,s={};S.forEach(o=>{const l=v.global[o];l&&Object.keys(l).forEach(a=>{var t;const n=(t=l[a])==null?void 0:t.value;n&&(s[o]||(s[o]={}),s[o][a]=n)})});const x=v.global.semantic;x&&B.forEach(o=>{const l=x[o];l&&typeof l=="object"&&Object.keys(l).forEach(a=>{var t;const n=(t=l[a])==null?void 0:t.value;if(n){const r=`semantic-${o}`;s[r]||(s[r]={}),s[r][a]=n}})});const A=Object.entries(v.global.breakpoint).reduce((o,[l,a])=>(o[l]=a.value,o),{}),N=["title"],E={class:"flex flex-row gap-8 items-start"},$="border-1 border-solid rounded flex flex-col",F="border-solid pt-16 px-16 flex flex-row justify-between",V="border-solid pt-0 px-16 pb-16 flex gap-12 items-center",O=e.defineComponent({__name:"FzCard",props:{title:{},color:{},primaryAction:{},secondaryAction:{},tertiaryAction:{},contentClass:{},collapsible:{type:Boolean},defaultExpanded:{type:Boolean},alwaysAlive:{type:Boolean},hasInfoIcon:{type:Boolean},environment:{default:"frontoffice"}},emits:["fzprimary:click","fzsecondary:click","fztertiary:click","fzcard:click-info"],setup(o,{expose:l,emit:a}){const n=w(`(max-width: ${A.sm})`),t=o,r=a,p=e.useSlots(),u=e.ref(t.defaultExpanded??!1);e.watch(()=>t.color==="aliceblue",y=>{y&&console.warn("[FzCard] The color prop value 'aliceblue' is deprecated and will be removed in a future version. Please use 'blue' instead. The component will automatically map 'aliceblue' to 'blue' for now.")},{immediate:!0});const b=e.computed(()=>t.color==="aliceblue"?"blue":t.color),f=e.computed(()=>u.value||!t.collapsible),g=e.computed(()=>t.alwaysAlive||f.value),H=e.computed(()=>t.title||p.header||p["header-content"]),I=e.computed(()=>[t.collapsible?"cursor-pointer":""]),R=e.computed(()=>t.environment==="backoffice"?"py-2":"py-8"),j=e.computed(()=>{switch(b.value){case"blue":return"bg-background-alice-blue";case"orange":return"bg-background-seashell";case"purple":return"bg-background-pale-purple";case"grey":return"bg-background-white-smoke";default:return"bg-core-white"}}),M=e.computed(()=>"text-core-black"),W=e.computed(()=>{switch(b.value){case"blue":return"border-background-alice-blue";case"orange":return"border-background-seashell";case"purple":return"border-background-pale-purple";case"grey":return"border-background-white-smoke";default:return"border-grey-100"}}),D=e.computed(()=>t.primaryAction!==void 0||t.secondaryAction!==void 0||t.tertiaryAction!==void 0);function h(){t.collapsible&&(u.value=!u.value)}return e.onMounted(()=>{t.tertiaryAction&&!t.secondaryAction&&!t.primaryAction?console.warn("[Fiscozen Design System]: You should set primaryAction and secondaryAction if you want to set tertiaryAction"):t.secondaryAction&&!t.primaryAction&&console.warn("[Fiscozen Design System]: You should set primaryAction if you want to set secondaryAction")}),l({toggleOpen:h}),(y,i)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass([$,j.value,M.value,W.value,{"pb-16":!f.value}])},[H.value?(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass([I.value]),onClick:h},[e.createElementVNode("div",{class:e.normalizeClass(F)},[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-row gap-12 items-start",R.value])},[o.title?(e.openBlock(),e.createElementBlock("h2",{key:0,class:"text-core-black font-medium text-xl m-0 p-0 break-words overflow-wrap-anywhere min-w-0 flex-shrink",title:o.title},e.toDisplayString(o.title),9,N)):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"header")],2),e.createElementVNode("div",E,[o.hasInfoIcon?(e.openBlock(),e.createBlock(e.unref(d.FzIconButton),{key:0,iconName:"circle-question",variant:"invisible",environment:o.environment,onClick:i[0]||(i[0]=e.withModifiers(m=>r("fzcard:click-info"),["stop"]))},null,8,["environment"])):e.createCommentVNode("",!0),o.collapsible?(e.openBlock(),e.createBlock(e.unref(d.FzIconButton),{key:1,iconName:u.value?"chevron-up":"chevron-down",variant:"invisible",environment:o.environment},null,8,["iconName","environment"])):e.createCommentVNode("",!0)])]),e.renderSlot(y.$slots,"header-content")],2)):e.createCommentVNode("",!0),g.value?e.withDirectives((e.openBlock(),e.createElementBlock("article",{key:1,class:e.normalizeClass(["p-16",o.contentClass])},[e.renderSlot(y.$slots,"default")],2)),[[e.vShow,f.value]]):e.createCommentVNode("",!0),(p.footer||D.value)&&g.value?e.withDirectives((e.openBlock(),e.createElementBlock("footer",{key:2,class:e.normalizeClass([V,{"justify-end":!e.unref(n)}])},[e.renderSlot(y.$slots,"footer",{},()=>[e.createVNode(e.unref(k),{horizontal:"",gap:"sm",class:e.normalizeClass({"w-full":e.unref(n)})},{default:e.withCtx(()=>[o.tertiaryAction?(e.openBlock(),e.createBlock(e.unref(d.FzIconButton),{key:0,onClick:i[1]||(i[1]=m=>r("fztertiary:click")),iconName:o.tertiaryAction.icon,variant:"invisible",environment:o.environment,disabled:o.tertiaryAction.disabled},null,8,["iconName","environment","disabled"])):e.createCommentVNode("",!0),o.secondaryAction?(e.openBlock(),e.createBlock(e.unref(d.FzButton),{key:1,class:e.normalizeClass({"flex-grow":e.unref(n)}),onClick:i[2]||(i[2]=m=>r("fzsecondary:click")),label:o.secondaryAction.label,variant:"secondary",environment:o.environment,disabled:o.secondaryAction.disabled},null,8,["class","label","environment","disabled"])):e.createCommentVNode("",!0),o.primaryAction?(e.openBlock(),e.createBlock(e.unref(d.FzButton),{key:2,class:e.normalizeClass({"flex-grow":e.unref(n)}),onClick:i[3]||(i[3]=m=>r("fzprimary:click")),label:o.primaryAction.label,variant:"primary",environment:o.environment,disabled:o.primaryAction.disabled},null,8,["class","label","environment","disabled"])):e.createCommentVNode("",!0)]),_:1},8,["class"])])],2)),[[e.vShow,f.value]]):e.createCommentVNode("",!0)],2))}});c.FzCard=O,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(c,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("@fiscozen/button")):typeof define=="function"&&define.amd?define(["exports","vue","@fiscozen/button"],e):(c=typeof globalThis<"u"?globalThis:c||self,e(c.FzCard={},c.Vue,c.button))})(this,function(c,e,d){"use strict";const w=((o,l)=>{const a=o.__vccOpts||o;for(const[n,t]of l)a[n]=t;return a})(e.defineComponent({__name:"FzContainer",props:{main:{type:Boolean,default:!1},gap:{default:"base"},tag:{default:"div"},alignItems:{default:void 0},horizontal:{type:Boolean,default:!1},layout:{}},setup(o){const l=o,a=e.computed(()=>l.alignItems??(l.horizontal?"center":"stretch"));if(!l.horizontal&&"layout"in l){const t=l.layout;t&&t!=="default"&&console.error(`[FzContainer] The "layout" prop only works when horizontal is true. Current horizontal: ${l.horizontal}, layout: "${t}".`)}const n=e.computed(()=>{const t=l.main?"main-content":"section-content",p=[l.horizontal?"fz-container--horizontal":"fz-container--vertical",`gap-${t}-${l.gap}`,`align-items-${a.value}`];if(l.horizontal){const u=("layout"in l?l.layout:void 0)||"default";p.push(`layout-${u}`)}return p});return(t,r)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.tag),{class:e.normalizeClass(["fz-container",n.value])},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},void 0,!0)]),_:3},8,["class"]))}}),[["__scopeId","data-v-8c40daeb"]]);new DOMRect(0,0,window.innerWidth,window.innerHeight);function k(o){const l=window.matchMedia(o),a=e.ref(l.matches);function n(t){a.value=t.matches}return e.onMounted(()=>{l.addEventListener("change",n)}),e.onUnmounted(()=>{l.removeEventListener("change",n)}),e.computed(()=>a.value)}const m={global:{blue:{50:{value:"#eff1ff",type:"color"},100:{value:"#dee2ff",type:"color"},200:{value:"#bdc5ff",type:"color"},300:{value:"#9ca8ff",type:"color"},400:{value:"#7b8bff",type:"color"},500:{value:"#5a6eff",type:"color"},600:{value:"#4858cc",type:"color"},700:{value:"#364299",type:"color"},800:{value:"#242c66",type:"color"},900:{value:"#1b214c",type:"color"}},purple:{50:{value:"#f8f4ff",type:"color"},100:{value:"#f0e9ff",type:"color"},200:{value:"#e1d3ff",type:"color"},300:{value:"#d2bdff",type:"color"},400:{value:"#c3a7ff",type:"color"},500:{value:"#b491ff",type:"color"},600:{value:"#9074cc",type:"color"},700:{value:"#6c5799",type:"color"},800:{value:"#483a66",type:"color"},900:{value:"#241d33",type:"color"}},orange:{50:{value:"#fff2ef",type:"color"},100:{value:"#ffe4de",type:"color"},200:{value:"#ffc9bd",type:"color"},300:{value:"#ffae9c",type:"color"},400:{value:"#ff937b",type:"color"},500:{value:"#ff785a",type:"color"},600:{value:"#cc6048",type:"color"},700:{value:"#994836",type:"color"},800:{value:"#663024",type:"color"},900:{value:"#331812",type:"color"}},pink:{50:{value:"#fff5f5",type:"color"},100:{value:"#ffe0e0",type:"color"},200:{value:"#ffcbcb",type:"color"},300:{value:"#ffc0c0",type:"color"},400:{value:"#ffabab",type:"color"},500:{value:"#ff9696",type:"color"},600:{value:"#cc7878",type:"color"},700:{value:"#995a5a",type:"color"},800:{value:"#663c3c",type:"color"},900:{value:"#331e1e",type:"color"}},yellow:{50:{value:"#fffbf4",type:"color"},100:{value:"#fff3de",type:"color"},200:{value:"#ffebc8",type:"color"},300:{value:"#ffe7bd",type:"color"},400:{value:"#ffdfa7",type:"color"},500:{value:"#ffd791",type:"color"},600:{value:"#ccac74",type:"color"},700:{value:"#998157",type:"color"},800:{value:"#806c49",type:"color"},900:{value:"#4c402b",type:"color"}},semantic:{error:{50:{value:"#fef3f3",type:"color"},100:{value:"#f8baba",type:"color"},200:{value:"#f04242",type:"color"},300:{value:"#aa2f2f",type:"color"}},warning:{50:{value:"#fff8f3",type:"color"},100:{value:"#ffdabd",type:"color"},200:{value:"#ffae4f",type:"color"},300:{value:"#b47b38",type:"color"}},success:{50:{value:"#f2f8f6",type:"color"},100:{value:"#b5d8ce",type:"color"},200:{value:"#0fa88c",type:"color"},300:{value:"#0b7763",type:"color"}},info:{50:{value:"#f3f7ff",type:"color"},100:{value:"#b4c8e1",type:"color"},200:{value:"#4e9fff",type:"color"},300:{value:"#3770b4",type:"color"}}},background:{"white-smoke":{value:"#f7f6f3",type:"color"},seashell:{value:"#f8ece7",type:"color"},"pale-purple":{value:"#f2e6ff",type:"color"},"alice-blue":{value:"#ecf2fc",type:"color"}},grey:{100:{value:"#e9edf0",type:"color"},200:{value:"#d1dde6",type:"color"},300:{value:"#9da9b2",type:"color"},400:{value:"#6e777e",type:"color"},500:{value:"#596167",type:"color"}},core:{white:{value:"#ffffff",type:"color"},black:{value:"#2c282f",type:"color"}},"font-sans":{"sharp-grotesk":{value:'"Sharp Grotesk", sans-serif',type:"fontFamilies"},inter:{value:'"Inter", sans-serif',type:"fontFamilies"}},font:{light:{value:"300",type:"fontWeights"},normal:{value:"400",type:"fontWeights"},medium:{value:"500",type:"fontWeights"}},spacing:{0:{value:"0px",type:"spacing"},1:{value:"1px",type:"spacing"},2:{value:"2px",type:"spacing"},4:{value:"4px",type:"spacing"},6:{value:"6px",type:"spacing"},8:{value:"8px",type:"spacing"},10:{value:"10px",type:"spacing"},12:{value:"12px",type:"spacing"},14:{value:"14px",type:"spacing"},16:{value:"16px",type:"spacing"},20:{value:"20px",type:"spacing"},24:{value:"24px",type:"spacing"},28:{value:"28px",type:"spacing"},32:{value:"32px",type:"spacing"},36:{value:"36px",type:"spacing"},40:{value:"40px",type:"spacing"},44:{value:"44px",type:"spacing"},48:{value:"48px",type:"spacing"},56:{value:"56px",type:"spacing"},64:{value:"64px",type:"spacing"},80:{value:"80px",type:"spacing"},96:{value:"96px",type:"spacing"},112:{value:"112px",type:"spacing"},128:{value:"128px",type:"spacing"},144:{value:"144px",type:"spacing"},160:{value:"160px",type:"spacing"},176:{value:"176px",type:"spacing"},192:{value:"192px",type:"spacing"},208:{value:"208px",type:"spacing"},224:{value:"224px",type:"spacing"},240:{value:"240px",type:"spacing"},256:{value:"256px",type:"spacing"},288:{value:"288px",type:"spacing"},320:{value:"320px",type:"spacing"},384:{value:"384px",type:"spacing"}},border:{0:{value:"0px",type:"borderWidth"},1:{value:"1px",type:"borderWidth"},2:{value:"2px",type:"borderWidth"},4:{value:"4px",type:"borderWidth"},8:{value:"8px",type:"borderWidth"}},rounded:{none:{value:"0px",type:"borderRadius"},sm:{value:"2px",type:"borderRadius"},base:{value:"4px",type:"borderRadius"},md:{value:"6px",type:"borderRadius"},lg:{value:"8px",type:"borderRadius"},xl:{value:"12px",type:"borderRadius"},"2xl":{value:"16px",type:"borderRadius"},"3xl":{value:"24px",type:"borderRadius"},full:{value:"9999px",type:"borderRadius"}},breakpoint:{xs:{value:"376px",type:"sizing"},sm:{value:"640px",type:"sizing"},md:{value:"768px",type:"sizing"},lg:{value:"1024px",type:"sizing"},xl:{value:"1280px",type:"sizing"},"2xl":{value:"1440px",type:"sizing"},"3xl":{value:"1536px",type:"sizing"}},shadow:{none:{value:{color:"#000000",type:"dropShadow",x:"0",y:"0",blur:"0",spread:"0"},type:"boxShadow"},sm:{value:{color:"#0000000d",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},type:"boxShadow"},base:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"1",blur:"2",spread:"0"},{color:"#0000001a",type:"dropShadow",x:"0",y:"1",blur:"3",spread:"0"}],type:"boxShadow"},md:{value:[{color:"#0000000f",type:"dropShadow",x:"0",y:"2",blur:"4",spread:"-1"},{color:"#0000001a",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-1"}],type:"boxShadow"},lg:{value:[{color:"#0000000d",type:"dropShadow",x:"0",y:"4",blur:"6",spread:"-2"},{color:"#0000001a",type:"dropShadow",x:"0",y:"10",blur:"15",spread:"-3"}],type:"boxShadow"},xl:{value:[{color:"#0000000a",type:"dropShadow",x:"0",y:"10",blur:"10",spread:"-5"},{color:"#0000001a",type:"dropShadow",x:"0",y:"20",blur:"25",spread:"-5"}],type:"boxShadow"},"2xl":{value:{color:"#00000040",type:"dropShadow",x:"0",y:"25",blur:"50",spread:"-12"},type:"boxShadow"},inner:{value:{color:"#0000000f",type:"innerShadow",x:"0",y:"2",blur:"4",spread:"0"},type:"boxShadow"}},underline:{value:"underline",type:"textDecoration"},text:{xs:{value:"12px",type:"fontSizes"},sm:{value:"14px",type:"fontSizes"},base:{value:"16px",type:"fontSizes"},lg:{value:"18px",type:"fontSizes"},xl:{value:"20px",type:"fontSizes"},"2xl":{value:"24px",type:"fontSizes"},"3xl":{value:"30px",type:"fontSizes"},"4xl":{value:"36px",type:"fontSizes"},"5xl":{value:"48px",type:"fontSizes"},"6xl":{value:"60px",type:"fontSizes"},"7xl":{value:"72px",type:"fontSizes"},"8xl":{value:"96px",type:"fontSizes"},"9xl":{value:"128px",type:"fontSizes"}},leading:{xs:{value:"16px",type:"lineHeights"},sm:{value:"18px",type:"lineHeights"},base:{value:"20px",type:"lineHeights"},lg:{value:"24px",type:"lineHeights"},xl:{value:"28px",type:"lineHeights"},"2xl":{value:"32px",type:"lineHeights"},"3xl":{value:"36px",type:"lineHeights"},"4xl":{value:"40px",type:"lineHeights"},"5xl":{value:"48px",type:"lineHeights"},"6xl":{value:"60px",type:"lineHeights"},"7xl":{value:"72px",type:"lineHeights"},"8xl":{value:"96px",type:"lineHeights"},"9xl":{value:"128px",type:"lineHeights"}}}},C={safeColorNames:["blue","purple","orange","pink","yellow","grey","core"]},z={semanticColorNames:["error","warning","success","info"]},S=C.safeColorNames,B=z.semanticColorNames,s={};S.forEach(o=>{const l=m.global[o];l&&Object.keys(l).forEach(a=>{var t;const n=(t=l[a])==null?void 0:t.value;n&&(s[o]||(s[o]={}),s[o][a]=n)})});const x=m.global.semantic;x&&B.forEach(o=>{const l=x[o];l&&typeof l=="object"&&Object.keys(l).forEach(a=>{var t;const n=(t=l[a])==null?void 0:t.value;if(n){const r=`semantic-${o}`;s[r]||(s[r]={}),s[r][a]=n}})});const A=Object.entries(m.global.breakpoint).reduce((o,[l,a])=>(o[l]=a.value,o),{}),N=["title"],E={class:"flex flex-row gap-8 items-start"},$="border-1 border-solid rounded flex flex-col",F="border-solid pt-16 px-16 flex flex-row justify-between",V="border-solid pt-0 px-16 pb-16 flex gap-12 items-center",O=e.defineComponent({__name:"FzCard",props:{title:{},color:{},primaryAction:{},secondaryAction:{},tertiaryAction:{},contentClass:{},collapsible:{type:Boolean},defaultExpanded:{type:Boolean},alwaysAlive:{type:Boolean},hasInfoIcon:{type:Boolean},environment:{default:"frontoffice"}},emits:["fzprimary:click","fzsecondary:click","fztertiary:click","fzcard:click-info"],setup(o,{expose:l,emit:a}){const n=k(`(max-width: ${A.sm})`),t=o,r=a,p=e.useSlots(),u=e.ref(t.defaultExpanded??!1);e.watch(()=>t.color==="aliceblue",y=>{y&&console.warn("[FzCard] The color prop value 'aliceblue' is deprecated and will be removed in a future version. Please use 'blue' instead. The component will automatically map 'aliceblue' to 'blue' for now.")},{immediate:!0});const b=e.computed(()=>t.color==="aliceblue"?"blue":t.color),f=e.computed(()=>u.value||!t.collapsible),g=e.computed(()=>t.alwaysAlive||f.value),H=e.computed(()=>t.title||p.header||p["header-content"]),I=e.computed(()=>[t.collapsible?"cursor-pointer":""]),R=e.computed(()=>t.environment==="backoffice"?"py-2":"py-8"),j=e.computed(()=>{switch(b.value){case"blue":return"bg-background-alice-blue";case"orange":return"bg-background-seashell";case"purple":return"bg-background-pale-purple";case"grey":return"bg-background-white-smoke";case"yellow":return"bg-semantic-warning-50";case"red":return"bg-semantic-error-50";default:return"bg-core-white"}}),M=e.computed(()=>"text-core-black"),W=e.computed(()=>{switch(b.value){case"blue":return"border-background-alice-blue";case"orange":return"border-background-seashell";case"purple":return"border-background-pale-purple";case"grey":return"border-background-white-smoke";case"yellow":return"border-semantic-warning-50";case"red":return"border-semantic-error-50";default:return"border-grey-100"}}),D=e.computed(()=>t.primaryAction!==void 0||t.secondaryAction!==void 0||t.tertiaryAction!==void 0);function h(){t.collapsible&&(u.value=!u.value)}return e.onMounted(()=>{t.tertiaryAction&&!t.secondaryAction&&!t.primaryAction?console.warn("[Fiscozen Design System]: You should set primaryAction and secondaryAction if you want to set tertiaryAction"):t.secondaryAction&&!t.primaryAction&&console.warn("[Fiscozen Design System]: You should set primaryAction if you want to set secondaryAction")}),l({toggleOpen:h}),(y,i)=>(e.openBlock(),e.createElementBlock("section",{class:e.normalizeClass([$,j.value,M.value,W.value,{"pb-16":!f.value}])},[H.value?(e.openBlock(),e.createElementBlock("header",{key:0,class:e.normalizeClass([I.value]),onClick:h},[e.createElementVNode("div",{class:e.normalizeClass(F)},[e.createElementVNode("div",{class:e.normalizeClass(["flex flex-row gap-12 items-start",R.value])},[o.title?(e.openBlock(),e.createElementBlock("h2",{key:0,class:"text-core-black font-medium text-xl m-0 p-0 break-words overflow-wrap-anywhere min-w-0 flex-shrink",title:o.title},e.toDisplayString(o.title),9,N)):e.createCommentVNode("",!0),e.renderSlot(y.$slots,"header")],2),e.createElementVNode("div",E,[o.hasInfoIcon?(e.openBlock(),e.createBlock(e.unref(d.FzIconButton),{key:0,iconName:"circle-question",variant:"invisible",environment:o.environment,onClick:i[0]||(i[0]=e.withModifiers(v=>r("fzcard:click-info"),["stop"]))},null,8,["environment"])):e.createCommentVNode("",!0),o.collapsible?(e.openBlock(),e.createBlock(e.unref(d.FzIconButton),{key:1,iconName:u.value?"chevron-up":"chevron-down",variant:"invisible",environment:o.environment},null,8,["iconName","environment"])):e.createCommentVNode("",!0)])]),e.renderSlot(y.$slots,"header-content")],2)):e.createCommentVNode("",!0),g.value?e.withDirectives((e.openBlock(),e.createElementBlock("article",{key:1,class:e.normalizeClass(["p-16",o.contentClass])},[e.renderSlot(y.$slots,"default")],2)),[[e.vShow,f.value]]):e.createCommentVNode("",!0),(p.footer||D.value)&&g.value?e.withDirectives((e.openBlock(),e.createElementBlock("footer",{key:2,class:e.normalizeClass([V,{"justify-end":!e.unref(n)}])},[e.renderSlot(y.$slots,"footer",{},()=>[e.createVNode(e.unref(w),{horizontal:"",gap:"sm",class:e.normalizeClass({"w-full":e.unref(n)})},{default:e.withCtx(()=>[o.tertiaryAction?(e.openBlock(),e.createBlock(e.unref(d.FzIconButton),{key:0,onClick:i[1]||(i[1]=v=>r("fztertiary:click")),iconName:o.tertiaryAction.icon,variant:"invisible",environment:o.environment,disabled:o.tertiaryAction.disabled},null,8,["iconName","environment","disabled"])):e.createCommentVNode("",!0),o.secondaryAction?(e.openBlock(),e.createBlock(e.unref(d.FzButton),{key:1,class:e.normalizeClass({"flex-grow":e.unref(n)}),onClick:i[2]||(i[2]=v=>r("fzsecondary:click")),label:o.secondaryAction.label,variant:"secondary",environment:o.environment,disabled:o.secondaryAction.disabled},null,8,["class","label","environment","disabled"])):e.createCommentVNode("",!0),o.primaryAction?(e.openBlock(),e.createBlock(e.unref(d.FzButton),{key:2,class:e.normalizeClass({"flex-grow":e.unref(n)}),onClick:i[3]||(i[3]=v=>r("fzprimary:click")),label:o.primaryAction.label,variant:"primary",environment:o.environment,disabled:o.primaryAction.disabled},null,8,["class","label","environment","disabled"])):e.createCommentVNode("",!0)]),_:1},8,["class"])])],2)),[[e.vShow,f.value]]):e.createCommentVNode("",!0)],2))}});c.FzCard=O,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
package/dist/src/types.d.ts
CHANGED
|
@@ -63,10 +63,12 @@ type FzCardIconButton = {
|
|
|
63
63
|
* - 'orange' renders a seashell background
|
|
64
64
|
* - 'purple' renders a pale-purple background
|
|
65
65
|
* - 'grey' renders a white-smoke background
|
|
66
|
+
* - 'yellow' uses --semantic-warning-50 (warning tint)
|
|
67
|
+
* - 'red' uses --semantic-error-50 (error tint)
|
|
66
68
|
*
|
|
67
69
|
* @deprecated 'aliceblue' is deprecated and will be removed in a future version. Use 'blue' instead.
|
|
68
70
|
*/
|
|
69
|
-
export type FzCardColor = "default" | "blue" | "orange" | "purple" | "grey" | "aliceblue";
|
|
71
|
+
export type FzCardColor = "default" | "blue" | "orange" | "purple" | "grey" | "yellow" | "red" | "aliceblue";
|
|
70
72
|
/**
|
|
71
73
|
* Card environment context for buttons
|
|
72
74
|
*
|
package/package.json
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fiscozen/card",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
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/
|
|
11
|
-
"@fiscozen/
|
|
12
|
-
"@fiscozen/
|
|
13
|
-
"@fiscozen/
|
|
14
|
-
"@fiscozen/style": "0.2.0"
|
|
10
|
+
"@fiscozen/button": "2.0.0",
|
|
11
|
+
"@fiscozen/style": "0.3.0",
|
|
12
|
+
"@fiscozen/container": "0.4.2",
|
|
13
|
+
"@fiscozen/composables": "1.0.2"
|
|
15
14
|
},
|
|
16
15
|
"peerDependencies": {
|
|
17
16
|
"tailwindcss": "^3.4.1",
|
|
18
|
-
"vue": "^3.4.13"
|
|
17
|
+
"vue": "^3.4.13",
|
|
18
|
+
"@fiscozen/icons": "^0.2.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@rushstack/eslint-patch": "^1.3.3",
|
|
@@ -33,9 +33,9 @@
|
|
|
33
33
|
"vite-plugin-dts": "^3.8.3",
|
|
34
34
|
"vitest": "^1.2.0",
|
|
35
35
|
"vue-tsc": "^1.8.25",
|
|
36
|
-
"@fiscozen/tsconfig": "^0.1.0",
|
|
37
36
|
"@fiscozen/eslint-config": "^0.1.0",
|
|
38
|
-
"@fiscozen/prettier-config": "^0.1.0"
|
|
37
|
+
"@fiscozen/prettier-config": "^0.1.0",
|
|
38
|
+
"@fiscozen/tsconfig": "^0.1.0"
|
|
39
39
|
},
|
|
40
40
|
"license": "MIT",
|
|
41
41
|
"scripts": {
|
package/src/FzCard.vue
CHANGED
|
@@ -14,11 +14,11 @@
|
|
|
14
14
|
* <FzCard title="Card Title" color="default">
|
|
15
15
|
* <p>Card content goes here</p>
|
|
16
16
|
* </FzCard>
|
|
17
|
-
*
|
|
17
|
+
*
|
|
18
18
|
* @example
|
|
19
|
-
* <FzCard
|
|
20
|
-
* title="Collapsible Card"
|
|
21
|
-
* collapsible
|
|
19
|
+
* <FzCard
|
|
20
|
+
* title="Collapsible Card"
|
|
21
|
+
* collapsible
|
|
22
22
|
* :primaryAction="{ label: 'Save' }"
|
|
23
23
|
* >
|
|
24
24
|
* <p>This card can be collapsed</p>
|
|
@@ -34,7 +34,7 @@ import { breakpoints } from "@fiscozen/style";
|
|
|
34
34
|
const smOrSmaller = useMediaQuery(`(max-width: ${breakpoints.sm})`);
|
|
35
35
|
|
|
36
36
|
const props = withDefaults(defineProps<FzCardProps>(), {
|
|
37
|
-
environment:
|
|
37
|
+
environment: "frontoffice",
|
|
38
38
|
});
|
|
39
39
|
const emit = defineEmits<FzCardEvents>();
|
|
40
40
|
const slots = defineSlots<FzCardSlots>();
|
|
@@ -42,7 +42,7 @@ const isOpen = ref(props.defaultExpanded ?? false);
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Deprecation warning for 'aliceblue' color prop value.
|
|
45
|
-
*
|
|
45
|
+
*
|
|
46
46
|
* Watches for 'aliceblue' color usage and logs warning once on mount or when color changes.
|
|
47
47
|
* Using watch with immediate:true ensures the warning only fires once per component instance.
|
|
48
48
|
*/
|
|
@@ -52,19 +52,19 @@ watch(
|
|
|
52
52
|
if (isAliceblue) {
|
|
53
53
|
console.warn(
|
|
54
54
|
"[FzCard] The color prop value 'aliceblue' is deprecated and will be removed in a future version. " +
|
|
55
|
-
|
|
55
|
+
"Please use 'blue' instead. The component will automatically map 'aliceblue' to 'blue' for now.",
|
|
56
56
|
);
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
|
-
{ immediate: true }
|
|
59
|
+
{ immediate: true },
|
|
60
60
|
);
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* Normalizes deprecated color values to their replacements.
|
|
64
|
-
*
|
|
64
|
+
*
|
|
65
65
|
* Maps deprecated colors to their replacements:
|
|
66
66
|
* - 'aliceblue' → 'blue'
|
|
67
|
-
*
|
|
67
|
+
*
|
|
68
68
|
* This ensures backward compatibility while encouraging migration to new values.
|
|
69
69
|
* Deprecation warnings are handled separately via watch hooks.
|
|
70
70
|
*/
|
|
@@ -72,12 +72,11 @@ const normalizedColor = computed(() => {
|
|
|
72
72
|
if (props.color === "aliceblue") {
|
|
73
73
|
return "blue";
|
|
74
74
|
}
|
|
75
|
-
|
|
75
|
+
|
|
76
76
|
return props.color;
|
|
77
77
|
});
|
|
78
78
|
|
|
79
|
-
const sectionStaticClass =
|
|
80
|
-
"border-1 border-solid rounded flex flex-col";
|
|
79
|
+
const sectionStaticClass = "border-1 border-solid rounded flex flex-col";
|
|
81
80
|
const headerStaticClass =
|
|
82
81
|
"border-solid pt-16 px-16 flex flex-row justify-between";
|
|
83
82
|
const footerStaticClass =
|
|
@@ -93,7 +92,7 @@ const headerContainerComputedClass = computed(() => [
|
|
|
93
92
|
]);
|
|
94
93
|
|
|
95
94
|
const headerTitleClass = computed(() => {
|
|
96
|
-
return props.environment ===
|
|
95
|
+
return props.environment === "backoffice" ? "py-2" : "py-8";
|
|
97
96
|
});
|
|
98
97
|
|
|
99
98
|
const backgroundColor = computed(() => {
|
|
@@ -106,6 +105,10 @@ const backgroundColor = computed(() => {
|
|
|
106
105
|
return "bg-background-pale-purple";
|
|
107
106
|
case "grey":
|
|
108
107
|
return "bg-background-white-smoke";
|
|
108
|
+
case "yellow":
|
|
109
|
+
return "bg-semantic-warning-50";
|
|
110
|
+
case "red":
|
|
111
|
+
return "bg-semantic-error-50";
|
|
109
112
|
default:
|
|
110
113
|
return "bg-core-white";
|
|
111
114
|
}
|
|
@@ -128,6 +131,10 @@ const borderColor = computed(() => {
|
|
|
128
131
|
return "border-background-pale-purple";
|
|
129
132
|
case "grey":
|
|
130
133
|
return "border-background-white-smoke";
|
|
134
|
+
case "yellow":
|
|
135
|
+
return "border-semantic-warning-50";
|
|
136
|
+
case "red":
|
|
137
|
+
return "border-semantic-error-50";
|
|
131
138
|
default:
|
|
132
139
|
return "border-grey-100";
|
|
133
140
|
}
|
|
@@ -164,7 +171,15 @@ defineExpose({
|
|
|
164
171
|
</script>
|
|
165
172
|
|
|
166
173
|
<template>
|
|
167
|
-
<section
|
|
174
|
+
<section
|
|
175
|
+
:class="[
|
|
176
|
+
sectionStaticClass,
|
|
177
|
+
backgroundColor,
|
|
178
|
+
textColor,
|
|
179
|
+
borderColor,
|
|
180
|
+
{ 'pb-16': !showContent },
|
|
181
|
+
]"
|
|
182
|
+
>
|
|
168
183
|
<header
|
|
169
184
|
v-if="existHeader"
|
|
170
185
|
:class="[headerContainerComputedClass]"
|
|
@@ -208,11 +223,11 @@ defineExpose({
|
|
|
208
223
|
</article>
|
|
209
224
|
<footer
|
|
210
225
|
v-if="(slots.footer || atLeastOneButton) && isAlive"
|
|
211
|
-
:class="[footerStaticClass, {'justify-end': !smOrSmaller}]"
|
|
226
|
+
:class="[footerStaticClass, { 'justify-end': !smOrSmaller }]"
|
|
212
227
|
v-show="showContent"
|
|
213
228
|
>
|
|
214
229
|
<slot name="footer">
|
|
215
|
-
<FzContainer horizontal gap="sm" :class="{'w-full': smOrSmaller}">
|
|
230
|
+
<FzContainer horizontal gap="sm" :class="{ 'w-full': smOrSmaller }">
|
|
216
231
|
<FzIconButton
|
|
217
232
|
v-if="tertiaryAction"
|
|
218
233
|
@click="emit('fztertiary:click')"
|
|
@@ -223,7 +238,7 @@ defineExpose({
|
|
|
223
238
|
/>
|
|
224
239
|
<FzButton
|
|
225
240
|
v-if="secondaryAction"
|
|
226
|
-
:class="{'flex-grow': smOrSmaller}"
|
|
241
|
+
:class="{ 'flex-grow': smOrSmaller }"
|
|
227
242
|
@click="emit('fzsecondary:click')"
|
|
228
243
|
:label="secondaryAction.label"
|
|
229
244
|
variant="secondary"
|
|
@@ -232,7 +247,7 @@ defineExpose({
|
|
|
232
247
|
/>
|
|
233
248
|
<FzButton
|
|
234
249
|
v-if="primaryAction"
|
|
235
|
-
:class="{'flex-grow': smOrSmaller}"
|
|
250
|
+
:class="{ 'flex-grow': smOrSmaller }"
|
|
236
251
|
@click="emit('fzprimary:click')"
|
|
237
252
|
:label="primaryAction.label"
|
|
238
253
|
variant="primary"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { mount } from "@vue/test-utils";
|
|
2
|
-
import { describe, it, expect, vi, beforeEach
|
|
2
|
+
import { describe, it, expect, vi, beforeEach } from "vitest";
|
|
3
3
|
import FzCard from "../FzCard.vue";
|
|
4
4
|
|
|
5
5
|
beforeEach(() => {
|
|
@@ -146,6 +146,8 @@ describe("FzCard", () => {
|
|
|
146
146
|
["orange", "bg-background-seashell"],
|
|
147
147
|
["purple", "bg-background-pale-purple"],
|
|
148
148
|
["grey", "bg-background-white-smoke"],
|
|
149
|
+
["yellow", "bg-semantic-warning-50"],
|
|
150
|
+
["red", "bg-semantic-error-50"],
|
|
149
151
|
])("should apply %s background color", async (color, expectedClass) => {
|
|
150
152
|
const wrapper = mount(FzCard, {
|
|
151
153
|
props: {
|
|
@@ -643,18 +645,25 @@ describe("FzCard", () => {
|
|
|
643
645
|
expect(wrapper.find("section").classes()).toContain("bg-background-alice-blue");
|
|
644
646
|
});
|
|
645
647
|
|
|
646
|
-
it(
|
|
648
|
+
it.each([
|
|
649
|
+
["blue", "border-background-alice-blue"],
|
|
650
|
+
["orange", "border-background-seashell"],
|
|
651
|
+
["purple", "border-background-pale-purple"],
|
|
652
|
+
["grey", "border-background-white-smoke"],
|
|
653
|
+
["yellow", "border-semantic-warning-50"],
|
|
654
|
+
["red", "border-semantic-error-50"],
|
|
655
|
+
])("should apply %s border color", async (color, expectedClass) => {
|
|
647
656
|
const wrapper = mount(FzCard, {
|
|
648
657
|
props: {
|
|
649
658
|
title: "Test Card",
|
|
650
|
-
color:
|
|
659
|
+
color: color as any,
|
|
651
660
|
primaryAction: {
|
|
652
661
|
label: "Save",
|
|
653
662
|
},
|
|
654
663
|
},
|
|
655
664
|
});
|
|
656
665
|
await wrapper.vm.$nextTick();
|
|
657
|
-
expect(wrapper.find("section").classes()).toContain(
|
|
666
|
+
expect(wrapper.find("section").classes()).toContain(expectedClass);
|
|
658
667
|
});
|
|
659
668
|
|
|
660
669
|
it("should apply text color class", async () => {
|
|
@@ -35,8 +35,12 @@ exports[`FzCard > Snapshots > should match snapshot - collapsible 1`] = `
|
|
|
35
35
|
<h2 class="text-core-black font-medium text-xl m-0 p-0 break-words overflow-wrap-anywhere min-w-0 flex-shrink" title="Test Card">Test Card</h2>
|
|
36
36
|
</div>
|
|
37
37
|
<div class="flex flex-row gap-8 items-start">
|
|
38
|
-
<!--v-if--><span data-v-8090b1b6="" class="fz-icon-button-wrapper relative fz-icon-button-wrapper--frontoffice"><button data-v-8090b1b6="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-transparent text-grey-500 !border-transparent hover:bg-grey-100 hover:!border-grey-100 focus:bg-transparent focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200" aria-label=""><div class="flex items-center justify-items-center"><
|
|
38
|
+
<!--v-if--><span data-v-8090b1b6="" class="fz-icon-button-wrapper relative fz-icon-button-wrapper--frontoffice"><button data-v-8090b1b6="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-transparent text-grey-500 !border-transparent hover:bg-grey-100 hover:!border-grey-100 focus:bg-transparent focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200" aria-label=""><div class="flex items-center justify-items-center"><span role="presentation" class="flex items-center justify-center w-[20px] h-[20px]"><svg class="svg-inline--fa fa-chevron-up h-[16px]" aria-hidden="true" focusable="false" data-prefix="far" data-icon="chevron-up" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path class="" fill="currentColor" d="M239 111c9.4-9.4 24.6-9.4 33.9 0L465 303c9.4 9.4 9.4 24.6 0 33.9s-24.6 9.4-33.9 0l-175-175L81 337c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L239 111z"></path></svg></span>
|
|
39
39
|
</div>
|
|
40
|
+
<!--v-if-->
|
|
41
|
+
<!--v-if--></button>
|
|
42
|
+
<!--v-if--></span>
|
|
43
|
+
</div>
|
|
40
44
|
</div>
|
|
41
45
|
</header>
|
|
42
46
|
<article class="p-16"></article>
|
|
@@ -77,15 +81,18 @@ exports[`FzCard > Snapshots > should match snapshot - with all actions 1`] = `
|
|
|
77
81
|
</header>
|
|
78
82
|
<article class="p-16"></article>
|
|
79
83
|
<footer class="border-solid pt-0 px-16 pb-16 flex gap-12 items-center justify-end">
|
|
80
|
-
<div data-v-da7f5873="" class="fz-container fz-container--horizontal gap-section-content-sm align-items-center layout-default"><span data-v-8090b1b6="" class="fz-icon-button-wrapper relative fz-icon-button-wrapper--frontoffice"><button data-v-8090b1b6="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-transparent text-grey-500 !border-transparent hover:bg-grey-100 hover:!border-grey-100 focus:bg-transparent focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200" aria-label=""><div class="flex items-center justify-items-center"><
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
<div data-v-da7f5873="" class="fz-container fz-container--horizontal gap-section-content-sm align-items-center layout-default"><span data-v-8090b1b6="" class="fz-icon-button-wrapper relative fz-icon-button-wrapper--frontoffice"><button data-v-8090b1b6="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-transparent text-grey-500 !border-transparent hover:bg-grey-100 hover:!border-grey-100 focus:bg-transparent focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200" aria-label=""><div class="flex items-center justify-items-center"><span role="presentation" class="flex items-center justify-center w-[20px] h-[20px]"><svg class="svg-inline--fa fa-bell h-[16px]" aria-hidden="true" focusable="false" data-prefix="far" data-icon="bell" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path class="" fill="currentColor" d="M224 0c-17.7 0-32 14.3-32 32l0 19.2C119 66 64 130.6 64 208l0 25.4c0 45.4-15.5 89.5-43.8 124.9L5.3 377c-5.8 7.2-6.9 17.1-2.9 25.4S14.8 416 24 416l400 0c9.2 0 17.6-5.3 21.6-13.6s2.9-18.2-2.9-25.4l-14.9-18.6C399.5 322.9 384 278.8 384 233.4l0-25.4c0-77.4-55-142-128-156.8L256 32c0-17.7-14.3-32-32-32zm0 96c61.9 0 112 50.1 112 112l0 25.4c0 47.9 13.9 94.6 39.7 134.6L72.3 368C98.1 328 112 281.3 112 233.4l0-25.4c0-61.9 50.1-112 112-112zm64 352l-64 0-64 0c0 17 6.7 33.3 18.7 45.3s28.3 18.7 45.3 18.7s33.3-6.7 45.3-18.7s18.7-28.3 18.7-45.3z"></path></svg></span></div>
|
|
85
|
+
<!--v-if-->
|
|
86
|
+
<!--v-if--></button>
|
|
87
|
+
<!--v-if--></span><button type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-core-white text-grey-500 !border-grey-200 hover:bg-grey-100 hover:!border-grey-200 focus:bg-core-white focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200">
|
|
88
|
+
<!--v-if-->
|
|
89
|
+
<div class="truncate font-normal !text-[16px] !leading-[20px]">Cancel</div>
|
|
90
|
+
<!--v-if-->
|
|
91
|
+
</button><button type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-blue-500 text-core-white hover:bg-blue-600 focus:bg-blue-500 focus:!border-blue-600 disabled:bg-blue-200">
|
|
92
|
+
<!--v-if-->
|
|
93
|
+
<div class="truncate font-normal !text-[16px] !leading-[20px]">Save</div>
|
|
94
|
+
<!--v-if-->
|
|
95
|
+
</button></div>
|
|
89
96
|
</footer>
|
|
90
97
|
</section>"
|
|
91
98
|
`;
|
|
@@ -115,9 +122,12 @@ exports[`FzCard > Snapshots > should match snapshot - with info icon 1`] = `
|
|
|
115
122
|
<div class="flex flex-row gap-12 items-start py-8">
|
|
116
123
|
<h2 class="text-core-black font-medium text-xl m-0 p-0 break-words overflow-wrap-anywhere min-w-0 flex-shrink" title="Test Card">Test Card</h2>
|
|
117
124
|
</div>
|
|
118
|
-
<div class="flex flex-row gap-8 items-start"><span data-v-8090b1b6="" class="fz-icon-button-wrapper relative fz-icon-button-wrapper--frontoffice"><button data-v-8090b1b6="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-transparent text-grey-500 !border-transparent hover:bg-grey-100 hover:!border-grey-100 focus:bg-transparent focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200" aria-label=""><div class="flex items-center justify-items-center"><
|
|
119
|
-
|
|
120
|
-
|
|
125
|
+
<div class="flex flex-row gap-8 items-start"><span data-v-8090b1b6="" class="fz-icon-button-wrapper relative fz-icon-button-wrapper--frontoffice"><button data-v-8090b1b6="" type="button" aria-disabled="false" class="relative rounded flex flex-shrink items-center justify-center font-normal !text-[16px] !leading-[20px] border-1 border-transparent gap-8 h-44 px-12 min-w-96 bg-transparent text-grey-500 !border-transparent hover:bg-grey-100 hover:!border-grey-100 focus:bg-transparent focus:!border-blue-600 disabled:bg-grey-50 disabled:text-grey-200 disabled:!border-grey-200" aria-label=""><div class="flex items-center justify-items-center"><span role="presentation" class="flex items-center justify-center w-[20px] h-[20px]"><svg class="svg-inline--fa fa-circle-question h-[16px]" aria-hidden="true" focusable="false" data-prefix="far" data-icon="circle-question" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path class="" fill="currentColor" d="M464 256A208 208 0 1 0 48 256a208 208 0 1 0 416 0zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256zm169.8-90.7c7.9-22.3 29.1-37.3 52.8-37.3l58.3 0c34.9 0 63.1 28.3 63.1 63.1c0 22.6-12.1 43.5-31.7 54.8L280 264.4c-.2 13-10.9 23.6-24 23.6c-13.3 0-24-10.7-24-24l0-13.5c0-8.6 4.6-16.5 12.1-20.8l44.3-25.4c4.7-2.7 7.6-7.7 7.6-13.1c0-8.4-6.8-15.1-15.1-15.1l-58.3 0c-3.4 0-6.4 2.1-7.5 5.3l-.4 1.2c-4.4 12.5-18.2 19-30.6 14.6s-19-18.2-14.6-30.6l.4-1.2zM224 352a32 32 0 1 1 64 0 32 32 0 1 1 -64 0z"></path></svg></span></div>
|
|
126
|
+
<!--v-if-->
|
|
127
|
+
<!--v-if--></button>
|
|
128
|
+
<!--v-if--></span>
|
|
129
|
+
<!--v-if-->
|
|
130
|
+
</div>
|
|
121
131
|
</div>
|
|
122
132
|
</header>
|
|
123
133
|
<article class="p-16"></article>
|
package/src/types.ts
CHANGED
|
@@ -59,17 +59,19 @@ type FzCardIconButton = {
|
|
|
59
59
|
|
|
60
60
|
/**
|
|
61
61
|
* Card background color variants.
|
|
62
|
-
*
|
|
62
|
+
*
|
|
63
63
|
* @remarks
|
|
64
64
|
* - 'default' renders a white background
|
|
65
65
|
* - 'blue' renders an alice-blue background
|
|
66
66
|
* - 'orange' renders a seashell background
|
|
67
67
|
* - 'purple' renders a pale-purple background
|
|
68
68
|
* - 'grey' renders a white-smoke background
|
|
69
|
-
*
|
|
69
|
+
* - 'yellow' uses --semantic-warning-50 (warning tint)
|
|
70
|
+
* - 'red' uses --semantic-error-50 (error tint)
|
|
71
|
+
*
|
|
70
72
|
* @deprecated 'aliceblue' is deprecated and will be removed in a future version. Use 'blue' instead.
|
|
71
73
|
*/
|
|
72
|
-
export type FzCardColor = "default" | "blue" | "orange" | "purple" | "grey" | "aliceblue";
|
|
74
|
+
export type FzCardColor = "default" | "blue" | "orange" | "purple" | "grey" | "yellow" | "red" | "aliceblue";
|
|
73
75
|
|
|
74
76
|
/**
|
|
75
77
|
* Card environment context for buttons
|
package/tsconfig.tsbuildinfo
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"program":{"fileNames":["../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/.pnpm/@vue+shared@3.5.26/node_modules/@vue/shared/dist/shared.d.ts","../../node_modules/.pnpm/@vue+reactivity@3.5.26/node_modules/@vue/reactivity/dist/reactivity.d.ts","../../node_modules/.pnpm/@vue+runtime-core@3.5.26/node_modules/@vue/runtime-core/dist/runtime-core.d.ts","../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../node_modules/.pnpm/@vue+runtime-dom@3.5.26/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.3.3/node_modules/vue/jsx-runtime/index.d.ts","../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/index.d.ts","../../node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/.pnpm/@vue+compiler-core@3.5.26/node_modules/@vue/compiler-core/dist/compiler-core.d.ts","../../node_modules/.pnpm/@vue+compiler-dom@3.5.26/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.3.3/node_modules/vue/dist/vue.d.mts","./src/types.ts","../../node_modules/.pnpm/@fortawesome+fontawesome-common-types@6.7.2/node_modules/@fortawesome/fontawesome-common-types/index.d.ts","../../node_modules/.pnpm/@fortawesome+fontawesome-svg-core@6.7.2/node_modules/@fortawesome/fontawesome-svg-core/index.d.ts","../../node_modules/.pnpm/@awesome.me+kit-8137893ad3@1.0.396/node_modules/@awesome.me/kit-8137893ad3/icons/modules/icon-types.ts","../../node_modules/.pnpm/@awesome.me+kit-8137893ad3@1.0.396/node_modules/@awesome.me/kit-8137893ad3/icons/modules/index.d.ts","../../node_modules/.pnpm/@fortawesome+vue-fontawesome@3.1.3_@fortawesome+fontawesome-svg-core@6.7.2_vue@3.5.26_typescript@5.3.3_/node_modules/@fortawesome/vue-fontawesome/index.d.ts","../icons/src/types.ts","../icons/src/fzicon.vue.ts","../icons/src/index.ts","../button/src/types.ts","../button/src/utils.ts","../button/src/fzbutton.vue.ts","../button/src/fziconbutton.vue.ts","../container/src/types.ts","../container/src/fzcontainer.vue.ts","../container/src/index.ts","../button/src/fzbuttongroup.vue.ts","../button/src/index.ts","../composables/src/types.ts","../composables/src/utils/number/index.ts","../composables/src/utils/position/index.ts","../composables/src/utils/index.ts","../composables/src/composables/usefloating.ts","../composables/src/composables/usemediaquery.ts","../composables/src/composables/usebreakpoints.ts","../composables/src/composables/useclickoutside.ts","../composables/src/composables/usekeydown.ts","../composables/src/composables/usekeyup.ts","../composables/src/composables/usecurrency.ts","../composables/src/composables/index.ts","../style/src/custom-directives/validation.ts","../style/src/custom-directives/config.ts","../style/src/custom-directives/vbold.ts","../style/tokens.json","../style/safe-colors.json","../style/safe-semantic-colors.json","../style/src/custom-directives/vcolor.ts","../style/src/custom-directives/vsmall.ts","../style/src/custom-directives/index.ts","../style/src/constants.ts","../style/src/index.ts","../composables/src/fzfloating.vue.ts","../composables/src/index.ts","./src/fzcard.vue.ts","./__vls_types.d.ts","./dist/src/types.d.ts","./dist/src/fzcard.vue.d.ts","./dist/src/index.d.ts","./dist/index.d.ts","./src/index.ts"],"fileInfos":[{"version":"0","affectsGlobalScope":true},"0","0","0","0","0","0",{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},"0","0",{"version":"0","affectsGlobalScope":true},"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0",{"version":"0","affectsGlobalScope":true},"0","0","0","0","0"],"root":[57,[100,106]],"options":{"composite":true,"esModuleInterop":true,"jsx":1,"jsxImportSource":"vue","module":99,"noImplicitThis":true,"skipLibCheck":true,"strict":true,"target":99,"useDefineForClassFields":true},"fileIdsList":[[51,58],[60],[52],[58],[56,59],[46,52,53],[54],[46],[46,47,48,50],[47,48,49,50],[50,55],[50],[51,56,65,66,67],[51,56,66,67,72],[51,56,66,67,68],[51,66,68,69,73],[51,65],[51,56,66,68],[51,56],[104],[56,102],[102,103],[51,56,57,72,74,97,99],[51,57,100],[51],[51,79,80,81,82,83,84,85],[51,80],[51,75,78],[51,56,75,78],[51,56,75,86,97],[51,75,78,86,98],[51,76,77],[51,75],[51,56,70],[51,70,71],[51,56,61,62,63],[51,56,59,61,63,64],[51,90],[51,87],[51,87,88,89,93,94],[51,56,87,88],[51,56,87,88,90,91,92],[51,56,95,96],[51,66],[51,56,66],[51,75,78,86],[51,70],[51,56,59,61,63]],"referencedMap":[[60,1],[61,2],[53,3],[59,4],[62,5],[54,6],[55,7],[47,8],[48,9],[50,10],[56,11],[51,12],[68,13],[73,14],[69,15],[74,16],[66,17],[67,18],[101,19],[105,20],[103,21],[104,22],[100,23],[106,24],[57,25],[86,26],[81,27],[82,19],[85,28],[79,29],[83,19],[84,19],[80,19],[98,30],[99,31],[75,19],[78,32],[76,25],[77,33],[71,34],[72,35],[70,25],[64,36],[65,37],[63,25],[96,38],[88,39],[95,40],[87,19],[89,41],[93,42],[94,41],[97,43]],"exportedModulesMap":[[60,1],[61,2],[53,3],[59,4],[62,5],[54,6],[55,7],[47,8],[48,9],[50,10],[56,11],[51,12],[68,13],[73,14],[69,15],[74,44],[66,17],[67,45],[101,19],[105,19],[103,19],[104,19],[102,19],[100,23],[106,19],[57,25],[86,26],[81,27],[82,19],[85,28],[79,29],[83,19],[84,19],[80,19],[98,30],[99,46],[75,19],[78,32],[76,25],[77,33],[71,34],[72,47],[70,25],[64,36],[65,48],[63,25],[96,38],[88,39],[95,40],[87,19],[89,41],[93,42],[94,41],[97,43]],"semanticDiagnosticsPerFile":[60,61,53,52,58,59,62,54,55,47,48,50,46,49,44,45,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,20,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,1,56,51,68,73,69,74,66,67,101,105,103,104,102,100,106,57,86,81,82,85,79,83,84,80,98,99,75,78,76,77,71,72,70,64,65,63,91,92,96,88,95,87,89,93,94,97,90],"affectedFilesPendingEmit":[100,106,57],"emitSignatures":[57,100]},"version":"5.3.3"}
|
|
1
|
+
{"program":{"fileNames":["../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es5.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.dom.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.dom.iterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.core.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.collection.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.generator.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.date.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.object.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.array.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.object.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2019.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.date.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.promise.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.string.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.intl.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.es2020.number.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.d.ts","../../node_modules/.pnpm/typescript@5.3.3/node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../node_modules/.pnpm/@vue+shared@3.5.26/node_modules/@vue/shared/dist/shared.d.ts","../../node_modules/.pnpm/@vue+reactivity@3.5.26/node_modules/@vue/reactivity/dist/reactivity.d.ts","../../node_modules/.pnpm/@vue+runtime-core@3.5.26/node_modules/@vue/runtime-core/dist/runtime-core.d.ts","../../node_modules/.pnpm/csstype@3.2.3/node_modules/csstype/index.d.ts","../../node_modules/.pnpm/@vue+runtime-dom@3.5.26/node_modules/@vue/runtime-dom/dist/runtime-dom.d.ts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.3.3/node_modules/vue/jsx-runtime/index.d.ts","../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/index.d.ts","../../node_modules/.pnpm/@babel+parser@7.28.6/node_modules/@babel/parser/typings/babel-parser.d.ts","../../node_modules/.pnpm/@vue+compiler-core@3.5.26/node_modules/@vue/compiler-core/dist/compiler-core.d.ts","../../node_modules/.pnpm/@vue+compiler-dom@3.5.26/node_modules/@vue/compiler-dom/dist/compiler-dom.d.ts","../../node_modules/.pnpm/vue@3.5.26_typescript@5.3.3/node_modules/vue/dist/vue.d.mts","./src/types.ts","../../node_modules/.pnpm/@fortawesome+fontawesome-common-types@6.7.2/node_modules/@fortawesome/fontawesome-common-types/index.d.ts","../../node_modules/.pnpm/@fortawesome+fontawesome-svg-core@6.7.2/node_modules/@fortawesome/fontawesome-svg-core/index.d.ts","../../node_modules/.pnpm/@awesome.me+kit-8137893ad3@1.0.401/node_modules/@awesome.me/kit-8137893ad3/icons/modules/icon-types.ts","../../node_modules/.pnpm/@awesome.me+kit-8137893ad3@1.0.401/node_modules/@awesome.me/kit-8137893ad3/icons/modules/index.d.ts","../../node_modules/.pnpm/@fortawesome+vue-fontawesome@3.1.3_@fortawesome+fontawesome-svg-core@6.7.2_vue@3.5.26_typescript@5.3.3_/node_modules/@fortawesome/vue-fontawesome/index.d.ts","../icons/src/types.ts","../icons/src/fzicon.vue.ts","../icons/src/fziconbackground.vue.ts","../icons/src/index.ts","../button/src/types.ts","../button/src/utils.ts","../button/src/fzbutton.vue.ts","../button/src/fziconbutton.vue.ts","../container/src/types.ts","../container/src/fzcontainer.vue.ts","../container/src/index.ts","../button/src/fzbuttongroup.vue.ts","../button/src/index.ts","../composables/src/types.ts","../composables/src/utils/number/index.ts","../composables/src/utils/position/index.ts","../composables/src/utils/index.ts","../composables/src/composables/usefloating.ts","../composables/src/composables/usemediaquery.ts","../composables/src/composables/usebreakpoints.ts","../composables/src/composables/useclickoutside.ts","../composables/src/composables/usekeydown.ts","../composables/src/composables/usekeyup.ts","../composables/src/composables/usecurrency.ts","../composables/src/composables/index.ts","../style/src/custom-directives/validation.ts","../style/src/custom-directives/config.ts","../style/src/custom-directives/vbold.ts","../style/tokens.json","../style/safe-colors.json","../style/safe-semantic-colors.json","../style/src/custom-directives/vcolor.ts","../style/src/custom-directives/vsmall.ts","../style/src/custom-directives/index.ts","../style/src/constants.ts","../style/src/index.ts","../composables/src/fzfloating.vue.ts","../composables/src/index.ts","./src/fzcard.vue.ts","./__vls_types.d.ts","./dist/src/types.d.ts","./dist/src/fzcard.vue.d.ts","./dist/src/index.d.ts","./dist/index.d.ts","./src/index.ts"],"fileInfos":[{"version":"0","affectsGlobalScope":true},"0","0","0","0","0","0",{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},{"version":"0","affectsGlobalScope":true},"0","0",{"version":"0","affectsGlobalScope":true},"0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0","0",{"version":"0","affectsGlobalScope":true},"0","0","0","0","0"],"root":[57,[101,107]],"options":{"composite":true,"esModuleInterop":true,"jsx":1,"jsxImportSource":"vue","module":99,"noImplicitThis":true,"skipLibCheck":true,"strict":true,"target":99,"useDefineForClassFields":true},"fileIdsList":[[51,58],[60],[52],[58],[56,59],[46,52,53],[54],[46],[46,47,48,50],[47,48,49,50],[50,55],[50],[51,56,66,67,68],[51,56,67,68,73],[51,56,67,68,69],[51,67,69,70,74],[51,66],[51,56,67,69],[51,56],[105],[56,103],[103,104],[51,56,57,73,75,98,100],[51,57,101],[51],[51,80,81,82,83,84,85,86],[51,81],[51,76,79],[51,56,76,79],[51,56,76,87,98],[51,76,79,87,99],[51,77,78],[51,76],[51,56,71],[51,71,72],[51,56,61,62,63],[51,56,63,64],[51,56,59,61,63,64,65],[51,91],[51,88],[51,88,89,90,94,95],[51,56,88,89],[51,56,88,89,91,92,93],[51,56,96,97],[],[67],[66],[80,81,82,83,84,85,86],[81],[76,79],[76,79,87],[77,78],[76],[71],[59,63],[91],[97]],"referencedMap":[[60,1],[61,2],[53,3],[59,4],[62,5],[54,6],[55,7],[47,8],[48,9],[50,10],[56,11],[51,12],[69,13],[74,14],[70,15],[75,16],[67,17],[68,18],[102,19],[106,20],[104,21],[105,22],[101,23],[107,24],[57,25],[87,26],[82,27],[83,19],[86,28],[80,29],[84,19],[85,19],[81,19],[99,30],[100,31],[76,19],[79,32],[77,25],[78,33],[72,34],[73,35],[71,25],[64,36],[65,37],[66,38],[63,25],[97,39],[89,40],[96,41],[88,19],[90,42],[94,43],[95,42],[98,44]],"exportedModulesMap":[[60,1],[61,2],[53,3],[58,45],[59,4],[62,5],[54,6],[55,7],[47,8],[48,9],[50,10],[44,45],[45,45],[8,45],[9,45],[11,45],[10,45],[2,45],[12,45],[13,45],[14,45],[15,45],[16,45],[17,45],[18,45],[19,45],[3,45],[4,45],[20,45],[24,45],[21,45],[22,45],[23,45],[25,45],[26,45],[27,45],[5,45],[28,45],[29,45],[30,45],[31,45],[6,45],[35,45],[32,45],[33,45],[34,45],[36,45],[7,45],[37,45],[42,45],[43,45],[38,45],[39,45],[40,45],[41,45],[1,45],[56,11],[51,12],[69,13],[74,14],[70,15],[75,46],[67,47],[68,46],[102,19],[106,19],[104,19],[105,19],[103,19],[101,23],[107,19],[57,45],[87,48],[82,49],[83,45],[86,50],[80,50],[84,45],[85,45],[81,45],[99,30],[100,51],[76,45],[79,52],[77,53],[78,53],[72,34],[73,54],[71,45],[64,36],[65,37],[66,55],[63,45],[92,45],[93,45],[97,56],[89,40],[96,41],[88,19],[90,42],[94,43],[95,42],[98,57],[91,45]],"semanticDiagnosticsPerFile":[60,61,53,52,58,59,62,54,55,47,48,50,46,49,44,45,8,9,11,10,2,12,13,14,15,16,17,18,19,3,4,20,24,21,22,23,25,26,27,5,28,29,30,31,6,35,32,33,34,36,7,37,42,43,38,39,40,41,1,56,51,69,74,70,75,67,68,102,106,104,105,103,101,107,57,87,82,83,86,80,84,85,81,99,100,76,79,77,78,72,73,71,64,65,66,63,92,93,97,89,96,88,90,94,95,98,91],"affectedFilesPendingEmit":[101,107,57],"emitSignatures":[57,101]},"version":"5.3.3"}
|