sakana-element 2.2.0 → 2.4.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 (155) hide show
  1. package/README.md +98 -25
  2. package/dist/es/{Alert-C76ZWSVk.js → Alert-DfLsJvQD.js} +2 -2
  3. package/dist/es/Avatar-Ci4OKsv7.js +9 -0
  4. package/dist/es/{Badge-CoFWwBwv.js → Badge-B4wEToK6.js} +2 -2
  5. package/dist/es/{Breadcrumb-BtrwTVKW.js → Breadcrumb-BFzww8jd.js} +2 -2
  6. package/dist/es/{Button-S_31-UWJ.js → Button-DbFviVWb.js} +3 -3
  7. package/dist/es/{Card-DcW6nHYD.js → Card-ClRqKkc_.js} +2 -2
  8. package/dist/es/ChatBubble-DFEV_lVI.js +9 -0
  9. package/dist/es/Checkbox-l86YI3Fr.js +51 -0
  10. package/dist/es/{Collapse-DsS7M-m3.js → Collapse-B67v6RSE.js} +4 -4
  11. package/dist/es/{ConfigProvider-BgIewHXP.js → ConfigProvider-BCoGbcS5.js} +2 -2
  12. package/dist/es/Diff-BLiniLom.js +64 -0
  13. package/dist/es/Divider-DDSOHv8G.js +9 -0
  14. package/dist/es/Drawer-apeXw6EO.js +40 -0
  15. package/dist/es/Dropdown-By9qIErf.js +104 -0
  16. package/dist/es/{FileInput-BQ59woas.js → FileInput-CZ5jTfB_.js} +3 -3
  17. package/dist/es/Filter-B_1zU4Dq.js +40 -0
  18. package/dist/es/Form-B_XDnSjK.js +123 -0
  19. package/dist/es/{Icon-DpJyuj7c.js → Icon-D6qRB3pq.js} +1 -1
  20. package/dist/es/Indicator-C6Ip4dpP.js +9 -0
  21. package/dist/es/{Input-CiE4bPJN.js → Input-bThwBbNZ.js} +7 -7
  22. package/dist/es/Kbd-DXNjs7at.js +13 -0
  23. package/dist/es/{Link-B9B2APZq.js → Link-08Ee61Fv.js} +1 -1
  24. package/dist/es/{Loading-BW99pE5N.js → Loading-ByI9mjss.js} +13 -13
  25. package/dist/es/Message-CGG-lV5I.js +152 -0
  26. package/dist/es/Notification-B4clKY5h.js +69 -0
  27. package/dist/es/{Overlay-BRDSWspM.js → Overlay-6iPenJB1.js} +1 -1
  28. package/dist/es/Pixelate-A8J7jxDW.js +39 -0
  29. package/dist/es/Popconfirm-gcHGcOTz.js +23 -0
  30. package/dist/es/Progress-DFUBJQ4X.js +12 -0
  31. package/dist/es/Radio-CLBa1XIM.js +33 -0
  32. package/dist/es/Resizable-BWrFr2oj.js +151 -0
  33. package/dist/es/{Select-Dwqv8isB.js → Select-BtLqds1d.js} +20 -20
  34. package/dist/es/Skeleton-CGUQv3nQ.js +15 -0
  35. package/dist/es/{Switch-B1Gnv1tB.js → Switch-CZJ-S77_.js} +3 -3
  36. package/dist/es/Table-lHbxiyGq.js +10 -0
  37. package/dist/es/Tooltip-CdPqNYdn.js +74 -0
  38. package/dist/es/Validator-7ZT_nXDZ.js +40 -0
  39. package/dist/es/hooks-pU4JmsO3.js +171 -0
  40. package/dist/es/index.js +107 -70
  41. package/dist/es/utils-BXICIEsD.js +139 -0
  42. package/dist/es/{vendor-DXmGx29U.js → vendor-DrBJKLFW.js} +254 -210
  43. package/dist/index.css +1 -1
  44. package/dist/theme/Avatar.css +13 -43
  45. package/dist/theme/Badge.css +151 -151
  46. package/dist/theme/Breadcrumb.css +46 -4
  47. package/dist/theme/Button.css +72 -8
  48. package/dist/theme/Card.css +177 -93
  49. package/dist/theme/ChatBubble.css +218 -0
  50. package/dist/theme/Checkbox.css +604 -0
  51. package/dist/theme/Collapse.css +96 -96
  52. package/dist/theme/Diff.css +110 -0
  53. package/dist/theme/Divider.css +150 -0
  54. package/dist/theme/Drawer.css +206 -0
  55. package/dist/theme/Dropdown.css +359 -75
  56. package/dist/theme/FileInput.css +32 -0
  57. package/dist/theme/Filter.css +598 -0
  58. package/dist/theme/Indicator.css +159 -0
  59. package/dist/theme/Input.css +414 -406
  60. package/dist/theme/Kbd.css +104 -0
  61. package/dist/theme/Link.css +22 -3
  62. package/dist/theme/Loading.css +50 -12
  63. package/dist/theme/Message.css +250 -41
  64. package/dist/theme/Notification.css +232 -42
  65. package/dist/theme/Popconfirm.css +23 -7
  66. package/dist/theme/Progress.css +278 -0
  67. package/dist/theme/Radio.css +492 -0
  68. package/dist/theme/Resizable.css +95 -0
  69. package/dist/theme/Select.css +198 -88
  70. package/dist/theme/Skeleton.css +192 -0
  71. package/dist/theme/Switch.css +22 -3
  72. package/dist/theme/Table.css +680 -0
  73. package/dist/theme/Tooltip.css +150 -26
  74. package/dist/theme/Validator.css +25 -0
  75. package/dist/types/components/Avatar/types.d.ts +0 -2
  76. package/dist/types/components/ChatBubble/constants.d.ts +2 -0
  77. package/dist/types/components/ChatBubble/index.d.ts +27 -0
  78. package/dist/types/components/ChatBubble/types.d.ts +10 -0
  79. package/dist/types/components/Checkbox/constants.d.ts +5 -0
  80. package/dist/types/components/Checkbox/index.d.ts +94 -0
  81. package/dist/types/components/Checkbox/types.d.ts +46 -0
  82. package/dist/types/components/Collapse/index.d.ts +5 -5
  83. package/dist/types/components/Diff/constants.d.ts +4 -0
  84. package/dist/types/components/Diff/index.d.ts +67 -0
  85. package/dist/types/components/Diff/types.d.ts +29 -0
  86. package/dist/types/components/Divider/index.d.ts +30 -0
  87. package/dist/types/components/Divider/types.d.ts +10 -0
  88. package/dist/types/components/Drawer/constants.d.ts +1 -0
  89. package/dist/types/components/Drawer/index.d.ts +72 -0
  90. package/dist/types/components/Drawer/types.d.ts +20 -0
  91. package/dist/types/components/Dropdown/index.d.ts +13 -3
  92. package/dist/types/components/Dropdown/types.d.ts +3 -0
  93. package/dist/types/components/Dropdown/useDropdownKeyboard.d.ts +8 -0
  94. package/dist/types/components/FileInput/index.d.ts +5 -5
  95. package/dist/types/components/Filter/constants.d.ts +5 -0
  96. package/dist/types/components/Filter/index.d.ts +59 -0
  97. package/dist/types/components/Filter/types.d.ts +38 -0
  98. package/dist/types/components/Indicator/constants.d.ts +2 -0
  99. package/dist/types/components/Indicator/index.d.ts +28 -0
  100. package/dist/types/components/Indicator/types.d.ts +10 -0
  101. package/dist/types/components/Input/index.d.ts +10 -10
  102. package/dist/types/components/Kbd/constants.d.ts +3 -0
  103. package/dist/types/components/Kbd/index.d.ts +24 -0
  104. package/dist/types/components/Kbd/types.d.ts +10 -0
  105. package/dist/types/components/Message/methods.d.ts +2 -0
  106. package/dist/types/components/Message/types.d.ts +7 -1
  107. package/dist/types/components/MessageBox/types.d.ts +14 -2
  108. package/dist/types/components/Notification/methods.d.ts +3 -0
  109. package/dist/types/components/Notification/types.d.ts +8 -2
  110. package/dist/types/components/Pixelate/constants.d.ts +2 -0
  111. package/dist/types/components/Pixelate/index.d.ts +71 -0
  112. package/dist/types/components/Pixelate/types.d.ts +23 -0
  113. package/dist/types/components/Popconfirm/index.d.ts +18 -9
  114. package/dist/types/components/Popconfirm/types.d.ts +2 -1
  115. package/dist/types/components/Progress/constants.d.ts +2 -0
  116. package/dist/types/components/Progress/index.d.ts +50 -0
  117. package/dist/types/components/Progress/types.d.ts +22 -0
  118. package/dist/types/components/Radio/constants.d.ts +5 -0
  119. package/dist/types/components/Radio/index.d.ts +88 -0
  120. package/dist/types/components/Radio/types.d.ts +43 -0
  121. package/dist/types/components/Resizable/constants.d.ts +3 -0
  122. package/dist/types/components/Resizable/index.d.ts +135 -0
  123. package/dist/types/components/Resizable/types.d.ts +52 -0
  124. package/dist/types/components/Select/index.d.ts +32 -23
  125. package/dist/types/components/Skeleton/index.d.ts +36 -0
  126. package/dist/types/components/Skeleton/types.d.ts +12 -0
  127. package/dist/types/components/Switch/index.d.ts +5 -5
  128. package/dist/types/components/Table/index.d.ts +27 -0
  129. package/dist/types/components/Table/types.d.ts +20 -0
  130. package/dist/types/components/Tooltip/index.d.ts +9 -3
  131. package/dist/types/components/Tooltip/types.d.ts +7 -0
  132. package/dist/types/components/Validator/index.d.ts +52 -0
  133. package/dist/types/components/Validator/types.d.ts +13 -0
  134. package/dist/types/components/index.d.ts +15 -0
  135. package/dist/types/hooks/index.d.ts +3 -1
  136. package/dist/types/hooks/useDraggable.d.ts +7 -0
  137. package/dist/types/hooks/useFocusTrap.d.ts +5 -0
  138. package/dist/types/utils/index.d.ts +2 -0
  139. package/dist/types/utils/instance-management.d.ts +40 -0
  140. package/dist/types/utils/pixelate.d.ts +10 -0
  141. package/dist/types/utils/style.d.ts +1 -0
  142. package/dist/umd/index.css +1 -1
  143. package/dist/umd/index.css.gz +0 -0
  144. package/dist/umd/index.umd.cjs +4 -4
  145. package/dist/umd/index.umd.cjs.gz +0 -0
  146. package/package.json +59 -59
  147. package/dist/es/Avatar-CxsRW-wl.js +0 -9
  148. package/dist/es/Dropdown-GcomGMAI.js +0 -40
  149. package/dist/es/Form-j90EzLXU.js +0 -122
  150. package/dist/es/Message-DCNnTUje.js +0 -123
  151. package/dist/es/Notification-CBzY5904.js +0 -58
  152. package/dist/es/Popconfirm-DF6d2ORS.js +0 -23
  153. package/dist/es/Tooltip-k6gKnMyt.js +0 -74
  154. package/dist/es/hooks-BaG7l8K5.js +0 -116
  155. package/dist/es/utils-bsCscZfS.js +0 -84
