@newtonschool/grauity 3.2.0-beta.1 → 3.2.0

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 (54) hide show
  1. package/dist/common/types.d.ts +2 -2
  2. package/dist/index.d.ts +86 -23
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/main.cjs +1 -1
  5. package/dist/main.cjs.map +1 -1
  6. package/dist/module.mjs +1 -1
  7. package/dist/module.mjs.map +1 -1
  8. package/dist/ui/elements/Accordion/types.d.ts +3 -3
  9. package/dist/ui/elements/Alert/constants.d.ts +0 -98
  10. package/dist/ui/elements/Alert/constants.d.ts.map +1 -1
  11. package/dist/ui/elements/AlertBanner/AlertBanner.d.ts.map +1 -1
  12. package/dist/ui/elements/AlertBanner/types.d.ts +1 -1
  13. package/dist/ui/elements/Calendar/CalendarEvent/CalendarEvent.styles.d.ts.map +1 -1
  14. package/dist/ui/elements/Calendar/CalendarEvent/types.d.ts +4 -4
  15. package/dist/ui/elements/Calendar/MonthlyCalendar/MonthlyCalendar.d.ts.map +1 -1
  16. package/dist/ui/elements/Calendar/MonthlyCalendarEvent/types.d.ts +3 -3
  17. package/dist/ui/elements/Calendar/WeeklyCalendar/WeeklyCalendar.styles.d.ts.map +1 -1
  18. package/dist/ui/elements/Drawer/Drawer.d.ts +5 -0
  19. package/dist/ui/elements/Drawer/Drawer.d.ts.map +1 -0
  20. package/dist/ui/elements/Drawer/Drawer.styles.d.ts +5 -0
  21. package/dist/ui/elements/Drawer/Drawer.styles.d.ts.map +1 -0
  22. package/dist/ui/elements/Drawer/constants.d.ts +2 -0
  23. package/dist/ui/elements/Drawer/constants.d.ts.map +1 -0
  24. package/dist/ui/elements/Drawer/index.d.ts +3 -0
  25. package/dist/ui/elements/Drawer/index.d.ts.map +1 -0
  26. package/dist/ui/elements/Drawer/types.d.ts +70 -0
  27. package/dist/ui/elements/Drawer/types.d.ts.map +1 -0
  28. package/dist/ui/elements/DropdownMenu/DropdownMenu.d.ts.map +1 -1
  29. package/dist/ui/elements/DropdownMenu/types.d.ts +3 -0
  30. package/dist/ui/elements/DropdownMenu/types.d.ts.map +1 -1
  31. package/dist/ui/elements/DropdownMenu/utils.d.ts +9 -0
  32. package/dist/ui/elements/DropdownMenu/utils.d.ts.map +1 -1
  33. package/dist/ui/elements/Modal/types.d.ts +1 -1
  34. package/dist/ui/elements/MultiSelectDropdown/MultiSelectDropdown.styles.d.ts.map +1 -1
  35. package/dist/ui/elements/Overlay/types.d.ts +1 -1
  36. package/dist/ui/elements/Placeholder/types.d.ts +1 -1
  37. package/dist/ui/elements/SelectDropdown/SelectDropdown.styles.d.ts.map +1 -1
  38. package/dist/ui/elements/Tab/Tab.d.ts.map +1 -1
  39. package/dist/ui/elements/Tab/Tab.styles.d.ts.map +1 -1
  40. package/dist/ui/elements/Tab/constants.d.ts +1 -1
  41. package/dist/ui/elements/Tab/constants.d.ts.map +1 -1
  42. package/dist/ui/elements/Tab/types.d.ts +10 -5
  43. package/dist/ui/elements/Tab/types.d.ts.map +1 -1
  44. package/dist/ui/elements/TabList/TabList.d.ts.map +1 -1
  45. package/dist/ui/elements/TabList/constants.d.ts +1 -1
  46. package/dist/ui/elements/TabList/constants.d.ts.map +1 -1
  47. package/dist/ui/elements/TabList/index.styles.d.ts.map +1 -1
  48. package/dist/ui/elements/TabList/types.d.ts +2 -2
  49. package/dist/ui/elements/Table/Table.styles.d.ts.map +1 -1
  50. package/dist/ui/elements/Tabs/Tabs.styles.d.ts.map +1 -1
  51. package/dist/ui/elements/Tooltip/types.d.ts +4 -4
  52. package/dist/ui/index.d.ts +1 -0
  53. package/dist/ui/index.d.ts.map +1 -1
  54. package/package.json +1 -1
