@musecat/uikit 0.1.1 → 0.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/.agents/references/Components/Box.md +60 -0
  2. package/.agents/references/Components/Button.md +49 -0
  3. package/.agents/references/Components/Card.md +67 -0
  4. package/.agents/references/Components/Checkbox.md +48 -0
  5. package/.agents/references/Components/CodeBox.md +31 -0
  6. package/.agents/references/Components/ContextMenu.md +82 -0
  7. package/.agents/references/Components/ContributionGraph.md +61 -0
  8. package/.agents/references/Components/DatePicker.md +92 -0
  9. package/.agents/references/Components/Divider.md +56 -0
  10. package/.agents/references/Components/Header.md +52 -0
  11. package/.agents/references/Components/Icon.md +82 -0
  12. package/.agents/references/Components/Input.md +60 -0
  13. package/.agents/references/Components/Label.md +78 -0
  14. package/.agents/references/Components/Layout.md +102 -0
  15. package/.agents/references/Components/Maps.md +63 -0
  16. package/.agents/references/Components/Nav.md +68 -0
  17. package/.agents/references/Components/Pagination.md +67 -0
  18. package/.agents/references/Components/Pill.md +75 -0
  19. package/.agents/references/Components/Profile.md +76 -0
  20. package/.agents/references/Components/Progress.md +72 -0
  21. package/.agents/references/Components/Radio.md +68 -0
  22. package/.agents/references/Components/Select.md +80 -0
  23. package/.agents/references/Components/Skeleton.md +48 -0
  24. package/.agents/references/Components/Spinner.md +62 -0
  25. package/.agents/references/Components/Text.md +73 -0
  26. package/.agents/references/Components/TimePicker.md +72 -0
  27. package/.agents/references/Components/Timeline.md +97 -0
  28. package/.agents/references/Components/Title.md +108 -0
  29. package/.agents/references/Components/Toggle.md +53 -0
  30. package/.agents/references/Components/Tooltip.md +62 -0
  31. package/.agents/references/Frameworks/DNDView.md +82 -0
  32. package/.agents/references/Frameworks/Dialog.md +109 -0
  33. package/.agents/references/Frameworks/EdgeEffect.md +64 -0
  34. package/.agents/references/Frameworks/HScrollView.md +76 -0
  35. package/.agents/references/Frameworks/ImageView.md +67 -0
  36. package/.agents/references/Frameworks/Motion.md +62 -0
  37. package/.agents/references/Frameworks/Pressable.md +79 -0
  38. package/.agents/references/Frameworks/Squircle.md +50 -0
  39. package/.agents/references/Frameworks/Theme.md +68 -0
  40. package/.agents/references/Frameworks/Toaster.md +67 -0
  41. package/.agents/references/Frameworks/View.md +81 -0
  42. package/.agents/references/Frameworks/_shared.md +74 -0
  43. package/.agents/references/Styles/Animation.md +43 -0
  44. package/.agents/references/Styles/Color.md +45 -0
  45. package/.agents/references/Styles/Font.md +37 -0
  46. package/.agents/references/Styles/Icon.md +43 -0
  47. package/.agents/references/Styles/Importer.md +19 -0
  48. package/.agents/references/Styles/System.md +27 -0
  49. package/.agents/references/Styles/Textstyle.md +45 -0
  50. package/.agents/references/Styles/Theme.md +51 -0
  51. package/.agents/references/Styles/Viewport-global.md +42 -0
  52. package/.agents/references/Styles/Viewport.md +42 -0
  53. package/AGENTS.md +54 -0
  54. package/CLAUDE.md +1 -0
  55. package/README.md +4 -0
  56. package/package.json +4 -1
  57. package/packages/Styles/_icon.scss +2 -0
  58. package/packages/Styles/_importer.scss +0 -1
