@alfadocs/ui-kit 0.42.0 → 0.44.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/dist/_chunks/{ar-Cn_NxqkN.js → ar-DEz65ZJW.js} +2 -2
- package/dist/_chunks/bmi-calculator-DFPWL2OJ.js +273 -0
- package/dist/_chunks/{booking-4mCw3Mpl.js → booking-CtLwaxkK.js} +4 -4
- package/dist/_chunks/{calculator-dialog-B74fqpFZ.js → calculator-dialog-D-nfvteH.js} +2 -2
- package/dist/_chunks/{chart-Cbt0_sKv.js → chart-Cg3e9EH9.js} +101 -99
- package/dist/_chunks/{cycle-calculator-DsZbyzX6.js → cycle-calculator-ChHBcjet.js} +65 -56
- package/dist/_chunks/{date-picker-CvQfs6Xh.js → date-picker-Bq7xhMA-.js} +109 -108
- package/dist/_chunks/date-picker-variants-DLi1Va_e.js +3238 -0
- package/dist/_chunks/{date-range-picker-U9fn1g9d.js → date-range-picker-DcXuI9y7.js} +20 -19
- package/dist/_chunks/{date-time-picker-Cva0ZCWw.js → date-time-picker-RimumeLR.js} +18 -17
- package/dist/_chunks/{de-BMM2H7Bs.js → de-bTBGdjPS.js} +2 -2
- package/dist/_chunks/dialog-BTpZV6It.js +223 -0
- package/dist/_chunks/{due-date-calculator-s_CBgaFs.js → due-date-calculator-CYXKLoof.js} +65 -45
- package/dist/_chunks/{editable-currency-cell-renderer-BhUkRiPZ.js → editable-currency-cell-renderer-9jqwDv5x.js} +2 -2
- package/dist/_chunks/{el-BYPonAaK.js → el-BWG5RXxa.js} +6 -6
- package/dist/_chunks/{es-CMkVCQ4F.js → es-DfO_G435.js} +2 -2
- package/dist/_chunks/{fr-BcuWxqft.js → fr-BTn24bs8.js} +2 -2
- package/dist/_chunks/{gestation-BXEgDGmP.js → gestation-mWF4AXea.js} +3 -3
- package/dist/_chunks/gestational-age-calculator-sRmoqgVr.js +190 -0
- package/dist/_chunks/{header-CTZWX-tm.js → header-Ce1Br27u.js} +70 -75
- package/dist/_chunks/{hi-wkq_rQAh.js → hi-Dj3oYd84.js} +2 -2
- package/dist/_chunks/insert-result-CoC1oo6R.js +334 -0
- package/dist/_chunks/{isSameWeek-Bim5ftRd.js → isSameWeek-HfxKk6Lz.js} +2 -2
- package/dist/_chunks/{it-GiQrQ9p4.js → it-Y85ofIQQ.js} +7 -7
- package/dist/_chunks/{ja-qfYg3Rua.js → ja-CQ7J6YoA.js} +2 -2
- package/dist/_chunks/{marketplace-app-shell-kVAVycz_.js → marketplace-app-shell-Dc5cTIt8.js} +186 -149
- package/dist/_chunks/{nl-xOogO4sZ.js → nl-D9kHCmp3.js} +2 -2
- package/dist/_chunks/{patient-shell-lDX3wwu6.js → patient-shell-CnT4L8gn.js} +2 -2
- package/dist/_chunks/{pl-GnOW6eGK.js → pl-B3Smqpkr.js} +3 -3
- package/dist/_chunks/{pregnancy-weight-gain-B7kBK-ZR.js → pregnancy-weight-gain-C5YhfYnL.js} +60 -50
- package/dist/_chunks/{pt-_bV5b5RW.js → pt-D3J-1c_7.js} +6 -6
- package/dist/_chunks/{ro-BEcyh5Nj.js → ro-BKAbbEA3.js} +2 -2
- package/dist/_chunks/{ru-Bi86hqMf.js → ru-BeG8f0Ep.js} +3 -3
- package/dist/_chunks/{sign-document-QHfcNKFj.js → sign-document-B-3k_0LO.js} +165 -137
- package/dist/_chunks/{sq-BujHSAWu.js → sq-_hRPaeUy.js} +6 -6
- package/dist/_chunks/subDays-Dv7q9S7u.js +8 -0
- package/dist/_chunks/{sv-C8AeDrTA.js → sv-g009fSpe.js} +2 -2
- package/dist/_chunks/{tab-bar-C4II-7ej.js → tab-bar-Xetknddo.js} +53 -34
- package/dist/_chunks/{tr-CMSs_Vgf.js → tr-OKUOuhMW.js} +2 -2
- package/dist/_chunks/{unit-converter-D1UrEUxa.js → unit-converter-Ds9jalbN.js} +78 -67
- package/dist/_chunks/{zh-CN-eXB-PFu4.js → zh-CN-De4zwEhx.js} +3 -3
- package/dist/agent-catalog.json +1 -1
- package/dist/components/_shared/calendar-class-names.d.ts +8 -0
- package/dist/components/_shared/index.d.ts +2 -0
- package/dist/components/_shared/insert-result.d.ts +149 -4
- package/dist/components/badge/badge.d.ts +1 -1
- package/dist/components/bmi-calculator/bmi-calculator.d.ts +6 -0
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/calculator-dialog/index.js +1 -1
- package/dist/components/card/card.d.ts +1 -1
- package/dist/components/chart/chart.d.ts +10 -0
- package/dist/components/chart/index.js +1 -1
- package/dist/components/cycle-calculator/cycle-calculator.d.ts +6 -0
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/date-picker.d.ts +0 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/date-range-picker.d.ts +0 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/date-time-picker.d.ts +0 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/dialog/dialog.d.ts +1 -0
- package/dist/components/dialog/index.js +1 -1
- package/dist/components/due-date-calculator/due-date-calculator.d.ts +6 -0
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/gestational-age-calculator/gestational-age-calculator.d.ts +6 -0
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/header/header.d.ts +8 -0
- package/dist/components/header/index.js +1 -1
- package/dist/components/index.d.ts +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/pregnancy-weight-gain.d.ts +6 -0
- package/dist/components/public-header/public-header.d.ts +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-document/sign-document.d.ts +12 -0
- package/dist/components/stat/stat.d.ts +1 -1
- package/dist/components/tab-bar/index.d.ts +1 -1
- package/dist/components/tab-bar/index.js +1 -1
- package/dist/components/tab-bar/tab-bar.d.ts +44 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/unit-converter/unit-converter.d.ts +6 -0
- package/dist/index.js +504 -502
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/marketplace-app-shell.d.ts +57 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +1411 -2
- package/package.json +1 -1
- package/dist/_chunks/bmi-calculator-D4juUcyF.js +0 -219
- package/dist/_chunks/dialog-Cee13rHU.js +0 -215
- package/dist/_chunks/gestational-age-calculator-CWOG3bkI.js +0 -178
- package/dist/_chunks/insert-result-DtQQeSSf.js +0 -227
- package/dist/_chunks/react-day-picker-CdtIiKjx.js +0 -3174
- package/dist/_chunks/subDays-_T9YeKPX.js +0 -8
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { forwardRef as t, useRef as
|
|
1
|
+
import { jsxs as g, Fragment as y, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as t, useRef as N, useState as k, useEffect as j } from "react";
|
|
3
3
|
import { c as o } from "./index-D2ZczOXr.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
4
|
+
import { Slot as H } from "@radix-ui/react-slot";
|
|
5
|
+
import { useTranslation as u } from "react-i18next";
|
|
6
|
+
import { I as w } from "./icon-button-CKEOrN37.js";
|
|
7
|
+
import { M as B } from "./menu-XRhW3_99.js";
|
|
8
|
+
const C = o(
|
|
8
9
|
[
|
|
9
10
|
"ds:w-full",
|
|
10
11
|
// Fixed height — a Header is always the `lg` token (64px). Using `h-*`
|
|
@@ -96,7 +97,7 @@ const B = o(
|
|
|
96
97
|
variant: "brand"
|
|
97
98
|
}
|
|
98
99
|
}
|
|
99
|
-
),
|
|
100
|
+
), S = o(
|
|
100
101
|
[
|
|
101
102
|
"ds:flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
102
103
|
"ds:w-full ds:h-full",
|
|
@@ -104,11 +105,11 @@ const B = o(
|
|
|
104
105
|
].join(" ")
|
|
105
106
|
), V = o(
|
|
106
107
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]"
|
|
107
|
-
), S = o(
|
|
108
|
-
"ds:hidden ds:md:flex ds:flex-1 ds:min-w-0 ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)]"
|
|
109
108
|
), z = o(
|
|
110
|
-
"ds:
|
|
109
|
+
"ds:hidden ds:md:flex ds:flex-1 ds:min-w-0 ds:items-center ds:justify-center ds:gap-[var(--spacing-sm)]"
|
|
111
110
|
), I = o(
|
|
111
|
+
"ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]"
|
|
112
|
+
), T = o(
|
|
112
113
|
[
|
|
113
114
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]",
|
|
114
115
|
"ds:text-[length:var(--font-size-base)] ds:font-[var(--font-weight-semibold)]",
|
|
@@ -128,13 +129,13 @@ const B = o(
|
|
|
128
129
|
"ds:forced-colors:focus-visible:outline-[CanvasText]",
|
|
129
130
|
"ds:min-h-[var(--min-target-size)]"
|
|
130
131
|
].join(" ")
|
|
131
|
-
),
|
|
132
|
+
), M = o(
|
|
132
133
|
[
|
|
133
134
|
"ds:hidden ds:md:inline-block",
|
|
134
135
|
"ds:border-inline-start ds:border-[color:var(--border)]",
|
|
135
136
|
"ds:self-stretch ds:my-[var(--spacing-xs)]"
|
|
136
137
|
].join(" ")
|
|
137
|
-
),
|
|
138
|
+
), O = o(
|
|
138
139
|
[
|
|
139
140
|
"ds:sr-only ds:focus:not-sr-only",
|
|
140
141
|
"ds:focus:absolute ds:focus:inset-inline-start-[var(--spacing-sm)] ds:focus:inset-block-start-[var(--spacing-sm)]",
|
|
@@ -146,7 +147,7 @@ const B = o(
|
|
|
146
147
|
"ds:focus:outline-[length:var(--focus-ring-width)] ds:focus:outline-solid ds:focus:outline-[color:var(--ring)]",
|
|
147
148
|
"ds:forced-colors:focus:outline-[CanvasText]"
|
|
148
149
|
].join(" ")
|
|
149
|
-
),
|
|
150
|
+
), R = t(
|
|
150
151
|
({
|
|
151
152
|
variant: e = "brand",
|
|
152
153
|
className: r,
|
|
@@ -154,25 +155,25 @@ const B = o(
|
|
|
154
155
|
scrollLinkedElevation: d = !0,
|
|
155
156
|
"aria-label": n,
|
|
156
157
|
...i
|
|
157
|
-
},
|
|
158
|
-
const { t:
|
|
158
|
+
}, l) => {
|
|
159
|
+
const { t: c } = u(), h = n ?? c("navigation.header.label", "Page header"), f = N(null), [p, b] = k(!1);
|
|
159
160
|
return j(() => {
|
|
160
161
|
if (!d) return;
|
|
161
|
-
const
|
|
162
|
-
if (!
|
|
163
|
-
const
|
|
162
|
+
const v = f.current;
|
|
163
|
+
if (!v || typeof IntersectionObserver > "u") return;
|
|
164
|
+
const m = new IntersectionObserver(
|
|
164
165
|
(x) => {
|
|
165
166
|
const _ = x[0];
|
|
166
167
|
b(!_.isIntersecting);
|
|
167
168
|
},
|
|
168
169
|
{ threshold: 0 }
|
|
169
170
|
);
|
|
170
|
-
return
|
|
171
|
-
}, [d]), /* @__PURE__ */
|
|
171
|
+
return m.observe(v), () => m.disconnect();
|
|
172
|
+
}, [d]), /* @__PURE__ */ g(y, { children: [
|
|
172
173
|
d ? /* @__PURE__ */ s(
|
|
173
174
|
"div",
|
|
174
175
|
{
|
|
175
|
-
ref:
|
|
176
|
+
ref: f,
|
|
176
177
|
"aria-hidden": "true",
|
|
177
178
|
className: "ds:block ds:h-px ds:w-full"
|
|
178
179
|
}
|
|
@@ -180,21 +181,21 @@ const B = o(
|
|
|
180
181
|
/* @__PURE__ */ s(
|
|
181
182
|
"header",
|
|
182
183
|
{
|
|
183
|
-
ref:
|
|
184
|
+
ref: l,
|
|
184
185
|
role: "banner",
|
|
185
186
|
"aria-label": h,
|
|
186
187
|
"data-component": "header",
|
|
187
188
|
"data-scrolled": p ? "true" : void 0,
|
|
188
|
-
className:
|
|
189
|
+
className: C({ variant: e, className: r }),
|
|
189
190
|
...i,
|
|
190
|
-
children: /* @__PURE__ */ s("div", { className:
|
|
191
|
+
children: /* @__PURE__ */ s("div", { className: S(), children: a })
|
|
191
192
|
}
|
|
192
193
|
)
|
|
193
194
|
] });
|
|
194
195
|
}
|
|
195
196
|
);
|
|
196
|
-
|
|
197
|
-
const
|
|
197
|
+
R.displayName = "Header";
|
|
198
|
+
const D = t(({ className: e, ...r }, a) => /* @__PURE__ */ s(
|
|
198
199
|
"div",
|
|
199
200
|
{
|
|
200
201
|
ref: a,
|
|
@@ -203,51 +204,45 @@ const R = t(({ className: e, ...r }, a) => /* @__PURE__ */ s(
|
|
|
203
204
|
...r
|
|
204
205
|
}
|
|
205
206
|
));
|
|
206
|
-
|
|
207
|
-
const
|
|
207
|
+
D.displayName = "HeaderStart";
|
|
208
|
+
const E = t(({ className: e, ...r }, a) => /* @__PURE__ */ s(
|
|
208
209
|
"div",
|
|
209
210
|
{
|
|
210
211
|
ref: a,
|
|
211
212
|
"data-header-slot": "center",
|
|
212
|
-
className: [
|
|
213
|
+
className: [z(), e].filter(Boolean).join(" "),
|
|
213
214
|
...r
|
|
214
215
|
}
|
|
215
216
|
));
|
|
216
|
-
|
|
217
|
-
const
|
|
217
|
+
E.displayName = "HeaderCenter";
|
|
218
|
+
const F = t(({ className: e, ...r }, a) => /* @__PURE__ */ s(
|
|
218
219
|
"div",
|
|
219
220
|
{
|
|
220
221
|
ref: a,
|
|
221
222
|
"data-header-slot": "end",
|
|
222
|
-
className: [
|
|
223
|
+
className: [I(), e].filter(Boolean).join(" "),
|
|
223
224
|
...r
|
|
224
225
|
}
|
|
225
226
|
));
|
|
226
|
-
|
|
227
|
-
const
|
|
228
|
-
({ logo: e, children: r, href: a = "/", className: d,
|
|
229
|
-
"
|
|
230
|
-
{
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
}
|
|
243
|
-
) : null,
|
|
244
|
-
r ? /* @__PURE__ */ s("span", { className: "ds:truncate", children: r }) : null
|
|
245
|
-
]
|
|
246
|
-
}
|
|
247
|
-
)
|
|
227
|
+
F.displayName = "HeaderEnd";
|
|
228
|
+
const L = t(
|
|
229
|
+
({ logo: e, children: r, href: a = "/", className: d, asChild: n = !1, ...i }, l) => {
|
|
230
|
+
const c = [T(), d].filter(Boolean).join(" ");
|
|
231
|
+
return n ? /* @__PURE__ */ s(H, { ref: l, className: c, ...i, children: r }) : /* @__PURE__ */ g("a", { ref: l, href: a, className: c, ...i, children: [
|
|
232
|
+
e ? /* @__PURE__ */ s(
|
|
233
|
+
"span",
|
|
234
|
+
{
|
|
235
|
+
"aria-hidden": r ? "true" : void 0,
|
|
236
|
+
className: "ds:inline-flex ds:items-center",
|
|
237
|
+
children: e
|
|
238
|
+
}
|
|
239
|
+
) : null,
|
|
240
|
+
r ? /* @__PURE__ */ s("span", { className: "ds:truncate", children: r }) : null
|
|
241
|
+
] });
|
|
242
|
+
}
|
|
248
243
|
);
|
|
249
|
-
|
|
250
|
-
function
|
|
244
|
+
L.displayName = "HeaderBrand";
|
|
245
|
+
function X({
|
|
251
246
|
className: e,
|
|
252
247
|
...r
|
|
253
248
|
}) {
|
|
@@ -256,47 +251,47 @@ function U({
|
|
|
256
251
|
{
|
|
257
252
|
role: "presentation",
|
|
258
253
|
"aria-hidden": "true",
|
|
259
|
-
className: [
|
|
254
|
+
className: [M(), e].filter(Boolean).join(" "),
|
|
260
255
|
...r
|
|
261
256
|
}
|
|
262
257
|
);
|
|
263
258
|
}
|
|
264
|
-
const
|
|
265
|
-
const { t: n } =
|
|
259
|
+
const P = t(({ onMenuOpen: e, "aria-label": r, className: a }, d) => {
|
|
260
|
+
const { t: n } = u();
|
|
266
261
|
return /* @__PURE__ */ s(
|
|
267
|
-
|
|
262
|
+
w,
|
|
268
263
|
{
|
|
269
264
|
ref: d,
|
|
270
265
|
className: ["ds:md:hidden", a].filter(Boolean).join(" "),
|
|
271
|
-
icon: /* @__PURE__ */ s(
|
|
266
|
+
icon: /* @__PURE__ */ s(B, { "aria-hidden": !0 }),
|
|
272
267
|
"aria-label": r ?? n("navigation.sidebar.open", "Open menu"),
|
|
273
268
|
onClick: e
|
|
274
269
|
}
|
|
275
270
|
);
|
|
276
271
|
});
|
|
277
|
-
|
|
278
|
-
const
|
|
279
|
-
const { t: i } =
|
|
272
|
+
P.displayName = "HeaderMenuButton";
|
|
273
|
+
const q = t(({ href: e, children: r, className: a, ...d }, n) => {
|
|
274
|
+
const { t: i } = u();
|
|
280
275
|
return /* @__PURE__ */ s(
|
|
281
276
|
"a",
|
|
282
277
|
{
|
|
283
278
|
ref: n,
|
|
284
279
|
href: e,
|
|
285
|
-
className: [
|
|
280
|
+
className: [O(), a].filter(Boolean).join(" "),
|
|
286
281
|
...d,
|
|
287
282
|
children: r ?? i("navigation.nav.skipToContent", "Skip to content")
|
|
288
283
|
}
|
|
289
284
|
);
|
|
290
285
|
});
|
|
291
|
-
|
|
286
|
+
q.displayName = "HeaderSkipLink";
|
|
292
287
|
export {
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
288
|
+
R as H,
|
|
289
|
+
L as a,
|
|
290
|
+
X as b,
|
|
291
|
+
E as c,
|
|
292
|
+
F as d,
|
|
293
|
+
P as e,
|
|
294
|
+
q as f,
|
|
295
|
+
D as g
|
|
301
296
|
};
|
|
302
|
-
//# sourceMappingURL=header-
|
|
297
|
+
//# sourceMappingURL=header-Ce1Br27u.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { r as o, q as s, v as r, w as u } from "./date-picker-variants-DLi1Va_e.js";
|
|
2
2
|
const d = {
|
|
3
3
|
locale: {
|
|
4
4
|
1: "१",
|
|
@@ -430,4 +430,4 @@ const y = {
|
|
|
430
430
|
export {
|
|
431
431
|
H as hi
|
|
432
432
|
};
|
|
433
|
-
//# sourceMappingURL=hi-
|
|
433
|
+
//# sourceMappingURL=hi-Dj3oYd84.js.map
|
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
import { jsxs as E, jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as J, useRef as Q } from "react";
|
|
3
|
+
import { useTranslation as Z } from "react-i18next";
|
|
4
|
+
import { c as tt } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { B as et } from "./button-DD_0Xdmr.js";
|
|
6
|
+
import { c as L } from "./createLucideIcon-CrFbzy84.js";
|
|
7
|
+
import { I as nt } from "./image-C6RM5hfF.js";
|
|
8
|
+
/**
|
|
9
|
+
* @license lucide-react v1.8.0 - ISC
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the ISC license.
|
|
12
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
const ot = [
|
|
15
|
+
[
|
|
16
|
+
"path",
|
|
17
|
+
{
|
|
18
|
+
d: "M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",
|
|
19
|
+
key: "zw3jo"
|
|
20
|
+
}
|
|
21
|
+
],
|
|
22
|
+
[
|
|
23
|
+
"path",
|
|
24
|
+
{
|
|
25
|
+
d: "M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",
|
|
26
|
+
key: "1wduqc"
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"path",
|
|
31
|
+
{
|
|
32
|
+
d: "M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",
|
|
33
|
+
key: "kqbvx6"
|
|
34
|
+
}
|
|
35
|
+
]
|
|
36
|
+
], at = L("layers", ot);
|
|
37
|
+
/**
|
|
38
|
+
* @license lucide-react v1.8.0 - ISC
|
|
39
|
+
*
|
|
40
|
+
* This source code is licensed under the ISC license.
|
|
41
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
42
|
+
*/
|
|
43
|
+
const it = [
|
|
44
|
+
["path", { d: "M12 4v16", key: "1654pz" }],
|
|
45
|
+
["path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2", key: "e0r10z" }],
|
|
46
|
+
["path", { d: "M9 20h6", key: "s66wpe" }]
|
|
47
|
+
], rt = L("type", it), st = ["fg", "muted", "accent", "border", "bg"], N = "--primary", D = 380, H = (t) => t.trim().replace(/^--/, "");
|
|
48
|
+
function R(t) {
|
|
49
|
+
const e = /* @__PURE__ */ new Set();
|
|
50
|
+
if (t.highlight) {
|
|
51
|
+
const o = t.highlightToken ?? N;
|
|
52
|
+
e.add(o), e.add(`${o}-foreground`);
|
|
53
|
+
}
|
|
54
|
+
return t.gauge && e.add(t.gauge.colorToken), [...e];
|
|
55
|
+
}
|
|
56
|
+
function M(t, e = []) {
|
|
57
|
+
const o = {
|
|
58
|
+
fg: "currentColor",
|
|
59
|
+
muted: "currentColor",
|
|
60
|
+
accent: "currentColor",
|
|
61
|
+
border: "currentColor",
|
|
62
|
+
bg: "transparent",
|
|
63
|
+
font: "sans-serif",
|
|
64
|
+
tokens: {}
|
|
65
|
+
};
|
|
66
|
+
if (!t) return o;
|
|
67
|
+
const n = (a) => {
|
|
68
|
+
const r = t.querySelector(`[data-k="${a}"]`);
|
|
69
|
+
return r && getComputedStyle(r).color || "currentColor";
|
|
70
|
+
}, i = {};
|
|
71
|
+
for (const a of e) {
|
|
72
|
+
const r = t.querySelector(
|
|
73
|
+
`[data-token="${H(a)}"]`
|
|
74
|
+
);
|
|
75
|
+
if (r) {
|
|
76
|
+
const u = getComputedStyle(r).color;
|
|
77
|
+
u && (i[a] = u);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
fg: n("fg"),
|
|
82
|
+
muted: n("muted"),
|
|
83
|
+
accent: n("accent"),
|
|
84
|
+
border: n("border"),
|
|
85
|
+
bg: n("bg"),
|
|
86
|
+
font: getComputedStyle(t).fontFamily || "sans-serif",
|
|
87
|
+
tokens: i
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
function _(t, e, o) {
|
|
91
|
+
var n;
|
|
92
|
+
return e ? ((n = t.tokens) == null ? void 0 : n[e]) ?? o : o;
|
|
93
|
+
}
|
|
94
|
+
const f = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
95
|
+
function O(t) {
|
|
96
|
+
const e = [t.title];
|
|
97
|
+
t.highlight && e.push(t.highlight);
|
|
98
|
+
for (const o of t.fields) e.push(`• ${o.label}: ${o.value}`);
|
|
99
|
+
return e.join(`
|
|
100
|
+
`);
|
|
101
|
+
}
|
|
102
|
+
function Y(t) {
|
|
103
|
+
const e = t.fields.map((n) => `<li>${f(n.label)}: ${f(n.value)}</li>`).join(""), o = t.highlight ? `<p><strong>${f(t.highlight)}</strong></p>` : "";
|
|
104
|
+
return `<p><strong>${f(t.title)}</strong></p>${o}<ul>${e}</ul>`;
|
|
105
|
+
}
|
|
106
|
+
const z = "AlfaDocs", m = 20, y = m + 18, T = 22, lt = 10, B = 22, S = 16, F = 12, ct = 12, V = 34, U = 9, k = (V + U) * 2;
|
|
107
|
+
function A(t, e) {
|
|
108
|
+
const o = e !== void 0 ? e : t.brand;
|
|
109
|
+
return o === !1 ? !1 : typeof o == "string" ? o : z;
|
|
110
|
+
}
|
|
111
|
+
function ut(t) {
|
|
112
|
+
if (typeof t.fraction == "number")
|
|
113
|
+
return Math.min(1, Math.max(0, t.fraction));
|
|
114
|
+
const e = parseFloat(t.value);
|
|
115
|
+
return Number.isFinite(e) && typeof t.max == "number" && t.max > 0 ? Math.min(1, Math.max(0, e / t.max)) : 1;
|
|
116
|
+
}
|
|
117
|
+
function W(t, e) {
|
|
118
|
+
const o = !!t.highlight, n = y + lt, i = (o ? n + T + S : y + S) + B - 6, a = i + Math.max(0, t.fields.length - 1) * B, r = o ? n : y, u = t.gauge ? r + k : 0, l = Math.max(a, u), c = e ? l + F + ct - 4 : l, d = Math.round(c + (e ? F : m));
|
|
119
|
+
return { hasChip: o, chipY: n, firstFieldY: i, fieldsEndY: a, footerY: c, height: d };
|
|
120
|
+
}
|
|
121
|
+
function q(t, e) {
|
|
122
|
+
return W(t, e !== !1).height;
|
|
123
|
+
}
|
|
124
|
+
function dt(t, e, o, n, i) {
|
|
125
|
+
const a = V, r = 2 * Math.PI * a, u = ut(t), l = _(e, t.colorToken, e.accent), c = typeof t.segments == "number" && t.segments > 1 ? t.segments : 0, d = c ? 3 : 0, g = c ? r / c - d : r, $ = c ? `${g} ${d}` : "", v = `${r * u} ${r}`, w = `transform="rotate(-90 ${n} ${i})"`, s = f(
|
|
126
|
+
t.label ? `${t.value} — ${t.label}` : t.value
|
|
127
|
+
), x = `<circle cx="${n}" cy="${i}" r="${a}" fill="none" stroke="${e.border}" stroke-width="${U}"${$ ? ` stroke-dasharray="${$}"` : ""} ${w}/>`, h = `<circle cx="${n}" cy="${i}" r="${a}" fill="none" stroke="${l}" stroke-width="${U}" stroke-linecap="round" stroke-dasharray="${v}" ${w}/>`, b = `<text x="${n}" y="${i + 1}" text-anchor="middle" dominant-baseline="middle" font-family="${o}" font-size="16" font-weight="700" fill="${e.fg}">${f(
|
|
128
|
+
t.value
|
|
129
|
+
)}</text>`, C = t.label ? `<text x="${n}" y="${i + 15}" text-anchor="middle" dominant-baseline="middle" font-family="${o}" font-size="9" fill="${e.muted}">${f(
|
|
130
|
+
t.label
|
|
131
|
+
)}</text>` : "";
|
|
132
|
+
return `<g role="img" aria-label="${s}"><title>${s}</title>${x}${h}${b}${C}</g>`;
|
|
133
|
+
}
|
|
134
|
+
function ft(t, e, o, n) {
|
|
135
|
+
const i = t.highlight, a = t.highlightToken ?? N, r = _(e, a, e.accent), u = _(e, `${a}-foreground`, e.bg), l = Math.round(i.length * 7.2 + 28), c = m + l / 2, d = n + T / 2 + 1;
|
|
136
|
+
return `<rect x="${m}" y="${n}" width="${l}" height="${T}" rx="${T / 2}" fill="${r}"/><text x="${c}" y="${d}" text-anchor="middle" dominant-baseline="middle" font-family="${o}" font-size="12" font-weight="600" fill="${u}">${f(
|
|
137
|
+
i
|
|
138
|
+
)}</text>`;
|
|
139
|
+
}
|
|
140
|
+
function P(t, e, o = z) {
|
|
141
|
+
const n = D, i = W(t, o !== !1), a = i.height, r = f(e.font);
|
|
142
|
+
t.gauge ? n - m - k - 12 : n - m;
|
|
143
|
+
const u = t.fields.map((g, $) => {
|
|
144
|
+
const v = i.firstFieldY + $ * B;
|
|
145
|
+
return `<text x="${m}" y="${v}" font-family="${r}" font-size="13"><tspan fill="${e.muted}">${f(
|
|
146
|
+
g.label
|
|
147
|
+
)}: </tspan><tspan fill="${e.fg}">${f(g.value)}</tspan></text>`;
|
|
148
|
+
}).join(""), l = i.hasChip ? ft(t, e, r, i.chipY) : "", c = t.gauge ? dt(
|
|
149
|
+
t.gauge,
|
|
150
|
+
e,
|
|
151
|
+
r,
|
|
152
|
+
n - m - k / 2,
|
|
153
|
+
(i.hasChip ? i.chipY : y) + k / 2
|
|
154
|
+
) : "", d = o !== !1 ? `<text x="${m}" y="${i.footerY}" font-family="${r}" font-size="10" fill="${e.muted}">${f(
|
|
155
|
+
o
|
|
156
|
+
)}</text>` : "";
|
|
157
|
+
return `<svg xmlns="http://www.w3.org/2000/svg" width="${n}" height="${a}" viewBox="0 0 ${n} ${a}" role="img" aria-label="${f(
|
|
158
|
+
t.title
|
|
159
|
+
)}"><rect x="0.5" y="0.5" width="${n - 1}" height="${a - 1}" rx="12" fill="${e.bg}" stroke="${e.border}"/><text x="${m}" y="${y}" font-family="${r}" font-size="16" font-weight="700" fill="${e.fg}">${f(
|
|
160
|
+
t.title
|
|
161
|
+
)}</text>${l}${c}${u}${d}</svg>`;
|
|
162
|
+
}
|
|
163
|
+
function mt() {
|
|
164
|
+
var t;
|
|
165
|
+
return typeof navigator < "u" && typeof ((t = navigator.clipboard) == null ? void 0 : t.write) == "function" && typeof ClipboardItem < "u";
|
|
166
|
+
}
|
|
167
|
+
function j(t, e, o) {
|
|
168
|
+
return new Promise((n, i) => {
|
|
169
|
+
const a = new Image();
|
|
170
|
+
a.decoding = "async", a.onload = () => {
|
|
171
|
+
const r = document.createElement("canvas");
|
|
172
|
+
r.width = e, r.height = o;
|
|
173
|
+
const u = r.getContext("2d");
|
|
174
|
+
if (!u) {
|
|
175
|
+
i(new Error("2D canvas context unavailable"));
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
u.drawImage(a, 0, 0, e, o), r.toBlob((l) => {
|
|
179
|
+
l ? n(l) : i(new Error("canvas.toBlob produced no PNG"));
|
|
180
|
+
}, "image/png");
|
|
181
|
+
}, a.onerror = () => i(new Error("SVG failed to decode as an image")), a.src = t;
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
function K() {
|
|
185
|
+
const t = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
|
|
186
|
+
return Math.max(2, t);
|
|
187
|
+
}
|
|
188
|
+
async function Mt(t, e = {}) {
|
|
189
|
+
return (await X(t, e)).dataUri;
|
|
190
|
+
}
|
|
191
|
+
async function X(t, e = {}) {
|
|
192
|
+
const { colours: o, scale: n = K() } = e, i = o ?? M(null), a = A(t, e.brand), r = P(t, i, a), u = `data:image/svg+xml,${encodeURIComponent(r)}`, l = D, c = q(t, a), d = await j(
|
|
193
|
+
u,
|
|
194
|
+
Math.round(l * n),
|
|
195
|
+
Math.round(c * n)
|
|
196
|
+
);
|
|
197
|
+
return { dataUri: await gt(d), width: l, height: c };
|
|
198
|
+
}
|
|
199
|
+
function gt(t) {
|
|
200
|
+
return new Promise((e, o) => {
|
|
201
|
+
const n = new FileReader();
|
|
202
|
+
n.onload = () => e(String(n.result)), n.onerror = () => o(n.error ?? new Error("FileReader error")), n.readAsDataURL(t);
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
async function ht(t, e, o) {
|
|
206
|
+
const n = O(e), i = new Blob([n], { type: "text/plain" });
|
|
207
|
+
if (t === "text")
|
|
208
|
+
return new ClipboardItem({ "text/plain": i });
|
|
209
|
+
const a = A(e, void 0), r = P(e, o, a), u = `data:image/svg+xml,${encodeURIComponent(r)}`, l = K(), c = await j(
|
|
210
|
+
u,
|
|
211
|
+
Math.round(D * l),
|
|
212
|
+
Math.round(q(e, a) * l)
|
|
213
|
+
);
|
|
214
|
+
if (t === "image")
|
|
215
|
+
return new ClipboardItem({ "image/png": c, "text/plain": i });
|
|
216
|
+
const d = new Blob([Y(e)], { type: "text/html" });
|
|
217
|
+
return new ClipboardItem({
|
|
218
|
+
"text/html": d,
|
|
219
|
+
"image/png": c,
|
|
220
|
+
"text/plain": i
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
const pt = tt(
|
|
224
|
+
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
225
|
+
{
|
|
226
|
+
variants: {
|
|
227
|
+
variant: {
|
|
228
|
+
insert: "",
|
|
229
|
+
copy: ""
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
defaultVariants: { variant: "insert" }
|
|
233
|
+
}
|
|
234
|
+
), $t = ["text", "image", "text-image"], xt = {
|
|
235
|
+
text: /* @__PURE__ */ p(rt, { "aria-hidden": !0 }),
|
|
236
|
+
image: /* @__PURE__ */ p(nt, { "aria-hidden": !0 }),
|
|
237
|
+
"text-image": /* @__PURE__ */ p(at, { "aria-hidden": !0 })
|
|
238
|
+
}, G = {
|
|
239
|
+
insert: {
|
|
240
|
+
text: "insert.text",
|
|
241
|
+
image: "insert.image",
|
|
242
|
+
"text-image": "insert.textImage"
|
|
243
|
+
},
|
|
244
|
+
copy: {
|
|
245
|
+
text: "insert.copyText",
|
|
246
|
+
image: "insert.copyImage",
|
|
247
|
+
"text-image": "insert.copyTextImage"
|
|
248
|
+
}
|
|
249
|
+
}, bt = J(
|
|
250
|
+
function({
|
|
251
|
+
card: e,
|
|
252
|
+
variant: o = "insert",
|
|
253
|
+
onInsert: n,
|
|
254
|
+
onCopy: i,
|
|
255
|
+
onError: a,
|
|
256
|
+
size: r = "sm",
|
|
257
|
+
intent: u = "primary"
|
|
258
|
+
}, l) {
|
|
259
|
+
const { t: c } = Z(), d = Q(null), g = (s) => {
|
|
260
|
+
const x = O(e), h = Y(e);
|
|
261
|
+
let b = "", C = "";
|
|
262
|
+
const I = s === "text" ? null : M(d.current, R(e));
|
|
263
|
+
return I && (b = P(e, I, A(e, void 0)), C = `data:image/svg+xml,${encodeURIComponent(b)}`), { mode: s, text: x, html: h, svg: b, imageDataUri: C, pngDataUri: () => I ? X(e, { colours: I }) : Promise.resolve({ dataUri: "", width: 0, height: 0 }) };
|
|
264
|
+
}, w = o === "copy" ? (s) => {
|
|
265
|
+
if (!mt()) {
|
|
266
|
+
a == null || a(new Error("Clipboard write unavailable in this context"));
|
|
267
|
+
return;
|
|
268
|
+
}
|
|
269
|
+
const x = M(
|
|
270
|
+
d.current,
|
|
271
|
+
R(e)
|
|
272
|
+
);
|
|
273
|
+
(async () => {
|
|
274
|
+
try {
|
|
275
|
+
const h = await ht(s, e, x);
|
|
276
|
+
await navigator.clipboard.write([h]), i == null || i(s);
|
|
277
|
+
} catch (h) {
|
|
278
|
+
a == null || a(h);
|
|
279
|
+
}
|
|
280
|
+
})();
|
|
281
|
+
} : (s) => {
|
|
282
|
+
n == null || n(g(s));
|
|
283
|
+
};
|
|
284
|
+
return /* @__PURE__ */ E(
|
|
285
|
+
"div",
|
|
286
|
+
{
|
|
287
|
+
ref: l,
|
|
288
|
+
"data-component": "insert-result",
|
|
289
|
+
"data-variant": o,
|
|
290
|
+
className: pt({ variant: o }),
|
|
291
|
+
children: [
|
|
292
|
+
/* @__PURE__ */ E("span", { ref: d, "aria-hidden": !0, className: "ds:sr-only", children: [
|
|
293
|
+
st.map((s) => /* @__PURE__ */ p(
|
|
294
|
+
"span",
|
|
295
|
+
{
|
|
296
|
+
"data-k": s,
|
|
297
|
+
className: s === "fg" ? "ds:text-foreground" : s === "muted" ? "ds:text-muted-foreground" : s === "accent" ? "ds:text-[color:var(--primary)]" : s === "border" ? "ds:text-[color:var(--border)]" : "ds:text-[color:var(--card)]"
|
|
298
|
+
},
|
|
299
|
+
s
|
|
300
|
+
)),
|
|
301
|
+
R(e).map((s) => /* @__PURE__ */ p(
|
|
302
|
+
"span",
|
|
303
|
+
{
|
|
304
|
+
"data-token": H(s),
|
|
305
|
+
className: `ds:text-[color:var(${s})]`
|
|
306
|
+
},
|
|
307
|
+
s
|
|
308
|
+
))
|
|
309
|
+
] }),
|
|
310
|
+
$t.map((s) => /* @__PURE__ */ p(
|
|
311
|
+
et,
|
|
312
|
+
{
|
|
313
|
+
type: "button",
|
|
314
|
+
intent: u,
|
|
315
|
+
size: r,
|
|
316
|
+
startIcon: xt[s],
|
|
317
|
+
"aria-label": c(G[o][s]),
|
|
318
|
+
onClick: () => w(s),
|
|
319
|
+
children: c(G[o][s])
|
|
320
|
+
},
|
|
321
|
+
s
|
|
322
|
+
))
|
|
323
|
+
]
|
|
324
|
+
}
|
|
325
|
+
);
|
|
326
|
+
}
|
|
327
|
+
);
|
|
328
|
+
bt.displayName = "InsertButton";
|
|
329
|
+
export {
|
|
330
|
+
bt as I,
|
|
331
|
+
Mt as a,
|
|
332
|
+
X as s
|
|
333
|
+
};
|
|
334
|
+
//# sourceMappingURL=insert-result-CoC1oo6R.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as l } from "./isSameDay-DUEiAT0G.js";
|
|
2
|
-
import { s as r } from "./
|
|
2
|
+
import { s as r } from "./date-picker-variants-DLi1Va_e.js";
|
|
3
3
|
function i(a, m, e) {
|
|
4
4
|
const [t, f] = l(
|
|
5
5
|
e == null ? void 0 : e.in,
|
|
@@ -11,4 +11,4 @@ function i(a, m, e) {
|
|
|
11
11
|
export {
|
|
12
12
|
i
|
|
13
13
|
};
|
|
14
|
-
//# sourceMappingURL=isSameWeek-
|
|
14
|
+
//# sourceMappingURL=isSameWeek-HfxKk6Lz.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as d } from "./isSameWeek-
|
|
1
|
+
import { q as s, r as i, v as r, w as l } from "./date-picker-variants-DLi1Va_e.js";
|
|
2
|
+
import { i as d } from "./isSameWeek-HfxKk6Lz.js";
|
|
3
3
|
const c = {
|
|
4
4
|
lessThanXSeconds: {
|
|
5
5
|
one: "meno di un secondo",
|
|
@@ -135,10 +135,10 @@ const P = {
|
|
|
135
135
|
return d(e, n, a) ? u(t) : z(t);
|
|
136
136
|
},
|
|
137
137
|
other: "P"
|
|
138
|
-
},
|
|
138
|
+
}, w = (e, n, a, t) => {
|
|
139
139
|
const o = P[e];
|
|
140
140
|
return typeof o == "function" ? o(n, a, t) : o;
|
|
141
|
-
},
|
|
141
|
+
}, M = {
|
|
142
142
|
narrow: ["aC", "dC"],
|
|
143
143
|
abbreviated: ["a.C.", "d.C."],
|
|
144
144
|
wide: ["avanti Cristo", "dopo Cristo"]
|
|
@@ -257,7 +257,7 @@ const P = {
|
|
|
257
257
|
}, V = {
|
|
258
258
|
ordinalNumber: x,
|
|
259
259
|
era: i({
|
|
260
|
-
values:
|
|
260
|
+
values: M,
|
|
261
261
|
defaultWidth: "wide"
|
|
262
262
|
}),
|
|
263
263
|
quarter: i({
|
|
@@ -387,7 +387,7 @@ const P = {
|
|
|
387
387
|
code: "it",
|
|
388
388
|
formatDistance: g,
|
|
389
389
|
formatLong: p,
|
|
390
|
-
formatRelative:
|
|
390
|
+
formatRelative: w,
|
|
391
391
|
localize: V,
|
|
392
392
|
match: G,
|
|
393
393
|
options: {
|
|
@@ -398,4 +398,4 @@ const P = {
|
|
|
398
398
|
export {
|
|
399
399
|
I as it
|
|
400
400
|
};
|
|
401
|
-
//# sourceMappingURL=it-
|
|
401
|
+
//# sourceMappingURL=it-Y85ofIQQ.js.map
|