@mekari/pixel3-spinner 0.0.16 → 0.0.17-dev.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.
@@ -6,7 +6,7 @@ var spinnerProps = {
6
6
  },
7
7
  color: {
8
8
  type: String,
9
- default: "currentcolor"
9
+ default: ""
10
10
  }
11
11
  };
12
12
 
@@ -1,16 +1,20 @@
1
1
  import {
2
2
  spinnerProps
3
- } from "./chunk-7TFUUHFL.mjs";
3
+ } from "./chunk-LCWJBKNT.mjs";
4
4
 
5
5
  // src/spinner.tsx
6
6
  import { createVNode as _createVNode } from "vue";
7
7
  import { defineComponent, computed } from "vue";
8
8
  import { MpIcon } from "@mekari/pixel3-icon";
9
+ import { usePixelTheme } from "@mekari/pixel3-utils";
9
10
  import { spinnerRecipe } from "@mekari/pixel3-styled-system/recipes";
10
11
  var MpSpinner = defineComponent({
11
12
  name: "MpSpinner",
12
13
  props: spinnerProps,
13
14
  setup(props) {
15
+ const {
16
+ isNextTheme
17
+ } = usePixelTheme();
14
18
  const classes = computed(() => {
15
19
  return spinnerRecipe({
16
20
  size: props.size
@@ -21,13 +25,14 @@ var MpSpinner = defineComponent({
21
25
  size,
22
26
  color
23
27
  } = props;
28
+ const defaultColor = isNextTheme.value ? "icon.default" : "currentColor";
24
29
  return _createVNode("div", {
25
30
  "class": classes.value,
26
31
  "data-pixel-component": "MpSpinner"
27
32
  }, [_createVNode(MpIcon, {
28
33
  "name": "loader-",
29
34
  "size": size,
30
- "color": color
35
+ "color": color || defaultColor
31
36
  }, null)]);
32
37
  };
33
38
  }
package/dist/index.js CHANGED
@@ -28,6 +28,7 @@ module.exports = __toCommonJS(src_exports);
28
28
  var import_vue = require("vue");
29
29
  var import_vue2 = require("vue");
30
30
  var import_pixel3_icon = require("@mekari/pixel3-icon");
31
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
31
32
  var import_recipes = require("@mekari/pixel3-styled-system/recipes");
32
33
 
33
34
  // src/modules/spinner.props.ts
@@ -38,7 +39,7 @@ var spinnerProps = {
38
39
  },
39
40
  color: {
40
41
  type: String,
41
- default: "currentcolor"
42
+ default: ""
42
43
  }
43
44
  };
44
45
 
@@ -47,6 +48,9 @@ var MpSpinner = (0, import_vue2.defineComponent)({
47
48
  name: "MpSpinner",
48
49
  props: spinnerProps,
49
50
  setup(props) {
51
+ const {
52
+ isNextTheme
53
+ } = (0, import_pixel3_utils.usePixelTheme)();
50
54
  const classes = (0, import_vue2.computed)(() => {
51
55
  return (0, import_recipes.spinnerRecipe)({
52
56
  size: props.size
@@ -57,13 +61,14 @@ var MpSpinner = (0, import_vue2.defineComponent)({
57
61
  size,
58
62
  color
59
63
  } = props;
64
+ const defaultColor = isNextTheme.value ? "icon.default" : "currentColor";
60
65
  return (0, import_vue.createVNode)("div", {
61
66
  "class": classes.value,
62
67
  "data-pixel-component": "MpSpinner"
63
68
  }, [(0, import_vue.createVNode)(import_pixel3_icon.MpIcon, {
64
69
  "name": "loader-",
65
70
  "size": size,
66
- "color": color
71
+ "color": color || defaultColor
67
72
  }, null)]);
68
73
  };
69
74
  }
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpSpinner
3
- } from "./chunk-WYMDJCGH.mjs";
4
- import "./chunk-7TFUUHFL.mjs";
3
+ } from "./chunk-QAWSUC43.mjs";
4
+ import "./chunk-LCWJBKNT.mjs";
5
5
  export {
6
6
  MpSpinner
7
7
  };
@@ -1 +1 @@
1
- {"inputs":{"src/modules/spinner.props.ts":{"bytes":710,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/spinner.tsx":{"bytes":973,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/spinner.props.ts","kind":"import-statement","original":"./modules/spinner.props"}],"format":"esm"},"src/index.ts":{"bytes":123,"imports":[{"path":"src/spinner.tsx","kind":"import-statement","original":"./spinner"}],"format":"esm"},"src/modules/spinner.type.ts":{"bytes":123,"imports":[],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":123},"src/spinner.tsx":{"bytesInOutput":828},"src/modules/spinner.props.ts":{"bytesInOutput":136}},"bytes":2079},"dist/spinner.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/spinner.tsx","inputs":{"src/spinner.tsx":{"bytesInOutput":963},"src/modules/spinner.props.ts":{"bytesInOutput":136}},"bytes":2074},"dist/modules/spinner.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/spinner.props.ts","inputs":{"src/modules/spinner.props.ts":{"bytesInOutput":295}},"bytes":1233},"dist/modules/spinner.type.js":{"imports":[],"exports":[],"entryPoint":"src/modules/spinner.type.ts","inputs":{"src/modules/spinner.type.ts":{"bytesInOutput":84}},"bytes":787}}}
1
+ {"inputs":{"src/modules/spinner.props.ts":{"bytes":698,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/spinner.tsx":{"bytes":1178,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/spinner.props.ts","kind":"import-statement","original":"./modules/spinner.props"}],"format":"esm"},"src/index.ts":{"bytes":123,"imports":[{"path":"src/spinner.tsx","kind":"import-statement","original":"./spinner"}],"format":"esm"},"src/modules/spinner.type.ts":{"bytes":123,"imports":[],"format":"esm"}},"outputs":{"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":123},"src/spinner.tsx":{"bytesInOutput":1063},"src/modules/spinner.props.ts":{"bytesInOutput":124}},"bytes":2302},"dist/spinner.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-utils","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/spinner.tsx","inputs":{"src/spinner.tsx":{"bytesInOutput":1198},"src/modules/spinner.props.ts":{"bytesInOutput":124}},"bytes":2297},"dist/modules/spinner.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/spinner.props.ts","inputs":{"src/modules/spinner.props.ts":{"bytesInOutput":283}},"bytes":1221},"dist/modules/spinner.type.js":{"imports":[],"exports":[],"entryPoint":"src/modules/spinner.type.ts","inputs":{"src/modules/spinner.type.ts":{"bytesInOutput":84}},"bytes":787}}}
@@ -1 +1 @@
1
- {"inputs":{"src/modules/spinner.props.ts":{"bytes":710,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/spinner.tsx":{"bytes":973,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/spinner.props.ts","kind":"import-statement","original":"./modules/spinner.props"}],"format":"esm"},"src/index.ts":{"bytes":123,"imports":[{"path":"src/spinner.tsx","kind":"import-statement","original":"./spinner"}],"format":"esm"},"src/modules/spinner.type.ts":{"bytes":123,"imports":[],"format":"esm"}},"outputs":{"dist/index.mjs":{"imports":[{"path":"dist/chunk-WYMDJCGH.mjs","kind":"import-statement"},{"path":"dist/chunk-7TFUUHFL.mjs","kind":"import-statement"}],"exports":["MpSpinner"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":107},"dist/spinner.mjs":{"imports":[{"path":"dist/chunk-WYMDJCGH.mjs","kind":"import-statement"},{"path":"dist/chunk-7TFUUHFL.mjs","kind":"import-statement"}],"exports":["MpSpinner"],"entryPoint":"src/spinner.tsx","inputs":{},"bytes":107},"dist/chunk-WYMDJCGH.mjs":{"imports":[{"path":"dist/chunk-7TFUUHFL.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["MpSpinner"],"inputs":{"src/spinner.tsx":{"bytesInOutput":747}},"bytes":847},"dist/modules/spinner.props.mjs":{"imports":[{"path":"dist/chunk-7TFUUHFL.mjs","kind":"import-statement"}],"exports":["spinnerProps"],"entryPoint":"src/modules/spinner.props.ts","inputs":{},"bytes":83},"dist/chunk-7TFUUHFL.mjs":{"imports":[],"exports":["spinnerProps"],"inputs":{"src/modules/spinner.props.ts":{"bytesInOutput":136}},"bytes":196},"dist/modules/spinner.type.mjs":{"imports":[],"exports":[],"entryPoint":"src/modules/spinner.type.ts","inputs":{"src/modules/spinner.type.ts":{"bytesInOutput":0}},"bytes":0}}}
1
+ {"inputs":{"src/modules/spinner.props.ts":{"bytes":698,"imports":[{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true}],"format":"esm"},"src/spinner.tsx":{"bytes":1178,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"src/modules/spinner.props.ts","kind":"import-statement","original":"./modules/spinner.props"}],"format":"esm"},"src/index.ts":{"bytes":123,"imports":[{"path":"src/spinner.tsx","kind":"import-statement","original":"./spinner"}],"format":"esm"},"src/modules/spinner.type.ts":{"bytes":123,"imports":[],"format":"esm"}},"outputs":{"dist/index.mjs":{"imports":[{"path":"dist/chunk-QAWSUC43.mjs","kind":"import-statement"},{"path":"dist/chunk-LCWJBKNT.mjs","kind":"import-statement"}],"exports":["MpSpinner"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":107},"dist/spinner.mjs":{"imports":[{"path":"dist/chunk-QAWSUC43.mjs","kind":"import-statement"},{"path":"dist/chunk-LCWJBKNT.mjs","kind":"import-statement"}],"exports":["MpSpinner"],"entryPoint":"src/spinner.tsx","inputs":{},"bytes":107},"dist/chunk-QAWSUC43.mjs":{"imports":[{"path":"dist/chunk-LCWJBKNT.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-utils","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true}],"exports":["MpSpinner"],"inputs":{"src/spinner.tsx":{"bytesInOutput":952}},"bytes":1052},"dist/modules/spinner.props.mjs":{"imports":[{"path":"dist/chunk-LCWJBKNT.mjs","kind":"import-statement"}],"exports":["spinnerProps"],"entryPoint":"src/modules/spinner.props.ts","inputs":{},"bytes":83},"dist/chunk-LCWJBKNT.mjs":{"imports":[],"exports":["spinnerProps"],"inputs":{"src/modules/spinner.props.ts":{"bytesInOutput":124}},"bytes":184},"dist/modules/spinner.type.mjs":{"imports":[],"exports":[],"entryPoint":"src/modules/spinner.type.ts","inputs":{"src/modules/spinner.type.ts":{"bytesInOutput":0}},"bytes":0}}}
@@ -10,7 +10,7 @@ declare const spinnerProps: {
10
10
  };
