@tecsinapse/cortex-core 0.1.3 → 0.1.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.
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var tailwindVariants = require('tailwind-variants');
4
+
5
+ const overlay = tailwindVariants.tv({
6
+ base: "fixed",
7
+ variants: {
8
+ show: {
9
+ true: "bg-opacity-50 cursor-pointer z-[0] bg-black h-full w-full left-0 top-0 transition",
10
+ false: "invisible"
11
+ }
12
+ }
13
+ });
14
+
15
+ exports.overlay = overlay;
@@ -3,21 +3,21 @@
3
3
  var tailwindVariants = require('tailwind-variants');
4
4
 
5
5
  const drawerStyles = tailwindVariants.tv({
6
- base: "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform peer-checked:translate-x-0",
6
+ base: "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform",
7
7
  variants: {
8
8
  position: {
9
9
  left: "left-0 -translate-x-full rounded-r-mili",
10
10
  right: "right-1 translate-x-full rounded-l-mili"
11
+ },
12
+ open: {
13
+ true: "translate-x-0",
14
+ false: ""
11
15
  }
12
16
  },
13
17
  defaultVariants: {
14
18
  position: "left"
15
19
  }
16
20
  });
17
- const overlay = tailwindVariants.tv({
18
- base: "fixed h-full w-full left-0 top-0 transition peer-checked:bg-black peer-checked:bg-opacity-50 z-[-1] peer-checked:z-[0] peer-checked:cursor-pointer"
19
- });
20
21
  const drawer = (props) => drawerStyles(props);
21
22
 
22
23
  exports.drawer = drawer;
23
- exports.overlay = overlay;
@@ -3,7 +3,13 @@
3
3
  var tailwindVariants = require('tailwind-variants');
4
4
 
5
5
  const modal = tailwindVariants.tv({
6
- base: "inset-x-0 fixed mx-auto rounded-micro p-kilo bg-white shadow-default flex transition fixed invisible peer-checked:visible scale-0 peer-checked:scale-100"
6
+ base: "fixed rounded-micro p-kilo bg-white shadow-default flex transition inset-0",
7
+ variants: {
8
+ open: {
9
+ true: "scale-100 visible",
10
+ false: "invisible"
11
+ }
12
+ }
7
13
  });
8
14
 
9
15
  exports.modal = modal;
@@ -3,10 +3,10 @@
3
3
  var tailwindVariants = require('tailwind-variants');
4
4
 
5
5
  const radioButton = tailwindVariants.tv({
6
- base: "accent-orange-600 h-5 w-5 cursor-pointer"
6
+ base: "accent-orange-600 h-5 w-5 cursor-pointer peer"
7
7
  });
8
8
  const labelRadioButton = tailwindVariants.tv({
9
- base: "cursor-pointer"
9
+ base: "cursor-pointer peer-checked:font-bold"
10
10
  });
11
11
 
12
12
  exports.labelRadioButton = labelRadioButton;
package/dist/cjs/index.js CHANGED
@@ -16,6 +16,7 @@ var tooltip = require('./components/tooltip/tooltip.js');
16
16
  var card = require('./components/card/card.js');
17
17
  var modal = require('./components/modal/modal.js');
18
18
  var snackbar = require('./components/snackbar/snackbar.js');
19
+ var common = require('./components/common/common.js');
19
20
  var index = require('./preset/index.js');
20
21
 
21
22
 
@@ -42,7 +43,6 @@ exports.styleInputElement = toggle.styleInputElement;
42
43
  exports.styleLabelElement = toggle.styleLabelElement;
43
44
  exports.toggle = toggle.toggle;
44
45
  exports.drawer = drawer.drawer;
45
- exports.overlay = drawer.overlay;
46
46
  exports.buttonSelect = select.buttonSelect;
47
47
  exports.dropdown = select.dropdown;
48
48
  exports.option = select.option;
@@ -63,4 +63,5 @@ exports.tooltipContainer = tooltip.tooltipContainer;
63
63
  exports.card = card.card;
64
64
  exports.modal = modal.modal;
65
65
  exports.snackbar = snackbar.snackbar;
66
+ exports.overlay = common.overlay;
66
67
  exports.preset = index;
@@ -0,0 +1,13 @@
1
+ import { tv } from 'tailwind-variants';
2
+
3
+ const overlay = tv({
4
+ base: "fixed",
5
+ variants: {
6
+ show: {
7
+ true: "bg-opacity-50 cursor-pointer z-[0] bg-black h-full w-full left-0 top-0 transition",
8
+ false: "invisible"
9
+ }
10
+ }
11
+ });
12
+
13
+ export { overlay };
@@ -1,20 +1,21 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
 
3
3
  const drawerStyles = tv({
4
- base: "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform peer-checked:translate-x-0",
4
+ base: "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform",
5
5
  variants: {
6
6
  position: {
7
7
  left: "left-0 -translate-x-full rounded-r-mili",
8
8
  right: "right-1 translate-x-full rounded-l-mili"
9
+ },
10
+ open: {
11
+ true: "translate-x-0",
12
+ false: ""
9
13
  }
10
14
  },
11
15
  defaultVariants: {
12
16
  position: "left"
13
17
  }
14
18
  });
