@economic/taco 1.25.0 → 1.25.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/components/Navigation2/components/Group.d.ts +5 -3
- package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js +5 -5
- package/dist/esm/packages/taco/src/components/Navigation2/components/Group.js.map +1 -1
- package/dist/taco.cjs.development.js +5 -5
- package/dist/taco.cjs.development.js.map +1 -1
- package/dist/taco.cjs.production.min.js +1 -1
- package/dist/taco.cjs.production.min.js.map +1 -1
- package/package.json +2 -2
- package/types.json +11 -1
@@ -1,9 +1,11 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
export declare type Navigation2GroupProps = React.
|
2
|
+
export declare type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {
|
3
3
|
defaultExpanded?: boolean;
|
4
4
|
heading: string | JSX.Element;
|
5
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
5
6
|
};
|
6
|
-
export declare const Group: React.ForwardRefExoticComponent<React.
|
7
|
+
export declare const Group: React.ForwardRefExoticComponent<Pick<React.LiHTMLAttributes<HTMLLIElement>, "value" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "nonce" | "placeholder" | "slot" | "spellCheck" | "style" | "tabIndex" | "title" | "translate" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "color" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "children" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture"> & {
|
7
8
|
defaultExpanded?: boolean | undefined;
|
8
9
|
heading: string | JSX.Element;
|
9
|
-
|
10
|
+
onClick?: ((event: React.MouseEvent<HTMLButtonElement>) => void) | undefined;
|
11
|
+
} & React.RefAttributes<HTMLLIElement>>;
|
@@ -18,18 +18,18 @@ const Group = /*#__PURE__*/React__default.forwardRef(function Group(props, ref)
|
|
18
18
|
onClick(event);
|
19
19
|
}
|
20
20
|
};
|
21
|
-
return /*#__PURE__*/React__default.createElement("li", {
|
21
|
+
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, attributes, {
|
22
22
|
role: "none",
|
23
|
-
className: "[[role=menubar]>&]:px-3"
|
24
|
-
|
23
|
+
className: "[[role=menubar]>&]:px-3",
|
24
|
+
ref: ref
|
25
|
+
}), /*#__PURE__*/React__default.createElement("button", {
|
25
26
|
"aria-haspopup": "true",
|
26
27
|
"aria-expanded": expanded,
|
27
28
|
"data-taco": "navigation2-group",
|
28
29
|
className: className,
|
29
30
|
onClick: handleClick,
|
30
|
-
ref: ref,
|
31
31
|
role: "menuitem"
|
32
|
-
}
|
32
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
33
33
|
className: "-ml-2 !h-5 !w-5",
|
34
34
|
name: expanded ? 'chevron-down-solid' : 'chevron-right-solid'
|
35
35
|
}), /*#__PURE__*/React__default.createElement("span", {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Group.js","sources":["../../../../../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = React.
|
1
|
+
{"version":3,"file":"Group.js","sources":["../../../../../../../../src/components/Navigation2/components/Group.tsx"],"sourcesContent":["import React from 'react';\nimport cn from 'classnames';\nimport { Icon } from '../../Icon/Icon';\n\nexport type Navigation2GroupProps = Omit<React.LiHTMLAttributes<HTMLLIElement>, 'onClick'> & {\n defaultExpanded?: boolean;\n heading: string | JSX.Element;\n onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;\n};\n\nexport const Group = React.forwardRef<HTMLLIElement, Navigation2GroupProps>(function Group(props, ref) {\n const { children, defaultExpanded = false, heading, onClick, ...attributes } = props;\n const [expanded, setExpanded] = React.useState(defaultExpanded);\n const className = cn(\n 'flex w-full cursor-pointer items-center rounded px-3 font-bold text-left leading-8 hover:bg-black/[.06] focus-visible:yt-focus-dark',\n attributes.className\n );\n\n const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {\n setExpanded(!expanded);\n\n if (onClick) {\n onClick(event);\n }\n };\n\n return (\n <li {...attributes} role=\"none\" className=\"[[role=menubar]>&]:px-3\" ref={ref}>\n <button\n aria-haspopup=\"true\"\n aria-expanded={expanded}\n data-taco=\"navigation2-group\"\n className={className}\n onClick={handleClick}\n role=\"menuitem\">\n <Icon className=\"-ml-2 !h-5 !w-5\" name={expanded ? 'chevron-down-solid' : 'chevron-right-solid'} />\n <span className=\"flex-grow truncate\">{heading}</span>\n </button>\n <ul className={cn('mb-0 flex flex-col gap-y-px pt-px', { hidden: !expanded })} role=\"menu\">\n {children}\n </ul>\n </li>\n );\n});\n"],"names":["Group","React","forwardRef","props","ref","children","defaultExpanded","heading","onClick","attributes","expanded","setExpanded","useState","className","cn","handleClick","event","role","Icon","name","hidden"],"mappings":";;;;MAUaA,KAAK,gBAAGC,cAAK,CAACC,UAAU,CAAuC,SAASF,KAAK,CAACG,KAAK,EAAEC,GAAG;EACjG,MAAM;IAAEC,QAAQ;IAAEC,eAAe,GAAG,KAAK;IAAEC,OAAO;IAAEC,OAAO;IAAE,GAAGC;GAAY,GAAGN,KAAK;EACpF,MAAM,CAACO,QAAQ,EAAEC,WAAW,CAAC,GAAGV,cAAK,CAACW,QAAQ,CAACN,eAAe,CAAC;EAC/D,MAAMO,SAAS,GAAGC,EAAE,CAChB,qIAAqI,EACrIL,UAAU,CAACI,SAAS,CACvB;EAED,MAAME,WAAW,GAAIC,KAA0C;IAC3DL,WAAW,CAAC,CAACD,QAAQ,CAAC;IAEtB,IAAIF,OAAO,EAAE;MACTA,OAAO,CAACQ,KAAK,CAAC;;GAErB;EAED,oBACIf,qDAAQQ,UAAU;IAAEQ,IAAI,EAAC,MAAM;IAACJ,SAAS,EAAC,yBAAyB;IAACT,GAAG,EAAEA;mBACrEH;qBACkB,MAAM;qBACLS,QAAQ;iBACb,mBAAmB;IAC7BG,SAAS,EAAEA,SAAS;IACpBL,OAAO,EAAEO,WAAW;IACpBE,IAAI,EAAC;kBACLhB,6BAACiB,IAAI;IAACL,SAAS,EAAC,iBAAiB;IAACM,IAAI,EAAET,QAAQ,GAAG,oBAAoB,GAAG;IAAyB,eACnGT;IAAMY,SAAS,EAAC;KAAsBN,OAAO,CAAQ,CAChD,eACTN;IAAIY,SAAS,EAAEC,EAAE,CAAC,mCAAmC,EAAE;MAAEM,MAAM,EAAE,CAACV;KAAU,CAAC;IAAEO,IAAI,EAAC;KAC/EZ,QAAQ,CACR,CACJ;AAEb,CAAC;;;;"}
|
@@ -15322,18 +15322,18 @@ const Group$3 = /*#__PURE__*/React__default.forwardRef(function Group(props, ref
|
|
15322
15322
|
onClick(event);
|
15323
15323
|
}
|
15324
15324
|
};
|
15325
|
-
return /*#__PURE__*/React__default.createElement("li", {
|
15325
|
+
return /*#__PURE__*/React__default.createElement("li", Object.assign({}, attributes, {
|
15326
15326
|
role: "none",
|
15327
|
-
className: "[[role=menubar]>&]:px-3"
|
15328
|
-
|
15327
|
+
className: "[[role=menubar]>&]:px-3",
|
15328
|
+
ref: ref
|
15329
|
+
}), /*#__PURE__*/React__default.createElement("button", {
|
15329
15330
|
"aria-haspopup": "true",
|
15330
15331
|
"aria-expanded": expanded,
|
15331
15332
|
"data-taco": "navigation2-group",
|
15332
15333
|
className: className,
|
15333
15334
|
onClick: handleClick,
|
15334
|
-
ref: ref,
|
15335
15335
|
role: "menuitem"
|
15336
|
-
}
|
15336
|
+
}, /*#__PURE__*/React__default.createElement(Icon, {
|
15337
15337
|
className: "-ml-2 !h-5 !w-5",
|
15338
15338
|
name: expanded ? 'chevron-down-solid' : 'chevron-right-solid'
|
15339
15339
|
}), /*#__PURE__*/React__default.createElement("span", {
|