@7shifts/sous-chef 3.27.0 → 3.28.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.
@@ -24,7 +24,9 @@ declare type Props<T> = {
24
24
  testId?: string;
25
25
  /** This is to allow disable the seach functionality. Use it just in some edge-cases, for example in touch devices when the user clicks on the field it opens a virtual keyboard to search, sometimes that virtual keyboard taks much space then passing `isSearchable={false}` prevents opening it. */
26
26
  isSearchable?: boolean;
27
+ creatableButton?: React.ReactNode;
28
+ onCreate?: (option: string) => void;
27
29
  };
28
30
  /** Component to make possible choose from a predefined options. */
29
- declare const MultiSelectField: <T extends unknown>({ name, id: inputId, value, options, onChange, onBlur, CustomOption: UserCustomOption, label, caption, error, placeholder, noOptionsMessage, disabled, closeOnSelect, menuShouldScrollIntoView, testId, isSearchable }: Props<T>) => JSX.Element;
31
+ declare const MultiSelectField: <T extends unknown>({ name, id: inputId, value, options, onChange, onBlur, CustomOption: UserCustomOption, label, caption, error, placeholder, noOptionsMessage, disabled, closeOnSelect, menuShouldScrollIntoView, testId, isSearchable, creatableButton, onCreate }: Props<T>) => JSX.Element;
30
32
  export default MultiSelectField;
