fix: 本地 patch MDUI 以解决 tabindex = 0 导致的一系列玄学问题
This commit is contained in:
32
client/mdui_patched/components/divider/index.d.ts
vendored
Normal file
32
client/mdui_patched/components/divider/index.d.ts
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
||||
import type { CSSResultGroup, TemplateResult } from 'lit';
|
||||
/**
|
||||
* @summary 分割线组件
|
||||
*
|
||||
* ```html
|
||||
* <mdui-divider></mdui-divider>
|
||||
* ```
|
||||
*/
|
||||
export declare class Divider extends MduiElement<DividerEventMap> {
|
||||
static styles: CSSResultGroup;
|
||||
/**
|
||||
* 是否为垂直分割线
|
||||
*/
|
||||
vertical: boolean;
|
||||
/**
|
||||
* 是否进行左侧缩进
|
||||
*/
|
||||
inset: boolean;
|
||||
/**
|
||||
* 是否进行左右两侧缩进
|
||||
*/
|
||||
middle: boolean;
|
||||
protected render(): TemplateResult;
|
||||
}
|
||||
export interface DividerEventMap {
|
||||
}
|
||||
declare global {
|
||||
interface HTMLElementTagNameMap {
|
||||
'mdui-divider': Divider;
|
||||
}
|
||||
}
|
||||
60
client/mdui_patched/components/divider/index.js
Normal file
60
client/mdui_patched/components/divider/index.js
Normal file
@@ -0,0 +1,60 @@
|
||||
import { __decorate } from "tslib";
|
||||
import { html } from 'lit';
|
||||
import { customElement, property } from 'lit/decorators.js';
|
||||
import { MduiElement } from '@mdui/shared/base/mdui-element.js';
|
||||
import { booleanConverter } from '@mdui/shared/helpers/decorator.js';
|
||||
import { componentStyle } from '@mdui/shared/lit-styles/component-style.js';
|
||||
import { style } from './style.js';
|
||||
/**
|
||||
* @summary 分割线组件
|
||||
*
|
||||
* ```html
|
||||
* <mdui-divider></mdui-divider>
|
||||
* ```
|
||||
*/
|
||||
let Divider = class Divider extends MduiElement {
|
||||
constructor() {
|
||||
super(...arguments);
|
||||
/**
|
||||
* 是否为垂直分割线
|
||||
*/
|
||||
this.vertical = false;
|
||||
/**
|
||||
* 是否进行左侧缩进
|
||||
*/
|
||||
this.inset = false;
|
||||
/**
|
||||
* 是否进行左右两侧缩进
|
||||
*/
|
||||
this.middle = false;
|
||||
}
|
||||
render() {
|
||||
return html ``;
|
||||
}
|
||||
};
|
||||
Divider.styles = [componentStyle, style];
|
||||
__decorate([
|
||||
property({
|
||||
type: Boolean,
|
||||
reflect: true,
|
||||
converter: booleanConverter,
|
||||
})
|
||||
], Divider.prototype, "vertical", void 0);
|
||||
__decorate([
|
||||
property({
|
||||
type: Boolean,
|
||||
reflect: true,
|
||||
converter: booleanConverter,
|
||||
})
|
||||
], Divider.prototype, "inset", void 0);
|
||||
__decorate([
|
||||
property({
|
||||
type: Boolean,
|
||||
reflect: true,
|
||||
converter: booleanConverter,
|
||||
})
|
||||
], Divider.prototype, "middle", void 0);
|
||||
Divider = __decorate([
|
||||
customElement('mdui-divider')
|
||||
], Divider);
|
||||
export { Divider };
|
||||
1
client/mdui_patched/components/divider/style.d.ts
vendored
Normal file
1
client/mdui_patched/components/divider/style.d.ts
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export declare const style: import("lit").CSSResult;
|
||||
2
client/mdui_patched/components/divider/style.js
Normal file
2
client/mdui_patched/components/divider/style.js
Normal file
@@ -0,0 +1,2 @@
|
||||
import { css } from 'lit';
|
||||
export const style = css `:host{display:block;height:.0625rem;background-color:rgb(var(--mdui-color-surface-variant))}:host([inset]:not([inset=false i])){margin-left:1rem}:host([middle]:not([middle=false i])){margin-left:1rem;margin-right:1rem}:host([vertical]:not([vertical=false i])){height:100%;width:.0625rem}`;
|
||||
Reference in New Issue
Block a user