@gooddata/sdk-ui-kit 11.39.0-alpha.3 → 11.39.0

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.
Files changed (46) hide show
  1. package/esm/@ui/@types/icon.d.ts +1 -1
  2. package/esm/@ui/UiAddGranteeDialog/UiAddGranteeDialog.d.ts +39 -0
  3. package/esm/@ui/UiAddGranteeDialog/UiAddGranteeDialog.js +30 -0
  4. package/esm/@ui/UiAvatar/UiAvatar.d.ts +40 -0
  5. package/esm/@ui/UiAvatar/UiAvatar.js +19 -0
  6. package/esm/@ui/UiButton/UiButton.d.ts +1 -1
  7. package/esm/@ui/UiDialogShell/UiDialogFooter.d.ts +1 -1
  8. package/esm/@ui/UiDialogShell/UiDialogHeader.d.ts +1 -1
  9. package/esm/@ui/UiDialogShell/UiDialogShell.d.ts +10 -10
  10. package/esm/@ui/UiDialogShell/UiDialogShell.js +2 -2
  11. package/esm/@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.d.ts +32 -0
  12. package/esm/@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.js +22 -0
  13. package/esm/@ui/UiGranteeAvatar/UiGranteeAvatar.d.ts +30 -0
  14. package/esm/@ui/UiGranteeAvatar/UiGranteeAvatar.js +25 -0
  15. package/esm/@ui/UiGranteeRow/UiGranteeRow.d.ts +26 -0
  16. package/esm/@ui/UiGranteeRow/UiGranteeRow.js +19 -0
  17. package/esm/@ui/UiIcon/icons.js +1 -0
  18. package/esm/@ui/UiMenu/hooks.js +2 -4
  19. package/esm/@ui/UiObjectShareDialog/UiObjectShareDialog.d.ts +57 -0
  20. package/esm/@ui/UiObjectShareDialog/UiObjectShareDialog.js +28 -0
  21. package/esm/@ui/UiRadio/UiRadio.d.ts +40 -0
  22. package/esm/@ui/UiRadio/UiRadio.js +23 -0
  23. package/esm/@ui/UiRadioRow/UiRadioRow.d.ts +33 -0
  24. package/esm/@ui/UiRadioRow/UiRadioRow.js +19 -0
  25. package/esm/@ui/UiTextInput/UiTextInput.d.ts +55 -0
  26. package/esm/@ui/UiTextInput/UiTextInput.js +24 -0
  27. package/esm/index.d.ts +9 -0
  28. package/esm/index.js +9 -0
  29. package/esm/locales.d.ts +61 -0
  30. package/esm/locales.js +27 -0
  31. package/esm/sdk-ui-kit.d.ts +374 -14
  32. package/package.json +11 -11
  33. package/src/@ui/UiAddGranteeDialog/UiAddGranteeDialog.scss +22 -0
  34. package/src/@ui/UiAvatar/UiAvatar.scss +22 -0
  35. package/src/@ui/UiDialogShell/UiDialogShell.scss +0 -1
  36. package/src/@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.scss +8 -0
  37. package/src/@ui/UiGranteeRow/UiGranteeRow.scss +36 -0
  38. package/src/@ui/UiObjectShareDialog/UiObjectShareDialog.scss +12 -0
  39. package/src/@ui/UiRadio/UiRadio.scss +63 -0
  40. package/src/@ui/UiRadioRow/UiRadioRow.scss +44 -0
  41. package/src/@ui/UiSectionHeading/UiSectionHeading.scss +0 -1
  42. package/src/@ui/UiTextInput/UiTextInput.scss +68 -0
  43. package/src/@ui/index.scss +17 -0
  44. package/src/FilterGroupItem/FilterGroupItem.scss +13 -24
  45. package/styles/css/main.css +285 -20
  46. package/styles/css/main.css.map +1 -1
