@useloops/design-system 1.4.391 → 1.4.393

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/index.d.ts CHANGED
@@ -1,10 +1,16 @@
1
1
  import * as react from 'react';
2
2
  import react__default, { FunctionComponent, PropsWithChildren, Dispatch, SetStateAction, ReactNode, ReactElement, ChangeEvent, FC } from 'react';
3
3
  import * as _mui_material from '@mui/material';
4
- import { SxProps, Theme, CSSObject, AvatarProps as AvatarProps$1, AvatarGroupProps as AvatarGroupProps$1, LinkProps as LinkProps$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ContainerProps, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, TypographyProps as TypographyProps$1, BoxProps, FormControlLabelProps as FormControlLabelProps$1, IconButtonProps as IconButtonProps$1, TooltipProps as TooltipProps$1, ButtonGroupProps, TextFieldProps as TextFieldProps$1, PaperProps, PopperProps as PopperProps$1, ClickAwayListenerProps, FadeProps, LinearProgressProps, SelectProps as SelectProps$1, SelectChangeEvent, SkeletonProps as SkeletonProps$1, SwitchProps as SwitchProps$1, ChipProps as ChipProps$1, Breakpoint, PaletteMode, Direction } from '@mui/material';
4
+ import { SxProps, Theme, CSSObject, AvatarProps as AvatarProps$1, AvatarGroupProps as AvatarGroupProps$1, LinkProps as LinkProps$1, ButtonProps as ButtonProps$1, CheckboxProps as CheckboxProps$1, ContainerProps, MenuProps as MenuProps$1, MenuItemProps as MenuItemProps$1, TypographyProps as TypographyProps$1, BoxProps, FormControlLabelProps as FormControlLabelProps$1, IconButtonProps as IconButtonProps$1, TooltipProps as TooltipProps$1, ButtonGroupProps, TextFieldProps as TextFieldProps$1, PaperProps, PopperProps as PopperProps$1, ClickAwayListenerProps, FadeProps, LinearProgressProps, SelectProps as SelectProps$1, SelectChangeEvent, SkeletonProps as SkeletonProps$1, SwitchProps as SwitchProps$1, Breakpoint, PaletteMode, Direction } from '@mui/material';
5
5
  import { PopupState } from 'material-ui-popup-state/hooks';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
- import { SemanticColor as SemanticColor$1 } from 'systems/BrandCore';
7
+ import { BoxProps as BoxProps$1 } from '@mui/material/Box';
8
+ import { IconName as IconName$2, SemanticColor as SemanticColor$1 } from 'systems/BrandCore';
9
+ import { IconProps as IconProps$1 } from 'systems/BrandCore/Icon/Icon';
10
+ import { CheckboxProps as CheckboxProps$2 } from 'systems/WebCore';
11
+ import { TooltipProps as TooltipProps$2 } from 'systems/WebCore/Tooltip';
12
+ import { CommentEmotion } from 'utils/EmojiCommentList';
13
+ import { KpiIndicatorColor as KpiIndicatorColor$1 } from 'systems/Platform/KpiIndicator/utils';
8
14
  import { IconName as IconName$1 } from 'systems/BrandCore/Icon';
9
15
  import { KpiIndicatorProps as KpiIndicatorProps$1 } from 'systems/Platform/KpiIndicator';
10
16
  import { ChipProps } from '@mui/material/Chip';
@@ -104,6 +110,9 @@ interface SemanticColor {
104
110
  default: string | undefined;
105
111
  disabled: string | undefined;
106
112
  };
