@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.
- 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/README.md +25 -1
- 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 +86 -66
- package/package.json +33 -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 +13 -11
- package/packages/Components/Card/Card.foldable.tsx +16 -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 +6 -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 +8 -7
- package/packages/Components/ContextMenu/ContextMenu.types.ts +1 -1
- package/packages/Components/ContributionGraph/ContributionGraph.tsx +18 -9
- 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 +48 -27
- 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 +8 -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 +7 -10
- 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 +15 -24
- 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 +6 -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 +4 -2
- package/packages/Frameworks/Dialog/hooks/useSheetGeometry.ts +5 -3
- package/packages/Frameworks/Dialog/hooks/useSheetProgressive.ts +2 -2
- 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 +17 -17
- package/packages/Frameworks/EdgeEffect/EdgeEffect.tsx +2 -2
- package/packages/Frameworks/EdgeEffect/EdgeEffect.types.ts +1 -1
- package/packages/Frameworks/Pressable/Pressable.tsx +11 -11
- package/packages/Frameworks/Pressable/Pressable.types.ts +15 -6
- 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 +5 -5
- package/packages/Frameworks/Toaster/Toaster.types.ts +3 -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 +8 -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 +44 -27
- package/packages/Frameworks/View/ImageView/Image.types.ts +2 -2
- package/packages/Frameworks/View/ImageView/Image.utils.ts +2 -2
- package/packages/Frameworks/View/View.tsx +8 -8
- package/packages/Frameworks/View/View.types.ts +5 -5
- package/packages/Frameworks/_shared/Padding.types.ts +2 -4
- 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);
|
|
@@ -357,6 +357,7 @@ export default function ContextMenu(props: ContextMenuProps): ReactElement {
|
|
|
357
357
|
) : (
|
|
358
358
|
contents.map((item, index) => (
|
|
359
359
|
<ContextMenuOption
|
|
360
|
+
// biome-ignore lint/suspicious/noArrayIndexKey: items have stable order
|
|
360
361
|
key={`${item.value}-${index}`}
|
|
361
362
|
item={item}
|
|
362
363
|
index={index}
|
|
@@ -6,19 +6,18 @@ import {
|
|
|
6
6
|
getUtcWeekdayIndex,
|
|
7
7
|
parseUtcDateInput,
|
|
8
8
|
} from "@musecat/functionkit";
|
|
9
|
-
import clsx from "clsx";
|
|
10
9
|
import {
|
|
11
10
|
type PointerEvent as ReactPointerEvent,
|
|
12
11
|
useMemo,
|
|
13
12
|
useRef,
|
|
14
13
|
useState,
|
|
15
14
|
} 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 "
|
|
15
|
+
import { Word } from "../../../i18n/shared";
|
|
16
|
+
import Box from "../Box/Box";
|
|
17
|
+
import styles from "./ContributionGraph.module.scss";
|
|
18
|
+
import type { ContributionGraphProps } from "./ContributionGraph.types";
|
|
19
|
+
import Text from "../Text/Text";
|
|
20
|
+
import View from "../../Frameworks/View/View";
|
|
22
21
|
|
|
23
22
|
const DAY_LABEL_KEYS = [
|
|
24
23
|
"sun",
|
|
@@ -95,7 +94,13 @@ function GraphCell({
|
|
|
95
94
|
className={styles.Cell}
|
|
96
95
|
data-level={level}
|
|
97
96
|
data-in-range={inRange ? "true" : "false"}
|
|
98
|
-
title={buildCellTitle({
|
|
97
|
+
title={buildCellTitle({
|
|
98
|
+
date,
|
|
99
|
+
total_count,
|
|
100
|
+
changelog_count,
|
|
101
|
+
flag_count,
|
|
102
|
+
legacy_ticket_count,
|
|
103
|
+
})}
|
|
99
104
|
style={{
|
|
100
105
|
gridColumn: `${weekIndex + 1}`,
|
|
101
106
|
gridRow: `${dayIndex + 1}`,
|
|
@@ -387,7 +392,11 @@ export default function ContributionGraph({
|
|
|
387
392
|
style={{ position: "relative", marginLeft: "3.6rem" }}
|
|
388
393
|
>
|
|
389
394
|
{graphData.months.map((m) => (
|
|
390
|
-
<MonthLabel
|
|
395
|
+
<MonthLabel
|
|
396
|
+
key={`${m.title}-${m.colIndex}`}
|
|
397
|
+
title={m.title}
|
|
398
|
+
colIndex={m.colIndex}
|
|
399
|
+
/>
|
|
391
400
|
))}
|
|
392
401
|
</View>
|
|
393
402
|
|
|
@@ -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,28 @@ import {
|
|
|
7
7
|
useRef,
|
|
8
8
|
useState,
|
|
9
9
|
} from "react";
|
|
10
|
-
import { normalizeLocale } from "
|
|
11
|
-
import { Calendar } from "
|
|
12
|
-
import DatePickerCore
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
import styles from "
|
|
16
|
-
import type { DatePickerProps } from "
|
|
10
|
+
import { normalizeLocale } from "../../../i18n/shared";
|
|
11
|
+
import { Calendar } from "./DatePicker.calendar";
|
|
12
|
+
import DatePickerCore, {
|
|
13
|
+
type DatePickerCoreRef,
|
|
14
|
+
} from "./DatePicker.core";
|
|
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
|
|
23
|
-
import
|
|
24
|
-
import
|
|
25
|
-
import
|
|
26
|
-
import
|
|
27
|
-
import
|
|
21
|
+
} from "./DatePicker.utils";
|
|
22
|
+
import { useCalendar } from "./hooks/useCalendar";
|
|
23
|
+
import { useSelection } from "./hooks/useSelection";
|
|
24
|
+
import Icon from "../Icon/Icon";
|
|
25
|
+
import Label from "../Label/Label";
|
|
26
|
+
import Text from "../Text/Text";
|
|
27
|
+
import TimePickerCore, {
|
|
28
|
+
type TimePickerCoreRef,
|
|
29
|
+
} from "../TimePicker/TimePicker.core";
|
|
30
|
+
import Dialog from "../../Frameworks/Dialog/Dialog";
|
|
31
|
+
import View from "../../Frameworks/View/View";
|
|
28
32
|
|
|
29
33
|
function isValidDate(y: number, m: number, d: number): boolean {
|
|
30
34
|
if (y < 1000 || y > 9999) return false;
|
|
@@ -333,9 +337,18 @@ export default function DatePicker({
|
|
|
333
337
|
isValidDate(ey, em, ed) &&
|
|
334
338
|
(!showTime || (eh !== null && emin !== null));
|
|
335
339
|
|
|
336
|
-
if (
|
|
337
|
-
|
|
338
|
-
|
|
340
|
+
if (
|
|
341
|
+
isStartValid &&
|
|
342
|
+
isEndValid &&
|
|
343
|
+
sy !== null &&
|
|
344
|
+
sm !== null &&
|
|
345
|
+
sd !== null &&
|
|
346
|
+
ey !== null &&
|
|
347
|
+
em !== null &&
|
|
348
|
+
ed !== null
|
|
349
|
+
) {
|
|
350
|
+
let start = new Date(sy, sm - 1, sd, sh ?? 0, smin ?? 0);
|
|
351
|
+
let end = new Date(ey, em - 1, ed, eh ?? 0, emin ?? 0);
|
|
339
352
|
if (isBefore(end, start)) {
|
|
340
353
|
[start, end] = [end, start];
|
|
341
354
|
}
|
|
@@ -344,8 +357,16 @@ export default function DatePicker({
|
|
|
344
357
|
setRangeEnd(end);
|
|
345
358
|
}
|
|
346
359
|
onRangeChange?.(toYMD(start, showTime), toYMD(end, showTime));
|
|
347
|
-
} else if (
|
|
348
|
-
|
|
360
|
+
} else if (
|
|
361
|
+
isStartValid &&
|
|
362
|
+
sy !== null &&
|
|
363
|
+
sm !== null &&
|
|
364
|
+
sd !== null &&
|
|
365
|
+
ey === null &&
|
|
366
|
+
em === null &&
|
|
367
|
+
ed === null
|
|
368
|
+
) {
|
|
369
|
+
const start = new Date(sy, sm - 1, sd, sh ?? 0, smin ?? 0);
|
|
349
370
|
if (!isControlled) {
|
|
350
371
|
setRangeStart(start);
|
|
351
372
|
setRangeEnd(null);
|
|
@@ -357,7 +378,7 @@ export default function DatePicker({
|
|
|
357
378
|
);
|
|
358
379
|
|
|
359
380
|
const handleDateChange = useCallback(
|
|
360
|
-
(seg:
|
|
381
|
+
(seg: string, val: number | null) => {
|
|
361
382
|
const setter = (() => {
|
|
362
383
|
switch (seg) {
|
|
363
384
|
case "year":
|
|
@@ -382,7 +403,7 @@ export default function DatePicker({
|
|
|
382
403
|
return null;
|
|
383
404
|
}
|
|
384
405
|
})();
|
|
385
|
-
if (setter) setter(val
|
|
406
|
+
if (setter) setter(val);
|
|
386
407
|
|
|
387
408
|
if (mode === "single") {
|
|
388
409
|
emitSingle(
|
|
@@ -507,12 +528,12 @@ export default function DatePicker({
|
|
|
507
528
|
],
|
|
508
529
|
);
|
|
509
530
|
|
|
510
|
-
const singleDateRef = useRef<
|
|
511
|
-
const singleTimeRef = useRef<
|
|
512
|
-
const startDateRef = useRef<
|
|
513
|
-
const startTimeRef = useRef<
|
|
514
|
-
const endDateRef = useRef<
|
|
515
|
-
const endTimeRef = useRef<
|
|
531
|
+
const singleDateRef = useRef<DatePickerCoreRef | null>(null);
|
|
532
|
+
const singleTimeRef = useRef<TimePickerCoreRef | null>(null);
|
|
533
|
+
const startDateRef = useRef<DatePickerCoreRef | null>(null);
|
|
534
|
+
const startTimeRef = useRef<TimePickerCoreRef | null>(null);
|
|
535
|
+
const endDateRef = useRef<DatePickerCoreRef | null>(null);
|
|
536
|
+
const endTimeRef = useRef<TimePickerCoreRef | null>(null);
|
|
516
537
|
|
|
517
538
|
useEffect(() => {
|
|
518
539
|
if (!isControlled) return;
|
|
@@ -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
|
|
3
|
-
import
|
|
4
|
-
import type { IconProps } from "
|
|
2
|
+
import Icon from "./Icon";
|
|
3
|
+
import type { IconGroupProps } from "./Icon.group.types";
|
|
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;
|