@lit-material/button 0.0.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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 bohdaq
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,47 @@
1
+ # @lit-material/button
2
+
3
+ A Material Design 3 button web component built with [Lit](https://lit.dev/). Part of
4
+ [lit-material](https://github.com/bohdaq/lit-material).
5
+
6
+ ![lit-material button variants: filled, tonal, elevated, outlined, text](./screenshot.png)
7
+
8
+ ## Install
9
+
10
+ ```sh
11
+ npm install @lit-material/button @lit-material/tokens
12
+ ```
13
+
14
+ ## Usage
15
+
16
+ ```html
17
+ <link rel="stylesheet" href="node_modules/@lit-material/tokens/css/index.css" />
18
+ <script type="module">
19
+ import "@lit-material/button";
20
+ </script>
21
+
22
+ <lit-material-button variant="filled">Save</lit-material-button>
23
+ <lit-material-button variant="outlined" disabled>Cancel</lit-material-button>
24
+ <lit-material-button variant="text" href="https://lit.dev">Docs</lit-material-button>
25
+ ```
26
+
27
+ ## API
28
+
29
+ | Property | Attribute | Type | Default |
30
+ | ---------- | ---------- | ----------------------------------------------------------------| ---------- |
31
+ | `variant` | `variant` | `"filled" \| "tonal" \| "elevated" \| "outlined" \| "text"` | `"filled"` |
32
+ | `type` | `type` | `"button" \| "submit" \| "reset"` | `"button"` |
33
+ | `disabled` | `disabled` | `boolean` | `false` |
34
+ | `href` | `href` | `string` | `""` |
35
+ | `target` | `target` | `string` | `""` |
36
+ | `name` | `name` | `string` | `""` |
37
+ | `value` | `value` | `string` | `""` |
38
+ | `form` | `form` | `string \| undefined` | `undefined`|
39
+
40
+ Slots: default (label), `icon` (leading icon).
41
+
42
+ `type="submit"` and `type="reset"` participate in an ancestor `<form>` via
43
+ `ElementInternals`; setting `href` renders an `<a>` instead of a `<button>`.
44
+
45
+ ## License
46
+
47
+ MIT
@@ -0,0 +1,2 @@
1
+ export declare const styles: import("lit").CSSResult;
2
+ //# sourceMappingURL=button-styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-styles.d.ts","sourceRoot":"","sources":["../src/button-styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,MAAM,yBAyIlB,CAAC"}
@@ -0,0 +1,140 @@
1
+ import { css } from "lit";
2
+ export const styles = css `
3
+ :host {
4
+ display: inline-flex;
5
+ outline: none;
6
+ vertical-align: top;
7
+ -webkit-tap-highlight-color: transparent;
8
+ }
9
+
10
+ :host([disabled]) {
11
+ pointer-events: none;
12
+ }
13
+
14
+ .button {
15
+ position: relative;
16
+ display: inline-flex;
17
+ align-items: center;
18
+ justify-content: center;
19
+ gap: 8px;
20
+ box-sizing: border-box;
21
+ height: 40px;
22
+ min-width: 64px;
23
+ padding: 0 24px;
24
+ border: none;
25
+ border-radius: var(--md-sys-shape-corner-full, 9999px);
26
+ background-color: transparent;
27
+ cursor: pointer;
28
+ font-family: var(--md-sys-typescale-label-large-font, Roboto, system-ui, sans-serif);
29
+ font-size: var(--md-sys-typescale-label-large-size, 0.875rem);
30
+ font-weight: var(--md-sys-typescale-label-large-weight, 500);
31
+ line-height: var(--md-sys-typescale-label-large-line-height, 1.25rem);
32
+ letter-spacing: var(--md-sys-typescale-label-large-tracking, 0.00625rem);
33
+ text-decoration: none;
34
+ -webkit-appearance: none;
35
+ appearance: none;
36
+ transition:
37
+ box-shadow 150ms var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1)),
38
+ background-color 150ms var(--md-sys-motion-easing-standard, cubic-bezier(0.2, 0, 0, 1));
39
+ }
40
+
41
+ .button:disabled,
42
+ .button[aria-disabled="true"] {
43
+ cursor: default;
44
+ }
45
+
46
+ .state-layer {
47
+ position: absolute;
48
+ inset: 0;
49
+ border-radius: inherit;
50
+ background-color: currentColor;
51
+ opacity: 0;
52
+ pointer-events: none;
53
+ transition: opacity 100ms linear;
54
+ }
55
+
56
+ .button:hover .state-layer {
57
+ opacity: var(--md-sys-state-hover-state-layer-opacity, 0.08);
58
+ }
59
+
60
+ .state-layer[data-pressed] {
61
+ opacity: var(--md-sys-state-pressed-state-layer-opacity, 0.1);
62
+ }
63
+
64
+ .focus-ring {
65
+ position: absolute;
66
+ inset: -2px;
67
+ border-radius: inherit;
68
+ outline: 3px solid var(--md-sys-color-secondary, #625b71);
69
+ outline-offset: 2px;
70
+ pointer-events: none;
71
+ }
72
+
73
+ .focus-ring[hidden] {
74
+ display: none;
75
+ }
76
+
77
+ .icon ::slotted(*) {
78
+ width: 18px;
79
+ height: 18px;
80
+ }
81
+
82
+ .label {
83
+ position: relative;
84
+ }
85
+
86
+ /* Filled (default): solid primary container. */
87
+ :host([variant="filled"]) .button,
88
+ :host(:not([variant])) .button {
89
+ background-color: var(--md-sys-color-primary, #6750a4);
90
+ color: var(--md-sys-color-on-primary, #ffffff);
91
+ }
92
+
93
+ /* Tonal: solid secondary container, lower emphasis than filled. */
94
+ :host([variant="tonal"]) .button {
95
+ background-color: var(--md-sys-color-secondary-container, #e8def8);
96
+ color: var(--md-sys-color-on-secondary-container, #1d192b);
97
+ }
98
+
99
+ /* Elevated: surface-colored container that floats above the page via shadow. */
100
+ :host([variant="elevated"]) .button {
101
+ background-color: var(--md-sys-color-surface-container-low, #f7f2fa);
102
+ color: var(--md-sys-color-primary, #6750a4);
103
+ box-shadow: var(--md-sys-elevation-level1, 0 1px 2px rgba(0, 0, 0, 0.3));
104
+ }
105
+
106
+ :host([variant="elevated"]) .button:hover {
107
+ box-shadow: var(--md-sys-elevation-level2, 0 1px 3px rgba(0, 0, 0, 0.3));
108
+ }
109
+
110
+ /* Outlined: transparent container with a visible border, for medium emphasis. */
111
+ :host([variant="outlined"]) .button {
112
+ background-color: transparent;
113
+ color: var(--md-sys-color-primary, #6750a4);
114
+ border: 1px solid var(--md-sys-color-outline, #79747e);
115
+ }
116
+
117
+ :host([variant="outlined"][disabled]) .button {
118
+ border-color: color-mix(in srgb, var(--md-sys-color-on-surface, #1c1b1f) 12%, transparent);
119
+ }
120
+
121
+ /* Text: no container at all, lowest emphasis. */
122
+ :host([variant="text"]) .button {
123
+ background-color: transparent;
124
+ color: var(--md-sys-color-primary, #6750a4);
125
+ padding: 0 12px;
126
+ }
127
+
128
+ /* Disabled treatment is identical across variants: on-surface at fixed opacities. */
129
+ :host([disabled]) .button {
130
+ background-color: color-mix(in srgb, var(--md-sys-color-on-surface, #1c1b1f) 12%, transparent);
131
+ color: color-mix(in srgb, var(--md-sys-color-on-surface, #1c1b1f) 38%, transparent);
132
+ box-shadow: none;
133
+ }
134
+
135
+ :host([variant="outlined"][disabled]) .button,
136
+ :host([variant="text"][disabled]) .button {
137
+ background-color: transparent;
138
+ }
139
+ `;
140
+ //# sourceMappingURL=button-styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button-styles.js","sourceRoot":"","sources":["../src/button-styles.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAE1B,MAAM,CAAC,MAAM,MAAM,GAAG,GAAG,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIxB,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { LitElement } from "lit";
2
+ export type ButtonVariant = "filled" | "outlined" | "text" | "elevated" | "tonal";
3
+ export type ButtonType = "button" | "submit" | "reset";
4
+ /**
5
+ * Material Design 3 button.
6
+ *
7
+ * @element lit-material-button
8
+ *
9
+ * @slot - The button's label.
10
+ * @slot icon - An optional leading icon.
11
+ *
12
+ * @csspart button - The native `<button>` or `<a>` element rendered inside the shadow root.
13
+ * @csspart ripple - The state-layer element the hover/press feedback is drawn on.
14
+ * @csspart focus-ring - The focus indicator element.
15
+ */
16
+ export declare class LitMaterialButton extends LitElement {
17
+ static styles: import("lit").CSSResult;
18
+ static shadowRootOptions: ShadowRootInit;
19
+ /** Form-associated custom element: lets this button participate in an ancestor `<form>`. */
20
+ static formAssociated: boolean;
21
+ variant: ButtonVariant;
22
+ type: ButtonType;
23
+ disabled: boolean;
24
+ name: string;
25
+ value: string;
26
+ form?: string;
27
+ /** If set, renders the button as a link (`<a>`) instead of a `<button>`. */
28
+ href: string;
29
+ target: string;
30
+ private readonly buttonElement?;
31
+ private readonly internals;
32
+ private readonly ripple;
33
+ private readonly focusRing;
34
+ private readonly labelId;
35
+ constructor();
36
+ protected firstUpdated(): void;
37
+ render(): import("lit").TemplateResult<1>;
38
+ private handleClick;
39
+ private handleLinkClick;
40
+ }
41
+ declare global {
42
+ interface HTMLElementTagNameMap {
43
+ "lit-material-button": LitMaterialButton;
44
+ }
45
+ }
46
+ //# sourceMappingURL=button.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../src/button.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,UAAU,EAAW,MAAM,KAAK,CAAC;AAKhD,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,UAAU,GAAG,OAAO,CAAC;AAClF,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAIvD;;;;;;;;;;;GAWG;AACH,qBACa,iBAAkB,SAAQ,UAAU;IAC/C,OAAgB,MAAM,0BAAU;IAEhC,OAAgB,iBAAiB,EAAE,cAAc,CAG/C;IAEF,4FAA4F;IAC5F,MAAM,CAAC,cAAc,UAAQ;IAEjB,OAAO,EAAE,aAAa,CAAY;IAClC,IAAI,EAAE,UAAU,CAAY;IACI,QAAQ,UAAS;IACjD,IAAI,SAAM;IACV,KAAK,SAAM;IACM,IAAI,CAAC,EAAE,MAAM,CAAC;IAE3C,4EAA4E;IAChE,IAAI,SAAM;IACV,MAAM,SAAM;IAEN,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAC,CAAwC;IAEzF,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAmB;IAC7C,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA8B;IACrD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAiC;IAC3D,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAkD;;cAOvD,YAAY,IAAI,IAAI;IAM9B,MAAM;IA0Cf,OAAO,CAAC,WAAW;IAanB,OAAO,CAAC,eAAe;CAMxB;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,qBAAqB,EAAE,iBAAiB,CAAC;KAC1C;CACF"}
package/dist/button.js ADDED
@@ -0,0 +1,142 @@
1
+ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
+ else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
6
+ };
7
+ import { html, LitElement, nothing } from "lit";
8
+ import { customElement, property, query } from "lit/decorators.js";
9
+ import { FocusRingController, RippleController } from "@lit-material/core";
10
+ import { styles } from "./button-styles.js";
11
+ let instanceCount = 0;
12
+ /**
13
+ * Material Design 3 button.
14
+ *
15
+ * @element lit-material-button
16
+ *
17
+ * @slot - The button's label.
18
+ * @slot icon - An optional leading icon.
19
+ *
20
+ * @csspart button - The native `<button>` or `<a>` element rendered inside the shadow root.
21
+ * @csspart ripple - The state-layer element the hover/press feedback is drawn on.
22
+ * @csspart focus-ring - The focus indicator element.
23
+ */
24
+ let LitMaterialButton = class LitMaterialButton extends LitElement {
25
+ static { this.styles = styles; }
26
+ static { this.shadowRootOptions = {
27
+ ...LitElement.shadowRootOptions,
28
+ delegatesFocus: true,
29
+ }; }
30
+ /** Form-associated custom element: lets this button participate in an ancestor `<form>`. */
31
+ static { this.formAssociated = true; }
32
+ constructor() {
33
+ super();
34
+ this.variant = "filled";
35
+ this.type = "button";
36
+ this.disabled = false;
37
+ this.name = "";
38
+ this.value = "";
39
+ /** If set, renders the button as a link (`<a>`) instead of a `<button>`. */
40
+ this.href = "";
41
+ this.target = "";
42
+ this.ripple = new RippleController(this);
43
+ this.focusRing = new FocusRingController(this);
44
+ this.labelId = `lit-material-button-label-${++instanceCount}`;
45
+ this.internals = this.attachInternals();
46
+ }
47
+ firstUpdated() {
48
+ if (this.buttonElement) {
49
+ this.ripple.attach(this.buttonElement);
50
+ }
51
+ }
52
+ render() {
53
+ const content = html `
54
+ <div class="focus-ring" part="focus-ring" ?hidden=${!this.focusRing.visible}></div>
55
+ <div class="state-layer" part="ripple"></div>
56
+ <slot name="icon" class="icon"></slot>
57
+ <span class="label" id=${this.labelId}><slot></slot></span>
58
+ `;
59
+ if (this.href) {
60
+ return html `
61
+ <a
62
+ class="button"
63
+ part="button"
64
+ href=${this.disabled ? nothing : this.href}
65
+ target=${this.target || nothing}
66
+ rel=${this.target === "_blank" ? "noopener noreferrer" : nothing}
67
+ aria-disabled=${this.disabled ? "true" : nothing}
68
+ aria-labelledby=${this.labelId}
69
+ tabindex=${this.disabled ? "-1" : "0"}
70
+ @click=${this.handleLinkClick}
71
+ >
72
+ ${content}
73
+ </a>
74
+ `;
75
+ }
76
+ return html `
77
+ <button
78
+ class="button"
79
+ part="button"
80
+ type="button"
81
+ ?disabled=${this.disabled}
82
+ name=${this.name || nothing}
83
+ value=${this.value || nothing}
84
+ aria-labelledby=${this.labelId}
85
+ @click=${this.handleClick}
86
+ >
87
+ ${content}
88
+ </button>
89
+ `;
90
+ }
91
+ handleClick(event) {
92
+ if (this.disabled) {
93
+ event.preventDefault();
94
+ event.stopImmediatePropagation();
95
+ return;
96
+ }
97
+ if (this.type === "submit") {
98
+ this.internals.form?.requestSubmit();
99
+ }
100
+ else if (this.type === "reset") {
101
+ this.internals.form?.reset();
102
+ }
103
+ }
104
+ handleLinkClick(event) {
105
+ if (this.disabled) {
106
+ event.preventDefault();
107
+ event.stopImmediatePropagation();
108
+ }
109
+ }
110
+ };
111
+ __decorate([
112
+ property()
113
+ ], LitMaterialButton.prototype, "variant", void 0);
114
+ __decorate([
115
+ property()
116
+ ], LitMaterialButton.prototype, "type", void 0);
117
+ __decorate([
118
+ property({ type: Boolean, reflect: true })
119
+ ], LitMaterialButton.prototype, "disabled", void 0);
120
+ __decorate([
121
+ property()
122
+ ], LitMaterialButton.prototype, "name", void 0);
123
+ __decorate([
124
+ property()
125
+ ], LitMaterialButton.prototype, "value", void 0);
126
+ __decorate([
127
+ property({ reflect: true })
128
+ ], LitMaterialButton.prototype, "form", void 0);
129
+ __decorate([
130
+ property()
131
+ ], LitMaterialButton.prototype, "href", void 0);
132
+ __decorate([
133
+ property()
134
+ ], LitMaterialButton.prototype, "target", void 0);
135
+ __decorate([
136
+ query(".button")
137
+ ], LitMaterialButton.prototype, "buttonElement", void 0);
138
+ LitMaterialButton = __decorate([
139
+ customElement("lit-material-button")
140
+ ], LitMaterialButton);
141
+ export { LitMaterialButton };
142
+ //# sourceMappingURL=button.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"button.js","sourceRoot":"","sources":["../src/button.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ export { LitMaterialButton, type ButtonVariant, type ButtonType } from "./button.js";
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,aAAa,EAAE,KAAK,UAAU,EAAE,MAAM,aAAa,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,2 @@
1
+ export { LitMaterialButton } from "./button.js";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAuC,MAAM,aAAa,CAAC"}
package/package.json ADDED
@@ -0,0 +1,59 @@
1
+ {
2
+ "name": "@lit-material/button",
3
+ "version": "0.0.1",
4
+ "description": "Material Design 3 button web component (filled, outlined, text, elevated, tonal).",
5
+ "license": "MIT",
6
+ "author": {
7
+ "name": "bohdaq",
8
+ "email": "bohdaq@gmail.com",
9
+ "url": "https://github.com/bohdaq"
10
+ },
11
+ "homepage": "https://github.com/bohdaq/lit-material#readme",
12
+ "bugs": "https://github.com/bohdaq/lit-material/issues",
13
+ "repository": {
14
+ "type": "git",
15
+ "url": "git+ssh://git@github.com/bohdaq/lit-material.git",
16
+ "directory": "packages/button"
17
+ },
18
+ "keywords": [
19
+ "lit",
20
+ "web-components",
21
+ "lit-material",
22
+ "material-design",
23
+ "material-design-3",
24
+ "button"
25
+ ],
26
+ "type": "module",
27
+ "main": "./dist/index.js",
28
+ "types": "./dist/index.d.ts",
29
+ "exports": {
30
+ ".": {
31
+ "types": "./dist/index.d.ts",
32
+ "default": "./dist/index.js"
33
+ }
34
+ },
35
+ "files": [
36
+ "dist"
37
+ ],
38
+ "publishConfig": {
39
+ "access": "public"
40
+ },
41
+ "dependencies": {
42
+ "lit": "^3.2.0",
43
+ "@lit-material/tokens": "0.0.1",
44
+ "@lit-material/core": "0.0.1"
45
+ },
46
+ "devDependencies": {
47
+ "@open-wc/testing": "^4.0.0",
48
+ "@web/dev-server-esbuild": "^1.0.0",
49
+ "@web/test-runner": "^0.19.0",
50
+ "@web/test-runner-commands": "^0.9.0",
51
+ "@web/test-runner-playwright": "^0.11.0",
52
+ "typescript": "^5.7.0"
53
+ },
54
+ "scripts": {
55
+ "build": "tsc -p tsconfig.json",
56
+ "typecheck": "tsc -p tsconfig.json --noEmit",
57
+ "test": "web-test-runner"
58
+ }
59
+ }