@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.
Files changed (47) hide show
  1. package/dist/components/Accordion/Accordion.cjs +24 -18
  2. package/dist/components/Accordion/Accordion.cjs.map +1 -1
  3. package/dist/components/Accordion/Accordion.js +24 -18
  4. package/dist/components/Accordion/Accordion.js.map +1 -1
  5. package/dist/components/AriaTable/AriaTable.cjs +47 -9
  6. package/dist/components/AriaTable/AriaTable.cjs.map +1 -1
  7. package/dist/components/AriaTable/AriaTable.js +48 -10
  8. package/dist/components/AriaTable/AriaTable.js.map +1 -1
  9. package/dist/components/Dialog/Dialog.cjs +4 -3
  10. package/dist/components/Dialog/Dialog.cjs.map +1 -1
  11. package/dist/components/Dialog/Dialog.js +4 -3
  12. package/dist/components/Dialog/Dialog.js.map +1 -1
  13. package/dist/components/Navigation/Navigation.cjs +4 -1
  14. package/dist/components/Navigation/Navigation.cjs.map +1 -1
  15. package/dist/components/Navigation/Navigation.js +4 -1
  16. package/dist/components/Navigation/Navigation.js.map +1 -1
  17. package/dist/components/RadioAccordion/RadioAccordion.cjs +10 -6
  18. package/dist/components/RadioAccordion/RadioAccordion.cjs.map +1 -1
  19. package/dist/components/RadioAccordion/RadioAccordion.js +10 -6
  20. package/dist/components/RadioAccordion/RadioAccordion.js.map +1 -1
  21. package/dist/components/RowLink/RowLink.cjs +95 -0
  22. package/dist/components/RowLink/RowLink.cjs.map +1 -0
  23. package/dist/components/RowLink/RowLink.js +90 -0
  24. package/dist/components/RowLink/RowLink.js.map +1 -0
  25. package/dist/components/SidePanel/SidePanel.cjs +3 -3
  26. package/dist/components/SidePanel/SidePanel.cjs.map +1 -1
  27. package/dist/components/SidePanel/SidePanel.js +3 -3
  28. package/dist/components/SidePanel/SidePanel.js.map +1 -1
  29. package/dist/components/Skeleton/Skeleton.cjs +4 -0
  30. package/dist/components/Skeleton/Skeleton.cjs.map +1 -1
  31. package/dist/components/Skeleton/Skeleton.js +4 -0
  32. package/dist/components/Skeleton/Skeleton.js.map +1 -1
  33. package/dist/components/Skeleton/Skeleton.vanilla.css.cjs.map +1 -1
  34. package/dist/components/Skeleton/Skeleton.vanilla.css.js.map +1 -1
  35. package/dist/components/Table/ExpandButton.cjs +18 -0
  36. package/dist/components/Table/ExpandButton.cjs.map +1 -0
  37. package/dist/components/Table/ExpandButton.js +19 -0
  38. package/dist/components/Table/ExpandButton.js.map +1 -0
  39. package/dist/components/Table/Table.cjs +39 -13
  40. package/dist/components/Table/Table.cjs.map +1 -1
  41. package/dist/components/Table/Table.js +40 -14
  42. package/dist/components/Table/Table.js.map +1 -1
  43. package/dist/faency.css +6 -0
  44. package/dist/index.cjs +4 -0
  45. package/dist/index.d.ts +402 -3
  46. package/dist/index.js +2 -1
  47. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.cjs","names":["styled","DialogPrimitive","overlayStyles","Card","elevationVariants","React","IconButton","Cross1Icon"],"sources":["../../../components/Dialog/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Card } from '../Card';\nimport { elevationVariants } from '../Elevation/Elevation';\nimport { IconButton } from '../IconButton';\nimport { overlayStyles } from '../Overlay';\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n children: React.ReactNode;\n};\n\nexport const DialogOverlay = styled(DialogPrimitive.Overlay, overlayStyles, {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n});\n\nexport function Dialog({ children, ...props }: DialogProps) {\n return <DialogPrimitive.Root {...props}>{children}</DialogPrimitive.Root>;\n}\n\nexport const StyledContent = styled(DialogPrimitive.Content, Card, {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 200,\n maxHeight: '85vh',\n padding: '$4',\n marginTop: '-5vh',\n backgroundColor: '$dialogBackground',\n boxShadow: 'inset 0 0 0 1px $colors$deepBlue4',\n borderRadius: '$3',\n // animation: `${fadeIn} 125ms linear, ${moveDown} 125ms cubic-bezier(0.22, 1, 0.36, 1)`,\n willChange: 'transform',\n overflow: 'auto',\n\n '&::before': {\n boxShadow: 'none',\n },\n\n '&:focus': {\n outline: 'none',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 5,\n },\n});\n\nconst StyledCloseButton = styled(DialogPrimitive.Close, {\n position: 'absolute',\n top: '$2',\n right: '$2',\n cursor: 'pointer',\n});\n\ninterface DialogCloseButtonProps\n extends VariantProps<typeof IconButton>,\n ComponentProps<typeof IconButton> {}\nexport const DialogCloseIconButton = React.forwardRef<\n React.ElementRef<typeof IconButton>,\n DialogCloseButtonProps\n>((props, forwardedRef) => (\n <StyledCloseButton asChild>\n <IconButton ref={forwardedRef} css={{ color: '$hiContrast' }} {...props}>\n <Cross1Icon />\n </IconButton>\n </StyledCloseButton>\n));\n\ntype DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;\ntype DialogContentProps = DialogContentPrimitiveProps &\n VariantProps<typeof StyledContent> & { css?: CSS };\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof StyledContent>,\n DialogContentProps\n>(({ children, ...props }, forwardedRef) => (\n <StyledContent {...props} ref={forwardedRef}>\n {children}\n <DialogCloseIconButton />\n </StyledContent>\n));\n\nexport const DialogClosePrimitive = DialogPrimitive.Close;\nexport const DialogDescription = DialogPrimitive.Description;\nexport const DialogPortal = DialogPrimitive.Portal;\nexport const DialogTitle = DialogPrimitive.Title;\nexport const DialogTrigger = DialogPrimitive.Trigger;\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAa,gBAAgBA,wBAAAA,OAAOC,uBAAgB,SAASC,gBAAAA,eAAe;CAC1E,UAAU;CACV,KAAK;CACL,OAAO;CACP,QA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uBAAgB;AACjD,IAAa,eAAeA,uBAAgB;AAC5C,IAAa,cAAcA,uBAAgB;AAC3C,IAAa,gBAAgBA,uBAAgB"}
1
+ {"version":3,"file":"Dialog.cjs","names":["styled","DialogPrimitive","overlayStyles","Card","elevationVariants","React","IconButton","Cross1Icon"],"sources":["../../../components/Dialog/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Card } from '../Card';\nimport { elevationVariants } from '../Elevation/Elevation';\nimport { IconButton } from '../IconButton';\nimport { overlayStyles } from '../Overlay';\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n children: React.ReactNode;\n};\n\nexport const DialogOverlay = styled(DialogPrimitive.Overlay, overlayStyles, {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n});\n\nexport function Dialog({ children, ...props }: DialogProps) {\n return <DialogPrimitive.Root {...props}>{children}</DialogPrimitive.Root>;\n}\n\nexport const StyledContent = styled(DialogPrimitive.Content, Card, {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 200,\n maxHeight: '85vh',\n padding: '$4',\n marginTop: '-5vh',\n backgroundColor: '$dialogBackground',\n boxShadow: 'inset 0 0 0 1px $colors$deepBlue4',\n borderRadius: '$3',\n // animation: `${fadeIn} 125ms linear, ${moveDown} 125ms cubic-bezier(0.22, 1, 0.36, 1)`,\n willChange: 'transform',\n overflow: 'auto',\n\n '&::before': {\n boxShadow: 'none',\n },\n\n '&:focus': {\n outline: 'none',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 5,\n },\n});\n\nconst StyledCloseButton = styled(DialogPrimitive.Close, {\n position: 'absolute',\n top: '$2',\n right: '$2',\n cursor: 'pointer',\n});\n\ninterface DialogCloseButtonProps\n extends VariantProps<typeof IconButton>, ComponentProps<typeof IconButton> {}\nexport const DialogCloseIconButton = React.forwardRef<\n React.ElementRef<typeof IconButton>,\n DialogCloseButtonProps\n>((props, forwardedRef) => (\n <StyledCloseButton asChild>\n <IconButton ref={forwardedRef} css={{ color: '$hiContrast' }} aria-label=\"Close\" {...props}>\n <Cross1Icon aria-hidden />\n </IconButton>\n </StyledCloseButton>\n));\n\ntype DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;\ntype DialogContentProps = DialogContentPrimitiveProps &\n VariantProps<typeof StyledContent> & { css?: CSS; closeLabel?: string };\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof StyledContent>,\n DialogContentProps\n>(({ children, closeLabel = 'Close', ...props }, forwardedRef) => (\n <StyledContent {...props} ref={forwardedRef}>\n {children}\n <DialogCloseIconButton aria-label={closeLabel} />\n </StyledContent>\n));\n\nexport const DialogClosePrimitive = DialogPrimitive.Close;\nexport const DialogDescription = DialogPrimitive.Description;\nexport const DialogPortal = DialogPrimitive.Portal;\nexport const DialogTitle = DialogPrimitive.Title;\nexport const DialogTrigger = DialogPrimitive.Trigger;\n"],"mappings":";;;;;;;;;;;;;AAcA,IAAa,gBAAgBA,wBAAAA,OAAOC,uBAAgB,SAASC,gBAAAA,eAAe;CAC1E,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC;AAED,SAAgB,OAAO,EAAE,UAAU,GAAG,SAAsB;CAC1D,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAACD,uBAAgB,MAAjB;EAAsB,GAAI;EAAQ;CAA+B,CAAA;AAC1E;AAEA,IAAa,gBAAgBD,wBAAAA,OAAOC,uBAAgB,SAASE,aAAAA,MAAM;CACjE,UAAU;CACV,KAAK;CACL,MAAM;CACN,WAAW;CACX,UAAU;CACV,WAAW;CACX,SAAS;CACT,WAAW;CACX,iBAAiB;CACjB,WAAW;CACX,cAAc;CAEd,YAAY;CACZ,UAAU;CAEV,aAAa,EACX,WAAW,OACb;CAEA,WAAW,EACT,SAAS,OACX;CAEA,UAAU,EACR,WAAWC,kBAAAA,kBACb;CACA,iBAAiB,EACf,WAAW,EACb;AACF,CAAC;AAED,IAAM,oBAAoBJ,wBAAAA,OAAOC,uBAAgB,OAAO;CACtD,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;AACV,CAAC;AAID,IAAa,wBAAwBI,MAAAA,QAAM,YAGxC,OAAO,iBACR,iBAAA,GAAA,kBAAA,IAAA,CAAC,mBAAD;CAAmB,SAAA;CACjB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,mBAAAA,YAAD;EAAY,KAAK;EAAc,KAAK,EAAE,OAAO,cAAc;EAAG,cAAW;EAAQ,GAAI;EACnF,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,YAAD,EAAY,eAAA,KAAa,CAAA;CACf,CAAA;AACK,CAAA,CACpB;AAMD,IAAa,gBAAgBF,MAAAA,QAAM,YAGhC,EAAE,UAAU,aAAa,SAAS,GAAG,SAAS,iBAC/C,iBAAA,GAAA,kBAAA,KAAA,CAAC,eAAD;CAAe,GAAI;CAAO,KAAK;CAA/B,UAAA,CACG,UACD,iBAAA,GAAA,kBAAA,IAAA,CAAC,uBAAD,EAAuB,cAAY,WAAa,CAAA,CACnC;AAChB,CAAA,CAAA;AAED,IAAa,uBAAuBJ,uBAAgB;AACpD,IAAa,oBAAoBA,uBAAgB;AACjD,IAAa,eAAeA,uBAAgB;AAC5C,IAAa,cAAcA,uBAAgB;AAC3C,IAAa,gBAAgBA,uBAAgB"}
@@ -51,14 +51,15 @@ var DialogCloseIconButton = React.forwardRef((props, forwardedRef) => /* @__PURE
51
51
  children: /* @__PURE__ */ jsx(IconButton, {
52
52
  ref: forwardedRef,
53
53
  css: { color: "$hiContrast" },
54
+ "aria-label": "Close",
54
55
  ...props,
55
- children: /* @__PURE__ */ jsx(Cross1Icon, {})
56
+ children: /* @__PURE__ */ jsx(Cross1Icon, { "aria-hidden": true })
56
57
  })
57
58
  }));
