@kapiuara/ui 0.15.3 → 0.17.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/LICENSE +19 -15
- package/README.md +505 -13
- package/dist/components/chat/KapiChatThread.js +4 -4
- package/dist/components/chat/KapiComposer.js +8 -8
- package/dist/components/data/KapiDataTable.d.ts +1 -1
- package/dist/components/data/KapiDataTable.js +25 -25
- package/dist/components/data/KapiPaginationFooter.js +1 -1
- package/dist/components/data/KapiSheet.d.ts +105 -0
- package/dist/components/data/KapiSheet.js +75 -0
- package/dist/components/data/KapiSparkline.d.ts +2 -1
- package/dist/components/data/KapiSparkline.js +29 -26
- package/dist/components/data/KapiTable.d.ts +2 -2
- package/dist/components/data/KapiTable.js +347 -329
- package/dist/components/data/KapiTableFilter.js +6 -6
- package/dist/components/data/KapiTableFooter.d.ts +22 -0
- package/dist/components/data/KapiTableFooter.js +55 -0
- package/dist/components/data/KapiTableRow.js +53 -52
- package/dist/components/data/KapiTableToolbar.d.ts +4 -2
- package/dist/components/data/KapiTableToolbar.js +71 -69
- package/dist/components/data/index.d.ts +3 -1
- package/dist/components/data/tableCells.d.ts +17 -5
- package/dist/components/data/tableCells.js +52 -53
- package/dist/components/data/tableLogic.d.ts +2 -0
- package/dist/components/data/tableLogic.js +66 -66
- package/dist/components/data/tableSlots.d.ts +9 -0
- package/dist/components/data/tableSlots.js +12 -0
- package/dist/components/data/tableSpanLogic.d.ts +35 -0
- package/dist/components/data/tableSpanLogic.js +47 -0
- package/dist/components/data/tableTypes.d.ts +54 -1
- package/dist/components/data/useTableSelection.d.ts +4 -2
- package/dist/components/data/useTableSelection.js +29 -25
- package/dist/components/display/KapiAnchor.d.ts +36 -0
- package/dist/components/display/KapiAnchor.js +36 -0
- package/dist/components/display/KapiAnnotation.js +68 -63
- package/dist/components/display/KapiAvatar.d.ts +6 -4
- package/dist/components/display/KapiAvatar.js +33 -28
- package/dist/components/display/KapiBadge.d.ts +6 -5
- package/dist/components/display/KapiBadge.js +25 -19
- package/dist/components/display/KapiCodeBlock.d.ts +48 -0
- package/dist/components/display/KapiCodeBlock.js +44 -0
- package/dist/components/display/KapiCommentComposer.js +6 -6
- package/dist/components/display/KapiDiff.d.ts +62 -0
- package/dist/components/display/KapiDiff.js +118 -0
- package/dist/components/display/KapiHighlight.d.ts +27 -0
- package/dist/components/display/KapiHighlight.js +21 -0
- package/dist/components/display/KapiIconTile.d.ts +2 -1
- package/dist/components/display/KapiIconTile.js +23 -21
- package/dist/components/display/KapiStat.d.ts +3 -2
- package/dist/components/display/KapiStat.js +32 -26
- package/dist/components/display/KapiTag.d.ts +4 -3
- package/dist/components/display/KapiTag.js +29 -24
- package/dist/components/display/KapiText.d.ts +43 -0
- package/dist/components/display/KapiText.js +33 -0
- package/dist/components/display/KapiTimeline.d.ts +5 -2
- package/dist/components/display/KapiTimeline.js +31 -23
- package/dist/components/display/KapiTitle.d.ts +33 -0
- package/dist/components/display/KapiTitle.js +29 -0
- package/dist/components/display/annotationLogic.d.ts +2 -1
- package/dist/components/display/annotationLogic.js +7 -6
- package/dist/components/display/codeBlockSlots.d.ts +10 -0
- package/dist/components/display/codeBlockSlots.js +13 -0
- package/dist/components/display/diffLogic.d.ts +58 -0
- package/dist/components/display/diffLogic.js +96 -0
- package/dist/components/display/diffSlots.d.ts +14 -0
- package/dist/components/display/diffSlots.js +17 -0
- package/dist/components/display/highlightLogic.d.ts +18 -0
- package/dist/components/display/highlightLogic.js +26 -0
- package/dist/components/display/highlightSlots.d.ts +5 -0
- package/dist/components/display/highlightSlots.js +8 -0
- package/dist/components/display/iconTileLogic.d.ts +2 -2
- package/dist/components/display/iconTileLogic.js +7 -6
- package/dist/components/display/index.d.ts +15 -0
- package/dist/components/display/statLogic.d.ts +2 -1
- package/dist/components/display/statLogic.js +7 -6
- package/dist/components/display/tagLogic.d.ts +2 -1
- package/dist/components/display/tagLogic.js +7 -6
- package/dist/components/display/textLogic.d.ts +32 -0
- package/dist/components/display/textLogic.js +19 -0
- package/dist/components/display/timelineLogic.d.ts +20 -2
- package/dist/components/display/timelineLogic.js +10 -2
- package/dist/components/feedback/KapiAlert.d.ts +8 -4
- package/dist/components/feedback/KapiAlert.js +39 -34
- package/dist/components/feedback/KapiFab.js +108 -108
- package/dist/components/feedback/KapiProgress.js +63 -54
- package/dist/components/feedback/KapiToastContainer.js +9 -9
- package/dist/components/feedback/KapiTour.js +12 -12
- package/dist/components/feedback/progressLogic.d.ts +2 -1
- package/dist/components/feedback/progressLogic.js +9 -8
- package/dist/components/inputs/KapiAutocomplete.d.ts +6 -0
- package/dist/components/inputs/KapiAutocomplete.js +86 -85
- package/dist/components/inputs/KapiButton.d.ts +7 -4
- package/dist/components/inputs/KapiButton.js +47 -42
- package/dist/components/inputs/KapiChecklist.d.ts +7 -1
- package/dist/components/inputs/KapiChecklist.js +53 -52
- package/dist/components/inputs/KapiCopyButton.d.ts +40 -0
- package/dist/components/inputs/KapiCopyButton.js +35 -0
- package/dist/components/inputs/KapiDatePicker.d.ts +7 -1
- package/dist/components/inputs/KapiDatePicker.js +118 -116
- package/dist/components/inputs/KapiDateRangePicker.d.ts +7 -1
- package/dist/components/inputs/KapiDateRangePicker.js +136 -135
- package/dist/components/inputs/KapiFacetedSearch.js +5 -5
- package/dist/components/inputs/KapiField.d.ts +9 -1
- package/dist/components/inputs/KapiField.js +43 -42
- package/dist/components/inputs/KapiFileUpload.js +6 -6
- package/dist/components/inputs/KapiInput.d.ts +29 -1
- package/dist/components/inputs/KapiInput.js +74 -51
- package/dist/components/inputs/KapiMaskedInput.js +26 -26
- package/dist/components/inputs/KapiNumberStepper.d.ts +7 -1
- package/dist/components/inputs/KapiNumberStepper.js +24 -23
- package/dist/components/inputs/KapiPinInput.d.ts +72 -0
- package/dist/components/inputs/KapiPinInput.js +75 -0
- package/dist/components/inputs/KapiPropsForm.d.ts +34 -0
- package/dist/components/inputs/KapiPropsForm.js +78 -0
- package/dist/components/inputs/KapiRating.d.ts +7 -1
- package/dist/components/inputs/KapiRating.js +39 -38
- package/dist/components/inputs/KapiSearchChip.js +5 -5
- package/dist/components/inputs/KapiSegmented.d.ts +13 -5
- package/dist/components/inputs/KapiSegmented.js +81 -77
- package/dist/components/inputs/KapiSelect.d.ts +21 -1
- package/dist/components/inputs/KapiSelect.js +251 -245
- package/dist/components/inputs/KapiSelectMenu.d.ts +4 -2
- package/dist/components/inputs/KapiSelectMenu.js +131 -133
- package/dist/components/inputs/KapiSlider.d.ts +10 -3
- package/dist/components/inputs/KapiSlider.js +67 -63
- package/dist/components/inputs/KapiTagInput.d.ts +7 -1
- package/dist/components/inputs/KapiTagInput.js +70 -69
- package/dist/components/inputs/KapiTextarea.d.ts +7 -1
- package/dist/components/inputs/KapiTextarea.js +51 -50
- package/dist/components/inputs/copyLogic.d.ts +1 -0
- package/dist/components/inputs/copyLogic.js +12 -0
- package/dist/components/inputs/fieldLogic.d.ts +21 -1
- package/dist/components/inputs/fieldLogic.js +18 -11
- package/dist/components/inputs/index.d.ts +9 -1
- package/dist/components/inputs/inputLogic.d.ts +16 -1
- package/dist/components/inputs/inputLogic.js +3 -3
- package/dist/components/inputs/ownField.d.ts +3 -1
- package/dist/components/inputs/ownField.js +28 -27
- package/dist/components/inputs/pinInputLogic.d.ts +34 -0
- package/dist/components/inputs/pinInputLogic.js +37 -0
- package/dist/components/inputs/propsFormLogic.d.ts +53 -0
- package/dist/components/inputs/propsFormLogic.js +11 -0
- package/dist/components/inputs/segmentedLogic.d.ts +7 -0
- package/dist/components/inputs/segmentedLogic.js +2 -2
- package/dist/components/inputs/selectSlots.d.ts +24 -0
- package/dist/components/inputs/selectSlots.js +27 -0
- package/dist/components/layout/KapiAccessCard.d.ts +5 -1
- package/dist/components/layout/KapiAccessCard.js +43 -39
- package/dist/components/layout/KapiAccountMenu.js +7 -7
- package/dist/components/layout/KapiBox.d.ts +31 -0
- package/dist/components/layout/KapiBox.js +26 -0
- package/dist/components/layout/KapiCard.d.ts +16 -4
- package/dist/components/layout/KapiCard.js +46 -34
- package/dist/components/layout/KapiCenter.d.ts +13 -0
- package/dist/components/layout/KapiCenter.js +23 -0
- package/dist/components/layout/KapiCol.d.ts +22 -0
- package/dist/components/layout/KapiCol.js +23 -0
- package/dist/components/layout/KapiCollapse.d.ts +39 -0
- package/dist/components/layout/KapiCollapse.js +20 -0
- package/dist/components/layout/KapiContextSlot.js +4 -4
- package/dist/components/layout/KapiDivider.d.ts +11 -2
- package/dist/components/layout/KapiDivider.js +30 -24
- package/dist/components/layout/KapiGrid.d.ts +29 -3
- package/dist/components/layout/KapiGrid.js +39 -17
- package/dist/components/layout/KapiNotificationBell.js +10 -10
- package/dist/components/layout/KapiPageHeader.d.ts +10 -1
- package/dist/components/layout/KapiPageHeader.js +94 -92
- package/dist/components/layout/KapiPanelParts.d.ts +11 -2
- package/dist/components/layout/KapiPanelParts.js +73 -56
- package/dist/components/layout/KapiRail.d.ts +10 -1
- package/dist/components/layout/KapiRail.js +125 -122
- package/dist/components/layout/KapiRoot.d.ts +55 -5
- package/dist/components/layout/KapiRoot.js +57 -38
- package/dist/components/layout/KapiShell.d.ts +44 -3
- package/dist/components/layout/KapiShell.js +54 -50
- package/dist/components/layout/accessCardLogic.d.ts +8 -1
- package/dist/components/layout/accessCardLogic.js +11 -7
- package/dist/components/layout/cardSlots.d.ts +9 -0
- package/dist/components/layout/cardSlots.js +12 -0
- package/dist/components/layout/gridSpanLogic.d.ts +46 -0
- package/dist/components/layout/gridSpanLogic.js +39 -0
- package/dist/components/layout/index.d.ts +13 -4
- package/dist/components/layout/layoutPrimitives.d.ts +11 -0
- package/dist/components/layout/layoutPrimitives.js +12 -1
- package/dist/components/layout/pageHeaderSlots.d.ts +12 -0
- package/dist/components/layout/pageHeaderSlots.js +15 -0
- package/dist/components/layout/railLogic.d.ts +16 -3
- package/dist/components/layout/railSlots.d.ts +12 -0
- package/dist/components/layout/railSlots.js +15 -0
- package/dist/components/layout/shellSlots.d.ts +6 -0
- package/dist/components/layout/shellSlots.js +9 -0
- package/dist/components/layout/useGridBreakpoint.d.ts +12 -0
- package/dist/components/layout/useGridBreakpoint.js +35 -0
- package/dist/components/locale/labelRegistry.d.ts +10 -0
- package/dist/components/navigation/KapiAccordion.js +9 -9
- package/dist/components/navigation/KapiBreadcrumb.d.ts +18 -2
- package/dist/components/navigation/KapiBreadcrumb.js +23 -16
- package/dist/components/navigation/KapiContextPanel.d.ts +17 -4
- package/dist/components/navigation/KapiContextPanel.js +152 -136
- package/dist/components/navigation/KapiNavBadge.d.ts +6 -3
- package/dist/components/navigation/KapiNavBadge.js +26 -22
- package/dist/components/navigation/KapiPanelGroup.d.ts +16 -4
- package/dist/components/navigation/KapiPanelGroup.js +66 -65
- package/dist/components/navigation/KapiTabs.d.ts +12 -0
- package/dist/components/navigation/KapiTabs.js +87 -71
- package/dist/components/navigation/KapiToc.d.ts +48 -0
- package/dist/components/navigation/KapiToc.js +66 -0
- package/dist/components/navigation/KapiTree.js +10 -10
- package/dist/components/navigation/MiniNavItem.d.ts +7 -2
- package/dist/components/navigation/MiniNavItem.js +41 -36
- package/dist/components/navigation/breadcrumbLogic.d.ts +4 -2
- package/dist/components/navigation/breadcrumbLogic.js +1 -1
- package/dist/components/navigation/index.d.ts +3 -0
- package/dist/components/navigation/navLink.d.ts +21 -0
- package/dist/components/navigation/navLink.js +26 -0
- package/dist/components/navigation/navLinkLogic.d.ts +18 -0
- package/dist/components/navigation/navLinkLogic.js +22 -0
- package/dist/components/navigation/tocLogic.d.ts +35 -0
- package/dist/components/navigation/tocLogic.js +11 -0
- package/dist/components/navigation/tocSlots.d.ts +8 -0
- package/dist/components/navigation/tocSlots.js +11 -0
- package/dist/components/overlays/KapiCommandPalette.js +6 -6
- package/dist/components/overlays/KapiContextMenu.d.ts +8 -0
- package/dist/components/overlays/KapiContextMenu.js +5 -5
- package/dist/components/overlays/KapiMenuButton.js +7 -7
- package/dist/components/overlays/KapiModal.d.ts +9 -0
- package/dist/components/overlays/KapiModal.js +79 -77
- package/dist/components/overlays/KapiOffcanvas.js +24 -24
- package/dist/components/overlays/KapiPhotoView.js +10 -10
- package/dist/components/overlays/KapiPopover.js +6 -6
- package/dist/components/overlays/KapiShapeSheet.js +4 -4
- package/dist/components/overlays/KapiTooltip.js +18 -18
- package/dist/components/overlays/index.d.ts +1 -1
- package/dist/components/overlays/menuList.js +127 -117
- package/dist/components/overlays/modalSlots.d.ts +11 -0
- package/dist/components/overlays/modalSlots.js +14 -0
- package/dist/components/slotCatalog.d.ts +123 -0
- package/dist/components/slotCatalog.js +27 -0
- package/dist/components/slotsLogic.d.ts +34 -0
- package/dist/components/slotsLogic.js +18 -0
- package/dist/components/tone.d.ts +26 -0
- package/dist/components/tone.js +15 -14
- package/dist/css/base.css +1 -1
- package/dist/css/components/data/KapiEventCalendar.css +1 -1
- package/dist/css/components/data/KapiTable.css +1 -1
- package/dist/css/components/display/KapiAnnotation.css +1 -1
- package/dist/css/components/display/KapiCodeBlock.css +1 -0
- package/dist/css/components/display/KapiDiff.css +1 -0
- package/dist/css/components/display/display.css +1 -1
- package/dist/css/components/display/typography.css +1 -0
- package/dist/css/components/feedback/feedback.css +1 -1
- package/dist/css/components/inputs/KapiButton.css +1 -1
- package/dist/css/components/inputs/KapiDatePicker.css +1 -1
- package/dist/css/components/inputs/KapiPinInput.css +1 -0
- package/dist/css/components/inputs/KapiSelect.css +1 -1
- package/dist/css/components/inputs/inputsExtra.css +1 -1
- package/dist/css/components/layout/KapiAccessCard.css +1 -1
- package/dist/css/components/layout/KapiBox.css +1 -0
- package/dist/css/components/layout/KapiCollapse.css +1 -0
- package/dist/css/components/layout/KapiDivider.css +1 -1
- package/dist/css/components/layout/KapiRail.css +1 -1
- package/dist/css/components/layout/gridSpan.css +1 -0
- package/dist/css/components/navigation/KapiToc.css +1 -0
- package/dist/css/components/navigation/navigation.css +1 -1
- package/dist/hooks/asyncResourceLogic.d.ts +11 -0
- package/dist/hooks/asyncResourceLogic.js +4 -0
- package/dist/hooks/densityLogic.d.ts +15 -0
- package/dist/hooks/densityLogic.js +4 -0
- package/dist/hooks/index.d.ts +7 -0
- package/dist/hooks/themeColorsLogic.d.ts +19 -0
- package/dist/hooks/themeColorsLogic.js +4 -2
- package/dist/hooks/themeDeriveLogic.d.ts +16 -0
- package/dist/hooks/themeDeriveLogic.js +27 -17
- package/dist/hooks/toneFamilyLogic.d.ts +146 -0
- package/dist/hooks/toneFamilyLogic.js +164 -0
- package/dist/hooks/useAsyncResource.d.ts +45 -0
- package/dist/hooks/useAsyncResource.js +24 -0
- package/dist/hooks/useKapiTheme.d.ts +16 -3
- package/dist/hooks/useKapiTheme.js +130 -117
- package/dist/hooks/useToneFamilies.d.ts +40 -0
- package/dist/hooks/useToneFamilies.js +50 -0
- package/dist/index.d.ts +3 -1
- package/dist/index.js +227 -204
- package/dist/kapi.css +1 -1
- package/dist/kapi.layered.css +1 -1
- package/dist/logic.d.ts +41 -0
- package/dist/logic.js +42 -0
- package/dist/styles/rawHeights.d.ts +8 -0
- package/package.json +14 -3
|
@@ -1,113 +1,115 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/overlays/KapiModal.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
3
|
+
import { useMergedRefs as e } from "../../hooks/mergeRefs.js";
|
|
4
|
+
import { useLabels as t } from "../locale/KapiLocaleProvider.js";
|
|
5
|
+
import { slot as n } from "../slotsLogic.js";
|
|
6
|
+
import { prefersReducedMotion as r } from "../../hooks/reducedMotion.js";
|
|
7
|
+
import { dialogNameProps as i, modalClasses as a, resolveDismiss as o } from "./dialogUtils.js";
|
|
8
|
+
import { useExitPresence as s } from "./useExitPresence.js";
|
|
9
|
+
import { originWithinCard as ee } from "../../hooks/growOriginLogic.js";
|
|
10
|
+
import { useBackdropClose as te, useNativeDialog as c, usePortalRoot as l, useTrappedDialogWarning as u } from "./useNativeDialog.js";
|
|
10
11
|
/* empty css */
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
12
|
+
import { MODAL_SLOTS as d } from "./modalSlots.js";
|
|
13
|
+
import { useId as f, useLayoutEffect as p, useRef as m, useState as h } from "react";
|
|
14
|
+
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
15
|
+
import { X as v } from "lucide-react";
|
|
16
|
+
import { createPortal as y } from "react-dom";
|
|
15
17
|
//#region src/components/overlays/KapiModal.tsx
|
|
16
|
-
var
|
|
17
|
-
let n =
|
|
18
|
-
return r ? /* @__PURE__ */
|
|
18
|
+
var b = { close: "Cerrar" }, x = ({ open: e, ...t }) => {
|
|
19
|
+
let n = m(null), { present: r, closing: i } = s(e, n);
|
|
20
|
+
return r ? /* @__PURE__ */ g(C, {
|
|
19
21
|
...t,
|
|
20
22
|
dialogRef: n,
|
|
21
23
|
closing: i
|
|
22
24
|
}) : null;
|
|
23
|
-
},
|
|
24
|
-
let
|
|
25
|
-
dismissible:
|
|
26
|
-
closeOnEscape:
|
|
27
|
-
closeOnBackdrop:
|
|
28
|
-
closeButton:
|
|
29
|
-
}), { closeOnEscape:
|
|
30
|
-
u("KapiModal",
|
|
31
|
-
let e =
|
|
32
|
-
if (!
|
|
33
|
-
|
|
25
|
+
}, S = () => {}, C = ({ title: s, subtitle: x, onClose: C, children: w, footer: T, size: E = "md", hideHeader: D = !1, className: ne = "", classNames: O, style: k, id: A, ref: j, closeOnBackdrop: M, closeOnEscape: N, closeButton: P, dismissible: F, closeLabel: I, labels: L, "aria-label": R, "aria-labelledby": z, growFrom: B, dialogRef: V, closing: H }) => {
|
|
26
|
+
let U = H ? S : C, W = f(), G = t("modal", b, L), K = I ?? G.close, q = m(null), J = e(q, j), [Y, X] = h(null), Z = o({
|
|
27
|
+
dismissible: F,
|
|
28
|
+
closeOnEscape: N,
|
|
29
|
+
closeOnBackdrop: M,
|
|
30
|
+
closeButton: P
|
|
31
|
+
}), { closeOnEscape: re, closeOnBackdrop: ie, closeButton: Q } = Z, { ref: ae, dialogProps: oe } = c({ onRequestClose: re ? () => U("escape") : void 0 }), se = te(ie ? () => U("backdrop") : void 0);
|
|
32
|
+
u("KapiModal", Z, q), p(() => {
|
|
33
|
+
let e = q.current;
|
|
34
|
+
if (!B || !e || r(e)) {
|
|
35
|
+
X(null);
|
|
34
36
|
return;
|
|
35
37
|
}
|
|
36
|
-
let t = e.getBoundingClientRect(),
|
|
37
|
-
|
|
38
|
-
left: a -
|
|
38
|
+
let t = e.getBoundingClientRect(), n = e.offsetWidth, i = e.offsetHeight, a = t.left + t.width / 2, o = t.top + t.height / 2;
|
|
39
|
+
X(ee(B, {
|
|
40
|
+
left: a - n / 2,
|
|
39
41
|
top: o - i / 2,
|
|
40
|
-
width:
|
|
42
|
+
width: n,
|
|
41
43
|
height: i
|
|
42
44
|
}));
|
|
43
|
-
}, [
|
|
45
|
+
}, [B]);
|
|
44
46
|
let $ = l();
|
|
45
|
-
return $ ?
|
|
47
|
+
return $ ? y(/* @__PURE__ */ g("dialog", {
|
|
46
48
|
ref: (e) => {
|
|
47
|
-
|
|
49
|
+
ae.current = e, V.current = e;
|
|
48
50
|
},
|
|
49
|
-
|
|
50
|
-
"data-closing":
|
|
51
|
+
...n(d, "overlay", O, "kapi-modal-dialog"),
|
|
52
|
+
"data-closing": H || void 0,
|
|
51
53
|
"aria-modal": "true",
|
|
52
|
-
...
|
|
53
|
-
titleId:
|
|
54
|
-
title:
|
|
55
|
-
hideHeader:
|
|
56
|
-
"aria-label":
|
|
57
|
-
"aria-labelledby":
|
|
54
|
+
...i({
|
|
55
|
+
titleId: W,
|
|
56
|
+
title: s,
|
|
57
|
+
hideHeader: D,
|
|
58
|
+
"aria-label": R,
|
|
59
|
+
"aria-labelledby": z
|
|
58
60
|
}),
|
|
59
|
-
...
|
|
60
|
-
...
|
|
61
|
-
children: /* @__PURE__ */
|
|
62
|
-
ref:
|
|
63
|
-
id:
|
|
64
|
-
|
|
65
|
-
style:
|
|
66
|
-
...
|
|
67
|
-
"--kapi-grow-x": `${
|
|
68
|
-
"--kapi-grow-y": `${
|
|
69
|
-
} :
|
|
61
|
+
...oe,
|
|
62
|
+
...se,
|
|
63
|
+
children: /* @__PURE__ */ _("div", {
|
|
64
|
+
ref: J,
|
|
65
|
+
id: A,
|
|
66
|
+
...n(d, "root", O, `${a(E, ne)}${Y ? " kapi-modal--grow" : ""}`),
|
|
67
|
+
style: Y ? {
|
|
68
|
+
...k,
|
|
69
|
+
"--kapi-grow-x": `${Y.x}px`,
|
|
70
|
+
"--kapi-grow-y": `${Y.y}px`
|
|
71
|
+
} : k,
|
|
70
72
|
children: [
|
|
71
|
-
|
|
73
|
+
D ? Q && /* @__PURE__ */ g("button", {
|
|
72
74
|
type: "button",
|
|
73
|
-
|
|
74
|
-
onClick: () =>
|
|
75
|
-
"aria-label":
|
|
76
|
-
children: /* @__PURE__ */
|
|
75
|
+
...n(d, "close", O, "kapi-modal__x--float"),
|
|
76
|
+
onClick: () => U("close-button"),
|
|
77
|
+
"aria-label": K,
|
|
78
|
+
children: /* @__PURE__ */ g(v, {
|
|
77
79
|
size: 17,
|
|
78
80
|
strokeWidth: 2.2
|
|
79
81
|
})
|
|
80
|
-
}) : /* @__PURE__ */
|
|
81
|
-
|
|
82
|
-
children: [/* @__PURE__ */
|
|
83
|
-
id:
|
|
84
|
-
|
|
85
|
-
children:
|
|
86
|
-
}),
|
|
87
|
-
|
|
88
|
-
children:
|
|
89
|
-
})] }), Q && /* @__PURE__ */
|
|
82
|
+
}) : /* @__PURE__ */ _("div", {
|
|
83
|
+
...n(d, "header", O),
|
|
84
|
+
children: [/* @__PURE__ */ _("div", { children: [/* @__PURE__ */ g("div", {
|
|
85
|
+
id: W,
|
|
86
|
+
...n(d, "title", O),
|
|
87
|
+
children: s
|
|
88
|
+
}), x && /* @__PURE__ */ g("div", {
|
|
89
|
+
...n(d, "subtitle", O),
|
|
90
|
+
children: x
|
|
91
|
+
})] }), Q && /* @__PURE__ */ g("button", {
|
|
90
92
|
type: "button",
|
|
91
|
-
|
|
92
|
-
onClick: () =>
|
|
93
|
-
"aria-label":
|
|
94
|
-
children: /* @__PURE__ */
|
|
93
|
+
...n(d, "close", O),
|
|
94
|
+
onClick: () => U("close-button"),
|
|
95
|
+
"aria-label": K,
|
|
96
|
+
children: /* @__PURE__ */ g(v, {
|
|
95
97
|
size: 17,
|
|
96
98
|
strokeWidth: 2.2
|
|
97
99
|
})
|
|
98
100
|
})]
|
|
99
101
|
}),
|
|
100
|
-
/* @__PURE__ */
|
|
101
|
-
|
|
102
|
-
children: C
|
|
103
|
-
}),
|
|
104
|
-
w && /* @__PURE__ */ h("div", {
|
|
105
|
-
className: "kapi-modal__foot",
|
|
102
|
+
/* @__PURE__ */ g("div", {
|
|
103
|
+
...n(d, "body", O),
|
|
106
104
|
children: w
|
|
105
|
+
}),
|
|
106
|
+
T && /* @__PURE__ */ g("div", {
|
|
107
|
+
...n(d, "footer", O),
|
|
108
|
+
children: T
|
|
107
109
|
})
|
|
108
110
|
]
|
|
109
111
|
})
|
|
110
112
|
}), $) : null;
|
|
111
113
|
};
|
|
112
114
|
//#endregion
|
|
113
|
-
export {
|
|
115
|
+
export { b as DEFAULT_MODAL_LABELS, x as KapiModal };
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/overlays/KapiOffcanvas.css";
|
|
3
3
|
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
|
|
5
|
+
import { useKapiDir as n, useLabels as r } from "../locale/KapiLocaleProvider.js";
|
|
6
|
+
import { computedStyleOf as i, winOf as a } from "../../hooks/ownerDocument.js";
|
|
7
|
+
import { resolveDirection as o } from "../../hooks/directionLogic.js";
|
|
8
8
|
import { maxTransitionMs as ee, resolveDismiss as s } from "./dialogUtils.js";
|
|
9
9
|
import { useExitPresence as c } from "./useExitPresence.js";
|
|
10
10
|
import { useBackdropClose as l, useNativeDialog as u, usePortalRoot as d, useTrappedDialogWarning as f } from "./useNativeDialog.js";
|
|
@@ -21,8 +21,8 @@ var be = 120, T = {
|
|
|
21
21
|
resize: "Redimensionar panel",
|
|
22
22
|
close: "Cerrar",
|
|
23
23
|
closePanel: "Cerrar panel"
|
|
24
|
-
}, E = ({ textDir:
|
|
25
|
-
let N =
|
|
24
|
+
}, E = ({ textDir: n, stackId: o, phase: d, onEntered: m, onExited: h, onClose: ve, title: w, subtitle: E, children: D, footer: O, side: xe, width: k = 520, height: Se, pushRatio: Ce = te, pushOffset: we = 16, closeOnBackdrop: Te, closeOnEscape: Ee, closeButton: De, dismissible: Oe, closeLabel: ke, labels: Ae, className: je, style: Me, id: Ne, ref: Pe, companion: A, resizable: Fe = !1, minWidth: j = 320, maxWidth: M, onResize: Ie }) => {
|
|
25
|
+
let N = r("offcanvas", T, Ae), Le = ke ?? N.close, P = _(), F = _(), I = ae(xe), L = y(null), R = ye(p.subscribe, p.getSnapshot, p.getServerSnapshot), z = ne(R, o), Re = Math.max(0, re(R, o)), { scale: ze, translateX: Be } = oe(I, ie(z, Ce, we)), [B, Ve] = b(() => me(k, 520)), [He, V] = b(!1), H = y(null), U = y(Ie);
|
|
26
26
|
U.current = Ie;
|
|
27
27
|
let W = (e) => {
|
|
28
28
|
Ve(e), e !== B && U.current?.(e);
|
|
@@ -36,26 +36,26 @@ var be = 120, T = {
|
|
|
36
36
|
}, We = (e) => {
|
|
37
37
|
let t = H.current;
|
|
38
38
|
if (!t) return;
|
|
39
|
-
let n = g(M, (
|
|
39
|
+
let n = g(M, (a(L.current) ?? window).innerWidth);
|
|
40
40
|
W(ge(I, t.startWidth, t.startX, e.clientX, j, n));
|
|
41
41
|
}, G = (e) => {
|
|
42
42
|
H.current = null, e.currentTarget.hasPointerCapture(e.pointerId) && e.currentTarget.releasePointerCapture(e.pointerId), V(!1);
|
|
43
43
|
}, Ge = (e) => {
|
|
44
|
-
let t = g(M, (
|
|
44
|
+
let t = g(M, (a(L.current) ?? window).innerWidth), n = he(I, B, e.key, j, t);
|
|
45
45
|
n !== null && (e.preventDefault(), e.stopPropagation(), W(n));
|
|
46
46
|
}, K = d === "open" ? ve : void 0, q = s({
|
|
47
47
|
dismissible: Oe,
|
|
48
48
|
closeOnEscape: Ee,
|
|
49
49
|
closeOnBackdrop: Te,
|
|
50
50
|
closeButton: De
|
|
51
|
-
}), { closeOnEscape: Ke, closeOnBackdrop: qe, closeButton: Je } = q, { ref: J, dialogProps: Ye } = u({ onRequestClose: Ke ? () => K?.("escape") : void 0 }), Xe =
|
|
51
|
+
}), { closeOnEscape: Ke, closeOnBackdrop: qe, closeButton: Je } = q, { ref: J, dialogProps: Ye } = u({ onRequestClose: Ke ? () => K?.("escape") : void 0 }), Xe = t(J, Pe), Ze = l(qe ? () => K?.("backdrop") : void 0);
|
|
52
52
|
f("KapiOffcanvas", q, J), v(() => (p.dispatch({
|
|
53
53
|
type: "add",
|
|
54
|
-
id:
|
|
54
|
+
id: o
|
|
55
55
|
}), () => p.dispatch({
|
|
56
56
|
type: "remove",
|
|
57
|
-
id:
|
|
58
|
-
})), [
|
|
57
|
+
id: o
|
|
58
|
+
})), [o]);
|
|
59
59
|
let Y = y(m);
|
|
60
60
|
Y.current = m, v(() => {
|
|
61
61
|
L.current?.getBoundingClientRect(), Y.current();
|
|
@@ -68,20 +68,20 @@ var be = 120, T = {
|
|
|
68
68
|
X.current();
|
|
69
69
|
return;
|
|
70
70
|
}
|
|
71
|
-
let t =
|
|
71
|
+
let t = i(e), n = ee(t.transitionDuration, t.transitionDelay);
|
|
72
72
|
if (n <= 0) {
|
|
73
73
|
X.current();
|
|
74
74
|
return;
|
|
75
75
|
}
|
|
76
|
-
let
|
|
77
|
-
|
|
76
|
+
let r = !1, a = () => {
|
|
77
|
+
r || (r = !0, X.current());
|
|
78
78
|
}, o = (t) => {
|
|
79
79
|
t.target === e && t.propertyName === "transform" && a();
|
|
80
80
|
};
|
|
81
81
|
e.addEventListener("transitionend", o);
|
|
82
82
|
let s = window.setTimeout(a, n + be);
|
|
83
83
|
return () => {
|
|
84
|
-
|
|
84
|
+
r = !0, e.removeEventListener("transitionend", o), window.clearTimeout(s);
|
|
85
85
|
};
|
|
86
86
|
}, [d]);
|
|
87
87
|
let Z = Fe && (I === "left" || I === "right"), Q = ce(I, k, Se, "520px");
|
|
@@ -93,7 +93,7 @@ var be = 120, T = {
|
|
|
93
93
|
"--kapi-offc-push-s": ze
|
|
94
94
|
}, $e = ue(I, A), et = y(null), { present: tt, closing: nt } = c($e, et), rt = y(A);
|
|
95
95
|
A && (rt.current = A);
|
|
96
|
-
let $ = A ?? rt.current, it = tt && pe(I) && $ !== void 0, at =
|
|
96
|
+
let $ = A ?? rt.current, it = tt && pe(I) && $ !== void 0, at = n === "rtl", ot = at ? { dir: "rtl" } : {}, st = /* @__PURE__ */ S("div", {
|
|
97
97
|
ref: L,
|
|
98
98
|
className: "kapi-offc__panel",
|
|
99
99
|
...ot,
|
|
@@ -201,25 +201,25 @@ var be = 120, T = {
|
|
|
201
201
|
children: lt
|
|
202
202
|
})
|
|
203
203
|
});
|
|
204
|
-
}, D = ({ open: e, onExited:
|
|
205
|
-
let
|
|
206
|
-
l.current =
|
|
204
|
+
}, D = ({ open: e, onExited: t, side: r, ...i }) => {
|
|
205
|
+
let a = _(), ee = n(), [s, c] = ve(m, "unmounted"), l = y(t);
|
|
206
|
+
l.current = t, v(() => {
|
|
207
207
|
c(e ? "open" : "close");
|
|
208
208
|
}, [e]), v(() => {
|
|
209
209
|
(s === "exit" || s === "open") && p.dispatch({
|
|
210
210
|
type: "mark",
|
|
211
|
-
id:
|
|
211
|
+
id: a,
|
|
212
212
|
state: s === "exit" ? "closing" : "open"
|
|
213
213
|
});
|
|
214
|
-
}, [s,
|
|
214
|
+
}, [s, a]);
|
|
215
215
|
let u = d();
|
|
216
216
|
if (s === "unmounted" || !u) return null;
|
|
217
|
-
let f =
|
|
217
|
+
let f = o(u, ee);
|
|
218
218
|
return w(/* @__PURE__ */ x(E, {
|
|
219
219
|
...i,
|
|
220
220
|
textDir: f,
|
|
221
221
|
side: h(r, f),
|
|
222
|
-
stackId:
|
|
222
|
+
stackId: a,
|
|
223
223
|
phase: s,
|
|
224
224
|
onEntered: () => c("entered"),
|
|
225
225
|
onExited: () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/overlays/overlays.css";
|
|
3
3
|
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
|
|
5
|
+
import { useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
6
|
+
import { computedStyleOf as r } from "../../hooks/ownerDocument.js";
|
|
7
|
+
import { resolveKapiRoot as i } from "../../hooks/kapiRoot.js";
|
|
8
|
+
import { onViewportChange as a } from "../../hooks/rafThrottle.js";
|
|
9
9
|
/* empty css */
|
|
10
10
|
import { KapiOverlayPortal as o } from "./overlayPortal.js";
|
|
11
11
|
import { prefersReducedMotion as s } from "../../hooks/reducedMotion.js";
|
|
@@ -44,14 +44,14 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
|
|
|
44
44
|
fontSize: t.height * b
|
|
45
45
|
} : {};
|
|
46
46
|
}, E = ({ children: v, content: y, bg: b = "var(--kapi-primary-soft)", ink: E = "var(--kapi-primary-ink)", label: D, labels: O, className: k, style: A, id: j, ref: M }) => {
|
|
47
|
-
let N =
|
|
47
|
+
let N = n("photoView", _, O), P = f(null), F = t(P, M), I = f(null), L = f(!1), [R, z] = d(x, "closed"), [B, V] = p(null), [H, U] = p(999), [W, G] = p(null), K = (e) => {
|
|
48
48
|
e.stopPropagation();
|
|
49
49
|
let t = P.current;
|
|
50
50
|
if (!t) return;
|
|
51
|
-
let
|
|
52
|
-
V(
|
|
51
|
+
let n = t.getBoundingClientRect();
|
|
52
|
+
V(n);
|
|
53
53
|
let a = t.firstElementChild ?? t;
|
|
54
|
-
U(C(
|
|
54
|
+
U(C(r(a).borderRadius, n)), G(i(t)), z("open");
|
|
55
55
|
}, q = (e) => {
|
|
56
56
|
e.stopPropagation(), z("close");
|
|
57
57
|
};
|
|
@@ -62,7 +62,7 @@ var _ = { viewer: "Foto ampliada" }, v = 92, y = 24, b = .42, x = (e, t) => {
|
|
|
62
62
|
}, [R]);
|
|
63
63
|
let J = R === "closed";
|
|
64
64
|
l(() => {
|
|
65
|
-
if (!J) return
|
|
65
|
+
if (!J) return a(() => {
|
|
66
66
|
let e = P.current;
|
|
67
67
|
if (!e) return;
|
|
68
68
|
let t = e.getBoundingClientRect();
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/overlays/KapiPopover.css";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
3
|
+
import { useMergedRefs as e } from "../../hooks/mergeRefs.js";
|
|
4
|
+
import { resolveKapiRoot as t } from "../../hooks/kapiRoot.js";
|
|
5
|
+
import { usePlacement as n } from "../../hooks/usePlacement.js";
|
|
6
6
|
import { useDismiss as r } from "../../hooks/useDismiss.js";
|
|
7
7
|
import { KapiOverlayPortal as i } from "./overlayPortal.js";
|
|
8
8
|
import { useExitPresence as a } from "./useExitPresence.js";
|
|
@@ -11,11 +11,11 @@ import { useLayoutEffect as o, useRef as s, useState as c } from "react";
|
|
|
11
11
|
import { jsx as l } from "react/jsx-runtime";
|
|
12
12
|
//#region src/components/overlays/KapiPopover.tsx
|
|
13
13
|
function u({ open: u, anchorRef: d, onClose: f, side: p = "bottom", align: m = "start", offset: h = 6, margin: g = 8, matchAnchorWidth: _ = !1, role: v = "dialog", "aria-label": y, id: b, className: x = "", style: S, ref: C, closeOnEscape: w = !0, closeOnOutside: T = !0, restoreFocus: E = !0, children: D }) {
|
|
14
|
-
let O = s(null), k =
|
|
14
|
+
let O = s(null), k = e(O, C), [A, j] = c(null), { present: M, closing: N } = a(u, O);
|
|
15
15
|
o(() => {
|
|
16
|
-
j(M ?
|
|
16
|
+
j(M ? t(d.current) : null);
|
|
17
17
|
}, [M, d]);
|
|
18
|
-
let { placement: P, style: F } =
|
|
18
|
+
let { placement: P, style: F } = n({
|
|
19
19
|
open: M,
|
|
20
20
|
enabled: !!A,
|
|
21
21
|
anchor: d,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/overlays/overlays.css";
|
|
3
3
|
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
|
|
5
|
+
import { useLabels as n } from "../locale/KapiLocaleProvider.js";
|
|
6
|
+
import { useControllableState as r } from "../../hooks/useControllableState.js";
|
|
7
7
|
import { useDismiss as i } from "../../hooks/useDismiss.js";
|
|
8
8
|
/* empty css */
|
|
9
9
|
import { focusableWithin as a } from "../../hooks/focusLogic.js";
|
|
@@ -15,7 +15,7 @@ var p = {
|
|
|
15
15
|
close: "Cerrar",
|
|
16
16
|
open: "Abrir"
|
|
17
17
|
}, m = ({ title: m, children: h, width: g = 300, height: _ = 250, label: v, labels: y, className: b, style: x, id: S, ref: C, open: w, defaultOpen: T = !1, onOpenChange: E }) => {
|
|
18
|
-
let D =
|
|
18
|
+
let D = n("shapeSheet", p, y), O = c(null), k = t(O, C), A = c(null), j = c(null), M = c(null), N = s(), [P, F] = r(w, T, E), I = c(P);
|
|
19
19
|
I.current = P;
|
|
20
20
|
let L = (e) => {
|
|
21
21
|
e !== I.current && F(e);
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import "#kapi-css/components/overlays/overlays.css";
|
|
3
3
|
import { joinClasses as e } from "../rootProps.js";
|
|
4
|
-
import {
|
|
4
|
+
import { useMergedRefs as t } from "../../hooks/mergeRefs.js";
|
|
5
5
|
import { useKapiDir as n } from "../locale/KapiLocaleProvider.js";
|
|
6
6
|
import { winOf as r } from "../../hooks/ownerDocument.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
7
|
+
import { joinIds as i } from "../inputs/fieldLogic.js";
|
|
8
|
+
import { placePopover as a } from "./popoverLogic.js";
|
|
9
|
+
import { onViewportChange as o } from "../../hooks/rafThrottle.js";
|
|
10
|
+
import { placementViewport as s } from "../../hooks/viewportInsetLogic.js";
|
|
11
|
+
import { resolveDirection as c } from "../../hooks/directionLogic.js";
|
|
12
12
|
/* empty css */
|
|
13
13
|
import { cloneElement as l, isValidElement as u, useEffect as d, useId as f, useLayoutEffect as p, useRef as m, useState as h } from "react";
|
|
14
14
|
import { jsx as g, jsxs as _ } from "react/jsx-runtime";
|
|
15
15
|
//#region src/components/overlays/KapiTooltip.tsx
|
|
16
|
-
var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "rtl" ? "left" : "right" : e === "start" ? t === "rtl" ? "right" : "left" : e, w = (e) => Math.min(v, String(e).length * y + b), T = (e, t, n, r,
|
|
16
|
+
var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "rtl" ? "left" : "right" : e === "start" ? t === "rtl" ? "right" : "left" : e, w = (e) => Math.min(v, String(e).length * y + b), T = (e, t, n, r, i = Infinity) => {
|
|
17
17
|
let o = t.bottom ?? t.top, s = t.left ?? t.right, c = {
|
|
18
18
|
top: t.top,
|
|
19
19
|
bottom: o,
|
|
@@ -22,12 +22,12 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
|
|
|
22
22
|
width: t.right - s,
|
|
23
23
|
height: o - t.top
|
|
24
24
|
}, l = e === "top" || e === "bottom";
|
|
25
|
-
return
|
|
25
|
+
return a(c, {
|
|
26
26
|
width: w(n),
|
|
27
27
|
height: S
|
|
28
28
|
}, {
|
|
29
29
|
width: r,
|
|
30
|
-
height:
|
|
30
|
+
height: i
|
|
31
31
|
}, {
|
|
32
32
|
side: e,
|
|
33
33
|
offset: l ? 0 : x,
|
|
@@ -40,7 +40,7 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
|
|
|
40
40
|
shift: !1,
|
|
41
41
|
mainMin: -Infinity
|
|
42
42
|
}, k = (e, t) => {
|
|
43
|
-
let n = e === "top" || e === "bottom", { top: r, left:
|
|
43
|
+
let n = e === "top" || e === "bottom", { top: r, left: i } = a({
|
|
44
44
|
top: t.top,
|
|
45
45
|
bottom: t.bottom,
|
|
46
46
|
left: t.left,
|
|
@@ -59,7 +59,7 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
|
|
|
59
59
|
offset: n ? D : E
|
|
60
60
|
});
|
|
61
61
|
return {
|
|
62
|
-
x:
|
|
62
|
+
x: i,
|
|
63
63
|
y: r
|
|
64
64
|
};
|
|
65
65
|
}, A = (e, t) => {
|
|
@@ -68,15 +68,15 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
|
|
|
68
68
|
} catch {
|
|
69
69
|
return null;
|
|
70
70
|
}
|
|
71
|
-
}, j = (e,
|
|
72
|
-
let w = f(), E = m(null), D =
|
|
71
|
+
}, j = (e, t) => i(typeof e == "string" ? e : void 0, t), M = ({ label: i, children: a, prefer: v = "end", className: y, style: b, id: x, ref: S }) => {
|
|
72
|
+
let w = f(), E = m(null), D = t(E, S), O = n(), [M, N] = h(() => C(v, c(null, O))), [P, F] = h(!1), [I, L] = h(!1), R = m({
|
|
73
73
|
hover: !1,
|
|
74
74
|
focus: !1
|
|
75
75
|
}), z = () => {
|
|
76
76
|
let e = E.current;
|
|
77
77
|
if (!e) return;
|
|
78
|
-
let
|
|
79
|
-
e.style.setProperty("--kapi-tip-x", `${Math.round(a)}px`), e.style.setProperty("--kapi-tip-y", `${Math.round(
|
|
78
|
+
let t = e.getBoundingClientRect(), n = s(e), r = T(C(v, c(e, O)), t, i, n.width, n.height), { x: a, y: o } = k(r, t);
|
|
79
|
+
e.style.setProperty("--kapi-tip-x", `${Math.round(a)}px`), e.style.setProperty("--kapi-tip-y", `${Math.round(o)}px`), N(r);
|
|
80
80
|
}, B = m(z);
|
|
81
81
|
p(() => {
|
|
82
82
|
B.current = z;
|
|
@@ -94,11 +94,11 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
|
|
|
94
94
|
d(() => {
|
|
95
95
|
if (!I) return;
|
|
96
96
|
let e = r(E.current);
|
|
97
|
-
return
|
|
97
|
+
return o(() => B.current(), e ? { target: e } : {});
|
|
98
98
|
}, [I]);
|
|
99
99
|
let K = (e) => {
|
|
100
100
|
e.key === "Escape" && !P && F(!0);
|
|
101
|
-
}, q = u(
|
|
101
|
+
}, q = u(a) ? a : null, J = q ? l(q, { "aria-describedby": j(q.props["aria-describedby"], w) }) : a;
|
|
102
102
|
return /* @__PURE__ */ _("span", {
|
|
103
103
|
id: x,
|
|
104
104
|
className: e("kapi-tip", y),
|
|
@@ -120,7 +120,7 @@ var v = 280, y = 7, b = 28, x = 12, S = 44, C = (e, t) => e === "end" ? t === "r
|
|
|
120
120
|
role: "tooltip",
|
|
121
121
|
id: w,
|
|
122
122
|
popover: "manual",
|
|
123
|
-
children:
|
|
123
|
+
children: i
|
|
124
124
|
})]
|
|
125
125
|
});
|
|
126
126
|
};
|
|
@@ -12,7 +12,7 @@ export type { KapiPhotoViewLabels, KapiPhotoViewProps } from "./KapiPhotoView.js
|
|
|
12
12
|
export { KapiShapeSheet, DEFAULT_SHAPE_SHEET_LABELS } from "./KapiShapeSheet.js";
|
|
13
13
|
export type { KapiShapeSheetProps, KapiShapeSheetLabels } from "./KapiShapeSheet.js";
|
|
14
14
|
export { KapiModal, DEFAULT_MODAL_LABELS } from "./KapiModal.js";
|
|
15
|
-
export type { KapiModalLabels, KapiModalProps, KapiModalSize } from "./KapiModal.js";
|
|
15
|
+
export type { KapiModalClassNames, KapiModalLabels, KapiModalProps, KapiModalSize } from "./KapiModal.js";
|
|
16
16
|
export { KapiSplitModal, DEFAULT_SPLIT_MODAL_LABELS } from "./KapiSplitModal.js";
|
|
17
17
|
export type { KapiSplitModalAside, KapiSplitModalProps, KapiSplitModalLabels } from "./KapiSplitModal.js";
|
|
18
18
|
export { KapiConfirm, DEFAULT_CONFIRM_LABELS } from "./KapiConfirm.js";
|