@castlabs/ui 7.0.3 → 7.0.5
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/assets/bs/checked.svg +1 -0
- package/dist/assets/bs/select-disabled.svg +1 -0
- package/dist/assets/bs/select.svg +1 -0
- package/dist/castlabs-logo-eggshell.23c10525.svg +33 -0
- package/dist/castlabs-logo.72b8026b.svg +33 -0
- package/dist/castlabs-ui.common.js +4 -4
- package/dist/castlabs-ui.common.js.map +1 -1
- package/dist/castlabs-ui.core.js +29 -4
- package/dist/castlabs-ui.css +3 -3
- package/dist/castlabs-ui.module.js +29 -4
- package/dist/castlabs-ui.umd.js +8 -8
- package/dist/castlabs-ui.umd.js.map +1 -1
- package/dist/checked.f00b2c85.svg +1 -0
- package/dist/select-disabled.c5e07724.svg +1 -0
- package/dist/select.10c23108.svg +1 -0
- package/package.json +1 -1
- package/src/assets/bs/checked.svg +1 -0
- package/src/assets/bs/select-disabled.svg +1 -0
- package/src/assets/bs/select.svg +1 -0
- package/src/components/ClButton/style.scss +1 -1
- package/src/components/ClTabs/style.scss +1 -1
- package/src/components/form/ClFieldCheck/style.scss +1 -0
- package/src/components/form/ClFieldSelect/style.scss +8 -0
- package/src/components/navigation/ClNavSide/ClNavDrawer/style.scss +7 -4
- package/src/components/widget/ClBackCancelOk/style.scss +4 -0
- package/src/components/widget/ClCookieBanner/style.scss +0 -5
- package/src/fonts/DMMono/DMMono.scss +9 -6
- package/src/fonts/NonNaturalGroteskInktrap/NonNaturalGroteskInktrap.scss +3 -3
- package/src/styles/assets/logo.scss +4 -15
- package/src/styles/layout/typography.scss +2 -5
- package/dist/assets/cookie.svg +0 -1
- package/src/assets/cookie.svg +0 -1
package/dist/castlabs-ui.core.js
CHANGED
|
@@ -318,11 +318,32 @@ function getColIndex (col) {
|
|
|
318
318
|
* @param {boolean} smooth. Optional smooth scrolling, default to yes.
|
|
319
319
|
*/
|
|
320
320
|
function clScrollToId (id, smooth = true) {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
const element = document.getElementById(id)
|
|
322
|
+
|
|
323
|
+
// open corresponding tab if ID is in there
|
|
324
|
+
let tab = element?.parentElement
|
|
325
|
+
while (tab) {
|
|
326
|
+
// detect tab by our tab class name
|
|
327
|
+
const clazz = (tab.getAttribute('class') ?? '').match(/cl-tab-[0-9]+/)
|
|
328
|
+
if (clazz) {
|
|
329
|
+
// find radio box that belongs to that tab + enable it
|
|
330
|
+
const radio = document.querySelector(`input.${clazz}`)
|
|
331
|
+
if (radio) {
|
|
332
|
+
radio.checked = true
|
|
333
|
+
break
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
tab = tab.parentElement
|
|
325
337
|
}
|
|
338
|
+
|
|
339
|
+
// delay click one tick to give page time to update
|
|
340
|
+
setTimeout(() => {
|
|
341
|
+
if (smooth) {
|
|
342
|
+
element?.scrollIntoView({ behavior: 'smooth' })
|
|
343
|
+
} else {
|
|
344
|
+
element?.scrollIntoView()
|
|
345
|
+
}
|
|
346
|
+
}, 0)
|
|
326
347
|
}
|
|
327
348
|
|
|
328
349
|
// -----------------------------------------------------------------------------
|
|
@@ -1065,6 +1086,10 @@ function clReload (component, forced = [], optional = [], loading = true) {
|
|
|
1065
1086
|
}
|
|
1066
1087
|
}
|
|
1067
1088
|
|
|
1089
|
+
function clSleep (ms) {
|
|
1090
|
+
return new Promise(resolve => setTimeout(resolve, ms))
|
|
1091
|
+
}
|
|
1092
|
+
|
|
1068
1093
|
// -----------------------------------------------------------------------------
|
|
1069
1094
|
// --- $ref typescript cast methods --------------------------------------------
|
|
1070
1095
|
// -----------------------------------------------------------------------------
|