@heliosgraphics/ui 2.0.0-alpha.76 → 2.0.0-alpha.78

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 (147) hide show
  1. package/components/Alert/Alert.meta.ts +1 -1
  2. package/components/Alert/Alert.tsx +6 -2
  3. package/components/Alert/Alert.types.ts +3 -1
  4. package/components/Breadcrumb/Breadcrumb.meta.ts +1 -1
  5. package/components/Breadcrumb/Breadcrumb.tsx +3 -1
  6. package/components/Browser/Browser.meta.ts +1 -1
  7. package/components/Button/Button.meta.ts +1 -1
  8. package/components/Button/Button.types.ts +4 -1
  9. package/components/ButtonGroup/ButtonGroup.meta.ts +1 -1
  10. package/components/Checkbox/Checkbox.meta.ts +1 -1
  11. package/components/Checkbox/Checkbox.tsx +3 -1
  12. package/components/Checkbox/Checkbox.types.ts +1 -1
  13. package/components/Clock/Clock.meta.ts +1 -1
  14. package/components/Clock/Clock.tsx +1 -1
  15. package/components/Column/Column.meta.ts +1 -1
  16. package/components/Column/Column.types.ts +1 -1
  17. package/components/Confirm/Confirm.meta.ts +1 -1
  18. package/components/Confirm/Confirm.tsx +5 -1
  19. package/components/Confirm/Confirm.types.ts +3 -1
  20. package/components/DatePicker/DatePicker.meta.ts +1 -1
  21. package/components/Debug/Debug.meta.ts +1 -1
  22. package/components/Debug/Debug.tsx +5 -1
  23. package/components/Debug/Debug.types.ts +1 -1
  24. package/components/Details/Details.meta.ts +1 -1
  25. package/components/Details/Details.tsx +2 -1
  26. package/components/Dialog/Dialog.meta.ts +1 -1
  27. package/components/Dialog/Dialog.tsx +4 -1
  28. package/components/Donut/Donut.meta.ts +1 -1
  29. package/components/Donut/Donut.tsx +1 -1
  30. package/components/Donut/Donut.types.ts +1 -1
  31. package/components/Dot/Dot.meta.ts +1 -1
  32. package/components/Dot/Dot.types.ts +2 -1
  33. package/components/Dropdown/Dropdown.meta.ts +1 -1
  34. package/components/Dropdown/Dropdown.types.ts +2 -1
  35. package/components/Fieldset/Fieldset.meta.ts +1 -1
  36. package/components/Flex/Flex.meta.ts +1 -1
  37. package/components/Flex/Flex.types.ts +2 -1
  38. package/components/Flex/Flex.utils.ts +1 -1
  39. package/components/Grid/Grid.meta.ts +1 -1
  40. package/components/Heading/Heading.meta.ts +1 -1
  41. package/components/Heading/Heading.types.ts +1 -1
  42. package/components/Heading/components/H0/H0.meta.ts +1 -1
  43. package/components/Heading/components/H1/H1.meta.ts +1 -1
  44. package/components/Heading/components/H2/H2.meta.ts +1 -1
  45. package/components/Heading/components/H3/H3.meta.ts +1 -1
  46. package/components/Heading/components/H4/H4.meta.ts +1 -1
  47. package/components/Heading/components/H5/H5.meta.ts +1 -1
  48. package/components/Heading/components/H6/H6.meta.ts +1 -1
  49. package/components/Icon/Icon.meta.ts +1 -1
  50. package/components/Icon/Icon.tsx +3 -3
  51. package/components/Icon/Icon.types.ts +2 -1
  52. package/components/Input/Input.meta.ts +1 -1
  53. package/components/Input/Input.tsx +6 -2
  54. package/components/Input/Input.types.ts +1 -1
  55. package/components/Layout/Layout.meta.ts +1 -1
  56. package/components/Layout/components/LayoutAside/LayoutAside.meta.ts +1 -1
  57. package/components/Layout/components/LayoutAside/components/LayoutAsideContent/LayoutAsideContent.meta.ts +1 -1
  58. package/components/Layout/components/LayoutAside/components/LayoutAsideToggle/LayoutAsideToggle.meta.ts +1 -1
  59. package/components/Layout/components/LayoutMain/LayoutMain.meta.ts +1 -1
  60. package/components/Layout/components/LayoutMain/components/LayoutMainContent/LayoutMainContent.meta.ts +1 -1
  61. package/components/Layout/components/LayoutNavigation/LayoutNavigation.meta.ts +1 -1
  62. package/components/Layout/components/LayoutNavigation/LayoutNavigation.types.ts +1 -1
  63. package/components/Layout/components/LayoutSubNavigation/LayoutSubNavigation.meta.ts +1 -1
  64. package/components/Layout/components/LayoutSubNavigation/LayoutSubNavigation.types.ts +1 -1
  65. package/components/Loading/Loading.meta.ts +1 -1
  66. package/components/Loading/Loading.tsx +3 -3
  67. package/components/Loading/Loading.types.ts +1 -1
  68. package/components/Markdown/Markdown.meta.ts +1 -1
  69. package/components/Masonry/Masonry.meta.ts +1 -1
  70. package/components/Menu/Menu.meta.ts +1 -1
  71. package/components/Menu/components/MenuCategory/MenuCategory.meta.ts +1 -1
  72. package/components/Menu/components/MenuCategory/MenuCategory.tsx +21 -9
  73. package/components/Menu/components/MenuFilter/MenuFilter.meta.ts +1 -1
  74. package/components/Menu/components/MenuFilter/MenuFilter.tsx +1 -1
  75. package/components/Menu/components/MenuItem/MenuItem.meta.ts +1 -1
  76. package/components/Menu/components/MenuItem/MenuItem.tsx +5 -1
  77. package/components/Menu/components/MenuItem/MenuItem.types.ts +2 -1
  78. package/components/Overlay/Overlay.meta.ts +1 -1
  79. package/components/Pie/Pie.meta.ts +1 -1
  80. package/components/Pie/Pie.types.ts +1 -1
  81. package/components/Pill/Pill.meta.ts +1 -1
  82. package/components/Pill/Pill.tsx +41 -37
  83. package/components/Pill/Pill.types.ts +3 -1
  84. package/components/Placeholder/Placeholder.meta.ts +1 -1
  85. package/components/Placeholder/Placeholder.tsx +2 -1
  86. package/components/Progress/Progress.meta.ts +1 -1
  87. package/components/Progress/Progress.types.ts +1 -1
  88. package/components/Radio/Radio.meta.ts +1 -1
  89. package/components/Radio/Radio.tsx +2 -1
  90. package/components/Segments/Segments.meta.ts +1 -1
  91. package/components/Segments/Segments.tsx +1 -1
  92. package/components/Segments/components/SegmentButton/SegmentButton.meta.ts +1 -1
  93. package/components/Segments/components/SegmentButton/SegmentButton.tsx +2 -2
  94. package/components/Segments/components/SegmentButton/SegmentButton.types.ts +1 -1
  95. package/components/Select/Select.meta.ts +1 -1
  96. package/components/Select/Select.tsx +2 -1
  97. package/components/Separator/Separator.meta.ts +1 -1
  98. package/components/Separator/Separator.tsx +20 -25
  99. package/components/Separator/Separator.types.ts +1 -1
  100. package/components/Separator/components/HRMarkup/HRMarkup.meta.ts +1 -1
  101. package/components/Separator/components/HorizontalSeparator/HorizontalSeparator.meta.ts +1 -1
  102. package/components/Separator/components/VerticalSeparator/VerticalSeparator.meta.ts +1 -1
  103. package/components/Setup/Setup.meta.ts +1 -1
  104. package/components/Shimmer/Shimmer.meta.ts +1 -1
  105. package/components/Slider/Slider.meta.ts +1 -1
  106. package/components/Spacer/Spacer.meta.ts +1 -1
  107. package/components/Spacer/Spacer.tsx +3 -3
  108. package/components/Table/Table.meta.ts +1 -1
  109. package/components/Tabs/Tabs.meta.ts +1 -1
  110. package/components/Tabs/Tabs.tsx +1 -1
  111. package/components/Text/Text.meta.ts +1 -1
  112. package/components/Text/Text.tsx +3 -3
  113. package/components/Text/Text.types.ts +1 -1
  114. package/components/Text/components/Div/Div.meta.ts +1 -1
  115. package/components/Text/components/Micro/Micro.meta.ts +1 -1
  116. package/components/Text/components/P/P.meta.ts +1 -1
  117. package/components/Text/components/Small/Small.meta.ts +1 -1
  118. package/components/Text/components/Tiny/Tiny.meta.ts +1 -1
  119. package/components/Textarea/Textarea.meta.ts +1 -1
  120. package/components/Textarea/Textarea.tsx +1 -1
  121. package/components/Tile/Tile.meta.ts +1 -1
  122. package/components/Tile/Tile.tsx +4 -2
  123. package/components/Tile/Tile.types.ts +2 -1
  124. package/components/Timestamp/Timestamp.meta.ts +1 -1
  125. package/components/Toggle/Toggle.meta.ts +1 -1
  126. package/components/Toggle/Toggle.tsx +2 -1
  127. package/components/Toggle/Toggle.types.ts +1 -1
  128. package/components/Tooltip/Tooltip.meta.ts +1 -1
  129. package/components/Tooltip/components/TooltipContent/TooltipContent.meta.ts +1 -1
  130. package/components/Tooltip/components/TooltipContent/TooltipContent.tsx +1 -1
  131. package/components/Tooltip/components/TooltipTrigger/TooltipTrigger.meta.ts +1 -1
  132. package/components/shared/InputLabel/InputLabel.meta.ts +1 -1
  133. package/components/shared/ResultList/ResultList.meta.ts +1 -1
  134. package/components/shared/ResultList/ResultList.tsx +4 -1
  135. package/components/shared/ResultList/ResultList.types.ts +1 -1
  136. package/constants/colors.ts +1 -1
  137. package/constants/components.ts +1 -1
  138. package/constants/emphasis.ts +1 -1
  139. package/constants/meta.ts +4 -7
  140. package/constants/scale.ts +1 -1
  141. package/constants/scope.ts +4 -1
  142. package/contexts/LayoutContext/LayoutContext.tsx +5 -2
  143. package/hooks/useChatScroll.tsx +2 -2
  144. package/hooks/useTheme.tsx +1 -1
  145. package/package.json +11 -10
  146. package/types/scope.ts +11 -15
  147. package/utils/colors.ts +2 -2
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { MenuCategoryBaseProps } from "./MenuCategory.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<MenuCategoryBaseProps> = {
@@ -1,14 +1,30 @@
1
1
  "use client"
