@economic/taco 0.0.12-alpha.0 → 0.0.15-alpha.0

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.
Files changed (43) hide show
  1. package/dist/components/{Label/Label.d.ts → Field/Field.d.ts} +9 -9
  2. package/dist/components/Menu/Menu.d.ts +1 -0
  3. package/dist/esm/components/Backdrop/Backdrop.js +1 -1
  4. package/dist/esm/components/Backdrop/Backdrop.js.map +1 -1
  5. package/dist/esm/components/Banner/Banner.js +1 -1
  6. package/dist/esm/components/Banner/Banner.js.map +1 -1
  7. package/dist/esm/components/Button/Button.js +15 -1
  8. package/dist/esm/components/Button/Button.js.map +1 -1
  9. package/dist/esm/components/Button/util.js +7 -7
  10. package/dist/esm/components/Button/util.js.map +1 -1
  11. package/dist/esm/components/Calendar/Calendar.js +3 -1
  12. package/dist/esm/components/Calendar/Calendar.js.map +1 -1
  13. package/dist/esm/components/Datepicker/useDatepicker.js +9 -0
  14. package/dist/esm/components/Datepicker/useDatepicker.js.map +1 -1
  15. package/dist/esm/components/Dialog/Dialog.js +4 -2
  16. package/dist/esm/components/Dialog/Dialog.js.map +1 -1
  17. package/dist/esm/components/Dialog/components/Content.js +1 -1
  18. package/dist/esm/components/Dialog/components/Content.js.map +1 -1
  19. package/dist/esm/components/{Label/Label.js → Field/Field.js} +3 -3
  20. package/dist/esm/components/Field/Field.js.map +1 -0
  21. package/dist/esm/components/Input/Input.js +19 -2
  22. package/dist/esm/components/Input/Input.js.map +1 -1
  23. package/dist/esm/components/Menu/components/Item.js.map +1 -1
  24. package/dist/esm/components/Provider/Provider.js +1 -1
  25. package/dist/esm/components/Provider/Provider.js.map +1 -1
  26. package/dist/esm/components/SearchInput/SearchInput.js +5 -3
  27. package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
  28. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js +3 -1
  29. package/dist/esm/components/Table/hooks/useTableKeyboardNavigation.js.map +1 -1
  30. package/dist/esm/components/Textarea/Textarea.js +21 -3
  31. package/dist/esm/components/Textarea/Textarea.js.map +1 -1
  32. package/dist/esm/index.css +8 -9
  33. package/dist/esm/index.js +2 -1
  34. package/dist/esm/index.js.map +1 -1
  35. package/dist/index.css +8 -9
  36. package/dist/index.d.ts +2 -1
  37. package/dist/taco.cjs.development.js +125 -60
  38. package/dist/taco.cjs.development.js.map +1 -1
  39. package/dist/taco.cjs.production.min.js +1 -1
  40. package/dist/taco.cjs.production.min.js.map +1 -1
  41. package/package.json +2 -2
  42. package/types.json +118 -118
  43. package/dist/esm/components/Label/Label.js.map +0 -1
@@ -3192,7 +3192,7 @@ Accordion.Trigger = Trigger;
3192
3192
  Accordion.Content = Content;
3193
3193
 
