@musecat/uikit 0.1.3 → 0.2.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 (173) hide show
  1. package/.agents/references/Components/Box.md +1 -1
  2. package/.agents/references/Components/Button.md +1 -1
  3. package/.agents/references/Components/Card.md +1 -1
  4. package/.agents/references/Components/Checkbox.md +1 -1
  5. package/.agents/references/Components/CodeBox.md +1 -1
  6. package/.agents/references/Components/ContextMenu.md +1 -1
  7. package/.agents/references/Components/ContributionGraph.md +1 -1
  8. package/.agents/references/Components/DatePicker.md +1 -1
  9. package/.agents/references/Components/Divider.md +1 -1
  10. package/.agents/references/Components/Header.md +3 -3
  11. package/.agents/references/Components/Icon.md +1 -1
  12. package/.agents/references/Components/Input.md +1 -1
  13. package/.agents/references/Components/Label.md +2 -2
  14. package/.agents/references/Components/Layout.md +2 -2
  15. package/.agents/references/Components/Maps.md +1 -1
  16. package/.agents/references/Components/Nav.md +1 -1
  17. package/.agents/references/Components/Pagination.md +1 -1
  18. package/.agents/references/Components/Pill.md +1 -1
  19. package/.agents/references/Components/Profile.md +1 -1
  20. package/.agents/references/Components/Progress.md +2 -2
  21. package/.agents/references/Components/Radio.md +2 -2
  22. package/.agents/references/Components/Select.md +1 -1
  23. package/.agents/references/Components/Skeleton.md +1 -1
  24. package/.agents/references/Components/Spinner.md +1 -1
  25. package/.agents/references/Components/Text.md +1 -1
  26. package/.agents/references/Components/TimePicker.md +1 -1
  27. package/.agents/references/Components/Timeline.md +2 -2
  28. package/.agents/references/Frameworks/DNDView.md +1 -1
  29. package/.agents/references/Frameworks/Dialog.md +2 -2
  30. package/.agents/references/Frameworks/EdgeEffect.md +2 -2
  31. package/.agents/references/Frameworks/HScrollView.md +2 -2
  32. package/.agents/references/Frameworks/ImageView.md +1 -1
  33. package/.agents/references/Frameworks/Motion.md +1 -1
  34. package/.agents/references/Frameworks/Pressable.md +1 -1
  35. package/.agents/references/Frameworks/Squircle.md +1 -1
  36. package/.agents/references/Frameworks/Theme.md +1 -1
  37. package/.agents/references/Frameworks/Toaster.md +2 -2
  38. package/.agents/references/Frameworks/View.md +1 -1
  39. package/.agents/references/Frameworks/_shared.md +3 -3
  40. package/README.md +25 -1
  41. package/global.d.ts +6 -0
  42. package/i18n/messages/en/uikit.json +50 -0
  43. package/i18n/messages/jp/uikit.json +50 -0
  44. package/i18n/messages/kr/uikit.json +50 -0
  45. package/i18n/request.ts +17 -0
  46. package/i18n/shared.ts +54 -0
  47. package/index.ts +86 -66
  48. package/package.json +33 -10
  49. package/packages/Components/Box/Box.tsx +7 -7
  50. package/packages/Components/Box/Box.types.ts +7 -7
  51. package/packages/Components/Button/Button.tsx +6 -6
  52. package/packages/Components/Button/Button.types.ts +6 -6
  53. package/packages/Components/Card/Card.default.tsx +13 -11
  54. package/packages/Components/Card/Card.foldable.tsx +16 -14
  55. package/packages/Components/Card/Card.tsx +3 -3
  56. package/packages/Components/Card/Card.types.ts +5 -5
  57. package/packages/Components/Card/Card.utils.ts +1 -1
  58. package/packages/Components/Checkbox/Checkbox.tsx +6 -6
  59. package/packages/Components/Checkbox/Checkbox.types.ts +4 -4
  60. package/packages/Components/CodeBox/CodeBox.copy.tsx +3 -3
  61. package/packages/Components/CodeBox/CodeBox.tsx +6 -5
  62. package/packages/Components/CodeBox/CodeBox.types.ts +2 -2
  63. package/packages/Components/ContextMenu/ContextMenu.options.tsx +6 -6
  64. package/packages/Components/ContextMenu/ContextMenu.tsx +8 -7
  65. package/packages/Components/ContextMenu/ContextMenu.types.ts +1 -1
  66. package/packages/Components/ContributionGraph/ContributionGraph.tsx +18 -9
  67. package/packages/Components/ContributionGraph/ContributionGraph.types.ts +2 -2
  68. package/packages/Components/DatePicker/DatePicker.calendar.tsx +6 -6
  69. package/packages/Components/DatePicker/DatePicker.core.tsx +2 -2
  70. package/packages/Components/DatePicker/DatePicker.tsx +48 -27
  71. package/packages/Components/DatePicker/DatePicker.types.ts +1 -1
  72. package/packages/Components/DatePicker/hooks/useCalendar.ts +1 -1
  73. package/packages/Components/DatePicker/hooks/useSelection.ts +2 -2
  74. package/packages/Components/Divider/Divider.tsx +2 -2
  75. package/packages/Components/Divider/Divider.types.ts +1 -1
  76. package/packages/Components/Header/Header.tsx +4 -4
  77. package/packages/Components/Icon/Icon.group.tsx +5 -5
  78. package/packages/Components/Icon/Icon.group.types.ts +4 -4
  79. package/packages/Components/Icon/Icon.tsx +8 -8
  80. package/packages/Components/Icon/Icon.types.ts +7 -7
  81. package/packages/Components/Input/Input.tsx +5 -5
  82. package/packages/Components/Input/Input.types.ts +1 -1
  83. package/packages/Components/Label/Label.tsx +7 -7
  84. package/packages/Components/Label/Label.types.ts +2 -2
  85. package/packages/Components/Layout/Layout.docs.tsx +6 -6
  86. package/packages/Components/Layout/Layout.docs.types.ts +2 -2
  87. package/packages/Components/Layout/Layout.tsx +7 -7
  88. package/packages/Components/Layout/Layout.types.ts +4 -4
  89. package/packages/Components/Maps/OSM/MapOSM.tsx +4 -4
  90. package/packages/Components/Nav/Nav.tsx +8 -8
  91. package/packages/Components/Nav/Nav.types.ts +5 -5
  92. package/packages/Components/Nav/hooks/useNavDrag.ts +1 -1
  93. package/packages/Components/Pagination/Pagination.tsx +8 -7
  94. package/packages/Components/Pagination/Pagination.types.ts +1 -1
  95. package/packages/Components/Pill/Pill.tsx +4 -4
  96. package/packages/Components/Pill/Pill.types.ts +6 -6
  97. package/packages/Components/Profile/Profile.shared.ts +3 -3
  98. package/packages/Components/Profile/Profile.tsx +7 -7
  99. package/packages/Components/Profile/Profile.types.ts +4 -4
  100. package/packages/Components/Progress/Progress.tsx +5 -5
  101. package/packages/Components/Progress/Progress.types.ts +2 -2
  102. package/packages/Components/Radio/Radio.tsx +5 -5
  103. package/packages/Components/Radio/Radio.types.ts +4 -4
  104. package/packages/Components/Select/Select.keyboard.tsx +1 -1
  105. package/packages/Components/Select/Select.trigger.tsx +3 -3
  106. package/packages/Components/Select/Select.tsx +2 -2
  107. package/packages/Components/Select/Select.types.ts +1 -1
  108. package/packages/Components/Select/Select.utils.ts +1 -1
  109. package/packages/Components/Select/hooks/useSelectNavigation.ts +7 -10
  110. package/packages/Components/Select/hooks/useSelectSelection.ts +3 -3
  111. package/packages/Components/Select/hooks/useSelectState.ts +3 -3
  112. package/packages/Components/Select/select.control.tsx +15 -24
  113. package/packages/Components/Select/select.inner.tsx +10 -10
  114. package/packages/Components/Skeleton/Skeleton.tsx +2 -2
  115. package/packages/Components/Skeleton/Skeleton.types.ts +2 -2
  116. package/packages/Components/Spinner/Spinner.tsx +5 -5
  117. package/packages/Components/Spinner/Spinner.types.ts +2 -2
  118. package/packages/Components/Text/Text.tsx +3 -3
  119. package/packages/Components/Text/Text.types.ts +2 -2
  120. package/packages/Components/TimePicker/TimePicker.core.tsx +4 -4
  121. package/packages/Components/TimePicker/TimePicker.tsx +7 -7
  122. package/packages/Components/TimePicker/TimePicker.types.ts +1 -1
  123. package/packages/Components/Timeline/Timeline.tsx +5 -5
  124. package/packages/Components/Timeline/Timeline.types.ts +3 -3
  125. package/packages/Components/Title/Title.tsx +7 -7
  126. package/packages/Components/Title/Title.types.ts +6 -6
  127. package/packages/Components/Toggle/Toggle.tsx +9 -9
  128. package/packages/Components/Toggle/Toggle.types.ts +3 -3
  129. package/packages/Components/Tooltip/Tooltip.tsx +3 -3
  130. package/packages/Components/Tooltip/Tooltip.types.ts +2 -2
  131. package/packages/Frameworks/Dialog/Dialog.background.tsx +4 -4
  132. package/packages/Frameworks/Dialog/Dialog.boot.tsx +2 -2
  133. package/packages/Frameworks/Dialog/Dialog.store.ts +1 -1
  134. package/packages/Frameworks/Dialog/Dialog.tsx +6 -5
  135. package/packages/Frameworks/Dialog/Dialog.types.ts +4 -4
  136. package/packages/Frameworks/Dialog/contents/Dialog.footer.tsx +4 -4
  137. package/packages/Frameworks/Dialog/contents/Dialog.funnel.tsx +6 -6
  138. package/packages/Frameworks/Dialog/contents/Dialog.header.tsx +6 -6
  139. package/packages/Frameworks/Dialog/hooks/useDialogPosition.ts +2 -2
  140. package/packages/Frameworks/Dialog/hooks/useSheetDrag.ts +4 -2
  141. package/packages/Frameworks/Dialog/hooks/useSheetGeometry.ts +5 -3
  142. package/packages/Frameworks/Dialog/hooks/useSheetProgressive.ts +2 -2
  143. package/packages/Frameworks/Dialog/renderers/renderModal.tsx +9 -9
  144. package/packages/Frameworks/Dialog/renderers/renderPopover.tsx +11 -11
  145. package/packages/Frameworks/Dialog/renderers/renderSheet.tsx +17 -17
  146. package/packages/Frameworks/EdgeEffect/EdgeEffect.tsx +2 -2
  147. package/packages/Frameworks/EdgeEffect/EdgeEffect.types.ts +1 -1
  148. package/packages/Frameworks/Pressable/Pressable.tsx +11 -11
  149. package/packages/Frameworks/Pressable/Pressable.types.ts +15 -6
  150. package/packages/Frameworks/Squircle/Squircle.tsx +3 -3
  151. package/packages/Frameworks/Squircle/Squircle.types.ts +1 -1
  152. package/packages/Frameworks/Theme/Radius.types.ts +2 -2
  153. package/packages/Frameworks/Toaster/Toaster.boot.tsx +5 -5
  154. package/packages/Frameworks/Toaster/Toaster.types.ts +3 -1
  155. package/packages/Frameworks/View/DNDView/DNDView.tsx +5 -5
  156. package/packages/Frameworks/View/DNDView/DNDView.types.ts +2 -2
  157. package/packages/Frameworks/View/HScrollView/HScrollView.tsx +8 -8
  158. package/packages/Frameworks/View/HScrollView/HScrollView.types.ts +2 -2
  159. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.counter.tsx +2 -2
  160. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.footer.tsx +8 -4
  161. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.header.tsx +3 -3
  162. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.list.tsx +5 -5
  163. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.slide.tsx +3 -3
  164. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.tsx +7 -7
  165. package/packages/Frameworks/View/ImageView/Image.controls.tsx +1 -1
  166. package/packages/Frameworks/View/ImageView/Image.tsx +44 -27
  167. package/packages/Frameworks/View/ImageView/Image.types.ts +2 -2
  168. package/packages/Frameworks/View/ImageView/Image.utils.ts +2 -2
  169. package/packages/Frameworks/View/View.tsx +8 -8
  170. package/packages/Frameworks/View/View.types.ts +5 -5
  171. package/packages/Frameworks/_shared/Padding.types.ts +2 -4
  172. package/packages/Frameworks/_shared/StopParentInteraction.tsx +1 -1
  173. package/packages/Frameworks/_shared/Wind.types.ts +1 -1
