@economic/taco 0.0.1-alpha.1543 → 0.0.1-alpha.2

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 (86) hide show
  1. package/dist/components/Button/Button.d.ts +39 -1
  2. package/dist/components/Button/util.d.ts +2 -0
  3. package/dist/components/Checkbox/Checkbox.d.ts +1 -1
  4. package/dist/components/Dialog/Context.d.ts +1 -0
  5. package/dist/components/Dialog/Dialog.d.ts +14 -12
  6. package/dist/components/Hanger/Hanger.d.ts +4 -9
  7. package/dist/components/IconButton/IconButton.d.ts +38 -1
  8. package/dist/components/Navigation/Navigation.d.ts +4 -4
  9. package/dist/components/Popover/Popover.d.ts +5 -9
  10. package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
  11. package/dist/components/Select/Select.d.ts +4 -0
  12. package/dist/components/Select/useSelect.d.ts +1 -1
  13. package/dist/components/Table/Table.storyexample.d.ts +1 -1
  14. package/dist/components/Table/components/PaginatedTable.d.ts +2 -2
  15. package/dist/components/Table/components/Table.d.ts +2 -2
  16. package/dist/components/Table/components/WindowedTable.d.ts +2 -2
  17. package/dist/components/Table/types.d.ts +2 -2
  18. package/dist/components/Tabs/Tabs.d.ts +2 -2
  19. package/dist/components/Tooltip/Tooltip.d.ts +11 -1
  20. package/dist/components/Treeview/Treeview.d.ts +2 -2
  21. package/dist/esm/index.css +70 -93
  22. package/dist/esm/src/components/Button/Button.js +6 -9
  23. package/dist/esm/src/components/Button/Button.js.map +1 -1
  24. package/dist/esm/src/components/Button/util.js +42 -1
  25. package/dist/esm/src/components/Button/util.js.map +1 -1
  26. package/dist/esm/src/components/Calendar/Calendar.js +1 -1
  27. package/dist/esm/src/components/Checkbox/Checkbox.js +9 -1
  28. package/dist/esm/src/components/Checkbox/Checkbox.js.map +1 -1
  29. package/dist/esm/src/components/Combobox/useCombobox.js +1 -1
  30. package/dist/esm/src/components/Datepicker/Datepicker.js +2 -2
  31. package/dist/esm/src/components/Dialog/Context.js +1 -0
  32. package/dist/esm/src/components/Dialog/Context.js.map +1 -1
  33. package/dist/esm/src/components/Dialog/Dialog.js +5 -4
  34. package/dist/esm/src/components/Dialog/Dialog.js.map +1 -1
  35. package/dist/esm/src/components/Dialog/components/Content.js +5 -5
  36. package/dist/esm/src/components/Dialog/components/Content.js.map +1 -1
  37. package/dist/esm/src/components/Dialog/components/Trigger.js +2 -1
  38. package/dist/esm/src/components/Dialog/components/Trigger.js.map +1 -1
  39. package/dist/esm/src/components/Hanger/Hanger.js +12 -9
  40. package/dist/esm/src/components/Hanger/Hanger.js.map +1 -1
  41. package/dist/esm/src/components/IconButton/IconButton.js +9 -11
  42. package/dist/esm/src/components/IconButton/IconButton.js.map +1 -1
  43. package/dist/esm/src/components/Listbox/ScrollableList.js +1 -1
  44. package/dist/esm/src/components/Navigation/Navigation.js +4 -4
  45. package/dist/esm/src/components/Navigation/Navigation.js.map +1 -1
  46. package/dist/esm/src/components/Pagination/PageNumbers.js +1 -1
  47. package/dist/esm/src/components/Pagination/Pagination.js +1 -1
  48. package/dist/esm/src/components/Popover/Popover.js +9 -6
  49. package/dist/esm/src/components/Popover/Popover.js.map +1 -1
  50. package/dist/esm/src/components/RadioGroup/RadioGroup.js.map +1 -1
  51. package/dist/esm/src/components/SearchInput/SearchInput.js +7 -7
  52. package/dist/esm/src/components/Select/Select.js +2 -1
  53. package/dist/esm/src/components/Select/Select.js.map +1 -1
  54. package/dist/esm/src/components/Select/useSelect.js +12 -5
  55. package/dist/esm/src/components/Select/useSelect.js.map +1 -1
  56. package/dist/esm/src/components/Table/components/PaginatedTable.js.map +1 -1
  57. package/dist/esm/src/components/Table/components/Table.js.map +1 -1
  58. package/dist/esm/src/components/Table/components/WindowedTable.js.map +1 -1
  59. package/dist/esm/src/components/Table/hooks/plugins/useRowActions.js +11 -5
  60. package/dist/esm/src/components/Table/hooks/plugins/useRowActions.js.map +1 -1
  61. package/dist/esm/src/components/Table/hooks/plugins/useRowSelect.js +3 -3
  62. package/dist/esm/src/components/Table/hooks/plugins/useRowSelect.js.map +1 -1
  63. package/dist/esm/src/components/Table/util/renderColumn.js +4 -3
  64. package/dist/esm/src/components/Table/util/renderColumn.js.map +1 -1
  65. package/dist/esm/src/components/Table/util/renderRow.js +4 -3
  66. package/dist/esm/src/components/Table/util/renderRow.js.map +1 -1
  67. package/dist/esm/src/components/Tabs/Tabs.js.map +1 -1
  68. package/dist/esm/src/components/Toast/Toast.js +1 -1
  69. package/dist/esm/src/components/Tooltip/Tooltip.js +11 -10
  70. package/dist/esm/src/components/Tooltip/Tooltip.js.map +1 -1
  71. package/dist/esm/src/components/Tour/Tour.js +2 -2
  72. package/dist/esm/src/components/Treeview/Treeview.js.map +1 -1
  73. package/dist/esm/src/index.js +7 -7
  74. package/dist/esm/src/primitives/Button.js +2 -12
  75. package/dist/esm/src/primitives/Button.js.map +1 -1
  76. package/dist/esm/src/utils/mergeRefs.js +14 -0
  77. package/dist/esm/src/utils/mergeRefs.js.map +1 -0
  78. package/dist/index.css +70 -93
  79. package/dist/primitives/Button.d.ts +0 -4
  80. package/dist/taco.cjs.development.js +1629 -1565
  81. package/dist/taco.cjs.development.js.map +1 -1
  82. package/dist/taco.cjs.production.min.js +1 -1
  83. package/dist/taco.cjs.production.min.js.map +1 -1
  84. package/dist/utils/mergeRefs.d.ts +2 -0
  85. package/package.json +4 -3
  86. package/types.json +7309 -0
