@hitachivantara/uikit-react-core 5.47.0 → 5.47.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.
Files changed (44) hide show
  1. package/dist/cjs/ColorPicker/ColorPicker.cjs +3 -3
  2. package/dist/cjs/ColorPicker/ColorPicker.cjs.map +1 -1
  3. package/dist/cjs/DatePicker/DatePicker.cjs +5 -1
  4. package/dist/cjs/DatePicker/DatePicker.cjs.map +1 -1
  5. package/dist/cjs/DropDownMenu/DropDownMenu.cjs +2 -1
  6. package/dist/cjs/DropDownMenu/DropDownMenu.cjs.map +1 -1
  7. package/dist/cjs/Dropdown/Dropdown.cjs +6 -0
  8. package/dist/cjs/Dropdown/Dropdown.cjs.map +1 -1
  9. package/dist/cjs/Dropdown/List/List.cjs.map +1 -1
  10. package/dist/cjs/Dropdown/utils.cjs.map +1 -1
  11. package/dist/cjs/FilterGroup/FilterContent/FilterContent.cjs.map +1 -1
  12. package/dist/cjs/FilterGroup/FilterGroup.cjs +7 -0
  13. package/dist/cjs/FilterGroup/FilterGroup.cjs.map +1 -1
  14. package/dist/cjs/Input/Input.cjs +5 -0
  15. package/dist/cjs/Input/Input.cjs.map +1 -1
  16. package/dist/cjs/Kpi/Kpi.cjs +12 -8
  17. package/dist/cjs/Kpi/Kpi.cjs.map +1 -1
  18. package/dist/cjs/Pagination/Pagination.cjs +14 -1
  19. package/dist/cjs/Pagination/Pagination.cjs.map +1 -1
  20. package/dist/cjs/hooks/useLabels.cjs +1 -4
  21. package/dist/cjs/hooks/useLabels.cjs.map +1 -1
  22. package/dist/esm/ColorPicker/ColorPicker.js +3 -3
  23. package/dist/esm/ColorPicker/ColorPicker.js.map +1 -1
  24. package/dist/esm/DatePicker/DatePicker.js +5 -1
  25. package/dist/esm/DatePicker/DatePicker.js.map +1 -1
  26. package/dist/esm/DropDownMenu/DropDownMenu.js +2 -1
  27. package/dist/esm/DropDownMenu/DropDownMenu.js.map +1 -1
  28. package/dist/esm/Dropdown/Dropdown.js +6 -0
  29. package/dist/esm/Dropdown/Dropdown.js.map +1 -1
  30. package/dist/esm/Dropdown/List/List.js.map +1 -1
  31. package/dist/esm/Dropdown/utils.js.map +1 -1
  32. package/dist/esm/FilterGroup/FilterContent/FilterContent.js.map +1 -1
  33. package/dist/esm/FilterGroup/FilterGroup.js +7 -0
  34. package/dist/esm/FilterGroup/FilterGroup.js.map +1 -1
  35. package/dist/esm/Input/Input.js +5 -0
  36. package/dist/esm/Input/Input.js.map +1 -1
  37. package/dist/esm/Kpi/Kpi.js +12 -8
  38. package/dist/esm/Kpi/Kpi.js.map +1 -1
  39. package/dist/esm/Pagination/Pagination.js +14 -1
  40. package/dist/esm/Pagination/Pagination.js.map +1 -1
  41. package/dist/esm/hooks/useLabels.js +2 -3
  42. package/dist/esm/hooks/useLabels.js.map +1 -1
  43. package/dist/types/index.d.ts +121 -127
  44. package/package.json +2 -2
@@ -644,6 +644,107 @@ export declare type DeepPartial<T> = T extends Object ? Partial<{
644
644
  [P in keyof T]: DeepPartial<T[P]>;
645
645
  }> : T;
646
646
 
