@atom-learning/components 6.16.0-beta.4 → 6.16.1-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist/components/action-icon/ActionIcon.d.ts +0 -1
  2. package/dist/components/action-icon/ActionIcon.js +2 -4
  3. package/dist/components/action-icon/ActionIcon.js.map +1 -1
  4. package/dist/components/banner/banner-regular/BannerRegular.d.ts +0 -1
  5. package/dist/components/banner/banner-regular/BannerRegularDismiss.d.ts +1 -2
  6. package/dist/components/banner/banner-slim/BannerSlim.d.ts +0 -1
  7. package/dist/components/banner/banner-slim/BannerSlimContainer.d.ts +1 -1
  8. package/dist/components/banner/banner-slim/BannerSlimContainer.js +3 -3
  9. package/dist/components/banner/banner-slim/BannerSlimContainer.js.map +1 -1
  10. package/dist/components/banner/banner-slim/BannerSlimDismiss.d.ts +1 -2
  11. package/dist/components/button/Button.d.ts +0 -1
  12. package/dist/components/button/Button.js +13 -17
  13. package/dist/components/button/Button.js.map +1 -1
  14. package/dist/components/data-table/DataTableTable.js +2 -2
  15. package/dist/components/data-table/DataTableTable.js.map +1 -1
  16. package/dist/components/data-table/drag-and-drop/DragAndDropTable.js +6 -3
  17. package/dist/components/data-table/drag-and-drop/DragAndDropTable.js.map +1 -1
  18. package/dist/components/dialog/DialogContent.js +1 -1
  19. package/dist/components/dialog/DialogContent.js.map +1 -1
  20. package/dist/components/dropdown-menu/DropdownMenu.d.ts +1 -2
  21. package/dist/components/dropdown-menu/DropdownMenuLinkItem.d.ts +1 -2
  22. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js +8 -13
  23. package/dist/components/dropdown-menu/DropdownMenuLinkItem.js.map +1 -1
  24. package/dist/components/index.d.ts +2 -1
  25. package/dist/components/link/Link.d.ts +0 -1
  26. package/dist/components/link/Link.js +9 -13
  27. package/dist/components/link/Link.js.map +1 -1
  28. package/dist/components/navigation/NavigationMenu.d.ts +0 -2
  29. package/dist/components/navigation/NavigationMenuDropdownItem.d.ts +0 -1
  30. package/dist/components/navigation/NavigationMenuLink.d.ts +0 -1
  31. package/dist/components/navigation/NavigationMenuLink.js +11 -22
  32. package/dist/components/navigation/NavigationMenuLink.js.map +1 -1
  33. package/dist/components/navigation-menu-vertical/NavigationMenuVertical.d.ts +1 -3
  34. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.d.ts +2 -4
  35. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js +3 -5
  36. package/dist/components/navigation-menu-vertical/NavigationMenuVerticalLink.js.map +1 -1
  37. package/dist/components/number-input/NumberInput.js +2 -2
  38. package/dist/components/number-input/NumberInput.js.map +1 -1
  39. package/dist/components/number-input/NumberInputStepper.d.ts +1 -2
  40. package/dist/components/pagination/PaginationNextButton.d.ts +1 -2
  41. package/dist/components/pagination/PaginationPreviousButton.d.ts +1 -2
  42. package/dist/components/password-field/PasswordField.js +1 -1
  43. package/dist/components/password-field/PasswordField.js.map +1 -1
  44. package/dist/components/segmented-control/SegmentedControlBadge.js +1 -1
  45. package/dist/components/segmented-control/SegmentedControlBadge.js.map +1 -1
  46. package/dist/components/select-menu/SelectMenu.d.ts +23 -0
  47. package/dist/components/select-menu/SelectMenu.js +26 -0
  48. package/dist/components/select-menu/SelectMenu.js.map +1 -0
  49. package/dist/components/select-menu/SelectMenuContent.d.ts +3 -0
  50. package/dist/components/select-menu/SelectMenuContent.js +66 -0
  51. package/dist/components/select-menu/SelectMenuContent.js.map +1 -0
  52. package/dist/components/select-menu/SelectMenuContext.d.ts +9 -0
  53. package/dist/components/select-menu/SelectMenuContext.js +11 -0
  54. package/dist/components/select-menu/SelectMenuContext.js.map +1 -0
  55. package/dist/components/select-menu/SelectMenuItem.d.ts +3 -0
  56. package/dist/components/select-menu/SelectMenuItem.js +59 -0
  57. package/dist/components/select-menu/SelectMenuItem.js.map +1 -0
  58. package/dist/components/select-menu/SelectMenuLabel.d.ts +8 -0
  59. package/dist/components/select-menu/SelectMenuLabel.js +16 -0
  60. package/dist/components/select-menu/SelectMenuLabel.js.map +1 -0
  61. package/dist/components/select-menu/SelectMenuSeparator.d.ts +4 -0
  62. package/dist/components/select-menu/SelectMenuSeparator.js +13 -0
  63. package/dist/components/select-menu/SelectMenuSeparator.js.map +1 -0
  64. package/dist/components/select-menu/SelectMenuTrigger.d.ts +7 -0
  65. package/dist/components/select-menu/SelectMenuTrigger.js +91 -0
  66. package/dist/components/select-menu/SelectMenuTrigger.js.map +1 -0
  67. package/dist/components/select-menu-field/SelectMenuField.d.ts +14 -0
  68. package/dist/components/select-menu-field/SelectMenuField.js +46 -0
  69. package/dist/components/select-menu-field/SelectMenuField.js.map +1 -0
  70. package/dist/components/skeleton-loader/SkeletonCard.js +1 -1
  71. package/dist/components/skeleton-loader/SkeletonCard.js.map +1 -1
  72. package/dist/components/sortable/Handle.d.ts +1 -2
  73. package/dist/components/tile-interactive/TileInteractive.d.ts +1 -3
  74. package/dist/components/tile-interactive/TileInteractive.js +2 -4
  75. package/dist/components/tile-interactive/TileInteractive.js.map +1 -1
  76. package/dist/components/tile-toggle-group/TileToggleGroupItem.d.ts +1 -3
  77. package/dist/components/tile-toggle-group/TileToggleGroupRoot.js +3 -3
  78. package/dist/components/tile-toggle-group/TileToggleGroupRoot.js.map +1 -1
  79. package/dist/components/toast/ToastProvider.js +2 -1
  80. package/dist/components/toast/ToastProvider.js.map +1 -1
  81. package/dist/components/top-bar/TopBar.d.ts +1 -2
  82. package/dist/components/tree/Tree.d.ts +1 -1
  83. package/dist/components/tree/TreeIcon.js +1 -1
  84. package/dist/components/tree/TreeIcon.js.map +1 -1
  85. package/dist/components/tree/TreeListItem.js +1 -1
  86. package/dist/components/tree/TreeListItem.js.map +1 -1
  87. package/dist/components/tree/TreeText.d.ts +1 -1
  88. package/dist/components/tree/TreeText.js +3 -3
  89. package/dist/components/tree/TreeText.js.map +1 -1
  90. package/dist/docgen.json +1 -1
  91. package/dist/index.cjs.js +345 -110
  92. package/dist/index.cjs.js.map +1 -1
  93. package/dist/index.js +3 -2
  94. package/package.json +3 -1
  95. package/src/index.css +2 -0
  96. package/dist/components/router-provider/RouterProvider.d.ts +0 -16
  97. package/dist/components/router-provider/RouterProvider.js +0 -19
  98. package/dist/components/router-provider/RouterProvider.js.map +0 -1
