@atom-learning/components 3.0.0 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/data-table/DataTableTable.d.ts +8 -2
- package/dist/components/data-table/DataTableTable.js +1 -1
- package/dist/components/data-table/DataTableTable.js.map +1 -1
- 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/components/table/Table.d.ts +2 -0
- package/dist/components/table/Table.js +1 -1
- package/dist/components/table/Table.js.map +1 -1
- package/dist/components/table/TableStickyColumnsContainer.js +1 -1
- package/dist/components/table/TableStickyColumnsContainer.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 +0 -225
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { CSS } from '../../stitches';
|
|
2
3
|
import { Table } from '../table';
|
|
3
4
|
import { DataTable } from './DataTable';
|
|
4
|
-
export declare type DataTableTableProps = Omit<React.ComponentProps<typeof Table>, 'children'> & Partial<Pick<React.ComponentProps<typeof DataTable.Head>, 'theme' | 'sortable'
|
|
5
|
-
|
|
5
|
+
export declare type DataTableTableProps = Omit<React.ComponentProps<typeof Table>, 'children' | 'numberOfStickyColumns'> & Partial<Pick<React.ComponentProps<typeof DataTable.Head>, 'theme' | 'sortable'>> & Partial<Pick<React.ComponentProps<typeof Table.Body>, 'striped'>> & {
|
|
6
|
+
scrollOptions?: {
|
|
7
|
+
hasStickyHeader?: boolean;
|
|
8
|
+
headerCss?: CSS;
|
|
9
|
+
numberOfStickyColumns?: number;
|
|
10
|
+
scrollContainerCss?: CSS;
|
|
11
|
+
};
|
|
6
12
|
};
|
|
7
13
|
export declare const DataTableTable: React.FC<DataTableTableProps>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as e from"react";import{Table as
|
|
1
|
+
import*as e from"react";import{Table as p}from"../table/Table.js";import{DataTable as r}from"./DataTable.js";import{AsyncDataState as b}from"./DataTable.types.js";import{useDataTable as u}from"./DataTableContext.js";import{DataTableLoading as y}from"./DataTableLoading.js";const f=({sortable:s,striped:o,theme:n,css:l,scrollOptions:t={numberOfStickyColumns:0,hasStickyHeader:!1},...m})=>{const{asyncDataState:i,getTotalRows:c}=u(),a=i===b.PENDING;return!a&&c()===0?null:e.createElement(e.Fragment,null,e.createElement(y,null),e.createElement(p,{...m,numberOfStickyColumns:t.numberOfStickyColumns,scrollContainerCss:t.scrollContainerCss,css:{...l,...a&&{opacity:.5,pointerEvents:"none",transition:"opacity 250ms linear 150ms"}}},e.createElement(r.Head,{theme:n,sortable:s,isSticky:t.hasStickyHeader,css:t.headerCss}),e.createElement(r.Body,{striped:o})))};export{f as DataTableTable};
|
|
2
2
|
//# sourceMappingURL=DataTableTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataTableTable.js","sources":["../../../src/components/data-table/DataTableTable.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Table } from '../table'\nimport { DataTable } from './DataTable'\nimport { AsyncDataState } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableLoading } from './DataTableLoading'\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children'\n> &\n Partial<\n Pick
|
|
1
|
+
{"version":3,"file":"DataTableTable.js","sources":["../../../src/components/data-table/DataTableTable.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { Table } from '../table'\nimport { DataTable } from './DataTable'\nimport { AsyncDataState } from './DataTable.types'\nimport { useDataTable } from './DataTableContext'\nimport { DataTableLoading } from './DataTableLoading'\n\nexport type DataTableTableProps = Omit<\n React.ComponentProps<typeof Table>,\n 'children' | 'numberOfStickyColumns'\n> &\n Partial<\n Pick<React.ComponentProps<typeof DataTable.Head>, 'theme' | 'sortable'>\n > &\n Partial<Pick<React.ComponentProps<typeof Table.Body>, 'striped'>> & {\n scrollOptions?: {\n hasStickyHeader?: boolean\n headerCss?: CSS\n numberOfStickyColumns?: number\n scrollContainerCss?: CSS\n }\n }\n\nexport const DataTableTable: React.FC<DataTableTableProps> = ({\n sortable,\n striped,\n theme,\n css,\n scrollOptions = {\n numberOfStickyColumns: 0,\n hasStickyHeader: false\n },\n ...props\n}) => {\n const { asyncDataState, getTotalRows } = useDataTable()\n const isPending = asyncDataState === AsyncDataState.PENDING\n const isEmpty = !isPending && getTotalRows() === 0\n\n if (isEmpty) return null\n\n return (\n <>\n <DataTableLoading />\n\n <Table\n {...props}\n numberOfStickyColumns={scrollOptions.numberOfStickyColumns}\n scrollContainerCss={scrollOptions.scrollContainerCss}\n css={{\n ...css,\n ...(isPending && {\n opacity: 0.5,\n pointerEvents: 'none',\n transition: 'opacity 250ms linear 150ms'\n })\n }}\n >\n <DataTable.Head\n theme={theme}\n sortable={sortable}\n isSticky={scrollOptions.hasStickyHeader}\n css={scrollOptions.headerCss}\n />\n <DataTable.Body striped={striped} />\n </Table>\n </>\n )\n}\n"],"names":["DataTableTable","sortable","striped","theme","css","scrollOptions","props","asyncDataState","getTotalRows","useDataTable","isPending","AsyncDataState","React","DataTableLoading","Table","DataTable"],"mappings":"iRA0Ba,MAAAA,EAAgD,CAAC,CAC5D,SAAAC,EACA,QAAAC,EACA,MAAAC,EACA,IAAAC,EACA,cAAAC,EAAgB,CACd,sBAAuB,EACvB,gBAAiB,EACnB,KACGC,CACL,IAAM,CACJ,KAAM,CAAE,eAAAC,EAAgB,aAAAC,CAAa,EAAIC,EAAa,EAChDC,EAAYH,IAAmBI,EAAe,QAGpD,MAFgB,CAACD,GAAaF,EAAa,IAAM,EAE7B,KAGlBI,EAAA,cAAAA,EAAA,SAAA,KACEA,EAAA,cAACC,EAAA,IAAiB,EAElBD,EAAA,cAACE,EAAA,CACE,GAAGR,EACJ,sBAAuBD,EAAc,sBACrC,mBAAoBA,EAAc,mBAClC,IAAK,CACH,GAAGD,EACH,GAAIM,GAAa,CACf,QAAS,GACT,cAAe,OACf,WAAY,4BACd,CACF,CAAA,EAEAE,EAAA,cAACG,EAAU,KAAV,CACC,MAAOZ,EACP,SAAUF,EACV,SAAUI,EAAc,gBACxB,IAAKA,EAAc,SACrB,CAAA,EACAO,EAAA,cAACG,EAAU,KAAV,CAAe,QAASb,CAAS,CAAA,CACpC,CACF,CAEJ"}
|
|
@@ -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"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { CSS } from '../../stitches';
|
|
2
3
|
import { TableBody } from './TableBody';
|
|
3
4
|
import { TableCell } from './TableCell';
|
|
4
5
|
import { TableFooter } from './TableFooter';
|
|
@@ -341,6 +342,7 @@ declare const StyledTable: import("@stitches/react/types/styled-component").Styl
|
|
|
341
342
|
}>>;
|
|
342
343
|
declare type TableProps = React.ComponentProps<typeof StyledTable> & {
|
|
343
344
|
numberOfStickyColumns?: number;
|
|
345
|
+
scrollContainerCss?: CSS;
|
|
344
346
|
};
|
|
345
347
|
export declare const Table: React.FC<TableProps> & TableSubComponents;
|
|
346
348
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import*as a from"react";import{styled as
|
|
1
|
+
import*as a from"react";import{styled as p}from"../../stitches.js";import{TableBody as f}from"./TableBody.js";import{TableCell as o}from"./TableCell.js";import{TableFooter as b}from"./TableFooter.js";import{TableFooterCell as t}from"./TableFooterCell.js";import{TableHeader as c}from"./TableHeader.js";import{TableHeaderCell as r}from"./TableHeaderCell.js";import{StyledRow as C,TableRow as u}from"./TableRow.js";import{TableStickyColumnsContainer as s}from"./TableStickyColumnsContainer.js";const h=p("table",{borderCollapse:"separate",borderSpacing:0,fontFamily:"$sans",fontSize:"$sm",width:"100%",variants:{size:{md:{[`${o}, ${r}, ${t}`]:{height:"$4",padding:"$1 $3"}},lg:{[`${o}, ${r}, ${t}`]:{height:"$5",padding:"$2 $3"}},xl:{[`${o}, ${r}, ${t}`]:{height:"$6",padding:"$4 $3"}}},corners:{round:{[`${r}`]:{"&:first-of-type":{borderTopLeftRadius:"$0"},"&:last-of-type":{borderTopRightRadius:"$0"}},[`${C}:last-child`]:{[`${o}:first-child`]:{borderBottomLeftRadius:"$0"},[`${o}:last-child`]:{borderBottomRightRadius:"$0"}}},square:{}}}}),e=({size:m="md",corners:d="round",numberOfStickyColumns:l=0,scrollContainerCss:n,...$})=>{const i=a.createElement(h,{size:m,corners:d,...$});return l?a.createElement(s,{css:n,numberOfStickyColumns:l},i):i};e.Body=f,e.Cell=o,e.Footer=b,e.FooterCell=t,e.Header=c,e.HeaderCell=r,e.Row=u,e.StickyColumnsContainer=s,e.displayName="Table";export{e as Table};
|
|
2
2
|
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/stitches'\n\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { StyledRow, TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\ntype TableSubComponents = {\n Body: typeof TableBody\n Cell: typeof TableCell\n Footer: typeof TableFooter\n FooterCell: typeof TableFooterCell\n Header: typeof TableHeader\n HeaderCell: typeof TableHeaderCell\n Row: typeof TableRow\n StickyColumnsContainer: typeof TableStickyColumnsContainer\n}\n\nconst StyledTable = styled('table', {\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$sans',\n fontSize: '$sm',\n width: '100%',\n variants: {\n size: {\n md: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$4',\n padding: '$1 $3'\n }\n },\n lg: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$5',\n padding: '$2 $3'\n }\n },\n xl: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$6',\n padding: '$4 $3'\n }\n }\n },\n corners: {\n round: {\n [`${TableHeaderCell}`]: {\n '&:first-of-type': { borderTopLeftRadius: '$0' },\n '&:last-of-type': { borderTopRightRadius: '$0' }\n },\n [`${StyledRow}:last-child`]: {\n [`${TableCell}:first-child`]: { borderBottomLeftRadius: '$0' },\n [`${TableCell}:last-child`]: { borderBottomRightRadius: '$0' }\n }\n },\n square: {}\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n}\n\nexport const Table: React.FC<TableProps> & TableSubComponents = ({\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n ...rest\n}: TableProps) => {\n const tableComponent = <StyledTable size={size} corners={corners} {...rest} />\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n}\n\nTable.Body = TableBody\nTable.Cell = TableCell\nTable.Footer = TableFooter\nTable.FooterCell = TableFooterCell\nTable.Header = TableHeader\nTable.HeaderCell = TableHeaderCell\nTable.Row = TableRow\nTable.StickyColumnsContainer = TableStickyColumnsContainer\n\nTable.displayName = 'Table'\n"],"names":["StyledTable","styled","TableCell","TableHeaderCell","TableFooterCell","StyledRow","Table","size","corners","numberOfStickyColumns","rest","tableComponent","React","TableStickyColumnsContainer","TableBody","TableFooter","TableHeader","TableRow"],"mappings":"4eAwBA,MAAMA,EAAcC,EAAO,QAAS,CAClC,eAAgB,WAChB,cAAe,EACf,WAAY,QACZ,SAAU,MACV,MAAO,OACP,SAAU,CACR,KAAM,CACJ,GAAI,CACF,CAAC,GAAGC,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,EACA,GAAI,CACF,CAAC,GAAGF,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,EACA,GAAI,CACF,CAAC,GAAGF,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,CACF,EACA,QAAS,CACP,MAAO,CACL,CAAC,GAAGD,KAAoB,CACtB,kBAAmB,CAAE,oBAAqB,IAAK,EAC/C,iBAAkB,CAAE,qBAAsB,IAAK,CACjD,EACA,CAAC,GAAGE,gBAAyB,CAC3B,CAAC,GAAGH,iBAA0B,CAAE,uBAAwB,IAAK,EAC7D,CAAC,GAAGA,gBAAyB,CAAE,wBAAyB,IAAK,CAC/D,CACF,EACA,OAAQ,
|
|
1
|
+
{"version":3,"file":"Table.js","sources":["../../../src/components/table/Table.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { CSS, styled } from '~/stitches'\n\nimport { TableBody } from './TableBody'\nimport { TableCell } from './TableCell'\nimport { TableFooter } from './TableFooter'\nimport { TableFooterCell } from './TableFooterCell'\nimport { TableHeader } from './TableHeader'\nimport { TableHeaderCell } from './TableHeaderCell'\nimport { StyledRow, TableRow } from './TableRow'\nimport { TableStickyColumnsContainer } from './TableStickyColumnsContainer'\n\ntype TableSubComponents = {\n Body: typeof TableBody\n Cell: typeof TableCell\n Footer: typeof TableFooter\n FooterCell: typeof TableFooterCell\n Header: typeof TableHeader\n HeaderCell: typeof TableHeaderCell\n Row: typeof TableRow\n StickyColumnsContainer: typeof TableStickyColumnsContainer\n}\n\nconst StyledTable = styled('table', {\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$sans',\n fontSize: '$sm',\n width: '100%',\n variants: {\n size: {\n md: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$4',\n padding: '$1 $3'\n }\n },\n lg: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$5',\n padding: '$2 $3'\n }\n },\n xl: {\n [`${TableCell}, ${TableHeaderCell}, ${TableFooterCell}`]: {\n height: '$6',\n padding: '$4 $3'\n }\n }\n },\n corners: {\n round: {\n [`${TableHeaderCell}`]: {\n '&:first-of-type': { borderTopLeftRadius: '$0' },\n '&:last-of-type': { borderTopRightRadius: '$0' }\n },\n [`${StyledRow}:last-child`]: {\n [`${TableCell}:first-child`]: { borderBottomLeftRadius: '$0' },\n [`${TableCell}:last-child`]: { borderBottomRightRadius: '$0' }\n }\n },\n square: {}\n }\n }\n})\n\ntype TableProps = React.ComponentProps<typeof StyledTable> & {\n numberOfStickyColumns?: number\n scrollContainerCss?: CSS\n}\n\nexport const Table: React.FC<TableProps> & TableSubComponents = ({\n size = 'md',\n corners = 'round',\n numberOfStickyColumns = 0,\n scrollContainerCss,\n ...rest\n}: TableProps) => {\n const tableComponent = <StyledTable size={size} corners={corners} {...rest} />\n\n if (numberOfStickyColumns) {\n return (\n <TableStickyColumnsContainer\n css={scrollContainerCss}\n numberOfStickyColumns={numberOfStickyColumns}\n >\n {tableComponent}\n </TableStickyColumnsContainer>\n )\n }\n\n return tableComponent\n}\n\nTable.Body = TableBody\nTable.Cell = TableCell\nTable.Footer = TableFooter\nTable.FooterCell = TableFooterCell\nTable.Header = TableHeader\nTable.HeaderCell = TableHeaderCell\nTable.Row = TableRow\nTable.StickyColumnsContainer = TableStickyColumnsContainer\n\nTable.displayName = 'Table'\n"],"names":["StyledTable","styled","TableCell","TableHeaderCell","TableFooterCell","StyledRow","Table","size","corners","numberOfStickyColumns","scrollContainerCss","rest","tableComponent","React","TableStickyColumnsContainer","TableBody","TableFooter","TableHeader","TableRow"],"mappings":"4eAwBA,MAAMA,EAAcC,EAAO,QAAS,CAClC,eAAgB,WAChB,cAAe,EACf,WAAY,QACZ,SAAU,MACV,MAAO,OACP,SAAU,CACR,KAAM,CACJ,GAAI,CACF,CAAC,GAAGC,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,EACA,GAAI,CACF,CAAC,GAAGF,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,EACA,GAAI,CACF,CAAC,GAAGF,MAAcC,MAAoBC,KAAoB,CACxD,OAAQ,KACR,QAAS,OACX,CACF,CACF,EACA,QAAS,CACP,MAAO,CACL,CAAC,GAAGD,KAAoB,CACtB,kBAAmB,CAAE,oBAAqB,IAAK,EAC/C,iBAAkB,CAAE,qBAAsB,IAAK,CACjD,EACA,CAAC,GAAGE,gBAAyB,CAC3B,CAAC,GAAGH,iBAA0B,CAAE,uBAAwB,IAAK,EAC7D,CAAC,GAAGA,gBAAyB,CAAE,wBAAyB,IAAK,CAC/D,CACF,EACA,OAAQ,CACV,CAAA,CACF,CACF,CAAC,EAOYI,EAAmD,CAAC,CAC/D,KAAAC,EAAO,KACP,QAAAC,EAAU,QACV,sBAAAC,EAAwB,EACxB,mBAAAC,KACGC,CACL,IAAkB,CAChB,MAAMC,EAAiBC,EAAA,cAACb,EAAA,CAAY,KAAMO,EAAM,QAASC,EAAU,GAAGG,CAAAA,CAAM,EAE5E,OAAIF,EAEAI,EAAA,cAACC,EAAA,CACC,IAAKJ,EACL,sBAAuBD,CAEtBG,EAAAA,CACH,EAIGA,CACT,EAEAN,EAAM,KAAOS,EACbT,EAAM,KAAOJ,EACbI,EAAM,OAASU,EACfV,EAAM,WAAaF,EACnBE,EAAM,OAASW,EACfX,EAAM,WAAaH,EACnBG,EAAM,IAAMY,EACZZ,EAAM,uBAAyBQ,EAE/BR,EAAM,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import e from"react";import{Box as
|
|
1
|
+
import e from"react";import{Box as u}from"../box/Box.js";import{useStickyColumnsCss as h}from"./useStickyColumnsCss.js";const m=({children:s,numberOfStickyColumns:t=0,css:c,...i})=>{const[r,p]=e.useState(!1),o=e.useRef(null),{columnsCss:a}=h(t,o);return e.createElement(u,{onScroll:l=>{const n=l.currentTarget.scrollWidth>l.currentTarget.clientWidth;n!==r&&p(n)},role:"scrollbar",ref:o,css:{overflow:"auto",maxWidth:"100%",...a,[`& td:nth-child(${t}), th:nth-child(${t})`]:{...r&&{boxShadow:"$colors$alpha200 -2px -3px 9px 1px",clipPath:"inset(0px -10px 0px 0px)"}},"& td":{bg:"inherit"},...c},...i},s)};export{m as TableStickyColumnsContainer};
|
|
2
2
|
//# sourceMappingURL=TableStickyColumnsContainer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableStickyColumnsContainer.js","sources":["../../../src/components/table/TableStickyColumnsContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { Box } from '../box'\nimport { useStickyColumnsCss } from './useStickyColumnsCss'\ninterface ITableStickyColumnsContainerProps {\n children: React.ReactNode\n numberOfStickyColumns?: number\n css?: CSS\n}\n\nexport const TableStickyColumnsContainer: React.FC<\n ITableStickyColumnsContainerProps\n> = ({ children, numberOfStickyColumns = 0, css, ...restProps }) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const scrollContainerRef = React.useRef(null)\n const { columnsCss } = useStickyColumnsCss(\n numberOfStickyColumns,\n scrollContainerRef\n )\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll =\n event.currentTarget.scrollWidth > event.currentTarget.clientWidth\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <Box\n onScroll={handleScroll}\n role=\"scrollbar\"\n ref={scrollContainerRef}\n css={{\n maxWidth: '100%',\n ...columnsCss,\n [`& td:nth-child(${numberOfStickyColumns}), th:nth-child(${numberOfStickyColumns})`]:\n {\n ...(hasScroll && {\n boxShadow: '$colors$alpha200 -2px -3px 9px 1px',\n clipPath: 'inset(0px -10px 0px 0px)'\n })\n },\n '& td': {\n bg: 'inherit'\n },\n ...css\n }}\n {...restProps}\n >\n {children}\n </Box>\n )\n}\n"],"names":["TableStickyColumnsContainer","children","numberOfStickyColumns","css","restProps","hasScroll","setHasScroll","React","scrollContainerRef","columnsCss","useStickyColumnsCss","Box","event","newHasScroll"],"mappings":"wHAYO,MAAMA,EAET,CAAC,CAAE,SAAAC,EAAU,sBAAAC,EAAwB,EAAG,IAAAC,KAAQC,CAAU,IAAM,CAClE,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAkB,EAAK,EACzDC,EAAqBD,EAAM,OAAO,IAAI,EACtC,CAAE,WAAAE,CAAW,EAAIC,EACrBR,EACAM,CACF,EAUA,OACED,EAAA,cAACI,EAAA,CACC,SAVkBC,GAAyC,CAC7D,MAAMC,EACJD,EAAM,cAAc,YAAcA,EAAM,cAAc,YACpDC,IAAiBR,GACnBC,EAAaO,CAAY,CAE7B,EAKI,KAAK,YACL,IAAKL,EACL,IAAK,CACH,SAAU,OACV,GAAGC,EACH,CAAC,kBAAkBP,oBAAwCA,MACzD,CACE,GAAIG,GAAa,CACf,UAAW,qCACX,SAAU,0BACZ,CACF,EACF,OAAQ,CACN,GAAI,SACN,EACA,GAAGF,CACL,EACC,GAAGC,CAEHH,EAAAA,CACH,CAEJ"}
|
|
1
|
+
{"version":3,"file":"TableStickyColumnsContainer.js","sources":["../../../src/components/table/TableStickyColumnsContainer.tsx"],"sourcesContent":["import React from 'react'\n\nimport { CSS } from '~/stitches'\n\nimport { Box } from '../box'\nimport { useStickyColumnsCss } from './useStickyColumnsCss'\ninterface ITableStickyColumnsContainerProps {\n children: React.ReactNode\n numberOfStickyColumns?: number\n css?: CSS\n}\n\nexport const TableStickyColumnsContainer: React.FC<\n ITableStickyColumnsContainerProps\n> = ({ children, numberOfStickyColumns = 0, css, ...restProps }) => {\n const [hasScroll, setHasScroll] = React.useState<boolean>(false)\n const scrollContainerRef = React.useRef(null)\n const { columnsCss } = useStickyColumnsCss(\n numberOfStickyColumns,\n scrollContainerRef\n )\n\n const handleScroll = (event: React.UIEvent<HTMLDivElement>) => {\n const newHasScroll =\n event.currentTarget.scrollWidth > event.currentTarget.clientWidth\n if (newHasScroll !== hasScroll) {\n setHasScroll(newHasScroll)\n }\n }\n\n return (\n <Box\n onScroll={handleScroll}\n role=\"scrollbar\"\n ref={scrollContainerRef}\n css={{\n overflow: 'auto',\n maxWidth: '100%',\n ...columnsCss,\n [`& td:nth-child(${numberOfStickyColumns}), th:nth-child(${numberOfStickyColumns})`]:\n {\n ...(hasScroll && {\n boxShadow: '$colors$alpha200 -2px -3px 9px 1px',\n clipPath: 'inset(0px -10px 0px 0px)'\n })\n },\n '& td': {\n bg: 'inherit'\n },\n ...css\n }}\n {...restProps}\n >\n {children}\n </Box>\n )\n}\n"],"names":["TableStickyColumnsContainer","children","numberOfStickyColumns","css","restProps","hasScroll","setHasScroll","React","scrollContainerRef","columnsCss","useStickyColumnsCss","Box","event","newHasScroll"],"mappings":"wHAYO,MAAMA,EAET,CAAC,CAAE,SAAAC,EAAU,sBAAAC,EAAwB,EAAG,IAAAC,KAAQC,CAAU,IAAM,CAClE,KAAM,CAACC,EAAWC,CAAY,EAAIC,EAAM,SAAkB,EAAK,EACzDC,EAAqBD,EAAM,OAAO,IAAI,EACtC,CAAE,WAAAE,CAAW,EAAIC,EACrBR,EACAM,CACF,EAUA,OACED,EAAA,cAACI,EAAA,CACC,SAVkBC,GAAyC,CAC7D,MAAMC,EACJD,EAAM,cAAc,YAAcA,EAAM,cAAc,YACpDC,IAAiBR,GACnBC,EAAaO,CAAY,CAE7B,EAKI,KAAK,YACL,IAAKL,EACL,IAAK,CACH,SAAU,OACV,SAAU,OACV,GAAGC,EACH,CAAC,kBAAkBP,oBAAwCA,MACzD,CACE,GAAIG,GAAa,CACf,UAAW,qCACX,SAAU,0BACZ,CACF,EACF,OAAQ,CACN,GAAI,SACN,EACA,GAAGF,CACL,EACC,GAAGC,CAEHH,EAAAA,CACH,CAEJ"}
|