@cleartrip/talos-trip-segment 1.5.0 → 1.6.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.
@@ -696,9 +696,9 @@
696
696
  black100: '#1B1B1B',
697
697
  gray97: '#f7f7f7',
698
698
  successGreen500: '#11A056',
699
- purple700: "#7226E0",
700
- neutralOpacity8: "#00000014",
701
- neutralShadowOpacity10: "#1A1A1A1A"
699
+ purple700: '#7226E0',
700
+ neutralOpacity8: '#00000014',
701
+ neutralShadowOpacity10: '#1A1A1A1A'
702
702
  };
703
703
  var elevation = {
704
704
  bottomE1: '0px 1px 0px #E7E7E7',
@@ -5084,7 +5084,8 @@
5084
5084
  pinaColada500: colors.pinaColada500,
5085
5085
  green700: colors.green700,
5086
5086
  green100: colors.green100,
5087
- red100: colors.red100
5087
+ red100: colors.red100,
5088
+ red500: colors.red500
5088
5089
  },
5089
5090
  button: {
5090
5091
  outlinedPrimaryLabel: colors.neutral900,
@@ -5164,6 +5165,7 @@
5164
5165
  lightRed: colors.red200,
5165
5166
  black100: colors.black100,
5166
5167
  gray97: colors.gray97,
5168
+ darkRed: colors.red500,
5167
5169
  orange500: colors.orange500,
5168
5170
  purple700: colors.purple700,
5169
5171
  neutralOpacity8: colors.neutralOpacity8
@@ -6687,6 +6689,7 @@
6687
6689
  TypographyColor["GREEN700"] = "green700";
6688
6690
  TypographyColor["GREEN100"] = "green100";
6689
6691
  TypographyColor["RED100"] = "red100";
6692
+ TypographyColor["RED500"] = "red500";
6690
6693
  })(TypographyColor || (TypographyColor = {}));
6691
6694
  var getTypographyVariant$1 = function (theme, variant) {
6692
6695
  switch (variant) {
@@ -7090,6 +7093,10 @@
7090
7093
  {
7091
7094
  return theme.color.text.red100;
7092
7095
  }
7096
+ case TypographyColor.RED500:
7097
+ {
7098
+ return theme.color.text.red500;
7099
+ }
7093
7100
  default:
7094
7101
  {
7095
7102
  return theme.color.text.primary;
@@ -7915,22 +7922,17 @@
7915
7922
  }));
7916
7923
  });
7917
7924
 
