@up42/up-components 0.9.5 → 0.10.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
+ /// <reference types="react" />
2
+ import type { SxProps, Theme } from '@mui/material';
3
+ export interface CopyButtonProps {
4
+ data: string;
5
+ tooltip?: string;
6
+ sx?: SxProps<Theme>;
7
+ }
8
+ /**
9
+ * Documentation: https://up-components.up42.dev/?path=/docs/patterns-copybutton
10
+ */
11
+ export declare const CopyButton: ({ data, tooltip, sx }: CopyButtonProps) => JSX.Element;
@@ -1,5 +1,6 @@
1
1
  export { default as AlarmBell } from './alarm-bell.svg';
2
2
  export { default as AppWindowCode } from './app-window-code.svg';
3
+ export { default as ArrowTopRight } from './arrow-top-right.svg';
3
4
  export { default as Assignment } from './assignment-circle.svg';
4
5
  export { default as Bash } from './bash-circle.svg';
5
6
  export { default as Bin } from './bin.svg';
@@ -31,6 +31,7 @@ export { Tooltip, type TooltipProps } from './components/Tooltip/Tooltip';
31
31
  export { InfoCard, type InfoCardProps } from './components/InfoCard/InfoCard';
32
32
  export { Menu, MenuItem, type MenuProps, type MenuItemProps } from './components/Menu/Menu';
33
33
  export { ControlButton, type ControlButtonProps } from './components/ControlButton/ControlButton';
34
+ export { CopyButton, type CopyButtonProps } from './components/CopyButton/CopyButton';
34
35
  export { Popover, type PopoverProps } from './components/Popover/Popover';
35
36
  export { InfoPopover, type InfoPopoverProps } from './components/InfoPopover/InfoPopover';
36
37
  export { PageHeader, type PageHeaderProps } from './components/PageHeader/PageHeader';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  export { default as tokens } from '@up42/design-system-tokens/dist/json/tokens.json';
3
3
  import * as _mui_material from '@mui/material';
4
- import { BoxProps as BoxProps$1, TextFieldProps, ChipProps as ChipProps$1, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1, ModalProps as ModalProps$1, CardProps, AlertProps as AlertProps$1, TooltipProps as TooltipProps$1, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, IconButtonProps, PopoverProps as PopoverProps$1, SvgIconProps, BadgeProps as BadgeProps$1 } from '@mui/material';
4
+ import { BoxProps as BoxProps$1, TextFieldProps, ChipProps as ChipProps$1, AvatarProps as AvatarProps$1, ContainerProps as ContainerProps$1, CheckboxProps as CheckboxProps$1, RadioProps as RadioProps$1, RadioGroupProps, SwitchProps as SwitchProps$1, SelectProps as SelectProps$1, LinkProps as LinkProps$1, TabsProps as TabsProps$1, TabProps as TabProps$1, ModalProps as ModalProps$1, CardProps, AlertProps as AlertProps$1, TooltipProps as TooltipProps$1, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, IconButtonProps, SxProps, Theme, PopoverProps as PopoverProps$1, SvgIconProps, BadgeProps as BadgeProps$1 } from '@mui/material';
5
5
  export * from '@mui/material';
6
6
  import { ThemeProviderProps } from '@mui/material/styles/ThemeProvider';
7
7
  import * as React from 'react';
