@oneflowui/ui 0.5.6 → 0.5.8

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 (213) hide show
  1. package/README.md +11 -0
  2. package/dist/components/ContextMenu/index.vue.js +2 -2
  3. package/dist/components/Dashboard/charts/BarChart.vue.js +2 -2
  4. package/dist/components/Dashboard/charts/PieChart.vue.js +2 -2
  5. package/dist/components/Dashboard/index.vue.d.ts +3 -2
  6. package/dist/components/Dashboard/index.vue.js +2 -2
  7. package/dist/components/ai/AiSender.vue.js +2 -2
  8. package/dist/components/ai/AiSender.vue2.js +8 -7
  9. package/dist/components/auxiliary/ColorPanel.vue.js +2 -2
  10. package/dist/components/auxiliary/ColorPanel.vue2.js +25 -23
  11. package/dist/components/auxiliary/FileUpload.vue.js +2 -2
  12. package/dist/components/auxiliary/FileUpload.vue2.js +1 -0
  13. package/dist/components/auxiliary/PersonPanel.vue.js +1 -1
  14. package/dist/components/auxiliary/PersonPanel.vue2.js +2 -1
  15. package/dist/components/base/Accordion.vue.js +1 -1
  16. package/dist/components/base/Avatar.vue.d.ts +3 -0
  17. package/dist/components/base/Avatar.vue.js +4 -4
  18. package/dist/components/base/Avatar.vue2.js +8 -8
  19. package/dist/components/base/Badge.vue.d.ts +2 -0
  20. package/dist/components/base/Badge.vue.js +2 -2
  21. package/dist/components/base/Badge.vue2.js +2 -2
  22. package/dist/components/base/ButtonGroup.vue.js +2 -2
  23. package/dist/components/base/ButtonGroup.vue2.js +2 -2
  24. package/dist/components/base/ChainItem.vue.d.ts +6 -0
  25. package/dist/components/base/ChainItem.vue.js +2 -2
  26. package/dist/components/base/ChainItem.vue2.js +17 -17
  27. package/dist/components/base/DropdownMenu.vue.js +2 -2
  28. package/dist/components/base/DropdownMenu.vue2.js +22 -20
  29. package/dist/components/base/EmptyState.vue.js +2 -2
  30. package/dist/components/base/EmptyState.vue2.js +2 -2
  31. package/dist/components/base/InfoCard.vue.d.ts +9 -0
  32. package/dist/components/base/InfoCard.vue.js +2 -2
  33. package/dist/components/base/InfoCard.vue2.js +65 -57
  34. package/dist/components/base/MonitorItem.vue.js +2 -2
  35. package/dist/components/base/MonitorItem.vue2.js +33 -25
  36. package/dist/components/base/PersonaCard.vue.d.ts +5 -0
  37. package/dist/components/base/PersonaCard.vue.js +3 -3
  38. package/dist/components/base/PersonaCard.vue2.js +56 -50
  39. package/dist/components/base/ProgressBar.vue.d.ts +1 -0
  40. package/dist/components/base/ProgressBar.vue.js +2 -2
  41. package/dist/components/base/ProgressBar.vue2.js +10 -10
  42. package/dist/components/base/RangeSlider.vue.d.ts +15 -0
  43. package/dist/components/base/RangeSlider.vue.js +1 -1
  44. package/dist/components/base/RangeSlider.vue2.js +22 -15
  45. package/dist/components/base/RefTag.vue.d.ts +4 -0
  46. package/dist/components/base/RefTag.vue.js +3 -3
  47. package/dist/components/base/RefTag.vue2.js +14 -14
  48. package/dist/components/base/SearchHighlight.vue.js +1 -1
  49. package/dist/components/base/SectionBlock.vue.js +2 -2
  50. package/dist/components/base/SectionBlock.vue2.js +54 -48
  51. package/dist/components/base/SelectBadge.vue.d.ts +5 -0
  52. package/dist/components/base/SelectBadge.vue.js +3 -3
  53. package/dist/components/base/SelectBadge.vue2.js +36 -28
  54. package/dist/components/base/StatisticCard.vue.js +1 -1
  55. package/dist/components/base/StatusIndicator.vue.js +2 -2
  56. package/dist/components/base/StatusIndicator.vue2.js +2 -2
  57. package/dist/components/base/StatusSummary.vue.js +2 -2
  58. package/dist/components/base/Stepper.vue.js +2 -2
  59. package/dist/components/base/Switch.vue.js +2 -2
  60. package/dist/components/base/ToolbarBtn.vue.js +2 -2
  61. package/dist/components/base/ViewModeGroup.vue.js +1 -1
  62. package/dist/components/base/ViewModeGroup.vue2.js +3 -3
  63. package/dist/components/base/ViewSwitcher.vue.js +1 -1
  64. package/dist/components/base/ViewSwitcher.vue2.js +3 -3
  65. package/dist/components/base/ViewTab.vue.js +1 -1
  66. package/dist/components/base/ViewTab.vue2.js +5 -6
  67. package/dist/components/breadcrumb/Breadcrumb.vue.js +2 -2
  68. package/dist/components/breadcrumb/BreadcrumbItem.vue.js +2 -2
  69. package/dist/components/database/DatabaseView.vue.d.ts +6 -1
  70. package/dist/components/database/DatabaseView.vue.js +2 -2
  71. package/dist/components/database/DatabaseView.vue2.js +438 -293
  72. package/dist/components/detail/PropPanel.vue.js +2 -2
  73. package/dist/components/detail/PropPanel.vue2.js +34 -30
  74. package/dist/components/detail/PropRow.vue.d.ts +6 -0
  75. package/dist/components/detail/PropRow.vue.js +2 -2
  76. package/dist/components/detail/PropRow.vue2.js +24 -24
  77. package/dist/components/editor/BlockQuote.vue.d.ts +2 -1
  78. package/dist/components/editor/BlockQuote.vue.js +1 -1
  79. package/dist/components/editor/BlockQuote.vue2.js +43 -29
  80. package/dist/components/editor/ContentBlock.vue.d.ts +4 -2
  81. package/dist/components/editor/ContentBlock.vue.js +2 -2
  82. package/dist/components/editor/ContentBlock.vue2.js +54 -33
  83. package/dist/components/editor/RichTextEditor.vue.js +2 -2
  84. package/dist/components/editor/RichTextEditor.vue2.js +10 -14
  85. package/dist/components/field/FieldAttachment.vue.js +2 -2
  86. package/dist/components/field/FieldAttachment.vue2.js +30 -32
  87. package/dist/components/field/FieldAutoNumber.vue.js +2 -2
  88. package/dist/components/field/FieldCheckbox.vue.js +2 -2
  89. package/dist/components/field/FieldCheckbox.vue2.js +13 -11
  90. package/dist/components/field/FieldCreator.vue.js +2 -2
  91. package/dist/components/field/FieldCurrency.vue.js +2 -2
  92. package/dist/components/field/FieldCurrency.vue2.js +15 -14
  93. package/dist/components/field/FieldDate.vue.js +1 -1
  94. package/dist/components/field/FieldDate.vue2.js +14 -16
  95. package/dist/components/field/FieldDatetime.vue.js +1 -1
  96. package/dist/components/field/FieldDatetime.vue2.js +12 -11
  97. package/dist/components/field/FieldEmail.vue.js +2 -2
  98. package/dist/components/field/FieldEmail.vue2.js +14 -13
  99. package/dist/components/field/FieldMarkdownPreview.vue.js +2 -2
  100. package/dist/components/field/FieldMultiSelect.vue.d.ts +2 -2
  101. package/dist/components/field/FieldMultiSelect.vue.js +2 -2
  102. package/dist/components/field/FieldMultiSelect.vue2.js +80 -75
  103. package/dist/components/field/FieldNumber.vue.js +3 -3
  104. package/dist/components/field/FieldNumber.vue2.js +19 -18
  105. package/dist/components/field/FieldPhone.vue.js +2 -2
  106. package/dist/components/field/FieldPhone.vue2.js +12 -11
  107. package/dist/components/field/FieldProgress.vue.js +1 -1
  108. package/dist/components/field/FieldProgress.vue2.js +18 -17
  109. package/dist/components/field/FieldRating.vue.js +2 -2
  110. package/dist/components/field/FieldRating.vue2.js +22 -16
  111. package/dist/components/field/FieldRelation.vue.js +1 -1
  112. package/dist/components/field/FieldRelation.vue2.js +25 -22
  113. package/dist/components/field/FieldRichText.vue.js +1 -1
  114. package/dist/components/field/FieldRichText.vue2.js +10 -7
  115. package/dist/components/field/FieldSelect.vue.js +2 -2
  116. package/dist/components/field/FieldSelect.vue2.js +81 -63
  117. package/dist/components/field/FieldText.vue.js +2 -2
  118. package/dist/components/field/FieldText.vue2.js +17 -16
  119. package/dist/components/field/FieldUrl.vue.js +2 -2
  120. package/dist/components/field/FieldUrl.vue2.js +17 -16
  121. package/dist/components/form/FormDesigner.vue.js +2 -2
  122. package/dist/components/form/FormDesigner.vue2.js +83 -78
  123. package/dist/components/gallery/GalleryCard.vue.d.ts +1 -1
  124. package/dist/components/gallery/GalleryCard.vue.js +2 -2
  125. package/dist/components/gallery/GalleryCard.vue2.js +2 -1
  126. package/dist/components/kanban/KanbanCard.vue.d.ts +3 -1
  127. package/dist/components/kanban/KanbanCard.vue.js +1 -1
  128. package/dist/components/kanban/KanbanCard.vue2.js +15 -14
  129. package/dist/components/kanban/KanbanColumn.vue.d.ts +2 -0
  130. package/dist/components/kanban/KanbanColumn.vue.js +2 -2
  131. package/dist/components/kanban/KanbanColumn.vue2.js +9 -9
  132. package/dist/components/kanban/QuickAddRow.vue.js +2 -2
  133. package/dist/components/kanban/QuickAddRow.vue2.js +15 -14
  134. package/dist/components/layout/Navbar.vue.js +3 -3
  135. package/dist/components/layout/Navbar.vue2.js +5 -4
  136. package/dist/components/layout/Sidebar.vue.js +2 -2
  137. package/dist/components/layout/Sidebar.vue2.js +1 -1
  138. package/dist/components/mermaid/MermaidChart.vue.js +2 -2
  139. package/dist/components/mermaid/MermaidChart.vue2.js +17 -17
  140. package/dist/components/overlay/Dialog.vue.d.ts +1 -0
  141. package/dist/components/overlay/Dialog.vue.js +1 -1
  142. package/dist/components/overlay/Dialog.vue2.js +9 -9
  143. package/dist/components/overlay/Drawer.vue.d.ts +2 -1
  144. package/dist/components/overlay/Drawer.vue.js +2 -2
  145. package/dist/components/overlay/Drawer.vue2.js +35 -29
  146. package/dist/components/overlay/Modal.vue.d.ts +2 -1
  147. package/dist/components/overlay/Modal.vue.js +1 -1
  148. package/dist/components/overlay/Modal.vue2.js +34 -28
  149. package/dist/components/overlay/SidePanel.vue.d.ts +1 -0
  150. package/dist/components/overlay/SidePanel.vue.js +1 -1
  151. package/dist/components/overlay/SidePanel.vue2.js +6 -6
  152. package/dist/components/split/SplitPane.vue.js +2 -2
  153. package/dist/components/split/SplitPane.vue2.js +11 -9
  154. package/dist/components/table/ColumnHeaderMenu.vue.d.ts +4 -2
  155. package/dist/components/table/ColumnHeaderMenu.vue.js +1 -1
  156. package/dist/components/table/ColumnHeaderMenu.vue2.js +42 -36
  157. package/dist/components/table/DataTable.vue.d.ts +9 -6
  158. package/dist/components/table/DataTable.vue.js +2 -2
  159. package/dist/components/table/DataTable.vue2.js +643 -521
  160. package/dist/components/table/DetailSheet.vue.d.ts +2 -0
  161. package/dist/components/table/DetailSheet.vue.js +2 -2
  162. package/dist/components/table/DetailSheet.vue2.js +154 -70
  163. package/dist/components/table/FieldCell.vue.d.ts +2 -1
  164. package/dist/components/table/FieldCell.vue.js +1 -1
  165. package/dist/components/table/FieldCell.vue2.js +57 -48
  166. package/dist/components/table/FieldTypePicker.vue.d.ts +1 -0
  167. package/dist/components/table/FieldTypePicker.vue.js +4 -4
  168. package/dist/components/table/FieldTypePicker.vue2.js +1 -1
  169. package/dist/components/table/MobileListView.vue.d.ts +3 -2
  170. package/dist/components/table/MobileListView.vue.js +2 -2
  171. package/dist/components/table/MobileListView.vue2.js +57 -50
  172. package/dist/components/table/TableColumnManager.vue.js +1 -1
  173. package/dist/components/table/TableColumnManager.vue2.js +29 -28
  174. package/dist/components/table/TableDataRow.vue.d.ts +5 -1
  175. package/dist/components/table/TableDataRow.vue.js +3 -3
  176. package/dist/components/table/TableDataRow.vue2.js +102 -63
  177. package/dist/components/table/TableFilterPanel.vue.js +2 -2
  178. package/dist/components/table/TableFilterPanel.vue2.js +3 -0
  179. package/dist/components/table/TableGroupRow.vue.d.ts +2 -0
  180. package/dist/components/table/TableGroupRow.vue.js +2 -2
  181. package/dist/components/table/TableGroupRow.vue2.js +35 -30
  182. package/dist/components/table/TableHeaderRow.vue.d.ts +3 -1
  183. package/dist/components/table/TableHeaderRow.vue.js +1 -1
  184. package/dist/components/table/TableHeaderRow.vue2.js +111 -58
  185. package/dist/components/table/TableToolbar.vue.js +1 -1
  186. package/dist/components/table/TableToolbar.vue2.js +2 -2
  187. package/dist/components/tabs/TabPanel.vue.js +4 -4
  188. package/dist/components/tabs/TabPanel.vue2.js +1 -1
  189. package/dist/components/tabs/Tabs.vue.js +2 -2
  190. package/dist/components/tabs/Tabs.vue2.js +2 -2
  191. package/dist/components/timeline/GanttRow.vue.d.ts +2 -0
  192. package/dist/components/timeline/GanttRow.vue.js +2 -2
  193. package/dist/components/timeline/GanttRow.vue2.js +68 -52
  194. package/dist/components/timeline/GanttTimeline.vue.d.ts +6 -0
  195. package/dist/components/timeline/GanttTimeline.vue.js +2 -2
  196. package/dist/components/timeline/GanttTimeline.vue2.js +24 -24
  197. package/dist/composables/useColumnResize.d.ts +4 -1
  198. package/dist/composables/useColumnResize.js +114 -45
  199. package/dist/composables/useKeyboardNavigation.d.ts +1 -1
  200. package/dist/composables/useRowDrag.d.ts +7 -5
  201. package/dist/composables/useRowDrag.js +24 -24
  202. package/dist/composables/useSupabaseProvider.d.ts +8 -1
  203. package/dist/composables/useTableData.d.ts +5 -3
  204. package/dist/composables/useTableGroup.d.ts +2 -2
  205. package/dist/composables/useViewPersistence.d.ts +32 -3
  206. package/dist/composables/useVirtualList.d.ts +1 -0
  207. package/dist/composables/useVirtualList.js +94 -81
  208. package/dist/plugin.js +103 -102
  209. package/dist/style.css +1 -1
  210. package/dist/types/index.d.ts +2 -1
  211. package/dist/utils/echarts.d.ts +1 -0
  212. package/dist/utils/supabaseSchema.d.ts +12 -0
  213. package/package.json +1 -1
