@gooddata/sdk-ui-kit 11.30.0-alpha.3 → 11.30.0-alpha.5
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/esm/@ui/UiDrawer/UiDrawer.js +1 -1
- package/esm/@ui/UiDrawer/UiDrawer.js.map +1 -1
- package/esm/@ui/UiFocusManager/UiAutofocus.d.ts.map +1 -1
- package/esm/@ui/UiFocusManager/UiAutofocus.js +10 -2
- package/esm/@ui/UiFocusManager/UiAutofocus.js.map +1 -1
- package/esm/@ui/UiFocusManager/UiReturnFocusOnUnmount.d.ts +2 -1
- package/esm/@ui/UiFocusManager/UiReturnFocusOnUnmount.d.ts.map +1 -1
- package/esm/@ui/UiFocusManager/UiReturnFocusOnUnmount.js +22 -6
- package/esm/@ui/UiFocusManager/UiReturnFocusOnUnmount.js.map +1 -1
- package/esm/@ui/UiMenu/hooks.d.ts.map +1 -1
- package/esm/@ui/UiMenu/hooks.js +5 -1
- package/esm/@ui/UiMenu/hooks.js.map +1 -1
- package/esm/@ui/UiTabs/defaultComponents/DefaultUiTabsContainer.d.ts.map +1 -1
- package/esm/@ui/UiTabs/defaultComponents/DefaultUiTabsContainer.js +4 -2
- package/esm/@ui/UiTabs/defaultComponents/DefaultUiTabsContainer.js.map +1 -1
- package/esm/@ui/UiTabs/defaultComponents/DefaultUiTabsTab.d.ts +1 -1
- package/esm/@ui/UiTabs/defaultComponents/DefaultUiTabsTab.d.ts.map +1 -1
- package/esm/@ui/UiTabs/defaultComponents/DefaultUiTabsTab.js +2 -2
- package/esm/@ui/UiTabs/defaultComponents/DefaultUiTabsTab.js.map +1 -1
- package/esm/@ui/UiTabs/types.d.ts +3 -1
- package/esm/@ui/UiTabs/types.d.ts.map +1 -1
- package/esm/@ui/UiTabs/useUiTabsContextStoreValue.d.ts +1 -1
- package/esm/@ui/UiTabs/useUiTabsContextStoreValue.d.ts.map +1 -1
- package/esm/@ui/UiTabs/useUiTabsContextStoreValue.js +4 -2
- package/esm/@ui/UiTabs/useUiTabsContextStoreValue.js.map +1 -1
- package/esm/Dialog/CsvDelimiterPicker.d.ts +8 -2
- package/esm/Dialog/CsvDelimiterPicker.d.ts.map +1 -1
- package/esm/Dialog/CsvDelimiterPicker.js +110 -73
- package/esm/Dialog/CsvDelimiterPicker.js.map +1 -1
- package/esm/sdk-ui-kit.d.ts +15 -6
- package/package.json +11 -11
- package/styles/css/csvDelimiterPicker.css +25 -3
- package/styles/css/csvDelimiterPicker.css.map +1 -1
- package/styles/css/main.css +25 -3
- package/styles/css/main.css.map +1 -1
- package/styles/scss/csvDelimiterPicker.scss +27 -3
|
@@ -1,52 +1,67 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
// (C) 2026 GoodData Corporation
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect, useState } from "react";
|
|
4
|
+
import cx from "classnames";
|
|
5
|
+
import { defineMessages, useIntl } from "react-intl";
|
|
4
6
|
import { CSV_DELIMITER_PRESETS, } from "@gooddata/sdk-model";
|
|
7
|
+
import { ValidationContextStore, createInvalidDatapoint, createInvalidNode, useValidationContextValue, } from "@gooddata/sdk-ui";
|
|
8
|
+
import { UiDropdown } from "../@ui/UiDropdown/UiDropdown.js";
|
|
5
9
|
import { UiMenu } from "../@ui/UiMenu/UiMenu.js";
|
|
6
|
-
import { Dropdown } from "../Dropdown/Dropdown.js";
|
|
7
10
|
import { DropdownButton } from "../Dropdown/DropdownButton.js";
|
|
8
11
|
import { Input } from "../Form/Input.js";
|
|
9
12
|
import { useIdPrefixed } from "../utils/useId.js";
|
|
10
13
|
const DEFAULT_MENU_MIN_WIDTH = 260;
|
|
14
|
+
const messages = defineMessages({
|
|
15
|
+
optionComma: { id: "csvDelimiterPicker.option.comma" },
|
|
16
|
+
optionSemicolon: { id: "csvDelimiterPicker.option.semicolon" },
|
|
17
|
+
optionPipe: { id: "csvDelimiterPicker.option.pipe" },
|
|
18
|
+
optionTab: { id: "csvDelimiterPicker.option.tab" },
|
|
19
|
+
optionCustom: { id: "csvDelimiterPicker.option.custom" },
|
|
20
|
+
customInput: { id: "csvDelimiterPicker.customInput" },
|
|
21
|
+
menuLabel: { id: "csvDelimiterPicker.menuLabel" },
|
|
22
|
+
errorPrefix: { id: "csvDelimiterPicker.validation.errorPrefix" },
|
|
23
|
+
validationSingleCharacter: { id: "csvDelimiterPicker.validation.singleCharacter" },
|
|
24
|
+
validationUnsupported: { id: "csvDelimiterPicker.validation.unsupported" },
|
|
25
|
+
});
|
|
11
26
|
const getPresetLabels = (intl) => ({
|
|
12
|
-
comma: intl.formatMessage(
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
id: "csvDelimiterPicker.option.semicolon",
|
|
18
|
-
defaultMessage: "Semicolon",
|
|
19
|
-
}),
|
|
20
|
-
pipe: intl.formatMessage({
|
|
21
|
-
id: "csvDelimiterPicker.option.pipe",
|
|
22
|
-
defaultMessage: "Pipe",
|
|
23
|
-
}),
|
|
24
|
-
tab: intl.formatMessage({
|
|
25
|
-
id: "csvDelimiterPicker.option.tab",
|
|
26
|
-
defaultMessage: "Tab",
|
|
27
|
-
}),
|
|
28
|
-
custom: intl.formatMessage({
|
|
29
|
-
id: "csvDelimiterPicker.option.custom",
|
|
30
|
-
defaultMessage: "Custom",
|
|
31
|
-
}),
|
|
27
|
+
comma: intl.formatMessage(messages.optionComma),
|
|
28
|
+
semicolon: intl.formatMessage(messages.optionSemicolon),
|
|
29
|
+
pipe: intl.formatMessage(messages.optionPipe),
|
|
30
|
+
tab: intl.formatMessage(messages.optionTab),
|
|
31
|
+
custom: intl.formatMessage(messages.optionCustom),
|
|
32
32
|
});
|
|
33
|
-
const getMenuItems = (presetLabels) =>
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
33
|
+
const getMenuItems = (presetLabels) => {
|
|
34
|
+
const items = [];
|
|
35
|
+
let id;
|
|
36
|
+
for (id in CSV_DELIMITER_PRESETS) {
|
|
37
|
+
items.push({
|
|
38
|
+
type: "interactive",
|
|
39
|
+
id,
|
|
40
|
+
stringTitle: presetLabels[id],
|
|
41
|
+
data: id,
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
items.push({
|
|
44
45
|
type: "interactive",
|
|
45
46
|
id: "custom",
|
|
46
47
|
stringTitle: presetLabels.custom,
|
|
47
48
|
data: "custom",
|
|
48
|
-
}
|
|
49
|
-
|
|
49
|
+
});
|
|
50
|
+
return items;
|
|
51
|
+
};
|
|
52
|
+
const getButtonLabel = (presetLabels, selectedPreset) => {
|
|
53
|
+
const label = presetLabels[selectedPreset];
|
|
54
|
+
const preset = selectedPreset === "custom" ? undefined : CSV_DELIMITER_PRESETS[selectedPreset];
|
|
55
|
+
return preset ? `${label} (${preset.previewSymbol})` : label;
|
|
56
|
+
};
|
|
57
|
+
function CsvDelimiterMenuItem({ item, isFocused }) {
|
|
58
|
+
const preset = item.data === "custom" ? undefined : CSV_DELIMITER_PRESETS[item.data];
|
|
59
|
+
return (_jsx("div", { className: cx("gd-ui-kit-menu__item", {
|
|
60
|
+
"gd-ui-kit-menu__item--isFocused": isFocused,
|
|
61
|
+
"gd-ui-kit-menu__item--isSelected": !!item.isSelected,
|
|
62
|
+
}), children: _jsxs("span", { className: "gd-csv-delimiter-picker-label", children: [
|
|
63
|
+
_jsx("span", { children: item.stringTitle }), preset ? (_jsxs("span", { className: "gd-csv-delimiter-picker-preview", "aria-hidden": "true", children: [" (", _jsx("span", { className: "gd-csv-delimiter-picker-preview-char", children: preset.previewSymbol }), ")"] })) : null] }) }));
|
|
64
|
+
}
|
|
50
65
|
/**
|
|
51
66
|
* Reusable CSV delimiter preset picker with dropdown, custom input, and validation.
|
|
52
67
|
*
|
|
@@ -55,46 +70,68 @@ const getMenuItems = (presetLabels) => [
|
|
|
55
70
|
*
|
|
56
71
|
* @internal
|
|
57
72
|
*/
|
|
58
|
-
export function CsvDelimiterPicker({ value, onChange, validationError, label, onEnterKeyPress, }) {
|
|
73
|
+
export function CsvDelimiterPicker({ value, onChange, validationError, label, onEnterKeyPress, layout = "column", }) {
|
|
59
74
|
const intl = useIntl();
|
|
60
75
|
const { selectedPreset, customDelimiter } = value;
|
|
61
|
-
const
|
|
62
|
-
const
|
|
76
|
+
const buttonId = useIdPrefixed("csv-delimiter-button");
|
|
77
|
+
const errorId = useIdPrefixed("csv-delimiter-error");
|
|
78
|
+
const [isCustomInputDirty, setIsCustomInputDirty] = useState(false);
|
|
79
|
+
const showInlineError = Boolean(validationError) && isCustomInputDirty;
|
|
80
|
+
const errorPrefix = intl.formatMessage(messages.errorPrefix);
|
|
81
|
+
const validationErrorMessage = validationError
|
|
82
|
+
? validationError === "singleCharacter"
|
|
83
|
+
? intl.formatMessage(messages.validationSingleCharacter)
|
|
84
|
+
: intl.formatMessage(messages.validationUnsupported)
|
|
85
|
+
: undefined;
|
|
86
|
+
const validationContextValue = useValidationContextValue(createInvalidNode());
|
|
87
|
+
const { setInvalidDatapoints } = validationContextValue;
|
|
88
|
+
// Sync validation errors to ValidationContextStore so the submit button
|
|
89
|
+
// in ConfirmDialogBase always announces them via aria-describedby —
|
|
90
|
+
// when the user focuses the submit button, they should hear why the form
|
|
91
|
+
// can't be submitted, regardless of whether the input is dirty yet.
|
|
92
|
+
useEffect(() => {
|
|
93
|
+
setInvalidDatapoints(() => validationErrorMessage
|
|
94
|
+
? [
|
|
95
|
+
createInvalidDatapoint({
|
|
96
|
+
id: errorId,
|
|
97
|
+
message: `${errorPrefix} ${validationErrorMessage}`,
|
|
98
|
+
}),
|
|
99
|
+
]
|
|
100
|
+
: []);
|
|
101
|
+
}, [validationErrorMessage, errorPrefix, errorId, setInvalidDatapoints]);
|
|
63
102
|
const presetLabels = getPresetLabels(intl);
|
|
64
103
|
const menuItems = getMenuItems(presetLabels);
|
|
65
|
-
const customInputLabel = intl.formatMessage(
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
defaultMessage: "This character isn't supported",
|
|
98
|
-
}) })) : null] })) : null] }));
|
|
104
|
+
const customInputLabel = intl.formatMessage(messages.customInput);
|
|
105
|
+
const menuAriaLabel = intl.formatMessage(messages.menuLabel);
|
|
106
|
+
return (_jsxs(ValidationContextStore, { value: validationContextValue, children: [label ? _jsx("label", { htmlFor: buttonId, children: label }) : null, _jsxs("div", { className: cx("gd-csv-delimiter-picker-controls", {
|
|
107
|
+
"gd-csv-delimiter-picker-controls--column": layout === "column",
|
|
108
|
+
"gd-csv-delimiter-picker-controls--row": layout === "row",
|
|
109
|
+
}), children: [_jsx(UiDropdown, { renderButton: ({ isOpen, toggleDropdown, ref, dropdownId }) => (_jsx(DropdownButton, { id: buttonId, className: "s-csv-delimiter-dropdown", value: getButtonLabel(presetLabels, selectedPreset), isOpen: isOpen, onClick: toggleDropdown, buttonRef: ref, dropdownId: dropdownId, accessibilityConfig: {
|
|
110
|
+
...(label ? {} : { ariaLabel: menuAriaLabel }),
|
|
111
|
+
popupType: "listbox",
|
|
112
|
+
}, isFullWidth: layout === "column" })), renderBody: ({ closeDropdown, ariaAttributes }) => (_jsx(UiMenu, { items: menuItems.map((item) => ({
|
|
113
|
+
...item,
|
|
114
|
+
isSelected: selectedPreset === item.data,
|
|
115
|
+
})), itemDataTestId: (item) => `s-csv-delimiter-${item.id}`, onSelect: (item) => {
|
|
116
|
+
setIsCustomInputDirty(false);
|
|
117
|
+
onChange({ selectedPreset: item.data, customDelimiter });
|
|
118
|
+
}, onClose: closeDropdown, shouldCloseOnSelect: true, InteractiveItem: CsvDelimiterMenuItem, ariaAttributes: {
|
|
119
|
+
...ariaAttributes,
|
|
120
|
+
"aria-label": menuAriaLabel,
|
|
121
|
+
}, minWidth: DEFAULT_MENU_MIN_WIDTH })), autofocusOnOpen: true, fullWidthButton: layout === "column", closeOnEscape: true, accessibilityConfig: {
|
|
122
|
+
triggerRole: "button",
|
|
123
|
+
popupRole: "listbox",
|
|
124
|
+
} }), selectedPreset === "custom" ? (_jsxs("div", { className: "gd-csv-delimiter-picker-custom-field", children: [
|
|
125
|
+
_jsx(Input, { className: "gd-csv-delimiter-picker-custom-input s-csv-delimiter-custom-input", isSmall: true, value: customDelimiter, onChange: (value) => {
|
|
126
|
+
setIsCustomInputDirty(true);
|
|
127
|
+
onChange({ selectedPreset, customDelimiter: String(value) });
|
|
128
|
+
}, hasError: showInlineError, autocomplete: "off", onEnterKeyPress: onEnterKeyPress, accessibilityConfig: {
|
|
129
|
+
ariaLabel: customInputLabel,
|
|
130
|
+
ariaInvalid: showInlineError,
|
|
131
|
+
ariaDescribedBy: showInlineError ? errorId : undefined,
|
|
132
|
+
} }), validationErrorMessage ? (_jsxs("div", { id: errorId, className: cx("gd-csv-delimiter-picker-error", {
|
|
133
|
+
"sr-only": !showInlineError,
|
|
134
|
+
}), children: [errorPrefix, " ", validationErrorMessage] })) : null] })) : null] })
|
|
135
|
+
] }));
|
|
99
136
|
}
|
|
100
137
|
//# sourceMappingURL=CsvDelimiterPicker.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CsvDelimiterPicker.js","sourceRoot":"","sources":["../../src/Dialog/CsvDelimiterPicker.tsx"],"names":[],"mappings":";AAAA,gCAAgC;AAEhC,OAAO,EAAkB,OAAO,EAAE,MAAM,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ACT,CAAC,CAAC,CAAC,IAAI,IACN;YACe,CAC5B,CAAC;AAAA,CACL"}
|
package/esm/sdk-ui-kit.d.ts
CHANGED
|
@@ -554,7 +554,7 @@ export declare function createTemplates(formatMessage: (descriptor: {
|
|
|
554
554
|
*
|
|
555
555
|
* @internal
|
|
556
556
|
*/
|
|
557
|
-
export declare function CsvDelimiterPicker({ value, onChange, validationError, label, onEnterKeyPress }: ICsvDelimiterPickerProps): JSX.Element;
|
|
557
|
+
export declare function CsvDelimiterPicker({ value, onChange, validationError, label, onEnterKeyPress, layout }: ICsvDelimiterPickerProps): JSX.Element;
|
|
558
558
|
|
|
559
559
|
/**
|
|
560
560
|
* Base currency preset definitions.
|
|
@@ -745,7 +745,7 @@ export declare function DefaultUiTabsContainer<TTabProps extends Record<any, any
|
|
|
745
745
|
/**
|
|
746
746
|
* @internal
|
|
747
747
|
*/
|
|
748
|
-
export declare function DefaultUiTabsTab<TTabProps extends Record<any, any> = EmptyObject, TTabActionProps extends Record<any, any> = EmptyObject>({ tab, isSelected, onSelect, isFocused }: IUiTabComponentProps<"Tab", TTabProps, TTabActionProps>): JSX.Element;
|
|
748
|
+
export declare function DefaultUiTabsTab<TTabProps extends Record<any, any> = EmptyObject, TTabActionProps extends Record<any, any> = EmptyObject>({ tab, isSelected, onSelect, onDoubleClick, isFocused }: IUiTabComponentProps<"Tab", TTabProps, TTabActionProps>): JSX.Element;
|
|
749
749
|
|
|
750
750
|
/**
|
|
751
751
|
* @internal
|
|
@@ -2611,10 +2611,16 @@ export declare interface ICsvDelimiterPickerProps {
|
|
|
2611
2611
|
onChange: (value: ICsvDelimiterPickerValue) => void;
|
|
2612
2612
|
/** Validation error to display below the custom input. */
|
|
2613
2613
|
validationError?: CsvDelimiterValidationError;
|
|
2614
|
-
/** If provided, renders
|
|
2614
|
+
/** If provided, renders a label above the dropdown. */
|
|
2615
2615
|
label?: string;
|
|
2616
2616
|
/** Called when Enter is pressed in the custom input. */
|
|
2617
2617
|
onEnterKeyPress?: () => void;
|
|
2618
|
+
/**
|
|
2619
|
+
* Layout direction for the dropdown and custom input.
|
|
2620
|
+
* - `"column"` (default): dropdown takes full width, custom input stacks below.
|
|
2621
|
+
* - `"row"`: dropdown auto-sizes, custom input sits beside it.
|
|
2622
|
+
*/
|
|
2623
|
+
layout?: "row" | "column";
|
|
2618
2624
|
}
|
|
2619
2625
|
|
|
2620
2626
|
/**
|
|
@@ -7385,6 +7391,7 @@ export declare interface IUiPopoverProps {
|
|
|
7385
7391
|
*/
|
|
7386
7392
|
export declare interface IUiReturnFocusOnUnmountOptions {
|
|
7387
7393
|
returnFocusTo?: string | RefObject<HTMLElement | null> | (() => HTMLElement | null);
|
|
7394
|
+
focusVisible?: boolean;
|
|
7388
7395
|
}
|
|
7389
7396
|
|
|
7390
7397
|
/**
|
|
@@ -7538,6 +7545,7 @@ export declare type IUiTabComponents<TTabProps extends Record<any, any> = EmptyO
|
|
|
7538
7545
|
tab: IUiTab<TTabProps, TTabActionProps>;
|
|
7539
7546
|
isSelected: boolean;
|
|
7540
7547
|
onSelect: () => void;
|
|
7548
|
+
onDoubleClick?: () => void;
|
|
7541
7549
|
/**
|
|
7542
7550
|
* Whether this tab is the currently focused tab in keyboard navigation.
|
|
7543
7551
|
* When true, the tab button and its actions button become tabbable (tabIndex=0).
|
|
@@ -7578,7 +7586,7 @@ export declare type IUiTabComponents<TTabProps extends Record<any, any> = EmptyO
|
|
|
7578
7586
|
/**
|
|
7579
7587
|
* @internal
|
|
7580
7588
|
*/
|
|
7581
|
-
export declare type IUiTabContext<TTabProps extends Record<any, any> = EmptyObject, TTabActionProps extends Record<any, any> = EmptyObject> = Pick<IUiTabsProps<TTabProps, TTabActionProps>, "tabs" | "selectedTabId" | "onTabSelect" | "size" | "accessibilityConfig" | "maxLabelLength" | "disableBottomBorder"> & {
|
|
7589
|
+
export declare type IUiTabContext<TTabProps extends Record<any, any> = EmptyObject, TTabActionProps extends Record<any, any> = EmptyObject> = Pick<IUiTabsProps<TTabProps, TTabActionProps>, "tabs" | "selectedTabId" | "onTabSelect" | "onTabDoubleClick" | "size" | "accessibilityConfig" | "maxLabelLength" | "disableBottomBorder"> & {
|
|
7582
7590
|
isOverflowing: boolean;
|
|
7583
7591
|
containerRef: RefCallback<Element>;
|
|
7584
7592
|
onActionTriggered: (context: IUiTabActionEventContext<TTabProps, TTabActionProps>) => void;
|
|
@@ -7599,6 +7607,7 @@ export declare type IUiTabsProps<TTabProps extends Record<any, any> = EmptyObjec
|
|
|
7599
7607
|
tabs: IUiTab<TTabProps, TTabActionProps>[];
|
|
7600
7608
|
selectedTabId: string;
|
|
7601
7609
|
onTabSelect: (tab: IUiTab<TTabProps, TTabActionProps>) => void;
|
|
7610
|
+
onTabDoubleClick?: (tab: IUiTab<TTabProps, TTabActionProps>) => void;
|
|
7602
7611
|
size?: SizeSmall | SizeMedium | SizeLarge;
|
|
7603
7612
|
maxLabelLength?: number;
|
|
7604
7613
|
accessibilityConfig?: IUiTabsAccessibilityConfig;
|
|
@@ -9911,7 +9920,7 @@ export declare const useUiFocusTrapConnectors: <T extends HTMLElement = HTMLElem
|
|
|
9911
9920
|
/**
|
|
9912
9921
|
* @internal
|
|
9913
9922
|
*/
|
|
9914
|
-
export declare const useUiReturnFocusOnUnmountConnectors: <T extends HTMLElement = HTMLElement>({ returnFocusTo, }?: IUiReturnFocusOnUnmountOptions) => IUiFocusHelperConnectors<T>;
|
|
9923
|
+
export declare const useUiReturnFocusOnUnmountConnectors: <T extends HTMLElement = HTMLElement>({ returnFocusTo, focusVisible, }?: IUiReturnFocusOnUnmountOptions) => IUiFocusHelperConnectors<T>;
|
|
9915
9924
|
|
|
9916
9925
|
/**
|
|
9917
9926
|
* @internal
|
|
@@ -9921,7 +9930,7 @@ export declare const useUiTabOutHandlerConnectors: <T extends HTMLElement = HTML
|
|
|
9921
9930
|
/**
|
|
9922
9931
|
* @internal
|
|
9923
9932
|
*/
|
|
9924
|
-
export declare function useUiTabsContextStoreValue<TTabProps extends Record<any, any> = EmptyObject, TTabActionProps extends Record<any, any> = EmptyObject>({ tabs, selectedTabId, onTabSelect, size, maxLabelLength, accessibilityConfig: accessibilityConfigProp, disableBottomBorder, Container, Tab, TabValue, TabActions, TabActionsButton, AllTabs, AllTabsButton }: IUiTabsProps<TTabProps, TTabActionProps>): IUiTabContext<TTabProps, TTabActionProps>;
|
|
9933
|
+
export declare function useUiTabsContextStoreValue<TTabProps extends Record<any, any> = EmptyObject, TTabActionProps extends Record<any, any> = EmptyObject>({ tabs, selectedTabId, onTabSelect, onTabDoubleClick, size, maxLabelLength, accessibilityConfig: accessibilityConfigProp, disableBottomBorder, Container, Tab, TabValue, TabActions, TabActionsButton, AllTabs, AllTabsButton }: IUiTabsProps<TTabProps, TTabActionProps>): IUiTabContext<TTabProps, TTabActionProps>;
|
|
9925
9934
|
|
|
9926
9935
|
/**
|
|
9927
9936
|
* @internal
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-kit",
|
|
3
|
-
"version": "11.30.0-alpha.
|
|
3
|
+
"version": "11.30.0-alpha.5",
|
|
4
4
|
"description": "GoodData SDK - UI Building Components",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "GoodData Corporation",
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"tslib": "2.8.1",
|
|
76
76
|
"unified": "^11.0.5",
|
|
77
77
|
"uuid": "11.1.0",
|
|
78
|
-
"@gooddata/sdk-backend-spi": "11.30.0-alpha.
|
|
79
|
-
"@gooddata/sdk-model": "11.30.0-alpha.
|
|
80
|
-
"@gooddata/sdk-ui": "11.30.0-alpha.
|
|
81
|
-
"@gooddata/sdk-ui
|
|
82
|
-
"@gooddata/util": "11.30.0-alpha.
|
|
78
|
+
"@gooddata/sdk-backend-spi": "11.30.0-alpha.5",
|
|
79
|
+
"@gooddata/sdk-model": "11.30.0-alpha.5",
|
|
80
|
+
"@gooddata/sdk-ui-theme-provider": "11.30.0-alpha.5",
|
|
81
|
+
"@gooddata/sdk-ui": "11.30.0-alpha.5",
|
|
82
|
+
"@gooddata/util": "11.30.0-alpha.5"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@microsoft/api-documenter": "^7.17.0",
|
|
@@ -128,11 +128,11 @@
|
|
|
128
128
|
"typescript": "5.9.3",
|
|
129
129
|
"vitest": "4.1.0",
|
|
130
130
|
"vitest-dom": "0.1.1",
|
|
131
|
-
"@gooddata/
|
|
132
|
-
"@gooddata/
|
|
133
|
-
"@gooddata/
|
|
134
|
-
"@gooddata/sdk-backend-mockingbird": "11.30.0-alpha.
|
|
135
|
-
"@gooddata/stylelint-config": "11.30.0-alpha.
|
|
131
|
+
"@gooddata/eslint-config": "11.30.0-alpha.5",
|
|
132
|
+
"@gooddata/oxlint-config": "11.30.0-alpha.5",
|
|
133
|
+
"@gooddata/reference-workspace": "11.30.0-alpha.5",
|
|
134
|
+
"@gooddata/sdk-backend-mockingbird": "11.30.0-alpha.5",
|
|
135
|
+
"@gooddata/stylelint-config": "11.30.0-alpha.5"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {
|
|
138
138
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -1,7 +1,13 @@
|
|
|
1
|
+
.gd-csv-delimiter-picker-label {
|
|
2
|
+
white-space: nowrap;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.gd-csv-delimiter-picker-preview-char {
|
|
6
|
+
font-family: menlo, monaco, consolas, "Courier New", monospace;
|
|
7
|
+
font-weight: 400;
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
.gd-csv-delimiter-picker-preview {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
min-width: 28px;
|
|
4
|
-
justify-content: flex-end;
|
|
5
11
|
color: var(--gd-palette-complementary-6);
|
|
6
12
|
opacity: 0;
|
|
7
13
|
visibility: hidden;
|
|
@@ -14,11 +20,27 @@
|
|
|
14
20
|
visibility: visible;
|
|
15
21
|
}
|
|
16
22
|
|
|
23
|
+
.gd-csv-delimiter-picker-controls {
|
|
24
|
+
display: flex;
|
|
25
|
+
gap: 10px;
|
|
26
|
+
}
|
|
27
|
+
.gd-csv-delimiter-picker-controls--column {
|
|
28
|
+
flex-direction: column;
|
|
29
|
+
align-items: stretch;
|
|
30
|
+
max-width: 260px;
|
|
31
|
+
}
|
|
32
|
+
.gd-csv-delimiter-picker-controls--row {
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
align-items: flex-start;
|
|
35
|
+
flex-wrap: wrap;
|
|
36
|
+
}
|
|
37
|
+
|
|
17
38
|
.gd-csv-delimiter-picker-error {
|
|
18
39
|
margin-top: 6px;
|
|
19
40
|
color: var(--gd-message-error-textColor);
|
|
20
41
|
font-size: 12px;
|
|
21
42
|
line-height: 16px;
|
|
43
|
+
overflow-wrap: break-word;
|
|
22
44
|
}
|
|
23
45
|
|
|
24
46
|
/*# sourceMappingURL=csvDelimiterPicker.css.map */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sourceRoot":"","sources":["../scss/csvDelimiterPicker.scss"],"names":[],"mappings":"AAEA;EACI;
|
|
1
|
+
{"version":3,"sourceRoot":"","sources":["../scss/csvDelimiterPicker.scss"],"names":[],"mappings":"AAEA;EACI;;;AAGJ;EACI;EACA;;;AAGJ;EACI;EACA;EACA;EACA,YACI;;;AAIR;AAAA;EAEI;EACA;;;AAGJ;EACI;EACA;;AAEA;EACI;EACA;EACA;;AAGJ;EACI;EACA;EACA;;;AAIR;EACI;EACA;EACA;EACA;EACA","file":"csvDelimiterPicker.css"}
|
package/styles/css/main.css
CHANGED
|
@@ -5527,10 +5527,16 @@ a.gd-button-link:hover .gd-button-text, a.gd-button-link-dimmed:hover .gd-button
|
|
|
5527
5527
|
background: var(--gd-palette-primary-base, #14b2e2);
|
|
5528
5528
|
}
|
|
5529
5529
|
|
|
5530
|
+
.gd-csv-delimiter-picker-label {
|
|
5531
|
+
white-space: nowrap;
|
|
5532
|
+
}
|
|
5533
|
+
|
|
5534
|
+
.gd-csv-delimiter-picker-preview-char {
|
|
5535
|
+
font-family: menlo, monaco, consolas, "Courier New", monospace;
|
|
5536
|
+
font-weight: 400;
|
|
5537
|
+
}
|
|
5538
|
+
|
|
5530
5539
|
.gd-csv-delimiter-picker-preview {
|
|
5531
|
-
display: inline-flex;
|
|
5532
|
-
min-width: 28px;
|
|
5533
|
-
justify-content: flex-end;
|
|
5534
5540
|
color: var(--gd-palette-complementary-6);
|
|
5535
5541
|
opacity: 0;
|
|
5536
5542
|
visibility: hidden;
|
|
@@ -5543,11 +5549,27 @@ a.gd-button-link:hover .gd-button-text, a.gd-button-link-dimmed:hover .gd-button
|
|
|
5543
5549
|
visibility: visible;
|
|
5544
5550
|
}
|
|
5545
5551
|
|
|
5552
|
+
.gd-csv-delimiter-picker-controls {
|
|
5553
|
+
display: flex;
|
|
5554
|
+
gap: 10px;
|
|
5555
|
+
}
|
|
5556
|
+
.gd-csv-delimiter-picker-controls--column {
|
|
5557
|
+
flex-direction: column;
|
|
5558
|
+
align-items: stretch;
|
|
5559
|
+
max-width: 260px;
|
|
5560
|
+
}
|
|
5561
|
+
.gd-csv-delimiter-picker-controls--row {
|
|
5562
|
+
flex-direction: row;
|
|
5563
|
+
align-items: flex-start;
|
|
5564
|
+
flex-wrap: wrap;
|
|
5565
|
+
}
|
|
5566
|
+
|
|
5546
5567
|
.gd-csv-delimiter-picker-error {
|
|
5547
5568
|
margin-top: 6px;
|
|
5548
5569
|
color: var(--gd-message-error-textColor);
|
|
5549
5570
|
font-size: 12px;
|
|
5550
5571
|
line-height: 16px;
|
|
5572
|
+
overflow-wrap: break-word;
|
|
5551
5573
|
}
|
|
5552
5574
|
|
|
5553
5575
|
/* ==========================================================================
|