kemet-ui 0.2.0 → 1.0.0
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/custom-elements.json +5546 -855
- package/dist/components/kemet-accordion-panel.js +178 -0
- package/dist/components/kemet-accordion.js +105 -72
- package/dist/components/kemet-badge.js +102 -0
- package/dist/components/kemet-button.js +230 -0
- package/dist/components/kemet-checkbox.js +298 -0
- package/dist/components/kemet-combo.js +207 -0
- package/dist/components/kemet-count.js +112 -0
- package/dist/components/kemet-draggable.js +19 -6
- package/dist/components/kemet-drawer.js +38 -15
- package/dist/components/kemet-drawer.styles.js +6 -0
- package/dist/components/kemet-field.js +233 -0
- package/dist/components/kemet-flipcard-trigger.js +4 -5
- package/dist/components/kemet-flipcard.js +26 -3
- package/dist/components/kemet-icon.js +19 -3
- package/dist/components/kemet-input.js +650 -0
- package/dist/components/kemet-modal-close.js +23 -4
- package/dist/components/kemet-modal.js +78 -13
- package/dist/components/kemet-modal.styles.js +14 -2
- package/dist/components/kemet-option.js +45 -0
- package/dist/components/kemet-popover-close.js +1 -1
- package/dist/components/kemet-popover.js +75 -12
- package/dist/components/kemet-radio.js +214 -0
- package/dist/components/kemet-radios.js +218 -0
- package/dist/components/kemet-rotator.js +23 -4
- package/dist/components/kemet-scroll-link.js +21 -2
- package/dist/components/kemet-scroll-nav.js +25 -2
- package/dist/components/kemet-scroll-snap-paginator.js +68 -26
- package/dist/components/kemet-scroll-snap-slide.js +23 -13
- package/dist/components/kemet-scroll-snap.js +31 -16
- package/dist/components/kemet-select.js +365 -0
- package/dist/components/kemet-svg.js +18 -2
- package/dist/components/kemet-svgs.js +7 -3
- package/dist/components/kemet-tab-panel.js +15 -1
- package/dist/components/kemet-tab.js +48 -1
- package/dist/components/kemet-tabs.js +289 -83
- package/dist/components/kemet-tabs.styles.js +200 -0
- package/dist/components/kemet-textarea.js +395 -0
- package/dist/components/kemet-toggle.js +225 -0
- package/dist/kemet-components.cjs +5128 -1200
- package/dist/kemet-components.js +5117 -1173
- package/dist/kemet-components.min.js +1536 -421
- package/dist/styles/kemet.components.css +12 -260
- package/dist/styles/kemet.components.css.map +1 -1
- package/dist/styles/kemet.core.css +2371 -503
- package/dist/styles/kemet.core.css.map +1 -1
- package/dist/styles/scss/components/_config.scss +0 -25
- package/dist/styles/scss/components/accordion.scss +4 -53
- package/dist/styles/scss/components/modal.scss +5 -9
- package/dist/styles/scss/components/scrollsnap.scss +0 -57
- package/dist/styles/scss/core/_config.scss +160 -3
- package/dist/styles/scss/core/_helpers.scss +109 -2
- package/dist/styles/scss/core/attributes.scss +16 -0
- package/dist/styles/scss/core/base.scss +38 -0
- package/dist/styles/scss/core/layout.scss +6 -5
- package/dist/styles/scss/kemet.components.scss +0 -2
- package/dist/styles/scss/kemet.core.scss +1 -2
- package/package.json +34 -56
- package/dist/components/kemet-carousel-link.js +0 -54
- package/dist/components/kemet-carousel-next.js +0 -46
- package/dist/components/kemet-carousel-prev.js +0 -46
- package/dist/components/kemet-carousel-slide.js +0 -83
- package/dist/components/kemet-carousel.js +0 -236
- package/dist/components/kemet-ratio.js +0 -61
- package/dist/styles/scss/components/flipcard.scss +0 -14
- package/dist/styles/scss/components/tabs.scss +0 -73
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
@use './config' as *;
|
|
2
|
+
|
|
3
|
+
:root {
|
|
4
|
+
--kemet-border-radius: 6px;
|
|
5
|
+
|
|
6
|
+
--kemet-color-white: #fff;
|
|
7
|
+
--kemet-color-white-rich: #{map-get($colors, 'white-rich')};
|
|
8
|
+
--kemet-color-gray1: #{map-get($colors, 'gray1')};
|
|
9
|
+
--kemet-color-gray2: #{map-get($colors, 'gray2')};
|
|
10
|
+
--kemet-color-gray3: #{map-get($colors, 'gray3')};
|
|
11
|
+
--kemet-color-gray4: #{map-get($colors, 'gray4')};
|
|
12
|
+
--kemet-color-gray5: #{map-get($colors, 'gray5')};
|
|
13
|
+
--kemet-color-gray6: #{map-get($colors, 'gray6')};
|
|
14
|
+
--kemet-color-gray7: #{map-get($colors, 'gray7')};
|
|
15
|
+
--kemet-color-gray8: #{map-get($colors, 'gray8')};
|
|
16
|
+
--kemet-color-gray9: #{map-get($colors, 'gray9')};
|
|
17
|
+
--kemet-color-gray10: #{map-get($colors, 'gray10')};
|
|
18
|
+
--kemet-color-black: #000;
|
|
19
|
+
|
|
20
|
+
--kemet-color-primary: #{map-get($colors, 'primary')};
|
|
21
|
+
--kemet-color-link: #{map-get($colors, 'link')};
|
|
22
|
+
|
|
23
|
+
--kemet-color-error: #{map-get($colors, 'error')};
|
|
24
|
+
--kemet-color-success: #{map-get($colors, 'success')};
|
|
25
|
+
--kemet-color-neutral: #{map-get($colors, 'neutral')};
|
|
26
|
+
--kemet-color-warning: #{map-get($colors, 'warning')};
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
*,
|
|
30
|
+
*::after,
|
|
31
|
+
*::before {
|
|
32
|
+
box-sizing: border-box;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
a {
|
|
36
|
+
color: var(--kemet-color-link);
|
|
37
|
+
text-decoration: none;
|
|
38
|
+
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
display: block;
|
|
7
7
|
box-sizing: border-box;
|
|
8
8
|
word-wrap: break-word;
|
|
9
|
-
text-align: left;
|
|
9
|
+
// text-align: left;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
// row layout
|
|
@@ -14,7 +14,6 @@
|
|
|
14
14
|
|
|
15
15
|
[kemet-layout='flexrow'] {
|
|
16
16
|
display: flex;
|
|
17
|
-
padding: 0;
|
|
18
17
|
}
|
|
19
18
|
|
|
20
19
|
[kemet-layout='flexrow'] > * {
|
|
@@ -101,7 +100,6 @@
|
|
|
101
100
|
[kemet-layout='flexgrid'] {
|
|
102
101
|
display: flex;
|
|
103
102
|
flex-wrap: wrap;
|
|
104
|
-
padding: 0;
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
[kemet-layout='flexgrid'] > * {
|
|
@@ -117,7 +115,6 @@
|
|
|
117
115
|
[kemet-layout='flexcolumn'] {
|
|
118
116
|
display: flex;
|
|
119
117
|
flex-direction: column;
|
|
120
|
-
min-height: 100%;
|
|
121
118
|
}
|
|
122
119
|
|
|
123
120
|
[kemet-layout='flexcolumn'] > * {
|
|
@@ -126,7 +123,7 @@
|
|
|
126
123
|
flex-direction: column;
|
|
127
124
|
}
|
|
128
125
|
|
|
129
|
-
[kemet-layout='flexcolumn'] > [fit-content] {
|
|
126
|
+
[kemet-layout='flexcolumn'] > [kemet-fit-content] {
|
|
130
127
|
flex: 0 0 auto;
|
|
131
128
|
}
|
|
132
129
|
|
|
@@ -166,3 +163,7 @@
|
|
|
166
163
|
[kemet-layout='flexlist'] > * {
|
|
167
164
|
flex: 0 0 auto;
|
|
168
165
|
}
|
|
166
|
+
|
|
167
|
+
[kemet-layout='flexlist'][kemet-gutters] > * {
|
|
168
|
+
padding: unset;
|
|
169
|
+
}
|
package/package.json
CHANGED
|
@@ -1,30 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "kemet-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.0",
|
|
4
4
|
"description": "A flexible and designless blueprint system for UIs.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"watch": {
|
|
7
|
-
"build": "src/**/*.*"
|
|
7
|
+
"build": "src/**/*.*",
|
|
8
|
+
"analyze": "src/components/**/*.js"
|
|
8
9
|
},
|
|
9
10
|
"scripts": {
|
|
10
|
-
"
|
|
11
|
-
"start": "web-dev-server",
|
|
12
|
-
"test": "web-test-runner --coverage",
|
|
13
|
-
"test:watch": "web-test-runner --watch",
|
|
14
|
-
"watch": "npm-watch",
|
|
11
|
+
"analyze": "custom-elements-manifest analyze --litelement --globs \"src/components/kemet-*/kemet-*.js\"",
|
|
15
12
|
"build": "npm run css:build && npm run js:build",
|
|
16
13
|
"css:build": "sass src/styles/kemet.components.scss:dist/styles/kemet.components.css src/styles/kemet.core.scss:dist/styles/kemet.core.css && postcss dist/styles/**/*.css -u autoprefixer --dir dist/styles",
|
|
17
|
-
"
|
|
18
|
-
"storybook": "start-storybook -p 6006",
|
|
19
|
-
"storybook:build": "build-storybook",
|
|
20
|
-
"lint:eslint": "eslint --ext .js,.html . --ignore-path .gitignore",
|
|
14
|
+
"deploy": "build-storybook && node deploy.js",
|
|
21
15
|
"format:eslint": "eslint --ext .js,.html . --fix --ignore-path .gitignore",
|
|
22
|
-
"lint:stylelint": "npx stylelint 'src/styles/**/*.scss'",
|
|
23
16
|
"format:stylelint": "npx stylelint --fix 'src/styles/**/*.scss'",
|
|
17
|
+
"lint:eslint": "eslint --ext .js,.html . --ignore-path .gitignore",
|
|
18
|
+
"lint:stylelint": "npx stylelint 'src/styles/**/*.scss'",
|
|
24
19
|
"prepare": "husky install",
|
|
25
|
-
"prepublish": "rimraf dist && npm run build"
|
|
20
|
+
"prepublish": "rimraf dist && npm run build",
|
|
21
|
+
"js:build": "rollup -c config/rollup.js",
|
|
22
|
+
"start": "web-dev-server",
|
|
23
|
+
"storybook": "start-storybook -p 6006",
|
|
24
|
+
"storybook:build": "build-storybook",
|
|
25
|
+
"test": "web-test-runner --coverage",
|
|
26
|
+
"test:watch": "web-test-runner --watch",
|
|
27
|
+
"watch": "npm-watch"
|
|
26
28
|
},
|
|
27
|
-
"author": "Hasani Rogers <
|
|
29
|
+
"author": "Hasani Rogers <dev@hasanirogers.me>",
|
|
28
30
|
"license": "MIT",
|
|
29
31
|
"keywords": [
|
|
30
32
|
"web components",
|
|
@@ -52,7 +54,8 @@
|
|
|
52
54
|
"import/no-extraneous-dependencies": "off"
|
|
53
55
|
},
|
|
54
56
|
"ignorePatterns": [
|
|
55
|
-
"dist/**/*.js"
|
|
57
|
+
"dist/**/*.js",
|
|
58
|
+
"src/utilities/controllers/**/*.js"
|
|
56
59
|
]
|
|
57
60
|
},
|
|
58
61
|
"browserslist": [
|
|
@@ -61,26 +64,30 @@
|
|
|
61
64
|
"iOS >= 8"
|
|
62
65
|
],
|
|
63
66
|
"dependencies": {
|
|
64
|
-
"lit": "^2.
|
|
67
|
+
"lit": "^2.2.3",
|
|
68
|
+
"lit-html": "^2.0.2",
|
|
65
69
|
"ts-dedent": "^2.1.1"
|
|
66
70
|
},
|
|
67
71
|
"devDependencies": {
|
|
68
72
|
"@babel/core": "^7.14.3",
|
|
69
73
|
"@babel/preset-react": "^7.14.5",
|
|
70
|
-
"@
|
|
74
|
+
"@custom-elements-manifest/analyzer": "^0.5.7",
|
|
75
|
+
"@open-wc/eslint-config": "^7.0.0",
|
|
71
76
|
"@open-wc/testing": "^2.5.33",
|
|
72
77
|
"@rollup/plugin-multi-entry": "^4.0.0",
|
|
73
78
|
"@rollup/plugin-node-resolve": "^13.0.0",
|
|
74
|
-
"@storybook/addon-a11y": "^6.
|
|
75
|
-
"@storybook/addon-actions": "^6.
|
|
76
|
-
"@storybook/addon-essentials": "^6.
|
|
77
|
-
"@storybook/addon-links": "^6.
|
|
78
|
-
"@storybook/addons": "^6.
|
|
79
|
-
"@storybook/
|
|
80
|
-
"@storybook/
|
|
79
|
+
"@storybook/addon-a11y": "^6.5.6",
|
|
80
|
+
"@storybook/addon-actions": "^6.5.6",
|
|
81
|
+
"@storybook/addon-essentials": "^6.5.6",
|
|
82
|
+
"@storybook/addon-links": "^6.5.6",
|
|
83
|
+
"@storybook/addons": "^6.5.6",
|
|
84
|
+
"@storybook/preset-scss": "^1.0.3",
|
|
85
|
+
"@storybook/theming": "^6.5.6",
|
|
86
|
+
"@storybook/web-components": "^6.5.6",
|
|
81
87
|
"@web/dev-server": "^0.1.17",
|
|
82
88
|
"@web/test-runner": "^0.13.4",
|
|
83
89
|
"babel-loader": "^8.2.2",
|
|
90
|
+
"css-loader": "5.2.6",
|
|
84
91
|
"dotenv": "^10.0.0",
|
|
85
92
|
"husky": "^6.0.0",
|
|
86
93
|
"npm-watch": "^0.9.0",
|
|
@@ -91,7 +98,9 @@
|
|
|
91
98
|
"rollup-plugin-minify-html-literals": "^1.2.6",
|
|
92
99
|
"rollup-plugin-terser": "^7.0.2",
|
|
93
100
|
"sass": "^1.32.13",
|
|
101
|
+
"sass-loader": "10.1.1",
|
|
94
102
|
"ssh2-sftp-client": "^6.0.1",
|
|
103
|
+
"style-loader": "2.0.0",
|
|
95
104
|
"stylelint": "^13.13.1",
|
|
96
105
|
"stylelint-config-sass-guidelines": "^8.0.0",
|
|
97
106
|
"stylelint-config-standard": "^22.0.0"
|
|
@@ -104,36 +113,5 @@
|
|
|
104
113
|
"url": "https://github.com/hasanirogers/kemet-ui/issues"
|
|
105
114
|
},
|
|
106
115
|
"homepage": "http://kemet.dev",
|
|
107
|
-
"
|
|
108
|
-
"src/components/kemet-accordion/kemet-accordion.js",
|
|
109
|
-
"src/components/kemet-carousel/kemet-carousel.js",
|
|
110
|
-
"src/components/kemet-carousel/kemet-carousel-link.js",
|
|
111
|
-
"src/components/kemet-carousel/kemet-carousel-next.js",
|
|
112
|
-
"src/components/kemet-carousel/kemet-carousel-prev.js",
|
|
113
|
-
"src/components/kemet-carousel/kemet-carousel-slide.js",
|
|
114
|
-
"src/components/kemet-carousel/kemet-carousel.js",
|
|
115
|
-
"src/components/kemet-draggable/kemet-draggable.js",
|
|
116
|
-
"src/components/kemet-drawer/kemet-drawer.js",
|
|
117
|
-
"src/components/kemet-flipcard/kemet-flipcard.js",
|
|
118
|
-
"src/components/kemet-flipcard/kemet-flipcard-trigger.js",
|
|
119
|
-
"src/components/kemet-icon/kemet-icon.js",
|
|
120
|
-
"src/components/kemet-carousel/kemet-carousel.js",
|
|
121
|
-
"src/components/kemet-modal/kemet-modal.js",
|
|
122
|
-
"src/components/kemet-modal/kemet-modal-close.js",
|
|
123
|
-
"src/components/kemet-carousel/kemet-carousel.js",
|
|
124
|
-
"src/components/kemet-popover/kemet-popover.js",
|
|
125
|
-
"src/components/kemet-popover/kemet-popover-close.js",
|
|
126
|
-
"src/components/kemet-ratio/kemet-ratio.js",
|
|
127
|
-
"src/components/kemet-rotator/kemet-rotator.js",
|
|
128
|
-
"src/components/kemet-scroll-link/kemet-scroll-link.js",
|
|
129
|
-
"src/components/kemet-scroll-nav/kemet-scroll-nav.js",
|
|
130
|
-
"src/components/kemet-scroll-snap/kemet-scroll-snap.js",
|
|
131
|
-
"src/components/kemet-scroll-snap/kemet-scroll-snap-paginator.js",
|
|
132
|
-
"src/components/kemet-scroll-snap/kemet-scroll-snap-slide.js",
|
|
133
|
-
"src/components/kemet-svgs/kemet-svgs.js",
|
|
134
|
-
"src/components/kemet-svgs/kemet-svg.js",
|
|
135
|
-
"src/components/kemet-tabs/kemet-tabs.js",
|
|
136
|
-
"src/components/kemet-tabs/kemet-tab-panel.js",
|
|
137
|
-
"src/components/kemet-tabs/kemet-tab.js"
|
|
138
|
-
]
|
|
116
|
+
"customElements": "custom-elements.json"
|
|
139
117
|
}
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import { html, css, LitElement } from 'lit';
|
|
2
|
-
|
|
3
|
-
export class KemetCarouselLink extends LitElement {
|
|
4
|
-
static get properties() {
|
|
5
|
-
return {
|
|
6
|
-
slide: {
|
|
7
|
-
type: Number,
|
|
8
|
-
reflect: true,
|
|
9
|
-
},
|
|
10
|
-
selected: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
reflect: true,
|
|
13
|
-
},
|
|
14
|
-
disabled: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
reflect: true,
|
|
17
|
-
},
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
static get styles() {
|
|
22
|
-
return [
|
|
23
|
-
css`
|
|
24
|
-
:host(:not([selected])) {
|
|
25
|
-
cursor: pointer;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
:host([disabled]) {
|
|
29
|
-
cursor: not-allowed;
|
|
30
|
-
}
|
|
31
|
-
`,
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
render() {
|
|
36
|
-
return html`
|
|
37
|
-
<span tabindex="0" @keyup=${() => this.changed()} @click=${() => this.changed()}>
|
|
38
|
-
<slot></slot>
|
|
39
|
-
</span>
|
|
40
|
-
`;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
changed() {
|
|
44
|
-
if (!this.disabled) {
|
|
45
|
-
this.dispatchEvent(new CustomEvent('kemet-carousel-link', {
|
|
46
|
-
bubbles: true,
|
|
47
|
-
composed: true,
|
|
48
|
-
detail: this,
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
window.customElements.define('kemet-carousel-link', KemetCarouselLink);
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { html, css, LitElement } from 'lit';
|
|
2
|
-
|
|
3
|
-
export class KemetCarouselNext extends LitElement {
|
|
4
|
-
static get styles() {
|
|
5
|
-
return [
|
|
6
|
-
css`
|
|
7
|
-
:host {
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host([disabled]) {
|
|
12
|
-
cursor: not-allowed;
|
|
13
|
-
}
|
|
14
|
-
`,
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static get properties() {
|
|
19
|
-
return {
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
reflect: true,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
render() {
|
|
28
|
-
return html`
|
|
29
|
-
<span tabindex="0" @keyup=${() => this.next()} @click=${() => this.next()}>
|
|
30
|
-
<slot></slot>
|
|
31
|
-
</span>
|
|
32
|
-
`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
next() {
|
|
36
|
-
if (!this.disabled) {
|
|
37
|
-
this.dispatchEvent(new CustomEvent('kemet-carousel-next', {
|
|
38
|
-
bubbles: true,
|
|
39
|
-
composed: true,
|
|
40
|
-
detail: this,
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
window.customElements.define('kemet-carousel-next', KemetCarouselNext);
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { html, css, LitElement } from 'lit';
|
|
2
|
-
|
|
3
|
-
export class KemetCarouselPrev extends LitElement {
|
|
4
|
-
static get styles() {
|
|
5
|
-
return [
|
|
6
|
-
css`
|
|
7
|
-
:host {
|
|
8
|
-
cursor: pointer;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
:host([disabled]) {
|
|
12
|
-
cursor: not-allowed;
|
|
13
|
-
}
|
|
14
|
-
`,
|
|
15
|
-
];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
static get properties() {
|
|
19
|
-
return {
|
|
20
|
-
disabled: {
|
|
21
|
-
type: Boolean,
|
|
22
|
-
reflect: true,
|
|
23
|
-
},
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
render() {
|
|
28
|
-
return html`
|
|
29
|
-
<span tabindex="0" @keyup=${() => this.prev()} @click=${() => this.prev()}>
|
|
30
|
-
<slot></slot>
|
|
31
|
-
</span>
|
|
32
|
-
`;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
prev() {
|
|
36
|
-
if (!this.disabled) {
|
|
37
|
-
this.dispatchEvent(new CustomEvent('kemet-carousel-prev', {
|
|
38
|
-
bubbles: true,
|
|
39
|
-
composed: true,
|
|
40
|
-
detail: this,
|
|
41
|
-
}));
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
window.customElements.define('kemet-carousel-prev', KemetCarouselPrev);
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import { html, css, LitElement } from 'lit';
|
|
2
|
-
|
|
3
|
-
export class KemetCarouselSlide extends LitElement {
|
|
4
|
-
static get styles() {
|
|
5
|
-
return [
|
|
6
|
-
css`
|
|
7
|
-
:host,
|
|
8
|
-
:host *,
|
|
9
|
-
:host *::before,
|
|
10
|
-
*::after {
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
:host {
|
|
15
|
-
position: absolute;
|
|
16
|
-
contain: content;
|
|
17
|
-
box-sizing: border-box;
|
|
18
|
-
display: block;
|
|
19
|
-
top: 0;
|
|
20
|
-
left: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
transition: transform ease var(--kemet-carousel-slide-speed, 0.3s), opacity ease var(--kemet-carousel-slide-fade-speed, 1s);
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
:host([aria-hidden="false"]) {
|
|
27
|
-
z-index: 1;
|
|
28
|
-
transform: translate(0, 0);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/* horizontal */
|
|
32
|
-
:host([aria-hidden="true"][transition="horizontal"]) {
|
|
33
|
-
transform: translate(100%, 0);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
/* vertical */
|
|
37
|
-
:host([aria-hidden="true"][transition="vertical"]) {
|
|
38
|
-
transform: translate(0, -100%);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* fade */
|
|
42
|
-
:host([transition="fade"]) {
|
|
43
|
-
opacity: 0;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
:host([aria-hidden="false"][transition="fade"]) {
|
|
47
|
-
opacity: 1;
|
|
48
|
-
}
|
|
49
|
-
`,
|
|
50
|
-
];
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
static get properties() {
|
|
54
|
-
return {
|
|
55
|
-
seen: {
|
|
56
|
-
type: Boolean,
|
|
57
|
-
},
|
|
58
|
-
transition: {
|
|
59
|
-
type: String,
|
|
60
|
-
reflect: true,
|
|
61
|
-
},
|
|
62
|
-
'aria-hidden': {
|
|
63
|
-
type: String,
|
|
64
|
-
reflect: true,
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
constructor() {
|
|
70
|
-
super();
|
|
71
|
-
this.seen = false;
|
|
72
|
-
this.transition = 'horizontal';
|
|
73
|
-
this['aria-hidden'] = 'true';
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
render() {
|
|
77
|
-
return html`
|
|
78
|
-
<slot></slot>
|
|
79
|
-
`;
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
window.customElements.define('kemet-carousel-slide', KemetCarouselSlide);
|