@atom-learning/components 6.3.1 → 6.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (135) hide show
  1. package/dist/components/alert-dialog/alert-context/AlertDialog.js +1 -1
  2. package/dist/components/alert-dialog/alert-context/AlertDialog.js.map +1 -1
  3. package/dist/components/badge/Badge.d.ts +1 -9
  4. package/dist/components/badge/Badge.js +1 -1
  5. package/dist/components/badge/Badge.js.map +1 -1
  6. package/dist/components/banner/BannerContainer.d.ts +2 -10
  7. package/dist/components/banner/BannerContainer.js +1 -1
  8. package/dist/components/banner/BannerContainer.js.map +1 -1
  9. package/dist/components/banner/BannerContext.d.ts +3 -1
  10. package/dist/components/banner/BannerContext.js.map +1 -1
  11. package/dist/components/banner/banner-regular/BannerRegular.d.ts +1 -1
  12. package/dist/components/banner/banner-regular/BannerRegularActions.d.ts +1 -2
  13. package/dist/components/banner/banner-regular/BannerRegularActions.js +1 -1
  14. package/dist/components/banner/banner-regular/BannerRegularActions.js.map +1 -1
  15. package/dist/components/banner/banner-slim/BannerSlim.d.ts +12 -17
  16. package/dist/components/banner/banner-slim/BannerSlimActions.d.ts +9 -2
  17. package/dist/components/banner/banner-slim/BannerSlimActions.js +1 -1
  18. package/dist/components/banner/banner-slim/BannerSlimActions.js.map +1 -1
  19. package/dist/components/banner/banner-slim/BannerSlimContainer.d.ts +3 -11
  20. package/dist/components/banner/banner-slim/BannerSlimContainer.js +1 -1
  21. package/dist/components/banner/banner-slim/BannerSlimContainer.js.map +1 -1
  22. package/dist/components/banner/banner-slim/BannerSlimContent.d.ts +3 -17
  23. package/dist/components/banner/banner-slim/BannerSlimContent.js +1 -1
  24. package/dist/components/banner/banner-slim/BannerSlimContent.js.map +1 -1
  25. package/dist/components/calendar/Calendar.js +1 -1
  26. package/dist/components/calendar/Calendar.js.map +1 -1
  27. package/dist/components/checkbox-tree/CheckboxTree.d.ts +161 -175
  28. package/dist/components/checkbox-tree/CheckboxTreeItemContent.d.ts +6 -2
  29. package/dist/components/checkbox-tree/CheckboxTreeItemContent.js +1 -1
  30. package/dist/components/checkbox-tree/CheckboxTreeItemContent.js.map +1 -1
  31. package/dist/components/chip/ChipGroup.d.ts +5 -16
  32. package/dist/components/chip/ChipGroup.js +1 -1
  33. package/dist/components/chip/ChipGroup.js.map +1 -1
  34. package/dist/components/chip-toggle-group/ChipToggleGroupRoot.d.ts +7 -23
  35. package/dist/components/data-table/DataTable.d.ts +5 -29
  36. package/dist/components/data-table/DataTableBulkActions.js +1 -1
  37. package/dist/components/data-table/DataTableBulkActions.js.map +1 -1
  38. package/dist/components/data-table/DataTableBulkActionsFloating.d.ts +1 -9
  39. package/dist/components/data-table/DataTableBulkActionsFloating.js +1 -1
  40. package/dist/components/data-table/DataTableBulkActionsFloating.js.map +1 -1
  41. package/dist/components/data-table/DataTableHeaderCell.js +1 -1
  42. package/dist/components/data-table/DataTableHeaderCell.js.map +1 -1
  43. package/dist/components/data-table/DataTableLoading.d.ts +3 -11
  44. package/dist/components/dialog/Dialog.d.ts +5 -1
  45. package/dist/components/dialog/DialogFooter.d.ts +5 -3
  46. package/dist/components/dialog/DialogFooter.js +1 -1
  47. package/dist/components/dialog/DialogFooter.js.map +1 -1
  48. package/dist/components/drawer/DrawerContent.js +1 -1
  49. package/dist/components/drawer/DrawerContent.js.map +1 -1
  50. package/dist/components/empty-state/EmptyState.d.ts +1 -9
  51. package/dist/components/empty-state/EmptyState.js +1 -1
  52. package/dist/components/empty-state/EmptyState.js.map +1 -1
  53. package/dist/components/field-wrapper/FieldWrapper.js +1 -1
  54. package/dist/components/field-wrapper/FieldWrapper.js.map +1 -1
  55. package/dist/components/file-drop/FileDrop.d.ts +2 -4
  56. package/dist/components/file-drop/FileDrop.js +1 -1
  57. package/dist/components/file-drop/FileDrop.js.map +1 -1
  58. package/dist/components/flex/Flex.d.ts +3 -3
  59. package/dist/components/index.d.ts +0 -1
  60. package/dist/components/inline-message/InlineMessage.d.ts +1 -9
  61. package/dist/components/inline-message/InlineMessage.js +1 -1
  62. package/dist/components/inline-message/InlineMessage.js.map +1 -1
  63. package/dist/components/input/Input.js.map +1 -1
  64. package/dist/components/loader/Loader.d.ts +1 -2
  65. package/dist/components/loader/Loader.js +1 -1
  66. package/dist/components/loader/Loader.js.map +1 -1
  67. package/dist/components/markdown-content/MarkdownContent.d.ts +1 -9
  68. package/dist/components/markdown-content/MarkdownContent.js +1 -1
  69. package/dist/components/markdown-content/MarkdownContent.js.map +1 -1
  70. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +1 -11
  71. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.d.ts +2 -3
  72. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.js +1 -1
  73. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalItemContent.js.map +1 -1
  74. package/dist/components/number-input/NumberInput.js +1 -1
  75. package/dist/components/number-input/NumberInput.js.map +1 -1
  76. package/dist/components/pagination/Pagination.js +1 -1
  77. package/dist/components/pagination/Pagination.js.map +1 -1
  78. package/dist/components/pagination/PaginationPopover.js +1 -1
  79. package/dist/components/pagination/PaginationPopover.js.map +1 -1
  80. package/dist/components/radio-card/RadioCardGroup.d.ts +2 -3
  81. package/dist/components/radio-card/RadioCardGroup.js +1 -1
  82. package/dist/components/radio-card/RadioCardGroup.js.map +1 -1
  83. package/dist/components/section-message/SectionMessage.d.ts +6 -7
  84. package/dist/components/section-message/SectionMessage.js +1 -1
  85. package/dist/components/section-message/SectionMessage.js.map +1 -1
  86. package/dist/components/section-message/SectionMessageLayout.d.ts +6 -7
  87. package/dist/components/section-message/SectionMessageLayout.js +1 -1
  88. package/dist/components/section-message/SectionMessageLayout.js.map +1 -1
  89. package/dist/components/side-bar/SideBar.d.ts +2 -2
  90. package/dist/components/side-bar/SideBarComponents.d.ts +21 -22
  91. package/dist/components/side-bar/SideBarComponents.js +1 -1
  92. package/dist/components/side-bar/SideBarComponents.js.map +1 -1
  93. package/dist/components/stepper/StepperStepBullet.d.ts +1 -9
  94. package/dist/components/stepper/StepperStepBullet.js +1 -1
  95. package/dist/components/stepper/StepperStepBullet.js.map +1 -1
  96. package/dist/components/stepper/StepperStepContainer.d.ts +1 -9
  97. package/dist/components/stepper/StepperStepContainer.js +1 -1
  98. package/dist/components/stepper/StepperStepContainer.js.map +1 -1
  99. package/dist/components/stepper/StepperSteps.js +1 -1
  100. package/dist/components/stepper/StepperSteps.js.map +1 -1
  101. package/dist/components/tile-toggle-group/TileToggleGroupRoot.d.ts +2 -22
  102. package/dist/components/tile-toggle-group/TileToggleGroupRoot.js.map +1 -1
  103. package/dist/components/toast/Toast.d.ts +1 -9
  104. package/dist/components/toast/Toast.js +1 -1
  105. package/dist/components/toast/Toast.js.map +1 -1
  106. package/dist/components/toggle-group/ToggleGroupRoot.d.ts +3 -11
  107. package/dist/components/toggle-group/ToggleGroupRoot.js +1 -1
  108. package/dist/components/toggle-group/ToggleGroupRoot.js.map +1 -1
  109. package/dist/components/toggle-group/index.d.ts +3 -11
  110. package/dist/components/top-bar/TopBar.d.ts +1 -9
  111. package/dist/components/top-bar/TopBar.js +1 -1
  112. package/dist/components/top-bar/TopBar.js.map +1 -1
  113. package/dist/components/tree/Tree.d.ts +15 -824
  114. package/dist/components/tree/Tree.js.map +1 -1
  115. package/dist/components/tree/TreeCollapsibleContent.d.ts +1 -1
  116. package/dist/components/tree/TreeCollapsibleContent.js.map +1 -1
  117. package/dist/components/tree/TreeItemContent.d.ts +1 -7
  118. package/dist/components/tree/TreeItemContent.js +1 -1
  119. package/dist/components/tree/TreeItemContent.js.map +1 -1
  120. package/dist/components/tree/TreeList.d.ts +5 -5
  121. package/dist/components/tree/TreeList.js +1 -1
  122. package/dist/components/tree/TreeList.js.map +1 -1
  123. package/dist/components/tree/TreeListItem.d.ts +3 -9
  124. package/dist/components/tree/TreeListItem.js +1 -1
  125. package/dist/components/tree/TreeListItem.js.map +1 -1
  126. package/dist/docgen.json +1 -1
  127. package/dist/index.cjs.js +1 -1
  128. package/dist/index.cjs.js.map +1 -1
  129. package/dist/index.js +1 -1
  130. package/package.json +3 -1
  131. package/src/animation.css +109 -0
  132. package/src/utilities.css +87 -0
  133. package/dist/components/tile/TileGroup.d.ts +0 -11
  134. package/dist/components/tile/TileGroup.js +0 -2
  135. package/dist/components/tile/TileGroup.js.map +0 -1
@@ -1,43 +1,42 @@
1
- export declare const SideBarHeader: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
1
+ import * as React from 'react';
2
+ export declare const SideBarHeader: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
3
4
  }, never> & {
4
- as?: import("react").ElementType;
5
+ as?: React.ElementType;
5
6
  }>;
6
- export declare const SideBarBody: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
7
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
7
+ export declare const SideBarBody: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
8
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
8
9
  }, never> & {
9
- as?: import("react").ElementType;
10
+ as?: React.ElementType;
10
11
  }>;
11
- export declare const SideBarFooter: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
12
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
12
+ export declare const SideBarFooter: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
+ ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
13
14
  }, never> & {
14
- as?: import("react").ElementType;
15
+ as?: React.ElementType;
15
16
  }>;
16
- export declare const SideBarBrand: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "ref"> & {
17
- ref?: ((instance: HTMLAnchorElement | null) => void) | import("react").RefObject<HTMLAnchorElement> | null | undefined;
18
- }, never> & {
19
- as?: import("react").ElementType;
17
+ export declare const SideBarBrand: React.ForwardRefExoticComponent<React.ComponentPropsWithRef<"a"> & {
18
+ as?: React.ElementType;
20
19
  }>;
21
- export declare const SideBarBrandLogo: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
22
- ref?: ((instance: HTMLImageElement | null) => void) | import("react").RefObject<HTMLImageElement> | null | undefined;
20
+ export declare const SideBarBrandLogo: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, "ref"> & {
21
+ ref?: ((instance: HTMLImageElement | null) => void) | React.RefObject<HTMLImageElement> | null | undefined;
23
22
  }, "fluid"> & {
24
23
  fluid?: boolean | undefined;
25
24
  } & {
26
- as?: import("react").ElementType;
25
+ as?: React.ElementType;
27
26
  }, "as"> & {
28
27
  as?: never;
29
- }, "ref"> & import("react").RefAttributes<HTMLImageElement>>;
30
- export declare const SideBarBrandName: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
31
- ref?: ((instance: HTMLParagraphElement | null) => void) | import("react").RefObject<HTMLParagraphElement> | null | undefined;
28
+ }, "ref"> & React.RefAttributes<HTMLImageElement>>;
29
+ export declare const SideBarBrandName: React.ForwardRefExoticComponent<Omit<Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
30
+ ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
32
31
  }, "size" | "noCapsize" | "weight" | "family"> & {
33
32
  size?: ("sm" | "md" | "lg" | "xs" | "xl" | "2xl" | "3xl" | "4xl" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "sm" | "md" | "lg" | "xs" | "xl" | "2xl" | "3xl" | "4xl">>) | undefined;
34
33
  noCapsize?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
35
34
  weight?: ("bold" | "normal" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "bold" | "normal">>) | undefined;
36
35
  family?: ("display" | "body" | "mono" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "display" | "body" | "mono">>) | undefined;
37
36
  } & {
38
- as?: import("react").ElementType;
37
+ as?: React.ElementType;
39
38
  }, "as"> & {
40
39
  as?: "blockquote" | "caption" | "dd" | "dt" | "figcaption" | "li" | "p" | "span" | "legend" | React.ComponentType | React.ElementType;
41
- }, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, never> & {
42
- as?: import("react").ElementType;
40
+ }, "ref"> & React.RefAttributes<HTMLParagraphElement>, never> & {
41
+ as?: React.ElementType;
43
42
  }>;
