@economic/taco 1.24.0 → 1.25.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (79) hide show
  1. package/dist/components/Button/Button.d.ts +13 -0
  2. package/dist/components/Dialog/Dialog.d.ts +1 -1
  3. package/dist/components/Dialog/components/DialogDrawer.d.ts +10 -0
  4. package/dist/components/Drawer/Context.d.ts +18 -0
  5. package/dist/components/Drawer/Drawer.d.ts +51 -0
  6. package/dist/components/Drawer/components/Content.d.ts +53 -0
  7. package/dist/components/Drawer/components/Trigger.d.ts +3 -0
  8. package/dist/components/Drawer/images.d.ts +1 -0
  9. package/dist/components/Drawer/types.d.ts +2 -0
  10. package/dist/components/Drawer/util.d.ts +7 -0
  11. package/dist/components/Navigation2/components/Group.d.ts +5 -3
  12. package/dist/components/Navigation2/components/util.d.ts +1 -0
  13. package/dist/components/Provider/Localization.d.ts +6 -0
  14. package/dist/esm/packages/taco/src/components/Button/Button.js +2 -0
  15. package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
  16. package/dist/esm/packages/taco/src/components/Button/util.js +5 -0
  17. package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
  18. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js +3 -3
  19. package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
  20. package/dist/esm/packages/taco/src/components/Dialog/components/{Drawer.js → DialogDrawer.js} +4 -4
  21. package/dist/esm/packages/taco/src/components/Dialog/components/DialogDrawer.js.map +1 -0
  22. package/dist/esm/packages/taco/src/components/Drawer/Context.js +19 -0
  23. package/dist/esm/packages/taco/src/components/Drawer/Context.js.map +1 -0
  24. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +102 -0
  25. package/dist/esm/packages/taco/src/components/Drawer/Drawer.js.map +1 -0
  26. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +292 -0
  27. package/dist/esm/packages/taco/src/components/Drawer/components/Content.js.map +1 -0
  28. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js +12 -0
  29. package/dist/esm/packages/taco/src/components/Drawer/components/Trigger.js.map +1 -0
  30. package/dist/esm/packages/taco/src/components/Drawer/util.js +37 -0
  31. package/dist/esm/packages/taco/src/components/Drawer/util.js.map +1 -0
  32. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +4 -2
  33. package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js.map +1 -1
  34. package/dist/esm/packages/taco/src/components/Header/components/Button.js +1 -0
  35. package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
  36. package/dist/esm/packages/taco/src/components/Header/components/Link.js +1 -0
  37. package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
  38. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js +1 -0
  39. package/dist/esm/packages/taco/src/components/Header/components/MenuButton.js.map +1 -1
  40. package/dist/esm/packages/taco/src/components/Menu/Menu.js +2 -2
  41. package/dist/esm/packages/taco/src/components/Menu/components/Content.js +1 -1
  42. package/dist/esm/packages/taco/src/components/Menu/components/Header.js +1 -1
  43. package/dist/esm/packages/taco/src/components/Menu/components/Item.js +1 -1
  44. package/dist/esm/packages/taco/src/components/Menu/components/Link.js +1 -1
  45. package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +1 -1
  46. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js +1 -1
  47. package/dist/esm/packages/taco/src/components/Navigation2/Navigation2.js.map +1 -1
  48. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js +2 -1
  49. package/dist/esm/packages/taco/src/components/Navigation2/components/Content.js.map +1 -1
  50. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +6 -6
  51. package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
  52. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js +2 -1
  53. package/dist/esm/packages/taco/src/components/Navigation2/components/Link.js.map +1 -1
  54. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js +2 -1
  55. package/dist/esm/packages/taco/src/components/Navigation2/components/Section.js.map +1 -1
  56. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js +12 -0
  57. package/dist/esm/packages/taco/src/components/Navigation2/components/util.js.map +1 -0
  58. package/dist/esm/packages/taco/src/components/Provider/Localization.js +3 -0
  59. package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
  60. package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +1 -1
  61. package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +1 -1
  62. package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +1 -1
  63. package/dist/esm/packages/taco/src/components/Table2/components/EditModeButton.js +1 -1
  64. package/dist/esm/packages/taco/src/components/Table2/components/Search.js +1 -1
  65. package/dist/esm/packages/taco/src/components/Table2/components/filters/FiltersButton.js +1 -1
  66. package/dist/esm/packages/taco/src/index.js +2 -1
  67. package/dist/esm/packages/taco/src/index.js.map +1 -1
  68. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js +8 -1
  69. package/dist/esm/packages/taco/src/utils/hooks/useDraggable.js.map +1 -1
  70. package/dist/index.d.ts +1 -0
  71. package/dist/taco.cjs.development.js +559 -107
  72. package/dist/taco.cjs.development.js.map +1 -1
  73. package/dist/taco.cjs.production.min.js +1 -1
  74. package/dist/taco.cjs.production.min.js.map +1 -1
  75. package/package.json +3 -2
  76. package/tailwind.config.js +1 -0
  77. package/types.json +331 -4
  78. package/dist/components/Dialog/components/Drawer.d.ts +0 -10
  79. package/dist/esm/packages/taco/src/components/Dialog/components/Drawer.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@economic/taco",
