wimui 0.51.2 → 0.52.2
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/_internal/FeedbackCloseButton.cjs +1 -1
- package/dist/components/_internal/FeedbackCloseButton.js +14 -13
- package/dist/components/_internal/FieldLabelContent.cjs +1 -1
- package/dist/components/_internal/FieldLabelContent.js +18 -17
- package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.cjs +1 -1
- package/dist/components/ai/AIResponseFeedback/AIResponseFeedback.js +46 -45
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.cjs +1 -1
- package/dist/components/ai/AIResponseFeedback/airesponse-feedback.module.js +1 -1
- package/dist/components/ai/AgentStatus/AgentStatus.cjs +1 -1
- package/dist/components/ai/AgentStatus/AgentStatus.js +24 -23
- package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.cjs +1 -1
- package/dist/components/ai/ArtifactsOverlay/ArtifactsOverlay.js +47 -45
- package/dist/components/ai/ChatUI/ChatUI.cjs +1 -1
- package/dist/components/ai/ChatUI/ChatUI.js +82 -81
- package/dist/components/ai/CodeBlock/CodeBlock.cjs +3 -3
- package/dist/components/ai/CodeBlock/CodeBlock.js +53 -52
- package/dist/components/ai/CodeBlock/code-block.module.cjs +1 -1
- package/dist/components/ai/CodeBlock/code-block.module.js +1 -1
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.cjs +2 -2
- package/dist/components/ai/CodeDiffViewer/CodeDiffViewer.js +105 -104
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.cjs +1 -1
- package/dist/components/ai/CodeDiffViewer/code-diff-viewer.module.js +2 -2
- package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.cjs +1 -1
- package/dist/components/ai/MarkdownRenderer/MarkdownRenderer.js +60 -59
- package/dist/components/ai/ModelSelector/ModelSelector.cjs +1 -1
- package/dist/components/ai/ModelSelector/ModelSelector.js +83 -82
- package/dist/components/ai/ModelSelector/model-selector.module.cjs +1 -1
- package/dist/components/ai/ModelSelector/model-selector.module.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.cjs +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +76 -75
- package/dist/components/ai/SourceCitation/SourceCitation.cjs +1 -1
- package/dist/components/ai/SourceCitation/SourceCitation.js +39 -38
- package/dist/components/ai/Terminal/Terminal.cjs +2 -2
- package/dist/components/ai/Terminal/Terminal.js +65 -64
- package/dist/components/ai/Terminal/terminal.module.cjs +1 -1
- package/dist/components/ai/Terminal/terminal.module.js +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.cjs +1 -1
- package/dist/components/ai/ThoughtProcess/thought-process.module.js +4 -4
- package/dist/components/ai/ThreadList/ThreadList.cjs +1 -1
- package/dist/components/ai/ThreadList/ThreadList.js +58 -57
- package/dist/components/ai/ThreadList/thread-list.module.cjs +1 -1
- package/dist/components/ai/ThreadList/thread-list.module.js +1 -1
- package/dist/components/data-display/Accordion/accordion.module.cjs +1 -1
- package/dist/components/data-display/Accordion/accordion.module.js +1 -1
- package/dist/components/data-display/Barcode/Barcode.cjs +1 -1
- package/dist/components/data-display/Barcode/Barcode.js +76 -75
- package/dist/components/data-display/Calendar/Calendar.cjs +1 -1
- package/dist/components/data-display/Calendar/Calendar.js +75 -74
- package/dist/components/data-display/Calendar/calendar.module.cjs +1 -1
- package/dist/components/data-display/Calendar/calendar.module.js +1 -1
- package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.cjs +1 -1
- package/dist/components/data-display/CalendarHeatmap/CalendarHeatmap.js +54 -52
- package/dist/components/data-display/Carousel/Carousel.cjs +1 -1
- package/dist/components/data-display/Carousel/Carousel.js +62 -61
- package/dist/components/data-display/Carousel/carousel.module.cjs +1 -1
- package/dist/components/data-display/Carousel/carousel.module.js +1 -1
- package/dist/components/data-display/Chip/Chip.cjs +1 -1
- package/dist/components/data-display/Chip/Chip.js +36 -35
- package/dist/components/data-display/Comment/Comment.cjs +1 -1
- package/dist/components/data-display/Comment/Comment.js +58 -57
- package/dist/components/data-display/Comment/comment.module.cjs +1 -1
- package/dist/components/data-display/Comment/comment.module.js +1 -1
- package/dist/components/data-display/Countdown/Countdown.cjs +1 -1
- package/dist/components/data-display/Countdown/Countdown.js +56 -55
- package/dist/components/data-display/DataGrid/DataGrid.cjs +1 -1
- package/dist/components/data-display/DataGrid/DataGrid.js +128 -127
- package/dist/components/data-display/JsonViewer/JsonViewer.cjs +1 -1
- package/dist/components/data-display/JsonViewer/JsonViewer.js +153 -152
- package/dist/components/data-display/JsonViewer/json-viewer.module.cjs +1 -1
- package/dist/components/data-display/JsonViewer/json-viewer.module.js +3 -3
- package/dist/components/data-display/Kanban/Kanban.cjs +1 -1
- package/dist/components/data-display/Kanban/Kanban.js +95 -94
- package/dist/components/data-display/NodeGraph/NodeGraph.cjs +1 -1
- package/dist/components/data-display/NodeGraph/NodeGraph.js +62 -61
- package/dist/components/data-display/NodeGraph/node-graph.module.cjs +1 -1
- package/dist/components/data-display/NodeGraph/node-graph.module.js +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.cjs +1 -1
- package/dist/components/data-display/PivotTable/PivotTable.js +153 -152
- package/dist/components/data-display/PivotTable/pivot-table.module.cjs +1 -1
- package/dist/components/data-display/PivotTable/pivot-table.module.js +1 -1
- package/dist/components/data-display/Presence/Presence.cjs +1 -1
- package/dist/components/data-display/Presence/Presence.js +28 -27
- package/dist/components/data-display/PullToRefresh/PullToRefresh.cjs +1 -1
- package/dist/components/data-display/PullToRefresh/PullToRefresh.js +73 -72
- package/dist/components/data-display/Reaction/Reaction.cjs +1 -1
- package/dist/components/data-display/Reaction/Reaction.js +31 -30
- package/dist/components/data-display/ScheduleView/ScheduleView.cjs +1 -1
- package/dist/components/data-display/ScheduleView/ScheduleView.js +49 -48
- package/dist/components/data-display/SortableList/SortableList.cjs +1 -1
- package/dist/components/data-display/SortableList/SortableList.js +44 -43
- package/dist/components/data-display/Tag/Tag.cjs +1 -1
- package/dist/components/data-display/Tag/Tag.js +29 -28
- package/dist/components/data-display/Tag/tag.module.cjs +1 -1
- package/dist/components/data-display/Tag/tag.module.js +1 -1
- package/dist/components/data-display/TreeDiagram/TreeDiagram.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/TreeDiagram.js +85 -84
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.cjs +1 -1
- package/dist/components/data-display/TreeDiagram/tree-diagram.module.js +1 -1
- package/dist/components/data-display/TreeView/TreeView.cjs +1 -1
- package/dist/components/data-display/TreeView/TreeView.js +123 -122
- package/dist/components/feedback/Autosave/Autosave.cjs +1 -1
- package/dist/components/feedback/Autosave/Autosave.js +32 -31
- package/dist/components/feedback/Banner/banner.module.cjs +1 -1
- package/dist/components/feedback/Banner/banner.module.js +2 -2
- package/dist/components/feedback/ErrorBoundary/ErrorBoundary.cjs +1 -1
- package/dist/components/feedback/ErrorBoundary/ErrorBoundary.js +35 -34
- package/dist/components/feedback/Notification/notification.module.cjs +1 -1
- package/dist/components/feedback/Notification/notification.module.js +2 -2
- package/dist/components/feedback/ScrollProgress/ScrollProgress.cjs +1 -1
- package/dist/components/feedback/ScrollProgress/ScrollProgress.js +21 -20
- package/dist/components/feedback/Tour/Tour.cjs +1 -1
- package/dist/components/feedback/Tour/Tour.js +98 -97
- package/dist/components/form/Button/Button.cjs +1 -1
- package/dist/components/form/Button/Button.js +55 -54
- package/dist/components/form/ColorInput/ColorInput.cjs +1 -1
- package/dist/components/form/ColorInput/ColorInput.js +30 -29
- package/dist/components/form/ColorPicker/color-picker.module.cjs +1 -1
- package/dist/components/form/ColorPicker/color-picker.module.js +1 -1
- package/dist/components/form/Combobox/combobox.module.cjs +1 -1
- package/dist/components/form/Combobox/combobox.module.js +1 -1
- package/dist/components/form/CopyButton/CopyButton.cjs +1 -1
- package/dist/components/form/CopyButton/CopyButton.js +27 -26
- package/dist/components/form/DatePicker/DatePicker.cjs +1 -1
- package/dist/components/form/DatePicker/DatePicker.js +47 -46
- package/dist/components/form/DatePicker/date-picker.module.cjs +1 -1
- package/dist/components/form/DatePicker/date-picker.module.js +1 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.cjs +1 -1
- package/dist/components/form/DateRangePicker/DateRangePicker.js +36 -35
- package/dist/components/form/Dropzone/Dropzone.cjs +1 -1
- package/dist/components/form/Dropzone/Dropzone.js +56 -55
- package/dist/components/form/FileUpload/FileUpload.cjs +1 -1
- package/dist/components/form/FileUpload/FileUpload.js +47 -46
- package/dist/components/form/FloatButton/FloatButton.cjs +1 -1
- package/dist/components/form/FloatButton/FloatButton.d.ts +4 -1
- package/dist/components/form/FloatButton/FloatButton.js +6 -6
- package/dist/components/form/ImageCropper/ImageCropper.cjs +1 -1
- package/dist/components/form/ImageCropper/ImageCropper.js +101 -99
- package/dist/components/form/InlineEdit/InlineEdit.cjs +1 -1
- package/dist/components/form/InlineEdit/InlineEdit.js +66 -65
- package/dist/components/form/InlineEdit/inline-edit.module.cjs +1 -1
- package/dist/components/form/InlineEdit/inline-edit.module.js +1 -1
- package/dist/components/form/Input/Input.cjs +1 -1
- package/dist/components/form/Input/Input.js +45 -44
- package/dist/components/form/InputBase/InputBase.cjs +1 -1
- package/dist/components/form/InputBase/InputBase.js +51 -50
- package/dist/components/form/InputBase/input-base.module.cjs +1 -1
- package/dist/components/form/InputBase/input-base.module.js +1 -1
- package/dist/components/form/Mentions/mentions.module.cjs +1 -1
- package/dist/components/form/Mentions/mentions.module.js +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.cjs +1 -1
- package/dist/components/form/MultiSelect/multiselect.module.js +1 -1
- package/dist/components/form/PasswordStrength/PasswordStrength.cjs +1 -1
- package/dist/components/form/PasswordStrength/PasswordStrength.js +27 -26
- package/dist/components/form/PhoneInput/PhoneInput.cjs +1 -1
- package/dist/components/form/PhoneInput/PhoneInput.js +10 -10
- package/dist/components/form/PhoneInput/phone-input.module.cjs +1 -1
- package/dist/components/form/PhoneInput/phone-input.module.js +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.cjs +1 -1
- package/dist/components/form/QueryBuilder/QueryBuilder.js +90 -89
- package/dist/components/form/RangeSlider/RangeSlider.cjs +1 -1
- package/dist/components/form/RangeSlider/RangeSlider.js +30 -29
- package/dist/components/form/Rating/rating.module.cjs +1 -1
- package/dist/components/form/Rating/rating.module.js +1 -1
- package/dist/components/form/RichTextEditor/RichTextEditor.cjs +1 -1
- package/dist/components/form/RichTextEditor/RichTextEditor.js +223 -222
- package/dist/components/form/RichTextEditor/rich-text-editor.module.cjs +1 -1
- package/dist/components/form/RichTextEditor/rich-text-editor.module.js +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.cjs +1 -1
- package/dist/components/form/SegmentedControl/SegmentedControl.js +7 -7
- package/dist/components/form/SegmentedControl/segmented-control.module.cjs +1 -1
- package/dist/components/form/SegmentedControl/segmented-control.module.js +1 -1
- package/dist/components/form/Select/Select.cjs +1 -1
- package/dist/components/form/Select/Select.js +112 -111
- package/dist/components/form/Select/select.module.cjs +1 -1
- package/dist/components/form/Select/select.module.js +1 -1
- package/dist/components/form/SignaturePad/SignaturePad.cjs +1 -1
- package/dist/components/form/SignaturePad/SignaturePad.js +86 -79
- package/dist/components/form/SmartSearchInput/SmartSearchInput.cjs +1 -1
- package/dist/components/form/SmartSearchInput/SmartSearchInput.js +63 -62
- package/dist/components/form/TagInput/TagInput.cjs +1 -1
- package/dist/components/form/TagInput/TagInput.js +68 -67
- package/dist/components/form/ThemeToggle/ThemeToggle.cjs +1 -1
- package/dist/components/form/ThemeToggle/ThemeToggle.js +68 -67
- package/dist/components/form/ThemeToggle/theme-toggle.module.cjs +1 -1
- package/dist/components/form/ThemeToggle/theme-toggle.module.js +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.cjs +1 -1
- package/dist/components/form/ToggleGroup/ToggleGroup.js +6 -6
- package/dist/components/form/ToggleGroup/toggle-group.module.cjs +1 -1
- package/dist/components/form/ToggleGroup/toggle-group.module.js +1 -1
- package/dist/components/form/Transfer/Transfer.cjs +1 -1
- package/dist/components/form/Transfer/Transfer.js +127 -126
- package/dist/components/form/TreeSelect/TreeSelect.cjs +1 -1
- package/dist/components/form/TreeSelect/TreeSelect.js +6 -6
- package/dist/components/layout/Dashboard/Dashboard.cjs +1 -1
- package/dist/components/layout/Dashboard/Dashboard.js +90 -89
- package/dist/components/layout/Navbar/Navbar.cjs +1 -1
- package/dist/components/layout/Navbar/Navbar.d.ts +1 -1
- package/dist/components/layout/Navbar/Navbar.js +1 -1
- package/dist/components/layout/Sidebar/Sidebar.d.ts +1 -1
- package/dist/components/layout/Splitter/Splitter.cjs +1 -1
- package/dist/components/layout/Splitter/Splitter.js +40 -39
- package/dist/components/layout/Toolbar/Toolbar.cjs +1 -1
- package/dist/components/layout/Toolbar/Toolbar.js +66 -39
- package/dist/components/media/Audio/Audio.cjs +1 -1
- package/dist/components/media/Audio/Audio.js +90 -89
- package/dist/components/media/Audio/components/AudioCustomControls.cjs +1 -1
- package/dist/components/media/Audio/components/AudioCustomControls.js +115 -114
- package/dist/components/media/Gallery/Gallery.cjs +1 -1
- package/dist/components/media/Gallery/Gallery.js +132 -131
- package/dist/components/media/ImageCompare/ImageCompare.cjs +1 -1
- package/dist/components/media/ImageCompare/ImageCompare.js +72 -71
- package/dist/components/media/Lightbox/Lightbox.cjs +1 -1
- package/dist/components/media/Lightbox/Lightbox.js +128 -127
- package/dist/components/media/Video/Video.cjs +1 -1
- package/dist/components/media/Video/Video.js +56 -55
- package/dist/components/media/Video/components/VideoAdvancedMenu.cjs +1 -1
- package/dist/components/media/Video/components/VideoAdvancedMenu.js +136 -135
- package/dist/components/media/Video/components/VideoControls.cjs +1 -1
- package/dist/components/media/Video/components/VideoControls.js +103 -102
- package/dist/components/navigation/BackTop/BackTop.cjs +1 -1
- package/dist/components/navigation/BackTop/BackTop.js +37 -36
- package/dist/components/navigation/Breadcrumb/Breadcrumb.cjs +1 -1
- package/dist/components/navigation/Breadcrumb/Breadcrumb.js +41 -40
- package/dist/components/navigation/CommandPalette/CommandPalette.cjs +1 -1
- package/dist/components/navigation/CommandPalette/CommandPalette.js +100 -99
- package/dist/components/navigation/CommandPalette/command-palette.module.cjs +1 -1
- package/dist/components/navigation/CommandPalette/command-palette.module.js +1 -1
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.cjs +1 -1
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.d.ts +6 -0
- package/dist/components/navigation/HamburgerMenu/HamburgerMenu.js +32 -22
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.cjs +1 -1
- package/dist/components/navigation/HamburgerMenu/hamburger-menu.module.js +1 -1
- package/dist/components/navigation/Menubar/menubar.module.cjs +1 -1
- package/dist/components/navigation/Menubar/menubar.module.js +1 -1
- package/dist/components/navigation/Pagination/Pagination.cjs +1 -1
- package/dist/components/navigation/Pagination/Pagination.js +39 -38
- package/dist/components/navigation/SpeedDial/SpeedDial.cjs +1 -1
- package/dist/components/navigation/SpeedDial/SpeedDial.js +50 -47
- package/dist/components/navigation/TabBar/tab-bar.module.cjs +1 -1
- package/dist/components/navigation/TabBar/tab-bar.module.js +1 -1
- package/dist/components/navigation/TabNavigation/tab-navigation.module.cjs +1 -1
- package/dist/components/navigation/TabNavigation/tab-navigation.module.js +1 -1
- package/dist/components/navigation/Tabs/tabs.module.cjs +1 -1
- package/dist/components/navigation/Tabs/tabs.module.js +1 -1
- package/dist/components/overlay/ContextMenu/ContextMenu.cjs +1 -1
- package/dist/components/overlay/ContextMenu/ContextMenu.js +4 -4
- package/dist/components/overlay/Popover/Popover.cjs +1 -1
- package/dist/components/overlay/Popover/Popover.js +63 -62
- package/dist/components/typography/Spoiler/Spoiler.cjs +1 -1
- package/dist/components/typography/Spoiler/Spoiler.js +38 -37
- package/dist/components/typography/Spoiler/spoiler.module.cjs +1 -1
- package/dist/components/typography/Spoiler/spoiler.module.js +1 -1
- package/dist/i18n/generated/common.cjs +2 -0
- package/dist/i18n/generated/common.d.ts +3 -0
- package/dist/i18n/generated/common.js +570 -0
- package/dist/i18n/generated/components.cjs +2 -0
- package/dist/i18n/generated/components.d.ts +3 -0
- package/dist/i18n/generated/components.js +399 -0
- package/dist/i18n/generated/data-display.cjs +2 -0
- package/dist/i18n/generated/data-display.d.ts +3 -0
- package/dist/i18n/generated/data-display.js +12 -0
- package/dist/i18n/generated/form.cjs +2 -0
- package/dist/i18n/generated/form.d.ts +3 -0
- package/dist/i18n/generated/form.js +321 -0
- package/dist/i18n/generated/keys.d.ts +5 -1
- package/dist/i18n/generated/locales.cjs +2 -0
- package/dist/i18n/generated/locales.d.ts +1 -0
- package/dist/i18n/generated/locales.js +9 -0
- package/dist/i18n/instance.cjs +1 -1
- package/dist/i18n/instance.d.ts +18 -3
- package/dist/i18n/instance.js +24 -26
- package/dist/i18n/useWimTranslation.cjs +1 -1
- package/dist/i18n/useWimTranslation.d.ts +7 -8
- package/dist/i18n/useWimTranslation.js +6 -5
- package/dist/llms-full.txt +7 -3
- package/dist/llms.txt +1 -1
- package/dist/locales/en/common.json +1 -1
- package/dist/locales/ja/common.json +1 -1
- package/dist/locales/pt/common.json +1 -1
- package/dist/styles.css +1 -1
- package/dist/wimui.umd.css +1 -1
- package/dist/wimui.umd.js +5 -5
- package/package.json +10 -10
- package/dist/i18n/generated/resources.cjs +0 -2
- package/dist/i18n/generated/resources.d.ts +0 -4
- package/dist/i18n/generated/resources.js +0 -1283
|
@@ -1,62 +1,63 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { Box as e } from "../../layout/Box/Box.js";
|
|
3
3
|
import { useWimTranslation as t } from "../../../i18n/useWimTranslation.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import a from "
|
|
8
|
-
import
|
|
9
|
-
import {
|
|
4
|
+
import { commonNs as n } from "../../../i18n/generated/common.js";
|
|
5
|
+
import { Stack as r } from "../../layout/Stack/Stack.js";
|
|
6
|
+
import { Button as i } from "../../form/Button/Button.js";
|
|
7
|
+
import { Alert as a } from "../Alert/Alert.js";
|
|
8
|
+
import o from "./errorboundary.module.js";
|
|
9
|
+
import { Component as s, useState as c } from "react";
|
|
10
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/feedback/ErrorBoundary/ErrorBoundary.tsx
|
|
11
|
-
var
|
|
12
|
-
let { t:
|
|
13
|
-
title:
|
|
14
|
-
retry:
|
|
15
|
-
showDetails:
|
|
16
|
-
hideDetails:
|
|
12
|
+
var d = ({ error: s, errorInfo: d, reset: f, labels: p }) => {
|
|
13
|
+
let { t: m } = t(n), [h, g] = c(!1), _ = {
|
|
14
|
+
title: p?.title ?? m("error.boundary_title"),
|
|
15
|
+
retry: p?.retry ?? m("error.boundary_retry"),
|
|
16
|
+
showDetails: p?.showDetails ?? m("error.boundary_show_details"),
|
|
17
|
+
hideDetails: p?.hideDetails ?? m("error.boundary_hide_details")
|
|
17
18
|
};
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ l(e, {
|
|
19
20
|
p: "lg",
|
|
20
21
|
radius: "md",
|
|
21
22
|
bg: "var(--wim-color-danger-subtle)",
|
|
22
|
-
className: `wim-error-boundary ${
|
|
23
|
-
children: /* @__PURE__ */
|
|
23
|
+
className: `wim-error-boundary ${o.fallback}`,
|
|
24
|
+
children: /* @__PURE__ */ u(r, {
|
|
24
25
|
gap: "md",
|
|
25
26
|
children: [
|
|
26
|
-
/* @__PURE__ */
|
|
27
|
+
/* @__PURE__ */ l(a, {
|
|
27
28
|
intent: "danger",
|
|
28
|
-
title:
|
|
29
|
-
description:
|
|
29
|
+
title: _.title,
|
|
30
|
+
description: s.message
|
|
30
31
|
}),
|
|
31
|
-
/* @__PURE__ */
|
|
32
|
+
/* @__PURE__ */ u(r, {
|
|
32
33
|
direction: "row",
|
|
33
34
|
gap: "sm",
|
|
34
35
|
wrap: !0,
|
|
35
|
-
children: [/* @__PURE__ */
|
|
36
|
-
onClick:
|
|
36
|
+
children: [/* @__PURE__ */ l(i, {
|
|
37
|
+
onClick: f,
|
|
37
38
|
variant: "solid",
|
|
38
|
-
children:
|
|
39
|
-
}), /* @__PURE__ */
|
|
40
|
-
onClick: () =>
|
|
39
|
+
children: _.retry
|
|
40
|
+
}), /* @__PURE__ */ l(i, {
|
|
41
|
+
onClick: () => g(!h),
|
|
41
42
|
variant: "outline",
|
|
42
|
-
children:
|
|
43
|
+
children: h ? _.hideDetails : _.showDetails
|
|
43
44
|
})]
|
|
44
45
|
}),
|
|
45
|
-
|
|
46
|
+
h && /* @__PURE__ */ l(e, {
|
|
46
47
|
p: "md",
|
|
47
48
|
bg: "surface-inset",
|
|
48
49
|
radius: "component",
|
|
49
|
-
className:
|
|
50
|
-
children: /* @__PURE__ */
|
|
51
|
-
|
|
52
|
-
/* @__PURE__ */
|
|
53
|
-
|
|
50
|
+
className: o.details,
|
|
51
|
+
children: /* @__PURE__ */ u("code", { children: [
|
|
52
|
+
s.toString(),
|
|
53
|
+
/* @__PURE__ */ l("br", {}),
|
|
54
|
+
d?.componentStack
|
|
54
55
|
] })
|
|
55
56
|
})
|
|
56
57
|
]
|
|
57
58
|
})
|
|
58
59
|
});
|
|
59
|
-
},
|
|
60
|
+
}, f = class extends s {
|
|
60
61
|
state = {
|
|
61
62
|
hasError: !1,
|
|
62
63
|
error: null,
|
|
@@ -80,7 +81,7 @@ var u = ({ error: o, errorInfo: u, reset: d, labels: f }) => {
|
|
|
80
81
|
};
|
|
81
82
|
render() {
|
|
82
83
|
let { hasError: e, error: t, errorInfo: n } = this.state, { children: r, fallback: i, labels: a } = this.props;
|
|
83
|
-
return e && t ? typeof i == "function" ? i(t, n, this.reset) : i || /* @__PURE__ */
|
|
84
|
+
return e && t ? typeof i == "function" ? i(t, n, this.reset) : i || /* @__PURE__ */ l(d, {
|
|
84
85
|
error: t,
|
|
85
86
|
errorInfo: n,
|
|
86
87
|
reset: this.reset,
|
|
@@ -89,4 +90,4 @@ var u = ({ error: o, errorInfo: u, reset: d, labels: f }) => {
|
|
|
89
90
|
}
|
|
90
91
|
};
|
|
91
92
|
//#endregion
|
|
92
|
-
export {
|
|
93
|
+
export { f as ErrorBoundary };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
var e=`
|
|
2
|
+
var e=`_root_v22m8_3`,t=`_content_v22m8_14`,n=`_icon_v22m8_19`,r=`_messageContainer_v22m8_27`,i=`_title_v22m8_33`,a=`_description_v22m8_40`,o=`_close_v22m8_45`,s=`_success_v22m8_71`,c=`_info_v22m8_74`,l=`_warning_v22m8_77`,u=`_danger_v22m8_80`,d=`_container_v22m8_83`,f=`_topRight_v22m8_94`,p=`_topLeft_v22m8_98`,m=`_bottomRight_v22m8_102`,h=`_bottomLeft_v22m8_106`,g={root:e,content:t,icon:n,messageContainer:r,title:i,description:a,close:o,default:`_default_v22m8_68`,success:s,info:c,warning:l,danger:u,container:d,topRight:f,topLeft:p,bottomRight:m,bottomLeft:h};exports.bottomLeft=h,exports.bottomRight=m,exports.close=o,exports.container=d,exports.content=t,exports.danger=u,exports.default=g,exports.description=a,exports.icon=n,exports.info=c,exports.messageContainer=r,exports.root=e,exports.success=s,exports.title=i,exports.topLeft=p,exports.topRight=f,exports.warning=l;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
//#region src/components/feedback/Notification/notification.module.scss
|
|
3
|
-
var e = "
|
|
3
|
+
var e = "_root_v22m8_3", t = "_content_v22m8_14", n = "_icon_v22m8_19", r = "_messageContainer_v22m8_27", i = "_title_v22m8_33", a = "_description_v22m8_40", o = "_close_v22m8_45", s = "_success_v22m8_71", c = "_info_v22m8_74", l = "_warning_v22m8_77", u = "_danger_v22m8_80", d = "_container_v22m8_83", f = "_topRight_v22m8_94", p = "_topLeft_v22m8_98", m = "_bottomRight_v22m8_102", h = "_bottomLeft_v22m8_106", g = {
|
|
4
4
|
root: e,
|
|
5
5
|
content: t,
|
|
6
6
|
icon: n,
|
|
@@ -8,7 +8,7 @@ var e = "_root_1vkbf_3", t = "_content_1vkbf_14", n = "_icon_1vkbf_19", r = "_me
|
|
|
8
8
|
title: i,
|
|
9
9
|
description: a,
|
|
10
10
|
close: o,
|
|
11
|
-
default: "
|
|
11
|
+
default: "_default_v22m8_68",
|
|
12
12
|
success: s,
|
|
13
13
|
info: c,
|
|
14
14
|
warning: l,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("./scrollprogress.module.cjs");let
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("./scrollprogress.module.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("classnames");a=e.__toESM(a,1);let o=require("react/jsx-runtime");var s=({intent:e=`primary`,target:s,className:c,"aria-label":l,...u})=>{let{t:d}=t.useWimTranslation(n.commonNs),[f,p]=(0,i.useState)(0);return(0,i.useEffect)(()=>{let e=()=>{let e=0;if(s&&s.current){let t=s.current,n=t.scrollHeight-t.clientHeight;n>0&&(e=t.scrollTop/n*100)}else{let t=document.documentElement.scrollHeight-window.innerHeight;t>0&&(e=window.scrollY/t*100)}p(e)},t=s&&s.current?s.current:window;return t.addEventListener(`scroll`,e),e(),()=>{t.removeEventListener(`scroll`,e)}},[s]),(0,o.jsx)(`div`,{className:(0,a.default)(`wim-scroll-progress`,r.default.root,r.default[e],c),role:`progressbar`,"aria-valuenow":Math.round(f),"aria-valuemin":0,"aria-valuemax":100,"aria-label":l??d(`a11y.scroll_progress`),...u,children:(0,o.jsx)(`div`,{className:r.default.bar,style:{width:`${f}%`}})})};exports.ScrollProgress=s;
|
|
@@ -1,40 +1,41 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
-
import t from "
|
|
4
|
-
import
|
|
5
|
-
import i from "
|
|
6
|
-
import
|
|
3
|
+
import { commonNs as t } from "../../../i18n/generated/common.js";
|
|
4
|
+
import n from "./scrollprogress.module.js";
|
|
5
|
+
import { useEffect as r, useState as i } from "react";
|
|
6
|
+
import a from "classnames";
|
|
7
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
7
8
|
//#region src/components/feedback/ScrollProgress/ScrollProgress.tsx
|
|
8
|
-
var
|
|
9
|
-
let { t:
|
|
10
|
-
return
|
|
9
|
+
var s = ({ intent: s = "primary", target: c, className: l, "aria-label": u, ...d }) => {
|
|
10
|
+
let { t: f } = e(t), [p, m] = i(0);
|
|
11
|
+
return r(() => {
|
|
11
12
|
let e = () => {
|
|
12
13
|
let e = 0;
|
|
13
|
-
if (
|
|
14
|
-
let t =
|
|
14
|
+
if (c && c.current) {
|
|
15
|
+
let t = c.current, n = t.scrollHeight - t.clientHeight;
|
|
15
16
|
n > 0 && (e = t.scrollTop / n * 100);
|
|
16
17
|
} else {
|
|
17
18
|
let t = document.documentElement.scrollHeight - window.innerHeight;
|
|
18
19
|
t > 0 && (e = window.scrollY / t * 100);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
-
}, t =
|
|
21
|
+
m(e);
|
|
22
|
+
}, t = c && c.current ? c.current : window;
|
|
22
23
|
return t.addEventListener("scroll", e), e(), () => {
|
|
23
24
|
t.removeEventListener("scroll", e);
|
|
24
25
|
};
|
|
25
|
-
}, [
|
|
26
|
-
className:
|
|
26
|
+
}, [c]), /* @__PURE__ */ o("div", {
|
|
27
|
+
className: a("wim-scroll-progress", n.root, n[s], l),
|
|
27
28
|
role: "progressbar",
|
|
28
|
-
"aria-valuenow": Math.round(
|
|
29
|
+
"aria-valuenow": Math.round(p),
|
|
29
30
|
"aria-valuemin": 0,
|
|
30
31
|
"aria-valuemax": 100,
|
|
31
|
-
"aria-label":
|
|
32
|
-
...
|
|
33
|
-
children: /* @__PURE__ */
|
|
34
|
-
className:
|
|
35
|
-
style: { width: `${
|
|
32
|
+
"aria-label": u ?? f("a11y.scroll_progress"),
|
|
33
|
+
...d,
|
|
34
|
+
children: /* @__PURE__ */ o("div", {
|
|
35
|
+
className: n.bar,
|
|
36
|
+
style: { width: `${p}%` }
|
|
36
37
|
})
|
|
37
38
|
});
|
|
38
39
|
};
|
|
39
40
|
//#endregion
|
|
40
|
-
export {
|
|
41
|
+
export { s as ScrollProgress };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../overlay/Portal/Portal.cjs"),
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../i18n/useWimTranslation.cjs"),n=require("../../../i18n/generated/common.cjs"),r=require("../../overlay/Portal/Portal.cjs"),i=require("../../overlay/FocusTrap/FocusTrap.cjs"),a=require("../../form/Button/Button.cjs"),o=require("./tour.module.cjs");let s=require("react");s=e.__toESM(s,1);let c=require("classnames");c=e.__toESM(c,1);let l=require("react/jsx-runtime");var u=16;function d(e){let t=getComputedStyle(e);return`${t.fontWeight} ${t.fontSize} ${t.fontFamily}`}async function f(e){let t=document.fonts;if(t&&typeof t.load==`function`){try{await t.load(d(e))}catch{}for(;t.status===`loading`;)await new Promise(e=>{t.addEventListener(`loadingdone`,()=>e(),{once:!0})})}}function p(e){let t=document.fonts;return!t||typeof t.load!=`function`?!1:t.status===`loading`||typeof t.check==`function`&&!t.check(d(e))}function m(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.width)===Math.round(t.width)&&Math.round(e.height)===Math.round(t.height)}function h(e){return e.top>=u&&e.bottom<=window.innerHeight-u&&e.left>=u&&e.right<=window.innerWidth-u}var g=({steps:e,open:u,onClose:d,onFinish:g})=>{let{t:_}=t.useWimTranslation(n.commonNs),[v,y]=(0,s.useState)(0),[b,x]=(0,s.useState)(null),S=e[v],C=S?.target;(0,s.useLayoutEffect)(()=>{if(!u||!C){x(null);return}let e=!1,t=t=>{e||x(e=>t?e&&m(e,t)?e:t:null)},n=()=>{let e=document.querySelector(C);if(!e){t(null);return}h(e.getBoundingClientRect())||e.scrollIntoView({block:`center`,inline:`nearest`}),t(e.getBoundingClientRect())},r=()=>{let e=document.querySelector(C);t(e?e.getBoundingClientRect():null)},i=()=>{window.addEventListener(`resize`,r),window.addEventListener(`scroll`,r,!0)},a=async()=>{let t=document.querySelector(C);t&&await f(t),!e&&(n(),i())},o=document.querySelector(C);return o&&p(o)?a():(n(),i()),()=>{e=!0,window.removeEventListener(`resize`,r),window.removeEventListener(`scroll`,r,!0)}},[u,v,C]);let w=(0,s.useId)(),T=(0,s.useRef)(null),E=(0,s.useRef)(null),D=u&&!!S&&!!b;if((0,s.useEffect)(()=>{if(!D)return;let e=T.current;e&&!e.contains(document.activeElement)&&E.current?.focus()},[D,v]),(0,s.useEffect)(()=>{if(!u)return;let e=e=>{e.key===`Escape`&&(e.preventDefault(),d())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[u,d]),!u||!S)return null;let O=()=>{v<e.length-1?y(v+1):(g?g():d(),y(0))},k=()=>{v>0&&y(v-1)},A={},j=S.placement||`bottom`;if(b){let e=window.innerWidth,t=Math.min(300,e-32),n=j;if(e<640&&(n===`left`||n===`right`)&&(n=`bottom`),j=n,n===`top`||n===`bottom`){let r=b.left+b.width/2,i=t/2+16,a=e-t/2-16;r=i>a?e/2:Math.max(i,Math.min(a,r)),A.left=r,n===`top`?(A.top=b.top-12,A.transform=`translate(-50%, -100%)`):(A.top=b.bottom+12,A.transform=`translateX(-50%)`)}else n===`left`?(A.left=b.left-12,A.top=b.top+b.height/2,A.transform=`translate(-100%, -50%)`):n===`right`&&(A.left=b.right+12,A.top=b.top+b.height/2,A.transform=`translateY(-50%)`)}return(0,l.jsx)(r.Portal,{children:(0,l.jsx)(i.FocusTrap,{initialFocus:!1,children:(0,l.jsxs)(`div`,{role:`dialog`,"aria-modal":`true`,"aria-label":S.title,"aria-describedby":b?w:void 0,children:[b&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(`div`,{className:o.default.highlight,style:{top:b.top-4,left:b.left-4,width:b.width+8,height:b.height+8}}),(0,l.jsx)(`div`,{ref:T,className:(0,c.default)(`wim-tour`,o.default.bubble),"data-placement":j,style:A,children:(0,l.jsxs)(`div`,{className:o.default.inner,children:[(0,l.jsx)(`h3`,{className:o.default.title,children:S.title}),(0,l.jsx)(`p`,{id:w,className:o.default.description,children:S.description}),(0,l.jsxs)(`div`,{className:o.default.footer,children:[(0,l.jsxs)(`span`,{className:o.default.progress,children:[v+1,` / `,e.length]}),(0,l.jsxs)(`div`,{className:o.default.buttons,children:[v>0&&(0,l.jsx)(a.Button,{size:`sm`,variant:`outline`,onClick:k,children:_(`action.back`)}),(0,l.jsx)(a.Button,{ref:E,size:`sm`,variant:`solid`,onClick:O,children:v===e.length-1?_(`action.finish`):_(`action.next`)})]})]})]})})]}),(0,l.jsx)(`div`,{className:o.default.mask,onClick:d,role:`button`,tabIndex:0,"aria-label":_(`a11y.close_tour`),onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&d()}})]})})})};exports.Tour=g;
|
|
@@ -1,170 +1,171 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useWimTranslation as e } from "../../../i18n/useWimTranslation.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import i from "
|
|
7
|
-
import
|
|
8
|
-
import u from "
|
|
9
|
-
import
|
|
3
|
+
import { commonNs as t } from "../../../i18n/generated/common.js";
|
|
4
|
+
import { Portal as n } from "../../overlay/Portal/Portal.js";
|
|
5
|
+
import { FocusTrap as r } from "../../overlay/FocusTrap/FocusTrap.js";
|
|
6
|
+
import { Button as i } from "../../form/Button/Button.js";
|
|
7
|
+
import a from "./tour.module.js";
|
|
8
|
+
import { useEffect as o, useId as s, useLayoutEffect as c, useRef as l, useState as u } from "react";
|
|
9
|
+
import d from "classnames";
|
|
10
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
10
11
|
//#region src/components/feedback/Tour/Tour.tsx
|
|
11
|
-
var
|
|
12
|
-
function
|
|
12
|
+
var h = 16;
|
|
13
|
+
function g(e) {
|
|
13
14
|
let t = getComputedStyle(e);
|
|
14
15
|
return `${t.fontWeight} ${t.fontSize} ${t.fontFamily}`;
|
|
15
16
|
}
|
|
16
|
-
async function
|
|
17
|
+
async function _(e) {
|
|
17
18
|
let t = document.fonts;
|
|
18
19
|
if (t && typeof t.load == "function") {
|
|
19
20
|
try {
|
|
20
|
-
await t.load(
|
|
21
|
+
await t.load(g(e));
|
|
21
22
|
} catch {}
|
|
22
23
|
for (; t.status === "loading";) await new Promise((e) => {
|
|
23
24
|
t.addEventListener("loadingdone", () => e(), { once: !0 });
|
|
24
25
|
});
|
|
25
26
|
}
|
|
26
27
|
}
|
|
27
|
-
function
|
|
28
|
+
function v(e) {
|
|
28
29
|
let t = document.fonts;
|
|
29
|
-
return !t || typeof t.load != "function" ? !1 : t.status === "loading" || typeof t.check == "function" && !t.check(
|
|
30
|
+
return !t || typeof t.load != "function" ? !1 : t.status === "loading" || typeof t.check == "function" && !t.check(g(e));
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
+
function y(e, t) {
|
|
32
33
|
return Math.round(e.top) === Math.round(t.top) && Math.round(e.left) === Math.round(t.left) && Math.round(e.width) === Math.round(t.width) && Math.round(e.height) === Math.round(t.height);
|
|
33
34
|
}
|
|
34
|
-
function
|
|
35
|
-
return e.top >=
|
|
35
|
+
function b(e) {
|
|
36
|
+
return e.top >= h && e.bottom <= window.innerHeight - h && e.left >= h && e.right <= window.innerWidth - h;
|
|
36
37
|
}
|
|
37
|
-
var
|
|
38
|
-
let { t:
|
|
39
|
-
|
|
40
|
-
if (!
|
|
41
|
-
|
|
38
|
+
var x = ({ steps: h, open: g, onClose: x, onFinish: S }) => {
|
|
39
|
+
let { t: C } = e(t), [w, T] = u(0), [E, D] = u(null), O = h[w], k = O?.target;
|
|
40
|
+
c(() => {
|
|
41
|
+
if (!g || !k) {
|
|
42
|
+
D(null);
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
let e = !1, t = (t) => {
|
|
45
|
-
e ||
|
|
46
|
+
e || D((e) => t ? e && y(e, t) ? e : t : null);
|
|
46
47
|
}, n = () => {
|
|
47
|
-
let e = document.querySelector(
|
|
48
|
+
let e = document.querySelector(k);
|
|
48
49
|
if (!e) {
|
|
49
50
|
t(null);
|
|
50
51
|
return;
|
|
51
52
|
}
|
|
52
|
-
|
|
53
|
+
b(e.getBoundingClientRect()) || e.scrollIntoView({
|
|
53
54
|
block: "center",
|
|
54
55
|
inline: "nearest"
|
|
55
56
|
}), t(e.getBoundingClientRect());
|
|
56
57
|
}, r = () => {
|
|
57
|
-
let e = document.querySelector(
|
|
58
|
+
let e = document.querySelector(k);
|
|
58
59
|
t(e ? e.getBoundingClientRect() : null);
|
|
59
60
|
}, i = () => {
|
|
60
61
|
window.addEventListener("resize", r), window.addEventListener("scroll", r, !0);
|
|
61
62
|
}, a = async () => {
|
|
62
|
-
let t = document.querySelector(
|
|
63
|
-
t && await
|
|
64
|
-
}, o = document.querySelector(
|
|
65
|
-
return o &&
|
|
63
|
+
let t = document.querySelector(k);
|
|
64
|
+
t && await _(t), !e && (n(), i());
|
|
65
|
+
}, o = document.querySelector(k);
|
|
66
|
+
return o && v(o) ? a() : (n(), i()), () => {
|
|
66
67
|
e = !0, window.removeEventListener("resize", r), window.removeEventListener("scroll", r, !0);
|
|
67
68
|
};
|
|
68
69
|
}, [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
g,
|
|
71
|
+
w,
|
|
72
|
+
k
|
|
72
73
|
]);
|
|
73
|
-
let
|
|
74
|
-
if (
|
|
75
|
-
if (!
|
|
76
|
-
let e =
|
|
77
|
-
e && !e.contains(document.activeElement) &&
|
|
78
|
-
}, [
|
|
79
|
-
if (!
|
|
74
|
+
let A = s(), j = l(null), M = l(null), N = g && !!O && !!E;
|
|
75
|
+
if (o(() => {
|
|
76
|
+
if (!N) return;
|
|
77
|
+
let e = j.current;
|
|
78
|
+
e && !e.contains(document.activeElement) && M.current?.focus();
|
|
79
|
+
}, [N, w]), o(() => {
|
|
80
|
+
if (!g) return;
|
|
80
81
|
let e = (e) => {
|
|
81
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
82
|
+
e.key === "Escape" && (e.preventDefault(), x());
|
|
82
83
|
};
|
|
83
84
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
84
|
-
}, [
|
|
85
|
-
let
|
|
86
|
-
|
|
87
|
-
},
|
|
88
|
-
|
|
89
|
-
},
|
|
90
|
-
if (
|
|
91
|
-
let e = window.innerWidth, t = Math.min(300, e - 32), n =
|
|
92
|
-
if (e < 640 && (n === "left" || n === "right") && (n = "bottom"),
|
|
93
|
-
let r =
|
|
94
|
-
r = i > a ? e / 2 : Math.max(i, Math.min(a, r)),
|
|
95
|
-
} else n === "left" ? (
|
|
85
|
+
}, [g, x]), !g || !O) return null;
|
|
86
|
+
let P = () => {
|
|
87
|
+
w < h.length - 1 ? T(w + 1) : (S ? S() : x(), T(0));
|
|
88
|
+
}, F = () => {
|
|
89
|
+
w > 0 && T(w - 1);
|
|
90
|
+
}, I = {}, L = O.placement || "bottom";
|
|
91
|
+
if (E) {
|
|
92
|
+
let e = window.innerWidth, t = Math.min(300, e - 32), n = L;
|
|
93
|
+
if (e < 640 && (n === "left" || n === "right") && (n = "bottom"), L = n, n === "top" || n === "bottom") {
|
|
94
|
+
let r = E.left + E.width / 2, i = t / 2 + 16, a = e - t / 2 - 16;
|
|
95
|
+
r = i > a ? e / 2 : Math.max(i, Math.min(a, r)), I.left = r, n === "top" ? (I.top = E.top - 12, I.transform = "translate(-50%, -100%)") : (I.top = E.bottom + 12, I.transform = "translateX(-50%)");
|
|
96
|
+
} else n === "left" ? (I.left = E.left - 12, I.top = E.top + E.height / 2, I.transform = "translate(-100%, -50%)") : n === "right" && (I.left = E.right + 12, I.top = E.top + E.height / 2, I.transform = "translateY(-50%)");
|
|
96
97
|
}
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
+
return /* @__PURE__ */ p(n, { children: /* @__PURE__ */ p(r, {
|
|
98
99
|
initialFocus: !1,
|
|
99
|
-
children: /* @__PURE__ */
|
|
100
|
+
children: /* @__PURE__ */ m("div", {
|
|
100
101
|
role: "dialog",
|
|
101
102
|
"aria-modal": "true",
|
|
102
|
-
"aria-label":
|
|
103
|
-
"aria-describedby":
|
|
104
|
-
children: [
|
|
105
|
-
className:
|
|
103
|
+
"aria-label": O.title,
|
|
104
|
+
"aria-describedby": E ? A : void 0,
|
|
105
|
+
children: [E && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", {
|
|
106
|
+
className: a.highlight,
|
|
106
107
|
style: {
|
|
107
|
-
top:
|
|
108
|
-
left:
|
|
109
|
-
width:
|
|
110
|
-
height:
|
|
108
|
+
top: E.top - 4,
|
|
109
|
+
left: E.left - 4,
|
|
110
|
+
width: E.width + 8,
|
|
111
|
+
height: E.height + 8
|
|
111
112
|
}
|
|
112
|
-
}), /* @__PURE__ */
|
|
113
|
-
ref:
|
|
114
|
-
className:
|
|
115
|
-
"data-placement":
|
|
116
|
-
style:
|
|
117
|
-
children: /* @__PURE__ */
|
|
118
|
-
className:
|
|
113
|
+
}), /* @__PURE__ */ p("div", {
|
|
114
|
+
ref: j,
|
|
115
|
+
className: d("wim-tour", a.bubble),
|
|
116
|
+
"data-placement": L,
|
|
117
|
+
style: I,
|
|
118
|
+
children: /* @__PURE__ */ m("div", {
|
|
119
|
+
className: a.inner,
|
|
119
120
|
children: [
|
|
120
|
-
/* @__PURE__ */
|
|
121
|
-
className:
|
|
122
|
-
children:
|
|
121
|
+
/* @__PURE__ */ p("h3", {
|
|
122
|
+
className: a.title,
|
|
123
|
+
children: O.title
|
|
123
124
|
}),
|
|
124
|
-
/* @__PURE__ */
|
|
125
|
-
id:
|
|
126
|
-
className:
|
|
127
|
-
children:
|
|
125
|
+
/* @__PURE__ */ p("p", {
|
|
126
|
+
id: A,
|
|
127
|
+
className: a.description,
|
|
128
|
+
children: O.description
|
|
128
129
|
}),
|
|
129
|
-
/* @__PURE__ */
|
|
130
|
-
className:
|
|
131
|
-
children: [/* @__PURE__ */
|
|
132
|
-
className:
|
|
130
|
+
/* @__PURE__ */ m("div", {
|
|
131
|
+
className: a.footer,
|
|
132
|
+
children: [/* @__PURE__ */ m("span", {
|
|
133
|
+
className: a.progress,
|
|
133
134
|
children: [
|
|
134
|
-
|
|
135
|
+
w + 1,
|
|
135
136
|
" / ",
|
|
136
|
-
|
|
137
|
+
h.length
|
|
137
138
|
]
|
|
138
|
-
}), /* @__PURE__ */
|
|
139
|
-
className:
|
|
140
|
-
children: [
|
|
139
|
+
}), /* @__PURE__ */ m("div", {
|
|
140
|
+
className: a.buttons,
|
|
141
|
+
children: [w > 0 && /* @__PURE__ */ p(i, {
|
|
141
142
|
size: "sm",
|
|
142
143
|
variant: "outline",
|
|
143
|
-
onClick:
|
|
144
|
-
children:
|
|
145
|
-
}), /* @__PURE__ */
|
|
146
|
-
ref:
|
|
144
|
+
onClick: F,
|
|
145
|
+
children: C("action.back")
|
|
146
|
+
}), /* @__PURE__ */ p(i, {
|
|
147
|
+
ref: M,
|
|
147
148
|
size: "sm",
|
|
148
149
|
variant: "solid",
|
|
149
|
-
onClick:
|
|
150
|
-
children:
|
|
150
|
+
onClick: P,
|
|
151
|
+
children: w === h.length - 1 ? C("action.finish") : C("action.next")
|
|
151
152
|
})]
|
|
152
153
|
})]
|
|
153
154
|
})
|
|
154
155
|
]
|
|
155
156
|
})
|
|
156
|
-
})] }), /* @__PURE__ */
|
|
157
|
-
className:
|
|
158
|
-
onClick:
|
|
157
|
+
})] }), /* @__PURE__ */ p("div", {
|
|
158
|
+
className: a.mask,
|
|
159
|
+
onClick: x,
|
|
159
160
|
role: "button",
|
|
160
161
|
tabIndex: 0,
|
|
161
|
-
"aria-label":
|
|
162
|
+
"aria-label": C("a11y.close_tour"),
|
|
162
163
|
onKeyDown: (e) => {
|
|
163
|
-
(e.key === "Enter" || e.key === " ") &&
|
|
164
|
+
(e.key === "Enter" || e.key === " ") && x();
|
|
164
165
|
}
|
|
165
166
|
})]
|
|
166
167
|
})
|
|
167
168
|
}) });
|
|
168
169
|
};
|
|
169
170
|
//#endregion
|
|
170
|
-
export {
|
|
171
|
+
export { x as Tour };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../utilities/style-utils.cjs"),r=require("../../../i18n/useWimTranslation.cjs"),i=require("../../../
|
|
2
|
+
const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../node_modules/@radix-ui/react-slot/dist/index.cjs"),n=require("../../../utilities/style-utils.cjs"),r=require("../../../i18n/useWimTranslation.cjs"),i=require("../../../i18n/generated/common.cjs"),a=require("../../../hooks/useMergedRef.cjs"),o=require("../../../icon/loading.cjs"),s=require("../../media/Icon/Icon.cjs"),c=require("./button.module.cjs");let l=require("react");l=e.__toESM(l,1);let u=require("classnames");u=e.__toESM(u,1);let d=require("react/jsx-runtime");var f=l.default.forwardRef(({asChild:e=!1,size:f=`md`,variant:p=`outline`,intent:m=`default`,icon:h,iconPosition:g=`left`,loading:_=!1,backgroundColor:v,justify:y=`center`,animateWidth:b=!1,fullWidth:x=!1,styles:S,"aria-label":C,className:w,disabled:T,children:E,...D},O)=>{let k=l.default.useRef(null),A=a.useMergedRef(k,O),[j,M]=l.default.useState(`auto`),N=l.default.useRef(!0);l.default.useLayoutEffect(()=>{if(!b||!k.current)return;if(N.current){N.current=!1;return}let e=k.current,t=e.getBoundingClientRect().width;M(t);let n=e.style.width,r=e.style.minWidth;e.style.width=`auto`,e.style.minWidth=`0`;let i=Math.ceil(e.getBoundingClientRect().width)+2;e.style.width=n,e.style.minWidth=r;let a=requestAnimationFrame(()=>{M(i)});return()=>cancelAnimationFrame(a)},[E,b]);let{t:P}=r.useWimTranslation(i.commonNs),F=T,I;typeof C==`string`?I=C:C!==!1&&(!E&&typeof h==`string`?I=h:_&&(I=P(`a11y.loading`)));let L=y===`start`?`flex-start`:y===`end`?`flex-end`:y===`between`?`space-between`:y,R=_?(0,d.jsx)(`span`,{className:(0,u.default)(c.default.loader,S?.loader),children:(0,d.jsx)(s.Icon,{component:o.default,spin:!0,size:f})}):h?typeof h==`string`?(0,d.jsx)(s.Icon,{name:h,size:f,className:S?.icon}):h:null;return(0,d.jsxs)(e?t.Root:`button`,{ref:A,type:e?void 0:`button`,style:{...D.style,justifyContent:L,...v?{backgroundColor:n.getColorValue(v)}:{},...b&&j!==`auto`?{width:`${j}px`,transitionProperty:D.style?.transitionProperty||`width, background-color, border-color, box-shadow, transform`,transitionDuration:D.style?.transitionDuration||`var(--wim-duration-base)`,transitionTimingFunction:D.style?.transitionTimingFunction||`var(--wim-easing-standard)`,overflow:`hidden`,whiteSpace:`nowrap`,textOverflow:`clip`}:{}},className:(0,u.default)(`wim-button`,c.default.root,c.default[f],c.default[p],c.default[m],_&&c.default.loading,b&&c.default.animatedWidth,x&&c.default.fullWidth,!E&&!!h&&c.default.iconOnly,w,S?.root),disabled:(F||_)&&!e?!0:void 0,"aria-label":I,"aria-busy":_||void 0,...e?D:{...D},children:[e&&R&&g===`left`?R:null,e?(0,d.jsx)(t.Slottable,{children:E}):(0,d.jsxs)(`span`,{className:c.default.content,children:[R&&g===`left`&&R,E,R&&g===`right`&&R]}),e&&R&&g===`right`?R:null]})});f.displayName=`Button`,exports.Button=f;
|