2
2
 
3
- import { useEffect, useState, type FC } from "react"
4
- import { Flex, Icon, Text } from "../../../.."
3
+ import { useState, type FC } from "react"
4
+ import { Flex } from "../../../Flex"
5
+ import { Icon } from "../../../Icon"
6
+ import { Text } from "../../../Text"
5
7
  import { getClasses } from "@heliosgraphics/utils"
6
8
  import styles from "./MenuCategory.module.css"
7
9
  import type { MenuCategoryProps } from "./MenuCategory.types"
8
10
 
9
- export const MenuCategory: FC<MenuCategoryProps> = ({ category, children, isFolder, isOpen: isIncomingOpen }) => {
10
- const [isOpen, setOpen] = useState<boolean>(!!isIncomingOpen)
11
- const onToggle = (): void => setOpen(!isOpen)
11
+ export const MenuCategory: FC<MenuCategoryProps> = ({
12
+ category,
13
+ children,
14
+ isFolder,
15
+ isOpen: controlledIsOpen,
16
+ isInitiallyClosed,
17
+ }) => {
18
+ const [localIsOpen, setLocalIsOpen] = useState<boolean>(!isInitiallyClosed)
19
+
20
+ const isControlled: boolean = controlledIsOpen !== undefined
21
+ const isOpen: boolean = isControlled ? !!controlledIsOpen : localIsOpen
22
+
23
+ const onToggle = (): void => {
24
+ if (!isControlled) {
25
+ setLocalIsOpen((prev) => !prev)
26
+ }
27
+ }
12
28
 
13
29
  const menuCategoryClasses: string = getClasses(styles.menuCategory, {
14
30
  [styles.menuCategoryFolder]: category,
@@ -26,10 +42,6 @@ export const MenuCategory: FC<MenuCategoryProps> = ({ category, children, isFold
26
42
 
27
43
  const showHeader: boolean = Boolean(category || isFolder)
28
44
 
29
- useEffect(() => {
30
- setOpen(!!isIncomingOpen)
31
- }, [isIncomingOpen])
32
-
33
45
  return (
34
46
  <Flex isColumn={true} isXCentered={true} data-ui-component="Menu.Category" className={menuCategoryClasses}>
35
47
  {showHeader && (
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { MenuFilterProps } from "./MenuFilter.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<MenuFilterProps> = {
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import { FC } from "react"
4
- import { Input } from "../../../.."
4
+ import { Input } from "../../../Input"
5
5
  import { getClasses } from "@heliosgraphics/utils"
6
6
  import styles from "./MenuFilter.module.css"
7
7
  import type { MenuFilterProps } from "./MenuFilter.types"
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { MenuItemProps } from "./MenuItem.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<MenuItemProps> = {
@@ -1,7 +1,11 @@
1
1
  "use client"
2
2
 
3
3
  import { FC } from "react"
4
- import { Flex, Pill, Icon, Text, useLayoutContext } from "../../../.."
4
+ import { Flex } from "../../../Flex"
5
+ import { Pill } from "../../../Pill"
6
+ import { Icon } from "../../../Icon"
7
+ import { Text } from "../../../Text"
8
+ import { useLayoutContext } from "../../../../hooks/useLayoutContext"
5
9
  import { getClasses } from "@heliosgraphics/utils"
6
10
  import styles from "./MenuItem.module.css"
7
11
  import type { MenuItemProps } from "./MenuItem.types"
@@ -1,4 +1,5 @@
1
- import type { HeliosColorType, HeliosIconType } from "../../../.."
1
+ import type { HeliosColorType } from "../../../../types/colors"
2
+ import type { HeliosIconType } from "../../../../types/icons"
2
3
 
3
4
  export interface MenuItemProps {
4
5
  icon?: HeliosIconType
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { OverlayBaseProps } from "./Overlay.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<OverlayBaseProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { PieProps } from "./Pie.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<PieProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosColorType } from "../.."
1
+ import type { HeliosColorType } from "../../types/colors"
2
2
 
3
3
  export interface PieItem {
4
4
  name?: string
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { PillProps } from "./Pill.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<PillProps> = {
@@ -1,8 +1,10 @@
1
1
  import { getClasses } from "@heliosgraphics/utils/classnames"
2
2
  import { getColorClasses } from "../../utils/colors"
3
- import { Flex, Text, Icon } from "../.."
3
+ import { Flex } from "../Flex"
4
+ import { Text } from "../Text"
5
+ import { Icon } from "../Icon"
4
6
  import styles from "./Pill.module.css"
5
- import type { FC } from "react"
7
+ import { memo, type FC } from "react"
6
8
  import type { PillProps } from "./Pill.types"
7
9
 
8
10
  const PILL_ICON_SIZE: Record<string, number> = {
@@ -11,43 +13,45 @@ const PILL_ICON_SIZE: Record<string, number> = {
11
13
  normal: 24,
12
14
  }
13
15
 
14
- export const Pill: FC<PillProps> = ({
15
- appearance = "light",
16
- color = "gray",
17
- className,
18
- icon,
19
- isLabelHidden,
20
- isMono,
21
- isRounded,
22
- label,
23
- onClick,
24
- size = "normal",
25
- }) => {
26
- const pillColorClasses: Array<string> = getColorClasses(color, appearance)
27
- const pillClasses = getClasses(styles.pill, "non-selectable break-word", ...pillColorClasses, className, {
28
- [styles.pillRounded]: isRounded,
29
- [`radius-md`]: !isRounded,
16
+ export const Pill: FC<PillProps> = memo(
17
+ ({
18
+ appearance = "light",
19
+ color = "gray",
20
+ className,
21
+ icon,
22
+ isLabelHidden,
23
+ isMono,
24
+ isRounded,
25
+ label,
26
+ onClick,
27
+ size = "normal",
28
+ }) => {
29
+ const pillColorClasses: Array<string> = getColorClasses(color, appearance)
30
+ const pillClasses = getClasses(styles.pill, "non-selectable break-word", ...pillColorClasses, className, {
31
+ [styles.pillRounded]: isRounded,
32
+ [`radius-md`]: !isRounded,
30
33
 
31
- [styles.pillLight]: appearance === "light",
34
+ [styles.pillLight]: appearance === "light",
32
35
 
33
- [styles.pillNormal]: !size || size === "normal",
34
- [styles.pillSmall]: size === "small",
35
- [styles.pillTiny]: size === "tiny",
36
+ [styles.pillNormal]: !size || size === "normal",
37
+ [styles.pillSmall]: size === "small",
38
+ [styles.pillTiny]: size === "tiny",
36
39
 
37
- [styles.pillIconOnly]: !!icon && isLabelHidden,
38
- })
40
+ [styles.pillIconOnly]: !!icon && isLabelHidden,
41
+ })
39
42
 
40
- const isSmall: boolean = size !== "normal"
41
- const pillTextSize = isSmall ? "tiny" : "small"
43
+ const isSmall: boolean = size !== "normal"
44
+ const pillTextSize = isSmall ? "tiny" : "small"
42
45
 
43
- return (
44
- <Flex {...(onClick && { onClick })} className={pillClasses} isCentered={true} gap={2} data-ui-component="Pill">
45
- {icon && <Icon size={PILL_ICON_SIZE[size] || 16} icon={icon} />}
46
- {!isLabelHidden && (
47
- <Text type={pillTextSize} whiteSpace="nowrap" {...(isMono && { fontFamily: "mono" })} fontWeight="medium">
48
- {label}
49
- </Text>
50
- )}
51
- </Flex>
52
- )
53
- }
46
+ return (
47
+ <Flex {...(onClick && { onClick })} className={pillClasses} isCentered={true} gap={2} data-ui-component="Pill">
48
+ {icon && <Icon size={PILL_ICON_SIZE[size] || 16} icon={icon} />}
49
+ {!isLabelHidden && (
50
+ <Text type={pillTextSize} whiteSpace="nowrap" {...(isMono && { fontFamily: "mono" })} fontWeight="medium">
51
+ {label}
52
+ </Text>
53
+ )}
54
+ </Flex>
55
+ )
56
+ },
57
+ )
@@ -1,5 +1,7 @@
1
1
  import type { MouseEventHandler } from "react"
2
- import type { HeliosIconType, HeliosSizeType, HeliosColorType, HeliosAppearanceType } from "../.."
2
+ import type { HeliosIconType } from "../../types/icons"
3
+ import type { HeliosSizeType } from "../../types/scale"
4
+ import type { HeliosColorType, HeliosAppearanceType } from "../../types/colors"
3
5
 
4
6
  export interface PillProps {
5
7
  appearance?: HeliosAppearanceType
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { PlaceholderBaseProps } from "./Placeholder.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<PlaceholderBaseProps> = {
@@ -1,4 +1,5 @@
1
- import { Flex, Text } from "../.."
1
+ import { Flex } from "../Flex"
2
+ import { Text } from "../Text"
2
3
  import styles from "./Placeholder.module.css"
3
4
  import type { PlaceholderProps } from "./Placeholder.types"
4
5
  import type { FC } from "react"
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { ProgressProps } from "./Progress.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<ProgressProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosColorType } from "../.."
1
+ import type { HeliosColorType } from "../../types/colors"
2
2
 
3
3
  export interface ProgressProps {
4
4
  isSmall?: boolean
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { BaseRadioProps } from "./Radio.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<BaseRadioProps> = {
@@ -3,7 +3,8 @@
3
3
  import { useId } from "react"
4
4
  import { getClasses } from "@heliosgraphics/utils/classnames"
5
5
  import { getColorClasses } from "../../utils/colors"
6
- import { Flex, Text } from "../.."
6
+ import { Flex } from "../Flex"
7
+ import { Text } from "../Text"
7
8
  import styles from "./Radio.module.css"
8
9
  import type { FC } from "react"
9
10
  import type { RadioProps } from "./Radio.types"
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { SegmentsBaseProps } from "./Segments.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<SegmentsBaseProps> = {
@@ -11,7 +11,7 @@ import {
11
11
  cloneElement,
12
12
  type ReactElement,
13
13
  } from "react"
14
- import { Flex } from "../.."
14
+ import { Flex } from "../Flex"
15
15
  import styles from "./Segments.module.css"
16
16
  import { getClasses } from "@heliosgraphics/utils"
17
17
  import { SegmentButton } from "./components/SegmentButton"
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { SegmentButtonProps } from "./SegmentButton.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<SegmentButtonProps> = {
@@ -1,8 +1,8 @@
1
1
  import styles from "./SegmentButton.module.css"
2
2
  import { forwardRef } from "react"
3
3
  import { getClasses } from "@heliosgraphics/utils"
4
- import { Icon } from "../../../.."
5
- import type { HeliosIconType } from "../../../.."
4
+ import { Icon } from "../../../Icon"
5
+ import type { HeliosIconType } from "../../../../types/icons"
6
6
  import type { SegmentButtonProps } from "./SegmentButton.types"
7
7
 
8
8
  export const SegmentButton = forwardRef<HTMLButtonElement, SegmentButtonProps>(
@@ -1,4 +1,4 @@
1
- import type { HeliosIconType } from "../../../.."
1
+ import type { HeliosIconType } from "../../../../types/icons"
2
2
 
3
3
  export interface SegmentButtonProps {
4
4
  icon?: HeliosIconType
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { SelectProps } from "./Select.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<SelectProps> = {
@@ -1,6 +1,7 @@
1
1
  "use client"
2
2
 
3
- import { Flex, Icon } from "../.."
3
+ import { Flex } from "../Flex"
4
+ import { Icon } from "../Icon"
4
5
  import { getClasses } from "@heliosgraphics/utils/classnames"
5
6
  import { useId, type FC } from "react"
6
7
  import { InputLabel } from "../shared/InputLabel"
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { SeparatorProps } from "./Separator.types"
3
3
 
4
4
  export const SHARED_SEPARATOR_META: Partial<HeliosAttributeMeta<SeparatorProps>> = {
@@ -3,32 +3,27 @@ import { VerticalSeparator } from "./components/VerticalSeparator"
3
3
  import styles from "./Separator.module.css"
4
4
  import { getClasses } from "@heliosgraphics/utils"
5
5
  import type { SeparatorProps } from "./Separator.types"
6
- import type { FC } from "react"
6
+ import { memo, type FC } from "react"
7
7
 
8
- export const Separator: FC<SeparatorProps> = ({
9
- className,
10
- emphasis = "primary",
11
- isVertical,
12
- height,
13
- lineStyle = "solid",
14
- width,
15
- }) => {
16
- const separatorClasses: string = getClasses(className, {
17
- [styles.separatorPrimary]: emphasis === "primary",
18
- [styles.separatorSecondary]: emphasis === "secondary",
19
- [styles.separatorTertiary]: emphasis === "tertiary",
20
- })
8
+ export const Separator: FC<SeparatorProps> = memo(
9
+ ({ className, emphasis = "primary", isVertical, height, lineStyle = "solid", width }) => {
10
+ const separatorClasses: string = getClasses(className, {
11
+ [styles.separatorPrimary]: emphasis === "primary",
12
+ [styles.separatorSecondary]: emphasis === "secondary",
13
+ [styles.separatorTertiary]: emphasis === "tertiary",
14
+ })
21
15
 
22
- const separatorProps: SeparatorProps = {
23
- className: separatorClasses,
24
- emphasis,
25
- ...(isVertical !== undefined && { isVertical }),
26
- ...(height !== undefined && { height }),
27
- lineStyle,
28
- ...(width !== undefined && { width }),
29
- }
16
+ const separatorProps: SeparatorProps = {
17
+ className: separatorClasses,
18
+ emphasis,
19
+ ...(isVertical !== undefined && { isVertical }),
20
+ ...(height !== undefined && { height }),
21
+ lineStyle,
22
+ ...(width !== undefined && { width }),
23
+ }
30
24
 
31
- if (isVertical) return <VerticalSeparator {...separatorProps} />
25
+ if (isVertical) return <VerticalSeparator {...separatorProps} />
32
26
 
33
- return <HorizontalSeparator {...separatorProps} />
34
- }
27
+ return <HorizontalSeparator {...separatorProps} />
28
+ },
29
+ )
@@ -1,4 +1,4 @@
1
- import type { HeliosEmphasisType } from "../.."
1
+ import type { HeliosEmphasisType } from "../../types/intentions"
2
2
 
3
3
  export interface SeparatorProps {
4
4
  className?: string
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { HRMarkupProps } from "./HRMarkup.types"
3
3
  import { SHARED_SEPARATOR_META } from "../../Separator.meta"
4
4
 
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { HorizontalSeparatorProps } from "./HorizontalSeparator.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<HorizontalSeparatorProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { VerticalSeparatorProps } from "./VerticalSeparator.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<VerticalSeparatorProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { SetupProps } from "./Setup.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<SetupProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { ShimmerProps } from "./Shimmer.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<ShimmerProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { SliderProps } from "./Slider.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<SliderProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { SpacerProps } from "./Spacer.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<SpacerProps> = {
@@ -1,6 +1,6 @@
1
- import type { FC } from "react"
1
+ import { memo, type FC } from "react"
2
2
  import type { SpacerProps } from "./Spacer.types"
3
3
 
4
- export const Spacer: FC<SpacerProps> = ({ gap }) => {
4
+ export const Spacer: FC<SpacerProps> = memo(({ gap }) => {
5
5
  return <div style={{ height: `${gap ?? 0}px` }} />
6
- }
6
+ })
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { TableBaseProps } from "./Table.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<TableBaseProps> = {
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { TabsProps } from "./Tabs.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<TabsProps> = {
@@ -3,7 +3,7 @@
3
3
  import { useState, type FC } from "react"
4
4
  import { TabsProps } from "./Tabs.types"
5
5
  import styles from "./Tabs.module.css"
6
- import { Text } from "../.."
6
+ import { Text } from "../Text"
7
7
 
8
8
  export const Tabs: FC<TabsProps> = ({ active: activeNumber, items, sections }) => {
9
9
  const [active, setActive] = useState(activeNumber || 0)
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { TextBaseProps } from "./Text.types"
3
3
 
4
4
  export const SHARED_TEXT_META: Partial<HeliosAttributeMeta<TextBaseProps>> = {
@@ -4,12 +4,12 @@ import { getTypographyUtility } from "./Text.utils"
4
4
  import { P } from "./components/P"
5
5
  import { Small } from "./components/Small"
6
6
  import { Tiny } from "./components/Tiny"
7
- import { type FC } from "react"
7
+ import { memo, type FC } from "react"
8
8
  import styles from "./Text.module.css"
9
9
  import type { TextProps } from "./Text.types"
10
10
  import { Micro } from "./components/Micro"
11
11
 
12
- export const Text: FC<TextProps> = (props) => {
12
+ export const Text: FC<TextProps> = memo((props) => {
13
13
  const textClasses: string = getClasses(props.className, styles.text, {
14
14
  [styles.textPrimary]: props.emphasis === "primary",
15
15
  [styles.textSecondary]: props.emphasis === "secondary",
@@ -51,4 +51,4 @@ export const Text: FC<TextProps> = (props) => {
51
51
  default:
52
52
  return <Div {...baseTextProps} />
53
53
  }
54
- }
54
+ })
@@ -1,5 +1,5 @@
1
1
  import type { HTMLAttributes } from "react"
2
- import type { HeliosEmphasisType } from "../.."
2
+ import type { HeliosEmphasisType } from "../../types/intentions"
3
3
 
4
4
  export interface TextBaseProps {
5
5
  emphasis?: HeliosEmphasisType
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { DivProps } from "./Div.types"
3
3
  import { SHARED_TEXT_META } from "../../Text.meta"
4
4
 
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { MicroProps } from "./Micro.types"
3
3
  import { SHARED_TEXT_META } from "../../Text.meta"
4
4
 
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { PProps } from "./P.types"
3
3
  import { SHARED_TEXT_META } from "../../Text.meta"
4
4
 
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { SmallProps } from "./Small.types"
3
3
  import { SHARED_TEXT_META } from "../../Text.meta"
4
4
 
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../../../.."
1
+ import type { HeliosAttributeMeta } from "../../../../types/meta"
2
2
  import type { TinyProps } from "./Tiny.types"
3
3
  import { SHARED_TEXT_META } from "../../Text.meta"
4
4
 
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { TextareaProps } from "./Textarea.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<TextareaProps> = {
@@ -1,7 +1,7 @@
1
1
  "use client"
2
2
 
3
3
  import { getClasses } from "@heliosgraphics/utils/classnames"
4
- import { Text } from "../.."
4
+ import { Text } from "../Text"
5
5
  import { useId, useRef, useEffect } from "react"
6
6
  import { InputLabel } from "../shared/InputLabel"
7
7
  import styles from "./Textarea.module.css"
@@ -1,4 +1,4 @@
1
- import type { HeliosAttributeMeta } from "../.."
1
+ import type { HeliosAttributeMeta } from "../../types/meta"
2
2
  import type { TileProps } from "./Tile.types"
3
3
 
4
4
  export const meta: HeliosAttributeMeta<TileProps> = {
@@ -1,11 +1,13 @@
1
1
  "use client"
2
2
  import { getClasses } from "@heliosgraphics/utils/classnames"
3
3
  import { getColorClasses } from "../../utils/colors"
4
- import { Icon, Text, Flex } from "../.."
4
+ import { Icon } from "../Icon"
5
+ import { Text } from "../Text"
6
+ import { Flex } from "../Flex"
5
7
  import styles from "./Tile.module.css"
6
8
  import { type FC } from "react"
7
9
  import type { TileProps } from "./Tile.types"
8
- import type { HeliosColorType } from "../.."
10
+ import type { HeliosColorType } from "../../types/colors"
9
11
 
10
12
  export const Tile: FC<TileProps> = ({
11
13
  size,