@npm-questionpro/wick-ui-lib 1.18.0 → 1.20.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.
Files changed (25) hide show
  1. package/dist/src/components/editor/WuEditor.d.ts +9 -0
  2. package/dist/src/components/editor/WuEditor.test.d.ts +1 -0
  3. package/dist/src/components/editor/index.d.ts +2 -0
  4. package/dist/src/components/editor/partials/ImageModal.d.ts +1 -0
  5. package/dist/src/components/editor/partials/LinkModal.d.ts +9 -0
  6. package/dist/src/components/editor/partials/Menubar.d.ts +1 -0
  7. package/dist/src/components/editor/partials/TablePopover.d.ts +1 -0
  8. package/dist/src/components/editor/partials/config.d.ts +2 -0
  9. package/dist/src/components/editor/partials/fontFamily.d.ts +1 -0
  10. package/dist/src/components/editor/partials/helper.d.ts +3 -0
  11. package/dist/src/components/editor/partials/toolbarItems.d.ts +20 -0
  12. package/dist/src/components/editor/partials/wuEditorContext.d.ts +13 -0
  13. package/dist/src/components/listbox/WuListbox.d.ts +1 -0
  14. package/dist/src/components/typography/WuTypography.d.ts +2 -3
  15. package/dist/src/components/useTranslation/WuTranslation.test.d.ts +1 -0
  16. package/dist/src/components/useTranslation/WuTranslationContext.d.ts +2 -0
  17. package/dist/src/components/useTranslation/WuTranslationProvider.d.ts +6 -0
  18. package/dist/src/components/useTranslation/index.d.ts +4 -0
  19. package/dist/src/components/useTranslation/types/index.d.ts +8 -0
  20. package/dist/src/components/useTranslation/useTranslationContext.d.ts +3 -0
  21. package/dist/src/index.d.ts +3 -1
  22. package/dist/style.css +1 -1
  23. package/dist/wick-ui-lib/es/index.js +3169 -2442
  24. package/dist/wick-ui-lib/umd/index.js +7 -7
  25. package/package.json +18 -2
@@ -0,0 +1,9 @@
1
+ import { Extensions } from '@tiptap/react';
2
+ import { default as React } from 'react';
3
+ export interface IWuEditorProps extends Omit<React.HTMLAttributes<HTMLDivElement>, 'onChange'> {
4
+ className?: string;
5
+ extensions?: Extensions[];
6
+ onChange?: (content: string) => void;
7
+ content?: string;
8
+ }
9
+ export declare const WuEditor: React.FC<IWuEditorProps>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ export { WuEditor } from './WuEditor';
2
+ export type { IWuEditorProps } from './WuEditor';
@@ -0,0 +1 @@
1
+ export declare const ImageModal: React.FC;
@@ -0,0 +1,9 @@
1
+ interface ILinkModalProps {
2
+ open: boolean;
3
+ onOpenChange: (open: boolean) => void;
4
+ onSubmit: (url: string | null, text?: string) => void;
5
+ initialText?: string;
6
+ initialUrl?: string;
7
+ }
8
+ export declare const LinkModal: React.FC<ILinkModalProps>;
9
+ export {};
@@ -0,0 +1 @@
1
+ export declare const Menubar: React.FC;
@@ -0,0 +1 @@
1
+ export declare const TablePopover: React.FC;
@@ -0,0 +1,2 @@
1
+ import { StarterKitOptions } from '@tiptap/starter-kit';
2
+ export declare const StarterEditorConfig: Partial<StarterKitOptions>;
@@ -0,0 +1 @@
1
+ export declare const FontFamilySelector: React.FC;
@@ -0,0 +1,3 @@
1
+ import { Editor } from '@tiptap/react';
2
+ export type IOpenLinkModalFn = (onConfirm: (url: string | null, text?: string) => void, initialText?: string, initialUrl?: string) => void;
3
+ export declare const setUnsetLink: (e: Editor, openModal: IOpenLinkModalFn) => boolean;
@@ -0,0 +1,20 @@
1
+ import { IWuIcons } from '../../typography';
2
+ import { Editor } from '@tiptap/react';
3
+ import { IOpenLinkModalFn } from './helper';
4
+ export type IMenuBarButton = {
5
+ id: string;
6
+ icon: IWuIcons;
7
+ event: (() => boolean) | ((e: string) => boolean);
8
+ enabled: boolean;
9
+ tooltip?: string;
10
+ className?: string;
11
+ break?: boolean;
12
+ type?: 'button' | 'dropdown' | 'color' | 'custom';
13
+ items?: {
14
+ id: string;
15
+ icon: IWuIcons;
16
+ event: () => void;
17
+ }[];
18
+ customComponent?: React.JSX.Element;
19
+ };
20
+ export declare const ToolbarActionList: (editor: Editor, openLinkModal?: IOpenLinkModalFn) => IMenuBarButton[];
@@ -0,0 +1,13 @@
1
+ import { Editor } from '@tiptap/react';
2
+ import { default as React } from 'react';
3
+ import { IOpenLinkModalFn } from './helper';
4
+ interface IWuEditorContext {
5
+ editor: Editor | null;
6
+ openLinkModal: IOpenLinkModalFn;
7
+ }
8
+ export declare const useWuEditor: () => IWuEditorContext;
9
+ export declare const WuEditorProvider: React.FC<{
10
+ editor: Editor | null;
11
+ children: React.ReactNode;
12
+ }>;
13
+ export {};
@@ -29,6 +29,7 @@ export type IWuListboxProps<T extends object> = {
29
29
  onSelectAll?: (value: boolean) => void;
30
30
  label?: string;
31
31
  };
