@pequity/squirrel 8.2.0 → 8.3.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.
@@ -13,7 +13,7 @@ const pIcon = require("../p-icon.js");
13
13
  * Licensed under MIT.
14
14
  *
15
15
  * @license MIT
16
- * @version 2.3.0
16
+ * @version 3.0.0
17
17
  */
18
18
  const defaultIconDimensions = Object.freeze(
19
19
  {
@@ -1565,15 +1565,7 @@ function exportFunctions() {
1565
1565
  listAPIProviders
1566
1566
  };
1567
1567
  return {
1568
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1569
- enableCache: (storage2) => {
1570
- },
1571
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1572
- disableCache: (storage2) => {
1573
- },
1574
1568
  iconLoaded: iconLoaded$1,
1575
- iconExists: iconLoaded$1,
1576
- // deprecated, kept to avoid breaking changes
1577
1569
  getIcon: getIcon$1,
1578
1570
  listIcons: listIcons$1,
1579
1571
  addIcon: addIcon$1,
@@ -2069,27 +2061,7 @@ function defineIconifyIcon(name = "iconify-icon") {
2069
2061
  return IconifyIcon;
2070
2062
  }
2071
2063
  const IconifyIconComponent = defineIconifyIcon() || exportFunctions();
2072
- const {
2073
- enableCache,
2074
- disableCache,
2075
- iconLoaded,
2076
- iconExists,
2077
- // deprecated, kept to avoid breaking changes
2078
- getIcon,
2079
- listIcons,
2080
- addIcon,
2081
- addCollection,
2082
- calculateSize,
2083
- buildIcon,
2084
- iconToHTML,
2085
- svgToURL,
2086
- loadIcons,
2087
- loadIcon,
2088
- setCustomIconLoader,
2089
- setCustomIconsLoader,
2090
- addAPIProvider,
2091
- _api
2092
- } = IconifyIconComponent;
2064
+ const { iconLoaded, getIcon, listIcons, addIcon, addCollection, calculateSize, buildIcon, iconToHTML, svgToURL, loadIcons, loadIcon, setCustomIconLoader, setCustomIconsLoader, addAPIProvider, _api } = IconifyIconComponent;
2093
2065
  const _hoisted_1 = ["icon"];
2094
2066
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
2095
2067
  ...{
@@ -8,6 +8,9 @@ const _hoisted_2 = {
8
8
  class: "flex items-center"
9
9
  };
10
10
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
11
+ ...{
12
+ name: "PSteps"
13
+ },
11
14
  __name: "p-steps",
12
15
  props: {
13
16
  steps: {},
@@ -3,6 +3,9 @@ const vue = require("vue");
3
3
  const _hoisted_1 = { class: "flex items-center gap-2" };
4
4
  const _hoisted_2 = { key: 0 };
5
5
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
6
+ ...{
7
+ name: "PTabs"
8
+ },
6
9
  __name: "p-tabs",
7
10
  props: {
8
11
  tabs: {
@@ -2,6 +2,9 @@
2
2
  const vue = require("vue");
3
3
  const _pluginVue_exportHelper = require("./chunks/_plugin-vue_export-helper.js");
4
4
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
5
+ ...{
6
+ name: "PCloseBtn"
7
+ },
5
8
  __name: "p-close-btn",
6
9
  props: {
7
10
  variant: {
@@ -32,5 +35,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
32
35
  };
33
36
  }
34
37
  });
35
- const PCloseBtn = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-f61993bb"]]);
38
+ const PCloseBtn = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-2002dcc8"]]);
36
39
  module.exports = PCloseBtn;
@@ -103,18 +103,10 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
103
103
  default: "500px"
104
104
  }
105
105
  },
106
- emits: [
107
- "before-open",
108
- "opening",
109
- "opened",
110
- "before-close",
111
- "closing",
112
- "closed",
113
- "update:modelValue"
114
- ],
106
+ emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
115
107
  setup(__props, { emit: __emit }) {
116
108
  vue.useCssVars((_ctx) => ({
117
- "9a05239e": __props.maxWidth
109
+ "56e8ccbe": __props.maxWidth
118
110
  }));
119
111
  let animatingZIndex = 0;
120
112
  const emit = __emit;
@@ -162,7 +154,8 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
162
154
  props.name && modal.hide(props.name);
163
155
  }
164
156
  };
165
- const clickOutside = (e) => {
157
+ const overlayClick = (e) => {
158
+ emit("click:overlay", e);
166
159
  if (e.target === pmWrapper.value) {
167
160
  close();
168
161
  }
@@ -310,7 +303,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
310
303
  "aria-modal": "true",
311
304
  "aria-describedby": `${id.value}-content`,
312
305
  "aria-labelledby": `${id.value}-title`,
313
- onClick: _cache[0] || (_cache[0] = ($event) => clickOutside($event)),
306
+ onClick: _cache[0] || (_cache[0] = ($event) => overlayClick($event)),
314
307
  onKeydown: _cache[1] || (_cache[1] = ($event) => keydown($event))
315
308
  }, [
316
309
  vue.createElementVNode("div", {
@@ -371,5 +364,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
371
364
  };
372
365
  }
373
366
  });
374
- const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-c3379c94"]]);
367
+ const pModal = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-18201676"]]);
375
368
  module.exports = pModal;
@@ -71,7 +71,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
71
71
  return res;
72
72
  });
