@sustaina/shared-ui 1.51.1 → 1.52.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.
package/dist/index.d.mts CHANGED
@@ -1290,6 +1290,8 @@ type RichTextProps<T = DefaultMentionItem$1> = {
1290
1290
  onImageDialogUploadError?: (error: unknown) => void;
1291
1291
  acceptImageMimeTypes?: string;
1292
1292
  allowImageUrlInsert?: boolean;
1293
+ /** Maximum number of characters allowed in the editor */
1294
+ maxLength?: number;
1293
1295
  /** Array of mention items that will be suggested */
1294
1296
  mentions?: T[];
1295
1297
  /** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
@@ -1300,7 +1302,7 @@ type RichTextProps<T = DefaultMentionItem$1> = {
1300
1302
  plainTextMentions?: boolean;
1301
1303
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
1302
1304
 
1303
- declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1305
+ declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1304
1306
  declare const RichText: <T = DefaultMentionItem$1>(props: RichTextProps<T> & {
1305
1307
  ref?: React.Ref<HTMLDivElement>;
1306
1308
  }) => ReturnType<typeof RichTextInner>;
@@ -1593,15 +1595,25 @@ declare function SidebarLayout({ sidebar, children, layoutProps, sidebarProps, i
1593
1595
 
1594
1596
  interface TimePickerProps {
1595
1597
  id?: string;
1596
- value?: string;
1597
- /** Callback with ISO time format output (HH:mm:ss.000Z) */
1598
- onChange?: (isoTime: string) => void;
1598
+ value?: Date | string | null;
1599
+ /** Callback with Date object */
1600
+ onChange?: (date?: Date) => void;
1601
+ /** Callback with string value (HH:mm format by default) */
1602
+ onValueChange?: (value?: string) => void;
1599
1603
  disabled?: boolean;
1600
1604
  className?: string;
1605
+ buttonClassName?: string;
1606
+ wrapperClassName?: string;
1601
1607
  placeholder?: string;
1602
1608
  use24Hour?: boolean;
1603
1609
  iconPosition?: "start" | "end" | "none";
1604
1610
  icon?: React$1.ReactNode;
1611
+ allowClear?: boolean;
1612
+ clearAriaLabel?: string;
1613
+ displayFormatter?: (date: Date, use24Hour: boolean) => string;
1614
+ valueFormatter?: (date: Date) => string;
1615
+ valueParser?: (value: string) => Date | undefined;
1616
+ invalid?: boolean;
1605
1617
  }
1606
1618
  declare const TimePicker: React$1.ForwardRefExoticComponent<TimePickerProps & React$1.RefAttributes<HTMLInputElement>>;
1607
1619
 
@@ -1807,6 +1819,8 @@ type ComboboxProps<TData extends OptionData> = React$1.AriaAttributes & Omit<Vir
1807
1819
  virtual?: boolean;
1808
1820
  isLoading?: boolean;
1809
1821
  loadingContent?: React$1.ReactNode;
1822
+ popoverProps?: Omit<React$1.ComponentProps<typeof Popover>, "open" | "onOpenChange">;
1823
+ popoverContentProps?: Omit<React$1.ComponentProps<typeof PopoverContent>, "children">;
1810
1824
  };
1811
1825
  declare const Combobox: <TData extends OptionData>(props: ComboboxProps<TData> & React$1.RefAttributes<HTMLButtonElement>) => React$1.ReactElement | null;
1812
1826
 
