@atom-learning/components 3.0.0 → 3.0.1
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/CHANGELOG.md +6 -20
- package/dist/components/drawer/Drawer.d.ts +2 -2
- package/dist/components/drawer/Drawer.styles.d.ts +1 -2
- package/dist/components/drawer/Drawer.styles.js +1 -1
- package/dist/components/drawer/Drawer.styles.js.map +1 -1
- package/dist/components/drawer/DrawerClose.d.ts +1 -1
- package/dist/components/drawer/DrawerClose.js.map +1 -1
- package/dist/components/drawer/DrawerHeader.js +1 -1
- package/dist/components/drawer/DrawerHeader.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVertical.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js.map +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +3 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js +1 -1
- package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
- package/dist/docgen.json +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/utilities/event/preventEvent.d.ts +1 -1
- package/dist/utilities/event/preventEvent.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
## [3.0.1](https://github.com/Atom-Learning/components/compare/v3.0.0...v3.0.1) (2023-09-28)
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
### Bug Fixes
|
|
5
5
|
|
|
6
|
-
*
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
* actually export NavigationMenuVertical and Drawer ([d2306a7](https://github.com/Atom-Learning/components/commit/d2306a766b6e101d7ff91af8a522545051b58962))
|
|
12
|
-
* add component Dialog ([54c21a3](https://github.com/Atom-Learning/components/commit/54c21a3def77d58006014edb808acbcbd6bc9144))
|
|
13
|
-
* add component NavigationMenuVertical ([b0032ec](https://github.com/Atom-Learning/components/commit/b0032ecd3209b9fe386eb2beb64aaaaf252a0653))
|
|
14
|
-
* copy common reset styles for links and buttons in utility file `reset` ([effda2d](https://github.com/Atom-Learning/components/commit/effda2d71c3c6417dfbddb5fd007b387204e60c2))
|
|
15
|
-
* copy modal/dialog/drawer overlay styles into utility file `backdropOverlay` ([6405ab4](https://github.com/Atom-Learning/components/commit/6405ab4854a04ce2447b00ca936876b62dc192ec))
|
|
16
|
-
* slideInOut keyframe animation tweak to work with more flexible in/out positions ([cbd9736](https://github.com/Atom-Learning/components/commit/cbd973611891ff9daa6bec761aa7682712e09639))
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
* feat!: delete Sidedrawer ([b8e2d22](https://github.com/Atom-Learning/components/commit/b8e2d2202811ca18c569e2d631c713a8ce7a9b9e))
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
### BREAKING CHANGES
|
|
23
|
-
|
|
24
|
-
* Sidedrawer deleted
|
|
6
|
+
* change how NavigationMenuVerticalLink chooses what component to render and allow for using `as` ([0e5bbcc](https://github.com/Atom-Learning/components/commit/0e5bbccf4b20c526c437cc35be9c2114584fc6b4))
|
|
7
|
+
* extend type of preventEvent event ([55204e8](https://github.com/Atom-Learning/components/commit/55204e8f281817a51415326cd1789bbb9dbabb29))
|
|
8
|
+
* remove DrawerClose children prop requirement ([8cf0a54](https://github.com/Atom-Learning/components/commit/8cf0a545c78ea164e33373ff0fa15910eb5e5286))
|
|
9
|
+
* tweak Drawer styles to design requirement ([1400471](https://github.com/Atom-Learning/components/commit/1400471b27fd3090755e6a7f4cb6ed3d88af7f81))
|
|
10
|
+
* tweak NavigationMenuVertical styles to design requirement ([f94e843](https://github.com/Atom-Learning/components/commit/f94e84343b70f54a426126ffd137d1e9da0cb5df))
|
|
25
11
|
|
|
26
12
|
# [1.4.0](https://github.com/Atom-Learning/components/compare/v1.3.0...v1.4.0) (2022-04-11)
|
|
27
13
|
|
|
@@ -4,7 +4,7 @@ import { DrawerProvider } from './Drawer.context';
|
|
|
4
4
|
declare type TDrawerProps = React.ComponentProps<typeof Root> & React.ComponentProps<typeof DrawerProvider>;
|
|
5
5
|
export declare const Drawer: {
|
|
6
6
|
({ children, position, ...rest }: TDrawerProps): JSX.Element;
|
|
7
|
-
Close:
|
|
7
|
+
Close: (props: Omit<Pick<Omit<Omit<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
8
8
|
ref?: ((instance: HTMLButtonElement | null) => void) | React.RefObject<HTMLButtonElement> | null | undefined;
|
|
9
9
|
}, "appearance" | "size" | "css" | "theme" | "isRounded"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
10
10
|
theme?: "primary" | "success" | "danger" | "warning" | "neutral" | undefined;
|
|
@@ -348,7 +348,7 @@ export declare const Drawer: {
|
|
|
348
348
|
as?: React.ReactNode;
|
|
349
349
|
children: React.ReactNode;
|
|
350
350
|
label: string;
|
|
351
|
-
} & Omit<import("../../utilities/optional-tooltip-wrapper").TOptionalTooltipWrapperProps, "label"> & import("../../types").NavigatorActions, "appearance" | "color" | "translate" | "size" | "css" | "theme" | "onBlur" | "onChange" | "onSubmit" | "form" | "label" | "slot" | "style" | "title" | "key" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "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" | "as" | "disabled" | "value" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "hasTooltip" | "tooltipSide" | "isRounded" | keyof import("../../types").NavigatorActions> & React.RefAttributes<HTMLButtonElement
|
|
351
|
+
} & Omit<import("../../utilities/optional-tooltip-wrapper").TOptionalTooltipWrapperProps, "label"> & import("../../types").NavigatorActions, "appearance" | "color" | "translate" | "size" | "css" | "theme" | "onBlur" | "onChange" | "onSubmit" | "form" | "label" | "slot" | "style" | "title" | "key" | "name" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "className" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "hidden" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "role" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "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" | "onBlurCapture" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "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" | "as" | "disabled" | "value" | "type" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "hasTooltip" | "tooltipSide" | "isRounded" | keyof import("../../types").NavigatorActions> & React.RefAttributes<HTMLButtonElement>, "children">) => JSX.Element;
|
|
352
352
|
Content: React.FC<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "position" | "size" | "css"> & import("@stitches/react/types/styled-component").TransformProps<{
|
|
353
353
|
position?: "bottom" | "left" | "right" | "top" | undefined;
|
|
354
354
|
size?: "sm" | "md" | "lg" | "xl" | "xs" | undefined;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const t={
|
|
1
|
+
const t={p:"$4",width:"100%"};export{t as drawerSection};
|
|
2
2
|
//# sourceMappingURL=Drawer.styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.styles.js","sources":["../../../src/components/drawer/Drawer.styles.ts"],"sourcesContent":["export const drawerSection = {\n
|
|
1
|
+
{"version":3,"file":"Drawer.styles.js","sources":["../../../src/components/drawer/Drawer.styles.ts"],"sourcesContent":["export const drawerSection = {\n p: '$4',\n width: '100%'\n}\n"],"names":["drawerSection"],"mappings":"AAAO,MAAMA,EAAgB,CAC3B,EAAG,KACH,MAAO,MACT"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ActionIcon } from '../action-icon/ActionIcon';
|
|
3
|
-
export declare const DrawerClose:
|
|
3
|
+
export declare const DrawerClose: (props: Omit<React.ComponentProps<typeof ActionIcon>, 'children'>) => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerClose.js","sources":["../../../src/components/drawer/DrawerClose.tsx"],"sourcesContent":["import { Close } from '@atom-learning/icons'\nimport { Close as DialogClose } from '@radix-ui/react-dialog'\nimport React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const DrawerClose:
|
|
1
|
+
{"version":3,"file":"DrawerClose.js","sources":["../../../src/components/drawer/DrawerClose.tsx"],"sourcesContent":["import { Close } from '@atom-learning/icons'\nimport { Close as DialogClose } from '@radix-ui/react-dialog'\nimport React from 'react'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\n\nexport const DrawerClose = (\n props: Omit<React.ComponentProps<typeof ActionIcon>, 'children'>\n) => (\n <DialogClose asChild>\n <ActionIcon\n theme=\"neutral\"\n appearance=\"simple\"\n size=\"md\"\n hasTooltip={false}\n {...props}\n >\n <Icon is={Close} />\n </ActionIcon>\n </DialogClose>\n)\n"],"names":["DrawerClose","props","React","DialogClose","ActionIcon","Icon","Close"],"mappings":"kNAOa,MAAAA,EACXC,GAEAC,EAAA,cAACC,EAAA,CAAY,QAAO,EAAA,EAClBD,EAAA,cAACE,EAAA,CACC,MAAM,UACN,WAAW,SACX,KAAK,KACL,WAAY,GACX,GAAGH,GAEJC,EAAA,cAACG,EAAA,CAAK,GAAIC,CAAO,CAAA,CACnB,CACF"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{styled as r}from"../../stitches.js";import{drawerSection as o}from"./Drawer.styles.js";const e=r("div",{...o,borderBottom:"1px solid $base3"});export{e as DrawerHeader};
|
|
1
|
+
import{styled as r}from"../../stitches.js";import{drawerSection as o}from"./Drawer.styles.js";const e=r("div",{...o,minHeight:"$6",borderBottom:"1px solid $base3"});export{e as DrawerHeader};
|
|
2
2
|
//# sourceMappingURL=DrawerHeader.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerHeader.js","sources":["../../../src/components/drawer/DrawerHeader.tsx"],"sourcesContent":["import { styled } from '~/stitches'\n\nimport { drawerSection } from './Drawer.styles'\n\nexport const DrawerHeader = styled('div', {\n ...drawerSection,\n borderBottom: '1px solid $base3'\n})\n"],"names":["DrawerHeader","styled","drawerSection"],"mappings":"
|
|
1
|
+
{"version":3,"file":"DrawerHeader.js","sources":["../../../src/components/drawer/DrawerHeader.tsx"],"sourcesContent":["import { styled } from '~/stitches'\n\nimport { drawerSection } from './Drawer.styles'\n\nexport const DrawerHeader = styled('div', {\n ...drawerSection,\n minHeight: '$6', // At least the height of the TopBar\n borderBottom: '1px solid $base3'\n})\n"],"names":["DrawerHeader","styled","drawerSection"],"mappings":"8FAIa,MAAAA,EAAeC,EAAO,MAAO,CACxC,GAAGC,EACH,UAAW,KACX,aAAc,kBAChB,CAAC"}
|
|
@@ -327,7 +327,7 @@ declare const StyledRoot: import("@stitches/react/types/styled-component").Style
|
|
|
327
327
|
};
|
|
328
328
|
}>>;
|
|
329
329
|
declare type TNavigationVerticalProps = Omit<React.ComponentProps<typeof StyledRoot>, 'delayDuration' | 'skipDelayDuration' | 'defaultValue' | 'value' | 'onValueChange'>;
|
|
330
|
-
declare type TNavigationVerticalType = React.
|
|
330
|
+
declare type TNavigationVerticalType = React.FC<TNavigationVerticalProps> & {
|
|
331
331
|
Link: typeof NavigationMenuVerticalLink;
|
|
332
332
|
Accordion: typeof NavigationMenuVerticalAccordion;
|
|
333
333
|
AccordionContent: typeof NavigationMenuVerticalAccordionContent;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVertical.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.tsx"],"sourcesContent":["import { Root } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { NavigationMenuVerticalAccordion } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalAccordionContent } from './NavigationMenuVerticalAccordionContent'\nimport { NavigationMenuVerticalAccordionTrigger } from './NavigationMenuVerticalAccordionTrigger'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\nimport { NavigationMenuVerticalLink } from './NavigationMenuVerticalLink'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\nconst StyledRoot = styled(Root, {\n width: '100%'\n})\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the below `value` based props and `Trigger`/`Content`\n * animations do nothing, so removing them from typescript\n */\ntype TNavigationVerticalProps = Omit<\n React.ComponentProps<typeof StyledRoot>,\n | 'delayDuration'\n | 'skipDelayDuration'\n | 'defaultValue'\n | 'value'\n | 'onValueChange'\n>\n\ntype TNavigationVerticalType
|
|
1
|
+
{"version":3,"file":"NavigationMenuVertical.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.tsx"],"sourcesContent":["import { Root } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { NavigationMenuVerticalAccordion } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalAccordionContent } from './NavigationMenuVerticalAccordionContent'\nimport { NavigationMenuVerticalAccordionTrigger } from './NavigationMenuVerticalAccordionTrigger'\nimport { NavigationMenuVerticalIcon } from './NavigationMenuVerticalIcon'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\nimport { NavigationMenuVerticalLink } from './NavigationMenuVerticalLink'\nimport { NavigationMenuVerticalList } from './NavigationMenuVerticalList'\nimport { NavigationMenuVerticalText } from './NavigationMenuVerticalText'\n\nconst StyledRoot = styled(Root, {\n width: '100%'\n})\n\n/*\n * (!)\n * NavigationMenu vertical behaviour was buggy so had to build the\n * opening/closing nested Content(Accordion) based on `Collapsible` instead.\n * This means that the below `value` based props and `Trigger`/`Content`\n * animations do nothing, so removing them from typescript\n */\ntype TNavigationVerticalProps = Omit<\n React.ComponentProps<typeof StyledRoot>,\n | 'delayDuration'\n | 'skipDelayDuration'\n | 'defaultValue'\n | 'value'\n | 'onValueChange'\n>\n\ntype TNavigationVerticalType = React.FC<TNavigationVerticalProps> & {\n Link: typeof NavigationMenuVerticalLink\n Accordion: typeof NavigationMenuVerticalAccordion\n AccordionContent: typeof NavigationMenuVerticalAccordionContent\n AccordionTrigger: typeof NavigationMenuVerticalAccordionTrigger\n Item: typeof NavigationMenuVerticalItem\n ItemContent: typeof NavigationMenuVerticalItemContent\n Icon: typeof NavigationMenuVerticalIcon\n Text: typeof NavigationMenuVerticalText\n}\n\nexport const NavigationMenuVertical = (({ children, ...rest }) => {\n return (\n <StyledRoot {...rest} orientation=\"vertical\">\n <NavigationMenuVerticalList>{children}</NavigationMenuVerticalList>\n </StyledRoot>\n )\n}) as TNavigationVerticalType\n\nNavigationMenuVertical.Link = NavigationMenuVerticalLink\nNavigationMenuVertical.Accordion = NavigationMenuVerticalAccordion\nNavigationMenuVertical.AccordionContent = NavigationMenuVerticalAccordionContent\nNavigationMenuVertical.AccordionTrigger = NavigationMenuVerticalAccordionTrigger\nNavigationMenuVertical.Item = NavigationMenuVerticalItem\nNavigationMenuVertical.ItemContent = NavigationMenuVerticalItemContent\nNavigationMenuVertical.Icon = NavigationMenuVerticalIcon\nNavigationMenuVertical.Text = NavigationMenuVerticalText\n"],"names":["StyledRoot","styled","Root","NavigationMenuVertical","children","rest","React","NavigationMenuVerticalList","NavigationMenuVerticalLink","NavigationMenuVerticalAccordion","NavigationMenuVerticalAccordionContent","NavigationMenuVerticalAccordionTrigger","NavigationMenuVerticalItem","NavigationMenuVerticalItemContent","NavigationMenuVerticalIcon","NavigationMenuVerticalText"],"mappings":"o3BAeA,MAAMA,EAAaC,EAAOC,EAAM,CAC9B,MAAO,MACT,CAAC,EA6BYC,EAA0B,CAAC,CAAE,SAAAC,KAAaC,CAAK,IAExDC,EAAA,cAACN,EAAA,CAAY,GAAGK,EAAM,YAAY,UAChCC,EAAAA,EAAA,cAACC,EAAA,KAA4BH,CAAS,CACxC,EAIJD,EAAuB,KAAOK,EAC9BL,EAAuB,UAAYM,EACnCN,EAAuB,iBAAmBO,EAC1CP,EAAuB,iBAAmBQ,EAC1CR,EAAuB,KAAOS,EAC9BT,EAAuB,YAAcU,EACrCV,EAAuB,KAAOW,EAC9BX,EAAuB,KAAOY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{ChevronDown as i}from"@atom-learning/icons";import{Trigger as
|
|
1
|
+
import{ChevronDown as i}from"@atom-learning/icons";import{Trigger as a}from"@radix-ui/react-collapsible";import{Link as m}from"@radix-ui/react-navigation-menu";import e from"react";import{Flex as l}from"../flex/Flex.js";import{Icon as s}from"../icon/Icon.js";import{styled as t}from"../../stitches.js";import{navigationMenuVerticalItemStyles as c}from"./NavigationMenuVertical.styles.js";import{NavigationMenuVerticalAccordionContext as f}from"./NavigationMenuVerticalAccordion.js";import{NavigationMenuVerticalItemContent as p}from"./NavigationMenuVerticalItemContent.js";const g=t(a,c),u=t(s,{flexShrink:0,transition:"transform 300ms",'[data-state="open"] > &':{transform:"rotate(180deg)"}}),d=({children:r,...o})=>{const{setTriggerRef:n}=e.useContext(f);return e.createElement(m,{asChild:!0},e.createElement(g,{size:"lg",...o,asChild:!0},e.createElement(l,{as:"button",type:"button",align:"center",justify:"space-between",gap:3,ref:n},e.createElement(p,null,r),e.createElement(u,{size:"sm",is:i}))))};export{d as NavigationMenuVerticalAccordionTrigger};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuVerticalAccordionTrigger.js.map
|
package/dist/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVerticalAccordionTrigger.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport { Link } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { Icon } from '~/components/icon'\nimport { styled } from '~/stitches'\n\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalAccordionTrigger = styled(\n Trigger,\n navigationMenuVerticalItemStyles\n)\n\nconst StyledIcon = styled(Icon, {\n flexShrink: 0,\n transition: 'transform 300ms',\n '[data-state=\"open\"] > &': {\n transform: 'rotate(180deg)'\n }\n})\n\ntype TNavigationMenuAccordionTriggerProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionTrigger\n>\n\nexport const NavigationMenuVerticalAccordionTrigger = ({\n children,\n ...rest\n}: TNavigationMenuAccordionTriggerProps) => {\n const { setTriggerRef } = React.useContext(\n NavigationMenuVerticalAccordionContext\n )\n\n return (\n <Link asChild>\n <StyledNavigationMenuVerticalAccordionTrigger size=\"
|
|
1
|
+
{"version":3,"file":"NavigationMenuVerticalAccordionTrigger.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalAccordionTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@atom-learning/icons'\nimport { Trigger } from '@radix-ui/react-collapsible'\nimport { Link } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { Icon } from '~/components/icon'\nimport { styled } from '~/stitches'\n\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalAccordionContext } from './NavigationMenuVerticalAccordion'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalAccordionTrigger = styled(\n Trigger,\n navigationMenuVerticalItemStyles\n)\n\nconst StyledIcon = styled(Icon, {\n flexShrink: 0,\n transition: 'transform 300ms',\n '[data-state=\"open\"] > &': {\n transform: 'rotate(180deg)'\n }\n})\n\ntype TNavigationMenuAccordionTriggerProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalAccordionTrigger\n>\n\nexport const NavigationMenuVerticalAccordionTrigger = ({\n children,\n ...rest\n}: TNavigationMenuAccordionTriggerProps) => {\n const { setTriggerRef } = React.useContext(\n NavigationMenuVerticalAccordionContext\n )\n\n return (\n <Link asChild>\n <StyledNavigationMenuVerticalAccordionTrigger size=\"lg\" {...rest} asChild>\n <Flex\n as=\"button\"\n type=\"button\"\n align=\"center\"\n justify=\"space-between\"\n gap={3}\n ref={setTriggerRef}\n >\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n <StyledIcon size=\"sm\" is={ChevronDown} />\n </Flex>\n </StyledNavigationMenuVerticalAccordionTrigger>\n </Link>\n )\n}\n"],"names":["StyledNavigationMenuVerticalAccordionTrigger","styled","Trigger","navigationMenuVerticalItemStyles","StyledIcon","Icon","NavigationMenuVerticalAccordionTrigger","children","rest","setTriggerRef","React","NavigationMenuVerticalAccordionContext","Link","Flex","NavigationMenuVerticalItemContent","ChevronDown"],"mappings":"6jBAaA,MAAMA,EAA+CC,EACnDC,EACAC,CACF,EAEMC,EAAaH,EAAOI,EAAM,CAC9B,WAAY,EACZ,WAAY,kBACZ,0BAA2B,CACzB,UAAW,gBACb,CACF,CAAC,EAMYC,EAAyC,CAAC,CACrD,SAAAC,KACGC,CACL,IAA4C,CAC1C,KAAM,CAAE,cAAAC,CAAc,EAAIC,EAAM,WAC9BC,CACF,EAEA,OACED,EAAA,cAACE,EAAA,CAAK,QAAO,EACXF,EAAAA,EAAA,cAACV,EAAA,CAA6C,KAAK,KAAM,GAAGQ,EAAM,QAAO,IACvEE,EAAA,cAACG,EAAA,CACC,GAAG,SACH,KAAK,SACL,MAAM,SACN,QAAQ,gBACR,IAAK,EACL,IAAKJ,CAAAA,EAELC,EAAA,cAACI,EAAA,KACEP,CACH,EACAG,EAAA,cAACN,EAAA,CAAW,KAAK,KAAK,GAAIW,CAAAA,CAAa,CACzC,CACF,CACF,CAEJ"}
|
|
@@ -320,6 +320,8 @@ declare const StyledNavigationMenuVerticalLink: import("@stitches/react/types/st
|
|
|
320
320
|
marginBottom: string | number | import("@stitches/react/types/css-util").WithScaleValue<"space">;
|
|
321
321
|
};
|
|
322
322
|
}>>;
|
|
323
|
-
declare type NavigationMenuVerticalItemProps = React.ComponentProps<typeof StyledNavigationMenuVerticalLink
|
|
323
|
+
declare type NavigationMenuVerticalItemProps = React.ComponentProps<typeof StyledNavigationMenuVerticalLink> & {
|
|
324
|
+
as?: React.ComponentType | React.ElementType;
|
|
325
|
+
};
|
|
324
326
|
export declare const NavigationMenuVerticalLink: React.FC<NavigationMenuVerticalItemProps>;
|
|
325
327
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Link as m}from"@radix-ui/react-navigation-menu";import
|
|
1
|
+
import{Link as m}from"@radix-ui/react-navigation-menu";import t from"react";import{styled as c}from"../../stitches.js";import{isExternalLink as f}from"../../utilities/uri/index.js";import{navigationMenuVerticalItemStyles as p}from"./NavigationMenuVertical.styles.js";import{NavigationMenuVerticalItem as u}from"./NavigationMenuVerticalItem.js";import{NavigationMenuVerticalItemContent as s}from"./NavigationMenuVerticalItemContent.js";import{preventEvent as g}from"../../utilities/event/preventEvent.js";const v=c(m,p),E=({as:r,href:e,children:n,...o})=>{const i=f(e)?{target:"_blank",rel:"noopener noreferrer"}:{},a={type:"button"},l=r||(e?"a":"button");return t.createElement(u,null,t.createElement(v,{size:"lg",href:e,...o,...r?{}:e?i:a,onSelect:g,asChild:!0},t.createElement(l,null,t.createElement(s,null,n))))};export{E as NavigationMenuVerticalLink};
|
|
2
2
|
//# sourceMappingURL=NavigationMenuVerticalLink.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"NavigationMenuVerticalLink.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx"],"sourcesContent":["import { Link } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\nimport { preventEvent } from '~/utilities/event'\n\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalLink = styled(\n Link,\n navigationMenuVerticalItemStyles\n)\n\ntype NavigationMenuVerticalItemProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalLink\n
|
|
1
|
+
{"version":3,"file":"NavigationMenuVerticalLink.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVerticalLink.tsx"],"sourcesContent":["import { Link } from '@radix-ui/react-navigation-menu'\nimport React from 'react'\n\nimport { styled } from '~/stitches'\nimport { preventEvent } from '~/utilities/event'\nimport { isExternalLink } from '~/utilities/uri'\n\nimport { navigationMenuVerticalItemStyles } from './NavigationMenuVertical.styles'\nimport { NavigationMenuVerticalItem } from './NavigationMenuVerticalItem'\nimport { NavigationMenuVerticalItemContent } from './NavigationMenuVerticalItemContent'\n\nconst StyledNavigationMenuVerticalLink = styled(\n Link,\n navigationMenuVerticalItemStyles\n)\n\ntype NavigationMenuVerticalItemProps = React.ComponentProps<\n typeof StyledNavigationMenuVerticalLink\n> & {\n as?: React.ComponentType | React.ElementType\n}\n\nexport const NavigationMenuVerticalLink: React.FC<\n NavigationMenuVerticalItemProps\n> = ({ as, href, children, ...rest }) => {\n const linkProps = isExternalLink(href)\n ? { target: '_blank', rel: 'noopener noreferrer' }\n : {}\n\n const buttonProps = {\n type: 'button'\n }\n\n const Component = as || (href ? 'a' : 'button')\n const componentProps = as ? {} : href ? linkProps : buttonProps\n\n return (\n <NavigationMenuVerticalItem>\n <StyledNavigationMenuVerticalLink\n size=\"lg\"\n href={href}\n {...rest}\n {...componentProps}\n onSelect={preventEvent}\n asChild // ?: Can't use `as` for this as we lose `data-active` etc. attributes when we try to. Using `asChild` and `Component` as a workaround.\n >\n <Component>\n <NavigationMenuVerticalItemContent>\n {children}\n </NavigationMenuVerticalItemContent>\n </Component>\n </StyledNavigationMenuVerticalLink>\n </NavigationMenuVerticalItem>\n )\n}\n"],"names":["StyledNavigationMenuVerticalLink","styled","Link","navigationMenuVerticalItemStyles","NavigationMenuVerticalLink","as","href","children","rest","linkProps","isExternalLink","buttonProps","Component","React","NavigationMenuVerticalItem","preventEvent","NavigationMenuVerticalItemContent"],"mappings":"wfAWA,MAAMA,EAAmCC,EACvCC,EACAC,CACF,EAQaC,EAET,CAAC,CAAE,GAAAC,EAAI,KAAAC,EAAM,SAAAC,KAAaC,CAAK,IAAM,CACvC,MAAMC,EAAYC,EAAeJ,CAAI,EACjC,CAAE,OAAQ,SAAU,IAAK,qBAAsB,EAC/C,CAAC,EAECK,EAAc,CAClB,KAAM,QACR,EAEMC,EAAYP,IAAOC,EAAO,IAAM,UAGtC,OACEO,EAAA,cAACC,EAAA,KACCD,EAAA,cAACb,EAAA,CACC,KAAK,KACL,KAAMM,EACL,GAAGE,EACH,GARgBH,EAAK,CAAA,EAAKC,EAAOG,EAAYE,EAS9C,SAAUI,EACV,QAAO,IAEPF,EAAA,cAACD,EAAA,KACCC,EAAA,cAACG,EAAA,KACET,CACH,CACF,CACF,CACF,CAEJ"}
|