ywana-core8 0.0.858 → 0.0.860

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/dist/index.umd.js CHANGED
@@ -1265,7 +1265,7 @@
1265
1265
  * Text Field
1266
1266
  */
1267
1267
  var TextField = function TextField(props) {
1268
- var site = React.useContext(SiteContext);
1268
+ React.useContext(SiteContext);
1269
1269
  var id = props.id,
1270
1270
  _props$type = props.type,
1271
1271
  type = _props$type === void 0 ? 'text' : _props$type,
@@ -1282,6 +1282,7 @@
1282
1282
  onChange = props.onChange,
1283
1283
  onEnter = props.onEnter,
1284
1284
  onClick = props.onClick,
1285
+ onFocus = props.onFocus,
1285
1286
  onBlur = props.onBlur;
1286
1287
  function onKeyPress(event) {
1287
1288
  var key = event.charCode ? event.charCode : event.keyCode ? event.keyCode : 0;
@@ -1296,13 +1297,7 @@
1296
1297
  if (onChange) onChange(id, value);
1297
1298
  }
1298
1299
  function focus() {
1299
- if (site && site.changeFocus) {
1300
- site.changeFocus({
1301
- lose: function lose() {
1302
- // DO NOTHING
1303
- }
1304
- });
1305
- }
1300
+ if (onFocus) onFocus();
1306
1301
  }
1307
1302
  function blur() {
1308
1303
  if (onBlur) onBlur();
@@ -3691,23 +3686,11 @@
3691
3686
  var _useState12 = React.useState(),
3692
3687
  breadcrumb = _useState12[0],
3693
3688
  setBreadcrumb = _useState12[1];
3694
- var _useState13 = React.useState(),
3695
- focused = _useState13[0],
3696
- setFocused = _useState13[1];
3697
3689
  var value = {
3698
3690
  lang: lang,
3699
3691
  setLang: setLang,
3700
3692
  dictionary: dictionary,
3701
3693
  setDictionary: setDictionary,
3702
- focused: focused,
3703
- changeFocus: function changeFocus(next) {
3704
- if (focused) focused.lose();
3705
- setFocused(next);
3706
- },
3707
- clearFocus: function clearFocus() {
3708
- if (focused) focused.lose();
3709
- setFocused(null);
3710
- },
3711
3694
  sideNav: sideNav,
3712
3695
  setSideNav: setSideNav,
3713
3696
  showNav: showNav,