@geoinsight/react-components 0.8.12 → 1.0.0

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.
Files changed (208) hide show
  1. package/dist/cjs/index.css +463 -178
  2. package/dist/cjs/index.js +302 -219
  3. package/dist/cjs/index.js.map +1 -1
  4. package/dist/esm/index.css +463 -178
  5. package/dist/esm/index.js +303 -216
  6. package/dist/esm/index.js.map +1 -1
  7. package/package.json +13 -10
  8. package/storybook-static/115.875b767a.iframe.bundle.js +1 -0
  9. package/storybook-static/143.e6f5cdb6.iframe.bundle.js +2 -0
  10. package/storybook-static/143.e6f5cdb6.iframe.bundle.js.LICENSE.txt +5 -0
  11. package/storybook-static/155.77237ba4.iframe.bundle.js +1 -0
  12. package/storybook-static/439.c739b452.iframe.bundle.js +1 -0
  13. package/storybook-static/49.9b0e5ded.iframe.bundle.js +2 -0
  14. package/storybook-static/497.a86e867f.iframe.bundle.js +134 -0
  15. package/storybook-static/497.a86e867f.iframe.bundle.js.map +1 -0
  16. package/storybook-static/607.55c78741.iframe.bundle.js +1 -0
  17. package/storybook-static/729.0e069928.iframe.bundle.js +1 -0
  18. package/storybook-static/750.1274e780.iframe.bundle.js +1 -0
  19. package/storybook-static/751.ce4b4118.iframe.bundle.js +411 -0
  20. package/storybook-static/751.ce4b4118.iframe.bundle.js.map +1 -0
  21. package/storybook-static/797.7e13109b.iframe.bundle.js +1 -0
  22. package/storybook-static/887.40a58cdf.iframe.bundle.js +1 -0
  23. package/storybook-static/components-button-index-stories.6b018cc0.iframe.bundle.js +1 -0
  24. package/storybook-static/components-form-index-stories.847721d0.iframe.bundle.js +1 -0
  25. package/storybook-static/components-input-index-stories.dba32411.iframe.bundle.js +2 -0
  26. package/storybook-static/components-loading-index-stories.b0653762.iframe.bundle.js +2 -0
  27. package/storybook-static/components-map-index-stories.08759744.iframe.bundle.js +1 -0
  28. package/storybook-static/components-menu-index-stories.0c6eb18b.iframe.bundle.js +1 -0
  29. package/storybook-static/components-modal-index-stories.ef8c8dd0.iframe.bundle.js +2 -0
  30. package/storybook-static/components-select-index-stories.a5ffb2f5.iframe.bundle.js +1 -0
  31. package/storybook-static/components-text-area-index-stories.44892133.iframe.bundle.js +2 -0
  32. package/storybook-static/context-loading-index-stories.ad731185.iframe.bundle.js +2 -0
  33. package/storybook-static/context-modal-index-stories.a607105d.iframe.bundle.js +2 -0
  34. package/storybook-static/iframe.html +4 -4
  35. package/storybook-static/index.html +2 -1
  36. package/storybook-static/index.json +1 -1
  37. package/storybook-static/main.9dd1aacd.iframe.bundle.js +1 -0
  38. package/storybook-static/project.json +1 -1
  39. package/storybook-static/runtime~main.3725a291.iframe.bundle.js +1 -0
  40. package/storybook-static/sb-addons/essentials-actions-2/manager-bundle.js +1 -1
  41. package/storybook-static/sb-addons/essentials-backgrounds-3/manager-bundle.js +4 -4
  42. package/storybook-static/sb-addons/essentials-controls-1/manager-bundle.js +37 -88
  43. package/storybook-static/sb-addons/essentials-measure-6/manager-bundle.js +1 -1
  44. package/storybook-static/sb-addons/essentials-outline-7/manager-bundle.js +1 -1
  45. package/storybook-static/sb-addons/essentials-toolbars-5/manager-bundle.js +1 -1
  46. package/storybook-static/sb-addons/essentials-viewport-4/manager-bundle.js +1 -1
  47. package/storybook-static/sb-addons/interactions-8/manager-bundle.js +9 -24
  48. package/storybook-static/sb-addons/links-0/manager-bundle.js +1 -1
  49. package/storybook-static/sb-manager/WithTooltip-V3YHNWJZ-LVYLGZW2.js +1 -0
  50. package/storybook-static/sb-manager/chunk-2IXBUOFS.js +7 -0
  51. package/storybook-static/sb-manager/{chunk-DAJ4OSDJ.js → chunk-F4FCO4CF.js} +23 -23
  52. package/storybook-static/sb-manager/{chunk-NFZCBIX3.js → chunk-INSKDKQB.js} +6 -6
  53. package/storybook-static/sb-manager/chunk-NGTUFCUO.js +9 -0
  54. package/storybook-static/sb-manager/globals-module-info.js +1 -0
  55. package/storybook-static/sb-manager/globals.js +1 -1
  56. package/storybook-static/sb-manager/index.js +1 -1
  57. package/storybook-static/sb-manager/runtime.js +1 -1
  58. package/storybook-static/sb-manager/{syntaxhighlighter-NMPM6SWI-GZTSOZ5L.js → syntaxhighlighter-V7JZZA35-DXZCI2WR.js} +1 -1
  59. package/storybook-static/sb-preview/globals.js +1 -1
  60. package/storybook-static/sb-preview/runtime.js +16 -16
  61. package/storybook-static/static/media/loading.cbc96c95.gif +0 -0
  62. package/storybook-static/stories-Introduction-stories-mdx.d86fb94b.iframe.bundle.js +2 -0
  63. package/storybook-static/stories-Introduction-stories-mdx.d86fb94b.iframe.bundle.js.LICENSE.txt +9 -0
  64. package/storybook-static/stories.json +1 -1
  65. package/.yarn/install-state.gz +0 -0
  66. package/.yarnrc.yml +0 -1
  67. package/dist/cjs/components/accordion/accordion-button.d.ts +0 -4
  68. package/dist/cjs/components/accordion/accordion-content.d.ts +0 -4
  69. package/dist/cjs/components/accordion/accordion-item.d.ts +0 -4
  70. package/dist/cjs/components/accordion/accordion.d.ts +0 -4
  71. package/dist/cjs/components/accordion/index.d.ts +0 -4
  72. package/dist/cjs/components/accordion/index.stories.d.ts +0 -7
  73. package/dist/cjs/components/accordion/index.types.d.ts +0 -36
  74. package/dist/cjs/components/button/index.d.ts +0 -5
  75. package/dist/cjs/components/button/index.stories.d.ts +0 -7
  76. package/dist/cjs/components/button/index.types.d.ts +0 -41
  77. package/dist/cjs/components/form/FormInput.d.ts +0 -4
  78. package/dist/cjs/components/form/FormSelect.d.ts +0 -4
  79. package/dist/cjs/components/form/FormTextArea.d.ts +0 -4
  80. package/dist/cjs/components/form/index.d.ts +0 -4
  81. package/dist/cjs/components/form/index.stories.d.ts +0 -7
  82. package/dist/cjs/components/form/index.types.d.ts +0 -45
  83. package/dist/cjs/components/input/index.d.ts +0 -4
  84. package/dist/cjs/components/input/index.stories.d.ts +0 -8
  85. package/dist/cjs/components/input/index.types.d.ts +0 -40
  86. package/dist/cjs/components/loading/index.d.ts +0 -4
  87. package/dist/cjs/components/loading/index.stories.d.ts +0 -6
  88. package/dist/cjs/components/loading/index.types.d.ts +0 -11
  89. package/dist/cjs/components/map/MapboxMap.d.ts +0 -2
  90. package/dist/cjs/components/map/index.d.ts +0 -4
  91. package/dist/cjs/components/map/index.stories.d.ts +0 -8
  92. package/dist/cjs/components/map/index.types.d.ts +0 -56
  93. package/dist/cjs/components/map/useAddMap.d.ts +0 -8
  94. package/dist/cjs/components/map-control/index.d.ts +0 -4
  95. package/dist/cjs/components/map-control/index.types.d.ts +0 -11
  96. package/dist/cjs/components/modal/index.d.ts +0 -4
  97. package/dist/cjs/components/modal/index.stories.d.ts +0 -6
  98. package/dist/cjs/components/modal/index.types.d.ts +0 -39
  99. package/dist/cjs/components/select/index.d.ts +0 -4
  100. package/dist/cjs/components/select/index.stories.d.ts +0 -7
  101. package/dist/cjs/components/select/index.types.d.ts +0 -30
  102. package/dist/cjs/components/text-area/index.d.ts +0 -5
  103. package/dist/cjs/components/text-area/index.stories.d.ts +0 -7
  104. package/dist/cjs/components/text-area/index.types.d.ts +0 -43
  105. package/dist/cjs/context/accordion/index.d.ts +0 -10
  106. package/dist/cjs/context/loading/index.d.ts +0 -24
  107. package/dist/cjs/context/loading/index.stories.d.ts +0 -8
  108. package/dist/cjs/context/modal/index.d.ts +0 -29
  109. package/dist/cjs/context/modal/index.stories.d.ts +0 -6
  110. package/dist/cjs/context/theme/index.d.ts +0 -18
  111. package/dist/cjs/decorators/withColorScheme.d.ts +0 -7
  112. package/dist/cjs/decorators/withLoading.d.ts +0 -2
  113. package/dist/cjs/decorators/withModal.d.ts +0 -2
  114. package/dist/cjs/decorators/withWrapper.d.ts +0 -2
  115. package/dist/cjs/index.d.ts +0 -18
  116. package/dist/cjs/utils/palette.d.ts +0 -1
  117. package/dist/cjs/utils/recursive.d.ts +0 -6
  118. package/dist/esm/components/accordion/accordion-button.d.ts +0 -4
  119. package/dist/esm/components/accordion/accordion-content.d.ts +0 -4
  120. package/dist/esm/components/accordion/accordion-item.d.ts +0 -4
  121. package/dist/esm/components/accordion/accordion.d.ts +0 -4
  122. package/dist/esm/components/accordion/index.d.ts +0 -4
  123. package/dist/esm/components/accordion/index.stories.d.ts +0 -7
  124. package/dist/esm/components/accordion/index.types.d.ts +0 -36
  125. package/dist/esm/components/button/index.d.ts +0 -5
  126. package/dist/esm/components/button/index.stories.d.ts +0 -7
  127. package/dist/esm/components/button/index.types.d.ts +0 -41
  128. package/dist/esm/components/form/FormInput.d.ts +0 -4
  129. package/dist/esm/components/form/FormSelect.d.ts +0 -4
  130. package/dist/esm/components/form/FormTextArea.d.ts +0 -4
  131. package/dist/esm/components/form/index.d.ts +0 -4
  132. package/dist/esm/components/form/index.stories.d.ts +0 -7
  133. package/dist/esm/components/form/index.types.d.ts +0 -45
  134. package/dist/esm/components/input/index.d.ts +0 -4
  135. package/dist/esm/components/input/index.stories.d.ts +0 -8
  136. package/dist/esm/components/input/index.types.d.ts +0 -40
  137. package/dist/esm/components/loading/index.d.ts +0 -4
  138. package/dist/esm/components/loading/index.stories.d.ts +0 -6
  139. package/dist/esm/components/loading/index.types.d.ts +0 -11
  140. package/dist/esm/components/map/MapboxMap.d.ts +0 -2
  141. package/dist/esm/components/map/index.d.ts +0 -4
  142. package/dist/esm/components/map/index.stories.d.ts +0 -8
  143. package/dist/esm/components/map/index.types.d.ts +0 -56
  144. package/dist/esm/components/map/useAddMap.d.ts +0 -8
  145. package/dist/esm/components/map-control/index.d.ts +0 -4
  146. package/dist/esm/components/map-control/index.types.d.ts +0 -11
  147. package/dist/esm/components/modal/index.d.ts +0 -4
  148. package/dist/esm/components/modal/index.stories.d.ts +0 -6
  149. package/dist/esm/components/modal/index.types.d.ts +0 -39
  150. package/dist/esm/components/select/index.d.ts +0 -4
  151. package/dist/esm/components/select/index.stories.d.ts +0 -7
  152. package/dist/esm/components/select/index.types.d.ts +0 -30
  153. package/dist/esm/components/text-area/index.d.ts +0 -5
  154. package/dist/esm/components/text-area/index.stories.d.ts +0 -7
  155. package/dist/esm/components/text-area/index.types.d.ts +0 -43
  156. package/dist/esm/context/accordion/index.d.ts +0 -10
  157. package/dist/esm/context/loading/index.d.ts +0 -24
  158. package/dist/esm/context/loading/index.stories.d.ts +0 -8
  159. package/dist/esm/context/modal/index.d.ts +0 -29
  160. package/dist/esm/context/modal/index.stories.d.ts +0 -6
  161. package/dist/esm/context/theme/index.d.ts +0 -18
  162. package/dist/esm/decorators/withColorScheme.d.ts +0 -7
  163. package/dist/esm/decorators/withLoading.d.ts +0 -2
  164. package/dist/esm/decorators/withModal.d.ts +0 -2
  165. package/dist/esm/decorators/withWrapper.d.ts +0 -2
  166. package/dist/esm/index.d.ts +0 -18
  167. package/dist/esm/utils/palette.d.ts +0 -1
  168. package/dist/esm/utils/recursive.d.ts +0 -6
  169. package/storybook-static/145.34858399.iframe.bundle.js +0 -2
  170. package/storybook-static/296.673fff81.iframe.bundle.js +0 -1
  171. package/storybook-static/439.51454c4d.iframe.bundle.js +0 -1
  172. package/storybook-static/471.f9d522fc.iframe.bundle.js +0 -402
  173. package/storybook-static/471.f9d522fc.iframe.bundle.js.map +0 -1
  174. package/storybook-static/497.dafe304f.iframe.bundle.js +0 -134
  175. package/storybook-static/497.dafe304f.iframe.bundle.js.map +0 -1
  176. package/storybook-static/659.1ad30476.iframe.bundle.js +0 -1
  177. package/storybook-static/677.e7db0cd6.iframe.bundle.js +0 -2
  178. package/storybook-static/677.e7db0cd6.iframe.bundle.js.LICENSE.txt +0 -15
  179. package/storybook-static/729.01f72d48.iframe.bundle.js +0 -1
  180. package/storybook-static/750.2215b5aa.iframe.bundle.js +0 -1
  181. package/storybook-static/796.09f6c96d.iframe.bundle.js +0 -1
  182. package/storybook-static/984.6be9debc.iframe.bundle.js +0 -1
  183. package/storybook-static/components-accordion-index-stories.ef18c840.iframe.bundle.js +0 -1
  184. package/storybook-static/components-button-index-stories.ab760bed.iframe.bundle.js +0 -2
  185. package/storybook-static/components-form-index-stories.3cba66b0.iframe.bundle.js +0 -1
  186. package/storybook-static/components-input-index-stories.52cb94b7.iframe.bundle.js +0 -2
  187. package/storybook-static/components-loading-index-stories.c03f4231.iframe.bundle.js +0 -2
  188. package/storybook-static/components-map-index-stories.df3b2a69.iframe.bundle.js +0 -1
  189. package/storybook-static/components-modal-index-stories.4204e0d1.iframe.bundle.js +0 -1
  190. package/storybook-static/components-select-index-stories.5d8e5e16.iframe.bundle.js +0 -1
  191. package/storybook-static/components-text-area-index-stories.c1412c7f.iframe.bundle.js +0 -2
  192. package/storybook-static/context-loading-index-stories.4d6c26b7.iframe.bundle.js +0 -2
  193. package/storybook-static/context-modal-index-stories.74348761.iframe.bundle.js +0 -1
  194. package/storybook-static/main.6ecf7d5b.iframe.bundle.js +0 -1
  195. package/storybook-static/runtime~main.b58604cf.iframe.bundle.js +0 -1
  196. package/storybook-static/sb-manager/WithTooltip-4HIR6TLV-YPPZ2DMB.js +0 -1
  197. package/storybook-static/sb-manager/chunk-FWZ33S65.js +0 -9
  198. package/storybook-static/sb-manager/chunk-SZNM6KS3.js +0 -7
  199. package/storybook-static/stories-Introduction-stories-mdx.7a2cd1ec.iframe.bundle.js +0 -2
  200. /package/storybook-static/{145.34858399.iframe.bundle.js.LICENSE.txt → 49.9b0e5ded.iframe.bundle.js.LICENSE.txt} +0 -0
  201. /package/storybook-static/{497.dafe304f.iframe.bundle.js.LICENSE.txt → 497.a86e867f.iframe.bundle.js.LICENSE.txt} +0 -0
  202. /package/storybook-static/{471.f9d522fc.iframe.bundle.js.LICENSE.txt → 751.ce4b4118.iframe.bundle.js.LICENSE.txt} +0 -0
  203. /package/storybook-static/{components-button-index-stories.ab760bed.iframe.bundle.js.LICENSE.txt → components-input-index-stories.dba32411.iframe.bundle.js.LICENSE.txt} +0 -0
  204. /package/storybook-static/{components-input-index-stories.52cb94b7.iframe.bundle.js.LICENSE.txt → components-loading-index-stories.b0653762.iframe.bundle.js.LICENSE.txt} +0 -0
  205. /package/storybook-static/{components-loading-index-stories.c03f4231.iframe.bundle.js.LICENSE.txt → components-modal-index-stories.ef8c8dd0.iframe.bundle.js.LICENSE.txt} +0 -0
  206. /package/storybook-static/{components-text-area-index-stories.c1412c7f.iframe.bundle.js.LICENSE.txt → components-text-area-index-stories.44892133.iframe.bundle.js.LICENSE.txt} +0 -0
  207. /package/storybook-static/{context-loading-index-stories.4d6c26b7.iframe.bundle.js.LICENSE.txt → context-loading-index-stories.ad731185.iframe.bundle.js.LICENSE.txt} +0 -0
  208. /package/storybook-static/{stories-Introduction-stories-mdx.7a2cd1ec.iframe.bundle.js.LICENSE.txt → context-modal-index-stories.a607105d.iframe.bundle.js.LICENSE.txt} +0 -0
