@gooddata/sdk-ui-kit 11.60.0-alpha.3 → 11.60.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 (37) hide show
  1. package/esm/@ui/@types/icon.d.ts +1 -1
  2. package/esm/@ui/@types/icon.d.ts.map +1 -1
  3. package/esm/@ui/UiIcon/icons.d.ts.map +1 -1
  4. package/esm/@ui/UiIcon/icons.js +2 -0
  5. package/esm/@ui/UiResizableSidebar/UiResizableSidebar.d.ts +38 -0
  6. package/esm/@ui/UiResizableSidebar/UiResizableSidebar.d.ts.map +1 -0
  7. package/esm/@ui/UiResizableSidebar/UiResizableSidebar.js +116 -0
  8. package/esm/@ui/UiResizableSidebar/UiResizableSidebarCollapseToggle.d.ts +31 -0
  9. package/esm/@ui/UiResizableSidebar/UiResizableSidebarCollapseToggle.d.ts.map +1 -0
  10. package/esm/@ui/UiResizableSidebar/UiResizableSidebarCollapseToggle.js +52 -0
  11. package/esm/@ui/UiResizableSidebar/UiResizableSidebarContext.d.ts +48 -0
  12. package/esm/@ui/UiResizableSidebar/UiResizableSidebarContext.d.ts.map +1 -0
  13. package/esm/@ui/UiResizableSidebar/UiResizableSidebarContext.js +75 -0
  14. package/esm/@ui/UiResizableSidebar/UiResizableSidebarExpandTrigger.d.ts +21 -0
  15. package/esm/@ui/UiResizableSidebar/UiResizableSidebarExpandTrigger.d.ts.map +1 -0
  16. package/esm/@ui/UiResizableSidebar/UiResizableSidebarExpandTrigger.js +29 -0
  17. package/esm/@ui/UiResizableSidebar/UiResizableSidebarHandle.d.ts +17 -0
  18. package/esm/@ui/UiResizableSidebar/UiResizableSidebarHandle.d.ts.map +1 -0
  19. package/esm/@ui/UiResizableSidebar/UiResizableSidebarHandle.js +40 -0
  20. package/esm/@ui/UiResizableSidebar/UiResizableSidebarHandleContext.d.ts +16 -0
  21. package/esm/@ui/UiResizableSidebar/UiResizableSidebarHandleContext.d.ts.map +1 -0
  22. package/esm/@ui/UiResizableSidebar/UiResizableSidebarHandleContext.js +4 -0
  23. package/esm/@ui/UiResizableSidebar/types.d.ts +61 -0
  24. package/esm/@ui/UiResizableSidebar/types.d.ts.map +1 -0
  25. package/esm/@ui/UiResizableSidebar/types.js +2 -0
  26. package/esm/@ui/UiResizableSidebar/useUiResizableSidebarState.d.ts +19 -0
  27. package/esm/@ui/UiResizableSidebar/useUiResizableSidebarState.d.ts.map +1 -0
  28. package/esm/@ui/UiResizableSidebar/useUiResizableSidebarState.js +103 -0
  29. package/esm/index.d.ts +7 -0
  30. package/esm/index.d.ts.map +1 -1
  31. package/esm/index.js +6 -0
  32. package/esm/sdk-ui-kit.d.ts +212 -1
  33. package/package.json +11 -11
  34. package/src/@ui/UiResizableSidebar/UiResizableSidebar.scss +132 -0
  35. package/src/@ui/index.scss +2 -1
  36. package/styles/css/main.css +94 -0
  37. package/styles/css/main.css.map +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gooddata/sdk-ui-kit",
3
- "version": "11.60.0-alpha.3",
3
+ "version": "11.60.0",
4
4
  "description": "GoodData SDK - UI Building Components",
5
5
  "license": "MIT",
6
6
  "author": "GoodData Corporation",
@@ -79,11 +79,11 @@
79
79
  "unified": "^11.0.5",
80
80
  "uuid": "11.1.1",
81
81
  "yaml": "2.8.3",