@@ -0,0 +1,68 @@
1
+ # Theme Framework
2
+
3
+ ## Purpose
4
+
5
+ The `Theme` framework is a set of utilities and types that receive UIKit's design system tokens (color, background, border, shadow, blur, etc.) as React props and convert them into corresponding CSS classes. It plays a central role in maintaining global theme-based consistency.
6
+
7
+ ## Usage Logic
8
+
9
+ - **Radius**: `Radius.types.ts` returns strings like "R8", "Circle" as pixels or CSS variables.
10
+ - **Color/Background**: The `resolveThemeClasses` function combines the given preset (`themePreset`), background (`background`), and text color (`color`) to infer class names and returns them as an array.
11
+ - **Border / Shadow / Blur**: Each mapping function converts into utility classes like `ThemeBorder-`, `ThemeShadow-`, `BackgroundBlur-`.
12
+
13
+ ## Type Signatures
14
+
15
+ ```typescript
16
+ // Theme.types.ts
17
+ export type ThemePreset =
18
+ "UIPrimary" | "UISecondary" | "BaseFull" | "BaseSoft"; /* ... */
19
+ export type ThemePaint =
20
+ | `${ThemeColorName}${ThemeLevel}`
21
+ | `${ThemeColorName}${ThemeLevel}TP${ThemeTPScale}`;
22
+
23
+ export interface ThemeSystemProps {
24
+ themePreset?: ThemePreset;
25
+ background?: ThemeBackgroundPaint;
26
+ color?: ThemePaint;
27
+ border?: ThemeBorderPaint;
28
+ shadow?: ThemeShadow;
29
+ themeInteractive?: boolean;
30
+ selected?: boolean;
31
+ disabled?: boolean;
32
+ readOnly?: boolean;
33
+ backgroundBlur?: BackgroundBlurValue;
34
+
35
+ }
36
+
37
+ export function resolveThemeClasses(
38
+ props: ThemeSystemProps & {/* ... */},
39
+ ): string[];
40
+ export function Border(
41
+ border?: ThemeBorderPaint,
42
+ basePaint?: ThemePaint,
43
+ ): string | undefined;
44
+ export function Shadow(shadow?: ThemeShadow): string | undefined;
45
+ ```
46
+
47
+ ## Example Code
48
+
49
+ ```tsx
50
+ import {
51
+ resolveThemeClasses,
52
+ Border,
53
+ Shadow,
54
+ } from "@/packages/Frameworks/Theme/Theme.types";
55
+ import clsx from "clsx";
56
+
57
+ function CustomBox(props: ThemeSystemProps) {
58
+ const themeClasses = resolveThemeClasses(props);
59
+ const borderClass = Border(props.border);
60
+ const shadowClass = Shadow(props.shadow);
61
+
62
+ return (
63
+ <div className={clsx(themeClasses, borderClass, shadowClass)}>
64
+ Box with theme applied
65
+ </div>
66
+ );
67
+ }
68
+ ```
@@ -0,0 +1,67 @@
1
+ # Toaster Framework
2
+
3
+ ## Purpose
4
+
5
+ The `Toaster` framework is a wrapper component for displaying toast messages (notifications) used throughout the application. It internally uses the `sonner` library and provides custom styles and default icon settings tailored to UIKit's design system (icons, color mode, etc.).
6
+
7
+ ## Usage Logic
8
+
9
+ - Render `ToasterBootstrap` (default export) at the top level (Root Layout, etc.).
10
+ - Where you need to show a toast message, use the `toast` object re-exported from the `sonner` package to trigger messages.
11
+ - Automatically injects UIKit's color mode and custom icons (`Icon` component) to maintain application consistency.
12
+
13
+ ## Type Signatures
14
+
15
+ ```typescript
16
+ import type { IconProps } from "../../Components/Icon/Icon.types";
17
+ import type { ToasterProps } from "sonner";
18
+
19
+ export interface ToasterBootstrapProps extends ToasterProps {
20
+ "data-color-mode"?: string;
21
+ theme?: ToasterProps["theme"];
22
+ icon?: IconProps;
23
+ title?: React.ReactNode;
24
+ storage?: {
25
+ key?: string;
26
+ value?: string;
27
+ }[];
28
+ }
29
+
30
+
31
+ ```
32
+
33
+ ## Example Code
34
+
35
+ ```tsx
36
+ // 1. Render at the top level (App component, etc.)
37
+ import ToasterBootstrap from "@/packages/Frameworks/Toaster/Toaster.boot";
38
+
39
+ export default function App() {
40
+ return (
41
+ <>
42
+ <ToasterBootstrap data-color-mode="dark" />
43
+ <MyComponents />
44
+ </>
45
+ );
46
+ }
47
+
48
+ // 2. Show toast
49
+ import { toast } from "@/packages/Frameworks/Toaster/Toaster.boot";
50
+
51
+ function MyComponents() {
52
+ const handleSuccess = () => {
53
+ toast.success("Saved successfully.");
54
+ };
55
+
56
+ const handleError = () => {
57
+ toast.error("An error occurred.");
58
+ };
59
+
60
+ return (
61
+ <div>
62
+ <button onClick={handleSuccess}>Success</button>
63
+ <button onClick={handleError}>Fail</button>
64
+ </div>
65
+ );
66
+ }
67
+ ```
@@ -0,0 +1,81 @@
1
+ # View Framework
2
+
3
+ ## Purpose
4
+
5
+ The `View` framework is UIKit's core layout building block. It replaces React's `div` or `motion.div` to help you declaratively and consistently write Flexbox and Grid layouts, themes, corner rounding (Squircle), padding/margin, blur, and other style properties. It also provides sub-components like `HScroll`, `Image`, and `DND`.
6
+
7
+ ## Usage Logic
8
+
9
+ - The `alignItems`, `justifyContent`, `column`, `row`, `gap` shorthand props make Flexbox layout easy to compose.
10
+ - When `radius` is specified, it is rendered using the `Squircle` framework by default, except when `noSquircle` is `true` or there is a border.
11
+ - Passing the `motion` prop internally converts it into `motion/react`'s animation component.
12
+ - Sub-components like `View.DND` are provided as a namespace to maintain a consistent mental model.
13
+
14
+ ## Type Signatures
15
+
16
+ ```typescript
17
+ import type { CSSProperties, HTMLAttributes } from "react";
18
+ import type { MotionProps } from "motion/react";
19
+ import type { WindProps } from "../_shared/Wind.types";
20
+ import type {
21
+ PaddingProps,
22
+ RadiusProps,
23
+ ThemeSystemProps,
24
+ BorderProps,
25
+ } from "../Theme";
26
+
27
+ export interface ViewProps
28
+ extends
29
+ HTMLAttributes<HTMLDivElement>,
30
+ WindProps,
31
+ ThemeSystemProps,
32
+ BorderProps,
33
+ RadiusProps,
34
+ PaddingProps {
35
+ motion?: MotionProps;
36
+ alignItems?: CSSProperties["alignItems"];
37
+ justifyContent?: CSSProperties["justifyContent"];
38
+ wrap?: CSSProperties["flexWrap"];
39
+ column?: boolean;
40
+ row?: boolean;
41
+ inline?: boolean;
42
+ gap?: number | string;
43
+ gridTemplateColumns?: string;
44
+ gridTemplateRows?: string;
45
+ gridAutoFlow?: CSSProperties["gridAutoFlow"];
46
+ fullWidth?: boolean;
47
+ width?: number | string;
48
+ height?: number | string;
49
+ margin?: number | string;
50
+ sticky?: boolean | number | string;
51
+ top?: number | string;
52
+ bottom?: number | string;
53
+ noSquircle?: boolean; // option to bypass Squircle rendering
54
+ }
55
+ ```
56
+
57
+ ## Example Code
58
+
59
+ ```tsx
60
+ import View from "@/packages/Frameworks/View/View";
61
+
62
+ function Card() {
63
+ return (
64
+ <View
65
+ column
66
+ gap={16}
67
+ padding="R24"
68
+ radius="R16"
69
+ themePreset="UIPrimary"
70
+ width="100%"
71
+ >
72
+ <View row alignItems="center" justifyContent="space-between">
73
+ <h3>Title</h3>
74
+ <button>Action</button>
75
+ </View>
76
+
77
+ <View opacity={0.8}>Content goes here.</View>
78
+ </View>
79
+ );
80
+ }
81
+ ```
@@ -0,0 +1,74 @@
1
+ # _shared Framework
2
+
3
+ ## Purpose
4
+
5
+ The `_shared` framework folder is a module that collects utility functions, hooks, constants, and shared types commonly depended on by multiple frameworks or components. It includes size conversion, layer constants, scroll lock handling, share layout type definitions, etc.
6
+
7
+ ## Usage Logic
8
+
9
+ - **sizing.ts**: Consistently parses numeric or string size values like `16`, `"1rem"`, `"16px"` and converts them to CSS values (`Size`, `SizePX` functions).
10
+ - **Padding.types.ts**: Utilities for handling multi-directional padding (vertical/horizontal, single).
11
+ - **useControllableState.ts**: A custom hook to support both controlled and uncontrolled component states.
12
+ - **layer.constants.ts**: Provides global Z-index layer constants (`LAYER_Z_INDEX`).
13
+ - **Wind.types.ts**: Shared layout props (`width`, `height`, `margin`, `gap`, `alignItems`, `justifyContent`, `alignSelf`, `column`, `row`, `fullWidth`, `opacity`, `noSquircle`) used by both `ViewProps` and `PressableProps`.
14
+ - **bodyScrollLock.ts**: Implements touch and mouse scroll lock.
15
+ - **normalize.ts**: Image src, brand icon class, and language name normalization utilities.
16
+
17
+ ## Type Signatures
18
+
19
+ ```typescript
20
+ // sizing.ts
21
+ export type UIKitSizeValue = number | string;
22
+ export function Size(value?: UIKitSizeValue | null): string | number | undefined;
23
+ export function SizePX(value: UIKitSizeValue | undefined, fallback: number, rootFontSize?: number): number;
24
+
25
+ // useControllableState.ts
26
+ export function useControllableState<T>(options: { value?: T; defaultValue: T }): const [T, (nextValue: T | ((prevValue: T) => T)) => void, boolean];
27
+
28
+ // layer.constants.ts
29
+ export const LAYER_Z_INDEX: { popover: number, modal: number, /* ... */ };
30
+
31
+ // Wind.types.ts
32
+ export interface WindProps {
33
+ width?: number | string;
34
+ height?: number | string;
35
+ margin?: number | string;
36
+ gap?: number | string;
37
+ alignItems?: CSSProperties["alignItems"];
38
+ justifyContent?: CSSProperties["justifyContent"];
39
+ alignSelf?: CSSProperties["alignSelf"];
40
+ column?: boolean;
41
+ row?: boolean;
42
+ fullWidth?: boolean;
43
+ opacity?: number;
44
+ noSquircle?: boolean;
45
+ }
46
+
47
+ // bodyScrollLock.ts
48
+ export function useScrollLock(locked?: boolean): { lockScroll: () => void, openScroll: () => void };
49
+ ```
50
+
51
+ ## Example Code
52
+
53
+ ```tsx
54
+ import { Size } from "@/packages/Frameworks/_shared/sizing";
55
+ import { useScrollLock } from "@/packages/Frameworks/_shared/bodyScrollLock";
56
+ import { useControllableState } from "@/packages/Frameworks/_shared/useControllableState";
57
+
58
+ function MyComponent({ value, defaultValue, width }) {
59
+ // Scroll lock
60
+ useScrollLock(true);
61
+
62
+ // Size normalization: 16 -> "1.6rem"
63
+ const widthStyle = Size(width);
64
+
65
+ // State management (controlled or uncontrolled)
66
+ const [current, setCurrent] = useControllableState({ value, defaultValue });
67
+
68
+ return (
69
+ <div style={{ width: widthStyle }}>
70
+ <button onClick={() => setCurrent(!current)}>Toggle</button>
71
+ </div>
72
+ );
73
+ }
74
+ ```
@@ -0,0 +1,43 @@
1
+ # Animation
2
+
3
+ This document defines UIKit's animation tokens and related style rules.
4
+
5
+ ## Tokens (CSS Variables)
6
+
7
+ Animation effects are defined using the `--transition-*` prefix.
8
+
9
+ - `--transition-surface-duration`: Default surface transition duration (420ms)
10
+ - `--transition-surface-ease`: Default surface transition timing function (cubic-bezier)
11
+ - `--transition-background`: Background color transition
12
+ - `--transition-color`: Text color transition
13
+ - `--transition-font-size`: Font size transition
14
+ - `--transition-outline`: Outline transition
15
+ - `--transition-opacity`: Opacity transition
16
+ - `--transition-border`: Border transition
17
+ - `--transition-transform`: Transform transition
18
+ - `--transition-shadow`: Shadow transition
19
+ - `--transition-radius`: Border-radius transition
20
+ - `--transition-filter`: Filter (blur, etc.) transition
21
+ - `--transition-icon`: Combined icon transition (fill, stroke, color)
22
+ - `--transition-surface`: Combined surface transition (border, background, outline)
23
+ - `--transition-default`: General shape/transform combined transition
24
+ - `--transition-fade`: Simple opacity fade
25
+ - `--transition-pressable`: Click effect transition for pressable components such as buttons
26
+
27
+ ## Scaling
28
+
29
+ - `--s-shallow`: Slight shrink effect `scaleX(.99) scaleY(.99)`
30
+ - `--s`: Default click shrink effect `scaleX(.96) scaleY(.96)`
31
+
32
+ ## Usage
33
+
34
+ AI/human developers inject the CSS variables directly into components that require animation effects.
35
+
36
+ ```css
37
+ .button {
38
+ transition: var(--transition-pressable);
39
+ }
40
+ .button:active {
41
+ transform: var(--s);
42
+ }
43
+ ```
@@ -0,0 +1,45 @@
1
+ # Color
2
+
3
+ This document defines UIKit's color system and tokens.
4
+
5
+ ## Tokens (CSS Variables)
6
+
7
+ ### 1. Primitive Colors (Level 1 ~ Level 6)
8
+
9
+ The base color palette is provided from level 1 (bright/light) to level 6 (dark/saturated).
10
+
11
+ - Pink, Red, Brown, Orange, Yellow, Green, Mint, Cyan, Blue, Indigo, Purple, Magenta
12
+ - Base Light (white/gray-tone family)
13
+ - Base Dark (black/dark-gray family)
14
+ - e.g. `--color-blue-4`, `--color-red-5`
15
+
16
+ ### 2. Semantic/Base Colors (Light/Dark mode support)
17
+
18
+ - `--color-text-base`: Default text color
19
+ - `--color-icon-base`: Default icon color
20
+ - `--color-border-base`: Default border color
21
+ - `--color-background-base`: Default background color (system/modal background, etc.)
22
+
23
+ Depending on the mode, the `--color-base-*` family is swapped:
24
+
25
+ - `light`: `--color-base-1` is the light tone, `--color-base-reversed-1` is the dark tone
26
+ - `dark`: `--color-base-1` is the dark tone, `--color-base-reversed-1` is the light tone
27
+
28
+ ## Usage
29
+
30
+ AI/human developers must avoid hardcoding color values (hex, rgb) and always use color tokens when specifying colors.
31
+
32
+ ```css
33
+ /* Good */
34
+ .card {
35
+ background-color: var(--color-background-base);
36
+ color: var(--color-text-base);
37
+ border: 1px solid var(--color-blue-4);
38
+ }
39
+
40
+ /* Bad - Do not hardcode colors */
41
+ .card {
42
+ background-color: #ffffff;
43
+ color: #333333;
44
+ }
45
+ ```
@@ -0,0 +1,37 @@
1
+ # Font
2
+
3
+ This document defines UIKit's font configuration and system.
4
+
5
+ ## External Font Imports
6
+
7
+ - Asta Sans
8
+ - Min Icon
9
+ - Tossface (Emoji)
10
+ - JetBrains Mono
11
+ - Source Han Serif KR
12
+ - Pretendard
13
+
14
+ ## Tokens (CSS Variables)
15
+
16
+ - `--font-size`: Base font size (`10px`) => 1rem = 10px baseline
17
+ - `--font-emoji`: Emoji font stack
18
+ - `--font-monospace`: Monospace font stack
19
+ - `--font-icon`: Icon font stack
20
+ - `--font-sans-serif`: Default sans-serif font stack (Pretendard, etc.)
21
+ - `--font-serif`: Default serif font stack
22
+
23
+ ## Utility Classes
24
+
25
+ - `.FontSerif`: Force apply serif font
26
+ - `.FontCode`, `code`: Force apply monospace (Mono) font
27
+
28
+ ## Usage
29
+
30
+ Use font family variables when specifying the font of a component or element in CSS.
31
+
32
+ ```css
33
+ .custom-code-block {
34
+ font-family: var(--font-monospace);
35
+ font-size: 1.4rem;
36
+ }
37
+ ```
@@ -0,0 +1,43 @@
1
+ # Icon
2
+
3
+ This document defines the icon font (min-icon based) and related weight adjustment classes.
4
+
5
+ ## Icon Font Configuration
6
+
7
+ By default it is rendered using the `i` tag, with the `--font-icon` font stack and `font-variation-settings` applied. When the `.iFill` class is specified, the font setting (ss09) is turned on and the icon is converted to a filled (Solid) icon.
8
+
9
+ ## Weight
10
+
11
+ Supports classes for fine-grained control of icon weight. Controls the CSS variable `--uikit-icon-font-weight`.
12
+
13
+ - `.iThin` (100)
14
+ - `.iExtraLight` (200)
15
+ - `.iLight` (300)
16
+ - `.iRegular` (400)
17
+ - `.iMedium` (500)
18
+ - `.iSemiBold` (600)
19
+ - `.iBold` (700)
20
+ - `.iExtraBold` (800)
21
+ - `.iBlack` (900)
22
+
23
+ ## Icon Classes
24
+
25
+ Approximately several hundred icon classes are defined. Class names follow the `.i{IconName}` rule. Examples:
26
+
27
+ - `.iCircle`, `.iSquare`
28
+ - `.iClose`, `.iCheck`, `.iAdd`, `.iRemove`
29
+ - `.iInfo`, `.iWarning`, `.iQuestion`
30
+ - `.iMenu`, `.iMoreHoriz`, `.iMoreVert`
31
+ - Plus many arrows (Arrow), devices (Device), UI elements, etc.
32
+
33
+ ## Usage
34
+
35
+ Render on screen by using a dedicated component or by combining classes on HTML tags (mainly `<i>` or `<span class="icon">`).
36
+
37
+ ```html
38
+ <!-- Thin outlined close icon -->
39
+ <i class="iClose iLight"></i>
40
+
41
+ <!-- Bold filled warning icon -->
42
+ <i class="iWarning iFill iBold"></i>
43
+ ```
@@ -0,0 +1,19 @@
1
+ # Importer
2
+
3
+ The `_importer.scss` file is the entry point that imports and bundles all SCSS modules within the Styles package.
4
+
5
+ ## Loaded Module List
6
+
7
+ 1. `animation`
8
+ 2. `color`
9
+ 3. `font`
10
+ 4. `icon`
11
+ 5. `system`
12
+ 6. `textstyle`
13
+ 7. `theme`
14
+ 8. `viewport`
15
+ 9. `viewport-global`
16
+
17
+ ## Usage
18
+
19
+ This file is used as the package distribution and compiler entry point. When adding styles, write them in individual files and add them to the Importer if necessary. During normal component development there is almost no need to modify this file directly.
@@ -0,0 +1,27 @@
1
+ # System
2
+
3
+ This document defines UIKit's global styles and base initialization (CSS Reset) rules.
4
+
5
+ ## Core Rules
6
+
7
+ 1. **Box Sizing & Font**
8
+ - All elements (`*`, `::before`, `::after`) have `box-sizing: border-box`.
9
+ - The default font `var(--font-sans-serif)` is applied.
10
+ - `word-break: keep-all` prevents Korean word breaking.
11
+
12
+ 2. **Root (html, body)**
13
+ - `html`: `font-size: var(--font-size)` is applied so scaling is based on 1rem = 10px.
14
+ - `html`: Default text color (`var(--color-text-base)`) and background color (`var(--color-background-base)`) are set.
15
+ - `body`: Uses a centered flex-col layout by default, with margin/padding reset.
16
+
17
+ 3. **Form Elements & Interactive Elements (a, button, input, etc.)**
18
+ - Background, border, margin, padding, and outline are reset.
19
+ - `a`, `button` have `cursor: pointer`.
20
+ - `input::placeholder` opacity is set to 0.4.
21
+
22
+ 4. **Disabled State**
23
+ - `*:disabled`, `*[disabled]`, `.disabled` elements have `cursor: not-allowed` and `opacity: .4`, and events are blocked (`pointer-events: none`).
24
+
25
+ ## Usage
26
+
27
+ Loaded at the top of the app without any explicit call to build the global environment. When developing components, be aware of these reset rules (e.g., buttons have no default background/border) and override styles accordingly.
@@ -0,0 +1,45 @@
1
+ # Textstyle
2
+
3
+ This document defines the typography hierarchy and text style utility classes.
4
+
5
+ ## Tokens (CSS Variables)
6
+
7
+ Font size and line-height are managed as tokens.
8
+
9
+ - `LargeTitle`: 3.8rem / 4.1rem
10
+ - `Title1`: 2.6rem / 3.3rem
11
+ - `Title2`: 2.2rem / 2.8rem
12
+ - `Title3`: 2.rem / 2.5rem
13
+ - `Headline`: 1.8rem / 2.2rem
14
+ - `Body`: 1.8rem / 2.2rem
15
+ - `Callout`: 1.7rem / 2.1rem
16
+ - `Subheadline`: 1.6rem / 2.0rem
17
+ - `Footnote`: 1.3rem / 1.8rem
18
+ - `Caption1`: 1.2rem / 1.7rem
19
+ - `Caption2`: 1.1rem / 1.3rem
20
+
21
+ ## Utility Classes
22
+
23
+ Utility classes that can be used immediately on HTML tags or classes per the design system. Letter-spacing and font-weight are optimized for the font size.
24
+
25
+ - `.LargeTitle`
26
+ - `.Title1`, `h1`
27
+ - `.Title2`, `h2`
28
+ - `.Title3`, `h3`
29
+ - `.Headline`, `h4`
30
+ - `.Body`, `p`
31
+ - `.Callout`, `blockquote`
32
+ - `.Subheadline`, `h5`
33
+ - `.Footnote`, `h6`
34
+ - `.Caption1`, `small`
35
+ - `.Caption2`
36
+
37
+ ## Usage
38
+
39
+ Use the provided classes instead of inline styles to specify text component styles.
40
+
41
+ ```html
42
+ <h1 class="Title1">Page Title</h1>
43
+ <p class="Body">This is body text.</p>
44
+ <span class="Caption1">Additional description</span>
45
+ ```
@@ -0,0 +1,51 @@
1
+ # Theme
2
+
3
+ This document defines the theme utility used throughout the app. It includes comprehensive tokens and mixins for background colors, borders, shadows, rounding (Radius), and blur effects.
4
+
5
+ ## Tokens (CSS Variables)
6
+
7
+ - `--radius-*`: Corner rounding (circle, system-extra-light, system-light, system, system-bold, system-extra-bold, system-heavy)
8
+ - `--shadow-base-*`: Shadow tokens (levels 1~3). In dark mode, the shadow tone changes to a brighter variant.
9
+
10
+ ## Utility Classes
11
+
12
+ ### 1. ThemeBg (Background & Interactive)
13
+
14
+ Specifies the color system's level 1~6 colors as background. Classes with the TP (transparency) suffix apply a transparent background.
15
+
16
+ - `.ThemeBg-{Color}{Level}` (e.g., `.ThemeBg-Blue4`)
17
+ - `.ThemeBg-{Color}{Level}TP{Alpha}` (e.g., `.ThemeBg-BaseDark1TP3`)
18
+
19
+ > Interactive state (when combined with the `ThemeInteractive` class): Bright colors with `Level` 4 or below dynamically level-up on hover/active to provide click feedback.
20
+
21
+ ### 2. ThemeColor (Foreground)
22
+
23
+ - `.ThemeColor-{Color}{Level}`: Overrides the element's `color` and `stroke` with the specified color. (e.g., `.ThemeColor-Red5`)
24
+
25
+ ### 3. ThemeBorder (Border)
26
+
27
+ Supports thickness (Light, Regular, Bold) and direction (1: all, 2: left-right, 3: bottom, 4: left).
28
+
29
+ - `.ThemeBorder-{Color}{Level}-{Width}`
30
+ - `.ThemeBorder{Direction}-{Color}{Level}-{Width}` (e.g., `.ThemeBorder3-Base4-Regular`)
31
+ - Passing `None` makes it transparent.
32
+
33
+ ### 4. Interactive & Shadow & Blur
34
+
35
+ - `.ThemeInteractive`: When used alone (without a background color), a semi-transparent black/white mask is applied on hover/active to give click feedback.
36
+ - `.ThemeShadow-{1~3}`: Applies shadow by level. `.ThemeShadow-None` is supported.
37
+ - `.BackgroundBlur-{Level}`: `backdrop-filter: blur` effect.
38
+
39
+
40
+ ## Usage
41
+
42
+ Mix tokens and classes to compose the base form of UI components such as buttons, cards, and modals.
43
+
44
+ ```html
45
+ <div
46
+ class="ThemeBg-Base1 ThemeShadow-2 ThemeBorder-Base3-Light"
47
+ style="border-radius: var(--radius-system);"
48
+ >
49
+ <span class="ThemeColor-Blue4">Text</span>
50
+ </div>
51
+ ```
@@ -0,0 +1,42 @@
1
+ # Viewport Global
2
+
3
+ This document defines global utility classes based on viewport (responsive resolution). Generated based on the mixins in `_viewport.scss`.
4
+
5
+ ## Breakpoints
6
+
7
+ - `w1`: ~ 319.98px
8
+ - `w2`: 320px ~ 409.98px
9
+ - `w3`: 410px ~ 767.98px
10
+ - `w4`: 768px ~ 1279.98px
11
+
12
+ ## Utility Classes
13
+
14
+ Prefixed with `wX` to control responsive behavior. (e.g., `.w1-h`, `--w1-h` supported)
15
+
16
+ ### 1. Single Interval Control
17
+
18
+ - `.{key}-h`: `display: none` at or below the interval
19
+ - `.{key}-s`: `display: none` above the interval
20
+ - `.{key}-scrollX`: Enables horizontal scroll (`overflow-x: auto`) at or below the interval
21
+ - `.{key}-col`: Changes to `flex-direction: column` at or below the interval
22
+
23
+ ### 2. Composite Interval Control (Between)
24
+
25
+ Combines two breakpoints to create an interval. (e.g., `w2w3`)
26
+
27
+ - `.{start}{end}-h`: `display: none` between start ~ end
28
+ - `.{start}{end}-s`: `display: none` outside the specified interval (i.e., visible only within that interval)
29
+
30
+ ## Usage
31
+
32
+ When writing responsive layouts, control visibility through HTML classes rather than writing new CSS media queries.
33
+
34
+ ```html
35
+ <!-- Enable horizontal scroll at w3 size (767px) or below -->
36
+ <div class="w3-scrollX">
37
+ <!-- item list -->
38
+ </div>
39
+
40
+ <!-- Hidden on mobile (w2 or below) -->
41
+ <div class="w2-h">Text visible only on PC</div>
42
+ ```