@up42/up-components 5.0.0-tokens.1 → 5.0.0-tokens.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 (57) hide show
  1. package/README.md +14 -2
  2. package/dist/cjs/index.js +2 -2
  3. package/dist/cjs/types/components/EditTagsButton/EditTagsButton.d.ts +9 -0
  4. package/dist/cjs/types/components/EditTagsButton/EditTagsButton.test.d.ts +1 -0
  5. package/dist/cjs/types/components/EditTagsButton/SearchTags.d.ts +6 -0
  6. package/dist/cjs/types/components/EditTagsButton/SearchTags.test.d.ts +1 -0
  7. package/dist/cjs/types/components/EditTagsButton/TagsManager.d.ts +8 -0
  8. package/dist/cjs/types/components/EditTagsButton/TagsManager.test.d.ts +1 -0
  9. package/dist/cjs/types/components/FeatureCard/PlaceholderArea.d.ts +4 -0
  10. package/dist/cjs/types/components/FeatureCardHeader/FeatureCardHeader.d.ts +11 -0
  11. package/dist/cjs/types/components/FeatureCardHeaderActions/FeatureCardHeaderActions.d.ts +21 -0
  12. package/dist/cjs/types/components/Logo/Logo.d.ts +2 -2
  13. package/dist/cjs/types/components/StatusLight/StatusLight.d.ts +46 -0
  14. package/dist/cjs/types/components/StatusLight/StatusLight.test.d.ts +1 -0
  15. package/dist/cjs/types/components/TagsList/MoreTags.d.ts +4 -0
  16. package/dist/cjs/types/components/TagsList/MoreTags.test.d.ts +1 -0
  17. package/dist/cjs/types/components/TagsList/Tags.d.ts +8 -0
  18. package/dist/cjs/types/components/TagsList/Tags.test.d.ts +1 -0
  19. package/dist/cjs/types/components/TagsList/TagsList.d.ts +6 -0
  20. package/dist/cjs/types/components/TagsList/TagsList.test.d.ts +1 -0
  21. package/dist/cjs/types/global/icons/index.d.ts +1 -0
  22. package/dist/cjs/types/global/logos/index.d.ts +1 -0
  23. package/dist/cjs/types/index.d.ts +6 -0
  24. package/dist/cjs/types/utils/hooks/useToggle.d.ts +24 -0
  25. package/dist/cjs/types/utils/hooks/useToggle.test.d.ts +1 -0
  26. package/dist/esm/index.js +2 -2
  27. package/dist/esm/types/components/EditTagsButton/EditTagsButton.d.ts +9 -0
  28. package/dist/esm/types/components/EditTagsButton/EditTagsButton.test.d.ts +1 -0
  29. package/dist/esm/types/components/EditTagsButton/SearchTags.d.ts +6 -0
  30. package/dist/esm/types/components/EditTagsButton/SearchTags.test.d.ts +1 -0
  31. package/dist/esm/types/components/EditTagsButton/TagsManager.d.ts +8 -0
  32. package/dist/esm/types/components/EditTagsButton/TagsManager.test.d.ts +1 -0
  33. package/dist/esm/types/components/FeatureCard/PlaceholderArea.d.ts +4 -0
  34. package/dist/esm/types/components/FeatureCardHeader/FeatureCardHeader.d.ts +11 -0
  35. package/dist/esm/types/components/FeatureCardHeaderActions/FeatureCardHeaderActions.d.ts +21 -0
  36. package/dist/esm/types/components/Logo/Logo.d.ts +2 -2
  37. package/dist/esm/types/components/StatusLight/StatusLight.d.ts +46 -0
  38. package/dist/esm/types/components/StatusLight/StatusLight.test.d.ts +1 -0
  39. package/dist/esm/types/components/TagsList/MoreTags.d.ts +4 -0
  40. package/dist/esm/types/components/TagsList/MoreTags.test.d.ts +1 -0
  41. package/dist/esm/types/components/TagsList/Tags.d.ts +8 -0
  42. package/dist/esm/types/components/TagsList/Tags.test.d.ts +1 -0
  43. package/dist/esm/types/components/TagsList/TagsList.d.ts +6 -0
  44. package/dist/esm/types/components/TagsList/TagsList.test.d.ts +1 -0
  45. package/dist/esm/types/global/icons/index.d.ts +1 -0
  46. package/dist/esm/types/global/logos/index.d.ts +1 -0
  47. package/dist/esm/types/index.d.ts +6 -0
  48. package/dist/esm/types/utils/hooks/useToggle.d.ts +24 -0
  49. package/dist/esm/types/utils/hooks/useToggle.test.d.ts +1 -0
  50. package/dist/index.d.ts +442 -310
  51. package/package.json +1 -1
  52. package/dist/cjs/types/global/overrides/form/datePicker.d.ts +0 -2
  53. package/dist/cjs/types/global/overrides/index.d.ts +0 -1
  54. package/dist/esm/types/global/overrides/form/datePicker.d.ts +0 -2
  55. package/dist/esm/types/global/overrides/index.d.ts +0 -1
  56. /package/dist/cjs/types/{global/overrides/form/label.d.ts → components/FormLabel/FormLabel.overrides.d.ts} +0 -0
  57. /package/dist/esm/types/{global/overrides/form/label.d.ts → components/FormLabel/FormLabel.overrides.d.ts} +0 -0
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ export type EditTagsButtonProps = {
3
+ tags: string[];
4
+ tagPool?: string[];
5
+ onSave: (tags: string[]) => void;
6
+ label?: string;
7
+ tooltip?: string;
8
+ };
9
+ export declare function EditTagsButton({ tags, tagPool, onSave, label, tooltip }: EditTagsButtonProps): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export type SearchTagsProps = {
3
+ tags: string[];
4
+ onAddTag: (tag: string) => void;
5
+ };
6
+ export declare const SearchTags: ({ tags, onAddTag }: SearchTagsProps) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type TagsManagerProps = {
3
+ currentTags: string[];
4
+ setCurrentTags: (tags: string[]) => void;
5
+ tagPool?: string[];
6
+ };
7
+ export declare const TagsManager: ({ currentTags, setCurrentTags, tagPool }: TagsManagerProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const PlaceholderArea: ({ children }: {
3
+ children: React.ReactNode;
4
+ }) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { CheckboxProps } from '../Checkbox/Checkbox';
3
+ export type FeatureCardHeaderProps = {
4
+ header: string;
5
+ subheader?: string;
6
+ imageUrl?: string;
7
+ selected?: boolean;
8
+ onSelectChange?: CheckboxProps['onChange'];
9
+ isLoading?: boolean;
10
+ };
11
+ export declare const FeatureCardHeader: ({ header, subheader, imageUrl, selected, onSelectChange, isLoading, }: FeatureCardHeaderProps) => React.JSX.Element;
@@ -0,0 +1,21 @@
1
+ import React from 'react';
2
+ import { SxProps } from '@mui/material';
3
+ import { IconProps } from 'components/Icon/Icon';
4
+ export type IconAction = {
5
+ name: IconProps['name'];
6
+ tooltip?: string;
7
+ isActive?: boolean;
8
+ onClick: (event: React.MouseEvent<HTMLButtonElement>) => void;
9
+ isDisabled?: boolean;
10
+ sx?: SxProps;
11
+ };
12
+ export type MenuAction = {
13
+ label: string;
14
+ onClick: (event: React.MouseEvent<HTMLLIElement>) => void;
15
+ sx?: SxProps;
16
+ };
17
+ export type FeatureCardHeaderActionsProps = {
18
+ iconActions?: IconAction[];
19
+ menuActions?: MenuAction[];
20
+ };
21
+ export declare const FeatureCardHeaderActions: ({ iconActions, menuActions }: FeatureCardHeaderActionsProps) => React.JSX.Element;
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
2
  import { SvgIconProps } from '@mui/material';
3
3
  export type LogoProps = {
4
- variant?: 'dark' | 'light';
4
+ variant?: 'dark' | 'light' | 'vertical';
5
5
  /**
6
6
  * use isKSA to toggle between KSA and INT logo versions
7
7
  */
8
8
  isKSA?: boolean;
9
- size?: 'small' | 'medium';
9
+ size?: 'small' | 'medium' | 'large';
10
10
  } & Omit<SvgIconProps, 'children' | 'inheritViewBox' | 'shapeRendering' | 'viewBox' | 'fontSize'>;
11
11
  /**
12
12
  * Documentation: https://up-components.up42.com/?path=/docs/data-display-logos--docs
@@ -0,0 +1,46 @@
1
+ import { SxProps, Theme } from '@mui/material';
2
+ import React from 'react';
3
+ declare const COLORS: {
4
+ primary: string;
5
+ secondary: string;
6
+ success: string;
7
+ warning: string;
8
+ error: string;
9
+ info: string;
10
+ neutral: string;
11
+ };
12
+ declare const SIZES: {
13
+ small: {
14
+ circle: string;
15
+ fontSize: string;
16
+ fontWeight: string;
17
+ lineHeight: string;
18
+ };
19
+ medium: {
20
+ circle: string;
21
+ fontSize: string;
22
+ fontWeight: string;
23
+ lineHeight: string;
24
+ };
25
+ large: {
26
+ circle: string;
27
+ fontSize: string;
28
+ fontWeight: string;
29
+ lineHeight: string;
30
+ };
31
+ };
32
+ type Variant = 'filled' | 'half';
33
+ type Color = keyof typeof COLORS;
34
+ type Size = keyof typeof SIZES;
35
+ export type StatusLightProps = {
36
+ label: string;
37
+ variant?: Variant;
38
+ color?: Color;
39
+ size?: Size;
40
+ sx?: SxProps<Theme>;
41
+ };
42
+ /**
43
+ * Documentation: https://up-components.up42.com/?path=/docs/data-display-status-light--docs
44
+ */
45
+ export declare const StatusLight: ({ label, variant, color, size, sx, }: StatusLightProps) => React.JSX.Element;
46
+ export {};
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ export declare const MoreTags: ({ tags }: {
3
+ tags: string[];
4
+ }) => React.JSX.Element | null;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ type TagsProps = {
3
+ tags: string[];
4
+ setHiddenTagCount: (count: number) => void;
5
+ hiddenTagCount: number;
6
+ };
7
+ export declare const Tags: ({ tags, setHiddenTagCount, hiddenTagCount }: TagsProps) => React.JSX.Element;
8
+ export {};
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export type TagsListProps = {
3
+ tags: string[];
4
+ onTagsChange?: (tags: string[]) => void;
5
+ };
6
+ export declare const TagsList: ({ tags: tagsProp, onTagsChange }: TagsListProps) => React.JSX.Element;
@@ -103,6 +103,7 @@ export { default as Map } from './Map.svg';
103
103
  export { default as MapPin } from './MapPin.svg';
104
104
  export { default as MapSearch } from './MapSearch.svg';
105
105
  export { default as Marketplace } from './Marketplace.svg';
106
+ export { default as MarketplaceExternal } from './MarketplaceExternal.svg';
106
107
  export { default as MenuCircleFilledHorizontal } from './MenuCircleFilledHorizontal.svg';
107
108
  export { default as MenuCircleFilledVertical } from './MenuCircleFilledVertical.svg';
108
109
  export { default as MenuOpenHorizontal } from './MenuOpenHorizontal.svg';
@@ -2,3 +2,4 @@ export { default as INTDark } from './int-dark.svg';
2
2
  export { default as INTLight } from './int-light.svg';
3
3
  export { default as KSADark } from './ksa-dark.svg';
4
4
  export { default as KSALight } from './ksa-light.svg';
5
+ export { default as KSALightVertical } from './ksa-light-vertical.svg';
@@ -46,6 +46,11 @@ export { Tag, type TagProps } from './components/Tag/Tag';
46
46
  export { DateTime, type DateTimeProps } from './components/DateTime/DateTime';
47
47
  export { Divider, type DividerProps } from './components/Divider/Divider';
48
48
  export { FeatureCard, type FeatureCardProps } from './components/FeatureCard/FeatureCard';
49
+ export { FeatureCardHeader, type FeatureCardHeaderProps } from './components/FeatureCardHeader/FeatureCardHeader';
50
+ export { FeatureCardHeaderActions, type IconAction, type MenuAction, type FeatureCardHeaderActionsProps, } from './components/FeatureCardHeaderActions/FeatureCardHeaderActions';
51
+ export { StatusLight, type StatusLightProps } from './components/StatusLight/StatusLight';
52
+ export { TagsList, type TagsListProps } from './components/TagsList/TagsList';
53
+ export { EditTagsButton, type EditTagsButtonProps } from './components/EditTagsButton/EditTagsButton';
49
54
  export { DocumentationPopover, type DocumentationPopoverProps, } from './components/DocumentationPopover/DocumentationPopover';
50
55
  export { CodeInline, type CodeInlineProps } from './components/CodeInline/CodeInline';
51
56
  export { CodeSnippet, type CodeSnippetProps, type CodeSnippetItemProps } from './components/CodeSnippet/CodeSnippet';
@@ -60,5 +65,6 @@ export { formatFileSize } from './utils/helpers/formatFileSize';
60
65
  export { useQueryParams } from './utils/hooks/useQueryParams';
61
66
  export { useRemotePagination, type PaginatedResponse } from './utils/hooks/useRemotePagination';
62
67
  export { useCursorPagination, type CursorPaginatedResponse } from './utils/hooks/useCursorPagination';
68
+ export { useToggle, type UseToggleResult } from './utils/hooks/useToggle';
63
69
  export { useDebounce } from './utils/hooks/useDebounce';
64
70
  export { useAlert, type CreateAlertProps, type CreateSnackbarProps, } from './global/providers/AlertProvider/AlertProvider';
@@ -0,0 +1,24 @@
1
+ export type UseToggleResult = [
2
+ boolean,
3
+ {
4
+ on: () => void;
5
+ off: () => void;
6
+ flip: () => void;
7
+ }
8
+ ];
9
+ /**
10
+ * A custom hook that provides a boolean state with convenient toggle actions.
11
+ *
12
+ * This hook returns a boolean value and an object with three methods to control the state:
13
+ * - `on`: Sets the value to `true`
14
+ * - `off`: Sets the value to `false`
15
+ * - `flip`: Toggles the current value (true becomes false, false becomes true)
16
+ *
17
+ * @param initialState - The initial boolean value. Can be a boolean or a function that returns a boolean.
18
+ * @returns A tuple containing:
19
+ * - The current boolean value
20
+ * - An object with `on`, `off`, and `flip` methods to control the state
21
+ *
22
+ * Documentation: https://up-components.up42.com/?path=/docs/utils--docs#usetoggle
23
+ */
24
+ export declare function useToggle(initialState: boolean | (() => boolean)): UseToggleResult;
@@ -0,0 +1 @@
1
+ export {};