@up42/up-components 2.0.0-beta.0 → 2.0.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.
@@ -0,0 +1,11 @@
1
+ import { TypographyOptions } from '@mui/material/styles/createTypography';
2
+ /**
3
+ * @deprecated in favor of Douglas typography conventions
4
+ * @see https://up-components.up42.com/?path=/docs/tokens-typography--docs
5
+ *
6
+ * This theme relies on deprecated tokens and overrides MUI default styles.
7
+ * It should be removed once these tokens are fully deprecated.
8
+ *
9
+ * The updated theme adheres to a new convention, avoiding overrides of MUI default styles.
10
+ */
11
+ export declare const legacyTypography: TypographyOptions;
@@ -5,6 +5,15 @@ export declare type TypographyProps = MUITypographyProps & {
5
5
  variant?: MUITypographyProps['variant'] | 'heading' | 'headingSmall' | 'headingXSmall' | 'body' | 'label' | 'note';
6
6
  };
7
7
  /**
8
+ * Douglas `variant` prop migration helper:
9
+ * - `h1` -> `heading`
10
+ * - `h2` -> `headingSmall`
11
+ * - `h3` -> `headingXSmall`
12
+ * - `body1` -> `body`
13
+ * - `caption` ->`note`
14
+ * - `overline` -> `label`
15
+ * - (no variant) -> `body`
16
+ *
8
17
  * Documentation: https://up-components.up42.com/?path=/docs/data-display-typography--docs
9
18
  */
