@neo4j-ndl/react 3.0.33 → 3.1.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 (134) hide show
  1. package/lib/cjs/_common/ConditionalWrap.js.map +1 -1
  2. package/lib/cjs/breadcrumbs/Breadcrumbs.js +10 -6
  3. package/lib/cjs/breadcrumbs/Breadcrumbs.js.map +1 -1
  4. package/lib/cjs/context-menu/ContextMenu.js +3 -2
  5. package/lib/cjs/context-menu/ContextMenu.js.map +1 -1
  6. package/lib/cjs/data-grid/Components.js +2 -4
  7. package/lib/cjs/data-grid/Components.js.map +1 -1
  8. package/lib/cjs/icons/generated/custom/BoxSelect.js +1 -1
  9. package/lib/cjs/icons/generated/custom/BoxSelect.js.map +1 -1
  10. package/lib/cjs/icons/generated/custom/CurlyBrackets.js +1 -1
  11. package/lib/cjs/icons/generated/custom/CurlyBrackets.js.map +1 -1
  12. package/lib/cjs/icons/generated/custom/DatabaseCrossed.js +1 -1
  13. package/lib/cjs/icons/generated/custom/DatabaseCrossed.js.map +1 -1
  14. package/lib/cjs/icons/generated/custom/DatabaseSignal.js +1 -1
  15. package/lib/cjs/icons/generated/custom/DatabaseSignal.js.map +1 -1
  16. package/lib/cjs/icons/generated/custom/Explore.js +1 -1
  17. package/lib/cjs/icons/generated/custom/Explore.js.map +1 -1
  18. package/lib/cjs/icons/generated/custom/Github.js +1 -1
  19. package/lib/cjs/icons/generated/custom/Github.js.map +1 -1
  20. package/lib/cjs/icons/generated/custom/Lasso.js +1 -1
  21. package/lib/cjs/icons/generated/custom/Lasso.js.map +1 -1
  22. package/lib/cjs/icons/generated/custom/Pan.js +1 -1
  23. package/lib/cjs/icons/generated/custom/Pan.js.map +1 -1
  24. package/lib/cjs/icons/generated/custom/Query.js +1 -1
  25. package/lib/cjs/icons/generated/custom/Query.js.map +1 -1
  26. package/lib/cjs/icons/generated/custom/ResetZoom.js +1 -1
  27. package/lib/cjs/icons/generated/custom/ResetZoom.js.map +1 -1
  28. package/lib/cjs/icons/generated/custom/Roles.js +1 -1
  29. package/lib/cjs/icons/generated/custom/Roles.js.map +1 -1
  30. package/lib/cjs/icons/generated/custom/Select.js +1 -1
  31. package/lib/cjs/icons/generated/custom/Select.js.map +1 -1
  32. package/lib/cjs/index.js +2 -0
  33. package/lib/cjs/index.js.map +1 -1
  34. package/lib/cjs/popover/Popover.js +3 -2
  35. package/lib/cjs/popover/Popover.js.map +1 -1
  36. package/lib/cjs/popover/use-popover.js +4 -2
  37. package/lib/cjs/popover/use-popover.js.map +1 -1
  38. package/lib/cjs/select/Overrides.js +173 -27
  39. package/lib/cjs/select/Overrides.js.map +1 -1
  40. package/lib/cjs/select/Select.js +27 -163
  41. package/lib/cjs/select/Select.js.map +1 -1
  42. package/lib/cjs/skeleton/Skeleton.js +37 -0
  43. package/lib/cjs/skeleton/Skeleton.js.map +1 -0
  44. package/lib/cjs/{toast/sonner-types.js → skeleton/index.js} +16 -18
  45. package/lib/cjs/skeleton/index.js.map +1 -0
  46. package/lib/cjs/time-picker/TimePicker.js +229 -0
  47. package/lib/cjs/time-picker/TimePicker.js.map +1 -0
  48. package/lib/cjs/time-picker/generate-time-options.js +42 -0
  49. package/lib/cjs/time-picker/generate-time-options.js.map +1 -0
  50. package/lib/cjs/time-picker/index.js +38 -0
  51. package/lib/cjs/time-picker/index.js.map +1 -0
  52. package/lib/cjs/time-picker/needle-time.js +88 -0
  53. package/lib/cjs/time-picker/needle-time.js.map +1 -0
  54. package/lib/cjs/time-picker/time-picker-hooks.js +49 -0
  55. package/lib/cjs/time-picker/time-picker-hooks.js.map +1 -0
  56. package/lib/cjs/toast/Toast.js +4 -4
  57. package/lib/cjs/toast/Toast.js.map +1 -1
  58. package/lib/esm/_common/ConditionalWrap.js.map +1 -1
  59. package/lib/esm/breadcrumbs/Breadcrumbs.js +10 -6
  60. package/lib/esm/breadcrumbs/Breadcrumbs.js.map +1 -1
  61. package/lib/esm/context-menu/ContextMenu.js +3 -2
  62. package/lib/esm/context-menu/ContextMenu.js.map +1 -1
  63. package/lib/esm/data-grid/Components.js +2 -4
  64. package/lib/esm/data-grid/Components.js.map +1 -1
  65. package/lib/esm/icons/generated/custom/BoxSelect.js +1 -1
  66. package/lib/esm/icons/generated/custom/BoxSelect.js.map +1 -1
  67. package/lib/esm/icons/generated/custom/CurlyBrackets.js +1 -1
  68. package/lib/esm/icons/generated/custom/CurlyBrackets.js.map +1 -1
  69. package/lib/esm/icons/generated/custom/DatabaseCrossed.js +1 -1
  70. package/lib/esm/icons/generated/custom/DatabaseCrossed.js.map +1 -1
  71. package/lib/esm/icons/generated/custom/DatabaseSignal.js +1 -1
  72. package/lib/esm/icons/generated/custom/DatabaseSignal.js.map +1 -1
  73. package/lib/esm/icons/generated/custom/Explore.js +1 -1
  74. package/lib/esm/icons/generated/custom/Explore.js.map +1 -1
  75. package/lib/esm/icons/generated/custom/Github.js +1 -1
  76. package/lib/esm/icons/generated/custom/Github.js.map +1 -1
  77. package/lib/esm/icons/generated/custom/Lasso.js +1 -1
  78. package/lib/esm/icons/generated/custom/Lasso.js.map +1 -1
  79. package/lib/esm/icons/generated/custom/Pan.js +1 -1
  80. package/lib/esm/icons/generated/custom/Pan.js.map +1 -1
  81. package/lib/esm/icons/generated/custom/Query.js +1 -1
  82. package/lib/esm/icons/generated/custom/Query.js.map +1 -1
  83. package/lib/esm/icons/generated/custom/ResetZoom.js +1 -1
  84. package/lib/esm/icons/generated/custom/ResetZoom.js.map +1 -1
  85. package/lib/esm/icons/generated/custom/Roles.js +1 -1
  86. package/lib/esm/icons/generated/custom/Roles.js.map +1 -1
  87. package/lib/esm/icons/generated/custom/Select.js +1 -1
  88. package/lib/esm/icons/generated/custom/Select.js.map +1 -1
  89. package/lib/esm/index.js +2 -0
  90. package/lib/esm/index.js.map +1 -1
  91. package/lib/esm/popover/Popover.js +3 -2
  92. package/lib/esm/popover/Popover.js.map +1 -1
  93. package/lib/esm/popover/use-popover.js +4 -2
  94. package/lib/esm/popover/use-popover.js.map +1 -1
  95. package/lib/esm/select/Overrides.js +165 -27
  96. package/lib/esm/select/Overrides.js.map +1 -1
  97. package/lib/esm/select/Select.js +28 -164
  98. package/lib/esm/select/Select.js.map +1 -1
  99. package/lib/esm/skeleton/Skeleton.js +31 -0
  100. package/lib/esm/skeleton/Skeleton.js.map +1 -0
  101. package/lib/esm/skeleton/index.js +22 -0
  102. package/lib/esm/skeleton/index.js.map +1 -0
  103. package/lib/esm/time-picker/TimePicker.js +223 -0
  104. package/lib/esm/time-picker/TimePicker.js.map +1 -0
  105. package/lib/esm/time-picker/generate-time-options.js +38 -0
  106. package/lib/esm/time-picker/generate-time-options.js.map +1 -0
  107. package/lib/esm/time-picker/index.js +22 -0
  108. package/lib/esm/time-picker/index.js.map +1 -0
  109. package/lib/esm/time-picker/needle-time.js +84 -0
  110. package/lib/esm/time-picker/needle-time.js.map +1 -0
  111. package/lib/esm/time-picker/time-picker-hooks.js +45 -0
  112. package/lib/esm/time-picker/time-picker-hooks.js.map +1 -0
  113. package/lib/esm/toast/Toast.js +5 -5
  114. package/lib/esm/toast/Toast.js.map +1 -1
  115. package/lib/types/_common/ConditionalWrap.d.ts +4 -3
  116. package/lib/types/banner/Banner.d.ts +2 -2
  117. package/lib/types/breadcrumbs/Breadcrumbs.d.ts +4 -4
  118. package/lib/types/context-menu/ContextMenu.d.ts +1 -0
  119. package/lib/types/index.d.ts +2 -0
  120. package/lib/types/popover/Popover.d.ts +3 -1
  121. package/lib/types/popover/use-popover.d.ts +3 -1
  122. package/lib/types/select/Overrides.d.ts +16 -6
  123. package/lib/types/skeleton/Skeleton.d.ts +35 -0
  124. package/lib/types/skeleton/index.d.ts +21 -0
  125. package/lib/types/time-picker/TimePicker.d.ts +43 -0
  126. package/lib/types/time-picker/generate-time-options.d.ts +21 -0
  127. package/lib/types/time-picker/index.d.ts +22 -0
  128. package/lib/{esm/toast/sonner-types.js → types/time-picker/needle-time.d.ts} +9 -15
  129. package/lib/types/time-picker/time-picker-hooks.d.ts +30 -0
  130. package/lib/types/toast/Toast.d.ts +1 -2
  131. package/package.json +5 -5
  132. package/lib/cjs/toast/sonner-types.js.map +0 -1
  133. package/lib/esm/toast/sonner-types.js.map +0 -1
  134. package/lib/types/toast/sonner-types.d.ts +0 -179
