@bluevolt-tech/lumen 1.3.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.
Files changed (78) hide show
  1. package/README.md +286 -0
  2. package/assets/fonts/fonts.css +25 -0
  3. package/assets/icons/.gitkeep +0 -0
  4. package/assets/icons/edit.svg +3 -0
  5. package/assets/images/.gitkeep +0 -0
  6. package/assets/images/bluevolt-logo.png +0 -0
  7. package/dist/assets/fonts/fonts.css +25 -0
  8. package/dist/assets/icons/.gitkeep +0 -0
  9. package/dist/assets/icons/edit.svg +3 -0
  10. package/dist/assets/images/.gitkeep +0 -0
  11. package/dist/assets/images/bluevolt-logo.png +0 -0
  12. package/dist/components/bv-avatar/bv-avatar.d.ts +13 -0
  13. package/dist/components/bv-avatar/bv-avatar.js +81 -0
  14. package/dist/components/bv-badge/bv-badge.d.ts +11 -0
  15. package/dist/components/bv-badge/bv-badge.js +58 -0
  16. package/dist/components/bv-button/bv-button.d.ts +23 -0
  17. package/dist/components/bv-button/bv-button.js +395 -0
  18. package/dist/components/bv-category-pill/bv-category-pill.d.ts +11 -0
  19. package/dist/components/bv-category-pill/bv-category-pill.js +61 -0
  20. package/dist/components/bv-checkbox/bv-checkbox.d.ts +14 -0
  21. package/dist/components/bv-checkbox/bv-checkbox.js +89 -0
  22. package/dist/components/bv-chip/bv-chip.d.ts +11 -0
  23. package/dist/components/bv-chip/bv-chip.js +72 -0
  24. package/dist/components/bv-course-detail/bv-course-detail.d.ts +28 -0
  25. package/dist/components/bv-course-detail/bv-course-detail.js +269 -0
  26. package/dist/components/bv-course-detail-modal/bv-course-detail-modal.d.ts +35 -0
  27. package/dist/components/bv-course-detail-modal/bv-course-detail-modal.js +1455 -0
  28. package/dist/components/bv-course-grid-card/bv-course-grid-card.d.ts +12 -0
  29. package/dist/components/bv-course-grid-card/bv-course-grid-card.js +578 -0
  30. package/dist/components/bv-course-list-card/bv-course-list-card.d.ts +12 -0
  31. package/dist/components/bv-course-list-card/bv-course-list-card.js +585 -0
  32. package/dist/components/bv-course-outline/bv-course-outline.d.ts +49 -0
  33. package/dist/components/bv-course-outline/bv-course-outline.js +488 -0
  34. package/dist/components/bv-empty-state/bv-empty-state.d.ts +10 -0
  35. package/dist/components/bv-empty-state/bv-empty-state.js +69 -0
  36. package/dist/components/bv-filter-dropdown/bv-filter-dropdown.d.ts +26 -0
  37. package/dist/components/bv-filter-dropdown/bv-filter-dropdown.js +164 -0
  38. package/dist/components/bv-filter-panel/bv-filter-panel.d.ts +25 -0
  39. package/dist/components/bv-filter-panel/bv-filter-panel.js +222 -0
  40. package/dist/components/bv-icon/bv-icon.d.ts +10 -0
  41. package/dist/components/bv-icon/bv-icon.js +122 -0
  42. package/dist/components/bv-icon/icons.d.ts +3 -0
  43. package/dist/components/bv-modal/bv-modal.d.ts +13 -0
  44. package/dist/components/bv-modal/bv-modal.js +104 -0
  45. package/dist/components/bv-page-title/bv-page-title.d.ts +4 -0
  46. package/dist/components/bv-page-title/bv-page-title.js +33 -0
  47. package/dist/components/bv-pagination/bv-pagination.d.ts +20 -0
  48. package/dist/components/bv-pagination/bv-pagination.js +139 -0
  49. package/dist/components/bv-portal-header/bv-portal-header.d.ts +12 -0
  50. package/dist/components/bv-portal-header/bv-portal-header.js +854 -0
  51. package/dist/components/bv-portal-layout/bv-portal-layout.d.ts +6 -0
  52. package/dist/components/bv-portal-layout/bv-portal-layout.js +39 -0
  53. package/dist/components/bv-progress-bar/bv-progress-bar.d.ts +11 -0
  54. package/dist/components/bv-progress-bar/bv-progress-bar.js +61 -0
  55. package/dist/components/bv-promo-banner/bv-promo-banner.d.ts +12 -0
  56. package/dist/components/bv-promo-banner/bv-promo-banner.js +79 -0
  57. package/dist/components/bv-radio/bv-radio.d.ts +11 -0
  58. package/dist/components/bv-radio/bv-radio.js +78 -0
  59. package/dist/components/bv-searchbox/bv-searchbox.d.ts +10 -0
  60. package/dist/components/bv-searchbox/bv-searchbox.js +68 -0
  61. package/dist/components/bv-star-rating/bv-star-rating.d.ts +11 -0
  62. package/dist/components/bv-star-rating/bv-star-rating.js +67 -0
  63. package/dist/components/bv-table/bv-table.d.ts +5 -0
  64. package/dist/components/bv-table/bv-table.js +72 -0
  65. package/dist/components/bv-toggle/bv-toggle.d.ts +11 -0
  66. package/dist/components/bv-toggle/bv-toggle.js +72 -0
  67. package/dist/components/bv-user-row/bv-user-row.d.ts +12 -0
  68. package/dist/components/bv-user-row/bv-user-row.js +574 -0
  69. package/dist/components/bv-view-switcher/bv-view-switcher.d.ts +11 -0
  70. package/dist/components/bv-view-switcher/bv-view-switcher.js +91 -0
  71. package/dist/preview/index.html +76 -0
  72. package/dist/storybook/stories/screens/course-catalog.data.d.ts +28 -0
  73. package/dist/storybook/stories/screens/course-catalog.data.js +301 -0
  74. package/dist/themes/base.css +66 -0
  75. package/dist/themes/layouts.css +35 -0
  76. package/package.json +181 -0
  77. package/themes/base.css +66 -0
  78. package/themes/layouts.css +35 -0
