@momentum-design/components 0.9.11 → 0.10.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/browser/index.js +44 -23
- package/dist/browser/index.js.map +4 -4
- package/dist/components/bullet/bullet.component.d.ts +25 -0
- package/dist/components/bullet/bullet.component.js +42 -0
- package/dist/components/bullet/bullet.constants.d.ts +7 -0
- package/dist/components/bullet/bullet.constants.js +8 -0
- package/dist/components/bullet/bullet.styles.d.ts +2 -0
- package/dist/components/bullet/bullet.styles.js +24 -0
- package/dist/components/bullet/bullet.types.d.ts +4 -0
- package/dist/components/bullet/bullet.types.js +1 -0
- package/dist/components/bullet/index.d.ts +7 -0
- package/dist/components/bullet/index.js +4 -0
- package/dist/custom-elements.json +71 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/react/bullet/index.d.ts +14 -0
- package/dist/react/bullet/index.js +23 -0
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/package.json +1 -1
@@ -0,0 +1,25 @@
|
|
1
|
+
import type { CSSResult } from 'lit';
|
2
|
+
import { Component } from '../../models';
|
3
|
+
import type { Size } from './bullet.types';
|
4
|
+
/**
|
5
|
+
* Bullet component, which is a visual marker
|
6
|
+
* and be used to organize and present items in a list format.
|
7
|
+
*
|
8
|
+
* @tagname mdc-bullet
|
9
|
+
*
|
10
|
+
* @cssproperty --mdc-bullet-background-color - background color of the bullet
|
11
|
+
* @cssproperty --mdc-bullet-size-small - small size value of the bullet
|
12
|
+
* @cssproperty --mdc-bullet-size-medium - medium size value of the bullet
|
13
|
+
* @cssproperty --mdc-bullet-size-large - large size value of the bullet
|
14
|
+
*/
|
15
|
+
declare class Bullet extends Component {
|
16
|
+
/**
|
17
|
+
* Size of the bullet
|
18
|
+
*
|
19
|
+
* Possible values: 'small', 'medium', 'large'
|
20
|
+
* @default small
|
21
|
+
*/
|
22
|
+
size: Size;
|
23
|
+
static styles: Array<CSSResult>;
|
24
|
+
}
|
25
|
+
export default Bullet;
|
@@ -0,0 +1,42 @@
|
|
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 './bullet.styles';
|
12
|
+
import { Component } from '../../models';
|
13
|
+
import { SIZE } from './bullet.constants';
|
14
|
+
/**
|
15
|
+
* Bullet component, which is a visual marker
|
16
|
+
* and be used to organize and present items in a list format.
|
17
|
+
*
|
18
|
+
* @tagname mdc-bullet
|
19
|
+
*
|
20
|
+
* @cssproperty --mdc-bullet-background-color - background color of the bullet
|
21
|
+
* @cssproperty --mdc-bullet-size-small - small size value of the bullet
|
22
|
+
* @cssproperty --mdc-bullet-size-medium - medium size value of the bullet
|
23
|
+
* @cssproperty --mdc-bullet-size-large - large size value of the bullet
|
24
|
+
*/
|
25
|
+
class Bullet extends Component {
|
26
|
+
constructor() {
|
27
|
+
super(...arguments);
|
28
|
+
/**
|
29
|
+
* Size of the bullet
|
30
|
+
*
|
31
|
+
* Possible values: 'small', 'medium', 'large'
|
32
|
+
* @default small
|
33
|
+
*/
|
34
|
+
this.size = SIZE.SMALL;
|
35
|
+
}
|
36
|
+
}
|
37
|
+
Bullet.styles = [...Component.styles, ...styles];
|
38
|
+
__decorate([
|
39
|
+
property({ type: String, reflect: true }),
|
40
|
+
__metadata("design:type", String)
|
41
|
+
], Bullet.prototype, "size", void 0);
|
42
|
+
export default Bullet;
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { css } from 'lit';
|
2
|
+
const styles = css `
|
3
|
+
:host {
|
4
|
+
--mdc-bullet-background-color: var(--mds-color-theme-outline-secondary-normal);
|
5
|
+
--mdc-bullet-size-small: 0.25rem;
|
6
|
+
--mdc-bullet-size-medium: 0.5rem;
|
7
|
+
--mdc-bullet-size-large: 1rem;
|
8
|
+
|
9
|
+
border-radius: 50%;
|
10
|
+
display: block;
|
11
|
+
aspect-ratio: 1;
|
12
|
+
background-color: var(--mdc-bullet-background-color);
|
13
|
+
}
|
14
|
+
:host([size="small"]) {
|
15
|
+
height: var(--mdc-bullet-size-small);
|
16
|
+
}
|
17
|
+
:host([size="medium"]) {
|
18
|
+
height: var(--mdc-bullet-size-medium);
|
19
|
+
}
|
20
|
+
:host([size="large"]) {
|
21
|
+
height: var(--mdc-bullet-size-large);
|
22
|
+
}
|
23
|
+
`;
|
24
|
+
export default [styles];
|
@@ -0,0 +1 @@
|
|
1
|
+
export {};
|
@@ -114,6 +114,77 @@
|
|
114
114
|
}
|
115
115
|
]
|
116
116
|
},
|
117
|
+
{
|
118
|
+
"kind": "javascript-module",
|
119
|
+
"path": "components/bullet/bullet.component.js",
|
120
|
+
"declarations": [
|
121
|
+
{
|
122
|
+
"kind": "class",
|
123
|
+
"description": "Bullet component, which is a visual marker\nand be used to organize and present items in a list format.",
|
124
|
+
"name": "Bullet",
|
125
|
+
"cssProperties": [
|
126
|
+
{
|
127
|
+
"description": "background color of the bullet",
|
128
|
+
"name": "--mdc-bullet-background-color"
|
129
|
+
},
|
130
|
+
{
|
131
|
+
"description": "small size value of the bullet",
|
132
|
+
"name": "--mdc-bullet-size-small"
|
133
|
+
},
|
134
|
+
{
|
135
|
+
"description": "medium size value of the bullet",
|
136
|
+
"name": "--mdc-bullet-size-medium"
|
137
|
+
},
|
138
|
+
{
|
139
|
+
"description": "large size value of the bullet",
|
140
|
+
"name": "--mdc-bullet-size-large"
|
141
|
+
}
|
142
|
+
],
|
143
|
+
"members": [
|
144
|
+
{
|
145
|
+
"kind": "field",
|
146
|
+
"name": "size",
|
147
|
+
"type": {
|
148
|
+
"text": "Size"
|
149
|
+
},
|
150
|
+
"privacy": "public",
|
151
|
+
"description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
|
152
|
+
"default": "small",
|
153
|
+
"attribute": "size",
|
154
|
+
"reflects": true
|
155
|
+
}
|
156
|
+
],
|
157
|
+
"attributes": [
|
158
|
+
{
|
159
|
+
"name": "size",
|
160
|
+
"type": {
|
161
|
+
"text": "Size"
|
162
|
+
},
|
163
|
+
"description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
|
164
|
+
"default": "small",
|
165
|
+
"fieldName": "size"
|
166
|
+
}
|
167
|
+
],
|
168
|
+
"superclass": {
|
169
|
+
"name": "Component",
|
170
|
+
"module": "/src/models"
|
171
|
+
},
|
172
|
+
"tagName": "mdc-bullet",
|
173
|
+
"jsDoc": "/**\n * Bullet component, which is a visual marker\n * and be used to organize and present items in a list format.\n *\n * @tagname mdc-bullet\n *\n * @cssproperty --mdc-bullet-background-color - background color of the bullet\n * @cssproperty --mdc-bullet-size-small - small size value of the bullet\n * @cssproperty --mdc-bullet-size-medium - medium size value of the bullet\n * @cssproperty --mdc-bullet-size-large - large size value of the bullet\n*/",
|
174
|
+
"customElement": true
|
175
|
+
}
|
176
|
+
],
|
177
|
+
"exports": [
|
178
|
+
{
|
179
|
+
"kind": "js",
|
180
|
+
"name": "default",
|
181
|
+
"declaration": {
|
182
|
+
"name": "Bullet",
|
183
|
+
"module": "components/bullet/bullet.component.js"
|
184
|
+
}
|
185
|
+
}
|
186
|
+
]
|
187
|
+
},
|
117
188
|
{
|
118
189
|
"kind": "javascript-module",
|
119
190
|
"path": "components/badge/badge.component.js",
|
package/dist/index.d.ts
CHANGED
@@ -6,6 +6,7 @@ import Badge from './components/badge';
|
|
6
6
|
import Presence from './components/presence';
|
7
7
|
import Text from './components/text';
|
8
8
|
import Button from './components/button';
|
9
|
+
import Bullet from './components/bullet';
|
9
10
|
import type { TextType } from './components/text/text.types';
|
10
|
-
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, };
|
11
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, };
|
11
12
|
export type { TextType, };
|
package/dist/index.js
CHANGED
@@ -6,4 +6,5 @@ import Badge from './components/badge';
|
|
6
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
|
+
export { ThemeProvider, Icon, IconProvider, Avatar, Badge, Presence, Text, Button, Bullet, };
|
@@ -0,0 +1,14 @@
|
|
1
|
+
import Component from '../../components/bullet';
|
2
|
+
/**
|
3
|
+
* Bullet component, which is a visual marker
|
4
|
+
* and be used to organize and present items in a list format.
|
5
|
+
*
|
6
|
+
* @tagname mdc-bullet
|
7
|
+
*
|
8
|
+
* @cssproperty --mdc-bullet-background-color - background color of the bullet
|
9
|
+
* @cssproperty --mdc-bullet-size-small - small size value of the bullet
|
10
|
+
* @cssproperty --mdc-bullet-size-medium - medium size value of the bullet
|
11
|
+
* @cssproperty --mdc-bullet-size-large - large size value of the bullet
|
12
|
+
*/
|
13
|
+
declare const reactWrapper: import("@lit/react").ReactWebComponent<Component, {}>;
|
14
|
+
export default reactWrapper;
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import { createComponent } from '@lit/react';
|
3
|
+
import Component from '../../components/bullet';
|
4
|
+
import { TAG_NAME } from '../../components/bullet/bullet.constants';
|
5
|
+
/**
|
6
|
+
* Bullet component, which is a visual marker
|
7
|
+
* and be used to organize and present items in a list format.
|
8
|
+
*
|
9
|
+
* @tagname mdc-bullet
|
10
|
+
*
|
11
|
+
* @cssproperty --mdc-bullet-background-color - background color of the bullet
|
12
|
+
* @cssproperty --mdc-bullet-size-small - small size value of the bullet
|
13
|
+
* @cssproperty --mdc-bullet-size-medium - medium size value of the bullet
|
14
|
+
* @cssproperty --mdc-bullet-size-large - large size value of the bullet
|
15
|
+
*/
|
16
|
+
const reactWrapper = createComponent({
|
17
|
+
tagName: TAG_NAME,
|
18
|
+
elementClass: Component,
|
19
|
+
react: React,
|
20
|
+
events: {},
|
21
|
+
displayName: 'Bullet',
|
22
|
+
});
|
23
|
+
export default reactWrapper;
|
package/dist/react/index.d.ts
CHANGED
package/dist/react/index.js
CHANGED
package/package.json
CHANGED