@atom-learning/components 6.0.0-beta.14 → 6.0.0-beta.16

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 (46) hide show
  1. package/dist/components/badge/Badge.d.ts +4 -4
  2. package/dist/components/badge/Badge.js +1 -1
  3. package/dist/components/badge/Badge.js.map +1 -1
  4. package/dist/components/carousel/Carousel.d.ts +1 -0
  5. package/dist/components/carousel/CarouselSlide.d.ts +1 -0
  6. package/dist/components/carousel/CarouselSlide.js.map +1 -1
  7. package/dist/components/data-table/DataTableBody.js +1 -1
  8. package/dist/components/data-table/DataTableBody.js.map +1 -1
  9. package/dist/components/data-table/DataTableBulkActions.js +1 -1
  10. package/dist/components/data-table/DataTableBulkActions.js.map +1 -1
  11. package/dist/components/dialog/Dialog.d.ts +1 -1
  12. package/dist/components/dialog/DialogContent.d.ts +1 -1
  13. package/dist/components/dialog/DialogContent.js +1 -1
  14. package/dist/components/dialog/DialogContent.js.map +1 -1
  15. package/dist/components/divider/Divider.d.ts +2 -2
  16. package/dist/components/divider/Divider.js +1 -1
  17. package/dist/components/divider/Divider.js.map +1 -1
  18. package/dist/components/dropdown-menu/DropdownMenu.js.map +1 -1
  19. package/dist/components/form/Form.d.ts +2 -1
  20. package/dist/components/form/Form.js +1 -1
  21. package/dist/components/form/Form.js.map +1 -1
  22. package/dist/components/loader/Loader.js.map +1 -1
  23. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js +1 -1
  24. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.styles.js.map +1 -1
  25. package/dist/components/pagination/Pagination.js +1 -1
  26. package/dist/components/pagination/Pagination.js.map +1 -1
  27. package/dist/components/progress-bar/ProgressBar.d.ts +2 -2
  28. package/dist/components/progress-bar/ProgressBar.js +1 -1
  29. package/dist/components/progress-bar/ProgressBar.js.map +1 -1
  30. package/dist/components/radio-button/RadioButton.d.ts +1 -1
  31. package/dist/components/radio-button/RadioButton.js +1 -1
  32. package/dist/components/radio-button/RadioButton.js.map +1 -1
  33. package/dist/components/radio-button-field/RadioButtonField.d.ts +1 -1
  34. package/dist/components/section-message/SectionMessage.d.ts +3 -1
  35. package/dist/components/section-message/SectionMessage.js.map +1 -1
  36. package/dist/components/select/Select.d.ts +3 -3
  37. package/dist/components/select/Select.js +1 -1
  38. package/dist/components/select/Select.js.map +1 -1
  39. package/dist/docgen.json +1 -1
  40. package/dist/index.cjs.js +1 -1
  41. package/dist/index.cjs.js.map +1 -1
  42. package/dist/styled.d.ts +1 -1
  43. package/dist/styled.js +1 -1
  44. package/dist/styled.js.map +1 -1
  45. package/package.json +1 -1
  46. package/src/responsive-variant-classes.css +1 -1