647
+ declare const DEFAULT_LABELS: {
648
+ /** The show label. */
649
+ pageSizePrev: string;
650
+ /** Indicate the units of the page size selection. */
651
+ pageSizeEntryName: string;
652
+ /** Used for the aria-label of the selection of number of unit.s */
653
+ pageSizeSelectorDescription: string;
654
+ /** Separator of current page and total pages. */
655
+ pagesSeparator: string;
656
+ /** Title of button `firstPage`. @deprecated Use `firstPage` instead. */
657
+ paginationFirstPageTitle: string;
658
+ /** Title of button `previousPage`. @deprecated Use `previousPage` instead. */
659
+ paginationPreviousPageTitle: string;
660
+ /** Title of button `nextPage`. @deprecated Use `nextPage` instead. */
661
+ paginationNextPageTitle: string;
662
+ /** Title of button `lastPage`. @deprecated Use `lastPage` instead. */
663
+ paginationLastPageTitle: string;
664
+ /** Aria-label passed to the page input. */
665
+ paginationInputLabel: string;
666
+ /** Label of the first page button */
667
+ firstPage: string;
668
+ /** Label of the previous page button */
669
+ previousPage: string;
670
+ /** Label of the next page button */
671
+ nextPage: string;
672
+ /** Label of the last page button */
673
+ lastPage: string;
674
+ };
675
+
676
+ declare const DEFAULT_LABELS_2: {
677
+ /** The label of the clear button. */
678
+ clearButtonLabel: string;
679
+ /** The label of the reveal password button. */
680
+ revealPasswordButtonLabel: string;
681
+ /** The tooltip of the reveal password button when the password is hidden. */
682
+ revealPasswordButtonClickToShowTooltip: string;
683
+ /** The tooltip of the reveal password button when the password is revealed. */
684
+ revealPasswordButtonClickToHideTooltip: string;
685
+ /** The label of the search button. */
686
+ searchButtonLabel: string;
687
+ };
688
+
689
+ declare const DEFAULT_LABELS_3: {
690
+ recommendedColorsLabel: string;
691
+ customColorsLabel: string;
692
+ };
693
+
694
+ declare const DEFAULT_LABELS_4: {
695
+ /** Label for overwrite the default header behavior. */
696
+ select: string | undefined;
697
+ /** Label used for the All checkbox action. */
698
+ selectAll: string;
699
+ /** Cancel button label. */
700
+ cancelLabel: string;
701
+ /** Apply button label. */
702
+ applyLabel: string;
703
+ /** The label used in the middle of the multiSelection count. */
704
+ searchPlaceholder: string;
705
+ /** The label used in search. */
706
+ multiSelectionConjunction: string;
707
+ };
708
+
709
+ declare const DEFAULT_LABELS_5: {
710
+ /** Apply button label. */
711
+ applyLabel: string;
712
+ /** Cancel button label. */
713
+ cancelLabel: string;
714
+ /** Clear button label. */
715
+ clearLabel: string;
716
+ /** Invalid Date label. */
717
+ invalidDateLabel: string;
718
+ };
719
+
720
+ declare const DEFAULT_LABELS_6: {
721
+ /** Apply button label. */
722
+ applyLabel: string;
723
+ /** Cancel button label. */
724
+ cancelLabel: string;
725
+ /** Clear button label. */
726
+ clearLabel: string;
727
+ /** Placeholder label. */
728
+ placeholder: string;
729
+ /** SearchBox placeholder label. */
730
+ searchBoxPlaceholder: string;
731
+ /** Select All placeholder label. */
732
+ selectAll: string;
733
+ /** Multi selection conjunction placeholder label. */
734
+ multiSelectionConjunction: string;
735
+ };
736
+
737
+ declare const DEFAULT_LABELS_7: {
738
+ /** The text at the top of the kpi. */
739
+ title: string;
740
+ /** The text in the middle of the kpi. */
741
+ indicator: string | undefined;
742
+ /** The text to the right of the indicator. */
743
+ unit: string | undefined;
744
+ /** The text to the right of the visual comparison. */
745
+ comparisonIndicatorInfo: string | undefined;
746
+ };
747
+
647
748
  declare type DefaultAttributes = (typeof defaultAttributes)[number];
