@tamagui/get-button-sized 1.114.3 → 1.115.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.
@@ -0,0 +1,44 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __export = (target, all) => {
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);
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ getButtonSized: () => getButtonSized
24
+ });
25
+ module.exports = __toCommonJS(src_exports);
26
+ var import_get_token = require("@tamagui/get-token");
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;
39
+ return {
40
+ paddingHorizontal: xSize,
41
+ height: val,
42
+ borderRadius: props.circular ? 1e5 : radiusToken
43
+ };
44
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/get-button-sized",
3
- "version": "1.114.3",
3
+ "version": "1.115.0",
4
4
  "types": "./types/index.d.ts",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -24,15 +24,16 @@
24
24
  "react-native": "./dist/cjs/index.native.js",
25
25
  "types": "./types/index.d.ts",
26
26
  "import": "./dist/esm/index.mjs",
27
- "require": "./dist/cjs/index.js"
27
+ "require": "./dist/cjs/index.cjs",
28
+ "default": "./dist/cjs/index.native.js"
28
29
  }
29
30
  },
30
31
  "dependencies": {
31
- "@tamagui/get-token": "1.114.3",
32
- "@tamagui/web": "1.114.3"
32
+ "@tamagui/get-token": "1.115.0",
33
+ "@tamagui/web": "1.115.0"
33
34
  },
34
35
  "devDependencies": {
35
- "@tamagui/build": "1.114.3",
36
+ "@tamagui/build": "1.115.0",
36
37
  "react": "^18.2.0 || ^19.0.0"
37
38
  },
38
39
  "publishConfig": {
package/dist/cjs/index.js DELETED
@@ -1,37 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
- var __getOwnPropNames = Object.getOwnPropertyNames;
4
- var __hasOwnProp = Object.prototype.hasOwnProperty;
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);
15
- var src_exports = {};
16
- __export(src_exports, {
17
- getButtonSized: () => getButtonSized
18
- });
19
- module.exports = __toCommonJS(src_exports);
20
- 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;
31
- return {
32
- paddingHorizontal: xSize,
33
- height: val,
34
- borderRadius: props.circular ? 1e5 : radiusToken
35
- };
36
- };
37
- //# sourceMappingURL=index.js.map
File without changes