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