@m3e/icon 1.0.0-rc.2 → 1.0.0-rc.4
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 +2 -5
- package/dist/custom-elements.json +24 -29
- package/dist/src/IconElement.d.ts +83 -0
- package/dist/src/IconElement.d.ts.map +1 -0
- package/dist/src/IconGrade.d.ts +3 -0
- package/dist/src/IconGrade.d.ts.map +1 -0
- package/dist/src/IconVariant.d.ts +3 -0
- package/dist/src/IconVariant.d.ts.map +1 -0
- package/dist/src/index.d.ts +4 -0
- package/dist/src/index.d.ts.map +1 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,12 +1,9 @@
|
|
|
1
|
-
your user's browser support variable fonts.
|
|
2
|
-
|
|
3
1
|
# @m3e/icon
|
|
4
2
|
|
|
5
3
|
The `m3e-icon` component makes it easy to use Material Symbols in your application. It supports outlined, rounded, and sharp variants, as well as variable font features like fill, weight, grade, and optical size. For more information, see the [Material Symbol Guide](https://developers.google.com/fonts/docs/material_symbols) and [Material Symbol Library](https://fonts.google.com/icons).
|
|
6
4
|
|
|
7
5
|
The Material Symbols font is the easiest way to incorporate Material Symbols into your application. Using the [Fonts CSS API](https://developers.google.com/fonts/docs/css2#forming_api_urls), you can use variable fonts to optimize icon
|
|
8
|
-
usage within your application. See [Can I Use's Variable Fonts](https://caniuse.com/variable-fonts) to determine whether
|
|
9
|
-
your user's browser support variable fonts.
|
|
6
|
+
usage within your application. See [Can I Use's Variable Fonts](https://caniuse.com/variable-fonts) to determine whether your user's browser support variable fonts.
|
|
10
7
|
|
|
11
8
|
> **This package is part of [M3E](https://github.com/matraic/m3e) monorepo**, a unified suite of Material 3 web components. [Explore the docs](https://matraic.github.io/m3e) to see them in action.
|
|
12
9
|
|
|
@@ -33,7 +30,7 @@ Alternately, you can explicitly reference the `html-custom-data.json` and `css-c
|
|
|
33
30
|
}
|
|
34
31
|
```
|
|
35
32
|
|
|
36
|
-
## 🚀
|
|
33
|
+
## 🚀 Native Module Support
|
|
37
34
|
|
|
38
35
|
This package uses [JavaScript Modules](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules#module_specifiers). To use it directly in a browser without a bundler, use a module script similar to the following.
|
|
39
36
|
|
|
@@ -1069,25 +1069,6 @@
|
|
|
1069
1069
|
"kind": "mixin",
|
|
1070
1070
|
"description": "Mixin that adds support for custom event attributes.",
|
|
1071
1071
|
"name": "EventAttribute",
|
|
1072
|
-
"members": [
|
|
1073
|
-
{
|
|
1074
|
-
"kind": "method",
|
|
1075
|
-
"name": "dispatchEvent",
|
|
1076
|
-
"return": {
|
|
1077
|
-
"type": {
|
|
1078
|
-
"text": "boolean"
|
|
1079
|
-
}
|
|
1080
|
-
},
|
|
1081
|
-
"parameters": [
|
|
1082
|
-
{
|
|
1083
|
-
"name": "event",
|
|
1084
|
-
"type": {
|
|
1085
|
-
"text": "Event"
|
|
1086
|
-
}
|
|
1087
|
-
}
|
|
1088
|
-
]
|
|
1089
|
-
}
|
|
1090
|
-
],
|
|
1091
1072
|
"parameters": [
|
|
1092
1073
|
{
|
|
1093
1074
|
"name": "base",
|
|
@@ -1385,6 +1366,17 @@
|
|
|
1385
1366
|
"description": "Mixin to augment an element with behavior used to submit a form.",
|
|
1386
1367
|
"name": "FormSubmitter",
|
|
1387
1368
|
"members": [
|
|
1369
|
+
{
|
|
1370
|
+
"kind": "field",
|
|
1371
|
+
"name": "formAssociated",
|
|
1372
|
+
"type": {
|
|
1373
|
+
"text": "boolean"
|
|
1374
|
+
},
|
|
1375
|
+
"static": true,
|
|
1376
|
+
"readonly": true,
|
|
1377
|
+
"default": "true",
|
|
1378
|
+
"description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
|
|
1379
|
+
},
|
|
1388
1380
|
{
|
|
1389
1381
|
"kind": "field",
|
|
1390
1382
|
"name": "name",
|
|
@@ -1921,6 +1913,11 @@
|
|
|
1921
1913
|
"kind": "javascript-module",
|
|
1922
1914
|
"path": "../core/src/shared/mixins/Labelled.ts",
|
|
1923
1915
|
"declarations": [
|
|
1916
|
+
{
|
|
1917
|
+
"kind": "variable",
|
|
1918
|
+
"name": "updateLabels",
|
|
1919
|
+
"description": "A symbol through which to update labels to reflect a control's current state."
|
|
1920
|
+
},
|
|
1924
1921
|
{
|
|
1925
1922
|
"kind": "function",
|
|
1926
1923
|
"name": "isLabelledMixin",
|
|
@@ -1970,16 +1967,6 @@
|
|
|
1970
1967
|
},
|
|
1971
1968
|
"description": "The label elements that the element is associated with.",
|
|
1972
1969
|
"readonly": true
|
|
1973
|
-
},
|
|
1974
|
-
{
|
|
1975
|
-
"kind": "method",
|
|
1976
|
-
"name": "[_updateLabels]",
|
|
1977
|
-
"privacy": "private",
|
|
1978
|
-
"return": {
|
|
1979
|
-
"type": {
|
|
1980
|
-
"text": "void"
|
|
1981
|
-
}
|
|
1982
|
-
}
|
|
1983
1970
|
}
|
|
1984
1971
|
],
|
|
1985
1972
|
"parameters": [
|
|
@@ -1994,6 +1981,14 @@
|
|
|
1994
1981
|
}
|
|
1995
1982
|
],
|
|
1996
1983
|
"exports": [
|
|
1984
|
+
{
|
|
1985
|
+
"kind": "js",
|
|
1986
|
+
"name": "updateLabels",
|
|
1987
|
+
"declaration": {
|
|
1988
|
+
"name": "updateLabels",
|
|
1989
|
+
"module": "../core/src/shared/mixins/Labelled.ts"
|
|
1990
|
+
}
|
|
1991
|
+
},
|
|
1997
1992
|
{
|
|
1998
1993
|
"kind": "js",
|
|
1999
1994
|
"name": "isLabelledMixin",
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { CSSResultGroup, LitElement, PropertyValues } from "lit";
|
|
2
|
+
import { IconVariant } from "./IconVariant";
|
|
3
|
+
import { IconGrade } from "./IconGrade";
|
|
4
|
+
declare const M3eIconElement_base: import("node_modules/@m3e/core/dist/src/shared/mixins/Constructor").Constructor & typeof LitElement;
|
|
5
|
+
/**
|
|
6
|
+
* A small symbol used to easily identify an action or category.
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* The `m3e-icon` component makes it easier to use Material Symbols in your application. Material Symbols are Google's newest icons supporting
|
|
10
|
+
* a range of design variants. For more information, see:
|
|
11
|
+
* - {@link https://developers.google.com/fonts/docs/material_symbols|Material Symbol Guide}
|
|
12
|
+
* - {@link https://fonts.google.com/icons|Material Symbol Library}
|
|
13
|
+
*
|
|
14
|
+
* The Material Symbols font is the easiest way to incorporate Material Symbols into your application. Using the
|
|
15
|
+
* {@link https://developers.google.com/fonts/docs/css2#forming_api_urls|Fonts CSS API}, you can use variable fonts to optimize icon
|
|
16
|
+
* usage within your application. See {@link https://caniuse.com/variable-fonts|Can I Use's Variable Fonts} to determine whether
|
|
17
|
+
* your user's browser support variable fonts.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* The following example illustrates showing the `home` icon. The `name` attribute specifies the icon to present.
|
|
21
|
+
* ```html
|
|
22
|
+
* <m3e-icon name="home"></m3e-icon>
|
|
23
|
+
* ```
|
|
24
|
+
* @example
|
|
25
|
+
* The next example illustrates a link used to download a variable font for outlined icons with fill support.
|
|
26
|
+
* ```html
|
|
27
|
+
* <link href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0..1,0" rel="stylesheet"/>
|
|
28
|
+
* ```
|
|
29
|
+
*
|
|
30
|
+
* @tag m3e-icon
|
|
31
|
+
*
|
|
32
|
+
* @attr filled - Whether the icon is filled.
|
|
33
|
+
* @attr grade - The grade of the icon.
|
|
34
|
+
* @attr optical-size - A value from 20 to 48 indicating the optical size of the icon.
|
|
35
|
+
* @attr name - The name of the icon.
|
|
36
|
+
* @attr variant - The appearance variant of the icon.
|
|
37
|
+
* @attr weight - A value from 100 to 700 indicating the weight of the icon.
|
|
38
|
+
*/
|
|
39
|
+
export declare class M3eIconElement extends M3eIconElement_base {
|
|
40
|
+
/** The styles of the element. */
|
|
41
|
+
static styles: CSSResultGroup;
|
|
42
|
+
/** @private */ private readonly _icon?;
|
|
43
|
+
/** The name of the icon. */
|
|
44
|
+
name: string;
|
|
45
|
+
/**
|
|
46
|
+
* The appearance variant of the icon.
|
|
47
|
+
* @default "outlined"
|
|
48
|
+
*/
|
|
49
|
+
variant: IconVariant;
|
|
50
|
+
/**
|
|
51
|
+
* Whether the icon is filled.
|
|
52
|
+
* @default false
|
|
53
|
+
*/
|
|
54
|
+
filled: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* The grade of the icon.
|
|
57
|
+
* @default "medium"
|
|
58
|
+
*/
|
|
59
|
+
grade: IconGrade;
|
|
60
|
+
/**
|
|
61
|
+
* A value from 100 to 700 indicating the weight of the icon.
|
|
62
|
+
* @default 400
|
|
63
|
+
*/
|
|
64
|
+
weight: number;
|
|
65
|
+
/**
|
|
66
|
+
* A value from 20 to 48 indicating the optical size of the icon.
|
|
67
|
+
* @default 24
|
|
68
|
+
*/
|
|
69
|
+
opticalSize: number;
|
|
70
|
+
/** @inheritdoc */
|
|
71
|
+
connectedCallback(): void;
|
|
72
|
+
/** @inheritdoc */
|
|
73
|
+
protected updated(_changedProperties: PropertyValues<this>): void;
|
|
74
|
+
/** @inheritdoc */
|
|
75
|
+
protected render(): unknown;
|
|
76
|
+
}
|
|
77
|
+
declare global {
|
|
78
|
+
interface HTMLElementTagNameMap {
|
|
79
|
+
"m3e-icon": M3eIconElement;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
export {};
|
|
83
|
+
//# sourceMappingURL=IconElement.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconElement.d.ts","sourceRoot":"","sources":["../../src/IconElement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAO,cAAc,EAAQ,UAAU,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAK5E,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;;AAExC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,qBACa,cAAe,SAAQ,mBAAuB;IACzD,iCAAiC;IACjC,OAAgB,MAAM,EAAE,cAAc,CAsCpC;IAEF,eAAe,CAAiB,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAkB;IAEzE,4BAA4B;IAChB,IAAI,EAAE,MAAM,CAAM;IAE9B;;;OAGG;IAC0B,OAAO,EAAE,WAAW,CAAc;IAE/D;;;OAGG;IACyC,MAAM,UAAS;IAE3D;;;OAGG;IACS,KAAK,EAAE,SAAS,CAAY;IAExC;;;OAGG;IACyB,MAAM,SAAO;IAEzC;;;OAGG;IACoD,WAAW,SAAM;IAExE,kBAAkB;IACT,iBAAiB,IAAI,IAAI;IAYlC,kBAAkB;cACC,OAAO,CAAC,kBAAkB,EAAE,cAAc,CAAC,IAAI,CAAC,GAAG,IAAI;IAoB1E,kBAAkB;cACC,MAAM,IAAI,OAAO;CAGrC;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,UAAU,EAAE,cAAc,CAAC;KAC5B;CACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconGrade.d.ts","sourceRoot":"","sources":["../../src/IconGrade.ts"],"names":[],"mappings":"AAAA,gDAAgD;AAChD,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IconVariant.d.ts","sourceRoot":"","sources":["../../src/IconVariant.ts"],"names":[],"mappings":"AAAA,6DAA6D;AAC7D,MAAM,MAAM,WAAW,GAAG,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@m3e/icon",
|
|
3
|
-
"version": "1.0.0-rc.
|
|
3
|
+
"version": "1.0.0-rc.4",
|
|
4
4
|
"description": "Icon for M3E",
|
|
5
5
|
"author": "matraic <matraic@yahoo.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -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.4",
|
|
31
31
|
"lit": "^3.3.0"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|