32
+ modal?: boolean;
32
33
  id?: string;
33
34
  dir?: 'rtl' | 'ltr';
34
35
  className?: string;
@@ -15,8 +15,7 @@ export declare const WuDisplay: React.FC<React.HTMLAttributes<HTMLHeadingElement
15
15
  size?: 'md' | 'lg';
16
16
  as?: 'h1' | 'h2' | 'h3' | 'h4' | 'div';
17
17
  }>;
18
- type IIcons = (typeof ICON_CLASSES)[number];
18
+ export type IWuIcons = (typeof ICON_CLASSES)[number];
19
19
  export declare const WuIcon: React.FC<React.BaseHTMLAttributes<HTMLBaseElement> & {
20
- icon: IIcons;
20
+ icon: IWuIcons;
21
21
  }>;
22
- export {};
@@ -0,0 +1,2 @@
1
+ import { IWuTranslationContextType } from './types';
2
+ export declare const WuTranslationContext: import('react').Context<IWuTranslationContextType | null>;
@@ -0,0 +1,6 @@
1
+ import { ReactNode, default as React } from 'react';
2
+ interface IProps {
3
+ children: ReactNode;
4
+ }
5
+ export declare const WuTranslationProvider: React.FC<IProps>;
6
+ export {};
@@ -0,0 +1,4 @@
1
+ export { useContext } from 'react';
2
+ export { useTranslation, useTranslationsContext } from './useTranslationContext';
3
+ export { WuTranslationContext } from './WuTranslationContext';
4
+ export { WuTranslationProvider } from './WuTranslationProvider';
@@ -0,0 +1,8 @@
1
+ export type ITranslateFn = (key: string, fallback?: string) => string;
2
+ export interface IWuTranslationContextType {
3
+ useTranslation: () => {
4
+ t: ITranslateFn;
5
+ };
6
+ loadTranslations: (source: string, fallback?: Record<string, string>) => Promise<void>;
7
+ setFallbackTranslations: (fallback: Record<string, string>) => void;
8
+ }
@@ -0,0 +1,3 @@
1
+ import { IWuTranslationContextType } from './types';
2
+ export declare const useTranslation: () => ReturnType<IWuTranslationContextType["useTranslation"]>;
3
+ export declare const useTranslationsContext: () => IWuTranslationContextType;
@@ -3,7 +3,6 @@ declare global {
3
3
  wickUiVersion: string;
4
4
  }
5
5
  }
6
- export * from './docs/ui/colorSystem.ts';
7
6
  export * from './components/accordion';
8
7
  export * from './components/appHeader';
9
8
  export * from './components/button';
@@ -43,6 +42,9 @@ export * from './components/toast';
43
42
  export * from './components/toggle';
44
43
  export * from './components/tooltip';
45
44
  export * from './components/typography';
45
+ export * from './components/useTranslation';
46
46
  export * from './components/virtualScroll';
47
+ export * from './docs/ui/colorSystem.ts';
47
48
  export * from './components/drilldown';
49
+ export * from './components/editor';
48
50
  export * from './components/stackedCard';