sakana-element 2.0.2 → 2.1.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 (39) hide show
  1. package/dist/es/{Alert-D4jZO-Gv.js → Alert-C5X-XFGJ.js} +1 -1
  2. package/dist/es/Button-DTik2ZP6.js +33 -0
  3. package/dist/es/{Collapse-CgadjkRS.js → Collapse-l_8qKOBG.js} +1 -1
  4. package/dist/es/Dropdown-ZjZ0qSn2.js +40 -0
  5. package/dist/es/{Form-X4dNzwFt.js → Form-pxRZxseS.js} +1 -1
  6. package/dist/es/Icon-UBaqO2nY.js +27 -0
  7. package/dist/es/{Input-C0g1h9x2.js → Input-BJoBaFXa.js} +3 -3
  8. package/dist/es/{Loading-Cv4Fsu-C.js → Loading-BJJBJhg3.js} +2 -2
  9. package/dist/es/{Message-BuoSEEVc.js → Message-CqBKW0c8.js} +41 -41
  10. package/dist/es/Notification-CVACM2cj.js +58 -0
  11. package/dist/es/{Popconfirm-mMYpa7O6.js → Popconfirm-CW8oRycq.js} +3 -3
  12. package/dist/es/{Select-SRw_b6I2.js → Select-C7mwByXa.js} +4 -4
  13. package/dist/es/{Switch-bhJBaSI7.js → Switch-CgFPFC3j.js} +1 -1
  14. package/dist/es/Tooltip-D9rQ4LEg.js +74 -0
  15. package/dist/es/hooks-DNMt3QPi.js +104 -0
  16. package/dist/es/index.js +55 -51
  17. package/dist/index.css +1 -1
  18. package/dist/theme/Button.css +508 -116
  19. package/dist/theme/Notification.css +20 -20
  20. package/dist/theme/Tooltip.css +10 -10
  21. package/dist/types/components/Button/types.d.ts +3 -0
  22. package/dist/types/components/ConfigProvider/hooks.d.ts +1 -1
  23. package/dist/types/components/ConfigProvider/index.d.ts +2 -2
  24. package/dist/types/components/ConfigProvider/types.d.ts +1 -1
  25. package/dist/types/components/Icon/icons/pixelarticons-all.d.ts +1 -0
  26. package/dist/types/core/index.d.ts +2 -1
  27. package/dist/types/hooks/useLocale.d.ts +1 -1
  28. package/dist/umd/index.css +1 -1
  29. package/dist/umd/index.css.gz +0 -0
  30. package/dist/umd/index.umd.cjs +12 -12
  31. package/dist/umd/index.umd.cjs.gz +0 -0
  32. package/package.json +11 -3
  33. package/dist/es/Button-l3ljgd74.js +0 -33
  34. package/dist/es/Dropdown-DBqye5wx.js +0 -38
  35. package/dist/es/Icon-4XdUD4qc.js +0 -27
  36. package/dist/es/Notification-Bv_vDOpB.js +0 -58
  37. package/dist/es/Tooltip-CUOZC7JN.js +0 -74
  38. package/dist/es/hooks-qpAqkY5H.js +0 -64
  39. /package/dist/types/components/Button/{contants.d.ts → constants.d.ts} +0 -0
@@ -1,5 +1,5 @@
1
1
  /* Notification Variables */
