@m3e/theme 1.0.0-rc.2 → 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.
@@ -1192,25 +1192,6 @@
1192
1192
  "kind": "mixin",
1193
1193
  "description": "Mixin that adds support for custom event attributes.",
1194
1194
  "name": "EventAttribute",
1195
- "members": [
1196
- {
1197
- "kind": "method",
1198
- "name": "dispatchEvent",
1199
- "return": {
1200
- "type": {
1201
- "text": "boolean"
1202
- }
1203
- },
1204
- "parameters": [
1205
- {
1206
- "name": "event",
1207
- "type": {
1208
- "text": "Event"
1209
- }
1210
- }
1211
- ]
1212
- }
1213
- ],
1214
1195
  "parameters": [
1215
1196
  {
1216
1197
  "name": "base",
@@ -1508,6 +1489,17 @@
1508
1489
  "description": "Mixin to augment an element with behavior used to submit a form.",
1509
1490
  "name": "FormSubmitter",
1510
1491
  "members": [
1492
+ {
1493
+ "kind": "field",
1494
+ "name": "formAssociated",
1495
+ "type": {
1496
+ "text": "boolean"
1497
+ },
1498
+ "static": true,
1499
+ "readonly": true,
1500
+ "default": "true",
1501
+ "description": "Indicates that this custom element participates in form submission, validation, and form state restoration."
1502
+ },
1511
1503
  {
1512
1504
  "kind": "field",
1513
1505
  "name": "name",
@@ -0,0 +1,3 @@
1
+ /** Specifies schemes for which to generate a color palette. */
2
+ export type ColorScheme = "light" | "dark" | "auto";
3
+ //# sourceMappingURL=ColorScheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ColorScheme.d.ts","sourceRoot":"","sources":["../../src/ColorScheme.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Specifies the contrast level in which to generate a color palette. */
2
+ export type ContrastLevel = "high" | "medium" | "standard";
3
+ //# sourceMappingURL=ContrastLevel.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContrastLevel.d.ts","sourceRoot":"","sources":["../../src/ContrastLevel.ts"],"names":[],"mappings":"AAAA,yEAAyE;AACzE,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,QAAQ,GAAG,UAAU,CAAC"}
@@ -0,0 +1,3 @@
1
+ /** Specifies the possible motion schemes of a theme. */
2
+ export type MotionScheme = "standard" | "expressive";
3
+ //# sourceMappingURL=MotionScheme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MotionScheme.d.ts","sourceRoot":"","sources":["../../src/MotionScheme.ts"],"names":[],"mappings":"AAAA,wDAAwD;AACxD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,YAAY,CAAC"}
@@ -0,0 +1,98 @@
1
+ import { CSSResultGroup, LitElement, PropertyValues } from "lit";
2
+ import { ColorScheme } from "./ColorScheme";
3
+ import { ContrastLevel } from "./ContrastLevel";
4
+ import { ThemeVariant } from "./ThemeVariant";
5
+ import { MotionScheme } from "./MotionScheme";
6
+ /**
7
+ * A non-visual element responsible for application-level theming.
8
+ *
9
+ * @description
10
+ * The `m3e-theme` component is a non-visual element used to apply dynamic color, expressive motion, density, and strong focus indicators
11
+ * to nested, theme-aware elements.
12
+ *
13
+ * When `m3e-theme` is nested directly beneath the `<body>` of a document, the `<body>`'s `background-color` is set to the computed
14
+ * value of `--md-sys-color-background` and `color` is set to the computed value of `--md-sys-color-on-background`. In addition,
15
+ * the document's `scrollbar-color` is set to the computed values of `--m3e-scrollbar-thumb-color` and `--m3e-scrollbar-track-color` which,
16
+ * when supported, cascades to all viewport scrollbars.
17
+ *
18
+ * @example
19
+ * The following example adds a top-level `m3e-theme` directly beneath a document's `<body>` element to
20
+ * apply application-level theming. In this example, `color` and `scheme` are used to create a dynamic color
21
+ * palette which automatically adjusts to a user's light or dark color preference. In addition, expressive motion
22
+ * and strong focus indicators are enabled.
23
+ *
24
+ * ```html
25
+ * <body>
26
+ * <m3e-theme color="#7D67BE" scheme="auto" motion="expressive" strong-focus>
27
+ * <!-- Normal body content here. -->
28
+ * </m3e-theme>
29
+ * <body/>
30
+ * ```
31
+ * @tag m3e-theme
32
+ *
33
+ * @attr color - The hex color from which to derive dynamic color palettes.
34
+ * @attr contrast - The contrast level of the theme.
35
+ * @attr density - The density scale (0, -1, -2).
36
+ * @attr scheme - The color scheme of the theme.
37
+ * @attr strong-focus - Whether to enable strong focus indicators.
38
+ * @attr variant - The color variant of the theme.
39
+ *
40
+ * @fires change - Dispatched when the theme changes.
41
+ */
42
+ export declare class M3eThemeElement extends LitElement {
43
+ #private;
44
+ /** The styles of the element. */
45
+ static styles: CSSResultGroup;
46
+ /**
47
+ * The hex color from which to derive dynamic color palettes.
48
+ * @default "#7D67BE"
49
+ */
50
+ color: string;
51
+ /**
52
+ * The color variant of the theme.
53
+ * @default "vibrant"
54
+ */
55
+ variant: ThemeVariant;
56
+ /**
57
+ * The color scheme of the theme.
58
+ * @default "auto"
59
+ */
60
+ scheme: ColorScheme;
61
+ /**
62
+ * The contrast level of the theme.
63
+ * @default "standard"
64
+ */
65
+ contrast: ContrastLevel;
66
+ /**
67
+ * Whether to enable strong focus indicators.
68
+ * @default false
69
+ */
70
+ strongFocus: boolean;
71
+ /**
72
+ * The density scale (0, -1, -2).
73
+ * @default 0
74
+ */
75
+ density: number;
76
+ /** The motion scheme.
77
+ * @default "standard"
78
+ */
79
+ motion: MotionScheme;
80
+ /** Whether a dark theme is applied. */
81
+ get isDark(): boolean;
82
+ /** @inheritdoc */
83
+ connectedCallback(): void;
84
+ /** @inheritdoc */
85
+ disconnectedCallback(): void;
86
+ /** @inheritdoc */
87
+ protected updated(_changedProperties: PropertyValues<this>): void;
88
+ /** @inheritdoc */
89
+ protected firstUpdated(_changedProperties: PropertyValues): void;
90
+ /** @inheritdoc */
91
+ protected render(): unknown;
92
+ }
93
+ declare global {
94
+ interface HTMLElementTagNameMap {
95
+ "m3e-theme": M3eThemeElement;
96
+ }
97
+ }
98
+ //# sourceMappingURL=ThemeElement.d.ts.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
+ /** Specifies the color variants of a theme. */
2
+ export type ThemeVariant = "content" | "expressive" | "fidelity" | "fruit-salad" | "monochrome" | "neutral" | "rainbow" | "tonal-spot" | "vibrant";
3
+ //# sourceMappingURL=ThemeVariant.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeVariant.d.ts","sourceRoot":"","sources":["../../src/ThemeVariant.ts"],"names":[],"mappings":"AAAA,+CAA+C;AAC/C,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,YAAY,GACZ,UAAU,GACV,aAAa,GACb,YAAY,GACZ,SAAS,GACT,SAAS,GACT,YAAY,GACZ,SAAS,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./ColorScheme";
2
+ export * from "./ContrastLevel";
3
+ export * from "./MotionScheme";
4
+ export * from "./ThemeElement";
5
+ export * from "./ThemeVariant";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,gBAAgB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@m3e/theme",
3
- "version": "1.0.0-rc.2",
3
+ "version": "1.0.0-rc.3",
4
4
  "description": "Theme for M3E",
5
5
  "author": "matraic <matraic@yahoo.com>",
6
6
  "license": "MIT",
@@ -31,7 +31,7 @@
31
31
  "@material/material-color-utilities": "^0.3.0"
32
32
  },
33
33
  "peerDependencies": {
34
- "@m3e/core": "1.0.0-rc.2",
34
+ "@m3e/core": "1.0.0-rc.3",
35
35
  "lit": "^3.3.0"
36
36
  },
37
37
  "devDependencies": {