82
- "@gooddata/sdk-backend-spi": "11.60.0-alpha.3",
83
- "@gooddata/sdk-model": "11.60.0-alpha.3",
84
- "@gooddata/sdk-ui": "11.60.0-alpha.3",
85
- "@gooddata/sdk-ui-theme-provider": "11.60.0-alpha.3",
86
- "@gooddata/util": "11.60.0-alpha.3"
82
+ "@gooddata/sdk-model": "11.60.0",
83
+ "@gooddata/sdk-backend-spi": "11.60.0",
84
+ "@gooddata/sdk-ui-theme-provider": "11.60.0",
85
+ "@gooddata/sdk-ui": "11.60.0",
86
+ "@gooddata/util": "11.60.0"
87
87
  },
88
88
  "devDependencies": {
89
89
  "@microsoft/api-documenter": "7.30.16",
@@ -128,11 +128,11 @@
128
128
  "typescript": "7.0.2",
129
129
  "vitest": "4.1.11",
130
130
  "vitest-dom": "0.1.1",
131
- "@gooddata/eslint-config": "11.60.0-alpha.3",
132
- "@gooddata/oxlint-config": "11.60.0-alpha.3",
133
- "@gooddata/reference-workspace": "11.60.0-alpha.3",
134
- "@gooddata/sdk-backend-mockingbird": "11.60.0-alpha.3",
135
- "@gooddata/stylelint-config": "11.60.0-alpha.3"
131
+ "@gooddata/eslint-config": "11.60.0",
132
+ "@gooddata/reference-workspace": "11.60.0",
133
+ "@gooddata/sdk-backend-mockingbird": "11.60.0",
134
+ "@gooddata/stylelint-config": "11.60.0",
135
+ "@gooddata/oxlint-config": "11.60.0"
136
136
  },