@@ -11,10 +11,10 @@ export interface StyledDivProps extends React.HTMLAttributes<HTMLDivElement> {
11
11
  'data-testid'?: string;
12
12
  }
13
13
  /**
14
- * Interface representing the properties for a styled div component.
14
+ * Interface representing the properties for a styled span component.
15
15
  *
16
16
  * @extends React.HTMLAttributes<HTMLSpanElement>
17
- * @property {React.Ref<HTMLSpanElement>} [ref] - Optional ref for the div element.
17
+ * @property {React.Ref<HTMLSpanElement>} [ref] - Optional ref for the span element.
18
18
  */
19
19
  export interface StyledSpanProps extends React.HTMLAttributes<HTMLSpanElement> {
20
20
  ref?: React.Ref<HTMLSpanElement>;
package/dist/index.d.ts CHANGED
@@ -3162,7 +3162,7 @@ export interface AlertBannerProps {
3162
3162
  /**
3163
3163
  * Alert banner padding
3164
3164
  *
3165
- * Default: `'var(--spacing-8px, 8px)'`
3165
+ * Default: `'var(--spacing-4px, 4px) var(--spacing-8px, 8px)'` if action buttons/close button are present else `'var(--spacing-8px, 8px)'`
3166
3166
  * */
3167
3167
  padding?: string;
3168
3168
  /**
@@ -3571,7 +3571,7 @@ export interface OverlayProps {
3571
3571
  shouldBlurOverlay?: boolean;
3572
3572
  /**
3573
3573
  * Color of the overlay
3574
- * @default 'var(--alpha-overlay, rgba(22, 25, 29, 0.8))'
3574
+ * @default 'var(--bg-subtle-alpha-overlay, #16191dcc)'
3575
3575
  */
3576
3576
  overlayColor?: string;
3577
3577
  /**
@@ -3793,7 +3793,7 @@ export interface ModalProps {
3793
3793
  */
3794
3794
  overflow?: string;
3795
3795
  /**
3796
- * Border for the modal. By default, it is `1px solid var(--border, #e1e5ea)`
3796
+ * Border for the modal. By default, it is `1px solid var(--border-subtle-primary-default, #e1e5ea)`
3797
3797
  * */
3798
3798
  border?: string;
3799
3799
  /**
@@ -4508,17 +4508,17 @@ export interface AccordionProps {
4508
4508
  suffix?: React.ReactNode;
4509
4509
  /**
4510
4510
  * Background color of the accordion header.
4511
- * @default var(--bg-secondary, #F6F7F9)
4511
+ * @default var(--bg-subtle-secondary-default, #f6f7f9)
4512
4512
  */
4513
4513
  headerBackgroundColor?: string;
4514
4514
  /**
4515
4515
  * Background color of the accordion content.
4516
- * @default var(--bg-secondary, #F6F7F9)
4516
+ * @default var(--bg-subtle-secondary-default, #f6f7f9)
4517
4517
  */
4518
4518
  contentBackgroundColor?: string;
4519
4519
  /**
4520
4520
  * Color of the accordion toggle icon.
4521
- * @default var(--text-primary, #16191D)
4521
+ * @default var(--text-emphasis-primary-default, #16191d)
4522
4522
  */
4523
4523
  iconColor?: string;
4524
4524
  /**
@@ -4641,22 +4641,22 @@ export interface CalendarEventProps {
4641
4641
  minDurationToDisplayTime?: number;
4642
4642
  /**
4643
4643
  * Text color of the event.
4644
- * @default 'var(--text-action2)'
4644
+ * @default 'var(--text-emphasis-invert-primary-default, #ffffff)'
4645
4645
  */
4646
4646
  textColor?: string;
4647
4647
  /**
4648
4648
  * Background color of the event.
4649
- * @default 'var(--bg-action-brand)'
4649
+ * @default 'var(--bg-emphasis-brand-default, #0673f9)'
4650
4650
  */
4651
4651
  backgroundColor?: string;
4652
4652
  /**
4653
4653
  * Border color of the event.
4654
- * @default 'var(--border)'
4654
+ * @default 'var(--border-subtle-primary-default, #e1e5ea)'
4655
4655
  */
4656
4656
  borderColor?: string;
4657
4657
  /**
4658
4658
  * Text color of the chip content.
4659
- * @default 'var(--text-action2)'
4659
+ * @default 'var(--text-emphasis-invert-primary-default, #ffffff)'
4660
4660
  */
4661
4661
  chipTextColor?: string;
4662
4662
  /**
@@ -4669,7 +4669,7 @@ export const NSCalendarEvent: React.ForwardRefExoticComponent<CalendarEventProps
4669
4669
  export interface MonthlyCalendarEventProps extends StyledDivProps {
4670
4670
  /**
4671
4671
  * The background color of the calendar event.
4672
- * @default 'var(--bg-action-brand)'
4672
+ * @default 'var(--bg-emphasis-brand-default, #0673f9)'
4673
4673
  */
4674
4674
  backgroundColor?: string;
4675
4675
  /**
@@ -4697,12 +4697,12 @@ export interface MonthlyCalendarEventProps extends StyledDivProps {
4697
4697
  eventTitle: string;
4698
4698
  /**
4699
4699
  * The color of the event time text.
4700
- * @default 'var(--text-action2)'
4700
+ * @default 'var(--text-emphasis-invert-primary-default, #ffffff)'
4701
4701
  */
4702
4702
  eventTimeColor?: string;
4703
4703
  /**
4704
4704
  * The color of the event title text.
4705
- * @default 'var(--text-action2)'
4705
+ * @default 'var(--text-emphasis-invert-primary-default, #ffffff)'
4706
4706
  */
4707
4707
  eventTitleColor?: string;
4708
4708
  /**
@@ -4820,7 +4820,7 @@ export interface PlaceholderProps {
4820
4820
  margin?: string;
4821
4821
  /**
4822
4822
  * Background color of the placeholder.
4823
- * @default 'var(--bg-tertiary, #EDEFF3)'
4823
+ * @default 'var(--bg-subtle-tertiary-default, #edeff3)'
4824
4824
  */
4825
4825
  backgroundColor?: string;
4826
4826
  /**
@@ -5156,12 +5156,12 @@ export interface TooltipProps {
5156
5156
  isOpen?: boolean | null;
5157
5157
  /**
5158
5158
  * The text color of the tooltip
5159
- * @default 'var(--text-emphasis-invert-primary-default)'
5159
+ * @default 'var(--text-emphasis-invert-primary-default, #ffffff)'
5160
5160
  * */
5161
5161
  color?: string;
5162
5162
  /**
5163
5163
  * The background color of the tooltip
5164
- * @default 'var(--bg-subtle-invert-primary-default)'
5164
+ * @default 'var(--bg-subtle-invert-primary-default, #0b0c0e)'
5165
5165
  * */
5166
5166
  backgroundColor?: string;
5167
5167
  /**
@@ -5896,9 +5896,11 @@ type OptionValue = string | number;
5896
5896
  export type NSDropdownMenuBaseItemSubHeaderProps = {
5897
5897
  type: NSDropdownMenuBaseItemType.SUB_HEADER;
5898
5898
  title: string;
5899
+ scrollToOnOpen?: boolean;
5899
5900
  };
5900
5901
  export type NSDropdownMenuBaseItemDividerProps = {
5901
5902
  type: NSDropdownMenuBaseItemType.DIVIDER;
5903
+ scrollToOnOpen?: boolean;
5902
5904
  };
5903
5905
  export type NSDropdownMenuBaseItemOptionProps = {
5904
5906
  type: NSDropdownMenuBaseItemType.OPTION;
@@ -5908,6 +5910,7 @@ export type NSDropdownMenuBaseItemOptionProps = {
5908
5910
  leftIcon?: grauityIconName;
5909
5911
  rightIcon?: grauityIconName;
5910
5912
  disabled?: boolean;
5913
+ scrollToOnOpen?: boolean;
5911
5914
  };
5912
5915
  export type NSDropdownMenuBaseItemProps = NSDropdownMenuBaseItemSubHeaderProps | NSDropdownMenuBaseItemDividerProps | NSDropdownMenuBaseItemOptionProps;
5913
5916
  export interface NSDropdownMenuProps {
@@ -6622,7 +6625,7 @@ export enum TAB_ICON_POSITIONS_ENUM {
6622
6625
  BOTTOM = "bottom"
6623
6626
  }
6624
6627
  export enum TAB_VARIANT_ENUM {
6625
- BORDER = "border",
6628
+ BORDERED = "bordered",
6626
6629
  ROUNDED = "rounded"
6627
6630
  }
6628
6631
  type TabIconPosition = `${TAB_ICON_POSITIONS_ENUM}`;
@@ -6679,8 +6682,8 @@ export interface TabProps {
6679
6682
  */
6680
6683
  iconPosition?: TabIconPosition;
6681
6684
  /**
6682
- * Variant of the tab, can be 'rounded', 'default', or 'bordered'.
6683
- * @default 'rounded'
6685
+ * Variant of the tab, can be 'rounded', or 'bordered'.
6686
+ * @default 'bordered'
6684
6687
  */
6685
6688
  variant?: TabVariant;
6686
6689
  /**
@@ -6700,13 +6703,18 @@ export interface TabProps {
6700
6703
  onClick?: () => void;
6701
6704
  /**
6702
6705
  * Tab index for keyboard navigation.
6703
- * @default '-1'
6706
+ * @default 0
6704
6707
  */
6705
6708
  tabIndex?: number;
6709
+ /**
6710
+ * ID of the tabpanel associated with the tab.
6711
+ * @default ''
6712
+ */
6713
+ ariaControls?: string;
6706
6714
  }
6707
6715
  export function NSTab(props: TabProps): JSX.Element;
6708
6716
  export enum TAB_LIST_VARIANT_ENUM {
6709
- BORDER = "border",
6717
+ BORDERED = "bordered",
6710
6718
  ROUNDED = "rounded"
6711
6719
  }
6712
6720
  export interface TabListProps {
@@ -6724,8 +6732,8 @@ export interface TabListProps {
6724
6732
  */
6725
6733
  onChange?: (index: number) => void;
6726
6734
  /**
6727
- * Variant of the TabList, can be 'border' or 'rounded'.
6728
- * @default 'default'
6735
+ * Variant of the TabList, can be 'bordered' or 'rounded'.
6736
+ * @default 'bordered'
6729
6737
  */
6730
6738
  variant?: TabVariant;
6731
6739
  /**
@@ -6744,5 +6752,60 @@ export interface TabListProps {
6744
6752
  size?: TabSize;
6745
6753
  }
6746
6754
  export function NSTabList(props: TabListProps): JSX.Element;
6755
+ export interface DrawerProps {
6756
+ /**
6757
+ * The content to be displayed inside the Drawer.
6758
+ */
6759
+ children?: React.ReactNode;
6760
+ /**
6761
+ * Determines whether the Drawer is open or closed.
6762
+ * @default false
6763
+ */
6764
+ isOpen?: boolean;
6765
+ /**
6766
+ * Callback function to be called when the Drawer is requested to be closed.
6767
+ * @default () => {}
6768
+ */
6769
+ onClose?: () => void;
6770
+ /**
6771
+ * If true, the Drawer will take up the full screen.
6772
+ * @default false
6773
+ */
6774
+ fullScreen?: boolean;
6775
+ /**
6776
+ * If true, the Drawer will close when the backdrop is clicked.
6777
+ * @default true
6778
+ */
6779
+ closeOnBackdropClick?: boolean;
6780
+ /**
6781
+ * The width of the Drawer.
6782
+ * @default '30%'
6783
+ */
6784
+ width?: string;
6785
+ /**
6786
+ * The side from which the Drawer opens.
6787
+ * @default 'left'
6788
+ */
6789
+ position?: 'left' | 'right';
6790
+ /**
6791
+ * Additional class name to be passed to the Drawer.
6792
+ */
6793
+ className?: string;
6794
+ /**
6795
+ * Should focus on the first element in the drawer
6796
+ * @default true
6797
+ */
6798
+ shouldFocusOnFirstElement?: boolean;
6799
+ /**
6800
+ * Flag to determine if the background scroll should be disabled.
6801
+ * @default true
6802
+ */
6803
+ shouldDisableScroll?: boolean;
6804
+ /**
6805
+ * Custom styles to override drawer styling
6806
+ */
6807
+ styles?: React.CSSProperties;
6808
+ }
6809
+ export const NSDrawer: React.ForwardRefExoticComponent<DrawerProps & React.RefAttributes<HTMLDivElement>>;
6747
6810
 
6748
6811
  //# sourceMappingURL=index.d.ts.map