@@ -0,0 +1,91 @@
1
+ import { styled } from "../../styled.js";
2
+ import { Icon } from "../icon/Icon.js";
3
+ import { useSelectMenuContext } from "./SelectMenuContext.js";
4
+ import * as React$1 from "react";
5
+ import { ChevronDown } from "@atom-learning/icons";
6
+ import * as RadixSelect from "@radix-ui/react-select";
7
+ //#region src/components/select-menu/SelectMenuTrigger.tsx
8
+ var Trigger = styled(RadixSelect.Trigger, {
9
+ base: [
10
+ "appearance-none",
11
+ "rounded-md",
12
+ "block",
13
+ "w-full",
14
+ "font-body",
15
+ "font-normal",
16
+ "leading-[1.4]",
17
+ "text-grey-1000",
18
+ "text-left",
19
+ "relative",
20
+ "inline-flex",
21
+ "items-center",
22
+ "border-none",
23
+ "hover:cursor-pointer",
24
+ "disabled:opacity-30",
25
+ "disabled:cursor-not-allowed",
26
+ "focus:outline-2",
27
+ "focus:outline-blue-800",
28
+ "focus:outline-offset-1",
29
+ "focus:outline-solid",
30
+ "focus:z-1"
31
+ ],
32
+ variants: {
33
+ size: {
34
+ sm: [
35
+ "h-8",
36
+ "pl-2",
37
+ "pr-8",
38
+ "text-sm"
39
+ ],
40
+ md: [
41
+ "h-10",
42
+ "pl-3",
43
+ "pr-10",
44
+ "text-md"
45
+ ],
46
+ lg: [
47
+ "h-12",
48
+ "pl-3",
49
+ "pr-10",
50
+ "text-md"
51
+ ]
52
+ },
53
+ theme: {
54
+ white: ["bg-white"],
55
+ grey: ["bg-grey-100"]
56
+ },
57
+ state: { error: ["bg-danger-light", "focus:outline-danger"] }
58
+ }
59
+ });
60
+ var TriggerIcon = styled(Icon, {
61
+ base: [
62
+ "absolute",
63
+ "top-1/2",
64
+ "-translate-y-1/2",
65
+ "pointer-events-none",
66
+ "text-grey-700"
67
+ ],
68
+ variants: { size: {
69
+ sm: ["right-2", "size-4"],
70
+ md: ["right-3", "size-5"],
71
+ lg: ["right-3", "size-5"]
72
+ } }
73
+ });
74
+ var SelectMenuTrigger = React$1.forwardRef(({ placeholder, children, ...props }, ref) => {
75
+ const { size, theme, state } = useSelectMenuContext();
76
+ return /* @__PURE__ */ React$1.createElement(Trigger, {
77
+ ref,
78
+ size,
79
+ theme,
80
+ state,
81
+ ...props
82
+ }, /* @__PURE__ */ React$1.createElement(RadixSelect.Value, { placeholder }, children), /* @__PURE__ */ React$1.createElement(TriggerIcon, {
83
+ is: ChevronDown,
84
+ size
85
+ }));
86
+ });
87
+ SelectMenuTrigger.displayName = "SelectMenuTrigger";
88
+ //#endregion
89
+ export { SelectMenuTrigger };
90
+
91
+ //# sourceMappingURL=SelectMenuTrigger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectMenuTrigger.js","names":[],"sources":["../../../src/components/select-menu/SelectMenuTrigger.tsx"],"sourcesContent":["import { ChevronDown } from '@atom-learning/icons'\nimport * as RadixSelect from '@radix-ui/react-select'\nimport * as React from 'react'\n\nimport { styled } from '~/styled'\n\nimport { Icon } from '../icon/Icon'\nimport { useSelectMenuContext } from './SelectMenuContext'\n\nconst Trigger = styled(RadixSelect.Trigger, {\n base: [\n 'appearance-none',\n 'rounded-md',\n 'block',\n 'w-full',\n 'font-body',\n 'font-normal',\n 'leading-[1.4]',\n 'text-grey-1000',\n 'text-left',\n 'relative',\n 'inline-flex',\n 'items-center',\n 'border-none',\n 'hover:cursor-pointer',\n 'disabled:opacity-30',\n 'disabled:cursor-not-allowed',\n 'focus:outline-2',\n 'focus:outline-blue-800',\n 'focus:outline-offset-1',\n 'focus:outline-solid',\n 'focus:z-1'\n ],\n variants: {\n size: {\n sm: ['h-8', 'pl-2', 'pr-8', 'text-sm'],\n md: ['h-10', 'pl-3', 'pr-10', 'text-md'],\n lg: ['h-12', 'pl-3', 'pr-10', 'text-md']\n },\n theme: {\n white: ['bg-white'],\n grey: ['bg-grey-100']\n },\n state: {\n error: ['bg-danger-light', 'focus:outline-danger']\n }\n }\n})\n\nconst TriggerIcon = styled(Icon, {\n base: [\n 'absolute',\n 'top-1/2',\n '-translate-y-1/2',\n 'pointer-events-none',\n 'text-grey-700'\n ],\n variants: {\n size: {\n sm: ['right-2', 'size-4'],\n md: ['right-3', 'size-5'],\n lg: ['right-3', 'size-5']\n }\n }\n})\n\ntype SelectMenuTriggerProps = React.ComponentPropsWithRef<\n typeof RadixSelect.Trigger\n> & {\n placeholder?: string\n}\n\nexport const SelectMenuTrigger = React.forwardRef<\n HTMLButtonElement,\n SelectMenuTriggerProps\n>(({ placeholder, children, ...props }, ref) => {\n const { size, theme, state } = useSelectMenuContext()\n\n return (\n <Trigger ref={ref} size={size} theme={theme} state={state} {...props}>\n <RadixSelect.Value placeholder={placeholder}>\n {children}\n </RadixSelect.Value>\n <TriggerIcon is={ChevronDown} size={size} />\n </Trigger>\n )\n})\n\nSelectMenuTrigger.displayName = 'SelectMenuTrigger'\n"],"mappings":";;;;;;;AASA,IAAM,UAAU,OAAO,YAAY,SAAS;CAC1C,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU;EACR,MAAM;GACJ,IAAI;IAAC;IAAO;IAAQ;IAAQ;IAAU;GACtC,IAAI;IAAC;IAAQ;IAAQ;IAAS;IAAU;GACxC,IAAI;IAAC;IAAQ;IAAQ;IAAS;IAAU;GACzC;EACD,OAAO;GACL,OAAO,CAAC,WAAW;GACnB,MAAM,CAAC,cAAc;GACtB;EACD,OAAO,EACL,OAAO,CAAC,mBAAmB,uBAAuB,EACnD;EACF;CACF,CAAC;AAEF,IAAM,cAAc,OAAO,MAAM;CAC/B,MAAM;EACJ;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,MAAM;EACJ,IAAI,CAAC,WAAW,SAAS;EACzB,IAAI,CAAC,WAAW,SAAS;EACzB,IAAI,CAAC,WAAW,SAAS;EAC1B,EACF;CACF,CAAC;AAQF,IAAa,oBAAoB,QAAM,YAGpC,EAAE,aAAa,UAAU,GAAG,SAAS,QAAQ;CAC9C,MAAM,EAAE,MAAM,OAAO,UAAU,sBAAsB;AAErD,QACE,wBAAA,cAAC,SAAD;EAAc;EAAW;EAAa;EAAc;EAAO,GAAI;EAKrD,EAJR,wBAAA,cAAC,YAAY,OAAb,EAAgC,aAEZ,EADjB,SACiB,EACpB,wBAAA,cAAC,aAAD;EAAa,IAAI;EAAmB;EAAQ,CAAA,CACpC;EAEZ;AAEF,kBAAkB,cAAc"}
@@ -0,0 +1,14 @@
1
+ import * as React from 'react';
2
+ import { FieldElementWrapperProps } from '../../components/field-wrapper/FieldWrapper';
3
+ type SelectMenuFieldProps = React.PropsWithChildren<FieldElementWrapperProps & {
4
+ placeholder?: string;
5
+ size?: 'sm' | 'md' | 'lg';
6
+ theme?: 'white' | 'grey';
7
+ disabled?: boolean;
8
+ className?: string;
9
+ }>;
10
+ export declare const SelectMenuField: {
11
+ ({ className, hideLabel, children, name, label, validation, prompt, description, theme, size, placeholder, disabled, ...remainingProps }: SelectMenuFieldProps): React.JSX.Element;
12
+ displayName: string;
13
+ };
14
+ export {};
@@ -0,0 +1,46 @@
1
+ import { useFieldError } from "../form/useFieldError.js";
2
+ import { FieldWrapper } from "../field-wrapper/FieldWrapper.js";
3
+ import { useFormCustomContext } from "../form/useFormCustomContext.js";
4
+ import { SelectMenu } from "../select-menu/SelectMenu.js";
5
+ import * as React$1 from "react";
6
+ import { useController, useFormContext } from "react-hook-form";
7
+ //#region src/components/select-menu-field/SelectMenuField.tsx
8
+ var SelectMenuField = ({ className, hideLabel, children, name, label, validation, prompt, description, theme, size, placeholder, disabled, ...remainingProps }) => {
9
+ const { control } = useFormContext();
10
+ const context = useFormCustomContext();
11
+ const { error } = useFieldError(name);
12
+ const formTheme = context?.theme ?? theme;
13
+ const { field: { ref, onChange, value } } = useController({
14
+ name,
15
+ control,
16
+ rules: validation,
17
+ defaultValue: ""
18
+ });
19
+ return /* @__PURE__ */ React$1.createElement(FieldWrapper, {
20
+ className,
21
+ description,
22
+ error,
23
+ fieldId: name,
24
+ hideLabel,
25
+ label,
26
+ prompt,
27
+ required: Boolean(validation?.required)
28
+ }, /* @__PURE__ */ React$1.createElement(SelectMenu, {
29
+ value,
30
+ onValueChange: onChange,
31
+ size,
32
+ theme: formTheme,
33
+ disabled,
34
+ ...error && { state: "error" },
35
+ ...remainingProps
36
+ }, /* @__PURE__ */ React$1.createElement(SelectMenu.Trigger, {
37
+ ref,
38
+ placeholder,
39
+ "aria-label": label
40
+ }), /* @__PURE__ */ React$1.createElement(SelectMenu.Content, null, children)));
41
+ };
42
+ SelectMenuField.displayName = "SelectMenuField";
43
+ //#endregion
44
+ export { SelectMenuField };
45
+
46
+ //# sourceMappingURL=SelectMenuField.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectMenuField.js","names":[],"sources":["../../../src/components/select-menu-field/SelectMenuField.tsx"],"sourcesContent":["import * as React from 'react'\nimport { useController, useFormContext } from 'react-hook-form'\n\nimport {\n FieldElementWrapperProps,\n FieldWrapper\n} from '~/components/field-wrapper/FieldWrapper'\nimport { useFieldError } from '~/components/form/useFieldError'\nimport { useFormCustomContext } from '~/components/form/useFormCustomContext'\nimport { SelectMenu } from '~/components/select-menu/SelectMenu'\n\ntype SelectMenuFieldProps = React.PropsWithChildren<\n FieldElementWrapperProps & {\n placeholder?: string\n size?: 'sm' | 'md' | 'lg'\n theme?: 'white' | 'grey'\n disabled?: boolean\n className?: string\n }\n>\n\nexport const SelectMenuField = ({\n className,\n hideLabel,\n children,\n name,\n label,\n validation,\n prompt,\n description,\n theme,\n size,\n placeholder,\n disabled,\n ...remainingProps\n}: SelectMenuFieldProps) => {\n const { control } = useFormContext()\n const context = useFormCustomContext()\n const { error } = useFieldError(name)\n const formTheme = context?.theme ?? theme\n\n const {\n field: { ref, onChange, value }\n } = useController({\n name,\n control,\n rules: validation,\n defaultValue: ''\n })\n\n return (\n <FieldWrapper\n className={className}\n description={description}\n error={error}\n fieldId={name}\n hideLabel={hideLabel}\n label={label}\n prompt={prompt}\n required={Boolean(validation?.required)}\n >\n <SelectMenu\n value={value}\n onValueChange={onChange}\n size={size}\n theme={formTheme}\n disabled={disabled}\n {...(error && { state: 'error' })}\n {...remainingProps}\n >\n <SelectMenu.Trigger\n ref={ref}\n placeholder={placeholder}\n aria-label={label}\n />\n <SelectMenu.Content>{children}</SelectMenu.Content>\n </SelectMenu>\n </FieldWrapper>\n )\n}\n\nSelectMenuField.displayName = 'SelectMenuField'\n"],"mappings":";;;;;;;AAqBA,IAAa,mBAAmB,EAC9B,WACA,WACA,UACA,MACA,OACA,YACA,QACA,aACA,OACA,MACA,aACA,UACA,GAAG,qBACuB;CAC1B,MAAM,EAAE,YAAY,gBAAgB;CACpC,MAAM,UAAU,sBAAsB;CACtC,MAAM,EAAE,UAAU,cAAc,KAAK;CACrC,MAAM,YAAY,SAAS,SAAS;CAEpC,MAAM,EACJ,OAAO,EAAE,KAAK,UAAU,YACtB,cAAc;EAChB;EACA;EACA,OAAO;EACP,cAAc;EACf,CAAC;AAEF,QACE,wBAAA,cAAC,cAAD;EACa;EACE;EACN;EACP,SAAS;EACE;EACJ;EACC;EACR,UAAU,QAAQ,YAAY,SAAS;EAkB1B,EAhBb,wBAAA,cAAC,YAAD;EACS;EACP,eAAe;EACT;EACN,OAAO;EACG;EACV,GAAK,SAAS,EAAE,OAAO,SAAS;EAChC,GAAI;EAQO,EANX,wBAAA,cAAC,WAAW,SAAZ;EACO;EACQ;EACb,cAAY;EACZ,CAAA,EACF,wBAAA,cAAC,WAAW,SAAA,MAAS,SAA8B,CACxC,CACA;;AAInB,gBAAgB,cAAc"}
@@ -5,7 +5,7 @@ import { Tile } from "../tile/Tile.js";
5
5
  import { SkeletonDoughnutChart } from "./SkeletonDoughnutChart.js";