@@ -1,9 +1,9 @@
1
- import type { IconGroupProps } from "@/packages/Components/Icon/Icon.group.types";
2
- import type { IconProps } from "@/packages/Components/Icon/Icon.types";
3
- import type { PillProps } from "@/packages/Components/Pill/Pill.types";
4
- import type { TextProps } from "@/packages/Components/Text/Text.types";
5
- import type { PressableProps } from "@/packages/Frameworks/Pressable/Pressable.types";
6
- import type { ViewProps } from "@/packages/Frameworks/View/View.types";
1
+ import type { IconGroupProps } from "../Icon/Icon.group.types";
2
+ import type { IconProps } from "../Icon/Icon.types";
3
+ import type { PillProps } from "../Pill/Pill.types";
4
+ import type { TextProps } from "../Text/Text.types";
5
+ import type { PressableProps } from "../../Frameworks/Pressable/Pressable.types";
6
+ import type { ViewProps } from "../../Frameworks/View/View.types";
7
7
 
8
8
  interface TitleItemProps {
9
9
  "data-color-mode"?: string;
@@ -8,15 +8,15 @@ import {
8
8
  useRef,
9
9
  useState,
10
10
  } from "react";
11
- import Spinner from "@/packages/Components/Spinner/Spinner";
12
- import Text from "@/packages/Components/Text/Text";
13
- import styles from "@/packages/Components/Toggle/Toggle.module.scss";
14
- import type { ToggleProps } from "@/packages/Components/Toggle/Toggle.types";
15
- import { Size, SizePX } from "@/packages/Frameworks/_shared/sizing";
16
- import { useControllableState } from "@/packages/Frameworks/_shared/useControllableState";
17
- import { Radius } from "@/packages/Frameworks/Theme/Radius.types";
18
- import { Border } from "@/packages/Frameworks/Theme/Theme.types";
19
- import View from "@/packages/Frameworks/View/View";
11
+ import Spinner from "../Spinner/Spinner";
12
+ import Text from "../Text/Text";
13
+ import styles from "./Toggle.module.scss";
14
+ import type { ToggleProps } from "./Toggle.types";
15
+ import { Size, SizePX } from "../../Frameworks/_shared/sizing";
16
+ import { useControllableState } from "../../Frameworks/_shared/useControllableState";
17
+ import { Radius } from "../../Frameworks/Theme/Radius.types";
18
+ import { Border } from "../../Frameworks/Theme/Theme.types";
19
+ import View from "../../Frameworks/View/View";
20
20
 
21
21
  type ToggleTrackStyle = React.CSSProperties & {
22
22
  "--toggle-padding"?: string;
@@ -1,6 +1,6 @@
1
- import type { TextProps } from "@/packages/Components/Text/Text.types";
2
- import type { UIKitSizeValue } from "@/packages/Frameworks/_shared/sizing";
3
- import type { ThemeSystemProps } from "@/packages/Frameworks/Theme/Theme.types";
1
+ import type { TextProps } from "../Text/Text.types";
2
+ import type { UIKitSizeValue } from "../../Frameworks/_shared/sizing";
3
+ import type { ThemeSystemProps } from "../../Frameworks/Theme/Theme.types";
4
4
 
5
5
  export interface ToggleProps
6
6
  extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "size" | "color">,
@@ -12,12 +12,12 @@ import {
12
12
  useRef,
13
13
  useState,
14
14
  } from "react";
15
- import styles from "@/packages/Components/Tooltip/Tooltip.module.scss";
15
+ import styles from "./Tooltip.module.scss";
16
16
  import type {
17
17
  TooltipPlacement,
18
18
  TooltipProps,
19
- } from "@/packages/Components/Tooltip/Tooltip.types";
20
- import View from "@/packages/Frameworks/View/View";
19
+ } from "./Tooltip.types";
20
+ import View from "../../Frameworks/View/View";
21
21
 
22
22
  const TOOLTIP_GAP = 8;
23
23
  const TOOLTIP_MARGIN = 4;
@@ -1,10 +1,10 @@
1
- import type { RadiusValue } from "@/packages/Frameworks/Theme/Radius.types";
1
+ import type { RadiusValue } from "../../Frameworks/Theme/Radius.types";
2
2
  import type {
3
3
  BorderProps,
4
4
  ThemeBackgroundPaint,
5
5
  ThemePaint,
6
6
  ThemePreset,
7
- } from "@/packages/Frameworks/Theme/Theme.types";
7
+ } from "../../Frameworks/Theme/Theme.types";
8
8
 
