@vollowx/seele 0.11.0 → 0.11.1
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 +1 -1
- package/src/m3/button/common-button-toggle.js +6 -1
- package/src/m3/button/icon-button-styles.css.js +1 -1
- package/src/m3/button/icon-button-toggle.js +6 -1
- package/src/m3/button/icon-button.js +6 -1
- package/src/m3/button/shared-button-styles.css.js +1 -1
- package/src/m3/button/shared-button-toggle-styles.css.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vollowx/seele",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
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": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@ export class M3ButtonToggle extends ToggleButton {
|
|
|
30
30
|
`;
|
|
31
31
|
}
|
|
32
32
|
constructor(...args){
|
|
33
|
-
super(...args), this.size = 'small', this.shape = 'rounded', this.variant = 'filled', /**
|
|
33
|
+
super(...args), this.size = 'small', this.shape = 'rounded', this.color = 'primary', this.variant = 'filled', /**
|
|
34
34
|
* Whether to show the icon at the end of the button.
|
|
35
35
|
*/ this.trailingIcon = false;
|
|
36
36
|
}
|
|
@@ -45,6 +45,11 @@ _ts_decorate([
|
|
|
45
45
|
reflect: true
|
|
46
46
|
})
|
|
47
47
|
], M3ButtonToggle.prototype, "shape", void 0);
|
|
48
|
+
_ts_decorate([
|
|
49
|
+
property({
|
|
50
|
+
reflect: true
|
|
51
|
+
})
|
|
52
|
+
], M3ButtonToggle.prototype, "color", void 0);
|
|
48
53
|
_ts_decorate([
|
|
49
54
|
property({
|
|
50
55
|
reflect: true
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const iconButtonStyles = css`@layer icon-button{:host{background-color:color-mix(in srgb, var(--_background-color) var(--_background-opacity,100%), transparent);border-radius:calc(var(--_h) / 2);color:color-mix(in srgb, var(--_text-color) var(--_text-opacity,100%), transparent);transition:border-radius var(--md-sys-motion-std-effects-slow-duration) var(--md-sys-motion-std-effects-slow);width:var(--_h)}:host([size=xsmall]){--_wn:28px;--_ww:40px}:host([size=
|
|
2
|
+
export const iconButtonStyles = css`@layer icon-button{:host{--_wn:32px;--_ww:52px;background-color:color-mix(in srgb, var(--_background-color) var(--_background-opacity,100%), transparent);border-radius:calc(var(--_h) / 2);color:color-mix(in srgb, var(--_text-color) var(--_text-opacity,100%), transparent);transition:border-radius var(--md-sys-motion-std-effects-slow-duration) var(--md-sys-motion-std-effects-slow);width:var(--_h)}:host([size=xsmall]){--_wn:28px;--_ww:40px}:host([size=medium]){--_wn:48px;--_ww:72px}:host([size=large]){--_wn:64px;--_ww:128px}:host([size=xlarge]){--_wn:104px;--_ww:184px}:host([width=narrow]){width:var(--_wn)}:host([width=wide]){width:var(--_ww)}::slotted(*){fill:currentColor;block-size:1em;font-size:var(--_icon-size);inline-size:1em}}@layer override{:host([size=small]){--_icon-size:24px}:host([variant=text]){--_text-color:var(--md-sys-color-on-surface-variant)}:host([variant=text]:state(checked)){--_text-color:var(--_color)}}`;
|
|
@@ -28,7 +28,7 @@ export class M3IconButtonToggle extends ToggleButton {
|
|
|
28
28
|
`;
|
|
29
29
|
}
|
|
30
30
|
constructor(...args){
|
|
31
|
-
super(...args), this.size = 'small', this.variant = 'text', this.width = 'standard';
|
|
31
|
+
super(...args), this.size = 'small', this.color = 'primary', this.variant = 'text', this.width = 'standard';
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
_ts_decorate([
|
|
@@ -36,6 +36,11 @@ _ts_decorate([
|
|
|
36
36
|
reflect: true
|
|
37
37
|
})
|
|
38
38
|
], M3IconButtonToggle.prototype, "size", void 0);
|
|
39
|
+
_ts_decorate([
|
|
40
|
+
property({
|
|
41
|
+
reflect: true
|
|
42
|
+
})
|
|
43
|
+
], M3IconButtonToggle.prototype, "color", void 0);
|
|
39
44
|
_ts_decorate([
|
|
40
45
|
property({
|
|
41
46
|
reflect: true
|
|
@@ -25,7 +25,7 @@ export class M3IconButton extends Button {
|
|
|
25
25
|
`;
|
|
26
26
|
}
|
|
27
27
|
constructor(...args){
|
|
28
|
-
super(...args), this.size = 'small', this.variant = 'text', this.width = 'standard';
|
|
28
|
+
super(...args), this.size = 'small', this.color = 'primary', this.variant = 'text', this.width = 'standard';
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
_ts_decorate([
|
|
@@ -33,6 +33,11 @@ _ts_decorate([
|
|
|
33
33
|
reflect: true
|
|
34
34
|
})
|
|
35
35
|
], M3IconButton.prototype, "size", void 0);
|
|
36
|
+
_ts_decorate([
|
|
37
|
+
property({
|
|
38
|
+
reflect: true
|
|
39
|
+
})
|
|
40
|
+
], M3IconButton.prototype, "color", void 0);
|
|
36
41
|
_ts_decorate([
|
|
37
42
|
property({
|
|
38
43
|
reflect: true
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const sharedButtonStyles = css`@layer common-button,icon-button;@layer
|
|
2
|
+
export const sharedButtonStyles = css`@layer common-button,icon-button;@layer shared{:host{--_on-color:var(--md-sys-color-on-primary);--_color:var(--md-sys-color-primary);--_h:40px;--_icon-size:20px;--_rad-sq:12px;--_rad-pr:8px;--_text-color:var(--_on-color);--_background-color:var(--_color);--_outline-color:var(--md-sys-color-outline-variant);box-sizing:border-box;cursor:pointer;height:var(--_h);-webkit-tap-highlight-color:transparent;-webkit-user-select:none;user-select:none;vertical-align:top;outline:0;flex-shrink:0;justify-content:center;align-items:center;display:inline-flex;position:relative}:host([size=xsmall]){--_h:32px}:host([size=medium]){--_h:56px;--_icon-size:24px;--_rad-sq:16px;--_rad-pr:12px}:host([size=large]){--_h:96px;--_icon-size:32px;--_rad-sq:28px;--_rad-pr:16px}:host([size=xlarge]){--_h:136px;--_icon-size:40px;--_rad-sq:28px;--_rad-pr:16px}:host([color=secondary]){--_on-color:var(--md-sys-color-on-secondary);--_color:var(--md-sys-color-secondary)}:host([color=tertiary]){--_on-color:var(--md-sys-color-on-tertiary);--_color:var(--md-sys-color-tertiary)}:host([variant=tonal]){--_background-color:var(--md-sys-color-secondary-container);--_text-color:var(--md-sys-color-on-secondary-container)}:host([variant=outlined]){--_background-color:transparent;--_text-color:var(--md-sys-color-on-surface-variant);--md-focus-ring-offset:3px;border-color:color-mix(in srgb, var(--_outline-color) var(--_outline-opacity,100%), transparent);box-shadow:none;border-style:solid;border-width:1px}:host([variant=text]){--_text-color:var(--_color);--_background-color:transparent!important}:host([shape=square]){--md-focus-ring-shape:var(--_rad-sq);border-radius:var(--_rad-sq)}}@layer shared-toggle,override;@layer active{:host(:active){--md-focus-ring-shape:var(--_rad-pr);border-radius:var(--_rad-pr)}}@layer disabled{:host([variant=outlined]:disabled){--_background-color:var(--md-sys-color-outline)}:host(:disabled),:host([variant=outlined]:state(checked):disabled){--_background-color:var(--md-sys-color-on-surface);--_background-opacity:10%;--_text-color:var(--md-sys-color-on-surface);--_text-opacity:38%;--_outline-color:var(--md-sys-color-on-surface);--_outline-opacity:10%;box-shadow:none;pointer-events:none}}`;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { css } from 'lit';
|
|
2
|
-
export const sharedButtonToggleStyles = css`@layer
|
|
2
|
+
export const sharedButtonToggleStyles = css`@layer shared-toggle{:host{transition:box-shadow var(--md-sys-motion-std-effects-slow-duration) var(--md-sys-motion-std-effects-slow), border-radius var(--md-sys-motion-std-effects-slow-duration) var(--md-sys-motion-std-effects-slow), background-color var(--md-sys-motion-exp-effects-fast-duration) var(--md-sys-motion-exp-effects-fast), color var(--md-sys-motion-exp-effects-fast-duration) var(--md-sys-motion-exp-effects-fast)}:host(:state(checked)){--md-focus-ring-shape:var(--_rad-sq);border-radius:var(--_rad-sq)}:host(:state(checked)) [part~=unchecked],:host(:not(:state(checked))) [part~=checked]{display:none}:host([variant=filled]:not(:state(checked))){--_background-color:var(--md-sys-color-surface-container);--_text-color:var(--md-sys-color-on-surface-variant)}:host([variant=tonal]:not(:state(checked))){--_background-color:var(--md-sys-color-surface-container-highest);--_text-color:var(--md-sys-color-on-surface-variant)}:host([variant=outlined]:state(checked)){--_background-color:var(--md-sys-color-inverse-surface);--_text-color:var(--md-sys-color-inverse-on-surface);border-width:0}}`;
|