3
- "version": "1.24.0",
3
+ "version": "1.25.1",
4
4
  "description": "> TODO: description",
5
5
  "author": "Matt Daly <matthew.daly@visma.com>",
6
6
  "homepage": "https://github.com/e-conomic/taco#readme",
@@ -82,6 +82,7 @@
82
82
  "@babel/preset-react": "^7.18.6",
83
83
  "@babel/preset-typescript": "^7.18.6",
84
84
  "@svgr/cli": "^5.5.0",
85
+ "@tailwindcss/line-clamp": "^0.4.2",
85
86
  "@testing-library/dom": "^7.31.0",
86
87
  "@testing-library/jest-dom": "^5.16.5",
87
88
  "@testing-library/react": "^11.1.0",
@@ -131,5 +132,5 @@
131
132
  "not ie < 11"
132
133
  ]
133
134
  },
134
- "gitHead": "9c1d9b9fe0dc50f97201f045097bc92ef5027125"
135
+ "gitHead": "ce5371b21c9b07d7a5d06bd05c76d59b7dddf0c9"
135
136
  }
@@ -41,6 +41,7 @@ module.exports = {
41
41
  plugins: [
42
42
  require('./plugins/tailwindcss-aria-attributes'),
43
43
  require('./plugins/tailwindcss-group-peer'),
44
+ require('@tailwindcss/line-clamp'),
44
45
  plugin(function ({ addUtilities, theme }) {
45
46
  // ideally we would do this using the @layer utilities directive, but
46
47
  // that causes issues in tools like tailwind where the typescript is loaded before the css
package/types.json CHANGED
@@ -221,6 +221,93 @@
221
221
  }
222
222
  ]
223
223
  },
224
+ "DrawerContext": {
225
+ "props": [
226
+ {
227
+ "name": "closeOnEscape",
228
+ "optional": false,
229
+ "type": "boolean"
230
+ },
231
+ {
232
+ "name": "focusTrap",
233
+ "optional": true,
234
+ "type": "boolean"
235
+ },
236
+ {
237
+ "name": "onClose",
238
+ "optional": true,
239
+ "type": {
240
+ "returnValue": "void"
241
+ }
242
+ },
243
+ {
244
+ "name": "onResize",
245
+ "optional": true,
246
+ "type": {
247
+ "arguments": {
248
+ "delta": "number"
249
+ },
250
+ "returnValue": "void"
251
+ }
252
+ },
253
+ {
254
+ "name": "open",
255
+ "optional": true,
256
+ "type": "boolean"
257
+ },
258
+ {
259
+ "name": "outlet",
260
+ "optional": true,
261
+ "type": "HTMLElement"
262
+ },
263
+ {
264
+ "name": "props",
265
+ "optional": false,
266
+ "type": {
267
+ "type": "reflection",
268
+ "declaration": {
269
+ "id": 1325,
270
+ "name": "__type",
271
+ "kind": 65536,
272
+ "kindString": "Type literal",
273
+ "flags": {
274
+ "isExported": true
275
+ }
276
+ }
277
+ }
278
+ },
279
+ {
280
+ "name": "ref",
281
+ "optional": false,
282
+ "type": "React.Ref<HTMLElement>"
283
+ },
284
+ {
285
+ "name": "setOpen",
286
+ "optional": true,
287
+ "type": {
288
+ "arguments": {
289
+ "open": "boolean"
290
+ },
291
+ "returnValue": "void"
292
+ }
293
+ },
294
+ {
295
+ "name": "showCloseButton",
296
+ "optional": false,
297
+ "type": "boolean"
298
+ },
299
+ {
300
+ "name": "size",
301
+ "optional": false,
302
+ "type": "DrawerSize"
303
+ },
304
+ {
305
+ "name": "variant",
306
+ "optional": false,
307
+ "type": "DrawerVariant"
308
+ }
309
+ ]
310
+ },
224
311
  "LayoutContextValue": {
225
312
  "props": [
226
313
  {
@@ -478,6 +565,59 @@
478
565
  },
479
566
  "DialogFooterProps": "HTMLAttributes<HTMLDivElement>",
480
567
  "DialogTitleProps": "HTMLAttributes<HTMLHeadingElement>",
568
+ "DrawerCloseProps": "HTMLAttributes<HTMLButtonElement>",
569
+ "DrawerContentProps": {
570
+ "intersections": [
571
+ "Omit<HTMLAttributes<HTMLDivElement>, 'children'>"
572
+ ],
573
+ "props": [
574
+ {
575
+ "description": "An accessible label to be announced when the side drawer is opened",
576
+ "name": "aria-label",
577
+ "optional": false,
578
+ "type": "string"
579
+ },
580
+ {
581
+ "name": "children",
582
+ "optional": false,
583
+ "type": [
584
+ "Omit<React.ReactNode, 'Function'>",
585
+ {
586
+ "arguments": {
587
+ "props": "DrawerContentRenderProps"
588
+ },
589
+ "returnValue": "Element"
590
+ }
591
+ ]
592
+ }
593
+ ]
594
+ },
595
+ "DrawerContentRenderProps": {
596
+ "props": [
597
+ {
598
+ "name": "close",
599
+ "optional": false,
600
+ "type": {
601
+ "returnValue": "void"
602
+ }
603
+ }
604
+ ]
605
+ },
606
+ "DrawerFooterProps": "HTMLAttributes<HTMLDivElement>",
607
+ "DrawerInnerContentProps": {
608
+ "intersections": [
609
+ "HTMLAttributes<HTMLDivElement>"
610
+ ],
611
+ "props": [
612
+ {
613
+ "description": "Consumer might want to use innerContent component to apply default paddings, but want to implement custom scrolling behaviour,\ndefault value - true",
614
+ "name": "isScrollable",
615
+ "optional": true,
616
+ "type": "boolean"
617
+ }
618
+ ]
619
+ },
620
+ "DrawerTitleProps": "HTMLAttributes<HTMLHeadingElement>",
481
621
  "LayoutContentProps": "HTMLAttributes<HTMLDivElement>",
482
622
  "MenuContentProps": {
483
623
  "intersections": [
@@ -512,6 +652,7 @@
512
652
  "Trigger": {
513
653
  "AlertDialogTriggerProps": "HTMLAttributes<HTMLButtonElement>",
514
654
  "DialogTriggerProps": "HTMLAttributes<HTMLButtonElement>",
655
+ "DrawerTriggerProps": "HTMLAttributes<HTMLButtonElement>",
515
656
  "MenuTriggerProps": {
516
657
  "intersections": [
517
658
  "Omit<HTMLAttributes<HTMLButtonElement>, 'children'>"
@@ -1142,7 +1283,7 @@
1142
1283
  "'lg'"
1143
1284
  ]
1144
1285
  },
1145
- "Drawer": {
1286
+ "DialogDrawer": {
1146
1287
  "DialogDrawerProps": {
1147
1288
  "intersections": [
1148
1289
  "Omit<HTMLAttributes<HTMLDivElement>, 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'>"
@@ -1178,6 +1319,176 @@
1178
1319
  "Extra": {
1179
1320
  "DialogExtraProps": "HTMLAttributes<HTMLDivElement>"
1180
1321
  },
1322
+ "Drawer": {
1323
+ "DrawerProps": {
1324
+ "intersections": [
1325
+ "Omit<DialogProps, 'draggable' | 'size'>"
1326
+ ],
1327
+ "props": [
1328
+ {
1329
+ "name": "children",
1330
+ "optional": false,
1331
+ "type": [
1332
+ "React.ReactNode",
1333
+ "React.ReactNode[]"
1334
+ ]
1335
+ },
1336
+ {
1337
+ "description": "className for children container, needed for embedded version, in cases where we might need to control children height",
1338
+ "name": "className",
1339
+ "optional": true,
1340
+ "type": "string"
1341
+ },
1342
+ {
1343
+ "description": "When `true`, pressing escape will close the drawer",
1344
+ "name": "closeOnEscape",
1345
+ "optional": true,
1346
+ "type": "boolean"
1347
+ },
1348
+ {
1349
+ "description": "Set whether the drawer is open by default or not, use when not providing a trigger",
1350
+ "name": "defaultOpen",
1351
+ "optional": true,
1352
+ "type": "boolean"
1353
+ },
1354
+ {
1355
+ "description": "When 'true' preventing focus from leaving drawer content",
1356
+ "name": "focusTrap",
1357
+ "optional": true,
1358
+ "type": "boolean"
1359
+ },
1360
+ {
1361
+ "description": "Called when the drawer opens or closes, must be used in conjunction with open",
1362
+ "name": "onChange",
1363
+ "optional": true,
1364
+ "type": {
1365
+ "arguments": {
1366
+ "open": [
1367
+ "boolean",
1368
+ "undefined"
1369
+ ]
1370
+ },
1371
+ "returnValue": "void"
1372
+ }
1373
+ },
1374
+ {
1375
+ "description": "Handler called when drawer closes by user interaction",
1376
+ "name": "onClose",
1377
+ "optional": true,
1378
+ "type": {
1379
+ "returnValue": "void"
1380
+ }
1381
+ },
1382
+ {
1383
+ "description": "Triggers when resizing, can be throttled or debounced for better performances",
1384
+ "name": "onResize",
1385
+ "optional": true,
1386
+ "type": {
1387
+ "arguments": {
1388
+ "delta": "number"
1389
+ },
1390
+ "returnValue": "void"
1391
+ }
1392
+ },
1393
+ {
1394
+ "description": "Control the open state of the drawer from outside the component",
1395
+ "name": "open",
1396
+ "optional": true,
1397
+ "type": "boolean"
1398
+ },
1399
+ {
1400
+ "description": "When 'true' renders close button in topr right cornenr of drawer content",
1401
+ "name": "showCloseButton",
1402
+ "optional": true,
1403
+ "type": "boolean"
1404
+ },
1405
+ {
1406
+ "description": "Size of the drawer. This is the recommended way to set a size for drawer component.",
1407
+ "name": "size",
1408
+ "optional": true,
1409
+ "type": "DrawerSize"
1410
+ },
1411
+ {
1412
+ "description": "A trigger to be used for the drawer, should not be set if `children` already contains a trigger",
1413
+ "name": "trigger",
1414
+ "optional": true,
1415
+ "type": "JSX.Element"
1416
+ },
1417
+ {
1418
+ "description": "Rendering variant of the drawer",
1419
+ "name": "variant",
1420
+ "optional": true,
1421
+ "type": "DrawerVariant"
1422
+ }
1423
+ ]
1424
+ },
1425
+ "DrawerTexts": {
1426
+ "props": [
1427
+ {
1428
+ "description": "Aria-label for close icon button in drawer.",
1429
+ "name": "close",
1430
+ "optional": false,
1431
+ "type": "string"
1432
+ }
1433
+ ]
1434
+ },
1435
+ "ForwardedDrawerWithStatics": {
1436
+ "intersections": [
1437
+ "ForwardRefExoticComponent<DrawerProps & RefAttributes<HTMLElement>>"
1438
+ ],
1439
+ "props": [
1440
+ {
1441
+ "name": "Actions",
1442
+ "optional": false,
1443
+ "type": "ForwardRefExoticComponent<GroupProps & RefAttributes<HTMLDivElement>>"
1444
+ },
1445
+ {
1446
+ "name": "Close",
1447
+ "optional": false,
1448
+ "type": "ForwardRefExoticComponent<DrawerCloseProps & RefAttributes<HTMLButtonElement>>"
1449
+ },
1450
+ {
1451
+ "name": "Content",
1452
+ "optional": false,
1453
+ "type": "ForwardRefExoticComponent<DrawerContentProps & RefAttributes<HTMLDivElement>>"
1454
+ },
1455
+ {
1456
+ "name": "Footer",
1457
+ "optional": false,
1458
+ "type": "ForwardRefExoticComponent<DrawerFooterProps & RefAttributes<HTMLDivElement>>"
1459
+ },
1460
+ {
1461
+ "name": "InnerContent",
1462
+ "optional": false,
1463
+ "type": "ForwardRefExoticComponent<DrawerInnerContentProps & RefAttributes<HTMLDivElement>>"
1464
+ },
1465
+ {
1466
+ "name": "Outlet",
1467
+ "optional": false,
1468
+ "type": "ForwardRefExoticComponent<OutletProps & RefAttributes<HTMLDivElement>>"
1469
+ },
1470
+ {
1471
+ "name": "Title",
1472
+ "optional": false,
1473
+ "type": "ForwardRefExoticComponent<DrawerTitleProps & RefAttributes<HTMLHeadingElement>>"
1474
+ },
1475
+ {
1476
+ "name": "Trigger",
1477
+ "optional": false,
1478
+ "type": "ForwardRefExoticComponent<DrawerTriggerProps & RefAttributes<HTMLButtonElement>>"
1479
+ }
1480
+ ]
1481
+ },
1482
+ "OutletProps": "HTMLAttributes<HTMLDivElement>",
1483
+ "DrawerSize": [
1484
+ "'md'",
1485
+ "'lg'"
1486
+ ],
1487
+ "DrawerVariant": [
1488
+ "'overlay'",
1489
+ "'embedded'"
1490
+ ]
1491
+ },
1181
1492
  "Field": {
1182
1493
  "FieldProps": {
1183
1494
  "intersections": [
@@ -1263,7 +1574,7 @@
1263
1574
  },
1264
1575
  "Navigation2GroupProps": {
1265
1576
  "intersections": [
1266
- "ButtonHTMLAttributes<HTMLButtonElement>"
1577
+ "Omit<LiHTMLAttributes<HTMLLIElement>, 'onClick'>"
1267
1578
  ],
1268
1579
  "props": [
1269
1580
  {
@@ -1278,6 +1589,16 @@
1278
1589
  "string",
1279
1590
  "Element"
1280
1591
  ]
1592
+ },
1593
+ {
1594
+ "name": "onClick",
1595
+ "optional": true,
1596
+ "type": {
1597
+ "arguments": {
1598
+ "event": "MouseEvent<HTMLButtonElement>"
1599
+ },
1600
+ "returnValue": "void"
1601
+ }
1281
1602
  }
1282
1603
  ]
1283
1604
  },
@@ -2978,6 +3299,12 @@
2978
3299
  "optional": false,
2979
3300
  "type": "DialogTexts"
2980
3301
  },
3302
+ {
3303
+ "description": "Localized texts and aria-labels for [Drawer](component:drawer) component",
3304
+ "name": "drawer",
3305
+ "optional": false,
3306
+ "type": "DrawerTexts"
3307
+ },
2981
3308
  {
2982
3309
  "description": "Localized texts and aria-labels for [Hanger](component:hanger) component",
2983
3310
  "name": "hanger",
@@ -3486,7 +3813,7 @@
3486
3813
  {
3487
3814
  "type": "reflection",
3488
3815
  "declaration": {
3489
- "id": 3102,
3816
+ "id": 3248,
3490
3817
  "name": "__type",
3491
3818
  "kind": 65536,
3492
3819
  "kindString": "Type literal",
@@ -3686,7 +4013,7 @@
3686
4013
  "constraint": {
3687
4014
  "type": "reflection",
3688
4015
  "declaration": {
3689
- "id": 1837,
4016
+ "id": 1988,
3690
4017
  "name": "__type",
3691
4018
  "kind": 65536,
3692
4019
  "kindString": "Type literal",
@@ -1,10 +0,0 @@
1
- import * as React from 'react';
2
- import { DialogContext } from '../Context';
3
- export declare type DialogDrawerRenderProps = DialogContext['drawer'];
4
- export declare type DialogDrawerProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'> & {
5
- children: Omit<React.ReactNode, 'Function'> | ((props: DialogDrawerRenderProps) => React.ReactNode);
6
- };
7
- declare const Drawer: React.ForwardRefExoticComponent<Pick<React.HTMLAttributes<HTMLDivElement>, "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDragCapture" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
8
- children: Pick<React.ReactNode, never> | ((props: DialogDrawerRenderProps) => React.ReactNode);
9
- } & React.RefAttributes<HTMLDivElement>>;
10
- export { Drawer };
@@ -1 +0,0 @@
1
- {"version":3,"file":"Drawer.js","sources":["../../../../../../../../src/components/Dialog/components/Drawer.tsx"],"sourcesContent":["import * as React from 'react';\nimport { motion } from 'framer-motion';\nimport cn from 'classnames';\nimport { DialogContext, useCurrentDialog } from '../Context';\n\nexport type DialogDrawerRenderProps = DialogContext['drawer'];\n\nexport type DialogDrawerProps = Omit<\n React.HTMLAttributes<HTMLDivElement>,\n 'onAnimationStart' | 'onDragStart' | 'onDragEnd' | 'onDrag'\n> & {\n children: Omit<React.ReactNode, 'Function'> | ((props: DialogDrawerRenderProps) => React.ReactNode);\n};\n\nconst Drawer = React.forwardRef(function DialogDrawer(props: DialogDrawerProps, ref: React.Ref<HTMLDivElement>) {\n const dialog = useCurrentDialog();\n const className = cn(\n 'absolute top-0 -ml-[4px] hidden h-full w-full overflow-y-auto rounded-r bg-white p-6 text-left',\n props.className\n );\n\n return (\n <motion.div\n {...props}\n className={className}\n data-taco=\"dialog-drawer\"\n aria-hidden={!dialog.drawer?.open}\n variants={{\n visible: {\n left: '100%',\n display: 'block',\n transition: { ease: 'easeOut', duration: 0.2 },\n },\n hidden: {\n left: '0%',\n transition: { ease: 'easeOut', duration: 0.2 },\n transitionEnd: {\n display: 'none',\n },\n },\n }}\n animate={dialog.drawer?.open ? 'visible' : 'hidden'}\n ref={ref}>\n {typeof props.children === 'function' ? props.children(dialog.drawer) : props.children}\n </motion.div>\n );\n});\nDrawer.displayName = 'DialogDrawer';\n\nexport { Drawer };\n"],"names":["Drawer","React","DialogDrawer","props","ref","dialog","useCurrentDialog","className","cn","motion","div","drawer","open","variants","visible","left","display","transition","ease","duration","hidden","transitionEnd","animate","children","displayName"],"mappings":";;;;;MAcMA,MAAM,gBAAGC,UAAgB,CAAC,SAASC,YAAY,CAACC,KAAwB,EAAEC,GAA8B;;EAC1G,MAAMC,MAAM,GAAGC,gBAAgB,EAAE;EACjC,MAAMC,SAAS,GAAGC,EAAE,CAChB,iGAAiG,EACjGL,KAAK,CAACI,SAAS,CAClB;EAED,oBACIN,cAACQ,MAAM,CAACC,GAAG,oBACHP,KAAK;IACTI,SAAS,EAAEA,SAAS;iBACV,eAAe;mBACZ,oBAACF,MAAM,CAACM,MAAM,2CAAb,eAAeC,IAAI;IACjCC,QAAQ,EAAE;MACNC,OAAO,EAAE;QACLC,IAAI,EAAE,MAAM;QACZC,OAAO,EAAE,OAAO;QAChBC,UAAU,EAAE;UAAEC,IAAI,EAAE,SAAS;UAAEC,QAAQ,EAAE;;OAC5C;MACDC,MAAM,EAAE;QACJL,IAAI,EAAE,IAAI;QACVE,UAAU,EAAE;UAAEC,IAAI,EAAE,SAAS;UAAEC,QAAQ,EAAE;SAAK;QAC9CE,aAAa,EAAE;UACXL,OAAO,EAAE;;;KAGpB;IACDM,OAAO,EAAE,mBAAAjB,MAAM,CAACM,MAAM,4CAAb,gBAAeC,IAAI,GAAG,SAAS,GAAG,QAAQ;IACnDR,GAAG,EAAEA;MACJ,OAAOD,KAAK,CAACoB,QAAQ,KAAK,UAAU,GAAGpB,KAAK,CAACoB,QAAQ,CAAClB,MAAM,CAACM,MAAM,CAAC,GAAGR,KAAK,CAACoB,QAAQ,CAC7E;AAErB,CAAC;AACDvB,MAAM,CAACwB,WAAW,GAAG,cAAc;;;;"}