@mindlogic-ai/logician-ui 2.0.0-alpha.13 → 2.0.0-alpha.14
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.mts +42 -23
- package/dist/index.d.ts +42 -23
- package/dist/index.js +118 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -4
- package/src/index.ts +1 -0
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
3
|
-
import { AccordionProps, ChakraProps, AlertProps as AlertProps$1, InputProps as InputProps$1, AvatarProps, BadgeProps, BoxProps, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbItemProps as BreadcrumbItemProps$1, BreadcrumbLinkProps as BreadcrumbLinkProps$1, ButtonProps as ButtonProps$1, CardProps as CardProps$1, ModalProps as ModalProps$1, ModalBodyProps, ModalCloseButtonProps, ModalContentProps as ModalContentProps$1, ModalFooterProps, ModalHeaderProps, ModalOverlayProps, CheckboxProps as CheckboxProps$1, TabsProps as TabsProps$1, ContainerProps, FlexProps, EditableProps, EditablePreviewProps, InputGroupProps, InputLeftElementProps, InputRightElementProps, FormControlProps as FormControlProps$1, FormLabelProps, PopoverProps, IconButtonProps as IconButtonProps$1, CodeProps as CodeProps$1, ChakraProviderProps,
|
|
3
|
+
import { AccordionProps, ChakraProps, AlertProps as AlertProps$1, InputProps as InputProps$1, AvatarProps, BadgeProps, BoxProps, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbItemProps as BreadcrumbItemProps$1, BreadcrumbLinkProps as BreadcrumbLinkProps$1, ButtonProps as ButtonProps$1, CardProps as CardProps$1, ModalProps as ModalProps$1, ModalBodyProps, ModalCloseButtonProps, ModalContentProps as ModalContentProps$1, ModalFooterProps, ModalHeaderProps, ModalOverlayProps, CheckboxProps as CheckboxProps$1, TabsProps as TabsProps$1, ContainerProps, FlexProps, EditableProps, EditablePreviewProps, HeadingProps, LinkProps, TextProps, InputGroupProps, InputLeftElementProps, InputRightElementProps, FormControlProps as FormControlProps$1, FormLabelProps, PopoverProps, IconButtonProps as IconButtonProps$1, CodeProps as CodeProps$1, ChakraProviderProps, MenuButtonProps, MenuItemProps as MenuItemProps$1, MenuListProps, ProgressProps, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, StackDirection, theme, SliderProps as SliderProps$1, SliderTrackProps as SliderTrackProps$1, SliderMarkProps as SliderMarkProps$1, SliderThumbProps as SliderThumbProps$1, SpinnerProps as SpinnerProps$1, TableRowProps, TableProps, TableContainerProps as TableContainerProps$1, TableCellProps as TableCellProps$1, TableBodyProps, TableColumnHeaderProps, TableHeadProps, TabProps as TabProps$1, TabListProps, TabPanelProps, TabPanelsProps, TagProps as TagProps$1, TagCloseButtonProps as TagCloseButtonProps$1, TagLabelProps as TagLabelProps$1, IconProps as IconProps$1, TextareaProps, UseToastOptions as UseToastOptions$1, TooltipProps as TooltipProps$1 } from '@chakra-ui/react';
|
|
4
4
|
export { AccordionPanel, Menu } from '@chakra-ui/react';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { PropsWithChildren, ReactNode, RefObject, SVGProps } from 'react';
|
|
@@ -318,6 +318,46 @@ interface ErrorLogData {
|
|
|
318
318
|
|
|
319
319
|
declare function ErrorFallback({ error, errorId, timestamp, componentName, userId, onErrorReset, }: ErrorFallbackProps): react_jsx_runtime.JSX.Element;
|
|
320
320
|
|
|
321
|
+
declare const H1: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
322
|
+
|
|
323
|
+
declare const H2: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
324
|
+
|
|
325
|
+
declare const H3: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
326
|
+
|
|
327
|
+
declare const H4: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
328
|
+
|
|
329
|
+
declare const H5: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
330
|
+
|
|
331
|
+
interface LinkCustomProps extends LinkProps {
|
|
332
|
+
variant?: 'error';
|
|
333
|
+
}
|
|
334
|
+
declare const Link: react.ForwardRefExoticComponent<LinkCustomProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
335
|
+
|
|
336
|
+
declare const Subtext: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
337
|
+
|
|
338
|
+
declare const Subtitle: react.ForwardRefExoticComponent<TextProps & react.RefAttributes<HTMLSpanElement>>;
|
|
339
|
+
|
|
340
|
+
declare const Text: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
341
|
+
|
|
342
|
+
type TypographyProps = TextProps;
|
|
343
|
+
|
|
344
|
+
declare const TEXT_COMPONENTS: {
|
|
345
|
+
readonly Text: react__default.ForwardRefExoticComponent<_chakra_ui_react.TextProps & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
346
|
+
readonly Subtitle: react__default.ForwardRefExoticComponent<_chakra_ui_react.TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
347
|
+
readonly Subtext: react__default.ForwardRefExoticComponent<_chakra_ui_react.TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
348
|
+
readonly H1: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
349
|
+
readonly H2: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
350
|
+
readonly H3: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
351
|
+
readonly H4: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
352
|
+
readonly H5: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
353
|
+
};
|
|
354
|
+
type TextComponentType = keyof typeof TEXT_COMPONENTS;
|
|
355
|
+
type ExpandableTextProps = {
|
|
356
|
+
charLimit?: number;
|
|
357
|
+
component?: TextComponentType;
|
|
358
|
+
} & TypographyProps;
|
|
359
|
+
declare const ExpandableText: ({ charLimit, component, children, ...rest }: ExpandableTextProps) => react_jsx_runtime.JSX.Element;
|
|
360
|
+
|
|
321
361
|
interface InputProps extends InputProps$1 {
|
|
322
362
|
leftIcon?: React.ReactElement;
|
|
323
363
|
rightIcon?: React.ReactElement;
|
|
@@ -995,31 +1035,10 @@ interface TooltipProps extends TooltipProps$1 {
|
|
|
995
1035
|
|
|
996
1036
|
declare const Tooltip: react.ForwardRefExoticComponent<TooltipProps & react.RefAttributes<HTMLDivElement>>;
|
|
997
1037
|
|
|
998
|
-
declare const H1: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
999
|
-
|
|
1000
|
-
declare const H2: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1001
|
-
|
|
1002
|
-
declare const H3: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1003
|
-
|
|
1004
|
-
declare const H4: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1005
|
-
|
|
1006
|
-
declare const H5: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1007
|
-
|
|
1008
|
-
interface LinkCustomProps extends LinkProps {
|
|
1009
|
-
variant?: 'error';
|
|
1010
|
-
}
|
|
1011
|
-
declare const Link: react.ForwardRefExoticComponent<LinkCustomProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
1012
|
-
|
|
1013
|
-
declare const Subtext: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
1014
|
-
|
|
1015
|
-
declare const Subtitle: react.ForwardRefExoticComponent<TextProps & react.RefAttributes<HTMLSpanElement>>;
|
|
1016
|
-
|
|
1017
|
-
declare const Text: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
1018
|
-
|
|
1019
1038
|
interface UrlInputProps extends InputProps$1 {
|
|
1020
1039
|
leftAddon?: string;
|
|
1021
1040
|
rightAddon?: string;
|
|
1022
1041
|
}
|
|
1023
1042
|
declare const UrlInput: react.ForwardRefExoticComponent<UrlInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1024
1043
|
|
|
1025
|
-
export { Accordion, AccordionButton, AccordionItem, Alert, type AlertProps, AutosizeTextarea, AutowidthInput, Avatar, Badge, Banner, type BannerProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, CarouselModal, type CarouselModalProps, type CarouselProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonPropsTypes, type ChipProps, type ChipUseCase, Code, type CodeProps, CodeTabs, type CodeTabsProps, Container, CopyableCode, type CopyableCodeProps, CrossPageToasts, type CustomMenuButtonProps, DataField, type DataFieldProps, type DataKey, type Datum, type DatumBase, ErrorFallback, type ErrorFallbackProps, type ErrorLogData, ExpandingTr, type FileGroupProps, FileInput, type FileInputProps, FileItem, type FileItemData, type FileItemProps, FileList$1 as FileList, FormControl, type FormControlProps, FormLabel, GuideCue, GuideCueProvider, H1, H2, H3, H4, H5, Icon, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, type IconType, IconTypes, InfoSprinkle, InlineCode, Input, type InputProps, ItemVariant, LineGraph, type LineGraphProps, Link, LogicianProvider, type LogicianProviderProps, MDXEditor, type MDXEditorProps, type MLToastOptions, MONTHS, Markdown, type MarkdownProps, Masonry, type MasonryProps, MaxLengthIndicator, MenuButton, MenuItem, type MenuItemProps, MenuList, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, type ModalProps, MonthPicker, type MonthPickerProps, PageLoader, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PinInput, type PinInputProps, ProgressBar, type ProgressBarProps, ProgressSegment, type ProgressSegmentProps, RadialProgress, type RadialProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOption, type RadioProps, RangeDatePicker, SectionLoader, SeeMoreButton, type SeeMoreButtonProps, SegmentedControl, type SegmentedControlProps, SegmentedProgressBar, Select, type SelectOption, type SelectProps, type SelectVariant, SingleDatePicker, Slider, SliderFilledTrack, type SliderFilledTrackProps, SliderMark, type SliderMarkProps, type SliderProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Spinner, type SpinnerProps, Subtext, Subtitle, Switch, Tab, TabList, TabPanel, TabPanels, type TabProps, Table, type TableCellProps, TableContainer, type TableContainerProps, Tabs, type TabsProps, Tag, TagCloseButton, type TagCloseButtonProps, TagLabel, type TagLabelProps, TagLeftIcon, type TagLeftIconProps, type TagProps, TagRightIcon, type TagRightIconProps, Tbody, Td, Text, Textarea, Th, Thead, Toast, type ToastProps, Tooltip, type TooltipProps, Tr, UrlInput, type UseToastOptions, baseStyles as badgeStyles, baseMarkdownComponents, getContainerWidth, getDateFnsLocale, getDefaultDateFormat, getMonthNames, toastStyles, useCaseStyles, useToast, variantStyles };
|
|
1044
|
+
export { Accordion, AccordionButton, AccordionItem, Alert, type AlertProps, AutosizeTextarea, AutowidthInput, Avatar, Badge, Banner, type BannerProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, CarouselModal, type CarouselModalProps, type CarouselProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonPropsTypes, type ChipProps, type ChipUseCase, Code, type CodeProps, CodeTabs, type CodeTabsProps, Container, CopyableCode, type CopyableCodeProps, CrossPageToasts, type CustomMenuButtonProps, DataField, type DataFieldProps, type DataKey, type Datum, type DatumBase, ErrorFallback, type ErrorFallbackProps, type ErrorLogData, ExpandableText, type ExpandableTextProps, ExpandingTr, type FileGroupProps, FileInput, type FileInputProps, FileItem, type FileItemData, type FileItemProps, FileList$1 as FileList, FormControl, type FormControlProps, FormLabel, GuideCue, GuideCueProvider, H1, H2, H3, H4, H5, Icon, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, type IconType, IconTypes, InfoSprinkle, InlineCode, Input, type InputProps, ItemVariant, LineGraph, type LineGraphProps, Link, LogicianProvider, type LogicianProviderProps, MDXEditor, type MDXEditorProps, type MLToastOptions, MONTHS, Markdown, type MarkdownProps, Masonry, type MasonryProps, MaxLengthIndicator, MenuButton, MenuItem, type MenuItemProps, MenuList, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, type ModalProps, MonthPicker, type MonthPickerProps, PageLoader, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PinInput, type PinInputProps, ProgressBar, type ProgressBarProps, ProgressSegment, type ProgressSegmentProps, RadialProgress, type RadialProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOption, type RadioProps, RangeDatePicker, SectionLoader, SeeMoreButton, type SeeMoreButtonProps, SegmentedControl, type SegmentedControlProps, SegmentedProgressBar, Select, type SelectOption, type SelectProps, type SelectVariant, SingleDatePicker, Slider, SliderFilledTrack, type SliderFilledTrackProps, SliderMark, type SliderMarkProps, type SliderProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Spinner, type SpinnerProps, Subtext, Subtitle, Switch, Tab, TabList, TabPanel, TabPanels, type TabProps, Table, type TableCellProps, TableContainer, type TableContainerProps, Tabs, type TabsProps, Tag, TagCloseButton, type TagCloseButtonProps, TagLabel, type TagLabelProps, TagLeftIcon, type TagLeftIconProps, type TagProps, TagRightIcon, type TagRightIconProps, Tbody, Td, Text, Textarea, Th, Thead, Toast, type ToastProps, Tooltip, type TooltipProps, Tr, UrlInput, type UseToastOptions, baseStyles as badgeStyles, baseMarkdownComponents, getContainerWidth, getDateFnsLocale, getDefaultDateFormat, getMonthNames, toastStyles, useCaseStyles, useToast, variantStyles };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
2
|
import * as _chakra_ui_react from '@chakra-ui/react';
|
|
3
|
-
import { AccordionProps, ChakraProps, AlertProps as AlertProps$1, InputProps as InputProps$1, AvatarProps, BadgeProps, BoxProps, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbItemProps as BreadcrumbItemProps$1, BreadcrumbLinkProps as BreadcrumbLinkProps$1, ButtonProps as ButtonProps$1, CardProps as CardProps$1, ModalProps as ModalProps$1, ModalBodyProps, ModalCloseButtonProps, ModalContentProps as ModalContentProps$1, ModalFooterProps, ModalHeaderProps, ModalOverlayProps, CheckboxProps as CheckboxProps$1, TabsProps as TabsProps$1, ContainerProps, FlexProps, EditableProps, EditablePreviewProps, InputGroupProps, InputLeftElementProps, InputRightElementProps, FormControlProps as FormControlProps$1, FormLabelProps, PopoverProps, IconButtonProps as IconButtonProps$1, CodeProps as CodeProps$1, ChakraProviderProps,
|
|
3
|
+
import { AccordionProps, ChakraProps, AlertProps as AlertProps$1, InputProps as InputProps$1, AvatarProps, BadgeProps, BoxProps, BreadcrumbProps as BreadcrumbProps$1, BreadcrumbItemProps as BreadcrumbItemProps$1, BreadcrumbLinkProps as BreadcrumbLinkProps$1, ButtonProps as ButtonProps$1, CardProps as CardProps$1, ModalProps as ModalProps$1, ModalBodyProps, ModalCloseButtonProps, ModalContentProps as ModalContentProps$1, ModalFooterProps, ModalHeaderProps, ModalOverlayProps, CheckboxProps as CheckboxProps$1, TabsProps as TabsProps$1, ContainerProps, FlexProps, EditableProps, EditablePreviewProps, HeadingProps, LinkProps, TextProps, InputGroupProps, InputLeftElementProps, InputRightElementProps, FormControlProps as FormControlProps$1, FormLabelProps, PopoverProps, IconButtonProps as IconButtonProps$1, CodeProps as CodeProps$1, ChakraProviderProps, MenuButtonProps, MenuItemProps as MenuItemProps$1, MenuListProps, ProgressProps, RadioProps as RadioProps$1, RadioGroupProps as RadioGroupProps$1, StackDirection, theme, SliderProps as SliderProps$1, SliderTrackProps as SliderTrackProps$1, SliderMarkProps as SliderMarkProps$1, SliderThumbProps as SliderThumbProps$1, SpinnerProps as SpinnerProps$1, TableRowProps, TableProps, TableContainerProps as TableContainerProps$1, TableCellProps as TableCellProps$1, TableBodyProps, TableColumnHeaderProps, TableHeadProps, TabProps as TabProps$1, TabListProps, TabPanelProps, TabPanelsProps, TagProps as TagProps$1, TagCloseButtonProps as TagCloseButtonProps$1, TagLabelProps as TagLabelProps$1, IconProps as IconProps$1, TextareaProps, UseToastOptions as UseToastOptions$1, TooltipProps as TooltipProps$1 } from '@chakra-ui/react';
|
|
4
4
|
export { AccordionPanel, Menu } from '@chakra-ui/react';
|
|
5
5
|
import * as react from 'react';
|
|
6
6
|
import react__default, { PropsWithChildren, ReactNode, RefObject, SVGProps } from 'react';
|
|
@@ -318,6 +318,46 @@ interface ErrorLogData {
|
|
|
318
318
|
|
|
319
319
|
declare function ErrorFallback({ error, errorId, timestamp, componentName, userId, onErrorReset, }: ErrorFallbackProps): react_jsx_runtime.JSX.Element;
|
|
320
320
|
|
|
321
|
+
declare const H1: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
322
|
+
|
|
323
|
+
declare const H2: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
324
|
+
|
|
325
|
+
declare const H3: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
326
|
+
|
|
327
|
+
declare const H4: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
328
|
+
|
|
329
|
+
declare const H5: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
330
|
+
|
|
331
|
+
interface LinkCustomProps extends LinkProps {
|
|
332
|
+
variant?: 'error';
|
|
333
|
+
}
|
|
334
|
+
declare const Link: react.ForwardRefExoticComponent<LinkCustomProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
335
|
+
|
|
336
|
+
declare const Subtext: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
337
|
+
|
|
338
|
+
declare const Subtitle: react.ForwardRefExoticComponent<TextProps & react.RefAttributes<HTMLSpanElement>>;
|
|
339
|
+
|
|
340
|
+
declare const Text: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
341
|
+
|
|
342
|
+
type TypographyProps = TextProps;
|
|
343
|
+
|
|
344
|
+
declare const TEXT_COMPONENTS: {
|
|
345
|
+
readonly Text: react__default.ForwardRefExoticComponent<_chakra_ui_react.TextProps & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
346
|
+
readonly Subtitle: react__default.ForwardRefExoticComponent<_chakra_ui_react.TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
347
|
+
readonly Subtext: react__default.ForwardRefExoticComponent<_chakra_ui_react.TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
348
|
+
readonly H1: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
349
|
+
readonly H2: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
350
|
+
readonly H3: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
351
|
+
readonly H4: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
352
|
+
readonly H5: react__default.ForwardRefExoticComponent<HeadingProps & react__default.RefAttributes<HTMLHeadingElement>>;
|
|
353
|
+
};
|
|
354
|
+
type TextComponentType = keyof typeof TEXT_COMPONENTS;
|
|
355
|
+
type ExpandableTextProps = {
|
|
356
|
+
charLimit?: number;
|
|
357
|
+
component?: TextComponentType;
|
|
358
|
+
} & TypographyProps;
|
|
359
|
+
declare const ExpandableText: ({ charLimit, component, children, ...rest }: ExpandableTextProps) => react_jsx_runtime.JSX.Element;
|
|
360
|
+
|
|
321
361
|
interface InputProps extends InputProps$1 {
|
|
322
362
|
leftIcon?: React.ReactElement;
|
|
323
363
|
rightIcon?: React.ReactElement;
|
|
@@ -995,31 +1035,10 @@ interface TooltipProps extends TooltipProps$1 {
|
|
|
995
1035
|
|
|
996
1036
|
declare const Tooltip: react.ForwardRefExoticComponent<TooltipProps & react.RefAttributes<HTMLDivElement>>;
|
|
997
1037
|
|
|
998
|
-
declare const H1: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
999
|
-
|
|
1000
|
-
declare const H2: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1001
|
-
|
|
1002
|
-
declare const H3: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1003
|
-
|
|
1004
|
-
declare const H4: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1005
|
-
|
|
1006
|
-
declare const H5: react.ForwardRefExoticComponent<HeadingProps & react.RefAttributes<HTMLHeadingElement>>;
|
|
1007
|
-
|
|
1008
|
-
interface LinkCustomProps extends LinkProps {
|
|
1009
|
-
variant?: 'error';
|
|
1010
|
-
}
|
|
1011
|
-
declare const Link: react.ForwardRefExoticComponent<LinkCustomProps & react.RefAttributes<HTMLAnchorElement>>;
|
|
1012
|
-
|
|
1013
|
-
declare const Subtext: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLSpanElement>>;
|
|
1014
|
-
|
|
1015
|
-
declare const Subtitle: react.ForwardRefExoticComponent<TextProps & react.RefAttributes<HTMLSpanElement>>;
|
|
1016
|
-
|
|
1017
|
-
declare const Text: react__default.ForwardRefExoticComponent<TextProps & react__default.RefAttributes<HTMLParagraphElement>>;
|
|
1018
|
-
|
|
1019
1038
|
interface UrlInputProps extends InputProps$1 {
|
|
1020
1039
|
leftAddon?: string;
|
|
1021
1040
|
rightAddon?: string;
|
|
1022
1041
|
}
|
|
1023
1042
|
declare const UrlInput: react.ForwardRefExoticComponent<UrlInputProps & react.RefAttributes<HTMLInputElement>>;
|
|
1024
1043
|
|
|
1025
|
-
export { Accordion, AccordionButton, AccordionItem, Alert, type AlertProps, AutosizeTextarea, AutowidthInput, Avatar, Badge, Banner, type BannerProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, CarouselModal, type CarouselModalProps, type CarouselProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonPropsTypes, type ChipProps, type ChipUseCase, Code, type CodeProps, CodeTabs, type CodeTabsProps, Container, CopyableCode, type CopyableCodeProps, CrossPageToasts, type CustomMenuButtonProps, DataField, type DataFieldProps, type DataKey, type Datum, type DatumBase, ErrorFallback, type ErrorFallbackProps, type ErrorLogData, ExpandingTr, type FileGroupProps, FileInput, type FileInputProps, FileItem, type FileItemData, type FileItemProps, FileList$1 as FileList, FormControl, type FormControlProps, FormLabel, GuideCue, GuideCueProvider, H1, H2, H3, H4, H5, Icon, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, type IconType, IconTypes, InfoSprinkle, InlineCode, Input, type InputProps, ItemVariant, LineGraph, type LineGraphProps, Link, LogicianProvider, type LogicianProviderProps, MDXEditor, type MDXEditorProps, type MLToastOptions, MONTHS, Markdown, type MarkdownProps, Masonry, type MasonryProps, MaxLengthIndicator, MenuButton, MenuItem, type MenuItemProps, MenuList, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, type ModalProps, MonthPicker, type MonthPickerProps, PageLoader, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PinInput, type PinInputProps, ProgressBar, type ProgressBarProps, ProgressSegment, type ProgressSegmentProps, RadialProgress, type RadialProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOption, type RadioProps, RangeDatePicker, SectionLoader, SeeMoreButton, type SeeMoreButtonProps, SegmentedControl, type SegmentedControlProps, SegmentedProgressBar, Select, type SelectOption, type SelectProps, type SelectVariant, SingleDatePicker, Slider, SliderFilledTrack, type SliderFilledTrackProps, SliderMark, type SliderMarkProps, type SliderProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Spinner, type SpinnerProps, Subtext, Subtitle, Switch, Tab, TabList, TabPanel, TabPanels, type TabProps, Table, type TableCellProps, TableContainer, type TableContainerProps, Tabs, type TabsProps, Tag, TagCloseButton, type TagCloseButtonProps, TagLabel, type TagLabelProps, TagLeftIcon, type TagLeftIconProps, type TagProps, TagRightIcon, type TagRightIconProps, Tbody, Td, Text, Textarea, Th, Thead, Toast, type ToastProps, Tooltip, type TooltipProps, Tr, UrlInput, type UseToastOptions, baseStyles as badgeStyles, baseMarkdownComponents, getContainerWidth, getDateFnsLocale, getDefaultDateFormat, getMonthNames, toastStyles, useCaseStyles, useToast, variantStyles };
|
|
1044
|
+
export { Accordion, AccordionButton, AccordionItem, Alert, type AlertProps, AutosizeTextarea, AutowidthInput, Avatar, Badge, Banner, type BannerProps, Breadcrumb, BreadcrumbItem, type BreadcrumbItemProps, BreadcrumbLink, type BreadcrumbLinkProps, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Carousel, CarouselModal, type CarouselModalProps, type CarouselProps, Checkbox, type CheckboxProps, Chip, ChipButton, type ChipButtonPropsTypes, type ChipProps, type ChipUseCase, Code, type CodeProps, CodeTabs, type CodeTabsProps, Container, CopyableCode, type CopyableCodeProps, CrossPageToasts, type CustomMenuButtonProps, DataField, type DataFieldProps, type DataKey, type Datum, type DatumBase, ErrorFallback, type ErrorFallbackProps, type ErrorLogData, ExpandableText, type ExpandableTextProps, ExpandingTr, type FileGroupProps, FileInput, type FileInputProps, FileItem, type FileItemData, type FileItemProps, FileList$1 as FileList, FormControl, type FormControlProps, FormLabel, GuideCue, GuideCueProvider, H1, H2, H3, H4, H5, Icon, IconButton, type IconButtonProps, type IconButtonVariant, type IconProps, type IconType, IconTypes, InfoSprinkle, InlineCode, Input, type InputProps, ItemVariant, LineGraph, type LineGraphProps, Link, LogicianProvider, type LogicianProviderProps, MDXEditor, type MDXEditorProps, type MLToastOptions, MONTHS, Markdown, type MarkdownProps, Masonry, type MasonryProps, MaxLengthIndicator, MenuButton, MenuItem, type MenuItemProps, MenuList, Modal, ModalBody, ModalCloseButton, ModalContent, ModalFooter, ModalHeader, ModalOverlay, type ModalProps, MonthPicker, type MonthPickerProps, PageLoader, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, PinInput, type PinInputProps, ProgressBar, type ProgressBarProps, ProgressSegment, type ProgressSegmentProps, RadialProgress, type RadialProgressProps, Radio, RadioGroup, type RadioGroupProps, type RadioOption, type RadioProps, RangeDatePicker, SectionLoader, SeeMoreButton, type SeeMoreButtonProps, SegmentedControl, type SegmentedControlProps, SegmentedProgressBar, Select, type SelectOption, type SelectProps, type SelectVariant, SingleDatePicker, Slider, SliderFilledTrack, type SliderFilledTrackProps, SliderMark, type SliderMarkProps, type SliderProps, SliderThumb, type SliderThumbProps, SliderTrack, type SliderTrackProps, Spinner, type SpinnerProps, Subtext, Subtitle, Switch, Tab, TabList, TabPanel, TabPanels, type TabProps, Table, type TableCellProps, TableContainer, type TableContainerProps, Tabs, type TabsProps, Tag, TagCloseButton, type TagCloseButtonProps, TagLabel, type TagLabelProps, TagLeftIcon, type TagLeftIconProps, type TagProps, TagRightIcon, type TagRightIconProps, Tbody, Td, Text, Textarea, Th, Thead, Toast, type ToastProps, Tooltip, type TooltipProps, Tr, UrlInput, type UseToastOptions, baseStyles as badgeStyles, baseMarkdownComponents, getContainerWidth, getDateFnsLocale, getDefaultDateFormat, getMonthNames, toastStyles, useCaseStyles, useToast, variantStyles };
|
package/dist/index.js
CHANGED
|
@@ -206,7 +206,7 @@ var require_react_is_development = chunkYXOCS3PH_js.__commonJS({
|
|
|
206
206
|
var ContextProvider = REACT_PROVIDER_TYPE;
|
|
207
207
|
var Element = REACT_ELEMENT_TYPE;
|
|
208
208
|
var ForwardRef = REACT_FORWARD_REF_TYPE;
|
|
209
|
-
var
|
|
209
|
+
var Fragment5 = REACT_FRAGMENT_TYPE;
|
|
210
210
|
var Lazy = REACT_LAZY_TYPE;
|
|
211
211
|
var Memo = REACT_MEMO_TYPE;
|
|
212
212
|
var Portal4 = REACT_PORTAL_TYPE;
|
|
@@ -265,7 +265,7 @@ var require_react_is_development = chunkYXOCS3PH_js.__commonJS({
|
|
|
265
265
|
exports.ContextProvider = ContextProvider;
|
|
266
266
|
exports.Element = Element;
|
|
267
267
|
exports.ForwardRef = ForwardRef;
|
|
268
|
-
exports.Fragment =
|
|
268
|
+
exports.Fragment = Fragment5;
|
|
269
269
|
exports.Lazy = Lazy;
|
|
270
270
|
exports.Memo = Memo;
|
|
271
271
|
exports.Portal = Portal4;
|
|
@@ -477,7 +477,7 @@ var require_factoryWithTypeCheckers = chunkYXOCS3PH_js.__commonJS({
|
|
|
477
477
|
function emptyFunctionThatReturnsNull() {
|
|
478
478
|
return null;
|
|
479
479
|
}
|
|
480
|
-
module.exports = function(
|
|
480
|
+
module.exports = function(isValidElement3, throwOnDirectAccess) {
|
|
481
481
|
var ITERATOR_SYMBOL = typeof Symbol === "function" && Symbol.iterator;
|
|
482
482
|
var FAUX_ITERATOR_SYMBOL = "@@iterator";
|
|
483
483
|
function getIteratorFn(maybeIterable) {
|
|
@@ -605,7 +605,7 @@ var require_factoryWithTypeCheckers = chunkYXOCS3PH_js.__commonJS({
|
|
|
605
605
|
function createElementTypeChecker() {
|
|
606
606
|
function validate(props, propName, componentName, location, propFullName) {
|
|
607
607
|
var propValue = props[propName];
|
|
608
|
-
if (!
|
|
608
|
+
if (!isValidElement3(propValue)) {
|
|
609
609
|
var propType = getPropType(propValue);
|
|
610
610
|
return new PropTypeError("Invalid " + location + " `" + propFullName + "` of type " + ("`" + propType + "` supplied to `" + componentName + "`, expected a single ReactElement."));
|
|
611
611
|
}
|
|
@@ -793,7 +793,7 @@ var require_factoryWithTypeCheckers = chunkYXOCS3PH_js.__commonJS({
|
|
|
793
793
|
if (Array.isArray(propValue)) {
|
|
794
794
|
return propValue.every(isNode);
|
|
795
795
|
}
|
|
796
|
-
if (propValue === null ||
|
|
796
|
+
if (propValue === null || isValidElement3(propValue)) {
|
|
797
797
|
return true;
|
|
798
798
|
}
|
|
799
799
|
var iteratorFn = getIteratorFn(propValue);
|
|
@@ -2790,6 +2790,118 @@ User Agent: ${errorInfo.userAgent}`;
|
|
|
2790
2790
|
}
|
|
2791
2791
|
);
|
|
2792
2792
|
}
|
|
2793
|
+
var getTextContent = (node) => {
|
|
2794
|
+
if (typeof node === "string" || typeof node === "number") {
|
|
2795
|
+
return String(node);
|
|
2796
|
+
}
|
|
2797
|
+
if (Array.isArray(node)) {
|
|
2798
|
+
return node.map(getTextContent).join("");
|
|
2799
|
+
}
|
|
2800
|
+
if (React7.isValidElement(node)) {
|
|
2801
|
+
return getTextContent(node.props.children);
|
|
2802
|
+
}
|
|
2803
|
+
return "";
|
|
2804
|
+
};
|
|
2805
|
+
var truncateReactNode = (node, charLimit, currentLength = 0) => {
|
|
2806
|
+
if (currentLength >= charLimit) {
|
|
2807
|
+
return { truncated: null, length: currentLength };
|
|
2808
|
+
}
|
|
2809
|
+
if (typeof node === "string" || typeof node === "number") {
|
|
2810
|
+
const text = String(node);
|
|
2811
|
+
const remainingChars = charLimit - currentLength;
|
|
2812
|
+
if (text.length <= remainingChars) {
|
|
2813
|
+
return { truncated: node, length: currentLength + text.length };
|
|
2814
|
+
}
|
|
2815
|
+
return {
|
|
2816
|
+
truncated: text.slice(0, remainingChars) + "\u2026",
|
|
2817
|
+
length: charLimit
|
|
2818
|
+
};
|
|
2819
|
+
}
|
|
2820
|
+
if (Array.isArray(node)) {
|
|
2821
|
+
const truncatedChildren = [];
|
|
2822
|
+
let totalLength = currentLength;
|
|
2823
|
+
for (const child of node) {
|
|
2824
|
+
if (totalLength >= charLimit) break;
|
|
2825
|
+
const { truncated, length } = truncateReactNode(
|
|
2826
|
+
child,
|
|
2827
|
+
charLimit,
|
|
2828
|
+
totalLength
|
|
2829
|
+
);
|
|
2830
|
+
if (truncated !== null) {
|
|
2831
|
+
truncatedChildren.push(truncated);
|
|
2832
|
+
}
|
|
2833
|
+
totalLength = length;
|
|
2834
|
+
}
|
|
2835
|
+
return { truncated: truncatedChildren, length: totalLength };
|
|
2836
|
+
}
|
|
2837
|
+
if (React7.isValidElement(node)) {
|
|
2838
|
+
const { truncated: truncatedChildren, length } = truncateReactNode(
|
|
2839
|
+
node.props.children,
|
|
2840
|
+
charLimit,
|
|
2841
|
+
currentLength
|
|
2842
|
+
);
|
|
2843
|
+
if (truncatedChildren === null) {
|
|
2844
|
+
return { truncated: null, length };
|
|
2845
|
+
}
|
|
2846
|
+
return {
|
|
2847
|
+
truncated: {
|
|
2848
|
+
...node,
|
|
2849
|
+
props: {
|
|
2850
|
+
...node.props,
|
|
2851
|
+
children: truncatedChildren
|
|
2852
|
+
}
|
|
2853
|
+
},
|
|
2854
|
+
length
|
|
2855
|
+
};
|
|
2856
|
+
}
|
|
2857
|
+
return { truncated: node, length: currentLength };
|
|
2858
|
+
};
|
|
2859
|
+
var useExpandableText = (children, charLimit = 100) => {
|
|
2860
|
+
const [isExpanded, setIsExpanded] = React7.useState(false);
|
|
2861
|
+
const textContent = React7.useMemo(() => getTextContent(children), [children]);
|
|
2862
|
+
const isLong = textContent.length > charLimit;
|
|
2863
|
+
const displayText = React7.useMemo(() => {
|
|
2864
|
+
if (isExpanded || !isLong) return children;
|
|
2865
|
+
const { truncated } = truncateReactNode(children, charLimit);
|
|
2866
|
+
return truncated;
|
|
2867
|
+
}, [isExpanded, isLong, children, charLimit]);
|
|
2868
|
+
const handleToggle = React7.useCallback((event) => {
|
|
2869
|
+
event.preventDefault();
|
|
2870
|
+
event.stopPropagation();
|
|
2871
|
+
setIsExpanded((prev) => !prev);
|
|
2872
|
+
}, []);
|
|
2873
|
+
return { isExpanded, isLong, displayText, handleToggle };
|
|
2874
|
+
};
|
|
2875
|
+
var TEXT_COMPONENTS = {
|
|
2876
|
+
Text: chunkYXOCS3PH_js.Text,
|
|
2877
|
+
Subtitle: chunkYXOCS3PH_js.Subtitle,
|
|
2878
|
+
Subtext: chunkYXOCS3PH_js.Subtext,
|
|
2879
|
+
H1: chunkYXOCS3PH_js.H1,
|
|
2880
|
+
H2: chunkYXOCS3PH_js.H2,
|
|
2881
|
+
H3: chunkYXOCS3PH_js.H3,
|
|
2882
|
+
H4: chunkYXOCS3PH_js.H4,
|
|
2883
|
+
H5: chunkYXOCS3PH_js.H5
|
|
2884
|
+
};
|
|
2885
|
+
var ExpandableText = ({
|
|
2886
|
+
charLimit = 100,
|
|
2887
|
+
component = "Text",
|
|
2888
|
+
children,
|
|
2889
|
+
...rest
|
|
2890
|
+
}) => {
|
|
2891
|
+
const translate = chunkYXOCS3PH_js.useTranslate();
|
|
2892
|
+
const { displayText, isLong, isExpanded, handleToggle } = useExpandableText(
|
|
2893
|
+
children,
|
|
2894
|
+
charLimit
|
|
2895
|
+
);
|
|
2896
|
+
const Component = TEXT_COMPONENTS[component];
|
|
2897
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Component, { ...rest, children: [
|
|
2898
|
+
displayText,
|
|
2899
|
+
isLong && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2900
|
+
" ",
|
|
2901
|
+
/* @__PURE__ */ jsxRuntime.jsx(chunkYXOCS3PH_js.Link, { as: "button", onClick: handleToggle, "aria-expanded": isExpanded, children: isExpanded ? translate("see_less") : translate("see_more") })
|
|
2902
|
+
] })
|
|
2903
|
+
] });
|
|
2904
|
+
};
|
|
2793
2905
|
var Spinner = React7.forwardRef(
|
|
2794
2906
|
({ ...rest }, ref) => {
|
|
2795
2907
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5820,6 +5932,7 @@ exports.CopyableCode = CopyableCode;
|
|
|
5820
5932
|
exports.CrossPageToasts = CrossPageToasts;
|
|
5821
5933
|
exports.DataField = DataField;
|
|
5822
5934
|
exports.ErrorFallback = ErrorFallback;
|
|
5935
|
+
exports.ExpandableText = ExpandableText;
|
|
5823
5936
|
exports.FileInput = FileInput;
|
|
5824
5937
|
exports.FileItem = FileItem;
|
|
5825
5938
|
exports.FileList = FileList;
|