10
19
  export declare const Typography: React.ForwardRefExoticComponent<Pick<import("@mui/system").SystemProps<import("@mui/material").Theme> & {
@@ -41,4 +41,32 @@ declare module '@mui/material/Typography' {
41
41
  }
42
42
  export declare const MuiTypography: OverridesStyleRules;
43
43
  export declare const typographyTheme: TypographyOptions;
44
- export declare const typographyOverrides: TypographyOptions;
44
+ export declare const typographyOverrides: {
45
+ heading?: import("react").CSSProperties | undefined;
46
+ headingSmall?: import("react").CSSProperties | undefined;
47
+ headingXSmall?: import("react").CSSProperties | undefined;
48
+ body?: import("react").CSSProperties | undefined;
49
+ label?: import("react").CSSProperties | undefined;
50
+ note?: import("react").CSSProperties | undefined;
51
+ button?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
52
+ caption?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
53
+ h1?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
54
+ h2?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
55
+ h3?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
56
+ h4?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
57
+ h5?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
58
+ h6?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
59
+ overline?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
60
+ subtitle1?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
61
+ subtitle2?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
62
+ body1?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
63
+ body2?: import("@mui/material/styles/createTypography").TypographyStyleOptions | undefined;
64
+ allVariants?: import("react").CSSProperties | undefined;
65
+ fontFamily?: import("csstype").Property.FontFamily | undefined;
66
+ fontSize?: number | undefined;
67
+ fontWeightLight?: import("csstype").Property.FontWeight | undefined;
68
+ fontWeightRegular?: import("csstype").Property.FontWeight | undefined;
69
+ fontWeightMedium?: import("csstype").Property.FontWeight | undefined;
70
+ fontWeightBold?: import("csstype").Property.FontWeight | undefined;
71
+ htmlFontSize?: number | undefined;
72
+ };
@@ -58,4 +58,5 @@ export { formatDate } from './utils/helpers/formatDate';
58
58
  export { formatFileSize } from './utils/helpers/formatFileSize';
59
59
  export { useQueryParams } from './utils/hooks/useQueryParams';
60
60
  export { useRemotePagination, type PaginatedResponse } from './utils/hooks/useRemotePagination';
61
+ export { useDebounce } from './utils/hooks/useDebounce';
61
62
  export { useAlert, type CreateAlertProps } from './global/providers/AlertProvider/AlertProvider';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * useDebounce is a generic React Hook that returns a debounced version of a given value.
3
+ * @param {T} value - The value to debounce.
4
+ * @param {number} [delay=500] - The debouncing delay in milliseconds.
5
+ * @returns {T} The debounced value.
6
+ * Documentation: https://up-components.up42.com/?path=/docs/utils--docs#usedebounce
7
+ */
8
+ export declare const useDebounce: <T>(value: T, delay?: number) => T;
@@ -0,0 +1 @@
1
+ export {};
package/dist/index.d.ts CHANGED
@@ -90,6 +90,15 @@ declare type TypographyProps = TypographyProps$1 & {
90
90
  variant?: TypographyProps$1['variant'] | 'heading' | 'headingSmall' | 'headingXSmall' | 'body' | 'label' | 'note';
91
91
  };
92
92
  /**
93
+ * Douglas `variant` prop migration helper:
94
+ * - `h1` -> `heading`
95
+ * - `h2` -> `headingSmall`
96
+ * - `h3` -> `headingXSmall`
97
+ * - `body1` -> `body`
98
+ * - `caption` ->`note`
99
+ * - `overline` -> `label`
100
+ * - (no variant) -> `body`
101
+ *
93
102
  * Documentation: https://up-components.up42.com/?path=/docs/data-display-typography--docs
94
103
  */
95
104
  declare const Typography: React__default.ForwardRefExoticComponent<Pick<_mui_system.SystemProps<_mui_material.Theme> & {
@@ -2688,6 +2697,15 @@ declare const useRemotePagination: (fetchingHook: ({ params }: {
2688
2697
  [paramName: string]: string;
2689
2698
  } | undefined) => UseRemotePaginationResponse;
2690
2699
 
2700
+ /**
2701
+ * useDebounce is a generic React Hook that returns a debounced version of a given value.
2702
+ * @param {T} value - The value to debounce.
2703
+ * @param {number} [delay=500] - The debouncing delay in milliseconds.
2704
+ * @returns {T} The debounced value.
2705
+ * Documentation: https://up-components.up42.com/?path=/docs/utils--docs#usedebounce
2706
+ */
2707
+ declare const useDebounce: <T>(value: T, delay?: number) => T;
2708
+
2691
2709
  declare type CreateAlertProps = {
2692
2710
  title?: string;
2693
2711
  message: string | ElementType;
@@ -2712,4 +2730,4 @@ declare type ContextState = {
2712
2730
  */
2713
2731
  declare const useAlert: () => ContextState;
2714
2732
 
2715
- export { Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CodeInline, type CodeInlineProps, CodeSnippet, type CodeSnippetItemProps, type CodeSnippetProps, ContactBox, type ContactBoxProps, ControlButton, type ControlButtonProps, CopyButton, type CopyButtonProps, type CreateAlertProps, DataGrid, type DataGridProps, type DatePickerDateType, DateTime, type DateTimeProps, Divider, type DividerProps, DocumentationPopover, type DocumentationPopoverProps, EmptyState, type EmptyStateProps, FormCheckbox, type FormCheckboxProps, FormDatePicker, type FormDatePickerProps, FormDateRangePicker, type FormDateRangePickerProps, FormInput, type FormInputProps, FormRadio, type FormRadioProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, GridContainer, type GridContainerProps, GridItem, type GridItemProps, Icon, type IconProps, InfoCard, type InfoCardProps, InfoModal, type InfoModalProps, InfoPopover, type InfoPopoverProps, Input, type InputProps, Link, type LinkProps, Loading, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, Modal, type ModalProps, NotFound, type NotFoundProps, PageContainer, type PageContainerProps, PageHeader, type PageHeaderProps, type PaginatedResponse, Popover, type PopoverProps, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, Switch, type SwitchProps, Tab, TabGroup, type TabGroupProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableSortLabel, type TableSortLabelProps, Tabs, type TabsProps, Tag, type TagProps, Tooltip, type TooltipProps, Typography, type TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useQueryParams, useRemotePagination };
2733
+ export { Alert, type AlertProps, Avatar, type AvatarProps, Badge, type BadgeProps, Banner, type BannerProps, Box, type BoxProps, Button, type ButtonProps, Checkbox, type CheckboxProps, CodeInline, type CodeInlineProps, CodeSnippet, type CodeSnippetItemProps, type CodeSnippetProps, ContactBox, type ContactBoxProps, ControlButton, type ControlButtonProps, CopyButton, type CopyButtonProps, type CreateAlertProps, DataGrid, type DataGridProps, type DatePickerDateType, DateTime, type DateTimeProps, Divider, type DividerProps, DocumentationPopover, type DocumentationPopoverProps, EmptyState, type EmptyStateProps, FormCheckbox, type FormCheckboxProps, FormDatePicker, type FormDatePickerProps, FormDateRangePicker, type FormDateRangePickerProps, FormInput, type FormInputProps, FormRadio, type FormRadioProps, FormSelect, type FormSelectProps, FormSwitch, type FormSwitchProps, GridContainer, type GridContainerProps, GridItem, type GridItemProps, Icon, type IconProps, InfoCard, type InfoCardProps, InfoModal, type InfoModalProps, InfoPopover, type InfoPopoverProps, Input, type InputProps, Link, type LinkProps, Loading, type LoadingProps, Menu, MenuItem, type MenuItemProps, type MenuProps, Modal, type ModalProps, NotFound, type NotFoundProps, PageContainer, type PageContainerProps, PageHeader, type PageHeaderProps, type PaginatedResponse, Popover, type PopoverProps, Radio, type RadioProps, Select, type SelectProps, Slider, type SliderProps, Switch, type SwitchProps, Tab, TabGroup, type TabGroupProps, type TabProps, Table, TableBody, type TableBodyProps, TableCell, type TableCellProps, TableContainer, type TableContainerProps, TableFooter, type TableFooterProps, TableHead, type TableHeadProps, TablePagination, type TablePaginationProps, type TableProps, TableRow, type TableRowProps, TableSortLabel, type TableSortLabelProps, Tabs, type TabsProps, Tag, type TagProps, Tooltip, type TooltipProps, Typography, type TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useDebounce, useQueryParams, useRemotePagination };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up42/up-components",
3
- "version": "2.0.0-beta.0",
3
+ "version": "2.0.0",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",
@@ -28,7 +28,7 @@
28
28
  "format": "prettier --write ./**/*.mdx"
29
29
  },
30
30
  "dependencies": {
31
- "@up42/design-system-tokens": "^6.0.0-beta.0",
31
+ "@up42/design-system-tokens": "^6.0.0",
32
32
  "dayjs": "^1.11.7",
33
33
  "prismjs": "^1.29.0"
34
34
  },