58
- var DialogContent = React.forwardRef(({ children, ...props }, forwardedRef) => /* @__PURE__ */ jsxs(StyledContent, {
59
+ var DialogContent = React.forwardRef(({ children, closeLabel = "Close", ...props }, forwardedRef) => /* @__PURE__ */ jsxs(StyledContent, {
59
60
  ...props,
60
61
  ref: forwardedRef,
61
- children: [children, /* @__PURE__ */ jsx(DialogCloseIconButton, {})]
62
+ children: [children, /* @__PURE__ */ jsx(DialogCloseIconButton, { "aria-label": closeLabel })]
62
63
  }));
63
64
  var DialogClosePrimitive = DialogPrimitive.Close;
64
65
  var DialogDescription = DialogPrimitive.Description;
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","names":[],"sources":["../../../components/Dialog/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Card } from '../Card';\nimport { elevationVariants } from '../Elevation/Elevation';\nimport { IconButton } from '../IconButton';\nimport { overlayStyles } from '../Overlay';\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n children: React.ReactNode;\n};\n\nexport const DialogOverlay = styled(DialogPrimitive.Overlay, overlayStyles, {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n});\n\nexport function Dialog({ children, ...props }: DialogProps) {\n return <DialogPrimitive.Root {...props}>{children}</DialogPrimitive.Root>;\n}\n\nexport const StyledContent = styled(DialogPrimitive.Content, Card, {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 200,\n maxHeight: '85vh',\n padding: '$4',\n marginTop: '-5vh',\n backgroundColor: '$dialogBackground',\n boxShadow: 'inset 0 0 0 1px $colors$deepBlue4',\n borderRadius: '$3',\n // animation: `${fadeIn} 125ms linear, ${moveDown} 125ms cubic-bezier(0.22, 1, 0.36, 1)`,\n willChange: 'transform',\n overflow: 'auto',\n\n '&::before': {\n boxShadow: 'none',\n },\n\n '&:focus': {\n outline: 'none',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 5,\n },\n});\n\nconst StyledCloseButton = styled(DialogPrimitive.Close, {\n position: 'absolute',\n top: '$2',\n right: '$2',\n cursor: 'pointer',\n});\n\ninterface DialogCloseButtonProps\n extends VariantProps<typeof IconButton>,\n ComponentProps<typeof IconButton> {}\nexport const DialogCloseIconButton = React.forwardRef<\n React.ElementRef<typeof IconButton>,\n DialogCloseButtonProps\n>((props, forwardedRef) => (\n <StyledCloseButton asChild>\n <IconButton ref={forwardedRef} css={{ color: '$hiContrast' }} {...props}>\n <Cross1Icon />\n </IconButton>\n </StyledCloseButton>\n));\n\ntype DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;\ntype DialogContentProps = DialogContentPrimitiveProps &\n VariantProps<typeof StyledContent> & { css?: CSS };\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof StyledContent>,\n DialogContentProps\n>(({ children, ...props }, forwardedRef) => (\n <StyledContent {...props} ref={forwardedRef}>\n {children}\n <DialogCloseIconButton />\n </StyledContent>\n));\n\nexport const DialogClosePrimitive = DialogPrimitive.Close;\nexport const DialogDescription = DialogPrimitive.Description;\nexport const DialogPortal = DialogPrimitive.Portal;\nexport const DialogTitle = DialogPrimitive.Title;\nexport const DialogTrigger = DialogPrimitive.Trigger;\n"],"mappings":";;;;;;;;;;AAcA,IAAa,gBAAgB,OAAO,gBAAgB,SAAS,eAAe;CAC1E,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC;AAED,SAAgB,OAAO,EAAE,UAAU,GAAG,SAAsB;CAC1D,OAAO,oBAAC,gBAAgB,MAAjB;EAAsB,GAAI;EAAQ;CAA+B,CAAA;AAC1E;AAEA,IAAa,gBAAgB,OAAO,gBAAgB,SAAS,MAAM;CACjE,UAAU;CACV,KAAK;CACL,MAAM;CACN,WAAW;CACX,UAAU;CACV,WAAW;CACX,SAAS;CACT,WAAW;CACX,iBAAiB;CACjB,WAAW;CACX,cAAc;CAEd,YAAY;CACZ,UAAU;CAEV,aAAa,EACX,WAAW,OACb;CAEA,WAAW,EACT,SAAS,OACX;CAEA,UAAU,EACR,WAAW,kBACb;CACA,iBAAiB,EACf,WAAW,EACb;AACF,CAAC;AAED,IAAM,oBAAoB,OAAO,gBAAgB,OAAO;CACtD,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;AACV,CAAC;AAKD,IAAa,wBAAwB,MAAM,YAGxC,OAAO,iBACR,oBAAC,mBAAD;CAAmB,SAAA;CACjB,UAAA,oBAAC,YAAD;EAAY,KAAK;EAAc,KAAK,EAAE,OAAO,cAAc;EAAG,GAAI;EAChE,UAAA,oBAAC,YAAD,CAAa,CAAA;CACH,CAAA;AACK,CAAA,CACpB;AAMD,IAAa,gBAAgB,MAAM,YAGhC,EAAE,UAAU,GAAG,SAAS,iBACzB,qBAAC,eAAD;CAAe,GAAI;CAAO,KAAK;CAA/B,UAAA,CACG,UACD,oBAAC,uBAAD,CAAwB,CAAA,CACX;AAChB,CAAA,CAAA;AAED,IAAa,uBAAuB,gBAAgB;AACpD,IAAa,oBAAoB,gBAAgB;AACjD,IAAa,eAAe,gBAAgB;AAC5C,IAAa,cAAc,gBAAgB;AAC3C,IAAa,gBAAgB,gBAAgB"}
1
+ {"version":3,"file":"Dialog.js","names":[],"sources":["../../../components/Dialog/Dialog.tsx"],"sourcesContent":["import * as DialogPrimitive from '@radix-ui/react-dialog';\nimport { Cross1Icon } from '@radix-ui/react-icons';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { Card } from '../Card';\nimport { elevationVariants } from '../Elevation/Elevation';\nimport { IconButton } from '../IconButton';\nimport { overlayStyles } from '../Overlay';\n\ntype DialogProps = React.ComponentProps<typeof DialogPrimitive.Root> & {\n children: React.ReactNode;\n};\n\nexport const DialogOverlay = styled(DialogPrimitive.Overlay, overlayStyles, {\n position: 'fixed',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n});\n\nexport function Dialog({ children, ...props }: DialogProps) {\n return <DialogPrimitive.Root {...props}>{children}</DialogPrimitive.Root>;\n}\n\nexport const StyledContent = styled(DialogPrimitive.Content, Card, {\n position: 'fixed',\n top: '50%',\n left: '50%',\n transform: 'translate(-50%, -50%)',\n minWidth: 200,\n maxHeight: '85vh',\n padding: '$4',\n marginTop: '-5vh',\n backgroundColor: '$dialogBackground',\n boxShadow: 'inset 0 0 0 1px $colors$deepBlue4',\n borderRadius: '$3',\n // animation: `${fadeIn} 125ms linear, ${moveDown} 125ms cubic-bezier(0.22, 1, 0.36, 1)`,\n willChange: 'transform',\n overflow: 'auto',\n\n '&::before': {\n boxShadow: 'none',\n },\n\n '&:focus': {\n outline: 'none',\n },\n\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: 5,\n },\n});\n\nconst StyledCloseButton = styled(DialogPrimitive.Close, {\n position: 'absolute',\n top: '$2',\n right: '$2',\n cursor: 'pointer',\n});\n\ninterface DialogCloseButtonProps\n extends VariantProps<typeof IconButton>, ComponentProps<typeof IconButton> {}\nexport const DialogCloseIconButton = React.forwardRef<\n React.ElementRef<typeof IconButton>,\n DialogCloseButtonProps\n>((props, forwardedRef) => (\n <StyledCloseButton asChild>\n <IconButton ref={forwardedRef} css={{ color: '$hiContrast' }} aria-label=\"Close\" {...props}>\n <Cross1Icon aria-hidden />\n </IconButton>\n </StyledCloseButton>\n));\n\ntype DialogContentPrimitiveProps = React.ComponentProps<typeof DialogPrimitive.Content>;\ntype DialogContentProps = DialogContentPrimitiveProps &\n VariantProps<typeof StyledContent> & { css?: CSS; closeLabel?: string };\n\nexport const DialogContent = React.forwardRef<\n React.ElementRef<typeof StyledContent>,\n DialogContentProps\n>(({ children, closeLabel = 'Close', ...props }, forwardedRef) => (\n <StyledContent {...props} ref={forwardedRef}>\n {children}\n <DialogCloseIconButton aria-label={closeLabel} />\n </StyledContent>\n));\n\nexport const DialogClosePrimitive = DialogPrimitive.Close;\nexport const DialogDescription = DialogPrimitive.Description;\nexport const DialogPortal = DialogPrimitive.Portal;\nexport const DialogTitle = DialogPrimitive.Title;\nexport const DialogTrigger = DialogPrimitive.Trigger;\n"],"mappings":";;;;;;;;;;AAcA,IAAa,gBAAgB,OAAO,gBAAgB,SAAS,eAAe;CAC1E,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;AACR,CAAC;AAED,SAAgB,OAAO,EAAE,UAAU,GAAG,SAAsB;CAC1D,OAAO,oBAAC,gBAAgB,MAAjB;EAAsB,GAAI;EAAQ;CAA+B,CAAA;AAC1E;AAEA,IAAa,gBAAgB,OAAO,gBAAgB,SAAS,MAAM;CACjE,UAAU;CACV,KAAK;CACL,MAAM;CACN,WAAW;CACX,UAAU;CACV,WAAW;CACX,SAAS;CACT,WAAW;CACX,iBAAiB;CACjB,WAAW;CACX,cAAc;CAEd,YAAY;CACZ,UAAU;CAEV,aAAa,EACX,WAAW,OACb;CAEA,WAAW,EACT,SAAS,OACX;CAEA,UAAU,EACR,WAAW,kBACb;CACA,iBAAiB,EACf,WAAW,EACb;AACF,CAAC;AAED,IAAM,oBAAoB,OAAO,gBAAgB,OAAO;CACtD,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;AACV,CAAC;AAID,IAAa,wBAAwB,MAAM,YAGxC,OAAO,iBACR,oBAAC,mBAAD;CAAmB,SAAA;CACjB,UAAA,oBAAC,YAAD;EAAY,KAAK;EAAc,KAAK,EAAE,OAAO,cAAc;EAAG,cAAW;EAAQ,GAAI;EACnF,UAAA,oBAAC,YAAD,EAAY,eAAA,KAAa,CAAA;CACf,CAAA;AACK,CAAA,CACpB;AAMD,IAAa,gBAAgB,MAAM,YAGhC,EAAE,UAAU,aAAa,SAAS,GAAG,SAAS,iBAC/C,qBAAC,eAAD;CAAe,GAAI;CAAO,KAAK;CAA/B,UAAA,CACG,UACD,oBAAC,uBAAD,EAAuB,cAAY,WAAa,CAAA,CACnC;AAChB,CAAA,CAAA;AAED,IAAa,uBAAuB,gBAAgB;AACpD,IAAa,oBAAoB,gBAAgB;AACjD,IAAa,eAAe,gBAAgB;AAC5C,IAAa,cAAc,gBAAgB;AAC3C,IAAa,gBAAgB,gBAAgB"}
@@ -113,7 +113,10 @@ var NavigationDrawer = require_stitches_config.styled("nav", {
113
113
  });
114
114
  var StyledLink = require_stitches_config.styled("a", baseNavItemCss, { textDecoration: "none" });
115
115
  var StyledButton = require_stitches_config.styled("button", baseNavItemCss);
116
- var NavigationItemWrapper = (props) => props.as === "a" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledLink, { ...props }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledButton, {
116
+ var NavigationItemWrapper = (props) => props.as === "a" ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledLink, {
117
+ "aria-current": props.active ? "page" : void 0,
118
+ ...props
119
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledButton, {
117
120
  type: "button",
118
121
  ...props
119
122
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.cjs","names":["styled","Flex","css","elevationVariants","useMemo"],"sources":["../../../components/Navigation/Navigation.tsx"],"sourcesContent":["import React, { ReactNode, useMemo } from 'react';\n\nimport { CSS, css, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst FlexWithOpacity = styled(Flex, {\n opacity: 0.74,\n\n variants: {\n active: {\n true: {\n opacity: 1,\n },\n },\n },\n});\n\nconst baseNavItemCss = css({\n position: 'relative',\n display: 'flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n backgroundColor: '$navButtonBg',\n color: '$navButtonText',\n border: 'none',\n minHeight: '$7',\n width: '100%',\n px: '$3',\n py: '$2',\n borderRadius: '$3',\n cursor: 'pointer',\n fontFamily: '$rubik',\n fontWeight: '$medium',\n outline: 'none',\n fontSize: '$3',\n mt: '$2',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n\n [`&:focus > ${FlexWithOpacity}, &:hover > ${FlexWithOpacity}`]: {\n opacity: 1,\n },\n\n '&:focus': {\n color: '$navButtonFocusText',\n boxShadow: 'inset 0 0 0 2px $colors$navButtonFocusBorder',\n\n '&::before': {\n backgroundColor: '$navButtonFocusBg',\n },\n '&::after': {\n backgroundColor: '$navButtonFocusBg2',\n opacity: 0.05,\n },\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonHoverText',\n\n '&::before': {\n backgroundColor: '$navButtonHoverBg',\n },\n '&::after': {\n backgroundColor: '$navButtonHoverBg2',\n opacity: 0.05,\n },\n },\n },\n\n '&:first-child': {\n mt: 0,\n },\n\n variants: {\n active: {\n true: {\n color: '$navButtonActiveText',\n\n '&::before': {\n backgroundColor: '$navButtonActiveBg',\n },\n '&::after': {\n backgroundColor: '$navButtonActiveBg2',\n opacity: 0.05,\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonActiveText',\n },\n },\n\n '&:focus': {\n color: '$navButtonActiveText',\n },\n },\n },\n },\n defaultVariants: {\n active: false,\n },\n});\n\nexport const NavigationContainer = styled('div', {\n display: 'flex',\n boxSizing: 'border-box',\n flexDirection: 'column',\n});\n\nexport type NavigationContainerVariants = VariantProps<typeof NavigationContainer>;\nexport type NavigationContainerProps = NavigationContainerVariants & NonNullable<unknown>;\n\nexport const NavigationDrawer = styled('nav', {\n display: 'flex',\n boxSizing: 'border-box',\n padding: '$3',\n maxWidth: '240px',\n flexDirection: 'column',\n variants: {\n elevation: elevationVariants,\n fullWidth: {\n true: {\n px: 0,\n '> *, > div > *,': {\n borderRadius: 0,\n\n '&::before': {\n borderRadius: 0,\n },\n\n '&::after': {\n borderRadius: 0,\n },\n\n '&:focus': {\n border: 'none',\n boxShadow: 'none',\n },\n },\n },\n },\n },\n defaultVariants: {\n elevation: 1,\n fullWidth: false,\n },\n});\n\nexport type NavigationDrawerVariants = VariantProps<typeof NavigationDrawer>;\nexport type NavigationDrawerProps = NavigationDrawerVariants & NonNullable<unknown>;\n\nconst StyledLink = styled('a', baseNavItemCss, {\n textDecoration: 'none',\n});\n\ntype StyledLinkProps = VariantProps<typeof StyledLink> & React.ComponentProps<typeof StyledLink>;\n\nconst StyledButton = styled('button', baseNavItemCss);\n\ntype StyledButtonProps = VariantProps<typeof StyledButton> &\n React.ComponentProps<typeof StyledButton>;\ninterface NavigationItemBaseProps {\n css?: CSS;\n startAdornment?: ReactNode;\n endAdornment?: ReactNode;\n children?: ReactNode;\n active?: boolean;\n}\n\ntype NavigationItemButtonProps = NavigationItemBaseProps &\n StyledButtonProps & {\n as?: 'button';\n };\ntype NavigationItemLinkProps = NavigationItemBaseProps &\n StyledLinkProps &\n React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n as: 'a';\n };\n\nexport type NavigationItemProps = NavigationItemButtonProps | NavigationItemLinkProps;\n\nconst NavigationItemWrapper = (props: NavigationItemProps): JSX.Element =>\n props.as === 'a' ? <StyledLink {...props} /> : <StyledButton type=\"button\" {...props} />;\n\nexport const NavigationItem = ({\n startAdornment,\n endAdornment,\n children,\n ...restProps\n}: NavigationItemProps): JSX.Element => {\n const hasStartAdornment = useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <NavigationItemWrapper {...restProps}>\n {hasStartAdornment && (\n <FlexWithOpacity css={{ pr: '$2', ml: '-$1' }} active={restProps.active}>\n {startAdornment}\n </FlexWithOpacity>\n )}\n <FlexWithOpacity css={{ flexGrow: 1 }} active={restProps.active}>\n {children}\n </FlexWithOpacity>\n {hasEndAdornment && <Flex css={{ pl: '$2', mr: '-$1' }}>{endAdornment}</Flex>}\n </NavigationItemWrapper>\n );\n};\n\nexport type NavigationItemVariants = VariantProps<typeof NavigationItem>;\n\nexport const NavigationLink = (props: Omit<NavigationItemLinkProps, 'as'>) => (\n <NavigationItem as=\"a\" {...props} />\n);\n\nexport type NavigationLinkVariants = VariantProps<typeof NavigationLink>;\n\nexport type NavigationLinkProps = NavigationLinkVariants & NonNullable<unknown>;\n"],"mappings":";;;;;;;;AAMA,IAAM,kBAAkBA,wBAAAA,OAAOC,aAAAA,MAAM;CACnC,SAAS;CAET,UAAU,EACR,QAAQ,EACN,MAAM,EACJ,SAAS,EACX,EACF,EACF;AACF,CAAC;AAED,IAAM,iBAAiBC,wBAAAA,IAAI;CACzB,UAAU;CACV,SAAS;CACT,WAAW;CACX,YAAY;CACZ,iBAAiB;CACjB,OAAO;CACP,QAAQ;CACR,WAAW;CACX,OAAO;CACP,IAAI;CACJ,IAAI;CACJ,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,UAAU;CACV,IAAI;CAEJ,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACN,cAAc;CAChB;CACA,YAAY;EACV,WAAW;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACN,cAAc;CAChB;EAEC,aAAa,gBAAgB,cAAc,oBAAoB,EAC9D,SAAS,EACX;CAEA,WAAW;EACT,OAAO;EACP,WAAW;EAEX,aAAa,EACX,iBAAiB,oBACnB;EACA,YAAY;GACV,iBAAiB;GACjB,SAAS;EACX;CACF;CAEA,UAAU,EACR,WAAW;EACT,OAAO;EAEP,aAAa,EACX,iBAAiB,oBACnB;EACA,YAAY;GACV,iBAAiB;GACjB,SAAS;EACX;CACF,EACF;CAEA,iBAAiB,E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,CAAC,YAAY,CAAC;CAE3E,OACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,uBAAD;EAAuB,GAAI;EAA3B,UAAA;GACG,qBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD;IAAiB,KAAK;KAAE,IAAI;KAAM,IAAI;IAAM;IAAG,QAAQ,UAAU;IAC9D,UAAA;GACc,CAAA;GAEnB,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD;IAAiB,KAAK,EAAE,UAAU,EAAE;IAAG,QAAQ,UAAU;IACtD;GACc,CAAA;GAChB,mBAAmB,iBAAA,GAAA,kBAAA,IAAA,CAACH,aAAAA,MAAD;IAAM,KAAK;KAAE,IAAI;KAAM,IAAI;IAAM;IAAI,UAAA;GAAmB,CAAA;EACvD;;AAE3B;AAIA,IAAa,kBAAkB,UAC7B,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD;CAAgB,IAAG;CAAI,GAAI;AAAQ,CAAA"}
1
+ {"version":3,"file":"Navigation.cjs","names":["styled","Flex","css","elevationVariants","useMemo"],"sources":["../../../components/Navigation/Navigation.tsx"],"sourcesContent":["import React, { ReactNode, useMemo } from 'react';\n\nimport { CSS, css, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst FlexWithOpacity = styled(Flex, {\n opacity: 0.74,\n\n variants: {\n active: {\n true: {\n opacity: 1,\n },\n },\n },\n});\n\nconst baseNavItemCss = css({\n position: 'relative',\n display: 'flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n backgroundColor: '$navButtonBg',\n color: '$navButtonText',\n border: 'none',\n minHeight: '$7',\n width: '100%',\n px: '$3',\n py: '$2',\n borderRadius: '$3',\n cursor: 'pointer',\n fontFamily: '$rubik',\n fontWeight: '$medium',\n outline: 'none',\n fontSize: '$3',\n mt: '$2',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n\n [`&:focus > ${FlexWithOpacity}, &:hover > ${FlexWithOpacity}`]: {\n opacity: 1,\n },\n\n '&:focus': {\n color: '$navButtonFocusText',\n boxShadow: 'inset 0 0 0 2px $colors$navButtonFocusBorder',\n\n '&::before': {\n backgroundColor: '$navButtonFocusBg',\n },\n '&::after': {\n backgroundColor: '$navButtonFocusBg2',\n opacity: 0.05,\n },\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonHoverText',\n\n '&::before': {\n backgroundColor: '$navButtonHoverBg',\n },\n '&::after': {\n backgroundColor: '$navButtonHoverBg2',\n opacity: 0.05,\n },\n },\n },\n\n '&:first-child': {\n mt: 0,\n },\n\n variants: {\n active: {\n true: {\n color: '$navButtonActiveText',\n\n '&::before': {\n backgroundColor: '$navButtonActiveBg',\n },\n '&::after': {\n backgroundColor: '$navButtonActiveBg2',\n opacity: 0.05,\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonActiveText',\n },\n },\n\n '&:focus': {\n color: '$navButtonActiveText',\n },\n },\n },\n },\n defaultVariants: {\n active: false,\n },\n});\n\nexport const NavigationContainer = styled('div', {\n display: 'flex',\n boxSizing: 'border-box',\n flexDirection: 'column',\n});\n\nexport type NavigationContainerVariants = VariantProps<typeof NavigationContainer>;\nexport type NavigationContainerProps = NavigationContainerVariants & NonNullable<unknown>;\n\nexport const NavigationDrawer = styled('nav', {\n display: 'flex',\n boxSizing: 'border-box',\n padding: '$3',\n maxWidth: '240px',\n flexDirection: 'column',\n variants: {\n elevation: elevationVariants,\n fullWidth: {\n true: {\n px: 0,\n '> *, > div > *,': {\n borderRadius: 0,\n\n '&::before': {\n borderRadius: 0,\n },\n\n '&::after': {\n borderRadius: 0,\n },\n\n '&:focus': {\n border: 'none',\n boxShadow: 'none',\n },\n },\n },\n },\n },\n defaultVariants: {\n elevation: 1,\n fullWidth: false,\n },\n});\n\nexport type NavigationDrawerVariants = VariantProps<typeof NavigationDrawer>;\nexport type NavigationDrawerProps = NavigationDrawerVariants & NonNullable<unknown>;\n\nconst StyledLink = styled('a', baseNavItemCss, {\n textDecoration: 'none',\n});\n\ntype StyledLinkProps = VariantProps<typeof StyledLink> & React.ComponentProps<typeof StyledLink>;\n\nconst StyledButton = styled('button', baseNavItemCss);\n\ntype StyledButtonProps = VariantProps<typeof StyledButton> &\n React.ComponentProps<typeof StyledButton>;\ninterface NavigationItemBaseProps {\n css?: CSS;\n startAdornment?: ReactNode;\n endAdornment?: ReactNode;\n children?: ReactNode;\n active?: boolean;\n}\n\ntype NavigationItemButtonProps = NavigationItemBaseProps &\n StyledButtonProps & {\n as?: 'button';\n };\ntype NavigationItemLinkProps = NavigationItemBaseProps &\n StyledLinkProps &\n React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n as: 'a';\n };\n\nexport type NavigationItemProps = NavigationItemButtonProps | NavigationItemLinkProps;\n\nconst NavigationItemWrapper = (props: NavigationItemProps): JSX.Element =>\n props.as === 'a' ? (\n <StyledLink aria-current={props.active ? 'page' : undefined} {...props} />\n ) : (\n <StyledButton type=\"button\" {...props} />\n );\n\nexport const NavigationItem = ({\n startAdornment,\n endAdornment,\n children,\n ...restProps\n}: NavigationItemProps): JSX.Element => {\n const hasStartAdornment = useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <NavigationItemWrapper {...restProps}>\n {hasStartAdornment && (\n <FlexWithOpacity css={{ pr: '$2', ml: '-$1' }} active={restProps.active}>\n {startAdornment}\n </FlexWithOpacity>\n )}\n <FlexWithOpacity css={{ flexGrow: 1 }} active={restProps.active}>\n {children}\n </FlexWithOpacity>\n {hasEndAdornment && <Flex css={{ pl: '$2', mr: '-$1' }}>{endAdornment}</Flex>}\n </NavigationItemWrapper>\n );\n};\n\nexport type NavigationItemVariants = VariantProps<typeof NavigationItem>;\n\nexport const NavigationLink = (props: Omit<NavigationItemLinkProps, 'as'>) => (\n <NavigationItem as=\"a\" {...props} />\n);\n\nexport type NavigationLinkVariants = VariantProps<typeof NavigationLink>;\n\nexport type NavigationLinkProps = NavigationLinkVariants & NonNullable<unknown>;\n"],"mappings":";;;;;;;;AAMA,IAAM,kBAAkBA,wBAAAA,OAAOC,aAAAA,MAAM;CACnC,SAAS;CAET,UAAU,EACR,QAAQ,EACN,MAAM,EACJ,SAAS,EACX,EACF,EACF;AACF,CAAC;AAED,IAAM,iBAAiBC,wBAAAA,IAAI;CACzB,UAAU;CACV,SAAS;CACT,WAAW;CACX,YAAY;CACZ,iBAAiB;CACjB,OAAO;CACP,QAAQ;CACR,WAAW;CACX,OAAO;CACP,IAAI;CACJ,IAAI;CACJ,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,UAAU;CACV,IAAI;CAEJ,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACN,cAAc;CAChB;CACA,YAAY;EACV,WAAW;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACN,cAAc;CAChB;EAEC,aAAa,gBAAgB,cAAc,oBAAoB,EAC9D,SAAS,EACX;CAEA,WAAW;EACT,OAAO;EACP,WAAW;EAEX,aAAa,EACX,iBAAiB,oBACnB;EACA,YAAY;GACV,iBAAiB;GACjB,SAAS;EACX;CACF;CAEA,UAAU,EACR,WAAW;EACT,OAAO;EAEP,aAAa,EACX,iBAAiB,oBACnB;EACA,YAAY;GACV,iBAAiB;GACjB,SAAS;EACX;CACF,EACF;CAEA,iBAAiB,EACf,IAAI,EACN;CAEA,UAAU,EACR,QAAQ,EACN,MAAM;EACJ,OAAO;EAEP,aAAa,EACX,iBAAiB,qBACnB;EACA,YAAY;GACV,iBAAiB;GAC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;EAA3B,UAAA;GACG,qBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD;IAAiB,KAAK;KAAE,IAAI;KAAM,IAAI;IAAM;IAAG,QAAQ,UAAU;IAC9D,UAAA;GACc,CAAA;GAEnB,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD;IAAiB,KAAK,EAAE,UAAU,EAAE;IAAG,QAAQ,UAAU;IACtD;GACc,CAAA;GAChB,mBAAmB,iBAAA,GAAA,kBAAA,IAAA,CAACH,aAAAA,MAAD;IAAM,KAAK;KAAE,IAAI;KAAM,IAAI;IAAM;IAAI,UAAA;GAAmB,CAAA;EACvD;;AAE3B;AAIA,IAAa,kBAAkB,UAC7B,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD;CAAgB,IAAG;CAAI,GAAI;AAAQ,CAAA"}
@@ -111,7 +111,10 @@ var NavigationDrawer = styled("nav", {
111
111
  });
112
112
  var StyledLink = styled("a", baseNavItemCss, { textDecoration: "none" });
113
113
  var StyledButton = styled("button", baseNavItemCss);
114
- var NavigationItemWrapper = (props) => props.as === "a" ? /* @__PURE__ */ jsx(StyledLink, { ...props }) : /* @__PURE__ */ jsx(StyledButton, {
114
+ var NavigationItemWrapper = (props) => props.as === "a" ? /* @__PURE__ */ jsx(StyledLink, {
115
+ "aria-current": props.active ? "page" : void 0,
116
+ ...props
117
+ }) : /* @__PURE__ */ jsx(StyledButton, {
115
118
  type: "button",
116
119
  ...props
117
120
  });
@@ -1 +1 @@
1
- {"version":3,"file":"Navigation.js","names":[],"sources":["../../../components/Navigation/Navigation.tsx"],"sourcesContent":["import React, { ReactNode, useMemo } from 'react';\n\nimport { CSS, css, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst FlexWithOpacity = styled(Flex, {\n opacity: 0.74,\n\n variants: {\n active: {\n true: {\n opacity: 1,\n },\n },\n },\n});\n\nconst baseNavItemCss = css({\n position: 'relative',\n display: 'flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n backgroundColor: '$navButtonBg',\n color: '$navButtonText',\n border: 'none',\n minHeight: '$7',\n width: '100%',\n px: '$3',\n py: '$2',\n borderRadius: '$3',\n cursor: 'pointer',\n fontFamily: '$rubik',\n fontWeight: '$medium',\n outline: 'none',\n fontSize: '$3',\n mt: '$2',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n\n [`&:focus > ${FlexWithOpacity}, &:hover > ${FlexWithOpacity}`]: {\n opacity: 1,\n },\n\n '&:focus': {\n color: '$navButtonFocusText',\n boxShadow: 'inset 0 0 0 2px $colors$navButtonFocusBorder',\n\n '&::before': {\n backgroundColor: '$navButtonFocusBg',\n },\n '&::after': {\n backgroundColor: '$navButtonFocusBg2',\n opacity: 0.05,\n },\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonHoverText',\n\n '&::before': {\n backgroundColor: '$navButtonHoverBg',\n },\n '&::after': {\n backgroundColor: '$navButtonHoverBg2',\n opacity: 0.05,\n },\n },\n },\n\n '&:first-child': {\n mt: 0,\n },\n\n variants: {\n active: {\n true: {\n color: '$navButtonActiveText',\n\n '&::before': {\n backgroundColor: '$navButtonActiveBg',\n },\n '&::after': {\n backgroundColor: '$navButtonActiveBg2',\n opacity: 0.05,\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonActiveText',\n },\n },\n\n '&:focus': {\n color: '$navButtonActiveText',\n },\n },\n },\n },\n defaultVariants: {\n active: false,\n },\n});\n\nexport const NavigationContainer = styled('div', {\n display: 'flex',\n boxSizing: 'border-box',\n flexDirection: 'column',\n});\n\nexport type NavigationContainerVariants = VariantProps<typeof NavigationContainer>;\nexport type NavigationContainerProps = NavigationContainerVariants & NonNullable<unknown>;\n\nexport const NavigationDrawer = styled('nav', {\n display: 'flex',\n boxSizing: 'border-box',\n padding: '$3',\n maxWidth: '240px',\n flexDirection: 'column',\n variants: {\n elevation: elevationVariants,\n fullWidth: {\n true: {\n px: 0,\n '> *, > div > *,': {\n borderRadius: 0,\n\n '&::before': {\n borderRadius: 0,\n },\n\n '&::after': {\n borderRadius: 0,\n },\n\n '&:focus': {\n border: 'none',\n boxShadow: 'none',\n },\n },\n },\n },\n },\n defaultVariants: {\n elevation: 1,\n fullWidth: false,\n },\n});\n\nexport type NavigationDrawerVariants = VariantProps<typeof NavigationDrawer>;\nexport type NavigationDrawerProps = NavigationDrawerVariants & NonNullable<unknown>;\n\nconst StyledLink = styled('a', baseNavItemCss, {\n textDecoration: 'none',\n});\n\ntype StyledLinkProps = VariantProps<typeof StyledLink> & React.ComponentProps<typeof StyledLink>;\n\nconst StyledButton = styled('button', baseNavItemCss);\n\ntype StyledButtonProps = VariantProps<typeof StyledButton> &\n React.ComponentProps<typeof StyledButton>;\ninterface NavigationItemBaseProps {\n css?: CSS;\n startAdornment?: ReactNode;\n endAdornment?: ReactNode;\n children?: ReactNode;\n active?: boolean;\n}\n\ntype NavigationItemButtonProps = NavigationItemBaseProps &\n StyledButtonProps & {\n as?: 'button';\n };\ntype NavigationItemLinkProps = NavigationItemBaseProps &\n StyledLinkProps &\n React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n as: 'a';\n };\n\nexport type NavigationItemProps = NavigationItemButtonProps | NavigationItemLinkProps;\n\nconst NavigationItemWrapper = (props: NavigationItemProps): JSX.Element =>\n props.as === 'a' ? <StyledLink {...props} /> : <StyledButton type=\"button\" {...props} />;\n\nexport const NavigationItem = ({\n startAdornment,\n endAdornment,\n children,\n ...restProps\n}: NavigationItemProps): JSX.Element => {\n const hasStartAdornment = useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <NavigationItemWrapper {...restProps}>\n {hasStartAdornment && (\n <FlexWithOpacity css={{ pr: '$2', ml: '-$1' }} active={restProps.active}>\n {startAdornment}\n </FlexWithOpacity>\n )}\n <FlexWithOpacity css={{ flexGrow: 1 }} active={restProps.active}>\n {children}\n </FlexWithOpacity>\n {hasEndAdornment && <Flex css={{ pl: '$2', mr: '-$1' }}>{endAdornment}</Flex>}\n </NavigationItemWrapper>\n );\n};\n\nexport type NavigationItemVariants = VariantProps<typeof NavigationItem>;\n\nexport const NavigationLink = (props: Omit<NavigationItemLinkProps, 'as'>) => (\n <NavigationItem as=\"a\" {...props} />\n);\n\nexport type NavigationLinkVariants = VariantProps<typeof NavigationLink>;\n\nexport type NavigationLinkProps = NavigationLinkVariants & NonNullable<unknown>;\n"],"mappings":";;;;;;AAMA,IAAM,kBAAkB,OAAO,MAAM;CACnC,SAAS;CAET,UAAU,EACR,QAAQ,EACN,MAAM,EACJ,SAAS,EACX,EACF,EACF;AACF,CAAC;AAED,IAAM,iBAAiB,IAAI;CACzB,UAAU;CACV,SAAS;CACT,WAAW;CACX,YAAY;CACZ,iBAAiB;CACjB,OAAO;CACP,QAAQ;CACR,WAAW;CACX,OAAO;CACP,IAAI;CACJ,IAAI;CACJ,cAAc;CACd,QAAQ;CACR,YAAY;CACZ,YAAY;CACZ,SAAS;CACT,UAAU;CACV,IAAI;CAEJ,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACN,cAAc;CAChB;CACA,YAAY;EACV,WAAW;EACX,SAAS;EACT,UAAU;EACV,KAAK;EACL,OAAO;EACP,QAAQ;EACR,MAAM;EACN,cAAc;CAChB;EAEC,aAAa,gBAAgB,cAAc,oBAAoB,EAC9D,SAAS,EACX;CAEA,WAAW;EACT,OAAO;EACP,WAAW;EAEX,aAAa,EACX,iBAAiB,oBACnB;EACA,YAAY;GACV,iBAAiB;GACjB,SAAS;EACX;CACF;CAEA,UAAU,EACR,WAAW;E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AAC,uBAAD;EAAuB,GAAI;EAA3B,UAAA;GACG,qBACC,oBAAC,iBAAD;IAAiB,KAAK;KAAE,IAAI;KAAM,IAAI;IAAM;IAAG,QAAQ,UAAU;IAC9D,UAAA;GACc,CAAA;GAEnB,oBAAC,iBAAD;IAAiB,KAAK,EAAE,UAAU,EAAE;IAAG,QAAQ,UAAU;IACtD;GACc,CAAA;GAChB,mBAAmB,oBAAC,MAAD;IAAM,KAAK;KAAE,IAAI;KAAM,IAAI;IAAM;IAAI,UAAA;GAAmB,CAAA;EACvD;;AAE3B;AAIA,IAAa,kBAAkB,UAC7B,oBAAC,gBAAD;CAAgB,IAAG;CAAI,GAAI;AAAQ,CAAA"}
1
+ {"version":3,"file":"Navigation.js","names":[],"sources":["../../../components/Navigation/Navigation.tsx"],"sourcesContent":["import React, { ReactNode, useMemo } from 'react';\n\nimport { CSS, css, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst FlexWithOpacity = styled(Flex, {\n opacity: 0.74,\n\n variants: {\n active: {\n true: {\n opacity: 1,\n },\n },\n },\n});\n\nconst baseNavItemCss = css({\n position: 'relative',\n display: 'flex',\n boxSizing: 'border-box',\n alignItems: 'center',\n backgroundColor: '$navButtonBg',\n color: '$navButtonText',\n border: 'none',\n minHeight: '$7',\n width: '100%',\n px: '$3',\n py: '$2',\n borderRadius: '$3',\n cursor: 'pointer',\n fontFamily: '$rubik',\n fontWeight: '$medium',\n outline: 'none',\n fontSize: '$3',\n mt: '$2',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n top: 0,\n right: 0,\n bottom: 0,\n left: 0,\n borderRadius: '$3',\n },\n\n [`&:focus > ${FlexWithOpacity}, &:hover > ${FlexWithOpacity}`]: {\n opacity: 1,\n },\n\n '&:focus': {\n color: '$navButtonFocusText',\n boxShadow: 'inset 0 0 0 2px $colors$navButtonFocusBorder',\n\n '&::before': {\n backgroundColor: '$navButtonFocusBg',\n },\n '&::after': {\n backgroundColor: '$navButtonFocusBg2',\n opacity: 0.05,\n },\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonHoverText',\n\n '&::before': {\n backgroundColor: '$navButtonHoverBg',\n },\n '&::after': {\n backgroundColor: '$navButtonHoverBg2',\n opacity: 0.05,\n },\n },\n },\n\n '&:first-child': {\n mt: 0,\n },\n\n variants: {\n active: {\n true: {\n color: '$navButtonActiveText',\n\n '&::before': {\n backgroundColor: '$navButtonActiveBg',\n },\n '&::after': {\n backgroundColor: '$navButtonActiveBg2',\n opacity: 0.05,\n },\n\n '@hover': {\n '&:hover': {\n color: '$navButtonActiveText',\n },\n },\n\n '&:focus': {\n color: '$navButtonActiveText',\n },\n },\n },\n },\n defaultVariants: {\n active: false,\n },\n});\n\nexport const NavigationContainer = styled('div', {\n display: 'flex',\n boxSizing: 'border-box',\n flexDirection: 'column',\n});\n\nexport type NavigationContainerVariants = VariantProps<typeof NavigationContainer>;\nexport type NavigationContainerProps = NavigationContainerVariants & NonNullable<unknown>;\n\nexport const NavigationDrawer = styled('nav', {\n display: 'flex',\n boxSizing: 'border-box',\n padding: '$3',\n maxWidth: '240px',\n flexDirection: 'column',\n variants: {\n elevation: elevationVariants,\n fullWidth: {\n true: {\n px: 0,\n '> *, > div > *,': {\n borderRadius: 0,\n\n '&::before': {\n borderRadius: 0,\n },\n\n '&::after': {\n borderRadius: 0,\n },\n\n '&:focus': {\n border: 'none',\n boxShadow: 'none',\n },\n },\n },\n },\n },\n defaultVariants: {\n elevation: 1,\n fullWidth: false,\n },\n});\n\nexport type NavigationDrawerVariants = VariantProps<typeof NavigationDrawer>;\nexport type NavigationDrawerProps = NavigationDrawerVariants & NonNullable<unknown>;\n\nconst StyledLink = styled('a', baseNavItemCss, {\n textDecoration: 'none',\n});\n\ntype StyledLinkProps = VariantProps<typeof StyledLink> & React.ComponentProps<typeof StyledLink>;\n\nconst StyledButton = styled('button', baseNavItemCss);\n\ntype StyledButtonProps = VariantProps<typeof StyledButton> &\n React.ComponentProps<typeof StyledButton>;\ninterface NavigationItemBaseProps {\n css?: CSS;\n startAdornment?: ReactNode;\n endAdornment?: ReactNode;\n children?: ReactNode;\n active?: boolean;\n}\n\ntype NavigationItemButtonProps = NavigationItemBaseProps &\n StyledButtonProps & {\n as?: 'button';\n };\ntype NavigationItemLinkProps = NavigationItemBaseProps &\n StyledLinkProps &\n React.AnchorHTMLAttributes<HTMLAnchorElement> & {\n as: 'a';\n };\n\nexport type NavigationItemProps = NavigationItemButtonProps | NavigationItemLinkProps;\n\nconst NavigationItemWrapper = (props: NavigationItemProps): JSX.Element =>\n props.as === 'a' ? (\n <StyledLink aria-current={props.active ? 'page' : undefined} {...props} />\n ) : (\n <StyledButton type=\"button\" {...props} />\n );\n\nexport const NavigationItem = ({\n startAdornment,\n endAdornment,\n children,\n ...restProps\n}: NavigationItemProps): JSX.Element => {\n const hasStartAdornment = useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <NavigationItemWrapper {...restProps}>\n {hasStartAdornment && (\n <FlexWithOpacity css={{ pr: '$2', ml: '-$1' }} active={restProps.active}>\n {startAdornment}\n </FlexWithOpacity>\n )}\n <FlexWithOpacity css={{ flexGrow: 1 }} active={restProps.active}>\n {children}\n </FlexWithOpacity>\n {hasEndAdornment && <Flex css={{ pl: '$2', mr: '-$1' }}>{endAdornment}</Flex>}\n </NavigationItemWrapper>\n );\n};\n\nexport type NavigationItemVariants = VariantProps<typeof NavigationItem>;\n\nexport const NavigationLink = (props: Omit<NavigationItemLinkProps, 'as'>) => (\n <NavigationItem as=\"a\" {...props} />\n);\n\nexport type NavigationLinkVariants = VariantProps<typeof NavigationLink>;\n\nexport type NavigationLinkProps = NavigationLinkVariants & Non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AAAQ,CAAA"}
@@ -31,12 +31,16 @@ var StyledRadio = require_stitches_config.styled("div", require_Radio.RADIO_BASE
31
31
  });
32
32
  var StyledIndicator = require_stitches_config.styled("div", require_Radio.INDICATOR_BASE_STYLES);
33
33
  var StyledRadioAccordionTrigger = require_stitches_config.styled(require_Accordion.StyledAccordionTrigger, { "@hover": { "&:hover": { [`& ${StyledRadio}`]: { boxShadow: "inset 0 0 0 1px $colors$radioHoverBorder" } } } });
34
- var RadioAccordionTrigger = react.default.forwardRef(({ children, ...props }, ref) => {
35
- return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Accordion.StyledAccordionHeader, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledRadioAccordionTrigger, {
36
- ref,
37
- ...props,
38
- children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledRadio, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledIndicator, {}) }), children]
39
- }) });
34
+ var RadioAccordionTrigger = react.default.forwardRef(({ children, headingLevel = 3, ...props }, ref) => {
35
+ const Heading = headingLevel === "none" ? "div" : `h${headingLevel}`;
36
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_Accordion.StyledAccordionHeader, {
37
+ asChild: true,
38
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Heading, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(StyledRadioAccordionTrigger, {
39
+ ref,
40
+ ...props,
41
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledRadio, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(StyledIndicator, {}) }), children]
42
+ }) })
43
+ });
40
44
  });
41
45
  var RadioAccordionContent = require_Accordion.AccordionContent;
42
46
  exports.RadioAccordionContent = RadioAccordionContent;
@@ -1 +1 @@
1
- {"version":3,"file":"RadioAccordion.cjs","names":["AccordionRoot","React","AccordionItem","styled","RADIO_BASE_STYLES","INDICATOR_BASE_STYLES","StyledAccordionTrigger","StyledAccordionHeader","AccordionContent"],"sources":["../../../components/RadioAccordion/RadioAccordion.tsx"],"sourcesContent":["import type { AccordionSingleProps } from '@radix-ui/react-accordion';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport {\n AccordionContent,\n AccordionItem,\n AccordionRoot,\n AccordionTriggerProps,\n StyledAccordionHeader,\n StyledAccordionTrigger,\n} from '../Accordion';\nimport { INDICATOR_BASE_STYLES, RADIO_BASE_STYLES } from '../Radio';\n\nexport interface RadioAccordionRootProps\n extends Omit<AccordionSingleProps, 'type' | 'collapsible'>,\n Omit<VariantProps<typeof AccordionRoot>, 'type' | 'collapsible'> {\n css?: CSS; // could not skipped\n}\n\nexport const RadioAccordionRoot: (props: RadioAccordionRootProps) => JSX.Element = (props) => (\n <AccordionRoot {...props} type=\"single\" collapsible={false} />\n);\n\nexport interface RadioAccordionItemProps\n extends ComponentProps<typeof AccordionItem>,\n VariantProps<typeof AccordionItem> {}\nexport const RadioAccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionItem>,\n RadioAccordionItemProps\n>(({ value, children, ...props }, forwardedRef) => {\n return (\n <AccordionItem\n value={value}\n ref={forwardedRef}\n css={{ display: 'inherit', flexDirection: 'column' }}\n {...props}\n >\n {children}\n </AccordionItem>\n );\n});\n\nconst StyledRadio = styled('div', RADIO_BASE_STYLES, {\n width: 18,\n height: 18,\n mr: '$2',\n '[data-state=open] > &': {\n backgroundColor: '$radioIndicator',\n },\n});\n\nconst StyledIndicator = styled('div', INDICATOR_BASE_STYLES);\n\nconst StyledRadioAccordionTrigger = styled(StyledAccordionTrigger, {\n '@hover': {\n '&:hover': {\n [`& ${StyledRadio}`]: {\n boxShadow: 'inset 0 0 0 1px $colors$radioHoverBorder',\n },\n },\n },\n});\n\nexport interface RadioAccordionTriggerProps extends AccordionTriggerProps {}\nexport const RadioAccordionTrigger = React.forwardRef<\n React.ElementRef<typeof StyledRadioAccordionTrigger>,\n RadioAccordionTriggerProps\n>(({ children, ...props }, ref) => {\n return (\n <StyledAccordionHeader>\n <StyledRadioAccordionTrigger ref={ref} {...props}>\n <StyledRadio>\n <StyledIndicator />\n </StyledRadio>\n {children}\n </StyledRadioAccordionTrigger>\n </StyledAccordionHeader>\n );\n});\n\nexport const RadioAccordionContent = AccordionContent;\n"],"mappings":";;;;;;;;AAoBA,IAAa,sBAAuE,UAClF,iBAAA,GAAA,kBAAA,IAAA,CAACA,kBAAAA,eAAD;CAAe,GAAI;CAAO,MAAK;CAAS,aAAa;AAAQ,CAAA;AAM/D,IAAa,qBAAqBC,MAAAA,QAAM,YAGrC,EAAE,OAAO,UAAU,GAAG,SAAS,iBAAiB;CACjD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,eAAD;EACS;EACP,KAAK;EACL,KAAK;GAAE,SAAS;GAAW,eAAe;EAAS;EACnD,GAAI;EAEH;CACY,CAAA;AAEnB,CAAC;AAED,IAAM,cAAcC,wBAAAA,OAAO,OAAOC,cAAAA,mBAAmB;CACnD,OAAO;CACP,QAAQ;CACR,IAAI;CACJ,yBAAyB,EACvB,iBAAiB,kBACnB;AACF,CAAC;AAED,IAAM,kBAAkBD,wBAAAA,OAAO,OAAOE,cAAAA,qBAAqB;AAE3D,IAAM,8BAA8BF,wBAAAA,OAAOG,kBAAAA,wBAAwB,EACjE,UAAU,EACR,WAAW,GACR,KAAK,gBAAgB,EACpB,WAAW,2CACb,EACF,EACF,EACF,CAAC;AAGD,IAAa,wBAAwBL,MAAAA,QAAM,YAGxC,EAAE,UAAU,GAAG,SAAS,QAAQ;CACjC,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACM,kBAAAA,uBAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,6BAAD;EAAkC;EAAK,GAAI;EAA3C,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD,CAAkB,CAAA,EACP,CAAA,GACZ,QAC0B;CACR,CAAA,EAAA,CAAA;AAE3B,CAAC;AAED,IAAa,wBAAwBC,kBAAAA"}
1
+ {"version":3,"file":"RadioAccordion.cjs","names":["AccordionRoot","React","AccordionItem","styled","RADIO_BASE_STYLES","INDICATOR_BASE_STYLES","StyledAccordionTrigger","StyledAccordionHeader","AccordionContent"],"sources":["../../../components/RadioAccordion/RadioAccordion.tsx"],"sourcesContent":["import type { AccordionSingleProps } from '@radix-ui/react-accordion';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport {\n AccordionContent,\n AccordionItem,\n AccordionRoot,\n AccordionTriggerProps,\n StyledAccordionHeader,\n StyledAccordionTrigger,\n} from '../Accordion';\nimport { INDICATOR_BASE_STYLES, RADIO_BASE_STYLES } from '../Radio';\n\nexport interface RadioAccordionRootProps\n extends\n Omit<AccordionSingleProps, 'type' | 'collapsible'>,\n Omit<VariantProps<typeof AccordionRoot>, 'type' | 'collapsible'> {\n css?: CSS; // could not skipped\n}\n\nexport const RadioAccordionRoot: (props: RadioAccordionRootProps) => JSX.Element = (props) => (\n <AccordionRoot {...props} type=\"single\" collapsible={false} />\n);\n\nexport interface RadioAccordionItemProps\n extends ComponentProps<typeof AccordionItem>, VariantProps<typeof AccordionItem> {}\nexport const RadioAccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionItem>,\n RadioAccordionItemProps\n>(({ value, children, ...props }, forwardedRef) => {\n return (\n <AccordionItem\n value={value}\n ref={forwardedRef}\n css={{ display: 'inherit', flexDirection: 'column' }}\n {...props}\n >\n {children}\n </AccordionItem>\n );\n});\n\nconst StyledRadio = styled('div', RADIO_BASE_STYLES, {\n width: 18,\n height: 18,\n mr: '$2',\n '[data-state=open] > &': {\n backgroundColor: '$radioIndicator',\n },\n});\n\nconst StyledIndicator = styled('div', INDICATOR_BASE_STYLES);\n\nconst StyledRadioAccordionTrigger = styled(StyledAccordionTrigger, {\n '@hover': {\n '&:hover': {\n [`& ${StyledRadio}`]: {\n boxShadow: 'inset 0 0 0 1px $colors$radioHoverBorder',\n },\n },\n },\n});\n\nexport interface RadioAccordionTriggerProps extends Omit<\n AccordionTriggerProps,\n 'customIcon' | 'noIcon'\n> {}\nexport const RadioAccordionTrigger = React.forwardRef<\n React.ElementRef<typeof StyledRadioAccordionTrigger>,\n RadioAccordionTriggerProps\n>(({ children, headingLevel = 3, ...props }, ref) => {\n const Heading = headingLevel === 'none' ? 'div' : (`h${headingLevel}` as const);\n\n return (\n <StyledAccordionHeader asChild>\n <Heading>\n <StyledRadioAccordionTrigger ref={ref} {...props}>\n <StyledRadio>\n <StyledIndicator />\n </StyledRadio>\n {children}\n </StyledRadioAccordionTrigger>\n </Heading>\n </StyledAccordionHeader>\n );\n});\n\nexport const RadioAccordionContent = AccordionContent;\n"],"mappings":";;;;;;;;AAqBA,IAAa,sBAAuE,UAClF,iBAAA,GAAA,kBAAA,IAAA,CAACA,kBAAAA,eAAD;CAAe,GAAI;CAAO,MAAK;CAAS,aAAa;AAAQ,CAAA;AAK/D,IAAa,qBAAqBC,MAAAA,QAAM,YAGrC,EAAE,OAAO,UAAU,GAAG,SAAS,iBAAiB;CACjD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACC,kBAAAA,eAAD;EACS;EACP,KAAK;EACL,KAAK;GAAE,SAAS;GAAW,eAAe;EAAS;EACnD,GAAI;EAEH;CACY,CAAA;AAEnB,CAAC;AAED,IAAM,cAAcC,wBAAAA,OAAO,OAAOC,cAAAA,mBAAmB;CACnD,OAAO;CACP,QAAQ;CACR,IAAI;CACJ,yBAAyB,EACvB,iBAAiB,kBACnB;AACF,CAAC;AAED,IAAM,kBAAkBD,wBAAAA,OAAO,OAAOE,cAAAA,qBAAqB;AAE3D,IAAM,8BAA8BF,wBAAAA,OAAOG,kBAAAA,wBAAwB,EACjE,UAAU,EACR,WAAW,GACR,KAAK,gBAAgB,EACpB,WAAW,2CACb,EACF,EACF,EACF,CAAC;AAMD,IAAa,wBAAwBL,MAAAA,QAAM,YAGxC,EAAE,UAAU,eAAe,GAAG,GAAG,SAAS,QAAQ;CACnD,MAAM,UAAU,iBAAiB,SAAS,QAAS,IAAI;CAEvD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAACM,kBAAAA,uBAAD;EAAuB,SAAA;EACrB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,SAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAA,CAAC,6BAAD;GAAkC;GAAK,GAAI;GAA3C,UAAA,CACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,aAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,iBAAD,CAAkB,CAAA,EACP,CAAA,GACZ,QAC0B;EACtB,CAAA,EAAA,CAAA;CACY,CAAA;AAE3B,CAAC;AAED,IAAa,wBAAwBC,kBAAAA"}
@@ -29,12 +29,16 @@ var StyledRadio = styled("div", RADIO_BASE_STYLES, {
29
29
  });
30
30
  var StyledIndicator = styled("div", INDICATOR_BASE_STYLES);
31
31
  var StyledRadioAccordionTrigger = styled(StyledAccordionTrigger, { "@hover": { "&:hover": { [`& ${StyledRadio}`]: { boxShadow: "inset 0 0 0 1px $colors$radioHoverBorder" } } } });
32
- var RadioAccordionTrigger = React.forwardRef(({ children, ...props }, ref) => {
33
- return /* @__PURE__ */ jsx(StyledAccordionHeader, { children: /* @__PURE__ */ jsxs(StyledRadioAccordionTrigger, {
34
- ref,
35
- ...props,
36
- children: [/* @__PURE__ */ jsx(StyledRadio, { children: /* @__PURE__ */ jsx(StyledIndicator, {}) }), children]
37
- }) });
32
+ var RadioAccordionTrigger = React.forwardRef(({ children, headingLevel = 3, ...props }, ref) => {
33
+ const Heading = headingLevel === "none" ? "div" : `h${headingLevel}`;
34
+ return /* @__PURE__ */ jsx(StyledAccordionHeader, {
35
+ asChild: true,
36
+ children: /* @__PURE__ */ jsx(Heading, { children: /* @__PURE__ */ jsxs(StyledRadioAccordionTrigger, {
37
+ ref,
38
+ ...props,
39
+ children: [/* @__PURE__ */ jsx(StyledRadio, { children: /* @__PURE__ */ jsx(StyledIndicator, {}) }), children]
40
+ }) })
41
+ });
38
42
  });
39
43
  var RadioAccordionContent = AccordionContent;
40
44
  export { RadioAccordionContent, RadioAccordionItem, RadioAccordionRoot, RadioAccordionTrigger };
@@ -1 +1 @@
1
- {"version":3,"file":"RadioAccordion.js","names":[],"sources":["../../../components/RadioAccordion/RadioAccordion.tsx"],"sourcesContent":["import type { AccordionSingleProps } from '@radix-ui/react-accordion';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport {\n AccordionContent,\n AccordionItem,\n AccordionRoot,\n AccordionTriggerProps,\n StyledAccordionHeader,\n StyledAccordionTrigger,\n} from '../Accordion';\nimport { INDICATOR_BASE_STYLES, RADIO_BASE_STYLES } from '../Radio';\n\nexport interface RadioAccordionRootProps\n extends Omit<AccordionSingleProps, 'type' | 'collapsible'>,\n Omit<VariantProps<typeof AccordionRoot>, 'type' | 'collapsible'> {\n css?: CSS; // could not skipped\n}\n\nexport const RadioAccordionRoot: (props: RadioAccordionRootProps) => JSX.Element = (props) => (\n <AccordionRoot {...props} type=\"single\" collapsible={false} />\n);\n\nexport interface RadioAccordionItemProps\n extends ComponentProps<typeof AccordionItem>,\n VariantProps<typeof AccordionItem> {}\nexport const RadioAccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionItem>,\n RadioAccordionItemProps\n>(({ value, children, ...props }, forwardedRef) => {\n return (\n <AccordionItem\n value={value}\n ref={forwardedRef}\n css={{ display: 'inherit', flexDirection: 'column' }}\n {...props}\n >\n {children}\n </AccordionItem>\n );\n});\n\nconst StyledRadio = styled('div', RADIO_BASE_STYLES, {\n width: 18,\n height: 18,\n mr: '$2',\n '[data-state=open] > &': {\n backgroundColor: '$radioIndicator',\n },\n});\n\nconst StyledIndicator = styled('div', INDICATOR_BASE_STYLES);\n\nconst StyledRadioAccordionTrigger = styled(StyledAccordionTrigger, {\n '@hover': {\n '&:hover': {\n [`& ${StyledRadio}`]: {\n boxShadow: 'inset 0 0 0 1px $colors$radioHoverBorder',\n },\n },\n },\n});\n\nexport interface RadioAccordionTriggerProps extends AccordionTriggerProps {}\nexport const RadioAccordionTrigger = React.forwardRef<\n React.ElementRef<typeof StyledRadioAccordionTrigger>,\n RadioAccordionTriggerProps\n>(({ children, ...props }, ref) => {\n return (\n <StyledAccordionHeader>\n <StyledRadioAccordionTrigger ref={ref} {...props}>\n <StyledRadio>\n <StyledIndicator />\n </StyledRadio>\n {children}\n </StyledRadioAccordionTrigger>\n </StyledAccordionHeader>\n );\n});\n\nexport const RadioAccordionContent = AccordionContent;\n"],"mappings":";;;;;;AAoBA,IAAa,sBAAuE,UAClF,oBAAC,eAAD;CAAe,GAAI;CAAO,MAAK;CAAS,aAAa;AAAQ,CAAA;AAM/D,IAAa,qBAAqB,MAAM,YAGrC,EAAE,OAAO,UAAU,GAAG,SAAS,iBAAiB;CACjD,OACE,oBAAC,eAAD;EACS;EACP,KAAK;EACL,KAAK;GAAE,SAAS;GAAW,eAAe;EAAS;EACnD,GAAI;EAEH;CACY,CAAA;AAEnB,CAAC;AAED,IAAM,cAAc,OAAO,OAAO,mBAAmB;CACnD,OAAO;CACP,QAAQ;CACR,IAAI;CACJ,yBAAyB,EACvB,iBAAiB,kBACnB;AACF,CAAC;AAED,IAAM,kBAAkB,OAAO,OAAO,qBAAqB;AAE3D,IAAM,8BAA8B,OAAO,wBAAwB,EACjE,UAAU,EACR,WAAW,GACR,KAAK,gBAAgB,EACpB,WAAW,2CACb,EACF,EACF,EACF,CAAC;AAGD,IAAa,wBAAwB,MAAM,YAGxC,EAAE,UAAU,GAAG,SAAS,QAAQ;CACjC,OACE,oBAAC,uBAAD,EAAA,UACE,qBAAC,6BAAD;EAAkC;EAAK,GAAI;EAA3C,UAAA,CACE,oBAAC,aAAD,EAAA,UACE,oBAAC,iBAAD,CAAkB,CAAA,EACP,CAAA,GACZ,QAC0B;CACR,CAAA,EAAA,CAAA;AAE3B,CAAC;AAED,IAAa,wBAAwB"}
1
+ {"version":3,"file":"RadioAccordion.js","names":[],"sources":["../../../components/RadioAccordion/RadioAccordion.tsx"],"sourcesContent":["import type { AccordionSingleProps } from '@radix-ui/react-accordion';\nimport React, { ComponentProps } from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport {\n AccordionContent,\n AccordionItem,\n AccordionRoot,\n AccordionTriggerProps,\n StyledAccordionHeader,\n StyledAccordionTrigger,\n} from '../Accordion';\nimport { INDICATOR_BASE_STYLES, RADIO_BASE_STYLES } from '../Radio';\n\nexport interface RadioAccordionRootProps\n extends\n Omit<AccordionSingleProps, 'type' | 'collapsible'>,\n Omit<VariantProps<typeof AccordionRoot>, 'type' | 'collapsible'> {\n css?: CSS; // could not skipped\n}\n\nexport const RadioAccordionRoot: (props: RadioAccordionRootProps) => JSX.Element = (props) => (\n <AccordionRoot {...props} type=\"single\" collapsible={false} />\n);\n\nexport interface RadioAccordionItemProps\n extends ComponentProps<typeof AccordionItem>, VariantProps<typeof AccordionItem> {}\nexport const RadioAccordionItem = React.forwardRef<\n React.ElementRef<typeof AccordionItem>,\n RadioAccordionItemProps\n>(({ value, children, ...props }, forwardedRef) => {\n return (\n <AccordionItem\n value={value}\n ref={forwardedRef}\n css={{ display: 'inherit', flexDirection: 'column' }}\n {...props}\n >\n {children}\n </AccordionItem>\n );\n});\n\nconst StyledRadio = styled('div', RADIO_BASE_STYLES, {\n width: 18,\n height: 18,\n mr: '$2',\n '[data-state=open] > &': {\n backgroundColor: '$radioIndicator',\n },\n});\n\nconst StyledIndicator = styled('div', INDICATOR_BASE_STYLES);\n\nconst StyledRadioAccordionTrigger = styled(StyledAccordionTrigger, {\n '@hover': {\n '&:hover': {\n [`& ${StyledRadio}`]: {\n boxShadow: 'inset 0 0 0 1px $colors$radioHoverBorder',\n },\n },\n },\n});\n\nexport interface RadioAccordionTriggerProps extends Omit<\n AccordionTriggerProps,\n 'customIcon' | 'noIcon'\n> {}\nexport const RadioAccordionTrigger = React.forwardRef<\n React.ElementRef<typeof StyledRadioAccordionTrigger>,\n RadioAccordionTriggerProps\n>(({ children, headingLevel = 3, ...props }, ref) => {\n const Heading = headingLevel === 'none' ? 'div' : (`h${headingLevel}` as const);\n\n return (\n <StyledAccordionHeader asChild>\n <Heading>\n <StyledRadioAccordionTrigger ref={ref} {...props}>\n <StyledRadio>\n <StyledIndicator />\n </StyledRadio>\n {children}\n </StyledRadioAccordionTrigger>\n </Heading>\n </StyledAccordionHeader>\n );\n});\n\nexport const RadioAccordionContent = AccordionContent;\n"],"mappings":";;;;;;AAqBA,IAAa,sBAAuE,UAClF,oBAAC,eAAD;CAAe,GAAI;CAAO,MAAK;CAAS,aAAa;AAAQ,CAAA;AAK/D,IAAa,qBAAqB,MAAM,YAGrC,EAAE,OAAO,UAAU,GAAG,SAAS,iBAAiB;CACjD,OACE,oBAAC,eAAD;EACS;EACP,KAAK;EACL,KAAK;GAAE,SAAS;GAAW,eAAe;EAAS;EACnD,GAAI;EAEH;CACY,CAAA;AAEnB,CAAC;AAED,IAAM,cAAc,OAAO,OAAO,mBAAmB;CACnD,OAAO;CACP,QAAQ;CACR,IAAI;CACJ,yBAAyB,EACvB,iBAAiB,kBACnB;AACF,CAAC;AAED,IAAM,kBAAkB,OAAO,OAAO,qBAAqB;AAE3D,IAAM,8BAA8B,OAAO,wBAAwB,EACjE,UAAU,EACR,WAAW,GACR,KAAK,gBAAgB,EACpB,WAAW,2CACb,EACF,EACF,EACF,CAAC;AAMD,IAAa,wBAAwB,MAAM,YAGxC,EAAE,UAAU,eAAe,GAAG,GAAG,SAAS,QAAQ;CACnD,MAAM,UAAU,iBAAiB,SAAS,QAAS,IAAI;CAEvD,OACE,oBAAC,uBAAD;EAAuB,SAAA;EACrB,UAAA,oBAAC,SAAD,EAAA,UACE,qBAAC,6BAAD;GAAkC;GAAK,GAAI;GAA3C,UAAA,CACE,oBAAC,aAAD,EAAA,UACE,oBAAC,iBAAD,CAAkB,CAAA,EACP,CAAA,GACZ,QAC0B;EACtB,CAAA,EAAA,CAAA;CACY,CAAA;AAE3B,CAAC;AAED,IAAa,wBAAwB"}
@@ -0,0 +1,95 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_stitches_config = require("../../stitches.config.cjs");
3
+ let react = require("react");
4
+ react = require_runtime.__toESM(react, 1);
5
+ let react_jsx_runtime = require("react/jsx-runtime");
6
+ let _radix_ui_react_slot = require("@radix-ui/react-slot");
7
+ // components/RowLink/RowLink.tsx
8
+ var ROW_LINK_ATTRIBUTE = "data-row-link";
9
+ var STITCHES_INTERNAL = Symbol.for("sxs.internal");
10
+ var ROW_LINK_Z_INDEX = 1;
11
+ var ROW_LINK_CONTROLS = `:where(a, button, input, select, textarea, [tabindex]):where(:not([${ROW_LINK_ATTRIBUTE}]))`;
12
+ var rowLinkStyles = {
13
+ color: "inherit",
14
+ textDecoration: "none",
15
+ outline: "none",
16
+ "&::after": {
17
+ content: "\"\"",
18
+ position: "absolute",
19
+ inset: 0,
20
+ zIndex: ROW_LINK_Z_INDEX
21
+ },
22
+ "&:focus-visible::after": {
23
+ outlineWidth: "2px",
24
+ outlineStyle: "solid",
25
+ outlineColor: "$focusOutline",
26
+ outlineOffset: "-2px"
27
+ }
28
+ };
29
+ var StyledRowLink = require_stitches_config.styled("a", rowLinkStyles);
30
+ var StyledRowLinkSlot = require_stitches_config.styled(_radix_ui_react_slot.Slot, rowLinkStyles);
31
+ /** Styles for a table that can hold a `RowLink`. */
32
+ var rowLinkTableStyles = { [`&:has([${ROW_LINK_ATTRIBUTE}])`]: { isolation: "isolate" } };
33
+ /** Styles for a table row that can hold a `RowLink`. */
34
+ var rowLinkRowStyles = {
35
+ [`&:has([${ROW_LINK_ATTRIBUTE}])`]: { position: "relative" },
36
+ [`&:has([${ROW_LINK_ATTRIBUTE}]) ${ROW_LINK_CONTROLS}`]: {
37
+ position: "relative",
38
+ zIndex: 2
39
+ }
40
+ };
41
+ /**
42
+ * A link that covers its whole table row, so that a click on the row opens it.
43
+ * Other links and buttons in the row stay above it.
44
+ */
45
+ var RowLink = react.default.forwardRef(({ asChild, ...props }, forwardedRef) => {
46
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(asChild ? StyledRowLinkSlot : StyledRowLink, {
47
+ ref: forwardedRef,
48
+ [ROW_LINK_ATTRIBUTE]: "",
49
+ ...props
50
+ });
51
+ });
52
+ RowLink.displayName = "RowLink";
53
+ var isCellType = (type, cellType) => {
54
+ if (type === cellType) return true;
55
+ if (!type || typeof type !== "object" && typeof type !== "function") return false;
56
+ const { className, [STITCHES_INTERNAL]: internal } = type;
57
+ const cellClassName = cellType.className;
58
+ return internal?.type === cellType || !!cellClassName && className === cellClassName;
59
+ };
60
+ var warnedMessages = /* @__PURE__ */ new Set();
61
+ var warnOnce = (message) => {
62
+ if (typeof process !== "undefined" && process.env.NODE_ENV === "production") return;
63
+ if (!warnedMessages.has(message)) {
64
+ warnedMessages.add(message);
65
+ console.warn(message);
66
+ }
67
+ };
68
+ /** Puts the content of the `cellType` cell at `linkCell` in a `RowLink` to `href`. */
69
+ var withRowLink = (children, { href, linkAs: LinkComponent = "a", linkCell = 0, linkProps }, cellType) => {
70
+ if (href === void 0) return children;
71
+ let cellIndex = -1;
72
+ let linked = false;
73
+ const mapped = react.Children.map(children, (child) => {
74
+ if (!(0, react.isValidElement)(child)) return child;
75
+ cellIndex += 1;
76
+ if (cellIndex !== linkCell || !isCellType(child.type, cellType)) return child;
77
+ linked = true;
78
+ return (0, react.cloneElement)(child, void 0, /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RowLink, {
79
+ asChild: true,
80
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(LinkComponent, {
81
+ ...linkProps,
82
+ href,
83
+ children: child.props.children
84
+ })
85
+ }));
86
+ });
87
+ if (!linked) warnOnce(`Tr: the child at linkCell ${linkCell} is not a Td, so the row has no link. Use a Td for that cell, or put a RowLink in it.`);
88
+ return mapped;
89
+ };
90
+ exports.RowLink = RowLink;
91
+ exports.rowLinkRowStyles = rowLinkRowStyles;
92
+ exports.rowLinkTableStyles = rowLinkTableStyles;
93
+ exports.withRowLink = withRowLink;
94
+
95
+ //# sourceMappingURL=RowLink.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RowLink.cjs","names":["styled","Slot","React","Children","isValidElement","cloneElement"],"sources":["../../../components/RowLink/RowLink.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport React, { Children, cloneElement, ElementType, isValidElement, ReactNode } from 'react';\n\nimport { CSS, styled } from '../../stitches.config';\n\nconst ROW_LINK_ATTRIBUTE = 'data-row-link';\nconst STITCHES_INTERNAL = Symbol.for('sxs.internal');\n\nconst ROW_LINK_Z_INDEX = 1;\nexport const ROW_LINK_CONTROL_Z_INDEX = 2;\nconst ROW_LINK_CONTROLS = `:where(a, button, input, select, textarea, [tabindex]):where(:not([${ROW_LINK_ATTRIBUTE}]))`;\n\nconst rowLinkStyles = {\n color: 'inherit',\n textDecoration: 'none',\n outline: 'none',\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n zIndex: ROW_LINK_Z_INDEX,\n },\n\n '&:focus-visible::after': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: '$focusOutline',\n outlineOffset: '-2px',\n },\n};\n\nconst StyledRowLink = styled('a', rowLinkStyles);\nconst StyledRowLinkSlot = styled(Slot, rowLinkStyles);\n\n/** Styles for a table that can hold a `RowLink`. */\nexport const rowLinkTableStyles = {\n [`&:has([${ROW_LINK_ATTRIBUTE}])`]: {\n isolation: 'isolate',\n },\n};\n\n/** Styles for a table row that can hold a `RowLink`. */\nexport const rowLinkRowStyles = {\n [`&:has([${ROW_LINK_ATTRIBUTE}])`]: {\n position: 'relative',\n },\n // Not at zero specificity, so that it wins over the `all: unset` of controls such as Checkbox.\n [`&:has([${ROW_LINK_ATTRIBUTE}]) ${ROW_LINK_CONTROLS}`]: {\n position: 'relative',\n zIndex: ROW_LINK_CONTROL_Z_INDEX,\n },\n};\n\nexport type RowLinkProps = React.ComponentProps<typeof StyledRowLink> & {\n asChild?: boolean;\n css?: CSS;\n};\n\n/**\n * A link that covers its whole table row, so that a click on the row opens it.\n * Other links and buttons in the row stay above it.\n */\nexport const RowLink = React.forwardRef<HTMLAnchorElement, RowLinkProps>(\n ({ asChild, ...props }, forwardedRef) => {\n const Component = asChild ? StyledRowLinkSlot : StyledRowLink;\n\n return <Component ref={forwardedRef} {...{ [ROW_LINK_ATTRIBUTE]: '' }} {...props} />;\n },\n);\n\nRowLink.displayName = 'RowLink';\n\nexport type RowLinkShortcutProps = {\n href?: string;\n /**\n * The link component, for example a router link. It must pass its props and ref to its `<a>`,\n * and it must be defined outside render, or the link mounts again on each render.\n */\n linkAs?: ElementType;\n /** Other props for the link component, for example `{ returnTo }`. */\n linkProps?: Record<string, unknown>;\n /** The index of the cell that holds the link, among the direct children of the row. */\n linkCell?: number;\n};\n\ntype StitchesType = { className?: string; [STITCHES_INTERNAL]?: { type?: unknown } };\n\n// A Stitches `styled(Td)` keeps the class name of a Stitches Td, or renders a component Td.\n// This reads Stitches 1.x internals; the styled Td tests catch a change in them.\nconst isCellType = (type: unknown, cellType: ElementType) => {\n if (type === cellType) {\n return true;\n }\n if (!type || (typeof type !== 'object' && typeof type !== 'function')) {\n return false;\n }\n const { className, [STITCHES_INTERNAL]: internal } = type as StitchesType;\n const cellClassName = (cellType as StitchesType).className;\n return internal?.type === cellType || (!!cellClassName && className === cellClassName);\n};\n\nconst warnedMessages = new Set<string>();\n\n/** Clears the warnings that were already logged. For tests only. */\nexport const resetRowLinkWarnings = () => warnedMessages.clear();\n\nconst warnOnce = (message: string) => {\n if (typeof process !== 'undefined' && process.env.NODE_ENV === 'production') {\n return;\n }\n if (!warnedMessages.has(message)) {\n warnedMessages.add(message);\n console.warn(message);\n }\n};\n\n/** Puts the content of the `cellType` cell at `linkCell` in a `RowLink` to `href`. */\nexport const withRowLink = (\n children: ReactNode,\n { href, linkAs: LinkComponent = 'a', linkCell = 0, linkProps }: RowLinkShortcutProps,\n cellType: ElementType,\n) => {\n if (href === undefined) {\n return children;\n }\n\n let cellIndex = -1;\n let linked = false;\n // eslint-disable-next-line @eslint-react/no-children-map\n const mapped = Children.map(children, (child) => {\n if (!isValidElement<{ children?: ReactNode }>(child)) {\n return child;\n }\n cellIndex += 1;\n if (cellIndex !== linkCell || !isCellType(child.type, cellType)) {\n return child;\n }\n linked = true;\n // eslint-disable-next-line @eslint-react/no-clone-element\n return cloneElement(\n child,\n undefined,\n <RowLink asChild>\n <LinkComponent {...linkProps} href={href}>\n {child.props.children}\n </LinkComponent>\n </RowLink>,\n );\n });\n\n if (!linked) {\n warnOnce(\n `Tr: the child at linkCell ${linkCell} is not a Td, so the row has no link. Use a Td for that cell, or put a RowLink in it.`,\n );\n }\n\n return mapped;\n};\n"],"mappings":";;;;;;;AAKA,IAAM,qBAAqB;AAC3B,IAAM,oBAAoB,OAAO,IAAI,cAAc;AAEnD,IAAM,mBAAmB;AAEzB,IAAM,oBAAoB,sEAAsE,mBAAmB;AAEnH,IAAM,gBAAgB;CACpB,OAAO;CACP,gBAAgB;CAChB,SAAS;CAET,YAAY;EACV,SAAS;EACT,UAAU;EACV,OAAO;EACP,QAAQ;CACV;CAEA,0BAA0B;EACxB,cAAc;EACd,cAAc;EACd,cAAc;EACd,eAAe;CACjB;AACF;AAEA,IAAM,gBAAgBA,wBAAAA,OAAO,KAAK,aAAa;AAC/C,IAAM,oBAAoBA,wBAAAA,OAAOC,qBAAAA,MAAM,aAAa;;AAGpD,IAAa,qBAAqB,GAC/B,UAAU,mBAAmB,MAAM,EAClC,WAAW,UACb,EACF;;AAGA,IAAa,mBAAmB;EAC7B,UAAU,mBAAmB,MAAM,EAClC,UAAU,WACZ;EAEC,UAAU,mBAAmB,KAAK,sBAAsB;EACvD,UAAU;EACV,QAAA;CACF;AACF;;;;;AA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,MAAM,MAAM;GACA,CAAA;EACR,CAAA,CACX;CACF,CAAC;CAED,IAAI,CAAC,QACH,SACE,6BAA6B,SAAS,sFACxC;CAGF,OAAO;AACT"}
@@ -0,0 +1,90 @@
1
+ import { styled } from "../../stitches.config.js";
2
+ import React, { Children, cloneElement, isValidElement } from "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ import { Slot } from "@radix-ui/react-slot";
5
+ // components/RowLink/RowLink.tsx
6
+ var ROW_LINK_ATTRIBUTE = "data-row-link";
7
+ var STITCHES_INTERNAL = Symbol.for("sxs.internal");
8
+ var ROW_LINK_Z_INDEX = 1;
9
+ var ROW_LINK_CONTROLS = `:where(a, button, input, select, textarea, [tabindex]):where(:not([${ROW_LINK_ATTRIBUTE}]))`;
10
+ var rowLinkStyles = {
11
+ color: "inherit",
12
+ textDecoration: "none",
13
+ outline: "none",
14
+ "&::after": {
15
+ content: "\"\"",
16
+ position: "absolute",
17
+ inset: 0,
18
+ zIndex: ROW_LINK_Z_INDEX
19
+ },
20
+ "&:focus-visible::after": {
21
+ outlineWidth: "2px",
22
+ outlineStyle: "solid",
23
+ outlineColor: "$focusOutline",
24
+ outlineOffset: "-2px"
25
+ }
26
+ };
27
+ var StyledRowLink = styled("a", rowLinkStyles);
28
+ var StyledRowLinkSlot = styled(Slot, rowLinkStyles);
29
+ /** Styles for a table that can hold a `RowLink`. */
30
+ var rowLinkTableStyles = { [`&:has([${ROW_LINK_ATTRIBUTE}])`]: { isolation: "isolate" } };
31
+ /** Styles for a table row that can hold a `RowLink`. */
32
+ var rowLinkRowStyles = {
33
+ [`&:has([${ROW_LINK_ATTRIBUTE}])`]: { position: "relative" },
34
+ [`&:has([${ROW_LINK_ATTRIBUTE}]) ${ROW_LINK_CONTROLS}`]: {
35
+ position: "relative",
36
+ zIndex: 2
37
+ }
38
+ };
39
+ /**
40
+ * A link that covers its whole table row, so that a click on the row opens it.
41
+ * Other links and buttons in the row stay above it.
42
+ */
43
+ var RowLink = React.forwardRef(({ asChild, ...props }, forwardedRef) => {
44
+ return /* @__PURE__ */ jsx(asChild ? StyledRowLinkSlot : StyledRowLink, {
45
+ ref: forwardedRef,
46
+ [ROW_LINK_ATTRIBUTE]: "",
47
+ ...props
48
+ });
49
+ });
50
+ RowLink.displayName = "RowLink";
51
+ var isCellType = (type, cellType) => {
52
+ if (type === cellType) return true;
53
+ if (!type || typeof type !== "object" && typeof type !== "function") return false;
54
+ const { className, [STITCHES_INTERNAL]: internal } = type;
55
+ const cellClassName = cellType.className;
56
+ return internal?.type === cellType || !!cellClassName && className === cellClassName;
57
+ };
58
+ var warnedMessages = /* @__PURE__ */ new Set();
59
+ var warnOnce = (message) => {
60
+ if (typeof process !== "undefined" && process.env.NODE_ENV === "production") return;
61
+ if (!warnedMessages.has(message)) {
62
+ warnedMessages.add(message);
63
+ console.warn(message);
64
+ }
65
+ };
66
+ /** Puts the content of the `cellType` cell at `linkCell` in a `RowLink` to `href`. */
67
+ var withRowLink = (children, { href, linkAs: LinkComponent = "a", linkCell = 0, linkProps }, cellType) => {
68
+ if (href === void 0) return children;
69
+ let cellIndex = -1;
70
+ let linked = false;
71
+ const mapped = Children.map(children, (child) => {
72
+ if (!isValidElement(child)) return child;
73
+ cellIndex += 1;
74
+ if (cellIndex !== linkCell || !isCellType(child.type, cellType)) return child;
75
+ linked = true;
76
+ return cloneElement(child, void 0, /* @__PURE__ */ jsx(RowLink, {
77
+ asChild: true,
78
+ children: /* @__PURE__ */ jsx(LinkComponent, {
79
+ ...linkProps,
80
+ href,
81
+ children: child.props.children
82
+ })
83
+ }));
84
+ });
85
+ if (!linked) warnOnce(`Tr: the child at linkCell ${linkCell} is not a Td, so the row has no link. Use a Td for that cell, or put a RowLink in it.`);
86
+ return mapped;
87
+ };
88
+ export { RowLink, rowLinkRowStyles, rowLinkTableStyles, withRowLink };
89
+
90
+ //# sourceMappingURL=RowLink.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RowLink.js","names":[],"sources":["../../../components/RowLink/RowLink.tsx"],"sourcesContent":["import { Slot } from '@radix-ui/react-slot';\nimport React, { Children, cloneElement, ElementType, isValidElement, ReactNode } from 'react';\n\nimport { CSS, styled } from '../../stitches.config';\n\nconst ROW_LINK_ATTRIBUTE = 'data-row-link';\nconst STITCHES_INTERNAL = Symbol.for('sxs.internal');\n\nconst ROW_LINK_Z_INDEX = 1;\nexport const ROW_LINK_CONTROL_Z_INDEX = 2;\nconst ROW_LINK_CONTROLS = `:where(a, button, input, select, textarea, [tabindex]):where(:not([${ROW_LINK_ATTRIBUTE}]))`;\n\nconst rowLinkStyles = {\n color: 'inherit',\n textDecoration: 'none',\n outline: 'none',\n\n '&::after': {\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n zIndex: ROW_LINK_Z_INDEX,\n },\n\n '&:focus-visible::after': {\n outlineWidth: '2px',\n outlineStyle: 'solid',\n outlineColor: '$focusOutline',\n outlineOffset: '-2px',\n },\n};\n\nconst StyledRowLink = styled('a', rowLinkStyles);\nconst StyledRowLinkSlot = styled(Slot, rowLinkStyles);\n\n/** Styles for a table that can hold a `RowLink`. */\nexport const rowLinkTableStyles = {\n [`&:has([${ROW_LINK_ATTRIBUTE}])`]: {\n isolation: 'isolate',\n },\n};\n\n/** Styles for a table row that can hold a `RowLink`. */\nexport const rowLinkRowStyles = {\n [`&:has([${ROW_LINK_ATTRIBUTE}])`]: {\n position: 'relative',\n },\n // Not at zero specificity, so that it wins over the `all: unset` of controls such as Checkbox.\n [`&:has([${ROW_LINK_ATTRIBUTE}]) ${ROW_LINK_CONTROLS}`]: {\n position: 'relative',\n zIndex: ROW_LINK_CONTROL_Z_INDEX,\n },\n};\n\nexport type RowLinkProps = React.ComponentProps<typeof StyledRowLink> & {\n asChild?: boolean;\n css?: CSS;\n};\n\n/**\n * A link that covers its whole table row, so that a click on the row opens it.\n * Other links and buttons in the row stay above it.\n */\nexport const RowLink = React.forwardRef<HTMLAnchorElement, RowLinkProps>(\n ({ asChild, ...props }, forwardedRef) => {\n const Component = asChild ? StyledRowLinkSlot : StyledRowLink;\n\n return <Component ref={forwardedRef} {...{ [ROW_LINK_ATTRIBUTE]: '' }} {...props} />;\n },\n);\n\nRowLink.displayName = 'RowLink';\n\nexport type RowLinkShortcutProps = {\n href?: string;\n /**\n * The link component, for example a router link. It must pass its props and ref to its `<a>`,\n * and it must be defined outside render, or the link mounts again on each render.\n */\n linkAs?: ElementType;\n /** Other props for the link component, for example `{ returnTo }`. */\n linkProps?: Record<string, unknown>;\n /** The index of the cell that holds the link, among the direct children of the row. */\n linkCell?: number;\n};\n\ntype StitchesType = { className?: string; [STITCHES_INTERNAL]?: { type?: unknown } };\n\n// A Stitches `styled(Td)` keeps the class name of a Stitches Td, or renders a component Td.\n// This reads Stitches 1.x internals; the styled Td tests catch a change in them.\nconst isCellType = (type: unknown, cellType: ElementType) => {\n if (type === cellType) {\n return true;\n }\n if (!type || (typeof type !== 'object' && typeof type !== 'function')) {\n return false;\n }\n const { className, [STITCHES_INTERNAL]: internal } = type as StitchesType;\n const cellClassName = (cellType as StitchesType).className;\n return internal?.type === cellType || (!!cellClassName && className === cellClassName);\n};\n\nconst warnedMessages = new Set<string>();\n\n/** Clears the warnings that were already logged. For tests only. */\nexport const resetRowLinkWarnings = () => warnedMessages.clear();\n\nconst warnOnce = (message: string) => {\n if (typeof process !== 'undefined' && process.env.NODE_ENV === 'production') {\n return;\n }\n if (!warnedMessages.has(message)) {\n warnedMessages.add(message);\n console.warn(message);\n }\n};\n\n/** Puts the content of the `cellType` cell at `linkCell` in a `RowLink` to `href`. */\nexport const withRowLink = (\n children: ReactNode,\n { href, linkAs: LinkComponent = 'a', linkCell = 0, linkProps }: RowLinkShortcutProps,\n cellType: ElementType,\n) => {\n if (href === undefined) {\n return children;\n }\n\n let cellIndex = -1;\n let linked = false;\n // eslint-disable-next-line @eslint-react/no-children-map\n const mapped = Children.map(children, (child) => {\n if (!isValidElement<{ children?: ReactNode }>(child)) {\n return child;\n }\n cellIndex += 1;\n if (cellIndex !== linkCell || !isCellType(child.type, cellType)) {\n return child;\n }\n linked = true;\n // eslint-disable-next-line @eslint-react/no-clone-element\n return cloneElement(\n child,\n undefined,\n <RowLink asChild>\n <LinkComponent {...linkProps} href={href}>\n {child.props.children}\n </LinkComponent>\n </RowLink>,\n );\n });\n\n if (!linked) {\n warnOnce(\n `Tr: the child at linkCell ${linkCell} is not a Td, so the row has no link. Use a Td for that cell, or put a RowLink in it.`,\n );\n }\n\n return mapped;\n};\n"],"mappings":";;;;;AAKA,IAAM,qBAAqB;AAC3B,IAAM,oBAAoB,OAAO,IAAI,cAAc;AAEnD,IAAM,mBAAmB;AAEzB,IAAM,oBAAoB,sEAAsE,mBAAmB;AAEnH,IAAM,gBAAgB;CACpB,OAAO;CACP,gBAAgB;CAChB,SAAS;CAET,YAAY;EACV,SAAS;EACT,UAAU;EACV,OAAO;EACP,QAAQ;CACV;CAEA,0BAA0B;EACxB,cAAc;EACd,cAAc;EACd,cAAc;EACd,eAAe;CACjB;AACF;AAEA,IAAM,gBAAgB,OAAO,KAAK,aAAa;AAC/C,IAAM,oBAAoB,OAAO,MAAM,aAAa;;AAGpD,IAAa,qBAAqB,GAC/B,UAAU,mBAAmB,MAAM,EAClC,WAAW,UACb,EACF;;AAGA,IAAa,mBAAmB;EAC7B,UAAU,mBAAmB,MAAM,EAClC,UAAU,WACZ;EAEC,UAAU,mBAAmB,KAAK,sBAAsB;EACvD,UAAU;EACV,QAAA;CACF;AACF;;;;;AAWA,IAAa,UAAU,MAAM,YAC1B,EAAE,SAAS,GAAG,SAAS,iBAAiB;CAGvC,OAAO,oBAFW,UAAU,oBAAoB,eAEzC;EAAW,KAAK;GAAqB,qBAAqB;EAAM,GAAI;CAAQ,CAAA;AACrF,CACF;AAEA,QAAQ,cAAc;AAmBtB,IAAM,cAAc,MAAe,aAA0B;CAC3D,IAAI,SAAS,UACX,OAAO;CAET,IAAI,CAAC,QAAS,OAAO,SAAS,YAAY,OAAO,SAAS,YACxD,OAAO;CAET,MAAM,EAAE,YAAY,oBAAoB,aAAa;CACrD,MAAM,gBAAiB,SAA0B;CACjD,OAAO,UAAU,SAAS,YAAa,CAAC,CAAC,iBAAiB,cAAc;AAC1E;AAEA,IAAM,iCAAiB,IAAI,IAAY;AAKvC,IAAM,YAAY,YAAoB;CACpC,IAAI,OAAO,YAAY,eAAA,QAAA,IAAA,aAAwC,cAC7D;CAEF,IAAI,CAAC,eAAe,IAAI,OAAO,GAAG;EAChC,eAAe,IAAI,OAAO;EAC1B,QAAQ,KAAK,OAAO;CACtB;AACF;;AAGA,IAAa,eACX,UACA,EAAE,MAAM,QAAQ,gBAAgB,KAAK,WAAW,GAAG,aACnD,aACG;CACH,IAAI,SAAS,KAAA,GACX,OAAO;CAGT,IAAI,YAAY;CAChB,IAAI,SAAS;CAEb,MAAM,SAAS,SAAS,IAAI,WAAW,UAAU;EAC/C,IAAI,CAAC,eAAyC,KAAK,GACjD,OAAO;EAET,aAAa;EACb,IAAI,cAAc,YAAY,CAAC,WAAW,MAAM,MAAM,QAAQ,GAC5D,OAAO;EAET,SAAS;EAET,OAAO,aACL,OACA,KAAA,GACA,oBAAC,SAAD;GAAS,SAAA;GACP,UAAA,oBAAC,eAAD;IAAe,GAAI;IAAiB;IACjC,UAAA,MAAM,MAAM;GACA,CAAA;EACR,CAAA,CACX;CACF,CAAC;CAED,IAAI,CAAC,QACH,SACE,6BAA6B,SAAS,sFACxC;CAGF,OAAO;AACT"}
@@ -84,10 +84,10 @@ var SidePanelCloseIconButton = react.default.forwardRef((props, forwardedRef) =>
84
84
  ref: forwardedRef,
85
85
  css: { color: "$hiContrast" },
86
86
  ...props,
87
- children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_icons.Cross1Icon, {})
87
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_icons.Cross1Icon, { "aria-hidden": true })
88
88
  })