113
+ skeleton: {
114
+ default: string | undefined;
115
+ };
107
116
  data: {
108
117
  sentimentVeryPositive: string | undefined;
109
118
  sentimentPositive: string | undefined;
@@ -168,6 +177,9 @@ interface SemanticColor {
168
177
  default: string | undefined;
169
178
  disabled: string | undefined;
170
179
  };
180
+ skeleton: {
181
+ default: string | undefined;
182
+ };
171
183
  data: {
172
184
  sentimentVeryPositive: string | undefined;
173
185
  sentimentPositive: string | undefined;
@@ -600,6 +612,9 @@ interface CustomTheme {
600
612
  default: string;
601
613
  disabled: string;
602
614
  };
615
+ skeleton: {
616
+ default: string;
617
+ };
603
618
  data: {
604
619
  sentimentVeryPositive: string;
605
620
  sentimentPositive: string;
@@ -1513,7 +1528,7 @@ type MarkdownProps = {
1513
1528
  };
1514
1529
  declare const Markdown: FC<MarkdownProps>;
1515
1530
 
1516
- type SurfaceVariation = 'default' | 'sunken' | 'raised' | 'overlay';
1531
+ type SurfaceVariation = 'default' | 'sunken' | 'raised' | 'overlay' | 'float';
1517
1532
  type BorderRadius = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
1518
1533
 
1519
1534
  interface SurfaceProps extends PaperProps {
@@ -1931,6 +1946,82 @@ interface AuthContainerSurfaceProps extends SurfaceProps {
1931
1946
  }
1932
1947
  declare const AuthContainerSurface: FunctionComponent<AuthContainerSurfaceProps>;
1933
1948
 
1949
+ interface StyledLinearProgressProps extends LinearProgressProps {
1950
+ checked?: boolean;
1951
+ barColor?: KpiIndicatorColor$1;
1952
+ }
1953
+
1954
+ /**
1955
+ * Renders a customizable bar graph item with optional icon, label, value, respondent count, and checkbox.
1956
+ *
1957
+ * @component
1958
+ * @param {GraphBarProps} props - The props for the GraphBar component.
1959
+ * @param {string} props.label - The label displayed for the bar.
1960
+ * @param {number | null | undefined} props.value - The value represented by the bar (used for progress).
1961
+ * @param {React.ReactNode} [props.tooltipContent] - Optional tooltip content shown on hover.
1962
+ * @param {number | null | undefined} [props.respondentCount] - Optional count of respondents displayed in a column.
1963
+ * @param {object} [props.icon] - Optional icon configuration (emoji or standard icon).
1964
+ * @param {boolean} [props.hideIcon] - If true, hides the icon.
1965
+ * @param {boolean} [props.hideCheckbox] - If true, hides the checkbox.
1966
+ * @param {boolean} [props.hideUnitColumn1] - If true, hides the first unit column (value).
1967
+ * @param {boolean} [props.hideUnitColumn2] - If true, hides the second unit column (respondent count).
1968
+ * @param {object} [props.checkboxProps] - Additional props for the checkbox.
1969
+ * @param {object} [props.slotProps] - Additional slot props for customizing subcomponents.
1970
+ * @param {boolean} [props.percentageSymbol] - If true, appends a percentage symbol to the value.
1971
+ * @param {boolean} [props.checkedDefaultValue] - The initial checked state of the checkbox.
1972
+ *
1973
+ * @returns {JSX.Element} The rendered GraphBar component.
1974
+ */
1975
+ interface GraphBarProps {
1976
+ hideIcon?: boolean;
1977
+ hideCheckbox?: boolean;
1978
+ hideUnitColumn1?: boolean;
1979
+ hideUnitColumn2?: boolean;
1980
+ checkedDefaultValue?: boolean;
1981
+ icon?: {
1982
+ type: 'emoji' | 'icon';
1983
+ name: CommentEmotion | IconName$2;
1984
+ };
1985
+ label: string;
1986
+ value: number;
1987
+ tooltipContent?: ReactNode;
1988
+ respondentCount?: number;
1989
+ maxValue?: number;
1990
+ slotProps?: {
1991
+ graphBar?: StyledLinearProgressProps;
1992
+ checkbox?: CheckboxProps$2;
1993
+ icon?: IconProps$1;
1994
+ emojiIcon?: BoxProps$1;
1995
+ tooltip?: TooltipProps$2;
1996
+ };
1997
+ percentageSymbol?: boolean;
1998
+ }
1999
+
2000
+ interface BarGraphProps {
2001
+ graphData: GraphBarProps[];
2002
+ hideIcons?: boolean;
2003
+ hideCheckboxes?: boolean;
2004
+ hideUnitColumn1?: boolean;
2005
+ hideUnitColumn2?: boolean;
2006
+ }
2007
+ declare const BarGraph: FunctionComponent<BarGraphProps>;
2008
+
2009
+ interface CommentCardProps {
2010
+ comment: string;
2011
+ sentimentScore: number;
2012
+ commentAuthor: string;
2013
+ isStarred?: boolean;
2014
+ isActive?: boolean;
2015
+ isTranslatable?: boolean;
2016
+ translationStatus?: 'original' | 'translated' | 'error';
2017
+ onFavouritePress?: () => void;
2018
+ onCopyPress?: () => void;
2019
+ onMorePress?: () => void;
2020
+ onTranslatePress?: () => void;
2021
+ onClick?: () => void;
2022
+ }
2023
+ declare const CommentCard: FunctionComponent<CommentCardProps>;
2024
+
1934
2025
  type SentimentColor = keyof SemanticColor$1['light']['data'] | undefined;
1935
2026
  interface DataPointSource {
1936
2027
  id?: string;
@@ -2140,6 +2231,21 @@ interface ProjectsProps {
2140
2231
  }
2141
2232
  declare const Projects: FunctionComponent<ProjectsProps>;
2142
2233
 
2234
+ interface QuestionTypeProps {
2235
+ variation: QuestionType;
2236
+ }
2237
+ interface QuestionBlockProps {
2238
+ questionType: QuestionType;
2239
+ questionNumber: number;
2240
+ totalQuestions: number;
2241
+ preQuestionText?: string;
2242
+ questionText: string;
2243
+ supportText?: string;
2244
+ }
2245
+ type QuestionType = 'single-punch' | 'multi-punch' | 'slider' | 'likert' | 'rank' | 'open-question' | 'emoji' | 'focus';
2246
+ declare const QuestionType: FunctionComponent<QuestionTypeProps>;
2247
+ declare const QuestionBlock: FunctionComponent<QuestionBlockProps>;
2248
+
2143
2249
  interface SectionHeaderProps {
2144
2250
  buttons?: ReactNode;
2145
2251
  loading?: boolean;
@@ -2148,11 +2254,9 @@ interface SectionHeaderProps {
2148
2254
  }
2149
2255
  declare const SectionHeader: FunctionComponent<SectionHeaderProps>;
2150
2256
 
2151
- interface StyledTestStatusProps extends ChipProps$1 {
2152
- colorScheme: 'green' | 'yellow' | 'blue';
2153
- }
2154
- interface TestStatusProps extends Partial<StyledTestStatusProps> {
2257
+ interface TestStatusProps {
2155
2258
  status: 'results-ready' | 'in-progress' | 'draft';
2259
+ sizing?: 'md' | 'sm' | 'xs';
2156
2260
  }
2157
2261
 
2158
2262
  interface TestItemProps extends SurfaceProps {
@@ -2241,37 +2345,6 @@ type VideoControlsProps = {
2241
2345
  };
2242
2346
  declare const _default: react.MemoExoticComponent<react.ForwardRefExoticComponent<VideoControlsProps & react.RefAttributes<any>>>;
2243
2347
 
2244
- interface CommentCardProps {
2245
- comment: string;
2246
- sentimentScore: number;
2247
- commentAuthor: string;
2248
- isStarred?: boolean;
2249
- isActive?: boolean;
2250
- isTranslatable?: boolean;
2251
- translationStatus?: 'original' | 'translated' | 'error';
2252
- onFavouritePress?: () => void;
2253
- onCopyPress?: () => void;
2254
- onMorePress?: () => void;
2255
- onTranslatePress?: () => void;
2256
- onClick?: () => void;
2257
- }
2258
- declare const CommentCard: FunctionComponent<CommentCardProps>;
2259
-
2260
- interface QuestionTypeProps {
2261
- variation: QuestionType;
2262
- }
2263
- interface QuestionBlockProps {
2264
- questionType: QuestionType;
2265
- questionNumber: number;
2266
- totalQuestions: number;
2267
- preQuestionText?: string;
2268
- questionText: string;
2269
- supportText?: string;
2270
- }
2271
- type QuestionType = 'single-punch' | 'multi-punch' | 'slider' | 'likert' | 'rank' | 'open-question' | 'emoji' | 'focus';
2272
- declare const QuestionType: FunctionComponent<QuestionTypeProps>;
2273
- declare const QuestionBlock: FunctionComponent<QuestionBlockProps>;
2274
-
2275
2348
  type BreakpointOrNull = Breakpoint | null;
2276
2349
  declare const useBreakpoint: () => Breakpoint;
2277
2350
 
@@ -2413,6 +2486,9 @@ declare module '@mui/material/styles' {
2413
2486
  default?: string;
2414
2487
  disabled?: string;
2415
2488
  };
2489
+ skeleton?: {
2490
+ default?: string;
2491
+ };
2416
2492
  data: {
2417
2493
  sentimentVeryPositive?: string;
2418
2494
  sentimentPositive?: string;
@@ -2542,4 +2618,4 @@ declare module '@mui/system' {
2542
2618
  }
2543
2619
  }
2544
2620
 
2545
- export { AiWrittenByLockUp as AIWrittenByLockUp, Accordion, type AccordionProps, AiContentContainer, type AiContentContainerProps, type AiWrittenByLockUpProps, AnnualController, type AnnualControllerProps, AssetItem, type AssetItemProps, AuthContainerSurface, AuthFormHeader, type AuthFormHeaderProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BrandBadge, type BrandBadgeProps, Breadcrumb, type BreadcrumbProps, type BreakpointOrNull, BulletGraphic, type BulletGraphicProps, Button, ButtonBase, type ButtonBaseProps, type ButtonProps, type ButtonSizing, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ColorBackgroundContainer, type ColorBackgroundContainerProps, type ColorRange$1 as ColorRange, type ColorRangeAlpha$1 as ColorRangeAlpha, CommentCard, type CommentCardProps, CreatableAutocomplete, type CreatableAutocompleteOption, type CreatableAutocompleteProps, CustomField, type CustomFieldProps, DEFAULT_MAX_INPUT_LENGTH, DataPointInfo, type DataPointInfoProps, Differential, type DifferentialProps, DropdownMenu, EmptyStateCard, type EmptyStateCardProps, ExpandableTypographyClamp, type ExpandableTypographyClampProps, type FieldType, type FieldTypes, FilteredItemsCard, type FilteredItemsCardProps, Flag, type FlagProps, FontWeight, FormControlLabel, FormGenerator, type FormGeneratorConfig, type FormGeneratorHandler, type GenericSizeMap, GridOverlay, type GridOverlayProps, type GroupSelectOption, Header, type HeaderProps, Html, HtmlParser, type HtmlParserProps, type HtmlProps, Icon, IconButton, IconButtonBase, type IconButtonBaseProps, IconButtonGroup, type IconButtonGroupProps, type IconButtonProps, type IconName, Image, type ImageProps, InputFieldBase, type InputFieldBaseProps, InputLabel, InputLabelHelp, type InputLabelHelpProps, type InputLabelProps, KpiDataPopover, type KpiDataPopoverProps, KpiIndicator, type KpiIndicatorProps, Label, type LabelProps, Likert, type LikertProps, Link, type LinkProps, Loader, type LoaderProps, Logo, LoopItem, LoopItemEmpty, type LoopItemEmptyProps, type LoopItemProps, LoopsAiButton, type LoopsAiButtonProps, Markdown, type MarkdownProps, type MarkerComponentProps, Menu, type MenuProps, ModalActionsWrapper, ModalContentWrapper, ModalLayout, type ModalLayoutProps, Navigation, NavigationButton, type NavigationButtonProps, type NavigationProps, type NavigationSizing, Nudge, type NudgeProps, NumberField, type NumberFieldProps, OnboardingCard, type OnboardingCardProps, type OnboardingItem, Pill, type PillProps, PlanFeatureTable, type PlanFeatureTableData, type PlanFeatureTableProps, PlanTierCard, type PlanTierCardProps, Popper, type PopperProps, PoweredByWatermarkLogo, Progress, ProgressBar, type ProgressBarProps, type ProgressProps, ProjectItem, ProjectItemEmpty, type ProjectItemEmptyProps, type ProjectItemProps, Projects, type ProjectsProps, QuestionBlock, type QuestionBlockProps, type QuestionStats, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rank, type RankProps, RichTextField, type RichTextFieldProps, type Section, SectionHeader, type SectionHeaderProps, Select, type SelectOption, type SelectProps, type SemanticColor, Skeleton, type SkeletonProps, Slider, type SliderProps, SortableList, type SortableListProps, StarRating, type StarRatingProps, Surface, type SurfaceProps, Switch, type SwitchProps, TestItem, type TestItemProps, TestKPICard, type TestKPICardProps, TextBarDivider, type TextBarDividerProps, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeCtx, ThemeProvider, TickGroup, type TickGroupProps, Toast, type ToastProps, Tooltip, type TooltipProps, TrialCard, type TrialCardProps, Typography, type TypographyProps, UserMenu, type UserMenuProps, _default as VideoControls, type VideoControlsProps, VideoModal, type VideoModalProps, backgroundCreator, base, blue, blueRamp, boxShadow, breakpoints, buttonHeightMap, buttonInteraction, chooseArticle, compareArrayMembers, customTheme, darkNeutral, darkNeutralAlpha, defaultInputValidation, easing, elevation, elevationFilter, emailValidation, fonts, generateRamp, getButtonSizing, getButtonTypography, getIconSizing$1 as getIconSizing, getKpiIndicatorColor, green, greenRamp, IconButton_variantHelpers as iconButtonHelpers, iconSizeMap, isButton, mapKpiColorSchemeByInteger, margin, neutral, neutralAlpha, neutralRamp, outlined$1 as outlined, padding, passwordValidation, peach, peachRamp, primary, purple, purpleRamp, radius, red, redRamp, secondary, semantic, space, subtle, useBreakpoint, useDropdownMenu, useKeyCombo, usePrevious, useScreenSize, useTheme, useThemeBuilder, yellow, yellowRamp };
2621
+ export { AiWrittenByLockUp as AIWrittenByLockUp, Accordion, type AccordionProps, AiContentContainer, type AiContentContainerProps, type AiWrittenByLockUpProps, AnnualController, type AnnualControllerProps, AssetItem, type AssetItemProps, AuthContainerSurface, AuthFormHeader, type AuthFormHeaderProps, Avatar, AvatarGroup, type AvatarGroupProps, type AvatarProps, Badge, type BadgeProps, BarGraph, type BarGraphProps, BrandBadge, type BrandBadgeProps, Breadcrumb, type BreadcrumbProps, type BreakpointOrNull, BulletGraphic, type BulletGraphicProps, Button, ButtonBase, type ButtonBaseProps, type ButtonProps, type ButtonSizing, Checkbox, CheckboxGroup, type CheckboxGroupProps, type CheckboxProps, ColorBackgroundContainer, type ColorBackgroundContainerProps, type ColorRange$1 as ColorRange, type ColorRangeAlpha$1 as ColorRangeAlpha, CommentCard, type CommentCardProps, CreatableAutocomplete, type CreatableAutocompleteOption, type CreatableAutocompleteProps, CustomField, type CustomFieldProps, DEFAULT_MAX_INPUT_LENGTH, DataPointInfo, type DataPointInfoProps, Differential, type DifferentialProps, DropdownMenu, EmptyStateCard, type EmptyStateCardProps, ExpandableTypographyClamp, type ExpandableTypographyClampProps, type FieldType, type FieldTypes, FilteredItemsCard, type FilteredItemsCardProps, Flag, type FlagProps, FontWeight, FormControlLabel, FormGenerator, type FormGeneratorConfig, type FormGeneratorHandler, type GenericSizeMap, GridOverlay, type GridOverlayProps, type GroupSelectOption, Header, type HeaderProps, Html, HtmlParser, type HtmlParserProps, type HtmlProps, Icon, IconButton, IconButtonBase, type IconButtonBaseProps, IconButtonGroup, type IconButtonGroupProps, type IconButtonProps, type IconName, Image, type ImageProps, InputFieldBase, type InputFieldBaseProps, InputLabel, InputLabelHelp, type InputLabelHelpProps, type InputLabelProps, KpiDataPopover, type KpiDataPopoverProps, KpiIndicator, type KpiIndicatorProps, Label, type LabelProps, Likert, type LikertProps, Link, type LinkProps, Loader, type LoaderProps, Logo, LoopItem, LoopItemEmpty, type LoopItemEmptyProps, type LoopItemProps, LoopsAiButton, type LoopsAiButtonProps, Markdown, type MarkdownProps, type MarkerComponentProps, Menu, type MenuProps, ModalActionsWrapper, ModalContentWrapper, ModalLayout, type ModalLayoutProps, Navigation, NavigationButton, type NavigationButtonProps, type NavigationProps, type NavigationSizing, Nudge, type NudgeProps, NumberField, type NumberFieldProps, OnboardingCard, type OnboardingCardProps, type OnboardingItem, Pill, type PillProps, PlanFeatureTable, type PlanFeatureTableData, type PlanFeatureTableProps, PlanTierCard, type PlanTierCardProps, Popper, type PopperProps, PoweredByWatermarkLogo, Progress, ProgressBar, type ProgressBarProps, type ProgressProps, ProjectItem, ProjectItemEmpty, type ProjectItemEmptyProps, type ProjectItemProps, Projects, type ProjectsProps, QuestionBlock, type QuestionBlockProps, type QuestionStats, Radio, RadioGroup, type RadioGroupProps, type RadioProps, Rank, type RankProps, RichTextField, type RichTextFieldProps, type Section, SectionHeader, type SectionHeaderProps, Select, type SelectOption, type SelectProps, type SemanticColor, Skeleton, type SkeletonProps, Slider, type SliderProps, SortableList, type SortableListProps, StarRating, type StarRatingProps, Surface, type SurfaceProps, Switch, type SwitchProps, TestItem, type TestItemProps, TestKPICard, type TestKPICardProps, TextBarDivider, type TextBarDividerProps, TextField, type TextFieldProps, Textarea, type TextareaProps, ThemeContext, type ThemeCtx, ThemeProvider, TickGroup, type TickGroupProps, Toast, type ToastProps, Tooltip, type TooltipProps, TrialCard, type TrialCardProps, Typography, type TypographyProps, UserMenu, type UserMenuProps, _default as VideoControls, type VideoControlsProps, VideoModal, type VideoModalProps, backgroundCreator, base, blue, blueRamp, boxShadow, breakpoints, buttonHeightMap, buttonInteraction, chooseArticle, compareArrayMembers, customTheme, darkNeutral, darkNeutralAlpha, defaultInputValidation, easing, elevation, elevationFilter, emailValidation, fonts, generateRamp, getButtonSizing, getButtonTypography, getIconSizing$1 as getIconSizing, getKpiIndicatorColor, green, greenRamp, IconButton_variantHelpers as iconButtonHelpers, iconSizeMap, isButton, mapKpiColorSchemeByInteger, margin, neutral, neutralAlpha, neutralRamp, outlined$1 as outlined, padding, passwordValidation, peach, peachRamp, primary, purple, purpleRamp, radius, red, redRamp, secondary, semantic, space, subtle, useBreakpoint, useDropdownMenu, useKeyCombo, usePrevious, useScreenSize, useTheme, useThemeBuilder, yellow, yellowRamp };