@univerjs/design 1.0.0-alpha.1 → 1.0.0-alpha.3

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 (72) hide show
  1. package/lib/cjs/index.js +119 -86
  2. package/lib/cjs/locale/ar-SA.js +1 -1
  3. package/lib/cjs/locale/ca-ES.js +1 -1
  4. package/lib/cjs/locale/de-DE.js +1 -1
  5. package/lib/cjs/locale/es-ES.js +10 -10
  6. package/lib/cjs/locale/fa-IR.js +1 -1
  7. package/lib/cjs/locale/fr-FR.js +1 -1
  8. package/lib/cjs/locale/id-ID.js +1 -1
  9. package/lib/cjs/locale/it-IT.js +1 -1
  10. package/lib/cjs/locale/ja-JP.js +1 -1
  11. package/lib/cjs/locale/ko-KR.js +1 -1
  12. package/lib/cjs/locale/pl-PL.js +1 -1
  13. package/lib/cjs/locale/pt-BR.js +1 -1
  14. package/lib/cjs/locale/ru-RU.js +1 -1
  15. package/lib/cjs/locale/sk-SK.js +1 -1
  16. package/lib/cjs/locale/vi-VN.js +1 -1
  17. package/lib/es/index.js +120 -88
  18. package/lib/es/locale/ar-SA.js +1 -1
  19. package/lib/es/locale/ca-ES.js +1 -1
  20. package/lib/es/locale/de-DE.js +1 -1
  21. package/lib/es/locale/es-ES.js +10 -10
  22. package/lib/es/locale/fa-IR.js +1 -1
  23. package/lib/es/locale/fr-FR.js +1 -1
  24. package/lib/es/locale/id-ID.js +1 -1
  25. package/lib/es/locale/it-IT.js +1 -1
  26. package/lib/es/locale/ja-JP.js +1 -1
  27. package/lib/es/locale/ko-KR.js +1 -1
  28. package/lib/es/locale/pl-PL.js +1 -1
  29. package/lib/es/locale/pt-BR.js +1 -1
  30. package/lib/es/locale/ru-RU.js +1 -1
  31. package/lib/es/locale/sk-SK.js +1 -1
  32. package/lib/es/locale/vi-VN.js +1 -1
  33. package/lib/index.css +78 -0
  34. package/lib/index.js +120 -88
  35. package/lib/locale/ar-SA.js +1 -1
  36. package/lib/locale/ca-ES.js +1 -1
  37. package/lib/locale/de-DE.js +1 -1
  38. package/lib/locale/es-ES.js +10 -10
  39. package/lib/locale/fa-IR.js +1 -1
  40. package/lib/locale/fr-FR.js +1 -1
  41. package/lib/locale/id-ID.js +1 -1
  42. package/lib/locale/it-IT.js +1 -1
  43. package/lib/locale/ja-JP.js +1 -1
  44. package/lib/locale/ko-KR.js +1 -1
  45. package/lib/locale/pl-PL.js +1 -1
  46. package/lib/locale/pt-BR.js +1 -1
  47. package/lib/locale/ru-RU.js +1 -1
  48. package/lib/locale/sk-SK.js +1 -1
  49. package/lib/locale/vi-VN.js +1 -1
  50. package/lib/types/components/accordion/Accordion.d.ts +4 -0
  51. package/lib/types/components/button/Button.d.ts +1 -1
  52. package/lib/types/components/dialog/DialogPrimitive.d.ts +1 -0
  53. package/lib/types/components/message/Message.d.ts +2 -2
  54. package/lib/types/components/segmented/Segmented.d.ts +2 -1
  55. package/lib/types/index.d.ts +1 -1
  56. package/lib/umd/index.js +14 -18
  57. package/lib/umd/locale/ar-SA.js +1 -1
  58. package/lib/umd/locale/ca-ES.js +1 -1
  59. package/lib/umd/locale/de-DE.js +1 -1
  60. package/lib/umd/locale/es-ES.js +1 -1
  61. package/lib/umd/locale/fa-IR.js +1 -1
  62. package/lib/umd/locale/fr-FR.js +1 -1
  63. package/lib/umd/locale/id-ID.js +1 -1
  64. package/lib/umd/locale/it-IT.js +1 -1
  65. package/lib/umd/locale/ja-JP.js +1 -1
  66. package/lib/umd/locale/ko-KR.js +1 -1
  67. package/lib/umd/locale/pl-PL.js +1 -1
  68. package/lib/umd/locale/pt-BR.js +1 -1
  69. package/lib/umd/locale/ru-RU.js +1 -1
  70. package/lib/umd/locale/sk-SK.js +1 -1
  71. package/lib/umd/locale/vi-VN.js +1 -1
  72. package/package.json +11 -11
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "زاویه",
53
53
  flip: "برگردان",
54
54
  delete: "حذف",
55
- transparency: "Transparency"
55
+ transparency: "شفافیت"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "Angle",
53
53
  flip: "Retourner",
54
54
  delete: "Supprimer",
55
- transparency: "Transparency"
55
+ transparency: "Transparence"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "Sudut",
53
53
  flip: "Balik",
54
54
  delete: "Hapus",
55
- transparency: "Transparency"
55
+ transparency: "Transparansi"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "Angolo",
53
53
  flip: "Capovolgi",
