@cypress-design/vue-checkbox 0.4.6 → 0.5.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @cypress-design/vue-checkbox
2
2
 
3
+ ## 0.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#151](https://github.com/cypress-io/cypress-design/pull/151) [`8b0e735`](https://github.com/cypress-io/cypress-design/commit/8b0e7356eb64a6b3583d3486dda8ecbb11c34cca) Thanks [@elevatebart](https://github.com/elevatebart)! - refactor: use clases compatible with both windi and tailwind
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [[`106b61a`](https://github.com/cypress-io/cypress-design/commit/106b61a97888f956a4c9d235fde5efb4243e1445), [`7b4f416`](https://github.com/cypress-io/cypress-design/commit/7b4f4162a0d150aa8cab7ec239faebb58c39464d)]:
12
+ - @cypress-design/vue-icon@0.18.0
13
+
3
14
  ## 0.4.6
4
15
 
5
16
  ### Patch Changes
package/Checkbox.vue CHANGED
@@ -60,7 +60,6 @@ function updated() {
60
60
  }
61
61
 
62
62
  const checkboxClasses = computed(() => [
63
- 'block border-1 border-solid rounded h-16px w-16px flex-shrink-0',
64
63
  props.disabled
65
64
  ? 'border-gray-200 bg-gray-100'
66
65
  : localChecked.value
@@ -90,12 +89,15 @@ const checkboxClasses = computed(() => [
90
89
  strokeColor="white"
91
90
  class="absolute"
92
91
  />
93
- <span :class="checkboxClasses" />
92
+ <span
93
+ :class="checkboxClasses"
94
+ class="block border border-solid rounded h-[16px] w-[16px] flex-shrink-0"
95
+ />
94
96
  <slot name="label">
95
97
  <span
96
98
  v-if="label"
97
99
  :class="[
98
- 'ml-8px text-16px leading-24px font-light select-none',
100
+ 'ml-[8px] text-[16px] leading-[24px] font-light select-none',
99
101
  disabled ? 'text-gray-500' : 'text-gray-800',
100
102
  ]"
101
103
  >
@@ -18,8 +18,10 @@ describe('<Checkbox />', () => {
18
18
  })
19
19
 
20
20
  cy.get('input[type="checkbox"]').should('be.checked')
21
+ cy.percySnapshot()
21
22
  cy.contains('Welcome guide settings').click()
22
23
  cy.get('input[type="checkbox"]').should('not.be.checked')
24
+ cy.percySnapshot()
23
25
  })
24
26
 
25
27
  it('changes when checkbox is clicked', () => {
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.vue.d.ts","sourceRoot":"","sources":["../Checkbox.vue.ts"],"names":[],"mappings":";;;;;gBAkFS,MAAM;mBAaH,KAAK,GAAG,QAAQ,GAAG,MAAM;;YAjBjC;;;eAGG;;YAEH;;eAEG;;YAEH;;eAEG;;YAEH;;;eAGG;;YAEH;;eAEG;;;YAGH;;;eAGG;;;;;;;;;;;;;;;;;;;;;;YA1BH;;;eAGG;;YAEH;;eAEG;;YAEH;;eAEG;;YAEH;;;eAGG;;YAEH;;eAEG;;;YAGH;;;eAGG;;;;;;;;;;gBAtBE,MAAM;mBAaH,KAAK,GAAG,QAAQ,GAAG,MAAM;;;;;;;;;;;;;;;;;;;;;;QAjBjC;;;WAGG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;;WAGG;;QAEH;;WAEG;;;QAGH;;;WAGG;;;;;;;;;;;;IA1BH;;;OAGG;;IAEH;;OAEG;;IAEH;;OAEG;;IAEH;;;OAGG;;IAEH;;OAEG;;;IAGH;;;OAGG;;;;;;;;;;QAtBE,MAAM;WAaH,KAAK,GAAG,QAAQ,GAAG,MAAM;;;;;;AApFrC,wBAgHK;AACL,aAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,aAAK,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,C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AAG,KAAK,GAAG,CAAC,CAAC;AACjE,aAAK,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,aAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE3B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG;QACzD,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,GAAG,CAAC,CAAC,CAAC,CAAC;CACR,CAAC"}
package/dist/index.es.mjs CHANGED
@@ -9,15 +9,15 @@ const S = ({
9
9
  interactiveColorsOnGroup: c,
10
10
  ...a
11
11
  }) => {
12
- const n = Object.keys(a).reduce((u, s) => (B.includes(s) || (u[s] = a[s]), u), {}), r = {
12
+ const r = Object.keys(a).reduce((u, n) => (!B.includes(n) && n !== "name" && (u[n] = a[n]), u), {}), s = {
13
13
  width: e,
14
14
  height: e,
15
15
  viewBox: `0 0 ${e} ${e}`,
16
16
  fill: "none",
17
17
  innerHTML: o,
18
- ...n
18
+ ...r
19
19
  };
20
- return t.length && (r.class = t.join(" ")), r;
20
+ return t.length && (s.class = t.join(" ")), s;
21
21
  }, j = (o) => {
22
22
  const { sizeWithDefault: t, compiledClasses: e } = w.getComponentAttributes({ ...o, availableSizes: ["16"] }), l = {
23
23
  16: '<path d="M5 8.5 7.5 11 11 5" stroke="currentColor" class="icon-dark" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>'
@@ -52,14 +52,13 @@ const $ = /* @__PURE__ */ p({
52
52
  l.value = !l.value, t("update:modelValue", l.value);
53
53
  }
54
54
  const a = x(() => [
55
- "block border-1 border-solid rounded h-16px w-16px flex-shrink-0",
56
55
  e.disabled ? "border-gray-200 bg-gray-100" : l.value ? {
57
56
  "border-indigo-500 bg-indigo-400": e.color === "indigo",
58
57
  "border-jade-500 bg-jade-400": e.color === "jade",
59
58
  "border-red-500 bg-red-400": e.color === "red"
60
59
  } : "border-gray-200 bg-white"
61
60
  ]);
62
- return (n, r) => (i(), b("span", z, [
61
+ return (r, s) => (i(), b("span", z, [
63
62
  d("input", {
64
63
  id: o.id,
65
64
  class: "absolute inset-0 w-0 h-0 opacity-0",
@@ -79,13 +78,13 @@ const $ = /* @__PURE__ */ p({
79
78
  class: "absolute"
80
79
  })) : h("", !0),
81
80
  d("span", {
82
- class: g(m(a))
81
+ class: g([m(a), "block border border-solid rounded h-[16px] w-[16px] flex-shrink-0"])
83
82
  }, null, 2),
84
- C(n.$slots, "label", {}, () => [
83
+ C(r.$slots, "label", {}, () => [
85
84
  o.label ? (i(), b("span", {
86
85
  key: 0,
87
86
  class: g([
88
- "ml-8px text-16px leading-24px font-light select-none",
87
+ "ml-[8px] text-[16px] leading-[24px] font-light select-none",
89
88
  o.disabled ? "text-gray-500" : "text-gray-800"
90
89
  ])
91
90
  }, v(o.label), 3)) : h("", !0)
@@ -98,5 +97,5 @@ export {
98
97
  $ as default
99
98
  };
100
99
 
101
- /* <windicss-keep class="block border-1 border-solid rounded h-16px w-16px flex-shrink-0 border-gray-200 bg-gray-100 border-indigo-500 bg-indigo-400 border-jade-500 bg-jade-400 border-red-500 bg-red-400 bg-white relative flex items-center absolute inset-0 w-0 h-0 opacity-0 ml-8px text-16px leading-24px font-light select-none text-gray-500 text-gray-800 icon-dark-white"> */
100
+ /* <windicss-keep class="border-gray-200 bg-gray-100 border-indigo-500 bg-indigo-400 border-jade-500 bg-jade-400 border-red-500 bg-red-400 bg-white block relative flex items-center absolute inset-0 w-0 h-0 opacity-0 border border-solid rounded h-[16px] w-[16px] flex-shrink-0 ml-[8px] text-[16px] leading-[24px] font-light select-none text-gray-500 text-gray-800 icon-dark-white"> */
102
101
  //# sourceMappingURL=index.es.mjs.map