9
9
  export type TooltipPlacement =
10
10
  | "top"
@@ -3,13 +3,13 @@
3
3
  import clsx from "clsx";
4
4
  import type { MotionValue } from "motion/react";
5
5
  import { useEffect, useState } from "react";
6
- import { motionPresets } from "@/packages/Frameworks/Motion/Motion.presets";
6
+ import { motionPresets } from "../Motion/Motion.presets";
7
7
  import type {
8
8
  BackgroundBlurValue,
9
9
  ThemeBackgroundPaint,
10
- } from "@/packages/Frameworks/Theme/Theme.types";
11
- import { BackgroundBlur } from "@/packages/Frameworks/Theme/Theme.types";
12
- import View from "@/packages/Frameworks/View/View";
10
+ } from "../Theme/Theme.types";
11
+ import { BackgroundBlur } from "../Theme/Theme.types";
12
+ import View from "../View/View";
13
13
 
14
14
  interface BackgroundWrapperProps {
15
15
  open: boolean;
@@ -1,11 +1,11 @@
1
1
  "use client";
2
2
 
3
3
  import { useEffect, useState } from "react";
4
- import Dialog from "@/packages/Frameworks/Dialog/Dialog";
4
+ import Dialog from "./Dialog";
5
5
  import {
6
6
  type DialogInstance,
7
7
  DialogStore,
8
- } from "@/packages/Frameworks/Dialog/Dialog.store";
8
+ } from "./Dialog.store";
9
9
 
