@tamagui/get-button-sized 2.0.0-rc.3 → 2.0.0-rc.30

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/cjs/index.js CHANGED
@@ -3,35 +3,42 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
3
  var __getOwnPropNames = Object.getOwnPropertyNames;
4
4
  var __hasOwnProp = Object.prototype.hasOwnProperty;
5
5
  var __export = (target, all) => {
6
- for (var name in all)
7
- __defProp(target, name, { get: all[name], enumerable: !0 });
8
- }, __copyProps = (to, from, except, desc) => {
9
- if (from && typeof from == "object" || typeof from == "function")
10
- for (let key of __getOwnPropNames(from))
11
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
12
- return to;
13
- };
14
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
6
+ for (var name in all) __defProp(target, name, {
7
+ get: all[name],
8
+ enumerable: !0
9
+ });
10
+ },
11
+ __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
13
+ get: () => from[key],
14
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
15
+ });
16
+ return to;
17
+ };
18
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
19
+ value: !0
20
+ }), mod);
15
21
  var index_exports = {};
16
22
  __export(index_exports, {
17
23
  getButtonSized: () => getButtonSized
18
24
  });
19
25
  module.exports = __toCommonJS(index_exports);
20
26
  var import_get_token = require("@tamagui/get-token");
21
- const getButtonSized = (val, { tokens, props }) => {
22
- if (!val || props.circular)
23
- return;
24
- if (typeof val == "number")
25
- return {
26
- paddingHorizontal: val * 0.25,
27
- height: val,
28
- borderRadius: props.circular ? 1e5 : val * 0.2
29
- };
30
- const xSize = (0, import_get_token.getSpace)(val), radiusToken = tokens.radius[val] ?? tokens.radius.$true;
27
+ const getButtonSized = (val, {
28
+ tokens,
29
+ props
30
+ }) => {
31
+ if (!val || props.circular) return;
32
+ if (typeof val == "number") return {
33
+ paddingHorizontal: val * 0.25,
34
+ height: val,
35
+ borderRadius: props.circular ? 1e5 : val * 0.2
36
+ };
37
+ const xSize = (0, import_get_token.getSpace)(val),
38
+ radiusToken = tokens.radius[val] ?? tokens.radius.$true;
31
39
  return {
32
40
  paddingHorizontal: xSize,
33
41
  height: val,
34
42
  borderRadius: props.circular ? 1e5 : radiusToken
35
43
  };
36
- };
37
- //# sourceMappingURL=index.js.map
44
+ };
package/dist/esm/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { getSpace } from "@tamagui/get-token";
2
- const getButtonSized = (val, { tokens, props }) => {
3
- if (!val || props.circular)
4
- return;
5
- if (typeof val == "number")
6
- return {
7
- paddingHorizontal: val * 0.25,
8
- height: val,
9
- borderRadius: props.circular ? 1e5 : val * 0.2
10
- };
11
- const xSize = getSpace(val), radiusToken = tokens.radius[val] ?? tokens.radius.$true;
2
+ const getButtonSized = (val, {
3
+ tokens,
4
+ props
5
+ }) => {
6
+ if (!val || props.circular) return;
7
+ if (typeof val == "number") return {
8
+ paddingHorizontal: val * 0.25,
9
+ height: val,
10
+ borderRadius: props.circular ? 1e5 : val * 0.2
11
+ };
12
+ const xSize = getSpace(val),
13
+ radiusToken = tokens.radius[val] ?? tokens.radius.$true;
12
14
  return {
13
15
  paddingHorizontal: xSize,
14
16
  height: val,
15
17
  borderRadius: props.circular ? 1e5 : radiusToken
16
18
  };
17
19
  };
18
- export {
19
- getButtonSized
20
- };
20
+ export { getButtonSized };
21
21
  //# sourceMappingURL=index.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/index.ts"],
4
- "mappings": "AAAA,SAAS,gBAAgB;AAGlB,MAAM,iBAAiB,CAC5B,KACA,EAAE,QAAQ,MAAM,MACb;AACH,MAAI,CAAC,OAAO,MAAM;AAChB;AAEF,MAAI,OAAO,OAAQ;AACjB,WAAO;AAAA,MACL,mBAAmB,MAAM;AAAA,MACzB,QAAQ;AAAA,MACR,cAAc,MAAM,WAAW,MAAU,MAAM;AAAA,IACjD;AAEF,QAAM,QAAQ,SAAS,GAAG,GACpB,cAAc,OAAO,OAAO,GAAG,KAAK,OAAO,OAAO;AACxD,SAAO;AAAA,IACL,mBAAmB;AAAA,IACnB,QAAQ;AAAA,IACR,cAAc,MAAM,WAAW,MAAU;AAAA,EAC3C;AACF;",
5
- "names": []
6
- }
1
+ {"version":3,"names":["getSpace","getButtonSized","val","tokens","props","circular","paddingHorizontal","height","borderRadius","xSize","radiusToken","radius","$true"],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,SAASA,QAAA,QAAgB;AAGlB,MAAMC,cAAA,GAAiBA,CAC5BC,GAAA,EACA;EAAEC,MAAA;EAAQC;AAAM,MACb;EACH,IAAI,CAACF,GAAA,IAAOE,KAAA,CAAMC,QAAA,EAChB;EAEF,IAAI,OAAOH,GAAA,IAAQ,UACjB,OAAO;IACLI,iBAAA,EAAmBJ,GAAA,GAAM;IACzBK,MAAA,EAAQL,GAAA;IACRM,YAAA,EAAcJ,KAAA,CAAMC,QAAA,GAAW,MAAUH,GAAA,GAAM;EACjD;EAEF,MAAMO,KAAA,GAAQT,QAAA,CAASE,GAAG;IACpBQ,WAAA,GAAcP,MAAA,CAAOQ,MAAA,CAAOT,GAAG,KAAKC,MAAA,CAAOQ,MAAA,CAAOC,KAAA;EACxD,OAAO;IACLN,iBAAA,EAAmBG,KAAA;IACnBF,MAAA,EAAQL,GAAA;IACRM,YAAA,EAAcJ,KAAA,CAAMC,QAAA,GAAW,MAAUK;EAC3C;AACF","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/get-button-sized",
3
- "version": "2.0.0-rc.3",
3
+ "version": "2.0.0-rc.30",
4
4
  "files": [
5
5
  "src",
6
6
  "types",
@@ -15,15 +15,12 @@
15
15
  "./package.json": "./package.json",
16
16
  ".": {
17
17
  "types": "./types/index.d.ts",
18
- "react-native": {
19
- "module": "./dist/esm/index.native.js",
20
- "import": "./dist/esm/index.native.js",
21
- "require": "./dist/cjs/index.native.js"
22
- },
18
+ "react-native": "./dist/esm/index.native.js",
19
+ "browser": "./dist/esm/index.mjs",
23
20
  "module": "./dist/esm/index.mjs",
24
21
  "import": "./dist/esm/index.mjs",
25
22
  "require": "./dist/cjs/index.cjs",
26
- "default": "./dist/cjs/index.native.js"
23
+ "default": "./dist/esm/index.mjs"
27
24
  }
28
25
  },
29
26
  "publishConfig": {
@@ -36,11 +33,11 @@
36
33
  "clean:build": "tamagui-build clean:build"
37
34
  },
38
35
  "dependencies": {
39
- "@tamagui/get-token": "2.0.0-rc.3",
40
- "@tamagui/web": "2.0.0-rc.3"
36
+ "@tamagui/get-token": "2.0.0-rc.30",
37
+ "@tamagui/web": "2.0.0-rc.30"
41
38
  },
42
39
  "devDependencies": {
43
- "@tamagui/build": "2.0.0-rc.3",
40
+ "@tamagui/build": "2.0.0-rc.30",
44
41
  "react": ">=19"
45
42
  },
46
43
  "peerDependencies": {