@alfadocs/ui-kit 0.64.0 → 0.65.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/{agenda-tray-DA6qj8BL.js → agenda-tray-Bh1KfEOG.js} +2 -2
- package/dist/_chunks/{ai-consent-banner-DBKV27je.js → ai-consent-banner-Btzmk8OH.js} +3 -2
- package/dist/_chunks/{ai-prompt-input-Dx8eXoPm.js → ai-prompt-input-BwEACCPm.js} +2 -2
- package/dist/_chunks/{ai-tools-rail-7tC3GT4h.js → ai-tools-rail-JnlTqfS4.js} +2 -2
- package/dist/_chunks/{alia-sidebar-DlvyXgVC.js → alia-sidebar-CN8pA6c-.js} +7 -7
- package/dist/_chunks/{anamnesis-card-CmkBVAln.js → anamnesis-card-qeLYRG79.js} +2 -2
- package/dist/_chunks/{antenatal-schedule-timeline-CdiqkF05.js → antenatal-schedule-timeline-BfzFjEyb.js} +3 -3
- package/dist/_chunks/{appointment-tray-BwDHhWWC.js → appointment-tray-BQnJEora.js} +2 -2
- package/dist/_chunks/{ar-C68WKG5a.js → ar-Cn5Fq48Z.js} +2 -2
- package/dist/_chunks/{audio-recorder-CdXuT9ln.js → audio-recorder-DjXLP4aF.js} +2 -2
- package/dist/_chunks/{autocomplete-CDqxB68B.js → autocomplete-CcCFlVf-.js} +4 -4
- package/dist/_chunks/{bishop-score-CzjSx-dm.js → bishop-score-x2fNqbuZ.js} +2 -2
- package/dist/_chunks/{bmi-calculator-DA2NGmVK.js → bmi-calculator-C3roxbqD.js} +2 -2
- package/dist/_chunks/{booking-ChfvWy3P.js → booking-L8-YP8BJ.js} +148 -148
- package/dist/_chunks/calendar-B6soK1Yb.js +17 -0
- package/dist/_chunks/{calendar-CkuJIg3s.js → calendar-oYWOCrnf.js} +1 -1
- package/dist/_chunks/{care-plan-card-DhZNoXs4.js → care-plan-card-D42WD4-T.js} +2 -2
- package/dist/_chunks/{care-plan-entry-card-DW70yBOD.js → care-plan-entry-card-BukNI7Uy.js} +2 -2
- package/dist/_chunks/{carousel.agent-DrX96W-1.js → carousel.agent-vt21A_el.js} +2 -2
- package/dist/_chunks/{chat-input-CFwc7JxL.js → chat-input-B5zjNEUN.js} +2 -2
- package/dist/_chunks/{chat-message-Dm8U2RY1.js → chat-message-3V54YipB.js} +2 -2
- package/dist/_chunks/{code-block-HoddNOKJ.js → code-block-BBWHhIc8.js} +2 -2
- package/dist/_chunks/{contact-profile-card-DvvVfAA2.js → contact-profile-card-CCeJmjbd.js} +2 -2
- package/dist/_chunks/{cycle-calculator-C_t1Hs8V.js → cycle-calculator-DrVXbIB4.js} +4 -4
- package/dist/_chunks/{date-picker-BfHblqwA.js → date-picker-oGg5BnXL.js} +12 -11
- package/dist/_chunks/{date-picker-variants-CXEAx3O_.js → date-picker-variants-DAcSLTua.js} +358 -372
- package/dist/_chunks/{date-range-picker-hcAMs1wO.js → date-range-picker-C5BWfH_T.js} +34 -25
- package/dist/_chunks/{date-time-picker-H-3Pwqlb.js → date-time-picker-Ze1My59T.js} +18 -17
- package/dist/_chunks/{de-DK4A9_a8.js → de-CrJs4ZsX.js} +2 -2
- package/dist/_chunks/{description-list-BEbK2g93.js → description-list-gkNGWk5G.js} +2 -2
- package/dist/_chunks/{due-date-calculator-Q8MIwEVV.js → due-date-calculator-D4K1BnE2.js} +4 -4
- package/dist/_chunks/{editable-currency-cell-renderer-BQgaKFCz.js → editable-currency-cell-renderer-CFqQc56y.js} +304 -294
- package/dist/_chunks/editor-overlay-wYm22wZK.js +88 -0
- package/dist/_chunks/{el-B29HXhG5.js → el-DHdMOIhL.js} +6 -6
- package/dist/_chunks/{es-BOwPVwWn.js → es-DCATCfqo.js} +2 -2
- package/dist/_chunks/{fetal-weight-D1a6BmM-.js → fetal-weight-B_pBjlO7.js} +2 -2
- package/dist/_chunks/{fiscal-code-input-BZ0FxwUl.js → fiscal-code-input-DPtqluVb.js} +2 -2
- package/dist/_chunks/{fr-DoDBtn0T.js → fr-BfGEMshF.js} +2 -2
- package/dist/_chunks/{freemium-paywall-gHGA44dW.js → freemium-paywall-CkWjv3o6.js} +2 -2
- package/dist/_chunks/{gestational-age-calculator-D85E8lGN.js → gestational-age-calculator-BETQAVkA.js} +6 -6
- package/dist/_chunks/{hcg-doubling-Dg0Hr7ey.js → hcg-doubling-8zXCJgAQ.js} +3 -3
- package/dist/_chunks/{header-Ce1Br27u.js → header-CNszv2WQ.js} +2 -2
- package/dist/_chunks/{header-settings-D5Z2B_Yz.js → header-settings-CNOqIhoW.js} +3 -3
- package/dist/_chunks/{hi-DGByrKby.js → hi-CBFRXEIm.js} +2 -2
- package/dist/_chunks/icon-button-LqoiKcUN.js +78 -0
- package/dist/_chunks/{insert-result-C1SYdueh.js → insert-result-DIAG3ltJ.js} +115 -136
- package/dist/_chunks/{isSameWeek-B1odL2vR.js → isSameWeek-I3DfXUp1.js} +2 -2
- package/dist/_chunks/{it-B16rEecm.js → it-nz6vAKwG.js} +7 -7
- package/dist/_chunks/{ja-B0viOgft.js → ja-DQcqdAEJ.js} +2 -2
- package/dist/_chunks/{key-value-pair-CkQIb9EG.js → key-value-pair-BrgbMfbF.js} +2 -2
- package/dist/_chunks/{locale-picker-D99UyZVJ.js → locale-picker-C9JmBht3.js} +3 -3
- package/dist/_chunks/{marketplace-app-shell-C4OYAC22.js → marketplace-app-shell-BXfRMiRk.js} +4 -4
- package/dist/_chunks/{message-card-Dvl1TgaN.js → message-card-Bgcvfj6-.js} +2 -2
- package/dist/_chunks/{message-tray-Dl6GQaaV.js → message-tray-saAVMeHP.js} +3 -3
- package/dist/_chunks/{multi-select-DOLO3K_z.js → multi-select-BcPylvHR.js} +100 -90
- package/dist/_chunks/{nl-cBxEX2QU.js → nl-L5SuDjyl.js} +2 -2
- package/dist/_chunks/{notification-card-CObnGdJu.js → notification-card-BiESdm8q.js} +2 -2
- package/dist/_chunks/{notification-tray-BWHDIjgd.js → notification-tray-DlgenTEe.js} +3 -3
- package/dist/_chunks/{patient-search-CArmRKeg.js → patient-search-Bw9ONucF.js} +2 -2
- package/dist/_chunks/{patient-shell-Coarf346.js → patient-shell-CF_qon7C.js} +3 -3
- package/dist/_chunks/{patient-summary-card-BnTqxcTr.js → patient-summary-card-Bgso0p_l.js} +2 -2
- package/dist/_chunks/{payment-form-DJ9vnzrT.js → payment-form-nXocS_MX.js} +11 -4
- package/dist/_chunks/{payment-request-card-B_lyobd0.js → payment-request-card-DBz3hVDz.js} +3 -3
- package/dist/_chunks/{pdf-viewer-chMpwpA4.js → pdf-viewer-GsfNqeeT.js} +3 -3
- package/dist/_chunks/{periodontal-chart-card-BYs9hax1.js → periodontal-chart-card-AYyHtU9K.js} +2 -2
- package/dist/_chunks/phone-input-DVXhNlIl.js +563 -0
- package/dist/_chunks/{pl-DtS08ioY.js → pl-YAn5z2wR.js} +3 -3
- package/dist/_chunks/{popover-Devce-tT.js → popover-DTbfAuR0.js} +2 -2
- package/dist/_chunks/{practice-results-CtfciF2v.js → practice-results-CVAgY2RZ.js} +3 -3
- package/dist/_chunks/{pregnancy-dating-7NUaAfob.js → pregnancy-dating-BuzLTwjy.js} +6 -6
- package/dist/_chunks/{pregnancy-weight-gain-DI7X-0JX.js → pregnancy-weight-gain-aicn7qs7.js} +2 -2
- package/dist/_chunks/{privacy-lock-BN3L-alb.js → privacy-lock-C7JyMf0y.js} +2 -2
- package/dist/_chunks/{product-hub-panel-CkfZBA3t.js → product-hub-panel-CAXDFeGP.js} +2 -2
- package/dist/_chunks/{pt-yFXs1VvH.js → pt-D9xdT5KQ.js} +6 -6
- package/dist/_chunks/{public-header.agent-CYQK6T6F.js → public-header.agent-BOhJgZEU.js} +3 -3
- package/dist/_chunks/{reviews-panel-CPrXu5TX.js → reviews-panel-DBktKm7i.js} +2 -2
- package/dist/_chunks/rich-text-editor-u36FqSWz.js +1190 -0
- package/dist/_chunks/{ro-DsCzSrzR.js → ro-Cp--52bT.js} +2 -2
- package/dist/_chunks/{ru-DgDxL0pc.js → ru-BM8eX_Zz.js} +3 -3
- package/dist/_chunks/{search-bar-CvN_S0jW.js → search-bar-SY2BcV2N.js} +2 -2
- package/dist/_chunks/{search-input-D3aMvi4l.js → search-input-DbxrnHkW.js} +3 -3
- package/dist/_chunks/{sheet-xbzu4YiY.js → sheet-taJer-Ha.js} +2 -2
- package/dist/_chunks/{sign-document--nr5cxsB.js → sign-document-CdAiHiCh.js} +2 -2
- package/dist/_chunks/{sign-in-with-alfadocs-button-BpAjVmsI.js → sign-in-with-alfadocs-button-LppxjlFt.js} +2 -2
- package/dist/_chunks/{signature-field-DbhbpLha.js → signature-field-Dy1JRjzE.js} +10 -3
- package/dist/_chunks/{slot-grid-BlHHP9Qy.js → slot-grid-FsqumOaS.js} +2 -2
- package/dist/_chunks/smart-date-CWikAqZx.js +114 -0
- package/dist/_chunks/{social-sign-in-button-uJYLM366.js → social-sign-in-button-dlpPI5l7.js} +2 -2
- package/dist/_chunks/{spinner-OjQNn8oN.js → spinner-hbwuKwMf.js} +10 -10
- package/dist/_chunks/{sq-DHlCYN67.js → sq-XRpr0r49.js} +6 -6
- package/dist/_chunks/{streaming-text-CfhDqtIT.js → streaming-text-BB9mvK4m.js} +2 -2
- package/dist/_chunks/subDays-BcYv1Lxi.js +8 -0
- package/dist/_chunks/{sv-O0QaQs_s.js → sv-Z3APomE8.js} +2 -2
- package/dist/_chunks/{task-tray-Cb_hK4yb.js → task-tray-CAncV-QQ.js} +2 -2
- package/dist/_chunks/{theme-toggle-DAW7uC0B.js → theme-toggle-DETmSu_h.js} +2 -2
- package/dist/_chunks/{toast.agent-B0MCsvdZ.js → toast.agent-vuLRRn2a.js} +2 -2
- package/dist/_chunks/{tooth-scheme-CiphQaON.js → tooth-scheme-BIx1O2aJ.js} +3 -3
- package/dist/_chunks/{tr-BmNDRuio.js → tr-e0-P4FON.js} +2 -2
- package/dist/_chunks/{transcript-panel-B4HiC7ed.js → transcript-panel-CLHmv83g.js} +2 -2
- package/dist/_chunks/type-DZ5OMRA2.js +28 -0
- package/dist/_chunks/{unit-converter-BIbXHIQA.js → unit-converter-CHN2cZ4b.js} +2 -2
- package/dist/_chunks/{wallet-pay-button-DuDPBlCO.js → wallet-pay-button--dnR6NfJ.js} +2 -2
- package/dist/_chunks/{workflow-map-BJDUNYlX.js → workflow-map-BX3JY1Bu.js} +3 -3
- package/dist/_chunks/{zh-CN-CgVJZEzz.js → zh-CN-B-igM5gY.js} +3 -3
- package/dist/agent-catalog.json +32 -1
- package/dist/components/agenda-tray/index.js +1 -1
- package/dist/components/ai-consent-banner/index.js +1 -1
- package/dist/components/ai-prompt-input/index.js +1 -1
- package/dist/components/ai-tools-rail/index.js +1 -1
- package/dist/components/anamnesis-card/index.js +1 -1
- package/dist/components/appointment-card/index.js +1 -1
- package/dist/components/audio-recorder/index.js +1 -1
- package/dist/components/autocomplete/index.js +1 -1
- package/dist/components/bishop-score/index.js +1 -1
- package/dist/components/bmi-calculator/index.js +1 -1
- package/dist/components/booking/index.js +1 -1
- package/dist/components/button/index.js +1 -1
- package/dist/components/calendar/index.js +1 -1
- package/dist/components/care-plan-card/index.js +1 -1
- package/dist/components/care-plan-entry-card/index.js +1 -1
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/chat-input/index.js +1 -1
- package/dist/components/chat-message/index.js +1 -1
- package/dist/components/contact-profile-card/index.js +1 -1
- package/dist/components/cycle-calculator/index.js +1 -1
- package/dist/components/data-table/index.js +1 -1
- package/dist/components/date-picker/index.js +1 -1
- package/dist/components/date-range-picker/index.js +1 -1
- package/dist/components/date-time-picker/index.js +1 -1
- package/dist/components/description-list/index.js +1 -1
- package/dist/components/due-date-calculator/index.js +2 -2
- package/dist/components/editor-overlay/editor-overlay.d.ts +19 -0
- package/dist/components/editor-overlay/index.d.ts +3 -0
- package/dist/components/editor-overlay/index.js +5 -0
- package/dist/components/fetal-weight/index.js +1 -1
- package/dist/components/fiscal-code-input/index.js +1 -1
- package/dist/components/freemium-paywall/index.js +1 -1
- package/dist/components/gestational-age-calculator/index.js +1 -1
- package/dist/components/hcg-doubling/index.js +1 -1
- package/dist/components/header/index.js +1 -1
- package/dist/components/header-settings/index.js +1 -1
- package/dist/components/icon-button/index.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/key-value-pair/index.js +1 -1
- package/dist/components/locale-picker/index.js +1 -1
- package/dist/components/message-card/index.js +1 -1
- package/dist/components/message-tray/index.js +1 -1
- package/dist/components/multi-select/index.js +1 -1
- package/dist/components/notification-card/index.js +1 -1
- package/dist/components/notification-tray/index.js +1 -1
- package/dist/components/patient-search/index.js +1 -1
- package/dist/components/patient-summary-card/index.js +1 -1
- package/dist/components/payment-card/index.js +1 -1
- package/dist/components/payment-form/index.js +1 -1
- package/dist/components/pdf-viewer/index.js +1 -1
- package/dist/components/periodontal-chart-card/index.js +1 -1
- package/dist/components/phone-input/index.js +1 -1
- package/dist/components/phone-input/phone-input.d.ts +9 -0
- package/dist/components/popover/index.js +1 -1
- package/dist/components/practice-results/index.js +1 -1
- package/dist/components/pregnancy-dating/index.js +1 -1
- package/dist/components/pregnancy-weight-gain/index.js +1 -1
- package/dist/components/privacy-lock/index.js +1 -1
- package/dist/components/product-hub-tray/index.js +1 -1
- package/dist/components/public-header/index.js +1 -1
- package/dist/components/reviews-panel/index.js +1 -1
- package/dist/components/rich-text-editor/editor-toolbar.d.ts +16 -0
- package/dist/components/rich-text-editor/help-me-write-overlay.d.ts +25 -0
- package/dist/components/rich-text-editor/index.js +1 -1
- package/dist/components/rich-text-editor/rich-text-editor.d.ts +43 -0
- package/dist/components/search-bar/index.js +1 -1
- package/dist/components/search-input/index.js +1 -1
- package/dist/components/sheet/index.js +1 -1
- package/dist/components/sign-document/index.js +1 -1
- package/dist/components/sign-in-with-alfadocs-button/index.js +1 -1
- package/dist/components/signature-field/index.js +1 -1
- package/dist/components/slot-grid/index.js +1 -1
- package/dist/components/smart-date/index.d.ts +3 -0
- package/dist/components/smart-date/index.js +5 -0
- package/dist/components/smart-date/smart-date.d.ts +32 -0
- package/dist/components/social-sign-in-button/index.js +1 -1
- package/dist/components/spinner/index.js +1 -1
- package/dist/components/streaming-text/index.js +1 -1
- package/dist/components/task-tray/index.js +1 -1
- package/dist/components/theme-toggle/index.js +1 -1
- package/dist/components/toast/index.js +1 -1
- package/dist/components/tooth-scheme/index.js +1 -1
- package/dist/components/transcript-panel/index.js +1 -1
- package/dist/components/unit-converter/index.js +1 -1
- package/dist/components/wallet-pay-button/index.js +1 -1
- package/dist/components/workflow/index.js +1 -1
- package/dist/i18n/locales/ar.d.ts +44 -0
- package/dist/i18n/locales/ar.js +45 -1
- package/dist/i18n/locales/de.d.ts +44 -0
- package/dist/i18n/locales/de.js +45 -1
- package/dist/i18n/locales/el.d.ts +44 -0
- package/dist/i18n/locales/el.js +45 -1
- package/dist/i18n/locales/en.d.ts +44 -0
- package/dist/i18n/locales/en.js +49 -1
- package/dist/i18n/locales/es.d.ts +44 -0
- package/dist/i18n/locales/es.js +45 -1
- package/dist/i18n/locales/fr.d.ts +44 -0
- package/dist/i18n/locales/fr.js +45 -1
- package/dist/i18n/locales/hi.d.ts +44 -0
- package/dist/i18n/locales/hi.js +45 -1
- package/dist/i18n/locales/it.d.ts +44 -0
- package/dist/i18n/locales/it.js +45 -1
- package/dist/i18n/locales/ja.d.ts +44 -0
- package/dist/i18n/locales/ja.js +45 -1
- package/dist/i18n/locales/nl.d.ts +44 -0
- package/dist/i18n/locales/nl.js +45 -1
- package/dist/i18n/locales/pl.d.ts +44 -0
- package/dist/i18n/locales/pl.js +45 -1
- package/dist/i18n/locales/pt.d.ts +44 -0
- package/dist/i18n/locales/pt.js +45 -1
- package/dist/i18n/locales/ro.d.ts +44 -0
- package/dist/i18n/locales/ro.js +45 -1
- package/dist/i18n/locales/ru.d.ts +44 -0
- package/dist/i18n/locales/ru.js +45 -1
- package/dist/i18n/locales/sq.d.ts +44 -0
- package/dist/i18n/locales/sq.js +45 -1
- package/dist/i18n/locales/sv.d.ts +44 -0
- package/dist/i18n/locales/sv.js +45 -1
- package/dist/i18n/locales/tr.d.ts +44 -0
- package/dist/i18n/locales/tr.js +45 -1
- package/dist/i18n/locales/zh.d.ts +44 -0
- package/dist/i18n/locales/zh.js +45 -1
- package/dist/index.js +494 -490
- package/dist/locales/ar.json +45 -1
- package/dist/locales/de.json +45 -1
- package/dist/locales/el.json +45 -1
- package/dist/locales/en.json +45 -1
- package/dist/locales/es.json +45 -1
- package/dist/locales/fr.json +45 -1
- package/dist/locales/hi.json +45 -1
- package/dist/locales/it.json +45 -1
- package/dist/locales/ja.json +45 -1
- package/dist/locales/nl.json +45 -1
- package/dist/locales/pl.json +45 -1
- package/dist/locales/pt.json +45 -1
- package/dist/locales/ro.json +45 -1
- package/dist/locales/ru.json +45 -1
- package/dist/locales/sq.json +45 -1
- package/dist/locales/sv.json +45 -1
- package/dist/locales/tr.json +45 -1
- package/dist/locales/zh.json +45 -1
- package/dist/patterns/alia-assistant/index.js +1 -1
- package/dist/patterns/marketplace-app-shell/index.js +1 -1
- package/dist/patterns/patient-shell/index.js +1 -1
- package/dist/tokens.css +36 -22
- package/package.json +10 -1
- package/dist/_chunks/icon-button-CKEOrN37.js +0 -70
- package/dist/_chunks/phone-input-DfZbPPvh.js +0 -525
- package/dist/_chunks/rich-text-editor-B03qM22-.js +0 -334
- package/dist/_chunks/subDays-Bs00akhK.js +0 -8
|
@@ -1,33 +1,12 @@
|
|
|
1
1
|
import { jsxs as P, jsx as g } from "react/jsx-runtime";
|
|
2
|
-
import { forwardRef as ht, useRef as
|
|
3
|
-
import { useTranslation as
|
|
4
|
-
import { c as
|
|
5
|
-
import { B as
|
|
6
|
-
import { L as
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
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 Pt = [
|
|
15
|
-
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", ry: "2", key: "1m3agn" }],
|
|
16
|
-
["circle", { cx: "9", cy: "9", r: "2", key: "af1f0g" }],
|
|
17
|
-
["path", { d: "m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21", key: "1xmnt7" }]
|
|
18
|
-
], Ft = pt("image", Pt);
|
|
19
|
-
/**
|
|
20
|
-
* @license lucide-react v1.8.0 - ISC
|
|
21
|
-
*
|
|
22
|
-
* This source code is licensed under the ISC license.
|
|
23
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
24
|
-
*/
|
|
25
|
-
const Ot = [
|
|
26
|
-
["path", { d: "M12 4v16", key: "1654pz" }],
|
|
27
|
-
["path", { d: "M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2", key: "e0r10z" }],
|
|
28
|
-
["path", { d: "M9 20h6", key: "s66wpe" }]
|
|
29
|
-
], Ut = pt("type", Ot), zt = 15, at = 40, Wt = [18.5, 25, 30];
|
|
30
|
-
function Mn() {
|
|
2
|
+
import { forwardRef as ht, useRef as St } from "react";
|
|
3
|
+
import { useTranslation as Dt } from "react-i18next";
|
|
4
|
+
import { c as Nt } from "./index-D2ZczOXr.js";
|
|
5
|
+
import { B as Gt } from "./button-DD_0Xdmr.js";
|
|
6
|
+
import { L as Ht } from "./layers-pzGcbLPj.js";
|
|
7
|
+
import { I as Rt, T as Pt } from "./type-DZ5OMRA2.js";
|
|
8
|
+
const Ft = 15, at = 40, Ot = [18.5, 25, 30];
|
|
9
|
+
function Tn() {
|
|
31
10
|
return {
|
|
32
11
|
bands: [
|
|
33
12
|
{ upTo: 18.5, colorToken: "--info" },
|
|
@@ -35,19 +14,19 @@ function Mn() {
|
|
|
35
14
|
{ upTo: 30, colorToken: "--warning-readable" },
|
|
36
15
|
{ upTo: at, colorToken: "--destructive" }
|
|
37
16
|
],
|
|
38
|
-
min:
|
|
17
|
+
min: Ft,
|
|
39
18
|
max: at,
|
|
40
|
-
ticks: [...
|
|
19
|
+
ticks: [...Ot]
|
|
41
20
|
};
|
|
42
21
|
}
|
|
43
|
-
const V = 14, j = 12,
|
|
22
|
+
const V = 14, j = 12, Ut = j / 2, ot = 18, zt = 12, Wt = 16;
|
|
44
23
|
function N(t, n, i, a, o) {
|
|
45
24
|
if (i <= n) return a;
|
|
46
25
|
const r = (t - n) / (i - n);
|
|
47
26
|
return a + r * (o - a);
|
|
48
27
|
}
|
|
49
|
-
function
|
|
50
|
-
const a = V, o = n - V, r = ot +
|
|
28
|
+
function pt(t, { width: n, height: i }) {
|
|
29
|
+
const a = V, o = n - V, r = ot + zt, e = ot, c = r + j + Wt;
|
|
51
30
|
let u = t.min;
|
|
52
31
|
const d = t.bands.map((l) => {
|
|
53
32
|
const T = Math.max(t.min, Math.min(u, t.max)), y = Math.max(t.min, Math.min(l.upTo, t.max));
|
|
@@ -65,7 +44,7 @@ function bt(t, { width: n, height: i }) {
|
|
|
65
44
|
barEnd: o,
|
|
66
45
|
barY: r,
|
|
67
46
|
barH: j,
|
|
68
|
-
barRadius:
|
|
47
|
+
barRadius: Ut,
|
|
69
48
|
bands: d,
|
|
70
49
|
marker: {
|
|
71
50
|
x: k,
|
|
@@ -82,23 +61,23 @@ function bt(t, { width: n, height: i }) {
|
|
|
82
61
|
};
|
|
83
62
|
}
|
|
84
63
|
const s = (t) => Math.round(t * 100) / 100, M = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
85
|
-
function
|
|
64
|
+
function bt(t, n, i, a, o, r) {
|
|
86
65
|
const e = t + i, c = n + a, u = r > 0 ? `A${r} ${r} 0 0 1 ${s(e)} ${s(n + r)}` : "", d = r > 0 ? `A${r} ${r} 0 0 1 ${s(e - r)} ${s(c)}` : "", f = o > 0 ? `A${o} ${o} 0 0 1 ${s(t)} ${s(c - o)}` : "", b = o > 0 ? `A${o} ${o} 0 0 1 ${s(t + o)} ${s(n)}` : "";
|
|
87
66
|
return `M${s(t + o)} ${s(n)} H${s(e - r)} ${u} V${s(
|
|
88
67
|
c - r
|
|
89
68
|
)} ${d} H${s(t + o)} ${f} V${s(n + o)} ${b} Z`;
|
|
90
69
|
}
|
|
91
|
-
function
|
|
70
|
+
function Xt(t, n) {
|
|
92
71
|
const { resolve: i, font: a, fg: o, muted: r, track: e } = n, c = M(a), u = `<rect x="${s(t.barStart)}" y="${s(
|
|
93
72
|
t.barY
|
|
94
73
|
)}" width="${s(t.barEnd - t.barStart)}" height="${t.barH}" rx="${t.barRadius}" fill="${e}"/>`, d = t.bands.length, f = t.bands.map((m, x) => {
|
|
95
|
-
const C = i(m.colorToken),
|
|
96
|
-
return `<path d="${
|
|
74
|
+
const C = i(m.colorToken), I = x === 0 ? t.barRadius : 0, U = x === d - 1 ? t.barRadius : 0;
|
|
75
|
+
return `<path d="${bt(
|
|
97
76
|
m.x,
|
|
98
77
|
t.barY,
|
|
99
78
|
m.w,
|
|
100
79
|
t.barH,
|
|
101
|
-
|
|
80
|
+
I,
|
|
102
81
|
U
|
|
103
82
|
)}" fill="${C}"/>`;
|
|
104
83
|
}).join(""), b = t.barY + t.barH, k = b + 4, h = t.ticks.map((m) => {
|
|
@@ -147,13 +126,13 @@ function Kt(t, n) {
|
|
|
147
126
|
t.ariaLabel
|
|
148
127
|
)}">${D}${u}${f}${h}${y}${E}${w}${B}${S}</g>`;
|
|
149
128
|
}
|
|
150
|
-
const
|
|
151
|
-
function
|
|
129
|
+
const Vt = 260, Q = 64;
|
|
130
|
+
function jt(t) {
|
|
152
131
|
return `var(${t})`;
|
|
153
132
|
}
|
|
154
|
-
const
|
|
155
|
-
function({ model: n, width: i =
|
|
156
|
-
const e =
|
|
133
|
+
const Kt = ht(
|
|
134
|
+
function({ model: n, width: i = Vt, height: a = Q, className: o }, r) {
|
|
135
|
+
const e = pt(n, { width: i, height: a }), c = e.barY + e.barH, u = c + 4, d = e.barY - 3, f = e.barY + e.barH + 3, b = e.barY - 4, k = e.bands.length, h = e.barY + e.barH / 2;
|
|
157
136
|
return /* @__PURE__ */ P(
|
|
158
137
|
"svg",
|
|
159
138
|
{
|
|
@@ -182,7 +161,7 @@ const Jt = ht(
|
|
|
182
161
|
e.bands.map(($, l) => /* @__PURE__ */ g(
|
|
183
162
|
"path",
|
|
184
163
|
{
|
|
185
|
-
d:
|
|
164
|
+
d: bt(
|
|
186
165
|
$.x,
|
|
187
166
|
e.barY,
|
|
188
167
|
$.w,
|
|
@@ -190,7 +169,7 @@ const Jt = ht(
|
|
|
190
169
|
l === 0 ? e.barRadius : 0,
|
|
191
170
|
l === k - 1 ? e.barRadius : 0
|
|
192
171
|
),
|
|
193
|
-
fill:
|
|
172
|
+
fill: jt($.colorToken)
|
|
194
173
|
},
|
|
195
174
|
`${$.colorToken}-${l}`
|
|
196
175
|
)),
|
|
@@ -292,8 +271,8 @@ const Jt = ht(
|
|
|
292
271
|
);
|
|
293
272
|
}
|
|
294
273
|
);
|
|
295
|
-
|
|
296
|
-
const
|
|
274
|
+
Kt.displayName = "BandedGauge";
|
|
275
|
+
const Zt = 24, mt = 18, G = 12, gt = {
|
|
297
276
|
activity: '<path d="M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2"/>',
|
|
298
277
|
scale: '<path d="M12 3v18"/><path d="m19 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M3 7h1a17 17 0 0 0 8-2 17 17 0 0 0 8 2h1"/><path d="m5 8 3 8a5 5 0 0 1-6 0zV7"/><path d="M7 21h10"/>',
|
|
299
278
|
ruler: '<path d="M21.3 15.3a2.4 2.4 0 0 1 0 3.4l-2.6 2.6a2.4 2.4 0 0 1-3.4 0L2.7 8.7a2.41 2.41 0 0 1 0-3.4l2.6-2.6a2.41 2.41 0 0 1 3.4 0Z"/><path d="m14.5 12.5 2-2"/><path d="m11.5 9.5 2-2"/><path d="m8.5 6.5 2-2"/><path d="m17.5 15.5 2-2"/>',
|
|
@@ -307,22 +286,22 @@ const Qt = 24, gt = 18, G = 12, xt = {
|
|
|
307
286
|
"trending-up": '<path d="M16 7h6v6"/><path d="m22 7-8.5 8.5-5-5L2 17"/>',
|
|
308
287
|
percent: '<line x1="19" x2="5" y1="5" y2="19"/><circle cx="6.5" cy="6.5" r="2.5"/><circle cx="17.5" cy="17.5" r="2.5"/>'
|
|
309
288
|
};
|
|
310
|
-
function
|
|
311
|
-
return Object.prototype.hasOwnProperty.call(
|
|
289
|
+
function xt(t) {
|
|
290
|
+
return Object.prototype.hasOwnProperty.call(gt, t);
|
|
312
291
|
}
|
|
313
292
|
function rt(t, n, i, a, o) {
|
|
314
|
-
if (!
|
|
315
|
-
const r = o /
|
|
316
|
-
return `<g transform="translate(${i} ${a}) scale(${r})" fill="none" color="${n}" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${
|
|
293
|
+
if (!xt(t)) return "";
|
|
294
|
+
const r = o / Zt;
|
|
295
|
+
return `<g transform="translate(${i} ${a}) scale(${r})" fill="none" color="${n}" stroke="${n}" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">${gt[t]}</g>`;
|
|
317
296
|
}
|
|
318
297
|
function Y(t) {
|
|
319
298
|
return t.variant === "banded";
|
|
320
299
|
}
|
|
321
|
-
const
|
|
322
|
-
function
|
|
300
|
+
const qt = ["fg", "muted", "accent", "border", "bg"], tt = "--primary", F = 380, vt = (t) => t.trim().replace(/^--/, "");
|
|
301
|
+
function Jt(t) {
|
|
323
302
|
return `ds:text-[color:var(${t})]`;
|
|
324
303
|
}
|
|
325
|
-
function
|
|
304
|
+
function kt(t) {
|
|
326
305
|
return t.highlightToken ?? tt;
|
|
327
306
|
}
|
|
328
307
|
function W(t) {
|
|
@@ -331,7 +310,7 @@ function W(t) {
|
|
|
331
310
|
const a = t.highlightToken ?? tt;
|
|
332
311
|
n.add(a), n.add(`${a}-foreground`);
|
|
333
312
|
}
|
|
334
|
-
const i =
|
|
313
|
+
const i = kt(t);
|
|
335
314
|
if (n.add(i), t.gauge)
|
|
336
315
|
if (Y(t.gauge))
|
|
337
316
|
for (const a of t.gauge.bands) n.add(a.colorToken);
|
|
@@ -356,7 +335,7 @@ function K(t, n = []) {
|
|
|
356
335
|
}, o = {};
|
|
357
336
|
for (const r of n) {
|
|
358
337
|
const e = t.querySelector(
|
|
359
|
-
`[data-token="${
|
|
338
|
+
`[data-token="${vt(r)}"]`
|
|
360
339
|
);
|
|
361
340
|
if (e) {
|
|
362
341
|
const c = getComputedStyle(e).color;
|
|
@@ -378,19 +357,19 @@ function O(t, n, i) {
|
|
|
378
357
|
return n ? ((a = t.tokens) == null ? void 0 : a[n]) ?? i : i;
|
|
379
358
|
}
|
|
380
359
|
const v = (t) => t.replace(/&/g, "&").replace(/</g, "<").replace(/>/g, ">").replace(/"/g, """);
|
|
381
|
-
function
|
|
360
|
+
function yt(t) {
|
|
382
361
|
const n = [t.title];
|
|
383
362
|
t.highlight && n.push(t.highlight);
|
|
384
363
|
for (const i of t.fields) n.push(`• ${i.label}: ${i.value}`);
|
|
385
364
|
return n.join(`
|
|
386
365
|
`);
|
|
387
366
|
}
|
|
388
|
-
function
|
|
367
|
+
function Lt(t) {
|
|
389
368
|
const n = t.fields.map((a) => `<li>${v(a.label)}: ${v(a.value)}</li>`).join(""), i = t.highlight ? `<p><strong>${v(t.highlight)}</strong></p>` : "";
|
|
390
369
|
return `<p><strong>${v(t.title)}</strong></p>${i}<ul>${n}</ul>`;
|
|
391
370
|
}
|
|
392
|
-
const L = 20,
|
|
393
|
-
function
|
|
371
|
+
const L = 20, _ = L + 18, H = 22, Qt = 10, wt = 22, st = 16, it = 12, tn = 12, Tt = 34, Z = 9, q = (Tt + Z) * 2, nn = 16, lt = mt, en = 6, R = L + G + en, X = F - L - R, ct = 13, Et = 14, It = 13, J = 16;
|
|
372
|
+
function an(t) {
|
|
394
373
|
return t >= 4352 && t <= 4447 || // Hangul Jamo
|
|
395
374
|
t >= 11904 && t <= 42191 || // CJK radicals … Yi
|
|
396
375
|
t >= 44032 && t <= 55203 || // Hangul syllables
|
|
@@ -402,10 +381,10 @@ function sn(t) {
|
|
|
402
381
|
function A(t, n) {
|
|
403
382
|
let i = 0;
|
|
404
383
|
for (const a of t)
|
|
405
|
-
i +=
|
|
384
|
+
i += an(a.codePointAt(0) ?? 0) ? 1 : 0.62;
|
|
406
385
|
return i * n;
|
|
407
386
|
}
|
|
408
|
-
function
|
|
387
|
+
function on(t, n, i) {
|
|
409
388
|
const a = [];
|
|
410
389
|
let o = "";
|
|
411
390
|
for (const r of t)
|
|
@@ -416,7 +395,7 @@ function ut(t, n, i) {
|
|
|
416
395
|
const a = [];
|
|
417
396
|
let o = "";
|
|
418
397
|
const r = (e) => {
|
|
419
|
-
const c =
|
|
398
|
+
const c = on(e, n, i);
|
|
420
399
|
for (let u = 0; u < c.length - 1; u += 1) a.push(c[u]);
|
|
421
400
|
o = c[c.length - 1];
|
|
422
401
|
};
|
|
@@ -426,11 +405,11 @@ function ut(t, n, i) {
|
|
|
426
405
|
}
|
|
427
406
|
return o && a.push(o), a.length ? a : [""];
|
|
428
407
|
}
|
|
429
|
-
function
|
|
408
|
+
function Mt(t) {
|
|
430
409
|
const n = [];
|
|
431
410
|
let i = 0;
|
|
432
411
|
t.fields.forEach((r, e) => {
|
|
433
|
-
const c = e === 0 ?
|
|
412
|
+
const c = e === 0 ? Et : It, d = A(`${r.label}: `, ct) + A(r.value, c) <= X ? [{ kind: "inline", text: "" }] : [
|
|
434
413
|
...ut(
|
|
435
414
|
`${r.label}:`,
|
|
436
415
|
ct,
|
|
@@ -440,7 +419,7 @@ function It(t) {
|
|
|
440
419
|
(f) => ({ kind: "value", text: f })
|
|
441
420
|
)
|
|
442
421
|
];
|
|
443
|
-
n.push({ field: r, index: e, firstLineDy: i, lines: d }), i +=
|
|
422
|
+
n.push({ field: r, index: e, firstLineDy: i, lines: d }), i += wt + (d.length - 1) * J;
|
|
444
423
|
});
|
|
445
424
|
const a = n[n.length - 1], o = a ? a.firstLineDy + (a.lines.length - 1) * J : 0;
|
|
446
425
|
return { placements: n, endDy: o };
|
|
@@ -449,14 +428,14 @@ function nt(t, n) {
|
|
|
449
428
|
const i = n !== void 0 ? n : t.brand;
|
|
450
429
|
return typeof i == "string" ? i : !1;
|
|
451
430
|
}
|
|
452
|
-
function
|
|
431
|
+
function rn(t) {
|
|
453
432
|
if (typeof t.fraction == "number")
|
|
454
433
|
return Math.min(1, Math.max(0, t.fraction));
|
|
455
434
|
const n = parseFloat(t.value);
|
|
456
435
|
return Number.isFinite(n) && typeof t.max == "number" && t.max > 0 ? Math.min(1, Math.max(0, n / t.max)) : 1;
|
|
457
436
|
}
|
|
458
|
-
function
|
|
459
|
-
const i = !!t.highlight, a =
|
|
437
|
+
function _t(t, n) {
|
|
438
|
+
const i = !!t.highlight, a = _ + Qt, o = (i ? a + H + st : _ + st) + wt - 6, r = o + Mt(t).endDy, e = t.gauge && Y(t.gauge), d = t.gauge && !Y(t.gauge) ? (i ? a : _) + q : 0, f = e ? r + nn : null, b = f !== null ? f + Q : 0, k = Math.max(r, d, b), h = n ? k + it + tn - 4 : k, $ = Math.round(h + (n ? it : L));
|
|
460
439
|
return {
|
|
461
440
|
hasChip: i,
|
|
462
441
|
chipY: a,
|
|
@@ -467,11 +446,11 @@ function At(t, n) {
|
|
|
467
446
|
height: $
|
|
468
447
|
};
|
|
469
448
|
}
|
|
470
|
-
function
|
|
471
|
-
return
|
|
449
|
+
function At(t, n) {
|
|
450
|
+
return _t(t, n !== !1).height;
|
|
472
451
|
}
|
|
473
|
-
function
|
|
474
|
-
const r =
|
|
452
|
+
function sn(t, n, i, a, o) {
|
|
453
|
+
const r = Tt, e = 2 * Math.PI * r, c = rn(t), u = O(n, t.colorToken, n.accent), d = typeof t.segments == "number" && t.segments > 1 ? t.segments : 0, f = d ? 3 : 0, b = d ? e / d - f : e, k = d ? `${b} ${f}` : "", h = `${e * c} ${e}`, $ = `transform="rotate(-90 ${a} ${o})"`, l = v(
|
|
475
454
|
t.label ? `${t.value} — ${t.label}` : t.value
|
|
476
455
|
), T = `<circle cx="${a}" cy="${o}" r="${r}" fill="none" stroke="${n.border}" stroke-width="${Z}"${k ? ` stroke-dasharray="${k}"` : ""} ${$}/>`, y = `<circle cx="${a}" cy="${o}" r="${r}" fill="none" stroke="${u}" stroke-width="${Z}" stroke-linecap="round" stroke-dasharray="${h}" ${$}/>`, p = `<text x="${a}" y="${o + 1}" text-anchor="middle" dominant-baseline="middle" font-family="${i}" font-size="16" font-weight="700" fill="${n.fg}">${v(
|
|
477
456
|
t.value
|
|
@@ -480,8 +459,8 @@ function un(t, n, i, a, o) {
|
|
|
480
459
|
)}</text>` : "";
|
|
481
460
|
return `<g role="img" aria-label="${l}"><title>${l}</title>${T}${y}${p}${E}</g>`;
|
|
482
461
|
}
|
|
483
|
-
function
|
|
484
|
-
const o = L - V, r = i - 2 * o, e =
|
|
462
|
+
function ln(t, n, i, a) {
|
|
463
|
+
const o = L - V, r = i - 2 * o, e = pt(
|
|
485
464
|
{
|
|
486
465
|
value: t.value,
|
|
487
466
|
bands: t.bands,
|
|
@@ -494,7 +473,7 @@ function dn(t, n, i, a) {
|
|
|
494
473
|
ticks: t.ticks
|
|
495
474
|
},
|
|
496
475
|
{ width: r, height: Q }
|
|
497
|
-
), c =
|
|
476
|
+
), c = Xt(e, {
|
|
498
477
|
resolve: (u) => O(n, u, n.accent),
|
|
499
478
|
// Raw theme font — buildBandedGaugeSvgString escapes it once. Passing the
|
|
500
479
|
// card's already-escaped `font` here would double-escape and break it.
|
|
@@ -516,71 +495,71 @@ function ft([t, n, i]) {
|
|
|
516
495
|
};
|
|
517
496
|
return 0.2126 * a(t) + 0.7152 * a(n) + 0.0722 * a(i);
|
|
518
497
|
}
|
|
519
|
-
function
|
|
498
|
+
function cn(t, n) {
|
|
520
499
|
const i = dt(t), a = dt(n);
|
|
521
500
|
if (!i || !a) return 0;
|
|
522
501
|
const o = ft(i), r = ft(a);
|
|
523
502
|
return (Math.max(o, r) + 0.05) / (Math.min(o, r) + 0.05);
|
|
524
503
|
}
|
|
525
|
-
function
|
|
526
|
-
const o = t.highlight, r = t.highlightToken ?? tt, e = O(n, r, n.accent), c =
|
|
504
|
+
function un(t, n, i, a) {
|
|
505
|
+
const o = t.highlight, r = t.highlightToken ?? tt, e = O(n, r, n.accent), c = cn(n.bg, e) >= 3 ? n.bg : n.fg, u = Math.round(o.length * 7.2 + 28), d = L + u / 2, f = a + H / 2 + 1;
|
|
527
506
|
return `<rect x="${L}" y="${a}" width="${u}" height="${H}" rx="${H / 2}" fill="${e}"/><text x="${d}" y="${f}" text-anchor="middle" dominant-baseline="middle" font-family="${i}" font-size="12" font-weight="600" fill="${c}">${v(
|
|
528
507
|
o
|
|
529
508
|
)}</text>`;
|
|
530
509
|
}
|
|
531
510
|
function et(t, n, i = !1) {
|
|
532
|
-
const a = F, o =
|
|
511
|
+
const a = F, o = _t(t, i !== !1), r = o.height, e = v(n.font), c = kt(t), u = O(n, c, n.accent), d = t.icon ? rt(
|
|
533
512
|
t.icon,
|
|
534
513
|
u,
|
|
535
514
|
a - L - lt,
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
) : "", { placements: f } =
|
|
539
|
-
const E = o.firstFieldY + p.firstLineDy, w = p.index === 0, B = w ?
|
|
515
|
+
_ - lt + 2,
|
|
516
|
+
mt
|
|
517
|
+
) : "", { placements: f } = Mt(t), b = f.map((p) => {
|
|
518
|
+
const E = o.firstFieldY + p.firstLineDy, w = p.index === 0, B = w ? Et : It, S = w ? 700 : 500, D = w ? u : n.fg, m = E - 4;
|
|
540
519
|
let x;
|
|
541
|
-
p.field.icon &&
|
|
520
|
+
p.field.icon && xt(p.field.icon) ? x = rt(
|
|
542
521
|
p.field.icon,
|
|
543
522
|
u,
|
|
544
523
|
L,
|
|
545
524
|
m - G / 2,
|
|
546
525
|
G
|
|
547
526
|
) : x = `<circle cx="${L + G / 2}" cy="${m}" r="2" fill="${n.muted}"/>`;
|
|
548
|
-
const C = p.lines.map((
|
|
527
|
+
const C = p.lines.map((I, U) => {
|
|
549
528
|
const z = E + U * J;
|
|
550
|
-
return
|
|
529
|
+
return I.kind === "inline" ? `<text x="${R}" y="${z}" font-family="${e}" font-size="13"><tspan fill="${n.muted}">${v(
|
|
551
530
|
p.field.label
|
|
552
531
|
)}: </tspan><tspan font-size="${B}" font-weight="${S}" fill="${D}">${v(
|
|
553
532
|
p.field.value
|
|
554
|
-
)}</tspan></text>` :
|
|
555
|
-
|
|
533
|
+
)}</tspan></text>` : I.kind === "label" ? `<text x="${R}" y="${z}" font-family="${e}" font-size="13" fill="${n.muted}">${v(
|
|
534
|
+
I.text
|
|
556
535
|
)}</text>` : `<text x="${R}" y="${z}" font-family="${e}" font-size="${B}" font-weight="${S}" fill="${D}">${v(
|
|
557
|
-
|
|
536
|
+
I.text
|
|
558
537
|
)}</text>`;
|
|
559
538
|
}).join("");
|
|
560
539
|
return `${x}${C}`;
|
|
561
|
-
}).join(""), k = o.hasChip ?
|
|
540
|
+
}).join(""), k = o.hasChip ? un(t, n, e, o.chipY) : "";
|
|
562
541
|
let h = "";
|
|
563
|
-
t.gauge && (Y(t.gauge) && o.bandedGaugeY !== null ? h =
|
|
542
|
+
t.gauge && (Y(t.gauge) && o.bandedGaugeY !== null ? h = ln(t.gauge, n, a, o.bandedGaugeY) : Y(t.gauge) || (h = sn(
|
|
564
543
|
t.gauge,
|
|
565
544
|
n,
|
|
566
545
|
e,
|
|
567
546
|
a - L - q / 2,
|
|
568
|
-
(o.hasChip ? o.chipY :
|
|
547
|
+
(o.hasChip ? o.chipY : _) + q / 2
|
|
569
548
|
)));
|
|
570
549
|
const $ = i !== !1 ? `<text x="${L}" y="${o.footerY}" font-family="${e}" font-size="10" font-weight="500" fill="${n.muted}">${v(
|
|
571
550
|
i
|
|
572
|
-
)}</text>` : "", l = `<text x="${L}" y="${
|
|
551
|
+
)}</text>` : "", l = `<text x="${L}" y="${_}" font-family="${e}" font-size="16" font-weight="700" fill="${n.fg}">${v(
|
|
573
552
|
t.title
|
|
574
553
|
)}</text>`, T = `<rect x="0.5" y="0.5" width="${a - 1}" height="${r - 1}" rx="12" fill="${n.bg}"/>`, y = `<rect x="0.5" y="0.5" width="${a - 1}" height="${r - 1}" rx="12" fill="none" stroke="${n.border}"/>`;
|
|
575
554
|
return `<svg xmlns="http://www.w3.org/2000/svg" width="${a}" height="${r}" viewBox="0 0 ${a} ${r}" role="img" aria-label="${v(
|
|
576
555
|
t.title
|
|
577
556
|
)}">${T}${l}${d}${k}${h}${b}${$}${y}</svg>`;
|
|
578
557
|
}
|
|
579
|
-
function
|
|
558
|
+
function dn() {
|
|
580
559
|
var t;
|
|
581
560
|
return typeof navigator < "u" && typeof ((t = navigator.clipboard) == null ? void 0 : t.write) == "function" && typeof ClipboardItem < "u";
|
|
582
561
|
}
|
|
583
|
-
function
|
|
562
|
+
function Bt(t, n, i) {
|
|
584
563
|
return new Promise((a, o) => {
|
|
585
564
|
const r = new Image();
|
|
586
565
|
r.decoding = "async", r.onload = () => {
|
|
@@ -597,46 +576,46 @@ function Ct(t, n, i) {
|
|
|
597
576
|
}, r.onerror = () => o(new Error("SVG failed to decode as an image")), r.src = t;
|
|
598
577
|
});
|
|
599
578
|
}
|
|
600
|
-
function
|
|
579
|
+
function Ct() {
|
|
601
580
|
const t = typeof window < "u" && typeof window.devicePixelRatio == "number" ? window.devicePixelRatio : 1;
|
|
602
581
|
return Math.max(2, t);
|
|
603
582
|
}
|
|
604
|
-
async function
|
|
605
|
-
return (await
|
|
583
|
+
async function En(t, n = {}) {
|
|
584
|
+
return (await Yt(t, n)).dataUri;
|
|
606
585
|
}
|
|
607
|
-
async function
|
|
608
|
-
const { colours: i, scale: a =
|
|
586
|
+
async function Yt(t, n = {}) {
|
|
587
|
+
const { colours: i, scale: a = Ct() } = n, o = i ?? K(null), r = nt(t, n.brand), e = et(t, o, r), c = `data:image/svg+xml,${encodeURIComponent(e)}`, u = F, d = At(t, r), f = await Bt(
|
|
609
588
|
c,
|
|
610
589
|
Math.round(u * a),
|
|
611
590
|
Math.round(d * a)
|
|
612
591
|
);
|
|
613
|
-
return { dataUri: await
|
|
592
|
+
return { dataUri: await fn(f), width: u, height: d };
|
|
614
593
|
}
|
|
615
|
-
function
|
|
594
|
+
function fn(t) {
|
|
616
595
|
return new Promise((n, i) => {
|
|
617
596
|
const a = new FileReader();
|
|
618
597
|
a.onload = () => n(String(a.result)), a.onerror = () => i(a.error ?? new Error("FileReader error")), a.readAsDataURL(t);
|
|
619
598
|
});
|
|
620
599
|
}
|
|
621
|
-
async function
|
|
622
|
-
const a =
|
|
600
|
+
async function $n(t, n, i) {
|
|
601
|
+
const a = yt(n), o = new Blob([a], { type: "text/plain" });
|
|
623
602
|
if (t === "text")
|
|
624
603
|
return new ClipboardItem({ "text/plain": o });
|
|
625
|
-
const r = nt(n, void 0), e = et(n, i, r), c = `data:image/svg+xml,${encodeURIComponent(e)}`, u =
|
|
604
|
+
const r = nt(n, void 0), e = et(n, i, r), c = `data:image/svg+xml,${encodeURIComponent(e)}`, u = Ct(), d = await Bt(
|
|
626
605
|
c,
|
|
627
606
|
Math.round(F * u),
|
|
628
|
-
Math.round(
|
|
607
|
+
Math.round(At(n, r) * u)
|
|
629
608
|
);
|
|
630
609
|
if (t === "image")
|
|
631
610
|
return new ClipboardItem({ "image/png": d, "text/plain": o });
|
|
632
|
-
const f = new Blob([
|
|
611
|
+
const f = new Blob([Lt(n)], { type: "text/html" });
|
|
633
612
|
return new ClipboardItem({
|
|
634
613
|
"text/html": f,
|
|
635
614
|
"image/png": d,
|
|
636
615
|
"text/plain": o
|
|
637
616
|
});
|
|
638
617
|
}
|
|
639
|
-
const
|
|
618
|
+
const hn = Nt(
|
|
640
619
|
"ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
|
|
641
620
|
{
|
|
642
621
|
variants: {
|
|
@@ -647,10 +626,10 @@ const mn = Gt(
|
|
|
647
626
|
},
|
|
648
627
|
defaultVariants: { variant: "insert" }
|
|
649
628
|
}
|
|
650
|
-
),
|
|
651
|
-
text: /* @__PURE__ */ g(
|
|
652
|
-
image: /* @__PURE__ */ g(
|
|
653
|
-
"text-image": /* @__PURE__ */ g(
|
|
629
|
+
), pn = ["text", "image", "text-image"], bn = {
|
|
630
|
+
text: /* @__PURE__ */ g(Pt, { "aria-hidden": !0 }),
|
|
631
|
+
image: /* @__PURE__ */ g(Rt, { "aria-hidden": !0 }),
|
|
632
|
+
"text-image": /* @__PURE__ */ g(Ht, { "aria-hidden": !0 })
|
|
654
633
|
}, $t = {
|
|
655
634
|
insert: {
|
|
656
635
|
text: "insert.text",
|
|
@@ -662,7 +641,7 @@ const mn = Gt(
|
|
|
662
641
|
image: "insert.copyImage",
|
|
663
642
|
"text-image": "insert.copyTextImage"
|
|
664
643
|
}
|
|
665
|
-
},
|
|
644
|
+
}, mn = ht(
|
|
666
645
|
function({
|
|
667
646
|
card: n,
|
|
668
647
|
variant: i = "insert",
|
|
@@ -672,13 +651,13 @@ const mn = Gt(
|
|
|
672
651
|
size: e = "sm",
|
|
673
652
|
intent: c = "primary"
|
|
674
653
|
}, u) {
|
|
675
|
-
const { t: d } =
|
|
676
|
-
const T =
|
|
654
|
+
const { t: d } = Dt(), f = St(null), b = (l) => {
|
|
655
|
+
const T = yt(n), y = Lt(n);
|
|
677
656
|
let p = "", E = "";
|
|
678
657
|
const w = l === "text" ? null : K(f.current, W(n));
|
|
679
|
-
return w && (p = et(n, w, nt(n, void 0)), E = `data:image/svg+xml,${encodeURIComponent(p)}`), { mode: l, text: T, html: y, svg: p, imageDataUri: E, pngDataUri: () => w ?
|
|
658
|
+
return w && (p = et(n, w, nt(n, void 0)), E = `data:image/svg+xml,${encodeURIComponent(p)}`), { mode: l, text: T, html: y, svg: p, imageDataUri: E, pngDataUri: () => w ? Yt(n, { colours: w }) : Promise.resolve({ dataUri: "", width: 0, height: 0 }) };
|
|
680
659
|
}, $ = i === "copy" ? (l) => {
|
|
681
|
-
if (!
|
|
660
|
+
if (!dn()) {
|
|
682
661
|
r == null || r(new Error("Clipboard write unavailable in this context"));
|
|
683
662
|
return;
|
|
684
663
|
}
|
|
@@ -688,7 +667,7 @@ const mn = Gt(
|
|
|
688
667
|
);
|
|
689
668
|
(async () => {
|
|
690
669
|
try {
|
|
691
|
-
const y = await
|
|
670
|
+
const y = await $n(l, n, T);
|
|
692
671
|
await navigator.clipboard.write([y]), o == null || o(l);
|
|
693
672
|
} catch (y) {
|
|
694
673
|
r == null || r(y);
|
|
@@ -703,10 +682,10 @@ const mn = Gt(
|
|
|
703
682
|
ref: u,
|
|
704
683
|
"data-component": "insert-result",
|
|
705
684
|
"data-variant": i,
|
|
706
|
-
className:
|
|
685
|
+
className: hn({ variant: i }),
|
|
707
686
|
children: [
|
|
708
687
|
/* @__PURE__ */ P("span", { ref: f, "aria-hidden": !0, className: "ds:sr-only", children: [
|
|
709
|
-
|
|
688
|
+
qt.map((l) => /* @__PURE__ */ g(
|
|
710
689
|
"span",
|
|
711
690
|
{
|
|
712
691
|
"data-k": l,
|
|
@@ -717,19 +696,19 @@ const mn = Gt(
|
|
|
717
696
|
W(n).map((l) => /* @__PURE__ */ g(
|
|
718
697
|
"span",
|
|
719
698
|
{
|
|
720
|
-
"data-token":
|
|
721
|
-
className:
|
|
699
|
+
"data-token": vt(l),
|
|
700
|
+
className: Jt(l)
|
|
722
701
|
},
|
|
723
702
|
l
|
|
724
703
|
))
|
|
725
704
|
] }),
|
|
726
|
-
|
|
727
|
-
|
|
705
|
+
pn.map((l) => /* @__PURE__ */ g(
|
|
706
|
+
Gt,
|
|
728
707
|
{
|
|
729
708
|
type: "button",
|
|
730
709
|
intent: c,
|
|
731
710
|
size: e,
|
|
732
|
-
startIcon:
|
|
711
|
+
startIcon: bn[l],
|
|
733
712
|
"aria-label": d($t[i][l]),
|
|
734
713
|
onClick: () => $(l),
|
|
735
714
|
children: d($t[i][l])
|
|
@@ -741,12 +720,12 @@ const mn = Gt(
|
|
|
741
720
|
);
|
|
742
721
|
}
|
|
743
722
|
);
|
|
744
|
-
|
|
723
|
+
mn.displayName = "InsertButton";
|
|
745
724
|
export {
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
725
|
+
Kt as B,
|
|
726
|
+
mn as I,
|
|
727
|
+
En as a,
|
|
728
|
+
Tn as b,
|
|
729
|
+
Yt as s
|
|
751
730
|
};
|
|
752
|
-
//# sourceMappingURL=insert-result-
|
|
731
|
+
//# sourceMappingURL=insert-result-DIAG3ltJ.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as l } from "./isSameDay-DUEiAT0G.js";
|
|
2
|
-
import { s as r } from "./date-picker-variants-
|
|
2
|
+
import { s as r } from "./date-picker-variants-DAcSLTua.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-I3DfXUp1.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { i as d } from "./isSameWeek-
|
|
1
|
+
import { o as s, q as i, r, v as l } from "./date-picker-variants-DAcSLTua.js";
|
|
2
|
+
import { i as d } from "./isSameWeek-I3DfXUp1.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
|
+
}, M = (e, n, a, t) => {
|
|
139
139
|
const o = P[e];
|
|
140
140
|
return typeof o == "function" ? o(n, a, t) : o;
|
|
141
|
-
},
|
|
141
|
+
}, w = {
|
|
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: w,
|
|
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: M,
|
|
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-nz6vAKwG.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { o as s, q as o, r as i, v as d } from "./date-picker-variants-DAcSLTua.js";
|
|
2
2
|
const u = {
|
|
3
3
|
lessThanXSeconds: {
|
|
4
4
|
one: "1秒未満",
|
|
@@ -363,4 +363,4 @@ const u = {
|
|
|
363
363
|
export {
|
|
364
364
|
L as ja
|
|
365
365
|
};
|
|
366
|
-
//# sourceMappingURL=ja-
|
|
366
|
+
//# sourceMappingURL=ja-DQcqdAEJ.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as a, jsxs as i, Fragment as f } from "react/jsx-runtime";
|
|
|
2
2
|
import { forwardRef as g, useState as y, useCallback as z } from "react";
|
|
3
3
|
import { c as P } from "./index-D2ZczOXr.js";
|
|
4
4
|
import { useTranslation as I } from "react-i18next";
|
|
5
|
-
import { I as K } from "./icon-button-
|
|
5
|
+
import { I as K } from "./icon-button-LqoiKcUN.js";
|
|
6
6
|
import { C as T } from "./check-DPdL_Sm7.js";
|
|
7
7
|
import { C as j } from "./copy-B00HK7tj.js";
|
|
8
8
|
const B = P("ds:flex", {
|
|
@@ -141,4 +141,4 @@ export {
|
|
|
141
141
|
L as K,
|
|
142
142
|
_ as a
|
|
143
143
|
};
|
|
144
|
-
//# sourceMappingURL=key-value-pair-
|
|
144
|
+
//# sourceMappingURL=key-value-pair-BrgbMfbF.js.map
|