@@ -1,2 +1,2 @@
1
- import{styled as e}from"../../styled.js";import{Image as r}from"../image/Image.js";import{Text as o}from"../text/Text.js";const d=e("div",{base:["border-b","border-b-(--border)","p-4","w-full"]}),a=e("div",{base:["grow","overflow-y-auto","overflow-x-hidden","p-4","w-full"]}),t=e("div",{base:["border-t","border-t-(--border)","p-4","w-full"]}),i=e("a",{base:["items-end","text-text","flex","gap-4","no-underline","hover:no-underline","focus:no-underline"]}),n=r,b=e(o,{base:["text-text","whitespace-nowrap"]});export{a as SideBarBody,i as SideBarBrand,n as SideBarBrandLogo,b as SideBarBrandName,t as SideBarFooter,d as SideBarHeader};
1
+ import{styled as e}from"../../styled.js";import{Image as r}from"../image/Image.js";import{Text as o}from"../text/Text.js";const d=e("div",{base:["border-b","border-b-(--border)","p-4","w-full"]}),t=e("div",{base:["grow","overflow-y-auto","overflow-x-hidden","p-4","w-full"]}),a=e("div",{base:["border-t","border-t-(--border)","p-4","w-full"]}),i=e("a",{base:["items-end","text-text","flex","gap-4","no-underline","hover:no-underline","focus:no-underline"]}),n=i,b=r,l=e(o,{base:["text-text","whitespace-nowrap"]});export{t as SideBarBody,n as SideBarBrand,b as SideBarBrandLogo,l as SideBarBrandName,a as SideBarFooter,d as SideBarHeader};
2
2
  //# sourceMappingURL=SideBarComponents.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SideBarComponents.js","sources":["../../../src/components/side-bar/SideBarComponents.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const SideBarHeader = styled('div', {\n base: ['border-b', 'border-b-(--border)', 'p-4', 'w-full']\n})\n\nexport const SideBarBody = styled('div', {\n base: ['grow', 'overflow-y-auto', 'overflow-x-hidden', 'p-4', 'w-full']\n})\n\nexport const SideBarFooter = styled('div', {\n base: ['border-t', 'border-t-(--border)', 'p-4', 'w-full']\n})\n\nexport const SideBarBrand = styled('a', {\n base: [\n 'items-end',\n 'text-text',\n 'flex',\n 'gap-4',\n 'no-underline',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n\nexport const SideBarBrandLogo = Image\n\nexport const SideBarBrandName = styled(Text, {\n base: ['text-text', 'whitespace-nowrap']\n})\n"],"names":["SideBarHeader","styled","SideBarBody","SideBarFooter","SideBarBrand","SideBarBrandLogo","Image","SideBarBrandName","Text"],"mappings":"0HAKa,MAAAA,EAAgBC,EAAO,MAAO,CACzC,KAAM,CAAC,WAAY,sBAAuB,MAAO,QAAQ,CAC3D,CAAC,EAEYC,EAAcD,EAAO,MAAO,CACvC,KAAM,CAAC,OAAQ,kBAAmB,oBAAqB,MAAO,QAAQ,CACxE,CAAC,EAEYE,EAAgBF,EAAO,MAAO,CACzC,KAAM,CAAC,WAAY,sBAAuB,MAAO,QAAQ,CAC3D,CAAC,EAEYG,EAAeH,EAAO,IAAK,CACtC,KAAM,CACJ,YACA,YACA,OACA,QACA,eACA,qBACA,oBACF,CACF,CAAC,EAEYI,EAAmBC,EAEnBC,EAAmBN,EAAOO,EAAM,CAC3C,KAAM,CAAC,YAAa,mBAAmB,CACzC,CAAC"}
