@gooddata/sdk-ui-kit 11.68.0-alpha.1 → 11.68.0-alpha.11
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/LICENSE +1 -1
- package/NOTICE +9899 -0
- package/esm/@ui/@types/icon.d.ts +1 -1
- package/esm/@ui/@types/icon.d.ts.map +1 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/SkeletonItemFactory.d.ts.map +1 -1
- package/esm/@ui/UiAsyncTable/UiAsyncTable/SkeletonItemFactory.js +2 -2
- package/esm/@ui/UiConfigEditor/UiConfigEditor.d.ts +1 -1
- package/esm/@ui/UiConfigEditor/UiConfigEditor.d.ts.map +1 -1
- package/esm/@ui/UiConfigEditor/UiConfigEditor.js +62 -25
- package/esm/@ui/UiConfigEditor/configEditorDiagnostics.d.ts +10 -0
- package/esm/@ui/UiConfigEditor/configEditorDiagnostics.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/configEditorDiagnostics.js +65 -0
- package/esm/@ui/UiConfigEditor/configEditorYamlIndent.d.ts +8 -0
- package/esm/@ui/UiConfigEditor/configEditorYamlIndent.d.ts.map +1 -0
- package/esm/@ui/UiConfigEditor/configEditorYamlIndent.js +33 -0
- package/esm/@ui/UiConfigEditor/types.d.ts +9 -6
- package/esm/@ui/UiConfigEditor/types.d.ts.map +1 -1
- package/esm/@ui/UiDrawer/UiDrawer.d.ts.map +1 -1
- package/esm/@ui/UiDrawer/UiDrawer.js +14 -4
- package/esm/@ui/UiFloatingElement/UiFloatingElement.d.ts.map +1 -1
- package/esm/@ui/UiFloatingElement/UiFloatingElement.js +1 -1
- package/esm/@ui/UiFocusManager/UiAutofocus.d.ts.map +1 -1
- package/esm/@ui/UiFocusManager/UiAutofocus.js +22 -2
- package/esm/@ui/UiFocusManager/UiModalOwner.d.ts +11 -0
- package/esm/@ui/UiFocusManager/UiModalOwner.d.ts.map +1 -0
- package/esm/@ui/UiFocusManager/UiModalOwner.js +18 -0
- package/esm/@ui/UiIcon/icons.d.ts.map +1 -1
- package/esm/@ui/UiIcon/icons.js +15 -0
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxInteractiveItemComponent.d.ts.map +1 -1
- package/esm/@ui/UiListbox/defaults/DefaultUiListboxInteractiveItemComponent.js +5 -3
- package/esm/@ui/UiListbox/itemTitle.d.ts +5 -0
- package/esm/@ui/UiListbox/itemTitle.d.ts.map +1 -0
- package/esm/@ui/UiListbox/itemTitle.js +4 -0
- package/esm/@ui/UiListbox/types.d.ts +4 -0
- package/esm/@ui/UiListbox/types.d.ts.map +1 -1
- package/esm/@ui/UiModalDialog/UiDialogHeader.d.ts +1 -9
- package/esm/@ui/UiModalDialog/UiDialogHeader.d.ts.map +1 -1
- package/esm/@ui/UiModalDialog/UiDialogHeader.js +5 -4
- package/esm/@ui/UiModalDialog/UiModalDialog.d.ts +16 -2
- package/esm/@ui/UiModalDialog/UiModalDialog.d.ts.map +1 -1
- package/esm/@ui/UiModalDialog/UiModalDialog.js +13 -5
- package/esm/@ui/UiPagedVirtualList/UiPagedVirtualList.d.ts +1 -0
- package/esm/@ui/UiPagedVirtualList/UiPagedVirtualList.d.ts.map +1 -1
- package/esm/@ui/UiPagedVirtualList/UiPagedVirtualList.js +7 -3
- package/esm/@ui/UiSearchableSelect/UiSearchableSelect.d.ts +14 -1
- package/esm/@ui/UiSearchableSelect/UiSearchableSelect.d.ts.map +1 -1
- package/esm/@ui/UiSearchableSelect/UiSearchableSelect.js +80 -38
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectContext.d.ts +14 -2
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectContext.d.ts.map +1 -1
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectFooter.d.ts +13 -0
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectFooter.d.ts.map +1 -0
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectFooter.js +17 -0
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectItem.d.ts +6 -0
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectItem.d.ts.map +1 -1
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectItem.js +2 -2
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectList.d.ts.map +1 -1
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectList.js +9 -14
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectSearch.d.ts.map +1 -1
- package/esm/@ui/UiSearchableSelect/UiSearchableSelectSearch.js +8 -12
- package/esm/@ui/UiToolbarIconButton/UiToolbarIconButton.d.ts +5 -1
- package/esm/@ui/UiToolbarIconButton/UiToolbarIconButton.d.ts.map +1 -1
- package/esm/@ui/UiToolbarIconButton/UiToolbarIconButton.js +2 -2
- package/esm/@ui/UiToolbarSelect/UiToolbarSelect.d.ts +9 -0
- package/esm/@ui/UiToolbarSelect/UiToolbarSelect.d.ts.map +1 -1
- package/esm/@ui/UiToolbarSelect/UiToolbarSelect.js +4 -2
- package/esm/Bubble/Bubble.d.ts.map +1 -1
- package/esm/Bubble/Bubble.js +3 -2
- package/esm/ChartSorting/ChartSorting.d.ts.map +1 -1
- package/esm/ChartSorting/ChartSorting.js +2 -2
- package/esm/ColorPicker/ColorPicker.d.ts.map +1 -1
- package/esm/ColorPicker/ColorPicker.js +2 -2
- package/esm/DateDatasets/dateDatasets.d.ts.map +1 -1
- package/esm/DateDatasets/dateDatasets.js +3 -2
- package/esm/Datepicker/Datepicker.d.ts.map +1 -1
- package/esm/Datepicker/Datepicker.js +2 -2
- package/esm/DescriptionPanel/DescriptionPanel.d.ts.map +1 -1
- package/esm/DescriptionPanel/DescriptionPanel.js +2 -2
- package/esm/DescriptionPanel/MetadataList.d.ts.map +1 -1
- package/esm/DescriptionPanel/MetadataList.js +2 -3
- package/esm/Dialog/DialogBase.d.ts.map +1 -1
- package/esm/Dialog/DialogBase.js +6 -2
- package/esm/Dialog/EmbedInsightDialog/EmbedInsightDialogBase/components/NumericInput.d.ts.map +1 -1
- package/esm/Dialog/EmbedInsightDialog/EmbedInsightDialogBase/components/NumericInput.js +4 -4
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/ShareGranteeBase.js +2 -2
- package/esm/Dialog/ShareDialog/ShareDialogBase/types.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/types.js +10 -10
- package/esm/Dialog/ShareDialog/ShareDialogBase/useShareDialogBase.d.ts.map +1 -1
- package/esm/Dialog/ShareDialog/ShareDialogBase/useShareDialogBase.js +3 -3
- package/esm/Dialog/ShareDialog/ShareDialogBase/utils.js +3 -3
- package/esm/DocumentHeader/DocumentHeader.js +3 -3
- package/esm/Dropdown/DropdownInvertableSelect.d.ts.map +1 -1
- package/esm/Dropdown/DropdownInvertableSelect.js +2 -2
- package/esm/Dropdown/DropdownList.d.ts +2 -1
- package/esm/Dropdown/DropdownList.d.ts.map +1 -1
- package/esm/Dropdown/DropdownList.js +2 -2
- package/esm/Form/InputWithNumberFormat.js +2 -2
- package/esm/Header/Header.d.ts.map +1 -1
- package/esm/Header/Header.js +5 -3
- package/esm/Header/HeaderHelp.d.ts.map +1 -1
- package/esm/Header/HeaderHelp.js +2 -2
- package/esm/Hyperlink/Hyperlink.d.ts.map +1 -1
- package/esm/Hyperlink/Hyperlink.js +3 -3
- package/esm/LoadingDots/LoadingDots.d.ts.map +1 -1
- package/esm/LoadingDots/LoadingDots.js +3 -3
- package/esm/Overlay/FullScreenOverlay.js +3 -3
- package/esm/Overlay/Overlay.d.ts.map +1 -1
- package/esm/Overlay/Overlay.js +19 -12
- package/esm/RecurrenceForm/utils/utils.d.ts.map +1 -1
- package/esm/RecurrenceForm/utils/utils.js +4 -3
- package/esm/ResponsiveText/ResponsiveText.js +2 -2
- package/esm/RichText/plugins/rehype-references.js +1 -1
- package/esm/Timezone/TimezoneSelect.d.ts +7 -0
- package/esm/Timezone/TimezoneSelect.d.ts.map +1 -1
- package/esm/Timezone/TimezoneSelect.js +9 -3
- package/esm/Timezone/timezones.d.ts +4 -0
- package/esm/Timezone/timezones.d.ts.map +1 -1
- package/esm/Timezone/timezones.js +11 -5
- package/esm/index.d.ts +5 -3
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +4 -2
- package/esm/sdk-ui-kit.d.ts +102 -40
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorKeymap.d.ts +2 -0
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorKeymap.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/hooks/useCodemirrorKeymap.js +6 -3
- package/esm/syntaxHighlightingInput/syntaxErrorLinter.d.ts +2 -2
- package/esm/syntaxHighlightingInput/syntaxErrorLinter.d.ts.map +1 -1
- package/esm/syntaxHighlightingInput/syntaxErrorLinter.js +10 -5
- package/esm/utils/overlay.d.ts.map +1 -1
- package/esm/utils/overlay.js +5 -4
- package/package.json +13 -12
- package/src/@ui/UiListbox/UiListbox.scss +15 -2
- package/src/@ui/UiModalDialog/UiModalDialog.scss +49 -7
- package/src/@ui/UiResizableSidebar/UiResizableSidebarNavigation.scss +10 -0
- package/src/@ui/UiSearchableSelect/UiSearchableSelect.scss +44 -0
- package/src/@ui/UiToast/UiToast.scss +7 -0
- package/src/@ui/UiToolbarSelect/UiToolbarSelect.scss +5 -0
- package/styles/css/avenirFontPatch.css +111 -0
- package/styles/css/avenirFontPatch.css.map +1 -0
- package/styles/css/main.css +215 -6
- package/styles/css/main.css.map +1 -1
- package/styles/css/richText.css +2 -1
- package/styles/css/richText.css.map +1 -1
- package/styles/scss/avenirFontPatch.scss +63 -0
- package/styles/scss/main.scss +2 -1
- package/styles/scss/richText.scss +2 -1
- package/esm/@ui/UiConfigEditor/configEditorWarnings.d.ts +0 -10
- package/esm/@ui/UiConfigEditor/configEditorWarnings.d.ts.map +0 -1
- package/esm/@ui/UiConfigEditor/configEditorWarnings.js +0 -42
|
@@ -1,27 +1,39 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { Children, Fragment, isValidElement, useId, useState } from "react";
|
|
3
|
+
import { Children, Fragment, isValidElement, useId, useRef, useState } from "react";
|
|
4
|
+
import { useMediaQuery } from "../../responsive/useMediaQuery.js";
|
|
4
5
|
import { accessibilityConfigToAttributes } from "../../typings/utilities.js";
|
|
5
6
|
import { matchesSearchQuery } from "../@utils/matchesSearchQuery.js";
|
|
6
7
|
import { UiDropdown } from "../UiDropdown/UiDropdown.js";
|
|
7
8
|
import { UiIcon } from "../UiIcon/UiIcon.js";
|
|
9
|
+
import { getUiListboxItemFullTitle } from "../UiListbox/itemTitle.js";
|
|
8
10
|
import { getNextFocusableItemId } from "../UiListbox/UiListbox.js";
|
|
11
|
+
import { UiDialogHeader } from "../UiModalDialog/UiDialogHeader.js";
|
|
12
|
+
import { UiModalDialog } from "../UiModalDialog/UiModalDialog.js";
|
|
9
13
|
import { e } from "./searchableSelectBem.js";
|
|
10
14
|
import { UiSearchableSelectContext } from "./UiSearchableSelectContext.js";
|
|
11
15
|
import { UiSearchableSelectDivider } from "./UiSearchableSelectDivider.js";
|
|
16
|
+
import { hasUiSearchableSelectFooter } from "./UiSearchableSelectFooter.js";
|
|
12
17
|
import { getUiSearchableSelectItemDescriptor } from "./UiSearchableSelectItem.js";
|
|
13
18
|
import { findUiSearchableSelectListRenderItem } from "./UiSearchableSelectList.js";
|
|
14
19
|
/**
|
|
15
20
|
* @internal
|
|
16
21
|
*/
|
|
17
|
-
export function UiSearchableSelect({ accessibilityConfig, children, items, filter, placeholder, defaultOpen = false, value, onChange, }) {
|
|
22
|
+
export function UiSearchableSelect({ accessibilityConfig, children, items, filter, placeholder, title, defaultOpen = false, isOpen, onOpenChange, renderButton: renderButtonProp, shouldCloseOnSelect = true, value, onChange, }) {
|
|
23
|
+
const isFullscreen = useMediaQuery("mobileDevice");
|
|
24
|
+
const [isOpenState, setIsOpenState] = useState(defaultOpen);
|
|
25
|
+
const isOpenResolved = isOpen ?? isOpenState;
|
|
26
|
+
const setIsOpen = (nextIsOpen) => {
|
|
27
|
+
setIsOpenState(nextIsOpen);
|
|
28
|
+
onOpenChange?.(nextIsOpen);
|
|
29
|
+
};
|
|
30
|
+
const dialogId = useId();
|
|
31
|
+
const searchInputRef = useRef(null);
|
|
18
32
|
const buttonId = useId();
|
|
19
|
-
// the button's name is its value followed by its label ("Item 12 Language"), like in React Aria's Select
|
|
20
33
|
const valueId = useId();
|
|
21
|
-
// shared, so that the search can point at the highlighted option (aria-activedescendant)
|
|
22
34
|
const listboxId = useId();
|
|
35
|
+
const footerId = useId();
|
|
23
36
|
const [query, setQuery] = useState("");
|
|
24
|
-
// built here, where the items are typed, also to show the selected item while the list is not rendered
|
|
25
37
|
const renderItem = findUiSearchableSelectListRenderItem(children);
|
|
26
38
|
// one group per item: the item and the dividers rendered with it
|
|
27
39
|
const listboxItemGroups = items.map((item) => renderItem ? getListboxItems(renderItem(item), item) : []);
|
|
@@ -36,13 +48,8 @@ export function UiSearchableSelect({ accessibilityConfig, children, items, filte
|
|
|
36
48
|
: matchesSearchQuery(item.stringTitle, searchQuery))))
|
|
37
49
|
.flat();
|
|
38
50
|
const filteredListboxItems = filterListboxItems(query);
|
|
39
|
-
// the highlight the search moves and the list shows; each opening starts on the selected item
|
|
40
51
|
const [focusedItemId, setFocusedItemId] = useState(value);
|
|
41
|
-
// the highlight shows right away, but the search points at it only after the first arrow key or hover, so
|
|
42
|
-
// that screen readers announce the search on open (see the tests)
|
|
43
52
|
const [isActiveDescendantShown, setIsActiveDescendantShown] = useState(false);
|
|
44
|
-
// while searching, the highlight moves to the first match, like in React Aria; without a query, it goes
|
|
45
|
-
// back to the selected item
|
|
46
53
|
const changeQuery = (nextQuery) => {
|
|
47
54
|
setQuery(nextQuery);
|
|
48
55
|
setFocusedItemId(nextQuery
|
|
@@ -53,35 +60,70 @@ export function UiSearchableSelect({ accessibilityConfig, children, items, filte
|
|
|
53
60
|
})
|
|
54
61
|
: value);
|
|
55
62
|
};
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// a new opening starts with all items, like TimezoneSelect
|
|
61
|
-
onOpen: () => {
|
|
63
|
+
const [wasOpen, setWasOpen] = useState(isOpenResolved);
|
|
64
|
+
if (wasOpen !== isOpenResolved) {
|
|
65
|
+
setWasOpen(isOpenResolved);
|
|
66
|
+
if (isOpenResolved) {
|
|
62
67
|
setFocusedItemId(value);
|
|
63
68
|
setIsActiveDescendantShown(false);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
setQuery("");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
const renderButton = ({ isOpen, onClick, ariaAttributes, ref, }) => (_jsxs("button", { className: e("button"),
|
|
75
|
+
// UiDropdown types its ref as RefObject<HTMLElement>, which a <button> doesn't accept;
|
|
76
|
+
// a callback ref assigns the mounted button to it without a cast
|
|
77
|
+
ref: (button) => {
|
|
78
|
+
if (button && ref) {
|
|
79
|
+
ref.current = button;
|
|
80
|
+
}
|
|
81
|
+
}, type: "button", onClick: onClick, ...ariaAttributes, ...accessibilityConfigToAttributes(accessibilityConfig), id: buttonId, "aria-labelledby": `${valueId} ${accessibilityConfig.ariaLabelledBy ?? buttonId}`, children: [_jsx("span", { id: valueId, className: e("button-title"), children: selectedItem ? getUiListboxItemFullTitle(selectedItem) : placeholder }), _jsx("div", { className: e("button-icon"), children: _jsx(UiIcon, { type: isOpen ? "navigateUp" : "navigateDown", size: 14, disableAnimation: true }) })] }));
|
|
82
|
+
const renderBody = (closeDropdown, bodyAttributes) => (_jsx(UiSearchableSelectContext.Provider, { value: {
|
|
83
|
+
listboxItems: filteredListboxItems,
|
|
84
|
+
query,
|
|
85
|
+
setQuery: changeQuery,
|
|
86
|
+
listboxLabelledBy: accessibilityConfig.ariaLabelledBy ??
|
|
87
|
+
(isFullscreen && renderButtonProp === null ? undefined : buttonId),
|
|
88
|
+
listboxLabel: accessibilityConfig.ariaLabel,
|
|
89
|
+
listboxId,
|
|
90
|
+
focusedItemId,
|
|
91
|
+
setFocusedItemId,
|
|
92
|
+
isActiveDescendantShown,
|
|
93
|
+
setIsActiveDescendantShown,
|
|
94
|
+
value,
|
|
95
|
+
onChange,
|
|
96
|
+
closeDropdown,
|
|
97
|
+
shouldCloseOnSelect,
|
|
98
|
+
searchInputRef,
|
|
99
|
+
isFullscreen,
|
|
100
|
+
footerId: hasUiSearchableSelectFooter(children) ? footerId : undefined,
|
|
101
|
+
}, children: _jsx("div", { className: e("body", { isFullscreen }), ...bodyAttributes, children: children }) }));
|
|
102
|
+
if (isFullscreen) {
|
|
103
|
+
const closeFullscreen = () => setIsOpen(false);
|
|
104
|
+
return (_jsxs(_Fragment, { children: [renderButtonProp === null
|
|
105
|
+
? null
|
|
106
|
+
: renderButton({
|
|
107
|
+
isOpen: isOpenResolved,
|
|
108
|
+
onClick: () => setIsOpen(true),
|
|
109
|
+
ariaAttributes: {
|
|
110
|
+
role: "button",
|
|
111
|
+
"aria-haspopup": "dialog",
|
|
112
|
+
"aria-expanded": isOpenResolved,
|
|
113
|
+
// The dialog is rendered only while open, so the button points at it only then
|
|
114
|
+
"aria-controls": isOpenResolved ? dialogId : undefined,
|
|
115
|
+
},
|
|
116
|
+
}), _jsxs(UiModalDialog, { id: dialogId, isFullscreen: true, isOpen: isOpenResolved, onClose: closeFullscreen, initialFocus: searchInputRef, children: [_jsx(UiDialogHeader, { title: title, onClose: closeFullscreen }), renderBody(closeFullscreen)] })] }));
|
|
117
|
+
}
|
|
118
|
+
return (_jsx(UiDropdown, { width: "same-as-anchor", fullWidthButton: true, autofocusOnOpen: true, enableFocusTrap: false, returnFocusTo: buttonId, isOpen: isOpenResolved, onOpenChange: setIsOpen, accessibilityConfig: { popupRole: "listbox" }, renderButton: ({ ref, isOpen, toggleDropdown, ariaAttributes }) => renderButton({
|
|
119
|
+
isOpen,
|
|
120
|
+
onClick: toggleDropdown,
|
|
121
|
+
ref,
|
|
122
|
+
ariaAttributes: {
|
|
123
|
+
...ariaAttributes,
|
|
124
|
+
"aria-controls": isOpen ? listboxId : undefined,
|
|
125
|
+
},
|
|
126
|
+
}), renderBody: ({ ariaAttributes, closeDropdown }) => renderBody(closeDropdown, ariaAttributes) }));
|
|
85
127
|
}
|
|
86
128
|
/**
|
|
87
129
|
* Reads what the item render function returned: an item alone, or an item in a fragment with dividers
|
|
@@ -1,11 +1,16 @@
|
|
|
1
|
+
import { type RefObject } from "react";
|
|
1
2
|
import { type IUiListboxItem } from "../UiListbox/types.js";
|
|
2
3
|
interface IUiSearchableSelectContext {
|
|
3
4
|
/** The items matching the search query, with the dividers rendered with them. */
|
|
4
5
|
listboxItems: IUiListboxItem<unknown>[];
|
|
5
6
|
query: string;
|
|
6
7
|
setQuery: (query: string) => void;
|
|
7
|
-
/**
|
|
8
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Names the listbox: the select's ariaLabelledBy, or the trigger button (named by its ariaLabel), or the
|
|
10
|
+
* ariaLabel itself when there's no button.
|
|
11
|
+
*/
|
|
12
|
+
listboxLabelledBy?: string;
|
|
13
|
+
listboxLabel?: string;
|
|
9
14
|
/** The id of the listbox, which the search points into with aria-activedescendant. */
|
|
10
15
|
listboxId: string;
|
|
11
16
|
/** The highlighted option: the search moves it, the list shows it. */
|
|
@@ -17,6 +22,13 @@ interface IUiSearchableSelectContext {
|
|
|
17
22
|
value: string | null;
|
|
18
23
|
onChange: (value: string) => void;
|
|
19
24
|
closeDropdown: () => void;
|
|
25
|
+
shouldCloseOnSelect: boolean;
|
|
26
|
+
/** The search's input, which the full-screen dialog (on mobile) focuses when it opens. */
|
|
27
|
+
searchInputRef: RefObject<HTMLInputElement | null>;
|
|
28
|
+
/** Whether the select is shown full screen (on mobile), where the list fills the screen. */
|
|
29
|
+
isFullscreen: boolean;
|
|
30
|
+
/** The id of the footer, set only when the select has one, so the search can be described by it. */
|
|
31
|
+
footerId?: string;
|
|
20
32
|
}
|
|
21
33
|
export declare const UiSearchableSelectContext: import("react").Context<IUiSearchableSelectContext | null>;
|
|
22
34
|
export declare function useUiSearchableSelectContext(): IUiSearchableSelectContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiSearchableSelectContext.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectContext.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UiSearchableSelectContext.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAA6B,MAAM,OAAO,CAAC;AAElE,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAE5D,UAAU,0BAA0B;IAChC,iFAAiF;IACjF,YAAY,EAAE,cAAc,CAAC,OAAO,CAAC,EAAE,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,sFAAsF;IACtF,SAAS,EAAE,MAAM,CAAC;IAClB,sEAAsE;IACtE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,gBAAgB,EAAE,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IACzD,mFAAmF;IACnF,uBAAuB,EAAE,OAAO,CAAC;IACjC,0BAA0B,EAAE,CAAC,uBAAuB,EAAE,OAAO,KAAK,IAAI,CAAC;IACvE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,0FAA0F;IAC1F,cAAc,EAAE,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAC;IACnD,4FAA4F;IAC5F,YAAY,EAAE,OAAO,CAAC;IACtB,oGAAoG;IACpG,QAAQ,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,eAAO,MAAM,yBAAyB,4DAAyD,CAAC;AAEhG,wBAAgB,4BAA4B,IAAI,0BAA0B,CAMzE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* @internal
|
|
4
|
+
*/
|
|
5
|
+
export interface IUiSearchableSelectFooterProps {
|
|
6
|
+
children: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* @internal
|
|
10
|
+
*/
|
|
11
|
+
export declare function UiSearchableSelectFooter({ children }: IUiSearchableSelectFooterProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare function hasUiSearchableSelectFooter(children: ReactNode): boolean;
|
|
13
|
+
//# sourceMappingURL=UiSearchableSelectFooter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UiSearchableSelectFooter.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectFooter.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAsB,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAK3E;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EAAE,QAAQ,EAAE,EAAE,8BAA8B,2CAQpF;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,SAAS,GAAG,OAAO,CAOxE"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
// (C) 2026 GoodData Corporation
|
|
3
|
+
import { Children, Fragment, isValidElement } from "react";
|
|
4
|
+
import { e } from "./searchableSelectBem.js";
|
|
5
|
+
import { useUiSearchableSelectContext } from "./UiSearchableSelectContext.js";
|
|
6
|
+
/**
|
|
7
|
+
* @internal
|
|
8
|
+
*/
|
|
9
|
+
export function UiSearchableSelectFooter({ children }) {
|
|
10
|
+
const { footerId } = useUiSearchableSelectContext();
|
|
11
|
+
return (_jsx("div", { id: footerId, className: e("footer"), children: children }));
|
|
12
|
+
}
|
|
13
|
+
export function hasUiSearchableSelectFooter(children) {
|
|
14
|
+
return Children.toArray(children).some((child) => isValidElement(child) &&
|
|
15
|
+
(child.type === UiSearchableSelectFooter ||
|
|
16
|
+
(child.type === Fragment && hasUiSearchableSelectFooter(child.props.children))));
|
|
17
|
+
}
|
|
@@ -9,6 +9,11 @@ export interface IUiSearchableSelectItemProps {
|
|
|
9
9
|
* option's `lang` attribute, like on a native `<option>`.
|
|
10
10
|
*/
|
|
11
11
|
lang?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Text shown muted after the title in the list, and after it on the button, e.g. the code of a language.
|
|
14
|
+
* It is not matched by the default search, so use the select's `filter` to match it.
|
|
15
|
+
*/
|
|
16
|
+
secondaryTitle?: string;
|
|
12
17
|
/**
|
|
13
18
|
* The option's title, shown in the list and the button and matched by the search.
|
|
14
19
|
*/
|
|
@@ -24,6 +29,7 @@ export declare function UiSearchableSelectItem(_props: IUiSearchableSelectItemPr
|
|
|
24
29
|
export declare function getUiSearchableSelectItemDescriptor(node: ReactNode): {
|
|
25
30
|
id: string;
|
|
26
31
|
stringTitle: string;
|
|
32
|
+
secondaryTitle?: string;
|
|
27
33
|
lang?: string;
|
|
28
34
|
} | undefined;
|
|
29
35
|
//# sourceMappingURL=UiSearchableSelectItem.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiSearchableSelectItem.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,4BAA4B,QAE1E;AAED,wBAAgB,mCAAmC,CAC/C,IAAI,EAAE,SAAS,GAChB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,
|
|
1
|
+
{"version":3,"file":"UiSearchableSelectItem.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectItem.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAEvD;;GAEG;AACH,MAAM,WAAW,4BAA4B;IACzC,EAAE,EAAE,MAAM,CAAC;IACX;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CACpB;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,4BAA4B,QAE1E;AAED,wBAAgB,mCAAmC,CAC/C,IAAI,EAAE,SAAS,GAChB;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,GAAG,SAAS,CAOzF"}
|
|
@@ -13,6 +13,6 @@ export function getUiSearchableSelectItemDescriptor(node) {
|
|
|
13
13
|
if (!isValidElement(node) || node.type !== UiSearchableSelectItem) {
|
|
14
14
|
return undefined;
|
|
15
15
|
}
|
|
16
|
-
const { id, lang, children } = node.props;
|
|
17
|
-
return { id, lang, stringTitle: children };
|
|
16
|
+
const { id, lang, secondaryTitle, children } = node.props;
|
|
17
|
+
return { id, lang, secondaryTitle, stringTitle: children };
|
|
18
18
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiSearchableSelectList.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"UiSearchableSelectList.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectList.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,SAAS,EAAkB,MAAM,OAAO,CAAC;AAkBjE;;GAEG;AACH,MAAM,WAAW,4BAA4B,CAAC,CAAC;IAC3C,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,EAAE,EAAE,WAAW,EAAE,EAAE,4BAA4B,CAAC,CAAC,CAAC,2CA6DzF;AAED;;;GAGG;AACH,wBAAgB,oCAAoC,CAChD,QAAQ,EAAE,SAAS,GACpB,CAAC,CAAC,IAAI,EAAE,OAAO,KAAK,SAAS,CAAC,GAAG,SAAS,CAgB5C"}
|
|
@@ -2,6 +2,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
3
|
import { Fragment, isValidElement } from "react";
|
|
4
4
|
import { defineMessages, useIntl } from "react-intl";
|
|
5
|
+
import { getUiListboxItemFullTitle } from "../UiListbox/itemTitle.js";
|
|
5
6
|
import { UiListbox } from "../UiListbox/UiListbox.js";
|
|
6
7
|
import { UiSearchResultsAnnouncement } from "../UiSearchResultsAnnouncement/UiSearchResultsAnnouncement.js";
|
|
7
8
|
import { e } from "./searchableSelectBem.js";
|
|
@@ -16,28 +17,22 @@ const LIST_MAX_HEIGHT = 280;
|
|
|
16
17
|
*/
|
|
17
18
|
export function UiSearchableSelectList({ noItemsText }) {
|
|
18
19
|
const intl = useIntl();
|
|
19
|
-
const { listboxItems, query,
|
|
20
|
+
const { listboxItems, query, listboxLabelledBy, listboxLabel, listboxId, focusedItemId, setFocusedItemId, setIsActiveDescendantShown, value, onChange, closeDropdown, shouldCloseOnSelect, isFullscreen, } = useUiSearchableSelectContext();
|
|
20
21
|
const noItemsMessage = noItemsText ?? intl.formatMessage(messages.noItems);
|
|
21
22
|
// the results of the search, without the dividers
|
|
22
23
|
const options = listboxItems.filter((item) => item.type === "interactive");
|
|
23
|
-
return (_jsxs(_Fragment, { children: [_jsx(UiSearchResultsAnnouncement, { totalResults: query ? options.length : undefined, resultValues: options.map(
|
|
24
|
-
// like a native <select>, picking the already selected item only closes the list
|
|
24
|
+
return (_jsxs(_Fragment, { children: [_jsx(UiSearchResultsAnnouncement, { totalResults: query ? options.length : undefined, resultValues: options.map(getUiListboxItemFullTitle), noResultsText: noItemsMessage }), _jsx(UiListbox, { items: listboxItems, selectedItemId: value ?? undefined, onSelect: (item) => {
|
|
25
25
|
if (item.id !== value) {
|
|
26
26
|
onChange(item.id);
|
|
27
27
|
}
|
|
28
|
-
},
|
|
29
|
-
// UiListbox closes after a selection (shouldCloseOnSelect defaults to true) through onClose
|
|
30
|
-
onClose: closeDropdown,
|
|
31
|
-
// selects on clicks on the option element itself too (tests, assistive technologies)
|
|
32
|
-
shouldSelectOnOptionClick: true,
|
|
33
|
-
// the highlight is moved by the search, which keeps focus (virtual focus)
|
|
34
|
-
focusedItemId: focusedItemId,
|
|
35
|
-
// hovering moves the same highlight, so keyboard and mouse don't highlight two rows, and like
|
|
36
|
-
// an arrow key, it lets the search point at it
|
|
37
|
-
onFocusedItemIdChange: (itemId) => {
|
|
28
|
+
}, onClose: closeDropdown, shouldCloseOnSelect: shouldCloseOnSelect, shouldSelectOnOptionClick: true, focusedItemId: focusedItemId, onFocusedItemIdChange: (itemId) => {
|
|
38
29
|
setFocusedItemId(itemId);
|
|
39
30
|
setIsActiveDescendantShown(true);
|
|
40
|
-
}, isCompact:
|
|
31
|
+
}, isCompact: !isFullscreen, padding: "none", maxHeight: isFullscreen ? undefined : LIST_MAX_HEIGHT, ariaAttributes: {
|
|
32
|
+
id: listboxId,
|
|
33
|
+
"aria-labelledby": listboxLabelledBy,
|
|
34
|
+
"aria-label": listboxLabel,
|
|
35
|
+
}, supportedViews: ["desktop"] }), listboxItems.length ? null : _jsx("div", { className: e("no-items"), children: noItemsMessage })] }));
|
|
41
36
|
}
|
|
42
37
|
/**
|
|
43
38
|
* Finds the item render function of the UiSearchableSelectList among the select's children. The root needs it
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiSearchableSelectSearch.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectSearch.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAa/E;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,mBAAwB,EACxB,WAAW,GACd,EAAE,8BAA8B,
|
|
1
|
+
{"version":3,"file":"UiSearchableSelectSearch.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiSearchableSelect/UiSearchableSelectSearch.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAa/E;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC3C,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,EACrC,mBAAwB,EACxB,WAAW,GACd,EAAE,8BAA8B,2CAgGhC"}
|
|
@@ -15,14 +15,13 @@ const messages = defineMessages({
|
|
|
15
15
|
*/
|
|
16
16
|
export function UiSearchableSelectSearch({ accessibilityConfig = {}, placeholder, }) {
|
|
17
17
|
const intl = useIntl();
|
|
18
|
-
const { query, setQuery, listboxItems, listboxId, focusedItemId, setFocusedItemId, isActiveDescendantShown, setIsActiveDescendantShown, value, onChange, closeDropdown, } = useUiSearchableSelectContext();
|
|
18
|
+
const { query, setQuery, listboxItems, listboxId, focusedItemId, setFocusedItemId, isActiveDescendantShown, setIsActiveDescendantShown, value, onChange, closeDropdown, shouldCloseOnSelect, searchInputRef, isFullscreen, footerId, } = useUiSearchableSelectContext();
|
|
19
19
|
// while typing, the search points at the highlight only a moment after the last key, like in React Aria,
|
|
20
20
|
// so that screen readers read the typed letter first
|
|
21
21
|
const showActiveDescendantLater = useDebounce(() => setIsActiveDescendantShown(true), 300);
|
|
22
22
|
const changeQuery = (nextQuery) => {
|
|
23
23
|
setQuery(nextQuery);
|
|
24
24
|
setIsActiveDescendantShown(false);
|
|
25
|
-
// without a query, it's like a fresh opening again: the search points at nothing until an arrow key
|
|
26
25
|
if (nextQuery) {
|
|
27
26
|
showActiveDescendantLater();
|
|
28
27
|
}
|
|
@@ -30,34 +29,30 @@ export function UiSearchableSelectSearch({ accessibilityConfig = {}, placeholder
|
|
|
30
29
|
showActiveDescendantLater.cancel();
|
|
31
30
|
}
|
|
32
31
|
};
|
|
33
|
-
// focus stays in the search, which moves the highlight that the list shows (virtual focus)
|
|
34
32
|
const activeItem = listboxItems.find((item) => item.type === "interactive" && item.id === focusedItemId);
|
|
35
|
-
return (_jsx("div", { className: e("search"), children: _jsx(UiTextInput, { value: query, onChange: changeQuery, onKeyDown: (event) => {
|
|
33
|
+
return (_jsx("div", { className: e("search"), children: _jsx(UiTextInput, { value: query, onChange: changeQuery, inputRef: searchInputRef, onKeyDown: (event) => {
|
|
36
34
|
// while an input method composes text (e.g. Japanese), the keys are its own; Safari reports
|
|
37
35
|
// the key that ends the composition after it, with only the keyCode 229 left
|
|
38
36
|
if (event.nativeEvent.isComposing || event.keyCode === 229) {
|
|
39
37
|
return;
|
|
40
38
|
}
|
|
41
39
|
if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
42
|
-
// keeps the caret where it is
|
|
43
40
|
event.preventDefault();
|
|
44
41
|
const direction = event.key === "ArrowDown" ? "down" : "up";
|
|
45
42
|
setIsActiveDescendantShown(true);
|
|
46
43
|
setFocusedItemId(getNextFocusableItemId({ items: listboxItems, focusedItemId, direction }));
|
|
47
44
|
}
|
|
48
45
|
else if (event.key === "Enter" && activeItem) {
|
|
49
|
-
// like escape, the event ends here, so that e.g. a surrounding dialog doesn't submit
|
|
50
46
|
event.preventDefault();
|
|
51
47
|
event.stopPropagation();
|
|
52
|
-
// like a native <select>, picking the already selected item only closes the list
|
|
53
48
|
if (activeItem.id !== value) {
|
|
54
49
|
onChange(activeItem.id);
|
|
55
50
|
}
|
|
56
|
-
|
|
51
|
+
if (shouldCloseOnSelect) {
|
|
52
|
+
closeDropdown();
|
|
53
|
+
}
|
|
57
54
|
}
|
|
58
55
|
else if (event.key === "Escape") {
|
|
59
|
-
// the first escape clears the query, the next one closes the list; the event ends here,
|
|
60
|
-
// so that e.g. a surrounding dialog doesn't close too
|
|
61
56
|
event.preventDefault();
|
|
62
57
|
event.stopPropagation();
|
|
63
58
|
if (query) {
|
|
@@ -67,10 +62,11 @@ export function UiSearchableSelectSearch({ accessibilityConfig = {}, placeholder
|
|
|
67
62
|
closeDropdown();
|
|
68
63
|
}
|
|
69
64
|
}
|
|
70
|
-
}, placeholder: placeholder ?? intl.formatMessage(messages.searchPlaceholder), iconBefore: "search", size: "small", accessibilityConfig: {
|
|
65
|
+
}, placeholder: placeholder ?? intl.formatMessage(messages.searchPlaceholder), iconBefore: "search", size: isFullscreen ? "medium" : "small", accessibilityConfig: {
|
|
71
66
|
ariaLabel: intl.formatMessage(messages.searchAriaLabel),
|
|
72
67
|
...accessibilityConfig,
|
|
73
|
-
|
|
68
|
+
ariaDescribedBy: [accessibilityConfig.ariaDescribedBy, footerId].filter(Boolean).join(" ") ||
|
|
69
|
+
undefined,
|
|
74
70
|
role: "combobox",
|
|
75
71
|
ariaExpanded: true,
|
|
76
72
|
ariaControls: listboxId,
|
|
@@ -11,9 +11,13 @@ export interface IUiToolbarIconButtonProps extends IUiToolbarItemBaseProps {
|
|
|
11
11
|
*/
|
|
12
12
|
icon: IconType | ReactNode;
|
|
13
13
|
/**
|
|
14
|
-
* Accessible name. It is also the tooltip text.
|
|
14
|
+
* Accessible name. It is also the tooltip text, unless `tooltip` says otherwise.
|
|
15
15
|
*/
|
|
16
16
|
label: string;
|
|
17
|
+
/**
|
|
18
|
+
* Shown on hover and focus in place of the label, for example why the button is disabled.
|
|
19
|
+
*/
|
|
20
|
+
tooltip?: ReactNode;
|
|
17
21
|
/**
|
|
18
22
|
* "medium" is 28x28 with a 20px icon. "small" is 14x14 with a 14px icon and is meant for the
|
|
19
23
|
* side controls of {@link UiToolbarStepper}.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiToolbarIconButton.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiToolbarIconButton/UiToolbarIconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAKnD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAShF;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,uBAAuB;IACtE;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAID;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,
|
|
1
|
+
{"version":3,"file":"UiToolbarIconButton.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiToolbarIconButton/UiToolbarIconButton.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAKnD,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAGpE,OAAO,EAAE,KAAK,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAShF;;GAEG;AACH,MAAM,WAAW,yBAA0B,SAAQ,uBAAuB;IACtE;;OAEG;IACH,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;IAC9B;;OAEG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACzB;AAID;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,yHA+D/B,CAAC"}
|
|
@@ -17,7 +17,7 @@ const { b } = bem("gd-ui-kit-toolbar-icon-button");
|
|
|
17
17
|
*
|
|
18
18
|
* @internal
|
|
19
19
|
*/
|
|
20
|
-
export const UiToolbarIconButton = forwardRef(function UiToolbarIconButton({ icon, label, size = "medium", value, isSelected, isDestructive = false, isDisabled, isActive = false, hideTooltip = false, onClick, onKeyDown, id, dataId, dataTestId, accessibilityConfig, ariaAttributes, }, ref) {
|
|
20
|
+
export const UiToolbarIconButton = forwardRef(function UiToolbarIconButton({ icon, label, size = "medium", value, isSelected, isDestructive = false, isDisabled, isActive = false, hideTooltip = false, tooltip, onClick, onKeyDown, id, dataId, dataTestId, accessibilityConfig, ariaAttributes, }, ref) {
|
|
21
21
|
const { isChecked, buttonProps } = useToolbarItemRole({
|
|
22
22
|
value,
|
|
23
23
|
isSelected,
|
|
@@ -30,5 +30,5 @@ export const UiToolbarIconButton = forwardRef(function UiToolbarIconButton({ ico
|
|
|
30
30
|
if (hideTooltip) {
|
|
31
31
|
return button;
|
|
32
32
|
}
|
|
33
|
-
return (_jsx(UiToolbarItemTooltip, { content: label, isDisabled: isActive, children: button }));
|
|
33
|
+
return (_jsx(UiToolbarItemTooltip, { content: tooltip ?? label, isDisabled: isActive, children: button }));
|
|
34
34
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type KeyboardEvent, type MouseEvent, type ReactNode } from "react";
|
|
2
2
|
import { type IAccessibilityConfigBase } from "../../typings/accessibility.js";
|
|
3
|
+
import { type IconType } from "../@types/icon.js";
|
|
3
4
|
import { type IUiDropdownButtonRenderProps } from "../UiDropdown/types.js";
|
|
4
5
|
/**
|
|
5
6
|
* @internal
|
|
@@ -9,12 +10,20 @@ export interface IUiToolbarSelectProps {
|
|
|
9
10
|
* The current selection, or the prompt when `isPlaceholder` is set.
|
|
10
11
|
*/
|
|
11
12
|
label: string;
|
|
13
|
+
/**
|
|
14
|
+
* Drawn before the label, for example what kind of thing the selection is.
|
|
15
|
+
*/
|
|
16
|
+
icon?: IconType;
|
|
12
17
|
/**
|
|
13
18
|
* "fixed" is 240px wide and truncates the label so the toolbar does not move as the selection
|
|
14
19
|
* changes.
|
|
15
20
|
* @defaultValue "hug"
|
|
16
21
|
*/
|
|
17
22
|
width?: "hug" | "fixed";
|
|
23
|
+
/**
|
|
24
|
+
* Caps the width in pixels; a longer label is truncated and its full text is the title.
|
|
25
|
+
*/
|
|
26
|
+
maxWidth?: number;
|
|
18
27
|
/**
|
|
19
28
|
* Nothing is chosen yet; the label reads as prompt text.
|
|
20
29
|
* @defaultValue false
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UiToolbarSelect.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiToolbarSelect/UiToolbarSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAIxF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;
|
|
1
|
+
{"version":3,"file":"UiToolbarSelect.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiToolbarSelect/UiToolbarSelect.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,KAAK,SAAS,EAAc,MAAM,OAAO,CAAC;AAIxF,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAE/E,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAElD,OAAO,EAAE,KAAK,4BAA4B,EAAE,MAAM,wBAAwB,CAAC;AAM3E;;GAEG;AACH,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;IACxB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;;OAGG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,UAAU,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IACzD,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,aAAa,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAC;IAC9D,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,mBAAmB,CAAC,EAAE,wBAAwB,CAAC;IAC/C;;;OAGG;IACH,cAAc,CAAC,EAAE,4BAA4B,CAAC,gBAAgB,CAAC,CAAC;CACnE;AAID;;;;GAIG;AACH,eAAO,MAAM,eAAe,qHA2D1B,CAAC"}
|
|
@@ -4,6 +4,7 @@ import { forwardRef } from "react";
|
|
|
4
4
|
import { simplifyText } from "@gooddata/util";
|
|
5
5
|
import { accessibilityConfigToAttributes } from "../../typings/utilities.js";
|
|
6
6
|
import { bem } from "../@utils/bem.js";
|
|
7
|
+
import { UiIcon } from "../UiIcon/UiIcon.js";
|
|
7
8
|
import { UiToolbarChevron } from "../UiToolbar/UiToolbarChevron.js";
|
|
8
9
|
import { UiToolbarItemTooltip } from "../UiToolbar/UiToolbarItemTooltip.js";
|
|
9
10
|
import { useToolbarItemRole } from "../UiToolbarButton/useToolbarItemRole.js";
|
|
@@ -13,10 +14,11 @@ const { b, e } = bem("gd-ui-kit-toolbar-select");
|
|
|
13
14
|
*
|
|
14
15
|
* @internal
|
|
15
16
|
*/
|
|
16
|
-
export const UiToolbarSelect = forwardRef(function UiToolbarSelect({ label, width = "hug", isPlaceholder = false, isOpen = false, isDisabled, tooltip, onClick, onKeyDown, id, dataId, dataTestId, accessibilityConfig, ariaAttributes, }, ref) {
|
|
17
|
+
export const UiToolbarSelect = forwardRef(function UiToolbarSelect({ label, icon, width = "hug", maxWidth, isPlaceholder = false, isOpen = false, isDisabled, tooltip, onClick, onKeyDown, id, dataId, dataTestId, accessibilityConfig, ariaAttributes, }, ref) {
|
|
17
18
|
const { buttonProps } = useToolbarItemRole({ isDisabled, onClick, onKeyDown });
|
|
18
19
|
const testId = dataTestId ?? simplifyText(label);
|
|
19
|
-
const
|
|
20
|
+
const isTruncatable = width === "fixed" || maxWidth !== undefined;
|
|
21
|
+
const button = (_jsxs("button", { ref: ref, id: id, type: "button", className: b({ width, isPlaceholder, isActive: isOpen }), style: maxWidth === undefined ? undefined : { maxWidth }, ...accessibilityConfigToAttributes(accessibilityConfig), title: isTruncatable && tooltip === undefined ? label : undefined, "data-id": dataId, "data-testid": testId, "aria-haspopup": accessibilityConfig?.ariaHaspopup ?? "listbox", "aria-expanded": accessibilityConfig?.ariaExpanded ?? isOpen, ...buttonProps, ...ariaAttributes, children: [icon === undefined ? null : (_jsx("span", { className: e("icon"), "data-testid": `icon-${icon}`, children: _jsx(UiIcon, { type: icon, size: 20, layout: "block" }) })), _jsx("span", { className: e("label"), children: label }), _jsx(UiToolbarChevron, { isOpen: isOpen })] }));
|
|
20
22
|
if (tooltip === undefined) {
|
|
21
23
|
return button;
|
|
22
24
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../src/Bubble/Bubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Bubble.d.ts","sourceRoot":"","sources":["../../src/Bubble/Bubble.tsx"],"names":[],"mappings":"AAEA,OAAO,EACH,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,SAAS,EAKjB,MAAM,OAAO,CAAC;AASf,OAAO,EAAE,KAAK,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAE7D,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAgBvE,eAAO,MAAM,OAAO,IAAI,CAAC;AACzB,eAAO,MAAM,OAAO,KAAK,CAAC;AAwB1B;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACvC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,WAAW,CAAC,EAAE,WAAW,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;OAGG;IACH,cAAc,CAAC,EAAE,GAAG,EAAE,CAAC;IACvB,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,mBAAmB,CAAC,EAAE,0BAA0B,CAAC;CACpD;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IACzB,WAAW,EAAE,WAAW,EAAE,CAAC;IAC3B,kBAAkB,EAAE,MAAM,CAAC;CAC9B;AAsBD;;GAEG;AACH,eAAO,MAAM,MAAM,EAAE,oBAAoB,CAAC,YAAY,CA8JrD,CAAC"}
|
package/esm/Bubble/Bubble.js
CHANGED
|
@@ -2,8 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
// (C) 2020-2026 GoodData Corporation
|
|
3
3
|
import { memo, useCallback, useMemo, useState, } from "react";
|
|
4
4
|
import cx from "classnames";
|
|
5
|
-
import {
|
|
5
|
+
import { result } from "lodash-es";
|
|
6
6
|
import isReactEqual from "react-fast-compare";
|
|
7
|
+
import { _cloneDeep } from "@gooddata/util";
|
|
7
8
|
import { ZoomAwareOverlay } from "../Overlay/ZoomAwareOverlay.js";
|
|
8
9
|
const ARROW_DIRECTIONS = {
|
|
9
10
|
".. cc": "none",
|
|
@@ -84,7 +85,7 @@ export const Bubble = memo(function Bubble(props) {
|
|
|
84
85
|
};
|
|
85
86
|
});
|
|
86
87
|
}, [arrowOffsets]);
|
|
87
|
-
const initialAlignPoints = useMemo(() => addOffsetToAlignPoints(
|
|
88
|
+
const initialAlignPoints = useMemo(() => addOffsetToAlignPoints(_cloneDeep(alignPointsProp)), [addOffsetToAlignPoints, alignPointsProp]);
|
|
88
89
|
const [alignPoints] = useState(initialAlignPoints);
|
|
89
90
|
const [optimalAlignPoints, setOptimalAlignPoints] = useState(alignPointsProp[0].align);
|
|
90
91
|
const onAlign = useCallback((alignment) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChartSorting.d.ts","sourceRoot":"","sources":["../../src/ChartSorting/ChartSorting.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ChartSorting.d.ts","sourceRoot":"","sources":["../../src/ChartSorting/ChartSorting.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAQrD,OAAO,EAAE,KAAK,oBAAoB,EAAE,KAAK,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAEpF;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B,WAAW,EAAE,SAAS,EAAE,CAAC;IACzB,cAAc,EAAE,oBAAoB,EAAE,CAAC;IACvC,WAAW,EAAE,sBAAsB,CAAC;IACpC,OAAO,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,UAAU,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB;AAwDD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,kBAAkB,2CAM3D"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2022-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useMemo, useState } from "react";
|
|
4
|
-
import { isEqual } from "lodash-es";
|
|
5
4
|
import { FormattedMessage, useIntl } from "react-intl";
|
|
6
5
|
import { IntlWrapper } from "@gooddata/sdk-ui";
|
|
6
|
+
import { _isEqual } from "@gooddata/util";
|
|
7
7
|
import { Button } from "../Button/Button.js";
|
|
8
8
|
import { ChartSortingDropdown } from "./ChartSortingDropdown.js";
|
|
9
9
|
import { ChartSortingDropdownBody } from "./ChartSortingDropdownBody.js";
|
|
@@ -16,7 +16,7 @@ function ChartSorting({ currentSort, availableSorts, bucketItems, buttonNode, on
|
|
|
16
16
|
const onSelect = (item) => {
|
|
17
17
|
setCurrentSort(item);
|
|
18
18
|
};
|
|
19
|
-
const isApplyEnabled = useMemo(() => !
|
|
19
|
+
const isApplyEnabled = useMemo(() => !_isEqual(currentSort, currentSelectedSort), [currentSort, currentSelectedSort]);
|
|
20
20
|
return (_jsxs(ChartSortingDropdownBody, { buttonNode: buttonNode, onClose: onCancel, children: [_jsx("div", { className: "gd-sort-charting-dropdown-header s-sort-charting-dropdown-header", children: _jsx(FormattedMessage, { id: "sorting.dropdown.header" }) }), _jsx("div", { className: "gd-sort-charting-body gd-sort-charting-dropdown", children: _jsx(ChartSortingDropdown, { currentSort: currentSelectedSort, availableSorts: availableSorts, bucketItems: bucketItems, intl: intl, onSelect: onSelect }) }), _jsxs("div", { className: "gd-chart-sorting-dropdown-footer", children: [_jsx(Button, { className: "gd-button-secondary gd-button-small s-sorting-dropdown-cancel", value: intl.formatMessage({ id: "cancel" }), onClick: onCancel }), _jsx(Button, { className: "gd-button-action gd-button-small s-sorting-dropdown-apply", value: intl.formatMessage({ id: "apply" }), onClick: handleApply, disabled: !isApplyEnabled })] })] }));
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../src/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ColorPicker.d.ts","sourceRoot":"","sources":["../../src/ColorPicker/ColorPicker.tsx"],"names":[],"mappings":"AAeA,OAAO,EAAE,KAAK,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAGtD;;GAEG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,iBAAiB,2CA4DnD"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2007-2026 GoodData Corporation
|
|
3
3
|
import { useCallback, useState } from "react";
|
|
4
|
-
import { isEqual } from "lodash-es";
|
|
5
4
|
import { useIntl } from "react-intl";
|
|
5
|
+
import { _isEqual } from "@gooddata/util";
|
|
6
6
|
import { Button } from "../Button/Button.js";
|
|
7
7
|
import { ColorPickerMatrix } from "./components/ColorPickerMatrix.js";
|
|
8
8
|
import { ColorsPreview } from "./components/ColorsPreview.js";
|
|
@@ -34,5 +34,5 @@ export function ColorPicker(props) {
|
|
|
34
34
|
props.onSubmit(getRgbFromHslColor(draftHslColor));
|
|
35
35
|
}, [props, draftHslColor]);
|
|
36
36
|
const currentHslColorForPreview = getHslFromRgbColor(props.initialRgbColor);
|
|
37
|
-
return (_jsxs("div", { className: "color-picker-container", "aria-label": "Color picker", children: [_jsx(ColorPickerMatrix, { initColor: draftHslColor, onColorSelected: onColorSelected }), _jsxs("div", { className: "color-picker-control-wrapper", children: [_jsx(HueColorPicker, { initColor: draftHslColor, onChange: onColorSelected }), _jsx(HexColorInput, { initColor: draftHslColor, onInputChanged: onHexInputColorSelected, placeholder: intl.formatMessage({ id: "gs.color-picker.inputPlaceholder" }), label: intl.formatMessage({ id: "gs.color-picker.hex" }) }, `${draftHslColor.h}-${draftHslColor.s}-${draftHslColor.l}`), _jsx(ColorsPreview, { currentHslColor: currentHslColorForPreview, draftHslColor: draftHslColor, currentTextLabel: intl.formatMessage({ id: "gs.color-picker.currentColor" }), draftTextLabel: intl.formatMessage({ id: "gs.color-picker.newColor" }) }), _jsxs("div", { className: "color-picker-buttons-wrapper", children: [_jsx(Button, { value: intl.formatMessage({ id: "gs.color-picker.cancelButton" }), className: "gd-button-secondary gd-button color-picker-button", onClick: props.onCancel }), _jsx(Button, { value: intl.formatMessage({ id: "gs.color-picker.okButton" }), disabled:
|
|
37
|
+
return (_jsxs("div", { className: "color-picker-container", "aria-label": "Color picker", children: [_jsx(ColorPickerMatrix, { initColor: draftHslColor, onColorSelected: onColorSelected }), _jsxs("div", { className: "color-picker-control-wrapper", children: [_jsx(HueColorPicker, { initColor: draftHslColor, onChange: onColorSelected }), _jsx(HexColorInput, { initColor: draftHslColor, onInputChanged: onHexInputColorSelected, placeholder: intl.formatMessage({ id: "gs.color-picker.inputPlaceholder" }), label: intl.formatMessage({ id: "gs.color-picker.hex" }) }, `${draftHslColor.h}-${draftHslColor.s}-${draftHslColor.l}`), _jsx(ColorsPreview, { currentHslColor: currentHslColorForPreview, draftHslColor: draftHslColor, currentTextLabel: intl.formatMessage({ id: "gs.color-picker.currentColor" }), draftTextLabel: intl.formatMessage({ id: "gs.color-picker.newColor" }) }), _jsxs("div", { className: "color-picker-buttons-wrapper", children: [_jsx(Button, { value: intl.formatMessage({ id: "gs.color-picker.cancelButton" }), className: "gd-button-secondary gd-button color-picker-button", onClick: props.onCancel }), _jsx(Button, { value: intl.formatMessage({ id: "gs.color-picker.okButton" }), disabled: _isEqual(props.initialRgbColor, getRgbFromHslColor(draftHslColor)), className: "gd-button-action gd-button color-picker-ok-button", onClick: handleSubmit })] })] })] }));
|
|
38
38
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateDatasets.d.ts","sourceRoot":"","sources":["../../src/DateDatasets/dateDatasets.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"dateDatasets.d.ts","sourceRoot":"","sources":["../../src/DateDatasets/dateDatasets.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,mBAAmB,QAAS,OAAO,KAAG,GAAG,IAAI,kBAEzD,CAAC;AA4BF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,kBAG/B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,EAAE,kBAGzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,kBAG3B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,EAAE,kBAG7B,CAAC;AAaF;;GAEG;AACH,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,GAAG,IAAI,CAMtF;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,YAAY,EAAE,YAAY,EAAE,CAAC,EAAE,GAAG,KAAK,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAoB3G;AASD;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,YAAY,EACvD,YAAY,EAAE,CAAC,EAAE,EACjB,eAAe,EAAE,CAAC,GACnB,KAAK,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAQ/B;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,YAAY,EACnD,YAAY,EAAE,CAAC,EAAE,EACjB,eAAe,CAAC,EAAE,CAAC,EACnB,aAAa,CAAC,EAAE,CAAC,GAClB,KAAK,CAAC,CAAC,GAAG,kBAAkB,CAAC,CAS/B"}
|