@cumulus-ui/components 0.5.0 → 0.5.1
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/README.md +282 -12
- package/dist/app-layout/index.d.ts +5 -0
- package/dist/app-layout/index.d.ts.map +1 -0
- package/dist/app-layout/internal.d.ts +22 -0
- package/dist/app-layout/internal.d.ts.map +1 -0
- package/dist/app-layout/styles.d.ts +5 -0
- package/dist/app-layout/styles.d.ts.map +1 -0
- package/dist/file-token-group/index.d.ts +5 -0
- package/dist/file-token-group/index.d.ts.map +1 -0
- package/dist/file-token-group/internal.d.ts +28 -0
- package/dist/file-token-group/internal.d.ts.map +1 -0
- package/dist/file-token-group/styles.d.ts +5 -0
- package/dist/file-token-group/styles.d.ts.map +1 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2909 -41
- package/dist/internal/styles/app-layout-content-wrapper.d.ts +2 -0
- package/dist/internal/styles/app-layout-content-wrapper.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-drawer.d.ts +2 -0
- package/dist/internal/styles/app-layout-drawer.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-mobile-toolbar.d.ts +2 -0
- package/dist/internal/styles/app-layout-mobile-toolbar.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-notifications.d.ts +2 -0
- package/dist/internal/styles/app-layout-notifications.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-resize.d.ts +2 -0
- package/dist/internal/styles/app-layout-resize.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-runtime-drawer.d.ts +2 -0
- package/dist/internal/styles/app-layout-runtime-drawer.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-split-panel.d.ts +2 -0
- package/dist/internal/styles/app-layout-split-panel.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-toggles.d.ts +2 -0
- package/dist/internal/styles/app-layout-toggles.d.ts.map +1 -0
- package/dist/internal/styles/app-layout-visual-refresh.d.ts +2 -0
- package/dist/internal/styles/app-layout-visual-refresh.d.ts.map +1 -0
- package/dist/item-card/index.d.ts +5 -0
- package/dist/item-card/index.d.ts.map +1 -0
- package/dist/item-card/internal.d.ts +25 -0
- package/dist/item-card/internal.d.ts.map +1 -0
- package/dist/item-card/styles.d.ts +5 -0
- package/dist/item-card/styles.d.ts.map +1 -0
- package/dist/panel-layout/index.d.ts +5 -0
- package/dist/panel-layout/index.d.ts.map +1 -0
- package/dist/panel-layout/internal.d.ts +32 -0
- package/dist/panel-layout/internal.d.ts.map +1 -0
- package/dist/panel-layout/styles.d.ts +5 -0
- package/dist/panel-layout/styles.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -64,8 +64,8 @@ function FormAssociatedMixin(superClass) {
|
|
|
64
64
|
this._defaultValue = this.value;
|
|
65
65
|
}
|
|
66
66
|
// ── Public API (thin wrappers around ElementInternals) ────────────
|
|
67
|
-
setFormValue(value,
|
|
68
|
-
this._internals.setFormValue(value,
|
|
67
|
+
setFormValue(value, state27) {
|
|
68
|
+
this._internals.setFormValue(value, state27);
|
|
69
69
|
}
|
|
70
70
|
setValidity(flags, message, anchor) {
|
|
71
71
|
if (flags && message) {
|
|
@@ -99,9 +99,9 @@ function FormAssociatedMixin(superClass) {
|
|
|
99
99
|
* @param state - Previously saved value or `FormData` entry.
|
|
100
100
|
* @param _mode - `'restore'` (bfcache) or `'autocomplete'`.
|
|
101
101
|
*/
|
|
102
|
-
formStateRestoreCallback(
|
|
103
|
-
if (typeof
|
|
104
|
-
this.value =
|
|
102
|
+
formStateRestoreCallback(state27, _mode) {
|
|
103
|
+
if (typeof state27 === "string") {
|
|
104
|
+
this.value = state27;
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
}
|
|
@@ -6119,7 +6119,7 @@ function computeCoordsFromPlacement(_ref, placement, rtl) {
|
|
|
6119
6119
|
}
|
|
6120
6120
|
return coords;
|
|
6121
6121
|
}
|
|
6122
|
-
async function detectOverflow(
|
|
6122
|
+
async function detectOverflow(state27, options) {
|
|
6123
6123
|
var _await$platform$isEle;
|
|
6124
6124
|
if (options === void 0) {
|
|
6125
6125
|
options = {};
|
|
@@ -6131,14 +6131,14 @@ async function detectOverflow(state23, options) {
|
|
|
6131
6131
|
rects,
|
|
6132
6132
|
elements,
|
|
6133
6133
|
strategy
|
|
6134
|
-
} =
|
|
6134
|
+
} = state27;
|
|
6135
6135
|
const {
|
|
6136
6136
|
boundary = "clippingAncestors",
|
|
6137
6137
|
rootBoundary = "viewport",
|
|
6138
6138
|
elementContext = "floating",
|
|
6139
6139
|
altBoundary = false,
|
|
6140
6140
|
padding = 0
|
|
6141
|
-
} = evaluate(options,
|
|
6141
|
+
} = evaluate(options, state27);
|
|
6142
6142
|
const paddingObject = getPaddingObject(padding);
|
|
6143
6143
|
const altContext = elementContext === "floating" ? "reference" : "floating";
|
|
6144
6144
|
const element = elements[altBoundary ? altContext : elementContext];
|
|
@@ -6270,7 +6270,7 @@ var flip = function(options) {
|
|
|
6270
6270
|
return {
|
|
6271
6271
|
name: "flip",
|
|
6272
6272
|
options,
|
|
6273
|
-
async fn(
|
|
6273
|
+
async fn(state27) {
|
|
6274
6274
|
var _middlewareData$arrow, _middlewareData$flip;
|
|
6275
6275
|
const {
|
|
6276
6276
|
placement,
|
|
@@ -6279,7 +6279,7 @@ var flip = function(options) {
|
|
|
6279
6279
|
initialPlacement,
|
|
6280
6280
|
platform: platform2,
|
|
6281
6281
|
elements
|
|
6282
|
-
} =
|
|
6282
|
+
} = state27;
|
|
6283
6283
|
const {
|
|
6284
6284
|
mainAxis: checkMainAxis = true,
|
|
6285
6285
|
crossAxis: checkCrossAxis = true,
|
|
@@ -6288,7 +6288,7 @@ var flip = function(options) {
|
|
|
6288
6288
|
fallbackAxisSideDirection = "none",
|
|
6289
6289
|
flipAlignment = true,
|
|
6290
6290
|
...detectOverflowOptions
|
|
6291
|
-
} = evaluate(options,
|
|
6291
|
+
} = evaluate(options, state27);
|
|
6292
6292
|
if ((_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
6293
6293
|
return {};
|
|
6294
6294
|
}
|
|
@@ -6302,7 +6302,7 @@ var flip = function(options) {
|
|
|
6302
6302
|
fallbackPlacements.push(...getOppositeAxisPlacements(initialPlacement, flipAlignment, fallbackAxisSideDirection, rtl));
|
|
6303
6303
|
}
|
|
6304
6304
|
const placements2 = [initialPlacement, ...fallbackPlacements];
|
|
6305
|
-
const overflow = await platform2.detectOverflow(
|
|
6305
|
+
const overflow = await platform2.detectOverflow(state27, detectOverflowOptions);
|
|
6306
6306
|
const overflows = [];
|
|
6307
6307
|
let overflowsData = ((_middlewareData$flip = middlewareData.flip) == null ? void 0 : _middlewareData$flip.overflows) || [];
|
|
6308
6308
|
if (checkMainAxis) {
|
|
@@ -6373,19 +6373,19 @@ var flip = function(options) {
|
|
|
6373
6373
|
};
|
|
6374
6374
|
};
|
|
6375
6375
|
var originSides = /* @__PURE__ */ new Set(["left", "top"]);
|
|
6376
|
-
async function convertValueToCoords(
|
|
6376
|
+
async function convertValueToCoords(state27, options) {
|
|
6377
6377
|
const {
|
|
6378
6378
|
placement,
|
|
6379
6379
|
platform: platform2,
|
|
6380
6380
|
elements
|
|
6381
|
-
} =
|
|
6381
|
+
} = state27;
|
|
6382
6382
|
const rtl = await (platform2.isRTL == null ? void 0 : platform2.isRTL(elements.floating));
|
|
6383
6383
|
const side = getSide(placement);
|
|
6384
6384
|
const alignment = getAlignment(placement);
|
|
6385
6385
|
const isVertical = getSideAxis(placement) === "y";
|
|
6386
6386
|
const mainAxisMulti = originSides.has(side) ? -1 : 1;
|
|
6387
6387
|
const crossAxisMulti = rtl && isVertical ? -1 : 1;
|
|
6388
|
-
const rawValue = evaluate(options,
|
|
6388
|
+
const rawValue = evaluate(options, state27);
|
|
6389
6389
|
let {
|
|
6390
6390
|
mainAxis,
|
|
6391
6391
|
crossAxis,
|
|
@@ -6417,15 +6417,15 @@ var offset = function(options) {
|
|
|
6417
6417
|
return {
|
|
6418
6418
|
name: "offset",
|
|
6419
6419
|
options,
|
|
6420
|
-
async fn(
|
|
6420
|
+
async fn(state27) {
|
|
6421
6421
|
var _middlewareData$offse, _middlewareData$arrow;
|
|
6422
6422
|
const {
|
|
6423
6423
|
x,
|
|
6424
6424
|
y,
|
|
6425
6425
|
placement,
|
|
6426
6426
|
middlewareData
|
|
6427
|
-
} =
|
|
6428
|
-
const diffCoords = await convertValueToCoords(
|
|
6427
|
+
} = state27;
|
|
6428
|
+
const diffCoords = await convertValueToCoords(state27, options);
|
|
6429
6429
|
if (placement === ((_middlewareData$offse = middlewareData.offset) == null ? void 0 : _middlewareData$offse.placement) && (_middlewareData$arrow = middlewareData.arrow) != null && _middlewareData$arrow.alignmentOffset) {
|
|
6430
6430
|
return {};
|
|
6431
6431
|
}
|
|
@@ -6447,13 +6447,13 @@ var shift = function(options) {
|
|
|
6447
6447
|
return {
|
|
6448
6448
|
name: "shift",
|
|
6449
6449
|
options,
|
|
6450
|
-
async fn(
|
|
6450
|
+
async fn(state27) {
|
|
6451
6451
|
const {
|
|
6452
6452
|
x,
|
|
6453
6453
|
y,
|
|
6454
6454
|
placement,
|
|
6455
6455
|
platform: platform2
|
|
6456
|
-
} =
|
|
6456
|
+
} = state27;
|
|
6457
6457
|
const {
|
|
6458
6458
|
mainAxis: checkMainAxis = true,
|
|
6459
6459
|
crossAxis: checkCrossAxis = false,
|
|
@@ -6470,12 +6470,12 @@ var shift = function(options) {
|
|
|
6470
6470
|
}
|
|
6471
6471
|
},
|
|
6472
6472
|
...detectOverflowOptions
|
|
6473
|
-
} = evaluate(options,
|
|
6473
|
+
} = evaluate(options, state27);
|
|
6474
6474
|
const coords = {
|
|
6475
6475
|
x,
|
|
6476
6476
|
y
|
|
6477
6477
|
};
|
|
6478
|
-
const overflow = await platform2.detectOverflow(
|
|
6478
|
+
const overflow = await platform2.detectOverflow(state27, detectOverflowOptions);
|
|
6479
6479
|
const crossAxis = getSideAxis(getSide(placement));
|
|
6480
6480
|
const mainAxis = getOppositeAxis(crossAxis);
|
|
6481
6481
|
let mainAxisCoord = coords[mainAxis];
|
|
@@ -6495,7 +6495,7 @@ var shift = function(options) {
|
|
|
6495
6495
|
crossAxisCoord = clamp(min2, crossAxisCoord, max2);
|
|
6496
6496
|
}
|
|
6497
6497
|
const limitedCoords = limiter.fn({
|
|
6498
|
-
...
|
|
6498
|
+
...state27,
|
|
6499
6499
|
[mainAxis]: mainAxisCoord,
|
|
6500
6500
|
[crossAxis]: crossAxisCoord
|
|
6501
6501
|
});
|
|
@@ -6586,8 +6586,8 @@ var containRe = /paint|layout|strict|content/;
|
|
|
6586
6586
|
var isNotNone = (value) => !!value && value !== "none";
|
|
6587
6587
|
var isWebKitValue;
|
|
6588
6588
|
function isContainingBlock(elementOrCss) {
|
|
6589
|
-
const
|
|
6590
|
-
return isNotNone(
|
|
6589
|
+
const css180 = isElement(elementOrCss) ? getComputedStyle2(elementOrCss) : elementOrCss;
|
|
6590
|
+
return isNotNone(css180.transform) || isNotNone(css180.translate) || isNotNone(css180.scale) || isNotNone(css180.rotate) || isNotNone(css180.perspective) || !isWebKit() && (isNotNone(css180.backdropFilter) || isNotNone(css180.filter)) || willChangeRe.test(css180.willChange || "") || containRe.test(css180.contain || "");
|
|
6591
6591
|
}
|
|
6592
6592
|
function getContainingBlock(element) {
|
|
6593
6593
|
let currentNode = getParentNode(element);
|
|
@@ -6672,9 +6672,9 @@ function getFrameElement(win) {
|
|
|
6672
6672
|
|
|
6673
6673
|
// node_modules/@floating-ui/dom/dist/floating-ui.dom.mjs
|
|
6674
6674
|
function getCssDimensions(element) {
|
|
6675
|
-
const
|
|
6676
|
-
let width = parseFloat(
|
|
6677
|
-
let height = parseFloat(
|
|
6675
|
+
const css180 = getComputedStyle2(element);
|
|
6676
|
+
let width = parseFloat(css180.width) || 0;
|
|
6677
|
+
let height = parseFloat(css180.height) || 0;
|
|
6678
6678
|
const hasOffset = isHTMLElement(element);
|
|
6679
6679
|
const offsetWidth = hasOffset ? element.offsetWidth : width;
|
|
6680
6680
|
const offsetHeight = hasOffset ? element.offsetHeight : height;
|
|
@@ -6768,9 +6768,9 @@ function getBoundingClientRect(element, includeScale, isFixedStrategy, offsetPar
|
|
|
6768
6768
|
while (currentIFrame && offsetParent && offsetWin !== currentWin) {
|
|
6769
6769
|
const iframeScale = getScale(currentIFrame);
|
|
6770
6770
|
const iframeRect = currentIFrame.getBoundingClientRect();
|
|
6771
|
-
const
|
|
6772
|
-
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(
|
|
6773
|
-
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(
|
|
6771
|
+
const css180 = getComputedStyle2(currentIFrame);
|
|
6772
|
+
const left = iframeRect.left + (currentIFrame.clientLeft + parseFloat(css180.paddingLeft)) * iframeScale.x;
|
|
6773
|
+
const top = iframeRect.top + (currentIFrame.clientTop + parseFloat(css180.paddingTop)) * iframeScale.y;
|
|
6774
6774
|
x *= iframeScale.x;
|
|
6775
6775
|
y *= iframeScale.y;
|
|
6776
6776
|
width *= iframeScale.x;
|
|
@@ -6847,15 +6847,15 @@ function getClientRects(element) {
|
|
|
6847
6847
|
return Array.from(element.getClientRects());
|
|
6848
6848
|
}
|
|
6849
6849
|
function getDocumentRect(element) {
|
|
6850
|
-
const
|
|
6850
|
+
const html82 = getDocumentElement(element);
|
|
6851
6851
|
const scroll = getNodeScroll(element);
|
|
6852
6852
|
const body = element.ownerDocument.body;
|
|
6853
|
-
const width = max(
|
|
6854
|
-
const height = max(
|
|
6853
|
+
const width = max(html82.scrollWidth, html82.clientWidth, body.scrollWidth, body.clientWidth);
|
|
6854
|
+
const height = max(html82.scrollHeight, html82.clientHeight, body.scrollHeight, body.clientHeight);
|
|
6855
6855
|
let x = -scroll.scrollLeft + getWindowScrollBarX(element);
|
|
6856
6856
|
const y = -scroll.scrollTop;
|
|
6857
6857
|
if (getComputedStyle2(body).direction === "rtl") {
|
|
6858
|
-
x += max(
|
|
6858
|
+
x += max(html82.clientWidth, body.clientWidth) - width;
|
|
6859
6859
|
}
|
|
6860
6860
|
return {
|
|
6861
6861
|
width,
|
|
@@ -6867,10 +6867,10 @@ function getDocumentRect(element) {
|
|
|
6867
6867
|
var SCROLLBAR_MAX = 25;
|
|
6868
6868
|
function getViewportRect(element, strategy) {
|
|
6869
6869
|
const win = getWindow(element);
|
|
6870
|
-
const
|
|
6870
|
+
const html82 = getDocumentElement(element);
|
|
6871
6871
|
const visualViewport = win.visualViewport;
|
|
6872
|
-
let width =
|
|
6873
|
-
let height =
|
|
6872
|
+
let width = html82.clientWidth;
|
|
6873
|
+
let height = html82.clientHeight;
|
|
6874
6874
|
let x = 0;
|
|
6875
6875
|
let y = 0;
|
|
6876
6876
|
if (visualViewport) {
|
|
@@ -6882,13 +6882,13 @@ function getViewportRect(element, strategy) {
|
|
|
6882
6882
|
y = visualViewport.offsetTop;
|
|
6883
6883
|
}
|
|
6884
6884
|
}
|
|
6885
|
-
const windowScrollbarX = getWindowScrollBarX(
|
|
6885
|
+
const windowScrollbarX = getWindowScrollBarX(html82);
|
|
6886
6886
|
if (windowScrollbarX <= 0) {
|
|
6887
|
-
const doc =
|
|
6887
|
+
const doc = html82.ownerDocument;
|
|
6888
6888
|
const body = doc.body;
|
|
6889
6889
|
const bodyStyles = getComputedStyle(body);
|
|
6890
6890
|
const bodyMarginInline = doc.compatMode === "CSS1Compat" ? parseFloat(bodyStyles.marginLeft) + parseFloat(bodyStyles.marginRight) || 0 : 0;
|
|
6891
|
-
const clippingStableScrollbarWidth = Math.abs(
|
|
6891
|
+
const clippingStableScrollbarWidth = Math.abs(html82.clientWidth - body.clientWidth - bodyMarginInline);
|
|
6892
6892
|
if (clippingStableScrollbarWidth <= SCROLLBAR_MAX) {
|
|
6893
6893
|
width -= clippingStableScrollbarWidth;
|
|
6894
6894
|
}
|
|
@@ -26503,10 +26503,2869 @@ __decorateClass([
|
|
|
26503
26503
|
var CsAnnotationContext = class extends CsAnnotationContextInternal {
|
|
26504
26504
|
};
|
|
26505
26505
|
customElements.define("cs-annotation-context", CsAnnotationContext);
|
|
26506
|
+
|
|
26507
|
+
// src/textarea/internal.ts
|
|
26508
|
+
import { css as css154, html as html73 } from "lit";
|
|
26509
|
+
import { property as property72 } from "lit/decorators.js";
|
|
26510
|
+
import { classMap as classMap59 } from "lit/directives/class-map.js";
|
|
26511
|
+
import { ifDefined as ifDefined36 } from "lit/directives/if-defined.js";
|
|
26512
|
+
import { consume as consume5 } from "@lit/context";
|
|
26513
|
+
|
|
26514
|
+
// src/textarea/styles.ts
|
|
26515
|
+
import { css as css153 } from "lit";
|
|
26516
|
+
var componentStyles69 = css153`
|
|
26517
|
+
.root {
|
|
26518
|
+
/* used for test-utils */
|
|
26519
|
+
}
|
|
26520
|
+
|
|
26521
|
+
.textarea {
|
|
26522
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
26523
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
26524
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
26525
|
+
font-weight: 400;
|
|
26526
|
+
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
26527
|
+
-webkit-font-smoothing: auto;
|
|
26528
|
+
-moz-osx-font-smoothing: auto;
|
|
26529
|
+
resize: auto;
|
|
26530
|
+
cursor: text;
|
|
26531
|
+
white-space: pre-wrap;
|
|
26532
|
+
padding-block: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
26533
|
+
padding-inline: var(--space-field-horizontal-0aq2ch, 12px);
|
|
26534
|
+
color: var(--awsui-style-color-default-6b9ypa, var(--color-text-body-default-vvtq8u, #0f141a));
|
|
26535
|
+
max-inline-size: 100%;
|
|
26536
|
+
inline-size: 100%;
|
|
26537
|
+
display: block;
|
|
26538
|
+
box-sizing: border-box;
|
|
26539
|
+
background-color: var(--awsui-style-background-default-6b9ypa, var(--color-background-input-default-ifz5bb, #ffffff));
|
|
26540
|
+
border-start-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
26541
|
+
border-start-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
26542
|
+
border-end-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
26543
|
+
border-end-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
26544
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-6b9ypa, var(--color-border-input-default-317xk5, #8c8c94));
|
|
26545
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-default-6b9ypa, var(--color-border-input-default-317xk5, #8c8c94));
|
|
26546
|
+
box-shadow: var(--awsui-style-box-shadow-default-6b9ypa);
|
|
26547
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
26548
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
26549
|
+
}
|
|
26550
|
+
.textarea:hover {
|
|
26551
|
+
border-color: var(--awsui-style-border-color-hover-6b9ypa, var(--awsui-style-border-color-default-6b9ypa, var(--color-border-input-default-317xk5, #8c8c94)));
|
|
26552
|
+
color: var(--awsui-style-color-hover-6b9ypa, var(--awsui-style-border-color-default-6b9ypa, var(--color-text-body-default-vvtq8u, #0f141a)));
|
|
26553
|
+
background-color: var(--awsui-style-background-hover-6b9ypa, var(--awsui-style-background-default-6b9ypa, var(--color-background-input-default-ifz5bb, #ffffff)));
|
|
26554
|
+
box-shadow: var(--awsui-style-box-shadow-hover-6b9ypa, --awsui-style-box-shadow-default-6b9ypa);
|
|
26555
|
+
}
|
|
26556
|
+
.textarea.textarea-readonly {
|
|
26557
|
+
background-color: var(--awsui-style-background-readonly-6b9ypa, var(--awsui-style-background-default-6b9ypa, var(--color-background-input-default-ifz5bb, #ffffff)));
|
|
26558
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-6b9ypa, var(--awsui-style-border-color-default-6b9ypa, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
|
|
26559
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-readonly-6b9ypa, var(--awsui-style-border-color-default-6b9ypa, var(--color-border-input-disabled-zgnzvk, #ebebf0)));
|
|
26560
|
+
color: var(--awsui-style-color-readonly-6b9ypa, var(--awsui-style-color-default-6b9ypa, var(--color-text-body-default-vvtq8u, #0f141a)));
|
|
26561
|
+
box-shadow: var(--awsui-style-box-shadow-readonly-6b9ypa);
|
|
26562
|
+
}
|
|
26563
|
+
.textarea::placeholder {
|
|
26564
|
+
color: var(--awsui-style-placeholder-color-6b9ypa, var(--color-text-input-placeholder-dclg8u, #656871));
|
|
26565
|
+
font-size: var(--awsui-style-placeholder-font-size-6b9ypa);
|
|
26566
|
+
font-style: var(--awsui-style-placeholder-font-style-6b9ypa, italic);
|
|
26567
|
+
font-weight: var(--awsui-style-placeholder-font-weight-6b9ypa);
|
|
26568
|
+
opacity: 1;
|
|
26569
|
+
}
|
|
26570
|
+
.textarea:focus {
|
|
26571
|
+
outline: 2px dotted transparent;
|
|
26572
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-6b9ypa, var(--color-border-input-focused-4z0pgn, #006ce0));
|
|
26573
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-focus-6b9ypa, var(--color-border-input-focused-4z0pgn, #006ce0));
|
|
26574
|
+
border-start-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
26575
|
+
border-start-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
26576
|
+
border-end-start-radius: var(--border-radius-input-7q0str, 8px);
|
|
26577
|
+
border-end-end-radius: var(--border-radius-input-7q0str, 8px);
|
|
26578
|
+
box-shadow: var(--awsui-style-box-shadow-focus-6b9ypa, 0 0 0 var(--border-control-focus-ring-shadow-spread-9mjajk, 1px) var(--color-border-item-focused-uk47pl, #006ce0));
|
|
26579
|
+
color: var(--awsui-style-color-focus-6b9ypa, var(--color-text-body-default-vvtq8u, #0f141a));
|
|
26580
|
+
background-color: var(--awsui-style-background-focus-6b9ypa, var(--color-background-input-default-ifz5bb, #ffffff));
|
|
26581
|
+
}
|
|
26582
|
+
.textarea:invalid {
|
|
26583
|
+
box-shadow: none;
|
|
26584
|
+
}
|
|
26585
|
+
.textarea:disabled {
|
|
26586
|
+
background-color: var(--awsui-style-background-disabled-6b9ypa, var(--color-background-input-disabled-dihaja, #ebebf0));
|
|
26587
|
+
border-block: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-6b9ypa, var(--color-border-input-disabled-zgnzvk, #ebebf0));
|
|
26588
|
+
border-inline: var(--border-width-field-2xc78x, 1px) solid var(--awsui-style-border-color-disabled-6b9ypa, var(--color-border-input-disabled-zgnzvk, #ebebf0));
|
|
26589
|
+
color: var(--awsui-style-color-disabled-6b9ypa, var(--color-text-input-disabled-wh1f3y, #b4b4bb));
|
|
26590
|
+
cursor: default;
|
|
26591
|
+
box-shadow: var(--awsui-style-box-shadow-disabled-6b9ypa);
|
|
26592
|
+
}
|
|
26593
|
+
.textarea:disabled::placeholder {
|
|
26594
|
+
color: var(--color-text-input-placeholder-disabled-wg87og, #b4b4bb);
|
|
26595
|
+
opacity: 1;
|
|
26596
|
+
}
|
|
26597
|
+
.textarea.textarea-invalid {
|
|
26598
|
+
color: var(--awsui-style-color-default-6b9ypa, var(--color-text-status-error-ksqavh, #db0000));
|
|
26599
|
+
border-color: var(--awsui-style-border-color-default-6b9ypa, var(--color-text-status-error-ksqavh, #db0000));
|
|
26600
|
+
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
26601
|
+
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
26602
|
+
}
|
|
26603
|
+
.textarea.textarea-invalid:focus {
|
|
26604
|
+
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
26605
|
+
}
|
|
26606
|
+
.textarea.textarea-warning {
|
|
26607
|
+
color: var(--awsui-style-color-default-6b9ypa, var(--color-text-status-warning-6meo06, #855900));
|
|
26608
|
+
border-color: var(--awsui-style-border-color-default-6b9ypa, var(--color-text-status-warning-6meo06, #855900));
|
|
26609
|
+
padding-inline-start: calc(var(--space-field-horizontal-0aq2ch, 12px) - (var(--border-invalid-width-3xd6e1, 8px) - var(--border-width-field-2xc78x, 1px)));
|
|
26610
|
+
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
26611
|
+
}
|
|
26612
|
+
.textarea.textarea-warning:focus {
|
|
26613
|
+
box-shadow: 0 0 0 var(--border-control-invalid-focus-ring-shadow-spread-9jjf96, 2px) var(--color-border-item-focused-uk47pl, #006ce0);
|
|
26614
|
+
}
|
|
26615
|
+
`;
|
|
26616
|
+
|
|
26617
|
+
// src/textarea/internal.ts
|
|
26618
|
+
var Base13 = FormAssociatedMixin(CsBaseElement);
|
|
26619
|
+
var hostStyles71 = css154`:host { display: block; }`;
|
|
26620
|
+
var CsTextareaInternal = class extends Base13 {
|
|
26621
|
+
constructor() {
|
|
26622
|
+
super(...arguments);
|
|
26623
|
+
this._formFieldCtx = defaultFormFieldContext;
|
|
26624
|
+
this.value = "";
|
|
26625
|
+
this.placeholder = "";
|
|
26626
|
+
this.readOnly = false;
|
|
26627
|
+
this.invalid = false;
|
|
26628
|
+
this.warning = false;
|
|
26629
|
+
this.rows = 3;
|
|
26630
|
+
this.autoFocus = false;
|
|
26631
|
+
this.ariaLabel = null;
|
|
26632
|
+
this.ariaDescribedby = null;
|
|
26633
|
+
this._onInput = (e) => {
|
|
26634
|
+
const target = e.target;
|
|
26635
|
+
this.value = target.value;
|
|
26636
|
+
const detail = { value: this.value };
|
|
26637
|
+
fireNonCancelableEvent(this, "change", detail);
|
|
26638
|
+
};
|
|
26639
|
+
this._onBlur = () => {
|
|
26640
|
+
fireNonCancelableEvent(this, "blur", null);
|
|
26641
|
+
};
|
|
26642
|
+
this._onFocus = () => {
|
|
26643
|
+
fireNonCancelableEvent(this, "focus", null);
|
|
26644
|
+
};
|
|
26645
|
+
this._onKeyDown = (e) => {
|
|
26646
|
+
const detail = {
|
|
26647
|
+
keyCode: e.keyCode,
|
|
26648
|
+
key: e.key,
|
|
26649
|
+
ctrlKey: e.ctrlKey,
|
|
26650
|
+
shiftKey: e.shiftKey,
|
|
26651
|
+
altKey: e.altKey,
|
|
26652
|
+
metaKey: e.metaKey,
|
|
26653
|
+
isComposing: e.isComposing
|
|
26654
|
+
};
|
|
26655
|
+
fireNonCancelableEvent(this, "keydown", detail);
|
|
26656
|
+
};
|
|
26657
|
+
this._onKeyUp = (e) => {
|
|
26658
|
+
const detail = {
|
|
26659
|
+
keyCode: e.keyCode,
|
|
26660
|
+
key: e.key,
|
|
26661
|
+
ctrlKey: e.ctrlKey,
|
|
26662
|
+
shiftKey: e.shiftKey,
|
|
26663
|
+
altKey: e.altKey,
|
|
26664
|
+
metaKey: e.metaKey,
|
|
26665
|
+
isComposing: e.isComposing
|
|
26666
|
+
};
|
|
26667
|
+
fireNonCancelableEvent(this, "keyup", detail);
|
|
26668
|
+
};
|
|
26669
|
+
}
|
|
26670
|
+
static {
|
|
26671
|
+
this.styles = [sharedStyles, componentStyles69, hostStyles71];
|
|
26672
|
+
}
|
|
26673
|
+
focus(options) {
|
|
26674
|
+
this._getTextarea()?.focus(options);
|
|
26675
|
+
}
|
|
26676
|
+
_getTextarea() {
|
|
26677
|
+
return this.shadowRoot?.querySelector("textarea");
|
|
26678
|
+
}
|
|
26679
|
+
get _isInvalid() {
|
|
26680
|
+
return this.invalid || this._formFieldCtx.invalid;
|
|
26681
|
+
}
|
|
26682
|
+
get _isWarning() {
|
|
26683
|
+
return (this.warning || this._formFieldCtx.warning) && !this._isInvalid;
|
|
26684
|
+
}
|
|
26685
|
+
get _resolvedAriaDescribedby() {
|
|
26686
|
+
const parts = [];
|
|
26687
|
+
if (this.ariaDescribedby) parts.push(this.ariaDescribedby);
|
|
26688
|
+
if (this._formFieldCtx.ariaDescribedby) parts.push(this._formFieldCtx.ariaDescribedby);
|
|
26689
|
+
return parts.length ? parts.join(" ") : void 0;
|
|
26690
|
+
}
|
|
26691
|
+
render() {
|
|
26692
|
+
const textareaClasses = {
|
|
26693
|
+
"textarea": true,
|
|
26694
|
+
"textarea-readonly": this.readOnly,
|
|
26695
|
+
"textarea-invalid": this._isInvalid,
|
|
26696
|
+
"textarea-warning": this._isWarning
|
|
26697
|
+
};
|
|
26698
|
+
const controlId = this._formFieldCtx.controlId || void 0;
|
|
26699
|
+
const ariaLabelledby = this._formFieldCtx.ariaLabelledby || void 0;
|
|
26700
|
+
return html73`
|
|
26701
|
+
<div class="root">
|
|
26702
|
+
<textarea
|
|
26703
|
+
class=${classMap59(textareaClasses)}
|
|
26704
|
+
.value=${this.value}
|
|
26705
|
+
placeholder=${ifDefined36(this.placeholder || void 0)}
|
|
26706
|
+
rows=${this.rows}
|
|
26707
|
+
?disabled=${this.disabled}
|
|
26708
|
+
?readonly=${this.readOnly}
|
|
26709
|
+
?autofocus=${this.autoFocus}
|
|
26710
|
+
id=${ifDefined36(controlId)}
|
|
26711
|
+
aria-label=${ifDefined36(this.ariaLabel || void 0)}
|
|
26712
|
+
aria-labelledby=${ifDefined36(!this.ariaLabel ? ariaLabelledby : void 0)}
|
|
26713
|
+
aria-describedby=${ifDefined36(this._resolvedAriaDescribedby)}
|
|
26714
|
+
aria-invalid=${ifDefined36(this._isInvalid ? "true" : void 0)}
|
|
26715
|
+
@input=${this._onInput}
|
|
26716
|
+
@blur=${this._onBlur}
|
|
26717
|
+
@focus=${this._onFocus}
|
|
26718
|
+
@keydown=${this._onKeyDown}
|
|
26719
|
+
@keyup=${this._onKeyUp}
|
|
26720
|
+
></textarea>
|
|
26721
|
+
</div>
|
|
26722
|
+
`;
|
|
26723
|
+
}
|
|
26724
|
+
};
|
|
26725
|
+
__decorateClass([
|
|
26726
|
+
consume5({ context: formFieldContext, subscribe: true })
|
|
26727
|
+
], CsTextareaInternal.prototype, "_formFieldCtx", 2);
|
|
26728
|
+
__decorateClass([
|
|
26729
|
+
property72({ type: String })
|
|
26730
|
+
], CsTextareaInternal.prototype, "value", 2);
|
|
26731
|
+
__decorateClass([
|
|
26732
|
+
property72({ type: String })
|
|
26733
|
+
], CsTextareaInternal.prototype, "placeholder", 2);
|
|
26734
|
+
__decorateClass([
|
|
26735
|
+
property72({ type: Boolean, reflect: true })
|
|
26736
|
+
], CsTextareaInternal.prototype, "readOnly", 2);
|
|
26737
|
+
__decorateClass([
|
|
26738
|
+
property72({ type: Boolean, reflect: true })
|
|
26739
|
+
], CsTextareaInternal.prototype, "invalid", 2);
|
|
26740
|
+
__decorateClass([
|
|
26741
|
+
property72({ type: Boolean, reflect: true })
|
|
26742
|
+
], CsTextareaInternal.prototype, "warning", 2);
|
|
26743
|
+
__decorateClass([
|
|
26744
|
+
property72({ type: Number })
|
|
26745
|
+
], CsTextareaInternal.prototype, "rows", 2);
|
|
26746
|
+
__decorateClass([
|
|
26747
|
+
property72({ type: Boolean })
|
|
26748
|
+
], CsTextareaInternal.prototype, "autoFocus", 2);
|
|
26749
|
+
__decorateClass([
|
|
26750
|
+
property72({ type: String })
|
|
26751
|
+
], CsTextareaInternal.prototype, "ariaLabel", 2);
|
|
26752
|
+
__decorateClass([
|
|
26753
|
+
property72({ type: String })
|
|
26754
|
+
], CsTextareaInternal.prototype, "ariaDescribedby", 2);
|
|
26755
|
+
|
|
26756
|
+
// src/textarea/index.ts
|
|
26757
|
+
var CsTextarea = class extends CsTextareaInternal {
|
|
26758
|
+
};
|
|
26759
|
+
customElements.define("cs-textarea", CsTextarea);
|
|
26760
|
+
|
|
26761
|
+
// src/text-filter/internal.ts
|
|
26762
|
+
import { css as css156, html as html74, nothing as nothing41 } from "lit";
|
|
26763
|
+
import { property as property73 } from "lit/decorators.js";
|
|
26764
|
+
|
|
26765
|
+
// src/text-filter/styles.ts
|
|
26766
|
+
import { css as css155 } from "lit";
|
|
26767
|
+
var componentStyles70 = css155`
|
|
26768
|
+
.root {
|
|
26769
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
26770
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
26771
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
26772
|
+
font-weight: 400;
|
|
26773
|
+
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
26774
|
+
-webkit-font-smoothing: auto;
|
|
26775
|
+
-moz-osx-font-smoothing: auto;
|
|
26776
|
+
display: flex;
|
|
26777
|
+
align-items: center;
|
|
26778
|
+
max-inline-size: calc(688px - 2 * var(--space-l-2ud1p3, 20px));
|
|
26779
|
+
}
|
|
26780
|
+
|
|
26781
|
+
.input {
|
|
26782
|
+
flex: 1;
|
|
26783
|
+
}
|
|
26784
|
+
|
|
26785
|
+
.results {
|
|
26786
|
+
color: var(--color-text-form-label-6sbm75, #0f141a);
|
|
26787
|
+
display: inline-block;
|
|
26788
|
+
box-sizing: border-box;
|
|
26789
|
+
white-space: nowrap;
|
|
26790
|
+
padding-inline-start: var(--space-s-tvghoh, 12px);
|
|
26791
|
+
}
|
|
26792
|
+
`;
|
|
26793
|
+
|
|
26794
|
+
// src/text-filter/internal.ts
|
|
26795
|
+
var hostStyles72 = css156`:host { display: block; }`;
|
|
26796
|
+
var CsTextFilterInternal = class extends CsBaseElement {
|
|
26797
|
+
constructor() {
|
|
26798
|
+
super(...arguments);
|
|
26799
|
+
this.filteringText = "";
|
|
26800
|
+
this.filteringPlaceholder = "";
|
|
26801
|
+
this.filteringAriaLabel = "";
|
|
26802
|
+
this.filteringClearAriaLabel = "";
|
|
26803
|
+
this.countText = "";
|
|
26804
|
+
this.disabled = false;
|
|
26805
|
+
this._debounceTimer = null;
|
|
26806
|
+
this._onInputChange = (e) => {
|
|
26807
|
+
e.stopPropagation();
|
|
26808
|
+
const detail = e.detail;
|
|
26809
|
+
this.filteringText = detail.value;
|
|
26810
|
+
const changeDetail = { filteringText: this.filteringText };
|
|
26811
|
+
fireNonCancelableEvent(this, "change", changeDetail);
|
|
26812
|
+
this._clearDebounce();
|
|
26813
|
+
this._debounceTimer = setTimeout(() => {
|
|
26814
|
+
const delayedDetail = { filteringText: this.filteringText };
|
|
26815
|
+
fireNonCancelableEvent(this, "delayedChange", delayedDetail);
|
|
26816
|
+
}, 400);
|
|
26817
|
+
};
|
|
26818
|
+
}
|
|
26819
|
+
static {
|
|
26820
|
+
this.styles = [sharedStyles, componentStyles70, hostStyles72];
|
|
26821
|
+
}
|
|
26822
|
+
disconnectedCallback() {
|
|
26823
|
+
super.disconnectedCallback();
|
|
26824
|
+
this._clearDebounce();
|
|
26825
|
+
}
|
|
26826
|
+
focus(options) {
|
|
26827
|
+
const input = this.shadowRoot?.querySelector("cs-input");
|
|
26828
|
+
if (input) {
|
|
26829
|
+
input.focus(options);
|
|
26830
|
+
}
|
|
26831
|
+
}
|
|
26832
|
+
_clearDebounce() {
|
|
26833
|
+
if (this._debounceTimer !== null) {
|
|
26834
|
+
clearTimeout(this._debounceTimer);
|
|
26835
|
+
this._debounceTimer = null;
|
|
26836
|
+
}
|
|
26837
|
+
}
|
|
26838
|
+
render() {
|
|
26839
|
+
const showResults = this.filteringText.length > 0 && !!this.countText;
|
|
26840
|
+
return html74`
|
|
26841
|
+
<div class="root">
|
|
26842
|
+
<div class="input">
|
|
26843
|
+
<cs-input
|
|
26844
|
+
type="search"
|
|
26845
|
+
.value=${this.filteringText}
|
|
26846
|
+
placeholder=${this.filteringPlaceholder}
|
|
26847
|
+
?disabled=${this.disabled}
|
|
26848
|
+
aria-label=${this.filteringAriaLabel || "Filter"}
|
|
26849
|
+
clear-aria-label=${this.filteringClearAriaLabel || "Clear filter"}
|
|
26850
|
+
@change=${this._onInputChange}
|
|
26851
|
+
></cs-input>
|
|
26852
|
+
</div>
|
|
26853
|
+
${showResults ? html74`<span class="results">${this.countText}</span>` : nothing41}
|
|
26854
|
+
</div>
|
|
26855
|
+
`;
|
|
26856
|
+
}
|
|
26857
|
+
};
|
|
26858
|
+
__decorateClass([
|
|
26859
|
+
property73({ type: String })
|
|
26860
|
+
], CsTextFilterInternal.prototype, "filteringText", 2);
|
|
26861
|
+
__decorateClass([
|
|
26862
|
+
property73({ type: String })
|
|
26863
|
+
], CsTextFilterInternal.prototype, "filteringPlaceholder", 2);
|
|
26864
|
+
__decorateClass([
|
|
26865
|
+
property73({ type: String })
|
|
26866
|
+
], CsTextFilterInternal.prototype, "filteringAriaLabel", 2);
|
|
26867
|
+
__decorateClass([
|
|
26868
|
+
property73({ type: String })
|
|
26869
|
+
], CsTextFilterInternal.prototype, "filteringClearAriaLabel", 2);
|
|
26870
|
+
__decorateClass([
|
|
26871
|
+
property73({ type: String })
|
|
26872
|
+
], CsTextFilterInternal.prototype, "countText", 2);
|
|
26873
|
+
__decorateClass([
|
|
26874
|
+
property73({ type: Boolean, reflect: true })
|
|
26875
|
+
], CsTextFilterInternal.prototype, "disabled", 2);
|
|
26876
|
+
|
|
26877
|
+
// src/text-filter/index.ts
|
|
26878
|
+
var CsTextFilter = class extends CsTextFilterInternal {
|
|
26879
|
+
};
|
|
26880
|
+
customElements.define("cs-text-filter", CsTextFilter);
|
|
26881
|
+
|
|
26882
|
+
// src/time-input/internal.ts
|
|
26883
|
+
import { css as css158, html as html75 } from "lit";
|
|
26884
|
+
import { property as property74 } from "lit/decorators.js";
|
|
26885
|
+
import { classMap as classMap60 } from "lit/directives/class-map.js";
|
|
26886
|
+
import { ifDefined as ifDefined37 } from "lit/directives/if-defined.js";
|
|
26887
|
+
import { consume as consume6 } from "@lit/context";
|
|
26888
|
+
|
|
26889
|
+
// src/time-input/styles.ts
|
|
26890
|
+
import { css as css157 } from "lit";
|
|
26891
|
+
var componentStyles71 = css157`
|
|
26892
|
+
|
|
26893
|
+
`;
|
|
26894
|
+
|
|
26895
|
+
// src/time-input/internal.ts
|
|
26896
|
+
var Base14 = FormAssociatedMixin(CsBaseElement);
|
|
26897
|
+
var hostStyles73 = css158`:host { display: block; }`;
|
|
26898
|
+
var CsTimeInputInternal = class extends Base14 {
|
|
26899
|
+
constructor() {
|
|
26900
|
+
super(...arguments);
|
|
26901
|
+
this._formFieldCtx = defaultFormFieldContext;
|
|
26902
|
+
this.value = "";
|
|
26903
|
+
this.format = "hh:mm";
|
|
26904
|
+
this.placeholder = "";
|
|
26905
|
+
this.readOnly = false;
|
|
26906
|
+
this.invalid = false;
|
|
26907
|
+
this.warning = false;
|
|
26908
|
+
this.autoFocus = false;
|
|
26909
|
+
this.ariaLabel = null;
|
|
26910
|
+
this.ariaDescribedby = null;
|
|
26911
|
+
this._onInput = (e) => {
|
|
26912
|
+
const target = e.target;
|
|
26913
|
+
this.value = target.value;
|
|
26914
|
+
const detail = { value: this.value };
|
|
26915
|
+
fireNonCancelableEvent(this, "change", detail);
|
|
26916
|
+
};
|
|
26917
|
+
this._onBlur = () => {
|
|
26918
|
+
fireNonCancelableEvent(this, "blur", null);
|
|
26919
|
+
};
|
|
26920
|
+
this._onFocus = () => {
|
|
26921
|
+
fireNonCancelableEvent(this, "focus", null);
|
|
26922
|
+
};
|
|
26923
|
+
}
|
|
26924
|
+
static {
|
|
26925
|
+
this.styles = [sharedStyles, componentStyles44, componentStyles71, hostStyles73];
|
|
26926
|
+
}
|
|
26927
|
+
focus(options) {
|
|
26928
|
+
this.shadowRoot?.querySelector("input")?.focus(options);
|
|
26929
|
+
}
|
|
26930
|
+
get _isInvalid() {
|
|
26931
|
+
return this.invalid || this._formFieldCtx.invalid;
|
|
26932
|
+
}
|
|
26933
|
+
get _isWarning() {
|
|
26934
|
+
return (this.warning || this._formFieldCtx.warning) && !this._isInvalid;
|
|
26935
|
+
}
|
|
26936
|
+
get _resolvedAriaDescribedby() {
|
|
26937
|
+
const parts = [];
|
|
26938
|
+
if (this.ariaDescribedby) parts.push(this.ariaDescribedby);
|
|
26939
|
+
if (this._formFieldCtx.ariaDescribedby) parts.push(this._formFieldCtx.ariaDescribedby);
|
|
26940
|
+
return parts.length ? parts.join(" ") : void 0;
|
|
26941
|
+
}
|
|
26942
|
+
get _resolvedPlaceholder() {
|
|
26943
|
+
return this.placeholder || this.format;
|
|
26944
|
+
}
|
|
26945
|
+
render() {
|
|
26946
|
+
const inputClasses = {
|
|
26947
|
+
"input": true,
|
|
26948
|
+
"input-readonly": this.readOnly,
|
|
26949
|
+
"input-invalid": this._isInvalid,
|
|
26950
|
+
"input-warning": this._isWarning
|
|
26951
|
+
};
|
|
26952
|
+
const controlId = this._formFieldCtx.controlId || void 0;
|
|
26953
|
+
const ariaLabelledby = this._formFieldCtx.ariaLabelledby || void 0;
|
|
26954
|
+
return html75`
|
|
26955
|
+
<div class="root">
|
|
26956
|
+
<div class="input-container">
|
|
26957
|
+
<input
|
|
26958
|
+
class=${classMap60(inputClasses)}
|
|
26959
|
+
type="text"
|
|
26960
|
+
.value=${this.value}
|
|
26961
|
+
placeholder=${this._resolvedPlaceholder}
|
|
26962
|
+
?disabled=${this.disabled}
|
|
26963
|
+
?readonly=${this.readOnly}
|
|
26964
|
+
?autofocus=${this.autoFocus}
|
|
26965
|
+
id=${ifDefined37(controlId)}
|
|
26966
|
+
aria-label=${ifDefined37(this.ariaLabel || void 0)}
|
|
26967
|
+
aria-labelledby=${ifDefined37(!this.ariaLabel ? ariaLabelledby : void 0)}
|
|
26968
|
+
aria-describedby=${ifDefined37(this._resolvedAriaDescribedby)}
|
|
26969
|
+
aria-invalid=${ifDefined37(this._isInvalid ? "true" : void 0)}
|
|
26970
|
+
@input=${this._onInput}
|
|
26971
|
+
@blur=${this._onBlur}
|
|
26972
|
+
@focus=${this._onFocus}
|
|
26973
|
+
/>
|
|
26974
|
+
</div>
|
|
26975
|
+
</div>
|
|
26976
|
+
`;
|
|
26977
|
+
}
|
|
26978
|
+
};
|
|
26979
|
+
__decorateClass([
|
|
26980
|
+
consume6({ context: formFieldContext, subscribe: true })
|
|
26981
|
+
], CsTimeInputInternal.prototype, "_formFieldCtx", 2);
|
|
26982
|
+
__decorateClass([
|
|
26983
|
+
property74({ type: String })
|
|
26984
|
+
], CsTimeInputInternal.prototype, "value", 2);
|
|
26985
|
+
__decorateClass([
|
|
26986
|
+
property74({ type: String })
|
|
26987
|
+
], CsTimeInputInternal.prototype, "format", 2);
|
|
26988
|
+
__decorateClass([
|
|
26989
|
+
property74({ type: String })
|
|
26990
|
+
], CsTimeInputInternal.prototype, "placeholder", 2);
|
|
26991
|
+
__decorateClass([
|
|
26992
|
+
property74({ type: Boolean, reflect: true })
|
|
26993
|
+
], CsTimeInputInternal.prototype, "readOnly", 2);
|
|
26994
|
+
__decorateClass([
|
|
26995
|
+
property74({ type: Boolean, reflect: true })
|
|
26996
|
+
], CsTimeInputInternal.prototype, "invalid", 2);
|
|
26997
|
+
__decorateClass([
|
|
26998
|
+
property74({ type: Boolean, reflect: true })
|
|
26999
|
+
], CsTimeInputInternal.prototype, "warning", 2);
|
|
27000
|
+
__decorateClass([
|
|
27001
|
+
property74({ type: Boolean })
|
|
27002
|
+
], CsTimeInputInternal.prototype, "autoFocus", 2);
|
|
27003
|
+
__decorateClass([
|
|
27004
|
+
property74({ type: String })
|
|
27005
|
+
], CsTimeInputInternal.prototype, "ariaLabel", 2);
|
|
27006
|
+
__decorateClass([
|
|
27007
|
+
property74({ type: String })
|
|
27008
|
+
], CsTimeInputInternal.prototype, "ariaDescribedby", 2);
|
|
27009
|
+
|
|
27010
|
+
// src/time-input/index.ts
|
|
27011
|
+
var CsTimeInput = class extends CsTimeInputInternal {
|
|
27012
|
+
};
|
|
27013
|
+
customElements.define("cs-time-input", CsTimeInput);
|
|
27014
|
+
|
|
27015
|
+
// src/hotspot/internal.ts
|
|
27016
|
+
import { css as css160, html as html76, nothing as nothing42 } from "lit";
|
|
27017
|
+
import { property as property75, state as state23 } from "lit/decorators.js";
|
|
27018
|
+
import { classMap as classMap61 } from "lit/directives/class-map.js";
|
|
27019
|
+
import { consume as consume7 } from "@lit/context";
|
|
27020
|
+
|
|
27021
|
+
// src/hotspot/styles.ts
|
|
27022
|
+
import { css as css159 } from "lit";
|
|
27023
|
+
var componentStyles72 = css159`
|
|
27024
|
+
.wrapper {
|
|
27025
|
+
position: relative;
|
|
27026
|
+
}
|
|
27027
|
+
|
|
27028
|
+
.elementWrapper {
|
|
27029
|
+
flex: 1;
|
|
27030
|
+
}
|
|
27031
|
+
|
|
27032
|
+
.markerWrapper {
|
|
27033
|
+
position: absolute;
|
|
27034
|
+
inset-block-start: 0;
|
|
27035
|
+
}
|
|
27036
|
+
|
|
27037
|
+
.placement-right {
|
|
27038
|
+
inset-inline-start: 100%;
|
|
27039
|
+
margin-inline-start: var(--space-xxs-hwfkai, 4px);
|
|
27040
|
+
}
|
|
27041
|
+
|
|
27042
|
+
.placement-left {
|
|
27043
|
+
inset-inline-end: 100%;
|
|
27044
|
+
margin-inline-end: var(--space-xxs-hwfkai, 4px);
|
|
27045
|
+
}
|
|
27046
|
+
|
|
27047
|
+
.inlineWrapper {
|
|
27048
|
+
margin-inline: var(--space-xxs-hwfkai, 4px);
|
|
27049
|
+
}
|
|
27050
|
+
`;
|
|
27051
|
+
|
|
27052
|
+
// src/hotspot/internal.ts
|
|
27053
|
+
var hostStyles74 = css160`:host { display: inline-block; }`;
|
|
27054
|
+
var CsHotspotInternal = class extends CsBaseElement {
|
|
27055
|
+
constructor() {
|
|
27056
|
+
super(...arguments);
|
|
27057
|
+
this.hotspotId = "";
|
|
27058
|
+
this.side = "right";
|
|
27059
|
+
this.direction = "top";
|
|
27060
|
+
this._popoverOpen = false;
|
|
27061
|
+
this._onHotspotClick = () => {
|
|
27062
|
+
if (this._isActive) {
|
|
27063
|
+
this._popoverOpen = !this._popoverOpen;
|
|
27064
|
+
}
|
|
27065
|
+
};
|
|
27066
|
+
this._onDismiss = () => {
|
|
27067
|
+
this._popoverOpen = false;
|
|
27068
|
+
this._annotationCtx?.onDismiss();
|
|
27069
|
+
};
|
|
27070
|
+
this._onNext = () => {
|
|
27071
|
+
const ctx = this._annotationCtx;
|
|
27072
|
+
if (!ctx) return;
|
|
27073
|
+
this._popoverOpen = false;
|
|
27074
|
+
ctx.onStepChange({ step: ctx.currentStepIndex + 1, reason: "next" });
|
|
27075
|
+
};
|
|
27076
|
+
this._onPrevious = () => {
|
|
27077
|
+
const ctx = this._annotationCtx;
|
|
27078
|
+
if (!ctx) return;
|
|
27079
|
+
this._popoverOpen = false;
|
|
27080
|
+
ctx.onStepChange({ step: ctx.currentStepIndex - 1, reason: "previous" });
|
|
27081
|
+
};
|
|
27082
|
+
this._onFinish = () => {
|
|
27083
|
+
this._popoverOpen = false;
|
|
27084
|
+
this._annotationCtx?.onDismiss();
|
|
27085
|
+
};
|
|
27086
|
+
}
|
|
27087
|
+
static {
|
|
27088
|
+
this.styles = [sharedStyles, componentStyles72, hostStyles74];
|
|
27089
|
+
}
|
|
27090
|
+
get _isActive() {
|
|
27091
|
+
const ctx = this._annotationCtx;
|
|
27092
|
+
if (!ctx?.currentTutorial) return false;
|
|
27093
|
+
let stepIndex = 0;
|
|
27094
|
+
for (const task of ctx.currentTutorial.tasks) {
|
|
27095
|
+
for (const step of task.steps) {
|
|
27096
|
+
if (stepIndex === ctx.currentStepIndex && step.hotspotId === this.hotspotId) {
|
|
27097
|
+
return true;
|
|
27098
|
+
}
|
|
27099
|
+
stepIndex++;
|
|
27100
|
+
}
|
|
27101
|
+
}
|
|
27102
|
+
return false;
|
|
27103
|
+
}
|
|
27104
|
+
get _currentStep() {
|
|
27105
|
+
const ctx = this._annotationCtx;
|
|
27106
|
+
if (!ctx?.currentTutorial) return null;
|
|
27107
|
+
let stepIndex = 0;
|
|
27108
|
+
for (const task of ctx.currentTutorial.tasks) {
|
|
27109
|
+
for (const step of task.steps) {
|
|
27110
|
+
if (stepIndex === ctx.currentStepIndex && step.hotspotId === this.hotspotId) {
|
|
27111
|
+
return { step, globalIndex: stepIndex };
|
|
27112
|
+
}
|
|
27113
|
+
stepIndex++;
|
|
27114
|
+
}
|
|
27115
|
+
}
|
|
27116
|
+
return null;
|
|
27117
|
+
}
|
|
27118
|
+
render() {
|
|
27119
|
+
const isActive = this._isActive;
|
|
27120
|
+
const ctx = this._annotationCtx;
|
|
27121
|
+
const placementClass = this.side === "left" ? "placement-left" : "placement-right";
|
|
27122
|
+
const hotspotButton = isActive ? html76`
|
|
27123
|
+
<div class="${classMap61({ markerWrapper: true, [placementClass]: true })}">
|
|
27124
|
+
<cs-button
|
|
27125
|
+
variant="icon"
|
|
27126
|
+
icon-name="status-info"
|
|
27127
|
+
aria-label=${ctx?.i18nStrings?.labelHotspot(this._popoverOpen, ctx.currentStepIndex, ctx.totalSteps) ?? "Hotspot"}
|
|
27128
|
+
aria-expanded=${this._popoverOpen}
|
|
27129
|
+
@click=${this._onHotspotClick}
|
|
27130
|
+
></cs-button>
|
|
27131
|
+
</div>
|
|
27132
|
+
` : nothing42;
|
|
27133
|
+
const currentStep = this._currentStep;
|
|
27134
|
+
const popoverContent = this._popoverOpen && isActive && currentStep && ctx ? html76`
|
|
27135
|
+
<div class="annotation-popover" role="dialog" aria-label="Annotation">
|
|
27136
|
+
<div class="annotation-header">
|
|
27137
|
+
<span class="annotation-step-counter">
|
|
27138
|
+
${ctx.i18nStrings.stepCounterText(currentStep.globalIndex + 1, ctx.totalSteps)}
|
|
27139
|
+
</span>
|
|
27140
|
+
<cs-button
|
|
27141
|
+
variant="icon"
|
|
27142
|
+
icon-name="close"
|
|
27143
|
+
aria-label=${ctx.i18nStrings.labelDismissAnnotation}
|
|
27144
|
+
@click=${this._onDismiss}
|
|
27145
|
+
></cs-button>
|
|
27146
|
+
</div>
|
|
27147
|
+
<div class="annotation-content">${currentStep.step.content}</div>
|
|
27148
|
+
<div class="annotation-actions">
|
|
27149
|
+
${currentStep.globalIndex > 0 ? html76`
|
|
27150
|
+
<cs-button variant="link" @click=${this._onPrevious}>
|
|
27151
|
+
${ctx.i18nStrings.previousButtonText}
|
|
27152
|
+
</cs-button>
|
|
27153
|
+
` : nothing42}
|
|
27154
|
+
${currentStep.globalIndex < ctx.totalSteps - 1 ? html76`
|
|
27155
|
+
<cs-button variant="primary" @click=${this._onNext}>
|
|
27156
|
+
${ctx.i18nStrings.nextButtonText}
|
|
27157
|
+
</cs-button>
|
|
27158
|
+
` : html76`
|
|
27159
|
+
<cs-button variant="primary" @click=${this._onFinish}>
|
|
27160
|
+
${ctx.i18nStrings.finishButtonText}
|
|
27161
|
+
</cs-button>
|
|
27162
|
+
`}
|
|
27163
|
+
</div>
|
|
27164
|
+
</div>
|
|
27165
|
+
` : nothing42;
|
|
27166
|
+
return html76`
|
|
27167
|
+
<div class="wrapper">
|
|
27168
|
+
<div class="elementWrapper">
|
|
27169
|
+
<slot></slot>
|
|
27170
|
+
</div>
|
|
27171
|
+
${hotspotButton}
|
|
27172
|
+
${popoverContent}
|
|
27173
|
+
</div>
|
|
27174
|
+
`;
|
|
27175
|
+
}
|
|
27176
|
+
};
|
|
27177
|
+
__decorateClass([
|
|
27178
|
+
property75({ type: String })
|
|
27179
|
+
], CsHotspotInternal.prototype, "hotspotId", 2);
|
|
27180
|
+
__decorateClass([
|
|
27181
|
+
property75({ type: String })
|
|
27182
|
+
], CsHotspotInternal.prototype, "side", 2);
|
|
27183
|
+
__decorateClass([
|
|
27184
|
+
property75({ type: String })
|
|
27185
|
+
], CsHotspotInternal.prototype, "direction", 2);
|
|
27186
|
+
__decorateClass([
|
|
27187
|
+
consume7({ context: annotationContext, subscribe: true })
|
|
27188
|
+
], CsHotspotInternal.prototype, "_annotationCtx", 2);
|
|
27189
|
+
__decorateClass([
|
|
27190
|
+
state23()
|
|
27191
|
+
], CsHotspotInternal.prototype, "_popoverOpen", 2);
|
|
27192
|
+
|
|
27193
|
+
// src/hotspot/index.ts
|
|
27194
|
+
var CsHotspot = class extends CsHotspotInternal {
|
|
27195
|
+
};
|
|
27196
|
+
customElements.define("cs-hotspot", CsHotspot);
|
|
27197
|
+
|
|
27198
|
+
// src/tutorial-panel/internal.ts
|
|
27199
|
+
import { css as css162, html as html77, nothing as nothing43 } from "lit";
|
|
27200
|
+
import { property as property76, state as state24 } from "lit/decorators.js";
|
|
27201
|
+
import { classMap as classMap62 } from "lit/directives/class-map.js";
|
|
27202
|
+
|
|
27203
|
+
// src/tutorial-panel/styles.ts
|
|
27204
|
+
import { css as css161 } from "lit";
|
|
27205
|
+
var componentStyles73 = css161`
|
|
27206
|
+
.tutorial-panel {
|
|
27207
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
27208
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
27209
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
27210
|
+
font-weight: 400;
|
|
27211
|
+
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
27212
|
+
-webkit-font-smoothing: auto;
|
|
27213
|
+
-moz-osx-font-smoothing: auto;
|
|
27214
|
+
padding-block-start: 0;
|
|
27215
|
+
padding-block-end: var(--space-m-dsumyt, 16px);
|
|
27216
|
+
padding-inline: var(--space-l-2ud1p3, 20px);
|
|
27217
|
+
}
|
|
27218
|
+
.tutorial-panel:focus {
|
|
27219
|
+
outline: none;
|
|
27220
|
+
}
|
|
27221
|
+
:host-context([data-awsui-focus-visible=true]) .tutorial-panel:focus {
|
|
27222
|
+
position: relative;
|
|
27223
|
+
}
|
|
27224
|
+
:host-context([data-awsui-focus-visible=true]) .tutorial-panel:focus {
|
|
27225
|
+
outline: 2px dotted transparent;
|
|
27226
|
+
outline-offset: calc(0px - 1px);
|
|
27227
|
+
}
|
|
27228
|
+
:host-context([data-awsui-focus-visible=true]) .tutorial-panel:focus::before {
|
|
27229
|
+
content: " ";
|
|
27230
|
+
display: block;
|
|
27231
|
+
position: absolute;
|
|
27232
|
+
inset-inline-start: calc(-1 * 0px);
|
|
27233
|
+
inset-block-start: calc(-1 * 0px);
|
|
27234
|
+
inline-size: calc(100% + 0px + 0px);
|
|
27235
|
+
block-size: calc(100% + 0px + 0px);
|
|
27236
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27237
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27238
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27239
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27240
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
27241
|
+
}
|
|
27242
|
+
`;
|
|
27243
|
+
|
|
27244
|
+
// src/tutorial-panel/internal.ts
|
|
27245
|
+
var hostStyles75 = css162`:host { display: block; }`;
|
|
27246
|
+
var CsTutorialPanelInternal = class extends CsBaseElement {
|
|
27247
|
+
constructor() {
|
|
27248
|
+
super(...arguments);
|
|
27249
|
+
this.tutorials = [];
|
|
27250
|
+
this.loading = false;
|
|
27251
|
+
this._viewState = "list";
|
|
27252
|
+
this._activeTutorial = null;
|
|
27253
|
+
this._onDismissTutorial = () => {
|
|
27254
|
+
const tutorial = this._activeTutorial;
|
|
27255
|
+
this._activeTutorial = null;
|
|
27256
|
+
this._viewState = "list";
|
|
27257
|
+
if (tutorial) {
|
|
27258
|
+
fireNonCancelableEvent(this, "feedbackClick", { tutorial });
|
|
27259
|
+
}
|
|
27260
|
+
};
|
|
27261
|
+
this._onCompleteTutorial = () => {
|
|
27262
|
+
this._viewState = "completed";
|
|
27263
|
+
};
|
|
27264
|
+
this._onBackToList = () => {
|
|
27265
|
+
this._activeTutorial = null;
|
|
27266
|
+
this._viewState = "list";
|
|
27267
|
+
};
|
|
27268
|
+
}
|
|
27269
|
+
static {
|
|
27270
|
+
this.styles = [sharedStyles, componentStyles73, hostStyles75];
|
|
27271
|
+
}
|
|
27272
|
+
_onStartTutorial(tutorial) {
|
|
27273
|
+
this._activeTutorial = tutorial;
|
|
27274
|
+
this._viewState = "detail";
|
|
27275
|
+
fireNonCancelableEvent(this, "feedbackClick", { tutorial });
|
|
27276
|
+
}
|
|
27277
|
+
_renderLoading() {
|
|
27278
|
+
return html77`
|
|
27279
|
+
<div class="tutorial-panel" role="region" aria-label="${this.i18nStrings.loadingText}">
|
|
27280
|
+
<div class="loading-state">
|
|
27281
|
+
<cs-spinner size="normal"></cs-spinner>
|
|
27282
|
+
<span>${this.i18nStrings.loadingText}</span>
|
|
27283
|
+
</div>
|
|
27284
|
+
</div>
|
|
27285
|
+
`;
|
|
27286
|
+
}
|
|
27287
|
+
_renderTutorialList() {
|
|
27288
|
+
return html77`
|
|
27289
|
+
<div class="tutorial-panel" role="region" aria-label="${this.i18nStrings.tutorialListTitle}" tabindex="-1">
|
|
27290
|
+
<h2 class="tutorial-list-title">${this.i18nStrings.tutorialListTitle}</h2>
|
|
27291
|
+
<div class="tutorial-list-description">${this.i18nStrings.tutorialListDescription}</div>
|
|
27292
|
+
|
|
27293
|
+
${this.downloadUrl ? html77`
|
|
27294
|
+
<div class="download-link">
|
|
27295
|
+
<cs-link href=${this.downloadUrl} external
|
|
27296
|
+
aria-label=${this.i18nStrings.labelTutorialListDownloadLink ?? this.i18nStrings.tutorialListDownloadLinkText}>
|
|
27297
|
+
${this.i18nStrings.tutorialListDownloadLinkText}
|
|
27298
|
+
</cs-link>
|
|
27299
|
+
</div>
|
|
27300
|
+
` : nothing43}
|
|
27301
|
+
|
|
27302
|
+
<ul class="tutorial-list" role="list">
|
|
27303
|
+
${this.tutorials.map((tutorial) => this._renderTutorialItem(tutorial))}
|
|
27304
|
+
</ul>
|
|
27305
|
+
<slot></slot>
|
|
27306
|
+
</div>
|
|
27307
|
+
`;
|
|
27308
|
+
}
|
|
27309
|
+
_renderTutorialItem(tutorial) {
|
|
27310
|
+
const totalSteps = tutorial.tasks.reduce((acc, task) => acc + task.steps.length, 0);
|
|
27311
|
+
const isCompleted = tutorial.completed;
|
|
27312
|
+
const isDisabled = tutorial.prerequisitesNeeded === true;
|
|
27313
|
+
return html77`
|
|
27314
|
+
<li class=${classMap62({ "tutorial-item": true, "tutorial-completed": isCompleted })}>
|
|
27315
|
+
<div class="tutorial-title">${tutorial.title}</div>
|
|
27316
|
+
|
|
27317
|
+
${isCompleted ? html77`
|
|
27318
|
+
<cs-status-indicator type="success">
|
|
27319
|
+
${this.i18nStrings.tutorialCompletedText}
|
|
27320
|
+
</cs-status-indicator>
|
|
27321
|
+
` : nothing43}
|
|
27322
|
+
|
|
27323
|
+
${isDisabled && tutorial.prerequisitesAlert ? html77`
|
|
27324
|
+
<div class="prerequisites-alert">${tutorial.prerequisitesAlert}</div>
|
|
27325
|
+
` : nothing43}
|
|
27326
|
+
|
|
27327
|
+
<div class="tutorial-description">${tutorial.description}</div>
|
|
27328
|
+
|
|
27329
|
+
<div class="tutorial-meta">
|
|
27330
|
+
<span>${this.i18nStrings.labelTotalSteps(totalSteps)}</span>
|
|
27331
|
+
${tutorial.learnMoreUrl ? html77`
|
|
27332
|
+
<cs-link href=${tutorial.learnMoreUrl} external
|
|
27333
|
+
aria-label=${this.i18nStrings.labelLearnMoreLink ?? this.i18nStrings.learnMoreLinkText}>
|
|
27334
|
+
${this.i18nStrings.learnMoreLinkText}
|
|
27335
|
+
</cs-link>
|
|
27336
|
+
` : nothing43}
|
|
27337
|
+
</div>
|
|
27338
|
+
|
|
27339
|
+
<cs-button
|
|
27340
|
+
variant="normal"
|
|
27341
|
+
?disabled=${isDisabled}
|
|
27342
|
+
@click=${() => this._onStartTutorial(tutorial)}
|
|
27343
|
+
>
|
|
27344
|
+
${isCompleted ? this.i18nStrings.restartTutorialButtonText : this.i18nStrings.startTutorialButtonText}
|
|
27345
|
+
</cs-button>
|
|
27346
|
+
</li>
|
|
27347
|
+
`;
|
|
27348
|
+
}
|
|
27349
|
+
_renderDetailView() {
|
|
27350
|
+
const tutorial = this._activeTutorial;
|
|
27351
|
+
return html77`
|
|
27352
|
+
<div class="tutorial-panel" role="region" aria-label="${tutorial.title}" tabindex="-1">
|
|
27353
|
+
<div class="detail-header">
|
|
27354
|
+
<cs-button
|
|
27355
|
+
variant="icon"
|
|
27356
|
+
icon-name="close"
|
|
27357
|
+
aria-label=${this.i18nStrings.labelExitTutorial}
|
|
27358
|
+
@click=${this._onDismissTutorial}
|
|
27359
|
+
></cs-button>
|
|
27360
|
+
<h2 class="detail-title">${tutorial.title}</h2>
|
|
27361
|
+
</div>
|
|
27362
|
+
|
|
27363
|
+
<ol class="task-list" role="list">
|
|
27364
|
+
${tutorial.tasks.map((task, taskIndex) => html77`
|
|
27365
|
+
<li class="task-item">
|
|
27366
|
+
<div class="task-title">
|
|
27367
|
+
${this.i18nStrings.taskTitle(taskIndex + 1, task.title)}
|
|
27368
|
+
</div>
|
|
27369
|
+
<ul class="step-list" role="list">
|
|
27370
|
+
${task.steps.map((step, stepIndex) => html77`
|
|
27371
|
+
<li class="step-item">
|
|
27372
|
+
${this.i18nStrings.stepTitle(stepIndex + 1, step.title)}
|
|
27373
|
+
</li>
|
|
27374
|
+
`)}
|
|
27375
|
+
</ul>
|
|
27376
|
+
</li>
|
|
27377
|
+
`)}
|
|
27378
|
+
</ol>
|
|
27379
|
+
|
|
27380
|
+
<div class="detail-actions">
|
|
27381
|
+
<cs-button variant="link" @click=${this._onDismissTutorial}>
|
|
27382
|
+
${this.i18nStrings.dismissTutorialButtonText}
|
|
27383
|
+
</cs-button>
|
|
27384
|
+
<cs-button variant="primary" @click=${this._onCompleteTutorial}>
|
|
27385
|
+
${this.i18nStrings.completionScreenTitle}
|
|
27386
|
+
</cs-button>
|
|
27387
|
+
</div>
|
|
27388
|
+
</div>
|
|
27389
|
+
`;
|
|
27390
|
+
}
|
|
27391
|
+
_renderCompletedView() {
|
|
27392
|
+
const tutorial = this._activeTutorial;
|
|
27393
|
+
return html77`
|
|
27394
|
+
<div class="tutorial-panel" role="region" aria-label="${this.i18nStrings.completionScreenTitle}" tabindex="-1">
|
|
27395
|
+
<div class="completed-screen">
|
|
27396
|
+
<cs-icon name="status-positive" size="big"></cs-icon>
|
|
27397
|
+
<h2>${this.i18nStrings.completionScreenTitle}</h2>
|
|
27398
|
+
${tutorial ? html77`<p>${tutorial.completedScreenDescription}</p>` : nothing43}
|
|
27399
|
+
<div class="completed-actions">
|
|
27400
|
+
<cs-button variant="primary" @click=${this._onBackToList}>
|
|
27401
|
+
${this.i18nStrings.dismissTutorialButtonText}
|
|
27402
|
+
</cs-button>
|
|
27403
|
+
${tutorial ? html77`
|
|
27404
|
+
<cs-button variant="link" @click=${() => fireNonCancelableEvent(this, "feedbackClick", { tutorial })}>
|
|
27405
|
+
${this.i18nStrings.feedbackLinkText}
|
|
27406
|
+
</cs-button>
|
|
27407
|
+
` : nothing43}
|
|
27408
|
+
</div>
|
|
27409
|
+
</div>
|
|
27410
|
+
</div>
|
|
27411
|
+
`;
|
|
27412
|
+
}
|
|
27413
|
+
render() {
|
|
27414
|
+
if (this.loading) {
|
|
27415
|
+
return this._renderLoading();
|
|
27416
|
+
}
|
|
27417
|
+
switch (this._viewState) {
|
|
27418
|
+
case "detail":
|
|
27419
|
+
return this._renderDetailView();
|
|
27420
|
+
case "completed":
|
|
27421
|
+
return this._renderCompletedView();
|
|
27422
|
+
default:
|
|
27423
|
+
return this._renderTutorialList();
|
|
27424
|
+
}
|
|
27425
|
+
}
|
|
27426
|
+
};
|
|
27427
|
+
__decorateClass([
|
|
27428
|
+
property76({ attribute: false })
|
|
27429
|
+
], CsTutorialPanelInternal.prototype, "tutorials", 2);
|
|
27430
|
+
__decorateClass([
|
|
27431
|
+
property76({ type: Boolean })
|
|
27432
|
+
], CsTutorialPanelInternal.prototype, "loading", 2);
|
|
27433
|
+
__decorateClass([
|
|
27434
|
+
property76({ attribute: false })
|
|
27435
|
+
], CsTutorialPanelInternal.prototype, "i18nStrings", 2);
|
|
27436
|
+
__decorateClass([
|
|
27437
|
+
property76({ type: String })
|
|
27438
|
+
], CsTutorialPanelInternal.prototype, "downloadUrl", 2);
|
|
27439
|
+
__decorateClass([
|
|
27440
|
+
state24()
|
|
27441
|
+
], CsTutorialPanelInternal.prototype, "_viewState", 2);
|
|
27442
|
+
__decorateClass([
|
|
27443
|
+
state24()
|
|
27444
|
+
], CsTutorialPanelInternal.prototype, "_activeTutorial", 2);
|
|
27445
|
+
|
|
27446
|
+
// src/tutorial-panel/index.ts
|
|
27447
|
+
var CsTutorialPanel = class extends CsTutorialPanelInternal {
|
|
27448
|
+
};
|
|
27449
|
+
customElements.define("cs-tutorial-panel", CsTutorialPanel);
|
|
27450
|
+
|
|
27451
|
+
// src/app-layout/internal.ts
|
|
27452
|
+
import { css as css173, html as html78, nothing as nothing44 } from "lit";
|
|
27453
|
+
import { property as property77 } from "lit/decorators.js";
|
|
27454
|
+
import { classMap as classMap63 } from "lit/directives/class-map.js";
|
|
27455
|
+
|
|
27456
|
+
// src/app-layout/styles.ts
|
|
27457
|
+
import { css as css163 } from "lit";
|
|
27458
|
+
var componentStyles74 = css163`
|
|
27459
|
+
.root {
|
|
27460
|
+
display: flex;
|
|
27461
|
+
flex-direction: column;
|
|
27462
|
+
position: relative;
|
|
27463
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
27464
|
+
}
|
|
27465
|
+
|
|
27466
|
+
.root-no-scroll {
|
|
27467
|
+
position: relative;
|
|
27468
|
+
z-index: 1;
|
|
27469
|
+
}
|
|
27470
|
+
|
|
27471
|
+
.layout {
|
|
27472
|
+
flex: 1 1 auto;
|
|
27473
|
+
display: flex;
|
|
27474
|
+
align-items: stretch;
|
|
27475
|
+
background-color: var(--color-background-layout-main-5ilwcb, #ffffff);
|
|
27476
|
+
}
|
|
27477
|
+
.layout-no-scroll {
|
|
27478
|
+
overflow: hidden;
|
|
27479
|
+
}
|
|
27480
|
+
|
|
27481
|
+
.layout-main {
|
|
27482
|
+
flex: 1;
|
|
27483
|
+
min-inline-size: 0;
|
|
27484
|
+
background-color: var(--color-background-layout-main-5ilwcb, #ffffff);
|
|
27485
|
+
position: relative;
|
|
27486
|
+
}
|
|
27487
|
+
.layout-main-scrollable {
|
|
27488
|
+
overflow: auto;
|
|
27489
|
+
}
|
|
27490
|
+
|
|
27491
|
+
.unfocusable * {
|
|
27492
|
+
visibility: hidden;
|
|
27493
|
+
}
|
|
27494
|
+
|
|
27495
|
+
.breadcrumbs-desktop {
|
|
27496
|
+
padding-block-start: var(--space-scaled-m-m892r9, 16px);
|
|
27497
|
+
padding-block-end: var(--space-scaled-s-8ozaad, 12px);
|
|
27498
|
+
}
|
|
27499
|
+
|
|
27500
|
+
.content-header-wrapper {
|
|
27501
|
+
padding-block-end: var(--space-content-header-padding-bottom-rvy5xz, 16px);
|
|
27502
|
+
}
|
|
27503
|
+
|
|
27504
|
+
.content-wrapper {
|
|
27505
|
+
padding-block-end: var(--space-layout-content-bottom-zeb1g9, 40px);
|
|
27506
|
+
}
|
|
27507
|
+
|
|
27508
|
+
.content-overlapped {
|
|
27509
|
+
margin-block-start: calc(-1 * var(--space-dark-header-overlap-distance-ld45ap, 36px));
|
|
27510
|
+
}
|
|
27511
|
+
|
|
27512
|
+
.content-extra-top-padding {
|
|
27513
|
+
padding-block-start: var(--space-scaled-m-m892r9, 16px);
|
|
27514
|
+
}
|
|
27515
|
+
`;
|
|
27516
|
+
|
|
27517
|
+
// src/internal/styles/app-layout-content-wrapper.ts
|
|
27518
|
+
import { css as css164 } from "lit";
|
|
27519
|
+
var appLayoutContentWrapperStyles = css164`
|
|
27520
|
+
.app-layout-content-wrapper--content-wrapper {
|
|
27521
|
+
padding-inline-start: var(--space-layout-content-horizontal-buc0zz, 24px);
|
|
27522
|
+
padding-inline-end: var(--space-layout-content-horizontal-buc0zz, 24px);
|
|
27523
|
+
}
|
|
27524
|
+
.app-layout-content-wrapper--content-wrapper-mobile {
|
|
27525
|
+
padding-inline-start: var(--space-l-2ud1p3, 20px);
|
|
27526
|
+
padding-inline-end: var(--space-l-2ud1p3, 20px);
|
|
27527
|
+
}
|
|
27528
|
+
|
|
27529
|
+
.app-layout-content-wrapper--content-type-dashboard {
|
|
27530
|
+
margin-inline-start: auto;
|
|
27531
|
+
margin-inline-end: auto;
|
|
27532
|
+
}
|
|
27533
|
+
@media (min-width: 1401px) {
|
|
27534
|
+
.app-layout-content-wrapper--content-type-dashboard {
|
|
27535
|
+
max-inline-size: 1280px;
|
|
27536
|
+
}
|
|
27537
|
+
}
|
|
27538
|
+
@media (min-width: 1921px) {
|
|
27539
|
+
.app-layout-content-wrapper--content-type-dashboard {
|
|
27540
|
+
max-inline-size: 1620px;
|
|
27541
|
+
}
|
|
27542
|
+
}
|
|
27543
|
+
@media (min-width: 2541px) {
|
|
27544
|
+
.app-layout-content-wrapper--content-type-dashboard {
|
|
27545
|
+
max-inline-size: 2160px;
|
|
27546
|
+
}
|
|
27547
|
+
}
|
|
27548
|
+
`;
|
|
27549
|
+
|
|
27550
|
+
// src/internal/styles/app-layout-drawer.ts
|
|
27551
|
+
import { css as css165 } from "lit";
|
|
27552
|
+
var appLayoutDrawerStyles = css165`
|
|
27553
|
+
.app-layout-drawer--toggle {
|
|
27554
|
+
box-sizing: border-box;
|
|
27555
|
+
padding-block: var(--space-xxs-hwfkai, 4px);
|
|
27556
|
+
padding-inline: 7px;
|
|
27557
|
+
}
|
|
27558
|
+
|
|
27559
|
+
.app-layout-drawer--drawer-triggers {
|
|
27560
|
+
box-sizing: border-box;
|
|
27561
|
+
}
|
|
27562
|
+
|
|
27563
|
+
.app-layout-drawer--drawer {
|
|
27564
|
+
flex-shrink: 0;
|
|
27565
|
+
position: relative;
|
|
27566
|
+
word-wrap: break-word;
|
|
27567
|
+
box-shadow: var(--shadow-panel-vk7iea, 0px 0px 0px 1px #b6bec9);
|
|
27568
|
+
}
|
|
27569
|
+
.app-layout-drawer--drawer:not(.app-layout-drawer--drawer-mobile) {
|
|
27570
|
+
z-index: 830;
|
|
27571
|
+
}
|
|
27572
|
+
.app-layout-drawer--drawer-closed {
|
|
27573
|
+
min-inline-size: 40px;
|
|
27574
|
+
}
|
|
27575
|
+
.app-layout-drawer--drawer-closed.app-layout-drawer--drawer-mobile {
|
|
27576
|
+
display: none;
|
|
27577
|
+
}
|
|
27578
|
+
|
|
27579
|
+
.app-layout-drawer--drawer-content {
|
|
27580
|
+
position: fixed;
|
|
27581
|
+
overflow: auto;
|
|
27582
|
+
background-color: var(--color-background-layout-panel-content-xto15e, #ffffff);
|
|
27583
|
+
display: flex;
|
|
27584
|
+
flex-direction: column;
|
|
27585
|
+
}
|
|
27586
|
+
.app-layout-drawer--drawer-mobile > .app-layout-drawer--drawer-content {
|
|
27587
|
+
z-index: 1001;
|
|
27588
|
+
inset: 0;
|
|
27589
|
+
}
|
|
27590
|
+
.app-layout-drawer--drawer-closed > .app-layout-drawer--drawer-content {
|
|
27591
|
+
inline-size: 40px;
|
|
27592
|
+
}
|
|
27593
|
+
.app-layout-drawer--drawer-closed > .app-layout-drawer--drawer-content.app-layout-drawer--drawer-content-clickable {
|
|
27594
|
+
cursor: pointer;
|
|
27595
|
+
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
27596
|
+
}
|
|
27597
|
+
.app-layout-drawer--drawer-closed > .app-layout-drawer--drawer-content.app-layout-drawer--drawer-content-clickable:hover {
|
|
27598
|
+
background: var(--color-background-layout-panel-hover-tguulw, #ebebf0);
|
|
27599
|
+
}
|
|
27600
|
+
.app-layout-drawer--drawer-content > [aria-hidden=true] {
|
|
27601
|
+
display: none;
|
|
27602
|
+
}
|
|
27603
|
+
.app-layout-drawer--drawer-content > .app-layout-drawer--drawer-resize-content {
|
|
27604
|
+
overflow: auto;
|
|
27605
|
+
block-size: 100%;
|
|
27606
|
+
position: relative;
|
|
27607
|
+
}
|
|
27608
|
+
.app-layout-drawer--drawer-content > .app-layout-drawer--drawer-content-wrapper {
|
|
27609
|
+
flex: 1;
|
|
27610
|
+
}
|
|
27611
|
+
|
|
27612
|
+
.app-layout-drawer--drawer-triggers-wrapper {
|
|
27613
|
+
display: flex;
|
|
27614
|
+
flex-direction: column;
|
|
27615
|
+
text-align: center;
|
|
27616
|
+
align-items: stretch;
|
|
27617
|
+
}
|
|
27618
|
+
|
|
27619
|
+
.app-layout-drawer--drawer-trigger {
|
|
27620
|
+
padding-block: var(--space-xxs-hwfkai, 4px);
|
|
27621
|
+
padding-inline: 7px;
|
|
27622
|
+
cursor: pointer;
|
|
27623
|
+
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
27624
|
+
}
|
|
27625
|
+
.app-layout-drawer--drawer-trigger:not(:first-child) {
|
|
27626
|
+
border-block-start: 1px solid var(--color-border-layout-ayg8vb, #c6c6cd);
|
|
27627
|
+
}
|
|
27628
|
+
.app-layout-drawer--drawer-trigger:hover {
|
|
27629
|
+
color: var(--color-text-layout-toggle-hover-9jwdce, #006ce0);
|
|
27630
|
+
}
|
|
27631
|
+
.app-layout-drawer--drawer-trigger-active, .app-layout-drawer--drawer-trigger-active:hover {
|
|
27632
|
+
background-color: var(--color-background-layout-toggle-selected-default-izfana, #006ce0);
|
|
27633
|
+
color: var(--color-text-layout-toggle-active-ifu7qp, #ffffff);
|
|
27634
|
+
}
|
|
27635
|
+
.app-layout-drawer--drawer-content-clickable > .app-layout-drawer--drawer-triggers-wrapper > .app-layout-drawer--drawer-trigger:hover {
|
|
27636
|
+
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
27637
|
+
}
|
|
27638
|
+
|
|
27639
|
+
.app-layout-drawer--resize-handle-wrapper {
|
|
27640
|
+
position: absolute;
|
|
27641
|
+
inset-inline-start: 0;
|
|
27642
|
+
inset-block-start: 0;
|
|
27643
|
+
block-size: 100%;
|
|
27644
|
+
display: flex;
|
|
27645
|
+
align-items: center;
|
|
27646
|
+
z-index: 1;
|
|
27647
|
+
}
|
|
27648
|
+
|
|
27649
|
+
.app-layout-drawer--hide {
|
|
27650
|
+
display: none;
|
|
27651
|
+
}
|
|
27652
|
+
`;
|
|
27653
|
+
|
|
27654
|
+
// src/internal/styles/app-layout-mobile-toolbar.ts
|
|
27655
|
+
import { css as css166 } from "lit";
|
|
27656
|
+
var appLayoutMobileToolbarStyles = css166`
|
|
27657
|
+
.app-layout-mobile-toolbar--block-body-scroll {
|
|
27658
|
+
overflow: hidden;
|
|
27659
|
+
}
|
|
27660
|
+
|
|
27661
|
+
.app-layout-mobile-toolbar--mobile-bar {
|
|
27662
|
+
position: sticky;
|
|
27663
|
+
display: flex;
|
|
27664
|
+
align-items: center;
|
|
27665
|
+
flex-shrink: 0;
|
|
27666
|
+
z-index: 1000;
|
|
27667
|
+
inline-size: 100%;
|
|
27668
|
+
box-sizing: border-box;
|
|
27669
|
+
background-color: var(--color-background-layout-mobile-panel-ed0ava, #0f141a);
|
|
27670
|
+
box-shadow: var(--shadow-panel-vk7iea, 0px 0px 0px 1px #b6bec9);
|
|
27671
|
+
block-size: calc(2 * var(--space-m-dsumyt, 16px) + var(--space-scaled-xs-xwoogq, 8px));
|
|
27672
|
+
}
|
|
27673
|
+
|
|
27674
|
+
.app-layout-mobile-toolbar--mobile-bar-breadcrumbs {
|
|
27675
|
+
min-inline-size: 0;
|
|
27676
|
+
flex: 1;
|
|
27677
|
+
margin-inline-start: var(--space-m-dsumyt, 16px);
|
|
27678
|
+
margin-inline-end: var(--space-m-dsumyt, 16px);
|
|
27679
|
+
}
|
|
27680
|
+
|
|
27681
|
+
.app-layout-mobile-toolbar--mobile-toggle {
|
|
27682
|
+
box-sizing: border-box;
|
|
27683
|
+
cursor: pointer;
|
|
27684
|
+
z-index: 1;
|
|
27685
|
+
padding-block: var(--space-xxs-hwfkai, 4px);
|
|
27686
|
+
padding-inline: 7px;
|
|
27687
|
+
inline-size: 40px;
|
|
27688
|
+
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
27689
|
+
}
|
|
27690
|
+
.app-layout-mobile-toolbar--mobile-toggle-type-navigation {
|
|
27691
|
+
border-inline-end: 1px solid var(--color-border-layout-ayg8vb, #c6c6cd);
|
|
27692
|
+
}
|
|
27693
|
+
.app-layout-mobile-toolbar--mobile-toggle-type-tools, .app-layout-mobile-toolbar--mobile-toggle-type-drawer {
|
|
27694
|
+
border-inline-start: 1px solid var(--color-border-layout-ayg8vb, #c6c6cd);
|
|
27695
|
+
}
|
|
27696
|
+
.app-layout-mobile-toolbar--mobile-toggle:hover {
|
|
27697
|
+
background: var(--color-background-layout-panel-hover-tguulw, #ebebf0);
|
|
27698
|
+
}
|
|
27699
|
+
|
|
27700
|
+
.app-layout-mobile-toolbar--drawers-container {
|
|
27701
|
+
display: flex;
|
|
27702
|
+
align-items: stretch;
|
|
27703
|
+
}
|
|
27704
|
+
`;
|
|
27705
|
+
|
|
27706
|
+
// src/internal/styles/app-layout-notifications.ts
|
|
27707
|
+
import { css as css167 } from "lit";
|
|
27708
|
+
var appLayoutNotificationsStyles = css167`
|
|
27709
|
+
.app-layout-notifications--notifications,
|
|
27710
|
+
.app-layout-notifications--notifications-sticky {
|
|
27711
|
+
z-index: 850;
|
|
27712
|
+
}
|
|
27713
|
+
|
|
27714
|
+
.app-layout-notifications--notifications {
|
|
27715
|
+
/* This is necessary for the z-index to have effect */
|
|
27716
|
+
position: relative;
|
|
27717
|
+
}
|
|
27718
|
+
|
|
27719
|
+
.app-layout-notifications--notifications-sticky {
|
|
27720
|
+
inset-block-start: 0;
|
|
27721
|
+
position: sticky;
|
|
27722
|
+
--awsui-flashbar-sticky-bottom-margin-6b9ypa: var(--space-xxl-32srm4, 32px);
|
|
27723
|
+
}
|
|
27724
|
+
|
|
27725
|
+
.app-layout-notifications--no-content-paddings {
|
|
27726
|
+
/*
|
|
27727
|
+
When using the disableContentPaddings option, the Flashbar will use this custom property to add additional space
|
|
27728
|
+
when the notification bar is rendered, to prevent it from overlapping the content.
|
|
27729
|
+
*/
|
|
27730
|
+
--awsui-stacked-notifications-bottom-margin-6b9ypa: var(--space-scaled-l-sej05l, 20px);
|
|
27731
|
+
}
|
|
27732
|
+
`;
|
|
27733
|
+
|
|
27734
|
+
// src/internal/styles/app-layout-resize.ts
|
|
27735
|
+
import { css as css168 } from "lit";
|
|
27736
|
+
var appLayoutResizeStyles = css168`
|
|
27737
|
+
@media (min-width: 689px) {
|
|
27738
|
+
.app-layout-resize--with-motion-vertical {
|
|
27739
|
+
transition: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
27740
|
+
transition-property: border-color, opacity, block-size, inset-block-start, inset-block-end;
|
|
27741
|
+
}
|
|
27742
|
+
}
|
|
27743
|
+
@media (min-width: 689px) and (prefers-reduced-motion: reduce) {
|
|
27744
|
+
.app-layout-resize--with-motion-vertical {
|
|
27745
|
+
animation: none;
|
|
27746
|
+
transition: none;
|
|
27747
|
+
}
|
|
27748
|
+
}
|
|
27749
|
+
@media (min-width: 689px) {
|
|
27750
|
+
.awsui-motion-disabled .app-layout-resize--with-motion-vertical, .awsui-mode-entering .app-layout-resize--with-motion-vertical {
|
|
27751
|
+
animation: none;
|
|
27752
|
+
transition: none;
|
|
27753
|
+
}
|
|
27754
|
+
}
|
|
27755
|
+
|
|
27756
|
+
@media (min-width: 689px) {
|
|
27757
|
+
.app-layout-resize--with-motion-horizontal {
|
|
27758
|
+
transition: var(--motion-duration-refresh-only-medium-5rbn3k, 165ms);
|
|
27759
|
+
transition-property: border-color, opacity, inline-size, inset-inline-start;
|
|
27760
|
+
}
|
|
27761
|
+
}
|
|
27762
|
+
@media (min-width: 689px) and (prefers-reduced-motion: reduce) {
|
|
27763
|
+
.app-layout-resize--with-motion-horizontal {
|
|
27764
|
+
animation: none;
|
|
27765
|
+
transition: none;
|
|
27766
|
+
}
|
|
27767
|
+
}
|
|
27768
|
+
@media (min-width: 689px) {
|
|
27769
|
+
.awsui-motion-disabled .app-layout-resize--with-motion-horizontal, .awsui-mode-entering .app-layout-resize--with-motion-horizontal {
|
|
27770
|
+
animation: none;
|
|
27771
|
+
transition: none;
|
|
27772
|
+
}
|
|
27773
|
+
}
|
|
27774
|
+
|
|
27775
|
+
.app-layout-resize--resize-active * {
|
|
27776
|
+
-webkit-user-select: none;
|
|
27777
|
+
user-select: none;
|
|
27778
|
+
}
|
|
27779
|
+
.app-layout-resize--resize-active * .app-layout-resize--with-motion-vertical,
|
|
27780
|
+
.app-layout-resize--resize-active * .app-layout-resize--with-motion-horizontal {
|
|
27781
|
+
transition: none;
|
|
27782
|
+
animation: none;
|
|
27783
|
+
}
|
|
27784
|
+
.app-layout-resize--resize-active iframe {
|
|
27785
|
+
pointer-events: none;
|
|
27786
|
+
}
|
|
27787
|
+
.app-layout-resize--resize-side * {
|
|
27788
|
+
cursor: ew-resize;
|
|
27789
|
+
}
|
|
27790
|
+
.app-layout-resize--resize-bottom * {
|
|
27791
|
+
cursor: ns-resize;
|
|
27792
|
+
}
|
|
27793
|
+
`;
|
|
27794
|
+
|
|
27795
|
+
// src/internal/styles/app-layout-runtime-drawer.ts
|
|
27796
|
+
import { css as css169 } from "lit";
|
|
27797
|
+
var appLayoutRuntimeDrawerStyles = css169`
|
|
27798
|
+
.app-layout-runtime-drawer--runtime-content-wrapper {
|
|
27799
|
+
display: contents;
|
|
27800
|
+
}
|
|
27801
|
+
|
|
27802
|
+
.app-layout-runtime-drawer--runtime-header-wrapper {
|
|
27803
|
+
display: contents;
|
|
27804
|
+
}
|
|
27805
|
+
`;
|
|
27806
|
+
|
|
27807
|
+
// src/internal/styles/app-layout-split-panel.ts
|
|
27808
|
+
import { css as css170 } from "lit";
|
|
27809
|
+
var appLayoutSplitPanelStyles = css170`
|
|
27810
|
+
.app-layout-split-panel--drawer-displayed {
|
|
27811
|
+
min-inline-size: 40px;
|
|
27812
|
+
}
|
|
27813
|
+
|
|
27814
|
+
.app-layout-split-panel--drawer-content {
|
|
27815
|
+
position: fixed;
|
|
27816
|
+
z-index: 830;
|
|
27817
|
+
}
|
|
27818
|
+
`;
|
|
27819
|
+
|
|
27820
|
+
// src/internal/styles/app-layout-toggles.ts
|
|
27821
|
+
import { css as css171 } from "lit";
|
|
27822
|
+
var appLayoutTogglesStyles = css171`
|
|
27823
|
+
.app-layout-toggles--toggle-button {
|
|
27824
|
+
cursor: pointer;
|
|
27825
|
+
border-block: 0;
|
|
27826
|
+
border-inline: 0;
|
|
27827
|
+
padding-block: calc(var(--space-scaled-xxs-pfm1nx, 4px) + 1px);
|
|
27828
|
+
padding-inline: calc(var(--space-xxs-hwfkai, 4px) + 1px);
|
|
27829
|
+
background: transparent;
|
|
27830
|
+
color: currentColor;
|
|
27831
|
+
}
|
|
27832
|
+
.app-layout-toggles--toggle-button:focus {
|
|
27833
|
+
outline: none;
|
|
27834
|
+
text-decoration: none;
|
|
27835
|
+
}
|
|
27836
|
+
:host-context([data-awsui-focus-visible=true]) .app-layout-toggles--toggle-button:focus {
|
|
27837
|
+
position: relative;
|
|
27838
|
+
}
|
|
27839
|
+
:host-context([data-awsui-focus-visible=true]) .app-layout-toggles--toggle-button:focus {
|
|
27840
|
+
outline: 2px dotted transparent;
|
|
27841
|
+
outline-offset: calc(var(--space-button-inline-icon-focus-outline-gutter-zbfgku, 0px) - 1px);
|
|
27842
|
+
}
|
|
27843
|
+
:host-context([data-awsui-focus-visible=true]) .app-layout-toggles--toggle-button:focus::before {
|
|
27844
|
+
content: " ";
|
|
27845
|
+
display: block;
|
|
27846
|
+
position: absolute;
|
|
27847
|
+
inset-inline-start: calc(-1 * var(--space-button-inline-icon-focus-outline-gutter-zbfgku, 0px));
|
|
27848
|
+
inset-block-start: calc(-1 * var(--space-button-inline-icon-focus-outline-gutter-zbfgku, 0px));
|
|
27849
|
+
inline-size: calc(100% + var(--space-button-inline-icon-focus-outline-gutter-zbfgku, 0px) + var(--space-button-inline-icon-focus-outline-gutter-zbfgku, 0px));
|
|
27850
|
+
block-size: calc(100% + var(--space-button-inline-icon-focus-outline-gutter-zbfgku, 0px) + var(--space-button-inline-icon-focus-outline-gutter-zbfgku, 0px));
|
|
27851
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27852
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27853
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27854
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
27855
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
27856
|
+
}
|
|
27857
|
+
|
|
27858
|
+
.app-layout-toggles--close-button {
|
|
27859
|
+
position: absolute;
|
|
27860
|
+
outline: none;
|
|
27861
|
+
inset-inline-end: var(--space-m-dsumyt, 16px);
|
|
27862
|
+
inset-block-start: var(--size-vertical-panel-icon-offset-z959cw, 15px);
|
|
27863
|
+
z-index: 1;
|
|
27864
|
+
}
|
|
27865
|
+
`;
|
|
27866
|
+
|
|
27867
|
+
// src/internal/styles/app-layout-visual-refresh.ts
|
|
27868
|
+
import { css as css172 } from "lit";
|
|
27869
|
+
var appLayoutVisualRefreshStyles = css172`
|
|
27870
|
+
.app-layout-visual-refresh--breadcrumbs {
|
|
27871
|
+
background-color: var(--color-background-layout-main-5ilwcb, #ffffff);
|
|
27872
|
+
grid-area: breadcrumbs;
|
|
27873
|
+
}
|
|
27874
|
+
|
|
27875
|
+
.app-layout-visual-refresh--drawers-container {
|
|
27876
|
+
background-color: transparent;
|
|
27877
|
+
display: flex;
|
|
27878
|
+
grid-column: 5;
|
|
27879
|
+
grid-row: 1/span 9;
|
|
27880
|
+
block-size: var(--awsui-content-height-6b9ypa);
|
|
27881
|
+
pointer-events: none;
|
|
27882
|
+
position: sticky;
|
|
27883
|
+
inset-block-start: var(--awsui-offset-top-6b9ypa);
|
|
27884
|
+
z-index: 830;
|
|
27885
|
+
}
|
|
27886
|
+
.app-layout-visual-refresh--drawers-container.app-layout-visual-refresh--has-open-drawer {
|
|
27887
|
+
background-color: var(--color-background-container-content-6u8rvp, #ffffff);
|
|
27888
|
+
}
|
|
27889
|
+
@media (min-width: 689px) {
|
|
27890
|
+
.app-layout-visual-refresh--drawers-container {
|
|
27891
|
+
max-inline-size: calc(var(--awsui-layout-width-6b9ypa) - var(--awsui-main-offset-left-6b9ypa) - var(--awsui-default-min-content-width-6b9ypa) - var(--awsui-content-gap-right-6b9ypa));
|
|
27892
|
+
}
|
|
27893
|
+
}
|
|
27894
|
+
@media (max-width: 688px) {
|
|
27895
|
+
.app-layout-visual-refresh--drawers-container {
|
|
27896
|
+
position: fixed;
|
|
27897
|
+
inset-inline-end: 0;
|
|
27898
|
+
z-index: 1001;
|
|
27899
|
+
|
|
27900
|
+
header.app-layout-visual-refresh--content {
|
|
27901
|
+
grid-area: header;
|
|
27902
|
+
}
|
|
27903
|
+
|
|
27904
|
+
.app-layout-visual-refresh--container {
|
|
27905
|
+
grid-area: main;
|
|
27906
|
+
padding-block-end: var(--space-layout-content-bottom-zeb1g9, 40px);
|
|
27907
|
+
|
|
27908
|
+
|
|
27909
|
+
section.app-layout-visual-refresh--mobile-toolbar {
|
|
27910
|
+
align-items: center;
|
|
27911
|
+
background-color: var(--color-background-layout-main-5ilwcb, #ffffff);
|
|
27912
|
+
border-block-end: 1px solid var(--color-border-divider-default-nr68jt, #c6c6cd);
|
|
27913
|
+
box-shadow: var(--shadow-sticky-lolw8j, 0px 4px 8px 1px rgba(0, 7, 22, 0.1));
|
|
27914
|
+
box-sizing: border-box;
|
|
27915
|
+
block-size: var(--awsui-mobile-bar-height-6b9ypa);
|
|
27916
|
+
display: grid;
|
|
27917
|
+
grid-area: mobileToolbar;
|
|
27918
|
+
grid-column: 1/span 5;
|
|
27919
|
+
grid-template-columns: auto minmax(0, 1fr) auto;
|
|
27920
|
+
padding-block: 0;
|
|
27921
|
+
padding-inline: var(--space-m-dsumyt, 16px);
|
|
27922
|
+
position: sticky;
|
|
27923
|
+
inset-block-start: var(--awsui-offset-top-6b9ypa);
|
|
27924
|
+
z-index: 1000;
|
|
27925
|
+
}
|
|
27926
|
+
section.app-layout-visual-refresh--mobile-toolbar:not(.app-layout-visual-refresh--remove-high-contrast-header) {
|
|
27927
|
+
background-color: var(--color-background-layout-main-5ilwcb, #ffffff);
|
|
27928
|
+
box-shadow: var(--shadow-panel-toggle-qddz27, 0px 6px 12px 1px rgba(0, 7, 22, 0.12));
|
|
27929
|
+
}
|
|
27930
|
+
section.app-layout-visual-refresh--mobile-toolbar > .app-layout-visual-refresh--mobile-toolbar-nav {
|
|
27931
|
+
grid-column: 1;
|
|
27932
|
+
margin-inline-end: var(--space-m-dsumyt, 16px);
|
|
27933
|
+
}
|
|
27934
|
+
section.app-layout-visual-refresh--mobile-toolbar > .app-layout-visual-refresh--mobile-toolbar-breadcrumbs {
|
|
27935
|
+
grid-column: 2;
|
|
27936
|
+
background-color: var(--color-background-layout-main-5ilwcb, #ffffff);
|
|
27937
|
+
}
|
|
27938
|
+
section.app-layout-visual-refresh--mobile-toolbar > .app-layout-visual-refresh--mobile-toolbar-tools {
|
|
27939
|
+
grid-column: 3;
|
|
27940
|
+
margin-inline-start: var(--space-m-dsumyt, 16px);
|
|
27941
|
+
}
|
|
27942
|
+
|
|
27943
|
+
.app-layout-visual-refresh--navigation-container {
|
|
27944
|
+
display: flex;
|
|
27945
|
+
grid-column: 1;
|
|
27946
|
+
grid-row: 1/span 9;
|
|
27947
|
+
block-size: var(--awsui-content-height-6b9ypa);
|
|
27948
|
+
position: sticky;
|
|
27949
|
+
inset-block-start: var(--awsui-offset-top-6b9ypa);
|
|
27950
|
+
z-index: 830;
|
|
27951
|
+
|
|
27952
|
+
.app-layout-visual-refresh--notifications {
|
|
27953
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
27954
|
+
grid-area: notifications;
|
|
27955
|
+
z-index: 850;
|
|
27956
|
+
}
|
|
27957
|
+
.app-layout-visual-refresh--notifications.app-layout-visual-refresh--has-notification-content {
|
|
27958
|
+
padding-block-start: var(--space-scaled-s-8ozaad, 12px);
|
|
27959
|
+
}
|
|
27960
|
+
@media (min-width: 689px) {
|
|
27961
|
+
.app-layout-visual-refresh--notifications.app-layout-visual-refresh--sticky-notifications {
|
|
27962
|
+
--awsui-flashbar-sticky-bottom-margin-6b9ypa: var(--space-xxl-32srm4, 32px);
|
|
27963
|
+
position: sticky;
|
|
27964
|
+
inset-block-start: var(--awsui-offset-top-6b9ypa);
|
|
27965
|
+
}
|
|
27966
|
+
.app-layout-visual-refresh--notifications.app-layout-visual-refresh--sticky-notifications:not(.app-layout-visual-refresh--high-contrast) {
|
|
27967
|
+
background-color: var(--color-background-layout-main-5ilwcb, #ffffff);
|
|
27968
|
+
}
|
|
27969
|
+
.app-layout-visual-refresh--notifications.app-layout-visual-refresh--has-notification-content {
|
|
27970
|
+
padding-block-start: var(--space-xs-ymlm0b, 8px);
|
|
27971
|
+
}
|
|
27972
|
+
}
|
|
27973
|
+
|
|
27974
|
+
.app-layout-visual-refresh--trigger-button-styles {
|
|
27975
|
+
background: var(--color-background-layout-toggle-default-2hgjdu, #424650);
|
|
27976
|
+
border-start-start-radius: 50%;
|
|
27977
|
+
border-start-end-radius: 50%;
|
|
27978
|
+
border-end-start-radius: 50%;
|
|
27979
|
+
border-end-end-radius: 50%;
|
|
27980
|
+
block-size: var(--space-layout-toggle-diameter-j2qffw, 36px);
|
|
27981
|
+
inline-size: var(--space-layout-toggle-diameter-j2qffw, 36px);
|
|
27982
|
+
}
|
|
27983
|
+
.app-layout-visual-refresh--trigger-button-styles:hover {
|
|
27984
|
+
background: var(--color-background-layout-toggle-hover-0cpm7g, #656871);
|
|
27985
|
+
}
|
|
27986
|
+
.app-layout-visual-refresh--trigger-button-styles:active {
|
|
27987
|
+
background: var(--color-background-layout-toggle-active-ap91vm, #424650);
|
|
27988
|
+
}
|
|
27989
|
+
|
|
27990
|
+
.app-layout-visual-refresh--trigger-badge-wrapper {
|
|
27991
|
+
position: absolute;
|
|
27992
|
+
inset-block-start: 0;
|
|
27993
|
+
inset-inline-start: 0;
|
|
27994
|
+
display: flex;
|
|
27995
|
+
justify-content: center;
|
|
27996
|
+
align-items: center;
|
|
27997
|
+
clip-path: path("M34.2193 10.1845C33.3961 10.579 32.4739 10.8 31.5 10.8C28.0206 10.8 25.2 7.97939 25.2 4.5C25.2 3.52614 25.421 2.6039 25.8155 1.78066C23.4518 0.639587 20.8006 0 18 0C8.05887 0 0 8.05887 0 18C0 27.9411 8.05887 36 18 36C27.9411 36 36 27.9411 36 18C36 15.1994 35.3604 12.5482 34.2193 10.1845Z");
|
|
27998
|
+
|
|
27999
|
+
}
|
|
28000
|
+
.app-layout-visual-refresh--trigger-badge-wrapper:dir(rtl) {
|
|
28001
|
+
clip-path: path("M1.78066 10.1845C2.6039 10.579 3.52615 10.8 4.5 10.8C7.97939 10.8 10.8 7.97939 10.8 4.5C10.8 3.52614 10.579 2.6039 10.1845 1.78066C12.5482 0.639587 15.1994 0 18 0C27.9411 0 36 8.05887 36 18C36 27.9411 27.9411 36 18 36C8.05887 36 0 27.9411 0 18C0 15.1994 0.639587 12.5482 1.78066 10.1845Z");
|
|
28002
|
+
}
|
|
28003
|
+
|
|
28004
|
+
/*
|
|
28005
|
+
Warning! If these design tokens for width change it will adversely impact
|
|
28006
|
+
the calculation used to determine the Split Panel maximum width in the
|
|
28007
|
+
handleSplitPanelMaxWidth function in the context.
|
|
28008
|
+
*/
|
|
28009
|
+
.app-layout-visual-refresh--trigger {
|
|
28010
|
+
border-block: none;
|
|
28011
|
+
border-inline: none;
|
|
28012
|
+
padding-inline: 0;
|
|
28013
|
+
color: var(--color-text-layout-toggle-1a15s3, #ffffff);
|
|
28014
|
+
cursor: pointer;
|
|
28015
|
+
pointer-events: auto;
|
|
28016
|
+
position: relative;
|
|
28017
|
+
}
|
|
28018
|
+
:host-context([data-awsui-focus-visible=true]) .app-layout-visual-refresh--trigger:focus {
|
|
28019
|
+
position: relative;
|
|
28020
|
+
}
|
|
28021
|
+
:host-context([data-awsui-focus-visible=true]) .app-layout-visual-refresh--trigger:focus {
|
|
28022
|
+
outline: 2px dotted transparent;
|
|
28023
|
+
outline-offset: calc(3px - 1px);
|
|
28024
|
+
}
|
|
28025
|
+
:host-context([data-awsui-focus-visible=true]) .app-layout-visual-refresh--trigger:focus::before {
|
|
28026
|
+
content: " ";
|
|
28027
|
+
display: block;
|
|
28028
|
+
position: absolute;
|
|
28029
|
+
inset-inline-start: calc(-1 * 3px);
|
|
28030
|
+
inset-block-start: calc(-1 * 3px);
|
|
28031
|
+
inline-size: calc(100% + 3px + 3px);
|
|
28032
|
+
block-size: calc(100% + 3px + 3px);
|
|
28033
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28034
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28035
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28036
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28037
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
28038
|
+
}
|
|
28039
|
+
.app-layout-visual-refresh--trigger:focus {
|
|
28040
|
+
outline: none;
|
|
28041
|
+
}
|
|
28042
|
+
.app-layout-visual-refresh--trigger.app-layout-visual-refresh--selected {
|
|
28043
|
+
background: var(--color-background-layout-toggle-selected-default-izfana, #006ce0);
|
|
28044
|
+
color: var(--color-text-layout-toggle-selected-xpximc, #ffffff);
|
|
28045
|
+
}
|
|
28046
|
+
.app-layout-visual-refresh--trigger.app-layout-visual-refresh--selected:hover {
|
|
28047
|
+
background: var(--color-background-layout-toggle-selected-hover-7953u1, #004a9e);
|
|
28048
|
+
}
|
|
28049
|
+
.app-layout-visual-refresh--trigger.app-layout-visual-refresh--selected:active {
|
|
28050
|
+
background: var(--color-background-layout-toggle-selected-active-zcl8w3, #006ce0);
|
|
28051
|
+
}
|
|
28052
|
+
.app-layout-visual-refresh--trigger.app-layout-visual-refresh--selected > .app-layout-visual-refresh--trigger-badge-wrapper {
|
|
28053
|
+
background: var(--color-background-layout-toggle-selected-default-izfana, #006ce0);
|
|
28054
|
+
color: var(--color-text-layout-toggle-selected-xpximc, #ffffff);
|
|
28055
|
+
}
|
|
28056
|
+
.app-layout-visual-refresh--trigger.app-layout-visual-refresh--selected > .app-layout-visual-refresh--trigger-badge-wrapper:hover {
|
|
28057
|
+
background: var(--color-background-layout-toggle-selected-hover-7953u1, #004a9e);
|
|
28058
|
+
}
|
|
28059
|
+
.app-layout-visual-refresh--trigger.app-layout-visual-refresh--selected > .app-layout-visual-refresh--trigger-badge-wrapper:active {
|
|
28060
|
+
background: var(--color-background-layout-toggle-selected-active-zcl8w3, #006ce0);
|
|
28061
|
+
}
|
|
28062
|
+
.app-layout-visual-refresh--trigger.app-layout-visual-refresh--badge, .app-layout-visual-refresh--trigger.app-layout-visual-refresh--badge:hover, .app-layout-visual-refresh--trigger.app-layout-visual-refresh--badge:active {
|
|
28063
|
+
background: transparent;
|
|
28064
|
+
}
|
|
28065
|
+
|
|
28066
|
+
.app-layout-visual-refresh--trigger-wrapper {
|
|
28067
|
+
position: relative;
|
|
28068
|
+
border-start-start-radius: 50%;
|
|
28069
|
+
border-start-end-radius: 50%;
|
|
28070
|
+
border-end-start-radius: 50%;
|
|
28071
|
+
border-end-end-radius: 50%;
|
|
28072
|
+
}
|
|
28073
|
+
.app-layout-visual-refresh--trigger-wrapper:not(.app-layout-visual-refresh--remove-high-contrast-header) {
|
|
28074
|
+
box-shadow: var(--shadow-panel-toggle-qddz27, 0px 6px 12px 1px rgba(0, 7, 22, 0.12));
|
|
28075
|
+
}
|
|
28076
|
+
|
|
28077
|
+
.app-layout-visual-refresh--dot {
|
|
28078
|
+
position: absolute;
|
|
28079
|
+
inline-size: 9px;
|
|
28080
|
+
block-size: 9px;
|
|
28081
|
+
border-start-start-radius: 8px;
|
|
28082
|
+
border-start-end-radius: 8px;
|
|
28083
|
+
border-end-start-radius: 8px;
|
|
28084
|
+
border-end-end-radius: 8px;
|
|
28085
|
+
background-color: var(--color-background-badge-icon-jyxnxa, #db0000);
|
|
28086
|
+
inset-block-start: 0;
|
|
28087
|
+
inset-inline-end: 0;
|
|
28088
|
+
}
|
|
28089
|
+
`;
|
|
28090
|
+
|
|
28091
|
+
// src/app-layout/internal.ts
|
|
28092
|
+
var hostStyles76 = css173`
|
|
28093
|
+
:host {
|
|
28094
|
+
display: block;
|
|
28095
|
+
min-height: 100vh;
|
|
28096
|
+
}
|
|
28097
|
+
`;
|
|
28098
|
+
var CsAppLayoutInternal = class extends CsBaseElement {
|
|
28099
|
+
constructor() {
|
|
28100
|
+
super(...arguments);
|
|
28101
|
+
this.navigationOpen = false;
|
|
28102
|
+
this.navigationWidth = 280;
|
|
28103
|
+
this.navigationHide = false;
|
|
28104
|
+
this.toolsOpen = false;
|
|
28105
|
+
this.toolsWidth = 290;
|
|
28106
|
+
this.toolsHide = false;
|
|
28107
|
+
this.contentType = "default";
|
|
28108
|
+
this.headerSelector = "";
|
|
28109
|
+
this.footerSelector = "";
|
|
28110
|
+
this.maxContentWidth = 0;
|
|
28111
|
+
this.minContentWidth = 280;
|
|
28112
|
+
this.disableContentPaddings = false;
|
|
28113
|
+
}
|
|
28114
|
+
static {
|
|
28115
|
+
this.styles = [
|
|
28116
|
+
sharedStyles,
|
|
28117
|
+
componentStyles74,
|
|
28118
|
+
appLayoutContentWrapperStyles,
|
|
28119
|
+
appLayoutDrawerStyles,
|
|
28120
|
+
appLayoutMobileToolbarStyles,
|
|
28121
|
+
appLayoutNotificationsStyles,
|
|
28122
|
+
appLayoutResizeStyles,
|
|
28123
|
+
appLayoutRuntimeDrawerStyles,
|
|
28124
|
+
appLayoutSplitPanelStyles,
|
|
28125
|
+
appLayoutTogglesStyles,
|
|
28126
|
+
appLayoutVisualRefreshStyles,
|
|
28127
|
+
hostStyles76
|
|
28128
|
+
];
|
|
28129
|
+
}
|
|
28130
|
+
_toggleNav(open) {
|
|
28131
|
+
this.navigationOpen = open;
|
|
28132
|
+
fireNonCancelableEvent(this, "navigationChange", { open });
|
|
28133
|
+
}
|
|
28134
|
+
_toggleTools(open) {
|
|
28135
|
+
this.toolsOpen = open;
|
|
28136
|
+
fireNonCancelableEvent(this, "toolsChange", { open });
|
|
28137
|
+
}
|
|
28138
|
+
render() {
|
|
28139
|
+
const effectiveNavWidth = !this.navigationHide && this.navigationOpen ? this.navigationWidth : 0;
|
|
28140
|
+
const effectiveToolsWidth = !this.toolsHide && this.toolsOpen ? this.toolsWidth : 0;
|
|
28141
|
+
const rootClasses = {
|
|
28142
|
+
"root": true
|
|
28143
|
+
};
|
|
28144
|
+
const layoutClasses = {
|
|
28145
|
+
"layout": true
|
|
28146
|
+
};
|
|
28147
|
+
const layoutMainClasses = {
|
|
28148
|
+
"layout-main": true,
|
|
28149
|
+
"layout-main-scrollable": true
|
|
28150
|
+
};
|
|
28151
|
+
const contentWrapperClasses = {
|
|
28152
|
+
"content-wrapper": true,
|
|
28153
|
+
"app-layout-content-wrapper--content-wrapper": !this.disableContentPaddings
|
|
28154
|
+
};
|
|
28155
|
+
const breadcrumbsClasses = {
|
|
28156
|
+
"breadcrumbs-desktop": true
|
|
28157
|
+
};
|
|
28158
|
+
const navigationClasses = {
|
|
28159
|
+
"app-layout-drawer--drawer": true
|
|
28160
|
+
};
|
|
28161
|
+
const toolsClasses = {
|
|
28162
|
+
"app-layout-drawer--drawer": true
|
|
28163
|
+
};
|
|
28164
|
+
return html78`
|
|
28165
|
+
<div class=${classMap63(rootClasses)}>
|
|
28166
|
+
<div class=${classMap63(layoutClasses)}>
|
|
28167
|
+
|
|
28168
|
+
${!this.navigationHide ? html78`
|
|
28169
|
+
<div
|
|
28170
|
+
class=${classMap63(navigationClasses)}
|
|
28171
|
+
style="width: ${this.navigationWidth}px; ${!this.navigationOpen ? "display: none" : ""}"
|
|
28172
|
+
role="navigation"
|
|
28173
|
+
aria-label="Navigation drawer"
|
|
28174
|
+
>
|
|
28175
|
+
<slot name="navigation"></slot>
|
|
28176
|
+
</div>
|
|
28177
|
+
` : nothing44}
|
|
28178
|
+
|
|
28179
|
+
<div
|
|
28180
|
+
class=${classMap63(layoutMainClasses)}
|
|
28181
|
+
style="margin-left: ${effectiveNavWidth}px; margin-right: ${effectiveToolsWidth}px"
|
|
28182
|
+
>
|
|
28183
|
+
<div class="app-layout-notifications--notifications">
|
|
28184
|
+
<slot name="notifications"></slot>
|
|
28185
|
+
</div>
|
|
28186
|
+
<div class=${classMap63(breadcrumbsClasses)}>
|
|
28187
|
+
<slot name="breadcrumbs"></slot>
|
|
28188
|
+
</div>
|
|
28189
|
+
<main
|
|
28190
|
+
class=${classMap63(contentWrapperClasses)}
|
|
28191
|
+
style="${this.maxContentWidth ? `max-width: ${this.maxContentWidth}px` : ""};
|
|
28192
|
+
${this.minContentWidth ? `min-width: ${this.minContentWidth}px` : ""}"
|
|
28193
|
+
>
|
|
28194
|
+
<slot></slot>
|
|
28195
|
+
</main>
|
|
28196
|
+
</div>
|
|
28197
|
+
|
|
28198
|
+
${!this.toolsHide ? html78`
|
|
28199
|
+
<div
|
|
28200
|
+
class=${classMap63(toolsClasses)}
|
|
28201
|
+
style="width: ${this.toolsWidth}px; ${!this.toolsOpen ? "display: none" : ""}"
|
|
28202
|
+
role="complementary"
|
|
28203
|
+
aria-label="Tools drawer"
|
|
28204
|
+
>
|
|
28205
|
+
<slot name="tools"></slot>
|
|
28206
|
+
</div>
|
|
28207
|
+
` : nothing44}
|
|
28208
|
+
</div>
|
|
28209
|
+
|
|
28210
|
+
${!this.navigationHide && !this.navigationOpen ? html78`
|
|
28211
|
+
<button
|
|
28212
|
+
type="button"
|
|
28213
|
+
class="app-layout-toggles--toggle-button"
|
|
28214
|
+
aria-label="Open navigation"
|
|
28215
|
+
@click=${() => this._toggleNav(true)}
|
|
28216
|
+
>
|
|
28217
|
+
<cs-icon name="menu"></cs-icon>
|
|
28218
|
+
</button>
|
|
28219
|
+
` : nothing44}
|
|
28220
|
+
|
|
28221
|
+
${!this.navigationHide && this.navigationOpen ? html78`
|
|
28222
|
+
<button
|
|
28223
|
+
type="button"
|
|
28224
|
+
class="app-layout-toggles--toggle-button app-layout-toggles--close-button"
|
|
28225
|
+
aria-label="Close navigation"
|
|
28226
|
+
@click=${() => this._toggleNav(false)}
|
|
28227
|
+
>
|
|
28228
|
+
<cs-icon name="close"></cs-icon>
|
|
28229
|
+
</button>
|
|
28230
|
+
` : nothing44}
|
|
28231
|
+
|
|
28232
|
+
${!this.toolsHide && !this.toolsOpen ? html78`
|
|
28233
|
+
<button
|
|
28234
|
+
type="button"
|
|
28235
|
+
class="app-layout-toggles--toggle-button"
|
|
28236
|
+
aria-label="Open tools"
|
|
28237
|
+
@click=${() => this._toggleTools(true)}
|
|
28238
|
+
>
|
|
28239
|
+
<cs-icon name="status-info"></cs-icon>
|
|
28240
|
+
</button>
|
|
28241
|
+
` : nothing44}
|
|
28242
|
+
|
|
28243
|
+
${!this.toolsHide && this.toolsOpen ? html78`
|
|
28244
|
+
<button
|
|
28245
|
+
type="button"
|
|
28246
|
+
class="app-layout-toggles--toggle-button app-layout-toggles--close-button"
|
|
28247
|
+
aria-label="Close tools"
|
|
28248
|
+
@click=${() => this._toggleTools(false)}
|
|
28249
|
+
>
|
|
28250
|
+
<cs-icon name="close"></cs-icon>
|
|
28251
|
+
</button>
|
|
28252
|
+
` : nothing44}
|
|
28253
|
+
|
|
28254
|
+
<slot name="drawers" style="display:none"></slot>
|
|
28255
|
+
</div>
|
|
28256
|
+
`;
|
|
28257
|
+
}
|
|
28258
|
+
};
|
|
28259
|
+
__decorateClass([
|
|
28260
|
+
property77({ type: Boolean, reflect: true })
|
|
28261
|
+
], CsAppLayoutInternal.prototype, "navigationOpen", 2);
|
|
28262
|
+
__decorateClass([
|
|
28263
|
+
property77({ type: Number })
|
|
28264
|
+
], CsAppLayoutInternal.prototype, "navigationWidth", 2);
|
|
28265
|
+
__decorateClass([
|
|
28266
|
+
property77({ type: Boolean, reflect: true })
|
|
28267
|
+
], CsAppLayoutInternal.prototype, "navigationHide", 2);
|
|
28268
|
+
__decorateClass([
|
|
28269
|
+
property77({ type: Boolean, reflect: true })
|
|
28270
|
+
], CsAppLayoutInternal.prototype, "toolsOpen", 2);
|
|
28271
|
+
__decorateClass([
|
|
28272
|
+
property77({ type: Number })
|
|
28273
|
+
], CsAppLayoutInternal.prototype, "toolsWidth", 2);
|
|
28274
|
+
__decorateClass([
|
|
28275
|
+
property77({ type: Boolean, reflect: true })
|
|
28276
|
+
], CsAppLayoutInternal.prototype, "toolsHide", 2);
|
|
28277
|
+
__decorateClass([
|
|
28278
|
+
property77({ type: String })
|
|
28279
|
+
], CsAppLayoutInternal.prototype, "contentType", 2);
|
|
28280
|
+
__decorateClass([
|
|
28281
|
+
property77({ type: String })
|
|
28282
|
+
], CsAppLayoutInternal.prototype, "headerSelector", 2);
|
|
28283
|
+
__decorateClass([
|
|
28284
|
+
property77({ type: String })
|
|
28285
|
+
], CsAppLayoutInternal.prototype, "footerSelector", 2);
|
|
28286
|
+
__decorateClass([
|
|
28287
|
+
property77({ type: Number })
|
|
28288
|
+
], CsAppLayoutInternal.prototype, "maxContentWidth", 2);
|
|
28289
|
+
__decorateClass([
|
|
28290
|
+
property77({ type: Number })
|
|
28291
|
+
], CsAppLayoutInternal.prototype, "minContentWidth", 2);
|
|
28292
|
+
__decorateClass([
|
|
28293
|
+
property77({ type: Boolean, reflect: true })
|
|
28294
|
+
], CsAppLayoutInternal.prototype, "disableContentPaddings", 2);
|
|
28295
|
+
|
|
28296
|
+
// src/app-layout/index.ts
|
|
28297
|
+
var CsAppLayout = class extends CsAppLayoutInternal {
|
|
28298
|
+
};
|
|
28299
|
+
customElements.define("cs-app-layout", CsAppLayout);
|
|
28300
|
+
|
|
28301
|
+
// src/file-token-group/internal.ts
|
|
28302
|
+
import { css as css175, html as html79, nothing as nothing45 } from "lit";
|
|
28303
|
+
import { property as property78, state as state25 } from "lit/decorators.js";
|
|
28304
|
+
import { classMap as classMap64 } from "lit/directives/class-map.js";
|
|
28305
|
+
|
|
28306
|
+
// src/file-token-group/styles.ts
|
|
28307
|
+
import { css as css174 } from "lit";
|
|
28308
|
+
var componentStyles75 = css174`
|
|
28309
|
+
.root {
|
|
28310
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
28311
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
28312
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
28313
|
+
font-weight: 400;
|
|
28314
|
+
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
28315
|
+
-webkit-font-smoothing: auto;
|
|
28316
|
+
-moz-osx-font-smoothing: auto;
|
|
28317
|
+
}
|
|
28318
|
+
|
|
28319
|
+
.file-loading-overlay {
|
|
28320
|
+
position: absolute;
|
|
28321
|
+
inset-inline-end: var(--space-static-xs-gnm0mz, 8px);
|
|
28322
|
+
inset-block-end: var(--space-static-xxs-ns94dp, 4px);
|
|
28323
|
+
}
|
|
28324
|
+
.file-loading-overlay-single-row {
|
|
28325
|
+
inset-inline-end: var(--space-static-xxl-ifa9j8, 32px);
|
|
28326
|
+
}
|
|
28327
|
+
|
|
28328
|
+
.file-name-container {
|
|
28329
|
+
all: unset;
|
|
28330
|
+
display: block;
|
|
28331
|
+
inline-size: 100%;
|
|
28332
|
+
min-inline-size: 0;
|
|
28333
|
+
cursor: default;
|
|
28334
|
+
text-align: start;
|
|
28335
|
+
}
|
|
28336
|
+
:host-context([data-awsui-focus-visible=true]) .file-name-container:focus-visible:focus {
|
|
28337
|
+
position: relative;
|
|
28338
|
+
}
|
|
28339
|
+
:host-context([data-awsui-focus-visible=true]) .file-name-container:focus-visible:focus {
|
|
28340
|
+
outline: 2px dotted transparent;
|
|
28341
|
+
outline-offset: calc(var(--space-button-focus-outline-gutter-jj138g, 4px) - 1px);
|
|
28342
|
+
}
|
|
28343
|
+
:host-context([data-awsui-focus-visible=true]) .file-name-container:focus-visible:focus::before {
|
|
28344
|
+
content: " ";
|
|
28345
|
+
display: block;
|
|
28346
|
+
position: absolute;
|
|
28347
|
+
inset-inline-start: calc(-1 * var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
28348
|
+
inset-block-start: calc(-1 * var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
28349
|
+
inline-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
28350
|
+
block-size: calc(100% + var(--space-button-focus-outline-gutter-jj138g, 4px) + var(--space-button-focus-outline-gutter-jj138g, 4px));
|
|
28351
|
+
border-start-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28352
|
+
border-start-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28353
|
+
border-end-start-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28354
|
+
border-end-end-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
28355
|
+
box-shadow: 0 0 0 2px var(--color-border-item-focused-uk47pl, #006ce0);
|
|
28356
|
+
}
|
|
28357
|
+
|
|
28358
|
+
.file-option-name,
|
|
28359
|
+
.file-option-size,
|
|
28360
|
+
.file-option-last-modified {
|
|
28361
|
+
text-overflow: ellipsis;
|
|
28362
|
+
overflow: hidden;
|
|
28363
|
+
white-space: nowrap;
|
|
28364
|
+
}
|
|
28365
|
+
|
|
28366
|
+
.file-option {
|
|
28367
|
+
inline-size: 100%;
|
|
28368
|
+
min-inline-size: 0;
|
|
28369
|
+
display: flex;
|
|
28370
|
+
gap: var(--space-scaled-xs-xwoogq, 8px);
|
|
28371
|
+
}
|
|
28372
|
+
|
|
28373
|
+
.file-option-thumbnail {
|
|
28374
|
+
margin-block-start: var(--space-static-xxs-ns94dp, 4px);
|
|
28375
|
+
}
|
|
28376
|
+
|
|
28377
|
+
.file-option-thumbnail-image {
|
|
28378
|
+
font-size: var(--font-size-body-s-smc8cv, 12px);
|
|
28379
|
+
line-height: var(--line-height-body-s-nu5hx1, 16px);
|
|
28380
|
+
letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
|
|
28381
|
+
inline-size: 48px;
|
|
28382
|
+
block-size: 48px;
|
|
28383
|
+
object-fit: cover;
|
|
28384
|
+
display: -webkit-box;
|
|
28385
|
+
-webkit-line-clamp: 3;
|
|
28386
|
+
-webkit-box-orient: vertical;
|
|
28387
|
+
overflow: hidden;
|
|
28388
|
+
}
|
|
28389
|
+
|
|
28390
|
+
.file-option-metadata {
|
|
28391
|
+
inline-size: 100%;
|
|
28392
|
+
}
|
|
28393
|
+
.file-option-metadata.with-image {
|
|
28394
|
+
inline-size: calc(100% - 48px);
|
|
28395
|
+
}
|
|
28396
|
+
.file-option-metadata.single-row-loading {
|
|
28397
|
+
inline-size: calc(100% - var(--size-icon-normal-levt08, 16px));
|
|
28398
|
+
}
|
|
28399
|
+
|
|
28400
|
+
.token {
|
|
28401
|
+
position: relative;
|
|
28402
|
+
block-size: 100%;
|
|
28403
|
+
display: flex;
|
|
28404
|
+
flex-direction: column;
|
|
28405
|
+
gap: var(--space-xxs-hwfkai, 4px);
|
|
28406
|
+
}
|
|
28407
|
+
.token-grid {
|
|
28408
|
+
display: grid;
|
|
28409
|
+
grid-template-rows: max-content auto;
|
|
28410
|
+
}
|
|
28411
|
+
@media (max-width: 688px) {
|
|
28412
|
+
.token-grid {
|
|
28413
|
+
display: flex;
|
|
28414
|
+
}
|
|
28415
|
+
}
|
|
28416
|
+
.token-contains-image {
|
|
28417
|
+
grid-template-rows: 68px auto;
|
|
28418
|
+
}
|
|
28419
|
+
|
|
28420
|
+
.token-box {
|
|
28421
|
+
position: relative;
|
|
28422
|
+
block-size: 100%;
|
|
28423
|
+
border-block: var(--border-width-token-2ukdpu, 2px) solid var(--awsui-token-style-border-color-default-6b9ypa, var(--color-border-item-selected-wl5ttm, #006ce0));
|
|
28424
|
+
border-inline: var(--border-width-token-2ukdpu, 2px) solid var(--awsui-token-style-border-color-default-6b9ypa, var(--color-border-item-selected-wl5ttm, #006ce0));
|
|
28425
|
+
padding-block-start: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
28426
|
+
padding-block-end: var(--space-scaled-xxs-pfm1nx, 4px);
|
|
28427
|
+
padding-inline-start: var(--space-field-horizontal-0aq2ch, 12px);
|
|
28428
|
+
padding-inline-end: var(--space-xxs-hwfkai, 4px);
|
|
28429
|
+
display: flex;
|
|
28430
|
+
align-items: flex-start;
|
|
28431
|
+
background: var(--awsui-token-style-background-default-6b9ypa, var(--color-background-item-selected-9gppru, #f0fbff));
|
|
28432
|
+
border-start-start-radius: var(--border-radius-token-ycnemh, 8px);
|
|
28433
|
+
border-start-end-radius: var(--border-radius-token-ycnemh, 8px);
|
|
28434
|
+
border-end-start-radius: var(--border-radius-token-ycnemh, 8px);
|
|
28435
|
+
border-end-end-radius: var(--border-radius-token-ycnemh, 8px);
|
|
28436
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
28437
|
+
box-sizing: border-box;
|
|
28438
|
+
}
|
|
28439
|
+
.token-box.horizontal {
|
|
28440
|
+
max-inline-size: 230px;
|
|
28441
|
+
}
|
|
28442
|
+
@media (max-width: 688px) {
|
|
28443
|
+
.token-box.horizontal {
|
|
28444
|
+
max-inline-size: 100%;
|
|
28445
|
+
}
|
|
28446
|
+
}
|
|
28447
|
+
.token-box.error {
|
|
28448
|
+
border-color: var(--color-border-status-error-j8acpp, #db0000);
|
|
28449
|
+
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
28450
|
+
}
|
|
28451
|
+
.token-box.error > .dismiss-button {
|
|
28452
|
+
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
28453
|
+
}
|
|
28454
|
+
.token-box.error > .dismiss-button:hover {
|
|
28455
|
+
color: var(--color-text-interactive-hover-6naf7i, #0f141a);
|
|
28456
|
+
}
|
|
28457
|
+
.token-box.warning {
|
|
28458
|
+
border-color: var(--color-border-status-warning-j40pg7, #855900);
|
|
28459
|
+
border-inline-start-width: var(--border-invalid-width-3xd6e1, 8px);
|
|
28460
|
+
}
|
|
28461
|
+
.token-box.warning > .dismiss-button {
|
|
28462
|
+
color: var(--color-text-interactive-default-ugh9wp, #424650);
|
|
28463
|
+
}
|
|
28464
|
+
.token-box.warning > .dismiss-button:hover {
|
|
28465
|
+
color: var(--color-text-interactive-hover-6naf7i, #0f141a);
|
|
28466
|
+
}
|
|
28467
|
+
.token-box.read-only {
|
|
28468
|
+
border-color: var(--color-border-input-disabled-zgnzvk, #ebebf0);
|
|
28469
|
+
background-color: var(--color-background-container-content-6u8rvp, #ffffff);
|
|
28470
|
+
pointer-events: none;
|
|
28471
|
+
}
|
|
28472
|
+
.token-box.read-only > .dismiss-button {
|
|
28473
|
+
color: var(--color-text-button-inline-icon-disabled-82hho0, #b4b4bb);
|
|
28474
|
+
}
|
|
28475
|
+
.token-box.read-only > .dismiss-button:hover {
|
|
28476
|
+
|
|
28477
|
+
cursor: initial;
|
|
28478
|
+
color: var(--color-text-button-inline-icon-disabled-82hho0, #b4b4bb);
|
|
28479
|
+
}
|
|
28480
|
+
.token-box.loading {
|
|
28481
|
+
border-color: var(--color-border-control-disabled-uj7t08, #dedee3);
|
|
28482
|
+
background-color: var(--color-background-container-content-6u8rvp, #ffffff);
|
|
28483
|
+
}
|
|
28484
|
+
`;
|
|
28485
|
+
|
|
28486
|
+
// src/file-token-group/internal.ts
|
|
28487
|
+
var hostStyles77 = css175`:host { display: block; }`;
|
|
28488
|
+
var tokenListStyles2 = css175`
|
|
28489
|
+
.list {
|
|
28490
|
+
display: flex;
|
|
28491
|
+
flex-wrap: wrap;
|
|
28492
|
+
gap: var(--space-xs-ymlm0b, 8px);
|
|
28493
|
+
list-style: none;
|
|
28494
|
+
margin: 0;
|
|
28495
|
+
padding: 0;
|
|
28496
|
+
}
|
|
28497
|
+
.list-vertical {
|
|
28498
|
+
flex-direction: column;
|
|
28499
|
+
align-items: flex-start;
|
|
28500
|
+
}
|
|
28501
|
+
.toggle {
|
|
28502
|
+
display: inline-flex;
|
|
28503
|
+
align-items: center;
|
|
28504
|
+
background: none;
|
|
28505
|
+
border: none;
|
|
28506
|
+
cursor: pointer;
|
|
28507
|
+
color: var(--color-text-button-inline-icon-default-sm4ql6, #006ce0);
|
|
28508
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
28509
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
28510
|
+
padding: 0;
|
|
28511
|
+
margin-block-start: var(--space-xs-ymlm0b, 8px);
|
|
28512
|
+
}
|
|
28513
|
+
.toggle:hover {
|
|
28514
|
+
color: var(--color-text-button-inline-icon-hover-rbyzfc, #002b66);
|
|
28515
|
+
text-decoration: underline;
|
|
28516
|
+
}
|
|
28517
|
+
.dismiss-button {
|
|
28518
|
+
all: unset;
|
|
28519
|
+
display: inline-flex;
|
|
28520
|
+
align-items: center;
|
|
28521
|
+
justify-content: center;
|
|
28522
|
+
cursor: pointer;
|
|
28523
|
+
flex-shrink: 0;
|
|
28524
|
+
color: var(--color-text-button-inline-icon-default-sm4ql6, #006ce0);
|
|
28525
|
+
padding: var(--space-static-xxs-ns94dp, 4px);
|
|
28526
|
+
}
|
|
28527
|
+
.dismiss-button:hover {
|
|
28528
|
+
color: var(--color-text-button-inline-icon-hover-rbyzfc, #002b66);
|
|
28529
|
+
}
|
|
28530
|
+
.file-error-text,
|
|
28531
|
+
.file-warning-text {
|
|
28532
|
+
font-size: var(--font-size-body-s-smc8cv, 12px);
|
|
28533
|
+
line-height: var(--line-height-body-s-nu5hx1, 16px);
|
|
28534
|
+
display: flex;
|
|
28535
|
+
align-items: center;
|
|
28536
|
+
gap: var(--space-xxs-hwfkai, 4px);
|
|
28537
|
+
}
|
|
28538
|
+
.file-error-text {
|
|
28539
|
+
color: var(--color-text-status-error-5676bj, #db0000);
|
|
28540
|
+
}
|
|
28541
|
+
.file-warning-text {
|
|
28542
|
+
color: var(--color-text-status-warning-cxbpkd, #855900);
|
|
28543
|
+
}
|
|
28544
|
+
`;
|
|
28545
|
+
function defaultFormatFileSize(sizeInBytes) {
|
|
28546
|
+
if (sizeInBytes < 1024) return `${sizeInBytes} bytes`;
|
|
28547
|
+
if (sizeInBytes < 1024 * 1024) return `${(sizeInBytes / 1024).toFixed(1)} KB`;
|
|
28548
|
+
if (sizeInBytes < 1024 * 1024 * 1024) return `${(sizeInBytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
28549
|
+
return `${(sizeInBytes / (1024 * 1024 * 1024)).toFixed(1)} GB`;
|
|
28550
|
+
}
|
|
28551
|
+
function defaultFormatFileLastModified(date) {
|
|
28552
|
+
return date.toLocaleDateString();
|
|
28553
|
+
}
|
|
28554
|
+
var CsFileTokenGroupInternal = class extends CsBaseElement {
|
|
28555
|
+
constructor() {
|
|
28556
|
+
super(...arguments);
|
|
28557
|
+
this.items = [];
|
|
28558
|
+
this.alignment = "horizontal";
|
|
28559
|
+
this.showFileSize = false;
|
|
28560
|
+
this.showFileLastModified = false;
|
|
28561
|
+
this.showFileThumbnail = false;
|
|
28562
|
+
this.readOnly = false;
|
|
28563
|
+
this.limitShowFewerAriaLabel = "";
|
|
28564
|
+
this.limitShowMoreAriaLabel = "";
|
|
28565
|
+
this._expanded = false;
|
|
28566
|
+
}
|
|
28567
|
+
static {
|
|
28568
|
+
this.styles = [sharedStyles, componentStyles75, tokenListStyles2, hostStyles77];
|
|
28569
|
+
}
|
|
28570
|
+
_onDismiss(fileIndex) {
|
|
28571
|
+
if (this.readOnly) return;
|
|
28572
|
+
fireNonCancelableEvent(
|
|
28573
|
+
this,
|
|
28574
|
+
"dismiss",
|
|
28575
|
+
{ fileIndex }
|
|
28576
|
+
);
|
|
28577
|
+
}
|
|
28578
|
+
_toggleExpand() {
|
|
28579
|
+
this._expanded = !this._expanded;
|
|
28580
|
+
}
|
|
28581
|
+
_formatSize(sizeInBytes) {
|
|
28582
|
+
return this.i18nStrings?.formatFileSize ? this.i18nStrings.formatFileSize(sizeInBytes) : defaultFormatFileSize(sizeInBytes);
|
|
28583
|
+
}
|
|
28584
|
+
_formatLastModified(date) {
|
|
28585
|
+
return this.i18nStrings?.formatFileLastModified ? this.i18nStrings.formatFileLastModified(date) : defaultFormatFileLastModified(date);
|
|
28586
|
+
}
|
|
28587
|
+
_isImageFile(file) {
|
|
28588
|
+
return file.type.startsWith("image/");
|
|
28589
|
+
}
|
|
28590
|
+
_renderThumbnail(file) {
|
|
28591
|
+
if (!this.showFileThumbnail || !this._isImageFile(file)) return nothing45;
|
|
28592
|
+
const url = URL.createObjectURL(file);
|
|
28593
|
+
return html79`
|
|
28594
|
+
<div class="file-option-thumbnail">
|
|
28595
|
+
<img
|
|
28596
|
+
class="file-option-thumbnail-image"
|
|
28597
|
+
src=${url}
|
|
28598
|
+
alt=${file.name}
|
|
28599
|
+
@load=${() => URL.revokeObjectURL(url)}
|
|
28600
|
+
/>
|
|
28601
|
+
</div>
|
|
28602
|
+
`;
|
|
28603
|
+
}
|
|
28604
|
+
_renderFileToken(item, index) {
|
|
28605
|
+
const { file, loading, errorText, warningText } = item;
|
|
28606
|
+
const showDismiss = !this.readOnly && !loading;
|
|
28607
|
+
const isHorizontal = this.alignment === "horizontal";
|
|
28608
|
+
const hasThumbnail = this.showFileThumbnail && this._isImageFile(file);
|
|
28609
|
+
const boxClasses = {
|
|
28610
|
+
"token-box": true,
|
|
28611
|
+
"horizontal": isHorizontal,
|
|
28612
|
+
"error": !!errorText,
|
|
28613
|
+
"warning": !errorText && !!warningText,
|
|
28614
|
+
"read-only": this.readOnly,
|
|
28615
|
+
"loading": !!loading
|
|
28616
|
+
};
|
|
28617
|
+
const tokenClasses = {
|
|
28618
|
+
"token": true,
|
|
28619
|
+
"token-grid": hasThumbnail,
|
|
28620
|
+
"token-contains-image": hasThumbnail
|
|
28621
|
+
};
|
|
28622
|
+
const metadataClasses = {
|
|
28623
|
+
"file-option-metadata": true,
|
|
28624
|
+
"with-image": hasThumbnail,
|
|
28625
|
+
"single-row-loading": !!loading && !hasThumbnail
|
|
28626
|
+
};
|
|
28627
|
+
const removeAriaLabel = this.i18nStrings?.removeFileAriaLabel ? this.i18nStrings.removeFileAriaLabel(index, file.name) : `Remove ${file.name}`;
|
|
28628
|
+
return html79`
|
|
28629
|
+
<li class=${classMap64(tokenClasses)}>
|
|
28630
|
+
<div
|
|
28631
|
+
class=${classMap64(boxClasses)}
|
|
28632
|
+
role="group"
|
|
28633
|
+
aria-label=${file.name}
|
|
28634
|
+
>
|
|
28635
|
+
<div class="file-option">
|
|
28636
|
+
${this._renderThumbnail(file)}
|
|
28637
|
+
<div class=${classMap64(metadataClasses)}>
|
|
28638
|
+
<div class="file-name-container" tabindex="0">
|
|
28639
|
+
<div class="file-option-name">${file.name}</div>
|
|
28640
|
+
${this.showFileSize && file.size != null ? html79`<div class="file-option-size">${this._formatSize(file.size)}</div>` : nothing45}
|
|
28641
|
+
${this.showFileLastModified && file.lastModified ? html79`<div class="file-option-last-modified">${this._formatLastModified(new Date(file.lastModified))}</div>` : nothing45}
|
|
28642
|
+
</div>
|
|
28643
|
+
</div>
|
|
28644
|
+
</div>
|
|
28645
|
+
${loading ? html79`<div class="file-loading-overlay${!hasThumbnail ? " file-loading-overlay-single-row" : ""}"><cs-spinner size="normal"></cs-spinner></div>` : nothing45}
|
|
28646
|
+
${showDismiss ? html79`
|
|
28647
|
+
<button
|
|
28648
|
+
class="dismiss-button"
|
|
28649
|
+
type="button"
|
|
28650
|
+
aria-label=${removeAriaLabel}
|
|
28651
|
+
@click=${() => this._onDismiss(index)}
|
|
28652
|
+
>
|
|
28653
|
+
<cs-icon name="close" size="small"></cs-icon>
|
|
28654
|
+
</button>
|
|
28655
|
+
` : nothing45}
|
|
28656
|
+
</div>
|
|
28657
|
+
${errorText ? html79`<div class="file-error-text">
|
|
28658
|
+
<cs-icon name="status-negative" size="small"></cs-icon>
|
|
28659
|
+
<span>${errorText}</span>
|
|
28660
|
+
</div>` : nothing45}
|
|
28661
|
+
${!errorText && warningText ? html79`<div class="file-warning-text">
|
|
28662
|
+
<cs-icon name="status-warning" size="small"></cs-icon>
|
|
28663
|
+
<span>${warningText}</span>
|
|
28664
|
+
</div>` : nothing45}
|
|
28665
|
+
</li>
|
|
28666
|
+
`;
|
|
28667
|
+
}
|
|
28668
|
+
render() {
|
|
28669
|
+
const hasItems = this.items.length > 0;
|
|
28670
|
+
const isLimited = this.limit != null && this.limit < this.items.length && !this._expanded;
|
|
28671
|
+
const visibleItems = isLimited ? this.items.slice(0, this.limit) : this.items;
|
|
28672
|
+
const hiddenCount = this.items.length - visibleItems.length;
|
|
28673
|
+
const showMoreLabel = this.i18nStrings?.limitShowMore || `Show more (+${hiddenCount})`;
|
|
28674
|
+
const showFewerLabel = this.i18nStrings?.limitShowFewer || "Show fewer";
|
|
28675
|
+
const rootClasses = {
|
|
28676
|
+
"root": true,
|
|
28677
|
+
"has-items": hasItems
|
|
28678
|
+
};
|
|
28679
|
+
const listClasses = {
|
|
28680
|
+
"list": true,
|
|
28681
|
+
"list-vertical": this.alignment === "vertical"
|
|
28682
|
+
};
|
|
28683
|
+
return html79`
|
|
28684
|
+
<div class=${classMap64(rootClasses)}>
|
|
28685
|
+
<ul class=${classMap64(listClasses)} role="list" aria-label="File tokens">
|
|
28686
|
+
${visibleItems.map((item, i) => this._renderFileToken(item, i))}
|
|
28687
|
+
</ul>
|
|
28688
|
+
${this.limit != null && this.items.length > this.limit ? html79`
|
|
28689
|
+
<button
|
|
28690
|
+
class="toggle"
|
|
28691
|
+
type="button"
|
|
28692
|
+
aria-label=${this._expanded ? this.limitShowFewerAriaLabel || showFewerLabel : this.limitShowMoreAriaLabel || showMoreLabel}
|
|
28693
|
+
@click=${this._toggleExpand}
|
|
28694
|
+
>
|
|
28695
|
+
${this._expanded ? showFewerLabel : showMoreLabel}
|
|
28696
|
+
</button>
|
|
28697
|
+
` : nothing45}
|
|
28698
|
+
</div>
|
|
28699
|
+
`;
|
|
28700
|
+
}
|
|
28701
|
+
};
|
|
28702
|
+
__decorateClass([
|
|
28703
|
+
property78({ attribute: false })
|
|
28704
|
+
], CsFileTokenGroupInternal.prototype, "items", 2);
|
|
28705
|
+
__decorateClass([
|
|
28706
|
+
property78({ type: String, reflect: true })
|
|
28707
|
+
], CsFileTokenGroupInternal.prototype, "alignment", 2);
|
|
28708
|
+
__decorateClass([
|
|
28709
|
+
property78({ type: Boolean, reflect: true, attribute: "show-file-size" })
|
|
28710
|
+
], CsFileTokenGroupInternal.prototype, "showFileSize", 2);
|
|
28711
|
+
__decorateClass([
|
|
28712
|
+
property78({ type: Boolean, reflect: true, attribute: "show-file-last-modified" })
|
|
28713
|
+
], CsFileTokenGroupInternal.prototype, "showFileLastModified", 2);
|
|
28714
|
+
__decorateClass([
|
|
28715
|
+
property78({ type: Boolean, reflect: true, attribute: "show-file-thumbnail" })
|
|
28716
|
+
], CsFileTokenGroupInternal.prototype, "showFileThumbnail", 2);
|
|
28717
|
+
__decorateClass([
|
|
28718
|
+
property78({ type: Boolean, reflect: true, attribute: "read-only" })
|
|
28719
|
+
], CsFileTokenGroupInternal.prototype, "readOnly", 2);
|
|
28720
|
+
__decorateClass([
|
|
28721
|
+
property78({ type: Number })
|
|
28722
|
+
], CsFileTokenGroupInternal.prototype, "limit", 2);
|
|
28723
|
+
__decorateClass([
|
|
28724
|
+
property78({ attribute: false })
|
|
28725
|
+
], CsFileTokenGroupInternal.prototype, "i18nStrings", 2);
|
|
28726
|
+
__decorateClass([
|
|
28727
|
+
property78({ type: String, attribute: "limit-show-fewer-aria-label" })
|
|
28728
|
+
], CsFileTokenGroupInternal.prototype, "limitShowFewerAriaLabel", 2);
|
|
28729
|
+
__decorateClass([
|
|
28730
|
+
property78({ type: String, attribute: "limit-show-more-aria-label" })
|
|
28731
|
+
], CsFileTokenGroupInternal.prototype, "limitShowMoreAriaLabel", 2);
|
|
28732
|
+
__decorateClass([
|
|
28733
|
+
state25()
|
|
28734
|
+
], CsFileTokenGroupInternal.prototype, "_expanded", 2);
|
|
28735
|
+
|
|
28736
|
+
// src/file-token-group/index.ts
|
|
28737
|
+
var CsFileTokenGroup = class extends CsFileTokenGroupInternal {
|
|
28738
|
+
};
|
|
28739
|
+
customElements.define("cs-file-token-group", CsFileTokenGroup);
|
|
28740
|
+
|
|
28741
|
+
// src/item-card/internal.ts
|
|
28742
|
+
import { css as css177, html as html80 } from "lit";
|
|
28743
|
+
import { property as property79 } from "lit/decorators.js";
|
|
28744
|
+
import { classMap as classMap65 } from "lit/directives/class-map.js";
|
|
28745
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
28746
|
+
|
|
28747
|
+
// src/item-card/styles.ts
|
|
28748
|
+
import { css as css176 } from "lit";
|
|
28749
|
+
var componentStyles76 = css176`
|
|
28750
|
+
.root {
|
|
28751
|
+
transition-property: background-color;
|
|
28752
|
+
transition-duration: var(--motion-duration-transition-show-paced-t8d1os, 180ms);
|
|
28753
|
+
transition-timing-function: var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
|
|
28754
|
+
}
|
|
28755
|
+
@media (prefers-reduced-motion: reduce) {
|
|
28756
|
+
.root {
|
|
28757
|
+
animation: none;
|
|
28758
|
+
transition: none;
|
|
28759
|
+
}
|
|
28760
|
+
}
|
|
28761
|
+
.awsui-motion-disabled .root, .awsui-mode-entering .root {
|
|
28762
|
+
animation: none;
|
|
28763
|
+
transition: none;
|
|
28764
|
+
}
|
|
28765
|
+
|
|
28766
|
+
.root::before {
|
|
28767
|
+
transition-property: border-top-color, border-right-color, border-bottom-color, border-left-color;
|
|
28768
|
+
transition-duration: var(--motion-duration-transition-show-paced-t8d1os, 180ms);
|
|
28769
|
+
transition-timing-function: var(--motion-easing-transition-show-paced-x2k7uh, ease-out);
|
|
28770
|
+
}
|
|
28771
|
+
@media (prefers-reduced-motion: reduce) {
|
|
28772
|
+
.root::before {
|
|
28773
|
+
animation: none;
|
|
28774
|
+
transition: none;
|
|
28775
|
+
}
|
|
28776
|
+
}
|
|
28777
|
+
.awsui-motion-disabled .root::before, .awsui-mode-entering .root::before {
|
|
28778
|
+
animation: none;
|
|
28779
|
+
transition: none;
|
|
28780
|
+
}
|
|
28781
|
+
|
|
28782
|
+
.header-inner {
|
|
28783
|
+
font-family: var(--font-family-heading-ugphat, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
28784
|
+
font-size: var(--font-size-heading-s-zp08en, 16px);
|
|
28785
|
+
line-height: var(--line-height-heading-s-hmi4vc, 20px);
|
|
28786
|
+
letter-spacing: var(--letter-spacing-heading-s-4st9ep, -0.005em);
|
|
28787
|
+
font-weight: var(--font-weight-heading-s-lcx0ai, 700);
|
|
28788
|
+
-webkit-font-smoothing: var(--font-smoothing-webkit-oemolo, antialiased);
|
|
28789
|
+
-moz-osx-font-smoothing: var(--font-smoothing-moz-osx-hbm0aq, grayscale);
|
|
28790
|
+
}
|
|
28791
|
+
.header:not(:has(+ .body)) {
|
|
28792
|
+
flex: 1;
|
|
28793
|
+
}
|
|
28794
|
+
|
|
28795
|
+
.body {
|
|
28796
|
+
flex: 1;
|
|
28797
|
+
}
|
|
28798
|
+
|
|
28799
|
+
.footer:first-child {
|
|
28800
|
+
margin-block-start: auto;
|
|
28801
|
+
}
|
|
28802
|
+
|
|
28803
|
+
.root {
|
|
28804
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
28805
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
28806
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
28807
|
+
font-weight: 400;
|
|
28808
|
+
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
28809
|
+
-webkit-font-smoothing: auto;
|
|
28810
|
+
-moz-osx-font-smoothing: auto;
|
|
28811
|
+
box-sizing: border-box;
|
|
28812
|
+
position: relative;
|
|
28813
|
+
background-color: var(--awsui-style-item-card-background-default-6b9ypa, var(--color-background-item-card-ww2wfv, #ffffff));
|
|
28814
|
+
min-inline-size: 0;
|
|
28815
|
+
box-shadow: var(--awsui-style-item-card-box-shadow-default-6b9ypa, var(--shadow-item-card-282f8w, none));
|
|
28816
|
+
}
|
|
28817
|
+
.root:before {
|
|
28818
|
+
content: "";
|
|
28819
|
+
position: absolute;
|
|
28820
|
+
inset-inline-start: 0px;
|
|
28821
|
+
inset-block-start: 0px;
|
|
28822
|
+
inline-size: 100%;
|
|
28823
|
+
block-size: 100%;
|
|
28824
|
+
pointer-events: none;
|
|
28825
|
+
background: transparent;
|
|
28826
|
+
box-sizing: border-box;
|
|
28827
|
+
box-shadow: none;
|
|
28828
|
+
border-color: transparent;
|
|
28829
|
+
border-block: solid var(--awsui-style-item-card-border-width-default-6b9ypa, var(--border-width-item-card-3wmyp3, 1px)) var(--awsui-style-item-card-border-color-default-6b9ypa, var(--color-border-item-card-fia23i, #c6c6cd));
|
|
28830
|
+
border-inline: solid var(--awsui-style-item-card-border-width-default-6b9ypa, var(--border-width-item-card-3wmyp3, 1px)) var(--awsui-style-item-card-border-color-default-6b9ypa, var(--color-border-item-card-fia23i, #c6c6cd));
|
|
28831
|
+
}
|
|
28832
|
+
.root::after {
|
|
28833
|
+
content: "";
|
|
28834
|
+
position: absolute;
|
|
28835
|
+
inset-inline-start: 0px;
|
|
28836
|
+
inset-block-start: 0px;
|
|
28837
|
+
inline-size: 100%;
|
|
28838
|
+
block-size: 100%;
|
|
28839
|
+
pointer-events: none;
|
|
28840
|
+
background: transparent;
|
|
28841
|
+
box-sizing: border-box;
|
|
28842
|
+
}
|
|
28843
|
+
.root:not(.refresh)::before {
|
|
28844
|
+
border-block-start: solid var(--awsui-style-item-card-border-width-default-6b9ypa, var(--border-container-top-width-n1eke6, 0px)) var(--awsui-style-item-card-border-color-default-6b9ypa, var(--color-border-container-top-k3vmoz, transparent));
|
|
28845
|
+
}
|
|
28846
|
+
.root.highlighted {
|
|
28847
|
+
background-color: var(--color-background-item-selected-9gppru, #f0fbff);
|
|
28848
|
+
}
|
|
28849
|
+
.root.highlighted:before {
|
|
28850
|
+
border-block: solid var(--border-width-item-card-highlighted-jay4ll, 2px) var(--color-border-item-card-highlighted-5l7rko, #006ce0);
|
|
28851
|
+
border-inline: solid var(--border-width-item-card-highlighted-jay4ll, 2px) var(--color-border-item-card-highlighted-5l7rko, #006ce0);
|
|
28852
|
+
}
|
|
28853
|
+
.root.variant-embedded > .inner-card, .root.variant-default > .inner-card {
|
|
28854
|
+
display: flex;
|
|
28855
|
+
flex-direction: column;
|
|
28856
|
+
block-size: 100%;
|
|
28857
|
+
inline-size: 100%;
|
|
28858
|
+
}
|
|
28859
|
+
.root.variant-embedded > .inner-card > .header + .body:not(.no-padding),
|
|
28860
|
+
.root.variant-embedded > .inner-card > .header + .footer:not(.no-padding),
|
|
28861
|
+
.root.variant-embedded > .inner-card > .body + .footer:not(.no-padding),
|
|
28862
|
+
.root.variant-default > .inner-card > .header + .body:not(.no-padding),
|
|
28863
|
+
.root.variant-default > .inner-card > .header + .footer:not(.no-padding),
|
|
28864
|
+
.root.variant-default > .inner-card > .body + .footer:not(.no-padding) {
|
|
28865
|
+
padding-block-start: var(--space-xxs-hwfkai, 4px);
|
|
28866
|
+
}
|
|
28867
|
+
.root.variant-embedded > .inner-card > .header:not(.no-padding):has(+ .body, + .footer), .root.variant-embedded > .inner-card > .body:not(.no-padding):has(+ .body, + .footer), .root.variant-default > .inner-card > .header:not(.no-padding):has(+ .body, + .footer), .root.variant-default > .inner-card > .body:not(.no-padding):has(+ .body, + .footer) {
|
|
28868
|
+
padding-block-end: var(--space-xxs-hwfkai, 4px);
|
|
28869
|
+
}
|
|
28870
|
+
.root.variant-embedded, .root.variant-embedded:before, .root.variant-embedded::after, .root.variant-embedded > .inner-card {
|
|
28871
|
+
border-start-start-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-embedded-l0g6e3, 8px));
|
|
28872
|
+
border-start-end-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-embedded-l0g6e3, 8px));
|
|
28873
|
+
border-end-start-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-embedded-l0g6e3, 8px));
|
|
28874
|
+
border-end-end-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-embedded-l0g6e3, 8px));
|
|
28875
|
+
}
|
|
28876
|
+
.root.variant-embedded > .inner-card > .header:not(.no-padding),
|
|
28877
|
+
.root.variant-embedded > .inner-card > .body:not(.no-padding),
|
|
28878
|
+
.root.variant-embedded > .inner-card > .footer:not(.no-padding) {
|
|
28879
|
+
padding-block: var(--space-item-card-vertical-embedded-zuozef, 10px);
|
|
28880
|
+
padding-inline-start: var(--space-item-card-horizontal-embedded-e0vef5, 12px);
|
|
28881
|
+
}
|
|
28882
|
+
.root.variant-embedded > .inner-card > .header:not(.no-padding):not(.with-actions),
|
|
28883
|
+
.root.variant-embedded > .inner-card > .body:not(.no-padding):not(.with-actions),
|
|
28884
|
+
.root.variant-embedded > .inner-card > .footer:not(.no-padding):not(.with-actions) {
|
|
28885
|
+
padding-inline-end: var(--space-item-card-horizontal-embedded-e0vef5, 12px);
|
|
28886
|
+
}
|
|
28887
|
+
.root.variant-embedded > .inner-card > .header:not(.no-padding).with-actions,
|
|
28888
|
+
.root.variant-embedded > .inner-card > .body:not(.no-padding).with-actions,
|
|
28889
|
+
.root.variant-embedded > .inner-card > .footer:not(.no-padding).with-actions {
|
|
28890
|
+
padding-inline-end: calc(var(--space-item-card-horizontal-embedded-e0vef5, 12px) - var(--space-xxs-hwfkai, 4px));
|
|
28891
|
+
}
|
|
28892
|
+
.root.variant-embedded > .inner-card > .header:not(.no-padding).with-actions {
|
|
28893
|
+
padding-block: calc(var(--space-item-card-vertical-embedded-zuozef, 10px) - var(--space-scaled-xxs-pfm1nx, 4px));
|
|
28894
|
+
}
|
|
28895
|
+
.root.variant-embedded > .inner-card > .header:not(.no-padding).with-actions:has(+ .body, + .footer) {
|
|
28896
|
+
padding-block-end: var(--space-xxs-hwfkai, 4px);
|
|
28897
|
+
}
|
|
28898
|
+
.root.variant-default, .root.variant-default:before, .root.variant-default::after, .root.variant-default > .inner-card {
|
|
28899
|
+
border-start-start-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-default-pi9u8q, 16px));
|
|
28900
|
+
border-start-end-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-default-pi9u8q, 16px));
|
|
28901
|
+
border-end-start-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-default-pi9u8q, 16px));
|
|
28902
|
+
border-end-end-radius: var(--awsui-style-item-card-border-radius-6b9ypa, var(--border-radius-item-card-default-pi9u8q, 16px));
|
|
28903
|
+
}
|
|
28904
|
+
.root.variant-default > .inner-card > .header:not(.no-padding),
|
|
28905
|
+
.root.variant-default > .inner-card > .body:not(.no-padding),
|
|
28906
|
+
.root.variant-default > .inner-card > .footer:not(.no-padding) {
|
|
28907
|
+
padding-block: var(--space-item-card-vertical-default-ppqfu4, 16px);
|
|
28908
|
+
padding-inline-start: var(--space-item-card-horizontal-default-obq2ks, 20px);
|
|
28909
|
+
}
|
|
28910
|
+
.root.variant-default > .inner-card > .header:not(.no-padding):not(.with-actions),
|
|
28911
|
+
.root.variant-default > .inner-card > .body:not(.no-padding):not(.with-actions),
|
|
28912
|
+
.root.variant-default > .inner-card > .footer:not(.no-padding):not(.with-actions) {
|
|
28913
|
+
padding-inline-end: var(--space-item-card-horizontal-default-obq2ks, 20px);
|
|
28914
|
+
}
|
|
28915
|
+
.root.variant-default > .inner-card > .header:not(.no-padding).with-actions,
|
|
28916
|
+
.root.variant-default > .inner-card > .body:not(.no-padding).with-actions,
|
|
28917
|
+
.root.variant-default > .inner-card > .footer:not(.no-padding).with-actions {
|
|
28918
|
+
padding-inline-end: calc(var(--space-item-card-horizontal-default-obq2ks, 20px) - var(--space-xxs-hwfkai, 4px));
|
|
28919
|
+
}
|
|
28920
|
+
.root.variant-default > .inner-card > .header:not(.no-padding).with-actions {
|
|
28921
|
+
padding-block: calc(var(--space-item-card-vertical-default-ppqfu4, 16px) - var(--space-scaled-xxs-pfm1nx, 4px));
|
|
28922
|
+
}
|
|
28923
|
+
.root.variant-default > .inner-card > .header:not(.no-padding).with-actions:has(+ .body, + .footer) {
|
|
28924
|
+
padding-block-end: var(--space-xxs-hwfkai, 4px);
|
|
28925
|
+
}
|
|
28926
|
+
|
|
28927
|
+
.full-height {
|
|
28928
|
+
block-size: 100%;
|
|
28929
|
+
}
|
|
28930
|
+
|
|
28931
|
+
.description {
|
|
28932
|
+
color: var(--color-text-heading-secondary-iwtvf6, #424650);
|
|
28933
|
+
font-size: var(--font-size-body-s-smc8cv, 12px);
|
|
28934
|
+
line-height: var(--line-height-body-s-nu5hx1, 16px);
|
|
28935
|
+
letter-spacing: var(--letter-spacing-body-s-gq78ok, 0.005em);
|
|
28936
|
+
}
|
|
28937
|
+
`;
|
|
28938
|
+
|
|
28939
|
+
// src/item-card/internal.ts
|
|
28940
|
+
var hostStyles78 = css177`:host { display: block; }`;
|
|
28941
|
+
var CsItemCardInternal = class extends CsBaseElement {
|
|
28942
|
+
constructor() {
|
|
28943
|
+
super(...arguments);
|
|
28944
|
+
this.variant = "default";
|
|
28945
|
+
this.disableHeaderPaddings = false;
|
|
28946
|
+
this.disableContentPaddings = false;
|
|
28947
|
+
this.disableFooterPaddings = false;
|
|
28948
|
+
this.highlighted = false;
|
|
28949
|
+
this.fullHeight = false;
|
|
28950
|
+
this._hasHeader = false;
|
|
28951
|
+
this._hasFooter = false;
|
|
28952
|
+
this._hasActions = false;
|
|
28953
|
+
this._hasDescription = false;
|
|
28954
|
+
this._onHeaderSlotChange = (e) => {
|
|
28955
|
+
const slot = e.target;
|
|
28956
|
+
this._hasHeader = slot.assignedNodes({ flatten: true }).length > 0;
|
|
28957
|
+
this.requestUpdate();
|
|
28958
|
+
};
|
|
28959
|
+
this._onFooterSlotChange = (e) => {
|
|
28960
|
+
const slot = e.target;
|
|
28961
|
+
this._hasFooter = slot.assignedNodes({ flatten: true }).length > 0;
|
|
28962
|
+
this.requestUpdate();
|
|
28963
|
+
};
|
|
28964
|
+
this._onActionsSlotChange = (e) => {
|
|
28965
|
+
const slot = e.target;
|
|
28966
|
+
this._hasActions = slot.assignedNodes({ flatten: true }).length > 0;
|
|
28967
|
+
this.requestUpdate();
|
|
28968
|
+
};
|
|
28969
|
+
this._onDescriptionSlotChange = (e) => {
|
|
28970
|
+
const slot = e.target;
|
|
28971
|
+
this._hasDescription = slot.assignedNodes({ flatten: true }).length > 0;
|
|
28972
|
+
this.requestUpdate();
|
|
28973
|
+
};
|
|
28974
|
+
}
|
|
28975
|
+
static {
|
|
28976
|
+
this.styles = [sharedStyles, componentStyles76, hostStyles78];
|
|
28977
|
+
}
|
|
28978
|
+
_buildRootStyleOverrides() {
|
|
28979
|
+
const s = this.style_;
|
|
28980
|
+
const overrides = {};
|
|
28981
|
+
if (s?.root?.background) overrides["--awsui-style-item-card-background-default-6b9ypa"] = s.root.background;
|
|
28982
|
+
if (s?.root?.borderColor) overrides["--awsui-style-item-card-border-color-default-6b9ypa"] = s.root.borderColor;
|
|
28983
|
+
if (s?.root?.borderRadius) overrides["--awsui-style-item-card-border-radius-6b9ypa"] = s.root.borderRadius;
|
|
28984
|
+
if (s?.root?.borderWidth) overrides["--awsui-style-item-card-border-width-default-6b9ypa"] = s.root.borderWidth;
|
|
28985
|
+
if (s?.root?.boxShadow) overrides["--awsui-style-item-card-box-shadow-default-6b9ypa"] = s.root.boxShadow;
|
|
28986
|
+
return overrides;
|
|
28987
|
+
}
|
|
28988
|
+
render() {
|
|
28989
|
+
const rootClasses = {
|
|
28990
|
+
"root": true,
|
|
28991
|
+
"refresh": true,
|
|
28992
|
+
[`variant-${this.variant}`]: true,
|
|
28993
|
+
"highlighted": this.highlighted,
|
|
28994
|
+
"full-height": this.fullHeight
|
|
28995
|
+
};
|
|
28996
|
+
const headerClasses = {
|
|
28997
|
+
"header": true,
|
|
28998
|
+
"no-padding": this.disableHeaderPaddings,
|
|
28999
|
+
"with-actions": this._hasActions
|
|
29000
|
+
};
|
|
29001
|
+
const bodyClasses = {
|
|
29002
|
+
"body": true,
|
|
29003
|
+
"no-padding": this.disableContentPaddings
|
|
29004
|
+
};
|
|
29005
|
+
const footerClasses = {
|
|
29006
|
+
"footer": true,
|
|
29007
|
+
"no-padding": this.disableFooterPaddings
|
|
29008
|
+
};
|
|
29009
|
+
const rootStyleOverrides = this._buildRootStyleOverrides();
|
|
29010
|
+
return html80`
|
|
29011
|
+
<div class=${classMap65(rootClasses)} style=${styleMap(rootStyleOverrides)}>
|
|
29012
|
+
<div class="inner-card">
|
|
29013
|
+
${this._hasHeader || this._hasActions || this._hasDescription ? html80`
|
|
29014
|
+
<div class=${classMap65(headerClasses)}>
|
|
29015
|
+
<div class="header-inner">
|
|
29016
|
+
<slot name="header" @slotchange=${this._onHeaderSlotChange}></slot>
|
|
29017
|
+
</div>
|
|
29018
|
+
${this._hasDescription ? html80`<div class="description"><slot name="description" @slotchange=${this._onDescriptionSlotChange}></slot></div>` : html80`<slot name="description" @slotchange=${this._onDescriptionSlotChange} style="display:none"></slot>`}
|
|
29019
|
+
${this._hasActions ? html80`<div class="actions"><slot name="actions" @slotchange=${this._onActionsSlotChange}></slot></div>` : html80`<slot name="actions" @slotchange=${this._onActionsSlotChange} style="display:none"></slot>`}
|
|
29020
|
+
</div>
|
|
29021
|
+
` : html80`
|
|
29022
|
+
<slot name="header" @slotchange=${this._onHeaderSlotChange} style="display:none"></slot>
|
|
29023
|
+
<slot name="description" @slotchange=${this._onDescriptionSlotChange} style="display:none"></slot>
|
|
29024
|
+
<slot name="actions" @slotchange=${this._onActionsSlotChange} style="display:none"></slot>
|
|
29025
|
+
`}
|
|
29026
|
+
<div class=${classMap65(bodyClasses)}>
|
|
29027
|
+
<slot></slot>
|
|
29028
|
+
</div>
|
|
29029
|
+
${this._hasFooter ? html80`<div class=${classMap65(footerClasses)}><slot name="footer" @slotchange=${this._onFooterSlotChange}></slot></div>` : html80`<slot name="footer" @slotchange=${this._onFooterSlotChange} style="display:none"></slot>`}
|
|
29030
|
+
</div>
|
|
29031
|
+
</div>
|
|
29032
|
+
`;
|
|
29033
|
+
}
|
|
29034
|
+
};
|
|
29035
|
+
__decorateClass([
|
|
29036
|
+
property79({ type: String, reflect: true })
|
|
29037
|
+
], CsItemCardInternal.prototype, "variant", 2);
|
|
29038
|
+
__decorateClass([
|
|
29039
|
+
property79({ type: Boolean, reflect: true, attribute: "disable-header-paddings" })
|
|
29040
|
+
], CsItemCardInternal.prototype, "disableHeaderPaddings", 2);
|
|
29041
|
+
__decorateClass([
|
|
29042
|
+
property79({ type: Boolean, reflect: true, attribute: "disable-content-paddings" })
|
|
29043
|
+
], CsItemCardInternal.prototype, "disableContentPaddings", 2);
|
|
29044
|
+
__decorateClass([
|
|
29045
|
+
property79({ type: Boolean, reflect: true, attribute: "disable-footer-paddings" })
|
|
29046
|
+
], CsItemCardInternal.prototype, "disableFooterPaddings", 2);
|
|
29047
|
+
__decorateClass([
|
|
29048
|
+
property79({ attribute: false })
|
|
29049
|
+
], CsItemCardInternal.prototype, "style_", 2);
|
|
29050
|
+
__decorateClass([
|
|
29051
|
+
property79({ type: Boolean, reflect: true })
|
|
29052
|
+
], CsItemCardInternal.prototype, "highlighted", 2);
|
|
29053
|
+
__decorateClass([
|
|
29054
|
+
property79({ type: Boolean, reflect: true, attribute: "full-height" })
|
|
29055
|
+
], CsItemCardInternal.prototype, "fullHeight", 2);
|
|
29056
|
+
__decorateClass([
|
|
29057
|
+
property79({ attribute: false })
|
|
29058
|
+
], CsItemCardInternal.prototype, "metadataAttributes", 2);
|
|
29059
|
+
|
|
29060
|
+
// src/item-card/index.ts
|
|
29061
|
+
var CsItemCard = class extends CsItemCardInternal {
|
|
29062
|
+
};
|
|
29063
|
+
customElements.define("cs-item-card", CsItemCard);
|
|
29064
|
+
|
|
29065
|
+
// src/panel-layout/internal.ts
|
|
29066
|
+
import { css as css179, html as html81, nothing as nothing46 } from "lit";
|
|
29067
|
+
import { property as property80, state as state26 } from "lit/decorators.js";
|
|
29068
|
+
import { classMap as classMap66 } from "lit/directives/class-map.js";
|
|
29069
|
+
import { styleMap as styleMap2 } from "lit/directives/style-map.js";
|
|
29070
|
+
|
|
29071
|
+
// src/panel-layout/styles.ts
|
|
29072
|
+
import { css as css178 } from "lit";
|
|
29073
|
+
var componentStyles77 = css178`
|
|
29074
|
+
.root {
|
|
29075
|
+
font-size: var(--font-size-body-m-a7nh2n, 14px);
|
|
29076
|
+
line-height: var(--line-height-body-m-2mh3ke, 20px);
|
|
29077
|
+
color: var(--color-text-body-default-vvtq8u, #0f141a);
|
|
29078
|
+
font-weight: 400;
|
|
29079
|
+
font-family: var(--font-family-base-gmnpzl, "Open Sans", "Helvetica Neue", Roboto, Arial, sans-serif);
|
|
29080
|
+
-webkit-font-smoothing: auto;
|
|
29081
|
+
-moz-osx-font-smoothing: auto;
|
|
29082
|
+
block-size: 100%;
|
|
29083
|
+
overflow: hidden;
|
|
29084
|
+
display: flex;
|
|
29085
|
+
}
|
|
29086
|
+
|
|
29087
|
+
.panel {
|
|
29088
|
+
display: flex;
|
|
29089
|
+
flex-shrink: 0;
|
|
29090
|
+
}
|
|
29091
|
+
.panel > .handle {
|
|
29092
|
+
display: flex;
|
|
29093
|
+
align-items: center;
|
|
29094
|
+
}
|
|
29095
|
+
.panel > .panel-content {
|
|
29096
|
+
overflow-y: auto;
|
|
29097
|
+
overflow-x: visible;
|
|
29098
|
+
flex-grow: 1;
|
|
29099
|
+
}
|
|
29100
|
+
:host-context([data-awsui-focus-visible=true]) .panel > .panel-content:focus {
|
|
29101
|
+
border-start-start-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29102
|
+
border-start-end-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29103
|
+
border-end-start-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29104
|
+
border-end-end-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29105
|
+
outline: 2px solid var(--color-border-item-focused-uk47pl, #006ce0);
|
|
29106
|
+
outline-offset: calc(-1 * 2px);
|
|
29107
|
+
}
|
|
29108
|
+
.display-main-only > .panel {
|
|
29109
|
+
display: none;
|
|
29110
|
+
}
|
|
29111
|
+
.display-panel-only > .panel {
|
|
29112
|
+
flex: 1;
|
|
29113
|
+
overflow-y: auto;
|
|
29114
|
+
overflow-x: visible;
|
|
29115
|
+
}
|
|
29116
|
+
|
|
29117
|
+
.content {
|
|
29118
|
+
overflow-y: auto;
|
|
29119
|
+
flex-grow: 1;
|
|
29120
|
+
flex-shrink: 1;
|
|
29121
|
+
}
|
|
29122
|
+
.display-panel-only > .content {
|
|
29123
|
+
display: none;
|
|
29124
|
+
}
|
|
29125
|
+
:host-context([data-awsui-focus-visible=true]) .content:focus {
|
|
29126
|
+
border-start-start-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29127
|
+
border-start-end-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29128
|
+
border-end-start-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29129
|
+
border-end-end-radius: calc(var(--border-radius-control-default-focus-ring-1uabki, 4px) + 2px);
|
|
29130
|
+
outline: 2px solid var(--color-border-item-focused-uk47pl, #006ce0);
|
|
29131
|
+
outline-offset: calc(-1 * 2px);
|
|
29132
|
+
}
|
|
29133
|
+
`;
|
|
29134
|
+
|
|
29135
|
+
// src/panel-layout/internal.ts
|
|
29136
|
+
var hostStyles79 = css179`:host { display: block; block-size: 100%; }`;
|
|
29137
|
+
var handleStyles = css179`
|
|
29138
|
+
.handle-wrapper {
|
|
29139
|
+
display: flex;
|
|
29140
|
+
align-items: center;
|
|
29141
|
+
justify-content: center;
|
|
29142
|
+
cursor: col-resize;
|
|
29143
|
+
user-select: none;
|
|
29144
|
+
-webkit-user-select: none;
|
|
29145
|
+
inline-size: 8px;
|
|
29146
|
+
flex-shrink: 0;
|
|
29147
|
+
}
|
|
29148
|
+
.handle-wrapper:hover .handle-bar {
|
|
29149
|
+
background-color: var(--color-border-item-focused-uk47pl, #006ce0);
|
|
29150
|
+
}
|
|
29151
|
+
.handle-bar {
|
|
29152
|
+
inline-size: 2px;
|
|
29153
|
+
block-size: 24px;
|
|
29154
|
+
border-radius: 1px;
|
|
29155
|
+
background-color: var(--color-border-divider-default-jx2uvy, #c6c6cd);
|
|
29156
|
+
transition: background-color 120ms ease-out;
|
|
29157
|
+
}
|
|
29158
|
+
.handle-wrapper:focus-visible {
|
|
29159
|
+
outline: 2px solid var(--color-border-item-focused-uk47pl, #006ce0);
|
|
29160
|
+
outline-offset: -2px;
|
|
29161
|
+
border-radius: var(--border-radius-control-default-focus-ring-1uabki, 4px);
|
|
29162
|
+
}
|
|
29163
|
+
`;
|
|
29164
|
+
var KEYBOARD_RESIZE_STEP = 10;
|
|
29165
|
+
var MIN_DEFAULT = 100;
|
|
29166
|
+
var CsPanelLayoutInternal = class extends CsBaseElement {
|
|
29167
|
+
constructor() {
|
|
29168
|
+
super(...arguments);
|
|
29169
|
+
this.panelPosition = "side-end";
|
|
29170
|
+
this.resizable = false;
|
|
29171
|
+
this.display = "all";
|
|
29172
|
+
this._internalSize = 280;
|
|
29173
|
+
this._dragging = false;
|
|
29174
|
+
this._dragStartX = 0;
|
|
29175
|
+
this._dragStartSize = 0;
|
|
29176
|
+
this._onPointerDown = (e) => {
|
|
29177
|
+
if (!this.resizable) return;
|
|
29178
|
+
e.preventDefault();
|
|
29179
|
+
this._dragging = true;
|
|
29180
|
+
this._dragStartX = e.clientX;
|
|
29181
|
+
this._dragStartSize = this._effectiveSize;
|
|
29182
|
+
e.target.setPointerCapture(e.pointerId);
|
|
29183
|
+
};
|
|
29184
|
+
this._onPointerMove = (e) => {
|
|
29185
|
+
if (!this._dragging) return;
|
|
29186
|
+
const dx = e.clientX - this._dragStartX;
|
|
29187
|
+
const delta = this.panelPosition === "side-start" ? dx : -dx;
|
|
29188
|
+
const newSize = this._clampSize(this._dragStartSize + delta);
|
|
29189
|
+
this._internalSize = newSize;
|
|
29190
|
+
};
|
|
29191
|
+
this._onPointerUp = (e) => {
|
|
29192
|
+
if (!this._dragging) return;
|
|
29193
|
+
this._dragging = false;
|
|
29194
|
+
e.target.releasePointerCapture(e.pointerId);
|
|
29195
|
+
this._fireResize(this._effectiveSize);
|
|
29196
|
+
};
|
|
29197
|
+
this._onKeyDown = (e) => {
|
|
29198
|
+
if (!this.resizable) return;
|
|
29199
|
+
let delta = 0;
|
|
29200
|
+
if (this.panelPosition === "side-start") {
|
|
29201
|
+
if (e.key === "ArrowRight") delta = KEYBOARD_RESIZE_STEP;
|
|
29202
|
+
else if (e.key === "ArrowLeft") delta = -KEYBOARD_RESIZE_STEP;
|
|
29203
|
+
} else {
|
|
29204
|
+
if (e.key === "ArrowLeft") delta = KEYBOARD_RESIZE_STEP;
|
|
29205
|
+
else if (e.key === "ArrowRight") delta = -KEYBOARD_RESIZE_STEP;
|
|
29206
|
+
}
|
|
29207
|
+
if (delta !== 0) {
|
|
29208
|
+
e.preventDefault();
|
|
29209
|
+
const newSize = this._clampSize(this._effectiveSize + delta);
|
|
29210
|
+
this._internalSize = newSize;
|
|
29211
|
+
this._fireResize(newSize);
|
|
29212
|
+
}
|
|
29213
|
+
};
|
|
29214
|
+
}
|
|
29215
|
+
static {
|
|
29216
|
+
this.styles = [sharedStyles, componentStyles77, handleStyles, hostStyles79];
|
|
29217
|
+
}
|
|
29218
|
+
connectedCallback() {
|
|
29219
|
+
super.connectedCallback();
|
|
29220
|
+
if (this.defaultPanelSize != null) {
|
|
29221
|
+
this._internalSize = this.defaultPanelSize;
|
|
29222
|
+
}
|
|
29223
|
+
}
|
|
29224
|
+
get _effectiveSize() {
|
|
29225
|
+
const raw = this.panelSize ?? this._internalSize;
|
|
29226
|
+
const min2 = this.minPanelSize ?? MIN_DEFAULT;
|
|
29227
|
+
const max2 = this.maxPanelSize ?? Infinity;
|
|
29228
|
+
return Math.max(min2, Math.min(max2, raw));
|
|
29229
|
+
}
|
|
29230
|
+
_clampSize(size2) {
|
|
29231
|
+
const min2 = this.minPanelSize ?? MIN_DEFAULT;
|
|
29232
|
+
const max2 = this.maxPanelSize ?? Infinity;
|
|
29233
|
+
return Math.max(min2, Math.min(max2, size2));
|
|
29234
|
+
}
|
|
29235
|
+
_fireResize(panelSize) {
|
|
29236
|
+
const totalSize = this.clientWidth;
|
|
29237
|
+
const detail = { totalSize, panelSize };
|
|
29238
|
+
fireNonCancelableEvent(this, "panelResize", detail);
|
|
29239
|
+
fireNonCancelableEvent(this, "layoutChange", detail);
|
|
29240
|
+
}
|
|
29241
|
+
focusResizeHandle() {
|
|
29242
|
+
const handle = this.shadowRoot?.querySelector(".handle-wrapper");
|
|
29243
|
+
handle?.focus();
|
|
29244
|
+
}
|
|
29245
|
+
_renderHandle() {
|
|
29246
|
+
if (!this.resizable || this.display !== "all") return nothing46;
|
|
29247
|
+
const ariaLabel = this.i18nStrings?.resizeHandleAriaLabel ?? "Resize panel";
|
|
29248
|
+
const tooltip = this.i18nStrings?.resizeHandleTooltipText;
|
|
29249
|
+
return html81`
|
|
29250
|
+
<div
|
|
29251
|
+
class="handle-wrapper"
|
|
29252
|
+
role="separator"
|
|
29253
|
+
aria-orientation="vertical"
|
|
29254
|
+
aria-valuenow=${this._effectiveSize}
|
|
29255
|
+
aria-valuemin=${this.minPanelSize ?? MIN_DEFAULT}
|
|
29256
|
+
aria-valuemax=${this.maxPanelSize ?? this.clientWidth}
|
|
29257
|
+
aria-label=${ariaLabel}
|
|
29258
|
+
title=${tooltip ?? nothing46}
|
|
29259
|
+
tabindex="0"
|
|
29260
|
+
@pointerdown=${this._onPointerDown}
|
|
29261
|
+
@pointermove=${this._onPointerMove}
|
|
29262
|
+
@pointerup=${this._onPointerUp}
|
|
29263
|
+
@keydown=${this._onKeyDown}
|
|
29264
|
+
>
|
|
29265
|
+
<div class="handle-bar"></div>
|
|
29266
|
+
</div>
|
|
29267
|
+
`;
|
|
29268
|
+
}
|
|
29269
|
+
render() {
|
|
29270
|
+
const rootClasses = {
|
|
29271
|
+
"root": true,
|
|
29272
|
+
[`display-${this.display}`]: true
|
|
29273
|
+
};
|
|
29274
|
+
const panelStyle = {};
|
|
29275
|
+
if (this.display === "all") {
|
|
29276
|
+
panelStyle["inline-size"] = `${this._effectiveSize}px`;
|
|
29277
|
+
}
|
|
29278
|
+
const panelFocusAttrs = {};
|
|
29279
|
+
if (this.panelFocusable) {
|
|
29280
|
+
panelFocusAttrs["tabindex"] = "0";
|
|
29281
|
+
if (this.panelFocusable.ariaLabel) panelFocusAttrs["aria-label"] = this.panelFocusable.ariaLabel;
|
|
29282
|
+
if (this.panelFocusable.ariaLabelledby) panelFocusAttrs["aria-labelledby"] = this.panelFocusable.ariaLabelledby;
|
|
29283
|
+
}
|
|
29284
|
+
const mainFocusAttrs = {};
|
|
29285
|
+
if (this.mainFocusable) {
|
|
29286
|
+
mainFocusAttrs["tabindex"] = "0";
|
|
29287
|
+
if (this.mainFocusable.ariaLabel) mainFocusAttrs["aria-label"] = this.mainFocusable.ariaLabel;
|
|
29288
|
+
if (this.mainFocusable.ariaLabelledby) mainFocusAttrs["aria-labelledby"] = this.mainFocusable.ariaLabelledby;
|
|
29289
|
+
}
|
|
29290
|
+
const panelFirst = this.panelPosition === "side-start";
|
|
29291
|
+
const panelSection = html81`
|
|
29292
|
+
<div class="panel" style=${styleMap2(panelStyle)}>
|
|
29293
|
+
${!panelFirst ? html81`<div class="handle">${this._renderHandle()}</div>` : nothing46}
|
|
29294
|
+
<div
|
|
29295
|
+
class="panel-content"
|
|
29296
|
+
tabindex=${this.panelFocusable ? "0" : nothing46}
|
|
29297
|
+
aria-label=${this.panelFocusable?.ariaLabel ?? nothing46}
|
|
29298
|
+
aria-labelledby=${this.panelFocusable?.ariaLabelledby ?? nothing46}
|
|
29299
|
+
>
|
|
29300
|
+
<slot name="panel"></slot>
|
|
29301
|
+
</div>
|
|
29302
|
+
${panelFirst ? html81`<div class="handle">${this._renderHandle()}</div>` : nothing46}
|
|
29303
|
+
</div>
|
|
29304
|
+
`;
|
|
29305
|
+
const mainSection = html81`
|
|
29306
|
+
<div
|
|
29307
|
+
class="content"
|
|
29308
|
+
tabindex=${this.mainFocusable ? "0" : nothing46}
|
|
29309
|
+
aria-label=${this.mainFocusable?.ariaLabel ?? nothing46}
|
|
29310
|
+
aria-labelledby=${this.mainFocusable?.ariaLabelledby ?? nothing46}
|
|
29311
|
+
>
|
|
29312
|
+
<slot name="main"></slot>
|
|
29313
|
+
</div>
|
|
29314
|
+
`;
|
|
29315
|
+
return html81`
|
|
29316
|
+
<div class=${classMap66(rootClasses)}>
|
|
29317
|
+
${panelFirst ? panelSection : mainSection}
|
|
29318
|
+
${panelFirst ? mainSection : panelSection}
|
|
29319
|
+
</div>
|
|
29320
|
+
`;
|
|
29321
|
+
}
|
|
29322
|
+
};
|
|
29323
|
+
__decorateClass([
|
|
29324
|
+
property80({ type: String, reflect: true, attribute: "panel-position" })
|
|
29325
|
+
], CsPanelLayoutInternal.prototype, "panelPosition", 2);
|
|
29326
|
+
__decorateClass([
|
|
29327
|
+
property80({ type: Number, attribute: "default-panel-size" })
|
|
29328
|
+
], CsPanelLayoutInternal.prototype, "defaultPanelSize", 2);
|
|
29329
|
+
__decorateClass([
|
|
29330
|
+
property80({ type: Number, attribute: "panel-size" })
|
|
29331
|
+
], CsPanelLayoutInternal.prototype, "panelSize", 2);
|
|
29332
|
+
__decorateClass([
|
|
29333
|
+
property80({ type: Number, attribute: "min-panel-size" })
|
|
29334
|
+
], CsPanelLayoutInternal.prototype, "minPanelSize", 2);
|
|
29335
|
+
__decorateClass([
|
|
29336
|
+
property80({ type: Number, attribute: "max-panel-size" })
|
|
29337
|
+
], CsPanelLayoutInternal.prototype, "maxPanelSize", 2);
|
|
29338
|
+
__decorateClass([
|
|
29339
|
+
property80({ type: Boolean, reflect: true })
|
|
29340
|
+
], CsPanelLayoutInternal.prototype, "resizable", 2);
|
|
29341
|
+
__decorateClass([
|
|
29342
|
+
property80({ type: String, reflect: true })
|
|
29343
|
+
], CsPanelLayoutInternal.prototype, "display", 2);
|
|
29344
|
+
__decorateClass([
|
|
29345
|
+
property80({ attribute: false })
|
|
29346
|
+
], CsPanelLayoutInternal.prototype, "panelFocusable", 2);
|
|
29347
|
+
__decorateClass([
|
|
29348
|
+
property80({ attribute: false })
|
|
29349
|
+
], CsPanelLayoutInternal.prototype, "mainFocusable", 2);
|
|
29350
|
+
__decorateClass([
|
|
29351
|
+
property80({ attribute: false })
|
|
29352
|
+
], CsPanelLayoutInternal.prototype, "i18nStrings", 2);
|
|
29353
|
+
__decorateClass([
|
|
29354
|
+
state26()
|
|
29355
|
+
], CsPanelLayoutInternal.prototype, "_internalSize", 2);
|
|
29356
|
+
__decorateClass([
|
|
29357
|
+
state26()
|
|
29358
|
+
], CsPanelLayoutInternal.prototype, "_dragging", 2);
|
|
29359
|
+
|
|
29360
|
+
// src/panel-layout/index.ts
|
|
29361
|
+
var CsPanelLayout = class extends CsPanelLayoutInternal {
|
|
29362
|
+
};
|
|
29363
|
+
customElements.define("cs-panel-layout", CsPanelLayout);
|
|
26506
29364
|
export {
|
|
26507
29365
|
CsAlert,
|
|
26508
29366
|
CsAnchorNavigation,
|
|
26509
29367
|
CsAnnotationContext,
|
|
29368
|
+
CsAppLayout,
|
|
26510
29369
|
CsAttributeEditor,
|
|
26511
29370
|
CsAutosuggest,
|
|
26512
29371
|
CsBadge,
|
|
@@ -26532,6 +29391,7 @@ export {
|
|
|
26532
29391
|
CsExpandableSection,
|
|
26533
29392
|
CsFileDropzone,
|
|
26534
29393
|
CsFileInput,
|
|
29394
|
+
CsFileTokenGroup,
|
|
26535
29395
|
CsFileUpload,
|
|
26536
29396
|
CsFlashbar,
|
|
26537
29397
|
CsForm,
|
|
@@ -26539,8 +29399,11 @@ export {
|
|
|
26539
29399
|
CsGrid,
|
|
26540
29400
|
CsHeader,
|
|
26541
29401
|
CsHelpPanel,
|
|
29402
|
+
CsHotspot,
|
|
26542
29403
|
CsIcon,
|
|
26543
29404
|
CsIconProvider,
|
|
29405
|
+
CsInput,
|
|
29406
|
+
CsItemCard,
|
|
26544
29407
|
CsKeyValuePairs,
|
|
26545
29408
|
CsLink,
|
|
26546
29409
|
CsList,
|
|
@@ -26548,6 +29411,7 @@ export {
|
|
|
26548
29411
|
CsModal,
|
|
26549
29412
|
CsMultiselect,
|
|
26550
29413
|
CsPagination,
|
|
29414
|
+
CsPanelLayout,
|
|
26551
29415
|
CsPopover,
|
|
26552
29416
|
CsProgressBar,
|
|
26553
29417
|
CsPromptInput,
|
|
@@ -26566,7 +29430,10 @@ export {
|
|
|
26566
29430
|
CsTabs,
|
|
26567
29431
|
CsTagEditor,
|
|
26568
29432
|
CsTextContent,
|
|
29433
|
+
CsTextFilter,
|
|
29434
|
+
CsTextarea,
|
|
26569
29435
|
CsTiles,
|
|
29436
|
+
CsTimeInput,
|
|
26570
29437
|
CsToggle,
|
|
26571
29438
|
CsToggleButton,
|
|
26572
29439
|
CsToken,
|
|
@@ -26574,5 +29441,6 @@ export {
|
|
|
26574
29441
|
CsTooltip,
|
|
26575
29442
|
CsTopNavigation,
|
|
26576
29443
|
CsTreeView,
|
|
29444
|
+
CsTutorialPanel,
|
|
26577
29445
|
CsWizard
|
|
26578
29446
|
};
|