3194
3194
  var Backdrop = /*#__PURE__*/React.forwardRef(function Backdrop(props, ref) {
3195
- var className = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] animate-[fade-in_150ms] aria-hidden:hidden', props.className);
3195
+ var className = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] aria-hidden:hidden', props.className);
3196
3196
  return React.createElement("div", Object.assign({}, props, {
3197
3197
  className: className,
3198
3198
  ref: ref
@@ -3349,7 +3349,7 @@ var Tooltip = /*#__PURE__*/React.forwardRef(function (props, ref) {
3349
3349
 
3350
3350
  var _excluded$5 = ["dialog", "hanger", "menu", "popover", "tooltip"];
3351
3351
  var getButtonClasses = function getButtonClasses() {
3352
- return 'min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] leading-6 inline-flex items-center justify-center transition-all delay-100 ease-in border';
3352
+ return 'min-h-[theme(spacing.8)] min-w-[theme(spacing.8)] h-max leading-6 inline-flex items-center justify-center transition-all delay-100 ease-in border';
3353
3353
  };
3354
3354
  var getAppearanceClasses = function getAppearanceClasses(value, icon) {
3355
3355
  if (icon === void 0) {
@@ -3358,25 +3358,25 @@ var getAppearanceClasses = function getAppearanceClasses(value, icon) {
3358
3358
 
3359
3359
  switch (value) {
3360
3360
  case 'primary':
3361
- return "yt-blue-solid border-blue\n focus:bg-blue focus:text-white focus:yt-focus\n active:bg-blue-dark active:text-white \n hover:bg-blue-light hover:border-blue-light hover:text-white\n hover:focus:bg-blue-light hover:focus:border-blue-light hover:focus:text-white\n disabled:hover:yt-blue-solid";
3361
+ return "yt-blue-solid border-blue focus:bg-blue focus:text-white focus:yt-focus active:bg-blue-dark active:text-white hover:bg-blue-light hover:border-blue-light hover:text-white hover:focus:bg-blue-light hover:focus:border-blue-light hover:focus:text-white disabled:hover:yt-blue-solid";
3362
3362
 
3363
3363
  case 'danger':
3364
- return "yt-red-solid border-red\n focus:bg-red focus:text-white focus:yt-focus-red\n active:bg-red-dark active:text-white \n hover:bg-red-light hover:text-white\n hover:focus:bg-red-light hover:focus:text-white\n disabled:hover:yt-red-solid";
3364
+ return "yt-red-solid border-red focus:bg-red focus:text-white focus:yt-focus-red active:bg-red-dark active:text-white hover:bg-red-light hover:text-white hover:focus:bg-red-light hover:focus:text-white disabled:hover:yt-red-solid";
3365
3365
 
3366
3366
  case 'ghost':
3367
- return "yt-blue-inverted\n focus:bg-transparent focus:text-blue focus:yt-focus\n active:bg-blue-lightest active:border-blue active:text-blue-dark \n hover:bg-blue-lightest hover:border-blue-light hover:text-blue-light\n hover:focus:bg-blue-lightest hover:focus:border-blue-light hover:focus:text-blue-light\n disabled:hover:yt-blue-inverted";
3367
+ return "yt-blue-inverted focus:bg-transparent focus:text-blue focus:yt-focus active:bg-blue-lightest active:border-blue active:text-blue-dark hover:bg-blue-lightest hover:border-blue-light hover:text-blue-light hover:focus:bg-blue-lightest hover:focus:border-blue-light hover:focus:text-blue-light disabled:hover:yt-blue-inverted";
3368
3368
 
3369
3369
  case 'discrete':
3370
3370
  {
3371
3371
  if (icon) {
3372
- return "bg-transparent text-black border-transparent\n focus:text-black focus:yt-focus\n active:text-black\n hover:text-grey-darkest\n hover:focus:text-grey-darkest\n disabled:hover:yt-transparent";
3372
+ return "bg-transparent text-black border-transparent focus:text-black focus:yt-focus active:text-black hover:text-grey-darkest hover:focus:text-grey-darkest disabled:hover:yt-transparent";
3373
3373
  }
3374
3374
 
3375
- return "yt-transparent border-transparent\n focus:text-blue focus:yt-focus\n active:text-blue-dark\n hover:text-blue-light\n hover:focus:text-blue-light\n disabled:hover:yt-transparent";
3375
+ return "yt-transparent border-transparent focus:text-blue focus:yt-focus active:text-blue-dark hover:text-blue-light hover:focus:text-blue-light disabled:hover:yt-transparent";
3376
3376
  }
3377
3377
 
3378
3378
  default:
3379
- return "yt-grey-solid border-grey\n focus:bg-grey focus:yt-focus\n active:bg-grey-dark active:text-black\n hover:bg-grey-light hover:text-grey-darkest\n hover:focus:bg-grey-light hover:focus:text-grey-darkest\n disabled:hover:yt-grey-solid";
3379
+ return "yt-grey-solid border-grey focus:bg-grey focus:yt-focus active:bg-grey-dark active:text-black hover:bg-grey-light hover:text-grey-darkest hover:focus:bg-grey-light hover:focus:text-grey-darkest disabled:hover:yt-grey-solid";
3380
3380
  }
3381
3381
  };
3382
3382
  var createButton = function createButton(props, className, ref) {
@@ -3459,7 +3459,7 @@ var Banner = /*#__PURE__*/React.forwardRef(function Banner(props, ref) {
3459
3459
  "data-taco": "banner",
3460
3460
  ref: ref
3461
3461
  }, getBannerIcon(state), children, onClose ? React.createElement(IconButton, {
3462
- className: "ml-auto",
3462
+ className: "ml-auto -mr-2",
3463
3463
  icon: "close",
3464
3464
  appearance: "discrete",
3465
3465
  onClick: onClose
@@ -3477,7 +3477,20 @@ var Button$1 = /*#__PURE__*/React.forwardRef(function Button(props, ref) {
3477
3477
  'focus:yt-focus active:focus:yt-focus': !props.disabled,
3478
3478
  'w-full': fluid
3479
3479
  }, props.className);
3480
+ var children = otherProps.children; // add a chevron icon to menu buttons
3481
+
3482
+ if (typeof otherProps.menu === 'function') {
3483
+ children = Array.isArray(children) ? [].concat(children, [React.createElement(Icon, {
3484
+ key: "chevron-down",
3485
+ name: "chevron-down"
3486
+ })]) : [children, React.createElement(Icon, {
3487
+ key: "chevron-down",
3488
+ name: "chevron-down"
3489
+ })];
3490
+ }
3491
+
3480
3492
  return createButton(_extends({}, otherProps, {
3493
+ children: children,
3481
3494
  'data-taco': 'button'
3482
3495
  }), className, ref);
3483
3496
  });
@@ -3942,7 +3955,7 @@ var defaultLocalisationTexts = {
3942
3955
  back: 'Back',
3943
3956
  close: 'Close',
3944
3957
  skip: 'Close and complete',
3945
- last: 'Last',
3958
+ last: 'Done',
3946
3959
  next: 'Next',
3947
3960
  open: 'Open'
3948
3961
  },
@@ -4015,7 +4028,7 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4015
4028
  };
4016
4029
 
4017
4030
  return React.createElement("div", {
4018
- className: "flex justify-between items-center mb-2"
4031
+ className: "mb-2 flex items-center justify-between"
4019
4032
  }, React.createElement("form", {
4020
4033
  className: "inline-flex space-x-1"
4021
4034
  }, React.createElement("select", {
@@ -4025,6 +4038,7 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4025
4038
  value: value.getMonth()
4026
4039
  }, months.map(function (month, i) {
4027
4040
  return React.createElement("option", {
4041
+ key: month,
4028
4042
  value: i
4029
4043
  }, month);
4030
4044
  })), React.createElement("select", {
@@ -4034,6 +4048,7 @@ var Navbar = /*#__PURE__*/React.memo(function (_ref) {
4034
4048
  value: value.getFullYear()
4035
4049
  }, years.map(function (year) {
4036
4050
  return React.createElement("option", {
4051
+ key: year,
4037
4052
  value: year
4038
4053
  }, String(year));
4039
4054
  }))), React.createElement("div", null, React.createElement(IconButton, {
@@ -4230,10 +4245,11 @@ var getButtonStateClasses = function getButtonStateClasses(value) {
4230
4245
  }
4231
4246
  };
4232
4247
 
4233
- var _excluded$d = ["button", "icon", "highlighted", "state", "autoFocus"];
4248
+ var _excluded$d = ["button", "icon", "highlighted", "onKeyDown", "state", "autoFocus"];
4234
4249
  var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4235
4250
  var button = props.button,
4236
4251
  icon = props.icon,
4252
+ onKeyDown = props.onKeyDown,
4237
4253
  state = props.state,
4238
4254
  autoFocus = props.autoFocus,
4239
4255
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$d);
@@ -4247,10 +4263,26 @@ var Input = /*#__PURE__*/React.forwardRef(function Input(props, ref) {
4247
4263
  if (autoFocus && inputRef.current) {
4248
4264
  inputRef.current.focus();
4249
4265
  }
4250
- }, []);
4266
+ }, []); // home and end keys only navigate to the start/end of input value if the input container does not scroll
4267
+ // if it has scroll height then the browser reverts to native scrolling behaviour only
4268
+ // so we manually override it to ensure _our_ desired behaviour remains intact
4269
+
4270
+ var handleKeyDown = function handleKeyDown(event) {
4271
+ if (event.key === 'Home' || event.key === 'End') {
4272
+ event.preventDefault();
4273
+ var position = event.key === 'End' ? event.currentTarget.value.length : 0;
4274
+ event.currentTarget.setSelectionRange(position, position);
4275
+ }
4276
+
4277
+ if (onKeyDown) {
4278
+ onKeyDown(event);
4279
+ }
4280
+ };
4281
+
4251
4282
  var input = React.createElement("input", Object.assign({}, otherProps, {
4252
4283
  className: className,
4253
4284
  "data-taco": "input",
4285
+ onKeyDown: handleKeyDown,
4254
4286
  ref: inputRef
4255
4287
  }));
4256
4288
 
@@ -5307,10 +5339,19 @@ var useDatepicker = function useDatepicker(_ref, ref) {
5307
5339
  setInputValueByRef(inputRef.current, format(date, formatting.date), 'focusout');
5308
5340
  };
5309
5341
 
5342
+ var handleKeyDown = function handleKeyDown(event) {
5343
+ if (event.key === 'Enter') {
5344
+ event.target.dispatchEvent(new Event('focusout', {
5345
+ bubbles: true
5346
+ }));
5347
+ }
5348
+ };
5349
+
5310
5350
  var inputProps = _extends({}, props, {
5311
5351
  autoComplete: 'off',
5312
5352
  onBlur: handleInputBlur,
5313
5353
  onChange: handleInputChange,
5354
+ onKeyDown: handleKeyDown,
5314
5355
  ref: inputRef,
5315
5356
  type: 'text',
5316
5357
  value: internalValue
@@ -5652,7 +5693,7 @@ var Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref)
5652
5693
  };
5653
5694
  }
5654
5695
 
5655
- var className = cn('bg-white rounded relative mt-16 mx-auto', {
5696
+ var className = cn('bg-white rounded relative mt-16 mx-auto animate-[fade-in_150ms]', {
5656
5697
  'w-128 text-center justify-center': dialog.size === 'dialog',
5657
5698
  'w-xs': dialog.size === 'xs',
5658
5699
  'w-sm': dialog.size === 'sm',
@@ -5770,9 +5811,11 @@ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
5770
5811
  var drawer;
5771
5812
  var extra;
5772
5813
  React.Children.forEach(initialChildren, function (child) {
5773
- if (child.type.displayName === 'Drawer') {
5814
+ var _child$type, _child$type2;
5815
+
5816
+ if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === 'Drawer') {
5774
5817
  drawer = child;
5775
- } else if (child.type.displayName === 'Extra') {
5818
+ } else if (((_child$type2 = child.type) === null || _child$type2 === void 0 ? void 0 : _child$type2.displayName) === 'Extra') {
5776
5819
  extra = child;
5777
5820
  } else {
5778
5821
  children.push(child);
@@ -5847,11 +5890,40 @@ Dialog.Extra = Extra;
5847
5890
  Dialog.Drawer = Drawer;
5848
5891
  Dialog.Close = Close$2;
5849
5892
 
5850
- var _excluded$n = ["horizontal"];
5893
+ var _excluded$n = ["disabled", "children", "message", "state"];
5894
+ var Field = /*#__PURE__*/React.forwardRef(function Field(props, ref) {
5895
+ var disabled = props.disabled,
5896
+ children = props.children,
5897
+ message = props.message,
5898
+ state = props.state,
5899
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$n);
5900
+
5901
+ var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5902
+ 'text-grey-dark': disabled
5903
+ }, props.className);
5904
+ var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5905
+ 'text-grey-darkest': !state || state === 'default',
5906
+ 'text-red': state === 'error',
5907
+ 'text-green': state === 'success',
5908
+ 'text-blue': state === 'information',
5909
+ 'text-yellow-dark': state === 'warning',
5910
+ 'opacity-50': disabled
5911
+ }, props.className);
5912
+ return React.createElement("label", Object.assign({}, otherProps, {
5913
+ className: className,
5914
+ "data-taco": "label",
5915
+ ref: ref
5916
+ }), children, message && React.createElement("span", {
5917
+ className: messageClassName,
5918
+ role: state === 'error' ? 'alert' : undefined
5919
+ }, message));
5920
+ });
5921
+
5922
+ var _excluded$o = ["horizontal"];
5851
5923
  var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5852
5924
  var _props$horizontal = props.horizontal,
5853
5925
  horizontal = _props$horizontal === void 0 ? false : _props$horizontal,
5854
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$n);
5926
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$o);
5855
5927
 
5856
5928
  var className = cn('yt-form', {
5857
5929
  'yt-form--horizontal flex flex-wrap': horizontal
@@ -5863,11 +5935,11 @@ var Form = /*#__PURE__*/React.forwardRef(function Form(props, ref) {
5863
5935
  }));
5864
5936
  });
5865
5937
 
5866
- var _excluded$o = ["as"];
5938
+ var _excluded$p = ["as"];
5867
5939
  var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5868
5940
  var _props$as = props.as,
5869
5941
  Tag = _props$as === void 0 ? 'span' : _props$as,
5870
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$o);
5942
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$p);
5871
5943
 
5872
5944
  var className = cn('flex ', props.className);
5873
5945
  return React.createElement(Tag, Object.assign({}, otherProps, {
@@ -5877,7 +5949,7 @@ var Group = /*#__PURE__*/React.forwardRef(function Group(props, ref) {
5877
5949
  }));
5878
5950
  });
5879
5951
 
5880
- var _excluded$p = ["anchor", "children"];
5952
+ var _excluded$q = ["anchor", "children"];
5881
5953
  var HangerContext = /*#__PURE__*/React.createContext({
5882
5954
  props: {},
5883
5955
  ref: null
@@ -5930,7 +6002,7 @@ var Content$3 = /*#__PURE__*/React.forwardRef(function (props, ref) {
5930
6002
  var Hanger = /*#__PURE__*/React.forwardRef(function (props, ref) {
5931
6003
  var anchor = props.anchor,
5932
6004
  children = props.children,
5933
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$p);
6005
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$q);
5934
6006
 
5935
6007
  var context = React.useMemo(function () {
5936
6008
  return {
@@ -5947,10 +6019,10 @@ var Hanger = /*#__PURE__*/React.forwardRef(function (props, ref) {
5947
6019
  Hanger.Anchor = Anchor;
5948
6020
  Hanger.Content = Content$3;
5949
6021
 
5950
- var _excluded$q = ["onSearch"];
6022
+ var _excluded$r = ["onSearch"];
5951
6023
  var SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput(_ref, ref) {
5952
6024
  var onSearch = _ref.onSearch,
5953
- props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
6025
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
5954
6026
 
5955
6027
  var _useLocalization = useLocalization(),
5956
6028
  texts = _useLocalization.texts;
@@ -5974,44 +6046,16 @@ var SearchInput = /*#__PURE__*/React.forwardRef(function SearchInput(_ref, ref)
5974
6046
  }, props, {
5975
6047
  button: React.createElement(IconButton, {
5976
6048
  icon: "search",
5977
- className: "!bg-transparent !border-transparent",
6049
+ className: "!border-transparent !bg-transparent",
5978
6050
  disabled: props.disabled,
5979
6051
  onClick: handleClick
5980
6052
  }),
5981
6053
  onKeyDown: handleKeyDown,
5982
- ref: ref
6054
+ ref: ref,
6055
+ type: "search"
5983
6056
  }));
5984
6057
  });
5985
6058
 
5986
- var _excluded$r = ["disabled", "children", "message", "state"];
5987
- var Label = /*#__PURE__*/React.forwardRef(function Label(props, ref) {
5988
- var disabled = props.disabled,
5989
- children = props.children,
5990
- message = props.message,
5991
- state = props.state,
5992
- otherProps = _objectWithoutPropertiesLoose(props, _excluded$r);
5993
-
5994
- var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
5995
- 'text-grey-dark': disabled
5996
- }, props.className);
5997
- var messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
5998
- 'text-grey-darkest': !state || state === 'default',
5999
- 'text-red': state === 'error',
6000
- 'text-green': state === 'success',
6001
- 'text-blue': state === 'information',
6002
- 'text-yellow-dark': state === 'warning',
6003
- 'opacity-50': disabled
6004
- }, props.className);
6005
- return React.createElement("label", Object.assign({}, otherProps, {
6006
- className: className,
6007
- "data-taco": "label",
6008
- ref: ref
6009
- }), children, message && React.createElement("span", {
6010
- className: messageClassName,
6011
- role: state === 'error' ? 'alert' : undefined
6012
- }, message));
6013
- });
6014
-
6015
6059
  var useTypeahead = function useTypeahead(_ref) {
6016
6060
  var data = _ref.data,
6017
6061
  currentIndex = _ref.currentIndex;
@@ -8387,9 +8431,11 @@ var useTableKeyboardNavigation = function useTableKeyboardNavigation(props, rows
8387
8431
  setActiveIndex = _React$useState[1];
8388
8432
 
8389
8433
  var onKeyDown = function onKeyDown(event) {
8434
+ var _document$activeEleme;
8435
+
8390
8436
  var isModifierKeyPressed = event.metaKey || event.ctrlKey || event.altKey || event.shiftKey;
8391
8437
 
8392
- if (useGlobalKeyboardNavigation && !(document.activeElement === ref.current || document.activeElement === document.body)) {
8438
+ if (useGlobalKeyboardNavigation && document.activeElement !== ref.current && ((_document$activeEleme = document.activeElement) === null || _document$activeEleme === void 0 ? void 0 : _document$activeEleme.getAttribute('type')) !== 'search' && document.activeElement !== document.body) {
8393
8439
  return;
8394
8440
  } // abort key handling if other elements inside table are focused and we don't use global keyboard navigation
8395
8441
 
@@ -9540,13 +9586,31 @@ Tabs.List = TabList;
9540
9586
  Tabs.Trigger = TabTrigger;
9541
9587
  Tabs.Content = TabContent;
9542
9588
 
9543
- var _excluded$Q = ["defaultValue", "highlighted", "state"];
9589
+ var _excluded$Q = ["defaultValue", "highlighted", "onKeyDown", "state"];
9544
9590
  var Textarea = /*#__PURE__*/React.forwardRef(function Textarea(props, ref) {
9545
- var otherProps = _objectWithoutPropertiesLoose(props, _excluded$Q);
9591
+ var onKeyDown = props.onKeyDown,
9592
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded$Q);
9593
+
9594
+ var classNames = cn(getInputClasses(props), 'py-1 min-h-[75px] disabled:resize-none', props.className); // home and end keys only navigate to the start/end of textarea value if the textarea container does not scroll
9595
+ // if it has scroll height then the browser reverts to native scrolling behaviour only
9596
+ // so we manually override it to ensure _our_ desired behaviour remains intact
9597
+
9598
+ var handleKeyDown = function handleKeyDown(event) {
9599
+ if (event.key === 'Home' || event.key === 'End') {
9600
+ event.preventDefault();
9601
+ var position = event.key === 'End' ? event.currentTarget.value.length : 0;
9602
+ event.currentTarget.setSelectionRange(position, position);
9603
+ event.currentTarget.scrollTop = event.key === 'End' ? event.currentTarget.scrollHeight : 0;
9604
+ }
9605
+
9606
+ if (onKeyDown) {
9607
+ onKeyDown(event);
9608
+ }
9609
+ };
9546
9610
 
9547
- var classNames = cn(getInputClasses(props), 'py-1 min-h-[75px] disabled:resize-none', props.className);
9548
9611
  return React.createElement("textarea", Object.assign({}, otherProps, {
9549
9612
  className: classNames,
9613
+ onKeyDown: handleKeyDown,
9550
9614
  ref: ref
9551
9615
  }));
9552
9616
  });
@@ -9752,13 +9816,13 @@ exports.Checkbox = Checkbox;
9752
9816
  exports.Combobox = Combobox;
9753
9817
  exports.Datepicker = Datepicker;
9754
9818
  exports.Dialog = Dialog;
9819
+ exports.Field = Field;
9755
9820
  exports.Form = Form;
9756
9821
  exports.Group = Group;
9757
9822
  exports.Hanger = Hanger;
9758
9823
  exports.Icon = Icon;
9759
9824
  exports.IconButton = IconButton;
9760
9825
  exports.Input = Input;
9761
- exports.Label = Label;
9762
9826
  exports.Listbox = Listbox;
9763
9827
  exports.Menu = Menu;
9764
9828
  exports.MultiListbox = MultiListbox;
@@ -9797,6 +9861,7 @@ exports.parseFromCustomString = parseFromCustomString;
9797
9861
  exports.parseFromISOString = parseFromISOString;
9798
9862
  exports.removeChildTableRow = removeChildTableRow;
9799
9863
  exports.setByRowIndexPath = setByRowIndexPath;
9864
+ exports.useBoundingClientRectListener = useBoundingClientRectListener;
9800
9865
  exports.useListKeyboardNavigation = useListKeyboardNavigation;
9801
9866
  exports.useListScrollTo = useListScrollTo;
9802
9867
  exports.useLocalization = useLocalization;