648
749
 
649
750
  declare const defaultAttributes: readonly ["boolean", "numeric", "dateandtime", "text", "textarea"];
@@ -2457,10 +2558,7 @@ export declare interface HvColorPickerProps {
2457
2558
  /** If `true`, the labels are shown. If `false`, they are not shown. */
2458
2559
  showLabels?: boolean;
2459
2560
  /** An object containing all the labels. */
2460
- labels?: {
2461
- recommendedColorsLabel?: string;
2462
- customColorsLabel?: string;
2463
- };
2561
+ labels?: Partial<typeof DEFAULT_LABELS_3>;
2464
2562
  /** Icon type for the input's end adornment. */
2465
2563
  dropdownIcon?: "arrow" | "colorPicker";
2466
2564
  /** If `true`, the input only shows an icon. If `false`, the input shows text and icons. */
@@ -2667,24 +2765,7 @@ export declare interface HvDatePickerProps extends Omit<HvFormElementProps, "onC
2667
2765
  /**
2668
2766
  * An object containing all the labels for the datepicker.
2669
2767
  */
2670
- labels?: {
2671
- /**
2672
- * Apply button label.
2673
- */
2674
- applyLabel?: string;
2675
- /**
2676
- * Cancel button label.
2677
- */
2678
- cancelLabel?: string;
2679
- /**
2680
- * Clear button label.
2681
- */
2682
- clearLabel?: string;
2683
- /**
2684
- * Invalid Date label.
2685
- */
2686
- invalidDateLabel?: string;
2687
- };
2768
+ labels?: Partial<typeof DEFAULT_LABELS_5>;
2688
2769
  /**
2689
2770
  * The initial value of the input when in single calendar mode.
2690
2771
  */
@@ -2944,32 +3025,10 @@ export declare interface HvDropdownColumnCellProp {
2944
3025
  dropdownProps?: HvDropdownProps;
2945
3026
  }
2946
3027
 
2947
- export declare interface HvDropdownLabelsProps {
2948
- /**
2949
- * Label for overwrite the default header behavior.
2950
- */
2951
- select?: string;
2952
- /**
2953
- * Label used for the All checkbox action.
2954
- */
2955
- selectAll?: string;
2956
- /**
2957
- * Cancel button label.
2958
- */
2959
- cancelLabel?: string;
2960
- /**
2961
- * Apply button label.
2962
- */
2963
- applyLabel?: string;
2964
- /**
2965
- * The label used in the middle of the multiSelection count.
2966
- */
2967
- multiSelectionConjunction?: string;
2968
- /**
2969
- * The label used in search.
2970
- */
2971
- searchPlaceholder?: string;
2972
- }
3028
+ export declare type HvDropdownLabels = Partial<typeof DEFAULT_LABELS_4>;
3029
+
3030
+ /** @deprecated use `HvDropdownLabels` instead */
3031
+ export declare type HvDropdownLabelsProps = HvDropdownLabels;
2973
3032
 
2974
3033
  declare type HvDropdownListClasses = ExtractNames<typeof useClasses_55>;
2975
3034
 
@@ -3014,7 +3073,7 @@ declare interface HvDropdownListProps {
3014
3073
  /**
3015
3074
  * An object containing all the labels for the dropdown.
3016
3075
  */
3017
- labels?: HvDropdownLabelsProps;
3076
+ labels?: HvDropdownLabels;
3018
3077
  /**
3019
3078
  * If 'true' the dropdown will notify on the first render.
3020
3079
  */
@@ -3077,8 +3136,13 @@ export declare interface HvDropDownMenuProps extends HvBaseProps<HTMLDivElement,
3077
3136
  expanded?: boolean;
3078
3137
  /** When uncontrolled, defines the initial expanded state. */
3079
3138
  defaultExpanded?: boolean;
3080
- /** The variant to be used in the header. */
3139
+ /**
3140
+ * The variant to be used in the header.
3141
+ * @deprecated Use `variant` instead
3142
+ */
3081
3143
  category?: HvButtonVariant;
3144
+ /** The variant to be used in the header. */
3145
+ variant?: HvButtonVariant;
3082
3146
  /** A Jss Object used to override or extend the styles applied to the component. */
3083
3147
  classes?: HvDropDownMenuClasses;
3084
3148
  }
@@ -3171,7 +3235,7 @@ export declare interface HvDropdownProps extends HvBaseProps<HTMLDivElement, "on
3171
3235
  /**
3172
3236
  * An object containing all the labels for the dropdown.
3173
3237
  */
3174
- labels?: HvDropdownLabelsProps;
3238
+ labels?: HvDropdownLabels;
3175
3239
  /**
3176
3240
  * If `true` the dropdown will show tooltips when user mouseenter text in list
3177
3241
  */
@@ -3507,22 +3571,7 @@ export declare type HvFilterGroupFilters = {
3507
3571
 
3508
3572
  export declare type HvFilterGroupHorizontalPlacement = "left" | "right";
3509
3573
 
3510
- export declare interface HvFilterGroupLabels {
3511
- /** Apply button label. */
3512
- applyLabel?: string;
3513
- /** Cancel button label. */
3514
- cancelLabel?: string;
3515
- /** Cancel button label. */
3516
- clearLabel?: string;
3517
- /** Placeholder label. */
3518
- placeholder?: string;
3519
- /** SearchBox placeholder label. */
3520
- searchBoxPlaceholder?: string;
3521
- /** Select All placeholder label. */
3522
- selectAll?: string;
3523
- /** Multi selection conjunction placeholder label. */
3524
- multiSelectionConjunction?: string;
3525
- }
3574
+ export declare type HvFilterGroupLabels = Partial<typeof DEFAULT_LABELS_6>;
3526
3575
 
3527
3576
  export declare interface HvFilterGroupProps extends Omit<HvFormElementProps, "classes" | "onChange" | "defaultValue" | "statusMessage"> {
3528
3577
  /** The initial value of the input when in single calendar mode. */
@@ -4069,18 +4118,7 @@ export declare const HvInput: React_2.ForwardRefExoticComponent<HvInputProps & R
4069
4118
 
4070
4119
  export declare type HvInputClasses = ExtractNames<typeof useClasses_42>;
4071
4120
 
4072
- export declare interface HvInputLabels {
4073
- /** The label of the clear button. */
4074
- clearButtonLabel?: string;
4075
- /** The label of the reveal password button. */
4076
- revealPasswordButtonLabel?: string;
4077
- /** The tooltip of the reveal password button when the password is hidden. */
4078
- revealPasswordButtonClickToShowTooltip?: string;
4079
- /** The tooltip of the reveal password button when the password is revealed. */
4080
- revealPasswordButtonClickToHideTooltip?: string;
4081
- /** The label of the search button. */
4082
- searchButtonLabel?: string;
4083
- }
4121
+ export declare type HvInputLabels = Partial<typeof DEFAULT_LABELS_2>;
4084
4122
 
4085
4123
  export declare interface HvInputProps extends HvBaseProps<HTMLElement, "onChange" | "onBlur" | "onFocus" | "onKeyDown" | "color"> {
4086
4124
  /** The form element name. */
@@ -4146,7 +4184,7 @@ export declare interface HvInputProps extends HvBaseProps<HTMLElement, "onChange
4146
4184
  /** The placeholder value of the input. */
4147
4185
  placeholder?: string;
4148
4186
  /** Internal labels?. */
4149
- labels?: HvInputLabels & HvExtraProps;
4187
+ labels?: HvInputLabels & Record<string, any>;
4150
4188
  /** An Object containing the various texts associated with the input. */
4151
4189
  validationMessages?: HvValidationMessages;
4152
4190
  /** Attributes applied to the input element. */
@@ -4228,24 +4266,7 @@ export declare const HvKpi: (props: HvKpiProps) => JSX_2.Element;
4228
4266
 
4229
4267
  export declare type HvKpiClasses = ExtractNames<typeof useClasses_79>;
4230
4268
 
4231
- export declare interface HvKpiLabelProps {
4232
- /**
4233
- * The text at the top of the kpi.
4234
- */
4235
- title?: string;
4236
- /**
4237
- * The text in the middle of the kpi.
4238
- */
4239
- indicator?: string;
4240
- /**
4241
- * The text to the right of the indicator.
4242
- */
4243
- unit?: string;
4244
- /**
4245
- * The text to the right of the visual comparison.
4246
- */
4247
- comparisonIndicatorInfo?: string;
4248
- }
4269
+ export declare type HvKpiLabelProps = Partial<typeof DEFAULT_LABELS_7>;
4249
4270
 
4250
4271
  export declare interface HvKpiProps extends HvBaseProps<HTMLDivElement, "children"> {
4251
4272
  /**
@@ -4593,34 +4614,7 @@ export declare const HvPagination: (props: HvPaginationProps) => JSX_2.Element;
4593
4614
 
4594
4615
  export declare type HvPaginationClasses = ExtractNames<typeof useClasses_43>;
4595
4616
 
4596
- export declare interface HvPaginationLabels {
4597
- /** The show label. */
4598
- pageSizePrev?: string;
4599
- /** Indicate the units of the page size selection. */
4600
- pageSizeEntryName?: string;
4601
- /** Used for the aria-label of the selection of number of unit.s */
4602
- pageSizeSelectorDescription?: string;
4603
- /** Separator of current page and total pages. */
4604
- pagesSeparator?: string;
4605
- /** Title of button `firstPage`. @deprecated Use `firstPage` instead. */
4606
- paginationFirstPageTitle?: string;
4607
- /** Title of button `previousPage`. @deprecated Use `previousPage` instead. */
4608
- paginationPreviousPageTitle?: string;
4609
- /** Title of button `nextPage`. @deprecated Use `nextPage` instead. */
4610
- paginationNextPageTitle?: string;
4611
- /** Title of button `lastPage`. @deprecated Use `lastPage` instead. */
4612
- paginationLastPageTitle?: string;
4613
- /** Aria-label passed to the page input. */
4614
- paginationInputLabel?: string;
4615
- /** Label of the first page button */
4616
- firstPage?: string;
4617
- /** Label of the previous page button */
4618
- previousPage?: string;
4619
- /** Label of the next page button */
4620
- nextPage?: string;
4621
- /** Label of the last page button */
4622
- lastPage?: string;
4623
- }
4617
+ export declare type HvPaginationLabels = Partial<typeof DEFAULT_LABELS>;
4624
4618
 
4625
4619
  export declare type HvPaginationPropGetter<D extends object> = PropGetter<D, HvTablePaginationProps>;
4626
4620
 
@@ -10747,7 +10741,7 @@ export declare function useInstance(instance: any): void;
10747
10741
 
10748
10742
  export declare const useIsMounted: () => React_2.MutableRefObject<boolean>;
10749
10743
 
10750
- export declare function useLabels<T>(defaultLabels: Partial<T>, labels: T): T;
10744
+ export declare function useLabels<T>(defaultLabels: T, labels?: Partial<T>): T;
10751
10745
 
10752
10746
  export declare type UsePaginationProps = (<D extends object = Record<string, unknown>>(hooks: Hooks<D>) => void) & {
10753
10747
  pluginName: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hitachivantara/uikit-react-core",
3
- "version": "5.47.0",
3
+ "version": "5.47.2",
4
4
  "private": false,
5
5
  "author": "Hitachi Vantara UI Kit Team",
6
6
  "description": "Core React components for the NEXT Design System.",
@@ -63,7 +63,7 @@
63
63
  "access": "public",
64
64
  "directory": "package"
65
65
  },
66
- "gitHead": "429cf3af573487ff551fd5c38ed0ea7d604bcc29",
66
+ "gitHead": "d47ae985a5ccb7c13d43ba47f293523caab14636",
67
67
  "main": "dist/cjs/index.cjs",
68
68
  "exports": {
69
69
  ".": {