@cypress-design/vue-accordion 0.4.4 → 0.4.5
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/.turbo/turbo-build.log +6 -5
- package/Accordion.vue +2 -1
- package/CHANGELOG.md +6 -0
- package/dist/Accordion.vue.d.ts.map +1 -1
- package/dist/index.es.mjs +41 -81
- package/dist/index.es.mjs.map +1 -1
- package/dist/index.umd.js +2 -2
- package/dist/index.umd.js.map +1 -1
- package/package.json +4 -4
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
$ yarn build:module && yarn build:types
|
|
2
2
|
$ yarn vite build
|
|
3
3
|
$ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vite build
|
|
4
|
-
[
|
|
4
|
+
[33mThe CJS build of Vite's Node API is deprecated. See https://vitejs.dev/guide/troubleshooting.html#vite-cjs-node-api-deprecated for more details.[39m
|
|
5
|
+
[36mvite v5.0.4 [32mbuilding for production...[36m[39m
|
|
5
6
|
transforming...
|
|
6
|
-
[32m✓[39m
|
|
7
|
+
[32m✓[39m 4 modules transformed.
|
|
7
8
|
rendering chunks...
|
|
8
9
|
computing gzip size...
|
|
9
|
-
[2mdist/[22m[36mindex.es.mjs [39m[1m[
|
|
10
|
-
[2mdist/[22m[36mindex.umd.js [39m[1m[
|
|
11
|
-
[32m✓ built in
|
|
10
|
+
[2mdist/[22m[36mindex.es.mjs [39m[1m[2m3.88 kB[22m[1m[22m[2m │ gzip: 1.34 kB[22m[2m │ map: 4.73 kB[22m
|
|
11
|
+
[2mdist/[22m[36mindex.umd.js [39m[1m[2m3.62 kB[22m[1m[22m[2m │ gzip: 1.27 kB[22m[2m │ map: 4.61 kB[22m
|
|
12
|
+
[32m✓ built in 2.88s[39m
|
|
12
13
|
$ yarn vue-tsc --project ./tsconfig.build.json
|
|
13
14
|
$ /home/runner/work/cypress-design/cypress-design/node_modules/.bin/vue-tsc --project ./tsconfig.build.json
|
package/Accordion.vue
CHANGED
|
@@ -56,6 +56,7 @@ import {
|
|
|
56
56
|
SVGAttributes,
|
|
57
57
|
onMounted,
|
|
58
58
|
ref,
|
|
59
|
+
toRaw,
|
|
59
60
|
useSlots,
|
|
60
61
|
} from 'vue'
|
|
61
62
|
import { CssClasses } from '@cypress-design/constants-accordion'
|
|
@@ -111,5 +112,5 @@ onMounted(function () {
|
|
|
111
112
|
}
|
|
112
113
|
})
|
|
113
114
|
|
|
114
|
-
const Icon = props.icon
|
|
115
|
+
const Icon = toRaw(props.icon)
|
|
115
116
|
</script>
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @cypress-design/vue-accordion
|
|
2
2
|
|
|
3
|
+
## 0.4.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#350](https://github.com/cypress-io/cypress-design/pull/350) [`abc414d`](https://github.com/cypress-io/cypress-design/commit/abc414da149eb6fe0cfa61497a0aa8630d8d8d6e) Thanks [@elevatebart](https://github.com/elevatebart)! - fix: remove some warnings returned by Vue compiler
|
|
8
|
+
|
|
3
9
|
## 0.4.4
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Accordion.vue.d.ts","sourceRoot":"","sources":["../Accordion.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,aAAa,
|
|
1
|
+
{"version":3,"file":"Accordion.vue.d.ts","sourceRoot":"","sources":["../Accordion.vue.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,mBAAmB,EACnB,aAAa,EAKd,MAAM,KAAK,CAAA;;IAkUV;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;;IAjCH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;;OAGG;;;;;;AAIL,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
package/dist/index.es.mjs
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineComponent as k, useSlots as x, ref as u, onMounted as g, toRaw as h, openBlock as t, createElementBlock as a, createElementVNode as n, normalizeClass as r, unref as e, renderSlot as p, createBlock as v, createCommentVNode as c, toDisplayString as d, createVNode as b } from "vue";
|
|
2
2
|
import { DetailsAnimation as N } from "@cypress-design/details-animation";
|
|
3
|
-
import
|
|
4
|
-
import { ICON_COLOR_PROP_NAMES as D } from "@cypress-design/icon-registry";
|
|
3
|
+
import { IconChevronDownSmall as w } from "@cypress-design/vue-icon";
|
|
5
4
|
const s = {
|
|
6
5
|
summary: "details-none card open:rounded-b-none",
|
|
7
6
|
summaryDiv: "flex flex-row py-[12px] px-[24px] flex-nowrap items-center min-h-[63px]",
|
|
@@ -15,46 +14,7 @@ const s = {
|
|
|
15
14
|
chevron: "flex-shrink-0 transition transform rotate-0 open:rotate-180",
|
|
16
15
|
contentWrapper: "border border-gray-100 rounded-b-md border-t-0",
|
|
17
16
|
content: "px-[24px] py-[16px]"
|
|
18
|
-
},
|
|
19
|
-
body: m,
|
|
20
|
-
compiledClasses: a,
|
|
21
|
-
size: l,
|
|
22
|
-
...r
|
|
23
|
-
}) => {
|
|
24
|
-
const t = Object.keys(r).reduce(
|
|
25
|
-
(e, p) => (!D.includes(
|
|
26
|
-
p
|
|
27
|
-
) && p !== "name" && (e[p] = r[p]), e),
|
|
28
|
-
{}
|
|
29
|
-
), i = {
|
|
30
|
-
width: l,
|
|
31
|
-
height: l,
|
|
32
|
-
viewBox: `0 0 ${l} ${l}`,
|
|
33
|
-
fill: "none",
|
|
34
|
-
innerHTML: m,
|
|
35
|
-
class: void 0,
|
|
36
|
-
...t
|
|
37
|
-
// add all standard attributes back to the svg tag
|
|
38
|
-
};
|
|
39
|
-
return a.length && (i.class = a.join(" ")), i;
|
|
40
|
-
}, z = (m) => {
|
|
41
|
-
const { interactiveColorsOnGroup: a, name: l, ...r } = m, { sizeWithDefault: t, compiledClasses: i } = $.getComponentAttributes({
|
|
42
|
-
...r,
|
|
43
|
-
availableSizes: ["8", "16"],
|
|
44
|
-
interactiveColorsOnGroup: a
|
|
45
|
-
}), e = {
|
|
46
|
-
8: '<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m1 2.5 3 3 3-3" class="icon-dark"/>',
|
|
47
|
-
16: '<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="m4 6 4 4 4-4" class="icon-dark"/>'
|
|
48
|
-
}[t];
|
|
49
|
-
if (!e)
|
|
50
|
-
throw Error(`Icon "chevron-down-small" is not available in size ${t}`);
|
|
51
|
-
return h("svg", O({
|
|
52
|
-
...r,
|
|
53
|
-
size: t,
|
|
54
|
-
body: e,
|
|
55
|
-
compiledClasses: i
|
|
56
|
-
}));
|
|
57
|
-
}, B = { class: "flex-grow grow pr-[16px]" }, T = /* @__PURE__ */ g({
|
|
17
|
+
}, D = { class: "flex-grow grow pr-[16px]" }, T = /* @__PURE__ */ k({
|
|
58
18
|
__name: "Accordion",
|
|
59
19
|
props: {
|
|
60
20
|
title: {},
|
|
@@ -66,65 +26,65 @@ const s = {
|
|
|
66
26
|
headingClassName: {},
|
|
67
27
|
fullWidthContent: { type: Boolean }
|
|
68
28
|
},
|
|
69
|
-
setup(
|
|
70
|
-
const
|
|
71
|
-
|
|
72
|
-
|
|
29
|
+
setup(y) {
|
|
30
|
+
const f = x(), l = y, i = u(null), m = u(null);
|
|
31
|
+
g(function() {
|
|
32
|
+
m.value && i.value && new N(m.value, i.value);
|
|
73
33
|
});
|
|
74
|
-
const
|
|
75
|
-
return (
|
|
34
|
+
const C = h(l.icon);
|
|
35
|
+
return (o, $) => (t(), a("details", {
|
|
76
36
|
ref_key: "$details",
|
|
77
|
-
ref:
|
|
37
|
+
ref: m
|
|
78
38
|
}, [
|
|
79
|
-
|
|
80
|
-
class:
|
|
39
|
+
n("summary", {
|
|
40
|
+
class: r([e(s).summary, o.headingClassName ?? e(s).summaryColor])
|
|
81
41
|
}, [
|
|
82
|
-
|
|
83
|
-
class:
|
|
42
|
+
n("span", {
|
|
43
|
+
class: r(e(s).summaryDiv)
|
|
84
44
|
}, [
|
|
85
|
-
|
|
86
|
-
class:
|
|
45
|
+
n("span", {
|
|
46
|
+
class: r(e(s).icon)
|
|
87
47
|
}, [
|
|
88
|
-
|
|
89
|
-
|
|
48
|
+
p(o.$slots, "iconEl", {}, () => [
|
|
49
|
+
l.icon ? (t(), v(e(C), { key: 0 })) : c("", !0)
|
|
90
50
|
])
|
|
91
51
|
], 2),
|
|
92
|
-
(
|
|
52
|
+
(l.icon || e(f).iconEl) && o.separator ? (t(), a("span", {
|
|
93
53
|
key: 0,
|
|
94
|
-
class:
|
|
54
|
+
class: r(e(s).separator),
|
|
95
55
|
role: "separator"
|
|
96
|
-
}, null, 2)) :
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
class:
|
|
100
|
-
|
|
101
|
-
|
|
56
|
+
}, null, 2)) : c("", !0),
|
|
57
|
+
n("span", D, [
|
|
58
|
+
n("span", {
|
|
59
|
+
class: r([
|
|
60
|
+
o.titleClassName ? o.titleClassName : e(s).summaryTitleColor,
|
|
61
|
+
e(s).summaryTitle
|
|
102
62
|
])
|
|
103
|
-
},
|
|
104
|
-
|
|
63
|
+
}, d(o.title), 3),
|
|
64
|
+
o.description ? (t(), a("span", {
|
|
105
65
|
key: 0,
|
|
106
|
-
class:
|
|
107
|
-
|
|
108
|
-
|
|
66
|
+
class: r([
|
|
67
|
+
e(s).summaryDescription,
|
|
68
|
+
o.descriptionClassName ?? e(s).summaryDescriptionColor
|
|
109
69
|
])
|
|
110
|
-
},
|
|
70
|
+
}, d(o.description), 3)) : c("", !0)
|
|
111
71
|
]),
|
|
112
|
-
|
|
72
|
+
b(e(w), {
|
|
113
73
|
strokeColor: "gray-300",
|
|
114
|
-
class:
|
|
74
|
+
class: r(["open:icon-dark-gray-500", e(s).chevron])
|
|
115
75
|
}, null, 8, ["class"])
|
|
116
76
|
], 2)
|
|
117
77
|
], 2),
|
|
118
|
-
|
|
78
|
+
n("div", {
|
|
119
79
|
ref_key: "$content",
|
|
120
|
-
ref:
|
|
121
|
-
class:
|
|
80
|
+
ref: i,
|
|
81
|
+
class: r(e(s).contentWrapper)
|
|
122
82
|
}, [
|
|
123
|
-
|
|
83
|
+
o.fullWidthContent ? p(o.$slots, "default", { key: 0 }) : (t(), a("div", {
|
|
124
84
|
key: 1,
|
|
125
|
-
class:
|
|
85
|
+
class: r(e(s).content)
|
|
126
86
|
}, [
|
|
127
|
-
|
|
87
|
+
p(o.$slots, "default")
|
|
128
88
|
], 2))
|
|
129
89
|
], 2)
|
|
130
90
|
], 512));
|
|
@@ -135,4 +95,4 @@ export {
|
|
|
135
95
|
};
|
|
136
96
|
//# sourceMappingURL=index.es.mjs.map
|
|
137
97
|
|
|
138
|
-
/* <wind-keep class="flex-grow grow pr-[16px] open:rounded-b-none flex flex-row py-[12px] px-[24px] flex-nowrap items-center min-h-[63px] bg-white text-[18px] leading-[28px] font-medium text-indigo-500 block text-[14px] leading-[20px] font-normal text-gray-700 mr-[24px] flex-shrink-0 w-[1px] h-[40px] bg-gray-100 mr-[16px] transition transform rotate-0 open:rotate-180 border border-gray-100 rounded-b-md border-t-0 py-[16px]"> */
|
|
98
|
+
/* <wind-keep class="flex-grow grow pr-[16px] open:icon-dark-gray-500 icon-dark-gray-300 details-none card open:rounded-b-none flex flex-row py-[12px] px-[24px] flex-nowrap items-center min-h-[63px] bg-white text-[18px] leading-[28px] font-medium text-indigo-500 block text-[14px] leading-[20px] font-normal text-gray-700 mr-[24px] flex-shrink-0 w-[1px] h-[40px] bg-gray-100 mr-[16px] transition transform rotate-0 open:rotate-180 border border-gray-100 rounded-b-md border-t-0 py-[16px]"> */
|