@tamagui/button-next 1.125.6 → 1.125.7

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.
@@ -1,109 +1,110 @@
1
1
  import { getButtonSized } from "@tamagui/get-button-sized";
2
2
  import { SizableText } from "@tamagui/text";
3
3
  import { createStyledContext, styled, View } from "@tamagui/web";
4
- import { createButton } from "./createButton";
4
+ import { createButton } from "./createButton.native.js";
5
5
  var Frame = styled(View, {
6
- variants: {
7
- unstyled: {
8
- false: {
9
- size: "$true",
10
- justifyContent: "center",
11
- alignItems: "center",
12
- flexWrap: "nowrap",
13
- flexDirection: "row",
14
- cursor: "pointer",
15
- hoverTheme: !0,
16
- pressTheme: !0,
17
- backgrounded: !0,
18
- borderWidth: 1,
19
- borderColor: "transparent",
20
- focusVisibleStyle: {
21
- outlineColor: "$outlineColor",
22
- outlineStyle: "solid",
23
- outlineWidth: 2
6
+ variants: {
7
+ unstyled: {
8
+ false: {
9
+ size: "$true",
10
+ justifyContent: "center",
11
+ alignItems: "center",
12
+ flexWrap: "nowrap",
13
+ flexDirection: "row",
14
+ cursor: "pointer",
15
+ hoverTheme: !0,
16
+ pressTheme: !0,
17
+ backgrounded: !0,
18
+ borderWidth: 1,
19
+ borderColor: "transparent",
20
+ focusVisibleStyle: {
21
+ outlineColor: "$outlineColor",
22
+ outlineStyle: "solid",
23
+ outlineWidth: 2
24
+ }
24
25
  }
25
- }
26
- },
27
- variant: {
28
- outlined: {
29
- backgroundColor: "transparent",
30
- borderWidth: 2,
31
- borderColor: "$borderColor",
32
- hoverStyle: {
33
- backgroundColor: "transparent",
34
- borderColor: "$borderColorHover"
35
- },
36
- pressStyle: {
26
+ },
27
+ variant: {
28
+ outlined: {
37
29
  backgroundColor: "transparent",
38
- borderColor: "$borderColorPress"
39
- },
40
- focusVisibleStyle: {
41
- backgroundColor: "transparent",
42
- borderColor: "$borderColorFocus"
30
+ borderWidth: 2,
31
+ borderColor: "$borderColor",
32
+ hoverStyle: {
33
+ backgroundColor: "transparent",
34
+ borderColor: "$borderColorHover"
35
+ },
36
+ pressStyle: {
37
+ backgroundColor: "transparent",
38
+ borderColor: "$borderColorPress"
39
+ },
40
+ focusVisibleStyle: {
41
+ backgroundColor: "transparent",
42
+ borderColor: "$borderColorFocus"
43
+ }
44
+ }
45
+ },
46
+ size: {
47
+ "...size": getButtonSized,
48
+ ":number": getButtonSized
49
+ },
50
+ disabled: {
51
+ true: {
52
+ pointerEvents: "none"
43
53
  }
44
54
  }
45
55
  },
46
- size: {
47
- "...size": getButtonSized,
48
- ":number": getButtonSized
49
- },
50
- disabled: {
51
- true: {
52
- pointerEvents: "none"
53
- }
56
+ defaultVariants: {
57
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
54
58
  }
55
- },
56
- defaultVariants: {
57
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
58
- }
59
- }), Text = styled(SizableText, {
60
- variants: {
61
- unstyled: {
62
- false: {
63
- userSelect: "none",
64
- cursor: "pointer",
65
- // flexGrow 1 leads to inconsistent native style where text pushes to start of view
66
- flexGrow: 0,
67
- flexShrink: 1,
68
- ellipse: !0,
69
- color: "$color"
59
+ }),
60
+ Text = styled(SizableText, {
61
+ variants: {
62
+ unstyled: {
63
+ false: {
64
+ userSelect: "none",
65
+ cursor: "pointer",
66
+ // flexGrow 1 leads to inconsistent native style where text pushes to start of view
67
+ flexGrow: 0,
68
+ flexShrink: 1,
69
+ ellipse: !0,
70
+ color: "$color"
71
+ }
70
72
  }
73
+ },
74
+ defaultVariants: {
75
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
71
76
  }
72
- },
73
- defaultVariants: {
74
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
75
- }
76
- }), Icon = styled(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"
77
+ }),
78
+ Icon = styled(SizableText, {
79
+ variants: {
80
+ unstyled: {
81
+ false: {
82
+ userSelect: "none",
83
+ cursor: "pointer",
84
+ // flexGrow 1 leads to inconsistent native style where text pushes to start of view
85
+ flexGrow: 0,
86
+ flexShrink: 1,
87
+ ellipse: !0,
88
+ color: "$color"
89
+ }
87
90
  }
91
+ },
92
+ defaultVariants: {
93
+ unstyled: process.env.TAMAGUI_HEADLESS === "1"
88
94
  }
89
- },
90
- defaultVariants: {
91
- unstyled: process.env.TAMAGUI_HEADLESS === "1"
92
- }
93
- }), ButtonContext = createStyledContext({
94
- size: void 0,
95
- variant: void 0
96
- }), Button = createButton({
97
- Frame,
98
- Text,
99
- Icon,
100
- defaultVariants: {
95
+ }),
96
+ ButtonContext = createStyledContext({
101
97
  size: void 0,
102
98
  variant: void 0
103
- }
104
- });
105
- export {
106
- Button,
107
- ButtonContext
108
- };
109
- //# sourceMappingURL=Button.js.map
99
+ }),
100
+ Button = createButton({
101
+ Frame,
102
+ Text,
103
+ Icon,
104
+ defaultVariants: {
105
+ size: void 0,
106
+ variant: void 0
107
+ }
108
+ });
109
+ export { Button, ButtonContext };
110
+ //# sourceMappingURL=Button.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/ui/button-next/src/Button.tsx"],
4
- "mappings": "AAAA,SAASA,sBAAsB;AAC/B,SAASC,mBAAmB;AAE5B,SAASC,qBAAqBC,QAAQC,YAAY;AAClD,SAASC,oBAAoB;AAM7B,IAAMC,QAAQH,OAAOC,MAAM;EACzBG,UAAU;IACRC,UAAU;MACRC,OAAO;QACLC,MAAM;QACNC,gBAAgB;QAChBC,YAAY;QACZC,UAAU;QACVC,eAAe;QACfC,QAAQ;QACRC,YAAY;QACZC,YAAY;QACZC,cAAc;QACdC,aAAa;QACbC,aAAa;QAEbC,mBAAmB;UACjBC,cAAc;UACdC,cAAc;UACdC,cAAc;QAChB;MACF;IACF;IAEAC,SAAS;MACPC,UAAU;QACRC,iBAAiB;QACjBR,aAAa;QACbC,aAAa;QAEbQ,YAAY;UACVD,iBAAiB;UACjBP,aAAa;QACf;QAEAS,YAAY;UACVF,iBAAiB;UACjBP,aAAa;QACf;QAEAC,mBAAmB;UACjBM,iBAAiB;UACjBP,aAAa;QACf;MACF;IACF;IAEAV,MAAM;MACJ,WAAWV;MACX,WAAWA;IACb;IAEA8B,UAAU;MACRC,MAAM;QACJC,eAAe;MACjB;IACF;EACF;EAEAC,iBAAiB;IACfzB,UAAU0B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEMC,OAAOlC,OAAOF,aAAa;EAC/BM,UAAU;IACRC,UAAU;MACRC,OAAO;QACL6B,YAAY;QACZvB,QAAQ;;QAERwB,UAAU;QACVC,YAAY;QACZC,SAAS;QACTC,OAAO;MACT;IACF;EACF;EAEAT,iBAAiB;IACfzB,UAAU0B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEMO,OAAOxC,OAAOF,aAAa;EAC/BM,UAAU;IACRC,UAAU;MACRC,OAAO;QACL6B,YAAY;QACZvB,QAAQ;;QAERwB,UAAU;QACVC,YAAY;QACZC,SAAS;QACTC,OAAO;MACT;IACF;EACF;EAEAT,iBAAiB;IACfzB,UAAU0B,QAAQC,IAAIC,qBAAqB;EAC7C;AACF,CAAA,GAEaQ,gBAAgB1C,oBAG1B;EACDQ,MAAMmC;EACNpB,SAASoB;AACX,CAAA,GAEaC,SAASzC,aAGnB;EACDC;EACA+B;EACAM;EACAV,iBAAiB;IACfvB,MAAMmC;IACNpB,SAASoB;EACX;AACF,CAAA;",
5
- "names": ["getButtonSized", "SizableText", "createStyledContext", "styled", "View", "createButton", "Frame", "variants", "unstyled", "false", "size", "justifyContent", "alignItems", "flexWrap", "flexDirection", "cursor", "hoverTheme", "pressTheme", "backgrounded", "borderWidth", "borderColor", "focusVisibleStyle", "outlineColor", "outlineStyle", "outlineWidth", "variant", "outlined", "backgroundColor", "hoverStyle", "pressStyle", "disabled", "true", "pointerEvents", "defaultVariants", "process", "env", "TAMAGUI_HEADLESS", "Text", "userSelect", "flexGrow", "flexShrink", "ellipse", "color", "Icon", "ButtonContext", "undefined", "Button"]
6
- }
1
+ {"version":3,"names":["getButtonSized","SizableText","createStyledContext","styled","View","createButton","Frame","variants","unstyled","false","size","justifyContent","alignItems","flexWrap","flexDirection","cursor","hoverTheme","pressTheme","backgrounded","borderWidth","borderColor","focusVisibleStyle","outlineColor","outlineStyle","outlineWidth","variant","outlined","backgroundColor","hoverStyle","pressStyle","disabled","true","pointerEvents","defaultVariants","process","env","TAMAGUI_HEADLESS","Text","userSelect","flexGrow","flexShrink","ellipse","color","Icon","ButtonContext","Button"],"sources":["../../src/Button.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,cAAA,QAAsB;AAC/B,SAASC,WAAA,QAAmB;AAE5B,SAASC,mBAAA,EAAqBC,MAAA,EAAQC,IAAA,QAAY;AAClD,SAASC,YAAA,QAAoB;AAM7B,IAAAC,KAAM,GAAAH,MAAQ,CAAAC,IAAO;IACnBG,QAAA,EAAU;MACRC,QAAA,EAAU;QACRC,KAAA,EAAO;UACLC,IAAA,EAAM;UACNC,cAAA,EAAgB;UAChBC,UAAA,EAAY;UACZC,QAAA,EAAU;UACVC,aAAA,EAAe;UACfC,MAAA,EAAQ;UACRC,UAAA,EAAY;UACZC,UAAA,EAAY;UACZC,YAAA,EAAc;UACdC,WAAA,EAAa;UACbC,WAAA,EAAa;UAEbC,iBAAA,EAAmB;YACjBC,YAAA,EAAc;YACdC,YAAA,EAAc;YACdC,YAAA,EAAc;UAChB;QACF;MACF;MAEAC,OAAA,EAAS;QACPC,QAAA,EAAU;UACRC,eAAA,EAAiB;UACjBR,WAAA,EAAa;UACbC,WAAA,EAAa;UAEbQ,UAAA,EAAY;YACVD,eAAA,EAAiB;YACjBP,WAAA,EAAa;UACf;UAEAS,UAAA,EAAY;YACVF,eAAA,EAAi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CAAC","ignoreList":[]}
@@ -2,9 +2,9 @@ import { getDefaultTamaguiConfig } from "@tamagui/config-default";
2
2
  import { createTamagui } from "@tamagui/core";
3
3
  import { describe, expect, test } from "vitest";
4
4
  var conf = createTamagui(getDefaultTamaguiConfig());
5
- describe("Button", function() {
6
- test("123", function() {
5
+ describe("Button", function () {
6
+ test("123", function () {
7
7
  expect(!0).toBeTruthy();
8
8
  });
9
9
  });
10
- //# sourceMappingURL=Button.test.js.map
10
+ //# sourceMappingURL=Button.test.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/ui/button-next/src/Button.test.tsx"],
4
- "mappings": "AAAA,SAASA,+BAA+B;AACxC,SAASC,qBAAqB;AAC9B,SAASC,UAAUC,QAAQC,YAAY;AAEvC,IAAMC,OAAOJ,cAAcD,wBAAAA,CAAAA;AAE3BE,SAAS,UAAU,WAAA;AACjBE,OAAK,OAAO,WAAA;AACVD,WAAO,EAAA,EAAMG,WAAU;EACzB,CAAA;AAWF,CAAA;",
5
- "names": ["getDefaultTamaguiConfig", "createTamagui", "describe", "expect", "test", "conf", "toBeTruthy"]
6
- }
1
+ {"version":3,"names":["getDefaultTamaguiConfig","createTamagui","describe","expect","test","conf","toBeTruthy"],"sources":["../../src/Button.test.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,uBAAA,QAA+B;AACxC,SAASC,aAAA,QAAqB;AAC9B,SAASC,QAAA,EAAUC,MAAA,EAAQC,IAAA,QAAY;AAEvC,IAAAC,IAAM,GAAAJ,aAAO,CAAAD,uBAAc,GAAwB;AAEnDE,QAAA,CAAS,UAAU,YAAM;EACvBE,IAAA,CAAK,OAAO,YAAM;IAChBD,MAAA,CAAO,EAAI,EAAEG,UAAA,CAAW;EAC1B,CAAC;AAWH,CAAC","ignoreList":[]}
@@ -1,26 +1,29 @@
1
1
  import { withStaticProperties } from "@tamagui/helpers";
2
2
  import { createStyledContext, styled } from "@tamagui/web";
3
- var createButton = function(options) {
4
- var context = createStyledContext(options.defaultVariants), _options_name, name = (_options_name = options.name) !== null && _options_name !== void 0 ? _options_name : "button", Frame = styled(options.Frame, {
5
- context,
6
- name,
7
- group: name,
8
- role: "button",
9
- tag: "button"
10
- }), Icon = styled(options.Icon, {
11
- name,
12
- context
13
- }), Text = styled(options.Text, {
14
- name,
15
- context
16
- });
3
+ var createButton = function (options) {
4
+ var context = createStyledContext(options.defaultVariants),
5
+ _options_name,
6
+ name = (_options_name = options.name) !== null && _options_name !== void 0 ? _options_name : "button",
7
+ Frame = styled(options.Frame, {
8
+ context,
9
+ name,
10
+ group: name,
11
+ role: "button",
12
+ tag: "button"
13
+ }),
14
+ Icon = styled(options.Icon, {
15
+ name,
16
+ context
17
+ }),
18
+ Text = styled(options.Text, {
19
+ name,
20
+ context
21
+ });
17
22
  return withStaticProperties(Frame, {
18
23
  Apply: context.Provider,
19
24
  Text,
20
25
  Icon
21
26
  });
22
27
  };
23
- export {
24
- createButton
25
- };
26
- //# sourceMappingURL=createButton.js.map
28
+ export { createButton };
29
+ //# sourceMappingURL=createButton.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/ui/button-next/src/createButton.tsx"],
4
- "mappings": "AAAA,SAASA,4BAA4B;AAMrC,SAASC,qBAAqBC,cAAc;AAErC,IAAMC,eAAe,SAAuCC,SAAAA;AAOjE,MAAMC,UAAUJ,oBAAoBG,QAAQE,eAAe,GAC9CF,eAAPG,QAAOH,gBAAAA,QAAQG,UAAI,QAAZH,kBAAAA,SAAAA,gBAAgB,UAEvBI,QAAQN,OAAOE,QAAQI,OAAO;IAClCH;IACAE;IACAE,OAAOF;IACPG,MAAM;IACNC,KAAK;EACP,CAAA,GAEMC,OAAOV,OAAOE,QAAQQ,MAAM;IAChCL;IACAF;EACF,CAAA,GAEMQ,OAAOX,OAAOE,QAAQS,MAAM;IAChCN;IACAF;EACF,CAAA;AAEA,SAAOL,qBAAqBQ,OAAO;IACjCM,OAAOT,QAAQU;IACfF;IACAD;EACF,CAAA;AACF;",
5
- "names": ["withStaticProperties", "createStyledContext", "styled", "createButton", "options", "context", "defaultVariants", "name", "Frame", "group", "role", "tag", "Icon", "Text", "Apply", "Provider"]
6
- }
1
+ {"version":3,"names":["withStaticProperties","createStyledContext","styled","createButton","options","context","defaultVariants","_options_name","name","Frame","group","role","tag","Icon","Text","Apply","Provider"],"sources":["../../src/createButton.tsx"],"sourcesContent":[null],"mappings":"AAAA,SAASA,oBAAA,QAA4B;AAMrC,SAASC,mBAAA,EAAqBC,MAAA,QAAc;AAErC,IAAAC,YAAM,YAAAA,CAAsDC,OAM7D;EACJ,IAAAC,OAAM,GAAAJ,mBAAU,CAAAG,OAAoB,CAAAE,eAAQ;IAAeC,aAC9C;IAAAC,IAAQ,IAAAD,aAEf,GAAAH,OAAQ,CAAAI,IAAO,UAAQ,IAAOD,aAAA,cAAAA,aAAA;IAAAE,KAAA,GAAAP,MAAA,CAAAE,OAAA,CAAAK,KAAA;MAClCJ,OAAA;MACAG,IAAA;MACAE,KAAA,EAAOF,IAAA;MACPG,IAAA,EAAM;MACNC,GAAA,EAAK;IACP,CAAC;IAEKC,IAAA,GAAOX,MAAA,CAAOE,OAAA,CAAQS,IAAA,EAAM;MAChCL,IAAA;MACAH;IACF,CAAC;IAEKS,IAAA,GAAOZ,MAAA,CAAOE,OAAA,CAAQU,IAAA,EAAM;MAChCN,IAAA;MACAH;IACF,CAAC;EAED,OAAOL,oBAAA,CAAqBS,KAAA,EAAO;IACjCM,KAAA,EAAOV,OAAA,CAAQW,QAAA;IACfF,IAAA;IACAD;EACF,CAAC;AACH","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- export * from "./Button";
2
- //# sourceMappingURL=index.js.map
1
+ export * from "./Button.native.js";
2
+ //# sourceMappingURL=index.native.js.map
@@ -1,6 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/Users/n8/tamagui/code/ui/button-next/src/index.ts"],
4
- "mappings": "AAAA,cAAc;",
5
- "names": []
6
- }
1
+ {"version":3,"names":[],"sources":["../../src/index.ts"],"sourcesContent":[null],"mappings":"AAAA,cAAc","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/button-next",
3
- "version": "1.125.6",
3
+ "version": "1.125.7",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -36,14 +36,14 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@tamagui/get-button-sized": "1.125.6",
40
- "@tamagui/helpers-tamagui": "1.125.6",
41
- "@tamagui/stacks": "1.125.6",
42
- "@tamagui/text": "1.125.6",
43
- "@tamagui/web": "1.125.6"
39
+ "@tamagui/get-button-sized": "1.125.7",
40
+ "@tamagui/helpers-tamagui": "1.125.7",
41
+ "@tamagui/stacks": "1.125.7",
42
+ "@tamagui/text": "1.125.7",
43
+ "@tamagui/web": "1.125.7"
44
44
  },
45
45
  "devDependencies": {
46
- "@tamagui/build": "1.125.6",
46
+ "@tamagui/build": "1.125.7",
47
47
  "react": "*",
48
48
  "vitest": "^3.0.5"
49
49
  },