11
11
  readonly color: {
12
12
  readonly type: PropType<CombinedString | ColorToken>;
13
- readonly default: "currentcolor";
13
+ readonly default: "";
14
14
  };
15
15
  };
16
16
  type SpinnerPropsTest = ExtractPublicPropTypes<typeof spinnerProps>;
@@ -10,7 +10,7 @@ declare const spinnerProps: {
10
10
  };
11
11
  readonly color: {
12
12
  readonly type: PropType<CombinedString | ColorToken>;
13
- readonly default: "currentcolor";
13
+ readonly default: "";
14
14
  };
15
15
  };
16
16
  type SpinnerPropsTest = ExtractPublicPropTypes<typeof spinnerProps>;
@@ -30,7 +30,7 @@ var spinnerProps = {
30
30
  },
31
31
  color: {
32
32
  type: String,
33
- default: "currentcolor"
33
+ default: ""
34
34
  }
35
35
  };
36
36
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  spinnerProps
3
- } from "../chunk-7TFUUHFL.mjs";
3
+ } from "../chunk-LCWJBKNT.mjs";
4
4
  export {
5
5
  spinnerProps
6
6
  };
package/dist/spinner.js CHANGED
@@ -26,6 +26,7 @@ module.exports = __toCommonJS(spinner_exports);
26
26
  var import_vue = require("vue");
