@tamagui/button-next 1.114.4 → 1.115.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.
@@ -0,0 +1,134 @@
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 Button_exports = {};
22
+ __export(Button_exports, {
23
+ Button: () => Button,
24
+ ButtonContext: () => ButtonContext
25
+ });
26
+ module.exports = __toCommonJS(Button_exports);
27
+ var import_get_button_sized = require("@tamagui/get-button-sized"),
28
+ import_text = require("@tamagui/text"),
29
+ import_web = require("@tamagui/web"),
30
+ import_createButton = require("./createButton.cjs");
31
+ const Frame = (0, import_web.styled)(import_web.View, {
32
+ variants: {
33
+ unstyled: {
34
+ false: {
35
+ size: "$true",
36
+ justifyContent: "center",
37
+ alignItems: "center",
38
+ flexWrap: "nowrap",
39
+ flexDirection: "row",
40
+ cursor: "pointer",
41
+ hoverTheme: !0,
42
+ pressTheme: !0,
43
+ backgrounded: !0,
44
+ borderWidth: 1,
45
+ borderColor: "transparent",
46
+ focusVisibleStyle: {
47
+ outlineColor: "$outlineColor",
48
+ outlineStyle: "solid",
49
+ outlineWidth: 2
50
+ }
51
+ }
52
+ },
53
+ variant: {
54
+ outlined: {
55
+ backgroundColor: "transparent",
56
+ borderWidth: 2,
57
+ borderColor: "$borderColor",
58
+ hoverStyle: {
59
+ backgroundColor: "transparent",
60
+ borderColor: "$borderColorHover"
61
+ },
62
+ pressStyle: {
63
+ backgroundColor: "transparent",
64
+ borderColor: "$borderColorPress"
65
+ },
66
+ focusVisibleStyle: {
67
+ backgroundColor: "transparent",
68
+ borderColor: "$borderColorFocus"
69
+ }
70
+ }
71
+ },
72
+ size: {
73
+ "...size": import_get_button_sized.getButtonSized,
74
+ ":number": import_get_button_sized.getButtonSized
75
+ },
76
+ disabled: {
77
+ true: {
78
+ pointerEvents: "none"
79
+ }
80
+ }
81
+ },
82
+ defaultVariants: {
83
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
84
+ }
85
+ }),
86
+ Text = (0, import_web.styled)(import_text.SizableText, {
87
+ variants: {
88
+ unstyled: {
89
+ false: {
90
+ userSelect: "none",
91
+ cursor: "pointer",
92
+ // flexGrow 1 leads to inconsistent native style where text pushes to start of view
93
+ flexGrow: 0,
94
+ flexShrink: 1,
95
+ ellipse: !0,
96
+ color: "$color"
97
+ }
98
+ }
99
+ },
100
+ defaultVariants: {
101
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
102
+ }
103
+ }),
104
+ Icon = (0, import_web.styled)(import_text.SizableText, {
105
+ variants: {
106
+ unstyled: {
107
+ false: {
108
+ userSelect: "none",
109
+ cursor: "pointer",
110
+ // flexGrow 1 leads to inconsistent native style where text pushes to start of view
111
+ flexGrow: 0,
112
+ flexShrink: 1,
113
+ ellipse: !0,
114
+ color: "$color"
115
+ }
116
+ }
117
+ },
118
+ defaultVariants: {
119
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
120
+ }
121
+ }),
122
+ ButtonContext = (0, import_web.createStyledContext)({
123
+ size: void 0,
124
+ variant: void 0
125
+ }),
126
+ Button = (0, import_createButton.createButton)({
127
+ Frame,
128
+ Text,
129
+ Icon,
130
+ defaultVariants: {
131
+ size: void 0,
132
+ variant: void 0
133
+ }
134
+ });
@@ -1,8 +1,9 @@
1
- var import_config_default = require("@tamagui/config-default"), import_core = require("@tamagui/core"), import_vitest = require("vitest");
1
+ var import_config_default = require("@tamagui/config-default"),
2
+ import_core = require("@tamagui/core"),
3
+ import_vitest = require("vitest");
2
4
  const conf = (0, import_core.createTamagui)((0, import_config_default.getDefaultTamaguiConfig)());
