@musecat/uikit 0.1.2 → 0.2.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.
- package/.agents/references/Components/Box.md +1 -1
- package/.agents/references/Components/Button.md +1 -1
- package/.agents/references/Components/Card.md +1 -1
- package/.agents/references/Components/Checkbox.md +1 -1
- package/.agents/references/Components/CodeBox.md +1 -1
- package/.agents/references/Components/ContextMenu.md +1 -1
- package/.agents/references/Components/ContributionGraph.md +1 -1
- package/.agents/references/Components/DatePicker.md +1 -1
- package/.agents/references/Components/Divider.md +1 -1
- package/.agents/references/Components/Header.md +3 -3
- package/.agents/references/Components/Icon.md +1 -1
- package/.agents/references/Components/Input.md +1 -1
- package/.agents/references/Components/Label.md +2 -2
- package/.agents/references/Components/Layout.md +2 -2
- package/.agents/references/Components/Maps.md +1 -1
- package/.agents/references/Components/Nav.md +1 -1
- package/.agents/references/Components/Pagination.md +1 -1
- package/.agents/references/Components/Pill.md +1 -1
- package/.agents/references/Components/Profile.md +1 -1
- package/.agents/references/Components/Progress.md +2 -2
- package/.agents/references/Components/Radio.md +2 -2
- package/.agents/references/Components/Select.md +1 -1
- package/.agents/references/Components/Skeleton.md +1 -1
- package/.agents/references/Components/Spinner.md +1 -1
- package/.agents/references/Components/Text.md +1 -1
- package/.agents/references/Components/TimePicker.md +1 -1
- package/.agents/references/Components/Timeline.md +2 -2
- package/.agents/references/Frameworks/DNDView.md +1 -1
- package/.agents/references/Frameworks/Dialog.md +2 -2
- package/.agents/references/Frameworks/EdgeEffect.md +2 -2
- package/.agents/references/Frameworks/HScrollView.md +2 -2
- package/.agents/references/Frameworks/ImageView.md +1 -1
- package/.agents/references/Frameworks/Motion.md +1 -1
- package/.agents/references/Frameworks/Pressable.md +1 -1
- package/.agents/references/Frameworks/Squircle.md +1 -1
- package/.agents/references/Frameworks/Theme.md +1 -1
- package/.agents/references/Frameworks/Toaster.md +2 -2
- package/.agents/references/Frameworks/View.md +1 -1
- package/.agents/references/Frameworks/_shared.md +3 -3
- package/AGENTS.md +54 -0
- package/CLAUDE.md +1 -0
- package/README.md +2 -0
- package/global.d.ts +6 -0
- package/i18n/messages/en/uikit.json +50 -0
- package/i18n/messages/jp/uikit.json +50 -0
- package/i18n/messages/kr/uikit.json +50 -0
- package/i18n/request.ts +17 -0
- package/i18n/shared.ts +54 -0
- package/index.ts +58 -57
- package/package.json +35 -10
- package/packages/Components/Box/Box.tsx +7 -7
- package/packages/Components/Box/Box.types.ts +7 -7
- package/packages/Components/Button/Button.tsx +6 -6
- package/packages/Components/Button/Button.types.ts +6 -6
- package/packages/Components/Card/Card.default.tsx +11 -11
- package/packages/Components/Card/Card.foldable.tsx +14 -14
- package/packages/Components/Card/Card.tsx +3 -3
- package/packages/Components/Card/Card.types.ts +5 -5
- package/packages/Components/Card/Card.utils.ts +1 -1
- package/packages/Components/Checkbox/Checkbox.tsx +6 -6
- package/packages/Components/Checkbox/Checkbox.types.ts +4 -4
- package/packages/Components/CodeBox/CodeBox.copy.tsx +3 -3
- package/packages/Components/CodeBox/CodeBox.tsx +5 -5
- package/packages/Components/CodeBox/CodeBox.types.ts +2 -2
- package/packages/Components/ContextMenu/ContextMenu.options.tsx +6 -6
- package/packages/Components/ContextMenu/ContextMenu.tsx +7 -7
- package/packages/Components/ContextMenu/ContextMenu.types.ts +1 -1
- package/packages/Components/ContributionGraph/ContributionGraph.tsx +6 -6
- package/packages/Components/ContributionGraph/ContributionGraph.types.ts +2 -2
- package/packages/Components/DatePicker/DatePicker.calendar.tsx +6 -6
- package/packages/Components/DatePicker/DatePicker.core.tsx +2 -2
- package/packages/Components/DatePicker/DatePicker.tsx +14 -14
- package/packages/Components/DatePicker/DatePicker.types.ts +1 -1
- package/packages/Components/DatePicker/hooks/useCalendar.ts +1 -1
- package/packages/Components/DatePicker/hooks/useSelection.ts +2 -2
- package/packages/Components/Divider/Divider.tsx +2 -2
- package/packages/Components/Divider/Divider.types.ts +1 -1
- package/packages/Components/Header/Header.tsx +4 -4
- package/packages/Components/Icon/Icon.group.tsx +5 -5
- package/packages/Components/Icon/Icon.group.types.ts +4 -4
- package/packages/Components/Icon/Icon.tsx +8 -8
- package/packages/Components/Icon/Icon.types.ts +7 -7
- package/packages/Components/Input/Input.tsx +5 -5
- package/packages/Components/Input/Input.types.ts +1 -1
- package/packages/Components/Label/Label.tsx +7 -7
- package/packages/Components/Label/Label.types.ts +2 -2
- package/packages/Components/Layout/Layout.docs.tsx +6 -6
- package/packages/Components/Layout/Layout.docs.types.ts +2 -2
- package/packages/Components/Layout/Layout.tsx +7 -7
- package/packages/Components/Layout/Layout.types.ts +4 -4
- package/packages/Components/Maps/OSM/MapOSM.tsx +4 -4
- package/packages/Components/Nav/Nav.tsx +8 -8
- package/packages/Components/Nav/Nav.types.ts +5 -5
- package/packages/Components/Nav/hooks/useNavDrag.ts +1 -1
- package/packages/Components/Pagination/Pagination.tsx +7 -7
- package/packages/Components/Pagination/Pagination.types.ts +1 -1
- package/packages/Components/Pill/Pill.tsx +4 -4
- package/packages/Components/Pill/Pill.types.ts +6 -6
- package/packages/Components/Profile/Profile.shared.ts +3 -3
- package/packages/Components/Profile/Profile.tsx +7 -7
- package/packages/Components/Profile/Profile.types.ts +4 -4
- package/packages/Components/Progress/Progress.tsx +5 -5
- package/packages/Components/Progress/Progress.types.ts +2 -2
- package/packages/Components/Radio/Radio.tsx +5 -5
- package/packages/Components/Radio/Radio.types.ts +4 -4
- package/packages/Components/Select/Select.keyboard.tsx +1 -1
- package/packages/Components/Select/Select.trigger.tsx +3 -3
- package/packages/Components/Select/Select.tsx +2 -2
- package/packages/Components/Select/Select.types.ts +1 -1
- package/packages/Components/Select/Select.utils.ts +1 -1
- package/packages/Components/Select/hooks/useSelectNavigation.ts +5 -5
- package/packages/Components/Select/hooks/useSelectSelection.ts +3 -3
- package/packages/Components/Select/hooks/useSelectState.ts +3 -3
- package/packages/Components/Select/select.control.tsx +8 -8
- package/packages/Components/Select/select.inner.tsx +10 -10
- package/packages/Components/Skeleton/Skeleton.tsx +2 -2
- package/packages/Components/Skeleton/Skeleton.types.ts +2 -2
- package/packages/Components/Spinner/Spinner.tsx +5 -5
- package/packages/Components/Spinner/Spinner.types.ts +2 -2
- package/packages/Components/Text/Text.tsx +3 -3
- package/packages/Components/Text/Text.types.ts +2 -2
- package/packages/Components/TimePicker/TimePicker.core.tsx +4 -4
- package/packages/Components/TimePicker/TimePicker.tsx +7 -7
- package/packages/Components/TimePicker/TimePicker.types.ts +1 -1
- package/packages/Components/Timeline/Timeline.tsx +5 -5
- package/packages/Components/Timeline/Timeline.types.ts +3 -3
- package/packages/Components/Title/Title.tsx +7 -7
- package/packages/Components/Title/Title.types.ts +6 -6
- package/packages/Components/Toggle/Toggle.tsx +9 -9
- package/packages/Components/Toggle/Toggle.types.ts +3 -3
- package/packages/Components/Tooltip/Tooltip.tsx +3 -3
- package/packages/Components/Tooltip/Tooltip.types.ts +2 -2
- package/packages/Frameworks/Dialog/Dialog.background.tsx +4 -4
- package/packages/Frameworks/Dialog/Dialog.boot.tsx +2 -2
- package/packages/Frameworks/Dialog/Dialog.store.ts +1 -1
- package/packages/Frameworks/Dialog/Dialog.tsx +5 -5
- package/packages/Frameworks/Dialog/Dialog.types.ts +4 -4
- package/packages/Frameworks/Dialog/contents/Dialog.footer.tsx +4 -4
- package/packages/Frameworks/Dialog/contents/Dialog.funnel.tsx +6 -6
- package/packages/Frameworks/Dialog/contents/Dialog.header.tsx +6 -6
- package/packages/Frameworks/Dialog/hooks/useDialogPosition.ts +2 -2
- package/packages/Frameworks/Dialog/hooks/useSheetDrag.ts +2 -2
- package/packages/Frameworks/Dialog/hooks/useSheetGeometry.ts +2 -2
- package/packages/Frameworks/Dialog/hooks/useSheetProgressive.ts +1 -1
- package/packages/Frameworks/Dialog/renderers/renderModal.tsx +9 -9
- package/packages/Frameworks/Dialog/renderers/renderPopover.tsx +11 -11
- package/packages/Frameworks/Dialog/renderers/renderSheet.tsx +15 -15
- package/packages/Frameworks/EdgeEffect/EdgeEffect.tsx +2 -2
- package/packages/Frameworks/EdgeEffect/EdgeEffect.types.ts +1 -1
- package/packages/Frameworks/Pressable/Pressable.tsx +9 -9
- package/packages/Frameworks/Pressable/Pressable.types.ts +5 -5
- package/packages/Frameworks/Squircle/Squircle.tsx +3 -3
- package/packages/Frameworks/Squircle/Squircle.types.ts +1 -1
- package/packages/Frameworks/Theme/Radius.types.ts +2 -2
- package/packages/Frameworks/Toaster/Toaster.boot.tsx +4 -4
- package/packages/Frameworks/Toaster/Toaster.types.ts +1 -1
- package/packages/Frameworks/View/DNDView/DNDView.tsx +5 -5
- package/packages/Frameworks/View/DNDView/DNDView.types.ts +2 -2
- package/packages/Frameworks/View/HScrollView/HScrollView.tsx +8 -8
- package/packages/Frameworks/View/HScrollView/HScrollView.types.ts +2 -2
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.counter.tsx +2 -2
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.footer.tsx +4 -4
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.header.tsx +3 -3
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.list.tsx +5 -5
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.slide.tsx +3 -3
- package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.tsx +7 -7
- package/packages/Frameworks/View/ImageView/Image.controls.tsx +1 -1
- package/packages/Frameworks/View/ImageView/Image.tsx +11 -10
- package/packages/Frameworks/View/ImageView/Image.types.ts +2 -2
- package/packages/Frameworks/View/ImageView/Image.utils.ts +1 -1
- package/packages/Frameworks/View/View.tsx +8 -8
- package/packages/Frameworks/View/View.types.ts +5 -5
- package/packages/Frameworks/_shared/Padding.types.ts +1 -1
- package/packages/Frameworks/_shared/StopParentInteraction.tsx +1 -1
- package/packages/Frameworks/_shared/Wind.types.ts +1 -1
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
memo,
|
|
7
7
|
type ReactElement,
|
|
8
8
|
} from "react";
|
|
9
|
-
import styles from "
|
|
10
|
-
import type { ContentItem } from "
|
|
11
|
-
import Icon from "
|
|
12
|
-
import Text from "
|
|
13
|
-
import Pressable from "
|
|
14
|
-
import View from "
|
|
9
|
+
import styles from "./ContextMenu.module.scss";
|
|
10
|
+
import type { ContentItem } from "./ContextMenu.types";
|
|
11
|
+
import Icon from "../Icon/Icon";
|
|
12
|
+
import Text from "../Text/Text";
|
|
13
|
+
import Pressable from "../../Frameworks/Pressable/Pressable";
|
|
14
|
+
import View from "../../Frameworks/View/View";
|
|
15
15
|
|
|
16
16
|
export interface ContextMenuOptionProps {
|
|
17
17
|
item: ContentItem;
|
|
@@ -9,19 +9,19 @@ import {
|
|
|
9
9
|
useRef,
|
|
10
10
|
useState,
|
|
11
11
|
} from "react";
|
|
12
|
-
import { Word } from "
|
|
13
|
-
import ContextMenuOption from "
|
|
12
|
+
import { Word } from "../../../i18n/shared";
|
|
13
|
+
import ContextMenuOption from "./ContextMenu.options";
|
|
14
14
|
import type {
|
|
15
15
|
ContentItem,
|
|
16
16
|
ContextMenuProps,
|
|
17
|
-
} from "
|
|
17
|
+
} from "./ContextMenu.types";
|
|
18
18
|
import {
|
|
19
19
|
handleEndKey,
|
|
20
20
|
handleHomeKey,
|
|
21
|
-
} from "
|
|
22
|
-
import Text from "
|
|
23
|
-
import Dialog from "
|
|
24
|
-
import View from "
|
|
21
|
+
} from "../Select/Select.keyboard";
|
|
22
|
+
import Text from "../Text/Text";
|
|
23
|
+
import Dialog from "../../Frameworks/Dialog/Dialog";
|
|
24
|
+
import View from "../../Frameworks/View/View";
|
|
25
25
|
|
|
26
26
|
const clampScrollTop = (element: HTMLElement, nextScrollTop: number) => {
|
|
27
27
|
const maxScrollTop = Math.max(0, element.scrollHeight - element.clientHeight);
|
|
@@ -13,12 +13,12 @@ import {
|
|
|
13
13
|
useRef,
|
|
14
14
|
useState,
|
|
15
15
|
} from "react";
|
|
16
|
-
import { Word } from "
|
|
17
|
-
import Box from "
|
|
18
|
-
import styles from "
|
|
19
|
-
import type { ContributionGraphProps } from "
|
|
20
|
-
import Text from "
|
|
21
|
-
import View from "
|
|
16
|
+
import { Word } from "../../../i18n/shared";
|
|
17
|
+
import Box from "../Box/Box";
|
|
18
|
+
import styles from "./ContributionGraph.module.scss";
|
|
19
|
+
import type { ContributionGraphProps } from "./ContributionGraph.types";
|
|
20
|
+
import Text from "../Text/Text";
|
|
21
|
+
import View from "../../Frameworks/View/View";
|
|
22
22
|
|
|
23
23
|
const DAY_LABEL_KEYS = [
|
|
24
24
|
"sun",
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { RadiusProps } from "
|
|
1
|
+
import type { RadiusProps } from "../../Frameworks/Theme/Radius.types";
|
|
2
2
|
import type {
|
|
3
3
|
BorderProps,
|
|
4
4
|
ThemeSystemProps,
|
|
5
|
-
} from "
|
|
5
|
+
} from "../../Frameworks/Theme/Theme.types";
|
|
6
6
|
|
|
7
7
|
export interface ContributionActivity {
|
|
8
8
|
date: string | Date;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import styles from "
|
|
3
|
+
import styles from "./DatePicker.module.scss";
|
|
4
4
|
import {
|
|
5
5
|
isDateDisabled,
|
|
6
6
|
isSameDay,
|
|
7
7
|
toYMD,
|
|
8
|
-
} from "
|
|
9
|
-
import Icon from "
|
|
10
|
-
import Text from "
|
|
11
|
-
import Pressable from "
|
|
12
|
-
import View from "
|
|
8
|
+
} from "./DatePicker.utils";
|
|
9
|
+
import Icon from "../Icon/Icon";
|
|
10
|
+
import Text from "../Text/Text";
|
|
11
|
+
import Pressable from "../../Frameworks/Pressable/Pressable";
|
|
12
|
+
import View from "../../Frameworks/View/View";
|
|
13
13
|
|
|
14
14
|
function NavBtn({
|
|
15
15
|
onClick,
|
|
@@ -9,8 +9,8 @@ import {
|
|
|
9
9
|
useMemo,
|
|
10
10
|
useRef,
|
|
11
11
|
} from "react";
|
|
12
|
-
import styles from "
|
|
13
|
-
import Text from "
|
|
12
|
+
import styles from "./DatePicker.module.scss";
|
|
13
|
+
import Text from "../Text/Text";
|
|
14
14
|
|
|
15
15
|
type SingleSegment = "year" | "month" | "day";
|
|
16
16
|
type RangeSegment =
|
|
@@ -7,24 +7,24 @@ import {
|
|
|
7
7
|
useRef,
|
|
8
8
|
useState,
|
|
9
9
|
} from "react";
|
|
10
|
-
import { normalizeLocale } from "
|
|
11
|
-
import { Calendar } from "
|
|
12
|
-
import DatePickerCore from "
|
|
13
|
-
import { useCalendar } from "
|
|
14
|
-
import { useSelection } from "
|
|
15
|
-
import styles from "
|
|
16
|
-
import type { DatePickerProps } from "
|
|
10
|
+
import { normalizeLocale } from "../../../i18n/shared";
|
|
11
|
+
import { Calendar } from "./DatePicker.calendar";
|
|
12
|
+
import DatePickerCore from "./DatePicker.core";
|
|
13
|
+
import { useCalendar } from "./hooks/useCalendar";
|
|
14
|
+
import { useSelection } from "./hooks/useSelection";
|
|
15
|
+
import styles from "./DatePicker.module.scss";
|
|
16
|
+
import type { DatePickerProps } from "./DatePicker.types";
|
|
17
17
|
import {
|
|
18
18
|
isBefore,
|
|
19
19
|
parseDate,
|
|
20
20
|
toYMD,
|
|
21
|
-
} from "
|
|
22
|
-
import Icon from "
|
|
23
|
-
import Label from "
|
|
24
|
-
import Text from "
|
|
25
|
-
import TimePickerCore from "
|
|
26
|
-
import Dialog from "
|
|
27
|
-
import View from "
|
|
21
|
+
} from "./DatePicker.utils";
|
|
22
|
+
import Icon from "../Icon/Icon";
|
|
23
|
+
import Label from "../Label/Label";
|
|
24
|
+
import Text from "../Text/Text";
|
|
25
|
+
import TimePickerCore from "../TimePicker/TimePicker.core";
|
|
26
|
+
import Dialog from "../../Frameworks/Dialog/Dialog";
|
|
27
|
+
import View from "../../Frameworks/View/View";
|
|
28
28
|
|
|
29
29
|
function isValidDate(y: number, m: number, d: number): boolean {
|
|
30
30
|
if (y < 1000 || y > 9999) return false;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useMemo, useState } from "react";
|
|
3
|
-
import { getCalendarDays } from "
|
|
3
|
+
import { getCalendarDays } from "../DatePicker.utils";
|
|
4
4
|
|
|
5
5
|
interface UseCalendarOptions {
|
|
6
6
|
initialYear: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback, useEffect, useMemo, useState } from "react";
|
|
3
|
-
import type { DatePickerMode } from "
|
|
3
|
+
import type { DatePickerMode } from "../DatePicker.types";
|
|
4
4
|
import {
|
|
5
5
|
formatDisplay,
|
|
6
6
|
formatRangeDisplay,
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
isSameDay,
|
|
10
10
|
parseDate,
|
|
11
11
|
toYMD,
|
|
12
|
-
} from "
|
|
12
|
+
} from "../DatePicker.utils";
|
|
13
13
|
|
|
14
14
|
interface UseSelectionOptions {
|
|
15
15
|
mode: DatePickerMode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { DividerProps } from "
|
|
2
|
-
import { Size } from "
|
|
1
|
+
import type { DividerProps } from "./Divider.types";
|
|
2
|
+
import { Size } from "../../Frameworks/_shared/sizing";
|
|
3
3
|
|
|
4
4
|
export default function Divider({
|
|
5
5
|
vertical = false,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
-
import styles from "
|
|
3
|
-
import type { HeaderProps } from "
|
|
4
|
-
import EdgeEffect from "
|
|
5
|
-
import View from "
|
|
2
|
+
import styles from "./Header.module.scss";
|
|
3
|
+
import type { HeaderProps } from "./Header.types";
|
|
4
|
+
import EdgeEffect from "../../Frameworks/EdgeEffect/EdgeEffect";
|
|
5
|
+
import View from "../../Frameworks/View/View";
|
|
6
6
|
|
|
7
7
|
export default function Header({
|
|
8
8
|
"data-color-mode": dataTheme,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { Children } from "react";
|
|
2
|
-
import type { IconGroupProps } from "
|
|
3
|
-
import Icon from "
|
|
4
|
-
import type { IconProps } from "
|
|
2
|
+
import type { IconGroupProps } from "./Icon.group.types";
|
|
3
|
+
import Icon from "./Icon";
|
|
4
|
+
import type { IconProps } from "./Icon.types";
|
|
5
5
|
import {
|
|
6
6
|
Size,
|
|
7
7
|
type UIKitSizeValue,
|
|
8
|
-
} from "
|
|
9
|
-
import View from "
|
|
8
|
+
} from "../../Frameworks/_shared/sizing";
|
|
9
|
+
import View from "../../Frameworks/View/View";
|
|
10
10
|
|
|
11
11
|
const GROUP_PADDING = 2;
|
|
12
12
|
const ICON_PADDING = 6;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { IconProps } from "
|
|
2
|
-
import type { UIKitSizeValue } from "
|
|
3
|
-
import type { RadiusProps } from "
|
|
1
|
+
import type { IconProps } from "./Icon.types";
|
|
2
|
+
import type { UIKitSizeValue } from "../../Frameworks/_shared/sizing";
|
|
3
|
+
import type { RadiusProps } from "../../Frameworks/Theme/Radius.types";
|
|
4
4
|
import type {
|
|
5
5
|
BorderProps,
|
|
6
6
|
ThemeSystemProps,
|
|
7
|
-
} from "
|
|
7
|
+
} from "../../Frameworks/Theme/Theme.types";
|
|
8
8
|
|
|
9
9
|
export interface IconGroupProps extends BorderProps, RadiusProps {
|
|
10
10
|
children?: React.ReactNode;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import Image from "next/image";
|
|
3
|
-
import type { IconProps } from "
|
|
4
|
-
import SVGData from "
|
|
5
|
-
import Spinner from "
|
|
6
|
-
import Text from "
|
|
3
|
+
import type { IconProps } from "./Icon.types";
|
|
4
|
+
import SVGData from "./SVG/data";
|
|
5
|
+
import Spinner from "../Spinner/Spinner";
|
|
6
|
+
import Text from "../Text/Text";
|
|
7
7
|
import {
|
|
8
8
|
normalizeBrandIconClass as _normalizeBrandIconClass,
|
|
9
9
|
normalizeUIKitImageSrc as _normalizeUIKitImageSrc,
|
|
10
|
-
} from "
|
|
11
|
-
import { Size, SizePX } from "
|
|
12
|
-
import Pressable from "
|
|
13
|
-
import View from "
|
|
10
|
+
} from "../../Frameworks/_shared/normalize";
|
|
11
|
+
import { Size, SizePX } from "../../Frameworks/_shared/sizing";
|
|
12
|
+
import Pressable from "../../Frameworks/Pressable/Pressable";
|
|
13
|
+
import View from "../../Frameworks/View/View";
|
|
14
14
|
|
|
15
15
|
const normalizeUIKitImageSrc = _normalizeUIKitImageSrc;
|
|
16
16
|
const normalizeBrandIconClass = _normalizeBrandIconClass;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import type { SpinnerProps } from "
|
|
2
|
-
import type { TextProps } from "
|
|
3
|
-
import type { TitleProps } from "
|
|
4
|
-
import type { UIKitSizeValue } from "
|
|
5
|
-
import type { PressableProps } from "
|
|
6
|
-
import type { RadiusProps } from "
|
|
1
|
+
import type { SpinnerProps } from "../Spinner/Spinner.types";
|
|
2
|
+
import type { TextProps } from "../Text/Text.types";
|
|
3
|
+
import type { TitleProps } from "../Title/Title.types";
|
|
4
|
+
import type { UIKitSizeValue } from "../../Frameworks/_shared/sizing";
|
|
5
|
+
import type { PressableProps } from "../../Frameworks/Pressable/Pressable.types";
|
|
6
|
+
import type { RadiusProps } from "../../Frameworks/Theme/Radius.types";
|
|
7
7
|
import type {
|
|
8
8
|
BorderProps,
|
|
9
9
|
ThemePaint,
|
|
10
10
|
ThemeSystemProps,
|
|
11
|
-
} from "
|
|
11
|
+
} from "../../Frameworks/Theme/Theme.types";
|
|
12
12
|
|
|
13
13
|
type SVGPathPaint = React.SVGProps<SVGPathElement>["fill"];
|
|
14
14
|
type SVGPathStrokeWidth = React.SVGProps<SVGPathElement>["strokeWidth"];
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import { useId } from "react";
|
|
5
|
-
import styles from "
|
|
6
|
-
import type { InputProps } from "
|
|
7
|
-
import Label from "
|
|
8
|
-
import Text from "
|
|
9
|
-
import View from "
|
|
5
|
+
import styles from "./Input.module.scss";
|
|
6
|
+
import type { InputProps } from "./Input.types";
|
|
7
|
+
import Label from "../Label/Label";
|
|
8
|
+
import Text from "../Text/Text";
|
|
9
|
+
import View from "../../Frameworks/View/View";
|
|
10
10
|
|
|
11
11
|
export default function Input({
|
|
12
12
|
type,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
-
import { Word } from "
|
|
3
|
-
import Icon from "
|
|
4
|
-
import styles from "
|
|
5
|
-
import type { LabelProps } from "
|
|
6
|
-
import Text from "
|
|
7
|
-
import Pressable from "
|
|
8
|
-
import View from "
|
|
2
|
+
import { Word } from "../../../i18n/shared";
|
|
3
|
+
import Icon from "../Icon/Icon";
|
|
4
|
+
import styles from "./Label.module.scss";
|
|
5
|
+
import type { LabelProps } from "./Label.types";
|
|
6
|
+
import Text from "../Text/Text";
|
|
7
|
+
import Pressable from "../../Frameworks/Pressable/Pressable";
|
|
8
|
+
import View from "../../Frameworks/View/View";
|
|
9
9
|
|
|
10
10
|
export default function Label({
|
|
11
11
|
children,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { RadiusProps } from "
|
|
1
|
+
import type { RadiusProps } from "../../Frameworks/Theme/Radius.types";
|
|
2
2
|
import type {
|
|
3
3
|
BorderProps,
|
|
4
4
|
ThemeSystemProps,
|
|
5
|
-
} from "
|
|
5
|
+
} from "../../Frameworks/Theme/Theme.types";
|
|
6
6
|
|
|
7
7
|
export interface LabelProps extends ThemeSystemProps, BorderProps, RadiusProps {
|
|
8
8
|
"data-color-mode"?: string;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import Image from "next/image";
|
|
3
|
-
import Icon from "
|
|
4
|
-
import styles from "
|
|
5
|
-
import type { DocsLayoutProps } from "
|
|
6
|
-
import Profile from "
|
|
7
|
-
import Text from "
|
|
8
|
-
import View from "
|
|
3
|
+
import Icon from "../Icon/Icon";
|
|
4
|
+
import styles from "./Layout.docs.module.scss";
|
|
5
|
+
import type { DocsLayoutProps } from "./Layout.docs.types";
|
|
6
|
+
import Profile from "../Profile/Profile";
|
|
7
|
+
import Text from "../Text/Text";
|
|
8
|
+
import View from "../../Frameworks/View/View";
|
|
9
9
|
export default function DocsLayout({
|
|
10
10
|
children,
|
|
11
11
|
image,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ProfileProps } from "
|
|
2
|
-
import type { TextProps } from "
|
|
1
|
+
import type { ProfileProps } from "../Profile/Profile.types";
|
|
2
|
+
import type { TextProps } from "../Text/Text.types";
|
|
3
3
|
|
|
4
4
|
export interface DocsLayoutProps {
|
|
5
5
|
children?: React.ReactNode;
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import Image from "next/image";
|
|
3
3
|
import { Children, isValidElement } from "react";
|
|
4
|
-
import styles from "
|
|
4
|
+
import styles from "./Layout.module.scss";
|
|
5
5
|
import type {
|
|
6
6
|
BackgroundImageValue,
|
|
7
7
|
LayoutGridViewProps,
|
|
8
8
|
LayoutProps,
|
|
9
9
|
LayoutSectionProps,
|
|
10
|
-
} from "
|
|
11
|
-
import Title from "
|
|
12
|
-
import type { TitleProps } from "
|
|
13
|
-
import { normalizeUIKitImageSrc } from "
|
|
10
|
+
} from "./Layout.types";
|
|
11
|
+
import Title from "../Title/Title";
|
|
12
|
+
import type { TitleProps } from "../Title/Title.types";
|
|
13
|
+
import { normalizeUIKitImageSrc } from "../../Frameworks/_shared/normalize";
|
|
14
14
|
import {
|
|
15
15
|
Size,
|
|
16
16
|
type UIKitSizeValue,
|
|
17
|
-
} from "
|
|
18
|
-
import View from "
|
|
17
|
+
} from "../../Frameworks/_shared/sizing";
|
|
18
|
+
import View from "../../Frameworks/View/View";
|
|
19
19
|
|
|
20
20
|
function resolveBgMargin(
|
|
21
21
|
margin: NonNullable<BackgroundImageValue["margin"]>,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { CSSProperties } from "react";
|
|
2
|
-
import type { TextProps } from "
|
|
3
|
-
import type { TitleProps } from "
|
|
4
|
-
import type { UIKitSizeValue } from "
|
|
5
|
-
import type { ViewProps } from "
|
|
2
|
+
import type { TextProps } from "../Text/Text.types";
|
|
3
|
+
import type { TitleProps } from "../Title/Title.types";
|
|
4
|
+
import type { UIKitSizeValue } from "../../Frameworks/_shared/sizing";
|
|
5
|
+
import type { ViewProps } from "../../Frameworks/View/View.types";
|
|
6
6
|
|
|
7
7
|
type BackgroundMarginUnitValue = UIKitSizeValue;
|
|
8
8
|
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
import clsx from "clsx";
|
|
4
4
|
import maplibregl from "maplibre-gl";
|
|
5
|
-
import styles from "
|
|
6
|
-
import { resolveSafeMapStyle } from "
|
|
7
|
-
import type { MapOSMProps } from "
|
|
8
|
-
import View from "
|
|
5
|
+
import styles from "./MapOSM.module.scss";
|
|
6
|
+
import { resolveSafeMapStyle } from "./MapOSM.shared";
|
|
7
|
+
import type { MapOSMProps } from "./MapOSM.types";
|
|
8
|
+
import View from "../../../Frameworks/View/View";
|
|
9
9
|
import "maplibre-gl/dist/maplibre-gl.css";
|
|
10
10
|
import { useCallback, useEffect, useRef } from "react";
|
|
11
11
|
|
|
@@ -5,14 +5,14 @@ import clsx from "clsx";
|
|
|
5
5
|
import { useRouter } from "next/navigation";
|
|
6
6
|
import type React from "react";
|
|
7
7
|
import { useCallback, useEffect, useRef, useState } from "react";
|
|
8
|
-
import Icon from "
|
|
9
|
-
import { useNavDrag } from "
|
|
10
|
-
import { useNavIndicator } from "
|
|
11
|
-
import styles from "
|
|
12
|
-
import type { NavProps } from "
|
|
13
|
-
import Text from "
|
|
14
|
-
import Pressable from "
|
|
15
|
-
import View from "
|
|
8
|
+
import Icon from "../Icon/Icon";
|
|
9
|
+
import { useNavDrag } from "./hooks/useNavDrag";
|
|
10
|
+
import { useNavIndicator } from "./hooks/useNavIndicator";
|
|
11
|
+
import styles from "./Nav.module.scss";
|
|
12
|
+
import type { NavProps } from "./Nav.types";
|
|
13
|
+
import Text from "../Text/Text";
|
|
14
|
+
import Pressable from "../../Frameworks/Pressable/Pressable";
|
|
15
|
+
import View from "../../Frameworks/View/View";
|
|
16
16
|
|
|
17
17
|
export default function Nav({
|
|
18
18
|
name,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { ReactNode } from "react";
|
|
2
|
-
import type { IconProps } from "
|
|
3
|
-
import type { TextProps } from "
|
|
4
|
-
import type { UIKitSizeValue } from "
|
|
5
|
-
import type { PressableProps } from "
|
|
6
|
-
import type { RadiusProps } from "
|
|
2
|
+
import type { IconProps } from "../Icon/Icon.types";
|
|
3
|
+
import type { TextProps } from "../Text/Text.types";
|
|
4
|
+
import type { UIKitSizeValue } from "../../Frameworks/_shared/sizing";
|
|
5
|
+
import type { PressableProps } from "../../Frameworks/Pressable/Pressable.types";
|
|
6
|
+
import type { RadiusProps } from "../../Frameworks/Theme/Radius.types";
|
|
7
7
|
|
|
8
8
|
export interface NavOption extends Omit<PressableProps, "title"> {
|
|
9
9
|
checked?: boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
import { useCallback, useRef } from "react";
|
|
4
|
-
import type { NavProps } from "
|
|
4
|
+
import type { NavProps } from "../Nav.types";
|
|
5
5
|
|
|
6
6
|
const DRAG_SELECTION_TOUCH_ACTIVATION_DISTANCE = 10;
|
|
7
7
|
const DRAG_SELECTION_TOUCH_HORIZONTAL_RATIO = 1.75;
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
import { useTimeout } from "@musecat/functionkit";
|
|
4
4
|
import { useEffect, useState } from "react";
|
|
5
|
-
import { Word } from "
|
|
6
|
-
import Icon from "
|
|
7
|
-
import type { IconProps } from "
|
|
8
|
-
import type { PaginationProps } from "
|
|
9
|
-
import Text from "
|
|
10
|
-
import type { PressableProps } from "
|
|
11
|
-
import View from "
|
|
5
|
+
import { Word } from "../../../i18n/shared";
|
|
6
|
+
import Icon from "../Icon/Icon";
|
|
7
|
+
import type { IconProps } from "../Icon/Icon.types";
|
|
8
|
+
import type { PaginationProps } from "./Pagination.types";
|
|
9
|
+
import Text from "../Text/Text";
|
|
10
|
+
import type { PressableProps } from "../../Frameworks/Pressable/Pressable.types";
|
|
11
|
+
import View from "../../Frameworks/View/View";
|
|
12
12
|
|
|
13
13
|
function clampPage(page: number, total: number) {
|
|
14
14
|
return Math.min(total, Math.max(1, page));
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
|
-
import Icon from "
|
|
3
|
-
import type { PillProps } from "
|
|
4
|
-
import Text from "
|
|
5
|
-
import Pressable from "
|
|
2
|
+
import Icon from "../Icon/Icon";
|
|
3
|
+
import type { PillProps } from "./Pill.types";
|
|
4
|
+
import Text from "../Text/Text";
|
|
5
|
+
import Pressable from "../../Frameworks/Pressable/Pressable";
|
|
6
6
|
|
|
7
7
|
export function Pill({
|
|
8
8
|
themePreset,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import type { IconProps } from "
|
|
2
|
-
import type { TextProps } from "
|
|
3
|
-
import type { UIKitSizeValue } from "
|
|
4
|
-
import type { PressableProps } from "
|
|
5
|
-
import type { RadiusProps } from "
|
|
1
|
+
import type { IconProps } from "../Icon/Icon.types";
|
|
2
|
+
import type { TextProps } from "../Text/Text.types";
|
|
3
|
+
import type { UIKitSizeValue } from "../../Frameworks/_shared/sizing";
|
|
4
|
+
import type { PressableProps } from "../../Frameworks/Pressable/Pressable.types";
|
|
5
|
+
import type { RadiusProps } from "../../Frameworks/Theme/Radius.types";
|
|
6
6
|
import type {
|
|
7
7
|
BorderProps,
|
|
8
8
|
ThemeSystemProps,
|
|
9
|
-
} from "
|
|
9
|
+
} from "../../Frameworks/Theme/Theme.types";
|
|
10
10
|
|
|
11
11
|
export interface PillProps extends ThemeSystemProps, RadiusProps, BorderProps {
|
|
12
12
|
"data-color-mode"?: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { IconProps } from "
|
|
2
|
-
import type { ProfileAvatarOptions } from "
|
|
1
|
+
import type { IconProps } from "../Icon/Icon.types";
|
|
2
|
+
import type { ProfileAvatarOptions } from "./Profile.types";
|
|
3
3
|
import {
|
|
4
4
|
Size,
|
|
5
5
|
type UIKitSizeValue,
|
|
6
|
-
} from "
|
|
6
|
+
} from "../../Frameworks/_shared/sizing";
|
|
7
7
|
|
|
8
8
|
const resolveFallbackAvatarIconSize = (
|
|
9
9
|
outerSize: UIKitSizeValue,
|