@momentum-design/components 0.14.2 → 0.14.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/dist/browser/index.js +53 -28
- package/dist/browser/index.js.map +4 -4
- package/dist/components/marker/index.d.ts +7 -0
- package/dist/components/marker/index.js +4 -0
- package/dist/components/marker/marker.component.d.ts +32 -0
- package/dist/components/marker/marker.component.js +49 -0
- package/dist/components/marker/marker.constants.d.ts +6 -0
- package/dist/components/marker/marker.constants.js +7 -0
- package/dist/components/marker/marker.styles.d.ts +2 -0
- package/dist/components/marker/marker.styles.js +28 -0
- package/dist/components/marker/marker.types.d.ts +3 -0
- package/dist/components/marker/marker.types.js +1 -0
- package/dist/custom-elements.json +71 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/react/marker/index.d.ts +21 -0
- package/dist/react/marker/index.js +30 -0
- package/package.json +1 -1
@@ -0,0 +1,32 @@
|
|
1
|
+
import { CSSResult } from 'lit';
|
2
|
+
import { Component } from '../../models';
|
3
|
+
import type { MarkerVariants } from './marker.types';
|
4
|
+
/**
|
5
|
+
* `mdc-marker`, which is a vertical line and
|
6
|
+
* used to draw attention to specific parts of
|
7
|
+
* the content or to signify important information.
|
8
|
+
*
|
9
|
+
* **Marker Variants**:
|
10
|
+
* - **solid**: Solid marker.
|
11
|
+
* - **striped**: Striped marker.
|
12
|
+
*
|
13
|
+
* @tagname mdc-marker
|
14
|
+
*
|
15
|
+
* @cssproperty --mdc-marker-solid-background-color - Allows customization of the default background color
|
16
|
+
* in solid variant.
|
17
|
+
* @cssproperty --mdc-marker-striped-color - Allows customization of the default stripes in striped variant.
|
18
|
+
* @cssproperty --mdc-marker-striped-background-color - Allows customization of the default background color
|
19
|
+
* in striped variant.
|
20
|
+
* @cssproperty --mdc-marker-width - Allows customization of the default width.
|
21
|
+
*/
|
22
|
+
declare class Marker extends Component {
|
23
|
+
/**
|
24
|
+
* There are two variants of markers, each with a width of 0.25rem:
|
25
|
+
* - **solid**: Solid marker.
|
26
|
+
* - **striped**: Striped marker.
|
27
|
+
* @default solid
|
28
|
+
*/
|
29
|
+
variant: MarkerVariants;
|
30
|
+
static styles: Array<CSSResult>;
|
31
|
+
}
|
32
|
+
export default Marker;
|
@@ -0,0 +1,49 @@
|
|
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
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
8
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
9
|
+
};
|
10
|
+
import { property } from 'lit/decorators.js';
|
11
|
+
import styles from './marker.styles';
|
12
|
+
import { Component } from '../../models';
|
13
|
+
import { MARKER_VARIANTS } from './marker.constants';
|
14
|
+
/**
|
15
|
+
* `mdc-marker`, which is a vertical line and
|
16
|
+
* used to draw attention to specific parts of
|
17
|
+
* the content or to signify important information.
|
18
|
+
*
|
19
|
+
* **Marker Variants**:
|
20
|
+
* - **solid**: Solid marker.
|
21
|
+
* - **striped**: Striped marker.
|
22
|
+
*
|
23
|
+
* @tagname mdc-marker
|
24
|
+
*
|
25
|
+
* @cssproperty --mdc-marker-solid-background-color - Allows customization of the default background color
|
26
|
+
* in solid variant.
|
27
|
+
* @cssproperty --mdc-marker-striped-color - Allows customization of the default stripes in striped variant.
|
28
|
+
* @cssproperty --mdc-marker-striped-background-color - Allows customization of the default background color
|
29
|
+
* in striped variant.
|
30
|
+
* @cssproperty --mdc-marker-width - Allows customization of the default width.
|
31
|
+
*/
|
32
|
+
class Marker extends Component {
|
33
|
+
constructor() {
|
34
|
+
super(...arguments);
|
35
|
+
/**
|
36
|
+
* There are two variants of markers, each with a width of 0.25rem:
|
37
|
+
* - **solid**: Solid marker.
|
38
|
+
* - **striped**: Striped marker.
|
39
|
+
* @default solid
|
40
|
+
*/
|
41
|
+
this.variant = MARKER_VARIANTS.SOLID;
|
42
|
+
}
|
43
|
+
}
|
44
|
+
Marker.styles = [...Component.styles, ...styles];
|
45
|
+
__decorate([
|
46
|
+
property({ type: String, reflect: true }),
|
47
|
+
__metadata("design:type", String)
|
48
|
+
], Marker.prototype, "variant", void 0);
|
49
|
+
export default Marker;
|
@@ -0,0 +1,28 @@
|
|
1
|
+
import { css } from 'lit';
|
2
|
+
const styles = css `
|
3
|
+
:host {
|
4
|
+
--mdc-marker-width: 0.25rem;
|
5
|
+
--mdc-marker-solid-background-color: var(--mds-color-theme-outline-secondary-normal);
|
6
|
+
--mdc-marker-striped-color: var(--mds-color-theme-outline-secondary-normal);
|
7
|
+
--mdc-marker-striped-background-color: transparent;
|
8
|
+
|
9
|
+
width: var(--mdc-marker-width);
|
10
|
+
height: 100%;
|
11
|
+
display: block;
|
12
|
+
}
|
13
|
+
|
14
|
+
:host([variant='solid']) {
|
15
|
+
background: var(--mdc-marker-solid-background-color);
|
16
|
+
}
|
17
|
+
|
18
|
+
:host([variant='striped']) {
|
19
|
+
background: repeating-linear-gradient(
|
20
|
+
135deg,
|
21
|
+
var(--mdc-marker-striped-color),
|
22
|
+
var(--mdc-marker-striped-color) 0.1875rem,
|
23
|
+
var(--mdc-marker-striped-background-color) 0.1875rem,
|
24
|
+
var(--mdc-marker-striped-background-color) 0.375rem
|
25
|
+
);
|
26
|
+
}
|
27
|
+
`;
|
28
|
+
export default [styles];
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -1487,6 +1487,77 @@
|
|
1487
1487
|
}
|
1488
1488
|
]
|
1489
1489
|
},
|
1490
|
+
{
|
1491
|
+
"kind": "javascript-module",
|
1492
|
+
"path": "components/marker/marker.component.js",
|
1493
|
+
"declarations": [
|
1494
|
+
{
|
1495
|
+
"kind": "class",
|
1496
|
+
"description": "`mdc-marker`, which is a vertical line and\nused to draw attention to specific parts of\nthe content or to signify important information.\n\n**Marker Variants**:\n- **solid**: Solid marker.\n- **striped**: Striped marker.",
|
1497
|
+
"name": "Marker",
|
1498
|
+
"cssProperties": [
|
1499
|
+
{
|
1500
|
+
"description": "Allows customization of the default background color in solid variant.",
|
1501
|
+
"name": "--mdc-marker-solid-background-color"
|
1502
|
+
},
|
1503
|
+
{
|
1504
|
+
"description": "Allows customization of the default stripes in striped variant.",
|
1505
|
+
"name": "--mdc-marker-striped-color"
|
1506
|
+
},
|
1507
|
+
{
|
1508
|
+
"description": "Allows customization of the default background color in striped variant.",
|
1509
|
+
"name": "--mdc-marker-striped-background-color"
|
1510
|
+
},
|
1511
|
+
{
|
1512
|
+
"description": "Allows customization of the default width.",
|
1513
|
+
"name": "--mdc-marker-width"
|
1514
|
+
}
|
1515
|
+
],
|
1516
|
+
"members": [
|
1517
|
+
{
|
1518
|
+
"kind": "field",
|
1519
|
+
"name": "variant",
|
1520
|
+
"type": {
|
1521
|
+
"text": "MarkerVariants"
|
1522
|
+
},
|
1523
|
+
"privacy": "public",
|
1524
|
+
"description": "There are two variants of markers, each with a width of 0.25rem:\n- **solid**: Solid marker.\n- **striped**: Striped marker.",
|
1525
|
+
"default": "solid",
|
1526
|
+
"attribute": "variant",
|
1527
|
+
"reflects": true
|
1528
|
+
}
|
1529
|
+
],
|
1530
|
+
"attributes": [
|
1531
|
+
{
|
1532
|
+
"name": "variant",
|
1533
|
+
"type": {
|
1534
|
+
"text": "MarkerVariants"
|
1535
|
+
},
|
1536
|
+
"description": "There are two variants of markers, each with a width of 0.25rem:\n- **solid**: Solid marker.\n- **striped**: Striped marker.",
|
1537
|
+
"default": "solid",
|
1538
|
+
"fieldName": "variant"
|
1539
|
+
}
|
1540
|
+
],
|
1541
|
+
"superclass": {
|
1542
|
+
"name": "Component",
|
1543
|
+
"module": "/src/models"
|
1544
|
+
},
|
1545
|
+
"tagName": "mdc-marker",
|
1546
|
+
"jsDoc": "/**\n * `mdc-marker`, which is a vertical line and\n * used to draw attention to specific parts of\n * the content or to signify important information.\n *\n * **Marker Variants**:\n * - **solid**: Solid marker.\n * - **striped**: Striped marker.\n *\n * @tagname mdc-marker\n *\n * @cssproperty --mdc-marker-solid-background-color - Allows customization of the default background color\n * in solid variant.\n * @cssproperty --mdc-marker-striped-color - Allows customization of the default stripes in striped variant.\n * @cssproperty --mdc-marker-striped-background-color - Allows customization of the default background color\n * in striped variant.\n * @cssproperty --mdc-marker-width - Allows customization of the default width.\n */",
|
1547
|
+
"customElement": true
|
1548
|
+
}
|
1549
|
+
],
|
1550
|
+
"exports": [
|
1551
|
+
{
|
1552
|
+
"kind": "js",
|
1553
|
+
"name": "default",
|
1554
|
+
"declaration": {
|
1555
|
+
"name": "Marker",
|
1556
|
+
"module": "components/marker/marker.component.js"
|
1557
|
+
}
|
1558
|
+
}
|
1559
|
+
]
|
1560
|
+
},
|
1490
1561
|
{
|
1491
1562
|
"kind": "javascript-module",
|
1492
1563
|
"path": "components/presence/presence.component.js",
|
package/dist/index.d.ts
CHANGED
@@ -7,7 +7,8 @@ import Presence from './components/presence';
|
|
7
7
|
import Text from './components/text';
|
8
8
|
import Button from './components/button';
|
9
9
|
import Bullet from './components/bullet';
|
10
|
+
import Marker from './components/marker';
|
10
11
|
import Divider from './components/divider';
|
11
12
|
import type { TextType } from './components/text/text.types';
|
12
|
-
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Divider, };
|
13
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, };
|
13
14
|
export type { TextType, };
|
package/dist/index.js
CHANGED
@@ -7,5 +7,6 @@ import Presence from './components/presence';
|
|
7
7
|
import Text from './components/text';
|
8
8
|
import Button from './components/button';
|
9
9
|
import Bullet from './components/bullet';
|
10
|
+
import Marker from './components/marker';
|
10
11
|
import Divider from './components/divider';
|
11
|
-
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Divider, };
|
12
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, Marker, Divider, };
|
package/dist/react/index.d.ts
CHANGED
@@ -5,6 +5,7 @@ export { default as Button } from './button';
|
|
5
5
|
export { default as Divider } from './divider';
|
6
6
|
export { default as Icon } from './icon';
|
7
7
|
export { default as IconProvider } from './iconprovider';
|
8
|
+
export { default as Marker } from './marker';
|
8
9
|
export { default as Presence } from './presence';
|
9
10
|
export { default as Text } from './text';
|
10
11
|
export { default as ThemeProvider } from './themeprovider';
|
package/dist/react/index.js
CHANGED
@@ -5,6 +5,7 @@ export { default as Button } from './button';
|
|
5
5
|
export { default as Divider } from './divider';
|
6
6
|
export { default as Icon } from './icon';
|
7
7
|
export { default as IconProvider } from './iconprovider';
|
8
|
+
export { default as Marker } from './marker';
|
8
9
|
export { default as Presence } from './presence';
|
9
10
|
export { default as Text } from './text';
|
10
11
|
export { default as ThemeProvider } from './themeprovider';
|
@@ -0,0 +1,21 @@
|
|
1
|
+
import Component from '../../components/marker';
|
2
|
+
/**
|
3
|
+
* `mdc-marker`, which is a vertical line and
|
4
|
+
* used to draw attention to specific parts of
|
5
|
+
* the content or to signify important information.
|
6
|
+
*
|
7
|
+
* **Marker Variants**:
|
8
|
+
* - **solid**: Solid marker.
|
9
|
+
* - **striped**: Striped marker.
|
10
|
+
*
|
11
|
+
* @tagname mdc-marker
|
12
|
+
*
|
13
|
+
* @cssproperty --mdc-marker-solid-background-color - Allows customization of the default background color
|
14
|
+
* in solid variant.
|
15
|
+
* @cssproperty --mdc-marker-striped-color - Allows customization of the default stripes in striped variant.
|
16
|
+
* @cssproperty --mdc-marker-striped-background-color - Allows customization of the default background color
|
17
|
+
* in striped variant.
|
18
|
+
* @cssproperty --mdc-marker-width - Allows customization of the default width.
|
19
|
+
*/
|
20
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
21
|
+
export default reactWrapper;
|
@@ -0,0 +1,30 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/marker';
|
4
|
+
import { TAG_NAME } from '../../components/marker/marker.constants';
|
5
|
+
/**
|
6
|
+
* `mdc-marker`, which is a vertical line and
|
7
|
+
* used to draw attention to specific parts of
|
8
|
+
* the content or to signify important information.
|
9
|
+
*
|
10
|
+
* **Marker Variants**:
|
11
|
+
* - **solid**: Solid marker.
|
12
|
+
* - **striped**: Striped marker.
|
13
|
+
*
|
14
|
+
* @tagname mdc-marker
|
15
|
+
*
|
16
|
+
* @cssproperty --mdc-marker-solid-background-color - Allows customization of the default background color
|
17
|
+
* in solid variant.
|
18
|
+
* @cssproperty --mdc-marker-striped-color - Allows customization of the default stripes in striped variant.
|
19
|
+
* @cssproperty --mdc-marker-striped-background-color - Allows customization of the default background color
|
20
|
+
* in striped variant.
|
21
|
+
* @cssproperty --mdc-marker-width - Allows customization of the default width.
|
22
|
+
*/
|
23
|
+
const reactWrapper = createComponent({
|
24
|
+
tagName: TAG_NAME,
|
25
|
+
elementClass: Component,
|
26
|
+
react: React,
|
27
|
+
events: {},
|
28
|
+
displayName: 'Marker',
|
29
|
+
});
|
30
|
+
export default reactWrapper;
|
package/package.json
CHANGED