27
27
  var import_vue2 = require("vue");
28
28
  var import_pixel3_icon = require("@mekari/pixel3-icon");
29
+ var import_pixel3_utils = require("@mekari/pixel3-utils");
29
30
  var import_recipes = require("@mekari/pixel3-styled-system/recipes");
30
31
 
31
32
  // src/modules/spinner.props.ts
@@ -36,7 +37,7 @@ var spinnerProps = {
36
37
  },
37
38
  color: {
38
39
  type: String,
39
- default: "currentcolor"
40
+ default: ""
40
41
  }
41
42
  };
42
43
 
@@ -45,6 +46,9 @@ var MpSpinner = (0, import_vue2.defineComponent)({
45
46
  name: "MpSpinner",
46
47
  props: spinnerProps,
47
48
  setup(props) {
49
+ const {
50
+ isNextTheme
51
+ } = (0, import_pixel3_utils.usePixelTheme)();
48
52
  const classes = (0, import_vue2.computed)(() => {
49
53
  return (0, import_recipes.spinnerRecipe)({
50
54
  size: props.size
@@ -55,13 +59,14 @@ var MpSpinner = (0, import_vue2.defineComponent)({
55
59
  size,
56
60
  color
57
61
  } = props;
62
+ const defaultColor = isNextTheme.value ? "icon.default" : "currentColor";
58
63
  return (0, import_vue.createVNode)("div", {
59
64
  "class": classes.value,
60
65
  "data-pixel-component": "MpSpinner"
61
66
  }, [(0, import_vue.createVNode)(import_pixel3_icon.MpIcon, {
62
67
  "name": "loader-",
63
68
  "size": size,
64
- "color": color
69
+ "color": color || defaultColor
65
70
  }, null)]);
66
71
  };
67
72
  }
package/dist/spinner.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpSpinner
3
- } from "./chunk-WYMDJCGH.mjs";
4
- import "./chunk-7TFUUHFL.mjs";
3
+ } from "./chunk-QAWSUC43.mjs";
4
+ import "./chunk-LCWJBKNT.mjs";
5
5
  export {
6
6
  MpSpinner
7
7
  };
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@mekari/pixel3-spinner",
3
3
  "description": "Spinner component for mekari pixel 3",
4
- "version": "0.0.16",
4
+ "version": "0.0.17-dev.0",
5
5
  "main": "dist/index.js",
6
6
  "license": "MIT",
7
7
  "files": [
8
8
  "dist"
9
9
  ],
10
10
  "dependencies": {
11
- "@mekari/pixel3-icon": "0.0.16",
12
- "@mekari/pixel3-styled-system": "0.1.1",
13
- "@mekari/pixel3-utils": "0.0.6"
11
+ "@mekari/pixel3-styled-system": "0.1.2-dev.0",
12
+ "@mekari/pixel3-icon": "0.0.17-dev.0",
13
+ "@mekari/pixel3-utils": "0.0.7-dev.0"
14
14
  },
15
15
  "peerDependencies": {
16
16
  "vue": "^3.4.9"