7918
- var dotAnimationKeyframe = function (_a) {
7919
- var color1 = _a.color1,
7920
- color2 = _a.color2;
7921
- return keyframes(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n 0% { background-color: ", "; transform: scale(1); }\n 50% { background-color: ", "; transform: scale(1.2); }\n 100% { background-color: ", "; transform: scale(1); }\n"], ["\n 0% { background-color: ", "; transform: scale(1); }\n 50% { background-color: ", "; transform: scale(1.2); }\n 100% { background-color: ", "; transform: scale(1); }\n"])), color1, color2, color1);
7922
- };
7925
+ var dotAnimationKeyframe = keyframes(templateObject_1$f || (templateObject_1$f = __makeTemplateObject(["\n 0% { background-color: var(--dot-color-1); transform: scale(1); }\n 50% { background-color: var(--dot-color-2); transform: scale(1.2); }\n 100% { background-color: var(--dot-color-1); transform: scale(1); }\n"], ["\n 0% { background-color: var(--dot-color-1); transform: scale(1); }\n 50% { background-color: var(--dot-color-2); transform: scale(1.2); }\n 100% { background-color: var(--dot-color-1); transform: scale(1); }\n"])));
7923
7926
  var StyledLoaderDot = _default.div(function (_a) {
7924
7927
  var theme = _a.theme,
7925
7928
  dotId = _a.dotId,
7926
7929
  variant = _a.variant,
7930
+ color1 = _a.color1,
7931
+ color2 = _a.color2,
7927
7932
  _b = _a.css,
7928
7933
  styleCss = _b === void 0 ? {} : _b;
7929
7934
  var size = getLoaderDimension(variant, theme);
7930
- return css(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n animation: ", "\n ease-in-out 1s infinite;\n animation-delay: ", "s;\n ", ";\n "], ["\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: ", ";\n animation: ", "\n ease-in-out 1s infinite;\n animation-delay: ", "s;\n ", ";\n "])), size, size, theme.border.radius['50P'], theme.color.background.defaultDark, dotAnimationKeyframe({
7931
- color1: theme.color.background.defaultDark,
7932
- color2: theme.color.background.defaultDarkest
7933
- }), 1 / 3 * dotId, styleCss);
7935
+ return css(templateObject_2$a || (templateObject_2$a = __makeTemplateObject(["\n --dot-color-1: ", ";\n --dot-color-2: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: var(--dot-color-1);\n animation: ", " ease-in-out 1s infinite;\n animation-delay: ", "s;\n ", ";\n "], ["\n --dot-color-1: ", ";\n --dot-color-2: ", ";\n height: ", ";\n width: ", ";\n border-radius: ", ";\n background: var(--dot-color-1);\n animation: ", " ease-in-out 1s infinite;\n animation-delay: ", "s;\n ", ";\n "])), color1 !== null && color1 !== void 0 ? color1 : theme.color.background.defaultDark, color2 !== null && color2 !== void 0 ? color2 : theme.color.background.defaultDarkest, size, size, theme.border.radius['50P'], dotAnimationKeyframe, 1 / 3 * dotId, styleCss);
7934
7936
  });
7935
7937
  var StyledLoaderWrapper = _default.div(function (_a) {
7936
7938
  _a.theme;
@@ -7958,6 +7960,7 @@
7958
7960
  var css = _a.css,
7959
7961
  _b = _a.variant,
7960
7962
  variant = _b === void 0 ? 'medium' : _b,
7963
+ dotColors = _a.dotColors,
7961
7964
  _c = _a.styleConfig,
7962
7965
  styleConfig = _c === void 0 ? {} : _c;
7963
7966
  var theme = useTheme();
@@ -7976,6 +7979,8 @@
7976
7979
  variant: variant,
7977
7980
  theme: theme,
7978
7981
  dotId: id,
7982
+ color1: dotColors === null || dotColors === void 0 ? void 0 : dotColors.primary,
7983
+ color2: dotColors === null || dotColors === void 0 ? void 0 : dotColors.secondary,
7979
7984
  className: loaderCont === null || loaderCont === void 0 ? void 0 : loaderCont.className,
7980
7985
  css: loaderCont === null || loaderCont === void 0 ? void 0 : loaderCont.css
7981
7986
  }, id);
@@ -21319,9 +21324,8 @@
21319
21324
  crossColor: '#1A1A1A'
21320
21325
  });
21321
21326
  };
21322
- var ModalWithCloseOverlay = React__default$1.forwardRef(function (props, forwardedRef) {
21323
- var _a = props || {},
21324
- wrapperCss = _a.wrapperCss,
21327
+ var ModalWithCloseOverlay = React__default$1.forwardRef(function (_a, forwardedRef) {
21328
+ var wrapperCss = _a.wrapperCss,
21325
21329
  isBack = _a.isBack,
21326
21330
  children = _a.children,
21327
21331
  _b = _a.variant,
@@ -21329,19 +21333,19 @@
21329
21333
  isCenter = _a.isCenter,
21330
21334
  _c = _a.isTop,
21331
21335
  isTop = _c === void 0 ? true : _c,
21332
- rest = __rest$2(_a, ["wrapperCss", "isBack", "children", "variant", "isCenter", "isTop"]);
21333
- var onClose = rest.onClose;
21336
+ onClose = _a.onClose,
21337
+ rest = __rest$2(_a, ["wrapperCss", "isBack", "children", "variant", "isCenter", "isTop", "onClose"]);
21334
21338
  var theme = useTheme();
21335
21339
  var closeButtonStyles = getCloseButtonStyle({
21336
21340
  theme: theme,
21337
- isLeft: isBack,
21341
+ isLeft: isBack !== null && isBack !== void 0 ? isBack : false,
21338
21342
  variant: variant,
21339
21343
  isCenter: isCenter,
21340
21344
  isTop: isTop
21341
21345
  });
21342
21346
  var CloseIcon = getCloseIcon(isBack, variant);
21343
21347
  var onCloseClick = function (e) {
21344
- onClose(e);
21348
+ onClose === null || onClose === void 0 ? void 0 : onClose(e);
21345
21349
  };
21346
21350
  return jsxRuntimeExports$2.jsx(Modal, __assign$4({
21347
21351
  ref: forwardedRef,
@@ -21367,6 +21371,7 @@
21367
21371
  }))
21368
21372
  }));
21369
21373
  });
