@loomhq/lens 12.13.0 → 12.14.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.
package/dist/esm/index.js CHANGED
@@ -60,6 +60,7 @@ var highlightHoverAlpha = 0.3;
60
60
  var highlightActiveAlpha = 0.45;
61
61
  var hslaBaseColors = {
62
62
  red: { h: 4, s: 64, l: 48, a: 1 },
63
+ redDark: { h: 4, s: 56, l: 23, a: 1 },
63
64
  blurpleLight: { h: 214.3, s: 91.3, l: 95.5, a: 1 },
64
65
  blurpleMedium: { h: 216.5, s: 92, l: 90.2, a: 1 },
65
66
  blurple: { h: 215.4, s: 80, l: 47.65, a: 1 },
@@ -69,7 +70,9 @@ var hslaBaseColors = {
69
70
  blueLight: { h: 216.5, s: 92, l: 90.2, a: 1 },
70
71
  blue: { h: 215.4, s: 80, l: 47.65, a: 1 },
71
72
  blueDark: { h: 216.3, s: 69.2, l: 23, a: 1 },
73
+ magentaLight: { h: 323, s: 92, l: 90, a: 1 },
72
74
  magenta: { h: 323, s: 42, l: 48, a: 1 },
75
+ magentaDark: { h: 324, s: 37, l: 23, a: 1 },
73
76
  orangeLight: { h: 4, s: 100, l: 91.2, a: 1 },
74
77
  orange: { h: 11, s: 100, l: 62.2, a: 1 },
75
78
  orangeDark: { h: 10.9, s: 100, l: 42.2, a: 1 },
@@ -5214,7 +5217,8 @@ var TypeaheadHeader = ({
5214
5217
  inputValue,
5215
5218
  handleInputValueChange,
5216
5219
  inputRef,
5217
- id
5220
+ id,
5221
+ onKeyDown
5218
5222
  }) => {
5219
5223
  const icon = getIcon2({ options, selectedItem, selectedOptionValue });
5220
5224
  const hasIcon = Boolean(icon);
@@ -5224,16 +5228,7 @@ var TypeaheadHeader = ({
5224
5228
  onInputFocus();
5225
5229
  }
5226
5230
  };
5227
- const inputProps = __spreadValues(__spreadValues({
5228
- role: "combobox",
5229
- "aria-autocomplete": "list",
5230
- "aria-haspopup": "listbox",
5231
- "aria-expanded": isOpen
5232
- }, getHeaderAccessibilityProps2({
5233
- selectedItem,
5234
- getInputProps,
5235
- ariaMenuName
5236
- })), getInputProps({
5231
+ const baseInputProps = getInputProps({
5237
5232
  id,
5238
5233
  "aria-labelledby": void 0,
5239
5234
  disabled: isDisabled,
@@ -5244,7 +5239,23 @@ var TypeaheadHeader = ({
5244
5239
  handleInputValueChange("");
5245
5240
  },
5246
5241
  onChange: (e) => handleInputValueChange(e.target.value)
5247
- }));
5242
+ });
5243
+ const inputProps = __spreadProps(__spreadValues(__spreadValues({
5244
+ role: "combobox",
5245
+ "aria-autocomplete": "list",
5246
+ "aria-haspopup": "listbox",
5247
+ "aria-expanded": isOpen
5248
+ }, getHeaderAccessibilityProps2({
5249
+ selectedItem,
5250
+ getInputProps,
5251
+ ariaMenuName
5252
+ })), baseInputProps), {
5253
+ onKeyDown: (e) => {
5254
+ var _a;
5255
+ onKeyDown == null ? void 0 : onKeyDown(e);
5256
+ (_a = baseInputProps.onKeyDown) == null ? void 0 : _a.call(baseInputProps, e);
5257
+ }
5258
+ });
5248
5259
  const showPlaceholder = !inputValue && !selectedOptionValue;
5249
5260
  return /* @__PURE__ */ React32.createElement(TypeaheadHeaderWrapper, { onClick: handleClickAndFocus, disabled: isDisabled }, hasIcon && /* @__PURE__ */ React32.createElement(IconSection3, null, typeof icon === "string" ? /* @__PURE__ */ React32.createElement(container_default, { radius: "50", width: 3, height: 3, overflow: "hidden" }, /* @__PURE__ */ React32.createElement(align_default, { alignment: "center" }, /* @__PURE__ */ React32.createElement(TypeaheadImage, { src: icon, alt: "", isDisabled }))) : /* @__PURE__ */ React32.createElement(icon_default, { icon, color })), /* @__PURE__ */ React32.createElement(
5250
5261
  TypeaheadInputField,
@@ -5281,7 +5292,7 @@ var didSelectedOptionValueChange = (selectedOptionValue, prevSelectedItem) => {
5281
5292
  const didChange = (selectedOptionValue || null) != (prevSelectedItem == null ? void 0 : prevSelectedItem.value);
5282
5293
  return didChange;
5283
5294
  };
5284
- var renderOption2 = (item, index, selectedItem, selectedOptionValue, highlightedIndex, getItemProps) => {
5295
+ var renderOption2 = (item, index, selectedItem, selectedOptionValue, highlightedIndex, getItemProps, keyboardMove, setKeyboardMove) => {
5285
5296
  const isSelected = !selectedItem && item.value === selectedOptionValue || selectedItem && selectedItem.value === item.value;
5286
5297
  return /* @__PURE__ */ React32.createElement(
5287
5298
  MenuItem,
@@ -5295,11 +5306,17 @@ var renderOption2 = (item, index, selectedItem, selectedOptionValue, highlighted
5295
5306
  index,
5296
5307
  item,
5297
5308
  disabled: item.isDisabled,
5298
- "aria-selected": isSelected
5309
+ "aria-selected": isSelected,
5310
+ onMouseMove: () => {
5311
+ if (keyboardMove) {
5312
+ setKeyboardMove(false);
5313
+ }
5314
+ }
5299
5315
  })), {
5300
5316
  isDisabled: item.isDisabled,
5301
5317
  hasDivider: item.hasDivider,
5302
5318
  isHighlighted: highlightedIndex === index,
5319
+ keyboardMove: keyboardMove && highlightedIndex === index,
5303
5320
  isSelected
5304
5321
  }),
5305
5322
  item.title
@@ -5312,6 +5329,8 @@ var TypeaheadMenu = (_a) => {
5312
5329
  selectedOptionValue,
5313
5330
  highlightedIndex,
5314
5331
  getItemProps,
5332
+ keyboardMove,
5333
+ setKeyboardMove,
5315
5334
  isLoading,
5316
5335
  loadingMessage,
5317
5336
  emptyResultsMessage,
@@ -5322,6 +5341,8 @@ var TypeaheadMenu = (_a) => {
5322
5341
  "selectedOptionValue",
5323
5342
  "highlightedIndex",
5324
5343
  "getItemProps",
5344
+ "keyboardMove",
5345
+ "setKeyboardMove",
5325
5346
  "isLoading",
5326
5347
  "loadingMessage",
5327
5348
  "emptyResultsMessage",
@@ -5343,7 +5364,9 @@ var TypeaheadMenu = (_a) => {
5343
5364
  selectedItem,
5344
5365
  selectedOptionValue,
5345
5366
  highlightedIndex,
5346
- getItemProps
5367
+ getItemProps,
5368
+ keyboardMove,
5369
+ setKeyboardMove
5347
5370
  )
5348
5371
  ));
5349
5372
  }
@@ -5366,7 +5389,9 @@ var TypeaheadMenu = (_a) => {
5366
5389
  selectedItem,
5367
5390
  selectedOptionValue,
5368
5391
  highlightedIndex,
5369
- getItemProps
5392
+ getItemProps,
5393
+ keyboardMove,
5394
+ setKeyboardMove
5370
5395
  );
5371
5396
  })));
5372
5397
  }));
