@pingux/astro 2.219.0 → 2.220.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 (67) hide show
  1. package/lib/cjs/components/Breadcrumbs/Breadcrumb.styles.d.ts +7 -0
  2. package/lib/cjs/components/Breadcrumbs/Breadcrumb.styles.js +9 -2
  3. package/lib/cjs/components/Breadcrumbs/BreadcrumbItem.js +16 -3
  4. package/lib/cjs/components/Breadcrumbs/Breadcrumbs.js +24 -7
  5. package/lib/cjs/components/DatePicker/DateField.d.ts +4 -0
  6. package/lib/cjs/components/DatePicker/DateField.js +25 -79
  7. package/lib/cjs/components/DatePicker/DatePicker.d.ts +4 -0
  8. package/lib/cjs/components/DatePicker/DatePicker.js +28 -79
  9. package/lib/cjs/components/DatePicker/DatePicker.stories.js +4 -2
  10. package/lib/cjs/components/DatePicker/DatePicker.styles.d.ts +921 -0
  11. package/lib/cjs/components/DatePicker/DatePicker.styles.js +3 -1
  12. package/lib/cjs/components/DatePicker/DatePicker.test.js +4 -4
  13. package/lib/cjs/components/DatePicker/DateSegment.d.ts +7 -0
  14. package/lib/cjs/components/DatePicker/DateSegment.js +18 -29
  15. package/lib/cjs/components/DatePicker/index.d.ts +1 -0
  16. package/lib/cjs/components/Icon/NoticeIcon.d.ts +16 -1
  17. package/lib/cjs/components/IconButton/IconButton.styles.d.ts +39 -1
  18. package/lib/cjs/components/ImageUploadField/ImagePreviewButton.d.ts +18 -0
  19. package/lib/cjs/components/ImageUploadField/ImagePreviewButton.js +3 -22
  20. package/lib/cjs/components/ImageUploadField/ImageUploadField.d.ts +4 -0
  21. package/lib/cjs/components/ImageUploadField/ImageUploadField.js +30 -66
  22. package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.d.ts +17 -0
  23. package/lib/cjs/components/ImageUploadField/ImageUploadFieldBase.js +6 -19
  24. package/lib/cjs/components/ImageUploadField/imageUpload.d.ts +53 -0
  25. package/lib/cjs/components/ImageUploadField/index.d.ts +1 -0
  26. package/lib/cjs/components/PanelHeader/PanelHeader.styles.js +4 -1
  27. package/lib/cjs/components/SwitchField/switchFieldAttributes.d.ts +7 -2
  28. package/lib/cjs/hooks/useGetTheme/useGetTheme.d.ts +138 -119
  29. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/icons.d.ts +10 -0
  30. package/lib/cjs/styles/themeOverrides/nextGenDarkMode/customProperties/index.d.ts +10 -0
  31. package/lib/cjs/styles/themeOverrides/onyxSideNav.d.ts +10 -0
  32. package/lib/cjs/styles/themes/astro/customProperties/icons.d.ts +10 -1
  33. package/lib/cjs/styles/themes/astro/customProperties/index.d.ts +10 -1
  34. package/lib/cjs/styles/themes/next-gen/customProperties/icons.d.ts +10 -1
  35. package/lib/cjs/styles/themes/next-gen/customProperties/index.d.ts +10 -1
  36. package/lib/cjs/styles/themes/next-gen/next-gen.d.ts +13 -1
  37. package/lib/cjs/styles/themes/next-gen/variants/variants.d.ts +3 -0
  38. package/lib/cjs/styles/themes/next-gen/variants/variants.js +3 -0
  39. package/lib/cjs/types/breadCrumbs.d.ts +6 -0
  40. package/lib/cjs/types/datePicker.d.ts +112 -0
  41. package/lib/cjs/types/datePicker.js +6 -0
  42. package/lib/cjs/types/imageUploadField.d.ts +31 -0
  43. package/lib/cjs/types/imageUploadField.js +6 -0
  44. package/lib/cjs/types/index.d.ts +2 -0
  45. package/lib/cjs/types/index.js +73 -51
  46. package/lib/cjs/utils/devUtils/constants/statuses.d.ts +17 -0
  47. package/lib/cjs/utils/devUtils/props/isDateWithinRanges.d.ts +10 -0
  48. package/lib/cjs/utils/devUtils/props/isDateWithinRanges.js +2 -2
  49. package/lib/components/Breadcrumbs/Breadcrumb.styles.js +9 -2
  50. package/lib/components/Breadcrumbs/BreadcrumbItem.js +17 -4
  51. package/lib/components/Breadcrumbs/Breadcrumbs.js +25 -8
  52. package/lib/components/DatePicker/DateField.js +25 -79
  53. package/lib/components/DatePicker/DatePicker.js +30 -79
  54. package/lib/components/DatePicker/DatePicker.stories.js +4 -2
  55. package/lib/components/DatePicker/DatePicker.styles.js +3 -1
  56. package/lib/components/DatePicker/DatePicker.test.js +4 -4
  57. package/lib/components/DatePicker/DateSegment.js +17 -30
  58. package/lib/components/ImageUploadField/ImagePreviewButton.js +5 -24
  59. package/lib/components/ImageUploadField/ImageUploadField.js +31 -67
  60. package/lib/components/ImageUploadField/ImageUploadFieldBase.js +6 -19
  61. package/lib/components/PanelHeader/PanelHeader.styles.js +4 -1
  62. package/lib/styles/themes/next-gen/variants/variants.js +3 -0
  63. package/lib/types/datePicker.js +1 -0
  64. package/lib/types/imageUploadField.js +1 -0
  65. package/lib/types/index.js +2 -0
  66. package/lib/utils/devUtils/props/isDateWithinRanges.js +2 -3
  67. package/package.json +1 -1
