@eightshift/ui-components 5.1.4 → 5.2.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/{Button-DH22t_SM.js → Button-RTwMSBs-.js} +20 -26
- package/dist/{Collection-BRJOMbOa.js → Collection-D_KhdLDC.js} +40 -23
- package/dist/{Color-CNqKeT8D.js → Color-WxFE7lQB.js} +2 -2
- package/dist/{ColorSwatch-Dt3lRApA.js → ColorSwatch-xVS3rMYS.js} +9 -7
- package/dist/{Dialog-D6EdDPeu.js → Dialog-Xf6AsnV-.js} +86 -62
- package/dist/{FieldError-DHrSdE_Q.js → FieldError-B8BgFmIQ.js} +2 -2
- package/dist/{FocusScope-BEPI2m7u.js → FocusScope-BnwM-e8R.js} +24 -22
- package/dist/{Form-Bnyyv3Im.js → Form-BeMxJA29.js} +13 -3
- package/dist/{Input-DfSBLhDx.js → Group-C4cXobNT.js} +56 -11
- package/dist/{Heading-ba38ScjJ.js → Heading-bh1HU5HH.js} +1 -1
- package/dist/{Label-JS_ob-kh.js → Label-DWVaNd2E.js} +1 -1
- package/dist/{List-BLeHBkfx.js → List-CwJTORxj.js} +1 -1
- package/dist/{ListBox-BY3gwI8c.js → ListBox-BeC97FZ4.js} +62 -38
- package/dist/{OverlayArrow-BUfV-5P3.js → OverlayArrow-EZ0v_ljk.js} +6 -6
- package/dist/{Select-BebwUgKB.js → Select-DEQf8ZWI.js} +96 -58
- package/dist/{Select-aab027f3.esm-BKIJGje-.js → Select-ef7c0426.esm-D6WOCaYm.js} +11 -6
- package/dist/{Separator-CTQWg_HO.js → Separator-Fl7qSeN-.js} +37 -20
- package/dist/{Slider-uOPcIpqS.js → Slider-BQFSEhvk.js} +28 -21
- package/dist/{Text-BuJgePCv.js → Text-AxKZjtFm.js} +1 -1
- package/dist/{TextField-o2U-uBWv.js → TextField-x_eEa_qR.js} +20 -10
- package/dist/{VisuallyHidden-BYi0pekx.js → VisuallyHidden-D9s7FTtC.js} +2 -2
- package/dist/assets/style-admin.css +227 -3
- package/dist/assets/style-editor.css +227 -3
- package/dist/assets/style.css +227 -3
- package/dist/components/base-control/base-control.js +1 -1
- package/dist/components/button/button.js +11 -10
- package/dist/components/checkbox/checkbox.js +17 -12
- package/dist/components/color-pickers/color-picker.js +1 -1
- package/dist/components/color-pickers/color-swatch.js +3 -3
- package/dist/components/color-pickers/gradient-editor.js +3 -2
- package/dist/components/color-pickers/solid-color-picker.js +85 -49
- package/dist/components/component-toggle/component-toggle.js +2 -1
- package/dist/components/draggable/draggable-handle.js +1 -1
- package/dist/components/draggable/draggable.js +191 -170
- package/dist/components/draggable-list/draggable-list-item.js +1 -1
- package/dist/components/draggable-list/draggable-list.js +2 -2
- package/dist/components/expandable/expandable.js +18 -18
- package/dist/components/index.js +5 -1
- package/dist/components/input-field/input-field.js +3 -3
- package/dist/components/item-collection/item-collection.js +1 -1
- package/dist/components/link-input/link-input.js +45 -34
- package/dist/components/matrix-align/matrix-align.js +1 -1
- package/dist/components/menu/menu.js +3 -3
- package/dist/components/modal/modal.js +39 -13
- package/dist/components/number-picker/number-picker.js +15 -13
- package/dist/components/option-select/option-select.js +1 -1
- package/dist/components/options-panel/options-panel.js +1 -1
- package/dist/components/placeholders/file-placeholder.js +1 -1
- package/dist/components/popover/popover.js +2 -2
- package/dist/components/radio/radio.js +45 -22
- package/dist/components/repeater/repeater-item.js +1 -1
- package/dist/components/repeater/repeater.js +2 -2
- package/dist/components/responsive/mini-responsive.js +3 -2
- package/dist/components/responsive/responsive-legacy.js +2 -1
- package/dist/components/responsive/responsive.js +2 -1
- package/dist/components/responsive-preview/responsive-preview.js +1 -1
- package/dist/components/select/async-multi-select.js +3 -3
- package/dist/components/select/async-single-select.js +2 -2
- package/dist/components/select/custom-select-default-components.js +1 -1
- package/dist/components/select/multi-select-components.js +1 -1
- package/dist/components/select/multi-select.js +3 -3
- package/dist/components/select/react-select-component-wrappers.js +1 -1
- package/dist/components/select/shared.js +19 -1
- package/dist/components/select/single-select.js +2 -2
- package/dist/components/select/v2/async-multi-select.js +421 -0
- package/dist/components/select/v2/async-select.js +10 -10
- package/dist/components/select/v2/multi-select.js +403 -0
- package/dist/components/select/v2/shared.js +44 -8
- package/dist/components/select/v2/single-select.js +10 -10
- package/dist/components/slider/column-config-slider.js +3 -3
- package/dist/components/slider/slider.js +3 -3
- package/dist/components/slider/utils.js +2 -1
- package/dist/components/tabs/tabs.js +33 -23
- package/dist/components/toggle/switch.js +11 -8
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle-button/toggle-button.js +14 -8
- package/dist/components/tooltip/tooltip.js +9 -7
- package/dist/{context-BbYZoHvX.js → context-DMOmz986.js} +1 -1
- package/dist/{default-i18n-OFa3zAyB.js → default-i18n-DY6EfUSA.js} +21 -284
- package/dist/filterDOMProps-D2C6R0DK.js +71 -0
- package/dist/icons/icons.js +1 -1
- package/dist/{index-641ee5b8.esm-BPU8rMZr.js → index-641ee5b8.esm-Bu-mgopl.js} +1 -1
- package/dist/{index-CFozsmNS.js → index-CBHA_HDD.js} +3 -1
- package/dist/{index-BljRBEr_.js → index-Dq3gT5pW.js} +1 -1
- package/dist/index.js +4 -0
- package/dist/{multi-select-components-BcKzA24f.js → multi-select-components-rCCyCaKO.js} +1 -1
- package/dist/{number-CHmNj-oR.js → number-7sOvrqo0.js} +7 -2
- package/dist/{react-select-async.esm-D937XTWW.js → react-select-async.esm-XYrsKYb2.js} +3 -3
- package/dist/{react-select.esm-Ciai3aKf.js → react-select.esm-CCSPY6XR.js} +3 -3
- package/dist/sprintf-DmNrJSYG.js +51 -0
- package/dist/{textSelection-8DpK8fJl.js → textSelection-D5tWX1rJ.js} +1 -1
- package/dist/{useAsyncList-fLtZMvJO.js → useAsyncList-ZqaIH2gh.js} +1 -1
- package/dist/{useButton-lRcWnvOB.js → useButton-BtJSiQi3.js} +13 -5
- package/dist/useDragAndDrop-CddFteYC.js +3917 -0
- package/dist/{useEvent-ICdlokG-.js → useEvent-BifIGnVS.js} +1 -1
- package/dist/{useFilter-BR5z1A4Q.js → useFilter-Cl2ggwwq.js} +1 -1
- package/dist/{useFocusRing-Bv0UJQl8.js → useFocusRing-D5BfOWag.js} +3 -3
- package/dist/{useFormReset-D2YaWRIA.js → useFormReset-yV9VVy9R.js} +3 -4
- package/dist/{useHover-C2SkI1Fn.js → useHover-44IApaa2.js} +67 -34
- package/dist/{useLabel-BPCd5c7-.js → useLabel-C8umX0gk.js} +2 -2
- package/dist/{useLabels-B7-lUnAF.js → useLabels-Cdxi6JSa.js} +1 -1
- package/dist/{useListState-BrZ2XvDS.js → useListState-BSkHuB7-.js} +1 -1
- package/dist/{useLocalizedStringFormatter-C9GO0IDB.js → useLocalizedStringFormatter-eaZiN2tE.js} +1 -1
- package/dist/{useNumberField-y0dLc_6m.js → useNumberField-JhWPy1JY.js} +23 -16
- package/dist/{useNumberFormatter-CZ9QUnRt.js → useNumberFormatter-BCmkV-7c.js} +1 -1
- package/dist/{usePress-DWBuejBp.js → usePress-BnrkvZ7e.js} +20 -5
- package/dist/{useSingleSelectListState-Bh46cRXs.js → useSingleSelectListState-CzJFsSHr.js} +2 -2
- package/dist/{useToggle-yGuUBU7q.js → useToggle-OaIBlwRu.js} +21 -8
- package/dist/{useToggleState-ibcBUHnB.js → useToggleState-BF8hvidm.js} +5 -1
- package/dist/{utils-CZt7LCbO.js → utils-cvK1vxO7.js} +9 -7
- package/package.json +18 -18
- package/dist/Group-LBogWgyp.js +0 -48
- package/dist/_commonjsHelpers-CUmg6egw.js +0 -6
- package/dist/filterDOMProps-EDDcM64A.js +0 -28
|
@@ -1,20 +1,21 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, d as $e1995378a142960e$export$18af5c7a9e9b3664, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, j as $7135fc7d473fd974$export$a164736487e3f0ae, e as $e1995378a142960e$export$bf788dd355e3a401, k as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "../../Collection-
|
|
3
|
-
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c,
|
|
2
|
+
import { c as $880e95eb8b93ba9a$export$ecf600387e221c37, i as $ae20dd8cbca75726$export$d6daf82dcd84e87c, d as $e1995378a142960e$export$18af5c7a9e9b3664, f as $e1995378a142960e$export$fb8073518f34e6ec, g as $7135fc7d473fd974$export$4feb769f8ddf26c5, j as $7135fc7d473fd974$export$a164736487e3f0ae, e as $e1995378a142960e$export$bf788dd355e3a401, k as $7135fc7d473fd974$export$90e00781bc59d8f9 } from "../../Collection-D_KhdLDC.js";
|
|
3
|
+
import { k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, l as $df56164dff5785e2$export$4338b53315abf666, h as $64fa3d84918910a7$export$4d86445c2cf5e3, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, $ as $64fa3d84918910a7$export$fabf2dc03a41866e } from "../../utils-cvK1vxO7.js";
|
|
4
4
|
import { $ as $f39a9eba43920ace$export$86427a43e3e48ebb } from "../../Hidden-rE6uR-lr.js";
|
|
5
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-
|
|
6
|
-
import { b as $cdc5a6778b766db2$export$a9d04c5684123369 } from "../../useListState-
|
|
5
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
6
|
+
import { b as $cdc5a6778b766db2$export$a9d04c5684123369 } from "../../useListState-BSkHuB7-.js";
|
|
7
7
|
import React__default, { useState, useMemo, useRef, useEffect, forwardRef, useContext, createContext, isValidElement, useId, cloneElement } from "react";
|
|
8
|
-
import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-
|
|
9
|
-
import {
|
|
10
|
-
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-
|
|
11
|
-
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-
|
|
12
|
-
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-
|
|
13
|
-
import {
|
|
14
|
-
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-
|
|
15
|
-
import {
|
|
8
|
+
import { a as $ea8dcbcb9ea1b556$export$7e924b3091a3bd18 } from "../../usePress-BnrkvZ7e.js";
|
|
9
|
+
import { $ as $f645667febf57a63$export$4c014de7c8940b4c, e as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-44IApaa2.js";
|
|
10
|
+
import { $ as $313b98861ee5dd6c$export$d6875122194c7b44 } from "../../useLabels-Cdxi6JSa.js";
|
|
11
|
+
import { a as $9bf71ea28793e738$export$2d6ec8fc375ceafa } from "../../FocusScope-BnwM-e8R.js";
|
|
12
|
+
import { $ as $18f2051aff69b9bf$export$43bb16f9c6d9e3f7 } from "../../context-DMOmz986.js";
|
|
13
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-D5BfOWag.js";
|
|
14
|
+
import { $ as $a0d645289fe9b86b$export$e7f05e985daf4b5f } from "../../useSingleSelectListState-CzJFsSHr.js";
|
|
15
|
+
import { s as sprintf } from "../../sprintf-DmNrJSYG.js";
|
|
16
|
+
import { _ as __ } from "../../default-i18n-DY6EfUSA.js";
|
|
16
17
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
17
|
-
import { c as cva } from "../../index-
|
|
18
|
+
import { c as cva } from "../../index-Dq3gT5pW.js";
|
|
18
19
|
import { Notice } from "../notice/notice.js";
|
|
19
20
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
20
21
|
function $83013635b024ae3d$export$eac1895992b9f3d6(ref, options) {
|
|
@@ -285,10 +286,11 @@ function $5e8ad37a45e1c704$var$TabsInner({ props, tabsRef: ref, collection }) {
|
|
|
285
286
|
defaultClassName: "react-aria-Tabs",
|
|
286
287
|
values
|
|
287
288
|
});
|
|
289
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
290
|
+
global: true
|
|
291
|
+
});
|
|
288
292
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
289
|
-
...$
|
|
290
|
-
...focusProps,
|
|
291
|
-
...renderProps,
|
|
293
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, focusProps),
|
|
292
294
|
ref,
|
|
293
295
|
slot: props.slot || void 0,
|
|
294
296
|
"data-focused": isFocused || void 0,
|
|
@@ -334,13 +336,13 @@ function $5e8ad37a45e1c704$var$TabListInner({ props, forwardedRef: ref }) {
|
|
|
334
336
|
state
|
|
335
337
|
}
|
|
336
338
|
});
|
|
337
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
339
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
340
|
+
global: true
|
|
341
|
+
});
|
|
338
342
|
delete DOMProps.id;
|
|
339
343
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
340
|
-
|
|
341
|
-
...tabListProps,
|
|
344
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, tabListProps),
|
|
342
345
|
ref: objectRef,
|
|
343
|
-
...renderProps,
|
|
344
346
|
"data-orientation": orientation || void 0
|
|
345
347
|
}, /* @__PURE__ */ React__default.createElement(CollectionRoot, {
|
|
346
348
|
collection: state.collection,
|
|
@@ -376,8 +378,13 @@ const $5e8ad37a45e1c704$export$3e41faf802a29e71 = /* @__PURE__ */ $e1995378a1429
|
|
|
376
378
|
}
|
|
377
379
|
});
|
|
378
380
|
let ElementType = item.props.href ? "a" : "div";
|
|
381
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
382
|
+
global: true
|
|
383
|
+
});
|
|
384
|
+
delete DOMProps.id;
|
|
385
|
+
delete DOMProps.onClick;
|
|
379
386
|
return /* @__PURE__ */ React__default.createElement(ElementType, {
|
|
380
|
-
...$3ef42575df84b30b$export$9d1611c77c2fe928(tabProps, focusProps, hoverProps
|
|
387
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, tabProps, focusProps, hoverProps),
|
|
381
388
|
ref,
|
|
382
389
|
"data-selected": isSelected || void 0,
|
|
383
390
|
"data-disabled": isDisabled || void 0,
|
|
@@ -390,6 +397,7 @@ const $5e8ad37a45e1c704$export$3e41faf802a29e71 = /* @__PURE__ */ $e1995378a1429
|
|
|
390
397
|
const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $f39a9eba43920ace$export$86427a43e3e48ebb(function TabPanel(props, forwardedRef) {
|
|
391
398
|
const state = useContext($5e8ad37a45e1c704$export$364712098d2aa57c);
|
|
392
399
|
let ref = $df56164dff5785e2$export$4338b53315abf666(forwardedRef);
|
|
400
|
+
let { id, ...otherProps } = props;
|
|
393
401
|
let { tabPanelProps } = $34bce698202e07cb$export$fae0121b5afe572d(props, state, ref);
|
|
394
402
|
let { focusProps, isFocused, isFocusVisible } = $f7dceffc5ad7768b$export$4e328f61c538687f();
|
|
395
403
|
let isSelected = state.selectedKey === props.id;
|
|
@@ -405,7 +413,9 @@ const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $f39a9eba43920
|
|
|
405
413
|
}
|
|
406
414
|
});
|
|
407
415
|
if (!isSelected && !props.shouldForceMount) return null;
|
|
408
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(
|
|
416
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(otherProps, {
|
|
417
|
+
global: true
|
|
418
|
+
});
|
|
409
419
|
delete DOMProps.id;
|
|
410
420
|
let domProps = isSelected ? $3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, tabPanelProps, focusProps, renderProps) : renderProps;
|
|
411
421
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
@@ -414,7 +424,7 @@ const $5e8ad37a45e1c704$export$3d96ec278d3efce4 = /* @__PURE__ */ $f39a9eba43920
|
|
|
414
424
|
"data-focused": isFocused || void 0,
|
|
415
425
|
"data-focus-visible": isFocusVisible || void 0,
|
|
416
426
|
// @ts-ignore
|
|
417
|
-
inert: $cdc5a6778b766db2$export$a9d04c5684123369(!isSelected),
|
|
427
|
+
inert: $cdc5a6778b766db2$export$a9d04c5684123369(!isSelected || props.inert),
|
|
418
428
|
"data-inert": !isSelected ? "true" : void 0
|
|
419
429
|
}, /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
420
430
|
values: [
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e,
|
|
3
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-
|
|
2
|
+
import { a as $64fa3d84918910a7$export$29f1550f4b0d4415, l as $df56164dff5785e2$export$4338b53315abf666, m as $5dc95899b306f630$export$c9058316764c140e, g as $64fa3d84918910a7$export$ef03459518577ad4, h as $64fa3d84918910a7$export$4d86445c2cf5e3, b as $3ef42575df84b30b$export$9d1611c77c2fe928 } from "../../utils-cvK1vxO7.js";
|
|
3
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
4
4
|
import React__default, { forwardRef, createContext } from "react";
|
|
5
|
-
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-
|
|
6
|
-
import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-
|
|
5
|
+
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-BF8hvidm.js";
|
|
6
|
+
import { $ as $d2c8e2b0480f3f34$export$cbe85ee05b554577 } from "../../useToggle-OaIBlwRu.js";
|
|
7
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-D5BfOWag.js";
|
|
8
|
+
import { e as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-44IApaa2.js";
|
|
9
|
+
import { $ as $5c3e21d68f1c4674$export$439d29a4e110a164 } from "../../VisuallyHidden-D9s7FTtC.js";
|
|
10
10
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
11
11
|
function $b418ec0c85c52f27$export$d853f7095ae95f88(props, state, ref) {
|
|
12
12
|
let { labelProps, inputProps, isSelected, isPressed, isDisabled, isReadOnly } = $d2c8e2b0480f3f34$export$cbe85ee05b554577(props, state, ref);
|
|
@@ -54,8 +54,11 @@ const $8e59e948500a8fe1$export$b5d5cf8927ab7262 = /* @__PURE__ */ forwardRef(fun
|
|
|
54
54
|
state
|
|
55
55
|
}
|
|
56
56
|
});
|
|
57
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props
|
|
57
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
58
|
+
global: true
|
|
59
|
+
});
|
|
58
60
|
delete DOMProps.id;
|
|
61
|
+
delete DOMProps.onClick;
|
|
59
62
|
return /* @__PURE__ */ React__default.createElement("label", {
|
|
60
63
|
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, labelProps, hoverProps, renderProps),
|
|
61
64
|
ref,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-
|
|
2
|
+
import { $ as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../../Label-DWVaNd2E.js";
|
|
3
3
|
import { Switch } from "./switch.js";
|
|
4
4
|
import { RichLabel } from "../rich-label/rich-label.js";
|
|
5
5
|
/**
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e,
|
|
2
|
+
import { p as $ff5963eb1fccf552$export$e08e3b67e392101e, b as $3ef42575df84b30b$export$9d1611c77c2fe928, a as $64fa3d84918910a7$export$29f1550f4b0d4415, h as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-cvK1vxO7.js";
|
|
3
3
|
import React__default, { createContext, forwardRef, useContext } from "react";
|
|
4
|
-
import { $ as $
|
|
5
|
-
import { $ as $
|
|
6
|
-
import { $ as $
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
4
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
5
|
+
import { $ as $3017fa7ffdddec74$export$8042c6c013fd5226 } from "../../useToggleState-BF8hvidm.js";
|
|
6
|
+
import { $ as $701a24aa0da5b062$export$ea18c227d4417cc3 } from "../../useButton-BtJSiQi3.js";
|
|
7
|
+
import { a as $f7dceffc5ad7768b$export$4e328f61c538687f } from "../../useFocusRing-D5BfOWag.js";
|
|
8
|
+
import { e as $6179b936705e76d3$export$ae780daf29e6d456 } from "../../useHover-44IApaa2.js";
|
|
9
|
+
import { c as cva } from "../../index-Dq3gT5pW.js";
|
|
9
10
|
import { Tooltip } from "../tooltip/tooltip.js";
|
|
10
11
|
function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
|
|
11
12
|
const { isSelected } = state;
|
|
@@ -25,6 +26,7 @@ function $55f54f7887471b58$export$51e84d46ca0bc451(props, state, ref) {
|
|
|
25
26
|
function $4547d1bf40011fdf$export$bc53712daae3d6e6(props, state, ref) {
|
|
26
27
|
let toggleState = {
|
|
27
28
|
isSelected: state.selectedKeys.has(props.id),
|
|
29
|
+
defaultSelected: false,
|
|
28
30
|
setSelected(isSelected2) {
|
|
29
31
|
state.setSelected(props.id, isSelected2);
|
|
30
32
|
},
|
|
@@ -83,9 +85,13 @@ const $efde0372d7a700fe$export$d2b052e7b4be1756 = /* @__PURE__ */ forwardRef(fun
|
|
|
83
85
|
},
|
|
84
86
|
defaultClassName: "react-aria-ToggleButton"
|
|
85
87
|
});
|
|
88
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
89
|
+
global: true
|
|
90
|
+
});
|
|
91
|
+
delete DOMProps.id;
|
|
92
|
+
delete DOMProps.onClick;
|
|
86
93
|
return /* @__PURE__ */ React__default.createElement("button", {
|
|
87
|
-
...$3ef42575df84b30b$export$9d1611c77c2fe928(buttonProps, focusProps, hoverProps),
|
|
88
|
-
...renderProps,
|
|
94
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, buttonProps, focusProps, hoverProps),
|
|
89
95
|
ref,
|
|
90
96
|
slot: props.slot || void 0,
|
|
91
97
|
"data-focused": isFocused || void 0,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
2
|
-
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, b as $d3f049242431219c$export$6d3443f2c48bfc20, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f, e as $44f671af83e7d9e0$export$746d02f47f4d381 } from "../../OverlayArrow-
|
|
3
|
-
import { n as $b5e257d569688ac6$export$535bd6ca7f90a273,
|
|
4
|
-
import { $ as $
|
|
2
|
+
import { $ as $fc909762b330b746$export$61c6a8c84e605fb6, a as $d3f049242431219c$export$45fda7c47f93fd48, c as $2a41e45df1593e64$export$d39e1813b3bdd0e1, b as $d3f049242431219c$export$6d3443f2c48bfc20, d as $44f671af83e7d9e0$export$2de4954e8ae13b9f, e as $44f671af83e7d9e0$export$746d02f47f4d381 } from "../../OverlayArrow-EZ0v_ljk.js";
|
|
3
|
+
import { n as $b5e257d569688ac6$export$535bd6ca7f90a273, b as $3ef42575df84b30b$export$9d1611c77c2fe928, d as $bdb11010cef70236$export$f680877a34711e37, i as $64fa3d84918910a7$export$2881499e37b75b9a, a as $64fa3d84918910a7$export$29f1550f4b0d4415, k as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, h as $64fa3d84918910a7$export$4d86445c2cf5e3 } from "../../utils-cvK1vxO7.js";
|
|
4
|
+
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-D2C6R0DK.js";
|
|
5
|
+
import { e as $6179b936705e76d3$export$ae780daf29e6d456, $ as $f645667febf57a63$export$4c014de7c8940b4c, v as $507fabe10e71c6fb$export$630ff653c5ada6a9, m as $507fabe10e71c6fb$export$b9b3dfddab17db27, y as $f645667febf57a63$export$13f3202a3e5ddd5 } from "../../useHover-44IApaa2.js";
|
|
5
6
|
import React__default, { useContext, useState, useMemo, useRef, useEffect, forwardRef, createContext } from "react";
|
|
6
|
-
import { $ as $65484d02dcb7eb3e$export$457c3d6518dd4c6f } from "../../filterDOMProps-EDDcM64A.js";
|
|
7
7
|
import { a as $96b38030c423d352$export$9fc1347d4195ccb3 } from "../../PortalProvider---wyKpMr.js";
|
|
8
|
-
import { $ as $dbSRa$reactdom } from "../../index-
|
|
8
|
+
import { $ as $dbSRa$reactdom } from "../../index-CBHA_HDD.js";
|
|
9
9
|
import { c as clsx } from "../../lite-DVmmD_-j.js";
|
|
10
10
|
const $f57aed4a881a3485$var$Context = /* @__PURE__ */ React__default.createContext(null);
|
|
11
11
|
function $f57aed4a881a3485$export$178405afcd8c5eb(props) {
|
|
@@ -329,10 +329,12 @@ function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
|
329
329
|
});
|
|
330
330
|
props = $3ef42575df84b30b$export$9d1611c77c2fe928(props, overlayProps);
|
|
331
331
|
let { tooltipProps } = $326e436e94273fe1$export$1c4b08e0eca38426(props, state);
|
|
332
|
+
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
333
|
+
global: true
|
|
334
|
+
});
|
|
332
335
|
return /* @__PURE__ */ React__default.createElement("div", {
|
|
333
|
-
|
|
336
|
+
...$3ef42575df84b30b$export$9d1611c77c2fe928(DOMProps, renderProps, tooltipProps),
|
|
334
337
|
ref: props.tooltipRef,
|
|
335
|
-
...renderProps,
|
|
336
338
|
style: {
|
|
337
339
|
...overlayProps.style,
|
|
338
340
|
...renderProps.style
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React__default, { useState, useEffect, useContext } from "react";
|
|
2
|
-
import { n as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-
|
|
2
|
+
import { n as $b5e257d569688ac6$export$535bd6ca7f90a273 } from "./utils-cvK1vxO7.js";
|
|
3
3
|
const $148a7a147e38ea7f$var$RTL_SCRIPTS = /* @__PURE__ */ new Set([
|
|
4
4
|
"Arab",
|
|
5
5
|
"Syrc",
|
|
@@ -1,277 +1,3 @@
|
|
|
1
|
-
import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-CUmg6egw.js";
|
|
2
|
-
function memize(fn, options) {
|
|
3
|
-
var size = 0;
|
|
4
|
-
var head;
|
|
5
|
-
var tail;
|
|
6
|
-
options = options || {};
|
|
7
|
-
function memoized() {
|
|
8
|
-
var node = head, len = arguments.length, args, i;
|
|
9
|
-
searchCache: while (node) {
|
|
10
|
-
if (node.args.length !== arguments.length) {
|
|
11
|
-
node = node.next;
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
for (i = 0; i < len; i++) {
|
|
15
|
-
if (node.args[i] !== arguments[i]) {
|
|
16
|
-
node = node.next;
|
|
17
|
-
continue searchCache;
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
if (node !== head) {
|
|
21
|
-
if (node === tail) {
|
|
22
|
-
tail = node.prev;
|
|
23
|
-
}
|
|
24
|
-
node.prev.next = node.next;
|
|
25
|
-
if (node.next) {
|
|
26
|
-
node.next.prev = node.prev;
|
|
27
|
-
}
|
|
28
|
-
node.next = head;
|
|
29
|
-
node.prev = null;
|
|
30
|
-
head.prev = node;
|
|
31
|
-
head = node;
|
|
32
|
-
}
|
|
33
|
-
return node.val;
|
|
34
|
-
}
|
|
35
|
-
args = new Array(len);
|
|
36
|
-
for (i = 0; i < len; i++) {
|
|
37
|
-
args[i] = arguments[i];
|
|
38
|
-
}
|
|
39
|
-
node = {
|
|
40
|
-
args,
|
|
41
|
-
// Generate the result from original function
|
|
42
|
-
val: fn.apply(null, args)
|
|
43
|
-
};
|
|
44
|
-
if (head) {
|
|
45
|
-
head.prev = node;
|
|
46
|
-
node.next = head;
|
|
47
|
-
} else {
|
|
48
|
-
tail = node;
|
|
49
|
-
}
|
|
50
|
-
if (size === /** @type {MemizeOptions} */
|
|
51
|
-
options.maxSize) {
|
|
52
|
-
tail = /** @type {MemizeCacheNode} */
|
|
53
|
-
tail.prev;
|
|
54
|
-
tail.next = null;
|
|
55
|
-
} else {
|
|
56
|
-
size++;
|
|
57
|
-
}
|
|
58
|
-
head = node;
|
|
59
|
-
return node.val;
|
|
60
|
-
}
|
|
61
|
-
memoized.clear = function() {
|
|
62
|
-
head = null;
|
|
63
|
-
tail = null;
|
|
64
|
-
size = 0;
|
|
65
|
-
};
|
|
66
|
-
return memoized;
|
|
67
|
-
}
|
|
68
|
-
var sprintf$1 = {};
|
|
69
|
-
var hasRequiredSprintf;
|
|
70
|
-
function requireSprintf() {
|
|
71
|
-
if (hasRequiredSprintf) return sprintf$1;
|
|
72
|
-
hasRequiredSprintf = 1;
|
|
73
|
-
(function(exports) {
|
|
74
|
-
!function() {
|
|
75
|
-
var re = {
|
|
76
|
-
not_type: /[^T]/,
|
|
77
|
-
not_primitive: /[^v]/,
|
|
78
|
-
number: /[diefg]/,
|
|
79
|
-
numeric_arg: /[bcdiefguxX]/,
|
|
80
|
-
json: /[j]/,
|
|
81
|
-
text: /^[^\x25]+/,
|
|
82
|
-
modulo: /^\x25{2}/,
|
|
83
|
-
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
|
|
84
|
-
key: /^([a-z_][a-z_\d]*)/i,
|
|
85
|
-
key_access: /^\.([a-z_][a-z_\d]*)/i,
|
|
86
|
-
index_access: /^\[(\d+)\]/,
|
|
87
|
-
sign: /^[+-]/
|
|
88
|
-
};
|
|
89
|
-
function sprintf2(key) {
|
|
90
|
-
return sprintf_format(sprintf_parse(key), arguments);
|
|
91
|
-
}
|
|
92
|
-
function vsprintf(fmt, argv) {
|
|
93
|
-
return sprintf2.apply(null, [fmt].concat(argv || []));
|
|
94
|
-
}
|
|
95
|
-
function sprintf_format(parse_tree, argv) {
|
|
96
|
-
var cursor = 1, tree_length = parse_tree.length, arg, output = "", i, k, ph, pad, pad_character, pad_length, is_positive, sign;
|
|
97
|
-
for (i = 0; i < tree_length; i++) {
|
|
98
|
-
if (typeof parse_tree[i] === "string") {
|
|
99
|
-
output += parse_tree[i];
|
|
100
|
-
} else if (typeof parse_tree[i] === "object") {
|
|
101
|
-
ph = parse_tree[i];
|
|
102
|
-
if (ph.keys) {
|
|
103
|
-
arg = argv[cursor];
|
|
104
|
-
for (k = 0; k < ph.keys.length; k++) {
|
|
105
|
-
if (arg == void 0) {
|
|
106
|
-
throw new Error(sprintf2('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k - 1]));
|
|
107
|
-
}
|
|
108
|
-
arg = arg[ph.keys[k]];
|
|
109
|
-
}
|
|
110
|
-
} else if (ph.param_no) {
|
|
111
|
-
arg = argv[ph.param_no];
|
|
112
|
-
} else {
|
|
113
|
-
arg = argv[cursor++];
|
|
114
|
-
}
|
|
115
|
-
if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
|
|
116
|
-
arg = arg();
|
|
117
|
-
}
|
|
118
|
-
if (re.numeric_arg.test(ph.type) && (typeof arg !== "number" && isNaN(arg))) {
|
|
119
|
-
throw new TypeError(sprintf2("[sprintf] expecting number but found %T", arg));
|
|
120
|
-
}
|
|
121
|
-
if (re.number.test(ph.type)) {
|
|
122
|
-
is_positive = arg >= 0;
|
|
123
|
-
}
|
|
124
|
-
switch (ph.type) {
|
|
125
|
-
case "b":
|
|
126
|
-
arg = parseInt(arg, 10).toString(2);
|
|
127
|
-
break;
|
|
128
|
-
case "c":
|
|
129
|
-
arg = String.fromCharCode(parseInt(arg, 10));
|
|
130
|
-
break;
|
|
131
|
-
case "d":
|
|
132
|
-
case "i":
|
|
133
|
-
arg = parseInt(arg, 10);
|
|
134
|
-
break;
|
|
135
|
-
case "j":
|
|
136
|
-
arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0);
|
|
137
|
-
break;
|
|
138
|
-
case "e":
|
|
139
|
-
arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential();
|
|
140
|
-
break;
|
|
141
|
-
case "f":
|
|
142
|
-
arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg);
|
|
143
|
-
break;
|
|
144
|
-
case "g":
|
|
145
|
-
arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg);
|
|
146
|
-
break;
|
|
147
|
-
case "o":
|
|
148
|
-
arg = (parseInt(arg, 10) >>> 0).toString(8);
|
|
149
|
-
break;
|
|
150
|
-
case "s":
|
|
151
|
-
arg = String(arg);
|
|
152
|
-
arg = ph.precision ? arg.substring(0, ph.precision) : arg;
|
|
153
|
-
break;
|
|
154
|
-
case "t":
|
|
155
|
-
arg = String(!!arg);
|
|
156
|
-
arg = ph.precision ? arg.substring(0, ph.precision) : arg;
|
|
157
|
-
break;
|
|
158
|
-
case "T":
|
|
159
|
-
arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase();
|
|
160
|
-
arg = ph.precision ? arg.substring(0, ph.precision) : arg;
|
|
161
|
-
break;
|
|
162
|
-
case "u":
|
|
163
|
-
arg = parseInt(arg, 10) >>> 0;
|
|
164
|
-
break;
|
|
165
|
-
case "v":
|
|
166
|
-
arg = arg.valueOf();
|
|
167
|
-
arg = ph.precision ? arg.substring(0, ph.precision) : arg;
|
|
168
|
-
break;
|
|
169
|
-
case "x":
|
|
170
|
-
arg = (parseInt(arg, 10) >>> 0).toString(16);
|
|
171
|
-
break;
|
|
172
|
-
case "X":
|
|
173
|
-
arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase();
|
|
174
|
-
break;
|
|
175
|
-
}
|
|
176
|
-
if (re.json.test(ph.type)) {
|
|
177
|
-
output += arg;
|
|
178
|
-
} else {
|
|
179
|
-
if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
|
|
180
|
-
sign = is_positive ? "+" : "-";
|
|
181
|
-
arg = arg.toString().replace(re.sign, "");
|
|
182
|
-
} else {
|
|
183
|
-
sign = "";
|
|
184
|
-
}
|
|
185
|
-
pad_character = ph.pad_char ? ph.pad_char === "0" ? "0" : ph.pad_char.charAt(1) : " ";
|
|
186
|
-
pad_length = ph.width - (sign + arg).length;
|
|
187
|
-
pad = ph.width ? pad_length > 0 ? pad_character.repeat(pad_length) : "" : "";
|
|
188
|
-
output += ph.align ? sign + arg + pad : pad_character === "0" ? sign + pad + arg : pad + sign + arg;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
return output;
|
|
193
|
-
}
|
|
194
|
-
var sprintf_cache = /* @__PURE__ */ Object.create(null);
|
|
195
|
-
function sprintf_parse(fmt) {
|
|
196
|
-
if (sprintf_cache[fmt]) {
|
|
197
|
-
return sprintf_cache[fmt];
|
|
198
|
-
}
|
|
199
|
-
var _fmt = fmt, match, parse_tree = [], arg_names = 0;
|
|
200
|
-
while (_fmt) {
|
|
201
|
-
if ((match = re.text.exec(_fmt)) !== null) {
|
|
202
|
-
parse_tree.push(match[0]);
|
|
203
|
-
} else if ((match = re.modulo.exec(_fmt)) !== null) {
|
|
204
|
-
parse_tree.push("%");
|
|
205
|
-
} else if ((match = re.placeholder.exec(_fmt)) !== null) {
|
|
206
|
-
if (match[2]) {
|
|
207
|
-
arg_names |= 1;
|
|
208
|
-
var field_list = [], replacement_field = match[2], field_match = [];
|
|
209
|
-
if ((field_match = re.key.exec(replacement_field)) !== null) {
|
|
210
|
-
field_list.push(field_match[1]);
|
|
211
|
-
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") {
|
|
212
|
-
if ((field_match = re.key_access.exec(replacement_field)) !== null) {
|
|
213
|
-
field_list.push(field_match[1]);
|
|
214
|
-
} else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
|
|
215
|
-
field_list.push(field_match[1]);
|
|
216
|
-
} else {
|
|
217
|
-
throw new SyntaxError("[sprintf] failed to parse named argument key");
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
} else {
|
|
221
|
-
throw new SyntaxError("[sprintf] failed to parse named argument key");
|
|
222
|
-
}
|
|
223
|
-
match[2] = field_list;
|
|
224
|
-
} else {
|
|
225
|
-
arg_names |= 2;
|
|
226
|
-
}
|
|
227
|
-
if (arg_names === 3) {
|
|
228
|
-
throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");
|
|
229
|
-
}
|
|
230
|
-
parse_tree.push(
|
|
231
|
-
{
|
|
232
|
-
placeholder: match[0],
|
|
233
|
-
param_no: match[1],
|
|
234
|
-
keys: match[2],
|
|
235
|
-
sign: match[3],
|
|
236
|
-
pad_char: match[4],
|
|
237
|
-
align: match[5],
|
|
238
|
-
width: match[6],
|
|
239
|
-
precision: match[7],
|
|
240
|
-
type: match[8]
|
|
241
|
-
}
|
|
242
|
-
);
|
|
243
|
-
} else {
|
|
244
|
-
throw new SyntaxError("[sprintf] unexpected placeholder");
|
|
245
|
-
}
|
|
246
|
-
_fmt = _fmt.substring(match[0].length);
|
|
247
|
-
}
|
|
248
|
-
return sprintf_cache[fmt] = parse_tree;
|
|
249
|
-
}
|
|
250
|
-
{
|
|
251
|
-
exports["sprintf"] = sprintf2;
|
|
252
|
-
exports["vsprintf"] = vsprintf;
|
|
253
|
-
}
|
|
254
|
-
if (typeof window !== "undefined") {
|
|
255
|
-
window["sprintf"] = sprintf2;
|
|
256
|
-
window["vsprintf"] = vsprintf;
|
|
257
|
-
}
|
|
258
|
-
}();
|
|
259
|
-
})(sprintf$1);
|
|
260
|
-
return sprintf$1;
|
|
261
|
-
}
|
|
262
|
-
var sprintfExports = requireSprintf();
|
|
263
|
-
const sprintfjs = /* @__PURE__ */ getDefaultExportFromCjs(sprintfExports);
|
|
264
|
-
const logErrorOnce = memize(console.error);
|
|
265
|
-
function sprintf(format, ...args) {
|
|
266
|
-
try {
|
|
267
|
-
return sprintfjs.sprintf(format, ...args);
|
|
268
|
-
} catch (error) {
|
|
269
|
-
if (error instanceof Error) {
|
|
270
|
-
logErrorOnce("sprintf error: \n\n" + error.toString());
|
|
271
|
-
}
|
|
272
|
-
return format;
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
1
|
var PRECEDENCE, OPENERS, TERMINATORS, PATTERN;
|
|
276
2
|
PRECEDENCE = {
|
|
277
3
|
"(": 9,
|
|
@@ -545,13 +271,16 @@ const createI18n = (initialData, initialDomain, hooks) => {
|
|
|
545
271
|
const __2 = (text, domain) => {
|
|
546
272
|
let translation = dcnpgettext(domain, void 0, text);
|
|
547
273
|
if (!hooks) {
|
|
548
|
-
return
|
|
274
|
+
return (
|
|
275
|
+
/** @type {import('./types').TranslatableText<typeof text>} */
|
|
276
|
+
translation
|
|
277
|
+
);
|
|
549
278
|
}
|
|
550
279
|
translation = /** @type {string} */
|
|
551
280
|
/** @type {*} */
|
|
552
281
|
hooks.applyFilters("i18n.gettext", translation, text, domain);
|
|
553
282
|
return (
|
|
554
|
-
/** @type {
|
|
283
|
+
/** @type {import('./types').TranslatableText<typeof text>} */
|
|
555
284
|
/** @type {*} */
|
|
556
285
|
hooks.applyFilters("i18n.gettext_" + getFilterDomain(domain), translation, text, domain)
|
|
557
286
|
);
|
|
@@ -559,13 +288,16 @@ const createI18n = (initialData, initialDomain, hooks) => {
|
|
|
559
288
|
const _x = (text, context, domain) => {
|
|
560
289
|
let translation = dcnpgettext(domain, context, text);
|
|
561
290
|
if (!hooks) {
|
|
562
|
-
return
|
|
291
|
+
return (
|
|
292
|
+
/** @type {import('./types').TranslatableText<typeof text>} */
|
|
293
|
+
translation
|
|
294
|
+
);
|
|
563
295
|
}
|
|
564
296
|
translation = /** @type {string} */
|
|
565
297
|
/** @type {*} */
|
|
566
298
|
hooks.applyFilters("i18n.gettext_with_context", translation, text, context, domain);
|
|
567
299
|
return (
|
|
568
|
-
/** @type {
|
|
300
|
+
/** @type {import('./types').TranslatableText<typeof text>} */
|
|
569
301
|
/** @type {*} */
|
|
570
302
|
hooks.applyFilters("i18n.gettext_with_context_" + getFilterDomain(domain), translation, text, context, domain)
|
|
571
303
|
);
|
|
@@ -573,13 +305,16 @@ const createI18n = (initialData, initialDomain, hooks) => {
|
|
|
573
305
|
const _n2 = (single, plural, number, domain) => {
|
|
574
306
|
let translation = dcnpgettext(domain, void 0, single, plural, number);
|
|
575
307
|
if (!hooks) {
|
|
576
|
-
return
|
|
308
|
+
return (
|
|
309
|
+
/** @type {import('./types').TranslatableText<typeof single | typeof plural>} */
|
|
310
|
+
translation
|
|
311
|
+
);
|
|
577
312
|
}
|
|
578
313
|
translation = /** @type {string} */
|
|
579
314
|
/** @type {*} */
|
|
580
315
|
hooks.applyFilters("i18n.ngettext", translation, single, plural, number, domain);
|
|
581
316
|
return (
|
|
582
|
-
/** @type {
|
|
317
|
+
/** @type {import('./types').TranslatableText<typeof single | typeof plural>} */
|
|
583
318
|
/** @type {*} */
|
|
584
319
|
hooks.applyFilters("i18n.ngettext_" + getFilterDomain(domain), translation, single, plural, number, domain)
|
|
585
320
|
);
|
|
@@ -587,13 +322,16 @@ const createI18n = (initialData, initialDomain, hooks) => {
|
|
|
587
322
|
const _nx = (single, plural, number, context, domain) => {
|
|
588
323
|
let translation = dcnpgettext(domain, context, single, plural, number);
|
|
589
324
|
if (!hooks) {
|
|
590
|
-
return
|
|
325
|
+
return (
|
|
326
|
+
/** @type {import('./types').TranslatableText<typeof single | typeof plural>} */
|
|
327
|
+
translation
|
|
328
|
+
);
|
|
591
329
|
}
|
|
592
330
|
translation = /** @type {string} */
|
|
593
331
|
/** @type {*} */
|
|
594
332
|
hooks.applyFilters("i18n.ngettext_with_context", translation, single, plural, number, context, domain);
|
|
595
333
|
return (
|
|
596
|
-
/** @type {
|
|
334
|
+
/** @type {import('./types').TranslatableText<typeof single | typeof plural>} */
|
|
597
335
|
/** @type {*} */
|
|
598
336
|
hooks.applyFilters("i18n.ngettext_with_context_" + getFilterDomain(domain), translation, single, plural, number, context, domain)
|
|
599
337
|
);
|
|
@@ -913,6 +651,5 @@ i18n.isRTL.bind(i18n);
|
|
|
913
651
|
i18n.hasTranslation.bind(i18n);
|
|
914
652
|
export {
|
|
915
653
|
__ as _,
|
|
916
|
-
_n as a
|
|
917
|
-
sprintf as s
|
|
654
|
+
_n as a
|
|
918
655
|
};
|