@alfadocs/ui-kit 0.4.2 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{balance-cell-renderer-B8zgIM-m.js → balance-cell-renderer-BuExGe6u.js} +2 -2
- package/dist/_chunks/{checkbox-CtPM6Rup.js → checkbox-D5EHnB14.js} +53 -46
- package/dist/_chunks/{checkbox-group-BTdEB6Yo.js → checkbox-group-CarPLDIC.js} +2 -2
- package/dist/_chunks/contact-card-DNyATxKv.js +137 -0
- package/dist/agent-catalog.json +15 -1
- package/dist/components/checkbox/index.js +1 -1
- package/dist/components/checkbox-group/index.js +1 -1
- package/dist/components/contact-card/contact-card.d.ts +74 -0
- package/dist/components/contact-card/index.d.ts +3 -0
- package/dist/components/contact-card/index.js +5 -0
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/i18n/config.js +12 -0
- package/dist/i18n/resources.d.ts +12 -0
- package/dist/index.js +357 -355
- package/dist/locales/de.json +4 -0
- package/dist/locales/en.json +4 -0
- package/dist/locales/it.json +4 -0
- package/dist/tokens.css +1 -1
- package/package.json +7 -2
package/dist/_chunks/{balance-cell-renderer-B8zgIM-m.js → balance-cell-renderer-BuExGe6u.js}
RENAMED
|
@@ -9,7 +9,7 @@ import { ModuleRegistry as qe, AllCommunityModule as We } from "ag-grid-communit
|
|
|
9
9
|
import { B as Ue } from "./button-DD_0Xdmr.js";
|
|
10
10
|
import { I as P } from "./icon-button-C4CGcYuz.js";
|
|
11
11
|
import { P as E } from "./popover-DekUKNBk.js";
|
|
12
|
-
import { C as Je } from "./checkbox-
|
|
12
|
+
import { C as Je } from "./checkbox-D5EHnB14.js";
|
|
13
13
|
import { c as te } from "./createLucideIcon-CrFbzy84.js";
|
|
14
14
|
import { P as Ze } from "./printer-CeVEWfQq.js";
|
|
15
15
|
import { F as Xe } from "./file-text-DSNuv2B8.js";
|
|
@@ -1012,4 +1012,4 @@ export {
|
|
|
1012
1012
|
mt as f,
|
|
1013
1013
|
aa as u
|
|
1014
1014
|
};
|
|
1015
|
-
//# sourceMappingURL=balance-cell-renderer-
|
|
1015
|
+
//# sourceMappingURL=balance-cell-renderer-BuExGe6u.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsxs as G, jsx as
|
|
1
|
+
import { jsxs as G, jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { createContext as K, useContext as O, forwardRef as T, useId as A, useState as B, useRef as F, useMemo as H } from "react";
|
|
3
|
-
import * as
|
|
3
|
+
import * as v from "@radix-ui/react-checkbox";
|
|
4
4
|
import { c as V } from "./index-D2ZczOXr.js";
|
|
5
5
|
import { T as W } from "./tooltip-DHik5yRI.js";
|
|
6
6
|
import { u as C } from "./registry-C9nwlNyL.js";
|
|
@@ -25,8 +25,8 @@ const q = {
|
|
|
25
25
|
argsType: '{ checked: boolean | "indeterminate" }',
|
|
26
26
|
descriptionKey: "ui.agent.checkbox.actions.setChecked",
|
|
27
27
|
description: "Set the checked state to a specific value.",
|
|
28
|
-
invoke: (t,
|
|
29
|
-
t.setChecked(
|
|
28
|
+
invoke: (t, n) => {
|
|
29
|
+
t.setChecked(n.checked);
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
32
|
toggle: {
|
|
@@ -50,12 +50,12 @@ const q = {
|
|
|
50
50
|
description: "Sourced from the id prop."
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
|
-
},
|
|
53
|
+
}, x = [
|
|
54
54
|
"ds:[stroke-dasharray:1] ds:[stroke-dashoffset:1]",
|
|
55
55
|
"ds:animate-[checkbox-indicator-draw_var(--animation-duration)_ease-out_forwards]"
|
|
56
56
|
].join(" ");
|
|
57
57
|
function E({ className: t }) {
|
|
58
|
-
return /* @__PURE__ */
|
|
58
|
+
return /* @__PURE__ */ r(
|
|
59
59
|
"svg",
|
|
60
60
|
{
|
|
61
61
|
viewBox: "0 0 24 24",
|
|
@@ -67,12 +67,12 @@ function E({ className: t }) {
|
|
|
67
67
|
"aria-hidden": "true",
|
|
68
68
|
"data-slot": "checkbox-check-icon",
|
|
69
69
|
className: t,
|
|
70
|
-
children: /* @__PURE__ */
|
|
70
|
+
children: /* @__PURE__ */ r("path", { pathLength: "1", d: "M5 12l5 5L20 7", className: x })
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
74
|
function J({ className: t }) {
|
|
75
|
-
return /* @__PURE__ */
|
|
75
|
+
return /* @__PURE__ */ r(
|
|
76
76
|
"svg",
|
|
77
77
|
{
|
|
78
78
|
viewBox: "0 0 24 24",
|
|
@@ -83,7 +83,7 @@ function J({ className: t }) {
|
|
|
83
83
|
"aria-hidden": "true",
|
|
84
84
|
"data-slot": "checkbox-indeterminate-icon",
|
|
85
85
|
className: t,
|
|
86
|
-
children: /* @__PURE__ */
|
|
86
|
+
children: /* @__PURE__ */ r("path", { pathLength: "1", d: "M5 12h14", className: x })
|
|
87
87
|
}
|
|
88
88
|
);
|
|
89
89
|
}
|
|
@@ -95,16 +95,20 @@ const Q = V(
|
|
|
95
95
|
"ds:focus-visible:outline-[length:var(--focus-ring-width)] ds:focus-visible:outline-solid",
|
|
96
96
|
"ds:focus-visible:outline-ring ds:focus-visible:outline-offset-[length:var(--focus-ring-offset)]",
|
|
97
97
|
"ds:disabled:cursor-not-allowed ds:disabled:opacity-50",
|
|
98
|
-
"ds:data-[state=checked]:bg-primary ds:data-[state=checked]:border-primary
|
|
99
|
-
"ds:data-[state=indeterminate]:bg-primary ds:data-[state=indeterminate]:border-primary
|
|
98
|
+
"ds:data-[state=checked]:bg-primary ds:data-[state=checked]:border-primary",
|
|
99
|
+
"ds:data-[state=indeterminate]:bg-primary ds:data-[state=indeterminate]:border-primary",
|
|
100
100
|
'ds:relative ds:before:absolute ds:before:inset-[calc((var(--min-target-size)-100%)/-2)] ds:before:content-[""]'
|
|
101
101
|
].join(" "),
|
|
102
102
|
{
|
|
103
103
|
variants: {
|
|
104
|
+
// Per-size `mt` centers the box optically on the first line of the
|
|
105
|
+
// label using the type-label line-box height — important when the
|
|
106
|
+
// label wraps, because the wrapper uses `items-start` so children
|
|
107
|
+
// align to the top edge rather than the multi-line block's centre.
|
|
104
108
|
size: {
|
|
105
|
-
sm: "ds:size-3.5",
|
|
106
|
-
md: "ds:size-4",
|
|
107
|
-
lg: "ds:size-5"
|
|
109
|
+
sm: "ds:size-3.5 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-0.875rem)/2)]",
|
|
110
|
+
md: "ds:size-4 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-1rem)/2)]",
|
|
111
|
+
lg: "ds:size-5 ds:mt-[calc((var(--type-label-size)*var(--type-label-line-height)-1.25rem)/2)]"
|
|
108
112
|
}
|
|
109
113
|
},
|
|
110
114
|
defaultVariants: {
|
|
@@ -114,46 +118,49 @@ const Q = V(
|
|
|
114
118
|
), U = T(
|
|
115
119
|
({
|
|
116
120
|
label: t,
|
|
117
|
-
checked:
|
|
121
|
+
checked: n,
|
|
118
122
|
onCheckedChange: s,
|
|
119
123
|
size: m = "md",
|
|
120
124
|
disabled: y,
|
|
121
125
|
disabledReason: b,
|
|
122
126
|
name: w,
|
|
123
|
-
value:
|
|
127
|
+
value: o,
|
|
124
128
|
id: f,
|
|
125
|
-
className:
|
|
126
|
-
...
|
|
127
|
-
},
|
|
128
|
-
const j = A(), h = f ?? j, e = P(),
|
|
129
|
-
|
|
130
|
-
}, _ = (e == null ? void 0 : e.name) ?? w, u = (e == null ? void 0 : e.disabled) || y,
|
|
129
|
+
className: z,
|
|
130
|
+
...I
|
|
131
|
+
}, N) => {
|
|
132
|
+
const j = A(), h = f ?? j, e = P(), c = e !== null && o !== void 0, [L, p] = B(n ?? !1), d = n !== void 0, l = c ? e.value.has(o) : d ? n : L, R = c ? () => e.toggle(o) : (i) => {
|
|
133
|
+
d || p(i), s == null || s(i);
|
|
134
|
+
}, _ = (e == null ? void 0 : e.name) ?? w, u = (e == null ? void 0 : e.disabled) || y, a = F(
|
|
131
135
|
l ?? !1
|
|
132
136
|
);
|
|
133
|
-
|
|
137
|
+
a.current = l ?? !1;
|
|
134
138
|
const M = H(
|
|
135
139
|
() => ({
|
|
136
|
-
getChecked: () =>
|
|
137
|
-
setChecked: (
|
|
138
|
-
if (
|
|
139
|
-
(
|
|
140
|
+
getChecked: () => a.current,
|
|
141
|
+
setChecked: (i) => {
|
|
142
|
+
if (c) {
|
|
143
|
+
(a.current === !0 || a.current === "indeterminate") !== (i === !0 || i === "indeterminate") && e.toggle(o);
|
|
140
144
|
return;
|
|
141
145
|
}
|
|
142
|
-
|
|
146
|
+
d || p(i), s == null || s(i);
|
|
143
147
|
},
|
|
144
148
|
toggle: () => {
|
|
145
|
-
if (
|
|
146
|
-
e.toggle(
|
|
149
|
+
if (c) {
|
|
150
|
+
e.toggle(o);
|
|
147
151
|
return;
|
|
148
152
|
}
|
|
149
|
-
const
|
|
150
|
-
|
|
153
|
+
const i = !(a.current === !0 || a.current === "indeterminate");
|
|
154
|
+
d || p(i), s == null || s(i);
|
|
151
155
|
}
|
|
152
156
|
}),
|
|
153
|
-
[
|
|
157
|
+
[c, e, o, d, s]
|
|
154
158
|
);
|
|
155
159
|
C(q, M, f);
|
|
156
|
-
const k =
|
|
160
|
+
const k = [
|
|
161
|
+
"ds:text-primary-foreground",
|
|
162
|
+
m === "sm" ? "ds:size-3" : m === "lg" ? "ds:size-4" : "ds:size-3.5"
|
|
163
|
+
].join(" "), S = [
|
|
157
164
|
"type-label ds:text-foreground ds:select-none",
|
|
158
165
|
u ? "ds:cursor-not-allowed ds:opacity-50" : "ds:cursor-pointer"
|
|
159
166
|
].join(" "), g = /* @__PURE__ */ G(
|
|
@@ -161,30 +168,30 @@ const Q = V(
|
|
|
161
168
|
{
|
|
162
169
|
"data-component": "checkbox",
|
|
163
170
|
"data-component-id": f,
|
|
164
|
-
"data-option-id":
|
|
165
|
-
className: "ds:inline-flex ds:items-
|
|
171
|
+
"data-option-id": o,
|
|
172
|
+
className: "ds:inline-flex ds:items-start ds:gap-[var(--spacing-sm)]",
|
|
166
173
|
children: [
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
|
|
174
|
+
/* @__PURE__ */ r(
|
|
175
|
+
v.Root,
|
|
169
176
|
{
|
|
170
|
-
ref:
|
|
177
|
+
ref: N,
|
|
171
178
|
id: h,
|
|
172
179
|
checked: l,
|
|
173
180
|
onCheckedChange: R,
|
|
174
181
|
disabled: u,
|
|
175
182
|
"aria-disabled": u || void 0,
|
|
176
183
|
name: _,
|
|
177
|
-
value:
|
|
178
|
-
className: Q({ size: m, className:
|
|
179
|
-
...
|
|
180
|
-
children: /* @__PURE__ */
|
|
184
|
+
value: o,
|
|
185
|
+
className: Q({ size: m, className: z }),
|
|
186
|
+
...I,
|
|
187
|
+
children: /* @__PURE__ */ r(v.Indicator, { children: l === "indeterminate" ? /* @__PURE__ */ r(J, { className: k }) : /* @__PURE__ */ r(E, { className: k }) })
|
|
181
188
|
}
|
|
182
189
|
),
|
|
183
|
-
/* @__PURE__ */
|
|
190
|
+
/* @__PURE__ */ r("label", { htmlFor: h, className: S, children: t })
|
|
184
191
|
]
|
|
185
192
|
}
|
|
186
193
|
);
|
|
187
|
-
return u && b ? /* @__PURE__ */
|
|
194
|
+
return u && b ? /* @__PURE__ */ r(W, { label: b, children: g }) : g;
|
|
188
195
|
}
|
|
189
196
|
);
|
|
190
197
|
U.displayName = "Checkbox";
|
|
@@ -193,4 +200,4 @@ export {
|
|
|
193
200
|
D as a,
|
|
194
201
|
P as u
|
|
195
202
|
};
|
|
196
|
-
//# sourceMappingURL=checkbox-
|
|
203
|
+
//# sourceMappingURL=checkbox-D5EHnB14.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as s, jsxs as M } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as T, useId as W, useState as K, useMemo as S, useRef as X, Children as Y, isValidElement as Z } from "react";
|
|
3
3
|
import { c as V } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as ee } from "react-i18next";
|
|
5
|
-
import { C as _, a as se } from "./checkbox-
|
|
5
|
+
import { C as _, a as se } from "./checkbox-D5EHnB14.js";
|
|
6
6
|
import { u as te } from "./registry-C9nwlNyL.js";
|
|
7
7
|
import { C as ce } from "./circle-alert-ChA9opNA.js";
|
|
8
8
|
const re = {
|
|
@@ -205,4 +205,4 @@ oe.displayName = "CheckboxGroup";
|
|
|
205
205
|
export {
|
|
206
206
|
oe as C
|
|
207
207
|
};
|
|
208
|
-
//# sourceMappingURL=checkbox-group-
|
|
208
|
+
//# sourceMappingURL=checkbox-group-CarPLDIC.js.map
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { jsxs as t, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as i, Fragment as b } from "react";
|
|
3
|
+
import { useTranslation as k } from "react-i18next";
|
|
4
|
+
import { C as o } from "./card-CWzuTLYE.js";
|
|
5
|
+
import { L as p } from "./link-BcYW1eNM.js";
|
|
6
|
+
import { c as L } from "./createLucideIcon-CrFbzy84.js";
|
|
7
|
+
/**
|
|
8
|
+
* @license lucide-react v1.8.0 - ISC
|
|
9
|
+
*
|
|
10
|
+
* This source code is licensed under the ISC license.
|
|
11
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
12
|
+
*/
|
|
13
|
+
const v = [
|
|
14
|
+
[
|
|
15
|
+
"path",
|
|
16
|
+
{
|
|
17
|
+
d: "M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",
|
|
18
|
+
key: "1r0f0z"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
["circle", { cx: "12", cy: "10", r: "3", key: "ilqhr7" }]
|
|
22
|
+
], j = L("map-pin", v);
|
|
23
|
+
function O(s) {
|
|
24
|
+
return `tel:${s.replace(/\(0\)/g, "").replace(/[^\d+]/g, "")}`;
|
|
25
|
+
}
|
|
26
|
+
const f = i(
|
|
27
|
+
({ title: s, variant: e = "default", className: d, children: n, ...c }, r) => /* @__PURE__ */ t(
|
|
28
|
+
o,
|
|
29
|
+
{
|
|
30
|
+
ref: r,
|
|
31
|
+
variant: e,
|
|
32
|
+
"data-component": "contact-card",
|
|
33
|
+
className: d,
|
|
34
|
+
...c,
|
|
35
|
+
children: [
|
|
36
|
+
s !== void 0 ? /* @__PURE__ */ a(o.Header, { children: /* @__PURE__ */ a("h2", { className: "type-title-card ds:text-foreground", children: s }) }) : null,
|
|
37
|
+
/* @__PURE__ */ a(
|
|
38
|
+
o.Body,
|
|
39
|
+
{
|
|
40
|
+
className: [
|
|
41
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-md)]"
|
|
42
|
+
// Tighten the body padding-block-start when a header sits
|
|
43
|
+
// above so the whole card reads as one cohesive block rather
|
|
44
|
+
// than two stacked sections — Card.Header already paints
|
|
45
|
+
// bottom padding via `pb-0` + Card.Body's `p-md`.
|
|
46
|
+
].join(" "),
|
|
47
|
+
children: n
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
);
|
|
54
|
+
f.displayName = "ContactCard";
|
|
55
|
+
const u = i(
|
|
56
|
+
({ name: s, lines: e, vatNumber: d, phone: n, nameAs: c = "p", className: r, ...C }, h) => {
|
|
57
|
+
const { t: l } = k(), N = c;
|
|
58
|
+
return /* @__PURE__ */ t(
|
|
59
|
+
"address",
|
|
60
|
+
{
|
|
61
|
+
ref: h,
|
|
62
|
+
"data-component": "contact-card-office",
|
|
63
|
+
className: [
|
|
64
|
+
// `not-italic` overrides the UA default for `<address>` since
|
|
65
|
+
// the kit's type ramp already encodes intent — italic would
|
|
66
|
+
// double up with a heading-bold name and read as emphasis.
|
|
67
|
+
"ds:not-italic ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
68
|
+
r
|
|
69
|
+
].filter(Boolean).join(" "),
|
|
70
|
+
...C,
|
|
71
|
+
children: [
|
|
72
|
+
/* @__PURE__ */ t(N, { className: "ds:m-0 ds:flex ds:items-center ds:gap-[var(--spacing-xs)] type-label ds:font-semibold ds:text-foreground", children: [
|
|
73
|
+
/* @__PURE__ */ a(
|
|
74
|
+
j,
|
|
75
|
+
{
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
className: "ds:size-[1.25em] ds:text-primary ds:shrink-0"
|
|
78
|
+
}
|
|
79
|
+
),
|
|
80
|
+
/* @__PURE__ */ a("span", { children: s })
|
|
81
|
+
] }),
|
|
82
|
+
/* @__PURE__ */ a("div", { className: "type-body-sm ds:text-foreground ds:[unicode-bidi:isolate]", children: e.map((y, m) => /* @__PURE__ */ t(b, { children: [
|
|
83
|
+
y,
|
|
84
|
+
m < e.length - 1 ? /* @__PURE__ */ a("br", {}) : null
|
|
85
|
+
] }, m)) }),
|
|
86
|
+
d ? /* @__PURE__ */ t("div", { className: "type-body-sm ds:text-muted-foreground", children: [
|
|
87
|
+
/* @__PURE__ */ a("span", { className: "ds:me-[var(--spacing-2xs)]", children: l("ui.contactCard.vatNumberLabel") }),
|
|
88
|
+
/* @__PURE__ */ a("span", { className: "ds:[unicode-bidi:isolate]", children: d })
|
|
89
|
+
] }) : null,
|
|
90
|
+
n ? /* @__PURE__ */ t("div", { className: "type-body-sm ds:text-muted-foreground ds:inline-flex ds:items-baseline ds:gap-[var(--spacing-2xs)] ds:flex-wrap", children: [
|
|
91
|
+
/* @__PURE__ */ a("span", { children: l("ui.contactCard.phoneLabel") }),
|
|
92
|
+
/* @__PURE__ */ a(p, { href: O(n), intent: "default", children: /* @__PURE__ */ a("span", { className: "ds:[unicode-bidi:isolate]", children: n }) })
|
|
93
|
+
] }) : null
|
|
94
|
+
]
|
|
95
|
+
}
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
);
|
|
99
|
+
u.displayName = "ContactCard.Office";
|
|
100
|
+
const x = i(
|
|
101
|
+
({ className: s, children: e, ...d }, n) => /* @__PURE__ */ a(
|
|
102
|
+
"ul",
|
|
103
|
+
{
|
|
104
|
+
ref: n,
|
|
105
|
+
"data-component": "contact-card-links",
|
|
106
|
+
className: [
|
|
107
|
+
"ds:m-0 ds:p-0 ds:list-none",
|
|
108
|
+
"ds:flex ds:flex-col ds:gap-[var(--spacing-xs)]",
|
|
109
|
+
s
|
|
110
|
+
].filter(Boolean).join(" "),
|
|
111
|
+
...d,
|
|
112
|
+
children: e
|
|
113
|
+
}
|
|
114
|
+
)
|
|
115
|
+
);
|
|
116
|
+
x.displayName = "ContactCard.Links";
|
|
117
|
+
const g = i(
|
|
118
|
+
({ href: s, icon: e, external: d, children: n }, c) => /* @__PURE__ */ a("li", { ref: c, className: "ds:m-0", children: /* @__PURE__ */ a(
|
|
119
|
+
p,
|
|
120
|
+
{
|
|
121
|
+
href: s,
|
|
122
|
+
external: d,
|
|
123
|
+
startIcon: /* @__PURE__ */ a("span", { className: "ds:text-primary", children: e }),
|
|
124
|
+
children: n
|
|
125
|
+
}
|
|
126
|
+
) })
|
|
127
|
+
);
|
|
128
|
+
g.displayName = "ContactCard.Link";
|
|
129
|
+
const M = Object.assign(f, {
|
|
130
|
+
Office: u,
|
|
131
|
+
Links: x,
|
|
132
|
+
Link: g
|
|
133
|
+
});
|
|
134
|
+
export {
|
|
135
|
+
M as C
|
|
136
|
+
};
|
|
137
|
+
//# sourceMappingURL=contact-card-DNyATxKv.js.map
|
package/dist/agent-catalog.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"packageVersion": "0.
|
|
3
|
+
"packageVersion": "0.6.1",
|
|
4
4
|
"components": [
|
|
5
5
|
{
|
|
6
6
|
"kind": "component",
|
|
@@ -957,6 +957,20 @@
|
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
},
|
|
960
|
+
{
|
|
961
|
+
"kind": "component",
|
|
962
|
+
"id": "contact-card",
|
|
963
|
+
"capabilities": [],
|
|
964
|
+
"state": [],
|
|
965
|
+
"actions": [],
|
|
966
|
+
"domHooks": {
|
|
967
|
+
"root": {
|
|
968
|
+
"attr": "data-component",
|
|
969
|
+
"value": "contact-card",
|
|
970
|
+
"description": "Marks the outer Card wrapper of a ContactCard."
|
|
971
|
+
}
|
|
972
|
+
}
|
|
973
|
+
},
|
|
960
974
|
{
|
|
961
975
|
"kind": "component",
|
|
962
976
|
"id": "data-table",
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { type HTMLAttributes, type ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Strip everything that's not a digit or a leading `+` so the display
|
|
4
|
+
* string (`"+49 (0)89 51871478"`) becomes a valid `tel:` URI target
|
|
5
|
+
* (`"tel:+498951871478"`). RFC 3966 allows visual separators, but most
|
|
6
|
+
* dialer apps still trip on them — collapsing to a strict E.164-ish
|
|
7
|
+
* form is the safe default. The `(0)` trunk-prefix convention is
|
|
8
|
+
* intentionally dropped: it's not a real digit in international
|
|
9
|
+
* dialling, only a hint for in-country dialling.
|
|
10
|
+
*/
|
|
11
|
+
declare function buildTelHref(display: string): string;
|
|
12
|
+
export interface ContactCardProps extends Omit<HTMLAttributes<HTMLElement>, 'title'> {
|
|
13
|
+
/**
|
|
14
|
+
* Optional card heading rendered inside `Card.Header` as an `<h2>` —
|
|
15
|
+
* e.g. "Contact information" above one or more office blocks. Omit
|
|
16
|
+
* when the card sits inside a section that already has a heading.
|
|
17
|
+
*/
|
|
18
|
+
title?: ReactNode;
|
|
19
|
+
/**
|
|
20
|
+
* `Card` variant. Defaults to `default` (subtle border on `--card`
|
|
21
|
+
* surface) to match the marketing site's treatment.
|
|
22
|
+
*/
|
|
23
|
+
variant?: 'default' | 'outlined' | 'elevated';
|
|
24
|
+
children: ReactNode;
|
|
25
|
+
}
|
|
26
|
+
export interface ContactCardOfficeProps extends Omit<HTMLAttributes<HTMLElement>, 'children'> {
|
|
27
|
+
/**
|
|
28
|
+
* Office name — rendered as the block's bold label next to the pin
|
|
29
|
+
* glyph. Not a heading element by default so a card with multiple
|
|
30
|
+
* offices doesn't fragment the heading outline; pass `nameAs="h3"`
|
|
31
|
+
* (or `h4` etc.) when the consuming page wants a real heading.
|
|
32
|
+
*/
|
|
33
|
+
name: ReactNode;
|
|
34
|
+
/**
|
|
35
|
+
* Address lines in document order, one per `<br>`-equivalent. Country
|
|
36
|
+
* / region / postcode formatting is the consumer's responsibility —
|
|
37
|
+
* the kit only inserts the line breaks.
|
|
38
|
+
*/
|
|
39
|
+
lines: ReadonlyArray<string>;
|
|
40
|
+
/**
|
|
41
|
+
* VAT / tax-ID number. Rendered on its own line with the kit-owned
|
|
42
|
+
* `ui.contactCard.vatNumberLabel` prefix.
|
|
43
|
+
*/
|
|
44
|
+
vatNumber?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Phone number as it should display (with separators, parens, trunk
|
|
47
|
+
* prefix). The kit normalises this into a `tel:` URI internally —
|
|
48
|
+
* see `buildTelHref` for the rules.
|
|
49
|
+
*/
|
|
50
|
+
phone?: string;
|
|
51
|
+
/** Heading element used for `name`. Defaults to a non-heading `<p>`. */
|
|
52
|
+
nameAs?: 'p' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
53
|
+
}
|
|
54
|
+
export type ContactCardLinksProps = HTMLAttributes<HTMLUListElement>;
|
|
55
|
+
export interface ContactCardLinkProps {
|
|
56
|
+
href: string;
|
|
57
|
+
/**
|
|
58
|
+
* Leading glyph. Rendered with `--primary` so the link list reads as
|
|
59
|
+
* a coloured-icon menu (matches the marketing site's treatment).
|
|
60
|
+
* Consumers pass a bare lucide-react icon; the kit handles colour /
|
|
61
|
+
* size / aria-hidden.
|
|
62
|
+
*/
|
|
63
|
+
icon: ReactNode;
|
|
64
|
+
/** Open in a new tab — adds `target="_blank"` and `rel` via `Link`. */
|
|
65
|
+
external?: boolean;
|
|
66
|
+
children: ReactNode;
|
|
67
|
+
}
|
|
68
|
+
export declare const ContactCard: import("react").ForwardRefExoticComponent<ContactCardProps & import("react").RefAttributes<HTMLElement>> & {
|
|
69
|
+
Office: import("react").ForwardRefExoticComponent<ContactCardOfficeProps & import("react").RefAttributes<HTMLElement>>;
|
|
70
|
+
Links: import("react").ForwardRefExoticComponent<ContactCardLinksProps & import("react").RefAttributes<HTMLUListElement>>;
|
|
71
|
+
Link: import("react").ForwardRefExoticComponent<ContactCardLinkProps & import("react").RefAttributes<HTMLLIElement>>;
|
|
72
|
+
};
|
|
73
|
+
export { buildTelHref as __buildTelHref };
|
|
74
|
+
//# sourceMappingURL=contact-card.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as r, B as l, C as s, a as n, D as o, b as d, L as C, S as t, T as R, c as T, d as b, e as c, U as g, f as i, u } from "../../_chunks/balance-cell-renderer-
|
|
1
|
+
import { A as r, B as l, C as s, a as n, D as o, b as d, L as C, S as t, T as R, c as T, d as b, e as c, U as g, f as i, u } from "../../_chunks/balance-cell-renderer-BuExGe6u.js";
|
|
2
2
|
export {
|
|
3
3
|
r as ActionsCellRenderer,
|
|
4
4
|
l as BalanceCellRenderer,
|
package/dist/i18n/config.js
CHANGED
|
@@ -32,6 +32,10 @@ const e = {
|
|
|
32
32
|
link: {
|
|
33
33
|
opensInNewTab: "Opens in a new tab"
|
|
34
34
|
},
|
|
35
|
+
contactCard: {
|
|
36
|
+
vatNumberLabel: "VAT no.:",
|
|
37
|
+
phoneLabel: "Phone:"
|
|
38
|
+
},
|
|
35
39
|
inputs: {
|
|
36
40
|
switch: {
|
|
37
41
|
on: "On",
|
|
@@ -994,6 +998,10 @@ const e = {
|
|
|
994
998
|
resultsLabel: "Risultati della ricerca",
|
|
995
999
|
noResults: "Nessun risultato per “{{query}}”"
|
|
996
1000
|
},
|
|
1001
|
+
contactCard: {
|
|
1002
|
+
vatNumberLabel: "P. IVA:",
|
|
1003
|
+
phoneLabel: "Telefono:"
|
|
1004
|
+
},
|
|
997
1005
|
inputs: {
|
|
998
1006
|
switch: {
|
|
999
1007
|
on: "Attivo",
|
|
@@ -1925,6 +1933,10 @@ const e = {
|
|
|
1925
1933
|
resultsLabel: "Suchergebnisse",
|
|
1926
1934
|
noResults: "Keine Ergebnisse für „{{query}}“"
|
|
1927
1935
|
},
|
|
1936
|
+
contactCard: {
|
|
1937
|
+
vatNumberLabel: "USt-IdNr.:",
|
|
1938
|
+
phoneLabel: "Telefon:"
|
|
1939
|
+
},
|
|
1928
1940
|
inputs: {
|
|
1929
1941
|
switch: {
|
|
1930
1942
|
on: "An",
|
package/dist/i18n/resources.d.ts
CHANGED
|
@@ -30,6 +30,10 @@ export declare const enUi: {
|
|
|
30
30
|
readonly link: {
|
|
31
31
|
readonly opensInNewTab: "Opens in a new tab";
|
|
32
32
|
};
|
|
33
|
+
readonly contactCard: {
|
|
34
|
+
readonly vatNumberLabel: "VAT no.:";
|
|
35
|
+
readonly phoneLabel: "Phone:";
|
|
36
|
+
};
|
|
33
37
|
readonly inputs: {
|
|
34
38
|
readonly switch: {
|
|
35
39
|
readonly on: "On";
|
|
@@ -1011,6 +1015,10 @@ export declare const itUi: {
|
|
|
1011
1015
|
readonly resultsLabel: "Risultati della ricerca";
|
|
1012
1016
|
readonly noResults: "Nessun risultato per “{{query}}”";
|
|
1013
1017
|
};
|
|
1018
|
+
readonly contactCard: {
|
|
1019
|
+
readonly vatNumberLabel: "P. IVA:";
|
|
1020
|
+
readonly phoneLabel: "Telefono:";
|
|
1021
|
+
};
|
|
1014
1022
|
readonly inputs: {
|
|
1015
1023
|
readonly switch: {
|
|
1016
1024
|
readonly on: "Attivo";
|
|
@@ -1967,6 +1975,10 @@ export declare const deUi: {
|
|
|
1967
1975
|
readonly resultsLabel: "Suchergebnisse";
|
|
1968
1976
|
readonly noResults: "Keine Ergebnisse für „{{query}}“";
|
|
1969
1977
|
};
|
|
1978
|
+
readonly contactCard: {
|
|
1979
|
+
readonly vatNumberLabel: "USt-IdNr.:";
|
|
1980
|
+
readonly phoneLabel: "Telefon:";
|
|
1981
|
+
};
|
|
1970
1982
|
readonly inputs: {
|
|
1971
1983
|
readonly switch: {
|
|
1972
1984
|
readonly on: "An";
|