pentatrion-design 0.0.1

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/.storybook/main.ts +33 -0
  2. package/.storybook/manager.ts +8 -0
  3. package/.storybook/preview-head.html +2 -0
  4. package/.storybook/preview.ts +26 -0
  5. package/.storybook/public/bg-map.jpg +0 -0
  6. package/.storybook/public/favicon-32x32.png +0 -0
  7. package/.storybook/public/favicon.svg +28 -0
  8. package/.storybook/public/movies.json +2153 -0
  9. package/.storybook/public/population.json +1178 -0
  10. package/.storybook/public/town-74.geojson +8995 -0
  11. package/.storybook/public/town-74.json +4062 -0
  12. package/.storybook/theme.ts +14 -0
  13. package/Makefile +14 -0
  14. package/README.md +40 -0
  15. package/TODO.md +5 -0
  16. package/dist/index.d.ts +1110 -0
  17. package/dist/index.js +3707 -0
  18. package/dist/redux/index.d.ts +43 -0
  19. package/dist/redux/index.js +583 -0
  20. package/dist/types.d-DlHa_IaW.d.ts +14 -0
  21. package/images/logo-shadow.svg +173 -0
  22. package/images/logo.svg +76 -0
  23. package/package.json +85 -0
  24. package/postcss.config.js +7 -0
  25. package/src/components/autocomplete/Autocomplete.stories.tsx +89 -0
  26. package/src/components/autocomplete/Autocomplete.tsx +316 -0
  27. package/src/components/autocomplete/AutocompleteOption.tsx +35 -0
  28. package/src/components/autocomplete/LazyAutocomplete.tsx +130 -0
  29. package/src/components/autocomplete/SimpleAutocomplete.tsx +74 -0
  30. package/src/components/autocomplete/index.ts +6 -0
  31. package/src/components/autocomplete/useAutocompleteContext.ts +20 -0
  32. package/src/components/autocomplete/util.ts +19 -0
  33. package/src/components/badge/Badge.stories.tsx +72 -0
  34. package/src/components/badge/Badge.tsx +70 -0
  35. package/src/components/button/Button.stories.tsx +189 -0
  36. package/src/components/button/Button.test.tsx +20 -0
  37. package/src/components/button/Button.tsx +200 -0
  38. package/src/components/button/ButtonGroup.stories.tsx +46 -0
  39. package/src/components/button/ButtonGroup.tsx +29 -0
  40. package/src/components/button/index.ts +2 -0
  41. package/src/components/card/Card.stories.tsx +21 -0
  42. package/src/components/card/config.ts +4 -0
  43. package/src/components/card/index.ts +1 -0
  44. package/src/components/code/Code.tsx +15 -0
  45. package/src/components/context-menu/ContextMenu.stories.tsx +22 -0
  46. package/src/components/context-menu/ContextMenu.tsx +175 -0
  47. package/src/components/context-menu/ContextMenuItem.tsx +34 -0
  48. package/src/components/context-menu/index.ts +2 -0
  49. package/src/components/dialog/Dialog.stories.tsx +270 -0
  50. package/src/components/dialog/Dialog.tsx +46 -0
  51. package/src/components/dialog/index.ts +1 -0
  52. package/src/components/dialog/util.ts +29 -0
  53. package/src/components/dropdown-menu/DropdownMenu.stories.tsx +19 -0
  54. package/src/components/dropdown-menu/DropdownMenu.tsx +12 -0
  55. package/src/components/dropdown-menu/DropdownMenuContent.tsx +46 -0
  56. package/src/components/dropdown-menu/DropdownMenuItem.tsx +33 -0
  57. package/src/components/dropdown-menu/DropdownMenuTrigger.tsx +42 -0
  58. package/src/components/dropdown-menu/index.ts +7 -0
  59. package/src/components/dropdown-menu/interface.d.ts +13 -0
  60. package/src/components/dropdown-menu/useDropdownMenu.tsx +115 -0
  61. package/src/components/dropdown-menu/useDropdownMenuContext.ts +16 -0
  62. package/src/components/dropdown-menu-nested/DropdownMenuNested.stories.tsx +33 -0
  63. package/src/components/dropdown-menu-nested/DropdownMenuNested.tsx +19 -0
  64. package/src/components/dropdown-menu-nested/MenuContext.ts +15 -0
  65. package/src/components/dropdown-menu-nested/MenuItem.tsx +43 -0
  66. package/src/components/dropdown-menu-nested/MenuItemWithChildren.tsx +204 -0
  67. package/src/components/dropdown-menu-nested/index.ts +3 -0
  68. package/src/components/flash/Flash.stories.tsx +34 -0
  69. package/src/components/flash/Flash.tsx +24 -0
  70. package/src/components/highlight/Highlight.stories.tsx +128 -0
  71. package/src/components/highlight/Highlight.tsx +29 -0
  72. package/src/components/href/Href.stories.tsx +55 -0
  73. package/src/components/href/Href.tsx +18 -0
  74. package/src/components/input/Checkbox.stories.tsx +52 -0
  75. package/src/components/input/Checkbox.tsx +41 -0
  76. package/src/components/input/Input.stories.tsx +103 -0
  77. package/src/components/input/Input.test.tsx +10 -0
  78. package/src/components/input/Input.tsx +60 -0
  79. package/src/components/input/RadioGroup.stories.tsx +76 -0
  80. package/src/components/input/RadioGroup.tsx +84 -0
  81. package/src/components/input/Toggle.stories.tsx +29 -0
  82. package/src/components/input/Toggle.tsx +35 -0
  83. package/src/components/input/index.ts +4 -0
  84. package/src/components/input-field/InputField.stories.tsx +227 -0
  85. package/src/components/input-field/InputField.tsx +62 -0
  86. package/src/components/loader/Loader.stories.tsx +37 -0
  87. package/src/components/loader/Loader.tsx +54 -0
  88. package/src/components/modal/Components.tsx +58 -0
  89. package/src/components/modal/Modal.stories.tsx +113 -0
  90. package/src/components/modal/Modal.tsx +13 -0
  91. package/src/components/modal/ModalContent.tsx +46 -0
  92. package/src/components/modal/ModalTrigger.tsx +41 -0
  93. package/src/components/modal/index.ts +7 -0
  94. package/src/components/modal/interface.d.ts +10 -0
  95. package/src/components/modal/useModal.ts +48 -0
  96. package/src/components/modal/useModalContext.ts +16 -0
  97. package/src/components/notification/Notification.stories.tsx +51 -0
  98. package/src/components/notification/NotificationsContext.ts +79 -0
  99. package/src/components/notification/NotificationsProvider.tsx +58 -0
  100. package/src/components/notification/index.ts +2 -0
  101. package/src/components/popover/Components.tsx +45 -0
  102. package/src/components/popover/Popover.stories.tsx +46 -0
  103. package/src/components/popover/Popover.test.tsx +21 -0
  104. package/src/components/popover/Popover.tsx +12 -0
  105. package/src/components/popover/PopoverContent.tsx +46 -0
  106. package/src/components/popover/PopoverTrigger.tsx +42 -0
  107. package/src/components/popover/index.ts +7 -0
  108. package/src/components/popover/interface.d.ts +13 -0
  109. package/src/components/popover/usePopover.tsx +80 -0
  110. package/src/components/popover/usePopoverContext.ts +16 -0
  111. package/src/components/portal/Portal.tsx +12 -0
  112. package/src/components/quick-settings/QuickSettings.stories.tsx +182 -0
  113. package/src/components/resize-area/ResizeArea.stories.css +40 -0
  114. package/src/components/resize-area/ResizeArea.stories.tsx +30 -0
  115. package/src/components/resize-area/ResizeArea.tsx +79 -0
  116. package/src/components/scroll/Scroll.stories.tsx +81 -0
  117. package/src/components/scroll/Scroll.tsx +111 -0
  118. package/src/components/select/Select.stories.tsx +248 -0
  119. package/src/components/select/Select.tsx +362 -0
  120. package/src/components/select/SelectOption.tsx +29 -0
  121. package/src/components/select/SelectSelection.tsx +13 -0
  122. package/src/components/select/index.ts +5 -0
  123. package/src/components/select/interface.d.ts +36 -0
  124. package/src/components/select/useSelectContext.ts +19 -0
  125. package/src/components/select/util.ts +12 -0
  126. package/src/components/snack/Snack.stories.tsx +33 -0
  127. package/src/components/snack/Snack.tsx +47 -0
  128. package/src/components/sortable/Sortable.stories.tsx +98 -0
  129. package/src/components/sortable/Sortable.tsx +37 -0
  130. package/src/components/sortable/index.ts +2 -0
  131. package/src/components/sortable/types.d.ts +12 -0
  132. package/src/components/steps/Step.tsx +41 -0
  133. package/src/components/steps/Steps.stories.tsx +141 -0
  134. package/src/components/steps/Steps.tsx +49 -0
  135. package/src/components/steps/index.ts +3 -0
  136. package/src/components/steps/util.ts +3 -0
  137. package/src/components/table/Table.stories.tsx +36 -0
  138. package/src/components/table/Table.tsx +13 -0
  139. package/src/components/table/TableBody.tsx +9 -0
  140. package/src/components/table/TableCell.tsx +16 -0
  141. package/src/components/table/TableFooter.tsx +9 -0
  142. package/src/components/table/TableHeader.tsx +14 -0
  143. package/src/components/table/TableHeaderCell.tsx +14 -0
  144. package/src/components/table/TableRow.tsx +14 -0
  145. package/src/components/table/index.ts +7 -0
  146. package/src/components/tabs/Tabs.stories.tsx +66 -0
  147. package/src/components/tabs/Tabs.tsx +80 -0
  148. package/src/components/tooltip/SimpleTooltip.tsx +17 -0
  149. package/src/components/tooltip/Tooltip.stories.tsx +129 -0
  150. package/src/components/tooltip/Tooltip.test.tsx +18 -0
  151. package/src/components/tooltip/Tooltip.tsx +13 -0
  152. package/src/components/tooltip/TooltipContent.tsx +41 -0
  153. package/src/components/tooltip/TooltipTrigger.tsx +36 -0
  154. package/src/components/tooltip/index.ts +6 -0
  155. package/src/components/tooltip/interface.d.ts +15 -0
  156. package/src/components/tooltip/useTooltip.ts +87 -0
  157. package/src/components/tooltip/useTooltipContext.ts +16 -0
  158. package/src/env.d.ts +27 -0
  159. package/src/hooks/index.ts +13 -0
  160. package/src/hooks/useCombinedRefs.test.tsx +42 -0
  161. package/src/hooks/useCombinedRefs.ts +21 -0
  162. package/src/hooks/useCopyToClipboard.ts +28 -0
  163. package/src/hooks/useDebounce.ts +59 -0
  164. package/src/hooks/useEventCallback.ts +13 -0
  165. package/src/hooks/useEventListener.ts +86 -0
  166. package/src/hooks/useFetch.tsx +21 -0
  167. package/src/hooks/useIsClosing.ts +25 -0
  168. package/src/hooks/useIsMounted.tsx +16 -0
  169. package/src/hooks/useIsomorphicLayoutEffect.ts +4 -0
  170. package/src/hooks/useNotifications.tsx +13 -0
  171. package/src/hooks/useOnClickOutside.ts +35 -0
  172. package/src/hooks/usePrevious.ts +9 -0
  173. package/src/hooks/useRipple.test.tsx +52 -0
  174. package/src/hooks/useRipple.tsx +79 -0
  175. package/src/index.css +14 -0
  176. package/src/index.ts +39 -0
  177. package/src/lib/arrUtil.ts +8 -0
  178. package/src/lib/error.ts +18 -0
  179. package/src/lib/fetch.test.ts +107 -0
  180. package/src/lib/fetch.ts +115 -0
  181. package/src/lib/index.ts +3 -0
  182. package/src/lib/tailwindVariants.ts +35 -0
  183. package/src/redux/index.ts +1 -0
  184. package/src/redux/notification/components/NotificationConsumer.tsx +52 -0
  185. package/src/redux/notification/errorCatcherMiddleware.ts +17 -0
  186. package/src/redux/notification/hooks/useNotification.ts +26 -0
  187. package/src/redux/notification/index.ts +5 -0
  188. package/src/redux/notification/notificationSlice.ts +68 -0
  189. package/src/styles/Animation.stories.tsx +43 -0
  190. package/src/styles/Shadow.stories.tsx +43 -0
  191. package/src/styles/Themes.stories.tsx +31 -0
  192. package/src/styles/Typography.stories.tsx +101 -0
  193. package/src/tailwind/base.css +188 -0
  194. package/src/tailwind/components-input-outline.css +62 -0
  195. package/src/tailwind/components-resize-area.css +112 -0
  196. package/src/tailwind/components-step.css +161 -0
  197. package/src/tailwind/components.css +51 -0
  198. package/src/tailwind/keyframes.ts +69 -0
  199. package/src/tailwind/pentatrionTw.ts +147 -0
  200. package/src/tailwind/utilities-dialog.css +103 -0
  201. package/src/tailwind/utilities.css +3 -0
  202. package/src/types.d.ts +12 -0
  203. package/tailwind.config.js +18 -0
  204. package/tests/README.md +32 -0
  205. package/tests/setup.ts +1 -0
  206. package/tsconfig.json +14 -0
  207. package/tsup.config.ts +23 -0
  208. package/vite.config.ts +24 -0
