@funcho/ui 1.1.22 → 1.1.24

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.
@@ -208,7 +208,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
208
208
  ref_key: "queryBoxRef",
209
209
  ref: queryBoxRef,
210
210
  fields: __props.fields,
211
- tools: __props.actions,
211
+ tools: __props.tools,
212
212
  "btn-disabled": tableLoading.value,
213
213
  onSearch: handleSearchClick,
214
214
  onReset: handleResetClick,
@@ -111,8 +111,20 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
111
111
  const formRef = vue.ref();
112
112
  const { height: formHeight } = core.useElementSize(formRef);
113
113
  const hasMoreContent = vue.computed(() => {
114
- return formHeight.value > 28;
114
+ return formRows.value > 1;
115
115
  });
116
+ const getGridRowCount = (container) => {
117
+ if (!container) return { count: 0, height: 0 };
118
+ const style = window.getComputedStyle(container);
119
+ const rows = style.getPropertyValue("grid-template-rows");
120
+ if (!rows || rows === "none") return { count: 0, height: 0 };
121
+ const rowHeights = rows.split(/\s+/).filter(Boolean);
122
+ const rowCount = rowHeights.length;
123
+ return {
124
+ count: rowCount,
125
+ height: rowCount > 0 ? parseFloat(rowHeights[0] || "0") : 0
126
+ };
127
+ };
116
128
  const isExpanded = vue.ref(false);
117
129
  const props = __props;
