@bluevolt-tech/lumen 1.5.0 → 1.5.2
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 +6 -1
- package/dist/components/bv-course-detail-modal/bv-course-detail-modal.js +6 -1
- package/dist/components/bv-course-grid-card/bv-course-grid-card.d.ts +0 -1
- package/dist/components/bv-course-grid-card/bv-course-grid-card.js +8 -12
- package/dist/components/bv-course-list-card/bv-course-list-card.js +6 -1
- package/dist/components/bv-empty-state/bv-empty-state.js +6 -1
- package/dist/components/bv-icon/bv-icon.js +1 -0
- package/dist/components/bv-portal-header/bv-portal-header.js +61 -3
- package/dist/components/bv-user-row/bv-user-row.d.ts +1 -0
- package/dist/components/bv-user-row/bv-user-row.js +61 -3
- 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
|
@@ -30,6 +30,7 @@ var icons = {
|
|
|
30
30
|
// User / profile
|
|
31
31
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
32
32
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
33
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
33
34
|
// Content
|
|
34
35
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
35
36
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -92,7 +93,8 @@ var BvButton = class extends HTMLElement {
|
|
|
92
93
|
"full-width",
|
|
93
94
|
"icon",
|
|
94
95
|
"icon-position",
|
|
95
|
-
"count"
|
|
96
|
+
"count",
|
|
97
|
+
"aria-label"
|
|
96
98
|
];
|
|
97
99
|
constructor() {
|
|
98
100
|
super();
|
|
@@ -169,6 +171,9 @@ var BvButton = class extends HTMLElement {
|
|
|
169
171
|
btn.type = this.type;
|
|
170
172
|
btn.disabled = this.disabled || this.loading;
|
|
171
173
|
btn.className = "btn";
|
|
174
|
+
const ariaLabel = this.getAttribute("aria-label");
|
|
175
|
+
if (ariaLabel) btn.setAttribute("aria-label", ariaLabel);
|
|
176
|
+
else btn.removeAttribute("aria-label");
|
|
172
177
|
if (this.loading) {
|
|
173
178
|
btn.setAttribute("aria-busy", "true");
|
|
174
179
|
if (!btn.querySelector(".spinner")) {
|
|
@@ -888,6 +888,7 @@ var icons = {
|
|
|
888
888
|
// User / profile
|
|
889
889
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
890
890
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
891
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
891
892
|
// Content
|
|
892
893
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
893
894
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -950,7 +951,8 @@ var BvButton = class extends HTMLElement {
|
|
|
950
951
|
"full-width",
|
|
951
952
|
"icon",
|
|
952
953
|
"icon-position",
|
|
953
|
-
"count"
|
|
954
|
+
"count",
|
|
955
|
+
"aria-label"
|
|
954
956
|
];
|
|
955
957
|
constructor() {
|
|
956
958
|
super();
|
|
@@ -1027,6 +1029,9 @@ var BvButton = class extends HTMLElement {
|
|
|
1027
1029
|
btn.type = this.type;
|
|
1028
1030
|
btn.disabled = this.disabled || this.loading;
|
|
1029
1031
|
btn.className = "btn";
|
|
1032
|
+
const ariaLabel = this.getAttribute("aria-label");
|
|
1033
|
+
if (ariaLabel) btn.setAttribute("aria-label", ariaLabel);
|
|
1034
|
+
else btn.removeAttribute("aria-label");
|
|
1030
1035
|
if (this.loading) {
|
|
1031
1036
|
btn.setAttribute("aria-busy", "true");
|
|
1032
1037
|
if (!btn.querySelector(".spinner")) {
|
|
@@ -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";
|
|
@@ -33,6 +33,7 @@ var icons = {
|
|
|
33
33
|
// User / profile
|
|
34
34
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
35
35
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
36
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
36
37
|
// Content
|
|
37
38
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
38
39
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -95,7 +96,8 @@ var BvButton = class extends HTMLElement {
|
|
|
95
96
|
"full-width",
|
|
96
97
|
"icon",
|
|
97
98
|
"icon-position",
|
|
98
|
-
"count"
|
|
99
|
+
"count",
|
|
100
|
+
"aria-label"
|
|
99
101
|
];
|
|
100
102
|
constructor() {
|
|
101
103
|
super();
|
|
@@ -172,6 +174,9 @@ var BvButton = class extends HTMLElement {
|
|
|
172
174
|
btn.type = this.type;
|
|
173
175
|
btn.disabled = this.disabled || this.loading;
|
|
174
176
|
btn.className = "btn";
|
|
177
|
+
const ariaLabel = this.getAttribute("aria-label");
|
|
178
|
+
if (ariaLabel) btn.setAttribute("aria-label", ariaLabel);
|
|
179
|
+
else btn.removeAttribute("aria-label");
|
|
175
180
|
if (this.loading) {
|
|
176
181
|
btn.setAttribute("aria-busy", "true");
|
|
177
182
|
if (!btn.querySelector(".spinner")) {
|
|
@@ -229,7 +234,6 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
229
234
|
"primary-icon",
|
|
230
235
|
"primary-loading",
|
|
231
236
|
"primary-disabled",
|
|
232
|
-
"secondary-label",
|
|
233
237
|
"secondary-icon",
|
|
234
238
|
"selected",
|
|
235
239
|
"disable-selection",
|
|
@@ -343,9 +347,6 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
343
347
|
if (val === null) (_a2 = this._els.primaryBtn) == null ? void 0 : _a2.removeAttribute("disabled");
|
|
344
348
|
else (_b = this._els.primaryBtn) == null ? void 0 : _b.setAttribute("disabled", "");
|
|
345
349
|
},
|
|
346
|
-
"secondary-label": () => {
|
|
347
|
-
this._syncSecondaryLabel();
|
|
348
|
-
},
|
|
349
350
|
"secondary-icon": () => {
|
|
350
351
|
var _a2;
|
|
351
352
|
(_a2 = this._els.secondaryBtn) == null ? void 0 : _a2.setAttribute("icon", val ?? "");
|
|
@@ -431,13 +432,13 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
431
432
|
secondaryBtn.setAttribute("icon", this.getAttribute("secondary-icon") ?? "");
|
|
432
433
|
secondaryBtn.setAttribute("size", "lg");
|
|
433
434
|
secondaryBtn.setAttribute("full-width", "");
|
|
435
|
+
secondaryBtn.setAttribute("aria-label", "View details");
|
|
434
436
|
secondaryBtn.className = "secondary-action";
|
|
435
437
|
secondaryBtn.hidden = this.hideSecondary;
|
|
436
438
|
secondaryBtn.addEventListener("click", () => {
|
|
437
439
|
this.dispatchEvent(new CustomEvent("bv-secondary-action", { bubbles: true, composed: true }));
|
|
438
440
|
});
|
|
439
441
|
this._els.secondaryBtn = secondaryBtn;
|
|
440
|
-
this._syncSecondaryLabel();
|
|
441
442
|
actions.append(primaryBtn, secondaryBtn);
|
|
442
443
|
this._els.actions = actions;
|
|
443
444
|
const skeleton = document.createElement("div");
|
|
@@ -461,11 +462,6 @@ var BvCourseGridCard = class extends HTMLElement {
|
|
|
461
462
|
);
|
|
462
463
|
});
|
|
463
464
|
}
|
|
464
|
-
_syncSecondaryLabel() {
|
|
465
|
-
if (!this._els.secondaryBtn) return;
|
|
466
|
-
const label = this.getAttribute("secondary-label");
|
|
467
|
-
this._els.secondaryBtn.textContent = label ?? "";
|
|
468
|
-
}
|
|
469
465
|
_syncLoading() {
|
|
470
466
|
var _a;
|
|
471
467
|
const loading = this.loading;
|
|
@@ -33,6 +33,7 @@ var icons = {
|
|
|
33
33
|
// User / profile
|
|
34
34
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
35
35
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
36
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
36
37
|
// Content
|
|
37
38
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
38
39
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -95,7 +96,8 @@ var BvButton = class extends HTMLElement {
|
|
|
95
96
|
"full-width",
|
|
96
97
|
"icon",
|
|
97
98
|
"icon-position",
|
|
98
|
-
"count"
|
|
99
|
+
"count",
|
|
100
|
+
"aria-label"
|
|
99
101
|
];
|
|
100
102
|
constructor() {
|
|
101
103
|
super();
|
|
@@ -172,6 +174,9 @@ var BvButton = class extends HTMLElement {
|
|
|
172
174
|
btn.type = this.type;
|
|
173
175
|
btn.disabled = this.disabled || this.loading;
|
|
174
176
|
btn.className = "btn";
|
|
177
|
+
const ariaLabel = this.getAttribute("aria-label");
|
|
178
|
+
if (ariaLabel) btn.setAttribute("aria-label", ariaLabel);
|
|
179
|
+
else btn.removeAttribute("aria-label");
|
|
175
180
|
if (this.loading) {
|
|
176
181
|
btn.setAttribute("aria-busy", "true");
|
|
177
182
|
if (!btn.querySelector(".spinner")) {
|
|
@@ -116,6 +116,7 @@ var icons = {
|
|
|
116
116
|
// User / profile
|
|
117
117
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
118
118
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
119
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
119
120
|
// Content
|
|
120
121
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
121
122
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -178,7 +179,8 @@ var BvButton = class extends HTMLElement {
|
|
|
178
179
|
"full-width",
|
|
179
180
|
"icon",
|
|
180
181
|
"icon-position",
|
|
181
|
-
"count"
|
|
182
|
+
"count",
|
|
183
|
+
"aria-label"
|
|
182
184
|
];
|
|
183
185
|
constructor() {
|
|
184
186
|
super();
|
|
@@ -255,6 +257,9 @@ var BvButton = class extends HTMLElement {
|
|
|
255
257
|
btn.type = this.type;
|
|
256
258
|
btn.disabled = this.disabled || this.loading;
|
|
257
259
|
btn.className = "btn";
|
|
260
|
+
const ariaLabel = this.getAttribute("aria-label");
|
|
261
|
+
if (ariaLabel) btn.setAttribute("aria-label", ariaLabel);
|
|
262
|
+
else btn.removeAttribute("aria-label");
|
|
258
263
|
if (this.loading) {
|
|
259
264
|
btn.setAttribute("aria-busy", "true");
|
|
260
265
|
if (!btn.querySelector(".spinner")) {
|
|
@@ -30,6 +30,7 @@ var icons = {
|
|
|
30
30
|
// User / profile
|
|
31
31
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
32
32
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
33
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
33
34
|
// Content
|
|
34
35
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
35
36
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -115,6 +115,7 @@ var icons = {
|
|
|
115
115
|
// User / profile
|
|
116
116
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
117
117
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
118
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
118
119
|
// Content
|
|
119
120
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
120
121
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -177,7 +178,8 @@ var BvButton = class extends HTMLElement {
|
|
|
177
178
|
"full-width",
|
|
178
179
|
"icon",
|
|
179
180
|
"icon-position",
|
|
180
|
-
"count"
|
|
181
|
+
"count",
|
|
182
|
+
"aria-label"
|
|
181
183
|
];
|
|
182
184
|
constructor() {
|
|
183
185
|
super();
|
|
@@ -254,6 +256,9 @@ var BvButton = class extends HTMLElement {
|
|
|
254
256
|
btn.type = this.type;
|
|
255
257
|
btn.disabled = this.disabled || this.loading;
|
|
256
258
|
btn.className = "btn";
|
|
259
|
+
const ariaLabel = this.getAttribute("aria-label");
|
|
260
|
+
if (ariaLabel) btn.setAttribute("aria-label", ariaLabel);
|
|
261
|
+
else btn.removeAttribute("aria-label");
|
|
257
262
|
if (this.loading) {
|
|
258
263
|
btn.setAttribute("aria-busy", "true");
|
|
259
264
|
if (!btn.querySelector(".spinner")) {
|
|
@@ -296,6 +301,54 @@ if (!customElements.get("bv-button")) {
|
|
|
296
301
|
customElements.define("bv-button", BvButton);
|
|
297
302
|
}
|
|
298
303
|
|
|
304
|
+
// css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-icon/bv-icon.css
|
|
305
|
+
var bv_icon_default = ":host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: inherit;\n}\n\n.icon-wrap {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n}\n\n.icon-wrap svg {\n display: block;\n}\n";
|
|
306
|
+
|
|
307
|
+
// components/bv-icon/bv-icon.ts
|
|
308
|
+
var BvIcon = class extends HTMLElement {
|
|
309
|
+
static observedAttributes = ["name", "size"];
|
|
310
|
+
_rendered = false;
|
|
311
|
+
_wrap = null;
|
|
312
|
+
constructor() {
|
|
313
|
+
super();
|
|
314
|
+
this.attachShadow({ mode: "open" });
|
|
315
|
+
if ("replaceSync" in CSSStyleSheet.prototype) {
|
|
316
|
+
const sheet = new CSSStyleSheet();
|
|
317
|
+
sheet.replaceSync(bv_icon_default);
|
|
318
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
connectedCallback() {
|
|
322
|
+
this._render();
|
|
323
|
+
}
|
|
324
|
+
attributeChangedCallback() {
|
|
325
|
+
if (this._rendered) this._update();
|
|
326
|
+
}
|
|
327
|
+
_render() {
|
|
328
|
+
if (this._rendered) return;
|
|
329
|
+
this._rendered = true;
|
|
330
|
+
const shadow = this.shadowRoot;
|
|
331
|
+
if (!shadow.adoptedStyleSheets.length) {
|
|
332
|
+
const s = document.createElement("style");
|
|
333
|
+
s.textContent = bv_icon_default;
|
|
334
|
+
shadow.appendChild(s);
|
|
335
|
+
}
|
|
336
|
+
this._wrap = document.createElement("span");
|
|
337
|
+
this._wrap.className = "icon-wrap";
|
|
338
|
+
shadow.appendChild(this._wrap);
|
|
339
|
+
this._update();
|
|
340
|
+
}
|
|
341
|
+
_update() {
|
|
342
|
+
if (!this._wrap) return;
|
|
343
|
+
const name = this.getAttribute("name") ?? "";
|
|
344
|
+
const size = parseInt(this.getAttribute("size") ?? "16", 10);
|
|
345
|
+
this._wrap.innerHTML = getIconSvg(name, size);
|
|
346
|
+
}
|
|
347
|
+
};
|
|
348
|
+
if (!customElements.get("bv-icon")) {
|
|
349
|
+
customElements.define("bv-icon", BvIcon);
|
|
350
|
+
}
|
|
351
|
+
|
|
299
352
|
// components/bv-user-row/bv-user-row.ts
|
|
300
353
|
var BvUserRow = class extends HTMLElement {
|
|
301
354
|
static observedAttributes = [
|
|
@@ -418,7 +471,12 @@ var BvUserRow = class extends HTMLElement {
|
|
|
418
471
|
link.href = href;
|
|
419
472
|
link.rel = "noopener noreferrer";
|
|
420
473
|
if (target) link.setAttribute("target", target);
|
|
421
|
-
|
|
474
|
+
const icon = document.createElement("bv-icon");
|
|
475
|
+
icon.setAttribute("name", "user-pen");
|
|
476
|
+
icon.setAttribute("aria-hidden", "true");
|
|
477
|
+
const label = document.createElement("span");
|
|
478
|
+
label.textContent = "Edit Profile";
|
|
479
|
+
link.append(icon, label);
|
|
422
480
|
link.addEventListener("click", () => {
|
|
423
481
|
this.dispatchEvent(new CustomEvent("bv-edit-profile", { bubbles: true, composed: true }));
|
|
424
482
|
});
|
|
@@ -426,7 +484,7 @@ var BvUserRow = class extends HTMLElement {
|
|
|
426
484
|
} else {
|
|
427
485
|
const btn = document.createElement("bv-button");
|
|
428
486
|
btn.className = "edit-btn";
|
|
429
|
-
btn.setAttribute("icon", "
|
|
487
|
+
btn.setAttribute("icon", "user-pen");
|
|
430
488
|
btn.textContent = "Edit Profile";
|
|
431
489
|
btn.addEventListener("click", () => {
|
|
432
490
|
this.dispatchEvent(new CustomEvent("bv-edit-profile", { bubbles: true, composed: true }));
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import '../bv-avatar/bv-avatar.ts';
|
|
2
2
|
import '../bv-button/bv-button.ts';
|
|
3
|
+
import '../bv-icon/bv-icon.ts';
|
|
3
4
|
export type UserRowEditProfileTarget = '_self' | '_blank' | '_parent' | '_top' | '';
|
|
4
5
|
export declare class BvUserRow extends HTMLElement {
|
|
5
6
|
static readonly observedAttributes: string[];
|
|
@@ -112,6 +112,7 @@ var icons = {
|
|
|
112
112
|
// User / profile
|
|
113
113
|
user: `<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"/><circle cx="12" cy="7" r="4"/>`,
|
|
114
114
|
users: `<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/>`,
|
|
115
|
+
"user-pen": `<path d="M11.5 15H7a4 4 0 0 0-4 4v2"/><path d="M21.378 16.626a1 1 0 0 0-3.004-3.004l-4.01 4.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z"/><circle cx="10" cy="7" r="4"/>`,
|
|
115
116
|
// Content
|
|
116
117
|
star: `<polygon points="12,2 15.09,8.26 22,9.27 17,14.14 18.18,21.02 12,17.77 5.82,21.02 7,14.14 2,9.27 8.91,8.26 12,2"/>`,
|
|
117
118
|
eye: `<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"/><circle cx="12" cy="12" r="3"/>`,
|
|
@@ -174,7 +175,8 @@ var BvButton = class extends HTMLElement {
|
|
|
174
175
|
"full-width",
|
|
175
176
|
"icon",
|
|
176
177
|
"icon-position",
|
|
177
|
-
"count"
|
|
178
|
+
"count",
|
|
179
|
+
"aria-label"
|
|
178
180
|
];
|
|
179
181
|
constructor() {
|
|
180
182
|
super();
|
|
@@ -251,6 +253,9 @@ var BvButton = class extends HTMLElement {
|
|
|
251
253
|
btn.type = this.type;
|
|
252
254
|
btn.disabled = this.disabled || this.loading;
|
|
253
255
|
btn.className = "btn";
|
|
256
|
+
const ariaLabel = this.getAttribute("aria-label");
|
|
257
|
+
if (ariaLabel) btn.setAttribute("aria-label", ariaLabel);
|
|
258
|
+
else btn.removeAttribute("aria-label");
|
|
254
259
|
if (this.loading) {
|
|
255
260
|
btn.setAttribute("aria-busy", "true");
|
|
256
261
|
if (!btn.querySelector(".spinner")) {
|
|
@@ -293,6 +298,54 @@ if (!customElements.get("bv-button")) {
|
|
|
293
298
|
customElements.define("bv-button", BvButton);
|
|
294
299
|
}
|
|
295
300
|
|
|
301
|
+
// css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-icon/bv-icon.css
|
|
302
|
+
var bv_icon_default = ":host {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n color: inherit;\n}\n\n.icon-wrap {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n line-height: 0;\n}\n\n.icon-wrap svg {\n display: block;\n}\n";
|
|
303
|
+
|
|
304
|
+
// components/bv-icon/bv-icon.ts
|
|
305
|
+
var BvIcon = class extends HTMLElement {
|
|
306
|
+
static observedAttributes = ["name", "size"];
|
|
307
|
+
_rendered = false;
|
|
308
|
+
_wrap = null;
|
|
309
|
+
constructor() {
|
|
310
|
+
super();
|
|
311
|
+
this.attachShadow({ mode: "open" });
|
|
312
|
+
if ("replaceSync" in CSSStyleSheet.prototype) {
|
|
313
|
+
const sheet = new CSSStyleSheet();
|
|
314
|
+
sheet.replaceSync(bv_icon_default);
|
|
315
|
+
this.shadowRoot.adoptedStyleSheets = [sheet];
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
connectedCallback() {
|
|
319
|
+
this._render();
|
|
320
|
+
}
|
|
321
|
+
attributeChangedCallback() {
|
|
322
|
+
if (this._rendered) this._update();
|
|
323
|
+
}
|
|
324
|
+
_render() {
|
|
325
|
+
if (this._rendered) return;
|
|
326
|
+
this._rendered = true;
|
|
327
|
+
const shadow = this.shadowRoot;
|
|
328
|
+
if (!shadow.adoptedStyleSheets.length) {
|
|
329
|
+
const s = document.createElement("style");
|
|
330
|
+
s.textContent = bv_icon_default;
|
|
331
|
+
shadow.appendChild(s);
|
|
332
|
+
}
|
|
333
|
+
this._wrap = document.createElement("span");
|
|
334
|
+
this._wrap.className = "icon-wrap";
|
|
335
|
+
shadow.appendChild(this._wrap);
|
|
336
|
+
this._update();
|
|
337
|
+
}
|
|
338
|
+
_update() {
|
|
339
|
+
if (!this._wrap) return;
|
|
340
|
+
const name = this.getAttribute("name") ?? "";
|
|
341
|
+
const size = parseInt(this.getAttribute("size") ?? "16", 10);
|
|
342
|
+
this._wrap.innerHTML = getIconSvg(name, size);
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
if (!customElements.get("bv-icon")) {
|
|
346
|
+
customElements.define("bv-icon", BvIcon);
|
|
347
|
+
}
|
|
348
|
+
|
|
296
349
|
// components/bv-user-row/bv-user-row.ts
|
|
297
350
|
var BvUserRow = class extends HTMLElement {
|
|
298
351
|
static observedAttributes = [
|
|
@@ -415,7 +468,12 @@ var BvUserRow = class extends HTMLElement {
|
|
|
415
468
|
link.href = href;
|
|
416
469
|
link.rel = "noopener noreferrer";
|
|
417
470
|
if (target) link.setAttribute("target", target);
|
|
418
|
-
|
|
471
|
+
const icon = document.createElement("bv-icon");
|
|
472
|
+
icon.setAttribute("name", "user-pen");
|
|
473
|
+
icon.setAttribute("aria-hidden", "true");
|
|
474
|
+
const label = document.createElement("span");
|
|
475
|
+
label.textContent = "Edit Profile";
|
|
476
|
+
link.append(icon, label);
|
|
419
477
|
link.addEventListener("click", () => {
|
|
420
478
|
this.dispatchEvent(new CustomEvent("bv-edit-profile", { bubbles: true, composed: true }));
|
|
421
479
|
});
|
|
@@ -423,7 +481,7 @@ var BvUserRow = class extends HTMLElement {
|
|
|
423
481
|
} else {
|
|
424
482
|
const btn = document.createElement("bv-button");
|
|
425
483
|
btn.className = "edit-btn";
|
|
426
|
-
btn.setAttribute("icon", "
|
|
484
|
+
btn.setAttribute("icon", "user-pen");
|
|
427
485
|
btn.textContent = "Edit Profile";
|
|
428
486
|
btn.addEventListener("click", () => {
|
|
429
487
|
this.dispatchEvent(new CustomEvent("bv-edit-profile", { bubbles: true, composed: true }));
|
|
@@ -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