21374
+ ModalWithCloseOverlay.displayName = 'ModalWithCloseOverlay';
21370
21375
 
21371
21376
  React__default$1.forwardRef(function (_a, forwardedRef) {
21372
21377
  var children = _a.children,
@@ -28673,14 +28678,28 @@
28673
28678
  state = _a[0],
28674
28679
  setState = _a[1];
28675
28680
  var onDragStart = React__default$1.useCallback(function (event) {
28676
- var _a;
28681
+ var _a, _b;
28677
28682
  var isTouch = 'touches' in event || 'changedTouches' in event;
28678
28683
  if (isTouch && ((_a = event.touches) !== null && _a !== void 0 ? _a : event.changedTouches).length > 1) return;
28684
+ var _c = isTouch ? (_b = event.touches[0]) !== null && _b !== void 0 ? _b : event.changedTouches[0] : event,
28685
+ clientX = _c.clientX,
28686
+ clientY = _c.clientY;
28679
28687
  setState(function (previous) {
28680
- var _a;
28681
- var _b = isTouch ? (_a = event.touches[0]) !== null && _a !== void 0 ? _a : event.changedTouches[0] : event,
28682
- clientX = _b.clientX,
28683
- clientY = _b.clientY;
28688
+ if (events.onDragStart) {
28689
+ var eventData = {
28690
+ absX: 0,
28691
+ absY: 0,
28692
+ deltaX: 0,
28693
+ deltaY: 0,
28694
+ clientY: clientY,
28695
+ dir: RIGHT,
28696
+ event: event,
28697
+ initial: DRAGGER_INITIAL_STATE.initial,
28698
+ velocity: 0,
28699
+ initialDxDy: previous.initialDxDy
28700
+ };
28701
+ events.onDragStart(eventData);
28702
+ }
28684
28703
  return __assign$4(__assign$4(__assign$4({}, previous), DRAGGER_INITIAL_STATE), {
28685
28704
  initialDxDy: previous.initialDxDy,
28686
28705
  lastDxDy: previous.initialDxDy,
@@ -28689,7 +28708,7 @@
28689
28708
  dragging: true
28690
28709
  });
28691
28710
  });
28692
- }, []);
28711
+ }, [events]);
28693
28712
  var onDragging = React__default$1.useCallback(function (event) {
28694
28713
  setState(function (state) {
28695
28714
  var _a, _b;
@@ -28698,7 +28717,6 @@
28698
28717
  return state;
28699
28718
  }
28700
28719
  event.stopPropagation();
28701
- event.preventDefault();
28702
28720
  var _c = isTouch ? (_b = event.touches[0]) !== null && _b !== void 0 ? _b : event.changedTouches[0] : event,
28703
28721
  clientX = _c.clientX,
28704
28722
  clientY = _c.clientY;
@@ -29744,8 +29762,8 @@
29744
29762
  }
29745
29763
  });
29746
29764
  React__default$1.createContext(undefined);
