2022-05-12 23:22:49 +02:00
|
|
|
import sl_css from '@shoelace-style/shoelace/dist/themes/light.styles.js';
|
|
|
|
import {css} from "lit";
|
|
|
|
|
2022-05-13 19:51:29 +02:00
|
|
|
import {registerIconLibrary} from '@shoelace-style/shoelace/dist/utilities/icon-library.js';
|
|
|
|
import {egw} from "../../jsapi/egw_global";
|
|
|
|
|
2022-08-22 22:05:11 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Here is the common overrides and customisations for Shoelace
|
|
|
|
*/
|
|
|
|
|
2022-08-22 22:58:55 +02:00
|
|
|
/**
|
|
|
|
* Make shoelace icons available
|
|
|
|
*/
|
|
|
|
registerIconLibrary('default', {
|
|
|
|
resolver: name =>
|
|
|
|
{
|
|
|
|
return typeof egw !== "undefined" ? `${egw.webserverUrl}/node_modules/@shoelace-style/shoelace/dist/assets/icons/${name}.svg` : ''
|
|
|
|
},
|
|
|
|
});
|
2022-08-22 22:05:11 +02:00
|
|
|
|
2022-05-13 19:51:29 +02:00
|
|
|
/**
|
2022-08-22 22:05:11 +02:00
|
|
|
* Register egw images as an icon library
|
|
|
|
* @example <sl-icon library="egw" name="infolog/navbar"/>
|
|
|
|
* @example <sl-icon library="egw" name="5_day_view"/>
|
2022-05-13 19:51:29 +02:00
|
|
|
*/
|
2022-08-22 22:05:11 +02:00
|
|
|
registerIconLibrary('egw', {
|
2022-06-08 00:39:04 +02:00
|
|
|
resolver: name =>
|
|
|
|
{
|
2022-08-22 22:05:11 +02:00
|
|
|
return typeof egw !== "undefined" ? (egw.image(name) || '') : ''
|
2022-06-08 00:39:04 +02:00
|
|
|
},
|
2022-05-13 19:51:29 +02:00
|
|
|
});
|
|
|
|
|
2022-05-12 23:22:49 +02:00
|
|
|
/**
|
|
|
|
* Customise shoelace styles to match our stuff
|
2022-07-21 20:39:00 +02:00
|
|
|
* External CSS & widget styles will override this
|
2022-05-12 23:22:49 +02:00
|
|
|
*/
|
|
|
|
export default [sl_css, css`
|
|
|
|
:root,
|
|
|
|
:host,
|
|
|
|
.sl-theme-light {
|
2022-05-26 22:47:52 +02:00
|
|
|
--sl-font-size-medium: 11px;
|
|
|
|
|
2022-05-12 23:22:49 +02:00
|
|
|
--sl-input-height-small: 18px;
|
|
|
|
--sl-input-height-medium: 24px;
|
|
|
|
|
|
|
|
--sl-spacing-small: 0.1rem;
|
|
|
|
--sl-spacing-medium: 0.5rem;
|
|
|
|
|
|
|
|
--sl-input-border-radius-small: 2px;
|
|
|
|
--sl-input-border-radius-medium: 3px;
|
2022-05-26 22:47:52 +02:00
|
|
|
--sl-input-border-color-focus: #E6E6E6;
|
2022-08-09 15:53:29 +02:00
|
|
|
--indicator-color: #696969;
|
2022-08-10 13:15:24 +02:00
|
|
|
--sl-input-focus-ring-color: #26537C;
|
2022-08-09 16:46:19 +02:00
|
|
|
--sl-focus-ring-width: 2px;
|
|
|
|
|
2022-08-09 15:53:29 +02:00
|
|
|
}
|
|
|
|
.tab-group--top .tab-group__tabs {
|
|
|
|
--track-width: 3px;
|
2022-05-12 23:22:49 +02:00
|
|
|
}
|
|
|
|
`];
|