@momentum-design/components 0.9.11 → 0.10.1
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/components/icon/icon.utils.js +3 -1
- 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 {};
|
@@ -15,6 +15,8 @@ const dynamicSVGImport = async (url, name, fileExtension) => {
|
|
15
15
|
throw new Error('There was a problem while fetching the icon!');
|
16
16
|
}
|
17
17
|
const iconResponse = await response.text();
|
18
|
-
|
18
|
+
const returnValue = new DOMParser().parseFromString(iconResponse, 'text/html').body.children[0];
|
19
|
+
returnValue.setAttribute('data-name', name);
|
20
|
+
return returnValue;
|
19
21
|
};
|
20
22
|
export { dynamicSVGImport };
|
@@ -375,6 +375,77 @@
|
|
375
375
|
}
|
376
376
|
]
|
377
377
|
},
|
378
|
+
{
|
379
|
+
"kind": "javascript-module",
|
380
|
+
"path": "components/bullet/bullet.component.js",
|
381
|
+
"declarations": [
|
382
|
+
{
|
383
|
+
"kind": "class",
|
384
|
+
"description": "Bullet component, which is a visual marker\nand be used to organize and present items in a list format.",
|
385
|
+
"name": "Bullet",
|
386
|
+
"cssProperties": [
|
387
|
+
{
|
388
|
+
"description": "background color of the bullet",
|
389
|
+
"name": "--mdc-bullet-background-color"
|
390
|
+
},
|
391
|
+
{
|
392
|
+
"description": "small size value of the bullet",
|
393
|
+
"name": "--mdc-bullet-size-small"
|
394
|
+
},
|
395
|
+
{
|
396
|
+
"description": "medium size value of the bullet",
|
397
|
+
"name": "--mdc-bullet-size-medium"
|
398
|
+
},
|
399
|
+
{
|
400
|
+
"description": "large size value of the bullet",
|
401
|
+
"name": "--mdc-bullet-size-large"
|
402
|
+
}
|
403
|
+
],
|
404
|
+
"members": [
|
405
|
+
{
|
406
|
+
"kind": "field",
|
407
|
+
"name": "size",
|
408
|
+
"type": {
|
409
|
+
"text": "Size"
|
410
|
+
},
|
411
|
+
"privacy": "public",
|
412
|
+
"description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
|
413
|
+
"default": "small",
|
414
|
+
"attribute": "size",
|
415
|
+
"reflects": true
|
416
|
+
}
|
417
|
+
],
|
418
|
+
"attributes": [
|
419
|
+
{
|
420
|
+
"name": "size",
|
421
|
+
"type": {
|
422
|
+
"text": "Size"
|
423
|
+
},
|
424
|
+
"description": "Size of the bullet\n\nPossible values: 'small', 'medium', 'large'",
|
425
|
+
"default": "small",
|
426
|
+
"fieldName": "size"
|
427
|
+
}
|
428
|
+
],
|
429
|
+
"superclass": {
|
430
|
+
"name": "Component",
|
431
|
+
"module": "/src/models"
|
432
|
+
},
|
433
|
+
"tagName": "mdc-bullet",
|
434
|
+
"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*/",
|
435
|
+
"customElement": true
|
436
|
+
}
|
437
|
+
],
|
438
|
+
"exports": [
|
439
|
+
{
|
440
|
+
"kind": "js",
|
441
|
+
"name": "default",
|
442
|
+
"declaration": {
|
443
|
+
"name": "Bullet",
|
444
|
+
"module": "components/bullet/bullet.component.js"
|
445
|
+
}
|
446
|
+
}
|
447
|
+
]
|
448
|
+
},
|
378
449
|
{
|
379
450
|
"kind": "javascript-module",
|
380
451
|
"path": "components/button/button.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
@@ -1,5 +1,6 @@
|
|
1
1
|
export { default as Avatar } from './avatar';
|
2
2
|
export { default as Badge } from './badge';
|
3
|
+
export { default as Bullet } from './bullet';
|
3
4
|
export { default as Button } from './button';
|
4
5
|
export { default as Icon } from './icon';
|
5
6
|
export { default as IconProvider } from './iconprovider';
|
package/dist/react/index.js
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
export { default as Avatar } from './avatar';
|
2
2
|
export { default as Badge } from './badge';
|
3
|
+
export { default as Bullet } from './bullet';
|
3
4
|
export { default as Button } from './button';
|
4
5
|
export { default as Icon } from './icon';
|
5
6
|
export { default as IconProvider } from './iconprovider';
|
package/package.json
CHANGED