@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] bg-red-600/10",
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: 2,
147
+ zIndex: 9999,
148
148
  ...popoverProps.style
149
149
  },
150
150
  children
@@ -6,7 +6,7 @@ import {
6
6
  ShowWithAnimation,
7
7
  Spinner,
8
8
  cn
9
- } from "../chunk-F6GWYCMR.js";
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: `fixed inset-0 w-screen h-screen flex`
951
+ className: "fixed inset-0 w-screen h-screen flex z-[9999]"
949
952
  },
950
953
  animationDuration: 1.5 * animationDuration,
951
954
  animationStyle: {
@@ -5,7 +5,7 @@ import {
5
5
  Show,
6
6
  ShowWithAnimation,
7
7
  Spinner
8
- } from "../chunk-F6GWYCMR.js";
8
+ } from "../chunk-CRWBYFRD.js";
9
9
  import "../chunk-MCQS3QNN.js";
10
10
  import "../chunk-U65NGM6F.js";
11
11
  export {
package/index.css CHANGED
@@ -29,7 +29,7 @@
29
29
  --warning: #f59e0b;
30
30
  --info: #3b82f6;
31
31
 
32
- --border: #e5e7eb;
32
+ --border: #6f6f6f;
33
33
  }
34
34
 
35
35
  .dark {
@@ -47,7 +47,7 @@
47
47
  --warning: #fbbf24;
48
48
  --info: #60a5fa;
49
49
 
50
- --border: #374151;
50
+ --border: #9f9f9f;
51
51
  }
52
52
  }
53
53
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@optigrit/optigrit-ui",
3
- "version": "0.0.3",
3
+ "version": "0.0.5",
4
4
  "description": "UI components library for optigrit apps",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -4,33 +4,52 @@ export default {
4
4
  extend: {
5
5
  colors: {
6
6
  primary: {
7
- DEFAULT: 'var(--primary)',
8
- secondary: 'var(--primary-secondary)',
7
+ ...generateShades('var(--primary)'),
8
+ secondary: generateShades('var(--primary-secondary)'),
9
9
  },
10
10
  bg: {
11
- DEFAULT: 'var(--bg)',
12
- secondary: 'var(--bg-secondary)',
11
+ ...generateShades('var(--bg)'),
12
+ secondary: generateShades('var(--bg-secondary)'),
13
13
  },
14
14
  text: {
15
- DEFAULT: 'var(--text)',
16
- secondary: 'var(--text-secondary)',
17
- },
18
- border: {
19
- DEFAULT: 'var(--border)',
20
- },
21
- error: {
22
- DEFAULT: 'var(--error)',
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
  }