@@ -1,24 +1,25 @@
1
1
  import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
- import { createElement } from 'react';
2
+ import { forwardRef, createElement } from 'react';
3
3
  import { Root, Trigger, Content, Arrow } from '@radix-ui/react-tooltip';
4
4
 
5
5
  var _excluded = ["title", "children", "placement"];
6
- var Tooltip = function Tooltip(_ref) {
7
- var title = _ref.title,
8
- children = _ref.children,
9
- placement = _ref.placement,
10
- otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
6
+ var Tooltip = /*#__PURE__*/forwardRef(function (props, ref) {
7
+ var title = props.title,
8
+ children = props.children,
9
+ placement = props.placement,
10
+ otherProps = _objectWithoutPropertiesLoose(props, _excluded);
11
11
 
12
12
  return createElement(Root, {
13
13
  delayDuration: 50
14
14
  }, createElement(Trigger, {
15
- asChild: true
15
+ asChild: true,
16
+ ref: ref
16
17
  }, children), createElement(Content, Object.assign({}, otherProps, {
17
18
  asChild: true,
18
19
  side: placement,
19
- sideOffset: 5
20
+ sideOffset: 3
20
21
  }), createElement("div", {
21
- className: "px-2 py-1 rounded-sm wcag-purple text-xs font-bold animate-[fade-in_150ms]",
22
+ className: "wcag-purple animate-[fade-in_150ms] rounded-sm px-2 py-1 text-xs font-bold",
22
23
  "data-taco": "tooltip",
23
24
  style: {
24
25
  transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
@@ -26,7 +27,7 @@ var Tooltip = function Tooltip(_ref) {
26
27
  }, createElement(Arrow, {
27
28
  className: "fill-purple stroke-purple"
28
29
  }), title)));
29
- };
30
+ });
30
31
 
31
32
  export { Tooltip };
32
33
  //# sourceMappingURL=Tooltip.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tooltip.js","sources":["../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = ({ title, children, placement, ...otherProps }: TooltipProps) => (\n <TooltipPrimitive.Root delayDuration={50}>\n <TooltipPrimitive.Trigger asChild>{children}</TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content {...otherProps} asChild side={placement} sideOffset={5}>\n <div\n className=\"px-2 py-1 rounded-sm wcag-purple text-xs font-bold animate-[fade-in_150ms]\"\n data-taco=\"tooltip\"\n style={{\n transformOrigin: 'var(--radix-tooltip-content-transform-origin)',\n }}\n >\n <TooltipPrimitive.Arrow className=\"fill-purple stroke-purple\" />\n {title}\n </div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Root>\n);\n"],"names":["Tooltip","title","children","placement","otherProps","React","TooltipPrimitive","delayDuration","asChild","side","sideOffset","className","style","transformOrigin"],"mappings":";;;;;IAeaA,OAAO,GAAG,SAAVA,OAAU;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,MAAUC,QAAV,QAAUA,QAAV;AAAA,MAAoBC,SAApB,QAAoBA,SAApB;AAAA,MAAkCC,UAAlC;;AAAA,SACnBC,aAAA,CAACC,IAAD;AAAuBC,IAAAA,aAAa,EAAE;GAAtC,EACIF,aAAA,CAACC,OAAD;AAA0BE,IAAAA,OAAO;GAAjC,EAAmCN,QAAnC,CADJ,EAEIG,aAAA,CAACC,OAAD,oBAA8BF;AAAYI,IAAAA,OAAO;AAACC,IAAAA,IAAI,EAAEN;AAAWO,IAAAA,UAAU,EAAE;IAA/E,EACIL,aAAA,MAAA;AACIM,IAAAA,SAAS,EAAC;iBACA;AACVC,IAAAA,KAAK,EAAE;AACHC,MAAAA,eAAe,EAAE;AADd;GAHX,EAOIR,aAAA,CAACC,KAAD;AAAwBK,IAAAA,SAAS,EAAC;GAAlC,CAPJ,EAQKV,KARL,CADJ,CAFJ,CADmB;AAAA;;;;"}
1
+ {"version":3,"file":"Tooltip.js","sources":["../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = React.forwardRef((props: TooltipProps, ref: React.Ref<HTMLElement>) => {\n const { title, children, placement, ...otherProps } = props;\n\n return (\n <TooltipPrimitive.Root delayDuration={50}>\n <TooltipPrimitive.Trigger asChild ref={ref as any}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Content {...otherProps} asChild side={placement} sideOffset={3}>\n <div\n className=\"wcag-purple animate-[fade-in_150ms] rounded-sm px-2 py-1 text-xs font-bold\"\n data-taco=\"tooltip\"\n style={{\n transformOrigin: 'var(--radix-tooltip-content-transform-origin)',\n }}\n >\n <TooltipPrimitive.Arrow className=\"fill-purple stroke-purple\" />\n {title}\n </div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Root>\n );\n});\n"],"names":["Tooltip","React","props","ref","title","children","placement","otherProps","TooltipPrimitive","delayDuration","asChild","side","sideOffset","className","style","transformOrigin"],"mappings":";;;;;IAeaA,OAAO,gBAAGC,UAAA,CAAiB,UAACC,KAAD,EAAsBC,GAAtB;AACpC,MAAQC,KAAR,GAAsDF,KAAtD,CAAQE,KAAR;AAAA,MAAeC,QAAf,GAAsDH,KAAtD,CAAeG,QAAf;AAAA,MAAyBC,SAAzB,GAAsDJ,KAAtD,CAAyBI,SAAzB;AAAA,MAAuCC,UAAvC,iCAAsDL,KAAtD;;AAEA,SACID,aAAA,CAACO,IAAD;AAAuBC,IAAAA,aAAa,EAAE;GAAtC,EACIR,aAAA,CAACO,OAAD;AAA0BE,IAAAA,OAAO;AAACP,IAAAA,GAAG,EAAEA;GAAvC,EACKE,QADL,CADJ,EAIIJ,aAAA,CAACO,OAAD,oBAA8BD;AAAYG,IAAAA,OAAO;AAACC,IAAAA,IAAI,EAAEL;AAAWM,IAAAA,UAAU,EAAE;IAA/E,EACIX,aAAA,MAAA;AACIY,IAAAA,SAAS,EAAC;iBACA;AACVC,IAAAA,KAAK,EAAE;AACHC,MAAAA,eAAe,EAAE;AADd;GAHX,EAOId,aAAA,CAACO,KAAD;AAAwBK,IAAAA,SAAS,EAAC;GAAlC,CAPJ,EAQKT,KARL,CADJ,CAJJ,CADJ;AAmBH,CAtBsB;;;;"}
@@ -1,10 +1,10 @@
1
1
  import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import React__default, { useMemo } from 'react';
3
+ import { useLocalization } from '../Provider/Provider.js';
4
+ import { Group } from '../Group/Group.js';
3
5
  import { IconButton } from '../IconButton/IconButton.js';
4
6
  import { Button } from '../Button/Button.js';
5
- import { useLocalization } from '../Provider/Provider.js';
6
7
  import keycode from 'keycode';
7
- import { Group } from '../Group/Group.js';
8
8
  import Joyride, { ACTIONS, LIFECYCLE, EVENTS } from 'react-joyride';
9
9
  import { theme as tailwind_config_1 } from '../../../tailwind.config.js';
10
10
 
@@ -1 +1 @@
1
- {"version":3,"file":"Treeview.js","sources":["../../../../../src/components/Treeview/Treeview.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nexport type TreeviewItemProps = React.LinkHTMLAttributes<HTMLAnchorElement>;\n\nconst TreeviewItem = React.forwardRef((props: TreeviewItemProps, ref: React.Ref<HTMLAnchorElement>) => {\n return <a {...props} ref={ref} />;\n});\n\nexport type TreeviewGroupProps = Omit<React.LinkHTMLAttributes<HTMLDivElement>, 'className' | 'onClick' | 'title'> & {\n /** Add a classname to the treeview */\n className?: string | ((expanded: boolean) => string);\n /**\n * Set wheter the region is expanded, showing the children, or collapsed.\n * Default value is `false`\n */\n expanded?: boolean;\n /** Region is expanded at mount and can't be collapsed */\n fixed?: boolean;\n /** Handler called when user clicks the title of the group */\n onClick?: (event: React.MouseEvent<HTMLDivElement>, expanded: boolean) => void;\n /** Text displayed in the group's header */\n title: React.ReactNode | ((expanded: boolean) => React.ReactNode);\n};\n\nconst TreeviewGroup = React.forwardRef((props: TreeviewGroupProps, ref: React.Ref<HTMLDivElement>) => {\n const {\n children,\n className: externalClassName,\n expanded: initialExpanded = false,\n title,\n fixed,\n onClick,\n ...otherProps\n } = props;\n const [expanded, setExpanded] = React.useState(fixed || initialExpanded);\n\n React.useEffect(() => {\n if (!fixed) {\n setExpanded(fixed || initialExpanded);\n }\n }, [fixed, initialExpanded]);\n\n const listClassName = cn('flex-col mb-0', {\n flex: expanded,\n hidden: !expanded,\n });\n\n const itemProps = {\n ...otherProps,\n 'aria-expanded': expanded,\n role: 'treeitem',\n tabIndex: -1,\n };\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\n const nextState = !expanded;\n\n if (!fixed) {\n setExpanded(nextState);\n }\n\n if (onClick) {\n onClick(event, nextState);\n }\n };\n\n const className = typeof externalClassName === 'function' ? externalClassName(expanded) : externalClassName;\n\n return (\n <div {...itemProps} className={className} ref={ref}>\n <div onClick={handleClick}>{typeof title === 'function' ? title(expanded) : title}</div>\n <ul role=\"group\" className={listClassName}>\n {React.Children.toArray(children)\n .filter(item => !!item)\n .map((item, i) => (\n <li key={i} role=\"none\">\n {React.cloneElement(item as React.ReactElement<any>, { role: 'treeitem' })}\n </li>\n ))}\n </ul>\n </div>\n );\n});\n\nexport type TreeviewProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport type FowardedTreeviewWithStatics = React.ForwardRefExoticComponent<TreeviewProps & React.RefAttributes<HTMLDivElement>> & {\n /** Navigable link */\n Item: React.ForwardRefExoticComponent<TreeviewItemProps & React.RefAttributes<HTMLAnchorElement>>;\n /** Container for a set of related links, usually expandable */\n Group: React.ForwardRefExoticComponent<TreeviewGroupProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Treeview = React.forwardRef((props: TreeviewProps, ref: React.Ref<HTMLDivElement>) => {\n return <div {...props} ref={ref} role=\"tree\" />;\n}) as FowardedTreeviewWithStatics;\n\nTreeview.Group = TreeviewGroup;\nTreeview.Item = TreeviewItem;\n"],"names":["TreeviewItem","React","forwardRef","props","ref","TreeviewGroup","children","externalClassName","className","expanded","initialExpanded","title","fixed","onClick","otherProps","useState","setExpanded","useEffect","listClassName","cn","flex","hidden","itemProps","role","tabIndex","handleClick","event","nextState","Children","toArray","filter","item","map","i","key","cloneElement","Treeview","Group","Item"],"mappings":";;;;;AAKA,IAAMA,YAAY,gBAAGC,cAAK,CAACC,UAAN,CAAiB,UAACC,KAAD,EAA2BC,GAA3B;AAClC,SAAOH,4BAAA,IAAA,oBAAOE;AAAOC,IAAAA,GAAG,EAAEA;IAAnB,CAAP;AACH,CAFoB,CAArB;AAoBA,IAAMC,aAAa,gBAAGJ,cAAK,CAACC,UAAN,CAAiB,UAACC,KAAD,EAA4BC,GAA5B;AACnC,MACIE,QADJ,GAQIH,KARJ,CACIG,QADJ;AAAA,MAEeC,iBAFf,GAQIJ,KARJ,CAEIK,SAFJ;AAAA,wBAQIL,KARJ,CAGIM,QAHJ;AAAA,MAGcC,eAHd,gCAGgC,KAHhC;AAAA,MAIIC,KAJJ,GAQIR,KARJ,CAIIQ,KAJJ;AAAA,MAKIC,KALJ,GAQIT,KARJ,CAKIS,KALJ;AAAA,MAMIC,OANJ,GAQIV,KARJ,CAMIU,OANJ;AAAA,MAOOC,UAPP,iCAQIX,KARJ;;AASA,wBAAgCF,cAAK,CAACc,QAAN,CAAeH,KAAK,IAAIF,eAAxB,CAAhC;AAAA,MAAOD,QAAP;AAAA,MAAiBO,WAAjB;;AAEAf,EAAAA,cAAK,CAACgB,SAAN,CAAgB;AACZ,QAAI,CAACL,KAAL,EAAY;AACRI,MAAAA,WAAW,CAACJ,KAAK,IAAIF,eAAV,CAAX;AACH;AACJ,GAJD,EAIG,CAACE,KAAD,EAAQF,eAAR,CAJH;AAMA,MAAMQ,aAAa,GAAGC,EAAE,CAAC,eAAD,EAAkB;AACtCC,IAAAA,IAAI,EAAEX,QADgC;AAEtCY,IAAAA,MAAM,EAAE,CAACZ;AAF6B,GAAlB,CAAxB;;AAKA,MAAMa,SAAS,gBACRR,UADQ;AAEX,qBAAiBL,Q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AAiB,UAACC,KAAD,EAAuBC,GAAvB;AACrC,SAAOH,4BAAA,MAAA,oBAASE;AAAOC,IAAAA,GAAG,EAAEA;AAAKmB,IAAAA,IAAI,EAAC;IAA/B,CAAP;AACH,CAFuB;AAIxBa,QAAQ,CAACC,KAAT,GAAiBhC,aAAjB;AACA+B,QAAQ,CAACE,IAAT,GAAgBtC,YAAhB;;;;"}
1
+ {"version":3,"file":"Treeview.js","sources":["../../../../../src/components/Treeview/Treeview.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nexport type TreeviewItemProps = React.LinkHTMLAttributes<HTMLAnchorElement>;\n\nconst TreeviewItem = React.forwardRef((props: TreeviewItemProps, ref: React.Ref<HTMLAnchorElement>) => {\n return <a {...props} ref={ref} />;\n});\n\nexport type TreeviewGroupProps = Omit<React.LinkHTMLAttributes<HTMLDivElement>, 'className' | 'onClick' | 'title'> & {\n /** Add a classname to the treeview */\n className?: string | ((expanded: boolean) => string);\n /**\n * Set wheter the region is expanded, showing the children, or collapsed.\n * Default value is `false`\n */\n expanded?: boolean;\n /** Region is expanded at mount and can't be collapsed */\n fixed?: boolean;\n /** Handler called when user clicks the title of the group */\n onClick?: (event: React.MouseEvent<HTMLDivElement>, expanded: boolean) => void;\n /** Text displayed in the group's header */\n title: React.ReactNode | ((expanded: boolean) => React.ReactNode);\n};\n\nconst TreeviewGroup = React.forwardRef((props: TreeviewGroupProps, ref: React.Ref<HTMLDivElement>) => {\n const {\n children,\n className: externalClassName,\n expanded: initialExpanded = false,\n title,\n fixed,\n onClick,\n ...otherProps\n } = props;\n const [expanded, setExpanded] = React.useState(fixed || initialExpanded);\n\n React.useEffect(() => {\n if (!fixed) {\n setExpanded(fixed || initialExpanded);\n }\n }, [fixed, initialExpanded]);\n\n const listClassName = cn('flex-col mb-0', {\n flex: expanded,\n hidden: !expanded,\n });\n\n const itemProps = {\n ...otherProps,\n 'aria-expanded': expanded,\n role: 'treeitem',\n tabIndex: -1,\n };\n\n const handleClick = (event: React.MouseEvent<HTMLDivElement>): void => {\n const nextState = !expanded;\n\n if (!fixed) {\n setExpanded(nextState);\n }\n\n if (onClick) {\n onClick(event, nextState);\n }\n };\n\n const className = typeof externalClassName === 'function' ? externalClassName(expanded) : externalClassName;\n\n return (\n <div {...itemProps} className={className} ref={ref}>\n <div onClick={handleClick}>{typeof title === 'function' ? title(expanded) : title}</div>\n <ul role=\"group\" className={listClassName}>\n {React.Children.toArray(children)\n .filter(item => !!item)\n .map((item, i) => (\n <li key={i} role=\"none\">\n {React.cloneElement(item as React.ReactElement<any>, { role: 'treeitem' })}\n </li>\n ))}\n </ul>\n </div>\n );\n});\n\nexport type TreeviewProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport type ForwardedTreeviewWithStatics = React.ForwardRefExoticComponent<\n TreeviewProps & React.RefAttributes<HTMLDivElement>\n> & {\n /** Navigable link */\n Item: React.ForwardRefExoticComponent<TreeviewItemProps & React.RefAttributes<HTMLAnchorElement>>;\n /** Container for a set of related links, usually expandable */\n Group: React.ForwardRefExoticComponent<TreeviewGroupProps & React.RefAttributes<HTMLDivElement>>;\n};\n\nexport const Treeview = React.forwardRef((props: TreeviewProps, ref: React.Ref<HTMLDivElement>) => {\n return <div {...props} ref={ref} role=\"tree\" />;\n}) as ForwardedTreeviewWithStatics;\n\nTreeview.Group = TreeviewGroup;\nTreeview.Item = TreeviewItem;\n"],"names":["TreeviewItem","React","forwardRef","props","ref","TreeviewGroup","children","externalClassName","className","expanded","initialExpanded","title","fixed","onClick","otherProps","useState","setExpanded","useEffect","listClassName","cn","flex","hidden","itemProps","role","tabIndex","handleClick","event","nextState","Children","toArray","filter","item","map","i","key","cloneElement","Treeview","Group","Item"],"mappings":";;;;;AAKA,IAAMA,YAAY,gBAAGC,cAAK,CAACC,UAAN,CAAiB,UAACC,KAAD,EAA2BC,GAA3B;AAClC,SAAOH,4BAAA,IAAA,oBAAOE;AAAOC,IAAAA,GAAG,EAAEA;IAAnB,CAAP;AACH,CAFoB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den/VisuallyHidden.js';
5
5
  export { Badge } from './components/Badge/Badge.js';
6
6
  export { Tooltip } from './components/Tooltip/Tooltip.js';
7
- export { IconButton } from './components/IconButton/IconButton.js';
8
- export { Banner } from './components/Banner/Banner.js';
9
- export { Button } from './components/Button/Button.js';
10
7
  export { Spinner } from './components/Spinner/Spinner.js';
11
8
  export { ToastProvider, useToast } from './components/Toast/Toaster.js';
12
9
  export { Provider, defaultLocalisationTexts, useLocalization, useTaco } from './components/Provider/Provider.js';
10
+ export { Hanger } from './components/Hanger/Hanger.js';
11
+ export { Group } from './components/Group/Group.js';
12
+ export { Dialog } from './components/Dialog/Dialog.js';
13
+ export { Popover } from './components/Popover/Popover.js';
14
+ export { IconButton } from './components/IconButton/IconButton.js';
15
+ export { Banner } from './components/Banner/Banner.js';
16
+ export { Button } from './components/Button/Button.js';
13
17
  export { Calendar } from './components/Calendar/Calendar.js';
14
18
  export { Checkbox } from './components/Checkbox/Checkbox.js';
15
19
  export { Input } from './components/Input/Input.js';
@@ -17,12 +21,8 @@ export { getNextIndexFromKeycode, useListKeyboardNavigation } from './utils/hook
17
21
  export { useListScrollTo } from './utils/hooks/useListScrollTo.js';
18
22
  export { Combobox } from './components/Combobox/Combobox.js';
19
23
  export { format, parseFromCustomString, parseFromISOString } from './utils/date.js';
20
- export { Popover } from './components/Popover/Popover.js';
21
24
  export { Datepicker } from './components/Datepicker/Datepicker.js';
22
- export { Group } from './components/Group/Group.js';
23
- export { Dialog } from './components/Dialog/Dialog.js';
24
25
  export { Form } from './components/Form/Form.js';
25
- export { Hanger } from './components/Hanger/Hanger.js';
26
26
  export { SearchInput } from './components/SearchInput/SearchInput.js';
27
27
  export { Label } from './components/Label/Label.js';
28
28
  export { Listbox, MultiListbox } from './components/Listbox/Listbox.js';
@@ -1,18 +1,16 @@
1
1
  import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
2
2
  import { forwardRef, createElement, Children } from 'react';
3
- import { Tooltip } from '../components/Tooltip/Tooltip.js';
4
3
 
5
- var _excluded = ["disabled", "target", "tooltip", "type"];
4
+ var _excluded = ["disabled", "target", "type"];
6
5
  var Button = /*#__PURE__*/forwardRef(function Button(props, ref) {
7
6
  var disabled = props.disabled,
8
7
  target = props.target,
9
- tooltip = props.tooltip,
10
8
  _props$type = props.type,
11
9
  type = _props$type === void 0 ? 'button' : _props$type,
12
10
  otherProps = _objectWithoutPropertiesLoose(props, _excluded);
13
11
 
14
12
  var Tag = props.href ? 'a' : 'button';
15
- var button = createElement(Tag, Object.assign({}, otherProps, {
13
+ return createElement(Tag, Object.assign({}, otherProps, {
16
14
  "aria-disabled": disabled ? 'true' : undefined,
17
15
  disabled: disabled,
18
16
  target: Tag === 'a' ? target : undefined,
@@ -21,14 +19,6 @@ var Button = /*#__PURE__*/forwardRef(function Button(props, ref) {
21
19
  }), Children.count(props.children) > 1 ? Children.map(props.children, function (child) {
22
20
  return typeof child === 'string' ? createElement("span", null, child) : child;
23
21
  }) : props.children);
24
-
25
- if (tooltip) {
26
- return createElement(Tooltip, {
27
- title: tooltip
28
- }, button);
29
- }
30
-
31
- return button;
32
22
  });
33
23
 
34
24
  export { Button };
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../src/primitives/Button.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Tooltip } from '../components/Tooltip/Tooltip';\n\ntype ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> & {\n /** Content should be a text */\n children: React.ReactNode;\n /** Provides url for buttons being used as a link */\n href?: string;\n /** Provides target for buttons being used as a link */\n target?: '_self' | '_blank' | '_parent' | '_top';\n /** A tooltip to show when hovering over the button */\n tooltip?: string;\n};\n\nconst Button = React.forwardRef(function Button(props: ButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) {\n const { disabled, target, tooltip, type = 'button', ...otherProps } = props;\n\n const Tag = props.href ? 'a' : 'button';\n\n const button = (\n <Tag\n {...otherProps}\n aria-disabled={disabled ? 'true' : undefined}\n disabled={disabled}\n target={Tag === 'a' ? target : undefined}\n type={Tag !== 'a' ? type : undefined}\n ref={ref as any}\n >\n {React.Children.count(props.children) > 1\n ? React.Children.map(props.children, child => (typeof child === 'string' ? <span>{child}</span> : child))\n : props.children}\n </Tag>\n );\n\n if (tooltip) {\n return <Tooltip title={tooltip}>{button}</Tooltip>;\n }\n\n return button;\n});\n\nexport { Button, ButtonProps };\n"],"names":["Button","React","props","ref","disabled","target","tooltip","type","otherProps","Tag","href","button","undefined","count","children","map","child","Tooltip","title"],"mappings":";;;;;IAcMA,MAAM,gBAAGC,UAAA,CAAiB,SAASD,MAAT,CAAgBE,KAAhB,EAAoCC,GAApC;AAC5B,MAAQC,QAAR,GAAsEF,KAAtE,CAAQE,QAAR;AAAA,MAAkBC,MAAlB,GAAsEH,KAAtE,CAAkBG,MAAlB;AAAA,MAA0BC,OAA1B,GAAsEJ,KAAtE,CAA0BI,OAA1B;AAAA,oBAAsEJ,KAAtE,CAAmCK,IAAnC;AAAA,MAAmCA,IAAnC,4BAA0C,QAA1C;AAAA,MAAuDC,UAAvD,iCAAsEN,KAAtE;;AAEA,MAAMO,GAAG,GAAGP,KAAK,CAACQ,IAAN,GAAa,GAAb,GAAmB,QAA/B;AAEA,MAAMC,MAAM,GACRV,aAAA,CAACQ,GAAD,oBACQD;qBACWJ,QAAQ,GAAG,MAAH,GAAYQ;AACnCR,IAAAA,QAAQ,EAAEA;AACVC,IAAAA,MAAM,EAAEI,GAAG,KAAK,GAAR,GAAcJ,MAAd,GAAuBO;AAC/BL,IAAAA,IAAI,EAAEE,GAAG,KAAK,GAAR,GAAcF,IAAd,GAAqBK;AAC3BT,IAAAA,GAAG,EAAEA;IANT,EAQKF,QAAA,CAAeY,KAAf,CAAqBX,KAAK,CAACY,QAA3B,IAAuC,CAAvC,GACKb,QAAA,CAAec,GAAf,CAAmBb,KAAK,CAACY,QAAzB,EAAmC,UAAAE,KAAK;AAAA,WAAK,OAAOA,KAAP,KAAiB,QAAjB,GAA4Bf,aAAA,OAAA,MAAA,EAAOe,KAAP,CAA5B,GAAmDA,KAAxD;AAAA,GAAxC,CADL,GAEKd,KAAK,CAACY,QAVhB,CADJ;;AAeA,MAAIR,OAAJ,EAAa;AACT,WAAOL,aAAA,CAACgB,OAAD;AAASC,MAAAA,KAAK,EAAEZ;KAAhB,EAA0BK,MAA1B,CAAP;AACH;;AAED,SAAOA,MAAP;AACH,CAzBc;;;;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../src/primitives/Button.tsx"],"sourcesContent":["import * as React from 'react';\n\ntype ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> & {\n /** Content should be a text */\n children: React.ReactNode;\n /** Provides url for buttons being used as a link */\n href?: string;\n /** Provides target for buttons being used as a link */\n target?: '_self' | '_blank' | '_parent' | '_top';\n};\n\nconst Button = React.forwardRef(function Button(props: ButtonProps, ref: React.Ref<HTMLButtonElement | HTMLAnchorElement>) {\n const { disabled, target, type = 'button', ...otherProps } = props;\n\n const Tag = props.href ? 'a' : 'button';\n\n return (\n <Tag\n {...otherProps}\n aria-disabled={disabled ? 'true' : undefined}\n disabled={disabled}\n target={Tag === 'a' ? target : undefined}\n type={Tag !== 'a' ? type : undefined}\n ref={ref as any}\n >\n {React.Children.count(props.children) > 1\n ? React.Children.map(props.children, child => (typeof child === 'string' ? <span>{child}</span> : child))\n : props.children}\n </Tag>\n );\n});\n\nexport { Button, ButtonProps };\n"],"names":["Button","React","props","ref","disabled","target","type","otherProps","Tag","href","undefined","count","children","map","child"],"mappings":";;;;IAWMA,MAAM,gBAAGC,UAAA,CAAiB,SAASD,MAAT,CAAgBE,KAAhB,EAAoCC,GAApC;AAC5B,MAAQC,QAAR,GAA6DF,KAA7D,CAAQE,QAAR;AAAA,MAAkBC,MAAlB,GAA6DH,KAA7D,CAAkBG,MAAlB;AAAA,oBAA6DH,KAA7D,CAA0BI,IAA1B;AAAA,MAA0BA,IAA1B,4BAAiC,QAAjC;AAAA,MAA8CC,UAA9C,iCAA6DL,KAA7D;;AAEA,MAAMM,GAAG,GAAGN,KAAK,CAACO,IAAN,GAAa,GAAb,GAAmB,QAA/B;AAEA,SACIR,aAAA,CAACO,GAAD,oBACQD;qBACWH,QAAQ,GAAG,MAAH,GAAYM;AACnCN,IAAAA,QAAQ,EAAEA;AACVC,IAAAA,MAAM,EAAEG,GAAG,KAAK,GAAR,GAAcH,MAAd,GAAuBK;AAC/BJ,IAAAA,IAAI,EAAEE,GAAG,KAAK,GAAR,GAAcF,IAAd,GAAqBI;AAC3BP,IAAAA,GAAG,EAAEA;IANT,EAQKF,QAAA,CAAeU,KAAf,CAAqBT,KAAK,CAACU,QAA3B,IAAuC,CAAvC,GACKX,QAAA,CAAeY,GAAf,CAAmBX,KAAK,CAACU,QAAzB,EAAmC,UAAAE,KAAK;AAAA,WAAK,OAAOA,KAAP,KAAiB,QAAjB,GAA4Bb,aAAA,OAAA,MAAA,EAAOa,KAAP,CAA5B,GAAmDA,KAAxD;AAAA,GAAxC,CADL,GAEKZ,KAAK,CAACU,QAVhB,CADJ;AAcH,CAnBc;;;;"}
@@ -0,0 +1,14 @@
1
+ function mergeRefs(refs) {
2
+ return function (value) {
3
+ refs.forEach(function (ref) {
4
+ if (typeof ref === 'function') {
5
+ ref(value);
6
+ } else if (ref != null) {
7
+ ref.current = value;
8
+ }
9
+ });
10
+ };
11
+ }
12
+
13
+ export default mergeRefs;
14
+ //# sourceMappingURL=mergeRefs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mergeRefs.js","sources":["../../../../src/utils/mergeRefs.ts"],"sourcesContent":["import React from 'react';\n\nexport default function mergeRefs<T = any>(refs: Array<React.MutableRefObject<T> | React.LegacyRef<T>>): React.RefCallback<T> {\n return value => {\n refs.forEach(ref => {\n if (typeof ref === 'function') {\n ref(value);\n } else if (ref != null) {\n (ref as React.MutableRefObject<T | null>).current = value;\n }\n });\n };\n}\n"],"names":["mergeRefs","refs","value","forEach","ref","current"],"mappings":"SAEwBA,UAAmBC;AACvC,SAAO,UAAAC,KAAK;AACRD,IAAAA,IAAI,CAACE,OAAL,CAAa,UAAAC,GAAG;AACZ,UAAI,OAAOA,GAAP,KAAe,UAAnB,EAA+B;AAC3BA,QAAAA,GAAG,CAACF,KAAD,CAAH;AACH,OAFD,MAEO,IAAIE,GAAG,IAAI,IAAX,EAAiB;AACnBA,QAAAA,GAAwC,CAACC,OAAzC,GAAmDH,KAAnD;AACJ;AACJ,KAND;AAOH,GARD;AASH;;;;"}
package/dist/index.css CHANGED
@@ -155,14 +155,6 @@
155
155
  @apply max-h-full p-0;
156
156
  }
157
157
 
158
- [data-taco='button'] > [data-taco='icon'] {
159
- @apply pointer-events-none -ml-2 mr-1 -mt-2 -mb-2 inline p-px;
160
- }
161
-
162
- [data-taco='button'] > span + [data-taco='icon'] {
163
- @apply ml-1 -mr-2;
164
- }
165
-
166
158
  [data-taco='spinner'] svg circle {
167
159
  @apply flex;
168
160
  fill: transparent;
@@ -234,6 +226,51 @@
234
226
  @apply -mt-px py-0 px-2;
235
227
  }
236
228
 
229
+ [data-taco='hanger'] a {
230
+ @apply text-grey underline;
231
+ }
232
+
233
+ [data-taco='hanger'] > *:last-child {
234
+ @apply mb-0;
235
+ }
236
+
237
+ .yt-dialog__drag::before,
238
+ .yt-dialog__drag::after {
239
+ @apply absolute bg-grey-dark rounded;
240
+ content: '';
241
+ left: theme('spacing.1');
242
+ height: 2px;
243
+ width: calc(100% - (2 * theme('spacing.1')));
244
+ }
245
+
246
+ .yt-dialog__drag::before {
247
+ top: 3px;
248
+ }
249
+
250
+ .yt-dialog__drag::after {
251
+ bottom: 3px;
252
+ }
253
+
254
+ .yt-dialog *:last-child {
255
+ @apply mb-0;
256
+ }
257
+
258
+ [data-taco='group'] > [data-taco='badge'] + [data-taco='badge'] {
259
+ @apply ml-1;
260
+ }
261
+
262
+ [data-taco='group'] > *:not(:first-child):not([data-taco='hanger']) {
263
+ @apply ml-2;
264
+ }
265
+
266
+ [data-taco='button'] > [data-taco='icon'] {
267
+ @apply pointer-events-none -ml-2 mr-1 -mt-2 -mb-2 inline p-px;
268
+ }
269
+
270
+ [data-taco='button'] > span + [data-taco='icon'] {
271
+ @apply ml-1 -mr-2;
272
+ }
273
+
237
274
  [data-taco='calendar'] .DayPicker-wrapper {
238
275
  @apply relative select-none flex-row;
239
276
  }
@@ -395,35 +432,6 @@
395
432
  @apply border-blue;
396
433
  }
397
434
 
398
- .yt-dialog__drag::before,
399
- .yt-dialog__drag::after {
400
- @apply absolute bg-grey-dark rounded;
401
- content: '';
402
- left: theme('spacing.1');
403
- height: 2px;
404
- width: calc(100% - (2 * theme('spacing.1')));
405
- }
406
-
407
- .yt-dialog__drag::before {
408
- top: 3px;
409
- }
410
-
411
- .yt-dialog__drag::after {
412
- bottom: 3px;
413
- }
414
-
415
- .yt-dialog *:last-child {
416
- @apply mb-0;
417
- }
418
-
419
- [data-taco='group'] > [data-taco='badge'] + [data-taco='badge'] {
420
- @apply ml-1;
421
- }
422
-
423
- [data-taco='group'] > *:not(:first-child):not([data-taco='hanger']) {
424
- @apply ml-2;
425
- }
426
-
427
435
  .yt-form > [data-taco='button'] {
428
436
  @apply mr-3;
429
437
  }
@@ -440,14 +448,6 @@
440
448
  @apply mt-6;
441
449
  }
442
450
 
443
- [data-taco='hanger'] a {
444
- @apply text-grey underline;
445
- }
446
-
447
- [data-taco='hanger'] > *:last-child {
448
- @apply mb-0;
449
- }
450
-
451
451
  /* label inside label is invalid html, but the client is littered with it */
452
452
  [data-taco='label'] [data-taco='label'] {
453
453
  min-height: 0;
@@ -517,7 +517,7 @@
517
517
  }
518
518
 
519
519
  [data-taco='select'] > button.yt-input .yt-icon {
520
- @apply pointer-events-none text-black;
520
+ @apply pointer-events-none;
521
521
  }
522
522
 
523
523
  [data-taco='select'] > button.yt-input[disabled] .yt-icon {
@@ -528,12 +528,6 @@
528
528
  @apply cursor-not-allowed;
529
529
  }
530
530
 
531
- [data-taco='select']:hover > button.yt-input .yt-icon,
532
- [data-taco='select'] > button.yt-input:hover .yt-icon,
533
- [data-taco='select'] > button.yt-input .yt-icon:hover {
534
- @apply text-grey-darkest;
535
- }
536
-
537
531
  [data-taco='select'] > button.yt-input[aria-expanded='true'],
538
532
  [data-taco='select'] > button.yt-input[aria-expanded='true']:hover {
539
533
  @apply border-blue;
@@ -584,81 +578,73 @@
584
578
  }
585
579
 
586
580
  .yt-table:focus {
587
- @apply rounded-sm yt-focus;
581
+ @apply yt-focus rounded-sm;
588
582
  }
589
583
 
590
584
  /* rows */
591
585
  .yt-table__row {
592
- @apply border-b border-grey-light flex;
586
+ @apply border-grey-light flex border-b;
593
587
  min-height: 2.5rem;
594
588
  }
595
589
 
596
590
  /* cells */
597
591
  .yt-table__cell {
598
- @apply flex-1 p-2 align-middle text-center truncate;
599
- }
600
-
601
- .yt-table__cell.yt-table__cell__actions {
602
- @apply flex justify-end px-1 overflow-visible;
592
+ @apply flex-1 truncate p-2 text-center align-middle;
603
593
  }
604
594
 
605
- .yt-table__cell > .yt-button,
606
- .yt-table__cell .yt-group > .yt-button {
607
- @apply -mt-1 -mb-1;
608
- }
609
-
610
- .yt-table__cell.yt-table__cell__actions .yt-group > *:not(:first-child):not(.yt-hanger):not(.yt-menu) {
611
- @apply ml-0;
595
+ .yt-table__cell > [data-taco='button'],
596
+ .yt-table__cell > [data-taco='icon-button'] {
597
+ @apply -mt-1 -mb-1 flex;
612
598
  }
613
599
 
614
600
  .yt-table__cell.yt-table__cell--draggable {
615
601
  @apply flex-col px-0;
616
602
  }
617
603
 
618
- .yt-table__cell.yt-table__cell--draggable .yt-icon {
619
- @apply cursor-grab invisible text-grey-darkest;
604
+ .yt-table__cell.yt-table__cell--draggable [data-taco='icon'] {
605
+ @apply text-grey-darkest invisible cursor-grab;
620
606
  width: 20px;
621
607
  }
622
608
 
623
- .yt-table__row.yt-table__row--dragging .yt-table__cell.yt-table__cell--draggable .yt-icon {
609
+ .yt-table__row.yt-table__row--dragging .yt-table__cell.yt-table__cell--draggable [data-taco='icon'] {
624
610
  @apply text-white;
625
611
  }
626
612
 
627
- .yt-table__cell.yt-table__cell--draggable .yt-icon:active {
613
+ .yt-table__cell.yt-table__cell--draggable [data-taco='icon']:active {
628
614
  @apply cursor-grabbing;
629
615
  }
630
616
 
631
- .yt-table__row:hover .yt-table__cell.yt-table__cell--draggable .yt-icon {
617
+ .yt-table__row:hover .yt-table__cell.yt-table__cell--draggable [data-taco='icon'] {
632
618
  @apply visible;
633
619
  }
634
620
 
635
621
  /* head */
636
622
  .yt-table__head .yt-table__row {
637
- @apply border-t-0 border-b-2 font-bold h-auto w-full select-none;
623
+ @apply h-auto w-full select-none border-t-0 border-b-2 font-bold;
638
624
  }
639
625
 
640
626
  .yt-table__head .yt-table__head__group {
641
- @apply flex flex-wrap flex-1;
627
+ @apply flex flex-1 flex-wrap;
642
628
  }
643
629
 
644
630
  .yt-table__head .yt-table__head__group .yt-table__cell.yt-table__cell__group {
645
- @apply border-b border-grey-light;
631
+ @apply border-grey-light border-b;
646
632
  flex-basis: 100%;
647
633
  }
648
634
 
649
635
  .yt-table__head .yt-table__head__group + .yt-table__head__group {
650
- @apply border-l border-grey-light;
636
+ @apply border-grey-light border-l;
651
637
  }
652
638
 
653
639
  .yt-table__head .yt-table__cell {
654
- @apply flex text-grey-darkest justify-center;
640
+ @apply text-grey-darkest flex justify-center;
655
641
  }
656
642
 
657
643
  .yt-table__head .yt-table__cell > span {
658
644
  @apply truncate;
659
645
  }
660
646
 
661
- .yt-table__head .yt-table__cell > .yt-icon {
647
+ .yt-table__head .yt-table__cell > [data-taco='icon'] {
662
648
  @apply flex-shrink-0;
663
649
  }
664
650
 
@@ -667,7 +653,7 @@
667
653
  }
668
654
 
669
655
  .yt-table__head .yt-table__cell.yt-table__cell__group + .yt-table__cell__group {
670
- @apply border-l-2 border-grey-light;
656
+ @apply border-grey-light border-l-2;
671
657
  }
672
658
 
673
659
  .yt-table__head .yt-table__cell:not(.yt-table__cell--disable-sort) {
@@ -723,35 +709,26 @@
723
709
  overflow-wrap: normal;
724
710
  }
725
711
 
726
- .yt-table__cell .yt-label {
727
- @apply text-transparent pb-0 -my-2;
712
+ .yt-table__cell [data-taco='label'] {
713
+ @apply -my-2 pb-0 text-transparent;
728
714
  min-height: theme('spacing.10');
729
715
  }
730
716
 
731
- .yt-table__cell .yt-label > *:not(.yt-label__message) {
717
+ .yt-table__cell [data-taco='label'] > *:not([data-taco='label']__message) {
732
718
  @apply mt-1;
733
719
  }
734
720
 
735
- .yt-table__body .yt-table__row.yt-table__row--editing .yt-table__cell .yt-label > *:not(.yt-label__message) {
721
+ .yt-table__body .yt-table__row.yt-table__row--editing .yt-table__cell [data-taco='label'] > *:not([data-taco='label']__message) {
736
722
  @apply -mt-5;
737
723
  }
738
724
 
739
- .yt-table__cell .yt-label > .yt-label__message {
725
+ .yt-table__cell [data-taco='label'] > [data-taco='label']__message {
740
726
  @apply mb-1;
741
727
  }
742
728
 
743
729
  /* drag */
744
730
  #yt-table__drag__placeholder {
745
- @apply bg-blue text-white rounded font-bold p-4 flex w-3/12;
746
- }
747
-
748
- /* cell alignment */
749
- .yt-table__cell.yt-table__cell--align-left {
750
- @apply justify-start text-left;
751
- }
752
-
753
- .yt-table__cell.yt-table__cell--align-right {
754
- @apply justify-end text-right;
731
+ @apply bg-blue flex w-3/12 rounded p-4 font-bold text-white;
755
732
  }
756
733
 
757
734
  .yt-tabs .yt-tab__list[aria-orientation='vertical'] {
@@ -6,8 +6,6 @@ declare type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAn
6
6
  href?: string;
7
7
  /** Provides target for buttons being used as a link */
8
8
  target?: '_self' | '_blank' | '_parent' | '_top';
9
- /** A tooltip to show when hovering over the button */
10
- tooltip?: string;
11
9
  };
12
10
  declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement | HTMLAnchorElement> & {
13
11
  /** Content should be a text */
@@ -16,7 +14,5 @@ declare const Button: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes
16
14
  href?: string | undefined;
17
15
  /** Provides target for buttons being used as a link */
18
16
  target?: "_self" | "_blank" | "_parent" | "_top" | undefined;
19
- /** A tooltip to show when hovering over the button */
20
- tooltip?: string | undefined;
21
17
  } & React.RefAttributes<HTMLButtonElement | HTMLAnchorElement>>;
22
18
  export { Button, ButtonProps };