sakana-element 2.2.0 → 2.3.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.
Files changed (130) hide show
  1. package/README.md +95 -22
  2. package/dist/es/{Alert-C76ZWSVk.js → Alert-BwTsp4X3.js} +2 -2
  3. package/dist/es/Avatar-CJu6JYV3.js +9 -0
  4. package/dist/es/{Badge-CoFWwBwv.js → Badge-BmxZXX8k.js} +2 -2
  5. package/dist/es/{Breadcrumb-BtrwTVKW.js → Breadcrumb-BP8MSklj.js} +2 -2
  6. package/dist/es/{Button-S_31-UWJ.js → Button-BJHtN7gh.js} +2 -2
  7. package/dist/es/{Card-DcW6nHYD.js → Card-DJHkCmsz.js} +2 -2
  8. package/dist/es/Checkbox-DX8L3fyp.js +51 -0
  9. package/dist/es/{Collapse-DsS7M-m3.js → Collapse-Ir3V9CuO.js} +2 -2
  10. package/dist/es/{ConfigProvider-BgIewHXP.js → ConfigProvider-CsbSqwwi.js} +1 -1
  11. package/dist/es/Divider-C7PtODSK.js +9 -0
  12. package/dist/es/Drawer-C2eVmvUp.js +40 -0
  13. package/dist/es/Dropdown-CVg_c2fB.js +104 -0
  14. package/dist/es/{FileInput-BQ59woas.js → FileInput-BE26BmXm.js} +3 -3
  15. package/dist/es/Form-7lZt5ehf.js +122 -0
  16. package/dist/es/{Icon-DpJyuj7c.js → Icon-BLDDdSU-.js} +1 -1
  17. package/dist/es/Indicator-B-en-MgG.js +9 -0
  18. package/dist/es/{Input-CiE4bPJN.js → Input-C5HuVehE.js} +6 -6
  19. package/dist/es/{Link-B9B2APZq.js → Link-Av9RdcFv.js} +1 -1
  20. package/dist/es/{Loading-BW99pE5N.js → Loading-CBNDUWQd.js} +12 -12
  21. package/dist/es/Message-DgnyyuXn.js +152 -0
  22. package/dist/es/Notification-LYRXnVAf.js +69 -0
  23. package/dist/es/{Overlay-BRDSWspM.js → Overlay-CpvMhnuU.js} +1 -1
  24. package/dist/es/Pixelate-BPypBgJU.js +67 -0
  25. package/dist/es/Popconfirm-DvxFdLrw.js +23 -0
  26. package/dist/es/Progress-Bc5INMhJ.js +12 -0
  27. package/dist/es/Radio-263_rtRl.js +33 -0
  28. package/dist/es/{Select-Dwqv8isB.js → Select-7ZxUCS8z.js} +13 -13
  29. package/dist/es/{Switch-B1Gnv1tB.js → Switch-DiCsMJT3.js} +3 -3
  30. package/dist/es/Table-BvA_xzDe.js +10 -0
  31. package/dist/es/Tooltip-J3ji6weH.js +74 -0
  32. package/dist/es/hooks-BqobYUzS.js +171 -0
  33. package/dist/es/index.js +90 -70
  34. package/dist/{theme → es/theme}/Avatar.css +13 -43
  35. package/dist/{theme → es/theme}/Breadcrumb.css +46 -4
  36. package/dist/es/theme/Card.css +347 -0
  37. package/dist/es/theme/Checkbox.css +484 -0
  38. package/dist/es/theme/Divider.css +111 -0
  39. package/dist/es/theme/Drawer.css +206 -0
  40. package/dist/es/theme/Dropdown.css +471 -0
  41. package/dist/es/theme/Indicator.css +159 -0
  42. package/dist/{theme → es/theme}/Input.css +1 -0
  43. package/dist/{theme → es/theme}/Link.css +22 -3
  44. package/dist/{theme → es/theme}/Loading.css +50 -12
  45. package/dist/{theme → es/theme}/Message.css +249 -40
  46. package/dist/es/theme/Notification.css +316 -0
  47. package/dist/es/theme/Popconfirm.css +46 -0
  48. package/dist/es/theme/Progress.css +278 -0
  49. package/dist/es/theme/Radio.css +426 -0
  50. package/dist/es/theme/Table.css +680 -0
  51. package/dist/es/theme/Tooltip.css +235 -0
  52. package/dist/es/utils-BS5vsvlM.js +101 -0
  53. package/dist/index.css +1 -1
  54. package/dist/types/components/Avatar/types.d.ts +0 -2
  55. package/dist/types/components/Checkbox/constants.d.ts +5 -0
  56. package/dist/types/components/Checkbox/index.d.ts +94 -0
  57. package/dist/types/components/Checkbox/types.d.ts +46 -0
  58. package/dist/types/components/Collapse/index.d.ts +5 -5
  59. package/dist/types/components/Divider/index.d.ts +30 -0
  60. package/dist/types/components/Divider/types.d.ts +10 -0
  61. package/dist/types/components/Drawer/constants.d.ts +1 -0
  62. package/dist/types/components/Drawer/index.d.ts +72 -0
  63. package/dist/types/components/Drawer/types.d.ts +20 -0
  64. package/dist/types/components/Dropdown/index.d.ts +11 -1
  65. package/dist/types/components/Dropdown/types.d.ts +3 -0
  66. package/dist/types/components/Dropdown/useDropdownKeyboard.d.ts +8 -0
  67. package/dist/types/components/FileInput/index.d.ts +5 -5
  68. package/dist/types/components/Indicator/constants.d.ts +2 -0
  69. package/dist/types/components/Indicator/index.d.ts +28 -0
  70. package/dist/types/components/Indicator/types.d.ts +10 -0
  71. package/dist/types/components/Input/index.d.ts +10 -10
  72. package/dist/types/components/Message/methods.d.ts +2 -0
  73. package/dist/types/components/Message/types.d.ts +7 -1
  74. package/dist/types/components/MessageBox/types.d.ts +14 -2
  75. package/dist/types/components/Notification/methods.d.ts +3 -0
  76. package/dist/types/components/Notification/types.d.ts +8 -2
  77. package/dist/types/components/Pixelate/constants.d.ts +2 -0
  78. package/dist/types/components/Pixelate/index.d.ts +71 -0
  79. package/dist/types/components/Pixelate/types.d.ts +23 -0
  80. package/dist/types/components/Popconfirm/index.d.ts +16 -7
  81. package/dist/types/components/Popconfirm/types.d.ts +2 -1
  82. package/dist/types/components/Progress/constants.d.ts +2 -0
  83. package/dist/types/components/Progress/index.d.ts +50 -0
  84. package/dist/types/components/Progress/types.d.ts +22 -0
  85. package/dist/types/components/Radio/constants.d.ts +5 -0
  86. package/dist/types/components/Radio/index.d.ts +88 -0
  87. package/dist/types/components/Radio/types.d.ts +43 -0
  88. package/dist/types/components/Select/index.d.ts +30 -21
  89. package/dist/types/components/Switch/index.d.ts +5 -5
  90. package/dist/types/components/Table/index.d.ts +27 -0
  91. package/dist/types/components/Table/types.d.ts +20 -0
  92. package/dist/types/components/Tooltip/index.d.ts +6 -0
  93. package/dist/types/components/Tooltip/types.d.ts +7 -0
  94. package/dist/types/components/index.d.ts +8 -0
  95. package/dist/types/hooks/index.d.ts +3 -1
  96. package/dist/types/hooks/useDraggable.d.ts +7 -0
  97. package/dist/types/hooks/useFocusTrap.d.ts +5 -0
  98. package/dist/types/utils/index.d.ts +1 -0
  99. package/dist/types/utils/instance-management.d.ts +40 -0
  100. package/dist/umd/index.css +1 -1
  101. package/dist/umd/index.css.gz +0 -0
  102. package/dist/umd/index.umd.cjs +4 -4
  103. package/dist/umd/index.umd.cjs.gz +0 -0
  104. package/package.json +59 -59
  105. package/dist/es/Avatar-CxsRW-wl.js +0 -9
  106. package/dist/es/Dropdown-GcomGMAI.js +0 -40
  107. package/dist/es/Form-j90EzLXU.js +0 -122
  108. package/dist/es/Message-DCNnTUje.js +0 -123
  109. package/dist/es/Notification-CBzY5904.js +0 -58
  110. package/dist/es/Popconfirm-DF6d2ORS.js +0 -23
  111. package/dist/es/Tooltip-k6gKnMyt.js +0 -74
  112. package/dist/es/hooks-BaG7l8K5.js +0 -116
  113. package/dist/es/utils-bsCscZfS.js +0 -84
  114. package/dist/theme/Card.css +0 -263
  115. package/dist/theme/Dropdown.css +0 -187
  116. package/dist/theme/Notification.css +0 -126
  117. package/dist/theme/Popconfirm.css +0 -30
  118. package/dist/theme/Tooltip.css +0 -111
  119. /package/dist/{theme → es/theme}/Alert.css +0 -0
  120. /package/dist/{theme → es/theme}/Badge.css +0 -0
  121. /package/dist/{theme → es/theme}/Button.css +0 -0
  122. /package/dist/{theme → es/theme}/Collapse.css +0 -0
  123. /package/dist/{theme → es/theme}/FileInput.css +0 -0
  124. /package/dist/{theme → es/theme}/Form.css +0 -0
  125. /package/dist/{theme → es/theme}/Icon.css +0 -0
  126. /package/dist/{theme → es/theme}/Overlay.css +0 -0
  127. /package/dist/{theme → es/theme}/Select.css +0 -0
  128. /package/dist/{theme → es/theme}/Switch.css +0 -0
  129. /package/dist/{theme → es/theme}/fonts/zpix.woff2 +0 -0
  130. /package/dist/{theme → es/theme}/index.css +0 -0
