@mekari/pixel3-button 0.0.6 → 0.0.7-dev.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/dist/button.d.mts CHANGED
@@ -57,9 +57,9 @@ declare const MpButton: vue.DefineComponent<{
57
57
  }>> & {
58
58
  onClick?: ((...args: any[]) => any) | undefined;
59
59
  }, {
60
- as: keyof HTMLElementTagNameMap;
61
60
  size: ButtonSize;
62
61
  variant: ButtonVariant;
62
+ as: keyof HTMLElementTagNameMap;
63
63
  isDisabled: boolean;
64
64
  isLoading: boolean;
65
65
  }, {}>;
package/dist/button.d.ts CHANGED
@@ -57,9 +57,9 @@ declare const MpButton: vue.DefineComponent<{
57
57
  }>> & {
58
58
  onClick?: ((...args: any[]) => any) | undefined;
59
59
  }, {
60
- as: keyof HTMLElementTagNameMap;
61
60
  size: ButtonSize;
62
61
  variant: ButtonVariant;
62
+ as: keyof HTMLElementTagNameMap;
63
63
  isDisabled: boolean;
64
64
  isLoading: boolean;
65
65
  }, {}>;
package/dist/button.js CHANGED
@@ -96,6 +96,7 @@ var MpButton = (0, import_vue2.defineComponent)({
96
96
  const {
97
97
  as: Component,
98
98
  variant,
99
+ size,
99
100
  isDisabled,
100
101
  isLoading,
101
102
  leftIcon,
@@ -104,7 +105,8 @@ var MpButton = (0, import_vue2.defineComponent)({
104
105
  return (0, import_vue.createVNode)(Component, {
105
106
  "class": classes.value,
106
107
  "data-pixel-component": "MpButton",
107
- "data-has-icon": children ? void 0 : true,
108
+ "data-has-icon": variant !== "textLink" && (rightIcon || leftIcon) ? true : void 0,
109
+ "data-has-label": variant !== "textLink" && children ? true : void 0,
108
110
  "disabled": isDisabled ? true : void 0,
109
111
  "aria-disabled": isDisabled,
110
112
  "onClick": onClick
@@ -114,11 +116,11 @@ var MpButton = (0, import_vue2.defineComponent)({
114
116
  }, [(0, import_vue.createVNode)(import_pixel3_spinner.MpSpinner, null, null)]), leftIcon && (0, import_vue.createVNode)(import_pixel3_icon.MpIcon, {
115
117
  "name": leftIcon,
116
118
  "variant": variant === "secondary" || variant === "textLink" ? "duotone" : "outline",
117
- "size": "sm",
119
+ "size": size,
118
120
  "color": "currentcolor"
119
121
  }, null), children, rightIcon && (0, import_vue.createVNode)(import_pixel3_icon.MpIcon, {
120
122
  "name": rightIcon,
121
- "size": "sm",
123
+ "size": size,
122
124
  "color": "currentcolor"
123
125
  }, null)]
124
126
  });
package/dist/button.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpButton,
3
3
  MpButtonGroup
4
- } from "./chunk-CGHIPVSN.mjs";
4
+ } from "./chunk-4TJVZQFU.mjs";
5
5
  import "./chunk-BSH3FNBJ.mjs";
6
6
  export {
7
7
  MpButton,
@@ -37,6 +37,7 @@ var MpButton = defineComponent({
37
37
  const {
38
38
  as: Component,
39
39
  variant,
40
+ size,
40
41
  isDisabled,
41
42
  isLoading,
42
43
  leftIcon,
@@ -45,7 +46,8 @@ var MpButton = defineComponent({
45
46
  return _createVNode(Component, {
46
47
  "class": classes.value,
47
48
  "data-pixel-component": "MpButton",
48
- "data-has-icon": children ? void 0 : true,
49
+ "data-has-icon": variant !== "textLink" && (rightIcon || leftIcon) ? true : void 0,
50
+ "data-has-label": variant !== "textLink" && children ? true : void 0,
49
51
  "disabled": isDisabled ? true : void 0,
50
52
  "aria-disabled": isDisabled,
51
53
  "onClick": onClick
@@ -55,11 +57,11 @@ var MpButton = defineComponent({
55
57
  }, [_createVNode(MpSpinner, null, null)]), leftIcon && _createVNode(MpIcon, {
56
58
  "name": leftIcon,
57
59
  "variant": variant === "secondary" || variant === "textLink" ? "duotone" : "outline",
58
- "size": "sm",
60
+ "size": size,
59
61
  "color": "currentcolor"
60
62
  }, null), children, rightIcon && _createVNode(MpIcon, {
61
63
  "name": rightIcon,
62
- "size": "sm",
64
+ "size": size,
63
65
  "color": "currentcolor"
64
66
  }, null)]
65
67
  });
package/dist/index.js CHANGED
@@ -98,6 +98,7 @@ var MpButton = (0, import_vue2.defineComponent)({
98
98
  const {
99
99
  as: Component,
100
100
  variant,
101
+ size,
101
102
  isDisabled,
102
103
  isLoading,
103
104
  leftIcon,
@@ -106,7 +107,8 @@ var MpButton = (0, import_vue2.defineComponent)({
106
107
  return (0, import_vue.createVNode)(Component, {
107
108
  "class": classes.value,
108
109
  "data-pixel-component": "MpButton",
109
- "data-has-icon": children ? void 0 : true,
110
+ "data-has-icon": variant !== "textLink" && (rightIcon || leftIcon) ? true : void 0,
111
+ "data-has-label": variant !== "textLink" && children ? true : void 0,
110
112
  "disabled": isDisabled ? true : void 0,
111
113
  "aria-disabled": isDisabled,
112
114
  "onClick": onClick
@@ -116,11 +118,11 @@ var MpButton = (0, import_vue2.defineComponent)({
116
118
  }, [(0, import_vue.createVNode)(import_pixel3_spinner.MpSpinner, null, null)]), leftIcon && (0, import_vue.createVNode)(import_pixel3_icon.MpIcon, {
117
119
  "name": leftIcon,
118
120
  "variant": variant === "secondary" || variant === "textLink" ? "duotone" : "outline",
119
- "size": "sm",
121
+ "size": size,
120
122
  "color": "currentcolor"
121
123
  }, null), children, rightIcon && (0, import_vue.createVNode)(import_pixel3_icon.MpIcon, {
122
124
  "name": rightIcon,
123
- "size": "sm",
125
+ "size": size,
124
126
  "color": "currentcolor"
125
127
  }, null)]
126
128
  });
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  MpButton,
3
3
  MpButtonGroup
4
- } from "./chunk-CGHIPVSN.mjs";
4
+ } from "./chunk-4TJVZQFU.mjs";
5
5
  import "./chunk-BSH3FNBJ.mjs";
6
6
  export {
7
7
  MpButton,
@@ -1 +1 @@
1
- {"inputs":{"src/modules/button.props.ts":{"bytes":1093,"imports":[],"format":"esm"},"src/button.tsx":{"bytes":2811,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true},{"path":"src/modules/button.props.ts","kind":"import-statement","original":"./modules/button.props"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":208,"imports":[{"path":"src/button.tsx","kind":"import-statement","original":"./button"}],"format":"esm"},"src/modules/button.type.ts":{"bytes":209,"imports":[],"format":"esm"}},"outputs":{"dist/button.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-spinner","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/button.tsx","inputs":{"src/button.tsx":{"bytesInOutput":2938},"src/modules/button.props.ts":{"bytesInOutput":451}},"bytes":4467},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-spinner","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":159},"src/button.tsx":{"bytesInOutput":2770},"src/modules/button.props.ts":{"bytesInOutput":451}},"bytes":4475},"dist/modules/button.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/button.props.ts","inputs":{"src/modules/button.props.ts":{"bytesInOutput":649}},"bytes":1605},"dist/modules/button.type.js":{"imports":[],"exports":[],"entryPoint":"src/modules/button.type.ts","inputs":{"src/modules/button.type.ts":{"bytesInOutput":82}},"bytes":784}}}
1
+ {"inputs":{"src/modules/button.props.ts":{"bytes":1093,"imports":[],"format":"esm"},"src/button.tsx":{"bytes":2947,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true},{"path":"src/modules/button.props.ts","kind":"import-statement","original":"./modules/button.props"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":208,"imports":[{"path":"src/button.tsx","kind":"import-statement","original":"./button"}],"format":"esm"},"src/modules/button.type.ts":{"bytes":209,"imports":[],"format":"esm"}},"outputs":{"dist/button.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-spinner","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/button.tsx","inputs":{"src/button.tsx":{"bytesInOutput":3071},"src/modules/button.props.ts":{"bytesInOutput":451}},"bytes":4600},"dist/index.js":{"imports":[{"path":"vue","kind":"require-call","external":true},{"path":"vue","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"require-call","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"require-call","external":true},{"path":"@mekari/pixel3-icon","kind":"require-call","external":true},{"path":"@mekari/pixel3-spinner","kind":"require-call","external":true}],"exports":[],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":159},"src/button.tsx":{"bytesInOutput":2903},"src/modules/button.props.ts":{"bytesInOutput":451}},"bytes":4608},"dist/modules/button.props.js":{"imports":[],"exports":[],"entryPoint":"src/modules/button.props.ts","inputs":{"src/modules/button.props.ts":{"bytesInOutput":649}},"bytes":1605},"dist/modules/button.type.js":{"imports":[],"exports":[],"entryPoint":"src/modules/button.type.ts","inputs":{"src/modules/button.type.ts":{"bytesInOutput":82}},"bytes":784}}}
@@ -1 +1 @@
1
- {"inputs":{"src/modules/button.props.ts":{"bytes":1093,"imports":[],"format":"esm"},"src/button.tsx":{"bytes":2811,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true},{"path":"src/modules/button.props.ts","kind":"import-statement","original":"./modules/button.props"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":208,"imports":[{"path":"src/button.tsx","kind":"import-statement","original":"./button"}],"format":"esm"},"src/modules/button.type.ts":{"bytes":209,"imports":[],"format":"esm"}},"outputs":{"dist/button.mjs":{"imports":[{"path":"dist/chunk-CGHIPVSN.mjs","kind":"import-statement"},{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"}],"exports":["MpButton","MpButtonGroup"],"entryPoint":"src/button.tsx","inputs":{},"bytes":139},"dist/index.mjs":{"imports":[{"path":"dist/chunk-CGHIPVSN.mjs","kind":"import-statement"},{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"}],"exports":["MpButton","MpButtonGroup"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":139},"dist/chunk-CGHIPVSN.mjs":{"imports":[{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true}],"exports":["MpButton","MpButtonGroup"],"inputs":{"src/button.tsx":{"bytesInOutput":2532}},"bytes":2676},"dist/modules/button.props.mjs":{"imports":[{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"}],"exports":["buttonGroupProps","buttonProps"],"entryPoint":"src/modules/button.props.ts","inputs":{},"bytes":121},"dist/chunk-BSH3FNBJ.mjs":{"imports":[],"exports":["__name","buttonGroupProps","buttonProps"],"inputs":{"src/modules/button.props.ts":{"bytesInOutput":451}},"bytes":669},"dist/modules/button.type.mjs":{"imports":[],"exports":[],"entryPoint":"src/modules/button.type.ts","inputs":{"src/modules/button.type.ts":{"bytesInOutput":0}},"bytes":0}}}
1
+ {"inputs":{"src/modules/button.props.ts":{"bytes":1093,"imports":[],"format":"esm"},"src/button.tsx":{"bytes":2947,"imports":[{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true},{"path":"src/modules/button.props.ts","kind":"import-statement","original":"./modules/button.props"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":208,"imports":[{"path":"src/button.tsx","kind":"import-statement","original":"./button"}],"format":"esm"},"src/modules/button.type.ts":{"bytes":209,"imports":[],"format":"esm"}},"outputs":{"dist/button.mjs":{"imports":[{"path":"dist/chunk-4TJVZQFU.mjs","kind":"import-statement"},{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"}],"exports":["MpButton","MpButtonGroup"],"entryPoint":"src/button.tsx","inputs":{},"bytes":139},"dist/index.mjs":{"imports":[{"path":"dist/chunk-4TJVZQFU.mjs","kind":"import-statement"},{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"}],"exports":["MpButton","MpButtonGroup"],"entryPoint":"src/index.ts","inputs":{"src/index.ts":{"bytesInOutput":0}},"bytes":139},"dist/chunk-4TJVZQFU.mjs":{"imports":[{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"},{"path":"vue","kind":"import-statement","external":true},{"path":"vue","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/tokens","kind":"import-statement","external":true},{"path":"@mekari/pixel3-styled-system/recipes","kind":"import-statement","external":true},{"path":"@mekari/pixel3-icon","kind":"import-statement","external":true},{"path":"@mekari/pixel3-spinner","kind":"import-statement","external":true}],"exports":["MpButton","MpButtonGroup"],"inputs":{"src/button.tsx":{"bytesInOutput":2665}},"bytes":2809},"dist/modules/button.props.mjs":{"imports":[{"path":"dist/chunk-BSH3FNBJ.mjs","kind":"import-statement"}],"exports":["buttonGroupProps","buttonProps"],"entryPoint":"src/modules/button.props.ts","inputs":{},"bytes":121},"dist/chunk-BSH3FNBJ.mjs":{"imports":[],"exports":["__name","buttonGroupProps","buttonProps"],"inputs":{"src/modules/button.props.ts":{"bytesInOutput":451}},"bytes":669},"dist/modules/button.type.mjs":{"imports":[],"exports":[],"entryPoint":"src/modules/button.type.ts","inputs":{"src/modules/button.type.ts":{"bytesInOutput":0}},"bytes":0}}}
package/package.json CHANGED
@@ -1,16 +1,16 @@
1
1
  {
2
2
  "name": "@mekari/pixel3-button",
3
3
  "description": "Button component for mekari pixel 3",
4
- "version": "0.0.6",
4
+ "version": "0.0.7-dev.1",
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.6",
12
- "@mekari/pixel3-spinner": "0.0.6",
13
- "@mekari/pixel3-styled-system": "0.0.4",
11
+ "@mekari/pixel3-icon": "0.0.7-dev.1",
12
+ "@mekari/pixel3-spinner": "0.0.7-dev.1",
13
+ "@mekari/pixel3-styled-system": "0.0.5-dev.1",
14
14
  "@mekari/pixel3-utils": "0.0.4"
15
15
  },
16
16
  "peerDependencies": {