73
73
  const toggleLabelClasses = vue.computed(() => {
74
- return `${labelClasses.value.replace("mb-1", "")} ml-2`;
74
+ return `${labelClasses.value.replace("mb-1", "")} ml-2 leading-none`;
75
75
  });
76
76
  const attrs = vue.computed(() => {
77
77
  const { style: style2, class: classes, "data-testid": dataTestId, ...rest } = allAttrs;
@@ -123,5 +123,5 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
123
123
  };
124
124
  }
125
125
  });
126
- const pToggle = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-be9ecb77"]]);
126
+ const pToggle = /* @__PURE__ */ _pluginVue_exportHelper._export_sfc(_sfc_main, [["__scopeId", "data-v-c544a8a9"]]);
127
127
  module.exports = pToggle;
@@ -12,7 +12,7 @@ import { P_ICON_ALIASES } from "../p-icon.js";
12
12
  * Licensed under MIT.
13
13
  *
14
14
  * @license MIT
15
- * @version 2.3.0
15
+ * @version 3.0.0
16
16
  */
17
17
  const defaultIconDimensions = Object.freeze(
18
18
  {
@@ -1564,15 +1564,7 @@ function exportFunctions() {
1564
1564
  listAPIProviders
1565
1565
  };
1566
1566
  return {
1567
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1568
- enableCache: (storage2) => {
1569
- },
1570
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1571
- disableCache: (storage2) => {
1572
- },
1573
1567
  iconLoaded: iconLoaded$1,
1574
- iconExists: iconLoaded$1,
1575
- // deprecated, kept to avoid breaking changes
1576
1568
  getIcon: getIcon$1,
1577
1569
  listIcons: listIcons$1,
1578
1570
  addIcon: addIcon$1,
@@ -2068,27 +2060,7 @@ function defineIconifyIcon(name = "iconify-icon") {
2068
2060
  return IconifyIcon;
2069
2061
  }
2070
2062
  const IconifyIconComponent = defineIconifyIcon() || exportFunctions();
2071
- const {
2072
- enableCache,
2073
- disableCache,
2074
- iconLoaded,
2075
- iconExists,
2076
- // deprecated, kept to avoid breaking changes
2077
- getIcon,
2078
- listIcons,
2079
- addIcon,
2080
- addCollection,
2081
- calculateSize,
2082
- buildIcon,
2083
- iconToHTML,
2084
- svgToURL,
2085
- loadIcons,
2086
- loadIcon,
2087
- setCustomIconLoader,
2088
- setCustomIconsLoader,
2089
- addAPIProvider,
2090
- _api
2091
- } = IconifyIconComponent;
2063
+ const { iconLoaded, getIcon, listIcons, addIcon, addCollection, calculateSize, buildIcon, iconToHTML, svgToURL, loadIcons, loadIcon, setCustomIconLoader, setCustomIconsLoader, addAPIProvider, _api } = IconifyIconComponent;
2092
2064
  const _hoisted_1 = ["icon"];
2093
2065
  const _sfc_main = /* @__PURE__ */ defineComponent({
2094
2066
  ...{
@@ -7,6 +7,9 @@ const _hoisted_2 = {
7
7
  class: "flex items-center"
8
8
  };
9
9
  const _sfc_main = /* @__PURE__ */ defineComponent({
10
+ ...{
11
+ name: "PSteps"
12
+ },
10
13
  __name: "p-steps",
11
14
  props: {
12
15
  steps: {},
@@ -2,6 +2,9 @@ import { defineComponent, createElementBlock, openBlock, normalizeStyle, Fragmen
2
2
  const _hoisted_1 = { class: "flex items-center gap-2" };
3
3
  const _hoisted_2 = { key: 0 };
4
4
  const _sfc_main = /* @__PURE__ */ defineComponent({
5
+ ...{
6
+ name: "PTabs"
7
+ },
5
8
  __name: "p-tabs",
6
9
  props: {
7
10
  tabs: {
@@ -1,6 +1,9 @@
1
1
  import { defineComponent, createElementBlock, openBlock, normalizeClass, createElementVNode } from "vue";
2
2
  import { _ as _export_sfc } from "./chunks/_plugin-vue_export-helper.js";
3
3
  const _sfc_main = /* @__PURE__ */ defineComponent({
4
+ ...{
5
+ name: "PCloseBtn"
6
+ },
4
7
  __name: "p-close-btn",
5
8
  props: {
6
9
  variant: {
@@ -31,7 +34,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
31
34
  };
32
35
  }
33
36
  });
34
- const PCloseBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f61993bb"]]);
37
+ const PCloseBtn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-2002dcc8"]]);
35
38
  export {
36
39
  PCloseBtn as default
37
40
  };
@@ -102,18 +102,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
102
102
  default: "500px"
103
103
  }
104
104
  },
105
- emits: [
106
- "before-open",
107
- "opening",
108
- "opened",
109
- "before-close",
110
- "closing",
111
- "closed",
112
- "update:modelValue"
113
- ],
105
+ emits: ["before-open", "opening", "opened", "before-close", "closing", "closed", "update:modelValue", "click:overlay"],
114
106
  setup(__props, { emit: __emit }) {
115
107
  useCssVars((_ctx) => ({
116
- "9a05239e": __props.maxWidth
108
+ "56e8ccbe": __props.maxWidth
117
109
  }));
118
110
  let animatingZIndex = 0;
119
111
  const emit = __emit;
@@ -161,7 +153,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
161
153
  props.name && modal.hide(props.name);
162
154
  }
163
155
  };
164
- const clickOutside = (e) => {
156
+ const overlayClick = (e) => {
157
+ emit("click:overlay", e);
165
158
  if (e.target === pmWrapper.value) {
166
159
  close();
167
160
  }
@@ -309,7 +302,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
309
302
  "aria-modal": "true",
310
303
  "aria-describedby": `${id.value}-content`,
311
304
  "aria-labelledby": `${id.value}-title`,
312
- onClick: _cache[0] || (_cache[0] = ($event) => clickOutside($event)),
305
+ onClick: _cache[0] || (_cache[0] = ($event) => overlayClick($event)),
313
306
  onKeydown: _cache[1] || (_cache[1] = ($event) => keydown($event))
314
307
  }, [
315
308
  createElementVNode("div", {
@@ -370,7 +363,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
370
363
  };
371
364
  }
372
365
  });
373
- const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c3379c94"]]);
366
+ const pModal = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-18201676"]]);
374
367
  export {
375
368
  pModal as default
376
369
  };
@@ -70,7 +70,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
70
70
  return res;
71
71
  });
72
72
  const toggleLabelClasses = computed(() => {
73
- return `${labelClasses.value.replace("mb-1", "")} ml-2`;
73
+ return `${labelClasses.value.replace("mb-1", "")} ml-2 leading-none`;
74
74
  });
75
75
  const attrs = computed(() => {
76
76
  const { style: style2, class: classes, "data-testid": dataTestId, ...rest } = allAttrs;
@@ -122,7 +122,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
122
122
  };
123
123
  }
124
124
  });
125
- const pToggle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-be9ecb77"]]);
125
+ const pToggle = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-c544a8a9"]]);
126
126
  export {
127
127
  pToggle as default
128
128
  };
@@ -89,13 +89,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
89
89
  default: string;
90
90
  };
91
91
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
92
- "update:modelValue": (...args: any[]) => void;
93
- closed: (...args: any[]) => void;
94
- "before-open": (...args: any[]) => void;
95
- opening: (...args: any[]) => void;
96
- opened: (...args: any[]) => void;
97
- "before-close": (...args: any[]) => void;
98
- closing: (...args: any[]) => void;
92
+ "update:modelValue": (args_0: boolean) => any;
93
+ closed: () => any;
94
+ "before-open": () => any;
95
+ opening: () => any;
96
+ opened: () => any;
97
+ "before-close": () => any;
98
+ closing: () => any;
99
+ "click:overlay": (args_0: MouseEvent) => any;
99
100
  }, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
100
101
  name: {
101
102
  type: StringConstructor;
@@ -174,13 +175,14 @@ declare const __VLS_component: import("vue").DefineComponent<import("vue").Extra
174
175
  default: string;
175
176
  };
176
177
  }>> & Readonly<{
177
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
178
- onClosed?: ((...args: any[]) => any) | undefined;
179
- "onBefore-open"?: ((...args: any[]) => any) | undefined;
180
- onOpening?: ((...args: any[]) => any) | undefined;
181
- onOpened?: ((...args: any[]) => any) | undefined;
182
- "onBefore-close"?: ((...args: any[]) => any) | undefined;
183
- onClosing?: ((...args: any[]) => any) | undefined;
178
+ "onUpdate:modelValue"?: ((args_0: boolean) => any) | undefined;
179
+ onClosed?: (() => any) | undefined;
180
+ "onBefore-open"?: (() => any) | undefined;
181
+ onOpening?: (() => any) | undefined;
182
+ onOpened?: (() => any) | undefined;
183
+ "onBefore-close"?: (() => any) | undefined;
184
+ onClosing?: (() => any) | undefined;
185
+ "onClick:overlay"?: ((args_0: MouseEvent) => any) | undefined;
184
186
  }>, {
185
187
  name: string;
186
188
  title: string;
package/dist/squirrel.css CHANGED
@@ -1,8 +1,8 @@
1
1
 
2
- .x-black-icon[data-v-f61993bb] {
2
+ .x-black-icon[data-v-2002dcc8] {
3
3
  background-image: url("data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Remove'%20clip-path='url(%23clip0_3453_5756)'%3e%3cpath%20id='Vector'%20d='M0.219996%2010.72C0.149851%2010.7893%200.0941591%2010.8718%200.0561487%2010.9628C0.0181382%2011.0537%20-0.00143433%2011.1514%20-0.00143433%2011.25C-0.00143433%2011.3486%200.0181382%2011.4462%200.0561487%2011.5372C0.0941591%2011.6281%200.149851%2011.7107%200.219996%2011.78C0.360622%2011.9204%200.551246%2011.9993%200.749996%2011.9993C0.948747%2011.9993%201.13937%2011.9204%201.28%2011.78L5.91%207.14997C5.92166%207.13787%205.93564%207.12825%205.9511%207.12168C5.96656%207.1151%205.98319%207.11172%206%207.11172C6.0168%207.11172%206.03343%207.1151%206.04889%207.12168C6.06436%207.12825%206.07834%207.13787%206.09%207.14997L10.72%2011.78C10.8606%2011.9204%2011.0512%2011.9993%2011.25%2011.9993C11.4487%2011.9993%2011.6394%2011.9204%2011.78%2011.78C11.8501%2011.7107%2011.9058%2011.6281%2011.9438%2011.5372C11.9819%2011.4462%2012.0014%2011.3486%2012.0014%2011.25C12.0014%2011.1514%2011.9819%2011.0537%2011.9438%2010.9628C11.9058%2010.8718%2011.8501%2010.7893%2011.78%2010.72L7.15%206.08997C7.1379%206.07831%207.12828%206.06433%207.1217%206.04886C7.11513%206.0334%207.11174%206.01677%207.11174%205.99997C7.11174%205.98317%207.11513%205.96654%207.1217%205.95107C7.12828%205.93561%207.1379%205.92163%207.15%205.90997L11.78%201.27997C11.9125%201.13779%2011.9846%200.949747%2011.9812%200.755446C11.9777%200.561145%2011.899%200.37576%2011.7616%200.238347C11.6242%200.100934%2011.4388%200.0222218%2011.2445%200.0187936C11.0502%200.0153654%2010.8622%200.0874886%2010.72%200.219969L6.09%204.84997C6.07834%204.86207%206.06436%204.87169%206.04889%204.87826C6.03343%204.88483%206.0168%204.88822%206%204.88822C5.98319%204.88822%205.96656%204.88483%205.9511%204.87826C5.93564%204.87169%205.92166%204.86207%205.91%204.84997L1.28%200.219969C1.13782%200.0874886%200.949775%200.0153654%200.755474%200.0187936C0.561173%200.0222218%200.375787%200.100934%200.238374%200.238347C0.100961%200.37576%200.0222494%200.561145%200.0188212%200.755446C0.015393%200.949747%200.0875162%201.13779%200.219996%201.27997L4.85%205.90997C4.86209%205.92163%204.87172%205.93561%204.87829%205.95107C4.88486%205.96654%204.88825%205.98317%204.88825%205.99997C4.88825%206.01677%204.88486%206.0334%204.87829%206.04886C4.87172%206.06433%204.86209%206.07831%204.85%206.08997L0.219996%2010.72Z'%20fill='%231A123B'%20/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3453_5756'%3e%3crect%20width='12'%20height='12'%20fill='white'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
4
4
  }
5
- .x-white-icon[data-v-f61993bb] {
5
+ .x-white-icon[data-v-2002dcc8] {
6
6
  background-image: url("data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Remove'%20clip-path='url(%23clip0_3453_5756)'%3e%3cpath%20id='Vector'%20d='M0.219996%2010.72C0.149851%2010.7893%200.0941591%2010.8718%200.0561487%2010.9628C0.0181382%2011.0537%20-0.00143433%2011.1514%20-0.00143433%2011.25C-0.00143433%2011.3486%200.0181382%2011.4462%200.0561487%2011.5372C0.0941591%2011.6281%200.149851%2011.7107%200.219996%2011.78C0.360622%2011.9204%200.551246%2011.9993%200.749996%2011.9993C0.948747%2011.9993%201.13937%2011.9204%201.28%2011.78L5.91%207.14997C5.92166%207.13787%205.93564%207.12825%205.9511%207.12168C5.96656%207.1151%205.98319%207.11172%206%207.11172C6.0168%207.11172%206.03343%207.1151%206.04889%207.12168C6.06436%207.12825%206.07834%207.13787%206.09%207.14997L10.72%2011.78C10.8606%2011.9204%2011.0512%2011.9993%2011.25%2011.9993C11.4487%2011.9993%2011.6394%2011.9204%2011.78%2011.78C11.8501%2011.7107%2011.9058%2011.6281%2011.9438%2011.5372C11.9819%2011.4462%2012.0014%2011.3486%2012.0014%2011.25C12.0014%2011.1514%2011.9819%2011.0537%2011.9438%2010.9628C11.9058%2010.8718%2011.8501%2010.7893%2011.78%2010.72L7.15%206.08997C7.1379%206.07831%207.12828%206.06433%207.1217%206.04886C7.11513%206.0334%207.11174%206.01677%207.11174%205.99997C7.11174%205.98317%207.11513%205.96654%207.1217%205.95107C7.12828%205.93561%207.1379%205.92163%207.15%205.90997L11.78%201.27997C11.9125%201.13779%2011.9846%200.949747%2011.9812%200.755446C11.9777%200.561145%2011.899%200.37576%2011.7616%200.238347C11.6242%200.100934%2011.4388%200.0222218%2011.2445%200.0187936C11.0502%200.0153654%2010.8622%200.0874886%2010.72%200.219969L6.09%204.84997C6.07834%204.86207%206.06436%204.87169%206.04889%204.87826C6.03343%204.88483%206.0168%204.88822%206%204.88822C5.98319%204.88822%205.96656%204.88483%205.9511%204.87826C5.93564%204.87169%205.92166%204.86207%205.91%204.84997L1.28%200.219969C1.13782%200.0874886%200.949775%200.0153654%200.755474%200.0187936C0.561173%200.0222218%200.375787%200.100934%200.238374%200.238347C0.100961%200.37576%200.0222494%200.561145%200.0188212%200.755446C0.015393%200.949747%200.0875162%201.13779%200.219996%201.27997L4.85%205.90997C4.86209%205.92163%204.87172%205.93561%204.87829%205.95107C4.88486%205.96654%204.88825%205.98317%204.88825%205.99997C4.88825%206.01677%204.88486%206.0334%204.87829%206.04886C4.87172%206.06433%204.86209%206.07831%204.85%206.08997L0.219996%2010.72Z'%20fill='%23FFFFFF'%20/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_3453_5756'%3e%3crect%20width='12'%20height='12'%20fill='white'%20/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e");
7
7
  }
8
8
  div[id^=popper_].dropdown {
@@ -295,33 +295,33 @@ to {
295
295
  opacity: 0;
296
296
  transform: translate3d(0, -100%, 0);
297
297
  }
298
- }.pm[data-v-c3379c94] {
298
+ }.pm[data-v-18201676] {
299
299
  width: calc(100% - 32px);
300
300
  min-width: 110px;
301
- max-width: var(--9a05239e);
301
+ max-width: var(--56e8ccbe);
302
302
  max-height: calc(100vh - 32px);
303
303
  }
304
- .fadeIn[data-v-c3379c94] {
304
+ .fadeIn[data-v-18201676] {
305
305
  animation-duration: 0.4s;
306
- animation-name: fadeInFrames-c3379c94;
306
+ animation-name: fadeInFrames-18201676;
307
307
  animation-fill-mode: both;
308
308
  }
309
- .fadeOut[data-v-c3379c94] {
309
+ .fadeOut[data-v-18201676] {
310
310
  animation-duration: 0.2s;
311
- animation-name: fadeOutFrames-c3379c94;
311
+ animation-name: fadeOutFrames-18201676;
312
312
  animation-fill-mode: both;
313
313
  }
314
- .slideInTop[data-v-c3379c94] {
314
+ .slideInTop[data-v-18201676] {
315
315
  animation-duration: 0.4s;
316
- animation-name: fadeInFrames-c3379c94,slideInTopFrames-c3379c94;
316
+ animation-name: fadeInFrames-18201676,slideInTopFrames-18201676;
317
317
  animation-fill-mode: both;
318
318
  }
319
- .slideOutTop[data-v-c3379c94] {
319
+ .slideOutTop[data-v-18201676] {
320
320
  animation-duration: 0.2s;
321
- animation-name: fadeOutFrames-c3379c94,slideOutTopFrames-c3379c94;
321
+ animation-name: fadeOutFrames-18201676,slideOutTopFrames-18201676;
322
322
  animation-fill-mode: both;
323
323
  }
324
- @keyframes slideInTopFrames-c3379c94 {
324
+ @keyframes slideInTopFrames-18201676 {
325
325
  from {
326
326
  transform: translate(0, -12px);
327
327
  animation-timing-function: cubic-bezier(0, 0, 0, 1);
@@ -330,7 +330,7 @@ to {
330
330
  transform: translate(0, 0);
331
331
  }
332
332
  }
333
- @keyframes slideOutTopFrames-c3379c94 {
333
+ @keyframes slideOutTopFrames-18201676 {
334
334
  from {
335
335
  transform: translate(0, 0);
336
336
  animation-timing-function: cubic-bezier(0.33, 0, 0.67, 1);
@@ -339,7 +339,7 @@ to {
339
339
  transform: translate(0, -12px);
340
340
  }
341
341
  }
342
- @keyframes fadeInFrames-c3379c94 {
342
+ @keyframes fadeInFrames-18201676 {
343
343
  from {
344
344
  opacity: 0;
345
345
  animation-timing-function: cubic-bezier(0, 0, 1, 1);
@@ -348,7 +348,7 @@ to {
348
348
  opacity: 1;
349
349
  }
350
350
  }
351
- @keyframes fadeOutFrames-c3379c94 {
351
+ @keyframes fadeOutFrames-18201676 {
352
352
  from {
353
353
  opacity: 1;
354
354
  animation-timing-function: cubic-bezier(0.33, 0, 0.67, 1);
@@ -393,7 +393,7 @@ to {
393
393
  --tw-content: "";
394
394
  content: var(--tw-content);
395
395
  }
396
- .shadow-inner-toggle[data-v-be9ecb77]::after {
396
+ .shadow-inner-toggle[data-v-c544a8a9]::after {
397
397
  box-shadow:
398
398
  rgba(0, 0, 0, 0.3) 0px 1px 2px 0px,
399
399
  rgba(0, 0, 0, 0.05) 0px 0px 1px 0px inset;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pequity/squirrel",
3
3
  "description": "Squirrel component library",
4
- "version": "8.2.0",
4
+ "version": "8.3.0",
5
5
  "packageManager": "pnpm@10.6.4",
6
6
  "type": "module",
7
7
  "scripts": {
@@ -47,42 +47,42 @@
47
47
  "vue-toastification": "^2.0.0-rc.5"
48
48
  },
49
49
  "devDependencies": {
50
- "@commitlint/cli": "^19.8.0",
51
- "@commitlint/config-conventional": "^19.8.0",
52
- "@pequity/eslint-config": "^2.0.0",
50
+ "@commitlint/cli": "^19.8.1",
51
+ "@commitlint/config-conventional": "^19.8.1",
52
+ "@pequity/eslint-config": "^2.0.1",
53
53
  "@playwright/test": "^1.52.0",
54
54
  "@semantic-release/changelog": "^6.0.3",
55
55
  "@semantic-release/git": "^10.0.1",
56
- "@storybook/addon-a11y": "^8.6.12",
57
- "@storybook/addon-actions": "^8.6.12",
58
- "@storybook/addon-essentials": "^8.6.12",
59
- "@storybook/addon-interactions": "^8.6.12",
60
- "@storybook/addon-links": "^8.6.12",
61
- "@storybook/blocks": "^8.6.12",
62
- "@storybook/manager-api": "^8.6.12",
63
- "@storybook/test": "^8.6.12",
56
+ "@storybook/addon-a11y": "^8.6.14",
57
+ "@storybook/addon-actions": "^8.6.14",
58
+ "@storybook/addon-essentials": "^8.6.14",
59
+ "@storybook/addon-interactions": "^8.6.14",
60
+ "@storybook/addon-links": "^8.6.14",
61
+ "@storybook/blocks": "^8.6.14",
62
+ "@storybook/manager-api": "^8.6.14",
63
+ "@storybook/test": "^8.6.14",
64
64
  "@storybook/test-runner": "^0.22.0",
65
- "@storybook/theming": "^8.6.12",
66
- "@storybook/vue3": "^8.6.12",
67
- "@storybook/vue3-vite": "^8.6.12",
68
- "@tanstack/vue-virtual": "3.13.6",
65
+ "@storybook/theming": "^8.6.14",
66
+ "@storybook/vue3": "^8.6.14",
67
+ "@storybook/vue3-vite": "^8.6.14",
68
+ "@tanstack/vue-virtual": "3.13.8",
69
69
  "@types/jsdom": "^21.1.7",
70
70
  "@types/lodash-es": "^4.17.12",
71
- "@types/node": "^22.15.2",
72
- "@vitejs/plugin-vue": "^5.2.3",
73
- "@vitest/coverage-v8": "^3.1.2",
74
- "@vue/compiler-sfc": "3.5.13",
71
+ "@types/node": "^22.15.19",
72
+ "@vitejs/plugin-vue": "^5.2.4",
73
+ "@vitest/coverage-v8": "^3.1.3",
74
+ "@vue/compiler-sfc": "3.5.14",
75
75
  "@vue/test-utils": "^2.4.6",
76
76
  "@vuepic/vue-datepicker": "11.0.2",
77
77
  "autoprefixer": "^10.4.21",
78
- "eslint": "^9.25.1",
78
+ "eslint": "^9.27.0",
79
79
  "eslint-plugin-storybook": "^0.12.0",
80
80
  "floating-vue": "5.2.2",
81
81
  "glob": "^11.0.2",
82
82
  "husky": "^9.1.7",
83
- "iconify-icon": "^2.3.0",
83
+ "iconify-icon": "^3.0.0",
84
84
  "jsdom": "^26.1.0",
85
- "lint-staged": "^15.5.1",
85
+ "lint-staged": "^16.0.0",
86
86
  "lodash-es": "4.17.21",
87
87
  "make-coverage-badge": "^1.2.0",
88
88
  "postcss": "^8.5.3",
@@ -90,15 +90,15 @@
90
90
  "prettier-plugin-tailwindcss": "^0.6.11",
91
91
  "resolve-tspaths": "^0.8.23",
92
92
  "rimraf": "^6.0.1",
93
- "sass": "^1.87.0",
94
- "semantic-release": "^24.2.3",
95
- "storybook": "^8.6.12",
93
+ "sass": "^1.89.0",
94
+ "semantic-release": "^24.2.4",
95
+ "storybook": "^8.6.14",
96
96
  "svgo": "^3.3.2",
97
97
  "tailwindcss": "^3.4.17",
98
98
  "typescript": "5.8.3",
99
- "vite": "^6.3.3",
100
- "vitest": "^3.1.2",
101
- "vue": "3.5.13",
99
+ "vite": "^6.3.5",
100
+ "vitest": "^3.1.3",
101
+ "vue": "3.5.14",
102
102
  "vue-currency-input": "3.2.1",
103
103
  "vue-router": "4.5.1",
104
104
  "vue-toastification": "2.0.0-rc.5",
@@ -11,6 +11,10 @@
11
11
  <script setup lang="ts">
12
12
  import { type PropType } from 'vue';
13
13
 
14
+ defineOptions({
15
+ name: 'PCloseBtn',
16
+ });
17
+
14
18
  type Variant = 'transparent' | 'gray' | 'dark';
15
19
 
16
20
  defineProps({
@@ -2,17 +2,35 @@ import PModal from '@squirrel/components/p-modal/p-modal.vue';
2
2
  import { sleep, waitRAF } from '@tests/vitest.helpers';
3
3
  import { mount } from '@vue/test-utils';
4
4
 
5
- const createWrapper = () => {
6
- return mount(PModal, {
5
+ const createWrapperContainer = (componentArgs) => {
6
+ const args = componentArgs || {};
7
+
8
+ args.appendTo = '#modal-host';
9
+
10
+ const wrapperContainer = {
11
+ components: {
12
+ PModal,
13
+ },
14
+ data() {
15
+ return {
16
+ showModal: false,
17
+ args,
18
+ };
19
+ },
20
+ template: `
21
+ <button @click="showModal = !showModal">Toggle modal</button>
22
+ <div id="modal-host"></div>
23
+ <PModal v-model="showModal" v-bind="args"><p>Modal content goes here...</p></PModal>
24
+ `,
25
+ };
26
+
27
+ return mount(wrapperContainer, {
7
28
  attachTo: document.body,
8
29
  global: {
9
30
  stubs: {
10
31
  transition: false,
11
32
  },
12
33
  },
13
- slots: {
14
- default: '<p>Modal content goes here...</p>',
15
- },
16
34
  });
17
35
  };
18
36
 
@@ -22,24 +40,39 @@ describe('Modal events', () => {
22
40
  });
23
41
 
24
42
  it.each(['before-open', 'opening', 'opened'])('emits a %s event when opening', async (eventName) => {
25
- const wrapper = createWrapper();
43
+ const wrapper = createWrapperContainer();
44
+ const modal = wrapper.findComponent(PModal);
26
45
 
27
- await wrapper.setProps({ modelValue: true });
46
+ await wrapper.find('button').trigger('click');
28
47
  await waitRAF();
29
48
  await sleep(200);
30
- expect(wrapper.emitted()[eventName]).toBeTruthy();
49
+ expect(modal.emitted()[eventName]).toBeTruthy();
31
50
  wrapper.unmount();
32
51
  });
33
52
 
34
53
  it.each(['before-close', 'closing', 'closed'])('emits a %s event when closing', async (eventName) => {
35
- const wrapper = createWrapper();
54
+ const wrapper = createWrapperContainer();
55
+ const modal = wrapper.findComponent(PModal);
36
56
 
37
- await wrapper.setProps({ modelValue: true });
57
+ await wrapper.find('button').trigger('click');
38
58
  await waitRAF();
39
- await wrapper.setProps({ modelValue: false });
59
+ await wrapper.find('button').trigger('click');
40
60
  await waitRAF();
41
61
  await sleep(200);
42
- expect(wrapper.emitted()[eventName]).toBeTruthy();
62
+ expect(modal.emitted()[eventName]).toBeTruthy();
63
+ wrapper.unmount();
64
+ });
65
+
66
+ it('emits a click:overlay event when clicking on the overlay', async () => {
67
+ const wrapper = createWrapperContainer();
68
+ const modal = wrapper.findComponent(PModal);
69
+
70
+ await wrapper.find('button').trigger('click');
71
+ await waitRAF();
72
+
73
+ await wrapper.find('[role="dialog"]').trigger('click');
74
+
75
+ expect(modal.emitted('click:overlay')).toBeTruthy();
43
76
  wrapper.unmount();
44
77
  });
45
78
  });
@@ -26,7 +26,7 @@
26
26
  aria-modal="true"
27
27
  :aria-describedby="`${id}-content`"
28
28
  :aria-labelledby="`${id}-title`"
29
- @click="clickOutside($event)"
29
+ @click="overlayClick($event)"
30
30
  @keydown="keydown($event)"
31
31
  >
32
32
  <div ref="pm" :data-pm-id="id" :class="modalClass" :style="modalStyle">
@@ -94,15 +94,16 @@ defineOptions({
94
94
  name: 'PModal',
95
95
  });
96
96
 
97
- const emit = defineEmits([
98
- 'before-open',
99
- 'opening',
100
- 'opened',
101
- 'before-close',
102
- 'closing',
103
- 'closed',
104
- 'update:modelValue',
105
- ]);
97
+ const emit = defineEmits<{
98
+ 'before-open': [];
99
+ opening: [];
100
+ opened: [];
101
+ 'before-close': [];
102
+ closing: [];
103
+ closed: [];
104
+ 'update:modelValue': [boolean];
105
+ 'click:overlay': [MouseEvent];
106
+ }>();
106
107
 
107
108
  const props = defineProps({
108
109
  name: {
@@ -234,7 +235,9 @@ const close = () => {
234
235
  }
235
236
  };
236
237
 
237
- const clickOutside = (e: MouseEvent) => {
238
+ const overlayClick = (e: MouseEvent) => {
239
+ emit('click:overlay', e);
240
+
238
241
  if (e.target === pmWrapper.value) {
239
242
  close();
240
243
  }
@@ -19,6 +19,10 @@ import PIcon from '@squirrel/components/p-icon/p-icon.vue';
19
19
  import { startCase } from 'lodash-es';
20
20
  import { computed } from 'vue';
21
21
 
22
+ defineOptions({
23
+ name: 'PSteps',
24
+ });
25
+
22
26
  type Props = {
23
27
  steps: T;
24
28
  currentStep: T[number];
@@ -30,7 +30,10 @@
30
30
  import { type ShallowRef } from 'vue';
31
31
  import { type RouteLocationRaw } from 'vue-router';
32
32
 
33
- // types
33
+ defineOptions({
34
+ name: 'PTabs',
35
+ });
36
+
34
37
  type Tab = {
35
38
  name: string;
36
39
  title: string;
@@ -38,7 +41,6 @@ type Tab = {
38
41
  to?: RouteLocationRaw;
39
42
  };
40
43
 
41
- // props
42
44
  defineProps({
43
45
  tabs: {
44
46
  type: Array as () => Tab[],
@@ -54,6 +56,5 @@ defineProps({
54
56
  },
55
57
  });
56
58
 
57
- // emits
58
59
  defineEmits(['click:tab']);
59
60
  </script>
@@ -1,4 +1,5 @@
1
1
  import PToggle from '@squirrel/components/p-toggle/p-toggle.vue';
2
+ import { expect } from '@storybook/test';
2
3
  import { createWrapperFor } from '@tests/vitest.helpers';
3
4
 
4
5
  describe('PToggle.vue', () => {
@@ -55,7 +56,9 @@ describe('PToggle.vue', () => {
55
56
  },
56
57
  });
57
58
 
58
- expect(wrapper.html()).toContain('Test label');
59
+ const label = wrapper.findByText('Test label', 'span');
60
+
61
+ expect(label.classes()).toEqual(['block', 'font-medium', 'text-sm', 'ml-2', 'leading-none']);
59
62
  });
60
63
 
61
64
  it(`renders a label slot`, async () => {
@@ -100,7 +100,7 @@ const toggleClasses = computed(() => {
100
100
  });
101
101
 
102
102
  const toggleLabelClasses = computed(() => {
103
- return `${labelClasses.value.replace('mb-1', '')} ml-2`;
103
+ return `${labelClasses.value.replace('mb-1', '')} ml-2 leading-none`;
104
104
  });
105
105
 
106
106
  const attrs = computed(() => {