29747
- var moveRight = keyframes(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"], ["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"])));
29748
- var moveRightAgain = keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"], ["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"])));
29765
+ var moveRight = /*#__PURE__*/keyframes(templateObject_1$1 || (templateObject_1$1 = __makeTemplateObject(["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"], ["\n from {\n transform: translateX(-20px);\n }\n to {\n transform: translateX(0px);\n }\n"])));
29766
+ var moveRightAgain = /*#__PURE__*/keyframes(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"], ["\n from {\n transform: translateX(-20.01px);\n }\n to {\n transform: translateX(0px);\n }\n"])));
29749
29767
  var templateObject_1$1, templateObject_2;
29750
29768
  /*#__PURE__*/_default.div.withConfig({
29751
29769
  displayName: "BusinessDropdown__BDHoverContainer",
@@ -30218,6 +30236,8 @@
30218
30236
  suffix = props.suffix,
30219
30237
  onChange = props.onChange,
30220
30238
  onKeyDown = props.onKeyDown,
30239
+ onFocus = props.onFocus,
30240
+ onBlur = props.onBlur,
30221
30241
  styleConfig = props.styleConfig,
30222
30242
  _e = props.disabled,
30223
30243
  disabled = _e === void 0 ? false : _e;
@@ -30275,6 +30295,14 @@
30275
30295
  onChange === null || onChange === void 0 ? void 0 : onChange(text.trim());
30276
30296
  checkMultiLine();
30277
30297
  }, [disabled, onChange, checkMultiLine]);
30298
+ var handleFocus = React__default$1.useCallback(function (e) {
30299
+ if (disabled) return;
30300
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus(e);
30301
+ }, [disabled, onFocus]);
30302
+ var handleBlur = React__default$1.useCallback(function (e) {
30303
+ if (disabled) return;
30304
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur(e);
30305
+ }, [disabled, onBlur]);
30278
30306
  var focusEditor = React__default$1.useCallback(function () {
30279
30307
  var _a;
30280
30308
  if (disabled) return;
@@ -30331,6 +30359,8 @@
30331
30359
  "data-placeholder": placeholder,
30332
30360
  onKeyDown: handleKeyDown,
30333
30361
  onInput: handleInput,
30362
+ onFocus: handleFocus,
30363
+ onBlur: handleBlur,
30334
30364
  className: editor === null || editor === void 0 ? void 0 : editor.className,
30335
30365
  css: editor === null || editor === void 0 ? void 0 : editor.css,
30336
30366
  disabled: disabled
@@ -30381,137 +30411,177 @@
30381
30411
  onClick === null || onClick === void 0 ? void 0 : onClick();
30382
30412
  }, [disabled, onClick]);
30383
30413
  return jsxRuntimeExports$2.jsx(Container, __assign$4({
30384
- height: "24px",
30385
- width: "24px",
30386
- borderRadius: "50%",
30414
+ height: '24px',
30415
+ width: '24px',
30416
+ borderRadius: '50%',
30387
30417
  onClick: handleClick,
30388
30418
  css: {
30389
30419
  backgroundColor: backgroundColor
30390
30420
  },
30391
- display: "flex",
30392
- alignItems: "center",
30393
- justifyContent: "center",
30394
- cursor: disabled ? "not-allowed" : "pointer"
30421
+ display: 'flex',
30422
+ alignItems: 'center',
30423
+ justifyContent: 'center',
30424
+ cursor: disabled ? 'not-allowed' : 'pointer'
30395
30425
  }, {
30396
30426
  children: children
30397
30427
  }));
30398
30428
  };
30399
30429
  var Keyboard = function (props) {
30400
30430
  return jsxRuntimeExports$2.jsxs("svg", __assign$4({
30401
- width: "24",
30402
- height: "24",
30403
- viewBox: "0 0 24 24",
30404
- fill: "none",
30405
- xmlns: "http://www.w3.org/2000/svg"
30431
+ width: '24',
30432
+ height: '24',
30433
+ viewBox: '0 0 24 24',
30434
+ fill: 'none',
30435
+ xmlns: 'http://www.w3.org/2000/svg'
30406
30436
  }, {
30407
30437
  children: [jsxRuntimeExports$2.jsx("path", {
30408
- d: "M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z",
30409
- fill: "white",
30438
+ d: 'M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z',
30439
+ fill: 'white',
30410
30440
  fillOpacity: 0.4
30411
30441
  }), jsxRuntimeExports$2.jsx("mask", __assign$4({
30412
- id: "mask0_1511_44906",
30442
+ id: 'mask0_1511_44906',
30413
30443
  style: {
30414
30444
  maskType: 'alpha'
30415
30445
  },
30416
- maskUnits: "userSpaceOnUse",
30417
- x: "3",
30418
- y: "3",
30419
- width: "18",
30420
- height: "18"
30446
+ maskUnits: 'userSpaceOnUse',
30447
+ x: '3',
30448
+ y: '3',
30449
+ width: '18',
30450
+ height: '18'
30421
30451
  }, {
30422
30452
  children: jsxRuntimeExports$2.jsx("rect", {
30423
- x: "3",
30424
- y: "3",
30425
- width: "18",
30426
- height: "18",
30427
- fill: "#D9D9D9"
30453
+ x: '3',
30454
+ y: '3',
30455
+ width: '18',
30456
+ height: '18',
30457
+ fill: '#D9D9D9'
30428
30458
  })
30429
30459
  })), jsxRuntimeExports$2.jsx("g", __assign$4({
30430
- mask: "url(#mask0_1511_44906)"
30460
+ mask: 'url(#mask0_1511_44906)'
30431
30461
  }, {
30432
30462
  children: jsxRuntimeExports$2.jsx("path", {
30433
- d: "M5.24998 18C4.83748 18 4.48436 17.8531 4.19061 17.5594C3.89686 17.2656 3.74998 16.9125 3.74998 16.5V7.5C3.74998 7.0875 3.89686 6.73438 4.19061 6.44063C4.48436 6.14688 4.83748 6 5.24998 6H18.75C19.1625 6 19.5156 6.14688 19.8094 6.44063C20.1031 6.73438 20.25 7.0875 20.25 7.5V16.5C20.25 16.9125 20.1031 17.2656 19.8094 17.5594C19.5156 17.8531 19.1625 18 18.75 18H5.24998ZM5.24998 16.5H18.75V7.5H5.24998V16.5ZM8.99998 15.75H15V14.25H8.99998V15.75ZM6.74998 13.125H8.24998V11.625H6.74998V13.125ZM9.74998 13.125H11.25V11.625H9.74998V13.125ZM12.75 13.125H14.25V11.625H12.75V13.125ZM15.75 13.125H17.25V11.625H15.75V13.125ZM6.74998 10.5H8.24998V9H6.74998V10.5ZM9.74998 10.5H11.25V9H9.74998V10.5ZM12.75 10.5H14.25V9H12.75V10.5ZM15.75 10.5H17.25V9H15.75V10.5Z",
30434
- fill: "#1C1B1F"
30463
+ d: 'M5.24998 18C4.83748 18 4.48436 17.8531 4.19061 17.5594C3.89686 17.2656 3.74998 16.9125 3.74998 16.5V7.5C3.74998 7.0875 3.89686 6.73438 4.19061 6.44063C4.48436 6.14688 4.83748 6 5.24998 6H18.75C19.1625 6 19.5156 6.14688 19.8094 6.44063C20.1031 6.73438 20.25 7.0875 20.25 7.5V16.5C20.25 16.9125 20.1031 17.2656 19.8094 17.5594C19.5156 17.8531 19.1625 18 18.75 18H5.24998ZM5.24998 16.5H18.75V7.5H5.24998V16.5ZM8.99998 15.75H15V14.25H8.99998V15.75ZM6.74998 13.125H8.24998V11.625H6.74998V13.125ZM9.74998 13.125H11.25V11.625H9.74998V13.125ZM12.75 13.125H14.25V11.625H12.75V13.125ZM15.75 13.125H17.25V11.625H15.75V13.125ZM6.74998 10.5H8.24998V9H6.74998V10.5ZM9.74998 10.5H11.25V9H9.74998V10.5ZM12.75 10.5H14.25V9H12.75V10.5ZM15.75 10.5H17.25V9H15.75V10.5Z',
30464
+ fill: '#1C1B1F'
30435
30465
  })
30436
30466
  }))]
30437
30467
  }));
30438
30468
  };
30439
30469
  var Plus = function (props) {
30440
30470
  return jsxRuntimeExports$2.jsxs("svg", __assign$4({
30441
- width: "24",
30442
- height: "24",
30443
- viewBox: "0 0 24 24",
30444
- fill: "none",
30445
- xmlns: "http://www.w3.org/2000/svg"
30471
+ width: '24',
30472
+ height: '24',
30473
+ viewBox: '0 0 24 24',
30474
+ fill: 'none',
30475
+ xmlns: 'http://www.w3.org/2000/svg'
30446
30476
  }, {
30447
30477
  children: [jsxRuntimeExports$2.jsx("path", {
30448
- d: "M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z",
30449
- fill: "white",
30478
+ d: 'M0 12C0 5.37258 5.37258 0 12 0C18.6274 0 24 5.37258 24 12C24 18.6274 18.6274 24 12 24C5.37258 24 0 18.6274 0 12Z',
30479
+ fill: 'white',
30450
30480
  fillOpacity: 0.4
30451
30481
  }), jsxRuntimeExports$2.jsx("path", {
30452
- d: "M12 5.5C12.2761 5.5 12.5 5.72386 12.5 6V11.5H18C18.2761 11.5 18.5 11.7239 18.5 12C18.5 12.2761 18.2761 12.5 18 12.5H12.5V18C12.5 18.2761 12.2761 18.5 12 18.5C11.7239 18.5 11.5 18.2761 11.5 18V12.5H6C5.72386 12.5 5.5 12.2761 5.5 12C5.5 11.7239 5.72386 11.5 6 11.5H11.5V6C11.5 5.72386 11.7239 5.5 12 5.5Z",
30453
- fill: "#1A1A1A"
30482
+ d: 'M12 5.5C12.2761 5.5 12.5 5.72386 12.5 6V11.5H18C18.2761 11.5 18.5 11.7239 18.5 12C18.5 12.2761 18.2761 12.5 18 12.5H12.5V18C12.5 18.2761 12.2761 18.5 12 18.5C11.7239 18.5 11.5 18.2761 11.5 18V12.5H6C5.72386 12.5 5.5 12.2761 5.5 12C5.5 11.7239 5.72386 11.5 6 11.5H11.5V6C11.5 5.72386 11.7239 5.5 12 5.5Z',
30483
+ fill: '#1A1A1A'
30454
30484
  })]
30455
30485
  }));
30456
30486
  };
30457
30487
  var UpArrow = function (props) {
30458
30488
  var _a = props.fill,
30459
- fill = _a === void 0 ? "white" : _a,
30489
+ fill = _a === void 0 ? 'white' : _a,
30460
30490
  rest = __rest$2(props, ["fill"]);
30461
30491
  return jsxRuntimeExports$2.jsx("svg", __assign$4({
30462
- width: "14",
30463
- height: "14",
30464
- viewBox: "0 0 14 14",
30465
- fill: "none",
30466
- xmlns: "http://www.w3.org/2000/svg"
30492
+ width: '14',
30493
+ height: '14',
30494
+ viewBox: '0 0 14 14',
30495
+ fill: 'none',
30496
+ xmlns: 'http://www.w3.org/2000/svg'
30467
30497
  }, rest, {
30468
30498
  children: jsxRuntimeExports$2.jsx("path", {
30469
- "fill-rule": "evenodd",
30470
- "clip-rule": "evenodd",
30471
- d: "M12.5596 6.66895C12.7306 6.83963 12.7303 7.11804 12.5596 7.28906C12.3889 7.45968 12.1114 7.45962 11.9405 7.28906L7.43753 2.79395L7.43753 12.25C7.43753 12.4916 7.24166 12.6875 7.00003 12.6875C6.75843 12.6875 6.56253 12.4916 6.56253 12.25L6.56253 2.81445L2.0596 7.30957C1.88868 7.48013 1.61117 7.48028 1.44046 7.30957C1.26991 7.13866 1.26977 6.86114 1.44046 6.69043L6.64163 1.50098C6.7207 1.38774 6.85145 1.31251 7.00003 1.3125C7.00165 1.3125 7.0033 1.31338 7.00492 1.31348C7.11836 1.31213 7.23268 1.35406 7.31937 1.44043L12.5596 6.66895Z",
30499
+ "fill-rule": 'evenodd',
30500
+ "clip-rule": 'evenodd',
30501
+ d: 'M12.5596 6.66895C12.7306 6.83963 12.7303 7.11804 12.5596 7.28906C12.3889 7.45968 12.1114 7.45962 11.9405 7.28906L7.43753 2.79395L7.43753 12.25C7.43753 12.4916 7.24166 12.6875 7.00003 12.6875C6.75843 12.6875 6.56253 12.4916 6.56253 12.25L6.56253 2.81445L2.0596 7.30957C1.88868 7.48013 1.61117 7.48028 1.44046 7.30957C1.26991 7.13866 1.26977 6.86114 1.44046 6.69043L6.64163 1.50098C6.7207 1.38774 6.85145 1.31251 7.00003 1.3125C7.00165 1.3125 7.0033 1.31338 7.00492 1.31348C7.11836 1.31213 7.23268 1.35406 7.31937 1.44043L12.5596 6.66895Z',
30472
30502
  fill: fill
30473
30503
  })
30474
30504
  }));
30475
30505
  };
30506
+ var Stop = function () {
30507
+ return jsxRuntimeExports$2.jsxs("svg", __assign$4({
30508
+ width: "32",
30509
+ height: "32",
30510
+ viewBox: "0 0 32 32",
30511
+ fill: "none",
30512
+ xmlns: "http://www.w3.org/2000/svg"
30513
+ }, {
30514
+ children: [jsxRuntimeExports$2.jsx("path", {
30515
+ d: "M16 0C24.8366 0 32 7.16344 32 16C32 24.8366 24.8366 32 16 32C7.16344 32 0 24.8366 0 16C0 7.16344 7.16344 0 16 0Z",
30516
+ fill: "#F3F3F3"
30517
+ }), jsxRuntimeExports$2.jsx("path", {
30518
+ d: "M15.9996 7.95857C11.5586 7.95868 7.95851 11.5593 7.95851 16.0003C7.95862 20.4412 11.5587 24.0413 15.9996 24.0414C20.4407 24.0414 24.0413 20.4413 24.0414 16.0003C24.0414 11.5592 20.4407 7.95857 15.9996 7.95857ZM15.9996 7C20.9701 7 24.9999 11.0298 24.9999 16.0003C24.9998 20.9707 20.9701 25 15.9996 25C11.0293 24.9999 7.00005 20.9707 6.99994 16.0003C6.99994 11.0299 11.0292 7.00011 15.9996 7Z",
30519
+ fill: "#FF4F17"
30520
+ }), jsxRuntimeExports$2.jsx("path", {
30521
+ d: "M14.25 19.3529C13.364 19.3529 12.6458 18.6347 12.6458 17.7487V14.2487C12.6458 13.3627 13.364 12.6445 14.25 12.6445H17.75C18.6359 12.6445 19.3541 13.3627 19.3541 14.2487V17.7487C19.3541 18.6347 18.6359 19.3529 17.75 19.3529H14.25Z",
30522
+ fill: "#FF4F17"
30523
+ })]
30524
+ }));
30525
+ };
30476
30526
  React__default$1.forwardRef(function (props, ref) {
30477
30527
  var _a = props.showKeyboardIcon,
30478
30528
  showKeyboardIcon = _a === void 0 ? false : _a,
30479
30529
  _b = props.disableAction,
30480
30530
  disableAction = _b === void 0 ? false : _b,
30481
30531
  onSubmit = props.onSubmit,
30482
- onPrefixClick = props.onPrefixClick;
30532
+ onPrefixClick = props.onPrefixClick,
30533
+ _c = props.isStreaming,
30534
+ isStreaming = _c === void 0 ? false : _c,
30535
+ onStop = props.onStop,
30536
+ prefixProp = props.prefix,
30537
+ suffixProp = props.suffix;
30483
30538
  var theme = useTheme();
30484
- var prefix = showKeyboardIcon ? jsxRuntimeExports$2.jsx(Keyboard, {}) : jsxRuntimeExports$2.jsx(Plus, {});
30485
30539
  var handlePrefixClick = function () {
30486
30540
  if (disableAction) return;
30487
30541
  onPrefixClick === null || onPrefixClick === void 0 ? void 0 : onPrefixClick();
30488
30542
  };
30543
+ var prefixNode = prefixProp !== null && prefixProp !== void 0 ? prefixProp : jsxRuntimeExports$2.jsx(Container, __assign$4({
30544
+ display: "flex",
30545
+ alignItems: "center",
30546
+ justifyContent: "center",
30547
+ onClick: handlePrefixClick,
30548
+ cursor: "pointer"
30549
+ }, {
30550
+ children: showKeyboardIcon ? jsxRuntimeExports$2.jsx(Keyboard, {}) : jsxRuntimeExports$2.jsx(Plus, {})
30551
+ }));
30552
+ var submitAction = jsxRuntimeExports$2.jsx(ExpandableInputAction, __assign$4({
30553
+ disabled: disableAction,
30554
+ onClick: onSubmit
30555
+ }, {
30556
+ children: jsxRuntimeExports$2.jsx(UpArrow, {
30557
+ fill: disableAction ? theme.color.background.defaultDark : theme.color.background.neutral
30558
+ })
30559
+ }));
30560
+ var stopAction = jsxRuntimeExports$2.jsx(ExpandableInputAction, __assign$4({
30561
+ onClick: onStop
30562
+ }, {
30563
+ children: jsxRuntimeExports$2.jsx(Stop, {})
30564
+ }));
30565
+ var suffixNode = suffixProp !== null && suffixProp !== void 0 ? suffixProp : isStreaming ? stopAction : submitAction;
30489
30566
  return jsxRuntimeExports$2.jsx(ExpandableInputProvider, __assign$4({
30490
30567
  variant: ExpandableInputVariant.AI_GRADIENT
30491
30568
  }, {
30492
30569
  children: jsxRuntimeExports$2.jsx(ExpandableInput, __assign$4({}, props, {
30493
30570
  ref: ref,
30494
- prefix: jsxRuntimeExports$2.jsx(Container, __assign$4({
30495
- display: "flex",
30496
- alignItems: "center",
30497
- justifyContent: "center",
30498
- onClick: handlePrefixClick,
30499
- cursor: "pointer"
30500
- }, {
30501
- children: prefix
30502
- })),
30503
- suffix: jsxRuntimeExports$2.jsx(ExpandableInputAction, __assign$4({
30504
- disabled: disableAction,
30505
- onClick: onSubmit
30506
- }, {
30507
- children: jsxRuntimeExports$2.jsx(UpArrow, {
30508
- fill: disableAction ? theme.color.background.defaultDark : theme.color.background.neutral
30509
- })
30510
- }))
30571
+ prefix: prefixNode,
30572
+ suffix: suffixNode
30511
30573
  }))
30512
30574
  }));
30513
30575
  });
30514
30576
 
30577
+ var InitialCorner;
30578
+ (function (InitialCorner) {
30579
+ InitialCorner["TOP_LEFT"] = "top-left";
30580
+ InitialCorner["TOP_RIGHT"] = "top-right";
30581
+ InitialCorner["BOTTOM_LEFT"] = "bottom-left";
30582
+ InitialCorner["BOTTOM_RIGHT"] = "bottom-right";
30583
+ })(InitialCorner || (InitialCorner = {}));
30584
+
30515
30585
  var getTripSegmentStyle = function (theme) {
30516
30586
  return {
30517
30587
  root: {