1
+ {"version":3,"file":"SideBarComponents.js","sources":["../../../src/components/side-bar/SideBarComponents.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Image } from '../image/Image'\nimport { Text } from '../text/Text'\n\nexport const SideBarHeader = styled('div', {\n base: ['border-b', 'border-b-(--border)', 'p-4', 'w-full']\n})\n\nexport const SideBarBody = styled('div', {\n base: ['grow', 'overflow-y-auto', 'overflow-x-hidden', 'p-4', 'w-full']\n})\n\nexport const SideBarFooter = styled('div', {\n base: ['border-t', 'border-t-(--border)', 'p-4', 'w-full']\n})\n\nconst StyledSideBarBrand = styled('a', {\n base: [\n 'items-end',\n 'text-text',\n 'flex',\n 'gap-4',\n 'no-underline',\n 'hover:no-underline',\n 'focus:no-underline'\n ]\n})\n\nexport const SideBarBrand =\n StyledSideBarBrand as React.ForwardRefExoticComponent<\n React.ComponentPropsWithRef<'a'> & { as?: React.ElementType }\n >\n\nexport const SideBarBrandLogo = Image\n\nexport const SideBarBrandName = styled(Text, {\n base: ['text-text', 'whitespace-nowrap']\n})\n"],"names":["SideBarHeader","styled","SideBarBody","SideBarFooter","StyledSideBarBrand","SideBarBrand","SideBarBrandLogo","Image","SideBarBrandName","Text"],"mappings":"0HAOa,MAAAA,EAAgBC,EAAO,MAAO,CACzC,KAAM,CAAC,WAAY,sBAAuB,MAAO,QAAQ,CAC3D,CAAC,EAEYC,EAAcD,EAAO,MAAO,CACvC,KAAM,CAAC,OAAQ,kBAAmB,oBAAqB,MAAO,QAAQ,CACxE,CAAC,EAEYE,EAAgBF,EAAO,MAAO,CACzC,KAAM,CAAC,WAAY,sBAAuB,MAAO,QAAQ,CAC3D,CAAC,EAEKG,EAAqBH,EAAO,IAAK,CACrC,KAAM,CACJ,YACA,YACA,OACA,QACA,eACA,qBACA,oBACF,CACF,CAAC,EAEYI,EACXD,EAIWE,EAAmBC,EAEnBC,EAAmBP,EAAOQ,EAAM,CAC3C,KAAM,CAAC,YAAa,mBAAmB,CACzC,CAAC"}
@@ -1,13 +1,5 @@
1
- export declare const StepperStepBullet: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1
+ export declare const StepperStepBullet: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
2
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
4
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
5
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
6
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
7
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
8
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
9
- } & {
10
- as?: import("react").ElementType;
11
3
  }, "status"> & {
12
4
  status?: "default" | "success" | "active" | "viewed" | "completed" | "reviewed" | undefined;
13
5
  } & {
@@ -1,2 +1,2 @@
1
- import{styled as e}from"../../styled.js";import{Flex as t}from"../flex/Flex.js";const r=e(t,{base:["relative","p-2","justify-center","items-center","size-8","rounded-[50%]","bg-grey-200","z-1","flex-none"],variants:{status:{default:["bg-grey-200","text-grey-700"],active:["bg-white","border-2","border-current","text-primary-900"],viewed:["bg-white","border-2","border-grey-600","text-grey-1000"],completed:["bg-primary-800","text-white"],reviewed:["bg-primary-900","text-white"],success:["bg-success","text-white"]}}});export{r as StepperStepBullet};
1
+ import{styled as e}from"../../styled.js";const t=e("div",{base:["flex","relative","p-2","justify-center","items-center","size-8","rounded-[50%]","bg-grey-200","z-1","flex-none"],variants:{status:{default:["bg-grey-200","text-grey-700"],active:["bg-white","border-2","border-current","text-primary-900"],viewed:["bg-white","border-2","border-grey-600","text-grey-1000"],completed:["bg-primary-800","text-white"],reviewed:["bg-primary-900","text-white"],success:["bg-success","text-white"]}}});export{t as StepperStepBullet};
2
2
  //# sourceMappingURL=StepperStepBullet.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepperStepBullet.js","sources":["../../../src/components/stepper/StepperStepBullet.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\n\nexport const StepperStepBullet = styled(Flex, {\n base: [\n 'relative',\n 'p-2',\n 'justify-center',\n 'items-center',\n 'size-8',\n 'rounded-[50%]',\n 'bg-grey-200',\n 'z-1',\n 'flex-none'\n ],\n variants: {\n status: {\n default: ['bg-grey-200', 'text-grey-700'],\n active: ['bg-white', 'border-2', 'border-current', 'text-primary-900'],\n viewed: ['bg-white', 'border-2', 'border-grey-600', 'text-grey-1000'],\n completed: ['bg-primary-800', 'text-white'],\n reviewed: ['bg-primary-900', 'text-white'],\n success: ['bg-success', 'text-white']\n }\n }\n})\n"],"names":["StepperStepBullet","styled","Flex"],"mappings":"gFAIO,MAAMA,EAAoBC,EAAOC,EAAM,CAC5C,KAAM,CACJ,WACA,MACA,iBACA,eACA,SACA,gBACA,cACA,MACA,WACF,EACA,SAAU,CACR,OAAQ,CACN,QAAS,CAAC,cAAe,eAAe,EACxC,OAAQ,CAAC,WAAY,WAAY,iBAAkB,kBAAkB,EACrE,OAAQ,CAAC,WAAY,WAAY,kBAAmB,gBAAgB,EACpE,UAAW,CAAC,iBAAkB,YAAY,EAC1C,SAAU,CAAC,iBAAkB,YAAY,EACzC,QAAS,CAAC,aAAc,YAAY,CACtC,CACF,CACF,CAAC"}
1
+ {"version":3,"file":"StepperStepBullet.js","sources":["../../../src/components/stepper/StepperStepBullet.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const StepperStepBullet = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'p-2',\n 'justify-center',\n 'items-center',\n 'size-8',\n 'rounded-[50%]',\n 'bg-grey-200',\n 'z-1',\n 'flex-none'\n ],\n variants: {\n status: {\n default: ['bg-grey-200', 'text-grey-700'],\n active: ['bg-white', 'border-2', 'border-current', 'text-primary-900'],\n viewed: ['bg-white', 'border-2', 'border-grey-600', 'text-grey-1000'],\n completed: ['bg-primary-800', 'text-white'],\n reviewed: ['bg-primary-900', 'text-white'],\n success: ['bg-success', 'text-white']\n }\n }\n})\n"],"names":["StepperStepBullet","styled"],"mappings":"yCAEO,MAAMA,EAAoBC,EAAO,MAAO,CAC7C,KAAM,CACJ,OACA,WACA,MACA,iBACA,eACA,SACA,gBACA,cACA,MACA,WACF,EACA,SAAU,CACR,OAAQ,CACN,QAAS,CAAC,cAAe,eAAe,EACxC,OAAQ,CAAC,WAAY,WAAY,iBAAkB,kBAAkB,EACrE,OAAQ,CAAC,WAAY,WAAY,kBAAmB,gBAAgB,EACpE,UAAW,CAAC,iBAAkB,YAAY,EAC1C,SAAU,CAAC,iBAAkB,YAAY,EACzC,QAAS,CAAC,aAAc,YAAY,CACtC,CACF,CACF,CAAC"}
@@ -1,13 +1,5 @@
1
- export declare const StepperStepContainer: import("react").ForwardRefExoticComponent<Omit<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
1
+ export declare const StepperStepContainer: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
2
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
3
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
4
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
5
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
6
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
7
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
8
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
9
- } & {
10
- as?: import("react").ElementType;
11
3
  }, "direction" | "separator" | "status" | "canInteract"> & {
12
4
  canInteract?: boolean | undefined;
13
5
  direction?: "horizontal" | "vertical" | undefined;
@@ -1,2 +1,2 @@
1
- import{styled as t}from"../../styled.js";import{Flex as e}from"../flex/Flex.js";const s=t(e,{base:["relative","font-body","font-semibold","text-md","items-center","not-last:after:absolute","not-last:after:content-['']","focus-visible:outline-none"],variants:{canInteract:{true:[]},direction:{vertical:["flex-row","not-last:after:h-full","not-last:after:left-3.5","not-last:after:top-1/2","not-last:after:w-1","py-3"],horizontal:["flex-col","not-last:after:h-1","not-last:after:left-1/2","not-last:after:top-3.5","not-last:after:w-full","px-2"]},separator:{default:["not-last:after:bg-grey-200"],active:["not-last:after:bg-primary-800"],success:["not-last:after:bg-success"],viewed:["not-last:after:bg-grey-600"]},status:{completed:[],active:[],default:[],viewed:[],success:[],reviewed:[]}},compoundVariants:[{canInteract:!0,status:"completed",class:["focus-visible:first:outline-2","focus-visible:first:outline-offset-2","focus-visible:first:outline-primary-800","focus-visible:first:outline-solid","hover:first:bg-primary-900","hover:first:text-white!","hover:last:text-primary-900"]},{canInteract:!0,status:"active",class:["focus-visible:first:outline-2","focus-visible:first:outline-offset-2","focus-visible:first:outline-primary-800","focus-visible:first:outline-solid","hover:first:border-grey-800","hover:first:text-grey-1000","hover:last:text-grey-1000"]},{canInteract:!0,status:"viewed",class:["focus-visible:first:outline-2!","focus-visible:first:outline-offset-2!","focus-visible:first:outline-primary-800!","focus-visible:first:outline-solid!","hover:first:border-grey-800","hover:first:text-grey-1000","hover:last:text-grey-1000"]},{canInteract:!0,status:"reviewed",class:["focus-visible:first:outline-2!","focus-visible:first:outline-offset-2!","focus-visible:first:outline-primary-800!","focus-visible:first:outline-solid!"]}]});export{s as StepperStepContainer};
1
+ import{styled as t}from"../../styled.js";const e=t("div",{base:["flex","relative","font-body","font-semibold","text-md","items-center","not-last:after:absolute","not-last:after:content-['']","focus-visible:outline-none"],variants:{canInteract:{true:[]},direction:{vertical:["flex-row","not-last:after:h-full","not-last:after:left-3.5","not-last:after:top-1/2","not-last:after:w-1","py-3"],horizontal:["flex-col","not-last:after:h-1","not-last:after:left-1/2","not-last:after:top-3.5","not-last:after:w-full","px-2"]},separator:{default:["not-last:after:bg-grey-200"],active:["not-last:after:bg-primary-800"],success:["not-last:after:bg-success"],viewed:["not-last:after:bg-grey-600"]},status:{completed:[],active:[],default:[],viewed:[],success:[],reviewed:[]}},compoundVariants:[{canInteract:!0,status:"completed",class:["focus-visible:first:outline-2","focus-visible:first:outline-offset-2","focus-visible:first:outline-primary-800","focus-visible:first:outline-solid","hover:first:bg-primary-900","hover:first:text-white!","hover:last:text-primary-900"]},{canInteract:!0,status:"active",class:["focus-visible:first:outline-2","focus-visible:first:outline-offset-2","focus-visible:first:outline-primary-800","focus-visible:first:outline-solid","hover:first:border-grey-800","hover:first:text-grey-1000","hover:last:text-grey-1000"]},{canInteract:!0,status:"viewed",class:["focus-visible:first:outline-2!","focus-visible:first:outline-offset-2!","focus-visible:first:outline-primary-800!","focus-visible:first:outline-solid!","hover:first:border-grey-800","hover:first:text-grey-1000","hover:last:text-grey-1000"]},{canInteract:!0,status:"reviewed",class:["focus-visible:first:outline-2!","focus-visible:first:outline-offset-2!","focus-visible:first:outline-primary-800!","focus-visible:first:outline-solid!"]}]});export{e as StepperStepContainer};
2
2
  //# sourceMappingURL=StepperStepContainer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepperStepContainer.js","sources":["../../../src/components/stepper/StepperStepContainer.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\n\nexport const StepperStepContainer = styled(Flex, {\n base: [\n 'relative',\n 'font-body',\n 'font-semibold',\n 'text-md',\n 'items-center',\n 'not-last:after:absolute',\n \"not-last:after:content-['']\",\n 'focus-visible:outline-none'\n ],\n variants: {\n canInteract: {\n true: []\n },\n direction: {\n vertical: [\n 'flex-row',\n 'not-last:after:h-full',\n 'not-last:after:left-3.5',\n 'not-last:after:top-1/2',\n 'not-last:after:w-1',\n 'py-3'\n ],\n horizontal: [\n 'flex-col',\n 'not-last:after:h-1',\n 'not-last:after:left-1/2',\n 'not-last:after:top-3.5',\n 'not-last:after:w-full',\n 'px-2'\n ]\n },\n separator: {\n default: ['not-last:after:bg-grey-200'],\n active: ['not-last:after:bg-primary-800'],\n success: ['not-last:after:bg-success'],\n viewed: ['not-last:after:bg-grey-600']\n },\n status: {\n completed: [],\n active: [],\n default: [],\n viewed: [],\n success: [],\n reviewed: []\n }\n },\n compoundVariants: [\n {\n canInteract: true,\n status: 'completed',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:bg-primary-900',\n 'hover:first:text-white!',\n 'hover:last:text-primary-900'\n ]\n },\n {\n canInteract: true,\n status: 'active',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'viewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'reviewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!'\n ]\n }\n ]\n})\n"],"names":["StepperStepContainer","styled","Flex"],"mappings":"gFAIO,MAAMA,EAAuBC,EAAOC,EAAM,CAC/C,KAAM,CACJ,WACA,YACA,gBACA,UACA,eACA,0BACA,8BACA,4BACF,EACA,SAAU,CACR,YAAa,CACX,KAAM,CAAA,CACR,EACA,UAAW,CACT,SAAU,CACR,WACA,wBACA,0BACA,yBACA,qBACA,MACF,EACA,WAAY,CACV,WACA,qBACA,0BACA,yBACA,wBACA,MACF,CACF,EACA,UAAW,CACT,QAAS,CAAC,4BAA4B,EACtC,OAAQ,CAAC,+BAA+B,EACxC,QAAS,CAAC,2BAA2B,EACrC,OAAQ,CAAC,4BAA4B,CACvC,EACA,OAAQ,CACN,UAAW,CAAA,EACX,OAAQ,CAAA,EACR,QAAS,CAAA,EACT,OAAQ,CAAA,EACR,QAAS,CAAC,EACV,SAAU,CACZ,CAAA,CACF,EACA,iBAAkB,CAChB,CACE,YAAa,GACb,OAAQ,YACR,MAAO,CACL,gCACA,uCACA,0CACA,oCACA,6BACA,0BACA,6BACF,CACF,EACA,CACE,YAAa,GACb,OAAQ,SACR,MAAO,CACL,gCACA,uCACA,0CACA,oCACA,8BACA,6BACA,2BACF,CACF,EACA,CACE,YAAa,GACb,OAAQ,SACR,MAAO,CACL,iCACA,wCACA,2CACA,qCACA,8BACA,6BACA,2BACF,CACF,EACA,CACE,YAAa,GACb,OAAQ,WACR,MAAO,CACL,iCACA,wCACA,2CACA,oCACF,CACF,CACF,CACF,CAAC"}
1
+ {"version":3,"file":"StepperStepContainer.js","sources":["../../../src/components/stepper/StepperStepContainer.tsx"],"sourcesContent":["import { styled } from '~/styled'\n\nexport const StepperStepContainer = styled('div', {\n base: [\n 'flex',\n 'relative',\n 'font-body',\n 'font-semibold',\n 'text-md',\n 'items-center',\n 'not-last:after:absolute',\n \"not-last:after:content-['']\",\n 'focus-visible:outline-none'\n ],\n variants: {\n canInteract: {\n true: []\n },\n direction: {\n vertical: [\n 'flex-row',\n 'not-last:after:h-full',\n 'not-last:after:left-3.5',\n 'not-last:after:top-1/2',\n 'not-last:after:w-1',\n 'py-3'\n ],\n horizontal: [\n 'flex-col',\n 'not-last:after:h-1',\n 'not-last:after:left-1/2',\n 'not-last:after:top-3.5',\n 'not-last:after:w-full',\n 'px-2'\n ]\n },\n separator: {\n default: ['not-last:after:bg-grey-200'],\n active: ['not-last:after:bg-primary-800'],\n success: ['not-last:after:bg-success'],\n viewed: ['not-last:after:bg-grey-600']\n },\n status: {\n completed: [],\n active: [],\n default: [],\n viewed: [],\n success: [],\n reviewed: []\n }\n },\n compoundVariants: [\n {\n canInteract: true,\n status: 'completed',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:bg-primary-900',\n 'hover:first:text-white!',\n 'hover:last:text-primary-900'\n ]\n },\n {\n canInteract: true,\n status: 'active',\n class: [\n 'focus-visible:first:outline-2',\n 'focus-visible:first:outline-offset-2',\n 'focus-visible:first:outline-primary-800',\n 'focus-visible:first:outline-solid',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'viewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!',\n 'hover:first:border-grey-800',\n 'hover:first:text-grey-1000',\n 'hover:last:text-grey-1000'\n ]\n },\n {\n canInteract: true,\n status: 'reviewed',\n class: [\n 'focus-visible:first:outline-2!',\n 'focus-visible:first:outline-offset-2!',\n 'focus-visible:first:outline-primary-800!',\n 'focus-visible:first:outline-solid!'\n ]\n }\n ]\n})\n"],"names":["StepperStepContainer","styled"],"mappings":"yCAEO,MAAMA,EAAuBC,EAAO,MAAO,CAChD,KAAM,CACJ,OACA,WACA,YACA,gBACA,UACA,eACA,0BACA,8BACA,4BACF,EACA,SAAU,CACR,YAAa,CACX,KAAM,CAAA,CACR,EACA,UAAW,CACT,SAAU,CACR,WACA,wBACA,0BACA,yBACA,qBACA,MACF,EACA,WAAY,CACV,WACA,qBACA,0BACA,yBACA,wBACA,MACF,CACF,EACA,UAAW,CACT,QAAS,CAAC,4BAA4B,EACtC,OAAQ,CAAC,+BAA+B,EACxC,QAAS,CAAC,2BAA2B,EACrC,OAAQ,CAAC,4BAA4B,CACvC,EACA,OAAQ,CACN,UAAW,CACX,EAAA,OAAQ,CACR,EAAA,QAAS,CAAC,EACV,OAAQ,CACR,EAAA,QAAS,CAAA,EACT,SAAU,CAAA,CACZ,CACF,EACA,iBAAkB,CAChB,CACE,YAAa,GACb,OAAQ,YACR,MAAO,CACL,gCACA,uCACA,0CACA,oCACA,6BACA,0BACA,6BACF,CACF,EACA,CACE,YAAa,GACb,OAAQ,SACR,MAAO,CACL,gCACA,uCACA,0CACA,oCACA,8BACA,6BACA,2BACF,CACF,EACA,CACE,YAAa,GACb,OAAQ,SACR,MAAO,CACL,iCACA,wCACA,2CACA,qCACA,8BACA,6BACA,2BACF,CACF,EACA,CACE,YAAa,GACb,OAAQ,WACR,MAAO,CACL,iCACA,wCACA,2CACA,oCACF,CACF,CACF,CACF,CAAC"}
@@ -1,2 +1,2 @@
1
- import{Ok as f}from"@atom-learning/icons";import*as l from"react";import{styled as v}from"../../styled.js";import{Flex as h}from"../flex/Flex.js";import{Icon as I}from"../icon/Icon.js";import{useStepper as D}from"./stepper-context/StepperContext.js";import{StepperStepBullet as T}from"./StepperStepBullet.js";import{StepperStepContainer as w}from"./StepperStepContainer.js";import{StepperStepLabel as L}from"./StepperStepLabel.js";import{Status as t}from"./types.js";const U=v(h,{base:["justify-between"],variants:{direction:{vertical:["flex-col"],horizontal:["flex-row"]}}}),g=({className:S})=>{const{steps:o,goToStep:m,activeStep:r,viewedSteps:i,allowSkip:n,direction:p,hideLabels:E,completedSteps:c,showCompletedIcons:u}=D(),d=s=>{const e=o[s];return e.status?e.status:c.length===o.length?t.SUCCESS:r===s&&c.includes(r)?t.REVIEWED:r===s?t.ACTIVE:c.includes(s)?t.COMPLETED:i.includes(s)?t.VIEWED:t.DEFAULT},C=s=>{var e;const a=(e=o[s])==null?void 0:e.status;return c.length===o.length?t.SUCCESS:a===t.SUCCESS?t.SUCCESS:a===t.COMPLETED||s<Math.max(...i)?t.ACTIVE:a===t.VIEWED?t.VIEWED:t.DEFAULT};return l.createElement(U,{className:S,direction:p},o.map((s,e)=>{const a=d(e),b=C(e);return l.createElement(w,{tabIndex:0,key:`step_${e}`,direction:p,separator:b,status:a,style:{"--steps":o.length||0},className:p==="horizontal"?"w-[calc(100%/var(--steps))]":"h-[calc(100%/var(--steps))]",canInteract:n},l.createElement(T,{as:n?"button":"div",onClick:()=>n&&i.includes(e)?m==null?void 0:m(e):void 0,status:a,"aria-current":e===r?"step":void 0,"aria-label":s.label?"":`step ${e+1}`,"aria-labelledby":s.label?`step-${e}`:void 0,className:n&&i.includes(e)?"cursor-pointer":"cursor-auto"},s.status===t.SUCCESS||u&&a===t.COMPLETED?l.createElement(I,{is:f}):e+1),s.label&&!E&&l.createElement(L,{as:"span",id:`step-${e}`,direction:p,status:a},s.label))}))};export{g as StepperSteps};
1
+ import{Ok as f}from"@atom-learning/icons";import*as l from"react";import{styled as v}from"../../styled.js";import{Icon as h}from"../icon/Icon.js";import{useStepper as I}from"./stepper-context/StepperContext.js";import{StepperStepBullet as D}from"./StepperStepBullet.js";import{StepperStepContainer as T}from"./StepperStepContainer.js";import{StepperStepLabel as g}from"./StepperStepLabel.js";import{Status as t}from"./types.js";const L=v("div",{base:["flex","justify-between"],variants:{direction:{vertical:["flex-col"],horizontal:["flex-row"]}}}),U=({className:S})=>{const{steps:o,goToStep:m,activeStep:r,viewedSteps:i,allowSkip:n,direction:p,hideLabels:E,completedSteps:c,showCompletedIcons:u}=I(),d=s=>{const e=o[s];return e.status?e.status:c.length===o.length?t.SUCCESS:r===s&&c.includes(r)?t.REVIEWED:r===s?t.ACTIVE:c.includes(s)?t.COMPLETED:i.includes(s)?t.VIEWED:t.DEFAULT},C=s=>{var e;const a=(e=o[s])==null?void 0:e.status;return c.length===o.length?t.SUCCESS:a===t.SUCCESS?t.SUCCESS:a===t.COMPLETED||s<Math.max(...i)?t.ACTIVE:a===t.VIEWED?t.VIEWED:t.DEFAULT};return l.createElement(L,{className:S,direction:p},o.map((s,e)=>{const a=d(e),b=C(e);return l.createElement(T,{tabIndex:0,key:`step_${e}`,direction:p,separator:b,status:a,style:{"--steps":o.length||0},className:p==="horizontal"?"w-[calc(100%/var(--steps))]":"h-[calc(100%/var(--steps))]",canInteract:n},l.createElement(D,{as:n?"button":"div",onClick:()=>n&&i.includes(e)?m==null?void 0:m(e):void 0,status:a,"aria-current":e===r?"step":void 0,"aria-label":s.label?"":`step ${e+1}`,"aria-labelledby":s.label?`step-${e}`:void 0,className:n&&i.includes(e)?"cursor-pointer":"cursor-auto"},s.status===t.SUCCESS||u&&a===t.COMPLETED?l.createElement(h,{is:f}):e+1),s.label&&!E&&l.createElement(g,{as:"span",id:`step-${e}`,direction:p,status:a},s.label))}))};export{U as StepperSteps};
2
2
  //# sourceMappingURL=StepperSteps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"StepperSteps.js","sources":["../../../src/components/stepper/StepperSteps.tsx"],"sourcesContent":["import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './stepper-context/StepperContext'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { IStepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled(Flex, {\n base: ['justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: IStepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedSteps.includes(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedSteps.includes(index)) return Status.COMPLETED\n if (viewedSteps.includes(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedSteps.includes(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedSteps.includes(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n"],"names":["StepperStepsContainer","styled","Flex","StepperSteps","className","steps","goToStep","activeStep","viewedSteps","allowSkip","direction","hideLabels","completedSteps","showCompletedIcons","useStepper","getBulletStatus","index","activeBullet","Status","getSeparatorStatus","_a","bulletStatus","React","step","separatorStatus","StepperStepContainer","StepperStepBullet","Icon","Ok","StepperStepLabel"],"mappings":"mdAaA,MAAMA,EAAwBC,EAAOC,EAAM,CACzC,KAAM,CAAC,iBAAiB,EACxB,SAAU,CACR,UAAW,CACT,SAAU,CAAC,UAAU,EACrB,WAAY,CAAC,UAAU,CACzB,CACF,CACF,CAAC,EAEYC,EAAe,CAAC,CAAE,UAAAC,CAAU,IAA0B,CACjE,KAAM,CACJ,MAAAC,EACA,SAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,UAAAC,EACA,WAAAC,EACA,eAAAC,EACA,mBAAAC,CACF,EAAIC,EAAW,EAETC,EAAmBC,GAAkB,CACzC,MAAMC,EAAeZ,EAAMW,CAAK,EAEhC,OAAIC,EAAa,OAAeA,EAAa,OACzCL,EAAe,SAAWP,EAAM,OAAea,EAAO,QACtDX,IAAeS,GAASJ,EAAe,SAASL,CAAU,EACrDW,EAAO,SACZX,IAAeS,EAAcE,EAAO,OACpCN,EAAe,SAASI,CAAK,EAAUE,EAAO,UAC9CV,EAAY,SAASQ,CAAK,EAAUE,EAAO,OACxCA,EAAO,OAChB,EAEMC,EAAsBH,GAAkB,CAjDhD,IAAAI,EAkDI,MAAMC,GAAeD,EAAAf,EAAMW,CAAK,IAAX,KAAA,OAAAI,EAAc,OAEnC,OAAIR,EAAe,SAAWP,EAAM,OAC3Ba,EAAO,QAGZG,IAAiBH,EAAO,QACnBA,EAAO,QAGZG,IAAiBH,EAAO,WAAaF,EAAQ,KAAK,IAAI,GAAGR,CAAW,EAC/DU,EAAO,OAGZG,IAAiBH,EAAO,OACnBA,EAAO,OAGTA,EAAO,OAChB,EAEA,OACEI,EAAA,cAACtB,EAAA,CAAsB,UAAWI,EAAW,UAAWM,CAAAA,EACrDL,EAAM,IAAI,CAACkB,EAAMP,IAAU,CAC1B,MAAMK,EAAeN,EAAgBC,CAAK,EACpCQ,EAAkBL,EAAmBH,CAAK,EAEhD,OACEM,EAAA,cAACG,EAAA,CACC,SAAU,EACV,IAAK,QAAQT,CAAK,GAClB,UAAWN,EACX,UAAWc,EACX,OAAQH,EACR,MAAO,CAAE,UAAWhB,EAAM,QAAU,CAAE,EACtC,UACEK,IAAc,aACV,8BACA,8BAEN,YAAaD,CAEba,EAAAA,EAAA,cAACI,EAAA,CACC,GAAIjB,EAAY,SAAW,MAC3B,QAAS,IACPA,GAAaD,EAAY,SAASQ,CAAK,EACnCV,GAAA,KAAA,OAAAA,EAAWU,CACX,EAAA,OAEN,OAAQK,EACR,eAAcL,IAAUT,EAAa,OAAS,OAC9C,aAAagB,EAAK,MAA8B,GAAtB,QAAQP,EAAQ,CAAC,GAC3C,kBAAiBO,EAAK,MAAQ,QAAQP,CAAK,GAAK,OAChD,UACEP,GAAaD,EAAY,SAASQ,CAAK,EACnC,iBACA,eAGLO,EAAK,SAAWL,EAAO,SACvBL,GAAsBQ,IAAiBH,EAAO,UAC7CI,EAAA,cAACK,EAAA,CAAK,GAAIC,CAAAA,CAAI,EAEdZ,EAAQ,CAEZ,EAECO,EAAK,OAAS,CAACZ,GACdW,EAAA,cAACO,EAAA,CACC,GAAG,OACH,GAAI,QAAQb,CAAK,GACjB,UAAWN,EACX,OAAQW,GAEPE,EAAK,KACR,CAEJ,CAEJ,CAAC,CACH,CAEJ"}
1
+ {"version":3,"file":"StepperSteps.js","sources":["../../../src/components/stepper/StepperSteps.tsx"],"sourcesContent":["import { Ok } from '@atom-learning/icons'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useStepper } from './stepper-context/StepperContext'\nimport { StepperStepBullet } from './StepperStepBullet'\nimport { StepperStepContainer } from './StepperStepContainer'\nimport { StepperStepLabel } from './StepperStepLabel'\nimport { IStepperStepsProps, Status } from './types'\n\nconst StepperStepsContainer = styled('div', {\n base: ['flex', 'justify-between'],\n variants: {\n direction: {\n vertical: ['flex-col'],\n horizontal: ['flex-row']\n }\n }\n})\n\nexport const StepperSteps = ({ className }: IStepperStepsProps) => {\n const {\n steps,\n goToStep,\n activeStep,\n viewedSteps,\n allowSkip,\n direction,\n hideLabels,\n completedSteps,\n showCompletedIcons\n } = useStepper()\n\n const getBulletStatus = (index: number) => {\n const activeBullet = steps[index]\n\n if (activeBullet.status) return activeBullet.status\n if (completedSteps.length === steps.length) return Status.SUCCESS\n if (activeStep === index && completedSteps.includes(activeStep))\n return Status.REVIEWED\n if (activeStep === index) return Status.ACTIVE\n if (completedSteps.includes(index)) return Status.COMPLETED\n if (viewedSteps.includes(index)) return Status.VIEWED\n return Status.DEFAULT\n }\n\n const getSeparatorStatus = (index: number) => {\n const bulletStatus = steps[index]?.status\n\n if (completedSteps.length === steps.length) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.SUCCESS) {\n return Status.SUCCESS\n }\n\n if (bulletStatus === Status.COMPLETED || index < Math.max(...viewedSteps)) {\n return Status.ACTIVE\n }\n\n if (bulletStatus === Status.VIEWED) {\n return Status.VIEWED\n }\n\n return Status.DEFAULT\n }\n\n return (\n <StepperStepsContainer className={className} direction={direction}>\n {steps.map((step, index) => {\n const bulletStatus = getBulletStatus(index)\n const separatorStatus = getSeparatorStatus(index)\n\n return (\n <StepperStepContainer\n tabIndex={0}\n key={`step_${index}`}\n direction={direction}\n separator={separatorStatus}\n status={bulletStatus}\n style={{ '--steps': steps.length || 0 }}\n className={\n direction === 'horizontal'\n ? 'w-[calc(100%/var(--steps))]'\n : 'h-[calc(100%/var(--steps))]'\n }\n canInteract={allowSkip}\n >\n <StepperStepBullet\n as={allowSkip ? 'button' : 'div'}\n onClick={() =>\n allowSkip && viewedSteps.includes(index)\n ? goToStep?.(index)\n : undefined\n }\n status={bulletStatus}\n aria-current={index === activeStep ? 'step' : undefined}\n aria-label={!step.label ? `step ${index + 1}` : ''}\n aria-labelledby={step.label ? `step-${index}` : undefined}\n className={\n allowSkip && viewedSteps.includes(index)\n ? 'cursor-pointer'\n : 'cursor-auto'\n }\n >\n {step.status === Status.SUCCESS ||\n (showCompletedIcons && bulletStatus === Status.COMPLETED) ? (\n <Icon is={Ok} />\n ) : (\n index + 1\n )}\n </StepperStepBullet>\n\n {step.label && !hideLabels && (\n <StepperStepLabel\n as=\"span\"\n id={`step-${index}`}\n direction={direction}\n status={bulletStatus}\n >\n {step.label}\n </StepperStepLabel>\n )}\n </StepperStepContainer>\n )\n })}\n </StepperStepsContainer>\n )\n}\n"],"names":["StepperStepsContainer","styled","StepperSteps","className","steps","goToStep","activeStep","viewedSteps","allowSkip","direction","hideLabels","completedSteps","showCompletedIcons","useStepper","getBulletStatus","index","activeBullet","Status","getSeparatorStatus","_a","bulletStatus","React","step","separatorStatus","StepperStepContainer","StepperStepBullet","Icon","Ok","StepperStepLabel"],"mappings":"4aAYA,MAAMA,EAAwBC,EAAO,MAAO,CAC1C,KAAM,CAAC,OAAQ,iBAAiB,EAChC,SAAU,CACR,UAAW,CACT,SAAU,CAAC,UAAU,EACrB,WAAY,CAAC,UAAU,CACzB,CACF,CACF,CAAC,EAEYC,EAAe,CAAC,CAAE,UAAAC,CAAU,IAA0B,CACjE,KAAM,CACJ,MAAAC,EACA,SAAAC,EACA,WAAAC,EACA,YAAAC,EACA,UAAAC,EACA,UAAAC,EACA,WAAAC,EACA,eAAAC,EACA,mBAAAC,CACF,EAAIC,EAAW,EAETC,EAAmBC,GAAkB,CACzC,MAAMC,EAAeZ,EAAMW,CAAK,EAEhC,OAAIC,EAAa,OAAeA,EAAa,OACzCL,EAAe,SAAWP,EAAM,OAAea,EAAO,QACtDX,IAAeS,GAASJ,EAAe,SAASL,CAAU,EACrDW,EAAO,SACZX,IAAeS,EAAcE,EAAO,OACpCN,EAAe,SAASI,CAAK,EAAUE,EAAO,UAC9CV,EAAY,SAASQ,CAAK,EAAUE,EAAO,OACxCA,EAAO,OAChB,EAEMC,EAAsBH,GAAkB,CAhDhD,IAAAI,EAiDI,MAAMC,GAAeD,EAAAf,EAAMW,CAAK,IAAX,KAAAI,OAAAA,EAAc,OAEnC,OAAIR,EAAe,SAAWP,EAAM,OAC3Ba,EAAO,QAGZG,IAAiBH,EAAO,QACnBA,EAAO,QAGZG,IAAiBH,EAAO,WAAaF,EAAQ,KAAK,IAAI,GAAGR,CAAW,EAC/DU,EAAO,OAGZG,IAAiBH,EAAO,OACnBA,EAAO,OAGTA,EAAO,OAChB,EAEA,OACEI,EAAA,cAACrB,EAAA,CAAsB,UAAWG,EAAW,UAAWM,CAAAA,EACrDL,EAAM,IAAI,CAACkB,EAAMP,IAAU,CAC1B,MAAMK,EAAeN,EAAgBC,CAAK,EACpCQ,EAAkBL,EAAmBH,CAAK,EAEhD,OACEM,EAAA,cAACG,EAAA,CACC,SAAU,EACV,IAAK,QAAQT,CAAK,GAClB,UAAWN,EACX,UAAWc,EACX,OAAQH,EACR,MAAO,CAAE,UAAWhB,EAAM,QAAU,CAAE,EACtC,UACEK,IAAc,aACV,8BACA,8BAEN,YAAaD,CAEba,EAAAA,EAAA,cAACI,EAAA,CACC,GAAIjB,EAAY,SAAW,MAC3B,QAAS,IACPA,GAAaD,EAAY,SAASQ,CAAK,EACnCV,GAAA,KAAA,OAAAA,EAAWU,CACX,EAAA,OAEN,OAAQK,EACR,eAAcL,IAAUT,EAAa,OAAS,OAC9C,aAAagB,EAAK,MAA8B,GAAtB,QAAQP,EAAQ,CAAC,GAC3C,kBAAiBO,EAAK,MAAQ,QAAQP,CAAK,GAAK,OAChD,UACEP,GAAaD,EAAY,SAASQ,CAAK,EACnC,iBACA,eAGLO,EAAK,SAAWL,EAAO,SACvBL,GAAsBQ,IAAiBH,EAAO,UAC7CI,EAAA,cAACK,EAAA,CAAK,GAAIC,CAAAA,CAAI,EAEdZ,EAAQ,CAEZ,EAECO,EAAK,OAAS,CAACZ,GACdW,EAAA,cAACO,EAAA,CACC,GAAG,OACH,GAAI,QAAQb,CAAK,GACjB,UAAWN,EACX,OAAQW,GAEPE,EAAK,KACR,CAEJ,CAEJ,CAAC,CACH,CAEJ"}
@@ -1,26 +1,6 @@
1
1
  import * as React from 'react';
2
- export declare const TileToggleGroupRoot: React.ForwardRefExoticComponent<(Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
- ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
4
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
5
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
6
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
7
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
8
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
9
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
10
- } & {
11
- as?: React.ElementType;
12
- } & Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement> & {
2
+ export declare const TileToggleGroupRoot: React.ForwardRefExoticComponent<(Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement> & {
13
3
  disableDeselect?: boolean;
14
- }, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
- ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
16
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
17
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
18
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
19
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
20
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
21
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
22
- } & {
23
- as?: React.ElementType;
24
- } & Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement> & {
4
+ }, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> | Omit<Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement> & {
25
5
  disableDeselect?: boolean;
26
6
  }, "ref"> & React.RefAttributes<HTMLDivElement>, "ref">) & React.RefAttributes<HTMLDivElement>>;
@@ -1 +1 @@
1
- {"version":3,"file":"TileToggleGroupRoot.js","sources":["../../../src/components/tile-toggle-group/TileToggleGroupRoot.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { TileGroup } from '~/components/tile/TileGroup'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype TTileToggleGroupRootProps = React.ComponentProps<typeof TileGroup> &\n React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n TTileToggleGroupRootProps\n>((props, ref) => (\n <ToggleGroup.Root\n ref={ref}\n {...props}\n className={clsx(\n props.className,\n 'flex',\n 'gap-2',\n props.orientation === 'horizontal' && 'flex-row',\n props.orientation === 'vertical' && 'flex-col',\n 'flex-wrap'\n )}\n />\n))\n"],"names":["TileToggleGroupRoot","React","props","ref","ToggleGroup","clsx"],"mappings":"gIASa,MAAAA,EAAsBC,EAAM,WAGvC,CAACC,EAAOC,IACRF,EAAA,cAACG,EAAY,KAAZ,CACC,IAAKD,EACJ,GAAGD,EACJ,UAAWG,EACTH,EAAM,UACN,OACA,QACAA,EAAM,cAAgB,cAAgB,WACtCA,EAAM,cAAgB,YAAc,WACpC,WACF,EACF,CACD"}
1
+ {"version":3,"file":"TileToggleGroupRoot.js","sources":["../../../src/components/tile-toggle-group/TileToggleGroupRoot.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype TTileToggleGroupRootProps = React.ComponentProps<typeof ToggleGroup.Root>\n\nexport const TileToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n TTileToggleGroupRootProps\n>((props, ref) => (\n <ToggleGroup.Root\n ref={ref}\n {...props}\n className={clsx(\n props.className,\n 'flex',\n 'gap-2',\n props.orientation === 'horizontal' && 'flex-row',\n props.orientation === 'vertical' && 'flex-col',\n 'flex-wrap'\n )}\n />\n))\n"],"names":["TileToggleGroupRoot","React","props","ref","ToggleGroup","clsx"],"mappings":"gIAOa,MAAAA,EAAsBC,EAAM,WAGvC,CAACC,EAAOC,IACRF,EAAA,cAACG,EAAY,KAAZ,CACC,IAAKD,EACJ,GAAGD,EACJ,UAAWG,EACTH,EAAM,UACN,OACA,QACAA,EAAM,cAAgB,cAAgB,WACtCA,EAAM,cAAgB,YAAc,WACpC,WACF,EACF,CACD"}
@@ -1,14 +1,6 @@
1
1
  import * as React from 'react';
2
- export declare const StyledToast: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
2
+ export declare const StyledToast: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
3
3
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
4
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
5
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
6
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
7
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
8
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
9
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
10
- } & {
11
- as?: React.ElementType;
12
4
  }, "type"> & {
13
5
  type?: "loading" | "success" | "error" | "blank" | undefined;
14
6
  } & {
@@ -1,2 +1,2 @@
1
- import*as s from"react";import{styled as n}from"../../styled.js";import{Flex as a}from"../flex/Flex.js";import{ToastCloseButton as i}from"./ToastCloseButton.js";import{useToastContext as m}from"./ToastContext.js";import{ToastIcon as p}from"./ToastIcon.js";const e=n(a,{base:["pointer-events-auto","rounded-md","shadow-md","text-white","min-h-12","relative","px-4","py-1","motion-safe:duration-125","motion-safe:ease-out","motion-safe:transition-[colors,transform]"],variants:{type:{loading:["bg-info"],blank:["bg-info"],success:["bg-success"],error:["bg-danger"]}}}),o=t=>{const{type:r}=m();return s.createElement(e,{align:"center",type:t.type||r,...t})};o.Icon=p,o.Close=i;export{e as StyledToast,o as Toast};
1
+ import*as r from"react";import{styled as n}from"../../styled.js";import{ToastCloseButton as a}from"./ToastCloseButton.js";import{useToastContext as i}from"./ToastContext.js";import{ToastIcon as m}from"./ToastIcon.js";const e=n("div",{base:["flex","items-center","pointer-events-auto","rounded-md","shadow-md","text-white","min-h-12","relative","px-4","py-1","motion-safe:duration-125","motion-safe:ease-out","motion-safe:transition-[colors,transform]"],variants:{type:{loading:["bg-info"],blank:["bg-info"],success:["bg-success"],error:["bg-danger"]}}}),t=o=>{const{type:s}=i();return r.createElement(e,{type:o.type||s,...o})};t.Icon=m,t.Close=a;export{e as StyledToast,t as Toast};
2
2
  //# sourceMappingURL=Toast.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Toast.js","sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { useToastContext } from './ToastContext'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled(Flex, {\n base: [\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nexport const Toast = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n return <StyledToast align=\"center\" type={props.type || type} {...props} />\n}\n\nToast.Icon = ToastIcon\nToast.Close = ToastCloseButton\n"],"names":["StyledToast","styled","Flex","Toast","props","type","useToastContext","React","ToastIcon","ToastCloseButton"],"mappings":"sQASaA,EAAcC,EAAOC,EAAM,CACtC,KAAM,CACJ,sBACA,aACA,YACA,aACA,WACA,WACA,OACA,OACA,2BACA,uBACA,2CACF,EACA,SAAU,CACR,KAAM,CACJ,QAAS,CAAC,SAAS,EACnB,MAAO,CAAC,SAAS,EACjB,QAAS,CAAC,YAAY,EACtB,MAAO,CAAC,WAAW,CACrB,CACF,CACF,CAAC,EAEYC,EAASC,GAAoD,CACxE,KAAM,CAAE,KAAAC,CAAK,EAAIC,EACjB,EAAA,OAAOC,EAAA,cAACP,EAAA,CAAY,MAAM,SAAS,KAAMI,EAAM,MAAQC,EAAO,GAAGD,CAAO,CAAA,CAC1E,EAEAD,EAAM,KAAOK,EACbL,EAAM,MAAQM"}
1
+ {"version":3,"file":"Toast.js","sources":["../../../src/components/toast/Toast.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { ToastCloseButton } from './ToastCloseButton'\nimport { useToastContext } from './ToastContext'\nimport { ToastIcon } from './ToastIcon'\n\nexport const StyledToast = styled('div', {\n base: [\n 'flex',\n 'items-center',\n 'pointer-events-auto',\n 'rounded-md',\n 'shadow-md',\n 'text-white',\n 'min-h-12',\n 'relative',\n 'px-4',\n 'py-1',\n 'motion-safe:duration-125',\n 'motion-safe:ease-out',\n 'motion-safe:transition-[colors,transform]'\n ],\n variants: {\n type: {\n loading: ['bg-info'],\n blank: ['bg-info'],\n success: ['bg-success'],\n error: ['bg-danger']\n }\n }\n})\n\nexport const Toast = (props: React.ComponentProps<typeof StyledToast>) => {\n const { type } = useToastContext()\n return <StyledToast type={props.type || type} {...props} />\n}\n\nToast.Icon = ToastIcon\nToast.Close = ToastCloseButton\n"],"names":["StyledToast","styled","Toast","props","type","useToastContext","React","ToastIcon","ToastCloseButton"],"mappings":"+NAQaA,EAAcC,EAAO,MAAO,CACvC,KAAM,CACJ,OACA,eACA,sBACA,aACA,YACA,aACA,WACA,WACA,OACA,OACA,2BACA,uBACA,2CACF,EACA,SAAU,CACR,KAAM,CACJ,QAAS,CAAC,SAAS,EACnB,MAAO,CAAC,SAAS,EACjB,QAAS,CAAC,YAAY,EACtB,MAAO,CAAC,WAAW,CACrB,CACF,CACF,CAAC,EAEYC,EAASC,GAAoD,CACxE,KAAM,CAAE,KAAAC,CAAK,EAAIC,EAAgB,EACjC,OAAOC,EAAA,cAACN,GAAY,KAAMG,EAAM,MAAQC,EAAO,GAAGD,EAAO,CAC3D,EAEAD,EAAM,KAAOK,EACbL,EAAM,MAAQM"}
@@ -2,6 +2,8 @@ import * as React from 'react';
2
2
  type RootType = {
3
3
  orientation?: 'horizontal' | 'vertical';
4
4
  isFullWidth?: boolean;
5
+ gap?: 0 | 1 | 2 | 3;
6
+ wrap?: boolean;
5
7
  };
6
8
  export declare const StyledRoot: React.ForwardRefExoticComponent<Omit<(Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement> & {
7
9
  disableDeselect?: boolean;
@@ -15,17 +17,7 @@ export declare const StyledRoot: React.ForwardRefExoticComponent<Omit<(Omit<impo
15
17
  } & {
16
18
  as?: React.ElementType;
17
19
  }>;
18
- export declare const ToggleGroupRoot: React.ForwardRefExoticComponent<Omit<Pick<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
- ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
20
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
21
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
22
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
23
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
24
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
25
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
26
- } & {
27
- as?: React.ElementType;
28
- }, "gap" | "wrap"> & Omit<(Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement> & {
20
+ export declare const ToggleGroupRoot: React.ForwardRefExoticComponent<Omit<Omit<(Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & React.RefAttributes<HTMLDivElement> & {
29
21
  disableDeselect?: boolean;
30
22
  }, "ref"> | Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps & React.RefAttributes<HTMLDivElement> & {
31
23
  disableDeselect?: boolean;
@@ -1,2 +1,2 @@
1
- import*as t from"react";import{Flex as p}from"../flex/Flex.js";import{styled as f}from"../../styled.js";import{ToggleGroup as b}from"../../utilities/radix-overrides/toggle-group/index.js";const n=f(b.Root,{base:["w-fit"],variants:{isFullWidth:{true:["**:data-radix-collection-item:basis-0","**:data-radix-collection-item:grow","w-full"],false:["w-auto"]},hasGap:{true:["**:data-radix-collection-item:rounded-md"],false:["**:data-radix-collection-item:not-last:before:absolute","**:data-radix-collection-item:not-last:before:content-['']","**:data-radix-collection-item:relative","rounded-md"]},direction:{column:[],row:[]},theme:{standard:[],modern:["bg-grey-200"]}},compoundVariants:[{hasGap:!1,direction:"row",theme:"standard",class:["**:data-radix-collection-item:first:rounded-l-md","**:data-radix-collection-item:last:rounded-r-md","**:data-radix-collection-item:not-first:border-l-transparent","**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]","**:data-radix-collection-item:not-last:before:right-0","**:data-radix-collection-item:not-last:before:-top-px","**:data-radix-collection-item:not-last:before:translate-x-3/2","**:data-radix-collection-item:not-last:before:w-px","**:data-radix-collection-item:not-last:border-r-transparent","**:data-radix-collection-item:rounded-none"]},{hasGap:!1,direction:"column",theme:"standard",class:["**:data-radix-collection-item:first:rounded-t-sm","**:data-radix-collection-item:last:rounded-b-sm","**:data-radix-collection-item:not-first:border-t-transparent","**:data-radix-collection-item:not-last:before:bottom-0","**:data-radix-collection-item:not-last:before:h-px","**:data-radix-collection-item:not-last:before:-left-px","**:data-radix-collection-item:not-last:before:translate-y-3/2","**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]","**:data-radix-collection-item:not-last:border-b-transparent"]},{hasGap:!1,theme:"modern",class:[]},{hasGap:!1,theme:"standard",class:["**:data-radix-collection-item:bg-transparent","**:data-radix-collection-item:rounded-none","bg-white"]}]}),h=a=>a==="horizontal"?"row":"column",u=t.forwardRef(({orientation:a="horizontal",gap:o,isFullWidth:d,children:c,theme:r="standard",wrap:s,...m},x)=>{const i=typeof o=="number",l=h(a);return t.createElement(n,{ref:x,direction:l,hasGap:i,isFullWidth:d,orientation:a,theme:r,...m},t.createElement(p,{direction:l,gap:i?o:void 0,wrap:s||"nowrap"},t.Children.toArray(c).map(e=>t.isValidElement(e)?t.cloneElement(e,{...e.props,theme:r}):e)))});export{n as StyledRoot,u as ToggleGroupRoot};
1
+ import f from"clsx";import*as t from"react";import{styled as h}from"../../styled.js";import{ToggleGroup as b}from"../../utilities/radix-overrides/toggle-group/index.js";const n=h(b.Root,{base:["w-fit"],variants:{isFullWidth:{true:["**:data-radix-collection-item:basis-0","**:data-radix-collection-item:grow","w-full"],false:["w-auto"]},hasGap:{true:["**:data-radix-collection-item:rounded-md"],false:["**:data-radix-collection-item:not-last:before:absolute","**:data-radix-collection-item:not-last:before:content-['']","**:data-radix-collection-item:relative","rounded-md"]},direction:{column:[],row:[]},theme:{standard:[],modern:["bg-grey-200"]}},compoundVariants:[{hasGap:!1,direction:"row",theme:"standard",class:["**:data-radix-collection-item:first:rounded-l-md","**:data-radix-collection-item:last:rounded-r-md","**:data-radix-collection-item:not-first:border-l-transparent","**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]","**:data-radix-collection-item:not-last:before:right-0","**:data-radix-collection-item:not-last:before:-top-px","**:data-radix-collection-item:not-last:before:translate-x-3/2","**:data-radix-collection-item:not-last:before:w-px","**:data-radix-collection-item:not-last:border-r-transparent","**:data-radix-collection-item:rounded-none"]},{hasGap:!1,direction:"column",theme:"standard",class:["**:data-radix-collection-item:first:rounded-t-sm","**:data-radix-collection-item:last:rounded-b-sm","**:data-radix-collection-item:not-first:border-t-transparent","**:data-radix-collection-item:not-last:before:bottom-0","**:data-radix-collection-item:not-last:before:h-px","**:data-radix-collection-item:not-last:before:-left-px","**:data-radix-collection-item:not-last:before:translate-y-3/2","**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]","**:data-radix-collection-item:not-last:border-b-transparent"]},{hasGap:!1,theme:"modern",class:[]},{hasGap:!1,theme:"standard",class:["**:data-radix-collection-item:bg-transparent","**:data-radix-collection-item:rounded-none","bg-white"]}]}),u={0:"gap-0.5",1:"gap-1",2:"gap-2",3:"gap-3"},g=e=>e==="horizontal"?"row":"column",w=t.forwardRef(({className:e,orientation:o="horizontal",gap:r,isFullWidth:d,children:c,theme:i="standard",wrap:s,...m},p)=>{const l=typeof r=="number",x=g(o);return t.createElement(n,{ref:p,direction:x,hasGap:l,isFullWidth:d,orientation:o,theme:i,...m},t.createElement("div",{className:f("flex",l&&u[r],o==="horizontal"?"flex-row":"flex-col",s?"flex-wrap":"flex-nowrap",e)},t.Children.toArray(c).map(a=>t.isValidElement(a)?t.cloneElement(a,{...a.props,theme:i}):a)))});export{n as StyledRoot,w as ToggleGroupRoot};
2
2
  //# sourceMappingURL=ToggleGroupRoot.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleGroupRoot.js","sources":["../../../src/components/toggle-group/ToggleGroupRoot.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Flex } from '~/components/flex/Flex'\nimport { styled } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n Pick<React.ComponentProps<typeof Flex>, 'gap' | 'wrap'> &\n React.ComponentProps<typeof StyledRoot> &\n RootType\n>(\n (\n {\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n },\n ref\n ) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <Flex\n direction={direction}\n gap={hasGap ? gap : undefined}\n wrap={wrap || 'nowrap'}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement[]\n }\n </Flex>\n </StyledRoot>\n )\n }\n)\n"],"names":["StyledRoot","styled","ToggleGroup","orientationToDirection","orientation","ToggleGroupRoot","React","gap","isFullWidth","children","theme","wrap","rest","ref","hasGap","direction","Flex","child"],"mappings":"4LAWa,MAAAA,EAAaC,EAAOC,EAAY,KAAM,CACjD,KAAM,CAAC,OAAO,EACd,SAAU,CACR,YAAa,CACX,KAAM,CACJ,wCACA,qCACA,QACF,EACA,MAAO,CAAC,QAAQ,CAClB,EACA,OAAQ,CACN,KAAM,CAAC,0CAA0C,EACjD,MAAO,CACL,yDACA,6DACA,yCACA,YACF,CACF,EACA,UAAW,CACT,OAAQ,CAAC,EACT,IAAK,CAAA,CACP,EACA,MAAO,CACL,SAAU,CAAC,EACX,OAAQ,CAAC,aAAa,CACxB,CACF,EACA,iBAAkB,CAChB,CACE,OAAQ,GACR,UAAW,MACX,MAAO,WACP,MAAO,CACL,mDACA,kDACA,+DACA,mEACA,wDACA,wDACA,gEACA,qDACA,8DACA,4CACF,CACF,EACA,CACE,OAAQ,GACR,UAAW,SACX,MAAO,WACP,MAAO,CACL,mDACA,kDACA,+DACA,yDACA,qDACA,yDACA,gEACA,mEACA,6DACF,CACF,EACA,CACE,OAAQ,GACR,MAAO,SACP,MAAO,EACT,EACA,CACE,OAAQ,GACR,MAAO,WACP,MAAO,CACL,+CACA,6CACA,UACF,CACF,CACF,CACF,CAAC,EAEKC,EAA0BC,GAC9BA,IAAgB,aAAe,MAAQ,SAE5BC,EAAkBC,EAAM,WAMnC,CACE,CACE,YAAAF,EAAc,aACd,IAAAG,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EAAQ,WACR,KAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,EAAS,OAAOP,GAAQ,SACxBQ,EAAYZ,EAAuBC,CAAW,EAEpD,OACEE,EAAA,cAACN,EACC,CAAA,IAAKa,EACL,UAAWE,EACX,OAAQD,EACR,YAAaN,EACb,YAAaJ,EACb,MAAOM,EACN,GAAGE,CAAAA,EAEJN,EAAA,cAACU,EAAA,CACC,UAAWD,EACX,IAAKD,EAASP,EAAM,OACpB,KAAMI,GAAQ,QAAA,EAGZL,EAAM,SAAS,QAAQG,CAAQ,EAAE,IAAKQ,GAChCX,EAAM,eAAeW,CAAK,EACrBX,EAAM,aAAaW,EAAO,CAAE,GAAGA,EAAM,MAAO,MAAAP,CAAM,CAAC,EAErDO,CACR,CAEL,CACF,CAEJ,CACF"}
1
+ {"version":3,"file":"ToggleGroupRoot.js","sources":["../../../src/components/toggle-group/ToggleGroupRoot.tsx"],"sourcesContent":["import clsx from 'clsx'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\nimport { ToggleGroup } from '~/utilities/radix-overrides/toggle-group'\n\ntype RootType = {\n orientation?: 'horizontal' | 'vertical'\n isFullWidth?: boolean\n gap?: 0 | 1 | 2 | 3\n wrap?: boolean\n}\n\nexport const StyledRoot = styled(ToggleGroup.Root, {\n base: ['w-fit'],\n variants: {\n isFullWidth: {\n true: [\n '**:data-radix-collection-item:basis-0',\n '**:data-radix-collection-item:grow',\n 'w-full'\n ],\n false: ['w-auto']\n },\n hasGap: {\n true: ['**:data-radix-collection-item:rounded-md'],\n false: [\n '**:data-radix-collection-item:not-last:before:absolute',\n \"**:data-radix-collection-item:not-last:before:content-['']\",\n '**:data-radix-collection-item:relative',\n 'rounded-md'\n ]\n },\n direction: {\n column: [],\n row: []\n },\n theme: {\n standard: [],\n modern: ['bg-grey-200']\n }\n },\n compoundVariants: [\n {\n hasGap: false,\n direction: 'row',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-l-md',\n '**:data-radix-collection-item:last:rounded-r-md',\n '**:data-radix-collection-item:not-first:border-l-transparent',\n '**:data-radix-collection-item:not-last:before:h-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:before:right-0',\n '**:data-radix-collection-item:not-last:before:-top-px',\n '**:data-radix-collection-item:not-last:before:translate-x-3/2',\n '**:data-radix-collection-item:not-last:before:w-px',\n '**:data-radix-collection-item:not-last:border-r-transparent',\n '**:data-radix-collection-item:rounded-none'\n ]\n },\n {\n hasGap: false,\n direction: 'column',\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:first:rounded-t-sm',\n '**:data-radix-collection-item:last:rounded-b-sm',\n '**:data-radix-collection-item:not-first:border-t-transparent',\n '**:data-radix-collection-item:not-last:before:bottom-0',\n '**:data-radix-collection-item:not-last:before:h-px',\n '**:data-radix-collection-item:not-last:before:-left-px',\n '**:data-radix-collection-item:not-last:before:translate-y-3/2',\n '**:data-radix-collection-item:not-last:before:w-[calc(100%+2px)]',\n '**:data-radix-collection-item:not-last:border-b-transparent'\n ]\n },\n {\n hasGap: false,\n theme: 'modern',\n class: []\n },\n {\n hasGap: false,\n theme: 'standard',\n class: [\n '**:data-radix-collection-item:bg-transparent',\n '**:data-radix-collection-item:rounded-none',\n 'bg-white'\n ]\n }\n ]\n})\n\nconst gapClassMap = {\n 0: 'gap-0.5',\n 1: 'gap-1',\n 2: 'gap-2',\n 3: 'gap-3'\n}\n\nconst orientationToDirection = (orientation) =>\n orientation === 'horizontal' ? 'row' : 'column'\n\nexport const ToggleGroupRoot = React.forwardRef<\n HTMLDivElement,\n React.ComponentProps<typeof StyledRoot> & RootType\n>(\n (\n {\n className,\n orientation = 'horizontal',\n gap,\n isFullWidth,\n children,\n theme = 'standard',\n wrap,\n ...rest\n },\n ref\n ) => {\n const hasGap = typeof gap === 'number'\n const direction = orientationToDirection(orientation)\n\n return (\n <StyledRoot\n ref={ref}\n direction={direction}\n hasGap={hasGap}\n isFullWidth={isFullWidth}\n orientation={orientation}\n theme={theme}\n {...rest}\n >\n <div\n className={clsx(\n 'flex',\n hasGap && gapClassMap[gap],\n orientation === 'horizontal' ? 'flex-row' : 'flex-col',\n wrap ? 'flex-wrap' : 'flex-nowrap',\n className\n )}\n >\n {\n React.Children.toArray(children).map((child) => {\n if (React.isValidElement(child)) {\n return React.cloneElement(child, { ...child.props, theme })\n }\n return child\n }) as React.ReactElement[]\n }\n </div>\n </StyledRoot>\n )\n }\n)\n"],"names":["StyledRoot","styled","ToggleGroup","gapClassMap","orientationToDirection","orientation","ToggleGroupRoot","React","className","gap","isFullWidth","children","theme","wrap","rest","ref","hasGap","direction","clsx","child"],"mappings":"yKAaO,MAAMA,EAAaC,EAAOC,EAAY,KAAM,CACjD,KAAM,CAAC,OAAO,EACd,SAAU,CACR,YAAa,CACX,KAAM,CACJ,wCACA,qCACA,QACF,EACA,MAAO,CAAC,QAAQ,CAClB,EACA,OAAQ,CACN,KAAM,CAAC,0CAA0C,EACjD,MAAO,CACL,yDACA,6DACA,yCACA,YACF,CACF,EACA,UAAW,CACT,OAAQ,CAAA,EACR,IAAK,EACP,EACA,MAAO,CACL,SAAU,CACV,EAAA,OAAQ,CAAC,aAAa,CACxB,CACF,EACA,iBAAkB,CAChB,CACE,OAAQ,GACR,UAAW,MACX,MAAO,WACP,MAAO,CACL,mDACA,kDACA,+DACA,mEACA,wDACA,wDACA,gEACA,qDACA,8DACA,4CACF,CACF,EACA,CACE,OAAQ,GACR,UAAW,SACX,MAAO,WACP,MAAO,CACL,mDACA,kDACA,+DACA,yDACA,qDACA,yDACA,gEACA,mEACA,6DACF,CACF,EACA,CACE,OAAQ,GACR,MAAO,SACP,MAAO,CAAA,CACT,EACA,CACE,OAAQ,GACR,MAAO,WACP,MAAO,CACL,+CACA,6CACA,UACF,CACF,CACF,CACF,CAAC,EAEKC,EAAc,CAClB,EAAG,UACH,EAAG,QACH,EAAG,QACH,EAAG,OACL,EAEMC,EAA0BC,GAC9BA,IAAgB,aAAe,MAAQ,SAE5BC,EAAkBC,EAAM,WAInC,CACE,CACE,UAAAC,EACA,YAAAH,EAAc,aACd,IAAAI,EACA,YAAAC,EACA,SAAAC,EACA,MAAAC,EAAQ,WACR,KAAAC,EACA,GAAGC,CACL,EACAC,IACG,CACH,MAAMC,EAAS,OAAOP,GAAQ,SACxBQ,EAAYb,EAAuBC,CAAW,EAEpD,OACEE,EAAA,cAACP,EAAA,CACC,IAAKe,EACL,UAAWE,EACX,OAAQD,EACR,YAAaN,EACb,YAAaL,EACb,MAAOO,EACN,GAAGE,CAAAA,EAEJP,EAAA,cAAC,MACC,CAAA,UAAWW,EACT,OACAF,GAAUb,EAAYM,CAAG,EACzBJ,IAAgB,aAAe,WAAa,WAC5CQ,EAAO,YAAc,cACrBL,CACF,CAGED,EAAAA,EAAM,SAAS,QAAQI,CAAQ,EAAE,IAAKQ,GAChCZ,EAAM,eAAeY,CAAK,EACrBZ,EAAM,aAAaY,EAAO,CAAE,GAAGA,EAAM,MAAO,MAAAP,CAAM,CAAC,EAErDO,CACR,CAEL,CACF,CAEJ,CACF"}
@@ -11,17 +11,7 @@ export declare const ToggleGroup: {
11
11
  } & {
12
12
  as?: import("react").ElementType;
13
13
  }, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
14
- Root: import("react").ForwardRefExoticComponent<Omit<Pick<Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
15
- ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
16
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
17
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
18
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
19
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
20
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
21
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
22
- } & {
23
- as?: import("react").ElementType;
24
- }, "gap" | "wrap"> & Omit<(Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & import("react").RefAttributes<HTMLDivElement> & {
14
+ Root: import("react").ForwardRefExoticComponent<Omit<Omit<(Omit<import("@radix-ui/react-toggle-group").ToggleGroupSingleProps & import("react").RefAttributes<HTMLDivElement> & {
25
15
  disableDeselect?: boolean;
26
16
  }, "ref"> | Omit<import("@radix-ui/react-toggle-group").ToggleGroupMultipleProps & import("react").RefAttributes<HTMLDivElement> & {
27
17
  disableDeselect?: boolean;
@@ -35,5 +25,7 @@ export declare const ToggleGroup: {
35
25
  } & {
36
26
  orientation?: "horizontal" | "vertical";
37
27
  isFullWidth?: boolean;
28
+ gap?: 0 | 1 | 2 | 3;
29
+ wrap?: boolean;
38
30
  }, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
39
31
  };
@@ -10,16 +10,8 @@ declare const StyledRoot: React.ForwardRefExoticComponent<Omit<Omit<React.Detail
10
10
  } & {
11
11
  as?: React.ElementType;
12
12
  }>;
13
- declare const Container: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
13
+ declare const Container: React.ForwardRefExoticComponent<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
14
14
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
15
- }, "gap" | "wrap" | "direction" | "align" | "justify"> & {
16
- direction?: ("row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "row" | "inherit" | "initial" | "row-reverse" | "column" | "column-reverse" | "revert" | "revert-layer" | "unset">>) | undefined;
17
- wrap?: ("wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "wrap" | "inherit" | "initial" | "revert" | "revert-layer" | "unset" | "nowrap" | "wrap-reverse">>) | undefined;
18
- justify?: ("end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "left" | "right" | "start" | "inherit" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "space-between" | "space-around" | "space-evenly" | "stretch">>) | undefined;
19
- align?: ("end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline" | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", "end" | "start" | "inherit" | "baseline" | "initial" | "center" | "revert" | "revert-layer" | "unset" | "normal" | "unsafe" | "safe" | "flex-start" | "flex-end" | "stretch" | "self-start" | "self-end" | "first baseline" | "last baseline">>) | undefined;
20
- gap?: (0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24 | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", 0 | 1 | "0" | "1" | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "24" | 24>>) | undefined;
21
- } & {
22
- as?: React.ElementType;
23
15
  }, never> & {
24
16
  as?: React.ElementType;
25
17
  }>;
@@ -1,2 +1,2 @@
1
- import*as e from"react";import{styled as r,Theme as m}from"../../styled.js";import{useWindowScrollPosition as p}from"../../utilities/hooks/useWindowScrollPosition.js";import{Divider as l}from"../divider/Divider.js";import{Flex as c}from"../flex/Flex.js";import{colorSchemes as b}from"./TopBar.colorscheme.config.js";import{TopBarActionIcon as f}from"./TopBarActionIcon.js";import{TopBarBrand as u,TopBarBrandLogo as h,TopBarBrandName as x}from"./TopBarBrand.js";const B=()=>e.createElement(l,{orientation:"vertical",className:"bg-divider h-6"}),g=r("header",{base:["bg-(--background)","sticky","flex","items-center","z-15","transition-shadow","duration-200","ease-out"],variants:{hasScrolled:{true:["shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]"]},size:{md:["h-16"],lg:["h-24"]},diffused:{true:["supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]","supports-color-mix:backdrop-blur-sm"]},appearance:{standard:["w-screen","max-w-full","top-0","border-b","border-b-(--border-bottom)"],rounded:["w-full","top-2","p-2","border","border-white","rounded-full"]}}},{enabledResponsiveVariants:!0}),w=r(c,{base:["items-center","h-10","mx-4","w-full","md:mx-8"]}),o=({size:a="md",diffused:t,theme:i,appearance:s="standard",...d})=>{const{y:n}=p();return e.createElement(m,{theme:i||b.light},e.createElement(g,{hasScrolled:!!n,diffused:t,appearance:s,size:a},e.createElement(w,{...d})))},T=Object.assign(o,{Brand:u,BrandLogo:h,BrandName:x,ActionIcon:f,Divider:B});o.displayName="TopBar";export{T as TopBar};
1
+ import*as e from"react";import{styled as r,Theme as m}from"../../styled.js";import{useWindowScrollPosition as p}from"../../utilities/hooks/useWindowScrollPosition.js";import{Divider as l}from"../divider/Divider.js";import{colorSchemes as c}from"./TopBar.colorscheme.config.js";import{TopBarActionIcon as b}from"./TopBarActionIcon.js";import{TopBarBrand as f,TopBarBrandLogo as u,TopBarBrandName as h}from"./TopBarBrand.js";const x=()=>e.createElement(l,{orientation:"vertical",className:"bg-divider h-6"}),B=r("header",{base:["bg-(--background)","sticky","flex","items-center","z-15","transition-shadow","duration-200","ease-out"],variants:{hasScrolled:{true:["shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]"]},size:{md:["h-16"],lg:["h-24"]},diffused:{true:["supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]","supports-color-mix:backdrop-blur-sm"]},appearance:{standard:["w-screen","max-w-full","top-0","border-b","border-b-(--border-bottom)"],rounded:["w-full","top-2","p-2","border","border-white","rounded-full"]}}},{enabledResponsiveVariants:!0}),g=r("div",{base:["flex","items-center","h-10","mx-4","w-full","md:mx-8"]}),o=({size:a="md",diffused:t,theme:i,appearance:d="standard",...s})=>{const{y:n}=p();return e.createElement(m,{theme:i||c.light},e.createElement(B,{hasScrolled:!!n,diffused:t,appearance:d,size:a},e.createElement(g,{...s})))},w=Object.assign(o,{Brand:f,BrandLogo:u,BrandName:h,ActionIcon:b,Divider:x});o.displayName="TopBar";export{w as TopBar};
2
2
  //# sourceMappingURL=TopBar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TopBar.js","sources":["../../../src/components/top-bar/TopBar.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled, Theme } from '~/styled'\nimport { useWindowScrollPosition } from '~/utilities/hooks/useWindowScrollPosition'\n\nimport { Divider } from '../divider/Divider'\nimport { Flex } from '../flex/Flex'\nimport { colorSchemes as topBarColorSchemes } from './TopBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" className=\"bg-divider h-6\" />\n)\n\nconst StyledRoot = styled(\n 'header',\n {\n base: [\n 'bg-(--background)',\n 'sticky',\n 'flex',\n 'items-center',\n 'z-15',\n 'transition-shadow',\n 'duration-200',\n 'ease-out'\n ],\n variants: {\n hasScrolled: {\n true: ['shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]']\n },\n size: {\n md: ['h-16'],\n lg: ['h-24']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n },\n appearance: {\n standard: [\n 'w-screen',\n 'max-w-full',\n 'top-0',\n 'border-b',\n 'border-b-(--border-bottom)'\n ],\n rounded: [\n 'w-full',\n 'top-2',\n 'p-2',\n 'border',\n 'border-white',\n 'rounded-full'\n ]\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nconst Container = styled(Flex, {\n base: ['items-center', 'h-10', 'mx-4', 'w-full', 'md:mx-8']\n})\n\ntype TopBarProps = React.ComponentProps<typeof StyledRoot> &\n React.ComponentProps<typeof Container> &\n React.ComponentProps<typeof Theme>\n\nconst TopBarComponent = ({\n size = 'md',\n diffused,\n theme,\n appearance = 'standard',\n ...rest\n}: React.PropsWithChildren<TopBarProps>) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <Theme theme={theme || topBarColorSchemes['light']}>\n <StyledRoot\n hasScrolled={!!scrollPositionY}\n diffused={diffused}\n appearance={appearance}\n size={size}\n >\n <Container {...rest} />\n </StyledRoot>\n </Theme>\n )\n}\n\nexport const TopBar = Object.assign(TopBarComponent, {\n Brand: TopBarBrand,\n BrandLogo: TopBarBrandLogo,\n BrandName: TopBarBrandName,\n ActionIcon: TopBarActionIcon,\n Divider: TopBarDivider\n})\n\nTopBarComponent.displayName = 'TopBar'\n"],"names":["TopBarDivider","React","Divider","StyledRoot","styled","Container","Flex","TopBarComponent","size","diffused","theme","appearance","rest","scrollPositionY","useWindowScrollPosition","Theme","topBarColorSchemes","TopBar","TopBarBrand","TopBarBrandLogo","TopBarBrandName","TopBarActionIcon"],"mappings":"8cAWA,MAAMA,EAAgB,IACpBC,EAAA,cAACC,EAAA,CAAQ,YAAY,WAAW,UAAU,gBAAA,CAAiB,EAGvDC,EAAaC,EACjB,SACA,CACE,KAAM,CACJ,oBACA,SACA,OACA,eACA,OACA,oBACA,eACA,UACF,EACA,SAAU,CACR,YAAa,CACX,KAAM,CAAC,8CAA8C,CACvD,EACA,KAAM,CACJ,GAAI,CAAC,MAAM,EACX,GAAI,CAAC,MAAM,CACb,EACA,SAAU,CACR,KAAM,CACJ,uEACA,qCACF,CACF,EACA,WAAY,CACV,SAAU,CACR,WACA,aACA,QACA,WACA,4BACF,EACA,QAAS,CACP,SACA,QACA,MACA,SACA,eACA,cACF,CACF,CACF,CACF,EACA,CACE,0BAA2B,EAC7B,CACF,EAEMC,EAAYD,EAAOE,EAAM,CAC7B,KAAM,CAAC,eAAgB,OAAQ,OAAQ,SAAU,SAAS,CAC5D,CAAC,EAMKC,EAAkB,CAAC,CACvB,KAAAC,EAAO,KACP,SAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,WACb,GAAGC,CACL,IAA4C,CAC1C,KAAM,CAAE,EAAGC,CAAgB,EAAIC,EAE/B,EAAA,OACEb,EAAA,cAACc,EAAA,CAAM,MAAOL,GAASM,EAAmB,KACxCf,EAAAA,EAAA,cAACE,EAAA,CACC,YAAa,CAAC,CAACU,EACf,SAAUJ,EACV,WAAYE,EACZ,KAAMH,CAAAA,EAENP,EAAA,cAACI,EAAA,CAAW,GAAGO,CAAM,CAAA,CACvB,CACF,CAEJ,EAEaK,EAAS,OAAO,OAAOV,EAAiB,CACnD,MAAOW,EACP,UAAWC,EACX,UAAWC,EACX,WAAYC,EACZ,QAASrB,CACX,CAAC,EAEDO,EAAgB,YAAc"}
1
+ {"version":3,"file":"TopBar.js","sources":["../../../src/components/top-bar/TopBar.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { styled, Theme } from '~/styled'\nimport { useWindowScrollPosition } from '~/utilities/hooks/useWindowScrollPosition'\n\nimport { Divider } from '../divider/Divider'\nimport { colorSchemes as topBarColorSchemes } from './TopBar.colorscheme.config'\nimport { TopBarActionIcon } from './TopBarActionIcon'\nimport { TopBarBrand, TopBarBrandLogo, TopBarBrandName } from './TopBarBrand'\n\nconst TopBarDivider = () => (\n <Divider orientation=\"vertical\" className=\"bg-divider h-6\" />\n)\n\nconst StyledRoot = styled(\n 'header',\n {\n base: [\n 'bg-(--background)',\n 'sticky',\n 'flex',\n 'items-center',\n 'z-15',\n 'transition-shadow',\n 'duration-200',\n 'ease-out'\n ],\n variants: {\n hasScrolled: {\n true: ['shadow-[0px_4px_4px_-2px_rgba(31,31,31,0.1)]']\n },\n size: {\n md: ['h-16'],\n lg: ['h-24']\n },\n diffused: {\n true: [\n 'supports-color-mix:bg-[color-mix(in_hsl,(--base-1)_70%,transparent)]',\n 'supports-color-mix:backdrop-blur-sm'\n ]\n },\n appearance: {\n standard: [\n 'w-screen',\n 'max-w-full',\n 'top-0',\n 'border-b',\n 'border-b-(--border-bottom)'\n ],\n rounded: [\n 'w-full',\n 'top-2',\n 'p-2',\n 'border',\n 'border-white',\n 'rounded-full'\n ]\n }\n }\n },\n {\n enabledResponsiveVariants: true\n }\n)\n\nconst Container = styled('div', {\n base: ['flex', 'items-center', 'h-10', 'mx-4', 'w-full', 'md:mx-8']\n})\n\ntype TopBarProps = React.ComponentProps<typeof StyledRoot> &\n React.ComponentProps<typeof Container> &\n React.ComponentProps<typeof Theme>\n\nconst TopBarComponent = ({\n size = 'md',\n diffused,\n theme,\n appearance = 'standard',\n ...rest\n}: React.PropsWithChildren<TopBarProps>) => {\n const { y: scrollPositionY } = useWindowScrollPosition()\n\n return (\n <Theme theme={theme || topBarColorSchemes['light']}>\n <StyledRoot\n hasScrolled={!!scrollPositionY}\n diffused={diffused}\n appearance={appearance}\n size={size}\n >\n <Container {...rest} />\n </StyledRoot>\n </Theme>\n )\n}\n\nexport const TopBar = Object.assign(TopBarComponent, {\n Brand: TopBarBrand,\n BrandLogo: TopBarBrandLogo,\n BrandName: TopBarBrandName,\n ActionIcon: TopBarActionIcon,\n Divider: TopBarDivider\n})\n\nTopBarComponent.displayName = 'TopBar'\n"],"names":["TopBarDivider","React","Divider","StyledRoot","styled","Container","TopBarComponent","size","diffused","theme","appearance","rest","scrollPositionY","useWindowScrollPosition","Theme","topBarColorSchemes","TopBar","TopBarBrand","TopBarBrandLogo","TopBarBrandName","TopBarActionIcon"],"mappings":"uaAUA,MAAMA,EAAgB,IACpBC,EAAA,cAACC,EAAA,CAAQ,YAAY,WAAW,UAAU,gBAAA,CAAiB,EAGvDC,EAAaC,EACjB,SACA,CACE,KAAM,CACJ,oBACA,SACA,OACA,eACA,OACA,oBACA,eACA,UACF,EACA,SAAU,CACR,YAAa,CACX,KAAM,CAAC,8CAA8C,CACvD,EACA,KAAM,CACJ,GAAI,CAAC,MAAM,EACX,GAAI,CAAC,MAAM,CACb,EACA,SAAU,CACR,KAAM,CACJ,uEACA,qCACF,CACF,EACA,WAAY,CACV,SAAU,CACR,WACA,aACA,QACA,WACA,4BACF,EACA,QAAS,CACP,SACA,QACA,MACA,SACA,eACA,cACF,CACF,CACF,CACF,EACA,CACE,0BAA2B,EAC7B,CACF,EAEMC,EAAYD,EAAO,MAAO,CAC9B,KAAM,CAAC,OAAQ,eAAgB,OAAQ,OAAQ,SAAU,SAAS,CACpE,CAAC,EAMKE,EAAkB,CAAC,CACvB,KAAAC,EAAO,KACP,SAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,WACb,GAAGC,CACL,IAA4C,CAC1C,KAAM,CAAE,EAAGC,CAAgB,EAAIC,EAAAA,EAE/B,OACEZ,EAAA,cAACa,EAAA,CAAM,MAAOL,GAASM,EAAmB,KACxCd,EAAAA,EAAA,cAACE,EAAA,CACC,YAAa,CAAC,CAACS,EACf,SAAUJ,EACV,WAAYE,EACZ,KAAMH,CAAAA,EAENN,EAAA,cAACI,EAAA,CAAW,GAAGM,CAAM,CAAA,CACvB,CACF,CAEJ,EAEaK,EAAS,OAAO,OAAOV,EAAiB,CACnD,MAAOW,EACP,UAAWC,EACX,UAAWC,EACX,WAAYC,EACZ,QAASpB,CACX,CAAC,EAEDM,EAAgB,YAAc"}