118
130
  const renderTools = (tools) => {
@@ -167,6 +179,15 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
167
179
  const handleSearchClick = () => {
168
180
  emits("search", formRef.value?.model || {});
169
181
  };
182
+ const formRows = vue.ref(0);
183
+ const formFirstRowHeight = vue.ref(0);
184
+ core.useResizeObserver(formRef, () => {
185
+ if (formRef.value) {
186
+ const { count, height } = getGridRowCount(formRef.value.$el);
187
+ formRows.value = count;
188
+ formFirstRowHeight.value = height;
189
+ }
190
+ });
170
191
  __expose(
171
192
  new Proxy(
172
193
  {},
@@ -186,7 +207,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
186
207
  ref_key: "queryBoxRef",
187
208
  ref: queryBoxRef,
188
209
  class: vue.normalizeClass({ [vue.unref(ns).e("query-box")]: true, [vue.unref(ns).is("expanded")]: isExpanded.value }),
189
- style: vue.normalizeStyle({ "--query-box-max-height": vue.unref(formHeight) + 16 + "px" })
210
+ style: vue.normalizeStyle({
211
+ "--query-box-max-height": vue.unref(formHeight) + 16 + "px",
212
+ "--query-box-first-row-height": formFirstRowHeight.value + 16 + "px"
213
+ })
190
214
  }, [
191
215
  vue.createVNode(ProForm_vue_vue_type_script_setup_true_lang.default, {
192
216
  ref_key: "formRef",
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
4
 
5
- const version = "1.1.22";
5
+ const version = "1.1.24";
6
6
 
7
7
  exports.version = version;
@@ -204,7 +204,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
204
204
  ref_key: "queryBoxRef",
205
205
  ref: queryBoxRef,
206
206
  fields: __props.fields,
207
- tools: __props.actions,
207
+ tools: __props.tools,
208
208
  "btn-disabled": tableLoading.value,
209
209
  onSearch: handleSearchClick,
210
210
  onReset: handleResetClick,
@@ -79,7 +79,7 @@ import '../../components/LovText/index.mjs';
79
79
  import '../../components/DotStatus/index.mjs';
80
80
  import _sfc_main$1 from '../ProForm/ProForm.vue.mjs';
81
81
  /* empty css */
82
- import { useElementSize } from '@vueuse/core';
82
+ import { useElementSize, useResizeObserver } from '@vueuse/core';
83
83
  import _sfc_main$2 from '../../components/VNodeRenderer/index.vue.mjs';
84
84
 
85
85
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -107,8 +107,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
107
107
  const formRef = ref();
108
108
  const { height: formHeight } = useElementSize(formRef);
109
109
  const hasMoreContent = computed(() => {
110
- return formHeight.value > 28;
110
+ return formRows.value > 1;
111
111
  });
112
+ const getGridRowCount = (container) => {
113
+ if (!container) return { count: 0, height: 0 };
114
+ const style = window.getComputedStyle(container);
115
+ const rows = style.getPropertyValue("grid-template-rows");
116
+ if (!rows || rows === "none") return { count: 0, height: 0 };
117
+ const rowHeights = rows.split(/\s+/).filter(Boolean);
118
+ const rowCount = rowHeights.length;
119
+ return {
120
+ count: rowCount,
121
+ height: rowCount > 0 ? parseFloat(rowHeights[0] || "0") : 0
122
+ };
123
+ };
112
124
  const isExpanded = ref(false);
113
125
  const props = __props;
114
126
  const renderTools = (tools) => {
@@ -163,6 +175,15 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
163
175
  const handleSearchClick = () => {
164
176
  emits("search", formRef.value?.model || {});
165
177
  };
178
+ const formRows = ref(0);
179
+ const formFirstRowHeight = ref(0);
180
+ useResizeObserver(formRef, () => {
181
+ if (formRef.value) {
182
+ const { count, height } = getGridRowCount(formRef.value.$el);
183
+ formRows.value = count;
184
+ formFirstRowHeight.value = height;
185
+ }
186
+ });
166
187
  __expose(
167
188
  new Proxy(
168
189
  {},
@@ -182,7 +203,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
182
203
  ref_key: "queryBoxRef",
183
204
  ref: queryBoxRef,
184
205
  class: normalizeClass({ [unref(ns).e("query-box")]: true, [unref(ns).is("expanded")]: isExpanded.value }),
185
- style: normalizeStyle({ "--query-box-max-height": unref(formHeight) + 16 + "px" })
206
+ style: normalizeStyle({
207
+ "--query-box-max-height": unref(formHeight) + 16 + "px",
208
+ "--query-box-first-row-height": formFirstRowHeight.value + 16 + "px"
209
+ })
186
210
  }, [
187
211
  createVNode(_sfc_main$1, {
188
212
  ref_key: "formRef",
@@ -1,3 +1,3 @@
1
- const version = "1.1.22";
1
+ const version = "1.1.24";
2
2
 
3
3
  export { version };
package/dist/style.css CHANGED
@@ -17078,6 +17078,7 @@ to {
17078
17078
  display: grid;
17079
17079
  grid-template-columns: repeat(var(--grid-columns, auto-fill), minmax(220px, 1fr));
17080
17080
  column-gap: 24px;
17081
+ align-items: start;
17081
17082
  }
17082
17083
  .fc-mkui-pro-form__container.is-inline .fc-ui-form-item {
17083
17084
  margin-right: 0;
@@ -17098,7 +17099,7 @@ to {
17098
17099
  border-radius: 2px;
17099
17100
  margin-bottom: 8px;
17100
17101
  padding: 8px;
17101
- max-height: 44px;
17102
+ max-height: var(--query-box-first-row-height);
17102
17103
  overflow: hidden;
17103
17104
  transition: max-height 0.4s cubic-bezier(0.23, 1, 0.32, 1);
17104
17105
  }
@@ -17110,17 +17111,11 @@ to {
17110
17111
  display: grid;
17111
17112
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
17112
17113
  gap: 8px 24px;
17114
+ align-items: start;
17113
17115
  }
17114
17116
  .fc-mkui-query-form__query-form .fc-ui-form-item {
17115
17117
  margin: 0;
17116
17118
  }
17117
- .fc-mkui-query-form__query-form .fc-ui-form-item .fc-ui-cascader .fc-ui-cascader__tags {
17118
- display: inline-flex;
17119
- flex-wrap: nowrap;
17120
- }
17121
- .fc-mkui-query-form__query-form .fc-ui-form-item .fc-ui-cascader .fc-ui-cascader__tags .fc-ui-tag {
17122
- max-width: calc(100% - 109px);
17123
- }
17124
17119
  .fc-mkui-query-form__tools {
17125
17120
  margin-top: auto;
17126
17121
  flex-shrink: 0;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@funcho/ui",
3
3
  "description": "@funcho ui library",
4
- "version": "1.1.22",
4
+ "version": "1.1.24",
5
5
  "type": "module",
6
6
  "main": "dist/cjs/index.js",
7
7
  "module": "dist/esm/index.mjs",