@tamagui/input 1.121.12 → 1.122.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tamagui/input",
3
- "version": "1.121.12",
3
+ "version": "1.122.1",
4
4
  "sideEffects": [
5
5
  "*.css"
6
6
  ],
@@ -36,18 +36,18 @@
36
36
  }
37
37
  },
38
38
  "dependencies": {
39
- "@tamagui/core": "1.121.12",
40
- "@tamagui/focusable": "1.121.12",
41
- "@tamagui/font-size": "1.121.12",
42
- "@tamagui/get-button-sized": "1.121.12",
43
- "@tamagui/helpers": "1.121.12",
44
- "@tamagui/helpers-tamagui": "1.121.12",
45
- "@tamagui/stacks": "1.121.12",
46
- "@tamagui/text": "1.121.12",
47
- "@tamagui/web": "1.121.12"
39
+ "@tamagui/core": "1.122.1",
40
+ "@tamagui/focusable": "1.122.1",
41
+ "@tamagui/font-size": "1.122.1",
42
+ "@tamagui/get-button-sized": "1.122.1",
43
+ "@tamagui/helpers": "1.122.1",
44
+ "@tamagui/helpers-tamagui": "1.122.1",
45
+ "@tamagui/stacks": "1.122.1",
46
+ "@tamagui/text": "1.122.1",
47
+ "@tamagui/web": "1.122.1"
48
48
  },
49
49
  "devDependencies": {
50
- "@tamagui/build": "1.121.12",
50
+ "@tamagui/build": "1.122.1",
51
51
  "react": "*",
52
52
  "vitest": "^2.1.8"
53
53
  },
package/src/Input.tsx CHANGED
@@ -1,6 +1,7 @@
1
- import React from 'react'
1
+ import React, { type HTMLInputTypeAttribute, type HTMLAttributes } from 'react'
2
2
  import { View, styled, useComposedRefs, useEvent, useTheme } from '@tamagui/core'
3
3
  import { registerFocusable } from '@tamagui/focusable'
4
+ import type { InputModeOptions } from 'react-native'
4
5
 
5
6
  import { styledBody } from './shared'
6
7
  import type { InputProps } from './types'
@@ -93,11 +94,51 @@ export const Input = StyledInput.styleable<InputProps>((inProps, forwardedRef) =
93
94
 
94
95
  const finalProps = {
95
96
  ...rest,
96
- inputMode,
97
97
  disabled,
98
98
  caretColor,
99
99
  id,
100
100
  enterKeyHint,
101
+ ...(process.env.TAMAGUI_TARGET === 'web'
102
+ ? {
103
+ type: (() => {
104
+ if (secureTextEntry) return 'password'
105
+ switch (keyboardType) {
106
+ case 'number-pad':
107
+ case 'numeric':
108
+ return 'number'
109
+ case 'email-address':
110
+ return 'email'
111
+ case 'phone-pad':
112
+ return 'tel'
113
+ case 'url':
114
+ return 'url'
115
+ default:
116
+ return 'text'
117
+ }
118
+ })() satisfies HTMLInputTypeAttribute,
119
+ inputMode: (() => {
120
+ switch (keyboardType) {
121
+ case 'number-pad':
122
+ case 'numeric':
123
+ return 'numeric'
124
+ case 'decimal-pad':
125
+ return 'decimal'
126
+ case 'email-address':
127
+ return 'email'
128
+ case 'phone-pad':
129
+ return 'tel'
130
+ case 'url':
131
+ return 'url'
132
+ default:
133
+ return undefined
134
+ }
135
+ })() satisfies HTMLAttributes<HTMLInputElement>['inputMode'],
136
+ }
137
+ : {
138
+ keyboardType,
139
+ secureTextEntry,
140
+ inputMode,
141
+ }),
101
142
  style: {
102
143
  ...(rest.style as any),
103
144
  ...(placeholderTextColor && {
package/types/Input.d.ts CHANGED
@@ -352,14 +352,6 @@ export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import
352
352
  direction: boolean;
353
353
  shadowOffset: boolean;
354
354
  shadowRadius: boolean;
355
- focusVisibleStyle?: boolean | undefined;
356
- enterStyle: boolean;
357
- exitStyle: boolean;
358
- hoverStyle: boolean;
359
- pressStyle: boolean;
360
- focusStyle: boolean;
361
- disabledStyle: boolean;
362
- focusWithinStyle: boolean;
363
355
  };
364
356
  name?: undefined;
365
357
  tag?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuIhB,CAAA"}
1
+ {"version":3,"file":"Input.d.ts","sourceRoot":"","sources":["../src/Input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAuIhB,CAAA"}
@@ -353,14 +353,6 @@ export declare const Input: import("@tamagui/core").TamaguiComponent<Omit<import
353
353
  direction: boolean;
354
354
  shadowOffset: boolean;
355
355
  shadowRadius: boolean;
356
- focusVisibleStyle?: boolean | undefined;
357
- enterStyle: boolean;
358
- exitStyle: boolean;
359
- hoverStyle: boolean;
360
- pressStyle: boolean;
361
- focusStyle: boolean;
362
- disabledStyle: boolean;
363
- focusWithinStyle: boolean;
364
356
  };
365
357
  name?: undefined;
366
358
  tag?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"Input.native.d.ts","sourceRoot":"","sources":["../src/Input.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0IhB,CAAA"}
1
+ {"version":3,"file":"Input.native.d.ts","sourceRoot":"","sources":["../src/Input.native.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAKzB,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAKxC,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0IhB,CAAA"}
@@ -335,14 +335,6 @@ export declare const TextArea: import("@tamagui/web").TamaguiComponent<import("@
335
335
  direction: boolean;
336
336
  shadowOffset: boolean;
337
337
  shadowRadius: boolean;
338
- focusVisibleStyle?: boolean | undefined;
339
- enterStyle: boolean;
340
- exitStyle: boolean;
341
- hoverStyle: boolean;
342
- pressStyle: boolean;
343
- focusStyle: boolean;
344
- disabledStyle: boolean;
345
- focusWithinStyle: boolean;
346
338
  };
347
339
  name?: undefined;
348
340
  tag?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../src/TextArea.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAyBnB,CAAA"}
1
+ {"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../src/TextArea.tsx"],"names":[],"mappings":"AAIA,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;+CAyBnB,CAAA"}
package/types/shared.d.ts CHANGED
@@ -366,14 +366,6 @@ export declare const styledBody: ({
366
366
  direction: boolean;
367
367
  shadowOffset: boolean;
368
368
  shadowRadius: boolean;
369
- focusVisibleStyle?: boolean | undefined;
370
- enterStyle: boolean;
371
- exitStyle: boolean;
372
- hoverStyle: boolean;
373
- pressStyle: boolean;
374
- focusStyle: boolean;
375
- disabledStyle: boolean;
376
- focusWithinStyle: boolean;
377
369
  };
378
370
  name?: undefined;
379
371
  tag?: undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAA;AAO9D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkChB,CAAA;AAEV,eAAO,MAAM,gBAAgB,EAAE,yBAAyB,CAAC,GAAG,CAsB3D,CAAA;AAED,eAAO,MAAM,mBAAmB,EAAE,yBAAyB,CAAC,GAAG,CAyB9D,CAAA;AACD,eAAO,MAAM,UAAU,UAAU,CAAA;AAEjC,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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