1mpacto-react-ui 2.0.6 → 2.0.7

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.
@@ -1,7 +1,7 @@
1
1
  declare const _default: {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "2.0.6",
4
+ "version": "2.0.7",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=20.19.4",
@@ -32,7 +32,7 @@ export declare const configButton: {
32
32
  variants: {
33
33
  'primary-laba-blue-10': string;
34
34
  'primary-red-700-dsb_laba-grey-06': string;
35
- 'primary-green-700': string;
35
+ 'primary-green-700-dsb_laba-grey-06': string;
36
36
  'ghost-laba-blue-10': string;
37
37
  'ghost-red-700': string;
38
38
  'ghost-green-700': string;
@@ -32,7 +32,7 @@ export declare const configButton: {
32
32
  variants: {
33
33
  'primary-laba-blue-10': string;
34
34
  'primary-red-700-dsb_laba-grey-06': string;
35
- 'primary-green-700': string;
35
+ 'primary-green-700-dsb_laba-grey-06': string;
36
36
  'filled-laba-white_laba-blue-10': string;
37
37
  'filled-laba-white_laba-red-05': string;
38
38
  'ghost-laba-blue-10': string;
@@ -1,3 +1,4 @@
1
+ import { InputAttributes } from 'react-number-format';
1
2
  import { INumberFormat } from '../../interfaces/components/NumberFormat';
2
- declare const NumberFormat: ({ max, min, selectedText, onChange, onFocusInput, ...otherProps }: INumberFormat) => import("react/jsx-runtime").JSX.Element;
3
+ declare const NumberFormat: <BaseType = InputAttributes>({ max, min, selectedText, onChange, onFocusInput, ...otherProps }: INumberFormat<BaseType>) => import("react/jsx-runtime").JSX.Element;
3
4
  export default NumberFormat;
@@ -1,7 +1,7 @@
1
1
  import { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
3
  title: string;
4
- component: ({ max, min, selectedText, onChange, onFocusInput, ...otherProps }: import('../../interfaces/components/NumberFormat').INumberFormat) => import("react/jsx-runtime").JSX.Element;
4
+ component: <BaseType = import('react-number-format').InputAttributes>({ max, min, selectedText, onChange, onFocusInput, ...otherProps }: import('../../interfaces/components/NumberFormat').INumberFormat<BaseType>) => import("react/jsx-runtime").JSX.Element;
5
5
  parameters: {
6
6
  layout: string;
7
7
  };
@@ -394,7 +394,26 @@ declare const meta: {
394
394
  args: {
395
395
  onChange: import('@vitest/spy').Mock<(...args: any[]) => any>;
396
396
  };
397
- render: (args: import('../../interfaces/components/NumberFormat').INumberFormat) => import("react/jsx-runtime").JSX.Element;
397
+ render: (args: import('react-number-format/types/types').InternalNumberFormatBase & {
398
+ thousandSeparator?: boolean | string;
399
+ decimalSeparator?: string;
400
+ allowedDecimalSeparators?: Array<string>;
401
+ thousandsGroupStyle?: "thousand" | "lakh" | "wan" | "none";
402
+ decimalScale?: number;
403
+ fixedDecimalScale?: boolean;
404
+ allowNegative?: boolean;
405
+ allowLeadingZeros?: boolean;
406
+ suffix?: string;
407
+ prefix?: string;
408
+ } & Omit<import('react-number-format').InputAttributes, never> & Omit<unknown, "type" | "value" | "defaultValue" | "onChange" | "onFocus" | "onBlur" | "onKeyDown" | "ref" | "prefix" | "inputMode" | "onMouseUp" | "displayType" | "renderText" | "getInputRef" | "valueIsNumericString" | "onValueChange" | "isAllowed" | "thousandSeparator" | "decimalSeparator" | "allowedDecimalSeparators" | "thousandsGroupStyle" | "decimalScale" | "fixedDecimalScale" | "allowNegative" | "allowLeadingZeros" | "suffix"> & {
409
+ customInput?: import('react').ComponentType<unknown> | undefined;
410
+ } & {
411
+ [key: string]: unknown;
412
+ max?: import('../../..').TBigNumber | undefined;
413
+ min?: import('../../..').TBigNumber | undefined;
414
+ selectedText?: string;
415
+ onFocusInput?: (value: string) => void;
416
+ }) => import("react/jsx-runtime").JSX.Element;
398
417
  };
399
418
  export default meta;
400
419
  type Story = StoryObj<typeof meta>;
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  * [ID] : Tipe varian tombol yang tersedia.
4
4
  * [EN] : Available button variant types.
5
5
  */
6
- export type TButtonVariants = 'primary-laba-blue-10' | 'primary-red-700-dsb_laba-grey-06' | 'primary-green-700' | 'ghost-laba-blue-10' | 'ghost-red-700' | 'ghost-green-700' | 'ghost-blue-gray-100-bg_white' | 'ghost-laba-green-10' | 'ghost-blue-gray-100-bg_white-text_blue-gray-400' | 'ghost-laba-blue-05' | 'nude-laba-blue-10' | 'nude-red-700' | 'nude-green-700' | 'nude-gray-500' | 'nude-laba-red-10' | 'nude-laba-red-08' | 'nude-laba-red-05' | 'primary-blue-700' | 'primary-red-700' | 'secondary-blue-700' | 'secondary-red-600' | 'secondary-green-600' | 'tertiary-blue-700' | 'tertiary-red-300' | 'tertiary-red-600' | 'tertiary-gray-500' | 'ghost-laba-blue-01' | 'filled-laba-white_laba-blue-10' | 'filled-laba-white_laba-red-05' | 'secondary-red-700' | 'tertiary-black' | 'primary-bill-primary-600' | 'secondary-bill-secondary-800' | 'tertiary-bill-secondary-800' | 'primary-bill-red-700' | 'filled-bill-blue-gray-500_bg-blue-gray-50' | 'filled-bill-secondary-800_bg-white';
6
+ export type TButtonVariants = 'primary-laba-blue-10' | 'primary-red-700-dsb_laba-grey-06' | 'primary-green-700-dsb_laba-grey-06' | 'ghost-laba-blue-10' | 'ghost-red-700' | 'ghost-green-700' | 'ghost-blue-gray-100-bg_white' | 'ghost-laba-green-10' | 'ghost-blue-gray-100-bg_white-text_blue-gray-400' | 'ghost-laba-blue-05' | 'nude-laba-blue-10' | 'nude-red-700' | 'nude-green-700' | 'nude-gray-500' | 'nude-laba-red-10' | 'nude-laba-red-08' | 'nude-laba-red-05' | 'primary-blue-700' | 'primary-red-700' | 'secondary-blue-700' | 'secondary-red-600' | 'secondary-green-600' | 'tertiary-blue-700' | 'tertiary-red-300' | 'tertiary-red-600' | 'tertiary-gray-500' | 'ghost-laba-blue-01' | 'filled-laba-white_laba-blue-10' | 'filled-laba-white_laba-red-05' | 'secondary-red-700' | 'tertiary-black' | 'primary-bill-primary-600' | 'secondary-bill-secondary-800' | 'tertiary-bill-secondary-800' | 'primary-bill-red-700' | 'filled-bill-blue-gray-500_bg-blue-gray-50' | 'filled-bill-secondary-800_bg-white';
7
7
  /**
8
8
  * [ID] : Tipe ukuran tombol.
9
9
  * [EN] : Button size type.
@@ -3,7 +3,7 @@ import { ReactNode } from 'react';
3
3
  * [ID] : Tipe varian tombol ikon.
4
4
  * [EN] : Button icon variant types.
5
5
  */
6
- export type TButtonIcomVariants = 'primary-laba-blue-10' | 'primary-red-700-dsb_laba-grey-06' | 'primary-green-700' | 'filled-laba-white_laba-blue-10' | 'filled-laba-white_laba-red-05' | 'ghost-laba-blue-10' | 'ghost-red-700' | 'ghost-green-700' | 'ghost-blue-gray-100-bg_white' | 'ghost-laba-green-10' | 'nude-laba-blue-10' | 'nude-red-700' | 'nude-green-700' | 'nude-gray-500' | 'nude-laba-red-10' | 'nude-laba-red-05' | 'primary-blue-700' | 'primary-red-700' | 'secondary-blue-700' | 'secondary-red-600' | 'secondary-green-600' | 'tertiary-blue-700' | 'tertiary-red-300' | 'tertiary-red-600' | 'tertiary-gray-500' | 'secondary-red-700' | 'primary-bill-primary-600' | 'secondary-bill-secondary-800' | 'tertiary-bill-secondary-800' | 'primary-bill-red-700';
6
+ export type TButtonIcomVariants = 'primary-laba-blue-10' | 'primary-red-700-dsb_laba-grey-06' | 'primary-green-700-dsb_laba-grey-06' | 'filled-laba-white_laba-blue-10' | 'filled-laba-white_laba-red-05' | 'ghost-laba-blue-10' | 'ghost-red-700' | 'ghost-green-700' | 'ghost-blue-gray-100-bg_white' | 'ghost-laba-green-10' | 'nude-laba-blue-10' | 'nude-red-700' | 'nude-green-700' | 'nude-gray-500' | 'nude-laba-red-10' | 'nude-laba-red-05' | 'primary-blue-700' | 'primary-red-700' | 'secondary-blue-700' | 'secondary-red-600' | 'secondary-green-600' | 'tertiary-blue-700' | 'tertiary-red-300' | 'tertiary-red-600' | 'tertiary-gray-500' | 'secondary-red-700' | 'primary-bill-primary-600' | 'secondary-bill-secondary-800' | 'tertiary-bill-secondary-800' | 'primary-bill-red-700';
7
7
  /**
8
8
  * [ID] : Tipe ukuran tombol ikon.
9
9
  * [EN] : Button icon size type.
@@ -1,19 +1,20 @@
1
- import { NumericFormatProps } from 'react-number-format';
1
+ import { InputAttributes, NumericFormatProps } from 'react-number-format';
2
+ import { TBigNumber } from '../../../config/bigNumber';
2
3
  /**
3
4
  * [ID] : Interface untuk komponen NumberFormat.
4
5
  * [EN] : Interface for NumberFormat component.
5
6
  */
6
- export interface INumberFormat extends NumericFormatProps {
7
+ export type INumberFormat<BaseType = InputAttributes> = NumericFormatProps<BaseType> & {
7
8
  /**
8
9
  * [ID] : Nilai maksimum (opsional).
9
10
  * [EN] : Maximum value (optional).
10
11
  */
11
- max?: number | undefined;
12
+ max?: TBigNumber | undefined;
12
13
  /**
13
14
  * [ID] : Nilai minimum (opsional).
14
15
  * [EN] : Minimum value (optional).
15
16
  */
16
- min?: number | undefined;
17
+ min?: TBigNumber | undefined;
17
18
  /**
18
19
  * [ID] : Properti dinamis lainnya.
19
20
  * [EN] : Other dynamic properties.
@@ -30,4 +31,4 @@ export interface INumberFormat extends NumericFormatProps {
30
31
  * @param value - [ID] : Nilai input. [EN] : Input value.
31
32
  */
32
33
  onFocusInput?: (value: string) => void;
33
- }
34
+ };
@@ -4,8 +4,10 @@ import { TBigNumber, TypeBigNumber } from '../config/bigNumber';
4
4
  export declare const isAccurateBigNumber: (value: unknown) => boolean;
5
5
  export declare const isAccurateNumber: (value: unknown) => boolean;
6
6
  export declare function parseBigDecimal<T extends {
7
- decimals?: number;
7
+ minimumFractionDigits?: number;
8
+ maximumFractionDigits?: number;
8
9
  instance?: boolean;
10
+ ignoreFractionLimit?: boolean;
9
11
  }>(value: number | string, options?: T): T['instance'] extends true ? TypeBigNumber : string;
10
12
  export declare const parseDecimal: (value: number | string, decimals?: number) => number;
11
13
  export declare function formatNumber(number: number, style?: 'currency' | 'decimal', options?: {
@@ -55,6 +57,10 @@ export declare function transformSecondTime(secs: number, option?: {
55
57
  export declare function mergeObjects<T>(target: T, ...sources: unknown[]): T;
56
58
  export declare function deleteKeysMutable<T = Record<string | number, unknown>>(obj: T, paths: string | string[]): T;
57
59
  export declare function deleteKeysImmutable<T = Record<string | number, unknown>>(obj: T, paths: string | string[]): T;
60
+ export declare function deepMerge<T, S>(target: T, source: S, options?: {
61
+ keepKeys?: string[];
62
+ arrayMergeStrategy?: 'combine' | 'overwrite' | 'sync';
63
+ }): T & S;
58
64
  export declare const transformNumber: (val: string) => number;
59
65
  export declare const transformBigNumber: (val: TBigNumber) => string;
60
66
  export declare const transfromIsNan: (value: number) => number | undefined;
@@ -5,6 +5,7 @@ interface FormatCurrencyOptions {
5
5
  maximumFractionDigits?: number;
6
6
  withSpace?: boolean;
7
7
  currencyDisplay?: 'symbol' | 'code' | 'name';
8
+ ignoreFractionLimit?: boolean;
8
9
  }
9
10
  export declare function formatBigNumber(number: number | string, options?: FormatCurrencyOptions): string;
10
11
  export declare function removeTrailingZeros(value: string | number): string;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "1mpacto-react-ui",
3
3
  "private": false,
4
- "version": "2.0.6",
4
+ "version": "2.0.7",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=20.19.4",