@traefik-labs/faency 13.2.0 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.cjs +24 -18
- package/dist/components/Accordion/Accordion.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.js +24 -18
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/AriaTable/AriaTable.cjs +47 -9
- package/dist/components/AriaTable/AriaTable.cjs.map +1 -1
- package/dist/components/AriaTable/AriaTable.js +48 -10
- package/dist/components/AriaTable/AriaTable.js.map +1 -1
- package/dist/components/Dialog/Dialog.cjs +4 -3
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.js +4 -3
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Navigation/Navigation.cjs +4 -1
- package/dist/components/Navigation/Navigation.cjs.map +1 -1
- package/dist/components/Navigation/Navigation.js +4 -1
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/RadioAccordion/RadioAccordion.cjs +10 -6
- package/dist/components/RadioAccordion/RadioAccordion.cjs.map +1 -1
- package/dist/components/RadioAccordion/RadioAccordion.js +10 -6
- package/dist/components/RadioAccordion/RadioAccordion.js.map +1 -1
- package/dist/components/RowLink/RowLink.cjs +95 -0
- package/dist/components/RowLink/RowLink.cjs.map +1 -0
- package/dist/components/RowLink/RowLink.js +90 -0
- package/dist/components/RowLink/RowLink.js.map +1 -0
- package/dist/components/SidePanel/SidePanel.cjs +3 -3
- package/dist/components/SidePanel/SidePanel.cjs.map +1 -1
- package/dist/components/SidePanel/SidePanel.js +3 -3
- package/dist/components/SidePanel/SidePanel.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.cjs +4 -0
- package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.js +4 -0
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.css.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.css.js.map +1 -1
- package/dist/components/Table/ExpandButton.cjs +18 -0
- package/dist/components/Table/ExpandButton.cjs.map +1 -0
- package/dist/components/Table/ExpandButton.js +19 -0
- package/dist/components/Table/ExpandButton.js.map +1 -0
- package/dist/components/Table/Table.cjs +39 -13
- package/dist/components/Table/Table.cjs.map +1 -1
- package/dist/components/Table/Table.js +40 -14
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/faency.css +6 -0
- package/dist/index.cjs +4 -0
- package/dist/index.d.ts +402 -3
- package/dist/index.js +2 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidePanel.js","names":[],"sources":["../../../components/SidePanel/SidePanel.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, keyframes, styled, VariantProps } from '../../stitches.config';\nimport { IconButton } from '../IconButton';\nimport { overlayStyles } from '../Overlay';\n\nconst fadeIn = keyframes({\n from: { opacity: '0' },\n to: { opacity: '1' },\n});\n\nconst fadeOut = keyframes({\n from: { opacity: '1' },\n to: { opacity: '0' },\n});\n\nconst SidePanelOverlay = styled(DialogPrimitive.Overlay, overlayStyles, {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n\n '&[data-state=\"open\"]': {\n animation: `${fadeIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${fadeOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n});\n\nconst slideIn = keyframes({\n from: { transform: '$$transformValue' },\n to: { transform: 'translate3d(0,0,0)' },\n});\n\nconst slideOut = keyframes({\n from: { transform: 'translate3d(0,0,0)' },\n to: { transform: '$$transformValue' },\n});\n\nconst StyledContent = styled(DialogPrimitive.Content, {\n backgroundColor: '$sidePanelBackground',\n boxShadow: 'inset 0 0 0 1px $colors$deepBlue4',\n position: 'fixed',\n top: 0,\n bottom: 0,\n width: 375,\n p: '$4',\n\n '&[data-state=\"open\"]': {\n animation: `${slideIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${slideOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n variants: {\n side: {\n top: {\n $$transformValue: 'translate3d(0,-100%,0)',\n width: '100%',\n height: 250,\n bottom: 'auto',\n },\n right: {\n $$transformValue: 'translate3d(100%,0,0)',\n right: 0,\n maxWidth: '50%',\n },\n bottom: {\n $$transformValue: 'translate3d(0,100%,0)',\n width: '100%',\n height: 250,\n bottom: 0,\n top: 'auto',\n },\n left: {\n $$transformValue: 'translate3d(-100%,0,0)',\n left: 0,\n maxWidth: '50%',\n },\n },\n },\n\n defaultVariants: {\n side: 'right',\n },\n});\n\nconst StyledCloseButton = styled(DialogPrimitive.Close, {\n position: 'absolute',\n top: '$2',\n right: '$2',\n cursor: 'pointer',\n});\n\ninterface SidePanelCloseButtonProps\n extends VariantProps<typeof IconButton
|
|
1
|
+
{"version":3,"file":"SidePanel.js","names":[],"sources":["../../../components/SidePanel/SidePanel.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport { VisuallyHidden } from '@radix-ui/react-visually-hidden';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, keyframes, styled, VariantProps } from '../../stitches.config';\nimport { IconButton } from '../IconButton';\nimport { overlayStyles } from '../Overlay';\n\nconst fadeIn = keyframes({\n from: { opacity: '0' },\n to: { opacity: '1' },\n});\n\nconst fadeOut = keyframes({\n from: { opacity: '1' },\n to: { opacity: '0' },\n});\n\nconst SidePanelOverlay = styled(DialogPrimitive.Overlay, overlayStyles, {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n\n '&[data-state=\"open\"]': {\n animation: `${fadeIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${fadeOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n});\n\nconst slideIn = keyframes({\n from: { transform: '$$transformValue' },\n to: { transform: 'translate3d(0,0,0)' },\n});\n\nconst slideOut = keyframes({\n from: { transform: 'translate3d(0,0,0)' },\n to: { transform: '$$transformValue' },\n});\n\nconst StyledContent = styled(DialogPrimitive.Content, {\n backgroundColor: '$sidePanelBackground',\n boxShadow: 'inset 0 0 0 1px $colors$deepBlue4',\n position: 'fixed',\n top: 0,\n bottom: 0,\n width: 375,\n p: '$4',\n\n '&[data-state=\"open\"]': {\n animation: `${slideIn} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n '&[data-state=\"closed\"]': {\n animation: `${slideOut} 150ms cubic-bezier(0.22, 1, 0.36, 1)`,\n },\n\n variants: {\n side: {\n top: {\n $$transformValue: 'translate3d(0,-100%,0)',\n width: '100%',\n height: 250,\n bottom: 'auto',\n },\n right: {\n $$transformValue: 'translate3d(100%,0,0)',\n right: 0,\n maxWidth: '50%',\n },\n bottom: {\n $$transformValue: 'translate3d(0,100%,0)',\n width: '100%',\n height: 250,\n bottom: 0,\n top: 'auto',\n },\n left: {\n $$transformValue: 'translate3d(-100%,0,0)',\n left: 0,\n maxWidth: '50%',\n },\n },\n },\n\n defaultVariants: {\n side: 'right',\n },\n});\n\nconst StyledCloseButton = styled(DialogPrimitive.Close, {\n position: 'absolute',\n top: '$2',\n right: '$2',\n cursor: 'pointer',\n});\n\ninterface SidePanelCloseButtonProps\n extends VariantProps<typeof IconButton>, ComponentProps<typeof IconButton> {}\n\nconst SidePanelCloseIconButton = React.forwardRef<\n React.ElementRef<typeof IconButton>,\n SidePanelCloseButtonProps\n>((props, forwardedRef) => (\n <StyledCloseButton asChild>\n <IconButton ref={forwardedRef} css={{ color: '$hiContrast' }} {...props}>\n <Cross1Icon aria-hidden />\n </IconButton>\n </StyledCloseButton>\n));\n\ntype SidePanelContentVariants = VariantProps<typeof StyledContent>;\ntype SidePanelContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;\ntype SidePanelProps = SidePanelContentPrimitiveProps &\n SidePanelContentVariants & {\n css?: CSS;\n description?: string;\n noOverlay?: boolean;\n noCloseIcon?: boolean;\n closeLabel?: string;\n open?: boolean;\n defaultOpen?: boolean;\n onOpenChange(open: boolean): void;\n };\n\nexport const SidePanel = React.forwardRef<React.ElementRef<typeof StyledContent>, SidePanelProps>(\n (\n {\n description,\n noOverlay = false,\n noCloseIcon = false,\n closeLabel = 'Close',\n children,\n onOpenChange,\n open = false,\n defaultOpen = false,\n ...props\n },\n forwardedRef,\n ) => (\n <DialogPrimitive.Root open={open} onOpenChange={onOpenChange} defaultOpen={defaultOpen}>\n <DialogPrimitive.Portal>\n {!noOverlay && <SidePanelOverlay />}\n <StyledContent {...props} ref={forwardedRef}>\n {description ? (\n <VisuallyHidden asChild>\n <DialogPrimitive.Description>{description}</DialogPrimitive.Description>\n </VisuallyHidden>\n ) : null}\n {children}\n {!noCloseIcon && <SidePanelCloseIconButton aria-label={closeLabel} />}\n </StyledContent>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n ),\n);\n"],"mappings":";;;;;;;;;AASA,IAAM,SAAS,UAAU;CACvB,MAAM,EAAE,SAAS,IAAI;CACrB,IAAI,EAAE,SAAS,IAAI;AACrB,CAAC;AAED,IAAM,UAAU,UAAU;CACxB,MAAM,EAAE,SAAS,IAAI;CACrB,IAAI,EAAE,SAAS,IAAI;AACrB,CAAC;AAED,IAAM,mBAAmB,OAAO,gBAAgB,SAAS,eAAe;CACtE,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CAEN,0BAAwB,EACtB,WAAW,GAAG,OAAO,uCACvB;CAEA,4BAA0B,EACxB,WAAW,GAAG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MAAjB;CAA4B;CAAoB;CAA2B;CACzE,UAAA,qBAAC,gBAAgB,QAAjB,EAAA,UAAA,CACG,CAAC,aAAa,oBAAC,kBAAD,CAAmB,CAAA,GAClC,qBAAC,eAAD;EAAe,GAAI;EAAO,KAAK;EAA/B,UAAA;GACG,cACC,oBAAC,gBAAD;IAAgB,SAAA;IACd,UAAA,oBAAC,gBAAgB,aAAjB,EAAA,UAA8B,YAAyC,CAAA;GACzD,CAAA,IACd;GACH;GACA,CAAC,eAAe,oBAAC,0BAAD,EAA0B,cAAY,WAAa,CAAA;EACvD;CACO,CAAA,CAAA,EAAA,CAAA;AACJ,CAAA,CAE1B"}
|
|
@@ -33,6 +33,10 @@ var Skeleton = require_stitches_config.styled("div", {
|
|
|
33
33
|
right: 0,
|
|
34
34
|
top: 0
|
|
35
35
|
},
|
|
36
|
+
"@motion": { "&::after": {
|
|
37
|
+
animation: "none",
|
|
38
|
+
opacity: 0
|
|
39
|
+
} },
|
|
36
40
|
variants: { variant: {
|
|
37
41
|
square: { borderRadius: "$2" },
|
|
38
42
|
circle: { borderRadius: "$round" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.cjs","names":["keyframes","styled"],"sources":["../../../components/Skeleton/Skeleton.tsx"],"sourcesContent":["import { keyframes, styled, VariantProps } from '../../stitches.config';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: '100%' },\n});\n\nexport const Skeleton = styled('div', {\n backgroundColor: '$skeletonBackground',\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n '&:not(:empty)': {\n '& > *': {\n visibility: 'hidden',\n display: 'block',\n },\n maxWidth: 'fit-content',\n },\n\n '&::after': {\n animationName: `${pulse}`,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: '$skeletonAnimation',\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n\n variants: {\n variant: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '$round',\n },\n badge: {\n borderRadius: '$pill',\n display: 'inline-flex',\n },\n button: {\n borderRadius: '$3',\n display: 'inline-flex',\n },\n text: {\n '&:empty:before': {\n content: '\"\\\\00a0\"', // adds a space character before element\n },\n },\n },\n },\n defaultVariants: {\n variant: 'text',\n },\n});\n\nexport type SkeletonVariants = VariantProps<typeof Skeleton>;\nexport type SkeletonProps = SkeletonVariants & NonNullable<unknown>;\n"],"mappings":";;AAEA,IAAM,QAAQA,wBAAAA,UAAU;CACtB,MAAM,EAAE,SAAS,EAAE;CACnB,QAAQ,EAAE,SAAS,OAAO;AAC5B,CAAC;AAED,IAAa,WAAWC,wBAAAA,OAAO,OAAO;CACpC,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,cAAc;CACd,QAAQ;CACR,OAAO;CACP,iBAAiB;EACf,SAAS;GACP,YAAY;GACZ,SAAS;EACX;EACA,UAAU;CACZ;CAEA,YAAY;EACV,eAAe,GAAG;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,yBAAyB;EACzB,yBAAyB;EACzB,iBAAiB;EACjB,cAAc;EACd,QAAQ;EACR,SAAS;EACT,MAAM;EACN,UAAU;EACV,OAAO;EACP,KAAK;CACP;CAEA,UAAU,EACR,SAAS;EACP,QAAQ,EACN,cAAc,KAChB;EACA,QAAQ,EACN,cAAc,SAChB;EACA,OAAO;GACL,cAAc;GACd,SAAS;EACX;EACA,QAAQ;GACN,cAAc;GACd,SAAS;EACX;EACA,MAAM,EACJ,kBAAkB,EAChB,SAAS,aACX,EACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Skeleton.cjs","names":["keyframes","styled"],"sources":["../../../components/Skeleton/Skeleton.tsx"],"sourcesContent":["import { keyframes, styled, VariantProps } from '../../stitches.config';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: '100%' },\n});\n\nexport const Skeleton = styled('div', {\n backgroundColor: '$skeletonBackground',\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n '&:not(:empty)': {\n '& > *': {\n visibility: 'hidden',\n display: 'block',\n },\n maxWidth: 'fit-content',\n },\n\n '&::after': {\n animationName: `${pulse}`,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: '$skeletonAnimation',\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n\n '@motion': {\n '&::after': {\n animation: 'none',\n opacity: 0,\n },\n },\n\n variants: {\n variant: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '$round',\n },\n badge: {\n borderRadius: '$pill',\n display: 'inline-flex',\n },\n button: {\n borderRadius: '$3',\n display: 'inline-flex',\n },\n text: {\n '&:empty:before': {\n content: '\"\\\\00a0\"', // adds a space character before element\n },\n },\n },\n },\n defaultVariants: {\n variant: 'text',\n },\n});\n\nexport type SkeletonVariants = VariantProps<typeof Skeleton>;\nexport type SkeletonProps = SkeletonVariants & NonNullable<unknown>;\n"],"mappings":";;AAEA,IAAM,QAAQA,wBAAAA,UAAU;CACtB,MAAM,EAAE,SAAS,EAAE;CACnB,QAAQ,EAAE,SAAS,OAAO;AAC5B,CAAC;AAED,IAAa,WAAWC,wBAAAA,OAAO,OAAO;CACpC,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,cAAc;CACd,QAAQ;CACR,OAAO;CACP,iBAAiB;EACf,SAAS;GACP,YAAY;GACZ,SAAS;EACX;EACA,UAAU;CACZ;CAEA,YAAY;EACV,eAAe,GAAG;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,yBAAyB;EACzB,yBAAyB;EACzB,iBAAiB;EACjB,cAAc;EACd,QAAQ;EACR,SAAS;EACT,MAAM;EACN,UAAU;EACV,OAAO;EACP,KAAK;CACP;CAEA,WAAW,EACT,YAAY;EACV,WAAW;EACX,SAAS;CACX,EACF;CAEA,UAAU,EACR,SAAS;EACP,QAAQ,EACN,cAAc,KAChB;EACA,QAAQ,EACN,cAAc,SAChB;EACA,OAAO;GACL,cAAc;GACd,SAAS;EACX;EACA,QAAQ;GACN,cAAc;GACd,SAAS;EACX;EACA,MAAM,EACJ,kBAAkB,EAChB,SAAS,aACX,EACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.js","names":[],"sources":["../../../components/Skeleton/Skeleton.tsx"],"sourcesContent":["import { keyframes, styled, VariantProps } from '../../stitches.config';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: '100%' },\n});\n\nexport const Skeleton = styled('div', {\n backgroundColor: '$skeletonBackground',\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n '&:not(:empty)': {\n '& > *': {\n visibility: 'hidden',\n display: 'block',\n },\n maxWidth: 'fit-content',\n },\n\n '&::after': {\n animationName: `${pulse}`,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: '$skeletonAnimation',\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n\n variants: {\n variant: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '$round',\n },\n badge: {\n borderRadius: '$pill',\n display: 'inline-flex',\n },\n button: {\n borderRadius: '$3',\n display: 'inline-flex',\n },\n text: {\n '&:empty:before': {\n content: '\"\\\\00a0\"', // adds a space character before element\n },\n },\n },\n },\n defaultVariants: {\n variant: 'text',\n },\n});\n\nexport type SkeletonVariants = VariantProps<typeof Skeleton>;\nexport type SkeletonProps = SkeletonVariants & NonNullable<unknown>;\n"],"mappings":";;AAEA,IAAM,QAAQ,UAAU;CACtB,MAAM,EAAE,SAAS,EAAE;CACnB,QAAQ,EAAE,SAAS,OAAO;AAC5B,CAAC;AAED,IAAa,WAAW,OAAO,OAAO;CACpC,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,cAAc;CACd,QAAQ;CACR,OAAO;CACP,iBAAiB;EACf,SAAS;GACP,YAAY;GACZ,SAAS;EACX;EACA,UAAU;CACZ;CAEA,YAAY;EACV,eAAe,GAAG;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,yBAAyB;EACzB,yBAAyB;EACzB,iBAAiB;EACjB,cAAc;EACd,QAAQ;EACR,SAAS;EACT,MAAM;EACN,UAAU;EACV,OAAO;EACP,KAAK;CACP;CAEA,UAAU,EACR,SAAS;EACP,QAAQ,EACN,cAAc,KAChB;EACA,QAAQ,EACN,cAAc,SAChB;EACA,OAAO;GACL,cAAc;GACd,SAAS;EACX;EACA,QAAQ;GACN,cAAc;GACd,SAAS;EACX;EACA,MAAM,EACJ,kBAAkB,EAChB,SAAS,aACX,EACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Skeleton.js","names":[],"sources":["../../../components/Skeleton/Skeleton.tsx"],"sourcesContent":["import { keyframes, styled, VariantProps } from '../../stitches.config';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: '100%' },\n});\n\nexport const Skeleton = styled('div', {\n backgroundColor: '$skeletonBackground',\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n '&:not(:empty)': {\n '& > *': {\n visibility: 'hidden',\n display: 'block',\n },\n maxWidth: 'fit-content',\n },\n\n '&::after': {\n animationName: `${pulse}`,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: '$skeletonAnimation',\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n\n '@motion': {\n '&::after': {\n animation: 'none',\n opacity: 0,\n },\n },\n\n variants: {\n variant: {\n square: {\n borderRadius: '$2',\n },\n circle: {\n borderRadius: '$round',\n },\n badge: {\n borderRadius: '$pill',\n display: 'inline-flex',\n },\n button: {\n borderRadius: '$3',\n display: 'inline-flex',\n },\n text: {\n '&:empty:before': {\n content: '\"\\\\00a0\"', // adds a space character before element\n },\n },\n },\n },\n defaultVariants: {\n variant: 'text',\n },\n});\n\nexport type SkeletonVariants = VariantProps<typeof Skeleton>;\nexport type SkeletonProps = SkeletonVariants & NonNullable<unknown>;\n"],"mappings":";;AAEA,IAAM,QAAQ,UAAU;CACtB,MAAM,EAAE,SAAS,EAAE;CACnB,QAAQ,EAAE,SAAS,OAAO;AAC5B,CAAC;AAED,IAAa,WAAW,OAAO,OAAO;CACpC,iBAAiB;CACjB,UAAU;CACV,UAAU;CACV,cAAc;CACd,QAAQ;CACR,OAAO;CACP,iBAAiB;EACf,SAAS;GACP,YAAY;GACZ,SAAS;EACX;EACA,UAAU;CACZ;CAEA,YAAY;EACV,eAAe,GAAG;EAClB,mBAAmB;EACnB,oBAAoB;EACpB,yBAAyB;EACzB,yBAAyB;EACzB,iBAAiB;EACjB,cAAc;EACd,QAAQ;EACR,SAAS;EACT,MAAM;EACN,UAAU;EACV,OAAO;EACP,KAAK;CACP;CAEA,WAAW,EACT,YAAY;EACV,WAAW;EACX,SAAS;CACX,EACF;CAEA,UAAU,EACR,SAAS;EACP,QAAQ,EACN,cAAc,KAChB;EACA,QAAQ,EACN,cAAc,SAChB;EACA,OAAO;GACL,cAAc;GACd,SAAS;EACX;EACA,QAAQ;GACN,cAAc;GACd,SAAS;EACX;EACA,MAAM,EACJ,kBAAkB,EAChB,SAAS,aACX,EACF;CACF,EACF;CACA,iBAAiB,EACf,SAAS,OACX;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.vanilla.css.cjs","names":["_7a468"],"sources":["../../../components/Skeleton/Skeleton.vanilla.css.ts"],"sourcesContent":["import { globalStyle, keyframes, style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { tokens } from '../../styles/tokens.css';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: 1 },\n});\n\nconst skeletonBase = style({\n backgroundColor: tokens.colors.skeletonBackground,\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n\n selectors: {\n '&:not(:empty)': {\n maxWidth: 'fit-content',\n },\n },\n\n '::after': {\n animationName: pulse,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: tokens.colors.skeletonAnimation,\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n});\n\n// Global styles for child elements inside skeleton\nglobalStyle(`${skeletonBase}:not(:empty) > *`, {\n visibility: 'hidden',\n display: 'block',\n});\n\nexport const skeletonRecipe = recipe({\n base: skeletonBase,\n\n variants: {\n variant: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: tokens.radii.round,\n },\n badge: {\n borderRadius: tokens.radii.pill,\n display: 'inline-flex',\n },\n button: {\n borderRadius: tokens.radii['3'],\n display: 'inline-flex',\n },\n text: {\n selectors: {\n '&:empty::before': {\n content: '\"\\\\00a0\"',\n },\n },\n },\n },\n },\n\n defaultVariants: {\n variant: 'text',\n },\n});\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Skeleton.vanilla.css.cjs","names":["_7a468"],"sources":["../../../components/Skeleton/Skeleton.vanilla.css.ts"],"sourcesContent":["import { globalStyle, keyframes, style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { breakpoints } from '../../styles/breakpoints.css';\nimport { tokens } from '../../styles/tokens.css';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: 1 },\n});\n\nconst skeletonBase = style({\n backgroundColor: tokens.colors.skeletonBackground,\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n\n selectors: {\n '&:not(:empty)': {\n maxWidth: 'fit-content',\n },\n },\n\n '::after': {\n animationName: pulse,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: tokens.colors.skeletonAnimation,\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n});\n\nglobalStyle(`${skeletonBase}::after`, {\n '@media': {\n [breakpoints.motion]: {\n animation: 'none',\n opacity: 0,\n },\n },\n});\n\n// Global styles for child elements inside skeleton\nglobalStyle(`${skeletonBase}:not(:empty) > *`, {\n visibility: 'hidden',\n display: 'block',\n});\n\nexport const skeletonRecipe = recipe({\n base: skeletonBase,\n\n variants: {\n variant: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: tokens.radii.round,\n },\n badge: {\n borderRadius: tokens.radii.pill,\n display: 'inline-flex',\n },\n button: {\n borderRadius: tokens.radii['3'],\n display: 'inline-flex',\n },\n text: {\n selectors: {\n '&:empty::before': {\n content: '\"\\\\00a0\"',\n },\n },\n },\n },\n },\n\n defaultVariants: {\n variant: 'text',\n },\n});\n"],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Skeleton.vanilla.css.js","names":["_7a468"],"sources":["../../../components/Skeleton/Skeleton.vanilla.css.ts"],"sourcesContent":["import { globalStyle, keyframes, style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { tokens } from '../../styles/tokens.css';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: 1 },\n});\n\nconst skeletonBase = style({\n backgroundColor: tokens.colors.skeletonBackground,\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n\n selectors: {\n '&:not(:empty)': {\n maxWidth: 'fit-content',\n },\n },\n\n '::after': {\n animationName: pulse,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: tokens.colors.skeletonAnimation,\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n});\n\n// Global styles for child elements inside skeleton\nglobalStyle(`${skeletonBase}:not(:empty) > *`, {\n visibility: 'hidden',\n display: 'block',\n});\n\nexport const skeletonRecipe = recipe({\n base: skeletonBase,\n\n variants: {\n variant: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: tokens.radii.round,\n },\n badge: {\n borderRadius: tokens.radii.pill,\n display: 'inline-flex',\n },\n button: {\n borderRadius: tokens.radii['3'],\n display: 'inline-flex',\n },\n text: {\n selectors: {\n '&:empty::before': {\n content: '\"\\\\00a0\"',\n },\n },\n },\n },\n },\n\n defaultVariants: {\n variant: 'text',\n },\n});\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"Skeleton.vanilla.css.js","names":["_7a468"],"sources":["../../../components/Skeleton/Skeleton.vanilla.css.ts"],"sourcesContent":["import { globalStyle, keyframes, style } from '@vanilla-extract/css';\nimport { recipe } from '@vanilla-extract/recipes';\n\nimport { breakpoints } from '../../styles/breakpoints.css';\nimport { tokens } from '../../styles/tokens.css';\n\nconst pulse = keyframes({\n '0%': { opacity: 0 },\n '100%': { opacity: 1 },\n});\n\nconst skeletonBase = style({\n backgroundColor: tokens.colors.skeletonBackground,\n position: 'relative',\n overflow: 'hidden',\n borderRadius: '3px',\n height: 'auto',\n width: 'auto',\n\n selectors: {\n '&:not(:empty)': {\n maxWidth: 'fit-content',\n },\n },\n\n '::after': {\n animationName: pulse,\n animationDuration: '500ms',\n animationDirection: 'alternate',\n animationIterationCount: 'infinite',\n animationTimingFunction: 'ease-in-out',\n backgroundColor: tokens.colors.skeletonAnimation,\n borderRadius: 'inherit',\n bottom: 0,\n content: '\"\"',\n left: 0,\n position: 'absolute',\n right: 0,\n top: 0,\n },\n});\n\nglobalStyle(`${skeletonBase}::after`, {\n '@media': {\n [breakpoints.motion]: {\n animation: 'none',\n opacity: 0,\n },\n },\n});\n\n// Global styles for child elements inside skeleton\nglobalStyle(`${skeletonBase}:not(:empty) > *`, {\n visibility: 'hidden',\n display: 'block',\n});\n\nexport const skeletonRecipe = recipe({\n base: skeletonBase,\n\n variants: {\n variant: {\n square: {\n borderRadius: tokens.radii['2'],\n },\n circle: {\n borderRadius: tokens.radii.round,\n },\n badge: {\n borderRadius: tokens.radii.pill,\n display: 'inline-flex',\n },\n button: {\n borderRadius: tokens.radii['3'],\n display: 'inline-flex',\n },\n text: {\n selectors: {\n '&:empty::before': {\n content: '\"\\\\00a0\"',\n },\n },\n },\n },\n },\n\n defaultVariants: {\n variant: 'text',\n },\n});\n"],"mappings":""}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// components/Table/ExpandButton.tsx
|
|
2
|
+
var ExpandButton = require("../../stitches.config.cjs").styled("button", {
|
|
3
|
+
all: "unset",
|
|
4
|
+
display: "inline-flex",
|
|
5
|
+
alignItems: "center",
|
|
6
|
+
justifyContent: "center",
|
|
7
|
+
borderRadius: "$1",
|
|
8
|
+
cursor: "pointer",
|
|
9
|
+
"&:focus-visible": {
|
|
10
|
+
outlineWidth: "2px",
|
|
11
|
+
outlineStyle: "solid",
|
|
12
|
+
outlineColor: "$focusOutline",
|
|
13
|
+
outlineOffset: "2px"
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
exports.ExpandButton = ExpandButton;
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=ExpandButton.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandButton.cjs","names":["styled"],"sources":["../../../components/Table/ExpandButton.tsx"],"sourcesContent":["import { styled } from '../../stitches.config';\n\nexport const ExpandButton = styled('button', {\n all: 'unset',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '$1',\n cursor: 'pointer',\n '&:focus-visible': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: '$focusOutline',\n outlineOffset: '2px',\n },\n});\n"],"mappings":";AAEA,IAAa,e,mCAAeA,CAAAA,CAAAA,OAAO,UAAU;CAC3C,KAAK;CACL,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,cAAc;CACd,QAAQ;CACR,mBAAmB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,eAAe;CACjB;AACF,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { styled } from "../../stitches.config.js";
|
|
2
|
+
// components/Table/ExpandButton.tsx
|
|
3
|
+
var ExpandButton = styled("button", {
|
|
4
|
+
all: "unset",
|
|
5
|
+
display: "inline-flex",
|
|
6
|
+
alignItems: "center",
|
|
7
|
+
justifyContent: "center",
|
|
8
|
+
borderRadius: "$1",
|
|
9
|
+
cursor: "pointer",
|
|
10
|
+
"&:focus-visible": {
|
|
11
|
+
outlineWidth: "2px",
|
|
12
|
+
outlineStyle: "solid",
|
|
13
|
+
outlineColor: "$focusOutline",
|
|
14
|
+
outlineOffset: "2px"
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { ExpandButton };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=ExpandButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ExpandButton.js","names":[],"sources":["../../../components/Table/ExpandButton.tsx"],"sourcesContent":["import { styled } from '../../stitches.config';\n\nexport const ExpandButton = styled('button', {\n all: 'unset',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '$1',\n cursor: 'pointer',\n '&:focus-visible': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: '$focusOutline',\n outlineOffset: '2px',\n },\n});\n"],"mappings":";;AAEA,IAAa,eAAe,OAAO,UAAU;CAC3C,KAAK;CACL,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,cAAc;CACd,QAAQ;CACR,mBAAmB;EACjB,cAAc;EACd,cAAc;EACd,cAAc;EACd,eAAe;CACjB;AACF,CAAC"}
|
|
@@ -2,9 +2,11 @@ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
|
|
|
2
2
|
const require_stitches_config = require("../../stitches.config.cjs");
|
|
3
3
|
const require_Box = require("../Box/Box.cjs");
|
|
4
4
|
const require_Elevation = require("../Elevation/Elevation.cjs");
|
|
5
|
+
const require_RowLink = require("../RowLink/RowLink.cjs");
|
|
5
6
|
const require_Flex = require("../Flex/Flex.cjs");
|
|
6
7
|
const require_Text = require("../Text/Text.cjs");
|
|
7
8
|
const require_Label = require("../Label/Label.cjs");
|
|
9
|
+
const require_ExpandButton = require("./ExpandButton.cjs");
|
|
8
10
|
let _radix_ui_react_icons = require("@radix-ui/react-icons");
|
|
9
11
|
let react = require("react");
|
|
10
12
|
react = require_runtime.__toESM(react, 1);
|
|
@@ -59,7 +61,7 @@ var Td = require_stitches_config.styled("td", {
|
|
|
59
61
|
},
|
|
60
62
|
defaultVariants: { align: "start" }
|
|
61
63
|
});
|
|
62
|
-
var StyledTr = require_stitches_config.styled("tr", {
|
|
64
|
+
var StyledTr = require_stitches_config.styled("tr", require_RowLink.rowLinkRowStyles, {
|
|
63
65
|
verticalAlign: "inherit",
|
|
64
66
|
"&:hover": { color: "$tableHoverText" },
|
|
65
67
|
[`&:last-child > ${Td}`]: { borderBottom: "none" },
|
|
@@ -80,9 +82,10 @@ var StyledTr = require_stitches_config.styled("tr", {
|
|
|
80
82
|
css: { "&:hover": { color: "$tableActiveHoverText" } }
|
|
81
83
|
}]
|
|
82
84
|
});
|
|
83
|
-
var AnimatedTr = ({ collapsedContentColSpan, isOpen, children }) => {
|
|
84
|
-
const appliedStyle = (0, react.useMemo)(() => isOpen ? { transition: "padding 0.2s ease-out" } : {
|
|
85
|
-
transition: "padding 0.2s ease-out",
|
|
85
|
+
var AnimatedTr = ({ id, collapsedContentColSpan, isOpen, children }) => {
|
|
86
|
+
const appliedStyle = (0, react.useMemo)(() => isOpen ? { transition: "padding 0.2s ease-out, visibility 0s" } : {
|
|
87
|
+
transition: "padding 0.2s ease-out, visibility 0s 0.2s",
|
|
88
|
+
visibility: "hidden",
|
|
86
89
|
lineHeight: 0,
|
|
87
90
|
fontSize: 0,
|
|
88
91
|
padding: "0px 16px",
|
|
@@ -94,6 +97,7 @@ var AnimatedTr = ({ collapsedContentColSpan, isOpen, children }) => {
|
|
|
94
97
|
overflow: "hidden"
|
|
95
98
|
}, [isOpen]);
|
|
96
99
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Tr, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Td, {
|
|
100
|
+
id,
|
|
97
101
|
colSpan: collapsedContentColSpan,
|
|
98
102
|
css: appliedStyle,
|
|
99
103
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Box.Box, {
|
|
@@ -102,14 +106,16 @@ var AnimatedTr = ({ collapsedContentColSpan, isOpen, children }) => {
|
|
|
102
106
|
})
|
|
103
107
|
}) });
|
|
104
108
|
};
|
|
105
|
-
var Tr = (0, react.forwardRef)(({ children, collapsedContent, emptyFirstColumn = false, tableHead = false, collapsedContentColSpan = 1, css, ...props }, ref) => {
|
|
109
|
+
var Tr = (0, react.forwardRef)(({ children, collapsedContent, expandLabel = "Expand row", emptyFirstColumn = false, tableHead = false, collapsedContentColSpan = 1, css, href, linkAs, linkCell, linkProps, interactive, ...props }, ref) => {
|
|
106
110
|
const [isCollapsed, setIsCollapsed] = (0, react.useState)(false);
|
|
111
|
+
const contentId = (0, react.useId)();
|
|
107
112
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledTr, {
|
|
108
113
|
ref,
|
|
109
114
|
css: !!collapsedContent && !isCollapsed ? {
|
|
110
115
|
...css,
|
|
111
116
|
[`&:nth-last-child(2) > ${Td}`]: { borderBottom: "none" }
|
|
112
117
|
} : { ...css },
|
|
118
|
+
interactive: interactive ?? (href !== void 0 || void 0),
|
|
113
119
|
...props,
|
|
114
120
|
children: [
|
|
115
121
|
emptyFirstColumn ? tableHead ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Th, { css: { width: 24 } }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Td, {}) : null,
|
|
@@ -123,20 +129,40 @@ var Tr = (0, react.forwardRef)(({ children, collapsedContent, emptyFirstColumn =
|
|
|
123
129
|
align: "center",
|
|
124
130
|
justify: "center",
|
|
125
131
|
css: {
|
|
132
|
+
position: "relative",
|
|
133
|
+
zIndex: 2,
|
|
126
134
|
height: "40px",
|
|
127
135
|
"&:hover": { color: "$tableActiveText" }
|
|
128
136
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
137
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_ExpandButton.ExpandButton, {
|
|
138
|
+
type: "button",
|
|
139
|
+
css: {
|
|
140
|
+
width: "100%",
|
|
141
|
+
height: "100%"
|
|
142
|
+
},
|
|
143
|
+
"aria-label": expandLabel,
|
|
144
|
+
"aria-expanded": isCollapsed,
|
|
145
|
+
"aria-controls": contentId,
|
|
146
|
+
onClick: () => setIsCollapsed(!isCollapsed),
|
|
147
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_icons.ChevronRightIcon, {
|
|
148
|
+
"aria-hidden": true,
|
|
149
|
+
style: {
|
|
150
|
+
transition: "transform 0.2s ease-out",
|
|
151
|
+
transform: isCollapsed ? "rotate(90deg)" : "initial"
|
|
152
|
+
}
|
|
153
|
+
})
|
|
154
|
+
})
|
|
135
155
|
})
|
|
136
156
|
}),
|
|
137
|
-
children
|
|
157
|
+
require_RowLink.withRowLink(children, {
|
|
158
|
+
href,
|
|
159
|
+
linkAs,
|
|
160
|
+
linkCell,
|
|
161
|
+
linkProps
|
|
162
|
+
}, Td)
|
|
138
163
|
]
|
|
139
164
|
}), !!collapsedContent && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(AnimatedTr, {
|
|
165
|
+
id: contentId,
|
|
140
166
|
isOpen: isCollapsed,
|
|
141
167
|
collapsedContentColSpan,
|
|
142
168
|
children: collapsedContent
|
|
@@ -181,7 +207,7 @@ var Thead = require_stitches_config.styled("thead", {
|
|
|
181
207
|
fontWeight: "$light"
|
|
182
208
|
}
|
|
183
209
|
});
|
|
184
|
-
var Table = require_stitches_config.styled("table", {
|
|
210
|
+
var Table = require_stitches_config.styled("table", require_RowLink.rowLinkTableStyles, {
|
|
185
211
|
width: "100%",
|
|
186
212
|
tableLayout: "fixed",
|
|
187
213
|
boxSizing: "border-box",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.cjs","names":["styled","Text","Label","useMemo","Box","forwardRef","useState","_Fragment","Flex","ChevronRightIcon","elevationVariants"],"sources":["../../../components/Table/Table.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport React, { ComponentProps, ElementRef, forwardRef, ReactNode, useMemo, useState } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\nimport { Label } from '../Label';\nimport { Text } from '../Text';\n\nexport const Caption = styled('caption', Text, {\n display: 'table-caption',\n textAlign: 'start',\n fontVariantNumeric: 'proportional-nums',\n fontWeight: '$medium',\n lineHeight: '1.25',\n});\n\nexport const Tbody = styled('tbody', {\n width: '100%',\n verticalAlign: 'middle',\n});\n\nexport const Th = styled('th', Label, {\n // override Label\n display: 'table-cell',\n verticalAlign: 'inherit',\n\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n\n textAlign: 'start',\n p: '$2 $3',\n borderBottom: '1px solid $tableRowBorder',\n\n variants: {\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n transform: {\n capitalize: {\n display: 'table-cell', // revert Label enforced value\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const Td = styled('td', {\n boxSizing: 'border-box',\n p: '$5 $3',\n borderBottom: '1px solid $tableRowBorder',\n fontSize: '$3',\n lineHeight: '16px',\n verticalAlign: 'inherit',\n variants: {\n subtle: {\n true: {\n fontWeight: '$regular',\n color: '$tableSubtleText',\n },\n },\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const StyledTr = styled('tr', {\n verticalAlign: 'inherit',\n '&:hover': {\n color: '$tableHoverText',\n },\n [`&:last-child > ${Td}`]: {\n borderBottom: 'none',\n },\n\n variants: {\n interactive: {\n true: {\n '&:hover': {\n backgroundColor: '$tableHoverBackground',\n cursor: 'pointer',\n },\n },\n },\n active: {\n true: {\n backgroundColor: '$tableHoverBackground',\n color: '$tableActiveText',\n fontWeight: '$semiBold',\n },\n },\n },\n compoundVariants: [\n {\n interactive: true,\n active: true,\n css: {\n '&:hover': {\n color: '$tableActiveHoverText',\n },\n },\n },\n ],\n});\n\nconst AnimatedTr = ({\n collapsedContentColSpan,\n isOpen,\n children,\n}: {\n collapsedContentColSpan: number;\n isOpen: boolean;\n children: ReactNode;\n}) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'padding 0.2s ease-out' }\n : {\n transition: 'padding 0.2s ease-out',\n lineHeight: 0,\n fontSize: 0,\n padding: '0px 16px',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'all 0.2s ease-out' }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n },\n [isOpen],\n );\n\n return (\n <Tr>\n <Td colSpan={collapsedContentColSpan} css={appliedStyle}>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </Tr>\n );\n};\nexport type TrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n children: React.ReactNode;\n collapsedContent?: React.ReactNode;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n collapsedContentColSpan?: number;\n };\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, TrProps>(\n (\n {\n children,\n collapsedContent,\n emptyFirstColumn = false,\n tableHead = false,\n collapsedContentColSpan = 1,\n css,\n ...props\n },\n ref,\n ) => {\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n return (\n <>\n <StyledTr\n ref={ref}\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > ${Td}`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n {...props}\n >\n {emptyFirstColumn ? tableHead ? <Th css={{ width: 24 }} /> : <Td /> : null}\n {!!collapsedContent && (\n <Td\n css={{ padding: '0 0 0 $3' }}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n height: '40px',\n '&:hover': {\n color: '$tableActiveText',\n },\n }}\n onClick={() => setIsCollapsed(!isCollapsed)}\n >\n <ChevronRightIcon\n style={{\n cursor: 'pointer',\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </Flex>\n </Td>\n )}\n {children}\n </StyledTr>\n {!!collapsedContent && (\n <AnimatedTr isOpen={isCollapsed} collapsedContentColSpan={collapsedContentColSpan}>\n {collapsedContent}\n </AnimatedTr>\n )}\n </>\n );\n },\n);\n\nexport const Tfoot = styled('tfoot', {\n verticalAlign: 'middle',\n position: 'relative',\n borderRadius: 'inherit',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableFooterLayerBackground',\n borderRadius: 'inherit',\n },\n\n [`& ${Td}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n p: '$2 $3',\n },\n});\n\nexport const Thead = styled('thead', {\n position: 'relative',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n verticalAlign: 'middle',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableHeaderLayerBackground',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n },\n\n [`& ${Th}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n },\n});\n\nexport const Table = styled('table', {\n width: '100%',\n tableLayout: 'fixed',\n boxSizing: 'border-box',\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$rubik',\n color: '$tableText',\n borderRadius: '$3',\n overflow: 'hidden',\n [`& ${Tbody}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n [`& ${Td}`]: {\n borderTop: '1px solid $tableRowBorder',\n },\n },\n [`& ${Thead}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 1,\n },\n});\n\nexport type TableVariants = VariantProps<typeof Table>;\nexport type TableProps = TableVariants & NonNullable<unknown>;\n"],"mappings":";;;;;;;;;;;;AAUA,IAAa,UAAUA,wBAAAA,OAAO,WAAWC,aAAAA,MAAM;CAC7C,SAAS;CACT,WAAW;CACX,oBAAoB;CACpB,YAAY;CACZ,YAAY;AACd,CAAC;AAED,IAAa,QAAQD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UAAU;EACrC,qBAAqB;EACrB,sBAAsB;CACxB;CAEA,UAAU,EACR,WAAWU,kBAAAA,kBACb;CACA,iBAAiB,EACf,WAAW,EACb;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Table.cjs","names":["styled","Text","Label","rowLinkRowStyles","useMemo","Box","forwardRef","useState","useId","_Fragment","Flex","ExpandButton","ChevronRightIcon","withRowLink","rowLinkTableStyles","elevationVariants"],"sources":["../../../components/Table/Table.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport React, {\n ComponentProps,\n ElementRef,\n forwardRef,\n ReactNode,\n useId,\n useMemo,\n useState,\n} from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\nimport { Label } from '../Label';\nimport {\n ROW_LINK_CONTROL_Z_INDEX,\n rowLinkRowStyles,\n RowLinkShortcutProps,\n rowLinkTableStyles,\n withRowLink,\n} from '../RowLink';\nimport { Text } from '../Text';\nimport { ExpandButton } from './ExpandButton';\n\nexport const Caption = styled('caption', Text, {\n display: 'table-caption',\n textAlign: 'start',\n fontVariantNumeric: 'proportional-nums',\n fontWeight: '$medium',\n lineHeight: '1.25',\n});\n\nexport const Tbody = styled('tbody', {\n width: '100%',\n verticalAlign: 'middle',\n});\n\nexport const Th = styled('th', Label, {\n // override Label\n display: 'table-cell',\n verticalAlign: 'inherit',\n\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n\n textAlign: 'start',\n p: '$2 $3',\n borderBottom: '1px solid $tableRowBorder',\n\n variants: {\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n transform: {\n capitalize: {\n display: 'table-cell', // revert Label enforced value\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const Td = styled('td', {\n boxSizing: 'border-box',\n p: '$5 $3',\n borderBottom: '1px solid $tableRowBorder',\n fontSize: '$3',\n lineHeight: '16px',\n verticalAlign: 'inherit',\n variants: {\n subtle: {\n true: {\n fontWeight: '$regular',\n color: '$tableSubtleText',\n },\n },\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const StyledTr = styled('tr', rowLinkRowStyles, {\n verticalAlign: 'inherit',\n '&:hover': {\n color: '$tableHoverText',\n },\n [`&:last-child > ${Td}`]: {\n borderBottom: 'none',\n },\n\n variants: {\n interactive: {\n true: {\n '&:hover': {\n backgroundColor: '$tableHoverBackground',\n cursor: 'pointer',\n },\n },\n },\n active: {\n true: {\n backgroundColor: '$tableHoverBackground',\n color: '$tableActiveText',\n fontWeight: '$semiBold',\n },\n },\n },\n compoundVariants: [\n {\n interactive: true,\n active: true,\n css: {\n '&:hover': {\n color: '$tableActiveHoverText',\n },\n },\n },\n ],\n});\n\nconst AnimatedTr = ({\n id,\n collapsedContentColSpan,\n isOpen,\n children,\n}: {\n id: string;\n collapsedContentColSpan: number;\n isOpen: boolean;\n children: ReactNode;\n}) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'padding 0.2s ease-out, visibility 0s' }\n : {\n transition: 'padding 0.2s ease-out, visibility 0s 0.2s',\n visibility: 'hidden',\n lineHeight: 0,\n fontSize: 0,\n padding: '0px 16px',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'all 0.2s ease-out' }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n },\n [isOpen],\n );\n\n return (\n <Tr>\n <Td id={id} colSpan={collapsedContentColSpan} css={appliedStyle}>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </Tr>\n );\n};\nexport type TrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n children: React.ReactNode;\n collapsedContent?: React.ReactNode;\n expandLabel?: string;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n collapsedContentColSpan?: number;\n } & RowLinkShortcutProps;\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, TrProps>(\n (\n {\n children,\n collapsedContent,\n expandLabel = 'Expand row',\n emptyFirstColumn = false,\n tableHead = false,\n collapsedContentColSpan = 1,\n css,\n href,\n linkAs,\n linkCell,\n linkProps,\n interactive,\n ...props\n },\n ref,\n ) => {\n const [isCollapsed, setIsCollapsed] = useState(false);\n const contentId = useId();\n\n return (\n <>\n <StyledTr\n ref={ref}\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > ${Td}`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n interactive={interactive ?? (href !== undefined || undefined)}\n {...props}\n >\n {emptyFirstColumn ? tableHead ? <Th css={{ width: 24 }} /> : <Td /> : null}\n {!!collapsedContent && (\n <Td\n css={{ padding: '0 0 0 $3' }}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n position: 'relative',\n zIndex: ROW_LINK_CONTROL_Z_INDEX,\n height: '40px',\n '&:hover': {\n color: '$tableActiveText',\n },\n }}\n >\n <ExpandButton\n type=\"button\"\n css={{ width: '100%', height: '100%' }}\n aria-label={expandLabel}\n aria-expanded={isCollapsed}\n aria-controls={contentId}\n onClick={() => setIsCollapsed(!isCollapsed)}\n >\n <ChevronRightIcon\n aria-hidden\n style={{\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </ExpandButton>\n </Flex>\n </Td>\n )}\n {withRowLink(children, { href, linkAs, linkCell, linkProps }, Td)}\n </StyledTr>\n {!!collapsedContent && (\n <AnimatedTr\n id={contentId}\n isOpen={isCollapsed}\n collapsedContentColSpan={collapsedContentColSpan}\n >\n {collapsedContent}\n </AnimatedTr>\n )}\n </>\n );\n },\n);\n\nexport const Tfoot = styled('tfoot', {\n verticalAlign: 'middle',\n position: 'relative',\n borderRadius: 'inherit',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableFooterLayerBackground',\n borderRadius: 'inherit',\n },\n\n [`& ${Td}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n p: '$2 $3',\n },\n});\n\nexport const Thead = styled('thead', {\n position: 'relative',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n verticalAlign: 'middle',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableHeaderLayerBackground',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n },\n\n [`& ${Th}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n },\n});\n\nexport const Table = styled('table', rowLinkTableStyles, {\n width: '100%',\n tableLayout: 'fixed',\n boxSizing: 'border-box',\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$rubik',\n color: '$tableText',\n borderRadius: '$3',\n overflow: 'hidden',\n [`& ${Tbody}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n [`& ${Td}`]: {\n borderTop: '1px solid $tableRowBorder',\n },\n },\n [`& ${Thead}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 1,\n },\n});\n\nexport type TableVariants = VariantProps<typeof Table>;\nexport type TableProps = TableVariants & NonNullable<unknown>;\n"],"mappings":";;;;;;;;;;;;;;AA0BA,IAAa,UAAUA,wBAAAA,OAAO,WAAWC,aAAAA,MAAM;CAC7C,SAAS;CACT,WAAW;CACX,oBAAoB;CACpB,YAAY;CACZ,YAAY;AACd,CAAC;AAED,IAAa,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AY;EACV,eAAe;EACf,SAAS;EACT,UAAU;EACV,OAAO;EACP,iBAAiB;EACjB,qBAAqB;EACrB,sBAAsB;CACxB;EAEC,KAAK,OAAO;EACX,UAAU;EACV,OAAO;EACP,YAAY;CACd;AACF,CAAC;AAED,IAAa,QAAQA,wBAAAA,OAAO,SAASc,gBAAAA,oBAAoB;CACvD,OAAO;CACP,aAAa;CACb,WAAW;CACX,gBAAgB;CAChB,eAAe;CACf,YAAY;CACZ,OAAO;CACP,cAAc;CACd,UAAU;EACT,KAAK,MAAM,iBAAiB,UAAU;EACrC,qBAAqB;EACrB,sBAAsB;GACrB,KAAK,OAAO,EACX,WAAW,4BACb;CACF;EACC,KAAK,MAAM,iBAAiB,UAAU;EACrC,qBAAqB;EACrB,sBAAsB;CACxB;CAEA,UAAU,EACR,WAAWC,kBAAAA,kBACb;CACA,iBAAiB,EACf,WAAW,EACb;AACF,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import { styled } from "../../stitches.config.js";
|
|
2
2
|
import { Box } from "../Box/Box.js";
|
|
3
3
|
import { elevationVariants } from "../Elevation/Elevation.js";
|
|
4
|
+
import { rowLinkRowStyles, rowLinkTableStyles, withRowLink } from "../RowLink/RowLink.js";
|
|
4
5
|
import { Flex } from "../Flex/Flex.js";
|
|
5
6
|
import { Text } from "../Text/Text.js";
|
|
6
7
|
import { Label } from "../Label/Label.js";
|
|
8
|
+
import { ExpandButton } from "./ExpandButton.js";
|
|
7
9
|
import { ChevronRightIcon } from "@radix-ui/react-icons";
|
|
8
|
-
import { forwardRef, useMemo, useState } from "react";
|
|
10
|
+
import { forwardRef, useId, useMemo, useState } from "react";
|
|
9
11
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
10
12
|
// components/Table/Table.tsx
|
|
11
13
|
var Caption = styled("caption", Text, {
|
|
@@ -57,7 +59,7 @@ var Td = styled("td", {
|
|
|
57
59
|
},
|
|
58
60
|
defaultVariants: { align: "start" }
|
|
59
61
|
});
|
|
60
|
-
var StyledTr = styled("tr", {
|
|
62
|
+
var StyledTr = styled("tr", rowLinkRowStyles, {
|
|
61
63
|
verticalAlign: "inherit",
|
|
62
64
|
"&:hover": { color: "$tableHoverText" },
|
|
63
65
|
[`&:last-child > ${Td}`]: { borderBottom: "none" },
|
|
@@ -78,9 +80,10 @@ var StyledTr = styled("tr", {
|
|
|
78
80
|
css: { "&:hover": { color: "$tableActiveHoverText" } }
|
|
79
81
|
}]
|
|
80
82
|
});
|
|
81
|
-
var AnimatedTr = ({ collapsedContentColSpan, isOpen, children }) => {
|
|
82
|
-
const appliedStyle = useMemo(() => isOpen ? { transition: "padding 0.2s ease-out" } : {
|
|
83
|
-
transition: "padding 0.2s ease-out",
|
|
83
|
+
var AnimatedTr = ({ id, collapsedContentColSpan, isOpen, children }) => {
|
|
84
|
+
const appliedStyle = useMemo(() => isOpen ? { transition: "padding 0.2s ease-out, visibility 0s" } : {
|
|
85
|
+
transition: "padding 0.2s ease-out, visibility 0s 0.2s",
|
|
86
|
+
visibility: "hidden",
|
|
84
87
|
lineHeight: 0,
|
|
85
88
|
fontSize: 0,
|
|
86
89
|
padding: "0px 16px",
|
|
@@ -92,6 +95,7 @@ var AnimatedTr = ({ collapsedContentColSpan, isOpen, children }) => {
|
|
|
92
95
|
overflow: "hidden"
|
|
93
96
|
}, [isOpen]);
|
|
94
97
|
return /* @__PURE__ */ jsx(Tr, { children: /* @__PURE__ */ jsx(Td, {
|
|
98
|
+
id,
|
|
95
99
|
colSpan: collapsedContentColSpan,
|
|
96
100
|
css: appliedStyle,
|
|
97
101
|
children: /* @__PURE__ */ jsx(Box, {
|
|
@@ -100,14 +104,16 @@ var AnimatedTr = ({ collapsedContentColSpan, isOpen, children }) => {
|
|
|
100
104
|
})
|
|
101
105
|
}) });
|
|
102
106
|
};
|
|
103
|
-
var Tr = forwardRef(({ children, collapsedContent, emptyFirstColumn = false, tableHead = false, collapsedContentColSpan = 1, css, ...props }, ref) => {
|
|
107
|
+
var Tr = forwardRef(({ children, collapsedContent, expandLabel = "Expand row", emptyFirstColumn = false, tableHead = false, collapsedContentColSpan = 1, css, href, linkAs, linkCell, linkProps, interactive, ...props }, ref) => {
|
|
104
108
|
const [isCollapsed, setIsCollapsed] = useState(false);
|
|
109
|
+
const contentId = useId();
|
|
105
110
|
return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(StyledTr, {
|
|
106
111
|
ref,
|
|
107
112
|
css: !!collapsedContent && !isCollapsed ? {
|
|
108
113
|
...css,
|
|
109
114
|
[`&:nth-last-child(2) > ${Td}`]: { borderBottom: "none" }
|
|
110
115
|
} : { ...css },
|
|
116
|
+
interactive: interactive ?? (href !== void 0 || void 0),
|
|
111
117
|
...props,
|
|
112
118
|
children: [
|
|
113
119
|
emptyFirstColumn ? tableHead ? /* @__PURE__ */ jsx(Th, { css: { width: 24 } }) : /* @__PURE__ */ jsx(Td, {}) : null,
|
|
@@ -121,20 +127,40 @@ var Tr = forwardRef(({ children, collapsedContent, emptyFirstColumn = false, tab
|
|
|
121
127
|
align: "center",
|
|
122
128
|
justify: "center",
|
|
123
129
|
css: {
|
|
130
|
+
position: "relative",
|
|
131
|
+
zIndex: 2,
|
|
124
132
|
height: "40px",
|
|
125
133
|
"&:hover": { color: "$tableActiveText" }
|
|
126
134
|
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
135
|
+
children: /* @__PURE__ */ jsx(ExpandButton, {
|
|
136
|
+
type: "button",
|
|
137
|
+
css: {
|
|
138
|
+
width: "100%",
|
|
139
|
+
height: "100%"
|
|
140
|
+
},
|
|
141
|
+
"aria-label": expandLabel,
|
|
142
|
+
"aria-expanded": isCollapsed,
|
|
143
|
+
"aria-controls": contentId,
|
|
144
|
+
onClick: () => setIsCollapsed(!isCollapsed),
|
|
145
|
+
children: /* @__PURE__ */ jsx(ChevronRightIcon, {
|
|
146
|
+
"aria-hidden": true,
|
|
147
|
+
style: {
|
|
148
|
+
transition: "transform 0.2s ease-out",
|
|
149
|
+
transform: isCollapsed ? "rotate(90deg)" : "initial"
|
|
150
|
+
}
|
|
151
|
+
})
|
|
152
|
+
})
|
|
133
153
|
})
|
|
134
154
|
}),
|
|
135
|
-
children
|
|
155
|
+
withRowLink(children, {
|
|
156
|
+
href,
|
|
157
|
+
linkAs,
|
|
158
|
+
linkCell,
|
|
159
|
+
linkProps
|
|
160
|
+
}, Td)
|
|
136
161
|
]
|
|
137
162
|
}), !!collapsedContent && /* @__PURE__ */ jsx(AnimatedTr, {
|
|
163
|
+
id: contentId,
|
|
138
164
|
isOpen: isCollapsed,
|
|
139
165
|
collapsedContentColSpan,
|
|
140
166
|
children: collapsedContent
|
|
@@ -179,7 +205,7 @@ var Thead = styled("thead", {
|
|
|
179
205
|
fontWeight: "$light"
|
|
180
206
|
}
|
|
181
207
|
});
|
|
182
|
-
var Table = styled("table", {
|
|
208
|
+
var Table = styled("table", rowLinkTableStyles, {
|
|
183
209
|
width: "100%",
|
|
184
210
|
tableLayout: "fixed",
|
|
185
211
|
boxSizing: "border-box",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","names":["_Fragment"],"sources":["../../../components/Table/Table.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport React, { ComponentProps, ElementRef, forwardRef, ReactNode, useMemo, useState } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\nimport { Label } from '../Label';\nimport { Text } from '../Text';\n\nexport const Caption = styled('caption', Text, {\n display: 'table-caption',\n textAlign: 'start',\n fontVariantNumeric: 'proportional-nums',\n fontWeight: '$medium',\n lineHeight: '1.25',\n});\n\nexport const Tbody = styled('tbody', {\n width: '100%',\n verticalAlign: 'middle',\n});\n\nexport const Th = styled('th', Label, {\n // override Label\n display: 'table-cell',\n verticalAlign: 'inherit',\n\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n\n textAlign: 'start',\n p: '$2 $3',\n borderBottom: '1px solid $tableRowBorder',\n\n variants: {\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n transform: {\n capitalize: {\n display: 'table-cell', // revert Label enforced value\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const Td = styled('td', {\n boxSizing: 'border-box',\n p: '$5 $3',\n borderBottom: '1px solid $tableRowBorder',\n fontSize: '$3',\n lineHeight: '16px',\n verticalAlign: 'inherit',\n variants: {\n subtle: {\n true: {\n fontWeight: '$regular',\n color: '$tableSubtleText',\n },\n },\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const StyledTr = styled('tr', {\n verticalAlign: 'inherit',\n '&:hover': {\n color: '$tableHoverText',\n },\n [`&:last-child > ${Td}`]: {\n borderBottom: 'none',\n },\n\n variants: {\n interactive: {\n true: {\n '&:hover': {\n backgroundColor: '$tableHoverBackground',\n cursor: 'pointer',\n },\n },\n },\n active: {\n true: {\n backgroundColor: '$tableHoverBackground',\n color: '$tableActiveText',\n fontWeight: '$semiBold',\n },\n },\n },\n compoundVariants: [\n {\n interactive: true,\n active: true,\n css: {\n '&:hover': {\n color: '$tableActiveHoverText',\n },\n },\n },\n ],\n});\n\nconst AnimatedTr = ({\n collapsedContentColSpan,\n isOpen,\n children,\n}: {\n collapsedContentColSpan: number;\n isOpen: boolean;\n children: ReactNode;\n}) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'padding 0.2s ease-out' }\n : {\n transition: 'padding 0.2s ease-out',\n lineHeight: 0,\n fontSize: 0,\n padding: '0px 16px',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'all 0.2s ease-out' }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n },\n [isOpen],\n );\n\n return (\n <Tr>\n <Td colSpan={collapsedContentColSpan} css={appliedStyle}>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </Tr>\n );\n};\nexport type TrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n children: React.ReactNode;\n collapsedContent?: React.ReactNode;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n collapsedContentColSpan?: number;\n };\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, TrProps>(\n (\n {\n children,\n collapsedContent,\n emptyFirstColumn = false,\n tableHead = false,\n collapsedContentColSpan = 1,\n css,\n ...props\n },\n ref,\n ) => {\n const [isCollapsed, setIsCollapsed] = useState(false);\n\n return (\n <>\n <StyledTr\n ref={ref}\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > ${Td}`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n {...props}\n >\n {emptyFirstColumn ? tableHead ? <Th css={{ width: 24 }} /> : <Td /> : null}\n {!!collapsedContent && (\n <Td\n css={{ padding: '0 0 0 $3' }}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n height: '40px',\n '&:hover': {\n color: '$tableActiveText',\n },\n }}\n onClick={() => setIsCollapsed(!isCollapsed)}\n >\n <ChevronRightIcon\n style={{\n cursor: 'pointer',\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </Flex>\n </Td>\n )}\n {children}\n </StyledTr>\n {!!collapsedContent && (\n <AnimatedTr isOpen={isCollapsed} collapsedContentColSpan={collapsedContentColSpan}>\n {collapsedContent}\n </AnimatedTr>\n )}\n </>\n );\n },\n);\n\nexport const Tfoot = styled('tfoot', {\n verticalAlign: 'middle',\n position: 'relative',\n borderRadius: 'inherit',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableFooterLayerBackground',\n borderRadius: 'inherit',\n },\n\n [`& ${Td}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n p: '$2 $3',\n },\n});\n\nexport const Thead = styled('thead', {\n position: 'relative',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n verticalAlign: 'middle',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableHeaderLayerBackground',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n },\n\n [`& ${Th}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n },\n});\n\nexport const Table = styled('table', {\n width: '100%',\n tableLayout: 'fixed',\n boxSizing: 'border-box',\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$rubik',\n color: '$tableText',\n borderRadius: '$3',\n overflow: 'hidden',\n [`& ${Tbody}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n [`& ${Td}`]: {\n borderTop: '1px solid $tableRowBorder',\n },\n },\n [`& ${Thead}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 1,\n },\n});\n\nexport type TableVariants = VariantProps<typeof Table>;\nexport type TableProps = TableVariants & NonNullable<unknown>;\n"],"mappings":";;;;;;;;;;AAUA,IAAa,UAAU,OAAO,WAAW,MAAM;CAC7C,SAAS;CACT,WAAW;CACX,oBAAoB;CACpB,YAAY;CACZ,YAAY;AACd,CAAC;AAED,IAAa,QAAQ,OAAO,SAAS;CACnC,OAAO;CACP,eAAe;AACjB,CAAC;AAED,IAAa,KAAK,OAAO,MAAM,OAAO;CAEpC,SAAS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,YAAY;EACV,eAAe;EACf,SAAS;EACT,UAAU;EACV,OAAO;EACP,iBAAiB;EACjB,cAAc;CAChB;EAEC,KAAK,OAAO;EACX,UAAU;EACV,OAAO;EACP,YAAY;EACZ,GAAG;CACL;AACF,CAAC;AAED,IAAa,QAAQ,OAAO,SAAS;CACnC,UAAU;CACV,qBAAqB;CACrB,sBAAsB;CACtB,eAAe;CAEf,YAAY;EACV,eAAe;EACf,SAAS;EACT,UAAU;EACV,OAAO;EACP,iBAAiB;EACjB,qBAAqB;EACrB,sBAAsB;CACxB;EAEC,KAAK,OAAO;EACX,UAAU;EACV,OAAO;EACP,YAAY;CACd;AACF,CAAC;AAED,IAAa,QAAQ,OAAO,SAAS;CACnC,OAAO;CACP,aAAa;CACb,WAAW;CACX,gBAAgB;CAChB,eAAe;CACf,YAAY;CACZ,OAAO;CACP,cAAc;CACd,UAAU;EACT,KAAK,MAAM,iBAAiB,UAAU;EACrC,qBAAqB;EACrB,sBAAsB;GACrB,KAAK,OAAO,EACX,WAAW,4BACb;CACF;EACC,KAAK,MAAM,iBAAiB,UAAU;EACrC,qBAAqB;EACrB,sBAAsB;CACxB;CAEA,UAAU,EACR,WAAW,kBACb;CACA,iBAAiB,EACf,WAAW,EACb;AACF,CAAC"}
|
|
1
|
+
{"version":3,"file":"Table.js","names":["_Fragment"],"sources":["../../../components/Table/Table.tsx"],"sourcesContent":["import { ChevronRightIcon } from '@radix-ui/react-icons';\nimport React, {\n ComponentProps,\n ElementRef,\n forwardRef,\n ReactNode,\n useId,\n useMemo,\n useState,\n} from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { Box } from '../Box';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\nimport { Label } from '../Label';\nimport {\n ROW_LINK_CONTROL_Z_INDEX,\n rowLinkRowStyles,\n RowLinkShortcutProps,\n rowLinkTableStyles,\n withRowLink,\n} from '../RowLink';\nimport { Text } from '../Text';\nimport { ExpandButton } from './ExpandButton';\n\nexport const Caption = styled('caption', Text, {\n display: 'table-caption',\n textAlign: 'start',\n fontVariantNumeric: 'proportional-nums',\n fontWeight: '$medium',\n lineHeight: '1.25',\n});\n\nexport const Tbody = styled('tbody', {\n width: '100%',\n verticalAlign: 'middle',\n});\n\nexport const Th = styled('th', Label, {\n // override Label\n display: 'table-cell',\n verticalAlign: 'inherit',\n\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n\n textAlign: 'start',\n p: '$2 $3',\n borderBottom: '1px solid $tableRowBorder',\n\n variants: {\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n transform: {\n capitalize: {\n display: 'table-cell', // revert Label enforced value\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const Td = styled('td', {\n boxSizing: 'border-box',\n p: '$5 $3',\n borderBottom: '1px solid $tableRowBorder',\n fontSize: '$3',\n lineHeight: '16px',\n verticalAlign: 'inherit',\n variants: {\n subtle: {\n true: {\n fontWeight: '$regular',\n color: '$tableSubtleText',\n },\n },\n align: {\n start: {\n textAlign: 'start',\n },\n center: {\n textAlign: 'center',\n },\n end: {\n textAlign: 'end',\n },\n },\n },\n defaultVariants: {\n align: 'start',\n },\n});\n\nexport const StyledTr = styled('tr', rowLinkRowStyles, {\n verticalAlign: 'inherit',\n '&:hover': {\n color: '$tableHoverText',\n },\n [`&:last-child > ${Td}`]: {\n borderBottom: 'none',\n },\n\n variants: {\n interactive: {\n true: {\n '&:hover': {\n backgroundColor: '$tableHoverBackground',\n cursor: 'pointer',\n },\n },\n },\n active: {\n true: {\n backgroundColor: '$tableHoverBackground',\n color: '$tableActiveText',\n fontWeight: '$semiBold',\n },\n },\n },\n compoundVariants: [\n {\n interactive: true,\n active: true,\n css: {\n '&:hover': {\n color: '$tableActiveHoverText',\n },\n },\n },\n ],\n});\n\nconst AnimatedTr = ({\n id,\n collapsedContentColSpan,\n isOpen,\n children,\n}: {\n id: string;\n collapsedContentColSpan: number;\n isOpen: boolean;\n children: ReactNode;\n}) => {\n const appliedStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'padding 0.2s ease-out, visibility 0s' }\n : {\n transition: 'padding 0.2s ease-out, visibility 0s 0.2s',\n visibility: 'hidden',\n lineHeight: 0,\n fontSize: 0,\n padding: '0px 16px',\n border: 'none',\n },\n [isOpen],\n );\n\n const containerStyle = useMemo(\n () =>\n isOpen\n ? { transition: 'all 0.2s ease-out' }\n : {\n transition: 'all 0.2s ease-out',\n height: 0,\n overflow: 'hidden',\n },\n [isOpen],\n );\n\n return (\n <Tr>\n <Td id={id} colSpan={collapsedContentColSpan} css={appliedStyle}>\n <Box css={containerStyle}>{children}</Box>\n </Td>\n </Tr>\n );\n};\nexport type TrProps = ComponentProps<typeof StyledTr> &\n VariantProps<typeof StyledTr> & {\n children: React.ReactNode;\n collapsedContent?: React.ReactNode;\n expandLabel?: string;\n emptyFirstColumn?: boolean;\n tableHead?: boolean;\n collapsedContentColSpan?: number;\n } & RowLinkShortcutProps;\n\nexport const Tr = forwardRef<ElementRef<typeof StyledTr>, TrProps>(\n (\n {\n children,\n collapsedContent,\n expandLabel = 'Expand row',\n emptyFirstColumn = false,\n tableHead = false,\n collapsedContentColSpan = 1,\n css,\n href,\n linkAs,\n linkCell,\n linkProps,\n interactive,\n ...props\n },\n ref,\n ) => {\n const [isCollapsed, setIsCollapsed] = useState(false);\n const contentId = useId();\n\n return (\n <>\n <StyledTr\n ref={ref}\n css={\n !!collapsedContent && !isCollapsed\n ? {\n ...css,\n [`&:nth-last-child(2) > ${Td}`]: {\n borderBottom: 'none',\n },\n }\n : { ...css }\n }\n interactive={interactive ?? (href !== undefined || undefined)}\n {...props}\n >\n {emptyFirstColumn ? tableHead ? <Th css={{ width: 24 }} /> : <Td /> : null}\n {!!collapsedContent && (\n <Td\n css={{ padding: '0 0 0 $3' }}\n onClick={(e) => {\n e.stopPropagation();\n e.preventDefault();\n }}\n >\n <Flex\n align=\"center\"\n justify=\"center\"\n css={{\n position: 'relative',\n zIndex: ROW_LINK_CONTROL_Z_INDEX,\n height: '40px',\n '&:hover': {\n color: '$tableActiveText',\n },\n }}\n >\n <ExpandButton\n type=\"button\"\n css={{ width: '100%', height: '100%' }}\n aria-label={expandLabel}\n aria-expanded={isCollapsed}\n aria-controls={contentId}\n onClick={() => setIsCollapsed(!isCollapsed)}\n >\n <ChevronRightIcon\n aria-hidden\n style={{\n transition: 'transform 0.2s ease-out',\n transform: isCollapsed ? 'rotate(90deg)' : 'initial',\n }}\n />\n </ExpandButton>\n </Flex>\n </Td>\n )}\n {withRowLink(children, { href, linkAs, linkCell, linkProps }, Td)}\n </StyledTr>\n {!!collapsedContent && (\n <AnimatedTr\n id={contentId}\n isOpen={isCollapsed}\n collapsedContentColSpan={collapsedContentColSpan}\n >\n {collapsedContent}\n </AnimatedTr>\n )}\n </>\n );\n },\n);\n\nexport const Tfoot = styled('tfoot', {\n verticalAlign: 'middle',\n position: 'relative',\n borderRadius: 'inherit',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableFooterLayerBackground',\n borderRadius: 'inherit',\n },\n\n [`& ${Td}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n p: '$2 $3',\n },\n});\n\nexport const Thead = styled('thead', {\n position: 'relative',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n verticalAlign: 'middle',\n\n '&::after': {\n pointerEvents: 'none',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n backgroundColor: '$tableHeaderLayerBackground',\n borderTopLeftRadius: 'inherit',\n borderTopRightRadius: 'inherit',\n },\n\n [`& ${Th}`]: {\n fontSize: '$1',\n color: '$tableHeaderText',\n fontWeight: '$light',\n },\n});\n\nexport const Table = styled('table', rowLinkTableStyles, {\n width: '100%',\n tableLayout: 'fixed',\n boxSizing: 'border-box',\n borderCollapse: 'separate',\n borderSpacing: 0,\n fontFamily: '$rubik',\n color: '$tableText',\n borderRadius: '$3',\n overflow: 'hidden',\n [`& ${Tbody}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n [`& ${Td}`]: {\n borderTop: '1px solid $tableRowBorder',\n },\n },\n [`& ${Thead}:not(:empty) ~ ${Tfoot}`]: {\n borderTopLeftRadius: '0',\n borderTopRightRadius: '0',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 1,\n },\n});\n\nexport type TableVariants = VariantProps<typeof Table>;\nexport type TableProps = TableVariants & NonNullable<unknown>;\n"],"mappings":";;;;;;;;;;;;AA0BA,IAAa,UAAU,OAAO,WAAW,MAAM;CAC7C,SAAS;CACT,WAAW;CACX,oBAAoB;CACpB,YAAY;CACZ,YAAY;AACd,CAAC;AAED,IAAa,QAAQ,OAAO,SAAS;CACnC,OAAO;CACP,eAAe;AACjB,CAAC;AAED,IAAa,KAAK,OAAO,MAAM,OAAO;CAEpC,SAAS;CACT,eAAe;CAEf,qBAAqB;CACrB,sBAAsB;CAEtB,WAAW;CACX,GAAG;CACH,cAAc;CAEd,UAAU;EACR,OAAO;GACL,OAAO,EACL,WAAW,QACb;GACA,QAAQ,EACN,WAAW,SACb;GACA,KAAK,EACH,WAAW,MACb;EACF;EACA,WAAW,EACT,YAAY,EACV,SAAS,aACX,EACF;CACF;CACA,iBAAiB,EACf,OAAO,QACT;AACF,CAAC;AAED,IAAa,KAAK,OAAO,MAAM;CAC7B,WAAW;CACX,GAAG;CACH,cAAc;CACd,UAAU;CACV,YAAY;CACZ,eAAe;CACf,UAAU;EACR,QAAQ,EACN,MAAM;GACJ,YAAY;GACZ,OAAO;EACT,EACF;EACA,OAAO;GACL,OAAO,EACL,WAAW,QACb;GACA,QAAQ,EACN,WAAW,SACb;GACA,KAAK,EACH,WAAW,MACb;EACF;CACF;CACA,iBAAiB,EACf,OAAO,QACT;AACF,CAAC;AAED,IAAa,WAAW,OA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,YAAY;EACV,eAAe;EACf,SAAS;EACT,UAAU;EACV,OAAO;EACP,iBAAiB;EACjB,qBAAqB;EACrB,sBAAsB;CACxB;EAEC,KAAK,OAAO;EACX,UAAU;EACV,OAAO;EACP,YAAY;CACd;AACF,CAAC;AAED,IAAa,QAAQ,OAAO,SAAS,oBAAoB;CACvD,OAAO;CACP,aAAa;CACb,WAAW;CACX,gBAAgB;CAChB,eAAe;CACf,YAAY;CACZ,OAAO;CACP,cAAc;CACd,UAAU;EACT,KAAK,MAAM,iBAAiB,UAAU;EACrC,qBAAqB;EACrB,sBAAsB;GACrB,KAAK,OAAO,EACX,WAAW,4BACb;CACF;EACC,KAAK,MAAM,iBAAiB,UAAU;EACrC,qBAAqB;EACrB,sBAAsB;CACxB;CAEA,UAAU,EACR,WAAW,kBACb;CACA,iBAAiB,EACf,WAAW,EACb;AACF,CAAC"}
|
package/dist/faency.css
CHANGED
|
@@ -7987,6 +7987,12 @@
|
|
|
7987
7987
|
}
|
|
7988
7988
|
._12qsecm7:empty::before {
|
|
7989
7989
|
content: "\00a0";
|
|
7990
|
+
}
|
|
7991
|
+
@media (prefers-reduced-motion) {
|
|
7992
|
+
._12qsecm1::after {
|
|
7993
|
+
animation: none;
|
|
7994
|
+
opacity: 0;
|
|
7995
|
+
}
|
|
7990
7996
|
}.q2igaw0 {
|
|
7991
7997
|
appearance: none;
|
|
7992
7998
|
overflow: auto;
|
package/dist/index.cjs
CHANGED
|
@@ -12,6 +12,7 @@ const require_Accordion = require("./components/Accordion/Accordion.cjs");
|
|
|
12
12
|
const require_Card = require("./components/Card/Card.cjs");
|
|
13
13
|
const require_Card_vanilla = require("./components/Card/Card.vanilla.cjs");
|
|
14
14
|
const require_Alert = require("./components/Alert/Alert.cjs");
|
|
15
|
+
const require_RowLink = require("./components/RowLink/RowLink.cjs");
|
|
15
16
|
const require_Flex = require("./components/Flex/Flex.cjs");
|
|
16
17
|
const require_Flex_vanilla = require("./components/Flex/Flex.vanilla.cjs");
|
|
17
18
|
const require_Text = require("./components/Text/Text.cjs");
|
|
@@ -215,6 +216,7 @@ exports.RadioAccordionItem = require_RadioAccordion.RadioAccordionItem;
|
|
|
215
216
|
exports.RadioAccordionRoot = require_RadioAccordion.RadioAccordionRoot;
|
|
216
217
|
exports.RadioAccordionTrigger = require_RadioAccordion.RadioAccordionTrigger;
|
|
217
218
|
exports.RadioGroup = require_Radio.RadioGroup;
|
|
219
|
+
exports.RowLink = require_RowLink.RowLink;
|
|
218
220
|
exports.Select = require_Select.Select;
|
|
219
221
|
exports.SidePanel = require_SidePanel.SidePanel;
|
|
220
222
|
exports.Skeleton = require_Skeleton.Skeleton;
|
|
@@ -254,6 +256,8 @@ exports.globalCss = require_stitches_config.globalCss;
|
|
|
254
256
|
exports.keyframes = require_stitches_config.keyframes;
|
|
255
257
|
exports.lightTheme = require_stitches_config.lightTheme;
|
|
256
258
|
exports.panelStyles = require_Panel.panelStyles;
|
|
259
|
+
exports.rowLinkRowStyles = require_RowLink.rowLinkRowStyles;
|
|
260
|
+
exports.rowLinkTableStyles = require_RowLink.rowLinkTableStyles;
|
|
257
261
|
exports.styled = require_stitches_config.styled;
|
|
258
262
|
exports.useColorScheme = require_colorSchemeContext.useColorScheme;
|
|
259
263
|
exports.useFieldControl = require_FieldContext.useFieldControl;
|