@economic/taco 0.0.31-alpha.0 → 0.0.32-alpha.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/esm/_virtual/_rollupPluginBabelHelpers.js +19 -1
- package/dist/esm/_virtual/_rollupPluginBabelHelpers.js.map +1 -1
- package/dist/esm/components/Badge/Badge.js +14 -14
- package/dist/esm/components/Badge/Badge.js.map +1 -1
- package/dist/esm/components/Banner/Banner.js +5 -7
- package/dist/esm/components/Banner/Banner.js.map +1 -1
- package/dist/esm/components/Button/Button.js +13 -12
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Calendar/Calendar.js +71 -56
- package/dist/esm/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +18 -15
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Combobox/Combobox.js +25 -23
- package/dist/esm/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/components/Datepicker/Datepicker.js +52 -48
- package/dist/esm/components/Datepicker/Datepicker.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +58 -39
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Field/Field.js +12 -10
- package/dist/esm/components/Field/Field.js.map +1 -1
- package/dist/esm/components/Form/Form.js +8 -6
- package/dist/esm/components/Form/Form.js.map +1 -1
- package/dist/esm/components/Group/Group.js +8 -6
- package/dist/esm/components/Group/Group.js.map +1 -1
- package/dist/esm/components/Hanger/Hanger.js +33 -25
- package/dist/esm/components/Hanger/Hanger.js.map +1 -1
- package/dist/esm/components/Icon/Icon.js +8 -7
- package/dist/esm/components/Icon/Icon.js.map +1 -1
- package/dist/esm/components/IconButton/IconButton.js +11 -9
- package/dist/esm/components/IconButton/IconButton.js.map +1 -1
- package/dist/esm/components/Input/Input.js +24 -26
- package/dist/esm/components/Input/Input.js.map +1 -1
- package/dist/esm/components/Listbox/Listbox.js +25 -24
- package/dist/esm/components/Listbox/Listbox.js.map +1 -1
- package/dist/esm/components/SearchInput/SearchInput.js +11 -10
- package/dist/esm/components/SearchInput/SearchInput.js.map +1 -1
- package/dist/taco.cjs.development.js +422 -344
- 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
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Hanger.js","sources":["../../../../src/components/Hanger/Hanger.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\nimport { IconButton } from '../IconButton/IconButton';\r\nimport { Placement } from '../..';\r\nimport { UnstyledArrow, UnstyledContent } from '../Popover/Primitives';\r\nimport { useLocalization } from '../Provider/Provider';\r\nimport './Hanger.css';\r\nimport mergeRefs from '../../utils/mergeRefs';\r\n\r\ntype HangerContextValue = {\r\n props: any;\r\n ref: React.Ref<HTMLElement>;\r\n};\r\nconst HangerContext = React.createContext<HangerContextValue>({\r\n props: {},\r\n ref: null,\r\n});\r\n\r\nexport type HangerTexts = {\r\n /** Aria-label for the close icon button of hanger */\r\n close: string;\r\n};\r\n\r\nexport type HangerAnchorProps = React.HTMLAttributes<HTMLDivElement>;\r\nconst Anchor = React.forwardRef(function HangerAnchor(props: HangerAnchorProps, ref: React.Ref<HTMLDivElement>) {\r\n const context = React.useContext(HangerContext);\r\n let children = props.children;\r\n\r\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\r\n console.warn(\r\n `Hanger.Anchor requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\r\n );\r\n children = <span>{props.children}</span>;\r\n }\r\n\r\n return (\r\n <PopoverPrimitive.Anchor {...context.props} {...props} children={children} ref={mergeRefs([context.ref, ref])} asChild />\r\n );\r\n});\r\n\r\nexport type HangerContentProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Set the position of the Hanger relative to its achor. Default value is `bottom` */\r\n placement?: Placement;\r\n};\r\n\r\nconst Content = React.forwardRef(function HangerContent(props: HangerContentProps, ref: React.Ref<HTMLDivElement>) {\r\n const context = React.useContext(HangerContext);\r\n const { texts } = useLocalization();\r\n const className = cn(\r\n 'wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent',\r\n props.className\r\n );\r\n const handleInteractOutside = (event: CustomEvent): void => {\r\n event.preventDefault();\r\n };\r\n\r\n return (\r\n <UnstyledContent\r\n className={className}\r\n data-taco=\"hanger\"\r\n onInteractOutside={handleInteractOutside}\r\n placement={props.placement}\r\n ref={ref}\r\n >\r\n {props.children}\r\n <UnstyledArrow className=\"text-blue\" />\r\n <PopoverPrimitive.Close asChild>\r\n <IconButton\r\n appearance=\"primary\"\r\n aria-label={texts.hanger.close}\r\n className=\"absolute top-0 right-0 ml-2 mr-2 mt-2 text-white\"\r\n icon=\"close\"\r\n onClick={context.props.onClose}\r\n />\r\n </PopoverPrimitive.Close>\r\n </UnstyledContent>\r\n );\r\n});\r\n\r\nexport type HangerProps = React.PropsWithChildren<{\r\n /** An anchor to be used for the hanger, should not be set if `children` already contains an anchor */\r\n anchor?: JSX.Element;\r\n /**\r\n * Shows or hides hanger depending on the value\r\n * @defaultValue true\r\n */\r\n defaultOpen?: boolean;\r\n /** Handler called when user closes the hanger */\r\n onClose?: () => void;\r\n}>;\r\n\r\nexport type ForwardedHangerWithStatics = React.ForwardRefExoticComponent<HangerProps & React.RefAttributes<HTMLElement>> & {\r\n Anchor: React.ForwardRefExoticComponent<HangerAnchorProps>;\r\n Content: React.ForwardRefExoticComponent<HangerContentProps>;\r\n};\r\n\r\nexport const Hanger = React.forwardRef(function Hanger(props: HangerProps, ref: React.Ref<HTMLElement>) {\r\n const { anchor, children, defaultOpen = true, ...otherProps } = props;\r\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\r\n\r\n // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal\r\n const [open, setOpen] = React.useState(false);\r\n React.useEffect(() => {\r\n if (defaultOpen) {\r\n setOpen(defaultOpen);\r\n }\r\n }, []);\r\n\r\n return (\r\n <HangerContext.Provider value={context}>\r\n <PopoverPrimitive.Root key={String(open)} defaultOpen={open}>\r\n {anchor && <Anchor>{anchor}</Anchor>}\r\n {children}\r\n </PopoverPrimitive.Root>\r\n </HangerContext.Provider>\r\n );\r\n}) as ForwardedHangerWithStatics;\r\nHanger.Anchor = Anchor;\r\nHanger.Content = Content;\r\n"],"names":["HangerContext","React","props","ref","Anchor","HangerAnchor","context","children","type","console","warn","name","PopoverPrimitive","mergeRefs","asChild","Content","HangerContent","
|
1
|
+
{"version":3,"file":"Hanger.js","sources":["../../../../src/components/Hanger/Hanger.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\nimport { IconButton } from '../IconButton/IconButton';\r\nimport { Placement } from '../..';\r\nimport { UnstyledArrow, UnstyledContent } from '../Popover/Primitives';\r\nimport { useLocalization } from '../Provider/Provider';\r\nimport './Hanger.css';\r\nimport mergeRefs from '../../utils/mergeRefs';\r\n\r\ntype HangerContextValue = {\r\n props: any;\r\n ref: React.Ref<HTMLElement>;\r\n};\r\nconst HangerContext = React.createContext<HangerContextValue>({\r\n props: {},\r\n ref: null,\r\n});\r\n\r\nexport type HangerTexts = {\r\n /** Aria-label for the close icon button of hanger */\r\n close: string;\r\n};\r\n\r\nexport type HangerAnchorProps = React.HTMLAttributes<HTMLDivElement>;\r\nconst Anchor = React.forwardRef(function HangerAnchor(props: HangerAnchorProps, ref: React.Ref<HTMLDivElement>) {\r\n const context = React.useContext(HangerContext);\r\n let children = props.children;\r\n\r\n if (React.isValidElement(props.children) && typeof props.children?.type === 'function') {\r\n console.warn(\r\n `Hanger.Anchor requires its child to forwardRef so that it can attach to the dom element. Did you mean to wrap '${props.children.type.name}' in React.forwardRef()? Taco has wrapped '${props.children.type.name}' in a 'span' to maintain functionality, but this may cause unintended behaviour`\r\n );\r\n children = <span>{props.children}</span>;\r\n }\r\n\r\n return (\r\n <PopoverPrimitive.Anchor {...context.props} {...props} children={children} ref={mergeRefs([context.ref, ref])} asChild />\r\n );\r\n});\r\n\r\nexport type HangerContentProps = React.HTMLAttributes<HTMLDivElement> & {\r\n /** Set the position of the Hanger relative to its achor. Default value is `bottom` */\r\n placement?: Placement;\r\n};\r\n\r\nconst Content = React.forwardRef(function HangerContent(props: HangerContentProps, ref: React.Ref<HTMLDivElement>) {\r\n const context = React.useContext(HangerContext);\r\n const { texts } = useLocalization();\r\n const className = cn(\r\n 'wcag-blue border border-transparent rounded p-3 pr-12 yt-shadow z-[996] focus:border-transparent',\r\n props.className\r\n );\r\n const handleInteractOutside = (event: CustomEvent): void => {\r\n event.preventDefault();\r\n };\r\n\r\n return (\r\n <UnstyledContent\r\n className={className}\r\n data-taco=\"hanger\"\r\n onInteractOutside={handleInteractOutside}\r\n placement={props.placement}\r\n ref={ref}\r\n >\r\n {props.children}\r\n <UnstyledArrow className=\"text-blue\" />\r\n <PopoverPrimitive.Close asChild>\r\n <IconButton\r\n appearance=\"primary\"\r\n aria-label={texts.hanger.close}\r\n className=\"absolute top-0 right-0 ml-2 mr-2 mt-2 text-white\"\r\n icon=\"close\"\r\n onClick={context.props.onClose}\r\n />\r\n </PopoverPrimitive.Close>\r\n </UnstyledContent>\r\n );\r\n});\r\n\r\nexport type HangerProps = React.PropsWithChildren<{\r\n /** An anchor to be used for the hanger, should not be set if `children` already contains an anchor */\r\n anchor?: JSX.Element;\r\n /**\r\n * Shows or hides hanger depending on the value\r\n * @defaultValue true\r\n */\r\n defaultOpen?: boolean;\r\n /** Handler called when user closes the hanger */\r\n onClose?: () => void;\r\n}>;\r\n\r\nexport type ForwardedHangerWithStatics = React.ForwardRefExoticComponent<HangerProps & React.RefAttributes<HTMLElement>> & {\r\n Anchor: React.ForwardRefExoticComponent<HangerAnchorProps>;\r\n Content: React.ForwardRefExoticComponent<HangerContentProps>;\r\n};\r\n\r\nexport const Hanger = React.forwardRef(function Hanger(props: HangerProps, ref: React.Ref<HTMLElement>) {\r\n const { anchor, children, defaultOpen = true, ...otherProps } = props;\r\n const context = React.useMemo(() => ({ props: otherProps, ref }), [otherProps]);\r\n\r\n // we do this to ensure hangers are mounted after their containers, e.g. if the container is another portal\r\n const [open, setOpen] = React.useState(false);\r\n React.useEffect(() => {\r\n if (defaultOpen) {\r\n setOpen(defaultOpen);\r\n }\r\n }, []);\r\n\r\n return (\r\n <HangerContext.Provider value={context}>\r\n <PopoverPrimitive.Root key={String(open)} defaultOpen={open}>\r\n {anchor && <Anchor>{anchor}</Anchor>}\r\n {children}\r\n </PopoverPrimitive.Root>\r\n </HangerContext.Provider>\r\n );\r\n}) as ForwardedHangerWithStatics;\r\nHanger.Anchor = Anchor;\r\nHanger.Content = Content;\r\n"],"names":["HangerContext","React","props","ref","Anchor","HangerAnchor","context","children","type","console","warn","name","PopoverPrimitive","mergeRefs","asChild","Content","HangerContent","useLocalization","texts","className","cn","handleInteractOutside","event","preventDefault","UnstyledContent","onInteractOutside","placement","UnstyledArrow","IconButton","appearance","hanger","close","icon","onClick","onClose","Hanger","anchor","defaultOpen","otherProps","open","setOpen","Provider","value","key","String"],"mappings":"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"}
|
@@ -1,19 +1,20 @@
|
|
1
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import React__default from 'react';
|
2
3
|
import cn from 'classnames';
|
3
4
|
import { icons } from './components/index.js';
|
4
5
|
export { icons } from './components/index.js';
|
5
6
|
|
6
|
-
|
7
|
+
var _excluded = ["name"];
|
8
|
+
var Icon = /*#__PURE__*/React__default.forwardRef(function Icon(props, ref) {
|
7
9
|
var _props$className;
|
8
10
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
const Component = icons[name];
|
11
|
+
var name = props.name,
|
12
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
13
|
+
|
14
|
+
var Component = icons[name];
|
14
15
|
/* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */
|
15
16
|
|
16
|
-
|
17
|
+
var className = cn('inline-flex h-[1.715em] w-[1.715em]', props.className, {
|
17
18
|
'p-[3px]': (_props$className = props.className) === null || _props$className === void 0 ? void 0 : _props$className.includes('rounded-full')
|
18
19
|
});
|
19
20
|
return Component ? React__default.createElement(Component, Object.assign({}, otherProps, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import React from 'react';\r\nimport cn from 'classnames';\r\nimport { IconName, icons } from './components/index';\r\n\r\nexport { icons } from './components/index';\r\nexport type { IconName } from './components/index';\r\n\r\nexport type IconProps = React.SVGAttributes<SVGSVGElement> & {\r\n /** Set what svg icon should be rendered */\r\n name: IconName; // this dynamic type causes the type extraction for props to fail\r\n};\r\n\r\nexport const Icon = React.forwardRef(function Icon(props: IconProps, ref: React.Ref<SVGSVGElement>) {\r\n const { name, ...otherProps } = props;\r\n const Component = icons[name];\r\n /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */\r\n const className = cn('inline-flex h-[1.715em] w-[1.715em]', props.className, {\r\n 'p-[3px]': props.className?.includes('rounded-full'),\r\n });\r\n\r\n return Component ? (\r\n <Component {...otherProps} className={className} data-taco=\"icon\" focusable=\"false\" ref={ref} role=\"img\" />\r\n ) : null;\r\n});\r\n"],"names":["Icon","React","forwardRef","props","ref","name","otherProps","Component","icons","className","cn","includes","focusable","role"],"mappings":"
|
1
|
+
{"version":3,"file":"Icon.js","sources":["../../../../src/components/Icon/Icon.tsx"],"sourcesContent":["import React from 'react';\r\nimport cn from 'classnames';\r\nimport { IconName, icons } from './components/index';\r\n\r\nexport { icons } from './components/index';\r\nexport type { IconName } from './components/index';\r\n\r\nexport type IconProps = React.SVGAttributes<SVGSVGElement> & {\r\n /** Set what svg icon should be rendered */\r\n name: IconName; // this dynamic type causes the type extraction for props to fail\r\n};\r\n\r\nexport const Icon = React.forwardRef(function Icon(props: IconProps, ref: React.Ref<SVGSVGElement>) {\r\n const { name, ...otherProps } = props;\r\n const Component = icons[name];\r\n /* 24x24 _at the base body font_ - must be em so that they scale with font size - tailwind spacing uses rem */\r\n const className = cn('inline-flex h-[1.715em] w-[1.715em]', props.className, {\r\n 'p-[3px]': props.className?.includes('rounded-full'),\r\n });\r\n\r\n return Component ? (\r\n <Component {...otherProps} className={className} data-taco=\"icon\" focusable=\"false\" ref={ref} role=\"img\" />\r\n ) : null;\r\n});\r\n"],"names":["Icon","React","forwardRef","props","ref","name","otherProps","Component","icons","className","cn","includes","focusable","role"],"mappings":";;;;;;;IAYaA,IAAI,gBAAGC,cAAK,CAACC,UAAN,CAAiB,SAASF,IAAT,CAAcG,KAAd,EAAgCC,GAAhC;;;AACjC,MAAQC,IAAR,GAAgCF,KAAhC,CAAQE,IAAR;AAAA,MAAiBC,UAAjB,iCAAgCH,KAAhC;;AACA,MAAMI,SAAS,GAAGC,KAAK,CAACH,IAAD,CAAvB;AACA;;AACA,MAAMI,SAAS,GAAGC,EAAE,CAAC,qCAAD,EAAwCP,KAAK,CAACM,SAA9C,EAAyD;AACzE,mCAAWN,KAAK,CAACM,SAAjB,qDAAW,iBAAiBE,QAAjB,CAA0B,cAA1B;AAD8D,GAAzD,CAApB;AAIA,SAAOJ,SAAS,GACZN,4BAAA,CAACM,SAAD,oBAAeD;AAAYG,IAAAA,SAAS,EAAEA;iBAAqB;AAAOG,IAAAA,SAAS,EAAC;AAAQR,IAAAA,GAAG,EAAEA;AAAKS,IAAAA,IAAI,EAAC;IAAnG,CADY,GAEZ,IAFJ;AAGH,CAXmB;;;;"}
|
@@ -1,15 +1,17 @@
|
|
1
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import { forwardRef, createElement } from 'react';
|
2
3
|
import cn from 'classnames';
|
3
4
|
import { Icon } from '../Icon/Icon.js';
|
4
5
|
import { getButtonClasses, getAppearanceClasses, createButton } from '../Button/util.js';
|
5
6
|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
var _excluded = ["icon", "rounded"];
|
8
|
+
var IconButton = /*#__PURE__*/forwardRef(function IconButton(props, ref) {
|
9
|
+
var icon = props.icon,
|
10
|
+
_props$rounded = props.rounded,
|
11
|
+
rounded = _props$rounded === void 0 ? false : _props$rounded,
|
12
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
13
|
+
|
14
|
+
var className = cn('w-8', getButtonClasses(), getAppearanceClasses(otherProps.appearance, true), {
|
13
15
|
'rounded-full': rounded,
|
14
16
|
rounded: !rounded,
|
15
17
|
'cursor-not-allowed opacity-50': props.disabled,
|
@@ -20,13 +22,13 @@ const IconButton = /*#__PURE__*/forwardRef(function IconButton(props, ref) {
|
|
20
22
|
return null;
|
21
23
|
}
|
22
24
|
|
23
|
-
return createButton({
|
25
|
+
return createButton(_extends({}, otherProps, {
|
24
26
|
children: createElement(Icon, {
|
25
27
|
name: icon,
|
26
28
|
className: "m-0 p-0"
|
27
29
|
}),
|
28
30
|
'data-taco': 'icon-button'
|
29
|
-
}, className, ref);
|
31
|
+
}), className, ref);
|
30
32
|
});
|
31
33
|
|
32
34
|
export { IconButton };
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\nimport cn from 'classnames';\nimport * as ButtonPrimitive from '../../primitives/Button';\nimport { Icon, IconName } from '../Icon/Icon';\nimport { getAppearanceClasses, getButtonClasses, createButton } from '../Button/util';\nimport { Appearance } from '../../types';\nimport { DialogProps, HangerProps, MenuProps, PopoverProps } from '../..';\n\nexport type IconButtonProps = Omit<ButtonPrimitive.ButtonProps, 'children'> & {\n /** Appearance will change the style of the button */\n appearance?: Appearance;\n /**\n * Dialog component associated with the button, clicking the button will open the dialog.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated dialog when clicked.\n */\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\n /** Hanger component associated with the button. */\n hanger?: (props: Partial<HangerProps>) => JSX.Element;\n /** Set which icon should be rendered within button */\n icon: IconName; // this dynamic type causes the type extraction for props to fail\n /** Menu component associated with the button. */\n menu?: (props: Partial<MenuProps>) => JSX.Element;\n /**\n * Popover component associated with the button, clicking the button will open the popover.\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\n * the button should be only to open the associated popover when clicked.\n */\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\n /**\n * Set whether the button is rounded.\n * Default value is `false`\n */\n rounded?: boolean;\n /** A tooltip to show when hovering over the button */\n tooltip?: string;\n};\n\nexport const IconButton = React.forwardRef(function IconButton(props: IconButtonProps, ref: React.Ref<HTMLButtonElement>) {\n const { icon, rounded = false, ...otherProps } = props;\n\n const className = cn(\n 'w-8',\n getButtonClasses(),\n getAppearanceClasses(otherProps.appearance, true),\n {\n 'rounded-full': rounded,\n rounded: !rounded,\n 'cursor-not-allowed opacity-50': props.disabled,\n 'focus:yt-focus active:focus:yt-focus': !props.disabled,\n },\n props.className\n );\n\n if (!icon) {\n return null;\n }\n\n return createButton(\n { ...otherProps, children: <Icon name={icon} className=\"m-0 p-0\" />, 'data-taco': 'icon-button' },\n className,\n ref\n );\n});\n"],"names":["IconButton","React","props","ref","icon","rounded","otherProps","className","cn","getButtonClasses","getAppearanceClasses","appearance","disabled","createButton","children","Icon","name"],"mappings":"
|
1
|
+
{"version":3,"file":"IconButton.js","sources":["../../../../src/components/IconButton/IconButton.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as ButtonPrimitive from '../../primitives/Button';\r\nimport { Icon, IconName } from '../Icon/Icon';\r\nimport { getAppearanceClasses, getButtonClasses, createButton } from '../Button/util';\r\nimport { Appearance } from '../../types';\r\nimport { DialogProps, HangerProps, MenuProps, PopoverProps } from '../..';\r\n\r\nexport type IconButtonProps = Omit<ButtonPrimitive.ButtonProps, 'children'> & {\r\n /** Appearance will change the style of the button */\r\n appearance?: Appearance;\r\n /**\r\n * Dialog component associated with the button, clicking the button will open the dialog.\r\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\r\n * the button should be only to open the associated dialog when clicked.\r\n */\r\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\r\n /** Hanger component associated with the button. */\r\n hanger?: (props: Partial<HangerProps>) => JSX.Element;\r\n /** Set which icon should be rendered within button */\r\n icon: IconName; // this dynamic type causes the type extraction for props to fail\r\n /** Menu component associated with the button. */\r\n menu?: (props: Partial<MenuProps>) => JSX.Element;\r\n /**\r\n * Popover component associated with the button, clicking the button will open the popover.\r\n * *Note* that `onClick` event on button won't be handled, as in this case, the purpose of\r\n * the button should be only to open the associated popover when clicked.\r\n */\r\n popover?: (props: Partial<PopoverProps>) => JSX.Element;\r\n /**\r\n * Set whether the button is rounded.\r\n * Default value is `false`\r\n */\r\n rounded?: boolean;\r\n /** A tooltip to show when hovering over the button */\r\n tooltip?: string;\r\n};\r\n\r\nexport const IconButton = React.forwardRef(function IconButton(props: IconButtonProps, ref: React.Ref<HTMLButtonElement>) {\r\n const { icon, rounded = false, ...otherProps } = props;\r\n\r\n const className = cn(\r\n 'w-8',\r\n getButtonClasses(),\r\n getAppearanceClasses(otherProps.appearance, true),\r\n {\r\n 'rounded-full': rounded,\r\n rounded: !rounded,\r\n 'cursor-not-allowed opacity-50': props.disabled,\r\n 'focus:yt-focus active:focus:yt-focus': !props.disabled,\r\n },\r\n props.className\r\n );\r\n\r\n if (!icon) {\r\n return null;\r\n }\r\n\r\n return createButton(\r\n { ...otherProps, children: <Icon name={icon} className=\"m-0 p-0\" />, 'data-taco': 'icon-button' },\r\n className,\r\n ref\r\n );\r\n});\r\n"],"names":["IconButton","React","props","ref","icon","rounded","otherProps","className","cn","getButtonClasses","getAppearanceClasses","appearance","disabled","createButton","children","Icon","name"],"mappings":";;;;;;;IAsCaA,UAAU,gBAAGC,UAAA,CAAiB,SAASD,UAAT,CAAoBE,KAApB,EAA4CC,GAA5C;AACvC,MAAQC,IAAR,GAAiDF,KAAjD,CAAQE,IAAR;AAAA,uBAAiDF,KAAjD,CAAcG,OAAd;AAAA,MAAcA,OAAd,+BAAwB,KAAxB;AAAA,MAAkCC,UAAlC,iCAAiDJ,KAAjD;;AAEA,MAAMK,SAAS,GAAGC,EAAE,CAChB,KADgB,EAEhBC,gBAAgB,EAFA,EAGhBC,oBAAoB,CAACJ,UAAU,CAACK,UAAZ,EAAwB,IAAxB,CAHJ,EAIhB;AACI,oBAAgBN,OADpB;AAEIA,IAAAA,OAAO,EAAE,CAACA,OAFd;AAGI,qCAAiCH,KAAK,CAACU,QAH3C;AAII,4CAAwC,CAACV,KAAK,CAACU;AAJnD,GAJgB,EAUhBV,KAAK,CAACK,SAVU,CAApB;;AAaA,MAAI,CAACH,IAAL,EAAW;AACP,WAAO,IAAP;AACH;;AAED,SAAOS,YAAY,cACVP,UADU;AACEQ,IAAAA,QAAQ,EAAEb,aAAA,CAACc,IAAD;AAAMC,MAAAA,IAAI,EAAEZ;AAAMG,MAAAA,SAAS,EAAC;KAA5B,CADZ;AACsD,iBAAa;AADnE,MAEfA,SAFe,EAGfJ,GAHe,CAAnB;AAKH,CAzByB;;;;"}
|
@@ -1,25 +1,25 @@
|
|
1
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import { forwardRef, useEffect, createElement, cloneElement } from 'react';
|
2
3
|
import cn from 'classnames';
|
3
4
|
import { Icon } from '../Icon/Icon.js';
|
4
5
|
import { useProxiedRef } from '../../utils/hooks/useProxiedRef.js';
|
5
6
|
import { getInputClasses, getButtonStateClasses } from './util.js';
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
const className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
|
8
|
+
var _excluded = ["button", "icon", "highlighted", "invalid", "onKeyDown", "autoFocus"];
|
9
|
+
var Input = /*#__PURE__*/forwardRef(function Input(props, ref) {
|
10
|
+
var button = props.button,
|
11
|
+
icon = props.icon,
|
12
|
+
invalid = props.invalid,
|
13
|
+
onKeyDown = props.onKeyDown,
|
14
|
+
autoFocus = props.autoFocus,
|
15
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
16
|
+
|
17
|
+
var inputRef = useProxiedRef(ref);
|
18
|
+
var hasContainer = button || icon;
|
19
|
+
var className = cn(getInputClasses(props), 'min-h-[theme(spacing.8)] pointer-events-all', {
|
20
20
|
'pr-8': !!hasContainer
|
21
21
|
}, !hasContainer && otherProps.className);
|
22
|
-
useEffect(()
|
22
|
+
useEffect(function () {
|
23
23
|
if (autoFocus && inputRef.current) {
|
24
24
|
inputRef.current.focus();
|
25
25
|
}
|
@@ -27,10 +27,10 @@ const Input = /*#__PURE__*/forwardRef(function Input(props, ref) {
|
|
27
27
|
// if it has scroll height then the browser reverts to native scrolling behaviour only
|
28
28
|
// so we manually override it to ensure _our_ desired behaviour remains intact
|
29
29
|
|
30
|
-
|
30
|
+
var handleKeyDown = function handleKeyDown(event) {
|
31
31
|
if (event.key === 'Home' || event.key === 'End') {
|
32
32
|
event.preventDefault();
|
33
|
-
|
33
|
+
var position = event.key === 'End' ? event.currentTarget.value.length : 0;
|
34
34
|
event.currentTarget.setSelectionRange(position, position);
|
35
35
|
}
|
36
36
|
|
@@ -39,7 +39,7 @@ const Input = /*#__PURE__*/forwardRef(function Input(props, ref) {
|
|
39
39
|
}
|
40
40
|
};
|
41
41
|
|
42
|
-
|
42
|
+
var input = createElement("input", Object.assign({}, otherProps, {
|
43
43
|
className: className,
|
44
44
|
"data-taco": "input",
|
45
45
|
onKeyDown: handleKeyDown,
|
@@ -47,21 +47,19 @@ const Input = /*#__PURE__*/forwardRef(function Input(props, ref) {
|
|
47
47
|
}));
|
48
48
|
|
49
49
|
if (hasContainer) {
|
50
|
-
|
50
|
+
var extra;
|
51
51
|
|
52
52
|
if (button) {
|
53
|
-
var _button$props$disable;
|
53
|
+
var _button$props$disable, _cn;
|
54
54
|
|
55
|
-
|
56
|
-
|
57
|
-
[getButtonStateClasses(invalid)]: !props.disabled
|
58
|
-
}, button.props.className);
|
55
|
+
var disabled = (_button$props$disable = button.props.disabled) !== null && _button$props$disable !== void 0 ? _button$props$disable : otherProps.disabled;
|
56
|
+
var buttonClassName = cn('items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none', (_cn = {}, _cn[getButtonStateClasses(invalid)] = !props.disabled, _cn), button.props.className);
|
59
57
|
extra = cloneElement(button, {
|
60
58
|
className: buttonClassName,
|
61
|
-
disabled
|
59
|
+
disabled: disabled
|
62
60
|
});
|
63
61
|
} else if (icon) {
|
64
|
-
|
62
|
+
var iconClassName = cn('items-center flex justify-center absolute pointer-events-none mr-1 p-px right-0 w-5 top-1/2 -translate-y-1/2', {
|
65
63
|
'text-grey-dark': props.disabled,
|
66
64
|
'text-grey-darkest': !props.disabled
|
67
65
|
});
|
@@ -73,7 +71,7 @@ const Input = /*#__PURE__*/forwardRef(function Input(props, ref) {
|
|
73
71
|
});
|
74
72
|
}
|
75
73
|
|
76
|
-
|
74
|
+
var containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);
|
77
75
|
return createElement("div", {
|
78
76
|
className: containerClassName,
|
79
77
|
"data-taco": "input-container"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/Input/Input.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport { Icon, IconName } from '../Icon/Icon';\r\nimport { useProxiedRef } from '../../utils/hooks/useProxiedRef';\r\nimport { getButtonStateClasses, getInputClasses } from './util';\r\n\r\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {\r\n /** Shows a button within the input field */\r\n button?: React.ReactElement;\r\n /** Shows an icon within the input field */\r\n icon?: IconName | JSX.Element;\r\n /** Draws attention to the input by changing its style and making it visually prominent */\r\n highlighted?: boolean;\r\n /* Whether the input is in an invalid state */\r\n invalid?: boolean;\r\n};\r\n\r\nexport const Input = React.forwardRef(function Input(props: InputProps, ref: React.Ref<HTMLInputElement>) {\r\n const { button, icon, highlighted, invalid, onKeyDown, autoFocus, ...otherProps } = props;\r\n const inputRef = useProxiedRef<HTMLInputElement>(ref);\r\n const hasContainer = button || icon;\r\n const className = cn(\r\n getInputClasses(props),\r\n 'min-h-[theme(spacing.8)] pointer-events-all',\r\n {\r\n 'pr-8': !!hasContainer,\r\n },\r\n !hasContainer && otherProps.className\r\n );\r\n\r\n React.useEffect(() => {\r\n if (autoFocus && inputRef.current) {\r\n inputRef.current.focus();\r\n }\r\n }, []);\r\n\r\n // home and end keys only navigate to the start/end of input value if the input container does not scroll\r\n // if it has scroll height then the browser reverts to native scrolling behaviour only\r\n // so we manually override it to ensure _our_ desired behaviour remains intact\r\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\r\n if (event.key === 'Home' || event.key === 'End') {\r\n event.preventDefault();\r\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\r\n event.currentTarget.setSelectionRange(position, position);\r\n }\r\n\r\n if (onKeyDown) {\r\n onKeyDown(event);\r\n }\r\n };\r\n\r\n const input = <input {...otherProps} className={className} data-taco=\"input\" onKeyDown={handleKeyDown} ref={inputRef} />;\r\n\r\n if (hasContainer) {\r\n let extra: any;\r\n\r\n if (button) {\r\n const disabled = button.props.disabled ?? otherProps.disabled;\r\n const buttonClassName = cn(\r\n 'items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none',\r\n {\r\n [getButtonStateClasses(invalid)]: !props.disabled,\r\n },\r\n button.props.className\r\n );\r\n extra = React.cloneElement(button, {\r\n className: buttonClassName,\r\n disabled,\r\n });\r\n } else if (icon) {\r\n const iconClassName = cn(\r\n 'items-center flex justify-center absolute pointer-events-none mr-1 p-px right-0 w-5 top-1/2 -translate-y-1/2',\r\n {\r\n 'text-grey-dark': props.disabled,\r\n 'text-grey-darkest': !props.disabled,\r\n }\r\n );\r\n extra =\r\n typeof icon === 'string' ? (\r\n <Icon className={iconClassName} name={icon} />\r\n ) : (\r\n React.cloneElement(icon, { className: cn(iconClassName, icon.props.className) })\r\n );\r\n }\r\n\r\n const containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);\r\n\r\n return (\r\n <div className={containerClassName} data-taco=\"input-container\">\r\n {input}\r\n {extra}\r\n </div>\r\n );\r\n }\r\n\r\n return input;\r\n});\r\n"],"names":["Input","React","props","ref","button","icon","
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../src/components/Input/Input.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport { Icon, IconName } from '../Icon/Icon';\r\nimport { useProxiedRef } from '../../utils/hooks/useProxiedRef';\r\nimport { getButtonStateClasses, getInputClasses } from './util';\r\n\r\nexport type InputProps = React.InputHTMLAttributes<HTMLInputElement> & {\r\n /** Shows a button within the input field */\r\n button?: React.ReactElement;\r\n /** Shows an icon within the input field */\r\n icon?: IconName | JSX.Element;\r\n /** Draws attention to the input by changing its style and making it visually prominent */\r\n highlighted?: boolean;\r\n /* Whether the input is in an invalid state */\r\n invalid?: boolean;\r\n};\r\n\r\nexport const Input = React.forwardRef(function Input(props: InputProps, ref: React.Ref<HTMLInputElement>) {\r\n const { button, icon, highlighted, invalid, onKeyDown, autoFocus, ...otherProps } = props;\r\n const inputRef = useProxiedRef<HTMLInputElement>(ref);\r\n const hasContainer = button || icon;\r\n const className = cn(\r\n getInputClasses(props),\r\n 'min-h-[theme(spacing.8)] pointer-events-all',\r\n {\r\n 'pr-8': !!hasContainer,\r\n },\r\n !hasContainer && otherProps.className\r\n );\r\n\r\n React.useEffect(() => {\r\n if (autoFocus && inputRef.current) {\r\n inputRef.current.focus();\r\n }\r\n }, []);\r\n\r\n // home and end keys only navigate to the start/end of input value if the input container does not scroll\r\n // if it has scroll height then the browser reverts to native scrolling behaviour only\r\n // so we manually override it to ensure _our_ desired behaviour remains intact\r\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\r\n if (event.key === 'Home' || event.key === 'End') {\r\n event.preventDefault();\r\n const position = event.key === 'End' ? event.currentTarget.value.length : 0;\r\n event.currentTarget.setSelectionRange(position, position);\r\n }\r\n\r\n if (onKeyDown) {\r\n onKeyDown(event);\r\n }\r\n };\r\n\r\n const input = <input {...otherProps} className={className} data-taco=\"input\" onKeyDown={handleKeyDown} ref={inputRef} />;\r\n\r\n if (hasContainer) {\r\n let extra: any;\r\n\r\n if (button) {\r\n const disabled = button.props.disabled ?? otherProps.disabled;\r\n const buttonClassName = cn(\r\n 'items-center flex justify-center border absolute rounded-l-none rounded-r right-0 h-full focus:rounded focus:outline-none',\r\n {\r\n [getButtonStateClasses(invalid)]: !props.disabled,\r\n },\r\n button.props.className\r\n );\r\n extra = React.cloneElement(button, {\r\n className: buttonClassName,\r\n disabled,\r\n });\r\n } else if (icon) {\r\n const iconClassName = cn(\r\n 'items-center flex justify-center absolute pointer-events-none mr-1 p-px right-0 w-5 top-1/2 -translate-y-1/2',\r\n {\r\n 'text-grey-dark': props.disabled,\r\n 'text-grey-darkest': !props.disabled,\r\n }\r\n );\r\n extra =\r\n typeof icon === 'string' ? (\r\n <Icon className={iconClassName} name={icon} />\r\n ) : (\r\n React.cloneElement(icon, { className: cn(iconClassName, icon.props.className) })\r\n );\r\n }\r\n\r\n const containerClassName = cn('bg-white inline-flex relative rounded w-full', otherProps.className);\r\n\r\n return (\r\n <div className={containerClassName} data-taco=\"input-container\">\r\n {input}\r\n {extra}\r\n </div>\r\n );\r\n }\r\n\r\n return input;\r\n});\r\n"],"names":["Input","React","props","ref","button","icon","invalid","onKeyDown","autoFocus","otherProps","inputRef","useProxiedRef","hasContainer","className","cn","getInputClasses","current","focus","handleKeyDown","event","key","preventDefault","position","currentTarget","value","length","setSelectionRange","input","extra","disabled","buttonClassName","getButtonStateClasses","iconClassName","Icon","name","containerClassName"],"mappings":"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"}
|
@@ -1,52 +1,53 @@
|
|
1
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose, extends as _extends } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import { forwardRef, createElement } from 'react';
|
2
3
|
import cn from 'classnames';
|
3
4
|
import { ScrollableList } from './ScrollableList.js';
|
4
5
|
import { useListbox } from './useListbox.js';
|
5
6
|
import { useMultiListbox } from './useMultiListbox.js';
|
6
7
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
8
|
+
var _excluded = ["className"],
|
9
|
+
_excluded2 = ["className"];
|
10
|
+
var Listbox = /*#__PURE__*/forwardRef(function Listbox(props, ref) {
|
11
|
+
var externalClassName = props.className,
|
12
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded);
|
13
|
+
|
14
|
+
var _useListbox = useListbox(otherProps, ref),
|
15
|
+
list = _useListbox.list,
|
16
|
+
input = _useListbox.input;
|
17
|
+
|
18
|
+
var className = cn('bg-white inline-flex relative w-full', externalClassName);
|
17
19
|
return createElement("span", {
|
18
20
|
"data-taco": "listbox",
|
19
21
|
className: className
|
20
22
|
}, createElement(ScrollableList, Object.assign({}, list, {
|
21
|
-
style: {
|
23
|
+
style: _extends({}, list.style, {
|
22
24
|
maxHeight: 'calc(12rem + 2px)'
|
23
25
|
/* (6 * option height) + listbox border */
|
24
26
|
|
25
|
-
}
|
27
|
+
})
|
26
28
|
})), createElement("input", Object.assign({}, input, {
|
27
29
|
className: "hidden",
|
28
30
|
type: "text"
|
29
31
|
})));
|
30
32
|
});
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
const className = cn('bg-white inline-flex relative w-full', externalClassName);
|
33
|
+
var MultiListbox = /*#__PURE__*/forwardRef(function Listbox(props, ref) {
|
34
|
+
var externalClassName = props.className,
|
35
|
+
otherProps = _objectWithoutPropertiesLoose(props, _excluded2);
|
36
|
+
|
37
|
+
var _useMultiListbox = useMultiListbox(otherProps, ref),
|
38
|
+
list = _useMultiListbox.list,
|
39
|
+
input = _useMultiListbox.input;
|
40
|
+
|
41
|
+
var className = cn('bg-white inline-flex relative w-full', externalClassName);
|
41
42
|
return createElement("span", {
|
42
43
|
"data-taco": "listbox",
|
43
44
|
className: className
|
44
45
|
}, createElement(ScrollableList, Object.assign({}, list, {
|
45
|
-
style: {
|
46
|
+
style: _extends({}, list.style, {
|
46
47
|
maxHeight: 'calc(12rem + 2px + 2px)'
|
47
48
|
/* (6 * option height) + listbox border + ALL_OPTIONS bottom border */
|
48
49
|
|
49
|
-
}
|
50
|
+
})
|
50
51
|
})), createElement("input", Object.assign({}, input, {
|
51
52
|
className: "hidden",
|
52
53
|
type: "text"
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Listbox.js","sources":["../../../../src/components/Listbox/Listbox.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport { useListbox } from './useListbox';\r\nimport { useMultiListbox } from './useMultiListbox';\r\nimport { ScrollableList, ScrollableListItemValue, ScrollableListItem } from './ScrollableList';\r\n\r\nexport type ListboxItem = ScrollableListItem;\r\nexport type ListboxValue = ScrollableListItemValue;\r\n\r\nexport type ListboxTexts = {\r\n /**\r\n * Text displayed in the listbox if no data provided.\r\n * To read more about how to provide the text, see [Provider](component:provider) component\r\n */\r\n empty: string;\r\n /**\r\n * Text displayed in the listbox to indicate the data is loading.\r\n * Read more about how to provide the text in [Provider](component:provider) component\r\n */\r\n loading: string;\r\n /**\r\n * The first option displayed in a multiselect listbox that selects all available options.\r\n * Read more about how to provide the text in [Provider](component:provider) component\r\n */\r\n allOption: string;\r\n};\r\n\r\nexport type ListboxProps = Pick<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'onFocus'> &\r\n Omit<React.InputHTMLAttributes<HTMLElement>, 'defaultValue' | 'onChange' | 'value'> & {\r\n /** Data indicating the options in listbox */\r\n data?: ListboxItem[];\r\n /**\r\n * Initial value of the listbox.\r\n * This is used when listbox is mounted, if no value is provided.\r\n * *Note* that listbox is a controlled component, setting this will also trigger the `onChange` event\r\n */\r\n defaultValue?: ListboxValue;\r\n /** Set what value should have an empty option in listbox */\r\n emptyValue?: ListboxValue;\r\n /** Draws attention to the listbox by changing its style and making it visually prominent */\r\n highlighted?: boolean;\r\n /* Whether the input is in an invalid state */\r\n invalid?: boolean;\r\n /**\r\n * Shows a loading indicator with a text next to it.\r\n * Read more about how to provide the text in [Provider](component:provider) component\r\n */\r\n loading?: boolean;\r\n /**\r\n * Value of the listbox representing the selected item.\r\n * It needs to be an existing value from the provided data\r\n */\r\n value?: ListboxValue;\r\n };\r\n\r\nexport const Listbox = React.forwardRef(function Listbox(props: ListboxProps, ref: React.Ref<HTMLInputElement>) {\r\n const { className: externalClassName, ...otherProps } = props;\r\n const { list, input } = useListbox(otherProps, ref);\r\n const className = cn('bg-white inline-flex relative w-full', externalClassName);\r\n\r\n return (\r\n <span data-taco=\"listbox\" className={className}>\r\n <ScrollableList\r\n {...list}\r\n style={{ ...list.style, maxHeight: 'calc(12rem + 2px)' /* (6 * option height) + listbox border */ }}\r\n />\r\n <input {...input} className=\"hidden\" type=\"text\" />\r\n </span>\r\n );\r\n});\r\n\r\nexport const MultiListbox = React.forwardRef(function Listbox(props: ListboxProps, ref: React.Ref<HTMLInputElement>) {\r\n const { className: externalClassName, ...otherProps } = props;\r\n const { list, input } = useMultiListbox(otherProps, ref);\r\n const className = cn('bg-white inline-flex relative w-full', externalClassName);\r\n\r\n return (\r\n <span data-taco=\"listbox\" className={className}>\r\n <ScrollableList\r\n {...list}\r\n style={{\r\n ...list.style,\r\n maxHeight: 'calc(12rem + 2px + 2px)' /* (6 * option height) + listbox border + ALL_OPTIONS bottom border */,\r\n }}\r\n />\r\n <input {...input} className=\"hidden\" type=\"text\" />\r\n </span>\r\n );\r\n});\r\n"],"names":["Listbox","React","props","ref","
|
1
|
+
{"version":3,"file":"Listbox.js","sources":["../../../../src/components/Listbox/Listbox.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport { useListbox } from './useListbox';\r\nimport { useMultiListbox } from './useMultiListbox';\r\nimport { ScrollableList, ScrollableListItemValue, ScrollableListItem } from './ScrollableList';\r\n\r\nexport type ListboxItem = ScrollableListItem;\r\nexport type ListboxValue = ScrollableListItemValue;\r\n\r\nexport type ListboxTexts = {\r\n /**\r\n * Text displayed in the listbox if no data provided.\r\n * To read more about how to provide the text, see [Provider](component:provider) component\r\n */\r\n empty: string;\r\n /**\r\n * Text displayed in the listbox to indicate the data is loading.\r\n * Read more about how to provide the text in [Provider](component:provider) component\r\n */\r\n loading: string;\r\n /**\r\n * The first option displayed in a multiselect listbox that selects all available options.\r\n * Read more about how to provide the text in [Provider](component:provider) component\r\n */\r\n allOption: string;\r\n};\r\n\r\nexport type ListboxProps = Pick<React.InputHTMLAttributes<HTMLInputElement>, 'onChange' | 'onFocus'> &\r\n Omit<React.InputHTMLAttributes<HTMLElement>, 'defaultValue' | 'onChange' | 'value'> & {\r\n /** Data indicating the options in listbox */\r\n data?: ListboxItem[];\r\n /**\r\n * Initial value of the listbox.\r\n * This is used when listbox is mounted, if no value is provided.\r\n * *Note* that listbox is a controlled component, setting this will also trigger the `onChange` event\r\n */\r\n defaultValue?: ListboxValue;\r\n /** Set what value should have an empty option in listbox */\r\n emptyValue?: ListboxValue;\r\n /** Draws attention to the listbox by changing its style and making it visually prominent */\r\n highlighted?: boolean;\r\n /* Whether the input is in an invalid state */\r\n invalid?: boolean;\r\n /**\r\n * Shows a loading indicator with a text next to it.\r\n * Read more about how to provide the text in [Provider](component:provider) component\r\n */\r\n loading?: boolean;\r\n /**\r\n * Value of the listbox representing the selected item.\r\n * It needs to be an existing value from the provided data\r\n */\r\n value?: ListboxValue;\r\n };\r\n\r\nexport const Listbox = React.forwardRef(function Listbox(props: ListboxProps, ref: React.Ref<HTMLInputElement>) {\r\n const { className: externalClassName, ...otherProps } = props;\r\n const { list, input } = useListbox(otherProps, ref);\r\n const className = cn('bg-white inline-flex relative w-full', externalClassName);\r\n\r\n return (\r\n <span data-taco=\"listbox\" className={className}>\r\n <ScrollableList\r\n {...list}\r\n style={{ ...list.style, maxHeight: 'calc(12rem + 2px)' /* (6 * option height) + listbox border */ }}\r\n />\r\n <input {...input} className=\"hidden\" type=\"text\" />\r\n </span>\r\n );\r\n});\r\n\r\nexport const MultiListbox = React.forwardRef(function Listbox(props: ListboxProps, ref: React.Ref<HTMLInputElement>) {\r\n const { className: externalClassName, ...otherProps } = props;\r\n const { list, input } = useMultiListbox(otherProps, ref);\r\n const className = cn('bg-white inline-flex relative w-full', externalClassName);\r\n\r\n return (\r\n <span data-taco=\"listbox\" className={className}>\r\n <ScrollableList\r\n {...list}\r\n style={{\r\n ...list.style,\r\n maxHeight: 'calc(12rem + 2px + 2px)' /* (6 * option height) + listbox border + ALL_OPTIONS bottom border */,\r\n }}\r\n />\r\n <input {...input} className=\"hidden\" type=\"text\" />\r\n </span>\r\n );\r\n});\r\n"],"names":["Listbox","React","props","ref","externalClassName","className","otherProps","useListbox","list","input","cn","ScrollableList","style","maxHeight","type","MultiListbox","useMultiListbox"],"mappings":";;;;;;;;;IAuDaA,OAAO,gBAAGC,UAAA,CAAiB,SAASD,OAAT,CAAiBE,KAAjB,EAAsCC,GAAtC;AACpC,MAAmBC,iBAAnB,GAAwDF,KAAxD,CAAQG,SAAR;AAAA,MAAyCC,UAAzC,iCAAwDJ,KAAxD;;AACA,oBAAwBK,UAAU,CAACD,UAAD,EAAaH,GAAb,CAAlC;AAAA,MAAQK,IAAR,eAAQA,IAAR;AAAA,MAAcC,KAAd,eAAcA,KAAd;;AACA,MAAMJ,SAAS,GAAGK,EAAE,CAAC,sCAAD,EAAyCN,iBAAzC,CAApB;AAEA,SACIH,aAAA,OAAA;iBAAgB;AAAUI,IAAAA,SAAS,EAAEA;GAArC,EACIJ,aAAA,CAACU,cAAD,oBACQH;AACJI,IAAAA,KAAK,eAAOJ,IAAI,CAACI,KAAZ;AAAmBC,MAAAA,SAAS,EAAE;AAAoB;;AAAlD;IAFT,CADJ,EAKIZ,aAAA,QAAA,oBAAWQ;AAAOJ,IAAAA,SAAS,EAAC;AAASS,IAAAA,IAAI,EAAC;IAA1C,CALJ,CADJ;AASH,CAdsB;IAgBVC,YAAY,gBAAGd,UAAA,CAAiB,SAASD,OAAT,CAAiBE,KAAjB,EAAsCC,GAAtC;AACzC,MAAmBC,iBAAnB,GAAwDF,KAAxD,CAAQG,SAAR;AAAA,MAAyCC,UAAzC,iCAAwDJ,KAAxD;;AACA,yBAAwBc,eAAe,CAACV,UAAD,EAAaH,GAAb,CAAvC;AAAA,MAAQK,IAAR,oBAAQA,IAAR;AAAA,MAAcC,KAAd,oBAAcA,KAAd;;AACA,MAAMJ,SAAS,GAAGK,EAAE,CAAC,sCAAD,EAAyCN,iBAAzC,CAApB;AAEA,SACIH,aAAA,OAAA;iBAAgB;AAAUI,IAAAA,SAAS,EAAEA;GAArC,EACIJ,aAAA,CAACU,cAAD,oBACQH;AACJI,IAAAA,KAAK,eACEJ,IAAI,CAACI,KADP;AAEDC,MAAAA,SAAS,EAAE;AAA0B;;AAFpC;IAFT,CADJ,EAQIZ,aAAA,QAAA,oBAAWQ;AAAOJ,IAAAA,SAAS,EAAC;AAASS,IAAAA,IAAI,EAAC;IAA1C,CARJ,CADJ;AAYH,CAjB2B;;;;"}
|
@@ -1,3 +1,4 @@
|
|
1
|
+
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
1
2
|
import { forwardRef, createElement } from 'react';
|
2
3
|
import '../Icon/components/index.js';
|
3
4
|
import '../Icon/Icon.js';
|
@@ -48,22 +49,22 @@ import '../Switch/Switch.js';
|
|
48
49
|
import '../Tour/Tour.js';
|
49
50
|
import '../../utils/hooks/useOnClickOutside.js';
|
50
51
|
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
const {
|
56
|
-
texts
|
57
|
-
} = useLocalization();
|
52
|
+
var _excluded = ["onSearch"];
|
53
|
+
var SearchInput = /*#__PURE__*/forwardRef(function SearchInput(_ref, ref) {
|
54
|
+
var onSearch = _ref.onSearch,
|
55
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded);
|
58
56
|
|
59
|
-
|
57
|
+
var _useLocalization = useLocalization(),
|
58
|
+
texts = _useLocalization.texts;
|
59
|
+
|
60
|
+
var handleClick = function handleClick() {
|
60
61
|
if (!props.disabled) {
|
61
62
|
onSearch === null || onSearch === void 0 ? void 0 : onSearch(props.value);
|
62
63
|
}
|
63
64
|
};
|
64
65
|
|
65
|
-
|
66
|
-
|
66
|
+
var handleKeyDown = function handleKeyDown(event) {
|
67
|
+
var isEnterKeyPressed = event.keyCode === keycode('enter');
|
67
68
|
|
68
69
|
if (isEnterKeyPressed) {
|
69
70
|
handleClick();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SearchInput.js","sources":["../../../../src/components/SearchInput/SearchInput.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport keycode from 'keycode';\r\nimport { Input, InputProps, useLocalization, IconButton } from '../..';\r\n\r\nexport type SearchInputTexts = {\r\n /**\r\n * aria-label text for input\r\n */\r\n inputLabel: string;\r\n};\r\n\r\nexport type SearchInputProps = Omit<InputProps, 'icon'> & {\r\n /** Current input value will be passed to the method. In order to get the value, the component must be controlled otherwise value will always be undefined */\r\n onSearch?: (value: string | number | readonly string[] | undefined) => void;\r\n};\r\n\r\nexport const SearchInput = React.forwardRef(function SearchInput(\r\n { onSearch, ...props }: SearchInputProps,\r\n ref: React.Ref<HTMLInputElement>\r\n) {\r\n const { texts } = useLocalization();\r\n\r\n const handleClick = (): void => {\r\n if (!props.disabled) {\r\n onSearch?.(props.value);\r\n }\r\n };\r\n\r\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>): void => {\r\n const isEnterKeyPressed = event.keyCode === keycode('enter');\r\n\r\n if (isEnterKeyPressed) {\r\n handleClick();\r\n }\r\n };\r\n\r\n return (\r\n <Input\r\n aria-label={texts.searchInput.inputLabel}\r\n {...props}\r\n button={\r\n <IconButton\r\n icon=\"search\"\r\n className=\"!border-transparent !bg-transparent focus:!border-transparent peer-focus:!border-transparent peer-focus:peer-active:!border-transparent\"\r\n disabled={props.disabled}\r\n onClick={handleClick}\r\n />\r\n }\r\n onKeyDown={handleKeyDown}\r\n ref={ref}\r\n type=\"search\"\r\n />\r\n );\r\n});\r\n"],"names":["SearchInput","React","onSearch","props","
|
1
|
+
{"version":3,"file":"SearchInput.js","sources":["../../../../src/components/SearchInput/SearchInput.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport keycode from 'keycode';\r\nimport { Input, InputProps, useLocalization, IconButton } from '../..';\r\n\r\nexport type SearchInputTexts = {\r\n /**\r\n * aria-label text for input\r\n */\r\n inputLabel: string;\r\n};\r\n\r\nexport type SearchInputProps = Omit<InputProps, 'icon'> & {\r\n /** Current input value will be passed to the method. In order to get the value, the component must be controlled otherwise value will always be undefined */\r\n onSearch?: (value: string | number | readonly string[] | undefined) => void;\r\n};\r\n\r\nexport const SearchInput = React.forwardRef(function SearchInput(\r\n { onSearch, ...props }: SearchInputProps,\r\n ref: React.Ref<HTMLInputElement>\r\n) {\r\n const { texts } = useLocalization();\r\n\r\n const handleClick = (): void => {\r\n if (!props.disabled) {\r\n onSearch?.(props.value);\r\n }\r\n };\r\n\r\n const handleKeyDown = (event: React.KeyboardEvent<HTMLInputElement>): void => {\r\n const isEnterKeyPressed = event.keyCode === keycode('enter');\r\n\r\n if (isEnterKeyPressed) {\r\n handleClick();\r\n }\r\n };\r\n\r\n return (\r\n <Input\r\n aria-label={texts.searchInput.inputLabel}\r\n {...props}\r\n button={\r\n <IconButton\r\n icon=\"search\"\r\n className=\"!border-transparent !bg-transparent focus:!border-transparent peer-focus:!border-transparent peer-focus:peer-active:!border-transparent\"\r\n disabled={props.disabled}\r\n onClick={handleClick}\r\n />\r\n }\r\n onKeyDown={handleKeyDown}\r\n ref={ref}\r\n type=\"search\"\r\n />\r\n );\r\n});\r\n"],"names":["SearchInput","React","ref","onSearch","props","useLocalization","texts","handleClick","disabled","value","handleKeyDown","event","isEnterKeyPressed","keyCode","keycode","Input","searchInput","inputLabel","button","IconButton","icon","className","onClick","onKeyDown","type"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAgBaA,WAAW,gBAAGC,UAAA,CAAiB,SAASD,WAAT,OAExCE,GAFwC;MACtCC,gBAAAA;MAAaC;;AAGf,yBAAkBC,eAAe,EAAjC;AAAA,MAAQC,KAAR,oBAAQA,KAAR;;AAEA,MAAMC,WAAW,GAAG,SAAdA,WAAc;AAChB,QAAI,CAACH,KAAK,CAACI,QAAX,EAAqB;AACjBL,MAAAA,QAAQ,SAAR,IAAAA,QAAQ,WAAR,YAAAA,QAAQ,CAAGC,KAAK,CAACK,KAAT,CAAR;AACH;AACJ,GAJD;;AAMA,MAAMC,aAAa,GAAG,SAAhBA,aAAgB,CAACC,KAAD;AAClB,QAAMC,iBAAiB,GAAGD,KAAK,CAACE,OAAN,KAAkBC,OAAO,CAAC,OAAD,CAAnD;;AAEA,QAAIF,iBAAJ,EAAuB;AACnBL,MAAAA,WAAW;AACd;AACJ,GAND;;AAQA,SACIN,aAAA,CAACc,KAAD;kBACgBT,KAAK,CAACU,WAAN,CAAkBC;KAC1Bb;AACJc,IAAAA,MAAM,EACFjB,aAAA,CAACkB,UAAD;AACIC,MAAAA,IAAI,EAAC;AACLC,MAAAA,SAAS,EAAC;AACVb,MAAAA,QAAQ,EAAEJ,KAAK,CAACI;AAChBc,MAAAA,OAAO,EAAEf;KAJb;AAOJgB,IAAAA,SAAS,EAAEb;AACXR,IAAAA,GAAG,EAAEA;AACLsB,IAAAA,IAAI,EAAC;IAbT,CADJ;AAiBH,CArC0B;;;;"}
|