@economic/taco 1.16.2 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AlertDialog/Context.d.ts +1 -1
- package/dist/components/Banner/Banner.stories.d.ts +2 -20
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/Button/Button.stories.d.ts +1 -1
- package/dist/components/Combobox/useCombobox.d.ts +2 -1
- package/dist/components/Datepicker/Datepicker.d.ts +7 -3
- package/dist/components/Datepicker/Datepicker.stories.d.ts +2 -2
- package/dist/components/Datepicker/useDatepicker.d.ts +2 -1
- package/dist/components/Dialog/Context.d.ts +1 -1
- package/dist/components/Dialog/Dialog.d.ts +1 -1
- package/dist/components/Icon/Icon.stories.d.ts +4 -20
- package/dist/components/IconButton/IconButton.stories.d.ts +11 -48
- package/dist/components/Input/Input.d.ts +15 -8
- package/dist/components/Input/Input.stories.d.ts +15 -41
- package/dist/components/Provider/Localization.d.ts +3 -2
- package/dist/components/SearchInput/SearchInput.d.ts +5 -10
- package/dist/components/SearchInput/SearchInput.stories.d.ts +3 -6
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Select/Select.stories.d.ts +1 -1
- package/dist/components/Select2/Select2.d.ts +2 -0
- package/dist/components/Select2/Select2.stories.d.ts +0 -1
- package/dist/components/Select2/components/Search.d.ts +6 -3
- package/dist/components/Select2/hooks/useChildren.d.ts +2 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -4
- package/dist/components/Tooltip/Tooltip.stories.d.ts +2 -2
- package/dist/esm/index.css +44 -40
- package/dist/esm/packages/taco/src/components/Accordion/Accordion.js +2 -2
- package/dist/esm/packages/taco/src/components/Accordion/Accordion.js.map +1 -1
- package/dist/esm/packages/taco/src/components/AlertDialog/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js +1 -1
- package/dist/esm/packages/taco/src/components/Backdrop/Backdrop.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Button/Button.js +1 -2
- package/dist/esm/packages/taco/src/components/Button/Button.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Button/util.js +7 -7
- package/dist/esm/packages/taco/src/components/Button/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js +1 -1
- package/dist/esm/packages/taco/src/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js +6 -5
- package/dist/esm/packages/taco/src/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js +2 -2
- package/dist/esm/packages/taco/src/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Combobox/useCombobox.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js +37 -33
- package/dist/esm/packages/taco/src/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Datepicker/useDatepicker.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/Context.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Content.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js +1 -1
- package/dist/esm/packages/taco/src/components/Dialog/components/Extra.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Field/Field.js +3 -3
- package/dist/esm/packages/taco/src/components/Field/Field.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js +3 -4
- package/dist/esm/packages/taco/src/components/Hanger/Hanger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js +1 -1
- package/dist/esm/packages/taco/src/components/HoverCard/Primitives.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/Input.js +110 -58
- package/dist/esm/packages/taco/src/components/Input/Input.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Input/util.js +14 -8
- package/dist/esm/packages/taco/src/components/Input/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js +2 -2
- package/dist/esm/packages/taco/src/components/Listbox/ScrollableList.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Header.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Header.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js +3 -3
- package/dist/esm/packages/taco/src/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Separator.js +1 -1
- package/dist/esm/packages/taco/src/components/Menu/components/Separator.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Navigation/Navigation.js +7 -7
- package/dist/esm/packages/taco/src/components/Navigation/Navigation.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Popover.js +1 -2
- package/dist/esm/packages/taco/src/components/Popover/Popover.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Primitives.js +1 -1
- package/dist/esm/packages/taco/src/components/Popover/Primitives.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Popover/util.js +1 -1
- package/dist/esm/packages/taco/src/components/Popover/util.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Progress/Progress.js +3 -3
- package/dist/esm/packages/taco/src/components/Progress/Progress.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Provider/Localization.js +3 -2
- package/dist/esm/packages/taco/src/components/Provider/Localization.js.map +1 -1
- package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js +4 -4
- package/dist/esm/packages/taco/src/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js +1 -1
- package/dist/esm/packages/taco/src/components/ScrollArea/ScrollArea.js.map +1 -1
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js +31 -15
- package/dist/esm/packages/taco/src/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select/Select.js +2 -2
- package/dist/esm/packages/taco/src/components/Select/Select.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/Select2.js +8 -9
- package/dist/esm/packages/taco/src/components/Select2/Select2.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Collection.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Collection.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/components/Edit.js +1 -1
- 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 +14 -6
- package/dist/esm/packages/taco/src/components/Select2/components/Trigger.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js +3 -2
- package/dist/esm/packages/taco/src/components/Select2/hooks/useChildren.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Select2/utilities.js +1 -1
- package/dist/esm/packages/taco/src/components/Select2/utilities.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Switch/Switch.js +5 -4
- package/dist/esm/packages/taco/src/components/Switch/Switch.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/BaseTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js +2 -2
- package/dist/esm/packages/taco/src/components/Table/components/WindowedTable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/hooks/plugins/useRowDraggable.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/renderColumn.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/renderRow.js +2 -2
- package/dist/esm/packages/taco/src/components/Table/util/renderRow.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js +1 -1
- package/dist/esm/packages/taco/src/components/Table/util/sortTypes.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tabs/Tabs.js +2 -2
- package/dist/esm/packages/taco/src/components/Tabs/Tabs.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Toast/Toast.js +5 -5
- package/dist/esm/packages/taco/src/components/Toast/Toast.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js +3 -3
- package/dist/esm/packages/taco/src/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/esm/packages/taco/src/components/Tour/Tour.js +3 -3
- package/dist/esm/packages/taco/src/components/Tour/Tour.js.map +1 -1
- package/dist/esm/packages/taco/src/index.js +1 -1
- package/dist/esm/packages/taco/src/utils/colors.js +9 -9
- package/dist/esm/packages/taco/src/utils/colors.js.map +1 -1
- package/dist/index.css +44 -40
- package/dist/index.d.ts +0 -1
- package/dist/primitives/Sortable/components/Item.d.ts +1 -0
- package/dist/taco.cjs.development.js +362 -280
- 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 +3 -3
- package/plugins/tailwindcss-group-peer.js +12 -0
- package/tailwind.config.js +272 -22
- package/types.json +87 -43
@@ -21,10 +21,10 @@ const Toast = ({
|
|
21
21
|
type = 'default'
|
22
22
|
} = options;
|
23
23
|
const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow', {
|
24
|
-
'border border-grey': type === 'default' || type === 'loading' || !type,
|
25
|
-
'border border-grey-
|
26
|
-
'border border-blue': type === 'information',
|
27
|
-
'border border-yellow-
|
24
|
+
'border border-grey-200': type === 'default' || type === 'loading' || !type,
|
25
|
+
'border border-grey-500': type === 'success',
|
26
|
+
'border border-blue-500': type === 'information',
|
27
|
+
'border border-yellow-700': type === 'warning',
|
28
28
|
'border border-red': type === 'error'
|
29
29
|
});
|
30
30
|
const timer = useTimer(autoClose, handleClose);
|
@@ -68,7 +68,7 @@ const Toast = ({
|
|
68
68
|
className: "flex-grow"
|
69
69
|
}, content), /*#__PURE__*/React__default.createElement(IconButton, {
|
70
70
|
appearance: "discrete",
|
71
|
-
className: "text-grey-
|
71
|
+
className: "text-grey-700 -mr-2 cursor-pointer self-start !px-0",
|
72
72
|
icon: "close",
|
73
73
|
"aria-label": texts.toasts.dismiss,
|
74
74
|
onClick: handleClose
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Toast.js","sources":["../../../../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { motion, useAnimation } from 'framer-motion';\nimport useTimer from '../../utils/hooks/useTimer';\nimport { getBadgeIcon } from './util';\nimport { State } from '../../types';\nimport { useLocalization } from '../Provider/Localization';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type ToastsTexts = {\n /** Aria-label for the close icon button of toast */\n dismiss: string;\n};\n\nexport type ToastType = Omit<State, 'default'> | 'loading';\nexport type ToastOptions = {\n /** Provide time in milliseconds after which the toast should autoclose */\n autoClose?: number;\n /**\n * State will change the icon displayed in toast and other characteristics,\n * for e.g. `loading` state will display a progress animation.\n * Default value is `default`\n */\n type?: ToastType;\n};\nexport type ToastContent = Omit<React.ReactNode, 'null' | 'undefined'>;\nexport type ToastProps = {\n /** Provide a unique id for toast */\n id: string;\n /**\n * Content can be any valid react node, for e.g. a `div`, or a simple text.\n */\n content: ToastContent;\n /** Additional options to define your toast */\n options: ToastOptions;\n /**\n * Handler called when toast closes.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n onClose: () => void;\n lastUpdated?: number;\n lastDuplicateId?: string;\n};\n\nexport const Toast = ({ content, lastUpdated, onClose: handleClose, options, ...props }: ToastProps): JSX.Element => {\n const { texts } = useLocalization();\n const { autoClose, type = 'default' } = options;\n const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow', {\n 'border border-grey': type === 'default' || type === 'loading' || !type,\n 'border border-grey-
|
1
|
+
{"version":3,"file":"Toast.js","sources":["../../../../../../../src/components/Toast/Toast.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { motion, useAnimation } from 'framer-motion';\nimport useTimer from '../../utils/hooks/useTimer';\nimport { getBadgeIcon } from './util';\nimport { State } from '../../types';\nimport { useLocalization } from '../Provider/Localization';\nimport { IconButton } from '../IconButton/IconButton';\n\nexport type ToastsTexts = {\n /** Aria-label for the close icon button of toast */\n dismiss: string;\n};\n\nexport type ToastType = Omit<State, 'default'> | 'loading';\nexport type ToastOptions = {\n /** Provide time in milliseconds after which the toast should autoclose */\n autoClose?: number;\n /**\n * State will change the icon displayed in toast and other characteristics,\n * for e.g. `loading` state will display a progress animation.\n * Default value is `default`\n */\n type?: ToastType;\n};\nexport type ToastContent = Omit<React.ReactNode, 'null' | 'undefined'>;\nexport type ToastProps = {\n /** Provide a unique id for toast */\n id: string;\n /**\n * Content can be any valid react node, for e.g. a `div`, or a simple text.\n */\n content: ToastContent;\n /** Additional options to define your toast */\n options: ToastOptions;\n /**\n * Handler called when toast closes.\n * To read more about how to provide the text, see [Provider](component:provider) component\n */\n onClose: () => void;\n lastUpdated?: number;\n lastDuplicateId?: string;\n};\n\nexport const Toast = ({ content, lastUpdated, onClose: handleClose, options, ...props }: ToastProps): JSX.Element => {\n const { texts } = useLocalization();\n const { autoClose, type = 'default' } = options;\n const className = cn('bg-white relative flex items-center py-1 px-2 mt-3 w-full rounded yt-shadow', {\n 'border border-grey-200': type === 'default' || type === 'loading' || !type,\n 'border border-grey-500': type === 'success',\n 'border border-blue-500': type === 'information',\n 'border border-yellow-700': type === 'warning',\n 'border border-red': type === 'error',\n });\n const timer = useTimer(autoClose, handleClose);\n const controls = useAnimation();\n\n if (!content) {\n console.warn(\n `Toast requires 'content' property, which can't be empty string, null or undefined. Current content value is set to ${\n content === '' ? 'empty string' : content\n }.`\n );\n }\n\n React.useEffect(() => {\n if (autoClose) {\n timer.start();\n }\n }, [autoClose]);\n\n const triggerUpdateAnimation = async () => {\n await controls.start({ scale: 1.05 });\n await controls.start({ scale: 1 });\n };\n\n React.useEffect(() => {\n if (lastUpdated) {\n triggerUpdateAnimation();\n\n if (timer.running) {\n timer.start();\n }\n }\n }, [lastUpdated]);\n\n return (\n <motion.div\n {...props}\n animate={controls}\n className={className}\n data-taco=\"toast\"\n onMouseEnter={timer.pause}\n onMouseLeave={timer.resume}>\n {getBadgeIcon(type)}\n <div className=\"flex-grow\">{content}</div>\n <IconButton\n appearance=\"discrete\"\n className=\"text-grey-700 -mr-2 cursor-pointer self-start !px-0\"\n icon=\"close\"\n aria-label={texts.toasts.dismiss}\n onClick={handleClose}\n />\n </motion.div>\n );\n};\n"],"names":["Toast","content","lastUpdated","onClose","handleClose","options","props","texts","useLocalization","autoClose","type","className","cn","timer","useTimer","controls","useAnimation","console","warn","React","useEffect","start","triggerUpdateAnimation","scale","running","motion","div","animate","onMouseEnter","pause","onMouseLeave","resume","getBadgeIcon","IconButton","appearance","icon","toasts","dismiss","onClick"],"mappings":";;;;;;;;MA4CaA,KAAK,GAAG,CAAC;EAAEC,OAAO;EAAEC,WAAW;EAAEC,OAAO,EAAEC,WAAW;EAAEC,OAAO;EAAE,GAAGC;CAAmB;EAC/F,MAAM;IAAEC;GAAO,GAAGC,eAAe,EAAE;EACnC,MAAM;IAAEC,SAAS;IAAEC,IAAI,GAAG;GAAW,GAAGL,OAAO;EAC/C,MAAMM,SAAS,GAAGC,EAAE,CAAC,6EAA6E,EAAE;IAChG,wBAAwB,EAAEF,IAAI,KAAK,SAAS,IAAIA,IAAI,KAAK,SAAS,IAAI,CAACA,IAAI;IAC3E,wBAAwB,EAAEA,IAAI,KAAK,SAAS;IAC5C,wBAAwB,EAAEA,IAAI,KAAK,aAAa;IAChD,0BAA0B,EAAEA,IAAI,KAAK,SAAS;IAC9C,mBAAmB,EAAEA,IAAI,KAAK;GACjC,CAAC;EACF,MAAMG,KAAK,GAAGC,QAAQ,CAACL,SAAS,EAAEL,WAAW,CAAC;EAC9C,MAAMW,QAAQ,GAAGC,YAAY,EAAE;EAE/B,IAAI,CAACf,OAAO,EAAE;IACVgB,OAAO,CAACC,IAAI,uHAEJjB,OAAO,KAAK,EAAE,GAAG,cAAc,GAAGA,UACnC,CACN;;EAGLkB,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIX,SAAS,EAAE;MACXI,KAAK,CAACQ,KAAK,EAAE;;GAEpB,EAAE,CAACZ,SAAS,CAAC,CAAC;EAEf,MAAMa,sBAAsB;IAAA;6BAClBP,QAAQ,CAACM,KAAK,CAAC;QAAEE,KAAK,EAAE;OAAM,CAAC;QAAA,uBAC/BR,QAAQ,CAACM,KAAK,CAAC;UAAEE,KAAK,EAAE;SAAG,CAAC;;KACrC;MAAA;;;EAEDJ,cAAK,CAACC,SAAS,CAAC;IACZ,IAAIlB,WAAW,EAAE;MACboB,sBAAsB,EAAE;MAExB,IAAIT,KAAK,CAACW,OAAO,EAAE;QACfX,KAAK,CAACQ,KAAK,EAAE;;;GAGxB,EAAE,CAACnB,WAAW,CAAC,CAAC;EAEjB,oBACIiB,6BAACM,MAAM,CAACC,GAAG,oBACHpB,KAAK;IACTqB,OAAO,EAAEZ,QAAQ;IACjBJ,SAAS,EAAEA,SAAS;iBACV,OAAO;IACjBiB,YAAY,EAAEf,KAAK,CAACgB,KAAK;IACzBC,YAAY,EAAEjB,KAAK,CAACkB;MACnBC,YAAY,CAACtB,IAAI,CAAC,eACnBS;IAAKR,SAAS,EAAC;KAAaV,OAAO,CAAO,eAC1CkB,6BAACc,UAAU;IACPC,UAAU,EAAC,UAAU;IACrBvB,SAAS,EAAC,qDAAqD;IAC/DwB,IAAI,EAAC,OAAO;kBACA5B,KAAK,CAAC6B,MAAM,CAACC,OAAO;IAChCC,OAAO,EAAElC;IACX,CACO;AAErB;;;;"}
|
@@ -11,7 +11,7 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
|
|
11
11
|
} = props;
|
12
12
|
const className = cn(otherProps.className);
|
13
13
|
return /*#__PURE__*/createElement(Root, {
|
14
|
-
delayDuration:
|
14
|
+
delayDuration: 250
|
15
15
|
}, /*#__PURE__*/createElement(Trigger, {
|
16
16
|
asChild: true,
|
17
17
|
ref: ref
|
@@ -21,13 +21,13 @@ const Tooltip = /*#__PURE__*/forwardRef(function Tooltip(props, ref) {
|
|
21
21
|
side: placement,
|
22
22
|
sideOffset: 3
|
23
23
|
}), /*#__PURE__*/createElement("div", {
|
24
|
-
className: "
|
24
|
+
className: "xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm bg-blue-900/90 px-2 py-1 text-xs font-bold text-white opacity-90",
|
25
25
|
"data-taco": "tooltip",
|
26
26
|
style: {
|
27
27
|
transformOrigin: 'var(--radix-tooltip-content-transform-origin)'
|
28
28
|
}
|
29
29
|
}, /*#__PURE__*/createElement(Arrow, {
|
30
|
-
className: "fill-
|
30
|
+
className: "-mt-px fill-blue-900/90 stroke-blue-900/90"
|
31
31
|
}), title))));
|
32
32
|
});
|
33
33
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport cn from 'classnames';\n\nexport type TooltipProps = React.HTMLAttributes<HTMLDivElement> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = React.forwardRef(function Tooltip(props: TooltipProps, ref: React.Ref<HTMLElement>) {\n const { title, children, placement, ...otherProps } = props;\n const className = cn(otherProps.className);\n\n return (\n <TooltipPrimitive.Root delayDuration={
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../../../../../../src/components/Tooltip/Tooltip.tsx"],"sourcesContent":["import * as React from 'react';\nimport * as TooltipPrimitive from '@radix-ui/react-tooltip';\nimport cn from 'classnames';\n\nexport type TooltipProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'title'> & {\n /** The element which activates the tooltip when hovered. Should be a single React/HTML element */\n children: React.ReactElement | any;\n /** Text displayed in the tooltip */\n title: string | JSX.Element;\n /**\n * Placement of the tooltip relative to the reference element. Placement will be reversed if a collision occurs\n * @defaultValue bottom\n */\n placement?: 'top' | 'right' | 'bottom' | 'left';\n};\n\nexport const Tooltip = React.forwardRef(function Tooltip(props: TooltipProps, ref: React.Ref<HTMLElement>) {\n const { title, children, placement, ...otherProps } = props;\n const className = cn(otherProps.className);\n\n return (\n <TooltipPrimitive.Root delayDuration={250}>\n <TooltipPrimitive.Trigger asChild ref={ref as any}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content {...otherProps} asChild className={className} side={placement} sideOffset={3}>\n <div\n className=\"xs:max-w-[theme(spacing.56)] max-w-[theme(spacing.32)] animate-[fade-in_150ms] rounded-sm bg-blue-900/90 px-2 py-1 text-xs font-bold text-white opacity-90\"\n data-taco=\"tooltip\"\n style={{\n transformOrigin: 'var(--radix-tooltip-content-transform-origin)',\n }}>\n <TooltipPrimitive.Arrow className=\"-mt-px fill-blue-900/90 stroke-blue-900/90\" />\n {title}\n </div>\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n});\n"],"names":["Tooltip","React","props","ref","title","children","placement","otherProps","className","cn","TooltipPrimitive","delayDuration","asChild","side","sideOffset","style","transformOrigin"],"mappings":";;;;MAgBaA,OAAO,gBAAGC,UAAgB,CAAC,SAASD,OAAO,CAACE,KAAmB,EAAEC,GAA2B;EACrG,MAAM;IAAEC,KAAK;IAAEC,QAAQ;IAAEC,SAAS;IAAE,GAAGC;GAAY,GAAGL,KAAK;EAC3D,MAAMM,SAAS,GAAGC,EAAE,CAACF,UAAU,CAACC,SAAS,CAAC;EAE1C,oBACIP,cAACS,IAAqB;IAACC,aAAa,EAAE;kBAClCV,cAACS,OAAwB;IAACE,OAAO;IAACT,GAAG,EAAEA;KAClCE,QAAQ,CACc,eAC3BJ,cAACS,MAAuB,qBACpBT,cAACS,OAAwB,oBAAKH,UAAU;IAAEK,OAAO;IAACJ,SAAS,EAAEA,SAAS;IAAEK,IAAI,EAAEP,SAAS;IAAEQ,UAAU,EAAE;mBACjGb;IACIO,SAAS,EAAC,4JAA4J;iBAC5J,SAAS;IACnBO,KAAK,EAAE;MACHC,eAAe,EAAE;;kBAErBf,cAACS,KAAsB;IAACF,SAAS,EAAC;IAA+C,EAChFJ,KAAK,CACJ,CACiB,CACL,CACN;AAEhC,CAAC;;;;"}
|
@@ -86,7 +86,7 @@ const Tour = props => {
|
|
86
86
|
var _props$children$find;
|
87
87
|
return (_props$children$find = props.children.find(child => child.props.selector === selector)) === null || _props$children$find === void 0 ? void 0 : _props$children$find.props;
|
88
88
|
}, [props.children]);
|
89
|
-
|
89
|
+
const callback = state => {
|
90
90
|
if (state.action === ACTIONS.SKIP && state.lifecycle === LIFECYCLE.COMPLETE) {
|
91
91
|
if (onClose) {
|
92
92
|
onClose(getStep(state.step.target));
|
@@ -102,7 +102,7 @@ const Tour = props => {
|
|
102
102
|
onReady(getStep(state.step.target));
|
103
103
|
}
|
104
104
|
}
|
105
|
-
}
|
105
|
+
};
|
106
106
|
return /*#__PURE__*/createElement(Joyride, Object.assign({}, rest, {
|
107
107
|
run: run,
|
108
108
|
steps: steps,
|
@@ -123,7 +123,7 @@ const Tour = props => {
|
|
123
123
|
styles: {
|
124
124
|
/** style beacon */
|
125
125
|
options: {
|
126
|
-
// tailwind.theme.colors.blue.
|
126
|
+
// tailwind.theme.colors.blue.300
|
127
127
|
primaryColor: '#6ba4ff'
|
128
128
|
}
|
129
129
|
},
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Tour.js","sources":["../../../../../../../src/components/Tour/Tour.tsx"],"sourcesContent":["import * as React from 'react';\nimport Joyride, { Step, CallBackProps, ACTIONS, LIFECYCLE, Placement, EVENTS, TooltipRenderProps } from 'react-joyride';\n\nimport { Button } from '../Button/Button';\nimport { Group } from '../Group/Group';\nimport { IconButton } from '../IconButton/IconButton';\nimport { useLocalization } from '../Provider/Localization';\n\nexport type TourTexts = {\n /** Text for back action button */\n back: string;\n /**\n * Text for close button.\n * This button is displayed if tour is not continuous - replacing the `Next` button.\n * It will pause the flow of the tour and close the tooltip\n */\n close: string;\n /**\n * Aria-label and title for close icon button in each step.\n * This button skips and completes the flow entirely\n */\n skip: string;\n /**\n * Text for last action button.\n * This button is displayed when user is on the last step of the tour\n */\n last: string;\n /**\n * Text for next action button.\n * This button is displayed if tour has more than one steps and is continuous\n */\n next: string;\n /** Aria label and title for beacon that will open the tour step */\n open: string;\n};\n\nexport type TourStepProps = {\n /** Content can be any valid react node, for e.g. a `div` */\n children: React.ReactNode;\n /** Define the position of the tour's popup relative to the element is presenting */\n position?: Placement;\n /** The css selector of the html element you want to include in a tour */\n selector: string;\n /**\n * Show beacon for step.\n * A beacon is a styled component which indicates the current element to be presented.\n * For more informations about how to create a beacon, read [Joyride](https://docs.react-joyride.com) docs\n */\n showBeacon?: boolean;\n /** Text displayed above the children/content of the popup */\n title: string;\n};\n\nconst Tooltip = ({\n continuous,\n index,\n isLastStep,\n step,\n backProps,\n primaryProps,\n skipProps,\n tooltipProps,\n size,\n locale,\n disableTourSkipOnEsc,\n}: TooltipRenderProps & { locale: TourTexts; disableTourSkipOnEsc?: boolean }) => {\n const skipButtonRef = React.useRef<HTMLButtonElement>(null);\n\n React.useEffect(() => {\n const onWindowKeyDown = (event: KeyboardEvent): void => {\n if (!disableTourSkipOnEsc) {\n if (event.key === 'Escape' && skipButtonRef.current !== null) {\n event.preventDefault();\n skipButtonRef.current.click();\n return;\n }\n }\n };\n\n window.addEventListener('keydown', onWindowKeyDown);\n\n return () => {\n window.removeEventListener('keydown', onWindowKeyDown);\n };\n }, []);\n\n return (\n <div {...tooltipProps} className=\"yt-tour__step w-88 relative rounded bg-white p-4\">\n <IconButton\n {...skipProps}\n ref={skipButtonRef}\n appearance=\"discrete\"\n icon=\"close\"\n title={locale.skip}\n aria-label={locale.skip}\n className=\"absolute top-0 right-0 mt-1 mr-1\"\n />\n {step.title && <h5>{step.title}</h5>}\n {step.content}\n <Group className=\"mt-4 justify-end\">\n {index > 0 && (\n <Button {...backProps} appearance=\"discrete\">\n {locale.back}\n </Button>\n )}\n <Button {...primaryProps} appearance=\"primary\">\n {continuous\n ? isLastStep\n ? `${locale.last} (${index + 1}/${size})`\n : `${locale.next} (${index + 1}/${size})`\n : locale.close}\n </Button>\n </Group>\n </div>\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const TourStep = (_props: TourStepProps): null => null;\n\nexport type TourProps = {\n /** Controls if [Joyride](https://docs.react-joyride.com) is active */\n autoStart?: boolean;\n /** Children should be one or more `Tour.Step` components */\n children: any;\n /** Are there more than one steps and should you be able to navigate between them using `Next` and `Previous` buttons */\n continuous?: boolean;\n /** Disable closing of tour when click on `Escape` */\n disableCloseOnEsc?: boolean;\n /** Don't close the presenting popup of the tour step when clicking outside it */\n disableOverlayClose?: boolean;\n /** Allows user to interact with the presented components (mouse and touch events) when the popup is visible */\n disableScrolling?: boolean;\n /* When user clicks on the close icon button, which will close the tour and complete the flow */\n onClose?: (step: TourStepProps) => void;\n /* When user completes the entire flow */\n onComplete?: Function;\n /** When step is ready */\n onReady?: (step: TourStepProps) => void;\n /* Allow mouse and touch events through the spotlight */\n spotlightClicks?: boolean;\n /* Stops the injection of custom overflow styles on parent container. Can be used to prevent remaining overflow styles after tour is done. */\n disableScrollParentFix?: boolean;\n /** The scroll distance from the element scrollTop value. */\n scrollOffset?: number;\n};\n\nexport const Tour = (props: TourProps) => {\n const {\n texts: { tour },\n } = useLocalization();\n\n const {\n autoStart: run,\n onComplete,\n onClose,\n onReady,\n spotlightClicks,\n disableCloseOnEsc: disableTourSkipOnEsc,\n disableScrollParentFix = false,\n scrollOffset,\n ...rest\n } = props;\n\n const steps = React.useMemo(() => {\n return React.Children.map(props.children, child => {\n const step: Step = {\n disableBeacon: !child.props.showBeacon,\n target: child.props.selector,\n placement: child.props.position,\n title: child.props.title,\n content: child.props.children,\n };\n return step;\n });\n }, [props.children]);\n\n const getStep = React.useCallback(\n (selector: string | HTMLElement) => props.children.find((child: any) => child.props.selector === selector)?.props,\n [props.children]\n );\n\n function callback(state: CallBackProps) {\n if (state.action === ACTIONS.SKIP && state.lifecycle === LIFECYCLE.COMPLETE) {\n if (onClose) {\n onClose(getStep(state.step.target));\n }\n }\n\n if (state.type === EVENTS.TOUR_END) {\n if (onComplete) {\n onComplete();\n }\n }\n\n if (state.lifecycle === LIFECYCLE.READY) {\n if (onReady) {\n onReady(getStep(state.step.target));\n }\n }\n }\n\n return (\n <Joyride\n {...rest}\n run={run}\n steps={steps}\n showProgress\n floaterProps={{\n disableAnimation: true,\n }}\n tooltipComponent={tooltipProps => (\n <Tooltip {...tooltipProps} locale={tour} disableTourSkipOnEsc={disableTourSkipOnEsc} />\n )}\n locale={tour}\n spotlightPadding={8}\n spotlightClicks={spotlightClicks}\n disableScrollParentFix={disableScrollParentFix}\n callback={callback}\n scrollOffset={scrollOffset}\n styles={{\n /** style beacon */\n options: {\n // tailwind.theme.colors.blue.light\n primaryColor: '#6ba4ff',\n },\n }}\n disableCloseOnEsc\n />\n );\n};\n\nTour.Step = TourStep;\n"],"names":["Tooltip","continuous","index","isLastStep","step","backProps","primaryProps","skipProps","tooltipProps","size","locale","disableTourSkipOnEsc","skipButtonRef","React","onWindowKeyDown","event","key","current","preventDefault","click","window","addEventListener","removeEventListener","className","IconButton","ref","appearance","icon","title","skip","content","Group","Button","back","last","next","close","TourStep","_props","Tour","props","texts","tour","useLocalization","autoStart","run","onComplete","onClose","onReady","spotlightClicks","disableCloseOnEsc","disableScrollParentFix","scrollOffset","rest","steps","map","children","child","disableBeacon","showBeacon","target","selector","placement","position","getStep","find","callback","state","action","ACTIONS","SKIP","lifecycle","LIFECYCLE","COMPLETE","type","EVENTS","TOUR_END","READY","Joyride","showProgress","floaterProps","disableAnimation","tooltipComponent","spotlightPadding","styles","options","primaryColor","Step"],"mappings":";;;;;;;AAqDA,MAAMA,OAAO,GAAG,CAAC;EACbC,UAAU;EACVC,KAAK;EACLC,UAAU;EACVC,IAAI;EACJC,SAAS;EACTC,YAAY;EACZC,SAAS;EACTC,YAAY;EACZC,IAAI;EACJC,MAAM;EACNC;CACyE;EACzE,MAAMC,aAAa,GAAGC,MAAY,CAAoB,IAAI,CAAC;EAE3DA,SAAe,CAAC;IACZ,MAAMC,eAAe,GAAIC,KAAoB;MACzC,IAAI,CAACJ,oBAAoB,EAAE;QACvB,IAAII,KAAK,CAACC,GAAG,KAAK,QAAQ,IAAIJ,aAAa,CAACK,OAAO,KAAK,IAAI,EAAE;UAC1DF,KAAK,CAACG,cAAc,EAAE;UACtBN,aAAa,CAACK,OAAO,CAACE,KAAK,EAAE;UAC7B;;;KAGX;IAEDC,MAAM,CAACC,gBAAgB,CAAC,SAAS,EAAEP,eAAe,CAAC;IAEnD,OAAO;MACHM,MAAM,CAACE,mBAAmB,CAAC,SAAS,EAAER,eAAe,CAAC;KACzD;GACJ,EAAE,EAAE,CAAC;EAEN,oBACID,uCAASL,YAAY;IAAEe,SAAS,EAAC;mBAC7BV,cAACW,UAAU,oBACHjB,SAAS;IACbkB,GAAG,EAAEb,aAAa;IAClBc,UAAU,EAAC,UAAU;IACrBC,IAAI,EAAC,OAAO;IACZC,KAAK,EAAElB,MAAM,CAACmB,IAAI;kBACNnB,MAAM,CAACmB,IAAI;IACvBN,SAAS,EAAC;KACZ,EACDnB,IAAI,CAACwB,KAAK,iBAAIf,0BAAKT,IAAI,CAACwB,KAAK,CAAM,EACnCxB,IAAI,CAAC0B,OAAO,eACbjB,cAACkB,KAAK;IAACR,SAAS,EAAC;KACZrB,KAAK,GAAG,CAAC,iBACNW,cA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KACnB;AAEV;AAEAX,IAAI,CAACgD,IAAI,GAAGlD,QAAQ;;;;"}
|
1
|
+
{"version":3,"file":"Tour.js","sources":["../../../../../../../src/components/Tour/Tour.tsx"],"sourcesContent":["import * as React from 'react';\nimport Joyride, { Step, CallBackProps, ACTIONS, LIFECYCLE, Placement, EVENTS, TooltipRenderProps } from 'react-joyride';\n\nimport { Button } from '../Button/Button';\nimport { Group } from '../Group/Group';\nimport { IconButton } from '../IconButton/IconButton';\nimport { useLocalization } from '../Provider/Localization';\n\nexport type TourTexts = {\n /** Text for back action button */\n back: string;\n /**\n * Text for close button.\n * This button is displayed if tour is not continuous - replacing the `Next` button.\n * It will pause the flow of the tour and close the tooltip\n */\n close: string;\n /**\n * Aria-label and title for close icon button in each step.\n * This button skips and completes the flow entirely\n */\n skip: string;\n /**\n * Text for last action button.\n * This button is displayed when user is on the last step of the tour\n */\n last: string;\n /**\n * Text for next action button.\n * This button is displayed if tour has more than one steps and is continuous\n */\n next: string;\n /** Aria label and title for beacon that will open the tour step */\n open: string;\n};\n\nexport type TourStepProps = {\n /** Content can be any valid react node, for e.g. a `div` */\n children: React.ReactNode;\n /** Define the position of the tour's popup relative to the element is presenting */\n position?: Placement;\n /** The css selector of the html element you want to include in a tour */\n selector: string;\n /**\n * Show beacon for step.\n * A beacon is a styled component which indicates the current element to be presented.\n * For more informations about how to create a beacon, read [Joyride](https://docs.react-joyride.com) docs\n */\n showBeacon?: boolean;\n /** Text displayed above the children/content of the popup */\n title: string;\n};\n\nconst Tooltip = ({\n continuous,\n index,\n isLastStep,\n step,\n backProps,\n primaryProps,\n skipProps,\n tooltipProps,\n size,\n locale,\n disableTourSkipOnEsc,\n}: TooltipRenderProps & { locale: TourTexts; disableTourSkipOnEsc?: boolean }) => {\n const skipButtonRef = React.useRef<HTMLButtonElement>(null);\n\n React.useEffect(() => {\n const onWindowKeyDown = (event: KeyboardEvent): void => {\n if (!disableTourSkipOnEsc) {\n if (event.key === 'Escape' && skipButtonRef.current !== null) {\n event.preventDefault();\n skipButtonRef.current.click();\n return;\n }\n }\n };\n\n window.addEventListener('keydown', onWindowKeyDown);\n\n return () => {\n window.removeEventListener('keydown', onWindowKeyDown);\n };\n }, []);\n\n return (\n <div {...tooltipProps} className=\"yt-tour__step w-88 relative rounded bg-white p-4\">\n <IconButton\n {...skipProps}\n ref={skipButtonRef}\n appearance=\"discrete\"\n icon=\"close\"\n title={locale.skip}\n aria-label={locale.skip}\n className=\"absolute top-0 right-0 mt-1 mr-1\"\n />\n {step.title && <h5>{step.title}</h5>}\n {step.content}\n <Group className=\"mt-4 justify-end\">\n {index > 0 && (\n <Button {...backProps} appearance=\"discrete\">\n {locale.back}\n </Button>\n )}\n <Button {...primaryProps} appearance=\"primary\">\n {continuous\n ? isLastStep\n ? `${locale.last} (${index + 1}/${size})`\n : `${locale.next} (${index + 1}/${size})`\n : locale.close}\n </Button>\n </Group>\n </div>\n );\n};\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport const TourStep = (_props: TourStepProps): null => null;\n\nexport type TourProps = {\n /** Controls if [Joyride](https://docs.react-joyride.com) is active */\n autoStart?: boolean;\n /** Children should be one or more `Tour.Step` components */\n children: any;\n /** Are there more than one steps and should you be able to navigate between them using `Next` and `Previous` buttons */\n continuous?: boolean;\n /** Disable closing of tour when click on `Escape` */\n disableCloseOnEsc?: boolean;\n /** Don't close the presenting popup of the tour step when clicking outside it */\n disableOverlayClose?: boolean;\n /** Allows user to interact with the presented components (mouse and touch events) when the popup is visible */\n disableScrolling?: boolean;\n /* When user clicks on the close icon button, which will close the tour and complete the flow */\n onClose?: (step: TourStepProps) => void;\n /* When user completes the entire flow */\n onComplete?: Function;\n /** When step is ready */\n onReady?: (step: TourStepProps) => void;\n /* Allow mouse and touch events through the spotlight */\n spotlightClicks?: boolean;\n /* Stops the injection of custom overflow styles on parent container. Can be used to prevent remaining overflow styles after tour is done. */\n disableScrollParentFix?: boolean;\n /** The scroll distance from the element scrollTop value. */\n scrollOffset?: number;\n};\n\nexport const Tour = (props: TourProps) => {\n const {\n texts: { tour },\n } = useLocalization();\n\n const {\n autoStart: run,\n onComplete,\n onClose,\n onReady,\n spotlightClicks,\n disableCloseOnEsc: disableTourSkipOnEsc,\n disableScrollParentFix = false,\n scrollOffset,\n ...rest\n } = props;\n\n const steps = React.useMemo(() => {\n return React.Children.map(props.children, child => {\n const step: Step = {\n disableBeacon: !child.props.showBeacon,\n target: child.props.selector,\n placement: child.props.position,\n title: child.props.title,\n content: child.props.children,\n };\n return step;\n });\n }, [props.children]);\n\n const getStep = React.useCallback(\n (selector: string | HTMLElement) => props.children.find((child: any) => child.props.selector === selector)?.props,\n [props.children]\n );\n\n const callback = (state: CallBackProps) => {\n if (state.action === ACTIONS.SKIP && state.lifecycle === LIFECYCLE.COMPLETE) {\n if (onClose) {\n onClose(getStep(state.step.target));\n }\n }\n\n if (state.type === EVENTS.TOUR_END) {\n if (onComplete) {\n onComplete();\n }\n }\n\n if (state.lifecycle === LIFECYCLE.READY) {\n if (onReady) {\n onReady(getStep(state.step.target));\n }\n }\n };\n\n return (\n <Joyride\n {...rest}\n run={run}\n steps={steps}\n showProgress\n floaterProps={{\n disableAnimation: true,\n }}\n tooltipComponent={tooltipProps => (\n <Tooltip {...tooltipProps} locale={tour} disableTourSkipOnEsc={disableTourSkipOnEsc} />\n )}\n locale={tour}\n spotlightPadding={8}\n spotlightClicks={spotlightClicks}\n disableScrollParentFix={disableScrollParentFix}\n callback={callback}\n scrollOffset={scrollOffset}\n styles={{\n /** style beacon */\n options: {\n // tailwind.theme.colors.blue.300\n primaryColor: '#6ba4ff',\n },\n }}\n disableCloseOnEsc\n />\n );\n};\n\nTour.Step = TourStep;\n"],"names":["Tooltip","continuous","index","isLastStep","step","backProps","primaryProps","skipProps","tooltipProps","size","locale","disableTourSkipOnEsc","skipButtonRef","React","onWindowKeyDown","event","key","current","preventDefault","click","window","addEventListener","removeEventListener","className","IconButton","ref","appearance","icon","title","skip","content","Group","Button","back","last","next","close","TourStep","_props","Tour","props","texts","tour","useLocalization","autoStart","run","onComplete","onClose","onReady","spotlightClicks","disableCloseOnEsc","disableScrollParentFix","scrollOffset","rest","steps","map","children","child","disableBeacon","showBeacon","target","selector","placement","position","getStep","find","callback","state","action","ACTIONS","SKIP","lifecycle","LIFECYCLE","COMPLETE","type","EVENTS","TOUR_END","READY","Joyride","showProgress","floaterProps","disableAnimation","tooltipComponent","spotlightPadding","styles","options","primaryColor","Step"],"mappings":";;;;;;;AAqDA,MAAMA,OAAO,GAAG,CAAC;EACbC,UAAU;EACVC,KAAK;EACLC,UAAU;EACVC,IAAI;EACJC,SAAS;EACTC,YAAY;EACZC,SAAS;EACTC,YAAY;EACZC,IAAI;EACJC,MAAM;EACNC;CACyE;EACzE,MAAMC,aAAa,GAAGC,MAAY,CAAoB,IAAI,CAAC;EAE3DA,SAAe,CAAC;IACZ,MAAMC,eAAe,GAAIC,KAAoB;MACzC,IAAI,CAACJ,oBAAoB,EAAE;QACvB,IAAII,KAAK,CAACC,GAAG,KAAK,QAAQ,IAAIJ,aAAa,CAACK,OAAO,KAAK,IAAI,EAAE;UAC1DF,KAAK,CAACG,cAAc,EAAE;UACtBN,aAAa,CAACK,OAAO,CAACE,KAAK,EAAE;UAC7B;;;KAGX;IAEDC,MAAM,CAACC,gBAAgB,CAAC,SAAS,EAAEP,eAAe,CAAC;IAEnD,OAAO;MACHM,MAAM,CAACE,mBAAmB,CAAC,SAAS,EAAER,eAAe,CAAC;KACzD;GACJ,EAAE,EAAE,CAAC;EAEN,oBACID,uCAASL,YAAY;IAAEe,SAAS,EAAC;mBAC7BV,cAACW,UAAU,oBACHjB,SAAS;IACbkB,GAAG,EAAEb,aAAa;IAClBc,UAAU,EAAC,UAAU;IACrBC,IAAI,EAAC,OAAO;IACZC,KAAK,EAAElB,MAAM,CAACmB,IAAI;kBACNnB,MAAM,CAACmB,IAAI;IACvBN,SAAS,EAAC;KACZ,EACDnB,IAAI,CAACwB,KAAK,iBAAIf,0BAAK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ce,QAAQ,EAAEA,QAAQ;IAClBd,YAAY,EAAEA,YAAY;IAC1BgC,MAAM,EAAE;;MAEJC,OAAO,EAAE;;QAELC,YAAY,EAAE;;KAErB;IACDpC,iBAAiB;KACnB;AAEV;AAEAX,IAAI,CAACgD,IAAI,GAAGlD,QAAQ;;;;"}
|
@@ -14,12 +14,12 @@ export { Button } from './components/Button/Button.js';
|
|
14
14
|
export { Calendar } from './components/Calendar/Calendar.js';
|
15
15
|
export { Card } from './components/Card/Card.js';
|
16
16
|
export { Checkbox } from './components/Checkbox/Checkbox.js';
|
17
|
+
export { useBoundingClientRectListener } from './hooks/useBoundingClientRectListener.js';
|
17
18
|
export { useMergedRef } from './hooks/useMergedRef.js';
|
18
19
|
export { Input } from './components/Input/Input.js';
|
19
20
|
export { getNextIndexFromKey, useListKeyboardNavigation } from './utils/hooks/useListKeyboardNavigation.js';
|
20
21
|
export { useListScrollTo } from './utils/hooks/useListScrollTo.js';
|
21
22
|
export { Spinner } from './components/Spinner/Spinner.js';
|
22
|
-
export { useBoundingClientRectListener } from './hooks/useBoundingClientRectListener.js';
|
23
23
|
export { Combobox } from './components/Combobox/Combobox.js';
|
24
24
|
export { format, parseFromCustomString, parseFromISOString } from './utils/date.js';
|
25
25
|
export { Popover } from './components/Popover/Popover.js';
|
@@ -1,13 +1,13 @@
|
|
1
1
|
const colors = {
|
2
|
-
green: 'bg-
|
3
|
-
yellow: 'bg-
|
4
|
-
red: 'bg-
|
5
|
-
blue: 'bg-
|
6
|
-
purple: 'bg-
|
7
|
-
orange: 'bg-
|
8
|
-
brown: 'bg-
|
9
|
-
pink: 'bg-
|
10
|
-
grey: 'bg-grey text-
|
2
|
+
green: 'bg-green-100 text-green-900',
|
3
|
+
yellow: 'bg-yellow-100 text-yellow-900',
|
4
|
+
red: 'bg-red-100 text-red-900',
|
5
|
+
blue: 'bg-blue-100 text-blue-900',
|
6
|
+
purple: 'bg-purple-100 text-purple-900',
|
7
|
+
orange: 'bg-orange-100 text-orange-900',
|
8
|
+
brown: 'bg-brown-100 text-brown-900',
|
9
|
+
pink: 'bg-pink-100 text-pink-900',
|
10
|
+
grey: 'bg-grey-200 text-grey-900'
|
11
11
|
};
|
12
12
|
|
13
13
|
export { colors };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"colors.js","sources":["../../../../../../src/utils/colors.ts"],"sourcesContent":["export const colors = {\n green: 'bg-
|
1
|
+
{"version":3,"file":"colors.js","sources":["../../../../../../src/utils/colors.ts"],"sourcesContent":["export const colors = {\n green: 'bg-green-100 text-green-900',\n yellow: 'bg-yellow-100 text-yellow-900',\n red: 'bg-red-100 text-red-900',\n blue: 'bg-blue-100 text-blue-900',\n purple: 'bg-purple-100 text-purple-900',\n orange: 'bg-orange-100 text-orange-900',\n brown: 'bg-brown-100 text-brown-900',\n pink: 'bg-pink-100 text-pink-900',\n grey: 'bg-grey-200 text-grey-900',\n};\n\nexport type Color = keyof typeof colors;\n"],"names":["colors","green","yellow","red","blue","purple","orange","brown","pink","grey"],"mappings":"MAAaA,MAAM,GAAG;EAClBC,KAAK,EAAE,6BAA6B;EACpCC,MAAM,EAAE,+BAA+B;EACvCC,GAAG,EAAE,yBAAyB;EAC9BC,IAAI,EAAE,2BAA2B;EACjCC,MAAM,EAAE,+BAA+B;EACvCC,MAAM,EAAE,+BAA+B;EACvCC,KAAK,EAAE,6BAA6B;EACpCC,IAAI,EAAE,2BAA2B;EACjCC,IAAI,EAAE;;;;;"}
|
package/dist/index.css
CHANGED
@@ -74,7 +74,7 @@
|
|
74
74
|
}
|
75
75
|
|
76
76
|
hr {
|
77
|
-
@apply bg-grey-
|
77
|
+
@apply bg-grey-100 my-5 flex h-px border-none;
|
78
78
|
}
|
79
79
|
|
80
80
|
h1,
|
@@ -116,16 +116,16 @@
|
|
116
116
|
}
|
117
117
|
|
118
118
|
a {
|
119
|
-
@apply text-blue no-underline;
|
119
|
+
@apply text-blue-500 no-underline;
|
120
120
|
}
|
121
121
|
|
122
122
|
a:hover,
|
123
123
|
a:focus {
|
124
|
-
@apply text-blue-
|
124
|
+
@apply text-blue-300;
|
125
125
|
}
|
126
126
|
|
127
127
|
a:active {
|
128
|
-
@apply text-blue-
|
128
|
+
@apply text-blue-700;
|
129
129
|
}
|
130
130
|
|
131
131
|
button::-moz-focus-inner {
|
@@ -139,19 +139,23 @@
|
|
139
139
|
@apply block cursor-pointer;
|
140
140
|
}
|
141
141
|
|
142
|
+
input[type='search']::-webkit-search-cancel-button {
|
143
|
+
-webkit-appearance: none;
|
144
|
+
}
|
145
|
+
|
142
146
|
table.yt-table {
|
143
147
|
@apply focus:yt-focus flex flex-col focus:rounded-sm;
|
144
148
|
}
|
145
149
|
table.yt-table thead.yt-table__head tr.yt-table__row {
|
146
|
-
@apply border-grey-
|
150
|
+
@apply border-grey-100 flex h-auto min-h-[2.5rem] w-full select-none border-t-0 border-b-2 font-bold;
|
147
151
|
}
|
148
152
|
|
149
153
|
table.yt-table thead.yt-table__head tr.yt-table__row th.yt-table__cell {
|
150
|
-
@apply text-grey-
|
154
|
+
@apply text-grey-700 flex flex-1 justify-center truncate p-2 text-center align-middle hover:text-black;
|
151
155
|
}
|
152
156
|
|
153
157
|
table.yt-table tbody.yt-table__body tr.yt-table__row {
|
154
|
-
@apply border-grey-
|
158
|
+
@apply border-grey-100 hover:bg-grey-100 flex min-h-[2.5rem] border-b;
|
155
159
|
}
|
156
160
|
|
157
161
|
table.yt-table tbody.yt-table__body tr.yt-table__row td.yt-table__cell {
|
@@ -214,7 +218,7 @@
|
|
214
218
|
}
|
215
219
|
|
216
220
|
[data-taco='calendar'] .DayPicker-Weekday {
|
217
|
-
@apply text-grey-
|
221
|
+
@apply text-grey-700 flex-grow text-center uppercase;
|
218
222
|
}
|
219
223
|
|
220
224
|
[data-taco='calendar'] .DayPicker-Weekday abbr[title] {
|
@@ -242,25 +246,25 @@
|
|
242
246
|
}
|
243
247
|
|
244
248
|
[data-taco='calendar'] .DayPicker-TodayButton {
|
245
|
-
@apply
|
249
|
+
@apply cursor-pointer border-none bg-transparent text-xs text-blue-500;
|
246
250
|
}
|
247
251
|
|
248
252
|
[data-taco='calendar'] .DayPicker-TodayButton:hover {
|
249
|
-
@apply text-blue-
|
253
|
+
@apply text-blue-300;
|
250
254
|
}
|
251
255
|
|
252
256
|
/* Default modifiers */
|
253
257
|
|
254
258
|
[data-taco='calendar'] .DayPicker-Day--today {
|
255
|
-
@apply text-blue
|
259
|
+
@apply font-bold text-blue-500;
|
256
260
|
}
|
257
261
|
|
258
262
|
[data-taco='calendar'] .DayPicker-Day--outside {
|
259
|
-
@apply text-grey-
|
263
|
+
@apply text-grey-300 cursor-default;
|
260
264
|
}
|
261
265
|
|
262
266
|
[data-taco='calendar'] .DayPicker-Day--disabled {
|
263
|
-
@apply text-grey-
|
267
|
+
@apply text-grey-300 pointer-events-none cursor-default;
|
264
268
|
}
|
265
269
|
|
266
270
|
[data-taco='calendar'] .icon:hover,
|
@@ -268,7 +272,7 @@
|
|
268
272
|
.DayPicker-Day:not(.DayPicker-Day--disabled):not(.DayPicker-Day--selected):not(.DayPicker-Day--outside):hover,
|
269
273
|
[data-taco='calendar'] .DayPicker-Day--highlighted,
|
270
274
|
[data-taco='calendar'] .DayPicker-Day--selected {
|
271
|
-
@apply bg-grey-
|
275
|
+
@apply bg-grey-100 text-black;
|
272
276
|
}
|
273
277
|
|
274
278
|
[data-taco='calendar'] .calendar-caption {
|
@@ -276,7 +280,7 @@
|
|
276
280
|
}
|
277
281
|
|
278
282
|
[data-taco='scrollable-list'].yt-list--multiselect li:first-child {
|
279
|
-
@apply border-grey-
|
283
|
+
@apply border-grey-100 border-b-2 pl-4; /* Listbox max-height is dependant on this border-bottom-width value! */
|
280
284
|
}
|
281
285
|
|
282
286
|
[data-taco='scrollable-list'] li > [data-taco='icon'] {
|
@@ -284,23 +288,23 @@
|
|
284
288
|
}
|
285
289
|
|
286
290
|
[data-taco='scrollable-list']:not([readonly]) li:hover {
|
287
|
-
@apply wcag-blue-
|
291
|
+
@apply wcag-blue-300;
|
288
292
|
}
|
289
293
|
|
290
294
|
[data-taco='scrollable-list']:not([readonly]) li:hover [data-taco='icon'] {
|
291
|
-
@apply wcag-blue-
|
295
|
+
@apply wcag-blue-300;
|
292
296
|
}
|
293
297
|
|
294
298
|
[data-taco='scrollable-list'] li:focus,
|
295
299
|
[data-taco='scrollable-list']:not(.yt-list--multiselect) li[aria-selected='true'],
|
296
300
|
[data-taco='scrollable-list'] li[data-focused='true'] {
|
297
|
-
@apply wcag-blue;
|
301
|
+
@apply wcag-blue-500;
|
298
302
|
}
|
299
303
|
|
300
304
|
[data-taco='scrollable-list'] li:focus [data-taco='icon'],
|
301
305
|
[data-taco='scrollable-list']:not(.yt-list--multiselect) li[aria-selected='true'] [data-taco='icon'],
|
302
306
|
[data-taco='scrollable-list'] li[data-focused='true'] [data-taco='icon'] {
|
303
|
-
@apply wcag-blue;
|
307
|
+
@apply wcag-blue-500;
|
304
308
|
}
|
305
309
|
|
306
310
|
[data-taco='scrollable-list'][readonly] li {
|
@@ -315,7 +319,7 @@
|
|
315
319
|
[data-taco='scrollable-list'] li.yt-list__empty,
|
316
320
|
[data-taco='scrollable-list'] li.yt-list__empty:hover,
|
317
321
|
[data-taco='scrollable-list'] li.yt-list__empty:focus {
|
318
|
-
@apply text-grey-
|
322
|
+
@apply text-grey-700 flex w-full items-center overflow-hidden bg-white px-3 italic;
|
319
323
|
}
|
320
324
|
|
321
325
|
[data-taco='scrollable-list'] li.yt-list__empty [data-taco='spinner'] {
|
@@ -331,7 +335,7 @@
|
|
331
335
|
stroke-linecap: round;
|
332
336
|
stroke-dasharray: 282.743343;
|
333
337
|
stroke-dashoffset: 67.85840232;
|
334
|
-
stroke: theme('colors.blue.
|
338
|
+
stroke: theme('colors.blue.500');
|
335
339
|
}
|
336
340
|
|
337
341
|
@keyframes spinnerAnimation {
|
@@ -360,7 +364,7 @@
|
|
360
364
|
|
361
365
|
.yt-grey-solid [data-taco='spinner'] svg circle,
|
362
366
|
.yt-yellow-solid [data-taco='spinner'] svg circle {
|
363
|
-
stroke: theme('colors.grey.
|
367
|
+
stroke: theme('colors.grey.700');
|
364
368
|
}
|
365
369
|
|
366
370
|
.yt-blue-solid [data-taco='spinner'] svg circle,
|
@@ -370,33 +374,33 @@
|
|
370
374
|
}
|
371
375
|
|
372
376
|
.yt-blue-inverted svg circle {
|
373
|
-
stroke: theme('colors.blue.
|
377
|
+
stroke: theme('colors.blue.500');
|
374
378
|
}
|
375
379
|
|
376
380
|
.yt-yellow-inverted svg circle {
|
377
|
-
stroke: theme('colors.yellow.
|
381
|
+
stroke: theme('colors.yellow.500');
|
378
382
|
}
|
379
383
|
|
380
384
|
.yt-red-inverted svg circle {
|
381
|
-
stroke: theme('colors.red.
|
385
|
+
stroke: theme('colors.red.500');
|
382
386
|
}
|
383
387
|
|
384
388
|
.yt-green-inverted svg circle {
|
385
|
-
stroke: theme('colors.green.
|
389
|
+
stroke: theme('colors.green.500');
|
386
390
|
}
|
387
391
|
|
388
392
|
.yt-grey-inverted svg circle {
|
389
|
-
stroke: theme('colors.grey.
|
393
|
+
stroke: theme('colors.grey.700');
|
390
394
|
}
|
391
395
|
|
392
396
|
[data-taco='combobox'] > [aria-expanded='true'] + [role='dialog'] > ul,
|
393
397
|
[data-taco='combobox'] > [aria-expanded='true'] + [role='dialog'] > ul:hover {
|
394
|
-
@apply border-blue;
|
398
|
+
@apply border-blue-500;
|
395
399
|
}
|
396
400
|
|
397
401
|
.yt-dialog__drag::before,
|
398
402
|
.yt-dialog__drag::after {
|
399
|
-
@apply bg-grey-
|
403
|
+
@apply bg-grey-300 absolute rounded;
|
400
404
|
content: '';
|
401
405
|
left: theme('spacing.1');
|
402
406
|
height: 2px;
|
@@ -429,7 +433,7 @@
|
|
429
433
|
}
|
430
434
|
|
431
435
|
[data-taco='hanger'] a {
|
432
|
-
@apply text-grey underline;
|
436
|
+
@apply text-grey-200 underline;
|
433
437
|
}
|
434
438
|
|
435
439
|
[data-taco='hanger'] > *:last-child {
|
@@ -453,7 +457,7 @@
|
|
453
457
|
.yt-navigation__item--active,
|
454
458
|
.yt-navigation__item--active a,
|
455
459
|
.yt-navigation__item--active .yt-navigation__item__postfix {
|
456
|
-
@apply text-blue;
|
460
|
+
@apply text-blue-500;
|
457
461
|
}
|
458
462
|
|
459
463
|
.yt-navigation__item--dropping,
|
@@ -509,7 +513,7 @@
|
|
509
513
|
|
510
514
|
/* rows */
|
511
515
|
.yt-table__row {
|
512
|
-
@apply border-grey-
|
516
|
+
@apply border-grey-100 flex border-b;
|
513
517
|
min-height: 2.5rem;
|
514
518
|
}
|
515
519
|
|
@@ -541,12 +545,12 @@
|
|
541
545
|
}
|
542
546
|
|
543
547
|
.yt-table__head .yt-table__head__group .yt-table__cell.yt-table__cell__group {
|
544
|
-
@apply border-grey-
|
548
|
+
@apply border-grey-100 border-b;
|
545
549
|
flex-basis: 100%;
|
546
550
|
}
|
547
551
|
|
548
552
|
.yt-table__head .yt-table__head__group + .yt-table__head__group {
|
549
|
-
@apply border-grey-
|
553
|
+
@apply border-grey-100 border-l;
|
550
554
|
}
|
551
555
|
|
552
556
|
.yt-table__head .yt-table__cell > [data-taco='icon'] {
|
@@ -554,7 +558,7 @@
|
|
554
558
|
}
|
555
559
|
|
556
560
|
.yt-table__head .yt-table__cell.yt-table__cell__group + .yt-table__cell__group {
|
557
|
-
@apply border-grey-
|
561
|
+
@apply border-grey-100 border-l-2;
|
558
562
|
}
|
559
563
|
|
560
564
|
.yt-table.yt-table--windowed.table-with-scrollbar .yt-table__head {
|
@@ -578,22 +582,22 @@
|
|
578
582
|
}
|
579
583
|
|
580
584
|
.yt-table__body .yt-table__row.yt-table__row--active {
|
581
|
-
@apply bg-grey-
|
585
|
+
@apply bg-grey-100;
|
582
586
|
}
|
583
587
|
|
584
588
|
.yt-table__body .yt-table__row.yt-table__row--dragging,
|
585
589
|
.yt-table__body .yt-table__row.yt-table__row--dragging:hover {
|
586
|
-
@apply bg-blue text-white;
|
590
|
+
@apply bg-blue-500 text-white;
|
587
591
|
}
|
588
592
|
|
589
593
|
/* edit */
|
590
594
|
.yt-table__body .yt-table__row.yt-table__row--editing {
|
591
|
-
@apply border-grey border-t;
|
595
|
+
@apply border-grey-200 border-t;
|
592
596
|
}
|
593
597
|
|
594
598
|
.yt-table__body .yt-table__row.yt-table__row--editing,
|
595
599
|
.yt-table__body .yt-table__row.yt-table__row--editing:hover {
|
596
|
-
@apply wcag-grey-
|
600
|
+
@apply wcag-grey-50;
|
597
601
|
}
|
598
602
|
|
599
603
|
.yt-table__body .yt-table__row.yt-table__row--editing .yt-table__cell {
|
@@ -620,7 +624,7 @@
|
|
620
624
|
|
621
625
|
/* drag */
|
622
626
|
#yt-table__drag__placeholder {
|
623
|
-
@apply
|
627
|
+
@apply flex w-3/12 rounded bg-blue-500 p-4 font-bold text-white;
|
624
628
|
}
|
625
629
|
|
626
630
|
.yt-tabs .yt-tab__list[aria-orientation='vertical'] {
|
package/dist/index.d.ts
CHANGED
@@ -38,7 +38,6 @@ export * from './components/Tag/Tag';
|
|
38
38
|
export * from './components/Textarea/Textarea';
|
39
39
|
export * from './components/Toast/Toaster';
|
40
40
|
export * from './components/Switch/Switch';
|
41
|
-
export * from './components/Tag/Tag';
|
42
41
|
export * from './components/Tooltip/Tooltip';
|
43
42
|
export * from './components/Tour/Tour';
|
44
43
|
export * from './components/Treeview/Treeview';
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
2
|
export declare type SortableItemId = string | number;
|
3
3
|
export declare type SortableListItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'id'> & {
|
4
|
+
disabled?: boolean;
|
4
5
|
id: SortableItemId;
|
5
6
|
};
|
6
7
|
export declare function Item(props: any): JSX.Element;
|