@commercetools/nimbus 0.0.7-rc10 → 0.0.7-rc12
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/index.cjs +5 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +250 -2
- package/dist/index.js +7234 -5165
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.d.ts
CHANGED
|
@@ -9,11 +9,16 @@ import { AriaCheckboxProps } from 'react-aria';
|
|
|
9
9
|
import { AriaLinkOptions } from 'react-aria';
|
|
10
10
|
import { AriaToggleButtonGroupProps } from 'react-aria';
|
|
11
11
|
import { AriaToggleButtonProps } from 'react-aria';
|
|
12
|
+
import { AutocompleteProps } from 'react-aria-components';
|
|
12
13
|
import { Bleed } from '@chakra-ui/react';
|
|
13
14
|
import { CardContentProps as CardContentProps_2 } from './card.slots';
|
|
14
15
|
import { CardHeaderProps as CardHeaderProps_2 } from './card.slots';
|
|
15
16
|
import { CardProps as CardProps_2 } from './card.types';
|
|
16
17
|
import { Code } from '@chakra-ui/react';
|
|
18
|
+
import { ComboBoxOptionGroupProps as ComboBoxOptionGroupProps_2 } from './combobox.types';
|
|
19
|
+
import { ComboBoxOptionProps as ComboBoxOptionProps_2 } from './combobox.types';
|
|
20
|
+
import { ComboBoxProps } from 'react-aria-components';
|
|
21
|
+
import { ComboBoxRootProps as ComboBoxRootProps_2 } from './combobox.types';
|
|
17
22
|
import { ConditionalValue } from '@chakra-ui/react';
|
|
18
23
|
import { Context } from 'react';
|
|
19
24
|
import { DetailedHTMLProps } from 'react';
|
|
@@ -28,6 +33,7 @@ import { FocusableOptions } from 'react-aria';
|
|
|
28
33
|
import { FormFieldProps as FormFieldProps_2 } from './form-field.types';
|
|
29
34
|
import { ForwardRefExoticComponent } from 'react';
|
|
30
35
|
import { GridItemProps } from '@chakra-ui/react';
|
|
36
|
+
import { GridListProps } from 'react-aria-components';
|
|
31
37
|
import { GridProps as GridProps_2 } from '@chakra-ui/react';
|
|
32
38
|
import { Heading } from '@chakra-ui/react';
|
|
33
39
|
import { Highlight as Highlight_2 } from '@chakra-ui/react';
|
|
@@ -477,11 +483,119 @@ colorPalette: "neutral";
|
|
|
477
483
|
export declare interface ButtonProps extends FunctionalButtonProps {
|
|
478
484
|
}
|
|
479
485
|
|
|
486
|
+
declare const buttonRecipe: RecipeDefinition< {
|
|
487
|
+
size: {
|
|
488
|
+
"2xs": {
|
|
489
|
+
h: "600";
|
|
490
|
+
minW: "600";
|
|
491
|
+
fontSize: "300";
|
|
492
|
+
fontWeight: "500";
|
|
493
|
+
lineHeight: "400";
|
|
494
|
+
px: "200";
|
|
495
|
+
gap: "100";
|
|
496
|
+
_icon: {
|
|
497
|
+
width: "400";
|
|
498
|
+
height: "400";
|
|
499
|
+
};
|
|
500
|
+
};
|
|
501
|
+
xs: {
|
|
502
|
+
h: "800";
|
|
503
|
+
minW: "800";
|
|
504
|
+
fontSize: "350";
|
|
505
|
+
fontWeight: "500";
|
|
506
|
+
lineHeight: "400";
|
|
507
|
+
px: "300";
|
|
508
|
+
gap: "100";
|
|
509
|
+
_icon: {
|
|
510
|
+
width: "500";
|
|
511
|
+
height: "500";
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
md: {
|
|
515
|
+
h: "1000";
|
|
516
|
+
minW: "1000";
|
|
517
|
+
fontSize: "400";
|
|
518
|
+
lineHeight: "500";
|
|
519
|
+
px: "400";
|
|
520
|
+
gap: "200";
|
|
521
|
+
_icon: {
|
|
522
|
+
width: "600";
|
|
523
|
+
height: "600";
|
|
524
|
+
};
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
variant: {
|
|
528
|
+
solid: {
|
|
529
|
+
bg: "colorPalette.9";
|
|
530
|
+
color: "colorPalette.contrast";
|
|
531
|
+
_hover: {
|
|
532
|
+
bg: "colorPalette.10";
|
|
533
|
+
};
|
|
534
|
+
_expanded: {
|
|
535
|
+
bg: "colorPalette.10";
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
subtle: {
|
|
539
|
+
bg: "colorPalette.3";
|
|
540
|
+
color: "colorPalette.11";
|
|
541
|
+
_hover: {
|
|
542
|
+
bg: "colorPalette.4";
|
|
543
|
+
};
|
|
544
|
+
_expanded: {
|
|
545
|
+
bg: "colorPalette.4";
|
|
546
|
+
};
|
|
547
|
+
};
|
|
548
|
+
outline: {
|
|
549
|
+
borderWidth: "1px";
|
|
550
|
+
borderColor: "colorPalette.7";
|
|
551
|
+
color: "colorPalette.11";
|
|
552
|
+
transitionProperty: "background-color, border-color, color";
|
|
553
|
+
transitionDuration: "moderate";
|
|
554
|
+
_hover: {
|
|
555
|
+
bg: "colorPalette.3";
|
|
556
|
+
borderColor: "colorPalette.8";
|
|
557
|
+
};
|
|
558
|
+
_expanded: {
|
|
559
|
+
bg: "colorPalette.subtle";
|
|
560
|
+
};
|
|
561
|
+
};
|
|
562
|
+
ghost: {
|
|
563
|
+
color: "colorPalette.11";
|
|
564
|
+
_hover: {
|
|
565
|
+
bg: "colorPalette.4";
|
|
566
|
+
};
|
|
567
|
+
_expanded: {
|
|
568
|
+
bg: "colorPalette.4";
|
|
569
|
+
};
|
|
570
|
+
};
|
|
571
|
+
link: {
|
|
572
|
+
color: "colorPalette.11";
|
|
573
|
+
_hover: {
|
|
574
|
+
textDecoration: "underline";
|
|
575
|
+
};
|
|
576
|
+
};
|
|
577
|
+
};
|
|
578
|
+
tone: {
|
|
579
|
+
primary: {
|
|
580
|
+
colorPalette: "primary";
|
|
581
|
+
};
|
|
582
|
+
critical: {
|
|
583
|
+
colorPalette: "critical";
|
|
584
|
+
};
|
|
585
|
+
neutral: {
|
|
586
|
+
colorPalette: "neutral";
|
|
587
|
+
};
|
|
588
|
+
info: {
|
|
589
|
+
colorPalette: "info";
|
|
590
|
+
};
|
|
591
|
+
};
|
|
592
|
+
}>;
|
|
593
|
+
|
|
480
594
|
/**
|
|
481
595
|
* Base recipe props interface that combines Chakra UI's recipe props
|
|
482
596
|
* with the unstyled prop option for the button element.
|
|
483
597
|
*/
|
|
484
|
-
declare interface ButtonRecipeProps extends RecipeProps<
|
|
598
|
+
declare interface ButtonRecipeProps extends RecipeProps<typeof buttonRecipe>, UnstyledProp {
|
|
485
599
|
}
|
|
486
600
|
|
|
487
601
|
/**
|
|
@@ -489,7 +603,8 @@ declare interface ButtonRecipeProps extends RecipeProps<"button">, UnstyledProp
|
|
|
489
603
|
* This creates a complete set of props for the root element, combining
|
|
490
604
|
* HTML attributes, Chakra's styling system, and our custom recipe props.
|
|
491
605
|
*/
|
|
492
|
-
declare
|
|
606
|
+
declare interface ButtonRootProps extends HTMLChakraProps<"button", ButtonRecipeProps> {
|
|
607
|
+
}
|
|
493
608
|
|
|
494
609
|
export declare const Card: {
|
|
495
610
|
Root: ForwardRefExoticComponent<CardProps_2 & RefAttributes<HTMLDivElement>>;
|
|
@@ -676,6 +791,139 @@ export declare function ColorModeLabel(): "Light Theme" | "DarkTheme";
|
|
|
676
791
|
declare interface ColorModeProviderProps extends ThemeProviderProps {
|
|
677
792
|
}
|
|
678
793
|
|
|
794
|
+
export declare const ComboBox: {
|
|
795
|
+
Root: <T extends object>(props: ComboBoxRootProps_2<T> & RefAttributes<HTMLDivElement>) => JSX_2.Element;
|
|
796
|
+
Options: <T extends object>(props: ComboBoxOptionProps_2<T> & RefAttributes<HTMLDivElement>) => JSX_2.Element;
|
|
797
|
+
OptionGroup: {
|
|
798
|
+
<T extends object>({ children, label, items, ref, ...props }: ComboBoxOptionGroupProps_2<T> & RefAttributes<HTMLDivElement>): JSX.Element;
|
|
799
|
+
displayName: string;
|
|
800
|
+
};
|
|
801
|
+
Option: <T extends object>(props: ComboBoxOptionProps_2<T> & RefAttributes<HTMLDivElement>) => JSX_2.Element;
|
|
802
|
+
};
|
|
803
|
+
|
|
804
|
+
declare interface ComboBoxMultiSelect<T extends object> extends Omit<AutocompleteProps, "children">, Omit<GridListProps<T>, "filter"> {
|
|
805
|
+
defaultFilter?: (textValue: string, inputValue: string) => boolean;
|
|
806
|
+
isLoading?: boolean;
|
|
807
|
+
isDisabled?: boolean;
|
|
808
|
+
isReadOnly?: boolean;
|
|
809
|
+
isRequired?: boolean;
|
|
810
|
+
isInvalid?: boolean;
|
|
811
|
+
}
|
|
812
|
+
|
|
813
|
+
/** Combined props for the multi select root element (Chakra styles + Aria behavior + Recipe variants). */
|
|
814
|
+
export declare interface ComboBoxMultiSelectRootProps<T extends object> extends Omit<ComboBoxMultiSelectRootSlotProps<T>, "selectionMode">, ComboBoxMultiSelect<T> {
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
/** Base Chakra styling props for the root `div` slot when multi select*/
|
|
818
|
+
export declare interface ComboBoxMultiSelectRootSlotProps<T extends object> extends HTMLChakraProps<"div", RecipeVariantProps<typeof comboBoxSlotRecipe> & ComboBoxMultiSelect<T>> {
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/** Combined props for the tag element (Chakra styles + Aria behavior + Recipe variants). */
|
|
822
|
+
export declare interface ComboBoxOptionGroupProps<T extends object> extends ListBoxSectionProps<T>, Omit<ComboBoxOptionGroupSlotProps, keyof ListBoxSectionProps<T>> {
|
|
823
|
+
label?: ReactNode;
|
|
824
|
+
}
|
|
825
|
+
|
|
826
|
+
/** Base Chakra styling props for the root `div` slot. */
|
|
827
|
+
declare type ComboBoxOptionGroupSlotProps = HTMLChakraProps<"div", RecipeProps<"div">>;
|
|
828
|
+
|
|
829
|
+
/** Combined props for the ListBoxItem element (Chakra styles + Aria behavior + Recipe variants). */
|
|
830
|
+
export declare interface ComboBoxOptionProps<T extends object> extends ListBoxItemProps<T>, Omit<ComboBoxOptionSlotProps, keyof ListBoxItemProps<T>> {
|
|
831
|
+
}
|
|
832
|
+
|
|
833
|
+
/** Base Chakra styling props for the root `div` slot. */
|
|
834
|
+
declare type ComboBoxOptionSlotProps = HTMLChakraProps<"div", RecipeProps<"div">>;
|
|
835
|
+
|
|
836
|
+
/** Combined props for the ListBox element used in Single Select (Chakra styles + Aria behavior + Recipe variants) */
|
|
837
|
+
export declare interface ComboBoxOptionsProps<T extends object> extends ListBoxProps<T>, Omit<ComboBoxOptionsSlotProps, keyof ListBoxProps<T>> {
|
|
838
|
+
}
|
|
839
|
+
|
|
840
|
+
/** Base Chakra styling props for the root `div` slot. */
|
|
841
|
+
export declare interface ComboBoxOptionsSlotProps extends HTMLChakraProps<"div", RecipeProps<"options">> {
|
|
842
|
+
}
|
|
843
|
+
|
|
844
|
+
export declare type ComboBoxRootProps<T extends object> = ComboBoxSingleSelectRootProps<T> | ComboBoxMultiSelectRootProps<T>;
|
|
845
|
+
|
|
846
|
+
/** Combined props for the single select root element (Chakra styles + Aria behavior + Recipe variants). */
|
|
847
|
+
export declare interface ComboBoxSingleSelectRootProps<T extends object> extends ComboBoxSingleSelectRootSlotProps<T>, ComboBoxWithCustomChildren<T> {
|
|
848
|
+
}
|
|
849
|
+
|
|
850
|
+
/** Base Chakra styling props for the root `div` slot when single select*/
|
|
851
|
+
export declare interface ComboBoxSingleSelectRootSlotProps<T extends object> extends HTMLChakraProps<"div", RecipeVariantProps<typeof comboBoxSlotRecipe> & ComboBoxWithCustomChildren<T>> {
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
/**
|
|
855
|
+
* Recipe configuration for the Combobox component.
|
|
856
|
+
* Defines the styling variants and base styles using Chakra UI's recipe system.
|
|
857
|
+
*/
|
|
858
|
+
declare const comboBoxSlotRecipe: SlotRecipeDefinition<"option" | "value" | "root" | "options" | "optionGroup" | "buttonGroup", {
|
|
859
|
+
size: {
|
|
860
|
+
sm: {
|
|
861
|
+
value: {
|
|
862
|
+
paddingRight: "1600";
|
|
863
|
+
h?: "800" | undefined;
|
|
864
|
+
px?: "400" | undefined;
|
|
865
|
+
textStyle?: "sm" | undefined;
|
|
866
|
+
};
|
|
867
|
+
};
|
|
868
|
+
md: {
|
|
869
|
+
value: {
|
|
870
|
+
paddingRight: "1600";
|
|
871
|
+
h?: "1000" | undefined;
|
|
872
|
+
px?: "400" | undefined;
|
|
873
|
+
textStyle?: "md" | undefined;
|
|
874
|
+
};
|
|
875
|
+
};
|
|
876
|
+
};
|
|
877
|
+
variant: {
|
|
878
|
+
solid: {
|
|
879
|
+
root: {
|
|
880
|
+
bg?: "bg" | undefined;
|
|
881
|
+
"&:hover"?: {
|
|
882
|
+
bg: "primary.2";
|
|
883
|
+
} | undefined;
|
|
884
|
+
};
|
|
885
|
+
value: {
|
|
886
|
+
"--border-width"?: "sizes.25" | undefined;
|
|
887
|
+
"--border-color"?: "colors.neutral.7" | undefined;
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
ghost: {
|
|
891
|
+
root: {
|
|
892
|
+
bg?: "transparent" | undefined;
|
|
893
|
+
"&:hover"?: {
|
|
894
|
+
bg: "primaryAlpha.2";
|
|
895
|
+
} | undefined;
|
|
896
|
+
};
|
|
897
|
+
value: {
|
|
898
|
+
"--border-width"?: "sizes.25" | undefined;
|
|
899
|
+
"--border-color"?: "transparent" | undefined;
|
|
900
|
+
};
|
|
901
|
+
};
|
|
902
|
+
};
|
|
903
|
+
selectionMode: {
|
|
904
|
+
multiple: {
|
|
905
|
+
option: {
|
|
906
|
+
"--border-width": "sizes.25";
|
|
907
|
+
"--border-color": "colors.neutral.7";
|
|
908
|
+
'&[data-focused="true"], &:hover': {
|
|
909
|
+
boxShadow: "inset 0 0 0 var(--border-width) var(--border-color)";
|
|
910
|
+
};
|
|
911
|
+
'&[aria-selected="true"], &[data-focused="true"]': {
|
|
912
|
+
bg: "inherit";
|
|
913
|
+
};
|
|
914
|
+
};
|
|
915
|
+
};
|
|
916
|
+
single: {};
|
|
917
|
+
none: {};
|
|
918
|
+
};
|
|
919
|
+
}>;
|
|
920
|
+
|
|
921
|
+
/** ComboBox with overridden children prop based on expected dom structure. */
|
|
922
|
+
declare type ComboBoxWithCustomChildren<T extends object> = Omit<ComboBoxProps<T>, "children"> & {
|
|
923
|
+
isLoading?: boolean;
|
|
924
|
+
children: ReactNode | ((item: T) => React.ReactNode);
|
|
925
|
+
};
|
|
926
|
+
|
|
679
927
|
export declare const DialogActionTrigger: ForwardRefExoticComponent<Dialog.ActionTriggerProps & RefAttributes<HTMLButtonElement>>;
|
|
680
928
|
|
|
681
929
|
export declare const DialogBackdrop: ForwardRefExoticComponent<Dialog.BackdropProps & RefAttributes<HTMLDivElement>>;
|