@@ -519,6 +519,16 @@ declare type ControlButtonProps = MUIGlobalOmit<IconButtonProps, {
519
519
  */
520
520
  declare const ControlButton: ({ size, removePadding, children, sx, ...props }: ControlButtonProps) => JSX.Element;
521
521
 
522
+ interface CopyButtonProps {
523
+ data: string;
524
+ tooltip?: string;
525
+ sx?: SxProps<Theme>;
526
+ }
527
+ /**
528
+ * Documentation: https://up-components.up42.dev/?path=/docs/patterns-copybutton
529
+ */
530
+ declare const CopyButton: ({ data, tooltip, sx }: CopyButtonProps) => JSX.Element;
531
+
522
532
  declare type PopoverProps = MUIGlobalOmit<PopoverProps$1>;
523
533
  /**
524
534
  * Documentation: https://up-components.up42.dev/?path=/docs/data-display-popover
@@ -564,21 +574,21 @@ declare type LoadingProps = {
564
574
  */
565
575
  declare const Loading: ({ fullPage, visible, ...rest }: LoadingProps) => JSX.Element | null;
566
576
 
567
- var _g$d, _defs$b;
577
+ var _g$e, _defs$c;
568
578
 
569
- function _extends$R() { _extends$R = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$R.apply(this, arguments); }
579
+ function _extends$S() { _extends$S = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$S.apply(this, arguments); }
570
580
 
571
581
  var SvgAlarmBell = function SvgAlarmBell(props) {
572
- return /*#__PURE__*/React.createElement("svg", _extends$R({
582
+ return /*#__PURE__*/React.createElement("svg", _extends$S({
573
583
  xmlns: "http://www.w3.org/2000/svg",
574
584
  fill: "none",
575
585
  viewBox: "0 0 16 16"
576
- }, props), _g$d || (_g$d = /*#__PURE__*/React.createElement("g", {
586
+ }, props), _g$e || (_g$e = /*#__PURE__*/React.createElement("g", {
577
587
  fill: "currentColor",
578
588
  clipPath: "url(#alarm-bell_svg__a)"
579
589
  }, /*#__PURE__*/React.createElement("path", {
580
590
  d: "M7.993 16a1.89 1.89 0 0 1-1.812-1.359.5.5 0 0 1 .96-.282.89.89 0 0 0 1.71.001.503.503 0 0 1 .62-.34.5.5 0 0 1 .339.621 1.894 1.894 0 0 1-1.817 1.36Zm-5.999-3a.498.498 0 0 1-.394-.808c.004-.005.894-1.292.894-5.191a5.491 5.491 0 0 1 5-5.478V.501a.5.5 0 0 1 1 0v1.022c2.823.254 5 2.616 5 5.478 0 4.202.83 5.124.839 5.132a.504.504 0 0 1-.339.868h-12Zm11.14-1c-.321-.82-.64-2.313-.64-5 0-2.48-2.02-4.5-4.5-4.5a4.505 4.505 0 0 0-4.5 4.5c0 2.639-.387 4.185-.698 5h10.338Z"
581
- }))), _defs$b || (_defs$b = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
591
+ }))), _defs$c || (_defs$c = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
582
592
  id: "alarm-bell_svg__a"
583
593
  }, /*#__PURE__*/React.createElement("path", {
584
594
  d: "M0 0h16v16H0z"
@@ -587,10 +597,10 @@ var SvgAlarmBell = function SvgAlarmBell(props) {
587
597
 
588
598
  var _path$D, _path2$m;
589
599
 
590
- function _extends$Q() { _extends$Q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Q.apply(this, arguments); }
600
+ function _extends$R() { _extends$R = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$R.apply(this, arguments); }
591
601
 
592
602
  var SvgAppWindowCode = function SvgAppWindowCode(props) {
593
- return /*#__PURE__*/React.createElement("svg", _extends$Q({
603
+ return /*#__PURE__*/React.createElement("svg", _extends$R({
594
604
  width: 32,
595
605
  height: 32,
596
606
  fill: "none",
@@ -604,6 +614,28 @@ var SvgAppWindowCode = function SvgAppWindowCode(props) {
604
614
  })));
605
615
  };
606
616
 
617
+ var _g$d, _defs$b;
618
+
619
+ function _extends$Q() { _extends$Q = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$Q.apply(this, arguments); }
620
+
621
+ var SvgArrowTopRight = function SvgArrowTopRight(props) {
622
+ return /*#__PURE__*/React.createElement("svg", _extends$Q({
623
+ xmlns: "http://www.w3.org/2000/svg",
624
+ fill: "none",
625
+ viewBox: "0 0 16 17"
626
+ }, props), _g$d || (_g$d = /*#__PURE__*/React.createElement("g", {
627
+ clipPath: "url(#arrow-top-right_svg__a)"
628
+ }, /*#__PURE__*/React.createElement("path", {
629
+ fill: "currentColor",
630
+ d: "M4 4.5v1.333h5.727l-6.394 6.394.94.94 6.394-6.394V12.5H12v-8H4Z"
631
+ }))), _defs$b || (_defs$b = /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("clipPath", {
632
+ id: "arrow-top-right_svg__a"
633
+ }, /*#__PURE__*/React.createElement("path", {
634
+ fill: "#fff",
635
+ d: "M0 .5h16v16H0z"
636
+ })))));
637
+ };
638
+
607
639
  var _rect$4, _g$c, _defs$a;
608
640
 
609
641
  function _extends$P() { _extends$P = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$P.apply(this, arguments); }
@@ -1661,6 +1693,7 @@ declare namespace icons {
1661
1693
  export {
1662
1694
  SvgAlarmBell as AlarmBell,
1663
1695
  SvgAppWindowCode as AppWindowCode,
1696
+ SvgArrowTopRight as ArrowTopRight,
1664
1697
  SvgAssignmentCircle as Assignment,
1665
1698
  SvgBashCircle as Bash,
1666
1699
  SvgBin as Bin,
@@ -1904,4 +1937,4 @@ declare type ContextState = {
1904
1937
  */
1905
1938
  declare const useAlert: () => ContextState;
1906
1939
 
1907
- export { Alert, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, CodeBox, CodeBoxProps, Container, ContainerProps, ControlButton, ControlButtonProps, CreateAlertProps, DataGrid, DataGridProps, DocumentationPopover, DocumentationPopoverProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, Icon, IconProps, InfoCard, InfoCardProps, InfoModal, InfoModalProps, InfoPopover, InfoPopoverProps, Input, InputProps, Link, LinkProps, Loading, LoadingProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, NotFound, PageHeader, PageHeaderProps, PaginatedResponse, Popover, PopoverProps, Radio, RadioProps, Select, SelectProps, Switch, SwitchProps, Tab, TabGroup, TabGroupProps, TabProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableContainer, TableContainerProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableSortLabel, TableSortLabelProps, Tabs, TabsProps, Tag, TagProps, Tooltip, TooltipProps, Typography, TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatNumber, theme, useAlert, useQueryParams, useRemotePagination };
1940
+ export { Alert, AlertProps, Avatar, AvatarProps, Badge, BadgeProps, Banner, BannerProps, Box, BoxProps, Button, ButtonProps, Checkbox, CheckboxProps, Chip, ChipProps, CodeBox, CodeBoxProps, Container, ContainerProps, ControlButton, ControlButtonProps, CopyButton, CopyButtonProps, CreateAlertProps, DataGrid, DataGridProps, DocumentationPopover, DocumentationPopoverProps, EmptyState, EmptyStateProps, FormCheckbox, FormCheckboxProps, FormInput, FormInputProps, FormRadio, FormRadioProps, FormSelect, FormSelectProps, FormSwitch, FormSwitchProps, Icon, IconProps, InfoCard, InfoCardProps, InfoModal, InfoModalProps, InfoPopover, InfoPopoverProps, Input, InputProps, Link, LinkProps, Loading, LoadingProps, Menu, MenuItem, MenuItemProps, MenuProps, Modal, ModalProps, NotFound, PageHeader, PageHeaderProps, PaginatedResponse, Popover, PopoverProps, Radio, RadioProps, Select, SelectProps, Switch, SwitchProps, Tab, TabGroup, TabGroupProps, TabProps, Table, TableBody, TableBodyProps, TableCell, TableCellProps, TableContainer, TableContainerProps, TableFooter, TableFooterProps, TableHead, TableHeadProps, TablePagination, TablePaginationProps, TableProps, TableRow, TableRowProps, TableSortLabel, TableSortLabelProps, Tabs, TabsProps, Tag, TagProps, Tooltip, TooltipProps, Typography, TypographyProps, UpComponentsProvider, capitalize, copyToClipboard, formatNumber, theme, useAlert, useQueryParams, useRemotePagination };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up42/up-components",
3
- "version": "0.9.5",
3
+ "version": "0.10.0",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",