2021-09-03 12:50:09 +02:00
|
|
|
<script>
|
|
|
|
import { themeStore } from "stores"
|
2023-01-19 17:09:40 +01:00
|
|
|
import { setContext } from "svelte"
|
|
|
|
import { Context } from "@budibase/bbui"
|
|
|
|
|
|
|
|
setContext(Context.PopoverRoot, "#theme-root")
|
2021-09-03 12:50:09 +02:00
|
|
|
</script>
|
|
|
|
|
2021-09-10 17:36:43 +02:00
|
|
|
<div style={$themeStore.customThemeCss} id="theme-root">
|
2021-09-03 12:50:09 +02:00
|
|
|
<slot />
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
div {
|
|
|
|
display: contents;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Themes */
|
|
|
|
div {
|
|
|
|
/* Buttons */
|
|
|
|
--spectrum-semantic-cta-color-background-default: var(--primaryColor);
|
|
|
|
--spectrum-semantic-cta-color-background-hover: var(--primaryColorHover);
|
2022-07-01 14:37:28 +02:00
|
|
|
--spectrum-semantic-cta-color-background-down: var(--primaryColorHover);
|
2022-07-29 12:44:57 +02:00
|
|
|
--spectrum-button-primary-s-border-radius: calc(
|
|
|
|
var(--buttonBorderRadius) * 0.9
|
|
|
|
);
|
2021-09-06 17:23:12 +02:00
|
|
|
--spectrum-button-primary-m-border-radius: var(--buttonBorderRadius);
|
2022-07-29 12:44:57 +02:00
|
|
|
--spectrum-button-primary-l-border-radius: calc(
|
|
|
|
var(--buttonBorderRadius) * 1.25
|
|
|
|
);
|
|
|
|
--spectrum-button-primary-xl-border-radius: calc(
|
|
|
|
var(--buttonBorderRadius) * 1.5
|
|
|
|
);
|
2021-09-03 12:50:09 +02:00
|
|
|
|
|
|
|
/* Loading spinners */
|
|
|
|
--spectrum-progresscircle-medium-track-fill-color: var(--primaryColor);
|
|
|
|
|
|
|
|
/* Form fields */
|
|
|
|
--spectrum-alias-border-color-mouse-focus: var(--primaryColor);
|
|
|
|
--spectrum-alias-border-color-focus: var(--primaryColor);
|
|
|
|
--spectrum-radio-m-emphasized-circle-border-color-selected: var(
|
|
|
|
--primaryColor
|
|
|
|
);
|
|
|
|
--spectrum-radio-m-emphasized-circle-border-color-selected-hover: var(
|
|
|
|
--primaryColorHover
|
|
|
|
);
|
|
|
|
--spectrum-checkbox-m-emphasized-box-border-color-selected: var(
|
|
|
|
--primaryColor
|
|
|
|
);
|
|
|
|
--spectrum-checkbox-m-emphasized-box-border-color-selected-hover: var(
|
|
|
|
--primaryColorHover
|
|
|
|
);
|
|
|
|
|
|
|
|
/* Icons */
|
|
|
|
--spectrum-alias-icon-color-selected: var(--primaryColor);
|
2021-09-03 12:53:25 +02:00
|
|
|
--spectrum-alias-icon-color-selected-hover: var(--primaryColorHover);
|
2021-09-03 12:50:09 +02:00
|
|
|
|
|
|
|
/* Links */
|
|
|
|
--spectrum-link-primary-m-text-color: var(--primaryColor);
|
|
|
|
--spectrum-link-primary-m-text-color-hover: var(--primaryColorHover);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Theme flatpickr */
|
|
|
|
:global(.flatpickr-day.selected) {
|
|
|
|
background: var(--primaryColor);
|
|
|
|
border-color: var(--primaryColor);
|
|
|
|
}
|
|
|
|
:global(.flatpickr-day.selected:hover) {
|
|
|
|
background: var(--primaryColorHover);
|
|
|
|
border-color: var(--primaryColorHover);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Custom scrollbars */
|
|
|
|
:global(::-webkit-scrollbar) {
|
|
|
|
width: 8px;
|
|
|
|
height: 8px;
|
|
|
|
}
|
|
|
|
:global(::-webkit-scrollbar-track) {
|
|
|
|
background: var(--spectrum-alias-background-color-default);
|
|
|
|
}
|
|
|
|
:global(::-webkit-scrollbar-thumb) {
|
|
|
|
background-color: var(--spectrum-global-color-gray-400);
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
:global(::-webkit-scrollbar-corner) {
|
|
|
|
background: var(--spectrum-alias-background-color-default);
|
|
|
|
}
|
|
|
|
:global(*) {
|
|
|
|
scrollbar-width: thin;
|
|
|
|
scrollbar-color: var(--spectrum-global-color-gray-400)
|
|
|
|
var(--spectrum-alias-background-color-default);
|
|
|
|
}
|
2021-11-16 12:47:03 +01:00
|
|
|
|
|
|
|
/* Remove border when editing contenteditable components */
|
|
|
|
:global(*[contenteditable="true"]:focus) {
|
|
|
|
outline: none;
|
|
|
|
}
|
2021-09-03 12:50:09 +02:00
|
|
|
</style>
|