@vollowx/seele 0.8.0 → 0.8.2
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vollowx/seele",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.2",
|
|
4
4
|
"description": "Standard Extensible Elements. A web components library that can be styled and extended freely, pre-providing components in Material Design 3.",
|
|
5
5
|
"author": "vollowx",
|
|
6
6
|
"license": "MIT",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { isServer } from 'lit';
|
|
1
2
|
import { internals, } from '../mixins/internals-attached.js';
|
|
2
3
|
import { autoUpdate, computePosition, arrow, flip, offset, shift, } from '@floating-ui/dom';
|
|
3
4
|
export function transformOriginFromArrow(placement, arrowData) {
|
|
@@ -34,7 +35,7 @@ export class PopoverController {
|
|
|
34
35
|
this.#openTimer = null;
|
|
35
36
|
this.#closeTimer = null;
|
|
36
37
|
// TODO: Provide the ability to specify an arrow element.
|
|
37
|
-
this._dummyArrow = document.createElement('div');
|
|
38
|
+
this._dummyArrow = isServer ? null : document.createElement('div');
|
|
38
39
|
this.#handleClickOutside = (event) => {
|
|
39
40
|
const trigger = this.config.trigger();
|
|
40
41
|
const popover = this.config.popover();
|
package/src/m3/switch.js
CHANGED
|
@@ -5,7 +5,6 @@ import { Switch } from '../base/switch.js';
|
|
|
5
5
|
import './focus-ring.js';
|
|
6
6
|
import { switchStyles } from './switch-styles.css.js';
|
|
7
7
|
import { targetStyles } from './target-styles.css.js';
|
|
8
|
-
// FIXME: Drag-and-drop breaks the support for working with `<label>`. Temporarily disabled.
|
|
9
8
|
function isRTL() {
|
|
10
9
|
return document.documentElement.dir === 'rtl';
|
|
11
10
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
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:
|
|
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:12px;--_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:64px;min-height:auto}[part=container]{box-sizing:border-box;align-items:center;gap:var(--_gap);height:64px;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);box-shadow:var(--md-toolbar-shadow,var(--md-sys-elevation-shadow-3));border-radius:32px;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%}:host([type=floating]) ::slotted(md-button),:host([type=floating]) ::slotted(md-button-toggle),:host([type=floating]) ::slotted(md-icon-button),:host([type=floating]) ::slotted(md-icon-button-toggle){--md-focus-ring-shape:calc(var(--_h)/2);border-radius:calc(var(--_h)/2)}::slotted(md-button-toggle[variant=tonal]:not(:state(checked))),::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)}`;
|