@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
|
@@ -33,7 +33,7 @@ interface ButtonProps extends ThemeSystemProps, RadiusProps, BorderProps {
|
|
|
33
33
|
## Example Code
|
|
34
34
|
|
|
35
35
|
```tsx
|
|
36
|
-
import Button from "
|
|
36
|
+
import { Button } from "@musecat/uikit";
|
|
37
37
|
|
|
38
38
|
export default function Example() {
|
|
39
39
|
return (
|
|
@@ -22,7 +22,7 @@ interface CodeBoxProps extends ThemeSystemProps, RadiusProps, BorderProps {
|
|
|
22
22
|
## Example Code
|
|
23
23
|
|
|
24
24
|
```tsx
|
|
25
|
-
import CodeBox from "
|
|
25
|
+
import { CodeBox } from "@musecat/uikit";
|
|
26
26
|
|
|
27
27
|
export default function Example() {
|
|
28
28
|
const sampleCode = `const hello = 'world';\nconsole.log(hello);`;
|
|
@@ -40,7 +40,7 @@ interface ContextMenuProps {
|
|
|
40
40
|
## Example Code
|
|
41
41
|
|
|
42
42
|
```tsx
|
|
43
|
-
import ContextMenu from "
|
|
43
|
+
import { ContextMenu } from "@musecat/uikit";
|
|
44
44
|
import { useRef, useState } from "react";
|
|
45
45
|
|
|
46
46
|
export default function Example() {
|
|
@@ -39,7 +39,7 @@ export interface ContributionGraphProps
|
|
|
39
39
|
## 4. Example Code
|
|
40
40
|
|
|
41
41
|
```tsx
|
|
42
|
-
import ContributionGraph from "
|
|
42
|
+
import { ContributionGraph } from "@musecat/uikit";
|
|
43
43
|
|
|
44
44
|
export default function Example() {
|
|
45
45
|
const data = [
|
|
@@ -27,9 +27,9 @@ export interface HeaderProps {
|
|
|
27
27
|
## 4. Example Code
|
|
28
28
|
|
|
29
29
|
```tsx
|
|
30
|
-
import Header from "
|
|
31
|
-
import Icon from "
|
|
32
|
-
import Text from "
|
|
30
|
+
import { Header } from "@musecat/uikit";
|
|
31
|
+
import { Icon } from "@musecat/uikit";
|
|
32
|
+
import { Text } from "@musecat/uikit";
|
|
33
33
|
|
|
34
34
|
export default function Example() {
|
|
35
35
|
return (
|
|
@@ -54,7 +54,7 @@ export interface IconProps extends ThemeSystemProps, RadiusProps, BorderProps {
|
|
|
54
54
|
## 4. Example Code
|
|
55
55
|
|
|
56
56
|
```tsx
|
|
57
|
-
import Icon from "
|
|
57
|
+
import { Icon } from "@musecat/uikit";
|
|
58
58
|
|
|
59
59
|
export default function Example() {
|
|
60
60
|
return (
|
|
@@ -36,7 +36,7 @@ _(LabelSharedProps includes `title`, `required`, `hint`, ThemeSystemProps, etc.)
|
|
|
36
36
|
## 4. Example Code
|
|
37
37
|
|
|
38
38
|
```tsx
|
|
39
|
-
import Input from "
|
|
39
|
+
import { Input } from "@musecat/uikit";
|
|
40
40
|
|
|
41
41
|
export default function Example() {
|
|
42
42
|
return (
|
|
@@ -55,8 +55,8 @@ export type LabelSharedProps = Omit<
|
|
|
55
55
|
## 4. Example Code
|
|
56
56
|
|
|
57
57
|
```tsx
|
|
58
|
-
import Label from "
|
|
59
|
-
import Checkbox from "
|
|
58
|
+
import { Label } from "@musecat/uikit";
|
|
59
|
+
import { Checkbox } from "@musecat/uikit"; // virtual import
|
|
60
60
|
|
|
61
61
|
export default function Example() {
|
|
62
62
|
return (
|
|
@@ -63,8 +63,8 @@ export interface DocsLayoutProps {
|
|
|
63
63
|
## Example Code
|
|
64
64
|
|
|
65
65
|
```tsx
|
|
66
|
-
import Layout from "
|
|
67
|
-
import DocsLayout from "
|
|
66
|
+
import { Layout } from "@musecat/uikit";
|
|
67
|
+
import { DocsLayout } from "@musecat/uikit";
|
|
68
68
|
|
|
69
69
|
// Basic layout and section split
|
|
70
70
|
export function MyPage() {
|
|
@@ -40,7 +40,7 @@ export interface PaginationProps extends ThemeSystemProps, BorderProps {
|
|
|
40
40
|
## Example Code
|
|
41
41
|
|
|
42
42
|
```tsx
|
|
43
|
-
import Pagination from "
|
|
43
|
+
import { Pagination } from "@musecat/uikit";
|
|
44
44
|
import { useState } from "react";
|
|
45
45
|
|
|
46
46
|
export function DataList() {
|
|
@@ -14,7 +14,7 @@ A linear progress bar component that visualizes task progress as a percentage. I
|
|
|
14
14
|
|
|
15
15
|
```tsx
|
|
16
16
|
// Progress.types.ts
|
|
17
|
-
import { RadiusProps } from "
|
|
17
|
+
import { RadiusProps } from "@musecat/uikit";
|
|
18
18
|
import type {
|
|
19
19
|
ThemeBackgroundPaint,
|
|
20
20
|
ThemePaint,
|
|
@@ -38,7 +38,7 @@ export interface ProgressProps extends RadiusProps {
|
|
|
38
38
|
## Example Code
|
|
39
39
|
|
|
40
40
|
```tsx
|
|
41
|
-
import Progress from "
|
|
41
|
+
import { Progress } from "@musecat/uikit";
|
|
42
42
|
|
|
43
43
|
export function FileUploadStatus({
|
|
44
44
|
progressPercentage,
|
|
@@ -13,7 +13,7 @@ The `Radio` component provides a radio button UI that lets the user select a sin
|
|
|
13
13
|
## Type Signatures
|
|
14
14
|
|
|
15
15
|
```typescript
|
|
16
|
-
import type { RadiusProps } from "
|
|
16
|
+
import type { RadiusProps } from "@musecat/uikit";
|
|
17
17
|
import type { UIKitSizeValue } from "../../Frameworks/_shared/sizing";
|
|
18
18
|
import type {
|
|
19
19
|
BorderProps,
|
|
@@ -39,7 +39,7 @@ export interface RadioProps
|
|
|
39
39
|
## Example Code
|
|
40
40
|
|
|
41
41
|
```tsx
|
|
42
|
-
import Radio from "
|
|
42
|
+
import { Radio } from "@musecat/uikit";
|
|
43
43
|
import { useState } from "react";
|
|
44
44
|
|
|
45
45
|
export default function RadioExample() {
|
|
@@ -41,7 +41,7 @@ export interface TimePickerProps {
|
|
|
41
41
|
## Example Code
|
|
42
42
|
|
|
43
43
|
```tsx
|
|
44
|
-
import TimePicker from "
|
|
44
|
+
import { TimePicker } from "@musecat/uikit";
|
|
45
45
|
import { useState } from "react";
|
|
46
46
|
|
|
47
47
|
export default function TimePickerExample() {
|
|
@@ -41,8 +41,8 @@ export interface TimelineProps {
|
|
|
41
41
|
## Example Code
|
|
42
42
|
|
|
43
43
|
```tsx
|
|
44
|
-
import Timeline from "
|
|
45
|
-
import Text from "
|
|
44
|
+
import { Timeline } from "@musecat/uikit";
|
|
45
|
+
import { Text } from "@musecat/uikit";
|
|
46
46
|
|
|
47
47
|
export default function TimelineExample() {
|
|
48
48
|
const events = [
|
|
@@ -63,8 +63,8 @@ dialog.popover = (anchor: HTMLElement, props: Omit<DialogProps, "mode">) =>
|
|
|
63
63
|
## Example Code
|
|
64
64
|
|
|
65
65
|
```tsx
|
|
66
|
-
import Dialog,
|
|
67
|
-
import Pressable from "
|
|
66
|
+
import { Dialog, dialog } from "@musecat/uikit";
|
|
67
|
+
import { Pressable } from "@musecat/uikit";
|
|
68
68
|
import { useState } from "react";
|
|
69
69
|
|
|
70
70
|
function Example() {
|
|
@@ -23,8 +23,8 @@ export interface EdgeEffectProps extends Omit<ViewProps, "children"> {
|
|
|
23
23
|
## Example Code
|
|
24
24
|
|
|
25
25
|
```tsx
|
|
26
|
-
import EdgeEffect from "
|
|
27
|
-
import View from "
|
|
26
|
+
import { EdgeEffect } from "@musecat/uikit";
|
|
27
|
+
import { View } from "@musecat/uikit";
|
|
28
28
|
|
|
29
29
|
function ScrollContainer() {
|
|
30
30
|
return (
|
|
@@ -47,8 +47,8 @@ export interface HScrollViewProps extends Omit<
|
|
|
47
47
|
## Example Code
|
|
48
48
|
|
|
49
49
|
```tsx
|
|
50
|
-
import HScrollView from "
|
|
51
|
-
import View from "
|
|
50
|
+
import { HScrollView } from "@musecat/uikit";
|
|
51
|
+
import { View } from "@musecat/uikit";
|
|
52
52
|
|
|
53
53
|
function HorizontalList() {
|
|
54
54
|
return (
|
|
@@ -37,7 +37,7 @@ export const motionPresets = {
|
|
|
37
37
|
|
|
38
38
|
```tsx
|
|
39
39
|
import { motion } from "motion/react";
|
|
40
|
-
import { motionPresets } from "
|
|
40
|
+
import { motionPresets } from "@musecat/uikit";
|
|
41
41
|
|
|
42
42
|
function AnimatedModal({ isOpen, children }) {
|
|
43
43
|
return (
|
|
@@ -34,7 +34,7 @@ export interface ToasterBootstrapProps extends ToasterProps {
|
|
|
34
34
|
|
|
35
35
|
```tsx
|
|
36
36
|
// 1. Render at the top level (App component, etc.)
|
|
37
|
-
import ToasterBootstrap from "
|
|
37
|
+
import { ToasterBootstrap } from "@musecat/uikit";
|
|
38
38
|
|
|
39
39
|
export default function App() {
|
|
40
40
|
return (
|
|
@@ -46,7 +46,7 @@ export default function App() {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
// 2. Show toast
|
|
49
|
-
import { toast } from "
|
|
49
|
+
import { toast } from "@musecat/uikit";
|
|
50
50
|
|
|
51
51
|
function MyComponents() {
|
|
52
52
|
const handleSuccess = () => {
|
|
@@ -51,9 +51,9 @@ export function useScrollLock(locked?: boolean): { lockScroll: () => void, openS
|
|
|
51
51
|
## Example Code
|
|
52
52
|
|
|
53
53
|
```tsx
|
|
54
|
-
import { Size } from "
|
|
55
|
-
import { useScrollLock } from "
|
|
56
|
-
import { useControllableState } from "
|
|
54
|
+
import { Size } from "@musecat/uikit";
|
|
55
|
+
import { useScrollLock } from "@musecat/uikit";
|
|
56
|
+
import { useControllableState } from "@musecat/uikit";
|
|
57
57
|
|
|
58
58
|
function MyComponent({ value, defaultValue, width }) {
|
|
59
59
|
// Scroll lock
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
You are a concise coding assistant.
|
|
2
|
+
|
|
3
|
+
## Stack
|
|
4
|
+
|
|
5
|
+
- Primary stack: Next.js 16 + TypeScript.
|
|
6
|
+
|
|
7
|
+
## Documentation References
|
|
8
|
+
|
|
9
|
+
- Before using or modifying any component, framework, or style, you MUST read the corresponding documentation in `.agents/references/`.
|
|
10
|
+
- **Documentation MUST Be Updated Immediately:** Every time you add, modify, or remove a component, framework, style, or any exported API/type, you MUST update the corresponding `.agents/references/` doc in the **same batch of tool calls** — not later, not after tests, not when asked. You must check what changed and update refs before moving to the next task.
|
|
11
|
+
- If references have drifted from the actual code due to manual changes, analyze the source code and git history to align them.
|
|
12
|
+
- **README Maintenance:** If you add, remove, or modify external package dependencies, you MUST update the Acknowledgements section in `README.md`.
|
|
13
|
+
- **README Examples:** If the usage logic or APIs of core layout components (`View`, `Pressable`, `ImageView`) change, you MUST update the example code block in `README.md` to reflect those changes.
|
|
14
|
+
|
|
15
|
+
## Test Failure Resolution
|
|
16
|
+
|
|
17
|
+
When a test fails, do not blindly patch it to turn green. Reason about intent:
|
|
18
|
+
1. Understand the component's design contract — what it should do vs. what it actually does.
|
|
19
|
+
2. If the test correctly captures the intended behavior and the code violates it, fix the code.
|
|
20
|
+
3. If the code correctly implements the intended behavior and the test reflects outdated assumptions, fix the test.
|
|
21
|
+
4. If neither is clearly right, treat the component's source as the source of truth and align the test to match, unless you have explicit user instruction to change the behavior.
|
|
22
|
+
|
|
23
|
+
## Design Token Enforcement
|
|
24
|
+
|
|
25
|
+
- Theme design tokens (Radius, Color, Spacing, etc.) MUST be used at all times. Hardcoding raw pixel values, inline colors, or any literal style values instead of using the token system is strictly prohibited.
|
|
26
|
+
|
|
27
|
+
## Theme & Token System Guidelines
|
|
28
|
+
|
|
29
|
+
1. **Radius Scale Usage**
|
|
30
|
+
- Use standard tokens: `None`, `Light`, `Regular`, `Bold`, `ExtraBold`, `Heavy`, `Circle`.
|
|
31
|
+
- Explicit `cornerRadius` or directional radius arrays are supported.
|
|
32
|
+
- Centralized `RADIUS_TOKEN` mapping via `RadiusValue()` must be used.
|
|
33
|
+
|
|
34
|
+
2. **Color & Paint Tokens**
|
|
35
|
+
- Palette colors must use the JSON expansion/SCSS mapping (e.g. `Red1TP3`, `BaseLight3`).
|
|
36
|
+
- Background props support state-specific mappings: `[idle, hover, active]`.
|
|
37
|
+
- Border props support paint tokens, width-only fallback (`Base1TP1`), and directional width arrays.
|
|
38
|
+
- Use `UISecondary` / `ReversedUISecondary` presets for default interactive element states (e.g., checked, selected).
|
|
39
|
+
|
|
40
|
+
3. **Core Component Selection**
|
|
41
|
+
- Do not use raw HTML elements (`div`, `button`, `a`, `Link`) when custom layout blocks are available. `View` and `Pressable` are foundational primitives replacing these elements.
|
|
42
|
+
- Use `View` for structural layout. It dynamically resolves theme props, handles disabling/readonly state forwarding, and automatically applies `Squircle` clips when `radius` is present.
|
|
43
|
+
- Use `Pressable` for interactive elements. It renders polymorphic wrappers (button, a, Link, label) with proper radius resolution.
|
|
44
|
+
- **Layout & Sizing Defaults:** `View` and `Pressable` inherently use `display: flex` and support layout props like `gap`, `width`, and `height`.
|
|
45
|
+
- Numeric values for sizing/spacing props are automatically converted to `rem` values.
|
|
46
|
+
- For responsive or bounded sizing, use `min`, `max`, and `clamp` functions on `width` and `height` props.
|
|
47
|
+
- Avoid redundant inline styles or unnecessary utility classes by leveraging these built-in properties.
|
|
48
|
+
- Package is published as `@musecat/uikit` on GitHub Packages. The root `index.ts` is the single entry point.
|
|
49
|
+
- **No internal barrels:** Directories must NOT contain `index.ts` re-exports. Always import from the definitive source file. The single exception is the root `index.ts` (npm package entry).
|
|
50
|
+
- **Type Referencing & Image:** Both components support various other props. You MUST refer to the TypeScript definitions of `View` and `Pressable` to check available attributes. For rendering images, use the custom `ImageView` component instead of the native `img` element.
|
|
51
|
+
|
|
52
|
+
4. **Squircle & Motion Integration**
|
|
53
|
+
- `Squircle` renders SVG clip paths dynamically using `figma-squircle`.
|
|
54
|
+
- Avoid passing raw animate objects containing width/height directly to Framer Motion on Squircle elements to prevent base-style clip-path reset bugs. Use imperative controls (`useAnimationControls`) or animate wrapping wrappers instead.
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@AGENTS.md
|
package/README.md
CHANGED
|
@@ -50,6 +50,8 @@ This package includes `.agents/references/` directory with detailed documentatio
|
|
|
50
50
|
- [es-hangul](https://es-hangul.toss.im/)
|
|
51
51
|
- [MapLibre GL JS](https://maplibre.org/)
|
|
52
52
|
|
|
53
|
+
Built with [tsup](https://tsup.egoist.dev/) and [TypeScript](https://www.typescriptlang.org/).
|
|
54
|
+
|
|
53
55
|
## License
|
|
54
56
|
|
|
55
57
|
[MIT License](./LICENSE) © Musecat Team.
|
package/global.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"UIKit": {
|
|
3
|
+
"presets": {
|
|
4
|
+
"alert": {
|
|
5
|
+
"title": "Heads up.",
|
|
6
|
+
"caption": "Review the information and continue.",
|
|
7
|
+
"confirm": "Confirm"
|
|
8
|
+
},
|
|
9
|
+
"confirm": {
|
|
10
|
+
"title": "Confirmation required.",
|
|
11
|
+
"caption": "Review the details and choose how to proceed.",
|
|
12
|
+
"confirm": "Continue",
|
|
13
|
+
"cancel": "Cancel"
|
|
14
|
+
},
|
|
15
|
+
"error": {
|
|
16
|
+
"title": "Something went wrong.",
|
|
17
|
+
"caption": "Please try again in a moment.",
|
|
18
|
+
"confirm": "Confirm"
|
|
19
|
+
},
|
|
20
|
+
"success": {
|
|
21
|
+
"title": "Completed.",
|
|
22
|
+
"caption": "Your request was completed successfully.",
|
|
23
|
+
"confirm": "Confirm"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"actions": {
|
|
27
|
+
"cancel": "Cancel",
|
|
28
|
+
"close": "Close",
|
|
29
|
+
"confirm": "Confirm",
|
|
30
|
+
"submit": "Submit",
|
|
31
|
+
"submitting": "Processing...",
|
|
32
|
+
"required": "Required"
|
|
33
|
+
},
|
|
34
|
+
"ui": {
|
|
35
|
+
"select": "Select",
|
|
36
|
+
"noResults": "No results",
|
|
37
|
+
"imageGallery": "Image gallery",
|
|
38
|
+
"dateSelect": "Select date",
|
|
39
|
+
"dateRangeSelect": "Select date range",
|
|
40
|
+
"pagination": "Pagination",
|
|
41
|
+
"previous": "Previous",
|
|
42
|
+
"next": "Next",
|
|
43
|
+
"goToPage": "Go to page",
|
|
44
|
+
"currentPage": "Current page {value}",
|
|
45
|
+
"goToPageItem": "Go to page {value}",
|
|
46
|
+
"less": "Less",
|
|
47
|
+
"more": "More"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"UIKit": {
|
|
3
|
+
"presets": {
|
|
4
|
+
"alert": {
|
|
5
|
+
"title": "ご案内します。",
|
|
6
|
+
"caption": "内容を確認してから続行してください。",
|
|
7
|
+
"confirm": "確認"
|
|
8
|
+
},
|
|
9
|
+
"confirm": {
|
|
10
|
+
"title": "確認が必要です。",
|
|
11
|
+
"caption": "内容を確認して、進行するかどうか選択してください。",
|
|
12
|
+
"confirm": "続ける",
|
|
13
|
+
"cancel": "キャンセル"
|
|
14
|
+
},
|
|
15
|
+
"error": {
|
|
16
|
+
"title": "問題が発生しました。",
|
|
17
|
+
"caption": "しばらくしてから再度お試しください。",
|
|
18
|
+
"confirm": "確認"
|
|
19
|
+
},
|
|
20
|
+
"success": {
|
|
21
|
+
"title": "完了しました。",
|
|
22
|
+
"caption": "リクエストは正常に処理されました。",
|
|
23
|
+
"confirm": "確認"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"actions": {
|
|
27
|
+
"cancel": "キャンセル",
|
|
28
|
+
"close": "閉じる",
|
|
29
|
+
"confirm": "確認",
|
|
30
|
+
"submit": "送信",
|
|
31
|
+
"submitting": "処理中...",
|
|
32
|
+
"required": "必須"
|
|
33
|
+
},
|
|
34
|
+
"ui": {
|
|
35
|
+
"select": "選択",
|
|
36
|
+
"noResults": "結果なし",
|
|
37
|
+
"imageGallery": "画像ギャラリー",
|
|
38
|
+
"dateSelect": "日付を選択",
|
|
39
|
+
"dateRangeSelect": "期間を選択",
|
|
40
|
+
"pagination": "ページ移動",
|
|
41
|
+
"previous": "前へ",
|
|
42
|
+
"next": "次へ",
|
|
43
|
+
"goToPage": "ページへ移動",
|
|
44
|
+
"currentPage": "現在のページ {value}",
|
|
45
|
+
"goToPageItem": "{value}ページへ移動",
|
|
46
|
+
"less": "少ない",
|
|
47
|
+
"more": "多い"
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|