@gooddata/sdk-ui-kit 11.51.0-alpha.0 → 11.51.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.d.ts +3 -2
- package/esm/@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.d.ts.map +1 -1
- package/esm/@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.js +7 -3
- package/esm/@ui/UiGranteeAsyncPicker/UiGranteeAsyncPicker.d.ts +5 -0
- package/esm/@ui/UiGranteeAsyncPicker/UiGranteeAsyncPicker.d.ts.map +1 -1
- package/esm/@ui/UiGranteeAsyncPicker/UiGranteeAsyncPicker.js +3 -5
- package/esm/@ui/UiGranteeRowControls/UiGranteeRowControls.d.ts +10 -16
- package/esm/@ui/UiGranteeRowControls/UiGranteeRowControls.d.ts.map +1 -1
- package/esm/@ui/UiGranteeRowControls/UiGranteeRowControls.js +19 -32
- package/esm/@ui/UiLabelsChecklist/UiLabelsChecklist.d.ts +3 -1
- package/esm/@ui/UiLabelsChecklist/UiLabelsChecklist.d.ts.map +1 -1
- package/esm/@ui/UiLabelsChecklist/UiLabelsChecklist.js +12 -3
- package/esm/@ui/UiObjectShareDialog/UiObjectShareDialogCard.d.ts +9 -3
- package/esm/@ui/UiObjectShareDialog/UiObjectShareDialogCard.d.ts.map +1 -1
- package/esm/@ui/UiObjectShareDialog/UiObjectShareDialogCard.js +3 -3
- package/esm/@ui/UiPermissionMenu/UiPermissionMenu.d.ts +18 -10
- package/esm/@ui/UiPermissionMenu/UiPermissionMenu.d.ts.map +1 -1
- package/esm/@ui/UiPermissionMenu/UiPermissionMenu.js +45 -13
- package/esm/@ui/UiSubmenuHeader/UiSubmenuHeader.d.ts +4 -2
- package/esm/@ui/UiSubmenuHeader/UiSubmenuHeader.d.ts.map +1 -1
- package/esm/@ui/UiSubmenuHeader/UiSubmenuHeader.js +2 -2
- package/esm/@ui/hooks/useCloseOnEscape.d.ts +4 -1
- package/esm/@ui/hooks/useCloseOnEscape.d.ts.map +1 -1
- package/esm/@ui/hooks/useCloseOnEscape.js +11 -5
- package/esm/List/InvertableSelect/InvertableSelectVirtualised.d.ts.map +1 -1
- package/esm/List/InvertableSelect/InvertableSelectVirtualised.js +4 -1
- package/esm/ParameterControl/StringParameterControlDropdown.js +2 -2
- package/esm/Timezone/TimezoneSelect.d.ts +108 -0
- package/esm/Timezone/TimezoneSelect.d.ts.map +1 -0
- package/esm/Timezone/TimezoneSelect.js +90 -0
- package/esm/Timezone/timezones.d.ts +86 -0
- package/esm/Timezone/timezones.d.ts.map +1 -0
- package/esm/Timezone/timezones.js +253 -0
- package/esm/index.d.ts +3 -2
- package/esm/index.d.ts.map +1 -1
- package/esm/index.js +3 -2
- package/esm/locales.d.ts +9 -6
- package/esm/locales.d.ts.map +1 -1
- package/esm/locales.js +4 -3
- package/esm/sdk-ui-kit.d.ts +242 -62
- package/package.json +11 -11
- package/src/@ui/UiGranteeRowControls/UiGranteeRowControls.scss +0 -8
- package/src/@ui/UiLabelsChecklist/UiLabelsChecklist.scss +2 -2
- package/src/@ui/UiPermissionMenu/UiPermissionMenu.scss +5 -0
- package/src/@ui/index.scss +0 -1
- package/src/Timezone/TimezoneSelect.scss +22 -0
- package/styles/css/button.css.map +1 -1
- package/styles/css/header.css +3 -3
- package/styles/css/header.css.map +1 -1
- package/styles/css/main.css +192 -187
- package/styles/css/main.css.map +1 -1
- package/styles/scss/Button/_mixins.scss +5 -157
- package/styles/scss/Button/_placeholders.scss +169 -0
- package/styles/scss/button.scss +1 -0
- package/styles/scss/header.scss +8 -3
- package/styles/scss/main.scss +1 -0
- package/esm/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.d.ts +0 -28
- package/esm/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.d.ts.map +0 -1
- package/esm/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.js +0 -85
- package/src/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.scss +0 -10
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
// (C) 2007-2026 GoodData Corporation
|
|
2
|
+
@use "../mixins.scss";
|
|
3
|
+
@use "_variables" as button-variables;
|
|
4
|
+
@use "../variables";
|
|
5
|
+
|
|
6
|
+
// ==========================================================================
|
|
7
|
+
// Silent classes - more clever mixins
|
|
8
|
+
// ==========================================================================
|
|
9
|
+
//
|
|
10
|
+
// Keep placeholders out of Button/_mixins.scss. A stylesheet that is pulled in through
|
|
11
|
+
// legacy `@import` gets its own import context, and every module `@use`d below it is
|
|
12
|
+
// re-evaluated in that context — so a placeholder extended by button.scss is emitted once
|
|
13
|
+
// per import context. In an entry point that `@import`s several SDK packages (the Modeler's
|
|
14
|
+
// app.scss) the extra copies land after the variant rules and reset them at equal
|
|
15
|
+
// specificity, e.g. `border: 1px solid transparent` overriding `.gd-button-secondary`'s
|
|
16
|
+
// border-color (LX-2773). Only button.scss should load this file; anything that needs a
|
|
17
|
+
// button mixin loads Button/mixins, which stays placeholder-free and therefore emits no CSS.
|
|
18
|
+
|
|
19
|
+
%btn {
|
|
20
|
+
position: relative;
|
|
21
|
+
display: inline-flex;
|
|
22
|
+
justify-content: space-between;
|
|
23
|
+
align-items: center;
|
|
24
|
+
padding: 5px 14px;
|
|
25
|
+
border: 1px solid transparent;
|
|
26
|
+
font: 400 14px/20px variables.$gd-font-primary;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
vertical-align: middle;
|
|
29
|
+
cursor: pointer;
|
|
30
|
+
text-align: left;
|
|
31
|
+
border-radius: button-variables.$button-border-radius;
|
|
32
|
+
text-transform: button-variables.$button-text-capitalization;
|
|
33
|
+
|
|
34
|
+
@include mixins.transition(all, 0.25s, ease-in-out);
|
|
35
|
+
|
|
36
|
+
&::before,
|
|
37
|
+
&::after {
|
|
38
|
+
position: absolute;
|
|
39
|
+
top: 50%;
|
|
40
|
+
height: 20px;
|
|
41
|
+
line-height: 20px;
|
|
42
|
+
color: variables.$gd-color-text-dimmed;
|
|
43
|
+
transform: translateY(-50%);
|
|
44
|
+
font-size: 18px;
|
|
45
|
+
text-align: center;
|
|
46
|
+
|
|
47
|
+
@include mixins.transition(color, 0.25s, ease-in-out);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&::before {
|
|
51
|
+
left: 10px;
|
|
52
|
+
margin-right: 0.5em;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
&::after {
|
|
56
|
+
right: 7px;
|
|
57
|
+
margin-left: 0.5em;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.gd-button-text,
|
|
61
|
+
.gd-button-icon {
|
|
62
|
+
position: relative;
|
|
63
|
+
display: block;
|
|
64
|
+
justify-content: space-between;
|
|
65
|
+
align-items: center;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.gd-button-text {
|
|
69
|
+
top: 1px;
|
|
70
|
+
flex: 1 1 auto;
|
|
71
|
+
overflow: hidden;
|
|
72
|
+
width: 100%;
|
|
73
|
+
text-overflow: ellipsis;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.gd-button-icon {
|
|
77
|
+
flex: 0 0 auto;
|
|
78
|
+
width: button-variables.$button-icon-width;
|
|
79
|
+
height: button-variables.$button-icon-width;
|
|
80
|
+
margin: 0 0.5em;
|
|
81
|
+
line-height: button-variables.$button-icon-width;
|
|
82
|
+
color: variables.$gd-color-text-dimmed;
|
|
83
|
+
font-size: button-variables.$button-icon-width;
|
|
84
|
+
text-align: center;
|
|
85
|
+
text-decoration: none;
|
|
86
|
+
background-size: contain;
|
|
87
|
+
background-repeat: no-repeat;
|
|
88
|
+
background-position: center;
|
|
89
|
+
|
|
90
|
+
&::before,
|
|
91
|
+
&::after {
|
|
92
|
+
color: inherit;
|
|
93
|
+
|
|
94
|
+
@include mixins.transition(color, 0.25s, ease-in-out);
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
&:not(.gd-button-link) .gd-button-icon {
|
|
99
|
+
&:first-child {
|
|
100
|
+
margin-left: -4px;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
&:last-child {
|
|
104
|
+
margin-right: -4px;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
&:only-child {
|
|
108
|
+
width: 19px;
|
|
109
|
+
height: 17px;
|
|
110
|
+
line-height: 17px;
|
|
111
|
+
margin-right: -9px;
|
|
112
|
+
margin-left: -9px;
|
|
113
|
+
font-size: 16px;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
&:not(.disabled):not(.gd-button-link) {
|
|
118
|
+
&:active {
|
|
119
|
+
&::before,
|
|
120
|
+
&::after {
|
|
121
|
+
top: calc(50% + 1px);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.gd-button-text {
|
|
125
|
+
top: 2px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.gd-button-icon {
|
|
129
|
+
margin-top: 2px;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.gd-button-icon {
|
|
134
|
+
&:only-child {
|
|
135
|
+
color: button-variables.$button-normal-color;
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:hover {
|
|
141
|
+
&::before,
|
|
142
|
+
&::after,
|
|
143
|
+
.gd-button-icon {
|
|
144
|
+
color: button-variables.$button-action-color;
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:focus-visible {
|
|
149
|
+
transition: none;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&[class*="gd-icon-"] {
|
|
153
|
+
padding-left: 37px;
|
|
154
|
+
|
|
155
|
+
&.gd-icon-right {
|
|
156
|
+
padding-left: 11px;
|
|
157
|
+
padding-right: 32px;
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
// Temporary:
|
|
163
|
+
// refactor
|
|
164
|
+
// stylelint-disable-next-line no-duplicate-selectors
|
|
165
|
+
%btn {
|
|
166
|
+
.ss-icon {
|
|
167
|
+
vertical-align: middle;
|
|
168
|
+
}
|
|
169
|
+
}
|
package/styles/scss/button.scss
CHANGED
package/styles/scss/header.scss
CHANGED
|
@@ -519,7 +519,10 @@ a.gd-list-help-menu-item.gd-list-item {
|
|
|
519
519
|
}
|
|
520
520
|
|
|
521
521
|
.gd-header-chat {
|
|
522
|
-
|
|
522
|
+
// Follow the header foreground colour instead of hardcoding white, which was only correct
|
|
523
|
+
// while the header was always black. `.gd-header-button` sets `color: inherit`, so this
|
|
524
|
+
// resolves to the (themeable) colour AppHeader puts on the header root.
|
|
525
|
+
--gd-icon-fill-color: currentColor;
|
|
523
526
|
height: 100%;
|
|
524
527
|
margin: 0;
|
|
525
528
|
width: 32px;
|
|
@@ -685,12 +688,14 @@ a.gd-list-help-menu-item.gd-list-item {
|
|
|
685
688
|
.anchor-tag-header-help,
|
|
686
689
|
.anchor-tag-header-help:active,
|
|
687
690
|
.anchor-tag-header-help:focus {
|
|
688
|
-
|
|
691
|
+
// Inherit the themeable header foreground rather than hardcoding white. Applies only when
|
|
692
|
+
// `helpRedirectUrl` is configured (see HeaderHelp.tsx); the dropdown variant never had this rule.
|
|
693
|
+
color: inherit;
|
|
689
694
|
opacity: 0.8;
|
|
690
695
|
text-decoration: none;
|
|
691
696
|
|
|
692
697
|
&:hover {
|
|
693
|
-
color:
|
|
698
|
+
color: inherit;
|
|
694
699
|
text-decoration: none;
|
|
695
700
|
opacity: 1;
|
|
696
701
|
}
|
package/styles/scss/main.scss
CHANGED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type IUiLabelsChecklistItem } from "../UiLabelsChecklist/UiLabelsChecklist.js";
|
|
2
|
-
/**
|
|
3
|
-
* @internal
|
|
4
|
-
*/
|
|
5
|
-
export interface IUiMoreOptionsMenuProps {
|
|
6
|
-
/** Empty/omitted hides the "Manage labels access" row (e.g. facts have no labels). */
|
|
7
|
-
labels?: ReadonlyArray<IUiLabelsChecklistItem>;
|
|
8
|
-
/** Locked items are always treated as selected. */
|
|
9
|
-
selectedLabelIds?: ReadonlyArray<string>;
|
|
10
|
-
onLabelsChange?: (selectedIds: string[]) => void;
|
|
11
|
-
/**
|
|
12
|
-
* Omit to hide the row. Used for read-only permission rows (e.g. EDIT), whose
|
|
13
|
-
* level control has no dropdown to host Remove access — so the action lives here.
|
|
14
|
-
*/
|
|
15
|
-
onRemoveAccess?: () => void;
|
|
16
|
-
isDisabled?: boolean;
|
|
17
|
-
dataTestId?: string;
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Per-grantee "⋯" menu: "Manage labels access" (drills into {@link UiLabelsChecklist})
|
|
21
|
-
* and "Remove access". Each row shows only when its data/handler is given. Remove
|
|
22
|
-
* access appears here for read-only permission rows whose level control has no
|
|
23
|
-
* dropdown to host it.
|
|
24
|
-
*
|
|
25
|
-
* @internal
|
|
26
|
-
*/
|
|
27
|
-
export declare function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, onRemoveAccess, isDisabled, dataTestId }: IUiMoreOptionsMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
//# sourceMappingURL=UiMoreOptionsMenu.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"UiMoreOptionsMenu.d.ts","sourceRoot":"","sources":["../../../src/@ui/UiMoreOptionsMenu/UiMoreOptionsMenu.tsx"],"names":[],"mappings":"AAUA,OAAO,EAAE,KAAK,sBAAsB,EAAqB,MAAM,2CAA2C,CAAC;AAO3G;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACpC,sFAAsF;IACtF,MAAM,CAAC,EAAE,aAAa,CAAC,sBAAsB,CAAC,CAAC;IAC/C,mDAAmD;IACnD,gBAAgB,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IACzC,cAAc,CAAC,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACjD;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACvB;AAuCD;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAAC,EAC9B,MAAM,EACN,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,UAAU,EACV,UAAU,EACb,EAAE,uBAAuB,2CAwFzB"}
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
// (C) 2026 GoodData Corporation
|
|
3
|
-
import { useId, useMemo, useRef } from "react";
|
|
4
|
-
import { useIntl } from "react-intl";
|
|
5
|
-
import { olpPermissionMessages } from "../../locales.js";
|
|
6
|
-
import { bem } from "../@utils/bem.js";
|
|
7
|
-
import { UiIcon } from "../UiIcon/UiIcon.js";
|
|
8
|
-
import { UiIconButton } from "../UiIconButton/UiIconButton.js";
|
|
9
|
-
import { UiLabelsChecklist } from "../UiLabelsChecklist/UiLabelsChecklist.js";
|
|
10
|
-
import { UiMenu } from "../UiMenu/UiMenu.js";
|
|
11
|
-
import { UiPopover } from "../UiPopover/UiPopover.js";
|
|
12
|
-
const { b } = bem("gd-ui-kit-more-options-menu");
|
|
13
|
-
// Defined at module scope, and reading data through a ref, so its identity never
|
|
14
|
-
// changes across renders — UiMenu remounts the drill-in on a new component type,
|
|
15
|
-
// which would drop the checklist's staged edits.
|
|
16
|
-
function LabelsChecklistContent({ onBack, onClose, dataRef }) {
|
|
17
|
-
const data = dataRef.current;
|
|
18
|
-
return (_jsx(UiLabelsChecklist, { items: data.labels, defaultSelectedIds: data.selectedLabelIds, onApply: (ids) => data.onLabelsChange?.(ids), onBack: onBack, onClose: onClose, dataTestId: data.dataTestId }));
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Per-grantee "⋯" menu: "Manage labels access" (drills into {@link UiLabelsChecklist})
|
|
22
|
-
* and "Remove access". Each row shows only when its data/handler is given. Remove
|
|
23
|
-
* access appears here for read-only permission rows whose level control has no
|
|
24
|
-
* dropdown to host it.
|
|
25
|
-
*
|
|
26
|
-
* @internal
|
|
27
|
-
*/
|
|
28
|
-
export function UiMoreOptionsMenu({ labels, selectedLabelIds, onLabelsChange, onRemoveAccess, isDisabled, dataTestId, }) {
|
|
29
|
-
const intl = useIntl();
|
|
30
|
-
const menuId = useId();
|
|
31
|
-
const hasLabels = (labels?.length ?? 0) > 0;
|
|
32
|
-
// Feed the live inputs to the stable content component through a ref so the
|
|
33
|
-
// component itself never has to change (see LabelsChecklistContent).
|
|
34
|
-
const dataRef = useRef({
|
|
35
|
-
labels: labels ?? [],
|
|
36
|
-
selectedLabelIds: selectedLabelIds ?? [],
|
|
37
|
-
onLabelsChange,
|
|
38
|
-
dataTestId,
|
|
39
|
-
});
|
|
40
|
-
dataRef.current = {
|
|
41
|
-
labels: labels ?? [],
|
|
42
|
-
selectedLabelIds: selectedLabelIds ?? [],
|
|
43
|
-
onLabelsChange,
|
|
44
|
-
dataTestId,
|
|
45
|
-
};
|
|
46
|
-
const labelsContentRef = useRef(undefined);
|
|
47
|
-
if (!labelsContentRef.current) {
|
|
48
|
-
labelsContentRef.current = (props) => _jsx(LabelsChecklistContent, { ...props, dataRef: dataRef });
|
|
49
|
-
}
|
|
50
|
-
const items = useMemo(() => {
|
|
51
|
-
const result = [];
|
|
52
|
-
if (hasLabels) {
|
|
53
|
-
result.push({
|
|
54
|
-
type: "content",
|
|
55
|
-
id: "labels",
|
|
56
|
-
stringTitle: intl.formatMessage(olpPermissionMessages.labels),
|
|
57
|
-
showComponentOnly: true,
|
|
58
|
-
// UiMenu adds the trailing drill-in chevron itself; we only set the leading icon.
|
|
59
|
-
iconLeft: _jsx(UiIcon, { type: "ldmLabel", size: 16, color: "complementary-7" }),
|
|
60
|
-
data: undefined,
|
|
61
|
-
Component: labelsContentRef.current,
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
if (onRemoveAccess) {
|
|
65
|
-
result.push({
|
|
66
|
-
type: "interactive",
|
|
67
|
-
id: "remove",
|
|
68
|
-
stringTitle: intl.formatMessage(olpPermissionMessages.removeAccess),
|
|
69
|
-
iconLeft: _jsx(UiIcon, { type: "trash", size: 16, color: "complementary-7" }),
|
|
70
|
-
data: undefined,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
return result;
|
|
74
|
-
}, [hasLabels, onRemoveAccess, intl]);
|
|
75
|
-
return (_jsx(UiPopover, { anchor: _jsx(UiIconButton, { icon: "ellipsis", variant: "tertiary", size: "large", iconColor: "complementary-6", isDisabled: isDisabled, accessibilityConfig: {
|
|
76
|
-
ariaLabel: intl.formatMessage(olpPermissionMessages.moreOptionsAriaLabel),
|
|
77
|
-
} }), anchorAccessibilityConfig: { ariaHaspopup: "menu" }, width: 200, content: ({ onClose }) => (_jsx("div", { className: b(), "data-testid": dataTestId, children: _jsx(UiMenu, { items: items, size: "small", onSelect: (item) => {
|
|
78
|
-
if (item.id === "remove") {
|
|
79
|
-
onRemoveAccess?.();
|
|
80
|
-
}
|
|
81
|
-
}, onClose: onClose, ariaAttributes: {
|
|
82
|
-
id: menuId,
|
|
83
|
-
"aria-label": intl.formatMessage(olpPermissionMessages.moreOptionsMenuLabel),
|
|
84
|
-
} }) })) }));
|
|
85
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// (C) 2026 GoodData Corporation
|
|
2
|
-
|
|
3
|
-
// Cancel UiPopover.__content's 10px padding so the menu spans edge-to-edge.
|
|
4
|
-
|
|
5
|
-
.gd-ui-kit-more-options-menu {
|
|
6
|
-
align-self: stretch;
|
|
7
|
-
display: flex;
|
|
8
|
-
flex-direction: column;
|
|
9
|
-
margin: calc(-1 * var(--gd-spacing-10px));
|
|
10
|
-
}
|