package/dist/index.css CHANGED
@@ -1481,6 +1481,17 @@ h5._3CIA3 {
1481
1481
  ._3FZlB {
1482
1482
  pointer-events: none;
1483
1483
  }
1484
+ ._2qNmx {
1485
+ position: absolute;
1486
+ width: 38px;
1487
+ height: 38px;
1488
+ top: 8px;
1489
+ right: 8px;
1490
+ }
1491
+
1492
+ ._2z7qG {
1493
+ text-transform: uppercase;
1494
+ }
1484
1495
  ._XFvYB {
1485
1496
  display: flex;
1486
1497
  gap: 8px;
@@ -1756,11 +1767,12 @@ h5._3CIA3 {
1756
1767
  background: var(--color-white);
1757
1768
  overflow: auto;
1758
1769
  outline: none;
1759
- padding: 32px;
1770
+ padding: 32px 24px;
1760
1771
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
1761
- min-height: 200px;
1762
1772
  display: flex;
1763
1773
  flex-direction: column;
1774
+ box-sizing: border-box;
1775
+ min-height: 266px;
1764
1776
  }
1765
1777
  ._wQQ_2 > form {
1766
1778
  display: contents;
@@ -1779,11 +1791,13 @@ h5._3CIA3 {
1779
1791
  color: var(--color-grey-500);
1780
1792
  font-weight: 600;
1781
1793
  font-family: "Proxima Nova", sans-serif;
1794
+ padding: 0;
1782
1795
  }
1783
1796
  ._2zYre {
1784
1797
  display: flex;
1785
1798
  justify-content: end;
1786
1799
  margin-bottom: -20px;
1800
+ margin-right: 8px;
1787
1801
  z-index: calc(var(--z-index-base) + 2);
1788
1802
  }
1789
1803
 
@@ -1804,8 +1818,8 @@ h5._3CIA3 {
1804
1818
  font-size: 14px;
1805
1819
  line-height: 16px;
1806
1820
  position: relative;
1821
+ padding: 0 8px 0 8px;
1807
1822
  }
1808
-
1809
1823
  ._2ErCP {
1810
1824
  z-index: var(--z-index-base);
1811
1825
  background: #fff no-repeat;
@@ -1826,12 +1840,15 @@ h5._3CIA3 {
1826
1840
  margin: -30px 0 0;
1827
1841
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 70%, #fff);
1828
1842
  }
1843
+ ._3NET7 {
1844
+ padding-bottom: 8px;
1845
+ }
1829
1846
  ._LKOr5 {
1830
1847
  flex: 1;
1831
1848
  display: flex;
1832
1849
  flex-direction: column;
1833
1850
  justify-content: flex-end;
1834
- padding-top: 40px;
1851
+ padding: 32px 8px 0 8px;
1835
1852
  }
1836
1853
 
1837
1854
  ._Qktd- {
@@ -2210,6 +2227,266 @@ input:disabled + ._2mA8e::after {
2210
2227
  ._3Mm-v._3Mm-v {
2211
2228
  border-bottom-right-radius: 8px;
2212
2229
  }
2230
+ @-webkit-keyframes _3FIb5 {
2231
+ from {
2232
+ opacity: 0;
2233
+ }
2234
+ to {
2235
+ opacity: 1;
2236
+ }
2237
+ }
2238
+ @keyframes _3FIb5 {
2239
+ from {
2240
+ opacity: 0;
2241
+ }
2242
+ to {
2243
+ opacity: 1;
2244
+ }
2245
+ }
2246
+ ._25lPo {
2247
+ position: relative;
2248
+ overflow: auto;
2249
+ white-space: nowrap;
2250
+ }
2251
+ ._25lPo table {
2252
+ table-layout: auto;
2253
+ }
2254
+ ._2S3Jq:not(._RfN1H) table tr > td:first-of-type {
2255
+ transform-style: preserve-3d;
2256
+ }
2257
+ ._2S3Jq:not(._RfN1H) table tr > td:first-of-type::before {
2258
+ content: "";
2259
+ width: 10px;
2260
+ height: 100%;
2261
+ position: absolute;
2262
+ z-index: 0;
2263
+ transform: translateZ(-1px);
2264
+ top: 0;
2265
+ -webkit-animation: _3FIb5 1s;
2266
+ animation: _3FIb5 1s;
2267
+ box-shadow: -7px 12px 11px 3px #888;
2268
+ right: 0;
2269
+ }
2270
+ ._2S3Jq._RfN1H table tr > td:first-of-type {
2271
+ border-right: 4px solid var(--color-grey-200);
2272
+ }
2273
+ ._1Jszb table thead tr th:first-of-type {
2274
+ position: sticky;
2275
+ left: 0;
2276
+ background-color: var(--color-white);
2277
+ }
2278
+ ._1Jszb table tbody tr td:first-of-type {
2279
+ position: sticky;
2280
+ left: 0;
2281
+ z-index: 1;
2282
+ background-color: var(--color-white);
2283
+ }
2284
+ ._1Jszb table tfoot tr td:first-of-type {
2285
+ position: sticky;
2286
+ left: 0;
2287
+ z-index: 1;
2288
+ }
2289
+ ._1Jszb table tbody tr:first-of-type > td:first-of-type::after {
2290
+ content: "";
2291
+ width: 6px;
2292
+ height: 1px;
2293
+ position: absolute;
2294
+ background: var(--color-white);
2295
+ transform: translateZ(-1px);
2296
+ left: -1px;
2297
+ top: -1px;
2298
+ }
2299
+ ._Zq6VQ:not(._RfN1H) table tr > td:last-of-type {
2300
+ transform-style: preserve-3d;
2301
+ }
2302
+ ._Zq6VQ:not(._RfN1H) table tr > td:last-of-type::before {
2303
+ content: "";
2304
+ width: 10px;
2305
+ height: 100%;
2306
+ position: absolute;
2307
+ z-index: 0;
2308
+ transform: translateZ(-1px);
2309
+ top: 0;
2310
+ -webkit-animation: _3FIb5 1s;
2311
+ animation: _3FIb5 1s;
2312
+ box-shadow: 7px 12px 11px 3px #888;
2313
+ left: 0;
2314
+ }
2315
+ ._Zq6VQ._RfN1H table tr > td:last-of-type {
2316
+ border-left: 4px solid var(--color-grey-200);
2317
+ }
2318
+ ._2riDu table thead tr th:last-of-type {
2319
+ position: sticky;
2320
+ right: 0;
2321
+ background-color: var(--color-white);
2322
+ }
2323
+ ._2riDu table tbody tr td:last-of-type {
2324
+ position: sticky;
2325
+ right: 0;
2326
+ z-index: 1;
2327
+ background-color: var(--color-white);
2328
+ }
2329
+ ._2riDu table tfoot tr td:last-of-type {
2330
+ position: sticky;
2331
+ right: 0;
2332
+ z-index: 1;
2333
+ }
2334
+ ._2riDu table tbody tr:first-of-type > td:last-of-type::after {
2335
+ content: "";
2336
+ width: 6px;
2337
+ height: 1px;
2338
+ position: absolute;
2339
+ background: var(--color-white);
2340
+ transform: translateZ(-1px);
2341
+ right: -1px;
2342
+ top: -1px;
2343
+ }
2344
+ ._2riDu:not(._1735l) table tbody tr:last-of-type > td:last-of-type::after {
2345
+ content: "";
2346
+ width: 6px;
2347
+ height: 1px;
2348
+ position: absolute;
2349
+ background: var(--color-white);
2350
+ transform: translateZ(-1px);
2351
+ right: -1px;
2352
+ bottom: -1px;
2353
+ }
2354
+ ._1Jszb:not(._1735l) table tbody tr:last-of-type > td:first-of-type::after {
2355
+ content: "";
2356
+ width: 6px;
2357
+ height: 1px;
2358
+ position: absolute;
2359
+ background: var(--color-white);
2360
+ transform: translateZ(-1px);
2361
+ left: -1px;
2362
+ bottom: -1px;
2363
+ }
2364
+ ._1735l._2riDu table tfoot tr:last-of-type > td:last-of-type::after {
2365
+ content: "";
2366
+ width: 6px;
2367
+ height: 1px;
2368
+ position: absolute;
2369
+ background: var(--color-white);
2370
+ transform: translateZ(-1px);
2371
+ right: -1px;
2372
+ bottom: -1px;
2373
+ }
2374
+ ._1735l._1Jszb table tfoot tr:last-of-type > td:first-of-type::after {
2375
+ content: "";
2376
+ width: 6px;
2377
+ height: 1px;
2378
+ position: absolute;
2379
+ background: var(--color-white);
2380
+ transform: translateZ(-1px);
2381
+ left: -1px;
2382
+ bottom: -1px;
2383
+ }
2384
+ @-webkit-keyframes _22OAU {
2385
+ from {
2386
+ box-shadow: inset 5px 0px 0px -5px #88888830;
2387
+ }
2388
+ to {
2389
+ box-shadow: inset 5px 0px 9px -5px #88888830;
2390
+ }
2391
+ }
2392
+ @keyframes _22OAU {
2393
+ from {
2394
+ box-shadow: inset 5px 0px 0px -5px #88888830;
2395
+ }
2396
+ to {
2397
+ box-shadow: inset 5px 0px 9px -5px #88888830;
2398
+ }
2399
+ }
2400
+ @-webkit-keyframes _2i_F1 {
2401
+ from {
2402
+ box-shadow: inset -5px 0px 0px -5px #88888830;
2403
+ }
2404
+ to {
2405
+ box-shadow: inset -5px 0px 9px -5px #88888830;
2406
+ }
2407
+ }
2408
+ @keyframes _2i_F1 {
2409
+ from {
2410
+ box-shadow: inset -5px 0px 0px -5px #88888830;
2411
+ }
2412
+ to {
2413
+ box-shadow: inset -5px 0px 9px -5px #88888830;
2414
+ }
2415
+ }
2416
+ ._3S_6c {
2417
+ height: calc(100% - 28px);
2418
+ width: 20px;
2419
+ position: absolute;
2420
+ display: block;
2421
+ transform-style: preserve-3d;
2422
+ z-index: 2;
2423
+ box-sizing: border-box;
2424
+ }
2425
+ ._3Z4CV {
2426
+ height: 100%;
2427
+ }
2428
+ ._2Ww7z {
2429
+ border: 1px solid var(--color-grey-200);
2430
+ border-right: 0;
2431
+ border-bottom-left-radius: 8px;
2432
+ border-top-left-radius: 8px;
2433
+ left: 0;
2434
+ bottom: 0;
2435
+ box-shadow: inset 5px 0px 9px -5px #88888830;
2436
+ -webkit-animation: _22OAU 1s;
2437
+ animation: _22OAU 1s;
2438
+ }
2439
+ ._2Ww7z::after {
2440
+ content: "";
2441
+ width: 6px;
2442
+ height: 1px;
2443
+ position: absolute;
2444
+ background: var(--color-white);
2445
+ transform: translateZ(-1px);
2446
+ left: -1px;
2447
+ top: -1px;
2448
+ }
2449
+ ._2Ww7z::before {
2450
+ content: "";
2451
+ width: 6px;
2452
+ height: 1px;
2453
+ position: absolute;
2454
+ background: var(--color-white);
2455
+ transform: translateZ(-1px);
2456
+ left: -1px;
2457
+ bottom: -1px;
2458
+ }
2459
+ ._3UwN8 {
2460
+ border: 1px solid var(--color-grey-200);
2461
+ border-left: 0;
2462
+ border-bottom-right-radius: 8px;
2463
+ border-top-right-radius: 8px;
2464
+ right: 0;
2465
+ bottom: 0;
2466
+ box-shadow: inset -5px 0px 9px -5px #88888830;
2467
+ -webkit-animation: _2i_F1 1s;
2468
+ animation: _2i_F1 1s;
2469
+ }
2470
+ ._3UwN8::after {
2471
+ content: "";
2472
+ width: 6px;
2473
+ height: 1px;
2474
+ position: absolute;
2475
+ background: var(--color-white);
2476
+ transform: translateZ(-1px);
2477
+ right: -1px;
2478
+ top: -1px;
2479
+ }
2480
+ ._3UwN8::before {
2481
+ content: "";
2482
+ width: 6px;
2483
+ height: 1px;
2484
+ position: absolute;
2485
+ background: var(--color-white);
2486
+ transform: translateZ(-1px);
2487
+ right: -1px;
2488
+ bottom: -1px;
2489
+ }
2213
2490
  ._1cDCR {
2214
2491
  flex: 1;
2215
2492
  display: "flex";