15
- const overlay = tv({
16
- base: "fixed h-full w-full left-0 top-0 transition peer-checked:bg-black peer-checked:bg-opacity-50 z-[-1] peer-checked:z-[0] peer-checked:cursor-pointer"
17
- });
18
19
  const drawer = (props) => drawerStyles(props);
19
20
 
20
- export { drawer, overlay };
21
+ export { drawer };
@@ -1,7 +1,13 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
 
3
3
  const modal = tv({
4
- base: "inset-x-0 fixed mx-auto rounded-micro p-kilo bg-white shadow-default flex transition fixed invisible peer-checked:visible scale-0 peer-checked:scale-100"
4
+ base: "fixed rounded-micro p-kilo bg-white shadow-default flex transition inset-0",
5
+ variants: {
6
+ open: {
7
+ true: "scale-100 visible",
8
+ false: "invisible"
9
+ }
10
+ }
5
11
  });
6
12
 
7
13
  export { modal };
@@ -1,10 +1,10 @@
1
1
  import { tv } from 'tailwind-variants';
2
2
 
3
3
  const radioButton = tv({
4
- base: "accent-orange-600 h-5 w-5 cursor-pointer"
4
+ base: "accent-orange-600 h-5 w-5 cursor-pointer peer"
5
5
  });
6
6
  const labelRadioButton = tv({
7
- base: "cursor-pointer"
7
+ base: "cursor-pointer peer-checked:font-bold"
8
8
  });
9
9
 
10
10
  export { labelRadioButton, radioButton };
package/dist/esm/index.js CHANGED
@@ -4,7 +4,7 @@ export { tag } from './components/tag/tag.js';
4
4
  export { input, inputBaseStyles, inputBox, label, labelStyle } from './components/input/input.js';
5
5
  export { hint } from './components/hint/hint.js';
6
6
  export { styleInputElement, styleLabelElement, toggle } from './components/toggle/toggle.js';
7
- export { drawer, overlay } from './components/drawer/drawer.js';
7
+ export { drawer } from './components/drawer/drawer.js';
8
8
  export { buttonSelect, dropdown, option } from './components/select/select.js';
9
9
  export { checkbox } from './components/checkbox/checkbox.js';
10
10
  export { badge, containerBadge } from './components/badge/badge.js';
@@ -14,4 +14,5 @@ export { tooltip, tooltipContainer } from './components/tooltip/tooltip.js';
14
14
  export { card } from './components/card/card.js';
15
15
  export { modal } from './components/modal/modal.js';
16
16
  export { snackbar } from './components/snackbar/snackbar.js';
17
+ export { overlay } from './components/common/common.js';
17
18
  export { default as preset } from './preset/index.js';
@@ -0,0 +1,36 @@
1
+ export declare const overlay: import("tailwind-variants").TVReturnType<{
2
+ show: {
3
+ true: string;
4
+ false: string;
5
+ };
6
+ }, undefined, "fixed", import("tailwind-variants/dist/config").TVConfig<{
7
+ show: {
8
+ true: string;
9
+ false: string;
10
+ };
11
+ }, {
12
+ show: {
13
+ true: string;
14
+ false: string;
15
+ };
16
+ }>, {
17
+ show: {
18
+ true: string;
19
+ false: string;
20
+ };
21
+ }, undefined, import("tailwind-variants").TVReturnType<{
22
+ show: {
23
+ true: string;
24
+ false: string;
25
+ };
26
+ }, undefined, "fixed", import("tailwind-variants/dist/config").TVConfig<{
27
+ show: {
28
+ true: string;
29
+ false: string;
30
+ };
31
+ }, {
32
+ show: {
33
+ true: string;
34
+ false: string;
35
+ };
36
+ }>, unknown, unknown, undefined>>;
@@ -4,38 +4,65 @@ declare const drawerStyles: import("tailwind-variants").TVReturnType<{
4
4
  left: string;
5
5
  right: string;
6
6
  };
