@trionesdev/antd-taro-react 0.0.2-beta.3 → 0.0.2-beta.4

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.
@@ -134,6 +134,24 @@ wx-input {
134
134
 
135
135
  }
136
136
 
137
+ .#{$inputCls} {
138
+ &-outlined {
139
+ border-radius: variable.$trionesBorderRadius;
140
+ border: 1Px solid variable.$trionesBorderColor;
141
+ padding-inline: 4Px;
142
+ }
143
+
144
+ &-filled {
145
+ border-radius: variable.$trionesBorderRadius;
146
+ background-color: variable.$trionesColorFillTertiary;
147
+ padding-inline: 4Px;
148
+ }
149
+
150
+ &-underlined {
151
+ border-bottom: 1Px solid variable.$trionesBorderColor;
152
+ }
153
+ }
154
+
137
155
  .#{$inputGroupWrapperCls} {}
138
156
 
139
157
 
@@ -222,18 +240,18 @@ wx-input {
222
240
  .#{$inputCls}-textarea {
223
241
  box-sizing: border-box;
224
242
  width: 100%;
225
- border: 0;
226
243
  outline: 0;
227
- padding: variable.$trionesInputPaddingBlock 0;
228
244
  font-size: variable.$trionesInputInputFontSize;
229
245
 
230
246
  taro-textarea-core {
231
247
  width: 100%;
232
248
  }
233
-
249
+ .taro-textarea{
250
+ background-color: transparent;
251
+ }
234
252
  textarea {
235
253
  padding: variable.$trionesInputPaddingBlock 0;
236
-
254
+ background-color: transparent;
237
255
  &::placeholder {
238
256
  font-size: variable.$trionesInputInputFontSize;
239
257
  color: $placeholderColor
@@ -246,4 +264,4 @@ wx-input {
246
264
  50% {
247
265
  background-color: transparent;
248
266
  }
249
- }
267
+ }
@@ -1,9 +1,11 @@
1
1
  import React, { FC, PropsWithChildren } from 'react';
2
+ import { variantType } from "./types";
2
3
  export type InputAffixWrapperProps = {
3
4
  style?: React.CSSProperties;
4
5
  className?: string;
5
6
  prefix?: React.ReactNode;
6
7
  suffix?: React.ReactNode;
8
+ variant?: variantType;
7
9
  allowClear?: boolean;
8
10
  value?: any;
9
11
  onClear?: () => void;
@@ -1,4 +1,8 @@
1
- var _excluded = ["children", "style", "className", "prefix", "suffix", "allowClear", "value", "onClear"];
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ var _excluded = ["children", "style", "className", "prefix", "suffix", "variant", "allowClear", "value", "onClear"];
3
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
4
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
5
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
2
6
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
3
7
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4
8
  import classNames from 'classnames';
@@ -11,13 +15,14 @@ export var InputAffixWrapper = function InputAffixWrapper(_ref) {
11
15
  className = _ref.className,
12
16
  prefix = _ref.prefix,
13
17
  suffix = _ref.suffix,
18
+ variant = _ref.variant,
14
19
  allowClear = _ref.allowClear,
15
20
  value = _ref.value,
16
21
  onClear = _ref.onClear,
17
22
  rest = _objectWithoutProperties(_ref, _excluded);
18
23
  var innerStyle = style || {};
19
24
  return /*#__PURE__*/React.createElement("div", {
20
- className: classNames([inputAffixWrapperCls]),
25
+ className: classNames([inputAffixWrapperCls, _defineProperty({}, "".concat(inputCls, "-").concat(variant), variant)]),
21
26
  style: innerStyle
22
27
  }, prefix && /*#__PURE__*/React.createElement("div", {
23
28
  className: classNames(["".concat(inputCls, "-prefix")])
@@ -1,7 +1,9 @@
1
1
  import React, { FC } from 'react';
2
+ import { variantType } from './types';
2
3
  export type InputTextareaProps = {
3
4
  className?: string;
4
5
  style?: React.CSSProperties;
6
+ variant?: variantType;
5
7
  placeholder?: string;
6
8
  disabled?: boolean;
7
9
  allowClear?: boolean;
@@ -1,3 +1,7 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
1
5
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
6
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
3
7
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
@@ -11,6 +15,7 @@ import classNames from 'classnames';
11
15
  export var Textarea = function Textarea(_ref) {
12
16
  var className = _ref.className,
13
17
  style = _ref.style,
18
+ variant = _ref.variant,
14
19
  placeholder = _ref.placeholder,
15
20
  disabled = _ref.disabled,
16
21
  allowClear = _ref.allowClear,
@@ -32,7 +37,7 @@ export var Textarea = function Textarea(_ref) {
32
37
  setInternalValue(value);
33
38
  }, [value]);
34
39
  return /*#__PURE__*/React.createElement("div", {
35
- className: classNames("".concat(inputCls, "-textarea"), className),
40
+ className: classNames("".concat(inputCls, "-textarea"), _defineProperty({}, "".concat(inputCls, "-").concat(variant), variant), className),
36
41
  style: style
37
42
  }, /*#__PURE__*/React.createElement(TaroTextarea, {
38
43
  placeholder: placeholder,
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { SizeType } from "@trionesdev/antd-mobile-base-react";
2
+ import React from "react";
3
3
  export declare const inputCls = "triones-antm-input";
4
4
  export declare const inputAffixWrapperCls = "triones-antm-input-affix-wrapper";
5
5
  export type InputProps = {
@@ -11,7 +11,9 @@ export type InputProps = {
11
11
  allowClear?: boolean;
12
12
  prefix?: React.ReactNode;
13
13
  suffix?: React.ReactNode;
14
+ variant?: variantType;
14
15
  defaultValue?: any;
15
16
  value?: any;
16
17
  onChange?: (e: any) => void;
17
18
  };
19
+ export type variantType = 'outlined' | 'borderless' | 'filled' | 'underlined' | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trionesdev/antd-taro-react",
3
- "version": "0.0.2-beta.3",
3
+ "version": "0.0.2-beta.4",
4
4
  "description": "antd taro react",
5
5
  "module": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -9,7 +9,7 @@
9
9
  "build": "father build",
10
10
  "build:deps": "father prebundle",
11
11
  "prepublishOnly": "father doctor && npm run build",
12
- "publish": "npm publish --registry=https://registry.npmjs.org/",
12
+ "publish": "npm publish --tag latest --registry=https://registry.npmjs.org/",
13
13
  "publishOnly": "npm publish --ignore-scripts --registry=https://registry.npmjs.org/"
14
14
  },
15
15
  "keywords": [],
@@ -56,7 +56,7 @@
56
56
  },
57
57
  "dependencies": {
58
58
  "@tarojs/components": "^4.1.8",
59
- "@trionesdev/antd-mobile-base-react": "0.0.2-beta.3",
59
+ "@trionesdev/antd-mobile-base-react": "^0.0.2-beta.4",
60
60
  "crypto-js": "^4.2.0",
61
61
  "rc-field-form": "^2.7.0",
62
62
  "rc-util": "^5.44.3",
@@ -65,7 +65,7 @@
65
65
  },
66
66
  "optionalDependencies": {
67
67
  "@trionesdev/antd-mobile-base-react": "workspace:*",
68
- "@trionesdev/antd-mobile-icons-react": "0.0.2-beta.3"
68
+ "@trionesdev/antd-mobile-icons-react": "0.0.2-beta.4"
69
69
  },
70
- "gitHead": "72b3e398935c0811b26170adf2246e525f2aadcc"
70
+ "gitHead": "7d22b9c62fa05902a5afff83ba1091f0ad0843c3"
71
71
  }