@hybr1d-tech/charizard 2.4.0 → 2.4.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.
- package/dist/hybr1d-ui.css +1 -1
- package/dist/hybr1d-ui.js +2587 -2557
- package/dist/index.d.ts +39 -7
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,9 +2,11 @@ import * as accordion from '@zag-js/accordion';
|
|
|
2
2
|
import { ActionMeta } from 'react-select';
|
|
3
3
|
import { ClassNames } from 'react-day-picker';
|
|
4
4
|
import { ColumnPinningState } from '@tanstack/react-table';
|
|
5
|
+
import { CreatableProps } from 'react-select/creatable';
|
|
5
6
|
import { DateRange } from 'react-day-picker';
|
|
6
7
|
import { default as default_2 } from 'react';
|
|
7
8
|
import * as dialog from '@zag-js/dialog';
|
|
9
|
+
import { GroupBase } from 'react-select';
|
|
8
10
|
import { HTMLInputTypeAttribute } from 'react';
|
|
9
11
|
import { Id } from 'react-toastify';
|
|
10
12
|
import { JSX } from 'react/jsx-runtime';
|
|
@@ -356,6 +358,15 @@ export declare const convertToTimestamp: (timeString: string) => number;
|
|
|
356
358
|
|
|
357
359
|
export declare const countRegex: RegExp;
|
|
358
360
|
|
|
361
|
+
/**
|
|
362
|
+
* Creatable-only props from react-select that aren't part of the base Select
|
|
363
|
+
* props (SelectV2Props extends those). The component already spreads
|
|
364
|
+
* `...restProps` into <CreatableSelect>, so these work at runtime — this just
|
|
365
|
+
* makes them type-visible. `onChange` is intentionally not picked: SelectV2Props
|
|
366
|
+
* overrides it with a custom signature and picking the react-select one clashes.
|
|
367
|
+
*/
|
|
368
|
+
declare type CreatableExtraProps = Pick<CreatableProps<any, boolean, GroupBase<any>>, 'allowCreateWhileLoading' | 'createOptionPosition' | 'formatCreateLabel' | 'isValidNewOption' | 'getNewOptionData'>;
|
|
369
|
+
|
|
359
370
|
export declare function CreatableSelect({ options, onChange, name, id, className, placeholder, selectStyles, defaultValue, formatGroupLabel, customContainerStyles, menuPlacement, errorMsg, extraprops, isDisabled, isSearchable, isMulti, isClearable, createNewOption, refetchOptions, }: CreatableSelectProps): JSX.Element;
|
|
360
371
|
|
|
361
372
|
declare interface CreatableSelectProps {
|
|
@@ -463,7 +474,7 @@ declare interface CreatableSelectProps {
|
|
|
463
474
|
*/
|
|
464
475
|
export declare function CreatableSelectV2(props: CreatableSelectV2Props): JSX.Element;
|
|
465
476
|
|
|
466
|
-
export declare interface CreatableSelectV2Props extends SelectV2Props {
|
|
477
|
+
export declare interface CreatableSelectV2Props extends SelectV2Props, CreatableExtraProps {
|
|
467
478
|
onCreateOption: (value: string) => Promise<void> | void;
|
|
468
479
|
}
|
|
469
480
|
|
|
@@ -2421,18 +2432,23 @@ declare type SelectActionMeta_2 = ActionMeta<{
|
|
|
2421
2432
|
value: string;
|
|
2422
2433
|
}>;
|
|
2423
2434
|
|
|
2424
|
-
export declare function SelectAsync({ options, onChange, name, id, className, placeholder, selectStyles, defaultValue, formatGroupLabel, customContainerStyles, menuPlacement, errorMsg, extraProps, isDisabled, isSearchable, isMulti, isClearable, customValue, }: SelectAsyncProps): JSX.Element;
|
|
2435
|
+
export declare function SelectAsync({ options, onChange, name, id, className, mainContainerClassName, placeholder, selectStyles, customStyles, defaultValue, formatGroupLabel, customContainerStyles, menuPlacement, errorMsg, variant, showDivider, extraProps, isDisabled, isSearchable, isMulti, isClearable, customValue, }: SelectAsyncProps): JSX.Element;
|
|
2436
|
+
|
|
2437
|
+
declare type SelectAsyncOption = {
|
|
2438
|
+
label: string;
|
|
2439
|
+
value: string;
|
|
2440
|
+
subLabel?: string;
|
|
2441
|
+
color?: `#${string}`;
|
|
2442
|
+
profileImgUrl?: string | null;
|
|
2443
|
+
icon?: string;
|
|
2444
|
+
};
|
|
2425
2445
|
|
|
2426
2446
|
declare interface SelectAsyncProps {
|
|
2427
2447
|
/**
|
|
2428
2448
|
* The options to be displayed in the select
|
|
2429
2449
|
* should atleast have {label: string, value: string}
|
|
2430
2450
|
*/
|
|
2431
|
-
options: (inputValue: string) => Promise<
|
|
2432
|
-
label: string | '';
|
|
2433
|
-
value: string | '';
|
|
2434
|
-
profileImgUrl?: string | null;
|
|
2435
|
-
}> | void>;
|
|
2451
|
+
options: (inputValue: string) => Promise<SelectAsyncOption[] | void>;
|
|
2436
2452
|
/**
|
|
2437
2453
|
* Handle change events on the select
|
|
2438
2454
|
*/
|
|
@@ -2449,6 +2465,10 @@ declare interface SelectAsyncProps {
|
|
|
2449
2465
|
* The className of the select
|
|
2450
2466
|
*/
|
|
2451
2467
|
className?: string;
|
|
2468
|
+
/**
|
|
2469
|
+
* The className of the main container
|
|
2470
|
+
*/
|
|
2471
|
+
mainContainerClassName?: string;
|
|
2452
2472
|
/**
|
|
2453
2473
|
* The placeholder of the select
|
|
2454
2474
|
*/
|
|
@@ -2469,6 +2489,10 @@ declare interface SelectAsyncProps {
|
|
|
2469
2489
|
* The styles of the select component
|
|
2470
2490
|
*/
|
|
2471
2491
|
selectStyles?: StylesConfig<any>;
|
|
2492
|
+
/**
|
|
2493
|
+
* The SelectV2 styles override alias.
|
|
2494
|
+
*/
|
|
2495
|
+
customStyles?: StylesConfig<any>;
|
|
2472
2496
|
/**
|
|
2473
2497
|
* The default value of the select
|
|
2474
2498
|
*/
|
|
@@ -2493,6 +2517,14 @@ declare interface SelectAsyncProps {
|
|
|
2493
2517
|
* The error message to be displayed
|
|
2494
2518
|
*/
|
|
2495
2519
|
errorMsg?: string | string[] | false;
|
|
2520
|
+
/**
|
|
2521
|
+
* Defines the SelectV2 option/value presentation.
|
|
2522
|
+
*/
|
|
2523
|
+
variant?: SELECT_VARIANT;
|
|
2524
|
+
/**
|
|
2525
|
+
* Defines whether to add dividers between option list items.
|
|
2526
|
+
*/
|
|
2527
|
+
showDivider?: boolean;
|
|
2496
2528
|
/**
|
|
2497
2529
|
* extra props to pass for select component
|
|
2498
2530
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hybr1d-tech/charizard",
|
|
3
|
-
"version": "2.4.
|
|
3
|
+
"version": "2.4.2",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist"
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"storybook": "^10.2.17",
|
|
85
85
|
"storybook-css-modules-preset": "^1.1.1",
|
|
86
86
|
"typescript": "5.9.3",
|
|
87
|
-
"vite": "^7.3.
|
|
87
|
+
"vite": "^7.3.2",
|
|
88
88
|
"vite-plugin-checker": "^0.12.0",
|
|
89
89
|
"vite-plugin-dts": "4.5.4",
|
|
90
90
|
"vite-plugin-libcss": "^1.1.2"
|