timvir 0.2.39 → 0.2.43
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/CHANGELOG.md +26 -0
- package/blocks/Arbitrary/Arbitrary.d.ts +1 -1
- package/blocks/Arbitrary/index.js +200 -47
- package/blocks/Arbitrary/styles.css +222 -6
- package/blocks/Code/Code.d.ts +0 -6
- package/blocks/Code/docs/index.mdx +0 -11
- package/blocks/Code/index.js +211 -110
- package/blocks/Code/styles.css +158 -15
- package/blocks/ColorBar/docs/index.mdx +8 -2
- package/blocks/ColorBar/index.js +205 -46
- package/blocks/ColorBar/styles.css +157 -4
- package/blocks/ColorBook/docs/index.mdx +1 -1
- package/blocks/ColorBook/index.js +205 -39
- package/blocks/ColorBook/styles.css +224 -6
- package/blocks/Cover/index.js +175 -34
- package/blocks/Cover/styles.css +82 -0
- package/blocks/Exhibit/index.js +199 -40
- package/blocks/Exhibit/styles.css +126 -3
- package/blocks/Font/index.js +196 -58
- package/blocks/Font/styles.css +142 -8
- package/blocks/Grid/docs/index.mdx +4 -4
- package/blocks/Grid/index.js +183 -33
- package/blocks/Grid/styles.css +78 -1
- package/blocks/Icon/docs/index.mdx +13 -13
- package/blocks/Icon/index.js +25 -43
- package/blocks/Icon/styles.css +117 -5
- package/blocks/Message/docs/index.mdx +5 -8
- package/blocks/Message/index.js +240 -54
- package/blocks/Message/styles.css +154 -6
- package/blocks/Swatch/docs/index.mdx +16 -16
- package/blocks/Swatch/index.js +187 -34
- package/blocks/Swatch/styles.css +142 -4
- package/blocks/Viewport/index.js +209 -89
- package/blocks/Viewport/styles.css +313 -14
- package/blocks/WebLink/index.js +199 -47
- package/blocks/WebLink/styles.css +226 -8
- package/blocks/styles.css +2158 -97
- package/builtins/components.d.ts +2 -2
- package/builtins/index.d.ts +0 -1
- package/builtins/index.js +307 -243
- package/builtins/styles.css +323 -25
- package/context/index.d.ts +6 -1
- package/core/components/Commands/Commands.d.ts +5 -1
- package/core/components/NavigationFooter/NavigationFooter.d.ts +4 -2
- package/core/components/Page/Page.d.ts +12 -3
- package/core/components/Page/docs/index.mdx +44 -11
- package/core/index.d.ts +191 -2
- package/core/index.js +415 -256
- package/core/layout.d.ts +41 -0
- package/core/styles.css +857 -88
- package/global.css +79 -0
- package/internal/cx.d.ts +1 -0
- package/package.json +1 -2
- package/search/index.js +2 -223
- package/styles.css +3426 -235
- package/blocks/Code/theme.d.ts +0 -2
- package/bus/styles.css +0 -1
- package/context/styles.css +0 -1
- package/core/theme/index.d.ts +0 -1
- package/hooks/styles.css +0 -1
- package/search/Search/internal/Dialog.d.ts +0 -20
- package/search/Search/internal/index.d.ts +0 -1
- package/search/SearchBoxInput/SearchBoxInput.d.ts +0 -11
- package/search/SearchBoxInput/docs/api.mdx +0 -76
- package/search/SearchBoxInput/docs/index.mdx +0 -6
- package/search/SearchBoxInput/index.d.ts +0 -1
- package/search/SearchBoxInput/samples/basic.d.ts +0 -1
- package/search/SearchBoxListItem/SearchBoxListItem.d.ts +0 -13
- package/search/SearchBoxListItem/docs/api.mdx +0 -76
- package/search/SearchBoxListItem/docs/index.mdx +0 -30
- package/search/SearchBoxListItem/index.d.ts +0 -1
- package/search/SearchBoxListItem/samples/basic.d.ts +0 -1
- package/search/styles.css +0 -16
package/blocks/Grid/index.js
CHANGED
|
@@ -1,55 +1,205 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { jsx } from 'react/jsx-runtime';
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
function cx(...args) {
|
|
5
|
+
let str = "";
|
|
6
|
+
for (let i = 0; i < args.length; i++) {
|
|
7
|
+
const arg = args[i];
|
|
8
|
+
if (typeof arg === "string") {
|
|
9
|
+
str += (str && " ") + arg;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return str;
|
|
13
|
+
}
|
|
5
14
|
|
|
6
|
-
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
individualClassNames.forEach((className) => {
|
|
14
|
-
if (className.startsWith("atm_")) {
|
|
15
|
-
const [, keyHash] = className.split("_");
|
|
16
|
-
atomicClasses[keyHash] = className;
|
|
17
|
-
} else {
|
|
18
|
-
nonAtomicClasses.push(className);
|
|
19
|
-
}
|
|
15
|
+
var styleq = {};
|
|
16
|
+
var hasRequiredStyleq;
|
|
17
|
+
function requireStyleq() {
|
|
18
|
+
if (hasRequiredStyleq) return styleq;
|
|
19
|
+
hasRequiredStyleq = 1;
|
|
20
|
+
Object.defineProperty(styleq, "__esModule", {
|
|
21
|
+
value: true
|
|
20
22
|
});
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
styleq.styleq = void 0;
|
|
24
|
+
var cache = new WeakMap();
|
|
25
|
+
var compiledKey = '$$css';
|
|
26
|
+
function createStyleq(options) {
|
|
27
|
+
var disableCache;
|
|
28
|
+
var disableMix;
|
|
29
|
+
var transform;
|
|
30
|
+
if (options != null) {
|
|
31
|
+
disableCache = options.disableCache === true;
|
|
32
|
+
disableMix = options.disableMix === true;
|
|
33
|
+
transform = options.transform;
|
|
34
|
+
}
|
|
35
|
+
return function styleq() {
|
|
36
|
+
var definedProperties = [];
|
|
37
|
+
var className = '';
|
|
38
|
+
var inlineStyle = null;
|
|
39
|
+
var debugString = '';
|
|
40
|
+
var nextCache = disableCache ? null : cache;
|
|
41
|
+
var styles = new Array(arguments.length);
|
|
42
|
+
for(var i = 0; i < arguments.length; i++){
|
|
43
|
+
styles[i] = arguments[i];
|
|
44
|
+
}
|
|
45
|
+
while(styles.length > 0){
|
|
46
|
+
var possibleStyle = styles.pop();
|
|
47
|
+
if (possibleStyle == null || possibleStyle === false) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (Array.isArray(possibleStyle)) {
|
|
51
|
+
for(var _i = 0; _i < possibleStyle.length; _i++){
|
|
52
|
+
styles.push(possibleStyle[_i]);
|
|
53
|
+
}
|
|
54
|
+
continue;
|
|
55
|
+
}
|
|
56
|
+
var style = transform != null ? transform(possibleStyle) : possibleStyle;
|
|
57
|
+
if (style.$$css != null) {
|
|
58
|
+
var classNameChunk = '';
|
|
59
|
+
if (nextCache != null && nextCache.has(style)) {
|
|
60
|
+
var cacheEntry = nextCache.get(style);
|
|
61
|
+
if (cacheEntry != null) {
|
|
62
|
+
classNameChunk = cacheEntry[0];
|
|
63
|
+
debugString = cacheEntry[2];
|
|
64
|
+
definedProperties.push.apply(definedProperties, cacheEntry[1]);
|
|
65
|
+
nextCache = cacheEntry[3];
|
|
66
|
+
}
|
|
67
|
+
} else {
|
|
68
|
+
var definedPropertiesChunk = [];
|
|
69
|
+
for(var prop in style){
|
|
70
|
+
var value = style[prop];
|
|
71
|
+
if (prop === compiledKey) {
|
|
72
|
+
var compiledKeyValue = style[prop];
|
|
73
|
+
if (compiledKeyValue !== true) {
|
|
74
|
+
debugString = debugString ? compiledKeyValue + '; ' + debugString : compiledKeyValue;
|
|
75
|
+
}
|
|
76
|
+
continue;
|
|
77
|
+
}
|
|
78
|
+
if (typeof value === 'string' || value === null) {
|
|
79
|
+
if (!definedProperties.includes(prop)) {
|
|
80
|
+
definedProperties.push(prop);
|
|
81
|
+
if (nextCache != null) {
|
|
82
|
+
definedPropertiesChunk.push(prop);
|
|
83
|
+
}
|
|
84
|
+
if (typeof value === 'string') {
|
|
85
|
+
classNameChunk += classNameChunk ? ' ' + value : value;
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} else {
|
|
89
|
+
console.error("styleq: ".concat(prop, " typeof ").concat(String(value), " is not \"string\" or \"null\"."));
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
if (nextCache != null) {
|
|
93
|
+
var weakMap = new WeakMap();
|
|
94
|
+
nextCache.set(style, [
|
|
95
|
+
classNameChunk,
|
|
96
|
+
definedPropertiesChunk,
|
|
97
|
+
debugString,
|
|
98
|
+
weakMap
|
|
99
|
+
]);
|
|
100
|
+
nextCache = weakMap;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
if (classNameChunk) {
|
|
104
|
+
className = className ? classNameChunk + ' ' + className : classNameChunk;
|
|
105
|
+
}
|
|
106
|
+
} else {
|
|
107
|
+
if (disableMix) {
|
|
108
|
+
if (inlineStyle == null) {
|
|
109
|
+
inlineStyle = {};
|
|
110
|
+
}
|
|
111
|
+
inlineStyle = Object.assign({}, style, inlineStyle);
|
|
112
|
+
} else {
|
|
113
|
+
var subStyle = null;
|
|
114
|
+
for(var _prop in style){
|
|
115
|
+
var _value = style[_prop];
|
|
116
|
+
if (_value !== undefined) {
|
|
117
|
+
if (!definedProperties.includes(_prop)) {
|
|
118
|
+
if (_value != null) {
|
|
119
|
+
if (inlineStyle == null) {
|
|
120
|
+
inlineStyle = {};
|
|
121
|
+
}
|
|
122
|
+
if (subStyle == null) {
|
|
123
|
+
subStyle = {};
|
|
124
|
+
}
|
|
125
|
+
subStyle[_prop] = _value;
|
|
126
|
+
}
|
|
127
|
+
definedProperties.push(_prop);
|
|
128
|
+
nextCache = null;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (subStyle != null) {
|
|
133
|
+
inlineStyle = Object.assign(subStyle, inlineStyle);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
var styleProps = [
|
|
139
|
+
className,
|
|
140
|
+
inlineStyle,
|
|
141
|
+
debugString
|
|
142
|
+
];
|
|
143
|
+
return styleProps;
|
|
144
|
+
};
|
|
26
145
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
var
|
|
146
|
+
var styleq$1 = styleq.styleq = createStyleq();
|
|
147
|
+
styleq$1.factory = createStyleq;
|
|
148
|
+
return styleq;
|
|
149
|
+
}
|
|
150
|
+
var styleqExports = requireStyleq();
|
|
151
|
+
function props(...styles) {
|
|
152
|
+
const [className, style, dataStyleSrc] = styleqExports.styleq(styles);
|
|
153
|
+
const result = {};
|
|
154
|
+
if (className != null && className !== '') {
|
|
155
|
+
result.className = className;
|
|
156
|
+
}
|
|
157
|
+
if (style != null && Object.keys(style).length > 0) {
|
|
158
|
+
result.style = style;
|
|
159
|
+
}
|
|
160
|
+
if (dataStyleSrc != null && dataStyleSrc !== '') {
|
|
161
|
+
result['data-style-src'] = dataStyleSrc;
|
|
162
|
+
}
|
|
163
|
+
return result;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
const layoutStyles = {
|
|
167
|
+
block: {
|
|
168
|
+
kBCFzs: "timvir-s-htle6",
|
|
169
|
+
k7Eaqz: "timvir-s-euugli",
|
|
170
|
+
kogj98: "timvir-s-1t4wa6b",
|
|
171
|
+
$$css: true
|
|
172
|
+
}};
|
|
32
173
|
|
|
33
|
-
/**
|
|
34
|
-
* The underlying DOM element which is rendered by this component.
|
|
35
|
-
*/
|
|
36
174
|
const Root = "div";
|
|
37
|
-
function Grid(props, ref) {
|
|
175
|
+
function Grid(props$1, ref) {
|
|
38
176
|
const {
|
|
39
177
|
children,
|
|
40
178
|
className,
|
|
41
179
|
...rest
|
|
42
|
-
} = props;
|
|
180
|
+
} = props$1;
|
|
181
|
+
const rootStyleProps = props(layoutStyles.block, styles.root);
|
|
43
182
|
return /*#__PURE__*/jsx(Root, {
|
|
44
183
|
ref: ref,
|
|
45
|
-
className: cx_default(className, classes.root),
|
|
46
184
|
...rest,
|
|
185
|
+
...rootStyleProps,
|
|
186
|
+
style: {
|
|
187
|
+
...rootStyleProps.style,
|
|
188
|
+
...rest.style
|
|
189
|
+
},
|
|
190
|
+
className: cx(className, rootStyleProps.className),
|
|
47
191
|
children: children
|
|
48
192
|
});
|
|
49
193
|
}
|
|
50
194
|
var Grid$1 = /*#__PURE__*/React.forwardRef(Grid);
|
|
51
|
-
const
|
|
52
|
-
root:
|
|
195
|
+
const styles = {
|
|
196
|
+
root: {
|
|
197
|
+
k1xSpc: "timvir-s-rvj5dj",
|
|
198
|
+
kumcoG: "timvir-s-1ayh3g3",
|
|
199
|
+
kOIVth: "timvir-s-fww3rt",
|
|
200
|
+
"--timvir-margin": "timvir-s-1cca2ej",
|
|
201
|
+
$$css: true
|
|
202
|
+
}
|
|
53
203
|
};
|
|
54
204
|
|
|
55
205
|
export { Grid$1 as Grid };
|
package/blocks/Grid/styles.css
CHANGED
|
@@ -1,2 +1,79 @@
|
|
|
1
|
-
|
|
1
|
+
@layer priority1 {
|
|
2
|
+
.timvir-s-1cca2ej {
|
|
3
|
+
--timvir-margin: calc(var(--timvir-page-margin, 24px) * .5);
|
|
4
|
+
}
|
|
2
5
|
|
|
6
|
+
.timvir-s-1f9b50e {
|
|
7
|
+
--timvir-margin: var(--timvir-page-margin);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.timvir-s-1hz7z82 {
|
|
11
|
+
--timvir-page-margin: 16px;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
@media (width >= 48rem) {
|
|
15
|
+
.timvir-s-1i3za4p.timvir-s-1i3za4p {
|
|
16
|
+
--timvir-page-margin: 24px;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
@layer priority2 {
|
|
22
|
+
.timvir-s-1t4wa6b {
|
|
23
|
+
margin: 0 0 2rem;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
@layer priority3 {
|
|
28
|
+
.timvir-s-fww3rt {
|
|
29
|
+
gap: var(--timvir-page-margin, 24px);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.timvir-s-htle6 {
|
|
33
|
+
grid-column: lc / rc;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.timvir-s-1ywaqmw {
|
|
37
|
+
grid-column: le / re;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.timvir-s-bldiei {
|
|
41
|
+
grid-column: lex / rex;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@layer priority4 {
|
|
46
|
+
.timvir-s-rvj5dj {
|
|
47
|
+
display: grid;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.timvir-s-3xbxsf {
|
|
51
|
+
grid-auto-rows: min-content;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.timvir-s-12c0rpe {
|
|
55
|
+
grid-template-columns: [le] var(--timvir-page-margin) [lex lc] 1fr[rc rex] var(--timvir-page-margin) [re];
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.timvir-s-1ayh3g3 {
|
|
59
|
+
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
@media (width >= 72rem) {
|
|
63
|
+
.timvir-s-1mxrek7.timvir-s-1mxrek7 {
|
|
64
|
+
grid-template-columns: [le] 1fr var(--timvir-page-margin) [lex] minmax(0, 12rem) [lc] 48rem[rc] minmax(0, 12rem) [rex] var(--timvir-page-margin) 1fr[re];
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
@media (width >= 48rem) {
|
|
69
|
+
.timvir-s-9q0i6z.timvir-s-9q0i6z {
|
|
70
|
+
grid-template-columns: [le] var(--timvir-page-margin) [lex] 1fr[lc] minmax(0, 48rem) [rc] 1fr[rex] var(--timvir-page-margin) [re];
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
@layer priority5 {
|
|
76
|
+
.timvir-s-euugli {
|
|
77
|
+
min-width: 0;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
@@ -17,7 +17,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
17
17
|
{
|
|
18
18
|
size: 12,
|
|
19
19
|
Component: () => (
|
|
20
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
20
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
21
21
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
22
22
|
</svg>
|
|
23
23
|
),
|
|
@@ -42,7 +42,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
42
42
|
{
|
|
43
43
|
size: 12,
|
|
44
44
|
Component: () => (
|
|
45
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
45
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
46
46
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
47
47
|
</svg>
|
|
48
48
|
),
|
|
@@ -57,7 +57,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
57
57
|
{
|
|
58
58
|
size: 12,
|
|
59
59
|
Component: () => (
|
|
60
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
60
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
61
61
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
62
62
|
</svg>
|
|
63
63
|
),
|
|
@@ -72,7 +72,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
72
72
|
{
|
|
73
73
|
size: 12,
|
|
74
74
|
Component: () => (
|
|
75
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
75
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
76
76
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
77
77
|
</svg>
|
|
78
78
|
),
|
|
@@ -87,7 +87,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
87
87
|
{
|
|
88
88
|
size: 12,
|
|
89
89
|
Component: () => (
|
|
90
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
90
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
91
91
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
92
92
|
</svg>
|
|
93
93
|
),
|
|
@@ -102,7 +102,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
102
102
|
{
|
|
103
103
|
size: 12,
|
|
104
104
|
Component: () => (
|
|
105
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
105
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
106
106
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
107
107
|
</svg>
|
|
108
108
|
),
|
|
@@ -117,7 +117,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
117
117
|
{
|
|
118
118
|
size: 12,
|
|
119
119
|
Component: () => (
|
|
120
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
120
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
121
121
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
122
122
|
</svg>
|
|
123
123
|
),
|
|
@@ -132,7 +132,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
132
132
|
{
|
|
133
133
|
size: 12,
|
|
134
134
|
Component: () => (
|
|
135
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
135
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
136
136
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
137
137
|
</svg>
|
|
138
138
|
),
|
|
@@ -147,7 +147,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
147
147
|
{
|
|
148
148
|
size: 12,
|
|
149
149
|
Component: () => (
|
|
150
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
150
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
151
151
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
152
152
|
</svg>
|
|
153
153
|
),
|
|
@@ -162,7 +162,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
162
162
|
{
|
|
163
163
|
size: 12,
|
|
164
164
|
Component: () => (
|
|
165
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
165
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
166
166
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
167
167
|
</svg>
|
|
168
168
|
),
|
|
@@ -177,7 +177,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
177
177
|
{
|
|
178
178
|
size: 12,
|
|
179
179
|
Component: () => (
|
|
180
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
180
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
181
181
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
182
182
|
</svg>
|
|
183
183
|
),
|
|
@@ -192,7 +192,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
192
192
|
{
|
|
193
193
|
size: 12,
|
|
194
194
|
Component: () => (
|
|
195
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
195
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
196
196
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
197
197
|
</svg>
|
|
198
198
|
),
|
|
@@ -207,7 +207,7 @@ The `<Icon>` component is used to display a single, square component. Usually a
|
|
|
207
207
|
{
|
|
208
208
|
size: 12,
|
|
209
209
|
Component: () => (
|
|
210
|
-
<svg width="12px" height="12px" viewBox="0 0 12 12">
|
|
210
|
+
<svg width="12px" height="12px" viewBox="0 0 12 12" style={{ display: "block" }}>
|
|
211
211
|
<path fill="#444" d="M1.98 2.1L5.88 6 1.98 9.9 4.08 12 10.08 6 4.08 0 1.98 2.1z" />
|
|
212
212
|
</svg>
|
|
213
213
|
),
|
package/blocks/Icon/index.js
CHANGED
|
@@ -1,41 +1,20 @@
|
|
|
1
|
+
'use client';
|
|
1
2
|
import { useResizeObserverEntry } from 'timvir/hooks';
|
|
2
3
|
import * as React from 'react';
|
|
3
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
4
5
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
const nonAtomicClasses = [];
|
|
12
|
-
presentClassNames.forEach((arg) => {
|
|
13
|
-
const individualClassNames = arg ? arg.split(" ") : [];
|
|
14
|
-
individualClassNames.forEach((className) => {
|
|
15
|
-
if (className.startsWith("atm_")) {
|
|
16
|
-
const [, keyHash] = className.split("_");
|
|
17
|
-
atomicClasses[keyHash] = className;
|
|
18
|
-
} else {
|
|
19
|
-
nonAtomicClasses.push(className);
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
});
|
|
23
|
-
const result = [];
|
|
24
|
-
for (const keyHash in atomicClasses) {
|
|
25
|
-
if (Object.prototype.hasOwnProperty.call(atomicClasses, keyHash)) {
|
|
26
|
-
result.push(atomicClasses[keyHash]);
|
|
6
|
+
function cx(...args) {
|
|
7
|
+
let str = "";
|
|
8
|
+
for (let i = 0; i < args.length; i++) {
|
|
9
|
+
const arg = args[i];
|
|
10
|
+
if (typeof arg === "string") {
|
|
11
|
+
str += (str && " ") + arg;
|
|
27
12
|
}
|
|
28
13
|
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
};
|
|
32
|
-
var cx_default = cx;
|
|
14
|
+
return str;
|
|
15
|
+
}
|
|
33
16
|
|
|
34
17
|
const Root$1 = "div";
|
|
35
|
-
const classes$1 = {
|
|
36
|
-
backdrop: "b1a0xzv7",
|
|
37
|
-
grid: "g10obtzp"
|
|
38
|
-
};
|
|
39
18
|
function Canvas(props) {
|
|
40
19
|
const {
|
|
41
20
|
width,
|
|
@@ -44,18 +23,20 @@ function Canvas(props) {
|
|
|
44
23
|
Component
|
|
45
24
|
} = props;
|
|
46
25
|
return /*#__PURE__*/jsxs(Root$1, {
|
|
47
|
-
className: "
|
|
26
|
+
className: "timvir-s-rvj5dj timvir-s-1ku5rj1 timvir-s-1ypdohk timvir-s-dtfvks timvir-s-d2wi23",
|
|
48
27
|
style: {
|
|
49
28
|
width,
|
|
50
29
|
height
|
|
51
30
|
},
|
|
52
31
|
children: [/*#__PURE__*/jsx("div", {
|
|
53
|
-
className:
|
|
32
|
+
className: "timvir-s-gkxs2y timvir-s-1ms6mhf timvir-s-12peec7 timvir-s-1lhehjl timvir-s-1cum3z5 timvir-s-zhuw26 timvir-s-1ww5jgt"
|
|
54
33
|
}), /*#__PURE__*/jsx(Grid, {
|
|
55
|
-
className:
|
|
34
|
+
className: "timvir-s-gkxs2y timvir-s-1ms6mhf timvir-s-1lliihq timvir-s-1j5ulbg timvir-s-zhuw26 timvir-s-47corl",
|
|
56
35
|
size: size
|
|
57
36
|
}), /*#__PURE__*/jsx("div", {
|
|
58
37
|
style: {
|
|
38
|
+
gridColumn: 1,
|
|
39
|
+
gridRow: 1,
|
|
59
40
|
fontSize: `${size}px`,
|
|
60
41
|
zIndex: 1
|
|
61
42
|
},
|
|
@@ -119,35 +100,36 @@ function Grid({
|
|
|
119
100
|
});
|
|
120
101
|
}
|
|
121
102
|
|
|
122
|
-
/**
|
|
123
|
-
* The underlying DOM element which is rendered by this component.
|
|
124
|
-
*/
|
|
125
103
|
const Root = "div";
|
|
126
|
-
const classes = {
|
|
127
|
-
name: "n1xsexuc"
|
|
128
|
-
};
|
|
129
104
|
function Icon(props, ref) {
|
|
130
105
|
const {
|
|
131
106
|
descriptor,
|
|
132
|
-
className,
|
|
133
107
|
...rest
|
|
134
108
|
} = props;
|
|
135
109
|
const [roRef, roe] = useResizeObserverEntry();
|
|
136
110
|
const width = roe?.contentRect.width;
|
|
111
|
+
const rootStyleProps = {
|
|
112
|
+
className: "timvir-s-1n2onr6 timvir-s-1vjfegm timvir-s-dtfvks timvir-s-d2wi23"
|
|
113
|
+
};
|
|
137
114
|
return /*#__PURE__*/jsx(Root, {
|
|
138
115
|
ref: ref,
|
|
139
|
-
className: cx_default(className, "r1k0w618"),
|
|
140
116
|
...rest,
|
|
117
|
+
...rootStyleProps,
|
|
118
|
+
className: cx(rest.className, rootStyleProps.className),
|
|
119
|
+
style: {
|
|
120
|
+
...rootStyleProps.style,
|
|
121
|
+
...rest.style
|
|
122
|
+
},
|
|
141
123
|
children: /*#__PURE__*/jsx("div", {
|
|
142
124
|
ref: roRef,
|
|
143
125
|
children: width !== undefined && /*#__PURE__*/jsxs(Fragment, {
|
|
144
126
|
children: [/*#__PURE__*/jsx(Canvas, {
|
|
145
127
|
width: width,
|
|
146
128
|
height: width,
|
|
147
|
-
size: 32
|
|
129
|
+
size: 32,
|
|
148
130
|
Component: descriptor.instances[0].Component
|
|
149
131
|
}), /*#__PURE__*/jsx("div", {
|
|
150
|
-
className:
|
|
132
|
+
className: "timvir-s-dj266r timvir-s-uxw1ft timvir-s-boafo0 timvir-s-1j5ulbg timvir-s-zhuw26 timvir-s-8knxv4 timvir-s-1cdhzux timvir-s-2b8uid timvir-s-87ps6o timvir-s-47corl timvir-s-10l6tqk timvir-s-1nrll8i timvir-s-1kuhel0 timvir-s-1nc5ocm",
|
|
151
133
|
children: descriptor.name
|
|
152
134
|
})]
|
|
153
135
|
})
|
package/blocks/Icon/styles.css
CHANGED
|
@@ -1,7 +1,119 @@
|
|
|
1
|
-
|
|
2
|
-
.
|
|
3
|
-
|
|
1
|
+
@layer priority1 {
|
|
2
|
+
.timvir-s-dtfvks {
|
|
3
|
+
--timvir-b-Icon-hover: 0;
|
|
4
|
+
}
|
|
4
5
|
|
|
5
|
-
.
|
|
6
|
-
|
|
6
|
+
.timvir-s-d2wi23:hover {
|
|
7
|
+
--timvir-b-Icon-hover: 1;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
7
10
|
|
|
11
|
+
@layer priority2 {
|
|
12
|
+
.timvir-s-1cum3z5 {
|
|
13
|
+
border-radius: 2px;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.timvir-s-gkxs2y {
|
|
17
|
+
grid-column: 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.timvir-s-1ms6mhf {
|
|
21
|
+
grid-row: 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.timvir-s-1ku5rj1 {
|
|
25
|
+
place-items: center;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.timvir-s-1lhehjl {
|
|
29
|
+
place-self: stretch stretch;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.timvir-s-zhuw26 {
|
|
33
|
+
transition: all .16s;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@layer priority3 {
|
|
38
|
+
.timvir-s-12peec7 {
|
|
39
|
+
background-color: #fff;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.timvir-s-1ww5jgt {
|
|
43
|
+
box-shadow: 0 0 #0000001a;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.timvir-s-1cdhzux {
|
|
47
|
+
color: var(--timvir-text-color);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.timvir-s-1ypdohk {
|
|
51
|
+
cursor: pointer;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.timvir-s-1lliihq {
|
|
55
|
+
display: block;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.timvir-s-rvj5dj {
|
|
59
|
+
display: grid;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.timvir-s-boafo0 {
|
|
63
|
+
font-size: .75rem;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
.timvir-s-1j5ulbg {
|
|
67
|
+
opacity: var(--timvir-b-Icon-hover);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.timvir-s-47corl {
|
|
71
|
+
pointer-events: none;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.timvir-s-10l6tqk {
|
|
75
|
+
position: absolute;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.timvir-s-1n2onr6 {
|
|
79
|
+
position: relative;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.timvir-s-2b8uid {
|
|
83
|
+
text-align: center;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.timvir-s-1nc5ocm {
|
|
87
|
+
transform: translate(-50%);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.timvir-s-87ps6o {
|
|
91
|
+
user-select: none;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.timvir-s-uxw1ft {
|
|
95
|
+
white-space: nowrap;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.timvir-s-8knxv4 {
|
|
99
|
+
z-index: -1;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.timvir-s-1vjfegm {
|
|
103
|
+
z-index: 1;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
@layer priority4 {
|
|
108
|
+
.timvir-s-1kuhel0 {
|
|
109
|
+
bottom: -20px;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
.timvir-s-1nrll8i {
|
|
113
|
+
left: 50%;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.timvir-s-dj266r {
|
|
117
|
+
margin-top: 0;
|
|
118
|
+
}
|
|
119
|
+
}
|