@economic/taco 0.0.30-alpha.0 → 0.0.31-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 +1 -19
- 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 +7 -5
- package/dist/esm/components/Banner/Banner.js.map +1 -1
- package/dist/esm/components/Button/Button.js +12 -13
- package/dist/esm/components/Button/Button.js.map +1 -1
- package/dist/esm/components/Button/util.js +1 -1
- package/dist/esm/components/Button/util.js.map +1 -1
- package/dist/esm/components/Calendar/Calendar.js +56 -71
- package/dist/esm/components/Calendar/Calendar.js.map +1 -1
- package/dist/esm/components/Checkbox/Checkbox.js +15 -18
- package/dist/esm/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/esm/components/Combobox/Combobox.js +23 -25
- package/dist/esm/components/Combobox/Combobox.js.map +1 -1
- package/dist/esm/components/Dialog/Dialog.js +39 -58
- package/dist/esm/components/Dialog/Dialog.js.map +1 -1
- package/dist/esm/components/Field/Field.js +10 -12
- package/dist/esm/components/Field/Field.js.map +1 -1
- package/dist/esm/components/Menu/components/Item.js +5 -5
- package/dist/esm/components/Menu/components/Item.js.map +1 -1
- package/dist/esm/index.css +8 -5
- package/dist/index.css +8 -5
- package/dist/taco.cjs.development.js +213 -281
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/dist/utils/tailwind.d.ts +1 -1
- package/package.json +2 -2
@@ -1,4 +1,3 @@
|
|
1
|
-
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
2
1
|
import { forwardRef, useRef, createElement } from 'react';
|
3
2
|
import cn from 'classnames';
|
4
3
|
import { IconButton } from '../IconButton/IconButton.js';
|
@@ -9,27 +8,26 @@ import { ScrollableList } from '../Listbox/ScrollableList.js';
|
|
9
8
|
import { useCombobox } from './useCombobox.js';
|
10
9
|
import { useBoundingClientRectListener } from '../../utils/hooks/useBoundingClientRectListener.js';
|
11
10
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
var className = cn('inline-flex relative', {
|
11
|
+
const Combobox = /*#__PURE__*/forwardRef(function Combobox(props, ref) {
|
12
|
+
const {
|
13
|
+
className: externalClassName,
|
14
|
+
dialog,
|
15
|
+
style,
|
16
|
+
...otherProps
|
17
|
+
} = props;
|
18
|
+
const {
|
19
|
+
combobox,
|
20
|
+
button,
|
21
|
+
input,
|
22
|
+
popover,
|
23
|
+
list
|
24
|
+
} = useCombobox(otherProps, ref);
|
25
|
+
const internalRef = useRef(null);
|
26
|
+
const {
|
27
|
+
texts
|
28
|
+
} = useLocalization();
|
29
|
+
const selectDimensions = useBoundingClientRectListener(internalRef);
|
30
|
+
const className = cn('inline-flex relative', {
|
33
31
|
'yt-combobox--inline': props.inline
|
34
32
|
}, externalClassName);
|
35
33
|
return createElement("span", {
|
@@ -48,7 +46,7 @@ var Combobox = /*#__PURE__*/forwardRef(function Combobox(props, ref) {
|
|
48
46
|
appearance: "discrete",
|
49
47
|
className: "!border-l-0 focus:!border-none focus:!shadow-none active:!border-none",
|
50
48
|
icon: popover.open ? 'chevron-up' : 'chevron-down',
|
51
|
-
onClick:
|
49
|
+
onClick: () => {
|
52
50
|
var _input$ref$current;
|
53
51
|
|
54
52
|
popover.onOpenChange(true);
|
@@ -59,7 +57,7 @@ var Combobox = /*#__PURE__*/forwardRef(function Combobox(props, ref) {
|
|
59
57
|
icon: "list-search",
|
60
58
|
disabled: props.readOnly || props.disabled,
|
61
59
|
dialog: dialog,
|
62
|
-
onFocus:
|
60
|
+
onFocus: event => {
|
63
61
|
var _input$ref$current2;
|
64
62
|
|
65
63
|
// Prevents the default focus behaviour of showing the tooltip, on parent tooltip element
|
@@ -72,7 +70,7 @@ var Combobox = /*#__PURE__*/forwardRef(function Combobox(props, ref) {
|
|
72
70
|
}) : undefined
|
73
71
|
})))), createElement(Content, {
|
74
72
|
align: "start",
|
75
|
-
onOpenAutoFocus:
|
73
|
+
onOpenAutoFocus: event => {
|
76
74
|
event.preventDefault();
|
77
75
|
},
|
78
76
|
sideOffset: 4
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/Combobox.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\nimport { Input, InputProps } from '../Input/Input';\r\nimport { useCombobox } from './useCombobox';\r\nimport { ScrollableList, ScrollableListItem, ScrollableListItemValue } from '../Listbox/ScrollableList';\r\nimport { useBoundingClientRectListener } from '../../utils/hooks/useBoundingClientRectListener';\r\nimport { IconButton } from '../IconButton/IconButton';\r\nimport './Combobox.css';\r\nimport { DialogProps } from '../Dialog/Dialog';\r\nimport { useLocalization } from '../Provider/Provider';\r\n\r\nexport type ComboboxTexts = {\r\n /* Tooltip shown for the dialog button */\r\n tooltip: string;\r\n};\r\n\r\nexport type ComboboxItem = ScrollableListItem;\r\nexport type ComboboxValue = ScrollableListItemValue;\r\n\r\ntype ComboboxBaseProps = Omit<InputProps, 'defaultValue' | 'button' | 'onChange' | 'value'> & {\r\n /** Array of options in combobox */\r\n data?: ComboboxItem[];\r\n /**\r\n * Initial value of the input in combobox.\r\n * This is used when combobox is mounted, if no value is provided.\r\n * *Note* that combobox is a controlled component, setting this will also trigger the `onChange` event\r\n */\r\n defaultValue?: ComboboxValue;\r\n /** Set what value should have an empty option in combobox */\r\n emptyValue?: ComboboxValue;\r\n /** Draws attention to the combobox by changing its style and making it visually prominent */\r\n highlighted?: boolean;\r\n /** Displays loading state in listbox */\r\n loading?: boolean;\r\n /**\r\n * Handler called when user chooses an option from the provided suggestions.\r\n * Suggestions will be calculated based on the input value.\r\n * There are two ways to choose an option: either click on it, or navigate using keyboard and press `enter`\r\n */\r\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\r\n /** Handler called when the user enters a query **/\r\n onSearch?: (query: string) => void | Promise<void>;\r\n /** Value of the input in combobox */\r\n value?: ComboboxValue;\r\n};\r\n\r\ninterface InlineComboboxProps extends ComboboxBaseProps {\r\n dialog?: never;\r\n /**\r\n * Combobox will display its data when input is clicked/focused, even if the input is empty.\r\n * *Note* that default combobox will display matching data only when user starts typing in input.\r\n */\r\n inline: boolean; // Example 3 on https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html\r\n}\r\n\r\ninterface DialogComboboxProps extends ComboboxBaseProps {\r\n dialog: (props: Partial<DialogProps>) => JSX.Element;\r\n inline?: never;\r\n}\r\n\r\nexport type ComboboxProps = InlineComboboxProps | DialogComboboxProps;\r\n\r\nexport const Combobox = React.forwardRef(function Combobox(props: ComboboxProps, ref: React.Ref<HTMLInputElement>) {\r\n const { className: externalClassName, dialog, style, ...otherProps } = props;\r\n const { combobox, button, input, popover, list } = useCombobox(otherProps, ref);\r\n const internalRef = React.useRef<HTMLDivElement>(null);\r\n const { texts } = useLocalization();\r\n const selectDimensions = useBoundingClientRectListener(internalRef);\r\n const className = cn(\r\n 'inline-flex relative',\r\n {\r\n 'yt-combobox--inline': props.inline,\r\n },\r\n externalClassName\r\n );\r\n\r\n return (\r\n <span className={className} data-taco=\"combobox\" style={style}>\r\n <PopoverPrimitive.Root {...popover}>\r\n <PopoverPrimitive.Anchor asChild ref={internalRef}>\r\n <div {...combobox} className=\"inline w-full\" ref={ref}>\r\n <Input\r\n {...input}\r\n autoComplete=\"off\"\r\n button={\r\n props.inline ? (\r\n <IconButton\r\n appearance=\"discrete\"\r\n className=\"!border-l-0 focus:!border-none focus:!shadow-none active:!border-none\"\r\n icon={popover.open ? 'chevron-up' : 'chevron-down'}\r\n onClick={() => {\r\n popover.onOpenChange(true);\r\n input.ref.current?.focus();\r\n }}\r\n tabIndex={-1}\r\n />\r\n ) : dialog ? (\r\n <IconButton\r\n icon=\"list-search\"\r\n disabled={props.readOnly || props.disabled}\r\n dialog={dialog}\r\n onFocus={(event: React.FocusEvent<HTMLButtonElement>) => {\r\n // Prevents the default focus behaviour of showing the tooltip, on parent tooltip element\r\n event.preventDefault();\r\n input.ref.current?.focus();\r\n }}\r\n ref={button.ref}\r\n tabIndex={-1}\r\n tooltip={texts.combobox.tooltip}\r\n />\r\n ) : undefined\r\n }\r\n />\r\n </div>\r\n </PopoverPrimitive.Anchor>\r\n <PopoverPrimitive.Content\r\n align=\"start\"\r\n onOpenAutoFocus={event => {\r\n event.preventDefault();\r\n }}\r\n sideOffset={4}\r\n >\r\n <ScrollableList\r\n {...list}\r\n className={cn('!border-blue max-h-[calc(12rem+2px)] w-auto max-w-[theme(spacing.96)]')}\r\n style={{ minWidth: selectDimensions?.width }}\r\n tabIndex={popover.open ? 0 : -1}\r\n />\r\n </PopoverPrimitive.Content>\r\n </PopoverPrimitive.Root>\r\n </span>\r\n );\r\n});\r\n"],"names":["Combobox","React","props","ref","
|
1
|
+
{"version":3,"file":"Combobox.js","sources":["../../../../src/components/Combobox/Combobox.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\nimport * as PopoverPrimitive from '@radix-ui/react-popover';\r\nimport { Input, InputProps } from '../Input/Input';\r\nimport { useCombobox } from './useCombobox';\r\nimport { ScrollableList, ScrollableListItem, ScrollableListItemValue } from '../Listbox/ScrollableList';\r\nimport { useBoundingClientRectListener } from '../../utils/hooks/useBoundingClientRectListener';\r\nimport { IconButton } from '../IconButton/IconButton';\r\nimport './Combobox.css';\r\nimport { DialogProps } from '../Dialog/Dialog';\r\nimport { useLocalization } from '../Provider/Provider';\r\n\r\nexport type ComboboxTexts = {\r\n /* Tooltip shown for the dialog button */\r\n tooltip: string;\r\n};\r\n\r\nexport type ComboboxItem = ScrollableListItem;\r\nexport type ComboboxValue = ScrollableListItemValue;\r\n\r\ntype ComboboxBaseProps = Omit<InputProps, 'defaultValue' | 'button' | 'onChange' | 'value'> & {\r\n /** Array of options in combobox */\r\n data?: ComboboxItem[];\r\n /**\r\n * Initial value of the input in combobox.\r\n * This is used when combobox is mounted, if no value is provided.\r\n * *Note* that combobox is a controlled component, setting this will also trigger the `onChange` event\r\n */\r\n defaultValue?: ComboboxValue;\r\n /** Set what value should have an empty option in combobox */\r\n emptyValue?: ComboboxValue;\r\n /** Draws attention to the combobox by changing its style and making it visually prominent */\r\n highlighted?: boolean;\r\n /** Displays loading state in listbox */\r\n loading?: boolean;\r\n /**\r\n * Handler called when user chooses an option from the provided suggestions.\r\n * Suggestions will be calculated based on the input value.\r\n * There are two ways to choose an option: either click on it, or navigate using keyboard and press `enter`\r\n */\r\n onChange?: React.ChangeEventHandler<HTMLInputElement>;\r\n /** Handler called when the user enters a query **/\r\n onSearch?: (query: string) => void | Promise<void>;\r\n /** Value of the input in combobox */\r\n value?: ComboboxValue;\r\n};\r\n\r\ninterface InlineComboboxProps extends ComboboxBaseProps {\r\n dialog?: never;\r\n /**\r\n * Combobox will display its data when input is clicked/focused, even if the input is empty.\r\n * *Note* that default combobox will display matching data only when user starts typing in input.\r\n */\r\n inline: boolean; // Example 3 on https://www.w3.org/TR/wai-aria-practices/examples/combobox/aria1.1pattern/listbox-combo.html\r\n}\r\n\r\ninterface DialogComboboxProps extends ComboboxBaseProps {\r\n dialog: (props: Partial<DialogProps>) => JSX.Element;\r\n inline?: never;\r\n}\r\n\r\nexport type ComboboxProps = InlineComboboxProps | DialogComboboxProps;\r\n\r\nexport const Combobox = React.forwardRef(function Combobox(props: ComboboxProps, ref: React.Ref<HTMLInputElement>) {\r\n const { className: externalClassName, dialog, style, ...otherProps } = props;\r\n const { combobox, button, input, popover, list } = useCombobox(otherProps, ref);\r\n const internalRef = React.useRef<HTMLDivElement>(null);\r\n const { texts } = useLocalization();\r\n const selectDimensions = useBoundingClientRectListener(internalRef);\r\n const className = cn(\r\n 'inline-flex relative',\r\n {\r\n 'yt-combobox--inline': props.inline,\r\n },\r\n externalClassName\r\n );\r\n\r\n return (\r\n <span className={className} data-taco=\"combobox\" style={style}>\r\n <PopoverPrimitive.Root {...popover}>\r\n <PopoverPrimitive.Anchor asChild ref={internalRef}>\r\n <div {...combobox} className=\"inline w-full\" ref={ref}>\r\n <Input\r\n {...input}\r\n autoComplete=\"off\"\r\n button={\r\n props.inline ? (\r\n <IconButton\r\n appearance=\"discrete\"\r\n className=\"!border-l-0 focus:!border-none focus:!shadow-none active:!border-none\"\r\n icon={popover.open ? 'chevron-up' : 'chevron-down'}\r\n onClick={() => {\r\n popover.onOpenChange(true);\r\n input.ref.current?.focus();\r\n }}\r\n tabIndex={-1}\r\n />\r\n ) : dialog ? (\r\n <IconButton\r\n icon=\"list-search\"\r\n disabled={props.readOnly || props.disabled}\r\n dialog={dialog}\r\n onFocus={(event: React.FocusEvent<HTMLButtonElement>) => {\r\n // Prevents the default focus behaviour of showing the tooltip, on parent tooltip element\r\n event.preventDefault();\r\n input.ref.current?.focus();\r\n }}\r\n ref={button.ref}\r\n tabIndex={-1}\r\n tooltip={texts.combobox.tooltip}\r\n />\r\n ) : undefined\r\n }\r\n />\r\n </div>\r\n </PopoverPrimitive.Anchor>\r\n <PopoverPrimitive.Content\r\n align=\"start\"\r\n onOpenAutoFocus={event => {\r\n event.preventDefault();\r\n }}\r\n sideOffset={4}\r\n >\r\n <ScrollableList\r\n {...list}\r\n className={cn('!border-blue max-h-[calc(12rem+2px)] w-auto max-w-[theme(spacing.96)]')}\r\n style={{ minWidth: selectDimensions?.width }}\r\n tabIndex={popover.open ? 0 : -1}\r\n />\r\n </PopoverPrimitive.Content>\r\n </PopoverPrimitive.Root>\r\n </span>\r\n );\r\n});\r\n"],"names":["Combobox","React","props","ref","className","externalClassName","dialog","style","otherProps","combobox","button","input","popover","list","useCombobox","internalRef","texts","useLocalization","selectDimensions","useBoundingClientRectListener","cn","inline","PopoverPrimitive","asChild","Input","autoComplete","IconButton","appearance","icon","open","onClick","onOpenChange","current","focus","tabIndex","disabled","readOnly","onFocus","event","preventDefault","tooltip","undefined","align","onOpenAutoFocus","sideOffset","ScrollableList","minWidth","width"],"mappings":";;;;;;;;;;MA+DaA,QAAQ,gBAAGC,UAAA,CAAiB,SAASD,QAAT,CAAkBE,KAAlB,EAAwCC,GAAxC;AACrC,QAAM;AAAEC,IAAAA,SAAS,EAAEC,iBAAb;AAAgCC,IAAAA,MAAhC;AAAwCC,IAAAA,KAAxC;AAA+C,OAAGC;AAAlD,MAAiEN,KAAvE;AACA,QAAM;AAAEO,IAAAA,QAAF;AAAYC,IAAAA,MAAZ;AAAoBC,IAAAA,KAApB;AAA2BC,IAAAA,OAA3B;AAAoCC,IAAAA;AAApC,MAA6CC,WAAW,CAACN,UAAD,EAAaL,GAAb,CAA9D;AACA,QAAMY,WAAW,GAAGd,MAAA,CAA6B,IAA7B,CAApB;AACA,QAAM;AAAEe,IAAAA;AAAF,MAAYC,eAAe,EAAjC;AACA,QAAMC,gBAAgB,GAAGC,6BAA6B,CAACJ,WAAD,CAAtD;AACA,QAAMX,SAAS,GAAGgB,EAAE,CAChB,sBADgB,EAEhB;AACI,2BAAuBlB,KAAK,CAACmB;AADjC,GAFgB,EAKhBhB,iBALgB,CAApB;AAQA,SACIJ,aAAA,OAAA;AAAMG,IAAAA,SAAS,EAAEA;iBAAqB;AAAWG,IAAAA,KAAK,EAAEA;GAAxD,EACIN,aAAA,CAACqB,IAAD,oBAA2BV,QAA3B,EACIX,aAAA,CAACqB,MAAD;AAAyBC,IAAAA,OAAO;AAACpB,IAAAA,GAAG,EAAEY;GAAtC,EACId,aAAA,MAAA,oBAASQ;AAAUL,IAAAA,SA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,MAAAA,QAAQ,EAAE5B,gBAAF,aAAEA,gBAAF,uBAAEA,gBAAgB,CAAE6B;AAA9B;AACPb,IAAAA,QAAQ,EAAEtB,OAAO,CAACiB,IAAR,GAAe,CAAf,GAAmB,CAAC;IAJlC,CAPJ,CArCJ,CADJ,CADJ;AAwDH,CAtEuB;;;;"}
|
@@ -1,4 +1,3 @@
|
|
1
|
-
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
2
1
|
import { forwardRef, useMemo, Children, useState, createElement } from 'react';
|
3
2
|
import { Root } from '@radix-ui/react-dialog';
|
4
3
|
import { DialogContext } from './Context.js';
|
@@ -7,14 +6,12 @@ import { Content, Title, Footer, Close } from './components/Content.js';
|
|
7
6
|
import { Drawer } from './components/Drawer.js';
|
8
7
|
import { Extra } from './components/Extra.js';
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
var extra;
|
17
|
-
Children.toArray(initialChildren).forEach(function (child) {
|
9
|
+
const useSeparatedChildren = initialChildren => {
|
10
|
+
return useMemo(() => {
|
11
|
+
const children = [];
|
12
|
+
let drawer;
|
13
|
+
let extra;
|
14
|
+
Children.toArray(initialChildren).forEach(child => {
|
18
15
|
var _child$type, _child$type2;
|
19
16
|
|
20
17
|
if (((_child$type = child.type) === null || _child$type === void 0 ? void 0 : _child$type.displayName) === Drawer.displayName) {
|
@@ -29,55 +26,39 @@ var useSeparatedChildren = function useSeparatedChildren(initialChildren) {
|
|
29
26
|
}, [initialChildren]);
|
30
27
|
};
|
31
28
|
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
return setDrawerOpen(function (isDrawerOpen) {
|
66
|
-
return !isDrawerOpen;
|
67
|
-
});
|
68
|
-
}
|
69
|
-
},
|
70
|
-
elements: {
|
71
|
-
drawer: drawer,
|
72
|
-
extra: extra
|
73
|
-
},
|
74
|
-
onClose: onClose,
|
75
|
-
props: otherProps,
|
76
|
-
showCloseButton: showCloseButton,
|
77
|
-
size: size,
|
78
|
-
ref: ref
|
79
|
-
};
|
80
|
-
}, [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
|
29
|
+
const Dialog = /*#__PURE__*/forwardRef(function Dialog(props, ref) {
|
30
|
+
const {
|
31
|
+
children: initialChildren,
|
32
|
+
closeOnEscape = true,
|
33
|
+
defaultOpen,
|
34
|
+
draggable = false,
|
35
|
+
onChange,
|
36
|
+
onClose,
|
37
|
+
open,
|
38
|
+
showCloseButton = true,
|
39
|
+
size = 'sm',
|
40
|
+
trigger,
|
41
|
+
...otherProps
|
42
|
+
} = props;
|
43
|
+
const [children, drawer, extra] = useSeparatedChildren(initialChildren);
|
44
|
+
const [drawerOpen, setDrawerOpen] = useState(false);
|
45
|
+
const context = useMemo(() => ({
|
46
|
+
closeOnEscape,
|
47
|
+
draggable,
|
48
|
+
drawer: {
|
49
|
+
open: drawerOpen,
|
50
|
+
toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen)
|
51
|
+
},
|
52
|
+
elements: {
|
53
|
+
drawer,
|
54
|
+
extra
|
55
|
+
},
|
56
|
+
onClose,
|
57
|
+
props: otherProps,
|
58
|
+
showCloseButton,
|
59
|
+
size,
|
60
|
+
ref
|
61
|
+
}), [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]);
|
81
62
|
return createElement(DialogContext.Provider, {
|
82
63
|
value: context
|
83
64
|
}, createElement(Root, {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Dialog.js","sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\r\nimport './Dialog.css';\r\nimport { DialogTriggerProps, Trigger } from './components/Trigger';\r\nimport {\r\n Content,\r\n Title,\r\n Footer,\r\n Close,\r\n DialogContentProps,\r\n DialogContentRenderProps,\r\n DialogContentDrawerRenderProps,\r\n DialogTitleProps,\r\n DialogFooterProps,\r\n DialogCloseProps,\r\n} from './components/Content';\r\nimport { DialogDrawerProps, DialogDrawerRenderProps, Drawer } from './components/Drawer';\r\nimport { DialogExtraProps, Extra } from './components/Extra';\r\nimport { DialogContext } from './Context';\r\nimport { DialogSize } from './types';\r\n\r\nexport {\r\n DialogCloseProps,\r\n DialogContentDrawerRenderProps,\r\n DialogContentProps,\r\n DialogContentRenderProps,\r\n DialogDrawerProps,\r\n DialogDrawerRenderProps,\r\n DialogFooterProps,\r\n DialogSize,\r\n DialogTitleProps,\r\n};\r\n\r\nexport type DialogTexts = {\r\n /**\r\n * Aria-label for close icon button in dialog.\r\n * To read more about how to provide the text, see [Provider](component:provider) component\r\n */\r\n close: string;\r\n drag: string;\r\n};\r\n\r\nexport type DialogProps = {\r\n children: React.ReactNode | React.ReactNode[];\r\n /** When `true`, pressing escape will close the dialog */\r\n closeOnEscape?: boolean;\r\n /** Set whether the dialog is open by default or not, use when not providing a trigger */\r\n defaultOpen?: boolean;\r\n /** Allows dragging the dialog around the screen (window constrained) */\r\n draggable?: boolean;\r\n /** Handler called when dialog closes by user interaction */\r\n onClose?: () => void;\r\n /** Called when the dialog opens or closes, must be used in conjunction with open */\r\n onChange?: (open: boolean) => void;\r\n /** Control the open state of the dialog from outside the component */\r\n open?: boolean;\r\n /** Shows the close icon button of the dialog */\r\n showCloseButton?: boolean;\r\n /** Size of the dialog. This is the recommended way to set a size for dialog component. */\r\n size?: DialogSize;\r\n /** A trigger to be used for the dialog, should not be set if `children` already contains a trigger */\r\n trigger?: JSX.Element;\r\n};\r\n\r\nconst useSeparatedChildren = initialChildren => {\r\n return React.useMemo(() => {\r\n const children: any[] = [];\r\n let drawer;\r\n let extra;\r\n\r\n React.Children.toArray(initialChildren).forEach((child: any) => {\r\n if (child.type?.displayName === Drawer.displayName) {\r\n drawer = child;\r\n } else if (child.type?.displayName === Extra.displayName) {\r\n extra = child;\r\n } else {\r\n children.push(child);\r\n }\r\n });\r\n\r\n return [children, drawer, extra];\r\n }, [initialChildren]);\r\n};\r\n\r\nexport type ForwardedDialogWithStatics = React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLElement>> & {\r\n Trigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;\r\n Content: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;\r\n Title: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;\r\n Footer: React.ForwardRefExoticComponent<DialogFooterProps & React.RefAttributes<HTMLDivElement>>;\r\n Extra: React.ForwardRefExoticComponent<DialogExtraProps & React.RefAttributes<HTMLDivElement>>;\r\n Drawer: React.ForwardRefExoticComponent<DialogDrawerProps & React.RefAttributes<HTMLDivElement>>;\r\n Close: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;\r\n};\r\n\r\nexport const Dialog = React.forwardRef(function Dialog(props: DialogProps, ref: React.Ref<HTMLElement>) {\r\n const {\r\n children: initialChildren,\r\n closeOnEscape = true,\r\n defaultOpen,\r\n draggable = false,\r\n onChange,\r\n onClose,\r\n open,\r\n showCloseButton = true,\r\n size = 'sm',\r\n trigger,\r\n ...otherProps\r\n } = props;\r\n const [children, drawer, extra] = useSeparatedChildren(initialChildren);\r\n const [drawerOpen, setDrawerOpen] = React.useState(false);\r\n\r\n const context = React.useMemo(\r\n () => ({\r\n closeOnEscape,\r\n draggable,\r\n drawer: {\r\n open: drawerOpen,\r\n toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen),\r\n },\r\n elements: {\r\n drawer,\r\n extra,\r\n },\r\n onClose,\r\n props: otherProps,\r\n showCloseButton,\r\n size,\r\n ref,\r\n }),\r\n [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]\r\n );\r\n\r\n return (\r\n <DialogContext.Provider value={context}>\r\n <DialogPrimitive.Root defaultOpen={defaultOpen} open={open} onOpenChange={onChange}>\r\n {trigger && <Trigger>{trigger}</Trigger>}\r\n {children}\r\n </DialogPrimitive.Root>\r\n </DialogContext.Provider>\r\n );\r\n}) as ForwardedDialogWithStatics;\r\n\r\nDialog.Trigger = Trigger;\r\nDialog.Content = Content;\r\nDialog.Title = Title;\r\nDialog.Footer = Footer;\r\nDialog.Extra = Extra;\r\nDialog.Drawer = Drawer;\r\nDialog.Close = Close;\r\n"],"names":["useSeparatedChildren","initialChildren","React","children","drawer","extra","toArray","forEach","child","type","displayName","Drawer","Extra","push","Dialog","props","ref","closeOnEscape","defaultOpen","draggable","onChange","onClose","open","showCloseButton","size","trigger","otherProps","drawerOpen","setDrawerOpen","context","toggle","isDrawerOpen","elements","DialogContext","Provider","value","DialogPrimitive","onOpenChange","Trigger","Content","Title","Footer","Close"],"mappings":"
|
1
|
+
{"version":3,"file":"Dialog.js","sources":["../../../../src/components/Dialog/Dialog.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport * as DialogPrimitive from '@radix-ui/react-dialog';\r\nimport './Dialog.css';\r\nimport { DialogTriggerProps, Trigger } from './components/Trigger';\r\nimport {\r\n Content,\r\n Title,\r\n Footer,\r\n Close,\r\n DialogContentProps,\r\n DialogContentRenderProps,\r\n DialogContentDrawerRenderProps,\r\n DialogTitleProps,\r\n DialogFooterProps,\r\n DialogCloseProps,\r\n} from './components/Content';\r\nimport { DialogDrawerProps, DialogDrawerRenderProps, Drawer } from './components/Drawer';\r\nimport { DialogExtraProps, Extra } from './components/Extra';\r\nimport { DialogContext } from './Context';\r\nimport { DialogSize } from './types';\r\n\r\nexport {\r\n DialogCloseProps,\r\n DialogContentDrawerRenderProps,\r\n DialogContentProps,\r\n DialogContentRenderProps,\r\n DialogDrawerProps,\r\n DialogDrawerRenderProps,\r\n DialogFooterProps,\r\n DialogSize,\r\n DialogTitleProps,\r\n};\r\n\r\nexport type DialogTexts = {\r\n /**\r\n * Aria-label for close icon button in dialog.\r\n * To read more about how to provide the text, see [Provider](component:provider) component\r\n */\r\n close: string;\r\n drag: string;\r\n};\r\n\r\nexport type DialogProps = {\r\n children: React.ReactNode | React.ReactNode[];\r\n /** When `true`, pressing escape will close the dialog */\r\n closeOnEscape?: boolean;\r\n /** Set whether the dialog is open by default or not, use when not providing a trigger */\r\n defaultOpen?: boolean;\r\n /** Allows dragging the dialog around the screen (window constrained) */\r\n draggable?: boolean;\r\n /** Handler called when dialog closes by user interaction */\r\n onClose?: () => void;\r\n /** Called when the dialog opens or closes, must be used in conjunction with open */\r\n onChange?: (open: boolean) => void;\r\n /** Control the open state of the dialog from outside the component */\r\n open?: boolean;\r\n /** Shows the close icon button of the dialog */\r\n showCloseButton?: boolean;\r\n /** Size of the dialog. This is the recommended way to set a size for dialog component. */\r\n size?: DialogSize;\r\n /** A trigger to be used for the dialog, should not be set if `children` already contains a trigger */\r\n trigger?: JSX.Element;\r\n};\r\n\r\nconst useSeparatedChildren = initialChildren => {\r\n return React.useMemo(() => {\r\n const children: any[] = [];\r\n let drawer;\r\n let extra;\r\n\r\n React.Children.toArray(initialChildren).forEach((child: any) => {\r\n if (child.type?.displayName === Drawer.displayName) {\r\n drawer = child;\r\n } else if (child.type?.displayName === Extra.displayName) {\r\n extra = child;\r\n } else {\r\n children.push(child);\r\n }\r\n });\r\n\r\n return [children, drawer, extra];\r\n }, [initialChildren]);\r\n};\r\n\r\nexport type ForwardedDialogWithStatics = React.ForwardRefExoticComponent<DialogProps & React.RefAttributes<HTMLElement>> & {\r\n Trigger: React.ForwardRefExoticComponent<DialogTriggerProps & React.RefAttributes<HTMLButtonElement>>;\r\n Content: React.ForwardRefExoticComponent<DialogContentProps & React.RefAttributes<HTMLDivElement>>;\r\n Title: React.ForwardRefExoticComponent<DialogTitleProps & React.RefAttributes<HTMLHeadingElement>>;\r\n Footer: React.ForwardRefExoticComponent<DialogFooterProps & React.RefAttributes<HTMLDivElement>>;\r\n Extra: React.ForwardRefExoticComponent<DialogExtraProps & React.RefAttributes<HTMLDivElement>>;\r\n Drawer: React.ForwardRefExoticComponent<DialogDrawerProps & React.RefAttributes<HTMLDivElement>>;\r\n Close: React.ForwardRefExoticComponent<DialogCloseProps & React.RefAttributes<HTMLButtonElement>>;\r\n};\r\n\r\nexport const Dialog = React.forwardRef(function Dialog(props: DialogProps, ref: React.Ref<HTMLElement>) {\r\n const {\r\n children: initialChildren,\r\n closeOnEscape = true,\r\n defaultOpen,\r\n draggable = false,\r\n onChange,\r\n onClose,\r\n open,\r\n showCloseButton = true,\r\n size = 'sm',\r\n trigger,\r\n ...otherProps\r\n } = props;\r\n const [children, drawer, extra] = useSeparatedChildren(initialChildren);\r\n const [drawerOpen, setDrawerOpen] = React.useState(false);\r\n\r\n const context = React.useMemo(\r\n () => ({\r\n closeOnEscape,\r\n draggable,\r\n drawer: {\r\n open: drawerOpen,\r\n toggle: () => setDrawerOpen(isDrawerOpen => !isDrawerOpen),\r\n },\r\n elements: {\r\n drawer,\r\n extra,\r\n },\r\n onClose,\r\n props: otherProps,\r\n showCloseButton,\r\n size,\r\n ref,\r\n }),\r\n [closeOnEscape, drawerOpen, draggable, drawer, extra, open, otherProps, showCloseButton]\r\n );\r\n\r\n return (\r\n <DialogContext.Provider value={context}>\r\n <DialogPrimitive.Root defaultOpen={defaultOpen} open={open} onOpenChange={onChange}>\r\n {trigger && <Trigger>{trigger}</Trigger>}\r\n {children}\r\n </DialogPrimitive.Root>\r\n </DialogContext.Provider>\r\n );\r\n}) as ForwardedDialogWithStatics;\r\n\r\nDialog.Trigger = Trigger;\r\nDialog.Content = Content;\r\nDialog.Title = Title;\r\nDialog.Footer = Footer;\r\nDialog.Extra = Extra;\r\nDialog.Drawer = Drawer;\r\nDialog.Close = Close;\r\n"],"names":["useSeparatedChildren","initialChildren","React","children","drawer","extra","toArray","forEach","child","type","displayName","Drawer","Extra","push","Dialog","props","ref","closeOnEscape","defaultOpen","draggable","onChange","onClose","open","showCloseButton","size","trigger","otherProps","drawerOpen","setDrawerOpen","context","toggle","isDrawerOpen","elements","DialogContext","Provider","value","DialogPrimitive","onOpenChange","Trigger","Content","Title","Footer","Close"],"mappings":";;;;;;;;AAgEA,MAAMA,oBAAoB,GAAGC,eAAe;AACxC,SAAOC,OAAA,CAAc;AACjB,UAAMC,QAAQ,GAAU,EAAxB;AACA,QAAIC,MAAJ;AACA,QAAIC,KAAJ;AAEAH,IAAAA,QAAA,CAAeI,OAAf,CAAuBL,eAAvB,EAAwCM,OAAxC,CAAiDC,KAAD;;;AAC5C,UAAI,gBAAAA,KAAK,CAACC,IAAN,4DAAYC,WAAZ,MAA4BC,MAAM,CAACD,WAAvC,EAAoD;AAChDN,QAAAA,MAAM,GAAGI,KAAT;AACH,OAFD,MAEO,IAAI,iBAAAA,KAAK,CAACC,IAAN,8DAAYC,WAAZ,MAA4BE,KAAK,CAACF,WAAtC,EAAmD;AACtDL,QAAAA,KAAK,GAAGG,KAAR;AACH,OAFM,MAEA;AACHL,QAAAA,QAAQ,CAACU,IAAT,CAAcL,KAAd;AACH;AACJ,KARD;AAUA,WAAO,CAACL,QAAD,EAAWC,MAAX,EAAmBC,KAAnB,CAAP;AACH,GAhBM,EAgBJ,CAACJ,eAAD,CAhBI,CAAP;AAiBH,CAlBD;;MA8Baa,MAAM,gBAAGZ,UAAA,CAAiB,SAASY,MAAT,CAAgBC,KAAhB,EAAoCC,GAApC;AACnC,QAAM;AACFb,IAAAA,QAAQ,EAAEF,eADR;AAEFgB,IAAAA,aAAa,GAAG,IAFd;AAGFC,IAAAA,WAHE;AAIFC,IAAAA,SAAS,GAA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AgDtBW,MAAM,CAACwB,OAAP,GAAiBA,OAAjB;AACAxB,MAAM,CAACyB,OAAP,GAAiBA,OAAjB;AACAzB,MAAM,CAAC0B,KAAP,GAAeA,KAAf;AACA1B,MAAM,CAAC2B,MAAP,GAAgBA,MAAhB;AACA3B,MAAM,CAACF,KAAP,GAAeA,KAAf;AACAE,MAAM,CAACH,MAAP,GAAgBA,MAAhB;AACAG,MAAM,CAAC4B,KAAP,GAAeA,KAAf;;;;"}
|
@@ -1,20 +1,18 @@
|
|
1
|
-
import { objectWithoutPropertiesLoose as _objectWithoutPropertiesLoose } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
2
1
|
import { forwardRef, createElement } from 'react';
|
3
2
|
import cn from 'classnames';
|
4
3
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
var className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
|
4
|
+
const Field = /*#__PURE__*/forwardRef(function Field(props, ref) {
|
5
|
+
const {
|
6
|
+
disabled,
|
7
|
+
children,
|
8
|
+
invalid = false,
|
9
|
+
message,
|
10
|
+
...otherProps
|
11
|
+
} = props;
|
12
|
+
const className = cn('flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]', {
|
15
13
|
'text-grey-dark': disabled
|
16
14
|
}, props.className);
|
17
|
-
|
15
|
+
const messageClassName = cn('h-4 text-xs text-left leading-normal font-normal truncate -mb-4', {
|
18
16
|
'text-grey-darkest': !invalid,
|
19
17
|
'text-red': invalid,
|
20
18
|
'opacity-50': disabled
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Field.js","sources":["../../../../src/components/Field/Field.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\n\r\nimport './Field.css';\r\n\r\nexport type FieldProps = React.LabelHTMLAttributes<HTMLLabelElement> & {\r\n /** Content of the field */\r\n children: React.ReactNode;\r\n /**\tChanges the style to indicate the element is disabled */\r\n disabled?: boolean;\r\n /* Whether the input is in an invalid state */\r\n invalid?: boolean;\r\n /**\r\n * Text displayed below the children of Field.\r\n * Should be a short text that indicates feedback for user.\r\n */\r\n message?: string;\r\n};\r\n\r\nexport const Field = React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\r\n const { disabled, children, invalid = false, message, ...otherProps } = props;\r\n const className = cn(\r\n 'flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]',\r\n {\r\n 'text-grey-dark': disabled,\r\n },\r\n props.className\r\n );\r\n const messageClassName = cn(\r\n 'h-4 text-xs text-left leading-normal font-normal truncate -mb-4',\r\n {\r\n 'text-grey-darkest': !invalid,\r\n 'text-red': invalid,\r\n 'opacity-50': disabled,\r\n },\r\n props.className\r\n );\r\n\r\n return (\r\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\r\n {children}\r\n {message && (\r\n <span className={messageClassName} role={invalid ? 'alert' : undefined}>\r\n {message}\r\n </span>\r\n )}\r\n </label>\r\n );\r\n});\r\n"],"names":["Field","React","props","ref","disabled","children","invalid","message","otherProps","className","cn","messageClassName","role","undefined"],"mappings":"
|
1
|
+
{"version":3,"file":"Field.js","sources":["../../../../src/components/Field/Field.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport cn from 'classnames';\r\n\r\nimport './Field.css';\r\n\r\nexport type FieldProps = React.LabelHTMLAttributes<HTMLLabelElement> & {\r\n /** Content of the field */\r\n children: React.ReactNode;\r\n /**\tChanges the style to indicate the element is disabled */\r\n disabled?: boolean;\r\n /* Whether the input is in an invalid state */\r\n invalid?: boolean;\r\n /**\r\n * Text displayed below the children of Field.\r\n * Should be a short text that indicates feedback for user.\r\n */\r\n message?: string;\r\n};\r\n\r\nexport const Field = React.forwardRef(function Field(props: FieldProps, ref: React.Ref<HTMLLabelElement>) {\r\n const { disabled, children, invalid = false, message, ...otherProps } = props;\r\n const className = cn(\r\n 'flex flex-col font-bold text-xs leading-loose pb-4 min-h-[theme(spacing.18)]',\r\n {\r\n 'text-grey-dark': disabled,\r\n },\r\n props.className\r\n );\r\n const messageClassName = cn(\r\n 'h-4 text-xs text-left leading-normal font-normal truncate -mb-4',\r\n {\r\n 'text-grey-darkest': !invalid,\r\n 'text-red': invalid,\r\n 'opacity-50': disabled,\r\n },\r\n props.className\r\n );\r\n\r\n return (\r\n <label {...otherProps} className={className} data-taco=\"label\" ref={ref}>\r\n {children}\r\n {message && (\r\n <span className={messageClassName} role={invalid ? 'alert' : undefined}>\r\n {message}\r\n </span>\r\n )}\r\n </label>\r\n );\r\n});\r\n"],"names":["Field","React","props","ref","disabled","children","invalid","message","otherProps","className","cn","messageClassName","role","undefined"],"mappings":";;;MAmBaA,KAAK,gBAAGC,UAAA,CAAiB,SAASD,KAAT,CAAeE,KAAf,EAAkCC,GAAlC;AAClC,QAAM;AAAEC,IAAAA,QAAF;AAAYC,IAAAA,QAAZ;AAAsBC,IAAAA,OAAO,GAAG,KAAhC;AAAuCC,IAAAA,OAAvC;AAAgD,OAAGC;AAAnD,MAAkEN,KAAxE;AACA,QAAMO,SAAS,GAAGC,EAAE,CAChB,8EADgB,EAEhB;AACI,sBAAkBN;AADtB,GAFgB,EAKhBF,KAAK,CAACO,SALU,CAApB;AAOA,QAAME,gBAAgB,GAAGD,EAAE,CACvB,iEADuB,EAEvB;AACI,yBAAqB,CAACJ,OAD1B;AAEI,gBAAYA,OAFhB;AAGI,kBAAcF;AAHlB,GAFuB,EAOvBF,KAAK,CAACO,SAPiB,CAA3B;AAUA,SACIR,aAAA,QAAA,oBAAWO;AAAYC,IAAAA,SAAS,EAAEA;iBAAqB;AAAQN,IAAAA,GAAG,EAAEA;IAApE,EACKE,QADL,EAEKE,OAAO,IACJN,aAAA,OAAA;AAAMQ,IAAAA,SAAS,EAAEE;AAAkBC,IAAAA,IAAI,EAAEN,OAAO,GAAG,OAAH,GAAaO;GAA7D,EACKN,OADL,CAHR,CADJ;AAUH,CA7BoB;;;;"}
|
@@ -16,20 +16,20 @@ const Icon = ({
|
|
16
16
|
const getAppearanceClasses = appearance => {
|
17
17
|
switch (appearance) {
|
18
18
|
case 'primary':
|
19
|
-
return 'wcag-blue aria-disabled:text-blue-dark focus:wcag-blue-light';
|
19
|
+
return 'wcag-blue aria-disabled:text-blue-dark hover:wcag-blue-light focus:wcag-blue-light';
|
20
20
|
|
21
21
|
case 'danger':
|
22
|
-
return 'wcag-red aria-disabled:text-red-dark focus:wcag-red-light';
|
22
|
+
return 'wcag-red aria-disabled:text-red-dark hover:wcag-red-light focus:wcag-red-light';
|
23
23
|
|
24
24
|
case 'ghost':
|
25
|
-
return 'text-blue aria-disabled:text-grey focus:wcag-blue';
|
25
|
+
return 'text-blue aria-disabled:text-grey hover:wcag-blue focus:wcag-blue';
|
26
26
|
|
27
27
|
case 'discrete':
|
28
|
-
return 'text-black aria-disabled:text-grey focus:wcag-blue-lightest';
|
28
|
+
return 'text-black aria-disabled:text-grey hover:wcag-blue-lightest focus:wcag-blue-lightest';
|
29
29
|
|
30
30
|
case 'default':
|
31
31
|
default:
|
32
|
-
return 'wcag-grey-light aria-disabled:text-grey-darker focus:wcag-grey-dark';
|
32
|
+
return 'wcag-grey-light aria-disabled:text-grey-darker hover:wcag-grey-dark focus:wcag-grey-dark';
|
33
33
|
}
|
34
34
|
};
|
35
35
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Item.js","sources":["../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\r\nimport cn from 'classnames';\r\nimport { IconName } from '../../Icon/Icon';\r\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\r\nimport { useCurrentMenu } from '../Context';\r\nimport { Appearance } from '../../../types';\r\nimport { DialogProps } from '../../Dialog/Dialog';\r\n\r\nexport const Icon = ({ name }) => (\r\n <span className=\"absolute left-0 ml-1\">\r\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\r\n </span>\r\n);\r\n\r\nconst getAppearanceClasses = (appearance: Appearance | undefined) => {\r\n switch (appearance) {\r\n case 'primary':\r\n return 'wcag-blue aria-disabled:text-blue-dark focus:wcag-blue-light';\r\n\r\n case 'danger':\r\n return 'wcag-red aria-disabled:text-red-dark focus:wcag-red-light';\r\n\r\n case 'ghost':\r\n return 'text-blue aria-disabled:text-grey focus:wcag-blue';\r\n\r\n case 'discrete':\r\n return 'text-black aria-disabled:text-grey focus:wcag-blue-lightest';\r\n\r\n case 'default':\r\n default:\r\n return 'wcag-grey-light aria-disabled:text-grey-darker focus:wcag-grey-dark';\r\n }\r\n};\r\n\r\nexport const useItemStyling = ({ disabled, indented, className }) => {\r\n const menu = useCurrentMenu();\r\n\r\n React.useEffect(() => {\r\n if (indented && !menu?.indented) {\r\n menu?.registerIndentation();\r\n }\r\n }, [indented]);\r\n\r\n return cn(\r\n 'flex items-center justify-start h-7 pr-1.5 relative rounded w-full focus:outline-none group',\r\n getAppearanceClasses(menu?.appearance),\r\n {\r\n 'pl-7': menu?.indented,\r\n 'pl-1.5': !menu?.indented,\r\n 'cursor-pointer': !disabled,\r\n 'cursor-not-allowed': disabled,\r\n },\r\n className\r\n );\r\n};\r\n\r\nexport const Shortcut = props => {\r\n const menu = useCurrentMenu();\r\n let appearance;\r\n\r\n switch (menu?.appearance) {\r\n case 'primary':\r\n appearance = 'text-blue-lightest group-focus:text-black';\r\n break;\r\n\r\n case 'danger':\r\n appearance = 'text-red-lightest group-focus:text-white';\r\n break;\r\n\r\n case 'ghost':\r\n appearance = 'text-blue-light group-focus:text-blue-lightest';\r\n break;\r\n\r\n case 'discrete':\r\n appearance = 'text-grey-darker group-focus:text-blue-light';\r\n break;\r\n\r\n case 'default':\r\n default:\r\n appearance = 'text-grey-darkest';\r\n break;\r\n }\r\n\r\n const className = cn('ml-auto pl-3', appearance);\r\n\r\n return <span {...props} className={className} />;\r\n};\r\n\r\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\r\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\r\n disabled?: boolean;\r\n icon?: IconName;\r\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\r\n shortcut?: string;\r\n};\r\n\r\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\r\n const { dialog, icon, onClick, shortcut, ...otherProps } = props;\r\n const className = useItemStyling({\r\n disabled: props.disabled,\r\n indented: !!icon,\r\n className: props.className,\r\n });\r\n\r\n const disabled = props.disabled ?? props['aria-disabled'];\r\n\r\n let handleClick;\r\n\r\n // radix has a bug that does not disable clicks when disabled is set on items\r\n if (disabled) {\r\n handleClick = event => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n };\r\n }\r\n\r\n const handleSelect = event => {\r\n if (onClick) {\r\n onClick(event);\r\n }\r\n\r\n if (props['aria-haspopup'] || typeof dialog === 'function') {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n let button = (\r\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\r\n {icon && <Icon name={icon} />}\r\n {props.children}\r\n {shortcut && <Shortcut>{shortcut}</Shortcut>}\r\n </DropdownMenuPrimitive.Item>\r\n );\r\n\r\n if (typeof dialog === 'function') {\r\n button = dialog({ trigger: button });\r\n }\r\n\r\n return button;\r\n});\r\n"],"names":["Icon","name","React","className","IconPrimitive","getAppearanceClasses","appearance","useItemStyling","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Shortcut","props","Item","MenuItem","ref","dialog","icon","onClick","shortcut","otherProps","handleClick","event","preventDefault","stopPropagation","handleSelect","button","DropdownMenuPrimitive","onSelect","children","trigger"],"mappings":";;;;;;MASaA,IAAI,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAChBC,aAAA,OAAA;AAAMC,EAAAA,SAAS,EAAC;CAAhB,EACID,aAAA,CAACE,MAAD;AAAeD,EAAAA,SAAS,EAAC;AAA0BF,EAAAA,IAAI,EAAEA;CAAzD,CADJ;;AAKJ,MAAMI,oBAAoB,GAAIC,UAAD;AACzB,UAAQA,UAAR;AACI,SAAK,SAAL;AACI,aAAO,
|
1
|
+
{"version":3,"file":"Item.js","sources":["../../../../../src/components/Menu/components/Item.tsx"],"sourcesContent":["import * as React from 'react';\r\nimport * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';\r\nimport cn from 'classnames';\r\nimport { IconName } from '../../Icon/Icon';\r\nimport { Icon as IconPrimitive } from '../../Icon/Icon';\r\nimport { useCurrentMenu } from '../Context';\r\nimport { Appearance } from '../../../types';\r\nimport { DialogProps } from '../../Dialog/Dialog';\r\n\r\nexport const Icon = ({ name }) => (\r\n <span className=\"absolute left-0 ml-1\">\r\n <IconPrimitive className=\"-ml-px -mt-px !h-5 !w-5\" name={name} />\r\n </span>\r\n);\r\n\r\nconst getAppearanceClasses = (appearance: Appearance | undefined) => {\r\n switch (appearance) {\r\n case 'primary':\r\n return 'wcag-blue aria-disabled:text-blue-dark hover:wcag-blue-light focus:wcag-blue-light';\r\n\r\n case 'danger':\r\n return 'wcag-red aria-disabled:text-red-dark hover:wcag-red-light focus:wcag-red-light';\r\n\r\n case 'ghost':\r\n return 'text-blue aria-disabled:text-grey hover:wcag-blue focus:wcag-blue';\r\n\r\n case 'discrete':\r\n return 'text-black aria-disabled:text-grey hover:wcag-blue-lightest focus:wcag-blue-lightest';\r\n\r\n case 'default':\r\n default:\r\n return 'wcag-grey-light aria-disabled:text-grey-darker hover:wcag-grey-dark focus:wcag-grey-dark';\r\n }\r\n};\r\n\r\nexport const useItemStyling = ({ disabled, indented, className }) => {\r\n const menu = useCurrentMenu();\r\n\r\n React.useEffect(() => {\r\n if (indented && !menu?.indented) {\r\n menu?.registerIndentation();\r\n }\r\n }, [indented]);\r\n\r\n return cn(\r\n 'flex items-center justify-start h-7 pr-1.5 relative rounded w-full focus:outline-none group',\r\n getAppearanceClasses(menu?.appearance),\r\n {\r\n 'pl-7': menu?.indented,\r\n 'pl-1.5': !menu?.indented,\r\n 'cursor-pointer': !disabled,\r\n 'cursor-not-allowed': disabled,\r\n },\r\n className\r\n );\r\n};\r\n\r\nexport const Shortcut = props => {\r\n const menu = useCurrentMenu();\r\n let appearance;\r\n\r\n switch (menu?.appearance) {\r\n case 'primary':\r\n appearance = 'text-blue-lightest group-focus:text-black';\r\n break;\r\n\r\n case 'danger':\r\n appearance = 'text-red-lightest group-focus:text-white';\r\n break;\r\n\r\n case 'ghost':\r\n appearance = 'text-blue-light group-focus:text-blue-lightest';\r\n break;\r\n\r\n case 'discrete':\r\n appearance = 'text-grey-darker group-focus:text-blue-light';\r\n break;\r\n\r\n case 'default':\r\n default:\r\n appearance = 'text-grey-darkest';\r\n break;\r\n }\r\n\r\n const className = cn('ml-auto pl-3', appearance);\r\n\r\n return <span {...props} className={className} />;\r\n};\r\n\r\nexport type MenuItemProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'onSelect'> & {\r\n dialog?: (props: Partial<DialogProps>) => JSX.Element;\r\n disabled?: boolean;\r\n icon?: IconName;\r\n onClick?: (event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void;\r\n shortcut?: string;\r\n};\r\n\r\nexport const Item = React.forwardRef(function MenuItem(props: MenuItemProps, ref: React.Ref<HTMLDivElement>) {\r\n const { dialog, icon, onClick, shortcut, ...otherProps } = props;\r\n const className = useItemStyling({\r\n disabled: props.disabled,\r\n indented: !!icon,\r\n className: props.className,\r\n });\r\n\r\n const disabled = props.disabled ?? props['aria-disabled'];\r\n\r\n let handleClick;\r\n\r\n // radix has a bug that does not disable clicks when disabled is set on items\r\n if (disabled) {\r\n handleClick = event => {\r\n event.preventDefault();\r\n event.stopPropagation();\r\n };\r\n }\r\n\r\n const handleSelect = event => {\r\n if (onClick) {\r\n onClick(event);\r\n }\r\n\r\n if (props['aria-haspopup'] || typeof dialog === 'function') {\r\n event.preventDefault();\r\n }\r\n };\r\n\r\n let button = (\r\n <DropdownMenuPrimitive.Item {...otherProps} className={className} onClick={handleClick} onSelect={handleSelect} ref={ref}>\r\n {icon && <Icon name={icon} />}\r\n {props.children}\r\n {shortcut && <Shortcut>{shortcut}</Shortcut>}\r\n </DropdownMenuPrimitive.Item>\r\n );\r\n\r\n if (typeof dialog === 'function') {\r\n button = dialog({ trigger: button });\r\n }\r\n\r\n return button;\r\n});\r\n"],"names":["Icon","name","React","className","IconPrimitive","getAppearanceClasses","appearance","useItemStyling","disabled","indented","menu","useCurrentMenu","registerIndentation","cn","Shortcut","props","Item","MenuItem","ref","dialog","icon","onClick","shortcut","otherProps","handleClick","event","preventDefault","stopPropagation","handleSelect","button","DropdownMenuPrimitive","onSelect","children","trigger"],"mappings":";;;;;;MASaA,IAAI,GAAG,CAAC;AAAEC,EAAAA;AAAF,CAAD,KAChBC,aAAA,OAAA;AAAMC,EAAAA,SAAS,EAAC;CAAhB,EACID,aAAA,CAACE,MAAD;AAAeD,EAAAA,SAAS,EAAC;AAA0BF,EAAAA,IAAI,EAAEA;CAAzD,CADJ;;AAKJ,MAAMI,oBAAoB,GAAIC,UAAD;AACzB,UAAQA,UAAR;AACI,SAAK,SAAL;AACI,aAAO,oFAAP;;AAEJ,SAAK,QAAL;AACI,aAAO,gFAAP;;AAEJ,SAAK,OAAL;AACI,aAAO,mEAAP;;AAEJ,SAAK,UAAL;AACI,aAAO,sFAAP;;AAEJ,SAAK,SAAL;AACA;AACI,aAAO,0FAAP;AAfR;AAiBH,CAlBD;;MAoBaC,cAAc,GAAG,CAAC;AAAEC,EAAAA,QAAF;AAAYC,EAAAA,QAAZ;AAAsBN,EAAAA;AAAtB,CAAD;AAC1B,QAAMO,IAAI,GAAGC,cAAc,EAA3B;AAEAT,EAAAA,SAAA,CAAgB;AACZ,QAAIO,QAAQ,IAAI,EAACC,IAAD,aAACA,IAAD,eAACA,IAAI,CAAED,QAAP,CAAhB,EAAiC;AAC7B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GED
@@ -16,7 +16,7 @@
|
|
16
16
|
}
|
17
17
|
|
18
18
|
body {
|
19
|
-
@apply h-screen bg-white text-sm leading-
|
19
|
+
@apply h-screen bg-white text-sm leading-5 text-black;
|
20
20
|
}
|
21
21
|
|
22
22
|
blockquote,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
pre,
|
47
47
|
ol,
|
48
48
|
ul {
|
49
|
-
@apply mb-
|
49
|
+
@apply mb-12;
|
50
50
|
}
|
51
51
|
|
52
52
|
ol ol,
|
@@ -87,7 +87,7 @@
|
|
87
87
|
}
|
88
88
|
|
89
89
|
h1 {
|
90
|
-
@apply mb-
|
90
|
+
@apply mb-5 text-3xl;
|
91
91
|
}
|
92
92
|
|
93
93
|
h2 {
|
@@ -102,9 +102,12 @@
|
|
102
102
|
@apply mb-1 text-base font-bold;
|
103
103
|
}
|
104
104
|
|
105
|
-
h5
|
105
|
+
h5 {
|
106
|
+
@apply mb-1 text-sm font-bold;
|
107
|
+
}
|
108
|
+
|
106
109
|
h6 {
|
107
|
-
@apply mb-1 font-bold;
|
110
|
+
@apply mb-1 text-xs font-bold;
|
108
111
|
}
|
109
112
|
|
110
113
|
b,
|
package/dist/index.css
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
}
|
17
17
|
|
18
18
|
body {
|
19
|
-
@apply h-screen bg-white text-sm leading-
|
19
|
+
@apply h-screen bg-white text-sm leading-5 text-black;
|
20
20
|
}
|
21
21
|
|
22
22
|
blockquote,
|
@@ -46,7 +46,7 @@
|
|
46
46
|
pre,
|
47
47
|
ol,
|
48
48
|
ul {
|
49
|
-
@apply mb-
|
49
|
+
@apply mb-12;
|
50
50
|
}
|
51
51
|
|
52
52
|
ol ol,
|
@@ -87,7 +87,7 @@
|
|
87
87
|
}
|
88
88
|
|
89
89
|
h1 {
|
90
|
-
@apply mb-
|
90
|
+
@apply mb-5 text-3xl;
|
91
91
|
}
|
92
92
|
|
93
93
|
h2 {
|
@@ -102,9 +102,12 @@
|
|
102
102
|
@apply mb-1 text-base font-bold;
|
103
103
|
}
|
104
104
|
|
105
|
-
h5
|
105
|
+
h5 {
|
106
|
+
@apply mb-1 text-sm font-bold;
|
107
|
+
}
|
108
|
+
|
106
109
|
h6 {
|
107
|
-
@apply mb-1 font-bold;
|
110
|
+
@apply mb-1 text-xs font-bold;
|
108
111
|
}
|
109
112
|
|
110
113
|
b,
|