@nimbus-ds/components 4.1.0 โ 4.1.1
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/CHANGELOG.md +20 -0
- package/dist/index.d.ts +125 -40
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,26 @@
|
|
|
2
2
|
|
|
3
3
|
Nimbus is an open-source Design System created by Tiendanube / Nuvesmhopโs team to empower and enhance more stories every day, with simplicity, accessibility, consistency and performance.
|
|
4
4
|
|
|
5
|
+
## 2023-04-13 `4.1.1`
|
|
6
|
+
|
|
7
|
+
#### ๐ New features
|
|
8
|
+
|
|
9
|
+
- Added renderProps functionality to the component `Popover` so that it is possible to obtain the internal state of the popover in the component's children. ([#149](https://github.com/TiendaNube/nimbus-design-system/pull/149) by [@juniorconquista](https://github.com/juniorconquista))
|
|
10
|
+
- Added responsive conditions to `Text` component properties. ([#149](https://github.com/TiendaNube/nimbus-design-system/pull/149) by [@juniorconquista](https://github.com/juniorconquista))
|
|
11
|
+
|
|
12
|
+
#### ๐ Bug fixes
|
|
13
|
+
|
|
14
|
+
- Removed additional margin generated in component `Card` when using subcomponent `Card.Header` without a `Card.Footer`. ([#149](https://github.com/TiendaNube/nimbus-design-system/pull/149) by [@juniorconquista](https://github.com/juniorconquista))
|
|
15
|
+
- Removed hover effect on `IconButton` component when disabled. ([#149](https://github.com/TiendaNube/nimbus-design-system/pull/149) by [@juniorconquista](https://github.com/juniorconquista))
|
|
16
|
+
- Added side spacing to `Modal` component. ([#149](https://github.com/TiendaNube/nimbus-design-system/pull/149) by [@juniorconquista](https://github.com/juniorconquista))
|
|
17
|
+
- Fixed bug in `Select` component where clicking on arrow icon didn't work. ([#149](https://github.com/TiendaNube/nimbus-design-system/pull/149) by [@juniorconquista](https://github.com/juniorconquista))
|
|
18
|
+
|
|
19
|
+
## 2023-04-10 `4.1.0`
|
|
20
|
+
|
|
21
|
+
#### ๐ก Others
|
|
22
|
+
|
|
23
|
+
- Changed `maxWidth` type description to reflect on prop documentation `Modal` component. ([#141](https://github.com/TiendaNube/nimbus-design-system/pull/141) by [@diegopsilverio](https://github.com/diegopsilverio))
|
|
24
|
+
|
|
5
25
|
## 2023-04-03 `4.0.0`
|
|
6
26
|
|
|
7
27
|
#### ๐ Breaking changes
|
package/dist/index.d.ts
CHANGED
|
@@ -727,13 +727,116 @@ export interface IconButtonSprinkle {
|
|
|
727
727
|
*/
|
|
728
728
|
backgroundColor?: IconButtonBackgroundColorProperties | IconButtonConditions<IconButtonBackgroundColorProperties>;
|
|
729
729
|
}
|
|
730
|
+
declare const propertiesText: {
|
|
731
|
+
color: {
|
|
732
|
+
currentColor: string;
|
|
733
|
+
"primary-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
734
|
+
"primary-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
735
|
+
"primary-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
736
|
+
"primary-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`; /**
|
|
737
|
+
* The color property is used to set the color of the text.
|
|
738
|
+
* @default neutral-textLow
|
|
739
|
+
*/
|
|
740
|
+
"success-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
741
|
+
"success-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
742
|
+
"success-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
743
|
+
"success-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
744
|
+
"warning-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
745
|
+
"warning-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
746
|
+
"warning-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
747
|
+
"warning-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
748
|
+
"danger-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
749
|
+
"danger-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
750
|
+
"danger-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
751
|
+
"danger-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
752
|
+
"neutral-background": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
753
|
+
"neutral-surface": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
754
|
+
"neutral-interactive": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
755
|
+
"neutral-textDisabled": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
756
|
+
"neutral-textLow": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
757
|
+
"neutral-textHigh": `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
758
|
+
};
|
|
759
|
+
textAlign: TextAlign[];
|
|
760
|
+
lineHeight: {
|
|
761
|
+
readonly caption: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
762
|
+
readonly base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
763
|
+
readonly highlight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
764
|
+
};
|
|
765
|
+
fontWeight: {
|
|
766
|
+
regular: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
767
|
+
medium: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
768
|
+
bold: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
769
|
+
};
|
|
770
|
+
fontSize: {
|
|
771
|
+
caption: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
772
|
+
base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
773
|
+
highlight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
|
|
774
|
+
};
|
|
775
|
+
};
|
|
776
|
+
export type TextColorProperties = keyof typeof propertiesText.color;
|
|
777
|
+
export type TextFontSizeProperties = keyof typeof propertiesText.fontSize;
|
|
778
|
+
export type TextFontWeightProperties = keyof typeof propertiesText.fontWeight;
|
|
779
|
+
export type TextLineHeightProperties = keyof typeof propertiesText.lineHeight;
|
|
780
|
+
export type TextConditions<T> = Conditions<T>;
|
|
781
|
+
export interface TextSprinkle {
|
|
782
|
+
/**
|
|
783
|
+
* The fontSize property sets the size of the text.
|
|
784
|
+
* @default base
|
|
785
|
+
*/
|
|
786
|
+
fontSize?: TextFontSizeProperties | TextConditions<TextFontSizeProperties>;
|
|
787
|
+
/**
|
|
788
|
+
* The fontWeight property sets how thick or thin characters in text should be displayed.
|
|
789
|
+
* @default regular
|
|
790
|
+
*/
|
|
791
|
+
fontWeight?: TextFontWeightProperties | TextConditions<TextFontWeightProperties>;
|
|
792
|
+
/**
|
|
793
|
+
* The lineHeight property specifies the line height of the text.
|
|
794
|
+
* @default base
|
|
795
|
+
*/
|
|
796
|
+
lineHeight?: TextLineHeightProperties | TextConditions<TextLineHeightProperties>;
|
|
797
|
+
/**
|
|
798
|
+
* The textAlign property specifies the horizontal alignment of text.
|
|
799
|
+
* @default left
|
|
800
|
+
*/
|
|
801
|
+
textAlign?: TextAlign | TextConditions<TextAlign>;
|
|
802
|
+
/**
|
|
803
|
+
* The color property is used to set the color of the text.
|
|
804
|
+
* @default neutral-textLow
|
|
805
|
+
*/
|
|
806
|
+
color?: TextColorProperties | TextConditions<TextColorProperties>;
|
|
807
|
+
}
|
|
730
808
|
declare const text: {
|
|
731
809
|
sprinkle: ((props: {
|
|
732
|
-
color?: "primary-surface" | "primary-interactive" | "primary-textLow" | "primary-textHigh" | "success-surface" | "success-interactive" | "success-textLow" | "success-textHigh" | "warning-surface" | "warning-interactive" | "warning-textLow" | "warning-textHigh" | "danger-surface" | "danger-interactive" | "danger-textLow" | "danger-textHigh" | "neutral-background" | "neutral-surface" | "neutral-interactive" | "neutral-textDisabled" | "neutral-textLow" | "neutral-textHigh" | "currentColor" |
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
810
|
+
color?: ("primary-surface" | "primary-interactive" | "primary-textLow" | "primary-textHigh" | "success-surface" | "success-interactive" | "success-textLow" | "success-textHigh" | "warning-surface" | "warning-interactive" | "warning-textLow" | "warning-textHigh" | "danger-surface" | "danger-interactive" | "danger-textLow" | "danger-textHigh" | "neutral-background" | "neutral-surface" | "neutral-interactive" | "neutral-textDisabled" | "neutral-textLow" | "neutral-textHigh" | "currentColor" | {
|
|
811
|
+
xs?: "primary-surface" | "primary-interactive" | "primary-textLow" | "primary-textHigh" | "success-surface" | "success-interactive" | "success-textLow" | "success-textHigh" | "warning-surface" | "warning-interactive" | "warning-textLow" | "warning-textHigh" | "danger-surface" | "danger-interactive" | "danger-textLow" | "danger-textHigh" | "neutral-background" | "neutral-surface" | "neutral-interactive" | "neutral-textDisabled" | "neutral-textLow" | "neutral-textHigh" | "currentColor" | undefined;
|
|
812
|
+
md?: "primary-surface" | "primary-interactive" | "primary-textLow" | "primary-textHigh" | "success-surface" | "success-interactive" | "success-textLow" | "success-textHigh" | "warning-surface" | "warning-interactive" | "warning-textLow" | "warning-textHigh" | "danger-surface" | "danger-interactive" | "danger-textLow" | "danger-textHigh" | "neutral-background" | "neutral-surface" | "neutral-interactive" | "neutral-textDisabled" | "neutral-textLow" | "neutral-textHigh" | "currentColor" | undefined;
|
|
813
|
+
lg?: "primary-surface" | "primary-interactive" | "primary-textLow" | "primary-textHigh" | "success-surface" | "success-interactive" | "success-textLow" | "success-textHigh" | "warning-surface" | "warning-interactive" | "warning-textLow" | "warning-textHigh" | "danger-surface" | "danger-interactive" | "danger-textLow" | "danger-textHigh" | "neutral-background" | "neutral-surface" | "neutral-interactive" | "neutral-textDisabled" | "neutral-textLow" | "neutral-textHigh" | "currentColor" | undefined;
|
|
814
|
+
xl?: "primary-surface" | "primary-interactive" | "primary-textLow" | "primary-textHigh" | "success-surface" | "success-interactive" | "success-textLow" | "success-textHigh" | "warning-surface" | "warning-interactive" | "warning-textLow" | "warning-textHigh" | "danger-surface" | "danger-interactive" | "danger-textLow" | "danger-textHigh" | "neutral-background" | "neutral-surface" | "neutral-interactive" | "neutral-textDisabled" | "neutral-textLow" | "neutral-textHigh" | "currentColor" | undefined;
|
|
815
|
+
}) | undefined;
|
|
816
|
+
textAlign?: (TextAlign | {
|
|
817
|
+
xs?: TextAlign | undefined;
|
|
818
|
+
md?: TextAlign | undefined;
|
|
819
|
+
lg?: TextAlign | undefined;
|
|
820
|
+
xl?: TextAlign | undefined;
|
|
821
|
+
}) | undefined;
|
|
822
|
+
lineHeight?: ("caption" | "base" | "highlight" | {
|
|
823
|
+
xs?: "caption" | "base" | "highlight" | undefined;
|
|
824
|
+
md?: "caption" | "base" | "highlight" | undefined;
|
|
825
|
+
lg?: "caption" | "base" | "highlight" | undefined;
|
|
826
|
+
xl?: "caption" | "base" | "highlight" | undefined;
|
|
827
|
+
}) | undefined;
|
|
828
|
+
fontWeight?: ("regular" | "medium" | "bold" | {
|
|
829
|
+
xs?: "regular" | "medium" | "bold" | undefined;
|
|
830
|
+
md?: "regular" | "medium" | "bold" | undefined;
|
|
831
|
+
lg?: "regular" | "medium" | "bold" | undefined;
|
|
832
|
+
xl?: "regular" | "medium" | "bold" | undefined;
|
|
833
|
+
}) | undefined;
|
|
834
|
+
fontSize?: ("caption" | "base" | "highlight" | {
|
|
835
|
+
xs?: "caption" | "base" | "highlight" | undefined;
|
|
836
|
+
md?: "caption" | "base" | "highlight" | undefined;
|
|
837
|
+
lg?: "caption" | "base" | "highlight" | undefined;
|
|
838
|
+
xl?: "caption" | "base" | "highlight" | undefined;
|
|
839
|
+
}) | undefined;
|
|
737
840
|
}) => string) & {
|
|
738
841
|
properties: Set<"fontSize" | "fontWeight" | "color" | "lineHeight" | "textAlign">;
|
|
739
842
|
};
|
|
@@ -1061,8 +1164,6 @@ declare const card: {
|
|
|
1061
1164
|
};
|
|
1062
1165
|
classnames: {
|
|
1063
1166
|
container: string;
|
|
1064
|
-
container__header: string;
|
|
1065
|
-
container__body: string;
|
|
1066
1167
|
container__footer: string;
|
|
1067
1168
|
};
|
|
1068
1169
|
};
|
|
@@ -1528,12 +1629,12 @@ export interface IconProperties {
|
|
|
1528
1629
|
}
|
|
1529
1630
|
export type IconProps = IconProperties & HTMLAttributes<HTMLDivElement>;
|
|
1530
1631
|
export declare const Icon: React.FC<IconProps> & IconComponents;
|
|
1531
|
-
export
|
|
1632
|
+
export type IconButtonSkeletonProperties = Partial<Pick<SkeletonProps, "width" | "height">> & {
|
|
1532
1633
|
/**
|
|
1533
1634
|
* This is an attribute used to identify a DOM node for testing purposes.
|
|
1534
1635
|
*/
|
|
1535
1636
|
"data-testid"?: string;
|
|
1536
|
-
}
|
|
1637
|
+
};
|
|
1537
1638
|
export type IconButtonSkeletonProps = IconButtonSkeletonProperties;
|
|
1538
1639
|
declare const IconButtonSkeleton: React.FC<IconButtonSkeletonProps>;
|
|
1539
1640
|
export interface IconButtonComponents {
|
|
@@ -1587,6 +1688,10 @@ export interface InputProperties {
|
|
|
1587
1688
|
* @TJS-type React.ReactNode
|
|
1588
1689
|
*/
|
|
1589
1690
|
append?: ReactNode;
|
|
1691
|
+
/**
|
|
1692
|
+
* This is an attribute used to identify a DOM node for testing purposes.
|
|
1693
|
+
*/
|
|
1694
|
+
"data-testid"?: string;
|
|
1590
1695
|
}
|
|
1591
1696
|
export type InputProps = InputProperties & InputHTMLAttributes<HTMLInputElement>;
|
|
1592
1697
|
export declare const Input: React.FC<InputProps> & InputComponents;
|
|
@@ -1708,9 +1813,12 @@ export type PopoverPlacement = "top" | "right" | "bottom" | "left" | "bottom-sta
|
|
|
1708
1813
|
export interface PopoverProperties extends PopoverSprinkle {
|
|
1709
1814
|
/**
|
|
1710
1815
|
* An HTML element, or a function that returns one. It's used to set the position of the popover.
|
|
1711
|
-
* @TJS-type React.ReactNode
|
|
1816
|
+
* @TJS-type React.ReactNode | ((data: { open: boolean, setVisibility: (visibility: boolean) => void }) => React.ReactNode);
|
|
1712
1817
|
*/
|
|
1713
|
-
children: ReactNode
|
|
1818
|
+
children: ReactNode | ((data: {
|
|
1819
|
+
open: boolean;
|
|
1820
|
+
setVisibility: (visibility: boolean) => void;
|
|
1821
|
+
}) => ReactNode);
|
|
1714
1822
|
/**
|
|
1715
1823
|
* The content of the popover.
|
|
1716
1824
|
* @TJS-type React.ReactNode
|
|
@@ -1756,7 +1864,7 @@ export interface PopoverProperties extends PopoverSprinkle {
|
|
|
1756
1864
|
*/
|
|
1757
1865
|
offset?: number;
|
|
1758
1866
|
}
|
|
1759
|
-
export type PopoverProps = PopoverProperties & HTMLAttributes<HTMLDivElement>;
|
|
1867
|
+
export type PopoverProps = PopoverProperties & Omit<HTMLAttributes<HTMLDivElement>, "children">;
|
|
1760
1868
|
export declare const Popover: React.FC<PopoverProps>;
|
|
1761
1869
|
export type RadioSkeletonProperties = Partial<Pick<SkeletonProps, "width">> & Partial<Pick<RadioProps, "as">> & {
|
|
1762
1870
|
/**
|
|
@@ -1888,13 +1996,15 @@ export interface TagProperties {
|
|
|
1888
1996
|
}
|
|
1889
1997
|
export type TagProps = TagProperties & HTMLAttributes<HTMLDivElement>;
|
|
1890
1998
|
export declare const Tag: React.FC<TagProps> & TagComponents;
|
|
1891
|
-
export type TextSkeletonProperties =
|
|
1999
|
+
export type TextSkeletonProperties = {
|
|
2000
|
+
fontSize?: keyof typeof text.properties.fontSize;
|
|
2001
|
+
} & Partial<Pick<SkeletonProps, "width" | "height" | "data-testid">>;
|
|
1892
2002
|
export type TextSkeletonProps = TextSkeletonProperties;
|
|
1893
2003
|
declare const TextSkeleton: React.FC<TextSkeletonProps>;
|
|
1894
2004
|
export interface TextComponents {
|
|
1895
2005
|
Skeleton: typeof TextSkeleton;
|
|
1896
2006
|
}
|
|
1897
|
-
export interface TextProperties {
|
|
2007
|
+
export interface TextProperties extends TextSprinkle {
|
|
1898
2008
|
/**
|
|
1899
2009
|
* The content of the link.
|
|
1900
2010
|
* @TJS-type React.ReactNode
|
|
@@ -1905,33 +2015,8 @@ export interface TextProperties {
|
|
|
1905
2015
|
* @default p
|
|
1906
2016
|
*/
|
|
1907
2017
|
as?: "p" | "span";
|
|
1908
|
-
/**
|
|
1909
|
-
* The fontSize property sets the size of the text.
|
|
1910
|
-
* @default base
|
|
1911
|
-
*/
|
|
1912
|
-
fontSize?: keyof typeof text.properties.fontSize;
|
|
1913
|
-
/**
|
|
1914
|
-
* The fontWeight property sets how thick or thin characters in text should be displayed.
|
|
1915
|
-
* @default regular
|
|
1916
|
-
*/
|
|
1917
|
-
fontWeight?: keyof typeof text.properties.fontWeight;
|
|
1918
|
-
/**
|
|
1919
|
-
* The lineHeight property specifies the line height of the text.
|
|
1920
|
-
* @default base
|
|
1921
|
-
*/
|
|
1922
|
-
lineHeight?: keyof typeof text.properties.lineHeight;
|
|
1923
|
-
/**
|
|
1924
|
-
* The textAlign property specifies the horizontal alignment of text.
|
|
1925
|
-
* @default left
|
|
1926
|
-
*/
|
|
1927
|
-
textAlign?: typeof text.properties.textAlign[number];
|
|
1928
|
-
/**
|
|
1929
|
-
* The color property is used to set the color of the text.
|
|
1930
|
-
* @default neutral-textLow
|
|
1931
|
-
*/
|
|
1932
|
-
color?: keyof typeof text.properties.color;
|
|
1933
2018
|
}
|
|
1934
|
-
export type TextProps = TextProperties & HTMLAttributes<HTMLParagraphElement>;
|
|
2019
|
+
export type TextProps = TextProperties & TextSprinkle & HTMLAttributes<HTMLParagraphElement>;
|
|
1935
2020
|
export declare const Text: React.FC<TextProps> & TextComponents;
|
|
1936
2021
|
export type TextareaSkeletonProperties = Partial<Pick<SkeletonProps, "width" | "data-testid">>;
|
|
1937
2022
|
export type TextareaSkeletonProps = TextareaSkeletonProperties;
|