@nimbus-ds/components 5.0.0 β†’ 5.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 CHANGED
@@ -2,6 +2,31 @@
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-07-11 `5.1.1`
6
+
7
+ #### πŸŽ‰ New features
8
+
9
+ - Added `ref` property to `Select` component API. ([#180](https://github.com/TiendaNube/nimbus-design-system/pull/180) by [@juniorconquista](https://github.com/juniorconquista)).
10
+ - Added `ref` property to `Textarea` component API. ([#180](https://github.com/TiendaNube/nimbus-design-system/pull/180) by [@juniorconquista](https://github.com/juniorconquista)).
11
+
12
+ #### πŸ› Bug fixes
13
+
14
+ - Adding extra right padding to the modal title to prevent the title from getting overlaid by the close button. ([#179](https://github.com/TiendaNube/nimbus-design-system/pull/179) by [@juniorconquista](https://github.com/juniorconquista))
15
+
16
+ #### πŸ“š 3rd party library updates
17
+
18
+ - Updated `@floating-ui/react@0.24.6`. ([#179](https://github.com/TiendaNube/nimbus-design-system/pull/179) by [@juanchigallego](https://github.com/juanchigallego))
19
+
20
+ ## 2023-06-13 `5.1.0`
21
+
22
+ ### πŸŽ‰ New features
23
+
24
+ - Added `Padding` property to the Component `Card.Header`. ([#169](https://github.com/TiendaNube/nimbus-design-system/pull/169) by [@juniorconquista](https://github.com/juniorconquista))
25
+ - Added `Padding` property to the Component `Card.Footer`. ([#169](https://github.com/TiendaNube/nimbus-design-system/pull/169) by [@juniorconquista](https://github.com/juniorconquista))
26
+ - Added `Padding` property to the Component `Modal.Header`. ([#169](https://github.com/TiendaNube/nimbus-design-system/pull/169) by [@juniorconquista](https://github.com/juniorconquista))
27
+ - Added `Padding` property to the Component `Modal.Footer`. ([#169](https://github.com/TiendaNube/nimbus-design-system/pull/169) by [@juniorconquista](https://github.com/juniorconquista))
28
+ - Added `wordBreak` property to the Component `Text` API. ([#169](https://github.com/TiendaNube/nimbus-design-system/pull/169) by [@juniorconquista](https://github.com/juniorconquista))
29
+
5
30
  ## 2023-05-23 `5.0.0`
6
31
 
7
32
  #### πŸ›  Breaking changes
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- // Generated by dts-bundle-generator v7.1.0
1
+ // Generated by dts-bundle-generator v7.2.0
2
2
 
3
3
  import React from 'react';
4
- import { ButtonHTMLAttributes, ComponentPropsWithRef, HTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, ReactElement, ReactNode, SVGAttributes, SelectHTMLAttributes, TextareaHTMLAttributes } from 'react';
4
+ import { ButtonHTMLAttributes, ComponentPropsWithRef, HTMLAttributes, ImgHTMLAttributes, InputHTMLAttributes, OptgroupHTMLAttributes, OptionHTMLAttributes, ReactElement, ReactNode, SVGAttributes } from 'react';
5
5
 
6
6
  export interface SkeletonProperties {
7
7
  /**
@@ -100,6 +100,7 @@ export type Position = "absolute" | "fixed" | "relative" | "static" | "sticky";
100
100
  export type Overflow = "visible" | "hidden" | "scroll" | "auto";
101
101
  export type PointerEvents = "auto" | "none" | "visiblePainted" | "visibleFill" | "visibleStroke" | "visible" | "painted" | "fill" | "stroke" | "all" | "inherit";
102
102
  export type TransitionTiming = "ease" | "ease-in" | "ease-out" | "ease-in-out" | "linear" | "step-start" | "step-end";
103
+ export type WordBreak = "normal" | "break-all" | "keep-all" | "break-word";
103
104
  declare const propertiesBox: {
104
105
  gap: {
105
106
  none: string;
@@ -856,6 +857,7 @@ declare const propertiesText: {
856
857
  base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
857
858
  highlight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
858
859
  };
860
+ wordBreak: WordBreak[];
859
861
  };
860
862
  export type TextColorProperties = keyof typeof propertiesText.color;
861
863
  export type TextFontSizeProperties = keyof typeof propertiesText.fontSize;
@@ -896,6 +898,10 @@ export interface TextSprinkle {
896
898
  * The amount of lines at which the text will be trimmed, showing an ellipsis when overflowed.
897
899
  */
898
900
  WebkitLineClamp?: number | TextConditions<number>;
901
+ /**
902
+ * The amount of lines at which the text will be trimmed, showing an ellipsis when overflowed.
903
+ */
904
+ wordBreak?: WordBreak | TextConditions<WordBreak>;
899
905
  }
900
906
  declare const text: {
901
907
  sprinkle: import("rainbow-sprinkles/dist/declarations/src/createRuntimeFn").SprinklesFn<[
@@ -1025,15 +1031,15 @@ declare const text: {
1025
1031
  };
1026
1032
  textAlign: {
1027
1033
  values: {
1028
- left: {
1034
+ center: {
1029
1035
  default: string;
1030
1036
  conditions: Record<"xs" | "md" | "lg" | "xl", string>;
1031
1037
  };
1032
- right: {
1038
+ left: {
1033
1039
  default: string;
1034
1040
  conditions: Record<"xs" | "md" | "lg" | "xl", string>;
1035
1041
  };
1036
- center: {
1042
+ right: {
1037
1043
  default: string;
1038
1044
  conditions: Record<"xs" | "md" | "lg" | "xl", string>;
1039
1045
  };
@@ -1111,6 +1117,28 @@ declare const text: {
1111
1117
  };
1112
1118
  name: "fontSize";
1113
1119
  };
1120
+ wordBreak: {
1121
+ values: {
1122
+ normal: {
1123
+ default: string;
1124
+ conditions: Record<"xs" | "md" | "lg" | "xl", string>;
1125
+ };
1126
+ "break-word": {
1127
+ default: string;
1128
+ conditions: Record<"xs" | "md" | "lg" | "xl", string>;
1129
+ };
1130
+ "break-all": {
1131
+ default: string;
1132
+ conditions: Record<"xs" | "md" | "lg" | "xl", string>;
1133
+ };
1134
+ "keep-all": {
1135
+ default: string;
1136
+ conditions: Record<"xs" | "md" | "lg" | "xl", string>;
1137
+ };
1138
+ };
1139
+ staticScale: WordBreak[];
1140
+ name: "wordBreak";
1141
+ };
1114
1142
  };
1115
1143
  } & {
1116
1144
  config: {
@@ -1142,7 +1170,7 @@ declare const text: {
1142
1170
  } & {
1143
1171
  config: {
1144
1172
  [x: string]: {
1145
- mappings: ("fontSize" | "fontWeight" | "color" | "lineHeight" | "textAlign" | "lineClamp" | "WebkitLineClamp")[];
1173
+ mappings: ("fontSize" | "fontWeight" | "color" | "lineHeight" | "textAlign" | "wordBreak" | "lineClamp" | "WebkitLineClamp")[];
1146
1174
  };
1147
1175
  };
1148
1176
  }
@@ -1189,6 +1217,7 @@ declare const text: {
1189
1217
  base: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
1190
1218
  highlight: `var(--${string})` | `var(--${string}, ${string})` | `var(--${string}, ${number})`;
1191
1219
  };
1220
+ wordBreak: WordBreak[];
1192
1221
  };
1193
1222
  classnames: {
1194
1223
  base: string;
@@ -1478,6 +1507,54 @@ declare const accordion: {
1478
1507
  };
1479
1508
  };
1480
1509
  declare const card: {
1510
+ classnames: {
1511
+ container: string;
1512
+ container__footer: string;
1513
+ };
1514
+ subComponents: {
1515
+ header: {
1516
+ sprinkle: ((props: {
1517
+ padding?: "base" | "small" | "none" | undefined;
1518
+ }) => string) & {
1519
+ properties: Set<"padding">;
1520
+ };
1521
+ properties: {
1522
+ padding: {
1523
+ base: string;
1524
+ small: string;
1525
+ none: string;
1526
+ };
1527
+ };
1528
+ };
1529
+ body: {
1530
+ sprinkle: ((props: {
1531
+ padding?: "base" | "small" | "none" | undefined;
1532
+ }) => string) & {
1533
+ properties: Set<"padding">;
1534
+ };
1535
+ properties: {
1536
+ padding: {
1537
+ base: string;
1538
+ small: string;
1539
+ none: string;
1540
+ };
1541
+ };
1542
+ };
1543
+ footer: {
1544
+ sprinkle: ((props: {
1545
+ padding?: "base" | "small" | "none" | undefined;
1546
+ }) => string) & {
1547
+ properties: Set<"padding">;
1548
+ };
1549
+ properties: {
1550
+ padding: {
1551
+ base: string;
1552
+ small: string;
1553
+ none: string;
1554
+ };
1555
+ };
1556
+ };
1557
+ };
1481
1558
  sprinkle: ((props: {
1482
1559
  backgroundColor?: "primary-surface" | "primary-surfaceHighlight" | "success-surface" | "success-surfaceHighlight" | "warning-surface" | "warning-surfaceHighlight" | "danger-surface" | "danger-surfaceHighlight" | "neutral-background" | "neutral-surface" | "neutral-surfaceHighlight" | undefined;
1483
1560
  padding?: "base" | "small" | "none" | undefined;
@@ -1504,10 +1581,6 @@ declare const card: {
1504
1581
  none: string;
1505
1582
  };
1506
1583
  };
1507
- classnames: {
1508
- container: string;
1509
- container__footer: string;
1510
- };
1511
1584
  };
1512
1585
  declare const propertiesModal: {
1513
1586
  padding: {
@@ -1530,6 +1603,56 @@ export interface ModalSprinkle {
1530
1603
  padding?: PaddingProperties | Conditions<PaddingProperties>;
1531
1604
  }
1532
1605
  declare const modal: {
1606
+ classnames: {
1607
+ overlay: string;
1608
+ container: string;
1609
+ container__close: string;
1610
+ container__footer: string;
1611
+ };
1612
+ subComponents: {
1613
+ header: {
1614
+ sprinkle: ((props: {
1615
+ padding?: "base" | "small" | "none" | undefined;
1616
+ }) => string) & {
1617
+ properties: Set<"padding">;
1618
+ };
1619
+ properties: {
1620
+ padding: {
1621
+ base: string;
1622
+ small: string;
1623
+ none: string;
1624
+ };
1625
+ };
1626
+ };
1627
+ body: {
1628
+ sprinkle: ((props: {
1629
+ padding?: "base" | "small" | "none" | undefined;
1630
+ }) => string) & {
1631
+ properties: Set<"padding">;
1632
+ };
1633
+ properties: {
1634
+ padding: {
1635
+ base: string;
1636
+ small: string;
1637
+ none: string;
1638
+ };
1639
+ };
1640
+ };
1641
+ footer: {
1642
+ sprinkle: ((props: {
1643
+ padding?: "base" | "small" | "none" | undefined;
1644
+ }) => string) & {
1645
+ properties: Set<"padding">;
1646
+ };
1647
+ properties: {
1648
+ padding: {
1649
+ base: string;
1650
+ small: string;
1651
+ none: string;
1652
+ };
1653
+ };
1654
+ };
1655
+ };
1533
1656
  sprinkle: import("rainbow-sprinkles/dist/declarations/src/createRuntimeFn").SprinklesFn<[
1534
1657
  {
1535
1658
  config: {
@@ -1577,14 +1700,6 @@ declare const modal: {
1577
1700
  none: string;
1578
1701
  };
1579
1702
  };
1580
- classnames: {
1581
- overlay: string;
1582
- container: string;
1583
- container__close: string;
1584
- container__header: string;
1585
- container__body: string;
1586
- container__footer: string;
1587
- };
1588
1703
  };
1589
1704
  declare const sidebarSprinkle: {
1590
1705
  sprinkle: import("rainbow-sprinkles/dist/declarations/src/createRuntimeFn").SprinklesFn<[
@@ -1902,7 +2017,7 @@ export interface TableSprinkle {
1902
2017
  }
1903
2018
  export interface BoxProperties extends BoxSprinkle {
1904
2019
  /**
1905
- * Element to be rendered inside the Box component. Meu teste
2020
+ * Element to be rendered inside the Box component.
1906
2021
  * @TJS-type React.ReactNode
1907
2022
  */
1908
2023
  children?: ReactNode;
@@ -2099,9 +2214,9 @@ export interface IconButtonProperties extends IconButtonSprinkle {
2099
2214
  }
2100
2215
  export type IconButtonProps = IconButtonProperties & ButtonHTMLAttributes<HTMLButtonElement | HTMLDivElement>;
2101
2216
  export declare const IconButton: React.FC<IconButtonProps> & IconButtonComponents;
2102
- export type InputPasswordProperties = Pick<InputProps, "appearance" | "disabled">;
2217
+ export type InputPasswordProperties = Pick<InputBaseProps, "appearance" | "disabled">;
2103
2218
  declare const InputPassword: React.ForwardRefExoticComponent<InputPasswordProperties & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
2104
- export type InputSearchProperties = Pick<InputProps, "appearance" | "disabled">;
2219
+ export type InputSearchProperties = Pick<InputBaseProps, "appearance" | "disabled">;
2105
2220
  declare const InputSearch: React.ForwardRefExoticComponent<InputSearchProperties & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
2106
2221
  export type InputSkeletonProperties = Partial<Pick<SkeletonProps, "width" | "data-testid">>;
2107
2222
  export type InputSkeletonProps = InputSkeletonProperties;
@@ -2136,8 +2251,9 @@ export interface InputProperties {
2136
2251
  */
2137
2252
  "data-testid"?: string;
2138
2253
  }
2139
- export type InputProps = InputProperties & InputHTMLAttributes<HTMLInputElement>;
2254
+ export type InputBaseProps = InputProperties & InputHTMLAttributes<HTMLInputElement>;
2140
2255
  export declare const Input: React.ForwardRefExoticComponent<InputProperties & React.InputHTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>> & InputComponents;
2256
+ export type InputProps = ComponentPropsWithRef<typeof Input>;
2141
2257
  export type LabelSkeletonProperties = Partial<Pick<SkeletonProps, "width">> & Partial<Pick<SkeletonProps, "height">> & {
2142
2258
  /**
2143
2259
  * This is an attribute used to identify a DOM node for testing purposes.
@@ -2398,8 +2514,8 @@ export interface SelectProperties {
2398
2514
  */
2399
2515
  appearance?: "success" | "warning" | "danger" | "neutral";
2400
2516
  }
2401
- export type SelectProps = SelectProperties & SelectHTMLAttributes<HTMLSelectElement>;
2402
- export declare const Select: React.FC<SelectProps> & SelectComponents;
2517
+ export declare const Select: React.ForwardRefExoticComponent<SelectProperties & React.SelectHTMLAttributes<HTMLSelectElement> & React.InputHTMLAttributes<HTMLSelectElement> & React.RefAttributes<HTMLSelectElement>> & SelectComponents;
2518
+ export type SelectProps = ComponentPropsWithRef<typeof Select>;
2403
2519
  export interface SpinnerProperties {
2404
2520
  /**
2405
2521
  * Sets the width and height of the spinner.
@@ -2483,8 +2599,8 @@ export interface TextareaProperties {
2483
2599
  * */
2484
2600
  id: string;
2485
2601
  }
2486
- export type TextareaProps = TextareaProperties & TextareaHTMLAttributes<HTMLTextAreaElement>;
2487
- export declare const Textarea: React.FC<TextareaProps> & TextareaComponents;
2602
+ export declare const Textarea: React.ForwardRefExoticComponent<TextareaProperties & React.TextareaHTMLAttributes<HTMLTextAreaElement> & React.InputHTMLAttributes<HTMLTextAreaElement> & React.RefAttributes<HTMLTextAreaElement>> & TextareaComponents;
2603
+ export type TextareaProps = ComponentPropsWithRef<typeof Textarea>;
2488
2604
  export type ThumbnailSkeletonProperties = Partial<Pick<ThumbnailProps, "aspectRatio">> & Partial<Pick<SkeletonProps, "width" | "data-testid">>;
2489
2605
  export type ThumbnailSkeletonProps = ThumbnailSkeletonProperties;
2490
2606
  declare const ThumbnailSkeleton: React.FC<ThumbnailSkeletonProps>;
@@ -2520,7 +2636,7 @@ declare const TitleSkeleton: React.FC<TitleSkeletonProps>;
2520
2636
  export interface TitleComponents {
2521
2637
  Skeleton: typeof TitleSkeleton;
2522
2638
  }
2523
- export interface TitleProperties {
2639
+ export interface TitleProperties extends TitleSprinkle {
2524
2640
  /**
2525
2641
  * The content of the title.
2526
2642
  * @TJS-type React.ReactNode
@@ -2532,7 +2648,7 @@ export interface TitleProperties {
2532
2648
  */
2533
2649
  as?: "h1" | "h2" | "h3" | "h4" | "h5" | "h6";
2534
2650
  }
2535
- export type TitleProps = TitleProperties & TitleSprinkle & HTMLAttributes<HTMLHeadingElement>;
2651
+ export type TitleProps = TitleProperties & HTMLAttributes<HTMLHeadingElement>;
2536
2652
  export declare const Title: React.FC<TitleProps> & TitleComponents;
2537
2653
  export interface ToastProviderProperties {
2538
2654
  /**
@@ -2765,7 +2881,7 @@ export interface CardBodyProperties {
2765
2881
  * The padding properties are used to generate space around an card's body content area.
2766
2882
  * @default none
2767
2883
  */
2768
- padding?: keyof typeof card.properties.padding;
2884
+ padding?: keyof typeof card.subComponents.body.properties.padding;
2769
2885
  }
2770
2886
  export type CardBodyProps = CardBodyProperties & HTMLAttributes<HTMLElement>;
2771
2887
  declare const CardBody: React.FC<CardBodyProps>;
@@ -2775,6 +2891,11 @@ export interface CardFooterProperties {
2775
2891
  * @TJS-type React.ReactNode
2776
2892
  */
2777
2893
  children: ReactNode;
2894
+ /**
2895
+ * The padding properties are used to generate space around an card's footer content area.
2896
+ * @default none
2897
+ */
2898
+ padding?: keyof typeof card.subComponents.footer.properties.padding;
2778
2899
  }
2779
2900
  export type CardFooterProps = CardFooterProperties & HTMLAttributes<HTMLElement>;
2780
2901
  declare const CardFooter: React.FC<CardFooterProps>;
@@ -2788,6 +2909,11 @@ export interface CardHeaderProperties {
2788
2909
  * The title to display in the card header.
2789
2910
  */
2790
2911
  title?: string;
2912
+ /**
2913
+ * The padding properties are used to generate space around an card's header content area.
2914
+ * @default none
2915
+ */
2916
+ padding?: keyof typeof card.subComponents.header.properties.padding;
2791
2917
  }
2792
2918
  export type CardHeaderProps = CardHeaderProperties & HTMLAttributes<HTMLElement>;
2793
2919
  declare const CardHeader: React.FC<CardHeaderProps>;
@@ -2823,9 +2949,9 @@ export interface ModalBodyProperties {
2823
2949
  children: ReactNode;
2824
2950
  /**
2825
2951
  * The padding properties are used to generate space around an modal's body content area.
2826
- * @default base
2952
+ * @default none
2827
2953
  */
2828
- padding?: keyof typeof card.properties.padding;
2954
+ padding?: keyof typeof modal.subComponents.body.properties.padding;
2829
2955
  }
2830
2956
  export type ModalBodyProps = ModalBodyProperties & HTMLAttributes<HTMLElement>;
2831
2957
  declare const ModalBody: React.FC<ModalBodyProps>;
@@ -2835,6 +2961,11 @@ export interface ModalFooterProperties {
2835
2961
  * @TJS-type React.ReactNode
2836
2962
  */
2837
2963
  children: ReactNode;
2964
+ /**
2965
+ * The padding properties are used to generate space around an modal's footer content area.
2966
+ * @default none
2967
+ */
2968
+ padding?: keyof typeof modal.subComponents.footer.properties.padding;
2838
2969
  }
2839
2970
  export type ModalFooterProps = ModalFooterProperties & HTMLAttributes<HTMLElement>;
2840
2971
  declare const ModalFooter: React.FC<ModalFooterProps>;
@@ -2848,6 +2979,11 @@ export interface ModalHeaderProperties {
2848
2979
  * The title to display in the modal header.
2849
2980
  */
2850
2981
  title?: string;
2982
+ /**
2983
+ * The padding properties are used to generate space around an modal's header content area.
2984
+ * @default none
2985
+ */
2986
+ padding?: keyof typeof modal.subComponents.header.properties.padding;
2851
2987
  }
2852
2988
  export type ModalHeaderProps = ModalHeaderProperties & HTMLAttributes<HTMLElement>;
2853
2989
  declare const ModalHeader: React.FC<ModalHeaderProps>;