@up42/up-components 4.13.0 → 4.14.1

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.
@@ -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
- banner?: ReactNode;
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, banner, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React.JSX.Element;
31
+ export declare const FeatureCard: ({ children, header, footer, bannerProps, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React.JSX.Element;
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  export type TagsListProps = {
3
3
  tags: string[];
4
- onTagsChange?: (tags: string[]) => void;
4
+ onTagsUpdate?: (tags: string[]) => Promise<void>;
5
+ isUpdatingTags?: boolean;
5
6
  };
6
- export declare const TagsList: ({ tags: tagsProp, onTagsChange }: TagsListProps) => React.JSX.Element;
7
+ export declare const TagsList: ({ tags: tagsProp, onTagsUpdate, isUpdatingTags }: TagsListProps) => React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -484,6 +484,14 @@ type BannerProps = {
484
484
  */
485
485
  onDismiss?: ButtonProps['onClick'];
486
486
  title: string;
487
+ /**
488
+ * The size(height) of the banner.
489
+ * - 'default': Standard banner height.
490
+ * - 'slim': Reduced height, intended for use only with the 'inline' variant.
491
+ *
492
+ * 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.
493
+ */
494
+ size?: 'default' | 'slim';
487
495
  } & Omit<AlertProps, 'title' | 'closeText' | 'icon' | 'role' | 'onClose'>;
488
496
  /**
489
497
  * Documentation: https://up-components.up42.com/?path=/docs/feedback-banner--docs
@@ -510,6 +518,14 @@ declare const Banner: React__default.ForwardRefExoticComponent<Omit<{
510
518
  */
511
519
  onDismiss?: ButtonProps['onClick'];
512
520
  title: string;
521
+ /**
522
+ * The size(height) of the banner.
523
+ * - 'default': Standard banner height.
524
+ * - 'slim': Reduced height, intended for use only with the 'inline' variant.
525
+ *
526
+ * 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.
527
+ */
528
+ size?: "default" | "slim" | undefined;
513
529
  } & Omit<AlertProps, "title" | "role" | "onClose" | "closeText" | "icon">, "ref"> & React__default.RefAttributes<unknown>>;
514
530
 
515
531
  type ContactBoxProps = {
@@ -5096,7 +5112,7 @@ declare const Divider: React__default.ForwardRefExoticComponent<Omit<Omit<Divide
5096
5112
  }, "ref"> & React__default.RefAttributes<unknown>>;
5097
5113
 
5098
5114
  type FeatureCardProps = CardProps & {
5099
- banner?: ReactNode;
5115
+ bannerProps?: Omit<BannerProps, 'title' | 'variant'>;
5100
5116
  header?: {
5101
5117
  title: ReactNode;
5102
5118
  actions?: ReactNode;
@@ -5122,7 +5138,7 @@ type FeatureCardProps = CardProps & {
5122
5138
  */
5123
5139
  hovered?: boolean;
5124
5140
  };
5125
- declare const FeatureCard: ({ children, header, footer, banner, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React__default.JSX.Element;
5141
+ declare const FeatureCard: ({ children, header, footer, bannerProps, isSelectable, selected, isHoverable, hovered, ...props }: FeatureCardProps) => React__default.JSX.Element;
5126
5142
 
5127
5143
  type FeatureCardHeaderProps = {
5128
5144
  header: string;
@@ -5203,18 +5219,20 @@ declare const StatusLight: ({ label, variant, color, size, sx, }: StatusLightPro
5203
5219
 
5204
5220
  type TagsListProps = {
5205
5221
  tags: string[];
5206
- onTagsChange?: (tags: string[]) => void;
5222
+ onTagsUpdate?: (tags: string[]) => Promise<void>;
5223
+ isUpdatingTags?: boolean;
5207
5224
  };
5208
- declare const TagsList: ({ tags: tagsProp, onTagsChange }: TagsListProps) => React__default.JSX.Element;
5225
+ declare const TagsList: ({ tags: tagsProp, onTagsUpdate, isUpdatingTags }: TagsListProps) => React__default.JSX.Element;
5209
5226
 
5210
5227
  type EditTagsButtonProps = {
5211
5228
  tags: string[];
5212
5229
  tagPool?: string[];
5213
- onSave: (tags: string[]) => void;
5230
+ onSave: (tags: string[]) => Promise<void>;
5214
5231
  label?: string;
5215
5232
  tooltip?: string;
5233
+ isUpdatingTags?: boolean;
5216
5234
  };
5217
- declare function EditTagsButton({ tags, tagPool, onSave, label, tooltip }: EditTagsButtonProps): React__default.JSX.Element;
5235
+ declare function EditTagsButton({ tags, tagPool, onSave, label, tooltip, isUpdatingTags }: EditTagsButtonProps): React__default.JSX.Element;
5218
5236
 
5219
5237
  type FeatureFlagCheckboxProps = {
5220
5238
  label: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@up42/up-components",
3
- "version": "4.13.0",
3
+ "version": "4.14.1",
4
4
  "description": "UP42 Component Library",
5
5
  "author": "Axel Fuhrmann axel.fuhrmann@up42.com",
6
6
  "license": "ISC",