@up42/up-components 5.0.0-tokens.2 → 5.0.0-tokens.3
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/dist/cjs/index.js +2 -2
- package/dist/cjs/types/components/Banner/Banner.d.ts +16 -0
- package/dist/cjs/types/components/EditTagsButton/EditTagsButton.d.ts +3 -2
- package/dist/cjs/types/components/FeatureCard/FeatureCard.d.ts +3 -2
- package/dist/cjs/types/components/FeatureFlagCheckbox/FeatureFlagCheckbox.d.ts +25 -0
- package/dist/cjs/types/components/FeatureFlagCheckbox/FeatureFlagCheckbox.test.d.ts +1 -0
- package/dist/cjs/types/components/TagsList/TagsList.d.ts +3 -2
- package/dist/cjs/types/index.d.ts +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/types/components/Banner/Banner.d.ts +16 -0
- package/dist/esm/types/components/EditTagsButton/EditTagsButton.d.ts +3 -2
- package/dist/esm/types/components/FeatureCard/FeatureCard.d.ts +3 -2
- package/dist/esm/types/components/FeatureFlagCheckbox/FeatureFlagCheckbox.d.ts +25 -0
- package/dist/esm/types/components/FeatureFlagCheckbox/FeatureFlagCheckbox.test.d.ts +1 -0
- package/dist/esm/types/components/TagsList/TagsList.d.ts +3 -2
- package/dist/esm/types/index.d.ts +1 -0
- package/dist/index.d.ts +52 -9
- package/package.json +1 -1
|
@@ -23,6 +23,14 @@ export type BannerProps = {
|
|
|
23
23
|
*/
|
|
24
24
|
onDismiss?: ButtonProps['onClick'];
|
|
25
25
|
title: string;
|
|
26
|
+
/**
|
|
27
|
+
* The size(height) of the banner.
|
|
28
|
+
* - 'default': Standard banner height.
|
|
29
|
+
* - 'slim': Reduced height, intended for use only with the 'inline' variant.
|
|
30
|
+
*
|
|
31
|
+
* Note: 'slim' size has a fixed height of '32px' and should be used exclusively with variant='inline' and probably text ellipsis to ensure proper layout and appearance.
|
|
32
|
+
*/
|
|
33
|
+
size?: 'default' | 'slim';
|
|
26
34
|
} & Omit<AlertProps, 'title' | 'closeText' | 'icon' | 'role' | 'onClose'>;
|
|
27
35
|
/**
|
|
28
36
|
* Documentation: https://up-components.up42.com/?path=/docs/feedback-banner--docs
|
|
@@ -49,4 +57,12 @@ export declare const Banner: React.ForwardRefExoticComponent<Omit<{
|
|
|
49
57
|
*/
|
|
50
58
|
onDismiss?: ButtonProps['onClick'];
|
|
51
59
|
title: string;
|
|
60
|
+
/**
|
|
61
|
+
* The size(height) of the banner.
|
|
62
|
+
* - 'default': Standard banner height.
|
|
63
|
+
* - 'slim': Reduced height, intended for use only with the 'inline' variant.
|
|
64
|
+
*
|
|
65
|
+
* Note: 'slim' size has a fixed height of '32px' and should be used exclusively with variant='inline' and probably text ellipsis to ensure proper layout and appearance.
|
|
66
|
+
*/
|
|
67
|
+
size?: "default" | "slim" | undefined;
|
|
52
68
|
} & Omit<AlertProps, "title" | "role" | "onClose" | "closeText" | "icon">, "ref"> & React.RefAttributes<unknown>>;
|
|
@@ -2,8 +2,9 @@ import React from 'react';
|
|
|
2
2
|
export type EditTagsButtonProps = {
|
|
3
3
|
tags: string[];
|
|
4
4
|
tagPool?: string[];
|
|
5
|
-
onSave: (tags: string[]) => void
|
|
5
|
+
onSave: (tags: string[]) => Promise<void>;
|
|
6
6
|
label?: string;
|
|
7
7
|
tooltip?: string;
|
|
8
|
+
isUpdatingTags?: boolean;
|
|
8
9
|
};
|
|
9
|
-
export declare function EditTagsButton({ tags, tagPool, onSave, label, tooltip }: EditTagsButtonProps): React.JSX.Element;
|
|
10
|
+
export declare function EditTagsButton({ tags, tagPool, onSave, label, tooltip, isUpdatingTags }: EditTagsButtonProps): React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CardProps } from '@mui/material';
|
|
3
|
+
import { BannerProps } from '../Banner/Banner';
|
|
3
4
|
export type FeatureCardProps = CardProps & {
|
|
4
|
-
|
|
5
|
+
bannerProps?: Omit<BannerProps, 'title' | 'variant'>;
|
|
5
6
|
header?: {
|
|
6
7
|
title: ReactNode;
|
|
7
8
|
actions?: ReactNode;
|
|
@@ -27,4 +28,4 @@ export type FeatureCardProps = CardProps & {
|
|
|
27
28
|
*/
|
|
28
29
|
hovered?: boolean;
|
|
29
30
|
};
|
|
30
|
-
export declare const FeatureCard: ({ children, header, footer,
|
|
31
|
+
export declare const FeatureCard: ({ children, header, footer, bannerProps, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React.JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React, { SyntheticEvent } from 'react';
|
|
2
|
+
export type FeatureFlagCheckboxProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
checked: boolean;
|
|
5
|
+
/**
|
|
6
|
+
* Defines if the component should be rendered or not.
|
|
7
|
+
* Use this prop to indicate if the application is in a development environment.
|
|
8
|
+
*/
|
|
9
|
+
isDevelopment: boolean;
|
|
10
|
+
onChange: (event: SyntheticEvent, checked: boolean) => void;
|
|
11
|
+
onClose?: () => void;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* Development-only feature toggle component (not for production use).
|
|
16
|
+
*
|
|
17
|
+
* **Important**: This component is intended *strictly* for development environments and should not be included in production builds.
|
|
18
|
+
*
|
|
19
|
+
* The `FeatureFlagCheckbox` is a temporary UI component used by developers to enable or disable feature flags manually. It renders a labeled checkbox and an optional close button to dismiss the control.
|
|
20
|
+
*
|
|
21
|
+
* **Note**: The component is rendered only when the `isDevelopment` prop is set to `true`. It is the responsibility of the consuming application to ensure the provided value is correct so that is only rendered in non-production environments.
|
|
22
|
+
*
|
|
23
|
+
* Documentation: https://up-components.up42.com/?path=/docs/development-featureflagcheckbox--docs
|
|
24
|
+
*/
|
|
25
|
+
export declare function FeatureFlagCheckbox({ label, checked, isDevelopment, onChange, onClose }: FeatureFlagCheckboxProps): React.JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
export type TagsListProps = {
|
|
3
3
|
tags: string[];
|
|
4
|
-
|
|
4
|
+
onTagsUpdate?: (tags: string[]) => Promise<void>;
|
|
5
|
+
isUpdatingTags?: boolean;
|
|
5
6
|
};
|
|
6
|
-
export declare const TagsList: ({ tags: tagsProp,
|
|
7
|
+
export declare const TagsList: ({ tags: tagsProp, onTagsUpdate, isUpdatingTags }: TagsListProps) => React.JSX.Element;
|
|
@@ -51,6 +51,7 @@ export { FeatureCardHeaderActions, type IconAction, type MenuAction, type Featur
|
|
|
51
51
|
export { StatusLight, type StatusLightProps } from './components/StatusLight/StatusLight';
|
|
52
52
|
export { TagsList, type TagsListProps } from './components/TagsList/TagsList';
|
|
53
53
|
export { EditTagsButton, type EditTagsButtonProps } from './components/EditTagsButton/EditTagsButton';
|
|
54
|
+
export { FeatureFlagCheckbox, type FeatureFlagCheckboxProps, } from './components/FeatureFlagCheckbox/FeatureFlagCheckbox';
|
|
54
55
|
export { DocumentationPopover, type DocumentationPopoverProps, } from './components/DocumentationPopover/DocumentationPopover';
|
|
55
56
|
export { CodeInline, type CodeInlineProps } from './components/CodeInline/CodeInline';
|
|
56
57
|
export { CodeSnippet, type CodeSnippetProps, type CodeSnippetItemProps } from './components/CodeSnippet/CodeSnippet';
|
package/dist/index.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { BoxProps, TextFieldProps, AvatarProps as AvatarProps$1, GridProps, Cont
|
|
|
4
4
|
export * from '@mui/material';
|
|
5
5
|
import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
|
|
6
6
|
import * as React from 'react';
|
|
7
|
-
import React__default, { ReactNode, ElementType } from 'react';
|
|
7
|
+
import React__default, { ReactNode, ElementType, SyntheticEvent } from 'react';
|
|
8
8
|
import { ButtonProps as ButtonProps$1 } from '@mui/material/Button';
|
|
9
9
|
import { TypographyProps as TypographyProps$1 } from '@mui/material/Typography';
|
|
10
10
|
import { DatePickerProps, DateTimePickerProps } from '@mui/x-date-pickers-pro';
|
|
@@ -486,6 +486,14 @@ type BannerProps = {
|
|
|
486
486
|
*/
|
|
487
487
|
onDismiss?: ButtonProps['onClick'];
|
|
488
488
|
title: string;
|
|
489
|
+
/**
|
|
490
|
+
* The size(height) of the banner.
|
|
491
|
+
* - 'default': Standard banner height.
|
|
492
|
+
* - 'slim': Reduced height, intended for use only with the 'inline' variant.
|
|
493
|
+
*
|
|
494
|
+
* Note: 'slim' size has a fixed height of '32px' and should be used exclusively with variant='inline' and probably text ellipsis to ensure proper layout and appearance.
|
|
495
|
+
*/
|
|
496
|
+
size?: 'default' | 'slim';
|
|
489
497
|
} & Omit<AlertProps, 'title' | 'closeText' | 'icon' | 'role' | 'onClose'>;
|
|
490
498
|
/**
|
|
491
499
|
* Documentation: https://up-components.up42.com/?path=/docs/feedback-banner--docs
|
|
@@ -512,6 +520,14 @@ declare const Banner: React__default.ForwardRefExoticComponent<Omit<{
|
|
|
512
520
|
*/
|
|
513
521
|
onDismiss?: ButtonProps['onClick'];
|
|
514
522
|
title: string;
|
|
523
|
+
/**
|
|
524
|
+
* The size(height) of the banner.
|
|
525
|
+
* - 'default': Standard banner height.
|
|
526
|
+
* - 'slim': Reduced height, intended for use only with the 'inline' variant.
|
|
527
|
+
*
|
|
528
|
+
* Note: 'slim' size has a fixed height of '32px' and should be used exclusively with variant='inline' and probably text ellipsis to ensure proper layout and appearance.
|
|
529
|
+
*/
|
|
530
|
+
size?: "default" | "slim" | undefined;
|
|
515
531
|
} & Omit<AlertProps, "title" | "role" | "onClose" | "closeText" | "icon">, "ref"> & React__default.RefAttributes<unknown>>;
|
|
516
532
|
|
|
517
533
|
type ContactBoxProps = {
|
|
@@ -5127,7 +5143,7 @@ declare const Divider: React__default.ForwardRefExoticComponent<Omit<Omit<Divide
|
|
|
5127
5143
|
}, "ref"> & React__default.RefAttributes<unknown>>;
|
|
5128
5144
|
|
|
5129
5145
|
type FeatureCardProps = CardProps & {
|
|
5130
|
-
|
|
5146
|
+
bannerProps?: Omit<BannerProps, 'title' | 'variant'>;
|
|
5131
5147
|
header?: {
|
|
5132
5148
|
title: ReactNode;
|
|
5133
5149
|
actions?: ReactNode;
|
|
@@ -5153,7 +5169,7 @@ type FeatureCardProps = CardProps & {
|
|
|
5153
5169
|
*/
|
|
5154
5170
|
hovered?: boolean;
|
|
5155
5171
|
};
|
|
5156
|
-
declare const FeatureCard: ({ children, header, footer,
|
|
5172
|
+
declare const FeatureCard: ({ children, header, footer, bannerProps, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React__default.JSX.Element;
|
|
5157
5173
|
|
|
5158
5174
|
type FeatureCardHeaderProps = {
|
|
5159
5175
|
header: string;
|
|
@@ -5234,18 +5250,45 @@ declare const StatusLight: ({ label, variant, color, size, sx, }: StatusLightPro
|
|
|
5234
5250
|
|
|
5235
5251
|
type TagsListProps = {
|
|
5236
5252
|
tags: string[];
|
|
5237
|
-
|
|
5253
|
+
onTagsUpdate?: (tags: string[]) => Promise<void>;
|
|
5254
|
+
isUpdatingTags?: boolean;
|
|
5238
5255
|
};
|
|
5239
|
-
declare const TagsList: ({ tags: tagsProp,
|
|
5256
|
+
declare const TagsList: ({ tags: tagsProp, onTagsUpdate, isUpdatingTags }: TagsListProps) => React__default.JSX.Element;
|
|
5240
5257
|
|
|
5241
5258
|
type EditTagsButtonProps = {
|
|
5242
5259
|
tags: string[];
|
|
5243
5260
|
tagPool?: string[];
|
|
5244
|
-
onSave: (tags: string[]) => void
|
|
5261
|
+
onSave: (tags: string[]) => Promise<void>;
|
|
5245
5262
|
label?: string;
|
|
5246
5263
|
tooltip?: string;
|
|
5264
|
+
isUpdatingTags?: boolean;
|
|
5265
|
+
};
|
|
5266
|
+
declare function EditTagsButton({ tags, tagPool, onSave, label, tooltip, isUpdatingTags }: EditTagsButtonProps): React__default.JSX.Element;
|
|
5267
|
+
|
|
5268
|
+
type FeatureFlagCheckboxProps = {
|
|
5269
|
+
label: string;
|
|
5270
|
+
checked: boolean;
|
|
5271
|
+
/**
|
|
5272
|
+
* Defines if the component should be rendered or not.
|
|
5273
|
+
* Use this prop to indicate if the application is in a development environment.
|
|
5274
|
+
*/
|
|
5275
|
+
isDevelopment: boolean;
|
|
5276
|
+
onChange: (event: SyntheticEvent, checked: boolean) => void;
|
|
5277
|
+
onClose?: () => void;
|
|
5247
5278
|
};
|
|
5248
|
-
|
|
5279
|
+
/**
|
|
5280
|
+
*
|
|
5281
|
+
* Development-only feature toggle component (not for production use).
|
|
5282
|
+
*
|
|
5283
|
+
* **Important**: This component is intended *strictly* for development environments and should not be included in production builds.
|
|
5284
|
+
*
|
|
5285
|
+
* The `FeatureFlagCheckbox` is a temporary UI component used by developers to enable or disable feature flags manually. It renders a labeled checkbox and an optional close button to dismiss the control.
|
|
5286
|
+
*
|
|
5287
|
+
* **Note**: The component is rendered only when the `isDevelopment` prop is set to `true`. It is the responsibility of the consuming application to ensure the provided value is correct so that is only rendered in non-production environments.
|
|
5288
|
+
*
|
|
5289
|
+
* Documentation: https://up-components.up42.com/?path=/docs/development-featureflagcheckbox--docs
|
|
5290
|
+
*/
|
|
5291
|
+
declare function FeatureFlagCheckbox({ label, checked, isDevelopment, onChange, onClose }: FeatureFlagCheckboxProps): React__default.JSX.Element;
|
|
5249
5292
|
|
|
5250
5293
|
type DocumentationPopoverProps = {
|
|
5251
5294
|
title: string;
|
|
@@ -5519,5 +5562,5 @@ type ContextState = {
|
|
|
5519
5562
|
*/
|
|
5520
5563
|
declare const useAlert: () => ContextState;
|
|
5521
5564
|
|
|
5522
|
-
export { Alert, Avatar, Badge, Banner, Button, Checkbox, CodeInline, CodeSnippet, ContactBox, ControlButton, CopyButton, DataGrid, DateTime, Divider, DocumentationPopover, EditTagsButton, EmptyState, FeatureCard, FeatureCardHeader, FeatureCardHeaderActions, FormCheckbox, FormDatePicker, FormDateRangePicker, FormDateRangePickerList, FormDateTimePicker, FormInput, FormRadio, FormSelect, FormSwitch, GridContainer, GridItem, Icon, Illustration, InfoCard, InfoModal, InfoPopover, Input, Link, Loading, Logo, NotFound, PageContainer, PageHeader, Radio, Select, Slider, StatusLight, Switch, Tab, TabGroup, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, Tag, TagsList, Typography, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useCursorPagination, useDebounce, useQueryParams, useRemotePagination, useToggle };
|
|
5523
|
-
export type { AlertProps, AvatarProps, BadgeProps, BannerProps, ButtonProps, CheckboxProps, CodeInlineProps, CodeSnippetItemProps, CodeSnippetProps, ContactBoxProps, ControlButtonProps, CopyButtonProps, CreateAlertProps, CreateSnackbarProps, CursorPaginatedResponse, DatePickerDateType, DateRange, DateTimeProps, DividerProps, DocumentationPopoverProps, EditTagsButtonProps, EmptyStateProps, FeatureCardHeaderActionsProps, FeatureCardHeaderProps, FeatureCardProps, FormCheckboxProps, FormDatePickerProps, FormDateRangePickerListProps, FormDateRangePickerProps, FormDateTimePickerProps, FormInputProps, FormRadioProps, FormSelectProps, FormSwitchProps, GridContainerProps, GridItemProps, IconAction, IconProps$1 as IconProps, IllustrationProps, InfoCardProps, InfoModalProps, InfoPopoverProps, InputProps, LinkProps, LoadingProps, LogoProps, MenuAction, NotFoundProps, PageContainerProps, PageHeaderProps, PaginatedResponse, RadioProps, SelectProps, SliderProps, StatusLightProps, SwitchProps, TabGroupProps, TabProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TableSortLabelProps, TabsProps, TagProps, TagsListProps, TypographyProps, UseToggleResult };
|
|
5565
|
+
export { Alert, Avatar, Badge, Banner, Button, Checkbox, CodeInline, CodeSnippet, ContactBox, ControlButton, CopyButton, DataGrid, DateTime, Divider, DocumentationPopover, EditTagsButton, EmptyState, FeatureCard, FeatureCardHeader, FeatureCardHeaderActions, FeatureFlagCheckbox, FormCheckbox, FormDatePicker, FormDateRangePicker, FormDateRangePickerList, FormDateTimePicker, FormInput, FormRadio, FormSelect, FormSwitch, GridContainer, GridItem, Icon, Illustration, InfoCard, InfoModal, InfoPopover, Input, Link, Loading, Logo, NotFound, PageContainer, PageHeader, Radio, Select, Slider, StatusLight, Switch, Tab, TabGroup, Table, TableBody, TableCell, TableContainer, TableFooter, TableHead, TablePagination, TableRow, TableSortLabel, Tabs, Tag, TagsList, Typography, UpComponentsProvider, capitalize, copyToClipboard, formatDate, formatFileSize, formatNumber, theme, useAlert, useCursorPagination, useDebounce, useQueryParams, useRemotePagination, useToggle };
|
|
5566
|
+
export type { AlertProps, AvatarProps, BadgeProps, BannerProps, ButtonProps, CheckboxProps, CodeInlineProps, CodeSnippetItemProps, CodeSnippetProps, ContactBoxProps, ControlButtonProps, CopyButtonProps, CreateAlertProps, CreateSnackbarProps, CursorPaginatedResponse, DatePickerDateType, DateRange, DateTimeProps, DividerProps, DocumentationPopoverProps, EditTagsButtonProps, EmptyStateProps, FeatureCardHeaderActionsProps, FeatureCardHeaderProps, FeatureCardProps, FeatureFlagCheckboxProps, FormCheckboxProps, FormDatePickerProps, FormDateRangePickerListProps, FormDateRangePickerProps, FormDateTimePickerProps, FormInputProps, FormRadioProps, FormSelectProps, FormSwitchProps, GridContainerProps, GridItemProps, IconAction, IconProps$1 as IconProps, IllustrationProps, InfoCardProps, InfoModalProps, InfoPopoverProps, InputProps, LinkProps, LoadingProps, LogoProps, MenuAction, NotFoundProps, PageContainerProps, PageHeaderProps, PaginatedResponse, RadioProps, SelectProps, SliderProps, StatusLightProps, SwitchProps, TabGroupProps, TabProps, TableBodyProps, TableCellProps, TableContainerProps, TableFooterProps, TableHeadProps, TablePaginationProps, TableProps, TableRowProps, TableSortLabelProps, TabsProps, TagProps, TagsListProps, TypographyProps, UseToggleResult };
|