6
6
  import React from "react";
7
7
  //#region src/components/skeleton-loader/SkeletonCard.tsx
8
- var SkeletonCard = ({ numberOfRows = 3, withChart, className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("relative", "w-full", "flex-col", "items-center", "gap-6 p-6", className) }, /* @__PURE__ */ React.createElement("div", { className: "align-center flex w-full gap-6" }, withChart && /* @__PURE__ */ React.createElement(SkeletonDoughnutChart, null), /* @__PURE__ */ React.createElement("div", { className: "flex grow flex-col gap-6" }, Array.from({ length: numberOfRows }, (_, index) => index).map((rowNumber) => /* @__PURE__ */ React.createElement(SkeletonLoader, {
8
+ var SkeletonCard = ({ numberOfRows = 3, withChart, className }) => /* @__PURE__ */ React.createElement(Tile, { className: cn("relative", "w-full", "flex-col", "items-center", "gap-6", "p-6", className) }, /* @__PURE__ */ React.createElement("div", { className: "align-center flex w-full gap-6" }, withChart && /* @__PURE__ */ React.createElement(SkeletonDoughnutChart, null), /* @__PURE__ */ React.createElement("div", { className: "flex grow flex-col gap-6" }, Array.from({ length: numberOfRows }, (_, index) => index).map((rowNumber) => /* @__PURE__ */ React.createElement(SkeletonLoader, {
9
9
  key: rowNumber,
10
10
  className: "bg-grey-200 h-10 w-full min-w-25 rounded-md"
11
11
  })))), /* @__PURE__ */ React.createElement(SkeletonButton, null));
@@ -1 +1 @@
1
- {"version":3,"file":"SkeletonCard.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonCard.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\nimport { SkeletonButton } from './SkeletonButton'\nimport { SkeletonDoughnutChart } from './SkeletonDoughnutChart'\n\nexport const SkeletonCard = ({\n numberOfRows = 3,\n withChart,\n className\n}: {\n numberOfRows?: number\n withChart?: boolean\n className?: string\n}) => (\n <Tile\n className={cn(\n 'relative',\n 'w-full',\n 'flex-col',\n 'items-center',\n 'gap-6 p-6',\n className\n )}\n >\n <div className=\"align-center flex w-full gap-6\">\n {withChart && <SkeletonDoughnutChart />}\n <div className=\"flex grow flex-col gap-6\">\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowNumber) => (\n <SkeletonLoader\n key={rowNumber}\n className=\"bg-grey-200 h-10 w-full min-w-25 rounded-md\"\n />\n )\n )}\n </div>\n </div>\n <SkeletonButton />\n </Tile>\n)\n"],"mappings":";;;;;;;AAUA,IAAa,gBAAgB,EAC3B,eAAe,GACf,WACA,gBAMA,sBAAA,cAAC,MAAD,EACE,WAAW,GACT,YACA,UACA,YACA,gBACA,aACA,UACD,EAgBI,EAdL,sBAAA,cAAC,OAAD,EAAK,WAAU,kCAYT,EAXH,aAAa,sBAAA,cAAC,uBAAA,KAAwB,EACvC,sBAAA,cAAC,OAAD,EAAK,WAAU,4BAST,EARH,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG,GAAG,UAAU,MAAM,CAAC,KACxD,cACC,sBAAA,cAAC,gBAAD;CACE,KAAK;CACL,WAAU;CACV,CAAA,CAEL,CACG,CACF,EACN,sBAAA,cAAC,gBAAA,KAAiB,CACb"}
1
+ {"version":3,"file":"SkeletonCard.js","names":[],"sources":["../../../src/components/skeleton-loader/SkeletonCard.tsx"],"sourcesContent":["import React from 'react'\n\nimport { cn } from '~/styled'\n\nimport { Flex } from '../flex/Flex'\nimport { Tile } from '../tile/Tile'\nimport { SkeletonLoader } from './Skeleton'\nimport { SkeletonButton } from './SkeletonButton'\nimport { SkeletonDoughnutChart } from './SkeletonDoughnutChart'\n\nexport const SkeletonCard = ({\n numberOfRows = 3,\n withChart,\n className\n}: {\n numberOfRows?: number\n withChart?: boolean\n className?: string\n}) => (\n <Tile\n className={cn(\n 'relative',\n 'w-full',\n 'flex-col',\n 'items-center',\n 'gap-6',\n 'p-6',\n className\n )}\n >\n <div className=\"align-center flex w-full gap-6\">\n {withChart && <SkeletonDoughnutChart />}\n <div className=\"flex grow flex-col gap-6\">\n {Array.from({ length: numberOfRows }, (_, index) => index).map(\n (rowNumber) => (\n <SkeletonLoader\n key={rowNumber}\n className=\"bg-grey-200 h-10 w-full min-w-25 rounded-md\"\n />\n )\n )}\n </div>\n </div>\n <SkeletonButton />\n </Tile>\n)\n"],"mappings":";;;;;;;AAUA,IAAa,gBAAgB,EAC3B,eAAe,GACf,WACA,gBAMA,sBAAA,cAAC,MAAD,EACE,WAAW,GACT,YACA,UACA,YACA,gBACA,SACA,OACA,UACD,EAgBI,EAdL,sBAAA,cAAC,OAAD,EAAK,WAAU,kCAYT,EAXH,aAAa,sBAAA,cAAC,uBAAA,KAAwB,EACvC,sBAAA,cAAC,OAAD,EAAK,WAAU,4BAST,EARH,MAAM,KAAK,EAAE,QAAQ,cAAc,GAAG,GAAG,UAAU,MAAM,CAAC,KACxD,cACC,sBAAA,cAAC,gBAAD;CACE,KAAK;CACL,WAAU;CACV,CAAA,CAEL,CACG,CACF,EACN,sBAAA,cAAC,gBAAA,KAAiB,CACb"}
@@ -9,10 +9,9 @@ export declare const StyledHandle: React.ForwardRefExoticComponent<Omit<Omit<Omi
9
9
  isRounded?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
10
10
  } & {
11
11
  as?: React.ElementType;
12
- }, "children" | "label" | "hasTooltip" | "tooltipSide" | "reloadDocument" | keyof import("../..").NavigatorActions> & {
12
+ }, "children" | "label" | "hasTooltip" | "tooltipSide" | keyof import("../..").NavigatorActions> & {
13
13
  children: React.ReactNode;
14
14
  label: string;
15
- reloadDocument?: boolean;
16
15
  } & Omit<import("../..").TOptionalTooltipWrapperProps, "label"> & import("../..").NavigatorActions, "ref"> & React.RefAttributes<HTMLButtonElement>, "isDragging"> & {
17
16
  isDragging?: boolean | undefined;
18
17
  } & {
@@ -13,8 +13,6 @@ declare const StyledTileInteractive: React.ForwardRefExoticComponent<Omit<Omit<O
13
13
  }, "ref"> & React.RefAttributes<HTMLDivElement>, never> & {
14
14
  as?: React.ElementType;
15
15
  }>;
16
- type TTileInteractiveProps = React.ComponentProps<typeof StyledTileInteractive> & React.ButtonHTMLAttributes<HTMLButtonElement> & NavigatorActions & {
17
- reloadDocument?: boolean;
18
- };
16
+ type TTileInteractiveProps = React.ComponentProps<typeof StyledTileInteractive> & React.ButtonHTMLAttributes<HTMLButtonElement> & NavigatorActions;
19
17
  export declare const TileInteractive: React.ForwardRefExoticComponent<Omit<TTileInteractiveProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
18
  export {};
@@ -1,5 +1,4 @@
1
1
  import { styled } from "../../styled.js";
2
- import { useRouterLinkProps } from "../router-provider/RouterProvider.js";
3
2
  import { Tile } from "../tile/Tile.js";
4
3
  import React from "react";
5
4
  //#region src/components/tile-interactive/TileInteractive.tsx
@@ -29,10 +28,9 @@ var StyledTileInteractive = styled(Tile, { base: [
29
28
  "not-disabled:transition-transform",
30
29
  "not-disabled:translate-y-0"
31
30
  ] });
32
- var TileInteractive = React.forwardRef(({ onClick, href, type = "button", as, reloadDocument, ...rest }, ref) => {
33
- const routerLinkProps = useRouterLinkProps(href, { reloadDocument });
31
+ var TileInteractive = React.forwardRef(({ onClick, href, type = "button", as, ...rest }, ref) => {
34
32
  const elementSpecificProps = !!href ? {
35
- as: as || routerLinkProps.as || "a",
33
+ as: as || "a",
36
34
  href,
37
35
  onClick: void 0
38
36
  } : {
@@ -1 +1 @@
1
- {"version":3,"file":"TileInteractive.js","names":[],"sources":["../../../src/components/tile-interactive/TileInteractive.tsx"],"sourcesContent":["import React from 'react'\n\nimport { useRouterLinkProps } from '~/components/router-provider/RouterProvider'\nimport { Tile } from '~/components/tile/Tile'\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TTileInteractiveProps = React.ComponentProps<\n typeof StyledTileInteractive\n> &\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n NavigatorActions & { reloadDocument?: boolean }\n\nexport const TileInteractive = React.forwardRef<\n HTMLDivElement,\n TTileInteractiveProps\n>(({ onClick, href, type = 'button', as, reloadDocument, ...rest }, ref) => {\n const routerLinkProps = useRouterLinkProps(href, { reloadDocument })\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || routerLinkProps.as || ('a' as React.ElementType),\n href,\n onClick: undefined\n }\n : {\n as: as || ('button' as React.ElementType),\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n})\n\nTileInteractive.displayName = 'TileInteractive'\n"],"mappings":";;;;;AAOA,IAAM,wBAAwB,OAAO,MAAM,EACzC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAQF,IAAa,kBAAkB,MAAM,YAGlC,EAAE,SAAS,MAAM,OAAO,UAAU,IAAI,gBAAgB,GAAG,QAAQ,QAAQ;CAC1E,MAAM,kBAAkB,mBAAmB,MAAM,EAAE,gBAAgB,CAAC;CAEpE,MAAM,uBADS,CAAC,CAAC,OAEb;EACE,IAAI,MAAM,gBAAgB,MAAO;EACjC;EACA,SAAS,KAAA;EACV,GACD;EACE,IAAI,MAAO;EACX;EACA;EACD;AAEL,QAAO,sBAAA,cAAC,uBAAD;EAAuB,GAAI;EAAM,GAAI;EAA2B;EAAO,CAAA;EAC9E;AAEF,gBAAgB,cAAc"}
1
+ {"version":3,"file":"TileInteractive.js","names":[],"sources":["../../../src/components/tile-interactive/TileInteractive.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Tile } from '~/components/tile/Tile'\nimport { styled } from '~/styled'\nimport { NavigatorActions } from '~/types/navigatorActions.types'\n\nconst StyledTileInteractive = styled(Tile, {\n base: [\n 'disabled:cursor-not-allowed',\n 'disabled:opacity-30',\n 'not-disabled:active:bg-(--base-2)',\n 'not-disabled:after:absolute',\n 'not-disabled:after:duration-250',\n 'not-disabled:after:ease-out',\n 'not-disabled:after:inset-0',\n 'not-disabled:after:opacity-0',\n 'not-disabled:after:pointer-events-none',\n 'not-disabled:after:rounded-[inherit]',\n 'not-disabled:after:shadow-lg',\n 'not-disabled:after:transition-opacity',\n 'not-disabled:cursor-pointer',\n 'not-disabled:duration-250',\n 'not-disabled:ease-in',\n 'not-disabled:focus-visible:outline-none',\n 'not-disabled:focus-visible:relative',\n 'not-disabled:focus-visible:shadow-[var(--color-primary-800)_0px_0px_0px_4px]',\n 'not-disabled:focus-visible:shadow-[white_0px_0px_0px_2px]',\n 'not-disabled:focus-visible:z-1',\n 'not-disabled:hover:after:opacity-100',\n 'not-disabled:hover:-translate-y-0.5',\n 'not-disabled:transition-transform',\n 'not-disabled:translate-y-0'\n ]\n})\n\ntype TTileInteractiveProps = React.ComponentProps<\n typeof StyledTileInteractive\n> &\n React.ButtonHTMLAttributes<HTMLButtonElement> &\n NavigatorActions\n\nexport const TileInteractive = React.forwardRef<\n HTMLDivElement,\n TTileInteractiveProps\n>(({ onClick, href, type = 'button', as, ...rest }, ref) => {\n const isLink = !!href\n const elementSpecificProps = isLink\n ? {\n as: as || ('a' as React.ElementType),\n href,\n onClick: undefined\n }\n : {\n as: as || ('button' as React.ElementType),\n type,\n onClick\n }\n\n return <StyledTileInteractive {...rest} {...elementSpecificProps} ref={ref} />\n})\n\nTileInteractive.displayName = 'TileInteractive'\n"],"mappings":";;;;AAMA,IAAM,wBAAwB,OAAO,MAAM,EACzC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAQF,IAAa,kBAAkB,MAAM,YAGlC,EAAE,SAAS,MAAM,OAAO,UAAU,IAAI,GAAG,QAAQ,QAAQ;CAE1D,MAAM,uBADS,CAAC,CAAC,OAEb;EACE,IAAI,MAAO;EACX;EACA,SAAS,KAAA;EACV,GACD;EACE,IAAI,MAAO;EACX;EACA;EACD;AAEL,QAAO,sBAAA,cAAC,uBAAD;EAAuB,GAAI;EAAM,GAAI;EAA2B;EAAO,CAAA;EAC9E;AAEF,gBAAgB,cAAc"}
@@ -12,9 +12,7 @@ declare const StyledTileToggleGroupItem: React.ForwardRefExoticComponent<Omit<Om
12
12
  colorScheme?: import("../..").TcolorScheme;
13
13
  }, "ref"> & React.RefAttributes<HTMLDivElement>, never> & {
14
14
  as?: React.ElementType;
15
- } & React.ButtonHTMLAttributes<HTMLButtonElement> & import("../..").NavigatorActions & {
16
- reloadDocument?: boolean;
17
- }, "ref"> & React.RefAttributes<HTMLDivElement>, never> & {
15
+ } & React.ButtonHTMLAttributes<HTMLButtonElement> & import("../..").NavigatorActions, "ref"> & React.RefAttributes<HTMLDivElement>, never> & {
18
16
  as?: React.ElementType;
19
17
  }>;
20
18
  type TTileToggleGroupItem = React.ComponentProps<typeof ToggleGroup.Item> & React.ComponentProps<typeof StyledTileToggleGroupItem>;
@@ -2,10 +2,10 @@ import { cn } from "../../styled.js";
2
2
  import { ToggleGroup } from "../../utilities/radix-overrides/toggle-group/index.js";
3
3
  import * as React$1 from "react";
4
4
  //#region src/components/tile-toggle-group/TileToggleGroupRoot.tsx
5
- var TileToggleGroupRoot = React$1.forwardRef((props, ref) => /* @__PURE__ */ React$1.createElement(ToggleGroup.Root, {
5
+ var TileToggleGroupRoot = React$1.forwardRef(({ orientation, className, ...rest }, ref) => /* @__PURE__ */ React$1.createElement(ToggleGroup.Root, {
6
6
  ref,
7
- ...props,
8
- className: cn(props.className, "flex", "gap-2", props.orientation === "horizontal" && "flex-row", props.orientation === "vertical" && "flex-col", "flex-wrap")
7
+ ...rest,
8
+ className: cn("flex", "gap-2", orientation === "horizontal" && "flex-row", orientation === "vertical" && "flex-col", "flex-wrap", className)
9
9
  }));
10
10
  //#endregion
11
11
  export { TileToggleGroupRoot };
@@ -1 +1 @@
1
- {"version":3,"file":"TileToggleGroupRoot.js","names":[],"sources":["../../../src/components/tile-toggle-group/TileToggleGroupRoot.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\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={cn(\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"],"mappings":";;;;AAOA,IAAa,sBAAsB,QAAM,YAGtC,OAAO,QACR,wBAAA,cAAC,YAAY,MAAb;CACO;CACL,GAAI;CACJ,WAAW,GACT,MAAM,WACN,QACA,SACA,MAAM,gBAAgB,gBAAgB,YACtC,MAAM,gBAAgB,cAAc,YACpC,YACD;CACD,CAAA,CACF"}
1
+ {"version":3,"file":"TileToggleGroupRoot.js","names":[],"sources":["../../../src/components/tile-toggle-group/TileToggleGroupRoot.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\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>(({ orientation, className, ...rest }, ref) => (\n <ToggleGroup.Root\n ref={ref}\n {...rest}\n className={cn(\n 'flex',\n 'gap-2',\n orientation === 'horizontal' && 'flex-row',\n orientation === 'vertical' && 'flex-col',\n 'flex-wrap',\n className\n )}\n />\n))\n"],"mappings":";;;;AAOA,IAAa,sBAAsB,QAAM,YAGtC,EAAE,aAAa,WAAW,GAAG,QAAQ,QACtC,wBAAA,cAAC,YAAY,MAAb;CACO;CACL,GAAI;CACJ,WAAW,GACT,QACA,SACA,gBAAgB,gBAAgB,YAChC,gBAAgB,cAAc,YAC9B,aACA,UACD;CACD,CAAA,CACF"}
@@ -12,7 +12,8 @@ var ToastProviderBase = styled("div", { base: [
12
12
  "z-2147483647",
13
13
  "inset-2",
14
14
  "pointer-events-none",
15
- "sm:top-3"
15
+ "top-safe-or-2",
16
+ "sm:top-safe-or-3"
16
17
  ] });
17
18
  var ToastWrapper = styled("div", {
18
19
  base: [
@@ -1 +1 @@
1
- {"version":3,"file":"ToastProvider.js","names":[],"sources":["../../../src/components/toast/ToastProvider.tsx"],"sourcesContent":["import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '~/styled'\n\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './ToastContext'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './ToastContext'\n\nconst ToastProviderBase = styled('div', {\n base: ['fixed', 'z-2147483647', 'inset-2', 'pointer-events-none', 'sm:top-3']\n})\n\nconst ToastWrapper = styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast.id, {\n reverseOrder: true,\n margin: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.role}\n aria-live={toast.ariaLive}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n"],"mappings":";;;;;;;;;AAcA,IAAM,oBAAoB,OAAO,OAAO,EACtC,MAAM;CAAC;CAAS;CAAgB;CAAW;CAAuB;CAAW,EAC9E,CAAC;AAEF,IAAM,eAAe,OAAO,OAAO;CACjC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,SAAS;EACP,MAAM,CAAC,yCAAyC;EAChD,OAAO,CAAC,aAAa,0CAA0C;EAChE,EACF;CACF,CAAC;AAEF,IAAa,iBAAiB,EAC5B,UACA,gBACqD;CACrD,MAAM,EAAE,QAAQ,aAAa,YAAY;CACzC,MAAM,EAAE,YAAY,UAAU,iBAAiB,iBAAiB;AAEhE,QACE,wBAAA,cAAA,QAAA,UAAA,MACE,wBAAA,cAAC,mBAAD;EACE,cAAc;EACd,cAAc;EACH;EA2CO,EAzCjB,OAAO,KAAK,UAAU;EACrB,MAAM,EAAE,SAAS,aAAa;EAE9B,MAAM,SAAS,gBAAgB,MAAM,IAAI;GACvC,cAAc;GACd,QAAQ;GACT,CAAC;EAEF,MAAM,OAAO,OAA8B;AACzC,OAAI,MAAM,MAAM,WAAW,KAAA,EACzB,cAAa,MAAM,IAAI,GAAG,uBAAuB,CAAC,OAAO;;AAI7D,SACE,wBAAA,cAAC,cAAD;GACE,KAAK,MAAM;GACN;GACL,SAAS,MAAM;GACf,MAAM,MAAM;GACZ,aAAW,MAAM;GACjB,OAAO,EAAE,YAAY,GAAG,OAAO,KAAK;GACpC,WAAU;GAgBG,EAdb,wBAAA,cAAC,aAAa,UAAd,EAAuB,OAAO,OAaN,EAZrB,OAAO,aAAa,aACnB,SAAS,MAAM,GACb,QAAM,eAAe,SAAS,GAChC,WAEA,wBAAA,cAAC,OAAD,EAAO,WAAU,SAKT,EAJL,MAAM,SAAS,WAAW,wBAAA,cAAC,MAAM,MAAP,EAAY,IAAI,OAAS,CAAA,EACpD,wBAAA,cAAC,MAAA,MAAM,SAAgB,EACvB,wBAAA,cAAC,QAAA,KAAS,EACV,wBAAA,cAAC,MAAM,OAAA,KAAQ,CACT,CAEY,CACX;GAEjB,CACgB,EACnB,SACA;;AAIP,cAAc,cAAc"}
1
+ {"version":3,"file":"ToastProvider.js","names":[],"sources":["../../../src/components/toast/ToastProvider.tsx"],"sourcesContent":["import { Error } from '@atom-learning/icons'\nimport * as React from 'react'\nimport { useToaster } from 'react-hot-toast'\n\nimport { styled } from '~/styled'\n\nimport { Spacer } from '../spacer/Spacer'\nimport { Text } from '../text/Text'\nimport { Toast } from './Toast'\nimport { ToastContext } from './ToastContext'\n\nexport { default as toast } from 'react-hot-toast'\nexport { useToastContext } from './ToastContext'\n\nconst ToastProviderBase = styled('div', {\n base: [\n 'fixed',\n 'z-2147483647',\n 'inset-2',\n 'pointer-events-none',\n 'top-safe-or-2',\n 'sm:top-safe-or-3'\n ]\n})\n\nconst ToastWrapper = styled('div', {\n base: [\n 'absolute',\n 'w-full',\n 'flex',\n 'justify-center',\n 'items-center',\n 'rounded-sm',\n 'box-border',\n 'min-h-12',\n '[--slide-opacity-out:0]',\n '[--slide-direction-out-y:-100%]'\n ],\n variants: {\n visible: {\n true: ['motion-safe:animate-slide-direction-in'],\n false: ['opacity-0', 'motion-safe:animate-slide-direction-out']\n }\n }\n})\n\nexport const ToastProvider = ({\n children,\n className\n}: React.PropsWithChildren<{ className?: string }>) => {\n const { toasts, handlers } = useToaster()\n const { startPause, endPause, calculateOffset, updateHeight } = handlers\n\n return (\n <>\n <ToastProviderBase\n onMouseEnter={startPause}\n onMouseLeave={endPause}\n className={className}\n >\n {toasts.map((toast) => {\n const { message: children } = toast\n\n const offset = calculateOffset(toast.id, {\n reverseOrder: true,\n margin: 8\n })\n\n const ref = (el: HTMLDivElement | null) => {\n if (el && toast.height === undefined) {\n updateHeight(toast.id, el.getBoundingClientRect().height)\n }\n }\n\n return (\n <ToastWrapper\n key={toast.id}\n ref={ref}\n visible={toast.visible}\n role={toast.role}\n aria-live={toast.ariaLive}\n style={{ '--offset': `${offset}px` }}\n className=\"top-(--offset)\"\n >\n <ToastContext.Provider value={toast}>\n {typeof children === 'function' ? (\n children(toast)\n ) : React.isValidElement(children) ? (\n children\n ) : (\n <Toast className=\"w-100\">\n {toast.type === 'error' && <Toast.Icon is={Error} />}\n <Text>{children}</Text>\n <Spacer />\n <Toast.Close />\n </Toast>\n )}\n </ToastContext.Provider>\n </ToastWrapper>\n )\n })}\n </ToastProviderBase>\n {children}\n </>\n )\n}\n\nToastProvider.displayName = 'ToastProvider'\n"],"mappings":";;;;;;;;;AAcA,IAAM,oBAAoB,OAAO,OAAO,EACtC,MAAM;CACJ;CACA;CACA;CACA;CACA;CACA;CACD,EACF,CAAC;AAEF,IAAM,eAAe,OAAO,OAAO;CACjC,MAAM;EACJ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD;CACD,UAAU,EACR,SAAS;EACP,MAAM,CAAC,yCAAyC;EAChD,OAAO,CAAC,aAAa,0CAA0C;EAChE,EACF;CACF,CAAC;AAEF,IAAa,iBAAiB,EAC5B,UACA,gBACqD;CACrD,MAAM,EAAE,QAAQ,aAAa,YAAY;CACzC,MAAM,EAAE,YAAY,UAAU,iBAAiB,iBAAiB;AAEhE,QACE,wBAAA,cAAA,QAAA,UAAA,MACE,wBAAA,cAAC,mBAAD;EACE,cAAc;EACd,cAAc;EACH;EA2CO,EAzCjB,OAAO,KAAK,UAAU;EACrB,MAAM,EAAE,SAAS,aAAa;EAE9B,MAAM,SAAS,gBAAgB,MAAM,IAAI;GACvC,cAAc;GACd,QAAQ;GACT,CAAC;EAEF,MAAM,OAAO,OAA8B;AACzC,OAAI,MAAM,MAAM,WAAW,KAAA,EACzB,cAAa,MAAM,IAAI,GAAG,uBAAuB,CAAC,OAAO;;AAI7D,SACE,wBAAA,cAAC,cAAD;GACE,KAAK,MAAM;GACN;GACL,SAAS,MAAM;GACf,MAAM,MAAM;GACZ,aAAW,MAAM;GACjB,OAAO,EAAE,YAAY,GAAG,OAAO,KAAK;GACpC,WAAU;GAgBG,EAdb,wBAAA,cAAC,aAAa,UAAd,EAAuB,OAAO,OAaN,EAZrB,OAAO,aAAa,aACnB,SAAS,MAAM,GACb,QAAM,eAAe,SAAS,GAChC,WAEA,wBAAA,cAAC,OAAD,EAAO,WAAU,SAKT,EAJL,MAAM,SAAS,WAAW,wBAAA,cAAC,MAAM,MAAP,EAAY,IAAI,OAAS,CAAA,EACpD,wBAAA,cAAC,MAAA,MAAM,SAAgB,EACvB,wBAAA,cAAC,QAAA,KAAS,EACV,wBAAA,cAAC,MAAM,OAAA,KAAQ,CACT,CAEY,CACX;GAEjB,CACgB,EACnB,SACA;;AAIP,cAAc,cAAc"}
@@ -51,10 +51,9 @@ export declare const TopBar: {
51
51
  isRounded?: (boolean | Partial<Record<"@initial" | "@sm" | "@md" | "@lg" | "@xl", boolean>>) | undefined;
52
52
  } & {
53
53
  as?: React.ElementType;
54
- }, "children" | "label" | "hasTooltip" | "tooltipSide" | "reloadDocument" | keyof import("../..").NavigatorActions> & {
54
+ }, "children" | "label" | "hasTooltip" | "tooltipSide" | keyof import("../..").NavigatorActions> & {
55
55
  children: React.ReactNode;
56
56
  label: string;
57
- reloadDocument?: boolean;
58
57
  } & Omit<import("../..").TOptionalTooltipWrapperProps, "label"> & import("../..").NavigatorActions, "ref"> & React.RefAttributes<HTMLButtonElement>, "size" | "children"> & {
59
58
  icon: React.FC<React.SVGProps<SVGSVGElement>>;
60
59
  label: string;
@@ -30,7 +30,7 @@ export declare const Tree: React.ForwardRefExoticComponent<Omit<Omit<Omit<React.
30
30
  as?: React.ElementType;
31
31
  }, "ref"> & React.RefAttributes<HTMLDivElement>) => JSX.Element;
32
32
  Icon: ({ className, ...props }: React.ComponentProps<typeof import("..").Icon>) => JSX.Element;
33
- Text: (props: Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
33
+ Text: ({ className, ...rest }: Omit<Omit<Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, "ref"> & {
34
34
  ref?: ((instance: HTMLParagraphElement | null) => void) | React.RefObject<HTMLParagraphElement> | null | undefined;
35
35
  }, "size" | "noCapsize" | "weight" | "family"> & {
36
36
  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;
@@ -5,7 +5,7 @@ import * as React$1 from "react";
5
5
  var TreeIcon = ({ className, ...props }) => /* @__PURE__ */ React$1.createElement(Icon, {
6
6
  size: "md",
7
7
  ...props,
8
- className: cn("my-1 shrink-0 self-start", className)
8
+ className: cn("my-1", "shrink-0", "self-start", className)
9
9
  });
10
10
  //#endregion
11
11
  export { TreeIcon };
@@ -1 +1 @@
1
- {"version":3,"file":"TreeIcon.js","names":[],"sources":["../../../src/components/tree/TreeIcon.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { cn } from '~/styled'\n\nexport const TreeIcon = ({\n className,\n ...props\n}: React.ComponentProps<typeof Icon>): JSX.Element => (\n <Icon\n size=\"md\"\n {...props}\n className={cn('my-1 shrink-0 self-start', className)}\n />\n)\n"],"mappings":";;;;AAKA,IAAa,YAAY,EACvB,WACA,GAAG,YAEH,wBAAA,cAAC,MAAD;CACE,MAAK;CACL,GAAI;CACJ,WAAW,GAAG,4BAA4B,UAAU;CACpD,CAAA"}
1
+ {"version":3,"file":"TreeIcon.js","names":[],"sources":["../../../src/components/tree/TreeIcon.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { Icon } from '~/components/icon/Icon'\nimport { cn } from '~/styled'\n\nexport const TreeIcon = ({\n className,\n ...props\n}: React.ComponentProps<typeof Icon>): JSX.Element => (\n <Icon\n size=\"md\"\n {...props}\n className={cn('my-1', 'shrink-0', 'self-start', className)}\n />\n)\n"],"mappings":";;;;AAKA,IAAa,YAAY,EACvB,WACA,GAAG,YAEH,wBAAA,cAAC,MAAD;CACE,MAAK;CACL,GAAI;CACJ,WAAW,GAAG,QAAQ,YAAY,cAAc,UAAU;CAC1D,CAAA"}
@@ -5,7 +5,7 @@ var TreeListItem = React$1.forwardRef(({ className, ...props }, ref) => /* @__PU
5
5
  ...props,
6
6
  ref,
7
7
  role: "treeitem",
8
- className: cn("flex items-center gap-2 not-first:mt-0.5", className)
8
+ className: cn("flex", "items-center", "gap-2", "not-first:mt-0.5", className)
9
9
  }));
10
10
  //#endregion
11
11
  export { TreeListItem };
@@ -1 +1 @@
1
- {"version":3,"file":"TreeListItem.js","names":[],"sources":["../../../src/components/tree/TreeListItem.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = React.forwardRef<HTMLLIElement, TreeListItemProps>(\n ({ className, ...props }, ref) => (\n <li\n {...props}\n ref={ref}\n role=\"treeitem\"\n className={cn('flex items-center gap-2 not-first:mt-0.5', className)}\n />\n )\n)\n"],"mappings":";;;AAMA,IAAa,eAAe,QAAM,YAC/B,EAAE,WAAW,GAAG,SAAS,QACxB,wBAAA,cAAC,MAAD;CACE,GAAI;CACC;CACL,MAAK;CACL,WAAW,GAAG,4CAA4C,UAAU;CACpE,CAAA,CAEL"}
1
+ {"version":3,"file":"TreeListItem.js","names":[],"sources":["../../../src/components/tree/TreeListItem.tsx"],"sourcesContent":["import * as React from 'react'\n\nimport { cn } from '~/styled'\n\ntype TreeListItemProps = React.ComponentProps<'li'>\n\nexport const TreeListItem = React.forwardRef<HTMLLIElement, TreeListItemProps>(\n ({ className, ...props }, ref) => (\n <li\n {...props}\n ref={ref}\n role=\"treeitem\"\n className={cn(\n 'flex',\n 'items-center',\n 'gap-2',\n 'not-first:mt-0.5',\n className\n )}\n />\n )\n)\n"],"mappings":";;;AAMA,IAAa,eAAe,QAAM,YAC/B,EAAE,WAAW,GAAG,SAAS,QACxB,wBAAA,cAAC,MAAD;CACE,GAAI;CACC;CACL,MAAK;CACL,WAAW,GACT,QACA,gBACA,SACA,oBACA,UACD;CACD,CAAA,CAEL"}
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
2
  import { Text } from '../../components/text/Text';
3
3
  type TStyledTreeTextProps = React.ComponentProps<typeof Text>;
4
- export declare const TreeText: (props: TStyledTreeTextProps) => JSX.Element;
4
+ export declare const TreeText: ({ className, ...rest }: TStyledTreeTextProps) => JSX.Element;
5
5
  export {};
@@ -2,10 +2,10 @@ import { cn } from "../../styled.js";
2
2
  import { Text } from "../text/Text.js";
3
3
  import React from "react";
4
4
  //#region src/components/tree/TreeText.tsx
5
- var TreeText = (props) => /* @__PURE__ */ React.createElement(Text, {
5
+ var TreeText = ({ className, ...rest }) => /* @__PURE__ */ React.createElement(Text, {
6
6
  as: "span",
7
- ...props,
8
- className: cn("py-0.5", "whitespace-nowrap", "overflow-x-hidden", "text-ellipsis", props.className),
7
+ ...rest,
8
+ className: cn("py-0.5", "whitespace-nowrap", "overflow-x-hidden", "text-ellipsis", className),
9
9
  size: "md"
10
10
  });
11
11
  //#endregion
@@ -1 +1 @@
1
- {"version":3,"file":"TreeText.js","names":[],"sources":["../../../src/components/tree/TreeText.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '~/components/text/Text'\nimport { cn } from '~/styled'\n\ntype TStyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = (props: TStyledTreeTextProps): JSX.Element => (\n <Text\n as=\"span\"\n {...props}\n className={cn(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n props.className\n )}\n size=\"md\"\n />\n)\n"],"mappings":";;;;AAOA,IAAa,YAAY,UACvB,sBAAA,cAAC,MAAD;CACE,IAAG;CACH,GAAI;CACJ,WAAW,GACT,UACA,qBACA,qBACA,iBACA,MAAM,UACP;CACD,MAAK;CACL,CAAA"}
1
+ {"version":3,"file":"TreeText.js","names":[],"sources":["../../../src/components/tree/TreeText.tsx"],"sourcesContent":["import React from 'react'\n\nimport { Text } from '~/components/text/Text'\nimport { cn } from '~/styled'\n\ntype TStyledTreeTextProps = React.ComponentProps<typeof Text>\n\nexport const TreeText = ({\n className,\n ...rest\n}: TStyledTreeTextProps): JSX.Element => (\n <Text\n as=\"span\"\n {...rest}\n className={cn(\n 'py-0.5',\n 'whitespace-nowrap',\n 'overflow-x-hidden',\n 'text-ellipsis',\n className\n )}\n size=\"md\"\n />\n)\n"],"mappings":";;;;AAOA,IAAa,YAAY,EACvB,WACA,GAAG,WAEH,sBAAA,cAAC,MAAD;CACE,IAAG;CACH,GAAI;CACJ,WAAW,GACT,UACA,qBACA,qBACA,iBACA,UACD;CACD,MAAK;CACL,CAAA"}