89
89
  }));
90
- var SidePanel = react.default.forwardRef(({ description, noOverlay = false, noCloseIcon = false, children, onOpenChange, open = false, defaultOpen = false, ...props }, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Root, {
90
+ var SidePanel = react.default.forwardRef(({ description, noOverlay = false, noCloseIcon = false, closeLabel = "Close", children, onOpenChange, open = false, defaultOpen = false, ...props }, forwardedRef) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Root, {
91
91
  open,
92
92
  onOpenChange,
93
93
  defaultOpen,
@@ -100,7 +100,7 @@ var SidePanel = react.default.forwardRef(({ description, noOverlay = false, noCl
100
100
  children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_radix_ui_react_dialog.Description, { children: description })
101
101
  }) : null,
102
102
  children,
103
- !noCloseIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidePanelCloseIconButton, {})
103
+ !noCloseIcon && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(SidePanelCloseIconButton, { "aria-label": closeLabel })
104
104
  ]
105
105
  })] })
106
106
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"SidePanel.cjs","names":["keyframes","styled","DialogPrimitive","overlayStyles","React","IconButton","Cross1Icon","VisuallyHidden"],"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>,\n 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 />\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 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 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 />}\n </StyledContent>\n </DialogPrimitive.Portal>\n </DialogPrimitive.Root>\n ),\n);\n"],"mappings":";;;;;;;;;;;;AASA,IAAM,SAASA,wBAAAA,UAAU;CACvB,MAAM,EAAE,SAAS,IAAI;CACrB,IAAI,EAAE,SAAS,IAAI;AACrB,CAAC;AAED,IAAM,UAAUA,wBAAAA,UAAU;CACxB,MAAM,EAAE,SAAS,IAAI;CACrB,IAAI,EAAE,SAAS,IAAI;AACrB,CAAC;AAED,IAAM,mBAAmBC,wBAAAA,OAAOC,uBAAgB,SAASC,gBAAAA,eAAe;CACtE,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CAEN,0BAAwB,EACtB,WAAW,GAAG,OAAO,uCACvB;CAEA,4BAA0B,EACxB,WAAW,GAAG,QAAQ,uCACxB;AACF,CAAC;AAED,IAAM,UAAUH,wBAAAA,UAAU;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,UACA,cACA,OAAO,OACP,cAAc,OACd,GAAG,SAEL,iBAEA,iBAAA,GAAA,kBAAA,IAAA,CAACF,uBAAgB,MAAjB;CAA4B;CAAoB;CAA2B;CACzE,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAACA,uBAAgB,QAAjB,EAAA,UAAA,CACG,CAAC,aAAa,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD,CAAmB,CAAA,GAClC,iBAAA,GAAA,kBAAA,KAAA,CAAC,eAAD;EAAe,GAAI;EAAO,KAAK;EAA/B,UAAA;GACG,cACC,iBAAA,GAAA,kBAAA,IAAA,CAACK,gCAAAA,gBAAD;IAAgB,SAAA;IACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACL,uBAAgB,aAAjB,EAAA,UAA8B,YAAyC,CAAA;GACzD,CAAA,IACd;GACH;GACA,CAAC,eAAe,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAD,CAA2B,CAAA;EAC/B;CACO,CAAA,CAAA,EAAA,CAAA;AACJ,CAAA,CAE1B"}
1
+ {"version":3,"file":"SidePanel.cjs","names":["keyframes","styled","DialogPrimitive","overlayStyles","React","IconButton","Cross1Icon","VisuallyHidden"],"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,SAASA,wBAAAA,UAAU;CACvB,MAAM,EAAE,SAAS,IAAI;CACrB,IAAI,EAAE,SAAS,IAAI;AACrB,CAAC;AAED,IAAM,UAAUA,wBAAAA,UAAU;CACxB,MAAM,EAAE,SAAS,IAAI;CACrB,IAAI,EAAE,SAAS,IAAI;AACrB,CAAC;AAED,IAAM,mBAAmBC,wBAAAA,OAAOC,uBAAgB,SAASC,gBAAAA,eAAe;CACtE,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,MAAM;CAEN,0BAAwB,EACtB,WAAW,GAAG,OAAO,uCACvB;CAEA,4BAA0B,EACxB,WAAW,GAAG,QAAQ,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AAa,YAAYF,MAAAA,QAAM,YAE3B,EACE,aACA,YAAY,OACZ,cAAc,OACd,aAAa,SACb,UACA,cACA,OAAO,OACP,cAAc,OACd,GAAG,SAEL,iBAEA,iBAAA,GAAA,kBAAA,IAAA,CAACF,uBAAgB,MAAjB;CAA4B;CAAoB;CAA2B;CACzE,UAAA,iBAAA,GAAA,kBAAA,KAAA,CAACA,uBAAgB,QAAjB,EAAA,UAAA,CACG,CAAC,aAAa,iBAAA,GAAA,kBAAA,IAAA,CAAC,kBAAD,CAAmB,CAAA,GAClC,iBAAA,GAAA,kBAAA,KAAA,CAAC,eAAD;EAAe,GAAI;EAAO,KAAK;EAA/B,UAAA;GACG,cACC,iBAAA,GAAA,kBAAA,IAAA,CAACK,gCAAAA,gBAAD;IAAgB,SAAA;IACd,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAACL,uBAAgB,aAAjB,EAAA,UAA8B,YAAyC,CAAA;GACzD,CAAA,IACd;GACH;GACA,CAAC,eAAe,iBAAA,GAAA,kBAAA,IAAA,CAAC,0BAAD,EAA0B,cAAY,WAAa,CAAA;EACvD;CACO,CAAA,CAAA,EAAA,CAAA;AACJ,CAAA,CAE1B"}
@@ -81,10 +81,10 @@ var SidePanelCloseIconButton = React.forwardRef((props, forwardedRef) => /* @__P
81
81
  ref: forwardedRef,
82
82
  css: { color: "$hiContrast" },
83
83
  ...props,
84
- children: /* @__PURE__ */ jsx(Cross1Icon, {})
84
+ children: /* @__PURE__ */ jsx(Cross1Icon, { "aria-hidden": true })
85
85
  })
86
86
  }));
87
- var SidePanel = React.forwardRef(({ description, noOverlay = false, noCloseIcon = false, children, onOpenChange, open = false, defaultOpen = false, ...props }, forwardedRef) => /* @__PURE__ */ jsx(DialogPrimitive.Root, {
87
+ var SidePanel = React.forwardRef(({ description, noOverlay = false, noCloseIcon = false, closeLabel = "Close", children, onOpenChange, open = false, defaultOpen = false, ...props }, forwardedRef) => /* @__PURE__ */ jsx(DialogPrimitive.Root, {
88
88
  open,
89
89
  onOpenChange,
90
90
  defaultOpen,
@@ -97,7 +97,7 @@ var SidePanel = React.forwardRef(({ description, noOverlay = false, noCloseIcon
97
97
  children: /* @__PURE__ */ jsx(DialogPrimitive.Description, { children: description })
98
98
  }) : null,
99
99
  children,
100
- !noCloseIcon && /* @__PURE__ */ jsx(SidePanelCloseIconButton, {})
100
+ !noCloseIcon && /* @__PURE__ */ jsx(SidePanelCloseIconButton, { "aria-label": closeLabel })
101
101
  ]
102
102
  })] })
103
103
  }));