10
10
  interface DialogBootstrapProps {
11
11
  "data-color-mode"?: string;
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
 
3
- import type { DialogProps } from "@/packages/Frameworks/Dialog/Dialog.types";
3
+ import type { DialogProps } from "./Dialog.types";
4
4
 
5
5
  export interface DialogInstance extends Promise<any> {
6
6
  id: string;
@@ -2,15 +2,15 @@
2
2
 
3
3
  import { buildContext, useViewportMatch } from "@musecat/functionkit";
4
4
  import { useMemo } from "react";
5
- import DialogFunnel from "@/packages/Frameworks/Dialog/contents/Dialog.funnel";
5
+ import DialogFunnel from "./contents/Dialog.funnel";
6
6
  import type {
7
7
  DialogContextValue,
8
8
  DialogMode,
9
9
  DialogProps,
10
- } from "@/packages/Frameworks/Dialog/Dialog.types";
11
- import RenderModal from "@/packages/Frameworks/Dialog/renderers/renderModal";
12
- import RenderPopover from "@/packages/Frameworks/Dialog/renderers/renderPopover";
13
- import RenderSheet from "@/packages/Frameworks/Dialog/renderers/renderSheet";
10
+ } from "./Dialog.types";
11
+ import RenderModal from "./renderers/renderModal";
12
+ import RenderPopover from "./renderers/renderPopover";
13
+ import RenderSheet from "./renderers/renderSheet";
14
14
 
15
15
  const [DialogProvider, useRawDialogContext] =
16
16
  buildContext<DialogContextValue | null>(null);
@@ -84,6 +84,7 @@ export default function Dialog(props: DialogProps) {
84
84
  open,
85
85
  closeDialog: close,
86
86
  }),
87
+ // biome-ignore lint/correctness/useExhaustiveDependencies: close is intentionally a stable reference
87
88
  [id, resolvedMode, open, close],
88
89
  );
89
90
 
@@ -1,13 +1,13 @@
1
1
  import type { ReactNode, RefObject } from "react";
2
- import type { ButtonProps } from "@/packages/Components/Button/Button.types";
3
- import type { IconProps } from "@/packages/Components/Icon/Icon.types";
4
- import type { RadiusProps } from "@/packages/Frameworks/Theme/Radius.types";
2
+ import type { ButtonProps } from "../../Components/Button/Button.types";
3
+ import type { IconProps } from "../../Components/Icon/Icon.types";
4
+ import type { RadiusProps } from "../Theme/Radius.types";
5
5
  import type {
6
6
  BackgroundBlurValue,
7
7
  BorderProps,
8
8
  ThemeBackgroundPaint,
9
9
  ThemeSystemProps,
10
- } from "@/packages/Frameworks/Theme/Theme.types";
10
+ } from "../Theme/Theme.types";
11
11
 
12
12
  export type DialogMode = "popover" | "modal" | "sheet";
13
13
  export type DialogMobileMode = "modal" | "sheet";
@@ -1,10 +1,10 @@
1
1
  "use client";
2
2
 
3
3
  import type { ReactNode } from "react";
