@pequity/squirrel 5.0.2 → 5.1.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.
package/dist/cjs/index.js CHANGED
@@ -776,7 +776,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
776
776
  }) }
777
777
  },
778
778
  emits: ["scroll", "click-filter-icon", "col-resize"],
779
- setup(__props, { emit: __emit }) {
779
+ setup(__props, { expose: __expose, emit: __emit }) {
780
780
  const emit = __emit;
781
781
  const props = __props;
782
782
  vue.provide(
@@ -809,6 +809,7 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
809
809
  enabled: vue.computed(() => props.colsResizable),
810
810
  ths
811
811
  });
812
+ const tbodyElement = vue.ref(null);
812
813
  const updateThsRefs = (el, index) => {
813
814
  if (el instanceof Element) {
814
815
  ths.value[index] = el;
@@ -870,6 +871,9 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
870
871
  emit("col-resize", colResizingIndex.value, colResizingWidth.value);
871
872
  }
872
873
  });
874
+ __expose({
875
+ tbodyElement
876
+ });
873
877
  return (_ctx, _cache) => {
874
878
  var _a, _b;
875
879
  return vue.openBlock(), vue.createElementBlock("div", {
@@ -943,7 +947,10 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
943
947
  _ctx.colsResizable && !_ctx.isLastColFixed ? (vue.openBlock(), vue.createElementBlock("th", _hoisted_4$1)) : vue.createCommentVNode("", true)
944
948
  ])
945
949
  ]),
946
- vue.createElementVNode("tbody", null, [
950
+ vue.createElementVNode("tbody", {
951
+ ref_key: "tbodyElement",
952
+ ref: tbodyElement
953
+ }, [
947
954
  _ctx.virtualizer.paddingTop > 0 ? (vue.openBlock(), vue.createElementBlock("tr", _hoisted_5$1, [
948
955
  vue.createElementVNode("td", {
949
956
  style: vue.normalizeStyle({ height: `${_ctx.virtualizer.paddingTop}px` })
@@ -955,13 +962,13 @@ const _sfc_main$1 = /* @__PURE__ */ vue.defineComponent({
955
962
  style: vue.normalizeStyle({ height: `${_ctx.virtualizer.paddingBottom}px` })
956
963
  }, null, 4)
957
964
  ])) : vue.createCommentVNode("", true)
958
- ])
965
+ ], 512)
959
966
  ], 16)
960
967
  ], 2);
961
968
  };
962
969
  }
963
970
  });
964
- const pTable = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__scopeId", "data-v-f12e8db6"]]);
971
+ const pTable = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main$1, [["__scopeId", "data-v-1d76cd98"]]);
965
972
  const _sfc_main = vue.defineComponent({
966
973
  name: "PTableSort",
967
974
  props: {
package/dist/es/index.js CHANGED
@@ -776,7 +776,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
776
776
  }) }
777
777
  },
778
778
  emits: ["scroll", "click-filter-icon", "col-resize"],
779
- setup(__props, { emit: __emit }) {
779
+ setup(__props, { expose: __expose, emit: __emit }) {
780
780
  const emit = __emit;
781
781
  const props = __props;
782
782
  provide(
@@ -809,6 +809,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
809
809
  enabled: computed(() => props.colsResizable),
810
810
  ths
811
811
  });
812
+ const tbodyElement = ref(null);
812
813
  const updateThsRefs = (el, index) => {
813
814
  if (el instanceof Element) {
814
815
  ths.value[index] = el;
@@ -870,6 +871,9 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
870
871
  emit("col-resize", colResizingIndex.value, colResizingWidth.value);
871
872
  }
872
873
  });
874
+ __expose({
875
+ tbodyElement
876
+ });
873
877
  return (_ctx, _cache) => {
874
878
  var _a, _b;
875
879
  return openBlock(), createElementBlock("div", {
@@ -943,7 +947,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
943
947
  _ctx.colsResizable && !_ctx.isLastColFixed ? (openBlock(), createElementBlock("th", _hoisted_4$1)) : createCommentVNode("", true)
944
948
  ])
945
949
  ]),
946
- createElementVNode("tbody", null, [
950
+ createElementVNode("tbody", {
951
+ ref_key: "tbodyElement",
952
+ ref: tbodyElement
953
+ }, [
947
954
  _ctx.virtualizer.paddingTop > 0 ? (openBlock(), createElementBlock("tr", _hoisted_5$1, [
948
955
  createElementVNode("td", {
949
956
  style: normalizeStyle({ height: `${_ctx.virtualizer.paddingTop}px` })
@@ -955,13 +962,13 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
955
962
  style: normalizeStyle({ height: `${_ctx.virtualizer.paddingBottom}px` })
956
963
  }, null, 4)
957
964
  ])) : createCommentVNode("", true)
958
- ])
965
+ ], 512)
959
966
  ], 16)
