@bluevolt-tech/lumen 1.4.1 → 1.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/dist/components/bv-button/bv-button.js +1 -1
- package/dist/components/bv-course-detail-modal/bv-course-detail-modal.js +1 -1
- package/dist/components/bv-course-grid-card/bv-course-grid-card.d.ts +4 -0
- package/dist/components/bv-course-grid-card/bv-course-grid-card.js +30 -2
- package/dist/components/bv-course-list-card/bv-course-list-card.d.ts +4 -0
- package/dist/components/bv-course-list-card/bv-course-list-card.js +29 -1
- package/dist/components/bv-empty-state/bv-empty-state.js +1 -1
- package/dist/components/bv-portal-header/bv-portal-header.js +1 -1
- package/dist/components/bv-user-row/bv-user-row.js +1 -1
- package/dist/storybook/stories/screens/course-catalog.data.js +1 -1
- package/dist/themes/base.css +1 -1
- package/package.json +1 -1
- package/themes/base.css +1 -1
|
@@ -183,7 +183,7 @@ var BvButton = class extends HTMLElement {
|
|
|
183
183
|
}
|
|
184
184
|
btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
|
|
185
185
|
const iconName = this.getAttribute("icon");
|
|
186
|
-
if (iconName) {
|
|
186
|
+
if (iconName && !this.loading) {
|
|
187
187
|
const svg = getIconSvg(iconName, 16);
|
|
188
188
|
if (svg) {
|
|
189
189
|
const iconEl = document.createElement("span");
|
|
@@ -1041,7 +1041,7 @@ var BvButton = class extends HTMLElement {
|
|
|
1041
1041
|
}
|
|
1042
1042
|
btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
|
|
1043
1043
|
const iconName = this.getAttribute("icon");
|
|
1044
|
-
if (iconName) {
|
|
1044
|
+
if (iconName && !this.loading) {
|
|
1045
1045
|
const svg = getIconSvg(iconName, 16);
|
|
1046
1046
|
if (svg) {
|
|
1047
1047
|
const iconEl = document.createElement("span");
|
|
@@ -7,6 +7,10 @@ export declare class BvCourseGridCard extends HTMLElement {
|
|
|
7
7
|
set disableSelection(v: boolean);
|
|
8
8
|
get hideSecondary(): boolean;
|
|
9
9
|
set hideSecondary(v: boolean);
|
|
10
|
+
get primaryLoading(): boolean;
|
|
11
|
+
set primaryLoading(v: boolean);
|
|
12
|
+
get primaryDisabled(): boolean;
|
|
13
|
+
set primaryDisabled(v: boolean);
|
|
10
14
|
get loading(): boolean;
|
|
11
15
|
set loading(v: boolean);
|
|
12
16
|
private _rendered;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-course-grid-card/bv-course-grid-card.css
|
|
2
|
-
var bv_course_grid_card_default = ":host {\n display: block;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: var(--bv-spacing-sm);\n padding: 12px;\n background: var(--bv-color-neutral-0);\n border: 1px solid var(--bv-color-neutral-300);\n border-radius: var(--bv-radius-xl);\n box-shadow: var(--bv-shadow-sm);\n cursor: pointer;\n transition:\n background var(--bv-transition-fast),\n border-color var(--bv-transition-fast),\n box-shadow var(--bv-transition-fast);\n}\n\n:host([selected]) .card {\n background: var(--bv-color-primary-50);\n border-color: var(--bv-color-primary);\n box-shadow: none;\n}\n\n/* Thumbnail */\n.thumbnail-wrap {\n position: relative;\n width: 100%;\n height: 153px;\n border-radius: var(--bv-radius-lg);\n overflow: hidden;\n background: var(--bv-color-neutral-200);\n flex-shrink: 0;\n}\n\n.thumbnail {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n\n.status-badge {\n position: absolute;\n top: 6px;\n right: 6px;\n padding: 0 var(--bv-spacing-sm);\n border-radius: var(--bv-radius-sm);\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-xs);\n font-weight: var(--bv-font-weight-medium);\n line-height: 18px;\n background: var(--bv-color-success-light);\n color: var(--bv-color-success-dark);\n}\n\n/* Content */\n.content {\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 1;\n min-width: 0;\n}\n\n.title {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-md);\n font-weight: var(--bv-font-weight-semibold);\n color: var(--bv-color-neutral-900);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.publisher {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-xs);\n font-weight: var(--bv-font-weight-regular);\n color: var(--bv-color-neutral-500);\n}\n\n.publisher strong {\n font-weight: var(--bv-font-weight-medium);\n color: var(--bv-color-neutral-900);\n}\n\n.description {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-sm);\n font-weight: var(--bv-font-weight-regular);\n color: var(--bv-color-neutral-700);\n line-height: 20px;\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin: 0;\n}\n\n.info-row {\n display: flex;\n gap: var(--bv-spacing-md);\n margin-top: 2px;\n}\n\n.info-item {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-sm);\n font-weight: var(--bv-font-weight-regular);\n color: var(--bv-color-neutral-900);\n}\n\n.info-item strong {\n font-weight: var(--bv-font-weight-bold);\n}\n\n/* Actions */\n.actions {\n display: flex;\n gap: var(--bv-spacing-sm);\n align-items: stretch;\n}\n\n.primary-action {\n display: block;\n flex: 1;\n min-width: 0;\n}\n\n.secondary-action {\n display: block;\n width: 48px;\n flex-shrink: 0;\n}\n\n/* Disabled selection: card body is no longer interactive */\n:host([disable-selection]) .card {\n cursor: default;\n}\n\n/* Loading skeleton */\n.skeleton {\n display: none;\n flex-direction: column;\n gap: var(--bv-spacing-sm);\n flex: 1;\n min-width: 0;\n}\n\n:host([loading]) .card {\n cursor: default;\n}\n\n:host([loading]) .thumbnail-wrap,\n:host([loading]) .content,\n:host([loading]) .actions {\n display: none;\n}\n\n:host([loading]) .skeleton {\n display: flex;\n}\n\n.skeleton-thumb {\n width: 100%;\n height: 153px;\n border-radius: var(--bv-radius-lg);\n background: var(--bv-color-neutral-200);\n animation: bv-skeleton-shimmer 1.5s ease-in-out infinite;\n}\n\n.skeleton-line {\n height: 12px;\n border-radius: var(--bv-radius-sm);\n background: var(--bv-color-neutral-200);\n animation: bv-skeleton-shimmer 1.5s ease-in-out infinite;\n}\n\n.skeleton-title-line {\n height: 20px;\n width: 70%;\n}\n\n.skeleton-short-line {\n width: 45%;\n}\n\n.skeleton-actions {\n display: flex;\n gap: var(--bv-spacing-sm);\n align-items: stretch;\n margin-top: 2px;\n}\n\n.skeleton-button {\n height: 44px;\n border-radius: var(--bv-radius-md);\n background: var(--bv-color-neutral-200);\n animation: bv-skeleton-shimmer 1.5s ease-in-out infinite;\n}\n\n.skeleton-primary {\n flex: 1;\n min-width: 0;\n}\n\n.skeleton-icon-btn {\n width: 48px;\n flex-shrink: 0;\n}\n\n@keyframes bv-skeleton-shimmer {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n";
|
|
2
|
+
var bv_course_grid_card_default = ":host {\n display: block;\n}\n\n.card {\n display: flex;\n flex-direction: column;\n gap: var(--bv-spacing-sm);\n padding: 12px;\n background: var(--bv-color-neutral-0);\n border: 1px solid var(--bv-color-neutral-300);\n border-radius: var(--bv-radius-xl);\n box-shadow: var(--bv-shadow-sm);\n cursor: pointer;\n transition:\n background var(--bv-transition-fast),\n border-color var(--bv-transition-fast),\n box-shadow var(--bv-transition-fast);\n}\n\n:host([selected]) .card {\n background: var(--bv-color-primary-50);\n border-color: var(--bv-color-primary);\n box-shadow: none;\n}\n\n/* Thumbnail */\n.thumbnail-wrap {\n position: relative;\n width: 100%;\n height: 153px;\n border-radius: var(--bv-radius-lg);\n overflow: hidden;\n background: var(--bv-color-neutral-200);\n flex-shrink: 0;\n}\n\n.thumbnail {\n width: 100%;\n height: 100%;\n object-fit: cover;\n display: block;\n}\n\n.status-badge {\n position: absolute;\n top: 6px;\n right: 6px;\n padding: 0 var(--bv-spacing-sm);\n border-radius: var(--bv-radius-sm);\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-xs);\n font-weight: var(--bv-font-weight-medium);\n line-height: 18px;\n background: var(--bv-color-success-light);\n color: var(--bv-color-success-dark);\n}\n\n/* Content */\n.content {\n display: flex;\n flex-direction: column;\n gap: 4px;\n flex: 1;\n min-width: 0;\n}\n\n.title {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-md);\n font-weight: var(--bv-font-weight-semibold);\n color: var(--bv-color-neutral-900);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.publisher {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-xs);\n font-weight: var(--bv-font-weight-regular);\n color: var(--bv-color-neutral-500);\n}\n\n.publisher strong {\n font-weight: var(--bv-font-weight-medium);\n color: var(--bv-color-neutral-900);\n}\n\n.description {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-sm);\n font-weight: var(--bv-font-weight-regular);\n color: var(--bv-color-neutral-700);\n line-height: 20px;\n min-height: 40px; /* Reserve space for 2 lines so cards align at the bottom in the grid, matching the list card's .description-wrap. */\n display: -webkit-box;\n -webkit-line-clamp: 2;\n -webkit-box-orient: vertical;\n overflow: hidden;\n margin: 0;\n}\n\n.info-row {\n display: flex;\n gap: var(--bv-spacing-md);\n margin-top: 2px;\n}\n\n.info-item {\n font-family: var(--bv-font-family-base);\n font-size: var(--bv-font-size-sm);\n font-weight: var(--bv-font-weight-regular);\n color: var(--bv-color-neutral-900);\n}\n\n.info-item strong {\n font-weight: var(--bv-font-weight-bold);\n}\n\n/* Actions */\n.actions {\n display: flex;\n gap: var(--bv-spacing-sm);\n align-items: stretch;\n}\n\n.primary-action {\n display: block;\n flex: 1;\n min-width: 0;\n}\n\n.secondary-action {\n display: block;\n width: 48px;\n flex-shrink: 0;\n}\n\n/* Disabled selection: card body is no longer interactive */\n:host([disable-selection]) .card {\n cursor: default;\n}\n\n/* Loading skeleton */\n.skeleton {\n display: none;\n flex-direction: column;\n gap: var(--bv-spacing-sm);\n flex: 1;\n min-width: 0;\n}\n\n:host([loading]) .card {\n cursor: default;\n}\n\n:host([loading]) .thumbnail-wrap,\n:host([loading]) .content,\n:host([loading]) .actions {\n display: none;\n}\n\n:host([loading]) .skeleton {\n display: flex;\n}\n\n.skeleton-thumb {\n width: 100%;\n height: 153px;\n border-radius: var(--bv-radius-lg);\n background: var(--bv-color-neutral-200);\n animation: bv-skeleton-shimmer 1.5s ease-in-out infinite;\n}\n\n.skeleton-line {\n height: 12px;\n border-radius: var(--bv-radius-sm);\n background: var(--bv-color-neutral-200);\n animation: bv-skeleton-shimmer 1.5s ease-in-out infinite;\n}\n\n.skeleton-title-line {\n height: 20px;\n width: 70%;\n}\n\n.skeleton-short-line {\n width: 45%;\n}\n\n.skeleton-actions {\n display: flex;\n gap: var(--bv-spacing-sm);\n align-items: stretch;\n margin-top: 2px;\n}\n\n.skeleton-button {\n height: 44px;\n border-radius: var(--bv-radius-md);\n background: var(--bv-color-neutral-200);\n animation: bv-skeleton-shimmer 1.5s ease-in-out infinite;\n}\n\n.skeleton-primary {\n flex: 1;\n min-width: 0;\n}\n\n.skeleton-icon-btn {\n width: 48px;\n flex-shrink: 0;\n}\n\n@keyframes bv-skeleton-shimmer {\n 0%,\n 100% {\n opacity: 1;\n }\n 50% {\n opacity: 0.5;\n }\n}\n";
|
|
3
3
|
|
|
4
4
|
// css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-button/bv-button.css
|
|
5
5
|
var bv_button_default = "/* \u2500\u2500 Public theming API \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Apps can override these three properties per-instance:\n\n HTML: <bv-button style=\"--bv-button-bg: #e53e3e;\">\n Angular: <bv-button [style.--bv-button-bg]=\"brandColor\">\n JavaScript: btn.style.setProperty('--bv-button-bg', value)\n\n Hover is auto-computed from the base colors via color-mix().\n Override --bv-button-bg-hover / --bv-button-border-color-hover\n if you need explicit control over the hovered state.\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n:host {\n /* Default values \u2014 map to global tokens (primary variant) */\n --bv-button-bg: var(--bv-color-primary);\n --bv-button-bg-hover: color-mix(in srgb, var(--bv-button-bg) 82%, black);\n --bv-button-color: var(--bv-color-neutral-0);\n --bv-button-border-color: var(--bv-color-primary);\n --bv-button-border-color-hover: color-mix(in srgb, var(--bv-button-border-color) 82%, black);\n --bv-button-font-family: var(--bv-font-family-base);\n --bv-button-font-size: var(--bv-font-size-sm);\n\n display: inline-block;\n font-family: var(--bv-font-family-base);\n}\n\n:host([hidden]) {\n /* `!important` so `hidden` always wins over :host([full-width]) / other display rules. */\n display: none !important;\n}\n\n:host([full-width]) {\n display: block;\n width: 100%;\n}\n\n/* \u2500\u2500 Variant tokens \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n Each variant re-points the component tokens to different global\n tokens. Apps can still override with inline styles \u2014 inline style\n always wins due to higher specificity.\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n:host([variant='secondary']) {\n --bv-button-bg: var(--bv-color-secondary);\n --bv-button-border-color: var(--bv-color-secondary);\n --bv-button-color: var(--bv-color-secondary-foreground);\n}\n\n:host([variant='tertiary']) {\n --bv-button-bg: var(--bv-color-tertiary);\n --bv-button-border-color: var(--bv-color-tertiary);\n}\n\n:host([variant='danger']) {\n --bv-button-bg: var(--bv-color-danger);\n --bv-button-border-color: var(--bv-color-danger);\n}\n\n:host([variant='ghost']) {\n --bv-button-bg: transparent;\n --bv-button-bg-hover: var(--bv-color-primary-light);\n --bv-button-color: var(--bv-color-primary);\n --bv-button-border-color: transparent;\n --bv-button-border-color-hover: transparent;\n}\n\n:host([variant='outline']) {\n --bv-button-bg: transparent;\n --bv-button-bg-hover: var(--bv-color-primary-light);\n --bv-button-color: var(--bv-color-primary);\n --bv-button-border-color: var(--bv-color-primary);\n --bv-button-border-color-hover: var(--bv-color-primary);\n}\n\n/* \u2500\u2500 Base button \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n All visual properties read from the component-level tokens above.\n\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */\n\n.btn {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: var(--bv-spacing-xs);\n padding: 10px var(--bv-spacing-md);\n min-height: 40px;\n width: auto;\n font-family: var(--bv-button-font-family);\n font-size: var(--bv-button-font-size);\n font-style: normal;\n font-weight: var(--bv-font-weight-semibold);\n line-height: 20px;\n border: 1px solid var(--bv-button-border-color);\n border-radius: var(--bv-radius-lg);\n cursor: pointer;\n transition:\n background var(--bv-transition-fast),\n color var(--bv-transition-fast),\n border-color var(--bv-transition-fast),\n box-shadow var(--bv-transition-fast),\n opacity var(--bv-transition-fast);\n white-space: nowrap;\n user-select: none;\n text-decoration: none;\n outline: none;\n box-sizing: border-box;\n background: var(--bv-button-bg);\n color: var(--bv-button-color);\n box-shadow: var(--bv-shadow-sm);\n}\n\n:host([full-width]) .btn {\n width: 100%;\n}\n\n.btn:hover:not(:disabled) {\n background: var(--bv-button-bg-hover);\n border-color: var(--bv-button-border-color-hover);\n}\n\n.btn:active:not(:disabled) {\n transform: translateY(1px);\n}\n\n.btn:focus-visible {\n outline: 2px solid var(--bv-button-border-color);\n outline-offset: 2px;\n}\n\n.btn:disabled {\n opacity: 0.5;\n cursor: not-allowed;\n pointer-events: none;\n}\n\n/* \u2500\u2500 Sizes \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500*/\n\n:host([size='sm']) .btn {\n padding: 6px 12px;\n min-height: 32px;\n font-size: var(--bv-font-size-sm);\n}\n\n:host([size='lg']) .btn {\n padding: 12px var(--bv-spacing-lg);\n min-height: 48px;\n font-size: var(--bv-font-size-md);\n}\n\n/* \u2500\u2500 Icon \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500*/\n\n.btn-icon {\n display: inline-flex;\n align-items: center;\n flex-shrink: 0;\n line-height: 0;\n}\n\n/* \u2500\u2500 Count badge \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500*/\n\n.btn-count {\n opacity: 0.8;\n font-weight: var(--bv-font-weight-regular);\n}\n\n/* \u2500\u2500 Loading spinner \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500*/\n\n.spinner {\n display: inline-block;\n width: 1em;\n height: 1em;\n border: 2px solid currentColor;\n border-top-color: transparent;\n border-radius: 50%;\n flex-shrink: 0;\n animation: bv-spin 700ms linear infinite;\n}\n\n@keyframes bv-spin {\n to {\n transform: rotate(360deg);\n }\n}\n";
|
|
@@ -186,7 +186,7 @@ var BvButton = class extends HTMLElement {
|
|
|
186
186
|
}
|
|
187
187
|
btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
|
|
188
188
|
const iconName = this.getAttribute("icon");
|
|
189
|
-
if (iconName) {
|
|
189
|
+
if (iconName && !this.loading) {
|
|
190
190
|
const svg = getIconSvg(iconName, 16);
|
|
191
191
|
if (svg) {
|
|
192
192
|
const iconEl = document.createElement("span");
|
|
@@ -227,6 +227,8 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
227
227
|
"primary-label",
|
|
228
228
|
"primary-variant",
|
|
229
229
|
"primary-icon",
|
|
230
|
+
"primary-loading",
|
|
231
|
+
"primary-disabled",
|
|
230
232
|
"secondary-label",
|
|
231
233
|
"secondary-icon",
|
|
232
234
|
"selected",
|
|
@@ -255,6 +257,20 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
255
257
|
if (v) this.setAttribute("hide-secondary", "");
|
|
256
258
|
else this.removeAttribute("hide-secondary");
|
|
257
259
|
}
|
|
260
|
+
get primaryLoading() {
|
|
261
|
+
return this.hasAttribute("primary-loading");
|
|
262
|
+
}
|
|
263
|
+
set primaryLoading(v) {
|
|
264
|
+
if (v) this.setAttribute("primary-loading", "");
|
|
265
|
+
else this.removeAttribute("primary-loading");
|
|
266
|
+
}
|
|
267
|
+
get primaryDisabled() {
|
|
268
|
+
return this.hasAttribute("primary-disabled");
|
|
269
|
+
}
|
|
270
|
+
set primaryDisabled(v) {
|
|
271
|
+
if (v) this.setAttribute("primary-disabled", "");
|
|
272
|
+
else this.removeAttribute("primary-disabled");
|
|
273
|
+
}
|
|
258
274
|
get loading() {
|
|
259
275
|
return this.hasAttribute("loading");
|
|
260
276
|
}
|
|
@@ -317,6 +333,16 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
317
333
|
var _a2;
|
|
318
334
|
(_a2 = this._els.primaryBtn) == null ? void 0 : _a2.setAttribute("icon", val ?? "");
|
|
319
335
|
},
|
|
336
|
+
"primary-loading": () => {
|
|
337
|
+
var _a2, _b;
|
|
338
|
+
if (val === null) (_a2 = this._els.primaryBtn) == null ? void 0 : _a2.removeAttribute("loading");
|
|
339
|
+
else (_b = this._els.primaryBtn) == null ? void 0 : _b.setAttribute("loading", "");
|
|
340
|
+
},
|
|
341
|
+
"primary-disabled": () => {
|
|
342
|
+
var _a2, _b;
|
|
343
|
+
if (val === null) (_a2 = this._els.primaryBtn) == null ? void 0 : _a2.removeAttribute("disabled");
|
|
344
|
+
else (_b = this._els.primaryBtn) == null ? void 0 : _b.setAttribute("disabled", "");
|
|
345
|
+
},
|
|
320
346
|
"secondary-label": () => {
|
|
321
347
|
this._syncSecondaryLabel();
|
|
322
348
|
},
|
|
@@ -394,6 +420,8 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
394
420
|
primaryBtn.setAttribute("full-width", "");
|
|
395
421
|
primaryBtn.className = "primary-action";
|
|
396
422
|
primaryBtn.textContent = this.getAttribute("primary-label") ?? "Enroll Now";
|
|
423
|
+
if (this.primaryLoading) primaryBtn.setAttribute("loading", "");
|
|
424
|
+
if (this.primaryDisabled) primaryBtn.setAttribute("disabled", "");
|
|
397
425
|
primaryBtn.addEventListener("click", () => {
|
|
398
426
|
this.dispatchEvent(new CustomEvent("bv-primary-action", { bubbles: true, composed: true }));
|
|
399
427
|
});
|
|
@@ -7,6 +7,10 @@ export declare class BvCourseListCard extends HTMLElement {
|
|
|
7
7
|
set disableSelection(v: boolean);
|
|
8
8
|
get hideSecondary(): boolean;
|
|
9
9
|
set hideSecondary(v: boolean);
|
|
10
|
+
get primaryLoading(): boolean;
|
|
11
|
+
set primaryLoading(v: boolean);
|
|
12
|
+
get primaryDisabled(): boolean;
|
|
13
|
+
set primaryDisabled(v: boolean);
|
|
10
14
|
get loading(): boolean;
|
|
11
15
|
set loading(v: boolean);
|
|
12
16
|
private _rendered;
|
|
@@ -186,7 +186,7 @@ var BvButton = class extends HTMLElement {
|
|
|
186
186
|
}
|
|
187
187
|
btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
|
|
188
188
|
const iconName = this.getAttribute("icon");
|
|
189
|
-
if (iconName) {
|
|
189
|
+
if (iconName && !this.loading) {
|
|
190
190
|
const svg = getIconSvg(iconName, 16);
|
|
191
191
|
if (svg) {
|
|
192
192
|
const iconEl = document.createElement("span");
|
|
@@ -227,6 +227,8 @@ var BvCourseListCard = class extends HTMLElement {
|
|
|
227
227
|
"primary-label",
|
|
228
228
|
"primary-variant",
|
|
229
229
|
"primary-icon",
|
|
230
|
+
"primary-loading",
|
|
231
|
+
"primary-disabled",
|
|
230
232
|
"secondary-label",
|
|
231
233
|
"secondary-icon",
|
|
232
234
|
"selected",
|
|
@@ -255,6 +257,20 @@ var BvCourseListCard = class extends HTMLElement {
|
|
|
255
257
|
if (v) this.setAttribute("hide-secondary", "");
|
|
256
258
|
else this.removeAttribute("hide-secondary");
|
|
257
259
|
}
|
|
260
|
+
get primaryLoading() {
|
|
261
|
+
return this.hasAttribute("primary-loading");
|
|
262
|
+
}
|
|
263
|
+
set primaryLoading(v) {
|
|
264
|
+
if (v) this.setAttribute("primary-loading", "");
|
|
265
|
+
else this.removeAttribute("primary-loading");
|
|
266
|
+
}
|
|
267
|
+
get primaryDisabled() {
|
|
268
|
+
return this.hasAttribute("primary-disabled");
|
|
269
|
+
}
|
|
270
|
+
set primaryDisabled(v) {
|
|
271
|
+
if (v) this.setAttribute("primary-disabled", "");
|
|
272
|
+
else this.removeAttribute("primary-disabled");
|
|
273
|
+
}
|
|
258
274
|
get loading() {
|
|
259
275
|
return this.hasAttribute("loading");
|
|
260
276
|
}
|
|
@@ -317,6 +333,16 @@ var BvCourseListCard = class extends HTMLElement {
|
|
|
317
333
|
var _a2;
|
|
318
334
|
(_a2 = this._els.primaryBtn) == null ? void 0 : _a2.setAttribute("icon", val ?? "");
|
|
319
335
|
},
|
|
336
|
+
"primary-loading": () => {
|
|
337
|
+
var _a2, _b;
|
|
338
|
+
if (val === null) (_a2 = this._els.primaryBtn) == null ? void 0 : _a2.removeAttribute("loading");
|
|
339
|
+
else (_b = this._els.primaryBtn) == null ? void 0 : _b.setAttribute("loading", "");
|
|
340
|
+
},
|
|
341
|
+
"primary-disabled": () => {
|
|
342
|
+
var _a2, _b;
|
|
343
|
+
if (val === null) (_a2 = this._els.primaryBtn) == null ? void 0 : _a2.removeAttribute("disabled");
|
|
344
|
+
else (_b = this._els.primaryBtn) == null ? void 0 : _b.setAttribute("disabled", "");
|
|
345
|
+
},
|
|
320
346
|
"secondary-label": () => {
|
|
321
347
|
if (this._els.secondaryBtn) this._els.secondaryBtn.textContent = val ?? "";
|
|
322
348
|
},
|
|
@@ -398,6 +424,8 @@ var BvCourseListCard = class extends HTMLElement {
|
|
|
398
424
|
primaryBtn.setAttribute("icon", this.getAttribute("primary-icon") ?? "");
|
|
399
425
|
primaryBtn.setAttribute("full-width", "");
|
|
400
426
|
primaryBtn.textContent = this.getAttribute("primary-label") ?? "Enroll Now";
|
|
427
|
+
if (this.primaryLoading) primaryBtn.setAttribute("loading", "");
|
|
428
|
+
if (this.primaryDisabled) primaryBtn.setAttribute("disabled", "");
|
|
401
429
|
primaryBtn.addEventListener("click", () => {
|
|
402
430
|
this.dispatchEvent(new CustomEvent("bv-primary-action", { bubbles: true, composed: true }));
|
|
403
431
|
});
|
|
@@ -269,7 +269,7 @@ var BvButton = class extends HTMLElement {
|
|
|
269
269
|
}
|
|
270
270
|
btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
|
|
271
271
|
const iconName = this.getAttribute("icon");
|
|
272
|
-
if (iconName) {
|
|
272
|
+
if (iconName && !this.loading) {
|
|
273
273
|
const svg = getIconSvg(iconName, 16);
|
|
274
274
|
if (svg) {
|
|
275
275
|
const iconEl = document.createElement("span");
|
|
@@ -268,7 +268,7 @@ var BvButton = class extends HTMLElement {
|
|
|
268
268
|
}
|
|
269
269
|
btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
|
|
270
270
|
const iconName = this.getAttribute("icon");
|
|
271
|
-
if (iconName) {
|
|
271
|
+
if (iconName && !this.loading) {
|
|
272
272
|
const svg = getIconSvg(iconName, 16);
|
|
273
273
|
if (svg) {
|
|
274
274
|
const iconEl = document.createElement("span");
|
|
@@ -265,7 +265,7 @@ var BvButton = class extends HTMLElement {
|
|
|
265
265
|
}
|
|
266
266
|
btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
|
|
267
267
|
const iconName = this.getAttribute("icon");
|
|
268
|
-
if (iconName) {
|
|
268
|
+
if (iconName && !this.loading) {
|
|
269
269
|
const svg = getIconSvg(iconName, 16);
|
|
270
270
|
if (svg) {
|
|
271
271
|
const iconEl = document.createElement("span");
|
|
@@ -1068,7 +1068,7 @@ var ALL_COURSES = [
|
|
|
1068
1068
|
type: "HR & Onboarding",
|
|
1069
1069
|
title: "ADA Accommodation Procedures",
|
|
1070
1070
|
publisher: "A.Y. McDonald",
|
|
1071
|
-
description: "Understand ADA requirements
|
|
1071
|
+
description: "Understand ADA requirements",
|
|
1072
1072
|
durationMinutes: 90,
|
|
1073
1073
|
lastUpdatedDate: "2024-02-20",
|
|
1074
1074
|
downloaded: false,
|
package/dist/themes/base.css
CHANGED
package/package.json
CHANGED