@@ -1 +0,0 @@
1
- {"version":3,"file":"sonner-types.js","sourceRoot":"","sources":["../../../src/toast/sonner-types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,kFAAkF;AAClF,kDAAkD;AAClD,4CAA4C;AAC5C,kDAAkD;AAClD,oBAAoB;AA4FpB,MAAM,UAAU,QAAQ,CAAC,MAAgC;IACvD,OAAO,CACJ,MAAiB,CAAC,KAAK,KAAK,SAAS;QACtC,OAAQ,MAAiB,CAAC,OAAO,KAAK,UAAU,CACjD,CAAC;AACJ,CAAC;AA0FD,MAAM,CAAN,IAAY,eAIX;AAJD,WAAY,eAAe;IACzB,0CAAuB,CAAA;IACvB,4CAAyB,CAAA;IACzB,0CAAuB,CAAA;AACzB,CAAC,EAJW,eAAe,KAAf,eAAe,QAI1B"}
@@ -1,179 +0,0 @@
1
- /**
2
- *
3
- * Copyright (c) "Neo4j"
4
- * Neo4j Sweden AB [http://neo4j.com]
5
- *
6
- * This file is part of Neo4j.
7
- *
8
- * Neo4j is free software: you can redistribute it and/or modify
9
- * it under the terms of the GNU General Public License as published by
10
- * the Free Software Foundation, either version 3 of the License, or
11
- * (at your option) any later version.
12
- *
13
- * This program is distributed in the hope that it will be useful,
14
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- * GNU General Public License for more details.
17
- *
18
- * You should have received a copy of the GNU General Public License
19
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
20
- */
21
- import type React from 'react';
22
- export type ToastTypes = 'normal' | 'action' | 'success' | 'info' | 'warning' | 'error' | 'loading' | 'default';
23
- export type PromiseT<Data = any> = Promise<Data> | (() => Promise<Data>);
24
- export type PromiseExternalToast = Omit<ExternalToast, 'description'>;
25
- export type PromiseData<ToastData = any> = PromiseExternalToast & {
26
- loading?: string | React.ReactNode;
27
- success?: string | React.ReactNode | ((data: ToastData) => React.ReactNode | string);
28
- error?: string | React.ReactNode | ((error: any) => React.ReactNode | string);
29
- description?: string | React.ReactNode | ((data: any) => React.ReactNode | string);
30
- finally?: () => void | Promise<void>;
31
- };
32
- export interface ToastClassnames {
33
- toast?: string;
34
- title?: string;
35
- description?: string;
36
- loader?: string;
37
- closeButton?: string;
38
- cancelButton?: string;
39
- actionButton?: string;
40
- success?: string;
41
- error?: string;
42
- info?: string;
43
- warning?: string;
44
- loading?: string;
45
- default?: string;
46
- content?: string;
47
- icon?: string;
48
- }
49
- export interface ToastIcons {
50
- success?: React.ReactNode;
51
- info?: React.ReactNode;
52
- warning?: React.ReactNode;
53
- error?: React.ReactNode;
54
- loading?: React.ReactNode;
55
- }
56
- interface Action {
57
- label: string;
58
- onClick: (event: React.MouseEvent<HTMLButtonElement, MouseEvent>) => void;
59
- actionButtonStyle?: React.CSSProperties;
60
- }
61
- export interface ToastT {
62
- id: number | string;
63
- title?: string | React.ReactNode;
64
- type?: ToastTypes;
65
- icon?: React.ReactNode;
66
- jsx?: React.ReactNode;
67
- invert?: boolean;
68
- closeButton?: boolean;
69
- dismissible?: boolean;
70
- description?: React.ReactNode;
71
- duration?: number;
72
- delete?: boolean;
73
- important?: boolean;
74
- action?: Action | React.ReactNode;
75
- cancel?: Action | React.ReactNode;
76
- onDismiss?: (toast: ToastT) => void;
77
- onAutoClose?: (toast: ToastT) => void;
78
- promise?: PromiseT;
79
- cancelButtonStyle?: React.CSSProperties;
80
- actionButtonStyle?: React.CSSProperties;
81
- style?: React.CSSProperties;
82
- unstyled?: boolean;
83
- className?: string;
84
- classNames?: ToastClassnames;
85
- descriptionClassName?: string;
86
- position?: Position;
87
- }
88
- export declare function isAction(action: Action | React.ReactNode): action is Action;
89
- export type Position = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'top-center' | 'bottom-center';
90
- export interface HeightT {
91
- height: number;
92
- toastId: number | string;
93
- position: Position;
94
- }
95
- interface ToastOptions {
96
- className?: string;
97
- closeButton?: boolean;
98
- descriptionClassName?: string;
99
- style?: React.CSSProperties;
100
- cancelButtonStyle?: React.CSSProperties;
101
- actionButtonStyle?: React.CSSProperties;
102
- duration?: number;
103
- unstyled?: boolean;
104
- classNames?: ToastClassnames;
105
- }
106
- type CnFunction = (...classes: Array<string | undefined>) => string;
107
- export interface ToasterProps {
108
- invert?: boolean;
109
- theme?: 'light' | 'dark' | 'system';
110
- position?: Position;
111
- hotkey?: string[];
112
- richColors?: boolean;
113
- expand?: boolean;
114
- duration?: number;
115
- gap?: number;
116
- visibleToasts?: number;
117
- closeButton?: boolean;
118
- toastOptions?: ToastOptions;
119
- className?: string;
120
- style?: React.CSSProperties;
121
- offset?: string | number;
122
- dir?: 'rtl' | 'ltr' | 'auto';
123
- /**
124
- * @deprecated Please use the `icons` prop instead:
125
- * ```jsx
126
- * <Toaster
127
- * icons={{ loading: <LoadingIcon /> }}
128
- * />
129
- * ```
130
- */
131
- loadingIcon?: React.ReactNode;
132
- icons?: ToastIcons;
133
- containerAriaLabel?: string;
134
- pauseWhenPageIsHidden?: boolean;
135
- cn?: CnFunction;
136
- }
137
- export interface ToastProps {
138
- toast: ToastT;
139
- toasts: ToastT[];
140
- index: number;
141
- expanded: boolean;
142
- invert: boolean;
143
- heights: HeightT[];
144
- setHeights: React.Dispatch<React.SetStateAction<HeightT[]>>;
145
- removeToast: (toast: ToastT) => void;
146
- gap?: number;
147
- position: Position;
148
- visibleToasts: number;
149
- expandByDefault: boolean;
150
- closeButton: boolean;
151
- interacting: boolean;
152
- style?: React.CSSProperties;
153
- cancelButtonStyle?: React.CSSProperties;
154
- actionButtonStyle?: React.CSSProperties;
155
- duration?: number;
156
- className?: string;
157
- unstyled?: boolean;
158
- descriptionClassName?: string;
159
- loadingIcon?: React.ReactNode;
160
- classNames?: ToastClassnames;
161
- icons?: ToastIcons;
162
- closeButtonAriaLabel?: string;
163
- pauseWhenPageIsHidden: boolean;
164
- cn: CnFunction;
165
- }
166
- export declare enum SwipeStateTypes {
167
- SwipedOut = "SwipedOut",
168
- SwipedBack = "SwipedBack",
169
- NotSwiped = "NotSwiped"
170
- }
171
- export type Theme = 'light' | 'dark';
172
- export interface ToastToDismiss {
173
- id: number | string;
174
- dismiss: boolean;
175
- }
176
- export type ExternalToast = Omit<ToastT, 'id' | 'type' | 'title' | 'jsx' | 'delete' | 'promise'> & {
177
- id?: number | string;
178
- };
179
- export {};