@splunk/react-page 8.0.0-beta.2 → 8.0.0-beta.4

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 (4) hide show
  1. package/18.js +74 -72
  2. package/CHANGELOG.md +13 -0
  3. package/index.js +72 -68
  4. package/package.json +4 -4
package/18.js CHANGED
@@ -79,21 +79,21 @@
79
79
  const c = require("@splunk/themes/SplunkThemeProvider");
80
80
  var d = e.n(c);
81
81
  // CONCATENATED MODULE: external "styled-components"
82
- const p = require("styled-components");
83
- var s = e.n(p);
82
+ const s = require("styled-components");
83
+ var p = e.n(s);
84
84
  // CONCATENATED MODULE: external "@splunk/themes"
85
85
  const v = require("@splunk/themes");
86
86
  // CONCATENATED MODULE: ./src/LoadingStyles.js
87
- function f() {
87
+ function m() {
88
88
  var e = k([ "\n animation-name: ", ";\n animation-duration: 1.4s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n background-color: ", ";\n width: 10px;\n height: 10px;\n border-radius: 5px;\n display: inline-block;\n margin-right: ", ";\n\n &:nth-child(2) {\n animation-delay: 0.2s;\n }\n\n &:nth-child(3) {\n animation-delay: 0.4s;\n }\n" ]);
89
- f = function n() {
89
+ m = function n() {
90
90
  return e;
91
91
  };
92
92
  return e;
93
93
  }
94
- function m() {
94
+ function f() {
95
95
  var e = k([ "\n color: ", ";\n padding-top: 30vh;\n text-align: center;\n min-height: 400px;\n" ]);
96
- m = function n() {
96
+ f = function n() {
97
97
  return e;
98
98
  };
99
99
  return e;
@@ -105,16 +105,16 @@
105
105
  };
106
106
  return e;
107
107
  }
108
- function b() {
108
+ function y() {
109
109
  var e = k([ "\n padding: 0;\n background-color: ", ";\n height: ", "px;\n" ]);
110
- b = function n() {
110
+ y = function n() {
111
111
  return e;
112
112
  };
113
113
  return e;
114
114
  }
115
- function y() {
115
+ function b() {
116
116
  var e = k([ "\n background-color: ", ";\n position: fixed;\n opacity: 1;\n z-index: 10000;\n top: 0;\n bottom: 0;\n left: 0;\n right: 0;\n" ]);
117
- y = function n() {
117
+ b = function n() {
118
118
  return e;
119
119
  };
120
120
  return e;
@@ -135,18 +135,18 @@
135
135
  }
136
136
  var S = 45;
137
137
  var w = 34;
138
- var E = (0, p.keyframes)(g());
139
- var j = s().div(y(), v.variables.backgroundColorPage);
140
- var C = s().div(b(), (0, v.pick)({
138
+ var E = (0, s.keyframes)(g());
139
+ var j = p().div(b(), v.variables.backgroundColorPage);
140
+ var C = p().div(y(), (0, v.pick)({
141
141
  prisma: v.variables.backgroundColorSection,
142
142
  enterprise: v.variables.gray20
143
143
  }), w);
144
- var q = s().div(h(), (0, v.pick)({
144
+ var q = p().div(h(), (0, v.pick)({
145
145
  prisma: v.variables.backgroundColorPopup,
146
146
  enterprise: v.variables.gray30
147
147
  }), S);
148
- var x = s().div(m(), v.variables.contentColorInverted);
149
- var B = s().div(f(), E, v.variables.neutral500, (0, v.pick)({
148
+ var x = p().div(f(), v.variables.contentColorInverted);
149
+ var B = p().div(m(), E, v.variables.neutral500, (0, v.pick)({
150
150
  prisma: v.variables.spacingMedium,
151
151
  enterprise: v.variables.spacingSmall
152
152
  }));
@@ -154,12 +154,12 @@
154
154
  const O = require("prop-types");
155
155
  var P = e.n(O);
156
156
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
157
- const L = require("@splunk/react-ui/ScreenReaderContent");
158
- var _ = e.n(L);
157
+ const F = require("@splunk/react-ui/ScreenReaderContent");
158
+ var L = e.n(F);
159
159
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
160
- const A = require("@splunk/ui-utils/i18n");
160
+ const _ = require("@splunk/ui-utils/i18n");
161
161
  // CONCATENATED MODULE: ./src/Loading.jsx
162
- var F = {
162
+ var A = {
163
163
  hideAppBar: P().bool,
164
164
  hideChrome: P().bool,
165
165
  hideSplunkBar: P().bool,
@@ -169,10 +169,10 @@
169
169
  function T(e) {
170
170
  var n = e.AppBarFallback, r = n === void 0 ? q : n, t = e.hideAppBar, i = e.hideChrome, o = e.hideSplunkBar, l = e.SplunkBarFallback, u = l === void 0 ? C : l;
171
171
 
172
- return a().createElement(j, null, !i && !o && a().createElement(u, null), !i && !t && a().createElement(r, null), a().createElement(x, null, a().createElement(B, null), a().createElement(B, null), a().createElement(B, null), a().createElement(_(), null, (0,
173
- A._)("Loading"))));
172
+ return a().createElement(j, null, !i && !o && a().createElement(u, null), !i && !t && a().createElement(r, null), a().createElement(x, null, a().createElement(B, null), a().createElement(B, null), a().createElement(B, null), a().createElement(L(), null, (0,
173
+ _._)("Loading"))));
174
174
  }
175
- T.propTypes = F;
175
+ T.propTypes = A;
176
176
  /* harmony default export */ const H = T;
177
177
  // CONCATENATED MODULE: ./src/baseLayout.jsx
178
178
  function M(e, n) {
@@ -207,7 +207,7 @@
207
207
  * @param {object} [options]
208
208
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
209
209
  * @private
210
- */ function U(e, n) {
210
+ */ function D(e, n) {
211
211
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, t = r.loader, a = t === void 0 ? "scriptjs" : t;
212
212
  var i = e === "dark" ? I : G;
213
213
  var l = (0, u.createStaticURL)(i);
@@ -232,7 +232,7 @@
232
232
  * @param {HTMLDivElement} headerContainer
233
233
  * @param {object} [options]
234
234
  * @private
235
- */ function D(e) {
235
+ */ function U(e) {
236
236
  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
237
237
  var r = n.hideSplunkBar, t = n.hideAppBar, a = n.headerHeight;
238
238
  var i = e.children[0];
@@ -280,6 +280,8 @@
280
280
  * to the edge of the page.
281
281
  * @param {Boolean} [options.useGlobalLayerStack = true] - Wraps elements in @splunk/react-ui's LayerStackGlobalProvider.
282
282
  * @param {String} [options.theme = 'light'] - Used to theme UI elements. Ex. "light" or "dark".
283
+ * @param {String} [options.themeFamily = 'enterprise'] - Ex. Theme family to use for UI elements. Ex. "enterprise" or "prisma".
284
+ * @param {String} [options.themeDensity] - Ex. Theme density to use for UI elements. Ex. "compact" or "comfortable".
283
285
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
284
286
  * Change this only if the default loader does not work for your application.
285
287
  * @param {Boolean} [options.lazyLoadLayout = false] - Prioritizes loading the React element and lazily fetches and compiles the layout API (navigation bar).
@@ -288,54 +290,54 @@
288
290
  * @param {function} [options.onLayoutComplete] - A callback function which executes after layout API is fetched and compiled.
289
291
  */ function K(e, n) {
290
292
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
291
- var t = r.useGlobalLayerStack, i = t === void 0 ? true : t, o = r.pageTitle, l = r.theme, u = l === void 0 ? "light" : l, c = r.loader, p = c === void 0 ? "scriptjs" : c, s = M(r, [ "useGlobalLayerStack", "pageTitle", "theme", "loader" ]);
293
+ var t = r.useGlobalLayerStack, i = t === void 0 ? true : t, o = r.pageTitle, l = r.theme, u = l === void 0 ? "light" : l, c = r.themeDensity, s = r.loader, p = s === void 0 ? "scriptjs" : s, v = M(r, [ "useGlobalLayerStack", "pageTitle", "theme", "themeDensity", "loader" ]);
292
294
  if (o) {
293
295
  document.title = o;
294
296
  }
295
- var v = s.hideChrome, f = s.hideAppBar, m = s.hideSplunkBar, h = s.SplunkBarFallback, b = h === void 0 ? C : h, y = s.AppBarFallback, g = y === void 0 ? q : y, k = s.lazyLoadLayout, E = k === void 0 ? false : k, j = s.onLayoutComplete, x = s.onLayoutStart;
296
- var B = document.createElement("div");
297
- var O = document.createElement("div");
298
- x === null || x === void 0 ? void 0 : x({
299
- headerContainer: O,
300
- bodyContainer: B
297
+ var m = v.hideChrome, f = v.themeFamily, h = f === void 0 ? "enterprise" : f, y = v.hideAppBar, b = v.hideSplunkBar, g = v.SplunkBarFallback, k = g === void 0 ? C : g, E = v.AppBarFallback, j = E === void 0 ? q : E, x = v.lazyLoadLayout, B = x === void 0 ? false : x, O = v.onLayoutComplete, P = v.onLayoutStart;
298
+ var F = document.createElement("div");
299
+ var L = document.createElement("div");
300
+ P === null || P === void 0 ? void 0 : P({
301
+ headerContainer: L,
302
+ bodyContainer: F
301
303
  });
302
304
  // The "theme" in enterprise used to be "enterprise" instead of "light"...
303
- var P = u === "light" || u === "enterprise" ? "light" : "dark";
304
- var L = {
305
- family: "enterprise",
306
- colorScheme: P,
307
- density: "comfortable"
305
+ var _ = u === "light" || u === "enterprise" ? "light" : "dark";
306
+ var A = {
307
+ family: h,
308
+ colorScheme: _,
309
+ density: c || (h === "prisma" ? "compact" : "comfortable")
308
310
  };
309
- var _;
310
- var A;
311
- if (E) {
311
+ var T;
312
+ var z;
313
+ if (B) {
312
314
  // render the React app immediately without waiting for layout API
313
- if (!v) {
314
- document.body.appendChild(O);
315
- A = n( a().createElement(a().Fragment, null, !m && a().createElement(b, null), !f && a().createElement(g, null)), O);
315
+ if (!m) {
316
+ document.body.appendChild(L);
317
+ z = n( a().createElement(a().Fragment, null, !b && a().createElement(k, null), !y && a().createElement(j, null)), L);
316
318
  // explicitly set height and background of header container to avoid layout and color shift when fallback gets replaced
317
- var F = O.offsetHeight;
318
- var T = D(O, {
319
- hideSplunkBar: m,
320
- hideAppBar: f,
321
- headerHeight: F,
322
- AppBarFallback: g,
323
- SplunkBarFallback: b
319
+ var G = L.offsetHeight;
320
+ var I = U(L, {
321
+ hideSplunkBar: b,
322
+ hideAppBar: y,
323
+ headerHeight: G,
324
+ AppBarFallback: j,
325
+ SplunkBarFallback: k
324
326
  });
325
- O.style.height = "".concat(F, "px");
326
- O.style.background = "".concat(T);
327
+ L.style.height = "".concat(G, "px");
328
+ L.style.background = "".concat(I);
327
329
  }
328
- document.body.appendChild(B);
329
- _ = J(e, n, B, i, L);
330
+ document.body.appendChild(F);
331
+ T = J(e, n, F, i, A);
330
332
  } else {
331
- document.body.appendChild(B);
332
- _ = n( a().createElement(d(), L, a().createElement(H, s)), B);
333
+ document.body.appendChild(F);
334
+ T = n( a().createElement(d(), A, a().createElement(H, v)), F);
333
335
  }
334
- U(u, (function(r) {
336
+ D(u, (function(r) {
335
337
  var t;
336
338
  if (r) {
337
- t = r.create(s).getContainerElement();
338
- if (s.layout === "fixed") {
339
+ t = r.create(v).getContainerElement();
340
+ if (v.layout === "fixed") {
339
341
  // the above create method adds flex: 1 0 0
340
342
  // IE 11 disregards 0px shorthand for flex-basis component.
341
343
  // flex-basis 0% is better than 0px because css minification can remove px
@@ -359,25 +361,25 @@
359
361
  t = document.createElement("div");
360
362
  document.body.appendChild(t);
361
363
  }
362
- if (E) {
363
- if (!v) {
364
+ if (B) {
365
+ if (!m) {
364
366
  // replace placeholder nav bar with real nav bar
365
- A.unmount(O);
367
+ z.unmount(L);
366
368
  var a = document.querySelector(R);
367
- var o = (!v && !m ? w : 0) + (!v && !f ? S : 0);
369
+ var o = (!m && !b ? w : 0) + (!m && !y ? S : 0);
368
370
  // set a min-height for basic nav bar components and auto height for any additional components like global banner
369
- O.style.minHeight = "".concat(o, "px");
370
- O.style.height = "auto";
371
- O.appendChild(a);
371
+ L.style.minHeight = "".concat(o, "px");
372
+ L.style.height = "auto";
373
+ L.appendChild(a);
372
374
  }
373
- t.appendChild(B);
374
- j === null || j === void 0 ? void 0 : j();
375
+ t.appendChild(F);
376
+ O === null || O === void 0 ? void 0 : O();
375
377
  } else {
376
378
  setTimeout((function() {
377
- _.unmount(B);
378
- _ = J(e, n, B, i, L);
379
- t.appendChild(B);
380
- j === null || j === void 0 ? void 0 : j();
379
+ T.unmount(F);
380
+ T = J(e, n, F, i, A);
381
+ t.appendChild(F);
382
+ O === null || O === void 0 ? void 0 : O();
381
383
  }), 30);
382
384
  }
383
385
  }), {
package/CHANGELOG.md CHANGED
@@ -1,6 +1,19 @@
1
1
  Change Log
2
2
  ============
3
3
 
4
+ 8.0.0-beta.4 - May 7, 2025
5
+ ----------
6
+ * Updated dependencies.
7
+
8
+ 8.0.0-beta.3 - April 2, 2025
9
+ ----------
10
+ * Includes changes from `7.2.0`.
11
+
12
+ 7.2.0 - April 1, 2025
13
+ ----------
14
+ New Features:
15
+ * Added support for `themeFamily` and `themeDensity` options (SPL-273100).
16
+
4
17
  8.0.0-beta.2 - March 5, 2025
5
18
  ----------
6
19
  * Public release of `8.0.0-beta.1`
package/index.js CHANGED
@@ -61,8 +61,8 @@
61
61
  e.r(n);
62
62
  // EXPORTS
63
63
  e.d(n, {
64
- AppBar: () => /* reexport */ y,
65
- SplunkBar: () => /* reexport */ b,
64
+ AppBar: () => /* reexport */ b,
65
+ SplunkBar: () => /* reexport */ y,
66
66
  default: () => /* binding */ W
67
67
  });
68
68
  // CONCATENATED MODULE: external "react-dom"
@@ -123,19 +123,19 @@
123
123
  }));
124
124
  }
125
125
  var v = 45;
126
- var f = 34;
127
- var m = (0, t.keyframes)(p());
126
+ var m = 34;
127
+ var f = (0, t.keyframes)(p());
128
128
  var h = a().div(d(), i.variables.backgroundColorPage);
129
- var b = a().div(c(), (0, i.pick)({
129
+ var y = a().div(c(), (0, i.pick)({
130
130
  prisma: i.variables.backgroundColorSection,
131
131
  enterprise: i.variables.gray20
132
- }), f);
133
- var y = a().div(u(), (0, i.pick)({
132
+ }), m);
133
+ var b = a().div(u(), (0, i.pick)({
134
134
  prisma: i.variables.backgroundColorPopup,
135
135
  enterprise: i.variables.gray30
136
136
  }), v);
137
137
  var g = a().div(l(), i.variables.contentColorInverted);
138
- var k = a().div(o(), m, i.variables.neutral500, (0, i.pick)({
138
+ var k = a().div(o(), f, i.variables.neutral500, (0, i.pick)({
139
139
  prisma: i.variables.spacingMedium,
140
140
  enterprise: i.variables.spacingSmall
141
141
  }));
@@ -157,11 +157,11 @@
157
157
  var P = e.n(O);
158
158
  // CONCATENATED MODULE: external "@splunk/react-ui/ScreenReaderContent"
159
159
  const A = require("@splunk/react-ui/ScreenReaderContent");
160
- var L = e.n(A);
160
+ var F = e.n(A);
161
161
  // CONCATENATED MODULE: external "@splunk/ui-utils/i18n"
162
- const _ = require("@splunk/ui-utils/i18n");
162
+ const L = require("@splunk/ui-utils/i18n");
163
163
  // CONCATENATED MODULE: ./src/Loading.jsx
164
- var F = {
164
+ var _ = {
165
165
  hideAppBar: P().bool,
166
166
  hideChrome: P().bool,
167
167
  hideSplunkBar: P().bool,
@@ -169,12 +169,12 @@
169
169
  SplunkBarFallback: P().elementType
170
170
  };
171
171
  function T(e) {
172
- var n = e.AppBarFallback, r = n === void 0 ? y : n, t = e.hideAppBar, a = e.hideChrome, i = e.hideSplunkBar, o = e.SplunkBarFallback, l = o === void 0 ? b : o;
172
+ var n = e.AppBarFallback, r = n === void 0 ? b : n, t = e.hideAppBar, a = e.hideChrome, i = e.hideSplunkBar, o = e.SplunkBarFallback, l = o === void 0 ? y : o;
173
173
 
174
- return w().createElement(h, null, !a && !i && w().createElement(l, null), !a && !t && w().createElement(r, null), w().createElement(g, null, w().createElement(k, null), w().createElement(k, null), w().createElement(k, null), w().createElement(L(), null, (0,
175
- _._)("Loading"))));
174
+ return w().createElement(h, null, !a && !i && w().createElement(l, null), !a && !t && w().createElement(r, null), w().createElement(g, null, w().createElement(k, null), w().createElement(k, null), w().createElement(k, null), w().createElement(F(), null, (0,
175
+ L._)("Loading"))));
176
176
  }
177
- T.propTypes = F;
177
+ T.propTypes = _;
178
178
  /* harmony default export */ const H = T;
179
179
  // CONCATENATED MODULE: ./src/baseLayout.jsx
180
180
  function M(e, n) {
@@ -201,7 +201,7 @@
201
201
  }
202
202
  var G = "build/api/layout.js";
203
203
  var I = "build/api/layout-dark.js";
204
- var R = 'header[data-view="splunkjs/mvc/headerview"]';
204
+ var D = 'header[data-view="splunkjs/mvc/headerview"]';
205
205
  /**
206
206
  * Loads the layout from the server, using requirejs if available on the window and scriptjs if not.
207
207
  *
@@ -209,7 +209,7 @@
209
209
  * @param {object} [options]
210
210
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
211
211
  * @private
212
- */ function U(e, n) {
212
+ */ function R(e, n) {
213
213
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, t = r.loader, a = t === void 0 ? "scriptjs" : t;
214
214
  var i = e === "dark" ? I : G;
215
215
  var o = (0, B.createStaticURL)(i);
@@ -234,7 +234,7 @@
234
234
  * @param {HTMLDivElement} headerContainer
235
235
  * @param {object} [options]
236
236
  * @private
237
- */ function N(e) {
237
+ */ function U(e) {
238
238
  var n = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
239
239
  var r = n.hideSplunkBar, t = n.hideAppBar, a = n.headerHeight;
240
240
  var i = e.children[0];
@@ -258,7 +258,7 @@
258
258
  * @param {boolean} useGlobalLayerStack
259
259
  * @param {object} splunkTheme
260
260
  * @private
261
- */ function D(e, n, r) {
261
+ */ function N(e, n, r) {
262
262
  var t = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
263
263
  var a = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {};
264
264
  var i = t ? w().createElement(j.LayerStackGlobalProvider, null, w().createElement(x(), a, e)) : w().createElement(x(), a, e);
@@ -282,6 +282,8 @@
282
282
  * to the edge of the page.
283
283
  * @param {Boolean} [options.useGlobalLayerStack = true] - Wraps elements in @splunk/react-ui's LayerStackGlobalProvider.
284
284
  * @param {String} [options.theme = 'light'] - Used to theme UI elements. Ex. "light" or "dark".
285
+ * @param {String} [options.themeFamily = 'enterprise'] - Ex. Theme family to use for UI elements. Ex. "enterprise" or "prisma".
286
+ * @param {String} [options.themeDensity] - Ex. Theme density to use for UI elements. Ex. "compact" or "comfortable".
285
287
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
286
288
  * Change this only if the default loader does not work for your application.
287
289
  * @param {Boolean} [options.lazyLoadLayout = false] - Prioritizes loading the React element and lazily fetches and compiles the layout API (navigation bar).
@@ -290,54 +292,54 @@
290
292
  * @param {function} [options.onLayoutComplete] - A callback function which executes after layout API is fetched and compiled.
291
293
  */ function J(e, n) {
292
294
  var r = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
293
- var t = r.useGlobalLayerStack, a = t === void 0 ? true : t, i = r.pageTitle, o = r.theme, l = o === void 0 ? "light" : o, u = r.loader, c = u === void 0 ? "scriptjs" : u, d = M(r, [ "useGlobalLayerStack", "pageTitle", "theme", "loader" ]);
295
+ var t = r.useGlobalLayerStack, a = t === void 0 ? true : t, i = r.pageTitle, o = r.theme, l = o === void 0 ? "light" : o, u = r.themeDensity, c = r.loader, d = c === void 0 ? "scriptjs" : c, p = M(r, [ "useGlobalLayerStack", "pageTitle", "theme", "themeDensity", "loader" ]);
294
296
  if (i) {
295
297
  document.title = i;
296
298
  }
297
- var p = d.hideChrome, s = d.hideAppBar, m = d.hideSplunkBar, h = d.SplunkBarFallback, g = h === void 0 ? b : h, k = d.AppBarFallback, S = k === void 0 ? y : k, C = d.lazyLoadLayout, E = C === void 0 ? false : C, j = d.onLayoutComplete, B = d.onLayoutStart;
298
- var q = document.createElement("div");
299
- var O = document.createElement("div");
300
- B === null || B === void 0 ? void 0 : B({
301
- headerContainer: O,
302
- bodyContainer: q
299
+ var s = p.hideChrome, f = p.themeFamily, h = f === void 0 ? "enterprise" : f, g = p.hideAppBar, k = p.hideSplunkBar, S = p.SplunkBarFallback, C = S === void 0 ? y : S, E = p.AppBarFallback, j = E === void 0 ? b : E, B = p.lazyLoadLayout, q = B === void 0 ? false : B, O = p.onLayoutComplete, P = p.onLayoutStart;
300
+ var A = document.createElement("div");
301
+ var F = document.createElement("div");
302
+ P === null || P === void 0 ? void 0 : P({
303
+ headerContainer: F,
304
+ bodyContainer: A
303
305
  });
304
306
  // The "theme" in enterprise used to be "enterprise" instead of "light"...
305
- var P = l === "light" || l === "enterprise" ? "light" : "dark";
306
- var A = {
307
- family: "enterprise",
308
- colorScheme: P,
309
- density: "comfortable"
307
+ var L = l === "light" || l === "enterprise" ? "light" : "dark";
308
+ var _ = {
309
+ family: h,
310
+ colorScheme: L,
311
+ density: u || (h === "prisma" ? "compact" : "comfortable")
310
312
  };
311
- var L;
312
- var _;
313
- if (E) {
313
+ var T;
314
+ var z;
315
+ if (q) {
314
316
  // render the React app immediately without waiting for layout API
315
- if (!p) {
316
- document.body.appendChild(O);
317
- _ = n( w().createElement(w().Fragment, null, !m && w().createElement(g, null), !s && w().createElement(S, null)), O);
317
+ if (!s) {
318
+ document.body.appendChild(F);
319
+ z = n( w().createElement(w().Fragment, null, !k && w().createElement(C, null), !g && w().createElement(j, null)), F);
318
320
  // explicitly set height and background of header container to avoid layout and color shift when fallback gets replaced
319
- var F = O.offsetHeight;
320
- var T = N(O, {
321
- hideSplunkBar: m,
322
- hideAppBar: s,
323
- headerHeight: F,
324
- AppBarFallback: S,
325
- SplunkBarFallback: g
321
+ var G = F.offsetHeight;
322
+ var I = U(F, {
323
+ hideSplunkBar: k,
324
+ hideAppBar: g,
325
+ headerHeight: G,
326
+ AppBarFallback: j,
327
+ SplunkBarFallback: C
326
328
  });
327
- O.style.height = "".concat(F, "px");
328
- O.style.background = "".concat(T);
329
+ F.style.height = "".concat(G, "px");
330
+ F.style.background = "".concat(I);
329
331
  }
330
- document.body.appendChild(q);
331
- L = D(e, n, q, a, A);
332
+ document.body.appendChild(A);
333
+ T = N(e, n, A, a, _);
332
334
  } else {
333
- document.body.appendChild(q);
334
- L = n( w().createElement(x(), A, w().createElement(H, d)), q);
335
+ document.body.appendChild(A);
336
+ T = n( w().createElement(x(), _, w().createElement(H, p)), A);
335
337
  }
336
- U(l, (function(r) {
338
+ R(l, (function(r) {
337
339
  var t;
338
340
  if (r) {
339
- t = r.create(d).getContainerElement();
340
- if (d.layout === "fixed") {
341
+ t = r.create(p).getContainerElement();
342
+ if (p.layout === "fixed") {
341
343
  // the above create method adds flex: 1 0 0
342
344
  // IE 11 disregards 0px shorthand for flex-basis component.
343
345
  // flex-basis 0% is better than 0px because css minification can remove px
@@ -361,29 +363,29 @@
361
363
  t = document.createElement("div");
362
364
  document.body.appendChild(t);
363
365
  }
364
- if (E) {
365
- if (!p) {
366
+ if (q) {
367
+ if (!s) {
366
368
  // replace placeholder nav bar with real nav bar
367
- _.unmount(O);
368
- var i = document.querySelector(R);
369
- var o = (!p && !m ? f : 0) + (!p && !s ? v : 0);
369
+ z.unmount(F);
370
+ var i = document.querySelector(D);
371
+ var o = (!s && !k ? m : 0) + (!s && !g ? v : 0);
370
372
  // set a min-height for basic nav bar components and auto height for any additional components like global banner
371
- O.style.minHeight = "".concat(o, "px");
372
- O.style.height = "auto";
373
- O.appendChild(i);
373
+ F.style.minHeight = "".concat(o, "px");
374
+ F.style.height = "auto";
375
+ F.appendChild(i);
374
376
  }
375
- t.appendChild(q);
376
- j === null || j === void 0 ? void 0 : j();
377
+ t.appendChild(A);
378
+ O === null || O === void 0 ? void 0 : O();
377
379
  } else {
378
380
  setTimeout((function() {
379
- L.unmount(q);
380
- L = D(e, n, q, a, A);
381
- t.appendChild(q);
382
- j === null || j === void 0 ? void 0 : j();
381
+ T.unmount(A);
382
+ T = N(e, n, A, a, _);
383
+ t.appendChild(A);
384
+ O === null || O === void 0 ? void 0 : O();
383
385
  }), 30);
384
386
  }
385
387
  }), {
386
- loader: c
388
+ loader: d
387
389
  });
388
390
  }
389
391
  /* harmony default export */ const K = J;
@@ -413,6 +415,8 @@
413
415
  * to the edge of the page.
414
416
  * @param {Boolean} [options.useGlobalLayerStack = true] - Wraps elements in @splunk/react-ui's LayerStackGlobalProvider.
415
417
  * @param {String} [options.theme = 'light'] - Used to theme UI elements. Ex. "light" or "dark".
418
+ * @param {String} [options.themeFamily = 'enterprise'] - Ex. Theme family to use for UI elements. Ex. "enterprise" or "prisma".
419
+ * @param {String} [options.themeDensity] - Ex. Theme density to use for UI elements. Ex. "compact" or "comfortable".
416
420
  * @param {String} [options.loader = 'scriptjs'] - Configures the loader used for the loading the layout - available loaders are "scriptjs" and "requirejs".
417
421
  * Change this only if the default loader does not work for your application.
418
422
  * @param {Boolean} [options.lazyLoadLayout = false] - Prioritizes loading the React element and lazily fetches and compiles the layout API (navigation bar).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splunk/react-page",
3
- "version": "8.0.0-beta.2",
3
+ "version": "8.0.0-beta.4",
4
4
  "description": "Load React components into the latest layout from Splunk Enterprise",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Splunk Inc.",
@@ -21,9 +21,9 @@
21
21
  "test:cypress:ci": "node src/tests/run-cypress-tests.js"
22
22
  },
23
23
  "dependencies": {
24
- "@splunk/react-ui": "5.0.0-beta.2",
24
+ "@splunk/react-ui": "5.0.0-beta.5",
25
25
  "@splunk/splunk-utils": "^3.2.0",
26
- "@splunk/themes": "1.0.0-beta.2",
26
+ "@splunk/themes": "1.0.0-beta.5",
27
27
  "@splunk/ui-utils": "^1.8.0",
28
28
  "prop-types": "^15.6.2",
29
29
  "scriptjs": "^2.5.8"
@@ -33,7 +33,7 @@
33
33
  "@babel/eslint-parser": "^7.16.0",
34
34
  "@splunk/babel-preset": "^4.0.0",
35
35
  "@splunk/eslint-config": "^5.0.0",
36
- "@splunk/react-docs": "1.0.0-beta.21.v5.2",
36
+ "@splunk/react-docs": "1.0.0-beta.22.v5",
37
37
  "@splunk/stylelint-config": "^5.0.0",
38
38
  "@splunk/webpack-configs": "^7.0.2",
39
39
  "babel-loader": "^8.3.0",