@@ -0,0 +1,33 @@
1
+ import { type ReactNode } from "react";
2
+ /**
3
+ * @internal
4
+ */
5
+ export interface IUiRadioRowProps {
6
+ /** Whether this row's radio is selected. */
7
+ checked: boolean;
8
+ /** Fires when the user picks this row. */
9
+ onChange?: () => void;
10
+ /**
11
+ * `name` attribute shared by a group of mutually exclusive
12
+ * radio rows.
13
+ */
14
+ name?: string;
15
+ /** Value sent on the change — typically the row's option identifier. */
16
+ value?: string;
17
+ /** Primary label, bold complementary-8. */
18
+ title: string;
19
+ /** Optional descriptive subline, regular complementary-6. */
20
+ description?: string;
21
+ /** Optional trailing content rendered after the text (e.g. row controls). */
22
+ trailing?: ReactNode;
23
+ disabled?: boolean;
24
+ /** Test id forwarded to the root element. */
25
+ dataTestId?: string;
26
+ }
27
+ /**
28
+ * Selectable row composed of a radio + title + optional description + optional
29
+ * trailing slot. Mirror of `UiLabelChecklistRow` for the radio case.
30
+ *
31
+ * @internal
32
+ */
33
+ export declare function UiRadioRow({ checked, onChange, name, value, title, description, trailing, disabled, dataTestId }: IUiRadioRowProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { useId } from "react";
4
+ import { bem } from "../@utils/bem.js";
5
+ import { UiRadio } from "../UiRadio/UiRadio.js";
6
+ const { b, e } = bem("gd-ui-kit-radio-row");
7
+ /**
8
+ * Selectable row composed of a radio + title + optional description + optional
9
+ * trailing slot. Mirror of `UiLabelChecklistRow` for the radio case.
10
+ *
11
+ * @internal
12
+ */
13
+ export function UiRadioRow({ checked, onChange, name, value, title, description, trailing, disabled, dataTestId, }) {
14
+ const inputId = useId();
15
+ const descriptionId = useId();
16
+ return (_jsxs("div", { className: b({ disabled: disabled ?? false }), "data-testid": dataTestId, children: [
17
+ _jsx(UiRadio, { id: inputId, checked: checked, onChange: onChange ? () => onChange() : undefined, name: name, value: value, disabled: disabled, accessibilityConfig: description ? { ariaDescribedBy: descriptionId } : undefined }), _jsxs("span", { className: e("text"), children: [
18
+ _jsx("label", { className: e("title"), htmlFor: inputId, children: title }), description ? (_jsx("span", { id: descriptionId, className: e("description"), children: description })) : null] }), trailing ? _jsx("span", { className: e("trailing"), children: trailing }) : null] }));
19
+ }
@@ -0,0 +1,55 @@
1
+ import { type IAccessibilityConfigBase } from "../../typings/accessibility.js";
2
+ import { type IconType } from "../@types/icon.js";
3
+ /**
4
+ * Clickable trailing icon button (e.g. a clear button). Bundles its own
5
+ * accessible name so the button can never be rendered unnamed.
6
+ *
7
+ * @internal
8
+ */
9
+ export interface IUiTextInputIconAfterButton {
10
+ /** Icon rendered inside the button. */
11
+ icon: IconType;
12
+ /** Fires on click. */
13
+ onClick: () => void;
14
+ /** Accessible name for the icon-only button. */
15
+ ariaLabel: string;
16
+ }
17
+ /**
18
+ * @internal
19
+ */
20
+ export interface IUiTextInputProps {
21
+ /** HTML input `type`. Defaults to `"text"`. */
22
+ type?: "text" | "search" | "email" | "url";
23
+ /** Current value. */
24
+ value: string;
25
+ /** Fires with the next value on every change. */
26
+ onChange: (next: string) => void;
27
+ /** Optional label rendered above the input. */
28
+ label?: string;
29
+ /** Placeholder shown when the input is empty. */
30
+ placeholder?: string;
31
+ /** Optional icon rendered inside the input at the start. */
32
+ iconBefore?: IconType;
33
+ /** Optional static (non-interactive) icon rendered inside the input at the end. */
34
+ iconAfter?: IconType;
35
+ /**
36
+ * Optional interactive trailing icon button (e.g. a clear button). Takes
37
+ * precedence over `iconAfter`. Carries its own `ariaLabel`, so the button
38
+ * always has an accessible name.
39
+ */
40
+ onIconAfter?: IUiTextInputIconAfterButton;
41
+ /** Accessibility config forwarded to the input element. */
42
+ accessibilityConfig?: IAccessibilityConfigBase;
43
+ disabled?: boolean;
44
+ autoFocus?: boolean;
45
+ /** Test id forwarded to the input element. */
46
+ dataTestId?: string;
47
+ }
48
+ /**
49
+ * Single-line text input with optional label and leading / trailing icons.
50
+ * The kit's canonical text-field rendering: 32px height, 1px
51
+ * complementary-4 border, inset shadow, primary-blue focus state.
52
+ *
53
+ * @internal
54
+ */
55
+ export declare function UiTextInput({ type, value, onChange, label, placeholder, iconBefore, iconAfter, onIconAfter, accessibilityConfig, disabled, autoFocus, dataTestId }: IUiTextInputProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ // (C) 2026 GoodData Corporation
3
+ import { useId } from "react";
4
+ import { accessibilityConfigToAttributes } from "../../typings/utilities.js";
5
+ import { bem } from "../@utils/bem.js";
6
+ import { UiIcon } from "../UiIcon/UiIcon.js";
7
+ import { UiIconButton } from "../UiIconButton/UiIconButton.js";
8
+ const { b, e } = bem("gd-ui-kit-text-input");
9
+ /**
10
+ * Single-line text input with optional label and leading / trailing icons.
11
+ * The kit's canonical text-field rendering: 32px height, 1px
12
+ * complementary-4 border, inset shadow, primary-blue focus state.
13
+ *
14
+ * @internal
15
+ */
16
+ export function UiTextInput({ type = "text", value, onChange, label, placeholder, iconBefore, iconAfter, onIconAfter, accessibilityConfig, disabled = false, autoFocus = false, dataTestId, }) {
17
+ const id = useId();
18
+ const { ariaLabel, ...restA11y } = accessibilityConfig ?? {};
19
+ // When a visible <label> is present, the label provides the accessible name;
20
+ // forwarding aria-label would override it (WCAG name-in-name mismatch).
21
+ const inputA11y = label ? restA11y : { ...restA11y, ariaLabel };
22
+ return (_jsxs("div", { className: b(), children: [label ? (_jsx("label", { className: e("label"), htmlFor: id, children: label })) : null, _jsxs("div", { className: e("field", { disabled }), children: [iconBefore ? (_jsx("span", { className: e("icon-before"), children: _jsx(UiIcon, { type: iconBefore, size: 14, color: "complementary-6" }) })) : null, _jsx("input", { id: id, type: type, className: e("input"), value: value, placeholder: placeholder, disabled: disabled, autoFocus: autoFocus, "data-testid": dataTestId, onChange: (event) => onChange(event.target.value), ...accessibilityConfigToAttributes(inputA11y) }), onIconAfter ? (_jsx("span", { className: e("icon-after"), children: _jsx(UiIconButton, { icon: onIconAfter.icon, size: "xsmall", variant: "tertiary", onClick: onIconAfter.onClick, isDisabled: disabled, label: onIconAfter.ariaLabel, iconColor: "complementary-6" }) })) : iconAfter ? (_jsx("span", { className: e("icon-after"), children: _jsx(UiIcon, { type: iconAfter, size: 14, color: "complementary-6" }) })) : null] })
23
+ ] }));
24
+ }
package/esm/index.d.ts CHANGED
@@ -453,3 +453,12 @@ export { UiDialogShell, type IUiDialogShellProps, type IUiDialogShellAccessibili
453
453
  export { UiDialogHeader, type IUiDialogHeaderProps, type DialogHeaderTitleSize, } from "./@ui/UiDialogShell/UiDialogHeader.js";
454
454
  export { UiDialogFooter, type IUiDialogFooterProps } from "./@ui/UiDialogShell/UiDialogFooter.js";
455
455
  export { UiConfirmDialog, type IUiConfirmDialogProps, type ConfirmDialogVariant, } from "./@ui/UiConfirmDialog/UiConfirmDialog.js";
456
+ export { UiTextInput, type IUiTextInputProps, type IUiTextInputIconAfterButton, } from "./@ui/UiTextInput/UiTextInput.js";
457
+ export { UiRadio, type IUiRadioProps } from "./@ui/UiRadio/UiRadio.js";
458
+ export { UiRadioRow, type IUiRadioRowProps } from "./@ui/UiRadioRow/UiRadioRow.js";
459
+ export { UiAvatar, type IUiAvatarProps } from "./@ui/UiAvatar/UiAvatar.js";
460
+ export { UiGranteeAvatar, type IUiGranteeAvatarProps, type GranteeAvatarKind, } from "./@ui/UiGranteeAvatar/UiGranteeAvatar.js";
461
+ export { UiGranteeRow, type IUiGranteeRowProps } from "./@ui/UiGranteeRow/UiGranteeRow.js";
462
+ export { UiObjectShareDialog, type IUiObjectShareDialogProps, type IUiObjectShareDialogGrantee, } from "./@ui/UiObjectShareDialog/UiObjectShareDialog.js";
463
+ export { UiAddGranteeDialog, type IUiAddGranteeDialogProps, } from "./@ui/UiAddGranteeDialog/UiAddGranteeDialog.js";
464
+ export { UiGeneralAccessRadio, type IUiGeneralAccessRadioProps, type GeneralAccessValue, } from "./@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.js";
package/esm/index.js CHANGED
@@ -408,3 +408,12 @@ export { UiDialogShell, } from "./@ui/UiDialogShell/UiDialogShell.js";
408
408
  export { UiDialogHeader, } from "./@ui/UiDialogShell/UiDialogHeader.js";
409
409
  export { UiDialogFooter } from "./@ui/UiDialogShell/UiDialogFooter.js";
410
410
  export { UiConfirmDialog, } from "./@ui/UiConfirmDialog/UiConfirmDialog.js";
411
+ export { UiTextInput, } from "./@ui/UiTextInput/UiTextInput.js";
412
+ export { UiRadio } from "./@ui/UiRadio/UiRadio.js";
413
+ export { UiRadioRow } from "./@ui/UiRadioRow/UiRadioRow.js";
414
+ export { UiAvatar } from "./@ui/UiAvatar/UiAvatar.js";
415
+ export { UiGranteeAvatar, } from "./@ui/UiGranteeAvatar/UiGranteeAvatar.js";
416
+ export { UiGranteeRow } from "./@ui/UiGranteeRow/UiGranteeRow.js";
417
+ export { UiObjectShareDialog, } from "./@ui/UiObjectShareDialog/UiObjectShareDialog.js";
418
+ export { UiAddGranteeDialog, } from "./@ui/UiAddGranteeDialog/UiAddGranteeDialog.js";
419
+ export { UiGeneralAccessRadio, } from "./@ui/UiGeneralAccessRadio/UiGeneralAccessRadio.js";
package/esm/locales.d.ts CHANGED
@@ -87,3 +87,64 @@ export declare const commonDialogMessages: {
87
87
  id: string;
88
88
  };
89
89
  };
90
+ export declare const olpGranteeAvatarMessages: {
91
+ user: {
92
+ id: string;
93
+ };
94
+ group: {
95
+ id: string;
96
+ };
97
+ };
98
+ export declare const olpGranteeRowMessages: {
99
+ ownerTag: {
100
+ id: string;
101
+ };
102
+ };
103
+ export declare const olpObjectShareDialogMessages: {
104
+ title: {
105
+ id: string;
106
+ };
107
+ sharedWith: {
108
+ id: string;
109
+ };
110
+ add: {
111
+ id: string;
112
+ };
113
+ generalAccess: {
114
+ id: string;
115
+ };
116
+ };
117
+ export declare const olpAddGranteeDialogMessages: {
118
+ back: {
119
+ id: string;
120
+ };
121
+ userOrGroup: {
122
+ id: string;
123
+ };
124
+ searchPlaceholder: {
125
+ id: string;
126
+ };
127
+ emptyState: {
128
+ id: string;
129
+ };
130
+ add: {
131
+ id: string;
132
+ };
133
+ };
134
+ export declare const olpGeneralAccessMessages: {
135
+ groupLabel: {
136
+ id: string;
137
+ };
138
+ restrictedTitle: {
139
+ id: string;
140
+ };
141
+ restrictedDescription: {
142
+ id: string;
143
+ };
144
+ workspaceTitle: {
145
+ id: string;
146
+ };
147
+ workspaceDescription: {
148
+ id: string;
149
+ };
150
+ };
package/esm/locales.js CHANGED
@@ -46,3 +46,30 @@ export const commonDialogMessages = defineMessages({
46
46
  cancel: { id: "cancel" },
47
47
  close: { id: "close" },
48
48
  });
49
+ export const olpGranteeAvatarMessages = defineMessages({
50
+ user: { id: "shareDialog.olp.granteeAvatar.user" },
51
+ group: { id: "shareDialog.olp.granteeAvatar.group" },
52
+ });
53
+ export const olpGranteeRowMessages = defineMessages({
54
+ ownerTag: { id: "shareDialog.olp.granteeRow.ownerTag" },
55
+ });
56
+ export const olpObjectShareDialogMessages = defineMessages({
57
+ title: { id: "shareDialog.olp.objectShareDialog.title" },
58
+ sharedWith: { id: "shareDialog.olp.objectShareDialog.sharedWith" },
59
+ add: { id: "shareDialog.olp.objectShareDialog.add" },
60
+ generalAccess: { id: "shareDialog.olp.objectShareDialog.generalAccess" },
61
+ });
62
+ export const olpAddGranteeDialogMessages = defineMessages({
63
+ back: { id: "shareDialog.olp.addGranteeDialog.back" },
64
+ userOrGroup: { id: "shareDialog.olp.addGranteeDialog.userOrGroup" },
65
+ searchPlaceholder: { id: "shareDialog.olp.addGranteeDialog.searchPlaceholder" },
66
+ emptyState: { id: "shareDialog.olp.addGranteeDialog.emptyState" },
67
+ add: { id: "shareDialog.olp.addGranteeDialog.add" },
68
+ });
69
+ export const olpGeneralAccessMessages = defineMessages({
70
+ groupLabel: { id: "shareDialog.olp.generalAccess.groupLabel" },
71
+ restrictedTitle: { id: "shareDialog.olp.generalAccess.restricted.title" },
72
+ restrictedDescription: { id: "shareDialog.olp.generalAccess.restricted.description" },
73
+ workspaceTitle: { id: "shareDialog.olp.generalAccess.workspace.title" },
74
+ workspaceDescription: { id: "shareDialog.olp.generalAccess.workspace.description" },
75
+ });