@povio/ui 3.4.0-rc.25 → 3.4.0-rc.27
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/{Accordion-BLPm2118.js → Accordion-BKBl-2EO.js} +4 -3
- package/dist/{Autocomplete-Ce3ygKxG.d.ts → Autocomplete-0tckACUz.d.ts} +1 -1
- package/dist/{BottomSheet-BWKej2PR.d.ts → BottomSheet-BZXBtOHF.d.ts} +1 -2
- package/dist/{BottomSheet-BNGGxiX7.js → BottomSheet-CUIKvr7g.js} +8 -52
- package/dist/BottomSheet.lazy-DT02808T.d.ts +5 -0
- package/dist/{Breadcrumbs-DentRJc_.js → Breadcrumbs-D0mblHwu.js} +8 -7
- package/dist/{Button-oSE-CM83.js → Button-D09S1dNt.js} +3 -2
- package/dist/{Button-CtPMeT8f.js → Button-D9J5wkMv.js} +3 -3
- package/dist/{Calendar-CzDZnIF0.js → Calendar-HJ-cFPap.js} +13 -11
- package/dist/{Checkbox-Feyideqw.js → Checkbox-B0w_4Ri0.js} +6 -5
- package/dist/DOMFunctions-BrQjsnDh.js +52 -0
- package/dist/{DatePicker-O55fFlKg.js → DatePicker-DZgmU61j.js} +9 -9
- package/dist/{DatePickerInput-CQKtbsQd.js → DatePickerInput-97Ks0udv.js} +6 -6
- package/dist/{DateRangePicker-CnxuqAB1.js → DateRangePicker-LFJ2iqWM.js} +15 -13
- package/dist/{DateTimePicker-B39ywgjx.js → DateTimePicker-Bk1R38wj.js} +9 -9
- package/dist/{Dialog-DpLXaUXz.js → Dialog-Bl7F9FUP.js} +13 -11
- package/dist/Drawer-BkPPB5DQ.js +98 -0
- package/dist/{FileTrigger-BSzrj50r.js → FileTrigger-CjvQGNXu.js} +11 -10
- package/dist/{FileUpload-CnYu5cmB.js → FileUpload-DWqPr5wM.js} +6 -6
- package/dist/{Form-DsbBBmgz.d.ts → Form-BX_x2VGS.d.ts} +1 -1
- package/dist/{FormField-ChDNTHr4.js → FormField-Cl-t5Wi1.js} +10 -34
- package/dist/FormFieldHeaderTooltip-C3nmuFKW.js +38 -0
- package/dist/InlineTooltipWrapper-7ePcpH9g.js +24 -0
- package/dist/{Input-B4FVIWxn.js → Input-BefLtZJe.js} +2 -1
- package/dist/{InputItem-D4UmXpyc.js → InputItem-DY7YW-n3.js} +11 -11
- package/dist/{InputUpload-CAk3IStC.js → InputUpload-BoAAS7eC.js} +6 -6
- package/dist/{Inputs-CnwGtVmt.d.ts → Inputs-B5F_klPo.d.ts} +1 -1
- package/dist/{Inputs-4vWHEAZ1.js → Inputs-BbCxYUZh.js} +1 -1
- package/dist/{Label-a10cLlQM.js → Label-BVczUvgv.js} +1 -1
- package/dist/{Link-iPOFlrxY.js → Link-BWbPxs6p.js} +2 -1
- package/dist/{Link-vPV4s0c3.js → Link-EHxXHf53.js} +1 -1
- package/dist/{ListBox-BCW74bzR.js → ListBox-Ck1UjeGo.js} +6 -5
- package/dist/{Menu-DF3r5ssn.js → Menu-fXWnROTU.js} +4 -4
- package/dist/{Menu-CVgRPAB3.d.ts → Menu-ucX0h-jq.d.ts} +1 -1
- package/dist/{MenuDesktop-CEftscnb.js → MenuDesktop-C3_I4fdd.js} +1 -1
- package/dist/{MenuItem-xJq_qdIf.d.ts → MenuItem--lQvt0VV.d.ts} +1 -1
- package/dist/{Modal-HBOqpsZ3.js → Modal-UhtruHmf.js} +4 -3
- package/dist/{Modal-DdKOgTpG.js → Modal-zrXMGm_L.js} +2 -2
- package/dist/{NumberRangeInput-CBM_ycX_.js → NumberRangeInput-C9svqxJ9.js} +7 -7
- package/dist/{OverlayArrow-Bz_8bYjT.js → OverlayArrow-CyFI2DhX.js} +11 -44
- package/dist/{PaginationList-B27QL6gG.js → PaginationList-DcArYsq1.js} +1 -1
- package/dist/{QuerySelect-CuZjxrle.d.ts → QuerySelect-tupQOlAT.d.ts} +2 -2
- package/dist/{RadioGroup-DbMmwkLQ.js → RadioGroup-lA8iM1Ry.js} +10 -8
- package/dist/{ResponsivePopover-C8IriWcI.d.ts → ResponsivePopover-B-Z9sFxq.d.ts} +2 -1
- package/dist/{Segment--coTx1BD.js → Segment-BAVcQyuY.js} +3 -3
- package/dist/{Select-C_cXfp8z.js → Select-BZFSEGvs.js} +3 -3
- package/dist/{Select-BQ9YJzFg.d.ts → Select-Do5qWHLj.d.ts} +1 -1
- package/dist/{SelectBase-Ds3nqzVg.d.ts → SelectBase-aSvWd7Cx.d.ts} +1 -1
- package/dist/{SelectionIndicator-BiAHPBz2.js → SelectionIndicator-BvWiZS2N.js} +2 -2
- package/dist/{Slider-YdD68ygp.js → Slider-CGESXeRj.js} +9 -8
- package/dist/{SplitButton-Cv9ej6Or.d.ts → SplitButton-DxrWH3EX.d.ts} +1 -1
- package/dist/{Stepper-Cc7qNjch.js → Stepper-CSfhZBK1.js} +1 -1
- package/dist/TableDnd-CuHxANWh.js +133 -0
- package/dist/{Tag-BAFkwLDe.js → Tag-ClrrGr1a.js} +1 -1
- package/dist/{TextArea-B8TIZZ5i.js → TextArea-2yGnVaG6.js} +4 -3
- package/dist/{TextEditor-CAh3oyK3.js → TextEditor-BmvUimyG.js} +12 -11
- package/dist/{TimePicker-BY6IMP4p.js → TimePicker-DRDEIb-p.js} +8 -8
- package/dist/{Toast-DDkev3SZ.d.ts → Toast-JL9yaI35.d.ts} +1 -2
- package/dist/Toast-ZFTj3GGo.js +49 -0
- package/dist/ToastContainer-9OS5SK5K.d.ts +5 -0
- package/dist/ToastContainer-TRM91co1.js +23 -0
- package/dist/ToastRenderer-Dpax9sKV.js +40 -0
- package/dist/{Toggle-Bw15KIly.js → Toggle-bWM3RSXY.js} +4 -3
- package/dist/{ToggleButton-DYVFkuEk.js → ToggleButton-C01P8reg.js} +6 -4
- package/dist/{Tooltip-CVBOnHy-.js → Tooltip-D8YNkKCl.js} +5 -13
- package/dist/{TooltipWrapper-eCF5-eNP.js → TooltipWrapper-V0A1TdyC.js} +6 -20
- package/dist/{VisuallyHidden-src7PN5r.js → VisuallyHidden-CWgME09A.js} +1 -1
- package/dist/{autocomplete-NiLahf70.d.ts → autocomplete-bNuG6_dG.d.ts} +2 -2
- package/dist/components/accordion.js +1 -1
- package/dist/components/action-modal.js +2 -2
- package/dist/components/autocomplete.d.ts +1 -1
- package/dist/components/autocomplete.js +3 -3
- package/dist/components/bottom-sheet.d.ts +3 -2
- package/dist/components/bottom-sheet.js +108 -1
- package/dist/components/breadcrumbs.js +1 -1
- package/dist/components/button.js +1 -1
- package/dist/components/checkbox-group.js +3 -3
- package/dist/components/checkbox.js +1 -1
- package/dist/components/date-picker.js +1 -1
- package/dist/components/date-range-picker.js +1 -1
- package/dist/components/date-time-picker.js +1 -1
- package/dist/components/drawer.d.ts +5 -2
- package/dist/components/drawer.js +80 -87
- package/dist/components/file-upload-container.js +1 -1
- package/dist/components/file-upload.js +1 -1
- package/dist/components/form-field.js +1 -1
- package/dist/components/icon-button.js +2 -2
- package/dist/components/inline-icon-button.js +1 -1
- package/dist/components/input-upload.js +1 -1
- package/dist/components/link.js +1 -1
- package/dist/components/menu.d.ts +2 -2
- package/dist/components/menu.js +2 -2
- package/dist/components/modal.js +1 -1
- package/dist/components/number-input.js +8 -8
- package/dist/components/number-range-input.js +1 -1
- package/dist/components/pagination-list.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/pill-button.js +2 -2
- package/dist/components/pill.js +1 -1
- package/dist/components/query-autocomplete.d.ts +2 -2
- package/dist/components/query-autocomplete.js +1 -1
- package/dist/components/query-select.d.ts +1 -1
- package/dist/components/query-select.js +2 -2
- package/dist/components/radio-group.js +1 -1
- package/dist/components/responsive-popover.d.ts +1 -1
- package/dist/components/responsive-popover.js +2 -2
- package/dist/components/segment.js +1 -1
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.js +1 -1
- package/dist/components/slider.js +1 -1
- package/dist/components/split-button.d.ts +1 -1
- package/dist/components/split-button.js +2 -2
- package/dist/components/stepper.js +1 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/text-area.js +1 -1
- package/dist/components/text-button.js +1 -1
- package/dist/components/text-input.js +6 -6
- package/dist/components/time-picker.js +1 -1
- package/dist/components/toast.d.ts +3 -2
- package/dist/components/toast.js +3 -2
- package/dist/components/toggle-button.js +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip-ellipsis.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/use-toast.d.ts +1 -1
- package/dist/components/use-toast.js +37 -64
- package/dist/config/confirmation.js +1 -1
- package/dist/config/ui-config.d.ts +1 -1
- package/dist/confirmation.context-2-6G831n.js +117 -0
- package/dist/confirmation.dialog-Cveu3s5D.js +16 -0
- package/dist/{context-HV79Qf_F.js → context-74MZZLC0.js} +2 -53
- package/dist/{datePickerValue.utils-BoOLaZk_.js → datePickerValue.utils-PgERc6lT.js} +2 -2
- package/dist/{Toast-trOdO6gl.js → dist-B4xyoAhc.js} +1 -288
- package/dist/dom.utils-CeVnXH-T.js +49 -0
- package/dist/{dynamicInputs-CiJNkz3F.d.ts → dynamicInputs-CecPNXsF.d.ts} +18 -18
- package/dist/import-BXAtbYEe.js +73 -0
- package/dist/index.d.ts +20 -18
- package/dist/index.js +34 -31
- package/dist/{logger-BPhG2izn.js → logger-WPC6ostp.js} +1 -1
- package/dist/number-DTwXo26a.js +40 -0
- package/dist/{numberStatic.utils-CWkou4ca.js → numberStatic.utils-DcnGigJ6.js} +7 -6
- package/dist/{query-autocomplete-B3qBhSDk.d.ts → query-autocomplete-CHtcx_ND.d.ts} +2 -2
- package/dist/{query-select-BNNjF0Bc.d.ts → query-select-CD0iFQqR.d.ts} +2 -2
- package/dist/{queryAutocomplete.types-CpLHyvqN.d.ts → queryAutocomplete.types-DaTDttX5.d.ts} +2 -2
- package/dist/rhf/autocomplete.d.ts +2 -2
- package/dist/rhf/checkbox.js +1 -1
- package/dist/rhf/date-picker.js +1 -1
- package/dist/rhf/date-range-picker.js +1 -1
- package/dist/rhf/date-time-picker.js +1 -1
- package/dist/rhf/file-upload.js +1 -1
- package/dist/rhf/input-upload.js +1 -1
- package/dist/rhf/inputs.d.ts +1 -1
- package/dist/rhf/number-range-input.js +1 -1
- package/dist/rhf/query-autocomplete.d.ts +1 -1
- package/dist/rhf/query-select.d.ts +1 -1
- package/dist/rhf/radio-group.js +1 -1
- package/dist/rhf/segment.js +1 -1
- package/dist/rhf/select.d.ts +2 -2
- package/dist/rhf/select.js +1 -1
- package/dist/rhf/slider.js +1 -1
- package/dist/rhf/text-area.js +1 -1
- package/dist/rhf/text-editor.js +1 -1
- package/dist/rhf/time-picker.js +1 -1
- package/dist/rhf/toggle.js +1 -1
- package/dist/rhf.d.ts +20 -18
- package/dist/rhf.js +34 -31
- package/dist/{rolldown-runtime-DUp30N8C.js → rolldown-runtime-B-lAHAz2.js} +10 -1
- package/dist/{select-CYuTeweS.d.ts → select-D80pWSgi.d.ts} +2 -2
- package/dist/{staticDateTimeSegments-CAEX9ogz.js → staticDateTimeSegments-CMj4NHoq.js} +16 -14
- package/dist/{staticSelect.utils-Blrqx6Y6.js → staticSelect.utils-DQo-_Fe6.js} +22 -20
- package/dist/tanstack/autocomplete.d.ts +1 -1
- package/dist/tanstack/checkbox.js +1 -1
- package/dist/tanstack/date-picker.js +1 -1
- package/dist/tanstack/date-range-picker.js +1 -1
- package/dist/tanstack/date-time-picker.js +1 -1
- package/dist/tanstack/file-upload.js +1 -1
- package/dist/tanstack/form.d.ts +1 -1
- package/dist/tanstack/form.js +1 -1
- package/dist/tanstack/input-upload.js +1 -1
- package/dist/tanstack/inputs.d.ts +2 -2
- package/dist/tanstack/inputs.js +1 -1
- package/dist/tanstack/number-range-input.js +1 -1
- package/dist/tanstack/query-select.d.ts +1 -1
- package/dist/tanstack/radio-group.js +1 -1
- package/dist/tanstack/segment.js +1 -1
- package/dist/tanstack/select.d.ts +1 -1
- package/dist/tanstack/select.js +1 -1
- package/dist/tanstack/slider.js +1 -1
- package/dist/tanstack/table.d.ts +1 -1
- package/dist/tanstack/table.js +1 -1
- package/dist/tanstack/text-area.js +1 -1
- package/dist/tanstack/text-editor.js +1 -1
- package/dist/tanstack/time-picker.js +1 -1
- package/dist/tanstack/toggle.js +1 -1
- package/dist/tanstack.d.ts +19 -17
- package/dist/tanstack.js +44 -41
- package/dist/text-editor.js +1 -1
- package/dist/toast.cva-BGJCi2qq.js +211 -0
- package/dist/toast.runtime-CzHEhKmm.js +18 -0
- package/dist/toastActivation.store-BELtcr76.js +16 -0
- package/dist/tooltipWrapper.cva-CUu8pI-a.js +5 -0
- package/dist/triangle-B5uw3vnc.js +13 -0
- package/dist/{uiConfig.context-bpfilZZ_.d.ts → uiConfig.context-B27wINPD.d.ts} +3 -3
- package/dist/{useButton-STC3gJBt.js → useButton-CTZ6UEfP.js} +2 -1
- package/dist/{useDescription-D8raJPFb.js → useDescription-4EIEr0rR.js} +1 -1
- package/dist/{useEffectEvent-DAMDuWzz.js → useEffectEvent-BdzIyMdT.js} +1 -1
- package/dist/{useEvent-5X8yPLOx.js → useEvent-CjGFQh-l.js} +1 -1
- package/dist/{useFieldAccessibility-BsEP3ts2.js → useFieldAccessibility-DepfU-ce.js} +2 -2
- package/dist/{useFilter-BQRb0JpC.js → useFilter-CI4X6urj.js} +1 -1
- package/dist/{useFormAutosave-DJJdcgK-.js → useFormAutosave-DKfqSqXM.js} +1 -1
- package/dist/{useFormReset-CFgV1v57.js → useFormReset-BmSQIMid.js} +1 -1
- package/dist/{useFormValidation-DWqb1ZeB.js → useFormValidation-DlNyD6aD.js} +2 -2
- package/dist/{useLabels-CUjKpeKj.js → useLabels-Bt2BXuQ6.js} +1 -1
- package/dist/{useLocalizedStringFormatter-D9TmTRN_.js → useLocalizedStringFormatter-tBB7tXBj.js} +1 -1
- package/dist/{useNumberFormatter-BiWwqIo9.js → useNumberFormatter-Dgd8W1FX.js} +1 -1
- package/dist/{useSpinButton-BxGKzVHd.js → useSpinButton-Ba23Hqso.js} +3 -3
- package/dist/{useStaticInputHandoff-ClwANfo-.js → useStaticInputHandoff-Cssvz3nr.js} +2 -2
- package/dist/{useTableColumnConfig-DaAi30uc.js → useTableColumnConfig-C0IeB82M.js} +54 -72
- package/dist/{useTableNav-BoQOVqZF.d.ts → useTableNav-CFHbvYvu.d.ts} +1 -1
- package/dist/{useToast-gQ9gzrbt.d.ts → useToast-B55ZUvwy.d.ts} +1 -1
- package/dist/{useToggle-ingqhLIQ.js → useToggle-D8aP2d5t.js} +3 -2
- package/dist/utils/logger.js +1 -1
- package/dist/{import-CuNJ25EP.js → utils-D-KKbY-n.js} +1 -73
- package/package.json +1 -1
- package/dist/confirmation.context-C1-ZF9CW.js +0 -80
package/dist/utils/logger.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as logger } from "../logger-
|
|
1
|
+
import { t as logger } from "../logger-WPC6ostp.js";
|
|
2
2
|
export { logger };
|
|
@@ -1,9 +1,5 @@
|
|
|
1
1
|
import { t as clsx } from "./clsx-CnD0nOiA.js";
|
|
2
2
|
import $HgANd$react, { forwardRef, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
3
|
-
import { Focusable, useFocus as useFocus$1, useFocusable as useFocusable$1, useHover as useHover$1 } from "@react-aria/interactions";
|
|
4
|
-
import "@react-aria/label";
|
|
5
|
-
import "@react-aria/textfield";
|
|
6
|
-
import "@react-aria/calendar";
|
|
7
3
|
//#region ../../node_modules/.bun/@react-aria+utils@3.33.0+67f6792bdf102c28/node_modules/@react-aria/utils/dist/useLayoutEffect.mjs
|
|
8
4
|
const $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c = typeof document !== "undefined" ? $HgANd$react.useLayoutEffect : () => {};
|
|
9
5
|
//#endregion
|
|
@@ -205,74 +201,6 @@ function $3ef42575df84b30b$export$9d1611c77c2fe928(...args) {
|
|
|
205
201
|
return result;
|
|
206
202
|
}
|
|
207
203
|
//#endregion
|
|
208
|
-
//#region ../../node_modules/.bun/@react-aria+utils@3.33.0+67f6792bdf102c28/node_modules/@react-aria/utils/dist/filterDOMProps.mjs
|
|
209
|
-
const $65484d02dcb7eb3e$var$DOMPropNames = /* @__PURE__ */ new Set(["id"]);
|
|
210
|
-
const $65484d02dcb7eb3e$var$labelablePropNames = /* @__PURE__ */ new Set([
|
|
211
|
-
"aria-label",
|
|
212
|
-
"aria-labelledby",
|
|
213
|
-
"aria-describedby",
|
|
214
|
-
"aria-details"
|
|
215
|
-
]);
|
|
216
|
-
const $65484d02dcb7eb3e$var$linkPropNames = /* @__PURE__ */ new Set([
|
|
217
|
-
"href",
|
|
218
|
-
"hrefLang",
|
|
219
|
-
"target",
|
|
220
|
-
"rel",
|
|
221
|
-
"download",
|
|
222
|
-
"ping",
|
|
223
|
-
"referrerPolicy"
|
|
224
|
-
]);
|
|
225
|
-
const $65484d02dcb7eb3e$var$globalAttrs = /* @__PURE__ */ new Set([
|
|
226
|
-
"dir",
|
|
227
|
-
"lang",
|
|
228
|
-
"hidden",
|
|
229
|
-
"inert",
|
|
230
|
-
"translate"
|
|
231
|
-
]);
|
|
232
|
-
const $65484d02dcb7eb3e$var$globalEvents = /* @__PURE__ */ new Set([
|
|
233
|
-
"onClick",
|
|
234
|
-
"onAuxClick",
|
|
235
|
-
"onContextMenu",
|
|
236
|
-
"onDoubleClick",
|
|
237
|
-
"onMouseDown",
|
|
238
|
-
"onMouseEnter",
|
|
239
|
-
"onMouseLeave",
|
|
240
|
-
"onMouseMove",
|
|
241
|
-
"onMouseOut",
|
|
242
|
-
"onMouseOver",
|
|
243
|
-
"onMouseUp",
|
|
244
|
-
"onTouchCancel",
|
|
245
|
-
"onTouchEnd",
|
|
246
|
-
"onTouchMove",
|
|
247
|
-
"onTouchStart",
|
|
248
|
-
"onPointerDown",
|
|
249
|
-
"onPointerMove",
|
|
250
|
-
"onPointerUp",
|
|
251
|
-
"onPointerCancel",
|
|
252
|
-
"onPointerEnter",
|
|
253
|
-
"onPointerLeave",
|
|
254
|
-
"onPointerOver",
|
|
255
|
-
"onPointerOut",
|
|
256
|
-
"onGotPointerCapture",
|
|
257
|
-
"onLostPointerCapture",
|
|
258
|
-
"onScroll",
|
|
259
|
-
"onWheel",
|
|
260
|
-
"onAnimationStart",
|
|
261
|
-
"onAnimationEnd",
|
|
262
|
-
"onAnimationIteration",
|
|
263
|
-
"onTransitionCancel",
|
|
264
|
-
"onTransitionEnd",
|
|
265
|
-
"onTransitionRun",
|
|
266
|
-
"onTransitionStart"
|
|
267
|
-
]);
|
|
268
|
-
const $65484d02dcb7eb3e$var$propRe = /^(data-.*)$/;
|
|
269
|
-
function $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, opts = {}) {
|
|
270
|
-
let { labelable, isLink, global, events = global, propNames } = opts;
|
|
271
|
-
let filteredProps = {};
|
|
272
|
-
for (const prop in props) if (Object.prototype.hasOwnProperty.call(props, prop) && ($65484d02dcb7eb3e$var$DOMPropNames.has(prop) || labelable && $65484d02dcb7eb3e$var$labelablePropNames.has(prop) || isLink && $65484d02dcb7eb3e$var$linkPropNames.has(prop) || global && $65484d02dcb7eb3e$var$globalAttrs.has(prop) || events && ($65484d02dcb7eb3e$var$globalEvents.has(prop) || prop.endsWith("Capture") && $65484d02dcb7eb3e$var$globalEvents.has(prop.slice(0, -7))) || (propNames === null || propNames === void 0 ? void 0 : propNames.has(prop)) || $65484d02dcb7eb3e$var$propRe.test(prop))) filteredProps[prop] = props[prop];
|
|
273
|
-
return filteredProps;
|
|
274
|
-
}
|
|
275
|
-
//#endregion
|
|
276
204
|
//#region ../../node_modules/.bun/@react-aria+utils@3.33.0+67f6792bdf102c28/node_modules/@react-aria/utils/dist/useObjectRef.mjs
|
|
277
205
|
function $df56164dff5785e2$export$4338b53315abf666(ref) {
|
|
278
206
|
const objRef = useRef(null);
|
|
@@ -444,4 +372,4 @@ const $64fa3d84918910a7$export$df3a06d6289f983e = new Proxy({}, { get(target, el
|
|
|
444
372
|
return res;
|
|
445
373
|
} });
|
|
446
374
|
//#endregion
|
|
447
|
-
export { $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as
|
|
375
|
+
export { $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c as _, $64fa3d84918910a7$export$c245e6201fed2f75 as a, $64fa3d84918910a7$export$ef03459518577ad4 as c, $3ef42575df84b30b$export$9d1611c77c2fe928 as d, $5dc95899b306f630$export$c9058316764c140e as f, $b5e257d569688ac6$export$535bd6ca7f90a273 as g, $bdb11010cef70236$export$f680877a34711e37 as h, $64fa3d84918910a7$export$9d4c57ee4c6ffdd8 as i, $64fa3d84918910a7$export$fabf2dc03a41866e as l, $bdb11010cef70236$export$b4cc09c592e8fdb8 as m, $64fa3d84918910a7$export$29f1550f4b0d4415 as n, $64fa3d84918910a7$export$c62b8e45d58ddad9 as o, $ff5963eb1fccf552$export$e08e3b67e392101e as p, $64fa3d84918910a7$export$4d86445c2cf5e3 as r, $64fa3d84918910a7$export$df3a06d6289f983e as s, $64fa3d84918910a7$export$2881499e37b75b9a as t, $df56164dff5785e2$export$4338b53315abf666 as u };
|
package/package.json
CHANGED
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import "./i18n-C2TBJvnh.js";
|
|
2
|
-
import { ActionModal } from "./components/action-modal.js";
|
|
3
|
-
import { createContext, use, useCallback, useMemo, useState } from "react";
|
|
4
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
-
import { useTranslation } from "react-i18next";
|
|
6
|
-
//#region src/config/confirmation.context.tsx
|
|
7
|
-
let Confirmation;
|
|
8
|
-
(function(_Confirmation) {
|
|
9
|
-
const DEFAULT_STATE = {
|
|
10
|
-
heading: "",
|
|
11
|
-
description: "",
|
|
12
|
-
isOpen: false,
|
|
13
|
-
primaryAction: {
|
|
14
|
-
label: "",
|
|
15
|
-
onPress: () => {}
|
|
16
|
-
},
|
|
17
|
-
secondaryAction: {
|
|
18
|
-
label: "",
|
|
19
|
-
onPress: () => {}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
const Context = createContext(null);
|
|
23
|
-
_Confirmation.Provider = ({ children }) => {
|
|
24
|
-
const [state, setState] = useState(DEFAULT_STATE);
|
|
25
|
-
const { t } = useTranslation("ui");
|
|
26
|
-
const onCancel = () => setState(DEFAULT_STATE);
|
|
27
|
-
const confirm = useCallback(async ({ heading, description, buttonSize, textAlign, modalClassName, cancelLabel = t(($) => $.ui.confirmation.cancel), confirmLabel = t(($_0) => $_0.ui.confirmation.confirm), confirmVariant, confirmColor, cancelVariant, cancelColor }) => {
|
|
28
|
-
return new Promise((resolve) => {
|
|
29
|
-
setState({
|
|
30
|
-
heading,
|
|
31
|
-
description,
|
|
32
|
-
buttonSize,
|
|
33
|
-
textAlign,
|
|
34
|
-
modalClassName,
|
|
35
|
-
primaryAction: {
|
|
36
|
-
label: confirmLabel,
|
|
37
|
-
onPress() {
|
|
38
|
-
setState({
|
|
39
|
-
...state,
|
|
40
|
-
isOpen: false,
|
|
41
|
-
heading: "",
|
|
42
|
-
description: ""
|
|
43
|
-
});
|
|
44
|
-
resolve(true);
|
|
45
|
-
},
|
|
46
|
-
variant: confirmVariant,
|
|
47
|
-
color: confirmColor
|
|
48
|
-
},
|
|
49
|
-
secondaryAction: {
|
|
50
|
-
label: cancelLabel,
|
|
51
|
-
onPress() {
|
|
52
|
-
onCancel();
|
|
53
|
-
resolve(false);
|
|
54
|
-
},
|
|
55
|
-
variant: cancelVariant,
|
|
56
|
-
color: cancelColor
|
|
57
|
-
},
|
|
58
|
-
isOpen: !state.isOpen
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
}, [state, t]);
|
|
62
|
-
const value = useMemo(() => ({ confirm }), [confirm]);
|
|
63
|
-
return /* @__PURE__ */ jsxs(Context.Provider, {
|
|
64
|
-
value,
|
|
65
|
-
children: [/* @__PURE__ */ jsx(ActionModal, {
|
|
66
|
-
...state,
|
|
67
|
-
onClose: state.secondaryAction?.onPress ?? onCancel,
|
|
68
|
-
primaryAction: state.primaryAction,
|
|
69
|
-
secondaryAction: state.secondaryAction
|
|
70
|
-
}), children]
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
_Confirmation.useConfirmation = () => {
|
|
74
|
-
const context = use(Context);
|
|
75
|
-
if (!context) throw new Error("Confirmation.useConfirmation must be used within a Confirmation.Provider");
|
|
76
|
-
return context;
|
|
77
|
-
};
|
|
78
|
-
})(Confirmation || (Confirmation = {}));
|
|
79
|
-
//#endregion
|
|
80
|
-
export { Confirmation as t };
|