@@ -1,13 +1,13 @@
1
1
  export declare const PxSwitch: {
2
2
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').SwitchProps> & Readonly<{
3
- "onUpdate:modelValue"?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
4
3
  onChange?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
4
+ "onUpdate:modelValue"?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
5
5
  }>, {
6
6
  focus(): void;
7
7
  checked: import('vue').ComputedRef<boolean>;
8
8
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
9
- "update:modelValue": (value: import('packages/core').SwitchValueType) => any;
10
9
  change: (value: import('packages/core').SwitchValueType) => any;
10
+ "update:modelValue": (value: import('packages/core').SwitchValueType) => any;
11
11
  }, import('vue').PublicProps, {
12
12
  activeValue: import('packages/core').SwitchValueType;
13
13
  inactiveValue: import('packages/core').SwitchValueType;
@@ -21,8 +21,8 @@ export declare const PxSwitch: {
21
21
  M: {};
22
22
  Defaults: {};
23
23
  }, Readonly<import('packages/core').SwitchProps> & Readonly<{
24
- "onUpdate:modelValue"?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
25
24
  onChange?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
25
+ "onUpdate:modelValue"?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
26
26
  }>, {
27
27
  focus(): void;
28
28
  checked: import('vue').ComputedRef<boolean>;
@@ -34,14 +34,14 @@ export declare const PxSwitch: {
34
34
  __isTeleport?: never;
35
35
  __isSuspense?: never;
36
36
  } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').SwitchProps> & Readonly<{
37
- "onUpdate:modelValue"?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
38
37
  onChange?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
38
+ "onUpdate:modelValue"?: ((value: import('packages/core').SwitchValueType) => any) | undefined;
39
39
  }>, {
40
40
  focus(): void;
41
41
  checked: import('vue').ComputedRef<boolean>;
42
42
  }, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
43
- "update:modelValue": (value: import('packages/core').SwitchValueType) => any;
44
43
  change: (value: import('packages/core').SwitchValueType) => any;
44
+ "update:modelValue": (value: import('packages/core').SwitchValueType) => any;
45
45
  }, string, {
46
46
  activeValue: import('packages/core').SwitchValueType;
47
47
  inactiveValue: import('packages/core').SwitchValueType;
@@ -0,0 +1,27 @@
1
+ export declare const PxTable: {
2
+ new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('packages/core').TableProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {
3
+ size: import('packages/core').TableSize;
4
+ showHeader: boolean;
5
+ }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, HTMLDivElement, import('vue').ComponentProvideOptions, {
6
+ P: {};
7
+ B: {};
8
+ D: {};
9
+ C: {};
10
+ M: {};
11
+ Defaults: {};
12
+ }, Readonly<import('packages/core').TableProps> & Readonly<{}>, {}, {}, {}, {}, {
13
+ size: import('packages/core').TableSize;
14
+ showHeader: boolean;
15
+ }>;
16
+ __isFragment?: never;
17
+ __isTeleport?: never;
18
+ __isSuspense?: never;
19
+ } & import('vue').ComponentOptionsBase<Readonly<import('packages/core').TableProps> & Readonly<{}>, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, {
20
+ size: import('packages/core').TableSize;
21
+ showHeader: boolean;
22
+ }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
23
+ $slots: {
24
+ default?(_: {}): any;
25
+ };
26
+ }) & import('vue').Plugin;
27
+ export * from './types';
@@ -0,0 +1,20 @@
1
+ export declare const tableSize: readonly ["xs", "sm", "md", "lg", "xl"];
2
+ export type TableSize = (typeof tableSize)[number];
3
+ export type TableType = 'primary' | 'success' | 'info' | 'warning' | 'danger';
4
+ export interface TableProps {
5
+ type?: TableType;
6
+ zebra?: boolean;
7
+ hover?: boolean;
8
+ border?: boolean;
9
+ stripe?: boolean;
10
+ pinRows?: boolean;
11
+ pinCols?: boolean;
12
+ size?: TableSize;
13
+ showHeader?: boolean;
14
+ outline?: boolean;
15
+ ghost?: boolean;
16
+ hoverable?: boolean;
17
+ }
18
+ export interface TableInstance {
19
+ ref: HTMLDivElement;
20
+ }
@@ -10,11 +10,13 @@ export declare const PxTooltip: {
10
10
  "visible-change": (value: boolean) => any;
11
11
  "click-outside": () => any;
12
12
  }, import('vue').PublicProps, {
13
+ effect: import('packages/core').TooltipEffect;
13
14
  transition: string;
14
15
  trigger: "hover" | "click" | "contextmenu";
15
16
  placement: import('@popperjs/core').Placement;
16
17
  showTimeout: number;
17
18
  hideTimeout: number;
19
+ enterable: boolean;
18
20
  }, false, {}, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {
19
21
  containerNode: HTMLDivElement;
20
22
  _triggerNode: HTMLDivElement;
@@ -34,11 +36,13 @@ export declare const PxTooltip: {
34
36
  hide(): void;
35
37
  toggle(): void;
36
38
  }, {}, {}, {}, {
39
+ effect: import('packages/core').TooltipEffect;
37
40
  transition: string;
38
41
  trigger: "hover" | "click" | "contextmenu";
39
42
  placement: import('@popperjs/core').Placement;
40
43
  showTimeout: number;
41
44
  hideTimeout: number;
45
+ enterable: boolean;
42
46
  }>;
43
47
  __isFragment?: never;
44
48
  __isTeleport?: never;
@@ -54,11 +58,13 @@ export declare const PxTooltip: {
54
58
  "visible-change": (value: boolean) => any;
55
59
  "click-outside": () => any;
56
60
  }, string, {
61
+ effect: import('packages/core').TooltipEffect;
57
62
  transition: string;
58
63
  trigger: "hover" | "click" | "contextmenu";
59
64
  placement: import('@popperjs/core').Placement;
60
65
  showTimeout: number;
61
66
  hideTimeout: number;
67
+ enterable: boolean;
62
68
  }, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
63
69
  $slots: {
64
70
  default?(_: {}): any;
@@ -1,4 +1,6 @@
1
1
  import { Options, Placement } from '@popperjs/core';
2
+ export type TooltipEffect = 'dark' | 'light';
3
+ export type TooltipType = 'primary' | 'success' | 'warning' | 'danger' | 'info';
2
4
  export interface TooltipProps {
3
5
  content?: string;
4
6
  trigger?: 'hover' | 'click' | 'contextmenu';
@@ -11,6 +13,11 @@ export interface TooltipProps {
11
13
  hideTimeout?: number;
12
14
  virtualRef?: HTMLElement | undefined;
13
15
  virtualTriggering?: boolean;
16
+ effect?: TooltipEffect;
17
+ type?: TooltipType;
18
+ enterable?: boolean;
19
+ maxWidth?: string | number;
20
+ showArrow?: boolean;
14
21
  }
15
22
  export interface TooltipEmits {
16
23
  (e: 'visible-change', value: boolean): void;
@@ -4,19 +4,27 @@ export * from './Badge';
4
4
  export * from './Breadcrumb';
5
5
  export * from './Button';
6
6
  export * from './Card';
7
+ export * from './Checkbox';
7
8
  export * from './Collapse';
8
9
  export * from './ConfigProvider';
10
+ export * from './Drawer';
11
+ export * from './Divider';
9
12
  export * from './Dropdown';
10
13
  export * from './FileInput';
11
14
  export * from './Form';
12
15
  export * from './Icon';
16
+ export * from './Indicator';
13
17
  export * from './Input';
14
18
  export * from './Link';
15
19
  export * from './Loading';
16
20
  export * from './Message';
17
21
  export * from './MessageBox';
18
22
  export * from './Notification';
23
+ export * from './Pixelate';
19
24
  export * from './Popconfirm';
25
+ export * from './Progress';
26
+ export * from './Radio';
20
27
  export * from './Select';
21
28
  export * from './Switch';
29
+ export * from './Table';
22
30
  export * from './Tooltip';
@@ -1,11 +1,13 @@
1
1
  import { default as useClickOutside } from './useClickOutside';
2
2
  import { default as useDisabledStyle } from './useDisabledStyle';
3
+ import { default as useDraggable } from './useDraggable';
3
4
  import { default as useEventListener } from './useEventListener';
4
5
  import { default as useFocusController } from './useFocusController';
6
+ import { default as useFocusTrap } from './useFocusTrap';
5
7
  import { default as useId } from './useId';
6
8
  import { default as useLocale } from './useLocale';
7
9
  import { default as useOffset } from './useOffset';
8
10
  import { default as useZIndex } from './useZIndex';
9
11
  export { useSystemTheme } from './useSystemTheme';
10
12
  export { type Theme, useTheme } from './useTheme';
11
- export { useClickOutside, useEventListener, useDisabledStyle, useFocusController, useLocale, useOffset, useZIndex, useId, };
13
+ export { useClickOutside, useDraggable, useEventListener, useDisabledStyle, useFocusController, useFocusTrap, useLocale, useOffset, useZIndex, useId, };
@@ -0,0 +1,7 @@
1
+ import { Ref } from 'vue';
2
+ export interface UseDraggableOptions {
3
+ constrainToViewport?: boolean;
4
+ }
5
+ export default function useDraggable(targetRef: Ref<HTMLElement | undefined>, handleRef: Ref<HTMLElement | undefined>, options?: UseDraggableOptions): {
6
+ reset: () => void;
7
+ };
@@ -0,0 +1,5 @@
1
+ import { Ref } from 'vue';
2
+ export default function useFocusTrap(containerRef: Ref<HTMLElement | undefined>): {
3
+ activate: () => void;
4
+ deactivate: () => void;
5
+ };
@@ -15,6 +15,7 @@ export * from './error';
15
15
  export * from './icon-map';
16
16
  export * from './icon-registry';
17
17
  export * from './install';
18
+ export * from './instance-management';
18
19
  export * from './sanitize-svg';
19
20
  export * from './style';
20
21
  export * from './test';
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Shared utilities for imperative component instance management
3
+ * (used by Message and Notification methods.ts).
4
+ */
5
+ interface Destroyable {
6
+ props: {
7
+ onDestroy(): void;
8
+ };
9
+ }
10
+ interface Closeable {
11
+ handler: {
12
+ close(): void;
13
+ };
14
+ }
15
+ /**
16
+ * Forcefully unmount all instances in a flat array, bypassing CSS transitions.
17
+ */
18
+ export declare function destroyAllInstances(instances: Destroyable[]): void;
19
+ /**
20
+ * Forcefully unmount all instances across a Map of position-keyed arrays.
21
+ */
22
+ export declare function destroyAllInstancesMap(instancesMap: Map<string, Destroyable[]>): void;
23
+ /**
24
+ * Destroy oldest instances that exceed the maximum count.
25
+ */
26
+ export declare function enforceMaxCount(instances: Destroyable[], max: number): void;
27
+ /**
28
+ * Create a lazy global Escape key listener that is only active when
29
+ * at least one instance exists. Call `register()` when an instance is
30
+ * created and `unregister()` when an instance is destroyed.
31
+ *
32
+ * @param getLatestCloseable - returns the instance to close on Escape, or undefined
33
+ */
34
+ export declare function createLazyEscapeClose(getLatestCloseable: () => Closeable | undefined): {
35
+ /** Call when an instance is created. */
36
+ register(): void;
37
+ /** Call when an instance is destroyed. */
38
+ unregister(): void;
39
+ };
40
+ export {};