xmlui 0.10.20 → 0.10.22
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/lib/{index-Ckhnrf1F.mjs → index-BaUZuvtZ.mjs} +1472 -1289
- package/dist/lib/index.css +1 -1
- package/dist/lib/{initMock-qnCFw6Zc.mjs → initMock-BVLjWJxZ.mjs} +1 -1
- package/dist/lib/xmlui.d.ts +32 -0
- package/dist/lib/xmlui.mjs +1 -1
- package/dist/metadata/{collectedComponentMetadata-Dg7P-zOz.mjs → collectedComponentMetadata-MZbCI1Ki.mjs} +1463 -1281
- package/dist/metadata/{initMock-ZyyFNOpL.mjs → initMock-BkgwDrCY.mjs} +1 -1
- package/dist/metadata/style.css +1 -1
- package/dist/metadata/xmlui-metadata.mjs +1 -1
- package/dist/metadata/xmlui-metadata.umd.js +3 -3
- package/dist/scripts/package.json +3 -6
- package/dist/scripts/src/components/App/App.js +4 -4
- package/dist/scripts/src/components/App/AppNative.js +1 -1
- package/dist/scripts/src/components/ComponentProvider.js +30 -2
- package/dist/scripts/src/components/DateInput/DateInputNative.js +0 -1
- package/dist/scripts/src/components/Form/FormNative.js +0 -1
- package/dist/scripts/src/components/IFrame/IFrameNative.js +0 -2
- package/dist/scripts/src/components/Tabs/TabContext.js +26 -17
- package/dist/scripts/src/components/Tabs/TabItemNative.js +7 -2
- package/dist/scripts/src/components/Tabs/Tabs.js +22 -3
- package/dist/scripts/src/components/Tabs/Tabs.spec.js +362 -0
- package/dist/scripts/src/components/Tabs/TabsNative.js +28 -4
- package/dist/scripts/src/components/Text/Text.js +5 -1
- package/dist/scripts/src/components/Text/Text.spec.js +317 -0
- package/dist/scripts/src/components/Text/TextNative.js +112 -1
- package/dist/scripts/src/components/TimeInput/TimeInputNative.js +0 -1
- package/dist/scripts/src/components/Timer/TimerNative.js +0 -1
- package/dist/scripts/src/components/Tree/TreeNative.js +7 -12
- package/dist/scripts/src/components-core/rendering/ComponentAdapter.js +2 -3
- package/dist/standalone/xmlui-standalone.es.d.ts +34 -0
- package/dist/standalone/xmlui-standalone.umd.js +35 -35
- package/package.json +3 -6
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var _a;
|
|
2
2
|
import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
3
3
|
import * as React from "react";
|
|
4
|
-
import React__default, { forwardRef, useState, useEffect, useId, cloneElement, useRef, useInsertionEffect, useCallback, useContext, useLayoutEffect, useMemo, createContext, useTransition, memo, useDeferredValue,
|
|
4
|
+
import React__default, { forwardRef, useState, useEffect, useId, cloneElement, useRef, useInsertionEffect, useCallback, useContext, useLayoutEffect, useMemo, createContext, useTransition, memo, useDeferredValue, createElement, useReducer, isValidElement, Fragment as Fragment$1, Children, startTransition } from "react";
|
|
5
5
|
import { throttle, get, isEmpty, cloneDeep, omit, omitBy, isUndefined, noop as noop$2, isEqual, isArray, isNumber, set, isPlainObject, isString as isString$1, isNil, union, uniq, orderBy as orderBy$1, isObject, groupBy, sortBy, merge, defaultTo, capitalize, unset, setWith, keyBy, pick, isNaN as isNaN$1 } from "lodash-es";
|
|
6
6
|
import { formatDistanceToNow, parse, format, parseISO, isValid, isToday, isYesterday, isTomorrow, isThisWeek, formatRelative, isThisYear, isSameDay, differenceInMinutes } from "date-fns";
|
|
7
7
|
import classnames from "classnames";
|
|
@@ -34,13 +34,12 @@ import remarkGfm from "remark-gfm";
|
|
|
34
34
|
import rehypeRaw from "rehype-raw";
|
|
35
35
|
import { visit } from "unist-util-visit";
|
|
36
36
|
import { useQuery, useInfiniteQuery, QueryClientProvider, QueryClient } from "@tanstack/react-query";
|
|
37
|
-
import {
|
|
38
|
-
import AutoSizer from "react-virtualized-auto-sizer";
|
|
37
|
+
import { Virtualizer } from "virtua";
|
|
39
38
|
import { useReactTable, getPaginationRowModel, getCoreRowModel, flexRender } from "@tanstack/react-table";
|
|
40
39
|
import { useVirtualizer } from "@tanstack/react-virtual";
|
|
41
40
|
import { RenderPropSticky } from "react-sticky-el";
|
|
42
|
-
import { Virtualizer } from "virtua";
|
|
43
41
|
import * as HoverCard from "@radix-ui/react-hover-card";
|
|
42
|
+
import { useSpring, useInView, animated } from "@react-spring/web";
|
|
44
43
|
import Papa from "papaparse";
|
|
45
44
|
import { Root as Root$1, List, Trigger as Trigger$1, Content as Content$1 } from "@radix-ui/react-tabs";
|
|
46
45
|
import scrollIntoView from "scroll-into-view-if-needed";
|
|
@@ -51,12 +50,11 @@ import { usePopper } from "react-popper";
|
|
|
51
50
|
import * as RechartsPrimitive from "recharts";
|
|
52
51
|
import { Area, ResponsiveContainer, AreaChart as AreaChart$1, XAxis, YAxis, CartesianGrid, Tooltip as Tooltip$2, Legend as Legend$1, BarChart as BarChart$1, Bar, PieChart as PieChart$1, Pie, LabelList as LabelList$1, Sector, LineChart as LineChart$1, Line, Radar, RadarChart as RadarChart$1, PolarGrid, PolarAngleAxis, PolarRadiusAxis } from "recharts";
|
|
53
52
|
import { MemoryRouter, HashRouter, BrowserRouter } from "react-router-dom";
|
|
54
|
-
import { useSpring, useInView, animated } from "@react-spring/web";
|
|
55
53
|
import { AnimatePresence, motion } from "framer-motion";
|
|
56
54
|
const themeVars$13 = `'{"padding-Button": "var(--xmlui-padding-Button)", "paddingHorizontal-Button": "var(--xmlui-paddingHorizontal-Button, var(--xmlui-padding-Button))", "paddingVertical-Button": "var(--xmlui-paddingVertical-Button, var(--xmlui-padding-Button))", "paddingLeft-Button": "var(--xmlui-paddingLeft-Button, var(--xmlui-paddingHorizontal-Button, var(--xmlui-padding-Button)))", "paddingRight-Button": "var(--xmlui-paddingRight-Button, var(--xmlui-paddingHorizontal-Button, var(--xmlui-padding-Button)))", "paddingTop-Button": "var(--xmlui-paddingTop-Button, var(--xmlui-paddingVertical-Button, var(--xmlui-padding-Button)))", "paddingBottom-Button": "var(--xmlui-paddingBottom-Button, var(--xmlui-paddingVertical-Button, var(--xmlui-padding-Button)))", "padding-Button-xs": "var(--xmlui-padding-Button-xs)", "paddingHorizontal-Button-xs": "var(--xmlui-paddingHorizontal-Button-xs, var(--xmlui-padding-Button-xs))", "paddingVertical-Button-xs": "var(--xmlui-paddingVertical-Button-xs, var(--xmlui-padding-Button-xs))", "paddingLeft-Button-xs": "var(--xmlui-paddingLeft-Button-xs, var(--xmlui-paddingHorizontal-Button-xs, var(--xmlui-padding-Button-xs)))", "paddingRight-Button-xs": "var(--xmlui-paddingRight-Button-xs, var(--xmlui-paddingHorizontal-Button-xs, var(--xmlui-padding-Button-xs)))", "paddingTop-Button-xs": "var(--xmlui-paddingTop-Button-xs, var(--xmlui-paddingVertical-Button-xs, var(--xmlui-padding-Button-xs)))", "paddingBottom-Button-xs": "var(--xmlui-paddingBottom-Button-xs, var(--xmlui-paddingVertical-Button-xs, var(--xmlui-padding-Button-xs)))", "padding-Button-sm": "var(--xmlui-padding-Button-sm)", "paddingHorizontal-Button-sm": "var(--xmlui-paddingHorizontal-Button-sm, var(--xmlui-padding-Button-sm))", "paddingVertical-Button-sm": "var(--xmlui-paddingVertical-Button-sm, var(--xmlui-padding-Button-sm))", "paddingLeft-Button-sm": "var(--xmlui-paddingLeft-Button-sm, var(--xmlui-paddingHorizontal-Button-sm, var(--xmlui-padding-Button-sm)))", "paddingRight-Button-sm": "var(--xmlui-paddingRight-Button-sm, var(--xmlui-paddingHorizontal-Button-sm, var(--xmlui-padding-Button-sm)))", "paddingTop-Button-sm": "var(--xmlui-paddingTop-Button-sm, var(--xmlui-paddingVertical-Button-sm, var(--xmlui-padding-Button-sm)))", "paddingBottom-Button-sm": "var(--xmlui-paddingBottom-Button-sm, var(--xmlui-paddingVertical-Button-sm, var(--xmlui-padding-Button-sm)))", "padding-Button-md": "var(--xmlui-padding-Button-md)", "paddingHorizontal-Button-md": "var(--xmlui-paddingHorizontal-Button-md, var(--xmlui-padding-Button-md))", "paddingVertical-Button-md": "var(--xmlui-paddingVertical-Button-md, var(--xmlui-padding-Button-md))", "paddingLeft-Button-md": "var(--xmlui-paddingLeft-Button-md, var(--xmlui-paddingHorizontal-Button-md, var(--xmlui-padding-Button-md)))", "paddingRight-Button-md": "var(--xmlui-paddingRight-Button-md, var(--xmlui-paddingHorizontal-Button-md, var(--xmlui-padding-Button-md)))", "paddingTop-Button-md": "var(--xmlui-paddingTop-Button-md, var(--xmlui-paddingVertical-Button-md, var(--xmlui-padding-Button-md)))", "paddingBottom-Button-md": "var(--xmlui-paddingBottom-Button-md, var(--xmlui-paddingVertical-Button-md, var(--xmlui-padding-Button-md)))", "padding-Button-lg": "var(--xmlui-padding-Button-lg)", "paddingHorizontal-Button-lg": "var(--xmlui-paddingHorizontal-Button-lg, var(--xmlui-padding-Button-lg))", "paddingVertical-Button-lg": "var(--xmlui-paddingVertical-Button-lg, var(--xmlui-padding-Button-lg))", "paddingLeft-Button-lg": "var(--xmlui-paddingLeft-Button-lg, var(--xmlui-paddingHorizontal-Button-lg, var(--xmlui-padding-Button-lg)))", "paddingRight-Button-lg": "var(--xmlui-paddingRight-Button-lg, var(--xmlui-paddingHorizontal-Button-lg, var(--xmlui-padding-Button-lg)))", "paddingTop-Button-lg": "var(--xmlui-paddingTop-Button-lg, var(--xmlui-paddingVertical-Button-lg, var(--xmlui-padding-Button-lg)))", "paddingBottom-Button-lg": "var(--xmlui-paddingBottom-Button-lg, var(--xmlui-paddingVertical-Button-lg, var(--xmlui-padding-Button-lg)))", "width-Button": "var(--xmlui-width-Button)", "height-Button": "var(--xmlui-height-Button)", "fontFamily-Button-primary-solid": "var(--xmlui-fontFamily-Button-primary-solid)", "fontSize-Button-primary-solid": "var(--xmlui-fontSize-Button-primary-solid)", "fontWeight-Button-primary-solid": "var(--xmlui-fontWeight-Button-primary-solid)", "borderRadius-Button-primary-solid": "var(--xmlui-borderRadius-Button-primary-solid)", "borderWidth-Button-primary-solid": "var(--xmlui-borderWidth-Button-primary-solid)", "borderColor-Button-primary-solid": "var(--xmlui-borderColor-Button-primary-solid)", "borderStyle-Button-primary-solid": "var(--xmlui-borderStyle-Button-primary-solid)", "backgroundColor-Button-primary-solid": "var(--xmlui-backgroundColor-Button-primary-solid)", "textColor-Button-primary-solid": "var(--xmlui-textColor-Button-primary-solid)", "boxShadow-Button-primary-solid": "var(--xmlui-boxShadow-Button-primary-solid)", "outlineWidth-Button-primary-solid--focus": "var(--xmlui-outlineWidth-Button-primary-solid--focus)", "outlineColor-Button-primary-solid--focus": "var(--xmlui-outlineColor-Button-primary-solid--focus)", "outlineStyle-Button-primary-solid--focus": "var(--xmlui-outlineStyle-Button-primary-solid--focus)", "outlineOffset-Button-primary-solid--focus": "var(--xmlui-outlineOffset-Button-primary-solid--focus)", "borderColor-Button-primary-solid--hover": "var(--xmlui-borderColor-Button-primary-solid--hover)", "textColor-Button-primary-solid--hover": "var(--xmlui-textColor-Button-primary-solid--hover)", "backgroundColor-Button-primary-solid--hover": "var(--xmlui-backgroundColor-Button-primary-solid--hover)", "borderColor-Button-primary-solid--active": "var(--xmlui-borderColor-Button-primary-solid--active)", "textColor-Button-primary-solid--active": "var(--xmlui-textColor-Button-primary-solid--active)", "boxShadow-Button-primary-solid--active": "var(--xmlui-boxShadow-Button-primary-solid--active)", "backgroundColor-Button-primary-solid--active": "var(--xmlui-backgroundColor-Button-primary-solid--active)", "backgroundColor-Button--disabled": "var(--xmlui-backgroundColor-Button--disabled)", "textColor-Button--disabled": "var(--xmlui-textColor-Button--disabled)", "borderColor-Button--disabled": "var(--xmlui-borderColor-Button--disabled)", "fontFamily-Button-secondary-solid": "var(--xmlui-fontFamily-Button-secondary-solid)", "fontSize-Button-secondary-solid": "var(--xmlui-fontSize-Button-secondary-solid)", "fontWeight-Button-secondary-solid": "var(--xmlui-fontWeight-Button-secondary-solid)", "borderRadius-Button-secondary-solid": "var(--xmlui-borderRadius-Button-secondary-solid)", "borderWidth-Button-secondary-solid": "var(--xmlui-borderWidth-Button-secondary-solid)", "borderColor-Button-secondary-solid": "var(--xmlui-borderColor-Button-secondary-solid)", "borderStyle-Button-secondary-solid": "var(--xmlui-borderStyle-Button-secondary-solid)", "backgroundColor-Button-secondary-solid": "var(--xmlui-backgroundColor-Button-secondary-solid)", "textColor-Button-secondary-solid": "var(--xmlui-textColor-Button-secondary-solid)", "boxShadow-Button-secondary-solid": "var(--xmlui-boxShadow-Button-secondary-solid)", "outlineWidth-Button-secondary-solid--focus": "var(--xmlui-outlineWidth-Button-secondary-solid--focus)", "outlineColor-Button-secondary-solid--focus": "var(--xmlui-outlineColor-Button-secondary-solid--focus)", "outlineStyle-Button-secondary-solid--focus": "var(--xmlui-outlineStyle-Button-secondary-solid--focus)", "outlineOffset-Button-secondary-solid--focus": "var(--xmlui-outlineOffset-Button-secondary-solid--focus)", "borderColor-Button-secondary-solid--hover": "var(--xmlui-borderColor-Button-secondary-solid--hover)", "textColor-Button-secondary-solid--hover": "var(--xmlui-textColor-Button-secondary-solid--hover)", "backgroundColor-Button-secondary-solid--hover": "var(--xmlui-backgroundColor-Button-secondary-solid--hover)", "borderColor-Button-secondary-solid--active": "var(--xmlui-borderColor-Button-secondary-solid--active)", "textColor-Button-secondary-solid--active": "var(--xmlui-textColor-Button-secondary-solid--active)", "boxShadow-Button-secondary-solid--active": "var(--xmlui-boxShadow-Button-secondary-solid--active)", "backgroundColor-Button-secondary-solid--active": "var(--xmlui-backgroundColor-Button-secondary-solid--active)", "fontFamily-Button-attention-solid": "var(--xmlui-fontFamily-Button-attention-solid)", "fontSize-Button-attention-solid": "var(--xmlui-fontSize-Button-attention-solid)", "fontWeight-Button-attention-solid": "var(--xmlui-fontWeight-Button-attention-solid)", "borderRadius-Button-attention-solid": "var(--xmlui-borderRadius-Button-attention-solid)", "borderWidth-Button-attention-solid": "var(--xmlui-borderWidth-Button-attention-solid)", "borderColor-Button-attention-solid": "var(--xmlui-borderColor-Button-attention-solid)", "borderStyle-Button-attention-solid": "var(--xmlui-borderStyle-Button-attention-solid)", "backgroundColor-Button-attention-solid": "var(--xmlui-backgroundColor-Button-attention-solid)", "textColor-Button-attention-solid": "var(--xmlui-textColor-Button-attention-solid)", "boxShadow-Button-attention-solid": "var(--xmlui-boxShadow-Button-attention-solid)", "outlineWidth-Button-attention-solid--focus": "var(--xmlui-outlineWidth-Button-attention-solid--focus)", "outlineColor-Button-attention-solid--focus": "var(--xmlui-outlineColor-Button-attention-solid--focus)", "outlineStyle-Button-attention-solid--focus": "var(--xmlui-outlineStyle-Button-attention-solid--focus)", "outlineOffset-Button-attention-solid--focus": "var(--xmlui-outlineOffset-Button-attention-solid--focus)", "borderColor-Button-attention-solid--hover": "var(--xmlui-borderColor-Button-attention-solid--hover)", "textColor-Button-attention-solid--hover": "var(--xmlui-textColor-Button-attention-solid--hover)", "backgroundColor-Button-attention-solid--hover": "var(--xmlui-backgroundColor-Button-attention-solid--hover)", "borderColor-Button-attention-solid--active": "var(--xmlui-borderColor-Button-attention-solid--active)", "textColor-Button-attention-solid--active": "var(--xmlui-textColor-Button-attention-solid--active)", "boxShadow-Button-attention-solid--active": "var(--xmlui-boxShadow-Button-attention-solid--active)", "backgroundColor-Button-attention-solid--active": "var(--xmlui-backgroundColor-Button-attention-solid--active)", "fontFamily-Button-primary-outlined": "var(--xmlui-fontFamily-Button-primary-outlined)", "fontSize-Button-primary-outlined": "var(--xmlui-fontSize-Button-primary-outlined)", "fontWeight-Button-primary-outlined": "var(--xmlui-fontWeight-Button-primary-outlined)", "borderRadius-Button-primary-outlined": "var(--xmlui-borderRadius-Button-primary-outlined)", "borderWidth-Button-primary-outlined": "var(--xmlui-borderWidth-Button-primary-outlined)", "borderColor-Button-primary-outlined": "var(--xmlui-borderColor-Button-primary-outlined)", "borderStyle-Button-primary-outlined": "var(--xmlui-borderStyle-Button-primary-outlined)", "textColor-Button-primary-outlined": "var(--xmlui-textColor-Button-primary-outlined)", "boxShadow-Button-primary-outlined": "var(--xmlui-boxShadow-Button-primary-outlined)", "outlineWidth-Button-primary-outlined--focus": "var(--xmlui-outlineWidth-Button-primary-outlined--focus)", "outlineColor-Button-primary-outlined--focus": "var(--xmlui-outlineColor-Button-primary-outlined--focus)", "outlineStyle-Button-primary-outlined--focus": "var(--xmlui-outlineStyle-Button-primary-outlined--focus)", "outlineOffset-Button-primary-outlined--focus": "var(--xmlui-outlineOffset-Button-primary-outlined--focus)", "borderColor-Button-primary-outlined--hover": "var(--xmlui-borderColor-Button-primary-outlined--hover)", "backgroundColor-Button-primary-outlined--hover": "var(--xmlui-backgroundColor-Button-primary-outlined--hover)", "textColor-Button-primary-outlined--hover": "var(--xmlui-textColor-Button-primary-outlined--hover)", "borderColor-Button-primary-outlined--active": "var(--xmlui-borderColor-Button-primary-outlined--active)", "backgroundColor-Button-primary-outlined--active": "var(--xmlui-backgroundColor-Button-primary-outlined--active)", "textColor-Button-primary-outlined--active": "var(--xmlui-textColor-Button-primary-outlined--active)", "fontFamily-Button-secondary-outlined": "var(--xmlui-fontFamily-Button-secondary-outlined)", "fontSize-Button-secondary-outlined": "var(--xmlui-fontSize-Button-secondary-outlined)", "fontWeight-Button-secondary-outlined": "var(--xmlui-fontWeight-Button-secondary-outlined)", "borderRadius-Button-secondary-outlined": "var(--xmlui-borderRadius-Button-secondary-outlined)", "borderWidth-Button-secondary-outlined": "var(--xmlui-borderWidth-Button-secondary-outlined)", "borderColor-Button-secondary-outlined": "var(--xmlui-borderColor-Button-secondary-outlined)", "borderStyle-Button-secondary-outlined": "var(--xmlui-borderStyle-Button-secondary-outlined)", "textColor-Button-secondary-outlined": "var(--xmlui-textColor-Button-secondary-outlined)", "boxShadow-Button-secondary-outlined": "var(--xmlui-boxShadow-Button-secondary-outlined)", "outlineWidth-Button-secondary-outlined--focus": "var(--xmlui-outlineWidth-Button-secondary-outlined--focus)", "outlineColor-Button-secondary-outlined--focus": "var(--xmlui-outlineColor-Button-secondary-outlined--focus)", "outlineStyle-Button-secondary-outlined--focus": "var(--xmlui-outlineStyle-Button-secondary-outlined--focus)", "outlineOffset-Button-secondary-outlined--focus": "var(--xmlui-outlineOffset-Button-secondary-outlined--focus)", "borderColor-Button-secondary-outlined--hover": "var(--xmlui-borderColor-Button-secondary-outlined--hover)", "backgroundColor-Button-secondary-outlined--hover": "var(--xmlui-backgroundColor-Button-secondary-outlined--hover)", "textColor-Button-secondary-outlined--hover": "var(--xmlui-textColor-Button-secondary-outlined--hover)", "borderColor-Button-secondary-outlined--active": "var(--xmlui-borderColor-Button-secondary-outlined--active)", "backgroundColor-Button-secondary-outlined--active": "var(--xmlui-backgroundColor-Button-secondary-outlined--active)", "textColor-Button-secondary-outlined--active": "var(--xmlui-textColor-Button-secondary-outlined--active)", "fontFamily-Button-attention-outlined": "var(--xmlui-fontFamily-Button-attention-outlined)", "fontSize-Button-attention-outlined": "var(--xmlui-fontSize-Button-attention-outlined)", "fontWeight-Button-attention-outlined": "var(--xmlui-fontWeight-Button-attention-outlined)", "borderRadius-Button-attention-outlined": "var(--xmlui-borderRadius-Button-attention-outlined)", "borderWidth-Button-attention-outlined": "var(--xmlui-borderWidth-Button-attention-outlined)", "borderColor-Button-attention-outlined": "var(--xmlui-borderColor-Button-attention-outlined)", "borderStyle-Button-attention-outlined": "var(--xmlui-borderStyle-Button-attention-outlined)", "textColor-Button-attention-outlined": "var(--xmlui-textColor-Button-attention-outlined)", "boxShadow-Button-attention-outlined": "var(--xmlui-boxShadow-Button-attention-outlined)", "outlineWidth-Button-attention-outlined--focus": "var(--xmlui-outlineWidth-Button-attention-outlined--focus)", "outlineColor-Button-attention-outlined--focus": "var(--xmlui-outlineColor-Button-attention-outlined--focus)", "outlineStyle-Button-attention-outlined--focus": "var(--xmlui-outlineStyle-Button-attention-outlined--focus)", "outlineOffset-Button-attention-outlined--focus": "var(--xmlui-outlineOffset-Button-attention-outlined--focus)", "borderColor-Button-attention-outlined--hover": "var(--xmlui-borderColor-Button-attention-outlined--hover)", "backgroundColor-Button-attention-outlined--hover": "var(--xmlui-backgroundColor-Button-attention-outlined--hover)", "textColor-Button-attention-outlined--hover": "var(--xmlui-textColor-Button-attention-outlined--hover)", "borderColor-Button-attention-outlined--active": "var(--xmlui-borderColor-Button-attention-outlined--active)", "backgroundColor-Button-attention-outlined--active": "var(--xmlui-backgroundColor-Button-attention-outlined--active)", "textColor-Button-attention-outlined--active": "var(--xmlui-textColor-Button-attention-outlined--active)", "fontFamily-Button-primary-ghost": "var(--xmlui-fontFamily-Button-primary-ghost)", "fontSize-Button-primary-ghost": "var(--xmlui-fontSize-Button-primary-ghost)", "fontWeight-Button-primary-ghost": "var(--xmlui-fontWeight-Button-primary-ghost)", "borderRadius-Button-primary-ghost": "var(--xmlui-borderRadius-Button-primary-ghost)", "borderWidth-Button-primary-ghost": "var(--xmlui-borderWidth-Button-primary-ghost)", "textColor-Button-primary-ghost": "var(--xmlui-textColor-Button-primary-ghost)", "outlineWidth-Button-primary-ghost--focus": "var(--xmlui-outlineWidth-Button-primary-ghost--focus)", "outlineColor-Button-primary-ghost--focus": "var(--xmlui-outlineColor-Button-primary-ghost--focus)", "outlineStyle-Button-primary-ghost--focus": "var(--xmlui-outlineStyle-Button-primary-ghost--focus)", "outlineOffset-Button-primary-ghost--focus": "var(--xmlui-outlineOffset-Button-primary-ghost--focus)", "backgroundColor-Button-primary-ghost--hover": "var(--xmlui-backgroundColor-Button-primary-ghost--hover)", "textColor-Button-primary-ghost--hover": "var(--xmlui-textColor-Button-primary-ghost--hover)", "backgroundColor-Button-primary-ghost--active": "var(--xmlui-backgroundColor-Button-primary-ghost--active)", "textColor-Button-primary-ghost--active": "var(--xmlui-textColor-Button-primary-ghost--active)", "fontFamily-Button-secondary-ghost": "var(--xmlui-fontFamily-Button-secondary-ghost)", "fontSize-Button-secondary-ghost": "var(--xmlui-fontSize-Button-secondary-ghost)", "fontWeight-Button-secondary-ghost": "var(--xmlui-fontWeight-Button-secondary-ghost)", "borderRadius-Button-secondary-ghost": "var(--xmlui-borderRadius-Button-secondary-ghost)", "borderWidth-Button-secondary-ghost": "var(--xmlui-borderWidth-Button-secondary-ghost)", "textColor-Button-secondary-ghost": "var(--xmlui-textColor-Button-secondary-ghost)", "outlineWidth-Button-secondary-ghost--focus": "var(--xmlui-outlineWidth-Button-secondary-ghost--focus)", "outlineColor-Button-secondary-ghost--focus": "var(--xmlui-outlineColor-Button-secondary-ghost--focus)", "outlineStyle-Button-secondary-ghost--focus": "var(--xmlui-outlineStyle-Button-secondary-ghost--focus)", "outlineOffset-Button-secondary-ghost--focus": "var(--xmlui-outlineOffset-Button-secondary-ghost--focus)", "backgroundColor-Button-secondary-ghost--hover": "var(--xmlui-backgroundColor-Button-secondary-ghost--hover)", "textColor-Button-secondary-ghost--hover": "var(--xmlui-textColor-Button-secondary-ghost--hover)", "backgroundColor-Button-secondary-ghost--active": "var(--xmlui-backgroundColor-Button-secondary-ghost--active)", "textColor-Button-secondary-ghost--active": "var(--xmlui-textColor-Button-secondary-ghost--active)", "fontFamily-Button-attention-ghost": "var(--xmlui-fontFamily-Button-attention-ghost)", "fontSize-Button-attention-ghost": "var(--xmlui-fontSize-Button-attention-ghost)", "fontWeight-Button-attention-ghost": "var(--xmlui-fontWeight-Button-attention-ghost)", "borderRadius-Button-attention-ghost": "var(--xmlui-borderRadius-Button-attention-ghost)", "borderWidth-Button-attention-ghost": "var(--xmlui-borderWidth-Button-attention-ghost)", "textColor-Button-attention-ghost": "var(--xmlui-textColor-Button-attention-ghost)", "outlineWidth-Button-attention-ghost--focus": "var(--xmlui-outlineWidth-Button-attention-ghost--focus)", "outlineColor-Button-attention-ghost--focus": "var(--xmlui-outlineColor-Button-attention-ghost--focus)", "outlineStyle-Button-attention-ghost--focus": "var(--xmlui-outlineStyle-Button-attention-ghost--focus)", "outlineOffset-Button-attention-ghost--focus": "var(--xmlui-outlineOffset-Button-attention-ghost--focus)", "backgroundColor-Button-attention-ghost--hover": "var(--xmlui-backgroundColor-Button-attention-ghost--hover)", "textColor-Button-attention-ghost--hover": "var(--xmlui-textColor-Button-attention-ghost--hover)", "backgroundColor-Button-attention-ghost--active": "var(--xmlui-backgroundColor-Button-attention-ghost--active)", "textColor-Button-attention-ghost--active": "var(--xmlui-textColor-Button-attention-ghost--active)"}'`;
|
|
57
55
|
const button$2 = "_button_1c10z_14";
|
|
58
|
-
const alignStart = "_alignStart_1c10z_30";
|
|
59
|
-
const alignEnd = "_alignEnd_1c10z_33";
|
|
56
|
+
const alignStart$1 = "_alignStart_1c10z_30";
|
|
57
|
+
const alignEnd$1 = "_alignEnd_1c10z_33";
|
|
60
58
|
const buttonHorizontal = "_buttonHorizontal_1c10z_39";
|
|
61
59
|
const xs$1 = "_xs_1c10z_42";
|
|
62
60
|
const sm$1 = "_sm_1c10z_49";
|
|
@@ -75,8 +73,8 @@ const ghostAttention = "_ghostAttention_1c10z_366";
|
|
|
75
73
|
const styles$1k = {
|
|
76
74
|
themeVars: themeVars$13,
|
|
77
75
|
button: button$2,
|
|
78
|
-
alignStart,
|
|
79
|
-
alignEnd,
|
|
76
|
+
alignStart: alignStart$1,
|
|
77
|
+
alignEnd: alignEnd$1,
|
|
80
78
|
buttonHorizontal,
|
|
81
79
|
xs: xs$1,
|
|
82
80
|
sm: sm$1,
|
|
@@ -3717,6 +3715,576 @@ function extractPaddings(extractValue, props) {
|
|
|
3717
3715
|
paddingBottom: paddingBottom || paddingVertical || padding
|
|
3718
3716
|
};
|
|
3719
3717
|
}
|
|
3718
|
+
function hashString(str) {
|
|
3719
|
+
let hash = 5381;
|
|
3720
|
+
let i = str.length;
|
|
3721
|
+
while (i) {
|
|
3722
|
+
hash = hash * 33 ^ str.charCodeAt(--i);
|
|
3723
|
+
}
|
|
3724
|
+
let s = (hash >>> 0).toString(36);
|
|
3725
|
+
return s;
|
|
3726
|
+
}
|
|
3727
|
+
function toKebabCase(str) {
|
|
3728
|
+
if (str.startsWith("--")) {
|
|
3729
|
+
return str;
|
|
3730
|
+
}
|
|
3731
|
+
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
3732
|
+
}
|
|
3733
|
+
function stableJSONStringify(obj) {
|
|
3734
|
+
return JSON.stringify(obj);
|
|
3735
|
+
}
|
|
3736
|
+
class StyleRegistry {
|
|
3737
|
+
constructor() {
|
|
3738
|
+
this.cache = /* @__PURE__ */ new Map();
|
|
3739
|
+
this.rootClasses = /* @__PURE__ */ new Set();
|
|
3740
|
+
this.injected = /* @__PURE__ */ new Set();
|
|
3741
|
+
this.refCounts = /* @__PURE__ */ new Map();
|
|
3742
|
+
this.ssrHashes = /* @__PURE__ */ new Set();
|
|
3743
|
+
}
|
|
3744
|
+
register(styles2) {
|
|
3745
|
+
const key = stableJSONStringify(styles2);
|
|
3746
|
+
const styleHash = hashString(key);
|
|
3747
|
+
const cachedEntry = this.cache.get(styleHash);
|
|
3748
|
+
if (cachedEntry) {
|
|
3749
|
+
return cachedEntry;
|
|
3750
|
+
}
|
|
3751
|
+
const className = `css-${styleHash}`;
|
|
3752
|
+
const css = this._generateCss(`.${className}`, styles2);
|
|
3753
|
+
const entry = { className, styleHash, css };
|
|
3754
|
+
this.cache.set(styleHash, entry);
|
|
3755
|
+
return entry;
|
|
3756
|
+
}
|
|
3757
|
+
/**
|
|
3758
|
+
* [PRIVATE] Recursively generates CSS rules from a style object.
|
|
3759
|
+
* This is the new, more powerful engine.
|
|
3760
|
+
* @param selector - The CSS selector for the current context (e.g., '.css-123' or '&:hover').
|
|
3761
|
+
* @param styles - The style object to process.
|
|
3762
|
+
* @returns A string of CSS rules.
|
|
3763
|
+
*/
|
|
3764
|
+
_generateCss(selector, styles2) {
|
|
3765
|
+
const directProps = [];
|
|
3766
|
+
const nestedRules = [];
|
|
3767
|
+
for (const key in styles2) {
|
|
3768
|
+
const value = styles2[key];
|
|
3769
|
+
if (typeof value === "object" && value !== null) {
|
|
3770
|
+
nestedRules.push(this._processNestedRule(selector, key, value));
|
|
3771
|
+
} else {
|
|
3772
|
+
directProps.push(`${toKebabCase(key)}:${value};`);
|
|
3773
|
+
}
|
|
3774
|
+
}
|
|
3775
|
+
let finalCss = "";
|
|
3776
|
+
if (directProps.length > 0) {
|
|
3777
|
+
finalCss += `${selector} {${directProps.join("")}}`;
|
|
3778
|
+
}
|
|
3779
|
+
finalCss += nestedRules.join("");
|
|
3780
|
+
return finalCss;
|
|
3781
|
+
}
|
|
3782
|
+
_processNestedRule(parentSelector, nestedKey, nestedStyles) {
|
|
3783
|
+
if (nestedKey.startsWith("@")) {
|
|
3784
|
+
return `${nestedKey}{${this._generateCss(parentSelector, nestedStyles)}}`;
|
|
3785
|
+
}
|
|
3786
|
+
const newSelector = nestedKey.replace(/&/g, parentSelector);
|
|
3787
|
+
return this._generateCss(newSelector, nestedStyles);
|
|
3788
|
+
}
|
|
3789
|
+
getSsrStyles() {
|
|
3790
|
+
const allCss = Array.from(this.cache.values()).map((entry) => entry.css).join("");
|
|
3791
|
+
return `@layer dynamic {${allCss}}`;
|
|
3792
|
+
}
|
|
3793
|
+
/**
|
|
3794
|
+
* Adds a class name to be applied to the <html> tag.
|
|
3795
|
+
*/
|
|
3796
|
+
addRootClasses(classNames) {
|
|
3797
|
+
classNames.forEach((className) => {
|
|
3798
|
+
this.rootClasses.add(className);
|
|
3799
|
+
});
|
|
3800
|
+
}
|
|
3801
|
+
/**
|
|
3802
|
+
* Returns a space-separated string of all collected html classes.
|
|
3803
|
+
*/
|
|
3804
|
+
getRootClasses() {
|
|
3805
|
+
return Array.from(this.rootClasses).join(" ");
|
|
3806
|
+
}
|
|
3807
|
+
// NEW: A helper to safely get the current reference count.
|
|
3808
|
+
getRefCount(styleHash) {
|
|
3809
|
+
return this.refCounts.get(styleHash) || 0;
|
|
3810
|
+
}
|
|
3811
|
+
/**
|
|
3812
|
+
* Increments the reference count for a given style hash.
|
|
3813
|
+
*/
|
|
3814
|
+
incrementRef(styleHash) {
|
|
3815
|
+
const newCount = (this.refCounts.get(styleHash) || 0) + 1;
|
|
3816
|
+
this.refCounts.set(styleHash, newCount);
|
|
3817
|
+
}
|
|
3818
|
+
/**
|
|
3819
|
+
* Decrements the reference count for a given style hash.
|
|
3820
|
+
* @returns {number} The new reference count.
|
|
3821
|
+
*/
|
|
3822
|
+
decrementRef(styleHash) {
|
|
3823
|
+
const currentCount = this.refCounts.get(styleHash) || 0;
|
|
3824
|
+
const newCount = Math.max(0, currentCount - 1);
|
|
3825
|
+
if (newCount > 0) {
|
|
3826
|
+
this.refCounts.set(styleHash, newCount);
|
|
3827
|
+
} else {
|
|
3828
|
+
this.refCounts.delete(styleHash);
|
|
3829
|
+
}
|
|
3830
|
+
return newCount;
|
|
3831
|
+
}
|
|
3832
|
+
}
|
|
3833
|
+
const IndexerContext = React__default.createContext({
|
|
3834
|
+
indexing: false
|
|
3835
|
+
});
|
|
3836
|
+
function useIndexerContext() {
|
|
3837
|
+
return useContext(IndexerContext);
|
|
3838
|
+
}
|
|
3839
|
+
const StyleContext = createContext(null);
|
|
3840
|
+
function StyleProvider({
|
|
3841
|
+
children,
|
|
3842
|
+
styleRegistry = new StyleRegistry(),
|
|
3843
|
+
forceNew = false
|
|
3844
|
+
// Optional prop to force a new registry
|
|
3845
|
+
}) {
|
|
3846
|
+
const parentRegistry = useContext(StyleContext);
|
|
3847
|
+
const [registry] = useState(() => {
|
|
3848
|
+
const newRegistry = styleRegistry;
|
|
3849
|
+
if (typeof window !== "undefined") {
|
|
3850
|
+
const ssrTag = document.querySelector('style[data-style-registry="true"]');
|
|
3851
|
+
const ssrHashes = ssrTag == null ? void 0 : ssrTag.getAttribute("data-ssr-hashes");
|
|
3852
|
+
if (ssrHashes) {
|
|
3853
|
+
let hashes = ssrHashes.split(",");
|
|
3854
|
+
newRegistry.ssrHashes = new Set(hashes);
|
|
3855
|
+
newRegistry.injected = new Set(hashes);
|
|
3856
|
+
}
|
|
3857
|
+
}
|
|
3858
|
+
return newRegistry;
|
|
3859
|
+
});
|
|
3860
|
+
if (parentRegistry && !forceNew) {
|
|
3861
|
+
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
3862
|
+
}
|
|
3863
|
+
return /* @__PURE__ */ jsx(StyleContext.Provider, { value: registry, children });
|
|
3864
|
+
}
|
|
3865
|
+
function useStyleRegistry() {
|
|
3866
|
+
const registry = useContext(StyleContext);
|
|
3867
|
+
if (registry === null) {
|
|
3868
|
+
throw new Error("Component must be used within a StyleProvider");
|
|
3869
|
+
}
|
|
3870
|
+
return registry;
|
|
3871
|
+
}
|
|
3872
|
+
function useComponentStyle(styles2) {
|
|
3873
|
+
const rootStyle = useMemo(() => {
|
|
3874
|
+
return !styles2 || Object.keys(styles2).length === 0 ? EMPTY_OBJECT : {
|
|
3875
|
+
"&": styles2
|
|
3876
|
+
// "@container style(--screenSize: 1) or @container style(--screenSize: 2) ... etc": responsiveSizes,
|
|
3877
|
+
};
|
|
3878
|
+
}, [styles2]);
|
|
3879
|
+
return useStyles(rootStyle);
|
|
3880
|
+
}
|
|
3881
|
+
const StyleInjectionTargetContext = createContext(null);
|
|
3882
|
+
function useDomRoot() {
|
|
3883
|
+
const domRoot = useContext(StyleInjectionTargetContext);
|
|
3884
|
+
return domRoot;
|
|
3885
|
+
}
|
|
3886
|
+
function useStyles(styles2, { prepend } = EMPTY_OBJECT) {
|
|
3887
|
+
const { indexing } = useIndexerContext();
|
|
3888
|
+
const domRoot = useDomRoot();
|
|
3889
|
+
const injectionTarget = typeof document === "undefined" ? null : domRoot instanceof ShadowRoot ? domRoot : document.head;
|
|
3890
|
+
const registry = useStyleRegistry();
|
|
3891
|
+
const { className, styleHash } = useMemo(() => {
|
|
3892
|
+
if (indexing || !styles2 || styles2 === EMPTY_OBJECT || Object.keys(styles2).length === 0) {
|
|
3893
|
+
return { className: void 0, styleHash: void 0 };
|
|
3894
|
+
}
|
|
3895
|
+
return registry.register(styles2);
|
|
3896
|
+
}, [indexing, registry, styles2]);
|
|
3897
|
+
useInsertionEffect(() => {
|
|
3898
|
+
if (!styleHash || registry.injected.has(styleHash)) {
|
|
3899
|
+
return;
|
|
3900
|
+
}
|
|
3901
|
+
const { css } = registry.cache.get(styleHash) || {};
|
|
3902
|
+
if (css) {
|
|
3903
|
+
const styleElement = document.createElement("style");
|
|
3904
|
+
styleElement.setAttribute("data-style-hash", styleHash);
|
|
3905
|
+
styleElement.innerHTML = `@layer dynamic {
|
|
3906
|
+
${css}
|
|
3907
|
+
}`;
|
|
3908
|
+
if (prepend) {
|
|
3909
|
+
injectionTarget.insertBefore(styleElement, injectionTarget.firstChild.nextSibling);
|
|
3910
|
+
} else {
|
|
3911
|
+
injectionTarget.appendChild(styleElement);
|
|
3912
|
+
}
|
|
3913
|
+
registry.injected.add(styleHash);
|
|
3914
|
+
}
|
|
3915
|
+
}, [registry, styleHash, injectionTarget]);
|
|
3916
|
+
useEffect(() => {
|
|
3917
|
+
if (!styleHash) {
|
|
3918
|
+
return;
|
|
3919
|
+
}
|
|
3920
|
+
registry.incrementRef(styleHash);
|
|
3921
|
+
return () => {
|
|
3922
|
+
registry.decrementRef(styleHash);
|
|
3923
|
+
setTimeout(() => {
|
|
3924
|
+
var _a2;
|
|
3925
|
+
if (registry.getRefCount(styleHash) === 0 && !registry.ssrHashes.has(styleHash)) {
|
|
3926
|
+
registry.injected.delete(styleHash);
|
|
3927
|
+
(_a2 = injectionTarget.querySelector(`style[data-style-hash="${styleHash}"]`)) == null ? void 0 : _a2.remove();
|
|
3928
|
+
}
|
|
3929
|
+
}, 0);
|
|
3930
|
+
};
|
|
3931
|
+
}, [injectionTarget, registry, styleHash]);
|
|
3932
|
+
return className;
|
|
3933
|
+
}
|
|
3934
|
+
const THEME_VAR_PREFIX = "xmlui";
|
|
3935
|
+
const themeVarCapturesRegex = /(\$[a-zA-Z][a-zA-Z0-9-_]*)/g;
|
|
3936
|
+
const booleanRegex = /^(true|false)$/;
|
|
3937
|
+
const starSizeRegex = /^\d*\*$/;
|
|
3938
|
+
const defaultCompResult = {
|
|
3939
|
+
cssProps: {},
|
|
3940
|
+
issues: /* @__PURE__ */ new Set()
|
|
3941
|
+
};
|
|
3942
|
+
function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
3943
|
+
const result = {
|
|
3944
|
+
cssProps: {},
|
|
3945
|
+
issues: /* @__PURE__ */ new Set()
|
|
3946
|
+
};
|
|
3947
|
+
if (!!getOrientation(layoutContext)) {
|
|
3948
|
+
result.cssProps.flexShrink = 0;
|
|
3949
|
+
}
|
|
3950
|
+
collectCss("width");
|
|
3951
|
+
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
3952
|
+
if (horizontalStarSize !== null) {
|
|
3953
|
+
result.cssProps.flex = horizontalStarSize;
|
|
3954
|
+
result.cssProps.flexShrink = 1;
|
|
3955
|
+
}
|
|
3956
|
+
collectCss("minWidth");
|
|
3957
|
+
collectCss("maxWidth");
|
|
3958
|
+
collectCss("height");
|
|
3959
|
+
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
3960
|
+
if (verticalStarSize !== null) {
|
|
3961
|
+
result.cssProps.flex = verticalStarSize;
|
|
3962
|
+
result.cssProps.flexShrink = 1;
|
|
3963
|
+
}
|
|
3964
|
+
collectCss("minHeight");
|
|
3965
|
+
collectCss("maxHeight");
|
|
3966
|
+
collectCss("top");
|
|
3967
|
+
collectCss("right");
|
|
3968
|
+
collectCss("bottom");
|
|
3969
|
+
collectCss("left");
|
|
3970
|
+
collectCss("gap");
|
|
3971
|
+
collectCss("padding");
|
|
3972
|
+
const paddingHorizontal = transformLayoutValue("paddingHorizontal");
|
|
3973
|
+
if (paddingHorizontal) {
|
|
3974
|
+
result.cssProps.paddingLeft = paddingHorizontal;
|
|
3975
|
+
result.cssProps.paddingRight = paddingHorizontal;
|
|
3976
|
+
}
|
|
3977
|
+
collectCss("paddingRight");
|
|
3978
|
+
collectCss("paddingLeft");
|
|
3979
|
+
const paddingVertical = transformLayoutValue("paddingVertical");
|
|
3980
|
+
if (paddingVertical) {
|
|
3981
|
+
result.cssProps.paddingTop = paddingVertical;
|
|
3982
|
+
result.cssProps.paddingBottom = paddingVertical;
|
|
3983
|
+
}
|
|
3984
|
+
collectCss("paddingTop");
|
|
3985
|
+
collectCss("paddingBottom");
|
|
3986
|
+
collectCss("margin");
|
|
3987
|
+
const marginHorizontal = transformLayoutValue("marginHorizontal");
|
|
3988
|
+
if (marginHorizontal) {
|
|
3989
|
+
result.cssProps.marginLeft = marginHorizontal;
|
|
3990
|
+
result.cssProps.marginRight = marginHorizontal;
|
|
3991
|
+
}
|
|
3992
|
+
collectCss("marginRight");
|
|
3993
|
+
collectCss("marginLeft");
|
|
3994
|
+
const marginVertical = transformLayoutValue("marginVertical");
|
|
3995
|
+
if (marginVertical) {
|
|
3996
|
+
result.cssProps.marginTop = marginVertical;
|
|
3997
|
+
result.cssProps.marginBottom = marginVertical;
|
|
3998
|
+
}
|
|
3999
|
+
collectCss("marginTop");
|
|
4000
|
+
collectCss("marginBottom");
|
|
4001
|
+
collectCss("border");
|
|
4002
|
+
const horizontalBorder = transformLayoutValue("borderHorizontal");
|
|
4003
|
+
if (horizontalBorder) {
|
|
4004
|
+
result.cssProps.borderLeft = horizontalBorder;
|
|
4005
|
+
result.cssProps.borderRight = horizontalBorder;
|
|
4006
|
+
}
|
|
4007
|
+
collectCss("borderRight");
|
|
4008
|
+
collectCss("borderLeft");
|
|
4009
|
+
const verticalBorder = transformLayoutValue("borderVertical");
|
|
4010
|
+
if (verticalBorder) {
|
|
4011
|
+
result.cssProps.borderTop = verticalBorder;
|
|
4012
|
+
result.cssProps.borderBottom = verticalBorder;
|
|
4013
|
+
}
|
|
4014
|
+
collectCss("borderTop");
|
|
4015
|
+
collectCss("borderBottom");
|
|
4016
|
+
collectCss("borderColor");
|
|
4017
|
+
collectCss("borderStyle");
|
|
4018
|
+
collectCss("borderWidth");
|
|
4019
|
+
collectCss("borderRadius");
|
|
4020
|
+
collectCss("radiusTopLeft", "borderTopLeftRadius");
|
|
4021
|
+
collectCss("radiusTopRight", "borderTopRightRadius");
|
|
4022
|
+
collectCss("radiusBottomLeft", "borderBottomLeftRadius");
|
|
4023
|
+
collectCss("radiusBottomRight", "borderBottomRightRadius");
|
|
4024
|
+
collectCss("color");
|
|
4025
|
+
collectCss("fontFamily");
|
|
4026
|
+
collectCss("fontSize");
|
|
4027
|
+
collectCss("fontWeight");
|
|
4028
|
+
collectCss("fontStyle");
|
|
4029
|
+
collectCss("fontVariant");
|
|
4030
|
+
collectCss("lineBreak");
|
|
4031
|
+
collectCss("textDecoration");
|
|
4032
|
+
collectCss("textDecorationLine");
|
|
4033
|
+
collectCss("textDecorationColor");
|
|
4034
|
+
collectCss("textDecorationStyle");
|
|
4035
|
+
collectCss("textDecorationThickness");
|
|
4036
|
+
collectCss("textIndent");
|
|
4037
|
+
collectCss("textShadow");
|
|
4038
|
+
collectCss("textUnderlineOffset");
|
|
4039
|
+
collectCss("userSelect");
|
|
4040
|
+
collectCss("letterSpacing");
|
|
4041
|
+
collectCss("textTransform");
|
|
4042
|
+
collectCss("lineHeight");
|
|
4043
|
+
collectCss("textAlign");
|
|
4044
|
+
collectCss("textAlignLast");
|
|
4045
|
+
collectCss("textWrap");
|
|
4046
|
+
collectCss("wordBreak");
|
|
4047
|
+
collectCss("wordSpacing");
|
|
4048
|
+
collectCss("wordWrap");
|
|
4049
|
+
collectCss("writingMode");
|
|
4050
|
+
collectCss("backgroundColor");
|
|
4051
|
+
collectCss("background");
|
|
4052
|
+
collectCss("boxShadow");
|
|
4053
|
+
collectCss("direction");
|
|
4054
|
+
collectCss("overflowX");
|
|
4055
|
+
collectCss("overflowY");
|
|
4056
|
+
collectCss("zIndex");
|
|
4057
|
+
collectCss("opacity");
|
|
4058
|
+
collectCss("zoom");
|
|
4059
|
+
collectCss("cursor");
|
|
4060
|
+
collectCss("whiteSpace");
|
|
4061
|
+
collectCss("transform");
|
|
4062
|
+
collectCss("outline");
|
|
4063
|
+
collectCss("outlineWidth");
|
|
4064
|
+
collectCss("outlineColor");
|
|
4065
|
+
collectCss("outlineStyle");
|
|
4066
|
+
collectCss("outlineOffset");
|
|
4067
|
+
const wrapContent = transformLayoutValue("wrapContent");
|
|
4068
|
+
if (wrapContent) {
|
|
4069
|
+
result.cssProps.flexWrap = wrapContent === "true" ? "wrap" : "nowrap";
|
|
4070
|
+
}
|
|
4071
|
+
collectCss("canShrink", "flexShrink");
|
|
4072
|
+
const canShrink = transformLayoutValue("canShrink");
|
|
4073
|
+
if (canShrink) {
|
|
4074
|
+
result.cssProps.flexShrink = canShrink === "true" ? 1 : 0;
|
|
4075
|
+
}
|
|
4076
|
+
if (isEmpty(result.cssProps) && isEmpty(result.issues)) {
|
|
4077
|
+
return defaultCompResult;
|
|
4078
|
+
}
|
|
4079
|
+
return result;
|
|
4080
|
+
function transformLayoutValue(prop) {
|
|
4081
|
+
var _a2, _b;
|
|
4082
|
+
const defValue = resolveSingleValue();
|
|
4083
|
+
if (((_a2 = layoutContext == null ? void 0 : layoutContext.mediaSize) == null ? void 0 : _a2.sizeIndex) !== void 0) {
|
|
4084
|
+
const sizeIndex = (_b = layoutContext.mediaSize) == null ? void 0 : _b.sizeIndex;
|
|
4085
|
+
const xsValue = resolveSingleValue("xs");
|
|
4086
|
+
const smValue = resolveSingleValue("sm");
|
|
4087
|
+
const mdValue = resolveSingleValue("md");
|
|
4088
|
+
const lgValue = resolveSingleValue("lg");
|
|
4089
|
+
const xlValue = resolveSingleValue("xl");
|
|
4090
|
+
const xxlValue = resolveSingleValue("xxl");
|
|
4091
|
+
let mergedValue;
|
|
4092
|
+
switch (sizeIndex) {
|
|
4093
|
+
case 0:
|
|
4094
|
+
mergedValue = xsValue ?? smValue ?? mdValue;
|
|
4095
|
+
break;
|
|
4096
|
+
case 1:
|
|
4097
|
+
mergedValue = smValue ?? mdValue;
|
|
4098
|
+
break;
|
|
4099
|
+
case 2:
|
|
4100
|
+
mergedValue = mdValue;
|
|
4101
|
+
break;
|
|
4102
|
+
case 3:
|
|
4103
|
+
mergedValue = lgValue;
|
|
4104
|
+
break;
|
|
4105
|
+
case 4:
|
|
4106
|
+
mergedValue = xlValue ?? lgValue;
|
|
4107
|
+
break;
|
|
4108
|
+
case 5:
|
|
4109
|
+
mergedValue = xxlValue ?? xlValue ?? lgValue;
|
|
4110
|
+
break;
|
|
4111
|
+
}
|
|
4112
|
+
return mergedValue ?? defValue;
|
|
4113
|
+
}
|
|
4114
|
+
return defValue;
|
|
4115
|
+
function resolveSingleValue(sizeTag = "") {
|
|
4116
|
+
const fullProp = sizeTag ? `${prop}-${sizeTag}` : prop;
|
|
4117
|
+
let singleInput = layoutProps[fullProp];
|
|
4118
|
+
if (singleInput == void 0) {
|
|
4119
|
+
return;
|
|
4120
|
+
}
|
|
4121
|
+
if (typeof singleInput === "string") {
|
|
4122
|
+
singleInput = singleInput.trim();
|
|
4123
|
+
} else {
|
|
4124
|
+
singleInput = singleInput.toString();
|
|
4125
|
+
}
|
|
4126
|
+
const value = singleInput ? singleInput.replace(
|
|
4127
|
+
themeVarCapturesRegex,
|
|
4128
|
+
(match) => toCssVar(match.trim())
|
|
4129
|
+
) : void 0;
|
|
4130
|
+
if (singleInput !== value) {
|
|
4131
|
+
return value;
|
|
4132
|
+
}
|
|
4133
|
+
const propPatterns = layoutPatterns[prop];
|
|
4134
|
+
if (!propPatterns || propPatterns.length === 0) {
|
|
4135
|
+
return value;
|
|
4136
|
+
}
|
|
4137
|
+
for (const pattern of propPatterns) {
|
|
4138
|
+
if (pattern.test(value)) {
|
|
4139
|
+
return value;
|
|
4140
|
+
}
|
|
4141
|
+
}
|
|
4142
|
+
result.issues.add(fullProp);
|
|
4143
|
+
return value;
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
function collectCss(prop, propCssName = "") {
|
|
4147
|
+
const value = transformLayoutValue(prop);
|
|
4148
|
+
if (value) {
|
|
4149
|
+
result.cssProps[propCssName || prop] = value;
|
|
4150
|
+
}
|
|
4151
|
+
}
|
|
4152
|
+
function getHorizontalStarSize(size, layoutContext2) {
|
|
4153
|
+
if (!size) return null;
|
|
4154
|
+
const orientation = getOrientation(layoutContext2);
|
|
4155
|
+
return orientation === "horizontal" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
4156
|
+
}
|
|
4157
|
+
function getVerticalStarSize(size, layoutContext2) {
|
|
4158
|
+
if (!size) return null;
|
|
4159
|
+
const orientation = getOrientation(layoutContext2);
|
|
4160
|
+
return orientation === "vertical" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
4161
|
+
}
|
|
4162
|
+
function getStarSizeNumber(input2) {
|
|
4163
|
+
if (starSizeRegex.test(input2)) {
|
|
4164
|
+
const numberPart = input2.slice(0, -1);
|
|
4165
|
+
return numberPart === "" ? 1 : parseInt(numberPart, 10);
|
|
4166
|
+
}
|
|
4167
|
+
return null;
|
|
4168
|
+
}
|
|
4169
|
+
function getOrientation(layoutContext2) {
|
|
4170
|
+
if (!layoutContext2) return;
|
|
4171
|
+
let orientation = (layoutContext2 == null ? void 0 : layoutContext2.type) === "Stack" && (layoutContext2 == null ? void 0 : layoutContext2.orientation);
|
|
4172
|
+
return orientation == null ? void 0 : orientation.toString();
|
|
4173
|
+
}
|
|
4174
|
+
}
|
|
4175
|
+
function toCssVar(c) {
|
|
4176
|
+
return `var(--${THEME_VAR_PREFIX}-${c.substring(1)})`;
|
|
4177
|
+
}
|
|
4178
|
+
const layoutPatterns = {
|
|
4179
|
+
// --- Dimensions
|
|
4180
|
+
width: [],
|
|
4181
|
+
minWidth: [],
|
|
4182
|
+
maxWidth: [],
|
|
4183
|
+
height: [],
|
|
4184
|
+
minHeight: [],
|
|
4185
|
+
maxHeight: [],
|
|
4186
|
+
gap: [],
|
|
4187
|
+
// --- Positions
|
|
4188
|
+
top: [],
|
|
4189
|
+
right: [],
|
|
4190
|
+
bottom: [],
|
|
4191
|
+
left: [],
|
|
4192
|
+
// --- Border
|
|
4193
|
+
border: [],
|
|
4194
|
+
borderTop: [],
|
|
4195
|
+
borderRight: [],
|
|
4196
|
+
borderBottom: [],
|
|
4197
|
+
borderLeft: [],
|
|
4198
|
+
borderColor: [],
|
|
4199
|
+
borderStyle: [],
|
|
4200
|
+
borderWidth: [],
|
|
4201
|
+
borderHorizontal: [],
|
|
4202
|
+
borderVertical: [],
|
|
4203
|
+
// --- Border radius
|
|
4204
|
+
borderRadius: [],
|
|
4205
|
+
radiusTopLeft: [],
|
|
4206
|
+
radiusTopRight: [],
|
|
4207
|
+
radiusBottomLeft: [],
|
|
4208
|
+
radiusBottomRight: [],
|
|
4209
|
+
// --- Padding
|
|
4210
|
+
padding: [],
|
|
4211
|
+
paddingHorizontal: [],
|
|
4212
|
+
paddingVertical: [],
|
|
4213
|
+
paddingTop: [],
|
|
4214
|
+
paddingRight: [],
|
|
4215
|
+
paddingBottom: [],
|
|
4216
|
+
paddingLeft: [],
|
|
4217
|
+
// --- Margin
|
|
4218
|
+
margin: [],
|
|
4219
|
+
marginHorizontal: [],
|
|
4220
|
+
marginVertical: [],
|
|
4221
|
+
marginTop: [],
|
|
4222
|
+
marginRight: [],
|
|
4223
|
+
marginBottom: [],
|
|
4224
|
+
marginLeft: [],
|
|
4225
|
+
// --- Other
|
|
4226
|
+
backgroundColor: [],
|
|
4227
|
+
background: [],
|
|
4228
|
+
boxShadow: [],
|
|
4229
|
+
direction: [],
|
|
4230
|
+
overflowX: [],
|
|
4231
|
+
overflowY: [],
|
|
4232
|
+
zIndex: [],
|
|
4233
|
+
opacity: [],
|
|
4234
|
+
// --- Typography
|
|
4235
|
+
color: [],
|
|
4236
|
+
fontFamily: [],
|
|
4237
|
+
fontSize: [],
|
|
4238
|
+
fontWeight: [],
|
|
4239
|
+
fontStyle: [booleanRegex],
|
|
4240
|
+
fontVariant: [],
|
|
4241
|
+
lineBreak: [],
|
|
4242
|
+
textDecoration: [],
|
|
4243
|
+
userSelect: [],
|
|
4244
|
+
letterSpacing: [],
|
|
4245
|
+
textTransform: [],
|
|
4246
|
+
lineHeight: [],
|
|
4247
|
+
textAlign: [],
|
|
4248
|
+
textWrap: [],
|
|
4249
|
+
textAlignLast: [],
|
|
4250
|
+
textIndent: [],
|
|
4251
|
+
textShadow: [],
|
|
4252
|
+
wordBreak: [],
|
|
4253
|
+
wordSpacing: [],
|
|
4254
|
+
wordWrap: [],
|
|
4255
|
+
writingMode: [],
|
|
4256
|
+
// --- Content rendering
|
|
4257
|
+
wrapContent: [],
|
|
4258
|
+
canShrink: [],
|
|
4259
|
+
// --- Other
|
|
4260
|
+
cursor: [],
|
|
4261
|
+
zoom: [],
|
|
4262
|
+
whiteSpace: [],
|
|
4263
|
+
textDecorationLine: [],
|
|
4264
|
+
textDecorationColor: [],
|
|
4265
|
+
textDecorationStyle: [],
|
|
4266
|
+
textDecorationThickness: [],
|
|
4267
|
+
textUnderlineOffset: [],
|
|
4268
|
+
transform: [],
|
|
4269
|
+
// --- Outline
|
|
4270
|
+
outline: [],
|
|
4271
|
+
outlineWidth: [],
|
|
4272
|
+
outlineColor: [],
|
|
4273
|
+
outlineStyle: [],
|
|
4274
|
+
outlineOffset: [],
|
|
4275
|
+
// --- Animation
|
|
4276
|
+
transition: []
|
|
4277
|
+
};
|
|
4278
|
+
const customVariantCache = /* @__PURE__ */ new Map();
|
|
4279
|
+
function setCustomVariantCache(variant, entry) {
|
|
4280
|
+
customVariantCache.set(variant, {
|
|
4281
|
+
...entry,
|
|
4282
|
+
createdAt: Date.now()
|
|
4283
|
+
});
|
|
4284
|
+
}
|
|
4285
|
+
function hasCustomVariantCache(variant) {
|
|
4286
|
+
return customVariantCache.has(variant);
|
|
4287
|
+
}
|
|
3720
4288
|
const defaultProps$1d = {
|
|
3721
4289
|
maxLines: 0,
|
|
3722
4290
|
preserveLinebreaks: false,
|
|
@@ -3757,6 +4325,56 @@ const Text = forwardRef(function Text2({
|
|
|
3757
4325
|
if (!variant || !TextVariantElement[variant]) return "div";
|
|
3758
4326
|
return TextVariantElement[variant];
|
|
3759
4327
|
}, [variant]);
|
|
4328
|
+
const isCustomVariant = useMemo(() => {
|
|
4329
|
+
return variant && !TextVariantElement[variant];
|
|
4330
|
+
}, [variant]);
|
|
4331
|
+
const variantSpec = useMemo(
|
|
4332
|
+
() => {
|
|
4333
|
+
if (!isCustomVariant) return EMPTY_OBJECT;
|
|
4334
|
+
const subject = `-Text-${variant}`;
|
|
4335
|
+
const cssInput = {
|
|
4336
|
+
color: toCssVar(`$textColor${subject}`),
|
|
4337
|
+
"font-family": toCssVar(`$fontFamily${subject}`),
|
|
4338
|
+
"font-size": toCssVar(`$fontSize${subject}`),
|
|
4339
|
+
"font-style": toCssVar(`$fontStyle${subject}`),
|
|
4340
|
+
"font-weight": toCssVar(`$fontWeight${subject}`),
|
|
4341
|
+
"font-stretch": toCssVar(`$fontStretch${subject}`),
|
|
4342
|
+
"text-decoration-line": toCssVar(`$textDecorationLine${subject}`),
|
|
4343
|
+
"text-decoration-color": toCssVar(`$textDecorationColor${subject}`),
|
|
4344
|
+
"text-decoration-style": toCssVar(`$textDecorationStyle${subject}`),
|
|
4345
|
+
"text-decoration-thickness": toCssVar(`$textDecorationThickness${subject}`),
|
|
4346
|
+
"text-underline-offset": toCssVar(`$textUnderlineOffset${subject}`),
|
|
4347
|
+
"line-height": toCssVar(`$lineHeight${subject}`),
|
|
4348
|
+
"background-color": toCssVar(`$backgroundColor${subject}`),
|
|
4349
|
+
"text-transform": toCssVar(`$textTransform${subject}`),
|
|
4350
|
+
"letter-spacing": toCssVar(`$letterSpacing${subject}`),
|
|
4351
|
+
"word-spacing": toCssVar(`$wordSpacing${subject}`),
|
|
4352
|
+
"text-shadow": toCssVar(`$textShadow${subject}`),
|
|
4353
|
+
"text-indent": toCssVar(`$textIndent${subject}`),
|
|
4354
|
+
"text-align": toCssVar(`$textAlign${subject}`),
|
|
4355
|
+
"text-align-last": toCssVar(`$textAlignLast${subject}`),
|
|
4356
|
+
"word-break": toCssVar(`$wordBreak${subject}`),
|
|
4357
|
+
"word-wrap": toCssVar(`$wordWrap${subject}`),
|
|
4358
|
+
direction: toCssVar(`$direction${subject}`),
|
|
4359
|
+
"writing-mode": toCssVar(`$writingMode${subject}`),
|
|
4360
|
+
"line-break": toCssVar(`$lineBreak${subject}`)
|
|
4361
|
+
};
|
|
4362
|
+
return cssInput;
|
|
4363
|
+
},
|
|
4364
|
+
[isCustomVariant, variant]
|
|
4365
|
+
);
|
|
4366
|
+
const customVariantClassName = useComponentStyle(variantSpec);
|
|
4367
|
+
useEffect(() => {
|
|
4368
|
+
if (isCustomVariant && variant && customVariantClassName) {
|
|
4369
|
+
if (!hasCustomVariantCache(variant)) {
|
|
4370
|
+
setCustomVariantCache(variant, {
|
|
4371
|
+
className: customVariantClassName,
|
|
4372
|
+
cssText: ""
|
|
4373
|
+
// Will be populated when CSS generation is implemented
|
|
4374
|
+
});
|
|
4375
|
+
}
|
|
4376
|
+
}
|
|
4377
|
+
}, [isCustomVariant, variant, customVariantClassName]);
|
|
3760
4378
|
const overflowClasses = useMemo(() => {
|
|
3761
4379
|
const classes = {};
|
|
3762
4380
|
if (!overflowMode) {
|
|
@@ -3812,7 +4430,8 @@ const Text = forwardRef(function Text2({
|
|
|
3812
4430
|
className: classnames(
|
|
3813
4431
|
syntaxHighlightClasses,
|
|
3814
4432
|
styles$1d.text,
|
|
3815
|
-
|
|
4433
|
+
// Use custom variant className if it's a custom variant, otherwise use predefined variant style
|
|
4434
|
+
isCustomVariant ? customVariantClassName : styles$1d[variant || "default"],
|
|
3816
4435
|
{
|
|
3817
4436
|
[styles$1d.preserveLinebreaks]: preserveLinebreaks2,
|
|
3818
4437
|
...overflowClasses,
|
|
@@ -4214,452 +4833,108 @@ const passwordInputComponentRenderer = createComponentRenderer(
|
|
|
4214
4833
|
);
|
|
4215
4834
|
const wrapper$l = "_wrapper_1h2jx_14";
|
|
4216
4835
|
const root$3 = "_root_1h2jx_17";
|
|
4217
|
-
const styles$1c = {
|
|
4218
|
-
wrapper: wrapper$l,
|
|
4219
|
-
root: root$3
|
|
4220
|
-
};
|
|
4221
|
-
const parsedHVarCache = {};
|
|
4222
|
-
function parseHVar(input2) {
|
|
4223
|
-
if (parsedHVarCache[input2] !== void 0) {
|
|
4224
|
-
return parsedHVarCache[input2];
|
|
4225
|
-
}
|
|
4226
|
-
const parts = input2.split(/-[A-Z]+/);
|
|
4227
|
-
if (parts.length !== 2) {
|
|
4228
|
-
parsedHVarCache[input2] = null;
|
|
4229
|
-
return parsedHVarCache[input2];
|
|
4230
|
-
}
|
|
4231
|
-
const firstPart = parts[0];
|
|
4232
|
-
const classessParts = firstPart.split(":");
|
|
4233
|
-
const attribute = classessParts[classessParts.length - 1];
|
|
4234
|
-
const classes = classessParts.length > 1 ? classessParts.slice(0, classessParts.length - 1) : [];
|
|
4235
|
-
const secondPart = input2.substring(firstPart.length + 1);
|
|
4236
|
-
const [compName, ...rest] = secondPart.split("-");
|
|
4237
|
-
const traitsAndStates = secondPart.substring(compName.length).split("--");
|
|
4238
|
-
const states = [];
|
|
4239
|
-
const traits = [];
|
|
4240
|
-
traitsAndStates.forEach((part) => {
|
|
4241
|
-
if (!part.includes("-") && part) {
|
|
4242
|
-
states.push(part);
|
|
4243
|
-
} else {
|
|
4244
|
-
part.split("-").forEach((trait) => {
|
|
4245
|
-
if (trait) {
|
|
4246
|
-
traits.push(trait);
|
|
4247
|
-
}
|
|
4248
|
-
});
|
|
4249
|
-
}
|
|
4250
|
-
});
|
|
4251
|
-
parsedHVarCache[input2] = {
|
|
4252
|
-
classes,
|
|
4253
|
-
attribute,
|
|
4254
|
-
component: compName,
|
|
4255
|
-
traits,
|
|
4256
|
-
states
|
|
4257
|
-
};
|
|
4258
|
-
return parsedHVarCache[input2];
|
|
4259
|
-
}
|
|
4260
|
-
function createCombinations(arr = []) {
|
|
4261
|
-
const stateCombinations = [];
|
|
4262
|
-
for (let i = 1; i <= arr.length; i++) {
|
|
4263
|
-
for (let j = 0; j <= arr.length - i; j++) {
|
|
4264
|
-
stateCombinations.push(arr.slice(j, j + i));
|
|
4265
|
-
}
|
|
4266
|
-
}
|
|
4267
|
-
return stateCombinations.sort((a, b) => b.length - a.length);
|
|
4268
|
-
}
|
|
4269
|
-
function matchThemeVar(themeVar, availableThemeVars = []) {
|
|
4270
|
-
const hvar = parseHVar(themeVar);
|
|
4271
|
-
if (!hvar) {
|
|
4272
|
-
return;
|
|
4273
|
-
}
|
|
4274
|
-
const stateCombinations = createCombinations(hvar.states);
|
|
4275
|
-
const traitCombinations = createCombinations(hvar.traits);
|
|
4276
|
-
const sortedTraitCombinations = [];
|
|
4277
|
-
traitCombinations.forEach((traitComb) => {
|
|
4278
|
-
let result = "";
|
|
4279
|
-
traitComb.forEach((t) => {
|
|
4280
|
-
result = `${result}-${t}`;
|
|
4281
|
-
});
|
|
4282
|
-
sortedTraitCombinations.push(result);
|
|
4283
|
-
});
|
|
4284
|
-
sortedTraitCombinations.push("");
|
|
4285
|
-
const sortedStateCombinations = [];
|
|
4286
|
-
stateCombinations.forEach((stateComb) => {
|
|
4287
|
-
let result = "";
|
|
4288
|
-
stateComb.forEach((s) => {
|
|
4289
|
-
result = `${result}--${s}`;
|
|
4290
|
-
});
|
|
4291
|
-
sortedStateCombinations.push(result);
|
|
4292
|
-
});
|
|
4293
|
-
sortedStateCombinations.push("");
|
|
4294
|
-
const componentParts = [hvar.component, ...hvar.classes];
|
|
4295
|
-
const from = [];
|
|
4296
|
-
sortedStateCombinations.forEach((stateComb) => {
|
|
4297
|
-
sortedTraitCombinations.forEach((traitComb) => {
|
|
4298
|
-
componentParts.forEach((componentPart) => {
|
|
4299
|
-
from.push(`${hvar.attribute}-${componentPart}${traitComb}${stateComb}`);
|
|
4300
|
-
});
|
|
4301
|
-
});
|
|
4302
|
-
});
|
|
4303
|
-
let matchedValue;
|
|
4304
|
-
for (let i = availableThemeVars.length - 1; i >= 0; i--) {
|
|
4305
|
-
const themeVars2 = availableThemeVars[i];
|
|
4306
|
-
let foundValue = from.find((themeVar2) => themeVars2[themeVar2] !== void 0);
|
|
4307
|
-
if (foundValue) {
|
|
4308
|
-
matchedValue = foundValue;
|
|
4309
|
-
break;
|
|
4310
|
-
}
|
|
4311
|
-
}
|
|
4312
|
-
const forValue = from[0];
|
|
4313
|
-
return {
|
|
4314
|
-
forValue,
|
|
4315
|
-
matchedValue,
|
|
4316
|
-
from
|
|
4317
|
-
};
|
|
4318
|
-
}
|
|
4319
|
-
const THEME_VAR_PREFIX = "xmlui";
|
|
4320
|
-
const themeVarCapturesRegex = /(\$[a-zA-Z][a-zA-Z0-9-_]*)/g;
|
|
4321
|
-
const booleanRegex = /^(true|false)$/;
|
|
4322
|
-
const starSizeRegex = /^\d*\*$/;
|
|
4323
|
-
const defaultCompResult = {
|
|
4324
|
-
cssProps: {},
|
|
4325
|
-
issues: /* @__PURE__ */ new Set()
|
|
4326
|
-
};
|
|
4327
|
-
function resolveLayoutProps(layoutProps = EMPTY_OBJECT, layoutContext) {
|
|
4328
|
-
const result = {
|
|
4329
|
-
cssProps: {},
|
|
4330
|
-
issues: /* @__PURE__ */ new Set()
|
|
4331
|
-
};
|
|
4332
|
-
if (!!getOrientation(layoutContext)) {
|
|
4333
|
-
result.cssProps.flexShrink = 0;
|
|
4334
|
-
}
|
|
4335
|
-
collectCss("width");
|
|
4336
|
-
const horizontalStarSize = getHorizontalStarSize(result.cssProps.width, layoutContext);
|
|
4337
|
-
if (horizontalStarSize !== null) {
|
|
4338
|
-
result.cssProps.flex = horizontalStarSize;
|
|
4339
|
-
result.cssProps.flexShrink = 1;
|
|
4340
|
-
}
|
|
4341
|
-
collectCss("minWidth");
|
|
4342
|
-
collectCss("maxWidth");
|
|
4343
|
-
collectCss("height");
|
|
4344
|
-
const verticalStarSize = getVerticalStarSize(result.cssProps.height, layoutContext);
|
|
4345
|
-
if (verticalStarSize !== null) {
|
|
4346
|
-
result.cssProps.flex = verticalStarSize;
|
|
4347
|
-
result.cssProps.flexShrink = 1;
|
|
4348
|
-
}
|
|
4349
|
-
collectCss("minHeight");
|
|
4350
|
-
collectCss("maxHeight");
|
|
4351
|
-
collectCss("top");
|
|
4352
|
-
collectCss("right");
|
|
4353
|
-
collectCss("bottom");
|
|
4354
|
-
collectCss("left");
|
|
4355
|
-
collectCss("gap");
|
|
4356
|
-
collectCss("padding");
|
|
4357
|
-
const paddingHorizontal = transformLayoutValue("paddingHorizontal");
|
|
4358
|
-
if (paddingHorizontal) {
|
|
4359
|
-
result.cssProps.paddingLeft = paddingHorizontal;
|
|
4360
|
-
result.cssProps.paddingRight = paddingHorizontal;
|
|
4361
|
-
}
|
|
4362
|
-
collectCss("paddingRight");
|
|
4363
|
-
collectCss("paddingLeft");
|
|
4364
|
-
const paddingVertical = transformLayoutValue("paddingVertical");
|
|
4365
|
-
if (paddingVertical) {
|
|
4366
|
-
result.cssProps.paddingTop = paddingVertical;
|
|
4367
|
-
result.cssProps.paddingBottom = paddingVertical;
|
|
4368
|
-
}
|
|
4369
|
-
collectCss("paddingTop");
|
|
4370
|
-
collectCss("paddingBottom");
|
|
4371
|
-
collectCss("margin");
|
|
4372
|
-
const marginHorizontal = transformLayoutValue("marginHorizontal");
|
|
4373
|
-
if (marginHorizontal) {
|
|
4374
|
-
result.cssProps.marginLeft = marginHorizontal;
|
|
4375
|
-
result.cssProps.marginRight = marginHorizontal;
|
|
4376
|
-
}
|
|
4377
|
-
collectCss("marginRight");
|
|
4378
|
-
collectCss("marginLeft");
|
|
4379
|
-
const marginVertical = transformLayoutValue("marginVertical");
|
|
4380
|
-
if (marginVertical) {
|
|
4381
|
-
result.cssProps.marginTop = marginVertical;
|
|
4382
|
-
result.cssProps.marginBottom = marginVertical;
|
|
4383
|
-
}
|
|
4384
|
-
collectCss("marginTop");
|
|
4385
|
-
collectCss("marginBottom");
|
|
4386
|
-
collectCss("border");
|
|
4387
|
-
const horizontalBorder = transformLayoutValue("borderHorizontal");
|
|
4388
|
-
if (horizontalBorder) {
|
|
4389
|
-
result.cssProps.borderLeft = horizontalBorder;
|
|
4390
|
-
result.cssProps.borderRight = horizontalBorder;
|
|
4391
|
-
}
|
|
4392
|
-
collectCss("borderRight");
|
|
4393
|
-
collectCss("borderLeft");
|
|
4394
|
-
const verticalBorder = transformLayoutValue("borderVertical");
|
|
4395
|
-
if (verticalBorder) {
|
|
4396
|
-
result.cssProps.borderTop = verticalBorder;
|
|
4397
|
-
result.cssProps.borderBottom = verticalBorder;
|
|
4398
|
-
}
|
|
4399
|
-
collectCss("borderTop");
|
|
4400
|
-
collectCss("borderBottom");
|
|
4401
|
-
collectCss("borderColor");
|
|
4402
|
-
collectCss("borderStyle");
|
|
4403
|
-
collectCss("borderWidth");
|
|
4404
|
-
collectCss("borderRadius");
|
|
4405
|
-
collectCss("radiusTopLeft", "borderTopLeftRadius");
|
|
4406
|
-
collectCss("radiusTopRight", "borderTopRightRadius");
|
|
4407
|
-
collectCss("radiusBottomLeft", "borderBottomLeftRadius");
|
|
4408
|
-
collectCss("radiusBottomRight", "borderBottomRightRadius");
|
|
4409
|
-
collectCss("color");
|
|
4410
|
-
collectCss("fontFamily");
|
|
4411
|
-
collectCss("fontSize");
|
|
4412
|
-
collectCss("fontWeight");
|
|
4413
|
-
collectCss("fontStyle");
|
|
4414
|
-
collectCss("fontVariant");
|
|
4415
|
-
collectCss("lineBreak");
|
|
4416
|
-
collectCss("textDecoration");
|
|
4417
|
-
collectCss("textDecorationLine");
|
|
4418
|
-
collectCss("textDecorationColor");
|
|
4419
|
-
collectCss("textDecorationStyle");
|
|
4420
|
-
collectCss("textDecorationThickness");
|
|
4421
|
-
collectCss("textIndent");
|
|
4422
|
-
collectCss("textShadow");
|
|
4423
|
-
collectCss("textUnderlineOffset");
|
|
4424
|
-
collectCss("userSelect");
|
|
4425
|
-
collectCss("letterSpacing");
|
|
4426
|
-
collectCss("textTransform");
|
|
4427
|
-
collectCss("lineHeight");
|
|
4428
|
-
collectCss("textAlign");
|
|
4429
|
-
collectCss("textAlignLast");
|
|
4430
|
-
collectCss("textWrap");
|
|
4431
|
-
collectCss("wordBreak");
|
|
4432
|
-
collectCss("wordSpacing");
|
|
4433
|
-
collectCss("wordWrap");
|
|
4434
|
-
collectCss("writingMode");
|
|
4435
|
-
collectCss("backgroundColor");
|
|
4436
|
-
collectCss("background");
|
|
4437
|
-
collectCss("boxShadow");
|
|
4438
|
-
collectCss("direction");
|
|
4439
|
-
collectCss("overflowX");
|
|
4440
|
-
collectCss("overflowY");
|
|
4441
|
-
collectCss("zIndex");
|
|
4442
|
-
collectCss("opacity");
|
|
4443
|
-
collectCss("zoom");
|
|
4444
|
-
collectCss("cursor");
|
|
4445
|
-
collectCss("whiteSpace");
|
|
4446
|
-
collectCss("transform");
|
|
4447
|
-
collectCss("outline");
|
|
4448
|
-
collectCss("outlineWidth");
|
|
4449
|
-
collectCss("outlineColor");
|
|
4450
|
-
collectCss("outlineStyle");
|
|
4451
|
-
collectCss("outlineOffset");
|
|
4452
|
-
const wrapContent = transformLayoutValue("wrapContent");
|
|
4453
|
-
if (wrapContent) {
|
|
4454
|
-
result.cssProps.flexWrap = wrapContent === "true" ? "wrap" : "nowrap";
|
|
4455
|
-
}
|
|
4456
|
-
collectCss("canShrink", "flexShrink");
|
|
4457
|
-
const canShrink = transformLayoutValue("canShrink");
|
|
4458
|
-
if (canShrink) {
|
|
4459
|
-
result.cssProps.flexShrink = canShrink === "true" ? 1 : 0;
|
|
4836
|
+
const styles$1c = {
|
|
4837
|
+
wrapper: wrapper$l,
|
|
4838
|
+
root: root$3
|
|
4839
|
+
};
|
|
4840
|
+
const parsedHVarCache = {};
|
|
4841
|
+
function parseHVar(input2) {
|
|
4842
|
+
if (parsedHVarCache[input2] !== void 0) {
|
|
4843
|
+
return parsedHVarCache[input2];
|
|
4460
4844
|
}
|
|
4461
|
-
|
|
4462
|
-
|
|
4845
|
+
const parts = input2.split(/-[A-Z]+/);
|
|
4846
|
+
if (parts.length !== 2) {
|
|
4847
|
+
parsedHVarCache[input2] = null;
|
|
4848
|
+
return parsedHVarCache[input2];
|
|
4463
4849
|
}
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
break;
|
|
4481
|
-
case 1:
|
|
4482
|
-
mergedValue = smValue ?? mdValue;
|
|
4483
|
-
break;
|
|
4484
|
-
case 2:
|
|
4485
|
-
mergedValue = mdValue;
|
|
4486
|
-
break;
|
|
4487
|
-
case 3:
|
|
4488
|
-
mergedValue = lgValue;
|
|
4489
|
-
break;
|
|
4490
|
-
case 4:
|
|
4491
|
-
mergedValue = xlValue ?? lgValue;
|
|
4492
|
-
break;
|
|
4493
|
-
case 5:
|
|
4494
|
-
mergedValue = xxlValue ?? xlValue ?? lgValue;
|
|
4495
|
-
break;
|
|
4496
|
-
}
|
|
4497
|
-
return mergedValue ?? defValue;
|
|
4498
|
-
}
|
|
4499
|
-
return defValue;
|
|
4500
|
-
function resolveSingleValue(sizeTag = "") {
|
|
4501
|
-
const fullProp = sizeTag ? `${prop}-${sizeTag}` : prop;
|
|
4502
|
-
let singleInput = layoutProps[fullProp];
|
|
4503
|
-
if (singleInput == void 0) {
|
|
4504
|
-
return;
|
|
4505
|
-
}
|
|
4506
|
-
if (typeof singleInput === "string") {
|
|
4507
|
-
singleInput = singleInput.trim();
|
|
4508
|
-
} else {
|
|
4509
|
-
singleInput = singleInput.toString();
|
|
4510
|
-
}
|
|
4511
|
-
const value = singleInput ? singleInput.replace(
|
|
4512
|
-
themeVarCapturesRegex,
|
|
4513
|
-
(match) => toCssVar(match.trim())
|
|
4514
|
-
) : void 0;
|
|
4515
|
-
if (singleInput !== value) {
|
|
4516
|
-
return value;
|
|
4517
|
-
}
|
|
4518
|
-
const propPatterns = layoutPatterns[prop];
|
|
4519
|
-
if (!propPatterns || propPatterns.length === 0) {
|
|
4520
|
-
return value;
|
|
4521
|
-
}
|
|
4522
|
-
for (const pattern of propPatterns) {
|
|
4523
|
-
if (pattern.test(value)) {
|
|
4524
|
-
return value;
|
|
4850
|
+
const firstPart = parts[0];
|
|
4851
|
+
const classessParts = firstPart.split(":");
|
|
4852
|
+
const attribute = classessParts[classessParts.length - 1];
|
|
4853
|
+
const classes = classessParts.length > 1 ? classessParts.slice(0, classessParts.length - 1) : [];
|
|
4854
|
+
const secondPart = input2.substring(firstPart.length + 1);
|
|
4855
|
+
const [compName, ...rest] = secondPart.split("-");
|
|
4856
|
+
const traitsAndStates = secondPart.substring(compName.length).split("--");
|
|
4857
|
+
const states = [];
|
|
4858
|
+
const traits = [];
|
|
4859
|
+
traitsAndStates.forEach((part) => {
|
|
4860
|
+
if (!part.includes("-") && part) {
|
|
4861
|
+
states.push(part);
|
|
4862
|
+
} else {
|
|
4863
|
+
part.split("-").forEach((trait) => {
|
|
4864
|
+
if (trait) {
|
|
4865
|
+
traits.push(trait);
|
|
4525
4866
|
}
|
|
4526
|
-
}
|
|
4527
|
-
result.issues.add(fullProp);
|
|
4528
|
-
return value;
|
|
4867
|
+
});
|
|
4529
4868
|
}
|
|
4530
|
-
}
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4869
|
+
});
|
|
4870
|
+
parsedHVarCache[input2] = {
|
|
4871
|
+
classes,
|
|
4872
|
+
attribute,
|
|
4873
|
+
component: compName,
|
|
4874
|
+
traits,
|
|
4875
|
+
states
|
|
4876
|
+
};
|
|
4877
|
+
return parsedHVarCache[input2];
|
|
4878
|
+
}
|
|
4879
|
+
function createCombinations(arr = []) {
|
|
4880
|
+
const stateCombinations = [];
|
|
4881
|
+
for (let i = 1; i <= arr.length; i++) {
|
|
4882
|
+
for (let j = 0; j <= arr.length - i; j++) {
|
|
4883
|
+
stateCombinations.push(arr.slice(j, j + i));
|
|
4535
4884
|
}
|
|
4536
4885
|
}
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
if (!size) return null;
|
|
4544
|
-
const orientation = getOrientation(layoutContext2);
|
|
4545
|
-
return orientation === "vertical" && starSizeRegex.test(size.toString()) ? getStarSizeNumber(size.toString()) : null;
|
|
4886
|
+
return stateCombinations.sort((a, b) => b.length - a.length);
|
|
4887
|
+
}
|
|
4888
|
+
function matchThemeVar(themeVar, availableThemeVars = []) {
|
|
4889
|
+
const hvar = parseHVar(themeVar);
|
|
4890
|
+
if (!hvar) {
|
|
4891
|
+
return;
|
|
4546
4892
|
}
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4893
|
+
const stateCombinations = createCombinations(hvar.states);
|
|
4894
|
+
const traitCombinations = createCombinations(hvar.traits);
|
|
4895
|
+
const sortedTraitCombinations = [];
|
|
4896
|
+
traitCombinations.forEach((traitComb) => {
|
|
4897
|
+
let result = "";
|
|
4898
|
+
traitComb.forEach((t) => {
|
|
4899
|
+
result = `${result}-${t}`;
|
|
4900
|
+
});
|
|
4901
|
+
sortedTraitCombinations.push(result);
|
|
4902
|
+
});
|
|
4903
|
+
sortedTraitCombinations.push("");
|
|
4904
|
+
const sortedStateCombinations = [];
|
|
4905
|
+
stateCombinations.forEach((stateComb) => {
|
|
4906
|
+
let result = "";
|
|
4907
|
+
stateComb.forEach((s) => {
|
|
4908
|
+
result = `${result}--${s}`;
|
|
4909
|
+
});
|
|
4910
|
+
sortedStateCombinations.push(result);
|
|
4911
|
+
});
|
|
4912
|
+
sortedStateCombinations.push("");
|
|
4913
|
+
const componentParts = [hvar.component, ...hvar.classes];
|
|
4914
|
+
const from = [];
|
|
4915
|
+
sortedStateCombinations.forEach((stateComb) => {
|
|
4916
|
+
sortedTraitCombinations.forEach((traitComb) => {
|
|
4917
|
+
componentParts.forEach((componentPart) => {
|
|
4918
|
+
from.push(`${hvar.attribute}-${componentPart}${traitComb}${stateComb}`);
|
|
4919
|
+
});
|
|
4920
|
+
});
|
|
4921
|
+
});
|
|
4922
|
+
let matchedValue;
|
|
4923
|
+
for (let i = availableThemeVars.length - 1; i >= 0; i--) {
|
|
4924
|
+
const themeVars2 = availableThemeVars[i];
|
|
4925
|
+
let foundValue = from.find((themeVar2) => themeVars2[themeVar2] !== void 0);
|
|
4926
|
+
if (foundValue) {
|
|
4927
|
+
matchedValue = foundValue;
|
|
4928
|
+
break;
|
|
4551
4929
|
}
|
|
4552
|
-
return null;
|
|
4553
|
-
}
|
|
4554
|
-
function getOrientation(layoutContext2) {
|
|
4555
|
-
if (!layoutContext2) return;
|
|
4556
|
-
let orientation = (layoutContext2 == null ? void 0 : layoutContext2.type) === "Stack" && (layoutContext2 == null ? void 0 : layoutContext2.orientation);
|
|
4557
|
-
return orientation == null ? void 0 : orientation.toString();
|
|
4558
4930
|
}
|
|
4931
|
+
const forValue = from[0];
|
|
4932
|
+
return {
|
|
4933
|
+
forValue,
|
|
4934
|
+
matchedValue,
|
|
4935
|
+
from
|
|
4936
|
+
};
|
|
4559
4937
|
}
|
|
4560
|
-
function toCssVar(c) {
|
|
4561
|
-
return `var(--${THEME_VAR_PREFIX}-${c.substring(1)})`;
|
|
4562
|
-
}
|
|
4563
|
-
const layoutPatterns = {
|
|
4564
|
-
// --- Dimensions
|
|
4565
|
-
width: [],
|
|
4566
|
-
minWidth: [],
|
|
4567
|
-
maxWidth: [],
|
|
4568
|
-
height: [],
|
|
4569
|
-
minHeight: [],
|
|
4570
|
-
maxHeight: [],
|
|
4571
|
-
gap: [],
|
|
4572
|
-
// --- Positions
|
|
4573
|
-
top: [],
|
|
4574
|
-
right: [],
|
|
4575
|
-
bottom: [],
|
|
4576
|
-
left: [],
|
|
4577
|
-
// --- Border
|
|
4578
|
-
border: [],
|
|
4579
|
-
borderTop: [],
|
|
4580
|
-
borderRight: [],
|
|
4581
|
-
borderBottom: [],
|
|
4582
|
-
borderLeft: [],
|
|
4583
|
-
borderColor: [],
|
|
4584
|
-
borderStyle: [],
|
|
4585
|
-
borderWidth: [],
|
|
4586
|
-
borderHorizontal: [],
|
|
4587
|
-
borderVertical: [],
|
|
4588
|
-
// --- Border radius
|
|
4589
|
-
borderRadius: [],
|
|
4590
|
-
radiusTopLeft: [],
|
|
4591
|
-
radiusTopRight: [],
|
|
4592
|
-
radiusBottomLeft: [],
|
|
4593
|
-
radiusBottomRight: [],
|
|
4594
|
-
// --- Padding
|
|
4595
|
-
padding: [],
|
|
4596
|
-
paddingHorizontal: [],
|
|
4597
|
-
paddingVertical: [],
|
|
4598
|
-
paddingTop: [],
|
|
4599
|
-
paddingRight: [],
|
|
4600
|
-
paddingBottom: [],
|
|
4601
|
-
paddingLeft: [],
|
|
4602
|
-
// --- Margin
|
|
4603
|
-
margin: [],
|
|
4604
|
-
marginHorizontal: [],
|
|
4605
|
-
marginVertical: [],
|
|
4606
|
-
marginTop: [],
|
|
4607
|
-
marginRight: [],
|
|
4608
|
-
marginBottom: [],
|
|
4609
|
-
marginLeft: [],
|
|
4610
|
-
// --- Other
|
|
4611
|
-
backgroundColor: [],
|
|
4612
|
-
background: [],
|
|
4613
|
-
boxShadow: [],
|
|
4614
|
-
direction: [],
|
|
4615
|
-
overflowX: [],
|
|
4616
|
-
overflowY: [],
|
|
4617
|
-
zIndex: [],
|
|
4618
|
-
opacity: [],
|
|
4619
|
-
// --- Typography
|
|
4620
|
-
color: [],
|
|
4621
|
-
fontFamily: [],
|
|
4622
|
-
fontSize: [],
|
|
4623
|
-
fontWeight: [],
|
|
4624
|
-
fontStyle: [booleanRegex],
|
|
4625
|
-
fontVariant: [],
|
|
4626
|
-
lineBreak: [],
|
|
4627
|
-
textDecoration: [],
|
|
4628
|
-
userSelect: [],
|
|
4629
|
-
letterSpacing: [],
|
|
4630
|
-
textTransform: [],
|
|
4631
|
-
lineHeight: [],
|
|
4632
|
-
textAlign: [],
|
|
4633
|
-
textWrap: [],
|
|
4634
|
-
textAlignLast: [],
|
|
4635
|
-
textIndent: [],
|
|
4636
|
-
textShadow: [],
|
|
4637
|
-
wordBreak: [],
|
|
4638
|
-
wordSpacing: [],
|
|
4639
|
-
wordWrap: [],
|
|
4640
|
-
writingMode: [],
|
|
4641
|
-
// --- Content rendering
|
|
4642
|
-
wrapContent: [],
|
|
4643
|
-
canShrink: [],
|
|
4644
|
-
// --- Other
|
|
4645
|
-
cursor: [],
|
|
4646
|
-
zoom: [],
|
|
4647
|
-
whiteSpace: [],
|
|
4648
|
-
textDecorationLine: [],
|
|
4649
|
-
textDecorationColor: [],
|
|
4650
|
-
textDecorationStyle: [],
|
|
4651
|
-
textDecorationThickness: [],
|
|
4652
|
-
textUnderlineOffset: [],
|
|
4653
|
-
transform: [],
|
|
4654
|
-
// --- Outline
|
|
4655
|
-
outline: [],
|
|
4656
|
-
outlineWidth: [],
|
|
4657
|
-
outlineColor: [],
|
|
4658
|
-
outlineStyle: [],
|
|
4659
|
-
outlineOffset: [],
|
|
4660
|
-
// --- Animation
|
|
4661
|
-
transition: []
|
|
4662
|
-
};
|
|
4663
4938
|
function isThemeVarName(varName) {
|
|
4664
4939
|
return typeof varName === "string" && (varName == null ? void 0 : varName.startsWith("$"));
|
|
4665
4940
|
}
|
|
@@ -6498,222 +6773,6 @@ const XmlUiRedThemeDefinition = {
|
|
|
6498
6773
|
themeVars: { ...redThemeColors }
|
|
6499
6774
|
};
|
|
6500
6775
|
const ThemeToneKeys = ["light", "dark"];
|
|
6501
|
-
function hashString(str) {
|
|
6502
|
-
let hash = 5381;
|
|
6503
|
-
let i = str.length;
|
|
6504
|
-
while (i) {
|
|
6505
|
-
hash = hash * 33 ^ str.charCodeAt(--i);
|
|
6506
|
-
}
|
|
6507
|
-
let s = (hash >>> 0).toString(36);
|
|
6508
|
-
return s;
|
|
6509
|
-
}
|
|
6510
|
-
function toKebabCase(str) {
|
|
6511
|
-
if (str.startsWith("--")) {
|
|
6512
|
-
return str;
|
|
6513
|
-
}
|
|
6514
|
-
return str.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
|
|
6515
|
-
}
|
|
6516
|
-
function stableJSONStringify(obj) {
|
|
6517
|
-
return JSON.stringify(obj);
|
|
6518
|
-
}
|
|
6519
|
-
class StyleRegistry {
|
|
6520
|
-
constructor() {
|
|
6521
|
-
this.cache = /* @__PURE__ */ new Map();
|
|
6522
|
-
this.rootClasses = /* @__PURE__ */ new Set();
|
|
6523
|
-
this.injected = /* @__PURE__ */ new Set();
|
|
6524
|
-
this.refCounts = /* @__PURE__ */ new Map();
|
|
6525
|
-
this.ssrHashes = /* @__PURE__ */ new Set();
|
|
6526
|
-
}
|
|
6527
|
-
register(styles2) {
|
|
6528
|
-
const key = stableJSONStringify(styles2);
|
|
6529
|
-
const styleHash = hashString(key);
|
|
6530
|
-
const cachedEntry = this.cache.get(styleHash);
|
|
6531
|
-
if (cachedEntry) {
|
|
6532
|
-
return cachedEntry;
|
|
6533
|
-
}
|
|
6534
|
-
const className = `css-${styleHash}`;
|
|
6535
|
-
const css = this._generateCss(`.${className}`, styles2);
|
|
6536
|
-
const entry = { className, styleHash, css };
|
|
6537
|
-
this.cache.set(styleHash, entry);
|
|
6538
|
-
return entry;
|
|
6539
|
-
}
|
|
6540
|
-
/**
|
|
6541
|
-
* [PRIVATE] Recursively generates CSS rules from a style object.
|
|
6542
|
-
* This is the new, more powerful engine.
|
|
6543
|
-
* @param selector - The CSS selector for the current context (e.g., '.css-123' or '&:hover').
|
|
6544
|
-
* @param styles - The style object to process.
|
|
6545
|
-
* @returns A string of CSS rules.
|
|
6546
|
-
*/
|
|
6547
|
-
_generateCss(selector, styles2) {
|
|
6548
|
-
const directProps = [];
|
|
6549
|
-
const nestedRules = [];
|
|
6550
|
-
for (const key in styles2) {
|
|
6551
|
-
const value = styles2[key];
|
|
6552
|
-
if (typeof value === "object" && value !== null) {
|
|
6553
|
-
nestedRules.push(this._processNestedRule(selector, key, value));
|
|
6554
|
-
} else {
|
|
6555
|
-
directProps.push(`${toKebabCase(key)}:${value};`);
|
|
6556
|
-
}
|
|
6557
|
-
}
|
|
6558
|
-
let finalCss = "";
|
|
6559
|
-
if (directProps.length > 0) {
|
|
6560
|
-
finalCss += `${selector} {${directProps.join("")}}`;
|
|
6561
|
-
}
|
|
6562
|
-
finalCss += nestedRules.join("");
|
|
6563
|
-
return finalCss;
|
|
6564
|
-
}
|
|
6565
|
-
_processNestedRule(parentSelector, nestedKey, nestedStyles) {
|
|
6566
|
-
if (nestedKey.startsWith("@")) {
|
|
6567
|
-
return `${nestedKey}{${this._generateCss(parentSelector, nestedStyles)}}`;
|
|
6568
|
-
}
|
|
6569
|
-
const newSelector = nestedKey.replace(/&/g, parentSelector);
|
|
6570
|
-
return this._generateCss(newSelector, nestedStyles);
|
|
6571
|
-
}
|
|
6572
|
-
getSsrStyles() {
|
|
6573
|
-
const allCss = Array.from(this.cache.values()).map((entry) => entry.css).join("");
|
|
6574
|
-
return `@layer dynamic {${allCss}}`;
|
|
6575
|
-
}
|
|
6576
|
-
/**
|
|
6577
|
-
* Adds a class name to be applied to the <html> tag.
|
|
6578
|
-
*/
|
|
6579
|
-
addRootClasses(classNames) {
|
|
6580
|
-
classNames.forEach((className) => {
|
|
6581
|
-
this.rootClasses.add(className);
|
|
6582
|
-
});
|
|
6583
|
-
}
|
|
6584
|
-
/**
|
|
6585
|
-
* Returns a space-separated string of all collected html classes.
|
|
6586
|
-
*/
|
|
6587
|
-
getRootClasses() {
|
|
6588
|
-
return Array.from(this.rootClasses).join(" ");
|
|
6589
|
-
}
|
|
6590
|
-
// NEW: A helper to safely get the current reference count.
|
|
6591
|
-
getRefCount(styleHash) {
|
|
6592
|
-
return this.refCounts.get(styleHash) || 0;
|
|
6593
|
-
}
|
|
6594
|
-
/**
|
|
6595
|
-
* Increments the reference count for a given style hash.
|
|
6596
|
-
*/
|
|
6597
|
-
incrementRef(styleHash) {
|
|
6598
|
-
const newCount = (this.refCounts.get(styleHash) || 0) + 1;
|
|
6599
|
-
this.refCounts.set(styleHash, newCount);
|
|
6600
|
-
}
|
|
6601
|
-
/**
|
|
6602
|
-
* Decrements the reference count for a given style hash.
|
|
6603
|
-
* @returns {number} The new reference count.
|
|
6604
|
-
*/
|
|
6605
|
-
decrementRef(styleHash) {
|
|
6606
|
-
const currentCount = this.refCounts.get(styleHash) || 0;
|
|
6607
|
-
const newCount = Math.max(0, currentCount - 1);
|
|
6608
|
-
if (newCount > 0) {
|
|
6609
|
-
this.refCounts.set(styleHash, newCount);
|
|
6610
|
-
} else {
|
|
6611
|
-
this.refCounts.delete(styleHash);
|
|
6612
|
-
}
|
|
6613
|
-
return newCount;
|
|
6614
|
-
}
|
|
6615
|
-
}
|
|
6616
|
-
const IndexerContext = React__default.createContext({
|
|
6617
|
-
indexing: false
|
|
6618
|
-
});
|
|
6619
|
-
function useIndexerContext() {
|
|
6620
|
-
return useContext(IndexerContext);
|
|
6621
|
-
}
|
|
6622
|
-
const StyleContext = createContext(null);
|
|
6623
|
-
function StyleProvider({
|
|
6624
|
-
children,
|
|
6625
|
-
styleRegistry = new StyleRegistry(),
|
|
6626
|
-
forceNew = false
|
|
6627
|
-
// Optional prop to force a new registry
|
|
6628
|
-
}) {
|
|
6629
|
-
const parentRegistry = useContext(StyleContext);
|
|
6630
|
-
const [registry] = useState(() => {
|
|
6631
|
-
const newRegistry = styleRegistry;
|
|
6632
|
-
if (typeof window !== "undefined") {
|
|
6633
|
-
const ssrTag = document.querySelector('style[data-style-registry="true"]');
|
|
6634
|
-
const ssrHashes = ssrTag == null ? void 0 : ssrTag.getAttribute("data-ssr-hashes");
|
|
6635
|
-
if (ssrHashes) {
|
|
6636
|
-
let hashes = ssrHashes.split(",");
|
|
6637
|
-
newRegistry.ssrHashes = new Set(hashes);
|
|
6638
|
-
newRegistry.injected = new Set(hashes);
|
|
6639
|
-
}
|
|
6640
|
-
}
|
|
6641
|
-
return newRegistry;
|
|
6642
|
-
});
|
|
6643
|
-
if (parentRegistry && !forceNew) {
|
|
6644
|
-
return /* @__PURE__ */ jsx(Fragment, { children });
|
|
6645
|
-
}
|
|
6646
|
-
return /* @__PURE__ */ jsx(StyleContext.Provider, { value: registry, children });
|
|
6647
|
-
}
|
|
6648
|
-
function useStyleRegistry() {
|
|
6649
|
-
const registry = useContext(StyleContext);
|
|
6650
|
-
if (registry === null) {
|
|
6651
|
-
throw new Error("Component must be used within a StyleProvider");
|
|
6652
|
-
}
|
|
6653
|
-
return registry;
|
|
6654
|
-
}
|
|
6655
|
-
function useComponentStyle(styles2) {
|
|
6656
|
-
const rootStyle = useMemo(() => {
|
|
6657
|
-
return !styles2 || Object.keys(styles2).length === 0 ? EMPTY_OBJECT : {
|
|
6658
|
-
"&": styles2
|
|
6659
|
-
// "@container style(--screenSize: 1) or @container style(--screenSize: 2) ... etc": responsiveSizes,
|
|
6660
|
-
};
|
|
6661
|
-
}, [styles2]);
|
|
6662
|
-
return useStyles(rootStyle);
|
|
6663
|
-
}
|
|
6664
|
-
const StyleInjectionTargetContext = createContext(null);
|
|
6665
|
-
function useDomRoot() {
|
|
6666
|
-
const domRoot = useContext(StyleInjectionTargetContext);
|
|
6667
|
-
return domRoot;
|
|
6668
|
-
}
|
|
6669
|
-
function useStyles(styles2, { prepend } = EMPTY_OBJECT) {
|
|
6670
|
-
const { indexing } = useIndexerContext();
|
|
6671
|
-
const domRoot = useDomRoot();
|
|
6672
|
-
const injectionTarget = typeof document === "undefined" ? null : domRoot instanceof ShadowRoot ? domRoot : document.head;
|
|
6673
|
-
const registry = useStyleRegistry();
|
|
6674
|
-
const { className, styleHash } = useMemo(() => {
|
|
6675
|
-
if (indexing || !styles2 || styles2 === EMPTY_OBJECT || Object.keys(styles2).length === 0) {
|
|
6676
|
-
return { className: void 0, styleHash: void 0 };
|
|
6677
|
-
}
|
|
6678
|
-
return registry.register(styles2);
|
|
6679
|
-
}, [indexing, registry, styles2]);
|
|
6680
|
-
useInsertionEffect(() => {
|
|
6681
|
-
if (!styleHash || registry.injected.has(styleHash)) {
|
|
6682
|
-
return;
|
|
6683
|
-
}
|
|
6684
|
-
const { css } = registry.cache.get(styleHash) || {};
|
|
6685
|
-
if (css) {
|
|
6686
|
-
const styleElement = document.createElement("style");
|
|
6687
|
-
styleElement.setAttribute("data-style-hash", styleHash);
|
|
6688
|
-
styleElement.innerHTML = `@layer dynamic {
|
|
6689
|
-
${css}
|
|
6690
|
-
}`;
|
|
6691
|
-
if (prepend) {
|
|
6692
|
-
injectionTarget.insertBefore(styleElement, injectionTarget.firstChild.nextSibling);
|
|
6693
|
-
} else {
|
|
6694
|
-
injectionTarget.appendChild(styleElement);
|
|
6695
|
-
}
|
|
6696
|
-
registry.injected.add(styleHash);
|
|
6697
|
-
}
|
|
6698
|
-
}, [registry, styleHash, injectionTarget]);
|
|
6699
|
-
useEffect(() => {
|
|
6700
|
-
if (!styleHash) {
|
|
6701
|
-
return;
|
|
6702
|
-
}
|
|
6703
|
-
registry.incrementRef(styleHash);
|
|
6704
|
-
return () => {
|
|
6705
|
-
registry.decrementRef(styleHash);
|
|
6706
|
-
setTimeout(() => {
|
|
6707
|
-
var _a2;
|
|
6708
|
-
if (registry.getRefCount(styleHash) === 0 && !registry.ssrHashes.has(styleHash)) {
|
|
6709
|
-
registry.injected.delete(styleHash);
|
|
6710
|
-
(_a2 = injectionTarget.querySelector(`style[data-style-hash="${styleHash}"]`)) == null ? void 0 : _a2.remove();
|
|
6711
|
-
}
|
|
6712
|
-
}, 0);
|
|
6713
|
-
};
|
|
6714
|
-
}, [injectionTarget, registry, styleHash]);
|
|
6715
|
-
return className;
|
|
6716
|
-
}
|
|
6717
6776
|
function useCompiledTheme(activeTheme, activeTone, themes = EMPTY_ARRAY, resources = EMPTY_OBJECT, resourceMap = EMPTY_OBJECT) {
|
|
6718
6777
|
const componentRegistry = useComponentRegistry();
|
|
6719
6778
|
const { componentThemeVars, componentDefaultThemeVars } = componentRegistry;
|
|
@@ -8391,6 +8450,7 @@ function App({
|
|
|
8391
8450
|
name,
|
|
8392
8451
|
className,
|
|
8393
8452
|
applyDefaultContentPadding,
|
|
8453
|
+
registerComponentApi,
|
|
8394
8454
|
...rest
|
|
8395
8455
|
}) {
|
|
8396
8456
|
const { getThemeVar } = useTheme();
|
|
@@ -8858,7 +8918,7 @@ const AppMd = createMetadata({
|
|
|
8858
8918
|
}
|
|
8859
8919
|
}
|
|
8860
8920
|
});
|
|
8861
|
-
function AppNode({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler }) {
|
|
8921
|
+
function AppNode({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler, registerComponentApi }) {
|
|
8862
8922
|
const processedNavRef = useRef(false);
|
|
8863
8923
|
const layoutType = useMemo(
|
|
8864
8924
|
() => extractValue(node.props.layout),
|
|
@@ -9074,6 +9134,7 @@ function AppNode({ node, extractValue, renderChild: renderChild2, className, loo
|
|
|
9074
9134
|
navPanelDef: NavPanel3,
|
|
9075
9135
|
logoContentDef: node.props.logoTemplate,
|
|
9076
9136
|
renderChild: renderChild2,
|
|
9137
|
+
registerComponentApi,
|
|
9077
9138
|
children: [
|
|
9078
9139
|
renderedContent,
|
|
9079
9140
|
/* @__PURE__ */ jsx(SearchIndexCollector, { Pages: Pages2, renderChild: renderChild2 })
|
|
@@ -9205,7 +9266,7 @@ function PageIndexer({
|
|
|
9205
9266
|
const appRenderer = createComponentRenderer(
|
|
9206
9267
|
COMP$1t,
|
|
9207
9268
|
AppMd,
|
|
9208
|
-
({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler }) => {
|
|
9269
|
+
({ node, extractValue, renderChild: renderChild2, className, lookupEventHandler, registerComponentApi }) => {
|
|
9209
9270
|
return /* @__PURE__ */ jsx(
|
|
9210
9271
|
AppNode,
|
|
9211
9272
|
{
|
|
@@ -9213,7 +9274,8 @@ const appRenderer = createComponentRenderer(
|
|
|
9213
9274
|
renderChild: renderChild2,
|
|
9214
9275
|
extractValue,
|
|
9215
9276
|
className,
|
|
9216
|
-
lookupEventHandler
|
|
9277
|
+
lookupEventHandler,
|
|
9278
|
+
registerComponentApi
|
|
9217
9279
|
}
|
|
9218
9280
|
);
|
|
9219
9281
|
}
|
|
@@ -14224,7 +14286,6 @@ const Form = forwardRef(function({
|
|
|
14224
14286
|
...rest
|
|
14225
14287
|
}, ref) {
|
|
14226
14288
|
const formRef = useRef(null);
|
|
14227
|
-
useImperativeHandle(ref, () => formRef.current);
|
|
14228
14289
|
const [confirmSubmitModalVisible, setConfirmSubmitModalVisible] = useState(false);
|
|
14229
14290
|
const requestModalFormClose = useModalFormClose();
|
|
14230
14291
|
const isEnabled2 = enabled2 && !formState.submitInProgress;
|
|
@@ -25549,7 +25610,7 @@ function hierarchyToNative(hierarchyData, fieldConfig) {
|
|
|
25549
25610
|
treeItemsById
|
|
25550
25611
|
};
|
|
25551
25612
|
}
|
|
25552
|
-
const TreeRow = memo(({ index,
|
|
25613
|
+
const TreeRow = memo(({ index, data }) => {
|
|
25553
25614
|
const {
|
|
25554
25615
|
nodes,
|
|
25555
25616
|
toggleNode,
|
|
@@ -25606,7 +25667,7 @@ const TreeRow = memo(({ index, style: style2, data }) => {
|
|
|
25606
25667
|
);
|
|
25607
25668
|
const nodeWithState = treeItem;
|
|
25608
25669
|
const isLoading = nodeWithState.loadingState === "loading";
|
|
25609
|
-
return /* @__PURE__ */ jsx("div", { style: {
|
|
25670
|
+
return /* @__PURE__ */ jsx("div", { style: { width: "100%", display: "flex" }, children: /* @__PURE__ */ jsxs(
|
|
25610
25671
|
"div",
|
|
25611
25672
|
{
|
|
25612
25673
|
className: classnames(styles$D.rowWrapper, {
|
|
@@ -25734,7 +25795,6 @@ const TreeComponent = memo((props) => {
|
|
|
25734
25795
|
iconCollapsed = defaultProps$E.iconCollapsed,
|
|
25735
25796
|
iconExpanded = defaultProps$E.iconExpanded,
|
|
25736
25797
|
iconSize = defaultProps$E.iconSize,
|
|
25737
|
-
itemHeight = defaultProps$E.itemHeight,
|
|
25738
25798
|
animateExpand = defaultProps$E.animateExpand,
|
|
25739
25799
|
expandRotation = defaultProps$E.expandRotation,
|
|
25740
25800
|
onItemClick,
|
|
@@ -26197,10 +26257,6 @@ const TreeComponent = memo((props) => {
|
|
|
26197
26257
|
animateExpand,
|
|
26198
26258
|
expandRotation
|
|
26199
26259
|
]);
|
|
26200
|
-
const getItemKey = useCallback((index, data2) => {
|
|
26201
|
-
const node = data2.nodes[index];
|
|
26202
|
-
return (node == null ? void 0 : node.key) || (node == null ? void 0 : node.id) || `fallback-${index}`;
|
|
26203
|
-
}, []);
|
|
26204
26260
|
const treeApiMethods = useMemo(() => {
|
|
26205
26261
|
return {
|
|
26206
26262
|
// Expansion methods
|
|
@@ -26376,14 +26432,14 @@ const TreeComponent = memo((props) => {
|
|
|
26376
26432
|
(item2) => String(item2.key) === String(nodeId)
|
|
26377
26433
|
);
|
|
26378
26434
|
if (nodeIndex >= 0 && listRef.current) {
|
|
26379
|
-
listRef.current.
|
|
26435
|
+
listRef.current.scrollToIndex(nodeIndex, { align: "center" });
|
|
26380
26436
|
}
|
|
26381
26437
|
}, 0);
|
|
26382
26438
|
},
|
|
26383
26439
|
scrollToItem: (nodeId) => {
|
|
26384
26440
|
const nodeIndex = findNodeIndexById(nodeId);
|
|
26385
26441
|
if (nodeIndex >= 0 && listRef.current) {
|
|
26386
|
-
listRef.current.
|
|
26442
|
+
listRef.current.scrollToIndex(nodeIndex, { align: "center" });
|
|
26387
26443
|
}
|
|
26388
26444
|
},
|
|
26389
26445
|
appendNode: (parentNodeId, nodeData) => {
|
|
@@ -26700,19 +26756,8 @@ const TreeComponent = memo((props) => {
|
|
|
26700
26756
|
onFocus: handleTreeFocus,
|
|
26701
26757
|
onBlur: handleTreeBlur,
|
|
26702
26758
|
onKeyDown: handleKeyDown,
|
|
26703
|
-
|
|
26704
|
-
|
|
26705
|
-
{
|
|
26706
|
-
ref: listRef,
|
|
26707
|
-
height,
|
|
26708
|
-
itemCount: itemData.nodes.length,
|
|
26709
|
-
itemData,
|
|
26710
|
-
itemSize: itemHeight,
|
|
26711
|
-
itemKey: getItemKey,
|
|
26712
|
-
width,
|
|
26713
|
-
children: TreeRow
|
|
26714
|
-
}
|
|
26715
|
-
) })
|
|
26759
|
+
style: { height: "100%", overflow: "auto" },
|
|
26760
|
+
children: /* @__PURE__ */ jsx(Virtualizer, { ref: listRef, children: flatTreeData.map((node, index) => /* @__PURE__ */ jsx(TreeRow, { index, data: itemData }, node.key)) })
|
|
26716
26761
|
}
|
|
26717
26762
|
);
|
|
26718
26763
|
});
|
|
@@ -27507,7 +27552,7 @@ const TextMd = createMetadata({
|
|
|
27507
27552
|
`The text to be displayed. This value can also be set via nesting the text into the \`${COMP$14}\` component.`
|
|
27508
27553
|
),
|
|
27509
27554
|
variant: {
|
|
27510
|
-
description: "An optional string value that provides named presets for text variants with a unique combination of font style, weight, size, color, and other parameters. If not defined, the text uses the current style of its context.",
|
|
27555
|
+
description: "An optional string value that provides named presets for text variants with a unique combination of font style, weight, size, color, and other parameters. If not defined, the text uses the current style of its context. In addition to predefined variants, you can specify custom variant names and style them using theme variables with the pattern `{cssProperty}-Text-{variantName}` (e.g., `textColor-Text-brandTitle`, `fontSize-Text-highlight`). See the documentation for a complete list of supported CSS properties.",
|
|
27511
27556
|
availableValues: variantOptionsMd
|
|
27512
27557
|
},
|
|
27513
27558
|
maxLines: d(
|
|
@@ -27700,7 +27745,7 @@ const headerRow = "_headerRow_1ylgd_97";
|
|
|
27700
27745
|
const columnCell = "_columnCell_1ylgd_101";
|
|
27701
27746
|
const cell = "_cell_1ylgd_102";
|
|
27702
27747
|
const alignTop = "_alignTop_1ylgd_110";
|
|
27703
|
-
const alignCenter = "_alignCenter_1ylgd_114";
|
|
27748
|
+
const alignCenter$1 = "_alignCenter_1ylgd_114";
|
|
27704
27749
|
const alignBottom = "_alignBottom_1ylgd_118";
|
|
27705
27750
|
const table = "_table_1ylgd_46";
|
|
27706
27751
|
const row$1 = "_row_1ylgd_126";
|
|
@@ -27729,7 +27774,7 @@ const styles$C = {
|
|
|
27729
27774
|
columnCell,
|
|
27730
27775
|
cell,
|
|
27731
27776
|
alignTop,
|
|
27732
|
-
alignCenter,
|
|
27777
|
+
alignCenter: alignCenter$1,
|
|
27733
27778
|
alignBottom,
|
|
27734
27779
|
table,
|
|
27735
27780
|
row: row$1,
|
|
@@ -29984,7 +30029,6 @@ const IFrame = memo(forwardRef(function IFrame2({
|
|
|
29984
30029
|
...rest
|
|
29985
30030
|
}, ref) {
|
|
29986
30031
|
const iframeRef = useRef(null);
|
|
29987
|
-
useImperativeHandle(ref, () => iframeRef.current, []);
|
|
29988
30032
|
useEffect(() => {
|
|
29989
30033
|
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
29990
30034
|
postMessage: (message, targetOrigin = "*") => {
|
|
@@ -34378,6 +34422,305 @@ async function delay(_executionContext, timeoutInMs, callback) {
|
|
|
34378
34422
|
await (callback == null ? void 0 : callback());
|
|
34379
34423
|
}
|
|
34380
34424
|
const timedAction = createAction("delay", delay);
|
|
34425
|
+
const AnimatedComponent = animated(
|
|
34426
|
+
forwardRef(function InlineComponentDef(props, ref) {
|
|
34427
|
+
const { children, ...rest } = props;
|
|
34428
|
+
if (!React__default.isValidElement(children)) {
|
|
34429
|
+
return children;
|
|
34430
|
+
}
|
|
34431
|
+
return React__default.cloneElement(children, { ...rest, ref });
|
|
34432
|
+
})
|
|
34433
|
+
);
|
|
34434
|
+
const defaultProps$p = {
|
|
34435
|
+
delay: 0,
|
|
34436
|
+
animateWhenInView: false,
|
|
34437
|
+
reverse: false,
|
|
34438
|
+
loop: false,
|
|
34439
|
+
once: false
|
|
34440
|
+
};
|
|
34441
|
+
const parseAnimation = (animation) => {
|
|
34442
|
+
if (typeof animation === "object") {
|
|
34443
|
+
return animation;
|
|
34444
|
+
}
|
|
34445
|
+
const presetAnimations = {
|
|
34446
|
+
fadein: {
|
|
34447
|
+
from: { opacity: 0 },
|
|
34448
|
+
to: { opacity: 1 }
|
|
34449
|
+
},
|
|
34450
|
+
fadeout: {
|
|
34451
|
+
from: { opacity: 1 },
|
|
34452
|
+
to: { opacity: 0 }
|
|
34453
|
+
},
|
|
34454
|
+
slidein: {
|
|
34455
|
+
from: { transform: "translateX(-100%)" },
|
|
34456
|
+
to: { transform: "translateX(0%)" }
|
|
34457
|
+
},
|
|
34458
|
+
slideout: {
|
|
34459
|
+
from: { transform: "translateX(0%)" },
|
|
34460
|
+
to: { transform: "translateX(100%)" }
|
|
34461
|
+
},
|
|
34462
|
+
popin: {
|
|
34463
|
+
from: { transform: "scale(0.8)", opacity: 0 },
|
|
34464
|
+
to: { transform: "scale(1)", opacity: 1 }
|
|
34465
|
+
},
|
|
34466
|
+
popout: {
|
|
34467
|
+
from: { transform: "scale(1)", opacity: 1 },
|
|
34468
|
+
to: { transform: "scale(0.8)", opacity: 0 }
|
|
34469
|
+
},
|
|
34470
|
+
flipin: {
|
|
34471
|
+
from: { transform: "rotateY(90deg)", opacity: 0 },
|
|
34472
|
+
to: { transform: "rotateY(0deg)", opacity: 1 }
|
|
34473
|
+
},
|
|
34474
|
+
flipout: {
|
|
34475
|
+
from: { transform: "rotateY(0deg)", opacity: 1 },
|
|
34476
|
+
to: { transform: "rotateY(90deg)", opacity: 0 }
|
|
34477
|
+
},
|
|
34478
|
+
rotatein: {
|
|
34479
|
+
from: { transform: "rotate(-180deg)", opacity: 0 },
|
|
34480
|
+
to: { transform: "rotate(0deg)", opacity: 1 }
|
|
34481
|
+
},
|
|
34482
|
+
rotateout: {
|
|
34483
|
+
from: { transform: "rotate(0deg)", opacity: 1 },
|
|
34484
|
+
to: { transform: "rotate(180deg)", opacity: 0 }
|
|
34485
|
+
},
|
|
34486
|
+
zoomin: {
|
|
34487
|
+
from: { transform: "scale(0)", opacity: 0 },
|
|
34488
|
+
to: { transform: "scale(1)", opacity: 1 }
|
|
34489
|
+
},
|
|
34490
|
+
zoomout: {
|
|
34491
|
+
from: { transform: "scale(1)", opacity: 1 },
|
|
34492
|
+
to: { transform: "scale(0)", opacity: 0 }
|
|
34493
|
+
}
|
|
34494
|
+
};
|
|
34495
|
+
return presetAnimations[animation] || { from: {}, to: {} };
|
|
34496
|
+
};
|
|
34497
|
+
function parseAnimationOptionValue(name, value) {
|
|
34498
|
+
switch (name) {
|
|
34499
|
+
case "duration":
|
|
34500
|
+
case "delay":
|
|
34501
|
+
const num = parseInt(value, 10);
|
|
34502
|
+
return isNaN(num) ? void 0 : num;
|
|
34503
|
+
case "animateWhenInView":
|
|
34504
|
+
case "reverse":
|
|
34505
|
+
case "loop":
|
|
34506
|
+
case "once":
|
|
34507
|
+
const lowerVal = value.toLowerCase();
|
|
34508
|
+
if (lowerVal === "true" || lowerVal === "1" || lowerVal === "yes") return true;
|
|
34509
|
+
if (lowerVal === "false" || lowerVal === "0" || lowerVal === "no") return false;
|
|
34510
|
+
return void 0;
|
|
34511
|
+
default:
|
|
34512
|
+
return void 0;
|
|
34513
|
+
}
|
|
34514
|
+
}
|
|
34515
|
+
function parseAnimationOptions(input2) {
|
|
34516
|
+
if (isPlainObject(input2)) {
|
|
34517
|
+
return input2;
|
|
34518
|
+
}
|
|
34519
|
+
if (typeof input2 === "string") {
|
|
34520
|
+
const options2 = {};
|
|
34521
|
+
const values = input2.split(";").map((value) => value.trim()).filter((value) => value.length > 0);
|
|
34522
|
+
for (const value of values) {
|
|
34523
|
+
if (value.includes(":")) {
|
|
34524
|
+
const [name, val] = value.split(":").map((part) => part.trim());
|
|
34525
|
+
if (name && val) {
|
|
34526
|
+
const parsedValue = parseAnimationOptionValue(name, val);
|
|
34527
|
+
if (parsedValue !== void 0) {
|
|
34528
|
+
options2[name] = parsedValue;
|
|
34529
|
+
}
|
|
34530
|
+
}
|
|
34531
|
+
} else {
|
|
34532
|
+
const booleanOptions = ["animateWhenInView", "reverse", "loop", "once"];
|
|
34533
|
+
if (booleanOptions.includes(value)) {
|
|
34534
|
+
options2[value] = true;
|
|
34535
|
+
} else if (value.startsWith("!") && value.length > 1) {
|
|
34536
|
+
const optionName = value.substring(1);
|
|
34537
|
+
if (booleanOptions.includes(optionName)) {
|
|
34538
|
+
options2[optionName] = false;
|
|
34539
|
+
}
|
|
34540
|
+
}
|
|
34541
|
+
}
|
|
34542
|
+
}
|
|
34543
|
+
return options2;
|
|
34544
|
+
}
|
|
34545
|
+
return {};
|
|
34546
|
+
}
|
|
34547
|
+
const Animation$1 = forwardRef(function Animation2({
|
|
34548
|
+
children,
|
|
34549
|
+
registerComponentApi,
|
|
34550
|
+
animation,
|
|
34551
|
+
duration,
|
|
34552
|
+
onStop,
|
|
34553
|
+
onStart,
|
|
34554
|
+
delay: delay2 = defaultProps$p.delay,
|
|
34555
|
+
animateWhenInView = defaultProps$p.animateWhenInView,
|
|
34556
|
+
reverse: reverse2 = defaultProps$p.reverse,
|
|
34557
|
+
loop = defaultProps$p.loop,
|
|
34558
|
+
once = defaultProps$p.once,
|
|
34559
|
+
...rest
|
|
34560
|
+
}, forwardedRef) {
|
|
34561
|
+
const [_animation] = useState(animation);
|
|
34562
|
+
const [toggle, setToggle] = useState(false);
|
|
34563
|
+
const [reset, setReset] = useState(false);
|
|
34564
|
+
const [count, setCount] = useState(0);
|
|
34565
|
+
const times = 1;
|
|
34566
|
+
useId();
|
|
34567
|
+
const animationSettings = useMemo(
|
|
34568
|
+
() => ({
|
|
34569
|
+
from: _animation.from,
|
|
34570
|
+
to: _animation.to,
|
|
34571
|
+
config: {
|
|
34572
|
+
..._animation.config,
|
|
34573
|
+
duration
|
|
34574
|
+
},
|
|
34575
|
+
delay: delay2,
|
|
34576
|
+
loop,
|
|
34577
|
+
reset,
|
|
34578
|
+
reverse: toggle,
|
|
34579
|
+
onRest: () => {
|
|
34580
|
+
onStop == null ? void 0 : onStop();
|
|
34581
|
+
if (loop) {
|
|
34582
|
+
if (reverse2) {
|
|
34583
|
+
setCount(count + 1);
|
|
34584
|
+
setToggle(!toggle);
|
|
34585
|
+
}
|
|
34586
|
+
setReset(true);
|
|
34587
|
+
} else {
|
|
34588
|
+
if (reverse2 && count < times) {
|
|
34589
|
+
setCount(count + 1);
|
|
34590
|
+
setToggle(!toggle);
|
|
34591
|
+
}
|
|
34592
|
+
}
|
|
34593
|
+
},
|
|
34594
|
+
onStart: () => {
|
|
34595
|
+
onStart == null ? void 0 : onStart();
|
|
34596
|
+
}
|
|
34597
|
+
}),
|
|
34598
|
+
[
|
|
34599
|
+
_animation.config,
|
|
34600
|
+
_animation.from,
|
|
34601
|
+
_animation.to,
|
|
34602
|
+
count,
|
|
34603
|
+
delay2,
|
|
34604
|
+
duration,
|
|
34605
|
+
loop,
|
|
34606
|
+
onStart,
|
|
34607
|
+
onStop,
|
|
34608
|
+
reset,
|
|
34609
|
+
once,
|
|
34610
|
+
reverse2,
|
|
34611
|
+
toggle
|
|
34612
|
+
]
|
|
34613
|
+
);
|
|
34614
|
+
const [springs, api] = useSpring(
|
|
34615
|
+
() => ({
|
|
34616
|
+
...animationSettings
|
|
34617
|
+
}),
|
|
34618
|
+
[animationSettings]
|
|
34619
|
+
);
|
|
34620
|
+
const [ref, animationStyles] = useInView(() => animationSettings, {
|
|
34621
|
+
once
|
|
34622
|
+
});
|
|
34623
|
+
const composedRef = ref ? composeRefs(ref, forwardedRef) : forwardedRef;
|
|
34624
|
+
const startAnimation = useCallback(() => {
|
|
34625
|
+
void api.start(_animation);
|
|
34626
|
+
return () => {
|
|
34627
|
+
api.stop();
|
|
34628
|
+
};
|
|
34629
|
+
}, [_animation, api]);
|
|
34630
|
+
const stopAnimation = useCallback(() => {
|
|
34631
|
+
api.stop();
|
|
34632
|
+
}, [api]);
|
|
34633
|
+
useEffect(() => {
|
|
34634
|
+
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
34635
|
+
start: startAnimation,
|
|
34636
|
+
stop: stopAnimation
|
|
34637
|
+
});
|
|
34638
|
+
}, [registerComponentApi, startAnimation, stopAnimation]);
|
|
34639
|
+
const content2 = useMemo(() => {
|
|
34640
|
+
return Children.map(
|
|
34641
|
+
children,
|
|
34642
|
+
(child, index) => animateWhenInView ? /* @__PURE__ */ jsx(AnimatedComponent, { ...rest, style: animationStyles, ref: composedRef, children: child }, index) : /* @__PURE__ */ jsx(AnimatedComponent, { ...rest, style: springs, ref: forwardedRef, children: child }, index)
|
|
34643
|
+
);
|
|
34644
|
+
}, [animateWhenInView, animationStyles, children, springs, rest, composedRef, forwardedRef]);
|
|
34645
|
+
return content2;
|
|
34646
|
+
});
|
|
34647
|
+
const tooltipBehavior = {
|
|
34648
|
+
name: "tooltip",
|
|
34649
|
+
canAttach: (node) => {
|
|
34650
|
+
var _a2, _b;
|
|
34651
|
+
const tooltipText = (_a2 = node.props) == null ? void 0 : _a2.tooltip;
|
|
34652
|
+
const tooltipMarkdown = (_b = node.props) == null ? void 0 : _b.tooltipMarkdown;
|
|
34653
|
+
return !!tooltipText || !!tooltipMarkdown;
|
|
34654
|
+
},
|
|
34655
|
+
attach: (context, node) => {
|
|
34656
|
+
var _a2, _b, _c;
|
|
34657
|
+
const { extractValue } = context;
|
|
34658
|
+
const tooltipText = extractValue((_a2 = context.node.props) == null ? void 0 : _a2.tooltip, true);
|
|
34659
|
+
const tooltipMarkdown = extractValue((_b = context.node.props) == null ? void 0 : _b.tooltipMarkdown, true);
|
|
34660
|
+
const tooltipOptions = extractValue((_c = context.node.props) == null ? void 0 : _c.tooltipOptions, true);
|
|
34661
|
+
const parsedOptions = parseTooltipOptions(tooltipOptions);
|
|
34662
|
+
return /* @__PURE__ */ jsx(Tooltip, { text: tooltipText, markdown: tooltipMarkdown, ...parsedOptions, children: node });
|
|
34663
|
+
}
|
|
34664
|
+
};
|
|
34665
|
+
const animationBehavior = {
|
|
34666
|
+
name: "animation",
|
|
34667
|
+
canAttach: (node) => {
|
|
34668
|
+
var _a2;
|
|
34669
|
+
return !!((_a2 = node.props) == null ? void 0 : _a2.animation);
|
|
34670
|
+
},
|
|
34671
|
+
attach: (context, node) => {
|
|
34672
|
+
var _a2, _b;
|
|
34673
|
+
const { extractValue } = context;
|
|
34674
|
+
const animation = extractValue((_a2 = context.node.props) == null ? void 0 : _a2.animation, true);
|
|
34675
|
+
const animationOptions = extractValue((_b = context.node.props) == null ? void 0 : _b.animationOptions, true);
|
|
34676
|
+
const parsedOptions = parseAnimationOptions(animationOptions);
|
|
34677
|
+
return /* @__PURE__ */ jsx(Animation$1, { animation: parseAnimation(animation), ...parsedOptions, children: context.node.type === "ModalDialog" ? cloneElement(node, {
|
|
34678
|
+
externalAnimation: true
|
|
34679
|
+
}) : node });
|
|
34680
|
+
}
|
|
34681
|
+
};
|
|
34682
|
+
const labelBehavior = {
|
|
34683
|
+
name: "label",
|
|
34684
|
+
canAttach: (node, metadata) => {
|
|
34685
|
+
var _a2, _b;
|
|
34686
|
+
if ((_a2 = metadata == null ? void 0 : metadata.props) == null ? void 0 : _a2.label) {
|
|
34687
|
+
return false;
|
|
34688
|
+
} else if (!((_b = node.props) == null ? void 0 : _b.label)) {
|
|
34689
|
+
return false;
|
|
34690
|
+
}
|
|
34691
|
+
return true;
|
|
34692
|
+
},
|
|
34693
|
+
attach: (context, node) => {
|
|
34694
|
+
var _a2;
|
|
34695
|
+
const { extractValue, node: componentNode, className } = context;
|
|
34696
|
+
const label2 = extractValue.asOptionalString(componentNode.props.label);
|
|
34697
|
+
const labelPosition = extractValue(componentNode.props.labelPosition);
|
|
34698
|
+
const labelWidth = extractValue.asOptionalString(componentNode.props.labelWidth);
|
|
34699
|
+
const labelBreak2 = extractValue.asOptionalBoolean(componentNode.props.labelBreak);
|
|
34700
|
+
const required2 = extractValue.asOptionalBoolean(componentNode.props.required);
|
|
34701
|
+
const enabled2 = extractValue.asOptionalBoolean(componentNode.props.enabled, true);
|
|
34702
|
+
const shrinkToLabel2 = extractValue.asOptionalBoolean(componentNode.props.shrinkToLabel);
|
|
34703
|
+
const style2 = extractValue(componentNode.props.style);
|
|
34704
|
+
const readOnly2 = extractValue.asOptionalBoolean(componentNode.props.readOnly);
|
|
34705
|
+
return /* @__PURE__ */ jsx(
|
|
34706
|
+
ItemWithLabel,
|
|
34707
|
+
{
|
|
34708
|
+
labelPosition,
|
|
34709
|
+
label: label2,
|
|
34710
|
+
labelWidth,
|
|
34711
|
+
labelBreak: labelBreak2,
|
|
34712
|
+
required: required2,
|
|
34713
|
+
enabled: enabled2,
|
|
34714
|
+
style: style2,
|
|
34715
|
+
className,
|
|
34716
|
+
shrinkToLabel: shrinkToLabel2,
|
|
34717
|
+
labelStyle: { pointerEvents: readOnly2 ? "none" : void 0 },
|
|
34718
|
+
isInputTemplateUsed: !!((_a2 = componentNode.props) == null ? void 0 : _a2.inputTemplate),
|
|
34719
|
+
children: node
|
|
34720
|
+
}
|
|
34721
|
+
);
|
|
34722
|
+
}
|
|
34723
|
+
};
|
|
34381
34724
|
const ApiInterceptorContext = createContext(null);
|
|
34382
34725
|
function useApiInterceptorContext() {
|
|
34383
34726
|
return useContext(ApiInterceptorContext);
|
|
@@ -35524,7 +35867,7 @@ var WeekDays = /* @__PURE__ */ ((WeekDays2) => {
|
|
|
35524
35867
|
WeekDays2[WeekDays2["Saturday"] = 6] = "Saturday";
|
|
35525
35868
|
return WeekDays2;
|
|
35526
35869
|
})(WeekDays || {});
|
|
35527
|
-
const defaultProps$
|
|
35870
|
+
const defaultProps$o = {
|
|
35528
35871
|
enabled: true,
|
|
35529
35872
|
validationStatus: "none",
|
|
35530
35873
|
mode: "single",
|
|
@@ -35543,7 +35886,7 @@ const DateInput = forwardRef(function DateInputNative({
|
|
|
35543
35886
|
id,
|
|
35544
35887
|
initialValue,
|
|
35545
35888
|
value: controlledValue,
|
|
35546
|
-
enabled: enabled2 = defaultProps$
|
|
35889
|
+
enabled: enabled2 = defaultProps$o.enabled,
|
|
35547
35890
|
updateState,
|
|
35548
35891
|
style: style2,
|
|
35549
35892
|
className,
|
|
@@ -35551,28 +35894,28 @@ const DateInput = forwardRef(function DateInputNative({
|
|
|
35551
35894
|
onFocus: onFocus2,
|
|
35552
35895
|
onBlur,
|
|
35553
35896
|
onInvalidChange,
|
|
35554
|
-
validationStatus = defaultProps$
|
|
35897
|
+
validationStatus = defaultProps$o.validationStatus,
|
|
35555
35898
|
registerComponentApi,
|
|
35556
|
-
mode = defaultProps$
|
|
35557
|
-
dateFormat = defaultProps$
|
|
35558
|
-
showWeekNumber = defaultProps$
|
|
35559
|
-
weekStartsOn = defaultProps$
|
|
35899
|
+
mode = defaultProps$o.mode,
|
|
35900
|
+
dateFormat = defaultProps$o.dateFormat,
|
|
35901
|
+
showWeekNumber = defaultProps$o.showWeekNumber,
|
|
35902
|
+
weekStartsOn = defaultProps$o.weekStartsOn,
|
|
35560
35903
|
minValue,
|
|
35561
35904
|
maxValue,
|
|
35562
35905
|
disabledDates,
|
|
35563
|
-
inline = defaultProps$
|
|
35564
|
-
clearable = defaultProps$
|
|
35906
|
+
inline = defaultProps$o.inline,
|
|
35907
|
+
clearable = defaultProps$o.clearable,
|
|
35565
35908
|
clearIcon,
|
|
35566
|
-
clearToInitialValue = defaultProps$
|
|
35567
|
-
required: required2 = defaultProps$
|
|
35909
|
+
clearToInitialValue = defaultProps$o.clearToInitialValue,
|
|
35910
|
+
required: required2 = defaultProps$o.required,
|
|
35568
35911
|
startText,
|
|
35569
35912
|
startIcon,
|
|
35570
35913
|
endText,
|
|
35571
35914
|
endIcon,
|
|
35572
35915
|
gap,
|
|
35573
|
-
readOnly: readOnly2 = defaultProps$
|
|
35574
|
-
autoFocus = defaultProps$
|
|
35575
|
-
emptyCharacter = defaultProps$
|
|
35916
|
+
readOnly: readOnly2 = defaultProps$o.readOnly,
|
|
35917
|
+
autoFocus = defaultProps$o.autoFocus,
|
|
35918
|
+
emptyCharacter = defaultProps$o.emptyCharacter,
|
|
35576
35919
|
...rest
|
|
35577
35920
|
}, ref) {
|
|
35578
35921
|
const dateInputRef = useRef(null);
|
|
@@ -35873,7 +36216,6 @@ const DateInput = forwardRef(function DateInputNative({
|
|
|
35873
36216
|
return null;
|
|
35874
36217
|
}
|
|
35875
36218
|
}, [day2, month2, year2]);
|
|
35876
|
-
useImperativeHandle(ref, () => dateInputRef.current);
|
|
35877
36219
|
useEffect(() => {
|
|
35878
36220
|
if (registerComponentApi) {
|
|
35879
36221
|
registerComponentApi({
|
|
@@ -36330,34 +36672,34 @@ const DateInputMd = createMetadata({
|
|
|
36330
36672
|
initialValue: dInitialValue(),
|
|
36331
36673
|
autoFocus: dAutoFocus(),
|
|
36332
36674
|
readOnly: dReadonly(),
|
|
36333
|
-
enabled: dEnabled(defaultProps$
|
|
36334
|
-
validationStatus: dValidationStatus(defaultProps$
|
|
36675
|
+
enabled: dEnabled(defaultProps$o.enabled),
|
|
36676
|
+
validationStatus: dValidationStatus(defaultProps$o.validationStatus),
|
|
36335
36677
|
mode: {
|
|
36336
36678
|
description: "The mode of the date input (single or range)",
|
|
36337
36679
|
valueType: "string",
|
|
36338
36680
|
availableValues: DateInputModeValues,
|
|
36339
|
-
defaultValue: defaultProps$
|
|
36681
|
+
defaultValue: defaultProps$o.mode
|
|
36340
36682
|
},
|
|
36341
36683
|
dateFormat: {
|
|
36342
36684
|
description: "The format of the date displayed in the input field",
|
|
36343
36685
|
valueType: "string",
|
|
36344
|
-
defaultValue: defaultProps$
|
|
36686
|
+
defaultValue: defaultProps$o.dateFormat,
|
|
36345
36687
|
availableValues: dateFormats
|
|
36346
36688
|
},
|
|
36347
36689
|
emptyCharacter: {
|
|
36348
36690
|
description: "Character used to create placeholder text for empty input fields",
|
|
36349
36691
|
valueType: "string",
|
|
36350
|
-
defaultValue: defaultProps$
|
|
36692
|
+
defaultValue: defaultProps$o.emptyCharacter
|
|
36351
36693
|
},
|
|
36352
36694
|
showWeekNumber: {
|
|
36353
36695
|
description: "Whether to show the week number (compatibility with DatePicker, not used in DateInput)",
|
|
36354
36696
|
valueType: "boolean",
|
|
36355
|
-
defaultValue: defaultProps$
|
|
36697
|
+
defaultValue: defaultProps$o.showWeekNumber
|
|
36356
36698
|
},
|
|
36357
36699
|
weekStartsOn: {
|
|
36358
36700
|
description: "The first day of the week. 0 is Sunday, 1 is Monday, etc. (compatibility with DatePicker, not used in DateInput)",
|
|
36359
36701
|
valueType: "number",
|
|
36360
|
-
defaultValue: defaultProps$
|
|
36702
|
+
defaultValue: defaultProps$o.weekStartsOn,
|
|
36361
36703
|
availableValues: [
|
|
36362
36704
|
{
|
|
36363
36705
|
value: WeekDays.Sunday,
|
|
@@ -36404,12 +36746,12 @@ const DateInputMd = createMetadata({
|
|
|
36404
36746
|
inline: {
|
|
36405
36747
|
description: "Whether to display the date input inline (compatibility with DatePicker, always true for DateInput)",
|
|
36406
36748
|
valueType: "boolean",
|
|
36407
|
-
defaultValue: defaultProps$
|
|
36749
|
+
defaultValue: defaultProps$o.inline
|
|
36408
36750
|
},
|
|
36409
36751
|
clearable: {
|
|
36410
36752
|
description: "Whether to show a clear button to reset the input",
|
|
36411
36753
|
valueType: "boolean",
|
|
36412
|
-
defaultValue: defaultProps$
|
|
36754
|
+
defaultValue: defaultProps$o.clearable
|
|
36413
36755
|
},
|
|
36414
36756
|
clearIcon: {
|
|
36415
36757
|
description: "Icon name for the clear button",
|
|
@@ -36418,7 +36760,7 @@ const DateInputMd = createMetadata({
|
|
|
36418
36760
|
clearToInitialValue: {
|
|
36419
36761
|
description: "Whether clearing resets to initial value or null",
|
|
36420
36762
|
valueType: "boolean",
|
|
36421
|
-
defaultValue: defaultProps$
|
|
36763
|
+
defaultValue: defaultProps$o.clearToInitialValue
|
|
36422
36764
|
},
|
|
36423
36765
|
gap: {
|
|
36424
36766
|
description: "The gap between input elements",
|
|
@@ -36427,7 +36769,7 @@ const DateInputMd = createMetadata({
|
|
|
36427
36769
|
required: {
|
|
36428
36770
|
description: "Whether the input is required",
|
|
36429
36771
|
valueType: "boolean",
|
|
36430
|
-
defaultValue: defaultProps$
|
|
36772
|
+
defaultValue: defaultProps$o.required
|
|
36431
36773
|
},
|
|
36432
36774
|
startText: dStartText(),
|
|
36433
36775
|
startIcon: dStartIcon(),
|
|
@@ -36519,7 +36861,7 @@ const dateInputComponentRenderer = createComponentRenderer(
|
|
|
36519
36861
|
minValue: extractValue.asOptionalString(node.props.minValue),
|
|
36520
36862
|
maxValue: extractValue.asOptionalString(node.props.maxValue),
|
|
36521
36863
|
disabledDates: extractValue(node.props.disabledDates),
|
|
36522
|
-
inline: extractValue.asOptionalBoolean(node.props.inline, defaultProps$
|
|
36864
|
+
inline: extractValue.asOptionalBoolean(node.props.inline, defaultProps$o.inline),
|
|
36523
36865
|
startText: extractValue.asOptionalString(node.props.startText),
|
|
36524
36866
|
startIcon: extractValue.asOptionalString(node.props.startIcon),
|
|
36525
36867
|
endText: extractValue.asOptionalString(node.props.endText),
|
|
@@ -36527,9 +36869,9 @@ const dateInputComponentRenderer = createComponentRenderer(
|
|
|
36527
36869
|
readOnly: extractValue.asOptionalBoolean(node.props.readOnly),
|
|
36528
36870
|
autoFocus: extractValue.asOptionalBoolean(node.props.autoFocus),
|
|
36529
36871
|
required: extractValue.asOptionalBoolean(node.props.required),
|
|
36530
|
-
clearable: extractValue.asOptionalBoolean(node.props.clearable, defaultProps$
|
|
36872
|
+
clearable: extractValue.asOptionalBoolean(node.props.clearable, defaultProps$o.clearable),
|
|
36531
36873
|
clearIcon: extractValue.asOptionalString(node.props.clearIcon),
|
|
36532
|
-
clearToInitialValue: extractValue.asOptionalBoolean(node.props.clearToInitialValue, defaultProps$
|
|
36874
|
+
clearToInitialValue: extractValue.asOptionalBoolean(node.props.clearToInitialValue, defaultProps$o.clearToInitialValue),
|
|
36533
36875
|
gap: extractValue.asOptionalString(node.props.gap),
|
|
36534
36876
|
emptyCharacter: extractValue.asOptionalString(node.props.emptyCharacter)
|
|
36535
36877
|
}
|
|
@@ -36818,7 +37160,7 @@ const PART_MINUTE = "minute";
|
|
|
36818
37160
|
const PART_SECOND = "second";
|
|
36819
37161
|
const PART_AMPM = "ampm";
|
|
36820
37162
|
const PART_CLEAR_BUTTON = "clearButton";
|
|
36821
|
-
const defaultProps$
|
|
37163
|
+
const defaultProps$n = {
|
|
36822
37164
|
enabled: true,
|
|
36823
37165
|
validationStatus: "none",
|
|
36824
37166
|
hour24: true,
|
|
@@ -36834,7 +37176,7 @@ const TimeInputNative = forwardRef(function TimeInputNative2({
|
|
|
36834
37176
|
id,
|
|
36835
37177
|
initialValue,
|
|
36836
37178
|
value: controlledValue,
|
|
36837
|
-
enabled: enabled2 = defaultProps$
|
|
37179
|
+
enabled: enabled2 = defaultProps$n.enabled,
|
|
36838
37180
|
updateState,
|
|
36839
37181
|
style: style2,
|
|
36840
37182
|
className,
|
|
@@ -36842,24 +37184,24 @@ const TimeInputNative = forwardRef(function TimeInputNative2({
|
|
|
36842
37184
|
onFocus,
|
|
36843
37185
|
onBlur,
|
|
36844
37186
|
onInvalidChange,
|
|
36845
|
-
validationStatus = defaultProps$
|
|
37187
|
+
validationStatus = defaultProps$n.validationStatus,
|
|
36846
37188
|
registerComponentApi,
|
|
36847
|
-
hour24 = defaultProps$
|
|
36848
|
-
seconds = defaultProps$
|
|
37189
|
+
hour24 = defaultProps$n.hour24,
|
|
37190
|
+
seconds = defaultProps$n.seconds,
|
|
36849
37191
|
minTime,
|
|
36850
37192
|
maxTime,
|
|
36851
|
-
clearable = defaultProps$
|
|
37193
|
+
clearable = defaultProps$n.clearable,
|
|
36852
37194
|
clearIcon,
|
|
36853
|
-
clearToInitialValue = defaultProps$
|
|
36854
|
-
required: required2 = defaultProps$
|
|
37195
|
+
clearToInitialValue = defaultProps$n.clearToInitialValue,
|
|
37196
|
+
required: required2 = defaultProps$n.required,
|
|
36855
37197
|
startText,
|
|
36856
37198
|
startIcon,
|
|
36857
37199
|
endText,
|
|
36858
37200
|
endIcon,
|
|
36859
37201
|
gap,
|
|
36860
|
-
readOnly: readOnly2 = defaultProps$
|
|
36861
|
-
autoFocus = defaultProps$
|
|
36862
|
-
emptyCharacter = defaultProps$
|
|
37202
|
+
readOnly: readOnly2 = defaultProps$n.readOnly,
|
|
37203
|
+
autoFocus = defaultProps$n.autoFocus,
|
|
37204
|
+
emptyCharacter = defaultProps$n.emptyCharacter,
|
|
36863
37205
|
...rest
|
|
36864
37206
|
}, ref) {
|
|
36865
37207
|
const timeInputRef = useRef(null);
|
|
@@ -37200,7 +37542,6 @@ const TimeInputNative = forwardRef(function TimeInputNative2({
|
|
|
37200
37542
|
const s24 = (second2 || "00").padStart(2, "0");
|
|
37201
37543
|
return `${h24}:${m24}:${s24}`;
|
|
37202
37544
|
}, [hour2, minute2, second2, amPm, is12HourFormat]);
|
|
37203
|
-
useImperativeHandle(ref, () => timeInputRef.current);
|
|
37204
37545
|
useEffect(() => {
|
|
37205
37546
|
if (registerComponentApi) {
|
|
37206
37547
|
registerComponentApi({
|
|
@@ -37731,17 +38072,17 @@ const TimeInputMd = createMetadata({
|
|
|
37731
38072
|
initialValue: dInitialValue(),
|
|
37732
38073
|
autoFocus: dAutoFocus(),
|
|
37733
38074
|
readOnly: dReadonly(),
|
|
37734
|
-
enabled: dEnabled(defaultProps$
|
|
37735
|
-
validationStatus: dValidationStatus(defaultProps$
|
|
38075
|
+
enabled: dEnabled(defaultProps$n.enabled),
|
|
38076
|
+
validationStatus: dValidationStatus(defaultProps$n.validationStatus),
|
|
37736
38077
|
hour24: {
|
|
37737
38078
|
description: "Whether to use 24-hour format (true) or 12-hour format with AM/PM (false)",
|
|
37738
38079
|
valueType: "boolean",
|
|
37739
|
-
defaultValue: defaultProps$
|
|
38080
|
+
defaultValue: defaultProps$n.hour24
|
|
37740
38081
|
},
|
|
37741
38082
|
seconds: {
|
|
37742
38083
|
description: "Whether to show and allow input of seconds",
|
|
37743
38084
|
valueType: "boolean",
|
|
37744
|
-
defaultValue: defaultProps$
|
|
38085
|
+
defaultValue: defaultProps$n.seconds
|
|
37745
38086
|
},
|
|
37746
38087
|
minTime: {
|
|
37747
38088
|
description: "Minimum time that the user can select",
|
|
@@ -37754,7 +38095,7 @@ const TimeInputMd = createMetadata({
|
|
|
37754
38095
|
clearable: {
|
|
37755
38096
|
description: "Whether to show a clear button that allows clearing the selected time",
|
|
37756
38097
|
valueType: "boolean",
|
|
37757
|
-
defaultValue: defaultProps$
|
|
38098
|
+
defaultValue: defaultProps$n.clearable
|
|
37758
38099
|
},
|
|
37759
38100
|
clearIcon: {
|
|
37760
38101
|
description: "The icon to display in the clear button.",
|
|
@@ -37763,12 +38104,12 @@ const TimeInputMd = createMetadata({
|
|
|
37763
38104
|
clearToInitialValue: {
|
|
37764
38105
|
description: "Whether the clear button resets the time input to its initial value",
|
|
37765
38106
|
valueType: "boolean",
|
|
37766
|
-
defaultValue: defaultProps$
|
|
38107
|
+
defaultValue: defaultProps$n.clearToInitialValue
|
|
37767
38108
|
},
|
|
37768
38109
|
required: {
|
|
37769
38110
|
description: "Whether the time input should be required",
|
|
37770
38111
|
valueType: "boolean",
|
|
37771
|
-
defaultValue: defaultProps$
|
|
38112
|
+
defaultValue: defaultProps$n.required
|
|
37772
38113
|
},
|
|
37773
38114
|
startText: dStartText(),
|
|
37774
38115
|
startIcon: dStartIcon(),
|
|
@@ -37781,7 +38122,7 @@ const TimeInputMd = createMetadata({
|
|
|
37781
38122
|
emptyCharacter: {
|
|
37782
38123
|
description: "Character to use as placeholder for empty time values. If longer than 1 character, uses the first character. Defaults to '-'",
|
|
37783
38124
|
valueType: "string",
|
|
37784
|
-
defaultValue: defaultProps$
|
|
38125
|
+
defaultValue: defaultProps$n.emptyCharacter
|
|
37785
38126
|
}
|
|
37786
38127
|
},
|
|
37787
38128
|
events: {
|
|
@@ -37858,24 +38199,24 @@ const timeInputComponentRenderer = createComponentRenderer(
|
|
|
37858
38199
|
value: stateValue,
|
|
37859
38200
|
updateState,
|
|
37860
38201
|
registerComponentApi,
|
|
37861
|
-
enabled: extractValue.asOptionalBoolean(node.props.enabled, defaultProps$
|
|
37862
|
-
autoFocus: extractValue.asOptionalBoolean(node.props.autoFocus, defaultProps$
|
|
37863
|
-
readOnly: extractValue.asOptionalBoolean(node.props.readOnly, defaultProps$
|
|
38202
|
+
enabled: extractValue.asOptionalBoolean(node.props.enabled, defaultProps$n.enabled),
|
|
38203
|
+
autoFocus: extractValue.asOptionalBoolean(node.props.autoFocus, defaultProps$n.autoFocus),
|
|
38204
|
+
readOnly: extractValue.asOptionalBoolean(node.props.readOnly, defaultProps$n.readOnly),
|
|
37864
38205
|
validationStatus: extractValue(node.props.validationStatus),
|
|
37865
|
-
hour24: extractValue.asOptionalBoolean(node.props.hour24, defaultProps$
|
|
37866
|
-
seconds: extractValue.asOptionalBoolean(node.props.seconds, defaultProps$
|
|
38206
|
+
hour24: extractValue.asOptionalBoolean(node.props.hour24, defaultProps$n.hour24),
|
|
38207
|
+
seconds: extractValue.asOptionalBoolean(node.props.seconds, defaultProps$n.seconds),
|
|
37867
38208
|
minTime: extractValue(node.props.minTime),
|
|
37868
38209
|
maxTime: extractValue(node.props.maxTime),
|
|
37869
|
-
clearable: extractValue.asOptionalBoolean(node.props.clearable, defaultProps$
|
|
38210
|
+
clearable: extractValue.asOptionalBoolean(node.props.clearable, defaultProps$n.clearable),
|
|
37870
38211
|
clearIcon: extractValue(node.props.clearIcon),
|
|
37871
|
-
clearToInitialValue: extractValue.asOptionalBoolean(node.props.clearToInitialValue, defaultProps$
|
|
37872
|
-
required: extractValue.asOptionalBoolean(node.props.required, defaultProps$
|
|
38212
|
+
clearToInitialValue: extractValue.asOptionalBoolean(node.props.clearToInitialValue, defaultProps$n.clearToInitialValue),
|
|
38213
|
+
required: extractValue.asOptionalBoolean(node.props.required, defaultProps$n.required),
|
|
37873
38214
|
startText: extractValue(node.props.startText),
|
|
37874
38215
|
startIcon: extractValue(node.props.startIcon),
|
|
37875
38216
|
endText: extractValue(node.props.endText),
|
|
37876
38217
|
endIcon: extractValue(node.props.endIcon),
|
|
37877
38218
|
gap: extractValue.asOptionalString(node.props.gap),
|
|
37878
|
-
emptyCharacter: extractValue.asOptionalString(node.props.emptyCharacter, defaultProps$
|
|
38219
|
+
emptyCharacter: extractValue.asOptionalString(node.props.emptyCharacter, defaultProps$n.emptyCharacter),
|
|
37879
38220
|
onDidChange: lookupEventHandler("didChange"),
|
|
37880
38221
|
onFocus: lookupEventHandler("gotFocus"),
|
|
37881
38222
|
onBlur: lookupEventHandler("lostFocus"),
|
|
@@ -37884,17 +38225,17 @@ const timeInputComponentRenderer = createComponentRenderer(
|
|
|
37884
38225
|
);
|
|
37885
38226
|
}
|
|
37886
38227
|
);
|
|
37887
|
-
const defaultProps$
|
|
38228
|
+
const defaultProps$m = {
|
|
37888
38229
|
enabled: true,
|
|
37889
38230
|
interval: 1e3,
|
|
37890
38231
|
once: false,
|
|
37891
38232
|
initialDelay: 0
|
|
37892
38233
|
};
|
|
37893
38234
|
const Timer = forwardRef(function Timer2({
|
|
37894
|
-
enabled: enabled2 = defaultProps$
|
|
37895
|
-
interval = defaultProps$
|
|
37896
|
-
once = defaultProps$
|
|
37897
|
-
initialDelay = defaultProps$
|
|
38235
|
+
enabled: enabled2 = defaultProps$m.enabled,
|
|
38236
|
+
interval = defaultProps$m.interval,
|
|
38237
|
+
once = defaultProps$m.once,
|
|
38238
|
+
initialDelay = defaultProps$m.initialDelay,
|
|
37898
38239
|
onTick,
|
|
37899
38240
|
registerComponentApi,
|
|
37900
38241
|
style: style2,
|
|
@@ -37947,7 +38288,6 @@ const Timer = forwardRef(function Timer2({
|
|
|
37947
38288
|
isPaused: () => isPaused,
|
|
37948
38289
|
isRunning: () => isRunning && !isPaused
|
|
37949
38290
|
}), [pause, resume, isPaused, isRunning]);
|
|
37950
|
-
useImperativeHandle(forwardedRef, () => timerApi, [timerApi]);
|
|
37951
38291
|
useEffect(() => {
|
|
37952
38292
|
if (registerComponentApi) {
|
|
37953
38293
|
registerComponentApi(timerApi);
|
|
@@ -38045,22 +38385,22 @@ const TimerMd = createMetadata({
|
|
|
38045
38385
|
enabled: {
|
|
38046
38386
|
description: "Whether the timer is enabled and should fire events.",
|
|
38047
38387
|
valueType: "boolean",
|
|
38048
|
-
defaultValue: defaultProps$
|
|
38388
|
+
defaultValue: defaultProps$m.enabled
|
|
38049
38389
|
},
|
|
38050
38390
|
interval: {
|
|
38051
38391
|
description: "The interval in milliseconds between timer events.",
|
|
38052
38392
|
valueType: "number",
|
|
38053
|
-
defaultValue: defaultProps$
|
|
38393
|
+
defaultValue: defaultProps$m.interval
|
|
38054
38394
|
},
|
|
38055
38395
|
initialDelay: {
|
|
38056
38396
|
description: "The delay in milliseconds before the first timer event.",
|
|
38057
38397
|
valueType: "number",
|
|
38058
|
-
defaultValue: defaultProps$
|
|
38398
|
+
defaultValue: defaultProps$m.initialDelay
|
|
38059
38399
|
},
|
|
38060
38400
|
once: {
|
|
38061
38401
|
description: "Whether the timer should stop after firing its first tick event.",
|
|
38062
38402
|
valueType: "boolean",
|
|
38063
|
-
defaultValue: defaultProps$
|
|
38403
|
+
defaultValue: defaultProps$m.once
|
|
38064
38404
|
}
|
|
38065
38405
|
},
|
|
38066
38406
|
events: {
|
|
@@ -38105,7 +38445,7 @@ const timerComponentRenderer = createComponentRenderer(
|
|
|
38105
38445
|
}
|
|
38106
38446
|
);
|
|
38107
38447
|
const COMP$x = "Redirect";
|
|
38108
|
-
const defaultProps$
|
|
38448
|
+
const defaultProps$l = {
|
|
38109
38449
|
to: ""
|
|
38110
38450
|
};
|
|
38111
38451
|
const RedirectMd = createMetadata({
|
|
@@ -38118,7 +38458,7 @@ const RedirectMd = createMetadata({
|
|
|
38118
38458
|
},
|
|
38119
38459
|
to: {
|
|
38120
38460
|
description: `This property defines the URL to which this component is about to redirect requests.`,
|
|
38121
|
-
defaultValue: defaultProps$
|
|
38461
|
+
defaultValue: defaultProps$l.to
|
|
38122
38462
|
}
|
|
38123
38463
|
}
|
|
38124
38464
|
});
|
|
@@ -38130,12 +38470,21 @@ const redirectRenderer = createComponentRenderer(
|
|
|
38130
38470
|
}
|
|
38131
38471
|
);
|
|
38132
38472
|
const themeVars$b = `'{"padding-trigger-Tabs": "var(--xmlui-padding-trigger-Tabs)", "paddingHorizontal-trigger-Tabs": "var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs))", "paddingVertical-trigger-Tabs": "var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs))", "paddingLeft-trigger-Tabs": "var(--xmlui-paddingLeft-trigger-Tabs, var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "paddingRight-trigger-Tabs": "var(--xmlui-paddingRight-trigger-Tabs, var(--xmlui-paddingHorizontal-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "paddingTop-trigger-Tabs": "var(--xmlui-paddingTop-trigger-Tabs, var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "paddingBottom-trigger-Tabs": "var(--xmlui-paddingBottom-trigger-Tabs, var(--xmlui-paddingVertical-trigger-Tabs, var(--xmlui-padding-trigger-Tabs)))", "backgroundColor-Tabs": "var(--xmlui-backgroundColor-Tabs)", "borderColor-Tabs": "var(--xmlui-borderColor-Tabs)", "borderWidth-Tabs": "var(--xmlui-borderWidth-Tabs)", "borderColor-active-Tabs": "var(--xmlui-borderColor-active-Tabs)", "backgroundColor-trigger-Tabs": "var(--xmlui-backgroundColor-trigger-Tabs)", "borderRadius-trigger-Tabs": "var(--xmlui-borderRadius-trigger-Tabs)", "border-trigger-Tabs": "var(--xmlui-border-trigger-Tabs)", "textColor-trigger-Tabs": "var(--xmlui-textColor-trigger-Tabs)", "backgroundColor-trigger-Tabs--hover": "var(--xmlui-backgroundColor-trigger-Tabs--hover)", "backgroundColor-trigger-Tabs--active": "var(--xmlui-backgroundColor-trigger-Tabs--active)", "backgroundColor-list-Tabs": "var(--xmlui-backgroundColor-list-Tabs)", "borderRadius-list-Tabs": "var(--xmlui-borderRadius-list-Tabs)", "border-list-Tabs": "var(--xmlui-border-list-Tabs)"}'`;
|
|
38133
|
-
const tabs = "
|
|
38134
|
-
const filler = "
|
|
38135
|
-
const tabTrigger = "
|
|
38136
|
-
const distributeEvenly = "
|
|
38137
|
-
const tabsList = "
|
|
38138
|
-
const
|
|
38473
|
+
const tabs = "_tabs_19izz_14";
|
|
38474
|
+
const filler = "_filler_19izz_26";
|
|
38475
|
+
const tabTrigger = "_tabTrigger_19izz_39";
|
|
38476
|
+
const distributeEvenly = "_distributeEvenly_19izz_56";
|
|
38477
|
+
const tabsList = "_tabsList_19izz_87";
|
|
38478
|
+
const alignStart = "_alignStart_19izz_104";
|
|
38479
|
+
const alignEnd = "_alignEnd_19izz_107";
|
|
38480
|
+
const alignCenter = "_alignCenter_19izz_110";
|
|
38481
|
+
const alignStretch = "_alignStretch_19izz_113";
|
|
38482
|
+
const tabsContent = "_tabsContent_19izz_119";
|
|
38483
|
+
const accordionView = "_accordionView_19izz_123";
|
|
38484
|
+
const accordionRoot = "_accordionRoot_19izz_126";
|
|
38485
|
+
const accordionInterleaved = "_accordionInterleaved_19izz_131";
|
|
38486
|
+
const accordionList = "_accordionList_19izz_136";
|
|
38487
|
+
const accordionTrigger = "_accordionTrigger_19izz_148";
|
|
38139
38488
|
const styles$o = {
|
|
38140
38489
|
themeVars: themeVars$b,
|
|
38141
38490
|
tabs,
|
|
@@ -38143,43 +38492,61 @@ const styles$o = {
|
|
|
38143
38492
|
tabTrigger,
|
|
38144
38493
|
distributeEvenly,
|
|
38145
38494
|
tabsList,
|
|
38146
|
-
|
|
38495
|
+
alignStart,
|
|
38496
|
+
alignEnd,
|
|
38497
|
+
alignCenter,
|
|
38498
|
+
alignStretch,
|
|
38499
|
+
tabsContent,
|
|
38500
|
+
accordionView,
|
|
38501
|
+
accordionRoot,
|
|
38502
|
+
accordionInterleaved,
|
|
38503
|
+
accordionList,
|
|
38504
|
+
accordionTrigger
|
|
38147
38505
|
};
|
|
38148
38506
|
const TabContext = createContext({
|
|
38149
38507
|
register: (tabItem) => {
|
|
38150
38508
|
},
|
|
38151
38509
|
unRegister: (innerId) => {
|
|
38152
38510
|
},
|
|
38153
|
-
activeTabId: ""
|
|
38511
|
+
activeTabId: "",
|
|
38512
|
+
getTabItems: () => []
|
|
38154
38513
|
});
|
|
38155
38514
|
function useTabContextValue() {
|
|
38156
38515
|
const [tabItems, setTabItems] = useState(EMPTY_ARRAY);
|
|
38516
|
+
const tabItemsRef = useRef(EMPTY_ARRAY);
|
|
38517
|
+
tabItemsRef.current = tabItems;
|
|
38157
38518
|
const [activeTabId, setActiveTabId] = useState("");
|
|
38519
|
+
const register = useCallback((tabItem) => {
|
|
38520
|
+
setTabItems(
|
|
38521
|
+
produce((draft) => {
|
|
38522
|
+
const existing = draft.findIndex((col) => col.innerId === tabItem.innerId);
|
|
38523
|
+
if (existing < 0) {
|
|
38524
|
+
draft.push(tabItem);
|
|
38525
|
+
} else {
|
|
38526
|
+
draft[existing] = tabItem;
|
|
38527
|
+
}
|
|
38528
|
+
})
|
|
38529
|
+
);
|
|
38530
|
+
}, []);
|
|
38531
|
+
const unRegister = useCallback((innerId) => {
|
|
38532
|
+
setTabItems(
|
|
38533
|
+
produce((draft) => {
|
|
38534
|
+
return draft.filter((col) => col.innerId !== innerId);
|
|
38535
|
+
})
|
|
38536
|
+
);
|
|
38537
|
+
}, []);
|
|
38538
|
+
const getTabItems = useCallback(() => {
|
|
38539
|
+
return tabItemsRef.current;
|
|
38540
|
+
}, []);
|
|
38158
38541
|
const tabContextValue = useMemo(() => {
|
|
38159
38542
|
return {
|
|
38160
|
-
register
|
|
38161
|
-
|
|
38162
|
-
produce((draft) => {
|
|
38163
|
-
const existing = draft.findIndex((col) => col.innerId === tabItem.innerId);
|
|
38164
|
-
if (existing < 0) {
|
|
38165
|
-
draft.push(tabItem);
|
|
38166
|
-
} else {
|
|
38167
|
-
draft[existing] = tabItem;
|
|
38168
|
-
}
|
|
38169
|
-
})
|
|
38170
|
-
);
|
|
38171
|
-
},
|
|
38172
|
-
unRegister: (innerId) => {
|
|
38173
|
-
setTabItems(
|
|
38174
|
-
produce((draft) => {
|
|
38175
|
-
return draft.filter((col) => col.innerId !== innerId);
|
|
38176
|
-
})
|
|
38177
|
-
);
|
|
38178
|
-
},
|
|
38543
|
+
register,
|
|
38544
|
+
unRegister,
|
|
38179
38545
|
activeTabId,
|
|
38180
|
-
setActiveTabId
|
|
38546
|
+
setActiveTabId,
|
|
38547
|
+
getTabItems
|
|
38181
38548
|
};
|
|
38182
|
-
}, [activeTabId]);
|
|
38549
|
+
}, [register, unRegister, activeTabId, getTabItems]);
|
|
38183
38550
|
return {
|
|
38184
38551
|
tabItems,
|
|
38185
38552
|
tabContextValue
|
|
@@ -38188,21 +38555,25 @@ function useTabContextValue() {
|
|
|
38188
38555
|
function useTabContext() {
|
|
38189
38556
|
return useContext(TabContext);
|
|
38190
38557
|
}
|
|
38191
|
-
const defaultProps$
|
|
38558
|
+
const defaultProps$k = {
|
|
38192
38559
|
activeTab: 0,
|
|
38193
38560
|
orientation: "horizontal",
|
|
38561
|
+
tabAlignment: "start",
|
|
38562
|
+
accordionView: false,
|
|
38194
38563
|
distributeEvenly: false
|
|
38195
38564
|
};
|
|
38196
38565
|
const Tabs = forwardRef(function Tabs2({
|
|
38197
|
-
activeTab = defaultProps$
|
|
38198
|
-
orientation = defaultProps$
|
|
38566
|
+
activeTab = defaultProps$k.activeTab,
|
|
38567
|
+
orientation = defaultProps$k.orientation,
|
|
38568
|
+
tabAlignment = defaultProps$k.tabAlignment,
|
|
38569
|
+
accordionView: accordionView2 = defaultProps$k.accordionView,
|
|
38199
38570
|
headerRenderer,
|
|
38200
38571
|
style: style2,
|
|
38201
38572
|
children,
|
|
38202
38573
|
id,
|
|
38203
38574
|
registerComponentApi,
|
|
38204
38575
|
className,
|
|
38205
|
-
distributeEvenly: distributeEvenly2 = defaultProps$
|
|
38576
|
+
distributeEvenly: distributeEvenly2 = defaultProps$k.distributeEvenly,
|
|
38206
38577
|
onDidChange = noop$1,
|
|
38207
38578
|
...rest
|
|
38208
38579
|
}, forwardedRef) {
|
|
@@ -38266,6 +38637,66 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
38266
38637
|
setActiveTabById
|
|
38267
38638
|
});
|
|
38268
38639
|
}, [next, prev, setActiveTabIndex, setActiveTabById, registerComponentApi]);
|
|
38640
|
+
if (accordionView2) {
|
|
38641
|
+
return /* @__PURE__ */ jsx(TabContext.Provider, { value: tabContextValue, children: /* @__PURE__ */ jsx(
|
|
38642
|
+
"div",
|
|
38643
|
+
{
|
|
38644
|
+
...rest,
|
|
38645
|
+
id: tabsId,
|
|
38646
|
+
ref: forwardedRef,
|
|
38647
|
+
className: classnames(className, styles$o.tabs, styles$o.accordionView),
|
|
38648
|
+
style: style2,
|
|
38649
|
+
children: /* @__PURE__ */ jsx(
|
|
38650
|
+
Root$1,
|
|
38651
|
+
{
|
|
38652
|
+
value: `${currentTab}`,
|
|
38653
|
+
onValueChange: (tab) => {
|
|
38654
|
+
const tabItem = tabItems.find((item2) => item2.innerId === tab);
|
|
38655
|
+
const newIndex = tabItems.findIndex((item2) => item2.innerId === tab);
|
|
38656
|
+
if (newIndex !== activeIndex) {
|
|
38657
|
+
tabContextValue.setActiveTabId(tab);
|
|
38658
|
+
setActiveIndex(newIndex);
|
|
38659
|
+
onDidChange == null ? void 0 : onDidChange(newIndex, tabItem.id || tabItem.innerId, tabItem == null ? void 0 : tabItem.label);
|
|
38660
|
+
}
|
|
38661
|
+
},
|
|
38662
|
+
orientation: "vertical",
|
|
38663
|
+
className: styles$o.accordionRoot,
|
|
38664
|
+
children: /* @__PURE__ */ jsxs("div", { className: styles$o.accordionInterleaved, children: [
|
|
38665
|
+
/* @__PURE__ */ jsx(List, { className: styles$o.accordionList, children: tabItems.map((tab, index) => /* @__PURE__ */ jsx(
|
|
38666
|
+
Trigger$1,
|
|
38667
|
+
{
|
|
38668
|
+
value: tab.innerId,
|
|
38669
|
+
asChild: true,
|
|
38670
|
+
style: { order: index * 2 },
|
|
38671
|
+
children: /* @__PURE__ */ jsx(
|
|
38672
|
+
"div",
|
|
38673
|
+
{
|
|
38674
|
+
role: "tab",
|
|
38675
|
+
"aria-label": tab.label,
|
|
38676
|
+
className: classnames(styles$o.tabTrigger, styles$o.accordionTrigger),
|
|
38677
|
+
children: tab.headerRenderer ? tab.headerRenderer({
|
|
38678
|
+
...tab.id !== void 0 && { id: tab.id },
|
|
38679
|
+
index,
|
|
38680
|
+
label: tab.label,
|
|
38681
|
+
isActive: tab.innerId === currentTab
|
|
38682
|
+
}) : headerRenderer ? headerRenderer({
|
|
38683
|
+
...tab.id !== void 0 && { id: tab.id },
|
|
38684
|
+
index,
|
|
38685
|
+
label: tab.label,
|
|
38686
|
+
isActive: tab.innerId === currentTab
|
|
38687
|
+
}) : tab.label
|
|
38688
|
+
}
|
|
38689
|
+
)
|
|
38690
|
+
},
|
|
38691
|
+
tab.innerId
|
|
38692
|
+
)) }),
|
|
38693
|
+
children
|
|
38694
|
+
] })
|
|
38695
|
+
}
|
|
38696
|
+
)
|
|
38697
|
+
}
|
|
38698
|
+
) });
|
|
38699
|
+
}
|
|
38269
38700
|
return /* @__PURE__ */ jsx(TabContext.Provider, { value: tabContextValue, children: /* @__PURE__ */ jsxs(
|
|
38270
38701
|
Root$1,
|
|
38271
38702
|
{
|
|
@@ -38286,30 +38717,44 @@ const Tabs = forwardRef(function Tabs2({
|
|
|
38286
38717
|
orientation,
|
|
38287
38718
|
style: style2,
|
|
38288
38719
|
children: [
|
|
38289
|
-
/* @__PURE__ */ jsxs(
|
|
38290
|
-
|
|
38291
|
-
|
|
38292
|
-
{
|
|
38293
|
-
|
|
38294
|
-
"
|
|
38295
|
-
|
|
38296
|
-
|
|
38297
|
-
|
|
38298
|
-
|
|
38299
|
-
|
|
38300
|
-
|
|
38301
|
-
|
|
38302
|
-
|
|
38303
|
-
|
|
38304
|
-
|
|
38305
|
-
|
|
38306
|
-
|
|
38307
|
-
|
|
38308
|
-
|
|
38309
|
-
|
|
38310
|
-
|
|
38311
|
-
|
|
38312
|
-
|
|
38720
|
+
/* @__PURE__ */ jsxs(
|
|
38721
|
+
List,
|
|
38722
|
+
{
|
|
38723
|
+
className: classnames(styles$o.tabsList, {
|
|
38724
|
+
[styles$o.alignStart]: tabAlignment === "start",
|
|
38725
|
+
[styles$o.alignEnd]: tabAlignment === "end",
|
|
38726
|
+
[styles$o.alignCenter]: tabAlignment === "center",
|
|
38727
|
+
[styles$o.alignStretch]: tabAlignment === "stretch"
|
|
38728
|
+
}),
|
|
38729
|
+
role: "tablist",
|
|
38730
|
+
children: [
|
|
38731
|
+
!distributeEvenly2 && !headerRenderer && tabAlignment === "end" && /* @__PURE__ */ jsx("div", { className: styles$o.filler, "data-orientation": orientation }),
|
|
38732
|
+
!distributeEvenly2 && !headerRenderer && tabAlignment === "center" && /* @__PURE__ */ jsx("div", { className: styles$o.filler, "data-orientation": orientation }),
|
|
38733
|
+
tabItems.map((tab, index) => /* @__PURE__ */ jsx(Trigger$1, { value: tab.innerId, asChild: true, children: /* @__PURE__ */ jsx(
|
|
38734
|
+
"div",
|
|
38735
|
+
{
|
|
38736
|
+
role: "tab",
|
|
38737
|
+
"aria-label": tab.label,
|
|
38738
|
+
className: classnames(styles$o.tabTrigger, {
|
|
38739
|
+
[styles$o.distributeEvenly]: distributeEvenly2 || tabAlignment === "stretch"
|
|
38740
|
+
}),
|
|
38741
|
+
children: tab.headerRenderer ? tab.headerRenderer({
|
|
38742
|
+
...tab.id !== void 0 && { id: tab.id },
|
|
38743
|
+
index,
|
|
38744
|
+
label: tab.label,
|
|
38745
|
+
isActive: tab.innerId === currentTab
|
|
38746
|
+
}) : headerRenderer ? headerRenderer({
|
|
38747
|
+
...tab.id !== void 0 && { id: tab.id },
|
|
38748
|
+
index,
|
|
38749
|
+
label: tab.label,
|
|
38750
|
+
isActive: tab.innerId === currentTab
|
|
38751
|
+
}) : tab.label
|
|
38752
|
+
}
|
|
38753
|
+
) }, tab.innerId)),
|
|
38754
|
+
!distributeEvenly2 && !headerRenderer && tabAlignment !== "stretch" && (tabAlignment === "start" || tabAlignment === "center") && /* @__PURE__ */ jsx("div", { className: styles$o.filler, "data-orientation": orientation })
|
|
38755
|
+
]
|
|
38756
|
+
}
|
|
38757
|
+
),
|
|
38313
38758
|
children
|
|
38314
38759
|
]
|
|
38315
38760
|
}
|
|
@@ -38324,11 +38769,22 @@ const TabsMd = createMetadata({
|
|
|
38324
38769
|
`This property indicates the index of the active tab. The indexing starts from 0, representing the starting (leftmost) tab. If not set, the first tab is selected by default.`
|
|
38325
38770
|
),
|
|
38326
38771
|
orientation: {
|
|
38327
|
-
description: `This property indicates the orientation of the component. In horizontal orientation, the tab sections are laid out on the left side of the content panel, while in vertical orientation, the buttons are at the top.`,
|
|
38772
|
+
description: `This property indicates the orientation of the component. In horizontal orientation, the tab sections are laid out on the left side of the content panel, while in vertical orientation, the buttons are at the top. Note: This property is ignored when accordionView is set to true.`,
|
|
38328
38773
|
availableValues: ["horizontal", "vertical"],
|
|
38329
|
-
defaultValue: defaultProps$
|
|
38774
|
+
defaultValue: defaultProps$k.orientation,
|
|
38330
38775
|
valueType: "string"
|
|
38331
38776
|
},
|
|
38777
|
+
tabAlignment: {
|
|
38778
|
+
description: `This property controls how tabs are aligned within the tab header container in horizontal orientation. Use 'start' to align tabs to the left, 'end' to align to the right, 'center' to center the tabs, and 'stretch' to make tabs fill the full width of the header. Note: This property is ignored when orientation is set to 'vertical' or when accordionView is enabled.`,
|
|
38779
|
+
availableValues: ["start", "end", "center", "stretch"],
|
|
38780
|
+
defaultValue: defaultProps$k.tabAlignment,
|
|
38781
|
+
valueType: "string"
|
|
38782
|
+
},
|
|
38783
|
+
accordionView: {
|
|
38784
|
+
description: `When enabled, displays tabs in an accordion-like view where tab headers are stacked vertically and only the active tab's content is visible. Each tab header remains visible and clicking a header opens its content while closing others. When enabled, the orientation property is ignored.`,
|
|
38785
|
+
defaultValue: defaultProps$k.accordionView,
|
|
38786
|
+
valueType: "boolean"
|
|
38787
|
+
},
|
|
38332
38788
|
headerTemplate: {
|
|
38333
38789
|
...dComponent(`This property declares the template for the clickable tab area.`)
|
|
38334
38790
|
}
|
|
@@ -38372,7 +38828,7 @@ const tabsComponentRenderer = createComponentRenderer(
|
|
|
38372
38828
|
COMP$w,
|
|
38373
38829
|
TabsMd,
|
|
38374
38830
|
({ extractValue, node, renderChild: renderChild2, className, registerComponentApi, lookupEventHandler }) => {
|
|
38375
|
-
var _a2, _b, _c;
|
|
38831
|
+
var _a2, _b, _c, _d, _e;
|
|
38376
38832
|
return /* @__PURE__ */ jsx(
|
|
38377
38833
|
Tabs,
|
|
38378
38834
|
{
|
|
@@ -38391,6 +38847,8 @@ const tabsComponentRenderer = createComponentRenderer(
|
|
|
38391
38847
|
) : void 0,
|
|
38392
38848
|
activeTab: extractValue((_b = node.props) == null ? void 0 : _b.activeTab),
|
|
38393
38849
|
orientation: extractValue((_c = node.props) == null ? void 0 : _c.orientation),
|
|
38850
|
+
tabAlignment: extractValue((_d = node.props) == null ? void 0 : _d.tabAlignment),
|
|
38851
|
+
accordionView: extractValue((_e = node.props) == null ? void 0 : _e.accordionView),
|
|
38394
38852
|
onDidChange: lookupEventHandler("didChange"),
|
|
38395
38853
|
registerComponentApi,
|
|
38396
38854
|
children: renderChild2(node.children)
|
|
@@ -38424,16 +38882,16 @@ const styles$n = {
|
|
|
38424
38882
|
head_6,
|
|
38425
38883
|
active: active$1
|
|
38426
38884
|
};
|
|
38427
|
-
const defaultProps$
|
|
38885
|
+
const defaultProps$j = {
|
|
38428
38886
|
smoothScrolling: false,
|
|
38429
38887
|
maxHeadingLevel: 6,
|
|
38430
38888
|
omitH1: false
|
|
38431
38889
|
};
|
|
38432
38890
|
const TableOfContents = forwardRef(function TableOfContents2({
|
|
38433
38891
|
style: style2,
|
|
38434
|
-
smoothScrolling = defaultProps$
|
|
38435
|
-
maxHeadingLevel = defaultProps$
|
|
38436
|
-
omitH1 = defaultProps$
|
|
38892
|
+
smoothScrolling = defaultProps$j.smoothScrolling,
|
|
38893
|
+
maxHeadingLevel = defaultProps$j.maxHeadingLevel,
|
|
38894
|
+
omitH1 = defaultProps$j.omitH1,
|
|
38437
38895
|
className,
|
|
38438
38896
|
...rest
|
|
38439
38897
|
}, forwardedRef) {
|
|
@@ -38525,12 +38983,12 @@ const TableOfContentsMd = createMetadata({
|
|
|
38525
38983
|
smoothScrolling: {
|
|
38526
38984
|
description: `This property indicates that smooth scrolling is used while scrolling the selected table of contents items into view.`,
|
|
38527
38985
|
valueType: "boolean",
|
|
38528
|
-
defaultValue: defaultProps$
|
|
38986
|
+
defaultValue: defaultProps$j.smoothScrolling
|
|
38529
38987
|
},
|
|
38530
38988
|
maxHeadingLevel: {
|
|
38531
38989
|
description: "Defines the maximum heading level (1 to 6) to include in the table of contents. For example, if it is 2, then `H1` and `H2` are displayed, but lower levels (`H3` to `H6`) are not.",
|
|
38532
38990
|
valueType: "number",
|
|
38533
|
-
defaultValue: defaultProps$
|
|
38991
|
+
defaultValue: defaultProps$j.maxHeadingLevel
|
|
38534
38992
|
},
|
|
38535
38993
|
omitH1: {
|
|
38536
38994
|
description: "If true, the `H1` heading is not included in the table of contents. This is useful when the `H1` is used for the page title and you want to avoid duplication.",
|
|
@@ -38618,7 +39076,7 @@ const AccordionContext = createContext({
|
|
|
38618
39076
|
function useAccordionContext() {
|
|
38619
39077
|
return useContext(AccordionContext);
|
|
38620
39078
|
}
|
|
38621
|
-
const defaultProps$
|
|
39079
|
+
const defaultProps$i = {
|
|
38622
39080
|
hideIcon: false,
|
|
38623
39081
|
collapsedIcon: "chevrondown",
|
|
38624
39082
|
triggerPosition: "end",
|
|
@@ -38628,13 +39086,13 @@ const AccordionComponent = forwardRef(function AccordionComponent2({
|
|
|
38628
39086
|
className,
|
|
38629
39087
|
style: style2,
|
|
38630
39088
|
children,
|
|
38631
|
-
hideIcon = defaultProps$
|
|
39089
|
+
hideIcon = defaultProps$i.hideIcon,
|
|
38632
39090
|
expandedIcon,
|
|
38633
|
-
collapsedIcon = defaultProps$
|
|
38634
|
-
triggerPosition = defaultProps$
|
|
39091
|
+
collapsedIcon = defaultProps$i.collapsedIcon,
|
|
39092
|
+
triggerPosition = defaultProps$i.triggerPosition,
|
|
38635
39093
|
onDisplayDidChange = noop$1,
|
|
38636
39094
|
registerComponentApi,
|
|
38637
|
-
rotateExpanded = defaultProps$
|
|
39095
|
+
rotateExpanded = defaultProps$i.rotateExpanded,
|
|
38638
39096
|
...rest
|
|
38639
39097
|
}, forwardedRef) {
|
|
38640
39098
|
const [expandedItems, setExpandedItems] = useState([]);
|
|
@@ -38755,14 +39213,14 @@ const AccordionMd = createMetadata({
|
|
|
38755
39213
|
props: {
|
|
38756
39214
|
triggerPosition: {
|
|
38757
39215
|
description: `This property indicates the position where the trigger icon should be displayed. The \`start\` value signs the trigger is before the header text (template), and \`end\` indicates that it follows the header.`,
|
|
38758
|
-
defaultValue: defaultProps$
|
|
39216
|
+
defaultValue: defaultProps$i.triggerPosition,
|
|
38759
39217
|
valueType: "string",
|
|
38760
39218
|
availableValues: triggerPositionNames
|
|
38761
39219
|
},
|
|
38762
39220
|
collapsedIcon: {
|
|
38763
39221
|
description: "This property is the name of the icon that is displayed when the accordion is collapsed. This property is the name of the icon that is displayed when the accordion is expanded. If not provided, a chevron-down icon is used.",
|
|
38764
39222
|
valueType: "string",
|
|
38765
|
-
defaultValue: defaultProps$
|
|
39223
|
+
defaultValue: defaultProps$i.collapsedIcon
|
|
38766
39224
|
},
|
|
38767
39225
|
expandedIcon: {
|
|
38768
39226
|
description: "This property is the name of the icon that is displayed when the accordion is expanded. If not provided, a chevron-up icon is used.",
|
|
@@ -38770,13 +39228,13 @@ const AccordionMd = createMetadata({
|
|
|
38770
39228
|
},
|
|
38771
39229
|
hideIcon: {
|
|
38772
39230
|
description: `This property indicates that the trigger icon is not displayed (\`true\`).`,
|
|
38773
|
-
defaultValue: defaultProps$
|
|
39231
|
+
defaultValue: defaultProps$i.hideIcon,
|
|
38774
39232
|
valueType: "boolean"
|
|
38775
39233
|
},
|
|
38776
39234
|
rotateExpanded: {
|
|
38777
39235
|
description: `This optional property defines the rotation angle of the expanded icon (relative to the collapsed icon).`,
|
|
38778
39236
|
valueType: "string",
|
|
38779
|
-
defaultValue: defaultProps$
|
|
39237
|
+
defaultValue: defaultProps$i.rotateExpanded
|
|
38780
39238
|
}
|
|
38781
39239
|
},
|
|
38782
39240
|
events: {
|
|
@@ -38843,7 +39301,7 @@ const accordionComponentRenderer = createComponentRenderer(
|
|
|
38843
39301
|
);
|
|
38844
39302
|
const TabItemComponent = forwardRef(function TabItemComponent2({ children, label: label2, headerRenderer, style: style2, id, activated, ...rest }, forwardedRef) {
|
|
38845
39303
|
const innerId = useId();
|
|
38846
|
-
const { register, unRegister, activeTabId } = useTabContext();
|
|
39304
|
+
const { register, unRegister, activeTabId, getTabItems } = useTabContext();
|
|
38847
39305
|
useEffect(() => {
|
|
38848
39306
|
register({
|
|
38849
39307
|
label: label2,
|
|
@@ -38864,6 +39322,9 @@ const TabItemComponent = forwardRef(function TabItemComponent2({ children, label
|
|
|
38864
39322
|
}
|
|
38865
39323
|
}, [activeTabId, innerId, activated]);
|
|
38866
39324
|
if (activeTabId !== innerId) return null;
|
|
39325
|
+
const tabItems = getTabItems();
|
|
39326
|
+
const tabIndex = (tabItems == null ? void 0 : tabItems.findIndex((item2) => item2.innerId === innerId)) ?? 0;
|
|
39327
|
+
const contentOrder = tabIndex * 2 + 1;
|
|
38867
39328
|
return /* @__PURE__ */ createElement(
|
|
38868
39329
|
Content$1,
|
|
38869
39330
|
{
|
|
@@ -38872,7 +39333,7 @@ const TabItemComponent = forwardRef(function TabItemComponent2({ children, label
|
|
|
38872
39333
|
value: innerId,
|
|
38873
39334
|
className: styles$o.tabsContent,
|
|
38874
39335
|
ref: forwardedRef,
|
|
38875
|
-
style: style2
|
|
39336
|
+
style: { ...style2, order: contentOrder }
|
|
38876
39337
|
},
|
|
38877
39338
|
children
|
|
38878
39339
|
);
|
|
@@ -38934,16 +39395,16 @@ const tabItemComponentRenderer = createComponentRenderer(
|
|
|
38934
39395
|
function defaultRenderer(header2) {
|
|
38935
39396
|
return /* @__PURE__ */ jsx("div", { children: header2 });
|
|
38936
39397
|
}
|
|
38937
|
-
const defaultProps$
|
|
39398
|
+
const defaultProps$h = {
|
|
38938
39399
|
initiallyExpanded: false,
|
|
38939
39400
|
headerRenderer: defaultRenderer
|
|
38940
39401
|
};
|
|
38941
39402
|
const AccordionItemComponent = forwardRef(function AccordionItemComponent2({
|
|
38942
39403
|
id,
|
|
38943
39404
|
header: header2,
|
|
38944
|
-
headerRenderer = defaultProps$
|
|
39405
|
+
headerRenderer = defaultProps$h.headerRenderer,
|
|
38945
39406
|
content: content2,
|
|
38946
|
-
initiallyExpanded = defaultProps$
|
|
39407
|
+
initiallyExpanded = defaultProps$h.initiallyExpanded,
|
|
38947
39408
|
style: style2,
|
|
38948
39409
|
className,
|
|
38949
39410
|
...rest
|
|
@@ -39040,7 +39501,7 @@ const AccordionItemMd = createMetadata({
|
|
|
39040
39501
|
initiallyExpanded: {
|
|
39041
39502
|
description: `This property indicates if the ${COMP$s} is expanded (\`true\`) or collapsed (\`false\`).`,
|
|
39042
39503
|
valueType: "boolean",
|
|
39043
|
-
defaultValue: defaultProps$
|
|
39504
|
+
defaultValue: defaultProps$h.initiallyExpanded
|
|
39044
39505
|
}
|
|
39045
39506
|
}
|
|
39046
39507
|
});
|
|
@@ -39293,7 +39754,7 @@ function useCarouselContextValue(isTabbed) {
|
|
|
39293
39754
|
carouselContextValue
|
|
39294
39755
|
};
|
|
39295
39756
|
}
|
|
39296
|
-
const defaultProps$
|
|
39757
|
+
const defaultProps$g = {
|
|
39297
39758
|
orientation: "horizontal",
|
|
39298
39759
|
indicators: true,
|
|
39299
39760
|
autoplay: false,
|
|
@@ -39305,21 +39766,21 @@ const defaultProps$h = {
|
|
|
39305
39766
|
stopAutoplayOnInteraction: true
|
|
39306
39767
|
};
|
|
39307
39768
|
const CarouselComponent = forwardRef(function CarouselComponent2({
|
|
39308
|
-
orientation = defaultProps$
|
|
39769
|
+
orientation = defaultProps$g.orientation,
|
|
39309
39770
|
children,
|
|
39310
39771
|
style: style2,
|
|
39311
39772
|
className,
|
|
39312
|
-
indicators: indicators2 = defaultProps$
|
|
39773
|
+
indicators: indicators2 = defaultProps$g.indicators,
|
|
39313
39774
|
onDisplayDidChange = noop$1,
|
|
39314
|
-
autoplay = defaultProps$
|
|
39315
|
-
controls: controls2 = defaultProps$
|
|
39316
|
-
loop = defaultProps$
|
|
39317
|
-
startIndex = defaultProps$
|
|
39775
|
+
autoplay = defaultProps$g.autoplay,
|
|
39776
|
+
controls: controls2 = defaultProps$g.controls,
|
|
39777
|
+
loop = defaultProps$g.loop,
|
|
39778
|
+
startIndex = defaultProps$g.startIndex,
|
|
39318
39779
|
prevIcon,
|
|
39319
39780
|
nextIcon,
|
|
39320
|
-
transitionDuration = defaultProps$
|
|
39321
|
-
autoplayInterval = defaultProps$
|
|
39322
|
-
stopAutoplayOnInteraction = defaultProps$
|
|
39781
|
+
transitionDuration = defaultProps$g.transitionDuration,
|
|
39782
|
+
autoplayInterval = defaultProps$g.autoplayInterval,
|
|
39783
|
+
stopAutoplayOnInteraction = defaultProps$g.stopAutoplayOnInteraction,
|
|
39323
39784
|
registerComponentApi,
|
|
39324
39785
|
...rest
|
|
39325
39786
|
}, forwardedRef) {
|
|
@@ -39522,47 +39983,47 @@ const CarouselMd = createMetadata({
|
|
|
39522
39983
|
description: "This property indicates the orientation of the carousel. The `horizontal` value indicates that the carousel moves horizontally, and the `vertical` value indicates that the carousel moves vertically.",
|
|
39523
39984
|
availableValues: orientationOptionMd,
|
|
39524
39985
|
valueType: "string",
|
|
39525
|
-
defaultValue: defaultProps$
|
|
39986
|
+
defaultValue: defaultProps$g.orientation
|
|
39526
39987
|
},
|
|
39527
39988
|
indicators: {
|
|
39528
39989
|
description: "Display the individual slides as buttons (`true`) or not (`false`).",
|
|
39529
39990
|
valueType: "boolean",
|
|
39530
|
-
defaultValue: defaultProps$
|
|
39991
|
+
defaultValue: defaultProps$g.indicators
|
|
39531
39992
|
},
|
|
39532
39993
|
controls: {
|
|
39533
39994
|
description: "Display the previous/next controls (`true`) or not (`false`).",
|
|
39534
39995
|
valueType: "boolean",
|
|
39535
|
-
defaultValue: defaultProps$
|
|
39996
|
+
defaultValue: defaultProps$g.controls
|
|
39536
39997
|
},
|
|
39537
39998
|
autoplay: {
|
|
39538
39999
|
description: "Start scrolling the carousel automatically (`true`) or not (`false`).",
|
|
39539
40000
|
valueType: "boolean",
|
|
39540
|
-
defaultValue: defaultProps$
|
|
40001
|
+
defaultValue: defaultProps$g.autoplay
|
|
39541
40002
|
},
|
|
39542
40003
|
loop: {
|
|
39543
40004
|
description: "Sets whether the carousel should loop back to the start/end when it reaches the last/first slide.",
|
|
39544
40005
|
valueType: "boolean",
|
|
39545
|
-
defaultValue: defaultProps$
|
|
40006
|
+
defaultValue: defaultProps$g.loop
|
|
39546
40007
|
},
|
|
39547
40008
|
startIndex: {
|
|
39548
40009
|
description: "The index of the first slide to display.",
|
|
39549
40010
|
valueType: "number",
|
|
39550
|
-
defaultValue: defaultProps$
|
|
40011
|
+
defaultValue: defaultProps$g.startIndex
|
|
39551
40012
|
},
|
|
39552
40013
|
transitionDuration: {
|
|
39553
40014
|
description: "The duration of the transition between slides.",
|
|
39554
40015
|
valueType: "number",
|
|
39555
|
-
defaultValue: defaultProps$
|
|
40016
|
+
defaultValue: defaultProps$g.transitionDuration
|
|
39556
40017
|
},
|
|
39557
40018
|
autoplayInterval: {
|
|
39558
40019
|
description: "Specifies the interval between autoplay transitions.",
|
|
39559
40020
|
valueType: "number",
|
|
39560
|
-
defaultValue: defaultProps$
|
|
40021
|
+
defaultValue: defaultProps$g.autoplayInterval
|
|
39561
40022
|
},
|
|
39562
40023
|
stopAutoplayOnInteraction: {
|
|
39563
40024
|
description: "This property indicates whether autoplay stops on user interaction.",
|
|
39564
40025
|
valueType: "boolean",
|
|
39565
|
-
defaultValue: defaultProps$
|
|
40026
|
+
defaultValue: defaultProps$g.stopAutoplayOnInteraction
|
|
39566
40027
|
},
|
|
39567
40028
|
prevIcon: {
|
|
39568
40029
|
description: "The icon to display for the previous control.",
|
|
@@ -39713,7 +40174,7 @@ const breakoutComponentRenderer = createComponentRenderer(
|
|
|
39713
40174
|
const COMP$n = "ToneChangerButton";
|
|
39714
40175
|
const LIGHT_TO_DARK_ICON = "lightToDark:ToneChangerButton";
|
|
39715
40176
|
const DARK_TO_LIGHT_ICON = "darkToLight:ToneChangerButton";
|
|
39716
|
-
const defaultProps$
|
|
40177
|
+
const defaultProps$f = {
|
|
39717
40178
|
lightToDarkIcon: LIGHT_TO_DARK_ICON,
|
|
39718
40179
|
darkToLightIcon: DARK_TO_LIGHT_ICON,
|
|
39719
40180
|
onClick: noop$2
|
|
@@ -39724,11 +40185,11 @@ const ToneChangerButtonMd = createMetadata({
|
|
|
39724
40185
|
props: {
|
|
39725
40186
|
lightToDarkIcon: {
|
|
39726
40187
|
description: `The icon displayed when the theme is in light mode and will switch to dark. You can change the default icon for all ${COMP$n} instances with the "icon.lightToDark:ToneChangerButton" declaration in the app configuration file.`,
|
|
39727
|
-
defaultValue: defaultProps$
|
|
40188
|
+
defaultValue: defaultProps$f.lightToDarkIcon
|
|
39728
40189
|
},
|
|
39729
40190
|
darkToLightIcon: {
|
|
39730
40191
|
description: `The icon displayed when the theme is in dark mode and will switch to light. You can change the default icon for all ${COMP$n} instances with the "icon.darkToLight:ToneChangerButton" declaration in the app configuration file.`,
|
|
39731
|
-
defaultValue: defaultProps$
|
|
40192
|
+
defaultValue: defaultProps$f.darkToLightIcon
|
|
39732
40193
|
}
|
|
39733
40194
|
},
|
|
39734
40195
|
events: {
|
|
@@ -39736,9 +40197,9 @@ const ToneChangerButtonMd = createMetadata({
|
|
|
39736
40197
|
}
|
|
39737
40198
|
});
|
|
39738
40199
|
function ToneChangerButton({
|
|
39739
|
-
lightToDarkIcon = defaultProps$
|
|
39740
|
-
darkToLightIcon = defaultProps$
|
|
39741
|
-
onClick = defaultProps$
|
|
40200
|
+
lightToDarkIcon = defaultProps$f.lightToDarkIcon,
|
|
40201
|
+
darkToLightIcon = defaultProps$f.darkToLightIcon,
|
|
40202
|
+
onClick = defaultProps$f.onClick
|
|
39742
40203
|
}) {
|
|
39743
40204
|
const { activeThemeTone, setActiveThemeTone } = useThemes();
|
|
39744
40205
|
const iconName = activeThemeTone === "light" ? lightToDarkIcon : darkToLightIcon;
|
|
@@ -39870,7 +40331,7 @@ const toneSwitchComponentRenderer = createComponentRenderer(
|
|
|
39870
40331
|
);
|
|
39871
40332
|
}
|
|
39872
40333
|
);
|
|
39873
|
-
const defaultProps$
|
|
40334
|
+
const defaultProps$e = {
|
|
39874
40335
|
method: "get"
|
|
39875
40336
|
};
|
|
39876
40337
|
function APICallNative({ registerComponentApi, node, uid }) {
|
|
@@ -39913,7 +40374,7 @@ const APICallMd = createMetadata({
|
|
|
39913
40374
|
description: "The method of data manipulation can be done via setting this property.",
|
|
39914
40375
|
valueType: "string",
|
|
39915
40376
|
availableValues: httpMethodNames,
|
|
39916
|
-
defaultValue: defaultProps$
|
|
40377
|
+
defaultValue: defaultProps$e.method
|
|
39917
40378
|
},
|
|
39918
40379
|
url: {
|
|
39919
40380
|
description: "Use this property to set the URL to which data will be sent. If not provided, an empty URL is used.",
|
|
@@ -42239,7 +42700,7 @@ const styles$h = {
|
|
|
42239
42700
|
warning: warning$1,
|
|
42240
42701
|
valid: valid$1
|
|
42241
42702
|
};
|
|
42242
|
-
const defaultProps$
|
|
42703
|
+
const defaultProps$d = {
|
|
42243
42704
|
initialValue: "#000000",
|
|
42244
42705
|
value: "#000000",
|
|
42245
42706
|
enabled: true,
|
|
@@ -42255,14 +42716,14 @@ const ColorPicker = forwardRef(
|
|
|
42255
42716
|
onFocus = noop$1,
|
|
42256
42717
|
onBlur = noop$1,
|
|
42257
42718
|
registerComponentApi,
|
|
42258
|
-
enabled: enabled2 = defaultProps$
|
|
42719
|
+
enabled: enabled2 = defaultProps$d.enabled,
|
|
42259
42720
|
readOnly: readOnly2,
|
|
42260
|
-
value = defaultProps$
|
|
42721
|
+
value = defaultProps$d.value,
|
|
42261
42722
|
autoFocus,
|
|
42262
42723
|
tabIndex = 0,
|
|
42263
42724
|
required: required2,
|
|
42264
|
-
validationStatus = defaultProps$
|
|
42265
|
-
initialValue = defaultProps$
|
|
42725
|
+
validationStatus = defaultProps$d.validationStatus,
|
|
42726
|
+
initialValue = defaultProps$d.initialValue,
|
|
42266
42727
|
...rest
|
|
42267
42728
|
}, forwardedRef) => {
|
|
42268
42729
|
const [isPending, startTransition2] = useTransition();
|
|
@@ -42355,7 +42816,7 @@ const ColorPickerMd = createMetadata({
|
|
|
42355
42816
|
autoFocus: dAutoFocus(),
|
|
42356
42817
|
required: dRequired(),
|
|
42357
42818
|
readOnly: dReadonly(),
|
|
42358
|
-
validationStatus: dValidationStatus(defaultProps$
|
|
42819
|
+
validationStatus: dValidationStatus(defaultProps$d.validationStatus)
|
|
42359
42820
|
},
|
|
42360
42821
|
events: {
|
|
42361
42822
|
didChange: dDidChange(COMP$h),
|
|
@@ -42858,7 +43319,7 @@ const styles$e = {
|
|
|
42858
43319
|
shadowRoot,
|
|
42859
43320
|
content: content$1
|
|
42860
43321
|
};
|
|
42861
|
-
const defaultProps$
|
|
43322
|
+
const defaultProps$c = {
|
|
42862
43323
|
allowPlaygroundPopup: true,
|
|
42863
43324
|
withFrame: true,
|
|
42864
43325
|
components: EMPTY_ARRAY
|
|
@@ -42877,7 +43338,7 @@ const NestedAppMd = createMetadata({
|
|
|
42877
43338
|
},
|
|
42878
43339
|
components: {
|
|
42879
43340
|
description: "This property defines an optional list of components to be used with the nested app.",
|
|
42880
|
-
defaultValue: defaultProps$
|
|
43341
|
+
defaultValue: defaultProps$c.components
|
|
42881
43342
|
},
|
|
42882
43343
|
config: {
|
|
42883
43344
|
description: "You can define the nested app's configuration with this property."
|
|
@@ -42976,7 +43437,7 @@ It supports both side-by-side and stacked layouts.`,
|
|
|
42976
43437
|
},
|
|
42977
43438
|
components: {
|
|
42978
43439
|
description: "This property defines an optional list of components to be used with the nested app.",
|
|
42979
|
-
defaultValue: defaultProps$
|
|
43440
|
+
defaultValue: defaultProps$c.components
|
|
42980
43441
|
},
|
|
42981
43442
|
config: {
|
|
42982
43443
|
description: "You can define the nested app's configuration with this property."
|
|
@@ -42996,12 +43457,12 @@ It supports both side-by-side and stacked layouts.`,
|
|
|
42996
43457
|
allowPlaygroundPopup: {
|
|
42997
43458
|
description: "This property defines whether the nested app can be opened in the xmlui playground.",
|
|
42998
43459
|
valueType: "boolean",
|
|
42999
|
-
defaultValue: defaultProps$
|
|
43460
|
+
defaultValue: defaultProps$c.allowPlaygroundPopup
|
|
43000
43461
|
},
|
|
43001
43462
|
withFrame: {
|
|
43002
43463
|
description: "This property defines whether the nested app should be displayed with a frame.",
|
|
43003
43464
|
valueType: "boolean",
|
|
43004
|
-
defaultValue: defaultProps$
|
|
43465
|
+
defaultValue: defaultProps$c.withFrame
|
|
43005
43466
|
}
|
|
43006
43467
|
},
|
|
43007
43468
|
themeVars: parseScssVar(styles$d.themeVars),
|
|
@@ -43198,7 +43659,7 @@ const TooltipContent$1 = forwardRef(function({ active: active2, payload, indicat
|
|
|
43198
43659
|
return null;
|
|
43199
43660
|
});
|
|
43200
43661
|
TooltipContent$1.displayName = "TooltipContent";
|
|
43201
|
-
const defaultProps$
|
|
43662
|
+
const defaultProps$b = {
|
|
43202
43663
|
hideTickX: false,
|
|
43203
43664
|
hideTickY: false,
|
|
43204
43665
|
hideX: false,
|
|
@@ -43214,18 +43675,18 @@ function AreaChart({
|
|
|
43214
43675
|
data = [],
|
|
43215
43676
|
nameKey,
|
|
43216
43677
|
dataKeys = [],
|
|
43217
|
-
hideTickX = defaultProps$
|
|
43218
|
-
hideTickY = defaultProps$
|
|
43219
|
-
hideY = defaultProps$
|
|
43220
|
-
hideX = defaultProps$
|
|
43221
|
-
hideTooltip = defaultProps$
|
|
43222
|
-
tickFormatterX = defaultProps$
|
|
43223
|
-
tickFormatterY = defaultProps$
|
|
43678
|
+
hideTickX = defaultProps$b.hideTickX,
|
|
43679
|
+
hideTickY = defaultProps$b.hideTickY,
|
|
43680
|
+
hideY = defaultProps$b.hideY,
|
|
43681
|
+
hideX = defaultProps$b.hideX,
|
|
43682
|
+
hideTooltip = defaultProps$b.hideTooltip,
|
|
43683
|
+
tickFormatterX = defaultProps$b.tickFormatterX,
|
|
43684
|
+
tickFormatterY = defaultProps$b.tickFormatterY,
|
|
43224
43685
|
className,
|
|
43225
43686
|
children,
|
|
43226
|
-
showLegend = defaultProps$
|
|
43227
|
-
stacked = defaultProps$
|
|
43228
|
-
curved = defaultProps$
|
|
43687
|
+
showLegend = defaultProps$b.showLegend,
|
|
43688
|
+
stacked = defaultProps$b.stacked,
|
|
43689
|
+
curved = defaultProps$b.curved,
|
|
43229
43690
|
tooltipRenderer
|
|
43230
43691
|
}) {
|
|
43231
43692
|
const validData = Array.isArray(data) ? data : [];
|
|
@@ -43346,42 +43807,42 @@ const AreaChartMd = createMetadata({
|
|
|
43346
43807
|
hideX: {
|
|
43347
43808
|
description: "Determines whether the X-axis should be hidden. If set to `true`, the axis will not be rendered.",
|
|
43348
43809
|
valueType: "boolean",
|
|
43349
|
-
defaultValue: defaultProps$
|
|
43810
|
+
defaultValue: defaultProps$b.hideX
|
|
43350
43811
|
},
|
|
43351
43812
|
hideY: {
|
|
43352
43813
|
description: "Determines whether the Y-axis should be hidden. If set to `true`, the axis will not be rendered.",
|
|
43353
43814
|
valueType: "boolean",
|
|
43354
|
-
defaultValue: defaultProps$
|
|
43815
|
+
defaultValue: defaultProps$b.hideY
|
|
43355
43816
|
},
|
|
43356
43817
|
hideTickX: {
|
|
43357
43818
|
description: "Determines whether the X-axis tick labels should be hidden. If set to `true`, the tick labels will not be rendered.",
|
|
43358
43819
|
valueType: "boolean",
|
|
43359
|
-
defaultValue: defaultProps$
|
|
43820
|
+
defaultValue: defaultProps$b.hideTickX
|
|
43360
43821
|
},
|
|
43361
43822
|
hideTickY: {
|
|
43362
43823
|
description: "Determines whether the Y-axis tick labels should be hidden. If set to `true`, the tick labels will not be rendered.",
|
|
43363
43824
|
valueType: "boolean",
|
|
43364
|
-
defaultValue: defaultProps$
|
|
43825
|
+
defaultValue: defaultProps$b.hideTickY
|
|
43365
43826
|
},
|
|
43366
43827
|
hideTooltip: {
|
|
43367
43828
|
description: "Determines whether the tooltip should be hidden. If set to `true`, the tooltip will not be rendered.",
|
|
43368
43829
|
valueType: "boolean",
|
|
43369
|
-
defaultValue: defaultProps$
|
|
43830
|
+
defaultValue: defaultProps$b.hideTooltip
|
|
43370
43831
|
},
|
|
43371
43832
|
showLegend: {
|
|
43372
43833
|
description: "Determines whether the legend should be shown. If set to `true`, the legend will be rendered.",
|
|
43373
43834
|
valueType: "boolean",
|
|
43374
|
-
defaultValue: defaultProps$
|
|
43835
|
+
defaultValue: defaultProps$b.showLegend
|
|
43375
43836
|
},
|
|
43376
43837
|
stacked: {
|
|
43377
43838
|
description: "Determines whether multiple areas should be stacked on top of each other. If set to `true`, areas will be stacked.",
|
|
43378
43839
|
valueType: "boolean",
|
|
43379
|
-
defaultValue: defaultProps$
|
|
43840
|
+
defaultValue: defaultProps$b.stacked
|
|
43380
43841
|
},
|
|
43381
43842
|
curved: {
|
|
43382
43843
|
description: "Determines whether the area lines should be curved (smooth) or straight. If set to `true`, lines will be curved.",
|
|
43383
43844
|
valueType: "boolean",
|
|
43384
|
-
defaultValue: defaultProps$
|
|
43845
|
+
defaultValue: defaultProps$b.curved
|
|
43385
43846
|
},
|
|
43386
43847
|
tooltipTemplate: {
|
|
43387
43848
|
description: "This property allows replacing the default template to display a tooltip."
|
|
@@ -43441,7 +43902,7 @@ const wrapper$2 = "_wrapper_il6v1_14";
|
|
|
43441
43902
|
const styles$b = {
|
|
43442
43903
|
wrapper: wrapper$2
|
|
43443
43904
|
};
|
|
43444
|
-
const defaultProps$
|
|
43905
|
+
const defaultProps$a = {
|
|
43445
43906
|
layout: "vertical",
|
|
43446
43907
|
stacked: false,
|
|
43447
43908
|
hideTickX: false,
|
|
@@ -43459,21 +43920,21 @@ const defaultChartParams$1 = {
|
|
|
43459
43920
|
};
|
|
43460
43921
|
function BarChart({
|
|
43461
43922
|
data = [],
|
|
43462
|
-
layout = defaultProps$
|
|
43923
|
+
layout = defaultProps$a.layout,
|
|
43463
43924
|
nameKey,
|
|
43464
|
-
stacked = defaultProps$
|
|
43925
|
+
stacked = defaultProps$a.stacked,
|
|
43465
43926
|
dataKeys = [],
|
|
43466
|
-
hideTickX = defaultProps$
|
|
43467
|
-
hideTickY = defaultProps$
|
|
43468
|
-
hideY = defaultProps$
|
|
43469
|
-
hideX = defaultProps$
|
|
43470
|
-
hideTooltip = defaultProps$
|
|
43471
|
-
tickFormatterX = defaultProps$
|
|
43472
|
-
tickFormatterY = defaultProps$
|
|
43927
|
+
hideTickX = defaultProps$a.hideTickX,
|
|
43928
|
+
hideTickY = defaultProps$a.hideTickY,
|
|
43929
|
+
hideY = defaultProps$a.hideY,
|
|
43930
|
+
hideX = defaultProps$a.hideX,
|
|
43931
|
+
hideTooltip = defaultProps$a.hideTooltip,
|
|
43932
|
+
tickFormatterX = defaultProps$a.tickFormatterX,
|
|
43933
|
+
tickFormatterY = defaultProps$a.tickFormatterY,
|
|
43473
43934
|
style: style2,
|
|
43474
43935
|
className,
|
|
43475
43936
|
children,
|
|
43476
|
-
showLegend = defaultProps$
|
|
43937
|
+
showLegend = defaultProps$a.showLegend,
|
|
43477
43938
|
tooltipRenderer
|
|
43478
43939
|
}) {
|
|
43479
43940
|
const validData = useMemo(() => Array.isArray(data) ? data : [], [data]);
|
|
@@ -43807,13 +44268,13 @@ const BarChartMd = createMetadata({
|
|
|
43807
44268
|
stacked: {
|
|
43808
44269
|
description: `This property determines how the bars are laid out.If set to \`true\`, bars with the same category will be stacked on top of each other rather than placed side by side.`,
|
|
43809
44270
|
valueType: "boolean",
|
|
43810
|
-
defaultValue: defaultProps$
|
|
44271
|
+
defaultValue: defaultProps$a.stacked
|
|
43811
44272
|
},
|
|
43812
44273
|
orientation: {
|
|
43813
44274
|
description: `This property determines the orientation of the bar chart. The \`vertical\` variant specifies the horizontal axis as the primary and lays out the bars from left to right. The \`horizontal\` variant specifies the vertical axis as the primary and has the bars spread from top to bottom.`,
|
|
43814
44275
|
valueType: "string",
|
|
43815
44276
|
availableValues: ["horizontal", "vertical"],
|
|
43816
|
-
defaultValue: defaultProps$
|
|
44277
|
+
defaultValue: defaultProps$a.layout
|
|
43817
44278
|
},
|
|
43818
44279
|
xKey: {
|
|
43819
44280
|
description: `This property specifies the keys in the data objects that should be used for rendering the bars.E.g. 'id' or 'key'.`,
|
|
@@ -43822,40 +44283,40 @@ const BarChartMd = createMetadata({
|
|
|
43822
44283
|
hideX: {
|
|
43823
44284
|
description: "Determines whether the X-axis should be hidden. If set to `true`, the axis will not be rendered.",
|
|
43824
44285
|
valueType: "boolean",
|
|
43825
|
-
defaultValue: defaultProps$
|
|
44286
|
+
defaultValue: defaultProps$a.hideX
|
|
43826
44287
|
},
|
|
43827
44288
|
hideY: {
|
|
43828
44289
|
description: "Determines whether the Y-axis should be hidden. If set to `true`, the axis will not be rendered.",
|
|
43829
44290
|
valueType: "boolean",
|
|
43830
|
-
defaultValue: defaultProps$
|
|
44291
|
+
defaultValue: defaultProps$a.hideY
|
|
43831
44292
|
},
|
|
43832
44293
|
hideTickX: {
|
|
43833
44294
|
description: "Controls the visibility of the X-axis ticks. If set to `true`, tick labels on the X-axis will be hidden.",
|
|
43834
44295
|
valueType: "boolean",
|
|
43835
|
-
defaultValue: defaultProps$
|
|
44296
|
+
defaultValue: defaultProps$a.hideTickX
|
|
43836
44297
|
},
|
|
43837
44298
|
hideTickY: {
|
|
43838
44299
|
description: "Controls the visibility of the Y-axis ticks. If set to `true`, tick labels on the Y-axis will be hidden.",
|
|
43839
44300
|
valueType: "boolean",
|
|
43840
|
-
defaultValue: defaultProps$
|
|
44301
|
+
defaultValue: defaultProps$a.hideTickY
|
|
43841
44302
|
},
|
|
43842
44303
|
tickFormatterX: {
|
|
43843
44304
|
description: "A function that formats the tick labels on the X-axis. ",
|
|
43844
|
-
defaultValue: JSON.stringify(defaultProps$
|
|
44305
|
+
defaultValue: JSON.stringify(defaultProps$a.tickFormatterX)
|
|
43845
44306
|
},
|
|
43846
44307
|
tickFormatterY: {
|
|
43847
44308
|
description: "A function that formats the tick labels on the Y-axis. ",
|
|
43848
|
-
defaultValue: JSON.stringify(defaultProps$
|
|
44309
|
+
defaultValue: JSON.stringify(defaultProps$a.tickFormatterY)
|
|
43849
44310
|
},
|
|
43850
44311
|
hideTooltip: {
|
|
43851
44312
|
description: "Determines whether the tooltip should be hidden. If set to `true`, tooltips will not appear on hover.",
|
|
43852
44313
|
valueType: "boolean",
|
|
43853
|
-
defaultValue: defaultProps$
|
|
44314
|
+
defaultValue: defaultProps$a.hideTooltip
|
|
43854
44315
|
},
|
|
43855
44316
|
showLegend: {
|
|
43856
44317
|
description: "Determines whether the legend should be displayed.",
|
|
43857
44318
|
valueType: "boolean",
|
|
43858
|
-
defaultValue: defaultProps$
|
|
44319
|
+
defaultValue: defaultProps$a.showLegend
|
|
43859
44320
|
},
|
|
43860
44321
|
tooltipTemplate: {
|
|
43861
44322
|
description: "This property allows replacing the default template to display a tooltip."
|
|
@@ -43908,7 +44369,7 @@ const styles$a = {
|
|
|
43908
44369
|
themeVars: themeVars$2,
|
|
43909
44370
|
wrapper: wrapper$1
|
|
43910
44371
|
};
|
|
43911
|
-
const defaultProps$
|
|
44372
|
+
const defaultProps$9 = {
|
|
43912
44373
|
showLabel: true,
|
|
43913
44374
|
showLabelList: false,
|
|
43914
44375
|
showLegend: false,
|
|
@@ -43979,14 +44440,14 @@ function PieChart({
|
|
|
43979
44440
|
nameKey,
|
|
43980
44441
|
style: style2,
|
|
43981
44442
|
className,
|
|
43982
|
-
showLabel = defaultProps$
|
|
43983
|
-
showLabelList = defaultProps$
|
|
43984
|
-
labelListPosition = defaultProps$
|
|
43985
|
-
innerRadius = defaultProps$
|
|
44443
|
+
showLabel = defaultProps$9.showLabel,
|
|
44444
|
+
showLabelList = defaultProps$9.showLabelList,
|
|
44445
|
+
labelListPosition = defaultProps$9.labelListPosition,
|
|
44446
|
+
innerRadius = defaultProps$9.innerRadius,
|
|
43986
44447
|
children,
|
|
43987
44448
|
outerRadius,
|
|
43988
44449
|
// no default; we'll compute when undefined or "auto"
|
|
43989
|
-
showLegend = defaultProps$
|
|
44450
|
+
showLegend = defaultProps$9.showLegend
|
|
43990
44451
|
}) {
|
|
43991
44452
|
const { getThemeVar } = useTheme();
|
|
43992
44453
|
const colorValues = useMemo(() => {
|
|
@@ -44108,7 +44569,7 @@ function PieChart({
|
|
|
44108
44569
|
}
|
|
44109
44570
|
const COMP$a = "DonutChart";
|
|
44110
44571
|
const defaultPropsDonut = {
|
|
44111
|
-
...defaultProps$
|
|
44572
|
+
...defaultProps$9,
|
|
44112
44573
|
innerRadius: 60
|
|
44113
44574
|
};
|
|
44114
44575
|
const DonutChartMd = createMetadata({
|
|
@@ -44191,10 +44652,10 @@ const styles$9 = {
|
|
|
44191
44652
|
themeVars: themeVars$1,
|
|
44192
44653
|
labelList
|
|
44193
44654
|
};
|
|
44194
|
-
const defaultProps$
|
|
44655
|
+
const defaultProps$8 = {
|
|
44195
44656
|
position: "inside"
|
|
44196
44657
|
};
|
|
44197
|
-
const LabelList = ({ position = defaultProps$
|
|
44658
|
+
const LabelList = ({ position = defaultProps$8.position, nameKey: key, style: style2, className }) => {
|
|
44198
44659
|
const { nameKey } = useChart();
|
|
44199
44660
|
const { setLabelList } = useLabelList();
|
|
44200
44661
|
const content2 = useMemo(
|
|
@@ -44252,7 +44713,7 @@ const LabelListMd = createMetadata({
|
|
|
44252
44713
|
description: "The position of the label list",
|
|
44253
44714
|
valueType: "string",
|
|
44254
44715
|
availableValues: LabelPositionValues,
|
|
44255
|
-
defaultValue: defaultProps$
|
|
44716
|
+
defaultValue: defaultProps$8.position
|
|
44256
44717
|
}
|
|
44257
44718
|
},
|
|
44258
44719
|
themeVars: parseScssVar(styles$9.themeVars),
|
|
@@ -44286,13 +44747,13 @@ const horizontalAlignmentValues = [
|
|
|
44286
44747
|
"right",
|
|
44287
44748
|
"center"
|
|
44288
44749
|
];
|
|
44289
|
-
const defaultProps$
|
|
44750
|
+
const defaultProps$7 = {
|
|
44290
44751
|
verticalAlign: "bottom",
|
|
44291
44752
|
align: "center"
|
|
44292
44753
|
};
|
|
44293
44754
|
const Legend = ({
|
|
44294
|
-
verticalAlign = defaultProps$
|
|
44295
|
-
align = defaultProps$
|
|
44755
|
+
verticalAlign = defaultProps$7.verticalAlign,
|
|
44756
|
+
align = defaultProps$7.align
|
|
44296
44757
|
}) => {
|
|
44297
44758
|
const { setLegend } = useLegend();
|
|
44298
44759
|
const content2 = useMemo(
|
|
@@ -44313,13 +44774,13 @@ const LegendMd = createMetadata({
|
|
|
44313
44774
|
description: "The alignment of the legend",
|
|
44314
44775
|
valueType: "string",
|
|
44315
44776
|
availableValues: horizontalAlignmentValues,
|
|
44316
|
-
defaultValue: defaultProps$
|
|
44777
|
+
defaultValue: defaultProps$7.align
|
|
44317
44778
|
},
|
|
44318
44779
|
verticalAlign: {
|
|
44319
44780
|
description: "The vertical alignment of the legend",
|
|
44320
44781
|
valueType: "string",
|
|
44321
44782
|
availableValues: verticalAlignmentValues,
|
|
44322
|
-
defaultValue: defaultProps$
|
|
44783
|
+
defaultValue: defaultProps$7.verticalAlign
|
|
44323
44784
|
}
|
|
44324
44785
|
}
|
|
44325
44786
|
});
|
|
@@ -44343,7 +44804,7 @@ const styles$8 = {
|
|
|
44343
44804
|
themeVars,
|
|
44344
44805
|
wrapper
|
|
44345
44806
|
};
|
|
44346
|
-
const defaultProps$
|
|
44807
|
+
const defaultProps$6 = {
|
|
44347
44808
|
hideTickX: false,
|
|
44348
44809
|
hideTickY: false,
|
|
44349
44810
|
hideX: false,
|
|
@@ -44362,15 +44823,15 @@ const LineChart = forwardRef(function LineChart2({
|
|
|
44362
44823
|
nameKey,
|
|
44363
44824
|
style: style2,
|
|
44364
44825
|
className,
|
|
44365
|
-
hideX = defaultProps$
|
|
44366
|
-
hideY = defaultProps$
|
|
44367
|
-
hideTickX = defaultProps$
|
|
44368
|
-
hideTickY = defaultProps$
|
|
44369
|
-
hideTooltip = defaultProps$
|
|
44370
|
-
tickFormatterX = defaultProps$
|
|
44371
|
-
tickFormatterY = defaultProps$
|
|
44826
|
+
hideX = defaultProps$6.hideX,
|
|
44827
|
+
hideY = defaultProps$6.hideY,
|
|
44828
|
+
hideTickX = defaultProps$6.hideTickX,
|
|
44829
|
+
hideTickY = defaultProps$6.hideTickY,
|
|
44830
|
+
hideTooltip = defaultProps$6.hideTooltip,
|
|
44831
|
+
tickFormatterX = defaultProps$6.tickFormatterX,
|
|
44832
|
+
tickFormatterY = defaultProps$6.tickFormatterY,
|
|
44372
44833
|
children,
|
|
44373
|
-
showLegend = defaultProps$
|
|
44834
|
+
showLegend = defaultProps$6.showLegend,
|
|
44374
44835
|
tooltipRenderer
|
|
44375
44836
|
}, forwardedRef) {
|
|
44376
44837
|
const { getThemeVar } = useTheme();
|
|
@@ -44600,27 +45061,27 @@ const LineChartMd = createMetadata({
|
|
|
44600
45061
|
hideX: {
|
|
44601
45062
|
description: "Determines whether the X-axis should be hidden. If set to (`true`), the axis will not be displayed.",
|
|
44602
45063
|
valueType: "boolean",
|
|
44603
|
-
defaultValue: defaultProps$
|
|
45064
|
+
defaultValue: defaultProps$6.hideX
|
|
44604
45065
|
},
|
|
44605
45066
|
hideY: {
|
|
44606
45067
|
description: "Determines whether the Y-axis should be hidden. If set to (`true`), the axis will not be displayed.",
|
|
44607
45068
|
valueType: "boolean",
|
|
44608
|
-
defaultValue: defaultProps$
|
|
45069
|
+
defaultValue: defaultProps$6.hideY
|
|
44609
45070
|
},
|
|
44610
45071
|
hideTickX: {
|
|
44611
45072
|
description: "Determines whether the X-axis ticks should be hidden. If set to (`true`), the ticks will not be displayed.",
|
|
44612
45073
|
valueType: "boolean",
|
|
44613
|
-
defaultValue: defaultProps$
|
|
45074
|
+
defaultValue: defaultProps$6.hideTickX
|
|
44614
45075
|
},
|
|
44615
45076
|
hideTickY: {
|
|
44616
45077
|
description: "Determines whether the Y-axis ticks should be hidden. If set to (`true`), the ticks will not be displayed.",
|
|
44617
45078
|
valueType: "boolean",
|
|
44618
|
-
defaultValue: defaultProps$
|
|
45079
|
+
defaultValue: defaultProps$6.hideTickY
|
|
44619
45080
|
},
|
|
44620
45081
|
hideTooltip: {
|
|
44621
45082
|
description: "Determines whether the tooltip should be hidden.If set to (`true`), no tooltip will be shown when hovering over data points.",
|
|
44622
45083
|
valueType: "boolean",
|
|
44623
|
-
defaultValue: defaultProps$
|
|
45084
|
+
defaultValue: defaultProps$6.hideTooltip
|
|
44624
45085
|
},
|
|
44625
45086
|
tickFormatterX: {
|
|
44626
45087
|
description: "A function that formats the X-axis tick labels. It receives a tick value and returns a formatted string."
|
|
@@ -44631,7 +45092,7 @@ const LineChartMd = createMetadata({
|
|
|
44631
45092
|
showLegend: {
|
|
44632
45093
|
description: "Determines whether the legend should be displayed.",
|
|
44633
45094
|
valueType: "boolean",
|
|
44634
|
-
defaultValue: defaultProps$
|
|
45095
|
+
defaultValue: defaultProps$6.showLegend
|
|
44635
45096
|
},
|
|
44636
45097
|
tooltipTemplate: {
|
|
44637
45098
|
description: "This property allows replacing the default template to display a tooltip."
|
|
@@ -44708,17 +45169,17 @@ const PieChartMd = createMetadata({
|
|
|
44708
45169
|
showLabel: {
|
|
44709
45170
|
description: "Toggles whether to show labels (`true`) or not (`false`).",
|
|
44710
45171
|
valueType: "boolean",
|
|
44711
|
-
defaultValue: defaultProps$
|
|
45172
|
+
defaultValue: defaultProps$9.showLabel
|
|
44712
45173
|
},
|
|
44713
45174
|
showLabelList: {
|
|
44714
45175
|
description: "Whether to show labels in a list (`true`) or not (`false`).",
|
|
44715
45176
|
valueType: "boolean",
|
|
44716
|
-
defaultValue: defaultProps$
|
|
45177
|
+
defaultValue: defaultProps$9.showLabelList
|
|
44717
45178
|
},
|
|
44718
45179
|
labelListPosition: {
|
|
44719
45180
|
description: "The position of the label list.",
|
|
44720
45181
|
valueType: "string",
|
|
44721
|
-
defaultValue: defaultProps$
|
|
45182
|
+
defaultValue: defaultProps$9.labelListPosition,
|
|
44722
45183
|
availableValues: LabelPositionValues
|
|
44723
45184
|
},
|
|
44724
45185
|
outerRadius: d(
|
|
@@ -44727,7 +45188,7 @@ const PieChartMd = createMetadata({
|
|
|
44727
45188
|
showLegend: {
|
|
44728
45189
|
description: "Toggles whether to show legend (`true`) or not (`false`).",
|
|
44729
45190
|
valueType: "boolean",
|
|
44730
|
-
defaultValue: defaultProps$
|
|
45191
|
+
defaultValue: defaultProps$9.showLegend
|
|
44731
45192
|
}
|
|
44732
45193
|
},
|
|
44733
45194
|
themeVars: parseScssVar(styles$a.themeVars),
|
|
@@ -44756,7 +45217,7 @@ const pieChartComponentRenderer = createComponentRenderer(
|
|
|
44756
45217
|
);
|
|
44757
45218
|
}
|
|
44758
45219
|
);
|
|
44759
|
-
const defaultProps$
|
|
45220
|
+
const defaultProps$5 = {
|
|
44760
45221
|
hideGrid: false,
|
|
44761
45222
|
hideAngleAxis: false,
|
|
44762
45223
|
hideRadiusAxis: false,
|
|
@@ -44770,16 +45231,16 @@ function RadarChart({
|
|
|
44770
45231
|
data = [],
|
|
44771
45232
|
nameKey,
|
|
44772
45233
|
dataKeys = [],
|
|
44773
|
-
hideGrid = defaultProps$
|
|
44774
|
-
hideAngleAxis = defaultProps$
|
|
44775
|
-
hideRadiusAxis = defaultProps$
|
|
44776
|
-
hideTooltip = defaultProps$
|
|
45234
|
+
hideGrid = defaultProps$5.hideGrid,
|
|
45235
|
+
hideAngleAxis = defaultProps$5.hideAngleAxis,
|
|
45236
|
+
hideRadiusAxis = defaultProps$5.hideRadiusAxis,
|
|
45237
|
+
hideTooltip = defaultProps$5.hideTooltip,
|
|
44777
45238
|
className,
|
|
44778
45239
|
children,
|
|
44779
|
-
showLegend = defaultProps$
|
|
44780
|
-
filled = defaultProps$
|
|
44781
|
-
strokeWidth = defaultProps$
|
|
44782
|
-
fillOpacity = defaultProps$
|
|
45240
|
+
showLegend = defaultProps$5.showLegend,
|
|
45241
|
+
filled = defaultProps$5.filled,
|
|
45242
|
+
strokeWidth = defaultProps$5.strokeWidth,
|
|
45243
|
+
fillOpacity = defaultProps$5.fillOpacity,
|
|
44783
45244
|
tooltipRenderer
|
|
44784
45245
|
}) {
|
|
44785
45246
|
const validData = Array.isArray(data) ? data : [];
|
|
@@ -44902,42 +45363,42 @@ const RadarChartMd = createMetadata({
|
|
|
44902
45363
|
hideGrid: {
|
|
44903
45364
|
description: "Determines whether the polar grid should be hidden. If set to `true`, the grid will not be rendered.",
|
|
44904
45365
|
valueType: "boolean",
|
|
44905
|
-
defaultValue: defaultProps$
|
|
45366
|
+
defaultValue: defaultProps$5.hideGrid
|
|
44906
45367
|
},
|
|
44907
45368
|
hideAngleAxis: {
|
|
44908
45369
|
description: "Determines whether the angle axis should be hidden. If set to `true`, the angle axis will not be rendered.",
|
|
44909
45370
|
valueType: "boolean",
|
|
44910
|
-
defaultValue: defaultProps$
|
|
45371
|
+
defaultValue: defaultProps$5.hideAngleAxis
|
|
44911
45372
|
},
|
|
44912
45373
|
hideRadiusAxis: {
|
|
44913
45374
|
description: "Determines whether the radius axis should be hidden. If set to `true`, the radius axis will not be rendered.",
|
|
44914
45375
|
valueType: "boolean",
|
|
44915
|
-
defaultValue: defaultProps$
|
|
45376
|
+
defaultValue: defaultProps$5.hideRadiusAxis
|
|
44916
45377
|
},
|
|
44917
45378
|
hideTooltip: {
|
|
44918
45379
|
description: "Determines whether the tooltip should be hidden. If set to `true`, the tooltip will not be rendered.",
|
|
44919
45380
|
valueType: "boolean",
|
|
44920
|
-
defaultValue: defaultProps$
|
|
45381
|
+
defaultValue: defaultProps$5.hideTooltip
|
|
44921
45382
|
},
|
|
44922
45383
|
showLegend: {
|
|
44923
45384
|
description: "Determines whether the legend should be shown. If set to `true`, the legend will be rendered.",
|
|
44924
45385
|
valueType: "boolean",
|
|
44925
|
-
defaultValue: defaultProps$
|
|
45386
|
+
defaultValue: defaultProps$5.showLegend
|
|
44926
45387
|
},
|
|
44927
45388
|
filled: {
|
|
44928
45389
|
description: "Determines whether the radar areas should be filled. If set to `true`, areas will be filled with color.",
|
|
44929
45390
|
valueType: "boolean",
|
|
44930
|
-
defaultValue: defaultProps$
|
|
45391
|
+
defaultValue: defaultProps$5.filled
|
|
44931
45392
|
},
|
|
44932
45393
|
strokeWidth: {
|
|
44933
45394
|
description: "Sets the stroke width for the radar lines. Higher values create thicker lines.",
|
|
44934
45395
|
valueType: "number",
|
|
44935
|
-
defaultValue: defaultProps$
|
|
45396
|
+
defaultValue: defaultProps$5.strokeWidth
|
|
44936
45397
|
},
|
|
44937
45398
|
fillOpacity: {
|
|
44938
45399
|
description: "Sets the fill opacity for the radar areas when filled is true. Value between 0 and 1.",
|
|
44939
45400
|
valueType: "number",
|
|
44940
|
-
defaultValue: defaultProps$
|
|
45401
|
+
defaultValue: defaultProps$5.fillOpacity
|
|
44941
45402
|
},
|
|
44942
45403
|
tooltipTemplate: {
|
|
44943
45404
|
description: "This property allows replacing the default template to display a tooltip."
|
|
@@ -45319,7 +45780,7 @@ class ComponentRegistry {
|
|
|
45319
45780
|
* about component registrations
|
|
45320
45781
|
*/
|
|
45321
45782
|
constructor(contributes = {}, extensionManager) {
|
|
45322
|
-
var _a2, _b, _c;
|
|
45783
|
+
var _a2, _b, _c, _d;
|
|
45323
45784
|
this.extensionManager = extensionManager;
|
|
45324
45785
|
this.pool = /* @__PURE__ */ new Map();
|
|
45325
45786
|
this.namePool = /* @__PURE__ */ new Map();
|
|
@@ -45327,6 +45788,7 @@ class ComponentRegistry {
|
|
|
45327
45788
|
this.defaultThemeVars = {};
|
|
45328
45789
|
this.actionFns = /* @__PURE__ */ new Map();
|
|
45329
45790
|
this.loaders = /* @__PURE__ */ new Map();
|
|
45791
|
+
this.behaviors = [];
|
|
45330
45792
|
this.extensionRegistered = (extension) => {
|
|
45331
45793
|
var _a3;
|
|
45332
45794
|
(_a3 = extension.components) == null ? void 0 : _a3.forEach((c) => {
|
|
@@ -45815,7 +46277,13 @@ class ComponentRegistry {
|
|
|
45815
46277
|
this.registerLoaderRenderer(externalDataLoaderRenderer);
|
|
45816
46278
|
this.registerLoaderRenderer(mockLoaderRenderer);
|
|
45817
46279
|
this.registerLoaderRenderer(dataLoaderRenderer);
|
|
45818
|
-
|
|
46280
|
+
this.registerBehavior(tooltipBehavior);
|
|
46281
|
+
this.registerBehavior(animationBehavior);
|
|
46282
|
+
this.registerBehavior(labelBehavior);
|
|
46283
|
+
(_c = contributes.behaviors) == null ? void 0 : _c.forEach((behavior) => {
|
|
46284
|
+
this.registerBehavior(behavior);
|
|
46285
|
+
});
|
|
46286
|
+
(_d = this.extensionManager) == null ? void 0 : _d.subscribeToRegistrations(this.extensionRegistered);
|
|
45819
46287
|
}
|
|
45820
46288
|
/**
|
|
45821
46289
|
* All theme variables used by the registered components.
|
|
@@ -45922,6 +46390,22 @@ class ComponentRegistry {
|
|
|
45922
46390
|
registerActionFn({ actionName: functionName, actionFn }) {
|
|
45923
46391
|
this.actionFns.set(functionName, actionFn);
|
|
45924
46392
|
}
|
|
46393
|
+
// --- Registers a behavior
|
|
46394
|
+
registerBehavior(behavior, location = "after", position) {
|
|
46395
|
+
if (position) {
|
|
46396
|
+
const targetIndex = this.behaviors.findIndex((b) => b.name === position);
|
|
46397
|
+
if (targetIndex !== -1) {
|
|
46398
|
+
const insertIndex = location === "before" ? targetIndex : targetIndex + 1;
|
|
46399
|
+
this.behaviors.splice(insertIndex, 0, behavior);
|
|
46400
|
+
return;
|
|
46401
|
+
}
|
|
46402
|
+
}
|
|
46403
|
+
this.behaviors.push(behavior);
|
|
46404
|
+
}
|
|
46405
|
+
// --- Returns all registered behaviors
|
|
46406
|
+
getBehaviors() {
|
|
46407
|
+
return this.behaviors;
|
|
46408
|
+
}
|
|
45925
46409
|
}
|
|
45926
46410
|
function ComponentProvider({
|
|
45927
46411
|
children,
|
|
@@ -46842,7 +47326,7 @@ function IconProvider({ children }) {
|
|
|
46842
47326
|
/* @__PURE__ */ jsx("svg", { style: { display: "none" }, ref: spriteRootRef })
|
|
46843
47327
|
] });
|
|
46844
47328
|
}
|
|
46845
|
-
const version = "0.10.
|
|
47329
|
+
const version = "0.10.22";
|
|
46846
47330
|
const miscellaneousUtils = {
|
|
46847
47331
|
capitalize,
|
|
46848
47332
|
pluralize: pluralize$1,
|
|
@@ -50183,308 +50667,6 @@ function InvalidComponent({ errors = EMPTY_ARRAY, node, children }) {
|
|
|
50183
50667
|
children
|
|
50184
50668
|
] });
|
|
50185
50669
|
}
|
|
50186
|
-
const AnimatedComponent = animated(
|
|
50187
|
-
forwardRef(function InlineComponentDef(props, ref) {
|
|
50188
|
-
const { children, ...rest } = props;
|
|
50189
|
-
if (!React__default.isValidElement(children)) {
|
|
50190
|
-
return children;
|
|
50191
|
-
}
|
|
50192
|
-
return React__default.cloneElement(children, { ...rest, ref });
|
|
50193
|
-
})
|
|
50194
|
-
);
|
|
50195
|
-
const defaultProps$5 = {
|
|
50196
|
-
delay: 0,
|
|
50197
|
-
animateWhenInView: false,
|
|
50198
|
-
reverse: false,
|
|
50199
|
-
loop: false,
|
|
50200
|
-
once: false
|
|
50201
|
-
};
|
|
50202
|
-
const parseAnimation = (animation) => {
|
|
50203
|
-
if (typeof animation === "object") {
|
|
50204
|
-
return animation;
|
|
50205
|
-
}
|
|
50206
|
-
const presetAnimations = {
|
|
50207
|
-
fadein: {
|
|
50208
|
-
from: { opacity: 0 },
|
|
50209
|
-
to: { opacity: 1 }
|
|
50210
|
-
},
|
|
50211
|
-
fadeout: {
|
|
50212
|
-
from: { opacity: 1 },
|
|
50213
|
-
to: { opacity: 0 }
|
|
50214
|
-
},
|
|
50215
|
-
slidein: {
|
|
50216
|
-
from: { transform: "translateX(-100%)" },
|
|
50217
|
-
to: { transform: "translateX(0%)" }
|
|
50218
|
-
},
|
|
50219
|
-
slideout: {
|
|
50220
|
-
from: { transform: "translateX(0%)" },
|
|
50221
|
-
to: { transform: "translateX(100%)" }
|
|
50222
|
-
},
|
|
50223
|
-
popin: {
|
|
50224
|
-
from: { transform: "scale(0.8)", opacity: 0 },
|
|
50225
|
-
to: { transform: "scale(1)", opacity: 1 }
|
|
50226
|
-
},
|
|
50227
|
-
popout: {
|
|
50228
|
-
from: { transform: "scale(1)", opacity: 1 },
|
|
50229
|
-
to: { transform: "scale(0.8)", opacity: 0 }
|
|
50230
|
-
},
|
|
50231
|
-
flipin: {
|
|
50232
|
-
from: { transform: "rotateY(90deg)", opacity: 0 },
|
|
50233
|
-
to: { transform: "rotateY(0deg)", opacity: 1 }
|
|
50234
|
-
},
|
|
50235
|
-
flipout: {
|
|
50236
|
-
from: { transform: "rotateY(0deg)", opacity: 1 },
|
|
50237
|
-
to: { transform: "rotateY(90deg)", opacity: 0 }
|
|
50238
|
-
},
|
|
50239
|
-
rotatein: {
|
|
50240
|
-
from: { transform: "rotate(-180deg)", opacity: 0 },
|
|
50241
|
-
to: { transform: "rotate(0deg)", opacity: 1 }
|
|
50242
|
-
},
|
|
50243
|
-
rotateout: {
|
|
50244
|
-
from: { transform: "rotate(0deg)", opacity: 1 },
|
|
50245
|
-
to: { transform: "rotate(180deg)", opacity: 0 }
|
|
50246
|
-
},
|
|
50247
|
-
zoomin: {
|
|
50248
|
-
from: { transform: "scale(0)", opacity: 0 },
|
|
50249
|
-
to: { transform: "scale(1)", opacity: 1 }
|
|
50250
|
-
},
|
|
50251
|
-
zoomout: {
|
|
50252
|
-
from: { transform: "scale(1)", opacity: 1 },
|
|
50253
|
-
to: { transform: "scale(0)", opacity: 0 }
|
|
50254
|
-
}
|
|
50255
|
-
};
|
|
50256
|
-
return presetAnimations[animation] || { from: {}, to: {} };
|
|
50257
|
-
};
|
|
50258
|
-
function parseAnimationOptionValue(name, value) {
|
|
50259
|
-
switch (name) {
|
|
50260
|
-
case "duration":
|
|
50261
|
-
case "delay":
|
|
50262
|
-
const num = parseInt(value, 10);
|
|
50263
|
-
return isNaN(num) ? void 0 : num;
|
|
50264
|
-
case "animateWhenInView":
|
|
50265
|
-
case "reverse":
|
|
50266
|
-
case "loop":
|
|
50267
|
-
case "once":
|
|
50268
|
-
const lowerVal = value.toLowerCase();
|
|
50269
|
-
if (lowerVal === "true" || lowerVal === "1" || lowerVal === "yes") return true;
|
|
50270
|
-
if (lowerVal === "false" || lowerVal === "0" || lowerVal === "no") return false;
|
|
50271
|
-
return void 0;
|
|
50272
|
-
default:
|
|
50273
|
-
return void 0;
|
|
50274
|
-
}
|
|
50275
|
-
}
|
|
50276
|
-
function parseAnimationOptions(input2) {
|
|
50277
|
-
if (isPlainObject(input2)) {
|
|
50278
|
-
return input2;
|
|
50279
|
-
}
|
|
50280
|
-
if (typeof input2 === "string") {
|
|
50281
|
-
const options2 = {};
|
|
50282
|
-
const values = input2.split(";").map((value) => value.trim()).filter((value) => value.length > 0);
|
|
50283
|
-
for (const value of values) {
|
|
50284
|
-
if (value.includes(":")) {
|
|
50285
|
-
const [name, val] = value.split(":").map((part) => part.trim());
|
|
50286
|
-
if (name && val) {
|
|
50287
|
-
const parsedValue = parseAnimationOptionValue(name, val);
|
|
50288
|
-
if (parsedValue !== void 0) {
|
|
50289
|
-
options2[name] = parsedValue;
|
|
50290
|
-
}
|
|
50291
|
-
}
|
|
50292
|
-
} else {
|
|
50293
|
-
const booleanOptions = ["animateWhenInView", "reverse", "loop", "once"];
|
|
50294
|
-
if (booleanOptions.includes(value)) {
|
|
50295
|
-
options2[value] = true;
|
|
50296
|
-
} else if (value.startsWith("!") && value.length > 1) {
|
|
50297
|
-
const optionName = value.substring(1);
|
|
50298
|
-
if (booleanOptions.includes(optionName)) {
|
|
50299
|
-
options2[optionName] = false;
|
|
50300
|
-
}
|
|
50301
|
-
}
|
|
50302
|
-
}
|
|
50303
|
-
}
|
|
50304
|
-
return options2;
|
|
50305
|
-
}
|
|
50306
|
-
return {};
|
|
50307
|
-
}
|
|
50308
|
-
const Animation$1 = forwardRef(function Animation2({
|
|
50309
|
-
children,
|
|
50310
|
-
registerComponentApi,
|
|
50311
|
-
animation,
|
|
50312
|
-
duration,
|
|
50313
|
-
onStop,
|
|
50314
|
-
onStart,
|
|
50315
|
-
delay: delay2 = defaultProps$5.delay,
|
|
50316
|
-
animateWhenInView = defaultProps$5.animateWhenInView,
|
|
50317
|
-
reverse: reverse2 = defaultProps$5.reverse,
|
|
50318
|
-
loop = defaultProps$5.loop,
|
|
50319
|
-
once = defaultProps$5.once,
|
|
50320
|
-
...rest
|
|
50321
|
-
}, forwardedRef) {
|
|
50322
|
-
const [_animation] = useState(animation);
|
|
50323
|
-
const [toggle, setToggle] = useState(false);
|
|
50324
|
-
const [reset, setReset] = useState(false);
|
|
50325
|
-
const [count, setCount] = useState(0);
|
|
50326
|
-
const times = 1;
|
|
50327
|
-
useId();
|
|
50328
|
-
const animationSettings = useMemo(
|
|
50329
|
-
() => ({
|
|
50330
|
-
from: _animation.from,
|
|
50331
|
-
to: _animation.to,
|
|
50332
|
-
config: {
|
|
50333
|
-
..._animation.config,
|
|
50334
|
-
duration
|
|
50335
|
-
},
|
|
50336
|
-
delay: delay2,
|
|
50337
|
-
loop,
|
|
50338
|
-
reset,
|
|
50339
|
-
reverse: toggle,
|
|
50340
|
-
onRest: () => {
|
|
50341
|
-
onStop == null ? void 0 : onStop();
|
|
50342
|
-
if (loop) {
|
|
50343
|
-
if (reverse2) {
|
|
50344
|
-
setCount(count + 1);
|
|
50345
|
-
setToggle(!toggle);
|
|
50346
|
-
}
|
|
50347
|
-
setReset(true);
|
|
50348
|
-
} else {
|
|
50349
|
-
if (reverse2 && count < times) {
|
|
50350
|
-
setCount(count + 1);
|
|
50351
|
-
setToggle(!toggle);
|
|
50352
|
-
}
|
|
50353
|
-
}
|
|
50354
|
-
},
|
|
50355
|
-
onStart: () => {
|
|
50356
|
-
onStart == null ? void 0 : onStart();
|
|
50357
|
-
}
|
|
50358
|
-
}),
|
|
50359
|
-
[
|
|
50360
|
-
_animation.config,
|
|
50361
|
-
_animation.from,
|
|
50362
|
-
_animation.to,
|
|
50363
|
-
count,
|
|
50364
|
-
delay2,
|
|
50365
|
-
duration,
|
|
50366
|
-
loop,
|
|
50367
|
-
onStart,
|
|
50368
|
-
onStop,
|
|
50369
|
-
reset,
|
|
50370
|
-
once,
|
|
50371
|
-
reverse2,
|
|
50372
|
-
toggle
|
|
50373
|
-
]
|
|
50374
|
-
);
|
|
50375
|
-
const [springs, api] = useSpring(
|
|
50376
|
-
() => ({
|
|
50377
|
-
...animationSettings
|
|
50378
|
-
}),
|
|
50379
|
-
[animationSettings]
|
|
50380
|
-
);
|
|
50381
|
-
const [ref, animationStyles] = useInView(() => animationSettings, {
|
|
50382
|
-
once
|
|
50383
|
-
});
|
|
50384
|
-
const composedRef = ref ? composeRefs(ref, forwardedRef) : forwardedRef;
|
|
50385
|
-
const startAnimation = useCallback(() => {
|
|
50386
|
-
void api.start(_animation);
|
|
50387
|
-
return () => {
|
|
50388
|
-
api.stop();
|
|
50389
|
-
};
|
|
50390
|
-
}, [_animation, api]);
|
|
50391
|
-
const stopAnimation = useCallback(() => {
|
|
50392
|
-
api.stop();
|
|
50393
|
-
}, [api]);
|
|
50394
|
-
useEffect(() => {
|
|
50395
|
-
registerComponentApi == null ? void 0 : registerComponentApi({
|
|
50396
|
-
start: startAnimation,
|
|
50397
|
-
stop: stopAnimation
|
|
50398
|
-
});
|
|
50399
|
-
}, [registerComponentApi, startAnimation, stopAnimation]);
|
|
50400
|
-
const content2 = useMemo(() => {
|
|
50401
|
-
return Children.map(
|
|
50402
|
-
children,
|
|
50403
|
-
(child, index) => animateWhenInView ? /* @__PURE__ */ jsx(AnimatedComponent, { ...rest, style: animationStyles, ref: composedRef, children: child }, index) : /* @__PURE__ */ jsx(AnimatedComponent, { ...rest, style: springs, ref: forwardedRef, children: child }, index)
|
|
50404
|
-
);
|
|
50405
|
-
}, [animateWhenInView, animationStyles, children, springs, rest, composedRef, forwardedRef]);
|
|
50406
|
-
return content2;
|
|
50407
|
-
});
|
|
50408
|
-
const tooltipBehavior = {
|
|
50409
|
-
name: "tooltip",
|
|
50410
|
-
canAttach: (node) => {
|
|
50411
|
-
var _a2, _b;
|
|
50412
|
-
const tooltipText = (_a2 = node.props) == null ? void 0 : _a2.tooltip;
|
|
50413
|
-
const tooltipMarkdown = (_b = node.props) == null ? void 0 : _b.tooltipMarkdown;
|
|
50414
|
-
return !!tooltipText || !!tooltipMarkdown;
|
|
50415
|
-
},
|
|
50416
|
-
attach: (context, node) => {
|
|
50417
|
-
var _a2, _b, _c;
|
|
50418
|
-
const { extractValue } = context;
|
|
50419
|
-
const tooltipText = extractValue((_a2 = context.node.props) == null ? void 0 : _a2.tooltip, true);
|
|
50420
|
-
const tooltipMarkdown = extractValue((_b = context.node.props) == null ? void 0 : _b.tooltipMarkdown, true);
|
|
50421
|
-
const tooltipOptions = extractValue((_c = context.node.props) == null ? void 0 : _c.tooltipOptions, true);
|
|
50422
|
-
const parsedOptions = parseTooltipOptions(tooltipOptions);
|
|
50423
|
-
return /* @__PURE__ */ jsx(Tooltip, { text: tooltipText, markdown: tooltipMarkdown, ...parsedOptions, children: node });
|
|
50424
|
-
}
|
|
50425
|
-
};
|
|
50426
|
-
const animationBehavior = {
|
|
50427
|
-
name: "animation",
|
|
50428
|
-
canAttach: (node) => {
|
|
50429
|
-
var _a2;
|
|
50430
|
-
return !!((_a2 = node.props) == null ? void 0 : _a2.animation);
|
|
50431
|
-
},
|
|
50432
|
-
attach: (context, node) => {
|
|
50433
|
-
var _a2, _b;
|
|
50434
|
-
const { extractValue } = context;
|
|
50435
|
-
const animation = extractValue((_a2 = context.node.props) == null ? void 0 : _a2.animation, true);
|
|
50436
|
-
const animationOptions = extractValue((_b = context.node.props) == null ? void 0 : _b.animationOptions, true);
|
|
50437
|
-
const parsedOptions = parseAnimationOptions(animationOptions);
|
|
50438
|
-
return /* @__PURE__ */ jsx(Animation$1, { animation: parseAnimation(animation), ...parsedOptions, children: context.node.type === "ModalDialog" ? cloneElement(node, {
|
|
50439
|
-
externalAnimation: true
|
|
50440
|
-
}) : node });
|
|
50441
|
-
}
|
|
50442
|
-
};
|
|
50443
|
-
const labelBehavior = {
|
|
50444
|
-
name: "label",
|
|
50445
|
-
canAttach: (node, metadata) => {
|
|
50446
|
-
var _a2, _b;
|
|
50447
|
-
if ((_a2 = metadata == null ? void 0 : metadata.props) == null ? void 0 : _a2.label) {
|
|
50448
|
-
return false;
|
|
50449
|
-
} else if (!((_b = node.props) == null ? void 0 : _b.label)) {
|
|
50450
|
-
return false;
|
|
50451
|
-
}
|
|
50452
|
-
return true;
|
|
50453
|
-
},
|
|
50454
|
-
attach: (context, node) => {
|
|
50455
|
-
var _a2;
|
|
50456
|
-
const { extractValue, node: componentNode, className } = context;
|
|
50457
|
-
const label2 = extractValue.asOptionalString(componentNode.props.label);
|
|
50458
|
-
const labelPosition = extractValue(componentNode.props.labelPosition);
|
|
50459
|
-
const labelWidth = extractValue.asOptionalString(componentNode.props.labelWidth);
|
|
50460
|
-
const labelBreak2 = extractValue.asOptionalBoolean(componentNode.props.labelBreak);
|
|
50461
|
-
const required2 = extractValue.asOptionalBoolean(componentNode.props.required);
|
|
50462
|
-
const enabled2 = extractValue.asOptionalBoolean(componentNode.props.enabled, true);
|
|
50463
|
-
const shrinkToLabel2 = extractValue.asOptionalBoolean(componentNode.props.shrinkToLabel);
|
|
50464
|
-
const style2 = extractValue(componentNode.props.style);
|
|
50465
|
-
const readOnly2 = extractValue.asOptionalBoolean(componentNode.props.readOnly);
|
|
50466
|
-
return /* @__PURE__ */ jsx(
|
|
50467
|
-
ItemWithLabel,
|
|
50468
|
-
{
|
|
50469
|
-
labelPosition,
|
|
50470
|
-
label: label2,
|
|
50471
|
-
labelWidth,
|
|
50472
|
-
labelBreak: labelBreak2,
|
|
50473
|
-
required: required2,
|
|
50474
|
-
enabled: enabled2,
|
|
50475
|
-
style: style2,
|
|
50476
|
-
className,
|
|
50477
|
-
shrinkToLabel: shrinkToLabel2,
|
|
50478
|
-
labelStyle: { pointerEvents: readOnly2 ? "none" : void 0 },
|
|
50479
|
-
isInputTemplateUsed: !!((_a2 = componentNode.props) == null ? void 0 : _a2.inputTemplate),
|
|
50480
|
-
children: node
|
|
50481
|
-
}
|
|
50482
|
-
);
|
|
50483
|
-
}
|
|
50484
|
-
};
|
|
50485
|
-
const getCoreBehaviors = () => {
|
|
50486
|
-
return [tooltipBehavior, animationBehavior, labelBehavior];
|
|
50487
|
-
};
|
|
50488
50670
|
const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
50489
50671
|
node,
|
|
50490
50672
|
state,
|
|
@@ -50643,7 +50825,7 @@ const ComponentAdapter = forwardRef(function ComponentAdapter2({
|
|
|
50643
50825
|
}
|
|
50644
50826
|
renderedNode = renderer(rendererContext);
|
|
50645
50827
|
}
|
|
50646
|
-
const behaviors =
|
|
50828
|
+
const behaviors = componentRegistry.getBehaviors();
|
|
50647
50829
|
if (!isCompoundComponent) {
|
|
50648
50830
|
for (const behavior of behaviors) {
|
|
50649
50831
|
if (behavior.canAttach(rendererContext.node, descriptor)) {
|
|
@@ -51588,7 +51770,7 @@ function ApiInterceptorProvider({
|
|
|
51588
51770
|
return;
|
|
51589
51771
|
}
|
|
51590
51772
|
void (async () => {
|
|
51591
|
-
const { initMock } = await import("./initMock-
|
|
51773
|
+
const { initMock } = await import("./initMock-BkgwDrCY.mjs");
|
|
51592
51774
|
const apiInstance2 = await initMock(interceptor);
|
|
51593
51775
|
setApiInstance(apiInstance2);
|
|
51594
51776
|
setInitialized(true);
|
|
@@ -51605,7 +51787,7 @@ function ApiInterceptorProvider({
|
|
|
51605
51787
|
if (define_process_env_default$2.VITE_MOCK_ENABLED) {
|
|
51606
51788
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
51607
51789
|
useWorker ? import("./apiInterceptorWorker-Dql7QGw2.mjs") : Promise.resolve({ createApiInterceptorWorker: () => null }),
|
|
51608
|
-
import("./initMock-
|
|
51790
|
+
import("./initMock-BkgwDrCY.mjs")
|
|
51609
51791
|
]);
|
|
51610
51792
|
if (interceptor || forceInitialize) {
|
|
51611
51793
|
const apiInstance2 = await initMock(interceptor || {});
|
|
@@ -51642,7 +51824,7 @@ function ApiInterceptorProvider({
|
|
|
51642
51824
|
void (async () => {
|
|
51643
51825
|
const [{ createApiInterceptorWorker }, { initMock }] = await Promise.all([
|
|
51644
51826
|
import("./apiInterceptorWorker-Dql7QGw2.mjs"),
|
|
51645
|
-
import("./initMock-
|
|
51827
|
+
import("./initMock-BkgwDrCY.mjs")
|
|
51646
51828
|
]);
|
|
51647
51829
|
const apiInstance2 = await initMock(interceptor);
|
|
51648
51830
|
await createApiInterceptorWorker(apiInstance2, parentInterceptorWorker);
|