@optigrit/optigrit-ui 0.0.3 → 0.0.5
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.
|
@@ -128,7 +128,7 @@ function Popover(props) {
|
|
|
128
128
|
/* @__PURE__ */ jsx(Show, { when: !!closeOnClickOutside, children: /* @__PURE__ */ jsx(
|
|
129
129
|
"div",
|
|
130
130
|
{
|
|
131
|
-
className: "fixed w-[100dvw] h-[100dvh] left-0 top-0 z-[1]
|
|
131
|
+
className: "fixed w-[100dvw] h-[100dvh] left-0 top-0 z-[1]",
|
|
132
132
|
style: { display: open ? "block" : "none" },
|
|
133
133
|
onClick: handleClickOutside
|
|
134
134
|
}
|
|
@@ -144,7 +144,7 @@ function Popover(props) {
|
|
|
144
144
|
transition: "all 200ms",
|
|
145
145
|
opacity: 0,
|
|
146
146
|
scale: 0.8,
|
|
147
|
-
zIndex:
|
|
147
|
+
zIndex: 9999,
|
|
148
148
|
...popoverProps.style
|
|
149
149
|
},
|
|
150
150
|
children
|
package/dist/components/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
ShowWithAnimation,
|
|
7
7
|
Spinner,
|
|
8
8
|
cn
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-CRWBYFRD.js";
|
|
10
10
|
import "../chunk-MCQS3QNN.js";
|
|
11
11
|
import {
|
|
12
12
|
useKeyboardShortcuts
|
|
@@ -858,6 +858,9 @@ function Dialog(props) {
|
|
|
858
858
|
sizeClasses2[size],
|
|
859
859
|
className
|
|
860
860
|
),
|
|
861
|
+
containerProps: {
|
|
862
|
+
className: "w-full"
|
|
863
|
+
},
|
|
861
864
|
children
|
|
862
865
|
}
|
|
863
866
|
)
|
|
@@ -945,7 +948,7 @@ function Drawer(props) {
|
|
|
945
948
|
removeOnHide: true,
|
|
946
949
|
containerProps: {
|
|
947
950
|
style: { position: "fixed" },
|
|
948
|
-
className:
|
|
951
|
+
className: "fixed inset-0 w-screen h-screen flex z-[9999]"
|
|
949
952
|
},
|
|
950
953
|
animationDuration: 1.5 * animationDuration,
|
|
951
954
|
animationStyle: {
|
package/dist/core/index.js
CHANGED
package/index.css
CHANGED
package/package.json
CHANGED
package/tailwind.preset.js
CHANGED
|
@@ -4,33 +4,52 @@ export default {
|
|
|
4
4
|
extend: {
|
|
5
5
|
colors: {
|
|
6
6
|
primary: {
|
|
7
|
-
|
|
8
|
-
secondary: 'var(--primary-secondary)',
|
|
7
|
+
...generateShades('var(--primary)'),
|
|
8
|
+
secondary: generateShades('var(--primary-secondary)'),
|
|
9
9
|
},
|
|
10
10
|
bg: {
|
|
11
|
-
|
|
12
|
-
secondary: 'var(--bg-secondary)',
|
|
11
|
+
...generateShades('var(--bg)'),
|
|
12
|
+
secondary: generateShades('var(--bg-secondary)'),
|
|
13
13
|
},
|
|
14
14
|
text: {
|
|
15
|
-
|
|
16
|
-
secondary: 'var(--text-secondary)',
|
|
17
|
-
},
|
|
18
|
-
border:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
},
|
|
24
|
-
success: {
|
|
25
|
-
DEFAULT: 'var(--success)',
|
|
26
|
-
},
|
|
27
|
-
info: {
|
|
28
|
-
DEFAULT: 'var(--info)',
|
|
29
|
-
},
|
|
30
|
-
warning: {
|
|
31
|
-
DEFAULT: 'var(--warning)',
|
|
32
|
-
},
|
|
15
|
+
...generateShades('var(--text)'),
|
|
16
|
+
secondary: generateShades('var(--text-secondary)'),
|
|
17
|
+
},
|
|
18
|
+
border: generateShades('var(--border)'),
|
|
19
|
+
error: generateShades('var(--error)'),
|
|
20
|
+
success: generateShades('var(--success)'),
|
|
21
|
+
info: generateShades('var(--info)'),
|
|
22
|
+
warning: generateShades('var(--warning)'),
|
|
33
23
|
}
|
|
34
24
|
}
|
|
35
25
|
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
function generateShades(color) {
|
|
30
|
+
const shades = {
|
|
31
|
+
DEFAULT: '',
|
|
32
|
+
100: '',
|
|
33
|
+
200: '',
|
|
34
|
+
300: '',
|
|
35
|
+
400: '',
|
|
36
|
+
500: '',
|
|
37
|
+
600: '',
|
|
38
|
+
700: '',
|
|
39
|
+
800: '',
|
|
40
|
+
900: ''
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
for(let shadeKey in shades) {
|
|
44
|
+
const ratio = shadeKey === 'DEFAULT' ? 100 : parseInt(shadeKey) / 10;
|
|
45
|
+
shades[shadeKey] = `
|
|
46
|
+
rgb(
|
|
47
|
+
from color-mix(
|
|
48
|
+
in srgb, ${color} ${ratio}%, var(--bg, white) ${100 - ratio}%
|
|
49
|
+
) r g b / <alpha-value>
|
|
50
|
+
)
|
|
51
|
+
`;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
return shades;
|
|
36
55
|
}
|