@epam/ai-dial-ui-kit 0.15.0-dev.5 → 0.15.0-dev.50
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/README.md +194 -1
- package/dist/CHANGELOG.md +86 -0
- package/dist/{DateCellRenderer-BVM-Q8yx.cjs → DateCellRenderer-CZNa4jVJ.cjs} +31 -31
- package/dist/DateCellRenderer-X6vXPDIG.cjs +1 -0
- package/dist/IconButton-DHOFapLo.cjs +1 -0
- package/dist/JsonEditor-Bxui5wJH.cjs +1 -0
- package/dist/{MarkdownEditor-C9-ZMRVi.cjs → MarkdownEditor-BKtFs714.cjs} +1 -1
- package/dist/MarkdownEditor-Bapd1ycU.cjs +1 -0
- package/dist/MarkdownEditorContainer-B5aHwoYF.cjs +1 -0
- package/dist/{Switch-CUKClcEz.cjs → Switch-DE6MrcqJ.cjs} +1 -1
- package/dist/components/Button/constants.js +9 -8
- package/dist/components/Dropdown/Dropdown.js +70 -65
- package/dist/components/Dropdown/DropdownSubMenuItem.js +63 -55
- package/dist/components/Dropdown/constants.js +16 -14
- package/dist/components/DropdownIcon/DropdownIcon.js +43 -32
- package/dist/components/FileManager/FileManager.js +373 -372
- package/dist/components/FileManager/FileManagerProvider.js +266 -264
- package/dist/components/FileManager/hooks/use-grid-context-menu.js +59 -59
- package/dist/components/MarkdownEditor/MarkdownEditor.js +23 -21
- package/dist/components/MarkdownEditor/MarkdownEditorContainer.js +27 -27
- package/dist/components/New/Accordion/Accordion.js +87 -71
- package/dist/components/New/AutocompleteTagInput/AutocompleteTagInput.js +207 -0
- package/dist/components/New/AutocompleteTagInput/utils.js +11 -0
- package/dist/components/New/Avatar/Avatar.js +70 -0
- package/dist/components/New/Badge/Badge.js +45 -0
- package/dist/components/New/BottomSheet/BottomSheet.js +128 -0
- package/dist/components/New/Breadcrumbs/Breadcrumbs.js +159 -0
- package/dist/components/New/Breadcrumbs/constants.js +41 -0
- package/dist/components/New/Button/Button.js +32 -32
- package/dist/components/New/Button/ButtonWrappers.js +103 -37
- package/dist/components/New/Button/constants.js +3 -0
- package/dist/components/New/Button/utils.js +18 -8
- package/dist/components/New/ButtonDropdown/ButtonDropdown.js +26 -16
- package/dist/components/New/Calendar/Calendar.js +253 -222
- package/dist/components/New/Calendar/constants.js +5 -5
- package/dist/components/New/CaptionText/CaptionText.js +18 -15
- package/dist/components/New/CardShell/CardShell.js +5 -3
- package/dist/components/New/Checkbox/Checkbox.js +67 -56
- package/dist/components/New/Checkbox/CheckboxBox.js +5 -3
- package/dist/components/New/CloseButton/CloseButton.js +18 -16
- package/dist/components/New/CollapsibleSidebar/CollapsibleSidebar.js +39 -34
- package/dist/components/New/ConfirmationPopup/ConfirmationPopup.js +38 -37
- package/dist/components/New/ConfirmationPopup/constants.js +8 -11
- package/dist/components/New/Dropdown/Dropdown.js +112 -105
- package/dist/components/New/Dropdown/DropdownSubMenuItem.js +17 -17
- package/dist/components/New/Dropdown/constants.js +22 -17
- package/dist/components/New/EllipsisTooltip/EllipsisTooltip.js +20 -18
- package/dist/components/New/EntityIdentity/EntityIdentity.js +135 -0
- package/dist/components/New/FileDropzone/FileDropzone.js +27 -25
- package/dist/components/New/FileIcon/FileIcon.js +55 -0
- package/dist/components/New/FileIcon/constants.js +134 -0
- package/dist/components/New/FileIcon/icons/FileGlyph.js +150 -0
- package/dist/components/New/FileIcon/icons/FolderGlyph.js +50 -0
- package/dist/components/New/FileName/FileName.js +78 -0
- package/dist/components/New/FilterChips/FilterChips.js +43 -0
- package/dist/components/New/FilterChips/constants.js +5 -0
- package/dist/components/New/FolderName/FolderName.js +16 -0
- package/dist/components/New/FolderPath/FolderPath.js +29 -28
- package/dist/components/New/Highlight/Highlight.js +23 -30
- package/dist/components/New/IconButton/IconButton.js +30 -28
- package/dist/components/New/InfoButton/InfoButton.js +13 -11
- package/dist/components/New/InlineSelect/InlineSelect.js +74 -56
- package/dist/components/New/InteractiveTooltip/InteractiveTooltip.js +41 -39
- package/dist/components/New/InteractiveTooltip/constants.js +2 -2
- package/dist/components/New/Label/Label.js +13 -8
- package/dist/components/New/MarkdownEditor/MarkdownEditor.js +29 -27
- package/dist/components/New/MenuItem/MenuItem.js +29 -27
- package/dist/components/New/MenuItem/constants.js +9 -8
- package/dist/components/New/NoDataContent/NoDataContent.js +21 -19
- package/dist/components/New/Notification/Notification.js +33 -29
- package/dist/components/New/NumberInput/NumberInput.js +42 -33
- package/dist/components/New/PasswordInput/PasswordInput.js +41 -35
- package/dist/components/New/Popup/Popup.js +46 -44
- package/dist/components/New/Popup/constants.js +3 -3
- package/dist/components/New/Radio/Radio.js +75 -64
- package/dist/components/New/RadioGroup/RadioGroup.js +76 -65
- package/dist/components/New/RadioGroupPopupField/RadioGroupPopupField.js +117 -106
- package/dist/components/New/ResizableContainer/ResizableContainer.js +42 -40
- package/dist/components/New/SchemaRenderer/SchemaRenderer.js +164 -0
- package/dist/components/New/SchemaRenderer/components/SchemaAnyOfEditor.js +65 -0
- package/dist/components/New/SchemaRenderer/components/SchemaArrayEditor.js +109 -0
- package/dist/components/New/SchemaRenderer/components/SchemaField.js +83 -0
- package/dist/components/New/SchemaRenderer/components/SchemaFieldContent.js +72 -0
- package/dist/components/New/SchemaRenderer/components/SchemaJsonEditor.js +41 -0
- package/dist/components/New/SchemaRenderer/components/SchemaKeyValueEditor.js +250 -0
- package/dist/components/New/SchemaRenderer/components/SchemaObjectEditor.js +36 -0
- package/dist/components/New/SchemaRenderer/components/SchemaOneOfEditor.js +163 -0
- package/dist/components/New/SchemaRenderer/components/SchemaPrimitiveField.js +150 -0
- package/dist/components/New/SchemaRenderer/components/SchemaSection.js +135 -0
- package/dist/components/New/SchemaRenderer/context.js +17 -0
- package/dist/components/New/Search/Search.js +29 -27
- package/dist/components/New/SegmentedControl/SegmentedControl.js +29 -23
- package/dist/components/New/Select/CollapsedSelectTags.js +127 -0
- package/dist/components/New/Select/MultiSelectTags.js +18 -15
- package/dist/components/New/Select/Select.js +219 -197
- package/dist/components/New/Select/constants.js +23 -20
- package/dist/components/New/SharedEntityIndicator/SharedEntityIndicator.js +34 -0
- package/dist/components/New/SideDrawer/SideDrawer.js +148 -0
- package/dist/components/New/Slider/Slider.js +151 -90
- package/dist/components/New/Slider/utils.js +12 -0
- package/dist/components/New/Switch/Switch.js +69 -58
- package/dist/components/New/Tabs/Tabs.js +125 -61
- package/dist/components/New/Tag/Tag.js +42 -40
- package/dist/components/New/TagInput/TagInput.js +48 -44
- package/dist/components/New/Textarea/Textarea.js +21 -20
- package/dist/components/New/ToggleIconButton/ToggleIconButton.js +26 -24
- package/dist/components/New/Tooltip/TooltipContent.js +11 -9
- package/dist/components/New/Tooltip/constants.js +1 -1
- package/dist/components/New/TransferQueue/TransferQueue.js +124 -0
- package/dist/components/New/TransferQueue/TransferQueueHeader.js +71 -0
- package/dist/components/New/TransferQueue/TransferQueueRow.js +119 -0
- package/dist/components/New/TransferQueue/constants.js +24 -0
- package/dist/components/New/constants/overlay.js +17 -9
- package/dist/components/Popup/constants.js +8 -8
- package/dist/components/ProgressBar/ProgressBar.js +45 -33
- package/dist/components/SchemaRenderer/SchemaRenderer.js +16 -15
- package/dist/components/SchemaRenderer/components/SchemaAdditionalPropertiesEditor.js +46 -31
- package/dist/components/SchemaRenderer/components/SchemaAnyOfEditor.js +2 -2
- package/dist/components/SchemaRenderer/components/SchemaArrayEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaField.js +23 -23
- package/dist/components/SchemaRenderer/components/SchemaFieldContent.js +19 -19
- package/dist/components/SchemaRenderer/components/SchemaKeyValueEditor.js +223 -135
- package/dist/components/SchemaRenderer/components/SchemaObjectEditor.js +1 -1
- package/dist/components/SchemaRenderer/components/SchemaOneOfEditor.js +13 -13
- package/dist/components/SchemaRenderer/components/SchemaPrimitiveField.js +5 -5
- package/dist/components/Skeleton/Skeleton.js +25 -19
- package/dist/components/Spinner/Spinner.js +7 -5
- package/dist/components/Tooltip/TooltipContent.js +11 -11
- package/dist/components-manifest.json +1837 -84
- package/dist/constants/public-class-names.js +218 -0
- package/dist/constants/schema-renderer.js +33 -0
- package/dist/dial-ui-kit.cjs +2 -2
- package/dist/dial-ui-kit.js +356 -307
- package/dist/editors.cjs +1 -1
- package/dist/file-manager.cjs +1 -1
- package/dist/grid.cjs +1 -1
- package/dist/index.css +2 -2
- package/dist/lazy-_W6FYhKg.cjs +1 -0
- package/dist/merge-classes-BEJXjzkx.cjs +1 -0
- package/dist/migration-guides/0.15.0/legacy-theme-variable-fallbacks-removal.md +69 -0
- package/dist/migration-guides/0.15.0/slider-redesign.md +110 -0
- package/dist/migration-guides/README.md +2 -0
- package/dist/node_modules/tailwind-merge/dist/bundle-mjs.js +419 -399
- package/dist/src/components/FileManager/FileManager.d.ts +2 -0
- package/dist/src/components/FileManager/FileManagerContext.d.ts +1 -0
- package/dist/src/components/FileManager/hooks/use-grid-context-menu.d.ts +2 -1
- package/dist/src/components/MarkdownEditor/MarkdownEditor.d.ts +2 -0
- package/dist/src/components/MarkdownEditor/MarkdownEditorContainer.d.ts +2 -0
- package/dist/src/components/New/Accordion/Accordion.d.ts +6 -1
- package/dist/src/components/New/AutocompleteTagInput/AutocompleteTagInput.d.ts +97 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.d.ts +17 -0
- package/dist/src/components/New/AutocompleteTagInput/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Avatar/Avatar.d.ts +55 -0
- package/dist/src/components/New/Badge/Badge.d.ts +47 -0
- package/dist/src/components/New/BottomSheet/BottomSheet.d.ts +84 -0
- package/dist/src/components/New/Breadcrumbs/Breadcrumbs.d.ts +94 -0
- package/dist/src/components/New/Breadcrumbs/constants.d.ts +60 -0
- package/dist/src/components/New/Button/Button.d.ts +4 -1
- package/dist/src/components/New/Button/ButtonWrappers.d.ts +21 -0
- package/dist/src/components/New/Button/utils.d.ts +15 -0
- package/dist/src/components/New/ButtonDropdown/ButtonDropdown.d.ts +4 -0
- package/dist/src/components/New/Calendar/constants.d.ts +1 -1
- package/dist/src/components/New/ConfirmationPopup/constants.d.ts +0 -1
- package/dist/src/components/New/Dropdown/Dropdown.d.ts +9 -1
- package/dist/src/components/New/Dropdown/constants.d.ts +3 -0
- package/dist/src/components/New/EntityIdentity/EntityIdentity.d.ts +85 -0
- package/dist/src/components/New/FileIcon/FileIcon.d.ts +61 -0
- package/dist/src/components/New/FileIcon/constants.d.ts +16 -0
- package/dist/src/components/New/FileIcon/icons/FileGlyph.d.ts +18 -0
- package/dist/src/components/New/FileIcon/icons/FolderGlyph.d.ts +17 -0
- package/dist/src/components/New/FileName/FileName.d.ts +79 -0
- package/dist/src/components/New/FilterChips/FilterChips.d.ts +69 -0
- package/dist/src/components/New/FilterChips/constants.d.ts +13 -0
- package/dist/src/components/New/FolderName/FolderName.d.ts +37 -0
- package/dist/src/components/New/InlineSelect/InlineSelect.d.ts +16 -1
- package/dist/src/components/New/InteractiveTooltip/constants.d.ts +5 -4
- package/dist/src/components/New/MarkdownEditor/MarkdownEditor.d.ts +3 -0
- package/dist/src/components/New/Notification/Notification.d.ts +18 -0
- package/dist/src/components/New/Popup/constants.d.ts +1 -1
- package/dist/src/components/New/SchemaRenderer/SchemaRenderer.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaAnyOfEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaArrayEditor.d.ts +35 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaField.d.ts +33 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaFieldContent.d.ts +30 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaJsonEditor.d.ts +29 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaKeyValueEditor.d.ts +37 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaObjectEditor.d.ts +32 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaOneOfEditor.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaPrimitiveField.d.ts +38 -0
- package/dist/src/components/New/SchemaRenderer/components/SchemaSection.d.ts +39 -0
- package/dist/src/components/New/SchemaRenderer/context.d.ts +8 -0
- package/dist/src/components/New/SchemaRenderer/types.d.ts +76 -0
- package/dist/src/components/New/Select/CollapsedSelectTags.d.ts +22 -0
- package/dist/src/components/New/Select/MultiSelectTags.d.ts +5 -0
- package/dist/src/components/New/Select/Select.d.ts +9 -0
- package/dist/src/components/New/Select/constants.d.ts +3 -2
- package/dist/src/components/New/SharedEntityIndicator/SharedEntityIndicator.d.ts +35 -0
- package/dist/src/components/New/SideDrawer/SideDrawer.d.ts +100 -0
- package/dist/src/components/New/Slider/Slider.d.ts +20 -1
- package/dist/src/components/New/Slider/utils.d.ts +6 -0
- package/dist/src/components/New/Slider/utils.spec.d.ts +1 -0
- package/dist/src/components/New/Tabs/Tabs.d.ts +54 -6
- package/dist/src/components/New/Tooltip/constants.d.ts +5 -3
- package/dist/src/components/New/TransferQueue/TransferQueue.d.ts +139 -0
- package/dist/src/components/New/TransferQueue/TransferQueueHeader.d.ts +16 -0
- package/dist/src/components/New/TransferQueue/TransferQueueRow.d.ts +10 -0
- package/dist/src/components/New/TransferQueue/constants.d.ts +6 -0
- package/dist/src/components/New/constants/overlay.d.ts +13 -0
- package/dist/src/components/Popup/constants.d.ts +1 -1
- package/dist/src/components/SchemaRenderer/types.d.ts +5 -82
- package/dist/src/components/SchemaRenderer/utils.d.ts +1 -13
- package/dist/src/constants/public-class-names.d.ts +209 -0
- package/dist/src/constants/schema-renderer.d.ts +2 -0
- package/dist/src/index.d.ts +39 -2
- package/dist/src/models/json-schema.d.ts +71 -0
- package/dist/src/types/accordion.d.ts +7 -0
- package/dist/src/types/avatar.d.ts +7 -0
- package/dist/src/types/badge.d.ts +16 -0
- package/dist/src/types/breadcrumbs.d.ts +9 -0
- package/dist/src/types/button.d.ts +1 -0
- package/dist/src/types/entity-type.d.ts +9 -0
- package/dist/src/types/json-schema.d.ts +22 -0
- package/dist/src/types/transfer-queue.d.ts +10 -0
- package/dist/src/utils/__tests__/avatar.spec.d.ts +1 -0
- package/dist/src/utils/avatar.d.ts +12 -0
- package/dist/src/utils/json-schema.d.ts +23 -0
- package/dist/src/utils/sub-menu-floating.d.ts +7 -4
- package/dist/types/accordion.js +4 -0
- package/dist/types/avatar.js +4 -0
- package/dist/types/badge.js +5 -0
- package/dist/types/breadcrumbs.js +4 -0
- package/dist/types/button.js +3 -3
- package/dist/types/entity-type.js +4 -0
- package/dist/types/json-schema.js +7 -0
- package/dist/types/transfer-queue.js +4 -0
- package/dist/use-file-manager-tabs-Bzzwwcgk.cjs +3 -0
- package/dist/utils/avatar.js +22 -0
- package/dist/{components/SchemaRenderer/utils.js → utils/json-schema.js} +122 -95
- package/dist/utils/merge-classes.js +12 -5
- package/dist/utils/sub-menu-floating.js +99 -54
- package/package.json +4 -9
- package/dist/DateCellRenderer-ssp7eaZY.cjs +0 -1
- package/dist/IconButton-DWqoaBWf.cjs +0 -1
- package/dist/JsonEditor-D2jSlRFi.cjs +0 -1
- package/dist/MarkdownEditor-BzEbdj7R.cjs +0 -1
- package/dist/MarkdownEditorContainer-BvwJjkiZ.cjs +0 -1
- package/dist/components/SchemaRenderer/types.js +0 -27
- package/dist/editor-_174x-qy.cjs +0 -1
- package/dist/lazy-DM-7dL0Y.cjs +0 -1
- package/dist/merge-classes-Dipy1Ih1.cjs +0 -1
- package/dist/use-file-manager-tabs-DjdR_mYM.cjs +0 -3
|
@@ -1,184 +1,272 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useState as
|
|
3
|
-
import { IconPlus as
|
|
4
|
-
import { DialInput as
|
|
5
|
-
import { DialErrorText as
|
|
6
|
-
import { DialGhostButton as
|
|
7
|
-
import { DialRemoveButton as
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
|
|
1
|
+
import { jsxs as x, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as R, useCallback as U, useMemo as M } from "react";
|
|
3
|
+
import { IconPlus as V } from "@tabler/icons-react";
|
|
4
|
+
import { DialInput as L } from "../../Input/Input.js";
|
|
5
|
+
import { DialErrorText as ee } from "../../CaptionText/CaptionText.js";
|
|
6
|
+
import { DialGhostButton as te } from "../../Button/ButtonWrappers.js";
|
|
7
|
+
import { DialRemoveButton as oe } from "../../RemoveButton/RemoveButton.js";
|
|
8
|
+
import { DialSelect as Y } from "../../Select/Select.js";
|
|
9
|
+
import { DialTooltip as ne } from "../../Tooltip/Tooltip.js";
|
|
10
|
+
import { ElementSize as re } from "../../../types/size.js";
|
|
11
|
+
import { useSchemaContext as q } from "../context.js";
|
|
12
|
+
import { resolveRef as le, isObjectType as ae, inferEntryType as ie, getEntryTypeDefault as se, ENTRY_TYPE_OPTIONS as ce, buildSummary as de, validateRequired as me, extractDefaults as pe, getSchemaDefault as ye } from "../../../utils/json-schema.js";
|
|
13
|
+
import { SchemaPrimitiveField as ue } from "./SchemaPrimitiveField.js";
|
|
14
|
+
import { SchemaSection as fe } from "./SchemaSection.js";
|
|
15
|
+
import { SchemaFieldContent as he } from "./SchemaFieldContent.js";
|
|
16
|
+
import { SchemaAdditionalPropertiesEditor as be } from "./SchemaAdditionalPropertiesEditor.js";
|
|
17
|
+
import { JsonSchemaType as c } from "../../../types/json-schema.js";
|
|
18
|
+
const _ = (l, d) => ({
|
|
16
19
|
id: Math.random().toString(36).slice(2),
|
|
17
|
-
key:
|
|
18
|
-
value:
|
|
19
|
-
}),
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
key: l,
|
|
21
|
+
value: d
|
|
22
|
+
}), J = (l) => !!(l.oneOf || l.anyOf || l.type === c.Array || ae(l)), ve = {
|
|
23
|
+
[c.String]: "entryTypeString",
|
|
24
|
+
[c.Number]: "entryTypeNumber",
|
|
25
|
+
[c.Boolean]: "entryTypeBoolean",
|
|
26
|
+
[c.Null]: "entryTypeNull",
|
|
27
|
+
[c.Object]: "entryTypeObject",
|
|
28
|
+
[c.Array]: "entryTypeArray"
|
|
29
|
+
}, xe = ({
|
|
30
|
+
pairId: l,
|
|
31
|
+
pairKey: d,
|
|
32
|
+
pairValue: i,
|
|
33
|
+
valueSchema: u,
|
|
34
|
+
isUnschematizedValue: f,
|
|
35
|
+
jsonEditorTheme: C,
|
|
36
|
+
onKeyChange: m,
|
|
25
37
|
onValueChange: p,
|
|
26
|
-
onRemove:
|
|
27
|
-
keyInputPlaceholder:
|
|
28
|
-
removeFieldAriaLabel:
|
|
29
|
-
path:
|
|
30
|
-
level:
|
|
31
|
-
readonly:
|
|
32
|
-
inputClassName:
|
|
38
|
+
onRemove: P,
|
|
39
|
+
keyInputPlaceholder: O,
|
|
40
|
+
removeFieldAriaLabel: T,
|
|
41
|
+
path: h,
|
|
42
|
+
level: N,
|
|
43
|
+
readonly: s = !1,
|
|
44
|
+
inputClassName: b
|
|
33
45
|
}) => {
|
|
34
46
|
const {
|
|
35
|
-
rootSchema:
|
|
36
|
-
texts:
|
|
37
|
-
defaultExpanded:
|
|
38
|
-
touchedPaths:
|
|
39
|
-
markTouched:
|
|
47
|
+
rootSchema: v,
|
|
48
|
+
texts: y,
|
|
49
|
+
defaultExpanded: E = !0,
|
|
50
|
+
touchedPaths: j = /* @__PURE__ */ new Set(),
|
|
51
|
+
markTouched: w = () => {
|
|
40
52
|
},
|
|
41
|
-
skipUntouched:
|
|
42
|
-
} =
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
53
|
+
skipUntouched: D = !1
|
|
54
|
+
} = q(), [t, o] = R(d), a = J(u), [n, g] = R(
|
|
55
|
+
() => ie(i)
|
|
56
|
+
), B = f && (n === c.Object || n === c.Array), $ = f && n === c.Null, F = a || B, I = [...h, l, "key"].join("."), S = (!D || j.has(I)) && d === "", z = U(
|
|
57
|
+
(r) => {
|
|
58
|
+
p(se(r)), g(r);
|
|
59
|
+
},
|
|
60
|
+
[p]
|
|
61
|
+
), G = M(
|
|
62
|
+
() => ce.map((r) => ({
|
|
63
|
+
value: r,
|
|
64
|
+
label: y[ve[r]]
|
|
65
|
+
})),
|
|
66
|
+
[y]
|
|
67
|
+
), W = M(
|
|
68
|
+
() => [
|
|
69
|
+
{ value: "true", label: y.booleanTrueOption },
|
|
70
|
+
{ value: "false", label: y.booleanFalseOption }
|
|
71
|
+
],
|
|
72
|
+
[y]
|
|
73
|
+
), K = `${l}-key-error`, Q = f && n === c.Boolean, A = /* @__PURE__ */ x("div", { className: "flex gap-2 items-start", children: [
|
|
74
|
+
/* @__PURE__ */ x("div", { className: F ? "flex-1 min-w-0" : "w-2/5 min-w-0", children: [
|
|
75
|
+
/* @__PURE__ */ e(
|
|
76
|
+
L,
|
|
46
77
|
{
|
|
47
|
-
value:
|
|
48
|
-
disabled:
|
|
49
|
-
invalid:
|
|
50
|
-
|
|
78
|
+
value: t,
|
|
79
|
+
disabled: s,
|
|
80
|
+
invalid: S,
|
|
81
|
+
"aria-describedby": S ? K : void 0,
|
|
82
|
+
onChange: (r) => o(r ?? ""),
|
|
51
83
|
onBlur: () => {
|
|
52
|
-
|
|
84
|
+
w(I), t !== d && m(t);
|
|
53
85
|
},
|
|
54
|
-
placeholder:
|
|
55
|
-
containerClassName:
|
|
86
|
+
placeholder: O,
|
|
87
|
+
containerClassName: b
|
|
56
88
|
}
|
|
57
89
|
),
|
|
58
|
-
/* @__PURE__ */
|
|
59
|
-
|
|
90
|
+
/* @__PURE__ */ e(
|
|
91
|
+
ee,
|
|
60
92
|
{
|
|
61
|
-
|
|
93
|
+
id: K,
|
|
94
|
+
text: S ? `${y.keyColumnHeader} is required` : void 0
|
|
62
95
|
}
|
|
63
96
|
)
|
|
64
97
|
] }),
|
|
65
|
-
!
|
|
66
|
-
|
|
98
|
+
!a && !B && /* @__PURE__ */ e("div", { className: "flex-1 min-w-0", children: $ ? /* @__PURE__ */ e(
|
|
99
|
+
L,
|
|
100
|
+
{
|
|
101
|
+
value: "null",
|
|
102
|
+
disabled: !0,
|
|
103
|
+
onChange: void 0,
|
|
104
|
+
className: "opacity-60"
|
|
105
|
+
}
|
|
106
|
+
) : Q ? /* @__PURE__ */ e(
|
|
107
|
+
Y,
|
|
67
108
|
{
|
|
68
|
-
|
|
69
|
-
value:
|
|
109
|
+
options: W,
|
|
110
|
+
value: i ? "true" : "false",
|
|
111
|
+
disabled: s,
|
|
112
|
+
onChange: (r) => {
|
|
113
|
+
const k = typeof r == "string" ? r : r[0];
|
|
114
|
+
k && p(k === "true");
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
) : /* @__PURE__ */ e(
|
|
118
|
+
ue,
|
|
119
|
+
{
|
|
120
|
+
schema: f ? { type: n } : u,
|
|
121
|
+
value: i,
|
|
70
122
|
onChange: p
|
|
71
123
|
}
|
|
72
124
|
) }),
|
|
73
|
-
|
|
74
|
-
|
|
125
|
+
f && /* @__PURE__ */ e("div", { className: "w-28 shrink-0", children: /* @__PURE__ */ e(
|
|
126
|
+
ne,
|
|
127
|
+
{
|
|
128
|
+
tooltip: y.entryTypeChangeWarning,
|
|
129
|
+
triggerClassName: "block",
|
|
130
|
+
children: /* @__PURE__ */ e(
|
|
131
|
+
Y,
|
|
132
|
+
{
|
|
133
|
+
options: G,
|
|
134
|
+
value: n,
|
|
135
|
+
disabled: s,
|
|
136
|
+
onChange: (r) => {
|
|
137
|
+
const k = typeof r == "string" ? r : r[0];
|
|
138
|
+
k && z(k);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
)
|
|
142
|
+
}
|
|
143
|
+
) }),
|
|
144
|
+
!s && /* @__PURE__ */ e(
|
|
145
|
+
oe,
|
|
75
146
|
{
|
|
76
|
-
size:
|
|
77
|
-
onClick:
|
|
78
|
-
"aria-label":
|
|
147
|
+
size: re.Small,
|
|
148
|
+
onClick: P,
|
|
149
|
+
"aria-label": T,
|
|
79
150
|
className: "shrink-0 p-1"
|
|
80
151
|
}
|
|
81
152
|
)
|
|
82
153
|
] });
|
|
83
|
-
if (!
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
154
|
+
if (!F) return A;
|
|
155
|
+
if (B)
|
|
156
|
+
return /* @__PURE__ */ x("div", { className: "flex flex-col gap-2", children: [
|
|
157
|
+
A,
|
|
158
|
+
/* @__PURE__ */ e(
|
|
159
|
+
be,
|
|
160
|
+
{
|
|
161
|
+
value: i,
|
|
162
|
+
onChange: p,
|
|
163
|
+
theme: C
|
|
164
|
+
},
|
|
165
|
+
n
|
|
166
|
+
)
|
|
167
|
+
] });
|
|
168
|
+
const H = [...h, d], X = de(i, u, v), Z = me(
|
|
169
|
+
i,
|
|
170
|
+
u,
|
|
171
|
+
v,
|
|
172
|
+
H.join(".")
|
|
89
173
|
);
|
|
90
|
-
return /* @__PURE__ */
|
|
91
|
-
|
|
92
|
-
/* @__PURE__ */
|
|
93
|
-
|
|
174
|
+
return /* @__PURE__ */ x("div", { className: "flex flex-col gap-2", children: [
|
|
175
|
+
A,
|
|
176
|
+
/* @__PURE__ */ e(
|
|
177
|
+
fe,
|
|
94
178
|
{
|
|
95
|
-
title:
|
|
96
|
-
level:
|
|
97
|
-
summary:
|
|
98
|
-
errorCount:
|
|
99
|
-
defaultExpanded:
|
|
100
|
-
children: /* @__PURE__ */
|
|
101
|
-
|
|
179
|
+
title: d,
|
|
180
|
+
level: N,
|
|
181
|
+
summary: X,
|
|
182
|
+
errorCount: Z.length + (S ? 1 : 0),
|
|
183
|
+
defaultExpanded: E,
|
|
184
|
+
children: /* @__PURE__ */ e(
|
|
185
|
+
he,
|
|
102
186
|
{
|
|
103
|
-
schema:
|
|
104
|
-
value:
|
|
187
|
+
schema: u,
|
|
188
|
+
value: i,
|
|
105
189
|
onChange: p,
|
|
106
|
-
path:
|
|
107
|
-
level:
|
|
190
|
+
path: H,
|
|
191
|
+
level: N + 1
|
|
108
192
|
}
|
|
109
193
|
)
|
|
110
194
|
}
|
|
111
195
|
)
|
|
112
196
|
] });
|
|
113
|
-
},
|
|
114
|
-
schema:
|
|
115
|
-
value:
|
|
116
|
-
onChange:
|
|
117
|
-
path:
|
|
118
|
-
level:
|
|
197
|
+
}, He = ({
|
|
198
|
+
schema: l,
|
|
199
|
+
value: d,
|
|
200
|
+
onChange: i,
|
|
201
|
+
path: u,
|
|
202
|
+
level: f
|
|
119
203
|
}) => {
|
|
120
204
|
const {
|
|
121
|
-
rootSchema:
|
|
122
|
-
texts:
|
|
123
|
-
readonly:
|
|
124
|
-
inputClassName:
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
205
|
+
rootSchema: C,
|
|
206
|
+
texts: m,
|
|
207
|
+
readonly: p = !1,
|
|
208
|
+
inputClassName: P,
|
|
209
|
+
jsonEditorTheme: O
|
|
210
|
+
} = q(), T = l.additionalProperties === !0 || l.additionalProperties == null, h = T ? { type: "string" } : typeof l.additionalProperties == "object" ? le(l.additionalProperties, C) : { type: "string" }, N = J(h), [s, b] = R(
|
|
211
|
+
() => Object.entries(d ?? {}).map(
|
|
212
|
+
([t, o]) => _(t, o)
|
|
128
213
|
)
|
|
129
|
-
),
|
|
130
|
-
|
|
131
|
-
),
|
|
132
|
-
const
|
|
133
|
-
(
|
|
214
|
+
), v = (t) => Object.fromEntries(
|
|
215
|
+
t.filter((o) => o.key !== "").map((o) => [o.key, o.value])
|
|
216
|
+
), y = (t, o) => {
|
|
217
|
+
const a = s.map(
|
|
218
|
+
(n, g) => g === t ? { ...n, key: o } : n
|
|
134
219
|
);
|
|
135
|
-
|
|
136
|
-
},
|
|
137
|
-
const
|
|
138
|
-
(
|
|
220
|
+
b(a), i(v(a));
|
|
221
|
+
}, E = (t, o) => {
|
|
222
|
+
const a = s.map(
|
|
223
|
+
(n, g) => g === t ? { ...n, value: o } : n
|
|
139
224
|
);
|
|
140
|
-
|
|
141
|
-
},
|
|
142
|
-
|
|
143
|
-
},
|
|
144
|
-
const
|
|
145
|
-
|
|
225
|
+
b(a), i(v(a));
|
|
226
|
+
}, j = () => N ? pe(h, C) ?? ye(h) : "", w = () => {
|
|
227
|
+
b((t) => [...t, _("", j())]);
|
|
228
|
+
}, D = (t) => {
|
|
229
|
+
const o = s.filter((a, n) => n !== t);
|
|
230
|
+
b(o), i(v(o));
|
|
146
231
|
};
|
|
147
|
-
return /* @__PURE__ */
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
/* @__PURE__ */
|
|
151
|
-
/* @__PURE__ */
|
|
232
|
+
return /* @__PURE__ */ x("div", { className: "flex flex-col gap-2", children: [
|
|
233
|
+
s.length === 0 && /* @__PURE__ */ e("p", { className: "dial-tiny-text text-secondary italic", children: m.noFieldsYet }),
|
|
234
|
+
s.length > 0 && !N && /* @__PURE__ */ x("div", { className: "flex gap-2 mb-1 pr-7", children: [
|
|
235
|
+
/* @__PURE__ */ e("span", { className: "w-2/5 dial-tiny-text text-secondary font-medium", children: m.keyColumnHeader }),
|
|
236
|
+
/* @__PURE__ */ e("span", { className: "flex-1 dial-tiny-text text-secondary font-medium", children: m.valueColumnHeader }),
|
|
237
|
+
T && /* @__PURE__ */ e("span", { className: "w-28 shrink-0 dial-tiny-text text-secondary font-medium", children: m.typeColumnHeader })
|
|
152
238
|
] }),
|
|
153
|
-
|
|
154
|
-
|
|
239
|
+
s.map((t, o) => /* @__PURE__ */ e(
|
|
240
|
+
xe,
|
|
155
241
|
{
|
|
156
|
-
pairId:
|
|
157
|
-
pairKey:
|
|
158
|
-
pairValue:
|
|
159
|
-
valueSchema:
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
242
|
+
pairId: t.id,
|
|
243
|
+
pairKey: t.key,
|
|
244
|
+
pairValue: t.value,
|
|
245
|
+
valueSchema: h,
|
|
246
|
+
isUnschematizedValue: T,
|
|
247
|
+
jsonEditorTheme: O,
|
|
248
|
+
onKeyChange: (a) => y(o, a),
|
|
249
|
+
onValueChange: (a) => E(o, a),
|
|
250
|
+
onRemove: () => D(o),
|
|
251
|
+
keyInputPlaceholder: m.keyInputPlaceholder,
|
|
252
|
+
removeFieldAriaLabel: m.removeFieldAriaLabel,
|
|
253
|
+
path: u,
|
|
254
|
+
level: f,
|
|
255
|
+
readonly: p,
|
|
256
|
+
inputClassName: P
|
|
169
257
|
},
|
|
170
|
-
|
|
258
|
+
t.id
|
|
171
259
|
)),
|
|
172
|
-
!
|
|
173
|
-
|
|
260
|
+
!p && /* @__PURE__ */ e("div", { className: "pt-1", children: /* @__PURE__ */ e(
|
|
261
|
+
te,
|
|
174
262
|
{
|
|
175
|
-
label:
|
|
176
|
-
iconBefore: /* @__PURE__ */
|
|
177
|
-
onClick:
|
|
263
|
+
label: m.addField,
|
|
264
|
+
iconBefore: /* @__PURE__ */ e(V, { size: 16, stroke: 2 }),
|
|
265
|
+
onClick: w
|
|
178
266
|
}
|
|
179
267
|
) })
|
|
180
268
|
] });
|
|
181
269
|
};
|
|
182
270
|
export {
|
|
183
|
-
|
|
271
|
+
He as SchemaKeyValueEditor
|
|
184
272
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { useSchemaContext as v } from "../context.js";
|
|
3
|
-
import { resolveRef as i, sortByPropertyOrder as g, toFieldLabel as j } from "
|
|
3
|
+
import { resolveRef as i, sortByPropertyOrder as g, toFieldLabel as j } from "../../../utils/json-schema.js";
|
|
4
4
|
import { SchemaField as q } from "./SchemaField.js";
|
|
5
5
|
const N = ({
|
|
6
6
|
schema: c,
|
|
@@ -2,11 +2,11 @@ import { jsxs as v, jsx as o } from "react/jsx-runtime";
|
|
|
2
2
|
import { useId as q } from "react";
|
|
3
3
|
import { DialSelect as y } from "../../Select/Select.js";
|
|
4
4
|
import { DialRadioButton as j } from "../../RadioButton/RadioButton.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { resolveRef as a, getOptionLabel as L, extractDefaults as _ } from "../utils.js";
|
|
5
|
+
import { useSchemaContext as B } from "../context.js";
|
|
6
|
+
import { resolveRef as a, getOptionLabel as G, extractDefaults as P } from "../../../utils/json-schema.js";
|
|
8
7
|
import { SchemaObjectEditor as w } from "./SchemaObjectEditor.js";
|
|
9
|
-
import { SchemaFieldContent as
|
|
8
|
+
import { SchemaFieldContent as _ } from "./SchemaFieldContent.js";
|
|
9
|
+
import { SchemaDisplayMode as C, SchemaOrientation as L } from "../../../types/json-schema.js";
|
|
10
10
|
const Z = ({
|
|
11
11
|
schema: x,
|
|
12
12
|
value: c,
|
|
@@ -14,17 +14,17 @@ const Z = ({
|
|
|
14
14
|
path: u,
|
|
15
15
|
level: S
|
|
16
16
|
}) => {
|
|
17
|
-
const { rootSchema: i, texts: A, readonly: b = !1 } =
|
|
17
|
+
const { rootSchema: i, texts: A, readonly: b = !1 } = B(), p = q(), O = x.discriminator;
|
|
18
18
|
if (O) {
|
|
19
19
|
const r = O.propertyName, e = O.mapping, n = Object.keys(e).map((s) => ({
|
|
20
20
|
value: s,
|
|
21
21
|
label: s
|
|
22
22
|
})), l = typeof c == "object" && c !== null ? c[r] : void 0, g = l ? a({ $ref: e[l] }, i) : void 0, I = (s) => {
|
|
23
|
-
const m = a({ $ref: e[s] }, i), t =
|
|
23
|
+
const m = a({ $ref: e[s] }, i), t = P(m, i) ?? {};
|
|
24
24
|
d({ ...t, [r]: s });
|
|
25
25
|
};
|
|
26
|
-
if (x.discriminatorDisplay ===
|
|
27
|
-
const s = x.discriminatorOrientation ===
|
|
26
|
+
if (x.discriminatorDisplay === C.Radio) {
|
|
27
|
+
const s = x.discriminatorOrientation === L.Row, m = l ? (() => {
|
|
28
28
|
const t = a(
|
|
29
29
|
{ $ref: e[l] },
|
|
30
30
|
i
|
|
@@ -127,12 +127,12 @@ const Z = ({
|
|
|
127
127
|
}
|
|
128
128
|
return 0;
|
|
129
129
|
})(), D = (r) => {
|
|
130
|
-
const e = a(f[r], i), n =
|
|
130
|
+
const e = a(f[r], i), n = P(e, i);
|
|
131
131
|
d(n ?? null);
|
|
132
132
|
}, R = f[$];
|
|
133
|
-
if (x.discriminatorDisplay ===
|
|
133
|
+
if (x.discriminatorDisplay === C.Radio)
|
|
134
134
|
return /* @__PURE__ */ o("div", { role: "radiogroup", className: "flex flex-col gap-2", children: f.map((r, e) => {
|
|
135
|
-
const n = a(r, i), l =
|
|
135
|
+
const n = a(r, i), l = G(r, i) ?? `Option ${e + 1}`, g = $ === e;
|
|
136
136
|
return /* @__PURE__ */ v("div", { className: "flex flex-col", children: [
|
|
137
137
|
/* @__PURE__ */ o(
|
|
138
138
|
j,
|
|
@@ -147,7 +147,7 @@ const Z = ({
|
|
|
147
147
|
}
|
|
148
148
|
),
|
|
149
149
|
g && n && /* @__PURE__ */ o("div", { className: "ml-6 mt-2", children: /* @__PURE__ */ o(
|
|
150
|
-
|
|
150
|
+
_,
|
|
151
151
|
{
|
|
152
152
|
schema: n,
|
|
153
153
|
value: c,
|
|
@@ -176,7 +176,7 @@ const Z = ({
|
|
|
176
176
|
}
|
|
177
177
|
) }),
|
|
178
178
|
R && /* @__PURE__ */ o("div", { className: "pl-3 border-l-2 border-secondary", children: /* @__PURE__ */ o(
|
|
179
|
-
|
|
179
|
+
_,
|
|
180
180
|
{
|
|
181
181
|
schema: R,
|
|
182
182
|
value: c,
|
|
@@ -6,8 +6,8 @@ import { DialNumberInput as b } from "../../NumberInput/NumberInput.js";
|
|
|
6
6
|
import { DialSwitch as C } from "../../Switch/Switch.js";
|
|
7
7
|
import { DialSelect as y } from "../../Select/Select.js";
|
|
8
8
|
import { DialRadioButton as P } from "../../RadioButton/RadioButton.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
9
|
+
import { useSchemaContext as w } from "../context.js";
|
|
10
|
+
import { JsonSchemaType as c, SchemaDisplayMode as D, SchemaOrientation as x } from "../../../types/json-schema.js";
|
|
11
11
|
const E = ({
|
|
12
12
|
schema: t,
|
|
13
13
|
value: e,
|
|
@@ -19,7 +19,7 @@ const E = ({
|
|
|
19
19
|
readonly: l = !1,
|
|
20
20
|
inputClassName: p,
|
|
21
21
|
acceptableResourceTypes: h
|
|
22
|
-
} =
|
|
22
|
+
} = w(), N = t.const !== void 0, g = Array.isArray(t.enum) && t.enum.length > 0;
|
|
23
23
|
if (t["dial:resource"] === !0 && Array.isArray(t.acceptableResourceTypes) && t.acceptableResourceTypes.length > 0 && (t.type === c.String || t.type === void 0)) {
|
|
24
24
|
const r = (t.acceptableResourceTypes ?? []).flatMap(
|
|
25
25
|
(o) => {
|
|
@@ -53,8 +53,8 @@ const E = ({
|
|
|
53
53
|
className: "opacity-60"
|
|
54
54
|
}
|
|
55
55
|
);
|
|
56
|
-
if (g && t.enumDisplay ===
|
|
57
|
-
const r = t.enumOrientation ===
|
|
56
|
+
if (g && t.enumDisplay === D.Radio) {
|
|
57
|
+
const r = t.enumOrientation === x.Row;
|
|
58
58
|
return /* @__PURE__ */ i(
|
|
59
59
|
"div",
|
|
60
60
|
{
|
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import { jsx as t, Fragment as
|
|
1
|
+
import { jsx as t, Fragment as L, jsxs as k } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import { mergeClasses as n } from "../../utils/merge-classes.js";
|
|
4
|
-
import { SkeletonVariant as i, SkeletonAvatarShape as
|
|
5
|
-
import { getAvatarSize as
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
import { SkeletonVariant as i, SkeletonAvatarShape as S } from "../../types/skeleton.js";
|
|
5
|
+
import { getAvatarSize as P } from "./utils.js";
|
|
6
|
+
import { DIAL_KIT_CLASS as R } from "../../constants/public-class-names.js";
|
|
7
|
+
const B = ({
|
|
8
|
+
active: A = !0,
|
|
8
9
|
paragraph: u = !0,
|
|
9
10
|
avatar: m = !1,
|
|
10
11
|
showTitle: p = !0,
|
|
11
|
-
loading:
|
|
12
|
+
loading: N = !0,
|
|
12
13
|
children: g,
|
|
13
14
|
variant: o = i.Default,
|
|
14
15
|
width: l,
|
|
@@ -16,13 +17,13 @@ const G = ({
|
|
|
16
17
|
overlay: s,
|
|
17
18
|
color: e,
|
|
18
19
|
className: h,
|
|
19
|
-
...
|
|
20
|
+
...C
|
|
20
21
|
}) => {
|
|
21
|
-
if (!
|
|
22
|
-
return /* @__PURE__ */ t(
|
|
22
|
+
if (!N && g)
|
|
23
|
+
return /* @__PURE__ */ t(L, { children: g });
|
|
23
24
|
const d = n(
|
|
24
25
|
"bg-layer-raised",
|
|
25
|
-
|
|
26
|
+
A && "animate-pulse",
|
|
26
27
|
h
|
|
27
28
|
);
|
|
28
29
|
if (o !== i.Default) {
|
|
@@ -33,21 +34,26 @@ const G = ({
|
|
|
33
34
|
o === i.Text && "rounded",
|
|
34
35
|
!!s && "relative"
|
|
35
36
|
), r = {};
|
|
36
|
-
return l && (r.width = typeof l == "number" ? `${l}px` : l), c && (r.height = typeof c == "number" ? `${c}px` : c), e && (r.backgroundColor = e), /* @__PURE__ */ t("div", { className: a, style: r, ...
|
|
37
|
+
return l && (r.width = typeof l == "number" ? `${l}px` : l), c && (r.height = typeof c == "number" ? `${c}px` : c), e && (r.backgroundColor = e), /* @__PURE__ */ t("div", { className: a, style: r, ...C, children: s && /* @__PURE__ */ t("div", { className: "absolute inset-0 flex items-center justify-center pointer-events-none", children: s }) });
|
|
37
38
|
}
|
|
38
|
-
const
|
|
39
|
+
const j = !!m, w = !!p, z = !!u, b = typeof m == "object" ? m : {}, D = typeof p == "object" ? p : {}, x = typeof u == "object" ? u : {}, y = P(b.size), W = b.shape ?? S.Circle, _ = D.width ?? "38%", v = x.rows ?? 3, f = x.width, I = (a) => f ? Array.isArray(f) ? f[a] ?? "100%" : f : a === v - 1 ? "61%" : "100%";
|
|
39
40
|
return /* @__PURE__ */ k(
|
|
40
41
|
"div",
|
|
41
42
|
{
|
|
42
|
-
...
|
|
43
|
-
className: n(
|
|
43
|
+
...C,
|
|
44
|
+
className: n(
|
|
45
|
+
"flex gap-4",
|
|
46
|
+
!!s && "relative",
|
|
47
|
+
h,
|
|
48
|
+
R.skeleton
|
|
49
|
+
),
|
|
44
50
|
children: [
|
|
45
|
-
|
|
51
|
+
j && /* @__PURE__ */ t(
|
|
46
52
|
"div",
|
|
47
53
|
{
|
|
48
54
|
className: n(
|
|
49
55
|
d,
|
|
50
|
-
|
|
56
|
+
W === S.Circle ? "rounded-full" : "rounded",
|
|
51
57
|
"flex-shrink-0"
|
|
52
58
|
),
|
|
53
59
|
style: {
|
|
@@ -63,7 +69,7 @@ const G = ({
|
|
|
63
69
|
{
|
|
64
70
|
className: n(d, "h-4 rounded"),
|
|
65
71
|
style: {
|
|
66
|
-
width:
|
|
72
|
+
width: _,
|
|
67
73
|
...e && { backgroundColor: e }
|
|
68
74
|
}
|
|
69
75
|
}
|
|
@@ -73,7 +79,7 @@ const G = ({
|
|
|
73
79
|
{
|
|
74
80
|
className: n(d, "h-4 rounded"),
|
|
75
81
|
style: {
|
|
76
|
-
width:
|
|
82
|
+
width: I(r),
|
|
77
83
|
...e && { backgroundColor: e }
|
|
78
84
|
}
|
|
79
85
|
},
|
|
@@ -86,5 +92,5 @@ const G = ({
|
|
|
86
92
|
);
|
|
87
93
|
};
|
|
88
94
|
export {
|
|
89
|
-
|
|
95
|
+
B as Skeleton
|
|
90
96
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
-
import { mergeClasses as
|
|
3
|
-
|
|
2
|
+
import { mergeClasses as n } from "../../utils/merge-classes.js";
|
|
3
|
+
import { DIAL_KIT_CLASS as o } from "../../constants/public-class-names.js";
|
|
4
|
+
const d = ({
|
|
4
5
|
size: e = 40,
|
|
5
6
|
className: s,
|
|
6
7
|
fullWidth: t = !1,
|
|
@@ -9,10 +10,11 @@ const o = ({
|
|
|
9
10
|
"div",
|
|
10
11
|
{
|
|
11
12
|
role: "status",
|
|
12
|
-
className:
|
|
13
|
+
className: n(
|
|
13
14
|
"flex items-center justify-center",
|
|
14
15
|
{ "size-full": t },
|
|
15
|
-
s
|
|
16
|
+
s,
|
|
17
|
+
o.spinner
|
|
16
18
|
),
|
|
17
19
|
children: /* @__PURE__ */ r(
|
|
18
20
|
"div",
|
|
@@ -26,5 +28,5 @@ const o = ({
|
|
|
26
28
|
}
|
|
27
29
|
);
|
|
28
30
|
export {
|
|
29
|
-
|
|
31
|
+
d as Spinner
|
|
30
32
|
};
|