@gooddata/sdk-ui-kit 11.42.0-alpha.1 → 11.42.0-alpha.3
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/UiAutocomplete/UiAutocomplete.d.ts +9 -0
- package/esm/@ui/UiAutocomplete/UiAutocomplete.d.ts.map +1 -0
- package/esm/@ui/UiAutocomplete/UiAutocomplete.js +230 -0
- package/esm/@ui/UiAutocomplete/types.d.ts +61 -0
- package/esm/@ui/UiAutocomplete/types.d.ts.map +1 -0
- package/esm/@ui/UiAutocomplete/types.js +2 -0
- package/esm/@ui/UiAutocomplete/useAsyncListSource.d.ts +42 -0
- package/esm/@ui/UiAutocomplete/useAsyncListSource.d.ts.map +1 -0
- package/esm/@ui/UiAutocomplete/useAsyncListSource.js +112 -0
- package/esm/@ui/UiCombobox/UiComboboxInput.d.ts +27 -4
- package/esm/@ui/UiCombobox/UiComboboxInput.d.ts.map +1 -1
- package/esm/@ui/UiCombobox/UiComboboxInput.js +38 -31
- package/esm/@ui/UiCombobox/UiComboboxList.js +2 -2
- package/esm/@ui/UiCombobox/UiComboboxListItem.d.ts +3 -13
- package/esm/@ui/UiCombobox/UiComboboxListItem.d.ts.map +1 -1
- package/esm/@ui/UiCombobox/UiComboboxListItem.js +13 -23
- package/esm/@ui/UiCombobox/UiComboboxPopup.d.ts +6 -3
- package/esm/@ui/UiCombobox/UiComboboxPopup.d.ts.map +1 -1
- package/esm/@ui/UiCombobox/UiComboboxPopup.js +5 -7
- package/esm/@ui/UiCombobox/types.d.ts +17 -9
- package/esm/@ui/UiCombobox/types.d.ts.map +1 -1
- package/esm/@ui/UiCombobox/useCombobox.d.ts.map +1 -1
- package/esm/@ui/UiCombobox/useCombobox.js +66 -161
- package/esm/@ui/UiCombobox/useComboboxChrome.d.ts +20 -0
- package/esm/@ui/UiCombobox/useComboboxChrome.d.ts.map +1 -0
- package/esm/@ui/UiCombobox/useComboboxChrome.js +89 -0
- package/esm/@ui/UiCombobox/useComboboxSelection.d.ts +23 -0
- package/esm/@ui/UiCombobox/useComboboxSelection.d.ts.map +1 -0
- package/esm/@ui/UiCombobox/useComboboxSelection.js +78 -0
- package/esm/@ui/UiDropdown/UiDropdown.js +3 -3
- package/esm/@ui/UiFloatingElement/UiFloatingElement.d.ts.map +1 -1
- package/esm/@ui/UiFloatingElement/UiFloatingElement.js +3 -2
- package/esm/@ui/UiFloatingPanel/UiFloatingPanel.d.ts +28 -0
- package/esm/@ui/UiFloatingPanel/UiFloatingPanel.d.ts.map +1 -0
- package/esm/@ui/UiFloatingPanel/UiFloatingPanel.js +14 -0
- package/esm/@ui/UiTags/UiTags.d.ts.map +1 -1
- package/esm/@ui/UiTags/UiTags.js +2 -2
- package/esm/@ui/UiTextInput/UiTextInput.d.ts +13 -2
- package/esm/@ui/UiTextInput/UiTextInput.d.ts.map +1 -1
- package/esm/@ui/UiTextInput/UiTextInput.js +2 -2
- package/esm/@ui/UiTooltip/UiTooltip.d.ts.map +1 -1
- package/esm/@ui/UiTooltip/UiTooltip.js +10 -4
- package/esm/@ui/hooks/useCloseOnOutsideClick.d.ts +31 -0
- package/esm/@ui/hooks/useCloseOnOutsideClick.d.ts.map +1 -1
- package/esm/@ui/hooks/useCloseOnOutsideClick.js +73 -6
- package/esm/Tabs/Tabs.d.ts +2 -1
- package/esm/Tabs/Tabs.d.ts.map +1 -1
- package/esm/Tabs/Tabs.js +1 -1
- package/esm/WidgetNotice/WidgetNotice.d.ts.map +1 -1
- package/esm/WidgetNotice/WidgetNotice.js +1 -1
- package/esm/index.d.ts +5 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +2 -0
- package/esm/locales.d.ts +17 -0
- package/esm/locales.d.ts.map +1 -1
- package/esm/locales.js +7 -0
- package/esm/sdk-ui-kit.d.ts +166 -31
- package/package.json +11 -11
- package/src/@ui/UiAutocomplete/UiAutocomplete.scss +53 -0
- package/src/@ui/UiCombobox/UiCombobox.scss +0 -16
- package/src/@ui/UiDropdown/UiDropdown.scss +1 -20
- package/src/@ui/UiFloatingPanel/UiFloatingPanel.scss +27 -0
- package/src/@ui/UiPopover/UiPopover.scss +8 -0
- package/src/@ui/UiTags/UiTags.scss +0 -4
- package/src/@ui/UiTextInput/UiTextInput.scss +6 -2
- package/src/@ui/index.scss +2 -0
- package/styles/css/main.css +64 -28
- package/styles/css/main.css.map +1 -1
package/esm/locales.d.ts
CHANGED
|
@@ -202,4 +202,21 @@ export declare const olpGranteeControlsMessages: {
|
|
|
202
202
|
id: string;
|
|
203
203
|
};
|
|
204
204
|
};
|
|
205
|
+
export declare const uiAutocompleteMessages: {
|
|
206
|
+
searchPlaceholder: {
|
|
207
|
+
id: string;
|
|
208
|
+
};
|
|
209
|
+
stateLoading: {
|
|
210
|
+
id: string;
|
|
211
|
+
};
|
|
212
|
+
stateError: {
|
|
213
|
+
id: string;
|
|
214
|
+
};
|
|
215
|
+
stateNoMatch: {
|
|
216
|
+
id: string;
|
|
217
|
+
};
|
|
218
|
+
loadMore: {
|
|
219
|
+
id: string;
|
|
220
|
+
};
|
|
221
|
+
};
|
|
205
222
|
//# sourceMappingURL=locales.d.ts.map
|
package/esm/locales.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../src/locales.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB;;;;CAE/B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAMpC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;CAG1C,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;CAG/B,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;CAK1C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB5C,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;CAI/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;CAGnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;CAEhC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;CAKvC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;CAMtC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;CAMnC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAK3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUhC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;CAGrC,CAAC"}
|
|
1
|
+
{"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../src/locales.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,oBAAoB;;;;CAE/B,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;CAMpC,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;CAG1C,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;CAG/B,CAAC;AAEH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;CAK1C,CAAC;AAEH,eAAO,MAAM,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAgB5C,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;CAI/B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;CAGnC,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;CAEhC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;CAKvC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;CAMtC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;CAMnC,CAAC;AAEH,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;CAK3B,CAAC;AAEH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAUhC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;CAGrC,CAAC;AAEH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;CAMjC,CAAC"}
|
package/esm/locales.js
CHANGED
|
@@ -95,3 +95,10 @@ export const olpGranteeControlsMessages = defineMessages({
|
|
|
95
95
|
allLabels: { id: "shareDialog.olp.granteeControls.allLabels" },
|
|
96
96
|
labelsCount: { id: "shareDialog.olp.granteeControls.labelsCount" },
|
|
97
97
|
});
|
|
98
|
+
export const uiAutocompleteMessages = defineMessages({
|
|
99
|
+
searchPlaceholder: { id: "uiKit.autocomplete.searchPlaceholder" },
|
|
100
|
+
stateLoading: { id: "uiKit.autocomplete.stateLoading" },
|
|
101
|
+
stateError: { id: "uiKit.autocomplete.stateError" },
|
|
102
|
+
stateNoMatch: { id: "uiKit.autocomplete.stateNoMatch" },
|
|
103
|
+
loadMore: { id: "uiKit.autocomplete.loadMore" },
|
|
104
|
+
});
|
package/esm/sdk-ui-kit.d.ts
CHANGED
|
@@ -54,7 +54,6 @@ import { IFilter } from '@gooddata/sdk-model';
|
|
|
54
54
|
import { ILocale } from '@gooddata/sdk-ui';
|
|
55
55
|
import { IMeasureSortTarget } from '@gooddata/sdk-model';
|
|
56
56
|
import { IMetadataObjectBase } from '@gooddata/sdk-model';
|
|
57
|
-
import { InputHTMLAttributes } from 'react';
|
|
58
57
|
import { IntlShape } from 'react-intl';
|
|
59
58
|
import { INumberParameterConstraints } from '@gooddata/sdk-model';
|
|
60
59
|
import { IParameterMetadataObject } from '@gooddata/sdk-model';
|
|
@@ -101,7 +100,6 @@ import { ShareStatus } from '@gooddata/sdk-model';
|
|
|
101
100
|
import { SortDirection } from '@gooddata/sdk-model';
|
|
102
101
|
import { Strategy } from '@floating-ui/react';
|
|
103
102
|
import { SyntheticEvent } from 'react';
|
|
104
|
-
import type { UseInteractionsReturn } from '@floating-ui/react';
|
|
105
103
|
import { VirtualElement } from '@floating-ui/react';
|
|
106
104
|
import { WeekStart } from '@gooddata/sdk-model';
|
|
107
105
|
import { WithIntlProps } from 'react-intl';
|
|
@@ -6154,6 +6152,7 @@ export declare interface ITab {
|
|
|
6154
6152
|
values?: Record<string, string | number | boolean | null | undefined | Date | FormatXMLElementFn<string, string>>;
|
|
6155
6153
|
iconOnly?: boolean;
|
|
6156
6154
|
icon?: string;
|
|
6155
|
+
iconNode?: ReactNode;
|
|
6157
6156
|
}
|
|
6158
6157
|
|
|
6159
6158
|
/**
|
|
@@ -6491,6 +6490,70 @@ export declare interface IUiAsyncTableTitleProps {
|
|
|
6491
6490
|
scrollToStart: () => void;
|
|
6492
6491
|
}
|
|
6493
6492
|
|
|
6493
|
+
/** @internal */
|
|
6494
|
+
export declare interface IUiAutocompleteLoadResult<T extends IUiAutocompleteOption = IUiAutocompleteOption> {
|
|
6495
|
+
sections: IUiAutocompleteSection<T>[];
|
|
6496
|
+
/** Show a "Load more" row whose activation calls the loader with the next page. */
|
|
6497
|
+
hasNextPage?: boolean;
|
|
6498
|
+
}
|
|
6499
|
+
|
|
6500
|
+
/**
|
|
6501
|
+
* User-facing copy overrides. Omitted fields fall back to the kit default.
|
|
6502
|
+
*
|
|
6503
|
+
* @internal
|
|
6504
|
+
*/
|
|
6505
|
+
export declare interface IUiAutocompleteMessages {
|
|
6506
|
+
searchPlaceholder?: string;
|
|
6507
|
+
stateLoading?: string;
|
|
6508
|
+
stateError?: string;
|
|
6509
|
+
stateNoMatch?: string;
|
|
6510
|
+
loadMore?: string;
|
|
6511
|
+
}
|
|
6512
|
+
|
|
6513
|
+
/**
|
|
6514
|
+
* Minimal option shape; specialized pickers map their domain objects onto it.
|
|
6515
|
+
*
|
|
6516
|
+
* @internal
|
|
6517
|
+
*/
|
|
6518
|
+
export declare interface IUiAutocompleteOption {
|
|
6519
|
+
id: string;
|
|
6520
|
+
label: string;
|
|
6521
|
+
/** Secondary label rendered muted next to the primary label. */
|
|
6522
|
+
secondaryText?: string;
|
|
6523
|
+
}
|
|
6524
|
+
|
|
6525
|
+
/** @internal */
|
|
6526
|
+
export declare interface IUiAutocompleteProps<T extends IUiAutocompleteOption = IUiAutocompleteOption> {
|
|
6527
|
+
/**
|
|
6528
|
+
* Called with the debounced search and zero-based `page` index. Page 0
|
|
6529
|
+
* fires on every query change; subsequent pages fire on Load-more.
|
|
6530
|
+
*
|
|
6531
|
+
* Must be referentially stable (memoize with `useCallback`) — it is a
|
|
6532
|
+
* fetch dependency, so a new identity each render re-runs the page-0 query.
|
|
6533
|
+
*/
|
|
6534
|
+
loadOptions: (search: string, page: number) => Promise<IUiAutocompleteLoadResult<T>>;
|
|
6535
|
+
/** Filtered out of the dropdown so the user cannot pick the same option twice. */
|
|
6536
|
+
selectedIds?: ReadonlyArray<string>;
|
|
6537
|
+
onSelect: (option: T) => void;
|
|
6538
|
+
/** Debounce delay for the input → loader path. Defaults to 400 ms. */
|
|
6539
|
+
debounceMs?: number;
|
|
6540
|
+
messages?: IUiAutocompleteMessages;
|
|
6541
|
+
/**
|
|
6542
|
+
* Forwarded to the search input for the accessible name / description.
|
|
6543
|
+
* The combobox-internal attributes (`role`, `ariaExpanded`, `ariaControls`,
|
|
6544
|
+
* `ariaAutocomplete`) are owned by the component and cannot be overridden.
|
|
6545
|
+
*/
|
|
6546
|
+
accessibilityConfig?: IAccessibilityConfigBase;
|
|
6547
|
+
dataTestId?: string;
|
|
6548
|
+
}
|
|
6549
|
+
|
|
6550
|
+
/** @internal */
|
|
6551
|
+
export declare interface IUiAutocompleteSection<T extends IUiAutocompleteOption = IUiAutocompleteOption> {
|
|
6552
|
+
id: string;
|
|
6553
|
+
label: string;
|
|
6554
|
+
options: T[];
|
|
6555
|
+
}
|
|
6556
|
+
|
|
6494
6557
|
/**
|
|
6495
6558
|
* @internal
|
|
6496
6559
|
*/
|
|
@@ -6668,6 +6731,26 @@ export declare interface IUiChipProps {
|
|
|
6668
6731
|
renderDeleteButton?: (button: ReactNode) => ReactNode;
|
|
6669
6732
|
}
|
|
6670
6733
|
|
|
6734
|
+
/** @internal */
|
|
6735
|
+
export declare interface IUiComboboxInputProps {
|
|
6736
|
+
/**
|
|
6737
|
+
* Accessible name/description for the input (e.g. `ariaLabel`,
|
|
6738
|
+
* `ariaDescribedBy`). The combobox role and listbox-wiring attributes are
|
|
6739
|
+
* owned by the component and override anything passed here.
|
|
6740
|
+
*/
|
|
6741
|
+
accessibilityConfig?: IAccessibilityConfigBase;
|
|
6742
|
+
/** Visible placeholder. */
|
|
6743
|
+
placeholder?: string;
|
|
6744
|
+
/** Form field name forwarded to the underlying input. */
|
|
6745
|
+
name?: string;
|
|
6746
|
+
autoFocus?: boolean;
|
|
6747
|
+
onKeyDown?: (event: KeyboardEvent_2<HTMLInputElement>) => void;
|
|
6748
|
+
onFocus?: (event: FocusEvent_2<HTMLInputElement>) => void;
|
|
6749
|
+
onBlur?: (event: FocusEvent_2<HTMLInputElement>) => void;
|
|
6750
|
+
onClick?: (event: MouseEvent_2<HTMLInputElement>) => void;
|
|
6751
|
+
dataTestId?: string;
|
|
6752
|
+
}
|
|
6753
|
+
|
|
6671
6754
|
/** @internal */
|
|
6672
6755
|
export declare interface IUiComboboxListItemProps extends HTMLAttributes<HTMLLIElement> {
|
|
6673
6756
|
option: IUiComboboxOption;
|
|
@@ -6705,7 +6788,10 @@ export declare interface IUiComboboxParams {
|
|
|
6705
6788
|
*/
|
|
6706
6789
|
defaultValue?: string;
|
|
6707
6790
|
/**
|
|
6708
|
-
*
|
|
6791
|
+
* Called whenever the input value changes — on typing, on Escape reset,
|
|
6792
|
+
* and when an option is selected. The combobox is fully controlled when
|
|
6793
|
+
* paired with `value`; consumers that need to distinguish selection from
|
|
6794
|
+
* typing should inspect the current `selectedOption` state.
|
|
6709
6795
|
*/
|
|
6710
6796
|
onValueChange?: (value: string) => void;
|
|
6711
6797
|
/**
|
|
@@ -6715,6 +6801,12 @@ export declare interface IUiComboboxParams {
|
|
|
6715
6801
|
creatable?: boolean;
|
|
6716
6802
|
}
|
|
6717
6803
|
|
|
6804
|
+
/** @internal */
|
|
6805
|
+
export declare interface IUiComboboxPopupProps {
|
|
6806
|
+
children?: ReactNode;
|
|
6807
|
+
style?: CSSProperties;
|
|
6808
|
+
}
|
|
6809
|
+
|
|
6718
6810
|
/** @internal */
|
|
6719
6811
|
export declare interface IUiComboboxProps extends IUiComboboxParams {
|
|
6720
6812
|
children?: ReactNode;
|
|
@@ -6734,14 +6826,20 @@ export declare interface IUiComboboxState {
|
|
|
6734
6826
|
selectOption: (option: IUiComboboxOption, index?: number) => void;
|
|
6735
6827
|
isOpen: boolean;
|
|
6736
6828
|
setIsOpen: (isOpen: boolean) => void;
|
|
6737
|
-
|
|
6738
|
-
|
|
6829
|
+
/**
|
|
6830
|
+
* Drives popup visibility. Sync combobox sets it to `availableOptions.length > 0`;
|
|
6831
|
+
* async sources keep it `true` so status rows (loading / error / no-match) can show.
|
|
6832
|
+
*/
|
|
6833
|
+
shouldRenderPopup: boolean;
|
|
6834
|
+
/** Anchor for the popup — typically the input's outer wrapper, so the popup matches the visible field width. */
|
|
6835
|
+
anchorRef: RefObject<HTMLElement | null>;
|
|
6739
6836
|
registerItemRef: (node: HTMLElement | null, index: number) => void;
|
|
6740
|
-
getReferenceProps: UseInteractionsReturn["getReferenceProps"];
|
|
6741
|
-
getFloatingProps: UseInteractionsReturn["getFloatingProps"];
|
|
6742
|
-
getItemProps: UseInteractionsReturn["getItemProps"];
|
|
6743
|
-
floatingStyles: CSSProperties;
|
|
6744
6837
|
creatable: boolean;
|
|
6838
|
+
/**
|
|
6839
|
+
* Stable id of the `<ul role="listbox">`. The input advertises it via
|
|
6840
|
+
* `aria-controls`; the listbox sets it as its `id`.
|
|
6841
|
+
*/
|
|
6842
|
+
listboxId: string;
|
|
6745
6843
|
}
|
|
6746
6844
|
|
|
6747
6845
|
/**
|
|
@@ -7119,6 +7217,19 @@ export declare interface IUiFloatingElementProps {
|
|
|
7119
7217
|
onPlacementChange?: (placement: Placement) => void;
|
|
7120
7218
|
}
|
|
7121
7219
|
|
|
7220
|
+
/**
|
|
7221
|
+
* Props passed through to `UiFloatingElement`. The `Omit` narrows the surface
|
|
7222
|
+
* away from props the canonical panel chrome owns or doesn't want callers to
|
|
7223
|
+
* tune (`className` / `contentClassName` — chrome is bundled; positioning
|
|
7224
|
+
* knobs reserved for low-level use).
|
|
7225
|
+
*
|
|
7226
|
+
* @internal
|
|
7227
|
+
*/
|
|
7228
|
+
export declare interface IUiFloatingPanelProps extends Omit<IUiFloatingElementProps, "className" | "contentClassName" | "strategy" | "autoFlip" | "maxWidth" | "maxHeight" | "onPlacementChange"> {
|
|
7229
|
+
/** Vertical padding bundled with the panel chrome. Defaults to `"none"`. */
|
|
7230
|
+
padding?: UiFloatingPanelPadding;
|
|
7231
|
+
}
|
|
7232
|
+
|
|
7122
7233
|
/**
|
|
7123
7234
|
* @internal
|
|
7124
7235
|
*/
|
|
@@ -8460,6 +8571,17 @@ export declare interface IUiTextInputProps {
|
|
|
8460
8571
|
onClick?: MouseEventHandler<HTMLInputElement>;
|
|
8461
8572
|
/** Test id forwarded to the input element. */
|
|
8462
8573
|
dataTestId?: string;
|
|
8574
|
+
inputRef?: Ref<HTMLInputElement>;
|
|
8575
|
+
/** Use as the floating-popup anchor when the popup should match the full field width. */
|
|
8576
|
+
wrapperRef?: Ref<HTMLDivElement>;
|
|
8577
|
+
name?: string;
|
|
8578
|
+
/**
|
|
8579
|
+
* Browser-autofill control. Combobox/autocomplete patterns should set
|
|
8580
|
+
* `"off"` so the native dropdown doesn't overlap the listbox.
|
|
8581
|
+
*/
|
|
8582
|
+
autoComplete?: string;
|
|
8583
|
+
autoCapitalize?: string;
|
|
8584
|
+
autoCorrect?: string;
|
|
8463
8585
|
}
|
|
8464
8586
|
|
|
8465
8587
|
/**
|
|
@@ -10045,6 +10167,14 @@ export declare function UiAsyncTableTitle({ title, onSearch, renderIcon, actions
|
|
|
10045
10167
|
*/
|
|
10046
10168
|
export declare type UiAsyncTableVariant = "regular" | "small";
|
|
10047
10169
|
|
|
10170
|
+
/**
|
|
10171
|
+
* Async autocomplete: text input + sectioned listbox driven by a `loadOptions`
|
|
10172
|
+
* loader. Implements the ARIA combobox+listbox APG pattern.
|
|
10173
|
+
*
|
|
10174
|
+
* @internal
|
|
10175
|
+
*/
|
|
10176
|
+
export declare function UiAutocomplete<T extends IUiAutocompleteOption = IUiAutocompleteOption>({ loadOptions, selectedIds, onSelect, debounceMs, messages, accessibilityConfig, dataTestId }: IUiAutocompleteProps<T>): JSX.Element;
|
|
10177
|
+
|
|
10048
10178
|
/**
|
|
10049
10179
|
* Wrapper that focuses the first focusable child when it mounts, or when `refocusKey` changes.
|
|
10050
10180
|
*
|
|
@@ -10155,11 +10285,13 @@ export declare function UiChip({ label, tag, isDeletable, isActive, isLocked, is
|
|
|
10155
10285
|
*/
|
|
10156
10286
|
export declare function UiCombobox({ children, ...props }: IUiComboboxProps): JSX.Element;
|
|
10157
10287
|
|
|
10158
|
-
/**
|
|
10159
|
-
|
|
10160
|
-
|
|
10161
|
-
|
|
10162
|
-
|
|
10288
|
+
/**
|
|
10289
|
+
* Binds `UiTextInput` to the surrounding `UiCombobox` state: value, keyboard
|
|
10290
|
+
* handler, open/close, ARIA combobox+listbox attributes.
|
|
10291
|
+
*
|
|
10292
|
+
* @internal
|
|
10293
|
+
*/
|
|
10294
|
+
export declare const UiComboboxInput: ForwardRefExoticComponent<IUiComboboxInputProps & RefAttributes<HTMLInputElement>>;
|
|
10163
10295
|
|
|
10164
10296
|
/** @internal */
|
|
10165
10297
|
export declare function UiComboboxList({ children, className, ...htmlProps }: IUiComboboxListProps): JSX.Element;
|
|
@@ -10167,33 +10299,20 @@ export declare function UiComboboxList({ children, className, ...htmlProps }: IU
|
|
|
10167
10299
|
/** @internal */
|
|
10168
10300
|
export declare function UiComboboxListItem(props: IUiComboboxListItemProps): JSX.Element;
|
|
10169
10301
|
|
|
10170
|
-
/**
|
|
10171
|
-
* Renders the "creatable" label suffix within a combobox list item.
|
|
10172
|
-
* Use this component for composable customization of list item content.
|
|
10173
|
-
*
|
|
10174
|
-
* @internal
|
|
10175
|
-
*/
|
|
10302
|
+
/** @internal */
|
|
10176
10303
|
export declare function UiComboboxListItemCreatableLabel(props: UiComboboxListItemCreatableLabelProps): JSX.Element;
|
|
10177
10304
|
|
|
10178
10305
|
/** @internal */
|
|
10179
10306
|
export declare type UiComboboxListItemCreatableLabelProps = HTMLAttributes<HTMLSpanElement>;
|
|
10180
10307
|
|
|
10181
|
-
/**
|
|
10182
|
-
* Renders the primary label content within a combobox list item.
|
|
10183
|
-
* Use this component for composable customization of list item content.
|
|
10184
|
-
*
|
|
10185
|
-
* @internal
|
|
10186
|
-
*/
|
|
10308
|
+
/** @internal */
|
|
10187
10309
|
export declare function UiComboboxListItemLabel(props: UiComboboxListItemLabelProps): JSX.Element;
|
|
10188
10310
|
|
|
10189
10311
|
/** @internal */
|
|
10190
10312
|
export declare type UiComboboxListItemLabelProps = HTMLAttributes<HTMLSpanElement>;
|
|
10191
10313
|
|
|
10192
10314
|
/** @internal */
|
|
10193
|
-
export declare function UiComboboxPopup({
|
|
10194
|
-
|
|
10195
|
-
/** @internal */
|
|
10196
|
-
export declare type UiComboboxPopupProps = HTMLAttributes<HTMLDivElement>;
|
|
10315
|
+
export declare function UiComboboxPopup({ children, style }: IUiComboboxPopupProps): JSX.Element | null;
|
|
10197
10316
|
|
|
10198
10317
|
/**
|
|
10199
10318
|
* Modal confirm dialog used for actions that need explicit user confirmation
|
|
@@ -10326,6 +10445,22 @@ export declare function UiErrorPage({ title, description, dataTestId, accessibil
|
|
|
10326
10445
|
*/
|
|
10327
10446
|
export declare function UiFloatingElement({ children, anchor, isOpen, onClose, placement, alignPoints, strategy, offset, autoFlip, closeOnOutsideClick, closeOnEscape, closeOnParentScroll, closeOnMouseDrag, ignoreClicksOn, shouldCloseOnClick, zIndex: zIndexProp, className, contentClassName, style, width, maxWidth, maxHeight, accessibilityConfig, onPlacementChange }: IUiFloatingElementProps): JSX.Element | null;
|
|
10328
10447
|
|
|
10448
|
+
/**
|
|
10449
|
+
* `UiFloatingElement` plus the kit's canonical popup chrome (background,
|
|
10450
|
+
* border-radius, shadow). Shared surface for dropdowns, comboboxes, pickers.
|
|
10451
|
+
*
|
|
10452
|
+
* @internal
|
|
10453
|
+
*/
|
|
10454
|
+
export declare function UiFloatingPanel({ children, padding, ...rest }: IUiFloatingPanelProps): JSX.Element;
|
|
10455
|
+
|
|
10456
|
+
/**
|
|
10457
|
+
* - `"none"` — content owns its own padding.
|
|
10458
|
+
* - `"listbox"` — `4px 0` so listbox-style popups breathe at top/bottom.
|
|
10459
|
+
*
|
|
10460
|
+
* @internal
|
|
10461
|
+
*/
|
|
10462
|
+
export declare type UiFloatingPanelPadding = "none" | "listbox";
|
|
10463
|
+
|
|
10329
10464
|
/**
|
|
10330
10465
|
* @internal
|
|
10331
10466
|
*/
|
|
@@ -10691,7 +10826,7 @@ export declare function UiTags({ tags, tagOptions, addLabel, nameLabel, cancelLa
|
|
|
10691
10826
|
*
|
|
10692
10827
|
* @internal
|
|
10693
10828
|
*/
|
|
10694
|
-
export declare function UiTextInput({ type, value, onChange, label, placeholder, iconBefore, iconAfter, onIconAfter, accessibilityConfig, disabled, autoFocus, onKeyDown, onFocus, onBlur, onClick, dataTestId }: IUiTextInputProps): JSX.Element;
|
|
10829
|
+
export declare function UiTextInput({ type, value, onChange, label, placeholder, iconBefore, iconAfter, onIconAfter, accessibilityConfig, disabled, autoFocus, onKeyDown, onFocus, onBlur, onClick, dataTestId, inputRef, wrapperRef, name, autoComplete, autoCapitalize, autoCorrect }: IUiTextInputProps): JSX.Element;
|
|
10695
10830
|
|
|
10696
10831
|
/**
|
|
10697
10832
|
* Interpolation values accepted by `react-intl`'s `formatMessage`, **narrowed
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gooddata/sdk-ui-kit",
|
|
3
|
-
"version": "11.42.0-alpha.
|
|
3
|
+
"version": "11.42.0-alpha.3",
|
|
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.1",
|
|
78
|
-
"@gooddata/sdk-backend-spi": "11.42.0-alpha.
|
|
79
|
-
"@gooddata/sdk-model": "11.42.0-alpha.
|
|
80
|
-
"@gooddata/sdk-ui": "11.42.0-alpha.
|
|
81
|
-
"@gooddata/sdk-ui-theme-provider": "11.42.0-alpha.
|
|
82
|
-
"@gooddata/util": "11.42.0-alpha.
|
|
78
|
+
"@gooddata/sdk-backend-spi": "11.42.0-alpha.3",
|
|
79
|
+
"@gooddata/sdk-model": "11.42.0-alpha.3",
|
|
80
|
+
"@gooddata/sdk-ui": "11.42.0-alpha.3",
|
|
81
|
+
"@gooddata/sdk-ui-theme-provider": "11.42.0-alpha.3",
|
|
82
|
+
"@gooddata/util": "11.42.0-alpha.3"
|
|
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.8",
|
|
130
130
|
"vitest-dom": "0.1.1",
|
|
131
|
-
"@gooddata/eslint-config": "11.42.0-alpha.
|
|
132
|
-
"@gooddata/oxlint-config": "11.42.0-alpha.
|
|
133
|
-
"@gooddata/
|
|
134
|
-
"@gooddata/
|
|
135
|
-
"@gooddata/
|
|
131
|
+
"@gooddata/eslint-config": "11.42.0-alpha.3",
|
|
132
|
+
"@gooddata/oxlint-config": "11.42.0-alpha.3",
|
|
133
|
+
"@gooddata/reference-workspace": "11.42.0-alpha.3",
|
|
134
|
+
"@gooddata/sdk-backend-mockingbird": "11.42.0-alpha.3",
|
|
135
|
+
"@gooddata/stylelint-config": "11.42.0-alpha.3"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {
|
|
138
138
|
"react": "^18.0.0 || ^19.0.0",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
.gd-ui-kit-autocomplete {
|
|
2
|
+
position: relative;
|
|
3
|
+
|
|
4
|
+
&__list {
|
|
5
|
+
margin: 0;
|
|
6
|
+
padding: 0;
|
|
7
|
+
list-style: none;
|
|
8
|
+
max-height: 320px;
|
|
9
|
+
overflow-y: auto;
|
|
10
|
+
overscroll-behavior: contain;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
&__section-header {
|
|
14
|
+
padding: 4px 12px;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&__option {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: baseline;
|
|
20
|
+
gap: 6px;
|
|
21
|
+
padding: 6px 12px;
|
|
22
|
+
line-height: 20px;
|
|
23
|
+
cursor: pointer;
|
|
24
|
+
|
|
25
|
+
&--isActive {
|
|
26
|
+
background: var(--gd-palette-complementary-2);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
&:hover {
|
|
30
|
+
background: var(--gd-palette-complementary-2);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
&__option-label {
|
|
35
|
+
color: var(--gd-palette-complementary-9);
|
|
36
|
+
font-size: 14px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
&__option-secondary {
|
|
40
|
+
color: var(--gd-palette-complementary-6);
|
|
41
|
+
font-size: 12px;
|
|
42
|
+
overflow: hidden;
|
|
43
|
+
text-overflow: ellipsis;
|
|
44
|
+
white-space: nowrap;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
&__state {
|
|
48
|
+
padding: 12px;
|
|
49
|
+
color: var(--gd-palette-complementary-6);
|
|
50
|
+
font-size: 14px;
|
|
51
|
+
text-align: center;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -58,22 +58,6 @@
|
|
|
58
58
|
}
|
|
59
59
|
}
|
|
60
60
|
|
|
61
|
-
&__popup {
|
|
62
|
-
background-color: variables.$gd-color-white;
|
|
63
|
-
border: 1px solid variables.$gd-border-color;
|
|
64
|
-
@include mixins.border-radius(8px);
|
|
65
|
-
@include mixins.box-shadow(0 16px 32px rgb(12 23 31 / 16%));
|
|
66
|
-
|
|
67
|
-
overflow: hidden;
|
|
68
|
-
padding: 4px 0;
|
|
69
|
-
max-width: 480px;
|
|
70
|
-
z-index: 10;
|
|
71
|
-
|
|
72
|
-
@media #{variables.$small-only} {
|
|
73
|
-
max-width: 100vw;
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
|
|
77
61
|
&__list {
|
|
78
62
|
list-style: none;
|
|
79
63
|
margin: 0;
|
|
@@ -1,25 +1,6 @@
|
|
|
1
|
-
// (C) 2025 GoodData Corporation
|
|
2
|
-
|
|
3
|
-
@use "../../../styles/scss/variables";
|
|
1
|
+
// (C) 2025-2026 GoodData Corporation
|
|
4
2
|
|
|
5
3
|
.gd-ui-kit-dropdown {
|
|
6
|
-
&__body {
|
|
7
|
-
position: relative;
|
|
8
|
-
border-radius: 3px;
|
|
9
|
-
font-family: var(--gd-font-family), gdcustomfont, Avenir, "Helvetica Neue", arial, sans-serif;
|
|
10
|
-
background-color: var(--gd-palette-complementary-0, #fff);
|
|
11
|
-
box-shadow: 0 1px 20px var(--gd-shadow-color, rgba(20, 56, 93, 0.15));
|
|
12
|
-
|
|
13
|
-
@media (forced-colors: active) {
|
|
14
|
-
// stylelint-disable-next-line declaration-no-important
|
|
15
|
-
border: 1px solid transparent !important;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
@media #{variables.$small-only} {
|
|
19
|
-
border-radius: 0;
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
4
|
&__button {
|
|
24
5
|
&--fullWidth {
|
|
25
6
|
width: 100%;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// (C) 2026 GoodData Corporation
|
|
2
|
+
|
|
3
|
+
@use "../../../styles/scss/variables";
|
|
4
|
+
|
|
5
|
+
// Canonical kit floating-panel chrome. Used by dropdowns, comboboxes, and any
|
|
6
|
+
// other primitive that renders a list-shaped popup over the current view.
|
|
7
|
+
.gd-ui-kit-floating-panel {
|
|
8
|
+
position: relative;
|
|
9
|
+
background-color: var(--gd-palette-complementary-0, #fff);
|
|
10
|
+
border-radius: 3px;
|
|
11
|
+
box-shadow: 0 1px 20px var(--gd-shadow-color, rgba(20, 56, 93, 0.15));
|
|
12
|
+
font-family: var(--gd-font-family), gdcustomfont, Avenir, "Helvetica Neue", arial, sans-serif;
|
|
13
|
+
|
|
14
|
+
@media (forced-colors: active) {
|
|
15
|
+
// stylelint-disable-next-line declaration-no-important
|
|
16
|
+
border: 1px solid transparent !important;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
@media #{variables.$small-only} {
|
|
20
|
+
border-radius: 0;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// Listbox-style padding for popups whose direct children are option rows.
|
|
24
|
+
&--padding-listbox {
|
|
25
|
+
padding: 4px 0;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -60,6 +60,14 @@ $popover_footer_gap: 10px;
|
|
|
60
60
|
&:empty {
|
|
61
61
|
display: none;
|
|
62
62
|
}
|
|
63
|
+
|
|
64
|
+
// `align-items: flex-start` shrinks block children to intrinsic width.
|
|
65
|
+
// Stretch direct UiTextInput descendants — combobox listboxes anchor
|
|
66
|
+
// to the text-input wrapper and a too-narrow anchor produces a too-
|
|
67
|
+
// narrow popup.
|
|
68
|
+
> .gd-ui-kit-text-input {
|
|
69
|
+
width: 100%;
|
|
70
|
+
}
|
|
63
71
|
}
|
|
64
72
|
|
|
65
73
|
&__footer {
|
|
@@ -49,16 +49,20 @@
|
|
|
49
49
|
flex: 1 1 auto;
|
|
50
50
|
min-width: 0;
|
|
51
51
|
height: 100%;
|
|
52
|
-
padding
|
|
52
|
+
// 2px sits on top of the field's 7px padding so text isn't flush to the border.
|
|
53
|
+
padding: 0 0 0 2px;
|
|
53
54
|
border: none;
|
|
54
55
|
background: transparent;
|
|
55
56
|
font-family: inherit;
|
|
56
57
|
font-size: 14px;
|
|
58
|
+
line-height: 22px;
|
|
57
59
|
color: var(--gd-palette-complementary-8);
|
|
58
60
|
outline: none;
|
|
59
61
|
|
|
60
62
|
&::placeholder {
|
|
61
|
-
|
|
63
|
+
// `opacity` not `rgba(var(...))` so theme overrides of complementary-7 still apply.
|
|
64
|
+
color: var(--gd-palette-complementary-7);
|
|
65
|
+
opacity: 0.75;
|
|
62
66
|
}
|
|
63
67
|
|
|
64
68
|
&:disabled {
|
package/src/@ui/index.scss
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
@use "./UiChip/UiChip.scss";
|
|
11
11
|
@use "./UiControlButton/UiControlButton.scss";
|
|
12
12
|
@use "./UiCombobox/UiCombobox.scss";
|
|
13
|
+
@use "./UiAutocomplete/UiAutocomplete.scss";
|
|
13
14
|
@use "./UiListbox/UiListbox.scss";
|
|
14
15
|
@use "./UiTreeview/UiTreeview.scss";
|
|
15
16
|
@use "./UiMenu/UiMenu.scss";
|
|
@@ -27,6 +28,7 @@
|
|
|
27
28
|
@use "./UiCard/UiCard.scss";
|
|
28
29
|
@use "./UiSubmenuHeader/UiSubmenuHeader.scss";
|
|
29
30
|
@use "./UiDropdown/UiDropdown.scss";
|
|
31
|
+
@use "./UiFloatingPanel/UiFloatingPanel.scss";
|
|
30
32
|
@use "./UiBreadcrumb/UiBreadcrumb.scss";
|
|
31
33
|
@use "./UiInlineTextGenerator/UiInlineTextGenerator.scss";
|
|
32
34
|
@use "./UiErrorPage/UiErrorPage.scss";
|