960
967
  ], 2);
961
968
  };
962
969
  }
963
970
  });
964
- const pTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f12e8db6"]]);
971
+ const pTable = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-1d76cd98"]]);
965
972
  const _sfc_main = defineComponent({
966
973
  name: "PTableSort",
967
974
  props: {
@@ -19,6 +19,7 @@ declare function __VLS_template(): {
19
19
  };
20
20
  refs: {
21
21
  scrollWrapper: HTMLDivElement;
22
+ tbodyElement: HTMLTableSectionElement;
22
23
  };
23
24
  attrs: Partial<{}>;
24
25
  };
@@ -33,7 +34,9 @@ declare const __VLS_component: import("vue").DefineComponent<__VLS_WithDefaults<
33
34
  paddingTop: number;
34
35
  paddingBottom: number;
35
36
  };
36
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
+ }>, {
38
+ tbodyElement: import("vue").Ref<HTMLElement | null>;
39
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
37
40
  scroll: (val: Event) => void;
38
41
  "click-filter-icon": (val: Event, col: any) => void;
39
42
  "col-resize": (colIndex: number, width: number) => void;
package/dist/style.css CHANGED
@@ -2098,29 +2098,29 @@ to {
2098
2098
  .bg-file-upload-x-icon[data-v-d07a8f64]:hover {
2099
2099
  background-image: url("data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M0%208C0%209.58225%200.469192%2011.129%201.34824%2012.4446C2.22729%2013.7602%203.47672%2014.7855%204.93853%2015.391C6.40034%2015.9965%208.00887%2016.155%209.56072%2015.8463C11.1126%2015.5376%2012.538%2014.7757%2013.6569%2013.6569C14.7757%2012.538%2015.5376%2011.1126%2015.8463%209.56072C16.155%208.00887%2015.9965%206.40034%2015.391%204.93853C14.7855%203.47672%2013.7602%202.22729%2012.4446%201.34824C11.129%200.469192%209.58225%200%208%200C5.87827%200%203.84344%200.842855%202.34315%202.34315C0.842855%203.84344%200%205.87827%200%208ZM14.3333%208C14.3333%209.25262%2013.9619%2010.4771%2013.266%2011.5186C12.5701%2012.5601%2011.5809%2013.3719%2010.4237%2013.8512C9.2664%2014.3306%207.99298%2014.456%206.76443%2014.2116C5.53588%2013.9673%204.40739%2013.3641%203.52166%2012.4783C2.63592%2011.5926%202.03273%2010.4641%201.78836%209.23557C1.54399%208.00703%201.66941%206.7336%202.14876%205.57634C2.62812%204.41907%203.43988%203.42994%204.48139%202.73403C5.5229%202.03811%206.74739%201.66667%208%201.66667C9.67916%201.66843%2011.289%202.33626%2012.4764%203.52361C13.6637%204.71096%2014.3316%206.32084%2014.3333%208Z'%20fill='%23BB1410'%20/%3e%3cpath%20d='M5.88634%204.71322C5.73075%204.55763%205.51972%204.47021%205.29967%204.47021C5.07963%204.47021%204.8686%204.55763%204.71301%204.71322C4.55741%204.86881%204.47%205.07984%204.47%205.29989C4.47%205.51993%204.55741%205.73096%204.71301%205.88655L6.71301%207.88655C6.72914%207.9021%206.74197%207.92074%206.75073%207.94136C6.7595%207.96198%206.76401%207.98415%206.76401%208.00655C6.76401%208.02896%206.7595%208.05113%206.75073%208.07175C6.74197%208.09237%206.72914%208.11101%206.71301%208.12655L4.71301%2010.1266C4.63561%2010.2034%204.57417%2010.2948%204.53225%2010.3955C4.49033%2010.4962%204.46875%2010.6042%204.46875%2010.7132C4.46875%2010.8223%204.49033%2010.9303%204.53225%2011.031C4.57417%2011.1317%204.63561%2011.223%204.71301%2011.2999C4.78939%2011.3781%204.88063%2011.4403%204.98138%2011.4827C5.08213%2011.5251%205.19035%2011.547%205.29967%2011.547C5.409%2011.547%205.51721%2011.5251%205.61796%2011.4827C5.71871%2011.4403%205.80996%2011.3781%205.88634%2011.2999L7.88634%209.29989C7.91934%209.27037%207.96207%209.25405%208.00634%209.25405C8.05062%209.25405%208.09334%209.27037%208.12634%209.29989L10.1263%2011.2999C10.2027%2011.3781%2010.294%2011.4403%2010.3947%2011.4827C10.4955%2011.5251%2010.6037%2011.547%2010.713%2011.547C10.8223%2011.547%2010.9305%2011.5251%2011.0313%2011.4827C11.132%2011.4403%2011.2233%2011.3781%2011.2997%2011.2999C11.3771%2011.223%2011.4385%2011.1317%2011.4804%2011.031C11.5224%2010.9303%2011.5439%2010.8223%2011.5439%2010.7132C11.5439%2010.6042%2011.5224%2010.4962%2011.4804%2010.3955C11.4385%2010.2948%2011.3771%2010.2034%2011.2997%2010.1266L9.29967%208.12655C9.27016%208.09355%209.25384%208.05083%209.25384%208.00655C9.25384%207.96228%209.27016%207.91955%209.29967%207.88655L11.2997%205.88655C11.4553%205.73096%2011.5427%205.51993%2011.5427%205.29989C11.5427%205.07984%2011.4553%204.86881%2011.2997%204.71322C11.1441%204.55763%2010.9331%204.47021%2010.713%204.47021C10.493%204.47021%2010.2819%204.55763%2010.1263%204.71322L8.12634%206.71322C8.09334%206.74274%208.05062%206.75906%208.00634%206.75906C7.96207%206.75906%207.91934%206.74274%207.88634%206.71322L5.88634%204.71322Z'%20fill='%23BB1410'%20/%3e%3c/svg%3e");
2100
2100
  }
2101
- .p-table[data-v-f12e8db6] {
2101
+ .p-table[data-v-1d76cd98] {
2102
2102
  color: var(--color-night);
2103
2103
  height: 1px;
2104
2104
  }
2105
- .p-table th[data-v-f12e8db6] {
2105
+ .p-table th[data-v-1d76cd98] {
2106
2106
  position: sticky;
2107
2107
  top: 0px;
2108
2108
  z-index: 20;
2109
2109
  padding: 0px;
2110
2110
  }
2111
- .p-table.first-col-fixed th[data-v-f12e8db6]:first-child {
2111
+ .p-table.first-col-fixed th[data-v-1d76cd98]:first-child {
2112
2112
  left: 0px;
2113
2113
  z-index: 30;
2114
2114
  }
2115
- .p-table.first-col-fixed th:first-child .th-shadow[data-v-f12e8db6] {
2115
+ .p-table.first-col-fixed th:first-child .th-shadow[data-v-1d76cd98] {
2116
2116
  box-shadow: -1px 1px 5px 4px rgba(0, 0, 0, 0.15);
2117
2117
  clip-path: inset(0px -12px 0px 0px);
2118
2118
  }
2119
- .p-table.last-col-fixed th[data-v-f12e8db6]:last-child {
2119
+ .p-table.last-col-fixed th[data-v-1d76cd98]:last-child {
2120
2120
  right: 0px;
2121
2121
  z-index: 30;
2122
2122
  }
2123
- .p-table.last-col-fixed th:last-child .th-shadow[data-v-f12e8db6] {
2123
+ .p-table.last-col-fixed th:last-child .th-shadow[data-v-1d76cd98] {
2124
2124
  box-shadow: -2px 1px 8px rgba(0, 0, 0, 0.15);
2125
2125
  clip-path: inset(0px 0px 0px -12px);
2126
2126
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pequity/squirrel",
3
3
  "description": "Squirrel component library",
4
- "version": "5.0.2",
4
+ "version": "5.1.0",
5
5
  "packageManager": "pnpm@9.9.0",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -99,7 +99,7 @@
99
99
  "resolve-tspaths": "^0.8.19",
100
100
  "rimraf": "^6.0.1",
101
101
  "sass": "^1.78.0",
102
- "semantic-release": "^24.1.0",
102
+ "semantic-release": "^24.1.1",
103
103
  "storybook": "^8.2.9",
104
104
  "svgo": "^3.3.2",
105
105
  "tailwindcss": "^3.4.10",
@@ -65,7 +65,7 @@
65
65
  ></th>
66
66
  </tr>
67
67
  </thead>
68
- <tbody>
68
+ <tbody ref="tbodyElement">
69
69
  <tr v-if="virtualizer.paddingTop > 0">
70
70
  <td :style="{ height: `${virtualizer.paddingTop}px` }"></td>
71
71
  </tr>
@@ -159,6 +159,7 @@ const {
159
159
  enabled: computed(() => props.colsResizable),
160
160
  ths,
161
161
  });
162
+ const tbodyElement = ref<HTMLElement | null>(null);
162
163
 
163
164
  // Methods
164
165
  const updateThsRefs = (el: unknown, index: number) => {
@@ -235,6 +236,11 @@ watch(isColResizing, (nV) => {
235
236
  emit('col-resize', colResizingIndex.value, colResizingWidth.value);
236
237
  }
237
238
  });
239
+
240
+ // Expose
241
+ defineExpose({
242
+ tbodyElement,
243
+ });
238
244
  </script>
239
245
 
240
246
  <style scoped lang="scss">