@newtonschool/grauity 2.2.1 → 3.0.0-beta.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 (87) hide show
  1. package/README.md +4 -4
  2. package/dist/common/types.d.ts +2 -0
  3. package/dist/common/types.d.ts.map +1 -1
  4. package/dist/index.d.ts +295 -68
  5. package/dist/index.d.ts.map +1 -1
  6. package/dist/main.cjs +1 -1
  7. package/dist/main.cjs.map +1 -1
  8. package/dist/module.mjs +1 -1
  9. package/dist/module.mjs.map +1 -1
  10. package/dist/ui/core/colors/index.d.ts +23 -0
  11. package/dist/ui/core/colors/index.d.ts.map +1 -0
  12. package/dist/ui/core/index.d.ts +1 -0
  13. package/dist/ui/core/index.d.ts.map +1 -1
  14. package/dist/ui/elements/Alert/Alert.d.ts.map +1 -1
  15. package/dist/ui/elements/Alert/constants.d.ts +0 -24
  16. package/dist/ui/elements/Alert/constants.d.ts.map +1 -1
  17. package/dist/ui/elements/Alert/types.d.ts +4 -0
  18. package/dist/ui/elements/Alert/types.d.ts.map +1 -1
  19. package/dist/ui/elements/AlertBanner/AlertBanner.d.ts.map +1 -1
  20. package/dist/ui/elements/AlertBanner/constants.d.ts +17 -17
  21. package/dist/ui/elements/AlertBanner/constants.d.ts.map +1 -1
  22. package/dist/ui/elements/AlertBanner/types.d.ts +1 -1
  23. package/dist/ui/elements/AlertBanner/utils.d.ts +11 -1
  24. package/dist/ui/elements/AlertBanner/utils.d.ts.map +1 -1
  25. package/dist/ui/elements/Button/Button.d.ts.map +1 -1
  26. package/dist/ui/elements/Button/Button.styles.d.ts.map +1 -1
  27. package/dist/ui/elements/Button/IconButton.d.ts.map +1 -1
  28. package/dist/ui/elements/Button/constants.d.ts +9 -15
  29. package/dist/ui/elements/Button/constants.d.ts.map +1 -1
  30. package/dist/ui/elements/Button/types.d.ts +25 -7
  31. package/dist/ui/elements/Button/types.d.ts.map +1 -1
  32. package/dist/ui/elements/Button/utils.d.ts +6 -0
  33. package/dist/ui/elements/Button/utils.d.ts.map +1 -0
  34. package/dist/ui/elements/Carousel/Carousel.d.ts.map +1 -1
  35. package/dist/ui/elements/Carousel/Carousel.styles.d.ts +2 -3
  36. package/dist/ui/elements/Carousel/Carousel.styles.d.ts.map +1 -1
  37. package/dist/ui/elements/Carousel/types.d.ts +8 -0
  38. package/dist/ui/elements/Carousel/types.d.ts.map +1 -1
  39. package/dist/ui/elements/DropdownMenu/components/DropdownMenuFooter.d.ts.map +1 -1
  40. package/dist/ui/elements/Form/Checkbox/Checkbox.d.ts.map +1 -1
  41. package/dist/ui/elements/Form/Checkbox/Checkbox.styles.d.ts.map +1 -1
  42. package/dist/ui/elements/Form/Checkbox/types.d.ts +9 -0
  43. package/dist/ui/elements/Form/Checkbox/types.d.ts.map +1 -1
  44. package/dist/ui/elements/Form/Checkbox/utils.d.ts +6 -1
  45. package/dist/ui/elements/Form/Checkbox/utils.d.ts.map +1 -1
  46. package/dist/ui/elements/Form/Dropdown/DropdownTrigger.d.ts.map +1 -1
  47. package/dist/ui/elements/Form/Label/index.d.ts.map +1 -1
  48. package/dist/ui/elements/Form/OtpInputField/OtpInputField.d.ts +1 -1
  49. package/dist/ui/elements/Form/OtpInputField/OtpInputField.d.ts.map +1 -1
  50. package/dist/ui/elements/Form/OtpInputField/OtpInputField.styles.d.ts.map +1 -1
  51. package/dist/ui/elements/Form/OtpInputField/types.d.ts +12 -0
  52. package/dist/ui/elements/Form/OtpInputField/types.d.ts.map +1 -1
  53. package/dist/ui/elements/Form/RadioButton/RadioButton.d.ts.map +1 -1
  54. package/dist/ui/elements/Form/RadioButton/RadioButton.styles.d.ts.map +1 -1
  55. package/dist/ui/elements/Form/RadioButton/types.d.ts +9 -0
  56. package/dist/ui/elements/Form/RadioButton/types.d.ts.map +1 -1
  57. package/dist/ui/elements/Form/RadioButton/utils.d.ts +3 -0
  58. package/dist/ui/elements/Form/RadioButton/utils.d.ts.map +1 -0
  59. package/dist/ui/elements/Form/TextArea/TextArea.d.ts.map +1 -1
  60. package/dist/ui/elements/Form/TextArea/constant.d.ts.map +1 -1
  61. package/dist/ui/elements/Form/TextArea/index.styles.d.ts.map +1 -1
  62. package/dist/ui/elements/Form/TextArea/types.d.ts +11 -20
  63. package/dist/ui/elements/Form/TextArea/types.d.ts.map +1 -1
  64. package/dist/ui/elements/Form/TextField/TextField.d.ts.map +1 -1
  65. package/dist/ui/elements/Form/TextField/index.styles.d.ts.map +1 -1
  66. package/dist/ui/elements/Form/TextField/types.d.ts +12 -17
  67. package/dist/ui/elements/Form/TextField/types.d.ts.map +1 -1
  68. package/dist/ui/elements/Form/TextField/utils.d.ts +3 -0
  69. package/dist/ui/elements/Form/TextField/utils.d.ts.map +1 -0
  70. package/dist/ui/elements/Form/index.styles.d.ts.map +1 -1
  71. package/dist/ui/elements/Form/types.d.ts +12 -0
  72. package/dist/ui/elements/Form/types.d.ts.map +1 -1
  73. package/dist/ui/elements/Modal/Modal.d.ts.map +1 -1
  74. package/dist/ui/elements/Modal/MultiStepModal/index.d.ts.map +1 -1
  75. package/dist/ui/elements/Modal/types.d.ts +13 -1
  76. package/dist/ui/elements/Modal/types.d.ts.map +1 -1
  77. package/dist/ui/elements/Pagination/Pagination.d.ts.map +1 -1
  78. package/dist/ui/elements/Pagination/types.d.ts +22 -7
  79. package/dist/ui/elements/Pagination/types.d.ts.map +1 -1
  80. package/dist/ui/themes/ThemeProvider.d.ts +70 -0
  81. package/dist/ui/themes/ThemeProvider.d.ts.map +1 -1
  82. package/dist/ui/themes/darkThemeConstants.d.ts +35 -0
  83. package/dist/ui/themes/darkThemeConstants.d.ts.map +1 -1
  84. package/dist/ui/themes/lightThemeConstants.d.ts +35 -0
  85. package/dist/ui/themes/lightThemeConstants.d.ts.map +1 -1
  86. package/dist/ui/themes/utils.d.ts +1 -1
  87. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -3,6 +3,28 @@ import { Substitute, IStyledComponentBase } from "styled-components/dist/types";
