@vollowx/seele 0.7.0
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/LICENSE +21 -0
- package/README.md +79 -0
- package/package.json +62 -0
- package/src/all.js +19 -0
- package/src/base/button.js +61 -0
- package/src/base/checkbox.js +118 -0
- package/src/base/controllers/list-controller.js +96 -0
- package/src/base/controllers/popover-controller.js +163 -0
- package/src/base/field.js +3 -0
- package/src/base/hidden-styles.css.js +2 -0
- package/src/base/input.js +182 -0
- package/src/base/item.js +7 -0
- package/src/base/list-item.js +54 -0
- package/src/base/menu-item.js +12 -0
- package/src/base/menu-utils.js +111 -0
- package/src/base/menu.js +244 -0
- package/src/base/mixins/attachable.js +71 -0
- package/src/base/mixins/form-associated.js +69 -0
- package/src/base/mixins/internals-attached.js +13 -0
- package/src/base/option.js +17 -0
- package/src/base/select.js +285 -0
- package/src/base/switch.js +86 -0
- package/src/base/tooltip.js +139 -0
- package/src/core/focus-visible.js +13 -0
- package/src/core/shared.d.ts +1 -0
- package/src/core/unique-id.js +11 -0
- package/src/m3/button/common-button-styles.css.js +2 -0
- package/src/m3/button/common-button-toggle-styles.css.js +2 -0
- package/src/m3/button/common-button-toggle.js +69 -0
- package/src/m3/button/common-button.js +65 -0
- package/src/m3/button/icon-button-styles.css.js +2 -0
- package/src/m3/button/icon-button-toggle-styles.css.js +2 -0
- package/src/m3/button/icon-button-toggle.js +57 -0
- package/src/m3/button/icon-button.js +51 -0
- package/src/m3/button/shared-button-styles.css.js +2 -0
- package/src/m3/checkbox-styles.css.js +2 -0
- package/src/m3/checkbox.js +46 -0
- package/src/m3/fab-styles.css.js +2 -0
- package/src/m3/fab.js +48 -0
- package/src/m3/field/field-styles.css.js +2 -0
- package/src/m3/field/field.js +93 -0
- package/src/m3/field/filled-field-styles.css.js +2 -0
- package/src/m3/field/filled-field.js +30 -0
- package/src/m3/field/outlined-field-styles.css.js +2 -0
- package/src/m3/field/outlined-field.js +34 -0
- package/src/m3/focus-ring-styles.css.js +2 -0
- package/src/m3/focus-ring.js +72 -0
- package/src/m3/item-styles.css.js +2 -0
- package/src/m3/item.js +46 -0
- package/src/m3/list-item-styles.css.js +2 -0
- package/src/m3/list-item.js +52 -0
- package/src/m3/list-styles.css.js +2 -0
- package/src/m3/list.js +16 -0
- package/src/m3/menu-item.js +15 -0
- package/src/m3/menu-part-styles.css.js +2 -0
- package/src/m3/menu-styles.css.js +2 -0
- package/src/m3/menu.js +30 -0
- package/src/m3/option.js +15 -0
- package/src/m3/ripple-styles.css.js +2 -0
- package/src/m3/ripple.js +199 -0
- package/src/m3/select/filled-select.js +41 -0
- package/src/m3/select/outlined-select.js +41 -0
- package/src/m3/select/select-styles.css.js +2 -0
- package/src/m3/select/select.js +34 -0
- package/src/m3/switch-styles.css.js +2 -0
- package/src/m3/switch.js +129 -0
- package/src/m3/target-styles.css.js +2 -0
- package/src/m3/text-field/filled-text-field.js +38 -0
- package/src/m3/text-field/outlined-text-field.js +40 -0
- package/src/m3/text-field/text-field-styles.css.js +2 -0
- package/src/m3/toolbar-styles.css.js +2 -0
- package/src/m3/toolbar.js +53 -0
- package/src/m3/tooltip-styles.css.js +2 -0
- package/src/m3/tooltip.js +18 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { Input } from '../../base/input.js';
|
|
5
|
+
import '../field/filled-field.js';
|
|
6
|
+
import { textFieldStyles } from './text-field-styles.css.js';
|
|
7
|
+
let M3FilledTextField = class M3FilledTextField extends Input {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.label = '';
|
|
11
|
+
this.supportingText = '';
|
|
12
|
+
}
|
|
13
|
+
static { this.styles = [textFieldStyles]; }
|
|
14
|
+
render() {
|
|
15
|
+
return html `
|
|
16
|
+
<md-filled-field
|
|
17
|
+
label=${this.label}
|
|
18
|
+
supportingtext=${this.supportingText}
|
|
19
|
+
?populated=${!!this.value}
|
|
20
|
+
?disabled=${this.disabled}
|
|
21
|
+
?focused=${this.focused}
|
|
22
|
+
?error=${this.checkValidity() === false}
|
|
23
|
+
>
|
|
24
|
+
${super.render()}
|
|
25
|
+
</md-filled-field>
|
|
26
|
+
`;
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
__decorate([
|
|
30
|
+
property({ reflect: true })
|
|
31
|
+
], M3FilledTextField.prototype, "label", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
property({ reflect: true })
|
|
34
|
+
], M3FilledTextField.prototype, "supportingText", void 0);
|
|
35
|
+
M3FilledTextField = __decorate([
|
|
36
|
+
customElement('md-filled-text-field')
|
|
37
|
+
], M3FilledTextField);
|
|
38
|
+
export { M3FilledTextField };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { html } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { Input } from '../../base/input.js';
|
|
5
|
+
import '../field/outlined-field.js';
|
|
6
|
+
import { textFieldStyles } from './text-field-styles.css.js';
|
|
7
|
+
let M3OutlinedTextField = class M3OutlinedTextField extends Input {
|
|
8
|
+
constructor() {
|
|
9
|
+
super(...arguments);
|
|
10
|
+
this.label = '';
|
|
11
|
+
this.supportingText = '';
|
|
12
|
+
}
|
|
13
|
+
static { this.styles = [textFieldStyles]; }
|
|
14
|
+
render() {
|
|
15
|
+
return html `
|
|
16
|
+
<md-outlined-field
|
|
17
|
+
label=${this.label}
|
|
18
|
+
supportingtext=${this.supportingText}
|
|
19
|
+
?populated=${!!this.value}
|
|
20
|
+
?disabled=${this.disabled}
|
|
21
|
+
?focused=${this.focused}
|
|
22
|
+
?error=${this.checkValidity() === false}
|
|
23
|
+
>
|
|
24
|
+
${super.render()}
|
|
25
|
+
<slot slot="start" name="start"></slot>
|
|
26
|
+
<slot slot="end" name="end"></slot>
|
|
27
|
+
</md-outlined-field>
|
|
28
|
+
`;
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
__decorate([
|
|
32
|
+
property({ reflect: true })
|
|
33
|
+
], M3OutlinedTextField.prototype, "label", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
property({ reflect: true })
|
|
36
|
+
], M3OutlinedTextField.prototype, "supportingText", void 0);
|
|
37
|
+
M3OutlinedTextField = __decorate([
|
|
38
|
+
customElement('md-outlined-text-field')
|
|
39
|
+
], M3OutlinedTextField);
|
|
40
|
+
export { M3OutlinedTextField };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const textFieldStyles = css `:host{-webkit-user-select:none;user-select:none;display:inline-block}md-filled-field,md-outlined-field{inset:0}[part=input]{color:inherit;font:inherit;background:0 0;border:none;outline:none;width:100%;height:100%;margin:0;padding:0}`;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const toolbarStyles = css `:host{--_padding:16px;--_gap:32px;--_container-color:var(--md-sys-color-surface-container);--_on-color:var(--md-sys-color-on-surface);background-color:color-mix(in srgb,var(--_container-color)var(--_container-opacity,100%),transparent);box-sizing:border-box;color:color-mix(in srgb,var(--_on-color)var(--_on-opacity,100%),transparent);align-items:center;width:100%;height:64px;display:flex}:host([type=floating]){--_padding:8px;--_gap:4px;--_container-color:var(--md-sys-color-surface-container-high);box-shadow:none;background:0 0;width:fit-content;max-width:calc(100% - 32px)}:host([type=floating][orientation=vertical]){flex-direction:column;align-items:stretch;width:56px;min-height:auto}[part=container]{box-sizing:border-box;align-items:center;gap:var(--_gap);height:56px;padding:0 var(--_padding);flex:auto;justify-content:space-between;width:100%;display:flex}:host([type=floating]) [part=container]{background-color:color-mix(in srgb,var(--_container-color)var(--_container-opacity,100%),transparent);border-radius:var(--md-toolbar-shape,28px);box-shadow:var(--md-toolbar-shadow,var(--md-sys-elevation-shadow-3));width:fit-content}[part=fab-slot]{justify-content:flex-end;align-items:center;display:flex}:host(:not([orientation=vertical])) ::slotted([slot=fab]){margin-inline-start:8px}:host([orientation=vertical]) ::slotted([slot=fab]){margin-block-start:8px}:host([type=floating][orientation=vertical]) [part=container]{height:fit-content;padding:var(--_padding)0;flex-direction:column;width:100%}::slotted(md-icon-button),::slotted(md-icon-button-toggle){--md-focus-ring-shape:calc(var(--_h)/2);border-radius:calc(var(--_h)/2)}::slotted(md-icon-button-toggle[variant=tonal]:not(:state(checked))){--_background-color:transparent}:host([color=vibrant]){--_container-color:var(--md-sys-color-primary-container);--_on-color:var(--md-sys-color-on-primary-container)}:host([color=vibrant]) ::slotted(md-icon-button[variant=text]),:host([color=vibrant]) ::slotted(md-icon-button-toggle[variant=tonal]){--_text-color:var(--md-sys-color-on-primary-container)}:host([color=vibrant]) ::slotted(md-icon-button-toggle[variant=tonal]:state(checked)){--_background-color:var(--md-sys-color-surface-container);--_text-color:var(--md-sys-color-on-surface)}`;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { LitElement, html } from 'lit';
|
|
3
|
+
import { customElement, property } from 'lit/decorators.js';
|
|
4
|
+
import { internals, InternalsAttached, } from '../base/mixins/internals-attached.js';
|
|
5
|
+
import { toolbarStyles } from './toolbar-styles.css.js';
|
|
6
|
+
/**
|
|
7
|
+
* @tag md-toolbar
|
|
8
|
+
*
|
|
9
|
+
* @csspart container
|
|
10
|
+
* @csspart fab-slot
|
|
11
|
+
*
|
|
12
|
+
* @slot - toolbar contents
|
|
13
|
+
* @slot fab - FAB element
|
|
14
|
+
*/
|
|
15
|
+
let M3Toolbar = class M3Toolbar extends InternalsAttached(LitElement) {
|
|
16
|
+
static { this.styles = [toolbarStyles]; }
|
|
17
|
+
constructor() {
|
|
18
|
+
super();
|
|
19
|
+
this.type = 'docked';
|
|
20
|
+
this.color = 'standard';
|
|
21
|
+
this.orientation = 'horizontal';
|
|
22
|
+
this[internals].role = 'toolbar';
|
|
23
|
+
this[internals].ariaOrientation = this.orientation;
|
|
24
|
+
}
|
|
25
|
+
updated(changed) {
|
|
26
|
+
if (changed.has('orientation')) {
|
|
27
|
+
this[internals].ariaOrientation = this.orientation;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
render() {
|
|
31
|
+
return html `
|
|
32
|
+
<div part="container">
|
|
33
|
+
<slot></slot>
|
|
34
|
+
</div>
|
|
35
|
+
<div part="fab-slot">
|
|
36
|
+
<slot name="fab"></slot>
|
|
37
|
+
</div>
|
|
38
|
+
`;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
__decorate([
|
|
42
|
+
property({ reflect: true })
|
|
43
|
+
], M3Toolbar.prototype, "type", void 0);
|
|
44
|
+
__decorate([
|
|
45
|
+
property({ reflect: true })
|
|
46
|
+
], M3Toolbar.prototype, "color", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
property({ reflect: true })
|
|
49
|
+
], M3Toolbar.prototype, "orientation", void 0);
|
|
50
|
+
M3Toolbar = __decorate([
|
|
51
|
+
customElement('md-toolbar')
|
|
52
|
+
], M3Toolbar);
|
|
53
|
+
export { M3Toolbar };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
export const tooltipStyles = css `:host{background-color:var(--md-sys-color-inverse-surface);box-sizing:border-box;color:#0000;font:var(--md-sys-typography-body-small);max-width:var(--_max-width,300px);opacity:0;pointer-events:none;z-index:9999;border-radius:4px;align-items:center;width:max-content;min-height:24px;padding:4px 8px;display:flex;position:absolute;top:0;left:0;transform:scaleY(.4)}:host(:state(closed)){display:none}:host(:state(opening)){color:var(--md-sys-color-inverse-on-surface);opacity:1;pointer-events:auto;transition:color linear 67ms 67ms,opacity var(--md-sys-motion-exp-effects-fast-duration)var(--md-sys-motion-exp-effects-fast),transform var(--md-sys-motion-exp-effects-fast-duration)var(--md-sys-motion-exp-effects-fast);transform:scaleY(1)}:host(:state(opened)){color:var(--md-sys-color-inverse-on-surface);opacity:1;pointer-events:auto;transform:scaleY(1)}:host(:state(closing)){color:#0000;opacity:0;transition:color linear 67ms,opacity var(--md-sys-motion-exp-effects-fast-duration)var(--md-sys-motion-exp-effects-fast),transform var(--md-sys-motion-exp-effects-fast-duration)var(--md-sys-motion-exp-effects-fast);transform:scaleY(.4)}`;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { __decorate } from "tslib";
|
|
2
|
+
import { customElement } from 'lit/decorators.js';
|
|
3
|
+
import { Tooltip } from '../base/tooltip.js';
|
|
4
|
+
import { tooltipStyles } from './tooltip-styles.css.js';
|
|
5
|
+
/**
|
|
6
|
+
* @tag md-tooltip
|
|
7
|
+
*/
|
|
8
|
+
let M3Tooltip = class M3Tooltip extends Tooltip {
|
|
9
|
+
constructor() {
|
|
10
|
+
super(...arguments);
|
|
11
|
+
this._durations = { show: 150, hide: 150 };
|
|
12
|
+
}
|
|
13
|
+
static { this.styles = [tooltipStyles]; }
|
|
14
|
+
};
|
|
15
|
+
M3Tooltip = __decorate([
|
|
16
|
+
customElement('md-tooltip')
|
|
17
|
+
], M3Tooltip);
|
|
18
|
+
export { M3Tooltip };
|