@economic/taco 0.0.1-alpha.2 → 0.0.1-alpha.6
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/components/Backdrop/Backdrop.d.ts +3 -0
- package/dist/esm/_virtual/_commonjsHelpers.js +6 -0
- package/dist/esm/_virtual/_commonjsHelpers.js.map +1 -0
- package/dist/esm/_virtual/tailwindcss-aria-attributes.js_commonjs-proxy +3 -2
- package/dist/esm/_virtual/tailwindcss-aria-attributes.js_commonjs-proxy.map +1 -1
- package/dist/esm/index.css +2 -2
- package/dist/esm/src/components/Backdrop/Backdrop.js +12 -0
- package/dist/esm/src/components/Backdrop/Backdrop.js.map +1 -0
- package/dist/esm/src/components/Dialog/components/Content.js +8 -8
- package/dist/esm/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/src/components/Pagination/Pagination.js +1 -0
- package/dist/esm/src/components/Pagination/Pagination.js.map +1 -1
- package/dist/esm/src/components/SearchInput/SearchInput.js +1 -0
- package/dist/esm/src/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/src/index.js +1 -0
- package/dist/esm/src/index.js.map +1 -1
- package/dist/index.css +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/taco.cjs.development.js +17 -15
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +2 -2
- package/types.json +466 -465
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"_commonjsHelpers.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import * as tailwindcssAriaAttributes from '../plugins/tailwindcss-aria-attributes.js';
|
2
|
+
import { getCjsExportFromNamespace } from './_commonjsHelpers.js';
|
2
3
|
|
4
|
+
var require$$0 = getCjsExportFromNamespace(tailwindcssAriaAttributes);
|
3
5
|
|
4
|
-
|
5
|
-
export default tailwindcssAriaAttributes;
|
6
|
+
export default require$$0;
|
6
7
|
//# sourceMappingURL=tailwindcss-aria-attributes.js_commonjs-proxy.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"tailwindcss-aria-attributes.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"tailwindcss-aria-attributes.js_commonjs-proxy","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;"}
|
package/dist/esm/index.css
CHANGED
@@ -236,7 +236,7 @@
|
|
236
236
|
|
237
237
|
.yt-dialog__drag::before,
|
238
238
|
.yt-dialog__drag::after {
|
239
|
-
@apply
|
239
|
+
@apply bg-grey-dark absolute rounded;
|
240
240
|
content: '';
|
241
241
|
left: theme('spacing.1');
|
242
242
|
height: 2px;
|
@@ -251,7 +251,7 @@
|
|
251
251
|
bottom: 3px;
|
252
252
|
}
|
253
253
|
|
254
|
-
|
254
|
+
[data-taco='dialog'] *:last-child {
|
255
255
|
@apply mb-0;
|
256
256
|
}
|
257
257
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { createElement } from 'react';
|
2
|
+
import cn from 'classnames';
|
3
|
+
|
4
|
+
var Backdrop = function Backdrop(props) {
|
5
|
+
var className = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] animate-[fade-in_150ms] aria-hidden:hidden', props.className);
|
6
|
+
return createElement("div", Object.assign({}, props, {
|
7
|
+
className: className
|
8
|
+
}));
|
9
|
+
};
|
10
|
+
|
11
|
+
export { Backdrop };
|
12
|
+
//# sourceMappingURL=Backdrop.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Backdrop.js","sources":["../../../../../src/components/Backdrop/Backdrop.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\n\nexport type BackdropProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const Backdrop = (props: BackdropProps) => {\n const className = cn(\n 'fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] animate-[fade-in_150ms] aria-hidden:hidden',\n props.className\n );\n\n return <div {...props} className={className} />;\n};\n"],"names":["Backdrop","props","className","cn","React"],"mappings":";;;IAKaA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD;AACpB,MAAMC,SAAS,GAAGC,EAAE,CAChB,iHADgB,EAEhBF,KAAK,CAACC,SAFU,CAApB;AAKA,SAAOE,aAAA,MAAA,oBAASH;AAAOC,IAAAA,SAAS,EAAEA;IAA3B,CAAP;AACH;;;;"}
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { extends as _extends } from '../../../../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import { forwardRef, createElement } from 'react';
|
3
3
|
import cn from 'classnames';
|
4
|
+
import { Backdrop } from '../../Backdrop/Backdrop.js';
|
4
5
|
import { useLocalization } from '../../Provider/Provider.js';
|
5
6
|
import { Title as Title$1, Close as Close$1, Portal, Overlay, Content as Content$1 } from '@radix-ui/react-dialog';
|
6
7
|
import { useCurrentDialog } from '../Context.js';
|
@@ -60,10 +61,9 @@ var Content = /*#__PURE__*/forwardRef(function DialogContent(props, ref) {
|
|
60
61
|
'w-md': dialog.size === 'md',
|
61
62
|
'w-lg': dialog.size === 'lg'
|
62
63
|
});
|
63
|
-
var containerClassName = cn('
|
64
|
+
var containerClassName = cn('bg-white p-6 rounded relative z-[999]', 'shadow-[0_6px_9px_0_rgba(89,85,98,0.3),0_0_1px_0_rgba(89,85,98,0.2)]', {
|
64
65
|
'rounded-b-none': !!dialog.elements.extra
|
65
|
-
}, props.className);
|
66
|
-
var overlayClassName = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] animate-[fade-in_150ms] aria-hidden:hidden'); // the chosen behaviour in taco is that outside clicks do not close the dialog
|
66
|
+
}, props.className); // the chosen behaviour in taco is that outside clicks do not close the dialog
|
67
67
|
|
68
68
|
var handleInteractOutside = function handleInteractOutside(event) {
|
69
69
|
return event.preventDefault();
|
@@ -81,10 +81,9 @@ var Content = /*#__PURE__*/forwardRef(function DialogContent(props, ref) {
|
|
81
81
|
}
|
82
82
|
|
83
83
|
return createElement(Portal, null, createElement(Overlay, {
|
84
|
-
|
85
|
-
}, createElement(Content$1, Object.assign({}, props, {
|
84
|
+
asChild: true
|
85
|
+
}, createElement(Backdrop, null, createElement(Content$1, Object.assign({}, props, {
|
86
86
|
className: className,
|
87
|
-
"data-taco": "dialog",
|
88
87
|
onEscapeKeyDown: dialog.onClose,
|
89
88
|
onInteractOutside: handleInteractOutside,
|
90
89
|
onCloseAutoFocus: handleCloseAutoFocus,
|
@@ -94,7 +93,8 @@ var Content = /*#__PURE__*/forwardRef(function DialogContent(props, ref) {
|
|
94
93
|
top: dialog.draggable ? "calc(50% + " + position.y + "px)" : undefined
|
95
94
|
})
|
96
95
|
}), createElement("div", {
|
97
|
-
className: containerClassName
|
96
|
+
className: containerClassName,
|
97
|
+
"data-taco": "dialog"
|
98
98
|
}, output, dialog.draggable && createElement("div", Object.assign({}, dragHandleProps, {
|
99
99
|
"aria-label": texts.dialog.drag,
|
100
100
|
className: "yt-dialog__drag absolute-center-x bg-grey-light top-1.5 h-3 w-24 cursor-move rounded text-center"
|
@@ -106,7 +106,7 @@ var Content = /*#__PURE__*/forwardRef(function DialogContent(props, ref) {
|
|
106
106
|
"aria-label": texts.dialog.close,
|
107
107
|
className: "absolute top-0 right-0 mt-2 mr-2",
|
108
108
|
icon: "close"
|
109
|
-
}))), dialog.elements.drawer, dialog.elements.extra)));
|
109
|
+
}))), dialog.elements.drawer, dialog.elements.extra))));
|
110
110
|
});
|
111
111
|
|
112
112
|
export { Close, Content, Footer, Title };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Content.js","sources":["../../../../../../src/components/Dialog/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { useProxiedRef } from '../../../utils/hooks/useProxiedRef';\nimport { useDraggable } from '../../../utils/hooks/useDraggable';\nimport { useCurrentMenu } from '../../Menu/Context';\nimport { useCurrentDialog } from '../Context';\nimport { useLocalization } from '../../Provider/Provider';\nimport { IconButton } from '../../IconButton/IconButton';\nimport { Group } from '../../Group/Group';\n\nexport type DialogContentRenderProps = {\n close: () => void;\n drawer?: {\n open: boolean;\n toggle: () => void;\n };\n};\n\nexport type DialogTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DialogTitle(props: DialogTitleProps, ref: React.Ref<HTMLHeadingElement>) {\n return <DialogPrimitive.Title {...props} className=\"text-center\" ref={ref} />;\n});\n\nexport type DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\nexport const Footer = React.forwardRef(function DialogFooter(props: DialogFooterProps, ref: React.Ref<HTMLDivElement>) {\n return (\n <div {...props} className=\"mt-8 flex justify-end\" ref={ref}>\n <Group>{props.children}</Group>\n </div>\n );\n});\n\nexport type DialogCloseProps = React.HTMLAttributes<HTMLButtonElement>;\n\nexport const Close = React.forwardRef(function DialogClose(props: DialogCloseProps, ref: React.Ref<HTMLButtonElement>) {\n const dialog = useCurrentDialog();\n\n return <DialogPrimitive.Close onClick={dialog.onClose} {...props} ref={ref} asChild />;\n});\n\nexport type DialogContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n /** An accessible description to be announced when the dialog is opened */\n 'aria-describedby': string;\n children: Omit<React.ReactNode, 'Function'> | ((props: DialogContentRenderProps) => JSX.Element);\n};\nexport const Content = React.forwardRef(function DialogContent(props: DialogContentProps, ref: React.Ref<HTMLDivElement>) {\n const dialog = useCurrentDialog();\n const internalRef = useProxiedRef<HTMLDivElement>(ref);\n const { position, handleProps: dragHandleProps } = useDraggable(internalRef);\n const { texts } = useLocalization();\n\n // if the dialog was opened by a menu, we need to close the menu when the dialog closes\n // the menu is still open (and mounted) because it is the trigger for the dialog\n const menu = useCurrentMenu();\n let handleCloseAutoFocus;\n\n if (menu) {\n handleCloseAutoFocus = () => menu.close();\n }\n\n const className = cn('bg-white rounded mt-16 mx-auto', {\n 'w-128 text-center justify-center': dialog.size === 'dialog',\n 'w-xs': dialog.size === 'xs',\n 'w-sm': dialog.size === 'sm',\n 'w-md': dialog.size === 'md',\n 'w-lg': dialog.size === 'lg',\n });\n\n const containerClassName = cn(\n '
|
1
|
+
{"version":3,"file":"Content.js","sources":["../../../../../../src/components/Dialog/components/Content.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { useProxiedRef } from '../../../utils/hooks/useProxiedRef';\nimport { useDraggable } from '../../../utils/hooks/useDraggable';\nimport { useCurrentMenu } from '../../Menu/Context';\nimport { useCurrentDialog } from '../Context';\nimport { useLocalization } from '../../Provider/Provider';\nimport { IconButton } from '../../IconButton/IconButton';\nimport { Group } from '../../Group/Group';\nimport { Backdrop } from '../../Backdrop/Backdrop';\n\nexport type DialogContentRenderProps = {\n close: () => void;\n drawer?: {\n open: boolean;\n toggle: () => void;\n };\n};\n\nexport type DialogTitleProps = React.HTMLAttributes<HTMLHeadingElement>;\nexport const Title = React.forwardRef(function DialogTitle(props: DialogTitleProps, ref: React.Ref<HTMLHeadingElement>) {\n return <DialogPrimitive.Title {...props} className=\"text-center\" ref={ref} />;\n});\n\nexport type DialogFooterProps = React.HTMLAttributes<HTMLDivElement>;\nexport const Footer = React.forwardRef(function DialogFooter(props: DialogFooterProps, ref: React.Ref<HTMLDivElement>) {\n return (\n <div {...props} className=\"mt-8 flex justify-end\" ref={ref}>\n <Group>{props.children}</Group>\n </div>\n );\n});\n\nexport type DialogCloseProps = React.HTMLAttributes<HTMLButtonElement>;\n\nexport const Close = React.forwardRef(function DialogClose(props: DialogCloseProps, ref: React.Ref<HTMLButtonElement>) {\n const dialog = useCurrentDialog();\n\n return <DialogPrimitive.Close onClick={dialog.onClose} {...props} ref={ref} asChild />;\n});\n\nexport type DialogContentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'children'> & {\n /** An accessible description to be announced when the dialog is opened */\n 'aria-describedby': string;\n children: Omit<React.ReactNode, 'Function'> | ((props: DialogContentRenderProps) => JSX.Element);\n};\nexport const Content = React.forwardRef(function DialogContent(props: DialogContentProps, ref: React.Ref<HTMLDivElement>) {\n const dialog = useCurrentDialog();\n const internalRef = useProxiedRef<HTMLDivElement>(ref);\n const { position, handleProps: dragHandleProps } = useDraggable(internalRef);\n const { texts } = useLocalization();\n\n // if the dialog was opened by a menu, we need to close the menu when the dialog closes\n // the menu is still open (and mounted) because it is the trigger for the dialog\n const menu = useCurrentMenu();\n let handleCloseAutoFocus;\n\n if (menu) {\n handleCloseAutoFocus = () => menu.close();\n }\n\n const className = cn('bg-white rounded mt-16 mx-auto', {\n 'w-128 text-center justify-center': dialog.size === 'dialog',\n 'w-xs': dialog.size === 'xs',\n 'w-sm': dialog.size === 'sm',\n 'w-md': dialog.size === 'md',\n 'w-lg': dialog.size === 'lg',\n });\n\n const containerClassName = cn(\n 'bg-white p-6 rounded relative z-[999]',\n 'shadow-[0_6px_9px_0_rgba(89,85,98,0.3),0_0_1px_0_rgba(89,85,98,0.2)]',\n {\n 'rounded-b-none': !!dialog.elements.extra,\n },\n props.className\n );\n\n // the chosen behaviour in taco is that outside clicks do not close the dialog\n const handleInteractOutside = event => event.preventDefault();\n\n let output;\n\n if (typeof props.children === 'function') {\n output = props.children({ drawer: dialog.drawer, close: dialog.close });\n } else {\n output = props.children;\n }\n\n return (\n <DialogPrimitive.Portal>\n <DialogPrimitive.Overlay asChild>\n <Backdrop>\n <DialogPrimitive.Content\n {...props}\n className={className}\n onEscapeKeyDown={dialog.onClose}\n onInteractOutside={handleInteractOutside}\n onCloseAutoFocus={handleCloseAutoFocus}\n ref={ref}\n style={{\n ...props.style,\n left: dialog.draggable ? `calc(50% + ${position.x}px)` : undefined,\n top: dialog.draggable ? `calc(50% + ${position.y}px)` : undefined,\n }}\n >\n <div className={containerClassName} data-taco=\"dialog\">\n {output}\n {dialog.draggable && (\n <div\n {...dragHandleProps}\n aria-label={texts.dialog.drag}\n className=\"yt-dialog__drag absolute-center-x bg-grey-light top-1.5 h-3 w-24 cursor-move rounded text-center\"\n />\n )}\n <DialogPrimitive.Close asChild onClick={dialog.onClose}>\n <IconButton\n appearance=\"discrete\"\n aria-label={texts.dialog.close}\n className=\"absolute top-0 right-0 mt-2 mr-2\"\n icon=\"close\"\n />\n </DialogPrimitive.Close>\n </div>\n {dialog.elements.drawer}\n {dialog.elements.extra}\n </DialogPrimitive.Content>\n </Backdrop>\n </DialogPrimitive.Overlay>\n </DialogPrimitive.Portal>\n );\n});\n"],"names":["Title","React","DialogTitle","props","ref","DialogPrimitive","className","Footer","DialogFooter","Group","children","Close","DialogClose","dialog","useCurrentDialog","onClick","onClose","asChild","Content","DialogContent","internalRef","useProxiedRef","useDraggable","position","dragHandleProps","handleProps","useLocalization","texts","menu","useCurrentMenu","handleCloseAutoFocus","close","cn","size","containerClassName","elements","extra","handleInteractOutside","event","preventDefault","output","drawer","Backdrop","onEscapeKeyDown","onInteractOutside","onCloseAutoFocus","style","left","draggable","x","undefined","top","y","drag","IconButton","appearance","icon"],"mappings":";;;;;;;;;;;;;IAqBaA,KAAK,gBAAGC,UAAA,CAAiB,SAASC,WAAT,CAAqBC,KAArB,EAA8CC,GAA9C;AAClC,SAAOH,aAAA,CAACI,OAAD,oBAA2BF;AAAOG,IAAAA,SAAS,EAAC;AAAcF,IAAAA,GAAG,EAAEA;IAA/D,CAAP;AACH,CAFoB;IAKRG,MAAM,gBAAGN,UAAA,CAAiB,SAASO,YAAT,CAAsBL,KAAtB,EAAgDC,GAAhD;AACnC,SACIH,aAAA,MAAA,oBAASE;AAAOG,IAAAA,SAAS,EAAC;AAAwBF,IAAAA,GAAG,EAAEA;IAAvD,EACIH,aAAA,CAACQ,KAAD,MAAA,EAAQN,KAAK,CAACO,QAAd,CADJ,CADJ;AAKH,CANqB;IAUTC,KAAK,gBAAGV,UAAA,CAAiB,SAASW,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AAD;AAAuBY,IAAAA,OAAO;AAACF,IAAAA,OAAO,EAAEF,MAAM,CAACG;GAA/C,EACIf,aAAA,CAACqD,UAAD;AACIC,IAAAA,UAAU,EAAC;kBACC5B,KAAK,CAACd,MAAN,CAAakB;AACzBzB,IAAAA,SAAS,EAAC;AACVkD,IAAAA,IAAI,EAAC;GAJT,CADJ,CATJ,CAbJ,EA+BK3C,MAAM,CAACsB,QAAP,CAAgBM,MA/BrB,EAgCK5B,MAAM,CAACsB,QAAP,CAAgBC,KAhCrB,CADJ,CADJ,CADJ,CADJ;AA0CH,CArFsB;;;;"}
|
@@ -52,6 +52,7 @@ var Pagination = /*#__PURE__*/forwardRef(function Pagination(props, ref) {
|
|
52
52
|
var className = cn('inline-flex relative justify-between items-center', props.className);
|
53
53
|
return createElement("div", Object.assign({}, otherProps, {
|
54
54
|
className: className,
|
55
|
+
"data-taco": "pagination",
|
55
56
|
ref: ref
|
56
57
|
}), showPageSize && createElement("span", {
|
57
58
|
className: "mr-4"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Pagination.js","sources":["../../../../../src/components/Pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { PageNumbers } from './PageNumbers';\nimport { LocalizationTexts, useLocalization } from '../Provider/Provider';\nimport { Select } from '../Select/Select';\nimport { Group } from '../Group/Group';\nimport { IconButton } from '../IconButton/IconButton';\nimport { usePaginationValues } from './usePagination';\nimport { usePaginationShortcuts } from './usePaginationShortcuts';\n\nexport * from './usePagination';\n\nexport type PaginationTextsActions = {\n /**\n * Aria-label for first page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPage: string;\n /**\n * Aria-label for first page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPageWithShortcut: string;\n /**\n * Aria-label for next page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPage: string;\n /**\n * Aria-label for next page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPageWithShortcut: string;\n /**\n * Aria-label for previous page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPage: string;\n /**\n * Aria-label for previous page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPageWithShortcut: string;\n /**\n * Aria-label for last page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPage: string;\n /**\n * Aria-label for last page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPageWithShortcut: string;\n /**\n * Aria-label for page X action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageX: string;\n};\n\nexport type PaginationTexts = {\n /**\n * Aria-label provided for page numbers and page actions group.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n label: string;\n /**\n * Aria-label provided for page size selection.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageSize: string;\n /**\n * Text that indicates the number of the first and last element displayed on the current page, out of total items\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n showingXofYofTotal: string;\n /**\n * Aria-labels provided for page action buttons.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n actions: PaginationTextsActions;\n};\n\nexport type PaginationProps = React.HTMLAttributes<HTMLDivElement> &\n usePaginationValues & {\n /** Indicate total number of items that will be paginated */\n length: number;\n /** Page size options */\n pageSizes?: number[];\n /** Shows page controls */\n showPageControls?: boolean;\n /** Shows page numbers between navigation buttons, which allows users to quickly navigate to a specific page */\n showPageNumbers?: boolean;\n /** Shows a dropdown with page sizes, which allows user to change the number of items displayed on the page */\n showPageSize?: boolean;\n /** Enable pagination shortcuts */\n dangerouslyHijackGlobalKeyboardNavigation?: boolean;\n };\n\nconst getShowingLabel = (length: number, pageIndex: number, pageSize: number, texts: LocalizationTexts): string => {\n const minItemIndex = pageIndex * pageSize + 1;\n const maxItemIndex = (pageIndex + 1) * pageSize;\n\n return texts.pagination.showingXofYofTotal\n .replace('[X]', length === 0 ? '0' : String(minItemIndex))\n .replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex))\n .replace('[total]', String(length));\n};\n\nexport const Pagination = React.forwardRef(function Pagination(props: PaginationProps, ref: React.Ref<HTMLDivElement>) {\n const {\n length,\n pageIndex,\n pageSize,\n pageSizes = [10, 25, 50, 100, 500],\n setPageIndex,\n setPageSize,\n showPageControls = true,\n showPageNumbers = true,\n showPageSize = true,\n dangerouslyHijackGlobalKeyboardNavigation = false,\n ...otherProps\n } = props;\n const { texts } = useLocalization();\n\n const maxPageIndex = Math.ceil(length / pageSize) - 1;\n const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;\n\n usePaginationShortcuts({\n setPageIndex,\n maxPageIndex,\n pageIndex,\n dangerouslyHijackGlobalKeyboardNavigation,\n });\n\n const pageCount = Math.ceil(length / pageSize);\n const canPreviousPage = pageIndex > 0;\n const canNextPage = pageIndex < pageCount - 1;\n\n const className = cn('inline-flex relative justify-between items-center', props.className);\n\n return (\n <div {...otherProps} className={className} ref={ref}>\n {showPageSize && (\n <span className=\"mr-4\">\n {getShowingLabel(length, pageIndex, pageSize, texts)}\n <Select\n aria-label={texts.pagination.pageSize}\n className=\"ml-4 !w-20\"\n data={pageSizes.map(pageSize => ({\n text: String(pageSize),\n value: pageSize,\n }))}\n onChange={event => {\n setPageIndex(0);\n setPageSize(Number(event.target.value));\n }}\n value={pageSize}\n />\n </span>\n )}\n {showPageControls && (\n <Group as=\"nav\" aria-label={texts.pagination.label}>\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-start\"\n onClick={() => setPageIndex(0)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-left\"\n onClick={() => setPageIndex(pageIndex - 1)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n />\n {showPageNumbers && pageCount > 0 && (\n <PageNumbers pageCount={pageCount} currentPageIndex={pageIndex} onClick={setPageIndex} />\n )}\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-right\"\n onClick={() => setPageIndex(pageIndex + 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-end\"\n onClick={() => setPageIndex(pageCount - 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n />\n </Group>\n )}\n </div>\n );\n});\n"],"names":["getShowingLabel","length","pageIndex","pageSize","texts","minItemIndex","maxItemIndex","pagination","showingXofYofTotal","replace","String","Pagination","React","props","ref","pageSizes","setPageIndex","setPageSize","showPageControls","showPageNumbers","showPageSize","dangerouslyHijackGlobalKeyboardNavigation","otherProps","useLocalization","maxPageIndex","Math","ceil","showShortcutTexts","usePaginationShortcuts","pageCount","canPreviousPage","canNextPage","className","cn","Select","data","map","text","value","onChange","event","Number","target","Group","as","label","IconButton","appearance","disabled","icon","onClick","actions","firstPageWithShortcut","firstPage","tooltip","previousPageWithShortcut","previousPage","PageNumbers","currentPageIndex","nextPageWithShortcut","nextPage","lastPageWithShortcut","lastPage"],"mappings":";;;;;;;;;;;;;AAmGA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,MAAD,EAAiBC,SAAjB,EAAoCC,QAApC,EAAs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ination.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport { PageNumbers } from './PageNumbers';\nimport { LocalizationTexts, useLocalization } from '../Provider/Provider';\nimport { Select } from '../Select/Select';\nimport { Group } from '../Group/Group';\nimport { IconButton } from '../IconButton/IconButton';\nimport { usePaginationValues } from './usePagination';\nimport { usePaginationShortcuts } from './usePaginationShortcuts';\n\nexport * from './usePagination';\n\nexport type PaginationTextsActions = {\n /**\n * Aria-label for first page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPage: string;\n /**\n * Aria-label for first page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n firstPageWithShortcut: string;\n /**\n * Aria-label for next page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPage: string;\n /**\n * Aria-label for next page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n nextPageWithShortcut: string;\n /**\n * Aria-label for previous page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPage: string;\n /**\n * Aria-label for previous page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n previousPageWithShortcut: string;\n /**\n * Aria-label for last page action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPage: string;\n /**\n * Aria-label for last page action button with shortcut.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n lastPageWithShortcut: string;\n /**\n * Aria-label for page X action button.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageX: string;\n};\n\nexport type PaginationTexts = {\n /**\n * Aria-label provided for page numbers and page actions group.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n label: string;\n /**\n * Aria-label provided for page size selection.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n pageSize: string;\n /**\n * Text that indicates the number of the first and last element displayed on the current page, out of total items\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n showingXofYofTotal: string;\n /**\n * Aria-labels provided for page action buttons.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n actions: PaginationTextsActions;\n};\n\nexport type PaginationProps = React.HTMLAttributes<HTMLDivElement> &\n usePaginationValues & {\n /** Indicate total number of items that will be paginated */\n length: number;\n /** Page size options */\n pageSizes?: number[];\n /** Shows page controls */\n showPageControls?: boolean;\n /** Shows page numbers between navigation buttons, which allows users to quickly navigate to a specific page */\n showPageNumbers?: boolean;\n /** Shows a dropdown with page sizes, which allows user to change the number of items displayed on the page */\n showPageSize?: boolean;\n /** Enable pagination shortcuts */\n dangerouslyHijackGlobalKeyboardNavigation?: boolean;\n };\n\nconst getShowingLabel = (length: number, pageIndex: number, pageSize: number, texts: LocalizationTexts): string => {\n const minItemIndex = pageIndex * pageSize + 1;\n const maxItemIndex = (pageIndex + 1) * pageSize;\n\n return texts.pagination.showingXofYofTotal\n .replace('[X]', length === 0 ? '0' : String(minItemIndex))\n .replace('[Y]', String(maxItemIndex > length ? length : maxItemIndex))\n .replace('[total]', String(length));\n};\n\nexport const Pagination = React.forwardRef(function Pagination(props: PaginationProps, ref: React.Ref<HTMLDivElement>) {\n const {\n length,\n pageIndex,\n pageSize,\n pageSizes = [10, 25, 50, 100, 500],\n setPageIndex,\n setPageSize,\n showPageControls = true,\n showPageNumbers = true,\n showPageSize = true,\n dangerouslyHijackGlobalKeyboardNavigation = false,\n ...otherProps\n } = props;\n const { texts } = useLocalization();\n\n const maxPageIndex = Math.ceil(length / pageSize) - 1;\n const showShortcutTexts = dangerouslyHijackGlobalKeyboardNavigation;\n\n usePaginationShortcuts({\n setPageIndex,\n maxPageIndex,\n pageIndex,\n dangerouslyHijackGlobalKeyboardNavigation,\n });\n\n const pageCount = Math.ceil(length / pageSize);\n const canPreviousPage = pageIndex > 0;\n const canNextPage = pageIndex < pageCount - 1;\n\n const className = cn('inline-flex relative justify-between items-center', props.className);\n\n return (\n <div {...otherProps} className={className} data-taco=\"pagination\" ref={ref}>\n {showPageSize && (\n <span className=\"mr-4\">\n {getShowingLabel(length, pageIndex, pageSize, texts)}\n <Select\n aria-label={texts.pagination.pageSize}\n className=\"ml-4 !w-20\"\n data={pageSizes.map(pageSize => ({\n text: String(pageSize),\n value: pageSize,\n }))}\n onChange={event => {\n setPageIndex(0);\n setPageSize(Number(event.target.value));\n }}\n value={pageSize}\n />\n </span>\n )}\n {showPageControls && (\n <Group as=\"nav\" aria-label={texts.pagination.label}>\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-start\"\n onClick={() => setPageIndex(0)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.firstPageWithShortcut\n : texts.pagination.actions.firstPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canPreviousPage}\n icon=\"arrow-left\"\n onClick={() => setPageIndex(pageIndex - 1)}\n aria-label={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n tooltip={\n showShortcutTexts\n ? texts.pagination.actions.previousPageWithShortcut\n : texts.pagination.actions.previousPage\n }\n />\n {showPageNumbers && pageCount > 0 && (\n <PageNumbers pageCount={pageCount} currentPageIndex={pageIndex} onClick={setPageIndex} />\n )}\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-right\"\n onClick={() => setPageIndex(pageIndex + 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.nextPageWithShortcut : texts.pagination.actions.nextPage\n }\n />\n <IconButton\n appearance=\"default\"\n disabled={!canNextPage}\n icon=\"arrow-end\"\n onClick={() => setPageIndex(pageCount - 1)}\n aria-label={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n tooltip={\n showShortcutTexts ? texts.pagination.actions.lastPageWithShortcut : texts.pagination.actions.lastPage\n }\n />\n </Group>\n )}\n </div>\n );\n});\n"],"names":["getShowingLabel","length","pageIndex","pageSize","texts","minItemIndex","maxItemIndex","pagination","showingXofYofTotal","replace","String","Pagination","React","props","ref","pageSizes","setPageIndex","setPageSize","showPageControls","showPageNumbers","showPageSize","dangerouslyHijackGlobalKeyboardNavigation","otherProps","useLocalization","maxPageIndex","Math","ceil","showShortcutTexts","usePaginationShortcuts","pageCount","canPreviousPage","canNextPage","className","cn","Select","data","map","text","value","onChange","event","Number","target","Group","as","label","IconButton","appearance","disabled","icon","onClick","actions","firstPageWithShortcut","firstPage","tooltip","previousPageWithShortcut","previousPage","PageNumbers","currentPageIndex","nextPageWithShortcut","nextPage","lastPageWithShortcut","lastPage"],"mappings":";;;;;;;;;;;;;AAmGA,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAACC,MAAD,EAAiBC,SAAjB,EAAoCC,QAApC,EAAsDC,KAAtD;AACpB,MAAMC,YAAY,GAAGH,SAAS,GAAGC,QAAZ,GAAuB,CAA5C;AACA,MAAMG,YAAY,GAAG,CAACJ,SAAS,GAAG,CAAb,IAAkBC,QAAvC;AAEA,SAAOC,KAAK,CAACG,UAAN,CAAiBC,kBAAjB,CACFC,OADE,CACM,KADN,EACaR,MAAM,KAAK,CAAX,GAAe,GAAf,GAAqBS,MAAM,CAACL,YAAD,CADxC,EAEFI,OAFE,CAEM,KAFN,EAEaC,MAAM,CAACJ,YAAY,GAAGL,MAAf,GAAwBA,MAAxB,GAAiCK,YAAlC,CAFnB,EAGFG,OAHE,CAGM,SAHN,EAGiBC,MAAM,CAACT,MAAD,CAHvB,CAAP;AAIH,CARD;;IAUaU,UAAU,gBAAGC,UAAA,CAAiB,SAASD,UAAT,CAAoBE,KAApB,EAA4CC,GAA5C;AACvC,MACIb,MADJ,GAYIY,KAZJ,CACIZ,MADJ;AAAA,MAEIC,SAFJ,GAYIW,KAZJ,CAEIX,SAFJ;AAAA,MAGIC,QAHJ,GAYIU,KAZJ,CAGIV,QAHJ;AAAA,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UAAD;AACIC,IAAAA,UAAU,EAAC;AACXC,IAAAA,QAAQ,EAAE,CAACjB;AACXkB,IAAAA,IAAI,EAAC;AACLC,IAAAA,OAAO,EAAE;AAAA,aAAMlC,YAAY,CAACa,SAAS,GAAG,CAAb,CAAlB;AAAA;kBAELF,iBAAiB,GAAGvB,KAAK,CAACG,UAAN,CAAiB4C,OAAjB,CAAyBU,oBAA5B,GAAmDzD,KAAK,CAACG,UAAN,CAAiB4C,OAAjB,CAAyBW;AAEjGR,IAAAA,OAAO,EACH3B,iBAAiB,GAAGvB,KAAK,CAACG,UAAN,CAAiB4C,OAAjB,CAAyBU,oBAA5B,GAAmDzD,KAAK,CAACG,UAAN,CAAiB4C,OAAjB,CAAyBW;GATrG,CAhDJ,CApBR,CADJ;AAqFH,CArHyB;;;;"}
|
@@ -3,6 +3,7 @@ import { forwardRef, createElement } from 'react';
|
|
3
3
|
import '../Icon/components/index.js';
|
4
4
|
import '../Icon/Icon.js';
|
5
5
|
import '../Accordion/Accordion.js';
|
6
|
+
import '../Backdrop/Backdrop.js';
|
6
7
|
import '../VisuallyHidden/VisuallyHidden.js';
|
7
8
|
import '../Badge/Badge.js';
|
8
9
|
import '../Tooltip/Tooltip.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SearchInput.js","sources":["../../../../../src/components/SearchInput/SearchInput.tsx"],"sourcesContent":["import * as React from 'react';\nimport keycode from 'keycode';\nimport { Input, InputProps, useLocalization, IconButton } from '../..';\n\nexport type SearchInputTexts = {\n /**\n * aria-label text for input\n */\n inputLabel: string;\n};\n\nexport type SearchInputProps = Omit<InputProps, 'icon'> & {\n /** Current input value will be passed to the method. In order to get the value, the component must be controlled otherwise value will always be undefined */\n onSearch?: (value: string | number | readonly string[] | undefined) => void;\n};\n\nexport const SearchInput = React.forwardRef(function SearchInput(\n { onSearch, ...props }: SearchInputProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const { texts } = useLocalization();\n\n const handleClick = (): void => {\n if (!props.disabled) {\n onSearch?.(props.value);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>): void => {\n const isEnterKeyPressed = event.keyCode === keycode('enter');\n\n if (isEnterKeyPressed) {\n handleClick();\n }\n };\n\n return (\n <Input\n aria-label={texts.searchInput.inputLabel}\n {...props}\n button={\n <IconButton\n icon=\"search\"\n className=\"!bg-transparent !border-transparent\"\n disabled={props.disabled}\n onClick={handleClick}\n />\n }\n onKeyDown={handleKeyDown}\n ref={ref}\n />\n );\n});\n"],"names":["SearchInput","React","ref","onSearch","props","useLocalization","texts","handleClick","disabled","value","handleKeyDown","event","isEnterKeyPressed","keyCode","keycode","Input","searchInput","inputLabel","button","IconButton","icon","className","onClick","onKeyDown"],"mappings":"
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../../../../src/components/SearchInput/SearchInput.tsx"],"sourcesContent":["import * as React from 'react';\nimport keycode from 'keycode';\nimport { Input, InputProps, useLocalization, IconButton } from '../..';\n\nexport type SearchInputTexts = {\n /**\n * aria-label text for input\n */\n inputLabel: string;\n};\n\nexport type SearchInputProps = Omit<InputProps, 'icon'> & {\n /** Current input value will be passed to the method. In order to get the value, the component must be controlled otherwise value will always be undefined */\n onSearch?: (value: string | number | readonly string[] | undefined) => void;\n};\n\nexport const SearchInput = React.forwardRef(function SearchInput(\n { onSearch, ...props }: SearchInputProps,\n ref: React.Ref<HTMLInputElement>\n) {\n const { texts } = useLocalization();\n\n const handleClick = (): void => {\n if (!props.disabled) {\n onSearch?.(props.value);\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>): void => {\n const isEnterKeyPressed = event.keyCode === keycode('enter');\n\n if (isEnterKeyPressed) {\n handleClick();\n }\n };\n\n return (\n <Input\n aria-label={texts.searchInput.inputLabel}\n {...props}\n button={\n <IconButton\n icon=\"search\"\n className=\"!bg-transparent !border-transparent\"\n disabled={props.disabled}\n onClick={handleClick}\n />\n }\n onKeyDown={handleKeyDown}\n ref={ref}\n />\n );\n});\n"],"names":["SearchInput","React","ref","onSearch","props","useLocalization","texts","handleClick","disabled","value","handleKeyDown","event","isEnterKeyPressed","keyCode","keycode","Input","searchInput","inputLabel","button","IconButton","icon","className","onClick","onKeyDown"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBaA,WAAW,gBAAGC,UAAA,CAAiB,SAASD,WAAT,OAExCE,GAFwC;MACtCC,gBAAAA;MAAaC;;AAGf,yBAAkBC,eAAe,EAAjC;AAAA,MAAQC,KAAR,oBAAQA,KAAR;;AAEA,MAAMC,WAAW,GAAG,SAAdA,WAAc;AAChB,QAAI,CAACH,KAAK,CAACI,QAAX,EAAqB;AACjBL,MAAAA,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAGC,KAAK,CAACK,KAAT,CAAR;AACH;AACJ,GAJD;;AAMA,MAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;AAClB,QAAMC,iBAAiB,GAAGD,KAAK,CAACE,OAAN,KAAkBC,OAAO,CAAC,OAAD,CAAnD;;AAEA,QAAIF,iBAAJ,EAAuB;AACnBL,MAAAA,WAAW;AACd;AACJ,GAND;;AAQA,SACIN,aAAA,CAACc,KAAD;kBACgBT,KAAK,CAACU,WAAN,CAAkBC;KAC1Bb;AACJc,IAAAA,MAAM,EACFjB,aAAA,CAACkB,UAAD;AACIC,MAAAA,IAAI,EAAC;AACLC,MAAAA,SAAS,EAAC;AACVb,MAAAA,QAAQ,EAAEJ,KAAK,CAACI;AAChBc,MAAAA,OAAO,EAAEf;KAJb;AAOJgB,IAAAA,SAAS,EAAEb;AACXR,IAAAA,GAAG,EAAEA;IAZT,CADJ;AAgBH,CApC0B;;;;"}
|
package/dist/esm/src/index.js
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
export { icons } from './components/Icon/components/index.js';
|
2
2
|
export { Icon } from './components/Icon/Icon.js';
|
3
3
|
export { Accordion } from './components/Accordion/Accordion.js';
|
4
|
+
export { Backdrop } from './components/Backdrop/Backdrop.js';
|
4
5
|
export { VisuallyHidden } from './components/VisuallyHidden/VisuallyHidden.js';
|
5
6
|
export { Badge } from './components/Badge/Badge.js';
|
6
7
|
export { Tooltip } from './components/Tooltip/Tooltip.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/index.css
CHANGED
@@ -236,7 +236,7 @@
|
|
236
236
|
|
237
237
|
.yt-dialog__drag::before,
|
238
238
|
.yt-dialog__drag::after {
|
239
|
-
@apply
|
239
|
+
@apply bg-grey-dark absolute rounded;
|
240
240
|
content: '';
|
241
241
|
left: theme('spacing.1');
|
242
242
|
height: 2px;
|
@@ -251,7 +251,7 @@
|
|
251
251
|
bottom: 3px;
|
252
252
|
}
|
253
253
|
|
254
|
-
|
254
|
+
[data-taco='dialog'] *:last-child {
|
255
255
|
@apply mb-0;
|
256
256
|
}
|
257
257
|
|
package/dist/index.d.ts
CHANGED
@@ -3188,6 +3188,13 @@ Accordion.Item = Item;
|
|
3188
3188
|
Accordion.Trigger = Trigger;
|
3189
3189
|
Accordion.Content = Content;
|
3190
3190
|
|
3191
|
+
var Backdrop = function Backdrop(props) {
|
3192
|
+
var className = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] animate-[fade-in_150ms] aria-hidden:hidden', props.className);
|
3193
|
+
return React.createElement("div", Object.assign({}, props, {
|
3194
|
+
className: className
|
3195
|
+
}));
|
3196
|
+
};
|
3197
|
+
|
3191
3198
|
var VisuallyHidden = /*#__PURE__*/React.forwardRef(function VisuallyHidden(props, ref) {
|
3192
3199
|
return React.createElement("span", Object.assign({}, props, {
|
3193
3200
|
className: "sr-only",
|
@@ -4092,10 +4099,9 @@ var Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref)
|
|
4092
4099
|
'w-md': dialog.size === 'md',
|
4093
4100
|
'w-lg': dialog.size === 'lg'
|
4094
4101
|
});
|
4095
|
-
var containerClassName = cn('
|
4102
|
+
var containerClassName = cn('bg-white p-6 rounded relative z-[999]', 'shadow-[0_6px_9px_0_rgba(89,85,98,0.3),0_0_1px_0_rgba(89,85,98,0.2)]', {
|
4096
4103
|
'rounded-b-none': !!dialog.elements.extra
|
4097
|
-
}, props.className);
|
4098
|
-
var overlayClassName = cn('fixed inset-0 cursor-default overflow-y-auto bg-[rgba(50,46,62,0.8)] animate-[fade-in_150ms] aria-hidden:hidden'); // the chosen behaviour in taco is that outside clicks do not close the dialog
|
4104
|
+
}, props.className); // the chosen behaviour in taco is that outside clicks do not close the dialog
|
4099
4105
|
|
4100
4106
|
var handleInteractOutside = function handleInteractOutside(event) {
|
4101
4107
|
return event.preventDefault();
|
@@ -4113,10 +4119,9 @@ var Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref)
|
|
4113
4119
|
}
|
4114
4120
|
|
4115
4121
|
return React.createElement(DialogPrimitive.Portal, null, React.createElement(DialogPrimitive.Overlay, {
|
4116
|
-
|
4117
|
-
}, React.createElement(DialogPrimitive.Content, Object.assign({}, props, {
|
4122
|
+
asChild: true
|
4123
|
+
}, React.createElement(Backdrop, null, React.createElement(DialogPrimitive.Content, Object.assign({}, props, {
|
4118
4124
|
className: className,
|
4119
|
-
"data-taco": "dialog",
|
4120
4125
|
onEscapeKeyDown: dialog.onClose,
|
4121
4126
|
onInteractOutside: handleInteractOutside,
|
4122
4127
|
onCloseAutoFocus: handleCloseAutoFocus,
|
@@ -4126,7 +4131,8 @@ var Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref)
|
|
4126
4131
|
top: dialog.draggable ? "calc(50% + " + position.y + "px)" : undefined
|
4127
4132
|
})
|
4128
4133
|
}), React.createElement("div", {
|
4129
|
-
className: containerClassName
|
4134
|
+
className: containerClassName,
|
4135
|
+
"data-taco": "dialog"
|
4130
4136
|
}, output, dialog.draggable && React.createElement("div", Object.assign({}, dragHandleProps, {
|
4131
4137
|
"aria-label": texts.dialog.drag,
|
4132
4138
|
className: "yt-dialog__drag absolute-center-x bg-grey-light top-1.5 h-3 w-24 cursor-move rounded text-center"
|
@@ -4138,7 +4144,7 @@ var Content$2 = /*#__PURE__*/React.forwardRef(function DialogContent(props, ref)
|
|
4138
4144
|
"aria-label": texts.dialog.close,
|
4139
4145
|
className: "absolute top-0 right-0 mt-2 mr-2",
|
4140
4146
|
icon: "close"
|
4141
|
-
}))), dialog.elements.drawer, dialog.elements.extra)));
|
4147
|
+
}))), dialog.elements.drawer, dialog.elements.extra))));
|
4142
4148
|
});
|
4143
4149
|
|
4144
4150
|
var Drawer = /*#__PURE__*/React.forwardRef(function DialogDrawer(props, ref) {
|
@@ -7474,6 +7480,7 @@ var Pagination = /*#__PURE__*/React.forwardRef(function Pagination(props, ref) {
|
|
7474
7480
|
var className = cn('inline-flex relative justify-between items-center', props.className);
|
7475
7481
|
return React.createElement("div", Object.assign({}, otherProps, {
|
7476
7482
|
className: className,
|
7483
|
+
"data-taco": "pagination",
|
7477
7484
|
ref: ref
|
7478
7485
|
}), showPageSize && React.createElement("span", {
|
7479
7486
|
className: "mr-4"
|
@@ -9419,12 +9426,6 @@ var tailwindcssAriaAttributes = {
|
|
9419
9426
|
__proto__: null
|
9420
9427
|
};
|
9421
9428
|
|
9422
|
-
function getCjsExportFromNamespace (n) {
|
9423
|
-
return n && n['default'] || n;
|
9424
|
-
}
|
9425
|
-
|
9426
|
-
var require$$0 = getCjsExportFromNamespace(tailwindcssAriaAttributes);
|
9427
|
-
|
9428
9429
|
var tailwind_config = {
|
9429
9430
|
theme: {
|
9430
9431
|
colors: {
|
@@ -9500,7 +9501,7 @@ var tailwind_config = {
|
|
9500
9501
|
}
|
9501
9502
|
}
|
9502
9503
|
},
|
9503
|
-
plugins: [/*#__PURE__*/
|
9504
|
+
plugins: [/*#__PURE__*/tailwindcssAriaAttributes, /*#__PURE__*/plugin(function (_ref) {
|
9504
9505
|
var addUtilities = _ref.addUtilities,
|
9505
9506
|
theme = _ref.theme;
|
9506
9507
|
// ideally we would do this using the @layer utilities directive, but
|
@@ -9882,6 +9883,7 @@ var useOnClickOutside = function useOnClickOutside(ref, callback) {
|
|
9882
9883
|
};
|
9883
9884
|
|
9884
9885
|
exports.Accordion = Accordion;
|
9886
|
+
exports.Backdrop = Backdrop;
|
9885
9887
|
exports.Badge = Badge;
|
9886
9888
|
exports.Banner = Banner;
|
9887
9889
|
exports.Button = Button$1;
|