3
3
  import { HTMLMotionProps, ForwardRefComponent } from "framer-motion";
4
4
  import { FastOmit } from "styled-components";
5
5
  import { Schema } from "yup";
6
+ /**
7
+ * The list of colors which should be available for all action components.
8
+ */
9
+ enum ACTION_COLORS {
10
+ BRAND = "brand",
11
+ SUCCESS = "success",
12
+ WARNING = "warning",
13
+ ERROR = "error"
14
+ }
15
+ /**
16
+ * The list of colors which should be available for all text components.
17
+ */
18
+ enum TEXT_COLORS {
19
+ PRIMARY = "primary",
20
+ SECONDARY = "secondary",
21
+ BRAND = "brand",
22
+ SUCCESS = "success",
23
+ WARNING = "warning",
24
+ ERROR = "error",
25
+ YELLOW = "yellow",
26
+ PURPLE = "purple"
27
+ }
6
28
  export const ICON_TAGS: {
7
29
  "exclamation-circle-filled": string[];
8
30
  "exclamation-circle": string[];
@@ -502,16 +524,31 @@ export const NS_DARK_THEME_CONFIG: {
502
524
  hover: string;
503
525
  disabled: string;
504
526
  };
527
+ 'invert-primary': {
528
+ default: string;
529
+ hover: string;
530
+ disabled: string;
531
+ };
505
532
  secondary: {
506
533
  default: string;
507
534
  hover: string;
508
535
  disabled: string;
509
536
  };
537
+ 'invert-secondary': {
538
+ default: string;
539
+ hover: string;
540
+ disabled: string;
541
+ };
510
542
  tertiary: {
511
543
  default: string;
512
544
  hover: string;
513
545
  disabled: string;
514
546
  };
547
+ 'invert-tertiary': {
548
+ default: string;
549
+ hover: string;
550
+ disabled: string;
551
+ };
515
552
  brand: {
516
553
  default: string;
517
554
  hover: string;
@@ -739,6 +776,11 @@ export const NS_DARK_THEME_CONFIG: {
739
776
  hover: string;
740
777
  disabled: string;
741
778
  };
779
+ 'invert-primary': {
780
+ default: string;
781
+ hover: string;
782
+ disabled: string;
783
+ };
742
784
  secondary: {
743
785
  default: string;
744
786
  hover: string;
@@ -793,6 +835,11 @@ export const NS_DARK_THEME_CONFIG: {
793
835
  hover: string;
794
836
  disabled: string;
795
837
  };
838
+ 'invert-primary': {
839
+ default: string;
840
+ hover: string;
841
+ disabled: string;
842
+ };
796
843
  secondary: {
797
844
  default: string;
798
845
  hover: string;
@@ -840,6 +887,11 @@ export const NS_DARK_THEME_CONFIG: {
840
887
  hover: string;
841
888
  disabled: string;
842
889
  };
890
+ 'invert-primary': {
891
+ default: string;
892
+ hover: string;
893
+ disabled: string;
894
+ };
843
895
  secondary: {
844
896
  default: string;
845
897
  hover: string;
@@ -887,6 +939,11 @@ export const NS_DARK_THEME_CONFIG: {
887
939
  hover: string;
888
940
  disabled: string;
889
941
  };
942
+ 'invert-primary': {
943
+ default: string;
944
+ hover: string;
945
+ disabled: string;
946
+ };
890
947
  secondary: {
891
948
  default: string;
892
949
  hover: string;
@@ -998,16 +1055,31 @@ export const NS_LIGHT_THEME_CONFIG: {
998
1055
  hover: string;
999
1056
  disabled: string;
1000
1057
  };
1058
+ 'invert-primary': {
1059
+ default: string;
1060
+ hover: string;
1061
+ disabled: string;
1062
+ };
1001
1063
  secondary: {
1002
1064
  default: string;
1003
1065
  hover: string;
1004
1066
  disabled: string;
1005
1067
  };
1068
+ 'invert-secondary': {
1069
+ default: string;
1070
+ hover: string;
1071
+ disabled: string;
1072
+ };
1006
1073
  tertiary: {
1007
1074
  default: string;
1008
1075
  hover: string;
1009
1076
  disabled: string;
1010
1077
  };
1078
+ 'invert-tertiary': {
1079
+ default: string;
1080
+ hover: string;
1081
+ disabled: string;
1082
+ };
1011
1083
  brand: {
1012
1084
  default: string;
1013
1085
  hover: string;
@@ -1235,6 +1307,11 @@ export const NS_LIGHT_THEME_CONFIG: {
1235
1307
  hover: string;
1236
1308
  disabled: string;
1237
1309
  };
1310
+ 'invert-primary': {
1311
+ default: string;
1312
+ hover: string;
1313
+ disabled: string;
1314
+ };
1238
1315
  secondary: {
1239
1316
  default: string;
1240
1317
  hover: string;
@@ -1289,6 +1366,11 @@ export const NS_LIGHT_THEME_CONFIG: {
1289
1366
  hover: string;
1290
1367
  disabled: string;
1291
1368
  };
1369
+ 'invert-primary': {
1370
+ default: string;
1371
+ hover: string;
1372
+ disabled: string;
1373
+ };
1292
1374
  secondary: {
1293
1375
  default: string;
1294
1376
  hover: string;
@@ -1336,6 +1418,11 @@ export const NS_LIGHT_THEME_CONFIG: {
1336
1418
  hover: string;
1337
1419
  disabled: string;
1338
1420
  };
1421
+ 'invert-primary': {
1422
+ default: string;
1423
+ hover: string;
1424
+ disabled: string;
1425
+ };
1339
1426
  secondary: {
1340
1427
  default: string;
1341
1428
  hover: string;
@@ -1383,6 +1470,11 @@ export const NS_LIGHT_THEME_CONFIG: {
1383
1470
  hover: string;
1384
1471
  disabled: string;
1385
1472
  };
1473
+ 'invert-primary': {
1474
+ default: string;
1475
+ hover: string;
1476
+ disabled: string;
1477
+ };
1386
1478
  secondary: {
1387
1479
  default: string;
1388
1480
  hover: string;
@@ -1507,16 +1599,31 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
1507
1599
  hover: string;
1508
1600
  disabled: string;
1509
1601
  };
1602
+ 'invert-primary': {
1603
+ default: string;
1604
+ hover: string;
1605
+ disabled: string;
1606
+ };
1510
1607
  secondary: {
1511
1608
  default: string;
1512
1609
  hover: string;
1513
1610
  disabled: string;
1514
1611
  };
1612
+ 'invert-secondary': {
1613
+ default: string;
1614
+ hover: string;
1615
+ disabled: string;
1616
+ };
1515
1617
  tertiary: {
1516
1618
  default: string;
1517
1619
  hover: string;
1518
1620
  disabled: string;
1519
1621
  };
1622
+ 'invert-tertiary': {
1623
+ default: string;
1624
+ hover: string;
1625
+ disabled: string;
1626
+ };
1520
1627
  brand: {
1521
1628
  default: string;
1522
1629
  hover: string;
@@ -1744,6 +1851,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
1744
1851
  hover: string;
1745
1852
  disabled: string;
1746
1853
  };
1854
+ 'invert-primary': {
1855
+ default: string;
1856
+ hover: string;
1857
+ disabled: string;
1858
+ };
1747
1859
  secondary: {
1748
1860
  default: string;
1749
1861
  hover: string;
@@ -1798,6 +1910,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
1798
1910
  hover: string;
1799
1911
  disabled: string;
1800
1912
  };
1913
+ 'invert-primary': {
1914
+ default: string;
1915
+ hover: string;
1916
+ disabled: string;
1917
+ };
1801
1918
  secondary: {
1802
1919
  default: string;
1803
1920
  hover: string;
@@ -1845,6 +1962,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
1845
1962
  hover: string;
1846
1963
  disabled: string;
1847
1964
  };
1965
+ 'invert-primary': {
1966
+ default: string;
1967
+ hover: string;
1968
+ disabled: string;
1969
+ };
1848
1970
  secondary: {
1849
1971
  default: string;
1850
1972
  hover: string;
@@ -1892,6 +2014,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
1892
2014
  hover: string;
1893
2015
  disabled: string;
1894
2016
  };
2017
+ 'invert-primary': {
2018
+ default: string;
2019
+ hover: string;
2020
+ disabled: string;
2021
+ };
1895
2022
  secondary: {
1896
2023
  default: string;
1897
2024
  hover: string;
@@ -2002,16 +2129,31 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
2002
2129
  hover: string;
2003
2130
  disabled: string;
2004
2131
  };
2132
+ 'invert-primary': {
2133
+ default: string;
2134
+ hover: string;
2135
+ disabled: string;
2136
+ };
2005
2137
  secondary: {
2006
2138
  default: string;
2007
2139
  hover: string;
2008
2140
  disabled: string;
2009
2141
  };
2142
+ 'invert-secondary': {
2143
+ default: string;
2144
+ hover: string;
2145
+ disabled: string;
2146
+ };
2010
2147
  tertiary: {
2011
2148
  default: string;
2012
2149
  hover: string;
2013
2150
  disabled: string;
2014
2151
  };
2152
+ 'invert-tertiary': {
2153
+ default: string;
2154
+ hover: string;
2155
+ disabled: string;
2156
+ };
2015
2157
  brand: {
2016
2158
  default: string;
2017
2159
  hover: string;
@@ -2239,6 +2381,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
2239
2381
  hover: string;
2240
2382
  disabled: string;
2241
2383
  };
2384
+ 'invert-primary': {
2385
+ default: string;
2386
+ hover: string;
2387
+ disabled: string;
2388
+ };
2242
2389
  secondary: {
2243
2390
  default: string;
2244
2391
  hover: string;
@@ -2293,6 +2440,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
2293
2440
  hover: string;
2294
2441
  disabled: string;
2295
2442
  };
2443
+ 'invert-primary': {
2444
+ default: string;
2445
+ hover: string;
2446
+ disabled: string;
2447
+ };
2296
2448
  secondary: {
2297
2449
  default: string;
2298
2450
  hover: string;
@@ -2340,6 +2492,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
2340
2492
  hover: string;
2341
2493
  disabled: string;
2342
2494
  };
2495
+ 'invert-primary': {
2496
+ default: string;
2497
+ hover: string;
2498
+ disabled: string;
2499
+ };
2343
2500
  secondary: {
2344
2501
  default: string;
2345
2502
  hover: string;
@@ -2387,6 +2544,11 @@ export const GrauityThemeProvider: ({ themeConfig, children, }: {
2387
2544
  hover: string;
2388
2545
  disabled: string;
2389
2546
  };
2547
+ 'invert-primary': {
2548
+ default: string;
2549
+ hover: string;
2550
+ disabled: string;
2551
+ };
2390
2552
  secondary: {
2391
2553
  default: string;
2392
2554
  hover: string;
@@ -2499,6 +2661,14 @@ interface ThemeWrapperProps {
2499
2661
  }
2500
2662
  export const NSThemeWrapper: ({ children, defaultTheme, usePreferredColorScheme, }: ThemeWrapperProps) => JSX.Element;
2501
2663
  export const NSThemeConsumer: React.Consumer<any>;
2664
+ export enum ALERT_VARIANTS_ENUM {
2665
+ PRIMARY = "primary",
2666
+ SUCCESS = "success",
2667
+ WARNING = "warning",
2668
+ ERROR = "error",
2669
+ DEFAULT = "default"
2670
+ }
2671
+ export const ALERT_VARIANTS: ALERT_VARIANTS_ENUM[];
2502
2672
  export interface IconProps {
2503
2673
  /**
2504
2674
  * Icon can have the aria hidden attribute
@@ -2593,6 +2763,7 @@ interface StyledLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
2593
2763
  ref?: React.Ref<HTMLLabelElement>;
2594
2764
  isRequired?: boolean;
2595
2765
  isDisabled?: boolean;
2766
+ color?: `${TEXT_COLORS}`;
2596
2767
  }
2597
2768
  /**
2598
2769
  * Interface representing the properties for a styled button component.
@@ -2603,18 +2774,27 @@ interface StyledLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
2603
2774
  interface StyledButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
2604
2775
  ref?: React.Ref<HTMLButtonElement>;
2605
2776
  }
2606
- type ButtonVariants = 'primary' | 'secondary' | 'tertiary' | 'success' | 'danger' | 'warning' | 'primary-outlined' | 'secondary-outlined' | 'tertiary-outlined' | 'success-outlined' | 'danger-outlined' | 'warning-outlined';
2607
- type ButtonSizes = 'small' | 'medium' | 'large' | 'extra-large';
2608
- type ButtonIconPositions = 'left' | 'right';
2777
+ type ButtonVariants = `${BUTTON_VARIANTS_ENUM}`;
2778
+ type ButtonColors = `${BUTTON_COLORS_ENUM}`;
2779
+ type ButtonSizes = `${BUTTON_SIZES_ENUM}`;
2780
+ type ButtonIconPositions = `${BUTTON_ICON_POSITIONS_ENUM}`;
2609
2781
  export interface ButtonProps extends StyledButtonProps {
2610
2782
  /**
2611
2783
  * Variant of the button
2612
2784
  *
2613
- * Available choices: `primary`, `secondary`, `tertiary`, `success`, `danger`, `warning`, `primary-outlined`, `secondary-outlined`, `tertiary-outlined`, `success-outlined`, `danger-outlined`, `warning-outlined`
2785
+ * Available choices: `primary` (solid), `secondary` (outlined), `tertiary` (text)
2614
2786
  *
2615
2787
  * Default: `primary`
2616
2788
  * */
2617
2789
  variant?: ButtonVariants;
2790
+ /**
2791
+ * Color of the button
2792
+ *
2793
+ * Available choices: `brand` (blue), `neutral` (black), `error` (red), `success` (green), `warning` (orange)
2794
+ *
2795
+ * Default: `brand`
2796
+ * */
2797
+ color?: ButtonColors;
2618
2798
  /**
2619
2799
  * Size of the button
2620
2800
  * Available choices: `small`, `medium`, `large`
@@ -2627,7 +2807,7 @@ export interface ButtonProps extends StyledButtonProps {
2627
2807
  * */
2628
2808
  icon?: grauityIconName;
2629
2809
  /**
2630
- * Size of the icon
2810
+ * Size of the icon, defaults to `20`
2631
2811
  * */
2632
2812
  iconSize?: grauityIconSizeName;
2633
2813
  /**
@@ -2705,11 +2885,19 @@ interface IconButtonProps {
2705
2885
  /**
2706
2886
  * Variant of the button
2707
2887
  *
2708
- * Available choices: `primary`, `secondary`, `tertiary`, `success`, `danger`, `warning`, `primary-outlined`, `secondary-outlined`, `tertiary-outlined`, `success-outlined`, `danger-outlined`, `warning-outlined`
2888
+ * Available choices: `primary` (solid filled), `secondary` (outlined), `tertiary (text)`
2709
2889
  *
2710
2890
  * Default: `primary`
2711
2891
  * */
2712
2892
  variant?: ButtonVariants;
2893
+ /**
2894
+ * Color of the button
2895
+ *
2896
+ * Available choices: `brand` (blue), `neutral` (black), `error` (red), `success` (green), `warning` (orange)
2897
+ *
2898
+ * Default: `brand`
2899
+ * */
2900
+ color?: ButtonColors;
2713
2901
  /**
2714
2902
  * Size of the button
2715
2903
  * Available choices: `small`, `medium`, `large`
@@ -2796,16 +2984,14 @@ interface ButtonGroupProps {
2796
2984
  export enum BUTTON_VARIANTS_ENUM {
2797
2985
  PRIMARY = "primary",
2798
2986
  SECONDARY = "secondary",
2799
- TERTIARY = "tertiary",
2987
+ TERTIARY = "tertiary"
2988
+ }
2989
+ enum BUTTON_COLORS_ENUM {
2990
+ BRAND = "brand",
2991
+ NEUTRAL = "neutral",
2992
+ ERROR = "error",
2800
2993
  SUCCESS = "success",
2801
- DANGER = "danger",
2802
- WARNING = "warning",
2803
- PRIMARY_OUTLINED = "primary-outlined",
2804
- SECONDARY_OUTLINED = "secondary-outlined",
2805
- TERTIARY_OUTLINED = "tertiary-outlined",
2806
- SUCCESS_OUTLINED = "success-outlined",
2807
- DANGER_OUTLINED = "danger-outlined",
2808
- WARNING_OUTLINED = "warning-outlined"
2994
+ WARNING = "warning"
2809
2995
  }
2810
2996
  export enum BUTTON_SIZES_ENUM {
2811
2997
  SMALL = "small",
@@ -2859,10 +3045,14 @@ export interface AlertProps {
2859
3045
  icon?: grauityIconName | 'auto' | null;
2860
3046
  /**
2861
3047
  * Alert title
3048
+ *
3049
+ * Default: `''`
2862
3050
  * */
2863
3051
  title?: React.ReactNode;
2864
3052
  /**
2865
3053
  * Alert description
3054
+ *
3055
+ * Default: `''`
2866
3056
  * */
2867
3057
  description?: React.ReactNode;
2868
3058
  /**
@@ -2938,7 +3128,7 @@ export interface AlertBannerProps {
2938
3128
  /**
2939
3129
  * Variant of the alert banner
2940
3130
  *
2941
- * Available choices: `'primary'`, `'secondary'`, `'tertiary'`, `'success'`, `'danger'`, `'warning'`
3131
+ * Available choices: `'primary'`, `'secondary'`, `'tertiary'`, `'success'`, `'error'`, `'warning'`
2942
3132
  *
2943
3133
  * Default: `'primary'`
2944
3134
  * */
@@ -3018,14 +3208,6 @@ export interface AlertBannerProps {
3018
3208
  * An alert component is used to display important messages to the user.
3019
3209
  */
3020
3210
  export const NSAlert: React.ForwardRefExoticComponent<AlertProps & React.RefAttributes<HTMLDivElement>>;
3021
- export enum ALERT_VARIANTS_ENUM {
3022
- PRIMARY = "primary",
3023
- SUCCESS = "success",
3024
- WARNING = "warning",
3025
- ERROR = "error",
3026
- DEFAULT = "default"
3027
- }
3028
- export const ALERT_VARIANTS: ALERT_VARIANTS_ENUM[];
3029
3211
  /**
3030
3212
  * An alert banner is a component that is used to typically display
3031
3213
  * important messages to the user. It is normally shown at the top of the page.
@@ -3416,6 +3598,10 @@ interface ModalStep {
3416
3598
  * Variant for the button
3417
3599
  * */
3418
3600
  buttonVariant?: ButtonVariants | null;
3601
+ /**
3602
+ * Color for the button
3603
+ * */
3604
+ buttonColor?: ButtonColors | null;
3419
3605
  }
3420
3606
  export interface ModalProps {
3421
3607
  /**
@@ -3768,10 +3954,18 @@ export interface ConfirmationDialogProps {
3768
3954
  * Variant for the cancel button
3769
3955
  * */
3770
3956
  cancelButtonVariant?: ButtonVariants;
3957
+ /**
3958
+ * Color for the cancel button
3959
+ * */
3960
+ cancelButtonColor?: ButtonColors;
3771
3961
  /**
3772
3962
  * Variant for the confirm button
3773
3963
  * */
3774
3964
  confirmButtonVariant?: ButtonVariants;
3965
+ /**
3966
+ * Color for the confirm button
3967
+ * */
3968
+ confirmButtonColor?: ButtonColors;
3775
3969
  /**
3776
3970
  * Determines if the close button should be shown
3777
3971
  * Available choices: `true`, `false`
@@ -4837,6 +5031,11 @@ export interface CarouselProps {
4837
5031
  * @default null
4838
5032
  */
4839
5033
  onScrollEnd?: () => void;
5034
+ /**
5035
+ * Gap between the carousel header and the items row in pixels.
5036
+ * @default 12
5037
+ */
5038
+ headerGap?: number;
4840
5039
  /**
4841
5040
  * Gap between the carousel items in pixels.
4842
5041
  * @default 12
@@ -4877,8 +5076,19 @@ export interface FormRowProps {
4877
5076
  * @returns
4878
5077
  */
4879
5078
  export const NSFormRow: (props: FormRowProps) => JSX.Element;
5079
+ type FormTextColors = `${TEXT_COLORS}`;
4880
5080
  export interface LabelProps extends StyledLabelProps {
5081
+ /**
5082
+ * The name of the label. Required for use with form elements' `htmlFor` attribute.
5083
+ */
4881
5084
  name: string;
5085
+ /**
5086
+ * The color of the label. Defaults to 'secondary'.
5087
+ */
5088
+ color?: FormTextColors;
5089
+ /**
5090
+ * The content of the label.
5091
+ */
4882
5092
  children: React.ReactNode;
4883
5093
  }
4884
5094
  export interface HelpMessageProps {
@@ -4944,6 +5154,7 @@ enum TEXT_FIELD_SIZES {
4944
5154
  EXTRA_LARGE = "extra-large"
4945
5155
  }
4946
5156
  type TextFieldSize = `${TEXT_FIELD_SIZES}`;
5157
+ type TextFieldColors = `${ACTION_COLORS}`;
4947
5158
  type InputAdornmentType = React.ReactNode;
4948
5159
  interface InputAdornments {
4949
5160
  /**
@@ -4960,166 +5171,151 @@ interface InputAdornments {
4960
5171
  export interface TextFieldProps {
4961
5172
  /**
4962
5173
  * The name of the input field. Required.
4963
- * @type {string}
4964
5174
  */
4965
5175
  name: string;
4966
5176
  /**
4967
5177
  * The label for the input field.
4968
- * @type {string}
4969
5178
  */
4970
5179
  label?: string;
4971
5180
  /**
4972
5181
  * Whether the input field is required.
4973
- * @type {boolean}
4974
5182
  * @default false
4975
5183
  */
4976
5184
  isRequired?: boolean;
4977
5185
  /**
4978
5186
  * The placeholder text for the input field.
4979
- * @type {string}
4980
5187
  */
4981
5188
  placeholder?: string;
4982
5189
  /**
4983
5190
  * The validation message to display when the input field is invalid.
4984
- * @type {string}
4985
5191
  */
4986
5192
  validationMessage?: string;
4987
5193
  /**
4988
5194
  * The input value.
4989
- * @type {string}
4990
5195
  * @default ''
4991
5196
  */
4992
5197
  value?: string;
4993
5198
  /**
4994
5199
  * Whether to disable the input field.
4995
- * @type {boolean}
4996
5200
  * @default false
4997
5201
  */
4998
5202
  isDisabled?: boolean;
5203
+ /**
5204
+ * Whether the input field is read-only.
5205
+ * @default false
5206
+ */
5207
+ isReadOnly?: boolean;
4999
5208
  /**
5000
5209
  * The function to call when the input value is changed.
5001
- * @type {(event: React.ChangeEvent<HTMLInputElement>) => void}
5002
5210
  */
5003
5211
  onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
5004
5212
  /**
5005
5213
  * The function to call when the input field is clicked (focused).
5006
- * @type {(event: React.MouseEvent<HTMLInputElement>) => void}
5007
5214
  */
5008
5215
  onClick?: (event: React.MouseEvent<HTMLInputElement>) => void;
5009
5216
  /**
5010
5217
  * The function to call when the input field is blurred (unfocused/clicked away).
5011
- * @type {(event: React.FocusEvent<HTMLInputElement>) => void}
5012
5218
  */
5013
5219
  onBlur?: (event: React.FocusEvent<HTMLInputElement>) => void;
5014
5220
  /**
5015
5221
  * The error message to display when the input field is invalid.
5016
- * @type {string}
5017
5222
  */
5018
5223
  errorMessage?: string;
5019
5224
  /**
5020
5225
  * The autocomplete attribute for the input field.
5021
- * @type {string}
5022
5226
  * @default 'on'
5023
5227
  */
5024
5228
  autoComplete?: string;
5025
5229
  /**
5026
5230
  * Whether the input field should autofocus.
5027
- * @type {boolean}
5028
5231
  * @default false
5029
5232
  */
5030
5233
  autoFocus?: boolean;
5031
5234
  /**
5032
5235
  * The help message to display below the input field.
5033
- * @type {string}
5034
5236
  */
5035
5237
  helpMessage?: string;
5036
5238
  /**
5037
5239
  * The maximum length of the input field.
5038
- * @type {number}
5039
5240
  */
5040
5241
  maxLength?: number;
5041
5242
  /**
5042
5243
  * The size of the input field.
5043
- * @type {string}
5044
5244
  * @default 'medium'
5045
5245
  */
5046
5246
  size?: TextFieldSize;
5047
5247
  /**
5048
5248
  * The adornments to display on the input field.
5049
- * @type {InputAdornments}
5050
5249
  */
5051
5250
  adornments?: InputAdornments;
5251
+ /**
5252
+ * The color of the input field.
5253
+ */
5254
+ color?: TextFieldColors;
5052
5255
  }
5053
5256
  export const NSTextField: (props: TextFieldProps) => JSX.Element;
5054
5257
  type VARIANTS = `${VARIANTS_SIZES}`;
5258
+ type TextAreaColors = TextFieldColors;
5055
5259
  export interface TextAreaProps {
5056
5260
  /**
5057
5261
  * The name of the input field. Required.
5058
- * @type {string}
5059
5262
  */
5060
5263
  name: string;
5061
5264
  /**
5062
5265
  * The label for the input field.
5063
- * @type {string}
5064
5266
  */
5065
5267
  label?: string;
5066
5268
  /**
5067
5269
  * variant of the input field.
5068
- * @type {VARIANTS}
5069
5270
  * @default 'medium'
5070
5271
  */
5071
5272
  size?: VARIANTS;
5072
5273
  /**
5073
5274
  * Whether the input field is required.
5074
- * @type {boolean}
5075
5275
  * @default false
5076
5276
  */
5077
5277
  isRequired?: boolean;
5078
5278
  /**
5079
5279
  * The placeholder text for the input field.
5080
- * @type {string}
5081
5280
  */
5082
5281
  placeholder?: string;
5083
5282
  /**
5084
5283
  * The validation message to display when the input field is invalid.
5085
- * @type {string}
5086
5284
  */
5087
5285
  validationMessage?: string;
5088
5286
  /**
5089
5287
  * The input value.
5090
- * @type {string}
5091
5288
  * @default ''
5092
5289
  */
5093
5290
  value?: string;
5094
5291
  /**
5095
5292
  * Whether to disable the input field.
5096
- * @type {boolean}
5097
5293
  * @default false
5098
5294
  */
5099
5295
  isDisabled?: boolean;
5296
+ /**
5297
+ * Whether the input field is read-only.
5298
+ * @default false
5299
+ */
5300
+ isReadOnly?: boolean;
5100
5301
  /**
5101
5302
  * The function to call when the input value is changed.
5102
- * @type {(event: React.ChangeEvent<HTMLTextAreaElement>) => void}
5103
5303
  */
5104
5304
  onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;
5105
5305
  /**
5106
5306
  * The function to call when the input field is clicked (focused).
5107
- * @type {(event: React.MouseEvent<HTMLTextAreaElement>) => void}
5108
5307
  */
5109
5308
  onClick?: (event: React.MouseEvent<HTMLTextAreaElement>) => void;
5110
5309
  /**
5111
5310
  * The function to call when the input field is blurred (unfocused/clicked away).
5112
- * @type {(event: React.FocusEvent<HTMLTextAreaElement>) => void}
5113
5311
  */
5114
5312
  onBlur?: (event: React.FocusEvent<HTMLTextAreaElement>) => void;
5115
5313
  /**
5116
5314
  * The error message to display when the input field is invalid.
5117
- * @type {string}
5118
5315
  */
5119
5316
  errorMessage?: string;
5120
5317
  /**
5121
5318
  * The autocomplete attribute for the input field.
5122
- * @type {string}
5123
5319
  * @default 'on'
5124
5320
  */
5125
5321
  autoComplete?: string;
@@ -5131,17 +5327,14 @@ export interface TextAreaProps {
5131
5327
  autoFocus?: boolean;
5132
5328
  /**
5133
5329
  * The help message to display below the input field.
5134
- * @type {string}
5135
5330
  */
5136
5331
  helpMessage?: string;
5137
5332
  /**
5138
5333
  * The number of columns for the input field.
5139
- * @type {number}
5140
5334
  */
5141
5335
  cols?: number;
5142
5336
  /**
5143
5337
  * The number of rows for the input field.
5144
- * @type {number}
5145
5338
  */
5146
5339
  rows?: number;
5147
5340
  /**
@@ -5150,11 +5343,10 @@ export interface TextAreaProps {
5150
5343
  */
5151
5344
  maxLength?: number;
5152
5345
  /**
5153
- * Whether the input field is read-only.
5154
- * @type {boolean}
5155
- * @default false
5346
+ * Color of the textarea input field.
5347
+ * @default 'brand'
5156
5348
  */
5157
- readOnly?: boolean;
5349
+ color?: TextAreaColors;
5158
5350
  }
5159
5351
  enum VARIANTS_SIZES {
5160
5352
  SMALL = "small",
@@ -5165,6 +5357,7 @@ enum VARIANTS_SIZES {
5165
5357
  export const NSTextArea: (props: TextAreaProps) => JSX.Element;
5166
5358
  type CheckboxSize = 'small' | 'medium' | 'large';
5167
5359
  type CheckboxState = 'default' | 'error' | 'success';
5360
+ type CheckboxColors = `${ACTION_COLORS}`;
5168
5361
  export interface CheckboxProps {
5169
5362
  /**
5170
5363
  * The name of the checkbox group.
@@ -5187,6 +5380,7 @@ export interface CheckboxProps {
5187
5380
  size?: CheckboxSize;
5188
5381
  /**
5189
5382
  * The state of the checkbox.
5383
+ * @deprecated Use color prop instead
5190
5384
  * @default default
5191
5385
  */
5192
5386
  state?: CheckboxState;
@@ -5230,6 +5424,11 @@ export interface CheckboxProps {
5230
5424
  * @default undefined
5231
5425
  */
5232
5426
  className?: string;
5427
+ /**
5428
+ * The color of the checkbox.
5429
+ * @default brand
5430
+ */
5431
+ color?: CheckboxColors;
5233
5432
  }
5234
5433
  /**
5235
5434
  * A checkbox is a form element that allows the user to select one or more options from a set of choices.
@@ -5237,6 +5436,7 @@ export interface CheckboxProps {
5237
5436
  export const NSCheckbox: React.FC<CheckboxProps>;
5238
5437
  type RadioButtonSize = 'small' | 'medium' | 'large';
5239
5438
  type RadioButtonState = 'default' | 'error' | 'success';
5439
+ type RadioButtonColors = `${ACTION_COLORS}`;
5240
5440
  export interface RadioButtonProps {
5241
5441
  /**
5242
5442
  * The name of the radio button group.
@@ -5264,6 +5464,7 @@ export interface RadioButtonProps {
5264
5464
  /**
5265
5465
  * The state of the radio button.
5266
5466
  * @default default
5467
+ * @deprecated Use color prop instead
5267
5468
  */
5268
5469
  state?: RadioButtonState;
5269
5470
  /**
@@ -5296,6 +5497,11 @@ export interface RadioButtonProps {
5296
5497
  * @default undefined
5297
5498
  */
5298
5499
  className?: string;
5500
+ /**
5501
+ * The color of the radio button.
5502
+ * @default brand
5503
+ */
5504
+ color?: RadioButtonColors;
5299
5505
  }
5300
5506
  export const NSRadioButton: (props: RadioButtonProps) => JSX.Element;
5301
5507
  type PaginationJustifyContent = 'space-between' | 'space-around' | 'space-evenly' | 'flex-start' | 'flex-end';
@@ -5324,20 +5530,35 @@ export interface PaginationProps {
5324
5530
  */
5325
5531
  justifyContent?: PaginationJustifyContent;
5326
5532
  /**
5327
- * The type of the pagination button. Defaults to 'tertiary'.
5328
- * @default 'tertiary'
5533
+ * The type of the pagination button. Defaults to 'secondary'.
5534
+ * @default 'secondary'
5329
5535
  */
5330
5536
  buttonVariant?: ButtonVariants;
5331
5537
  /**
5332
- * The type of the active pagination button. Defaults to 'secondary'.
5333
- * @default 'secondary'
5538
+ * The color of the pagination button. Defaults to 'neutral'.
5539
+ * @default 'neutral'
5540
+ */
5541
+ buttonColor?: ButtonColors;
5542
+ /**
5543
+ * The type of the active pagination button. Defaults to 'primary'.
5544
+ * @default 'primary'
5334
5545
  */
5335
5546
  activeButtonVariant?: ButtonVariants;
5336
5547
  /**
5337
- * The type of the control pagination button. Defaults to 'tertiary'.
5338
- * @default 'tertiary'
5548
+ * The color of the active pagination button. Defaults to 'neutral'.
5549
+ * @default 'neutral'
5550
+ */
5551
+ activeButtonColor?: ButtonColors;
5552
+ /**
5553
+ * The type of the control pagination button. Defaults to 'secondary'.
5554
+ * @default 'secondary'
5339
5555
  */
5340
5556
  controlButtonVariant?: ButtonVariants;
5557
+ /**
5558
+ * The color of the control pagination button. Defaults to 'neutral'.
5559
+ * @default 'neutral'
5560
+ */
5561
+ controlButtonColor?: ButtonColors;
5341
5562
  /**
5342
5563
  * The class name of the pagination.
5343
5564
  * @default ''
@@ -5349,6 +5570,7 @@ export interface PaginationProps {
5349
5570
  */
5350
5571
  export const NSPagination: (props: PaginationProps) => JSX.Element;
5351
5572
  export const NSSuccessMessage: (props: SuccessMessageProps) => JSX.Element;
5573
+ type OtpFieldColors = TextFieldColors;
5352
5574
  export interface OtpInputFieldProps {
5353
5575
  /**
5354
5576
  * The label displayed above the OTP input fields.
@@ -5412,8 +5634,13 @@ export interface OtpInputFieldProps {
5412
5634
  * @default 'OTP is correct'
5413
5635
  */
5414
5636
  successMessage?: string;
5637
+ /**
5638
+ * The color of the OTP input fields.
5639
+ * @default 'brand'
5640
+ */
5641
+ color?: OtpFieldColors;
5415
5642
  }
5416
- export const NSOtpInput: ({ label, name, length, onChange, style, isOtpCorrect, isOtpWrong, isDisabled, errorMessage, successMessage, }: OtpInputFieldProps) => JSX.Element;
5643
+ export const NSOtpInput: (props: OtpInputFieldProps) => JSX.Element;
5417
5644
  export enum NSDropdownMenuBaseItemType {
5418
5645
  SUB_HEADER = "subheader",
5419
5646
  DIVIDER = "divider",