@driveflux/ui 1.0.4 → 1.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.
@@ -1,6 +1,6 @@
1
1
 
2
- > @driveflux/ui@1.0.4 build /Users/flux/Projects/flux/shared/ui
2
+ > @driveflux/ui@1.0.5 build /Users/flux/Projects/flux/shared/ui
3
3
  > fab
4
4
 
5
- Successfully compiled: 19 files with swc (202.75ms)
6
- Successfully compiled: 19 files with swc (271.96ms)
5
+ Successfully compiled: 19 files with swc (173.15ms)
6
+ Successfully compiled: 19 files with swc (176.06ms)
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @driveflux/ui
2
2
 
3
+ ## 1.0.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Version upgrade
8
+ - Updated dependencies
9
+ - @driveflux/icons@1.0.4
10
+
3
11
  ## 1.0.4
4
12
 
5
13
  ### Patch Changes
package/dist/cjs/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ // TODO check if is an error or not
1
2
  // Turbopack has a bug that's not allowing export * from './chakra.js' to work
2
3
  "use strict";
3
4
  Object.defineProperty(exports, "__esModule", {
@@ -205,6 +205,7 @@ var ModalProvider = function(param) {
205
205
  var state = (0, _react.useMemo)(function() {
206
206
  return {
207
207
  isOpen: isOpen,
208
+ // TODO
208
209
  // @ts-expect-error
209
210
  open: onOpen,
210
211
  close: onClose,
@@ -1,3 +1,6 @@
1
+ // TODO sync this with the one in dump
2
+ // remove dump file version
3
+ // update all instances using colors
1
4
  "use strict";
2
5
  Object.defineProperty(exports, "__esModule", {
3
6
  value: true
@@ -76,6 +79,7 @@ var colors = {
76
79
  800: "#000000",
77
80
  900: "#000000"
78
81
  },
82
+ // TODO add 25
79
83
  success: {
80
84
  50: "#d8f7f2",
81
85
  100: "#98e6d6",
@@ -88,6 +92,7 @@ var colors = {
88
92
  800: "#00724d",
89
93
  900: "#005530"
90
94
  },
95
+ // TODO add 25
91
96
  accent: {
92
97
  50: "#fceaee",
93
98
  100: "#f8cad3",
@@ -100,6 +105,7 @@ var colors = {
100
105
  800: "#b91231",
101
106
  900: "#aa0026"
102
107
  },
108
+ // TODO add 25
103
109
  warning: {
104
110
  50: "#FDF0DE",
105
111
  100: "#F4B25C",
@@ -125,6 +131,7 @@ var colors = {
125
131
  800: "#50C8E8",
126
132
  900: "#50C8E8"
127
133
  },
134
+ // TODO add 25
128
135
  alert: {
129
136
  50: "#E24657",
130
137
  100: "#E24657",
@@ -31,6 +31,7 @@ var translations = {
31
31
  };
32
32
  var setTranslations = function(ts) {
33
33
  for(var key in ts){
34
+ // TODO
34
35
  // @ts-expect-error
35
36
  translations[key] = ts[key];
36
37
  }
@@ -28,15 +28,18 @@ function _instanceof(left, right) {
28
28
  }
29
29
  }
30
30
  function isReactComponent(Component) {
31
- return typeof Component === "function" && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- React component, it's fine
31
+ return typeof Component === "function" && // TODO
32
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- React component, it's fine
32
33
  (_instanceof(Component.prototype, Component) || Component.displayName !== undefined);
33
34
  }
34
35
  function isReactElement(element) {
36
+ // TODO
35
37
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
36
38
  return (0, _react.isValidElement)(element);
37
39
  }
38
40
  function isReactNode(node) {
39
- if (// eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
41
+ if (// TODO
42
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
40
43
  (0, _react.isValidElement)(node) || // Check if it's a React element
41
44
  typeof node === "string" || // Check if it's a string
42
45
  typeof node === "number" // Check if it's a number
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,aAAa,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,aAAa,CAAA"}
package/dist/index.js CHANGED
@@ -1,2 +1,3 @@
1
+ // TODO check if is an error or not
1
2
  // Turbopack has a bug that's not allowing export * from './chakra.js' to work
2
3
  export * from "./chakra.js";
@@ -1 +1 @@
1
- {"version":3,"file":"ModalProvider.d.ts","sourceRoot":"","sources":["../../src/modal/ModalProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAA;AA+BvF,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CA2GxC,CAAA;AAED,eAAe,aAAa,CAAA"}
1
+ {"version":3,"file":"ModalProvider.d.ts","sourceRoot":"","sources":["../../src/modal/ModalProvider.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,KAAK,EAAE,EAAE,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAA;AA+BvF,QAAA,MAAM,aAAa,EAAE,EAAE,CAAC,iBAAiB,CA4GxC,CAAA;AAED,eAAe,aAAa,CAAA"}
@@ -190,6 +190,7 @@ var ModalProvider = function(param) {
190
190
  var state = useMemo(function() {
191
191
  return {
192
192
  isOpen: isOpen,
193
+ // TODO
193
194
  // @ts-expect-error
194
195
  open: onOpen,
195
196
  close: onClose,
@@ -1 +1 @@
1
- {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;IACjB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkFJ,CAAA"}
1
+ {"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../src/theme/colors.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,MAAM;IACjB;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;IAGH;;OAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsFJ,CAAA"}
@@ -1,3 +1,6 @@
1
+ // TODO sync this with the one in dump
2
+ // remove dump file version
3
+ // update all instances using colors
1
4
  export var colors = {
2
5
  /**
3
6
  * #EFEFF0 Light Gray
@@ -66,6 +69,7 @@ export var colors = {
66
69
  800: "#000000",
67
70
  900: "#000000"
68
71
  },
72
+ // TODO add 25
69
73
  success: {
70
74
  50: "#d8f7f2",
71
75
  100: "#98e6d6",
@@ -78,6 +82,7 @@ export var colors = {
78
82
  800: "#00724d",
79
83
  900: "#005530"
80
84
  },
85
+ // TODO add 25
81
86
  accent: {
82
87
  50: "#fceaee",
83
88
  100: "#f8cad3",
@@ -90,6 +95,7 @@ export var colors = {
90
95
  800: "#b91231",
91
96
  900: "#aa0026"
92
97
  },
98
+ // TODO add 25
93
99
  warning: {
94
100
  50: "#FDF0DE",
95
101
  100: "#F4B25C",
@@ -115,6 +121,7 @@ export var colors = {
115
121
  800: "#50C8E8",
116
122
  900: "#50C8E8"
117
123
  },
124
+ // TODO add 25
118
125
  alert: {
119
126
  50: "#E24657",
120
127
  100: "#E24657",
@@ -1 +1 @@
1
- {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../src/translations.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,OAAO,YAAY,CAAA;AAEvC,eAAO,MAAM,YAAY;;;;;;;;;CASxB,CAAA;AAED,eAAO,MAAM,eAAe,OAAQ,QAAQ,YAAY,CAAC,SAKxD,CAAA;AAED,eAAO,MAAM,cAAc,6HAAuC,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,SAE1F,CAAA"}
1
+ {"version":3,"file":"translations.d.ts","sourceRoot":"","sources":["../src/translations.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,OAAO,YAAY,CAAA;AAEvC,eAAO,MAAM,YAAY;;;;;;;;;CASxB,CAAA;AAED,eAAO,MAAM,eAAe,OAAQ,QAAQ,YAAY,CAAC,SAMxD,CAAA;AAED,eAAO,MAAM,cAAc,6HAAuC,CAAC,SAAS,YAAY,CAAC,CAAC,CAAC,SAE1F,CAAA"}
@@ -10,6 +10,7 @@ export var translations = {
10
10
  };
11
11
  export var setTranslations = function(ts) {
12
12
  for(var key in ts){
13
+ // TODO
13
14
  // @ts-expect-error
14
15
  translations[key] = ts[key];
15
16
  }
@@ -1 +1 @@
1
- {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/utils/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE7F,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,GAAG,GAAG,SAAS,IAAI,aAAa,CAAC,GAAG,CAAC,CAMhF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,YAAY,CAGpE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,SAAS,CAgBxD"}
1
+ {"version":3,"file":"react.d.ts","sourceRoot":"","sources":["../../src/utils/react.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,KAAK,aAAa,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE7F,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,GAAG,GAAG,SAAS,IAAI,aAAa,CAAC,GAAG,CAAC,CAOhF;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,GAAG,GAAG,OAAO,IAAI,YAAY,CAIpE;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,GAAG,GAAG,IAAI,IAAI,SAAS,CAiBxD"}
@@ -7,15 +7,18 @@ function _instanceof(left, right) {
7
7
  }
8
8
  import { isValidElement } from "react";
9
9
  export function isReactComponent(Component) {
10
- return typeof Component === "function" && // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- React component, it's fine
10
+ return typeof Component === "function" && // TODO
11
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- React component, it's fine
11
12
  (_instanceof(Component.prototype, Component) || Component.displayName !== undefined);
12
13
  }
13
14
  export function isReactElement(element) {
15
+ // TODO
14
16
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
15
17
  return isValidElement(element);
16
18
  }
17
19
  export function isReactNode(node) {
18
- if (// eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
20
+ if (// TODO
21
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
19
22
  isValidElement(node) || // Check if it's a React element
20
23
  typeof node === "string" || // Check if it's a string
21
24
  typeof node === "number" // Check if it's a number
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/ui",
3
- "version": "1.0.4",
3
+ "version": "1.0.5",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",
@@ -39,7 +39,7 @@
39
39
  },
40
40
  "dependencies": {
41
41
  "@chakra-ui/react": "^2.8.2",
42
- "@driveflux/icons": "1.0.3",
42
+ "@driveflux/icons": "1.0.4",
43
43
  "lodash": "^4.17.21"
44
44
  },
45
45
  "peerDependencies": {
package/src/index.ts CHANGED
@@ -1,3 +1,4 @@
1
+ // TODO check if is an error or not
1
2
  // Turbopack has a bug that's not allowing export * from './chakra.js' to work
2
3
  export * from './chakra.js'
3
4
 
@@ -18,8 +18,8 @@ const getModalComponent = (modalContentConfig: ModalContentConfig, controls: Mod
18
18
  return <StandardModalContent controls={controls} modalContentConfig={modalContentConfig} {...otherProps} />
19
19
 
20
20
  }
21
- case 'minimal':{
22
- return <MinimalModalContent controls={controls} modalContentConfig={modalContentConfig} {...otherProps} />
21
+ case 'minimal': {
22
+ return <MinimalModalContent controls={controls} modalContentConfig={modalContentConfig} {...otherProps} />
23
23
  }
24
24
  case 'custom':
25
25
  return isReactNode(modalContentConfig.content) ? modalContentConfig.content : <modalContentConfig.content open={open} close={close} {...otherProps} />
@@ -59,7 +59,7 @@ const ModalProvider: FC<PropsWithChildren> = ({ children }) => {
59
59
  newModalContentConfig = modalContentConfigOrOptions.modalContentConfig
60
60
  newModalSate = modalContentConfigOrOptions.modalContentConfig.initialModalState
61
61
  newModalOptions = modalContentConfigOrOptions
62
- }
62
+ }
63
63
  // we will set the state only when we're passing the modal content config. Maybe the modal
64
64
  // was closed with keepModalContentConfig set to true, so we don't want to override the state
65
65
  else if (modalContentConfigOrOptions) {
@@ -71,7 +71,7 @@ const ModalProvider: FC<PropsWithChildren> = ({ children }) => {
71
71
  setModalContentConfig((oldModalContentConfig) => {
72
72
  const modalContentConfig = newModalContentConfig || oldModalContentConfig
73
73
 
74
- if(modalContentConfig) {
74
+ if (modalContentConfig) {
75
75
  onOpenRaw()
76
76
  }
77
77
 
@@ -91,7 +91,7 @@ const ModalProvider: FC<PropsWithChildren> = ({ children }) => {
91
91
  if (!oldModalContentConfig) {
92
92
  return oldModalContentConfig
93
93
  }
94
-
94
+
95
95
  return {
96
96
  ...oldModalContentConfig,
97
97
  ...updateOptions.modalContentConfig,
@@ -106,6 +106,7 @@ const ModalProvider: FC<PropsWithChildren> = ({ children }) => {
106
106
  const state = useMemo((): ModalContextState => {
107
107
  return {
108
108
  isOpen,
109
+ // TODO
109
110
  // @ts-expect-error
110
111
  open: onOpen,
111
112
  close: onClose,
@@ -126,7 +127,7 @@ const ModalProvider: FC<PropsWithChildren> = ({ children }) => {
126
127
  isCentered
127
128
  blockScrollOnMount
128
129
  closeOnOverlayClick
129
- size={ modalContentConfig?.size || { base: 'full', md: '3xl' }}
130
+ size={modalContentConfig?.size || { base: 'full', md: '3xl' }}
130
131
  isOpen={isOpen}
131
132
  onClose={onClose}
132
133
  >
@@ -1,3 +1,7 @@
1
+ // TODO sync this with the one in dump
2
+ // remove dump file version
3
+ // update all instances using colors
4
+
1
5
  export const colors = {
2
6
  /**
3
7
  * #EFEFF0 Light Gray
@@ -103,6 +107,7 @@ export const colors = {
103
107
  900: '#000000'
104
108
  },
105
109
 
110
+ // TODO add 25
106
111
  success: {
107
112
  50: '#d8f7f2',
108
113
  100: '#98e6d6',
@@ -116,6 +121,7 @@ export const colors = {
116
121
  900: '#005530'
117
122
  },
118
123
 
124
+ // TODO add 25
119
125
  accent: {
120
126
  50: '#fceaee',
121
127
  100: '#f8cad3',
@@ -129,6 +135,7 @@ export const colors = {
129
135
  900: '#aa0026'
130
136
  },
131
137
 
138
+ // TODO add 25
132
139
  warning: {
133
140
  50: '#FDF0DE',
134
141
  100: '#F4B25C',
@@ -156,6 +163,7 @@ export const colors = {
156
163
  900: '#50C8E8'
157
164
  },
158
165
 
166
+ // TODO add 25
159
167
  alert: {
160
168
  50: '#E24657',
161
169
  100: '#E24657',
@@ -13,6 +13,7 @@ export const translations = {
13
13
 
14
14
  export const setTranslations = (ts: Partial<Translations>) => {
15
15
  for (const key in ts) {
16
+ // TODO
16
17
  // @ts-expect-error
17
18
  translations[key] = ts[key as keyof Translations]!
18
19
  }
@@ -3,18 +3,21 @@ import { isValidElement, type ComponentType, type ReactElement, type ReactNode }
3
3
  export function isReactComponent(Component: any): Component is ComponentType<any> {
4
4
  return (
5
5
  typeof Component === 'function' &&
6
+ // TODO
6
7
  // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access -- React component, it's fine
7
8
  (Component.prototype instanceof Component || Component.displayName !== undefined)
8
9
  )
9
10
  }
10
11
 
11
12
  export function isReactElement(element: any): element is ReactElement {
13
+ // TODO
12
14
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
13
15
  return isValidElement(element)
14
16
  }
15
17
 
16
18
  export function isReactNode(node: any): node is ReactNode {
17
19
  if (
20
+ // TODO
18
21
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument -- isValidElement is a validation function
19
22
  isValidElement(node) || // Check if it's a React element
20
23
  typeof node === 'string' || // Check if it's a string