package/README.md CHANGED
@@ -1,14 +1,27 @@
1
1
  # Sakana Element
2
2
 
3
3
  [![npm version](https://img.shields.io/npm/v/sakana-element.svg)](https://www.npmjs.com/package/sakana-element)
4
- [![license](https://img.shields.io/npm/l/sakana-element.svg)](https://github.com/yu859/sakana-element/blob/master/LICENSE)
4
+ [![npm downloads](https://img.shields.io/npm/dm/sakana-element.svg)](https://www.npmjs.com/package/sakana-element)
5
+ [![license](https://img.shields.io/npm/l/sakana-element.svg)](https://github.com/SaKaNa-Y/sakana-element/blob/master/LICENSE)
5
6
 
6
7
  A Vue 3 + TypeScript component library with pixel art design aesthetic.
7
8
 
8
9
  像素风格的 Vue 3 + TypeScript 组件库。
9
10
 
11
+ **[Documentation / 文档](https://sakana-element-docs.vercel.app)** | **[GitHub](https://github.com/SaKaNa-Y/sakana-element)**
12
+
10
13
  ---
11
14
 
15
+ ## Features / 特性
16
+
17
+ - 🎨 **CSS Houdini Pixel Rendering** — pixel-border & pixel-shadow Paint Worklets / CSS Houdini 像素边框和阴影
18
+ - 🧩 **25 Components** — Pixel-art styled UI toolkit / 25 个像素风格组件
19
+ - ⭐ **486 Pixel Icons** — Full pixelarticons set with animations / 内置 486 个像素图标
20
+ - 🌙 **Catppuccin Dark Mode** — System-preference auto-detection / Catppuccin 暗色模式
21
+ - 🔧 **TypeScript** — Full type definitions with IntelliSense / 完整类型定义
22
+ - 📦 **Tree-Shakable** — Per-component ES module chunks / 按组件分包
23
+ - 🌐 **5 Locales** — EN, ZH-CN, ZH-TW, JA, KO / 五种语言
24
+
12
25
  ## Install / 安装
13
26
 
14
27
  ```bash
@@ -31,30 +44,88 @@ createApp(App).use(SakanaElement).mount('#app')
31
44
 
32
45
  ## Components / 组件
33
46
 
47
+ ### Basic / 基础
48
+
49
+ | Component | Description / 描述 |
50
+ |-----------|-------------------|
51
+ | `PxButton` | Button with 8+ style variants / 按钮(8+ 种风格变体) |
52
+ | `PxIcon` | 486 built-in pixel icons / 486 个内置像素图标 |
53
+
54
+ ### Form / 表单
55
+
56
+ | Component | Description / 描述 |
57
+ |-----------|-------------------|
58
+ | `PxInput` | Text, password, textarea, date, and more / 输入框(多种类型) |
59
+ | `PxSwitch` | Toggle switch / 开关 |
60
+ | `PxSelect` | Dropdown select with filtering / 选择器(支持搜索过滤) |
61
+ | `PxFileInput` | File upload input / 文件输入 |
62
+ | `PxForm` | Form layout with validation / 表单(支持验证) |
63
+
64
+ ### Data Display / 数据展示
65
+
66
+ | Component | Description / 描述 |
67
+ |-----------|-------------------|
68
+ | `PxBadge` | Status badge / 徽章 |
69
+ | `PxAvatar` | User avatar / 头像 |
70
+ | `PxCard` | Card with staircase corners / 卡片(阶梯角) |
71
+ | `PxProgress` | Progress bar with pixel chunks / 进度条(像素分块) |
72
+ | `PxTable` | Data table / 数据表格 |
73
+ | `PxCollapse` | Accordion collapse / 折叠面板 |
74
+ | `PxPixelate` | Image pixelation effect / 图片像素化 |
75
+
76
+ ### Navigation / 导航
77
+
78
+ | Component | Description / 描述 |
79
+ |-----------|-------------------|
80
+ | `PxLink` | Hyperlink / 链接 |
81
+ | `PxBreadcrumb` | Breadcrumb trail / 面包屑 |
82
+
83
+ ### Feedback / 反馈
84
+
34
85
  | Component | Description / 描述 |
35
86
  |-----------|-------------------|
36
- | `PxButton` | Button / 按钮 |
37
- | `PxIcon` | Icon / 图标 |
38
- | `PxInput` | Input / 输入框 |
39
- | `PxLink` | Link / 链接 |
40
- | `PxSelect` | Select / 选择器 |
41
- | `PxFileInput` | FileInput / 文件输入 |
42
- | `PxSwitch` | Switch / 开关 |
43
- | `PxForm` | Form / 表单 |
44
- | `PxAvatar` | Avatar / 头像 |
45
- | `PxBadge` | Badge / 徽章 |
46
- | `PxCard` | Card / 卡片 |
47
- | `PxCollapse` | Collapse / 折叠面板 |
48
- | `PxBreadcrumb` | Breadcrumb / 面包屑 |
49
- | `PxDropdown` | Dropdown / 下拉菜单 |
50
- | `PxAlert` | Alert / 警告提示 |
51
- | `PxMessage` | Message / 消息提示 |
52
- | `PxMessageBox` | MessageBox / 消息弹框 |
53
- | `PxNotification` | Notification / 通知 |
54
- | `PxLoading` | Loading / 加载 |
55
- | `PxTooltip` | Tooltip / 文字提示 |
56
- | `PxPopconfirm` | Popconfirm / 气泡确认框 |
57
- | `PxConfigProvider` | ConfigProvider / 全局配置 |
87
+ | `PxAlert` | Alert message / 警告提示 |
88
+ | `PxTooltip` | Tooltip popup / 文字提示 |
89
+ | `PxMessage` | Toast message / 消息提示 |
90
+ | `PxNotification` | Notification panel / 通知 |
91
+ | `PxPopconfirm` | Popover confirm / 气泡确认框 |
92
+ | `PxMessageBox` | Modal dialog / 消息弹框 |
93
+ | `PxLoading` | Loading overlay / 加载 |
94
+ | `PxDropdown` | Dropdown menu / 下拉菜单 |
95
+
96
+ ### Config / 配置
97
+
98
+ | Component | Description / 描述 |
99
+ |-----------|-------------------|
100
+ | `PxConfigProvider` | Global config provider / 全局配置 |
101
+
102
+ ## Composition Hooks / 组合式函数
103
+
104
+ | Hook | Description / 描述 |
105
+ |------|-------------------|
106
+ | `useTheme` | Reactive theme state (light / dark / system) / 响应式主题状态 |
107
+ | `useSystemTheme` | Detect OS color scheme preference / 检测系统配色偏好 |
108
+
109
+ ```ts
110
+ import { useTheme } from 'sakana-element'
111
+
112
+ const { theme, toggleTheme, setTheme } = useTheme()
113
+
114
+ toggleTheme() // Toggle between dark and light
115
+ setTheme('dark') // Force dark mode
116
+ setTheme('system') // Follow system preference
117
+ ```
118
+
119
+ ## Icons / 图标
120
+
121
+ 486 icons from [pixelarticons](https://pixelarticons.com/) are bundled out of the box — with support for flip, rotation, animations, and custom SVG registration.
122
+
123
+ 内置 [pixelarticons](https://pixelarticons.com/) 的 486 个像素风格图标,开箱即用 — 支持翻转、旋转、动画及自定义 SVG 注册。
124
+
125
+ ```vue
126
+ <px-icon icon="home" size="lg" type="primary" />
127
+ <px-icon icon="heart" color="#e91e63" beat />
128
+ ```
58
129
 
59
130
  ## Bundled Font / 内置字体
60
131
 
@@ -76,9 +147,11 @@ Add the `px-dark` or `dark` class to an ancestor element:
76
147
 
77
148
  ## Links / 链接
78
149
 
79
- - [GitHub](https://github.com/yu859/sakana-element)
150
+ - [Documentation / 文档](https://sakana-element-docs.vercel.app)
151
+ - [GitHub](https://github.com/SaKaNa-Y/sakana-element)
80
152
  - [npm](https://www.npmjs.com/package/sakana-element)
153
+ - [Changelog](https://github.com/SaKaNa-Y/sakana-element/blob/master/CHANGELOG.md)
81
154
 
82
155
  ## License / 许可证
83
156
 
84
- [ISC](https://github.com/yu859/sakana-element/blob/master/LICENSE)
157
+ [ISC](https://github.com/SaKaNa-Y/sakana-element/blob/master/LICENSE)
@@ -1,6 +1,6 @@
1
- import { t as e, r as t, S as l, c as o, _ as s, w as a } from "./utils-bsCscZfS.js";
1
+ import { t as e, r as t, S as l, c as o, _ as s, w as a } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as c, useSlots as n, ref as i, computed as r, createBlock as p, openBlock as u, Transition as d, withCtx as f, withDirectives as _, createElementVNode as y, normalizeStyle as x, normalizeClass as v, createCommentVNode as m, createElementBlock as h, renderSlot as k, createTextVNode as w, toDisplayString as B, createVNode as I, withModifiers as b, vShow as $ } from "vue";
3
- import { P as g } from "./Icon-DpJyuj7c.js";
3
+ import { P as g } from "./Icon-D6qRB3pq.js";
4
4
  const P = { class: "px-alert__content" }, j = { key: 0, class: "px-alert__description" }, A = { key: 1, class: "px-alert__close" }, C = a(s(c({ name: "PxAlert", __name: "Alert", props: { title: {}, type: { default: "info" }, description: {}, effect: { default: "light" }, closable: { type: Boolean, default: true }, center: { type: Boolean }, showIcon: { type: Boolean }, outline: { type: Boolean }, dash: { type: Boolean }, color: {} }, emits: ["close"], setup(s2, { expose: a2, emit: c2 }) {
5
5
  const C2 = s2, S = c2, q = n(), z = i(true), D = r((() => e.get(C2.type) ?? "circle-info")), E = r((() => C2.description || q.default)), F = r((() => {
6
6
  if (!C2.color) return {};
@@ -0,0 +1,9 @@
1
+ import { r as a, c as e, S as s, _ as r, w as t } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as o, computed as l, createElementBlock as p, openBlock as u, normalizeStyle as d, normalizeClass as i, renderSlot as c } from "vue";
3
+ const f = t(r(o({ name: "PxAvatar", __name: "Avatar", props: { size: { default: "default" }, shape: { default: "circle" }, border: { type: Boolean, default: true }, color: {} }, setup(r2) {
4
+ const t2 = r2, o2 = l((() => t2.color ? a(e(t2.color), "px-avatar", s.default) : {}));
5
+ return (a2, e2) => (u(), p("span", { class: i(["px-avatar", { [`px-avatar--${a2.size}`]: a2.size && "default" !== a2.size, "is-square": "square" === a2.shape, "is-border": a2.border }]), style: d(o2.value) }, [c(a2.$slots, "default", {}, void 0, true)], 6));
6
+ } }), [["__scopeId", "data-v-be451b35"]]));
7
+ export {
8
+ f as P
9
+ };
@@ -1,6 +1,6 @@
1
- import { r as e, S as s, c as o, _ as a, w as t } from "./utils-bsCscZfS.js";
1
+ import { r as e, S as s, c as o, _ as a, w as t } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as l, useSlots as i, computed as n, createElementBlock as u, openBlock as d, normalizeStyle as r, normalizeClass as p, createBlock as c, createCommentVNode as f, renderSlot as m } from "vue";
3
- import { P as y } from "./Icon-DpJyuj7c.js";
3
+ import { P as y } from "./Icon-D6qRB3pq.js";
4
4
  const x = t(a(l({ name: "PxBadge", __name: "Badge", props: { type: { default: "primary" }, size: { default: "default" }, outline: { type: Boolean }, dash: { type: Boolean }, color: {}, round: { type: Boolean }, icon: {} }, setup(a2) {
5
5
  const t2 = a2, l2 = i(), x2 = n((() => !l2.default)), z = n((() => "small" === t2.size ? "xs" : "sm")), g = n((() => {
6
6
  if (!t2.color) return {};
@@ -1,6 +1,6 @@
1
- import { _ as a, w as r } from "./utils-bsCscZfS.js";
1
+ import { _ as a, w as r } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as e, useSlots as s, provide as o, createElementBlock as t, openBlock as d, createElementVNode as l, renderSlot as c, inject as i, normalizeClass as p, createBlock as b, resolveDynamicComponent as n, mergeProps as u, withModifiers as m, withCtx as _, createCommentVNode as f, unref as x, Fragment as v, createTextVNode as B, toDisplayString as k } from "vue";
3
- import { P as y } from "./Icon-DpJyuj7c.js";
3
+ import { P as y } from "./Icon-D6qRB3pq.js";
4
4
  const I = Symbol("breadcrumbContext"), P = { class: "px-breadcrumb", "aria-label": "Breadcrumb" }, S = { class: "px-breadcrumb__list" }, h = a(e({ name: "PxBreadcrumb", __name: "Breadcrumb", props: { separator: { default: "/" } }, setup(a2) {
5
5
  const r2 = a2, e2 = s();
6
6
  return o(I, { separator: r2.separator, separatorSlot: e2.separator }), (a3, r3) => (d(), t("nav", P, [l("ol", S, [c(a3.$slots, "default", {}, void 0, true)])]));
@@ -1,7 +1,7 @@
1
- import { d as o, l as t, c as r, r as e, _ as l, w as a } from "./utils-bsCscZfS.js";
1
+ import { d as o, l as t, c as r, r as e, _ as l, w as a } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as i, useSlots as s, inject as c, ref as n, computed as d, onBeforeUnmount as b, createBlock as p, openBlock as g, resolveDynamicComponent as u, unref as v, normalizeStyle as h, normalizeClass as y, withCtx as x, renderSlot as k, createCommentVNode as f, createVNode as B, provide as m, reactive as _, toRef as z, createElementBlock as w } from "vue";
3
- import { P as T } from "./Icon-DpJyuj7c.js";
4
- import { t as $ } from "./vendor-DXmGx29U.js";
3
+ import { P as T } from "./Icon-D6qRB3pq.js";
4
+ import { t as $ } from "./vendor-DrBJKLFW.js";
5
5
  const I = Symbol("BUTTON_GROUP_CTX_KEY"), P = { link: { "text-color": "color", "bg-color": "transparent", "border-color": "transparent", "shadow-color": "transparent", "hover-text-color": "dark", "hover-bg-color": "transparent", "hover-border-color": "transparent", "active-text-color": "dark", "active-bg-color": "transparent", "active-border-color": "transparent", "disabled-text-color": "light", "disabled-bg-color": "transparent", "disabled-border-color": "transparent" }, ghost: { "text-color": "color", "bg-color": "transparent", "border-color": "transparent", "shadow-color": "transparent", "hover-text-color": "dark", "hover-bg-color": "lighter", "hover-border-color": "transparent", "active-text-color": "dark", "active-bg-color": "light", "active-border-color": "transparent", "disabled-text-color": "light", "disabled-bg-color": "transparent", "disabled-border-color": "transparent" }, dash: { "text-color": "color", "bg-color": "lighter", "border-color": "color", "shadow-color": "transparent", "hover-text-color": "dark", "hover-bg-color": "light", "hover-border-color": "dark", "active-text-color": "dark", "active-bg-color": "color", "active-border-color": "dark", "disabled-text-color": "light", "disabled-bg-color": "lighter", "disabled-border-color": "light" }, plain: { "text-color": "color", "bg-color": "lighter", "border-color": "color", "hover-text-color": "contrast", "hover-bg-color": "color", "hover-border-color": "color", "active-text-color": "contrast", "active-bg-color": "dark", "active-border-color": "dark", "disabled-text-color": "light", "disabled-bg-color": "lighter", "disabled-border-color": "light" }, default: { "text-color": "contrast", "bg-color": "color", "border-color": "dark", "shadow-color": "dark", "hover-text-color": "contrast", "hover-bg-color": "light", "hover-border-color": "color", "active-text-color": "contrast", "active-bg-color": "dark", "active-border-color": "dark", "disabled-text-color": "contrast", "disabled-bg-color": "light", "disabled-border-color": "light" } }, j = l(i({ name: "PxButton", __name: "Button", props: { tag: { default: "button" }, type: {}, size: {}, nativeType: { default: "button" }, disabled: { type: Boolean }, loading: { type: Boolean }, icon: {}, circle: { type: Boolean }, plain: { type: Boolean }, round: { type: Boolean }, dash: { type: Boolean }, ghost: { type: Boolean }, link: { type: Boolean }, block: { type: Boolean }, responsive: { type: Boolean }, color: {}, loadingIcon: {}, ariaLabel: {}, autofocus: { type: Boolean }, useThrottle: { type: Boolean, default: true }, throttleDuration: { default: 500 } }, emits: ["click"], setup(l2, { expose: a2, emit: i2 }) {
6
6
  const m2 = /* @__PURE__ */ new Set(["button", "a", "div", "span", "router-link"]), _2 = l2;
7
7
  "string" != typeof _2.tag || m2.has(_2.tag) || o("PxButton", `Invalid tag "${_2.tag}". Allowed tags: ${[...m2].join(", ")}. Falling back to "button".`);
@@ -1,4 +1,4 @@
1
- import { r as o, S as a, c as e, _ as s, w as r } from "./utils-bsCscZfS.js";
1
+ import { r as o, S as a, c as e, _ as s, w as r } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as t, useSlots as d, computed as l, createElementBlock as c, openBlock as n, normalizeStyle as p, normalizeClass as i, createCommentVNode as h, createElementVNode as u, unref as v, renderSlot as y } from "vue";
3
3
  const x = { key: 0, class: "px-card__header" }, _ = { class: "px-card__body" }, f = { key: 1, class: "px-card__footer" }, w = r(s(t({ name: "PxCard", __name: "Card", props: { type: {}, color: {}, hoverable: { type: Boolean }, shadow: { type: [Boolean, String], default: "always" }, size: {}, outline: { type: Boolean }, dash: { type: Boolean }, ghost: { type: Boolean } }, setup(s2) {
4
4
  const r2 = { "text-color": "color", "bg-color": "transparent", "border-color": "transparent", "shadow-color": "transparent" }, t2 = s2, w2 = d(), g = l((() => {
@@ -10,7 +10,7 @@ const x = { key: 0, class: "px-card__header" }, _ = { class: "px-card__body" },
10
10
  return o(e(t2.color), "px-card", d2[s3]);
11
11
  }));
12
12
  return (o2, a2) => (n(), c("div", { class: i(["px-card", [g.value, { [`px-card--${o2.type}`]: o2.type, [`px-card--${o2.size}`]: o2.size, "is-hoverable": o2.hoverable, "is-outline": o2.outline, "is-dash": o2.dash, "is-ghost": o2.ghost }]]), style: p(b.value) }, [v(w2).header ? (n(), c("div", x, [y(o2.$slots, "header", {}, void 0, true)])) : h("", true), u("div", _, [y(o2.$slots, "default", {}, void 0, true)]), v(w2).footer ? (n(), c("div", f, [y(o2.$slots, "footer", {}, void 0, true)])) : h("", true)], 6));
13
- } }), [["__scopeId", "data-v-61d3ab66"]]));
13
+ } }), [["__scopeId", "data-v-f3900769"]]));
14
14
  export {
15
15
  w as P
16
16
  };
@@ -0,0 +1,9 @@
1
+ import { r as a, c as t, _ as e, w as s } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as l, useSlots as o, computed as c, createElementBlock as r, openBlock as p, normalizeStyle as n, normalizeClass as b, createCommentVNode as _, createElementVNode as d, unref as m, renderSlot as u, toDisplayString as h } from "vue";
3
+ const i = { "bubble-text-color": "contrast", "bubble-bg-color": "color", "bubble-border-color": "dark", "bubble-shadow-color": "dark" }, x = { key: 0, class: "px-chat__avatar" }, v = { class: "px-chat__content" }, y = { key: 0, class: "px-chat__header" }, f = { key: 0, class: "px-chat__name" }, k = { key: 1, class: "px-chat__time" }, $ = { class: "px-chat__bubble" }, w = { key: 1, class: "px-chat__footer" }, B = s(e(l({ name: "PxChatBubble", __name: "ChatBubble", props: { placement: { default: "start" }, type: {}, color: {}, name: {}, time: {}, status: {} }, setup(e2) {
4
+ const s2 = e2, l2 = o(), B2 = c((() => s2.color ? a(t(s2.color), "px-chat", i) : {}));
5
+ return (a2, t2) => (p(), r("div", { class: b(["px-chat", { [`px-chat--${a2.placement}`]: a2.placement, [`px-chat--${a2.type}`]: a2.type }]), style: n(B2.value) }, [m(l2).avatar ? (p(), r("div", x, [u(a2.$slots, "avatar", {}, void 0, true)])) : _("", true), d("div", v, [m(l2).header || a2.name || a2.time ? (p(), r("div", y, [u(a2.$slots, "header", {}, (() => [a2.name ? (p(), r("span", f, h(a2.name), 1)) : _("", true), a2.time ? (p(), r("span", k, h(a2.time), 1)) : _("", true)]), true)])) : _("", true), d("div", $, [t2[0] || (t2[0] = d("span", { class: "px-chat__tail" }, null, -1)), u(a2.$slots, "default", {}, void 0, true)]), m(l2).footer || a2.status ? (p(), r("div", w, [u(a2.$slots, "footer", {}, (() => [d("span", null, h(a2.status), 1)]), true)])) : _("", true)])], 6));
6
+ } }), [["__scopeId", "data-v-c022026d"]]));
7
+ export {
8
+ B as P
9
+ };
@@ -0,0 +1,51 @@
1
+ import { c as e, r as a, w as l } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as o, useSlots as c, inject as t, ref as u, computed as i, onMounted as n, watch as s, createElementBlock as d, openBlock as r, normalizeStyle as m, normalizeClass as p, createElementVNode as v, createCommentVNode as h, unref as x, renderSlot as b, createTextVNode as k, toDisplayString as f, provide as y } from "vue";
3
+ import { u as _ } from "./hooks-pU4JmsO3.js";
4
+ import { u as g } from "./Form-B_XDnSjK.js";
5
+ const V = Symbol("checkboxGroupContext"), z = { "checked-color": "color", "checked-border-color": "dark" }, C = { class: "px-checkbox__input" }, B = ["aria-checked", "id", "name", "disabled", "checked"], $ = { key: 0, class: "px-checkbox__label" }, j = o({ name: "PxCheckbox", inheritAttrs: false, __name: "Checkbox", props: { modelValue: { type: Boolean, default: false }, value: { type: [String, Number, Boolean] }, disabled: { type: Boolean, default: false }, indeterminate: { type: Boolean, default: false }, size: {}, type: {}, color: {}, label: {}, name: {}, id: {} }, emits: ["update:modelValue", "change"], setup(l2, { expose: o2, emit: y2 }) {
6
+ const j2 = l2, G2 = y2, P2 = c(), E2 = t(V, void 0), I2 = !!E2, { formItem: S } = g(), w = u(), A = _().value, F = i((() => I2 ? E2.modelValue.value.includes(j2.value) : j2.modelValue)), N = i((() => {
7
+ if (E2 == null ? void 0 : E2.disabled.value) return true;
8
+ if (I2) {
9
+ const e2 = E2.modelValue.value, a2 = E2.min.value, l3 = E2.max.value;
10
+ if (F.value && void 0 !== a2 && e2.length <= a2) return true;
11
+ if (!F.value && void 0 !== l3 && e2.length >= l3) return true;
12
+ }
13
+ return j2.disabled;
14
+ })), O = i((() => j2.size ?? (E2 == null ? void 0 : E2.size.value))), R = i((() => j2.type ?? (E2 == null ? void 0 : E2.type.value))), q = i((() => j2.color ?? (E2 == null ? void 0 : E2.color.value))), D = i((() => {
15
+ const l3 = q.value;
16
+ if (!l3) return {};
17
+ const o3 = e(l3);
18
+ return a(o3, "px-checkbox", z);
19
+ }));
20
+ function H() {
21
+ if (!N.value) {
22
+ if (I2) {
23
+ const e2 = [...E2.modelValue.value], a2 = j2.value, l3 = e2.indexOf(a2);
24
+ l3 > -1 ? e2.splice(l3, 1) : e2.push(a2), E2.changeEvent(e2);
25
+ } else {
26
+ const e2 = !F.value;
27
+ G2("update:modelValue", e2), G2("change", e2);
28
+ }
29
+ I2 || (S == null ? void 0 : S.validate("change").catch(((e2) => {
30
+ })));
31
+ }
32
+ }
33
+ return n((() => {
34
+ w.value && (w.value.indeterminate = j2.indeterminate);
35
+ })), s((() => j2.indeterminate), ((e2) => {
36
+ w.value && (w.value.indeterminate = e2);
37
+ })), o2({ checked: F, focus: () => {
38
+ var _a;
39
+ (_a = w.value) == null ? void 0 : _a.focus();
40
+ } }), (e2, a2) => (r(), d("div", { class: p(["px-checkbox", { [`px-checkbox--${O.value}`]: O.value, [`px-checkbox--${R.value}`]: R.value, "is-disabled": N.value, "is-checked": F.value, "is-indeterminate": e2.indeterminate }]), style: m(D.value), onClick: H }, [v("span", C, [v("input", { ref_key: "inputRef", ref: w, class: "px-checkbox__original", type: "checkbox", "aria-checked": F.value, id: e2.id || x(A), name: e2.name, disabled: N.value, checked: F.value }, null, 8, B), a2[0] || (a2[0] = v("span", { class: "px-checkbox__inner" }, [v("span", { class: "px-checkbox__tick" })], -1))]), e2.label || x(P2).default ? (r(), d("span", $, [b(e2.$slots, "default", {}, (() => [k(f(e2.label), 1)]))])) : h("", true)], 6));
41
+ } }), G = { class: "px-checkbox-group", role: "group" }, P = o({ name: "PxCheckboxGroup", __name: "CheckboxGroup", props: { modelValue: {}, disabled: { type: Boolean, default: false }, size: {}, type: {}, color: {}, min: {}, max: {} }, emits: ["update:modelValue", "change"], setup(e2, { emit: a2 }) {
42
+ const l2 = e2, o2 = a2, { formItem: c2 } = g();
43
+ return y(V, { modelValue: i((() => l2.modelValue)), disabled: i((() => l2.disabled)), size: i((() => l2.size)), type: i((() => l2.type)), color: i((() => l2.color)), min: i((() => l2.min)), max: i((() => l2.max)), changeEvent: (e3) => {
44
+ o2("update:modelValue", e3), o2("change", e3), c2 == null ? void 0 : c2.validate("change").catch(((e4) => {
45
+ }));
46
+ } }), (e3, a3) => (r(), d("div", G, [b(e3.$slots, "default")]));
47
+ } }), E = l(j), I = l(P);
48
+ export {
49
+ E as P,
50
+ I as a
51
+ };
@@ -1,6 +1,6 @@
1
- import { c as e, r as o, _ as a, w as l } from "./utils-bsCscZfS.js";
1
+ import { c as e, r as o, _ as a, w as l } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as t, ref as s, computed as n, watchEffect as c, watch as i, provide as r, createElementBlock as d, openBlock as p, normalizeStyle as u, normalizeClass as m, renderSlot as v, inject as h, createElementVNode as f, createVNode as g, unref as b, createBlock as x, createCommentVNode as _, createTextVNode as w, toDisplayString as y, Transition as C, mergeProps as I, toHandlers as P, withCtx as $, withDirectives as k, vShow as B } from "vue";
3
- import { P as O } from "./Icon-DpJyuj7c.js";
3
+ import { P as O } from "./Icon-D6qRB3pq.js";
4
4
  const V = Symbol("collapseContext"), A = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), j = { default: { "border-color": "color", "shadow-color": "dark", "active-bg-color": "light" }, ghost: { "border-color": "transparent", "shadow-color": "transparent", "active-bg-color": "transparent" } }, E = a(t({ name: "PxCollapse", __name: "Collapse", props: { modelValue: {}, accordion: { type: Boolean }, color: {}, ghost: { type: Boolean }, trigger: {}, iconPlacement: {} }, emits: ["update:modelValue", "change"], setup(a2, { emit: l2 }) {
5
5
  const t2 = a2, h2 = l2, f2 = s(t2.modelValue);
6
6
  t2.accordion && f2.value.length > 1 && (f2.value = [f2.value[0]]);
@@ -20,7 +20,7 @@ const V = Symbol("collapseContext"), A = /* @__PURE__ */ new Set(["primary", "su
20
20
  const a3 = o2.indexOf(e2);
21
21
  a3 > -1 ? o2.splice(a3, 1) : o2.push(e2), _2(o2);
22
22
  }, color: t2.color, ghost: t2.ghost, trigger: t2.trigger, iconPlacement: t2.iconPlacement }), (e2, o2) => (p(), d("div", { class: m(["px-collapse", { "is-ghost": e2.ghost, [`px-collapse--${e2.color}`]: g2.value }]), style: u(x2.value) }, [v(e2.$slots, "default", {}, void 0, true)], 6));
23
- } }), [["__scopeId", "data-v-dc792000"]]), F = (e2) => e2.style.height = "0px", L = (e2) => e2.style.height = `${e2.scrollHeight}px`, N = (e2) => e2.style.height = "", S = (e2) => e2.style.overflow = "hidden", H = (e2) => e2.style.overflow = "", q = { beforeEnter(e2) {
23
+ } }), [["__scopeId", "data-v-7f3e3aa8"]]), F = (e2) => e2.style.height = "0px", L = (e2) => e2.style.height = `${e2.scrollHeight}px`, N = (e2) => e2.style.height = "", S = (e2) => e2.style.overflow = "hidden", H = (e2) => e2.style.overflow = "", q = { beforeEnter(e2) {
24
24
  F(e2), S(e2);
25
25
  }, enter: (e2) => L(e2), afterEnter(e2) {
26
26
  N(e2), H(e2);
@@ -46,7 +46,7 @@ const V = Symbol("collapseContext"), A = /* @__PURE__ */ new Set(["primary", "su
46
46
  var _a;
47
47
  return p(), d("div", { class: m(["px-collapse-item", { "is-disabled": e3.disabled }]) }, [f("div", { class: m(["px-collapse-item__header", { "is-disabled": e3.disabled, "is-active": l2.value, "is-hidden-arrow": false === e3.showArrow, "is-icon-start": "start" === ((_a = b(a2)) == null ? void 0 : _a.iconPlacement) }]), id: `item-header-${e3.name}`, role: "button", "aria-expanded": l2.value, "aria-controls": `item-content-${e3.name}`, tabindex: t2.value ? 0 : void 0, onClick: c2, onFocus: i2, onFocusout: r2 }, [f("span", D, [v(e3.$slots, "title", {}, (() => [w(y(e3.title), 1)]), true)]), false !== e3.showArrow ? (p(), x(O, { key: 0, icon: s2.value, class: m(["header-angle", { "is-toggle-icon": !!e3.icon }]) }, null, 8, ["icon", "class"])) : _("", true)], 42, z), g(C, I({ name: "slide" }, P(b(q))), { default: $((() => [k(f("div", G, [f("div", { class: "px-collapse-item__content", id: `item-content-${e3.name}` }, [v(e3.$slots, "default", {}, void 0, true)], 8, J)], 512), [[B, l2.value]])])), _: 3 }, 16)], 2);
48
48
  };
49
- } }), [["__scopeId", "data-v-47d8126b"]]), M = l(E), Q = l(K);
49
+ } }), [["__scopeId", "data-v-f3406cbb"]]), M = l(E), Q = l(K);
50
50
  export {
51
51
  M as P,
52
52
  Q as a
@@ -1,6 +1,6 @@
1
- import { w as e } from "./utils-bsCscZfS.js";
1
+ import { w as e } from "./utils-BXICIEsD.js";
2
2
  import { ref as o, getCurrentInstance as n, unref as t, watch as a, provide as l, inject as s, computed as r, defineComponent as c, renderSlot as u } from "vue";
3
- import { n as i, m as d, o as p } from "./vendor-DXmGx29U.js";
3
+ import { n as i, m as d, o as p } from "./vendor-DrBJKLFW.js";
4
4
  const m = { name: "en", el: { select: { loading: "Loading", noMatch: "No matching data", noData: "No data", placeholder: "Select" }, dropdown: { toggleDropdown: "Toggle Dropdown" }, messagebox: { title: "Message", confirm: "OK", cancel: "Cancel", error: "Illegal input", close: "Close this dialog" }, popconfirm: { confirmButtonText: "Yes", cancelButtonText: "No" } } }, g = Symbol(), v = /* @__PURE__ */ new Set(["__proto__", "constructor", "prototype"]);
5
5
  function f(e2, ...o2) {
6
6
  return d(e2, ...o2, ((e3, o3, n2) => {
@@ -0,0 +1,64 @@
1
+ import { a as e, b as n, p as t, w as o } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as i, ref as a, computed as r, watch as l, onBeforeUnmount as s, createElementBlock as u, openBlock as c, normalizeStyle as v, normalizeClass as d, createElementVNode as f, renderSlot as p, createCommentVNode as w, Fragment as m, withModifiers as h } from "vue";
3
+ const g = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), y = ["src"], x = { class: "px-diff__after" }, _ = ["src"], L = ["aria-valuenow"], E = o(i({ name: "PxDiff", __name: "Diff", props: { src: {}, pixelSize: { default: 8 }, grayscale: { type: Boolean, default: false }, palette: {}, background: { default: "#FFFFFF" }, initialPosition: { default: 50 }, width: {}, height: {}, color: {} }, emits: ["change", "rendered", "error"], setup(o2, { expose: i2, emit: E2 }) {
4
+ const k = o2, b = E2, P = a(), F = a(), R = a(), S = a(false), $ = a(false), z = a(e(k.initialPosition, 0, 100)), D = r((() => {
5
+ const e2 = {};
6
+ return null != k.width && (e2.width = n(k.width) ?? ""), null != k.height && (e2.height = n(k.height) ?? ""), e2;
7
+ })), X = r((() => {
8
+ const e2 = ["px-diff"];
9
+ return k.color && g.has(k.color) && e2.push(`px-diff--${k.color}`), e2;
10
+ })), B = r((() => ({ clipPath: `inset(0 ${100 - z.value}% 0 0)` }))), C = r((() => ({ left: `${z.value}%` })));
11
+ function A() {
12
+ const e2 = F.value, n2 = R.value;
13
+ e2 && n2 && S.value && (t(e2, n2, { pixelSize: k.pixelSize, grayscale: k.grayscale, palette: k.palette, background: k.background }), b("rendered"));
14
+ }
15
+ function K() {
16
+ S.value = true, A();
17
+ }
18
+ function M(e2) {
19
+ b("error", e2);
20
+ }
21
+ l((() => [k.pixelSize, k.grayscale, k.palette, k.background]), (() => {
22
+ S.value && A();
23
+ })), l((() => k.src), (() => {
24
+ S.value = false;
25
+ }));
26
+ let j = null;
27
+ function T(n2) {
28
+ var _a;
29
+ const t2 = j ?? ((_a = P.value) == null ? void 0 : _a.getBoundingClientRect());
30
+ if (!t2) return;
31
+ const o3 = n2 - t2.left, i3 = e(o3 / t2.width * 100, 0, 100);
32
+ z.value = Math.round(i3), b("change", z.value);
33
+ }
34
+ function q(e2) {
35
+ var _a;
36
+ $.value = true, j = ((_a = P.value) == null ? void 0 : _a.getBoundingClientRect()) ?? null, T("touches" in e2 ? e2.touches[0].clientX : e2.clientX), window.addEventListener("mousemove", G), window.addEventListener("mouseup", H), window.addEventListener("touchmove", G), window.addEventListener("touchend", H);
37
+ }
38
+ function G(e2) {
39
+ $.value && T("touches" in e2 ? e2.touches[0].clientX : e2.clientX);
40
+ }
41
+ function H() {
42
+ $.value = false, j = null, window.removeEventListener("mousemove", G), window.removeEventListener("mouseup", H), window.removeEventListener("touchmove", G), window.removeEventListener("touchend", H);
43
+ }
44
+ function I(n2) {
45
+ const t2 = n2.shiftKey ? 10 : 1;
46
+ let o3 = z.value;
47
+ if ("ArrowLeft" === n2.key) o3 = e(z.value - t2, 0, 100), n2.preventDefault();
48
+ else {
49
+ if ("ArrowRight" !== n2.key) return;
50
+ o3 = e(z.value + t2, 0, 100), n2.preventDefault();
51
+ }
52
+ z.value = o3, b("change", o3);
53
+ }
54
+ return i2({ setPosition: function(n2) {
55
+ z.value = e(n2, 0, 100);
56
+ }, getPosition: function() {
57
+ return z.value;
58
+ } }), s((() => {
59
+ window.removeEventListener("mousemove", G), window.removeEventListener("mouseup", H), window.removeEventListener("touchmove", G), window.removeEventListener("touchend", H);
60
+ })), (e2, n2) => (c(), u("div", { ref_key: "containerRef", ref: P, class: d(X.value), style: v(D.value) }, [f("div", { class: "px-diff__before", style: v(B.value) }, [p(e2.$slots, "before", {}, (() => [e2.src ? (c(), u("img", { key: 0, src: e2.src, class: "px-diff__img" }, null, 8, y)) : w("", true)]))], 4), f("div", x, [p(e2.$slots, "after", {}, (() => [e2.src ? (c(), u(m, { key: 0 }, [f("canvas", { ref_key: "canvasRef", ref: F, class: "px-diff__canvas" }, null, 512), f("img", { ref_key: "originRef", ref: R, src: e2.src, style: { display: "none" }, crossorigin: "anonymous", onLoad: K, onError: M }, null, 40, _)], 64)) : w("", true)]))]), f("div", { class: "px-diff__handle", style: v(C.value), role: "separator", tabindex: "0", "aria-valuenow": z.value, "aria-valuemin": "0", "aria-valuemax": "100", "aria-label": "Comparison slider", onKeydown: I }, [f("div", { class: "px-diff__handle-grip", onMousedown: h(q, ["prevent"]), onTouchstart: h(q, ["prevent"]) }, null, 32)], 44, L)], 6));
61
+ } }));
62
+ export {
63
+ E as P
64
+ };
@@ -0,0 +1,9 @@
1
+ import { r as e, c as t, w as o } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as i, useSlots as r, computed as n, createElementBlock as a, openBlock as d, normalizeStyle as l, normalizeClass as s, createCommentVNode as c, renderSlot as p, createTextVNode as v, toDisplayString as u } from "vue";
3
+ const x = ["aria-orientation"], y = { key: 0, class: "px-divider__text" }, f = o(i({ name: "PxDivider", __name: "Divider", props: { direction: { default: "horizontal" }, contentPosition: { default: "center" }, type: {}, color: {}, borderStyle: { default: "solid" }, content: {} }, setup(o2) {
4
+ const i2 = o2, f2 = r(), m = { "line-color": "color" }, P = n((() => i2.color ? e(t(i2.color), "px-divider", m) : {})), $ = n((() => !("horizontal" !== i2.direction || !f2.default && !i2.content)));
5
+ return (e2, t2) => (d(), a("div", { class: s(["px-divider", { "is-vertical": "vertical" === e2.direction, [`px-divider--${e2.contentPosition}`]: $.value, [`px-divider--${e2.type}`]: e2.type, [`px-divider--${e2.borderStyle}`]: "solid" !== e2.borderStyle }]), style: l(P.value), role: "separator", "aria-orientation": e2.direction }, [$.value ? (d(), a("span", y, [p(e2.$slots, "default", {}, (() => [v(u(e2.content), 1)]))])) : c("", true)], 14, x));
6
+ } }));
7
+ export {
8
+ f as P
9
+ };
@@ -0,0 +1,40 @@
1
+ import { _ as e, w as l } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as a, ref as o, computed as t, watch as d, onUnmounted as s, createElementBlock as r, openBlock as i, unref as n, normalizeClass as u, createElementVNode as c, createBlock as p, renderSlot as v, Teleport as m, createCommentVNode as y, createVNode as f, normalizeStyle as w, Transition as x, withCtx as _, toDisplayString as b } from "vue";
3
+ import { u as k, a as O, b as $ } from "./hooks-pU4JmsO3.js";
4
+ const h = ["id"], V = { class: "px-drawer__content" }, B = ["aria-labelledby"], z = { key: 0, class: "px-drawer__header" }, I = ["id"], g = { class: "px-drawer__body" }, C = l(e(a({ name: "PxDrawer", __name: "Drawer", props: { modelValue: { type: Boolean }, placement: { default: "left" }, size: { default: "300px" }, showOverlay: { type: Boolean, default: true }, lockScroll: { type: Boolean, default: true }, closeOnClickOverlay: { type: Boolean, default: true }, closeOnEsc: { type: Boolean, default: true }, title: {} }, emits: ["update:modelValue", "open", "close"], setup(e2, { expose: l2, emit: a2 }) {
5
+ const C2 = e2, E = a2, j = k("px-drawer"), { nextZIndex: D } = O(), P = o(0), S = o(C2.modelValue), Z = t((() => ({ width: C2.size, zIndex: P.value })));
6
+ function q(e3) {
7
+ C2.lockScroll && (document.body.style.overflow = e3 ? "hidden" : "");
8
+ }
9
+ function A() {
10
+ P.value = D(), S.value = true, E("open"), q(true);
11
+ }
12
+ function F() {
13
+ S.value = false, q(false);
14
+ }
15
+ function G() {
16
+ A(), E("update:modelValue", true);
17
+ }
18
+ function H() {
19
+ F(), E("update:modelValue", false), E("close");
20
+ }
21
+ function J() {
22
+ C2.closeOnClickOverlay && H();
23
+ }
24
+ return d((() => C2.modelValue), ((e3) => {
25
+ e3 && !S.value ? A() : e3 && S.value ? q(true) : !e3 && S.value && F();
26
+ }), { immediate: true }), $(document, "keydown", ((e3) => {
27
+ C2.closeOnEsc && S.value && "Escape" === e3.key && H();
28
+ })), s((() => {
29
+ S.value && q(false);
30
+ })), l2({ open: () => {
31
+ S.value || G();
32
+ }, close: () => {
33
+ S.value && H();
34
+ }, toggle: () => {
35
+ S.value ? H() : G();
36
+ } }), (e3, l3) => (i(), r("div", { class: u(["px-drawer", [`px-drawer--${e3.placement}`]]), id: n(j) }, [c("div", V, [v(e3.$slots, "default", {}, void 0, true)]), (i(), p(m, { to: "body" }, [e3.showOverlay && S.value ? (i(), r("div", { key: 0, class: "px-drawer-overlay", style: w({ zIndex: P.value - 1 }), onClick: J }, null, 4)) : y("", true), f(x, { name: `px-drawer-slide-${e3.placement}` }, { default: _((() => [S.value ? (i(), r("div", { key: 0, class: u(["px-drawer__sidebar", [`px-drawer__sidebar--${e3.placement}`]]), style: w(Z.value), role: "dialog", "aria-labelledby": e3.title ? `${n(j)}-title` : void 0 }, [e3.title ? (i(), r("div", z, [c("span", { id: `${n(j)}-title`, class: "px-drawer__title" }, b(e3.title), 9, I)])) : y("", true), c("div", g, [v(e3.$slots, "sidebar", {}, void 0, true)])], 14, B)) : y("", true)])), _: 3 }, 8, ["name"])]))], 10, h));
37
+ } }), [["__scopeId", "data-v-647267d6"]]));
38
+ export {
39
+ C as P
40
+ };
@@ -0,0 +1,104 @@
1
+ import { w as e } from "./utils-BXICIEsD.js";
2
+ import { defineComponent as o, inject as t, computed as n, createElementBlock as i, openBlock as a, Fragment as l, createCommentVNode as s, createElementVNode as r, withKeys as d, normalizeClass as p, withModifiers as u, createBlock as m, renderSlot as c, createTextVNode as f, toDisplayString as v, watch as h, nextTick as y, onBeforeUnmount as w, useSlots as k, ref as b, provide as g, createVNode as x, mergeProps as _, withCtx as B, unref as C, normalizeStyle as O, renderList as D } from "vue";
3
+ import { u as z, c as H, d as R } from "./hooks-pU4JmsO3.js";
4
+ import { P as $, a as j } from "./Button-DbFviVWb.js";
5
+ import { T as A } from "./Tooltip-CdPqNYdn.js";
6
+ import { P as E } from "./Icon-D6qRB3pq.js";
7
+ import { a as I, i as T } from "./vendor-DrBJKLFW.js";
8
+ const P = Symbol("dropdownContext"), L = { key: 0, role: "separator", class: "divided-placeholder" }, K = ["id", "onKeydown"], S = o({ name: "PxDropdownItem", __name: "DropdownItem", props: { command: { default: z().value }, label: {}, disabled: { type: Boolean, default: false }, divided: { type: Boolean, default: false }, icon: {} }, setup(e2) {
9
+ const o2 = e2, h2 = t(P), y2 = n((() => h2 == null ? void 0 : h2.size.value));
10
+ function w2() {
11
+ o2.disabled || (h2 == null ? void 0 : h2.handleItemClick(o2));
12
+ }
13
+ return (e3, o3) => (a(), i(l, null, [e3.divided ? (a(), i("li", L)) : s("", true), r("li", { role: "menuitem", tabindex: "-1", id: `dropdown-item-${e3.command}`, class: p({ "px-dropdown__item": true, ["px-dropdown__item--" + y2.value]: y2.value, "is-disabled": e3.disabled, "is-divided": e3.divided }), onClick: w2, onKeydown: [d(u(w2, ["prevent"]), ["enter"]), d(u(w2, ["prevent"]), ["space"])] }, [e3.icon ? (a(), m(E, { key: 0, icon: e3.icon, class: "px-dropdown__item-icon" }, null, 8, ["icon"])) : s("", true), c(e3.$slots, "default", {}, (() => [f(v(e3.label), 1)]))], 42, K)], 64));
14
+ } });
15
+ function q(e2, o2) {
16
+ var _a;
17
+ (_a = e2[o2]) == null ? void 0 : _a.focus();
18
+ }
19
+ const U = ["aria-expanded"], V = e(o({ name: "PxDropdown", inheritAttrs: false, __name: "Dropdown", props: { type: {}, size: {}, items: { default: () => [] }, hideOnClick: { type: Boolean, default: true }, splitButton: { type: Boolean }, maxHeight: {}, hoverColor: {}, content: {}, trigger: {}, placement: {}, manual: { type: Boolean }, disabled: { type: Boolean }, popperOptions: {}, transition: {}, showTimeout: {}, hideTimeout: {}, virtualRef: {}, virtualTriggering: { type: Boolean }, effect: {}, enterable: { type: Boolean }, maxWidth: {}, showArrow: { type: Boolean } }, emits: ["visible-change", "command", "click"], setup(e2, { expose: o2, emit: t2 }) {
20
+ const s2 = e2, d2 = t2;
21
+ k();
22
+ const u2 = b(), f2 = b(), v2 = b(), z2 = b(false), E2 = n((() => {
23
+ var _a;
24
+ return { ...I(s2, ["items", "hideOnClick", "size", "type", "splitButton", "maxHeight", "hoverColor"]), popperOptions: { ...s2.popperOptions, modifiers: [{ name: "offset", options: { offset: [0, s2.showArrow ? 9 : 0] } }, ...((_a = s2.popperOptions) == null ? void 0 : _a.modifiers) ?? []] } };
25
+ })), L2 = n((() => {
26
+ const e3 = {};
27
+ if (s2.maxHeight) {
28
+ const o3 = "number" == typeof s2.maxHeight ? `${s2.maxHeight}px` : s2.maxHeight;
29
+ e3.maxHeight = o3, e3.overflowY = "auto";
30
+ }
31
+ return s2.hoverColor && (e3["--px-dropdown-menuItem-hover-fill"] = s2.hoverColor), Object.keys(e3).length ? e3 : void 0;
32
+ }));
33
+ function K2() {
34
+ var _a;
35
+ (_a = u2.value) == null ? void 0 : _a.toggle();
36
+ }
37
+ return H(f2, (() => {
38
+ var _a;
39
+ s2.splitButton && ((_a = u2.value) == null ? void 0 : _a.hide());
40
+ })), (function(e3) {
41
+ const { menuRef: o3, triggerRef: t3, isOpen: n2, close: i2 } = e3;
42
+ function a2(e4) {
43
+ const n3 = o3.value;
44
+ if (!n3) return;
45
+ const a3 = (function(e5) {
46
+ return Array.from(e5.querySelectorAll(".px-dropdown__item:not(.is-disabled)"));
47
+ })(n3);
48
+ if (!a3.length) return;
49
+ const l2 = (function(e5) {
50
+ return e5.indexOf(document.activeElement);
51
+ })(a3);
52
+ switch (e4.key) {
53
+ case "ArrowDown":
54
+ e4.preventDefault(), q(a3, -1 === l2 ? 0 : l2 < a3.length - 1 ? l2 + 1 : 0);
55
+ break;
56
+ case "ArrowUp":
57
+ e4.preventDefault(), q(a3, -1 === l2 ? a3.length - 1 : l2 > 0 ? l2 - 1 : a3.length - 1);
58
+ break;
59
+ case "Home":
60
+ e4.preventDefault(), q(a3, 0);
61
+ break;
62
+ case "End":
63
+ e4.preventDefault(), q(a3, a3.length - 1);
64
+ break;
65
+ case "Escape":
66
+ e4.preventDefault(), i2(), y((() => {
67
+ var _a;
68
+ return (_a = t3.value) == null ? void 0 : _a.focus();
69
+ }));
70
+ break;
71
+ case "Tab":
72
+ i2();
73
+ }
74
+ }
75
+ h(n2, ((e4) => {
76
+ var _a;
77
+ e4 ? y((() => {
78
+ const e5 = o3.value;
79
+ e5 && (e5.focus(), e5.addEventListener("keydown", a2));
80
+ })) : (_a = o3.value) == null ? void 0 : _a.removeEventListener("keydown", a2);
81
+ })), w((() => {
82
+ var _a;
83
+ (_a = o3.value) == null ? void 0 : _a.removeEventListener("keydown", a2);
84
+ }));
85
+ })({ menuRef: v2, triggerRef: f2, isOpen: z2, close: () => {
86
+ var _a;
87
+ return (_a = u2.value) == null ? void 0 : _a.hide();
88
+ } }), R(), g(P, { handleItemClick: function(e3) {
89
+ var _a;
90
+ s2.hideOnClick && ((_a = u2.value) == null ? void 0 : _a.hide()), !T(e3.command) && d2("command", e3.command);
91
+ }, size: n((() => s2.size)) }), o2({ open: () => {
92
+ var _a;
93
+ return (_a = u2.value) == null ? void 0 : _a.show();
94
+ }, close: () => {
95
+ var _a;
96
+ return (_a = u2.value) == null ? void 0 : _a.hide();
97
+ } }), (e3, o3) => (a(), i("div", { ref_key: "dropdownRef", ref: f2, class: p(["px-dropdown", { "is-disabled": s2.disabled }]), "aria-haspopup": "true", "aria-expanded": z2.value, tabindex: "0" }, [x(A, _({ ref_key: "tooltipRef", ref: u2 }, E2.value, { manual: e3.splitButton, onVisibleChange: o3[1] || (o3[1] = (o4) => {
98
+ z2.value = o4, e3.$emit("visible-change", o4);
99
+ }) }), { content: B((() => [r("div", { ref_key: "menuRef", ref: v2, class: "px-dropdown__menu", role: "menu", tabindex: "-1", style: O(L2.value) }, [c(e3.$slots, "dropdown", {}, (() => [(a(true), i(l, null, D(e3.items, ((e4) => (a(), m(S, _({ key: e4.command, ref_for: true }, e4), null, 16)))), 128))]))], 4)])), default: B((() => [e3.splitButton ? (a(), m(C($), { key: 0, type: e3.type, size: e3.size, disabled: e3.disabled }, { default: B((() => [x(C(j), { onClick: o3[0] || (o3[0] = (o4) => e3.$emit("click", o4)) }, { default: B((() => [c(e3.$slots, "default")])), _: 3 }), x(C(j), { icon: "chevron-down", onClick: K2 })])), _: 3 }, 8, ["type", "size", "disabled"])) : c(e3.$slots, "default", { key: 1 })])), _: 3 }, 16, ["manual"])], 10, U));
100
+ } })), W = e(S);
101
+ export {
102
+ V as P,
103
+ W as a
104
+ };
@@ -1,7 +1,7 @@
1
- import { c as e, r as l, w as o } from "./utils-bsCscZfS.js";
1
+ import { c as e, r as l, w as o } from "./utils-BXICIEsD.js";
2
2
  import { defineComponent as a, shallowRef as t, ref as r, computed as i, createElementBlock as n, openBlock as s, normalizeStyle as c, normalizeClass as u, createElementVNode as p, createBlock as d, createCommentVNode as f, renderSlot as m, createTextVNode as h, toDisplayString as v, withModifiers as g } from "vue";
3
- import { u as b } from "./Form-j90EzLXU.js";
4
- import { P as x } from "./Icon-DpJyuj7c.js";
3
+ import { u as b } from "./Form-B_XDnSjK.js";
4
+ import { P as x } from "./Icon-D6qRB3pq.js";
5
5
  const _ = /* @__PURE__ */ new Set(["primary", "success", "warning", "danger", "info"]), k = { default: { "border-color": "color", "hover-border-color": "dark", "shadow-color": "dark" }, ghost: { "border-color": "transparent", "hover-border-color": "color", "shadow-color": "transparent", "hover-shadow-color": "dark" } }, y = { class: "px-file-input__wrapper" }, w = ["disabled", "accept", "multiple", "form"], B = { class: "px-file-input__name" }, V = o(a({ name: "PxFileInput", inheritAttrs: false, __name: "FileInput", props: { modelValue: {}, id: {}, size: {}, color: {}, ghost: { type: Boolean }, disabled: { type: Boolean }, accept: {}, multiple: { type: Boolean }, placeholder: { default: "No file chosen" }, clearable: { type: Boolean }, form: {} }, emits: ["update:modelValue", "change", "clear"], setup(o2, { expose: a2, emit: V2 }) {
6
6
  const I = o2, $ = V2, j = t(), { formItem: z } = b(), C = r(null), F = i((() => _.has(I.color ?? ""))), P = i((() => !!I.color && !F.value)), A = i((() => {
7
7
  if (!P.value) return {};