137
137
  "peerDependencies": {
138
138
  "react": "^18.0.0 || ^19.0.0",
@@ -0,0 +1,132 @@
1
+ // (C) 2026 GoodData Corporation
2
+
3
+ @use "../../../styles/scss/variables";
4
+
5
+ $slide-duration: 0.5s;
6
+ $handle-hit-width: 8px;
7
+ $handle-bar-width: 4px;
8
+ $expand-trigger-width: 10px;
9
+
10
+ .gd-ui-kit-resizable-sidebar {
11
+ position: relative;
12
+ display: flex;
13
+ flex-direction: column;
14
+ flex: 0 0 auto;
15
+ // No explicit height: the flex column stretches it, and a percentage would confine a sticky child.
16
+ transition: width var(--resizable-sidebar-slide-duration, #{$slide-duration});
17
+
18
+ // Lift the sidebar above sibling content during a drag so the indicator bar is not covered by
19
+ // content with its own stacking context. Consumers whose content paints above the sidebar at rest
20
+ // (e.g. a sticky header) raise the sidebar above it themselves, so the bar shows on hover too.
21
+ &--dragging,
22
+ &:has(.gd-ui-kit-resizable-sidebar__handle:focus) {
23
+ z-index: 9999;
24
+ transition: none;
25
+ }
26
+
27
+ &--hidden {
28
+ overflow: hidden;
29
+ }
30
+
31
+ &__collapse-toggle {
32
+ display: flex;
33
+ }
34
+
35
+ // Expands a hidden sidebar from its edge. A 10px hit area overlays the content edge without taking
36
+ // layout space; the bar rests 10px outside and slides in on hover and keyboard focus.
37
+ &__expand-trigger {
38
+ position: sticky;
39
+ z-index: 2;
40
+ top: 0;
41
+ flex: 0 0 auto;
42
+ align-self: flex-start;
43
+ width: $expand-trigger-width;
44
+ height: 100vh;
45
+ margin-right: -$expand-trigger-width;
46
+ padding: 0;
47
+ overflow: hidden;
48
+ background: transparent;
49
+ border: 0;
50
+ cursor: pointer;
51
+
52
+ &::before {
53
+ content: "";
54
+ position: absolute;
55
+ top: 0;
56
+ bottom: 0;
57
+ left: 0;
58
+ width: $expand-trigger-width;
59
+ background-color: color-mix(in srgb, var(--gd-palette-complementary-8, #464e56) 30%, transparent);
60
+ transform: translateX(-100%);
61
+ transition: var(--gd-transition-all);
62
+ }
63
+
64
+ &:focus-visible {
65
+ outline: none;
66
+ }
67
+
68
+ &:hover::before,
69
+ &:focus-visible::before {
70
+ transform: translateX(0);
71
+ }
72
+ }
73
+
74
+ // The hit area is wider than the bar; the bar is centered over the sidebar's right edge so it follows
75
+ // the width transition, and follows the pointer while dragging. It must be a direct child of the
76
+ // sidebar, not of a sticky descendant: a composited sticky layer keeps stale pixels in the strip the
77
+ // handle overhangs when the sidebar shrinks.
78
+ &__handle {
79
+ position: absolute;
80
+ top: 0;
81
+ bottom: 0;
82
+ left: 100%;
83
+ transform: translateX(-50%);
84
+ z-index: 2;
85
+ width: $handle-hit-width;
86
+ padding: 0;
87
+ background: transparent;
88
+ border: 0;
89
+ cursor: col-resize;
90
+ // Keeps the browser from claiming the first touchmove for panning before pointer capture engages.
91
+ touch-action: none;
92
+
93
+ &::before {
94
+ content: "";
95
+ position: absolute;
96
+ top: 0;
97
+ bottom: 0;
98
+ left: 50%;
99
+ transform: translateX(-50%);
100
+ width: $handle-bar-width;
101
+ background-color: variables.$gd-palette-primary-base;
102
+ opacity: 0;
103
+ transition: var(--gd-transition-all);
104
+ }
105
+
106
+ &:focus {
107
+ outline: none;
108
+ }
109
+
110
+ &:disabled {
111
+ cursor: initial;
112
+ }
113
+
114
+ &--dragging {
115
+ left: 0;
116
+ transform: translateX(calc(var(--resizable-sidebar-drag-x, 0px) - 50%));
117
+ }
118
+
119
+ // A disabled handle (resize unavailable) must not advertise a drag.
120
+ &:not(:disabled):hover::before,
121
+ &:focus::before,
122
+ &--dragging::before {
123
+ opacity: 1;
124
+ }
125
+ }
126
+ }
127
+
128
+ @media (prefers-reduced-motion: reduce) {
129
+ .gd-ui-kit-resizable-sidebar {
130
+ transition: none;
131
+ }
132
+ }
@@ -1,4 +1,4 @@
1
- // (C) 2024-2025 GoodData Corporation
1
+ // (C) 2024-2026 GoodData Corporation
2
2
 
3
3
  @use "./UiButton/UiButton.scss";
4
4
  @use "./UiButtonSegmentedControl/UiButtonSegmentedControl.scss";
@@ -64,6 +64,7 @@
64
64
  @use "./UiToolbarSegmentedControl/UiToolbarSegmentedControl.scss";
65
65
  @use "./UiToolbarDivider/UiToolbarDivider.scss";
66
66
  @use "./UiToolbarColorSwatch/UiToolbarColorSwatch.scss";
67
+ @use "./UiResizableSidebar/UiResizableSidebar.scss";
67
68
 
68
69
  // `--gd-font-family` is a `:root` variable only; there is no global `body` font
69
70
  // declaration. Apply it once to every kit root so standalone components don't
@@ -5183,6 +5183,100 @@
5183
5183
  box-shadow: inset 0 0 0 1px var(--gd-palette-complementary-4);
5184
5184
  }
5185
5185
 
5186
+ .gd-ui-kit-resizable-sidebar {
5187
+ position: relative;
5188
+ display: flex;
5189
+ flex-direction: column;
5190
+ flex: 0 0 auto;
5191
+ transition: width var(--resizable-sidebar-slide-duration, 0.5s);
5192
+ }
5193
+ .gd-ui-kit-resizable-sidebar--dragging, .gd-ui-kit-resizable-sidebar:has(.gd-ui-kit-resizable-sidebar__handle:focus) {
5194
+ z-index: 9999;
5195
+ transition: none;
5196
+ }
5197
+ .gd-ui-kit-resizable-sidebar--hidden {
5198
+ overflow: hidden;
5199
+ }
5200
+ .gd-ui-kit-resizable-sidebar__collapse-toggle {
5201
+ display: flex;
5202
+ }
5203
+ .gd-ui-kit-resizable-sidebar__expand-trigger {
5204
+ position: sticky;
5205
+ z-index: 2;
5206
+ top: 0;
5207
+ flex: 0 0 auto;
5208
+ align-self: flex-start;
5209
+ width: 10px;
5210
+ height: 100vh;
5211
+ margin-right: -10px;
5212
+ padding: 0;
5213
+ overflow: hidden;
5214
+ background: transparent;
5215
+ border: 0;
5216
+ cursor: pointer;
5217
+ }
5218
+ .gd-ui-kit-resizable-sidebar__expand-trigger::before {
5219
+ content: "";
5220
+ position: absolute;
5221
+ top: 0;
5222
+ bottom: 0;
5223
+ left: 0;
5224
+ width: 10px;
5225
+ background-color: color-mix(in srgb, var(--gd-palette-complementary-8, #464e56) 30%, transparent);
5226
+ transform: translateX(-100%);
5227
+ transition: var(--gd-transition-all);
5228
+ }
5229
+ .gd-ui-kit-resizable-sidebar__expand-trigger:focus-visible {
5230
+ outline: none;
5231
+ }
5232
+ .gd-ui-kit-resizable-sidebar__expand-trigger:hover::before, .gd-ui-kit-resizable-sidebar__expand-trigger:focus-visible::before {
5233
+ transform: translateX(0);
5234
+ }
5235
+ .gd-ui-kit-resizable-sidebar__handle {
5236
+ position: absolute;
5237
+ top: 0;
5238
+ bottom: 0;
5239
+ left: 100%;
5240
+ transform: translateX(-50%);
5241
+ z-index: 2;
5242
+ width: 8px;
5243
+ padding: 0;
5244
+ background: transparent;
5245
+ border: 0;
5246
+ cursor: col-resize;
5247
+ touch-action: none;
5248
+ }
5249
+ .gd-ui-kit-resizable-sidebar__handle::before {
5250
+ content: "";
5251
+ position: absolute;
5252
+ top: 0;
5253
+ bottom: 0;
5254
+ left: 50%;
5255
+ transform: translateX(-50%);
5256
+ width: 4px;
5257
+ background-color: var(--gd-palette-primary-base, #14b2e2);
5258
+ opacity: 0;
5259
+ transition: var(--gd-transition-all);
5260
+ }
5261
+ .gd-ui-kit-resizable-sidebar__handle:focus {
5262
+ outline: none;
5263
+ }
5264
+ .gd-ui-kit-resizable-sidebar__handle:disabled {
5265
+ cursor: initial;
5266
+ }
5267
+ .gd-ui-kit-resizable-sidebar__handle--dragging {
5268
+ left: 0;
5269
+ transform: translateX(calc(var(--resizable-sidebar-drag-x, 0px) - 50%));
5270
+ }
5271
+ .gd-ui-kit-resizable-sidebar__handle:not(:disabled):hover::before, .gd-ui-kit-resizable-sidebar__handle:focus::before, .gd-ui-kit-resizable-sidebar__handle--dragging::before {
5272
+ opacity: 1;
5273
+ }
5274
+
5275
+ @media (prefers-reduced-motion: reduce) {
5276
+ .gd-ui-kit-resizable-sidebar {
5277
+ transition: none;
5278
+ }
5279
+ }
5186
5280
  [class^=gd-ui-kit-],
5187
5281
  [class*=" gd-ui-kit-"] {
5188
5282
  font-family: var(--gd-font-family);