@ssa-ui-kit/core 2.17.1 → 2.17.2

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.
@@ -18,8 +18,12 @@ export type DateRangePickerProps = {
18
18
  dateMin?: string;
19
19
  dateMax?: string;
20
20
  disabled?: boolean;
21
- helperText?: string;
22
21
  showCalendarIcon?: boolean;
22
+ messages?: {
23
+ description?: string;
24
+ success?: string;
25
+ error?: string;
26
+ };
23
27
  classNames?: {
24
28
  trigger?: {
25
29
  root?: string;
package/dist/index.js CHANGED
@@ -13071,7 +13071,8 @@ const DatePickerCalendar = () => {
13071
13071
  paddingTop: 16,
13072
13072
  width: 346,
13073
13073
  height: 370,
13074
- alignItems: 'flex-start'
13074
+ alignItems: 'flex-start',
13075
+ zIndex: 100
13075
13076
  }, true ? "" : 0, true ? "" : 0),
13076
13077
  children: [(0,jsx_runtime_namespaceObject.jsx)(DatePickerHeader, {}), (0,jsx_runtime_namespaceObject.jsx)(PopoverDescription, {
13077
13078
  as: "div",
@@ -14028,7 +14029,8 @@ const Calendar_DatePickerCalendar = () => {
14028
14029
  width: 346,
14029
14030
  height: 370,
14030
14031
  alignItems: 'flex-start',
14031
- margin: '14px 0 0 -14px'
14032
+ margin: '14px 0 0 -14px',
14033
+ zIndex: 100
14032
14034
  }, true ? "" : 0, true ? "" : 0),
14033
14035
  children: [(0,jsx_runtime_namespaceObject.jsx)(Header_Header, {}), (0,jsx_runtime_namespaceObject.jsx)(PopoverDescription, {
14034
14036
  as: "div",
@@ -14176,6 +14178,7 @@ const FieldDescription = ({
14176
14178
  }
14177
14179
  return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
14178
14180
  status: "basic",
14181
+ "data-testid": "field-description",
14179
14182
  children: children
14180
14183
  });
14181
14184
  };
@@ -14209,6 +14212,7 @@ const FieldSuccess = ({
14209
14212
  }
14210
14213
  return (0,jsx_runtime_namespaceObject.jsx)(FormHelperText_FormHelperText, {
14211
14214
  status: "success",
14215
+ "data-testid": "field-success",
14212
14216
  children: children
14213
14217
  });
14214
14218
  };
@@ -14247,7 +14251,7 @@ const TriggerInput = ({
14247
14251
  inputToRef,
14248
14252
  inputProps,
14249
14253
  disabled,
14250
- helperText,
14254
+ messages,
14251
14255
  setLastFocusedElement,
14252
14256
  classNames,
14253
14257
  onBlur: handleBlur
@@ -14301,7 +14305,7 @@ const TriggerInput = ({
14301
14305
  showStatusIcon: false,
14302
14306
  errors: fieldError,
14303
14307
  status: fieldStatus,
14304
- helperText: helperText,
14308
+ helperText: fieldStatus === 'basic' ? messages?.description : messages?.error,
14305
14309
  helperClassName: /*#__PURE__*/(0,css_namespaceObject.css)( true ? {
14306
14310
  name: "lhoo11",
14307
14311
  styles: "&>span::first-letter{text-transform:uppercase;}"
@@ -14338,7 +14342,7 @@ const Trigger = () => {
14338
14342
  lastFocusedElement,
14339
14343
  disabled,
14340
14344
  status,
14341
- helperText,
14345
+ messages,
14342
14346
  openCalendarMode,
14343
14347
  isOpen,
14344
14348
  showCalendarIcon,
@@ -14420,15 +14424,15 @@ const Trigger = () => {
14420
14424
  }, true ? "" : 0, true ? "" : 0)
14421
14425
  })]
14422
14426
  })
14423
- }), (0,jsx_runtime_namespaceObject.jsx)(FieldDescription, {
14424
- children: helperText
14425
- }), (0,jsx_runtime_namespaceObject.jsx)(FieldError, {
14426
- children: errorMessage ? errorMessage.map((error, index) => (0,jsx_runtime_namespaceObject.jsx)("span", {
14427
+ }), messages?.description && (0,jsx_runtime_namespaceObject.jsx)(FieldDescription, {
14428
+ children: messages?.description
14429
+ }), (errorMessage.length || messages?.error) && (0,jsx_runtime_namespaceObject.jsx)(FieldError, {
14430
+ children: errorMessage.length ? errorMessage.map((error, index) => (0,jsx_runtime_namespaceObject.jsx)("span", {
14427
14431
  css: Trigger_ref2,
14428
14432
  children: error
14429
- }, `error-${index}`)) : helperText
14430
- }), (0,jsx_runtime_namespaceObject.jsx)(FieldSuccess, {
14431
- children: helperText
14433
+ }, `error-${index}`)) : messages?.error
14434
+ }), messages?.success && (0,jsx_runtime_namespaceObject.jsx)(FieldSuccess, {
14435
+ children: messages?.success
14432
14436
  })]
14433
14437
  });
14434
14438
  };