@m3e/button 1.0.0-rc.1 → 1.0.0-rc.3
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/README.md +1 -2
- package/dist/custom-elements.json +2910 -12
- package/dist/html-custom-data.json +3 -3
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/src/ButtonElement.d.ts +1 -1
- package/dist/src/ButtonElement.d.ts.map +1 -1
- package/package.json +3 -3
- package/cem.config.mjs +0 -16
- package/demo/index.html +0 -105
- package/eslint.config.mjs +0 -13
- package/rollup.config.js +0 -32
- package/src/ButtonElement.ts +0 -629
- package/src/ButtonShape.ts +0 -2
- package/src/ButtonSize.ts +0 -2
- package/src/ButtonVariant.ts +0 -2
- package/src/index.ts +0 -4
- package/src/styles/ButtonSizeStyle.ts +0 -102
- package/src/styles/ButtonSizeToken.ts +0 -180
- package/src/styles/ButtonStyle.ts +0 -191
- package/src/styles/ButtonVariantStyle.ts +0 -170
- package/src/styles/ButtonVariantToken.ts +0 -1165
- package/src/styles/index.ts +0 -3
- package/tsconfig.json +0 -9
|
@@ -4,7 +4,6 @@ import { ButtonSize } from "./ButtonSize";
|
|
|
4
4
|
import { ButtonVariant } from "./ButtonVariant";
|
|
5
5
|
declare const M3eButtonElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").LinkButtonMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").FormSubmitterMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").DisabledInteractiveMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").DisabledMixin> & import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor<import("@m3e/core").AttachInternalsMixin> & typeof LitElement;
|
|
6
6
|
/**
|
|
7
|
-
* @summary
|
|
8
7
|
* A button users interact with to perform an action.
|
|
9
8
|
*
|
|
10
9
|
* @description
|
|
@@ -53,6 +52,7 @@ declare const M3eButtonElement_base: import("node_modules/@m3e/core/dist/src/sha
|
|
|
53
52
|
*
|
|
54
53
|
* @fires input - Dispatched when a toggle button's selected state changes.
|
|
55
54
|
* @fires change - Dispatched when a toggle button's selected state changes.
|
|
55
|
+
* @fires click - Emitted when the element is clicked.
|
|
56
56
|
*
|
|
57
57
|
* @cssprop --m3e-button-extra-small-container-height - Height of the button container, for the extra-small size variant.
|
|
58
58
|
* @cssprop --m3e-button-extra-small-outline-thickness - Thickness of the button outline, for the extra-small size variant.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ButtonElement.d.ts","sourceRoot":"","sources":["../../src/ButtonElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAQ,UAAU,EAAW,cAAc,EAAE,MAAM,KAAK,CAAC;AAwBhF,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;;AAIhD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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o.com>",
|
|
6
6
|
"license": "MIT",
|
|
7
|
-
"homepage": "https://matraic.github.io/m3e/",
|
|
7
|
+
"homepage": "https://matraic.github.io/m3e/#/components/button.html",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "git+https://github.com/matraic/m3e.git"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"clean": "rimraf dist"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@m3e/core": "1.0.0-rc.
|
|
30
|
+
"@m3e/core": "1.0.0-rc.3",
|
|
31
31
|
"lit": "^3.3.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
package/cem.config.mjs
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { customElementVsCodePlugin } from "custom-element-vs-code-integration";
|
|
2
|
-
|
|
3
|
-
export default {
|
|
4
|
-
globs: ["src/**/*.ts"],
|
|
5
|
-
exclude: ["src/**/*.spec.ts"],
|
|
6
|
-
packagejson: true,
|
|
7
|
-
outdir: "dist",
|
|
8
|
-
litelement: true,
|
|
9
|
-
plugins: [
|
|
10
|
-
customElementVsCodePlugin({
|
|
11
|
-
outdir: "dist",
|
|
12
|
-
htmlFileName: "html-custom-data.json",
|
|
13
|
-
cssFileName: "css-custom-data.json",
|
|
14
|
-
}),
|
|
15
|
-
],
|
|
16
|
-
};
|
package/demo/index.html
DELETED
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html lang="en" style="overflow-y: auto">
|
|
3
|
-
<head>
|
|
4
|
-
<title>Button for M3E</title>
|
|
5
|
-
<meta charset="utf-8" />
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
7
|
-
<meta name="description" content="Button for M3E" />
|
|
8
|
-
<base href="./" />
|
|
9
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
10
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
11
|
-
<link
|
|
12
|
-
href="https://fonts.googleapis.com/css2?family=Roboto:ital,wght@0,100..900;1,100..900&display=swap"
|
|
13
|
-
rel="stylesheet"
|
|
14
|
-
/>
|
|
15
|
-
<link
|
|
16
|
-
href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0..1,0"
|
|
17
|
-
rel="stylesheet"
|
|
18
|
-
/>
|
|
19
|
-
<script type="importmap">
|
|
20
|
-
{
|
|
21
|
-
"imports": {
|
|
22
|
-
"lit": "https://cdn.jsdelivr.net/npm/lit@3.3.0/+esm",
|
|
23
|
-
"@m3e/core": "../../core/dist/index.min.js"
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
</script>
|
|
27
|
-
<script type="module" src="../../icon/dist/index.min.js"></script>
|
|
28
|
-
<script type="module" src="../../theme/dist/index.min.js"></script>
|
|
29
|
-
<script type="module" src="../dist/index.min.js"></script>
|
|
30
|
-
<style>
|
|
31
|
-
body {
|
|
32
|
-
font-family: "Roboto";
|
|
33
|
-
}
|
|
34
|
-
*:not(:defined) {
|
|
35
|
-
display: none;
|
|
36
|
-
}
|
|
37
|
-
</style>
|
|
38
|
-
</head>
|
|
39
|
-
<body>
|
|
40
|
-
<m3e-theme strong-focus>
|
|
41
|
-
<m3e-button variant="filled">Filled Button</m3e-button>
|
|
42
|
-
<m3e-button variant="tonal">Tonal Button</m3e-button>
|
|
43
|
-
<m3e-button variant="elevated">Elevated Button</m3e-button>
|
|
44
|
-
<m3e-button variant="outlined">Outlined Button</m3e-button>
|
|
45
|
-
<m3e-button>Text Button</m3e-button>
|
|
46
|
-
<br /><br />
|
|
47
|
-
<m3e-button variant="filled" disabled-interactive>Filled Button</m3e-button>
|
|
48
|
-
<m3e-button variant="tonal" disabled-interactive>Tonal Button</m3e-button>
|
|
49
|
-
<m3e-button variant="elevated" disabled-interactive>Elevated Button</m3e-button>
|
|
50
|
-
<m3e-button variant="outlined" disabled-interactive>Outlined Button</m3e-button>
|
|
51
|
-
<m3e-button disabled-interactive>Text Button</m3e-button>
|
|
52
|
-
<br /><br />
|
|
53
|
-
<m3e-button variant="filled" disabled>Filled Button</m3e-button>
|
|
54
|
-
<m3e-button variant="tonal" disabled>Tonal Button</m3e-button>
|
|
55
|
-
<m3e-button variant="elevated" disabled>Elevated Button</m3e-button>
|
|
56
|
-
<m3e-button variant="outlined" disabled>Outlined Button</m3e-button>
|
|
57
|
-
<m3e-button disabled>Text Button</m3e-button>
|
|
58
|
-
<br /><br />
|
|
59
|
-
<m3e-button variant="filled">
|
|
60
|
-
<m3e-icon name="face" slot="icon"></m3e-icon>
|
|
61
|
-
Button w/ Leading Icon
|
|
62
|
-
</m3e-button>
|
|
63
|
-
<m3e-button variant="filled">
|
|
64
|
-
Button w/ Trailing Icon
|
|
65
|
-
<m3e-icon name="face" slot="trailing-icon"></m3e-icon>
|
|
66
|
-
</m3e-button>
|
|
67
|
-
<br /><br />
|
|
68
|
-
<m3e-button variant="filled" size="extra-small">Extra Small Rounded Button</m3e-button>
|
|
69
|
-
<m3e-button variant="filled" size="small">Small Rounded Button</m3e-button>
|
|
70
|
-
<m3e-button variant="filled" size="medium">Medium Rounded Button</m3e-button>
|
|
71
|
-
<br /><br />
|
|
72
|
-
<m3e-button variant="filled" size="large">Large Rounded Button</m3e-button>
|
|
73
|
-
<m3e-button variant="filled" size="extra-large">Extra Large Rounded Button</m3e-button>
|
|
74
|
-
<br /><br />
|
|
75
|
-
<m3e-button variant="filled" size="extra-small" shape="square">Extra Small Square Button</m3e-button>
|
|
76
|
-
<m3e-button variant="filled" size="small" shape="square">Small Square Button</m3e-button>
|
|
77
|
-
<m3e-button variant="filled" size="medium" shape="square">Medium Square Button</m3e-button>
|
|
78
|
-
<br /><br />
|
|
79
|
-
<m3e-button variant="filled" size="large" shape="square">Large Square Button</m3e-button>
|
|
80
|
-
<m3e-button variant="filled" size="extra-large" shape="square">Extra Large Square Button</m3e-button>
|
|
81
|
-
<br /><br />
|
|
82
|
-
<m3e-button variant="filled" toggle>Filled Round Toggle</m3e-button>
|
|
83
|
-
<m3e-button variant="tonal" toggle>Tonal Round Toggle</m3e-button>
|
|
84
|
-
<m3e-button variant="elevated" toggle>Elevated Round Toggle</m3e-button>
|
|
85
|
-
<m3e-button variant="outlined" toggle>Outlined Round Toggle</m3e-button>
|
|
86
|
-
<br /><br />
|
|
87
|
-
<m3e-button variant="filled" toggle disabled>Disabled filled Round Toggle</m3e-button>
|
|
88
|
-
<m3e-button variant="tonal" toggle disabled>Disabled tonal Round Toggle</m3e-button>
|
|
89
|
-
<m3e-button variant="elevated" toggle disabled>Disabled elevated Round Toggle</m3e-button>
|
|
90
|
-
<m3e-button variant="outlined" toggle disabled>Disabled outlined Round Toggle</m3e-button>
|
|
91
|
-
<br /><br />
|
|
92
|
-
<m3e-button variant="filled" toggle disabled-interactive>Disabled interactive filled Round Toggle</m3e-button>
|
|
93
|
-
<m3e-button variant="tonal" toggle disabled-interactive>Disabled interactive tonal Round Toggle</m3e-button>
|
|
94
|
-
<m3e-button variant="elevated" toggle disabled-interactive>Disabled interactive elevated Round Toggle</m3e-button>
|
|
95
|
-
<m3e-button variant="outlined" toggle disabled-interactive>Disabled interactive outlined Round Toggle</m3e-button>
|
|
96
|
-
<br /><br />
|
|
97
|
-
<m3e-button variant="filled" toggle shape="square">Filled Square Toggle</m3e-button>
|
|
98
|
-
<m3e-button variant="tonal" toggle shape="square">Tonal Square Toggle</m3e-button>
|
|
99
|
-
<m3e-button variant="elevated" toggle shape="square">Elevated Square Toggle</m3e-button>
|
|
100
|
-
<m3e-button variant="outlined" toggle shape="square">Outlined Square Toggle</m3e-button>
|
|
101
|
-
<br /><br />
|
|
102
|
-
<m3e-button href="https://m3.material.io/components/buttons/overview" target="_blank">Link Button</m3e-button>
|
|
103
|
-
</m3e-theme>
|
|
104
|
-
</body>
|
|
105
|
-
</html>
|
package/eslint.config.mjs
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import eslint from "@eslint/js";
|
|
2
|
-
import tseslint from "typescript-eslint";
|
|
3
|
-
import { fileURLToPath } from "url";
|
|
4
|
-
import { dirname } from "path";
|
|
5
|
-
|
|
6
|
-
export default tseslint.config(eslint.configs.recommended, tseslint.configs.recommended, {
|
|
7
|
-
languageOptions: {
|
|
8
|
-
parserOptions: {
|
|
9
|
-
project: true,
|
|
10
|
-
tsconfigRootDir: dirname(fileURLToPath(import.meta.url)),
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
});
|
package/rollup.config.js
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import resolve from "@rollup/plugin-node-resolve";
|
|
2
|
-
import terser from "@rollup/plugin-terser";
|
|
3
|
-
import typescript from "@rollup/plugin-typescript";
|
|
4
|
-
|
|
5
|
-
const banner = `/**
|
|
6
|
-
* @license MIT
|
|
7
|
-
* Copyright (c) 2025 matraic
|
|
8
|
-
* See LICENSE file in the project root for full license text.
|
|
9
|
-
*/`;
|
|
10
|
-
|
|
11
|
-
export default [
|
|
12
|
-
{
|
|
13
|
-
input: "src/index.ts",
|
|
14
|
-
output: [
|
|
15
|
-
{
|
|
16
|
-
file: "dist/index.js",
|
|
17
|
-
format: "esm",
|
|
18
|
-
sourcemap: true,
|
|
19
|
-
banner: banner,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
file: "dist/index.min.js",
|
|
23
|
-
format: "esm",
|
|
24
|
-
sourcemap: true,
|
|
25
|
-
banner: banner,
|
|
26
|
-
plugins: [terser({ mangle: true })],
|
|
27
|
-
},
|
|
28
|
-
],
|
|
29
|
-
external: ["@m3e/core", "lit"],
|
|
30
|
-
plugins: [resolve(), typescript()],
|
|
31
|
-
},
|
|
32
|
-
];
|