@@ -1,9 +1,9 @@
1
- import { defineComponent as w, computed as r, openBlock as t, createElementBlock as n, mergeProps as A, createElementVNode as c, normalizeStyle as f, createBlock as E, resolveDynamicComponent as F, Fragment as y, createTextVNode as N, toDisplayString as l, renderSlot as b, createCommentVNode as i, renderList as T } from "vue";
1
+ import { defineComponent as P, computed as r, openBlock as t, createElementBlock as n, mergeProps as A, createElementVNode as c, normalizeStyle as g, createBlock as F, resolveDynamicComponent as D, Fragment as _, createTextVNode as N, toDisplayString as l, renderSlot as v, createCommentVNode as i, renderList as T } from "vue";
2
2
  import { resolveIcon as V } from "../../utils/icon.js";
3
- const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__name-row" }, L = {
3
+ const H = { class: "of-persona-card__body" }, I = { class: "of-persona-card__name-row" }, K = {
4
4
  key: 0,
5
5
  class: "of-persona-card__title-badge"
6
- }, H = {
6
+ }, L = {
7
7
  key: 1,
8
8
  class: "of-persona-card__tags"
9
9
  }, M = { class: "of-persona-card__right" }, j = {
@@ -12,17 +12,17 @@ const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__nam
12
12
  }, q = { class: "of-persona-card__chevron" }, G = {
13
13
  key: 0,
14
14
  class: "of-persona-card__detail"
15
- }, O = /* @__PURE__ */ w({
15
+ }, Q = /* @__PURE__ */ P({
16
16
  name: "PersonaCard",
17
17
  inheritAttrs: !1,
18
18
  __name: "PersonaCard",
19
19
  props: {
20
20
  name: {},
21
- title: {},
22
- icon: {},
23
- color: {},
24
- subtitle: {},
25
- tags: {},
21
+ title: { default: void 0 },
22
+ icon: { default: void 0 },
23
+ color: { default: void 0 },
24
+ subtitle: { default: void 0 },
25
+ tags: { default: void 0 },
26
26
  expanded: { type: Boolean, default: !1 },
27
27
  active: { type: Boolean, default: !1 },
28
28
  done: { type: Boolean, default: !1 },
@@ -30,8 +30,8 @@ const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__nam
30
30
  size: { default: "md" }
31
31
  },
32
32
  emits: ["update:expanded", "click"],
33
- setup(o, { emit: _ }) {
34
- const e = o, v = _, u = [
33
+ setup(o, { emit: k }) {
34
+ const e = o, u = k, b = [
35
35
  {
36
36
  accent: "var(--of-color-warning)",
37
37
  bg: "var(--of-color-warning-light)",
@@ -81,13 +81,13 @@ const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__nam
81
81
  tagBg: "var(--of-badge-green-bg)"
82
82
  }
83
83
  ];
84
- function B(a) {
85
- let s = 0;
86
- for (let d = 0; d < a.length; d++)
87
- s = (s << 5) - s + a.charCodeAt(d), s |= 0;
88
- return Math.abs(s);
84
+ function x(a) {
85
+ let d = 0;
86
+ for (let s = 0; s < a.length; s++)
87
+ d = (d << 5) - d + a.charCodeAt(s), d |= 0;
88
+ return Math.abs(d);
89
89
  }
90
- const g = r(() => {
90
+ const f = r(() => {
91
91
  if (e.color) {
92
92
  const a = e.color.replace("#", "");
93
93
  return {
@@ -97,16 +97,16 @@ const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__nam
97
97
  tagBg: `#${a}1a`
98
98
  };
99
99
  }
100
- return u[B(e.name) % u.length];
101
- }), p = r(() => e.size === "sm" ? 24 : 32), m = r(() => e.size === "sm" ? 12 : 16), k = r(() => e.size === "sm" ? 12 : 13), x = r(() => e.size === "sm" ? 11 : 12), h = r(() => {
100
+ return b[x(e.name) % b.length];
101
+ }), p = r(() => e.size === "sm" ? 24 : 32), m = r(() => e.size === "sm" ? 12 : 16), B = r(() => e.size === "sm" ? 12 : 13), z = r(() => e.size === "sm" ? 11 : 12), h = r(() => {
102
102
  if (e.icon)
103
103
  return V(e.icon);
104
- }), z = r(() => {
104
+ }), S = r(() => {
105
105
  if (e.icon && typeof e.icon == "string") return e.icon;
106
106
  if (e.icon) return "";
107
107
  const a = e.name.trim();
108
108
  return a ? a.charAt(0) : "?";
109
- }), S = r(() => [
109
+ }), $ = r(() => [
110
110
  "of-persona-card",
111
111
  `of-persona-card--${e.size}`,
112
112
  {
@@ -115,71 +115,77 @@ const D = { class: "of-persona-card__body" }, I = { class: "of-persona-card__nam
115
115
  "of-persona-card--disabled": e.disabled,
116
116
  "of-persona-card--expanded": e.expanded
117
117
  }
118
- ]), $ = r(() => ({
119
- "--pc-accent": g.value.accent,
120
- "--pc-accent-bg": g.value.bg,
121
- "--pc-accent-border": g.value.border,
122
- "--pc-accent-tag-bg": g.value.tagBg
123
- })), C = r(() => ({
118
+ ]), C = r(() => ({
119
+ "--pc-accent": f.value.accent,
120
+ "--pc-accent-bg": f.value.bg,
121
+ "--pc-accent-border": f.value.border,
122
+ "--pc-accent-tag-bg": f.value.tagBg
123
+ })), w = r(() => ({
124
124
  width: `${p.value}px`,
125
125
  height: `${p.value}px`,
126
126
  fontSize: `${m.value}px`
127
127
  }));
128
- function P() {
129
- e.disabled || (v("update:expanded", !e.expanded), v("click"));
128
+ function y() {
129
+ e.disabled || (u("update:expanded", !e.expanded), u("click"));
130
130
  }
131
- return (a, s) => (t(), n("div", A({
132
- class: S.value,
133
- style: $.value
131
+ function E(a) {
132
+ a.key !== "Enter" && a.key !== " " || (a.preventDefault(), y());
133
+ }
134
+ return (a, d) => (t(), n("div", A({
135
+ class: $.value,
136
+ style: C.value
134
137
  }, a.$attrs), [
135
138
  c("div", {
136
139
  class: "of-persona-card__header",
137
- onClick: P
140
+ role: "button",
141
+ tabindex: "0",
142
+ onClick: y,
143
+ onKeydown: E
138
144
  }, [
139
145
  c("span", {
140
146
  class: "of-persona-card__avatar",
141
- style: f(C.value)
147
+ style: g(w.value)
142
148
  }, [
143
- h.value ? (t(), E(F(h.value), {
149
+ h.value ? (t(), F(D(h.value), {
144
150
  key: 0,
145
151
  size: m.value
146
- }, null, 8, ["size"])) : (t(), n(y, { key: 1 }, [
147
- N(l(z.value), 1)
152
+ }, null, 8, ["size"])) : (t(), n(_, { key: 1 }, [
153
+ N(l(S.value), 1)
148
154
  ], 64))
149
155
  ], 4),
150
- c("div", D, [
156
+ c("div", H, [
151
157
  c("div", I, [
152
158
  c("span", {
153
159
  class: "of-persona-card__name",
154
- style: f({ fontSize: `${k.value}px` })
160
+ style: g({ fontSize: `${B.value}px` })
155
161
  }, l(o.name), 5),
156
- b(a.$slots, "badge", {}, void 0, !0),
157
- o.title ? (t(), n("span", L, l(o.title), 1)) : i("", !0)
162
+ v(a.$slots, "badge", {}, void 0, !0),
163
+ o.title ? (t(), n("span", K, l(o.title), 1)) : i("", !0)
158
164
  ]),
159
165
  o.subtitle ? (t(), n("span", {
160
166
  key: 0,
161
167
  class: "of-persona-card__subtitle",
162
- style: f({ fontSize: `${x.value}px` })
168
+ style: g({ fontSize: `${z.value}px` })
163
169
  }, l(o.subtitle), 5)) : i("", !0),
164
- o.tags && o.tags.length > 0 ? (t(), n("div", H, [
165
- (t(!0), n(y, null, T(o.tags, (d) => (t(), n("span", {
166
- key: d,
170
+ o.tags && o.tags.length > 0 ? (t(), n("div", L, [
171
+ (t(!0), n(_, null, T(o.tags, (s) => (t(), n("span", {
172
+ key: s,
167
173
  class: "of-persona-card__tag"
168
- }, l(d), 1))), 128))
174
+ }, l(s), 1))), 128))
169
175
  ])) : i("", !0)
170
176
  ]),
171
177
  c("div", M, [
172
- b(a.$slots, "actions", {}, void 0, !0),
178
+ v(a.$slots, "actions", {}, void 0, !0),
173
179
  o.done ? (t(), n("span", j, "✓")) : i("", !0),
174
180
  c("span", q, l(o.expanded ? "▲" : "▼"), 1)
175
181
  ])
176
- ]),
182
+ ], 32),
177
183
  o.expanded ? (t(), n("div", G, [
178
- b(a.$slots, "default", {}, void 0, !0)
184
+ v(a.$slots, "default", {}, void 0, !0)
179
185
  ])) : i("", !0)
180
186
  ], 16));
181
187
  }
182
188
  });
183
189
  export {
184
- O as default
190
+ Q as default
185
191
  };
@@ -19,6 +19,7 @@ declare function __VLS_template(): {
19
19
  };
20
20
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
21
21
  declare const __VLS_component: import('vue').DefineComponent<ProgressBarProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<ProgressBarProps> & Readonly<{}>, {
22
+ color: string;
22
23
  height: number;
23
24
  bgColor: string;
24
25
  showLabel: boolean;
@@ -1,7 +1,7 @@
1
1
  import o from "./ProgressBar.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const e = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1aeb6aa3"]]);
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-893c13d7"]]);
5
5
  export {
6
- e as default
6
+ m as default
7
7
  };
@@ -1,4 +1,4 @@
1
- import { defineComponent as p, computed as r, openBlock as t, createElementBlock as c, mergeProps as f, createElementVNode as a, normalizeStyle as d, normalizeClass as b, renderSlot as v, toDisplayString as m, createCommentVNode as _ } from "vue";
1
+ import { defineComponent as p, computed as r, openBlock as t, createElementBlock as d, mergeProps as f, createElementVNode as a, normalizeStyle as c, normalizeClass as v, renderSlot as b, toDisplayString as m, createCommentVNode as _ } from "vue";
2
2
  const g = {
3
3
  key: 0,
4
4
  class: "of-progress-bar__label"
@@ -8,7 +8,7 @@ const g = {
8
8
  props: {
9
9
  value: {},
10
10
  height: { default: 4 },
11
- color: {},
11
+ color: { default: void 0 },
12
12
  bgColor: { default: "var(--of-color-gray-100)" },
13
13
  showLabel: { type: Boolean, default: !1 },
14
14
  borderRadius: { default: 2 }
@@ -16,28 +16,28 @@ const g = {
16
16
  setup(s) {
17
17
  const e = s, o = r(() => Math.min(100, Math.max(0, e.value))), u = r(
18
18
  () => o.value === 100 ? "var(--of-color-success)" : e.color ?? "var(--of-color-primary-500)"
19
- ), n = r(() => ({
19
+ ), i = r(() => ({
20
20
  height: `${e.height}px`,
21
21
  backgroundColor: e.bgColor,
22
22
  borderRadius: `${e.borderRadius}px`
23
- })), i = r(() => ({
23
+ })), n = r(() => ({
24
24
  width: `${o.value}%`,
25
25
  background: u.value,
26
26
  borderRadius: `${e.borderRadius}px`
27
27
  }));
28
- return (l, k) => (t(), c("div", f({ class: "of-progress-bar" }, l.$attrs), [
28
+ return (l, k) => (t(), d("div", f({ class: "of-progress-bar" }, l.$attrs), [
29
29
  a("div", {
30
30
  class: "of-progress-bar__track pb",
31
- style: d(n.value)
31
+ style: c(i.value)
32
32
  }, [
33
33
  a("div", {
34
- class: b(["of-progress-bar__fill pf", { dn: o.value === 100 }]),
35
- style: d(i.value)
34
+ class: v(["of-progress-bar__fill pf", { dn: o.value === 100 }]),
35
+ style: c(n.value)
36
36
  }, null, 6)
37
37
  ], 4),
38
- s.showLabel ? (t(), c("div", g, [
38
+ s.showLabel ? (t(), d("div", g, [
39
39
  a("div", h, [
40
- v(l.$slots, "default", {}, void 0, !0)
40
+ b(l.$slots, "default", {}, void 0, !0)
41
41
  ]),
42
42
  a("span", y, m(o.value) + "%", 1)
43
43
  ])) : _("", !0)
@@ -1,3 +1,18 @@
1
+ /**
2
+ * RangeSlider 组件 - 范围滑块输入
3
+ *
4
+ * 用于快速创建 label + range input + description 三件套
5
+ *
6
+ * @example
7
+ * <RangeSlider
8
+ * label="最大长度"
9
+ * v-model="maxLength"
10
+ * :min="100"
11
+ * :max="2000"
12
+ * :step="100"
13
+ * description="调整文本长度限制"
14
+ * />
15
+ */
1
16
  type __VLS_Props = {
2
17
  label: string;
3
18
  modelValue: number;
@@ -1,7 +1,7 @@
1
1
  import o from "./RangeSlider.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-df75159c"]]);
4
+ const f = /* @__PURE__ */ r(o, [["__scopeId", "data-v-77f7d546"]]);
5
5
  export {
6
6
  f as default
7
7
  };
@@ -1,8 +1,8 @@
1
- import { defineComponent as r, openBlock as l, createElementBlock as n, mergeProps as m, createElementVNode as i, toDisplayString as s, createCommentVNode as d } from "vue";
2
- const u = { class: "of-range-slider__label" }, c = ["value", "min", "max", "step"], p = {
1
+ import { defineComponent as d, openBlock as i, createElementBlock as r, mergeProps as m, createElementVNode as t, toDisplayString as s, createCommentVNode as u } from "vue";
2
+ const c = ["value", "min", "max", "step"], p = {
3
3
  key: 0,
4
4
  class: "of-range-slider__description"
5
- }, g = /* @__PURE__ */ r({
5
+ }, g = /* @__PURE__ */ d({
6
6
  inheritAttrs: !1,
7
7
  __name: "RangeSlider",
8
8
  props: {
@@ -15,18 +15,25 @@ const u = { class: "of-range-slider__label" }, c = ["value", "min", "max", "step
15
15
  },
16
16
  emits: ["update:modelValue"],
17
17
  setup(e) {
18
- return (t, a) => (l(), n("div", m({ class: "of-range-slider" }, t.$attrs), [
19
- i("label", u, s(e.label), 1),
20
- i("input", {
21
- value: e.modelValue,
22
- onInput: a[0] || (a[0] = (o) => t.$emit("update:modelValue", Number(o.target.value))),
23
- type: "range",
24
- min: e.min,
25
- max: e.max,
26
- step: e.step ?? 1,
27
- class: "of-range-slider__input"
28
- }, null, 40, c),
29
- e.description ? (l(), n("p", p, s(e.description), 1)) : d("", !0)
18
+ const l = `of-range-slider-${Math.random().toString(36).slice(2, 10)}`;
19
+ return (a, n) => (i(), r("div", m({ class: "of-range-slider" }, a.$attrs), [
20
+ t("label", {
21
+ class: "of-range-slider__label",
22
+ for: l
23
+ }, [
24
+ t("span", null, s(e.label), 1),
25
+ t("input", {
26
+ id: l,
27
+ value: e.modelValue,
28
+ type: "range",
29
+ min: e.min,
30
+ max: e.max,
31
+ step: e.step ?? 1,
32
+ class: "of-range-slider__input",
33
+ onInput: n[0] || (n[0] = (o) => a.$emit("update:modelValue", Number(o.target.value)))
34
+ }, null, 40, c)
35
+ ]),
36
+ e.description ? (i(), r("p", p, s(e.description), 1)) : u("", !0)
30
37
  ], 16));
31
38
  }
32
39
  });
@@ -18,7 +18,11 @@ declare function __VLS_template(): {
18
18
  };
19
19
  type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
20
20
  declare const __VLS_component: import('vue').DefineComponent<RefTagProps, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<RefTagProps> & Readonly<{}>, {
21
+ color: string;
21
22
  type: "spec" | "wiki" | "task" | string;
23
+ href: string;
24
+ icon: string | Component;
25
+ bg: string;
22
26
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
23
27
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;
24
28
  export default _default;
@@ -1,7 +1,7 @@
1
1
  import o from "./RefTag.vue2.js";
2
2
  /* empty css */
3
- import a from "../../_virtual/_plugin-vue_export-helper.js";
4
- const f = /* @__PURE__ */ a(o, [["__scopeId", "data-v-69a5acde"]]);
3
+ import f from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ f(o, [["__scopeId", "data-v-fbd2cfa1"]]);
5
5
  export {
6
- f as default
6
+ m as default
7
7
  };
@@ -1,18 +1,18 @@
1
- import { defineComponent as g, computed as n, openBlock as l, createBlock as s, resolveDynamicComponent as f, mergeProps as m, withCtx as p, createCommentVNode as u, createElementVNode as v, renderSlot as d } from "vue";
1
+ import { defineComponent as d, computed as n, openBlock as c, createBlock as f, resolveDynamicComponent as s, mergeProps as g, withCtx as u, createCommentVNode as v, createElementVNode as m, renderSlot as p } from "vue";
2
2
  import { resolveIcon as h } from "../../utils/icon.js";
3
- const b = { class: "one-ref-tag__text" }, S = /* @__PURE__ */ g({
3
+ const b = { class: "one-ref-tag__text" }, S = /* @__PURE__ */ d({
4
4
  name: "RefTag",
5
5
  inheritAttrs: !1,
6
6
  __name: "RefTag",
7
7
  props: {
8
8
  type: { default: "spec" },
9
- icon: {},
10
- color: {},
11
- bg: {},
12
- href: {}
9
+ icon: { default: void 0 },
10
+ color: { default: void 0 },
11
+ bg: { default: void 0 },
12
+ href: { default: void 0 }
13
13
  },
14
14
  setup(e) {
15
- const a = {
15
+ const o = e, a = {
16
16
  spec: {
17
17
  icon: "file-text",
18
18
  color: "var(--of-color-primary-700)",
@@ -20,27 +20,27 @@ const b = { class: "one-ref-tag__text" }, S = /* @__PURE__ */ g({
20
20
  },
21
21
  wiki: { icon: "book-open", color: "var(--of-color-green-600)", bg: "var(--of-color-green-50)" },
22
22
  task: { icon: "link", color: "var(--of-color-orange-600)", bg: "var(--of-color-orange-50)" }
23
- }, o = e, t = n(() => a[o.type ?? ""] ?? a.spec), c = n(() => {
23
+ }, t = n(() => a[o.type ?? ""] ?? a.spec), l = n(() => {
24
24
  const r = o.icon ?? t.value.icon;
25
25
  return h(r);
26
26
  }), i = n(() => ({
27
27
  "--one-ref-tag-color": o.color ?? t.value.color,
28
28
  "--one-ref-tag-bg": o.bg ?? t.value.bg
29
29
  }));
30
- return (r, y) => (l(), s(f(e.href ? "a" : "span"), m({
30
+ return (r, y) => (c(), f(s(e.href ? "a" : "span"), g({
31
31
  class: "one-ref-tag",
32
32
  style: i.value,
33
33
  href: e.href ?? void 0,
34
34
  target: e.href ? "_blank" : void 0,
35
35
  rel: e.href ? "noopener noreferrer" : void 0
36
36
  }, r.$attrs), {
37
- default: p(() => [
38
- c.value ? (l(), s(f(c.value), {
37
+ default: u(() => [
38
+ l.value ? (c(), f(s(l.value), {
39
39
  key: 0,
40
40
  class: "one-ref-tag__icon"
41
- })) : u("", !0),
42
- v("span", b, [
43
- d(r.$slots, "default", {}, void 0, !0)
41
+ })) : v("", !0),
42
+ m("span", b, [
43
+ p(r.$slots, "default", {}, void 0, !0)
44
44
  ])
45
45
  ]),
46
46
  _: 3
@@ -1,7 +1,7 @@
1
1
  import o from "./SearchHighlight.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-fb57f288"]]);
4
+ const i = /* @__PURE__ */ t(o, [["__scopeId", "data-v-e3a7db64"]]);
5
5
  export {
6
6
  i as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./SectionBlock.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-d2c09df0"]]);
4
+ const f = /* @__PURE__ */ t(o, [["__scopeId", "data-v-1f8a2c23"]]);
5
5
  export {
6
- m as default
6
+ f as default
7
7
  };
@@ -1,6 +1,6 @@
1
- import { defineComponent as E, computed as s, openBlock as l, createElementBlock as n, mergeProps as T, createElementVNode as t, createBlock as A, resolveDynamicComponent as L, createCommentVNode as d, toDisplayString as k, normalizeStyle as w, withModifiers as $, renderSlot as u, normalizeClass as v } from "vue";
2
- import { resolveIcon as z } from "../../utils/icon.js";
3
- const D = { class: "of-section-block__header-left" }, N = { class: "of-section-block__title" }, U = ["aria-expanded", "aria-label"], M = { class: "of-section-block__body" }, F = /* @__PURE__ */ E({
1
+ import { defineComponent as T, computed as a, openBlock as l, createElementBlock as c, mergeProps as A, createElementVNode as t, withKeys as k, withModifiers as u, createBlock as L, resolveDynamicComponent as $, createCommentVNode as b, toDisplayString as y, normalizeStyle as z, renderSlot as f, normalizeClass as g } from "vue";
2
+ import { resolveIcon as D } from "../../utils/icon.js";
3
+ const K = ["onKeydown"], N = { class: "of-section-block__header-left" }, U = { class: "of-section-block__title" }, M = ["aria-expanded", "aria-label"], P = { class: "of-section-block__body" }, I = /* @__PURE__ */ T({
4
4
  name: "SectionBlock",
5
5
  inheritAttrs: !1,
6
6
  __name: "SectionBlock",
@@ -13,103 +13,109 @@ const D = { class: "of-section-block__header-left" }, N = { class: "of-section-b
13
13
  statusLabels: { default: void 0 }
14
14
  },
15
15
  emits: ["update:collapsed", "edit", "save"],
16
- setup(e, { emit: g }) {
17
- const o = e, c = g, m = {
16
+ setup(e, { emit: m }) {
17
+ const o = e, i = m, _ = {
18
18
  pending: { background: "var(--of-color-gray-100)", text: "var(--of-color-gray-400)" },
19
19
  updating: { background: "var(--of-color-primary-50)", text: "var(--of-color-primary-500)" },
20
20
  done: { background: "var(--of-color-success-light)", text: "var(--of-badge-green-text)" },
21
21
  editing: { background: "var(--of-color-primary-50)", text: "var(--of-color-primary-500)" }
22
- }, y = {
22
+ }, h = {
23
23
  pending: "待处理",
24
24
  updating: "更新中",
25
25
  done: "已完成",
26
26
  editing: "编辑中"
27
- }, i = s(() => o.status ? m[o.status] ?? null : null), _ = s(() => {
28
- var a;
29
- return o.status ? ((a = o.statusLabels) == null ? void 0 : a[o.status]) ?? y[o.status] ?? o.status : null;
30
- }), h = s(() => i.value ? {
31
- backgroundColor: i.value.background,
32
- color: i.value.text
33
- } : {}), C = s(() => o.status === "editing" ? {
27
+ }, r = a(() => o.status ? _[o.status] ?? null : null), C = a(() => {
28
+ var s;
29
+ return o.status ? ((s = o.statusLabels) == null ? void 0 : s[o.status]) ?? h[o.status] ?? o.status : null;
30
+ }), S = a(() => r.value ? {
31
+ backgroundColor: r.value.background,
32
+ color: r.value.text
33
+ } : {}), x = a(() => o.status === "editing" ? {
34
34
  borderColor: "var(--of-color-primary-500)",
35
35
  boxShadow: "0 0 0 3px color-mix(in srgb, var(--of-color-primary-500) 8%, transparent)"
36
- } : o.status === "done" ? { borderColor: "var(--of-color-success-light)" } : {}), r = s(() => o.status === "editing"), S = s(() => o.editable && o.status === "done"), f = s(() => z(o.icon));
37
- function b() {
38
- c("update:collapsed", !o.collapsed);
36
+ } : o.status === "done" ? { borderColor: "var(--of-color-success-light)" } : {}), d = a(() => o.status === "editing"), B = a(() => o.editable && o.status === "done"), p = a(() => D(o.icon));
37
+ function n() {
38
+ i("update:collapsed", !o.collapsed);
39
39
  }
40
- function x() {
41
- c("edit");
40
+ function w() {
41
+ i("edit");
42
42
  }
43
- function B() {
44
- c("save");
43
+ function E() {
44
+ i("save");
45
45
  }
46
- return (a, p) => (l(), n("div", T({
46
+ return (s, v) => (l(), c("div", A({
47
47
  class: ["of-section-block", {
48
48
  "of-section-block--collapsed": e.collapsed,
49
- "of-section-block--editing": r.value,
49
+ "of-section-block--editing": d.value,
50
50
  "of-section-block--done": e.status === "done"
51
51
  }],
52
- style: C.value
53
- }, a.$attrs), [
52
+ style: x.value
53
+ }, s.$attrs), [
54
54
  t("div", {
55
55
  class: "of-section-block__header",
56
- onClick: b
56
+ role: "button",
57
+ tabindex: "0",
58
+ onClick: n,
59
+ onKeydown: [
60
+ k(u(n, ["prevent"]), ["enter"]),
61
+ k(u(n, ["prevent"]), ["space"])
62
+ ]
57
63
  }, [
58
- t("div", D, [
59
- f.value ? (l(), A(L(f.value), {
64
+ t("div", N, [
65
+ p.value ? (l(), L($(p.value), {
60
66
  key: 0,
61
67
  class: "of-section-block__icon",
62
68
  size: 14,
63
69
  "aria-hidden": "true"
64
- })) : d("", !0),
65
- t("span", N, k(e.title), 1),
66
- e.status ? (l(), n("span", {
70
+ })) : b("", !0),
71
+ t("span", U, y(e.title), 1),
72
+ e.status ? (l(), c("span", {
67
73
  key: 1,
68
74
  class: "of-section-block__status-badge",
69
- style: w(h.value)
70
- }, k(_.value), 5)) : d("", !0)
75
+ style: z(S.value)
76
+ }, y(C.value), 5)) : b("", !0)
71
77
  ]),
72
78
  t("div", {
73
79
  class: "of-section-block__header-right",
74
- onClick: p[0] || (p[0] = $(() => {
80
+ onClick: v[0] || (v[0] = u(() => {
75
81
  }, ["stop"]))
76
82
  }, [
77
- u(a.$slots, "header-extra", {}, void 0, !0),
78
- r.value ? (l(), n("button", {
83
+ f(s.$slots, "header-extra", {}, void 0, !0),
84
+ d.value ? (l(), c("button", {
79
85
  key: 0,
80
86
  type: "button",
81
87
  class: "of-section-block__action-btn of-section-block__action-btn--save",
82
- onClick: B
83
- }, " 保存 ")) : S.value ? (l(), n("button", {
88
+ onClick: E
89
+ }, " 保存 ")) : B.value ? (l(), c("button", {
84
90
  key: 1,
85
91
  type: "button",
86
92
  class: "of-section-block__action-btn",
87
- onClick: x
88
- }, " 编辑 ")) : d("", !0),
93
+ onClick: w
94
+ }, " 编辑 ")) : b("", !0),
89
95
  t("button", {
90
96
  type: "button",
91
97
  class: "of-section-block__collapse-btn",
92
98
  "aria-expanded": !e.collapsed,
93
99
  "aria-label": e.collapsed ? "展开" : "折叠",
94
- onClick: b
100
+ onClick: n
95
101
  }, [
96
102
  t("span", {
97
- class: v(["of-section-block__collapse-icon", { "of-section-block__collapse-icon--collapsed": e.collapsed }]),
103
+ class: g(["of-section-block__collapse-icon", { "of-section-block__collapse-icon--collapsed": e.collapsed }]),
98
104
  "aria-hidden": "true"
99
- }, "▾", 2)
100
- ], 8, U)
105
+ }, " ", 2)
106
+ ], 8, M)
101
107
  ])
102
- ]),
108
+ ], 40, K),
103
109
  t("div", {
104
- class: v(["of-section-block__body-wrapper", { "of-section-block__body-wrapper--collapsed": e.collapsed }])
110
+ class: g(["of-section-block__body-wrapper", { "of-section-block__body-wrapper--collapsed": e.collapsed }])
105
111
  }, [
106
- t("div", M, [
107
- r.value ? u(a.$slots, "editor", { key: 0 }, void 0, !0) : u(a.$slots, "default", { key: 1 }, void 0, !0)
112
+ t("div", P, [
113
+ d.value ? f(s.$slots, "editor", { key: 0 }, void 0, !0) : f(s.$slots, "default", { key: 1 }, void 0, !0)
108
114
  ])
109
115
  ], 2)
110
116
  ], 16));
111
117
  }
112
118
  });
113
119
  export {
114
- F as default
120
+ I as default
115
121
  };
@@ -24,7 +24,12 @@ declare const __VLS_component: import('vue').DefineComponent<SelectBadgeProps, {
24
24
  }, string, import('vue').PublicProps, Readonly<SelectBadgeProps> & Readonly<{
25
25
  onClick?: ((e: MouseEvent) => any) | undefined;
26
26
  }>, {
27
+ color: string;
28
+ bgColor: string;
29
+ dotColor: string;
27
30
  dot: boolean;
31
+ textColor: string;
32
+ borderColor: string;
28
33
  clickable: boolean;
29
34
  }, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
30
35
  declare const _default: __VLS_WithTemplateSlots<typeof __VLS_component, __VLS_TemplateResult["slots"]>;