@economic/taco 1.27.0 → 1.28.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Calendar/Calendar.d.ts +2 -0
- package/dist/components/Header/components/Button.d.ts +0 -2
- package/dist/components/Header/components/Link.d.ts +0 -1
- package/dist/components/Header/components/SecondaryNavigation.d.ts +2 -2
- package/dist/components/OverflowGroup/OverflowGroup.d.ts +5 -0
- package/dist/components/Provider/Localization.d.ts +1 -0
- package/dist/components/Toast/util.d.ts +2 -1
- package/dist/esm/index.css +3 -3
- package/dist/esm/packages/taco/src/components/Alert/Alert.js +1 -1
- package/dist/esm/packages/taco/src/components/Alert/Alert.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Badge/Badge.js +1 -1
- package/dist/esm/packages/taco/src/components/Badge/Badge.js.map +1 -1
- package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js +1 -1
- package/dist/esm/packages/taco/src/components/BadgeIcon/BadgeIcon.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +12 -5
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +8 -4
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/Drawer.js +1 -1
- package/dist/esm/packages/taco/src/components/Drawer/components/Content.js +2 -2
- package/dist/esm/packages/taco/src/components/Header/components/AgreementSelector.js +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Button.js +2 -6
- package/dist/esm/packages/taco/src/components/Header/components/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/Link.js +3 -7
- package/dist/esm/packages/taco/src/components/Header/components/Link.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js +7 -114
- package/dist/esm/packages/taco/src/components/Header/components/PrimaryNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js +2 -2
- package/dist/esm/packages/taco/src/components/Header/components/SecondaryNavigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Icon/Icon.js +1 -0
- package/dist/esm/packages/taco/src/components/Icon/Icon.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/Input.js +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useListbox.js +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/useMultiListbox.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/Menu.js +2 -2
- package/dist/esm/packages/taco/src/components/Menu/components/Content.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Header.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Link.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Trigger.js +1 -1
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js +75 -0
- package/dist/esm/packages/taco/src/components/OverflowGroup/OverflowGroup.js.map +1 -0
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +1 -0
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/useSelect.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +2 -2
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +3 -3
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/useTableKeyboardNavigation.js +1 -1
- package/dist/esm/packages/taco/src/components/Table2/components/column/Cell.js +1 -1
- package/dist/esm/packages/taco/src/components/Table2/components/filters/FiltersButton.js +1 -1
- package/dist/esm/packages/taco/src/components/Table2/utilities/columns.js +1 -1
- package/dist/esm/packages/taco/src/components/Tag/Tag.js +1 -1
- package/dist/esm/packages/taco/src/components/Tag/Tag.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toast.js +2 -2
- package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/util.js +2 -1
- package/dist/esm/packages/taco/src/components/Toast/util.js.map +1 -1
- package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js +1 -1
- package/dist/esm/packages/taco/src/hooks/useIntersectionObserver.js.map +1 -1
- package/dist/esm/packages/taco/src/index.js +8 -8
- package/dist/esm/packages/taco/src/utils/{taillwind.js → tailwind.js} +1 -1
- package/dist/esm/packages/taco/src/utils/tailwind.js.map +1 -0
- package/dist/index.css +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/taco.cjs.development.js +1235 -1307
- 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/dist/types.d.ts +1 -1
- package/dist/utils/tailwind.d.ts +6 -1
- package/package.json +4 -3
- package/types.json +10 -14
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +0 -5
- package/dist/esm/packages/taco/src/components/ButtonGroup/ButtonGroup.js +0 -46
- package/dist/esm/packages/taco/src/components/ButtonGroup/ButtonGroup.js.map +0 -1
- package/dist/esm/packages/taco/src/utils/taillwind.js.map +0 -1
- package/dist/utils/taillwind.d.ts +0 -6
@@ -3,131 +3,24 @@ import cn from 'classnames';
|
|
3
3
|
import { useLocalization } from '../../Provider/Localization.js';
|
4
4
|
import { Button } from '../../Button/Button.js';
|
5
5
|
import { useMergedRef } from '../../../hooks/useMergedRef.js';
|
6
|
-
import {
|
7
|
-
import { useBoundingClientRectListener } from '../../../hooks/useBoundingClientRectListener.js';
|
6
|
+
import { OverflowGroup } from '../../OverflowGroup/OverflowGroup.js';
|
8
7
|
import { getLinkClasses } from './Link.js';
|
9
|
-
import { Portal } from '@radix-ui/react-portal';
|
10
8
|
|
11
|
-
const getChildWidths = parent => {
|
12
|
-
const widths = [];
|
13
|
-
for (let index = 0; index < parent.children.length; index++) {
|
14
|
-
var _parent$children$inde, _childRect$width;
|
15
|
-
const childRect = (_parent$children$inde = parent.children[index].firstElementChild) === null || _parent$children$inde === void 0 ? void 0 : _parent$children$inde.getBoundingClientRect();
|
16
|
-
widths.push((_childRect$width = childRect === null || childRect === void 0 ? void 0 : childRect.width) !== null && _childRect$width !== void 0 ? _childRect$width : 0);
|
17
|
-
}
|
18
|
-
return widths;
|
19
|
-
};
|
20
|
-
const ChildrenWidth = ({
|
21
|
-
setWidth,
|
22
|
-
children
|
23
|
-
}) => {
|
24
|
-
const ref = React__default.useRef(null);
|
25
|
-
const [show, setShow] = React__default.useState(true);
|
26
|
-
React__default.useEffect(() => {
|
27
|
-
// Calculate the width of children, and then hides the portal
|
28
|
-
if (ref.current && show) {
|
29
|
-
setWidth(getChildWidths(ref.current));
|
30
|
-
setShow(false);
|
31
|
-
}
|
32
|
-
}, [show]);
|
33
|
-
React__default.useEffect(() => {
|
34
|
-
// If children changes, then we render the children to calculate their width
|
35
|
-
if (!show) {
|
36
|
-
setShow(true);
|
37
|
-
}
|
38
|
-
}, [children]);
|
39
|
-
return show ? /*#__PURE__*/React__default.createElement(Portal, {
|
40
|
-
className: cn('invisible absolute z-[-10] flex translate-x-[-1000px]'),
|
41
|
-
ref: ref
|
42
|
-
}, children) : null;
|
43
|
-
};
|
44
|
-
const useBoundaryIndex = (wrapperWidth, buttonRef, childWidths) => {
|
45
|
-
// Primary navigation has a gap of gap-1, so we need to take the gap value in account as well
|
46
|
-
// left gap + right gap = 8px
|
47
|
-
const GAP = 8;
|
48
|
-
return React__default.useMemo(() => {
|
49
|
-
if (childWidths.length && wrapperWidth && buttonRef.current) {
|
50
|
-
const realWidth = wrapperWidth - buttonRef.current.getBoundingClientRect().width - GAP;
|
51
|
-
let boundary;
|
52
|
-
let total = 0;
|
53
|
-
childWidths.every((width, index) => {
|
54
|
-
const nextWidth = total + width + GAP;
|
55
|
-
if (nextWidth > realWidth) {
|
56
|
-
boundary = index;
|
57
|
-
return false;
|
58
|
-
}
|
59
|
-
total = nextWidth;
|
60
|
-
return true;
|
61
|
-
});
|
62
|
-
return boundary;
|
63
|
-
}
|
64
|
-
return undefined;
|
65
|
-
}, [childWidths, wrapperWidth]);
|
66
|
-
};
|
67
9
|
const PrimaryNavigation = /*#__PURE__*/React__default.forwardRef(function PrimaryNavigation(props, ref) {
|
68
|
-
var _rect$width;
|
69
10
|
const {
|
70
11
|
texts
|
71
12
|
} = useLocalization();
|
72
13
|
const internalRef = useMergedRef(ref);
|
73
|
-
const rect = useBoundingClientRectListener(internalRef);
|
74
|
-
const buttonRef = React__default.useRef(null);
|
75
|
-
const [childWidths, setChildWidths] = React__default.useState([]);
|
76
|
-
const boundaryIndex = useBoundaryIndex((_rect$width = rect === null || rect === void 0 ? void 0 : rect.width) !== null && _rect$width !== void 0 ? _rect$width : 0, buttonRef, childWidths);
|
77
14
|
const className = cn('flex h-full w-full flex-grow items-center overflow-hidden active:outline-none relative', props.className);
|
78
|
-
const
|
79
|
-
|
80
|
-
|
81
|
-
const hiddenChildren = [];
|
82
|
-
React__default.Children.forEach(props.children, (child, index) => {
|
83
|
-
if ( /*#__PURE__*/React__default.isValidElement(child) && !!child) {
|
84
|
-
if (boundaryIndex && index >= boundaryIndex) {
|
85
|
-
hiddenChildren.push(child);
|
86
|
-
} else {
|
87
|
-
visibleChildren.push(child);
|
88
|
-
}
|
89
|
-
}
|
90
|
-
});
|
91
|
-
return [visibleChildren, hiddenChildren];
|
92
|
-
}, [boundaryIndex, props.children]);
|
15
|
+
const moreButton = /*#__PURE__*/React__default.createElement(Button, {
|
16
|
+
className: cn(getLinkClasses(), '!bg-transparent aria-expanded:!bg-white/[.08]')
|
17
|
+
}, texts.header.more);
|
93
18
|
return /*#__PURE__*/React__default.createElement("nav", Object.assign({}, props, {
|
94
19
|
className: className,
|
95
20
|
ref: internalRef
|
96
|
-
}), /*#__PURE__*/React__default.createElement(
|
97
|
-
className: "
|
98
|
-
|
99
|
-
className: cn({
|
100
|
-
invisible: boundaryIndex === undefined
|
101
|
-
})
|
102
|
-
}, /*#__PURE__*/React__default.createElement(Button, {
|
103
|
-
className: moreButtonClassName,
|
104
|
-
menu: menuProps => /*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, {
|
105
|
-
className: "hidden lg:block"
|
106
|
-
}, hiddenChildren.map((child, index) => {
|
107
|
-
const href = child.props.to || child.props.href;
|
108
|
-
const target = href !== null && href !== void 0 && href.startsWith('http') ? '_blank' : '_self';
|
109
|
-
// Removing className prop so that custom styling cannot be applied on Menu.Link
|
110
|
-
const {
|
111
|
-
as,
|
112
|
-
className: _,
|
113
|
-
...otherProps
|
114
|
-
} = child.props;
|
115
|
-
if (as) {
|
116
|
-
return /*#__PURE__*/React__default.cloneElement(child, {
|
117
|
-
as: Menu.Link,
|
118
|
-
key: index,
|
119
|
-
target,
|
120
|
-
...otherProps
|
121
|
-
});
|
122
|
-
}
|
123
|
-
return /*#__PURE__*/React__default.createElement(Menu.Link, Object.assign({
|
124
|
-
key: index,
|
125
|
-
target: target
|
126
|
-
}, otherProps));
|
127
|
-
}))),
|
128
|
-
ref: buttonRef
|
129
|
-
}, texts.header.more))), /*#__PURE__*/React__default.createElement(ChildrenWidth, {
|
130
|
-
setWidth: setChildWidths
|
21
|
+
}), /*#__PURE__*/React__default.createElement(OverflowGroup, {
|
22
|
+
className: "h-full flex-grow items-center gap-1 px-1",
|
23
|
+
moreButton: moreButton
|
131
24
|
}, props.children));
|
132
25
|
});
|
133
26
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"PrimaryNavigation.js","sources":["../../../../../../../../src/components/Header/components/PrimaryNavigation.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Portal } from '@radix-ui/react-portal';\nimport { getLinkClasses } from './Link';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { useBoundingClientRectListener } from '../../../hooks/useBoundingClientRectListener';\nimport { Button } from '../../Button/Button';\nimport { Menu } from '../../Menu/Menu';\nimport { useLocalization } from '../../Provider/Localization';\n\ntype ChildrenWidthProps = {\n setWidth: React.Dispatch<React.SetStateAction<number[]>>;\n children: React.ReactNode;\n};\n\nconst getChildWidths = (parent: HTMLDivElement): number[] => {\n const widths: number[] = [];\n\n for (let index = 0; index < parent.children.length; index++) {\n const childRect = parent.children[index].firstElementChild?.getBoundingClientRect();\n widths.push(childRect?.width ?? 0);\n }\n\n return widths;\n};\n\nconst ChildrenWidth = ({ setWidth, children }: ChildrenWidthProps) => {\n const ref = React.useRef<HTMLDivElement>(null);\n const [show, setShow] = React.useState(true);\n\n React.useEffect(() => {\n // Calculate the width of children, and then hides the portal\n if (ref.current && show) {\n setWidth(getChildWidths(ref.current));\n setShow(false);\n }\n }, [show]);\n\n React.useEffect(() => {\n // If children changes, then we render the children to calculate their width\n if (!show) {\n setShow(true);\n }\n }, [children]);\n\n return show ? (\n <Portal className={cn('invisible absolute z-[-10] flex translate-x-[-1000px]')} ref={ref}>\n {children}\n </Portal>\n ) : null;\n};\n\nconst useBoundaryIndex = (wrapperWidth: number, buttonRef: React.RefObject<HTMLButtonElement>, childWidths: number[]) => {\n // Primary navigation has a gap of gap-1, so we need to take the gap value in account as well\n // left gap + right gap = 8px\n const GAP = 8;\n\n return React.useMemo(() => {\n if (childWidths.length && wrapperWidth && buttonRef.current) {\n const realWidth = wrapperWidth - buttonRef.current.getBoundingClientRect().width - GAP;\n let boundary: number | undefined;\n let total = 0;\n\n childWidths.every((width, index) => {\n const nextWidth = total + width + GAP;\n\n if (nextWidth > realWidth) {\n boundary = index;\n return false;\n }\n\n total = nextWidth;\n return true;\n });\n\n return boundary;\n }\n\n return undefined;\n }, [childWidths, wrapperWidth]);\n};\n\nexport type PrimaryNavigationProps = React.HTMLAttributes<HTMLElement>;\n\nexport const PrimaryNavigation = React.forwardRef<HTMLElement, PrimaryNavigationProps>(function PrimaryNavigation(props, ref) {\n const { texts } = useLocalization();\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n const rect = useBoundingClientRectListener(internalRef);\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n const [childWidths, setChildWidths] = React.useState<number[]>([]);\n const boundaryIndex = useBoundaryIndex(rect?.width ?? 0, buttonRef, childWidths);\n\n const className = cn(\n 'flex h-full w-full flex-grow items-center overflow-hidden active:outline-none relative',\n props.className\n );\n\n const moreButtonClassName = cn(getLinkClasses(), '!bg-transparent aria-expanded:!bg-white/[.08]');\n\n const [visibleChildren, hiddenChildren] = React.useMemo(() => {\n const visibleChildren: JSX.Element[] = [];\n const hiddenChildren: JSX.Element[] = [];\n\n React.Children.forEach(props.children, (child, index) => {\n if (React.isValidElement(child) && !!child) {\n if (boundaryIndex && index >= boundaryIndex) {\n hiddenChildren.push(child);\n } else {\n visibleChildren.push(child);\n }\n }\n });\n\n return [visibleChildren, hiddenChildren];\n }, [boundaryIndex, props.children]);\n\n return (\n <nav {...props} className={className} ref={internalRef}>\n <ul className=\"mb-0 flex h-full w-full items-center gap-1 overflow-hidden px-1\">\n {visibleChildren}\n <li className={cn({ invisible: boundaryIndex === undefined })}>\n <Button\n className={moreButtonClassName}\n menu={menuProps => (\n <Menu {...menuProps}>\n <Menu.Content className=\"hidden lg:block\">\n {hiddenChildren.map((child, index) => {\n const href: string | undefined = child.props.to || child.props.href;\n const target = href?.startsWith('http') ? '_blank' : '_self';\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const { as, className: _, ...otherProps } = child.props;\n\n if (as) {\n return React.cloneElement(child, {\n as: Menu.Link,\n key: index,\n target,\n ...otherProps,\n });\n }\n\n return <Menu.Link key={index} target={target} {...otherProps} />;\n })}\n </Menu.Content>\n </Menu>\n )}\n ref={buttonRef}>\n {texts.header.more}\n </Button>\n </li>\n </ul>\n <ChildrenWidth setWidth={setChildWidths}>{props.children}</ChildrenWidth>\n </nav>\n );\n});\n"],"names":["getChildWidths","parent","widths","index","children","length","childRect","firstElementChild","getBoundingClientRect","push","width","ChildrenWidth","setWidth","ref","React","useRef","show","setShow","useState","useEffect","current","Portal","className","cn","useBoundaryIndex","wrapperWidth","buttonRef","childWidths","GAP","useMemo","realWidth","boundary","total","every","nextWidth","undefined","PrimaryNavigation","forwardRef","props","texts","useLocalization","internalRef","useMergedRef","rect","useBoundingClientRectListener","setChildWidths","boundaryIndex","moreButtonClassName","getLinkClasses","visibleChildren","hiddenChildren","Children","forEach","child","isValidElement","invisible","Button","menu","menuProps","Menu","Content","map","href","to","target","startsWith","as","_","otherProps","cloneElement","Link","key","header","more"],"mappings":";;;;;;;;;;AAeA,MAAMA,cAAc,GAAIC,MAAsB;EAC1C,MAAMC,MAAM,GAAa,EAAE;EAE3B,KAAK,IAAIC,KAAK,GAAG,CAAC,EAAEA,KAAK,GAAGF,MAAM,CAACG,QAAQ,CAACC,MAAM,EAAEF,KAAK,EAAE,EAAE;IAAA;IACzD,MAAMG,SAAS,4BAAGL,MAAM,CAACG,QAAQ,CAACD,KAAK,CAAC,CAACI,iBAAiB,0DAAxC,sBAA0CC,qBAAqB,EAAE;IACnFN,MAAM,CAACO,IAAI,qBAACH,SAAS,aAATA,SAAS,uBAATA,SAAS,CAAEI,KAAK,+DAAI,CAAC,CAAC;;EAGtC,OAAOR,MAAM;AACjB,CAAC;AAED,MAAMS,aAAa,GAAG,CAAC;EAAEC,QAAQ;EAAER;CAA8B;EAC7D,MAAMS,GAAG,GAAGC,cAAK,CAACC,MAAM,CAAiB,IAAI,CAAC;EAC9C,MAAM,CAACC,IAAI,EAAEC,OAAO,CAAC,GAAGH,cAAK,CAACI,QAAQ,CAAC,IAAI,CAAC;EAE5CJ,cAAK,CAACK,SAAS,CAAC;;IAEZ,IAAIN,GAAG,CAACO,OAAO,IAAIJ,IAAI,EAAE;MACrBJ,QAAQ,CAACZ,cAAc,CAACa,GAAG,CA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3,"file":"PrimaryNavigation.js","sources":["../../../../../../../../src/components/Header/components/PrimaryNavigation.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { getLinkClasses } from './Link';\nimport { useLocalization } from '../../Provider/Localization';\nimport { useMergedRef } from '../../../hooks/useMergedRef';\nimport { Button } from '../../Button/Button';\nimport { OverflowGroup } from '../../OverflowGroup/OverflowGroup';\n\nexport type PrimaryNavigationProps = React.HTMLAttributes<HTMLElement>;\n\nexport const PrimaryNavigation = React.forwardRef<HTMLElement, PrimaryNavigationProps>(function PrimaryNavigation(props, ref) {\n const { texts } = useLocalization();\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n\n const className = cn(\n 'flex h-full w-full flex-grow items-center overflow-hidden active:outline-none relative',\n props.className\n );\n\n const moreButton = (\n <Button className={cn(getLinkClasses(), '!bg-transparent aria-expanded:!bg-white/[.08]')}>{texts.header.more}</Button>\n );\n return (\n <nav {...props} className={className} ref={internalRef}>\n <OverflowGroup className=\"h-full flex-grow items-center gap-1 px-1\" moreButton={moreButton}>\n {props.children}\n </OverflowGroup>\n </nav>\n );\n});\n"],"names":["PrimaryNavigation","React","forwardRef","props","ref","texts","useLocalization","internalRef","useMergedRef","className","cn","moreButton","Button","getLinkClasses","header","more","OverflowGroup","children"],"mappings":";;;;;;;;MAUaA,iBAAiB,gBAAGC,cAAK,CAACC,UAAU,CAAsC,SAASF,iBAAiB,CAACG,KAAK,EAAEC,GAAG;EACxH,MAAM;IAAEC;GAAO,GAAGC,eAAe,EAAE;EACnC,MAAMC,WAAW,GAAGC,YAAY,CAAiBJ,GAAG,CAAC;EAErD,MAAMK,SAAS,GAAGC,EAAE,CAChB,wFAAwF,EACxFP,KAAK,CAACM,SAAS,CAClB;EAED,MAAME,UAAU,gBACZV,6BAACW,MAAM;IAACH,SAAS,EAAEC,EAAE,CAACG,cAAc,EAAE,EAAE,+CAA+C;KAAIR,KAAK,CAACS,MAAM,CAACC,IAAI,CAC/G;EACD,oBACId,sDAASE,KAAK;IAAEM,SAAS,EAAEA,SAAS;IAAEL,GAAG,EAAEG;mBACvCN,6BAACe,aAAa;IAACP,SAAS,EAAC,0CAA0C;IAACE,UAAU,EAAEA;KAC3ER,KAAK,CAACc,QAAQ,CACH,CACd;AAEd,CAAC;;;;"}
|
@@ -2,8 +2,8 @@ import React__default from 'react';
|
|
2
2
|
import cn from 'classnames';
|
3
3
|
|
4
4
|
const SecondaryNavigation = /*#__PURE__*/React__default.forwardRef(function SecondaryNavigation(props, ref) {
|
5
|
-
const className = cn('flex h-full items-center gap-2 mb-0', props.className);
|
6
|
-
return /*#__PURE__*/React__default.createElement("
|
5
|
+
const className = cn('flex h-full items-center gap-2 mb-0 flex-shrink-0', props.className);
|
6
|
+
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, props, {
|
7
7
|
className: className,
|
8
8
|
ref: ref
|
9
9
|
}));
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SecondaryNavigation.js","sources":["../../../../../../../../src/components/Header/components/SecondaryNavigation.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nexport type SecondaryNavigationProps = React.HTMLAttributes<
|
1
|
+
{"version":3,"file":"SecondaryNavigation.js","sources":["../../../../../../../../src/components/Header/components/SecondaryNavigation.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\n\nexport type SecondaryNavigationProps = React.HTMLAttributes<HTMLDivElement>;\n\nexport const SecondaryNavigation = React.forwardRef<HTMLDivElement, SecondaryNavigationProps>(function SecondaryNavigation(\n props,\n ref\n) {\n const className = cn('flex h-full items-center gap-2 mb-0 flex-shrink-0', props.className);\n return <div {...props} className={className} ref={ref} />;\n});\n"],"names":["SecondaryNavigation","React","forwardRef","props","ref","className","cn"],"mappings":";;;MAKaA,mBAAmB,gBAAGC,cAAK,CAACC,UAAU,CAA2C,SAASF,mBAAmB,CACtHG,KAAK,EACLC,GAAG;EAEH,MAAMC,SAAS,GAAGC,EAAE,CAAC,mDAAmD,EAAEH,KAAK,CAACE,SAAS,CAAC;EAC1F,oBAAOJ,sDAASE,KAAK;IAAEE,SAAS,EAAEA,SAAS;IAAED,GAAG,EAAEA;KAAO;AAC7D,CAAC;;;;"}
|
@@ -17,6 +17,7 @@ const Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
|
|
17
17
|
return Component ? /*#__PURE__*/React__default.createElement(Component, Object.assign({}, otherProps, {
|
18
18
|
className: className,
|
19
19
|
"data-taco": "icon",
|
20
|
+
"data-icon-name": name,
|
20
21
|
focusable: "false",
|
21
22
|
ref: ref,
|
22
23
|
role: "img"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { IconName, icons } from './components/index';\n\nexport { icons } from './components/index';\nexport type { IconName } from './components/index';\n\nexport type IconProps = React.SVGAttributes<SVGSVGElement> & {\n /** Set what svg icon should be rendered */\n name: IconName; // this dynamic type causes the type extraction for props to fail\n};\n\nexport const Icon = React.forwardRef(function Icon(props: IconProps, ref: React.Ref<SVGSVGElement>) {\n const { name, ...otherProps } = props;\n const Component = icons[name];\n /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */\n const className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {\n 'p-[3px]': props.className?.includes('rounded-full'),\n });\n\n return Component ? (\n <Component
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { IconName, icons } from './components/index';\n\nexport { icons } from './components/index';\nexport type { IconName } from './components/index';\n\nexport type IconProps = React.SVGAttributes<SVGSVGElement> & {\n /** Set what svg icon should be rendered */\n name: IconName; // this dynamic type causes the type extraction for props to fail\n};\n\nexport const Icon = React.forwardRef(function Icon(props: IconProps, ref: React.Ref<SVGSVGElement>) {\n const { name, ...otherProps } = props;\n const Component = icons[name];\n /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */\n const className = cn('inline-flex h-[1.715em] w-[1.715em] flex-shrink-0', props.className, {\n 'p-[3px]': props.className?.includes('rounded-full'),\n });\n\n return Component ? (\n <Component\n {...otherProps}\n className={className}\n data-taco=\"icon\"\n data-icon-name={name}\n focusable=\"false\"\n ref={ref}\n role=\"img\"\n />\n ) : null;\n});\n"],"names":["Icon","React","forwardRef","props","ref","name","otherProps","Component","icons","className","cn","includes","focusable","role"],"mappings":";;;;;MAYaA,IAAI,gBAAGC,cAAK,CAACC,UAAU,CAAC,SAASF,IAAI,CAACG,KAAgB,EAAEC,GAA6B;;EAC9F,MAAM;IAAEC,IAAI;IAAE,GAAGC;GAAY,GAAGH,KAAK;EACrC,MAAMI,SAAS,GAAGC,KAAK,CAACH,IAAI,CAAC;;EAE7B,MAAMI,SAAS,GAAGC,EAAE,CAAC,mDAAmD,EAAEP,KAAK,CAACM,SAAS,EAAE;IACvF,SAAS,sBAAEN,KAAK,CAACM,SAAS,qDAAf,iBAAiBE,QAAQ,CAAC,cAAc;GACtD,CAAC;EAEF,OAAOJ,SAAS,gBACZN,6BAACM,SAAS,oBACFD,UAAU;IACdG,SAAS,EAAEA,SAAS;iBACV,MAAM;sBACAJ,IAAI;IACpBO,SAAS,EAAC,OAAO;IACjBR,GAAG,EAAEA,GAAG;IACRS,IAAI,EAAC;KACP,GACF,IAAI;AACZ,CAAC;;;;"}
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { forwardRef, createElement, useRef, memo, cloneElement } from 'react';
|
2
2
|
import cn from 'classnames';
|
3
3
|
import { Icon } from '../Icon/Icon.js';
|
4
|
-
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
5
4
|
import { getButtonStateClasses, getInputClasses } from './util.js';
|
6
5
|
import { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener.js';
|
6
|
+
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
7
7
|
|
8
8
|
const validSetSelectionRangeTypes = ['text', 'search', 'url', 'tel', 'password'];
|
9
9
|
const InputWithoutDeprecatedFeatures = /*#__PURE__*/forwardRef(function InputWithoutDeprecatedFeatures(props, ref) {
|
@@ -1,9 +1,9 @@
|
|
1
1
|
import { forwardRef, useMemo, createRef, useEffect, createElement } from 'react';
|
2
2
|
import cn from 'classnames';
|
3
3
|
import { useLocalization } from '../Provider/Localization.js';
|
4
|
-
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
5
4
|
import { Checkbox } from '../Checkbox/Checkbox.js';
|
6
5
|
import { getInputClasses } from '../Input/util.js';
|
6
|
+
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
7
7
|
import { getNextIndexFromKey } from '../../utils/hooks/useListKeyboardNavigation.js';
|
8
8
|
import { useListScrollTo } from '../../utils/hooks/useListScrollTo.js';
|
9
9
|
import { Spinner } from '../Spinner/Spinner.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { useMemo, useEffect } from 'react';
|
2
|
-
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
3
2
|
import { v4 } from 'uuid';
|
3
|
+
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
4
4
|
import { useFlattenedData, getIndexFromValue, getActiveDescendant, setInputValueByRef, findByValue, sanitizeItem } from './util.js';
|
5
5
|
import { useTypeahead } from './useTypeahead.js';
|
6
6
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { useMemo, useState, useEffect } from 'react';
|
2
2
|
import { useLocalization } from '../Provider/Localization.js';
|
3
|
-
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
4
3
|
import { v4 } from 'uuid';
|
4
|
+
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
5
5
|
import { getIndexFromValue, getSelectedIndexesFromValue, setInputValueByRef, getActiveDescendant, findByValue } from './util.js';
|
6
6
|
import { useTypeahead } from './useTypeahead.js';
|
7
7
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { forwardRef, useState, useMemo, createElement } from 'react';
|
2
|
-
import { Root } from '@radix-ui/react-dropdown-menu';
|
3
|
-
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
4
2
|
import { MenuContext } from './Context.js';
|
3
|
+
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
4
|
+
import { Root } from '@radix-ui/react-dropdown-menu';
|
5
5
|
import { Content } from './components/Content.js';
|
6
6
|
import { Item } from './components/Item.js';
|
7
7
|
import { Link } from './components/Link.js';
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { forwardRef, createElement } from 'react';
|
2
2
|
import cn from 'classnames';
|
3
3
|
import { useMergedRef } from '../../../hooks/useMergedRef.js';
|
4
|
-
import { Portal, Content as Content$1 } from '@radix-ui/react-dropdown-menu';
|
5
4
|
import { useCurrentMenu } from '../Context.js';
|
5
|
+
import { Portal, Content as Content$1 } from '@radix-ui/react-dropdown-menu';
|
6
6
|
|
7
7
|
const Content = /*#__PURE__*/forwardRef(function MenuContent(props, ref) {
|
8
8
|
const internalRef = useMergedRef(ref);
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { forwardRef, createElement } from 'react';
|
2
2
|
import cn from 'classnames';
|
3
|
-
import { Label } from '@radix-ui/react-dropdown-menu';
|
4
3
|
import { useCurrentMenu } from '../Context.js';
|
4
|
+
import { Label } from '@radix-ui/react-dropdown-menu';
|
5
5
|
|
6
6
|
const Header = /*#__PURE__*/forwardRef(function MenuHeader(props, ref) {
|
7
7
|
const menu = useCurrentMenu();
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { forwardRef, createElement, useEffect } from 'react';
|
2
2
|
import cn from 'classnames';
|
3
3
|
import { Icon as Icon$1 } from '../../Icon/Icon.js';
|
4
|
-
import { Item as Item$1 } from '@radix-ui/react-dropdown-menu';
|
5
4
|
import { useCurrentMenu } from '../Context.js';
|
5
|
+
import { Item as Item$1 } from '@radix-ui/react-dropdown-menu';
|
6
6
|
|
7
7
|
const Icon = ({
|
8
8
|
name
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { forwardRef, createElement } from 'react';
|
2
|
-
import { Item } from '@radix-ui/react-dropdown-menu';
|
3
2
|
import { useCurrentMenu } from '../Context.js';
|
3
|
+
import { Item } from '@radix-ui/react-dropdown-menu';
|
4
4
|
import { useItemStyling, Icon } from './Item.js';
|
5
5
|
|
6
6
|
const Link = /*#__PURE__*/forwardRef(function MenuLink(props, ref) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { forwardRef, useEffect, createElement } from 'react';
|
2
2
|
import { useMergedRef } from '../../../hooks/useMergedRef.js';
|
3
|
-
import { Trigger as Trigger$1 } from '@radix-ui/react-dropdown-menu';
|
4
3
|
import { useCurrentMenu } from '../Context.js';
|
4
|
+
import { Trigger as Trigger$1 } from '@radix-ui/react-dropdown-menu';
|
5
5
|
|
6
6
|
const Trigger = /*#__PURE__*/forwardRef(function MenuTrigger(props, ref) {
|
7
7
|
const menu = useCurrentMenu();
|
@@ -0,0 +1,75 @@
|
|
1
|
+
import React__default from 'react';
|
2
|
+
import cn from 'classnames';
|
3
|
+
import { IconButton } from '../IconButton/IconButton.js';
|
4
|
+
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
5
|
+
import { Menu } from '../Menu/Menu.js';
|
6
|
+
import { useIntersectionObserver } from '../../hooks/useIntersectionObserver.js';
|
7
|
+
|
8
|
+
const sanitizeButtonPropsForMenuItem = (button, index) => {
|
9
|
+
const href = button.props.to || button.props.href;
|
10
|
+
const Tag = href ? Menu.Link : Menu.Item;
|
11
|
+
// Removing className prop so that custom styling cannot be applied on Menu.Link
|
12
|
+
const {
|
13
|
+
as,
|
14
|
+
className: _,
|
15
|
+
appearance: _1,
|
16
|
+
drawer: _2,
|
17
|
+
fluid: _3,
|
18
|
+
hanger: _4,
|
19
|
+
menu: _5,
|
20
|
+
popover: _6,
|
21
|
+
tooltip: _7,
|
22
|
+
...attributes
|
23
|
+
} = button.props;
|
24
|
+
const props = {
|
25
|
+
...attributes,
|
26
|
+
key: index,
|
27
|
+
target: href ? href.startsWith('http') ? '_blank' : '_self' : undefined
|
28
|
+
};
|
29
|
+
if (as) {
|
30
|
+
return /*#__PURE__*/React__default.cloneElement(button, {
|
31
|
+
as: Tag,
|
32
|
+
...props
|
33
|
+
});
|
34
|
+
}
|
35
|
+
return /*#__PURE__*/React__default.createElement(Tag, Object.assign({}, props));
|
36
|
+
};
|
37
|
+
const DEFAULT_OFFSET = 32 + 8;
|
38
|
+
const OverflowGroup = /*#__PURE__*/React__default.forwardRef(function OverflowGroup(props, ref) {
|
39
|
+
const {
|
40
|
+
moreButton: MoreButton,
|
41
|
+
...attributes
|
42
|
+
} = props;
|
43
|
+
const internalRef = useMergedRef(ref);
|
44
|
+
// determine width of more button, to add intersection observer margin
|
45
|
+
const [buttonWidth, setButtonWidth] = React__default.useState(DEFAULT_OFFSET);
|
46
|
+
const buttonRefCallback = React__default.useCallback(el => {
|
47
|
+
var _el$getBoundingClient;
|
48
|
+
return setButtonWidth(el === null || el === void 0 ? void 0 : (_el$getBoundingClient = el.getBoundingClientRect()) === null || _el$getBoundingClient === void 0 ? void 0 : _el$getBoundingClient.width);
|
49
|
+
}, []);
|
50
|
+
const button = MoreButton !== null && MoreButton !== void 0 ? MoreButton : /*#__PURE__*/React__default.createElement(IconButton, {
|
51
|
+
icon: "more"
|
52
|
+
});
|
53
|
+
const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);
|
54
|
+
const children = React__default.Children.toArray(props.children);
|
55
|
+
const hiddenChildren = intersectedChildIndex !== undefined ? children.slice(intersectedChildIndex) : [];
|
56
|
+
const className = cn('flex overflow-hidden', props.className);
|
57
|
+
return /*#__PURE__*/React__default.createElement("div", Object.assign({}, attributes, {
|
58
|
+
className: className,
|
59
|
+
"data-taco": "overflow-group",
|
60
|
+
ref: internalRef
|
61
|
+
}), children.map((child, index) => /*#__PURE__*/React__default.cloneElement(child, {
|
62
|
+
className: cn(child.props.className, {
|
63
|
+
visible: intersectedChildIndex === undefined || index < intersectedChildIndex,
|
64
|
+
'invisible order-[100] pointer-events-none': intersectedChildIndex !== undefined && index >= intersectedChildIndex
|
65
|
+
})
|
66
|
+
})), hiddenChildren.length ? /*#__PURE__*/React__default.cloneElement(button, {
|
67
|
+
className: cn('sticky right-0 order-[99]', button.props.className),
|
68
|
+
'data-observer-ignore': true,
|
69
|
+
menu: menuProps => /*#__PURE__*/React__default.createElement(Menu, Object.assign({}, menuProps), /*#__PURE__*/React__default.createElement(Menu.Content, null, hiddenChildren.map(sanitizeButtonPropsForMenuItem))),
|
70
|
+
ref: buttonRefCallback
|
71
|
+
}) : null);
|
72
|
+
});
|
73
|
+
|
74
|
+
export { OverflowGroup };
|
75
|
+
//# sourceMappingURL=OverflowGroup.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"OverflowGroup.js","sources":["../../../../../../../src/components/OverflowGroup/OverflowGroup.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { useMergedRef } from '../../hooks/useMergedRef';\nimport { ButtonProps } from '../Button/Button';\nimport { Menu } from '../Menu/Menu';\nimport { useIntersectionObserver } from '../../hooks/useIntersectionObserver';\nimport { IconButton } from '../IconButton/IconButton';\n\nconst sanitizeButtonPropsForMenuItem = (button: any, index) => {\n const href: string | undefined = button.props.to || button.props.href;\n const Tag = href ? Menu.Link : Menu.Item;\n\n // Removing className prop so that custom styling cannot be applied on Menu.Link\n const {\n as,\n className: _,\n appearance: _1,\n drawer: _2,\n fluid: _3,\n hanger: _4,\n menu: _5,\n popover: _6,\n tooltip: _7,\n ...attributes\n } = button.props;\n\n const props = {\n ...attributes,\n key: index,\n target: href ? (href.startsWith('http') ? '_blank' : '_self') : undefined,\n };\n\n if (as) {\n return React.cloneElement(button, { as: Tag, ...props });\n }\n\n return <Tag {...props} />;\n};\n\ntype OverflowGroupProps = React.HTMLAttributes<HTMLElement> & {\n moreButton?: React.ReactElement<ButtonProps>;\n};\n\nconst DEFAULT_OFFSET = 32 + 8;\n\nexport const OverflowGroup = React.forwardRef(function OverflowGroup(props: OverflowGroupProps, ref: React.Ref<HTMLDivElement>) {\n const { moreButton: MoreButton, ...attributes } = props;\n const internalRef = useMergedRef<HTMLDivElement>(ref);\n // determine width of more button, to add intersection observer margin\n const [buttonWidth, setButtonWidth] = React.useState(DEFAULT_OFFSET);\n const buttonRefCallback = React.useCallback((el: HTMLElement) => setButtonWidth(el?.getBoundingClientRect()?.width), []);\n const button = MoreButton ?? <IconButton icon=\"more\" />;\n\n const intersectedChildIndex = useIntersectionObserver(internalRef, buttonWidth);\n const children = React.Children.toArray(props.children) as React.ReactElement<ButtonProps>[];\n const hiddenChildren = intersectedChildIndex !== undefined ? children.slice(intersectedChildIndex) : [];\n\n const className = cn('flex overflow-hidden', props.className);\n\n return (\n <div {...attributes} className={className} data-taco=\"overflow-group\" ref={internalRef}>\n {children.map((child, index) =>\n React.cloneElement(child, {\n className: cn(child.props.className, {\n visible: intersectedChildIndex === undefined || index < intersectedChildIndex,\n 'invisible order-[100] pointer-events-none':\n intersectedChildIndex !== undefined && index >= intersectedChildIndex,\n }),\n })\n )}\n {hiddenChildren.length\n ? React.cloneElement(button, {\n className: cn('sticky right-0 order-[99]', button.props.className),\n 'data-observer-ignore': true,\n menu: menuProps => (\n <Menu {...menuProps}>\n <Menu.Content>{hiddenChildren.map(sanitizeButtonPropsForMenuItem)}</Menu.Content>\n </Menu>\n ),\n ref: buttonRefCallback,\n })\n : null}\n </div>\n );\n});\n"],"names":["sanitizeButtonPropsForMenuItem","button","index","href","props","to","Tag","Menu","Link","Item","as","className","_","appearance","_1","drawer","_2","fluid","_3","hanger","_4","menu","_5","popover","_6","tooltip","_7","attributes","key","target","startsWith","undefined","React","cloneElement","DEFAULT_OFFSET","OverflowGroup","forwardRef","ref","moreButton","MoreButton","internalRef","useMergedRef","buttonWidth","setButtonWidth","useState","buttonRefCallback","useCallback","el","getBoundingClientRect","width","IconButton","icon","intersectedChildIndex","useIntersectionObserver","children","Children","toArray","hiddenChildren","slice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SAAS,EAAEgD,EAAE,CAAC,2BAA2B,EAAE1D,MAAM,CAACG,KAAK,CAACO,SAAS,CAAC;IAClE,sBAAsB,EAAE,IAAI;IAC5BU,IAAI,EAAE2C,SAAS,iBACXhC,6BAACzB,IAAI,oBAAKyD,SAAS,gBACfhC,6BAACzB,IAAI,CAAC0D,OAAO,QAAER,cAAc,CAACG,GAAG,CAAC5D,8BAA8B,CAAC,CAAgB,CAExF;IACDqC,GAAG,EAAEQ;GACR,CAAC,GACF,IAAI,CACR;AAEd,CAAC;;;;"}
|
@@ -7,6 +7,7 @@ const defaultLocalisationTexts = {
|
|
7
7
|
calendar: {
|
8
8
|
months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
|
9
9
|
weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],
|
10
|
+
weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
|
10
11
|
actions: {
|
11
12
|
previousMonth: 'Previous month',
|
12
13
|
nextMonth: 'Next month',
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Localization.js","sources":["../../../../../../../src/components/Provider/Localization.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Locale } from '../../types';\nimport { CalendarTexts } from '../Calendar/Calendar';\nimport { ComboboxTexts } from '../Combobox/Combobox';\nimport { DialogTexts } from '../Dialog/Dialog';\nimport { PaginationTexts } from '../Pagination/Pagination';\nimport { ListboxTexts } from '../Listbox/Listbox';\nimport { ToastsTexts } from '../Toast/Toast';\nimport { DatepickerTexts } from '../Datepicker/Datepicker';\nimport { HeaderTexts } from '../Header/Header';\nimport { HangerTexts } from '../Hanger/Hanger';\nimport { SelectTexts } from '../Select/Select';\nimport { TourTexts } from '../Tour/Tour';\nimport { TableTexts } from '../Table/Table';\nimport { Table2Texts } from '../Table2/Table2';\nimport { SearchInputTexts } from '../SearchInput/SearchInput';\nimport { Select2Texts } from '../Select2/Select2';\nimport { BannerTexts } from '../Banner/Banner';\nimport { DrawerTexts } from '../Drawer/Drawer';\n\nexport type LocalizationTexts = {\n /** Localized texts and aria-labels for [Banner](component:banner) component */\n banner: BannerTexts;\n /** Localized texts and aria-labels for [Calendar](component:calendar) component */\n calendar: CalendarTexts;\n /** Localized texts and aria-labels for [Combobox](component:combobox) component */\n combobox: ComboboxTexts;\n /** Localized texts and aria-labels for [DatePicker](component:datepicker) component */\n datepicker: DatepickerTexts;\n /** Localized texts and aria-labels for [Dialog](component:dialog) component */\n dialog: DialogTexts;\n /** Localized texts and aria-labels for [Hanger](component:hanger) component */\n hanger: HangerTexts;\n /** Localized texts and aria-labels for [Header](component:header) component */\n header: HeaderTexts;\n /** Localized texts and aria-labels for [Listbox](component:listbox) component */\n listbox: ListboxTexts;\n /** Localized texts and aria-labels for [Pagination](component:pagination) component */\n pagination: PaginationTexts;\n /** Localized texts and aria-labels for [Table](component:table) component */\n table: TableTexts;\n /** Localized texts and aria-labels for [Table2](component:table2) component */\n table2: Table2Texts;\n /** Localized texts and aria-labels for [SearchInput](component:searchinput) component */\n searchInput: SearchInputTexts;\n /** Localized texts and aria-labels for [Select](component:select) component */\n select: SelectTexts;\n /** Localized texts and aria-labels for [Select2](component:select2) component */\n select2: Select2Texts;\n /** Localized texts and aria-labels for [Toast](component:toast) component */\n toasts: ToastsTexts;\n /** Localized texts and aria-labels for [Tour](component:tour) component */\n tour: TourTexts;\n /** Localized texts and aria-labels for [Drawer](component:drawer) component */\n drawer: DrawerTexts;\n};\n\nexport type Localization = {\n /**\n * Provide the language code used in application.\n * Default value is `en-GB`\n */\n locale: Locale;\n /** Provide the texts and aria-labels for components used within the provider */\n texts: LocalizationTexts;\n /** Provide the formatting */\n formatting: {\n /** Default value is `dd.mm.yy` */\n date: string;\n };\n};\n\nexport const defaultLocalisationTexts = {\n banner: {\n close: 'Close',\n },\n calendar: {\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n actions: {\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n today: 'Today',\n },\n },\n combobox: {\n tooltip: 'Search in list',\n },\n datepicker: {\n calendar: 'Calendar',\n clear: 'Clear',\n expand: 'Show calendar',\n shortcuts: 'Shortcuts',\n },\n dialog: {\n close: 'Close',\n drag: 'Drag',\n },\n hanger: {\n close: 'Close',\n },\n header: {\n addAgreement: 'Add agreement',\n logout: 'Log off',\n more: 'More',\n new: 'New',\n search: 'Search for agreement...',\n },\n listbox: {\n loading: 'Loading results...',\n empty: 'No results found',\n allOption: 'All',\n },\n pagination: {\n label: 'Pagination',\n pageSize: 'Items per page',\n showingXofYofTotal: 'Showing [X] - [Y] of [total]',\n actions: {\n firstPage: 'Goto first page',\n firstPageWithShortcut: 'Goto first page (Home)',\n previousPage: 'Goto previous page',\n previousPageWithShortcut: 'Goto previous page (Page Up)',\n nextPage: 'Goto next page',\n nextPageWithShortcut: 'Goto next page (Page Down)',\n lastPage: 'Goto last page',\n lastPageWithShortcut: 'Goto last page (End)',\n pageX: 'Goto page [X]',\n },\n },\n table: {\n actions: 'Other actions',\n edit: 'Edit (e)',\n copy: 'Copy (c)',\n del: 'Delete (del)',\n newSubRow: 'New row (shift + n)',\n loading: 'Loading...',\n },\n table2: {\n columns: {\n actions: {\n tooltip: 'Other actions',\n },\n drag: {\n tooltip: 'Drag row',\n },\n expansion: {\n collapse: 'Collapse row',\n collapseAll: 'Collapse all rows',\n expand: 'Expand row',\n expandAll: 'Expand all rows',\n },\n select: {\n deselect: 'Deselect row',\n deselectAll: 'Deselect all rows',\n select: 'Select row',\n selectAll: 'Select all rows',\n },\n },\n columnSettings: {\n columnsOther: 'Other columns',\n columnsOtherDrop: 'Drop column here to unpin',\n columnsPinned: 'Pinned columns',\n columnsPinnedDrop: 'Drop column here to pin',\n search: 'Search column...',\n tooltip: 'Column settings',\n },\n editing: {\n button: 'Edit',\n tooltip: 'Edit',\n tooltipDisabled: 'There are no visible columns that support editing',\n rowIndicator: {\n rowWillMove: 'Row will move due to sorting',\n rowWillBeHidden: 'Row will hide due to filtering',\n rowWillMoveReasonSearch:\n 'Due to a search filter applied to this table, this row will be hidden as soon as you select another row',\n rowWillMoveReasonFilter:\n \"Due to a filter applied to the column '[COLUMN]', this row will be hidden as soon as you select another row\",\n rowWillMoveReasonSorting:\n \"Due to sorting applied to the column '[COLUMN]', this row will move position as soon as you select another row\",\n },\n },\n filters: {\n button: 'Filters',\n buttons: {\n addFilter: 'Add Filter',\n clearFilters: 'Clear all filters',\n },\n comparators: {\n contains: 'Contains',\n doesNotContain: 'Does not contain',\n isEqualTo: 'Is',\n isNotEqualTo: 'Is not',\n isGreaterThan: 'Is greater than',\n isLessThan: 'Is less than',\n isBetween: 'Is between',\n isOneOf: 'Is one of',\n isNoneOf: 'Is none of',\n isAllOf: 'Is all of',\n isEmpty: 'Is empty',\n isNotEmpty: 'Is not empty',\n },\n tooltip: 'Apply filters',\n total: 'Viewing [CURRENT] of [TOTAL]',\n },\n rowDensity: {\n tooltip: 'Row density',\n },\n search: {\n placeholder: 'Search...',\n },\n shortcuts: {\n tooltip: 'View keyboard shortcuts',\n search: 'Search',\n filter: 'Filter',\n previousRow: 'Previous row',\n nextRow: 'Next row',\n editCell: 'Edit cell',\n previousColumn: 'Previous column',\n nextColumn: 'Next column',\n rowClick: 'Activate current row',\n selectRow: 'Select current row',\n selectAllRows: 'Select all rows',\n expandRow: 'Expand current row',\n collapseRow: 'Collapse current row',\n },\n },\n searchInput: {\n button: 'Search',\n placeholder: 'Search...',\n clear: 'Clear',\n },\n select: {\n allOptionsSelected: 'All',\n },\n select2: {\n allSelect: 'Select all',\n allDeselect: 'Deselect all',\n cancel: 'Cancel',\n chooseColor: 'Pick a color',\n create: 'Create',\n delete: 'Delete',\n save: 'Save',\n search: 'Search...',\n searchOrCreate: 'Search or create...',\n },\n toasts: {\n dismiss: 'Dismiss',\n },\n tour: {\n back: 'Back',\n close: 'Close',\n skip: 'Close and complete',\n last: 'Done',\n next: 'Next',\n open: 'Open',\n },\n drawer: {\n close: 'Close',\n },\n};\n\nconst defaultLocalizationContext: Localization = {\n locale: 'en-GB',\n texts: defaultLocalisationTexts,\n formatting: {\n date: 'dd.mm.yy',\n },\n};\n\nexport const LocalizationContext = React.createContext<Localization>(defaultLocalizationContext);\nexport interface LocalizationProviderProps {\n children: React.ReactNode;\n localization?: Localization;\n}\nexport const LocalizationProvider: React.FC<LocalizationProviderProps> = ({ localization, children }) => {\n return (\n <LocalizationContext.Provider value={localization ?? defaultLocalizationContext}>{children}</LocalizationContext.Provider>\n );\n};\n\nexport const useLocalization = () => React.useContext(LocalizationContext);\n"],"names":["defaultLocalisationTexts","banner","close","calendar","months","weekdaysShort","actions","previousMonth","nextMonth","previousYear","nextYear","today","combobox","tooltip","datepicker","clear","expand","shortcuts","dialog","drag","hanger","header","addAgreement","logout","more","new","search","listbox","loading","empty","allOption","pagination","label","pageSize","showingXofYofTotal","firstPage","firstPageWithShortcut","previousPage","previousPageWithShortcut","nextPage","nextPageWithShortcut","lastPage","lastPageWithShortcut","pageX","table","edit","copy","del","newSubRow","table2","columns","expansion","collapse","collapseAll","expandAll","select","deselect","deselectAll","selectAll","columnSettings","columnsOther","columnsOtherDrop","columnsPinned","columnsPinnedDrop","editing","button","tooltipDisabled","rowIndicator","rowWillMove","rowWillBeHidden","rowWillMoveReasonSearch","rowWillMoveReasonFilter","rowWillMoveReasonSorting","filters","buttons","addFilter","clearFilters","comparators","contains","doesNotContain","isEqualTo","isNotEqualTo","isGreaterThan","isLessThan","isBetween","isOneOf","isNoneOf","isAllOf","isEmpty","isNotEmpty","total","rowDensity","placeholder","filter","previousRow","nextRow","editCell","previousColumn","nextColumn","rowClick","selectRow","selectAllRows","expandRow","collapseRow","searchInput","allOptionsSelected","select2","allSelect","allDeselect","cancel","chooseColor","create","delete","save","searchOrCreate","toasts","dismiss","tour","back","skip","last","next","open","drawer","defaultLocalizationContext","locale","texts","formatting","date","LocalizationContext","React","LocalizationProvider","localization","children","Provider","value","useLocalization"],"mappings":";;MAwEaA,wBAAwB,GAAG;EACpCC,MAAM,EAAE;IACJC,KAAK,EAAE;GACV;EACDC,QAAQ,EAAE;IACNC,MAAM,EAAE,CACJ,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,CACb;IACDC,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAChEC,OAAO,EAAE;MACLC,aAAa,EAAE,gBAAgB;MAC/BC,SAAS,EAAE,YAAY;MACvBC,YAAY,EAAE,eAAe;MAC7BC,QAAQ,EAAE,WAAW;MACrBC,KAAK,EAAE;;GAEd;EACDC,QAAQ,EAAE;IACNC,OAAO,EAAE;GACZ;EACDC,UAAU,EAAE;IACRX,QAAQ,EAAE,UAAU;IACpBY,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE,eAAe;IACvBC,SAAS,EAAE;GACd;EACDC,MAAM,EAAE;IACJhB,KAAK,EAAE,OAAO;IACdiB,IAAI,EAAE;GACT;EACDC,MAAM,EAAE;IACJlB,KAAK,EAAE;GACV;EACDmB,MAAM,EAAE;IACJC,YAAY,EAAE,eAAe;IAC7BC,MAAM,EAAE,SAAS;IACjBC,IAAI,EAAE,MAAM;IACZC,GAAG,EAAE,KAAK;IACVC,MAAM,EAAE;GACX;EACDC,OAAO,EAAE;IACLC,OAAO,EAAE,oBAAoB;IAC7BC,KAAK,EAAE,kBAAkB;IACzBC,SAAS,EAAE;GACd;EACDC,UAAU,EAAE;IACRC,KAAK,EAAE,YAAY;IACnBC,QAA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Y;IACvBC,WAAW,EAAE,cAAc;IAC3BC,MAAM,EAAE,QAAQ;IAChBC,WAAW,EAAE,cAAc;IAC3BC,MAAM,EAAE,QAAQ;IAChBC,MAAM,EAAE,QAAQ;IAChBC,IAAI,EAAE,MAAM;IACZvF,MAAM,EAAE,WAAW;IACnBwF,cAAc,EAAE;GACnB;EACDC,MAAM,EAAE;IACJC,OAAO,EAAE;GACZ;EACDC,IAAI,EAAE;IACFC,IAAI,EAAE,MAAM;IACZpH,KAAK,EAAE,OAAO;IACdqH,IAAI,EAAE,oBAAoB;IAC1BC,IAAI,EAAE,MAAM;IACZC,IAAI,EAAE,MAAM;IACZC,IAAI,EAAE;GACT;EACDC,MAAM,EAAE;IACJzH,KAAK,EAAE;;;AAIf,MAAM0H,0BAA0B,GAAiB;EAC7CC,MAAM,EAAE,OAAO;EACfC,KAAK,EAAE9H,wBAAwB;EAC/B+H,UAAU,EAAE;IACRC,IAAI,EAAE;;CAEb;MAEYC,mBAAmB,gBAAGC,aAAmB,CAAeN,0BAA0B;MAKlFO,oBAAoB,GAAwC,CAAC;EAAEC,YAAY;EAAEC;CAAU;EAChG,oBACIH,cAACD,mBAAmB,CAACK,QAAQ;IAACC,KAAK,EAAEH,YAAY,aAAZA,YAAY,cAAZA,YAAY,GAAIR;KAA6BS,QAAQ,CAAgC;AAElI;MAEaG,eAAe,GAAG,MAAMN,UAAgB,CAACD,mBAAmB;;;;"}
|
1
|
+
{"version":3,"file":"Localization.js","sources":["../../../../../../../src/components/Provider/Localization.tsx"],"sourcesContent":["import * as React from 'react';\nimport { Locale } from '../../types';\nimport { CalendarTexts } from '../Calendar/Calendar';\nimport { ComboboxTexts } from '../Combobox/Combobox';\nimport { DialogTexts } from '../Dialog/Dialog';\nimport { PaginationTexts } from '../Pagination/Pagination';\nimport { ListboxTexts } from '../Listbox/Listbox';\nimport { ToastsTexts } from '../Toast/Toast';\nimport { DatepickerTexts } from '../Datepicker/Datepicker';\nimport { HeaderTexts } from '../Header/Header';\nimport { HangerTexts } from '../Hanger/Hanger';\nimport { SelectTexts } from '../Select/Select';\nimport { TourTexts } from '../Tour/Tour';\nimport { TableTexts } from '../Table/Table';\nimport { Table2Texts } from '../Table2/Table2';\nimport { SearchInputTexts } from '../SearchInput/SearchInput';\nimport { Select2Texts } from '../Select2/Select2';\nimport { BannerTexts } from '../Banner/Banner';\nimport { DrawerTexts } from '../Drawer/Drawer';\n\nexport type LocalizationTexts = {\n /** Localized texts and aria-labels for [Banner](component:banner) component */\n banner: BannerTexts;\n /** Localized texts and aria-labels for [Calendar](component:calendar) component */\n calendar: CalendarTexts;\n /** Localized texts and aria-labels for [Combobox](component:combobox) component */\n combobox: ComboboxTexts;\n /** Localized texts and aria-labels for [DatePicker](component:datepicker) component */\n datepicker: DatepickerTexts;\n /** Localized texts and aria-labels for [Dialog](component:dialog) component */\n dialog: DialogTexts;\n /** Localized texts and aria-labels for [Hanger](component:hanger) component */\n hanger: HangerTexts;\n /** Localized texts and aria-labels for [Header](component:header) component */\n header: HeaderTexts;\n /** Localized texts and aria-labels for [Listbox](component:listbox) component */\n listbox: ListboxTexts;\n /** Localized texts and aria-labels for [Pagination](component:pagination) component */\n pagination: PaginationTexts;\n /** Localized texts and aria-labels for [Table](component:table) component */\n table: TableTexts;\n /** Localized texts and aria-labels for [Table2](component:table2) component */\n table2: Table2Texts;\n /** Localized texts and aria-labels for [SearchInput](component:searchinput) component */\n searchInput: SearchInputTexts;\n /** Localized texts and aria-labels for [Select](component:select) component */\n select: SelectTexts;\n /** Localized texts and aria-labels for [Select2](component:select2) component */\n select2: Select2Texts;\n /** Localized texts and aria-labels for [Toast](component:toast) component */\n toasts: ToastsTexts;\n /** Localized texts and aria-labels for [Tour](component:tour) component */\n tour: TourTexts;\n /** Localized texts and aria-labels for [Drawer](component:drawer) component */\n drawer: DrawerTexts;\n};\n\nexport type Localization = {\n /**\n * Provide the language code used in application.\n * Default value is `en-GB`\n */\n locale: Locale;\n /** Provide the texts and aria-labels for components used within the provider */\n texts: LocalizationTexts;\n /** Provide the formatting */\n formatting: {\n /** Default value is `dd.mm.yy` */\n date: string;\n };\n};\n\nexport const defaultLocalisationTexts = {\n banner: {\n close: 'Close',\n },\n calendar: {\n months: [\n 'January',\n 'February',\n 'March',\n 'April',\n 'May',\n 'June',\n 'July',\n 'August',\n 'September',\n 'October',\n 'November',\n 'December',\n ],\n weekdaysShort: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'],\n weekdays: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],\n actions: {\n previousMonth: 'Previous month',\n nextMonth: 'Next month',\n previousYear: 'Previous year',\n nextYear: 'Next year',\n today: 'Today',\n },\n },\n combobox: {\n tooltip: 'Search in list',\n },\n datepicker: {\n calendar: 'Calendar',\n clear: 'Clear',\n expand: 'Show calendar',\n shortcuts: 'Shortcuts',\n },\n dialog: {\n close: 'Close',\n drag: 'Drag',\n },\n hanger: {\n close: 'Close',\n },\n header: {\n addAgreement: 'Add agreement',\n logout: 'Log off',\n more: 'More',\n new: 'New',\n search: 'Search for agreement...',\n },\n listbox: {\n loading: 'Loading results...',\n empty: 'No results found',\n allOption: 'All',\n },\n pagination: {\n label: 'Pagination',\n pageSize: 'Items per page',\n showingXofYofTotal: 'Showing [X] - [Y] of [total]',\n actions: {\n firstPage: 'Goto first page',\n firstPageWithShortcut: 'Goto first page (Home)',\n previousPage: 'Goto previous page',\n previousPageWithShortcut: 'Goto previous page (Page Up)',\n nextPage: 'Goto next page',\n nextPageWithShortcut: 'Goto next page (Page Down)',\n lastPage: 'Goto last page',\n lastPageWithShortcut: 'Goto last page (End)',\n pageX: 'Goto page [X]',\n },\n },\n table: {\n actions: 'Other actions',\n edit: 'Edit (e)',\n copy: 'Copy (c)',\n del: 'Delete (del)',\n newSubRow: 'New row (shift + n)',\n loading: 'Loading...',\n },\n table2: {\n columns: {\n actions: {\n tooltip: 'Other actions',\n },\n drag: {\n tooltip: 'Drag row',\n },\n expansion: {\n collapse: 'Collapse row',\n collapseAll: 'Collapse all rows',\n expand: 'Expand row',\n expandAll: 'Expand all rows',\n },\n select: {\n deselect: 'Deselect row',\n deselectAll: 'Deselect all rows',\n select: 'Select row',\n selectAll: 'Select all rows',\n },\n },\n columnSettings: {\n columnsOther: 'Other columns',\n columnsOtherDrop: 'Drop column here to unpin',\n columnsPinned: 'Pinned columns',\n columnsPinnedDrop: 'Drop column here to pin',\n search: 'Search column...',\n tooltip: 'Column settings',\n },\n editing: {\n button: 'Edit',\n tooltip: 'Edit',\n tooltipDisabled: 'There are no visible columns that support editing',\n rowIndicator: {\n rowWillMove: 'Row will move due to sorting',\n rowWillBeHidden: 'Row will hide due to filtering',\n rowWillMoveReasonSearch:\n 'Due to a search filter applied to this table, this row will be hidden as soon as you select another row',\n rowWillMoveReasonFilter:\n \"Due to a filter applied to the column '[COLUMN]', this row will be hidden as soon as you select another row\",\n rowWillMoveReasonSorting:\n \"Due to sorting applied to the column '[COLUMN]', this row will move position as soon as you select another row\",\n },\n },\n filters: {\n button: 'Filters',\n buttons: {\n addFilter: 'Add Filter',\n clearFilters: 'Clear all filters',\n },\n comparators: {\n contains: 'Contains',\n doesNotContain: 'Does not contain',\n isEqualTo: 'Is',\n isNotEqualTo: 'Is not',\n isGreaterThan: 'Is greater than',\n isLessThan: 'Is less than',\n isBetween: 'Is between',\n isOneOf: 'Is one of',\n isNoneOf: 'Is none of',\n isAllOf: 'Is all of',\n isEmpty: 'Is empty',\n isNotEmpty: 'Is not empty',\n },\n tooltip: 'Apply filters',\n total: 'Viewing [CURRENT] of [TOTAL]',\n },\n rowDensity: {\n tooltip: 'Row density',\n },\n search: {\n placeholder: 'Search...',\n },\n shortcuts: {\n tooltip: 'View keyboard shortcuts',\n search: 'Search',\n filter: 'Filter',\n previousRow: 'Previous row',\n nextRow: 'Next row',\n editCell: 'Edit cell',\n previousColumn: 'Previous column',\n nextColumn: 'Next column',\n rowClick: 'Activate current row',\n selectRow: 'Select current row',\n selectAllRows: 'Select all rows',\n expandRow: 'Expand current row',\n collapseRow: 'Collapse current row',\n },\n },\n searchInput: {\n button: 'Search',\n placeholder: 'Search...',\n clear: 'Clear',\n },\n select: {\n allOptionsSelected: 'All',\n },\n select2: {\n allSelect: 'Select all',\n allDeselect: 'Deselect all',\n cancel: 'Cancel',\n chooseColor: 'Pick a color',\n create: 'Create',\n delete: 'Delete',\n save: 'Save',\n search: 'Search...',\n searchOrCreate: 'Search or create...',\n },\n toasts: {\n dismiss: 'Dismiss',\n },\n tour: {\n back: 'Back',\n close: 'Close',\n skip: 'Close and complete',\n last: 'Done',\n next: 'Next',\n open: 'Open',\n },\n drawer: {\n close: 'Close',\n },\n};\n\nconst defaultLocalizationContext: Localization = {\n locale: 'en-GB',\n texts: defaultLocalisationTexts,\n formatting: {\n date: 'dd.mm.yy',\n },\n};\n\nexport const LocalizationContext = React.createContext<Localization>(defaultLocalizationContext);\nexport interface LocalizationProviderProps {\n children: React.ReactNode;\n localization?: Localization;\n}\nexport const LocalizationProvider: React.FC<LocalizationProviderProps> = ({ localization, children }) => {\n return (\n <LocalizationContext.Provider value={localization ?? defaultLocalizationContext}>{children}</LocalizationContext.Provider>\n );\n};\n\nexport const useLocalization = () => React.useContext(LocalizationContext);\n"],"names":["defaultLocalisationTexts","banner","close","calendar","months","weekdaysShort","weekdays","actions","previousMonth","nextMonth","previousYear","nextYear","today","combobox","tooltip","datepicker","clear","expand","shortcuts","dialog","drag","hanger","header","addAgreement","logout","more","new","search","listbox","loading","empty","allOption","pagination","label","pageSize","showingXofYofTotal","firstPage","firstPageWithShortcut","previousPage","previousPageWithShortcut","nextPage","nextPageWithShortcut","lastPage","lastPageWithShortcut","pageX","table","edit","copy","del","newSubRow","table2","columns","expansion","collapse","collapseAll","expandAll","select","deselect","deselectAll","selectAll","columnSettings","columnsOther","columnsOtherDrop","columnsPinned","columnsPinnedDrop","editing","button","tooltipDisabled","rowIndicator","rowWillMove","rowWillBeHidden","rowWillMoveReasonSearch","rowWillMoveReasonFilter","rowWillMoveReasonSorting","filters","buttons","addFilter","clearFilters","comparators","contains","doesNotContain","isEqualTo","isNotEqualTo","isGreaterThan","isLessThan","isBetween","isOneOf","isNoneOf","isAllOf","isEmpty","isNotEmpty","total","rowDensity","placeholder","filter","previousRow","nextRow","editCell","previousColumn","nextColumn","rowClick","selectRow","selectAllRows","expandRow","collapseRow","searchInput","allOptionsSelected","select2","allSelect","allDeselect","cancel","chooseColor","create","delete","save","searchOrCreate","toasts","dismiss","tour","back","skip","last","next","open","drawer","defaultLocalizationContext","locale","texts","formatting","date","LocalizationContext","React","LocalizationProvider","localization","children","Provider","value","useLocalization"],"mappings":";;MAwEaA,wBAAwB,GAAG;EACpCC,MAAM,EAAE;IACJC,KAAK,EAAE;GACV;EACDC,QAAQ,EAAE;IACNC,MAAM,EAAE,CACJ,SAAS,EACT,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,WAAW,EACX,SAAS,EACT,UAAU,EACV,UAAU,CACb;IACDC,aAAa,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAChEC,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,CAAC;IACxFC,OAAO,EAAE;MACLC,aAAa,EAAE,gBAAgB;MAC/BC,SAAS,EAAE,YAAY;MACvBC,YAAY,EAAE,eAAe;MAC7BC,QAAQ,EAAE,WAAW;MACrBC,KAAK,EAAE;;GAEd;EACDC,QAAQ,EAAE;IACNC,OAAO,EAAE;GACZ;EACDC,UAAU,EAAE;IACRZ,QAAQ,EAAE,UAAU;IACpBa,KAAK,EAAE,OAAO;IACdC,MAAM,EAAE,eAAe;IACvBC,SAAS,EAAE;GACd;EACDC,MAAM,EAAE;IACJjB,KAAK,EAA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D,mBAAmB;;;;"}
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { useState, useMemo, useRef, useEffect, createElement, Fragment, cloneElement } from 'react';
|
2
2
|
import cn from 'classnames';
|
3
3
|
import { useLocalization } from '../Provider/Localization.js';
|
4
|
-
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
5
4
|
import { v4 } from 'uuid';
|
5
|
+
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
6
6
|
import { createCustomEvent } from '../../utils/input.js';
|
7
7
|
import { useFlattenedData, findByValue, setInputValueByRef, sanitizeItem } from '../Listbox/util.js';
|
8
8
|
|
@@ -1,11 +1,11 @@
|
|
1
1
|
import React__default from 'react';
|
2
2
|
import cn from 'classnames';
|
3
3
|
import { useLocalization } from '../Provider/Localization.js';
|
4
|
-
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
5
|
-
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
6
4
|
import { Root, Trigger, Portal, Content } from '@radix-ui/react-popover';
|
7
5
|
import { useBoundingClientRectListener } from '../../hooks/useBoundingClientRectListener.js';
|
6
|
+
import { useMergedRef } from '../../hooks/useMergedRef.js';
|
8
7
|
import { createCustomKeyboardEvent } from '../../utils/input.js';
|
8
|
+
import { useControllableState } from '@radix-ui/react-use-controllable-state';
|
9
9
|
import { isAriaDirectionKey } from '../../utils/aria.js';
|
10
10
|
import { Root as Root$1, createListboxValueSetter } from '../../primitives/Listbox2/components/Root.js';
|
11
11
|
import '../../primitives/Listbox2/components/Option.js';
|
@@ -1,14 +1,14 @@
|
|
1
1
|
import React__default from 'react';
|
2
2
|
import cn from 'classnames';
|
3
|
-
import { AVAILABLE_COLORS, getSubtleColorShadeClasses } from '../../../utils/
|
3
|
+
import { AVAILABLE_COLORS, getSubtleColorShadeClasses } from '../../../utils/tailwind.js';
|
4
4
|
import { Icon } from '../../Icon/Icon.js';
|
5
5
|
import { useLocalization } from '../../Provider/Localization.js';
|
6
6
|
import { Button } from '../../Button/Button.js';
|
7
|
-
import { Group } from '../../Group/Group.js';
|
8
|
-
import { Root, Item, Indicator } from '@radix-ui/react-radio-group';
|
9
7
|
import { Input } from '../../Input/Input.js';
|
10
8
|
import { Popover } from '../../Popover/Popover.js';
|
9
|
+
import { Group } from '../../Group/Group.js';
|
11
10
|
import { Field } from '../../Field/Field.js';
|
11
|
+
import { Root, Item, Indicator } from '@radix-ui/react-radio-group';
|
12
12
|
import { useSelect2Context } from './Context.js';
|
13
13
|
import { _catch } from '../../../../../../node_modules/babel-plugin-transform-async-to-promises/helpers.mjs.js';
|
14
14
|
|