mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-16 04:53:18 +01:00
0775fd1a4e
- If Et2ButtonIcon image does not resolve to a egw image, treat it as a Shoelace icon name - Add egw images as an icon library for Shoelace eg: <sl-icon library="egw" name="5_day_view"/>
52 lines
1.3 KiB
TypeScript
52 lines
1.3 KiB
TypeScript
import sl_css from '@shoelace-style/shoelace/dist/themes/light.styles.js';
|
|
import {css} from "lit";
|
|
|
|
import {registerIconLibrary} from '@shoelace-style/shoelace/dist/utilities/icon-library.js';
|
|
import {egw} from "../../jsapi/egw_global";
|
|
|
|
|
|
/**
|
|
* Here is the common overrides and customisations for Shoelace
|
|
*/
|
|
|
|
|
|
/**
|
|
* Register egw images as an icon library
|
|
* @example <sl-icon library="egw" name="infolog/navbar"/>
|
|
* @example <sl-icon library="egw" name="5_day_view"/>
|
|
*/
|
|
registerIconLibrary('egw', {
|
|
resolver: name =>
|
|
{
|
|
return typeof egw !== "undefined" ? (egw.image(name) || '') : ''
|
|
},
|
|
});
|
|
|
|
/**
|
|
* Customise shoelace styles to match our stuff
|
|
* External CSS & widget styles will override this
|
|
*/
|
|
export default [sl_css, css`
|
|
:root,
|
|
:host,
|
|
.sl-theme-light {
|
|
--sl-font-size-medium: 11px;
|
|
|
|
--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;
|
|
--sl-input-border-color-focus: #E6E6E6;
|
|
--indicator-color: #696969;
|
|
--sl-input-focus-ring-color: #26537C;
|
|
--sl-focus-ring-width: 2px;
|
|
|
|
}
|
|
.tab-group--top .tab-group__tabs {
|
|
--track-width: 3px;
|
|
}
|
|
`]; |