@@ -1864,6 +1878,8 @@ type InputMentionProps<T = DefaultMentionItem> = {
1864
1878
  disabled?: boolean;
1865
1879
  editorClassName?: string;
1866
1880
  autoFocus?: boolean;
1881
+ /** Maximum number of characters allowed in the editor */
1882
+ maxLength?: number;
1867
1883
  /** Array of mention items that will be suggested */
1868
1884
  mentions?: T[];
1869
1885
  /** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
@@ -1874,7 +1890,7 @@ type InputMentionProps<T = DefaultMentionItem> = {
1874
1890
  plainTextMentions?: boolean;
1875
1891
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
1876
1892
 
1877
- declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1893
+ declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1878
1894
  declare const InputMention: <T = DefaultMentionItem>(props: InputMentionProps<T> & {
1879
1895
  ref?: React.Ref<HTMLDivElement>;
1880
1896
  }) => ReturnType<typeof InputMentionInner>;
package/dist/index.d.ts CHANGED
@@ -1290,6 +1290,8 @@ type RichTextProps<T = DefaultMentionItem$1> = {
1290
1290
  onImageDialogUploadError?: (error: unknown) => void;
1291
1291
  acceptImageMimeTypes?: string;
1292
1292
  allowImageUrlInsert?: boolean;
1293
+ /** Maximum number of characters allowed in the editor */
1294
+ maxLength?: number;
1293
1295
  /** Array of mention items that will be suggested */
1294
1296
  mentions?: T[];
1295
1297
  /** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
@@ -1300,7 +1302,7 @@ type RichTextProps<T = DefaultMentionItem$1> = {
1300
1302
  plainTextMentions?: boolean;
1301
1303
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
1302
1304
 
1303
- declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1305
+ declare function RichTextInner<T = DefaultMentionItem$1>({ value, defaultValue, onChange, onHtmlChange, onTextChange, placeholder, readOnly, disabled, editorClassName, toolbarClassName, autoFocus, onImageUpload, onImageUploadError, onImageDialogUpload, onImageDialogUploadError, acceptImageMimeTypes, allowImageUrlInsert, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: RichTextProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1304
1306
  declare const RichText: <T = DefaultMentionItem$1>(props: RichTextProps<T> & {
1305
1307
  ref?: React.Ref<HTMLDivElement>;
1306
1308
  }) => ReturnType<typeof RichTextInner>;
@@ -1593,15 +1595,25 @@ declare function SidebarLayout({ sidebar, children, layoutProps, sidebarProps, i
1593
1595
 
1594
1596
  interface TimePickerProps {
1595
1597
  id?: string;
1596
- value?: string;
1597
- /** Callback with ISO time format output (HH:mm:ss.000Z) */
1598
- onChange?: (isoTime: string) => void;
1598
+ value?: Date | string | null;
1599
+ /** Callback with Date object */
1600
+ onChange?: (date?: Date) => void;
1601
+ /** Callback with string value (HH:mm format by default) */
1602
+ onValueChange?: (value?: string) => void;
1599
1603
  disabled?: boolean;
1600
1604
  className?: string;
1605
+ buttonClassName?: string;
1606
+ wrapperClassName?: string;
1601
1607
  placeholder?: string;
1602
1608
  use24Hour?: boolean;
1603
1609
  iconPosition?: "start" | "end" | "none";
1604
1610
  icon?: React$1.ReactNode;
1611
+ allowClear?: boolean;
1612
+ clearAriaLabel?: string;
1613
+ displayFormatter?: (date: Date, use24Hour: boolean) => string;
1614
+ valueFormatter?: (date: Date) => string;
1615
+ valueParser?: (value: string) => Date | undefined;
1616
+ invalid?: boolean;
1605
1617
  }
1606
1618
  declare const TimePicker: React$1.ForwardRefExoticComponent<TimePickerProps & React$1.RefAttributes<HTMLInputElement>>;
1607
1619
 
@@ -1807,6 +1819,8 @@ type ComboboxProps<TData extends OptionData> = React$1.AriaAttributes & Omit<Vir
1807
1819
  virtual?: boolean;
1808
1820
  isLoading?: boolean;
1809
1821
  loadingContent?: React$1.ReactNode;
1822
+ popoverProps?: Omit<React$1.ComponentProps<typeof Popover>, "open" | "onOpenChange">;
1823
+ popoverContentProps?: Omit<React$1.ComponentProps<typeof PopoverContent>, "children">;
1810
1824
  };
1811
1825
  declare const Combobox: <TData extends OptionData>(props: ComboboxProps<TData> & React$1.RefAttributes<HTMLButtonElement>) => React$1.ReactElement | null;
1812
1826
 
@@ -1864,6 +1878,8 @@ type InputMentionProps<T = DefaultMentionItem> = {
1864
1878
  disabled?: boolean;
1865
1879
  editorClassName?: string;
1866
1880
  autoFocus?: boolean;
1881
+ /** Maximum number of characters allowed in the editor */
1882
+ maxLength?: number;
1867
1883
  /** Array of mention items that will be suggested */
1868
1884
  mentions?: T[];
1869
1885
  /** Configuration for mapping mention item fields. If not provided, assumes default structure {id, name, fieldName} */
@@ -1874,7 +1890,7 @@ type InputMentionProps<T = DefaultMentionItem> = {
1874
1890
  plainTextMentions?: boolean;
1875
1891
  } & Omit<React.HTMLAttributes<HTMLDivElement>, "onChange">;
1876
1892
 
1877
- declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1893
+ declare function InputMentionInner<T = DefaultMentionItem>({ value, onChange, placeholder, readOnly, disabled, editorClassName, autoFocus, maxLength, mentions, mentionConfig, mentionTrigger, plainTextMentions, className, id, ...rest }: InputMentionProps<T>, ref: React.Ref<HTMLDivElement>): react_jsx_runtime.JSX.Element;
1878
1894
  declare const InputMention: <T = DefaultMentionItem>(props: InputMentionProps<T> & {
1879
1895
  ref?: React.Ref<HTMLDivElement>;
1880
1896
  }) => ReturnType<typeof InputMentionInner>;