2
- .px-notification[data-v-44d5f081] {
2
+ .px-notification[data-v-2111f4f7] {
3
3
  --px-notification-width: 330px;
4
4
  --px-notification-padding: 14px 20px;
5
5
  --px-notification-border-color: var(--px-border-color);
@@ -14,7 +14,7 @@
14
14
  --px-notification-shadow-color: var(--px-shadow-color);
15
15
  }
16
16
  /* Base Notification Styles - Pixel Game Style */
17
- .px-notification[data-v-44d5f081] {
17
+ .px-notification[data-v-2111f4f7] {
18
18
  display: flex;
19
19
  width: var(--px-notification-width);
20
20
  padding: var(--px-notification-padding);
@@ -38,24 +38,24 @@
38
38
  /* No smooth transitions */
39
39
  transition: none;
40
40
  }
41
- .px-notification.right[data-v-44d5f081] {
41
+ .px-notification.right[data-v-2111f4f7] {
42
42
  right: 16px;
43
43
  }
44
- .px-notification.left[data-v-44d5f081] {
44
+ .px-notification.left[data-v-2111f4f7] {
45
45
  left: 16px;
46
46
  }
47
- .px-notification .px-notification__text[data-v-44d5f081] {
47
+ .px-notification .px-notification__text[data-v-2111f4f7] {
48
48
  margin: 0 10px;
49
49
  flex: 1;
50
50
  }
51
- .px-notification .px-notification__icon[data-v-44d5f081] {
51
+ .px-notification .px-notification__icon[data-v-2111f4f7] {
52
52
  height: var(--px-notification-icon-size);
53
53
  width: var(--px-notification-icon-size);
54
54
  font-size: var(--px-notification-icon-size);
55
55
  color: var(--px-notification-icon-color);
56
56
  flex-shrink: 0;
57
57
  }
58
- .px-notification .px-notification__title[data-v-44d5f081] {
58
+ .px-notification .px-notification__title[data-v-2111f4f7] {
59
59
  font-weight: 500;
60
60
  font-size: var(--px-notification-title-font-size);
61
61
  font-family: var(--px-font-family);
@@ -63,7 +63,7 @@
63
63
  color: var(--px-notification-title-color);
64
64
  margin: 0;
65
65
  }
66
- .px-notification .px-notification__content[data-v-44d5f081] {
66
+ .px-notification .px-notification__content[data-v-2111f4f7] {
67
67
  font-size: var(--px-notification-content-font-size);
68
68
  font-family: var(--px-font-family);
69
69
  line-height: 1.5;
@@ -71,7 +71,7 @@
71
71
  color: var(--px-notification-content-color);
72
72
  text-align: left;
73
73
  }
74
- .px-notification .px-notification__close[data-v-44d5f081] {
74
+ .px-notification .px-notification__close[data-v-2111f4f7] {
75
75
  position: absolute;
76
76
  top: 14px;
77
77
  right: 14px;
@@ -79,48 +79,48 @@
79
79
  color: var(--px-notification-close-color);
80
80
  font-size: var(--px-notification-close-font-size);
81
81
  }
82
- .px-notification .px-notification__close[data-v-44d5f081]:hover {
82
+ .px-notification .px-notification__close[data-v-2111f4f7]:hover {
83
83
  color: var(--px-notification-close-hover-color);
84
84
  }
85
85
  /* Type variants with colored shadows */
86
- .px-notification--info[data-v-44d5f081] {
86
+ .px-notification--info[data-v-2111f4f7] {
87
87
  --px-notification-icon-color: var(--px-color-info);
88
88
  --px-notification-border-color: var(--px-color-info);
89
89
  --px-notification-shadow-color: var(--px-color-info-dark);
90
90
  }
91
- .px-notification--success[data-v-44d5f081] {
91
+ .px-notification--success[data-v-2111f4f7] {
92
92
  --px-notification-icon-color: var(--px-color-success);
93
93
  --px-notification-border-color: var(--px-color-success);
94
94
  --px-notification-shadow-color: var(--px-color-success-dark);
95
95
  }
96
- .px-notification--warning[data-v-44d5f081] {
96
+ .px-notification--warning[data-v-2111f4f7] {
97
97
  --px-notification-icon-color: var(--px-color-warning);
98
98
  --px-notification-border-color: var(--px-color-warning);
99
99
  --px-notification-shadow-color: var(--px-color-warning-dark);
100
100
  }
101
- .px-notification--danger[data-v-44d5f081] {
101
+ .px-notification--danger[data-v-2111f4f7] {
102
102
  --px-notification-icon-color: var(--px-color-danger);
103
103
  --px-notification-border-color: var(--px-color-danger);
104
104
  --px-notification-shadow-color: var(--px-color-danger-dark);
105
105
  }
106
- .px-notification--error[data-v-44d5f081] {
106
+ .px-notification--error[data-v-2111f4f7] {
107
107
  --px-notification-icon-color: var(--px-color-danger);
108
108
  --px-notification-border-color: var(--px-color-danger);
109
109
  --px-notification-shadow-color: var(--px-color-danger-dark);
110
110
  }
111
111
  /* Animation */
112
- .px-notification-fade-enter-from.right[data-v-44d5f081] {
112
+ .px-notification-fade-enter-from.right[data-v-2111f4f7] {
113
113
  right: 0;
114
114
  transform: translateX(100%);
115
115
  }
116
- .px-notification-fade-enter-from.left[data-v-44d5f081] {
116
+ .px-notification-fade-enter-from.left[data-v-2111f4f7] {
117
117
  left: 0;
118
118
  transform: translateX(-100%);
119
119
  }
120
- .px-notification-fade-leave-to[data-v-44d5f081] {
120
+ .px-notification-fade-leave-to[data-v-2111f4f7] {
121
121
  opacity: 0;
122
122
  }
123
- .px-notification-fade-enter-active[data-v-44d5f081],
124
- .px-notification-fade-leave-active[data-v-44d5f081] {
123
+ .px-notification-fade-enter-active[data-v-2111f4f7],
124
+ .px-notification-fade-leave-active[data-v-2111f4f7] {
125
125
  transition: opacity 0.1s, transform 0.1s;
126
126
  }
@@ -1,5 +1,5 @@
1
1
  /* Tooltip Variables */
2
- .px-tooltip[data-v-e8b45d39] {
2
+ .px-tooltip[data-v-77c52c17] {
3
3
  --px-popover-bg-color: var(--px-bg-color);
4
4
  --px-popover-font-size: var(--px-font-size-base);
5
5
  --px-popover-border-color: var(--px-border-color-dark);
@@ -9,16 +9,16 @@
9
9
  }
10
10
  /* Base Tooltip Styles - Pixel Game Style */
11
11
  /* No smooth transitions for pixel feel */
12
- .px-tooltip .fade-enter-active[data-v-e8b45d39],
13
- .px-tooltip .fade-leave-active[data-v-e8b45d39] {
12
+ .px-tooltip .fade-enter-active[data-v-77c52c17],
13
+ .px-tooltip .fade-leave-active[data-v-77c52c17] {
14
14
  transition: none;
15
15
  }
16
- .px-tooltip .fade-enter-from[data-v-e8b45d39],
17
- .px-tooltip .fade-leave-to[data-v-e8b45d39] {
16
+ .px-tooltip .fade-enter-from[data-v-77c52c17],
17
+ .px-tooltip .fade-leave-to[data-v-77c52c17] {
18
18
  opacity: 0;
19
19
  }
20
20
  /* Popper container - Pixel style box */
21
- .px-tooltip .px-tooltip__popper[data-v-e8b45d39] {
21
+ .px-tooltip .px-tooltip__popper[data-v-77c52c17] {
22
22
  background: transparent;
23
23
  padding: var(--px-popover-padding);
24
24
  color: var(--px-text-color-primary);
@@ -39,7 +39,7 @@
39
39
  );
40
40
  }
41
41
  /* Border layer — filled with border color, clipped to pixel shape */
42
- .px-tooltip .px-tooltip__popper[data-v-e8b45d39]::before {
42
+ .px-tooltip .px-tooltip__popper[data-v-77c52c17]::before {
43
43
  content: "";
44
44
  position: absolute;
45
45
  inset: 0;
@@ -69,7 +69,7 @@
69
69
  z-index: -1;
70
70
  }
71
71
  /* Fill layer — inset by border width, filled with bg color */
72
- .px-tooltip .px-tooltip__popper[data-v-e8b45d39]::after {
72
+ .px-tooltip .px-tooltip__popper[data-v-77c52c17]::after {
73
73
  content: "";
74
74
  position: absolute;
75
75
  inset: 2px;
@@ -99,11 +99,11 @@
99
99
  z-index: -1;
100
100
  }
101
101
  /* Hide arrow for pixel style - pixel boxes don't need arrows */
102
- .px-tooltip .px-tooltip__popper #arrow[data-v-e8b45d39] {
102
+ .px-tooltip .px-tooltip__popper #arrow[data-v-77c52c17] {
103
103
  display: none;
104
104
  }
105
105
  /* Dark tooltip variant */
106
- .px-tooltip--dark .px-tooltip__popper[data-v-e8b45d39] {
106
+ .px-tooltip--dark .px-tooltip__popper[data-v-77c52c17] {
107
107
  --px-popover-bg-color: var(--px-text-color-primary);
108
108
  --px-popover-border-color: var(--px-text-color-primary);
109
109
  --px-popover-shadow-color: rgba(0, 0, 0, 0.4);
@@ -13,8 +13,11 @@ export interface ButtonProps {
13
13
  circle?: boolean;
14
14
  plain?: boolean;
15
15
  round?: boolean;
16
+ dash?: boolean;
17
+ ghost?: boolean;
16
18
  color?: string;
17
19
  loadingIcon?: string;
20
+ ariaLabel?: string;
18
21
  autofocus?: boolean;
19
22
  useThrottle?: boolean;
20
23
  throttleDuration?: number;
@@ -1,4 +1,4 @@
1
- import { TranslatePair } from '@sakana-element/locale';
1
+ import { TranslatePair } from '../../locale';
2
2
  import { App, MaybeRef, Ref } from 'vue';
3
3
  import { ConfigProviderContext } from './constants';
4
4
  export declare function useGlobalConfig<K extends keyof ConfigProviderContext, //keyof用于获取一个类型的所有键(属性名)组成的联合类型,表示泛型参数K必须是ConfigProviderContext接口中的某个属性名
@@ -16,9 +16,9 @@ export declare const PxConfigProvider: {
16
16
  config: {
17
17
  locale?: {
18
18
  name: string;
19
- el: import('packages/locale').TranslatePair;
19
+ el: import('../../locale').TranslatePair;
20
20
  } | undefined;
21
- extendsI18nMsg?: import('packages/locale').TranslatePair | undefined;
21
+ extendsI18nMsg?: import('../../locale').TranslatePair | undefined;
22
22
  } | undefined;
23
23
  }): any;
24
24
  };
@@ -1,4 +1,4 @@
1
- import { Language, TranslatePair } from '@sakana-element/locale';
1
+ import { Language, TranslatePair } from '../../locale';
2
2
  export interface ConfigProviderProps {
3
3
  locale?: Language;
4
4
  extendsI18nMsg?: TranslatePair;
@@ -0,0 +1 @@
1
+ export declare const pixelarticonsMap: Record<string, string>;
@@ -1,4 +1,5 @@
1
1
  declare const installer: import('vue').Plugin;
2
2
  export * from '../components';
3
- export * from '@sakana-element/locale';
3
+ export { type Theme, useSystemTheme, useTheme } from '../hooks';
4
+ export * from '../locale';
4
5
  export default installer;
@@ -1,4 +1,4 @@
1
- import { Language } from '@sakana-element/locale';
1
+ import { Language } from '../locale';
2
2
  import { Ref } from 'vue';
3
3
  import { I18nInstance } from 'vue3-i18n';
4
4
  export declare function useLocale(localeOverrides?: Ref<Language>): import('vue').ComputedRef<Pick<I18nInstance, "messages" | "t" | "setLocale" | "getLocale">>;