@pequity/squirrel 7.1.1 → 7.1.2

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.
@@ -47,7 +47,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
47
47
  lg: "bg-[length:2rem_2rem] w-[2rem] h-[2rem] right-[46px] top-2"
48
48
  };
49
49
  const showEnterIconOnFocus = vue.ref(false);
50
- const searchInput = vue.useTemplateRef("searchInput");
50
+ const input = vue.useTemplateRef("pInput");
51
51
  const query = vue.ref(props.modelValue);
52
52
  vue.watch(
53
53
  () => props.modelValue,
@@ -62,7 +62,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
62
62
  query.value = "";
63
63
  requestAnimationFrame(() => {
64
64
  var _a;
65
- (_a = searchInput.value) == null ? void 0 : _a.$el.querySelector("input").focus();
65
+ (_a = input.value) == null ? void 0 : _a.$el.querySelector("input").focus();
66
66
  });
67
67
  };
68
68
  const keydownEnter = () => {
@@ -70,13 +70,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
70
70
  };
71
71
  return (_ctx, _cache) => {
72
72
  const _directive_tooltip = vue.resolveDirective("tooltip");
73
- return vue.openBlock(), vue.createBlock(pInput_vue_vue_type_script_setup_true_lang._sfc_main, vue.mergeProps({
74
- ref_key: "searchInput",
75
- ref: searchInput,
73
+ return vue.openBlock(), vue.createBlock(pInput_vue_vue_type_script_setup_true_lang._sfc_main, vue.mergeProps({ ref: "pInput" }, _ctx.$attrs, {
76
74
  modelValue: query.value,
77
75
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event),
78
- size: __props.size
79
- }, _ctx.$attrs, {
76
+ size: __props.size,
80
77
  role: "searchbox",
81
78
  rounded: "",
82
79
  onFocus: _cache[1] || (_cache[1] = ($event) => showEnterIconOnFocus.value = true),
@@ -119,5 +116,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
119
116
  };
120
117
  }
121
118
  });
122
- const PInputSearch = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-ebc375ff"]]);
119
+ const PInputSearch = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-0e51ff56"]]);
123
120
  module.exports = PInputSearch;
@@ -46,7 +46,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
46
46
  lg: "bg-[length:2rem_2rem] w-[2rem] h-[2rem] right-[46px] top-2"
47
47
  };
48
48
  const showEnterIconOnFocus = ref(false);
49
- const searchInput = useTemplateRef("searchInput");
49
+ const input = useTemplateRef("pInput");
50
50
  const query = ref(props.modelValue);
51
51
  watch(
52
52
  () => props.modelValue,
@@ -61,7 +61,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
61
61
  query.value = "";
62
62
  requestAnimationFrame(() => {
63
63
  var _a;
64
- (_a = searchInput.value) == null ? void 0 : _a.$el.querySelector("input").focus();
64
+ (_a = input.value) == null ? void 0 : _a.$el.querySelector("input").focus();
65
65
  });
66
66
  };
67
67
  const keydownEnter = () => {
@@ -69,13 +69,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
69
69
  };
70
70
  return (_ctx, _cache) => {
71
71
  const _directive_tooltip = resolveDirective("tooltip");
72
- return openBlock(), createBlock(_sfc_main$1, mergeProps({
73
- ref_key: "searchInput",
74
- ref: searchInput,
72
+ return openBlock(), createBlock(_sfc_main$1, mergeProps({ ref: "pInput" }, _ctx.$attrs, {
75
73
  modelValue: query.value,
76
74
  "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => query.value = $event),
77
- size: __props.size
78
- }, _ctx.$attrs, {
75
+ size: __props.size,
79
76
  role: "searchbox",
80
77
  rounded: "",
81
78
  onFocus: _cache[1] || (_cache[1] = ($event) => showEnterIconOnFocus.value = true),
@@ -118,7 +115,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
118
115
  };
119
116
  }
120
117
  });
121
- const PInputSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ebc375ff"]]);
118
+ const PInputSearch = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0e51ff56"]]);
122
119
  export {
123
120
  PInputSearch as default
124
121
  };
package/dist/squirrel.css CHANGED
@@ -263,9 +263,11 @@ from {
263
263
  to {
264
264
  opacity: 0;
265
265
  }
266
- }.enter[data-v-ebc375ff] {
266
+ }
267
+ .enter[data-v-0e51ff56] {
267
268
  background-image: url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_1627_786)'%3e%3crect%20width='24'%20height='24'%20rx='5'%20fill='%23ECF1FF'/%3e%3cpath%20d='M19.17%201.03744e-05H4.83C4.19619%20-0.00130459%203.56834%200.122398%202.98239%200.364037C2.39645%200.605676%201.86392%200.960506%201.41528%201.40822C0.966641%201.85592%200.610708%202.38772%200.367855%202.97316C0.125002%203.55861%20-1.36406e-06%204.1862%200%204.82001L0%2019.17C0%2020.451%200.508874%2021.6795%201.41467%2022.5853C2.32048%2023.4911%203.549%2024%204.83%2024H19.17C20.4502%2023.9974%2021.6772%2023.4876%2022.5824%2022.5824C23.4876%2021.6772%2023.9974%2020.4502%2024%2019.17V4.82001C23.9974%203.54075%2023.4873%202.31479%2022.5818%201.41115C21.6763%200.507508%2020.4493%207.63258e-06%2019.17%201.03744e-05ZM22%2019.17C22%2019.9206%2021.7018%2020.6404%2021.1711%2021.1711C20.6404%2021.7018%2019.9206%2022%2019.17%2022H4.83C4.07944%2022%203.35962%2021.7018%202.82889%2021.1711C2.29816%2020.6404%202%2019.9206%202%2019.17V4.82001C2.00265%204.07118%202.30197%203.35393%202.83242%202.82536C3.36286%202.29679%204.08117%202.00001%204.83%202.00001H19.17C19.9188%202.00001%2020.6371%202.29679%2021.1676%202.82536C21.698%203.35393%2021.9974%204.07118%2022%204.82001V19.17Z'%20fill='%234750EB'/%3e%3cpath%20d='M17.5%207.5C17.2348%207.5%2016.9804%207.60536%2016.7929%207.79289C16.6054%207.98043%2016.5%208.23478%2016.5%208.5V11.25C16.5%2011.3163%2016.4737%2011.3799%2016.4268%2011.4268C16.3799%2011.4737%2016.3163%2011.5%2016.25%2011.5H10.75C10.6837%2011.5%2010.6201%2011.4737%2010.5732%2011.4268C10.5263%2011.3799%2010.5%2011.3163%2010.5%2011.25V9.5C10.5012%209.30138%2010.4431%209.10691%2010.3333%208.94139C10.2235%208.77587%2010.0669%208.6468%209.88348%208.57063C9.70004%208.49446%209.49807%208.47465%209.30332%208.51372C9.10857%208.55279%208.92987%208.64897%208.79%208.79L5.79%2011.79C5.60375%2011.9774%205.49921%2012.2308%205.49921%2012.495C5.49921%2012.7592%205.60375%2013.0126%205.79%2013.2L8.79%2016.2C8.88261%2016.2945%208.99306%2016.3697%209.11493%2016.4212C9.23681%2016.4727%209.36769%2016.4995%209.5%2016.5C9.76522%2016.5%2010.0196%2016.3946%2010.2071%2016.2071C10.3946%2016.0196%2010.5%2015.7652%2010.5%2015.5V13.75C10.5%2013.6837%2010.5263%2013.6201%2010.5732%2013.5732C10.6201%2013.5263%2010.6837%2013.5%2010.75%2013.5H16.5C17.0304%2013.5%2017.5391%2013.2893%2017.9142%2012.9142C18.2893%2012.5391%2018.5%2012.0304%2018.5%2011.5V8.5C18.5%208.23478%2018.3946%207.98043%2018.2071%207.79289C18.0196%207.60536%2017.7652%207.5%2017.5%207.5Z'%20fill='%234750EB'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_1627_786'%3e%3crect%20width='24'%20height='24'%20rx='5'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
268
- }.fadeInDown[data-v-9ad56d4f] {
269
+ }
270
+ .fadeInDown[data-v-9ad56d4f] {
269
271
  animation-duration: 0.4s;
270
272
  animation-fill-mode: both;
271
273
  animation-name: fadeInDown-9ad56d4f;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pequity/squirrel",
3
3
  "description": "Squirrel component library",
4
- "version": "7.1.1",
4
+ "version": "7.1.2",
5
5
  "packageManager": "pnpm@9.15.9",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -1,9 +1,9 @@
1
1
  <template>
2
2
  <PInput
3
- ref="searchInput"
3
+ ref="pInput"
4
+ v-bind="$attrs"
4
5
  v-model="query"
5
6
  :size="size"
6
- v-bind="$attrs"
7
7
  role="searchbox"
8
8
  rounded
9
9
  @focus="showEnterIconOnFocus = true"
@@ -87,7 +87,7 @@ const enterIconClasses = {
87
87
  lg: 'bg-[length:2rem_2rem] w-[2rem] h-[2rem] right-[46px] top-2',
88
88
  } as const;
89
89
  const showEnterIconOnFocus = ref(false);
90
- const searchInput = useTemplateRef<PInputInstance>('searchInput');
90
+ const input = useTemplateRef<PInputInstance>('pInput');
91
91
  const query = ref(props.modelValue);
92
92
 
93
93
  // Watchers
@@ -107,7 +107,7 @@ const clearSearch = () => {
107
107
  query.value = '';
108
108
 
109
109
  requestAnimationFrame(() => {
110
- searchInput.value?.$el.querySelector('input').focus();
110
+ input.value?.$el.querySelector('input').focus();
111
111
  });
112
112
  };
113
113
 
@@ -116,7 +116,7 @@ const keydownEnter = () => {
116
116
  };
117
117
  </script>
118
118
 
119
- <style scoped lang="scss">
119
+ <style scoped>
120
120
  .enter {
121
121
  background-image: url('@squirrel/assets/keyboard-press-enter.svg');
122
122
  }