@once-ui-system/core 1.6.4 → 1.7.1
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/components/Avatar.d.ts +1 -0
- package/dist/components/Avatar.d.ts.map +1 -1
- package/dist/components/Avatar.js +2 -2
- package/dist/components/Avatar.js.map +1 -1
- package/dist/components/BlobFx.d.ts +8 -0
- package/dist/components/BlobFx.d.ts.map +1 -0
- package/dist/components/BlobFx.js +82 -0
- package/dist/components/BlobFx.js.map +1 -0
- package/dist/components/Button.d.ts +1 -1
- package/dist/components/Button.d.ts.map +1 -1
- package/dist/components/Button.js +2 -2
- package/dist/components/Button.js.map +1 -1
- package/dist/components/Button.module.scss +62 -32
- package/dist/components/ContextMenu.d.ts +1 -0
- package/dist/components/ContextMenu.d.ts.map +1 -1
- package/dist/components/ContextMenu.js +8 -4
- package/dist/components/ContextMenu.js.map +1 -1
- package/dist/components/Dialog.d.ts.map +1 -1
- package/dist/components/Dialog.js +27 -5
- package/dist/components/Dialog.js.map +1 -1
- package/dist/components/Dropdown.d.ts +1 -0
- package/dist/components/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown.js +4 -2
- package/dist/components/Dropdown.js.map +1 -1
- package/dist/components/FadingLettersFx.d.ts +15 -0
- package/dist/components/FadingLettersFx.d.ts.map +1 -0
- package/dist/components/FadingLettersFx.js +27 -0
- package/dist/components/FadingLettersFx.js.map +1 -0
- package/dist/components/FadingLettersFx.module.scss +71 -0
- package/dist/components/IconButton.d.ts +5 -2
- package/dist/components/IconButton.d.ts.map +1 -1
- package/dist/components/IconButton.js +6 -4
- package/dist/components/IconButton.js.map +1 -1
- package/dist/components/IconButton.module.scss +14 -0
- package/dist/components/Input.d.ts +3 -1
- package/dist/components/Input.d.ts.map +1 -1
- package/dist/components/Input.js +19 -6
- package/dist/components/Input.js.map +1 -1
- package/dist/components/Input.module.scss +64 -10
- package/dist/components/Media.d.ts +5 -1
- package/dist/components/Media.d.ts.map +1 -1
- package/dist/components/Media.js +20 -7
- package/dist/components/Media.js.map +1 -1
- package/dist/components/Modal.d.ts +11 -0
- package/dist/components/Modal.d.ts.map +1 -0
- package/dist/components/Modal.js +72 -0
- package/dist/components/Modal.js.map +1 -0
- package/dist/components/NumberInput.d.ts.map +1 -1
- package/dist/components/NumberInput.js +1 -1
- package/dist/components/NumberInput.js.map +1 -1
- package/dist/components/ScrollContainer.d.ts +9 -0
- package/dist/components/ScrollContainer.d.ts.map +1 -0
- package/dist/components/ScrollContainer.js +67 -0
- package/dist/components/ScrollContainer.js.map +1 -0
- package/dist/components/ServerFlex.d.ts.map +1 -1
- package/dist/components/ServerFlex.js +3 -3
- package/dist/components/ServerFlex.js.map +1 -1
- package/dist/components/ServerGrid.d.ts.map +1 -1
- package/dist/components/ServerGrid.js +2 -2
- package/dist/components/ServerGrid.js.map +1 -1
- package/dist/components/SplitView.d.ts +16 -0
- package/dist/components/SplitView.d.ts.map +1 -0
- package/dist/components/SplitView.js +80 -0
- package/dist/components/SplitView.js.map +1 -0
- package/dist/components/SplitView.module.scss +18 -0
- package/dist/components/StylePanel.d.ts.map +1 -1
- package/dist/components/StylePanel.js +10 -10
- package/dist/components/StylePanel.js.map +1 -1
- package/dist/components/TagInput.d.ts +1 -2
- package/dist/components/TagInput.d.ts.map +1 -1
- package/dist/components/TagInput.js.map +1 -1
- package/dist/components/Textarea.d.ts +2 -0
- package/dist/components/Textarea.d.ts.map +1 -1
- package/dist/components/Textarea.js +18 -8
- package/dist/components/Textarea.js.map +1 -1
- package/dist/components/ThemeInit.d.ts.map +1 -1
- package/dist/components/ThemeInit.js +39 -40
- package/dist/components/ThemeInit.js.map +1 -1
- package/dist/components/Timeline.d.ts +1 -1
- package/dist/components/Timeline.d.ts.map +1 -1
- package/dist/components/Timeline.js +50 -6
- package/dist/components/Timeline.js.map +1 -1
- package/dist/components/ToggleButton.d.ts +2 -1
- package/dist/components/ToggleButton.d.ts.map +1 -1
- package/dist/components/ToggleButton.js +3 -3
- package/dist/components/ToggleButton.js.map +1 -1
- package/dist/components/ToggleButton.module.scss +27 -8
- package/dist/components/TypeFx.d.ts.map +1 -1
- package/dist/components/TypeFx.js +66 -87
- package/dist/components/TypeFx.js.map +1 -1
- package/dist/components/index.d.ts +9 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +9 -1
- package/dist/components/index.js.map +1 -1
- package/dist/css/styles.css +1 -1
- package/dist/css/styles.css.map +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/tokens.css.map +1 -1
- package/dist/interfaces.d.ts +1 -0
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/modules/code/CodeBlock.d.ts +3 -31
- package/dist/modules/code/CodeBlock.d.ts.map +1 -1
- package/dist/modules/code/CodeBlock.impl.d.ts +34 -0
- package/dist/modules/code/CodeBlock.impl.d.ts.map +1 -0
- package/dist/modules/code/CodeBlock.impl.js +487 -0
- package/dist/modules/code/CodeBlock.impl.js.map +1 -0
- package/dist/modules/code/CodeBlock.js +10 -483
- package/dist/modules/code/CodeBlock.js.map +1 -1
- package/dist/modules/data/BarChart.d.ts +1 -8
- package/dist/modules/data/BarChart.d.ts.map +1 -1
- package/dist/modules/data/BarChart.impl.d.ts +12 -0
- package/dist/modules/data/BarChart.impl.d.ts.map +1 -0
- package/dist/modules/data/BarChart.impl.js +137 -0
- package/dist/modules/data/BarChart.impl.js.map +1 -0
- package/dist/modules/data/BarChart.js +9 -132
- package/dist/modules/data/BarChart.js.map +1 -1
- package/dist/modules/data/DataTooltip.d.ts +2 -2
- package/dist/modules/data/DataTooltip.d.ts.map +1 -1
- package/dist/modules/data/Legend.d.ts +1 -1
- package/dist/modules/data/Legend.d.ts.map +1 -1
- package/dist/modules/data/LineBarChart.d.ts +1 -8
- package/dist/modules/data/LineBarChart.d.ts.map +1 -1
- package/dist/modules/data/LineBarChart.impl.d.ts +12 -0
- package/dist/modules/data/LineBarChart.impl.d.ts.map +1 -0
- package/dist/modules/data/LineBarChart.impl.js +142 -0
- package/dist/modules/data/LineBarChart.impl.js.map +1 -0
- package/dist/modules/data/LineBarChart.js +9 -137
- package/dist/modules/data/LineBarChart.js.map +1 -1
- package/dist/modules/data/LineChart.d.ts +1 -13
- package/dist/modules/data/LineChart.d.ts.map +1 -1
- package/dist/modules/data/LineChart.impl.d.ts +17 -0
- package/dist/modules/data/LineChart.impl.d.ts.map +1 -0
- package/dist/modules/data/LineChart.impl.js +148 -0
- package/dist/modules/data/LineChart.impl.js.map +1 -0
- package/dist/modules/data/LineChart.js +9 -143
- package/dist/modules/data/LineChart.js.map +1 -1
- package/dist/modules/data/PieChart.d.ts +4 -16
- package/dist/modules/data/PieChart.d.ts.map +1 -1
- package/dist/modules/data/PieChart.impl.d.ts +18 -0
- package/dist/modules/data/PieChart.impl.d.ts.map +1 -0
- package/dist/modules/data/PieChart.impl.js +102 -0
- package/dist/modules/data/PieChart.impl.js.map +1 -0
- package/dist/modules/data/PieChart.js +11 -97
- package/dist/modules/data/PieChart.js.map +1 -1
- package/dist/modules/media/MediaUpload.d.ts +2 -20
- package/dist/modules/media/MediaUpload.d.ts.map +1 -1
- package/dist/modules/media/MediaUpload.impl.d.ts +24 -0
- package/dist/modules/media/MediaUpload.impl.d.ts.map +1 -0
- package/dist/modules/media/MediaUpload.impl.js +92 -0
- package/dist/modules/media/MediaUpload.impl.js.map +1 -0
- package/dist/modules/media/MediaUpload.js +10 -88
- package/dist/modules/media/MediaUpload.js.map +1 -1
- package/dist/modules/navigation/Kbar.d.ts.map +1 -1
- package/dist/modules/navigation/Kbar.js +1 -1
- package/dist/modules/navigation/Kbar.js.map +1 -1
- package/dist/package.json +17 -6
- package/dist/src/__tests__/Dialog.test.d.ts +1 -0
- package/dist/src/components/Accordion.d.ts +21 -0
- package/dist/src/components/AccordionGroup.d.ts +15 -0
- package/dist/src/components/Animation.d.ts +33 -0
- package/dist/src/components/Arrow.d.ts +10 -0
- package/dist/src/components/ArrowNavigationContext.d.ts +32 -0
- package/dist/src/components/AutoScroll.d.ts +13 -0
- package/dist/src/components/Avatar.d.ts +20 -0
- package/dist/src/components/AvatarGroup.d.ts +13 -0
- package/dist/src/components/Background.d.ts +48 -0
- package/dist/src/components/Badge.d.ts +16 -0
- package/dist/src/components/Banner.d.ts +5 -0
- package/dist/src/components/BlobFx.d.ts +7 -0
- package/dist/src/components/BlockQuote.d.ts +20 -0
- package/dist/src/components/Button.d.ts +26 -0
- package/dist/src/components/Card.d.ts +12 -0
- package/dist/src/components/Carousel.d.ts +31 -0
- package/dist/src/components/CelebrationFx.d.ts +16 -0
- package/dist/src/components/Checkbox.d.ts +10 -0
- package/dist/src/components/Chip.d.ts +16 -0
- package/dist/src/components/ClientFlex.d.ts +12 -0
- package/dist/src/components/ClientGrid.d.ts +12 -0
- package/dist/src/components/ColorInput.d.ts +10 -0
- package/dist/src/components/Column.d.ts +6 -0
- package/dist/src/components/CompareImage.d.ts +15 -0
- package/dist/src/components/ContextMenu.d.ts +21 -0
- package/dist/src/components/CountFx.d.ts +14 -0
- package/dist/src/components/CountdownFx.d.ts +10 -0
- package/dist/src/components/Cursor.d.ts +7 -0
- package/dist/src/components/CursorCard.d.ts +12 -0
- package/dist/src/components/DateInput.d.ts +17 -0
- package/dist/src/components/DatePicker.d.ts +32 -0
- package/dist/src/components/DateRangeInput.d.ts +14 -0
- package/dist/src/components/DateRangePicker.d.ts +16 -0
- package/dist/src/components/Dialog.d.ts +19 -0
- package/dist/src/components/Dropdown.d.ts +12 -0
- package/dist/src/components/DropdownWrapper.d.ts +28 -0
- package/dist/src/components/ElementType.d.ts +13 -0
- package/dist/src/components/EmojiPicker.d.ts +15 -0
- package/dist/src/components/EmojiPickerDropdown.d.ts +10 -0
- package/dist/src/components/Fade.d.ts +18 -0
- package/dist/src/components/Feedback.d.ts +15 -0
- package/dist/src/components/Flex.d.ts +10 -0
- package/dist/src/components/FlipFx.d.ts +16 -0
- package/dist/src/components/GlitchFx.d.ts +11 -0
- package/dist/src/components/Grid.d.ts +10 -0
- package/dist/src/components/HoloFx.d.ts +31 -0
- package/dist/src/components/Hover.d.ts +13 -0
- package/dist/src/components/HoverCard.d.ts +4 -0
- package/dist/src/components/Icon.d.ts +17 -0
- package/dist/src/components/IconButton.d.ts +22 -0
- package/dist/src/components/InfiniteScroll.d.ts +15 -0
- package/dist/src/components/InlineCode.d.ts +9 -0
- package/dist/src/components/Input.d.ts +23 -0
- package/dist/src/components/InteractiveDetails.d.ts +14 -0
- package/dist/src/components/Kbd.d.ts +11 -0
- package/dist/src/components/Line.d.ts +8 -0
- package/dist/src/components/List.d.ts +10 -0
- package/dist/src/components/ListItem.d.ts +9 -0
- package/dist/src/components/Logo.d.ts +17 -0
- package/dist/src/components/LogoCloud.d.ts +13 -0
- package/dist/src/components/Mask.d.ts +14 -0
- package/dist/src/components/MasonryGrid.d.ts +21 -0
- package/dist/src/components/MatrixFx.d.ts +26 -0
- package/dist/src/components/Media.d.ts +25 -0
- package/dist/src/components/Modal.d.ts +10 -0
- package/dist/src/components/NavIcon.d.ts +10 -0
- package/dist/src/components/NumberInput.d.ts +12 -0
- package/dist/src/components/OTPInput.d.ts +12 -0
- package/dist/src/components/OgCard.d.ts +33 -0
- package/dist/src/components/Option.d.ts +20 -0
- package/dist/src/components/Particle.d.ts +20 -0
- package/dist/src/components/PasswordInput.d.ts +3 -0
- package/dist/src/components/ProgressBar.d.ts +14 -0
- package/dist/src/components/Pulse.d.ts +12 -0
- package/dist/src/components/RadioButton.d.ts +14 -0
- package/dist/src/components/RevealFx.d.ts +15 -0
- package/dist/src/components/Row.d.ts +6 -0
- package/dist/src/components/ScrollContainer.d.ts +8 -0
- package/dist/src/components/ScrollLock.integration.test.d.ts +1 -0
- package/dist/src/components/ScrollToTop.d.ts +6 -0
- package/dist/src/components/Scroller.d.ts +13 -0
- package/dist/src/components/SegmentedControl.d.ts +17 -0
- package/dist/src/components/Select.d.ts +18 -0
- package/dist/src/components/ShineFx.d.ts +12 -0
- package/dist/src/components/Skeleton.d.ts +12 -0
- package/dist/src/components/Slider.d.ts +16 -0
- package/dist/src/components/SmartLink.d.ts +17 -0
- package/dist/src/components/Spinner.d.ts +10 -0
- package/dist/src/components/SplitView.d.ts +15 -0
- package/dist/src/components/SplitView.js +79 -0
- package/dist/src/components/StatusIndicator.d.ts +11 -0
- package/dist/src/components/StyleOverlay.d.ts +9 -0
- package/dist/src/components/StylePanel.d.ts +7 -0
- package/dist/src/components/Swiper.d.ts +16 -0
- package/dist/src/components/Switch.d.ts +16 -0
- package/dist/src/components/Table.d.ts +15 -0
- package/dist/src/components/Tag.d.ts +15 -0
- package/dist/src/components/TagInput.d.ts +8 -0
- package/dist/src/components/Textarea.d.ts +22 -0
- package/dist/src/components/ThemeSwitcher.d.ts +3 -0
- package/dist/src/components/TiltFx.d.ts +9 -0
- package/dist/src/components/Timeline.d.ts +17 -0
- package/dist/src/components/Toast.d.ts +11 -0
- package/dist/src/components/Toaster.d.ts +12 -0
- package/dist/src/components/ToggleButton.d.ts +23 -0
- package/dist/src/components/Tooltip.d.ts +12 -0
- package/dist/src/components/TypeFx.d.ts +14 -0
- package/dist/src/components/User.d.ts +15 -0
- package/dist/src/components/UserMenu.d.ts +12 -0
- package/dist/src/components/WeatherFx.d.ts +17 -0
- package/dist/src/components/index.d.ts +120 -0
- package/dist/src/contexts/DataThemeProvider.d.ts +25 -0
- package/dist/src/contexts/ThemeProvider.d.ts +48 -0
- package/dist/src/contexts/ToastProvider.d.ts +17 -0
- package/dist/src/contexts/index.d.ts +5 -0
- package/dist/src/data/emoji-data.json +16062 -0
- package/dist/src/index.d.ts +9 -0
- package/dist/src/modules/code/CodeBlock.d.ts +5 -0
- package/dist/src/modules/code/CodeBlock.impl.d.ts +33 -0
- package/dist/src/modules/data/BarChart.d.ts +5 -0
- package/dist/src/modules/data/BarChart.impl.d.ts +11 -0
- package/dist/src/modules/data/ChartHeader.d.ts +13 -0
- package/dist/src/modules/data/ChartStatus.d.ts +9 -0
- package/dist/src/modules/data/DataTooltip.d.ts +15 -0
- package/dist/src/modules/data/Gradient.d.ts +31 -0
- package/dist/src/modules/data/Legend.d.ts +14 -0
- package/dist/src/modules/data/LineBarChart.d.ts +5 -0
- package/dist/src/modules/data/LineBarChart.impl.d.ts +11 -0
- package/dist/src/modules/data/LineChart.d.ts +5 -0
- package/dist/src/modules/data/LineChart.impl.d.ts +16 -0
- package/dist/src/modules/data/LinearGauge.d.ts +17 -0
- package/dist/src/modules/data/PieChart.d.ts +5 -0
- package/dist/src/modules/data/PieChart.impl.d.ts +17 -0
- package/dist/src/modules/data/RadialGauge.d.ts +24 -0
- package/dist/src/modules/data/Swatch.d.ts +8 -0
- package/dist/src/modules/data/index.d.ts +13 -0
- package/dist/src/modules/data/interfaces.d.ts +52 -0
- package/dist/src/modules/data/utils/formatDate.d.ts +11 -0
- package/dist/src/modules/index.d.ts +7 -0
- package/dist/src/modules/media/MediaUpload.d.ts +5 -0
- package/dist/src/modules/media/MediaUpload.impl.d.ts +23 -0
- package/dist/src/modules/navigation/HeadingLink.d.ts +10 -0
- package/dist/src/modules/navigation/HeadingNav.d.ts +7 -0
- package/dist/src/modules/navigation/Kbar.d.ts +33 -0
- package/dist/src/modules/navigation/MegaMenu.d.ts +27 -0
- package/dist/src/modules/navigation/MobileMegaMenu.d.ts +27 -0
- package/dist/src/modules/navigation/index.d.ts +5 -0
- package/dist/src/utils/MissingDependency.d.ts +6 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/styles/size.scss +20 -0
- package/dist/test/dialogTestUtils.d.ts +2 -0
- package/dist/test/dialogTestUtils.d.ts.map +1 -0
- package/dist/test/dialogTestUtils.js +12 -0
- package/dist/test/dialogTestUtils.js.map +1 -0
- package/dist/test/setup.d.ts +2 -0
- package/dist/test/setup.d.ts.map +1 -0
- package/dist/test/setup.js +59 -0
- package/dist/test/setup.js.map +1 -0
- package/dist/tokens/layout.scss +5 -0
- package/dist/utils/MissingDependency.d.ts +7 -0
- package/dist/utils/MissingDependency.d.ts.map +1 -0
- package/dist/utils/MissingDependency.js +6 -0
- package/dist/utils/MissingDependency.js.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +1 -0
- package/dist/utils/index.js.map +1 -1
- package/package.json +35 -13
- package/tsconfig.vitest.json +20 -0
- package/vitest.config.ts +19 -0
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { SpacingToken } from "../../types";
|
|
3
|
+
import { Flex } from "../../components";
|
|
4
|
+
type CodeInstance = {
|
|
5
|
+
code: string | {
|
|
6
|
+
content: string;
|
|
7
|
+
error: string | null;
|
|
8
|
+
};
|
|
9
|
+
language: string | ["diff", string];
|
|
10
|
+
label: string;
|
|
11
|
+
highlight?: string;
|
|
12
|
+
prefixIcon?: string;
|
|
13
|
+
startLineNumber?: number;
|
|
14
|
+
};
|
|
15
|
+
export interface CodeBlockProps extends React.ComponentProps<typeof Flex> {
|
|
16
|
+
codeHeight?: number;
|
|
17
|
+
fillHeight?: boolean;
|
|
18
|
+
previewPadding?: SpacingToken;
|
|
19
|
+
codes?: CodeInstance[];
|
|
20
|
+
preview?: ReactNode;
|
|
21
|
+
copyButton?: boolean;
|
|
22
|
+
styleButton?: boolean;
|
|
23
|
+
reloadButton?: boolean;
|
|
24
|
+
fullscreenButton?: boolean;
|
|
25
|
+
compact?: boolean;
|
|
26
|
+
className?: string;
|
|
27
|
+
style?: React.CSSProperties;
|
|
28
|
+
onInstanceChange?: (index: number) => void;
|
|
29
|
+
lineNumbers?: boolean;
|
|
30
|
+
highlight?: string;
|
|
31
|
+
}
|
|
32
|
+
declare const CodeBlock: React.FC<CodeBlockProps>;
|
|
33
|
+
export default CodeBlock;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChartProps, barWidth } from ".";
|
|
3
|
+
export interface BarChartProps extends ChartProps {
|
|
4
|
+
barWidth?: barWidth;
|
|
5
|
+
hover?: boolean;
|
|
6
|
+
reverseY?: boolean;
|
|
7
|
+
reverseX?: boolean;
|
|
8
|
+
"data-viz-style"?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const BarChart: React.FC<BarChartProps>;
|
|
11
|
+
export default BarChart;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Column, DateRange } from "../../components";
|
|
3
|
+
import { DateConfig, PresetsConfig } from "./interfaces";
|
|
4
|
+
interface ChartHeaderProps extends Omit<React.ComponentProps<typeof Column>, "title" | "description"> {
|
|
5
|
+
title?: React.ReactNode;
|
|
6
|
+
description?: React.ReactNode;
|
|
7
|
+
dateRange?: DateRange;
|
|
8
|
+
date?: DateConfig;
|
|
9
|
+
onDateRangeChange?: (range: DateRange) => void;
|
|
10
|
+
presets?: PresetsConfig;
|
|
11
|
+
}
|
|
12
|
+
export declare const ChartHeader: React.FC<ChartHeaderProps>;
|
|
13
|
+
export type { ChartHeaderProps };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChartVariant, DateConfig } from "./interfaces";
|
|
3
|
+
interface DataTooltipProps {
|
|
4
|
+
active?: boolean;
|
|
5
|
+
payload?: readonly any[];
|
|
6
|
+
label?: string | number;
|
|
7
|
+
dataKey?: string;
|
|
8
|
+
DataTooltip?: React.ReactNode;
|
|
9
|
+
date?: DateConfig;
|
|
10
|
+
colors?: boolean;
|
|
11
|
+
variant?: ChartVariant;
|
|
12
|
+
}
|
|
13
|
+
declare const DataTooltip: React.FC<DataTooltipProps>;
|
|
14
|
+
export { DataTooltip };
|
|
15
|
+
export type { DataTooltipProps };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChartVariant } from "./interfaces";
|
|
3
|
+
interface GradientStop {
|
|
4
|
+
offset: string;
|
|
5
|
+
opacity: number;
|
|
6
|
+
variant?: ChartVariant;
|
|
7
|
+
}
|
|
8
|
+
interface LinearGradientProps {
|
|
9
|
+
id: string;
|
|
10
|
+
color: string;
|
|
11
|
+
x1?: string;
|
|
12
|
+
y1?: string;
|
|
13
|
+
x2?: string;
|
|
14
|
+
y2?: string;
|
|
15
|
+
stops?: GradientStop[];
|
|
16
|
+
variant?: ChartVariant;
|
|
17
|
+
}
|
|
18
|
+
interface RadialGradientProps {
|
|
19
|
+
id: string;
|
|
20
|
+
color: string;
|
|
21
|
+
cx?: string;
|
|
22
|
+
cy?: string;
|
|
23
|
+
r?: string;
|
|
24
|
+
fx?: string;
|
|
25
|
+
fy?: string;
|
|
26
|
+
stops?: GradientStop[];
|
|
27
|
+
variant?: ChartVariant;
|
|
28
|
+
}
|
|
29
|
+
export declare const LinearGradient: React.FC<LinearGradientProps>;
|
|
30
|
+
export declare const RadialGradient: React.FC<RadialGradientProps>;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChartVariant } from "./interfaces";
|
|
3
|
+
interface LegendProps {
|
|
4
|
+
payload?: readonly any[];
|
|
5
|
+
labels?: "x" | "y" | "both" | "none";
|
|
6
|
+
colors?: string[];
|
|
7
|
+
reverseY?: boolean;
|
|
8
|
+
direction?: "row" | "column";
|
|
9
|
+
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center";
|
|
10
|
+
variant?: ChartVariant;
|
|
11
|
+
}
|
|
12
|
+
declare const Legend: React.FC<LegendProps>;
|
|
13
|
+
export { Legend };
|
|
14
|
+
export type { LegendProps };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChartProps, barWidth, curveType } from ".";
|
|
3
|
+
export interface LineBarChartProps extends ChartProps {
|
|
4
|
+
barWidth?: barWidth;
|
|
5
|
+
curve?: curveType;
|
|
6
|
+
reverseY?: boolean;
|
|
7
|
+
reverseX?: boolean;
|
|
8
|
+
"data-viz-style"?: string;
|
|
9
|
+
}
|
|
10
|
+
declare const LineBarChart: React.FC<LineBarChartProps>;
|
|
11
|
+
export default LineBarChart;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChartProps, curveType } from ".";
|
|
3
|
+
export interface LineChartProps extends ChartProps {
|
|
4
|
+
curve?: curveType;
|
|
5
|
+
reverseY?: boolean;
|
|
6
|
+
reverseX?: boolean;
|
|
7
|
+
animation?: boolean;
|
|
8
|
+
animationBegin?: number;
|
|
9
|
+
animationDuration?: number;
|
|
10
|
+
animationEasing?: unknown;
|
|
11
|
+
xAxisType?: "number" | "category";
|
|
12
|
+
xDomain?: [number, number];
|
|
13
|
+
"data-viz-style"?: string;
|
|
14
|
+
}
|
|
15
|
+
declare const LineChart: React.FC<LineChartProps>;
|
|
16
|
+
export default LineChart;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Flex } from "../../";
|
|
3
|
+
interface LinearGaugeProps extends React.ComponentProps<typeof Flex> {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
line?: {
|
|
7
|
+
count?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
length?: number;
|
|
10
|
+
};
|
|
11
|
+
value?: number;
|
|
12
|
+
labels?: "none" | "percentage" | string[];
|
|
13
|
+
hue?: "success" | "neutral" | "danger" | [number, number];
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const LinearGauge: ({ width, height, line, value, labels, hue, color, ...flex }: LinearGaugeProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ChartProps } from "../../";
|
|
3
|
+
export interface PieChartProps extends ChartProps {
|
|
4
|
+
"data-viz-style"?: string;
|
|
5
|
+
ring?: {
|
|
6
|
+
inner: number;
|
|
7
|
+
outer: number;
|
|
8
|
+
};
|
|
9
|
+
dataKey?: string;
|
|
10
|
+
nameKey?: string;
|
|
11
|
+
origo?: {
|
|
12
|
+
x: number;
|
|
13
|
+
y: number;
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
declare const PieChart: React.FC<PieChartProps>;
|
|
17
|
+
export default PieChart;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Column } from "../../";
|
|
3
|
+
interface RadialGaugeProps extends Omit<React.ComponentProps<typeof Column>, 'direction'> {
|
|
4
|
+
width?: number;
|
|
5
|
+
height?: number;
|
|
6
|
+
line?: {
|
|
7
|
+
count?: number;
|
|
8
|
+
width?: number;
|
|
9
|
+
length?: number;
|
|
10
|
+
};
|
|
11
|
+
unit?: React.ReactNode;
|
|
12
|
+
value?: number;
|
|
13
|
+
angle?: {
|
|
14
|
+
start: number;
|
|
15
|
+
sweep: number;
|
|
16
|
+
};
|
|
17
|
+
direction?: 'cw' | 'ccw';
|
|
18
|
+
edgePad?: number;
|
|
19
|
+
children?: React.ReactNode;
|
|
20
|
+
hue?: "success" | "neutral" | "danger" | [number, number];
|
|
21
|
+
color?: string;
|
|
22
|
+
}
|
|
23
|
+
export declare const RadialGauge: ({ width, height, line, value, angle, direction, edgePad, unit, children, hue, color, ...flex }: RadialGaugeProps) => import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from "./interfaces";
|
|
2
|
+
export * from "./LineChart";
|
|
3
|
+
export * from "./BarChart";
|
|
4
|
+
export * from "./PieChart";
|
|
5
|
+
export * from "./LineBarChart";
|
|
6
|
+
export * from "./RadialGauge";
|
|
7
|
+
export * from "./LinearGauge";
|
|
8
|
+
export * from "./ChartHeader";
|
|
9
|
+
export * from "./ChartStatus";
|
|
10
|
+
export * from "./Gradient";
|
|
11
|
+
export * from "./DataTooltip";
|
|
12
|
+
export * from "./Legend";
|
|
13
|
+
export * from "./Swatch";
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { Flex, DateRange } from "../../components";
|
|
2
|
+
import { TShirtSizes } from "../../types";
|
|
3
|
+
import { CurveType } from "recharts/types/shape/Curve";
|
|
4
|
+
type ChartVariant = "flat" | "gradient" | "outline";
|
|
5
|
+
type ChartMode = "categorical" | "divergent" | "sequential";
|
|
6
|
+
type barWidth = TShirtSizes | "fill" | number;
|
|
7
|
+
type curveType = CurveType;
|
|
8
|
+
interface DataPoint {
|
|
9
|
+
[key: string]: string | number | Date | undefined;
|
|
10
|
+
label?: string;
|
|
11
|
+
}
|
|
12
|
+
interface SeriesConfig {
|
|
13
|
+
key: string;
|
|
14
|
+
color?: string;
|
|
15
|
+
}
|
|
16
|
+
interface PresetsConfig {
|
|
17
|
+
display: boolean;
|
|
18
|
+
granularity: "year" | "month" | "week";
|
|
19
|
+
}
|
|
20
|
+
interface DateConfig {
|
|
21
|
+
start?: Date;
|
|
22
|
+
end?: Date;
|
|
23
|
+
max?: Date;
|
|
24
|
+
min?: Date;
|
|
25
|
+
dual?: boolean;
|
|
26
|
+
format?: string;
|
|
27
|
+
presets?: PresetsConfig;
|
|
28
|
+
selector?: boolean;
|
|
29
|
+
onChange?: (range: DateRange) => void;
|
|
30
|
+
}
|
|
31
|
+
interface legendConfig {
|
|
32
|
+
display?: boolean;
|
|
33
|
+
direction?: "row" | "column";
|
|
34
|
+
position?: "top-left" | "top-right" | "bottom-left" | "bottom-right" | "top-center" | "bottom-center";
|
|
35
|
+
}
|
|
36
|
+
interface ChartProps extends Omit<React.ComponentProps<typeof Flex>, "title" | "description"> {
|
|
37
|
+
title?: React.ReactNode;
|
|
38
|
+
description?: React.ReactNode;
|
|
39
|
+
series: SeriesConfig | SeriesConfig[];
|
|
40
|
+
data: DataPoint[];
|
|
41
|
+
legend?: legendConfig;
|
|
42
|
+
date?: DateConfig;
|
|
43
|
+
emptyState?: React.ReactNode;
|
|
44
|
+
errorState?: React.ReactNode;
|
|
45
|
+
error?: boolean;
|
|
46
|
+
tooltip?: boolean;
|
|
47
|
+
grid?: "x" | "y" | "both" | "none";
|
|
48
|
+
axis?: "x" | "y" | "both" | "none";
|
|
49
|
+
variant?: ChartVariant;
|
|
50
|
+
loading?: boolean;
|
|
51
|
+
}
|
|
52
|
+
export type { DataPoint, SeriesConfig, DateConfig, PresetsConfig, ChartProps, ChartVariant, barWidth, curveType, ChartMode, };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DateConfig } from "../interfaces";
|
|
2
|
+
/**
|
|
3
|
+
* Formats a value as a date if it's a valid date and a format is provided
|
|
4
|
+
* Otherwise returns the original value or label if available
|
|
5
|
+
*
|
|
6
|
+
* @param value - The value to format (could be a date, string, or any other value)
|
|
7
|
+
* @param dateConfig - Optional date configuration with format string
|
|
8
|
+
* @param dataPoint - Optional data point object that might contain a label property
|
|
9
|
+
* @returns Formatted date string or original value
|
|
10
|
+
*/
|
|
11
|
+
export declare function formatDate(value: any, dateConfig?: DateConfig, dataPoint?: Record<string, any>): string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { CodeBlock } from "./code/CodeBlock";
|
|
2
|
+
export { MediaUpload } from "./media/MediaUpload";
|
|
3
|
+
export { Meta } from "./seo/Meta";
|
|
4
|
+
export { Schema } from "./seo/Schema";
|
|
5
|
+
export { Kbar, MobileMegaMenu, MegaMenu, HeadingLink, HeadingNav } from "./navigation";
|
|
6
|
+
export { ChartHeader, ChartStatus, LinearGradient, RadialGradient, BarChart, LineChart, PieChart, LineBarChart, DataTooltip, Legend, RadialGauge, LinearGauge } from "./data";
|
|
7
|
+
export type { ChartProps, ChartVariant, ChartMode, DataPoint } from "./data";
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { MediaUploadProps } from "./MediaUpload.impl";
|
|
3
|
+
declare const MediaUpload: React.ForwardRefExoticComponent<Omit<MediaUploadProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
4
|
+
export { MediaUpload };
|
|
5
|
+
export type { MediaUploadProps };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Flex } from "../../";
|
|
3
|
+
export interface MediaUploadProps extends React.ComponentProps<typeof Flex> {
|
|
4
|
+
onFileUpload?: (file: File) => Promise<void>;
|
|
5
|
+
compress?: boolean;
|
|
6
|
+
aspectRatio?: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
style?: React.CSSProperties;
|
|
9
|
+
initialPreviewImage?: string | null;
|
|
10
|
+
emptyState?: React.ReactNode;
|
|
11
|
+
quality?: number;
|
|
12
|
+
sizes?: string;
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
convertTypes?: string[];
|
|
15
|
+
resizeMaxWidth?: number;
|
|
16
|
+
resizeMaxHeight?: number;
|
|
17
|
+
resizeWidth?: number;
|
|
18
|
+
resizeHeight?: number;
|
|
19
|
+
loading?: boolean;
|
|
20
|
+
accept?: string;
|
|
21
|
+
}
|
|
22
|
+
declare const MediaUpload: React.ForwardRefExoticComponent<Omit<MediaUploadProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
23
|
+
export default MediaUpload;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Row } from "../../components";
|
|
3
|
+
interface HeadingLinkProps extends React.ComponentProps<typeof Row> {
|
|
4
|
+
id: string;
|
|
5
|
+
as: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
style?: React.CSSProperties;
|
|
8
|
+
}
|
|
9
|
+
export declare const HeadingLink: React.FC<HeadingLinkProps>;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Flex } from "../../";
|
|
3
|
+
interface props extends React.ComponentProps<typeof Flex> {
|
|
4
|
+
header?: boolean;
|
|
5
|
+
}
|
|
6
|
+
declare const HeadingNav: React.ForwardRefExoticComponent<Omit<props, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
+
export { HeadingNav };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
export interface KbarItem {
|
|
3
|
+
id: string;
|
|
4
|
+
name: string;
|
|
5
|
+
section: string;
|
|
6
|
+
shortcut: string[];
|
|
7
|
+
keywords: string;
|
|
8
|
+
href?: string;
|
|
9
|
+
perform?: () => void;
|
|
10
|
+
icon?: string;
|
|
11
|
+
description?: ReactNode;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
}
|
|
14
|
+
interface KbarTriggerProps {
|
|
15
|
+
onClick?: () => void;
|
|
16
|
+
children: React.ReactNode;
|
|
17
|
+
[key: string]: any;
|
|
18
|
+
}
|
|
19
|
+
export declare const KbarTrigger: React.FC<KbarTriggerProps>;
|
|
20
|
+
interface KbarContentProps {
|
|
21
|
+
isOpen: boolean;
|
|
22
|
+
onClose: () => void;
|
|
23
|
+
items: KbarItem[];
|
|
24
|
+
placeholder?: string;
|
|
25
|
+
}
|
|
26
|
+
export declare const KbarContent: React.FC<KbarContentProps>;
|
|
27
|
+
export interface KbarProps {
|
|
28
|
+
items: KbarItem[];
|
|
29
|
+
children: React.ReactNode;
|
|
30
|
+
[key: string]: any;
|
|
31
|
+
}
|
|
32
|
+
export declare const Kbar: React.FC<KbarProps>;
|
|
33
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React, { ReactNode } from "react";
|
|
2
|
+
import { Flex } from "../../";
|
|
3
|
+
export interface MenuLink {
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
href: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
description?: ReactNode;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface MenuSection {
|
|
11
|
+
title?: ReactNode;
|
|
12
|
+
links: MenuLink[];
|
|
13
|
+
}
|
|
14
|
+
export interface MenuGroup {
|
|
15
|
+
id: string;
|
|
16
|
+
label: ReactNode;
|
|
17
|
+
suffixIcon?: string;
|
|
18
|
+
href?: string;
|
|
19
|
+
selected?: boolean;
|
|
20
|
+
sections?: MenuSection[];
|
|
21
|
+
content?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export interface MegaMenuProps extends React.ComponentProps<typeof Flex> {
|
|
24
|
+
menuGroups: MenuGroup[];
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare const MegaMenu: React.FC<MegaMenuProps>;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Flex } from "../../";
|
|
3
|
+
interface MenuLink {
|
|
4
|
+
label: React.ReactNode;
|
|
5
|
+
href: string;
|
|
6
|
+
icon?: string;
|
|
7
|
+
description?: React.ReactNode;
|
|
8
|
+
selected?: boolean;
|
|
9
|
+
}
|
|
10
|
+
interface MenuSection {
|
|
11
|
+
title?: React.ReactNode;
|
|
12
|
+
links: MenuLink[];
|
|
13
|
+
}
|
|
14
|
+
interface MenuGroup {
|
|
15
|
+
id: string;
|
|
16
|
+
label: React.ReactNode;
|
|
17
|
+
suffixIcon?: string;
|
|
18
|
+
href?: string;
|
|
19
|
+
selected?: boolean;
|
|
20
|
+
sections?: MenuSection[];
|
|
21
|
+
}
|
|
22
|
+
interface MobileMegaMenuProps extends React.ComponentProps<typeof Flex> {
|
|
23
|
+
menuGroups: MenuGroup[];
|
|
24
|
+
onClose?: () => void;
|
|
25
|
+
}
|
|
26
|
+
declare const MobileMegaMenu: React.FC<MobileMegaMenuProps>;
|
|
27
|
+
export { MobileMegaMenu };
|
package/dist/styles/size.scss
CHANGED
|
@@ -24,6 +24,26 @@
|
|
|
24
24
|
height: fit-content;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
.max-width-xs {
|
|
28
|
+
max-width: var(--responsive-width-xs);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.max-width-s {
|
|
32
|
+
max-width: var(--responsive-width-s);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.max-width-m {
|
|
36
|
+
max-width: var(--responsive-width-m);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.max-width-l {
|
|
40
|
+
max-width: var(--responsive-width-l);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.max-width-xl {
|
|
44
|
+
max-width: var(--responsive-width-xl);
|
|
45
|
+
}
|
|
46
|
+
|
|
27
47
|
.min-width-0 {
|
|
28
48
|
min-width: 0;
|
|
29
49
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialogTestUtils.d.ts","sourceRoot":"","sources":["../../src/test/dialogTestUtils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,YAW5B,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export const resetDialogState = () => {
|
|
2
|
+
document.body.innerHTML = "";
|
|
3
|
+
document.body.style.overflow = "";
|
|
4
|
+
document.body.style.paddingRight = "";
|
|
5
|
+
document.documentElement.style.overflow = "";
|
|
6
|
+
document.body.childNodes.forEach((node) => {
|
|
7
|
+
if (node instanceof HTMLElement) {
|
|
8
|
+
node.inert = false;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=dialogTestUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialogTestUtils.js","sourceRoot":"","sources":["../../src/test/dialogTestUtils.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,QAAQ,CAAC,IAAI,CAAC,SAAS,GAAG,EAAE,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;IAClC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC;IACtC,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,GAAG,EAAE,CAAC;IAE7C,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;QACxC,IAAI,IAAI,YAAY,WAAW,EAAE,CAAC;YAChC,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;QACrB,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/test/setup.ts"],"names":[],"mappings":"AAAA,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import "@testing-library/jest-dom";
|
|
2
|
+
import { cleanup } from "@testing-library/react";
|
|
3
|
+
import { afterEach, vi } from "vitest";
|
|
4
|
+
class ResizeObserverMock {
|
|
5
|
+
observe() { }
|
|
6
|
+
unobserve() { }
|
|
7
|
+
disconnect() { }
|
|
8
|
+
}
|
|
9
|
+
const installBrowserMocks = () => {
|
|
10
|
+
if (!("ResizeObserver" in globalThis)) {
|
|
11
|
+
Object.defineProperty(globalThis, "ResizeObserver", {
|
|
12
|
+
configurable: true,
|
|
13
|
+
writable: true,
|
|
14
|
+
value: ResizeObserverMock,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
Object.defineProperty(window, "scrollTo", {
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: vi.fn(),
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(window, "matchMedia", {
|
|
23
|
+
configurable: true,
|
|
24
|
+
writable: true,
|
|
25
|
+
value: vi.fn().mockImplementation((query) => ({
|
|
26
|
+
matches: false,
|
|
27
|
+
media: query,
|
|
28
|
+
onchange: null,
|
|
29
|
+
addListener: vi.fn(),
|
|
30
|
+
removeListener: vi.fn(),
|
|
31
|
+
addEventListener: vi.fn(),
|
|
32
|
+
removeEventListener: vi.fn(),
|
|
33
|
+
dispatchEvent: vi.fn(),
|
|
34
|
+
})),
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
installBrowserMocks();
|
|
38
|
+
if (!("inert" in HTMLElement.prototype)) {
|
|
39
|
+
Object.defineProperty(HTMLElement.prototype, "inert", {
|
|
40
|
+
configurable: true,
|
|
41
|
+
get() {
|
|
42
|
+
return this.hasAttribute("inert");
|
|
43
|
+
},
|
|
44
|
+
set(value) {
|
|
45
|
+
if (value) {
|
|
46
|
+
this.setAttribute("inert", "");
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
this.removeAttribute("inert");
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
afterEach(() => {
|
|
55
|
+
cleanup();
|
|
56
|
+
vi.restoreAllMocks();
|
|
57
|
+
installBrowserMocks();
|
|
58
|
+
});
|
|
59
|
+
//# sourceMappingURL=setup.js.map
|