@up42/up-components 4.12.0 → 4.13.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,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;
@@ -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';
@@ -5216,6 +5216,31 @@ type EditTagsButtonProps = {
5216
5216
  };
5217
5217
  declare function EditTagsButton({ tags, tagPool, onSave, label, tooltip }: EditTagsButtonProps): React__default.JSX.Element;
5218
5218
 
5219
+ type FeatureFlagCheckboxProps = {
5220
+ label: string;
5221
+ checked: boolean;
5222
+ /**
5223
+ * Defines if the component should be rendered or not.
5224
+ * Use this prop to indicate if the application is in a development environment.
5225
+ */
5226
+ isDevelopment: boolean;
5227
+ onChange: (event: SyntheticEvent, checked: boolean) => void;
5228
+ onClose?: () => void;
5229
+ };
5230
+ /**
5231
+ *
5232
+ * Development-only feature toggle component (not for production use).
5233
+ *
5234
+ * **Important**: This component is intended *strictly* for development environments and should not be included in production builds.
5235
+ *
5236
+ * 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.
5237
+ *
5238
+ * **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.
5239
+ *
5240
+ * Documentation: https://up-components.up42.com/?path=/docs/development-featureflagcheckbox--docs
5241
+ */
5242
+ declare function FeatureFlagCheckbox({ label, checked, isDevelopment, onChange, onClose }: FeatureFlagCheckboxProps): React__default.JSX.Element;
5243
+
5219
5244
  type DocumentationPopoverProps = {
5220
5245
  title: string;
5221
5246
  children: React__default.ReactNode;
@@ -5488,5 +5513,5 @@ type ContextState = {
5488
5513
  */
5489
5514
  declare const useAlert: () => ContextState;
5490
5515
 
5491
- 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 };
5492
- 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 };
5516
+ 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 };
5517
+ 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 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up42/up-components",
3
- "version": "4.12.0",
3
+ "version": "4.13.0",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",