54
54
  delete: "Elimina",
55
- transparency: "Transparency"
55
+ transparency: "Trasparenza"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "角度",
53
53
  flip: "反転",
54
54
  delete: "削除",
55
- transparency: "Transparency"
55
+ transparency: "透明度"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "각도",
53
53
  flip: "뒤집기",
54
54
  delete: "삭제",
55
- transparency: "Transparency"
55
+ transparency: "투명도"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "Kąt",
53
53
  flip: "Obrót",
54
54
  delete: "Usuń",
55
- transparency: "Transparency"
55
+ transparency: "Przezroczystość"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "Ângulo",
53
53
  flip: "Inverter",
54
54
  delete: "Excluir",
55
- transparency: "Transparency"
55
+ transparency: "Transparência"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "угол",
53
53
  flip: "перевернуть",
54
54
  delete: "удалить",
55
- transparency: "Transparency"
55
+ transparency: "прозрачность"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "Uhol",
53
53
  flip: "Prevrátiť",
54
54
  delete: "Odstrániť",
55
- transparency: "Transparency"
55
+ transparency: "Priehľadnosť"
56
56
  }
57
57
  } };
58
58
 
@@ -52,7 +52,7 @@ const locale = { design: {
52
52
  angle: "Góc",
53
53
  flip: "Lật",
54
54
  delete: "Xóa",
55
- transparency: "Transparency"
55
+ transparency: "Độ trong suốt"
56
56
  }
57
57
  } };
58
58
 
@@ -15,12 +15,16 @@
15
15
  */
16
16
  import type { ReactNode } from 'react';
17
17
  interface IAccordionItem {
18
+ id?: string;
18
19
  label: ReactNode;
19
20
  children: ReactNode;
20
21
  }
21
22
  export interface IAccordionProps {
22
23
  className?: string;
23
24
  items: IAccordionItem[];
25
+ defaultOpenIndex?: number | null;
26
+ openIndex?: number | null;
27
+ onOpenIndexChange?: (openIndex: number | null) => void;
24
28
  }
25
29
  export declare function Accordion(props: IAccordionProps): import("react").JSX.Element;
26
30
  export {};
@@ -17,7 +17,7 @@ import type { VariantProps } from 'class-variance-authority';
17
17
  import type { ButtonHTMLAttributes } from 'react';
18
18
  export declare const buttonVariants: (props?: ({
19
19
  variant?: "link" | "text" | "default" | "primary" | "danger" | "ghost" | null | undefined;
20
- size?: "small" | "middle" | "large" | null | undefined;
20
+ size?: "small" | "middle" | "large" | "icon" | null | undefined;
21
21
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
22
22
  export interface IButtonProps extends ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
23
23
  asChild?: boolean;
@@ -22,6 +22,7 @@ declare const DialogOverlay: import("react").ForwardRefExoticComponent<Omit<impo
22
22
  interface IDialogContentProps {
23
23
  closable?: boolean;
24
24
  onClickClose?: () => void;
25
+ mountContainer?: HTMLElement | null;
25
26
  }
26
27
  declare const DialogContent: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & IDialogContentProps & import("react").RefAttributes<HTMLDivElement>>;
27
28
  declare const DialogHeader: {
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import type { ComponentProps } from 'react';
17
- import { Toaster as Sonner } from 'sonner';
17
+ import { Toaster } from 'sonner';
18
18
  export declare enum MessageType {
19
19
  Success = "success",
20
20
  Info = "info",
@@ -29,7 +29,7 @@ export interface IMessageProps {
29
29
  type?: MessageType;
30
30
  onClose?: () => void;
31
31
  }
32
- export type IMessagerProps = Omit<ComponentProps<typeof Sonner>, 'id' | 'position' | 'visibleToasts' | 'toastOptions'>;
32
+ export type IMessagerProps = Omit<ComponentProps<typeof Toaster>, 'id' | 'position' | 'visibleToasts' | 'toastOptions'>;
33
33
  export declare const Messager: ({ className, ...props }: IMessagerProps) => import("react").JSX.Element;
34
34
  export declare const message: ({ content, duration, id, onClose, type }: IMessageProps) => string;
35
35
  export declare const removeMessage: (id?: string) => void;
@@ -13,9 +13,10 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
+ import type { ReactNode } from 'react';
16
17
  type ItemValue = string | number;
17
18
  interface ISegmentedItem<T extends ItemValue = ItemValue> {
18
- label: string;
19
+ label: ReactNode;
19
20
  value: T;
20
21
  }
21
22
  interface ISegmentedProps<T extends ItemValue = ItemValue> {
@@ -79,7 +79,7 @@ export { SelectList } from './components/select-list/SelectList';
79
79
  export type { ISelectListProps } from './components/select-list/SelectList';
80
80
  export { MultipleSelect } from './components/select/MultipleSelect';
81
81
  export type { IMultipleSelectProps } from './components/select/MultipleSelect';
82
- export { Select } from './components/select/Select';
82
+ export { Select, selectClassName } from './components/select/Select';
83
83
  export type { ISelectProps } from './components/select/Select';
84
84
  export { Separator } from './components/separator/Separator';
85
85
  export { Switch } from './components/switch/Switch';