@@ -5429,6 +5454,7 @@ var Typeahead = forwardRef3(
5429
5454
  );
5430
5455
  const [inputValue, setInputValue] = useState2("");
5431
5456
  const [downshiftIsOpen, setDownshiftIsOpen] = useState2(false);
5457
+ const [keyboardMove, setKeyboardMove] = useState2(false);
5432
5458
  const [prevSelectedItem, setPrevSelectedItem] = useState2(
5433
5459
  getSelectedOption2(selectedOptionValue, options)
5434
5460
  );
@@ -5494,6 +5520,22 @@ var Typeahead = forwardRef3(
5494
5520
  }
5495
5521
  return changes;
5496
5522
  };
5523
+ const onKeyDown = (e) => {
5524
+ switch (e.key) {
5525
+ case "ArrowDown":
5526
+ case "ArrowUp":
5527
+ case "ArrowLeft":
5528
+ case "ArrowRight":
5529
+ case "Enter":
5530
+ case " ":
5531
+ case "Tab":
5532
+ case "Escape":
5533
+ setKeyboardMove(true);
5534
+ break;
5535
+ default:
5536
+ break;
5537
+ }
5538
+ };
5497
5539
  return /* @__PURE__ */ React32.createElement(TypeaheadWrapper, __spreadValues({}, props), /* @__PURE__ */ React32.createElement(Downshift2, __spreadProps(__spreadValues({}, downshiftProps), { stateReducer }), ({
5498
5540
  getItemProps,
5499
5541
  getInputProps,
@@ -5523,7 +5565,8 @@ var Typeahead = forwardRef3(
5523
5565
  },
5524
5566
  hasLoader: isLoading,
5525
5567
  hasError: Boolean(errorMessage),
5526
- id
5568
+ id,
5569
+ onKeyDown
5527
5570
  }
5528
5571
  )), downshiftIsOpen && isOpen && renderLayer(
5529
5572
  /* @__PURE__ */ React32.createElement(
@@ -5543,11 +5586,13 @@ var Typeahead = forwardRef3(
5543
5586
  hasAvailableOptions,
5544
5587
  highlightedIndex,
5545
5588
  getItemProps,
5589
+ keyboardMove,
5590
+ setKeyboardMove,
5546
5591
  isLoading,
5547
5592
  loadingMessage,
5548
5593
  emptyResultsMessage,
5549
5594
  position: menuPosition,
5550
- downshiftMenuProps: getMenuProps,
5595
+ downshiftMenuProps: () => getMenuProps({ onKeyDown }),
5551
5596
  maxWidth: menuMaxWidth,
5552
5597
  maxHeight: menuMaxHeight,
5553
5598
  minWidth: menuMinWidth
@@ -10011,6 +10056,111 @@ function IllustrationChromeNotificationsEmptyState(props) {
10011
10056
  );
10012
10057
  }
10013
10058
  var chrome_notifications_empty_state_default = IllustrationChromeNotificationsEmptyState;
10059
+
10060
+ // src/illustrations/user.tsx
10061
+ import * as React104 from "react";
10062
+ function IllustrationUser(props) {
10063
+ return /* @__PURE__ */ React104.createElement(
10064
+ "svg",
10065
+ __spreadValues({
10066
+ viewBox: "0 0 82 74",
10067
+ fill: "none",
10068
+ xmlns: "http://www.w3.org/2000/svg"
10069
+ }, props),
10070
+ /* @__PURE__ */ React104.createElement(
10071
+ "path",
10072
+ {
10073
+ d: "M17.0029 71.3532C17.0314 71.1862 17.0436 71.007 17.0396 70.8156C17.0355 70.6242 17.0192 70.4409 16.9866 70.2739C16.7911 69.2598 16.0784 68.6448 15.0847 68.4982C14.9136 68.4738 14.7385 68.4615 14.5552 68.4656C14.3719 68.4697 14.1805 68.486 14.0054 68.5186C13.0198 68.6978 12.3234 69.329 12.1523 70.3431C12.1238 70.5142 12.1116 70.6975 12.1116 70.8889C12.1116 71.0803 12.1319 71.2554 12.1645 71.4265C12.36 72.4325 13.0727 73.0474 14.0665 73.1981C14.2416 73.2266 14.4249 73.2388 14.6204 73.2348C14.8159 73.2307 14.9828 73.2144 15.1498 73.1859C16.1395 73.0108 16.8359 72.3754 17.0029 71.3572V71.3532Z",
10074
+ fill: "#FCA700"
10075
+ }
10076
+ ),
10077
+ /* @__PURE__ */ React104.createElement(
10078
+ "path",
10079
+ {
10080
+ d: "M16.7179 51.0672C16.7708 50.7374 16.7993 50.3871 16.7912 50.0165C16.783 49.6459 16.7505 49.2875 16.6853 48.9535C16.3025 46.9782 14.9096 45.7727 12.975 45.4876C12.6452 45.4387 12.299 45.4143 11.9406 45.4224C11.5822 45.4306 11.2075 45.4632 10.8654 45.5243C8.93898 45.8745 7.58276 47.1086 7.25287 49.0838C7.19585 49.4178 7.17141 49.7721 7.17548 50.1468C7.17956 50.5215 7.21621 50.8677 7.28138 51.1935C7.66421 53.1566 9.05301 54.358 10.9916 54.6553C11.3337 54.7083 11.6962 54.7327 12.0709 54.7286C12.4293 54.7246 12.7755 54.692 13.1054 54.6349C15.0358 54.2928 16.3961 53.0507 16.722 51.0672H16.7179Z",
10081
+ fill: "#FCA700"
10082
+ }
10083
+ ),
10084
+ /* @__PURE__ */ React104.createElement(
10085
+ "path",
10086
+ {
10087
+ d: "M44.6972 26.4353C44.9497 24.8918 45.0719 23.2505 45.0474 21.5196C45.023 19.7642 44.856 18.1066 44.5546 16.5508C42.7586 7.29353 36.234 1.66094 27.1722 0.316945C25.6246 0.088872 24.0077 -0.0210918 22.3257 0.00334457C20.5703 0.0277809 18.8883 0.190689 17.2877 0.479853C8.26255 2.11302 1.90502 7.90851 0.361458 17.1577C0.100804 18.7216 -0.0213771 20.3833 0.0030593 22.1386C0.0274957 23.8695 0.194476 25.5068 0.491785 27.0422C2.27564 36.2343 8.79608 41.8628 17.8783 43.2516C19.487 43.496 21.169 43.6141 22.9244 43.5897C24.6064 43.5652 26.2233 43.4145 27.7628 43.1417C36.7961 41.5452 43.1699 35.7252 44.6972 26.4353Z",
10088
+ fill: "#FCA700"
10089
+ }
10090
+ ),
10091
+ /* @__PURE__ */ React104.createElement(
10092
+ "path",
10093
+ {
10094
+ d: "M30.3244 15.6953C30.3325 16.2981 30.2918 16.8723 30.2022 17.4099C29.6687 20.6518 27.445 22.68 24.2927 23.238C23.7592 23.3317 23.2175 23.3846 22.6066 23.3928C21.9957 23.4009 21.4092 23.3602 20.8472 23.2746C17.6786 22.7941 15.406 20.831 14.7829 17.6217C14.677 17.0841 14.62 16.5139 14.6118 15.9112C14.6037 15.2962 14.6485 14.7178 14.7381 14.1721C15.2757 10.9424 17.4953 8.92235 20.6435 8.35217C21.2015 8.25035 21.788 8.19334 22.3989 8.18519C22.9853 8.17705 23.5514 8.2137 24.089 8.29516C27.2495 8.76759 29.5261 10.7306 30.1533 13.9603C30.2552 14.5061 30.3162 15.0844 30.3244 15.6953Z",
10095
+ fill: "#1868DB"
10096
+ }
10097
+ ),
10098
+ /* @__PURE__ */ React104.createElement(
10099
+ "path",
10100
+ {
10101
+ d: "M22.6349 24.692C30.5885 24.5535 35.7932 28.3814 35.6066 38.6635L35.6351 40.2661C33.3381 41.6508 30.6908 42.6201 27.7584 43.1374C26.2189 43.4102 24.6021 43.5609 22.92 43.5854C21.1647 43.6098 19.4826 43.4917 17.8739 43.2473C15.137 42.8319 12.6405 42.0214 10.429 40.8526L10.4005 39.1013C10.2213 28.8258 15.1696 24.8223 22.6349 24.692Z",
10102
+ fill: "#1868DB"
10103
+ }
10104
+ ),
10105
+ /* @__PURE__ */ React104.createElement(
10106
+ "path",
10107
+ {
10108
+ d: "M81.494 40.9954C81.7466 39.4518 81.8687 37.8105 81.8443 36.0796C81.8199 34.3243 81.6529 32.6667 81.3515 31.1109C79.5554 21.8536 73.0309 16.221 63.9691 14.877C62.4215 14.6489 60.8046 14.539 59.1226 14.5634C57.3672 14.5878 55.6852 14.7508 54.0846 15.0399C45.0594 16.6731 38.7019 22.4686 37.1583 31.7177C36.8977 33.2817 36.7755 34.9433 36.7999 36.6987C36.8244 38.4296 36.9914 40.0668 37.2887 41.6022C39.0725 50.7944 45.593 56.4229 54.6751 57.8117C56.2839 58.0561 57.9659 58.1742 59.7212 58.1497C61.4033 58.1253 63.0202 57.9746 64.5596 57.7017C73.593 56.1052 79.9668 50.2853 81.494 40.9954Z",
10109
+ fill: "#FCA700"
10110
+ }
10111
+ ),
10112
+ /* @__PURE__ */ React104.createElement(
10113
+ "path",
10114
+ {
10115
+ d: "M67.1213 30.2554C67.1295 30.8581 67.0887 31.4324 66.9991 31.97C66.4656 35.2119 64.2419 37.2401 61.0896 37.7981C60.5561 37.8917 59.99 37.9447 59.4035 37.9528C58.7926 37.961 58.2061 37.9202 57.6441 37.8347C54.4755 37.3541 52.2029 35.3911 51.5798 32.1818C51.4739 31.6442 51.4169 31.074 51.4087 30.4712C51.4006 29.8562 51.4454 29.2779 51.535 28.7322C52.0726 25.5025 54.2922 23.4824 57.4405 22.9122C57.9984 22.8104 58.5849 22.7534 59.1958 22.7453C59.7823 22.7371 60.3484 22.7738 60.886 22.8552C64.0464 23.3277 66.3231 25.2907 66.9503 28.5204C67.0521 29.0661 67.1132 29.6445 67.1213 30.2554Z",
10116
+ fill: "#1868DB"
10117
+ }
10118
+ ),
10119
+ /* @__PURE__ */ React104.createElement(
10120
+ "path",
10121
+ {
10122
+ d: "M59.4327 39.256C67.3862 39.1176 72.591 42.9454 72.4043 53.2275L72.4328 54.8301C70.1358 56.2149 67.4885 57.1842 64.5562 57.7014C63.0167 57.9743 61.3998 58.125 59.7178 58.1494C57.9624 58.1738 56.2804 58.0557 54.6716 57.8114C51.9348 57.3959 49.4382 56.5855 47.2267 55.4166L47.1982 53.6653C47.019 43.3898 51.9674 39.3863 59.4327 39.256Z",
10123
+ fill: "#1868DB"
10124
+ }
10125
+ ),
10126
+ /* @__PURE__ */ React104.createElement(
10127
+ "path",
10128
+ {
10129
+ d: "M45.4672 59.8806C45.622 58.948 45.6912 57.9624 45.679 56.9157C45.6627 55.8568 45.5609 54.8589 45.3817 53.9181C44.2983 48.3344 40.3641 44.9418 34.9026 44.1273C33.9699 43.9888 32.9924 43.9237 31.9783 43.94C30.9642 43.9562 29.9053 44.054 28.9401 44.2291C23.4989 45.2147 19.6665 48.7091 18.7338 54.2888C18.575 55.2296 18.5017 56.2314 18.518 57.2944C18.5343 58.337 18.632 59.3267 18.8112 60.2512C19.8864 65.7942 23.8166 69.1868 29.2944 70.0258C30.2637 70.1724 31.2778 70.2457 32.3367 70.2294C33.3508 70.2172 34.3242 70.1235 35.2528 69.9606C40.7021 68.9994 44.5427 65.4887 45.4672 59.8847V59.8806Z",
10130
+ fill: "#FCA700"
10131
+ }
10132
+ ),
10133
+ /* @__PURE__ */ React104.createElement(
10134
+ "path",
10135
+ {
10136
+ d: "M36.7999 53.401C36.8039 53.7675 36.7795 54.1096 36.7265 54.4354V54.4314C36.4048 56.3863 35.0649 57.6122 33.1629 57.9461C32.8371 58.0031 32.4991 58.0357 32.1447 58.0398C31.7741 58.0479 31.4198 58.0235 31.0817 57.9706C29.1716 57.6814 27.7991 56.4962 27.4244 54.5617C27.3633 54.2399 27.3267 53.8938 27.3226 53.5313C27.3185 53.1647 27.3471 52.8145 27.4 52.4846C27.7217 50.5378 29.0617 49.316 30.9596 48.9739C31.2935 48.9128 31.6641 48.8762 32.0185 48.8721C32.3728 48.868 32.7108 48.8884 33.0367 48.9373C34.9427 49.2223 36.3152 50.4075 36.694 52.3543C36.7591 52.6842 36.7958 53.0303 36.7999 53.401Z",
10137
+ fill: "#1868DB"
10138
+ }
10139
+ ),
10140
+ /* @__PURE__ */ React104.createElement(
10141
+ "path",
10142
+ {
10143
+ d: "M32.161 58.83C36.9587 58.7485 40.0987 61.0537 39.9847 67.2564L40.001 68.2258C38.6163 69.0607 37.0198 69.6431 35.2522 69.9567C34.3236 70.1196 33.3502 70.2132 32.3361 70.2255C31.2772 70.2417 30.2631 70.1684 29.2938 70.0218C27.6443 69.7693 26.1374 69.2806 24.8057 68.576L24.7853 67.5212C24.6753 61.3225 27.6606 58.9073 32.161 58.83Z",
10144
+ fill: "#1868DB"
10145
+ }
10146
+ ),
10147
+ /* @__PURE__ */ React104.createElement(
10148
+ "path",
10149
+ {
10150
+ d: "M44.697 26.435C44.9495 24.8915 45.0716 23.2502 45.0472 21.5192C45.035 20.5825 44.978 19.6784 44.8843 18.8027C40.8401 21.7147 38.0991 26.0726 37.1583 31.7214C36.8977 33.2854 36.7755 34.947 36.7999 36.7024C36.8122 37.631 36.8692 38.531 36.9628 39.4067C41.0193 36.4947 43.7643 32.1165 44.697 26.435Z",
10151
+ fill: "#AE2A19"
10152
+ }
10153
+ ),
10154
+ /* @__PURE__ */ React104.createElement(
10155
+ "path",
10156
+ {
10157
+ d: "M45.4588 54.3661C45.4343 54.2154 45.4099 54.0647 45.3814 53.9181C44.5342 49.5481 41.9358 46.5261 38.2256 45.0273C39.6714 49.0227 42.1639 52.1628 45.4547 54.3661H45.4588Z",
10158
+ fill: "#AE2A19"
10159
+ }
10160
+ )
10161
+ );
10162
+ }
10163
+ var user_default = IllustrationUser;
10014
10164
  export {
10015
10165
  align_default as Align,
10016
10166
  arrange_default as Arrange,
@@ -10076,6 +10226,7 @@ export {
10076
10226
  upgrade_default as IllustrationUpgrade,
10077
10227
  upload_drag_and_drop_default as IllustrationUploadDragAndDrop,
10078
10228
  use_cases_default as IllustrationUseCases,
10229
+ user_default as IllustrationUser,
10079
10230
  wellness_default as IllustrationWellness,
10080
10231
  folders_empty_state_mobile_default as IllutrationFoldersEmptyStateMobile,
10081
10232
  indicator_default as Indicator,