@@ -5,6 +5,134 @@ export declare const baseState: {
5
5
  isCustom: boolean;
6
6
  };
7
7
  declare const useGetTheme: () => {
8
+ name: string;
9
+ copyButtonSize: import("../..").IconSize;
10
+ breadcrumbIconSize: import("../..").IconSize;
11
+ breadcrumbIconMargin: string;
12
+ accordionItemMarginLeft: string;
13
+ pageHeaderTitleMargin: string;
14
+ pageHeaderAddIconMargin: string;
15
+ pageHeaderAddIconSize: string;
16
+ defaultLoaderSize: number;
17
+ numberFieldArrowSize: import("../..").IconSize;
18
+ modalCloseIconSize: import("../..").IconSize;
19
+ linkSelectFieldIcon: import("../..").IconSize;
20
+ accordionHoveredState: {
21
+ '&.is-hovered': {
22
+ color: string;
23
+ textDecoration: string;
24
+ };
25
+ };
26
+ activeColor: string;
27
+ navBarIconSize: import("../..").IconSize;
28
+ backgroundBaseColor: string;
29
+ styles: {
30
+ navButtonEstHeight: number;
31
+ };
32
+ icons: {
33
+ default: string;
34
+ error: string;
35
+ success: string;
36
+ warning: string;
37
+ critical: string;
38
+ fatal: string;
39
+ info: string;
40
+ major: string;
41
+ minor: string;
42
+ warningNeutral: string;
43
+ aic: (props: any) => import("react/jsx-runtime").JSX.Element;
44
+ applicationsIcon: string;
45
+ Ascending: string;
46
+ authenticationIcon: string;
47
+ clipboard: string;
48
+ CreateIcon: string;
49
+ daVinci: string;
50
+ DefaultCircle: string;
51
+ Descending: string;
52
+ popoverMenuIcon: string;
53
+ ErrorCircle: string;
54
+ HomeIcon: string;
55
+ integrationsIcon: string;
56
+ listViewMenu: string;
57
+ mdiAccountCog: string;
58
+ mdiAccountMultiple: string;
59
+ mdiEarth: import("@pingux/mdi-react").MdiReactIconComponentType;
60
+ mdiEmoticonHappyOutline: import("@pingux/mdi-react").MdiReactIconComponentType;
61
+ mdiFingerprint: string;
62
+ mdiPlayCircleIcon: string;
63
+ mdiScaleBalance: string;
64
+ mdiShoCard: string;
65
+ mdiTransitConnectionVariant: import("@pingux/mdi-react").MdiReactIconComponentType;
66
+ mdiViewDashboard: string;
67
+ mdiWeb: string;
68
+ MenuDown: string;
69
+ MenuUp: string;
70
+ monitoringIcon: import("@pingux/mdi-react").MdiReactIconComponentType;
71
+ openInNew: string;
72
+ overviewIcon: string;
73
+ p1verify: string;
74
+ pam: (props: any) => import("react/jsx-runtime").JSX.Element;
75
+ PingAuthorize: string;
76
+ pingLogoHorizontalSmall: import("react/jsx-runtime").JSX.Element;
77
+ protect: (props: any) => import("react/jsx-runtime").JSX.Element;
78
+ rocketLaunchIcon: string;
79
+ shareFeedbackIcon: string;
80
+ shieldStar: import("@pingux/mdi-react").MdiReactIconComponentType;
81
+ SuccessCircle: string;
82
+ userExperienceIcon: string;
83
+ WarningIcon: string;
84
+ CameraOutlineIcon: string;
85
+ ImageOutlineIcon: string;
86
+ helpHint: string;
87
+ ModalCloseIcon: string;
88
+ };
89
+ tShirtSizes: {
90
+ 'icon-50': string;
91
+ xxs: string;
92
+ 'icon-100': string;
93
+ xs: string;
94
+ 'icon-200': string;
95
+ sm: string;
96
+ 'icon-300': string;
97
+ md: string;
98
+ 'icon-400': string;
99
+ 'icon-500': string;
100
+ 'icon-600': string;
101
+ 'icon-700': string;
102
+ 'icon-800': string;
103
+ 'icon-900': string;
104
+ xsm: string;
105
+ };
106
+ iconBadgeCircleColor: string;
107
+ iconWrapperSizes: {
108
+ xs: number;
109
+ sm: number;
110
+ md: number;
111
+ lg: number;
112
+ xl: number;
113
+ };
114
+ defaultIconColor: string;
115
+ accordionItemDefaultLabelTag: string;
116
+ iFrameContentDivBackgroundColor: string;
117
+ rockerButtonGap: string;
118
+ defaultIconSize: import("../..").IconSize;
119
+ calendarIconSize: import("../..").IconSize;
120
+ buttonLoaderSize: import("../..").LoaderSize;
121
+ badgeStyles: {
122
+ blueBg: string;
123
+ greyBg: string;
124
+ blueText: string;
125
+ greyText: string;
126
+ };
127
+ badgeTextFontSize: string;
128
+ linkSelectFieldWidth: string;
129
+ themeState: {
130
+ isOnyx: boolean;
131
+ isAstro: boolean;
132
+ isOnyxDark: boolean;
133
+ isCustom: boolean;
134
+ };
135
+ } | {
8
136
  name: string;
9
137
  accordionHoveredState: {
10
138
  '&.is-hovered': {
@@ -16,7 +144,16 @@ declare const useGetTheme: () => {
16
144
  activeColor: string;
17
145
  backgroundBaseColor: string;
18
146
  icons: {
19
- [x: number]: import("@pingux/mdi-react").MdiReactIconComponentType;
147
+ default: import("@pingux/mdi-react").MdiReactIconComponentType;
148
+ error: import("@pingux/mdi-react").MdiReactIconComponentType;
149
+ success: import("@pingux/mdi-react").MdiReactIconComponentType;
150
+ warning: import("@pingux/mdi-react").MdiReactIconComponentType;
151
+ critical: import("@pingux/mdi-react").MdiReactIconComponentType;
152
+ fatal: import("@pingux/mdi-react").MdiReactIconComponentType;
153
+ info: import("@pingux/mdi-react").MdiReactIconComponentType;
154
+ major: import("@pingux/mdi-react").MdiReactIconComponentType;
155
+ minor: import("@pingux/mdi-react").MdiReactIconComponentType;
156
+ warningNeutral: import("@pingux/mdi-react").MdiReactIconComponentType;
20
157
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
21
158
  applicationsIcon: import("@pingux/mdi-react").MdiReactIconComponentType;
22
159
  Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
@@ -112,123 +249,5 @@ declare const useGetTheme: () => {
112
249
  isOnyxDark: boolean;
113
250
  isCustom: boolean;
114
251
  };
115
- } | {
116
- name: string;
117
- backgroundBaseColor: string;
118
- iFrameContentDivBackgroundColor: string;
119
- icons: {
120
- pingLogoHorizontalSmall: import("react/jsx-runtime").JSX.Element;
121
- aic: (props: any) => import("react/jsx-runtime").JSX.Element;
122
- applicationsIcon: string;
123
- Ascending: string;
124
- authenticationIcon: string;
125
- clipboard: string;
126
- CreateIcon: string;
127
- daVinci: string;
128
- DefaultCircle: string;
129
- Descending: string;
130
- popoverMenuIcon: string;
131
- ErrorCircle: string;
132
- HomeIcon: string;
133
- integrationsIcon: string;
134
- listViewMenu: string;
135
- mdiAccountCog: string;
136
- mdiAccountMultiple: string;
137
- mdiEarth: import("@pingux/mdi-react").MdiReactIconComponentType;
138
- mdiEmoticonHappyOutline: import("@pingux/mdi-react").MdiReactIconComponentType;
139
- mdiFingerprint: string;
140
- mdiPlayCircleIcon: string;
141
- mdiScaleBalance: string;
142
- mdiShoCard: string;
143
- mdiTransitConnectionVariant: import("@pingux/mdi-react").MdiReactIconComponentType;
144
- mdiViewDashboard: string;
145
- mdiWeb: string;
146
- MenuDown: string;
147
- MenuUp: string;
148
- monitoringIcon: import("@pingux/mdi-react").MdiReactIconComponentType;
149
- openInNew: string;
150
- overviewIcon: string;
151
- p1verify: string;
152
- pam: (props: any) => import("react/jsx-runtime").JSX.Element;
153
- PingAuthorize: string;
154
- protect: (props: any) => import("react/jsx-runtime").JSX.Element;
155
- rocketLaunchIcon: string;
156
- shareFeedbackIcon: string;
157
- shieldStar: import("@pingux/mdi-react").MdiReactIconComponentType;
158
- SuccessCircle: string;
159
- userExperienceIcon: string;
160
- WarningIcon: string;
161
- CameraOutlineIcon: string;
162
- ImageOutlineIcon: string;
163
- helpHint: string;
164
- ModalCloseIcon: string;
165
- };
166
- defaultIconColor: string;
167
- badgeStyles: {
168
- blueBg: string;
169
- greyBg: string;
170
- blueText: string;
171
- greyText: string;
172
- };
173
- copyButtonSize: import("../..").IconSize;
174
- breadcrumbIconSize: import("../..").IconSize;
175
- breadcrumbIconMargin: string;
176
- accordionItemMarginLeft: string;
177
- pageHeaderTitleMargin: string;
178
- pageHeaderAddIconMargin: string;
179
- pageHeaderAddIconSize: string;
180
- defaultLoaderSize: number;
181
- numberFieldArrowSize: import("../..").IconSize;
182
- modalCloseIconSize: import("../..").IconSize;
183
- linkSelectFieldIcon: import("../..").IconSize;
184
- accordionHoveredState: {
185
- '&.is-hovered': {
186
- color: string;
187
- textDecoration: string;
188
- };
189
- };
190
- activeColor: string;
191
- navBarIconSize: import("../..").IconSize;
192
- styles: {
193
- navButtonEstHeight: number;
194
- };
195
- tShirtSizes: {
196
- 'icon-50': string;
197
- xxs: string;
198
- 'icon-100': string;
199
- xs: string;
200
- 'icon-200': string;
201
- sm: string;
202
- 'icon-300': string;
203
- md: string;
204
- 'icon-400': string;
205
- 'icon-500': string;
206
- 'icon-600': string;
207
- 'icon-700': string;
208
- 'icon-800': string;
209
- 'icon-900': string;
210
- xsm: string;
211
- };
212
- iconBadgeCircleColor: string;
213
- iconWrapperSizes: {
214
- xs: number;
215
- sm: number;
216
- md: number;
217
- lg: number;
218
- xl: number;
219
- };
220
- accordionItemDefaultLabelTag: string;
221
- rockerButtonGap: string;
222
- defaultIconSize: import("../..").IconSize;
223
- calendarIconSize: import("../..").IconSize;
224
- buttonLoaderSize: import("../..").LoaderSize;
225
- badgeTextFontSize: string;
226
- linkSelectFieldWidth: string;
227
- themeState: {
228
- isOnyx: boolean;
229
- isOnyxDark: boolean;
230
- isAstro: boolean;
231
- isCustom: boolean;
232
- };
233
252
  };
234
253
  export default useGetTheme;
@@ -1,5 +1,15 @@
1
1
  declare const _default: {
2
2
  pingLogoHorizontalSmall: import("react/jsx-runtime").JSX.Element;
3
+ default: string;
4
+ error: string;
5
+ success: string;
6
+ warning: string;
7
+ critical: string;
8
+ fatal: string;
9
+ info: string;
10
+ major: string;
11
+ minor: string;
12
+ warningNeutral: string;
3
13
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
4
14
  applicationsIcon: string;
5
15
  Ascending: string;
@@ -3,6 +3,16 @@ export declare const nextGenDarkThemeValues: {
3
3
  iFrameContentDivBackgroundColor: string;
4
4
  icons: {
5
5
  pingLogoHorizontalSmall: import("react/jsx-runtime").JSX.Element;
6
+ default: string;
7
+ error: string;
8
+ success: string;
9
+ warning: string;
10
+ critical: string;
11
+ fatal: string;
12
+ info: string;
13
+ major: string;
14
+ minor: string;
15
+ warningNeutral: string;
6
16
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
7
17
  applicationsIcon: string;
8
18
  Ascending: string;
@@ -280,6 +280,16 @@ declare const _default: {
280
280
  MenuDown: import("@pingux/mdi-react").MdiReactIconComponentType;
281
281
  MenuUp: import("@pingux/mdi-react").MdiReactIconComponentType;
282
282
  pingLogoHorizontalSmall: import("react/jsx-runtime").JSX.Element;
283
+ default: string;
284
+ error: string;
285
+ success: string;
286
+ warning: string;
287
+ critical: string;
288
+ fatal: string;
289
+ info: string;
290
+ major: string;
291
+ minor: string;
292
+ warningNeutral: string;
283
293
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
284
294
  applicationsIcon: string;
285
295
  Ascending: string;
@@ -1,5 +1,14 @@
1
1
  declare const _default: {
2
- [x: number]: import("@pingux/mdi-react").MdiReactIconComponentType;
2
+ default: import("@pingux/mdi-react").MdiReactIconComponentType;
3
+ error: import("@pingux/mdi-react").MdiReactIconComponentType;
4
+ success: import("@pingux/mdi-react").MdiReactIconComponentType;
5
+ warning: import("@pingux/mdi-react").MdiReactIconComponentType;
6
+ critical: import("@pingux/mdi-react").MdiReactIconComponentType;
7
+ fatal: import("@pingux/mdi-react").MdiReactIconComponentType;
8
+ info: import("@pingux/mdi-react").MdiReactIconComponentType;
9
+ major: import("@pingux/mdi-react").MdiReactIconComponentType;
10
+ minor: import("@pingux/mdi-react").MdiReactIconComponentType;
11
+ warningNeutral: import("@pingux/mdi-react").MdiReactIconComponentType;
3
12
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
4
13
  applicationsIcon: import("@pingux/mdi-react").MdiReactIconComponentType;
5
14
  Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
@@ -10,7 +10,16 @@ export declare const astroThemeValues: {
10
10
  activeColor: string;
11
11
  backgroundBaseColor: string;
12
12
  icons: {
13
- [x: number]: import("@pingux/mdi-react").MdiReactIconComponentType;
13
+ default: import("@pingux/mdi-react").MdiReactIconComponentType;
14
+ error: import("@pingux/mdi-react").MdiReactIconComponentType;
15
+ success: import("@pingux/mdi-react").MdiReactIconComponentType;
16
+ warning: import("@pingux/mdi-react").MdiReactIconComponentType;
17
+ critical: import("@pingux/mdi-react").MdiReactIconComponentType;
18
+ fatal: import("@pingux/mdi-react").MdiReactIconComponentType;
19
+ info: import("@pingux/mdi-react").MdiReactIconComponentType;
20
+ major: import("@pingux/mdi-react").MdiReactIconComponentType;
21
+ minor: import("@pingux/mdi-react").MdiReactIconComponentType;
22
+ warningNeutral: import("@pingux/mdi-react").MdiReactIconComponentType;
14
23
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
15
24
  applicationsIcon: import("@pingux/mdi-react").MdiReactIconComponentType;
16
25
  Ascending: import("@pingux/mdi-react").MdiReactIconComponentType;
@@ -1,5 +1,14 @@
1
1
  declare const icons: {
2
- [x: number]: string;
2
+ default: string;
3
+ error: string;
4
+ success: string;
5
+ warning: string;
6
+ critical: string;
7
+ fatal: string;
8
+ info: string;
9
+ major: string;
10
+ minor: string;
11
+ warningNeutral: string;
3
12
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
4
13
  applicationsIcon: string;
5
14
  Ascending: string;
@@ -25,7 +25,16 @@ export declare const nextGenThemeValues: {
25
25
  navButtonEstHeight: number;
26
26
  };
27
27
  icons: {
28
- [x: number]: string;
28
+ default: string;
29
+ error: string;
30
+ success: string;
31
+ warning: string;
32
+ critical: string;
33
+ fatal: string;
34
+ info: string;
35
+ major: string;
36
+ minor: string;
37
+ warningNeutral: string;
29
38
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
30
39
  applicationsIcon: string;
31
40
  Ascending: string;
@@ -3234,7 +3234,16 @@ declare const _default: {
3234
3234
  };
3235
3235
  };
3236
3236
  icons: {
3237
- [x: number]: string;
3237
+ default: string;
3238
+ error: string;
3239
+ success: string;
3240
+ warning: string;
3241
+ critical: string;
3242
+ fatal: string;
3243
+ info: string;
3244
+ major: string;
3245
+ minor: string;
3246
+ warningNeutral: string;
3238
3247
  aic: (props: any) => import("react/jsx-runtime").JSX.Element;
3239
3248
  applicationsIcon: string;
3240
3249
  Ascending: string;
@@ -5208,6 +5217,9 @@ declare const _default: {
5208
5217
  fontFamily: string;
5209
5218
  };
5210
5219
  breadcrumb: {
5220
+ containerOl: {
5221
+ gap: string;
5222
+ };
5211
5223
  link: {
5212
5224
  fontWeight: number;
5213
5225
  fontSize: string;
@@ -259,6 +259,9 @@ declare const _default: {
259
259
  fontFamily: string;
260
260
  };
261
261
  breadcrumb: {
262
+ containerOl: {
263
+ gap: string;
264
+ };
262
265
  link: {
263
266
  fontWeight: number;
264
267
  fontSize: string;
@@ -373,6 +373,9 @@ var loader = {
373
373
  }
374
374
  };
375
375
  var breadcrumb = {
376
+ containerOl: {
377
+ gap: 'md'
378
+ },
376
379
  link: {
377
380
  fontWeight: 2,
378
381
  fontSize: 'lg'
@@ -28,4 +28,10 @@ export interface breadCrumbItemProps extends BoxProps, TestingAttributes {
28
28
  isDisabled?: boolean;
29
29
  onAction?: (key: unknown) => void;
30
30
  onPress?: () => void;
31
+ /** Whether this item's tooltip is the one currently open,
32
+ * coordinated by the parent Breadcrumbs. */
33
+ isTooltipOpen?: boolean;
34
+ /** Notifies the parent Breadcrumbs when this item's hover state changes,
35
+ * so only one tooltip is open at a time. */
36
+ onTooltipHoverChange?: (isHovering: boolean) => void;
31
37
  }
@@ -0,0 +1,112 @@
1
+ import React from 'react';
2
+ import type { CalendarDate, CalendarDateTime, ZonedDateTime } from '@internationalized/date';
3
+ import type { DateFieldState, DatePickerState, DateSegment } from '@react-stately/datepicker';
4
+ import type { AriaButtonProps } from '@react-types/button';
5
+ import type { BoxProps } from './box';
6
+ import type { DateValue } from './calendar';
7
+ type MappedDateValue<T> = T extends ZonedDateTime ? ZonedDateTime : T extends CalendarDateTime ? CalendarDateTime : T extends CalendarDate ? CalendarDate : never;
8
+ export type { CalendarDate, DateValue, MappedDateValue };
9
+ export interface DatePickerProps {
10
+ /** Prop to provide a custom default date (uncontrolled) */
11
+ defaultValue?: DateValue | string;
12
+ /** Prop to provide a default date (controlled) */
13
+ value?: DateValue | string;
14
+ /** Whether the element should receive focus on render. */
15
+ hasAutoFocus?: boolean;
16
+ /** Text rendered below the input displaying the expected date format for the user's locale. */
17
+ hasFormatHelpText?: boolean;
18
+ /** Text rendered below the input. */
19
+ helperText?: string;
20
+ /** Props object that is spread directly into the helphint element. */
21
+ helpHintProps?: BoxProps;
22
+ /** The element's unique identifier. */
23
+ id?: string;
24
+ /**
25
+ * Callback that is called for each date of the calendar.
26
+ * If it returns true, then the date is unavailable.
27
+ *
28
+ * (date: DateValue) => boolean
29
+ */
30
+ isDateUnavailable?: (date: DateValue) => boolean;
31
+ /** Sets the default open state of the overlay (uncontrolled). */
32
+ isDefaultOpen?: boolean;
33
+ /** Whether the calendar is disabled. */
34
+ isDisabled?: boolean;
35
+ /** Whether the overlay is currently open (controlled). */
36
+ isOpen?: boolean;
37
+ /** Whether the calendar dates are only focusable. */
38
+ isReadOnly?: boolean;
39
+ /** Whether user input is required on the input before form submission. */
40
+ isRequired?: boolean;
41
+ /** The rendered label for the field. */
42
+ label?: React.ReactNode;
43
+ /** The maximum allowed date that a user may select. */
44
+ maxValue?: DateValue | string;
45
+ /** The minimum allowed date that a user may select. */
46
+ minValue?: DateValue | string;
47
+ /** Handler that is called when the element loses focus. */
48
+ onBlur?: () => void;
49
+ /** Handler that is called when the element's selection state changes. */
50
+ onChange?: (value: MappedDateValue<DateValue>) => void;
51
+ /** Handler that is called when the element receives focus. */
52
+ onFocus?: () => void;
53
+ /** Handler that is called when the element's focus status changes. */
54
+ onFocusChange?: (date: CalendarDate) => void;
55
+ /** Handler that is called when a key is pressed. */
56
+ onKeyDown?: (e: KeyboardEvent) => void;
57
+ /** Handler that is called when a key is released. */
58
+ onKeyUp?: (e: KeyboardEvent) => void;
59
+ /** Determines the textarea status indicator and helper text styling. */
60
+ status?: 'default' | 'error' | 'success' | 'warning';
61
+ /** The ranges of unavailable dates passed */
62
+ unavailableRanges?: [string, string][];
63
+ /** Props object that spread into date segment wrapper element. */
64
+ fieldControlProps?: BoxProps;
65
+ /** Props object that spread into calendar element. */
66
+ calendarWrapperProps?: BoxProps;
67
+ }
68
+ export interface DateFieldProps extends DatePickerProps {
69
+ /** Additional CSS class name(s) applied to the outermost element. */
70
+ className?: string;
71
+ /** Props object that is spread directly into the calendar button element. */
72
+ buttonProps?: AriaButtonProps;
73
+ /** Props object that is spread directly into the root (top-level) element. */
74
+ containerProps?: BoxProps;
75
+ /** State management for a date picker component. */
76
+ datePickerState?: DatePickerState;
77
+ /** @ignore Props object that is spread directly into the segmented date field. */
78
+ fieldProps?: object;
79
+ /** @ignore Props passed to the box surrounding the input, button, and helper text. */
80
+ groupProps?: BoxProps;
81
+ /** @ignore Ref which is passed to the role="group" element. */
82
+ groupRef?: React.RefObject<HTMLElement>;
83
+ /** Props object that is spread directly into the label element. */
84
+ labelProps?: object;
85
+ /** Props object that is spread directly into the input wrapper element. */
86
+ wrapperProps?: BoxProps;
87
+ /** Whether the field is quiet. */
88
+ isQuiet?: boolean;
89
+ }
90
+ export interface DateSegmentProps {
91
+ /** Slot for input that indicates each date segment. */
92
+ segment: DateSegment;
93
+ /** State returned by useDateField. */
94
+ state: DateFieldState;
95
+ /** An array of segments. */
96
+ segments: DateSegment[];
97
+ /** Index value of each segment. */
98
+ segmentIndex: number;
99
+ /**
100
+ * Handler that is called when a paste event is called.
101
+ * (e: React.ClipboardEvent) => void
102
+ */
103
+ handlePaste: (e: React.ClipboardEvent) => void;
104
+ /** Checks if the current locale is en-US. */
105
+ isLocalEnUS: boolean;
106
+ /** Whether the segment is disabled. */
107
+ isDisabled?: boolean;
108
+ /** Whether the segment is read-only. */
109
+ isReadOnly?: boolean;
110
+ /** Whether the segment is required. */
111
+ isRequired?: boolean;
112
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
@@ -0,0 +1,31 @@
1
+ import React from 'react';
2
+ import { UseFieldProps } from '../hooks/useField/useField';
3
+ import { PopoverMenuProps } from './popoverMenu';
4
+ export interface ImageUploadFieldProps extends Omit<UseFieldProps<HTMLInputElement>, 'onChange' | 'helperText'> {
5
+ /** The URL or path of the currently uploaded image preview. */
6
+ previewImage?: string;
7
+ /** Text for the upload item in the menu. */
8
+ uploadItemText?: string;
9
+ /** Text for the remove item in the menu. */
10
+ removeItemText?: string;
11
+ /** The default image to display when no preview image is provided. */
12
+ defaultPreviewImage?: string | React.ReactNode;
13
+ /** Array of accepted file MIME types or type prefixes (e.g. 'image', 'image/jpeg'). */
14
+ fileTypes?: string[];
15
+ /** Whether the component is in a loading state. */
16
+ isLoading?: boolean;
17
+ /** Size of the loader spinner. */
18
+ loaderSize?: string | number;
19
+ /** Handler called when the uploaded image is removed. */
20
+ onRemove?: () => void;
21
+ /** Props passed directly to the PopoverMenu component. */
22
+ popoverMenuProps?: Partial<PopoverMenuProps>;
23
+ /** Height of the preview image area. */
24
+ previewHeight?: number;
25
+ /** Width of the preview image area. */
26
+ previewWidth?: number;
27
+ /** Handler called when the input value changes. */
28
+ onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
29
+ /** Helper text rendered below the input. */
30
+ helperText?: React.ReactNode;
31
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
4
+ _Object$defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
@@ -15,6 +15,7 @@ export * from './collapsiblePanel';
15
15
  export * from './colorField';
16
16
  export * from './copyText';
17
17
  export * from './dataTable';
18
+ export * from './datePicker';
18
19
  export * from './environmentBreadcrumb';
19
20
  export * from './expandableText';
20
21
  export * from './fieldHelperText';
@@ -26,6 +27,7 @@ export * from './iconBadge';
26
27
  export * from './iconButton';
27
28
  export * from './iconButtonToggle';
28
29
  export * from './iconWrapper';
30
+ export * from './imageUploadField';
29
31
  export * from './input';
30
32
  export * from './item';
31
33
  export * from './label';