@@ -13,10 +13,10 @@ declare const StyledBadge: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.
13
13
  } & {
14
14
  as?: React.ElementType;
15
15
  }, "size" | "emphasis" | "isClickable" | "highlighted"> & {
16
- emphasis?: "bold" | "white" | "subtle" | undefined;
17
- size?: "sm" | "md" | "xs" | undefined;
18
- isClickable?: boolean | undefined;
19
- highlighted?: boolean | undefined;
16
+ emphasis?: ("bold" | "white" | "subtle" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "bold" | "white" | "subtle">>) | undefined;
17
+ size?: ("sm" | "md" | "xs" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md" | "xs">>) | undefined;
18
+ isClickable?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
19
+ highlighted?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
20
20
  } & {
21
21
  as?: React.ElementType;
22
22
  }>;
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{Flex as f}from"../flex/Flex.js";import{Icon as v}from"../icon/Icon.js";import{styled as w,Theme as k}from"../../styled.js";import{useCallbackRefState as y}from"../../utilities/hooks/useCallbackRef.js";import{colorSchemes as C,badgeSemanticNames as E}from"./Badge.colorscheme.config.js";import{BadgeContext as B,BadgeProvider as O}from"./Badge.context.js";import{BadgeIcon as a}from"./BadgeIcon.js";import{BadgeText as n}from"./BadgeText.js";import{OptionalTooltipWrapper as z}from"../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js";const T=w(f,{base:["justify-center","items-center","rounded-sm","min-w-none","border","border-white","font-body","*:not-last:mr-1"],variants:{emphasis:{white:["text-(--text-on-white)","bg-white"],subtle:["text-(--text-subtle)","bg-(--background-subtle)"],bold:["text-(--text-bold)","bg-(--background-bold)"]},size:{xs:["px-1"],sm:["px-1","py-0.5"],md:["px-2","py-1"]},isClickable:{true:["cursor-pointer"]},highlighted:{true:[]}},compoundVariants:[{isClickable:!0,emphasis:"white",class:["hover:text-(--text-on-white)","hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]"]},{isClickable:!0,emphasis:"subtle",class:["hover:bg-(--background-subtle-hover)","hover:text-(--text-subtle-hover)"]},{isClickable:!0,emphasis:"bold",class:["hover:bg-(--background-bold-hover)","hover:text-(--text-bold)"]},{emphasis:"white",highlighted:!0,class:["text-(--text-on-white)","bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]"]},{emphasis:"subtle",highlighted:!0,class:["text-(--text-subtle-hover)","(--bg-background-subtle-hover)"]},{emphasis:"bold",highlighted:!0,class:["text-(--text-bold)","bg-(--background-bold-hover)"]}]}),j=e.forwardRef(({theme:r="info",emphasis:s="subtle",children:i,...o},b)=>{const{size:h,overflow:c,isOverflowing:d}=e.useContext(B),[l,p]=y();e.useImperativeHandle(b,()=>l);const g=l==null?void 0:l.textContent,u=E.includes(r),x=Object.keys(o).includes("onClick")||Object.keys(o).includes("href");return e.createElement(z,{hasTooltip:c==="ellipsis"&&d,label:g},e.createElement(k,{theme:C[r]},e.createElement(T,{role:"status",emphasis:s,size:h,...o,ref:p,isClickable:x&&!u},e.Children.map(i,t=>typeof t=="string"||typeof t=="number"?e.createElement(n,null,t):e.isValidElement(t)&&t.type===v?e.createElement(a,{...t.props}):t))))}),m=e.forwardRef(({size:r="sm",overflow:s="wrap",...i},o)=>e.createElement(O,{size:r,overflow:s},e.createElement(j,{...i,ref:o}))),I=Object.assign(m,{Icon:a,Text:n});m.displayName="Badge";export{I as Badge};
1
+ import*as e from"react";import{Flex as f}from"../flex/Flex.js";import{Icon as v}from"../icon/Icon.js";import{styled as w,Theme as k}from"../../styled.js";import{useCallbackRefState as y}from"../../utilities/hooks/useCallbackRef.js";import{colorSchemes as C,badgeSemanticNames as E}from"./Badge.colorscheme.config.js";import{BadgeContext as B,BadgeProvider as O}from"./Badge.context.js";import{BadgeIcon as a}from"./BadgeIcon.js";import{BadgeText as n}from"./BadgeText.js";import{OptionalTooltipWrapper as z}from"../../utilities/optional-tooltip-wrapper/OptionalTooltipWrapper.js";const T=w(f,{base:["justify-center","items-center","rounded-sm","min-w-none","border","border-white","font-body","*:not-last:mr-1"],variants:{emphasis:{white:["text-(--text-on-white)","bg-white"],subtle:["text-(--text-subtle)","bg-(--background-subtle)"],bold:["text-(--text-bold)","bg-(--background-bold)"]},size:{xs:["px-1"],sm:["px-1","py-0.5"],md:["px-2","py-1"]},isClickable:{true:["cursor-pointer"]},highlighted:{true:[]}},compoundVariants:[{isClickable:!0,emphasis:"white",class:["hover:text-(--text-on-white)","hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]"]},{isClickable:!0,emphasis:"subtle",class:["hover:bg-(--background-subtle-hover)","hover:text-(--text-subtle-hover)"]},{isClickable:!0,emphasis:"bold",class:["hover:bg-(--background-bold-hover)","hover:text-(--text-bold)"]},{emphasis:"white",highlighted:!0,class:["text-(--text-on-white)","bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]"]},{emphasis:"subtle",highlighted:!0,class:["text-(--text-subtle-hover)","(--bg-background-subtle-hover)"]},{emphasis:"bold",highlighted:!0,class:["text-(--text-bold)","bg-(--background-bold-hover)"]}]},{enabledResponsiveVariants:!0}),j=e.forwardRef(({theme:s="info",emphasis:r="subtle",children:i,...o},b)=>{const{size:h,overflow:c,isOverflowing:d}=e.useContext(B),[l,p]=y();e.useImperativeHandle(b,()=>l);const g=l==null?void 0:l.textContent,u=E.includes(s),x=Object.keys(o).includes("onClick")||Object.keys(o).includes("href");return e.createElement(z,{hasTooltip:c==="ellipsis"&&d,label:g},e.createElement(k,{theme:C[s]},e.createElement(T,{role:"status",emphasis:r,size:h,...o,ref:p,isClickable:x&&!u},e.Children.map(i,t=>typeof t=="string"||typeof t=="number"?e.createElement(n,null,t):e.isValidElement(t)&&t.type===v?e.createElement(a,{...t.props}):t))))}),m=e.forwardRef(({size:s="sm",overflow:r="wrap",...i},o)=>e.createElement(O,{size:s,overflow:r},e.createElement(j,{...i,ref:o}))),I=Object.assign(m,{Icon:a,Text:n});m.displayName="Badge";export{I as Badge};
2
2
  //# sourceMappingURL=Badge.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.js","sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { Icon } from '~/components/icon'\nimport { styled, Theme } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { OptionalTooltipWrapper } from '~/utilities/optional-tooltip-wrapper'\n\nimport {\n badgeSemanticNames,\n colorSchemes as badgeColorSchemes} from './Badge.colorscheme.config'\nimport { BadgeContext, BadgeProvider } from './Badge.context'\nimport { BadgeIcon } from './BadgeIcon'\nimport { BadgeText } from './BadgeText'\n\nconst StyledBadge = styled(Flex, {\n base: [\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'min-w-none',\n 'border',\n 'border-white',\n 'font-body',\n '*:not-last:mr-1'\n ],\n variants: {\n emphasis: {\n white: ['text-(--text-on-white)', 'bg-white'],\n subtle: ['text-(--text-subtle)', 'bg-(--background-subtle)'],\n bold: ['text-(--text-bold)', 'bg-(--background-bold)']\n },\n size: {\n xs: ['px-1'],\n sm: ['px-1', 'py-0.5'],\n md: ['px-2', 'py-1']\n },\n isClickable: {\n true: ['cursor-pointer']\n },\n highlighted: {\n true: []\n }\n },\n compoundVariants: [\n {\n isClickable: true,\n emphasis: 'white',\n class: [\n 'hover:text-(--text-on-white)',\n 'hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n isClickable: true,\n emphasis: 'subtle',\n class: [\n 'hover:bg-(--background-subtle-hover)',\n 'hover:text-(--text-subtle-hover)'\n ]\n },\n {\n isClickable: true,\n emphasis: 'bold',\n class: ['hover:bg-(--background-bold-hover)', 'hover:text-(--text-bold)']\n },\n {\n emphasis: 'white',\n highlighted: true,\n class: [\n 'text-(--text-on-white)',\n 'bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n emphasis: 'subtle',\n highlighted: true,\n class: ['text-(--text-subtle-hover)', '(--bg-background-subtle-hover)']\n },\n {\n emphasis: 'bold',\n highlighted: true,\n class: ['text-(--text-bold)', 'bg-(--background-bold-hover)']\n }\n ]\n})\n\nexport type TBadgeProps = React.ComponentProps<typeof StyledBadge> & {\n theme?: keyof typeof badgeColorSchemes\n overflow?: React.ComponentProps<typeof BadgeText>['overflow']\n}\n\ntype TBadgeInnerProps = Omit<TBadgeProps, 'size' | 'overflow'>\n\nconst BadgeInner = React.forwardRef<HTMLDivElement, TBadgeInnerProps>(\n ({ theme = 'info', emphasis = 'subtle', children, ...rest }, ref) => {\n const { size, overflow, isOverflowing } = React.useContext(BadgeContext)\n const [badgeElRef, setBadgeElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => badgeElRef as HTMLDivElement)\n\n const label = badgeElRef?.textContent\n\n const isInfoOnly = badgeSemanticNames.includes(theme)\n\n const isClickable =\n Object.keys(rest).includes('onClick') ||\n Object.keys(rest).includes('href')\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={overflow === 'ellipsis' && isOverflowing}\n label={label}\n >\n <Theme theme={badgeColorSchemes[theme]}>\n <StyledBadge\n role=\"status\"\n emphasis={emphasis}\n size={size}\n {...rest}\n ref={setBadgeElRef}\n isClickable={isClickable && !isInfoOnly}\n >\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <BadgeText>{child}</BadgeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n return <BadgeIcon {...child.props} />\n }\n return child\n })}\n </StyledBadge>\n </Theme>\n </OptionalTooltipWrapper>\n )\n }\n)\n\nconst BadgeComponent = React.forwardRef<HTMLDivElement, TBadgeProps>(\n ({ size = 'sm', overflow = 'wrap', ...rest }, ref) => {\n return (\n <BadgeProvider size={size} overflow={overflow}>\n <BadgeInner {...rest} ref={ref} />\n </BadgeProvider>\n )\n }\n)\n\nexport const Badge = Object.assign(BadgeComponent, {\n Icon: BadgeIcon,\n Text: BadgeText\n})\n\nBadgeComponent.displayName = 'Badge'\n"],"names":["StyledBadge","styled","Flex","BadgeInner","React","theme","emphasis","children","rest","ref","size","overflow","isOverflowing","BadgeContext","badgeElRef","setBadgeElRef","useCallbackRefState","label","isInfoOnly","badgeSemanticNames","isClickable","OptionalTooltipWrapper","Theme","badgeColorSchemes","child","BadgeText","Icon","BadgeIcon","BadgeComponent","BadgeProvider","Badge"],"mappings":"okBAeA,MAAMA,EAAcC,EAAOC,EAAM,CAC/B,KAAM,CACJ,iBACA,eACA,aACA,aACA,SACA,eACA,YACA,iBACF,EACA,SAAU,CACR,SAAU,CACR,MAAO,CAAC,yBAA0B,UAAU,EAC5C,OAAQ,CAAC,uBAAwB,0BAA0B,EAC3D,KAAM,CAAC,qBAAsB,wBAAwB,CACvD,EACA,KAAM,CACJ,GAAI,CAAC,MAAM,EACX,GAAI,CAAC,OAAQ,QAAQ,EACrB,GAAI,CAAC,OAAQ,MAAM,CACrB,EACA,YAAa,CACX,KAAM,CAAC,gBAAgB,CACzB,EACA,YAAa,CACX,KAAM,CAAA,CACR,CACF,EACA,iBAAkB,CAChB,CACE,YAAa,GACb,SAAU,QACV,MAAO,CACL,+BACA,iEACF,CACF,EACA,CACE,YAAa,GACb,SAAU,SACV,MAAO,CACL,uCACA,kCACF,CACF,EACA,CACE,YAAa,GACb,SAAU,OACV,MAAO,CAAC,qCAAsC,0BAA0B,CAC1E,EACA,CACE,SAAU,QACV,YAAa,GACb,MAAO,CACL,yBACA,2DACF,CACF,EACA,CACE,SAAU,SACV,YAAa,GACb,MAAO,CAAC,6BAA8B,gCAAgC,CACxE,EACA,CACE,SAAU,OACV,YAAa,GACb,MAAO,CAAC,qBAAsB,8BAA8B,CAC9D,CACF,CACF,CAAC,EASKC,EAAaC,EAAM,WACvB,CAAC,CAAE,MAAAC,EAAQ,OAAQ,SAAAC,EAAW,SAAU,SAAAC,EAAU,GAAGC,CAAK,EAAGC,IAAQ,CACnE,KAAM,CAAE,KAAAC,EAAM,SAAAC,EAAU,cAAAC,CAAc,EAAIR,EAAM,WAAWS,CAAY,EACjE,CAACC,EAAYC,CAAa,EAAIC,EAAoB,EACxDZ,EAAM,oBAAoBK,EAAK,IAAMK,CAA4B,EAEjE,MAAMG,EAAQH,GAAA,YAAAA,EAAY,YAEpBI,EAAaC,EAAmB,SAASd,CAAK,EAE9Ce,EACJ,OAAO,KAAKZ,CAAI,EAAE,SAAS,SAAS,GACpC,OAAO,KAAKA,CAAI,EAAE,SAAS,MAAM,EAEnC,OACEJ,EAAA,cAACiB,EAAA,CACC,WAAYV,IAAa,YAAcC,EACvC,MAAOK,CAEPb,EAAAA,EAAA,cAACkB,EAAA,CAAM,MAAOC,EAAkBlB,CAAK,GACnCD,EAAA,cAACJ,EAAA,CACC,KAAK,SACL,SAAUM,EACV,KAAMI,EACL,GAAGF,EACJ,IAAKO,EACL,YAAaK,GAAe,CAACF,CAE5Bd,EAAAA,EAAM,SAAS,IAAIG,EAAWiB,GACzB,OAAOA,GAAU,UAAY,OAAOA,GAAU,SACzCpB,EAAA,cAACqB,EAAA,KAAWD,CAAM,EAEvBpB,EAAM,eAAeoB,CAAK,GAAKA,EAAM,OAASE,EACzCtB,EAAA,cAACuB,EAAA,CAAW,GAAGH,EAAM,KAAA,CAAO,EAE9BA,CACR,CACH,CACF,CACF,CAEJ,CACF,EAEMI,EAAiBxB,EAAM,WAC3B,CAAC,CAAE,KAAAM,EAAO,KAAM,SAAAC,EAAW,OAAQ,GAAGH,CAAK,EAAGC,IAE1CL,EAAA,cAACyB,EAAA,CAAc,KAAMnB,EAAM,SAAUC,GACnCP,EAAA,cAACD,EAAA,CAAY,GAAGK,EAAM,IAAKC,CAAAA,CAAK,CAClC,CAGN,EAEaqB,EAAQ,OAAO,OAAOF,EAAgB,CACjD,KAAMD,EACN,KAAMF,CACR,CAAC,EAEDG,EAAe,YAAc"}
1
+ {"version":3,"file":"Badge.js","sources":["../../../src/components/badge/Badge.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { Icon } from '~/components/icon'\nimport { styled, Theme } from '~/styled'\nimport { useCallbackRefState } from '~/utilities/hooks/useCallbackRef'\nimport { OptionalTooltipWrapper } from '~/utilities/optional-tooltip-wrapper'\n\nimport {\n colorSchemes as badgeColorSchemes,\n badgeSemanticNames\n} from './Badge.colorscheme.config'\nimport { BadgeContext, BadgeProvider } from './Badge.context'\nimport { BadgeIcon } from './BadgeIcon'\nimport { BadgeText } from './BadgeText'\n\nconst StyledBadge = styled(\n Flex,\n {\n base: [\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'min-w-none',\n 'border',\n 'border-white',\n 'font-body',\n '*:not-last:mr-1'\n ],\n variants: {\n emphasis: {\n white: ['text-(--text-on-white)', 'bg-white'],\n subtle: ['text-(--text-subtle)', 'bg-(--background-subtle)'],\n bold: ['text-(--text-bold)', 'bg-(--background-bold)']\n },\n size: {\n xs: ['px-1'],\n sm: ['px-1', 'py-0.5'],\n md: ['px-2', 'py-1']\n },\n isClickable: {\n true: ['cursor-pointer']\n },\n highlighted: {\n true: []\n }\n },\n compoundVariants: [\n {\n isClickable: true,\n emphasis: 'white',\n class: [\n 'hover:text-(--text-on-white)',\n 'hover:bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n isClickable: true,\n emphasis: 'subtle',\n class: [\n 'hover:bg-(--background-subtle-hover)',\n 'hover:text-(--text-subtle-hover)'\n ]\n },\n {\n isClickable: true,\n emphasis: 'bold',\n class: [\n 'hover:bg-(--background-bold-hover)',\n 'hover:text-(--text-bold)'\n ]\n },\n {\n emphasis: 'white',\n highlighted: true,\n class: [\n 'text-(--text-on-white)',\n 'bg-[color-mix(in_srgb,(--text-on-white),transparent_92%)]'\n ]\n },\n {\n emphasis: 'subtle',\n highlighted: true,\n class: ['text-(--text-subtle-hover)', '(--bg-background-subtle-hover)']\n },\n {\n emphasis: 'bold',\n highlighted: true,\n class: ['text-(--text-bold)', 'bg-(--background-bold-hover)']\n }\n ]\n },\n { enabledResponsiveVariants: true }\n)\n\nexport type TBadgeProps = React.ComponentProps<typeof StyledBadge> & {\n theme?: keyof typeof badgeColorSchemes\n overflow?: React.ComponentProps<typeof BadgeText>['overflow']\n}\n\ntype TBadgeInnerProps = Omit<TBadgeProps, 'size' | 'overflow'>\n\nconst BadgeInner = React.forwardRef<HTMLDivElement, TBadgeInnerProps>(\n ({ theme = 'info', emphasis = 'subtle', children, ...rest }, ref) => {\n const { size, overflow, isOverflowing } = React.useContext(BadgeContext)\n const [badgeElRef, setBadgeElRef] = useCallbackRefState()\n React.useImperativeHandle(ref, () => badgeElRef as HTMLDivElement)\n\n const label = badgeElRef?.textContent\n\n const isInfoOnly = badgeSemanticNames.includes(theme)\n\n const isClickable =\n Object.keys(rest).includes('onClick') ||\n Object.keys(rest).includes('href')\n\n return (\n <OptionalTooltipWrapper\n hasTooltip={overflow === 'ellipsis' && isOverflowing}\n label={label}\n >\n <Theme theme={badgeColorSchemes[theme]}>\n <StyledBadge\n role=\"status\"\n emphasis={emphasis}\n size={size}\n {...rest}\n ref={setBadgeElRef}\n isClickable={isClickable && !isInfoOnly}\n >\n {React.Children.map(children, (child) => {\n if (typeof child === 'string' || typeof child === 'number') {\n return <BadgeText>{child}</BadgeText>\n }\n if (React.isValidElement(child) && child.type === Icon) {\n return <BadgeIcon {...child.props} />\n }\n return child\n })}\n </StyledBadge>\n </Theme>\n </OptionalTooltipWrapper>\n )\n }\n)\n\nconst BadgeComponent = React.forwardRef<HTMLDivElement, TBadgeProps>(\n ({ size = 'sm', overflow = 'wrap', ...rest }, ref) => {\n return (\n <BadgeProvider size={size} overflow={overflow}>\n <BadgeInner {...rest} ref={ref} />\n </BadgeProvider>\n )\n }\n)\n\nexport const Badge = Object.assign(BadgeComponent, {\n Icon: BadgeIcon,\n Text: BadgeText\n})\n\nBadgeComponent.displayName = 'Badge'\n"],"names":["StyledBadge","styled","Flex","BadgeInner","React","theme","emphasis","children","rest","ref","size","overflow","isOverflowing","BadgeContext","badgeElRef","setBadgeElRef","useCallbackRefState","label","isInfoOnly","badgeSemanticNames","isClickable","OptionalTooltipWrapper","Theme","badgeColorSchemes","child","BadgeText","Icon","BadgeIcon","BadgeComponent","BadgeProvider","Badge"],"mappings":"okBAgBA,MAAMA,EAAcC,EAClBC,EACA,CACE,KAAM,CACJ,iBACA,eACA,aACA,aACA,SACA,eACA,YACA,iBACF,EACA,SAAU,CACR,SAAU,CACR,MAAO,CAAC,yBAA0B,UAAU,EAC5C,OAAQ,CAAC,uBAAwB,0BAA0B,EAC3D,KAAM,CAAC,qBAAsB,wBAAwB,CACvD,EACA,KAAM,CACJ,GAAI,CAAC,MAAM,EACX,GAAI,CAAC,OAAQ,QAAQ,EACrB,GAAI,CAAC,OAAQ,MAAM,CACrB,EACA,YAAa,CACX,KAAM,CAAC,gBAAgB,CACzB,EACA,YAAa,CACX,KAAM,CAAA,CACR,CACF,EACA,iBAAkB,CAChB,CACE,YAAa,GACb,SAAU,QACV,MAAO,CACL,+BACA,iEACF,CACF,EACA,CACE,YAAa,GACb,SAAU,SACV,MAAO,CACL,uCACA,kCACF,CACF,EACA,CACE,YAAa,GACb,SAAU,OACV,MAAO,CACL,qCACA,0BACF,CACF,EACA,CACE,SAAU,QACV,YAAa,GACb,MAAO,CACL,yBACA,2DACF,CACF,EACA,CACE,SAAU,SACV,YAAa,GACb,MAAO,CAAC,6BAA8B,gCAAgC,CACxE,EACA,CACE,SAAU,OACV,YAAa,GACb,MAAO,CAAC,qBAAsB,8BAA8B,CAC9D,CACF,CACF,EACA,CAAE,0BAA2B,EAAK,CACpC,EASMC,EAAaC,EAAM,WACvB,CAAC,CAAE,MAAAC,EAAQ,OAAQ,SAAAC,EAAW,SAAU,SAAAC,EAAU,GAAGC,CAAK,EAAGC,IAAQ,CACnE,KAAM,CAAE,KAAAC,EAAM,SAAAC,EAAU,cAAAC,CAAc,EAAIR,EAAM,WAAWS,CAAY,EACjE,CAACC,EAAYC,CAAa,EAAIC,IACpCZ,EAAM,oBAAoBK,EAAK,IAAMK,CAA4B,EAEjE,MAAMG,EAAQH,GAAA,KAAA,OAAAA,EAAY,YAEpBI,EAAaC,EAAmB,SAASd,CAAK,EAE9Ce,EACJ,OAAO,KAAKZ,CAAI,EAAE,SAAS,SAAS,GACpC,OAAO,KAAKA,CAAI,EAAE,SAAS,MAAM,EAEnC,OACEJ,EAAA,cAACiB,EAAA,CACC,WAAYV,IAAa,YAAcC,EACvC,MAAOK,CAAAA,EAEPb,EAAA,cAACkB,EAAA,CAAM,MAAOC,EAAkBlB,CAAK,CACnCD,EAAAA,EAAA,cAACJ,EAAA,CACC,KAAK,SACL,SAAUM,EACV,KAAMI,EACL,GAAGF,EACJ,IAAKO,EACL,YAAaK,GAAe,CAACF,CAE5Bd,EAAAA,EAAM,SAAS,IAAIG,EAAWiB,GACzB,OAAOA,GAAU,UAAY,OAAOA,GAAU,SACzCpB,EAAA,cAACqB,EAAA,KAAWD,CAAM,EAEvBpB,EAAM,eAAeoB,CAAK,GAAKA,EAAM,OAASE,EACzCtB,EAAA,cAACuB,EAAA,CAAW,GAAGH,EAAM,KAAA,CAAO,EAE9BA,CACR,CACH,CACF,CACF,CAEJ,CACF,EAEMI,EAAiBxB,EAAM,WAC3B,CAAC,CAAE,KAAAM,EAAO,KAAM,SAAAC,EAAW,OAAQ,GAAGH,CAAK,EAAGC,IAE1CL,EAAA,cAACyB,EAAA,CAAc,KAAMnB,EAAM,SAAUC,GACnCP,EAAA,cAACD,EAAA,CAAY,GAAGK,EAAM,IAAKC,CAAAA,CAAK,CAClC,CAGN,EAEaqB,EAAQ,OAAO,OAAOF,EAAgB,CACjD,KAAMD,EACN,KAAMF,CACR,CAAC,EAEDG,EAAe,YAAc"}
@@ -29,6 +29,7 @@ export declare const Carousel: {
29
29
  as?: React.ElementType;
30
30
  }>;
31
31
  Slide: ({ children, ...remainingProps }: React.ComponentProps<React.ComponentClass<import("pure-react-carousel").SlideProps, any> | React.FunctionComponent<import("pure-react-carousel").SlideProps>> & {
32
+ className?: string;
32
33
  index: number;
33
34
  }) => React.JSX.Element;
34
35
  Slider: React.ForwardRefExoticComponent<Omit<(import("pure-react-carousel").SliderProps & React.RefAttributes<React.Component<import("pure-react-carousel").SliderProps, any, any>>) | (import("pure-react-carousel").SliderProps & {
@@ -1,5 +1,6 @@
1
1
  import { Slide as BaseSlide } from 'pure-react-carousel';
2
2
  import * as React from 'react';
3
3
  export declare const CarouselSlide: ({ children, ...remainingProps }: React.ComponentProps<typeof BaseSlide> & {
4
+ className?: string;
4
5
  index: number;
5
6
  }) => React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"CarouselSlide.js","sources":["../../../src/components/carousel/CarouselSlide.tsx"],"sourcesContent":["import { Slide as BaseSlide } from 'pure-react-carousel'\nimport * as React from 'react'\n\nexport const CarouselSlide = ({\n children,\n ...remainingProps\n}: React.ComponentProps<typeof BaseSlide> & { index: number }) => (\n <BaseSlide {...remainingProps} tag=\"div\">\n {/* padding to create the gap between slides */}\n <div className=\"px-3\">{children}</div>\n </BaseSlide>\n)\n"],"names":["CarouselSlide","children","remainingProps","React","BaseSlide"],"mappings":"oEAGa,MAAAA,EAAgB,CAAC,CAC5B,SAAAC,EACA,GAAGC,CACL,IACEC,EAAA,cAACC,EAAA,CAAW,GAAGF,EAAgB,IAAI,KAEjCC,EAAAA,EAAA,cAAC,MAAA,CAAI,UAAU,MAAA,EAAQF,CAAS,CAClC"}
1
+ {"version":3,"file":"CarouselSlide.js","sources":["../../../src/components/carousel/CarouselSlide.tsx"],"sourcesContent":["import { Slide as BaseSlide } from 'pure-react-carousel'\nimport * as React from 'react'\n\nexport const CarouselSlide = ({\n children,\n ...remainingProps\n}: React.ComponentProps<typeof BaseSlide> & {\n className?: string\n index: number\n}) => (\n <BaseSlide {...remainingProps} tag=\"div\">\n {/* padding to create the gap between slides */}\n <div className=\"px-3\">{children}</div>\n </BaseSlide>\n)\n"],"names":["CarouselSlide","children","remainingProps","React","BaseSlide"],"mappings":"oEAGa,MAAAA,EAAgB,CAAC,CAC5B,SAAAC,EACA,GAAGC,CACL,IAIEC,EAAA,cAACC,EAAA,CAAW,GAAGF,EAAgB,IAAI,KAEjCC,EAAAA,EAAA,cAAC,MAAA,CAAI,UAAU,MAAA,EAAQF,CAAS,CAClC"}
@@ -1,2 +1,2 @@
1
- import*as o from"react";import{Table as i}from"../table/Table.js";import{useDataTable as n}from"./DataTableContext.js";import{DataTable as p}from"./DataTable.js";const l=({striped:t=!1,rowAction:r,...a})=>{const{getRowModel:m}=n();return o.createElement(i.Body,{...a,striped:t},m().rows.map(e=>o.createElement(p.Row,{row:e,key:e.id,rowAction:r})))};export{l as DataTableBody};
1
+ import*as o from"react";import{useDataTable as i}from"./DataTableContext.js";import{DataTable as n}from"./DataTable.js";import{Table as p}from"../table/Table.js";const l=({striped:t=!1,rowAction:r,...a})=>{const{getRowModel:m}=i();return o.createElement(p.Body,{...a,striped:t},m().rows.map(e=>o.createElement(n.Row,{row:e,key:e.id,rowAction:r})))};export{l as DataTableBody};
2
2
  //# sourceMappingURL=DataTableBody.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableBody.js","sources":["../../../src/components/data-table/DataTableBody.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Table } from '../table'\nimport { DataTable } from '.'\nimport { useDataTable } from './DataTableContext'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nexport const DataTableBody = ({\n striped = false,\n rowAction,\n ...props\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n\n return (\n <Table.Body {...props} striped={striped}>\n {getRowModel().rows.map((row) => {\n return <DataTable.Row row={row} key={row.id} rowAction={rowAction} />\n })}\n </Table.Body>\n )\n}\n"],"names":["DataTableBody","striped","rowAction","props","getRowModel","useDataTable","React","Table","row","DataTable"],"mappings":"kKAaa,MAAAA,EAAgB,CAAC,CAC5B,QAAAC,EAAU,GACV,UAAAC,EACA,GAAGC,CACL,IAA0B,CACxB,KAAM,CAAE,YAAAC,CAAY,EAAIC,EAExB,EAAA,OACEC,EAAA,cAACC,EAAM,KAAN,CAAY,GAAGJ,EAAO,QAASF,CAC7BG,EAAAA,IAAc,KAAK,IAAKI,GAChBF,EAAA,cAACG,EAAU,IAAV,CAAc,IAAKD,EAAK,IAAKA,EAAI,GAAI,UAAWN,CAAW,CAAA,CACpE,CACH,CAEJ"}
1
+ {"version":3,"file":"DataTableBody.js","sources":["../../../src/components/data-table/DataTableBody.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { DataTable } from '.'\nimport { Table } from '../table'\nimport { useDataTable } from './DataTableContext'\n\ntype DataTableBodyProps = Omit<\n React.ComponentProps<typeof Table.Body>,\n 'children'\n> & {\n rowAction?: (row: Record<string, unknown>, event: React.MouseEvent) => void\n}\n\nexport const DataTableBody = ({\n striped = false,\n rowAction,\n ...props\n}: DataTableBodyProps) => {\n const { getRowModel } = useDataTable()\n\n return (\n <Table.Body {...props} striped={striped}>\n {getRowModel().rows.map((row) => {\n return <DataTable.Row row={row} key={row.id} rowAction={rowAction} />\n })}\n </Table.Body>\n )\n}\n"],"names":["DataTableBody","striped","rowAction","props","getRowModel","useDataTable","React","Table","row","DataTable"],"mappings":"kKAaa,MAAAA,EAAgB,CAAC,CAC5B,QAAAC,EAAU,GACV,UAAAC,EACA,GAAGC,CACL,IAA0B,CACxB,KAAM,CAAE,YAAAC,CAAY,EAAIC,EAExB,EAAA,OACEC,EAAA,cAACC,EAAM,KAAN,CAAY,GAAGJ,EAAO,QAASF,CAC7BG,EAAAA,IAAc,KAAK,IAAKI,GAChBF,EAAA,cAACG,EAAU,IAAV,CAAc,IAAKD,EAAK,IAAKA,EAAI,GAAI,UAAWN,CAAW,CAAA,CACpE,CACH,CAEJ"}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{Button as i}from"../button/Button.js";import{Divider as m}from"../divider/Divider.js";import{styled as s}from"../../styled.js";import{Flex as a}from"../flex/Flex.js";import{useDataTable as o}from"./DataTableContext.js";import{DataTable as u}from"./DataTable.js";const d=s(a,{base:["p-2","w-full","mb-2","justify-between","items-center","min-h-16","rounded-t-sm"],variants:{isRowSelected:{true:["bg-primary-100"]}}}),b=({children:l})=>{const{rowSelection:t}=o();return Object.keys(t||{}).length>0?null:l},f=({cancelLabel:l="Cancel",children:t})=>{const{toggleAllPageRowsSelected:n,rowSelection:r}=o(),c=()=>n(!1);return Object.keys(r||{}).length===0?null:e.createElement(e.Fragment,null,t,e.Children.count(t)>0&&e.createElement(m,{orientation:"vertical",className:"mx-4"}),e.createElement(i,{theme:"neutral",onClick:c},l))},p=Object.assign(({children:l,...t})=>{const{rowSelection:n}=o(),r=Object.keys(n||{}).length>0;return e.createElement(d,{isRowSelected:r,...t},e.createElement(u.MetaData,null),e.createElement(a,{className:"items-center justify-end"},l))},{DefaultActions:b,SelectedRowActions:f});export{p as DataTableBulkActions};
1
+ import*as e from"react";import{Button as i}from"../button/Button.js";import{Divider as m}from"../divider/Divider.js";import{styled as s}from"../../styled.js";import{useDataTable as o}from"./DataTableContext.js";import{DataTable as u}from"./DataTable.js";import{Flex as a}from"../flex/Flex.js";const d=s(a,{base:["p-2","w-full","mb-2","justify-between","items-center","min-h-16","rounded-t-sm"],variants:{isRowSelected:{true:["bg-primary-100"]}}}),b=({children:l})=>{const{rowSelection:t}=o();return Object.keys(t||{}).length>0?null:l},f=({cancelLabel:l="Cancel",children:t})=>{const{toggleAllPageRowsSelected:n,rowSelection:r}=o(),c=()=>n(!1);return Object.keys(r||{}).length===0?null:e.createElement(e.Fragment,null,t,e.Children.count(t)>0&&e.createElement(m,{orientation:"vertical",className:"mx-4"}),e.createElement(i,{theme:"neutral",onClick:c},l))},p=Object.assign(({children:l,...t})=>{const{rowSelection:n}=o(),r=Object.keys(n||{}).length>0;return e.createElement(d,{isRowSelected:r,...t},e.createElement(u.MetaData,null),e.createElement(a,{className:"items-center justify-end"},l))},{DefaultActions:b,SelectedRowActions:f});export{p as DataTableBulkActions};
2
2
  //# sourceMappingURL=DataTableBulkActions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataTableBulkActions.js","sources":["../../../src/components/data-table/DataTableBulkActions.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Button } from '~/components/button'\nimport { Divider } from '~/components/divider'\nimport { styled } from '~/styled'\n\nimport { Flex } from '../flex'\nimport { DataTable } from '.'\nimport { useDataTable } from './DataTableContext'\n\nconst StyledContainer = styled(Flex, {\n base: [\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement\n}): React.ReactElement | null => {\n const { rowSelection } = useDataTable()\n\n if (Object.keys(rowSelection || {}).length > 0) return null\n\n return children\n}\n\nconst BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n children\n}: {\n cancelLabel?: string\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n\nexport const DataTableBulkActions = Object.assign(\n ({\n children,\n ...rest\n }: {\n children:\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n | [\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >,\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n ]\n }) => {\n const { rowSelection } = useDataTable()\n\n const isRowSelected = Object.keys(rowSelection || {}).length > 0\n\n return (\n <StyledContainer isRowSelected={isRowSelected} {...rest}>\n <DataTable.MetaData />\n\n <Flex className=\"items-center justify-end\">{children}</Flex>\n </StyledContainer>\n )\n },\n {\n DefaultActions: BulkActionsDefaultActions,\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n"],"names":["StyledContainer","styled","Flex","BulkActionsDefaultActions","children","rowSelection","useDataTable","BulkActionsSelectedRowActions","cancelLabel","toggleAllPageRowsSelected","handleDeselectAllPageRows","React","Divider","Button","DataTableBulkActions","rest","isRowSelected","DataTable"],"mappings":"qSAUA,MAAMA,EAAkBC,EAAOC,EAAM,CACnC,KAAM,CACJ,MACA,SACA,OACA,kBACA,eACA,WACA,cACF,EACA,SAAU,CACR,cAAe,CACb,KAAM,CAAC,gBAAgB,CACzB,CACF,CACF,CAAC,EAEKC,EAA4B,CAAC,CACjC,SAAAC,CACF,IAEiC,CAC/B,KAAM,CAAE,aAAAC,CAAa,EAAIC,EAEzB,EAAA,OAAI,OAAO,KAAKD,GAAgB,EAAE,EAAE,OAAS,EAAU,KAEhDD,CACT,EAEMG,EAAgC,CAAC,CACrC,YAAAC,EAAc,SACd,SAAAJ,CACF,IAGM,CACJ,KAAM,CAAE,0BAAAK,EAA2B,aAAAJ,CAAa,EAAIC,EAE9CI,EAAAA,EAA4B,IAAMD,EAA0B,EAAK,EAEvE,OAAI,OAAO,KAAKJ,GAAgB,CAAE,CAAA,EAAE,SAAW,EAAU,KAGvDM,EAAA,cAAAA,EAAA,SAAA,KACGP,EACAO,EAAM,SAAS,MAAMP,CAAQ,EAAI,GAChCO,EAAA,cAACC,EAAA,CAAQ,YAAY,WAAW,UAAU,MAAO,CAAA,EAEnDD,EAAA,cAACE,EAAA,CAAO,MAAM,UAAU,QAASH,GAC9BF,CACH,CACF,CAEJ,EAEaM,EAAuB,OAAO,OACzC,CAAC,CACC,SAAAV,EACA,GAAGW,CACL,IAgBM,CACJ,KAAM,CAAE,aAAAV,CAAa,EAAIC,EAAa,EAEhCU,EAAgB,OAAO,KAAKX,GAAgB,CAAE,CAAA,EAAE,OAAS,EAE/D,OACEM,EAAA,cAACX,EAAA,CAAgB,cAAegB,EAAgB,GAAGD,CAAAA,EACjDJ,EAAA,cAACM,EAAU,SAAV,IAAmB,EAEpBN,EAAA,cAACT,EAAA,CAAK,UAAU,0BAA4BE,EAAAA,CAAS,CACvD,CAEJ,EACA,CACE,eAAgBD,EAChB,mBAAoBI,CACtB,CACF"}
1
+ {"version":3,"file":"DataTableBulkActions.js","sources":["../../../src/components/data-table/DataTableBulkActions.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Button } from '~/components/button'\nimport { Divider } from '~/components/divider'\nimport { styled } from '~/styled'\n\nimport { DataTable } from '.'\nimport { Flex } from '../flex'\nimport { useDataTable } from './DataTableContext'\n\nconst StyledContainer = styled(Flex, {\n base: [\n 'p-2',\n 'w-full',\n 'mb-2',\n 'justify-between',\n 'items-center',\n 'min-h-16',\n 'rounded-t-sm'\n ],\n variants: {\n isRowSelected: {\n true: ['bg-primary-100']\n }\n }\n})\n\nconst BulkActionsDefaultActions = ({\n children\n}: {\n children: React.ReactElement\n}): React.ReactElement | null => {\n const { rowSelection } = useDataTable()\n\n if (Object.keys(rowSelection || {}).length > 0) return null\n\n return children\n}\n\nconst BulkActionsSelectedRowActions = ({\n cancelLabel = 'Cancel',\n children\n}: {\n cancelLabel?: string\n children: React.ReactNode\n}) => {\n const { toggleAllPageRowsSelected, rowSelection } = useDataTable()\n\n const handleDeselectAllPageRows = () => toggleAllPageRowsSelected(false)\n\n if (Object.keys(rowSelection || {}).length === 0) return null\n\n return (\n <>\n {children}\n {React.Children.count(children) > 0 && (\n <Divider orientation=\"vertical\" className=\"mx-4\" />\n )}\n <Button theme=\"neutral\" onClick={handleDeselectAllPageRows}>\n {cancelLabel}\n </Button>\n </>\n )\n}\n\nexport const DataTableBulkActions = Object.assign(\n ({\n children,\n ...rest\n }: {\n children:\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >\n | React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n | [\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsDefaultActions>\n >,\n React.ReactElement<\n React.ComponentProps<typeof BulkActionsSelectedRowActions>\n >\n ]\n }) => {\n const { rowSelection } = useDataTable()\n\n const isRowSelected = Object.keys(rowSelection || {}).length > 0\n\n return (\n <StyledContainer isRowSelected={isRowSelected} {...rest}>\n <DataTable.MetaData />\n\n <Flex className=\"items-center justify-end\">{children}</Flex>\n </StyledContainer>\n )\n },\n {\n DefaultActions: BulkActionsDefaultActions,\n SelectedRowActions: BulkActionsSelectedRowActions\n }\n)\n"],"names":["StyledContainer","styled","Flex","BulkActionsDefaultActions","children","rowSelection","useDataTable","BulkActionsSelectedRowActions","cancelLabel","toggleAllPageRowsSelected","handleDeselectAllPageRows","React","Divider","Button","DataTableBulkActions","rest","isRowSelected","DataTable"],"mappings":"qSAUA,MAAMA,EAAkBC,EAAOC,EAAM,CACnC,KAAM,CACJ,MACA,SACA,OACA,kBACA,eACA,WACA,cACF,EACA,SAAU,CACR,cAAe,CACb,KAAM,CAAC,gBAAgB,CACzB,CACF,CACF,CAAC,EAEKC,EAA4B,CAAC,CACjC,SAAAC,CACF,IAEiC,CAC/B,KAAM,CAAE,aAAAC,CAAa,EAAIC,EAEzB,EAAA,OAAI,OAAO,KAAKD,GAAgB,EAAE,EAAE,OAAS,EAAU,KAEhDD,CACT,EAEMG,EAAgC,CAAC,CACrC,YAAAC,EAAc,SACd,SAAAJ,CACF,IAGM,CACJ,KAAM,CAAE,0BAAAK,EAA2B,aAAAJ,CAAa,EAAIC,EAE9CI,EAAAA,EAA4B,IAAMD,EAA0B,EAAK,EAEvE,OAAI,OAAO,KAAKJ,GAAgB,CAAE,CAAA,EAAE,SAAW,EAAU,KAGvDM,EAAA,cAAAA,EAAA,SAAA,KACGP,EACAO,EAAM,SAAS,MAAMP,CAAQ,EAAI,GAChCO,EAAA,cAACC,EAAA,CAAQ,YAAY,WAAW,UAAU,MAAO,CAAA,EAEnDD,EAAA,cAACE,EAAA,CAAO,MAAM,UAAU,QAASH,GAC9BF,CACH,CACF,CAEJ,EAEaM,EAAuB,OAAO,OACzC,CAAC,CACC,SAAAV,EACA,GAAGW,CACL,IAgBM,CACJ,KAAM,CAAE,aAAAV,CAAa,EAAIC,EAAa,EAEhCU,EAAgB,OAAO,KAAKX,GAAgB,CAAE,CAAA,EAAE,OAAS,EAE/D,OACEM,EAAA,cAACX,EAAA,CAAgB,cAAegB,EAAgB,GAAGD,CAAAA,EACjDJ,EAAA,cAACM,EAAU,SAAV,IAAmB,EAEpBN,EAAA,cAACT,EAAA,CAAK,UAAU,0BAA4BE,EAAAA,CAAS,CACvD,CAEJ,EACA,CACE,eAAgBD,EAChB,mBAAoBI,CACtB,CACF"}
@@ -6,7 +6,7 @@ export declare const Dialog: import("react").FC<import("@radix-ui/react-dialog")
6
6
  }>;
7
7
  Close: import("react").ForwardRefExoticComponent<import("@radix-ui/react-dialog").DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
8
8
  Content: ({ size, children, closeDialogText, showCloseButton, ...remainingProps }: Omit<import("@radix-ui/react-dialog").DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "size"> & {
9
- size?: "sm" | "md" | "lg" | "xs" | "xl" | "fullscreen" | undefined;
9
+ size?: ("sm" | "md" | "lg" | "xs" | "xl" | "fullscreen" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md" | "lg" | "xs" | "xl" | "fullscreen">>) | undefined;
10
10
  } & {
11
11
  as?: import("react").ElementType;
12
12
  } & {
@@ -1,6 +1,6 @@
1
1
  import * as React from 'react';
2
2
  declare const StyledDialogContent: React.ForwardRefExoticComponent<Omit<import("@radix-ui/react-dialog").DialogContentProps & React.RefAttributes<HTMLDivElement>, "size"> & {
3
- size?: "sm" | "md" | "lg" | "xs" | "xl" | "fullscreen" | undefined;
3
+ size?: ("sm" | "md" | "lg" | "xs" | "xl" | "fullscreen" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md" | "lg" | "xs" | "xl" | "fullscreen">>) | undefined;
4
4
  } & {
5
5
  as?: React.ElementType;
6
6
  }>;
@@ -1,2 +1,2 @@
1
- import{Close as p}from"@atom-learning/icons";import{Overlay as u,Content as c,Portal as v,Close as f}from"@radix-ui/react-dialog";import*as o from"react";import{styled as n}from"../../styled.js";import{backdropOverlay as w}from"../../utilities/style/backdrop-overlay.js";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Icon as g}from"../icon/Icon.js";import{DialogBackground as r}from"./DialogBackground.js";const l="modal_overlay",C=n(u,{base:w}),t=["w-auto","h-auto","max-w-none","max-h-none","supports-[height:100svh]:h-auto","supports-[height:100svh]:max-h-none"],b=n(c,{base:["-translate-1/2","bg-white","shadow-xl","box-border","left-1/2","max-w-[90vw]","max-h-[90vh]","overflow-y-auto","p-8","fixed","top-1/2","z-1147483646","focus:outline-none","motion-safe:data-[state=open]:animate-slide-in-center","motion-safe:data-[state=closed]:animate-slide-out-center"],variants:{size:{xs:[...t,"rounded-md","w-95"],sm:[...t,"rounded-md","w-120"],md:[...t,"rounded-md","w-150"],lg:[...t,"rounded-md","w-200"],xl:[...t,"rounded-md","w-275"],fullscreen:["w-screen","h-screen","max-w-screen","max-h-screen","supports-[height:100svh]:h-svh","supports-[height:100svh]:max-h-svh"]}}}),y=({size:i="sm",children:a,closeDialogText:m="Close dialog",showCloseButton:d=!0,...h})=>o.createElement(v,null,o.createElement(C,{id:l},o.Children.map(a,e=>(e==null?void 0:e.type)===r&&e),o.createElement(b,{size:i,"aria-label":"Dialog",onPointerDownOutside:e=>{const s=e.target;(s==null?void 0:s.id)!==l&&e.preventDefault()},...h},d&&o.createElement(x,{as:f,label:m,hasTooltip:!1,size:"md",theme:"neutral",className:"absolute top-4 right-4 size-12"},o.createElement(g,{is:p})),o.Children.map(a,e=>(e==null?void 0:e.type)!==r&&e))));export{y as DialogContent};
1
+ import{Close as p}from"@atom-learning/icons";import{Overlay as u,Content as c,Portal as v,Close as f}from"@radix-ui/react-dialog";import*as o from"react";import{styled as n}from"../../styled.js";import{backdropOverlay as w}from"../../utilities/style/backdrop-overlay.js";import{ActionIcon as x}from"../action-icon/ActionIcon.js";import{Icon as g}from"../icon/Icon.js";import{DialogBackground as r}from"./DialogBackground.js";const l="modal_overlay",b=n(u,{base:w}),t=["w-auto","h-auto","max-w-none","max-h-none","supports-[height:100svh]:h-auto","supports-[height:100svh]:max-h-none"],C=n(c,{base:["-translate-1/2","bg-white","shadow-xl","box-border","left-1/2","max-w-[90vw]","max-h-[90vh]","overflow-y-auto","p-8","fixed","top-1/2","z-1147483646","focus:outline-none","motion-safe:data-[state=open]:animate-slide-in-center","motion-safe:data-[state=closed]:animate-slide-out-center"],variants:{size:{xs:[...t,"rounded-md","w-95"],sm:[...t,"rounded-md","w-120"],md:[...t,"rounded-md","w-150"],lg:[...t,"rounded-md","w-200"],xl:[...t,"rounded-md","w-275"],fullscreen:["w-screen","h-screen","max-w-screen","max-h-screen","supports-[height:100svh]:h-svh","supports-[height:100svh]:max-h-svh"]}}},{enabledResponsiveVariants:!0}),y=({size:i="sm",children:a,closeDialogText:m="Close dialog",showCloseButton:d=!0,...h})=>o.createElement(v,null,o.createElement(b,{id:l},o.Children.map(a,e=>(e==null?void 0:e.type)===r&&e),o.createElement(C,{size:i,"aria-label":"Dialog",onPointerDownOutside:e=>{const s=e.target;(s==null?void 0:s.id)!==l&&e.preventDefault()},...h},d&&o.createElement(x,{as:f,label:m,hasTooltip:!1,size:"md",theme:"neutral",className:"absolute top-4 right-4 size-12"},o.createElement(g,{is:p})),o.Children.map(a,e=>(e==null?void 0:e.type)!==r&&e))));export{y as DialogContent};
2
2
  //# sourceMappingURL=DialogContent.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DialogContent.js","sources":["../../../src/components/dialog/DialogContent.tsx"],"sourcesContent":["import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Close, Content, Overlay, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { backdropOverlay } from '~/utilities/style/backdrop-overlay'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { DialogBackground } from './DialogBackground'\n\nconst modalOverlayId = 'modal_overlay'\n\nconst StyledDialogOverlay = styled(Overlay, {\n base: backdropOverlay\n})\n\nconst sizeReset = [\n 'w-auto',\n 'h-auto',\n 'max-w-none',\n 'max-h-none',\n 'supports-[height:100svh]:h-auto',\n 'supports-[height:100svh]:max-h-none'\n]\n\nconst StyledDialogContent = styled(Content, {\n base: [\n '-translate-1/2',\n 'bg-white',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'overflow-y-auto',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'z-1147483646',\n 'focus:outline-none',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n xs: [...sizeReset, 'rounded-md', 'w-95'],\n sm: [...sizeReset, 'rounded-md', 'w-120'],\n md: [...sizeReset, 'rounded-md', 'w-150'],\n lg: [...sizeReset, 'rounded-md', 'w-200'],\n xl: [...sizeReset, 'rounded-md', 'w-275'],\n fullscreen: [\n 'w-screen',\n 'h-screen',\n 'max-w-screen',\n 'max-h-screen',\n 'supports-[height:100svh]:h-svh',\n 'supports-[height:100svh]:max-h-svh'\n ]\n }\n }\n})\n\ntype DialogContentProps = React.ComponentProps<typeof StyledDialogContent> & {\n closeDialogText?: string\n showCloseButton?: boolean\n}\n\nexport const DialogContent = ({\n size = 'sm',\n children,\n closeDialogText = 'Close dialog',\n showCloseButton = true,\n ...remainingProps\n}: DialogContentProps) => (\n <Portal>\n <StyledDialogOverlay id={modalOverlayId}>\n {React.Children.map(\n children,\n (child?: React.ReactElement) =>\n child?.type === DialogBackground && child\n )}\n <StyledDialogContent\n size={size}\n aria-label=\"Dialog\"\n onPointerDownOutside={(event) => {\n const element = event.target as HTMLElement\n if (element?.id !== modalOverlayId) {\n event.preventDefault()\n }\n }}\n {...remainingProps}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closeDialogText}\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n className=\"absolute top-4 right-4 size-12\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {React.Children.map(\n children,\n (child?: React.ReactElement) =>\n child?.type !== DialogBackground && child\n )}\n </StyledDialogContent>\n </StyledDialogOverlay>\n </Portal>\n)\n"],"names":["modalOverlayId","StyledDialogOverlay","styled","Overlay","backdropOverlay","sizeReset","StyledDialogContent","Content","DialogContent","size","children","closeDialogText","showCloseButton","remainingProps","React","Portal","child","DialogBackground","event","element","ActionIcon","Close","Icon","CloseIcon"],"mappings":"yaAWA,MAAMA,EAAiB,gBAEjBC,EAAsBC,EAAOC,EAAS,CAC1C,KAAMC,CACR,CAAC,EAEKC,EAAY,CAChB,SACA,SACA,aACA,aACA,kCACA,qCACF,EAEMC,EAAsBJ,EAAOK,EAAS,CAC1C,KAAM,CACJ,iBACA,WACA,YACA,aACA,WACA,eACA,eACA,kBACA,MACA,QACA,UACA,eACA,qBACA,wDACA,0DACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,GAAGF,EAAW,aAAc,MAAM,EACvC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,WAAY,CACV,WACA,WACA,eACA,eACA,iCACA,oCACF,CACF,CACF,CACF,CAAC,EAOYG,EAAgB,CAAC,CAC5B,KAAAC,EAAO,KACP,SAAAC,EACA,gBAAAC,EAAkB,eAClB,gBAAAC,EAAkB,GAClB,GAAGC,CACL,IACEC,EAAA,cAACC,EAAA,KACCD,EAAA,cAACb,EAAA,CAAoB,GAAID,CACtBc,EAAAA,EAAM,SAAS,IACdJ,EACCM,IACCA,GAAA,KAAAA,OAAAA,EAAO,QAASC,GAAoBD,CACxC,EACAF,EAAA,cAACR,EAAA,CACC,KAAMG,EACN,aAAW,SACX,qBAAuBS,GAAU,CAC/B,MAAMC,EAAUD,EAAM,QAClBC,GAAA,KAAA,OAAAA,EAAS,MAAOnB,GAClBkB,EAAM,gBAEV,EACC,GAAGL,CAAAA,EAEHD,GACCE,EAAA,cAACM,EAAA,CACC,GAAIC,EACJ,MAAOV,EACP,WAAY,GACZ,KAAK,KACL,MAAM,UACN,UAAU,gCAAA,EAEVG,EAAA,cAACQ,EAAA,CAAK,GAAIC,CAAAA,CAAW,CACvB,EAEDT,EAAM,SAAS,IACdJ,EACCM,IACCA,GAAA,KAAA,OAAAA,EAAO,QAASC,GAAoBD,CACxC,CACF,CACF,CACF"}
1
+ {"version":3,"file":"DialogContent.js","sources":["../../../src/components/dialog/DialogContent.tsx"],"sourcesContent":["import { Close as CloseIcon } from '@atom-learning/icons'\nimport { Close, Content, Overlay, Portal } from '@radix-ui/react-dialog'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { backdropOverlay } from '~/utilities/style/backdrop-overlay'\n\nimport { ActionIcon } from '../action-icon/ActionIcon'\nimport { Icon } from '../icon/Icon'\nimport { DialogBackground } from './DialogBackground'\n\nconst modalOverlayId = 'modal_overlay'\n\nconst StyledDialogOverlay = styled(Overlay, {\n base: backdropOverlay\n})\n\nconst sizeReset = [\n 'w-auto',\n 'h-auto',\n 'max-w-none',\n 'max-h-none',\n 'supports-[height:100svh]:h-auto',\n 'supports-[height:100svh]:max-h-none'\n]\n\nconst StyledDialogContent = styled(\n Content,\n {\n base: [\n '-translate-1/2',\n 'bg-white',\n 'shadow-xl',\n 'box-border',\n 'left-1/2',\n 'max-w-[90vw]',\n 'max-h-[90vh]',\n 'overflow-y-auto',\n 'p-8',\n 'fixed',\n 'top-1/2',\n 'z-1147483646',\n 'focus:outline-none',\n 'motion-safe:data-[state=open]:animate-slide-in-center',\n 'motion-safe:data-[state=closed]:animate-slide-out-center'\n ],\n variants: {\n size: {\n xs: [...sizeReset, 'rounded-md', 'w-95'],\n sm: [...sizeReset, 'rounded-md', 'w-120'],\n md: [...sizeReset, 'rounded-md', 'w-150'],\n lg: [...sizeReset, 'rounded-md', 'w-200'],\n xl: [...sizeReset, 'rounded-md', 'w-275'],\n fullscreen: [\n 'w-screen',\n 'h-screen',\n 'max-w-screen',\n 'max-h-screen',\n 'supports-[height:100svh]:h-svh',\n 'supports-[height:100svh]:max-h-svh'\n ]\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype DialogContentProps = React.ComponentProps<typeof StyledDialogContent> & {\n closeDialogText?: string\n showCloseButton?: boolean\n}\n\nexport const DialogContent = ({\n size = 'sm',\n children,\n closeDialogText = 'Close dialog',\n showCloseButton = true,\n ...remainingProps\n}: DialogContentProps) => (\n <Portal>\n <StyledDialogOverlay id={modalOverlayId}>\n {React.Children.map(\n children,\n (child?: React.ReactElement) =>\n child?.type === DialogBackground && child\n )}\n <StyledDialogContent\n size={size}\n aria-label=\"Dialog\"\n onPointerDownOutside={(event) => {\n const element = event.target as HTMLElement\n if (element?.id !== modalOverlayId) {\n event.preventDefault()\n }\n }}\n {...remainingProps}\n >\n {showCloseButton && (\n <ActionIcon\n as={Close}\n label={closeDialogText}\n hasTooltip={false}\n size=\"md\"\n theme=\"neutral\"\n className=\"absolute top-4 right-4 size-12\"\n >\n <Icon is={CloseIcon} />\n </ActionIcon>\n )}\n {React.Children.map(\n children,\n (child?: React.ReactElement) =>\n child?.type !== DialogBackground && child\n )}\n </StyledDialogContent>\n </StyledDialogOverlay>\n </Portal>\n)\n"],"names":["modalOverlayId","StyledDialogOverlay","styled","Overlay","backdropOverlay","sizeReset","StyledDialogContent","Content","DialogContent","size","children","closeDialogText","showCloseButton","remainingProps","React","Portal","child","DialogBackground","event","element","ActionIcon","Close","Icon","CloseIcon"],"mappings":"yaAWA,MAAMA,EAAiB,gBAEjBC,EAAsBC,EAAOC,EAAS,CAC1C,KAAMC,CACR,CAAC,EAEKC,EAAY,CAChB,SACA,SACA,aACA,aACA,kCACA,qCACF,EAEMC,EAAsBJ,EAC1BK,EACA,CACE,KAAM,CACJ,iBACA,WACA,YACA,aACA,WACA,eACA,eACA,kBACA,MACA,QACA,UACA,eACA,qBACA,wDACA,0DACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,GAAGF,EAAW,aAAc,MAAM,EACvC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,GAAI,CAAC,GAAGA,EAAW,aAAc,OAAO,EACxC,WAAY,CACV,WACA,WACA,eACA,eACA,iCACA,oCACF,CACF,CACF,CACF,EACA,CAAE,0BAA2B,EAAK,CACpC,EAOaG,EAAgB,CAAC,CAC5B,KAAAC,EAAO,KACP,SAAAC,EACA,gBAAAC,EAAkB,eAClB,gBAAAC,EAAkB,GAClB,GAAGC,CACL,IACEC,EAAA,cAACC,EAAA,KACCD,EAAA,cAACb,EAAA,CAAoB,GAAID,CAAAA,EACtBc,EAAM,SAAS,IACdJ,EACCM,IACCA,GAAA,KAAA,OAAAA,EAAO,QAASC,GAAoBD,CACxC,EACAF,EAAA,cAACR,EAAA,CACC,KAAMG,EACN,aAAW,SACX,qBAAuBS,GAAU,CAC/B,MAAMC,EAAUD,EAAM,QAClBC,GAAA,KAAAA,OAAAA,EAAS,MAAOnB,GAClBkB,EAAM,gBAEV,EACC,GAAGL,CAEHD,EAAAA,GACCE,EAAA,cAACM,EAAA,CACC,GAAIC,EACJ,MAAOV,EACP,WAAY,GACZ,KAAK,KACL,MAAM,UACN,UAAU,gCAEVG,EAAAA,EAAA,cAACQ,EAAA,CAAK,GAAIC,CAAW,CAAA,CACvB,EAEDT,EAAM,SAAS,IACdJ,EACCM,IACCA,GAAA,KAAA,OAAAA,EAAO,QAASC,GAAoBD,CACxC,CACF,CACF,CACF"}
@@ -2,14 +2,14 @@ import React from 'react';
2
2
  export declare const StyledDivider: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLHRElement | null) => void) | React.RefObject<HTMLHRElement> | null | undefined;
4
4
  }, "orientation"> & {
5
- orientation?: "horizontal" | "vertical" | undefined;
5
+ orientation?: ("horizontal" | "vertical" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "horizontal" | "vertical">>) | undefined;
6
6
  } & {
7
7
  as?: React.ElementType;
8
8
  }>;
9
9
  export declare const Divider: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLHRElement>, HTMLHRElement>, "ref"> & {
10
10
  ref?: ((instance: HTMLHRElement | null) => void) | React.RefObject<HTMLHRElement> | null | undefined;
11
11
  }, "orientation"> & {
12
- orientation?: "horizontal" | "vertical" | undefined;
12
+ orientation?: ("horizontal" | "vertical" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "horizontal" | "vertical">>) | undefined;
13
13
  } & {
14
14
  as?: React.ElementType;
15
15
  }, "ref"> & React.RefAttributes<HTMLHRElement>>;
@@ -1,2 +1,2 @@
1
- import r from"react";import{styled as n}from"../../styled.js";const e=n("hr",{base:["border-none","bg-grey-200"],variants:{orientation:{horizontal:["h-px","w-full"],vertical:["h-full","min-h-8","w-px"]}}}),a=r.forwardRef(({orientation:o="horizontal",...t},i)=>r.createElement(e,{ref:i,orientation:o,...t}));export{a as Divider,e as StyledDivider};
1
+ import e from"react";import{styled as n}from"../../styled.js";const r=n("hr",{base:["border-none","bg-grey-200"],variants:{orientation:{horizontal:["h-px","w-full"],vertical:["h-full","min-h-8","w-px"]}}},{enabledResponsiveVariants:!0}),a=e.forwardRef(({orientation:o="horizontal",...t},i)=>e.createElement(r,{ref:i,orientation:o,...t}));export{a as Divider,r as StyledDivider};
2
2
  //# sourceMappingURL=Divider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Divider.js","sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const StyledDivider = styled('hr', {\n base: ['border-none', 'bg-grey-200'],\n variants: {\n orientation: {\n horizontal: ['h-px', 'w-full'],\n vertical: ['h-full', 'min-h-8', 'w-px']\n }\n }\n})\n\nexport const Divider = React.forwardRef<\n HTMLHRElement,\n React.ComponentProps<typeof StyledDivider>\n>(({ orientation = 'horizontal', ...rest }, ref) => {\n return <StyledDivider ref={ref} orientation={orientation} {...rest} />\n})\n"],"names":["StyledDivider","styled","Divider","React","orientation","rest","ref"],"mappings":"8DAIO,MAAMA,EAAgBC,EAAO,KAAM,CACxC,KAAM,CAAC,cAAe,aAAa,EACnC,SAAU,CACR,YAAa,CACX,WAAY,CAAC,OAAQ,QAAQ,EAC7B,SAAU,CAAC,SAAU,UAAW,MAAM,CACxC,CACF,CACF,CAAC,EAEYC,EAAUC,EAAM,WAG3B,CAAC,CAAE,YAAAC,EAAc,aAAc,GAAGC,CAAK,EAAGC,IACnCH,EAAA,cAACH,EAAA,CAAc,IAAKM,EAAK,YAAaF,EAAc,GAAGC,CAAAA,CAAM,CACrE"}
1
+ {"version":3,"file":"Divider.js","sources":["../../../src/components/divider/Divider.tsx"],"sourcesContent":["import React from 'react'\n\nimport { styled } from '~/styled'\n\nexport const StyledDivider = styled(\n 'hr',\n {\n base: ['border-none', 'bg-grey-200'],\n variants: {\n orientation: {\n horizontal: ['h-px', 'w-full'],\n vertical: ['h-full', 'min-h-8', 'w-px']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nexport const Divider = React.forwardRef<\n HTMLHRElement,\n React.ComponentProps<typeof StyledDivider>\n>(({ orientation = 'horizontal', ...rest }, ref) => {\n return <StyledDivider ref={ref} orientation={orientation} {...rest} />\n})\n"],"names":["StyledDivider","styled","Divider","React","orientation","rest","ref"],"mappings":"8DAIa,MAAAA,EAAgBC,EAC3B,KACA,CACE,KAAM,CAAC,cAAe,aAAa,EACnC,SAAU,CACR,YAAa,CACX,WAAY,CAAC,OAAQ,QAAQ,EAC7B,SAAU,CAAC,SAAU,UAAW,MAAM,CACxC,CACF,CACF,EACA,CAAE,0BAA2B,EAAK,CACpC,EAEaC,EAAUC,EAAM,WAG3B,CAAC,CAAE,YAAAC,EAAc,aAAc,GAAGC,CAAK,EAAGC,IACnCH,EAAA,cAACH,EAAA,CAAc,IAAKM,EAAK,YAAaF,EAAc,GAAGC,CAAAA,CAAM,CACrE"}
@@ -1 +1 @@
1
- {"version":3,"file":"DropdownMenu.js","sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["import { Portal,Root as DropdownMenuRoot } from '@radix-ui/react-dropdown-menu'\nimport React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n"],"names":["DropdownMenu","DropdownMenuRoot","DropdownMenuContent","DropdownMenuItem","DropdownMenuLinkItem","Portal","DropdownMenuSeparator","DropdownMenuTrigger"],"mappings":"4XASa,MAAAA,EAAe,OAAO,OAAOC,EAAkB,CAC1D,QAASC,EACT,KAAMC,EACN,SAAUC,EACV,OAAQC,EACR,UAAWC,EACX,QAASC,CACX,CAAC"}
1
+ {"version":3,"file":"DropdownMenu.js","sources":["../../../src/components/dropdown-menu/DropdownMenu.tsx"],"sourcesContent":["import { Root as DropdownMenuRoot, Portal } from '@radix-ui/react-dropdown-menu'\nimport React from 'react'\n\nimport { DropdownMenuContent } from './DropdownMenuContent'\nimport { DropdownMenuItem } from './DropdownMenuItem'\nimport { DropdownMenuLinkItem } from './DropdownMenuLinkItem'\nimport { DropdownMenuSeparator } from './DropdownMenuSeparator'\nimport { DropdownMenuTrigger } from './DropdownMenuTrigger'\n\nexport const DropdownMenu = Object.assign(DropdownMenuRoot, {\n Content: DropdownMenuContent,\n Item: DropdownMenuItem,\n LinkItem: DropdownMenuLinkItem,\n Portal: Portal,\n Separator: DropdownMenuSeparator,\n Trigger: DropdownMenuTrigger\n})\n"],"names":["DropdownMenu","DropdownMenuRoot","DropdownMenuContent","DropdownMenuItem","DropdownMenuLinkItem","Portal","DropdownMenuSeparator","DropdownMenuTrigger"],"mappings":"4XASa,MAAAA,EAAe,OAAO,OAAOC,EAAkB,CAC1D,QAASC,EACT,KAAMC,EACN,SAAUC,EACV,OAAQC,EACR,UAAWC,EACX,QAASC,CACX,CAAC"}
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
2
  import type { DefaultValues, FieldValues, Mode, SubmitErrorHandler, SubmitHandler, UseFormMethods } from 'react-hook-form';
3
3
  import { type FormCustomContextType } from './useFormCustomContext';
4
- type FormProps<TFormData extends FieldValues> = Omit<React.HTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onError'> & {
4
+ type FormProps<TFormData extends FieldValues> = Omit<React.HTMLAttributes<HTMLFormElement>, 'onSubmit' | 'onError' | 'children'> & {
5
5
  defaultValues?: DefaultValues<TFormData>;
6
6
  validationMode?: Mode;
7
7
  onSubmit: SubmitHandler<TFormData>;
8
8
  onError?: SubmitErrorHandler<TFormData>;
9
+ noValidate?: boolean;
9
10
  children: React.ReactNode | ((methods: UseFormMethods<TFormData>) => React.ReactNode);
10
11
  };
11
12
  export declare const Form: {
@@ -1,2 +1,2 @@
1
- import*as o from"react";import{useForm as p,FormProvider as c}from"react-hook-form";import{FormCustomContext as f}from"./useFormCustomContext.js";const a=t=>{const{children:e,defaultValues:m,validationMode:n="onBlur",onSubmit:i,onError:l,appearance:u,...d}=t,r=p({defaultValues:m,mode:n});return o.createElement(c,{...r},o.createElement(f.Provider,{value:{appearance:u}},o.createElement("form",{"aria-label":"form",onSubmit:r.handleSubmit(i,l),...d},typeof e=="function"?e(r):e)))};a.displayName="Form";export{a as Form};
1
+ import*as o from"react";import{useForm as p,FormProvider as c}from"react-hook-form";import{FormCustomContext as f}from"./useFormCustomContext.js";const a=t=>{const{children:e,defaultValues:m,validationMode:n="onBlur",onSubmit:l,onError:i,appearance:u,...d}=t,r=p({defaultValues:m,mode:n});return o.createElement(c,{...r},o.createElement(f.Provider,{value:{appearance:u}},o.createElement("form",{"aria-label":"form",onSubmit:r.handleSubmit(l,i),...d},typeof e=="function"?e(r):e)))};a.displayName="Form";export{a as Form};
2
2
  //# sourceMappingURL=Form.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import * as React from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Mode,\n SubmitErrorHandler,\n SubmitHandler,\n UseFormMethods\n} from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\n\nimport {\n FormCustomContext,\n type FormCustomContextType\n} from './useFormCustomContext'\n\ntype FormProps<TFormData extends FieldValues> = Omit<\n React.HTMLAttributes<HTMLFormElement>,\n 'onSubmit' | 'onError'\n> & {\n defaultValues?: DefaultValues<TFormData>\n validationMode?: Mode\n onSubmit: SubmitHandler<TFormData>\n onError?: SubmitErrorHandler<TFormData>\n children:\n | React.ReactNode\n | ((methods: UseFormMethods<TFormData>) => React.ReactNode)\n}\n\nexport const Form = <TFormData extends FieldValues>(\n props: FormProps<TFormData> & FormCustomContextType\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n appearance,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n return (\n <FormProvider {...methods}>\n <FormCustomContext.Provider value={{ appearance }}>\n <form\n aria-label=\"form\"\n onSubmit={methods.handleSubmit(onSubmit, onError)}\n {...rest}\n >\n {typeof children === 'function' ? children(methods) : children}\n </form>\n </FormCustomContext.Provider>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n"],"names":["Form","props","children","defaultValues","validationMode","onSubmit","onError","appearance","rest","methods","useForm","React","FormProvider","FormCustomContext"],"mappings":"kJA6Ba,MAAAA,EACXC,GACG,CACH,KAAM,CACJ,SAAAC,EACA,cAAAC,EACA,eAAAC,EAAiB,SACjB,SAAAC,EACA,QAAAC,EACA,WAAAC,EACA,GAAGC,CACL,EAAIP,EAEEQ,EAAUC,EAAmB,CACjC,cAAAP,EACA,KAAMC,CACR,CAAC,EAED,OACEO,EAAA,cAACC,EAAA,CAAc,GAAGH,CAAAA,EAChBE,EAAA,cAACE,EAAkB,SAAlB,CAA2B,MAAO,CAAE,WAAAN,CAAW,CAC9CI,EAAAA,EAAA,cAAC,OACC,CAAA,aAAW,OACX,SAAUF,EAAQ,aAAaJ,EAAUC,CAAO,EAC/C,GAAGE,GAEH,OAAON,GAAa,WAAaA,EAASO,CAAO,EAAIP,CACxD,CACF,CACF,CAEJ,EAEAF,EAAK,YAAc"}
1
+ {"version":3,"file":"Form.js","sources":["../../../src/components/form/Form.tsx"],"sourcesContent":["import * as React from 'react'\nimport type {\n DefaultValues,\n FieldValues,\n Mode,\n SubmitErrorHandler,\n SubmitHandler,\n UseFormMethods\n} from 'react-hook-form'\nimport { FormProvider, useForm } from 'react-hook-form'\n\nimport {\n FormCustomContext,\n type FormCustomContextType\n} from './useFormCustomContext'\n\ntype FormProps<TFormData extends FieldValues> = Omit<\n React.HTMLAttributes<HTMLFormElement>,\n 'onSubmit' | 'onError' | 'children'\n> & {\n defaultValues?: DefaultValues<TFormData>\n validationMode?: Mode\n onSubmit: SubmitHandler<TFormData>\n onError?: SubmitErrorHandler<TFormData>\n noValidate?: boolean\n children:\n | React.ReactNode\n | ((methods: UseFormMethods<TFormData>) => React.ReactNode)\n}\n\nexport const Form = <TFormData extends FieldValues>(\n props: FormProps<TFormData> & FormCustomContextType\n) => {\n const {\n children,\n defaultValues,\n validationMode = 'onBlur',\n onSubmit,\n onError,\n appearance,\n ...rest\n } = props\n\n const methods = useForm<TFormData>({\n defaultValues,\n mode: validationMode\n })\n\n return (\n <FormProvider {...methods}>\n <FormCustomContext.Provider value={{ appearance }}>\n <form\n aria-label=\"form\"\n onSubmit={methods.handleSubmit(onSubmit, onError)}\n {...rest}\n >\n {typeof children === 'function' ? children(methods) : children}\n </form>\n </FormCustomContext.Provider>\n </FormProvider>\n )\n}\n\nForm.displayName = 'Form'\n"],"names":["Form","props","children","defaultValues","validationMode","onSubmit","onError","appearance","rest","methods","useForm","React","FormProvider","FormCustomContext"],"mappings":"kJA8Ba,MAAAA,EACXC,GACG,CACH,KAAM,CACJ,SAAAC,EACA,cAAAC,EACA,eAAAC,EAAiB,SACjB,SAAAC,EACA,QAAAC,EACA,WAAAC,EACA,GAAGC,CACL,EAAIP,EAEEQ,EAAUC,EAAmB,CACjC,cAAAP,EACA,KAAMC,CACR,CAAC,EAED,OACEO,EAAA,cAACC,EAAA,CAAc,GAAGH,CAAAA,EAChBE,EAAA,cAACE,EAAkB,SAAlB,CAA2B,MAAO,CAAE,WAAAN,CAAW,CAC9CI,EAAAA,EAAA,cAAC,OACC,CAAA,aAAW,OACX,SAAUF,EAAQ,aAAaJ,EAAUC,CAAO,EAC/C,GAAGE,GAEH,OAAON,GAAa,WAAaA,EAASO,CAAO,EAAIP,CACxD,CACF,CACF,CAEJ,EAEAF,EAAK,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"Loader.js","sources":["../../../src/components/loader/Loader.tsx"],"sourcesContent":["import * as VisuallyHidden from '@radix-ui/react-visually-hidden'\nimport clsx from 'clsx'\nimport * as React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { styled } from '~/styled'\n\nconst Dot = styled('div', {\n base: [\n 'animate-pulse',\n 'bg-current',\n 'rounded-full',\n 'animation-duration-900',\n 'nth-3:animation-delay-300',\n 'nth-4:animation-delay-600'\n ],\n\n variants: {\n size: {\n sm: ['size-1', 'mx-0.5'],\n md: ['size-1.5', 'mx-0.5'],\n lg: ['size-2', 'mx-[3px]']\n }\n }\n})\n\ntype LoaderProps = React.ComponentProps<typeof Flex> & {\n message?: string\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport const Loader = ({\n className,\n message = 'Loading',\n size = 'md',\n ...props\n}: LoaderProps) => (\n <Flex role=\"alert\" {...props} className={clsx('justify-center', className)}>\n <VisuallyHidden.Root>{message}</VisuallyHidden.Root>\n <Dot size={size} />\n <Dot size={size} />\n <Dot size={size} />\n </Flex>\n)\n"],"names":["Dot","styled","Loader","className","message","size","props","React","Flex","clsx","VisuallyHidden"],"mappings":"8KAOA,MAAMA,EAAMC,EAAO,MAAO,CACxB,KAAM,CACJ,gBACA,aACA,eACA,yBACA,4BACA,2BACF,EAEA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,SAAU,QAAQ,EACvB,GAAI,CAAC,WAAY,QAAQ,EACzB,GAAI,CAAC,SAAU,UAAU,CAC3B,CACF,CACF,CAAC,EAOYC,EAAS,CAAC,CACrB,UAAAC,EACA,QAAAC,EAAU,UACV,KAAAC,EAAO,KACP,GAAGC,CACL,IACEC,EAAA,cAACC,EAAA,CAAK,KAAK,QAAS,GAAGF,EAAO,UAAWG,EAAK,iBAAkBN,CAAS,CACvEI,EAAAA,EAAA,cAACG,EAAe,KAAf,KAAqBN,CAAQ,EAC9BG,EAAA,cAACP,EAAA,CAAI,KAAMK,CAAAA,CAAM,EACjBE,EAAA,cAACP,EAAA,CAAI,KAAMK,CAAAA,CAAM,EACjBE,EAAA,cAACP,EAAA,CAAI,KAAMK,CAAAA,CAAM,CACnB"}
1
+ {"version":3,"file":"Loader.js","sources":["../../../src/components/loader/Loader.tsx"],"sourcesContent":["import * as VisuallyHidden from '@radix-ui/react-visually-hidden'\nimport clsx from 'clsx'\nimport * as React from 'react'\n\nimport { Flex } from '~/components/flex'\nimport { styled } from '~/styled'\n\nconst Dot = styled('div', {\n base: [\n 'animate-pulse',\n 'bg-current',\n 'rounded-full',\n 'animation-duration-900',\n 'nth-3:animation-delay-300',\n 'nth-4:animation-delay-600'\n ],\n variants: {\n size: {\n sm: ['size-1', 'mx-0.5'],\n md: ['size-1.5', 'mx-0.5'],\n lg: ['size-2', 'mx-[3px]']\n }\n }\n})\n\ntype LoaderProps = React.ComponentProps<typeof Flex> & {\n message?: string\n size?: 'sm' | 'md' | 'lg'\n}\n\nexport const Loader = ({\n className,\n message = 'Loading',\n size = 'md',\n ...props\n}: LoaderProps) => (\n <Flex role=\"alert\" {...props} className={clsx('justify-center', className)}>\n <VisuallyHidden.Root>{message}</VisuallyHidden.Root>\n <Dot size={size} />\n <Dot size={size} />\n <Dot size={size} />\n </Flex>\n)\n"],"names":["Dot","styled","Loader","className","message","size","props","React","Flex","clsx","VisuallyHidden"],"mappings":"8KAOA,MAAMA,EAAMC,EAAO,MAAO,CACxB,KAAM,CACJ,gBACA,aACA,eACA,yBACA,4BACA,2BACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,SAAU,QAAQ,EACvB,GAAI,CAAC,WAAY,QAAQ,EACzB,GAAI,CAAC,SAAU,UAAU,CAC3B,CACF,CACF,CAAC,EAOYC,EAAS,CAAC,CACrB,UAAAC,EACA,QAAAC,EAAU,UACV,KAAAC,EAAO,KACP,GAAGC,CACL,IACEC,EAAA,cAACC,EAAA,CAAK,KAAK,QAAS,GAAGF,EAAO,UAAWG,EAAK,iBAAkBN,CAAS,CACvEI,EAAAA,EAAA,cAACG,EAAe,KAAf,KAAqBN,CAAQ,EAC9BG,EAAA,cAACP,EAAA,CAAI,KAAMK,CAAAA,CAAM,EACjBE,EAAA,cAACP,EAAA,CAAI,KAAMK,CAAAA,CAAM,EACjBE,EAAA,cAACP,EAAA,CAAI,KAAMK,CAAAA,CAAM,CACnB"}
@@ -1,2 +1,2 @@
1
- const e=["[--navigation-menu-vertical-item-font-weight:400]","data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]","border-none","outline-none","bg-none","text-[inherit]","cursor-pointer","rounded-xl","flex","items-center","p-2","pl-(--navigation-menu-vertical-item-pl)","w-full","text-(--text)","bg-(--background)","disabled:cursor-not-allowed","[text-decoration:unset]","disabled:opacity-30","not-disabled:active:bg-(--background-active)","not-disabled:focus-visible:outline-none","not-disabled:focus-visible:relative","not-disabled:focus-visible:shadow-[$colors$primary800_0px_0px_0px_4px]","not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]","not-disabled:focus-visible:z-1","not-disabled:hover:bg-(--background-hover)","data-active:bg-(--background-selected)","data-active:text-(--text-selected)","data-active:[--navigation-menu-vertical-item-font-weight:600]"];export{e as navigationMenuVerticalItemStyles};
1
+ const e=["[--navigation-menu-vertical-item-font-weight:400]","data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]","border-none","outline-none","bg-none","decoration-[inherit]","cursor-pointer","rounded-xl","flex","items-center","p-2","pl-(--navigation-menu-vertical-item-pl)","w-full","text-(--text)","bg-(--background)","disabled:cursor-not-allowed","[text-decoration:unset]","disabled:opacity-30","not-disabled:active:bg-(--background-active)","not-disabled:focus-visible:outline-none","not-disabled:focus-visible:relative","not-disabled:focus-visible:shadow-[$colors$primary800_0px_0px_0px_4px]","not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]","not-disabled:focus-visible:z-1","not-disabled:hover:bg-(--background-hover)","data-active:bg-(--background-selected)","data-active:text-(--text-selected)","data-active:[--navigation-menu-vertical-item-font-weight:600]"];export{e as navigationMenuVerticalItemStyles};
2
2
  //# sourceMappingURL=NavigationMenuVertical.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["export const navigationMenuVerticalItemStyles = [\n '[--navigation-menu-vertical-item-font-weight:400]',\n 'data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]',\n 'border-none',\n 'outline-none',\n 'bg-none',\n 'text-[inherit]',\n 'cursor-pointer',\n 'rounded-xl',\n 'flex',\n 'items-center',\n 'p-2',\n 'pl-(--navigation-menu-vertical-item-pl)',\n 'w-full',\n 'text-(--text)',\n 'bg-(--background)',\n 'disabled:cursor-not-allowed',\n '[text-decoration:unset]',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--background-active)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[$colors$primary800_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--background-hover)',\n 'data-active:bg-(--background-selected)',\n 'data-active:text-(--text-selected)',\n 'data-active:[--navigation-menu-vertical-item-font-weight:600]'\n]\n"],"names":["navigationMenuVerticalItemStyles"],"mappings":"AAAO,MAAMA,EAAmC,CAC9C,oDACA,sEACA,cACA,eACA,UACA,iBACA,iBACA,aACA,OACA,eACA,MACA,0CACA,SACA,gBACA,oBACA,8BACA,0BACA,sBACA,+CACA,0CACA,sCACA,yEACA,4DACA,iCACA,6CACA,yCACA,qCACA,+DACF"}
1
+ {"version":3,"file":"NavigationMenuVertical.styles.js","sources":["../../../src/components/navigation-menu-vertical/NavigationMenuVertical.styles.ts"],"sourcesContent":["export const navigationMenuVerticalItemStyles = [\n '[--navigation-menu-vertical-item-font-weight:400]',\n 'data-[state=open]:[--navigation-menu-vertical-item-font-weight:600]',\n 'border-none',\n 'outline-none',\n 'bg-none',\n 'decoration-[inherit]',\n 'cursor-pointer',\n 'rounded-xl',\n 'flex',\n 'items-center',\n 'p-2',\n 'pl-(--navigation-menu-vertical-item-pl)',\n 'w-full',\n 'text-(--text)',\n 'bg-(--background)',\n 'disabled:cursor-not-allowed',\n '[text-decoration:unset]',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--background-active)',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[$colors$primary800_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:bg-(--background-hover)',\n 'data-active:bg-(--background-selected)',\n 'data-active:text-(--text-selected)',\n 'data-active:[--navigation-menu-vertical-item-font-weight:600]'\n]\n"],"names":["navigationMenuVerticalItemStyles"],"mappings":"AAAO,MAAMA,EAAmC,CAC9C,oDACA,sEACA,cACA,eACA,UACA,uBACA,iBACA,aACA,OACA,eACA,MACA,0CACA,SACA,gBACA,oBACA,8BACA,0BACA,sBACA,+CACA,0CACA,sCACA,yEACA,4DACA,iCACA,6CACA,yCACA,qCACA,+DACF"}
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{ColorScheme as P}from"../../experiments/color-scheme/ColorScheme.js";import{Flex as p}from"../flex/Flex.js";import{VisibleElementsAmount as b}from"./pagination.constants.js";import{PaginationProvider as u}from"./pagination-context/PaginationContext.js";import{PaginationItems as C}from"./PaginationItems.js";import{PaginationPopover as E}from"./PaginationPopover.js";const t=({colorScheme:a,onSelectedPageChange:n,selectedPage:i,visibleElementsCount:l=b.LESS,pagesCount:o,indicatedPages:r=[],disabledPages:m=[],onItemHover:s=()=>null,labels:g={},children:c,...d})=>o?e.createElement(u,{onSelectedPageChange:n,selectedPage:i,visibleElementsCount:l,pagesCount:o,indicatedPages:r,disabledPages:m,onItemHover:s,labels:g},e.createElement(P,{base:"grey1",accent:"primary1",...a,asChild:!0},e.createElement(p,{gap:1,...d},c||e.createElement(C,null)))):null,f=Object.assign(t,{Popover:E});t.displayName="Pagination";export{f as Pagination};
1
+ import*as e from"react";import{ColorScheme as P}from"../../experiments/color-scheme/ColorScheme.js";import{Flex as p}from"../flex/Flex.js";import{PaginationProvider as b}from"./pagination-context/PaginationContext.js";import{VisibleElementsAmount as u}from"./pagination.constants.js";import{PaginationItems as C}from"./PaginationItems.js";import{PaginationPopover as E}from"./PaginationPopover.js";const t=({colorScheme:a,onSelectedPageChange:n,selectedPage:i,visibleElementsCount:l=u.LESS,pagesCount:o,indicatedPages:r=[],disabledPages:m=[],onItemHover:s=()=>null,labels:g={},children:c,...d})=>o?e.createElement(b,{onSelectedPageChange:n,selectedPage:i,visibleElementsCount:l,pagesCount:o,indicatedPages:r,disabledPages:m,onItemHover:s,labels:g},e.createElement(P,{base:"grey1",accent:"primary1",...a,asChild:!0},e.createElement(p,{gap:1,...d},c||e.createElement(C,null)))):null,f=Object.assign(t,{Popover:E});t.displayName="Pagination";export{f as Pagination};
2
2
  //# sourceMappingURL=Pagination.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Pagination.js","sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme'\nimport { Flex } from '../flex'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationProvider } from './pagination-context/PaginationContext'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <Flex gap={1} {...rest}>\n {children || <PaginationItems />}\n </Flex>\n </ColorScheme>\n </PaginationProvider>\n )\n}\n\nexport const Pagination = Object.assign(PaginationComponent, {\n Popover: PaginationPopover\n})\n\nPaginationComponent.displayName = 'Pagination'\n"],"names":["PaginationComponent","colorScheme","onSelectedPageChange","selectedPage","visibleElementsCount","VisibleElementsAmount","pagesCount","indicatedPages","disabledPages","onItemHover","labels","children","rest","React","PaginationProvider","ColorScheme","Flex","PaginationItems","Pagination","PaginationPopover"],"mappings":"8YAUA,MAAMA,EAAsB,CAAC,CAC3B,YAAAC,EACA,qBAAAC,EACA,aAAAC,EACA,qBAAAC,EAAuBC,EAAsB,KAC7C,WAAAC,EACA,eAAAC,EAAiB,GACjB,cAAAC,EAAgB,GAChB,YAAAC,EAAc,IAAM,KACpB,OAAAC,EAAS,CAAA,EACT,SAAAC,EACA,GAAGC,CACL,IACON,EAcHO,EAAA,cAACC,EAAA,CAXD,qBAAAZ,EACA,aAAAC,EACA,qBAAAC,EACA,WAAAE,EACA,eAAAC,EACA,cAAAC,EACA,YAAAC,EACA,OAAAC,CAKEG,EAAAA,EAAA,cAACE,EAAA,CAAY,KAAK,QAAQ,OAAO,WAAY,GAAGd,EAAa,QAAO,EAAA,EAClEY,EAAA,cAACG,EAAA,CAAK,IAAK,EAAI,GAAGJ,CAAAA,EACfD,GAAYE,EAAA,cAACI,EAAA,IAAgB,CAChC,CACF,CACF,EApBsB,KAwBbC,EAAa,OAAO,OAAOlB,EAAqB,CAC3D,QAASmB,CACX,CAAC,EAEDnB,EAAoB,YAAc"}
1
+ {"version":3,"file":"Pagination.js","sources":["../../../src/components/pagination/Pagination.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { ColorScheme } from '../../experiments/color-scheme'\nimport { Flex } from '../flex'\nimport { PaginationProvider } from './pagination-context/PaginationContext'\nimport { VisibleElementsAmount } from './pagination.constants'\nimport { PaginationItems } from './PaginationItems'\nimport { PaginationPopover } from './PaginationPopover'\nimport type { PaginationProps, PaginationProviderProps } from './types'\n\nconst PaginationComponent = ({\n colorScheme,\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount = VisibleElementsAmount.LESS,\n pagesCount,\n indicatedPages = [],\n disabledPages = [],\n onItemHover = () => null,\n labels = {},\n children,\n ...rest\n}: PaginationProps) => {\n if (!pagesCount) return null\n\n const paginationProviderProps: PaginationProviderProps = {\n onSelectedPageChange,\n selectedPage,\n visibleElementsCount,\n pagesCount,\n indicatedPages,\n disabledPages,\n onItemHover,\n labels\n }\n\n return (\n <PaginationProvider {...paginationProviderProps}>\n <ColorScheme base=\"grey1\" accent=\"primary1\" {...colorScheme} asChild>\n <Flex gap={1} {...rest}>\n {children || <PaginationItems />}\n </Flex>\n </ColorScheme>\n </PaginationProvider>\n )\n}\n\nexport const Pagination = Object.assign(PaginationComponent, {\n Popover: PaginationPopover\n})\n\nPaginationComponent.displayName = 'Pagination'\n"],"names":["PaginationComponent","colorScheme","onSelectedPageChange","selectedPage","visibleElementsCount","VisibleElementsAmount","pagesCount","indicatedPages","disabledPages","onItemHover","labels","children","rest","React","PaginationProvider","ColorScheme","Flex","PaginationItems","Pagination","PaginationPopover"],"mappings":"8YAUA,MAAMA,EAAsB,CAAC,CAC3B,YAAAC,EACA,qBAAAC,EACA,aAAAC,EACA,qBAAAC,EAAuBC,EAAsB,KAC7C,WAAAC,EACA,eAAAC,EAAiB,GACjB,cAAAC,EAAgB,GAChB,YAAAC,EAAc,IAAM,KACpB,OAAAC,EAAS,CAAA,EACT,SAAAC,EACA,GAAGC,CACL,IACON,EAcHO,EAAA,cAACC,EAAA,CAXD,qBAAAZ,EACA,aAAAC,EACA,qBAAAC,EACA,WAAAE,EACA,eAAAC,EACA,cAAAC,EACA,YAAAC,EACA,OAAAC,CAKEG,EAAAA,EAAA,cAACE,EAAA,CAAY,KAAK,QAAQ,OAAO,WAAY,GAAGd,EAAa,QAAO,EAAA,EAClEY,EAAA,cAACG,EAAA,CAAK,IAAK,EAAI,GAAGJ,CAAAA,EACfD,GAAYE,EAAA,cAACI,EAAA,IAAgB,CAChC,CACF,CACF,EApBsB,KAwBbC,EAAa,OAAO,OAAOlB,EAAqB,CAC3D,QAASmB,CACX,CAAC,EAEDnB,EAAoB,YAAc"}
@@ -1,8 +1,8 @@
1
1
  import * as Progress from '@radix-ui/react-progress';
2
2
  import * as React from 'react';
3
3
  declare const StyledProgressBar: React.ForwardRefExoticComponent<Omit<Progress.ProgressProps & React.RefAttributes<HTMLDivElement>, "theme" | "size"> & {
4
- size?: "sm" | "md" | undefined;
5
- theme?: "warning" | "success" | "info" | "neutral" | "primary" | "danger" | undefined;
4
+ size?: ("sm" | "md" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md">>) | undefined;
5
+ theme?: ("warning" | "success" | "info" | "neutral" | "primary" | "danger" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "warning" | "success" | "info" | "neutral" | "primary" | "danger">>) | undefined;
6
6
  } & {
7
7
  as?: React.ElementType;
8
8
  }>;
@@ -1,2 +1,2 @@
1
- import*as t from"@radix-ui/react-progress";import*as a from"react";import{styled as s}from"../../styled.js";const m=s(t.Root,{base:["rounded-full","bg-grey-200","relative","overflow-hidden","w-full"],variants:{size:{sm:["h-1"],md:["h-2"]},theme:{primary:["text-primary-800"],info:["text-info"],success:["text-success"],warning:["text-warning"],danger:["text-danger"],neutral:["bg-grey-400","text-grey-800"]}}}),u=s(t.Indicator,{base:["bg-current","rounded-full","box-border","h-full","absolute","transition-all","duration-300","ease-out"]}),o=({value:e,max:r=100,size:l="md",theme:n="primary",...i})=>a.createElement(m,{value:e,max:r,theme:n,size:l,...i},a.createElement(u,{className:"w-full translate-x-(--progress)",style:{"--progress":"-".concat(100-(e||0)/r*100,"%")}}));o.displayName="ProgressBar";export{o as ProgressBar};
1
+ import*as t from"@radix-ui/react-progress";import*as a from"react";import{styled as s}from"../../styled.js";const m=s(t.Root,{base:["rounded-full","bg-grey-200","relative","overflow-hidden","w-full"],variants:{size:{sm:["h-1"],md:["h-2"]},theme:{primary:["text-primary-800"],info:["text-info"],success:["text-success"],warning:["text-warning"],danger:["text-danger"],neutral:["bg-grey-400","text-grey-800"]}}},{enabledResponsiveVariants:!0}),d=s(t.Indicator,{base:["bg-current","rounded-full","box-border","h-full","absolute","transition-all","duration-300","ease-out"]}),o=({value:e,max:r=100,size:l="md",theme:n="primary",...i})=>a.createElement(m,{value:e,max:r,theme:n,size:l,...i},a.createElement(d,{className:"w-full translate-x-(--progress)",style:{"--progress":"-".concat(100-(e||0)/r*100,"%")}}));o.displayName="ProgressBar";export{o as ProgressBar};
2
2
  //# sourceMappingURL=ProgressBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ProgressBar.js","sources":["../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledProgressBar = styled(Progress.Root, {\n base: [\n 'rounded-full',\n 'bg-grey-200',\n 'relative',\n 'overflow-hidden',\n 'w-full'\n ],\n variants: {\n size: {\n sm: ['h-1'],\n md: ['h-2']\n },\n theme: {\n primary: ['text-primary-800'],\n info: ['text-info'],\n success: ['text-success'],\n warning: ['text-warning'],\n danger: ['text-danger'],\n neutral: ['bg-grey-400', 'text-grey-800']\n }\n }\n})\n\nconst StyledIndicator = styled(Progress.Indicator, {\n base: [\n 'bg-current',\n 'rounded-full',\n 'box-border',\n 'h-full',\n 'absolute',\n 'transition-all',\n 'duration-300',\n 'ease-out'\n ]\n})\n\ntype ProgressBarProps = React.ComponentPropsWithoutRef<\n typeof StyledProgressBar\n> &\n (\n | { id: string; 'aria-label'?: string }\n | { 'aria-label': string; id?: string }\n )\n\nexport const ProgressBar = ({\n value,\n max = 100,\n size = 'md',\n theme = 'primary',\n ...remainingProps\n}: ProgressBarProps) => (\n <StyledProgressBar\n value={value}\n max={max}\n theme={theme}\n size={size}\n {...remainingProps}\n >\n <StyledIndicator\n className=\"w-full translate-x-(--progress)\"\n style={{\n '--progress': `-${100 - ((value || 0) / max) * 100}%`\n }}\n />\n </StyledProgressBar>\n)\n\nProgressBar.displayName = 'ProgressBar'\n"],"names":["StyledProgressBar","styled","Progress","StyledIndicator","ProgressBar","value","max","size","theme","remainingProps","React"],"mappings":"4GAKA,MAAMA,EAAoBC,EAAOC,EAAS,KAAM,CAC9C,KAAM,CACJ,eACA,cACA,WACA,kBACA,QACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,KAAK,EACV,GAAI,CAAC,KAAK,CACZ,EACA,MAAO,CACL,QAAS,CAAC,kBAAkB,EAC5B,KAAM,CAAC,WAAW,EAClB,QAAS,CAAC,cAAc,EACxB,QAAS,CAAC,cAAc,EACxB,OAAQ,CAAC,aAAa,EACtB,QAAS,CAAC,cAAe,eAAe,CAC1C,CACF,CACF,CAAC,EAEKC,EAAkBF,EAAOC,EAAS,UAAW,CACjD,KAAM,CACJ,aACA,eACA,aACA,SACA,WACA,iBACA,eACA,UACF,CACF,CAAC,EAUYE,EAAc,CAAC,CAC1B,MAAAC,EACA,IAAAC,EAAM,IACN,KAAAC,EAAO,KACP,MAAAC,EAAQ,UACR,GAAGC,CACL,IACEC,EAAA,cAACV,EAAA,CACC,MAAOK,EACP,IAAKC,EACL,MAAOE,EACP,KAAMD,EACL,GAAGE,CAEJC,EAAAA,EAAA,cAACP,EAAA,CACC,UAAU,kCACV,MAAO,CACL,aAAc,IAAI,YAAQE,GAAS,GAAKC,EAAO,IAAG,GACpD,CAAA,CAAA,CACF,CACF,EAGFF,EAAY,YAAc"}
1
+ {"version":3,"file":"ProgressBar.js","sources":["../../../src/components/progress-bar/ProgressBar.tsx"],"sourcesContent":["import * as Progress from '@radix-ui/react-progress'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nconst StyledProgressBar = styled(\n Progress.Root,\n {\n base: [\n 'rounded-full',\n 'bg-grey-200',\n 'relative',\n 'overflow-hidden',\n 'w-full'\n ],\n variants: {\n size: {\n sm: ['h-1'],\n md: ['h-2']\n },\n theme: {\n primary: ['text-primary-800'],\n info: ['text-info'],\n success: ['text-success'],\n warning: ['text-warning'],\n danger: ['text-danger'],\n neutral: ['bg-grey-400', 'text-grey-800']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(Progress.Indicator, {\n base: [\n 'bg-current',\n 'rounded-full',\n 'box-border',\n 'h-full',\n 'absolute',\n 'transition-all',\n 'duration-300',\n 'ease-out'\n ]\n})\n\ntype ProgressBarProps = React.ComponentPropsWithoutRef<\n typeof StyledProgressBar\n> &\n (\n | { id: string; 'aria-label'?: string }\n | { 'aria-label': string; id?: string }\n )\n\nexport const ProgressBar = ({\n value,\n max = 100,\n size = 'md',\n theme = 'primary',\n ...remainingProps\n}: ProgressBarProps) => (\n <StyledProgressBar\n value={value}\n max={max}\n theme={theme}\n size={size}\n {...remainingProps}\n >\n <StyledIndicator\n className=\"w-full translate-x-(--progress)\"\n style={{\n '--progress': `-${100 - ((value || 0) / max) * 100}%`\n }}\n />\n </StyledProgressBar>\n)\n\nProgressBar.displayName = 'ProgressBar'\n"],"names":["StyledProgressBar","styled","Progress","StyledIndicator","ProgressBar","value","max","size","theme","remainingProps","React"],"mappings":"4GAKA,MAAMA,EAAoBC,EACxBC,EAAS,KACT,CACE,KAAM,CACJ,eACA,cACA,WACA,kBACA,QACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,KAAK,EACV,GAAI,CAAC,KAAK,CACZ,EACA,MAAO,CACL,QAAS,CAAC,kBAAkB,EAC5B,KAAM,CAAC,WAAW,EAClB,QAAS,CAAC,cAAc,EACxB,QAAS,CAAC,cAAc,EACxB,OAAQ,CAAC,aAAa,EACtB,QAAS,CAAC,cAAe,eAAe,CAC1C,CACF,CACF,EACA,CAAE,0BAA2B,EAAK,CACpC,EAEMC,EAAkBF,EAAOC,EAAS,UAAW,CACjD,KAAM,CACJ,aACA,eACA,aACA,SACA,WACA,iBACA,eACA,UACF,CACF,CAAC,EAUYE,EAAc,CAAC,CAC1B,MAAAC,EACA,IAAAC,EAAM,IACN,KAAAC,EAAO,KACP,MAAAC,EAAQ,UACR,GAAGC,CACL,IACEC,EAAA,cAACV,EAAA,CACC,MAAOK,EACP,IAAKC,EACL,MAAOE,EACP,KAAMD,EACL,GAAGE,CAAAA,EAEJC,EAAA,cAACP,EAAA,CACC,UAAU,kCACV,MAAO,CACL,aAAc,IAAI,OAAQE,KAAAA,GAAS,GAAKC,EAAO,IAAG,GACpD,CAAA,CAAA,CACF,CACF,EAGFF,EAAY,YAAc"}
@@ -2,7 +2,7 @@ import * as RadioGroup from '@radix-ui/react-radio-group';
2
2
  import * as React from 'react';
3
3
  import { Override } from '../../utilities/types';
4
4
  declare const StyledRadioButton: React.ForwardRefExoticComponent<Omit<RadioGroup.RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "size"> & {
5
- size?: "md" | "lg" | undefined;
5
+ size?: ("md" | "lg" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "md" | "lg">>) | undefined;
6
6
  } & {
7
7
  as?: React.ElementType;
8
8
  }>;
@@ -1,2 +1,2 @@
1
- import*as t from"@radix-ui/react-radio-group";import*as r from"react";import{styled as s}from"../../styled.js";const i=s(t.Item,{base:["items-center","appearance-none","bg-transparent","border","border-grey-800","rounded-full","text-white","cursor-pointer","flex","justify-center","p-0","size-4","transition-all","duration-50","ease-out","focus:outline-2","focus:outline-offset-1","focus:outline-primary-800","focus:outline-solid","data-[state=checked]:bg-primary-800","data-[state=checked]:border-primary-800","disabled:bg-grey-200","disabled:border-grey-800","disabled:cursor-not-allowed","disabled:text-grey-800"],variants:{size:{md:["size-4"],lg:["-mt-1","size-6"]}}}),d=s(t.Indicator,{base:["size-1.5","rounded-full","bg-current","absolute"],variants:{size:{md:["size-1.5"],lg:["size-3"]}}}),a=({size:e,...o})=>r.createElement(i,{...o,size:e},r.createElement(d,{size:e}));a.displayName="RadioButton";export{a as RadioButton};
1
+ import*as t from"@radix-ui/react-radio-group";import*as r from"react";import{styled as s}from"../../styled.js";const o=s(t.Item,{base:["items-center","appearance-none","bg-transparent","border","border-grey-800","rounded-full","text-white","cursor-pointer","flex","justify-center","p-0","size-4","transition-all","duration-50","ease-out","focus:outline-2","focus:outline-offset-1","focus:outline-primary-800","focus:outline-solid","data-[state=checked]:bg-primary-800","data-[state=checked]:border-primary-800","disabled:bg-grey-200","disabled:border-grey-800","disabled:cursor-not-allowed","disabled:text-grey-800"],variants:{size:{md:["size-4"],lg:["-mt-1","size-6"]}}},{enabledResponsiveVariants:!0}),n=s(t.Indicator,{base:["size-1.5","rounded-full","bg-current","absolute"],variants:{size:{md:["size-1.5"],lg:["size-3"]}}},{enabledResponsiveVariants:!0}),a=({size:e,...i})=>r.createElement(o,{...i,size:e},r.createElement(n,{size:e}));a.displayName="RadioButton";export{a as RadioButton};
2
2
  //# sourceMappingURL=RadioButton.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioButton.js","sources":["../../../src/components/radio-button/RadioButton.tsx"],"sourcesContent":["import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { Override } from '~/utilities/types'\n\nconst StyledRadioButton = styled(RadioGroup.Item, {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-full',\n 'text-white',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'disabled:bg-grey-200',\n 'disabled:border-grey-800',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800'\n ],\n variants: {\n size: {\n md: ['size-4'],\n lg: ['-mt-1', 'size-6']\n }\n }\n})\n\nconst StyledIndicator = styled(RadioGroup.Indicator, {\n base: ['size-1.5', 'rounded-full', 'bg-current', 'absolute'],\n variants: {\n size: {\n md: ['size-1.5'],\n lg: ['size-3']\n }\n }\n})\n\ntype RadioButtonProps = Override<\n React.ComponentProps<typeof StyledRadioButton>,\n {\n as?: never\n } & {\n 'aria-label'?: string\n }\n>\n\nexport const RadioButton = ({ size, ...props }: RadioButtonProps) => {\n return (\n <StyledRadioButton {...props} size={size}>\n <StyledIndicator size={size} />\n </StyledRadioButton>\n )\n}\n\nRadioButton.displayName = 'RadioButton'\n"],"names":["StyledRadioButton","styled","RadioGroup","StyledIndicator","RadioButton","size","props","React"],"mappings":"+GAMA,MAAMA,EAAoBC,EAAOC,EAAW,KAAM,CAChD,KAAM,CACJ,eACA,kBACA,iBACA,SACA,kBACA,eACA,aACA,iBACA,OACA,iBACA,MACA,SACA,iBACA,cACA,WACA,kBACA,yBACA,4BACA,sBACA,sCACA,0CACA,uBACA,2BACA,8BACA,wBACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,QAAQ,EACb,GAAI,CAAC,QAAS,QAAQ,CACxB,CACF,CACF,CAAC,EAEKC,EAAkBF,EAAOC,EAAW,UAAW,CACnD,KAAM,CAAC,WAAY,eAAgB,aAAc,UAAU,EAC3D,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,UAAU,EACf,GAAI,CAAC,QAAQ,CACf,CACF,CACF,CAAC,EAWYE,EAAc,CAAC,CAAE,KAAAC,EAAM,GAAGC,CAAM,IAEzCC,EAAA,cAACP,EAAA,CAAmB,GAAGM,EAAO,KAAMD,CAClCE,EAAAA,EAAA,cAACJ,EAAA,CAAgB,KAAME,CAAM,CAAA,CAC/B,EAIJD,EAAY,YAAc"}
1
+ {"version":3,"file":"RadioButton.js","sources":["../../../src/components/radio-button/RadioButton.tsx"],"sourcesContent":["import * as RadioGroup from '@radix-ui/react-radio-group'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { Override } from '~/utilities/types'\n\nconst StyledRadioButton = styled(\n RadioGroup.Item,\n {\n base: [\n 'items-center',\n 'appearance-none',\n 'bg-transparent',\n 'border',\n 'border-grey-800',\n 'rounded-full',\n 'text-white',\n 'cursor-pointer',\n 'flex',\n 'justify-center',\n 'p-0',\n 'size-4',\n 'transition-all',\n 'duration-50',\n 'ease-out',\n 'focus:outline-2',\n 'focus:outline-offset-1',\n 'focus:outline-primary-800',\n 'focus:outline-solid',\n 'data-[state=checked]:bg-primary-800',\n 'data-[state=checked]:border-primary-800',\n 'disabled:bg-grey-200',\n 'disabled:border-grey-800',\n 'disabled:cursor-not-allowed',\n 'disabled:text-grey-800'\n ],\n variants: {\n size: {\n md: ['size-4'],\n lg: ['-mt-1', 'size-6']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\nconst StyledIndicator = styled(\n RadioGroup.Indicator,\n {\n base: ['size-1.5', 'rounded-full', 'bg-current', 'absolute'],\n variants: {\n size: {\n md: ['size-1.5'],\n lg: ['size-3']\n }\n }\n },\n { enabledResponsiveVariants: true }\n)\n\ntype RadioButtonProps = Override<\n React.ComponentProps<typeof StyledRadioButton>,\n {\n as?: never\n } & {\n 'aria-label'?: string\n }\n>\n\nexport const RadioButton = ({ size, ...props }: RadioButtonProps) => {\n return (\n <StyledRadioButton {...props} size={size}>\n <StyledIndicator size={size} />\n </StyledRadioButton>\n )\n}\n\nRadioButton.displayName = 'RadioButton'\n"],"names":["StyledRadioButton","styled","RadioGroup","StyledIndicator","RadioButton","size","props","React"],"mappings":"+GAMA,MAAMA,EAAoBC,EACxBC,EAAW,KACX,CACE,KAAM,CACJ,eACA,kBACA,iBACA,SACA,kBACA,eACA,aACA,iBACA,OACA,iBACA,MACA,SACA,iBACA,cACA,WACA,kBACA,yBACA,4BACA,sBACA,sCACA,0CACA,uBACA,2BACA,8BACA,wBACF,EACA,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,QAAQ,EACb,GAAI,CAAC,QAAS,QAAQ,CACxB,CACF,CACF,EACA,CAAE,0BAA2B,EAAK,CACpC,EAEMC,EAAkBF,EACtBC,EAAW,UACX,CACE,KAAM,CAAC,WAAY,eAAgB,aAAc,UAAU,EAC3D,SAAU,CACR,KAAM,CACJ,GAAI,CAAC,UAAU,EACf,GAAI,CAAC,QAAQ,CACf,CACF,CACF,EACA,CAAE,0BAA2B,EAAK,CACpC,EAWaE,EAAc,CAAC,CAAE,KAAAC,EAAM,GAAGC,CAAM,IAEzCC,EAAA,cAACP,EAAA,CAAmB,GAAGM,EAAO,KAAMD,CAClCE,EAAAA,EAAA,cAACJ,EAAA,CAAgB,KAAME,CAAM,CAAA,CAC/B,EAIJD,EAAY,YAAc"}
@@ -14,7 +14,7 @@ export declare const RadioButtonField: {
14
14
  label: string;
15
15
  validation?: import("../../components/form").ValidationOptions;
16
16
  } & Omit<Omit<import("@radix-ui/react-radio-group").RadioGroupItemProps & React.RefAttributes<HTMLButtonElement>, "size"> & {
17
- size?: "md" | "lg" | undefined;
17
+ size?: ("md" | "lg" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "md" | "lg">>) | undefined;
18
18
  } & {
19
19
  as?: React.ElementType;
20
20
  }, "aria-label" | "as"> & {
@@ -9,7 +9,9 @@ declare const StyledSectionMessage: React.ForwardRefExoticComponent<Omit<import(
9
9
  } & {
10
10
  as?: React.ElementType;
11
11
  }>;
12
- declare const SectionMessageRoot: ({ children, ...rest }: React.ComponentProps<typeof StyledSectionMessage>) => React.JSX.Element;
12
+ declare const SectionMessageRoot: ({ children, ...rest }: React.ComponentProps<typeof StyledSectionMessage> & {
13
+ className?: string;
14
+ }) => React.JSX.Element;
13
15
  export type SectionMessageTheme = 'success' | 'warning' | 'error' | 'neutral' | 'info';
14
16
  export type SectionMessageProps = React.ComponentProps<typeof SectionMessageRoot> & {
15
17
  theme?: SectionMessageTheme;
@@ -1 +1 @@
1
- {"version":3,"file":"SectionMessage.js","sources":["../../../src/components/section-message/SectionMessage.tsx"],"sourcesContent":["import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Dismissible } from '../dismissible'\nimport { Flex } from '../flex'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessageContext'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n base: [\n 'relative',\n 'rounded-md',\n 'flex',\n 'min-h-12',\n 'p-4',\n 'border',\n 'border-white'\n ],\n variants: {\n theme: {\n success: ['bg-success-light', 'text-success-dark'],\n warning: ['bg-warning-light', 'text-warning-text'],\n error: ['bg-danger-light', 'text-danger-dark'],\n neutral: ['bg-grey-100', 'text-grey-1000'],\n info: ['bg-info-light', 'text-info-dark']\n },\n hasIcon: {\n true: ['pl-10']\n },\n hasDismiss: {\n true: ['pr-12']\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage>) => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <Flex gap={3} justify=\"space-between\" className=\"grow\">\n {children}\n </Flex>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport type SectionMessageProps = React.ComponentProps<\n typeof SectionMessageRoot\n> & {\n theme?: SectionMessageTheme\n}\n\nexport const SectionMessage = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps) => (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n)\n\nSectionMessage.Title = SectionMessageTitle\nSectionMessage.Description = SectionMessageDescription\nSectionMessage.Icon = SectionMessageIcon\nSectionMessage.Dismiss = SectionMessageDismiss\nSectionMessage.Content = SectionMessageContent\nSectionMessage.Actions = SectionMessageActions\n"],"names":["StyledSectionMessage","styled","Dismissible","SectionMessageRoot","children","rest","theme","hasIcon","hasDismiss","useSectionMessageContext","React","Flex","SectionMessage","TooltipProvider","SectionMessageProvider","SectionMessageTitle","SectionMessageDescription","SectionMessageIcon","SectionMessageDismiss","SectionMessageContent","SectionMessageActions"],"mappings":"8pBAoBA,MAAMA,EAAuBC,EAAOC,EAAa,CAC/C,KAAM,CACJ,WACA,aACA,OACA,WACA,MACA,SACA,cACF,EACA,SAAU,CACR,MAAO,CACL,QAAS,CAAC,mBAAoB,mBAAmB,EACjD,QAAS,CAAC,mBAAoB,mBAAmB,EACjD,MAAO,CAAC,kBAAmB,kBAAkB,EAC7C,QAAS,CAAC,cAAe,gBAAgB,EACzC,KAAM,CAAC,gBAAiB,gBAAgB,CAC1C,EACA,QAAS,CACP,KAAM,CAAC,OAAO,CAChB,EACA,WAAY,CACV,KAAM,CAAC,OAAO,CAChB,CACF,CACF,CAAC,EAEKC,EAAqB,CAAC,CAC1B,SAAAC,EACA,GAAGC,CACL,IAAyD,CACvD,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,WAAAC,CAAW,EAAIC,EAAyB,EAEhE,OACEC,EAAA,cAACV,EAAA,CACE,GAAGK,EACJ,MAAOC,EACP,QAASC,EACT,WAAYC,CAAAA,EAEZE,EAAA,cAACC,EAAA,CAAK,IAAK,EAAG,QAAQ,gBAAgB,UAAU,MAAA,EAC7CP,CACH,CACF,CAEJ,EAeaQ,EAAiB,CAAC,CAC7B,MAAAN,EAAQ,OACR,GAAGD,CACL,IACEK,EAAA,cAACG,EAAA,KACCH,EAAA,cAACI,EAAA,CAAuB,MAAOR,CAC7BI,EAAAA,EAAA,cAACP,EAAA,CAAoB,GAAGE,CAAM,CAAA,CAChC,CACF,EAGFO,EAAe,MAAQG,EACvBH,EAAe,YAAcI,EAC7BJ,EAAe,KAAOK,EACtBL,EAAe,QAAUM,EACzBN,EAAe,QAAUO,EACzBP,EAAe,QAAUQ"}
1
+ {"version":3,"file":"SectionMessage.js","sources":["../../../src/components/section-message/SectionMessage.tsx"],"sourcesContent":["import { TooltipProvider } from '@radix-ui/react-tooltip'\nimport React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Dismissible } from '../dismissible'\nimport { Flex } from '../flex'\nimport {\n SectionMessageProvider,\n useSectionMessageContext\n} from './SectionMessageContext'\nimport { SectionMessageDescription } from './SectionMessageDescription'\nimport { SectionMessageDismiss } from './SectionMessageDismiss'\nimport { SectionMessageIcon } from './SectionMessageIcon'\nimport {\n SectionMessageActions,\n SectionMessageContent\n} from './SectionMessageLayout'\nimport { SectionMessageTitle } from './SectionMessageTitle'\n\nconst StyledSectionMessage = styled(Dismissible, {\n base: [\n 'relative',\n 'rounded-md',\n 'flex',\n 'min-h-12',\n 'p-4',\n 'border',\n 'border-white'\n ],\n variants: {\n theme: {\n success: ['bg-success-light', 'text-success-dark'],\n warning: ['bg-warning-light', 'text-warning-text'],\n error: ['bg-danger-light', 'text-danger-dark'],\n neutral: ['bg-grey-100', 'text-grey-1000'],\n info: ['bg-info-light', 'text-info-dark']\n },\n hasIcon: {\n true: ['pl-10']\n },\n hasDismiss: {\n true: ['pr-12']\n }\n }\n})\n\nconst SectionMessageRoot = ({\n children,\n ...rest\n}: React.ComponentProps<typeof StyledSectionMessage> & {\n className?: string\n}) => {\n const { theme, hasIcon, hasDismiss } = useSectionMessageContext()\n\n return (\n <StyledSectionMessage\n {...rest}\n theme={theme}\n hasIcon={hasIcon}\n hasDismiss={hasDismiss}\n >\n <Flex gap={3} justify=\"space-between\" className=\"grow\">\n {children}\n </Flex>\n </StyledSectionMessage>\n )\n}\n\nexport type SectionMessageTheme =\n | 'success'\n | 'warning'\n | 'error'\n | 'neutral'\n | 'info'\n\nexport type SectionMessageProps = React.ComponentProps<\n typeof SectionMessageRoot\n> & {\n theme?: SectionMessageTheme\n}\n\nexport const SectionMessage = ({\n theme = 'info',\n ...rest\n}: SectionMessageProps) => (\n <TooltipProvider>\n <SectionMessageProvider theme={theme}>\n <SectionMessageRoot {...rest} />\n </SectionMessageProvider>\n </TooltipProvider>\n)\n\nSectionMessage.Title = SectionMessageTitle\nSectionMessage.Description = SectionMessageDescription\nSectionMessage.Icon = SectionMessageIcon\nSectionMessage.Dismiss = SectionMessageDismiss\nSectionMessage.Content = SectionMessageContent\nSectionMessage.Actions = SectionMessageActions\n"],"names":["StyledSectionMessage","styled","Dismissible","SectionMessageRoot","children","rest","theme","hasIcon","hasDismiss","useSectionMessageContext","React","Flex","SectionMessage","TooltipProvider","SectionMessageProvider","SectionMessageTitle","SectionMessageDescription","SectionMessageIcon","SectionMessageDismiss","SectionMessageContent","SectionMessageActions"],"mappings":"8pBAoBA,MAAMA,EAAuBC,EAAOC,EAAa,CAC/C,KAAM,CACJ,WACA,aACA,OACA,WACA,MACA,SACA,cACF,EACA,SAAU,CACR,MAAO,CACL,QAAS,CAAC,mBAAoB,mBAAmB,EACjD,QAAS,CAAC,mBAAoB,mBAAmB,EACjD,MAAO,CAAC,kBAAmB,kBAAkB,EAC7C,QAAS,CAAC,cAAe,gBAAgB,EACzC,KAAM,CAAC,gBAAiB,gBAAgB,CAC1C,EACA,QAAS,CACP,KAAM,CAAC,OAAO,CAChB,EACA,WAAY,CACV,KAAM,CAAC,OAAO,CAChB,CACF,CACF,CAAC,EAEKC,EAAqB,CAAC,CAC1B,SAAAC,EACA,GAAGC,CACL,IAEM,CACJ,KAAM,CAAE,MAAAC,EAAO,QAAAC,EAAS,WAAAC,CAAW,EAAIC,EAAyB,EAEhE,OACEC,EAAA,cAACV,EAAA,CACE,GAAGK,EACJ,MAAOC,EACP,QAASC,EACT,WAAYC,CAAAA,EAEZE,EAAA,cAACC,EAAA,CAAK,IAAK,EAAG,QAAQ,gBAAgB,UAAU,MAAA,EAC7CP,CACH,CACF,CAEJ,EAeaQ,EAAiB,CAAC,CAC7B,MAAAN,EAAQ,OACR,GAAGD,CACL,IACEK,EAAA,cAACG,EAAA,KACCH,EAAA,cAACI,EAAA,CAAuB,MAAOR,CAC7BI,EAAAA,EAAA,cAACP,EAAA,CAAoB,GAAGE,CAAM,CAAA,CAChC,CACF,EAGFO,EAAe,MAAQG,EACvBH,EAAe,YAAcI,EAC7BJ,EAAe,KAAOK,EACtBL,EAAe,QAAUM,EACzBN,EAAe,QAAUO,EACzBP,EAAe,QAAUQ"}
@@ -3,9 +3,9 @@ import { Override } from '../../utilities/types';
3
3
  declare const StyledSelect: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.SelectHTMLAttributes<HTMLSelectElement>, HTMLSelectElement>, "ref"> & {
4
4
  ref?: ((instance: HTMLSelectElement | null) => void) | React.RefObject<HTMLSelectElement> | null | undefined;
5
5
  }, "size" | "appearance" | "state"> & {
6
- size?: "sm" | "md" | "lg" | undefined;
7
- state?: "error" | undefined;
8
- appearance?: "standard" | "modern" | undefined;
6
+ size?: ("sm" | "md" | "lg" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md" | "lg">>) | undefined;
7
+ state?: ("error" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "error">>) | undefined;
8
+ appearance?: ("standard" | "modern" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "standard" | "modern">>) | undefined;
9
9
  } & {
10
10
  as?: React.ElementType;
11
11
  }>;
@@ -1,2 +1,2 @@
1
- import*as r from"react";import{styled as p}from"../../styled.js";const c=p("select",{base:["bg-(image:--bg-chevron)","appearance-none","[background-repeat:no-repeat,repeat-x]","rounded-md","text-grey-1000","block","font-body","font-normal","leading-[1.4]","w-full","hover:cursor-pointer","-ms-expand:hidden","disabled:opacity-30","disabled:cursor-not-allowed","*[[disabled]]:opacity-30","*[[disabled]]:cursor-not-allowed"],variants:{size:{sm:["bg-position-[right_--spacing(2)_top_50%,0_0]","bg-size-[18px_auto,100%]","text-sm","h-8","pl-2","pr-8"],md:["bg-position-[right_--spacing(3)_top_50%,0_0]","bg-size-[20px_auto,100%]","text-md","h-10","pl-3","pr-10"],lg:["bg-position-[right_--spacing(3)_top_50%,0_0]","bg-size-[20px_auto,100%]","text-md","h-12","pl-3","pr-10"]},state:{error:[]},appearance:{standard:["bg-white","border","border-grey-700","focus:border-primary-800","focus:outline-none"],modern:["bg-grey-100","border-none","focus:outline-2","focus:outline-blue-800","focus:outline-offset-1","focus:outline-solid","focus:z-1"]}},compoundVariants:[{state:"error",appearance:"standard",class:["border-danger"]},{state:"error",appearance:"modern",class:["bg-danger-light","focus:outline-danger"]}]}),t=r.forwardRef(({placeholder:o,children:n,size:d="md",appearance:s="standard",...e},i)=>{const a={size:d,appearance:s,ref:i,...e};return[e.value,e.defaultValue].every(l=>l===void 0)&&(a.defaultValue=""),r.createElement(c,{...a},o&&r.createElement("option",{disabled:!0,hidden:!0,value:""},o),n)});t.displayName="Select";export{t as Select};
1
+ import*as r from"react";import{styled as p}from"../../styled.js";const c=p("select",{base:["bg-(image:--bg-chevron)","appearance-none","[background-repeat:no-repeat,repeat-x]","rounded-md","text-grey-1000","block","font-body","font-normal","leading-[1.4]","w-full","hover:cursor-pointer","-ms-expand:hidden","disabled:opacity-30","disabled:cursor-not-allowed","*[[disabled]]:opacity-30","*[[disabled]]:cursor-not-allowed"],variants:{size:{sm:["bg-position-[right_--spacing(2)_top_50%,0_0]","bg-size-[18px_auto,100%]","text-sm","h-8","pl-2","pr-8"],md:["bg-position-[right_--spacing(3)_top_50%,0_0]","bg-size-[20px_auto,100%]","text-md","h-10","pl-3","pr-10"],lg:["bg-position-[right_--spacing(3)_top_50%,0_0]","bg-size-[20px_auto,100%]","text-md","h-12","pl-3","pr-10"]},state:{error:[]},appearance:{standard:["bg-white","border","border-grey-700","focus:border-primary-800","focus:outline-none"],modern:["bg-grey-100","border-none","focus:outline-2","focus:outline-blue-800","focus:outline-offset-1","focus:outline-solid","focus:z-1"]}},compoundVariants:[{state:"error",appearance:"standard",class:["border-danger"]},{state:"error",appearance:"modern",class:["bg-danger-light","focus:outline-danger"]}]},{enabledResponsiveVariants:!0}),t=r.forwardRef(({placeholder:a,children:n,size:s="md",appearance:d="standard",...e},i)=>{const o={size:s,appearance:d,ref:i,...e};return[e.value,e.defaultValue].every(l=>l===void 0)&&(o.defaultValue=""),r.createElement(c,{...o},a&&r.createElement("option",{disabled:!0,hidden:!0,value:""},a),n)});t.displayName="Select";export{t as Select};
2
2
  //# sourceMappingURL=Select.js.map