3
5
  (0, import_vitest.describe)("Button", () => {
4
6
  (0, import_vitest.test)("123", () => {
5
7
  (0, import_vitest.expect)(!0).toBeTruthy();
6
8
  });
7
- });
8
- //# sourceMappingURL=Button.test.js.map
9
+ });
@@ -0,0 +1,51 @@
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 createButton_exports = {};
22
+ __export(createButton_exports, {
23
+ createButton: () => createButton
24
+ });
25
+ module.exports = __toCommonJS(createButton_exports);
26
+ var import_helpers = require("@tamagui/helpers"),
27
+ import_web = require("@tamagui/web");
28
+ const createButton = options => {
29
+ const context = (0, import_web.createStyledContext)(options.defaultVariants),
30
+ name = options.name ?? "button",
31
+ Frame = (0, import_web.styled)(options.Frame, {
32
+ context,
33
+ name,
34
+ group: name,
35
+ role: "button",
36
+ tag: "button"
37
+ }),
38
+ Icon = (0, import_web.styled)(options.Icon, {
39
+ name,
40
+ context
41
+ }),
42
+ Text = (0, import_web.styled)(options.Text, {
43
+ name,
44
+ context
45
+ });
46
+ return (0, import_helpers.withStaticProperties)(Frame, {
47
+ Apply: context.Provider,
48
+ Text,
49
+ Icon
50
+ });
51
+ };
@@ -0,0 +1,18 @@
1
+ var __defProp = Object.defineProperty;
2
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
3
+ var __getOwnPropNames = Object.getOwnPropertyNames;
4
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
5
+ var __copyProps = (to, from, except, desc) => {
6
+ if (from && typeof from == "object" || typeof from == "function") for (let key of __getOwnPropNames(from)) !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, {
7
+ get: () => from[key],
8
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
9
+ });
10
+ return to;
11
+ },
12
+ __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
13
+ var __toCommonJS = mod => __copyProps(__defProp({}, "__esModule", {
14
+ value: !0
15
+ }), mod);
16
+ var src_exports = {};
17
+ module.exports = __toCommonJS(src_exports);
18
+ __reExport(src_exports, require("./Button.cjs"), module.exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/button-next",
3
- "version": "1.114.4",
3
+ "version": "1.115.1",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -29,17 +29,18 @@
29
29
  "react-native": "./dist/cjs/index.native.js",
30
30
  "types": "./types/index.d.ts",
31
31
  "import": "./dist/esm/index.mjs",
32
- "require": "./dist/cjs/index.js"
32
+ "require": "./dist/cjs/index.cjs",
33
+ "default": "./dist/cjs/index.native.js"
33
34
  }
34
35
  },
35
36
  "dependencies": {
36
- "@tamagui/get-button-sized": "1.114.4",
37
- "@tamagui/stacks": "1.114.4",
38
- "@tamagui/text": "1.114.4",
39
- "@tamagui/web": "1.114.4"
37
+ "@tamagui/get-button-sized": "1.115.1",
38
+ "@tamagui/stacks": "1.115.1",
39
+ "@tamagui/text": "1.115.1",
40
+ "@tamagui/web": "1.115.1"
40
41
  },
41
42
  "devDependencies": {
42
- "@tamagui/build": "1.114.4",
43
+ "@tamagui/build": "1.115.1",
43
44
  "react": "^18.2.0 || ^19.0.0",
44
45
  "vitest": "2.1.1"
45
46
  },
