@hybr1d-tech/charizard 2.4.1 → 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.
Files changed (2) hide show
  1. package/dist/index.d.ts +12 -1
  2. package/package.json +1 -1
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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hybr1d-tech/charizard",
3
- "version": "2.4.1",
3
+ "version": "2.4.2",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"