4
- import Button from "@/packages/Components/Button/Button";
5
- import type { DialogFooterConfig } from "@/packages/Frameworks/Dialog/Dialog.types";
6
- import Pressable from "@/packages/Frameworks/Pressable/Pressable";
7
- import View from "@/packages/Frameworks/View/View";
4
+ import Button from "../../../Components/Button/Button";
5
+ import type { DialogFooterConfig } from "../Dialog.types";
6
+ import Pressable from "../../Pressable/Pressable";
7
+ import View from "../../View/View";
8
8
 
9
9
  interface DialogFooterProps {
10
10
  config?: DialogFooterConfig;
@@ -1,16 +1,16 @@
1
1
  "use client";
2
2
 
3
3
  import { useMemo, useState } from "react";
4
- import Button from "@/packages/Components/Button/Button";
5
- import Icon from "@/packages/Components/Icon/Icon";
6
- import Text from "@/packages/Components/Text/Text";
4
+ import Button from "../../../Components/Button/Button";
5
+ import Icon from "../../../Components/Icon/Icon";
6
+ import Text from "../../../Components/Text/Text";
7
7
  import type {
8
8
  FunnelConfig,
9
9
  FunnelHistory,
10
10
  FunnelStepConfig,
11
- } from "@/packages/Frameworks/Dialog/Dialog.types";
12
- import Pressable from "@/packages/Frameworks/Pressable/Pressable";
13
- import View from "@/packages/Frameworks/View/View";
11
+ } from "../Dialog.types";
12
+ import Pressable from "../../Pressable/Pressable";
13
+ import View from "../../View/View";
14
14
 