@@ -1,122 +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 Button_exports = {};
16
- __export(Button_exports, {
17
- Button: () => Button,
18
- ButtonContext: () => ButtonContext
19
- });
20
- module.exports = __toCommonJS(Button_exports);
21
- var import_get_button_sized = require("@tamagui/get-button-sized"), import_text = require("@tamagui/text"), import_web = require("@tamagui/web"), import_createButton = require("./createButton");
22
- const Frame = (0, import_web.styled)(import_web.View, {
23
- variants: {
24
- unstyled: {
25
- false: {
26
- size: "$true",
27
- justifyContent: "center",
28
- alignItems: "center",
29
- flexWrap: "nowrap",
30
- flexDirection: "row",
31
- cursor: "pointer",
32
- hoverTheme: !0,
33
- pressTheme: !0,
34
- backgrounded: !0,
35
- borderWidth: 1,
36
- borderColor: "transparent",
37
- focusVisibleStyle: {
38
- outlineColor: "$outlineColor",
39
- outlineStyle: "solid",
40
- outlineWidth: 2
41
- }
42
- }
43
- },
44
- variant: {
45
- outlined: {
46
- backgroundColor: "transparent",
47
- borderWidth: 2,
48
- borderColor: "$borderColor",
49
- hoverStyle: {
50
- backgroundColor: "transparent",
51
- borderColor: "$borderColorHover"
52
- },
53
- pressStyle: {
54
- backgroundColor: "transparent",
55
- borderColor: "$borderColorPress"
56
- },
57
- focusVisibleStyle: {
58
- backgroundColor: "transparent",
59
- borderColor: "$borderColorFocus"
60
- }
61
- }
62
- },
63
- size: {
64
- "...size": import_get_button_sized.getButtonSized,
65
- ":number": import_get_button_sized.getButtonSized
66
- },
67
- disabled: {
68
- true: {
69
- pointerEvents: "none"
70
- }
71
- }
72
- },
73
- defaultVariants: {
74
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
75
- }
76
- }), Text = (0, import_web.styled)(import_text.SizableText, {
77
- variants: {
78
- unstyled: {
79
- false: {
80
- userSelect: "none",
81
- cursor: "pointer",
82
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
83
- flexGrow: 0,
84
- flexShrink: 1,
85
- ellipse: !0,
86
- color: "$color"
87
- }
88
- }
89
- },
90
- defaultVariants: {
91
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
92
- }
93
- }), Icon = (0, import_web.styled)(import_text.SizableText, {
94
- variants: {
95
- unstyled: {
96
- false: {
97
- userSelect: "none",
98
- cursor: "pointer",
99
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
100
- flexGrow: 0,
101
- flexShrink: 1,
102
- ellipse: !0,
103
- color: "$color"
104
- }
105
- }
106
- },
107
- defaultVariants: {
108
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
109
- }
110
- }), ButtonContext = (0, import_web.createStyledContext)({
111
- size: void 0,
112
- variant: void 0
113
- }), Button = (0, import_createButton.createButton)({
114
- Frame,
115
- Text,
116
- Icon,
117
- defaultVariants: {
118
- size: void 0,
119
- variant: void 0
120
- }
121
- });
122
- //# sourceMappingURL=Button.js.map
@@ -1,41 +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 createButton_exports = {};
16
- __export(createButton_exports, {
17
- createButton: () => createButton
18
- });
19
- module.exports = __toCommonJS(createButton_exports);
20
- var import_helpers = require("@tamagui/helpers"), import_web = require("@tamagui/web");
21
- const createButton = (options) => {
22
- const context = (0, import_web.createStyledContext)(options.defaultVariants), name = options.name ?? "button", Frame = (0, import_web.styled)(options.Frame, {
23
- context,
24
- name,
25
- group: name,
26
- role: "button",
27
- tag: "button"
28
- }), Icon = (0, import_web.styled)(options.Icon, {
29
- name,
30
- context
31
- }), Text = (0, import_web.styled)(options.Text, {
32
- name,
33
- context
34
- });
35
- return (0, import_helpers.withStaticProperties)(Frame, {
36
- Apply: context.Provider,
37
- Text,
38
- Icon
39
- });
40
- };
41
- //# sourceMappingURL=createButton.js.map
package/dist/cjs/index.js DELETED
@@ -1,15 +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 __copyProps = (to, from, except, desc) => {
6
- if (from && typeof from == "object" || typeof from == "function")
7
- for (let key of __getOwnPropNames(from))
8
- !__hasOwnProp.call(to, key) && key !== except && __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
9
- return to;
10
- }, __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
11
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: !0 }), mod);
12
- var src_exports = {};
13
- module.exports = __toCommonJS(src_exports);
14
- __reExport(src_exports, require("./Button"), module.exports);
15
- //# sourceMappingURL=index.js.map
File without changes
File without changes