@@ -1,39 +0,0 @@
1
- import React from "react";
2
- export interface Modal {
3
- /**
4
- * Custom css class name.
5
- */
6
- className?: string;
7
- /**
8
- * Children
9
- */
10
- children?: React.ReactNode;
11
- /**
12
- * Modal footer
13
- */
14
- footer?: React.ReactNode;
15
- /**
16
- * Close click function
17
- */
18
- handleClose?: any;
19
- /**
20
- * Modal close button
21
- */
22
- hasCloseButton?: boolean;
23
- /**
24
- * Overlay div
25
- */
26
- hasOverlay?: boolean;
27
- /**
28
- * Modal body ref
29
- */
30
- modalref?: React.LegacyRef<HTMLDivElement>;
31
- /**
32
- * Subtitle of the modal
33
- */
34
- subtitle?: React.ReactNode;
35
- /**
36
- * Title of the modal
37
- */
38
- title?: React.ReactNode;
39
- }
@@ -1,4 +0,0 @@
1
- import { Select as SelectProps } from "./index.types";
2
- import "./index.css";
3
- export declare function Select({ inputClassName, classNameGroup, options, styleGroup, defaultValue, setFormSelected, clearError, resetForm, onFormBlur, handleSelect, ...rest }: SelectProps): import("react/jsx-runtime").JSX.Element;
4
- export default Select;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Select } from "./index";
3
- declare const meta: Meta<typeof Select>;
4
- export default meta;
5
- type Story = StoryObj<typeof Select>;
6
- export declare const Primary: Story;
7
- export declare const Error: Story;
@@ -1,30 +0,0 @@
1
- import { CSSProperties } from "react";
2
- import { dataTheme } from "data-theme";
3
- export interface Select extends React.InputHTMLAttributes<HTMLInputElement> {
4
- /**
5
- * Custom css class name.
6
- */
7
- inputClassName?: string;
8
- /**
9
- * Custom css class name for group wrapper.
10
- */
11
- classNameGroup?: string;
12
- /**
13
- * Data theme for the html. `${themes}`
14
- */
15
- paletteTheme?: dataTheme;
16
- /**
17
- * Error message to show when input has an error.
18
- */
19
- options?: string[];
20
- /**
21
- * Style input group wrapper
22
- */
23
- styleGroup?: CSSProperties;
24
- defaultValue?: string;
25
- setFormSelected?: any;
26
- clearError?: any;
27
- resetForm?: any;
28
- onFormBlur?: any;
29
- handleSelect?: any;
30
- }
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { TextArea as TextAreaProps } from "./index.types";
3
- import "./index.css";
4
- export declare function TextArea({ buttonDisabled, className, disabled, error, hasToggleButton, hideHeight, label, labelClass, placeholder, showHeight, style, textareaClassName, ...rest }: TextAreaProps): JSX.Element;
5
- export default TextArea;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { TextArea } from "./index";
3
- declare const meta: Meta<typeof TextArea>;
4
- export default meta;
5
- type Story = StoryObj<typeof TextArea>;
6
- export declare const Active: Story;
7
- export declare const Disabled: Story;
@@ -1,43 +0,0 @@
1
- import { CSSProperties } from "react";
2
- import { FieldError, FieldErrorsImpl, Merge } from "react-hook-form";
3
- export interface TextArea extends React.TextareaHTMLAttributes<HTMLTextAreaElement> {
4
- /**
5
- * Custom css class name textarea wrapper.
6
- */
7
- className?: string;
8
- /**
9
- * Disable prop
10
- */
11
- disabled?: boolean;
12
- /**
13
- * Error message to show when input has an error.
14
- */
15
- error?: {
16
- message?: string | false | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
17
- is?: boolean;
18
- };
19
- hasToggleButton?: boolean;
20
- /**
21
- * Minimum height if toggle button is true
22
- */
23
- hideHeight?: string;
24
- /**
25
- * Placeholder for textarea html tag
26
- */
27
- placeholder?: string;
28
- /**
29
- * Maximum height if toggle button is false
30
- */
31
- showHeight?: string;
32
- /**
33
- * Style textarea group wrapper
34
- */
35
- style?: CSSProperties;
36
- /**
37
- * Classname of the textarea
38
- */
39
- textareaClassName?: string;
40
- label?: string;
41
- labelClass?: string;
42
- buttonDisabled?: boolean;
43
- }
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import { Accordion, ToggleArray } from "../../components/accordion/index.types";
3
- interface State {
4
- toggle?: ToggleArray;
5
- setToggle: (prev: any) => void;
6
- }
7
- declare const AccordionContext: React.Context<State | undefined>;
8
- declare function AccordionProvider({ children, expanded }: Accordion): import("react/jsx-runtime").JSX.Element;
9
- declare function useAccordion(): State;
10
- export { useAccordion, AccordionContext, AccordionProvider };
@@ -1,24 +0,0 @@
1
- import React, { ReactNode, RefObject } from "react";
2
- type State = {
3
- isLoading: boolean;
4
- message?: string | React.ReactNode;
5
- ref?: RefObject<ReactNode>;
6
- };
7
- type Context = {
8
- state: State;
9
- setRef: (ref: RefObject<ReactNode>) => void;
10
- setMessage: (message: string) => void;
11
- startLoading: () => void;
12
- stopLoading: () => void;
13
- };
14
- type LoadingProviderProps = {
15
- children: React.ReactNode;
16
- };
17
- type UseLoadingProps = {
18
- ref?: RefObject<ReactNode>;
19
- message?: string;
20
- };
21
- declare const LoadingContext: React.Context<Context | undefined>;
22
- declare function LoadingProvider({ children }: LoadingProviderProps): import("react/jsx-runtime").JSX.Element;
23
- declare function useLoading({ ref, message }?: UseLoadingProps): Context;
24
- export { LoadingContext, LoadingProvider, useLoading };
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { LoadingProvider } from ".";
3
- declare const meta: Meta<typeof LoadingProvider>;
4
- export default meta;
5
- type Story = StoryObj<typeof LoadingProvider>;
6
- export declare const Basic: Story;
7
- export declare const CustomMessage: Story;
8
- export declare const CustomImage: Story;
@@ -1,29 +0,0 @@
1
- import React from "react";
2
- import Modal from "../../components/modal";
3
- type Modal = {
4
- title?: React.ReactNode;
5
- subtitle?: React.ReactNode;
6
- content?: React.ReactNode;
7
- hasCloseButton?: boolean;
8
- hasOverlay?: boolean;
9
- hasWindowClose?: boolean;
10
- footer?: React.ReactNode;
11
- isCustom?: boolean;
12
- customRef?: any;
13
- };
14
- interface State extends Modal {
15
- isModal: boolean;
16
- }
17
- type Context = {
18
- state: State;
19
- openModal: (modal?: Modal) => void;
20
- closeModal: () => void;
21
- };
22
- type ModalProviderProps = {
23
- children: React.ReactNode;
24
- };
25
- type UseModalProps = {};
26
- declare const ModalContext: React.Context<Context | undefined>;
27
- declare function ModalProvider({ children }: ModalProviderProps): import("react/jsx-runtime").JSX.Element;
28
- declare function useModal({}?: UseModalProps): Context;
29
- export { ModalContext, ModalProvider, useModal };
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { ModalProvider } from ".";
3
- declare const meta: Meta<typeof ModalProvider>;
4
- export default meta;
5
- type Story = StoryObj<typeof ModalProvider>;
6
- export declare const Basic: Story;
@@ -1,18 +0,0 @@
1
- import { DataPalette } from "data-palette";
2
- import React from "react";
3
- type DataTheme = "light" | "dark";
4
- type State = {
5
- dataTheme?: DataTheme;
6
- switchDataTheme: (mode: DataTheme) => void;
7
- dataPalette?: DataPalette;
8
- switchDataPalette: (mode: DataPalette) => void;
9
- };
10
- type ThemeProviderProps = {
11
- children: React.ReactNode;
12
- dataTheme?: DataTheme;
13
- dataPalette?: DataPalette;
14
- };
15
- declare const ThemeContext: React.Context<State | undefined>;
16
- declare function ThemeProvider({ children, dataTheme: dataThemeProp, dataPalette: dataPaletteProp, }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
17
- declare function useTheme(): State;
18
- export { ThemeContext, ThemeProvider, useTheme };
@@ -1,7 +0,0 @@
1
- import { StoryContext, StoryFn } from "@storybook/react";
2
- import "../styles/variables.css";
3
- export declare const withColorScheme: (Story: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
4
- export declare const Wrapped: ({ Story, context, }: {
5
- Story: StoryFn;
6
- context: StoryContext;
7
- }) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { StoryContext, StoryFn } from "@storybook/react";
2
- export declare const withLoading: (Story: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { StoryContext, StoryFn } from "@storybook/react";
2
- export declare const withModal: (Story: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
@@ -1,2 +0,0 @@
1
- import { StoryContext, StoryFn } from "@storybook/react";
2
- export declare const withWrapper: (Story: StoryFn, context: StoryContext) => import("react/jsx-runtime").JSX.Element;
@@ -1,18 +0,0 @@
1
- import "../src/styles/variables.css";
2
- export { Accordion, AccordionItem, AccordionButton, AccordionContent } from "./components/accordion";
3
- export { Button } from "./components/button";
4
- export { Form } from "./components/form";
5
- export { FormInput } from "./components/form/FormInput";
6
- export { FormTextArea } from "./components/form/FormTextArea";
7
- export { FormSelect } from "./components/form/FormSelect";
8
- export { Input } from "./components/input";
9
- export { Loading } from "./components/loading";
10
- export { Modal } from "./components/modal";
11
- export { Select } from "./components/select";
12
- export { TextArea } from "./components/text-area";
13
- export { MapComponent } from "./components/map";
14
- export { MapControl } from "./components/map-control";
15
- export { LoadingContext, LoadingProvider, useLoading } from "./context/loading";
16
- export { ModalContext, ModalProvider, useModal } from "./context/modal";
17
- export { ThemeContext, ThemeProvider, useTheme } from "./context/theme";
18
- export { AccordionContext, AccordionProvider, useAccordion } from "./context/accordion";
@@ -1 +0,0 @@
1
- export declare const palette: readonly ["forest", "water", "earth"];
@@ -1,6 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { ToggleArray } from "../components/accordion/index.types";
3
- export declare function recursiveChildren(children: ReactNode | ReactNode[], i?: number): ReactNode;
4
- export declare function recursiveToggle(children: ReactNode[], toggleArray: ToggleArray | undefined, i: number | undefined, props: {
5
- expanded: "all" | "none" | "custom";
6
- }): ToggleArray | undefined;
@@ -1,4 +0,0 @@
1
- import "./index.css";
2
- import { AccordionButton as AccordionButtonProps } from "./index.types";
3
- export declare function AccordionButton({ children, className, is, label, ...rest }: AccordionButtonProps): import("react/jsx-runtime").JSX.Element;
4
- export default AccordionButton;
@@ -1,4 +0,0 @@
1
- import "./index.css";
2
- import { AccordionContent as AccordionContentProps } from "./index.types";
3
- export declare const AccordionContent: ({ children, className, label, toggle, }: AccordionContentProps) => false | "" | import("react/jsx-runtime").JSX.Element | undefined;
4
- export default AccordionContent;
@@ -1,4 +0,0 @@
1
- import "./index.css";
2
- import { AccordionItem as AccordionItemProps } from "./index.types";
3
- export declare function AccordionItem({ children, className, label, isExpanded, }: AccordionItemProps): import("react/jsx-runtime").JSX.Element;
4
- export default AccordionItem;
@@ -1,4 +0,0 @@
1
- import "./index.css";
2
- import { Accordion as AccordionProps } from "./index.types";
3
- export declare function Accordion({ children, expanded, }: AccordionProps): import("react/jsx-runtime").JSX.Element;
4
- export default Accordion;
@@ -1,4 +0,0 @@
1
- export { Accordion } from "./accordion";
2
- export { AccordionItem } from "./accordion-item";
3
- export { AccordionButton } from "./accordion-button";
4
- export { AccordionContent } from "./accordion-content";
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Accordion } from "./accordion";
3
- declare const meta: Meta<typeof Accordion>;
4
- type Story = StoryObj<typeof Accordion>;
5
- export declare const Primary: Story;
6
- export declare const Secondary: Story;
7
- export default meta;
@@ -1,36 +0,0 @@
1
- import { ReactNode } from "react";
2
- import { ButtonAsButton, ButtonAsLink } from "../button/index.types";
3
- export interface Accordion {
4
- /**
5
- * Accordion children
6
- */
7
- children: ReactNode | ReactNode[];
8
- /**
9
- * Expand all items
10
- */
11
- expanded: "all" | "none" | "custom";
12
- }
13
- export interface ToggleArray {
14
- [key: string]: {
15
- depth: number;
16
- isToggle: boolean;
17
- paddingLeft?: string;
18
- };
19
- }
20
- export interface AccordionItem {
21
- children: ReactNode | ReactNode[];
22
- className?: string;
23
- label?: string;
24
- isExpanded?: boolean;
25
- }
26
- export type AccordionButton = ButtonAsButton & ButtonAsLink & {
27
- is?: "button" | "link";
28
- label?: string;
29
- toggle?: ToggleArray;
30
- };
31
- export interface AccordionContent {
32
- children: ReactNode | ReactNode[];
33
- className?: string;
34
- label?: string;
35
- toggle?: ToggleArray;
36
- }
@@ -1,5 +0,0 @@
1
- /// <reference types="react" />
2
- import { ButtonAsButton, ButtonAsLink } from "./index.types";
3
- import "./index.css";
4
- export declare function Button({ children, className, icon, isNewWindow, mode, size, as, CustomAnchor, ...rest }: ButtonAsButton | ButtonAsLink): JSX.Element;
5
- export default Button;
@@ -1,7 +0,0 @@
1
- import { StoryObj, Meta } from "@storybook/react";
2
- import { Button } from "./index";
3
- declare const meta: Meta<typeof Button>;
4
- export default meta;
5
- type Story = StoryObj<typeof Button>;
6
- export declare const Primary: Story;
7
- export declare const Secondary: Story;
@@ -1,41 +0,0 @@
1
- /// <reference types="react" />
2
- type Mode = "primary" | "secondary" | "icon";
3
- type Size = "small" | "medium" | "large";
4
- export type ButtonAsButton = Base & Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, keyof Base> & {
5
- as?: "button";
6
- };
7
- export type ButtonAsLink = Base & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, keyof Base> & {
8
- as?: "link";
9
- };
10
- export interface Base {
11
- /**
12
- * What to put inside the button (string or html elements)
13
- */
14
- children?: JSX.Element | string;
15
- /**
16
- * Custom css class name
17
- */
18
- className?: string;
19
- /**
20
- * If you want to add an icon image next to the children. Needs to be an react html element.
21
- */
22
- icon?: JSX.Element;
23
- /**
24
- * If you want to open a new window on the browser when you click the button. Only applies to html anchor elements.
25
- */
26
- isNewWindow?: boolean;
27
- /**
28
- * Css mode used to style the button.
29
- */
30
- mode?: Mode;
31
- /**
32
- * Button size.
33
- */
34
- size?: Size;
35
- /**
36
- * Button type.
37
- */
38
- as?: "button" | "link";
39
- CustomAnchor?: React.ComponentClass<any>;
40
- }
41
- export {};
@@ -1,4 +0,0 @@
1
- import "./index.css";
2
- import { FormInputs } from "./index.types";
3
- export declare function FormInput({ name, isRequired, error, defaultValue, ...rest }: FormInputs): import("react/jsx-runtime").JSX.Element;
4
- export default FormInput;
@@ -1,4 +0,0 @@
1
- import "./index.css";
2
- import { FormSelect as FormSelectProps } from "./index.types";
3
- export declare function FormSelect({ name, isRequired, error, fieldsToReset, ...rest }: FormSelectProps): import("react/jsx-runtime").JSX.Element;
4
- export default FormSelect;
@@ -1,4 +0,0 @@
1
- import "./index.css";
2
- import { FormInputs } from "./index.types";
3
- export declare function FormTextArea({ name, isRequired, error, ...rest }: FormInputs): import("react/jsx-runtime").JSX.Element;
4
- export default FormTextArea;
@@ -1,4 +0,0 @@
1
- import { Form as FormProps } from "./index.types";
2
- import "./index.css";
3
- export declare function Form({ children, onSubmit, submitButton, initialState, ...rest }: FormProps): import("react/jsx-runtime").JSX.Element;
4
- export default Form;
@@ -1,7 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Form } from "./index";
3
- declare const meta: Meta<typeof Form>;
4
- export default meta;
5
- type Story = StoryObj<typeof Form>;
6
- export declare const InsertForm: Story;
7
- export declare const UpdateForm: Story;
@@ -1,45 +0,0 @@
1
- import { Dispatch, JSXElementConstructor, ReactElement, ReactNode, SetStateAction } from "react";
2
- import { FieldError, FieldErrorsImpl, FieldValues, FormState, Merge } from "react-hook-form";
3
- import { Input } from "../input/index.types";
4
- import { TextArea } from "../text-area/index.types";
5
- import { Select } from "../select/index.types";
6
- export interface Form {
7
- /**
8
- * Custom css class name.
9
- */
10
- className?: string;
11
- children?: ReactNode | ReactNode[];
12
- onSubmit: (data: FieldValues, setResult: SetResult) => void;
13
- submitButton?: {
14
- label: string;
15
- };
16
- initialState?: FormState<FieldValues>;
17
- }
18
- export interface ReactNodeControlled extends ReactElement<any, string | JSXElementConstructor<any>> {
19
- props: ControlledInput;
20
- }
21
- export type ControlledInput = Input & TextArea & {
22
- name: string;
23
- error: string;
24
- };
25
- export type SetResult = Dispatch<SetStateAction<{
26
- message?: string;
27
- isSuccess: boolean;
28
- }>>;
29
- export interface FormInputs extends Input {
30
- name: string;
31
- isRequired?: boolean;
32
- error?: {
33
- message?: string | false | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
34
- is?: boolean;
35
- };
36
- }
37
- export interface FormSelect extends Select {
38
- name: string;
39
- isRequired?: boolean;
40
- error?: {
41
- message?: string | false | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
42
- is?: boolean;
43
- };
44
- fieldsToReset?: string[];
45
- }
@@ -1,4 +0,0 @@
1
- import { Input as InputProps } from "./index.types";
2
- import "./index.css";
3
- export declare function Input({ inputClassName, classNameGroup, error, inputRef, styleGroup, placeholder, label, labelClass, icon, ...rest }: InputProps): import("react/jsx-runtime").JSX.Element;
4
- export default Input;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Input } from "./index";
3
- declare const meta: Meta<typeof Input>;
4
- export default meta;
5
- type Story = StoryObj<typeof Input>;
6
- export declare const Primary: Story;
7
- export declare const Error: Story;
8
- export declare const Search: Story;
@@ -1,40 +0,0 @@
1
- import { dataTheme } from "data-theme";
2
- import { CSSProperties, ReactNode, Ref } from "react";
3
- import { FieldError, FieldErrorsImpl, Merge } from "react-hook-form";
4
- export interface Input extends React.InputHTMLAttributes<HTMLInputElement> {
5
- /**
6
- * Custom css class name.
7
- */
8
- inputClassName?: string;
9
- /**
10
- * Custom css class name for group wrapper.
11
- */
12
- classNameGroup?: string;
13
- /**
14
- * Data theme for the html. `${themes}`
15
- */
16
- paletteTheme?: dataTheme;
17
- /**
18
- * Error message to show when input has an error.
19
- */
20
- error?: {
21
- message?: string | false | FieldError | Merge<FieldError, FieldErrorsImpl<any>> | undefined;
22
- is?: boolean;
23
- };
24
- /**
25
- * Ref react elemnt to use
26
- */
27
- inputRef?: Ref<HTMLInputElement>;
28
- /**
29
- * Style input group wrapper
30
- */
31
- styleGroup?: CSSProperties;
32
- isRequired?: boolean;
33
- label?: string;
34
- labelClass?: string;
35
- icon?: {
36
- className?: string;
37
- element?: ReactNode;
38
- position?: "right" | "left";
39
- };
40
- }
@@ -1,4 +0,0 @@
1
- import { Loading as LoadingProps } from "./index.types";
2
- import "./index.css";
3
- export declare function Loading({ img, children }: LoadingProps): import("react/jsx-runtime").JSX.Element;
4
- export default Loading;
@@ -1,6 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { Loading } from "./index";
3
- declare const meta: Meta<typeof Loading>;
4
- export default meta;
5
- type Story = StoryObj<typeof Loading>;
6
- export declare const Primary: Story;
@@ -1,11 +0,0 @@
1
- import React from "react";
2
- export interface Loading {
3
- /**
4
- * Image or gif used
5
- */
6
- img?: string;
7
- /**
8
- * Message that its sent
9
- */
10
- children?: React.ReactNode;
11
- }
@@ -1,2 +0,0 @@
1
- declare function MapboxMap(): import("react/jsx-runtime").JSX.Element;
2
- export default MapboxMap;
@@ -1,4 +0,0 @@
1
- import { Map as MapProps } from "./index.types";
2
- import "./index.css";
3
- export declare function MapComponent({ basemap, initialViewState, framework, mapProps, hasSwitchBasemap, layers, controls, basemapToken, ...rest }: MapProps): import("react/jsx-runtime").JSX.Element;
4
- export default MapComponent;
@@ -1,8 +0,0 @@
1
- import { Meta, StoryObj } from "@storybook/react";
2
- import { MapComponent } from "./index";
3
- declare const meta: Meta<typeof MapComponent>;
4
- export default meta;
5
- type Story = StoryObj<typeof MapComponent>;
6
- export declare const DeckGL: Story;
7
- export declare const DeckGLPoints: Story;
8
- export declare const Mapbox: Story;