7
- }, undefined, "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform peer-checked:translate-x-0", import("tailwind-variants/dist/config").TVConfig<{
7
+ open: {
8
+ true: string;
9
+ false: string;
10
+ };
11
+ }, undefined, "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform", import("tailwind-variants/dist/config").TVConfig<{
8
12
  position: {
9
13
  left: string;
10
14
  right: string;
11
15
  };
16
+ open: {
17
+ true: string;
18
+ false: string;
19
+ };
12
20
  }, {
13
21
  position: {
14
22
  left: string;
15
23
  right: string;
16
24
  };
25
+ open: {
26
+ true: string;
27
+ false: string;
28
+ };
17
29
  }>, {
18
30
  position: {
19
31
  left: string;
20
32
  right: string;
21
33
  };
34
+ open: {
35
+ true: string;
36
+ false: string;
37
+ };
22
38
  }, undefined, import("tailwind-variants").TVReturnType<{
23
39
  position: {
24
40
  left: string;
25
41
  right: string;
26
42
  };
27
- }, undefined, "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform peer-checked:translate-x-0", import("tailwind-variants/dist/config").TVConfig<{
43
+ open: {
44
+ true: string;
45
+ false: string;
46
+ };
47
+ }, undefined, "bg-white fixed top-0 h-full p-deca shadow-lg transition-all duration-500 transform", import("tailwind-variants/dist/config").TVConfig<{
28
48
  position: {
29
49
  left: string;
30
50
  right: string;
31
51
  };
52
+ open: {
53
+ true: string;
54
+ false: string;
55
+ };
32
56
  }, {
33
57
  position: {
34
58
  left: string;
35
59
  right: string;
36
60
  };
61
+ open: {
62
+ true: string;
63
+ false: string;
64
+ };
37
65
  }>, unknown, unknown, undefined>>;
38
- export declare const overlay: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "fixed h-full w-full left-0 top-0 transition peer-checked:bg-black peer-checked:bg-opacity-50 z-[-1] peer-checked:z-[0] peer-checked:cursor-pointer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "fixed h-full w-full left-0 top-0 transition peer-checked:bg-black peer-checked:bg-opacity-50 z-[-1] peer-checked:z-[0] peer-checked:cursor-pointer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
39
66
  export type DrawerVariants = VariantProps<typeof drawerStyles> & ClassProp;
40
67
  export declare const drawer: (props: DrawerVariants) => string;
41
68
  export {};
@@ -13,3 +13,4 @@ export * from './tooltip/tooltip';
13
13
  export * from './card/card';
14
14
  export * from './modal/modal';
15
15
  export * from './snackbar/snackbar';
16
+ export * from './common/common';
@@ -1 +1,36 @@
1
- export declare const modal: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "inset-x-0 fixed mx-auto rounded-micro p-kilo bg-white shadow-default flex transition fixed invisible peer-checked:visible scale-0 peer-checked:scale-100", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "inset-x-0 fixed mx-auto rounded-micro p-kilo bg-white shadow-default flex transition fixed invisible peer-checked:visible scale-0 peer-checked:scale-100", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
1
+ export declare const modal: import("tailwind-variants").TVReturnType<{
2
+ open: {
3
+ true: string;
4
+ false: string;
5
+ };
6
+ }, undefined, "fixed rounded-micro p-kilo bg-white shadow-default flex transition inset-0", import("tailwind-variants/dist/config").TVConfig<{
7
+ open: {
8
+ true: string;
9
+ false: string;
10
+ };
11
+ }, {
12
+ open: {
13
+ true: string;
14
+ false: string;
15
+ };
16
+ }>, {
17
+ open: {
18
+ true: string;
19
+ false: string;
20
+ };
21
+ }, undefined, import("tailwind-variants").TVReturnType<{
22
+ open: {
23
+ true: string;
24
+ false: string;
25
+ };
26
+ }, undefined, "fixed rounded-micro p-kilo bg-white shadow-default flex transition inset-0", import("tailwind-variants/dist/config").TVConfig<{
27
+ open: {
28
+ true: string;
29
+ false: string;
30
+ };
31
+ }, {
32
+ open: {
33
+ true: string;
34
+ false: string;
35
+ };
36
+ }>, unknown, unknown, undefined>>;
@@ -1,2 +1,2 @@
1
- export declare const radioButton: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "accent-orange-600 h-5 w-5 cursor-pointer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "accent-orange-600 h-5 w-5 cursor-pointer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
2
- export declare const labelRadioButton: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "cursor-pointer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "cursor-pointer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
1
+ export declare const radioButton: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "accent-orange-600 h-5 w-5 cursor-pointer peer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "accent-orange-600 h-5 w-5 cursor-pointer peer", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
2
+ export declare const labelRadioButton: import("tailwind-variants").TVReturnType<{} | {} | {}, undefined, "cursor-pointer peer-checked:font-bold", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, {} | {}, undefined, import("tailwind-variants").TVReturnType<unknown, undefined, "cursor-pointer peer-checked:font-bold", import("tailwind-variants/dist/config").TVConfig<unknown, {} | {}>, unknown, unknown, undefined>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tecsinapse/cortex-core",
3
- "version": "0.1.3",
3
+ "version": "0.1.5",
4
4
  "description": "",
5
5
  "main": "dist/esm/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -20,5 +20,5 @@
20
20
  "tailwind-merge": "^2.0.0",
21
21
  "tailwind-variants": "^0.1.18"
22
22
  },
23
- "gitHead": "b91967b65eef72b87d6a7b55582937494dcbdfb3"
23
+ "gitHead": "b87da8712b36d9de22a98598c4efa8d785964bc3"
24
24
  }