@cypress-design/vue-checkbox 0.2.0 → 0.2.1

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,14 @@
1
1
  # @cypress-design/vue-checkbox
2
2
 
3
+ ## 0.2.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`e3eb9c7`](https://github.com/cypress-io/cypress-design/commit/e3eb9c7fee2d7a6e0a773e85ed4b73be04d83587) Thanks [@elevatebart](https://github.com/elevatebart)! - downgrade typescript to 4.4 for compat with app
8
+
9
+ - Updated dependencies [[`e3eb9c7`](https://github.com/cypress-io/cypress-design/commit/e3eb9c7fee2d7a6e0a773e85ed4b73be04d83587)]:
10
+ - @cypress-design/vue-icon@0.4.2
11
+
3
12
  ## 0.2.0
4
13
 
5
14
  ### Minor Changes
package/Checkbox.vue CHANGED
@@ -15,6 +15,7 @@ const props = withDefaults(
15
15
  checked?: boolean
16
16
  }>(),
17
17
  {
18
+ // @ts-ignore
18
19
  id: crypto.randomUUID(),
19
20
  color: 'indigo',
20
21
  }
@@ -6,7 +6,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
6
6
  disabled?: boolean | undefined;
7
7
  checked?: boolean | undefined;
8
8
  }>, {
9
- id: string;
9
+ id: any;
10
10
  color: string;
11
11
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
12
12
  "update:modelValue": (value: boolean) => void;
@@ -18,7 +18,7 @@ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_T
18
18
  disabled?: boolean | undefined;
19
19
  checked?: boolean | undefined;
20
20
  }>, {
21
- id: string;
21
+ id: any;
22
22
  color: string;
23
23
  }>>> & {
24
24
  "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Checkbox.vue.d.ts","sourceRoot":"","sources":["../Checkbox.vue.ts"],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AC,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;KAE5B,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.js CHANGED
@@ -1,69 +1,32 @@
1
1
  import { h, defineComponent, ref, computed, openBlock, createElementBlock, createElementVNode, createBlock, unref, createCommentVNode, normalizeClass, renderSlot, toDisplayString } from "vue";
2
2
  import * as iconsRegistry from "@cypress-design/icon-registry";
3
- var __defProp = Object.defineProperty;
4
- var __defProps = Object.defineProperties;
5
- var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
6
- var __getOwnPropSymbols = Object.getOwnPropertySymbols;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __propIsEnum = Object.prototype.propertyIsEnumerable;
9
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
10
- var __spreadValues = (a, b) => {
11
- for (var prop in b || (b = {}))
12
- if (__hasOwnProp.call(b, prop))
13
- __defNormalProp(a, prop, b[prop]);
14
- if (__getOwnPropSymbols)
15
- for (var prop of __getOwnPropSymbols(b)) {
16
- if (__propIsEnum.call(b, prop))
17
- __defNormalProp(a, prop, b[prop]);
3
+ const compileVueIconProperties = ({
4
+ body,
5
+ compiledClasses,
6
+ size,
7
+ class: className,
8
+ interactiveColorsOnGroup,
9
+ ...attributes
10
+ }) => {
11
+ Object.keys(attributes).forEach((key) => {
12
+ if (key.toLowerCase().endsWith("color")) {
13
+ delete attributes[key];
18
14
  }
19
- return a;
20
- };
21
- var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
- var __objRest = (source, exclude) => {
23
- var target = {};
24
- for (var prop in source)
25
- if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
26
- target[prop] = source[prop];
27
- if (source != null && __getOwnPropSymbols)
28
- for (var prop of __getOwnPropSymbols(source)) {
29
- if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
30
- target[prop] = source[prop];
31
- }
32
- return target;
33
- };
34
- const compileVueIconProperties = (_a) => {
35
- var _b = _a, {
36
- body,
37
- compiledClasses,
38
- size,
39
- strokeColor,
40
- fillColor,
41
- secondaryStrokeColor,
42
- secondaryFillColor,
43
- class: className
44
- } = _b, attributes = __objRest(_b, [
45
- "body",
46
- "compiledClasses",
47
- "size",
48
- "strokeColor",
49
- "fillColor",
50
- "secondaryStrokeColor",
51
- "secondaryFillColor",
52
- "class"
53
- ]);
54
- const componentProps = __spreadValues({
15
+ });
16
+ const componentProps = {
55
17
  width: size,
56
18
  height: size,
57
19
  fill: "none",
58
- innerHTML: body
59
- }, attributes);
20
+ innerHTML: body,
21
+ ...attributes
22
+ };
60
23
  if (compiledClasses.length) {
61
24
  componentProps.class = compiledClasses.join(" ");
62
25
  }
63
26
  return componentProps;
64
27
  };
65
28
  const IconCheckmarkSmall = (props) => {
66
- const { sizeWithDefault: size, compiledClasses } = iconsRegistry.getComponentAttributes(__spreadProps(__spreadValues({}, props), { availableSizes: ["16"] }));
29
+ const { sizeWithDefault: size, compiledClasses } = iconsRegistry.getComponentAttributes({ ...props, availableSizes: ["16"] });
67
30
  const iconBodies = {
68
31
  "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"/>'
69
32
  };
@@ -71,15 +34,17 @@ const IconCheckmarkSmall = (props) => {
71
34
  if (!body) {
72
35
  throw Error(`Icon "checkmark-small" is not available in size ${size}`);
73
36
  }
74
- return h("svg", compileVueIconProperties(__spreadProps(__spreadValues({}, props), {
37
+ return h("svg", compileVueIconProperties({
38
+ ...props,
75
39
  size,
76
40
  body,
77
41
  compiledClasses
78
- })));
42
+ }));
79
43
  };
80
44
  const _hoisted_1 = { class: "relative flex items-center" };
81
45
  const _hoisted_2 = ["id", "name", "disabled", "checked"];
82
46
  const _sfc_main = /* @__PURE__ */ defineComponent({
47
+ __name: "Checkbox",
83
48
  props: {
84
49
  id: { default: crypto.randomUUID() },
85
50
  modelValue: { type: Boolean },