15
15
  interface DialogFunnelProps {
16
16
  config: FunnelConfig;
@@ -1,12 +1,12 @@
1
1
  "use client";
2
2
 
3
3
  import type { ReactNode } from "react";
4
- import Icon from "@/packages/Components/Icon/Icon";
5
- import Text from "@/packages/Components/Text/Text";
6
- import { useDialog } from "@/packages/Frameworks/Dialog/Dialog";
7
- import type { DialogHeaderConfig } from "@/packages/Frameworks/Dialog/Dialog.types";
8
- import Pressable from "@/packages/Frameworks/Pressable/Pressable";
9
- import View from "@/packages/Frameworks/View/View";
4
+ import Icon from "../../../Components/Icon/Icon";
5
+ import Text from "../../../Components/Text/Text";
6
+ import { useDialog } from "../Dialog";
7
+ import type { DialogHeaderConfig } from "../Dialog.types";
8
+ import Pressable from "../../Pressable/Pressable";
9
+ import View from "../../View/View";
10
10
 
11
11
  interface DialogHeaderProps {
12
12
  config?: DialogHeaderConfig & {
@@ -1,7 +1,7 @@
1
1
  import { useViewportHeight } from "@musecat/functionkit";
2
2
  import { useCallback, useLayoutEffect, useState } from "react";
3
- import { SizePX } from "@/packages/Frameworks/_shared/sizing";
4
- import type { OffsetConfig } from "@/packages/Frameworks/Dialog/Dialog.types";
3
+ import { SizePX } from "../../_shared/sizing";
4
+ import type { OffsetConfig } from "../Dialog.types";
5
5
 
6
6
  export type PopoverPlacement =
7
7
  | "top"
@@ -2,8 +2,8 @@
2
2
 
3
3
  import { animate, type MotionValue, useDragControls } from "motion/react";
4
4
  import { useCallback, useRef } from "react";
5
- import { toPx } from "@/packages/Frameworks/Dialog/hooks/useSheetGeometry";
6
- import { motionTransitions } from "@/packages/Frameworks/Motion/Motion.presets";
5
+ import { toPx } from "./useSheetGeometry";
6
+ import { motionTransitions } from "../../Motion/Motion.presets";
7
7
 
8
8
  const CLOSE_VELOCITY = 900;
9
9
  const CLOSE_DISTANCE_RATIO = 0.34;
@@ -76,6 +76,8 @@ export function useSheetDrag({
76
76
  onSnapIndexChange,
77
77
  onDragStateChange,
78
78
  }: UseSheetDragInput): DragHandlers {
79
+ void maxPx;
80
+ void getGapHiddenY;
79
81
  const _dragControls = useDragControls();
80
82
  const contentDraggingRef = useRef(false);
81
83
  const contentPointerActiveRef = useRef(false);
@@ -1,7 +1,7 @@
1
1
  "use client";
2
2
 
3
3
  import { useCallback, useEffect, useMemo, useState } from "react";
4
- import type { SheetConfig } from "@/packages/Frameworks/Dialog/Dialog.types";
4
+ import type { SheetConfig } from "../Dialog.types";
5
5
 
6
6
  function toPx(
7
7
  value: number | string | undefined,
@@ -145,8 +145,10 @@ export function useSheetGeometry({
145
145
  const _snapPointsStr = JSON.stringify(config?.snapPoints);
146
146
  const normalizedSnapPoints = useMemo(
147
147
  () =>
148
- config?.snapPoints?.length ? normalizeSnapPoints(config.snapPoints) : [1],
149
- [config?.snapPoints?.length, config.snapPoints],
148
+ config?.snapPoints?.length
149
+ ? normalizeSnapPoints(config?.snapPoints)
150
+ : [1],
151
+ [config?.snapPoints?.length, config?.snapPoints],
150
152
  );
151
153
 
152
154
  const maxSnap = useMemo(
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { MotionValue } from "motion/react";
4
4
  import { useEffect, useMemo, useState } from "react";
5
- import type { RadiusValue } from "@/packages/Frameworks/Theme/Radius.types";
5
+ import type { RadiusValue } from "../../Theme/Radius.types";
6
6
 
7
7
  const EDGE_INSET_MAX_PX = 8;
8
8
  const BOTTOM_GAP_PX = 8;
@@ -45,7 +45,7 @@ export function useSheetProgressive({
45
45
  hasExplicitSnapPoints,
46
46
  }: UseSheetProgressiveInput): UseSheetProgressiveOutput {
47
47
  const firstSnap = normalizedSnapPoints[0];
48
- const lastSnap = normalizedSnapPoints.at(-1)!;
48
+ const lastSnap = normalizedSnapPoints.at(-1) ?? 0;
49
49
  const hasProgression =
50
50
  hasExplicitSnapPoints && normalizedSnapPoints.length > 1 && !isFreeDrag;
51
51
 
@@ -3,21 +3,21 @@
3
3
  import { AnimatePresence } from "motion/react";
4
4
  import type { ReactNode } from "react";
5
5
  import { useCallback, useEffect, useRef } from "react";
6
- import { useScrollLock } from "@/packages/Frameworks/_shared/bodyScrollLock";
7
- import { LAYER_Z_INDEX } from "@/packages/Frameworks/_shared/layer.constants";
8
- import DialogFooter from "@/packages/Frameworks/Dialog/contents/Dialog.footer";
9
- import DialogHeader from "@/packages/Frameworks/Dialog/contents/Dialog.header";
10
- import BackgroundWrapper from "@/packages/Frameworks/Dialog/Dialog.background";
6
+ import { useScrollLock } from "../../_shared/bodyScrollLock";
7
+ import { LAYER_Z_INDEX } from "../../_shared/layer.constants";
8
+ import DialogFooter from "../contents/Dialog.footer";
9
+ import DialogHeader from "../contents/Dialog.header";
10
+ import BackgroundWrapper from "../Dialog.background";
11
11
  import type {
12
12
  DialogOutsideOptions,
13
13
  ModalConfig,
14
- } from "@/packages/Frameworks/Dialog/Dialog.types";
14
+ } from "../Dialog.types";
15
15
  import {
16
16
  DialogPortal,
17
17
  useEscapeClose,
18
- } from "@/packages/Frameworks/Dialog/Dialog.utils";
19
- import { motionPresets } from "@/packages/Frameworks/Motion/Motion.presets";
20
- import View from "@/packages/Frameworks/View/View";
18
+ } from "../Dialog.utils";
19
+ import { motionPresets } from "../../Motion/Motion.presets";
20
+ import View from "../../View/View";
21
21
 
22
22
  interface RenderModalProps {
23
23
  open: boolean;
@@ -3,23 +3,23 @@
3
3
  import { getFloatingTransformOrigin } from "@musecat/functionkit";
4
4
  import { AnimatePresence } from "motion/react";
5
5
  import { type ReactNode, useCallback, useEffect, useRef } from "react";
6
- import { useScrollLock } from "@/packages/Frameworks/_shared/bodyScrollLock";
7
- import { LAYER_Z_INDEX } from "@/packages/Frameworks/_shared/layer.constants";
8
- import { Size } from "@/packages/Frameworks/_shared/sizing";
9
- import DialogFooter from "@/packages/Frameworks/Dialog/contents/Dialog.footer";
10
- import DialogHeader from "@/packages/Frameworks/Dialog/contents/Dialog.header";
11
- import BackgroundWrapper from "@/packages/Frameworks/Dialog/Dialog.background";
6
+ import { useScrollLock } from "../../_shared/bodyScrollLock";
7
+ import { LAYER_Z_INDEX } from "../../_shared/layer.constants";
8
+ import { Size } from "../../_shared/sizing";
9
+ import DialogFooter from "../contents/Dialog.footer";
10
+ import DialogHeader from "../contents/Dialog.header";
11
+ import BackgroundWrapper from "../Dialog.background";
12
12
  import type {
13
13
  DialogOutsideOptions,
14
14
  PopoverConfig,
15
- } from "@/packages/Frameworks/Dialog/Dialog.types";
15
+ } from "../Dialog.types";
16
16
  import {
17
17
  DialogPortal,
18
18
  useEscapeClose,
19
- } from "@/packages/Frameworks/Dialog/Dialog.utils";
20
- import { useDialogPosition } from "@/packages/Frameworks/Dialog/hooks/useDialogPosition";
21
- import { motionPresets } from "@/packages/Frameworks/Motion/Motion.presets";
22
- import View from "@/packages/Frameworks/View/View";
19
+ } from "../Dialog.utils";
20
+ import { useDialogPosition } from "../hooks/useDialogPosition";
21
+ import { motionPresets } from "../../Motion/Motion.presets";
22
+ import View from "../../View/View";
23
23
 
24
24
  interface RenderPopoverProps {
25
25
  open: boolean;
@@ -13,27 +13,29 @@ import {
13
13
  useRef,
14
14
  useState,
15
15
  } from "react";
16
- import { useScrollLock } from "@/packages/Frameworks/_shared/bodyScrollLock";
17
- import { LAYER_Z_INDEX } from "@/packages/Frameworks/_shared/layer.constants";
18
- import { Size } from "@/packages/Frameworks/_shared/sizing";
19
- import DialogFooter from "@/packages/Frameworks/Dialog/contents/Dialog.footer";
20
- import DialogHeader from "@/packages/Frameworks/Dialog/contents/Dialog.header";
21
- import BackgroundWrapper from "@/packages/Frameworks/Dialog/Dialog.background";
16
+ import { useScrollLock } from "../../_shared/bodyScrollLock";
17
+ import { LAYER_Z_INDEX } from "../../_shared/layer.constants";
18
+ import { Size } from "../../_shared/sizing";
19
+ import DialogFooter from "../contents/Dialog.footer";
20
+ import DialogHeader from "../contents/Dialog.header";
21
+ import BackgroundWrapper from "../Dialog.background";
22
22
  import type {
23
23
  DialogOutsideOptions,
24
24
  SheetConfig,
25
- } from "@/packages/Frameworks/Dialog/Dialog.types";
25
+ } from "../Dialog.types";
26
26
  import {
27
27
  DialogPortal,
28
28
  useEscapeClose,
29
- } from "@/packages/Frameworks/Dialog/Dialog.utils";
30
- import { useSheetDrag } from "@/packages/Frameworks/Dialog/hooks/useSheetDrag";
31
- import { resolveInitialSnapIndex } from "@/packages/Frameworks/Dialog/hooks/useSheetGeometry";
32
- import { useSheetGeometry } from "@/packages/Frameworks/Dialog/hooks/useSheetGeometry";
33
- import { useSheetProgressive } from "@/packages/Frameworks/Dialog/hooks/useSheetProgressive";
34
- import { motionTransitions } from "@/packages/Frameworks/Motion/Motion.presets";
35
- import Pressable from "@/packages/Frameworks/Pressable/Pressable";
36
- import View from "@/packages/Frameworks/View/View";
29
+ } from "../Dialog.utils";
30
+ import { useSheetDrag } from "../hooks/useSheetDrag";
31
+ import {
32
+ resolveInitialSnapIndex,
33
+ useSheetGeometry,
34
+ } from "../hooks/useSheetGeometry";
35
+ import { useSheetProgressive } from "../hooks/useSheetProgressive";
36
+ import { motionTransitions } from "../../Motion/Motion.presets";
37
+ import Pressable from "../../Pressable/Pressable";
38
+ import View from "../../View/View";
37
39
 
38
40
  interface RenderSheetProps {
39
41
  open: boolean;
@@ -567,5 +569,3 @@ export default function RenderSheet({
567
569
  if (!mounted) return null;
568
570
  return <DialogPortal>{sheetNode}</DialogPortal>;
569
571
  }
570
-
571
-
@@ -1,8 +1,8 @@
1
1
  "use client";
2
2
 
3
3
  import { memo, useMemo } from "react";
4
- import type { EdgeEffectProps } from "@/packages/Frameworks/EdgeEffect/EdgeEffect.types";
5
- import View from "@/packages/Frameworks/View/View";
4
+ import type { EdgeEffectProps } from "./EdgeEffect.types";
5
+ import View from "../View/View";
6
6
 
7
7
  const OPPOSITE_SIDE: Record<
8
8
  "left" | "right" | "top" | "bottom",
@@ -1,4 +1,4 @@
1
- import type { ViewProps } from "@/packages/Frameworks/View/View.types";
1
+ import type { ViewProps } from "../View/View.types";
2
2
 
3
3
  export interface EdgeEffectProps extends Omit<ViewProps, "children"> {
4
4
  side?: "left" | "right" | "top" | "bottom";
@@ -15,21 +15,21 @@ import {
15
15
  useRef,
16
16
  useState,
17
17
  } from "react";
18
- import { resolvePadding } from "@/packages/Frameworks/_shared/Padding.types";
19
- import { Size } from "@/packages/Frameworks/_shared/sizing";
20
- import Dialog from "@/packages/Frameworks/Dialog/Dialog";
21
- import styles from "@/packages/Frameworks/Pressable/Pressable.module.scss";
22
- import type { PressableProps } from "@/packages/Frameworks/Pressable/Pressable.types";
23
- import Squircle from "@/packages/Frameworks/Squircle/Squircle";
24
- import { Radius } from "@/packages/Frameworks/Theme/Radius.types";
18
+ import { resolvePadding } from "../_shared/Padding.types";
19
+ import { Size } from "../_shared/sizing";
20
+ import Dialog from "../Dialog/Dialog";
21
+ import styles from "./Pressable.module.scss";
22
+ import type { PressableProps } from "./Pressable.types";
23
+ import Squircle from "../Squircle/Squircle";
24
+ import { Radius } from "../Theme/Radius.types";
25
25
  import {
26
26
  BackgroundBlur,
27
27
  Border,
28
28
  resolveThemeClasses,
29
29
  resolveThemeHasBorder,
30
30
  Shadow,
31
- } from "@/packages/Frameworks/Theme/Theme.types";
32
- import View from "@/packages/Frameworks/View/View";
31
+ } from "../Theme/Theme.types";
32
+ import View from "../View/View";
33
33
 
34
34
  export const ButtonNestingContext = createContext(false);
35
35
  export const PopoverContext = createContext<{
@@ -505,8 +505,8 @@ const Pressable = forwardRef<HTMLElement, PressableProps>((props, ref) => {
505
505
  themeInteractive,
506
506
  selected: resolvedControlSelected,
507
507
  disabled,
508
- readOnly,
509
- isInteractive: true,
508
+ readOnly,
509
+ isInteractive: true,
510
510
  }),
511
511
  Border(border),
512
512
  className,
@@ -1,17 +1,26 @@
1
1
  import type { MotionProps } from "motion/react";
2
2
  import type { LinkProps } from "next/link";
3
- import type { PaddingProps } from "@/packages/Frameworks/_shared/Padding.types";
4
- import type { WindProps } from "@/packages/Frameworks/_shared/Wind.types";
5
- import type { PopoverConfig } from "@/packages/Frameworks/Dialog/Dialog.types";
6
- import type { RadiusProps } from "@/packages/Frameworks/Theme/Radius.types";
3
+ import type { PaddingProps } from "../_shared/Padding.types";
4
+ import type { WindProps } from "../_shared/Wind.types";
5
+ import type { PopoverConfig } from "../Dialog/Dialog.types";
6
+ import type { RadiusProps } from "../Theme/Radius.types";
7
7
  import type {
8
8
  BorderProps,
9
9
  ThemeSystemProps,
10
- } from "@/packages/Frameworks/Theme/Theme.types";
10
+ } from "../Theme/Theme.types";
11
11
  export interface PressableProps
12
12
  extends Omit<
13
13
  React.HTMLAttributes<HTMLElement>,
14
- "title" | "onClick" | "onChange" | "value" | "checked" | "type" | "disabled" | "tabIndex" | "popover" | "color"
14
+ | "title"
15
+ | "onClick"
16
+ | "onChange"
17
+ | "value"
18
+ | "checked"
19
+ | "type"
20
+ | "disabled"
21
+ | "tabIndex"
22
+ | "popover"
23
+ | "color"
15
24
  >,
16
25
  ThemeSystemProps,
17
26
  BorderProps,
@@ -14,9 +14,9 @@ import {
14
14
  import {
15
15
  getComputedPixelValue,
16
16
  SizePX,
17
- } from "@/packages/Frameworks/_shared/sizing";
18
- import type { SquircleProps } from "@/packages/Frameworks/Squircle/Squircle.types";
19
- import { Radius as resolveRadius } from "@/packages/Frameworks/Theme/Radius.types";
17
+ } from "../_shared/sizing";
18
+ import type { SquircleProps } from "./Squircle.types";
19
+ import { Radius as resolveRadius } from "../Theme/Radius.types";
20
20
 
21
21
  function resolveCornerRadius(
22
22
  radius: SquircleProps["radius"],
@@ -1,6 +1,6 @@
1
1
  import type { MotionProps } from "motion/react";
2
2
  import type { ElementType, HTMLAttributes } from "react";
3
- import type { RadiusValue } from "@/packages/Frameworks/Theme/Radius.types";
3
+ import type { RadiusValue } from "../Theme/Radius.types";
4
4
 
5
5
  export interface SquircleProps
6
6
  extends Omit<HTMLAttributes<HTMLElement>, "color"> {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  Size,
3
3
  type UIKitSizeValue,
4
- } from "@/packages/Frameworks/_shared/sizing";
4
+ } from "../_shared/sizing";
5
5
 
6
- type RadiusScale =
6
+ export type RadiusScale =
7
7
  | "None"
8
8
  | "ExtraLight"
9
9
  | "Light"
@@ -1,14 +1,14 @@
1
1
  "use client";
2
2
 
3
- import Icon from "@/packages/Components/Icon/Icon";
4
- import type { IconProps } from "@/packages/Components/Icon/Icon.types";
5
- import styles from "@/packages/Frameworks/Toaster/Toaster.module.scss";
6
- import type { ToasterBootstrapProps } from "@/packages/Frameworks/Toaster/Toaster.types";
7
3
  import clsx from "clsx";
8
4
  import { Toaster, toast } from "sonner";
5
+ import Icon from "../../Components/Icon/Icon";
6
+ import type { IconProps } from "../../Components/Icon/Icon.types";
7
+ import styles from "./Toaster.module.scss";
8
+ import type { ToasterBootstrapProps } from "./Toaster.types";
9
9
 
10
- export { toast };
11
10
  export type { ToasterBootstrapProps };
11
+ export { toast };
12
12
 
13
13
  const getToastIcon = (color: IconProps["color"]) => (
14
14
  <Icon icon="iCircle" iconFill size={10} color={color} />
@@ -1,5 +1,7 @@
1
1
  import type { ToasterProps } from "sonner";
2
- import type { IconProps } from "@/packages/Components/Icon/Icon.types";
2
+ import type { IconProps } from "../../Components/Icon/Icon.types";
3
+
4
+ export type { ToasterProps };
3
5
 
4
6
  export interface ToasterBootstrapProps extends ToasterProps {
5
7
  "data-color-mode"?: string;
@@ -33,15 +33,15 @@ import {
33
33
  useRef,
34
34
  useState,
35
35
  } from "react";
36
- import Icon from "@/packages/Components/Icon/Icon";
37
- import type { PressableProps } from "@/packages/Frameworks/Pressable/Pressable.types";
38
- import styles from "@/packages/Frameworks/View/DNDView/DNDView.module.scss";
36
+ import Icon from "../../../Components/Icon/Icon";
37
+ import type { PressableProps } from "../../Pressable/Pressable.types";
38
+ import styles from "./DNDView.module.scss";
39
39
  import type {
40
40
  DNDViewItemState,
41
41
  DNDViewProps,
42
42
  DNDViewStrategy,
43
- } from "@/packages/Frameworks/View/DNDView/DNDView.types";
44
- import View from "@/packages/Frameworks/View/View";
43
+ } from "./DNDView.types";
44
+ import View from "../View";
45
45
 
46
46
  const SORTING_STRATEGY: Record<DNDViewStrategy, typeof rectSortingStrategy> = {
47
47
  horizontal: horizontalListSortingStrategy,