basecoat-css 0.3.4 → 0.3.6
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/basecoat.cdn.css +342 -338
- package/dist/basecoat.cdn.min.css +1 -1
- package/dist/basecoat.css +125 -121
- package/dist/js/all.js +21 -4
- package/dist/js/all.min.js +1 -1
- package/dist/js/command.js +9 -1
- package/dist/js/command.min.js +1 -1
- package/dist/js/select.js +12 -3
- package/dist/js/select.min.js +1 -1
- package/package.json +1 -1
package/dist/basecoat.css
CHANGED
|
@@ -381,42 +381,44 @@
|
|
|
381
381
|
}
|
|
382
382
|
|
|
383
383
|
/* Button Group */
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
> hr[role='separator'] {
|
|
393
|
-
@apply w-0 h-auto self-stretch border border-input shrink-0 m-0;
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
&:not([data-orientation='vertical']) {
|
|
397
|
-
> *:not(:first-child),
|
|
398
|
-
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
399
|
-
@apply rounded-l-none border-l-0;
|
|
400
|
-
}
|
|
401
|
-
> *:not(:last-child),
|
|
402
|
-
> :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
|
|
403
|
-
@apply rounded-r-none;
|
|
384
|
+
@layer components {
|
|
385
|
+
.button-group {
|
|
386
|
+
@apply inline-flex w-fit items-stretch isolate;
|
|
387
|
+
|
|
388
|
+
> *:focus-visible,
|
|
389
|
+
> :is(.dropdown-menu, .popover, .select) > button:focus-visible {
|
|
390
|
+
@apply relative z-10;
|
|
404
391
|
}
|
|
405
|
-
}
|
|
406
|
-
&[data-orientation='vertical'] {
|
|
407
|
-
@apply flex-col;
|
|
408
392
|
|
|
409
393
|
> hr[role='separator'] {
|
|
410
|
-
@apply w-
|
|
411
|
-
}
|
|
412
|
-
|
|
413
|
-
> *:not(:first-child),
|
|
414
|
-
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
415
|
-
@apply rounded-t-none border-t-0;
|
|
394
|
+
@apply w-0 h-auto self-stretch border border-input shrink-0 m-0;
|
|
416
395
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
396
|
+
|
|
397
|
+
&:not([data-orientation='vertical']) {
|
|
398
|
+
> *:not(:first-child),
|
|
399
|
+
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
400
|
+
@apply rounded-l-none border-l-0;
|
|
401
|
+
}
|
|
402
|
+
> *:not(:last-child),
|
|
403
|
+
> :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
|
|
404
|
+
@apply rounded-r-none;
|
|
405
|
+
}
|
|
406
|
+
}
|
|
407
|
+
&[data-orientation='vertical'] {
|
|
408
|
+
@apply flex-col;
|
|
409
|
+
|
|
410
|
+
> hr[role='separator'] {
|
|
411
|
+
@apply w-auto h-px;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
> *:not(:first-child),
|
|
415
|
+
> :is(.dropdown-menu, .popover, .select):not(:first-child) > button {
|
|
416
|
+
@apply rounded-t-none border-t-0;
|
|
417
|
+
}
|
|
418
|
+
> *:not(:last-child),
|
|
419
|
+
> :is(.dropdown-menu, .popover, .select):not(:last-child) > button {
|
|
420
|
+
@apply rounded-b-none;
|
|
421
|
+
}
|
|
420
422
|
}
|
|
421
423
|
}
|
|
422
424
|
}
|
|
@@ -570,13 +572,13 @@
|
|
|
570
572
|
[role='separator'] {
|
|
571
573
|
@apply border-border -mx-1 my-1;
|
|
572
574
|
}
|
|
573
|
-
&:not(:has([
|
|
575
|
+
&:not(:has([role='menuitem']:not([aria-hidden='true'])))::before {
|
|
574
576
|
@apply flex items-center justify-center py-6 px-3 text-sm truncate -m-1;
|
|
575
577
|
}
|
|
576
|
-
&[data-empty]:not(:has([
|
|
578
|
+
&[data-empty]:not(:has([role='menuitem']:not([aria-hidden='true'])))::before {
|
|
577
579
|
@apply content-[attr(data-empty)];
|
|
578
580
|
}
|
|
579
|
-
&:not([data-empty]):not(:has([
|
|
581
|
+
&:not([data-empty]):not(:has([role='menuitem']:not([aria-hidden='true'])))::before {
|
|
580
582
|
@apply content-['No_results_found'];
|
|
581
583
|
}
|
|
582
584
|
}
|
|
@@ -988,119 +990,121 @@
|
|
|
988
990
|
}
|
|
989
991
|
|
|
990
992
|
/* Sidebar */
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
@apply bg-sidebar text-sidebar-foreground flex flex-col w-(--sidebar-mobile-width) md:w-(--sidebar-width) fixed inset-y-0 z-50 transition-transform ease-in-out duration-300;
|
|
1001
|
-
}
|
|
1002
|
-
& + * {
|
|
1003
|
-
@apply transition-[margin] ease-in-out duration-300;
|
|
1004
|
-
}
|
|
1005
|
-
&:not([data-side]),
|
|
1006
|
-
&[data-side=left] {
|
|
993
|
+
@layer components {
|
|
994
|
+
.sidebar {
|
|
995
|
+
&:not([data-sidebar-initialized]) {
|
|
996
|
+
@apply max-md:hidden;
|
|
997
|
+
}
|
|
998
|
+
&:not([aria-hidden]),
|
|
999
|
+
&[aria-hidden=false] {
|
|
1000
|
+
@apply max-md:bg-black/50 max-md:fixed max-md:inset-0 max-md:z-40;
|
|
1001
|
+
}
|
|
1007
1002
|
nav {
|
|
1008
|
-
@apply
|
|
1003
|
+
@apply bg-sidebar text-sidebar-foreground flex flex-col w-(--sidebar-mobile-width) md:w-(--sidebar-width) fixed inset-y-0 z-50 transition-transform ease-in-out duration-300;
|
|
1009
1004
|
}
|
|
1010
1005
|
& + * {
|
|
1011
|
-
@apply
|
|
1006
|
+
@apply transition-[margin] ease-in-out duration-300;
|
|
1012
1007
|
}
|
|
1013
|
-
|
|
1008
|
+
&:not([data-side]),
|
|
1009
|
+
&[data-side=left] {
|
|
1014
1010
|
nav {
|
|
1015
|
-
@apply -
|
|
1011
|
+
@apply left-0 border-r;
|
|
1016
1012
|
}
|
|
1017
1013
|
& + * {
|
|
1018
|
-
@apply md:ml-
|
|
1014
|
+
@apply relative md:ml-(--sidebar-width);
|
|
1015
|
+
}
|
|
1016
|
+
&[aria-hidden=true] {
|
|
1017
|
+
nav {
|
|
1018
|
+
@apply -translate-x-full;
|
|
1019
|
+
}
|
|
1020
|
+
& + * {
|
|
1021
|
+
@apply md:ml-0;
|
|
1022
|
+
}
|
|
1019
1023
|
}
|
|
1020
1024
|
}
|
|
1021
|
-
|
|
1022
|
-
&[data-side=right] {
|
|
1023
|
-
nav {
|
|
1024
|
-
@apply right-0 border-l;
|
|
1025
|
-
}
|
|
1026
|
-
& + * {
|
|
1027
|
-
@apply relative md:mr-(--sidebar-width);
|
|
1028
|
-
}
|
|
1029
|
-
&[aria-hidden=true] {
|
|
1025
|
+
&[data-side=right] {
|
|
1030
1026
|
nav {
|
|
1031
|
-
@apply
|
|
1027
|
+
@apply right-0 border-l;
|
|
1032
1028
|
}
|
|
1033
1029
|
& + * {
|
|
1034
|
-
@apply md:mr-
|
|
1030
|
+
@apply relative md:mr-(--sidebar-width);
|
|
1031
|
+
}
|
|
1032
|
+
&[aria-hidden=true] {
|
|
1033
|
+
nav {
|
|
1034
|
+
@apply translate-x-full;
|
|
1035
|
+
}
|
|
1036
|
+
& + * {
|
|
1037
|
+
@apply md:mr-0;
|
|
1038
|
+
}
|
|
1035
1039
|
}
|
|
1036
1040
|
}
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
@apply flex flex-col gap-2 p-2;
|
|
1042
|
-
}
|
|
1043
|
-
[role=separator] {
|
|
1044
|
-
@apply border-sidebar-border mx-2 w-auto;
|
|
1045
|
-
}
|
|
1046
|
-
> section {
|
|
1047
|
-
@apply flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto;
|
|
1048
|
-
|
|
1049
|
-
> [role=group] {
|
|
1050
|
-
@apply relative flex w-full min-w-0 flex-col p-2;
|
|
1041
|
+
nav {
|
|
1042
|
+
> header,
|
|
1043
|
+
> footer {
|
|
1044
|
+
@apply flex flex-col gap-2 p-2;
|
|
1051
1045
|
}
|
|
1052
|
-
|
|
1053
|
-
@apply
|
|
1046
|
+
[role=separator] {
|
|
1047
|
+
@apply border-sidebar-border mx-2 w-auto;
|
|
1054
1048
|
}
|
|
1055
|
-
|
|
1056
|
-
@apply flex
|
|
1049
|
+
> section {
|
|
1050
|
+
@apply flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto;
|
|
1057
1051
|
|
|
1058
|
-
|
|
1059
|
-
@apply relative;
|
|
1052
|
+
> [role=group] {
|
|
1053
|
+
@apply relative flex w-full min-w-0 flex-col p-2;
|
|
1054
|
+
}
|
|
1055
|
+
h3 {
|
|
1056
|
+
@apply text-sidebar-foreground/70 ring-sidebar-ring flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium outline-hidden transition-[margin,opacity] duration-200 ease-linear focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0;
|
|
1057
|
+
}
|
|
1058
|
+
ul {
|
|
1059
|
+
@apply flex w-full min-w-0 flex-col gap-1;
|
|
1060
1060
|
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
@apply flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&[aria-current=page]]:bg-sidebar-accent [&[aria-current=page]]:font-medium [&[aria-current=page]]:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0;
|
|
1061
|
+
li {
|
|
1062
|
+
@apply relative;
|
|
1064
1063
|
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
@apply hover:bg-sidebar-accent hover:text-sidebar-accent-foreground;
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1064
|
+
> a,
|
|
1065
|
+
> details > summary {
|
|
1066
|
+
@apply flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm outline-hidden ring-sidebar-ring transition-[width,height,padding] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 [&[aria-current=page]]:bg-sidebar-accent [&[aria-current=page]]:font-medium [&[aria-current=page]]:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0;
|
|
1067
|
+
|
|
1068
|
+
&:not([data-variant]),
|
|
1069
|
+
&[data-variant=default] {
|
|
1070
|
+
@apply hover:bg-sidebar-accent hover:text-sidebar-accent-foreground;
|
|
1071
|
+
}
|
|
1072
|
+
&[data-variant=outline] {
|
|
1073
|
+
@apply bg-background shadow-[0_0_0_1px_hsl(var(--sidebar-border))] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_hsl(var(--sidebar-accent))];
|
|
1074
|
+
}
|
|
1075
|
+
&:not([data-size]),
|
|
1076
|
+
&[data-size=default] {
|
|
1077
|
+
@apply h-8 text-sm;
|
|
1078
|
+
}
|
|
1079
|
+
&[data-size=sm] {
|
|
1080
|
+
@apply h-7 text-xs;
|
|
1081
|
+
}
|
|
1082
|
+
&[data-size=lg] {
|
|
1083
|
+
@apply h-12 text-sm group-data-[collapsible=icon]:p-0!;
|
|
1084
|
+
}
|
|
1081
1085
|
}
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1086
|
+
> details {
|
|
1087
|
+
&:not([open]) {
|
|
1088
|
+
> summary {
|
|
1089
|
+
&::after {
|
|
1090
|
+
@apply -rotate-90;
|
|
1091
|
+
}
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1085
1094
|
> summary {
|
|
1086
1095
|
&::after {
|
|
1087
|
-
@apply -
|
|
1096
|
+
@apply content-[''] block size-3.5 bg-primary ml-auto transition-transform ease-linear;
|
|
1097
|
+
@apply mask-[image:var(--chevron-down-icon)] mask-size-[1rem] mask-no-repeat mask-center;
|
|
1088
1098
|
}
|
|
1089
1099
|
}
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
&::after {
|
|
1093
|
-
@apply content-[''] block size-3.5 bg-primary ml-auto transition-transform ease-linear;
|
|
1094
|
-
@apply mask-[image:var(--chevron-down-icon)] mask-size-[1rem] mask-no-repeat mask-center;
|
|
1100
|
+
&::details-content {
|
|
1101
|
+
@apply px-3.5;
|
|
1095
1102
|
}
|
|
1096
1103
|
}
|
|
1097
|
-
&::details-content {
|
|
1098
|
-
@apply px-3.5;
|
|
1099
|
-
}
|
|
1100
1104
|
}
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1105
|
+
ul {
|
|
1106
|
+
@apply border-sidebar-border flex min-w-0 translate-x-px flex-col gap-1 border-l px-2.5 py-0.5 w-full;
|
|
1107
|
+
}
|
|
1104
1108
|
}
|
|
1105
1109
|
}
|
|
1106
1110
|
}
|
package/dist/js/all.js
CHANGED
|
@@ -145,7 +145,15 @@
|
|
|
145
145
|
|
|
146
146
|
visibleMenuItems = [];
|
|
147
147
|
allMenuItems.forEach(item => {
|
|
148
|
-
|
|
148
|
+
if (item.hasAttribute('data-force')) {
|
|
149
|
+
item.setAttribute('aria-hidden', 'false');
|
|
150
|
+
if (menuItems.includes(item)) {
|
|
151
|
+
visibleMenuItems.push(item);
|
|
152
|
+
}
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
const itemText = (item.dataset.filter || item.textContent).trim().toLowerCase();
|
|
149
157
|
const keywords = (item.dataset.keywords || '').toLowerCase();
|
|
150
158
|
const matches = itemText.includes(searchTerm) || keywords.includes(searchTerm);
|
|
151
159
|
item.setAttribute('aria-hidden', String(!matches));
|
|
@@ -541,7 +549,7 @@
|
|
|
541
549
|
|
|
542
550
|
const updateValue = (option, triggerEvent = true) => {
|
|
543
551
|
if (option) {
|
|
544
|
-
selectedLabel.innerHTML = option.
|
|
552
|
+
selectedLabel.innerHTML = option.innerHTML;
|
|
545
553
|
input.value = option.dataset.value;
|
|
546
554
|
listbox.querySelector('[role="option"][aria-selected="true"]')?.removeAttribute('aria-selected');
|
|
547
555
|
option.setAttribute('aria-selected', 'true');
|
|
@@ -605,8 +613,17 @@
|
|
|
605
613
|
|
|
606
614
|
visibleOptions = [];
|
|
607
615
|
allOptions.forEach(option => {
|
|
608
|
-
|
|
609
|
-
|
|
616
|
+
if (option.hasAttribute('data-force')) {
|
|
617
|
+
option.setAttribute('aria-hidden', 'false');
|
|
618
|
+
if (options.includes(option)) {
|
|
619
|
+
visibleOptions.push(option);
|
|
620
|
+
}
|
|
621
|
+
return;
|
|
622
|
+
}
|
|
623
|
+
|
|
624
|
+
const optionText = (option.dataset.filter || option.textContent).trim().toLowerCase();
|
|
625
|
+
const keywords = (option.dataset.keywords || '').toLowerCase();
|
|
626
|
+
const matches = optionText.includes(searchTerm) || keywords.includes(searchTerm);
|
|
610
627
|
option.setAttribute('aria-hidden', String(!matches));
|
|
611
628
|
if (matches && options.includes(option)) {
|
|
612
629
|
visibleOptions.push(option);
|
package/dist/js/all.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{const e={};let t=null;const n=()=>{Object.entries(e).forEach((([e,{selector:t,init:n}])=>{document.querySelectorAll(t).forEach(n)}))},a=t=>{t.nodeType===Node.ELEMENT_NODE&&Object.entries(e).forEach((([e,{selector:n,init:a}])=>{t.matches(n)&&a(t),t.querySelectorAll(n).forEach(a)}))},i=()=>{t||(t=new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach(a)}))})),t.observe(document.body,{childList:!0,subtree:!0}))};window.basecoat={register:(t,n,a)=>{e[t]={selector:n,init:a}},init:t=>{const n=e[t];if(!n)return void console.warn(`Component '${t}' not found in registry`);const a=`data-${t}-initialized`;document.querySelectorAll(`[${a}]`).forEach((e=>{e.removeAttribute(a)})),document.querySelectorAll(n.selector).forEach(n.init)},initAll:()=>{Object.entries(e).forEach((([e,{selector:t}])=>{const n=`data-${e}-initialized`;document.querySelectorAll(`[${n}]`).forEach((e=>{e.removeAttribute(n)}))})),n()},start:i,stop:()=>{t&&(t.disconnect(),t=null)}},document.addEventListener("DOMContentLoaded",(()=>{n(),i()}))})(),(()=>{const e=e=>{const t=e.querySelector("header input"),n=e.querySelector('[role="menu"]');if(!t||!n){const a=[];return t||a.push("input"),n||a.push("menu"),void console.error(`Command component initialization failed. Missing element(s): ${a.join(", ")}`,e)}const a=Array.from(n.querySelectorAll('[role="menuitem"]')),i=a.filter((e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled")));let o=[...i],r=-1;const s=e=>{if(r>-1&&i[r]&&i[r].classList.remove("active"),r=e,r>-1){const e=i[r];e.classList.add("active"),e.id?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant")}else t.removeAttribute("aria-activedescendant")};t.addEventListener("input",(()=>{const e=t.value.trim().toLowerCase();s(-1),o=[],a.forEach((t=>{const n=(t.dataset.label||t.textContent).trim().toLowerCase(),a=(t.dataset.keywords||"").toLowerCase(),r=n.includes(e)||a.includes(e);t.setAttribute("aria-hidden",String(!r)),r&&i.includes(t)&&o.push(t)})),o.length>0&&(s(i.indexOf(o[0])),o[0].scrollIntoView({block:"nearest"}))}));n.addEventListener("mousemove",(e=>{const t=e.target.closest('[role="menuitem"]');if(t&&o.includes(t)){const e=i.indexOf(t);e!==r&&s(e)}})),n.addEventListener("click",(t=>{const n=t.target.closest('[role="menuitem"]');if(n&&o.includes(n)){const t=e.closest("dialog.command-dialog");t&&!n.hasAttribute("data-keep-command-open")&&t.close()}})),t.addEventListener("keydown",(e=>{if(!["ArrowDown","ArrowUp","Enter","Home","End"].includes(e.key))return;if("Enter"===e.key)return e.preventDefault(),void(r>-1&&i[r]?.click());if(0===o.length)return;e.preventDefault();const t=r>-1?o.indexOf(i[r]):-1;let n=t;switch(e.key){case"ArrowDown":t<o.length-1&&(n=t+1);break;case"ArrowUp":t>0?n=t-1:-1===t&&(n=0);break;case"Home":n=0;break;case"End":n=o.length-1}if(n!==t){const e=o[n];s(i.indexOf(e)),e.scrollIntoView({block:"nearest",behavior:"smooth"})}})),o.length>0&&(s(i.indexOf(o[0])),o[0].scrollIntoView({block:"nearest"})),e.dataset.commandInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("command",".command:not([data-command-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector(":scope > button"),n=e.querySelector(":scope > [data-popover]"),a=n.querySelector('[role="menu"]');if(!t||!a||!n){const i=[];return t||i.push("trigger"),a||i.push("menu"),n||i.push("popover"),void console.error(`Dropdown menu initialisation failed. Missing element(s): ${i.join(", ")}`,e)}let i=[],o=-1;const r=(e=!0)=>{"false"!==t.getAttribute("aria-expanded")&&(t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),n.setAttribute("aria-hidden","true"),e&&t.focus(),d(-1))},s=(o=!1)=>{document.dispatchEvent(new CustomEvent("basecoat:popover",{detail:{source:e}})),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false"),i=Array.from(a.querySelectorAll('[role^="menuitem"]')).filter((e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled"))),i.length>0&&o&&("first"===o?d(0):"last"===o&&d(i.length-1))},d=e=>{if(o>-1&&i[o]&&i[o].classList.remove("active"),o=e,o>-1&&i[o]){const e=i[o];e.classList.add("active"),t.setAttribute("aria-activedescendant",e.id)}else t.removeAttribute("aria-activedescendant")};t.addEventListener("click",(()=>{"true"===t.getAttribute("aria-expanded")?r():s(!1)})),e.addEventListener("keydown",(e=>{const n="true"===t.getAttribute("aria-expanded");if("Escape"===e.key)return void(n&&r());if(!n)return void(["Enter"," "].includes(e.key)?(e.preventDefault(),s(!1)):"ArrowDown"===e.key?(e.preventDefault(),s("first")):"ArrowUp"===e.key&&(e.preventDefault(),s("last")));if(0===i.length)return;let a=o;switch(e.key){case"ArrowDown":e.preventDefault(),a=-1===o?0:Math.min(o+1,i.length-1);break;case"ArrowUp":e.preventDefault(),a=-1===o?i.length-1:Math.max(o-1,0);break;case"Home":e.preventDefault(),a=0;break;case"End":e.preventDefault(),a=i.length-1;break;case"Enter":case" ":return e.preventDefault(),i[o]?.click(),void r()}a!==o&&d(a)})),a.addEventListener("mousemove",(e=>{const t=e.target.closest('[role^="menuitem"]');if(t&&i.includes(t)){const e=i.indexOf(t);e!==o&&d(e)}})),a.addEventListener("mouseleave",(()=>{d(-1)})),a.addEventListener("click",(e=>{e.target.closest('[role^="menuitem"]')&&r()})),document.addEventListener("click",(t=>{e.contains(t.target)||r()})),document.addEventListener("basecoat:popover",(t=>{t.detail.source!==e&&r(!1)})),e.dataset.dropdownMenuInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("dropdown-menu",".dropdown-menu:not([data-dropdown-menu-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector(":scope > button"),n=e.querySelector(":scope > [data-popover]");if(!t||!n){const a=[];return t||a.push("trigger"),n||a.push("content"),void console.error(`Popover initialisation failed. Missing element(s): ${a.join(", ")}`,e)}const a=(e=!0)=>{"false"!==t.getAttribute("aria-expanded")&&(t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true"),e&&t.focus())};t.addEventListener("click",(()=>{"true"===t.getAttribute("aria-expanded")?a():(()=>{document.dispatchEvent(new CustomEvent("basecoat:popover",{detail:{source:e}}));const a=n.querySelector("[autofocus]");a&&n.addEventListener("transitionend",(()=>{a.focus()}),{once:!0}),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false")})()})),e.addEventListener("keydown",(e=>{"Escape"===e.key&&a()})),document.addEventListener("click",(t=>{e.contains(t.target)||a()})),document.addEventListener("basecoat:popover",(t=>{t.detail.source!==e&&a(!1)})),e.dataset.popoverInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("popover",".popover:not([data-popover-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector(":scope > button"),n=t.querySelector(":scope > span"),a=e.querySelector(":scope > [data-popover]"),i=a.querySelector('[role="listbox"]'),o=e.querySelector(':scope > input[type="hidden"]'),r=e.querySelector('header input[type="text"]');if(!(t&&a&&i&&o)){const n=[];return t||n.push("trigger"),a||n.push("popover"),i||n.push("listbox"),o||n.push("input"),void console.error(`Select component initialisation failed. Missing element(s): ${n.join(", ")}`,e)}const s=Array.from(i.querySelectorAll('[role="option"]')),d=s.filter((e=>"true"!==e.getAttribute("aria-disabled")));let c=[...d],l=-1;const u=e=>{if(l>-1&&d[l]&&d[l].classList.remove("active"),l=e,l>-1){const e=d[l];e.classList.add("active"),e.id?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant")}else t.removeAttribute("aria-activedescendant")},v=()=>{const e=getComputedStyle(a);return parseFloat(e.transitionDuration)>0||parseFloat(e.transitionDelay)>0},p=(t,a=!0)=>{if(t&&(n.innerHTML=t.dataset.label||t.innerHTML,o.value=t.dataset.value,i.querySelector('[role="option"][aria-selected="true"]')?.removeAttribute("aria-selected"),t.setAttribute("aria-selected","true"),a)){const n=new CustomEvent("change",{detail:{value:t.dataset.value},bubbles:!0});e.dispatchEvent(n)}},m=(e=!0)=>{if("true"!==a.getAttribute("aria-hidden")){if(r){const e=()=>{r.value="",c=[...d],s.forEach((e=>e.setAttribute("aria-hidden","false")))};v()?a.addEventListener("transitionend",e,{once:!0}):e()}e&&t.focus(),a.setAttribute("aria-hidden","true"),t.setAttribute("aria-expanded","false"),u(-1)}},b=e=>{if(!e)return;const t=o.value,n=e.dataset.value;null!=n&&n!==t&&p(e),m()};if(r){const e=()=>{const e=r.value.trim().toLowerCase();u(-1),c=[],s.forEach((t=>{const n=(t.dataset.label||t.textContent).trim().toLowerCase().includes(e);t.setAttribute("aria-hidden",String(!n)),n&&d.includes(t)&&c.push(t)}))};r.addEventListener("input",e)}let h=d.find((e=>e.dataset.value===o.value));h||(h=d.find((e=>void 0!==e.dataset.value))??d[0]),p(h,!1);const w=e=>{const n="false"===a.getAttribute("aria-hidden");if(!["ArrowDown","ArrowUp","Enter","Home","End","Escape"].includes(e.key))return;if(!n)return void("Enter"!==e.key&&"Escape"!==e.key&&(e.preventDefault(),t.click()));if(e.preventDefault(),"Escape"===e.key)return void m();if("Enter"===e.key)return void(l>-1&&b(d[l]));if(0===c.length)return;const i=l>-1?c.indexOf(d[l]):-1;let o=i;switch(e.key){case"ArrowDown":i<c.length-1&&(o=i+1);break;case"ArrowUp":i>0?o=i-1:-1===i&&(o=0);break;case"Home":o=0;break;case"End":o=c.length-1}if(o!==i){const e=c[o];u(d.indexOf(e)),e.scrollIntoView({block:"nearest",behavior:"smooth"})}};i.addEventListener("mousemove",(e=>{const t=e.target.closest('[role="option"]');if(t&&c.includes(t)){const e=d.indexOf(t);e!==l&&u(e)}})),i.addEventListener("mouseleave",(()=>{const e=i.querySelector('[role="option"][aria-selected="true"]');u(e?d.indexOf(e):-1)})),t.addEventListener("keydown",w),r&&r.addEventListener("keydown",w);t.addEventListener("click",(()=>{"true"===t.getAttribute("aria-expanded")?m():(()=>{document.dispatchEvent(new CustomEvent("basecoat:popover",{detail:{source:e}})),r&&(v()?a.addEventListener("transitionend",(()=>{r.focus()}),{once:!0}):r.focus()),a.setAttribute("aria-hidden","false"),t.setAttribute("aria-expanded","true");const n=i.querySelector('[role="option"][aria-selected="true"]');n&&(u(d.indexOf(n)),n.scrollIntoView({block:"nearest"}))})()})),i.addEventListener("click",(e=>{const t=e.target.closest('[role="option"]');t&&b(t)})),document.addEventListener("click",(t=>{e.contains(t.target)||m(!1)})),document.addEventListener("basecoat:popover",(t=>{t.detail.source!==e&&m(!1)})),a.setAttribute("aria-hidden","true"),e.selectByValue=e=>{const t=d.find((t=>t.dataset.value===e));b(t)},e.dataset.selectInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("select","div.select:not([data-select-initialized])",e)})(),(()=>{if(!window.history.__basecoatPatched){const e=window.history.pushState;window.history.pushState=function(...t){e.apply(this,t),window.dispatchEvent(new Event("basecoat:locationchange"))};const t=window.history.replaceState;window.history.replaceState=function(...e){t.apply(this,e),window.dispatchEvent(new Event("basecoat:locationchange"))},window.history.__basecoatPatched=!0}const e=e=>{const t="false"!==e.dataset.initialOpen,n="true"===e.dataset.initialMobileOpen,a=parseInt(e.dataset.breakpoint)||768;let i=a>0?window.innerWidth>=a?t:n:t;const o=()=>{const t=window.location.pathname.replace(/\/$/,"");e.querySelectorAll("a").forEach((e=>{if(e.hasAttribute("data-ignore-current"))return;new URL(e.href).pathname.replace(/\/$/,"")===t?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current")}))},r=()=>{e.setAttribute("aria-hidden",!i),i?e.removeAttribute("inert"):e.setAttribute("inert","")},s=e=>{i=e,r()},d=e.id;document.addEventListener("basecoat:sidebar",(e=>{if(!e.detail?.id||e.detail.id===d)switch(e.detail?.action){case"open":s(!0);break;case"close":s(!1);break;default:s(!i)}})),e.addEventListener("click",(t=>{const n=t.target,i=e.querySelector("nav");if(window.innerWidth<a&&n.closest("a, button")&&!n.closest("[data-keep-mobile-sidebar-open]"))return document.activeElement&&document.activeElement.blur(),void s(!1);(n===e||i&&!i.contains(n))&&(document.activeElement&&document.activeElement.blur(),s(!1))})),window.addEventListener("popstate",o),window.addEventListener("basecoat:locationchange",o),r(),o(),e.dataset.sidebarInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("sidebar",".sidebar:not([data-sidebar-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector('[role="tablist"]');if(!t)return;const n=Array.from(t.querySelectorAll('[role="tab"]')),a=n.map((e=>document.getElementById(e.getAttribute("aria-controls")))).filter(Boolean),i=e=>{n.forEach(((e,t)=>{e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1"),a[t]&&(a[t].hidden=!0)})),e.setAttribute("aria-selected","true"),e.setAttribute("tabindex","0");const t=document.getElementById(e.getAttribute("aria-controls"));t&&(t.hidden=!1)};t.addEventListener("click",(e=>{const t=e.target.closest('[role="tab"]');t&&i(t)})),t.addEventListener("keydown",(e=>{const t=e.target;if(!n.includes(t))return;let a;const o=n.indexOf(t);switch(e.key){case"ArrowRight":a=n[(o+1)%n.length];break;case"ArrowLeft":a=n[(o-1+n.length)%n.length];break;case"Home":a=n[0];break;case"End":a=n[n.length-1];break;default:return}e.preventDefault(),i(a),a.focus()})),e.dataset.tabsInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("tabs",".tabs:not([data-tabs-initialized])",e)})(),(()=>{let e;const t=new WeakMap;let n=!1;const a={success:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg>',error:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>',info:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>',warning:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>'};function i(e){if(e.dataset.toastInitialized)return;const a=parseInt(e.dataset.duration),i=-1!==a?a||("error"===e.dataset.category?5e3:3e3):-1,o={remainingTime:i,timeoutId:null,startTime:null};-1!==i&&(n?o.timeoutId=null:(o.startTime=Date.now(),o.timeoutId=setTimeout((()=>s(e)),i))),t.set(e,o),e.dataset.toastInitialized="true"}function o(){n||(n=!0,e.querySelectorAll('.toast:not([aria-hidden="true"])').forEach((e=>{if(!t.has(e))return;const n=t.get(e);n.timeoutId&&(clearTimeout(n.timeoutId),n.timeoutId=null,n.remainingTime-=Date.now()-n.startTime)})))}function r(){n&&(n=!1,e.querySelectorAll('.toast:not([aria-hidden="true"])').forEach((e=>{if(!t.has(e))return;const n=t.get(e);-1===n.remainingTime||n.timeoutId||(n.remainingTime>0?(n.startTime=Date.now(),n.timeoutId=setTimeout((()=>s(e)),n.remainingTime)):s(e))})))}function s(e){if(!t.has(e))return;const n=t.get(e);clearTimeout(n.timeoutId),t.delete(e),e.contains(document.activeElement)&&document.activeElement.blur(),e.setAttribute("aria-hidden","true"),e.addEventListener("transitionend",(()=>e.remove()),{once:!0})}document.addEventListener("basecoat:toast",(t=>{if(!e)return void console.error("Cannot create toast: toaster container not found on page.");const n=function(e){const{category:t="info",title:n,description:i,action:o,cancel:r,duration:s,icon:d}=e,c=d||t&&a[t]||"",l=n?`<h2>${n}</h2>`:"",u=i?`<p>${i}</p>`:"",v=o?.href?`<a href="${o.href}" class="btn" data-toast-action>${o.label}</a>`:o?.onclick?`<button type="button" class="btn" data-toast-action onclick="${o.onclick}">${o.label}</button>`:"",p=r?`<button type="button" class="btn-outline h-6 text-xs px-2.5 rounded-sm" data-toast-cancel onclick="${r?.onclick}">${r.label}</button>`:"",m=`\n <div\n class="toast"\n role="${"error"===t?"alert":"status"}"\n aria-atomic="true"\n ${t?`data-category="${t}"`:""}\n ${void 0!==s?`data-duration="${s}"`:""}\n >\n <div class="toast-content">\n ${c}\n <section>\n ${l}\n ${u}\n </section>\n ${v||p?`<footer>${v}${p}</footer>`:""}\n </div>\n </div>\n </div>\n `,b=document.createElement("template");return b.innerHTML=m.trim(),b.content.firstChild}(t.detail?.config||{});e.appendChild(n)})),window.basecoat&&(window.basecoat.register("toaster","#toaster:not([data-toaster-initialized])",(function(t){t.dataset.toasterInitialized||(e=t,e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",r),e.addEventListener("click",(e=>{const t=e.target.closest(".toast footer a"),n=e.target.closest(".toast footer button");(t||n)&&s(e.target.closest(".toast"))})),e.querySelectorAll(".toast:not([data-toast-initialized])").forEach(i),e.dataset.toasterInitialized="true",e.dispatchEvent(new CustomEvent("basecoat:initialized")))})),window.basecoat.register("toast",".toast:not([data-toast-initialized])",i))})();
|
|
1
|
+
(()=>{const e={};let t=null;const n=()=>{Object.entries(e).forEach((([e,{selector:t,init:n}])=>{document.querySelectorAll(t).forEach(n)}))},a=t=>{t.nodeType===Node.ELEMENT_NODE&&Object.entries(e).forEach((([e,{selector:n,init:a}])=>{t.matches(n)&&a(t),t.querySelectorAll(n).forEach(a)}))},i=()=>{t||(t=new MutationObserver((e=>{e.forEach((e=>{e.addedNodes.forEach(a)}))})),t.observe(document.body,{childList:!0,subtree:!0}))};window.basecoat={register:(t,n,a)=>{e[t]={selector:n,init:a}},init:t=>{const n=e[t];if(!n)return void console.warn(`Component '${t}' not found in registry`);const a=`data-${t}-initialized`;document.querySelectorAll(`[${a}]`).forEach((e=>{e.removeAttribute(a)})),document.querySelectorAll(n.selector).forEach(n.init)},initAll:()=>{Object.entries(e).forEach((([e,{selector:t}])=>{const n=`data-${e}-initialized`;document.querySelectorAll(`[${n}]`).forEach((e=>{e.removeAttribute(n)}))})),n()},start:i,stop:()=>{t&&(t.disconnect(),t=null)}},document.addEventListener("DOMContentLoaded",(()=>{n(),i()}))})(),(()=>{const e=e=>{const t=e.querySelector("header input"),n=e.querySelector('[role="menu"]');if(!t||!n){const a=[];return t||a.push("input"),n||a.push("menu"),void console.error(`Command component initialization failed. Missing element(s): ${a.join(", ")}`,e)}const a=Array.from(n.querySelectorAll('[role="menuitem"]')),i=a.filter((e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled")));let o=[...i],r=-1;const s=e=>{if(r>-1&&i[r]&&i[r].classList.remove("active"),r=e,r>-1){const e=i[r];e.classList.add("active"),e.id?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant")}else t.removeAttribute("aria-activedescendant")};t.addEventListener("input",(()=>{const e=t.value.trim().toLowerCase();s(-1),o=[],a.forEach((t=>{if(t.hasAttribute("data-force"))return t.setAttribute("aria-hidden","false"),void(i.includes(t)&&o.push(t));const n=(t.dataset.filter||t.textContent).trim().toLowerCase(),a=(t.dataset.keywords||"").toLowerCase(),r=n.includes(e)||a.includes(e);t.setAttribute("aria-hidden",String(!r)),r&&i.includes(t)&&o.push(t)})),o.length>0&&(s(i.indexOf(o[0])),o[0].scrollIntoView({block:"nearest"}))}));n.addEventListener("mousemove",(e=>{const t=e.target.closest('[role="menuitem"]');if(t&&o.includes(t)){const e=i.indexOf(t);e!==r&&s(e)}})),n.addEventListener("click",(t=>{const n=t.target.closest('[role="menuitem"]');if(n&&o.includes(n)){const t=e.closest("dialog.command-dialog");t&&!n.hasAttribute("data-keep-command-open")&&t.close()}})),t.addEventListener("keydown",(e=>{if(!["ArrowDown","ArrowUp","Enter","Home","End"].includes(e.key))return;if("Enter"===e.key)return e.preventDefault(),void(r>-1&&i[r]?.click());if(0===o.length)return;e.preventDefault();const t=r>-1?o.indexOf(i[r]):-1;let n=t;switch(e.key){case"ArrowDown":t<o.length-1&&(n=t+1);break;case"ArrowUp":t>0?n=t-1:-1===t&&(n=0);break;case"Home":n=0;break;case"End":n=o.length-1}if(n!==t){const e=o[n];s(i.indexOf(e)),e.scrollIntoView({block:"nearest",behavior:"smooth"})}})),o.length>0&&(s(i.indexOf(o[0])),o[0].scrollIntoView({block:"nearest"})),e.dataset.commandInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("command",".command:not([data-command-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector(":scope > button"),n=e.querySelector(":scope > [data-popover]"),a=n.querySelector('[role="menu"]');if(!t||!a||!n){const i=[];return t||i.push("trigger"),a||i.push("menu"),n||i.push("popover"),void console.error(`Dropdown menu initialisation failed. Missing element(s): ${i.join(", ")}`,e)}let i=[],o=-1;const r=(e=!0)=>{"false"!==t.getAttribute("aria-expanded")&&(t.setAttribute("aria-expanded","false"),t.removeAttribute("aria-activedescendant"),n.setAttribute("aria-hidden","true"),e&&t.focus(),d(-1))},s=(o=!1)=>{document.dispatchEvent(new CustomEvent("basecoat:popover",{detail:{source:e}})),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false"),i=Array.from(a.querySelectorAll('[role^="menuitem"]')).filter((e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled"))),i.length>0&&o&&("first"===o?d(0):"last"===o&&d(i.length-1))},d=e=>{if(o>-1&&i[o]&&i[o].classList.remove("active"),o=e,o>-1&&i[o]){const e=i[o];e.classList.add("active"),t.setAttribute("aria-activedescendant",e.id)}else t.removeAttribute("aria-activedescendant")};t.addEventListener("click",(()=>{"true"===t.getAttribute("aria-expanded")?r():s(!1)})),e.addEventListener("keydown",(e=>{const n="true"===t.getAttribute("aria-expanded");if("Escape"===e.key)return void(n&&r());if(!n)return void(["Enter"," "].includes(e.key)?(e.preventDefault(),s(!1)):"ArrowDown"===e.key?(e.preventDefault(),s("first")):"ArrowUp"===e.key&&(e.preventDefault(),s("last")));if(0===i.length)return;let a=o;switch(e.key){case"ArrowDown":e.preventDefault(),a=-1===o?0:Math.min(o+1,i.length-1);break;case"ArrowUp":e.preventDefault(),a=-1===o?i.length-1:Math.max(o-1,0);break;case"Home":e.preventDefault(),a=0;break;case"End":e.preventDefault(),a=i.length-1;break;case"Enter":case" ":return e.preventDefault(),i[o]?.click(),void r()}a!==o&&d(a)})),a.addEventListener("mousemove",(e=>{const t=e.target.closest('[role^="menuitem"]');if(t&&i.includes(t)){const e=i.indexOf(t);e!==o&&d(e)}})),a.addEventListener("mouseleave",(()=>{d(-1)})),a.addEventListener("click",(e=>{e.target.closest('[role^="menuitem"]')&&r()})),document.addEventListener("click",(t=>{e.contains(t.target)||r()})),document.addEventListener("basecoat:popover",(t=>{t.detail.source!==e&&r(!1)})),e.dataset.dropdownMenuInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("dropdown-menu",".dropdown-menu:not([data-dropdown-menu-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector(":scope > button"),n=e.querySelector(":scope > [data-popover]");if(!t||!n){const a=[];return t||a.push("trigger"),n||a.push("content"),void console.error(`Popover initialisation failed. Missing element(s): ${a.join(", ")}`,e)}const a=(e=!0)=>{"false"!==t.getAttribute("aria-expanded")&&(t.setAttribute("aria-expanded","false"),n.setAttribute("aria-hidden","true"),e&&t.focus())};t.addEventListener("click",(()=>{"true"===t.getAttribute("aria-expanded")?a():(()=>{document.dispatchEvent(new CustomEvent("basecoat:popover",{detail:{source:e}}));const a=n.querySelector("[autofocus]");a&&n.addEventListener("transitionend",(()=>{a.focus()}),{once:!0}),t.setAttribute("aria-expanded","true"),n.setAttribute("aria-hidden","false")})()})),e.addEventListener("keydown",(e=>{"Escape"===e.key&&a()})),document.addEventListener("click",(t=>{e.contains(t.target)||a()})),document.addEventListener("basecoat:popover",(t=>{t.detail.source!==e&&a(!1)})),e.dataset.popoverInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("popover",".popover:not([data-popover-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector(":scope > button"),n=t.querySelector(":scope > span"),a=e.querySelector(":scope > [data-popover]"),i=a.querySelector('[role="listbox"]'),o=e.querySelector(':scope > input[type="hidden"]'),r=e.querySelector('header input[type="text"]');if(!(t&&a&&i&&o)){const n=[];return t||n.push("trigger"),a||n.push("popover"),i||n.push("listbox"),o||n.push("input"),void console.error(`Select component initialisation failed. Missing element(s): ${n.join(", ")}`,e)}const s=Array.from(i.querySelectorAll('[role="option"]')),d=s.filter((e=>"true"!==e.getAttribute("aria-disabled")));let c=[...d],l=-1;const u=e=>{if(l>-1&&d[l]&&d[l].classList.remove("active"),l=e,l>-1){const e=d[l];e.classList.add("active"),e.id?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant")}else t.removeAttribute("aria-activedescendant")},v=()=>{const e=getComputedStyle(a);return parseFloat(e.transitionDuration)>0||parseFloat(e.transitionDelay)>0},p=(t,a=!0)=>{if(t&&(n.innerHTML=t.innerHTML,o.value=t.dataset.value,i.querySelector('[role="option"][aria-selected="true"]')?.removeAttribute("aria-selected"),t.setAttribute("aria-selected","true"),a)){const n=new CustomEvent("change",{detail:{value:t.dataset.value},bubbles:!0});e.dispatchEvent(n)}},m=(e=!0)=>{if("true"!==a.getAttribute("aria-hidden")){if(r){const e=()=>{r.value="",c=[...d],s.forEach((e=>e.setAttribute("aria-hidden","false")))};v()?a.addEventListener("transitionend",e,{once:!0}):e()}e&&t.focus(),a.setAttribute("aria-hidden","true"),t.setAttribute("aria-expanded","false"),u(-1)}},b=e=>{if(!e)return;const t=o.value,n=e.dataset.value;null!=n&&n!==t&&p(e),m()};if(r){const e=()=>{const e=r.value.trim().toLowerCase();u(-1),c=[],s.forEach((t=>{if(t.hasAttribute("data-force"))return t.setAttribute("aria-hidden","false"),void(d.includes(t)&&c.push(t));const n=(t.dataset.filter||t.textContent).trim().toLowerCase(),a=(t.dataset.keywords||"").toLowerCase(),i=n.includes(e)||a.includes(e);t.setAttribute("aria-hidden",String(!i)),i&&d.includes(t)&&c.push(t)}))};r.addEventListener("input",e)}let h=d.find((e=>e.dataset.value===o.value));h||(h=d.find((e=>void 0!==e.dataset.value))??d[0]),p(h,!1);const f=e=>{const n="false"===a.getAttribute("aria-hidden");if(!["ArrowDown","ArrowUp","Enter","Home","End","Escape"].includes(e.key))return;if(!n)return void("Enter"!==e.key&&"Escape"!==e.key&&(e.preventDefault(),t.click()));if(e.preventDefault(),"Escape"===e.key)return void m();if("Enter"===e.key)return void(l>-1&&b(d[l]));if(0===c.length)return;const i=l>-1?c.indexOf(d[l]):-1;let o=i;switch(e.key){case"ArrowDown":i<c.length-1&&(o=i+1);break;case"ArrowUp":i>0?o=i-1:-1===i&&(o=0);break;case"Home":o=0;break;case"End":o=c.length-1}if(o!==i){const e=c[o];u(d.indexOf(e)),e.scrollIntoView({block:"nearest",behavior:"smooth"})}};i.addEventListener("mousemove",(e=>{const t=e.target.closest('[role="option"]');if(t&&c.includes(t)){const e=d.indexOf(t);e!==l&&u(e)}})),i.addEventListener("mouseleave",(()=>{const e=i.querySelector('[role="option"][aria-selected="true"]');u(e?d.indexOf(e):-1)})),t.addEventListener("keydown",f),r&&r.addEventListener("keydown",f);t.addEventListener("click",(()=>{"true"===t.getAttribute("aria-expanded")?m():(()=>{document.dispatchEvent(new CustomEvent("basecoat:popover",{detail:{source:e}})),r&&(v()?a.addEventListener("transitionend",(()=>{r.focus()}),{once:!0}):r.focus()),a.setAttribute("aria-hidden","false"),t.setAttribute("aria-expanded","true");const n=i.querySelector('[role="option"][aria-selected="true"]');n&&(u(d.indexOf(n)),n.scrollIntoView({block:"nearest"}))})()})),i.addEventListener("click",(e=>{const t=e.target.closest('[role="option"]');t&&b(t)})),document.addEventListener("click",(t=>{e.contains(t.target)||m(!1)})),document.addEventListener("basecoat:popover",(t=>{t.detail.source!==e&&m(!1)})),a.setAttribute("aria-hidden","true"),e.selectByValue=e=>{const t=d.find((t=>t.dataset.value===e));b(t)},e.dataset.selectInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("select","div.select:not([data-select-initialized])",e)})(),(()=>{if(!window.history.__basecoatPatched){const e=window.history.pushState;window.history.pushState=function(...t){e.apply(this,t),window.dispatchEvent(new Event("basecoat:locationchange"))};const t=window.history.replaceState;window.history.replaceState=function(...e){t.apply(this,e),window.dispatchEvent(new Event("basecoat:locationchange"))},window.history.__basecoatPatched=!0}const e=e=>{const t="false"!==e.dataset.initialOpen,n="true"===e.dataset.initialMobileOpen,a=parseInt(e.dataset.breakpoint)||768;let i=a>0?window.innerWidth>=a?t:n:t;const o=()=>{const t=window.location.pathname.replace(/\/$/,"");e.querySelectorAll("a").forEach((e=>{if(e.hasAttribute("data-ignore-current"))return;new URL(e.href).pathname.replace(/\/$/,"")===t?e.setAttribute("aria-current","page"):e.removeAttribute("aria-current")}))},r=()=>{e.setAttribute("aria-hidden",!i),i?e.removeAttribute("inert"):e.setAttribute("inert","")},s=e=>{i=e,r()},d=e.id;document.addEventListener("basecoat:sidebar",(e=>{if(!e.detail?.id||e.detail.id===d)switch(e.detail?.action){case"open":s(!0);break;case"close":s(!1);break;default:s(!i)}})),e.addEventListener("click",(t=>{const n=t.target,i=e.querySelector("nav");if(window.innerWidth<a&&n.closest("a, button")&&!n.closest("[data-keep-mobile-sidebar-open]"))return document.activeElement&&document.activeElement.blur(),void s(!1);(n===e||i&&!i.contains(n))&&(document.activeElement&&document.activeElement.blur(),s(!1))})),window.addEventListener("popstate",o),window.addEventListener("basecoat:locationchange",o),r(),o(),e.dataset.sidebarInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("sidebar",".sidebar:not([data-sidebar-initialized])",e)})(),(()=>{const e=e=>{const t=e.querySelector('[role="tablist"]');if(!t)return;const n=Array.from(t.querySelectorAll('[role="tab"]')),a=n.map((e=>document.getElementById(e.getAttribute("aria-controls")))).filter(Boolean),i=e=>{n.forEach(((e,t)=>{e.setAttribute("aria-selected","false"),e.setAttribute("tabindex","-1"),a[t]&&(a[t].hidden=!0)})),e.setAttribute("aria-selected","true"),e.setAttribute("tabindex","0");const t=document.getElementById(e.getAttribute("aria-controls"));t&&(t.hidden=!1)};t.addEventListener("click",(e=>{const t=e.target.closest('[role="tab"]');t&&i(t)})),t.addEventListener("keydown",(e=>{const t=e.target;if(!n.includes(t))return;let a;const o=n.indexOf(t);switch(e.key){case"ArrowRight":a=n[(o+1)%n.length];break;case"ArrowLeft":a=n[(o-1+n.length)%n.length];break;case"Home":a=n[0];break;case"End":a=n[n.length-1];break;default:return}e.preventDefault(),i(a),a.focus()})),e.dataset.tabsInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("tabs",".tabs:not([data-tabs-initialized])",e)})(),(()=>{let e;const t=new WeakMap;let n=!1;const a={success:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m9 12 2 2 4-4"/></svg>',error:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="m15 9-6 6"/><path d="m9 9 6 6"/></svg>',info:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><path d="M12 16v-4"/><path d="M12 8h.01"/></svg>',warning:'<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3"/><path d="M12 9v4"/><path d="M12 17h.01"/></svg>'};function i(e){if(e.dataset.toastInitialized)return;const a=parseInt(e.dataset.duration),i=-1!==a?a||("error"===e.dataset.category?5e3:3e3):-1,o={remainingTime:i,timeoutId:null,startTime:null};-1!==i&&(n?o.timeoutId=null:(o.startTime=Date.now(),o.timeoutId=setTimeout((()=>s(e)),i))),t.set(e,o),e.dataset.toastInitialized="true"}function o(){n||(n=!0,e.querySelectorAll('.toast:not([aria-hidden="true"])').forEach((e=>{if(!t.has(e))return;const n=t.get(e);n.timeoutId&&(clearTimeout(n.timeoutId),n.timeoutId=null,n.remainingTime-=Date.now()-n.startTime)})))}function r(){n&&(n=!1,e.querySelectorAll('.toast:not([aria-hidden="true"])').forEach((e=>{if(!t.has(e))return;const n=t.get(e);-1===n.remainingTime||n.timeoutId||(n.remainingTime>0?(n.startTime=Date.now(),n.timeoutId=setTimeout((()=>s(e)),n.remainingTime)):s(e))})))}function s(e){if(!t.has(e))return;const n=t.get(e);clearTimeout(n.timeoutId),t.delete(e),e.contains(document.activeElement)&&document.activeElement.blur(),e.setAttribute("aria-hidden","true"),e.addEventListener("transitionend",(()=>e.remove()),{once:!0})}document.addEventListener("basecoat:toast",(t=>{if(!e)return void console.error("Cannot create toast: toaster container not found on page.");const n=function(e){const{category:t="info",title:n,description:i,action:o,cancel:r,duration:s,icon:d}=e,c=d||t&&a[t]||"",l=n?`<h2>${n}</h2>`:"",u=i?`<p>${i}</p>`:"",v=o?.href?`<a href="${o.href}" class="btn" data-toast-action>${o.label}</a>`:o?.onclick?`<button type="button" class="btn" data-toast-action onclick="${o.onclick}">${o.label}</button>`:"",p=r?`<button type="button" class="btn-outline h-6 text-xs px-2.5 rounded-sm" data-toast-cancel onclick="${r?.onclick}">${r.label}</button>`:"",m=`\n <div\n class="toast"\n role="${"error"===t?"alert":"status"}"\n aria-atomic="true"\n ${t?`data-category="${t}"`:""}\n ${void 0!==s?`data-duration="${s}"`:""}\n >\n <div class="toast-content">\n ${c}\n <section>\n ${l}\n ${u}\n </section>\n ${v||p?`<footer>${v}${p}</footer>`:""}\n </div>\n </div>\n </div>\n `,b=document.createElement("template");return b.innerHTML=m.trim(),b.content.firstChild}(t.detail?.config||{});e.appendChild(n)})),window.basecoat&&(window.basecoat.register("toaster","#toaster:not([data-toaster-initialized])",(function(t){t.dataset.toasterInitialized||(e=t,e.addEventListener("mouseenter",o),e.addEventListener("mouseleave",r),e.addEventListener("click",(e=>{const t=e.target.closest(".toast footer a"),n=e.target.closest(".toast footer button");(t||n)&&s(e.target.closest(".toast"))})),e.querySelectorAll(".toast:not([data-toast-initialized])").forEach(i),e.dataset.toasterInitialized="true",e.dispatchEvent(new CustomEvent("basecoat:initialized")))})),window.basecoat.register("toast",".toast:not([data-toast-initialized])",i))})();
|
package/dist/js/command.js
CHANGED
|
@@ -46,7 +46,15 @@
|
|
|
46
46
|
|
|
47
47
|
visibleMenuItems = [];
|
|
48
48
|
allMenuItems.forEach(item => {
|
|
49
|
-
|
|
49
|
+
if (item.hasAttribute('data-force')) {
|
|
50
|
+
item.setAttribute('aria-hidden', 'false');
|
|
51
|
+
if (menuItems.includes(item)) {
|
|
52
|
+
visibleMenuItems.push(item);
|
|
53
|
+
}
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const itemText = (item.dataset.filter || item.textContent).trim().toLowerCase();
|
|
50
58
|
const keywords = (item.dataset.keywords || '').toLowerCase();
|
|
51
59
|
const matches = itemText.includes(searchTerm) || keywords.includes(searchTerm);
|
|
52
60
|
item.setAttribute('aria-hidden', String(!matches));
|
package/dist/js/command.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{const e=e=>{const t=e.querySelector("header input"),n=e.querySelector('[role="menu"]');if(!t||!n){const i=[];return t||i.push("input"),n||i.push("menu"),void console.error(`Command component initialization failed. Missing element(s): ${i.join(", ")}`,e)}const i=Array.from(n.querySelectorAll('[role="menuitem"]')),
|
|
1
|
+
(()=>{const e=e=>{const t=e.querySelector("header input"),n=e.querySelector('[role="menu"]');if(!t||!n){const i=[];return t||i.push("input"),n||i.push("menu"),void console.error(`Command component initialization failed. Missing element(s): ${i.join(", ")}`,e)}const i=Array.from(n.querySelectorAll('[role="menuitem"]')),a=i.filter((e=>!e.hasAttribute("disabled")&&"true"!==e.getAttribute("aria-disabled")));let o=[...a],r=-1;const s=e=>{if(r>-1&&a[r]&&a[r].classList.remove("active"),r=e,r>-1){const e=a[r];e.classList.add("active"),e.id?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant")}else t.removeAttribute("aria-activedescendant")};t.addEventListener("input",(()=>{const e=t.value.trim().toLowerCase();s(-1),o=[],i.forEach((t=>{if(t.hasAttribute("data-force"))return t.setAttribute("aria-hidden","false"),void(a.includes(t)&&o.push(t));const n=(t.dataset.filter||t.textContent).trim().toLowerCase(),i=(t.dataset.keywords||"").toLowerCase(),r=n.includes(e)||i.includes(e);t.setAttribute("aria-hidden",String(!r)),r&&a.includes(t)&&o.push(t)})),o.length>0&&(s(a.indexOf(o[0])),o[0].scrollIntoView({block:"nearest"}))}));n.addEventListener("mousemove",(e=>{const t=e.target.closest('[role="menuitem"]');if(t&&o.includes(t)){const e=a.indexOf(t);e!==r&&s(e)}})),n.addEventListener("click",(t=>{const n=t.target.closest('[role="menuitem"]');if(n&&o.includes(n)){const t=e.closest("dialog.command-dialog");t&&!n.hasAttribute("data-keep-command-open")&&t.close()}})),t.addEventListener("keydown",(e=>{if(!["ArrowDown","ArrowUp","Enter","Home","End"].includes(e.key))return;if("Enter"===e.key)return e.preventDefault(),void(r>-1&&a[r]?.click());if(0===o.length)return;e.preventDefault();const t=r>-1?o.indexOf(a[r]):-1;let n=t;switch(e.key){case"ArrowDown":t<o.length-1&&(n=t+1);break;case"ArrowUp":t>0?n=t-1:-1===t&&(n=0);break;case"Home":n=0;break;case"End":n=o.length-1}if(n!==t){const e=o[n];s(a.indexOf(e)),e.scrollIntoView({block:"nearest",behavior:"smooth"})}})),o.length>0&&(s(a.indexOf(o[0])),o[0].scrollIntoView({block:"nearest"})),e.dataset.commandInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("command",".command:not([data-command-initialized])",e)})();
|
package/dist/js/select.js
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
|
|
49
49
|
const updateValue = (option, triggerEvent = true) => {
|
|
50
50
|
if (option) {
|
|
51
|
-
selectedLabel.innerHTML = option.
|
|
51
|
+
selectedLabel.innerHTML = option.innerHTML;
|
|
52
52
|
input.value = option.dataset.value;
|
|
53
53
|
listbox.querySelector('[role="option"][aria-selected="true"]')?.removeAttribute('aria-selected');
|
|
54
54
|
option.setAttribute('aria-selected', 'true');
|
|
@@ -112,8 +112,17 @@
|
|
|
112
112
|
|
|
113
113
|
visibleOptions = [];
|
|
114
114
|
allOptions.forEach(option => {
|
|
115
|
-
|
|
116
|
-
|
|
115
|
+
if (option.hasAttribute('data-force')) {
|
|
116
|
+
option.setAttribute('aria-hidden', 'false');
|
|
117
|
+
if (options.includes(option)) {
|
|
118
|
+
visibleOptions.push(option);
|
|
119
|
+
}
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
const optionText = (option.dataset.filter || option.textContent).trim().toLowerCase();
|
|
124
|
+
const keywords = (option.dataset.keywords || '').toLowerCase();
|
|
125
|
+
const matches = optionText.includes(searchTerm) || keywords.includes(searchTerm);
|
|
117
126
|
option.setAttribute('aria-hidden', String(!matches));
|
|
118
127
|
if (matches && options.includes(option)) {
|
|
119
128
|
visibleOptions.push(option);
|
package/dist/js/select.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{const e=e=>{const t=e.querySelector(":scope > button"),
|
|
1
|
+
(()=>{const e=e=>{const t=e.querySelector(":scope > button"),i=t.querySelector(":scope > span"),a=e.querySelector(":scope > [data-popover]"),r=a.querySelector('[role="listbox"]'),n=e.querySelector(':scope > input[type="hidden"]'),s=e.querySelector('header input[type="text"]');if(!(t&&a&&r&&n)){const i=[];return t||i.push("trigger"),a||i.push("popover"),r||i.push("listbox"),n||i.push("input"),void console.error(`Select component initialisation failed. Missing element(s): ${i.join(", ")}`,e)}const o=Array.from(r.querySelectorAll('[role="option"]')),d=o.filter((e=>"true"!==e.getAttribute("aria-disabled")));let c=[...d],l=-1;const u=e=>{if(l>-1&&d[l]&&d[l].classList.remove("active"),l=e,l>-1){const e=d[l];e.classList.add("active"),e.id?t.setAttribute("aria-activedescendant",e.id):t.removeAttribute("aria-activedescendant")}else t.removeAttribute("aria-activedescendant")},v=()=>{const e=getComputedStyle(a);return parseFloat(e.transitionDuration)>0||parseFloat(e.transitionDelay)>0},p=(t,a=!0)=>{if(t&&(i.innerHTML=t.innerHTML,n.value=t.dataset.value,r.querySelector('[role="option"][aria-selected="true"]')?.removeAttribute("aria-selected"),t.setAttribute("aria-selected","true"),a)){const i=new CustomEvent("change",{detail:{value:t.dataset.value},bubbles:!0});e.dispatchEvent(i)}},f=(e=!0)=>{if("true"!==a.getAttribute("aria-hidden")){if(s){const e=()=>{s.value="",c=[...d],o.forEach((e=>e.setAttribute("aria-hidden","false")))};v()?a.addEventListener("transitionend",e,{once:!0}):e()}e&&t.focus(),a.setAttribute("aria-hidden","true"),t.setAttribute("aria-expanded","false"),u(-1)}},b=e=>{if(!e)return;const t=n.value,i=e.dataset.value;null!=i&&i!==t&&p(e),f()};if(s){const e=()=>{const e=s.value.trim().toLowerCase();u(-1),c=[],o.forEach((t=>{if(t.hasAttribute("data-force"))return t.setAttribute("aria-hidden","false"),void(d.includes(t)&&c.push(t));const i=(t.dataset.filter||t.textContent).trim().toLowerCase(),a=(t.dataset.keywords||"").toLowerCase(),r=i.includes(e)||a.includes(e);t.setAttribute("aria-hidden",String(!r)),r&&d.includes(t)&&c.push(t)}))};s.addEventListener("input",e)}let h=d.find((e=>e.dataset.value===n.value));h||(h=d.find((e=>void 0!==e.dataset.value))??d[0]),p(h,!1);const E=e=>{const i="false"===a.getAttribute("aria-hidden");if(!["ArrowDown","ArrowUp","Enter","Home","End","Escape"].includes(e.key))return;if(!i)return void("Enter"!==e.key&&"Escape"!==e.key&&(e.preventDefault(),t.click()));if(e.preventDefault(),"Escape"===e.key)return void f();if("Enter"===e.key)return void(l>-1&&b(d[l]));if(0===c.length)return;const r=l>-1?c.indexOf(d[l]):-1;let n=r;switch(e.key){case"ArrowDown":r<c.length-1&&(n=r+1);break;case"ArrowUp":r>0?n=r-1:-1===r&&(n=0);break;case"Home":n=0;break;case"End":n=c.length-1}if(n!==r){const e=c[n];u(d.indexOf(e)),e.scrollIntoView({block:"nearest",behavior:"smooth"})}};r.addEventListener("mousemove",(e=>{const t=e.target.closest('[role="option"]');if(t&&c.includes(t)){const e=d.indexOf(t);e!==l&&u(e)}})),r.addEventListener("mouseleave",(()=>{const e=r.querySelector('[role="option"][aria-selected="true"]');u(e?d.indexOf(e):-1)})),t.addEventListener("keydown",E),s&&s.addEventListener("keydown",E);t.addEventListener("click",(()=>{"true"===t.getAttribute("aria-expanded")?f():(()=>{document.dispatchEvent(new CustomEvent("basecoat:popover",{detail:{source:e}})),s&&(v()?a.addEventListener("transitionend",(()=>{s.focus()}),{once:!0}):s.focus()),a.setAttribute("aria-hidden","false"),t.setAttribute("aria-expanded","true");const i=r.querySelector('[role="option"][aria-selected="true"]');i&&(u(d.indexOf(i)),i.scrollIntoView({block:"nearest"}))})()})),r.addEventListener("click",(e=>{const t=e.target.closest('[role="option"]');t&&b(t)})),document.addEventListener("click",(t=>{e.contains(t.target)||f(!1)})),document.addEventListener("basecoat:popover",(t=>{t.detail.source!==e&&f(!1)})),a.setAttribute("aria-hidden","true"),e.selectByValue=e=>{const t=d.find((t=>t.dataset.value===e));b(t)},e.dataset.selectInitialized=!0,e.dispatchEvent(new CustomEvent("basecoat:initialized"))};window.basecoat&&window.basecoat.register("select","div.select:not([data-select-initialized])",e)})();
|