rettangoli-ui 0.1.0-rc2 → 0.1.0-rc3
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/README.md +16 -27
- package/dist/rettangoli-iife-layout.min.js +98 -47
- package/dist/rettangoli-iife-ui.min.js +63 -64
- package/package.json +11 -4
- package/src/common/BaseElement.js +182 -0
- package/src/common.js +190 -0
- package/src/components/dialog/dialog.handlers.js +5 -0
- package/src/components/dialog/dialog.store.js +24 -0
- package/src/components/dialog/dialog.view.yaml +40 -0
- package/src/components/form/form.handlers.js +30 -0
- package/src/components/form/form.store.js +45 -0
- package/src/components/form/form.view.yaml +47 -0
- package/src/components/navbar/navbar.examples.yaml +86 -0
- package/src/components/navbar/navbar.handlers.js +10 -0
- package/src/components/navbar/navbar.store.js +46 -0
- package/src/components/navbar/navbar.view.yaml +74 -0
- package/src/components/pageOutline/pageOutline.handlers.js +69 -0
- package/src/components/pageOutline/pageOutline.store.js +40 -0
- package/src/components/pageOutline/pageOutline.view.yaml +34 -0
- package/src/components/popover/popover.handlers.js +17 -0
- package/src/components/popover/popover.store.js +37 -0
- package/src/components/popover/popover.view.yaml +50 -0
- package/src/components/select/select.handlers.js +15 -0
- package/src/components/select/select.store.js +25 -0
- package/src/components/select/select.view.yaml +38 -0
- package/src/components/sidebar/sidebar.handlers.js +36 -0
- package/src/components/sidebar/sidebar.store.js +125 -0
- package/src/components/sidebar/sidebar.view.yaml +186 -0
- package/src/entry-iife-layout.js +15 -0
- package/src/entry-iife-ui.js +18 -0
- package/src/index.js +17 -0
- package/src/lib/uhtml.js +9 -0
- package/src/primitives/button.js +263 -0
- package/src/primitives/image.js +234 -0
- package/src/primitives/input.js +208 -0
- package/src/primitives/svg.js +95 -0
- package/src/primitives/text.js +141 -0
- package/src/primitives/textarea.js +103 -0
- package/src/primitives/view.js +215 -0
- package/src/setup.js +16 -0
- package/src/styles/anchorStyles.js +13 -0
- package/src/styles/buttonMarginStyles.js +84 -0
- package/src/styles/cursorStyles.js +12 -0
- package/src/styles/flexChildStyles.js +43 -0
- package/src/styles/flexDirectionStyles.js +74 -0
- package/src/styles/marginStyles.js +13 -0
- package/src/styles/paddingSvgStyles.js +120 -0
- package/src/styles/scrollStyles.js +22 -0
- package/src/styles/textColorStyles.js +14 -0
- package/src/styles/textStyles.js +62 -0
- package/src/styles/viewStyles.js +119 -0
@@ -0,0 +1,103 @@
|
|
1
|
+
import { css, dimensionWithUnit } from "../common.js";
|
2
|
+
import cursorStyles from "../styles/cursorStyles.js";
|
3
|
+
import marginStyles from "../styles/marginStyles.js";
|
4
|
+
|
5
|
+
// Internal implementation without uhtml
|
6
|
+
class RettangoliTextAreaElement extends HTMLElement {
|
7
|
+
static styleSheet = null;
|
8
|
+
|
9
|
+
static initializeStyleSheet() {
|
10
|
+
if (!RettangoliTextAreaElement.styleSheet) {
|
11
|
+
RettangoliTextAreaElement.styleSheet = new CSSStyleSheet();
|
12
|
+
RettangoliTextAreaElement.styleSheet.replaceSync(css`
|
13
|
+
:host {
|
14
|
+
display: contents;
|
15
|
+
}
|
16
|
+
textarea {
|
17
|
+
font-family: inherit;
|
18
|
+
background-color: var(--background);
|
19
|
+
font-size: var(--sm-font-size);
|
20
|
+
font-weight: var(--sm-font-weight);
|
21
|
+
line-height: var(--sm-line-height);
|
22
|
+
letter-spacing: var(--sm-letter-spacing);
|
23
|
+
border: 1px solid var(--ring);
|
24
|
+
border-radius: var(--border-radius-lg);
|
25
|
+
padding-top: var(--spacing-md);
|
26
|
+
padding-bottom: var(--spacing-md);
|
27
|
+
padding-left: var(--spacing-md);
|
28
|
+
padding-right: var(--spacing-md);
|
29
|
+
color: var(--foreground);
|
30
|
+
outline: none;
|
31
|
+
}
|
32
|
+
textarea:focus {
|
33
|
+
border-color: var(--foreground);
|
34
|
+
}
|
35
|
+
${marginStyles}
|
36
|
+
${cursorStyles}
|
37
|
+
`);
|
38
|
+
}
|
39
|
+
}
|
40
|
+
|
41
|
+
constructor() {
|
42
|
+
super();
|
43
|
+
RettangoliTextAreaElement.initializeStyleSheet();
|
44
|
+
this.shadow = this.attachShadow({ mode: "closed" });
|
45
|
+
this.shadow.adoptedStyleSheets = [RettangoliTextAreaElement.styleSheet];
|
46
|
+
|
47
|
+
// Create initial DOM structure
|
48
|
+
this._textareaElement = document.createElement('textarea');
|
49
|
+
this._textareaElement.setAttribute('type', 'text');
|
50
|
+
this.shadow.appendChild(this._textareaElement);
|
51
|
+
}
|
52
|
+
|
53
|
+
static get observedAttributes() {
|
54
|
+
return ["key", "w", "ellipsis", "cols", "rows", "placeholder"];
|
55
|
+
}
|
56
|
+
|
57
|
+
get value() {
|
58
|
+
return this._textareaElement.value;
|
59
|
+
}
|
60
|
+
|
61
|
+
set value(val) {
|
62
|
+
this._textareaElement.value = val;
|
63
|
+
}
|
64
|
+
|
65
|
+
connectedCallback() {
|
66
|
+
this._updateTextareaAttributes();
|
67
|
+
}
|
68
|
+
|
69
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
70
|
+
this._updateTextareaAttributes();
|
71
|
+
}
|
72
|
+
|
73
|
+
_updateTextareaAttributes() {
|
74
|
+
const cols = this.getAttribute("cols");
|
75
|
+
const rows = this.getAttribute("rows");
|
76
|
+
const placeholder = this.getAttribute("placeholder");
|
77
|
+
|
78
|
+
if (cols !== null) {
|
79
|
+
this._textareaElement.setAttribute("cols", cols);
|
80
|
+
} else {
|
81
|
+
this._textareaElement.removeAttribute("cols");
|
82
|
+
}
|
83
|
+
|
84
|
+
if (rows !== null) {
|
85
|
+
this._textareaElement.setAttribute("rows", rows);
|
86
|
+
} else {
|
87
|
+
this._textareaElement.removeAttribute("rows");
|
88
|
+
}
|
89
|
+
|
90
|
+
if (placeholder !== null) {
|
91
|
+
this._textareaElement.setAttribute("placeholder", placeholder);
|
92
|
+
} else {
|
93
|
+
this._textareaElement.removeAttribute("placeholder");
|
94
|
+
}
|
95
|
+
}
|
96
|
+
}
|
97
|
+
|
98
|
+
// Export factory function to maintain API compatibility
|
99
|
+
export default ({ render, html }) => {
|
100
|
+
// Note: render and html parameters are accepted but not used
|
101
|
+
// This maintains backward compatibility with existing code
|
102
|
+
return RettangoliTextAreaElement;
|
103
|
+
};
|
@@ -0,0 +1,215 @@
|
|
1
|
+
import {
|
2
|
+
css,
|
3
|
+
dimensionWithUnit,
|
4
|
+
convertObjectToCssString,
|
5
|
+
styleMapKeys,
|
6
|
+
permutateBreakpoints,
|
7
|
+
} from "../common.js";
|
8
|
+
import flexDirectionStyles from "../styles/flexDirectionStyles.js";
|
9
|
+
import cursorStyles from "../styles/cursorStyles.js";
|
10
|
+
import scrollStyle from "../styles/scrollStyles.js";
|
11
|
+
import stylesGenerator from "../styles/viewStyles.js";
|
12
|
+
import marginStyles from "../styles/marginStyles.js";
|
13
|
+
import flexChildStyles from "../styles/flexChildStyles.js";
|
14
|
+
import anchorStyles from "../styles/anchorStyles.js";
|
15
|
+
|
16
|
+
// Internal implementation without uhtml
|
17
|
+
class RettangoliViewElement extends HTMLElement {
|
18
|
+
static styleSheet = null;
|
19
|
+
|
20
|
+
static initializeStyleSheet() {
|
21
|
+
if (!RettangoliViewElement.styleSheet) {
|
22
|
+
RettangoliViewElement.styleSheet = new CSSStyleSheet();
|
23
|
+
RettangoliViewElement.styleSheet.replaceSync(css`
|
24
|
+
slot {
|
25
|
+
display: contents;
|
26
|
+
}
|
27
|
+
:host {
|
28
|
+
display: flex;
|
29
|
+
flex-direction: column;
|
30
|
+
align-self: auto;
|
31
|
+
align-content: flex-start;
|
32
|
+
border-style: solid;
|
33
|
+
border-width: 0;
|
34
|
+
box-sizing: border-box;
|
35
|
+
border-color: var(--border);
|
36
|
+
}
|
37
|
+
|
38
|
+
:host([fw="w"]) {
|
39
|
+
flex-wrap: wrap;
|
40
|
+
}
|
41
|
+
|
42
|
+
${flexChildStyles}
|
43
|
+
${scrollStyle}
|
44
|
+
${flexDirectionStyles}
|
45
|
+
${marginStyles}
|
46
|
+
${cursorStyles}
|
47
|
+
${stylesGenerator}
|
48
|
+
${anchorStyles}
|
49
|
+
|
50
|
+
:host([href]) {
|
51
|
+
cursor: pointer;
|
52
|
+
position: relative;
|
53
|
+
}
|
54
|
+
|
55
|
+
:host([href]) a {
|
56
|
+
position: absolute;
|
57
|
+
top: 0;
|
58
|
+
left: 0;
|
59
|
+
right: 0;
|
60
|
+
bottom: 0;
|
61
|
+
z-index: 1;
|
62
|
+
}
|
63
|
+
`);
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
constructor() {
|
68
|
+
super();
|
69
|
+
RettangoliViewElement.initializeStyleSheet();
|
70
|
+
this.shadow = this.attachShadow({ mode: "closed" });
|
71
|
+
this.shadow.adoptedStyleSheets = [RettangoliViewElement.styleSheet];
|
72
|
+
|
73
|
+
// Create initial DOM structure
|
74
|
+
this._styleElement = document.createElement("style");
|
75
|
+
this._slotElement = document.createElement("slot");
|
76
|
+
this._linkElement = null;
|
77
|
+
|
78
|
+
this.shadow.appendChild(this._styleElement);
|
79
|
+
this._updateDOM();
|
80
|
+
}
|
81
|
+
|
82
|
+
static get observedAttributes() {
|
83
|
+
return [
|
84
|
+
"href",
|
85
|
+
"target",
|
86
|
+
...permutateBreakpoints([
|
87
|
+
...styleMapKeys,
|
88
|
+
"wh",
|
89
|
+
"w",
|
90
|
+
"h",
|
91
|
+
"hidden",
|
92
|
+
"sh",
|
93
|
+
"sv",
|
94
|
+
]),
|
95
|
+
];
|
96
|
+
}
|
97
|
+
|
98
|
+
_styles = {
|
99
|
+
default: {},
|
100
|
+
sm: {},
|
101
|
+
md: {},
|
102
|
+
lg: {},
|
103
|
+
xl: {},
|
104
|
+
};
|
105
|
+
|
106
|
+
_lastStyleString = "";
|
107
|
+
|
108
|
+
_updateDOM() {
|
109
|
+
const href = this.getAttribute("href");
|
110
|
+
const target = this.getAttribute("target");
|
111
|
+
|
112
|
+
// Ensure slot is always in the shadow DOM
|
113
|
+
if (this._slotElement.parentNode !== this.shadow) {
|
114
|
+
this.shadow.appendChild(this._slotElement);
|
115
|
+
}
|
116
|
+
|
117
|
+
if (href) {
|
118
|
+
if (!this._linkElement) {
|
119
|
+
// Create link overlay only if it doesn't exist
|
120
|
+
this._linkElement = document.createElement("a");
|
121
|
+
this.shadow.appendChild(this._linkElement);
|
122
|
+
}
|
123
|
+
|
124
|
+
// Update link attributes
|
125
|
+
this._linkElement.href = href;
|
126
|
+
if (target) {
|
127
|
+
this._linkElement.target = target;
|
128
|
+
} else {
|
129
|
+
this._linkElement.removeAttribute("target");
|
130
|
+
}
|
131
|
+
} else if (this._linkElement) {
|
132
|
+
// Remove link overlay
|
133
|
+
this.shadow.removeChild(this._linkElement);
|
134
|
+
this._linkElement = null;
|
135
|
+
}
|
136
|
+
}
|
137
|
+
|
138
|
+
attributeChangedCallback(name, oldValue, newValue) {
|
139
|
+
// Handle href and target changes
|
140
|
+
if (name === "href" || name === "target") {
|
141
|
+
this._updateDOM();
|
142
|
+
return;
|
143
|
+
}
|
144
|
+
// Reset styles for fresh calculation
|
145
|
+
this._styles = {
|
146
|
+
default: {},
|
147
|
+
sm: {},
|
148
|
+
md: {},
|
149
|
+
lg: {},
|
150
|
+
xl: {},
|
151
|
+
};
|
152
|
+
|
153
|
+
["default", "sm", "md", "lg", "xl"].forEach((size) => {
|
154
|
+
const addSizePrefix = (tag) => {
|
155
|
+
return `${size === "default" ? "" : `${size}-`}${tag}`;
|
156
|
+
};
|
157
|
+
|
158
|
+
const wh = this.getAttribute(addSizePrefix("wh"));
|
159
|
+
const width = dimensionWithUnit(
|
160
|
+
wh === null ? this.getAttribute(addSizePrefix("w")) : wh,
|
161
|
+
);
|
162
|
+
const height = dimensionWithUnit(
|
163
|
+
wh === null ? this.getAttribute(addSizePrefix("h")) : wh,
|
164
|
+
);
|
165
|
+
const opacity = this.getAttribute(addSizePrefix("op"));
|
166
|
+
const zIndex = this.getAttribute(addSizePrefix("z"));
|
167
|
+
|
168
|
+
if (zIndex !== null) {
|
169
|
+
this._styles[size]["z-index"] = zIndex;
|
170
|
+
}
|
171
|
+
|
172
|
+
if (opacity !== null) {
|
173
|
+
this._styles[size].opacity = opacity;
|
174
|
+
}
|
175
|
+
|
176
|
+
if (width === "f") {
|
177
|
+
this._styles[size].width = "var(--width-stretch)";
|
178
|
+
} else if (width !== undefined) {
|
179
|
+
this._styles[size].width = width;
|
180
|
+
this._styles[size]["min-width"] = width;
|
181
|
+
this._styles[size]["max-width"] = width;
|
182
|
+
}
|
183
|
+
|
184
|
+
if (height === "f") {
|
185
|
+
this._styles[size].height = "100%";
|
186
|
+
} else if (height !== undefined) {
|
187
|
+
this._styles[size].height = height;
|
188
|
+
this._styles[size]["min-height"] = height;
|
189
|
+
this._styles[size]["max-height"] = height;
|
190
|
+
}
|
191
|
+
|
192
|
+
if (this.hasAttribute(addSizePrefix("hidden"))) {
|
193
|
+
this._styles[size].display = "none !important";
|
194
|
+
}
|
195
|
+
|
196
|
+
if (this.hasAttribute(addSizePrefix("visible"))) {
|
197
|
+
this._styles[size].display = "flex !important";
|
198
|
+
}
|
199
|
+
});
|
200
|
+
|
201
|
+
// Update styles only if changed
|
202
|
+
const newStyleString = convertObjectToCssString(this._styles);
|
203
|
+
if (newStyleString !== this._lastStyleString) {
|
204
|
+
this._styleElement.textContent = newStyleString;
|
205
|
+
this._lastStyleString = newStyleString;
|
206
|
+
}
|
207
|
+
}
|
208
|
+
}
|
209
|
+
|
210
|
+
// Export factory function to maintain API compatibility
|
211
|
+
export default ({ render, html }) => {
|
212
|
+
// Note: render and html parameters are accepted but not used
|
213
|
+
// This maintains backward compatibility with existing code
|
214
|
+
return RettangoliViewElement;
|
215
|
+
};
|
package/src/setup.js
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
import { createWebPatch } from 'rettangoli-fe';
|
2
|
+
import { h } from 'snabbdom/build/h';
|
3
|
+
|
4
|
+
const componentDependencies = {}
|
5
|
+
|
6
|
+
const deps = {
|
7
|
+
components: componentDependencies,
|
8
|
+
}
|
9
|
+
|
10
|
+
const patch = createWebPatch();
|
11
|
+
|
12
|
+
export {
|
13
|
+
h,
|
14
|
+
patch,
|
15
|
+
deps,
|
16
|
+
}
|
@@ -0,0 +1,84 @@
|
|
1
|
+
import { generateCSS, spacing } from "../common.js";
|
2
|
+
|
3
|
+
const styles = {
|
4
|
+
mt: spacing,
|
5
|
+
mr: spacing,
|
6
|
+
mb: spacing,
|
7
|
+
ml: spacing,
|
8
|
+
m: spacing,
|
9
|
+
mh: spacing,
|
10
|
+
mv: spacing,
|
11
|
+
s: {
|
12
|
+
sm: `
|
13
|
+
height: 28px;
|
14
|
+
padding-left: 12px;
|
15
|
+
padding-right: 12px;
|
16
|
+
border-radius: 4px;
|
17
|
+
font-size: var(--xs-font-size);
|
18
|
+
font-weight: var(--xs-font-weight);
|
19
|
+
line-height: var(--xs-line-height);
|
20
|
+
letter-spacing: var(--xs-letter-spacing);
|
21
|
+
`,
|
22
|
+
md: `
|
23
|
+
height: 32px;
|
24
|
+
padding-left: 16px;
|
25
|
+
padding-right: 16px;
|
26
|
+
border-radius: 4px;
|
27
|
+
font-size: var(--sm-font-size);
|
28
|
+
font-weight: var(--sm-font-weight);
|
29
|
+
line-height: var(--sm-line-height);
|
30
|
+
letter-spacing: var(--sm-letter-spacing);
|
31
|
+
`,
|
32
|
+
lg: `
|
33
|
+
height: 40px;
|
34
|
+
padding-left: 20px;
|
35
|
+
padding-right: 20px;
|
36
|
+
border-radius: 4px;
|
37
|
+
font-size: var(--md-font-size);
|
38
|
+
font-weight: var(--md-font-weight);
|
39
|
+
line-height: var(--md-line-height);
|
40
|
+
letter-spacing: var(--md-letter-spacing);
|
41
|
+
`,
|
42
|
+
},
|
43
|
+
v: {
|
44
|
+
pr: `
|
45
|
+
background-color: var(--primary);
|
46
|
+
color: var(--primary-foreground);
|
47
|
+
`,
|
48
|
+
se: `
|
49
|
+
background-color: var(--secondary);
|
50
|
+
color: var(--secondary-foreground);
|
51
|
+
`,
|
52
|
+
de: `
|
53
|
+
background-color: var(--destructive);
|
54
|
+
color: var(--primary-foreground);
|
55
|
+
`,
|
56
|
+
ol: `
|
57
|
+
background-color: transparent;
|
58
|
+
color: var(--foreground);
|
59
|
+
border-width: 1px;
|
60
|
+
`,
|
61
|
+
gh: `
|
62
|
+
background-color: transparent;
|
63
|
+
color: var(--foreground);
|
64
|
+
`,
|
65
|
+
lk: `
|
66
|
+
background-color: transparent;
|
67
|
+
color: var(--foreground);
|
68
|
+
`,
|
69
|
+
},
|
70
|
+
};
|
71
|
+
|
72
|
+
const descendants = {
|
73
|
+
mt: "button",
|
74
|
+
mr: "button",
|
75
|
+
mb: "button",
|
76
|
+
ml: "button",
|
77
|
+
m: "button",
|
78
|
+
mh: "button",
|
79
|
+
mv: "button",
|
80
|
+
s: "button",
|
81
|
+
v: "button",
|
82
|
+
};
|
83
|
+
|
84
|
+
export default generateCSS(styles, descendants);
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import { css } from '../common.js'
|
2
|
+
|
3
|
+
export default css`
|
4
|
+
:host([flex="0"]) {
|
5
|
+
flex: 0;
|
6
|
+
}
|
7
|
+
:host([flex="1"]) {
|
8
|
+
flex: 1;
|
9
|
+
}
|
10
|
+
:host([flex="2"]) {
|
11
|
+
flex: 2;
|
12
|
+
}
|
13
|
+
:host([flex="3"]) {
|
14
|
+
flex: 3;
|
15
|
+
}
|
16
|
+
:host([flex="4"]) {
|
17
|
+
flex: 4;
|
18
|
+
}
|
19
|
+
:host([flex="5"]) {
|
20
|
+
flex: 5;
|
21
|
+
}
|
22
|
+
:host([flex="6"]) {
|
23
|
+
flex: 6;
|
24
|
+
}
|
25
|
+
:host([flex="7"]) {
|
26
|
+
flex: 7;
|
27
|
+
}
|
28
|
+
:host([flex="8"]) {
|
29
|
+
flex: 8;
|
30
|
+
}
|
31
|
+
:host([flex="9"]) {
|
32
|
+
flex: 9;
|
33
|
+
}
|
34
|
+
:host([flex="10"]) {
|
35
|
+
flex: 10;
|
36
|
+
}
|
37
|
+
:host([flex="11"]) {
|
38
|
+
flex: 11;
|
39
|
+
}
|
40
|
+
:host([flex="12"]) {
|
41
|
+
flex: 12;
|
42
|
+
}
|
43
|
+
`
|
@@ -0,0 +1,74 @@
|
|
1
|
+
import { css } from "../common.js";
|
2
|
+
|
3
|
+
export default css`
|
4
|
+
|
5
|
+
:host([d="h"]) {
|
6
|
+
flex-direction: row;
|
7
|
+
}
|
8
|
+
:host([d="v"]) {
|
9
|
+
flex-direction: column;
|
10
|
+
}
|
11
|
+
:host([d="h"]:not([ah])) {
|
12
|
+
justify-content: flex-start;
|
13
|
+
}
|
14
|
+
:host([d="h"][ah="c"]) {
|
15
|
+
justify-content: center;
|
16
|
+
}
|
17
|
+
:host([d="h"][ah="e"]) {
|
18
|
+
justify-content: flex-end;
|
19
|
+
}
|
20
|
+
:host([d="h"]:not([av])) {
|
21
|
+
align-items: flex-start;
|
22
|
+
}
|
23
|
+
:host([d="h"][av="c"]) {
|
24
|
+
align-items: center;
|
25
|
+
align-content: center;
|
26
|
+
}
|
27
|
+
:host([d="h"][av="e"]) {
|
28
|
+
align-items: flex-end;
|
29
|
+
align-content: flex-end;
|
30
|
+
}
|
31
|
+
|
32
|
+
/* Default/vertical direction - horizontal alignment */
|
33
|
+
:host(:not([d]):not([ah])),
|
34
|
+
:host([d="v"]:not([ah])) {
|
35
|
+
align-items: flex-start;
|
36
|
+
}
|
37
|
+
:host(:not([d])[ah="c"]),
|
38
|
+
:host([d="v"][ah="c"]) {
|
39
|
+
align-items: center;
|
40
|
+
}
|
41
|
+
:host(:not([d])[ah="e"]),
|
42
|
+
:host([d="v"][ah="e"]) {
|
43
|
+
align-items: flex-end;
|
44
|
+
}
|
45
|
+
|
46
|
+
:host(:not([d]):not([av])),
|
47
|
+
:host([d="v"]:not([av])) {
|
48
|
+
justify-content: flex-start;
|
49
|
+
}
|
50
|
+
:host(:not([d])[av="c"]),
|
51
|
+
:host([d="v"][av="c"]) {
|
52
|
+
justify-content: center;
|
53
|
+
}
|
54
|
+
:host(:not([d])[av="e"]),
|
55
|
+
:host([d="v"][av="e"]) {
|
56
|
+
justify-content: flex-end;
|
57
|
+
}
|
58
|
+
|
59
|
+
@media screen and (max-width: 640px) {
|
60
|
+
:host([s-d="v"]) {
|
61
|
+
flex-direction: column;
|
62
|
+
}
|
63
|
+
:host([s-d="h"]) {
|
64
|
+
flex-direction: row;
|
65
|
+
}
|
66
|
+
:host([s-d="h"][s-av="c"]) {
|
67
|
+
align-items: center;
|
68
|
+
align-content: center;
|
69
|
+
}
|
70
|
+
:host([s-d="v"][s-av="c"]) {
|
71
|
+
justify-content: center;
|
72
|
+
}
|
73
|
+
}
|
74
|
+
`;
|
@@ -0,0 +1,120 @@
|
|
1
|
+
|
2
|
+
import { css } from '../common.js'
|
3
|
+
|
4
|
+
export default css`
|
5
|
+
:host([pt="xs"]) svg {
|
6
|
+
padding-top: var(--spacing-xs);
|
7
|
+
}
|
8
|
+
:host([pt="sm"]) svg {
|
9
|
+
padding-top: var(--spacing-sm);
|
10
|
+
}
|
11
|
+
:host([pt="md"]) svg {
|
12
|
+
padding-top: var(--spacing-md);
|
13
|
+
}
|
14
|
+
:host([pt="lg"]) svg {
|
15
|
+
padding-top: var(--spacing-lg);
|
16
|
+
}
|
17
|
+
:host([pt="xl"]) svg {
|
18
|
+
padding-top: var(--spacing-xl);
|
19
|
+
}
|
20
|
+
:host([pr="xs"]) svg {
|
21
|
+
padding-right: var(--spacing-xs);
|
22
|
+
}
|
23
|
+
:host([pr="sm"]) svg {
|
24
|
+
padding-right: var(--spacing-sm);
|
25
|
+
}
|
26
|
+
:host([pr="md"]) svg {
|
27
|
+
padding-right: var(--spacing-md);
|
28
|
+
}
|
29
|
+
:host([pr="lg"]) svg {
|
30
|
+
padding-right: var(--spacing-lg);
|
31
|
+
}
|
32
|
+
:host([pr="xl"]) svg {
|
33
|
+
padding-right: var(--spacing-xl);
|
34
|
+
}
|
35
|
+
:host([pb="xs"]) svg {
|
36
|
+
padding-bottom: var(--spacing-xs);
|
37
|
+
}
|
38
|
+
:host([pb="sm"]) svg {
|
39
|
+
padding-bottom: var(--spacing-sm);
|
40
|
+
}
|
41
|
+
:host([pb="md"]) svg {
|
42
|
+
padding-bottom: var(--spacing-md);
|
43
|
+
}
|
44
|
+
:host([pb="lg"]) svg {
|
45
|
+
padding-bottom: var(--spacing-lg);
|
46
|
+
}
|
47
|
+
:host([pb="xl"]) svg {
|
48
|
+
padding-bottom: var(--spacing-xl);
|
49
|
+
}
|
50
|
+
:host([pl="xs"]) svg {
|
51
|
+
padding-left: var(--spacing-xs);
|
52
|
+
}
|
53
|
+
:host([pl="sm"]) svg {
|
54
|
+
padding-left: var(--spacing-sm);
|
55
|
+
}
|
56
|
+
:host([pl="md"]) svg {
|
57
|
+
padding-left: var(--spacing-md);
|
58
|
+
}
|
59
|
+
:host([pl="lg"]) svg {
|
60
|
+
padding-left: var(--spacing-lg);
|
61
|
+
}
|
62
|
+
:host([pl="xl"]) svg {
|
63
|
+
padding-left: var(--spacing-xl);
|
64
|
+
}
|
65
|
+
:host([p="xs"]) svg {
|
66
|
+
padding: var(--spacing-xs);
|
67
|
+
}
|
68
|
+
:host([p="sm"]) svg {
|
69
|
+
padding: var(--spacing-sm);
|
70
|
+
}
|
71
|
+
:host([p="md"]) svg {
|
72
|
+
padding: var(--spacing-md);
|
73
|
+
}
|
74
|
+
:host([p="lg"]) svg {
|
75
|
+
padding: var(--spacing-lg);
|
76
|
+
}
|
77
|
+
:host([p="xl"]) svg {
|
78
|
+
padding: var(--spacing-xl);
|
79
|
+
}
|
80
|
+
:host([ph="xs"]) svg {
|
81
|
+
padding-left: var(--spacing-xs);
|
82
|
+
padding-right: var(--spacing-xs);
|
83
|
+
}
|
84
|
+
:host([ph="sm"]) svg {
|
85
|
+
padding-left: var(--spacing-sm);
|
86
|
+
padding-right: var(--spacing-sm);
|
87
|
+
}
|
88
|
+
:host([ph="md"]) svg {
|
89
|
+
padding-left: var(--spacing-md);
|
90
|
+
padding-right: var(--spacing-md);
|
91
|
+
}
|
92
|
+
:host([ph="lg"]) svg {
|
93
|
+
padding-left: var(--spacing-lg);
|
94
|
+
padding-right: var(--spacing-lg);
|
95
|
+
}
|
96
|
+
:host([ph="xl"]) svg {
|
97
|
+
padding-left: var(--spacing-xl);
|
98
|
+
padding-right: var(--spacing-xl);
|
99
|
+
}
|
100
|
+
:host([pv="xs"]) svg {
|
101
|
+
padding-top: var(--spacing-xs);
|
102
|
+
padding-bottom: var(--spacing-xs);
|
103
|
+
}
|
104
|
+
:host([pv="sm"]) svg {
|
105
|
+
padding-top: var(--spacing-sm);
|
106
|
+
padding-bottom: var(--spacing-sm);
|
107
|
+
}
|
108
|
+
:host([pv="md"]) svg {
|
109
|
+
padding-top: var(--spacing-md);
|
110
|
+
padding-bottom: var(--spacing-md);
|
111
|
+
}
|
112
|
+
:host([pv="lg"]) svg {
|
113
|
+
padding-top: var(--spacing-lg);
|
114
|
+
padding-bottom: var(--spacing-lg);
|
115
|
+
}
|
116
|
+
:host([pv="xl"]) svg {
|
117
|
+
padding-top: var(--spacing-xl);
|
118
|
+
padding-bottom: var(--spacing-xl);
|
119
|
+
}
|
120
|
+
`
|