@@ -0,0 +1,1110 @@
1
+ import { T as ThemeColor, M as Message, a as MessageOptions } from './types.d-DlHa_IaW.js';
2
+ import * as react_jsx_runtime from 'react/jsx-runtime';
3
+ import * as react from 'react';
4
+ import react__default, { ComponentProps, ReactNode, ComponentPropsWithoutRef, ComponentPropsWithRef, ElementType, Ref, ReactElement, HTMLProps, ButtonHTMLAttributes, Dispatch, SetStateAction, MutableRefObject, RefObject, useEffect } from 'react';
5
+ import { Geometry, BBox } from 'geojson';
6
+ import * as _floating_ui_react from '@floating-ui/react';
7
+ import { Placement, useInteractions } from '@floating-ui/react';
8
+ import * as _floating_ui_react_dom from '@floating-ui/react-dom';
9
+ import { ItemInterface, ReactSortableProps } from 'react-sortablejs';
10
+ import * as tailwindcss_types_config from 'tailwindcss/types/config';
11
+
12
+ interface Props$H extends ComponentProps<"table"> {
13
+ children: ReactNode;
14
+ }
15
+ declare function Table$6({ children, ...props }: Props$H): react_jsx_runtime.JSX.Element;
16
+
17
+ interface Props$G {
18
+ children: ReactNode;
19
+ }
20
+ declare function Table$5({ children, ...props }: Props$G): react_jsx_runtime.JSX.Element;
21
+
22
+ interface Props$F extends ComponentProps<"td"> {
23
+ children: ReactNode;
24
+ label?: ReactNode | string;
25
+ }
26
+ declare function Table$4({ children, className, label, ...props }: Props$F): react_jsx_runtime.JSX.Element;
27
+
28
+ interface Props$E extends ComponentProps<"thead"> {
29
+ children: ReactNode;
30
+ }
31
+ declare function Table$3({ children, className, ...props }: Props$E): react_jsx_runtime.JSX.Element;
32
+
33
+ interface Props$D extends ComponentProps<"th"> {
34
+ children: ReactNode;
35
+ }
36
+ declare function Table$2({ children, className, ...props }: Props$D): react_jsx_runtime.JSX.Element;
37
+
38
+ interface Props$C extends ComponentProps<"tr"> {
39
+ children: ReactNode;
40
+ }
41
+ declare function Table$1({ children, className, ...props }: Props$C): react_jsx_runtime.JSX.Element;
42
+
43
+ interface Props$B extends ComponentProps<"tfoot"> {
44
+ children: ReactNode;
45
+ }
46
+ declare function Table({ children, ...props }: Props$B): react_jsx_runtime.JSX.Element;
47
+
48
+ declare const cardConfig: {
49
+ item: string;
50
+ group: string;
51
+ };
52
+
53
+ interface Props$A {
54
+ children: ReactNode;
55
+ className?: string;
56
+ }
57
+ declare function Code({ children, className }: Props$A): react_jsx_runtime.JSX.Element;
58
+
59
+ interface Tab {
60
+ id: string | number;
61
+ title: ReactNode;
62
+ content?: ReactNode;
63
+ }
64
+ interface Props$z {
65
+ tabs?: Tab[];
66
+ value: number | string;
67
+ /**
68
+ * Will make tabs stick to the top of the container when overflowing
69
+ */
70
+ stickyTabs?: boolean;
71
+ /**
72
+ * Tabs will take the maximum width and divide equally
73
+ */
74
+ fullWidth?: boolean;
75
+ onChange: (id: number | string) => void;
76
+ children?: ReactNode;
77
+ className?: string;
78
+ contentClassName?: string;
79
+ listClassName?: string;
80
+ }
81
+ declare function Tabs({ className, listClassName, contentClassName, tabs, value, onChange, fullWidth, stickyTabs, children, }: Props$z): react_jsx_runtime.JSX.Element;
82
+
83
+ interface Props$y {
84
+ color?: ThemeColor;
85
+ children?: ReactNode;
86
+ className?: string;
87
+ }
88
+ declare function Alert({ color, children, className }: Props$y): react_jsx_runtime.JSX.Element;
89
+
90
+ interface Props$x extends ComponentPropsWithoutRef<"div"> {
91
+ horizontal?: boolean;
92
+ }
93
+ declare function Scroll({ horizontal, className, children, ...rest }: Props$x): react_jsx_runtime.JSX.Element;
94
+
95
+ interface Props$w extends ComponentPropsWithoutRef<"svg"> {
96
+ size?: "small" | "medium" | "large";
97
+ color?: ThemeColor;
98
+ }
99
+ declare function Loader({ size, color, className, ...rest }: Props$w): react_jsx_runtime.JSX.Element;
100
+
101
+ interface Props$v {
102
+ children: ReactNode;
103
+ }
104
+ declare const Portal: ({ children }: Props$v) => react.ReactPortal;
105
+
106
+ interface Props$u {
107
+ children: ReactNode;
108
+ className?: string;
109
+ tooltip?: string;
110
+ url?: string;
111
+ color?: ThemeColor;
112
+ onClick?: () => void;
113
+ onRemove?: () => void;
114
+ }
115
+ declare function Badge({ children, className, onRemove, onClick, tooltip, url, color, }: Props$u): react_jsx_runtime.JSX.Element;
116
+
117
+ interface Props$t {
118
+ value: string | undefined;
119
+ indices: readonly [number, number][];
120
+ minLength?: number;
121
+ }
122
+ declare function Hightlight({ value, indices, minLength }: Props$t): string | react_jsx_runtime.JSX.Element | undefined;
123
+
124
+ interface InputProps extends Omit<ComponentPropsWithRef<"input">, "prefix"> {
125
+ variant?: "normal" | "ghost";
126
+ disabled?: boolean;
127
+ prefix?: ReactNode;
128
+ suffix?: ReactNode;
129
+ color?: ThemeColor;
130
+ }
131
+ declare const inputConfig: {
132
+ container: string;
133
+ input: string;
134
+ };
135
+ declare const Input: (props: InputProps & react.RefAttributes<HTMLInputElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
136
+
137
+ type Merge<T, U> = Omit<T, keyof U> & U;
138
+ type PropsWithAs<P, T extends React.ElementType> = P & { as?: T };
139
+ type PolymorphicPropsWithRef<P, T extends React.ElementType> = Merge<
140
+ T extends keyof JSX.IntrinsicElements
141
+ ? React.PropsWithRef<JSX.IntrinsicElements[T]>
142
+ : React.ComponentPropsWithRef<T>,
143
+ PropsWithAs<P, T>
144
+ >;
145
+
146
+ declare global {
147
+ interface GlobalEventHandlersEventMap {
148
+ "maplibre-contextmenu": CustomEvent;
149
+ }
150
+ }
151
+
152
+ declare module "react" {
153
+ interface CSSProperties {
154
+ [key: `--${string}`]: string | number;
155
+ }
156
+
157
+ // eslint-disable-next-line @typescript-eslint/ban-types
158
+ function forwardRef<T, P = {}>(
159
+ render: (props: P, ref: React.Ref<T>) => React.ReactElement | null,
160
+ ): (props: P & React.RefAttributes<T>) => React.ReactElement | null;
161
+ }
162
+
163
+ interface InputFieldOwnProps {
164
+ label?: ReactNode;
165
+ hint?: ReactNode;
166
+ help?: ReactNode;
167
+ error?: ReactNode | boolean;
168
+ warning?: ReactNode | boolean;
169
+ }
170
+ declare const defaultElement: (props: InputProps & react.RefAttributes<HTMLInputElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
171
+ type Props$s<E extends ElementType> = PolymorphicPropsWithRef<InputFieldOwnProps, E>;
172
+ declare const InputField: <E extends ElementType = typeof defaultElement>(props: Props$s<E>) => ReactNode;
173
+
174
+ interface Props$r {
175
+ name: string;
176
+ position: "top" | "bottom" | "left" | "right";
177
+ initialValue?: number;
178
+ }
179
+ declare function ResizeArea({ name, position, initialValue }: Props$r): react_jsx_runtime.JSX.Element;
180
+
181
+ type SnackProps = Partial<Message> & {
182
+ onRemove?: () => void;
183
+ };
184
+ declare function Snack({ expiration, content, color, withLoader, canClose, onRemove, }: SnackProps): react_jsx_runtime.JSX.Element;
185
+
186
+ interface Props$q extends ComponentPropsWithRef<"a"> {
187
+ children: ReactNode;
188
+ ghost?: boolean;
189
+ }
190
+ declare const Href: (props: Props$q & react.RefAttributes<HTMLAnchorElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
191
+
192
+ type OptionLike = Option | GeoOption;
193
+
194
+ type Option = {
195
+ type?: "Option";
196
+ value: string;
197
+ label: string;
198
+ sourceId?: string | number;
199
+ };
200
+
201
+ type NoDataOption = {
202
+ id: string;
203
+ type: "nodata";
204
+ };
205
+
206
+ /** For compatibility with OptionLike. get original types from pentatrion-geo */
207
+ type GeoOption<G extends Geometry | null = Geometry, T extends string = string> = {
208
+ id: string;
209
+ type: "Feature";
210
+ properties: FeatureProperties<T>;
211
+ geometry: G;
212
+ bbox?: BBox | undefined;
213
+ };
214
+
215
+ type FeatureProperties<T extends string = string> = {
216
+ id: string;
217
+
218
+ /** computed name + short context for input string */
219
+ label: string;
220
+ name: string;
221
+ context: string | null;
222
+ score: number;
223
+ type: T;
224
+ originalProperties?: any;
225
+ };
226
+
227
+ type Props$p<O extends Option> = O;
228
+ declare function SelectOption<O extends Option>({ label }: Props$p<O>): react_jsx_runtime.JSX.Element;
229
+
230
+ type SelectSelectionProps<O extends Option> = O & {
231
+ multiple?: boolean;
232
+ };
233
+ declare function SelectSelection<O extends Option>({ label, multiple, }: SelectSelectionProps<O>): react_jsx_runtime.JSX.Element;
234
+
235
+ type SelectValue = number | string | null;
236
+ type ChangeEventLike = {
237
+ target: {
238
+ value: SelectValue;
239
+ };
240
+ };
241
+ type Props$o<O extends Option = Option> = {
242
+ disabled?: boolean;
243
+ variant?: "normal" | "ghost";
244
+ showArrow?: boolean;
245
+ selectionClassName?: string;
246
+ width?: number | string;
247
+ floatingMinWidth?: number;
248
+ placement?: Placement;
249
+ options: O[];
250
+ placeholder?: string;
251
+ getSearchableValue?: (matchReg: RegExp, option: O) => string;
252
+ searchable?: boolean;
253
+ required?: boolean;
254
+ selectOptionComponent?: (props: O) => ReactNode;
255
+ selectSelectionComponent?: (props: SelectSelectionProps<O>) => ReactNode;
256
+ value?: SelectValue;
257
+ onChange?: ((e: ChangeEventLike) => void) | null;
258
+ zIndex?: number;
259
+ };
260
+ declare const Select: <O extends Option>(p: Props$o<O> & {
261
+ ref?: Ref<HTMLDivElement>;
262
+ }) => ReactElement;
263
+
264
+ interface SelectContext {
265
+ activeIndex: number | null;
266
+ selectedIndex: number | null;
267
+ getItemProps: ReturnType<typeof useInteractions>["getItemProps"];
268
+ handleSelect: (index: number | null) => void;
269
+ }
270
+ declare const SelectContext: react.Context<SelectContext | null>;
271
+ declare function useSelect(): SelectContext;
272
+
273
+ type AutocompleteOptionProps<O extends OptionLike> = O;
274
+ declare function AutocompleteOption<O extends OptionLike>(props: AutocompleteOptionProps<O>): react_jsx_runtime.JSX.Element;
275
+ declare const _default$2: react.MemoExoticComponent<typeof AutocompleteOption>;
276
+
277
+ interface AutocompleteProps<O extends OptionLike = Option> {
278
+ className?: string;
279
+ icon?: boolean | ReactNode;
280
+ color?: ThemeColor;
281
+ /**
282
+ * render suffix only if selection
283
+ * ex: add contextuel buttons associated to selection
284
+ */
285
+ selectionSuffix?: ReactNode;
286
+ /**
287
+ * render suffix only if selection and searchValue is empty
288
+ */
289
+ noSearchSuffix?: ReactNode;
290
+ placement?: Placement;
291
+ placeholder?: string;
292
+ /**
293
+ * search string used as value for <input>
294
+ */
295
+ searchValue: string;
296
+ /**
297
+ * change handler when typing in the input
298
+ * or when clicking on an option (the label value is passed)
299
+ */
300
+ onChangeSearchValue: (value: string, selectionLabel: boolean) => void;
301
+ selection?: O | null;
302
+ /**
303
+ * select handler for a selection from the autocomplete's dropdown
304
+ * the option object is passed when clicking on an option
305
+ * null value is passed when typing a new character in the input search.
306
+ */
307
+ onChangeSelection: (option: O | null) => void;
308
+ options: O[];
309
+ autocompleteOptionComponent?: (props: AutocompleteOptionProps<O>) => ReactNode;
310
+ loading?: boolean;
311
+ clearSearchButton?: boolean;
312
+ selectOnFocus?: boolean;
313
+ }
314
+ declare const _default$1: <O extends OptionLike = Option>(props: AutocompleteProps<O> & react.RefAttributes<HTMLInputElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
315
+
316
+ interface Props$n<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "options" | "selection"> {
317
+ }
318
+ declare function SimpleAutocomplete<O extends OptionLike = Option>({ options, selection, onChangeSelection, ...rest }: Props$n<O>): react_jsx_runtime.JSX.Element;
319
+
320
+ interface Props$m<O extends OptionLike = Option> extends Pick<AutocompleteProps<O>, "className" | "icon" | "color" | "selectionSuffix" | "noSearchSuffix" | "placement" | "placeholder" | "selection" | "onChangeSelection" | "autocompleteOptionComponent" | "loading" | "clearSearchButton"> {
321
+ onChangeSearchValueCallback: (searchValue: string) => Promise<O[]>;
322
+ debounce?: number;
323
+ }
324
+ declare function LazyAutocomplete<O extends OptionLike = Option>({ onChangeSearchValueCallback, debounce, selection, onChangeSelection, ...rest }: Props$m<O>): react_jsx_runtime.JSX.Element;
325
+
326
+ interface AutocompleteContext {
327
+ activeIndex: number | null;
328
+ selection: OptionLike | null;
329
+ getItemProps: ReturnType<typeof useInteractions>["getItemProps"];
330
+ handleSelect: (index: number | null) => void;
331
+ }
332
+ declare const AutocompleteContext: react.Context<AutocompleteContext | null>;
333
+ declare function useAutocomplete(): AutocompleteContext;
334
+
335
+ declare function getOptionLabel(option: OptionLike): string;
336
+ declare function getOptionValue(option: OptionLike): string;
337
+
338
+ interface ButtonProps extends ComponentPropsWithRef<"button"> {
339
+ withRipple?: boolean;
340
+ variant?: "contained" | "light" | "outlined" | "text" | "ghost";
341
+ size?: "small" | "medium" | "large" | "custom";
342
+ color?: ThemeColor;
343
+ children?: React.ReactNode;
344
+ /**
345
+ * undefined: hidden
346
+ * false: invisible
347
+ * true: visible
348
+ */
349
+ loading?: boolean;
350
+ disabled?: boolean;
351
+ fullWidth?: boolean;
352
+ focusable?: boolean;
353
+ /**
354
+ * For a selected item inside a group.
355
+ */
356
+ selected?: boolean;
357
+ icon?: boolean;
358
+ }
359
+ declare const buttonVariants: {
360
+ size(icon: boolean, size: "small" | "medium" | "large" | "custom"): string | false;
361
+ variant: {
362
+ contained(color: ThemeColor): string;
363
+ light(color: ThemeColor): string;
364
+ outlined(color: ThemeColor): string;
365
+ text(color: ThemeColor): string;
366
+ ghost(color: ThemeColor): string;
367
+ };
368
+ };
369
+ declare const Button: (props: ButtonProps & react.RefAttributes<HTMLButtonElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
370
+
371
+ interface Props$l extends ComponentProps<"div"> {
372
+ children: ReactNode;
373
+ direction?: "horizontal" | "vertical";
374
+ }
375
+ declare function ButtonGroup({ children, className, direction }: Props$l): react_jsx_runtime.JSX.Element;
376
+
377
+ interface Props$k extends ComponentPropsWithRef<"div"> {
378
+ children: ReactElement[] | ReactElement;
379
+ eventName?: "contextmenu" | "maplibre-contextmenu";
380
+ }
381
+ declare function ContextMenu({ children, style, eventName }: Props$k): react_jsx_runtime.JSX.Element;
382
+
383
+ type ContextMenuItemMouseEvent = react__default.MouseEvent<HTMLButtonElement> | MouseEvent | CustomEvent | null;
384
+ interface ContextMenuItemProps extends Omit<ComponentPropsWithRef<"button">, "onClick"> {
385
+ label: string;
386
+ disabled?: boolean;
387
+ icon?: ReactNode;
388
+ onClick?: (e: ContextMenuItemMouseEvent) => void;
389
+ }
390
+ declare const ContextMenuItem: (props: ContextMenuItemProps & react__default.RefAttributes<HTMLButtonElement>) => react__default.ReactElement<any, string | react__default.JSXElementConstructor<any>> | null;
391
+
392
+ interface Props$j extends ComponentProps<"div"> {
393
+ color?: ThemeColor;
394
+ placement?: Placement;
395
+ children: ReactNode;
396
+ }
397
+ declare const dialogVariants: {
398
+ color(color?: ThemeColor): string;
399
+ };
400
+ declare function Dialog({ placement, color, children, className, ...rest }: Props$j): react_jsx_runtime.JSX.Element;
401
+
402
+ interface DropdownMenuOptions {
403
+ initialOpen?: boolean;
404
+ placement?: Placement;
405
+ open?: boolean;
406
+ onOpen?: (open: boolean) => void;
407
+ color?: ThemeColor | "default";
408
+ modal?: boolean;
409
+ }
410
+
411
+ interface Props$i extends DropdownMenuOptions {
412
+ children: ReactNode;
413
+ }
414
+ declare function DropdownMenu({ children, ...options }: Props$i): react_jsx_runtime.JSX.Element;
415
+
416
+ declare const DropdownMenuContent: (props: react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
417
+
418
+ interface Props$h extends HTMLProps<HTMLElement> {
419
+ asChild?: boolean;
420
+ }
421
+ declare const DropdownMenuTrigger: (props: Props$h & react.RefAttributes<HTMLElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
422
+
423
+ declare function useDropdownMenu({ initialOpen, placement, open: controlledOpen, onOpen: setControlledOpen, color, modal, }: DropdownMenuOptions): {
424
+ elementsRef: react.MutableRefObject<(HTMLElement | null)[]>;
425
+ labelsRef: react.MutableRefObject<(string | null)[]>;
426
+ color: ThemeColor | "default";
427
+ modal: boolean;
428
+ activeIndex: number | null;
429
+ handleSelect: () => void;
430
+ placement: _floating_ui_react.Placement;
431
+ strategy: _floating_ui_react.Strategy;
432
+ middlewareData: _floating_ui_react.MiddlewareData;
433
+ x: number;
434
+ y: number;
435
+ isPositioned: boolean;
436
+ update: () => void;
437
+ floatingStyles: react.CSSProperties;
438
+ refs: {
439
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
440
+ floating: react.MutableRefObject<HTMLElement | null>;
441
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
442
+ setFloating: (node: HTMLElement | null) => void;
443
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
444
+ elements: {
445
+ reference: _floating_ui_react_dom.ReferenceType | null;
446
+ floating: HTMLElement | null;
447
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
448
+ context: {
449
+ x: number;
450
+ y: number;
451
+ placement: _floating_ui_react.Placement;
452
+ strategy: _floating_ui_react.Strategy;
453
+ middlewareData: _floating_ui_react.MiddlewareData;
454
+ isPositioned: boolean;
455
+ update: () => void;
456
+ floatingStyles: react.CSSProperties;
457
+ open: boolean;
458
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
459
+ events: _floating_ui_react.FloatingEvents;
460
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
461
+ nodeId: string | undefined;
462
+ floatingId: string;
463
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
464
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
465
+ };
466
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
467
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
468
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
469
+ active?: boolean | undefined;
470
+ selected?: boolean | undefined;
471
+ }) | undefined) => Record<string, unknown>;
472
+ open: boolean;
473
+ setOpen: (open: boolean) => void;
474
+ };
475
+
476
+ type ContextType$3 = ReturnType<typeof useDropdownMenu> | null;
477
+ declare const DropdownMenuContext: react.Context<ContextType$3>;
478
+ declare function useDropdownMenuContext(): {
479
+ elementsRef: react.MutableRefObject<(HTMLElement | null)[]>;
480
+ labelsRef: react.MutableRefObject<(string | null)[]>;
481
+ color: ThemeColor | "default";
482
+ modal: boolean;
483
+ activeIndex: number | null;
484
+ handleSelect: () => void;
485
+ placement: _floating_ui_react_dom.Placement;
486
+ strategy: _floating_ui_react_dom.Strategy;
487
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
488
+ x: number;
489
+ y: number;
490
+ isPositioned: boolean;
491
+ update: () => void;
492
+ floatingStyles: react.CSSProperties;
493
+ refs: {
494
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
495
+ floating: react.MutableRefObject<HTMLElement | null>;
496
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
497
+ setFloating: (node: HTMLElement | null) => void;
498
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
499
+ elements: {
500
+ reference: _floating_ui_react_dom.ReferenceType | null;
501
+ floating: HTMLElement | null;
502
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
503
+ context: {
504
+ x: number;
505
+ y: number;
506
+ placement: _floating_ui_react_dom.Placement;
507
+ strategy: _floating_ui_react_dom.Strategy;
508
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
509
+ isPositioned: boolean;
510
+ update: () => void;
511
+ floatingStyles: react.CSSProperties;
512
+ open: boolean;
513
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
514
+ events: _floating_ui_react.FloatingEvents;
515
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
516
+ nodeId: string | undefined;
517
+ floatingId: string;
518
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
519
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
520
+ };
521
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
522
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
523
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
524
+ active?: boolean | undefined;
525
+ selected?: boolean | undefined;
526
+ }) | undefined) => Record<string, unknown>;
527
+ open: boolean;
528
+ setOpen: (open: boolean) => void;
529
+ };
530
+
531
+ interface Props$g extends ComponentProps<"button"> {
532
+ children: ReactNode;
533
+ }
534
+ declare function DropdownMenuItem({ children, onClick, ...rest }: Props$g): react_jsx_runtime.JSX.Element;
535
+
536
+ interface Props$f extends ButtonProps {
537
+ label: string;
538
+ triggerComponent: typeof Button;
539
+ }
540
+ declare const DropdownMenuNested: (props: Props$f & react.RefAttributes<HTMLButtonElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
541
+
542
+ interface Props$e {
543
+ label: string;
544
+ disabled?: boolean;
545
+ }
546
+ declare const MenuItem: (props: Props$e & ButtonHTMLAttributes<HTMLButtonElement> & react.RefAttributes<HTMLButtonElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
547
+
548
+ interface Props$d extends ButtonProps {
549
+ label?: string;
550
+ triggerComponent?: typeof Button;
551
+ }
552
+ declare const MenuItemWithChildren: (props: Props$d & react.RefAttributes<HTMLButtonElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
553
+
554
+ interface Props$c extends ComponentPropsWithRef<"input"> {
555
+ indeterminate?: boolean;
556
+ disabled?: boolean;
557
+ color?: ThemeColor;
558
+ }
559
+ declare const Checkbox: (props: Props$c & react.RefAttributes<HTMLInputElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
560
+
561
+ interface Props$b {
562
+ value: string | null;
563
+ options: {
564
+ label: string;
565
+ value: string;
566
+ }[];
567
+ onChange?: (newValue: string | null) => void;
568
+ disabled?: boolean;
569
+ placement?: "inline" | "inline-grid" | "block";
570
+ className?: string;
571
+ color?: ThemeColor;
572
+ }
573
+ declare function RadioGroup({ value, options, onChange, placement, disabled, className, color, }: Props$b): react_jsx_runtime.JSX.Element;
574
+
575
+ interface Props$a extends ComponentPropsWithRef<"input"> {
576
+ disabled?: boolean;
577
+ color?: ThemeColor;
578
+ }
579
+ declare const Toggle: (props: Props$a & react.RefAttributes<HTMLInputElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
580
+
581
+ interface ModalOptions {
582
+ initialOpen?: boolean;
583
+ open?: boolean;
584
+ onOpen?: (open: boolean) => void;
585
+ color?: ThemeColor | "default";
586
+ }
587
+
588
+ interface Props$9 extends ModalOptions {
589
+ children?: ReactNode;
590
+ }
591
+ declare function Modal({ children, ...options }: Props$9): react_jsx_runtime.JSX.Element;
592
+
593
+ declare const ModalContent: (props: react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
594
+
595
+ interface Props$8 extends HTMLProps<HTMLElement> {
596
+ asChild?: boolean;
597
+ }
598
+ declare const ModalTrigger: (props: Props$8 & react.RefAttributes<HTMLElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
599
+
600
+ declare function useModal({ initialOpen, open: controlledOpen, onOpen: setControlledOpen, color, }?: ModalOptions): {
601
+ color: ThemeColor | "default";
602
+ labelId: string | undefined;
603
+ descriptionId: string | undefined;
604
+ setLabelId: Dispatch<SetStateAction<string | undefined>>;
605
+ setDescriptionId: Dispatch<SetStateAction<string | undefined>>;
606
+ placement: _floating_ui_react.Placement;
607
+ strategy: _floating_ui_react.Strategy;
608
+ middlewareData: _floating_ui_react.MiddlewareData;
609
+ x: number;
610
+ y: number;
611
+ isPositioned: boolean;
612
+ update: () => void;
613
+ floatingStyles: react.CSSProperties;
614
+ refs: {
615
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
616
+ floating: react.MutableRefObject<HTMLElement | null>;
617
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
618
+ setFloating: (node: HTMLElement | null) => void;
619
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
620
+ elements: {
621
+ reference: _floating_ui_react_dom.ReferenceType | null;
622
+ floating: HTMLElement | null;
623
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
624
+ context: {
625
+ x: number;
626
+ y: number;
627
+ placement: _floating_ui_react.Placement;
628
+ strategy: _floating_ui_react.Strategy;
629
+ middlewareData: _floating_ui_react.MiddlewareData;
630
+ isPositioned: boolean;
631
+ update: () => void;
632
+ floatingStyles: react.CSSProperties;
633
+ open: boolean;
634
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
635
+ events: _floating_ui_react.FloatingEvents;
636
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
637
+ nodeId: string | undefined;
638
+ floatingId: string;
639
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
640
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
641
+ };
642
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
643
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
644
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
645
+ active?: boolean | undefined;
646
+ selected?: boolean | undefined;
647
+ }) | undefined) => Record<string, unknown>;
648
+ open: boolean;
649
+ setOpen: Dispatch<SetStateAction<boolean>>;
650
+ };
651
+
652
+ type ContextType$2 = ReturnType<typeof useModal> | null;
653
+ declare const ModalContext: react.Context<ContextType$2>;
654
+ declare function useModalContext(): {
655
+ color: ThemeColor | "default";
656
+ labelId: string | undefined;
657
+ descriptionId: string | undefined;
658
+ setLabelId: react.Dispatch<react.SetStateAction<string | undefined>>;
659
+ setDescriptionId: react.Dispatch<react.SetStateAction<string | undefined>>;
660
+ placement: _floating_ui_react_dom.Placement;
661
+ strategy: _floating_ui_react_dom.Strategy;
662
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
663
+ x: number;
664
+ y: number;
665
+ isPositioned: boolean;
666
+ update: () => void;
667
+ floatingStyles: react.CSSProperties;
668
+ refs: {
669
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
670
+ floating: react.MutableRefObject<HTMLElement | null>;
671
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
672
+ setFloating: (node: HTMLElement | null) => void;
673
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
674
+ elements: {
675
+ reference: _floating_ui_react_dom.ReferenceType | null;
676
+ floating: HTMLElement | null;
677
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
678
+ context: {
679
+ x: number;
680
+ y: number;
681
+ placement: _floating_ui_react_dom.Placement;
682
+ strategy: _floating_ui_react_dom.Strategy;
683
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
684
+ isPositioned: boolean;
685
+ update: () => void;
686
+ floatingStyles: react.CSSProperties;
687
+ open: boolean;
688
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
689
+ events: _floating_ui_react.FloatingEvents;
690
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
691
+ nodeId: string | undefined;
692
+ floatingId: string;
693
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
694
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
695
+ };
696
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
697
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
698
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
699
+ active?: boolean | undefined;
700
+ selected?: boolean | undefined;
701
+ }) | undefined) => Record<string, unknown>;
702
+ open: boolean;
703
+ setOpen: react.Dispatch<react.SetStateAction<boolean>>;
704
+ };
705
+
706
+ interface ModalHeaderProps extends ComponentProps<"h2"> {
707
+ closeButton?: boolean;
708
+ }
709
+ declare function ModalHeader({ children, className, closeButton, ...props }: ModalHeaderProps): react_jsx_runtime.JSX.Element;
710
+ interface ModalDescriptionProps extends ComponentProps<"div"> {
711
+ height?: number;
712
+ }
713
+ declare function ModalDescription({ children, className, height, ...props }: ModalDescriptionProps): react_jsx_runtime.JSX.Element;
714
+ declare function ModalFooter({ children, className, ...props }: ComponentProps<"footer">): react_jsx_runtime.JSX.Element;
715
+
716
+ interface Props$7 {
717
+ children: ReactNode;
718
+ }
719
+ declare function NotificationsProvider({ children }: Props$7): react_jsx_runtime.JSX.Element;
720
+
721
+ declare const NotificationsContext: react.Context<{
722
+ addNotification: (content?: string, { expiration, color, canClose, withLoader, }?: MessageOptions) => string;
723
+ removeNotification: (id: string) => void;
724
+ notifyError: (err: unknown) => void;
725
+ }>;
726
+
727
+ interface PopoverOptions {
728
+ initialOpen?: boolean;
729
+ placement?: Placement;
730
+ open?: boolean;
731
+ onOpen?: (open: boolean) => void;
732
+ color?: ThemeColor;
733
+ modal?: boolean;
734
+ }
735
+
736
+ interface Props$6 extends PopoverOptions {
737
+ children: ReactNode;
738
+ }
739
+ declare function Popover({ children, ...options }: Props$6): react_jsx_runtime.JSX.Element;
740
+
741
+ declare const PopoverContent: (props: react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
742
+
743
+ interface Props$5 extends HTMLProps<HTMLElement> {
744
+ asChild?: boolean;
745
+ }
746
+ declare const PopoverTrigger: (props: Props$5 & react.RefAttributes<HTMLElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
747
+
748
+ declare function usePopover({ initialOpen, placement, open: controlledOpen, onOpen: setControlledOpen, color, modal, }: PopoverOptions): {
749
+ arrowRef: react.RefObject<HTMLDivElement>;
750
+ color: ThemeColor | undefined;
751
+ modal: boolean;
752
+ labelId: string | undefined;
753
+ descriptionId: string | undefined;
754
+ setLabelId: react.Dispatch<react.SetStateAction<string | undefined>>;
755
+ setDescriptionId: react.Dispatch<react.SetStateAction<string | undefined>>;
756
+ placement: _floating_ui_react.Placement;
757
+ strategy: _floating_ui_react.Strategy;
758
+ middlewareData: _floating_ui_react.MiddlewareData;
759
+ x: number;
760
+ y: number;
761
+ isPositioned: boolean;
762
+ update: () => void;
763
+ floatingStyles: react.CSSProperties;
764
+ refs: {
765
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
766
+ floating: react.MutableRefObject<HTMLElement | null>;
767
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
768
+ setFloating: (node: HTMLElement | null) => void;
769
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
770
+ elements: {
771
+ reference: _floating_ui_react_dom.ReferenceType | null;
772
+ floating: HTMLElement | null;
773
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
774
+ context: {
775
+ x: number;
776
+ y: number;
777
+ placement: _floating_ui_react.Placement;
778
+ strategy: _floating_ui_react.Strategy;
779
+ middlewareData: _floating_ui_react.MiddlewareData;
780
+ isPositioned: boolean;
781
+ update: () => void;
782
+ floatingStyles: react.CSSProperties;
783
+ open: boolean;
784
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
785
+ events: _floating_ui_react.FloatingEvents;
786
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
787
+ nodeId: string | undefined;
788
+ floatingId: string;
789
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
790
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
791
+ };
792
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
793
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
794
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
795
+ active?: boolean | undefined;
796
+ selected?: boolean | undefined;
797
+ }) | undefined) => Record<string, unknown>;
798
+ open: boolean;
799
+ setOpen: (open: boolean) => void;
800
+ };
801
+
802
+ type ContextType$1 = ReturnType<typeof usePopover> | null;
803
+ declare const PopoverContext: react.Context<ContextType$1>;
804
+ declare function usePopoverContext(): {
805
+ arrowRef: react.RefObject<HTMLDivElement>;
806
+ color: ThemeColor | undefined;
807
+ modal: boolean;
808
+ labelId: string | undefined;
809
+ descriptionId: string | undefined;
810
+ setLabelId: react.Dispatch<react.SetStateAction<string | undefined>>;
811
+ setDescriptionId: react.Dispatch<react.SetStateAction<string | undefined>>;
812
+ placement: _floating_ui_react_dom.Placement;
813
+ strategy: _floating_ui_react_dom.Strategy;
814
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
815
+ x: number;
816
+ y: number;
817
+ isPositioned: boolean;
818
+ update: () => void;
819
+ floatingStyles: react.CSSProperties;
820
+ refs: {
821
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
822
+ floating: react.MutableRefObject<HTMLElement | null>;
823
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
824
+ setFloating: (node: HTMLElement | null) => void;
825
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
826
+ elements: {
827
+ reference: _floating_ui_react_dom.ReferenceType | null;
828
+ floating: HTMLElement | null;
829
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
830
+ context: {
831
+ x: number;
832
+ y: number;
833
+ placement: _floating_ui_react_dom.Placement;
834
+ strategy: _floating_ui_react_dom.Strategy;
835
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
836
+ isPositioned: boolean;
837
+ update: () => void;
838
+ floatingStyles: react.CSSProperties;
839
+ open: boolean;
840
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
841
+ events: _floating_ui_react.FloatingEvents;
842
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
843
+ nodeId: string | undefined;
844
+ floatingId: string;
845
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
846
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
847
+ };
848
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
849
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
850
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
851
+ active?: boolean | undefined;
852
+ selected?: boolean | undefined;
853
+ }) | undefined) => Record<string, unknown>;
854
+ open: boolean;
855
+ setOpen: (open: boolean) => void;
856
+ };
857
+
858
+ interface PopoverHeaderProps extends ComponentProps<"h2"> {
859
+ closeButton?: boolean;
860
+ }
861
+ declare function PopoverHeader({ children, closeButton, className, ...props }: PopoverHeaderProps): react_jsx_runtime.JSX.Element;
862
+ declare function PopoverDescription({ children, className, ...props }: ComponentProps<"div">): react_jsx_runtime.JSX.Element;
863
+ declare function PopoverFooter({ children, className, ...props }: ComponentProps<"footer">): react_jsx_runtime.JSX.Element;
864
+
865
+ interface Props$4 extends ComponentPropsWithoutRef<"li"> {
866
+ icon?: ReactNode;
867
+ status?: "done" | "current" | "todo";
868
+ /** choose center if content height is less than ll-circle height */
869
+ align?: "start" | "center";
870
+ markerClassName?: string;
871
+ contentClassName?: string;
872
+ }
873
+ declare function Step({ status, className, children, markerClassName, contentClassName, align, icon, ...rest }: Props$4): react_jsx_runtime.JSX.Element;
874
+
875
+ interface Props$3 extends ComponentPropsWithoutRef<"ul"> {
876
+ direction?: "horizontal" | "vertical";
877
+ lineStyle?: "solid" | "dashed" | "dotted";
878
+ markerType?: "circle" | "bullet";
879
+ /**
880
+ * if your Step is multiline keep it false
881
+ * better render and add line-space
882
+ *
883
+ * if your Steps are Sortable and eash Step si only one line
884
+ * and steps are vertical
885
+ * set it to true, line will not be animated when sorting
886
+ */
887
+ associateLineWithStep?: boolean;
888
+ }
889
+ declare function Steps({ direction, lineStyle, markerType, associateLineWithStep, className, ...rest }: Props$3): react_jsx_runtime.JSX.Element;
890
+
891
+ declare function getIndexLetter(index: number): string;
892
+
893
+ interface TooltipOptions {
894
+ initialOpen?: boolean;
895
+ placement?: Placement;
896
+ open?: boolean;
897
+ onOpen?: (open: boolean) => void;
898
+ openDelay?: number;
899
+ closeDelay?: number;
900
+ color?: ThemeColor;
901
+ contentClassName?: string;
902
+ }
903
+
904
+ interface Props$2 extends TooltipOptions {
905
+ children: ReactNode;
906
+ }
907
+ declare function Tooltip({ children, ...options }: Props$2): react_jsx_runtime.JSX.Element;
908
+
909
+ declare const TooltipContent: (props: react.ClassAttributes<HTMLDivElement> & react.HTMLAttributes<HTMLDivElement> & react.RefAttributes<HTMLDivElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
910
+
911
+ interface Props$1 extends HTMLProps<HTMLElement> {
912
+ asChild?: boolean;
913
+ }
914
+ declare const TooltipTrigger: (props: Props$1 & react.RefAttributes<HTMLElement>) => react.ReactElement<any, string | react.JSXElementConstructor<any>> | null;
915
+
916
+ declare function useTooltip({ initialOpen, placement, open: controlledOpen, onOpen: setControlledOpen, openDelay, closeDelay, color, }?: TooltipOptions): {
917
+ arrowRef: react.RefObject<HTMLDivElement>;
918
+ color: ThemeColor;
919
+ placement: _floating_ui_react.Placement;
920
+ strategy: _floating_ui_react.Strategy;
921
+ middlewareData: _floating_ui_react.MiddlewareData;
922
+ x: number;
923
+ y: number;
924
+ isPositioned: boolean;
925
+ update: () => void;
926
+ floatingStyles: react.CSSProperties;
927
+ refs: {
928
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
929
+ floating: react.MutableRefObject<HTMLElement | null>;
930
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
931
+ setFloating: (node: HTMLElement | null) => void;
932
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
933
+ elements: {
934
+ reference: _floating_ui_react_dom.ReferenceType | null;
935
+ floating: HTMLElement | null;
936
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
937
+ context: {
938
+ x: number;
939
+ y: number;
940
+ placement: _floating_ui_react.Placement;
941
+ strategy: _floating_ui_react.Strategy;
942
+ middlewareData: _floating_ui_react.MiddlewareData;
943
+ isPositioned: boolean;
944
+ update: () => void;
945
+ floatingStyles: react.CSSProperties;
946
+ open: boolean;
947
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
948
+ events: _floating_ui_react.FloatingEvents;
949
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
950
+ nodeId: string | undefined;
951
+ floatingId: string;
952
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
953
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
954
+ };
955
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
956
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
957
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
958
+ active?: boolean | undefined;
959
+ selected?: boolean | undefined;
960
+ }) | undefined) => Record<string, unknown>;
961
+ open: boolean;
962
+ setOpen: ((open: boolean) => void) | undefined;
963
+ };
964
+
965
+ type ContextType = ReturnType<typeof useTooltip> | null;
966
+ declare const TooltipContext: react.Context<ContextType>;
967
+ declare function useTooltipContext(): {
968
+ arrowRef: react.RefObject<HTMLDivElement>;
969
+ color: ThemeColor;
970
+ placement: _floating_ui_react_dom.Placement;
971
+ strategy: _floating_ui_react_dom.Strategy;
972
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
973
+ x: number;
974
+ y: number;
975
+ isPositioned: boolean;
976
+ update: () => void;
977
+ floatingStyles: react.CSSProperties;
978
+ refs: {
979
+ reference: react.MutableRefObject<_floating_ui_react_dom.ReferenceType | null>;
980
+ floating: react.MutableRefObject<HTMLElement | null>;
981
+ setReference: (node: _floating_ui_react_dom.ReferenceType | null) => void;
982
+ setFloating: (node: HTMLElement | null) => void;
983
+ } & _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
984
+ elements: {
985
+ reference: _floating_ui_react_dom.ReferenceType | null;
986
+ floating: HTMLElement | null;
987
+ } & _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
988
+ context: {
989
+ x: number;
990
+ y: number;
991
+ placement: _floating_ui_react_dom.Placement;
992
+ strategy: _floating_ui_react_dom.Strategy;
993
+ middlewareData: _floating_ui_react_dom.MiddlewareData;
994
+ isPositioned: boolean;
995
+ update: () => void;
996
+ floatingStyles: react.CSSProperties;
997
+ open: boolean;
998
+ onOpenChange: (open: boolean, event?: Event | undefined, reason?: _floating_ui_react.OpenChangeReason | undefined) => void;
999
+ events: _floating_ui_react.FloatingEvents;
1000
+ dataRef: react.MutableRefObject<_floating_ui_react.ContextData>;
1001
+ nodeId: string | undefined;
1002
+ floatingId: string;
1003
+ refs: _floating_ui_react.ExtendedRefs<_floating_ui_react.ReferenceType>;
1004
+ elements: _floating_ui_react.ExtendedElements<_floating_ui_react.ReferenceType>;
1005
+ };
1006
+ getReferenceProps: (userProps?: react.HTMLProps<Element> | undefined) => Record<string, unknown>;
1007
+ getFloatingProps: (userProps?: react.HTMLProps<HTMLElement> | undefined) => Record<string, unknown>;
1008
+ getItemProps: (userProps?: (Omit<react.HTMLProps<HTMLElement>, "active" | "selected"> & {
1009
+ active?: boolean | undefined;
1010
+ selected?: boolean | undefined;
1011
+ }) | undefined) => Record<string, unknown>;
1012
+ open: boolean;
1013
+ setOpen: ((open: boolean) => void) | undefined;
1014
+ };
1015
+
1016
+ interface Props extends TooltipOptions {
1017
+ children: ReactNode;
1018
+ content: ReactNode;
1019
+ }
1020
+ declare function SimpleTooltip({ content, children, contentClassName, ...options }: Props): react_jsx_runtime.JSX.Element;
1021
+
1022
+ interface SortableItem<I> {
1023
+ /** The unique id associated with your item. It's recommended this is the same as the key prop for your list item. */
1024
+ id: string | number;
1025
+ /** When true, the item is selected using MultiDrag */
1026
+ selected?: boolean;
1027
+ /** When true, the item is deemed "chosen", which basically just a mousedown event. */
1028
+ chosen?: boolean;
1029
+ /** When true, it will not be possible to pick this item up in the list. */
1030
+ filtered?: boolean;
1031
+
1032
+ data: I;
1033
+ }
1034
+
1035
+ declare function Sortable<T extends ItemInterface>({ children, list, setList, ...rest }: ReactSortableProps<T>): react_jsx_runtime.JSX.Element;
1036
+
1037
+ declare function arrayEquals(a: any, b: any): boolean;
1038
+
1039
+ type CustomFetchOptions = Omit<RequestInit, "body"> & {
1040
+ body?: BodyInit | {
1041
+ [key: string]: unknown;
1042
+ };
1043
+ urlParams?: {
1044
+ [key: string]: string | number;
1045
+ };
1046
+ query?: {
1047
+ [key: string]: unknown;
1048
+ };
1049
+ };
1050
+ declare function fetchAPI(urlObjOrString: string | URL, enhancedOptions?: CustomFetchOptions, baseUrl?: string, baseOptions?: RequestInit): Promise<any>;
1051
+ declare class FetchError extends Error {
1052
+ status: number;
1053
+ data?: unknown;
1054
+ constructor(message: string, status: number, data?: unknown);
1055
+ }
1056
+
1057
+ declare function isErrorLike(err: any): err is Error;
1058
+ declare function parseError(err: any): [string, MessageOptions] | null;
1059
+
1060
+ declare const useNotifications: () => {
1061
+ addNotification: (content?: string, { expiration, color, canClose, withLoader, }?: Partial<Omit<Message, "id" | "message">>) => string;
1062
+ removeNotification: (id: string) => void;
1063
+ notifyError: (err: unknown) => void;
1064
+ };
1065
+
1066
+ /**
1067
+ * This hook accepts a ref to any element and adds a click event handler that creates ripples when click
1068
+ */
1069
+ declare const useRipple: <T extends HTMLElement>(ref: react__default.RefObject<T>) => react_jsx_runtime.JSX.Element[];
1070
+
1071
+ declare const useIsMounted: () => () => boolean;
1072
+
1073
+ declare const useFetch: () => (urlObjOrString: string | URL, enhancedOptions?: CustomFetchOptions) => Promise<any>;
1074
+
1075
+ declare const useCombinedRefs: <T extends unknown>(...refs: (Ref<T> | undefined)[]) => Ref<T>;
1076
+
1077
+ declare function useIsClosing(initialValue?: boolean, delay?: number): {
1078
+ isOpen: boolean;
1079
+ isClosing: boolean;
1080
+ setIsOpen: (newState: boolean) => void;
1081
+ };
1082
+
1083
+ declare function usePrevious<T>(value: T): T | undefined;
1084
+
1085
+ declare function useEventCallback<Args extends unknown[], R>(callback: ((...args: Args) => R) | null): (...args: Args) => R | undefined;
1086
+
1087
+ declare function useDebounce<T>(value: T, delay?: number): [T, Dispatch<SetStateAction<T>>];
1088
+ declare function useRefDebounce<T>(value: T, delay?: number): MutableRefObject<T>;
1089
+ declare function useStateDebounce<T>(initialValue: T, delay?: number): [T, T, (initialValue: SetStateAction<T>, immediate?: boolean) => void];
1090
+
1091
+ type CopiedValue = string | null;
1092
+ type CopyFn = (text: string) => Promise<boolean>;
1093
+ declare function useCopyToClipboard(): [CopiedValue, CopyFn];
1094
+
1095
+ declare function useEventListener<K extends keyof MediaQueryListEventMap>(eventName: K, handler: (event: MediaQueryListEventMap[K]) => void, element: RefObject<MediaQueryList>, options?: boolean | AddEventListenerOptions): void;
1096
+ declare function useEventListener<K extends keyof WindowEventMap>(eventName: K, handler: (event: WindowEventMap[K]) => void, element?: undefined, options?: boolean | AddEventListenerOptions): void;
1097
+ declare function useEventListener<K extends keyof HTMLElementEventMap & keyof SVGElementEventMap, T extends Element = K extends keyof HTMLElementEventMap ? HTMLDivElement : SVGElement>(eventName: K, handler: ((event: HTMLElementEventMap[K]) => void) | ((event: SVGElementEventMap[K]) => void), element: RefObject<T>, options?: boolean | AddEventListenerOptions): void;
1098
+ declare function useEventListener<K extends keyof DocumentEventMap>(eventName: K, handler: (event: DocumentEventMap[K]) => void, element: RefObject<Document>, options?: boolean | AddEventListenerOptions): void;
1099
+
1100
+ type EventType = "mousedown" | "mouseup" | "touchstart" | "touchend" | "focusin" | "focusout";
1101
+ declare function useOnClickOutside<T extends HTMLElement = HTMLElement>(ref: RefObject<T> | RefObject<T>[], handler: (event: MouseEvent | TouchEvent | FocusEvent) => void, eventType?: EventType, eventListenerOptions?: AddEventListenerOptions): void;
1102
+
1103
+ declare const useIsomorphicLayoutEffect: typeof useEffect;
1104
+
1105
+ declare const _default: {
1106
+ handler: tailwindcss_types_config.PluginCreator;
1107
+ config?: Partial<tailwindcss_types_config.Config> | undefined;
1108
+ };
1109
+
1110
+ export { _default$1 as Autocomplete, _default$2 as AutocompleteOption, type AutocompleteProps, Badge, Button, ButtonGroup, type ButtonProps, Checkbox, Code, ContextMenu, ContextMenuItem, type ContextMenuItemMouseEvent, type CustomFetchOptions, Dialog, DropdownMenu, DropdownMenuContent, DropdownMenuContext, DropdownMenuItem, DropdownMenuNested, type DropdownMenuOptions, DropdownMenuTrigger, FetchError, Alert as Flash, Hightlight as Highlight, Href, Input, InputField, LazyAutocomplete, Loader, MenuItem, MenuItemWithChildren, Modal, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, type ModalOptions, ModalTrigger, type NoDataOption, NotificationsContext, NotificationsProvider, type Option, type OptionLike, Popover, PopoverContent, PopoverContext, PopoverDescription, PopoverFooter, PopoverHeader, type PopoverOptions, PopoverTrigger, Portal, RadioGroup, ResizeArea, Scroll, Select, SelectContext, SelectOption, SelectSelection, type SelectSelectionProps, SimpleAutocomplete, SimpleTooltip, Snack, Sortable, type SortableItem, Step, Steps, Table$6 as Table, Table$5 as TableBody, Table$4 as TableCell, Table as TableFooter, Table$3 as TableHeader, Table$2 as TableHeaderCell, Table$1 as TableRow, Tabs, ThemeColor, Toggle, Tooltip, TooltipContent, TooltipContext, TooltipTrigger, arrayEquals, buttonVariants, cardConfig, dialogVariants, fetchAPI, getIndexLetter, getOptionLabel, getOptionValue, inputConfig, isErrorLike, parseError, _default as pentatrionTw, useAutocomplete, useCombinedRefs, useCopyToClipboard, useDebounce, useDropdownMenu, useDropdownMenuContext, useEventCallback, useEventListener, useFetch, useIsClosing, useIsMounted, useIsomorphicLayoutEffect, useModal, useModalContext, useNotifications, useOnClickOutside, usePopover, usePopoverContext, usePrevious, useRefDebounce, useRipple, useSelect, useStateDebounce, useTooltip, useTooltipContext };