@jsfour/root-ui 0.0.1
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/.stencil/.build/_README.log +8 -0
- package/.stencil/.build/optimizeCss_d508b9fc8ae8bf613c09ccb27d146e3a.log +1 -0
- package/.stencil/.build/optimizeModule_0b160af7f941adcacfa811e102b08adf.log +2 -0
- package/.stencil/.build/optimizeModule_0b246ca6c0647c40ed469a0cf4358a73.log +1 -0
- package/.stencil/.build/optimizeModule_1bed709b53ef02375e9f61a9dfa643f3.log +1 -0
- package/.stencil/.build/optimizeModule_1d7b03de1d56993f8736d0dfa953b016.log +1 -0
- package/.stencil/.build/optimizeModule_211068a08f9a2243f9b6bbc0d066ca7b.log +1 -0
- package/.stencil/.build/optimizeModule_2187d3c4a8fdf77d63b94a49e5339089.log +1 -0
- package/.stencil/.build/optimizeModule_25ac0c9c93505850d30d777a8983d6cc.log +1 -0
- package/.stencil/.build/optimizeModule_2a8347890bf34de8ebcd825e93de4eac.log +1 -0
- package/.stencil/.build/optimizeModule_310d74be43349d9cd4462216f44e3025.log +1 -0
- package/.stencil/.build/optimizeModule_35ed1b3083d56d1312b29cdc8702dde6.log +1 -0
- package/.stencil/.build/optimizeModule_3abf5364bd9f3e07cabdf31f25fdfccd.log +1 -0
- package/.stencil/.build/optimizeModule_3c694181a383d2d5d7c43959dae3fc40.log +2 -0
- package/.stencil/.build/optimizeModule_3e5a7a979ee157dee476e23a940398bf.log +1 -0
- package/.stencil/.build/optimizeModule_3f113b87a2543efdae16831cf4a13466.log +1 -0
- package/.stencil/.build/optimizeModule_4cf0a704790c64fa3e7636ba3472dff6.log +1 -0
- package/.stencil/.build/optimizeModule_5473d4453ebf4ef999ac7777394048db.log +1 -0
- package/.stencil/.build/optimizeModule_56e4598e7f285cec042c0632923a473c.log +1 -0
- package/.stencil/.build/optimizeModule_5721447e0280cf2192180b57b6ffd931.log +1 -0
- package/.stencil/.build/optimizeModule_5fe32756e8649adbca14ee76bdfbfad3.log +2 -0
- package/.stencil/.build/optimizeModule_60477845aacd02169ef3d0091bfb345f.log +1 -0
- package/.stencil/.build/optimizeModule_645cc880dd3009950a72ea147a926718.log +1 -0
- package/.stencil/.build/optimizeModule_64633d5e5c5103adb5683fc19edaa8b8.log +1 -0
- package/.stencil/.build/optimizeModule_6b615133c24ac4e6c5428eb74470b5cb.log +1 -0
- package/.stencil/.build/optimizeModule_6e9d6355a774b23f578c75f14d78e605.log +1 -0
- package/.stencil/.build/optimizeModule_8797e91e099ec89d9158d143cc9e8199.log +1 -0
- package/.stencil/.build/optimizeModule_8a9445cafc85dc657334e37e1fce6fdc.log +1 -0
- package/.stencil/.build/optimizeModule_8c399f3f088e7f1cbb87f65d8e96bfc4.log +1 -0
- package/.stencil/.build/optimizeModule_90f423b7b20b32670cb13ca6605940fa.log +1 -0
- package/.stencil/.build/optimizeModule_9d37b0c4d3ae587fe9c9f384659ac198.log +1 -0
- package/.stencil/.build/optimizeModule_9eb9260f8aec9636ffc5e00444eaa1ea.log +1 -0
- package/.stencil/.build/optimizeModule_a90d2726fdff70d788aaa8b3fbc0adc7.log +1 -0
- package/.stencil/.build/optimizeModule_ad865e38167d997d66ef7128fdb36b5e.log +1 -0
- package/.stencil/.build/optimizeModule_b1b3b2dbe6634f16e4a063d74c2df110.log +1 -0
- package/.stencil/.build/optimizeModule_b24fa4d64bacca187db7a0654705e182.log +1 -0
- package/.stencil/.build/optimizeModule_b90b0f1d4d3dd3aae106476a0cce19c0.log +1 -0
- package/.stencil/.build/optimizeModule_c0fee36e4d0c0c701c749a56eec1f7d8.log +1 -0
- package/.stencil/.build/optimizeModule_ceeae0c907ecc2a87e2ad19d79e99510.log +1 -0
- package/.stencil/.build/optimizeModule_d68f87c26c9b5557f71199e397b81fde.log +1 -0
- package/.stencil/.build/optimizeModule_d6b6b4cfa8009d54eb301d8147c45850.log +1 -0
- package/.stencil/.build/optimizeModule_d7a4dadc89824480596190cf7a033e72.log +1 -0
- package/.stencil/.build/optimizeModule_ddf02b2e19bf055fcfd20ed5dc8b956d.log +2 -0
- package/.stencil/.build/optimizeModule_eb39a27ff5ef48385b4bf233760a7d1f.log +1 -0
- package/.stencil/.build/optimizeModule_eee1991c594a387b17e535171c33abbf.log +1 -0
- package/.stencil/.build/optimizeModule_f0d6e7e6666905c8da7d7450a1b4088b.log +1 -0
- package/.stencil/.build/optimizeModule_f93c97ed92b866fd99189e5a0a44e774.log +1 -0
- package/.stencil/.build/optimizeModule_fdf66b9636906890546dde0f834d4d8e.log +1 -0
- package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
- package/dist/cjs/index-CbJkKnHq.js +3244 -0
- package/dist/cjs/index.cjs.js +25 -0
- package/dist/cjs/loader.cjs.js +13 -0
- package/dist/cjs/root-badge_6.cjs.entry.js +343 -0
- package/dist/cjs/stencil-library.cjs.js +25 -0
- package/dist/collection/collection-manifest.json +17 -0
- package/dist/collection/components/badge/badge-variation.enum.js +9 -0
- package/dist/collection/components/badge/badge.css +45 -0
- package/dist/collection/components/badge/badge.js +148 -0
- package/dist/collection/components/banner/banner-variation.enum.js +9 -0
- package/dist/collection/components/banner/banner.css +18 -0
- package/dist/collection/components/banner/banner.js +147 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.css +49 -0
- package/dist/collection/components/breadcrumbs/breadcrumbs.js +95 -0
- package/dist/collection/components/button/button-size.enum.js +5 -0
- package/dist/collection/components/button/button-type.enum.js +6 -0
- package/dist/collection/components/button/button-variation.enum.js +10 -0
- package/dist/collection/components/button/button.css +61 -0
- package/dist/collection/components/button/button.js +207 -0
- package/dist/collection/components/index.js +6 -0
- package/dist/collection/components/input/input-type.enum.js +18 -0
- package/dist/collection/components/input/input.css +134 -0
- package/dist/collection/components/input/input.js +415 -0
- package/dist/collection/components/list/list.css +18 -0
- package/dist/collection/components/list/list.js +50 -0
- package/dist/collection/enums.js +3 -0
- package/dist/collection/global/utils/randomIdGenerator/index.js +7 -0
- package/dist/collection/index.js +1 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/p-CIjEN4Bv.js +1 -0
- package/dist/components/p-CvhBNbMT.js +1 -0
- package/dist/components/root-badge.d.ts +11 -0
- package/dist/components/root-badge.js +1 -0
- package/dist/components/root-banner.d.ts +11 -0
- package/dist/components/root-banner.js +1 -0
- package/dist/components/root-breadcrumbs.d.ts +11 -0
- package/dist/components/root-breadcrumbs.js +1 -0
- package/dist/components/root-button.d.ts +11 -0
- package/dist/components/root-button.js +1 -0
- package/dist/components/root-input.d.ts +11 -0
- package/dist/components/root-input.js +1 -0
- package/dist/components/root-list.d.ts +11 -0
- package/dist/components/root-list.js +1 -0
- package/dist/esm/app-globals-DQuL1Twl.js +3 -0
- package/dist/esm/index-Cygc6-mN.js +3236 -0
- package/dist/esm/index.js +25 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/root-badge_6.entry.js +336 -0
- package/dist/esm/stencil-library.js +21 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/stencil-library/index.esm.js +1 -0
- package/dist/stencil-library/p-2b062e4c.entry.js +1 -0
- package/dist/stencil-library/p-Cygc6-mN.js +2 -0
- package/dist/stencil-library/p-DQuL1Twl.js +1 -0
- package/dist/stencil-library/stencil-library.esm.js +1 -0
- package/dist/types/components/badge/badge-variation.enum.d.ts +8 -0
- package/dist/types/components/badge/badge.d.ts +11 -0
- package/dist/types/components/banner/banner-variation.enum.d.ts +8 -0
- package/dist/types/components/banner/banner.d.ts +11 -0
- package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +12 -0
- package/dist/types/components/button/button-size.enum.d.ts +4 -0
- package/dist/types/components/button/button-type.enum.d.ts +5 -0
- package/dist/types/components/button/button-variation.enum.d.ts +9 -0
- package/dist/types/components/button/button.d.ts +15 -0
- package/dist/types/components/index.d.ts +6 -0
- package/dist/types/components/input/input-type.enum.d.ts +17 -0
- package/dist/types/components/input/input.d.ts +37 -0
- package/dist/types/components/list/list.d.ts +7 -0
- package/dist/types/components.d.ts +388 -0
- package/dist/types/enums.d.ts +3 -0
- package/dist/types/global/utils/randomIdGenerator/index.d.ts +1 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/stencil-public-runtime.d.ts +1839 -0
- package/package.json +28 -0
- package/src/components/badge/badge-variation.enum.ts +9 -0
- package/src/components/badge/badge.scss +53 -0
- package/src/components/badge/badge.tsx +42 -0
- package/src/components/badge/readme.md +27 -0
- package/src/components/banner/banner-variation.enum.ts +9 -0
- package/src/components/banner/banner.scss +22 -0
- package/src/components/banner/banner.tsx +41 -0
- package/src/components/banner/readme.md +27 -0
- package/src/components/breadcrumbs/breadcrumbs.scss +57 -0
- package/src/components/breadcrumbs/breadcrumbs.tsx +74 -0
- package/src/components/breadcrumbs/readme.md +24 -0
- package/src/components/button/button-size.enum.ts +5 -0
- package/src/components/button/button-type.enum.ts +5 -0
- package/src/components/button/button-variation.enum.ts +10 -0
- package/src/components/button/button.scss +73 -0
- package/src/components/button/button.tsx +52 -0
- package/src/components/button/readme.md +29 -0
- package/src/components/index.ts +7 -0
- package/src/components/input/input-type.enum.ts +18 -0
- package/src/components/input/input.scss +156 -0
- package/src/components/input/input.tsx +264 -0
- package/src/components/input/readme.md +34 -0
- package/src/components/list/list.scss +21 -0
- package/src/components/list/list.tsx +24 -0
- package/src/components/list/readme.md +17 -0
- package/src/components.d.ts +388 -0
- package/src/enums.ts +3 -0
- package/src/global/styles/index.scss +0 -0
- package/src/global/utils/randomIdGenerator/index.ts +8 -0
- package/src/index.html +105 -0
- package/src/index.ts +2 -0
- package/stencil.config.ts +36 -0
- package/tsconfig.json +25 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
.root-banner {
|
|
2
|
+
text-align: center;
|
|
3
|
+
color: var(--rootsdk-text-primary);
|
|
4
|
+
padding: 0.4rem;
|
|
5
|
+
}
|
|
6
|
+
.root-banner--primary {
|
|
7
|
+
background-color: var(--rootsdk-brand-primary);
|
|
8
|
+
color: var(--rootsdk-text-white);
|
|
9
|
+
}
|
|
10
|
+
.root-banner--danger {
|
|
11
|
+
background-color: var(--rootsdk-error);
|
|
12
|
+
}
|
|
13
|
+
.root-banner--warning {
|
|
14
|
+
background-color: var(--rootsdk-warning);
|
|
15
|
+
}
|
|
16
|
+
.root-banner--success {
|
|
17
|
+
background-color: var(--rootsdk-brand-tertiary);
|
|
18
|
+
}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { randomIdGenerator } from "../../global/utils/randomIdGenerator";
|
|
3
|
+
import { RootBannerVariation } from "./banner-variation.enum";
|
|
4
|
+
export class RootBanner {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.bannerId = randomIdGenerator('root-banner');
|
|
7
|
+
this.variation = RootBannerVariation.PRIMARY;
|
|
8
|
+
this.fullWidth = false;
|
|
9
|
+
this.disabled = false;
|
|
10
|
+
}
|
|
11
|
+
clickHandler(e) {
|
|
12
|
+
this.rootBannerClick.emit(e);
|
|
13
|
+
}
|
|
14
|
+
render() {
|
|
15
|
+
const classes = {
|
|
16
|
+
'root-banner': true,
|
|
17
|
+
[`root-banner--${this.variation}`]: !!this.variation
|
|
18
|
+
};
|
|
19
|
+
return (h("div", { key: '96197510d7a0988a356be8a6bdddf637e5383870', id: this.bannerId, class: classes, onClick: (e) => this.clickHandler(e) }, h("slot", { key: 'b17c26ca99e7f3575c9d2849c644e0fef1e30dff' })));
|
|
20
|
+
}
|
|
21
|
+
static get is() { return "root-banner"; }
|
|
22
|
+
static get encapsulation() { return "shadow"; }
|
|
23
|
+
static get originalStyleUrls() {
|
|
24
|
+
return {
|
|
25
|
+
"$": ["banner.scss"]
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static get styleUrls() {
|
|
29
|
+
return {
|
|
30
|
+
"$": ["banner.css"]
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
static get properties() {
|
|
34
|
+
return {
|
|
35
|
+
"bannerId": {
|
|
36
|
+
"type": "string",
|
|
37
|
+
"mutable": false,
|
|
38
|
+
"complexType": {
|
|
39
|
+
"original": "string",
|
|
40
|
+
"resolved": "string",
|
|
41
|
+
"references": {}
|
|
42
|
+
},
|
|
43
|
+
"required": false,
|
|
44
|
+
"optional": false,
|
|
45
|
+
"docs": {
|
|
46
|
+
"tags": [],
|
|
47
|
+
"text": ""
|
|
48
|
+
},
|
|
49
|
+
"getter": false,
|
|
50
|
+
"setter": false,
|
|
51
|
+
"reflect": false,
|
|
52
|
+
"attribute": "banner-id",
|
|
53
|
+
"defaultValue": "randomIdGenerator('root-banner')"
|
|
54
|
+
},
|
|
55
|
+
"variation": {
|
|
56
|
+
"type": "string",
|
|
57
|
+
"mutable": false,
|
|
58
|
+
"complexType": {
|
|
59
|
+
"original": "RootBannerVariation",
|
|
60
|
+
"resolved": "RootBannerVariation.DANGER | RootBannerVariation.PRIMARY | RootBannerVariation.SECONDARY | RootBannerVariation.SUCCESS | RootBannerVariation.TERTIARY | RootBannerVariation.WARNING",
|
|
61
|
+
"references": {
|
|
62
|
+
"RootBannerVariation": {
|
|
63
|
+
"location": "import",
|
|
64
|
+
"path": "./banner-variation.enum",
|
|
65
|
+
"id": "src/components/banner/banner-variation.enum.ts::RootBannerVariation",
|
|
66
|
+
"referenceLocation": "RootBannerVariation"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"required": false,
|
|
71
|
+
"optional": false,
|
|
72
|
+
"docs": {
|
|
73
|
+
"tags": [],
|
|
74
|
+
"text": ""
|
|
75
|
+
},
|
|
76
|
+
"getter": false,
|
|
77
|
+
"setter": false,
|
|
78
|
+
"reflect": false,
|
|
79
|
+
"attribute": "variation",
|
|
80
|
+
"defaultValue": "RootBannerVariation.PRIMARY"
|
|
81
|
+
},
|
|
82
|
+
"fullWidth": {
|
|
83
|
+
"type": "boolean",
|
|
84
|
+
"mutable": false,
|
|
85
|
+
"complexType": {
|
|
86
|
+
"original": "boolean",
|
|
87
|
+
"resolved": "boolean",
|
|
88
|
+
"references": {}
|
|
89
|
+
},
|
|
90
|
+
"required": false,
|
|
91
|
+
"optional": false,
|
|
92
|
+
"docs": {
|
|
93
|
+
"tags": [],
|
|
94
|
+
"text": ""
|
|
95
|
+
},
|
|
96
|
+
"getter": false,
|
|
97
|
+
"setter": false,
|
|
98
|
+
"reflect": false,
|
|
99
|
+
"attribute": "full-width",
|
|
100
|
+
"defaultValue": "false"
|
|
101
|
+
},
|
|
102
|
+
"disabled": {
|
|
103
|
+
"type": "boolean",
|
|
104
|
+
"mutable": false,
|
|
105
|
+
"complexType": {
|
|
106
|
+
"original": "boolean",
|
|
107
|
+
"resolved": "boolean",
|
|
108
|
+
"references": {}
|
|
109
|
+
},
|
|
110
|
+
"required": false,
|
|
111
|
+
"optional": false,
|
|
112
|
+
"docs": {
|
|
113
|
+
"tags": [],
|
|
114
|
+
"text": ""
|
|
115
|
+
},
|
|
116
|
+
"getter": false,
|
|
117
|
+
"setter": false,
|
|
118
|
+
"reflect": false,
|
|
119
|
+
"attribute": "disabled",
|
|
120
|
+
"defaultValue": "false"
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
static get events() {
|
|
125
|
+
return [{
|
|
126
|
+
"method": "rootBannerClick",
|
|
127
|
+
"name": "rootBannerClick",
|
|
128
|
+
"bubbles": true,
|
|
129
|
+
"cancelable": true,
|
|
130
|
+
"composed": true,
|
|
131
|
+
"docs": {
|
|
132
|
+
"tags": [],
|
|
133
|
+
"text": ""
|
|
134
|
+
},
|
|
135
|
+
"complexType": {
|
|
136
|
+
"original": "MouseEvent",
|
|
137
|
+
"resolved": "MouseEvent",
|
|
138
|
+
"references": {
|
|
139
|
+
"MouseEvent": {
|
|
140
|
+
"location": "global",
|
|
141
|
+
"id": "global::MouseEvent"
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}];
|
|
146
|
+
}
|
|
147
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
.root-breadcrumbs {
|
|
2
|
+
display: flex;
|
|
3
|
+
list-style: none;
|
|
4
|
+
margin: 0;
|
|
5
|
+
padding: 0;
|
|
6
|
+
gap: 0.5rem;
|
|
7
|
+
align-items: center;
|
|
8
|
+
}
|
|
9
|
+
.root-breadcrumbs .root-breadcrumbs-item {
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
}
|
|
13
|
+
.root-breadcrumbs .root-breadcrumbs-item:not(:last-child)::after {
|
|
14
|
+
background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" viewBox="0 0 256 256"><g><g><polygon points="79.093,0 48.907,30.187 146.72,128 48.907,225.813 79.093,256 207.093,128"/></g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g><g></g></svg>') center;
|
|
15
|
+
content: " ";
|
|
16
|
+
display: inline-block;
|
|
17
|
+
filter: invert(64%) sepia(11%) saturate(0%) hue-rotate(149deg) brightness(99%) contrast(95%);
|
|
18
|
+
height: 0.5rem;
|
|
19
|
+
margin: 0 0.5rem;
|
|
20
|
+
opacity: 0.5;
|
|
21
|
+
width: 0.5rem;
|
|
22
|
+
}
|
|
23
|
+
.root-breadcrumbs .root-breadcrumbs-item--active span {
|
|
24
|
+
background: var(--rootsdk-highlight-normal);
|
|
25
|
+
color: var(--rootsdk-text-tertiary);
|
|
26
|
+
border-radius: 1.5rem;
|
|
27
|
+
padding: 0.32rem 0.64rem;
|
|
28
|
+
font-size: 0.8rem;
|
|
29
|
+
}
|
|
30
|
+
.root-breadcrumbs .root-breadcrumbs-item .root-breadcrumbs-link {
|
|
31
|
+
text-decoration: underline;
|
|
32
|
+
cursor: pointer;
|
|
33
|
+
color: var(--rootsdk-text-primary);
|
|
34
|
+
padding: 0.32rem 0.64rem;
|
|
35
|
+
border-radius: 1.5rem;
|
|
36
|
+
transition-duration: 200ms;
|
|
37
|
+
transition-property: background, color;
|
|
38
|
+
font-size: 0.8rem;
|
|
39
|
+
}
|
|
40
|
+
.root-breadcrumbs .root-breadcrumbs-item .root-breadcrumbs-link .root-icon {
|
|
41
|
+
height: 1.1rem;
|
|
42
|
+
position: relative;
|
|
43
|
+
top: 1px;
|
|
44
|
+
vertical-align: top;
|
|
45
|
+
width: 1.1rem;
|
|
46
|
+
}
|
|
47
|
+
.root-breadcrumbs .root-breadcrumbs-item .root-breadcrumbs-link:hover {
|
|
48
|
+
background-color: var(--rootsdk-highlight-normal);
|
|
49
|
+
}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { randomIdGenerator } from "../../global/utils/randomIdGenerator";
|
|
3
|
+
export class RootBreadcrumbs {
|
|
4
|
+
constructor() {
|
|
5
|
+
this.breadcrumbsId = randomIdGenerator('root-breadcrumbs');
|
|
6
|
+
this.linkItems = [];
|
|
7
|
+
}
|
|
8
|
+
componentDidLoad() {
|
|
9
|
+
this.getBreadcrumbs();
|
|
10
|
+
}
|
|
11
|
+
getBreadcrumbs() {
|
|
12
|
+
const elements = this.hostElement.children;
|
|
13
|
+
if (!elements || (elements === null || elements === void 0 ? void 0 : elements.length) <= 0) {
|
|
14
|
+
console.warn(`The slot contains no link elements.`, this.hostElement);
|
|
15
|
+
return;
|
|
16
|
+
}
|
|
17
|
+
this.linkItems = [...elements]
|
|
18
|
+
.filter((element) => element.tagName.toLowerCase() === 'a')
|
|
19
|
+
.map((element) => {
|
|
20
|
+
return {
|
|
21
|
+
text: element.textContent,
|
|
22
|
+
href: element.getAttribute('href') || ''
|
|
23
|
+
};
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
clickHandler(e) {
|
|
27
|
+
this.linkClick.emit(e);
|
|
28
|
+
}
|
|
29
|
+
render() {
|
|
30
|
+
return (h("ol", { key: 'ffa88751925c0a1f19acb06854bd4add08edec4f', class: 'root-breadcrumbs', id: this.breadcrumbsId }, this.linkItems.map((item, index) => {
|
|
31
|
+
const isLast = index === this.linkItems.length - 1;
|
|
32
|
+
return (h("li", { class: { 'root-breadcrumbs-item': true, 'root-breadcrumbs-item--active': isLast } }, isLast ? (h("span", null, item.text)) : (h("a", { class: "root-breadcrumbs-link", onClick: (e) => this.clickHandler(e), href: item.href }, item.text))));
|
|
33
|
+
})));
|
|
34
|
+
}
|
|
35
|
+
static get is() { return "root-breadcrumbs"; }
|
|
36
|
+
static get encapsulation() { return "shadow"; }
|
|
37
|
+
static get originalStyleUrls() {
|
|
38
|
+
return {
|
|
39
|
+
"$": ["breadcrumbs.scss"]
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static get styleUrls() {
|
|
43
|
+
return {
|
|
44
|
+
"$": ["breadcrumbs.css"]
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
static get properties() {
|
|
48
|
+
return {
|
|
49
|
+
"breadcrumbsId": {
|
|
50
|
+
"type": "string",
|
|
51
|
+
"mutable": false,
|
|
52
|
+
"complexType": {
|
|
53
|
+
"original": "string",
|
|
54
|
+
"resolved": "string",
|
|
55
|
+
"references": {}
|
|
56
|
+
},
|
|
57
|
+
"required": false,
|
|
58
|
+
"optional": false,
|
|
59
|
+
"docs": {
|
|
60
|
+
"tags": [],
|
|
61
|
+
"text": ""
|
|
62
|
+
},
|
|
63
|
+
"getter": false,
|
|
64
|
+
"setter": false,
|
|
65
|
+
"reflect": false,
|
|
66
|
+
"attribute": "breadcrumbs-id",
|
|
67
|
+
"defaultValue": "randomIdGenerator('root-breadcrumbs')"
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
static get states() {
|
|
72
|
+
return {
|
|
73
|
+
"linkItems": {}
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
static get events() {
|
|
77
|
+
return [{
|
|
78
|
+
"method": "linkClick",
|
|
79
|
+
"name": "linkClick",
|
|
80
|
+
"bubbles": true,
|
|
81
|
+
"cancelable": true,
|
|
82
|
+
"composed": true,
|
|
83
|
+
"docs": {
|
|
84
|
+
"tags": [],
|
|
85
|
+
"text": ""
|
|
86
|
+
},
|
|
87
|
+
"complexType": {
|
|
88
|
+
"original": "any",
|
|
89
|
+
"resolved": "any",
|
|
90
|
+
"references": {}
|
|
91
|
+
}
|
|
92
|
+
}];
|
|
93
|
+
}
|
|
94
|
+
static get elementRef() { return "hostElement"; }
|
|
95
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export var RootButtonVariation;
|
|
2
|
+
(function (RootButtonVariation) {
|
|
3
|
+
RootButtonVariation["PRIMARY"] = "primary";
|
|
4
|
+
RootButtonVariation["SECONDARY"] = "secondary";
|
|
5
|
+
RootButtonVariation["TERTIARY"] = "tertiary";
|
|
6
|
+
RootButtonVariation["OUTLINE"] = "outline";
|
|
7
|
+
RootButtonVariation["SUBMIT"] = "submit";
|
|
8
|
+
RootButtonVariation["DANGER"] = "danger";
|
|
9
|
+
RootButtonVariation["CANCEL"] = "cancel";
|
|
10
|
+
})(RootButtonVariation || (RootButtonVariation = {}));
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
.root-button {
|
|
2
|
+
height: 2rem;
|
|
3
|
+
border-radius: 1.5rem;
|
|
4
|
+
padding: 0 1.75rem;
|
|
5
|
+
min-width: fit-content;
|
|
6
|
+
background-color: transparent;
|
|
7
|
+
color: var(--rootsdk-text-primary);
|
|
8
|
+
outline: none;
|
|
9
|
+
font-size: 1rem;
|
|
10
|
+
border: none;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
border: 1px solid transparent;
|
|
13
|
+
text-transform: capitalize;
|
|
14
|
+
}
|
|
15
|
+
.root-button--submit {
|
|
16
|
+
background: var(--rootsdk-text-primary);
|
|
17
|
+
color: var(--rootsdk-background-tertiary);
|
|
18
|
+
}
|
|
19
|
+
.root-button--danger {
|
|
20
|
+
background: var(--rootsdk-error);
|
|
21
|
+
color: var(--rootsdk-text-white);
|
|
22
|
+
}
|
|
23
|
+
.root-button--primary {
|
|
24
|
+
background: var(--rootsdk-brand-primary);
|
|
25
|
+
color: var(--rootsdk-text-white);
|
|
26
|
+
}
|
|
27
|
+
.root-button--secondary {
|
|
28
|
+
background: var(--rootsdk-brand-secondary);
|
|
29
|
+
color: var(--rootsdk-input);
|
|
30
|
+
}
|
|
31
|
+
.root-button--tertiary {
|
|
32
|
+
background: var(--rootsdk-brand-tertiary);
|
|
33
|
+
color: var(--rootsdk-input);
|
|
34
|
+
}
|
|
35
|
+
.root-button--outline {
|
|
36
|
+
background: transparent;
|
|
37
|
+
border: 0.0625rem solid var(--rootsdk-text-tertiary);
|
|
38
|
+
color: var(--rootsdk-text-primary);
|
|
39
|
+
}
|
|
40
|
+
.root-button--cancel {
|
|
41
|
+
background: transparent;
|
|
42
|
+
border: 0.0625rem solid var(--rootsdk-text-tertiary);
|
|
43
|
+
color: var(--rootsdk-text-primary);
|
|
44
|
+
}
|
|
45
|
+
.root-button--large {
|
|
46
|
+
height: 3.25rem;
|
|
47
|
+
}
|
|
48
|
+
.root-button[disabled] {
|
|
49
|
+
opacity: 0.6;
|
|
50
|
+
cursor: not-allowed;
|
|
51
|
+
pointer-events: none;
|
|
52
|
+
}
|
|
53
|
+
.root-button--full-width {
|
|
54
|
+
width: 100%;
|
|
55
|
+
}
|
|
56
|
+
.root-button:hover {
|
|
57
|
+
opacity: 80%;
|
|
58
|
+
}
|
|
59
|
+
.root-button:active {
|
|
60
|
+
transform: scale(0.98);
|
|
61
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { randomIdGenerator } from "../../global/utils/randomIdGenerator";
|
|
3
|
+
import { RootButtonVariation } from "./button-variation.enum";
|
|
4
|
+
import { RootButtonSize } from "./button-size.enum";
|
|
5
|
+
import { RootButtonType } from "./button-type.enum";
|
|
6
|
+
export class RootButton {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.buttonId = randomIdGenerator('root-button');
|
|
9
|
+
this.size = RootButtonSize.SMALL;
|
|
10
|
+
this.variation = RootButtonVariation.PRIMARY;
|
|
11
|
+
this.type = RootButtonType.BUTTON;
|
|
12
|
+
this.fullWidth = false;
|
|
13
|
+
this.disabled = false;
|
|
14
|
+
}
|
|
15
|
+
clickHandler(e) {
|
|
16
|
+
this.rootButtonClick.emit(e);
|
|
17
|
+
}
|
|
18
|
+
render() {
|
|
19
|
+
const classes = {
|
|
20
|
+
'root-button': true,
|
|
21
|
+
[`root-button--${this.size}`]: !!this.size,
|
|
22
|
+
[`root-button--${this.variation}`]: !!this.variation,
|
|
23
|
+
'root-button--full-width': this.fullWidth,
|
|
24
|
+
};
|
|
25
|
+
return (h("button", { key: '951b963255c7eab4f286758ff133e9bad9969ee3', id: this.buttonId, class: classes, disabled: this.disabled, type: this.type, onClick: (e) => this.clickHandler(e) }, h("slot", { key: 'f50823d7bcfd0b291fbeddb17e8a5d740b7edb2a' })));
|
|
26
|
+
}
|
|
27
|
+
static get is() { return "root-button"; }
|
|
28
|
+
static get encapsulation() { return "shadow"; }
|
|
29
|
+
static get originalStyleUrls() {
|
|
30
|
+
return {
|
|
31
|
+
"$": ["button.scss"]
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
static get styleUrls() {
|
|
35
|
+
return {
|
|
36
|
+
"$": ["button.css"]
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
static get properties() {
|
|
40
|
+
return {
|
|
41
|
+
"buttonId": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"mutable": false,
|
|
44
|
+
"complexType": {
|
|
45
|
+
"original": "string",
|
|
46
|
+
"resolved": "string",
|
|
47
|
+
"references": {}
|
|
48
|
+
},
|
|
49
|
+
"required": false,
|
|
50
|
+
"optional": false,
|
|
51
|
+
"docs": {
|
|
52
|
+
"tags": [],
|
|
53
|
+
"text": ""
|
|
54
|
+
},
|
|
55
|
+
"getter": false,
|
|
56
|
+
"setter": false,
|
|
57
|
+
"reflect": false,
|
|
58
|
+
"attribute": "button-id",
|
|
59
|
+
"defaultValue": "randomIdGenerator('root-button')"
|
|
60
|
+
},
|
|
61
|
+
"size": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"mutable": false,
|
|
64
|
+
"complexType": {
|
|
65
|
+
"original": "RootButtonSize",
|
|
66
|
+
"resolved": "RootButtonSize.LARGE | RootButtonSize.SMALL",
|
|
67
|
+
"references": {
|
|
68
|
+
"RootButtonSize": {
|
|
69
|
+
"location": "import",
|
|
70
|
+
"path": "./button-size.enum",
|
|
71
|
+
"id": "src/components/button/button-size.enum.ts::RootButtonSize",
|
|
72
|
+
"referenceLocation": "RootButtonSize"
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
"required": false,
|
|
77
|
+
"optional": false,
|
|
78
|
+
"docs": {
|
|
79
|
+
"tags": [],
|
|
80
|
+
"text": ""
|
|
81
|
+
},
|
|
82
|
+
"getter": false,
|
|
83
|
+
"setter": false,
|
|
84
|
+
"reflect": false,
|
|
85
|
+
"attribute": "size",
|
|
86
|
+
"defaultValue": "RootButtonSize.SMALL"
|
|
87
|
+
},
|
|
88
|
+
"variation": {
|
|
89
|
+
"type": "string",
|
|
90
|
+
"mutable": false,
|
|
91
|
+
"complexType": {
|
|
92
|
+
"original": "RootButtonVariation",
|
|
93
|
+
"resolved": "RootButtonVariation.CANCEL | RootButtonVariation.DANGER | RootButtonVariation.OUTLINE | RootButtonVariation.PRIMARY | RootButtonVariation.SECONDARY | RootButtonVariation.SUBMIT | RootButtonVariation.TERTIARY",
|
|
94
|
+
"references": {
|
|
95
|
+
"RootButtonVariation": {
|
|
96
|
+
"location": "import",
|
|
97
|
+
"path": "./button-variation.enum",
|
|
98
|
+
"id": "src/components/button/button-variation.enum.ts::RootButtonVariation",
|
|
99
|
+
"referenceLocation": "RootButtonVariation"
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
"required": false,
|
|
104
|
+
"optional": false,
|
|
105
|
+
"docs": {
|
|
106
|
+
"tags": [],
|
|
107
|
+
"text": ""
|
|
108
|
+
},
|
|
109
|
+
"getter": false,
|
|
110
|
+
"setter": false,
|
|
111
|
+
"reflect": false,
|
|
112
|
+
"attribute": "variation",
|
|
113
|
+
"defaultValue": "RootButtonVariation.PRIMARY"
|
|
114
|
+
},
|
|
115
|
+
"type": {
|
|
116
|
+
"type": "string",
|
|
117
|
+
"mutable": false,
|
|
118
|
+
"complexType": {
|
|
119
|
+
"original": "RootButtonType",
|
|
120
|
+
"resolved": "RootButtonType.BUTTON | RootButtonType.RESET | RootButtonType.SUBMIT",
|
|
121
|
+
"references": {
|
|
122
|
+
"RootButtonType": {
|
|
123
|
+
"location": "import",
|
|
124
|
+
"path": "./button-type.enum",
|
|
125
|
+
"id": "src/components/button/button-type.enum.ts::RootButtonType",
|
|
126
|
+
"referenceLocation": "RootButtonType"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
"required": false,
|
|
131
|
+
"optional": false,
|
|
132
|
+
"docs": {
|
|
133
|
+
"tags": [],
|
|
134
|
+
"text": ""
|
|
135
|
+
},
|
|
136
|
+
"getter": false,
|
|
137
|
+
"setter": false,
|
|
138
|
+
"reflect": false,
|
|
139
|
+
"attribute": "type",
|
|
140
|
+
"defaultValue": "RootButtonType.BUTTON"
|
|
141
|
+
},
|
|
142
|
+
"fullWidth": {
|
|
143
|
+
"type": "boolean",
|
|
144
|
+
"mutable": false,
|
|
145
|
+
"complexType": {
|
|
146
|
+
"original": "boolean",
|
|
147
|
+
"resolved": "boolean",
|
|
148
|
+
"references": {}
|
|
149
|
+
},
|
|
150
|
+
"required": false,
|
|
151
|
+
"optional": false,
|
|
152
|
+
"docs": {
|
|
153
|
+
"tags": [],
|
|
154
|
+
"text": ""
|
|
155
|
+
},
|
|
156
|
+
"getter": false,
|
|
157
|
+
"setter": false,
|
|
158
|
+
"reflect": false,
|
|
159
|
+
"attribute": "full-width",
|
|
160
|
+
"defaultValue": "false"
|
|
161
|
+
},
|
|
162
|
+
"disabled": {
|
|
163
|
+
"type": "boolean",
|
|
164
|
+
"mutable": false,
|
|
165
|
+
"complexType": {
|
|
166
|
+
"original": "boolean",
|
|
167
|
+
"resolved": "boolean",
|
|
168
|
+
"references": {}
|
|
169
|
+
},
|
|
170
|
+
"required": false,
|
|
171
|
+
"optional": false,
|
|
172
|
+
"docs": {
|
|
173
|
+
"tags": [],
|
|
174
|
+
"text": ""
|
|
175
|
+
},
|
|
176
|
+
"getter": false,
|
|
177
|
+
"setter": false,
|
|
178
|
+
"reflect": false,
|
|
179
|
+
"attribute": "disabled",
|
|
180
|
+
"defaultValue": "false"
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
static get events() {
|
|
185
|
+
return [{
|
|
186
|
+
"method": "rootButtonClick",
|
|
187
|
+
"name": "rootButtonClick",
|
|
188
|
+
"bubbles": true,
|
|
189
|
+
"cancelable": true,
|
|
190
|
+
"composed": true,
|
|
191
|
+
"docs": {
|
|
192
|
+
"tags": [],
|
|
193
|
+
"text": ""
|
|
194
|
+
},
|
|
195
|
+
"complexType": {
|
|
196
|
+
"original": "MouseEvent",
|
|
197
|
+
"resolved": "MouseEvent",
|
|
198
|
+
"references": {
|
|
199
|
+
"MouseEvent": {
|
|
200
|
+
"location": "global",
|
|
201
|
+
"id": "global::MouseEvent"
|
|
202
|
+
}
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}];
|
|
206
|
+
}
|
|
207
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export var RootInputType;
|
|
2
|
+
(function (RootInputType) {
|
|
3
|
+
RootInputType["COLOR"] = "color";
|
|
4
|
+
RootInputType["DATE"] = "date";
|
|
5
|
+
RootInputType["EMAIL"] = "email";
|
|
6
|
+
RootInputType["FILE"] = "file";
|
|
7
|
+
RootInputType["IMAGE"] = "image";
|
|
8
|
+
RootInputType["MONTH"] = "month";
|
|
9
|
+
RootInputType["NUMBER"] = "number";
|
|
10
|
+
RootInputType["PASSWORD"] = "password";
|
|
11
|
+
RootInputType["SEARCH"] = "search";
|
|
12
|
+
RootInputType["SUBMIT"] = "submit";
|
|
13
|
+
RootInputType["TEL"] = "tel";
|
|
14
|
+
RootInputType["TEXT"] = "text";
|
|
15
|
+
RootInputType["TIME"] = "time";
|
|
16
|
+
RootInputType["URL"] = "url";
|
|
17
|
+
RootInputType["WEEK"] = "week";
|
|
18
|
+
})(RootInputType || (RootInputType = {}));
|