@rettangoli/ui 1.2.0 → 1.2.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/package.json
CHANGED
|
@@ -21,7 +21,7 @@ template:
|
|
|
21
21
|
- rtgl-view#textDisplay w=f cur=pointer:
|
|
22
22
|
- rtgl-text c=${valueColor}: ${value}
|
|
23
23
|
- rtgl-popover#popover ?open=${isOpen} x=${position.x} y=${position.y}:
|
|
24
|
-
- rtgl-view g=md w=240 slot=content bgc=bg br=md:
|
|
24
|
+
- rtgl-view g=md w=240 slot=content bgc=bg bw=xs bc=bo br=md pv=sm:
|
|
25
25
|
- rtgl-text: ${label}
|
|
26
26
|
- rtgl-input#input w=f placeholder=${placeholder} ?disabled=${disabled}: null
|
|
27
27
|
- rtgl-view w=f ah=e:
|
|
@@ -4,20 +4,17 @@ export const createInitialState = () => Object.freeze({
|
|
|
4
4
|
const sizePresets = {
|
|
5
5
|
sm: {
|
|
6
6
|
textSize: 'sm',
|
|
7
|
-
|
|
8
|
-
paddingY: 'sm',
|
|
7
|
+
padding: 'md',
|
|
9
8
|
maxWidth: 'min(320px, calc(100vw - 16px))',
|
|
10
9
|
},
|
|
11
10
|
md: {
|
|
12
11
|
textSize: 'sm',
|
|
13
|
-
|
|
14
|
-
paddingY: 'md',
|
|
12
|
+
padding: 'md',
|
|
15
13
|
maxWidth: 'min(360px, calc(100vw - 16px))',
|
|
16
14
|
},
|
|
17
15
|
lg: {
|
|
18
16
|
textSize: 'md',
|
|
19
|
-
|
|
20
|
-
paddingY: 'md',
|
|
17
|
+
padding: 'lg',
|
|
21
18
|
maxWidth: 'min(420px, calc(100vw - 16px))',
|
|
22
19
|
},
|
|
23
20
|
};
|
|
@@ -33,8 +30,7 @@ export const selectViewData = ({ props }) => {
|
|
|
33
30
|
place: props.place || 't',
|
|
34
31
|
content: props.content || '',
|
|
35
32
|
textSize: preset.textSize,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
contentStyle: `padding: 0; min-width: 0; max-width: ${preset.maxWidth};`,
|
|
33
|
+
padding: preset.padding,
|
|
34
|
+
contentStyle: `padding: 0; min-width: 0; max-width: ${preset.maxWidth}; background-color: var(--muted);`,
|
|
39
35
|
};
|
|
40
36
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
template:
|
|
2
2
|
- rtgl-popover#popover ?open=${open} x=${x} y=${y} place=${place} no-overlay:
|
|
3
|
-
- 'rtgl-view slot=content style="${contentStyle}"':
|
|
4
|
-
- rtgl-view
|
|
3
|
+
- 'rtgl-view slot=content style="${contentStyle}" bgc=mu':
|
|
4
|
+
- rtgl-view p=${padding} ah=s av=c:
|
|
5
5
|
- rtgl-text ta=s s=${textSize} c=fg: ${content}
|
|
6
6
|
refs: {}
|