@@ -0,0 +1,395 @@
1
+ // css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-button/bv-button.css
2
+ 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
3
+ Apps can override these three properties per-instance:
4
+
5
+ HTML: <bv-button style="--bv-button-bg: #e53e3e;">
6
+ Angular: <bv-button [style.--bv-button-bg]="brandColor">
7
+ JavaScript: btn.style.setProperty('--bv-button-bg', value)
8
+
9
+ Hover is auto-computed from the base colors via color-mix().
10
+ Override --bv-button-bg-hover / --bv-button-border-color-hover
11
+ if you need explicit control over the hovered state.
12
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
13
+ :host {
14
+ /* Default values \u2014 map to global tokens (primary variant) */
15
+ --bv-button-bg: var(--bv-color-primary);
16
+ --bv-button-bg-hover: color-mix(in srgb, var(--bv-button-bg) 82%, black);
17
+ --bv-button-color: var(--bv-color-neutral-0);
18
+ --bv-button-border-color: var(--bv-color-primary);
19
+ --bv-button-border-color-hover: color-mix(in srgb, var(--bv-button-border-color) 82%, black);
20
+ --bv-button-font-family: var(--bv-font-family-base);
21
+ --bv-button-font-size: var(--bv-font-size-sm);
22
+
23
+ display: inline-block;
24
+ font-family: var(--bv-font-family-base);
25
+ }
26
+
27
+ :host([hidden]) {
28
+ display: none;
29
+ }
30
+
31
+ :host([full-width]) {
32
+ display: block;
33
+ width: 100%;
34
+ }
35
+
36
+ /* \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
37
+ Each variant re-points the component tokens to different global
38
+ tokens. Apps can still override with inline styles \u2014 inline style
39
+ always wins due to higher specificity.
40
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
41
+
42
+ :host([variant='secondary']) {
43
+ --bv-button-bg: var(--bv-color-secondary);
44
+ --bv-button-border-color: var(--bv-color-secondary);
45
+ --bv-button-color: var(--bv-color-secondary-foreground);
46
+ }
47
+
48
+ :host([variant='tertiary']) {
49
+ --bv-button-bg: var(--bv-color-tertiary);
50
+ --bv-button-border-color: var(--bv-color-tertiary);
51
+ }
52
+
53
+ :host([variant='danger']) {
54
+ --bv-button-bg: var(--bv-color-danger);
55
+ --bv-button-border-color: var(--bv-color-danger);
56
+ }
57
+
58
+ :host([variant='ghost']) {
59
+ --bv-button-bg: transparent;
60
+ --bv-button-bg-hover: var(--bv-color-primary-light);
61
+ --bv-button-color: var(--bv-color-primary);
62
+ --bv-button-border-color: transparent;
63
+ --bv-button-border-color-hover: transparent;
64
+ }
65
+
66
+ :host([variant='outline']) {
67
+ --bv-button-bg: transparent;
68
+ --bv-button-bg-hover: var(--bv-color-primary-light);
69
+ --bv-button-color: var(--bv-color-primary);
70
+ --bv-button-border-color: var(--bv-color-primary);
71
+ --bv-button-border-color-hover: var(--bv-color-primary);
72
+ }
73
+
74
+ /* \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
75
+ All visual properties read from the component-level tokens above.
76
+ \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 */
77
+
78
+ .btn {
79
+ display: inline-flex;
80
+ align-items: center;
81
+ justify-content: center;
82
+ gap: var(--bv-spacing-xs);
83
+ padding: 10px var(--bv-spacing-md);
84
+ min-height: 40px;
85
+ width: auto;
86
+ font-family: var(--bv-button-font-family);
87
+ font-size: var(--bv-button-font-size);
88
+ font-style: normal;
89
+ font-weight: var(--bv-font-weight-semibold);
90
+ line-height: 20px;
91
+ border: 1px solid var(--bv-button-border-color);
92
+ border-radius: var(--bv-radius-lg);
93
+ cursor: pointer;
94
+ transition:
95
+ background var(--bv-transition-fast),
96
+ color var(--bv-transition-fast),
97
+ border-color var(--bv-transition-fast),
98
+ box-shadow var(--bv-transition-fast),
99
+ opacity var(--bv-transition-fast);
100
+ white-space: nowrap;
101
+ user-select: none;
102
+ text-decoration: none;
103
+ outline: none;
104
+ box-sizing: border-box;
105
+ background: var(--bv-button-bg);
106
+ color: var(--bv-button-color);
107
+ box-shadow: var(--bv-shadow-sm);
108
+ }
109
+
110
+ :host([full-width]) .btn {
111
+ width: 100%;
112
+ }
113
+
114
+ .btn:hover:not(:disabled) {
115
+ background: var(--bv-button-bg-hover);
116
+ border-color: var(--bv-button-border-color-hover);
117
+ }
118
+
119
+ .btn:active:not(:disabled) {
120
+ transform: translateY(1px);
121
+ }
122
+
123
+ .btn:focus-visible {
124
+ outline: 2px solid var(--bv-button-border-color);
125
+ outline-offset: 2px;
126
+ }
127
+
128
+ .btn:disabled {
129
+ opacity: 0.5;
130
+ cursor: not-allowed;
131
+ pointer-events: none;
132
+ }
133
+
134
+ /* \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*/
135
+
136
+ :host([size='sm']) .btn {
137
+ padding: 6px 12px;
138
+ min-height: 32px;
139
+ font-size: var(--bv-font-size-sm);
140
+ }
141
+
142
+ :host([size='lg']) .btn {
143
+ padding: 12px var(--bv-spacing-lg);
144
+ min-height: 48px;
145
+ font-size: var(--bv-font-size-md);
146
+ }
147
+
148
+ /* \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*/
149
+
150
+ .btn-icon {
151
+ display: inline-flex;
152
+ align-items: center;
153
+ flex-shrink: 0;
154
+ line-height: 0;
155
+ }
156
+
157
+ /* \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*/
158
+
159
+ .btn-count {
160
+ opacity: 0.8;
161
+ font-weight: var(--bv-font-weight-regular);
162
+ }
163
+
164
+ /* \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*/
165
+
166
+ .spinner {
167
+ display: inline-block;
168
+ width: 1em;
169
+ height: 1em;
170
+ border: 2px solid currentColor;
171
+ border-top-color: transparent;
172
+ border-radius: 50%;
173
+ flex-shrink: 0;
174
+ animation: bv-spin 700ms linear infinite;
175
+ }
176
+
177
+ @keyframes bv-spin {
178
+ to {
179
+ transform: rotate(360deg);
180
+ }
181
+ }
182
+ `;
183
+
184
+ // components/bv-icon/icons.ts
185
+ var icons = {
186
+ // Navigation
187
+ "chevron-up": `<path d="M18 15l-6-6-6 6"/>`,
188
+ "chevron-down": `<path d="M6 9l6 6 6-6"/>`,
189
+ "chevron-left": `<path d="M15 18l-6-6 6-6"/>`,
190
+ "chevron-right": `<path d="M9 18l6-6-6-6"/>`,
191
+ "arrow-left": `<path d="M19 12H5M12 19l-7-7 7-7"/>`,
192
+ "arrow-right": `<path d="M5 12h14M12 5l7 7-7 7"/>`,
193
+ "external-link": `<path d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"/><polyline points="15,3 21,3 21,9"/><line x1="10" y1="14" x2="21" y2="3"/>`,
194
+ // Actions
195
+ search: `<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>`,
196
+ edit: `<path d="M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"/><path d="M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"/>`,
197
+ download: `<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="7,10 12,15 17,10"/><line x1="12" y1="15" x2="12" y2="3"/>`,
198
+ upload: `<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/><polyline points="17,8 12,3 7,8"/><line x1="12" y1="3" x2="12" y2="15"/>`,
199
+ plus: `<line x1="12" y1="5" x2="12" y2="19"/><line x1="5" y1="12" x2="19" y2="12"/>`,
200
+ minus: `<line x1="5" y1="12" x2="19" y2="12"/>`,
201
+ x: `<line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/>`,
202
+ check: `<polyline points="20,6 9,17 4,12"/>`,
203
+ trash: `<polyline points="3,6 5,6 21,6"/><path d="M19 6l-1 14a2 2 0 0 1-2 2H8a2 2 0 0 1-2-2L5 6"/><path d="M10 11v6M14 11v6"/><path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/>`,
204
+ copy: `<rect x="9" y="9" width="13" height="13" rx="2" ry="2"/><path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"/>`,
205
+ refresh: `<polyline points="23,4 23,10 17,10"/><polyline points="1,20 1,14 7,14"/><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"/>`,
206
+ filter: `<polygon points="22,3 2,3 10,12.46 10,19 14,21 14,12.46 22,3"/>`,
207
+ // Layout
208
+ list: `<line x1="8" y1="6" x2="21" y2="6"/><line x1="8" y1="12" x2="21" y2="12"/><line x1="8" y1="18" x2="21" y2="18"/><line x1="3" y1="6" x2="3.01" y2="6"/><line x1="3" y1="12" x2="3.01" y2="12"/><line x1="3" y1="18" x2="3.01" y2="18"/>`,
209
+ grid: `<rect x="3" y="3" width="7" height="7"/><rect x="14" y="3" width="7" height="7"/><rect x="14" y="14" width="7" height="7"/><rect x="3" y="14" width="7" height="7"/>`,
210
+ // User / profile
211
+ 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"/>`,
212
+ 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"/>`,
213
+ // Content
214
+ 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"/>`,
215
+ 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"/>`,
216
+ "eye-off": `<path d="M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24"/><line x1="1" y1="1" x2="23" y2="23"/>`,
217
+ bookmark: `<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"/>`,
218
+ tag: `<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"/><line x1="7" y1="7" x2="7.01" y2="7"/>`,
219
+ // Status / feedback
220
+ info: `<circle cx="12" cy="12" r="10"/><line x1="12" y1="8" x2="12" y2="12"/><line x1="12" y1="16" x2="12.01" y2="16"/>`,
221
+ "alert-triangle": `<path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/>`,
222
+ "check-circle": `<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22,4 12,14.01 9,11.01"/>`,
223
+ "x-circle": `<circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/>`,
224
+ // Files / media
225
+ file: `<path d="M13 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9z"/><polyline points="13,2 13,9 20,9"/>`,
226
+ image: `<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/><circle cx="8.5" cy="8.5" r="1.5"/><polyline points="21,15 16,10 5,21"/>`,
227
+ video: `<polygon points="23,7 16,12 23,17 23,7"/><rect x="1" y="5" width="15" height="14" rx="2" ry="2"/>`,
228
+ // Settings
229
+ settings: `<circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"/>`,
230
+ lock: `<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/>`,
231
+ unlock: `<rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 9.9-1"/>`,
232
+ bell: `<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/>`,
233
+ mail: `<path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/>`,
234
+ link: `<path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"/><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"/>`
235
+ };
236
+ function getIconSvg(name, size = 16) {
237
+ const raw = rawIcons[name];
238
+ if (raw)
239
+ return raw.replace(/width="[^"]*"/, `width="${size}"`).replace(/height="[^"]*"/, `height="${size}"`);
240
+ const paths = icons[name];
241
+ if (!paths) return "";
242
+ return `<svg xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">${paths}</svg>`;
243
+ }
244
+ var rawIcons = {
245
+ // Module type (small, ~18px)
246
+ "module-scorm": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 15.03 16.28" fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.9014 4.60034L7.51368 8.14201M7.51368 8.14201L1.126 4.60034M7.51368 8.14201L7.5137 15.267M14.2771 11.1859V5.09812C14.2771 4.84113 14.2771 4.71264 14.2392 4.59804C14.2056 4.49666 14.1508 4.4036 14.0783 4.32508C13.9963 4.23633 13.8838 4.17393 13.6587 4.04913L8.09763 0.965793C7.88451 0.847624 7.77794 0.78854 7.66509 0.765376C7.56521 0.744875 7.46219 0.744875 7.36231 0.765376C7.24946 0.78854 7.1429 0.847624 6.92977 0.965793L1.36873 4.04913C1.14364 4.17393 1.0311 4.23633 0.949147 4.32508C0.876647 4.4036 0.82178 4.49666 0.788217 4.59804C0.750278 4.71264 0.750278 4.84113 0.750278 5.09812V11.1859C0.750278 11.4429 0.750278 11.5714 0.788217 11.686C0.82178 11.7874 0.876647 11.8805 0.949147 11.959C1.0311 12.0477 1.14364 12.1101 1.36873 12.2349L6.92977 15.3183C7.1429 15.4364 7.24946 15.4955 7.36231 15.5187C7.46219 15.5392 7.56521 15.5392 7.66509 15.5187C7.77794 15.4955 7.88451 15.4364 8.09763 15.3183L13.6587 12.2349C13.8838 12.1101 13.9963 12.0477 14.0783 11.959C14.1508 11.8805 14.2056 11.7874 14.2392 11.686C14.2771 11.5714 14.2771 11.4429 14.2771 11.1859Z"/></svg>`,
247
+ "module-assessment": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 13.72 16.13" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M12.507 6.1875V4.1625C12.507 2.90238 12.507 2.27232 12.2629 1.79102C12.0482 1.36766 11.7056 1.02345 11.2841 0.807736C10.8051 0.5625 10.1779 0.5625 8.92364 0.5625H4.14585C2.89156 0.5625 2.26441 0.5625 1.78534 0.807736C1.36393 1.02345 1.02132 1.36766 0.806601 1.79102C0.5625 2.27232 0.5625 2.90238 0.5625 4.1625V11.9625C0.5625 13.2226 0.5625 13.8527 0.806601 14.334C1.02132 14.7573 1.36393 15.1015 1.78534 15.3173C2.26441 15.5625 2.89156 15.5625 4.14585 15.5625H8.0278M8.0278 7.3125H3.54862M5.04168 10.3125H3.54862M9.52086 4.3125H3.54862M9.89413 10.3142C10.0257 9.93852 10.2853 9.62175 10.627 9.41998C10.9688 9.21821 11.3705 9.14445 11.7612 9.21178C12.1519 9.2791 12.5062 9.48315 12.7615 9.7878C13.0168 10.0925 13.1565 10.478 13.1559 10.8763C13.1559 12.0004 11.4775 12.5625 11.4775 12.5625M11.4991 14.8125H11.5066"/></svg>`,
248
+ "module-survey": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 14.56 11.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M14 5.8125L5.04168 5.8125M14 1.3125L5.04168 1.3125M14 10.3125L5.04168 10.3125M2.05556 5.8125C2.05556 6.22671 1.72133 6.5625 1.30903 6.5625C0.896733 6.5625 0.5625 6.22671 0.5625 5.8125C0.5625 5.39829 0.896733 5.0625 1.30903 5.0625C1.72133 5.0625 2.05556 5.39829 2.05556 5.8125ZM2.05556 1.3125C2.05556 1.72671 1.72133 2.0625 1.30903 2.0625C0.896733 2.0625 0.5625 1.72671 0.5625 1.3125C0.5625 0.898286 0.896733 0.5625 1.30903 0.5625C1.72133 0.5625 2.05556 0.898286 2.05556 1.3125ZM2.05556 10.3125C2.05556 10.7267 1.72133 11.0625 1.30903 11.0625C0.896733 11.0625 0.5625 10.7267 0.5625 10.3125C0.5625 9.89829 0.896733 9.5625 1.30903 9.5625C1.72133 9.5625 2.05556 9.89829 2.05556 10.3125Z"/></svg>`,
249
+ "module-download": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16.06 14.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M8.77433 3.56259L7.94155 1.88928C7.70187 1.40769 7.58202 1.16689 7.40323 0.990961C7.24512 0.835387 7.05457 0.717069 6.84535 0.644571C6.60877 0.562589 6.3408 0.562589 5.80485 0.562589H2.9514C2.1152 0.562589 1.69711 0.562589 1.37773 0.726079C1.09679 0.869889 0.868379 1.09936 0.725234 1.3816C0.562501 1.70247 0.562501 2.12251 0.562501 2.96259V3.56259M0.562501 3.56259H11.9098C13.164 3.56259 13.7912 3.56259 14.2703 3.80782C14.6917 4.02354 15.0343 4.36775 15.249 4.79111C15.4931 5.27241 15.4931 5.90247 15.4931 7.16259V10.4626C15.4931 11.7227 15.4931 12.3528 15.249 12.8341C15.0343 13.2574 14.6917 13.6016 14.2703 13.8174C13.7912 14.0626 13.164 14.0626 11.9098 14.0626H4.14585C2.89156 14.0626 2.26441 14.0626 1.78534 13.8174C1.36393 13.6016 1.02132 13.2574 0.806601 12.8341C0.562501 12.3528 0.562501 11.7227 0.562501 10.4626V3.56259ZM10.2674 8.81259L8.0278 11.0626L5.78821 8.81259M8.0278 11.0626V6.56259"/></svg>`,
250
+ "module-link": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 15.97 16.03" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M6.49261 8.76267C6.81321 9.19327 7.22223 9.54956 7.69194 9.80737C8.16166 10.0652 8.68106 10.2185 9.21494 10.2569C9.74882 10.2953 10.2847 10.2179 10.7862 10.03C11.2876 9.84207 11.743 9.54797 12.1214 9.16767L14.361 6.91767C15.041 6.21041 15.4172 5.26315 15.4087 4.27991C15.4002 3.29668 15.0076 2.35613 14.3156 1.66085C13.6235 0.965569 12.6873 0.571186 11.7086 0.562642C10.7299 0.554098 9.78705 0.932077 9.08307 1.61517L7.79903 2.89767M9.47873 7.26267C9.15813 6.83207 8.7491 6.47578 8.27939 6.21796C7.80968 5.96015 7.29027 5.80683 6.75639 5.76842C6.22252 5.73001 5.68666 5.80739 5.18517 5.99533C4.68369 6.18327 4.2283 6.47737 3.84989 6.85767L1.6103 9.10767C0.930367 9.81493 0.554137 10.7622 0.562641 11.7454C0.571146 12.7287 0.963705 13.6692 1.65577 14.3645C2.34783 15.0598 3.28403 15.4542 4.26272 15.4627C5.24141 15.4712 6.18428 15.0933 6.88827 14.4102L8.16483 13.1277"/></svg>`,
251
+ "module-adobe-connect": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16.06 14.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M11.7605 0.56252L8.0278 3.56252L4.29515 0.56252M4.14585 14.0625H11.9098C13.164 14.0625 13.7912 14.0625 14.2703 13.8173C14.6917 13.6016 15.0343 13.2574 15.249 12.834C15.4931 12.3527 15.4931 11.7226 15.4931 10.4625V7.16252C15.4931 5.9024 15.4931 5.27234 15.249 4.79104C15.0343 4.36768 14.6917 4.02347 14.2703 3.80776C13.7912 3.56252 13.164 3.56252 11.9098 3.56252H4.14585C2.89156 3.56252 2.26441 3.56252 1.78534 3.80776C1.36393 4.02347 1.02132 4.36768 0.806601 4.79104C0.5625 5.27234 0.5625 5.9024 0.5625 7.16252V10.4625C0.5625 11.7226 0.5625 12.3527 0.806601 12.834C1.02132 13.2574 1.36393 13.6016 1.78534 13.8173C2.26441 14.0625 2.89156 14.0625 4.14585 14.0625Z"/></svg>`,
252
+ "module-video": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 16.06 11.63" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M15.4931 3.51103C15.4931 3.05667 15.4931 2.82949 15.4037 2.72429C15.3261 2.63301 15.2097 2.58457 15.0906 2.59399C14.9533 2.60484 14.7934 2.76548 14.4736 3.08676L11.7605 5.8125L14.4736 8.53824C14.7934 8.85952 14.9533 9.02016 15.0906 9.03101C15.2097 9.04043 15.3261 8.99199 15.4037 8.90071C15.4931 8.79552 15.4931 8.56833 15.4931 8.11397V3.51103ZM0.5625 4.1625C0.5625 2.90238 0.5625 2.27232 0.806601 1.79102C1.02132 1.36766 1.36393 1.02345 1.78534 0.807736C2.26441 0.5625 2.89156 0.5625 4.14585 0.5625H8.17711C9.4314 0.5625 10.0585 0.5625 10.5376 0.807736C10.959 1.02345 11.3016 1.36766 11.5164 1.79102C11.7605 2.27232 11.7605 2.90238 11.7605 4.1625V7.4625C11.7605 8.72262 11.7605 9.35268 11.5164 9.83398C11.3016 10.2573 10.959 10.6015 10.5376 10.8173C10.0585 11.0625 9.4314 11.0625 8.17711 11.0625H4.14584C2.89156 11.0625 2.26441 11.0625 1.78534 10.8173C1.36393 10.6015 1.02132 10.2573 0.806601 9.83398C0.5625 9.35268 0.5625 8.72262 0.5625 7.4625V4.1625Z"/></svg>`,
253
+ "module-upload": `<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 14.75 16.13" fill="none" stroke="currentColor" stroke-width="1.125" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M13.39 4.3125V4.1625C13.39 2.90238 13.39 2.27232 13.1278 1.79102C12.8972 1.36766 12.5293 1.02345 12.0767 0.807736C11.5622 0.5625 10.8887 0.5625 9.54172 0.5625H4.41074C3.06373 0.5625 2.39022 0.5625 1.87573 0.807736C1.42318 1.02345 1.05524 1.36766 0.824646 1.79102C0.5625 2.27232 0.5625 2.90238 0.5625 4.1625V11.9625C0.5625 13.2226 0.5625 13.8527 0.824646 14.334C1.05524 14.7573 1.42318 15.1015 1.87573 15.3173C2.39022 15.5625 3.06373 15.5625 4.41074 15.5625H7.37709M7.37709 7.3125H3.76936M6.57537 10.3125H3.76936M10.1831 4.3125H3.76936M11.7865 12.5625V8.4375C11.7865 7.81618 12.3249 7.3125 12.9891 7.3125C13.6533 7.3125 14.1917 7.81618 14.1917 8.4375V12.5625C14.1917 13.8051 13.1149 14.8125 11.7865 14.8125C10.4582 14.8125 9.38138 13.8051 9.38138 12.5625V9.5625"/></svg>`
254
+ };
255
+
256
+ // components/bv-button/bv-button.ts
257
+ var _sheet = null;
258
+ function getSheet() {
259
+ if (!_sheet) {
260
+ _sheet = new CSSStyleSheet();
261
+ _sheet.replaceSync(bv_button_default);
262
+ }
263
+ return _sheet;
264
+ }
265
+ var BvButton = class extends HTMLElement {
266
+ static observedAttributes = [
267
+ "variant",
268
+ "size",
269
+ "disabled",
270
+ "loading",
271
+ "type",
272
+ "full-width",
273
+ "icon",
274
+ "icon-position",
275
+ "count"
276
+ ];
277
+ constructor() {
278
+ super();
279
+ const shadow = this.attachShadow({ mode: "open" });
280
+ if ("adoptedStyleSheets" in ShadowRoot.prototype) {
281
+ shadow.adoptedStyleSheets = [getSheet()];
282
+ }
283
+ }
284
+ // ── Accessors ────────────────────────────────────────────────
285
+ get variant() {
286
+ return this.getAttribute("variant") ?? "primary";
287
+ }
288
+ set variant(value) {
289
+ this.setAttribute("variant", value);
290
+ }
291
+ get size() {
292
+ return this.getAttribute("size") ?? "md";
293
+ }
294
+ set size(value) {
295
+ this.setAttribute("size", value);
296
+ }
297
+ get disabled() {
298
+ return this.hasAttribute("disabled");
299
+ }
300
+ set disabled(value) {
301
+ if (value) this.setAttribute("disabled", "");
302
+ else this.removeAttribute("disabled");
303
+ }
304
+ get loading() {
305
+ return this.hasAttribute("loading");
306
+ }
307
+ set loading(value) {
308
+ if (value) this.setAttribute("loading", "");
309
+ else this.removeAttribute("loading");
310
+ }
311
+ get type() {
312
+ const t = this.getAttribute("type");
313
+ return t === "submit" || t === "reset" ? t : "button";
314
+ }
315
+ set type(value) {
316
+ this.setAttribute("type", value);
317
+ }
318
+ get fullWidth() {
319
+ return this.hasAttribute("full-width");
320
+ }
321
+ set fullWidth(value) {
322
+ if (value) this.setAttribute("full-width", "");
323
+ else this.removeAttribute("full-width");
324
+ }
325
+ // ── Lifecycle ────────────────────────────────────────────────
326
+ connectedCallback() {
327
+ this._render();
328
+ }
329
+ attributeChangedCallback(_name, oldValue, newValue) {
330
+ if (oldValue === newValue) return;
331
+ this._render();
332
+ }
333
+ // ── Rendering ────────────────────────────────────────────────
334
+ _render() {
335
+ var _a;
336
+ const shadow = this.shadowRoot;
337
+ let btn = shadow.querySelector("button");
338
+ if (!btn) {
339
+ if (!shadow.adoptedStyleSheets.length) {
340
+ const styleEl = document.createElement("style");
341
+ styleEl.textContent = bv_button_default;
342
+ shadow.appendChild(styleEl);
343
+ }
344
+ btn = document.createElement("button");
345
+ btn.setAttribute("part", "button");
346
+ btn.appendChild(document.createElement("slot"));
347
+ shadow.appendChild(btn);
348
+ }
349
+ btn.type = this.type;
350
+ btn.disabled = this.disabled || this.loading;
351
+ btn.className = "btn";
352
+ if (this.loading) {
353
+ btn.setAttribute("aria-busy", "true");
354
+ if (!btn.querySelector(".spinner")) {
355
+ const spinner = document.createElement("span");
356
+ spinner.className = "spinner";
357
+ spinner.setAttribute("aria-hidden", "true");
358
+ btn.insertBefore(spinner, btn.querySelector("slot"));
359
+ }
360
+ } else {
361
+ btn.removeAttribute("aria-busy");
362
+ (_a = btn.querySelector(".spinner")) == null ? void 0 : _a.remove();
363
+ }
364
+ btn.querySelectorAll(".btn-icon").forEach((el) => el.remove());
365
+ const iconName = this.getAttribute("icon");
366
+ if (iconName) {
367
+ const svg = getIconSvg(iconName, 16);
368
+ if (svg) {
369
+ const iconEl = document.createElement("span");
370
+ iconEl.className = "btn-icon";
371
+ iconEl.innerHTML = svg;
372
+ const slot = btn.querySelector("slot");
373
+ if (this.getAttribute("icon-position") === "right") {
374
+ btn.appendChild(iconEl);
375
+ } else {
376
+ btn.insertBefore(iconEl, slot);
377
+ }
378
+ }
379
+ }
380
+ btn.querySelectorAll(".btn-count").forEach((el) => el.remove());
381
+ const countVal = this.getAttribute("count");
382
+ if (countVal && Number(countVal) > 0) {
383
+ const countEl = document.createElement("span");
384
+ countEl.className = "btn-count";
385
+ countEl.textContent = `(${countVal})`;
386
+ btn.appendChild(countEl);
387
+ }
388
+ }
389
+ };
390
+ if (!customElements.get("bv-button")) {
391
+ customElements.define("bv-button", BvButton);
392
+ }
393
+ export {
394
+ BvButton
395
+ };
@@ -0,0 +1,11 @@
1
+ export declare class BvCategoryPill extends HTMLElement {
2
+ static readonly observedAttributes: readonly ["label"];
3
+ private _rendered;
4
+ private _labelEl;
5
+ constructor();
6
+ get label(): string;
7
+ set label(v: string);
8
+ connectedCallback(): void;
9
+ attributeChangedCallback(name: string, _old: string | null, val: string | null): void;
10
+ private _render;
11
+ }
@@ -0,0 +1,61 @@
1
+ // css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-category-pill/bv-category-pill.css
2
+ var bv_category_pill_default = ":host {\n display: inline-flex;\n font-family: var(--bv-font-family-base);\n}\n\n.pill {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n padding: 4px 6px;\n border: 0.5px solid var(--bv-color-neutral-900);\n border-radius: var(--bv-radius-sm);\n font-size: 10px;\n font-weight: var(--bv-font-weight-regular);\n color: var(--bv-color-neutral-700);\n line-height: 1;\n white-space: nowrap;\n}\n";
3
+
4
+ // components/bv-category-pill/bv-category-pill.ts
5
+ var _sheet = null;
6
+ function getSheet() {
7
+ if (!_sheet) {
8
+ _sheet = new CSSStyleSheet();
9
+ _sheet.replaceSync(bv_category_pill_default);
10
+ }
11
+ return _sheet;
12
+ }
13
+ var BvCategoryPill = class extends HTMLElement {
14
+ static observedAttributes = ["label"];
15
+ _rendered = false;
16
+ _labelEl = null;
17
+ constructor() {
18
+ super();
19
+ const shadow = this.attachShadow({ mode: "open" });
20
+ if ("adoptedStyleSheets" in ShadowRoot.prototype) {
21
+ shadow.adoptedStyleSheets = [getSheet()];
22
+ }
23
+ }
24
+ get label() {
25
+ return this.getAttribute("label") ?? "";
26
+ }
27
+ set label(v) {
28
+ this.setAttribute("label", v);
29
+ }
30
+ connectedCallback() {
31
+ this._render();
32
+ }
33
+ attributeChangedCallback(name, _old, val) {
34
+ if (!this._rendered) return;
35
+ if (name === "label" && this._labelEl) this._labelEl.textContent = val ?? "";
36
+ }
37
+ _render() {
38
+ if (this._rendered) return;
39
+ this._rendered = true;
40
+ const shadow = this.shadowRoot;
41
+ if (!shadow.adoptedStyleSheets.length) {
42
+ const s = document.createElement("style");
43
+ s.textContent = bv_category_pill_default;
44
+ shadow.appendChild(s);
45
+ }
46
+ const pill = document.createElement("span");
47
+ pill.className = "pill";
48
+ pill.setAttribute("part", "pill");
49
+ const labelEl = document.createElement("span");
50
+ labelEl.textContent = this.label;
51
+ this._labelEl = labelEl;
52
+ pill.appendChild(labelEl);
53
+ shadow.appendChild(pill);
54
+ }
55
+ };
56
+ if (!customElements.get("bv-category-pill")) {
57
+ customElements.define("bv-category-pill", BvCategoryPill);
58
+ }
59
+ export {
60
+ BvCategoryPill
61
+ };
@@ -0,0 +1,14 @@
1
+ export declare class BvCheckbox extends HTMLElement {
2
+ static readonly observedAttributes: string[];
3
+ private _rendered;
4
+ private _checkEl;
5
+ private _labelEl;
6
+ constructor();
7
+ connectedCallback(): void;
8
+ attributeChangedCallback(name: string, _old: string | null, val: string | null): void;
9
+ get checked(): boolean;
10
+ set checked(v: boolean);
11
+ get indeterminate(): boolean;
12
+ private _render;
13
+ private _syncIcon;
14
+ }
@@ -0,0 +1,89 @@
1
+ // css-inline:/home/runner/work/BV_lumen/BV_lumen/components/bv-checkbox/bv-checkbox.css
2
+ var bv_checkbox_default = ":host {\n display: inline-flex;\n font-family: var(--bv-font-family-base);\n}\n\n/* \u2500\u2500 Size 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\u2500 */\n\n:host,\n:host([size='sm']) {\n --_box-size: 16px;\n --_box-radius: 4px;\n --_gap: 8px;\n --_check-size: 10px;\n --_label-size: var(--bv-font-size-sm);\n --_label-lh: 20px;\n}\n\n:host([size='md']) {\n --_box-size: 20px;\n --_box-radius: 6px;\n --_gap: 12px;\n --_check-size: 12px;\n --_label-size: var(--bv-font-size-md);\n --_label-lh: 24px;\n}\n\n/* \u2500\u2500 Layout \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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.wrap {\n display: inline-flex;\n align-items: flex-start;\n gap: var(--_gap);\n cursor: pointer;\n user-select: none;\n}\n\n:host([disabled]) .wrap {\n cursor: not-allowed;\n opacity: 0.5;\n}\n\n/* \u2500\u2500 Box \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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.box {\n width: var(--_box-size);\n height: var(--_box-size);\n border-radius: var(--_box-radius);\n border: 1px solid var(--bv-color-neutral-300);\n background: var(--bv-color-neutral-0);\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n margin-top: 2px;\n transition:\n background var(--bv-transition-fast),\n border-color var(--bv-transition-fast);\n}\n\n:host([checked]) .box,\n:host([indeterminate]) .box {\n background: var(--bv-color-primary-50);\n border-color: var(--bv-color-primary);\n}\n\n/* \u2500\u2500 Check 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 */\n\n.check {\n display: none;\n width: var(--_check-size);\n height: var(--_check-size);\n color: var(--bv-color-primary);\n line-height: 0;\n}\n\n.check svg {\n width: 100%;\n height: 100%;\n display: block;\n}\n\n:host([checked]) .check,\n:host([indeterminate]) .check {\n display: flex;\n align-items: center;\n justify-content: center;\n}\n\n/* \u2500\u2500 Label \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\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.label {\n font-size: var(--_label-size);\n font-weight: var(--bv-font-weight-medium);\n color: var(--bv-color-secondary-foreground);\n line-height: var(--_label-lh);\n}\n";
3
+
4
+ // components/bv-checkbox/bv-checkbox.ts
5
+ var CHECK_ICON = `<svg viewBox="0 0 11.3333 8.41667" fill="none" xmlns="http://www.w3.org/2000/svg">
6
+ <path d="M10.3333 1L3.91667 7.41667L1 4.5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
7
+ </svg>`;
8
+ var INDETERMINATE_ICON = `<svg viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg">
9
+ <path d="M2 6H10" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
10
+ </svg>`;
11
+ var BvCheckbox = class extends HTMLElement {
12
+ static observedAttributes = ["checked", "indeterminate", "disabled", "label", "size"];
13
+ _rendered = false;
14
+ _checkEl = null;
15
+ _labelEl = null;
16
+ constructor() {
17
+ super();
18
+ this.attachShadow({ mode: "open" });
19
+ if ("replaceSync" in CSSStyleSheet.prototype) {
20
+ const sheet = new CSSStyleSheet();
21
+ sheet.replaceSync(bv_checkbox_default);
22
+ this.shadowRoot.adoptedStyleSheets = [sheet];
23
+ }
24
+ }
25
+ connectedCallback() {
26
+ this._render();
27
+ }
28
+ attributeChangedCallback(name, _old, val) {
29
+ if (!this._rendered) return;
30
+ if (name === "checked" || name === "indeterminate") this._syncIcon();
31
+ if (name === "label" && this._labelEl) this._labelEl.textContent = val ?? "";
32
+ }
33
+ get checked() {
34
+ return this.hasAttribute("checked");
35
+ }
36
+ set checked(v) {
37
+ if (v) this.setAttribute("checked", "");
38
+ else this.removeAttribute("checked");
39
+ }
40
+ get indeterminate() {
41
+ return this.hasAttribute("indeterminate");
42
+ }
43
+ _render() {
44
+ if (this._rendered) return;
45
+ this._rendered = true;
46
+ const shadow = this.shadowRoot;
47
+ if (!shadow.adoptedStyleSheets.length) {
48
+ const s = document.createElement("style");
49
+ s.textContent = bv_checkbox_default;
50
+ shadow.appendChild(s);
51
+ }
52
+ const wrap = document.createElement("label");
53
+ wrap.className = "wrap";
54
+ const box = document.createElement("span");
55
+ box.className = "box";
56
+ this._checkEl = document.createElement("span");
57
+ this._checkEl.className = "check";
58
+ this._syncIcon();
59
+ box.appendChild(this._checkEl);
60
+ this._labelEl = document.createElement("span");
61
+ this._labelEl.className = "label";
62
+ this._labelEl.textContent = this.getAttribute("label") ?? "";
63
+ const slot = document.createElement("slot");
64
+ wrap.append(box, this._labelEl, slot);
65
+ shadow.appendChild(wrap);
66
+ wrap.addEventListener("click", () => {
67
+ if (this.hasAttribute("disabled")) return;
68
+ this.checked = !this.checked;
69
+ this.removeAttribute("indeterminate");
70
+ this.dispatchEvent(
71
+ new CustomEvent("bv-change", {
72
+ bubbles: true,
73
+ composed: true,
74
+ detail: { checked: this.checked }
75
+ })
76
+ );
77
+ });
78
+ }
79
+ _syncIcon() {
80
+ if (!this._checkEl) return;
81
+ this._checkEl.innerHTML = this.indeterminate ? INDETERMINATE_ICON : CHECK_ICON;
82
+ }
83
+ };
84
+ if (!customElements.get("bv-checkbox")) {
85
+ customElements.define("bv-checkbox", BvCheckbox);
86
+ }
87
+ export {
88
+ BvCheckbox
89
+ };
@@ -0,0 +1,11 @@
1
+ export declare class BvChip extends HTMLElement {
2
+ static readonly observedAttributes: string[];
3
+ get label(): string;
4
+ set label(v: string);
5
+ private _rendered;
6
+ private _labelEl;
7
+ constructor();
8
+ connectedCallback(): void;
9
+ attributeChangedCallback(name: string, _old: string | null, val: string | null): void;
10
+ private _render;
11
+ }